diff options
293 files changed, 72941 insertions, 0 deletions
diff --git a/chart2/MANIFEST b/chart2/MANIFEST new file mode 100644 index 000000000..44d50050f --- /dev/null +++ b/chart2/MANIFEST @@ -0,0 +1,202 @@ +#************************************************************************* +# +# The Contents of this file are made available subject to the terms of +# either of the following licenses +# +# - GNU Lesser General Public License Version 2.1 +# - Sun Industry Standards Source License Version 1.1 +# +# Sun Microsystems Inc., October, 2000 +# +# GNU Lesser General Public License Version 2.1 +# ============================================= +# Copyright 2000 by Sun Microsystems, Inc. +# 901 San Antonio Road, Palo Alto, CA 94303, USA +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License version 2.1, as published by the Free Software Foundation. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# +# +# Sun Industry Standards Source License Version 1.1 +# ================================================= +# The contents of this file are subject to the Sun Industry Standards +# Source License Version 1.1 (the "License"); You may not use this file +# except in compliance with the License. You may obtain a copy of the +# License at http://www.openoffice.org/license.html. +# +# Software provided under this License is provided on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, +# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, +# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. +# See the License for the specific provisions governing your rights and +# obligations concerning the Software. +# +# The Initial Developer of the Original Code is: Sun Microsystems, Inc. +# +# Copyright: 2002 by Sun Microsystems, Inc. +# +# All Rights Reserved. +# +# Contributor(s): _______________________________________ +# +#************************************************************************* + +Directory Structure +------------------- + ++--drafts ++--genjava ++--inc ++--prj ++--res ++--source +| +--controller +| | +---dialogs +| | +---drawinglayer +| | +---itemsetwrapper +| | +---main +| | +---menu +| +--inc +| +--model +| | +---inc +| | +---main +| | +---oldapi +| | +---template +| | +---tree +| +--tools +| +--view +| | +---axes +| | +---charttypes +| | +---diagram +| | +---inc +| | +---main ++--qa ++--util ++--workbench + +--anyperformance + +--fileformat + +--officeintegration + +--prj + +--sampledata + +--stub + + +makefile.mk +----------- + +The top-level makefile is for generating a jar-file containing all compiled +java-files that were generated from the chart-idl files. The jar is necessary +for test-programs (see qa subdirectory) + +prj +--- + +Contains the build.lst, which determines in which order the subdirectories have +to be built. + +Also contains the d.lst which tells the deliver command which files to export +into the output tree, so that other modules have access. These are currently +only C++-headers of project-specific UNO-classes. + +source +------ + + inc + --- + + Contains header files that have to be shared between files of model, view and + controller. Apart from tools-headers, this should only include headers for + model objects, not view objects. + + controller + ---------- + + Contains files concerning the controller. All dialogs used in the UI of the + component are in the dialogs subfolder. In drawinglayer, there is code that + builds the bridge to the drawing-layer via non-UNO code. Itemsetwrapper + offers classes that convert XPropertySets of chart objects into non-UNO + SfxItemSets that are used to feed dialogs. + + model + ----- + + Contains files concerning the model. In oldapi there is code that implements + the old UNO-API (com.sun.star.chart.*) and wraps the new objects, thus it is + possible to talk to the new objects via the old API. Until the XML-filter is + adapted to the new API it will use this wrapper to communicate via the old + API. + + In the tree-subfolder, there are all classes that have to do with the + data-series tree provided by the XDiagram. Template contains code that + provides templates for all different chart-types. + + view + ---- + + Axes, charttypes and diagram implement the respective view-objects. + +drafts +------ + +Contains idl files for chart specific idl interface and type definitions. + +util +---- + +Contains the makefile to assemble the idl files into an rdb, and to generate C++ +headers for them. + +workbench +--------- + +Contains files for testing and files needed during prototyping. + + officeintegration + ----------------- + + Contains the install.pl script that installs the chart once it is build into + an existing office installation. This should become deprecated soon, when + the new chart will be a package. + + + sampledata + ---------- + + Contains sample files of data to feed a chart with. The files are loaded via + the FileDataSource and is thought for testing only. + + stub + ---- + + Contains some templates for newly created files. + +genjava +------- + +Contains a makefile for creating java-files out of the idl-files. The +java-files are generated out of the chart.rdb, which therefore must be ready +before this makefile is called. + +Its subdirectories reflect the directory-structure of the drafts/com directories +and contain a makefile in each leave of the tree. These makefiles compile +class-files out of the java-files. + +qa +-- + +Contains java-programs that execute so-called complex-testcases. Type dmake in +this directory to build the tests (they are not automatically built) and then +type dmake runtest to execute all tests. For most tests you will have to have a +running office in the background that listens to requests on port 8100. + diff --git a/chart2/NOTES b/chart2/NOTES new file mode 100644 index 000000000..e904a61c4 --- /dev/null +++ b/chart2/NOTES @@ -0,0 +1,102 @@ +#************************************************************************* +# +# $RCSfile: NOTES,v $ +# +# $Revision: 1.1.1.1 $ +# +# last change: $Author: bm $ $Date: 2003-10-06 09:58:21 $ +# +# The Contents of this file are made available subject to the terms of +# either of the following licenses +# +# - GNU Lesser General Public License Version 2.1 +# - Sun Industry Standards Source License Version 1.1 +# +# Sun Microsystems Inc., October, 2000 +# +# GNU Lesser General Public License Version 2.1 +# ============================================= +# Copyright 2000 by Sun Microsystems, Inc. +# 901 San Antonio Road, Palo Alto, CA 94303, USA +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License version 2.1, as published by the Free Software Foundation. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# +# +# Sun Industry Standards Source License Version 1.1 +# ================================================= +# The contents of this file are subject to the Sun Industry Standards +# Source License Version 1.1 (the "License"); You may not use this file +# except in compliance with the License. You may obtain a copy of the +# License at http://www.openoffice.org/license.html. +# +# Software provided under this License is provided on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, +# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, +# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. +# See the License for the specific provisions governing your rights and +# obligations concerning the Software. +# +# The Initial Developer of the Original Code is: Sun Microsystems, Inc. +# +# Copyright: 2002 by Sun Microsystems, Inc. +# +# All Rights Reserved. +# +# Contributor(s): _______________________________________ +# +#************************************************************************* + +NOTES +===== + +Installation +------------ + +in workbench/officeintegration you find a perl script 'install.pl' for doing all +necessary changes to enable the chart in an office. + +Note: +* Start a freshly installed Office at least once before you call this script. +* the TypeDetection.xcu of your user-registry is simply overwritten. +* the libraries are linked on Unix machines, on Windows they are just copied, so + keep them updated. +* Start the new chart with 'soffice private:factory/chart' or by entering + 'private:factory/chart' in the URL field of an application. + + +FileDataSource +-------------- + +For testing the FileDataSource: Currently the following files are read (hard-coded) +* Win: D:\files\data.chd +* Unix: /work/data/data.chd + +You can find sample data in workbench/sampledata + +Testing +------- + +To create a chart using the abovementioned file for data, Call the menu item +'File/Save all'. To rebuild the chart call 'File/Save'. + +You can also create a chart from spreadsheet data. + +ToDo +---- + +The following things should be done before going "online" at +OpenOffice.org. + +* the drafts namespace should vanish from the UNO types when they are finalized diff --git a/chart2/prj/build.lst b/chart2/prj/build.lst new file mode 100644 index 000000000..bc430035e --- /dev/null +++ b/chart2/prj/build.lst @@ -0,0 +1,31 @@ +ch chart2 : apphelper comphelper cppu cppuhelper sal sv svl svtool svx tk tools vcl NULL +ch chart2 usr1 - all ch_mkout NULL +ch chart2\drafts\com\sun\star\chart2 nmake - all ch_uno_chart2 NULL +ch chart2\drafts\com\sun\star\layout nmake - all ch_uno_layout NULL +ch chart2\util nmake - all ch_uno ch_uno_chart2 ch_uno_layout NULL +ch chart2\source\inc get - all ch_source_inc NULL +ch chart2\source\inc\chartview get - all ch_source_inc_chartview NULL +ch chart2\source\tools nmake - all ch_source_tools ch_uno NULL +ch chart2\source\model nmake - all ch_source_model ch_uno ch_source_tools ch_source_model_main ch_source_model_tree ch_source_model_template ch_source_model_oldapi NULL +ch chart2\source\model\main nmake - all ch_source_model_main ch_uno NULL +ch chart2\source\model\tree nmake - all ch_source_model_tree ch_uno NULL +ch chart2\source\model\template nmake - all ch_source_model_template ch_uno NULL +ch chart2\source\model\oldapi nmake - all ch_source_model_oldapi ch_uno NULL +ch chart2\res get - all ch_res NULL +ch chart2\source\view nmake - all ch_source_view ch_uno ch_source_tools ch_source_view_charttypes ch_source_view_axes ch_source_view_diagram ch_source_view_main NULL +ch chart2\source\view\inc get - all ch_source_view_inc NULL +ch chart2\source\view\axes nmake - all ch_source_view_axes ch_uno NULL +ch chart2\source\view\charttypes nmake - all ch_source_view_charttypes ch_uno NULL +ch chart2\source\view\diagram nmake - all ch_source_view_diagram ch_uno NULL +ch chart2\source\view\main nmake - all ch_source_view_main ch_uno NULL +ch chart2\source\controller nmake - all ch_source_controller ch_uno ch_source_tools ch_source_view ch_source_controller_drawinglayer ch_source_controller_itemsetwrapper ch_source_controller_dialogs ch_source_controller_menu ch_source_controller_main NULL +ch chart2\source\controller\inc get - all ch_source_controller_inc NULL +ch chart2\source\controller\dialogs nmake - all ch_source_controller_dialogs ch_uno NULL +ch chart2\source\controller\menu nmake - all ch_source_controller_menu ch_uno NULL +ch chart2\source\controller\drawinglayer nmake - all ch_source_controller_drawinglayer ch_uno NULL +ch chart2\source\controller\itemsetwrapper nmake - all ch_source_controller_itemsetwrapper ch_uno NULL +ch chart2\source\controller\main nmake - all ch_source_controller_main ch_uno NULL +ch chart2\prj get - all ch_prj NULL +ch chart2\genjava nmake - all ch_java ch_uno NULL +ch chart2\genjava\drafts\com\sun\star\layout nmake - all ch_class_layout ch_java NULL +ch chart2\genjava\drafts\com\sun\star\chart2 nmake - all ch_class_chart2 ch_class_layout ch_java NULL diff --git a/chart2/prj/d.lst b/chart2/prj/d.lst new file mode 100644 index 000000000..350cb736d --- /dev/null +++ b/chart2/prj/d.lst @@ -0,0 +1,13 @@ +mkdir: %_DEST%\inc%_EXT%\chart2 + +mkdir: %_DEST%\inc%_EXT%\drafts +mkdir: %_DEST%\inc%_EXT%\drafts\com +mkdir: %_DEST%\inc%_EXT%\drafts\com\sun +mkdir: %_DEST%\inc%_EXT%\drafts\com\sun\star +mkdir: %_DEST%\inc%_EXT%\drafts\com\sun\star\chart2 +mkdir: %_DEST%\inc%_EXT%\drafts\com\sun\star\layout + +..\%__SRC%\inc\drafts\com\sun\star\chart2\*.hdl %_DEST%\inc%_EXT%\drafts\com\sun\star\chart2\*.hdl +..\%__SRC%\inc\drafts\com\sun\star\chart2\*.hpp %_DEST%\inc%_EXT%\drafts\com\sun\star\chart2\*.hpp +..\%__SRC%\inc\drafts\com\sun\star\layout\*.hdl %_DEST%\inc%_EXT%\drafts\com\sun\star\layout\*.hdl +..\%__SRC%\inc\drafts\com\sun\star\layout\*.hpp %_DEST%\inc%_EXT%\drafts\com\sun\star\layout\*.hpp diff --git a/chart2/qa/TestCaseOldAPI.java b/chart2/qa/TestCaseOldAPI.java new file mode 100644 index 000000000..a796fadaf --- /dev/null +++ b/chart2/qa/TestCaseOldAPI.java @@ -0,0 +1,449 @@ +// package name: as default, start with complex +package qa; + +// imports +import complexlib.ComplexTestCase; +import com.sun.star.uno.XInterface; +import com.sun.star.uno.UnoRuntime; +import com.sun.star.uno.Type; +import com.sun.star.uno.XComponentContext; + +import java.io.PrintWriter; +import java.util.Hashtable; + +import com.sun.star.lang.*; +import com.sun.star.beans.*; +import com.sun.star.frame.*; +import com.sun.star.chart.*; +import com.sun.star.drawing.*; +import com.sun.star.util.XCloseable; +import com.sun.star.util.CloseVetoException; + +import drafts.com.sun.star.chart2.XTitled; +import drafts.com.sun.star.chart2.XTitle; +import drafts.com.sun.star.chart2.XDataProvider; +import drafts.com.sun.star.chart2.XFormattedString; + +import com.sun.star.uno.AnyConverter; +import com.sun.star.comp.helper.ComponentContext; + +/** + * The following Complex Test will test the + * com.sun.star.document.IndexedPropertyValues + * service + */ + +public class TestCaseOldAPI extends ComplexTestCase { + + // The name of the tested service + private final String testedServiceName = + "com.sun.star.chart.ChartDocument"; + + // The first of the mandatory functions: + /** + * Return the name of the test. + * In this case it is the actual name of the service. + * @return The tested service. + */ + public String getTestObjectName() { + return testedServiceName; + } + + // The second of the mandatory functions: return all test methods as an + // array. There is only one test function in this example. + /** + * Return all test methods. + * @return The test methods. + */ + public String[] getTestMethodNames() { + return new String[] { + "testTitle", + "testSubTitle", + "testDiagram", + "testAxis" + }; + } + + // ____________ + + public void before() + { + boolean bCreateView = false; + + if( bCreateView ) + mxChartModel = createDocument( "chart" ); + else + mxChartModel = createChartModel(); + + createFileDataSource( mxChartModel ); + mxOldDoc = (XChartDocument) UnoRuntime.queryInterface( + XChartDocument.class, mxChartModel ); + } + + // ____________ + + public void after_disabled() + { + XCloseable xCloseable = (XCloseable) UnoRuntime.queryInterface( + XCloseable.class, mxChartModel ); + assure( "document is no XCloseable", xCloseable != null ); + + try + { + xCloseable.close( true ); + } + catch( CloseVetoException ex ) + { + failed( ex.getMessage() ); + ex.printStackTrace( (PrintWriter)log ); + } + } + + // ____________ + + public void testTitle() + { + try + { + // set title at new chart + XTitled xTitled = (XTitled) UnoRuntime.queryInterface( + XTitled.class, mxChartModel ); + + // set title via new API + XTitle xTitle = setTitle( xTitled, "Sample", "@main-title" ); + +// printInterfacesAndServices( xTitle ); + + // get title via old API + XShape xTitleShape = mxOldDoc.getTitle(); + XPropertySet xTitleProp = (XPropertySet) UnoRuntime.queryInterface( + XPropertySet.class, xTitleShape ); + + // set property via old API + if( xTitleProp != null ) + { + String aTitle = " Overwritten by Old API "; + float fHeight = (float)17.0; + + xTitleProp.setPropertyValue( "String", aTitle ); + xTitleProp.setPropertyValue( "CharHeight", new Float( fHeight ) ); + + float fNewHeight = AnyConverter.toFloat( xTitleProp.getPropertyValue( "CharHeight" ) ); + assure( "Changing CharHeight via old API failed", fNewHeight == fHeight ); + + String aNewTitle = AnyConverter.toString( xTitleProp.getPropertyValue( "String" ) ); + assure( "Property \"String\" failed", aNewTitle.equals( aTitle )); + } + } + catch( Exception ex ) + { + failed( ex.getMessage() ); + ex.printStackTrace( (PrintWriter)log ); + } + } + + // ____________ + + public void testSubTitle() + { + try + { + // trying back-querying (from old Wrapper to new Model) + drafts.com.sun.star.chart2.XChartDocument xNewDoc = + (drafts.com.sun.star.chart2.XChartDocument) UnoRuntime.queryInterface( + drafts.com.sun.star.chart2.XChartDocument.class, + mxOldDoc ); + + // set title at new chart + XTitled xTitled = (XTitled) UnoRuntime.queryInterface( + XTitled.class, xNewDoc.getDiagram() ); + + // set title via new API + setTitle( xTitled, "Sub", "@sub-title" ); + + // get Property via old API + XShape xTitleShape = mxOldDoc.getSubTitle(); + XPropertySet xTitleProp = (XPropertySet) UnoRuntime.queryInterface( + XPropertySet.class, xTitleShape ); + + // set Property via old API + if( xTitleProp != null ) + { + int nColor = 0x009acd; // DeepSkyBlue3 + float fWeight = com.sun.star.awt.FontWeight.BOLD; + + xTitleProp.setPropertyValue( "CharColor", new Integer( nColor ) ); + xTitleProp.setPropertyValue( "CharWeight", new Float( fWeight )); + + int nNewColor = AnyConverter.toInt( xTitleProp.getPropertyValue( "CharColor" ) ); + assure( "Changing CharColor via old API failed", nNewColor == nColor ); + + float fNewWeight = AnyConverter.toFloat( xTitleProp.getPropertyValue( "CharWeight" ) ); + assure( "Changing CharWeight via old API failed", fNewWeight == fWeight ); + } + } + catch( Exception ex ) + { + failed( ex.getMessage() ); + ex.printStackTrace( (PrintWriter)log ); + } + } + + // ------------ + + public void testDiagram() + { + try + { + // testing wall + XDiagram xDia = mxOldDoc.getDiagram(); + if( xDia != null ) + { + X3DDisplay xDisp = (X3DDisplay) UnoRuntime.queryInterface( + X3DDisplay.class, xDia ); + assure( "X3DDisplay not supported", xDisp != null ); + + XPropertySet xProp = xDisp.getWall(); + if( xProp != null ) + { + log.println( "Testing wall" ); + + int nColor = 0xffe1ff; // thistle1 + + xProp.setPropertyValue( "FillColor", new Integer( nColor ) ); + + int nNewColor = AnyConverter.toInt( xProp.getPropertyValue( "FillColor" ) ); + assure( "Changing FillColor via old API failed", nNewColor == nColor ); + } + + assure( "Wrong Diagram Type", xDia.getDiagramType().equals( + "com.sun.star.chart.BarDiagram" )); + } + } + catch( Exception ex ) + { + failed( ex.getMessage() ); + ex.printStackTrace( (PrintWriter)log ); + } + } + + // ------------ + + public void testAxis() + { + try + { + XAxisYSupplier xYAxisSuppl = (XAxisYSupplier) UnoRuntime.queryInterface( + XAxisYSupplier.class, mxOldDoc.getDiagram() ); + assure( "Diagram is no y-axis supplier", xYAxisSuppl != null ); + + XPropertySet xProp = xYAxisSuppl.getYAxis(); + assure( "No y-axis found", xProp != null ); + + double nNewMax = 12.3; + + xProp.setPropertyValue( "Max", new Double( nNewMax )); + assure( "AutoMax is on", ! AnyConverter.toBoolean( xProp.getPropertyValue( "AutoMax" )) ); + + assure( "Maximum value invalid", + approxEqual( + AnyConverter.toDouble( xProp.getPropertyValue( "Max" )), + nNewMax )); + + xProp.setPropertyValue( "AutoMin", new Boolean( true )); + assure( "AutoMin is off", AnyConverter.toBoolean( xProp.getPropertyValue( "AutoMin" )) ); + + // missing: Min/Max, etc. is not always returning a double +// Object oMin = xProp.getPropertyValue( "Min" ); +// assure( "No Minimum set", AnyConverter.isDouble( oMin )); +// log.println( "Minimum retrieved: " + AnyConverter.toDouble( oMin )); + } + catch( Exception ex ) + { + failed( ex.getMessage() ); + ex.printStackTrace( (PrintWriter)log ); + } + } + + // ================================================================================ + + private XModel mxChartModel; + private XChartDocument mxOldDoc; + + // -------------------------------------------------------------------------------- + + private void createFileDataSource( XModel xModel ) + { + XMultiServiceFactory xFactory = (XMultiServiceFactory) param.getMSF(); + + try + { + XDataProvider xDataProv = (XDataProvider) UnoRuntime.queryInterface( + XDataProvider.class, + xFactory.createInstance( "com.sun.star.comp.chart.FileDataProvider" )); + + drafts.com.sun.star.chart2.XChartDocument xDoc = + (drafts.com.sun.star.chart2.XChartDocument) UnoRuntime.queryInterface( + drafts.com.sun.star.chart2.XChartDocument.class, + xModel ); + + if( xDataProv != null && + xDoc != null ) + { + xDoc.attachDataProvider( xDataProv ); + String aURL = "file://" + System.getProperty( "user.dir" ) + + System.getProperty( "file.separator" ) + "data.chd"; + log.println( aURL ); + xDoc.setRangeRepresentation( aURL ); + } + } + catch( Exception ex ) + { + failed( ex.getMessage() ); + ex.printStackTrace( (PrintWriter)log ); + } + } + + // ------------ + + private XModel createDocument( String sDocType ) + { + XModel aResult = null; + try + { + XComponentLoader aLoader = (XComponentLoader) UnoRuntime.queryInterface( + XComponentLoader.class, + ((XMultiServiceFactory)param.getMSF()).createInstance( "com.sun.star.frame.Desktop" ) ); + + aResult = (XModel) UnoRuntime.queryInterface( + XModel.class, + aLoader.loadComponentFromURL( "private:factory/" + sDocType, + "_blank", + 0, + new PropertyValue[ 0 ] ) ); + } + catch( Exception ex ) + { + failed( ex.getMessage() ); + ex.printStackTrace( (PrintWriter)log ); + } + + return aResult; + } + + // ------------ + + public XModel createChartModel() + { + XModel aResult = null; + try + { + aResult = (XModel) UnoRuntime.queryInterface( + XModel.class, + ((XMultiServiceFactory)param.getMSF()).createInstance( "com.sun.star.comp.chart2.ChartModel" ) ); + } + catch( Exception ex ) + { + failed( ex.getMessage() ); + ex.printStackTrace( (PrintWriter)log ); + } + + return aResult; + } + + // ------------ + + private XTitle setTitle( XTitled xTitleParent, String aTitle, String aId ) + { + XTitle xTitle = null; + + if( xTitleParent != null ) + try + { + XMultiServiceFactory xFact = (XMultiServiceFactory)param.getMSF(); + XMultiComponentFactory xCompFact = (XMultiComponentFactory) UnoRuntime.queryInterface( + XMultiComponentFactory.class, xFact ); + + XFormattedString[] aStrings = new XFormattedString[ 2 ]; + aStrings[0] = (XFormattedString) UnoRuntime.queryInterface( + XFormattedString.class, + xFact.createInstance( + "drafts.com.sun.star.chart2.FormattedString" )); + aStrings[1] = (XFormattedString) UnoRuntime.queryInterface( + XFormattedString.class, + xFact.createInstance( + "drafts.com.sun.star.chart2.FormattedString" )); + aStrings[0].setString( aTitle ); + aStrings[1].setString( " Title" ); + + Hashtable aParams = new Hashtable(); + aParams.put( "Identifier", aId ); + + xTitle = (XTitle) UnoRuntime.queryInterface( + XTitle.class, + xCompFact.createInstanceWithContext( + "drafts.com.sun.star.chart2.Title", + new ComponentContext( aParams, getComponentContext( xFact ) ))); + + xTitle.setText( aStrings ); + XPropertySet xTitleProp = (XPropertySet) UnoRuntime.queryInterface( + XPropertySet.class, xTitle ); + xTitleProp.setPropertyValue( "FillColor", new Integer( 0xfff8dc )); // cornsilk1 + xTitleParent.setTitle( xTitle ); + } + catch( Exception ex ) + { + failed( ex.getMessage() ); + ex.printStackTrace( (PrintWriter)log ); + } + + return xTitle; + } + + // ------------ + + private XComponentContext getComponentContext( XMultiServiceFactory xFact ) + { + XComponentContext xResult = null; + + XPropertySet xProp = (XPropertySet) UnoRuntime.queryInterface( + XPropertySet.class, xFact ); + if( xProp != null ) + try + { + xResult = (XComponentContext) + AnyConverter.toObject( + new Type( XComponentContext.class ), + xProp.getPropertyValue( "DefaultContext" ) ); + } + catch( Exception ex ) + { + failed( ex.getMessage() ); + ex.printStackTrace( (PrintWriter)log ); + } + + return xResult; + } + + // ------------ + + private void printInterfacesAndServices( Object oObj ) + { + log.println( "Services:" ); + util.dbg.getSuppServices( oObj ); + log.println( "Interfaces:" ); + util.dbg.printInterfaces( (XInterface)oObj, true ); + } + + // ------------ + + /// see rtl/math.hxx + private boolean approxEqual( double a, double b ) + { + if( a == b ) + return true; + double x = a - b; + return (x < 0.0 ? -x : x) + < ((a < 0.0 ? -a : a) * (1.0 / (16777216.0 * 16777216.0))); + } +} diff --git a/chart2/qa/data.chd b/chart2/qa/data.chd new file mode 100644 index 000000000..01888e4c1 --- /dev/null +++ b/chart2/qa/data.chd @@ -0,0 +1,14 @@ +# Series Labels +Column_1 Column_2 Column_3 + +# Categories +Row_1 Row_2 Row_3 Row_4 + +# Column 1 +9.1 2.4 3.1 4.3 + +# Column 2 +3.2 8.8 1.5 9.02 + +# Column 3 +4.54 9.65 3.7 6.2 diff --git a/chart2/qa/makefile.mk b/chart2/qa/makefile.mk new file mode 100644 index 000000000..f15621fa6 --- /dev/null +++ b/chart2/qa/makefile.mk @@ -0,0 +1,106 @@ +#************************************************************************* +# +# $RCSfile: makefile.mk,v $ +# +# $Revision: 1.1.1.1 $ +# +# last change: $Author: bm $ $Date: 2003-10-06 09:58:23 $ +# +# The Contents of this file are made available subject to the terms of +# either of the following licenses +# +# - GNU Lesser General Public License Version 2.1 +# - Sun Industry Standards Source License Version 1.1 +# +# Sun Microsystems Inc., October, 2000 +# +# GNU Lesser General Public License Version 2.1 +# ============================================= +# Copyright 2000 by Sun Microsystems, Inc. +# 901 San Antonio Road, Palo Alto, CA 94303, USA +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License version 2.1, as published by the Free Software Foundation. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# +# +# Sun Industry Standards Source License Version 1.1 +# ================================================= +# The contents of this file are subject to the Sun Industry Standards +# Source License Version 1.1 (the "License"); You may not use this file +# except in compliance with the License. You may obtain a copy of the +# License at http://www.openoffice.org/license.html. +# +# Software provided under this License is provided on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, +# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, +# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. +# See the License for the specific provisions governing your rights and +# obligations concerning the Software. +# +# The Initial Developer of the Original Code is: Sun Microsystems, Inc. +# +# Copyright: 2000 by Sun Microsystems, Inc. +# +# All Rights Reserved. +# +# Contributor(s): _______________________________________ +# +# +# +#************************************************************************* + +PRJNAME = chart2 +PRJ = .. +TARGET = chart_qa + +PACKAGE = qa + +# --- Settings ----------------------------------------------------- + +.INCLUDE : settings.mk + +MAXLINELENGTH = 100000 + +# - rdb ---- + +RDB = $(BIN)$/$(PRJNAME).rdb +EXTRA_RDB = $(SOLARBINDIR)$/types.rdb +JAVADIR = $(OUT)$/misc$/java +JARFILES = sandbox.jar ridl.jar + +# --- Files -------------------------------------------------------- + +JAVACLASSFILES = \ + $(CLASSDIR)$/$(PACKAGE)$/TestCaseOldAPI.class + +JARFILES = sandbox.jar ridl.jar jurt.jar unoil.jar juh.jar OOoRunner.jar +JAVAFILES = $(subst,$(CLASSDIR)$/$(PACKAGE)$/, $(subst,.class,.java $(JAVACLASSFILES))) + +# --- Targets ------------------------------------------------------ + +.INCLUDE : target.mk + +# --- Dependencies ------------------------------------------------- + +# Note: define dependencies after including target.mk (otherwise no targets are +# defined) + +ALLTAR: runtest + +# --- Rules -------------------------------------------------------- + +runtest: $(subst,.class,.run $(JAVACLASSFILES)) + +%.run: %.class + java -classpath $(CLASSPATH) org.openoffice.Runner -TestBase java_complex -o $(subst,$(CLASSDIR)$/$(PACKAGE)$/,$(PACKAGE). $(subst,.class, $<)) diff --git a/chart2/source/controller/controller.map b/chart2/source/controller/controller.map new file mode 100644 index 000000000..d3ce9e89b --- /dev/null +++ b/chart2/source/controller/controller.map @@ -0,0 +1,9 @@ +UDK_3_0_0 { + global: + component_getImplementationEnvironment; + component_writeInfo; + component_getFactory; + component_getDescriptionFunc; + local: + *; +}; diff --git a/chart2/source/controller/dialogs/Bitmaps.hrc b/chart2/source/controller/dialogs/Bitmaps.hrc new file mode 100644 index 000000000..7ae99cb11 --- /dev/null +++ b/chart2/source/controller/dialogs/Bitmaps.hrc @@ -0,0 +1,202 @@ +/************************************************************************* + * + * $RCSfile: Bitmaps.hrc,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:24 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef _SOLAR_HRC +#include <svtools/solar.hrc> +#endif + + //#define RID_APP_START 30000 +////#define RID_DRAW_TOOLBOX (RID_SCH_START + 1) +////#define RID_DRAW_OBJ_TOOLBOX (RID_APP_START + 10001) +////#define RID_STATUSBAR (RID_APP_START + 10002) + //#define RID_ALIGNMENT (RID_APP_START + 3) + //#define RID_ZOOM (RID_APP_START + 4) + //#define RID_CONTROLS (RID_APP_START + 5) + //#define RID_TEXT_TOOLBOX (RID_APP_START + 6) + +////#define RID_DOCWINDOW_ICON (RID_APP_START + 20) +////#define RID_DOCTEMPLATE_ICON (RID_APP_START + 21) + +// chart types +#define BMP_AREAS_2D (RID_APP_START + 34) +#define BMP_AREAS_2D_1 (RID_APP_START + 35) +#define BMP_AREAS_2D_3 (RID_APP_START + 36) +#define BMP_AREAS_3D (RID_APP_START + 61) +#define BMP_AREAS_3D_1 (RID_APP_START + 62) +#define BMP_AREAS_3D_2 (RID_APP_START + 63) + +#define BMP_BARS_2D (RID_APP_START + 41) +#define BMP_BARS_2D_1 (RID_APP_START + 42) +#define BMP_BARS_2D_2 (RID_APP_START + 43) +#define BMP_BARS_2D_3 (RID_APP_START + 44) +#define BMP_BARS_3D (RID_APP_START + 71) +#define BMP_BARS_3D_1 (RID_APP_START + 72) +#define BMP_BARS_3D_2 (RID_APP_START + 73) +#define BMP_BARS_3D_3 (RID_APP_START + 74) + +#define BMP_CIRCLES_2D (RID_APP_START + 45) +#define BMP_CIRCLES_2D_1 (RID_APP_START + 46) +#define BMP_CIRCLES_2D_2 (RID_APP_START + 47) +#define BMP_CIRCLES_3D (RID_APP_START + 68) + +#define BMP_COLUMNS_2D (RID_APP_START + 37) +#define BMP_COLUMNS_2D_1 (RID_APP_START + 38) +#define BMP_COLUMNS_2D_2 (RID_APP_START + 39) +#define BMP_COLUMNS_2D_3 (RID_APP_START + 40) +#define BMP_COLUMNS_2D_4 (RID_APP_START + 58) +#define BMP_COLUMNS_2D_5 (RID_APP_START + 98) +#define BMP_COLUMNS_3D (RID_APP_START + 64) +#define BMP_COLUMNS_3D_1 (RID_APP_START + 65) +#define BMP_COLUMNS_3D_2 (RID_APP_START + 66) +#define BMP_COLUMNS_3D_3 (RID_APP_START + 67) + +#define BMP_DONUT1_2D (RID_APP_START + 54) +//#define BMP_DONUT2_2D (RID_APP_START + 55) + +#define BMP_KEGELQ_3D_1 (RID_APP_START + 124) +#define BMP_KEGELQ_3D_2 (RID_APP_START + 125) +#define BMP_KEGELQ_3D_3 (RID_APP_START + 126) +#define BMP_KEGELQ_3D_4 (RID_APP_START + 127) +#define BMP_KEGEL_3D_1 (RID_APP_START + 120) +#define BMP_KEGEL_3D_2 (RID_APP_START + 121) +#define BMP_KEGEL_3D_3 (RID_APP_START + 122) +#define BMP_KEGEL_3D_4 (RID_APP_START + 123) + +//#define BMP_LINESYMB_2D (RID_APP_START + 50) +#define BMP_LINESYMB_2D_1 (RID_APP_START + 51) +#define BMP_LINESYMB_2D_2 (RID_APP_START + 52) +#define BMP_LINESYMB_2D_3 (RID_APP_START + 53) + +#define BMP_LINES_2D (RID_APP_START + 30) +#define BMP_LINES_2D_1 (RID_APP_START + 31) +#define BMP_LINES_2D_2 (RID_APP_START + 32) +#define BMP_LINES_2D_3 (RID_APP_START + 33) +#define BMP_LINES_3D (RID_APP_START + 60) + +#define BMP_NETSYMB_2D (RID_APP_START + 57) +#define BMP_NETSYMB_2D_STACK (RID_APP_START + 91) +#define BMP_NETSYMB_2D_PERCENT (RID_APP_START + 93) +#define BMP_NET_2D (RID_APP_START + 56) +#define BMP_NET_2D_STACK (RID_APP_START + 90) +#define BMP_NET_2D_PERCENT (RID_APP_START + 92) + +#define BMP_PYRAMIDQ_3D_1 (RID_APP_START + 116) +#define BMP_PYRAMIDQ_3D_2 (RID_APP_START + 117) +#define BMP_PYRAMIDQ_3D_3 (RID_APP_START + 118) +#define BMP_PYRAMIDQ_3D_4 (RID_APP_START + 119) + +#define BMP_PYRAMID_3D_1 (RID_APP_START + 112) +#define BMP_PYRAMID_3D_2 (RID_APP_START + 113) +#define BMP_PYRAMID_3D_3 (RID_APP_START + 114) +#define BMP_PYRAMID_3D_4 (RID_APP_START + 115) + +#define BMP_ROEHRE_3D_1 (RID_APP_START + 108) +#define BMP_ROEHRE_3D_2 (RID_APP_START + 109) +#define BMP_ROEHRE_3D_3 (RID_APP_START + 110) +#define BMP_ROEHRE_3D_4 (RID_APP_START + 111) + +#define BMP_SAEULE_3D_1 (RID_APP_START + 104) +#define BMP_SAEULE_3D_2 (RID_APP_START + 105) +#define BMP_SAEULE_3D_3 (RID_APP_START + 106) +#define BMP_SAEULE_3D_4 (RID_APP_START + 107) + +#define BMP_SPLINE_B (RID_APP_START + 96) +#define BMP_SPLINE_B_SYMBOL (RID_APP_START + 97) +#define BMP_SPLINE_CUBIC (RID_APP_START + 94) +#define BMP_SPLINE_CUBIC_SYMBOL (RID_APP_START + 95) + +#define BMP_STOCK_1 (RID_APP_START + 99) +#define BMP_STOCK_2 (RID_APP_START + 100) +#define BMP_STOCK_3 (RID_APP_START + 101) +#define BMP_STOCK_4 (RID_APP_START + 102) + +//#define BMP_SURF_3D (RID_APP_START + 59) +#define BMP_XYSYMB_2D (RID_APP_START + 49) +//#define BMP_XYZSYMB_3D (RID_APP_START + 70) +//#define BMP_XYZ_3D (RID_APP_START + 69) +#define BMP_XY_2D (RID_APP_START + 48) + + + +//SchStatisticTabPage and SchDataStatisticsDlg part 1 +#define BMP_INDICATE_NONE (RID_APP_START + 75) +#define BMP_INDICATE_BOTH (RID_APP_START + 76) +#define BMP_INDICATE_UP (RID_APP_START + 77) +#define BMP_INDICATE_DOWN (RID_APP_START + 78) + +/* +#define RID_ACCEL (RID_APP_START + 80) +#define RID_MENU (RID_APP_START + 81) +#define RID_PORTAL_MENU (RID_APP_START + 82) +*/ + +//SchStatisticTabPage and SchDataStatisticsDlg part 2 +#define BMP_REGRESSION_NONE (RID_APP_START + 85) +#define BMP_REGRESSION_LINEAR (RID_APP_START + 86) +#define BMP_REGRESSION_LOG (RID_APP_START + 87) +#define BMP_REGRESSION_EXP (RID_APP_START + 88) +#define BMP_REGRESSION_POWER (RID_APP_START + 89) + +// Popup-Menus +////#define RID_FORMAT_POPUP (RID_APP_START + 200) +////#define RID_3D_POPUP (RID_APP_START + 201) +////#define RID_3D_PIE_POPUP (RID_APP_START + 202) +////#define RID_2D_POPUP (RID_APP_START + 203) +////#define RID_2D_PIE_POPUP (RID_APP_START + 204) diff --git a/chart2/source/controller/dialogs/Bitmaps.src b/chart2/source/controller/dialogs/Bitmaps.src new file mode 100644 index 000000000..973252fa1 --- /dev/null +++ b/chart2/source/controller/dialogs/Bitmaps.src @@ -0,0 +1,493 @@ +/************************************************************************* + * + * $RCSfile: Bitmaps.src,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:24 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "Bitmaps.hrc" + +/* +#include "sfx2/sfx.hrc" +#include "svtools/style.hrc" +*/ +/* +SfxStyleFamilies DLG_STYLE_DESIGNER +{ + StyleFamilyList = + { + SfxStyleFamilyItem + { + StyleBitmap = Bitmap { File = "sco206.bmp" ; }; + Text = "Grafikobjektvorlagen" ; + Text [ ENGLISH ] = "Graphic Objects Styles" ; + Text [ english_us ] = "Graphics Styles" ; + Text [ italian ] = "Modelli di oggetti grafici" ; + Text [ spanish ] = "Estilos de objeto grfico" ; + Text [ french ] = "Styles d'objet graphique" ; + Text [ dutch ] = "Opmaakprofielen voor grafische objecten" ; + Text [ swedish ] = "Grafikobjektformatmallar" ; + Text [ danish ] = "Grafikobjekttypografier" ; + Text [ portuguese_brazilian ] = "Estilos de Figuras" ; + Text [ portuguese ] = "Modelos de objectos grficos" ; + Text[ chinese_simplified ] = "图形对象样式"; + Text[ russian ] = " "; + Text[ polish ] = "Style grafiki"; + Text[ japanese ] = "図オブジェクトスタイル"; + Text[ chinese_traditional ] = "圖形物件樣式"; + Text[ arabic ] = " "; + Text[ greek ] = " "; + Text[ korean ] = "그림 스타일 "; + Text[ czech ] = "Grafické styly" ; + StyleFamily = SFX_STYLE_FAMILY_PARA ; + FilterList = + { + < STR_STYLE_FILTER_ALL ; SFXSTYLEBIT_ALL ; > ; + < STR_STYLE_FILTER_USED ; SFXSTYLEBIT_USED ; > ; + < STR_STYLE_FILTER_USERDEF ; SFXSTYLEBIT_USERDEF ; > ; + }; + }; + }; +}; +*/ + +Bitmap BMP_AREAS_2D +{ + File = "areas2d.bmp" ; +}; +Bitmap BMP_AREAS_2D_1 +{ + File = "areas2d1.bmp" ; +}; +Bitmap BMP_AREAS_2D_3 +{ + File = "areas2d3.bmp" ; +}; +Bitmap BMP_AREAS_3D +{ + File = "areas3d.bmp" ; +}; +Bitmap BMP_AREAS_3D_1 +{ + File = "areas3d1.bmp" ; +}; +Bitmap BMP_AREAS_3D_2 +{ + File = "areas3d2.bmp" ; +}; +//--------------------- +Bitmap BMP_BARS_2D +{ + File = "bars2d.bmp" ; +}; +Bitmap BMP_BARS_2D_1 +{ + File = "bars2d1.bmp" ; +}; +Bitmap BMP_BARS_2D_2 +{ + File = "bars2d2.bmp" ; +}; +Bitmap BMP_BARS_2D_3 +{ + File = "bars2d3.bmp" ; +}; +Bitmap BMP_BARS_3D +{ + File = "bars3d.bmp" ; +}; +Bitmap BMP_BARS_3D_1 +{ + File = "bars3d1.bmp" ; +}; +Bitmap BMP_BARS_3D_2 +{ + File = "bars3d2.bmp" ; +}; +Bitmap BMP_BARS_3D_3 +{ + File = "bars3d3.bmp" ; +}; +//--------------------- +Bitmap BMP_CIRCLES_2D +{ + File = "circl2d.bmp" ; +}; +Bitmap BMP_CIRCLES_2D_1 +{ + File = "circl2d1.bmp" ; +}; +Bitmap BMP_CIRCLES_2D_2 +{ + File = "circl2d2.bmp" ; +}; +Bitmap BMP_CIRCLES_3D +{ + File = "circl3d.bmp" ; +}; +//--------------------- +Bitmap BMP_COLUMNS_2D +{ + File = "cols2d.bmp" ; +}; +Bitmap BMP_COLUMNS_2D_1 +{ + File = "cols2d1.bmp" ; +}; +Bitmap BMP_COLUMNS_2D_2 +{ + File = "cols2d2.bmp" ; +}; +Bitmap BMP_COLUMNS_2D_3 +{ + File = "cols2d3.bmp" ; +}; +Bitmap BMP_COLUMNS_2D_4 +{ + File = "cols2d4.bmp" ; +}; +Bitmap BMP_COLUMNS_2D_5 +{ + File = "cols2d5.bmp" ; +}; +//--------------------- +Bitmap BMP_COLUMNS_3D +{ + File = "cols3d.bmp" ; +}; +Bitmap BMP_COLUMNS_3D_1 +{ + File = "cols3d1.bmp" ; +}; +Bitmap BMP_COLUMNS_3D_2 +{ + File = "cols3d2.bmp" ; +}; +Bitmap BMP_COLUMNS_3D_3 +{ + File = "cols3d3.bmp" ; +}; +//--------------------- +Bitmap BMP_DONUT1_2D +{ + File = "donut12d.bmp" ; +}; +Bitmap BMP_KEGELQ_3D_1 +{ + File = "kegel1q.bmp" ; +}; +Bitmap BMP_KEGELQ_3D_2 +{ + File = "kegel2q.bmp" ; +}; +Bitmap BMP_KEGELQ_3D_3 +{ + File = "kegel3q.bmp" ; +}; +Bitmap BMP_KEGELQ_3D_4 +{ + File = "kegel4q.bmp" ; +}; +Bitmap BMP_KEGEL_3D_1 +{ + File = "kegel1.bmp" ; +}; +Bitmap BMP_KEGEL_3D_2 +{ + File = "kegel2.bmp" ; +}; +Bitmap BMP_KEGEL_3D_3 +{ + File = "kegel3.bmp" ; +}; +Bitmap BMP_KEGEL_3D_4 +{ + File = "kegel4.bmp" ; +}; +//--------------------- +/* +Bitmap BMP_LINESYMB_2D +{ + File = "lnsym2d.bmp" ; +}; +*/ +Bitmap BMP_LINESYMB_2D_1 +{ + File = "lnsym2d1.bmp" ; +}; +Bitmap BMP_LINESYMB_2D_2 +{ + File = "lnsym2d2.bmp" ; +}; +Bitmap BMP_LINESYMB_2D_3 +{ + File = "lnsym2d3.bmp" ; +}; +//--------------------- +Bitmap BMP_LINES_2D +{ + File = "lines2d.bmp" ; +}; +Bitmap BMP_LINES_2D_1 +{ + File = "lines2d1.bmp" ; +}; +Bitmap BMP_LINES_2D_2 +{ + File = "lines2d2.bmp" ; +}; +Bitmap BMP_LINES_2D_3 +{ + File = "lines2d3.bmp" ; +}; +Bitmap BMP_LINES_3D +{ + File = "lines3d.bmp" ; +}; +//--------------------- +Bitmap BMP_NETSYMB_2D +{ + File = "net2dsym.bmp" ; +}; +Bitmap BMP_NETSYMB_2D_PERCENT +{ + File = "n2dsympr.bmp" ; +}; +Bitmap BMP_NETSYMB_2D_STACK +{ + File = "n2dsymst.bmp" ; +}; +Bitmap BMP_NET_2D +{ + File = "net2d.bmp" ; +}; +Bitmap BMP_NET_2D_PERCENT +{ + File = "net2dpr.bmp" ; +}; +Bitmap BMP_NET_2D_STACK +{ + File = "net2dst.bmp" ; +}; +//--------------------- +Bitmap BMP_PYRAMIDQ_3D_1 +{ + File = "pyra1q.bmp" ; +}; +Bitmap BMP_PYRAMIDQ_3D_2 +{ + File = "pyra2q.bmp" ; +}; +Bitmap BMP_PYRAMIDQ_3D_3 +{ + File = "pyra3q.bmp" ; +}; +Bitmap BMP_PYRAMIDQ_3D_4 +{ + File = "pyra4q.bmp" ; +}; +Bitmap BMP_PYRAMID_3D_1 +{ + File = "pyra1.bmp" ; +}; +Bitmap BMP_PYRAMID_3D_2 +{ + File = "pyra2.bmp" ; +}; +Bitmap BMP_PYRAMID_3D_3 +{ + File = "pyra3.bmp" ; +}; +Bitmap BMP_PYRAMID_3D_4 +{ + File = "pyra4.bmp" ; +}; +//--------------------- +Bitmap BMP_ROEHRE_3D_1 +{ + File = "roehre1.bmp" ; +}; +Bitmap BMP_ROEHRE_3D_2 +{ + File = "roehre2.bmp" ; +}; +Bitmap BMP_ROEHRE_3D_3 +{ + File = "roehre3.bmp" ; +}; +Bitmap BMP_ROEHRE_3D_4 +{ + File = "roehre4.bmp" ; +}; +//--------------------- +Bitmap BMP_SAEULE_3D_1 +{ + File = "saeule1.bmp" ; +}; +Bitmap BMP_SAEULE_3D_2 +{ + File = "saeule2.bmp" ; +}; +Bitmap BMP_SAEULE_3D_3 +{ + File = "saeule3.bmp" ; +}; +Bitmap BMP_SAEULE_3D_4 +{ + File = "saeule4.bmp" ; +}; +//--------------------- +Bitmap BMP_SPLINE_B +{ + File = "splineb.bmp" ; +}; +Bitmap BMP_SPLINE_B_SYMBOL +{ + File = "splnbsym.bmp" ; +}; +Bitmap BMP_SPLINE_CUBIC +{ + File = "spline.bmp" ; +}; +Bitmap BMP_SPLINE_CUBIC_SYMBOL +{ + File = "splnesym.bmp" ; +}; +//--------------------- +Bitmap BMP_STOCK_1 +{ + File = "stock2d1.bmp" ; +}; +Bitmap BMP_STOCK_2 +{ + File = "stock2d2.bmp" ; +}; +Bitmap BMP_STOCK_3 +{ + File = "stock2d3.bmp" ; +}; +Bitmap BMP_STOCK_4 +{ + File = "stock2d4.bmp" ; +}; +//--------------------- +/* +Bitmap BMP_SURF_3D +{ + File = "surf3d.bmp" ; +}; +*/ +Bitmap BMP_XYSYMB_2D +{ + File = "xysym2d.bmp" ; +}; +/* +Bitmap BMP_XYZSYMB_3D +{ + File = "xyzsym3d.bmp" ; +}; +Bitmap BMP_XYZ_3D +{ + File = "xyz3d.bmp" ; +}; +*/ +Bitmap BMP_XY_2D +{ + File = "xy2d.bmp" ; +}; +//--------------------- +//--------------------- +//--------------------- +//error indicator +Bitmap BMP_INDICATE_NONE +{ + File = "indinone.bmp" ; +}; +Bitmap BMP_INDICATE_BOTH +{ + File = "indiboth.bmp" ; +}; +Bitmap BMP_INDICATE_DOWN +{ + File = "indidown.bmp" ; +}; +Bitmap BMP_INDICATE_UP +{ + File = "indiup.bmp" ; +}; +//--------------------- +//regression curves +Bitmap BMP_REGRESSION_NONE +{ + File = "regno.bmp" ; +}; +Bitmap BMP_REGRESSION_LINEAR +{ + File = "reglin.bmp" ; +}; +Bitmap BMP_REGRESSION_LOG +{ + File = "reglog.bmp" ; +}; +Bitmap BMP_REGRESSION_EXP +{ + File = "regexp.bmp" ; +}; +Bitmap BMP_REGRESSION_POWER +{ + File = "regpow.bmp" ; +}; +//--------------------- diff --git a/chart2/source/controller/dialogs/Bitmaps_HC.hrc b/chart2/source/controller/dialogs/Bitmaps_HC.hrc new file mode 100644 index 000000000..9d26b8f76 --- /dev/null +++ b/chart2/source/controller/dialogs/Bitmaps_HC.hrc @@ -0,0 +1,174 @@ +/************************************************************************* + * + * $RCSfile: Bitmaps_HC.hrc,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:24 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef _SOLAR_HRC +#include <svtools/solar.hrc> +#endif + +// RID_SCH_START is 30512 (see svtools/solar.hrc) + +// chart types +#define BMP_AREAS_2D_HC ( RID_SCH_START + 0 ) +#define BMP_AREAS_2D_1_HC ( RID_SCH_START + 1 ) +#define BMP_AREAS_2D_3_HC ( RID_SCH_START + 2 ) +#define BMP_AREAS_3D_HC ( RID_SCH_START + 3 ) +#define BMP_AREAS_3D_1_HC ( RID_SCH_START + 4 ) +#define BMP_AREAS_3D_2_HC ( RID_SCH_START + 5 ) + +#define BMP_BARS_2D_HC ( RID_SCH_START + 6 ) +#define BMP_BARS_2D_1_HC ( RID_SCH_START + 7 ) +#define BMP_BARS_2D_2_HC ( RID_SCH_START + 8 ) +#define BMP_BARS_2D_3_HC ( RID_SCH_START + 9 ) +#define BMP_BARS_3D_HC ( RID_SCH_START + 10 ) +#define BMP_BARS_3D_1_HC ( RID_SCH_START + 11 ) +#define BMP_BARS_3D_2_HC ( RID_SCH_START + 12 ) +#define BMP_BARS_3D_3_HC ( RID_SCH_START + 13 ) + +#define BMP_CIRCLES_2D_HC ( RID_SCH_START + 14 ) +#define BMP_CIRCLES_2D_1_HC ( RID_SCH_START + 15 ) +#define BMP_CIRCLES_2D_2_HC ( RID_SCH_START + 16 ) +#define BMP_CIRCLES_3D_HC ( RID_SCH_START + 17 ) + +#define BMP_COLUMNS_2D_HC ( RID_SCH_START + 18 ) +#define BMP_COLUMNS_2D_1_HC ( RID_SCH_START + 19 ) +#define BMP_COLUMNS_2D_2_HC ( RID_SCH_START + 20 ) +#define BMP_COLUMNS_2D_3_HC ( RID_SCH_START + 21 ) +#define BMP_COLUMNS_2D_4_HC ( RID_SCH_START + 22 ) +#define BMP_COLUMNS_2D_5_HC ( RID_SCH_START + 80 ) +#define BMP_COLUMNS_3D_HC ( RID_SCH_START + 23 ) +#define BMP_COLUMNS_3D_1_HC ( RID_SCH_START + 24 ) +#define BMP_COLUMNS_3D_2_HC ( RID_SCH_START + 25 ) +#define BMP_COLUMNS_3D_3_HC ( RID_SCH_START + 26 ) + +#define BMP_DONUT1_2D_HC ( RID_SCH_START + 27 ) + +#define BMP_KEGELQ_3D_1_HC ( RID_SCH_START + 28 ) +#define BMP_KEGELQ_3D_2_HC ( RID_SCH_START + 29 ) +#define BMP_KEGELQ_3D_3_HC ( RID_SCH_START + 30 ) +#define BMP_KEGELQ_3D_4_HC ( RID_SCH_START + 31 ) +#define BMP_KEGEL_3D_1_HC ( RID_SCH_START + 32 ) +#define BMP_KEGEL_3D_2_HC ( RID_SCH_START + 33 ) +#define BMP_KEGEL_3D_3_HC ( RID_SCH_START + 34 ) +#define BMP_KEGEL_3D_4_HC ( RID_SCH_START + 35 ) + +//#define BMP_LINESYMB_2D_HC ( RID_SCH_START + 36 ) +#define BMP_LINESYMB_2D_1_HC ( RID_SCH_START + 37 ) +#define BMP_LINESYMB_2D_2_HC ( RID_SCH_START + 38 ) +#define BMP_LINESYMB_2D_3_HC ( RID_SCH_START + 39 ) + +#define BMP_LINES_2D_HC ( RID_SCH_START + 40 ) +#define BMP_LINES_2D_1_HC ( RID_SCH_START + 41 ) +#define BMP_LINES_2D_2_HC ( RID_SCH_START + 42 ) +#define BMP_LINES_2D_3_HC ( RID_SCH_START + 43 ) +#define BMP_LINES_3D_HC ( RID_SCH_START + 44 ) + +#define BMP_NETSYMB_2D_HC ( RID_SCH_START + 45 ) +#define BMP_NETSYMB_2D_PERCENT_HC ( RID_SCH_START + 46 ) +#define BMP_NETSYMB_2D_STACK_HC ( RID_SCH_START + 47 ) +#define BMP_NET_2D_HC ( RID_SCH_START + 48 ) +#define BMP_NET_2D_PERCENT_HC ( RID_SCH_START + 49 ) +#define BMP_NET_2D_STACK_HC ( RID_SCH_START + 50 ) + +#define BMP_PYRAMIDQ_3D_1_HC ( RID_SCH_START + 51 ) +#define BMP_PYRAMIDQ_3D_2_HC ( RID_SCH_START + 52 ) +#define BMP_PYRAMIDQ_3D_3_HC ( RID_SCH_START + 53 ) +#define BMP_PYRAMIDQ_3D_4_HC ( RID_SCH_START + 54 ) + +#define BMP_PYRAMID_3D_1_HC ( RID_SCH_START + 55 ) +#define BMP_PYRAMID_3D_2_HC ( RID_SCH_START + 56 ) +#define BMP_PYRAMID_3D_3_HC ( RID_SCH_START + 57 ) +#define BMP_PYRAMID_3D_4_HC ( RID_SCH_START + 58 ) + +#define BMP_ROEHRE_3D_1_HC ( RID_SCH_START + 59 ) +#define BMP_ROEHRE_3D_2_HC ( RID_SCH_START + 60 ) +#define BMP_ROEHRE_3D_3_HC ( RID_SCH_START + 61 ) +#define BMP_ROEHRE_3D_4_HC ( RID_SCH_START + 62 ) + +#define BMP_SAEULE_3D_1_HC ( RID_SCH_START + 63 ) +#define BMP_SAEULE_3D_2_HC ( RID_SCH_START + 64 ) +#define BMP_SAEULE_3D_3_HC ( RID_SCH_START + 65 ) +#define BMP_SAEULE_3D_4_HC ( RID_SCH_START + 66 ) + +#define BMP_SPLINE_B_HC ( RID_SCH_START + 67 ) +#define BMP_SPLINE_B_SYMBOL_HC ( RID_SCH_START + 68 ) +#define BMP_SPLINE_CUBIC_HC ( RID_SCH_START + 69 ) +#define BMP_SPLINE_CUBIC_SYMBOL_HC ( RID_SCH_START + 70 ) + +#define BMP_STOCK_1_HC ( RID_SCH_START + 71 ) +#define BMP_STOCK_2_HC ( RID_SCH_START + 72 ) +#define BMP_STOCK_3_HC ( RID_SCH_START + 73 ) +#define BMP_STOCK_4_HC ( RID_SCH_START + 74 ) + +//#define BMP_SURF_3D_HC ( RID_SCH_START + 75 ) +#define BMP_XYSYMB_2D_HC ( RID_SCH_START + 76 ) +//#define BMP_XYZSYMB_3D_HC ( RID_SCH_START + 77 ) +//#define BMP_XYZ_3D_HC ( RID_SCH_START + 78 ) +#define BMP_XY_2D_HC ( RID_SCH_START + 79 ) + +//SchStatisticTabPage and SchDataStatisticsDlg +#define BMP_INDICATE_NONE_HC ( RID_SCH_START + 81 ) +#define BMP_INDICATE_BOTH_HC ( RID_SCH_START + 82 ) +#define BMP_INDICATE_UP_HC ( RID_SCH_START + 83 ) +#define BMP_INDICATE_DOWN_HC ( RID_SCH_START + 84 ) +#define BMP_REGRESSION_NONE_HC ( RID_SCH_START + 85 ) +#define BMP_REGRESSION_LINEAR_HC ( RID_SCH_START + 86 ) +#define BMP_REGRESSION_LOG_HC ( RID_SCH_START + 87 ) +#define BMP_REGRESSION_EXP_HC ( RID_SCH_START + 88 ) +#define BMP_REGRESSION_POWER_HC ( RID_SCH_START + 89 ) diff --git a/chart2/source/controller/dialogs/Bitmaps_HC.src b/chart2/source/controller/dialogs/Bitmaps_HC.src new file mode 100644 index 000000000..38ba055fe --- /dev/null +++ b/chart2/source/controller/dialogs/Bitmaps_HC.src @@ -0,0 +1,449 @@ +/************************************************************************* + * + * $RCSfile: Bitmaps_HC.src,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:24 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "Bitmaps_HC.hrc" + +Bitmap BMP_AREAS_2D_HC +{ + File = "areas2d_h.bmp" ; +}; +Bitmap BMP_AREAS_2D_1_HC +{ + File = "areas2d1_h.bmp" ; +}; +Bitmap BMP_AREAS_2D_3_HC +{ + File = "areas2d3_h.bmp" ; +}; +Bitmap BMP_AREAS_3D_HC +{ + File = "areas3d_h.bmp" ; +}; +Bitmap BMP_AREAS_3D_1_HC +{ + File = "areas3d1_h.bmp" ; +}; +Bitmap BMP_AREAS_3D_2_HC +{ + File = "areas3d2_h.bmp" ; +}; +//--------------------- +Bitmap BMP_BARS_2D_HC +{ + File = "bars2d_h.bmp" ; +}; +Bitmap BMP_BARS_2D_1_HC +{ + File = "bars2d1_h.bmp" ; +}; +Bitmap BMP_BARS_2D_2_HC +{ + File = "bars2d2_h.bmp" ; +}; +Bitmap BMP_BARS_2D_3_HC +{ + File = "bars2d3_h.bmp" ; +}; +Bitmap BMP_BARS_3D_HC +{ + File = "bars3d_h.bmp" ; +}; +Bitmap BMP_BARS_3D_1_HC +{ + File = "bars3d1_h.bmp" ; +}; +Bitmap BMP_BARS_3D_2_HC +{ + File = "bars3d2_h.bmp" ; +}; +Bitmap BMP_BARS_3D_3_HC +{ + File = "bars3d3_h.bmp" ; +}; +//--------------------- +Bitmap BMP_CIRCLES_2D_HC +{ + File = "circl2d_h.bmp" ; +}; +Bitmap BMP_CIRCLES_2D_1_HC +{ + File = "circl2d1_h.bmp" ; +}; +Bitmap BMP_CIRCLES_2D_2_HC +{ + File = "circl2d2_h.bmp" ; +}; +Bitmap BMP_CIRCLES_3D_HC +{ + File = "circl3d_h.bmp" ; +}; +//--------------------- +Bitmap BMP_COLUMNS_2D_HC +{ + File = "cols2d_h.bmp" ; +}; +Bitmap BMP_COLUMNS_2D_1_HC +{ + File = "cols2d1_h.bmp" ; +}; +Bitmap BMP_COLUMNS_2D_2_HC +{ + File = "cols2d2_h.bmp" ; +}; +Bitmap BMP_COLUMNS_2D_3_HC +{ + File = "cols2d3_h.bmp" ; +}; +Bitmap BMP_COLUMNS_2D_4_HC +{ + File = "cols2d4_h.bmp" ; +}; +Bitmap BMP_COLUMNS_2D_5_HC +{ + File = "cols2d5_h.bmp" ; +}; +//--------------------- +Bitmap BMP_COLUMNS_3D_HC +{ + File = "cols3d_h.bmp" ; +}; +Bitmap BMP_COLUMNS_3D_1_HC +{ + File = "cols3d1_h.bmp" ; +}; +Bitmap BMP_COLUMNS_3D_2_HC +{ + File = "cols3d2_h.bmp" ; +}; +Bitmap BMP_COLUMNS_3D_3_HC +{ + File = "cols3d3_h.bmp" ; +}; +//--------------------- +Bitmap BMP_DONUT1_2D_HC +{ + File = "donut12d_h.bmp" ; +}; +Bitmap BMP_KEGELQ_3D_1_HC +{ + File = "kegel1q_h.bmp" ; +}; +Bitmap BMP_KEGELQ_3D_2_HC +{ + File = "kegel2q_h.bmp" ; +}; +Bitmap BMP_KEGELQ_3D_3_HC +{ + File = "kegel3q_h.bmp" ; +}; +Bitmap BMP_KEGELQ_3D_4_HC +{ + File = "kegel4q_h.bmp" ; +}; +Bitmap BMP_KEGEL_3D_1_HC +{ + File = "kegel1_h.bmp" ; +}; +Bitmap BMP_KEGEL_3D_2_HC +{ + File = "kegel2_h.bmp" ; +}; +Bitmap BMP_KEGEL_3D_3_HC +{ + File = "kegel3_h.bmp" ; +}; +Bitmap BMP_KEGEL_3D_4_HC +{ + File = "kegel4_h.bmp" ; +}; +//--------------------- +/* +Bitmap BMP_LINESYMB_2D_HC +{ + File = "lnsym2d_h.bmp" ; +}; +*/ +Bitmap BMP_LINESYMB_2D_1_HC +{ + File = "lnsym2d1_h.bmp" ; +}; +Bitmap BMP_LINESYMB_2D_2_HC +{ + File = "lnsym2d2_h.bmp" ; +}; +Bitmap BMP_LINESYMB_2D_3_HC +{ + File = "lnsym2d3_h.bmp" ; +}; +//--------------------- +Bitmap BMP_LINES_2D_HC +{ + File = "lines2d_h.bmp" ; +}; +Bitmap BMP_LINES_2D_1_HC +{ + File = "lines2d1_h.bmp" ; +}; +Bitmap BMP_LINES_2D_2_HC +{ + File = "lines2d2_h.bmp" ; +}; +Bitmap BMP_LINES_2D_3_HC +{ + File = "lines2d3_h.bmp" ; +}; +Bitmap BMP_LINES_3D_HC +{ + File = "lines3d_h.bmp" ; +}; +//--------------------- +Bitmap BMP_NETSYMB_2D_HC +{ + File = "net2dsym_h.bmp" ; +}; +Bitmap BMP_NETSYMB_2D_PERCENT_HC +{ + File = "n2dsympr_h.bmp" ; +}; +Bitmap BMP_NETSYMB_2D_STACK_HC +{ + File = "n2dsymst_h.bmp" ; +}; +Bitmap BMP_NET_2D_HC +{ + File = "net2d_h.bmp" ; +}; +Bitmap BMP_NET_2D_PERCENT_HC +{ + File = "net2dpr_h.bmp" ; +}; +Bitmap BMP_NET_2D_STACK_HC +{ + File = "net2dst_h.bmp" ; +}; +//--------------------- +Bitmap BMP_PYRAMIDQ_3D_1_HC +{ + File = "pyra1q_h.bmp" ; +}; +Bitmap BMP_PYRAMIDQ_3D_2_HC +{ + File = "pyra2q_h.bmp" ; +}; +Bitmap BMP_PYRAMIDQ_3D_3_HC +{ + File = "pyra3q_h.bmp" ; +}; +Bitmap BMP_PYRAMIDQ_3D_4_HC +{ + File = "pyra4q_h.bmp" ; +}; +Bitmap BMP_PYRAMID_3D_1_HC +{ + File = "pyra1_h.bmp" ; +}; +Bitmap BMP_PYRAMID_3D_2_HC +{ + File = "pyra2_h.bmp" ; +}; +Bitmap BMP_PYRAMID_3D_3_HC +{ + File = "pyra3_h.bmp" ; +}; +Bitmap BMP_PYRAMID_3D_4_HC +{ + File = "pyra4_h.bmp" ; +}; +//--------------------- +Bitmap BMP_ROEHRE_3D_1_HC +{ + File = "roehre1_h.bmp" ; +}; +Bitmap BMP_ROEHRE_3D_2_HC +{ + File = "roehre2_h.bmp" ; +}; +Bitmap BMP_ROEHRE_3D_3_HC +{ + File = "roehre3_h.bmp" ; +}; +Bitmap BMP_ROEHRE_3D_4_HC +{ + File = "roehre4_h.bmp" ; +}; +//--------------------- +Bitmap BMP_SAEULE_3D_1_HC +{ + File = "saeule1_h.bmp" ; +}; +Bitmap BMP_SAEULE_3D_2_HC +{ + File = "saeule2_h.bmp" ; +}; +Bitmap BMP_SAEULE_3D_3_HC +{ + File = "saeule3_h.bmp" ; +}; +Bitmap BMP_SAEULE_3D_4_HC +{ + File = "saeule4_h.bmp" ; +}; +//--------------------- +Bitmap BMP_SPLINE_B_HC +{ + File = "splineb_h.bmp" ; +}; +Bitmap BMP_SPLINE_B_SYMBOL_HC +{ + File = "splnbsym_h.bmp" ; +}; +Bitmap BMP_SPLINE_CUBIC_HC +{ + File = "spline_h.bmp" ; +}; +Bitmap BMP_SPLINE_CUBIC_SYMBOL_HC +{ + File = "splnesym_h.bmp" ; +}; +//--------------------- +Bitmap BMP_STOCK_1_HC +{ + File = "stock2d1_h.bmp" ; +}; +Bitmap BMP_STOCK_2_HC +{ + File = "stock2d2_h.bmp" ; +}; +Bitmap BMP_STOCK_3_HC +{ + File = "stock2d3_h.bmp" ; +}; +Bitmap BMP_STOCK_4_HC +{ + File = "stock2d4_h.bmp" ; +}; +//--------------------- +/* +Bitmap BMP_SURF_3D_HC +{ + File = "surf3d_h.bmp" ; +}; +*/ +Bitmap BMP_XYSYMB_2D_HC +{ + File = "xysym2d_h.bmp" ; +}; +/* +Bitmap BMP_XYZSYMB_3D_HC +{ + File = "xyzsym3d_h.bmp" ; +}; +Bitmap BMP_XYZ_3D_HC +{ + File = "xyz3d_h.bmp" ; +}; +*/ +Bitmap BMP_XY_2D_HC +{ + File = "xy2d_h.bmp" ; +}; +//--------------------- +//--------------------- +//--------------------- +//error indicator +Bitmap BMP_INDICATE_NONE_HC +{ + File = "indinone_h.bmp" ; +}; +Bitmap BMP_INDICATE_BOTH_HC +{ + File = "indiboth_h.bmp" ; +}; +Bitmap BMP_INDICATE_UP_HC +{ + File = "indiup_h.bmp" ; +}; +Bitmap BMP_INDICATE_DOWN_HC +{ + File = "indidown_h.bmp" ; +}; +//--------------------- +//regression curves +Bitmap BMP_REGRESSION_NONE_HC +{ + File = "regno_h.bmp" ; +}; +Bitmap BMP_REGRESSION_LINEAR_HC +{ + File = "reglin_h.bmp" ; +}; +Bitmap BMP_REGRESSION_LOG_HC +{ + File = "reglog_h.bmp" ; +}; +Bitmap BMP_REGRESSION_EXP_HC +{ + File = "regexp_h.bmp" ; +}; +Bitmap BMP_REGRESSION_POWER_HC +{ + File = "regpow_h.bmp" ; +}; +//--------------------- diff --git a/chart2/source/controller/dialogs/CommonResources.hrc b/chart2/source/controller/dialogs/CommonResources.hrc new file mode 100644 index 000000000..10c0e44ce --- /dev/null +++ b/chart2/source/controller/dialogs/CommonResources.hrc @@ -0,0 +1,85 @@ +/************************************************************************* + * + * $RCSfile: CommonResources.hrc,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:24 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef _CHART2_RESOURCE_HXX +#define _CHART2_RESOURCE_HXX + +#define BUTTONS_OK_CANCEL_HELP_STACKED( xpos ) \ +OKButton BTN_OK \ +{ \ + Pos = MAP_APPFONT ( xpos , 6 ) ; \ + Size = MAP_APPFONT ( 50 , 14 ) ; \ + TabStop = TRUE ; \ + DefButton = TRUE ; \ +}; \ +CancelButton BTN_CANCEL \ +{ \ + Pos = MAP_APPFONT ( xpos , 23 ) ; \ + Size = MAP_APPFONT ( 50 , 14 ) ; \ + TabStop = TRUE ; \ +}; \ +HelpButton BTN_HELP \ +{ \ + Pos = MAP_APPFONT ( xpos , 43 ) ; \ + Size = MAP_APPFONT ( 50 , 14 ) ; \ + TabStop = TRUE ; \ +}; + +#endif diff --git a/chart2/source/controller/dialogs/Strings.src b/chart2/source/controller/dialogs/Strings.src new file mode 100644 index 000000000..bf32eadcb --- /dev/null +++ b/chart2/source/controller/dialogs/Strings.src @@ -0,0 +1,3188 @@ +/************************************************************************* + * + * $RCSfile: Strings.src,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:25 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "Strings.hrc" + +String STR_TITLE_GRID +{ + Text = "Gitter" ; + Text [ ENGLISH ] = "Grid" ; + Text [ norwegian ] = "Grid" ; + Text [ italian ] = "Griglia" ; + Text [ portuguese_brazilian ] = "Grade" ; + Text [ portuguese ] = "Grelha" ; + Text [ finnish ] = "Ruudukko" ; + Text [ danish ] = "Gitter" ; + Text [ french ] = "Grille" ; + Text [ swedish ] = "Gitter" ; + Text [ dutch ] = "Raster" ; + Text [ spanish ] = "Cuadrcula" ; + Text [ english_us ] = "Grid" ; + Text[ chinese_simplified ] = "网格线"; + Text[ russian ] = ""; + Text[ polish ] = "Siatka"; + Text[ japanese ] = "目盛線"; + Text[ chinese_traditional ] = "網格"; + Text[ arabic ] = ""; + Text[ dutch ] = "Raster"; + Text[ chinese_simplified ] = "网格线"; + Text[ greek ] = ""; + Text[ korean ] = "눈금선"; + Text[ turkish ] = "Klavuz izgiler"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "Graella"; + Text[ thai ] = "เส้นตาราง"; + Text[ czech ] = "Mřížka"; + Text[ hebrew ] = "Gitter"; + Text[ hindi ] = "जाल"; + Text[ slovak ] = "Mriežka"; +}; + +/* +String RID_BUILDVERSION +{ + Text = UPDVER ; + Text [ ENGLISH ] = UPDVER ; + Text [ norwegian ] = UPDVER ; + Text [ italian ] = UPDVER ; + Text [ portuguese_brazilian ] = UPDVER ; + Text [ portuguese ] = UPDVER ; + Text [ finnish ] = UPDVER ; + Text [ danish ] = UPDVER ; + Text [ french ] = UPDVER ; + Text [ swedish ] = UPDVER ; + Text [ dutch ] = UPDVER ; + Text [ spanish ] = UPDVER ; + Text [ english_us ] = UPDVER ; +}; +String STR_NULL +{ + Text = "Kein" ; + Text [ ENGLISH ] = "None" ; + Text [ norwegian ] = "Ingen" ; + Text [ italian ] = "Senza" ; + Text [ portuguese_brazilian ] = "Nenhum" ; + Text [ portuguese ] = "Nenhum" ; + Text [ finnish ] = "Ei mitn" ; + Text [ danish ] = "Ingen" ; + Text [ french ] = "Aucun(e)" ; + Text [ swedish ] = "Ingen" ; + Text [ dutch ] = "Geen" ; + Text [ spanish ] = "Ninguno" ; + Text [ english_us ] = "None" ; + Text[ chinese_simplified ] = "无"; + Text[ russian ] = ""; + Text[ polish ] = "Brak"; + Text[ japanese ] = "なし"; + Text[ chinese_traditional ] = "無"; + Text[ arabic ] = ""; + Text[ greek ] = ""; + Text[ korean ] = "없음"; + Text[ turkish ] = "Yok"; + Text[ catalan ] = "Cap"; + Text[ thai ] = "ไม่มี"; + Text[ czech ] = "Žádné"; + Text[ hebrew ] = "ללא"; + Text[ hindi ] = "कोई नहीं"; + Text[ slovak ] = "Žiadne"; +}; +String STR_BASIC_IDE +{ + Text = "Basic-IDE" ; + Text [ ENGLISH ] = "Basic-IDE" ; + Text [ norwegian ] = "Basic-IDE" ; + Text [ italian ] = "%PRODUCTNAME Basic-IDE" ; + Text [ portuguese_brazilian ] = "IDE Bsico" ; + Text [ portuguese ] = "Basic-IDE" ; + Text [ finnish ] = "Basic IDE" ; + Text [ danish ] = "Basic-IDE" ; + Text [ french ] = "Basic-IDE" ; + Text [ swedish ] = "Basic-IDE" ; + Text [ dutch ] = "Basic-IDE" ; + Text [ spanish ] = "Basic-IDE" ; + Text [ english_us ] = "Basic IDE" ; + Text[ chinese_simplified ] = "Basic-IDE"; + Text[ russian ] = " Basic"; + Text[ polish ] = "rodowisko programowania w jzyku Basic"; + Text[ japanese ] = "Basic IDE"; + Text[ chinese_traditional ] = "Basic-IDE"; + Text[ arabic ] = "Basic IDE"; + Text[ greek ] = "Basic IDE"; + Text[ korean ] = "Basic IDE"; + Text[ turkish ] = "Basic-IDE"; + Text[ catalan ] = "Basic-IDE"; + Text[ thai ] = "เบสิค IDE"; + Text[ czech ] = "Základní IDE"; + Text[ hebrew ] = "Basic-IDE"; + Text[ hindi ] = "मूल IDE"; + Text[ slovak ] = "Základný IDE"; +}; +String STR_INVISIBLE +{ + Text = "Unsichtbar" ; + Text [ ENGLISH ] = "Invisible" ; + Text [ norwegian ] = "Usynlig" ; + Text [ italian ] = "Invisibile" ; + Text [ portuguese_brazilian ] = "Invisvel" ; + Text [ portuguese ] = "Invisvel" ; + Text [ finnish ] = "Nkymtn" ; + Text [ danish ] = "Usynlig" ; + Text [ french ] = "Invisible" ; + Text [ swedish ] = "Osynlig" ; + Text [ dutch ] = "Onzichtbaar" ; + Text [ spanish ] = "Invisible" ; + Text [ english_us ] = "Invisible" ; + Text[ chinese_simplified ] = "隐入的"; + Text[ russian ] = ""; + Text[ polish ] = "Niewidoczny"; + Text[ japanese ] = "非表示"; + Text[ chinese_traditional ] = "隱入的"; + Text[ arabic ] = " "; + Text[ greek ] = " "; + Text[ korean ] = "숨김"; + Text[ turkish ] = "Gizle"; + Text[ catalan ] = "Invisible"; + Text[ thai ] = "มองไม่เห็น"; + Text[ czech ] = "Neviditelný"; + Text[ hebrew ] = "Unsichtbar"; + Text[ hindi ] = "अदृष्टिगोचर"; + Text[ slovak ] = "Neviditeľná"; +}; +String STR_SOLID +{ + Text = "Durchgngig" ; + Text [ ENGLISH ] = "Solid" ; + Text [ norwegian ] = "Solid" ; + Text [ italian ] = "Piena" ; + Text [ portuguese_brazilian ] = "Contnuo" ; + Text [ portuguese ] = "Contnuo" ; + Text [ finnish ] = "Jatkuva" ; + Text [ danish ] = "Gennemgende" ; + Text [ french ] = "Continu" ; + Text [ swedish ] = "Genomgende" ; + Text [ dutch ] = "Gesloten" ; + Text [ spanish ] = "Continuo" ; + Text [ english_us ] = "Continuous" ; + Text[ chinese_simplified ] = "持续的"; + Text[ russian ] = ""; + Text[ polish ] = "Cigy"; + Text[ japanese ] = "実線"; + Text[ chinese_traditional ] = "持續的"; + Text[ arabic ] = ""; + Text[ language_user1 ] = "nk 07.08.99 : Hat es mit Linienstil zu tun? Bitte mich informieren! Danke - - - -"; + Text[ greek ] = ""; + Text[ korean ] = "계속"; + Text[ turkish ] = "Srekli"; + Text[ catalan ] = "Continu"; + Text[ thai ] = "ต่อเนื่อง"; + Text[ czech ] = "Spojitý"; + Text[ hebrew ] = "רציף"; + Text[ hindi ] = "निरन्तर"; + Text[ slovak ] = "Spojitý"; +}; +String STR_AREA +{ + Text = "Flche" ; + Text [ ENGLISH ] = "Object fill" ; + Text [ norwegian ] = "Objekt fyll" ; + Text [ italian ] = "Area" ; + Text [ portuguese_brazilian ] = "rea" ; + Text [ portuguese ] = "Preenchimento" ; + Text [ finnish ] = "Alue" ; + Text [ danish ] = "Omrde" ; + Text [ french ] = "Remplissage" ; + Text [ swedish ] = "Yta" ; + Text [ dutch ] = "Vlak" ; + Text [ spanish ] = "rea" ; + Text [ english_us ] = "Area" ; + Text[ chinese_simplified ] = "充填平面"; + Text[ russian ] = ""; + Text[ polish ] = "Obszar"; + Text[ japanese ] = "エリア"; + Text[ chinese_traditional ] = "充填平面"; + Text[ arabic ] = " "; + Text[ greek ] = ""; + Text[ korean ] = "영역"; + Text[ turkish ] = "Yzey"; + Text[ catalan ] = "rea"; + Text[ thai ] = "พื้นที่"; + Text[ czech ] = "Oblast"; + Text[ hebrew ] = "Fläche"; + Text[ hindi ] = "विस्तीर्ण"; + Text[ slovak ] = "Oblasť"; +}; +String STR_LINE +{ + Text = "Linie" ; + Text [ ENGLISH ] = "Line" ; + Text [ norwegian ] = "Linje" ; + Text [ italian ] = "Linea" ; + Text [ portuguese_brazilian ] = "Linha" ; + Text [ portuguese ] = "Linha" ; + Text [ finnish ] = "Viiva" ; + Text [ danish ] = "Linje" ; + Text [ french ] = "Ligne" ; + Text [ swedish ] = "Linje" ; + Text [ dutch ] = "Lijn" ; + Text [ spanish ] = "Lnea" ; + Text [ english_us ] = "Line" ; + Text[ chinese_simplified ] = "线条"; + Text[ russian ] = ""; + Text[ polish ] = "Linia"; + Text[ japanese ] = "折れ線"; + Text[ chinese_traditional ] = "線條"; + Text[ arabic ] = ""; + Text[ greek ] = ""; + Text[ korean ] = "선"; + Text[ turkish ] = "izgi"; + Text[ catalan ] = "Lnia"; + Text[ thai ] = "บรรทัด"; + Text[ czech ] = "Řádek"; + Text[ hebrew ] = "Linie"; + Text[ hindi ] = "Line"; + Text[ slovak ] = "Čiara"; +}; + + + +String STR_NORMAL_LINES +{ + Text = "Normal mit Linien" ; + Text [ ENGLISH ] = "Normal with lines" ; + Text [ dutch ] = "Normaal met lijnen" ; + Text [ english_us ] = "Normal with lines" ; + Text [ italian ] = "Normale con liee" ; + Text [ spanish ] = "Normal con lneas" ; + Text [ french ] = "Normal avec lignes" ; + Text [ swedish ] = "Normal med linjer" ; + Text [ danish ] = "Normal med linjer" ; + Text [ portuguese ] = "Padro com linhas" ; + Text [ portuguese_brazilian ] = "Padro com linhas" ; + Text[ chinese_simplified ] = "普通线条"; + Text[ russian ] = " "; + Text[ polish ] = "Zwyky z liniami"; + Text[ japanese ] = "線付き標準"; + Text[ chinese_traditional ] = "普通線條"; + Text[ arabic ] = " "; + Text[ greek ] = " "; + Text[ korean ] = "선 포함 표준"; + Text[ turkish ] = "izgili normal"; + Text[ catalan ] = "Normal amb lnies"; + Text[ finnish ] = "Tavallinen ja viivat"; + Text[ thai ] = "บรรทัดปกติ"; + Text[ czech ] = "Běžná s čárami"; + Text[ hebrew ] = "Normal mit Linien"; + Text[ hindi ] = "रेखों केलिए नॉर्मल्"; + Text[ slovak ] = "Normálny graf s čiarami"; +}; + + + + + +String STR_2D +{ + Text = "2D-" ; + Text [ ENGLISH ] = "2D-" ; + Text [ english_us ] = "2D " ; + Text [ italian ] = "2D-" ; + Text [ spanish ] = "2D-" ; + Text [ french ] = "2D-" ; + Text [ dutch ] = "2D-" ; + Text [ swedish ] = "2D-" ; + Text [ danish ] = "2D-" ; + Text [ portuguese ] = "2D-" ; + Text [ portuguese_brazilian ] = "2D-" ; + Text[ chinese_simplified ] = "2 维"; + Text[ russian ] = ""; + Text[ polish ] = "2D"; + Text[ japanese ] = "2D"; + Text[ chinese_traditional ] = "平面"; + Text[ arabic ] = " "; + Text[ greek ] = "2-"; + Text[ korean ] = "2D"; + Text[ turkish ] = "2B-"; + Text[ catalan ] = "2D "; + Text[ finnish ] = "Kaksiulotteinen "; + Text[ thai ] = "2มิติ "; + Text[ czech ] = "2D"; + Text[ hebrew ] = "2D-"; + Text[ hindi ] = "2D "; + Text[ slovak ] = "2D"; +}; +String STR_3D +{ + Text = "3D-" ; + Text [ ENGLISH ] = "3D-" ; + Text [ english_us ] = "3D " ; + Text [ italian ] = "3D-" ; + Text [ spanish ] = "3D-" ; + Text [ french ] = "3D-" ; + Text [ dutch ] = "3D-" ; + Text [ swedish ] = "3D-" ; + Text [ danish ] = "3D-" ; + Text [ portuguese ] = "3D-" ; + Text [ portuguese_brazilian ] = "3D-" ; + Text[ chinese_simplified ] = "3 维"; + Text[ russian ] = ""; + Text[ polish ] = "3D"; + Text[ japanese ] = "3D"; + Text[ chinese_traditional ] = "3D"; + Text[ arabic ] = " "; + Text[ greek ] = "3-"; + Text[ korean ] = "3D"; + Text[ turkish ] = "3B-"; + Text[ catalan ] = "3D "; + Text[ finnish ] = "Kolmiulotteisuus "; + Text[ thai ] = "3มิติ "; + Text[ czech ] = "3D"; + Text[ hebrew ] = "3D-"; + Text[ hindi ] = "3D "; + Text[ slovak ] = "3D"; +}; +String STR_DIAGRAM_AREA +{ + Text = "Diagrammflche" ; + Text [ ENGLISH ] = "Diagram Area" ; + Text [ english_us ] = "Chart Area" ; + Text [ italian ] = "Area del diagramma" ; + Text [ spanish ] = "Superficie del diagrama" ; + Text [ french ] = "Arrire-plan du diagramme" ; + Text [ dutch ] = "Diagramoppervlak" ; + Text [ swedish ] = "Diagramomrde" ; + Text [ danish ] = "Diagramomrde" ; + Text [ portuguese ] = "rea do grfico" ; + Text [ portuguese_brazilian ] = "rea do Grfico" ; + Text[ chinese_simplified ] = "图表区"; + Text[ russian ] = " "; + Text[ polish ] = "Obszar wykresu"; + Text[ japanese ] = "グラフエリア"; + Text[ chinese_traditional ] = "圖表平面"; + Text[ arabic ] = " "; + Text[ greek ] = " "; + Text[ korean ] = "차트 영역"; + Text[ turkish ] = "ema yzeyi"; + Text[ catalan ] = "rea del diagrama"; + Text[ finnish ] = "Kaavioalue"; + Text[ thai ] = "พื้นที่แผนภูมิ"; + Text[ czech ] = "Plocha grafu"; + Text[ hebrew ] = "Diagrammfläche"; + Text[ hindi ] = "Chart Area"; + Text[ slovak ] = "Plocha grafu"; +}; +String STR_DIAGRAM +{ + Text = "Diagramm" ; + Text [ ENGLISH ] = "Diagram" ; + Text [ dutch ] = "Diagram" ; + Text [ english_us ] = "Chart" ; + Text [ italian ] = "Diagramma" ; + Text [ spanish ] = "Diagrama" ; + Text [ french ] = "Diagramme" ; + Text [ swedish ] = "Diagram" ; + Text [ danish ] = "Diagram" ; + Text [ portuguese ] = "Grfico" ; + Text [ portuguese_brazilian ] = "Grfico" ; + Text[ chinese_simplified ] = "图表"; + Text[ russian ] = ""; + Text[ polish ] = "Wykres"; + Text[ japanese ] = "グラフ"; + Text[ chinese_traditional ] = "圖表"; + Text[ arabic ] = " "; + Text[ greek ] = ""; + Text[ korean ] = "차트"; + Text[ turkish ] = "ema"; + Text[ catalan ] = "Diagrama"; + Text[ finnish ] = "Kaavio"; + Text[ thai ] = "แผนภูมิ"; + Text[ czech ] = "Graf"; + Text[ hebrew ] = "תרשים"; + Text[ hindi ] = "चार्ट "; + Text[ slovak ] = "Graf"; +}; +String STR_DIAGRAM_WALL +{ + Text = "Diagrammwand" ; + Text [ ENGLISH ] = "Diagram Wall" ; + Text [ english_us ] = "Chart Wall" ; + Text [ italian ] = "Pareti del diagramma" ; + Text [ spanish ] = "Plano lateral" ; + Text [ french ] = "Paroi du diagramme" ; + Text [ dutch ] = "Diagramwand" ; + Text [ swedish ] = "Diagramvgg" ; + Text [ danish ] = "Diagramvg" ; + Text [ portuguese ] = "Parede do grfico" ; + Text [ portuguese_brazilian ] = "Parede do Grfico" ; + Text[ chinese_simplified ] = "图表背景墙"; + Text[ russian ] = " "; + Text[ polish ] = "ciana wykresu"; + Text[ japanese ] = "グラフの壁面"; + Text[ chinese_traditional ] = "圖表背景牆"; + Text[ arabic ] = " "; + Text[ greek ] = " "; + Text[ korean ] = "차트 옆면"; + Text[ turkish ] = "ema duvar"; + Text[ catalan ] = "Pla lateral del diagrama"; + Text[ finnish ] = "Kaaviosein"; + Text[ thai ] = "ผนังแผนภูมิ"; + Text[ czech ] = "Stěna grafu"; + Text[ hebrew ] = "Diagrammwand"; + Text[ hindi ] = "चार्ट वॉल"; + Text[ slovak ] = "Bok grafu"; +}; +String STR_DIAGRAM_FLOOR +{ + Text = "Diagrammboden" ; + Text [ ENGLISH ] = "Diagram Floor" ; + Text [ dutch ] = "Diagrambodem" ; + Text [ english_us ] = "Chart Floor" ; + Text [ italian ] = "Pavimento del diagramma" ; + Text [ spanish ] = "Base del diagrama" ; + Text [ french ] = "Plancher du diagramme" ; + Text [ swedish ] = "Diagramgolv" ; + Text [ danish ] = "Diagramgulv" ; + Text [ portuguese ] = "Base do grfico" ; + Text [ portuguese_brazilian ] = "Piso do Grfico" ; + Text[ chinese_simplified ] = "图表基底"; + Text[ russian ] = " "; + Text[ polish ] = "Podstawa wykresu"; + Text[ japanese ] = "グラフの床面"; + Text[ chinese_traditional ] = "座標軸"; + Text[ arabic ] = " "; + Text[ greek ] = " "; + Text[ korean ] = "차트 밑면"; + Text[ turkish ] = "ema taban"; + Text[ catalan ] = "Base del diagrama"; + Text[ finnish ] = "Kaavion perusta"; + Text[ thai ] = "พื้นแผนภูมิ"; + Text[ czech ] = "Pata grafu"; + Text[ hebrew ] = "Diagrammboden"; + Text[ hindi ] = "चार्ट फ्लोर"; + Text[ slovak ] = "Päta grafu"; +}; +String STR_DIAGRAM_X_AXIS +{ + Text = "X-Achse" ; + Text [ ENGLISH ] = "X-Axis" ; + Text [ english_us ] = "X axis" ; + Text [ italian ] = "Asse X" ; + Text [ spanish ] = "Eje X" ; + Text [ french ] = "Axe X" ; + Text [ dutch ] = "X-as" ; + Text [ swedish ] = "X-axel" ; + Text [ danish ] = "X-akse" ; + Text [ portuguese ] = "Eixo X" ; + Text [ portuguese_brazilian ] = "Eixo X" ; + Text[ chinese_simplified ] = "X 轴"; + Text[ russian ] = " X"; + Text[ polish ] = "O X"; + Text[ japanese ] = "X軸"; + Text[ chinese_traditional ] = "X-軸"; + Text[ arabic ] = " "; + Text[ greek ] = " X"; + Text[ korean ] = "X 축"; + Text[ turkish ] = "X ekseni"; + Text[ catalan ] = "Eix X"; + Text[ finnish ] = "X-akseli"; + Text[ thai ] = "แกนX "; + Text[ czech ] = "Osa X"; + Text[ hebrew ] = "X-Achse"; + Text[ hindi ] = "X अक्ष"; + Text[ slovak ] = "Os X"; +}; +String STR_DIAGRAM_Y_AXIS +{ + Text = "Y-Achse" ; + Text [ ENGLISH ] = "Y-Axis" ; + Text [ english_us ] = "Y axis" ; + Text [ italian ] = "Asse Y" ; + Text [ spanish ] = "Eje Y" ; + Text [ french ] = "Axe Y" ; + Text [ dutch ] = "Y-as" ; + Text [ swedish ] = "Y-axel" ; + Text [ danish ] = "Y-akse" ; + Text [ portuguese ] = "Eixo Y" ; + Text [ portuguese_brazilian ] = "Eixo Y" ; + Text[ chinese_simplified ] = "Y 轴"; + Text[ russian ] = " Y"; + Text[ polish ] = "O Y"; + Text[ japanese ] = "Y軸"; + Text[ chinese_traditional ] = "Y-軸"; + Text[ arabic ] = " "; + Text[ greek ] = " Y"; + Text[ korean ] = "Y 축"; + Text[ turkish ] = "Y ekseni"; + Text[ catalan ] = "Eix Y"; + Text[ finnish ] = "Y-akseli"; + Text[ thai ] = "แกนY "; + Text[ czech ] = "Osa Y"; + Text[ hebrew ] = "Y-Achse"; + Text[ hindi ] = "Y अक्ष"; + Text[ slovak ] = "Os Y"; +}; +String STR_DIAGRAM_Z_AXIS +{ + Text = "Z-Achse" ; + Text [ ENGLISH ] = "Z-Axis" ; + Text [ english_us ] = "Z axis" ; + Text [ italian ] = "Asse Z" ; + Text [ spanish ] = "Eje Z" ; + Text [ french ] = "Axe Z" ; + Text [ dutch ] = "Z-as" ; + Text [ swedish ] = "Z-axel" ; + Text [ danish ] = "Z-akse" ; + Text [ portuguese ] = "Eixo Z" ; + Text [ portuguese_brazilian ] = "Eixo Z" ; + Text[ chinese_simplified ] = "Z 轴数值"; + Text[ russian ] = " Z"; + Text[ polish ] = "O Z"; + Text[ japanese ] = "Z軸"; + Text[ chinese_traditional ] = "Z-軸"; + Text[ arabic ] = " "; + Text[ greek ] = " Z"; + Text[ korean ] = "Z 축"; + Text[ turkish ] = "Z ekseni"; + Text[ catalan ] = "Eix Z"; + Text[ finnish ] = "Z-akseli"; + Text[ thai ] = "แกนZ "; + Text[ czech ] = "Osa Z"; + Text[ hebrew ] = "Z-Achse"; + Text[ hindi ] = "Z अक्ष"; + Text[ slovak ] = "Os Z"; +}; +String STR_DIAGRAM_X_GRID_MAIN +{ + Text = "X-Hauptgitter" ; + Text [ ENGLISH ] = "Main X-Grid" ; + Text [ dutch ] = "X-hoofdraster" ; + Text [ english_us ] = "X axis main grid" ; + Text [ italian ] = "Griglia principale X" ; + Text [ spanish ] = "Cuadrcula principal X" ; + Text [ french ] = "Grille principale X" ; + Text [ swedish ] = "X-huvudgitter" ; + Text [ danish ] = "Overordnet X-aksegitter" ; + Text [ portuguese ] = "Grelha X principal" ; + Text [ portuguese_brazilian ] = "Grade principal do eixo X" ; + Text[ chinese_simplified ] = "X 轴网格"; + Text[ russian ] = " X"; + Text[ polish ] = "Gwna siatka osi X"; + Text[ japanese ] = "X軸主目盛線"; + Text[ chinese_traditional ] = "X-軸網格"; + Text[ arabic ] = " "; + Text[ greek ] = " "; + Text[ korean ] = "X 축 주 눈금선"; + Text[ turkish ] = "X ana klavuz izgileri"; + Text[ catalan ] = "Graella principal de l'eix X"; + Text[ finnish ] = "X-akselin pruudukko"; + Text[ thai ] = "เส้นตารางหลักX "; + Text[ czech ] = "Hlavní mřížka osy X"; + Text[ hebrew ] = "X-Hauptgitter"; + Text[ hindi ] = "X अक्ष का प्रधान जाल"; + Text[ slovak ] = "Hlavná mriežka osi X"; +}; +String STR_DIAGRAM_Y_GRID_MAIN +{ + Text = "Y-Hauptgitter" ; + Text [ ENGLISH ] = "Main Y-Grid" ; + Text [ english_us ] = "Y main grid" ; + Text [ italian ] = "Griglia principale Y" ; + Text [ spanish ] = "Cuadrcula principal Y" ; + Text [ french ] = "Grille principale Y" ; + Text [ dutch ] = "Y-hoofdraster" ; + Text [ swedish ] = "Y-huvudgitter" ; + Text [ danish ] = "Overordnet Y-aksegitter" ; + Text [ portuguese ] = "Grelha Y principal" ; + Text [ portuguese_brazilian ] = "Grade principal do eixo Y" ; + Text[ chinese_simplified ] = "Y 轴主网格线"; + Text[ russian ] = " Y"; + Text[ polish ] = "Gwna siatka osi Y"; + Text[ japanese ] = "Y軸主目盛線"; + Text[ chinese_traditional ] = "Y-軸主網格線"; + Text[ arabic ] = " "; + Text[ greek ] = " Y"; + Text[ korean ] = "Y 주 눈금선"; + Text[ turkish ] = "Y ana klavuz izgileri"; + Text[ catalan ] = "Graella principal Y"; + Text[ finnish ] = "Y-pruudukko"; + Text[ thai ] = "เส้นตารางหลักY "; + Text[ czech ] = "Hlavní mřížka osy Y"; + Text[ hebrew ] = "Y-Hauptgitter"; + Text[ hindi ] = "Y प्रधान जाल"; + Text[ slovak ] = "Hlavná mriežka osi Y"; +}; +String STR_DIAGRAM_Z_GRID_MAIN +{ + Text = "Z-Hauptgitter" ; + Text [ ENGLISH ] = "Main Z-Grid" ; + Text [ english_us ] = "Z main grid" ; + Text [ italian ] = "Griglia principale Z" ; + Text [ spanish ] = "Cuadrcula principal Z" ; + Text [ french ] = "Grille principale Z" ; + Text [ dutch ] = "Z-hoofdraster" ; + Text [ swedish ] = "Z-huvudgitter" ; + Text [ danish ] = "Overordnet Z-aksegitter" ; + Text [ portuguese ] = "Grelha Z principal" ; + Text [ portuguese_brazilian ] = "Grade principal do eixo Z" ; + Text[ chinese_simplified ] = "Z 轴主网格线"; + Text[ russian ] = " Z"; + Text[ polish ] = "Gwna siatka osi Z"; + Text[ japanese ] = "Z軸主目盛線"; + Text[ chinese_traditional ] = "Z-軸主網格"; + Text[ arabic ] = " "; + Text[ greek ] = " Z"; + Text[ korean ] = "Z 주 눈금선"; + Text[ turkish ] = "Z ana klavuz izgileri"; + Text[ catalan ] = "Graella principal Z"; + Text[ finnish ] = "Z-pruudukko"; + Text[ thai ] = "เส้นตารางหลักZ "; + Text[ czech ] = "Hlavní mřížka osy Z"; + Text[ hebrew ] = "Z-Hauptgitter"; + Text[ hindi ] = "Z प्रधान जाल"; + Text[ slovak ] = "Hlavná mriežka osi Z"; +}; +String STR_DIAGRAM_X_GRID_HELP +{ + Text = "X-Hilfsgitter" ; + Text [ ENGLISH ] = "Help X-Grid" ; + Text [ dutch ] = "X-hulpraster" ; + Text [ english_us ] = "Minor X Grid" ; + Text [ italian ] = "Griglia ausiliaria X" ; + Text [ spanish ] = "Cuadrcula auxiliar X" ; + Text [ french ] = "Grille auxiliaire X" ; + Text [ swedish ] = "X-stdgitter" ; + Text [ danish ] = "Underordnet X-aksegitter" ; + Text [ portuguese ] = "Grelha X auxiliar" ; + Text [ portuguese_brazilian ] = "Grade X segundria" ; + Text[ chinese_simplified ] = "X 轴次网格线"; + Text[ russian ] = " X"; + Text[ polish ] = "Pomocnicza siatka osi X"; + Text[ japanese ] = "X軸補助目盛線"; + Text[ chinese_traditional ] = "X-次網格"; + Text[ arabic ] = " "; + Text[ greek ] = " "; + Text[ korean ] = "X 보조 눈금선"; + Text[ turkish ] = "X yardmc klavuz izgileri"; + Text[ catalan ] = "Cuadrcula auxiliar X"; + Text[ finnish ] = "X-apuruudukko"; + Text[ thai ] = "เส้นตารางรอง X "; + Text[ czech ] = "Vedlejší mřížka osy X"; + Text[ hebrew ] = "X-Hilfsgitter"; + Text[ hindi ] = "छोटा X जाल"; + Text[ slovak ] = "Vedľajšia mriežka osi X"; +}; +String STR_DIAGRAM_Y_GRID_HELP +{ + Text = "Y-Hilfsgitter" ; + Text [ ENGLISH ] = "Help Y-Grid" ; + Text [ english_us ] = "Y minor grid" ; + Text [ italian ] = "Griglia ausiliaria Y" ; + Text [ spanish ] = "Cuadrcula auxiliar Y" ; + Text [ french ] = "Grille auxiliaire Y" ; + Text [ dutch ] = "Y-hulpraster" ; + Text [ swedish ] = "Y-stdgitter" ; + Text [ danish ] = "Underordnet Y-aksegitter" ; + Text [ portuguese ] = "Grelha Y auxiliar" ; + Text [ portuguese_brazilian ] = "Grade Y segundria" ; + Text[ chinese_simplified ] = "Y 轴次网格线"; + Text[ russian ] = " Y"; + Text[ polish ] = "Pomocnicza siatka osi Y"; + Text[ japanese ] = "Y軸補助目盛線"; + Text[ chinese_traditional ] = "Y-次網格"; + Text[ arabic ] = " "; + Text[ greek ] = " Y"; + Text[ korean ] = "Y 보조 눈금선"; + Text[ turkish ] = "Y yardmc klavuz izgileri"; + Text[ catalan ] = "Cuadrcula auxiliar Y"; + Text[ finnish ] = "Y-apuruudukko"; + Text[ thai ] = "เส้นตารางรองY "; + Text[ czech ] = "Vedlejší mřížka osy Y"; + Text[ hebrew ] = "Y-Hilfsgitter"; + Text[ hindi ] = "Y छोटा जाल"; + Text[ slovak ] = "Vedľajšia mriežka osi Y"; +}; +String STR_DIAGRAM_Z_GRID_HELP +{ + Text = "Z-Hilfsgitter" ; + Text [ ENGLISH ] = "Help Z-Grid" ; + Text [ english_us ] = "Z minor grid" ; + Text [ italian ] = "Griglia ausiliaria Z" ; + Text [ spanish ] = "Cuadrcula auxiliar Z" ; + Text [ french ] = "Grille auxiliaire Z" ; + Text [ dutch ] = "Z-hulpraster" ; + Text [ swedish ] = "Z-stdgitter" ; + Text [ danish ] = "Underordnet Z-aksegitter" ; + Text [ portuguese ] = "Grelha Z auxiliar" ; + Text [ portuguese_brazilian ] = "Grade Z segundria" ; + Text[ chinese_simplified ] = "Z 轴次网格线"; + Text[ russian ] = " Z"; + Text[ polish ] = "Pomocnicza siatka osi Z"; + Text[ japanese ] = "Z軸補助目盛線"; + Text[ chinese_traditional ] = "Z-次網格"; + Text[ arabic ] = " "; + Text[ greek ] = " Z"; + Text[ korean ] = "Z 보조 눈금선"; + Text[ turkish ] = "Z yardmc klavuz izgileri"; + Text[ catalan ] = "Cuadrcula auxiliar Z"; + Text[ finnish ] = "Z-apuruudukko"; + Text[ thai ] = "เส้นตารางรองZ "; + Text[ czech ] = "Vedlejší mřížka osy Z"; + Text[ hebrew ] = "Z-Hilfsgitter"; + Text[ hindi ] = "Z छोटा जाल"; + Text[ slovak ] = "Vedľajšia mriežka osi Z"; +}; +String STR_DIAGRAM_ROW +{ + // $(ROW) can be a number or the caption of the row in quotes + + Text = "Datenreihe $(ROW)" ; + Text [ english_us ] = "Data Series $(ROW)" ; + Text[ portuguese ] = "Srie de dados $(ROW)"; + Text[ russian ] = " $(ROW)"; + Text[ greek ] = " $(ROW)"; + Text[ dutch ] = "Gegevensreeks $(ROW)"; + Text[ french ] = "Srie de donnes $(ROW)"; + Text[ spanish ] = "Serie de datos $(ROW)"; + Text[ italian ] = "Serie di dati $(ROW)"; + Text[ danish ] = "Dataserie $(ROW)"; + Text[ swedish ] = "Dataserie $(ROW)"; + Text[ polish ] = "Seria danych $(ROW)"; + Text[ portuguese_brazilian ] = "Srie de Dados $(ROW)"; + Text[ japanese ] = "系列$(ROW)"; + Text[ korean ] = "연속 데이터 $(ROW)"; + Text[ chinese_simplified ] = "数据组 $(ROW)"; + Text[ chinese_traditional ] = "資料欄 $(ROW)"; + Text[ arabic ] = " $(ROW)"; + Text[ turkish ] = "Veri dizisi $(ROW)"; + Text[ catalan ] = "Srie de dades $(ROW)"; + Text[ finnish ] = "Tietojoukot $(ROW)"; + Text[ thai ] = "ชุดข้อมูล $(ROW)"; + Text[ czech ] = "Datová řada $(ROW)"; + Text[ hebrew ] = "Datenreihe $(ROW)"; + Text[ hindi ] = "ड़ॉटा श्रृंखला $(पक्तिं)"; + Text[ slovak ] = "Dátový rad $(ROW)"; +}; +String STR_DIAGRAM_DESCRGROUP +{ + Text = "Datenbeschriftungen" ; + Text [ ENGLISH ] = "Data Descriptions" ; + Text [ english_us ] = "Data Labels" ; + Text [ italian ] = "Diciture dati" ; + Text [ spanish ] = "Etiqueta de datos" ; + Text [ french ] = "tiquettes des donnes" ; + Text [ dutch ] = "Gegevenslabels" ; + Text [ swedish ] = "Dataetiketter" ; + Text [ danish ] = "Dataetiketter" ; + Text [ portuguese ] = "Rtulos para dados" ; + Text [ portuguese_brazilian ] = "Rtulos dos Dados" ; + Text[ chinese_simplified ] = "数据标志"; + Text[ russian ] = " "; + Text[ polish ] = "Etykiety danych"; + Text[ japanese ] = "データラベル"; + Text[ chinese_traditional ] = "資料標籤"; + Text[ arabic ] = " "; + Text[ greek ] = " "; + Text[ korean ] = "데이터 레이블"; + Text[ turkish ] = "Veri etiketleri"; + Text[ catalan ] = "Etiquetes de dades"; + Text[ finnish ] = "Tietoselitteet"; + Text[ thai ] = "ป้ายชื่อข้อมูล"; + Text[ czech ] = "Popisky dat"; + Text[ hebrew ] = "Datenbeschriftungen"; + Text[ hindi ] = "ड़ॉटा लेबिलें"; + Text[ slovak ] = "Popisy dát"; +}; +String STR_DIAGRAM_DESCR_ROW +{ + Text = "Datenzeilen-Beschriftung" ; + Text [ ENGLISH ] = "Data Description" ; + Text [ english_us ] = "Data rows label" ; + Text [ italian ] = "Dicitura righe di dati" ; + Text [ spanish ] = "Etiqueta fila de datos" ; + Text [ french ] = "tiquette de lignes de donnes" ; + Text [ dutch ] = "Rijlabels" ; + Text [ swedish ] = "Dataradetikett" ; + Text [ danish ] = "Datarkkeetiketter" ; + Text [ portuguese ] = "Legendar srie de dados" ; + Text [ portuguese_brazilian ] = "Rtulo das linhas de dados" ; + Text[ chinese_simplified ] = "数据行标志"; + Text[ russian ] = " "; + Text[ polish ] = "Etykiety wierszy danych"; + Text[ japanese ] = "データ行ラベル"; + Text[ chinese_traditional ] = "數據列標籤"; + Text[ arabic ] = " "; + Text[ greek ] = " "; + Text[ korean ] = "데이터 행 레이블"; + Text[ turkish ] = "Veri satr etiketi"; + Text[ catalan ] = "Etiqueta de les files de dades"; + Text[ finnish ] = "Tietorivien selite"; + Text[ thai ] = "ป้ายชื่อแถวข้อมูล"; + Text[ czech ] = "Popisek řádku dat"; + Text[ hebrew ] = "Datenzeilen-Beschriftung"; + Text[ hindi ] = "ड़ॉटा पंक्तियों का लेबिल"; + Text[ slovak ] = "Popisok riadkov dát"; +}; +String STR_DIAGRAM_DESCR_COL +{ + Text = "Datenspalten-Beschriftung" ; + Text [ ENGLISH ] = "Data Description" ; + Text [ dutch ] = "Kolomlabels" ; + Text [ english_us ] = "Data columns label" ; + Text [ italian ] = "Dicitura colonne di dati" ; + Text [ spanish ] = "Etiqueta de columnas de datos" ; + Text [ french ] = "tiquette de colonnes de donnes" ; + Text [ swedish ] = "Datakolumnetikett" ; + Text [ danish ] = "Datakolonneetiketter" ; + Text [ portuguese ] = "Rtulos para colunas de dados" ; + Text [ portuguese_brazilian ] = "Rtulo das colunas de dados" ; + Text[ chinese_simplified ] = "数据列标志"; + Text[ russian ] = " "; + Text[ polish ] = "Etykiety kolumn danych"; + Text[ japanese ] = "データ列ラベル"; + Text[ chinese_traditional ] = "資料列標籤"; + Text[ arabic ] = " "; + Text[ greek ] = " "; + Text[ korean ] = "데이터 열 레이블"; + Text[ turkish ] = "Veri stun etiketi"; + Text[ catalan ] = "Etiqueta de les columnes de dades"; + Text[ finnish ] = "Tietosarakkeiden selite"; + Text[ thai ] = "ป้ายชื่อคอลัมน์ข้อมูล"; + Text[ czech ] = "Popisky sloupců dat"; + Text[ hebrew ] = "Datenspalten-Beschriftung"; + Text[ hindi ] = "ड़ॉटा स्तंभों का लेबिल"; + Text[ slovak ] = "Popisok stĺpcov dát"; +}; +String STR_LEGEND +{ + Text = "Legende" ; + Text [ ENGLISH ] = "Legend" ; + Text [ english_us ] = "Legend" ; + Text [ italian ] = "Legenda" ; + Text [ spanish ] = "Leyenda" ; + Text [ french ] = "Lgende" ; + Text [ dutch ] = "Legenda" ; + Text [ swedish ] = "Frklaring" ; + Text [ danish ] = "Forklaring" ; + Text [ portuguese ] = "Legenda" ; + Text [ portuguese_brazilian ] = "Legenda" ; + Text[ chinese_simplified ] = "图例"; + Text[ russian ] = ""; + Text[ polish ] = "Legenda"; + Text[ japanese ] = "凡例"; + Text[ chinese_traditional ] = "圖例"; + Text[ arabic ] = " "; + Text[ greek ] = ""; + Text[ korean ] = "범례"; + Text[ turkish ] = "Aklama"; + Text[ catalan ] = "Llegenda"; + Text[ finnish ] = "Selite"; + Text[ thai ] = "คำอธิบาย"; + Text[ czech ] = "Legenda"; + Text[ hebrew ] = "Legende"; + Text[ hindi ] = "लेजेन्ड़"; + Text[ slovak ] = "Legenda"; +}; +String STR_LEGEND_SYMBOL_ROW +{ + Text = "Datenreihen-Symbol" ; + Text [ ENGLISH ] = "Data Row Symbol" ; + Text [ english_us ] = "Data series symbol" ; + Text [ italian ] = "Simbolo serie di dati" ; + Text [ spanish ] = "Smbolo de series de datos" ; + Text [ french ] = "Symbole de srie de donnes" ; + Text [ dutch ] = "Gegevensreekssymbool" ; + Text [ swedish ] = "Dataseriesymbol" ; + Text [ danish ] = "Dataserie-symbol" ; + Text [ portuguese ] = "Smbolo de sries de dados" ; + Text [ portuguese_brazilian ] = "Smbolo da srie de dados" ; + Text[ chinese_simplified ] = "数据行图标"; + Text[ russian ] = " "; + Text[ polish ] = "Symbol serii danych"; + Text[ japanese ] = "データ系列のシンボル"; + Text[ chinese_traditional ] = "資料欄圖示"; + Text[ arabic ] = " "; + Text[ greek ] = " "; + Text[ korean ] = "연속 데이터 기호"; + Text[ turkish ] = "Veri dizisi simgesi"; + Text[ catalan ] = "Smbol de sries de dades"; + Text[ finnish ] = "Tietojoukon symboli"; + Text[ thai ] = "สัญลักษณ์ชุดข้อมูล"; + Text[ czech ] = "Symbol datové řady"; + Text[ hebrew ] = "Datenreihen-Symbol"; + Text[ hindi ] = "ड़ॉटा श्रृंखला संकेत"; + Text[ slovak ] = "Symbol dátového radu"; +}; +String STR_LEGEND_SYMBOL_COL +{ + Text = "Datenspalten-Symbol" ; + Text [ ENGLISH ] = "Data Column Symbol" ; + Text [ dutch ] = "Kolomsymbool" ; + Text [ english_us ] = "Data column symbol" ; + Text [ italian ] = "Simbolo dati colonna" ; + Text [ spanish ] = "Smbolo de columnas de datos" ; + Text [ french ] = "Symbole de colonne de donnes" ; + Text [ swedish ] = "Datakolumnsymbol" ; + Text [ danish ] = "Datakolonnesymbol" ; + Text [ portuguese ] = "Smbolo de colunas de dados" ; + Text [ portuguese_brazilian ] = "Smbolo da coluna de dados" ; + Text[ chinese_simplified ] = "数据列图标"; + Text[ russian ] = " "; + Text[ polish ] = "Symbol kolumny danych"; + Text[ japanese ] = "データ列のシンボル"; + Text[ chinese_traditional ] = "資料列圖示"; + Text[ arabic ] = " "; + Text[ greek ] = " "; + Text[ korean ] = "데이터 열 기호"; + Text[ turkish ] = "Veri stunu simgesi"; + Text[ catalan ] = "Smbol de columnes de dades"; + Text[ finnish ] = "Tietosarakkeen symboli"; + Text[ thai ] = "สัญลักษณ์คอลัมน์ข้อมูล"; + Text[ czech ] = "Symbol sloupce dat"; + Text[ hebrew ] = "Datenspalten-Symbol"; + Text[ hindi ] = "Data column symbol"; + Text[ slovak ] = "Symbol stĺpca dát"; +}; + +String STR_MARKED +{ + // $(OBJ) is any chart object, like 'x axis', 'data point', 'grid', etc. + // this string is for the status bar. + Text = "$(OBJ) markiert" ; + Text [ english_us ] = "$(OBJ) selected" ; + Text[ portuguese ] = "$(OBJ) marcado(s)"; + Text[ russian ] = "$(OBJ)"; + Text[ greek ] = " $(OBJ)"; + Text[ dutch ] = "$(OBJ) gemarkeerd"; + Text[ french ] = "$(OBJ) marqu"; + Text[ spanish ] = "$(OBJ) marcado"; + Text[ italian ] = "$(OBJ) evidenziato"; + Text[ danish ] = "$(OBJ) markeret"; + Text[ swedish ] = "$(OBJ) markerat"; + Text[ polish ] = "Zaznaczono $(OBJ) "; + Text[ portuguese_brazilian ] = "$(OBJ) selecionado"; + Text[ japanese ] = "$(OBJ)選択"; + Text[ korean ] = "$(OBJ) 선택표시됨"; + Text[ chinese_simplified ] = "$(OBJ) 被选中"; + Text[ chinese_traditional ] = "$(OBJ) 已被選取"; + Text[ arabic ] = "$(OBJ)"; + Text[ turkish ] = "$(OBJ) iaretli"; + Text[ catalan ] = "$(OBJ) seleccionat"; + Text[ finnish ] = "$(OBJ) valittu"; + Text[ thai ] = "เลือก $(OBJ) "; + Text[ czech ] = "Vybráno: $(OBJ)"; + Text[ hebrew ] = "$(OBJ) markiert"; + Text[ hindi ] = "$(OBJ) को चुना है"; + Text[ slovak ] = "Vybrané: $(OBJ)"; +}; + +String STR_UNDO_DRAGDROP +{ + Text = "Drag&Drop" ; + Text [ ENGLISH ] = "Drag&Drop" ; + Text [ norwegian ] = "Dra&Slipp" ; + Text [ italian ] = "Drag&Drop" ; + Text [ portuguese_brazilian ] = "Arrastar e Soltar" ; + Text [ portuguese ] = "Arrastar&Largar" ; + Text [ finnish ] = "Ved ja pudota" ; + Text [ danish ] = "Trk-og-slip" ; + Text [ french ] = "Glisser-Dposer" ; + Text [ swedish ] = "Dra-och-slpp" ; + Text [ dutch ] = "Slepen & neerzetten" ; + Text [ spanish ] = "Arrastrar y colocar" ; + Text [ english_us ] = "Drag and Drop" ; + Text[ chinese_simplified ] = "拖放"; + Text[ russian ] = ""; + Text[ polish ] = "Przecignij i upu"; + Text[ japanese ] = "ドラック & ドロップ"; + Text[ chinese_traditional ] = "拖曳"; + Text[ arabic ] = " "; + Text[ greek ] = " A"; + Text[ korean ] = "끌어 놓기"; + Text[ turkish ] = "Srkle ve brak"; + Text[ catalan ] = "Arrossega i deixa anar"; + Text[ thai ] = "ลากและปล่อย"; + Text[ czech ] = "Táhni a pusť"; + Text[ hebrew ] = "Drag&Drop"; + Text[ hindi ] = "खींचना और गिराना"; + Text[ slovak ] = "Ťahaj a pusť"; +}; +String STR_UNDO_DIAGRAM_LINE +{ + Text = "Linenart" ; + Text [ ENGLISH ] = "Linetype" ; + Text [ dutch ] = "Lijntype" ; + Text [ english_us ] = "Line Type" ; + Text [ italian ] = "Tipo di linea" ; + Text [ spanish ] = "Tipo de lnea" ; + Text [ french ] = "Type de ligne" ; + Text [ swedish ] = "Linjetyp" ; + Text [ danish ] = "Linjetype" ; + Text [ portuguese ] = "Tipo de linha" ; + Text [ portuguese_brazilian ] = "Tipo da Linha" ; + Text[ chinese_simplified ] = "线条类型"; + Text[ russian ] = " "; + Text[ polish ] = "Typ linii"; + Text[ japanese ] = "線のスタイル"; + Text[ chinese_traditional ] = "線條類型"; + Text[ arabic ] = " "; + Text[ greek ] = " "; + Text[ korean ] = "선 형태"; + Text[ turkish ] = "izgi tr"; + Text[ catalan ] = "Tipus de lnia"; + Text[ finnish ] = "Viivatyyppi"; + Text[ thai ] = "ชนิดบรรทัด"; + Text[ czech ] = "Typ čáry"; + Text[ hebrew ] = "Linenart"; + Text[ hindi ] = "Line Type"; + Text[ slovak ] = "Typ čiary"; +}; +String STR_UNDO_CUT +{ + Text = "Ausschneiden" ; + Text [ ENGLISH ] = "Cut" ; + Text [ norwegian ] = "Cut" ; + Text [ italian ] = "Taglia" ; + Text [ portuguese_brazilian ] = "Cortar" ; + Text [ portuguese ] = "Cortar" ; + Text [ finnish ] = "Leikkaa" ; + Text [ danish ] = "Klip" ; + Text [ french ] = "Couper" ; + Text [ swedish ] = "Klipp ut" ; + Text [ dutch ] = "Knippen" ; + Text [ spanish ] = "Cortar" ; + Text [ english_us ] = "Cut" ; + Text[ chinese_simplified ] = "剪切"; + Text[ russian ] = ""; + Text[ polish ] = "Wytnij"; + Text[ japanese ] = "切り取り"; + Text[ chinese_traditional ] = "剪下"; + Text[ arabic ] = ""; + Text[ greek ] = ""; + Text[ korean ] = "잘라내기"; + Text[ turkish ] = "Kes"; + Text[ catalan ] = "Retalla"; + Text[ thai ] = "ตัด"; + Text[ czech ] = "Vyjmout"; + Text[ hebrew ] = "גזירה"; + Text[ hindi ] = "काटो"; + Text[ slovak ] = "Vybrať"; +}; +String STR_UNDO_DELETE +{ + Text = "Lschen" ; + Text [ ENGLISH ] = "Delete" ; + Text [ english_us ] = "Delete" ; + Text [ italian ] = "Elimina" ; + Text [ spanish ] = "Borrar" ; + Text [ french ] = "Supprimer" ; + Text [ dutch ] = "Wissen" ; + Text [ swedish ] = "Radera" ; + Text [ danish ] = "Slet" ; + Text [ portuguese ] = "Eliminar" ; + Text [ portuguese_brazilian ] = "Excluir" ; + Text[ chinese_simplified ] = "删除"; + Text[ russian ] = ""; + Text[ polish ] = "Usu"; + Text[ japanese ] = "削除"; + Text[ chinese_traditional ] = "刪除"; + Text[ arabic ] = ""; + Text[ greek ] = ""; + Text[ korean ] = "삭제"; + Text[ turkish ] = "Sil"; + Text[ catalan ] = "Suprimeix"; + Text[ finnish ] = "Poista"; + Text[ thai ] = "ลบ"; + Text[ czech ] = "Smazat"; + Text[ hebrew ] = "מחיקה"; + Text[ hindi ] = "मिटाओ"; + Text[ slovak ] = "Zmazať"; +}; +String STR_UNDO_DIAGRAM_DATA +{ + Text = "Diagrammdaten bearbeiten" ; + Text [ ENGLISH ] = "Modify diagram data" ; + Text [ english_us ] = "Edit chart data" ; + Text [ italian ] = "Modifica dati di diagramma" ; + Text [ spanish ] = "Editar datos del diagrama" ; + Text [ french ] = "diter les donnes du diagramme" ; + Text [ dutch ] = "Diagramgegevens bewerken" ; + Text [ swedish ] = "Redigera diagramdata" ; + Text [ danish ] = "Rediger diagramdata" ; + Text [ portuguese ] = "Editar dados do grfico" ; + Text [ portuguese_brazilian ] = "Editar dados do grfico" ; + Text[ chinese_simplified ] = "编辑图表数据"; + Text[ russian ] = " "; + Text[ polish ] = "Edytuj dane wykresu"; + Text[ japanese ] = "グラフ データの編集"; + Text[ chinese_traditional ] = "編輯圖表資料"; + Text[ arabic ] = " "; + Text[ greek ] = " "; + Text[ korean ] = "차트 데이터 편집"; + Text[ turkish ] = "ema verileri dzenle"; + Text[ catalan ] = "Edita les dades del diagrama"; + Text[ finnish ] = "Muokkaa kaaviotietoja"; + Text[ thai ] = "แก้ไขข้อมูลของแผนภูมิ"; + Text[ czech ] = "Upravit data grafu"; + Text[ hebrew ] = "Diagrammdaten bearbeiten"; + Text[ hindi ] = "चार्ट ड़ॉटा संपादन"; + Text[ slovak ] = "Upraviť dáta grafu"; +}; +String STR_UNDO_EDIT_TITLE +{ + Text = "Titel editieren" ; + Text [ ENGLISH ] = "Edit Title" ; + Text [ english_us ] = "Edit title" ; + Text [ italian ] = "Editare titolo" ; + Text [ spanish ] = "Editar ttulo" ; + Text [ french ] = "diter le titre" ; + Text [ dutch ] = "Titel bewerken" ; + Text [ swedish ] = "Redigera rubrik" ; + Text [ danish ] = "Rediger titel" ; + Text [ portuguese ] = "Editar ttulo" ; + Text [ portuguese_brazilian ] = "Editar ttulo" ; + Text[ chinese_simplified ] = "编辑标题"; + Text[ russian ] = " "; + Text[ polish ] = "Edytuj tytu"; + Text[ japanese ] = "タイトルの編集"; + Text[ chinese_traditional ] = "編輯標題"; + Text[ arabic ] = " "; + Text[ greek ] = " "; + Text[ korean ] = "제목 편집"; + Text[ turkish ] = "Balk dzenle"; + Text[ catalan ] = "Edita ttol"; + Text[ finnish ] = "Muokkaa otsikkoa"; + Text[ thai ] = "แก้ไขชื่อ"; + Text[ czech ] = "Upravit titul"; + Text[ hebrew ] = "Titel editieren"; + Text[ hindi ] = "शीर्षक संपादन"; + Text[ slovak ] = "Upraviť nadpis"; +}; +String STR_UNDO_STATISTICS +{ + Text = "Statistik" ; + Text [ ENGLISH ] = "Statistics" ; + Text [ english_us ] = "Statistics" ; + Text [ italian ] = "Statistiche" ; + Text [ spanish ] = "Estadstica" ; + Text [ french ] = "Statistiques" ; + Text [ dutch ] = "Statistiek" ; + Text [ swedish ] = "Statistik" ; + Text [ danish ] = "Statistik" ; + Text [ portuguese ] = "Estatstica" ; + Text [ portuguese_brazilian ] = "Estatsticas" ; + Text[ chinese_simplified ] = "统计"; + Text[ russian ] = ""; + Text[ polish ] = "Statystyka"; + Text[ japanese ] = "詳細情報"; + Text[ chinese_traditional ] = "統計"; + Text[ arabic ] = ""; + Text[ greek ] = ""; + Text[ korean ] = "통계"; + Text[ turkish ] = "statistik"; + Text[ catalan ] = "Estadstica"; + Text[ finnish ] = "Tilastotiedot"; + Text[ thai ] = "สถิติ"; + Text[ czech ] = "Statistika"; + Text[ hebrew ] = "סטטיסטיקות"; + Text[ hindi ] = "अँकड़े"; + Text[ slovak ] = "Štatistika"; +}; +String STR_UNDO_INSERT_TITLE +{ + Text = "Titel einfgen" ; + Text [ ENGLISH ] = "Insert Title" ; + Text [ norwegian ] = "Sett inn Tittel" ; + Text [ italian ] = "Inserisci titolo" ; + Text [ portuguese_brazilian ] = "Inserir ttulo" ; + Text [ portuguese ] = "Inserir ttulo" ; + Text [ finnish ] = "Lis otsikko" ; + Text [ danish ] = "Indst titel" ; + Text [ french ] = "Insrer un titre" ; + Text [ swedish ] = "Infoga rubrik" ; + Text [ dutch ] = "Titel invoegen" ; + Text [ spanish ] = "Insertar ttulo" ; + Text [ english_us ] = "Insert title" ; + Text[ chinese_simplified ] = "插入标题"; + Text[ russian ] = " "; + Text[ polish ] = "Wstaw tytu"; + Text[ japanese ] = "タイトルの挿入"; + Text[ chinese_traditional ] = "插入標題"; + Text[ arabic ] = " "; + Text[ greek ] = " "; + Text[ korean ] = "제목 삽입"; + Text[ turkish ] = "Balk ekle"; + Text[ catalan ] = "Insereix ttol"; + Text[ thai ] = "แทรกชื่อ"; + Text[ czech ] = "Vložit titulek"; + Text[ hebrew ] = "Titel einfügen"; + Text[ hindi ] = "शीर्षक जोड़ो"; + Text[ slovak ] = "Vložiť titulok"; +}; +String STR_UNDO_INSERT_LEGEND +{ + Text = "Legende einfgen" ; + Text [ ENGLISH ] = "Insert legend" ; + Text [ norwegian ] = "Setter inn tegnforklaring" ; + Text [ italian ] = "Inserisci legenda" ; + Text [ portuguese_brazilian ] = "Inserir legenda" ; + Text [ portuguese ] = "Inserir legenda" ; + Text [ finnish ] = "Lis selite" ; + Text [ danish ] = "Indst forklaring" ; + Text [ french ] = "Insrer une lgende" ; + Text [ swedish ] = "Infoga frklaring" ; + Text [ dutch ] = "Legenda invoegen" ; + Text [ spanish ] = "Insertar leyenda" ; + Text [ english_us ] = "Insert legend" ; + Text[ chinese_simplified ] = "插入图例"; + Text[ russian ] = " "; + Text[ polish ] = "Wstaw legend"; + Text[ japanese ] = "凡例の挿入"; + Text[ chinese_traditional ] = "插入圖例"; + Text[ arabic ] = " "; + Text[ greek ] = " "; + Text[ korean ] = "범례 삽입"; + Text[ turkish ] = "Aklama ekle"; + Text[ catalan ] = "Insereix una llegenda"; + Text[ thai ] = "แทรกคำอธิบาย"; + Text[ czech ] = "Vložit legendu"; + Text[ hebrew ] = "Legende einfügen"; + Text[ hindi ] = "लेजन्ड जोड़ो"; + Text[ slovak ] = "Vložiť legendu"; +}; +String STR_UNDO_INSERT_DESCR +{ + Text = "Datenbeschriftung einfgen" ; + Text [ ENGLISH ] = "Insert data description" ; + Text [ norwegian ] = "Setter inn data beskrivelse" ; + Text [ italian ] = "Inserisci dicitura dati" ; + Text [ portuguese_brazilian ] = "Inserir rtulo dos dados" ; + Text [ portuguese ] = "Inserir legenda para dados" ; + Text [ finnish ] = "Lis tietoselite" ; + Text [ danish ] = "Indst dataetiket" ; + Text [ french ] = "Insrer des tiquettes de donnes" ; + Text [ swedish ] = "Infoga dataetikett" ; + Text [ dutch ] = "Gegevenslabels invoegen" ; + Text [ spanish ] = "Insertar etiqueta de datos" ; + Text [ english_us ] = "Insert data label" ; + Text[ chinese_simplified ] = "插入数据标志"; + Text[ russian ] = " "; + Text[ polish ] = "Wstaw etykiet danych"; + Text[ japanese ] = "データラベルの挿入"; + Text[ chinese_traditional ] = "插入資料標籤"; + Text[ arabic ] = " "; + Text[ greek ] = " "; + Text[ korean ] = "데이터 레이블 삽입"; + Text[ turkish ] = "Veri etiketi ekle"; + Text[ catalan ] = "Insereix l'etiqueta de les dades"; + Text[ thai ] = "แทรกป้ายชื่อข้อมูล"; + Text[ czech ] = "Vložit popis dat"; + Text[ hebrew ] = "Datenbeschriftung einfügen"; + Text[ hindi ] = "Insert data label"; + Text[ slovak ] = "Vložiť dátové značky"; +}; +String STR_UNDO_INSERT_AXIS +{ + Text = "Achsen einfgen" ; + Text [ ENGLISH ] = "Insert axes" ; + Text [ english_us ] = "Insert axes" ; + Text[ portuguese ] = "Inserir eixos"; + Text[ russian ] = " "; + Text[ greek ] = " "; + Text[ dutch ] = "Assen invoegen"; + Text[ french ] = "Insrer des axes"; + Text[ spanish ] = "Insertar ejes"; + Text[ italian ] = "Inserisci assi"; + Text[ danish ] = "Indst akser"; + Text[ swedish ] = "Infoga axlar"; + Text[ polish ] = "Wstaw osie"; + Text[ portuguese_brazilian ] = "Inserir eixos"; + Text[ japanese ] = "軸と目盛線の挿入"; + Text[ korean ] = "축 삽입"; + Text[ chinese_simplified ] = "插入轴"; + Text[ chinese_traditional ] = "插入軸"; + Text[ arabic ] = " "; + Text[ turkish ] = "Eksen ekle"; + Text[ catalan ] = "Insereix els eixos"; + Text[ finnish ] = "Lis akselit"; + Text[ thai ] = "แทรกแกน"; + Text[ czech ] = "Vložit osy"; + Text[ hebrew ] = "Achsen einfügen"; + Text[ hindi ] = "Insert axes"; + Text[ slovak ] = "Vložiť osi"; +}; +String STR_UNDO_INSERT_GRID +{ + Text = "Gitter einfgen" ; + Text [ ENGLISH ] = "Insert grids" ; + Text [ english_us ] = "Insert grids" ; + Text[ portuguese ] = "Inserir grelhas"; + Text[ russian ] = " "; + Text[ greek ] = " "; + Text[ dutch ] = "Raster invoegen"; + Text[ french ] = "Insrer des grilles"; + Text[ spanish ] = "Insertar cuadrculas"; + Text[ italian ] = "Inserisci griglie"; + Text[ danish ] = "Indst gitre"; + Text[ swedish ] = "Infoga gitter"; + Text[ polish ] = "Wstaw siatki"; + Text[ portuguese_brazilian ] = "Inserir grades"; + Text[ japanese ] = "目盛線の挿入"; + Text[ korean ] = "눈금선 삽입"; + Text[ chinese_simplified ] = "插入网格线"; + Text[ chinese_traditional ] = "插入網格"; + Text[ arabic ] = " "; + Text[ turkish ] = "Klavuz ekle"; + Text[ catalan ] = "Insereix les graelles"; + Text[ finnish ] = "Lis ruudukot"; + Text[ thai ] = "แทรกเส้นตาราง"; + Text[ czech ] = "Vložit mřížky"; + Text[ hebrew ] = "Gitter einfügen"; + Text[ hindi ] = "Insert grids"; + Text[ slovak ] = "Vložiť mriežky"; +}; +String STR_UNDO_DATA_ROW +{ + Text = "Datenreihe bearbeiten" ; + Text [ ENGLISH ] = "Modify dataline" ; + Text [ norwegian ] = "Endrer datalinje" ; + Text [ italian ] = "Modifica serie di dati" ; + Text [ portuguese_brazilian ] = "Editar srie de dados" ; + Text [ portuguese ] = "Editar linha de dados" ; + Text [ finnish ] = "Muokkaa tietojoukkoja" ; + Text [ danish ] = "Rediger dataserie" ; + Text [ french ] = "diter la srie de donnes" ; + Text [ swedish ] = "Redigera dataserie" ; + Text [ dutch ] = "Gegevensreeks wijzigen" ; + Text [ spanish ] = "Editar serie de datos" ; + Text [ english_us ] = "Edit data series" ; + Text[ chinese_simplified ] = "编辑数据组"; + Text[ russian ] = " "; + Text[ polish ] = "Edytuj seri danych"; + Text[ japanese ] = "データ系列の編集"; + Text[ chinese_traditional ] = "編輯資料欄"; + Text[ arabic ] = " "; + Text[ greek ] = " "; + Text[ korean ] = "연속 데이터 편집"; + Text[ turkish ] = "Veri dizisi dzenle"; + Text[ catalan ] = "Edita srie de dades"; + Text[ thai ] = "แก้ไขชุดข้อมูล"; + Text[ czech ] = "Upravit datovou řadu"; + Text[ hebrew ] = "Datenreihe bearbeiten"; + Text[ hindi ] = "डॉटा श्रृंखला संपादन"; + Text[ slovak ] = "Upraviť dátový rad"; +}; +String STR_UNDO_DATA_POINT +{ + Text = "Datenpunkt bearbeiten" ; + Text [ ENGLISH ] = "Modify datapoint" ; + Text [ norwegian ] = "Endrer datapunkt" ; + Text [ italian ] = "Modifica punto dati" ; + Text [ portuguese_brazilian ] = "Editar ponto dos dados" ; + Text [ portuguese ] = "Editar ponto de dados" ; + Text [ finnish ] = "Muokkaa arvopistett" ; + Text [ danish ] = "Rediger datapunkt" ; + Text [ french ] = "diter le point de donnes" ; + Text [ swedish ] = "Redigera datapunkt" ; + Text [ dutch ] = "Gegevenspunt bewerken" ; + Text [ spanish ] = "Editar punto de datos" ; + Text [ english_us ] = "Edit data point" ; + Text[ chinese_simplified ] = "编辑数据点"; + Text[ russian ] = " "; + Text[ polish ] = "Edytuj punkt danych"; + Text[ japanese ] = "データポイントの編集"; + Text[ chinese_traditional ] = "編輯資料點"; + Text[ arabic ] = " "; + Text[ greek ] = " "; + Text[ korean ] = "데이터 포인트 편집"; + Text[ turkish ] = "Veri noktas dzenle"; + Text[ catalan ] = "Edita el punt de dades"; + Text[ thai ] = "แก้ไขจุดข้อมูล"; + Text[ czech ] = "Upravit datový bod"; + Text[ hebrew ] = "Datenpunkt bearbeiten"; + Text[ hindi ] = "डॉटा बिन्दु संपादन"; + Text[ slovak ] = "Upraviť dátový bod"; +}; +String STR_UNDO_TITLE +{ + Text = "Titel bearbeiten" ; + Text [ ENGLISH ] = "Modify title" ; + Text [ norwegian ] = "Endrer tittel" ; + Text [ italian ] = "Modifica titolo" ; + Text [ portuguese_brazilian ] = "Editar ttulo" ; + Text [ portuguese ] = "Editar ttulo" ; + Text [ finnish ] = "Muokkaa otsikkoa" ; + Text [ danish ] = "Rediger titel" ; + Text [ french ] = "diter le titre" ; + Text [ swedish ] = "Redigera rubrik" ; + Text [ dutch ] = "Titel bewerken" ; + Text [ spanish ] = "Editar ttulo" ; + Text [ english_us ] = "Edit title" ; + Text[ chinese_simplified ] = "编辑标题"; + Text[ russian ] = " "; + Text[ polish ] = "Edytuj tytu"; + Text[ japanese ] = "タイトルの編集"; + Text[ chinese_traditional ] = "編輯標題"; + Text[ arabic ] = " "; + Text[ greek ] = " "; + Text[ korean ] = "제목 편집"; + Text[ turkish ] = "Balk dzenle"; + Text[ catalan ] = "Edita ttol"; + Text[ thai ] = "แก้ไขชื่อ"; + Text[ czech ] = "Upravit titul"; + Text[ hebrew ] = "Titel bearbeiten"; + Text[ hindi ] = "Edit title"; + Text[ slovak ] = "Upraviť nadpis"; +}; +String STR_UNDO_LEGEND +{ + Text = "Legende bearbeiten" ; + Text [ ENGLISH ] = "Modify legend" ; + Text [ norwegian ] = "Endrer tegnforklaring" ; + Text [ italian ] = "Modifica legenda" ; + Text [ portuguese_brazilian ] = "Editar legenda" ; + Text [ portuguese ] = "Editar legenda" ; + Text [ finnish ] = "Muokkaa selitett" ; + Text [ danish ] = "Rediger forklaring" ; + Text [ french ] = "diter la lgende" ; + Text [ swedish ] = "Redigera frklaring" ; + Text [ dutch ] = "Legenda bewerken" ; + Text [ spanish ] = "Editar leyenda" ; + Text [ english_us ] = "Edit legend" ; + Text[ chinese_simplified ] = "编辑图例"; + Text[ russian ] = " "; + Text[ polish ] = "Edytuj legend"; + Text[ japanese ] = "凡例の編集"; + Text[ chinese_traditional ] = "編輯圖例"; + Text[ arabic ] = " "; + Text[ greek ] = " "; + Text[ korean ] = "범례 편집"; + Text[ turkish ] = "Aklama dzenle"; + Text[ catalan ] = "Edita la llegenda"; + Text[ thai ] = "แก้ไขคำอธิบาย"; + Text[ czech ] = "Upravit legendu"; + Text[ hebrew ] = "Legende bearbeiten"; + Text[ hindi ] = "लेजन्ड़ संपादन"; + Text[ slovak ] = "Upraviť legendu"; +}; +String STR_UNDO_DIAGRAM_AXIS +{ + Text = "Achse bearbeiten" ; + Text [ ENGLISH ] = "Modify axis" ; + Text [ norwegian ] = "Endrer akse" ; + Text [ italian ] = "Modifica asse" ; + Text [ portuguese_brazilian ] = "Editar eixo" ; + Text [ portuguese ] = "Editar eixo" ; + Text [ finnish ] = "Muokkaa akselia" ; + Text [ danish ] = "Rediger akse" ; + Text [ french ] = "diter l'axe" ; + Text [ swedish ] = "Redigera axel" ; + Text [ dutch ] = "As wijzigen" ; + Text [ spanish ] = "Modificar ejes" ; + Text [ english_us ] = "Edit axis" ; + Text[ chinese_simplified ] = "编辑轴数值"; + Text[ russian ] = " "; + Text[ polish ] = "Edytuj osie"; + Text[ japanese ] = "軸の編集"; + Text[ chinese_traditional ] = "編輯軸"; + Text[ arabic ] = " "; + Text[ greek ] = " "; + Text[ korean ] = "축 편집"; + Text[ turkish ] = "Ekseni dzenle"; + Text[ catalan ] = "Edita l'eix"; + Text[ thai ] = "แก้ไขแกน"; + Text[ czech ] = "Upravit osu"; + Text[ hebrew ] = "Achse bearbeiten"; + Text[ hindi ] = "अक्ष संपादन"; + Text[ slovak ] = "Upraviť os"; +}; +String STR_UNDO_DIAGRAM_GRID +{ + Text = "Gitter bearbeiten" ; + Text [ ENGLISH ] = "Modify grid" ; + Text [ norwegian ] = "Endrer rutenett" ; + Text [ italian ] = "Modifica griglia" ; + Text [ portuguese_brazilian ] = "Editar grade" ; + Text [ portuguese ] = "Editar grelha" ; + Text [ finnish ] = "Muokkaa ruudukkoa" ; + Text [ danish ] = "Rediger gitter" ; + Text [ french ] = "diter la grille" ; + Text [ swedish ] = "Redigera gitter" ; + Text [ dutch ] = "Raster bewerken" ; + Text [ spanish ] = "Editar cuadrcula" ; + Text [ english_us ] = "Edit grid" ; + Text[ chinese_simplified ] = "编辑网格线"; + Text[ russian ] = " "; + Text[ polish ] = "Edytuj siatk"; + Text[ japanese ] = "目盛線の編集"; + Text[ chinese_traditional ] = "編輯網格線"; + Text[ arabic ] = " "; + Text[ greek ] = " "; + Text[ korean ] = "눈금선 편집"; + Text[ turkish ] = "Klavuz izgileri dzenle"; + Text[ catalan ] = "Edita la graella"; + Text[ thai ] = "แก้ไขเส้นตาราง"; + Text[ czech ] = "Upravit mřížku"; + Text[ hebrew ] = "Gitter bearbeiten"; + Text[ hindi ] = "जाल संपादन"; + Text[ slovak ] = "Upraviť mriežku"; +}; +String STR_UNDO_DIAGRAM_WALL +{ + Text = "Diagrammwand bearbeiten" ; + Text [ ENGLISH ] = "Modify diagram wall" ; + Text [ norwegian ] = "Endrer diagram vegg" ; + Text [ italian ] = "Modifica parete del diagramma" ; + Text [ portuguese_brazilian ] = "Editar parede do grfico" ; + Text [ portuguese ] = "Editar parede do grfico" ; + Text [ finnish ] = "Muokkaa kaaviosein" ; + Text [ danish ] = "Rediger diagramvg" ; + Text [ french ] = "diter la paroi du diagramme" ; + Text [ swedish ] = "Redigera diagramvgg" ; + Text [ dutch ] = "Diagramwand bewerken" ; + Text [ spanish ] = "Editar plano lateral" ; + Text [ english_us ] = "Edit chart wall" ; + Text[ chinese_simplified ] = "编辑图表背景墙"; + Text[ russian ] = " "; + Text[ polish ] = "Edytuj cian wykresu"; + Text[ japanese ] = "グラフの壁面の編集"; + Text[ chinese_traditional ] = "編輯圖表背景牆"; + Text[ arabic ] = " "; + Text[ greek ] = " "; + Text[ korean ] = "차트 옆면 수정"; + Text[ turkish ] = "ema duvarn dzenle"; + Text[ catalan ] = "Edita el pla lateral del diagrama"; + Text[ thai ] = "แก้ไขผนังแผนภูมิ"; + Text[ czech ] = "Upravit stěnu grafu"; + Text[ hebrew ] = "Diagrammwand bearbeiten"; + Text[ hindi ] = "चार्ट वॉल संपादन"; + Text[ slovak ] = "Upraviť bok grafu"; +}; +String STR_UNDO_DIAGRAM_FLOOR +{ + Text = "Diagrammboden bearbeiten" ; + Text [ ENGLISH ] = "Modify diagram floor" ; + Text [ norwegian ] = "Endrer diagram gulv" ; + Text [ italian ] = "Modifica pavimento del diagramma" ; + Text [ portuguese_brazilian ] = "Editar piso do grfico" ; + Text [ portuguese ] = "Editar base do grfico" ; + Text [ finnish ] = "Muokkaa kaavioperustaa" ; + Text [ danish ] = "Rediger diagramgulv" ; + Text [ french ] = "diter le plancher du diagramme" ; + Text [ swedish ] = "Redigera diagramgolv" ; + Text [ dutch ] = "Diagrambodem bewerken" ; + Text [ spanish ] = "Editar plano inferior" ; + Text [ english_us ] = "Edit chart floor" ; + Text[ chinese_simplified ] = "编辑图表基底"; + Text[ russian ] = " "; + Text[ polish ] = "Edytuj podstaw wykresu"; + Text[ japanese ] = "グラフの床面の編集"; + Text[ chinese_traditional ] = "編輯座標軸"; + Text[ arabic ] = " "; + Text[ greek ] = " "; + Text[ korean ] = "차트 밑면 편집"; + Text[ turkish ] = "ema tabann dzenle"; + Text[ catalan ] = "Edita la base del diagrama"; + Text[ thai ] = "แก้ไขพื้นแผนภูมิ"; + Text[ czech ] = "Upravit patu grafu"; + Text[ hebrew ] = "Diagrammboden bearbeiten"; + Text[ hindi ] = "चार्ट फ़्लॉर संपादन"; + Text[ slovak ] = "Upraviť pätu grafu"; +}; +String STR_UNDO_DIAGRAM_AREA +{ + Text = "Diagrammflche bearbeiten" ; + Text [ ENGLISH ] = "Modify diagram area" ; + Text [ norwegian ] = "Endrer diagram omrde" ; + Text [ italian ] = "Modifica area diagramma" ; + Text [ portuguese_brazilian ] = "Editar rea do grfico" ; + Text [ portuguese ] = "Editar rea do grfico" ; + Text [ finnish ] = "Muokkaa kaavioaluetta" ; + Text [ danish ] = "Rediger diagramomrde" ; + Text [ french ] = "diter l'arrire-plan du diagramme" ; + Text [ swedish ] = "Redigera diagramomrde" ; + Text [ dutch ] = "Diagramoppervlak wijzigen" ; + Text [ spanish ] = "Editar la superficie del diagrama" ; + Text [ english_us ] = "Edit chart area" ; + Text[ chinese_simplified ] = "编辑图表区"; + Text[ russian ] = " "; + Text[ polish ] = "Edytuj obszar wykresu"; + Text[ japanese ] = "グラフエリアの編集"; + Text[ chinese_traditional ] = "編輯圖表平面"; + Text[ arabic ] = " "; + Text[ greek ] = " "; + Text[ korean ] = "차트 영역 편집"; + Text[ turkish ] = "ema yzeyini dzenle"; + Text[ catalan ] = "Edita rea de diagrama"; + Text[ thai ] = "แก้ไขพื้นที่แผนภูมิ"; + Text[ czech ] = "Upravit oblast grafu"; + Text[ hebrew ] = "Diagrammfläche bearbeiten"; + Text[ hindi ] = "चार्ट विस्तीर्ण संपादन"; + Text[ slovak ] = "Upraviť plochu grafu"; +}; +String STR_UNDO_DIAGRAM_TYPE +{ + Text = "Diagrammtyp bearbeiten" ; + Text [ ENGLISH ] = "Modify diagram type" ; + Text [ norwegian ] = "Endrer diagram type" ; + Text [ italian ] = "Modifica tipo di diagramma" ; + Text [ portuguese_brazilian ] = "Editar tipo do grfico" ; + Text [ portuguese ] = "Editar tipo de grfico" ; + Text [ finnish ] = "Muokkaa kaaviotyyppi" ; + Text [ danish ] = "Rediger diagramtype" ; + Text [ french ] = "diter le type de diagramme" ; + Text [ swedish ] = "Redigera diagramtyp" ; + Text [ dutch ] = "Diagramtype wijzigen" ; + Text [ spanish ] = "Editar tipo de diagrama" ; + Text [ english_us ] = "Edit chart type" ; + Text[ chinese_simplified ] = "编辑图表类型"; + Text[ russian ] = " "; + Text[ polish ] = "Edytuj typ wykresu"; + Text[ japanese ] = "グラフの種類の編集"; + Text[ chinese_traditional ] = "編輯圖表類型"; + Text[ arabic ] = " "; + Text[ greek ] = " "; + Text[ korean ] = "차트 유형 편집"; + Text[ turkish ] = "ema tipini dzenle"; + Text[ catalan ] = "Edita el tipus de diagrama"; + Text[ thai ] = "แก้ไขชนิดแผนภูมิ"; + Text[ czech ] = "Upravit typ grafu"; + Text[ hebrew ] = "Diagrammtyp bearbeiten"; + Text[ hindi ] = "चार्ट वर्ग संपादन"; + Text[ slovak ] = "Upraviť typ grafu"; +}; +String STR_UNDO_AUTOFORMAT +{ + Text = "AutoFormat" ; + Text [ ENGLISH ] = "AutoFormat" ; + Text [ dutch ] = "AutoOpmaak" ; + Text [ english_us ] = "AutoFormat" ; + Text [ italian ] = "Formattazione automatica" ; + Text [ spanish ] = "Formateado automtico" ; + Text [ french ] = "AutoFormat" ; + Text [ swedish ] = "Autoformat" ; + Text [ danish ] = "AutoFormat" ; + Text [ portuguese ] = "AutoFormato" ; + Text [ portuguese_brazilian ] = "AutoFormatao" ; + Text[ chinese_simplified ] = "自动格式"; + Text[ russian ] = ""; + Text[ polish ] = "Autoformatowanie"; + Text[ japanese ] = "オートフォーマット"; + Text[ chinese_traditional ] = "自動格式"; + Text[ arabic ] = " "; + Text[ greek ] = ""; + Text[ korean ] = "자동 서식"; + Text[ turkish ] = "Otomatik formatlama"; + Text[ catalan ] = "AutoFormat"; + Text[ finnish ] = "Automaattinen muotoilu"; + Text[ thai ] = "รูปแบบอัตโนมัติ"; + Text[ czech ] = "Automatický formát"; + Text[ hebrew ] = "עיצוב אוטומטי"; + Text[ hindi ] = "स्वचालित ढंग से रचना"; + Text[ slovak ] = "Automatický formát"; +}; +String STR_UNDO_3D_VIEW +{ + Text = "3D-Ansicht bearbeiten" ; + Text [ ENGLISH ] = "Modify 3D view" ; + Text [ norwegian ] = "Endrer vis 3D " ; + Text [ italian ] = "Modifica vista 3D" ; + Text [ portuguese_brazilian ] = "Editar visualizao 3D" ; + Text [ portuguese ] = "Editar vista 3D" ; + Text [ finnish ] = "Muokkaa kolmiulotteista nkym" ; + Text [ danish ] = "Rediger 3D-visning" ; + Text [ french ] = "diter l'affichage 3D" ; + Text [ swedish ] = "Redigera 3D-vy" ; + Text [ dutch ] = "3D-weergave bewerken" ; + Text [ spanish ] = "Editar la visualizacin en 3D" ; + Text [ english_us ] = "Edit 3D view" ; + Text[ chinese_simplified ] = "编辑 3 维视图"; + Text[ russian ] = " "; + Text[ polish ] = "Edytuj widok 3D"; + Text[ japanese ] = "3D 表示の編集"; + Text[ chinese_traditional ] = "編輯 3D 檢視"; + Text[ arabic ] = " "; + Text[ greek ] = " 3"; + Text[ korean ] = "3D 보기 편집"; + Text[ turkish ] = "3B grnmn dzenle"; + Text[ catalan ] = "Edita la vista 3D"; + Text[ thai ] = "แก้ไขมุมมอง 3มิติ"; + Text[ czech ] = "Upravit 3D pohled"; + Text[ hebrew ] = "3D-Ansicht bearbeiten"; + Text[ hindi ] = "3D दृश्य संपादन"; + Text[ slovak ] = "Upraviť 3D zobrazenie"; +}; +String STR_UNDO_LIGHTING +{ + Text = "3D-Beleuchtung einstellen" ; + Text [ ENGLISH ] = "Modify 3D lighting..." ; + Text [ norwegian ] = "Endrer belysning 3D..." ; + Text [ italian ] = "Modifica illuminazione tridimensionale..." ; + Text [ portuguese_brazilian ] = "Definir iluminao 3D" ; + Text [ portuguese ] = "Definir iluminao 3D..." ; + Text [ finnish ] = "Mrit 3D-valaistus" ; + Text [ danish ] = "Indstil 3D-belysning" ; + Text [ french ] = "Rgler l'clairage 3D..." ; + Text [ swedish ] = "Stll in 3D-belysning" ; + Text [ dutch ] = "3D-belichting instellen" ; + Text [ spanish ] = "Ajustar iluminacin 3D" ; + Text [ english_us ] = "Set 3D illumination" ; + Text[ chinese_simplified ] = "设定 3 维照明"; + Text[ russian ] = " "; + Text[ polish ] = "Ustaw owietlenie 3D"; + Text[ japanese ] = "3D 体照明の設定"; + Text[ chinese_traditional ] = "設定 3D 照明"; + Text[ arabic ] = " "; + Text[ greek ] = " 3"; + Text[ korean ] = "3D 조명 설정"; + Text[ turkish ] = "3B aydnlatmasn ayarla"; + Text[ catalan ] = "Ajusta il.luminaci 3D"; + Text[ thai ] = "กำหนดระดับความสว่าง 3มิติ"; + Text[ czech ] = "Nastavit 3D osvětlení"; + Text[ hebrew ] = "3D-Beleuchtung einstellen"; + Text[ hindi ] = "3D चमक सेट्ट करो"; + Text[ slovak ] = "Nastaviť 3D osvetlenie"; +}; +String STR_UNDO_TOGGLE_TITLE +{ + Text = "Titel ein/aus" ; + Text [ ENGLISH ] = "Title on/off" ; + Text [ english_us ] = "Title on/off" ; + Text [ italian ] = "Mostra/nascondi il titolo" ; + Text [ spanish ] = "Mostrar/ocultar ttulo" ; + Text [ french ] = "Afficher/masquer le titre" ; + Text [ dutch ] = "Titel aan/uit" ; + Text [ swedish ] = "Rubrik p/av" ; + Text [ danish ] = "Titel til/fra" ; + Text [ portuguese ] = "Activar/Desactivar ttulo" ; + Text [ portuguese_brazilian ] = "Ativar/desativar Titulo" ; + Text[ chinese_simplified ] = "显示或隐入标题"; + Text[ russian ] = ""; + Text[ polish ] = "Wcz/Wycz tytu"; + Text[ japanese ] = "タイトル オン/オフ"; + Text[ chinese_traditional ] = "顯示/隱入標題"; + Text[ arabic ] = "/ "; + Text[ greek ] = " /"; + Text[ korean ] = "제목 적용/해제"; + Text[ turkish ] = "Bal grntle/gizle"; + Text[ catalan ] = "Mostra/oculta ttol"; + Text[ finnish ] = "Otsikko kytss / poissa kytst"; + Text[ thai ] = "ชื่อ มี/ไม่มี"; + Text[ czech ] = "Titul zap/vyp"; + Text[ hebrew ] = "Titel ein/aus"; + Text[ hindi ] = "Title on/off"; + Text[ slovak ] = "Zapnúť/vypnúť nadpis"; +}; +String STR_UNDO_TOGGLE_LEGEND +{ + Text = "Legende ein/aus" ; + Text [ ENGLISH ] = "Legend on/off" ; + Text [ dutch ] = "Legenda aan/uit" ; + Text [ english_us ] = "Legend on/off" ; + Text [ italian ] = "Mostra/nascondi legenda" ; + Text [ spanish ] = "Mostrar/ocultar leyenda" ; + Text [ french ] = "Afficher/masquer la lgende" ; + Text [ swedish ] = "Frklaring p/av" ; + Text [ danish ] = "Forklaring til/fra" ; + Text [ portuguese ] = "Activar/Desactivar legenda" ; + Text [ portuguese_brazilian ] = "Ativar/desativar Legenda" ; + Text[ chinese_simplified ] = "显示或隐入图例"; + Text[ russian ] = ""; + Text[ polish ] = "Wcz/wycz legend"; + Text[ japanese ] = "凡例 オン/オフ"; + Text[ chinese_traditional ] = "顯示/隱入圖例"; + Text[ arabic ] = "/ "; + Text[ greek ] = " /"; + Text[ korean ] = "범례 적용/적용안함"; + Text[ turkish ] = "Aklamay grntle/gizle"; + Text[ catalan ] = "Llegenda activada/desactivada"; + Text[ finnish ] = "Selite kytss / poissa kytst"; + Text[ thai ] = "คำอธิบาย มี/ไม่มี"; + Text[ czech ] = "Legenda zap/vyp"; + Text[ hebrew ] = "Legende ein/aus"; + Text[ hindi ] = "लेजन्ड शुरु/बंद"; + Text[ slovak ] = "Zapnúť/vypnúť legendu"; +}; +String STR_UNDO_TOGGLE_AXIS_TITLE +{ + Text = "Achsentitel ein/aus" ; + Text [ ENGLISH ] = "Axis Title on/off" ; + Text [ dutch ] = "Astitels aan/uit" ; + Text [ english_us ] = "Axis titles on/off" ; + Text [ italian ] = "Mostra/nascondi il titolo degli assi" ; + Text [ spanish ] = "Mostrar/ocultar los ttulos de ejes" ; + Text [ french ] = "Afficher/masquer les titres des axes" ; + Text [ swedish ] = "Axelrubrik p/av" ; + Text [ danish ] = "Aksetitler til/fra" ; + Text [ portuguese ] = "Activar/Desactivar ttulo dos eixos" ; + Text [ portuguese_brazilian ] = "Ativar/desativar ttulos do eixo" ; + Text[ chinese_simplified ] = "显示或隐入轴标题"; + Text[ russian ] = " "; + Text[ polish ] = "Wcz/wycz tytuy osi"; + Text[ japanese ] = "軸のタイトル オン/オフ"; + Text[ chinese_traditional ] = "顯示/隱入軸標題"; + Text[ arabic ] = "/ "; + Text[ greek ] = " /"; + Text[ korean ] = "축 제목 표시/숨기기"; + Text[ turkish ] = "Eksen balklarn grntle/gizle"; + Text[ catalan ] = "Mostra/oculta ttol d'eixos"; + Text[ finnish ] = "Akseliotsikot kytss / poissa kytst"; + Text[ thai ] = "ชื่อแกน มี/ไม่มี"; + Text[ czech ] = "Titulky os zap/vyp"; + Text[ hebrew ] = "Achsentitel ein/aus"; + Text[ hindi ] = "अक्ष शीर्षकें शुरु/बंद"; + Text[ slovak ] = "Zapnúť/vypnúť názvy osí"; +}; +String STR_UNDO_TOGGLE_AXIS_DESCR +{ + Text = "Achsenbeschriftung ein/aus" ; + Text [ ENGLISH ] = "Axis Description on/off" ; + Text [ dutch ] = "Asbijschriften aan/uit" ; + Text [ english_us ] = "Axis labels on/off" ; + Text [ italian ] = "Mostra/nascondi dicitura assi" ; + Text [ spanish ] = "Mostrar/ocultar etiqueta de ejes" ; + Text [ french ] = "Afficher/masquer les tiquettes des axes" ; + Text [ swedish ] = "Axeletiketter p/av" ; + Text [ danish ] = "Akseetiketter til/fra" ; + Text [ portuguese ] = "Activar/Desactivar legenda dos eixos" ; + Text [ portuguese_brazilian ] = "Ativar/desativar rtulos do eixo" ; + Text[ chinese_simplified ] = "显示或隐入轴数据标志"; + Text[ russian ] = " "; + Text[ polish ] = "Wcz/wycz etykiety osi"; + Text[ japanese ] = "軸ラベル オン/オフ"; + Text[ chinese_traditional ] = "顯示/隱入軸數值標籤"; + Text[ arabic ] = "/ "; + Text[ greek ] = " /"; + Text[ korean ] = "축 레이블 표시/숨기기"; + Text[ turkish ] = "Eksen etiketlerini grntle/gizle"; + Text[ catalan ] = "Etiquetes de l'eix activades/desactivades"; + Text[ finnish ] = "Akseliselitteet kytss / poissa kytst"; + Text[ thai ] = "ป้ายชื่อแกน มี/ไม่มี"; + Text[ czech ] = "Popisy os zap/vyp"; + Text[ hebrew ] = "Achsenbeschriftung ein/aus"; + Text[ hindi ] = "अक्ष लेबिलें शुरु/बंद"; + Text[ slovak ] = "Zapnúť/vypnúť popisy osí"; +}; +String STR_UNDO_TOGGLE_GRID_HORZ +{ + Text = "Gitter horizontal ein/aus" ; + Text [ ENGLISH ] = "Grid horizontal on/off" ; + Text [ english_us ] = "Horizontal grid on/off" ; + Text [ italian ] = "Mostra/nascondi griglia orizzontale" ; + Text [ spanish ] = "Mostrar/ocultar cuadrcula horizontal" ; + Text [ french ] = "Afficher/masquer la grille horizontale " ; + Text [ dutch ] = "Horizontaal raster aan/uit" ; + Text [ swedish ] = "Horisontellt gitter p/av" ; + Text [ danish ] = "Vandret gitter til/fra" ; + Text [ portuguese ] = "Activar/Desactivar grelha horizontal" ; + Text [ portuguese_brazilian ] = "Ativar/desativar grade horizontal" ; + Text[ chinese_simplified ] = "显示或隐入横向网格线"; + Text[ russian ] = " "; + Text[ polish ] = "Wcz/Wycz siatk poziom"; + Text[ japanese ] = "目盛線(横) オン/オフ"; + Text[ chinese_traditional ] = "顯示/隱入橫向網格"; + Text[ arabic ] = "/ "; + Text[ greek ] = " /"; + Text[ korean ] = "가로 눈금선 표시/숨기기"; + Text[ turkish ] = "Yatay klavuz izgilerini grntle/gizle"; + Text[ catalan ] = "Graella horitzontal activada/desactivada"; + Text[ finnish ] = "Vaakaruudukko kytss / poissa kytst"; + Text[ thai ] = "เส้นตารางแนวนอน มี/ไม่มี"; + Text[ czech ] = "Vodorovná mřížka zap/vyp"; + Text[ hebrew ] = "Gitter horizontal ein/aus"; + Text[ hindi ] = "समतल जाल शुरु/बंद"; + Text[ slovak ] = "Zapnúť/vypnúť vodorovnú mriežku"; +}; +String STR_UNDO_TOGGLE_GRID_VERT +{ + Text = "Gitter vertikal ein/aus" ; + Text [ ENGLISH ] = "Grid vertical on/off" ; + Text [ english_us ] = "Vertical grid on/off" ; + Text [ italian ] = "Mostra/nascondi griglia verticale" ; + Text [ spanish ] = "Conmutar cuadrcula vertical" ; + Text [ french ] = "Afficher/masquer la grille verticale" ; + Text [ dutch ] = "Verticaal raster aan/uit" ; + Text [ swedish ] = "Vertikalt gitter p/av" ; + Text [ danish ] = "Lodret gitter til/fra" ; + Text [ portuguese ] = "Activar/Desactivar grelha vertical" ; + Text [ portuguese_brazilian ] = "Ativar/desativar grade vertical" ; + Text[ chinese_simplified ] = "显示或隐入纵向网格"; + Text[ russian ] = " "; + Text[ polish ] = "Wcz/Wycz siatk pionow"; + Text[ japanese ] = "目盛線(縦) オン/オフ"; + Text[ chinese_traditional ] = "顯示/隱入縱向網格"; + Text[ arabic ] = "/ "; + Text[ greek ] = " /"; + Text[ korean ] = "세로 눈금선 표시/숨기기"; + Text[ turkish ] = "Dikey klavuz izgilerini grntle/gizle"; + Text[ catalan ] = "Graella vertical activada/desactivada"; + Text[ finnish ] = "Pystyruudukko kytss / poissa kytst"; + Text[ thai ] = "เส้นตารางแนวตั้ง มี/ไม่มี"; + Text[ czech ] = "Svislá mřížka zap/vyp"; + Text[ hebrew ] = "Gitter vertikal ein/aus"; + Text[ hindi ] = "लंबरूप जाल शुरु/बंद"; + Text[ slovak ] = "Zapnúť/vypnúť zvislú mriežku"; +}; +String STR_UNDO_DATA_IN_ROWS +{ + Text = "Daten in Zeilen" ; + Text [ ENGLISH ] = "Data in Rows" ; + Text [ dutch ] = "Gegevens in rijen" ; + Text [ english_us ] = "Data in Rows" ; + Text [ italian ] = "Dati nelle righe" ; + Text [ spanish ] = "Datos en filas" ; + Text [ french ] = "Donnes en lignes" ; + Text [ swedish ] = "Data i rader" ; + Text [ danish ] = "Data i rkker" ; + Text [ portuguese ] = "Dados em linhas" ; + Text [ portuguese_brazilian ] = "Dados nas Linhas" ; + Text[ chinese_simplified ] = "数据插入行"; + Text[ russian ] = " "; + Text[ polish ] = "Dane w wierszach"; + Text[ japanese ] = "系列を行方向に定義"; + Text[ chinese_traditional ] = "資料插入欄"; + Text[ arabic ] = " "; + Text[ greek ] = " "; + Text[ korean ] = "행 계열"; + Text[ turkish ] = "Satrlardaki veriler"; + Text[ catalan ] = "Dades en files"; + Text[ finnish ] = "Rivien tiedot"; + Text[ thai ] = "ข้อมูลในแถว"; + Text[ czech ] = "Data v řádcích"; + Text[ hebrew ] = "Daten in Zeilen"; + Text[ hindi ] = "Data in Rows"; + Text[ slovak ] = "Dáta v riadkoch"; +}; +String STR_UNDO_DATA_IN_COLUMNS +{ + Text = "Daten in Spalten" ; + Text [ ENGLISH ] = "Data in Columns" ; + Text [ dutch ] = "Gegevens in kolommen" ; + Text [ english_us ] = "Data in Columns" ; + Text [ italian ] = "Dati nelle colonne" ; + Text [ spanish ] = "Datos en columnas" ; + Text [ french ] = "Donnes en colonnes" ; + Text [ swedish ] = "Data i kolumner" ; + Text [ danish ] = "Data i kolonner" ; + Text [ portuguese ] = "Dados em colunas" ; + Text [ portuguese_brazilian ] = "Dados nas Colunas" ; + Text[ chinese_simplified ] = "列数据"; + Text[ russian ] = " "; + Text[ polish ] = "Dane w kolumnach"; + Text[ japanese ] = "系列を列方向に定義"; + Text[ chinese_traditional ] = "資料插入欄"; + Text[ arabic ] = " "; + Text[ greek ] = " "; + Text[ korean ] = "열 계열"; + Text[ turkish ] = "Stunlardaki veriler"; + Text[ catalan ] = "Dades en columnes"; + Text[ finnish ] = "Sarakkeiden tiedot"; + Text[ thai ] = "ข้อมูลในคอลัมน์"; + Text[ czech ] = "Data ve sloupcích"; + Text[ hebrew ] = "Daten in Spalten"; + Text[ hindi ] = "Data in Columns"; + Text[ slovak ] = "Dáta v stĺpcoch"; +}; +String STR_DEFAULTVIEW +{ + Text = "Default" ; + Text [ ENGLISH ] = "Default" ; + Text [ norwegian ] = "Standard" ; + Text [ italian ] = "Predefinito" ; + Text [ portuguese_brazilian ] = "Padro" ; + Text [ portuguese ] = "Padro" ; + Text [ finnish ] = "Oletus" ; + Text [ danish ] = "Standard" ; + Text [ french ] = "Dfaut" ; + Text [ swedish ] = "Standard" ; + Text [ dutch ] = "Standaard" ; + Text [ spanish ] = "Predeterminado" ; + Text [ english_us ] = "Default" ; + Text[ chinese_simplified ] = "默认"; + Text[ russian ] = ""; + Text[ polish ] = "Domylnie"; + Text[ japanese ] = "標準"; + Text[ chinese_traditional ] = "默認"; + Text[ arabic ] = ""; + Text[ greek ] = ""; + Text[ korean ] = "기본값"; + Text[ turkish ] = "Standart"; + Text[ catalan ] = "Per defecte"; + Text[ thai ] = "ค่าเริ่มต้น"; + Text[ czech ] = "Výchozí"; + Text[ hebrew ] = "ברירת מחדל"; + Text[ hindi ] = "अनुपस्थिति"; + Text[ slovak ] = "Východzie"; +}; + + +String STR_OPEN_DOCUMENT +{ + Text = "Dokument laden" ; + Text [ ENGLISH ] = "Open document" ; + Text [ norwegian ] = "Open document" ; + Text [ italian ] = "Apri documento" ; + Text [ portuguese_brazilian ] = "Carregar documento" ; + Text [ portuguese ] = "Carregar documento" ; + Text [ english_us ] = "Load document" ; + Text [ finnish ] = "Lataa asiakirja" ; + Text [ danish ] = "Indls dokument" ; + Text [ french ] = "Charger un document" ; + Text [ swedish ] = "Ladda dokument" ; + Text [ dutch ] = "Document laden" ; + Text [ spanish ] = "Cargar documento" ; + Text[ chinese_simplified ] = "装入文档"; + Text[ russian ] = " "; + Text[ polish ] = "aduj dokument"; + Text[ japanese ] = "ドキュメントを読み込む"; + Text[ chinese_traditional ] = "載入文件"; + Text[ arabic ] = " "; + Text[ greek ] = " "; + Text[ korean ] = "문서 로드"; + Text[ turkish ] = "Belge ykle"; + Text[ catalan ] = "Carrega el document"; + Text[ thai ] = "โหลดเอกสาร"; + Text[ czech ] = "Načíst dokument"; + Text[ hebrew ] = "טעינת מסמך"; + Text[ hindi ] = "Load document"; + Text[ slovak ] = "Načítavam dokument"; +}; +String STR_SAVE_DOCUMENT +{ + Text[ italian ] = "Salva documento"; + Text[ portuguese_brazilian ] = "Salvar documento"; + Text[ portuguese ] = "Guardar documento"; + Text[ danish ] = "Gem dokument"; + Text[ french ] = "Enregistrer le document"; + Text[ swedish ] = "Spara dokument"; + Text[ dutch ] = "Document opslaan"; + Text[ spanish ] = "Guardar documento"; + Text[ english_us ] = "Save document"; + Text[ chinese_simplified ] = "存盘文档"; + Text[ russian ] = " "; + Text[ polish ] = "Zapisz dokument"; + Text[ japanese ] = "ドキュメントの保存"; + Text[ chinese_traditional ] = "儲存文件"; + Text[ arabic ] = " "; + Text = "Dokument speichern" ; + Text [ ENGLISH ] = "Save document" ; + Text [ norwegian ] = "Save document" ; + Text [ italian ] = "Salva documento" ; + Text [ portuguese_brazilian ] = "Salvar documento" ; + Text [ portuguese ] = "Guardar documento" ; + Text [ english_us ] = "Save document" ; + Text [ finnish ] = "Tallenna asiakirja" ; + Text [ danish ] = "Gem dokument" ; + Text [ french ] = "Enregistrer le document" ; + Text [ swedish ] = "Spara dokument" ; + Text [ dutch ] = "Document opslaan" ; + Text [ spanish ] = "Guardar documento" ; + Text = "Dokument speichern" ; + Text[ greek ] = " "; + Text[ korean ] = "문서 저장"; + Text[ turkish ] = "Belgeyi kaydet"; + Text[ catalan ] = "Desa el document"; + Text[ thai ] = "บันทึกเอกสาร"; + Text[ czech ] = "uložit dokument"; + Text[ hebrew ] = "Dokument speichern"; + Text[ hindi ] = "लेखपत्र संचित करो"; + Text[ slovak ] = "Ukladám dokument"; +}; +String STR_ACTION_NOTPOSSIBLE +{ + Text = "Die Funktion kann mit den selektierten \nObjekten nicht ausgefhrt werden." ; + Text [ ENGLISH ] = "Action could not completed with selected objects." ; + Text [ norwegian ] = "Action could not completed with selected objects." ; + Text [ italian ] = "La funzione non pu essere eseguita con l'oggetto scelto" ; + Text [ portuguese_brazilian ] = "Esta funo no pode ser completada com os objetos selecionados." ; + Text [ portuguese ] = "Esta funo no pode ser executada \n com os objectos seleccionados." ; + Text [ finnish ] = "Tt toimintoa ei voi kytt valittujen objektien kanssa." ; + Text [ danish ] = "Denne funktion kan ikke udfres \nmed de markerede objekter." ; + Text [ french ] = "La fonction ne peut tre excute avec les objets slectionns." ; + Text [ swedish ] = "Funktionen kan inte utfras med \nde markerade objekten" ; + Text [ dutch ] = "Deze functie kan met de gekozen\nobjecten niet worden voltooid." ; + Text [ spanish ] = "No es posible ejecutar la accin\ncon los objetos seleccionados." ; + Text [ english_us ] = "This function cannot be completed with the selected objects." ; + Text[ chinese_simplified ] = "无法执行选中对象的功能。"; + Text[ russian ] = " \n ."; + Text[ polish ] = "Funkcja nie moe zosta wykonana \nz zaznaczonymi obiektami."; + Text[ japanese ] = "この機能は選択したオブジェクトでは\n実行できません。"; + Text[ chinese_traditional ] = "無法執行選取物件的功能。"; + Text[ arabic ] = " \n ."; + Text[ greek ] = " \n ."; + Text[ korean ] = "이 기능은 선택된 \n개체와 함께 실행될 수 없습니다."; + Text[ turkish ] = "Bu fonksiyon, seilen nesneler ile \nyrtlemez.."; + Text[ catalan ] = "No es pot executar l'acci\namb els objectes seleccionats."; + Text[ thai ] = "ไม่สามารถทำให้ฟังก์ชั่นนี้สมบูรณ์ด้วยวัตถุที่เลือก"; + Text[ czech ] = "Tato funkce nemůže být dokončena s vybranými objekty."; + Text[ hebrew ] = "Die Funktion kann mit den selektierten \nObjekten nicht ausgeführt werden."; + Text[ hindi ] = "इस फंक्शन् को चुने हुये वस्तुओं के सहित समाप्त नहीं कर सकते है ।"; + Text[ slovak ] = "Táto funkcia nemôže byť dokončená s vybranými objektami."; +}; +String STR_GRAPHIC +{ + Text = "Chart" ; + Text [ ENGLISH ] = "Chart" ; + Text [ norwegian ] = "Chart" ; + Text [ italian ] = "Diagramma" ; + Text [ portuguese_brazilian ] = "Grfico" ; + Text [ portuguese ] = "Chart" ; + Text [ french ] = "Diagramme" ; + Text [ dutch ] = "Chart" ; + Text [ spanish ] = "Diagrama" ; + Text [ danish ] = "Diagram" ; + Text [ swedish ] = "Chart" ; + Text [ finnish ] = "Kaavio" ; + Text [ english_us ] = "Chart" ; + Text[ chinese_simplified ] = "图表"; + Text[ russian ] = ""; + Text[ polish ] = "Wykres"; + Text[ japanese ] = "グラフ"; + Text[ chinese_traditional ] = "圖表"; + Text[ arabic ] = " "; + Text[ greek ] = ""; + Text[ korean ] = "차트"; + Text[ turkish ] = "ema"; + Text[ catalan ] = "Diagrama"; + Text[ thai ] = "แผนภูมิ"; + Text[ czech ] = "Graf"; + Text[ hebrew ] = "תרשים"; + Text[ hindi ] = "चार्ट"; + Text[ slovak ] = "Graf"; +}; +String STR_CHART_DOCUMENT +{ + Text = "Diagramm" ; + Text [ ENGLISH ] = "Chart" ; + Text [ english_us ] = "Chart" ; + Text [ dutch ] = "Diagram" ; + Text [ swedish ] = "Diagram" ; + Text [ danish ] = "Diagram" ; + Text [ italian ] = "Diagramma" ; + Text [ spanish ] = "Diagrama" ; + Text [ french ] = "Diagramme" ; + Text [ portuguese ] = "Grfico" ; + Text [ portuguese_brazilian ] = "Grfico" ; + Text[ chinese_simplified ] = "图表"; + Text[ russian ] = ""; + Text[ polish ] = "Wykres"; + Text[ japanese ] = "グラフ"; + Text[ chinese_traditional ] = "圖表"; + Text[ arabic ] = " "; + Text[ greek ] = ""; + Text[ korean ] = "차트"; + Text[ turkish ] = "ema"; + Text[ catalan ] = "Diagrama"; + Text[ finnish ] = "Kaavio"; + Text[ thai ] = "แผนภูมิ"; + Text[ czech ] = "Graf"; + Text[ hebrew ] = "תרשים"; + Text[ hindi ] = "चार्ट"; + Text[ slovak ] = "Graf"; +}; +String STR_CHART_DOCUMENT_FULLTYPE_60 +{ + Text = "%PRODUCTNAME %PRODUCTVERSION Diagramm" ; + Text [ ENGLISH ] = "StarOffice 6.0 Chart" ; + Text [ english_us ] = "%PRODUCTNAME %PRODUCTVERSION Chart" ; + Text [ dutch ] = "%PRODUCTNAME 6.0 Diagram" ; + Text [ swedish ] = "%PRODUCTNAME 6.0 Diagram" ; + Text [ danish ] = "%PRODUCTNAME 6.0-diagram" ; + Text [ italian ] = "%PRODUCTNAME 6.0 Diagramma" ; + Text [ spanish ] = "%PRODUCTNAME 6.0 Diagrama" ; + Text [ french ] = "%PRODUCTNAME 6.0 Diagramme" ; + Text [ portuguese ] = "%PRODUCTNAME 6.0 Grfico" ; + Text [ portuguese_brazilian ] = "%PRODUCTNAME 6.0 Chart" ; + Text[ chinese_simplified ] = "%PRODUCTNAME 6.0 图表"; + Text[ russian ] = " %PRODUCTNAME 6.0"; + Text[ polish ] = "%PRODUCTNAME 6.0 Chart"; + Text[ japanese ] = "%PRODUCTNAME 6.0 グラフ"; + Text[ chinese_traditional ] = "%PRODUCTNAME 6.0 圖表"; + Text[ arabic ] = " %PRODUCTNAME 6.0"; + Text[ greek ] = "%PRODUCTNAME 6.0 "; + Text[ korean ] = "%PRODUCTNAME 6.0 차트"; + Text[ turkish ] = "%PRODUCTNAME 6.0 izelgesi"; + Text[ catalan ] = "%PRODUCTNAME 6.0 Diagrama"; + Text[ finnish ] = "%PRODUCTNAME 6.0 Chart"; + Text[ thai ] = "แผนภูมิ%PRODUCTNAME 6.0 "; + Text[ czech ] = "%PRODUCTNAME 6.0 Graf"; + Text[ hebrew ] = "%PRODUCTNAME 6.0 Diagramm"; + Text[ hindi ] = "%PRODUCTNAME 6.0 चार्ट"; + Text[ slovak ] = "%PRODUCTNAME 6.0 Graf"; +}; +String STR_CHART_DOCUMENT_FULLTYPE_50 +{ + Text = "%PRODUCTNAME 5.0 Diagramm" ; + Text [ ENGLISH ] = "StarOffice 5.0 Chart" ; + Text [ english_us ] = "%PRODUCTNAME 5.0 Chart" ; + Text [ dutch ] = "%PRODUCTNAME 5.0 diagram" ; + Text [ swedish ] = "%PRODUCTNAME 5.0 Diagram" ; + Text [ danish ] = "%PRODUCTNAME 5.0 diagram" ; + Text [ italian ] = "Diagramma %PRODUCTNAME 5.0" ; + Text [ spanish ] = "%PRODUCTNAME 5.0 Diagrama" ; + Text [ french ] = "%PRODUCTNAME 5.0 Diagramme" ; + Text [ portuguese ] = "Grfico (%PRODUCTNAME 5.0)" ; + Text [ portuguese_brazilian ] = "%PRODUCTNAME 5.0 Chart" ; + Text[ chinese_simplified ] = "%PRODUCTNAME 5.0 图表"; + Text[ russian ] = " %PRODUCTNAME 5.0"; + Text[ polish ] = "%PRODUCTNAME 5.0 Chart"; + Text[ japanese ] = "%PRODUCTNAME 5.0 グラフ"; + Text[ chinese_traditional ] = "%PRODUCTNAME 5.0 圖表"; + Text[ arabic ] = " %PRODUCTNAME 5.0"; + Text[ greek ] = " (%PRODUCTNAME 5.0)"; + Text[ korean ] = "%PRODUCTNAME 5.0 차트"; + Text[ turkish ] = "%PRODUCTNAME 5.0 emas"; + Text[ catalan ] = "%PRODUCTNAME 5.0 Diagrama"; + Text[ finnish ] = "%PRODUCTNAME 5.0 Chart"; + Text[ thai ] = "แผนภูมิ%PRODUCTNAME 5.0 "; + Text[ czech ] = "%PRODUCTNAME 5.0 Graf"; + Text[ hebrew ] = "%PRODUCTNAME 5.0 Diagramm"; + Text[ hindi ] = "%PRODUCTNAME 5.0 चार्ट"; + Text[ slovak ] = "%PRODUCTNAME 5.0 Graf"; +}; +String STR_CHART_DOCUMENT_FULLTYPE_40 +{ + Text = "%PRODUCTNAME 4.0 Diagramm" ; + Text [ ENGLISH ] = "StarOffice 4.0 Chart" ; + Text [ english_us ] = "%PRODUCTNAME 4.0 Chart" ; + Text [ dutch ] = "%PRODUCTNAME 4.0 diagram" ; + Text [ swedish ] = "%PRODUCTNAME 4.0 Diagram" ; + Text [ danish ] = "%PRODUCTNAME 4.0 diagram" ; + Text [ italian ] = "Diagramma %PRODUCTNAME 4.0" ; + Text [ spanish ] = "%PRODUCTNAME 4.0 Diagrama" ; + Text [ french ] = "%PRODUCTNAME 4.0 Diagramme" ; + Text [ portuguese ] = "Grfico (%PRODUCTNAME 4.0)" ; + Text [ portuguese_brazilian ] = "%PRODUCTNAME 4.0 Chart" ; + Text[ chinese_simplified ] = "%PRODUCTNAME 4.0 图表"; + Text[ russian ] = " %PRODUCTNAME 4.0"; + Text[ polish ] = "%PRODUCTNAME 4.0 Chart"; + Text[ japanese ] = "%PRODUCTNAME 4.0 グラフ"; + Text[ chinese_traditional ] = "%PRODUCTNAME 4.0 圖表"; + Text[ arabic ] = " %PRODUCTNAME 4.0"; + Text[ greek ] = " (%PRODUCTNAME 4.0)"; + Text[ korean ] = "%PRODUCTNAME 4.0 차트"; + Text[ turkish ] = "%PRODUCTNAME 4.0 emas"; + Text[ catalan ] = "%PRODUCTNAME 4.0 Diagrama"; + Text[ finnish ] = "%PRODUCTNAME 4.0 Chart"; + Text[ thai ] = "แผนภูมิ%PRODUCTNAME 4.0 "; + Text[ czech ] = "%PRODUCTNAME 4.0 Graf"; + Text[ hebrew ] = "%PRODUCTNAME 4.0 Diagramm"; + Text[ hindi ] = "%PRODUCTNAME 4.0 चार्ट"; + Text[ slovak ] = "%PRODUCTNAME 4.0 Graf"; +}; +String STR_CHART_DOCUMENT_FULLTYPE_31 +{ + Text = "%PRODUCTNAME 3.0 Diagramm" ; + Text [ ENGLISH ] = "StarOffice 3.0 Chart" ; + Text [ english_us ] = "%PRODUCTNAME 3.0 Chart" ; + Text [ dutch ] = "%PRODUCTNAME 3.0 diagram" ; + Text [ swedish ] = "%PRODUCTNAME 3.0 Diagram" ; + Text [ danish ] = "%PRODUCTNAME 3.0 diagram" ; + Text [ italian ] = "Diagramma %PRODUCTNAME 3.0" ; + Text [ spanish ] = "%PRODUCTNAME 3.0 Diagrama" ; + Text [ french ] = "%PRODUCTNAME 3.0 Diagramme" ; + Text [ portuguese ] = "Grfico (%PRODUCTNAME 3.0)" ; + Text [ portuguese_brazilian ] = "%PRODUCTNAME 3.0 Chart" ; + Text[ chinese_simplified ] = "%PRODUCTNAME 3.0 图表"; + Text[ russian ] = " %PRODUCTNAME 3.0"; + Text[ polish ] = "%PRODUCTNAME 3.0 Chart"; + Text[ japanese ] = "%PRODUCTNAME 3.0 グラフ"; + Text[ chinese_traditional ] = "%PRODUCTNAME 3.0 圖表"; + Text[ arabic ] = " %PRODUCTNAME 3.0"; + Text[ greek ] = " (%PRODUCTNAME 3.0)"; + Text[ korean ] = "%PRODUCTNAME 3.0 차트"; + Text[ turkish ] = "%PRODUCTNAME 3.0 emas"; + Text[ catalan ] = "%PRODUCTNAME 3.0 Diagrama"; + Text[ finnish ] = "%PRODUCTNAME 3.0 Chart"; + Text[ thai ] = "แผนภูมิ%PRODUCTNAME 3.0 "; + Text[ czech ] = "%PRODUCTNAME 3.0 Graf"; + Text[ hebrew ] = "%PRODUCTNAME 3.0 Diagramm"; + Text[ hindi ] = "%PRODUCTNAME 3.0 चार्ट"; + Text[ slovak ] = "%PRODUCTNAME 3.0 Graf"; +}; +String STR_BAD_PASSWORD_OR_FILE_CORRUPTED +{ + Text = "Das Kennwort ist falsch oder die Datei beschdigt." ; + Text [ ENGLISH ] = "The password is wrong or the file is corrupted." ; + Text [ norwegian ] = "The password is wrong or the file is corrupted." ; + Text [ italian ] = "La password errata o il file danneggiato." ; + Text [ portuguese_brazilian ] = "A senha invalida ou o arquivo est corrompido." ; + Text [ portuguese ] = "Ou a senha est incorrecta ou o ficheiro danificado." ; + Text [ french ] = "Le mot de passe est incorrect ou le fichier est dfectueux." ; + Text [ dutch ] = "Het wachtwoord is niet juist of het bestand is beschadigd" ; + Text [ spanish ] = "La contrasea no es vlida o el archivo est daado." ; + Text [ danish ] = "Adgangskoden er forkert eller filen er beskadiget." ; + Text [ swedish ] = "Lsenordet r felaktigt eller filen skadad." ; + Text [ finnish ] = "Salasana on virheellinen tai tiedosto on vahingoittunut." ; + Text [ english_us ] = "The password is incorrect or the file is damaged." ; + Text[ chinese_simplified ] = "无效的密码或文件已经被损坏。"; + Text[ russian ] = " ."; + Text[ polish ] = "Nieprawidowe haso lub uszkodzony plik."; + Text[ japanese ] = "パスワードが間違っているか、またはファイルに問題があります。"; + Text[ chinese_traditional ] = "無效的密碼或檔案已經被損壞。"; + Text[ arabic ] = " ."; + Text[ greek ] = " ."; + Text[ korean ] = "암호가 틀리거나 파일이 손상되었습니다."; + Text[ turkish ] = "ifre yanl veya dosya zarar grm."; + Text[ catalan ] = "La contrasenya no s correcta o el fitxer est danyat."; + Text[ thai ] = "รหัสผ่านไม่ถูกต้องหรือแฟ้มเสียหาย"; + Text[ czech ] = "Heslo je neplatné nebo soubor je poškozen."; + Text[ hebrew ] = "Das Kennwort ist falsch oder die Datei beschädigt."; + Text[ hindi ] = "The password is incorrect or the file is damaged."; + Text[ slovak ] = "Heslo je nesprávne alebo je poškodený súbor."; +}; +String RID_PLUGINTOOLBOX +{ + Text = "PlugInleiste" ; + Text [ ENGLISH ] = "Plugin toolbox" ; + Text [ english_us ] = "Plug-in Bar" ; + Text [ italian ] = "Barra degli oggetti per i PlugIn" ; + Text [ spanish ] = "Barra de Plug-ins" ; + Text [ french ] = "Barre de Plug-ins" ; + Text [ dutch ] = "PlugIn-balk" ; + Text [ swedish ] = "Funktionslist fr plug-ins" ; + Text [ danish ] = "PlugInlinje" ; + Text [ portuguese_brazilian ] = "Barra de Plugins" ; + Text [ portuguese ] = "Barra de Plugins" ; + Text[ chinese_simplified ] = "Plug-In 栏"; + Text[ russian ] = " "; + Text[ polish ] = "Pasek wtyczek plug-in"; + Text[ japanese ] = "プラグインバー"; + Text[ chinese_traditional ] = "Plug-In 列"; + Text[ arabic ] = " Plug-In"; + Text[ greek ] = " "; + Text[ korean ] = "플러그인 모음"; + Text[ turkish ] = "Plug-In ubuu"; + Text[ catalan ] = "Barra de connectors"; + Text[ finnish ] = "Lisosapalkki"; + Text[ thai ] = "แถบปลั๊กอิน"; + Text[ czech ] = "Panel zásuvných modulů"; + Text[ hebrew ] = "PlugInleiste"; + Text[ hindi ] = "प्लग-इन् पट्टी"; + Text[ slovak ] = "Panel zásuvných modulov"; +}; + + +String STR_SURFACE +{ + Text = "Oberflchen" ; + Text [ ENGLISH ] = "Surface" ; + Text [ english_us ] = "Surfaces" ; + Text [ italian ] = "Superfici" ; + Text [ spanish ] = "Superficies" ; + Text [ french ] = "Superficies" ; + Text [ dutch ] = "Vlakken" ; + Text [ swedish ] = "Ytor" ; + Text [ danish ] = "Overflader" ; + Text [ portuguese ] = "Superfcies" ; + Text [ portuguese_brazilian ] = "Superfcies" ; + Text[ chinese_simplified ] = "平面"; + Text[ russian ] = ""; + Text[ polish ] = "Powierzchnie"; + Text[ japanese ] = "表面"; + Text[ chinese_traditional ] = "平面"; + Text[ arabic ] = ""; + Text[ greek ] = ""; + Text[ korean ] = "표면"; + Text[ turkish ] = "Yzey"; + Text[ catalan ] = "Superficies"; + Text[ finnish ] = "Pinnat"; + Text[ thai ] = "พื้นผิว"; + Text[ czech ] = "Povrchy"; + Text[ hebrew ] = "Oberflächen"; + Text[ hindi ] = "सतह"; + Text[ slovak ] = "Povrchy"; +}; + + +String STR_STATISTICS_IN_LEGEND +{ + // comment + Text[ language_user1 ] = "BM: This determines how a statistics string (STR_REGRESSION_...) appears in the legend, e.g. in german \"Lineare Regression, Spalte 3\" will appear for \"$(STATTYP), $(ROWNAME)\""; + // comment + Text = "$(STATTYP), $(ROWNAME)"; + Text [ ENGLISH ] = "$(STATTYP), $(ROWNAME)" ; + Text [ english_us ] = "$(STATTYP), $(ROWNAME) " ; + Text [ italian ] = "$(STATTYP), $(ROWNAME)" ; + Text [ spanish ] = "$(STATTYP), $(ROWNAME)" ; + Text [ french ] = "$(STATTYP), $(ROWNAME)" ; + Text [ dutch ] = "$(STATTYP), $(ROWNAME)" ; + Text [ swedish ] = "$(STATTYP), $(ROWNAME)" ; + Text [ danish ] = "$(STATTYP), $(ROWNAME)" ; + Text [ portuguese ] = "$(STATTYP), $(ROWNAME)" ; + Text [ portuguese_brazilian ] = "$(STATTYP), $(ROWNAME)" ; + Text[ chinese_simplified ] = "$(STATTYP), $(ROWNAME)"; + Text[ russian ] = "$(STATTYP), $(ROWNAME)"; + Text[ polish ] = "$(STATTYP), $(ROWNAME)"; + Text[ japanese ] = "$(STATTYP)、$(ROWNAME)"; + Text[ chinese_traditional ] = "$(STATTYP), $(ROWNAME)"; + Text[ arabic ] = "$(STATTYP), $(ROWNAME)"; + Text[ greek ] = "$(STATTYP), $(ROWNAME)"; + Text[ korean ] = "$(STATTYP), $(ROWNAME)"; + Text[ turkish ] = "$(STATTYP), $(ROWNAME)"; + Text[ catalan ] = "$(STATTYP), $(ROWNAME) "; + Text[ finnish ] = "$(STATTYP), $(ROWNAME) "; + Text[ thai ] = "$(STATTYP), $(ROWNAME) "; + Text[ czech ] = "$(STATTYP), $(ROWNAME) "; + Text[ hebrew ] = "$(STATTYP), $(ROWNAME) "; + Text[ hindi ] = "$(STATTYP), $(ROWNAME) "; + Text[ slovak ] = "$(STATTYP), $(ROWNAME) "; +}; + +String STR_UNDO_SCALE +{ + Text = "Texte skalieren" ; + Text [ ENGLISH ] = "Scale Text" ; + Text [ english_us ] = "Scale Text" ; + Text [ italian ] = "Scala testi" ; + Text [ spanish ] = "Redimensionar texto" ; + Text [ french ] = "Redimensionner les textes" ; + Text [ dutch ] = "Teksten op schaal brengen" ; + Text [ swedish ] = "Skala texter" ; + Text [ danish ] = "Skaler tekst" ; + Text [ portuguese ] = "Redimensionar textos" ; + Text [ portuguese_brazilian ] = "Escalonar o Texto" ; + Text[ chinese_simplified ] = "采用文字显示比例"; + Text[ russian ] = " "; + Text[ polish ] = "Skaluj tekst"; + Text[ japanese ] = "テキストのスケール"; + Text[ chinese_traditional ] = "使用文字顯示比例"; + Text[ arabic ] = " "; + Text[ greek ] = " "; + Text[ korean ] = "텍스트 배율 조정"; + Text[ turkish ] = "Metin leklendir"; + Text[ catalan ] = "Redimensiona el text"; + Text[ finnish ] = "Skaalaa teksti"; + Text[ thai ] = "สเกลข้อความ"; + Text[ czech ] = "Škálovat text"; + Text[ hebrew ] = "Texte skalieren"; + Text[ hindi ] = "स्केल् टेक्स्ट"; + Text[ slovak ] = "Upraviť mierku textu"; +}; +String STR_QUERY_SORT +{ + Text = "Die Werte fr die X-Achse mssen sortiert vorliegen\nMit Sortierung fortfahren ?" ; + Text [ ENGLISH ] = "Values on X-axis should be sorted.\nContinue sorted ?" ; + Text [ dutch ] = "De waarden voor de X-as moeten gesorteerd zijn.\nSorteren?" ; + Text [ english_us ] = "X axis values must be sorted.\nSort them now?" ; + Text [ italian ] = "I valori dell'asse X devono essere ordinati.\nIniziare ad ordinare ?" ; + Text [ spanish ] = "Los valores del eje x tienen que ser organizados.\nDesea continuar con la organizacin?" ; + Text [ french ] = "Les valeurs pour l'axe X doivent tre tries. \nPoursuivre le tri ?" ; + Text [ swedish ] = "Vrdena fr X-axeln mste vara sorterade.\nVill du fortstta att sortera?" ; + Text [ danish ] = "X-aksens vrdier skal vre sorteret\nVil du sortere dem nu?" ; + Text [ portuguese ] = "Os valores para o eixo X tm de estar ordenados\n Comear a ordenar?" ; + Text [ portuguese_brazilian ] = "Os valores para o eixo X devem ser ordenados\n Orden-los agora?" ; + Text[ chinese_simplified ] = "X 轴数值必须是排序好的。\n要现在排序?"; + Text[ russian ] = " X \n?"; + Text[ polish ] = "Wartoci na osi X musz zosta posortowane.\nCzy zrobi to teraz?"; + Text[ japanese ] = "X軸の数値を並べ替える必要があります\n並べ替えますか?"; + Text[ chinese_traditional ] = "X-軸必須是排序好的。\n現在要排序?"; + Text[ arabic ] = " .\n "; + Text[ greek ] = " X .\n ;"; + Text[ korean ] = "X 축 값을 정렬해야 합니다.\n지금 정렬하시겠습니까?"; + Text[ turkish ] = "X ekseni deerleri sralanm olmaldr\nSralamaya devam edilsin mi ?"; + Text[ catalan ] = "Els valors de l'eix X s'han d'ordenar.\\Voleu ordenar-los ara?"; + Text[ finnish ] = "X-akselin arvot on lajiteltava.\nLajitellaanko nyt?"; + Text[ thai ] = "เรียงค่าแกนX \nเรียงเดี๋ยวนี้หรือไม่?"; + Text[ czech ] = "Hodnoty osy X musí být seřazeny.\nSeřadit nyní?"; + Text[ hebrew ] = "Die Werte für die X-Achse müssen sortiert vorliegen\nMit Sortierung fortfahren ?"; + Text[ hindi ] = "X अक्ष के मूल्यों को सोर्ट करना चाहिए ।\nअभी सोर्ट करना चाहते है?"; + Text[ slovak ] = "Hodnoty na osi X musia byť zoradené.\nZoradiť ich teraz?"; +}; +String STR_UNDO_REMOVEPOINTATTRS +{ + Text = "Datenpunkt-Attribute entfernen" ; + Text [ ENGLISH ] = "Remove data point attributes" ; + Text [ english_us ] = "Remove data point attributes" ; + Text [ italian ] = "Elimina attributi del punto dati" ; + Text [ spanish ] = "Borrar atributos del punto de datos" ; + Text [ french ] = "Supprimer des attributs de point de donnes" ; + Text [ dutch ] = "Gegevenspunt-attributen verwijderen" ; + Text [ swedish ] = "Ta bort datapunktattribut" ; + Text [ danish ] = "Fjern datapunktattributter" ; + Text [ portuguese ] = "Remover atributos do ponto de dados" ; + Text [ portuguese_brazilian ] = "Remover atributos do ponto de dados" ; + Text[ chinese_simplified ] = "删除数据点属性"; + Text[ russian ] = " "; + Text[ polish ] = "Usu atrybuty punktu danych"; + Text[ japanese ] = "データポイントの属性を解除"; + Text[ chinese_traditional ] = "刪除資料點屬性"; + Text[ arabic ] = " "; + Text[ greek ] = " "; + Text[ korean ] = "데이터 포인터 속성 제거"; + Text[ turkish ] = "Veri noktas zniteliklerini kaldr"; + Text[ catalan ] = "Suprimeix els atributs del punt de dades"; + Text[ finnish ] = "Poista arvopisteiden mritteet"; + Text[ thai ] = "เอาคุณลักษณะจุดข้อมูลออก"; + Text[ czech ] = "Odstranit atributy datového bodu"; + Text[ hebrew ] = "Datenpunkt-Attribute entfernen"; + Text[ hindi ] = "ड़ॉटा बिन्दुओं के ऍट्रिब्यूटों को हटाओ"; + Text[ slovak ] = "Odstrániť atribúty dátového bodu"; +}; +String STR_APPNAME +{ + Text = "StarChart" ; + Text [ ENGLISH ] = "StarChart" ; + Text [ english_us ] = "%PRODUCTNAME Chart" ; + Text [ dutch ] = "%PRODUCTNAME Chart" ; + Text [ swedish ] = "%PRODUCTNAME Chart" ; + Text [ danish ] = "%PRODUCTNAME Chart" ; + Text [ italian ] = "%PRODUCTNAME Chart" ; + Text [ spanish ] = "%PRODUCTNAME Chart" ; + Text [ french ] = "%PRODUCTNAME Chart" ; + Text [ portuguese ] = "%PRODUCTNAME Chart" ; + Text [ portuguese_brazilian ] = "%PRODUCTNAME Chart" ; + Text[ chinese_simplified ] = "%PRODUCTNAME Chart"; + Text[ russian ] = " %PRODUCTNAME"; + Text[ polish ] = "%PRODUCTNAME Chart"; + Text[ japanese ] = "%PRODUCTNAME Chart"; + Text[ chinese_traditional ] = "%PRODUCTNAME Chart"; + Text[ arabic ] = "%PRODUCTNAME Chart"; + Text[ greek ] = "StarChart"; + Text[ korean ] = "StarChart"; + Text[ turkish ] = "%PRODUCTNAME Chart"; + Text[ catalan ] = "%PRODUCTNAME Chart"; + Text[ finnish ] = "%PRODUCTNAME Chart"; + Text[ thai ] = "แผนภูมิ%PRODUCTNAME "; + Text[ czech ] = "%PRODUCTNAME Graf"; + Text[ hebrew ] = "StarChart"; + Text[ hindi ] = "%PRODUCTNAME चार्ट"; + Text[ slovak ] = "%PRODUCTNAME Graf"; +}; + +String STR_UNDO_MOREBACK +{ + Text = "Datenreihe verschieben" ; + Text [ ENGLISH ] = "Move Datarow" ; + Text[ italian ] = "Sposta serie di dati"; + Text[ portuguese_brazilian ] = "Mover srie de dados"; + Text[ portuguese ] = "Mover srie de dados"; + Text[ danish ] = "Flyt dataserie"; + Text[ french ] = "Dplacer la srie de donnes"; + Text[ swedish ] = "Flytta dataserie"; + Text[ dutch ] = "Gegevensreeks verplaatsen"; + Text[ spanish ] = "Desplazar fila de datos"; + Text[ english_us ] = "Move data series"; + Text[ chinese_simplified ] = "移动数据组"; + Text[ russian ] = " "; + Text[ polish ] = "Przenie seri danych"; + Text[ japanese ] = "データ系列の移動"; + Text[ chinese_traditional ] = "移動資料欄"; + Text[ arabic ] = " "; + Text[ greek ] = " "; + Text[ korean ] = "연속 데이터 이동"; + Text[ turkish ] = "Veri dizisi ta"; + Text[ catalan ] = "Mou la fila de dades"; + Text[ finnish ] = "Siirr tietojoukot"; + Text[ thai ] = "ย้ายชุดข้อมูล"; + Text[ czech ] = "Přesunout datovou řadu"; + Text[ hebrew ] = "Datenreihe verschieben"; + Text[ hindi ] = "डॉटा श्रृंखला का स्थानांतर करो"; + Text[ slovak ] = "Presunúť dátové rady"; +}; +String STR_UNDO_MOREFRONT +{ + Text = "Datenreihe verschieben" ; + Text [ ENGLISH ] = "Move Datarow" ; + Text[ italian ] = "Sposta serie di dati"; + Text[ portuguese_brazilian ] = "Mover srie de dados"; + Text[ portuguese ] = "Mover srie de dados"; + Text[ danish ] = "Flyt dataserie"; + Text[ french ] = "Dplacer la srie de donnes"; + Text[ swedish ] = "Flytta dataserie"; + Text[ dutch ] = "Gegevensreeks verplaatsen"; + Text[ spanish ] = "Desplazar fila de datos"; + Text[ english_us ] = "Move data series"; + Text[ chinese_simplified ] = "移动数据组"; + Text[ russian ] = " "; + Text[ polish ] = "Przenie seri danych"; + Text[ japanese ] = "データ系列の移動"; + Text[ chinese_traditional ] = "移動資料欄"; + Text[ arabic ] = " "; + Text[ greek ] = " "; + Text[ korean ] = "연속 데이터 이동"; + Text[ turkish ] = "Veri dizisi ta"; + Text[ catalan ] = "Mou la fila de dades"; + Text[ finnish ] = "Siirr tietojoukot"; + Text[ thai ] = "ย้ายชุดข้อมูล"; + Text[ czech ] = "Přesunout datovou řadu"; + Text[ hebrew ] = "Datenreihe verschieben"; + Text[ hindi ] = "डॉटा श्रृंखला का स्थानांतर करो"; + Text[ slovak ] = "Presunúť dátové rady"; +}; + +String STR_UNDO_DIAGRAM_STOCK_LOSS +{ + Text = "Negative Abweichung bearbeiten" ; + Text [ ENGLISH ] = "Modify negative deviation"; + Text[ italian ] = "Modifica deviazione negativa"; + Text[ portuguese_brazilian ] = "Editar desvio negativo"; + Text[ portuguese ] = "Modificar desvio negativo"; + Text[ danish ] = "Rediger negativ afvigelse"; + Text[ french ] = "diter la dviation ngative"; + Text[ swedish ] = "Redigera negativ avvikelse"; + Text[ dutch ] = "Negatieve deviatie bewerken"; + Text[ spanish ] = "Modificar desviacin negativa"; + Text[ english_us ] = "Edit negative deviation"; + Text[ chinese_simplified ] = "编辑负值偏差"; + Text[ russian ] = " "; + Text[ polish ] = "Edytuj odchylenie ujemne"; + Text[ japanese ] = "マイナス偏差の編集"; + Text[ chinese_traditional ] = "編輯負值偏差"; + Text[ arabic ] = " "; + Text[ greek ] = " "; + Text[ korean ] = "음수 편차 편집"; + Text[ turkish ] = "Negatif sapmay dzenle"; + Text[ catalan ] = "Modifica la desviaci negativa"; + Text[ finnish ] = "Muokkaa negatiivista poikkeamaa"; + Text[ thai ] = "แก้ไขการเบี่ยงเบนลบ"; + Text[ czech ] = "Upravit negativní odchylku"; + Text[ hebrew ] = "Negative Abweichung bearbeiten"; + Text[ hindi ] = "क्षयराशि अतिक्रम संपादन"; + Text[ slovak ] = "Upraviť zápornú odchýlku"; +}; +String STR_UNDO_DIAGRAM_STOCK_PLUS +{ + Text = "positive Abweichung bearbeiten" ; + Text [ ENGLISH ] = "Modify positive deviation"; + Text[ italian ] = "Modifica deviazione positiva"; + Text[ portuguese_brazilian ] = "Editar desvio positivo"; + Text[ portuguese ] = "Modificar desvio positivo"; + Text[ danish ] = "Rediger positiv afvigelse"; + Text[ french ] = "diter la dviation positive"; + Text[ swedish ] = "Redigera positiv avvikelse"; + Text[ dutch ] = "Positieve deviatie bewerken"; + Text[ spanish ] = "Editar la desviacin positiva"; + Text[ english_us ] = "Edit positive deviation"; + Text[ chinese_simplified ] = "编辑正值偏差"; + Text[ russian ] = " "; + Text[ polish ] = "Edytuj odchylenie dodatnie"; + Text[ japanese ] = "プラス偏差の編集"; + Text[ chinese_traditional ] = "編輯正值偏差"; + Text[ arabic ] = " "; + Text[ greek ] = " "; + Text[ korean ] = "양수 편차 편집"; + Text[ turkish ] = "Pozitif sapmay dzenle"; + Text[ catalan ] = "Modifica la desviaci positiva"; + Text[ finnish ] = "Muokkaa positiivista poikkeamaa"; + Text[ thai ] = "แก้ไขการเบี่ยงเบนบวก"; + Text[ czech ] = "Upravit pozitivní odchylku"; + Text[ hebrew ] = "positive Abweichung bearbeiten"; + Text[ hindi ] = "धनराशि अतिक्रम संपादन"; + Text[ slovak ] = "Upraviť kladnú odchýlku"; +}; +//----------------------------------- + + +String STR_UNDO_INSERT_SPECCHAR +{ + Text = "Sonderzeichen einfgen" ; + Text [ ENGLISH ] = "Insert special character" ; + Text [ english_us ] = "Insert special character" ; + Text [ italian ] = "Inserisci carattere speciale" ; + Text [ spanish ] = "Insertar smbolo" ; + Text [ french ] = "Insrer des caractres spciaux" ; + Text [ dutch ] = "Speciale tekens invoegen" ; + Text [ swedish ] = "Infoga specialtecken" ; + Text [ danish ] = "Indst specialtegn" ; + Text [ portuguese ] = "Inserir caracteres especiais" ; + Text [ portuguese_brazilian ] = "Inserir caracter especial" ; + Text[ chinese_simplified ] = "插入特殊字符"; + Text[ russian ] = " "; + Text[ polish ] = "Wstaw znak specjalny"; + Text[ japanese ] = "特殊文字の挿入"; + Text[ greek ] = " "; + Text[ korean ] = "특수 문자 삽입"; + Text[ chinese_traditional ] = "插入特殊字元"; + Text[ arabic ] = " "; + Text[ turkish ] = "zel karakter ekle"; + Text[ catalan ] = "Insereix smbol"; + Text[ finnish ] = "Lis erikoismerkki"; + Text[ thai ] = "แทรกตัวอักขระพิเศษ"; + Text[ czech ] = "Vložit zvláštní znak"; + Text[ hebrew ] = "Sonderzeichen einfügen"; + Text[ hindi ] = "विशेष अक्षर को जोड़ो"; + Text[ slovak ] = "Vložiť špeciálny znak"; +}; + +// some strings merged using arguments now + +String STR_STATUS_DATAPOINT_MARKED +{ + // this string is displayed in the status bar whenever a data point is selected + + Text = "Datenpunkt $(PT_NUM) in Reihe $(ROW_NUM) markiert, Wert: $(VALUE)"; + Text [ english_us ] = "Data Point $(PT_NUM) in row $(ROW_NUM) selected, value: $(VALUE)"; + Text[ portuguese ] = "Ponto de dados $(PT_NUM) na srie $(ROW_NUM) seleccionado, valor: $(VALUE)"; + Text[ russian ] = " $(PT_NUM) $(ROW_NUM) , : $(VALUE)"; + Text[ greek ] = " $(PT_NUM) $(ROW_NUM), : $(VALUE)"; + Text[ dutch ] = "Gegevenspunt $(PT_NUM) in rij $(ROW_NUM) gemarkeerd, waarde: $(VALUE)"; + Text[ french ] = "Point de donnes $(PT_NUM) dans la srie $(ROW_NUM) marqu, valeur : $(VALUE)"; + Text[ spanish ] = "Punto de datos $(PT_NUM) en fila $(ROW_NUM) seleccionado, valor: $(VALUE)"; + Text[ italian ] = "Punto dati $(PT_NUM) in serie $(ROW_NUM) selezionato, valore: $(VALUE)"; + Text[ danish ] = "Datapunkt $(PT_NUM) i serie $(ROW_NUM) markeret, vrdi: $(VALUE)"; + Text[ swedish ] = "Datapunkt $(PT_NUM) i serie $(ROW_NUM) markerad, vrde: $(VALUE)"; + Text[ polish ] = "Zaznaczono punkt danych $(PT_NUM) w wierszu $(ROW_NUM), warto: $(VALUE)"; + Text[ portuguese_brazilian ] = "Ponto de dados $(PT_NUM) na linha $(ROW_NUM) selecionado, valor: $(VALUE)"; + Text[ japanese ] = "系列$(ROW_NUM)のデータ ポイント$(PT_NUM)を選択、数値: $(VALUE)"; + Text[ korean ] = "열 $(ROW_NUM)의 데이터 포인트 $(PT_NUM) 표시됨, 값:$(VALUE)"; + Text[ chinese_simplified ] = "选中数据系列$(ROW_NUM)中的数据点$(PT_NUM),数值:$(VALUE)"; + Text[ chinese_traditional ] = "選取 $(ROW_NUM)欄的資料點 $(PT_NUM),數值:$(VALUE)"; + Text[ arabic ] = " $(PT_NUM) $(ROW_NUM) ɡ : $(VALUE)"; + Text[ turkish ] = "$(ROW_NUM) dizisindeki $(PT_NUM) veri noktas iaretlendi. Deeri: $(VALUE)"; + Text[ catalan ] = "S'ha seleccionat el punt de dades $(PT_NUM) de la fila $(ROW_NUM), valor: $(VALUE)"; + Text[ finnish ] = "Valittu arvopiste $(PT_NUM) rivilt $(ROW_NUM), arvo: $(VALUE)"; + Text[ thai ] = "เลือกจุดข้อมูล $(PT_NUM) ในแถว $(ROW_NUM) , ค่า: $(VALUE)"; + Text[ czech ] = "Byl zvolen datový bod $(PT_NUM) na řádku $(ROW_NUM), jehož hodnota je: $(VALUE)"; + Text[ hebrew ] = "Datenpunkt $(PT_NUM) in Reihe $(ROW_NUM) markiert, Wert: $(VALUE)"; + Text[ hindi ] = "पंक्ति $(ROW_NUM) में ड़ॉटा बिन्दु $(PT_NUM) को चुना है, मूल्य: $(VALUE)"; + Text[ slovak ] = "Dátový bod $(PT_NUM) na riadku $(ROW_NUM) vybraný, hodnota: $(VALUE)"; +}; + +String STR_QUICKHELP_DATAPOINT +{ + Text = "Datenpunkt $(PT_NUM), Reihe $(ROW_NUM), Wert: $(VALUE)"; + Text [ english_us ] = "Data Point $(PT_NUM), row $(ROW_NUM), value: $(VALUE)"; + Text[ portuguese ] = "Ponto de dados $(PT_NUM), srie $(ROW_NUM), valor: $(VALUE)"; + Text[ russian ] = " $(PT_NUM), $(ROW_NUM), : $(VALUE)"; + Text[ greek ] = " $(PT_NUM), $(ROW_NUM), : $(VALUE)"; + Text[ dutch ] = "Gegevenspunt $(PT_NUM), rij $(ROW_NUM), waarde: $(VALUE)"; + Text[ french ] = "Point de donnes $(PT_NUM), srie $(ROW_NUM), valeur : $(VALUE)"; + Text[ spanish ] = "Punto de dato $(PT_NUM), fila $(ROW_NUM), valor: $(VALUE)"; + Text[ italian ] = "Punto dati $(PT_NUM), serie $(ROW_NUM), valore: $(VALUE)"; + Text[ danish ] = "Datapunkt $(PT_NUM), serie $(ROW_NUM), vrdi: $(VALUE)"; + Text[ swedish ] = "Datapunkt $(PT_NUM), serie $(ROW_NUM), vrde: $(VALUE)"; + Text[ polish ] = "Punkt danych $(PT_NUM), wiersz $(ROW_NUM), warto: $(VALUE)"; + Text[ portuguese_brazilian ] = "Ponto de dados $(PT_NUM), linha $(ROW_NUM), valor: $(VALUE)"; + Text[ japanese ] = "データ ポイント$(PT_NUM)、系列$(ROW_NUM)、数値: $(VALUE)"; + Text[ korean ] = "열 $(ROW_NUM)의 데이터 포인트 $(PT_NUM), 값: $(VALUE)"; + Text[ chinese_simplified ] = "数据点$(PT_NUM),数据系列$(ROW_NUM),数值:$(VALUE)"; + Text[ chinese_traditional ] = "資料點 $(PT_NUM),欄 $(ROW_NUM),數值:$(VALUE)"; + Text[ arabic ] = " $(PT_NUM) $(ROW_NUM) : $(VALUE)"; + Text[ turkish ] = "$(ROW_NUM) dizisindeki $(PT_NUM) veri noktas iaretlendi. Deeri: $(VALUE)"; + Text[ catalan ] = "Punt de dades $(PT_NUM), fila $(ROW_NUM), valor: $(VALUE)"; + Text[ finnish ] = "Arvopiste $(PT_NUM), rivi $(ROW_NUM), arvo: $(VALUE)"; + Text[ thai ] = "จุดข้อมูล $(PT_NUM), แถว $(ROW_NUM), ค่า: $(VALUE)"; + Text[ czech ] = "Datový bod $(PT_NUM), řádek $(ROW_NUM), hodnota: $(VALUE)"; + Text[ hebrew ] = "Datenpunkt $(PT_NUM), Reihe $(ROW_NUM), Wert: $(VALUE)"; + Text[ hindi ] = "ड़ॉटा बिन्दु $(PT_NUM), पंक्ति $(ROW_NUM), मूल्य: $(VALUE)"; + Text[ slovak ] = "Dátový bod $(PT_NUM), riadok $(ROW_NUM), hodnota: $(VALUE)"; +}; + +String STR_BALLOONHELP_DATAPOINT +{ + // $(NEWLINE) begins a new line, $(PT_STR) and $(ROW_STR) are the + // row/column captions + + Text = "Datenpunkt $(PT_STR)$(NEWLINE)Reihe $(ROW_STR)$(NEWLINE)Wert: $(VALUE)"; + Text [ english_us ] = "Data Point $(PT_STR)$(NEWLINE)row $(ROW_STR)$(NEWLINE)value: $(VALUE)"; + Text[ portuguese ] = "Ponto de dados $(PT_STR)$(NEWLINE)srie $(ROW_STR)$(NEWLINE)valor: $(VALUE)"; + Text[ russian ] = " $(PT_STR)$(NEWLINE) $(ROW_STR)$(NEWLINE): $(VALUE)"; + Text[ greek ] = " $(PT_STR)$(NEWLINE) $(ROW_NUM): $(VALUE)"; + Text[ dutch ] = "Gegevenspunt $(PT_STR)$(NEWLINE)rij $(ROW_STR)$(NEWLINE)waarde: $(VALUE)"; + Text[ french ] = "Point de donnes $(PT_STR)$(NEWLINE)srie $(ROW_STR)$(NEWLINE)valeur : $(VALUE)"; + Text[ spanish ] = "Punto de dato $(PT_STR)$(NEWLINE)fila $(ROW_STR)$(NEWLINE)valor: $(VALUE)"; + Text[ italian ] = "Punto dati $(PT_STR)$(NEWLINE)serie $(ROW_STR)$(NEWLINE)valore: $(VALUE)"; + Text[ danish ] = "Datapunkt $(PT_STR)$(NEWLINE)serie $(ROW_STR)$(NEWLINE)vrdi: $(VALUE)"; + Text[ swedish ] = "Datapunkt $(PT_STR)$(NEWLINE)serie $(ROW_STR)$(NEWLINE)vrde: $(VALUE)"; + Text[ polish ] = "Punkt danych $(PT_STR)$(NEWLINE)wiersz $(ROW_STR)$(NEWLINE)warto: $(VALUE)"; + Text[ portuguese_brazilian ] = "Ponto de dados $(PT_STR)$(NEWLINE)linha $(ROW_STR)$(NEWLINE)valor: $(VALUE)"; + Text[ japanese ] = "データポイント$(PT_STR)$(NEWLINE)系列 $(ROW_STR)$(NEWLINE)数値: $(VALUE)"; + Text[ korean ] = "데이터 포인트 $(PT_STR)$(NEWLINE) 열 $(ROW_STR)$(NEWLINE) 값: $(VALUE)"; + Text[ chinese_simplified ] = "数据点$(PT_STR)$(NEWLINE)数据系列$(ROW_STR)$(NEWLINE)数值:$(VALUE)"; + Text[ chinese_traditional ] = "資料點 $(PT_STR)$(NEWLINE)欄$(ROW_STR)$(NEWLINE)數值:$(VALUE)"; + Text[ arabic ] = " $(PT_STR)$(NEWLINE) $(ROW_STR)$(NEWLINE): $(VALUE)"; + Text[ turkish ] = "Veri noktas $(PT_STR)$(NEWLINE)Dizi $(ROW_STR)$(NEWLINE)Deer: $(VALUE)"; + Text[ catalan ] = "Punt de dades $(PT_STR)$(NEWLINE)fila $(ROW_STR)$(NEWLINE)valor: $(VALUE)"; + Text[ finnish ] = "Arvopiste $(PT_STR)$(NEWLINE)rivi $(ROW_STR)$(NEWLINE)arvo: $(VALUE)"; + Text[ thai ] = "จุดข้อมูล $(PT_STR)$(NEWLINE)แถว $(ROW_STR)$(NEWLINE)ค่า: $(VALUE)"; + Text[ czech ] = "Datový bod $(PT_STR)$(NEWLINE)řádek $(ROW_STR)$(NEWLINE)hodnota: $(VALUE)"; + Text[ hebrew ] = "Datenpunkt $(PT_STR)$(NEWLINE)Reihe $(ROW_STR)$(NEWLINE)Wert: $(VALUE)"; + Text[ hindi ] = "Data Point $(PT_STR)$(NEWLINE)row $(ROW_STR)$(NEWLINE)value: $(VALUE)"; + Text[ slovak ] = "Dátový bod $(PT_STR)$(NEWLINE)riadok $(ROW_STR)$(NEWLINE)hodnota: $(VALUE)"; +}; + +// some more strings for QuickHelp + +String STR_AVERAGEVALUE +{ + Text = "Mittelwertlinie"; + Text [ english_us ] = "average value line"; + Text[ portuguese ] = "Linha de mdia"; + Text[ russian ] = " "; + Text[ greek ] = " "; + Text[ dutch ] = "Gemiddelde waarde lijn"; + Text[ french ] = "Ligne de moyenne"; + Text[ spanish ] = "Lnea de valor medio"; + Text[ italian ] = "Linea di valore medio"; + Text[ danish ] = "Middelvrdilinje"; + Text[ swedish ] = "Medelvrdeslinje"; + Text[ polish ] = "Linia redniej"; + Text[ portuguese_brazilian ] = "Linha de valor mdio"; + Text[ japanese ] = "平均値線"; + Text[ korean ] = "평균값 선"; + Text[ chinese_simplified ] = "平均值线"; + Text[ chinese_traditional ] = "平均值線"; + Text[ arabic ] = " "; + Text[ turkish ] = "Ortalama deer izgisi"; + Text[ catalan ] = "Lnia de promig"; + Text[ finnish ] = "rivin keskiarvo"; + Text[ thai ] = "บรรทัดค่าเฉลี่ย"; + Text[ czech ] = "čára průměru"; + Text[ hebrew ] = "Mittelwertlinie"; + Text[ hindi ] = "मध्यम मूल्य रेखा"; + Text[ slovak ] = "čiara priemernej hodnoty"; +}; + +String STR_DIAGRAM_ERROR +{ + Text = "Fehlerindikator"; + Text [ english_us ] = "error indicator"; + Text[ portuguese ] = "Indicador de erro"; + Text[ russian ] = " "; + Text[ greek ] = " "; + Text[ dutch ] = "Foutindicator"; + Text[ french ] = "Indicateur d'erreurs"; + Text[ spanish ] = "Indicador de error"; + Text[ italian ] = "Indicatore di errore"; + Text[ danish ] = "Fejlindikator"; + Text[ swedish ] = "Felindikator"; + Text[ polish ] = "Wskanik bdu"; + Text[ portuguese_brazilian ] = "indicador de erro"; + Text[ japanese ] = "誤差インジケータ"; + Text[ korean ] = "오류 표시기"; + Text[ chinese_simplified ] = "显示错误"; + Text[ chinese_traditional ] = "顯示錯誤"; + Text[ arabic ] = " "; + Text[ turkish ] = "Hata gstergesi"; + Text[ catalan ] = "indicador d'error"; + Text[ finnish ] = "virheilmaisin"; + Text[ thai ] = "ตัวบ่งชี้ผิดพลาด"; + Text[ czech ] = "chybový indikátor"; + Text[ hebrew ] = "Fehlerindikator"; + Text[ hindi ] = "गलत निदर्शक"; + Text[ slovak ] = "indikátor chýb"; +}; + +String STR_DIAGRAM_REGRESSION +{ + Text = "Regressionskurve"; + Text [ english_us ] = "regression curve"; + Text[ portuguese ] = "Curva regressiva"; + Text[ russian ] = " "; + Text[ greek ] = " "; + Text[ dutch ] = "Regressieboog"; + Text[ french ] = "Courbe de rgression"; + Text[ spanish ] = "Curva de regresin"; + Text[ italian ] = "Curva di regressione"; + Text[ danish ] = "Regressionskurve"; + Text[ swedish ] = "Regressionskurva"; + Text[ polish ] = "Krzywa regresji"; + Text[ portuguese_brazilian ] = "Curva de regresso"; + Text[ japanese ] = "回帰曲線"; + Text[ korean ] = "회귀 곡선"; + Text[ chinese_simplified ] = "回归曲线"; + Text[ chinese_traditional ] = "迴歸曲線"; + Text[ arabic ] = " "; + Text[ turkish ] = "Regresyon erisi"; + Text[ catalan ] = "Corba de regressi"; + Text[ finnish ] = "regressiokyr"; + Text[ thai ] = "เส้นโค้งถดถอย"; + Text[ czech ] = "regresní křivka"; + Text[ hebrew ] = "Regressionskurve"; + Text[ hindi ] = "रिग्रेश्यन वक्र"; + Text[ slovak ] = "regresná krivka"; +}; + +String STR_CFG_DEFAULT_COLORS +{ + Text = "Grundfarben"; + Text [ english_us ] = "Default colors"; + Text[ portuguese ] = "Cores padro"; + Text[ russian ] = " "; + Text[ greek ] = " "; + Text[ dutch ] = "Basiskleuren"; + Text[ french ] = "Couleurs par dfaut"; + Text[ spanish ] = "Colores predeterminados"; + Text[ italian ] = "Colori di base"; + Text[ danish ] = "Standardfarver"; + Text[ swedish ] = "Grundfrger"; + Text[ polish ] = "Kolory domylne"; + Text[ portuguese_brazilian ] = "Cores padro"; + Text[ japanese ] = "基本色"; + Text[ korean ] = "기본 색상"; + Text[ chinese_simplified ] = "基本色"; + Text[ chinese_traditional ] = "基色"; + Text[ arabic ] = " "; + Text[ turkish ] = "Temel renkler"; + Text[ catalan ] = "Colors per defecte"; + Text[ finnish ] = "Oletusvrit"; + Text[ thai ] = "ค่าสีเริ่มต้น"; + Text[ czech ] = "Výchozí barvy"; + Text[ hebrew ] = "Grundfarben"; + Text[ hindi ] = "अनुपस्थिति रंग"; + Text[ slovak ] = "Východzie farby"; +}; + +String STR_PIE_SEGMENT_EXPLODED +{ // shown in status bar. Parameter $(PERCENT) becomes a floating point number + Text = "Tortenstck $(PERCENT) Prozent explodiert"; + Text[ ENGLISH ] = "Pie exploded $(PERCENT) percent"; + Text[ english ] = "Pie exploded $(PERCENT) percent"; + Text[ english_us ] = "Pie exploded by $(PERCENT) percent"; + Text[ portuguese ] = "Sector explodiu a $(PERCENT) por cento"; + Text[ russian ] = " $(PERCENT) "; + Text[ greek ] = " $(PERCENT) "; + Text[ dutch ] = "Taartstuk $(PERCENT) percent gexplodeerd"; + Text[ french ] = "Secteur clat $(PERCENT) pour cent"; + Text[ spanish ] = "Sector separado: $(PERCENT) porciento "; + Text[ italian ] = "Settore esploso del $(PERCENT) percento"; + Text[ danish ] = "Lagkagestykke $(PERCENT) procent eksploderet"; + Text[ swedish ] = "Trtbit exploderat $(PERCENT) procent"; + Text[ polish ] = "Wykres koowy rozsunity o $(PERCENT) procent"; + Text[ portuguese_brazilian ] = "Pizza explodida em $(PERCENT) por cento"; + Text[ japanese ] = "切片を $(PERCENT)パーセント切り開く"; + Text[ korean ] = "케이크 조각$(PERCENT) 백분율 분할"; + Text[ chinese_simplified ] = "圆饼分裂成 $(PERCENT)(百分比)"; + Text[ chinese_traditional ] = "圓形分裂成 $(PERCENT)百分比"; + Text[ arabic ] = " $(PERCENT) "; + Text[ turkish ] = "Yzde oranlarna $(PERCENT) gre ayrlm pasta grafii"; + Text[ catalan ] = "El diagrama de sectors s'ha ampliat d'un $(PERCENT) per cent"; + Text[ finnish ] = "Kaavio-osuuden laajennus $(PERCENT) %"; + Text[ thai ] = "ทำให้พายแตกโดย $(PERCENT) เปอร์เซ็นต์"; + Text[ czech ] = "Koláč vytažený o $(PERCENT) procent"; + Text[ hebrew ] = "Tortenstück $(PERCENT) Prozent explodiert"; + Text[ hindi ] = "$(PERCENT) प्रतिशत वृतखण्ड फूट पड़ा है"; + Text[ slovak ] = "Koláč roztiahnutý o (PERCENT) percent"; +}; + +String STR_DIAGRAM_DATA_SAFETY_QUERY +{ + Text = "Die Daten wurden gendert.\Sollen die nderungen bernommen werden?" ; + Text[ English ] = "The data has been modified.\n Do you want to apply the changes?" ; + Text[ english_us ] = "Data has been changed.\n Do you want to apply the changes?" ; + Text[ portuguese ] = "Os dados foram modificados.\n Aplicar as modificaes?"; + Text[ russian ] = " .\n ?"; + Text[ greek ] = " .\n ;"; + Text[ dutch ] = "Gegevens zijn gewijzigd.\nWijzigingen overnemen?"; + Text[ french ] = "Les donnes ont t modifies.\nVoulez-vous appliquer les modifications ?"; + Text[ spanish ] = "Los datos han sido modificados.\n Desea aplicar las modificaciones?"; + Text[ italian ] = "I dati sono stai modificati.\\Volete applicare le modifiche?"; + Text[ danish ] = "Dataene er blevet ndret.\nSkal ndringerne overtages?"; + Text[ swedish ] = "Data har ndrats.\nSkall ndringarna vertas?"; + Text[ polish ] = "Dane zostay zmienione.\nCzy chcesz zastosowa zmiany?"; + Text[ portuguese_brazilian ] = "Os dados foram modificados.\n Aplicar as modificaes?"; + Text[ japanese ] = "データが変更されています。\n変更を適用しますか。"; + Text[ korean ] = "데이터가 변경되었습니다.\n 변경 내용을 적용하겠습니까?"; + Text[ chinese_simplified ] = "数据已经被更改。\n 要采用更改后的数据内容吗?"; + Text[ chinese_traditional ] = "資料已經變更。\n 接受變更的資料?"; + Text[ turkish ] = "Veri deitirildi.\n Deiiklikleri uygulamak ister misiniz?"; + Text[ arabic ] = " .\n ʿ"; + Text[ catalan ] = "Les dades han canviat.\n Voleu aplicar els canvis?"; + Text[ finnish ] = "Tietoja on muutettu.\nHaluatko ottaa muutokset kyttn?"; + Text[ thai ] = "ข้อมูลได้เปลี่ยนแปลงแล้ว.\n คุณต้องการใช้สิ่งที่เปลี่ยนแปลงหรือไม่?"; + Text[ czech ] = "Data byla změněna.\nChcete změny použít?"; + Text[ hebrew ] = "Die Daten wurden geändert.\\Sollen die Änderungen übernommen werden?"; + Text[ hindi ] = "ड़ॉटा को परिवर्तन किया गया है ।\n आप परिवर्तनों को लागू करना चाहते है ?"; + Text[ slovak ] = "Dáta sa zmenili.\nChcete použiť tieto zmeny?"; +}; + +String STR_UNDO_TRANSFORM +{ + Text = "%O transformieren" ; + Text [ ENGLISH ] = "Transform %O" ; + Text [ norwegian ] = "Omform %O" ; + Text [ italian ] = "Trasforma %O" ; + Text [ portuguese_brazilian ] = "Transformar %O" ; + Text [ portuguese ] = "Transformar %O" ; + Text [ finnish ] = "Muunna %O" ; + Text [ danish ] = "Transformer %O" ; + Text [ french ] = "Transformer %O" ; + Text [ swedish ] = "Omvandla %O" ; + Text [ dutch ] = "%O transformeren" ; + Text [ spanish ] = "Transformar %O" ; + Text [ english_us ] = "Transform %O" ; + Text[ chinese_simplified ] = "转换 %O"; + Text[ russian ] = " %O"; + Text[ polish ] = "Przekszta %O"; + Text[ japanese ] = "%Oを変換"; + Text[ chinese_traditional ] = "轉換 %O"; + Text[ arabic ] = " %O"; + Text[ dutch ] = "%O transformeren"; + Text[ chinese_simplified ] = "转换 %O"; + Text[ greek ] = " %O"; + Text[ korean ] = "%O 변형"; + Text[ turkish ] = "Dnm %O"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "Transformar %O"; + Text[ thai ] = "เปลี่ยนรูป %O"; + Text[ czech ] = "Transformuj %O"; + Text[ hebrew ] = "%O transformieren"; + Text[ hindi ] = "परिवर्तन %O"; + Text[ slovak ] = "Transformovať %O"; +}; + +String STR_UNDO_MOVE +//== svx STR_EditMove +{ + Text = "%O verschieben" ; + Text [ ENGLISH ] = "Move %O" ; + Text [ norwegian ] = "Flytt %O" ; + Text [ italian ] = "Sposta %O" ; + Text [ portuguese_brazilian ] = "Mover %O" ; + Text [ portuguese ] = "Mover %O" ; + Text [ finnish ] = "Siirr %O" ; + Text [ danish ] = "Flyt %O" ; + Text [ french ] = "Dplacer %O" ; + Text [ swedish ] = "Flytta %O" ; + Text [ dutch ] = "%O verplaatsen" ; + Text [ spanish ] = "Desplazar %O" ; + Text [ english_us ] = "Move %O" ; + Text[ chinese_simplified ] = "移动 %O"; + Text[ russian ] = " %O"; + Text[ polish ] = "Przenie %O"; + Text[ japanese ] = "%Oを移動"; + Text[ chinese_traditional ] = "移動 %O"; + Text[ arabic ] = " %O"; + Text[ dutch ] = "%O verplaatsen"; + Text[ chinese_simplified ] = "移动 %O"; + Text[ greek ] = " %O"; + Text[ korean ] = "%O 이동"; + Text[ turkish ] = "Ta %O"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "Desplazar %O"; + Text[ thai ] = "ย้าย %O"; + Text[ czech ] = "Posuň %O"; + Text[ hebrew ] = "%O verschieben"; + Text[ hindi ] = "%O को स्थान परिवर्तन करो"; + Text[ slovak ] = "Presunúť %O"; +}; + +String STR_UNDO_RESIZE +//== svx STR_EditResize +{ + Text = "Gre von %O ndern" ; + Text [ ENGLISH ] = "Resize %O" ; + Text [ norwegian ] = "Endre strrelse p %O" ; + Text [ italian ] = "Ridimensiona %O" ; + Text [ portuguese_brazilian ] = "Redimensionar %O" ; + Text [ portuguese ] = "Redimensionar %O" ; + Text [ finnish ] = "Muuta kohteen %O kokoa" ; + Text [ danish ] = "Modificer strrelse p %O" ; + Text [ french ] = "Redimensionner %O" ; + Text [ swedish ] = "Frndra storleken p %O" ; + Text [ dutch ] = "Grootte van %O wijzigen" ; + Text [ spanish ] = "Modificar el tamao de %O" ; + Text [ english_us ] = "Resize %O" ; + Text[ chinese_simplified ] = "更改 %O 大小"; + Text[ russian ] = " %O"; + Text[ polish ] = "Zmie rozmiar %O"; + Text[ japanese ] = "%Oのサイズを変更"; + Text[ chinese_traditional ] = "變更 %O 大小"; + Text[ arabic ] = " %O"; + Text[ dutch ] = "Grootte van %O wijzigen"; + Text[ chinese_simplified ] = "更改 %O 大小"; + Text[ greek ] = " %O"; + Text[ korean ] = "%O의 크기 변경"; + Text[ turkish ] = "%0 'yu yendein boyutlandr"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "Modificar tamao de %O"; + Text[ thai ] = "ปรับขนาด %O"; + Text[ czech ] = "Změň velikost %O"; + Text[ hebrew ] = "Größe von %O ändern"; + Text[ hindi ] = "%O को पुनः परिमाण दो"; + Text[ slovak ] = "Zmeniť veľkosť %O"; +}; + +String STR_UNDO_ROTATE +//== svx STR_EditRotate +{ + Text = "%O drehen" ; + Text [ ENGLISH ] = "Rotate %O" ; + Text [ norwegian ] = "Roter %O" ; + Text [ italian ] = "Ruota %O" ; + Text [ portuguese_brazilian ] = "Rotar %O" ; + Text [ portuguese ] = "Rodar %O" ; + Text [ finnish ] = "Kierr kohdetta %O" ; + Text [ danish ] = "Roter %O" ; + Text [ french ] = "Pivoter %O" ; + Text [ swedish ] = "Rotera %O" ; + Text [ dutch ] = "%O draaien" ; + Text [ spanish ] = "Rodar %O" ; + Text [ english_us ] = "Rotate %O" ; + Text[ chinese_simplified ] = "旋转 %O"; + Text[ russian ] = " %O"; + Text[ polish ] = "Obr %O"; + Text[ japanese ] = "%Oを回転"; + Text[ chinese_traditional ] = "旋轉 %O"; + Text[ arabic ] = " %O"; + Text[ dutch ] = "%O draaien"; + Text[ chinese_simplified ] = "旋转 %O"; + Text[ greek ] = " %O"; + Text[ korean ] = "%O 회전"; + Text[ turkish ] = "%O 'yu evir"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "Rodar %O"; + Text[ thai ] = "หมุน %O"; + Text[ czech ] = "Otoč %0"; + Text[ hebrew ] = "%O drehen"; + Text[ hindi ] = "%O को घुमाओ"; + Text[ slovak ] = "Otočiť %O"; +}; +*/ +//----------------------------------- diff --git a/chart2/source/controller/dialogs/Strings_ChartTypes.src b/chart2/source/controller/dialogs/Strings_ChartTypes.src new file mode 100644 index 000000000..eb14a6eea --- /dev/null +++ b/chart2/source/controller/dialogs/Strings_ChartTypes.src @@ -0,0 +1,1813 @@ +/************************************************************************* + * + * $RCSfile: Strings_ChartTypes.src,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:25 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "Strings.hrc" + +String STR_LINES +{ + Text = "Linien" ; + Text [ ENGLISH ] = "Lines" ; + Text [ norwegian ] = "Linjer" ; + Text [ italian ] = "Linee" ; + Text [ portuguese_brazilian ] = "Linhas" ; + Text [ portuguese ] = "Linhas" ; + Text [ finnish ] = "Rivit" ; + Text [ danish ] = "Linjer" ; + Text [ french ] = "Lignes" ; + Text [ swedish ] = "Linjer" ; + Text [ dutch ] = "Lijnen" ; + Text [ spanish ] = "Lneas" ; + Text [ english_us ] = "Lines" ; + Text[ chinese_simplified ] = "线条"; + Text[ russian ] = ""; + Text[ polish ] = "Linie"; + Text[ japanese ] = "折れ線"; + Text[ chinese_traditional ] = "線條"; + Text[ arabic ] = ""; + Text[ greek ] = ""; + Text[ korean ] = "선"; + Text[ turkish ] = "izgi"; + Text[ catalan ] = "Lnies"; + Text[ thai ] = "บรรทัด"; + Text[ czech ] = "Řádky"; + Text[ hebrew ] = "Linien"; + Text[ hindi ] = "Lines"; + Text[ slovak ] = "Čiarový graf"; +}; +String STR_COLUMNS +{ + Text = "Sulen" ; + Text [ ENGLISH ] = "Columns" ; + Text [ norwegian ] = "Kolonner" ; + Text [ italian ] = "Colonne" ; + Text [ portuguese_brazilian ] = "Colunas" ; + Text [ portuguese ] = "Barras" ; + Text [ finnish ] = "Pylvs" ; + Text [ danish ] = "Sjler" ; + Text [ french ] = "Colonnes" ; + Text [ swedish ] = "Staplar" ; + Text [ dutch ] = "kolommen" ; + Text [ spanish ] = "Columnas" ; + Text [ english_us ] = "Columns" ; + Text[ chinese_simplified ] = "柱"; + Text[ russian ] = ""; + Text[ polish ] = "Kolumny"; + Text[ japanese ] = "縦棒"; + Text[ chinese_traditional ] = "柱"; + Text[ arabic ] = ""; + Text[ greek ] = ""; + Text[ korean ] = "단"; + Text[ turkish ] = "Stun"; + Text[ catalan ] = "Columnes"; + Text[ thai ] = "คอลัมน์์"; + Text[ czech ] = "Sloupce"; + Text[ hebrew ] = "טורים"; + Text[ hindi ] = "स्तंभ"; + Text[ slovak ] = "Stĺpcový graf (zvisle)"; +}; +String STR_BARS +{ + Text = "Balken" ; + Text [ ENGLISH ] = "Bars" ; + Text [ norwegian ] = "Linjer" ; + Text [ italian ] = "Barre" ; + Text [ portuguese_brazilian ] = "Barras" ; + Text [ portuguese ] = "Barras" ; + Text [ finnish ] = "Palkit" ; + Text [ danish ] = "Liggende sjler" ; + Text [ french ] = "Barres" ; + Text [ swedish ] = "Liggande staplar" ; + Text [ dutch ] = "balken" ; + Text [ spanish ] = "Barras" ; + Text [ english_us ] = "Bars" ; + Text[ chinese_simplified ] = "条"; + Text[ russian ] = ""; + Text[ polish ] = "Supki"; + Text[ japanese ] = "横棒"; + Text[ language_user1 ] = ": - -"; + Text[ chinese_traditional ] = "條"; + Text[ arabic ] = ""; + Text[ greek ] = ""; + Text[ korean ] = "바"; + Text[ turkish ] = "ubuk"; + Text[ catalan ] = "Barres"; + Text[ thai ] = "แถบ"; + Text[ czech ] = "Sloupky"; + Text[ hebrew ] = "Balken"; + Text[ hindi ] = "पट्टी"; + Text[ slovak ] = "Stĺpcový graf (vodorovne)"; +}; +String STR_AREAS +{ + Text = "Flchen" ; + Text [ ENGLISH ] = "Areas" ; + Text [ norwegian ] = "Omrder" ; + Text [ italian ] = "Aree" ; + Text [ portuguese_brazilian ] = "reas" ; + Text [ portuguese ] = "reas" ; + Text [ finnish ] = "Alueet" ; + Text [ danish ] = "Omrder" ; + Text [ french ] = "Zones" ; + Text [ swedish ] = "Ytor" ; + Text [ dutch ] = "vlakken" ; + Text [ spanish ] = "reas" ; + Text [ english_us ] = "Areas" ; + Text[ chinese_simplified ] = "平面"; + Text[ russian ] = ""; + Text[ polish ] = "Obszary"; + Text[ japanese ] = "エリア"; + Text[ chinese_traditional ] = "平面"; + Text[ arabic ] = ""; + Text[ greek ] = ""; + Text[ korean ] = "면"; + Text[ turkish ] = "Yzey"; + Text[ catalan ] = "rees"; + Text[ thai ] = "พื้นที่"; + Text[ czech ] = "Oblasti"; + Text[ hebrew ] = "Flächen"; + Text[ hindi ] = "विस्तीर्ण"; + Text[ slovak ] = "Plošný graf"; +}; +String STR_CIRCLES +{ + Text = "Kreise" ; + Text [ ENGLISH ] = "Pies" ; + Text [ norwegian ] = "Sektorer" ; + Text [ italian ] = "Torta" ; + Text [ portuguese_brazilian ] = "Pizzas" ; + Text [ portuguese ] = "Sectores" ; + Text [ finnish ] = "Ympyrkaaviot" ; + Text [ danish ] = "Cirkler" ; + Text [ french ] = "Secteurs" ; + Text [ swedish ] = "Cirklar" ; + Text [ dutch ] = "cirkels" ; + Text [ spanish ] = "Crculos" ; + Text [ english_us ] = "Pies" ; + Text[ chinese_simplified ] = "圆"; + Text[ russian ] = ""; + Text[ polish ] = "Koa"; + Text[ japanese ] = "円"; + Text[ chinese_traditional ] = "圓"; + Text[ arabic ] = ""; + Text[ greek ] = ""; + Text[ korean ] = "원형"; + Text[ turkish ] = "Daire"; + Text[ catalan ] = "Diagrames de sectors"; + Text[ thai ] = "พาย"; + Text[ czech ] = "Koláčový"; + Text[ hebrew ] = "Kreise"; + Text[ hindi ] = "वृतखण्ड"; + Text[ slovak ] = "Koláčový graf"; +}; + +String STR_DONUT1 +{ + Text = "Ringe" ; + Text [ ENGLISH ] = "Rings" ; + Text [ norwegian ] = "Sektorer" ; + Text [ italian ] = "Anelli" ; + Text [ portuguese_brazilian ] = "Anis" ; + Text [ portuguese ] = "Anis" ; + Text [ finnish ] = "Renkaat" ; + Text [ danish ] = "Kranse" ; + Text [ french ] = "Anneaux" ; + Text [ swedish ] = "Ringar" ; + Text [ dutch ] = "ringen" ; + Text [ spanish ] = "Anillos" ; + Text [ english_us ] = "Rings" ; + Text[ chinese_simplified ] = "环"; + Text[ russian ] = ""; + Text[ polish ] = "Piercienie"; + Text[ japanese ] = "ドーナツ"; + Text[ chinese_traditional ] = "環"; + Text[ arabic ] = ""; + Text[ greek ] = ""; + Text[ korean ] = "링"; + Text[ turkish ] = "Halka"; + Text[ catalan ] = "Anells"; + Text[ thai ] = "วง"; + Text[ czech ] = "Kruhový"; + Text[ hebrew ] = "Ringe"; + Text[ hindi ] = "रिंग"; + Text[ slovak ] = "Prstencový graf"; +}; +/* +String STR_DONUT2 +{ + Text = "Ringe" ; + Text [ ENGLISH ] = "Rings" ; + Text [ norwegian ] = "Sektorer" ; + Text [ italian ] = "Anelli" ; + Text [ portuguese_brazilian ] = "Anis" ; + Text [ portuguese ] = "Anis" ; + Text [ finnish ] = "Renkaat" ; + Text [ danish ] = "Kranse" ; + Text [ french ] = "Anneaux" ; + Text [ swedish ] = "Ringar" ; + Text [ dutch ] = "ringen" ; + Text [ spanish ] = "Anillos" ; + Text [ english_us ] = "Rings" ; + Text[ chinese_simplified ] = "环"; + Text[ russian ] = ""; + Text[ polish ] = "Piercienie"; + Text[ japanese ] = "ドーナツ"; + Text[ chinese_traditional ] = "環"; + Text[ arabic ] = ""; + Text[ greek ] = ""; + Text[ korean ] = "링"; + Text[ turkish ] = "Halka"; + Text[ catalan ] = "Anells"; + Text[ thai ] = "วง"; + Text[ czech ] = "Kruhový"; + Text[ hebrew ] = "Ringe"; + Text[ hindi ] = "रिंग"; + Text[ slovak ] = "Prstencový graf"; +}; +*/ + +//----------------------------------------------------------------------------- + +String STR_NORMAL +{ + Text = "Normal" ; + Text [ ENGLISH ] = "Normal" ; + Text [ norwegian ] = "Normal" ; + Text [ italian ] = "Normale" ; + Text [ portuguese_brazilian ] = "Normal" ; + Text [ portuguese ] = "Normal" ; + Text [ french ] = "Normal" ; + Text [ dutch ] = "Normaal" ; + Text [ spanish ] = "Normal" ; + Text [ danish ] = "Normal" ; + Text [ swedish ] = "Normal" ; + Text [ finnish ] = "Normaali" ; + Text [ english_us ] = "Normal" ; + Text[ chinese_simplified ] = "一般"; + Text[ russian ] = ""; + Text[ polish ] = "Zwyky"; + Text[ japanese ] = "標準"; + Text[ chinese_traditional ] = "一般"; + Text[ arabic ] = ""; + Text[ greek ] = ""; + Text[ korean ] = "표준"; + Text[ turkish ] = "Normal"; + Text[ catalan ] = "Normal"; + Text[ thai ] = "ปกติ"; + Text[ czech ] = "Běžný"; + Text[ hebrew ] = "Normal"; + Text[ hindi ] = "नॉर्मल्"; + Text[ slovak ] = "Normálny graf"; +}; +String STR_STACKED +{ + Text = "Gestapelt" ; + Text [ ENGLISH ] = "Stacked" ; + Text [ norwegian ] = "Stablet" ; + Text [ italian ] = "Sovrapposto" ; + Text [ portuguese_brazilian ] = "Empilhado" ; + Text [ portuguese ] = "Empilhado" ; + Text [ french ] = "Empil" ; + Text [ dutch ] = "Gestapeld" ; + Text [ spanish ] = "En pilas" ; + Text [ danish ] = "Stablet" ; + Text [ swedish ] = "Staplat" ; + Text [ finnish ] = "Pinottuna" ; + Text [ english_us ] = "Stacked" ; + Text[ chinese_simplified ] = "重叠"; + Text[ russian ] = " "; + Text[ polish ] = "Skumulowany"; + Text[ japanese ] = "積み上げ"; + Text[ chinese_traditional ] = "重疊"; + Text[ arabic ] = ""; + Text[ greek ] = " "; + Text[ korean ] = "누적된"; + Text[ turkish ] = "Ylm"; + Text[ catalan ] = "Apilat"; + Text[ thai ] = "กองซ้อน"; + Text[ czech ] = "Skládaný"; + Text[ hebrew ] = "Gestapelt"; + Text[ hindi ] = "Stacked"; + Text[ slovak ] = "Skladaný graf"; +}; +String STR_PERCENT +{ + Text = "Prozent" ; + Text [ ENGLISH ] = "Percent" ; + Text [ norwegian ] = "Prosent" ; + Text [ italian ] = "Percentuale" ; + Text [ portuguese_brazilian ] = "Percentual" ; + Text [ portuguese ] = "Percentual" ; + Text [ french ] = "Pourcentage" ; + Text [ dutch ] = "Procent" ; + Text [ spanish ] = "Porcentaje" ; + Text [ danish ] = "Procent" ; + Text [ swedish ] = "Procent" ; + Text [ finnish ] = "Prosenttia" ; + Text [ english_us ] = "Percent" ; + Text[ chinese_simplified ] = "百分比"; + Text[ russian ] = ""; + Text[ polish ] = "Procent"; + Text[ japanese ] = "パーセント"; + Text[ chinese_traditional ] = "百分比"; + Text[ arabic ] = " "; + Text[ greek ] = " (%)"; + Text[ korean ] = "백분율"; + Text[ turkish ] = "Yzde"; + Text[ catalan ] = "Percentatge"; + Text[ thai ] = "เปอร์เซ็นต์"; + Text[ czech ] = "Procentuální"; + Text[ hebrew ] = "Prozent"; + Text[ hindi ] = "प्रतिशत"; + Text[ slovak ] = "Percentuálny graf"; +}; + +String STR_DEEP +{ + Text = "Tief" ; + Text [ ENGLISH ] = "Deep" ; + Text [ norwegian ] = "Deep" ; + Text [ italian ] = "In profondit" ; + Text [ portuguese_brazilian ] = "Profundo" ; + Text [ portuguese ] = "Fundo" ; + Text [ french ] = "Profond" ; + Text [ dutch ] = "met diepte" ; + Text [ spanish ] = "Profundidad" ; + Text [ danish ] = "Dyb" ; + Text [ swedish ] = "Djup" ; + Text [ finnish ] = "Syvyys" ; + Text [ english_us ] = "Deep" ; + Text[ chinese_simplified ] = "深度"; + Text[ russian ] = ""; + Text[ polish ] = "Gboki"; + Text[ japanese ] = "奥行きあり"; + Text[ chinese_traditional ] = "深度"; + Text[ arabic ] = ""; + Text[ greek ] = " "; + Text[ korean ] = "깊이"; + Text[ turkish ] = "Derin"; + Text[ catalan ] = "Profund"; + Text[ thai ] = "ลึก"; + Text[ czech ] = "Hloubka"; + Text[ hebrew ] = "Tief"; + Text[ hindi ] = "गहरा"; + Text[ slovak ] = "Hĺbkový graf"; +}; + +String STR_OFS +{ + // comment + Text[ language_user1 ] = "BM: Parameter $(N) is replaced by 1 or 2 for different offset types"; + // comment + Text = "Offset $(N)" ; + Text [ ENGLISH ] = "Offset $(N)" ; + Text [ english_us ] = "Offset $(N)" ; + Text [ italian ] = "Offset $(N)" ; + Text [ spanish ] = "Offset $(N)" ; + Text [ french ] = "Offset $(N)" ; + Text [ dutch ] = "Offset $(N)" ; + Text [ swedish ] = "Offset $(N)" ; + Text [ danish ] = "Offset $(N)" ; + Text [ portuguese ] = "Offset $(N)" ; + Text [ portuguese_brazilian ] = "Offset $(N)" ; + Text[ chinese_simplified ] = "偏移$(N)"; + Text[ russian ] = " $(N)"; + Text[ polish ] = "Przesunicie $(N)"; + Text[ japanese ] = "オフセット $(N)"; + Text[ chinese_traditional ] = "偏移 $(N)"; + Text[ arabic ] = " $(N)"; + Text[ greek ] = " $(N)"; + Text[ korean ] = "오프셋$(N)"; + Text[ turkish ] = "Ofset $(N)"; + Text[ catalan ] = "Offset $(N)"; + Text[ finnish ] = "Siirtym $(N)"; + Text[ thai ] = "ออฟเซต $(N)"; + Text[ czech ] = "Odchylka $(N)"; + Text[ hebrew ] = "Offset $(N)"; + Text[ hindi ] = "ऑफ़सेट् $(N)"; + Text[ slovak ] = "Ofsetový (oddelené koláče) $(N)"; +}; + +//----------------------------------------------------------------------------- +/* +String STR_LINESYMB +{ + Text = "Linien mit Symbolen" ; + Text [ ENGLISH ] = "Lines with symbols" ; + Text [ english_us ] = "Lines with Symbols" ; + Text [ italian ] = "Linee con simboli" ; + Text [ spanish ] = "Lneas con smbolos" ; + Text [ french ] = "Lignes avec symboles" ; + Text [ dutch ] = "Lijnen met symbolen" ; + Text [ swedish ] = "Linjer med symboler" ; + Text [ danish ] = "Linjer med mrker" ; + Text [ portuguese_brazilian ] = "Linhas com Smbolos" ; + Text [ portuguese ] = "Linhas com smbolos" ; + Text[ chinese_simplified ] = "带图标的线条"; + Text[ russian ] = " "; + Text[ polish ] = "Linie z symbolami"; + Text[ japanese ] = "データポイント付き折れ線"; + Text[ chinese_traditional ] = "圖示線條"; + Text[ arabic ] = " "; + Text[ greek ] = " "; + Text[ korean ] = "기호가 포함된 선"; + Text[ turkish ] = "Simgeli izgi"; + Text[ catalan ] = "Lnies amb smbols"; + Text[ finnish ] = "Viivat ja symbolit"; + Text[ thai ] = "บรรทัดกับสัญลักษณ์"; + Text[ czech ] = "Čáry se symboly"; + Text[ hebrew ] = "Linien mit Symbolen"; + Text[ hindi ] = "संकेत सहित रेखाएँ"; + Text[ slovak ] = "Čiarový graf so symbolmi"; +}; +*/ +String STR_XY +{ + Text = "XY-Diagramm" ; + Text [ ENGLISH ] = "XY diagram" ; + Text [ dutch ] = "XY-diagram" ; + Text [ english_us ] = "XY Chart" ; + Text [ italian ] = "Diagramma XY" ; + Text [ spanish ] = "Diagrama XY" ; + Text [ french ] = "Diagramme XY" ; + Text [ swedish ] = "XY-diagram" ; + Text [ danish ] = "XY-diagram" ; + Text [ portuguese ] = "Grfico XY" ; + Text [ portuguese_brazilian ] = "Grfico XY" ; + Text[ chinese_simplified ] = "XY 图表"; + Text[ russian ] = " XY"; + Text[ polish ] = "Wykres XY"; + Text[ japanese ] = "散布図"; + Text[ chinese_traditional ] = "XY-圖表"; + Text[ arabic ] = " "; + Text[ greek ] = " XY"; + Text[ korean ] = "XY 차트"; + Text[ turkish ] = "XY emas"; + Text[ catalan ] = "Diagrama XY"; + Text[ finnish ] = "XY-kaavio"; + Text[ thai ] = "แผนภูมิXY "; + Text[ czech ] = "Graf XY"; + Text[ hebrew ] = "XY-Diagramm"; + Text[ hindi ] = "XY चार्ट"; + Text[ slovak ] = "Graf XY"; +}; +/* +String STR_XYZ +{ + Text = "XYZ-Diagramm" ; + Text [ ENGLISH ] = "XYZ diagram" ; + Text [ dutch ] = "XYZ-diagram" ; + Text [ english_us ] = "XYZ Chart" ; + Text [ italian ] = "Diagramma XYZ" ; + Text [ spanish ] = "Diagrama XYZ" ; + Text [ french ] = "Diagramme XYZ" ; + Text [ swedish ] = "XYZ-diagram" ; + Text [ danish ] = "XYZ-diagram" ; + Text [ portuguese ] = "Grfico XYZ" ; + Text [ portuguese_brazilian ] = "Grfico XYZ" ; + Text[ chinese_simplified ] = "XYZ 图表"; + Text[ russian ] = " XYZ"; + Text[ polish ] = "Wykres XYZ"; + Text[ japanese ] = "XYZ軸図表"; + Text[ chinese_traditional ] = "XYZ-圖表"; + Text[ arabic ] = " "; + Text[ greek ] = " XYZ"; + Text[ korean ] = "XYZ 차트"; + Text[ turkish ] = "XYZ emas"; + Text[ catalan ] = "Diagrama XYZ"; + Text[ finnish ] = "XYZ-kaavio"; + Text[ thai ] = "แผนภูมิXYZ "; + Text[ czech ] = "Graf XYZ"; + Text[ hebrew ] = "XYZ-Diagramm"; + Text[ hindi ] = "XYZ चार्ट "; + Text[ slovak ] = "Graf XYZ"; +}; +*/ +String STR_ONLY_SYMBOLS +{ + Text = "Nur Symbole" ; + Text [ ENGLISH ] = "Only symbols" ; + Text [ english_us ] = "Symbols Only" ; + Text [ dutch ] = "Alleen symbolen" ; + Text [ italian ] = "Solo simboli" ; + Text [ spanish ] = "Slo smbolos" ; + Text [ french ] = "Uniquement symboles" ; + Text [ swedish ] = "Endast symboler" ; + Text [ danish ] = "Kun mrker" ; + Text [ portuguese ] = "S smbolos" ; + Text [ portuguese_brazilian ] = "Somente Smbolos" ; + Text[ chinese_simplified ] = "只显示图标"; + Text[ russian ] = " "; + Text[ polish ] = "Tylko symbole"; + Text[ japanese ] = "データポイントのみ"; + Text[ chinese_traditional ] = "只允許圖示"; + Text[ arabic ] = " "; + Text[ greek ] = " "; + Text[ korean ] = "기호만"; + Text[ turkish ] = "Yalnzca simge"; + Text[ catalan ] = "Noms smbols"; + Text[ finnish ] = "Vain symbolit"; + Text[ thai ] = "สัญลักษณ์อย่างเดียว"; + Text[ czech ] = "Pouze symboly"; + Text[ hebrew ] = "Nur Symbole"; + Text[ hindi ] = "केवल संकेत"; + Text[ slovak ] = "Iba symboly"; +}; +String STR_ONLY_LINES +{ + Text = "Nur Linien" ; + Text [ ENGLISH ] = "Only lines" ; + Text [ english_us ] = "Lines Only" ; + Text [ dutch ] = "Alleen lijnen" ; + Text [ italian ] = "Solo linee" ; + Text [ spanish ] = "Slo lneas" ; + Text [ french ] = "Uniquement lignes" ; + Text [ swedish ] = "Endast linjer" ; + Text [ danish ] = "Kun linjer" ; + Text [ portuguese ] = "S linhas" ; + Text [ portuguese_brazilian ] = "Somente Linhas" ; + Text[ chinese_simplified ] = "只显示线条"; + Text[ russian ] = " "; + Text[ polish ] = "Tylko linie"; + Text[ japanese ] = "線のみ"; + Text[ chinese_traditional ] = "只允許線條"; + Text[ arabic ] = " "; + Text[ greek ] = " "; + Text[ korean ] = "선 만"; + Text[ turkish ] = "Yalnzca izgi"; + Text[ catalan ] = "Noms lnies"; + Text[ finnish ] = "Vain viivat"; + Text[ thai ] = "บรรทัดอย่างเดียว"; + Text[ czech ] = "Pouze čáry"; + Text[ hebrew ] = "Nur Linien"; + Text[ hindi ] = "Lines Only"; + Text[ slovak ] = "Iba čiary"; +}; +String STR_LINE_SYMBOLS +{ + Text = "Linien mit Symbolen" ; + Text [ ENGLISH ] = "Lines with symbols" ; + Text [ english_us ] = "Lines with Symbols" ; + Text [ dutch ] = "Lijnen met symbolen" ; + Text [ italian ] = "Linee con simboli" ; + Text [ spanish ] = "Lneas con smbolos" ; + Text [ french ] = "Lignes avec symboles" ; + Text [ swedish ] = "Linjer med symboler" ; + Text [ danish ] = "Linjer med mrker" ; + Text [ portuguese ] = "Linhas com smbolos" ; + Text [ portuguese_brazilian ] = "Linhas com Smbolos" ; + Text[ chinese_simplified ] = "带图标的线条"; + Text[ russian ] = " "; + Text[ polish ] = "Linie z symbolami"; + Text[ japanese ] = "データポイント付き折れ線"; + Text[ chinese_traditional ] = "圖示線條"; + Text[ arabic ] = " "; + Text[ greek ] = " "; + Text[ korean ] = "기호가 포함된 선"; + Text[ turkish ] = "Simgeli izgi"; + Text[ catalan ] = "Lnies amb smbols"; + Text[ finnish ] = "Viivat ja symbolit"; + Text[ thai ] = "บรรทัดกับสัญลักษณ์"; + Text[ czech ] = "Čáry se symboly"; + Text[ hebrew ] = "Linien mit Symbolen"; + Text[ hindi ] = "संकेतों सहित रेखाएँ"; + Text[ slovak ] = "Čiary so symbolmi"; +}; + +String STR_LINE_COLUMN +{ + Text = "Verbunddiagramm: Linie und Sulen" ; + Text [ ENGLISH ] = "Combination chart: Line and Columns" ; + Text [ english_us ] = "Combination Chart: Lines and Columns" ; + Text [ portuguese ] = "Grfico combinado: linhas e colunas" ; + Text [ portuguese_brazilian ] = "Grfico Combinado: Linhas e Colunas" ; + Text [ swedish ] = "Kombinationsdiagram: linjer och staplar" ; + Text [ danish ] = "Kombinationsdiagram: Linjer og sjler" ; + Text [ italian ] = "Diagramma combinato: linee e colonne" ; + Text [ spanish ] = "Diagrama combinado: Lneas y columnas" ; + Text [ french ] = "Diagramme combin : lignes et colonnes" ; + Text [ dutch ] = "Combinatiediagram: lijnen en zuilen" ; + Text[ chinese_simplified ] = "组合图表:线条和柱"; + Text[ russian ] = " : "; + Text[ polish ] = "Wykres zoony: Linie i supki"; + Text[ japanese ] = "組み合わせ:折れ線と縦棒"; + Text[ chinese_traditional ] = "連結圖表:線條和柱形"; + Text[ arabic ] = " : "; + Text[ greek ] = " : "; + Text[ korean ] = "조합 차트: 선과 열"; + Text[ turkish ] = "Karma ema: izgi ve stunlar"; + Text[ catalan ] = "Diagrama combinat: Lnies i columnes"; + Text[ finnish ] = "Yhdistelmkaavio: Rivit ja sarakkeet"; + Text[ thai ] = "เชื่อมแผนภูมิ: บรรทัดและคอลัมน์์"; + Text[ czech ] = "Kombinovaný graf: řádky a sloupce"; + Text[ hebrew ] = "Verbunddiagramm: Linie und Säulen"; + Text[ hindi ] = "Combination Chart: Lines and Columns"; + Text[ slovak ] = "Kombinovaný graf: čiary a stĺpce"; +}; +String STR_LINE_STACKEDCOLUMN +{ + Text = "Verbunddiagramm: Linie und gestapelte Sulen" ; + Text [ ENGLISH ] = "Verbunddiagramm: Linie und gestapelte Sulen" ; + Text [ english_us ] = "Combination Chart: Lines and stacked columns" ; + Text [ portuguese ] = "Grfico combinado: linha e colunas sobrepostas" ; + Text [ portuguese_brazilian ] = "Grfico Combinado: Linha e colunas empilhadas" ; + Text [ swedish ] = "Kombinationsdiagram: linjer och staplade staplar" ; + Text [ danish ] = "Kombinationsdiagram: Linjer og stablede sjler" ; + Text [ italian ] = "Diagramma composto: linea e colonne impilate" ; + Text [ spanish ] = "Diagrama combinado: Lnea y columnas sobrepuestas" ; + Text [ french ] = "Diagramme combin : lignes et colonnes empiles" ; + Text [ dutch ] = "Combinatiediagram: lijn en gestapelde zuilen" ; + Text[ chinese_simplified ] = "组合图表:线条和重叠柱"; + Text[ russian ] = " : "; + Text[ polish ] = "Wykres zoony: Linie i supki skumulowane"; + Text[ japanese ] = "組み合わせ:線と積み上げ縦棒"; + Text[ chinese_traditional ] = "連結圖表:線條和重疊柱"; + Text[ arabic ] = " : "; + Text[ greek ] = " : "; + Text[ korean ] = "조합 차트: 선과 누적된 열"; + Text[ turkish ] = "Karma ema: izgi ve ylm stunlar"; + Text[ catalan ] = "Diagrama combinat: Lnia i columnes superposades"; + Text[ finnish ] = "Yhdistelmkaavio: Rivit ja pinotut sarakkeet"; + Text[ thai ] = "เชื่อมแผนภูมิ: บรรทัดและคอลัมน์์แบบกองซ้อน"; + Text[ czech ] = "Kombinovaný graf: řádky a skládané sloupce"; + Text[ hebrew ] = "Verbunddiagramm: Linie und gestapelte Säulen"; + Text[ hindi ] = "Combination Chart: Lines and stacked columns"; + Text[ slovak ] = "Kombinovaný graf: čiary a skladané stĺpce"; +}; +String STR_NET +{ + Text = "Netz" ; + Text [ ENGLISH ] = "Net" ; + Text [ english_us ] = "Net" ; + Text [ italian ] = "Rete" ; + Text [ spanish ] = "Red" ; + Text [ french ] = "Toile" ; + Text [ dutch ] = "Net" ; + Text [ swedish ] = "Polr" ; + Text [ danish ] = "Radar" ; + Text [ portuguese ] = "Rede" ; + Text [ portuguese_brazilian ] = "Rede" ; + Text[ chinese_simplified ] = "网络"; + Text[ russian ] = ""; + Text[ polish ] = "Sie"; + Text[ japanese ] = "レーダー網"; + Text[ chinese_traditional ] = "網路"; + Text[ arabic ] = ""; + Text[ greek ] = ""; + Text[ korean ] = "네트워크"; + Text[ turkish ] = "A"; + Text[ catalan ] = "Xarxa"; + Text[ finnish ] = "Verkko"; + Text[ thai ] = "เครือข่าย"; + Text[ czech ] = "Síť"; + Text[ hebrew ] = "Netz"; + Text[ hindi ] = "नेट्"; + Text[ slovak ] = "Sieťový graf"; +}; +String STR_SYMBOL +{ + Text = "Symbole" ; + Text [ ENGLISH ] = "Net with symbols" ; + Text [ english_us ] = "Symbols" ; + Text [ dutch ] = "Symbolen" ; + Text [ italian ] = "Simboli" ; + Text [ spanish ] = "Smbolos" ; + Text [ french ] = "Symboles" ; + Text [ swedish ] = "Symboler" ; + Text [ danish ] = "Mrker" ; + Text [ portuguese ] = "Smbolos" ; + Text [ portuguese_brazilian ] = "Smbolos" ; + Text[ chinese_simplified ] = "图标"; + Text[ russian ] = ""; + Text[ polish ] = "Symbole"; + Text[ japanese ] = "データポイント"; + Text[ chinese_traditional ] = "圖示"; + Text[ arabic ] = ""; + Text[ greek ] = ""; + Text[ korean ] = "기호"; + Text[ turkish ] = "Simge"; + Text[ catalan ] = "Smbols"; + Text[ finnish ] = "Symbolit"; + Text[ thai ] = "สัญลักษณ์"; + Text[ czech ] = "Symboly"; + Text[ hebrew ] = "Symbole"; + Text[ hindi ] = "संकेत"; + Text[ slovak ] = "Symbolový graf"; +}; + +String STR_SYMBOL_STACK +{ + Text = "Gestapelt mit Symbolen" ; + Text [ ENGLISH ] = "Stacked net with symbols" ; + Text [ english_us ] = "Stacked with symbols" ; + Text [ italian ] = "Sovrapposto con simboli" ; + Text [ spanish ] = "Apilado con smbolos" ; + Text [ french ] = "Empil avec symboles" ; + Text [ dutch ] = "Gestapeld met symbolen" ; + Text [ swedish ] = "Staplade med symboler" ; + Text [ danish ] = "Stablet med mrker" ; + Text [ portuguese ] = "Empilhado com smbolos" ; + Text [ portuguese_brazilian ] = "Empilhado com smbolos" ; + Text[ chinese_simplified ] = "重叠图标"; + Text[ russian ] = " "; + Text[ polish ] = "Skumulowany z symbolami"; + Text[ japanese ] = "データポイント付き積み上げ"; + Text[ chinese_traditional ] = "重疊圖示"; + Text[ arabic ] = " "; + Text[ greek ] = " "; + Text[ korean ] = "기호 누적"; + Text[ turkish ] = "Simgeli ylm"; + Text[ catalan ] = "Apilat amb smbols"; + Text[ finnish ] = "Pinottu ja symbolit"; + Text[ thai ] = "กองซ้อนด้วยสัญลักษณ์"; + Text[ czech ] = "Skládaný se symboly"; + Text[ hebrew ] = "Gestapelt mit Symbolen"; + Text[ hindi ] = "Stacked with symbols"; + Text[ slovak ] = "Skladaný graf so symbolmi"; +}; +String STR_SYMBOL_PERCENT +{ + Text = "Prozentual mit Symbolen" ; + Text [ ENGLISH ] = "Percentage net with symbols" ; + Text [ dutch ] = "Procentueel met symbolen" ; + Text [ english_us ] = "Percent with symbols" ; + Text [ italian ] = "Percentuale con simboli" ; + Text [ spanish ] = "Porcentual con smbolos" ; + Text [ french ] = "Pourcentage avec symboles" ; + Text [ swedish ] = "Procentuellt med symboler" ; + Text [ danish ] = "Procent med mrker" ; + Text [ portuguese ] = "Percentagem com smbolos" ; + Text [ portuguese_brazilian ] = "Percentagem com smbolos" ; + Text[ chinese_simplified ] = "百分比图标"; + Text[ russian ] = " "; + Text[ polish ] = "Procentowy z symbolami"; + Text[ japanese ] = "データポイント付きパーセント"; + Text[ chinese_traditional ] = "圖示百分比"; + Text[ arabic ] = " "; + Text[ greek ] = " "; + Text[ korean ] = "기호 포함 백분율"; + Text[ turkish ] = "Simgeli yzde"; + Text[ catalan ] = "Percentual amb smbols"; + Text[ finnish ] = "Prosenttiarvo ja symbolit"; + Text[ thai ] = "เปอร์เซ็นต์กับสัญลักษณ์"; + Text[ czech ] = "Procentuální se symboly"; + Text[ hebrew ] = "Prozentual mit Symbolen"; + Text[ hindi ] = "Percent with symbols"; + Text[ slovak ] = "Percentuálny graf so symbolmi"; +}; + +String STR_SPLINE_CUBIC +{ + Text = "Kubischer Spline" ; + Text [ ENGLISH ] = "Cubic spline" ; + Text [ english_us ] = "Cubic Spline" ; + Text [ italian ] = "Spline cubico" ; + Text [ spanish ] = "Spline cbico" ; + Text [ french ] = "Spline cubique" ; + Text [ dutch ] = "Kubieke spline" ; + Text [ swedish ] = "Kubisk spline" ; + Text [ danish ] = "Kubisk spline" ; + Text [ portuguese ] = "Spline cbico" ; + Text [ portuguese_brazilian ] = "Spline Cbico" ; + Text[ chinese_simplified ] = "立方样条"; + Text[ russian ] = " "; + Text[ polish ] = "Kubiczna krzywa skadana"; + Text[ japanese ] = "データポイントなしスプライン"; + Text[ chinese_traditional ] = "立方形齒條"; + Text[ arabic ] = "Spline "; + Text[ greek ] = "Spline "; + Text[ korean ] = "입체 스플라인"; + Text[ turkish ] = "Kbik spline"; + Text[ catalan ] = "Spline cbic"; + Text[ finnish ] = "Kuutiosplini"; + Text[ thai ] = "เครื่องสลักลูกบาศก์"; + Text[ czech ] = "Kubický splajn"; + Text[ hebrew ] = "Kubischer Spline"; + Text[ hindi ] = "घन स्प्लइन"; + Text[ slovak ] = "Kubický splajn"; +}; +String STR_SPLINE_CUBIC_SYMBOL +{ + Text = "Kubischer Spline mit Symbolen" ; + Text [ ENGLISH ] = "Cubic spline with symbols" ; + Text [ english_us ] = "Cubic Spline with Symbols" ; + Text [ italian ] = "Spline cubico con simboli" ; + Text [ spanish ] = "Spline cbico con smbolos" ; + Text [ french ] = "Spline cubique avec symboles" ; + Text [ dutch ] = "Kubieke spline met symbolen" ; + Text [ swedish ] = "Kubisk spline med symboler" ; + Text [ danish ] = "Kubisk spline med mrker" ; + Text [ portuguese ] = "Spline cbico com smbolos" ; + Text [ portuguese_brazilian ] = "Spline Cbico com Smbolos" ; + Text[ chinese_simplified ] = "带图标的立方样条"; + Text[ russian ] = " "; + Text[ polish ] = "Kubiczna krzywa skadana z symbolami"; + Text[ japanese ] = "データポイント付きスプライン"; + Text[ chinese_traditional ] = "圖示立方形齒條"; + Text[ arabic ] = "Spline "; + Text[ greek ] = "Spline "; + Text[ korean ] = "입체 스프라인 기호 포함"; + Text[ turkish ] = "Simgeli kbik spline"; + Text[ catalan ] = "Spline cbic amb smbols"; + Text[ finnish ] = "Kuutiosplini ja symbolit"; + Text[ thai ] = "สลักลูกบาศก์ด้วยสัญลักษณ์"; + Text[ czech ] = "Kubický splajn se symboly"; + Text[ hebrew ] = "Kubischer Spline mit Symbolen"; + Text[ hindi ] = "संकेतों सहित घन स्प्लइन"; + Text[ slovak ] = "Kubický splajn so symbolmi"; +}; +String STR_SPLINE_B +{ + Text = "B-Spline" ; + Text [ ENGLISH ] = "B-spline" ; + Text [ dutch ] = "B-spline" ; + Text [ english_us ] = "B-Spline" ; + Text [ italian ] = "B-Spline" ; + Text [ spanish ] = "B spline" ; + Text [ french ] = "Spline B" ; + Text [ swedish ] = "B-spline" ; + Text [ danish ] = "B-spline" ; + Text [ portuguese ] = "B-Spline" ; + Text [ portuguese_brazilian ] = "Spline B" ; + Text[ chinese_simplified ] = "B 样条"; + Text[ russian ] = "B-"; + Text[ polish ] = "Krzywa skadana B"; + Text[ japanese ] = "B スプライン"; + Text[ chinese_traditional ] = "B-齒條"; + Text[ arabic ] = "B-Spline"; + Text[ greek ] = "B-Spline"; + Text[ korean ] = "B-스플라인"; + Text[ turkish ] = "B-Spline"; + Text[ catalan ] = "B-Spline"; + Text[ finnish ] = "B-splini"; + Text[ thai ] = "B-Spline"; + Text[ czech ] = "B-splajn"; + Text[ hebrew ] = "B-Spline"; + Text[ hindi ] = "B-स्प्लइन"; + Text[ slovak ] = "B-splajn"; +}; +String STR_SPLINE_B_SYMBOL +{ + Text = "B-Spline mit Symbolen" ; + Text [ ENGLISH ] = "B-spline with symbols" ; + Text [ english_us ] = "B-Spline with Symbols" ; + Text [ italian ] = "B-Spline con simboli" ; + Text [ spanish ] = "B spline con smbolos" ; + Text [ french ] = "Spline B avec symboles" ; + Text [ dutch ] = "B-spline met symbolen" ; + Text [ swedish ] = "B-spline med symboler" ; + Text [ danish ] = "B-spline med mrker" ; + Text [ portuguese ] = "Spline B com smbolos" ; + Text [ portuguese_brazilian ] = "Spline B com Smbolos" ; + Text[ chinese_simplified ] = "带图标的 B 立方样条"; + Text[ russian ] = "B- "; + Text[ polish ] = "Krzywa skadana B z symbolami"; + Text[ japanese ] = "データポイント付きBスプライン"; + Text[ chinese_traditional ] = "圖示 B-齒條"; + Text[ arabic ] = "B-Spline "; + Text[ greek ] = "B-Spline "; + Text[ korean ] = "기호 포함한 B-스플라인"; + Text[ turkish ] = "Simgeli B-Spline"; + Text[ catalan ] = "B spline amb smbols"; + Text[ finnish ] = "B-splini ja symbolit"; + Text[ thai ] = "B-Splineด้วยสัญลักษณ์"; + Text[ czech ] = "B-splajn se symboly"; + Text[ hebrew ] = "B-Spline mit Symbolen"; + Text[ hindi ] = "संकेतों सहित B-स्प्लइन "; + Text[ slovak ] = "B-splajn so symbolmi"; +}; + +String STR_STOCK +{ + Text = "Kursdiagramm" ; + Text [ ENGLISH ] = "stock chart" ; + Text[ italian ] = "diagramma quotazioni"; + Text[ portuguese_brazilian ] = "Grfico de cotaes"; + Text[ portuguese ] = "Grfico de cotaes"; + Text[ danish ] = "Aktiediagram"; + Text[ french ] = "Diagramme des cours"; + Text[ swedish ] = "Kursdiagram"; + Text[ dutch ] = "Koersdiagram"; + Text[ spanish ] = "Diagrama de curso"; + Text[ english_us ] = "Stock Chart"; + Text[ chinese_simplified ] = "股票图表"; + Text[ russian ] = " "; + Text[ polish ] = "Wykres giedowy"; + Text[ japanese ] = "株価チャート"; + Text[ chinese_traditional ] = "股票圖表"; + Text[ arabic ] = " "; + Text[ greek ] = " "; + Text[ korean ] = "주가 차트"; + Text[ turkish ] = "Hisse senedi grafii"; + Text[ catalan ] = "Diagrama de borsa"; + Text[ finnish ] = "Prssikaavio"; + Text[ thai ] = "แผนภูมิหุ้น"; + Text[ czech ] = "Burzovní graf"; + Text[ hebrew ] = "Kursdiagramm"; + Text[ hindi ] = "संचय चार्ट"; + Text[ slovak ] = "Burzový graf"; +}; +String STR_STOCK_1 +{ + Text = "Kursdiagramm 1" ; + Text [ ENGLISH ] = "stock chart 1" ; + Text[ italian ] = "diagramma quotazioni 1"; + Text[ portuguese_brazilian ] = "Grfico de cotaes 1"; + Text[ portuguese ] = "Grfico de cotaes 1"; + Text[ danish ] = "Aktiediagram 1"; + Text[ french ] = "Diagramme des cours 1"; + Text[ swedish ] = "Kursdiagram 1"; + Text[ dutch ] = "Koersdiagram 1"; + Text[ spanish ] = "Diagrama de curso 1"; + Text[ english_us ] = "Stock Chart 1"; + Text[ chinese_simplified ] = "股票图表 1"; + Text[ russian ] = " 1"; + Text[ polish ] = "Wykres giedowy 1"; + Text[ japanese ] = "株価チャート 1"; + Text[ chinese_traditional ] = "股票圖表 1"; + Text[ arabic ] = " "; + Text[ greek ] = " 1"; + Text[ korean ] = "주가 차트 1"; + Text[ turkish ] = "Hisse senedi grafii 1"; + Text[ catalan ] = "Diagrama de borsa 1"; + Text[ finnish ] = "Prssikaavio 1"; + Text[ thai ] = "แผนภูมิหุ้น 1"; + Text[ czech ] = "Burzovní graf 1"; + Text[ hebrew ] = "Kursdiagramm 1"; + Text[ hindi ] = "संचय चार्ट 1 "; + Text[ slovak ] = "Burzový graf 1"; +}; +String STR_STOCK_2 +{ + Text = "Kursdiagramm 2" ; + Text [ ENGLISH ] = "stock chart 2" ; + Text[ italian ] = "diagramma quotazioni 2"; + Text[ portuguese_brazilian ] = "Grfico de cotaes 2"; + Text[ portuguese ] = "Grfico de cotaes 2"; + Text[ danish ] = "Aktiediagram 2"; + Text[ french ] = "Diagramme des cours 2"; + Text[ swedish ] = "Kursdiagram 2"; + Text[ dutch ] = "Koersdiagram 2"; + Text[ spanish ] = "Diagrama de curso 2"; + Text[ english_us ] = "Stock Chart 2"; + Text[ chinese_simplified ] = "股票图表 2"; + Text[ russian ] = " 2"; + Text[ polish ] = "Wykres giedowy 2"; + Text[ japanese ] = "株価チャート 2"; + Text[ chinese_traditional ] = "股票圖表 2"; + Text[ arabic ] = " "; + Text[ greek ] = " 2"; + Text[ korean ] = "주가 차트 2"; + Text[ turkish ] = "Hisse senedi grafii 2"; + Text[ catalan ] = "Diagrama de borsa 2"; + Text[ finnish ] = "Prssikaavio 2"; + Text[ thai ] = "แผนภูมิหุ้น 2"; + Text[ czech ] = "Burzovní graf 2"; + Text[ hebrew ] = "Kursdiagramm 2"; + Text[ hindi ] = "संचय चार्ट 2"; + Text[ slovak ] = "Burzový graf 2"; +}; +String STR_STOCK_3 +{ + Text = "Kursdiagramm 3" ; + Text [ ENGLISH ] = "stock chart 3" ; + Text[ italian ] = "diagramma quotazioni 3"; + Text[ portuguese_brazilian ] = "Grfico de cotaes 3"; + Text[ portuguese ] = "Grfico de cotaes 3"; + Text[ danish ] = "Aktiediagram 3"; + Text[ french ] = "Diagramme des cours 3"; + Text[ swedish ] = "Kursdiagram 3"; + Text[ dutch ] = "Koersdiagram 3"; + Text[ spanish ] = "Diagrama de curso 3"; + Text[ english_us ] = "Stock Chart 3"; + Text[ chinese_simplified ] = "股票图表 3"; + Text[ russian ] = " 3"; + Text[ polish ] = "Wykres giedowy 3"; + Text[ japanese ] = "株価チャート 3"; + Text[ chinese_traditional ] = "股票圖表 3"; + Text[ arabic ] = " "; + Text[ greek ] = " 3"; + Text[ korean ] = "주가 차트 3"; + Text[ turkish ] = "Hisse senedi grafii 3"; + Text[ catalan ] = "Diagrama de borsa 3"; + Text[ finnish ] = "Prssikaavio 3"; + Text[ thai ] = "แผนภูมิหุ้น 3"; + Text[ czech ] = "Burzovní graf 3"; + Text[ hebrew ] = "Kursdiagramm 3"; + Text[ hindi ] = "संचय चार्ट 3"; + Text[ slovak ] = "Burzový graf 3"; +}; +String STR_STOCK_4 +{ + Text = "Kursdiagramm 4" ; + Text [ ENGLISH ] = "stock chart 4" ; + Text[ italian ] = "diagramma quotazioni 4"; + Text[ portuguese_brazilian ] = "Grfico de cotaes 4"; + Text[ portuguese ] = "Grfico de cotaes 4"; + Text[ danish ] = "Aktiediagram 4"; + Text[ french ] = "Diagramme des cours 4"; + Text[ swedish ] = "Kursdiagram 4"; + Text[ dutch ] = "Koersdiagram 4"; + Text[ spanish ] = "Diagrama de curso 4"; + Text[ english_us ] = "Stock Chart 4"; + Text[ chinese_simplified ] = "股票图表 4"; + Text[ russian ] = " 4"; + Text[ polish ] = "Wykres giedowy 4"; + Text[ japanese ] = "株価チャート 4"; + Text[ chinese_traditional ] = "股票圖表 4"; + Text[ arabic ] = " "; + Text[ greek ] = " 4"; + Text[ korean ] = "주가 차트 4"; + Text[ turkish ] = "Hisse senedi grafii 4"; + Text[ catalan ] = "Diagrama de borsa 4"; + Text[ finnish ] = "Prssikaavio 4"; + Text[ thai ] = "แผนภูมิหุ้น 4"; + Text[ czech ] = "Burzovní graf 4"; + Text[ hebrew ] = "Kursdiagramm 4"; + Text[ hindi ] = "संचय चार्ट 4"; + Text[ slovak ] = "Burzový graf 4"; +}; + +//----------------------------------- +String STR_SAEULE_3D_1 +{ + Text = "Runde Sulen" ; + Text[ ENGLISH ] = "Cylinder"; + Text[ italian ] = "Colonne rotonde" ; + Text[ french ] = "Colonnes arrondies" ; + Text[ english_us ] = "Cylinder"; + Text[ portuguese ] = "Colunas redondas"; + Text[ russian ] = ""; + Text[ dutch ] = "cilinders"; + Text[ spanish ] = "Columnas redondas"; + Text[ danish ] = "Cylindre"; + Text[ swedish ] = "Runda pelare"; + Text[ polish ] = "Okrge supki"; + Text[ portuguese_brazilian ] = "Cilindro"; + Text[ japanese ] = "円柱"; + Text[ chinese_simplified ] = "圆柱体"; + Text[ chinese_traditional ] = "圓柱"; + Text[ arabic ] = ""; + Text[ greek ] = ""; + Text[ korean ] = "실린더"; + Text[ turkish ] = "Silindir"; + Text[ catalan ] = "Cilindre"; + Text[ finnish ] = "Lieri"; + Text[ thai ] = "ทรงกระบอก"; + Text[ czech ] = "Válec"; + Text[ hebrew ] = "Runde Säulen"; + Text[ hindi ] = "बेलन"; + Text[ slovak ] = "Valec"; +}; +String STR_SAEULE_3D_2 +{ + Text = "Runde, gestapelte Sulen" ; + Text[ ENGLISH ] = "Cylinder, stacked"; + Text[ italian ] = "Colonne rotonde sovrapposte" ; + Text[ french ] = "Colonnes arrondies empiles" ; + Text[ english_us ] = "Cylinder, stacked"; + Text[ portuguese ] = "Barras redondas sobrepostas"; + Text[ russian ] = ", "; + Text[ dutch ] = "cilinders, gestapeld"; + Text[ spanish ] = "Columnas redondas apiladas"; + Text[ danish ] = "Stablede cylindre"; + Text[ swedish ] = "Runda, staplade pelare"; + Text[ polish ] = "Okrge supki skumulowane"; + Text[ portuguese_brazilian ] = "Cilindro, empilhado"; + Text[ japanese ] = "積み上げ円柱"; + Text[ chinese_simplified ] = "堆积型圆柱体"; + Text[ chinese_traditional ] = "重疊圓柱"; + Text[ arabic ] = " "; + Text[ greek ] = ", "; + Text[ korean ] = "쌓아 올린 실린더"; + Text[ turkish ] = "Ylm silindir"; + Text[ catalan ] = "Cilindre, apilat"; + Text[ finnish ] = "Lieri, pllekkiset"; + Text[ thai ] = "ทรงกระบอก, กองซ้อน"; + Text[ czech ] = "Válec, skládaný"; + Text[ hebrew ] = "Runde, gestapelte Säulen"; + Text[ hindi ] = "बेलन, स्टॉक की हुयी"; + Text[ slovak ] = "Valec, skladaný"; +}; +String STR_SAEULE_3D_3 +{ + Text = "Runde Sulen, Prozent"; + Text[ ENGLISH ] = "Cylinder, percent"; + Text[ italian ] = "Colonne rotonde, percentuale"; + Text[ french ] = "Colonnes arrondies, pourcentage"; + Text[ english_us ] = "Cylinder, percent"; + Text[ portuguese ] = "Colunas redondas, percentuais"; + Text[ russian ] = ", "; + Text[ dutch ] = "cilinders, procent"; + Text[ spanish ] = "Columnas redondas, porciento"; + Text[ danish ] = "Cylindre, procent"; + Text[ swedish ] = "Runda pelare, procent"; + Text[ polish ] = "Okrge supki procentowe"; + Text[ portuguese_brazilian ] = "Cilindro, percentual"; + Text[ japanese ] = "円柱、パーセント"; + Text[ chinese_simplified ] = "百分比圆柱体"; + Text[ chinese_traditional ] = "百分比圓柱"; + Text[ arabic ] = " "; + Text[ greek ] = ", (%)"; + Text[ korean ] = "실린더, 백분율"; + Text[ turkish ] = "Silindir, yzde"; + Text[ catalan ] = "Cilindre, percentatge"; + Text[ finnish ] = "Lieri, prosentti"; + Text[ thai ] = "ทรงกระบอก, เปอร์เซ็นต์"; + Text[ czech ] = "Válec, procenta"; + Text[ hebrew ] = "Runde Säulen, Prozent"; + Text[ hindi ] = "Cylinder, percent"; + Text[ slovak ] = "Valec, percentuálny"; +}; +String STR_SAEULE_3D_4 +{ + Text = "Runde Sulen, Tief" ; + Text[ ENGLISH ] = "Cylinder, deep"; + Text[ italian ] = "Colonne rontonde, in basso" ; + Text[ french ] = "Colonnes arrondies, en profondeur" ; + Text[ english_us ] = "Cylinder, deep"; + Text[ portuguese ] = "Colunas redondas, com profundidade"; + Text[ russian ] = ", "; + Text[ dutch ] = "cilinders, met diepte"; + Text[ spanish ] = "Columnas redondas, en profundidad"; + Text[ danish ] = "Cylindre, dyb"; + Text[ swedish ] = "Runda pelare, djupa"; + Text[ polish ] = "Okrge supki przestrzenne"; + Text[ portuguese_brazilian ] = "Cilindro, com profundidade"; + Text[ japanese ] = "円柱、奥行きあり"; + Text[ chinese_simplified ] = "带深度的圆柱体"; + Text[ chinese_traditional ] = "深向圓柱"; + Text[ arabic ] = " "; + Text[ greek ] = ", "; + Text[ korean ] = "실린더, 깊이"; + Text[ turkish ] = "Silindir, derin"; + Text[ catalan ] = "Cilindre, profunditat"; + Text[ finnish ] = "Lieri, syv"; + Text[ thai ] = "ทรงกระบอก, ลึก"; + Text[ czech ] = "Válec, hloubka"; + Text[ hebrew ] = "Runde Säulen, Tief"; + Text[ hindi ] = "बेलन, गहरा"; + Text[ slovak ] = "Valec, do hĺbky"; +}; +//----------------------------------- +String STR_ROEHRE_3D_1 +{ + Text = "Rhren" ; + Text[ ENGLISH ] = "Tubes"; + Text[ italian ] = "Tubi" ; + Text[ french ] = "Tubes" ; + Text[ english_us ] = "Tubes"; + Text[ portuguese ] = "Tubos"; + Text[ russian ] = ""; + Text[ dutch ] = "horizontale cilinders"; + Text[ spanish ] = "Tubos"; + Text[ danish ] = "Rr"; + Text[ swedish ] = "Rr"; + Text[ polish ] = "Rurki"; + Text[ portuguese_brazilian ] = "Tubos"; + Text[ japanese ] = "円筒"; + Text[ chinese_simplified ] = "管道"; + Text[ chinese_traditional ] = "管形"; + Text[ arabic ] = ""; + Text[ greek ] = ""; + Text[ korean ] = "관"; + Text[ turkish ] = "Tp"; + Text[ catalan ] = "Tubs"; + Text[ finnish ] = "Putket"; + Text[ thai ] = "ท่อ"; + Text[ czech ] = "Trubky"; + Text[ hebrew ] = "Röhren"; + Text[ hindi ] = "नालियाँ"; + Text[ slovak ] = "Trúbky"; +}; +String STR_ROEHRE_3D_2 +{ + Text = "Gestapelte Rhren" ; + Text[ ENGLISH ] = "Tubes, stacked"; + Text[ italian ] = "Tubi sovrapposti" ; + Text[ french ] = "Tubes empils" ; + Text[ english_us ] = "Tubes, stacked"; + Text[ portuguese ] = "Tubos, sobrepostos"; + Text[ russian ] = ", "; + Text[ dutch ] = "horizontale cilinders, gestapeld"; + Text[ spanish ] = "Tubos apilados"; + Text[ danish ] = "Stablede rr"; + Text[ swedish ] = "Rr, staplade"; + Text[ polish ] = "Rurki skumulowane"; + Text[ portuguese_brazilian ] = "Tubos, empilhados"; + Text[ japanese ] = "積み上げ円筒"; + Text[ chinese_simplified ] = "堆积型管道"; + Text[ chinese_traditional ] = "重疊管形"; + Text[ arabic ] = " "; + Text[ greek ] = ", "; + Text[ korean ] = "파이프, 누적"; + Text[ turkish ] = "Ylm tpler"; + Text[ catalan ] = "Tubs, apilats"; + Text[ finnish ] = "Putket, pinottuja"; + Text[ thai ] = "ท่อ, กองซ้อน"; + Text[ czech ] = "Trubky, skládané"; + Text[ hebrew ] = "Gestapelte Röhren"; + Text[ hindi ] = "नालियाँ, स्टॉक की हुयी"; + Text[ slovak ] = "Trúbky, skladané"; +}; +String STR_ROEHRE_3D_3 +{ + Text = "Rhren, Prozent"; + Text[ ENGLISH ] = "Tubes, percent"; + Text[ italian ] = "Tubi, percentuale"; + Text[ french ] = "Tubes, pourcentage"; + Text[ english_us ] = "Tubes, percent"; + Text[ portuguese ] = "Tubos, percentuais"; + Text[ russian ] = ", "; + Text[ dutch ] = "horizontale cilinders, procent"; + Text[ spanish ] = "Tubos, porciento"; + Text[ danish ] = "Rr, procent"; + Text[ swedish ] = "Rr, procent"; + Text[ polish ] = "Rurki procentowe"; + Text[ portuguese_brazilian ] = "Tubos, percentuais"; + Text[ japanese ] = "円筒、パーセント"; + Text[ chinese_simplified ] = "百分比管道"; + Text[ chinese_traditional ] = "百分比管形"; + Text[ arabic ] = " "; + Text[ greek ] = ", (%)"; + Text[ korean ] = "관, 백분율"; + Text[ turkish ] = "Tp, yzde"; + Text[ catalan ] = "Tubs, percentatge"; + Text[ finnish ] = "Putket, prosenttia"; + Text[ thai ] = "ท่อ, เปอร์เซ็นต์"; + Text[ czech ] = "Trubky, procenta"; + Text[ hebrew ] = "Röhren, Prozent"; + Text[ hindi ] = "नालियाँ, प्रतिशत"; + Text[ slovak ] = "Trúbky, percentuálne"; +}; +String STR_ROEHRE_3D_4 +{ + Text = "Rhren, Tief" ; + Text[ ENGLISH ] = "Tubes, deep"; + Text[ italian ] = "Tubi, in basso" ; + Text[ french ] = "Tubes, en profondeur" ; + Text[ english_us ] = "Tubes, deep"; + Text[ portuguese ] = "Tubos, com profundidade"; + Text[ russian ] = ", "; + Text[ dutch ] = "horizontale cilinders, met diepte"; + Text[ spanish ] = "Tubos, en profundidad"; + Text[ danish ] = "Rr, dyb"; + Text[ swedish ] = "Rr, djupa"; + Text[ polish ] = "Rurki przestrzenne"; + Text[ portuguese_brazilian ] = "Tubos, com profundidade"; + Text[ japanese ] = "円筒、奥行きあり"; + Text[ chinese_simplified ] = "带深度的管道"; + Text[ chinese_traditional ] = "深向管形"; + Text[ arabic ] = " "; + Text[ greek ] = ", "; + Text[ korean ] = "관, 깊이"; + Text[ turkish ] = "Tp, derin"; + Text[ catalan ] = "Tubs, profunditat"; + Text[ finnish ] = "Putket, syvt"; + Text[ thai ] = "ท่อ, ลึก"; + Text[ czech ] = "Trubky, hloubka"; + Text[ hebrew ] = "Röhren, Tief"; + Text[ hindi ] = "नालियाँ, गहरा"; + Text[ slovak ] = "Trúbky, do hĺbky"; +}; +String STR_PYRAMID_3D_1 +{ + Text = "Pyramiden" ; + Text[ ENGLISH ] = "Pyramids"; + Text[ italian ] = "Piramidi" ; + Text[ french ] = "Pyramides" ; + Text[ english_us ] = "Pyramids"; + Text[ portuguese ] = "Pirmides"; + Text[ russian ] = ""; + Text[ dutch ] = "Piramiden"; + Text[ spanish ] = "Pirmides"; + Text[ danish ] = "Pyramider"; + Text[ swedish ] = "Pyramider"; + Text[ polish ] = "Ostrosupowy"; + Text[ portuguese_brazilian ] = "Pirmides"; + Text[ japanese ] = "角錐"; + Text[ chinese_simplified ] = "棱锥体"; + Text[ chinese_traditional ] = "錐體"; + Text[ arabic ] = ""; + Text[ greek ] = ""; + Text[ korean ] = "피라미드"; + Text[ turkish ] = "Piramit"; + Text[ catalan ] = "Pirmides"; + Text[ finnish ] = "Pyramidit"; + Text[ thai ] = "ปิรามิด"; + Text[ czech ] = "Jehlany"; + Text[ hebrew ] = "Pyramiden"; + Text[ hindi ] = "Pyramids"; + Text[ slovak ] = "Ihlany"; +}; +String STR_PYRAMID_3D_2 +{ + Text = "Gestapelte Pyramiden" ; + Text[ ENGLISH ] = "Pyramids, stacked"; + Text[ italian ] = "Piramidi sovrapposte" ; + Text[ french ] = "Pyramides empiles" ; + Text[ english_us ] = "Pyramids, stacked"; + Text[ portuguese ] = "Pirmides, sobrepostas"; + Text[ russian ] = ", "; + Text[ dutch ] = "Piramiden, gestapeld"; + Text[ spanish ] = "Pirmides apiladas"; + Text[ danish ] = "Stablede pyramider"; + Text[ swedish ] = "Staplade pyramider"; + Text[ polish ] = "Ostrosupy skumulowane"; + Text[ portuguese_brazilian ] = "Pirmides, empilhadas"; + Text[ japanese ] = "積み上げた角錐"; + Text[ chinese_simplified ] = "堆积型棱锥体"; + Text[ chinese_traditional ] = "重疊錐體"; + Text[ arabic ] = " "; + Text[ greek ] = ", "; + Text[ korean ] = "쌓아올린 피라미드"; + Text[ turkish ] = "Ylm piramitler"; + Text[ catalan ] = "Pirmides apilades"; + Text[ finnish ] = "Pyramidit, pinotut"; + Text[ thai ] = "ปิรามิด, กองซ้อน"; + Text[ czech ] = "Jehlany, skládané"; + Text[ hebrew ] = "Gestapelte Pyramiden"; + Text[ hindi ] = "सूच्याकार स्तंभ, स्टॉक किया हुआ"; + Text[ slovak ] = "Ihlany, skladané"; +}; +String STR_PYRAMID_3D_3 +{ + Text = "Pyramiden, Prozent"; + Text[ ENGLISH ] = "Pyramids percent"; + Text[ italian ] = "Piramidi, percentuale"; + Text[ french ] = "Pyramides, pourcentage"; + Text[ english_us ] = "Pyramids percent"; + Text[ portuguese ] = "Pirmides, percentuais"; + Text[ russian ] = ", "; + Text[ dutch ] = "Piramiden, procent"; + Text[ spanish ] = "Pirmides, porciento"; + Text[ danish ] = "Pyramider, procent"; + Text[ swedish ] = "Pyramider, procent"; + Text[ polish ] = "Ostrosupy procentowe"; + Text[ portuguese_brazilian ] = "Pirmides, percentuais"; + Text[ japanese ] = "角錐、パーセント"; + Text[ chinese_simplified ] = "百分比棱锥体"; + Text[ chinese_traditional ] = "百分比錐體"; + Text[ arabic ] = " "; + Text[ greek ] = ", (%)"; + Text[ korean ] = "피라미드 백분율"; + Text[ turkish ] = "Piramit, yzde"; + Text[ catalan ] = "Pirmides, percent"; + Text[ finnish ] = "Pyramidit prosentteina"; + Text[ thai ] = "เปอร์เซ็นต์ปิรามิด"; + Text[ czech ] = "Procenta jehlanu"; + Text[ hebrew ] = "Pyramiden, Prozent"; + Text[ hindi ] = "सूच्याकार स्तंभ प्रतिशत"; + Text[ slovak ] = "Ihlany, percentuálne"; +}; +String STR_PYRAMID_3D_4 +{ + Text = "Pyramiden, Tief" ; + Text[ ENGLISH ] = "Pyramids, deep"; + Text[ italian ] = "Piramidi, in basso" ; + Text[ french ] = "Pyramides, en profondeur" ; + Text[ english_us ] = "Pyramids, deep"; + Text[ portuguese ] = "Pirmides, com profundidade"; + Text[ russian ] = ", "; + Text[ dutch ] = "Piramiden, met diepte"; + Text[ spanish ] = "Pirmides, en profundidad"; + Text[ danish ] = "Pyramider, dyb"; + Text[ swedish ] = "Pyramider, djupa"; + Text[ polish ] = "Ostrosupy przestrzenne"; + Text[ portuguese_brazilian ] = "Pirmides, com profundidade"; + Text[ japanese ] = "角錐、奥行きあり"; + Text[ chinese_simplified ] = "带深度的棱锥体"; + Text[ chinese_traditional ] = "深向錐體"; + Text[ arabic ] = " "; + Text[ greek ] = ", "; + Text[ korean ] = "피라미드, 깊이"; + Text[ turkish ] = "Piramit, derin"; + Text[ catalan ] = "Pirmides, en profunditat"; + Text[ finnish ] = "Pyramidit, syvt"; + Text[ thai ] = "ปิรามิด, ลึก"; + Text[ czech ] = "Jehlany, hloubka"; + Text[ hebrew ] = "Pyramiden, Tief"; + Text[ hindi ] = "सूच्याकार स्तंभ, गहरा"; + Text[ slovak ] = "Ihlany, do hĺbky"; +}; +//----------------------------------- +String STR_PYRAMIDQ_3D_1 +{ + Text = "Horizontale Pyramiden" ; + Text[ ENGLISH ] = "Pyramids"; + Text[ italian ] = "Piramidi orizzontali" ; + Text[ french ] = "Pyramides horizontales" ; + Text[ english_us ] = "Horizontal pyramids"; + Text[ portuguese ] = "Pirmides horizontais"; + Text[ russian ] = " "; + Text[ dutch ] = "Horizontale piramiden"; + Text[ spanish ] = "Pirmides horizontales"; + Text[ danish ] = "Liggende pyramider"; + Text[ swedish ] = "Horisontala pyramider"; + Text[ polish ] = "Ostrosupy poziome"; + Text[ portuguese_brazilian ] = "Pirmides horizontais"; + Text[ japanese ] = "水平な角錐"; + Text[ chinese_simplified ] = "水平向棱锥体"; + Text[ chinese_traditional ] = "錐體"; + Text[ arabic ] = " "; + Text[ greek ] = " "; + Text[ korean ] = "수평 피라미드"; + Text[ turkish ] = "Yatay piramit"; + Text[ catalan ] = "Pirmides horitzontals"; + Text[ finnish ] = "Vaakapyramidit"; + Text[ thai ] = "ปิรามิดแนวนอน"; + Text[ czech ] = "Vodorovné jehlany"; + Text[ hebrew ] = "Horizontale Pyramiden"; + Text[ hindi ] = "समतल सूच्याकार स्तंभ"; + Text[ slovak ] = "Vodorovné ihlany"; +}; +String STR_PYRAMIDQ_3D_2 +{ + Text = "Horizontale ,gestapelte Pyramiden" ; + Text[ ENGLISH ] = "Pyramids, stacked"; + Text[ italian ] = "Piramidi orizzontali sovrapposte"; + Text[ french ] = "Pyramides horizontales empiles" ; + Text[ english_us ] = "Horizontal pyramids, stacked"; + Text[ portuguese ] = "Pirmides horizontais, sobrepostas"; + Text[ russian ] = " , "; + Text[ dutch ] = "Piramiden, gestapeld"; + Text[ spanish ] = "Pirmides horizontales apiladas"; + Text[ danish ] = "Stablede liggende pyramider"; + Text[ swedish ] = "Horisontala, staplade pyramider"; + Text[ polish ] = "Ostrosupy poziome skumulowane"; + Text[ portuguese_brazilian ] = "Pirmides horizontais, empilhadas"; + Text[ japanese ] = "水平な、積み上げた角錐"; + Text[ chinese_simplified ] = "水平向堆积型棱锥体"; + Text[ chinese_traditional ] = "重疊錐體"; + Text[ arabic ] = " "; + Text[ greek ] = " , "; + Text[ korean ] = "수평, 피라미드 누적"; + Text[ turkish ] = "Yatay, ylm piramitler"; + Text[ catalan ] = "Pirmides horizontals apilades"; + Text[ finnish ] = "Vaakapyramidit, pllekkiset"; + Text[ thai ] = "ปิรามิดแนวนอน, กองซ้อน"; + Text[ czech ] = "Vodorovný jehlan, skládaný"; + Text[ hebrew ] = "Horizontale ,gestapelte Pyramiden"; + Text[ hindi ] = "समतल सूच्याकार स्तंभ, स्टॉक किया हुआ"; + Text[ slovak ] = "Vodorovné ihlany, skladané"; +}; +String STR_PYRAMIDQ_3D_3 +{ + Text = "Horizontale Pyramiden, Prozent"; + Text[ ENGLISH ] = "Pyramids, percent"; + Text[ italian ] = "Piramidi orizzontali, percentuale"; + Text[ french ] = "Pyramides horizontales, pourcentage"; + Text[ english_us ] = "Horizontal pyramids, percent"; + Text[ portuguese ] = "Pirmides horizontais, percentuais"; + Text[ russian ] = " , "; + Text[ dutch ] = "Piramiden, procent"; + Text[ spanish ] = "Pirmides horizontales, porcentaje"; + Text[ danish ] = "Liggende pyramider, procent"; + Text[ swedish ] = "Horisontala pyramider, procent"; + Text[ polish ] = "Ostrosupy poziome procentowe"; + Text[ portuguese_brazilian ] = "Pirmides horizontais, percentuais"; + Text[ japanese ] = "水平な角錐、パーセント"; + Text[ chinese_simplified ] = "水平向百分比棱锥体"; + Text[ chinese_traditional ] = "百分比錐體"; + Text[ arabic ] = " "; + Text[ greek ] = " , (%)"; + Text[ korean ] = "수평 피라미드, 백분율"; + Text[ turkish ] = "Yatay piramit, yzde"; + Text[ catalan ] = "Pirmides horitzontals, percent"; + Text[ finnish ] = "Vaakapyramidit, prosentti"; + Text[ thai ] = "ปิรามิดแนวนอน, เปอร์เซ็นต์"; + Text[ czech ] = "Vodorovný jehlan, procenta"; + Text[ hebrew ] = "Horizontale Pyramiden, Prozent"; + Text[ hindi ] = "Horizontal pyramids, percent"; + Text[ slovak ] = "Vodorovné ihlany, percentuálne"; +}; +String STR_PYRAMIDQ_3D_4 +{ + Text = "Horizontale Pyramiden, Tief" ; + Text[ ENGLISH ] = "Pyramids, deep"; + Text[ italian ] = "Piramidi orizzontali, in basso" ; + Text[ french ] = "Pyramides horizontales, en profondeur" ; + Text[ english_us ] = "Horizontal pyramids, deep"; + Text[ portuguese ] = "Pirmides horizontais, com profundidade"; + Text[ russian ] = " , "; + Text[ dutch ] = "Piramiden, met diepte"; + Text[ spanish ] = "Pirmides horizontales, en profundidad"; + Text[ danish ] = "Liggende pyramider, dyb"; + Text[ swedish ] = "Horisontala pyramider, djupa"; + Text[ polish ] = "Ostrosupy poziome przestrzenne"; + Text[ portuguese_brazilian ] = "Pirmides horizontais, com profundidade"; + Text[ japanese ] = "水平な角錐、奥行きあり"; + Text[ chinese_simplified ] = "带深度的水平向棱锥体"; + Text[ chinese_traditional ] = "深向錐體"; + Text[ arabic ] = " "; + Text[ greek ] = " , "; + Text[ korean ] = "수평 피라미드, 깊이"; + Text[ turkish ] = "Yatay piramit, derin"; + Text[ catalan ] = "Pirmides horizontals, en profunditat"; + Text[ finnish ] = "Vaakapyramidit, syvt"; + Text[ thai ] = "ปิรามิดแนวนอน, ลึก"; + Text[ czech ] = "Vodorovný jehlan, hloubka"; + Text[ hebrew ] = "Horizontale Pyramiden, Tief"; + Text[ hindi ] = "समतल सूच्याकार स्तंभ, गहरा"; + Text[ slovak ] = "Vodorovné ihlany, do hĺbky"; +}; +//----------------------------------- + +String STR_KEGEL_3D_1 +{ + Text = "Kegel" ; + Text[ ENGLISH ] = "Cones"; + Text[ italian ] = "Coni" ; + Text[ french ] = "Cnes" ; + Text[ english_us ] = "Cones"; + Text[ portuguese ] = "Cones"; + Text[ russian ] = ""; + Text[ dutch ] = "kegels"; + Text[ spanish ] = "Conos"; + Text[ danish ] = "Kegler"; + Text[ swedish ] = "Kon"; + Text[ polish ] = "Stoki"; + Text[ portuguese_brazilian ] = "Cones"; + Text[ japanese ] = "円錐"; + Text[ chinese_simplified ] = "圆锥体"; + Text[ chinese_traditional ] = "圓錐"; + Text[ arabic ] = ""; + Text[ greek ] = "K"; + Text[ korean ] = "원추형"; + Text[ turkish ] = "Koni"; + Text[ catalan ] = "Cons"; + Text[ finnish ] = "Kartiot"; + Text[ thai ] = "กรวย"; + Text[ czech ] = "Kužele"; + Text[ hebrew ] = "Kegel"; + Text[ hindi ] = "शंकु"; + Text[ slovak ] = "Kužele"; +}; +String STR_KEGEL_3D_2 +{ + Text = "Gestapelte Kegel" ; + Text[ ENGLISH ] = "Cones, stacked"; + Text[ italian ] = "Coni sovrapposti" ; + Text[ french ] = "Cnes empils" ; + Text[ english_us ] = "Cones, stacked"; + Text[ portuguese ] = "Cones, sobrepostos"; + Text[ russian ] = ", "; + Text[ dutch ] = "kegels, gestapeld"; + Text[ spanish ] = "Conos apilados"; + Text[ danish ] = "Stablede kegler"; + Text[ swedish ] = "Staplade koner"; + Text[ polish ] = "Stoki skumulowane"; + Text[ portuguese_brazilian ] = "Cones, empilhados"; + Text[ japanese ] = "積み上げ円錐"; + Text[ chinese_simplified ] = "堆积型圆锥体"; + Text[ chinese_traditional ] = "重疊圓錐"; + Text[ arabic ] = " "; + Text[ greek ] = ", "; + Text[ korean ] = "쌓아 올린 원추형"; + Text[ turkish ] = "Ylm koni"; + Text[ catalan ] = "Cons, apilats"; + Text[ finnish ] = "Kartiot, pllekkiset"; + Text[ thai ] = "กรวย, กองซ้อน"; + Text[ czech ] = "Kužele, skládané"; + Text[ hebrew ] = "Gestapelte Kegel"; + Text[ hindi ] = "शंकु, स्टॉक की हुयी"; + Text[ slovak ] = "Kužele, skladané"; +}; +String STR_KEGEL_3D_3 +{ + Text = "Kegel, Prozent"; + Text[ ENGLISH ] = "Cones, percent"; + Text[ italian ] = "Coni, percentuale"; + Text[ french ] = "Cnes, pourcentage"; + Text[ english_us ] = "Cones, percent"; + Text[ portuguese ] = "Cones, percentuais"; + Text[ russian ] = ", "; + Text[ dutch ] = "kegels, procent"; + Text[ spanish ] = "Conos, porciento"; + Text[ danish ] = "Kegler, procent"; + Text[ swedish ] = "Kon, procent"; + Text[ polish ] = "Stoki procentowe"; + Text[ portuguese_brazilian ] = "Cones, percentuais"; + Text[ japanese ] = "円錐、パーセント"; + Text[ chinese_simplified ] = "百分比圆锥体"; + Text[ chinese_traditional ] = "百分比圓錐"; + Text[ arabic ] = " "; + Text[ greek ] = "K. (%)"; + Text[ korean ] = "원추형 퍼센트"; + Text[ turkish ] = "Koni, yzde"; + Text[ catalan ] = "Cons, percentatge"; + Text[ finnish ] = "Kartiot, prosentti"; + Text[ thai ] = "กรวย, เปอร์เซ็นต์"; + Text[ czech ] = "Kužele, procenta"; + Text[ hebrew ] = "Kegel, Prozent"; + Text[ hindi ] = "शंकु, प्रतिशत"; + Text[ slovak ] = "Kužele, percentuálne"; +}; +String STR_KEGEL_3D_4 +{ + Text = "Kegel, Tief" ; + Text[ ENGLISH ] = "Cones, deep"; + Text[ italian ] = "Cono, in basso" ; + Text[ french ] = "Cnes, en profondeur" ; + Text[ english_us ] = "Cones, deep"; + Text[ portuguese ] = "Cones, com profundidade"; + Text[ russian ] = ", "; + Text[ dutch ] = "kegels, met diepte"; + Text[ spanish ] = "Conos, en profundidad"; + Text[ danish ] = "Kegler, dyb"; + Text[ swedish ] = "Kon, djup"; + Text[ polish ] = "Stoki przestrzenne"; + Text[ portuguese_brazilian ] = "Cones, com profundidade"; + Text[ japanese ] = "円錐、奥行きあり"; + Text[ chinese_simplified ] = "带深度的圆锥体"; + Text[ chinese_traditional ] = "深向圓錐"; + Text[ arabic ] = " "; + Text[ greek ] = ", "; + Text[ korean ] = "원추형 깊이"; + Text[ turkish ] = "Koni, derin"; + Text[ catalan ] = "Cons, profunditat"; + Text[ finnish ] = "Kartiot, syvt"; + Text[ thai ] = "กรวย, ลึก"; + Text[ czech ] = "Kužele, hloubka"; + Text[ hebrew ] = "Kegel, Tief"; + Text[ hindi ] = "शंकु, गहरा"; + Text[ slovak ] = "Kužele, do hĺbky"; +}; +//----------------------------------- +String STR_KEGELQ_3D_1 +{ + Text = "Horizontale Kegel" ; + Text[ ENGLISH ] = "Cones"; + Text[ italian ] = "Coni orizzontali" ; + Text[ french ] = "Cnes horizontaux" ; + Text[ english_us ] = "Horizontal cones"; + Text[ portuguese ] = "Cones horizontais"; + Text[ russian ] = " "; + Text[ dutch ] = "horizontale kegels"; + Text[ spanish ] = "Conos horizontales"; + Text[ danish ] = "Liggende kegler"; + Text[ swedish ] = "Horisontal kon"; + Text[ polish ] = "Stoki poziome"; + Text[ portuguese_brazilian ] = "Cones horizontais"; + Text[ japanese ] = "水平の円錐"; + Text[ chinese_simplified ] = "水平向圆锥体"; + Text[ chinese_traditional ] = "水平圓錐"; + Text[ arabic ] = " "; + Text[ greek ] = " "; + Text[ korean ] = "수평 원추형"; + Text[ turkish ] = "Yatay koni"; + Text[ catalan ] = "Cons horitzontals"; + Text[ finnish ] = "Vaakakartiot"; + Text[ thai ] = "กรวยแนวนอน"; + Text[ czech ] = "Vodorovné kužele"; + Text[ hebrew ] = "Horizontale Kegel"; + Text[ hindi ] = "समतल शंकु"; + Text[ slovak ] = "Vodorovné kužele"; +}; +String STR_KEGELQ_3D_2 +{ + Text = "Horizontale ,gestapelte Kegel" ; + Text[ ENGLISH ] = "Cones, stacked"; + Text[ italian ] = "Coni orizzontali sovrapposti" ; + Text[ french ] = "Cnes horizontaux empils" ; + Text[ english_us ] = "Horizontal, stacked cones"; + Text[ portuguese ] = "Cones horizontais, sobrepostos"; + Text[ russian ] = " , "; + Text[ dutch ] = "horizontale kegels, gestapeld"; + Text[ spanish ] = "Conos horizontales apilados"; + Text[ danish ] = "Stablede liggende kegler"; + Text[ swedish ] = "Horisontala, staplade koner"; + Text[ polish ] = "Stoki poziome skumulowane"; + Text[ portuguese_brazilian ] = "Cones horizontais, empilhados"; + Text[ japanese ] = "水平の積み上げ円錐"; + Text[ chinese_simplified ] = "水平向堆积型圆锥体"; + Text[ chinese_traditional ] = "重疊圓錐"; + Text[ arabic ] = " "; + Text[ greek ] = ", "; + Text[ korean ] = "수평으로 쌓아 올린 원추형"; + Text[ turkish ] = "Yatay, ylm koniler"; + Text[ catalan ] = "Cons horitzontals, apilats"; + Text[ finnish ] = "Vaakataso, pllekkiset kartiot"; + Text[ thai ] = "แนวนอน, กรวยกองซ้อน"; + Text[ czech ] = "Vodorovné kužele, skládané"; + Text[ hebrew ] = "Horizontale ,gestapelte Kegel"; + Text[ hindi ] = "समतल , स्टॉक की हुयी शंकु"; + Text[ slovak ] = "Vodorovné kužele, skladané"; +}; +String STR_KEGELQ_3D_3 +{ + Text = "Horizontale Kegel, Prozent"; + Text[ ENGLISH ] = "Cones, percent"; + Text[ italian ] = "Coni orizzontali, percentuale"; + Text[ french ] = "Cnes horizontaux, pourcentage"; + Text[ english_us ] = "Horizintal cones, percent"; + Text[ portuguese ] = "Cones horizontais, percentuais"; + Text[ russian ] = " , "; + Text[ dutch ] = "horizontale kegels, procent"; + Text[ spanish ] = "Conos horizontal, porciento"; + Text[ danish ] = "Liggende kegler, procent"; + Text[ swedish ] = "Horisontal kon, procent"; + Text[ polish ] = "Stoki poziome procentowe"; + Text[ portuguese_brazilian ] = "Cones horizontais, percentuais"; + Text[ japanese ] = "水平の円錐、パーセント"; + Text[ chinese_simplified ] = "水平向百分比圆锥体"; + Text[ chinese_traditional ] = "百分比圓錐"; + Text[ arabic ] = " "; + Text[ greek ] = " , (%)"; + Text[ korean ] = "수평 원추형 퍼센트"; + Text[ turkish ] = "Yatay koni, yzde"; + Text[ catalan ] = "Cons horitzontals, percentatge"; + Text[ finnish ] = "Vaakakartiot, prosentti"; + Text[ thai ] = "กรวยแนวนอน, เปอร์เซ็นต์"; + Text[ czech ] = "Vodorovné kužele, procenta"; + Text[ hebrew ] = "Horizontale Kegel, Prozent"; + Text[ hindi ] = "समतल शंकु, प्रतिशत"; + Text[ slovak ] = "Vodorovné kužele, percentuálne"; +}; +String STR_KEGELQ_3D_4 +{ + Text = "Horizontale Kegel, Tief" ; + Text[ ENGLISH ] = "Cones, deep"; + Text[ italian ] = "Coni orizzontali, in basso" ; + Text[ french ] = "Cnes horizontaux, en profondeur" ; + Text[ english_us ] = "Horizontal cones, deep"; + Text[ portuguese ] = "Cones horizontais, com profundidade"; + Text[ russian ] = " , "; + Text[ dutch ] = "horizontale kegels, met diepte"; + Text[ spanish ] = "Conos horizontales, en profundidad"; + Text[ danish ] = "Liggende kegler, dyb"; + Text[ swedish ] = "Horisontal kon, djup"; + Text[ polish ] = "Stoki poziome przestrzenne"; + Text[ portuguese_brazilian ] = "Cones horizontais, com profundidade"; + Text[ japanese ] = "水平の円錐、奥行きあり"; + Text[ chinese_simplified ] = "带深度的水平向圆锥体"; + Text[ chinese_traditional ] = "深向圓錐"; + Text[ arabic ] = " "; + Text[ greek ] = " , "; + Text[ korean ] = "수평 원추형 깊이"; + Text[ turkish ] = "Yatay koni, derin"; + Text[ catalan ] = "Cons horitzontals, profunditat"; + Text[ finnish ] = "Vaakakartiot, syvt"; + Text[ thai ] = "กรวยแนวนอน, ลึก"; + Text[ czech ] = "Vodorovné kužele, hloubka"; + Text[ hebrew ] = "Horizontale Kegel, Tief"; + Text[ hindi ] = "समतल शंकु, गहरा"; + Text[ slovak ] = "Vodorovné kužele, do hĺbky"; +}; +//----------------------------------- diff --git a/chart2/source/controller/dialogs/Strings_Scale.src b/chart2/source/controller/dialogs/Strings_Scale.src new file mode 100644 index 000000000..992005015 --- /dev/null +++ b/chart2/source/controller/dialogs/Strings_Scale.src @@ -0,0 +1,283 @@ +/************************************************************************* + * + * $RCSfile: Strings_Scale.src,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:25 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "Strings.hrc" + +String STR_INVALID_NUMBER +{ + Text = "Ungltige Zahl." ; + Text [ ENGLISH ] = "Invalid number." ; + Text [ norwegian ] = "Ugyldig tall." ; + Text [ italian ] = "Numero non valido." ; + Text [ portuguese_brazilian ] = "Nmero invalido" ; + Text [ portuguese ] = "Nmero incorrecto" ; + Text [ finnish ] = "Virheellinen numero" ; + Text [ danish ] = "Ugyldigt tal." ; + Text [ french ] = "Nombre incorrect" ; + Text [ swedish ] = "Ogiltigt tal" ; + Text [ dutch ] = "Ongeldig getal" ; + Text [ spanish ] = "Nmero no vlido" ; + Text [ english_us ] = "Invalid number" ; + Text[ chinese_simplified ] = "无效的数字"; + Text[ russian ] = " "; + Text[ polish ] = "Nieprawidowa liczba"; + Text[ japanese ] = "無効数"; + Text[ chinese_traditional ] = "無效的數字"; + Text[ arabic ] = " ."; + Text[ greek ] = " ."; + Text[ korean ] = "잘못된 숫자"; + Text[ turkish ] = "Geersiz say."; + Text[ catalan ] = "Nmero no vlid."; + Text[ thai ] = "ตัวเลขไม่ถูกต้อง"; + Text[ czech ] = "Neplatné číslo"; + Text[ hebrew ] = "Ungültige Zahl."; + Text[ hindi ] = "Invalid number"; + Text[ slovak ] = "Neplatné číslo"; +}; +String STR_MINVALUE_LT_MAXVALUE +{ + Text = "Minimum muss kleiner als Maximum sein." ; + Text [ ENGLISH ] = "Minimum must be lower than Maximum." ; + Text [ norwegian ] = "Minimum m vre lavere enn Maksimum." ; + Text [ italian ] = "Il minimo deve essere inferiore al massimo." ; + Text [ portuguese_brazilian ] = "O mnimo deve ser menor que o mximo." ; + Text [ portuguese ] = "O mnimo deve ser menor que o mximo." ; + Text [ finnish ] = "Vhimmismrn on oltava pienempi kuin enimmismrn." ; + Text [ danish ] = "Minimum skal vre mindre end maksimum." ; + Text [ french ] = "Le minimum doit tre infrieur au maximum !" ; + Text [ swedish ] = "Minimum mste vara mindre n maximum." ; + Text [ dutch ] = "Minimum moet lager zijn dan maximum." ; + Text [ spanish ] = "El mnimo tiene que ser menor que el mximo." ; + Text [ english_us ] = "Minimum must be lower than maximum." ; + Text[ chinese_simplified ] = "最小值必须小于最大值。"; + Text[ russian ] = " , ."; + Text[ polish ] = "Minimum musi by mniejsze ni maksimum."; + Text[ japanese ] = "最小値は最大値より小さくなければなりません。"; + Text[ chinese_traditional ] = "最小值必須小於最大值。"; + Text[ arabic ] = " ."; + Text[ greek ] = " ."; + Text[ korean ] = "최소값은 반드시 최대값보다 작아야 합니다."; + Text[ turkish ] = "Minimum, maksimumdan daha kk olmaldr."; + Text[ catalan ] = "El mnim ha de ser menor que el mxim."; + Text[ thai ] = "จำนวนน้อยที่สุดต้องต่ำกว่าจำนวนมากที่สุด"; + Text[ czech ] = "Minimum musí být nižší než maximum."; + Text[ hebrew ] = "Minimum muss kleiner als Maximum sein."; + Text[ hindi ] = "Minimum must be lower than maximum."; + Text[ slovak ] = "Minimum musí byť menšie ako maximum."; +}; +String STR_STEP_GT_ZERO +{ + Text = "Intervall muss grer als 0 sein." ; + Text [ ENGLISH ] = "Step must be greater than 0." ; + Text [ english_us ] = "Interval must be greater than 0." ; + Text [ italian ] = "L'intervallo deve essere maggiore di 0." ; + Text [ spanish ] = "El intervalo tiene que ser mayor que 0." ; + Text [ french ] = "L'intervalle doit tre suprieur 0" ; + Text [ dutch ] = "Interval moet groter dan 0 zijn" ; + Text [ swedish ] = "Intervall mste vara strre n 0." ; + Text [ danish ] = "Intervallet skal vre strre end 0." ; + Text [ portuguese ] = "O intervalo deve ser maior que 0." ; + Text [ portuguese_brazilian ] = "O intervalo deve ser maior que 0." ; + Text[ chinese_simplified ] = "区间值必须大于零。"; + Text[ russian ] = " ."; + Text[ polish ] = "Przedzia musi by wikszy od 0."; + Text[ japanese ] = "目盛間隔は、0より大きくなければなりません。"; + Text[ chinese_traditional ] = "區間值必須大於零。"; + Text[ arabic ] = " 0."; + Text[ greek ] = " 0."; + Text[ korean ] = "간격은 반드시 0보다 커야 합니다."; + Text[ turkish ] = "Aralk, 0'dan byk olmaldr."; + Text[ catalan ] = "L'intrval ha de ser ms gran de 0."; + Text[ finnish ] = "Vlin on oltava suurempi kuin 0."; + Text[ thai ] = "ช่วงต้องมากกว่า 0."; + Text[ czech ] = "Interval musí být vyšší než 0."; + Text[ hebrew ] = "Intervall muss größer als 0 sein."; + Text[ hindi ] = "अंतराल 0 से अधिक होना चाहिए ।"; + Text[ slovak ] = "Interval musí byť väčší ako 0."; +}; +/* +String STR_STEPMAIN_LT_MAXVALUE +{ + Text = "Das Hauptintervall darf nicht grer als der Wertebereich sein." ; + Text [ ENGLISH ] = "The Main step must not be greater than the value range."; + Text [ english_us ] = "Major interval must not be larger than the range definition."; + Text [ norwegian ] = "Hovedtrinnet m vre lavere enn Maksimum." ; + Text [ italian ] = "L'intervallo principale deve essere inferiore all'area dei valori." ; + Text [ portuguese_brazilian ] = "O intervalo principal no pode ser maior que o intervalo definido." ; + Text [ portuguese ] = "O intervalo principal no pode ser maior que a rea de valores." ; + Text [ finnish ] = "Pvli ei saa olla suurempi kuin aluemritys." ; + Text [ danish ] = "Hovedintervallet m ikke vre strre end vrdiomrdet." ; + Text [ french ] = "L'intervalle principal ne peut pas tre suprieur la plage de valeurs." ; + Text [ swedish ] = "Huvudintervallet fr inte vara strre n vrdeomrdet." ; + Text [ dutch ] = "Hoofdinterval mag niet groter zijn dan het waardebereik" ; + Text [ spanish ] = "El intervalo principal no debe ser mayor que el rea de valores." ; + Text [ english_us ] = "Major interval must not be larger than the range definition." ; + Text[ chinese_simplified ] = "主区间值不能大于数值区域范围。"; + Text[ russian ] = " ."; + Text[ polish ] = "Przedzia gwny nie moe by wikszy od zdefiniowanego zakresu."; + Text[ japanese ] = "主目盛間隔は数値範囲を超えてはいけません。"; + Text[ chinese_traditional ] = "主區間值必須小於定義的最大值。"; + Text[ arabic ] = " ."; + Text[ greek ] = " ."; + Text[ korean ] = "주 간격이 값 범위보다 작거나 같아야 합니다."; + Text[ turkish ] = "Ana aralk, deer aralndan daha byk olmamaldr."; + Text[ catalan ] = "L'intrval principal no ha de ser ms gran que l'rea de valors."; + Text[ thai ] = "ช่วงหลักต้องไม่มากกว่าคำจำกัดความของช่วง"; + Text[ czech ] = "Hlavní interval musí být větší než určení okrajů."; + Text[ hebrew ] = "Das Hauptintervall darf nicht größer als der Wertebereich sein."; + Text[ hindi ] = "Main interval must not be larger than the range definition."; + Text[ slovak ] = "Hlavný interval nesmie byť väčší ako definovaná oblasť."; +}; +*/ +// String STR_STEPHELP_LT_STEPMAIN +// { +// Text = "Teilintervall muss kleiner als Hauptintervall sein." ; +// Text [ ENGLISH ] = "Help step must be lower than Main Step." ; +// Text [ norwegian ] = "Hjelpetrinnet m vre lavere enn Hovedtrinnet." ; +// Text [ italian ] = "L'intervallo ausiliario deve essere inferiore all'intervallo principale." ; +// Text [ portuguese_brazilian ] = "O intervalo auxiliar deve ser menor que o intervalo principal." ; +// Text [ portuguese ] = "O intervalo auxiliar deve ser menor que o intervalo principal." ; +// Text [ finnish ] = "Ohjevlin on oltava pienempi kuin pvlin." ; +// Text [ danish ] = "Underintervallet skal vre strre end hovedintervallet." ; +// Text [ french ] = "L'intervalle secondaire doit tre infrieur l'intervalle principal." ; +// Text [ swedish ] = "Delintervall mste vara mindre n huvudintervall." ; +// Text [ dutch ] = "Hulpinverval moet kleiner zijn dan hoofdinterval" ; +// Text [ spanish ] = "El intervalo auxiliar debe ser inferior al intervalo principal." ; +// Text [ english_us ] = "Minor interval must be smaller than the major interval." ; +// Text[ chinese_simplified ] = "次区间值必须小于主区间值。"; +// Text[ russian ] = " ."; +// Text[ polish ] = "Przedzia pomocniczy musi by mniejszy ni przedzia gwny."; +// Text[ japanese ] = "補助目盛間隔は、主目盛間隔より小さくなければなりません。"; +// Text[ chinese_traditional ] = "次區間值必須小於主區間值。"; +// Text[ arabic ] = " ."; +// Text[ greek ] = " ."; +// Text[ korean ] = "보조 간격은 주 간격보다 작아야 합니다."; +// Text[ turkish ] = "Kk zaman aral byk zaman aralndan kk olmaldr."; +// Text[ catalan ] = "L'intrval auxiliar ha de ser ms petit que l'intrval principal."; +// Text[ thai ] = "ช่วงช่วยเหลือต้องน้อยกว่าช่วงหลัก"; +// Text[ czech ] = "Pomocný interval musí být menší než hlavní interval."; +// Text[ hebrew ] = "Teilintervall muss kleiner als Hauptintervall sein."; +// Text[ hindi ] = "Help interval must be smaller than the main interval."; +// Text[ slovak ] = "Pomocný interval musí byť menší ako hlavný interval."; +// }; +/* +String STR_WRONG_ORIGIN +{ + Text = "Der Koordinatenursprung ist kleiner/grer als das\nWerteminimum/-maximum." ; + Text [ ENGLISH ] = "Origin is less/greater than Minimum/Maximum." ; + Text [ english_us ] = "The coordinate origin is less/greater than the\nminimum/maximum value." ; + Text [ italian ] = "L'origine delle coordinate maggiore / minore del \nvalore minimo/valore massimo" ; + Text [ spanish ] = "El origen de las coordenadas es mayor/menor que el\nmnimo/mximo del valor." ; + Text [ french ] = "L'origine de la coordonne est infrieure/suprieure\nau minimum/maximum des valeurs." ; + Text [ dutch ] = "Het origineel is kleiner/groter dan de \nminimum-/maximumwaarde" ; + Text [ swedish ] = "Koordinatursprunget r strre/mindre n\nminimi/maximi-vrdet." ; + Text [ danish ] = "Koordinatoprindelsen er mindre/strre end\nmininimum-/maksimumvrdien." ; + Text [ portuguese ] = "A origem das coordenadas maior/menor que o mnimo/mximo dos valores." ; + Text [ portuguese_brazilian ] = "A origem das coordenadas menor/maior que o valor mnimo/mximo." ; + Text[ chinese_simplified ] = "原点值大于/小于这个\n最大值/最小值。"; + Text[ russian ] = " /, \n/ ."; + Text[ polish ] = "Pocztek ukadu wsprzdnych jest mniejszy/wikszy ni \nwarto minimalna/maksymalna."; + Text[ japanese ] = "座標軸の原点は、最小値/最大値より\n大きい/小さいです。"; + Text[ chinese_traditional ] = "原點值大於/小於這個\n\n最大值/最小值。"; + Text[ arabic ] = " / \n /."; + Text[ greek ] = " \n / / ."; + Text[ korean ] = "좌표 시작 값이 최대/최소 값보다 작거나/큽니다."; + Text[ turkish ] = "Kordinat kayna \nasgari/azami deerinden fazla/eksik."; + Text[ catalan ] = "L'origen de les coordenades s major/menor que el\nmnim/mxim del valor."; + Text[ finnish ] = "Koordinaatiston origo on pienempi/suurempi kuin \nvhimmis-/enimmisarvo."; + Text[ thai ] = "พิกัดเริ่มต้นน้อยกว่า/มากกว่า\nค่าน้อยที่สุด/มากที่สุด"; + Text[ czech ] = "Počátek souřadnic je menší/větší než\nminimální/maximální hodnota."; + Text[ hebrew ] = "Der Koordinatenursprung ist kleiner/größer als das\nWerteminimum/-maximum."; + Text[ hindi ] = "The coordinate origin is less/greater than the\nminimum/maximum value."; + Text[ slovak ] = "Začiatok súradnice je menší/väčší ako\nminimum/maximum."; +}; +*/ +/* +String STR_BAD_LOGARITHM +{ + Text = "In logarithmischer Darstellung mssen Nullpunkt und Minimum\ngrer als 0 sein." ; + Text [ ENGLISH ] = "Origin or Minimum must be greater than 0 in\nlogarithm view." ; + Text [ english_us ] = "In logarithm view, the origin and minimum must be greater than 0\n." ; + Text [ dutch ] = "In logaritmische weergave moeten nulpunt en minimum\ngroter dan 0 zijn." ; + Text [ italian ] = "Nella rappresentazione logaritmica il punto zero e minimo devono essere\nmaggiori di 0." ; + Text [ spanish ] = "En una representacin logartmica el origen y el mnimo\ntienen que ser mayor que 0." ; + Text [ french ] = "Dans la reprsentation logarithmique, l'origine et le minimum\ndoivent tre suprieurs 0." ; + Text [ swedish ] = "I logaritmisk visning mste ursprunget och minimum vara\nstrre n 0." ; + Text [ danish ] = "I en logaritmisk visning skal nulpunkt og minimum\nvre strre end 0." ; + Text [ portuguese ] = "Numa apresentao logartmica os pontos zero e o \n mnimo devem ser maiores que 0." ; + Text [ portuguese_brazilian ] = "Numa grfico logartmico, a origem e o mnimo devem ser maiores que 0\n." ; + Text[ chinese_simplified ] = "对数表达式中的原点和数值不允许小于零。"; + Text[ russian ] = " \n ."; + Text[ polish ] = "W widoku logarytmicznym pocztek i minimum musz by wiksze od zera.\n"; + Text[ japanese ] = "対数表示において零点と最小値は\n0よりも大きくなければなりません。"; + Text[ chinese_traditional ] = "對數顯示中的數值不允許小於零。"; + Text[ arabic ] = " \n 0."; + Text[ greek ] = " \n 0."; + Text[ korean ] = "로그 보기에서는 원점과 극소점이\n 0보다 커야 합니다."; + Text[ turkish ] = "Logaritmik grnmde, sfr noktas ve minimum 0'dan\nbyk olmaldr."; + Text[ catalan ] = "En una representaci logartmica l'origen i el mnim\nhan de ser ms grans que 0."; + Text[ finnish ] = "Logaritminkymss aloitusarvo ja pienin arvo eivt saa olla suurempia kuin 0.\n"; + Text[ thai ] = "ในมุมมองลอการิธึม จุดเริ่มต้นและน้อยที่สุดต้องมากกว่า 0\n."; + Text[ czech ] = "V logaritmickém pohledu musí být minimum a originál vyšší než 0\n."; + Text[ hebrew ] = "In logarithmischer Darstellung müssen Nullpunkt und Minimum\ngrößer als 0 sein."; + Text[ hindi ] = "In logarithm view, the origin and minimum must be greater than 0\n."; + Text[ slovak ] = "V logaritmickom zobrazení musí byť začiatok aj minimum väčšie ako 0."; +}; +*/ diff --git a/chart2/source/controller/dialogs/Strings_Statistic.src b/chart2/source/controller/dialogs/Strings_Statistic.src new file mode 100644 index 000000000..f8cbaddb6 --- /dev/null +++ b/chart2/source/controller/dialogs/Strings_Statistic.src @@ -0,0 +1,338 @@ +/************************************************************************* + * + * $RCSfile: Strings_Statistic.src,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:25 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "Strings.hrc" + +//SchStatisticTabPage and SchDataStatisticsDlg +String STR_INDICATE_NONE +{ + Text = "Keine Indikatoren" ; + Text [ ENGLISH ] = "No indicators" ; + Text [ english_us ] = "No Indicators" ; + Text [ italian ] = "Senza indicatori" ; + Text [ spanish ] = "Sin indicadores" ; + Text [ french ] = "Aucun indicateur" ; + Text [ dutch ] = "Geen indicatoren" ; + Text [ swedish ] = "Inga indikatorer" ; + Text [ danish ] = "Ingen indikatorer" ; + Text [ portuguese ] = "Nenhum Indicador" ; + Text [ portuguese_brazilian ] = "Nenhum Indicador" ; + Text[ chinese_simplified ] = "无标示"; + Text[ russian ] = " "; + Text[ polish ] = "Brak wskanikw"; + Text[ japanese ] = "インジケータなし"; + Text[ chinese_traditional ] = "不顯示"; + Text[ arabic ] = " "; + Text[ greek ] = " "; + Text[ korean ] = "표시기 없음"; + Text[ turkish ] = "Gsterge yok"; + Text[ catalan ] = "Sense indicadors"; + Text[ finnish ] = "Ei ilmaisimia"; + Text[ thai ] = "ไม่มีตัวบ่งชี้"; + Text[ czech ] = "Bez indikátorů"; + Text[ hebrew ] = "Keine Indikatoren"; + Text[ hindi ] = "No Indicators"; + Text[ slovak ] = "Bez indikátorov"; +}; +String STR_INDICATE_BOTH +{ + Text = "Indikatoren beidseitig" ; + Text [ ENGLISH ] = "Indicators on both sides" ; + Text [ dutch ] = "Indicatoren aan beide kanten" ; + Text [ english_us ] = "Indicators Top and Bottom" ; + Text [ italian ] = "Indicatore su ambedue i lati" ; + Text [ spanish ] = "Indicadores a ambos lados" ; + Text [ french ] = "Indicateurs des deux cts" ; + Text [ swedish ] = "Indikatorer p bda sidor" ; + Text [ danish ] = "Indikatorer p begge sider" ; + Text [ portuguese ] = "Indicadores em ambos os lados" ; + Text [ portuguese_brazilian ] = "Indicadores em cima e em baixo" ; + Text[ chinese_simplified ] = "上下方向的指示"; + Text[ russian ] = " "; + Text[ polish ] = "Wskaniki grne i dolne"; + Text[ japanese ] = "インジケータ上下"; + Text[ language_user1 ] = ": - -"; + Text[ chinese_traditional ] = "上下方向的指示"; + Text[ arabic ] = " "; + Text[ greek ] = " "; + Text[ korean ] = "위와 아래 표시기"; + Text[ turkish ] = "Alt ve st gsterge"; + Text[ catalan ] = "Indicadors superiors i inferiors"; + Text[ finnish ] = "Ilmaisimet yl- ja alareunassa"; + Text[ thai ] = "ตัวบ่งชี้บนและล่าง"; + Text[ czech ] = "Indikátory nahoře a dole"; + Text[ hebrew ] = "Indikatoren beidseitig"; + Text[ hindi ] = "निदर्शकें ऊपर और नीचे"; + Text[ slovak ] = "Indikátory hore a dole"; +}; +String STR_INDICATE_DOWN +{ + Text = "Unterer Indikator" ; + Text [ ENGLISH ] = "Lower indicator" ; + Text [ english_us ] = "Lower Indicator" ; + Text [ italian ] = "Indicatore inferiore" ; + Text [ spanish ] = "Indicador inferior" ; + Text [ french ] = "Indicateur infrieur" ; + Text [ dutch ] = "Indicator beneden" ; + Text [ swedish ] = "Undre indikator" ; + Text [ danish ] = "Nederste indikator" ; + Text [ portuguese ] = "Indicador inferior" ; + Text [ portuguese_brazilian ] = "Indicador inferior" ; + Text[ chinese_simplified ] = "下标示"; + Text[ russian ] = " "; + Text[ polish ] = "Dolny wskanik"; + Text[ japanese ] = "インジケータ下"; + Text[ chinese_traditional ] = "下方顯示"; + Text[ arabic ] = " "; + Text[ greek ] = " "; + Text[ korean ] = "아래쪽 표시기"; + Text[ turkish ] = "Alt gsterge"; + Text[ catalan ] = "Indicador inferior"; + Text[ finnish ] = "Alempi ilmaisin"; + Text[ thai ] = "ตัวบ่งชี้ต่ำกว่า"; + Text[ czech ] = "Dolní indikátor"; + Text[ hebrew ] = "Unterer Indikator"; + Text[ hindi ] = "Lower Indicator"; + Text[ slovak ] = "Dolný indikátor"; +}; +String STR_INDICATE_UP +{ + Text = "Oberer Indikator" ; + Text [ ENGLISH ] = "Upper indicator" ; + Text [ english_us ] = "Upper Indicator" ; + Text [ italian ] = "Indicatore superiore" ; + Text [ spanish ] = "Indicador superior" ; + Text [ french ] = "Indicateur suprieur" ; + Text [ dutch ] = "Indicator boven" ; + Text [ swedish ] = "vre indikator" ; + Text [ danish ] = "verste indikator" ; + Text [ portuguese ] = "Indicador superior" ; + Text [ portuguese_brazilian ] = "Indicador superior" ; + Text[ chinese_simplified ] = "上标示"; + Text[ russian ] = " "; + Text[ polish ] = "Grny wskanik"; + Text[ japanese ] = "インジケータ上"; + Text[ chinese_traditional ] = "上方顯示"; + Text[ arabic ] = " "; + Text[ greek ] = " "; + Text[ korean ] = "위쪽 표시기"; + Text[ turkish ] = "st gsterge"; + Text[ catalan ] = "Indicador superior"; + Text[ finnish ] = "Ylempi ilmaisin"; + Text[ thai ] = "ตัวบ่งชี้สูงกว่า"; + Text[ czech ] = "Horní indikátor"; + Text[ hebrew ] = "Oberer Indikator"; + Text[ hindi ] = "ऊपरी निदर्शक"; + Text[ slovak ] = "Horný indikátor"; +}; + +//------------------------------------------------------------------------ +//------------------------------------------------------------------------ + +String STR_REGRESSION_NONE +{ + Text = "Keine Regression" ; + Text [ ENGLISH ] = "No regression" ; + Text [ dutch ] = "Geen regressie" ; + Text [ english_us ] = "No Regression" ; + Text [ italian ] = "Nessuna regressione" ; + Text [ spanish ] = "Ninguna regresin" ; + Text [ french ] = "Aucune rgression" ; + Text [ swedish ] = "Ingen regression" ; + Text [ danish ] = "Ingen regression" ; + Text [ portuguese ] = "Sem regresso" ; + Text [ portuguese_brazilian ] = "Sem Regresso" ; + Text[ chinese_simplified ] = "无回归"; + Text[ russian ] = " "; + Text[ polish ] = "Brak regresji"; + Text[ japanese ] = "回帰なし"; + Text[ chinese_traditional ] = "無回歸"; + Text[ arabic ] = " "; + Text[ greek ] = " "; + Text[ korean ] = "회귀선 없음"; + Text[ turkish ] = "Regresyon yok"; + Text[ catalan ] = "Cap regressi"; + Text[ finnish ] = "Ei regressiota"; + Text[ thai ] = "ไม่ถดถอย"; + Text[ czech ] = "Bez regrese"; + Text[ hebrew ] = "Keine Regression"; + Text[ hindi ] = "No Regression"; + Text[ slovak ] = "Bez regresie"; +}; +String STR_REGRESSION_LINEAR +{ + Text = "Lineare Regression" ; + Text [ ENGLISH ] = "Linear regression" ; + Text [ dutch ] = "Lineaire regressie" ; + Text [ english_us ] = "Linear regression" ; + Text [ italian ] = "Regressione lineare" ; + Text [ spanish ] = "Regresin lineal" ; + Text [ french ] = "Rgression linaire" ; + Text [ swedish ] = "Linjr regression" ; + Text [ danish ] = "Liner regression" ; + Text [ portuguese ] = "Regresso linear" ; + Text [ portuguese_brazilian ] = "Regresso linear" ; + Text[ chinese_simplified ] = "等差回归"; + Text[ russian ] = " "; + Text[ polish ] = "Regresja liniowa"; + Text[ japanese ] = "線形回帰"; + Text[ chinese_traditional ] = "等差回歸"; + Text[ arabic ] = " "; + Text[ greek ] = " "; + Text[ korean ] = "선 회귀선"; + Text[ turkish ] = "Dorusal regresyon"; + Text[ catalan ] = "Regressi lineal"; + Text[ finnish ] = "Lineaarinen regressio"; + Text[ thai ] = "ถดถอยแบบเส้นตรง"; + Text[ czech ] = "Lineární regrese"; + Text[ hebrew ] = "Lineare Regression"; + Text[ hindi ] = "Linear regression"; + Text[ slovak ] = "Lineárna regresia"; +}; +String STR_REGRESSION_LOG +{ + Text = "Logarithmische Regression" ; + Text [ ENGLISH ] = "Logarithm regression" ; + Text [ english_us ] = "Logarithm regression" ; + Text [ italian ] = "Regressione logaritmica" ; + Text [ spanish ] = "Regresin logartmica" ; + Text [ french ] = "Rgression logarithmique" ; + Text [ dutch ] = "Logaritmische regressie" ; + Text [ swedish ] = "Logaritmisk regression" ; + Text [ danish ] = "Logaritmisk regression" ; + Text [ portuguese ] = "Regresso logartmica" ; + Text [ portuguese_brazilian ] = "Regresso logartmica" ; + Text[ chinese_simplified ] = "对数回归"; + Text[ russian ] = " "; + Text[ polish ] = "Regresja logarytmiczna"; + Text[ japanese ] = "対数の回帰"; + Text[ chinese_traditional ] = "對數回歸"; + Text[ arabic ] = " "; + Text[ greek ] = " "; + Text[ korean ] = "로그 회귀선"; + Text[ turkish ] = "Logaritmik regresyon"; + Text[ catalan ] = "Regressi logartmica"; + Text[ finnish ] = "Logaritminen regressio"; + Text[ thai ] = "ถดถอยแบบลอการิธึม"; + Text[ czech ] = "Logaritmická regrese"; + Text[ hebrew ] = "Logarithmische Regression"; + Text[ hindi ] = "लघुगणक रिग्रेश्यन"; + Text[ slovak ] = "Logaritmická regresia"; +}; +String STR_REGRESSION_EXP +{ + Text = "Exponentielle Regression" ; + Text [ ENGLISH ] = "Exponential regression" ; + Text [ dutch ] = "Exponentile regressie" ; + Text [ english_us ] = "Exponential Regression" ; + Text [ italian ] = "Regressione esponenziale" ; + Text [ spanish ] = "Regresin exponencial" ; + Text [ french ] = "Rgression exponentielle" ; + Text [ swedish ] = "Exponentiell regression" ; + Text [ danish ] = "Eksponentiel regression" ; + Text [ portuguese ] = "Regresso exponencial" ; + Text [ portuguese_brazilian ] = "Regresso exponencial" ; + Text[ chinese_simplified ] = "指数回归"; + Text[ russian ] = " "; + Text[ polish ] = "Regresja wykadnicza"; + Text[ japanese ] = "指数の回帰"; + Text[ chinese_traditional ] = "指數回歸"; + Text[ arabic ] = " "; + Text[ greek ] = " "; + Text[ korean ] = "지수 회귀선"; + Text[ turkish ] = "stel regresyon"; + Text[ catalan ] = "Regressi exponencial"; + Text[ finnish ] = "Eksponentiaalinen regressio"; + Text[ thai ] = "ถดถอยแบบเอ็กซ์โปเนนเชียล"; + Text[ czech ] = "Exponenciální regrese"; + Text[ hebrew ] = "Exponentielle Regression"; + Text[ hindi ] = "Exponential Regression"; + Text[ slovak ] = "Exponenciálna regresia"; +}; +String STR_REGRESSION_POWER +{ + Text = "Potenzielle Regression" ; + Text [ ENGLISH ] = "Power regression" ; + Text [ english_us ] = "Power regression" ; + Text [ italian ] = "Regressione potenziale" ; + Text [ spanish ] = "Regresin potencial" ; + Text [ french ] = "Rgression potentielle" ; + Text [ dutch ] = "Potentile regressie" ; + Text [ swedish ] = "Potentiell regression" ; + Text [ danish ] = "Potentiel regression" ; + Text [ portuguese ] = "Regresso potencial" ; + Text [ portuguese_brazilian ] = "Regresso de potncia" ; + Text[ chinese_simplified ] = "位能回归"; + Text[ russian ] = " "; + Text[ polish ] = "Regresja potgowa"; + Text[ japanese ] = "乗羃の回帰"; + Text[ chinese_traditional ] = "指數回歸"; + Text[ arabic ] = " "; + Text[ greek ] = " "; + Text[ korean ] = "퍼텐셜회귀선"; + Text[ turkish ] = "Kuvvet regresyonu"; + Text[ catalan ] = "Regressi potencial"; + Text[ finnish ] = "Polynomiregressio"; + Text[ thai ] = "กำลังการถดถอย"; + Text[ czech ] = "Mocninná regrese"; + Text[ hebrew ] = "Potenzielle Regression"; + Text[ hindi ] = "पवर रिग्रेश्यन"; + Text[ slovak ] = "Mocninová regresia"; +}; diff --git a/chart2/source/controller/dialogs/TabPages.hrc b/chart2/source/controller/dialogs/TabPages.hrc new file mode 100644 index 000000000..3907fe88f --- /dev/null +++ b/chart2/source/controller/dialogs/TabPages.hrc @@ -0,0 +1,212 @@ +/************************************************************************* + * + * $RCSfile: TabPages.hrc,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:25 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef CHART_TABPAGES_HRC +#define CHART_TABPAGES_HRC + +//see attrib.hrc in old chart + +#define TP_LEGEND_POS 900 +#define GRP_LEGEND 1 +#define RBT_NONE 1 +#define RBT_LEFT 2 +#define RBT_TOP 3 +#define RBT_RIGHT 4 +#define RBT_BOTTOM 5 + +#define TP_DATA_DESCR 901 +#define CB_VALUE 1 +#define CB_TEXT 2 +#define CB_SYMBOL 3 +#define RB_NUMBER 1 +#define RB_PERCENT 2 + +#define TP_ALIGNMENT 902 +////#define FL_ORDER 2 +////#define RBT_SIDEBYSIDE 1 +////#define RBT_UPDOWN 2 +////#define RBT_DOWNUP 3 +////#define RBT_AUTOORDER 4 + +#define TP_STAT 905 +#define FL_ERROR 1 +#define RBT_NONE 1 +#define RBT_VARIANT 2 +#define RBT_SIGMA 3 +#define RBT_PERCENT 4 +#define RBT_BIGERROR 5 +#define RBT_CONST 6 +#define CBX_AVERAGE 1 +#define MTR_FLD_PERCENT 1 +#define MTR_FLD_BIGERROR 2 +#define MTR_FLD_PLUS 3 +#define MTR_FLD_MINUS 4 +#define FT_PERCENT_PLUS 1 +#define FT_PERCENT_MINUS 2 +#define FT_INDICATE 3 +#define FT_REGRESS 4 +#define CT_INDICATE 1 +#define CT_REGRESS 2 +#define FL_TEXTBREAK 3 +#define CBX_TEXTBREAK 2 +#define CBX_TEXTOVERLAP 4 + +//Seit 4/1998 koennen Texte frei gedreht werden: SCHATTR_TEXT_DEGREES +// ID's for title rotation tabpage +#define CTR_DIAL 6030 +#define BTN_TXTSTACKED 6031 +#define FT_DEGREES 6032 +#define NF_ORIENT 6033 +#define CTR_DUMMY 6034 +#define FT_DUMMY 6035 +#define FL_ALIGN 6037 + +/* +//Symbol-Tabpage (zum Teil sehr Aehnlich der SVX_AREA_TABPAGE) (obsolete) +#define TP_SYMBOL 906 +#define RBT_COLOR 1 +#define RBT_GRADIENT 2 +#define RBT_HATCHING 3 +#define RBT_BITMAP 4 +#define RBT_INVISIBLE 5 +#define LB_COLOR 1 +#define LB_GRADIENT 2 +#define LB_HATCHING 3 +#define LB_BITMAP 4 + +#define GRP_FILL 1 +#define CTL_BITMAP_PREVIEW 6 +*/ +#define TP_LAYOUT 907 +#define FT_LY_SHAPE 1 +#define LB_LY_SHAPE 2 + +#define TP_OPTIONS 908 +#define GRP_OPT_AXIS 1 +#define RBT_OPT_AXIS_1 2 +#define RBT_OPT_AXIS_2 3 +#define MT_GAP 4 +#define MT_OVERLAP 5 +#define FT_GAP 6 +#define FT_OVERLAP 7 +#define GB_BAR 8 +#define CB_CONNECTOR 9 + +//------------ +//from old chart tplabel.hrc + +#define TP_AXIS_LABEL 920 + +#define CB_AXIS_LABEL_SCHOW_DESCR 1 + +//#define FL_AXIS_LABEL_FORMATTING 2 + +#define FL_AXIS_LABEL_ORIENTATION 3 +#define CT_AXIS_LABEL_DIAL 4 +#define PB_AXIS_LABEL_TEXTSTACKED 5 +#define FT_AXIS_LABEL_DEGREES 6 +#define NF_AXIS_LABEL_ORIENT 7 +#define FT_UNUSED 8 +#define CT_UNUSED 9 + +#define FL_AXIS_LABEL_TEXTFLOW 10 +#define CB_AXIS_LABEL_TEXTOVERLAP 11 +#define CB_AXIS_LABEL_TEXTBREAK 12 + +#define FL_AXIS_LABEL_ORDER 13 +#define RB_AXIS_LABEL_SIDEBYSIDE 14 +#define RB_AXIS_LABEL_UPDOWN 15 +#define RB_AXIS_LABEL_DOWNUP 16 +#define RB_AXIS_LABEL_AUTOORDER 17 + +#define FL_SEPARATOR 18 + +#define TP_SCALE_Y 903 + +#define FL_SCALE_Y 1 +#define FL_TICKS 2 +#define FL_HELPTICKS 3 + +#define TXT_MIN 1 +#define TXT_MAX 2 +#define TXT_STEP_MAIN 3 +#define TXT_STEP_HELP 4 +#define TXT_ORIGIN 5 + +#define CBX_AUTO_MIN 1 +#define CBX_AUTO_MAX 2 +#define CBX_AUTO_STEP_MAIN 3 +#define CBX_AUTO_STEP_HELP 4 +#define CBX_AUTO_ORIGIN 5 +#define CBX_LOGARITHM 6 +#define CBX_TICKS_INNER 7 +#define CBX_HELPTICKS_INNER 8 +#define CBX_TICKS_OUTER 9 +#define CBX_HELPTICKS_OUTER 10 + +#define EDT_STEP_MAIN 1 +#define EDT_MAX 2 +#define EDT_MIN 3 +// #define EDT_STEP_HELP 4 +#define EDT_ORIGIN 5 + +#define MT_STEPHELP 10 + +#endif diff --git a/chart2/source/controller/dialogs/dlg_ChartType.cxx b/chart2/source/controller/dialogs/dlg_ChartType.cxx new file mode 100644 index 000000000..1eca12c7a --- /dev/null +++ b/chart2/source/controller/dialogs/dlg_ChartType.cxx @@ -0,0 +1,1072 @@ +/************************************************************************* + * + * $RCSfile: dlg_ChartType.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:25 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +/* +#ifndef _SV_MSGBOX_HXX //autogen +#include <vcl/msgbox.hxx> +#endif +#include <sfx2/sfxsids.hrc> +#include <svx/eeitem.hxx> +#pragma hdrstop + +#include "schdll.hxx" +#define ITEMID_CHARTSTYLE CHATTR_DIAGRAM_STYLE +#ifndef _SVX_CHRTITEM_HXX //autogen +#include <svx/chrtitem.hxx> +#endif + +#include "strings.hrc" +#include "res_bmp.hrc" +// for high contrast images +#include "res_hc_bmp.hrc" + +#include "schresid.hxx" +#include "chtmodel.hxx" +#include "diagrtyp.hxx" +#include "diagrtyp.hrc" + +#include "chmod3d.hxx" +#include "schattr.hxx" +// TVM: CHTYPE wurde ins Model verschoben +*/ + +#include "dlg_ChartType.hxx" +#include "dlg_ChartType.hrc" +#include "ResId.hxx" +#include "Bitmaps.hrc" +#include "Bitmaps_HC.hrc" +#include "Strings.hrc" + +#include "SchSfxItemIds.hxx" + +//#include "SchAllDefinesFor_svx_chrtitem.hxx" +#define ITEMID_CHARTSTYLE SCHATTR_DIAGRAM_STYLE +#ifndef _SVX_CHRTITEM_HXX +#include <svx/chrtitem.hxx> +#endif + +// header for class SfxInt32Item +#ifndef _SFXINTITEM_HXX +#include <svtools/intitem.hxx> +#endif + +// header for define RET_OK +#ifndef _SV_MSGBOX_HXX +#include <vcl/msgbox.hxx> +#endif + + +#define OFFSET_PYRAMID 1000 +#define OFFSET_ROUND 2000 +#define OFFSET_CONE 3000 + +//GetChartShapeStyle() +//#define CHART_SHAPE3D_IGNORE -2 +#define CHART_SHAPE3D_ANY -1 +//#define CHART_SHAPE3D_SQUARE 0 +#define CHART_SHAPE3D_CYLINDER 1 +#define CHART_SHAPE3D_CONE 2 +#define CHART_SHAPE3D_PYRAMID 3 +//#define CHART_SHAPE3D_HANOI 4 + +// base diagram types +//#define CHTYPE_INVALID 0 +#define CHTYPE_LINE 1 +//#define CHTYPE_LINESYMB 2 // this one has to be removed !! (why?) +#define CHTYPE_AREA 3 +#define CHTYPE_COLUMN 4 // is also a bar-type +#define CHTYPE_BAR 5 +#define CHTYPE_CIRCLE 6 +#define CHTYPE_XY 7 +#define CHTYPE_NET 8 +//#define CHTYPE_DONUT 9 +#define CHTYPE_STOCK 10 +//#define CHTYPE_ADDIN 11 + +//............................................................................. +namespace chart +{ +//............................................................................. + +// macro for selecting a normal or high contrast bitmap the stack variable +// bIsHighContrast must exist and reflect the correct state +#define SELECT_BITMAP(name) Bitmap( SchResId( bIsHighContrast ? name ## _HC : name )) + +SchDiagramTypeDlg::SchDiagramTypeDlg(Window* pWindow, + const SfxItemSet& rInAttrs) : + ModalDialog(pWindow, SchResId(DLG_DIAGRAM_TYPE)), + + n3DGeometry(CHART_SHAPE3D_ANY), + aRbt2D(this, ResId(RBT_2D)), + aRbt3D(this, ResId(RBT_3D)), + aFlDimension(this, ResId(FL_DIMENSION)), + aFtDeep( this, ResId( FT_DEEP ) ), + aMtrFldDeep( this, ResId( MTR_FLD_DEEP ) ), + aFtGran( this, ResId( FT_GRAN ) ), + aMtrFldGran( this, ResId( MTR_FLD_GRAN ) ), + aFtNumLines( this, ResId( FT_NUM_OF_LINES ) ), + aMtrFldNumLines( this, ResId( MTR_FLD_NUM_OF_LINES ) ), + + aFtType(this, ResId(FT_TYPE)), + aCtlType(this, ResId(CTL_TYPE)), + aFtVariant(this, ResId(FT_VARIANT)), + aCtlVariant(this, ResId(CTL_VARIANT)), + aBtnOK(this, ResId(BTN_OK)), + aBtnCancel(this, ResId(BTN_CANCEL)), + aBtnHelp(this, ResId(BTN_HELP)), + eDimension(CHDIM_2D), + rOutAttrs(rInAttrs) +{ + FreeResource(); + + aRbt2D.SetClickHdl(LINK(this, SchDiagramTypeDlg, + SelectDimensionHdl)); + aRbt3D.SetClickHdl(LINK(this, SchDiagramTypeDlg, + SelectDimensionHdl)); + + aCtlType.SetStyle(aCtlType.GetStyle() | + /*WB_ITEMBORDER | WB_DOUBLEBORDER |*/ WB_NAMEFIELD | WB_VSCROLL ); + + aCtlType.SetColCount(4); + aCtlType.SetLineCount(2); + aCtlType.SetExtraSpacing(2); + + aCtlType.SetSelectHdl(LINK(this, SchDiagramTypeDlg, SelectTypeHdl)); + aCtlType.SetDoubleClickHdl(LINK(this, SchDiagramTypeDlg, + DoubleClickHdl)); + + aCtlVariant.SetStyle(aCtlVariant.GetStyle() | + /*WB_ITEMBORDER | WB_DOUBLEBORDER |*/ WB_NAMEFIELD | WB_VSCROLL ); + + aCtlVariant.SetColCount(4); + aCtlVariant.SetLineCount(1); + aCtlVariant.SetExtraSpacing(2); + aCtlVariant.SetDoubleClickHdl(LINK(this, SchDiagramTypeDlg, DoubleClickHdl)); + aCtlVariant.SetSelectHdl(LINK(this, SchDiagramTypeDlg, ClickHdl)); + + Reset(); + + //ToDo: This is just to have some default + SetMaximumNumberOfLines( 12 ); +} + +/************************************************************************* +|* +|* Destruktor +|* +\************************************************************************/ + +SchDiagramTypeDlg::~SchDiagramTypeDlg() +{ +} +/************************************************************************* +|* +|* Initialisierung +|* +\*************************************************************************/ + +void SchDiagramTypeDlg::Reset() +{ + const SfxPoolItem *pPoolItem = NULL; + + if (rOutAttrs.GetItemState(SCHATTR_STYLE_SHAPE, TRUE, &pPoolItem) + == SFX_ITEM_SET) + n3DGeometry=((const SfxInt32Item*)pPoolItem)->GetValue(); + + if (rOutAttrs.GetItemState(SCHATTR_DIAGRAM_STYLE, TRUE, &pPoolItem) + == SFX_ITEM_SET) + { + USHORT nType; + ChartDimension eDim; + + //Hier sollte demnaechst folgendes ersatzweise stehen: + //nType=pDoc->GetBaseType(); + //eDim=(pDoc->GetDisplayDimension()==3)?CHDIM_3D:CHDIM_2D; + + switch (((const SvxChartStyleItem*)pPoolItem)->GetValue()) + { + case CHSTYLE_2D_B_SPLINE : + case CHSTYLE_2D_B_SPLINE_SYMBOL : + case CHSTYLE_2D_LINE: + case CHSTYLE_2D_STACKEDLINE: + case CHSTYLE_2D_PERCENTLINE: + case CHSTYLE_2D_LINESYMBOLS: + case CHSTYLE_2D_STACKEDLINESYM: + case CHSTYLE_2D_PERCENTLINESYM: + case CHSTYLE_2D_CUBIC_SPLINE : + case CHSTYLE_2D_CUBIC_SPLINE_SYMBOL : + nType = CHTYPE_LINE; + eDim = CHDIM_2D; + break; + + case CHSTYLE_2D_COLUMN: + case CHSTYLE_2D_STACKEDCOLUMN: + case CHSTYLE_2D_PERCENTCOLUMN: + case CHSTYLE_2D_LINE_COLUMN: + case CHSTYLE_2D_LINE_STACKEDCOLUMN: + + nType = CHTYPE_COLUMN; + eDim = CHDIM_2D; + break; + + case CHSTYLE_2D_BAR: + case CHSTYLE_2D_STACKEDBAR: + case CHSTYLE_2D_PERCENTBAR: + nType = CHTYPE_BAR; + eDim = CHDIM_2D; + break; + + case CHSTYLE_2D_AREA: + case CHSTYLE_2D_STACKEDAREA: + case CHSTYLE_2D_PERCENTAREA: + nType = CHTYPE_AREA; + eDim = CHDIM_2D; + break; + + case CHSTYLE_2D_PIE: + case CHSTYLE_2D_PIE_SEGOF1: + case CHSTYLE_2D_PIE_SEGOFALL: + case CHSTYLE_2D_DONUT1: + case CHSTYLE_2D_DONUT2: + nType = CHTYPE_CIRCLE; + eDim = CHDIM_2D; + break; + + case CHSTYLE_2D_B_SPLINE_XY : + case CHSTYLE_2D_XY_LINE : + case CHSTYLE_2D_B_SPLINE_SYMBOL_XY : + case CHSTYLE_2D_XYSYMBOLS: + case CHSTYLE_2D_XY: + case CHSTYLE_2D_CUBIC_SPLINE_XY : + case CHSTYLE_2D_CUBIC_SPLINE_SYMBOL_XY : + nType = CHTYPE_XY; + eDim = CHDIM_2D; + break; + + case CHSTYLE_2D_NET: + case CHSTYLE_2D_NET_SYMBOLS: + case CHSTYLE_2D_NET_STACK: + case CHSTYLE_2D_NET_SYMBOLS_STACK: + case CHSTYLE_2D_NET_PERCENT: + case CHSTYLE_2D_NET_SYMBOLS_PERCENT: + nType = CHTYPE_NET; + eDim = CHDIM_2D; + break; + + case CHSTYLE_3D_STRIPE: + nType = CHTYPE_LINE; + eDim = CHDIM_3D; + break; + + case CHSTYLE_3D_COLUMN: + case CHSTYLE_3D_FLATCOLUMN: + case CHSTYLE_3D_STACKEDFLATCOLUMN: + case CHSTYLE_3D_PERCENTFLATCOLUMN: + nType = CHTYPE_COLUMN; + eDim = CHDIM_3D; + break; + + case CHSTYLE_3D_BAR: + case CHSTYLE_3D_FLATBAR: + case CHSTYLE_3D_STACKEDFLATBAR: + case CHSTYLE_3D_PERCENTFLATBAR: + nType = CHTYPE_BAR; + eDim = CHDIM_3D; + break; + + case CHSTYLE_3D_AREA: + case CHSTYLE_3D_STACKEDAREA: + case CHSTYLE_3D_PERCENTAREA: + nType = CHTYPE_AREA; + eDim = CHDIM_3D; + break; + + case CHSTYLE_3D_PIE: + nType = CHTYPE_CIRCLE; + eDim = CHDIM_3D; + break; + + case CHSTYLE_2D_STOCK_1: + case CHSTYLE_2D_STOCK_2: + case CHSTYLE_2D_STOCK_3: + case CHSTYLE_2D_STOCK_4: + nType = CHTYPE_STOCK; + eDim = CHDIM_2D; + break; + + default: + DBG_ERROR("Invalid chart style given!"); + return; + } + + if (eDim == CHDIM_3D) + { + aRbt3D.Check(TRUE); + eDimension = CHDIM_2D; + SelectDimensionHdl(&aRbt3D); + } + else + { + aRbt2D.Check(TRUE); + eDimension = CHDIM_3D; + SelectDimensionHdl(&aRbt2D); + } + + aCtlType.SelectItem(nType); + SelectTypeHdl(&aCtlType); + + USHORT nItemChartType = static_cast< USHORT >( + static_cast< const SvxChartStyleItem * >( pPoolItem )->GetValue() ); + + SwitchDepth( nItemChartType ); + SwitchNumLines( nItemChartType ); + } + + if (rOutAttrs.GetItemState(SCHATTR_NUM_OF_LINES_FOR_BAR, TRUE, &pPoolItem) + == SFX_ITEM_SET) + { + aMtrFldNumLines.SetValue( + reinterpret_cast< const SfxInt32Item * >( pPoolItem )->GetValue()); + } + + if (rOutAttrs.GetItemState(SCHATTR_SPLINE_RESOLUTION, TRUE, &pPoolItem) + == SFX_ITEM_SET) + { + aMtrFldGran.SetValue( + reinterpret_cast< const SfxInt32Item * >( pPoolItem )->GetValue()); + } + + if (rOutAttrs.GetItemState(SCHATTR_SPLINE_ORDER, TRUE, &pPoolItem) + ==SFX_ITEM_SET) + { + aMtrFldDeep.SetValue( + reinterpret_cast< const SfxInt32Item * >( pPoolItem )->GetValue()); + } +} + +/************************************************************************* +|* +|* Fuellt das Typ-Set mit Bitmaps +|* +\************************************************************************/ + +void SchDiagramTypeDlg::FillTypeSet(ChartDimension eDim, bool bForce /* default: false */ ) +{ + if (eDim != eDimension || bForce) + { + eDimension = eDim; + + USHORT nSelId = aCtlType.IsNoSelection() ? + 0 : aCtlType.GetSelectItemId(); + + aCtlType.Clear(); + + bool bIsHighContrast = ( true && GetDisplayBackground().GetColor().IsDark() ); + + if (aRbt2D.IsChecked()) + { + aCtlType.InsertItem(CHTYPE_LINE, + SELECT_BITMAP( BMP_LINES_2D ), + String(SchResId(STR_LINES))); + aCtlType.InsertItem(CHTYPE_AREA, + SELECT_BITMAP( BMP_AREAS_2D ), + String(SchResId(STR_AREAS))); + aCtlType.InsertItem(CHTYPE_COLUMN, + SELECT_BITMAP( BMP_COLUMNS_2D ), + String(SchResId(STR_COLUMNS))); + aCtlType.InsertItem(CHTYPE_BAR, + SELECT_BITMAP( BMP_BARS_2D ), + String(SchResId(STR_BARS))); + aCtlType.InsertItem(CHTYPE_CIRCLE, + SELECT_BITMAP( BMP_CIRCLES_2D ), + String(SchResId(STR_CIRCLES))); + aCtlType.InsertItem(CHTYPE_XY, + SELECT_BITMAP( BMP_XYSYMB_2D ), + String(SchResId(STR_XY))); + aCtlType.InsertItem(CHTYPE_NET, + SELECT_BITMAP( BMP_NET_2D ), + String(SchResId(STR_NET))); + aCtlType.InsertItem(CHTYPE_STOCK, + SELECT_BITMAP( BMP_STOCK_2 ), + String(SchResId(STR_STOCK))); + } + else + { + aCtlType.InsertItem(CHTYPE_LINE, + SELECT_BITMAP( BMP_LINES_3D ), + String(SchResId(STR_LINES))); + aCtlType.InsertItem(CHTYPE_AREA, + SELECT_BITMAP( BMP_AREAS_3D_1 ), + String(SchResId(STR_AREAS))); + aCtlType.InsertItem(CHTYPE_BAR, + SELECT_BITMAP( BMP_BARS_3D_1 ), + String(SchResId(STR_BARS))); + aCtlType.InsertItem(CHTYPE_COLUMN, + SELECT_BITMAP( BMP_COLUMNS_3D_1 ), + String(SchResId(STR_COLUMNS))); + aCtlType.InsertItem(CHTYPE_CIRCLE, + SELECT_BITMAP( BMP_CIRCLES_3D ), + String(SchResId(STR_CIRCLES))); + } + + aCtlType.Show(); + + if (nSelId > 0) + { + if (aCtlType.GetItemPos(nSelId) == VALUESET_ITEM_NOTFOUND) nSelId = aCtlType.GetItemId(0); + + aCtlType.SelectItem(nSelId); + SelectTypeHdl(&aCtlType); + } + } +} + +/************************************************************************* +|* +|* Fuellt das Varianten-Set mit Bitmaps +|* +\************************************************************************/ + +void SchDiagramTypeDlg::FillVariantSet(USHORT nType) +{ + long nDefaultOffset = 0; + + aCtlVariant.Clear(); + + bool bIsHighContrast = ( true && GetDisplayBackground().GetColor().IsDark() ); + + if (eDimension == CHDIM_3D) + { + switch (nType) + { + case CHTYPE_LINE: + aCtlVariant.InsertItem((USHORT)CHSTYLE_3D_STRIPE + 1, + SELECT_BITMAP( BMP_LINES_3D ), + String(SchResId(STR_DEEP))); + break; + + case CHTYPE_AREA: + aCtlVariant.InsertItem((USHORT)CHSTYLE_3D_STACKEDAREA + 1, + SELECT_BITMAP( BMP_AREAS_3D_1 ), + String(SchResId(STR_STACKED))); + aCtlVariant.InsertItem((USHORT)CHSTYLE_3D_PERCENTAREA + 1, + SELECT_BITMAP( BMP_AREAS_3D_2 ), + String(SchResId(STR_PERCENT))); + aCtlVariant.InsertItem((USHORT)CHSTYLE_3D_AREA + 1, + SELECT_BITMAP( BMP_AREAS_3D ), + String(SchResId(STR_DEEP))); + break; + + case CHTYPE_COLUMN: + aCtlVariant.InsertItem((USHORT)CHSTYLE_3D_FLATCOLUMN + 1, + SELECT_BITMAP( BMP_COLUMNS_3D_1 ), + String(SchResId(STR_NORMAL))); + aCtlVariant.InsertItem((USHORT)CHSTYLE_3D_STACKEDFLATCOLUMN + 1, + SELECT_BITMAP( BMP_COLUMNS_3D_2 ), + String(SchResId(STR_STACKED))); + aCtlVariant.InsertItem((USHORT)CHSTYLE_3D_PERCENTFLATCOLUMN + 1, + SELECT_BITMAP( BMP_COLUMNS_3D_3 ), + String(SchResId(STR_PERCENT))); + aCtlVariant.InsertItem((USHORT)CHSTYLE_3D_COLUMN + 1, + SELECT_BITMAP( BMP_COLUMNS_3D ), + String(SchResId(STR_DEEP))); + + aCtlVariant.InsertItem((USHORT)CHSTYLE_3D_FLATCOLUMN + 1 + OFFSET_ROUND, + SELECT_BITMAP( BMP_SAEULE_3D_1 ), + String(SchResId(STR_SAEULE_3D_1))); + aCtlVariant.InsertItem((USHORT)CHSTYLE_3D_STACKEDFLATCOLUMN + 1 + OFFSET_ROUND, + SELECT_BITMAP( BMP_SAEULE_3D_2 ), + String(SchResId(STR_SAEULE_3D_2))); + aCtlVariant.InsertItem((USHORT)CHSTYLE_3D_PERCENTFLATCOLUMN + 1 + OFFSET_ROUND, + SELECT_BITMAP( BMP_SAEULE_3D_3 ), + String(SchResId(STR_SAEULE_3D_3))); + aCtlVariant.InsertItem((USHORT)CHSTYLE_3D_COLUMN + 1 + OFFSET_ROUND, + SELECT_BITMAP( BMP_SAEULE_3D_4 ), + String(SchResId(STR_SAEULE_3D_4))); + + aCtlVariant.InsertItem((USHORT)CHSTYLE_3D_FLATCOLUMN + 1 + OFFSET_PYRAMID, + SELECT_BITMAP( BMP_PYRAMID_3D_1 ), + String(SchResId(STR_PYRAMID_3D_1))); + aCtlVariant.InsertItem((USHORT)CHSTYLE_3D_STACKEDFLATCOLUMN + 1 + OFFSET_PYRAMID, + SELECT_BITMAP( BMP_PYRAMID_3D_2 ), + String(SchResId(STR_PYRAMID_3D_2))); + aCtlVariant.InsertItem((USHORT)CHSTYLE_3D_PERCENTFLATCOLUMN + 1 + OFFSET_PYRAMID, + SELECT_BITMAP( BMP_PYRAMID_3D_3 ), + String(SchResId(STR_PYRAMID_3D_3))); + aCtlVariant.InsertItem((USHORT)CHSTYLE_3D_COLUMN + 1 + OFFSET_PYRAMID, + SELECT_BITMAP( BMP_PYRAMID_3D_4 ), + String(SchResId(STR_PYRAMID_3D_4))); + + aCtlVariant.InsertItem((USHORT)CHSTYLE_3D_FLATCOLUMN + 1 + OFFSET_CONE, + SELECT_BITMAP( BMP_KEGEL_3D_1 ), + String(SchResId(STR_KEGEL_3D_1))); + aCtlVariant.InsertItem((USHORT)CHSTYLE_3D_STACKEDFLATCOLUMN + 1 + OFFSET_CONE, + SELECT_BITMAP( BMP_KEGEL_3D_2 ), + String(SchResId(STR_KEGEL_3D_2))); + aCtlVariant.InsertItem((USHORT)CHSTYLE_3D_PERCENTFLATCOLUMN + 1 + OFFSET_CONE, + SELECT_BITMAP( BMP_KEGEL_3D_3 ), + String(SchResId(STR_KEGEL_3D_3))); + aCtlVariant.InsertItem((USHORT)CHSTYLE_3D_COLUMN + 1 + OFFSET_CONE, + SELECT_BITMAP( BMP_KEGEL_3D_4 ), + String(SchResId(STR_KEGEL_3D_4))); + break; + + case CHTYPE_CIRCLE: + aCtlVariant.InsertItem((USHORT)CHSTYLE_3D_PIE + 1, + SELECT_BITMAP( BMP_CIRCLES_3D ), + String(SchResId(STR_NORMAL))); + break; + + case CHTYPE_BAR: + aCtlVariant.InsertItem((USHORT)CHSTYLE_3D_FLATBAR + 1, + SELECT_BITMAP( BMP_BARS_3D_1 ), + String(SchResId(STR_NORMAL))); + aCtlVariant.InsertItem((USHORT)CHSTYLE_3D_STACKEDFLATBAR + 1, + SELECT_BITMAP( BMP_BARS_3D_2 ), + String(SchResId(STR_STACKED))); + aCtlVariant.InsertItem((USHORT)CHSTYLE_3D_PERCENTFLATBAR + 1, + SELECT_BITMAP( BMP_BARS_3D_3 ), + String(SchResId(STR_PERCENT))); + aCtlVariant.InsertItem((USHORT)CHSTYLE_3D_BAR + 1, + SELECT_BITMAP( BMP_BARS_3D ), + String(SchResId(STR_DEEP))); + + + + aCtlVariant.InsertItem((USHORT)CHSTYLE_3D_FLATBAR + 1 + OFFSET_ROUND, + SELECT_BITMAP( BMP_ROEHRE_3D_1 ), + String(SchResId(STR_ROEHRE_3D_1))); + aCtlVariant.InsertItem((USHORT)CHSTYLE_3D_STACKEDFLATBAR + 1 + OFFSET_ROUND, + SELECT_BITMAP( BMP_ROEHRE_3D_2 ), + String(SchResId(STR_ROEHRE_3D_2))); + aCtlVariant.InsertItem((USHORT)CHSTYLE_3D_PERCENTFLATBAR + 1 + OFFSET_ROUND, + SELECT_BITMAP( BMP_ROEHRE_3D_3 ), + String(SchResId(STR_ROEHRE_3D_3))); + aCtlVariant.InsertItem((USHORT)CHSTYLE_3D_BAR + 1 + OFFSET_ROUND, + SELECT_BITMAP( BMP_ROEHRE_3D_4 ), + String(SchResId(STR_ROEHRE_3D_4))); + + aCtlVariant.InsertItem((USHORT)CHSTYLE_3D_FLATBAR + 1 + OFFSET_PYRAMID, + SELECT_BITMAP( BMP_PYRAMIDQ_3D_1 ), + String(SchResId(STR_PYRAMIDQ_3D_1))); + aCtlVariant.InsertItem((USHORT)CHSTYLE_3D_STACKEDFLATBAR + 1 + OFFSET_PYRAMID, + SELECT_BITMAP( BMP_PYRAMIDQ_3D_2 ), + String(SchResId(STR_PYRAMIDQ_3D_2))); + aCtlVariant.InsertItem((USHORT)CHSTYLE_3D_PERCENTFLATBAR + 1 + OFFSET_PYRAMID, + SELECT_BITMAP( BMP_PYRAMIDQ_3D_3 ), + String(SchResId(STR_PYRAMIDQ_3D_3))); + aCtlVariant.InsertItem((USHORT)CHSTYLE_3D_BAR + 1 + OFFSET_PYRAMID, + SELECT_BITMAP( BMP_PYRAMIDQ_3D_4 ), + String(SchResId(STR_PYRAMIDQ_3D_4))); + + aCtlVariant.InsertItem((USHORT)CHSTYLE_3D_FLATBAR + 1 + OFFSET_CONE, + SELECT_BITMAP( BMP_KEGELQ_3D_1 ), + String(SchResId(STR_KEGELQ_3D_1))); + aCtlVariant.InsertItem((USHORT)CHSTYLE_3D_STACKEDFLATBAR + 1 + OFFSET_CONE, + SELECT_BITMAP( BMP_KEGELQ_3D_2 ), + String(SchResId(STR_KEGELQ_3D_2))); + aCtlVariant.InsertItem((USHORT)CHSTYLE_3D_PERCENTFLATBAR + 1 + OFFSET_CONE, + SELECT_BITMAP( BMP_KEGELQ_3D_3 ), + String(SchResId(STR_KEGELQ_3D_3))); + aCtlVariant.InsertItem((USHORT)CHSTYLE_3D_BAR + 1 + OFFSET_CONE, + SELECT_BITMAP( BMP_KEGELQ_3D_4 ), + String(SchResId(STR_KEGELQ_3D_4))); + break; + + } + } + else // 2D types + { + switch (nType) + { + case CHTYPE_LINE: + aCtlVariant.InsertItem((USHORT)CHSTYLE_2D_LINE + 1, + SELECT_BITMAP( BMP_LINES_2D_1 ), + String(SchResId(STR_NORMAL))); + aCtlVariant.InsertItem((USHORT)CHSTYLE_2D_STACKEDLINE + 1, + SELECT_BITMAP( BMP_LINES_2D_2 ), + String(SchResId(STR_STACKED))); + aCtlVariant.InsertItem((USHORT)CHSTYLE_2D_PERCENTLINE + 1, + SELECT_BITMAP( BMP_LINES_2D_3 ), + String(SchResId(STR_PERCENT))); + aCtlVariant.InsertItem((USHORT)CHSTYLE_2D_LINESYMBOLS + 1, + SELECT_BITMAP( BMP_LINESYMB_2D_1 ), + String(SchResId(STR_SYMBOL))); + aCtlVariant.InsertItem((USHORT)CHSTYLE_2D_STACKEDLINESYM + 1, + SELECT_BITMAP( BMP_LINESYMB_2D_2 ), + String(SchResId(STR_SYMBOL_STACK))); + aCtlVariant.InsertItem((USHORT)CHSTYLE_2D_PERCENTLINESYM + 1, + SELECT_BITMAP( BMP_LINESYMB_2D_3 ), + String(SchResId(STR_SYMBOL_PERCENT))); + aCtlVariant.InsertItem((USHORT)CHSTYLE_2D_CUBIC_SPLINE + 1, + SELECT_BITMAP( BMP_SPLINE_CUBIC ), + String(SchResId(STR_SPLINE_CUBIC))); + aCtlVariant.InsertItem((USHORT)CHSTYLE_2D_CUBIC_SPLINE_SYMBOL + 1, + SELECT_BITMAP( BMP_SPLINE_CUBIC_SYMBOL ), + String(SchResId(STR_SPLINE_CUBIC_SYMBOL))); + aCtlVariant.InsertItem((USHORT)CHSTYLE_2D_B_SPLINE + 1, + SELECT_BITMAP( BMP_SPLINE_B ), + String(SchResId(STR_SPLINE_B))); + aCtlVariant.InsertItem((USHORT)CHSTYLE_2D_B_SPLINE_SYMBOL + 1, + SELECT_BITMAP( BMP_SPLINE_B_SYMBOL ), + String(SchResId(STR_SPLINE_B_SYMBOL))); + break; + + case CHTYPE_AREA: + aCtlVariant.InsertItem((USHORT)CHSTYLE_2D_AREA + 1, + SELECT_BITMAP( BMP_AREAS_2D_1 ), + String(SchResId(STR_NORMAL))); + aCtlVariant.InsertItem((USHORT)CHSTYLE_2D_STACKEDAREA + 1, + SELECT_BITMAP( BMP_AREAS_2D ), + String(SchResId(STR_STACKED))); + aCtlVariant.InsertItem((USHORT)CHSTYLE_2D_PERCENTAREA + 1, + SELECT_BITMAP( BMP_AREAS_2D_3 ), + String(SchResId(STR_PERCENT))); + nDefaultOffset = 1; + break; + + case CHTYPE_COLUMN: + aCtlVariant.InsertItem((USHORT)CHSTYLE_2D_COLUMN + 1, + SELECT_BITMAP( BMP_COLUMNS_2D_1 ), + String(SchResId(STR_NORMAL))); + aCtlVariant.InsertItem((USHORT)CHSTYLE_2D_STACKEDCOLUMN + 1, + SELECT_BITMAP( BMP_COLUMNS_2D_2 ), + String(SchResId(STR_STACKED))); + aCtlVariant.InsertItem((USHORT)CHSTYLE_2D_PERCENTCOLUMN + 1, + SELECT_BITMAP( BMP_COLUMNS_2D_3 ), + String(SchResId(STR_PERCENT))); + aCtlVariant.InsertItem((USHORT)CHSTYLE_2D_LINE_COLUMN + 1, + SELECT_BITMAP( BMP_COLUMNS_2D_4 ), + String(SchResId(STR_LINE_COLUMN))); + aCtlVariant.InsertItem((USHORT)CHSTYLE_2D_LINE_STACKEDCOLUMN + 1, + SELECT_BITMAP( BMP_COLUMNS_2D_5 ), + String(SchResId(STR_LINE_STACKEDCOLUMN))); + + break; + + case CHTYPE_BAR: + aCtlVariant.InsertItem((USHORT)CHSTYLE_2D_BAR + 1, + SELECT_BITMAP( BMP_BARS_2D_1 ), + String(SchResId(STR_NORMAL))); + aCtlVariant.InsertItem((USHORT)CHSTYLE_2D_STACKEDBAR + 1, + SELECT_BITMAP( BMP_BARS_2D_2 ), + String(SchResId(STR_STACKED))); + aCtlVariant.InsertItem((USHORT)CHSTYLE_2D_PERCENTBAR + 1, + SELECT_BITMAP( BMP_BARS_2D_3 ), + String(SchResId(STR_PERCENT))); + break; + + case CHTYPE_CIRCLE: + { + aCtlVariant.InsertItem((USHORT)CHSTYLE_2D_PIE + 1, + SELECT_BITMAP( BMP_CIRCLES_2D ), + String(SchResId(STR_NORMAL))); + aCtlVariant.InsertItem((USHORT)CHSTYLE_2D_DONUT1 + 1, + SELECT_BITMAP( BMP_DONUT1_2D ), + String(SchResId(STR_DONUT1))); + String aResStr( SchResId( STR_OFS )); + String aOfsStr = aResStr; + + xub_StrLen nFound = aResStr.SearchAscii( "$(N)" ); + if( nFound != STRING_NOTFOUND ) + aOfsStr.Replace( nFound, RTL_CONSTASCII_LENGTH( "$(N)" ), String::CreateFromInt32( 1 )); + + aCtlVariant.InsertItem( (USHORT)CHSTYLE_2D_PIE_SEGOF1 + 1, + SELECT_BITMAP( BMP_CIRCLES_2D_1 ), + aOfsStr ); + + aOfsStr = aResStr; + if( nFound != STRING_NOTFOUND ) + aOfsStr.Replace( nFound, RTL_CONSTASCII_LENGTH( "$(N)" ), String::CreateFromInt32( 2 )); + + aCtlVariant.InsertItem( (USHORT)CHSTYLE_2D_PIE_SEGOFALL + 1, + SELECT_BITMAP( BMP_CIRCLES_2D_2 ), + aOfsStr ); + break; + } + + case CHTYPE_XY: + aCtlVariant.InsertItem((USHORT)CHSTYLE_2D_XYSYMBOLS + 1, + SELECT_BITMAP( BMP_XYSYMB_2D ), + String(SchResId(STR_ONLY_SYMBOLS))); + aCtlVariant.InsertItem((USHORT)CHSTYLE_2D_XY + 1, + SELECT_BITMAP( BMP_XY_2D ), + String(SchResId(STR_LINE_SYMBOLS))); + aCtlVariant.InsertItem((USHORT)CHSTYLE_2D_XY_LINE + 1, + SELECT_BITMAP( BMP_LINES_2D_1 ), + String(SchResId(STR_ONLY_LINES))); + aCtlVariant.InsertItem((USHORT)CHSTYLE_2D_CUBIC_SPLINE_XY + 1, + SELECT_BITMAP( BMP_SPLINE_CUBIC ), + String(SchResId(STR_SPLINE_CUBIC))); + aCtlVariant.InsertItem((USHORT)CHSTYLE_2D_CUBIC_SPLINE_SYMBOL_XY + 1, + SELECT_BITMAP( BMP_SPLINE_CUBIC_SYMBOL ), + String(SchResId(STR_SPLINE_CUBIC_SYMBOL))); + aCtlVariant.InsertItem((USHORT)CHSTYLE_2D_B_SPLINE_XY + 1, + SELECT_BITMAP( BMP_SPLINE_B ), + String(SchResId(STR_SPLINE_B))); + aCtlVariant.InsertItem((USHORT)CHSTYLE_2D_B_SPLINE_SYMBOL_XY + 1, + SELECT_BITMAP( BMP_SPLINE_B_SYMBOL ), + String(SchResId(STR_SPLINE_B_SYMBOL))); + break; + case CHTYPE_NET: + aCtlVariant.InsertItem((USHORT)CHSTYLE_2D_NET + 1, + SELECT_BITMAP( BMP_NET_2D ), + String(SchResId(STR_NORMAL))); + aCtlVariant.InsertItem((USHORT)CHSTYLE_2D_NET_STACK + 1, + SELECT_BITMAP( BMP_NET_2D_STACK ), + String(SchResId(STR_STACKED))); + aCtlVariant.InsertItem((USHORT)CHSTYLE_2D_NET_PERCENT + 1, + SELECT_BITMAP( BMP_NET_2D_PERCENT ), + String(SchResId(STR_PERCENT))); + aCtlVariant.InsertItem((USHORT)CHSTYLE_2D_NET_SYMBOLS + 1, + SELECT_BITMAP( BMP_NETSYMB_2D ), + String(SchResId(STR_SYMBOL))); + aCtlVariant.InsertItem((USHORT)CHSTYLE_2D_NET_SYMBOLS_STACK + 1, + SELECT_BITMAP( BMP_NETSYMB_2D_STACK ), + String(SchResId(STR_SYMBOL_STACK))); + aCtlVariant.InsertItem((USHORT)CHSTYLE_2D_NET_SYMBOLS_PERCENT + 1, + SELECT_BITMAP( BMP_NETSYMB_2D_PERCENT ), + String(SchResId(STR_SYMBOL_PERCENT))); + break; + + case CHTYPE_STOCK: + aCtlVariant.InsertItem((USHORT)CHSTYLE_2D_STOCK_1 + 1, + SELECT_BITMAP( BMP_STOCK_1 ), + String(SchResId(STR_STOCK_1))); + aCtlVariant.InsertItem((USHORT)CHSTYLE_2D_STOCK_2 + 1, + SELECT_BITMAP( BMP_STOCK_2 ), + String(SchResId(STR_STOCK_2))); + aCtlVariant.InsertItem((USHORT)CHSTYLE_2D_STOCK_3 + 1, + SELECT_BITMAP( BMP_STOCK_3 ), + String(SchResId(STR_STOCK_3))); + aCtlVariant.InsertItem((USHORT)CHSTYLE_2D_STOCK_4 + 1, + SELECT_BITMAP( BMP_STOCK_4 ), + String(SchResId(STR_STOCK_4))); + nDefaultOffset = 1; + } + } + + aCtlVariant.Show(); + + USHORT nSelId = aCtlVariant.GetItemId(0); + const SfxPoolItem *pPoolItem = NULL; + + if( rOutAttrs.GetItemState(SCHATTR_DIAGRAM_STYLE, TRUE, &pPoolItem) == SFX_ITEM_SET ) + { + USHORT nId = (USHORT)((const SvxChartStyleItem*)pPoolItem)->GetValue() + 1; + + if( aCtlVariant.GetItemPos(nId) != VALUESET_ITEM_NOTFOUND ) + { + nSelId = nId; + nDefaultOffset = 0; + } + } + long nShape3dOffset = 0; + if( rOutAttrs.GetItemState(SCHATTR_STYLE_SHAPE, TRUE, &pPoolItem) == SFX_ITEM_SET ) + { +// long nId3D = ((const SfxInt32Item*)&pPoolItem)->GetValue(); + switch( n3DGeometry ) + { + case CHART_SHAPE3D_CYLINDER: + nShape3dOffset = OFFSET_ROUND; + break; + case CHART_SHAPE3D_CONE: + nShape3dOffset = OFFSET_CONE; + break; + case CHART_SHAPE3D_PYRAMID: + nShape3dOffset = OFFSET_PYRAMID; + break; + } + } + if( aCtlVariant.GetItemPos( nSelId + nShape3dOffset + nDefaultOffset ) != VALUESET_ITEM_NOTFOUND ) + nSelId += (nShape3dOffset + nDefaultOffset); + + aCtlVariant.SelectItem( nSelId ); + + // make selected Item visible + aCtlVariant.SetFirstLine( aCtlVariant.GetItemPos( aCtlVariant.GetSelectItemId() ) / aCtlVariant.GetColCount() ); + + SwitchDepth( nSelId - 1 ); + SwitchNumLines( nSelId - 1 ); +} + +/************************************************************************* +|* +|* Select-Hdl der Dimensions-Buttons +|* +\************************************************************************/ + +IMPL_LINK( SchDiagramTypeDlg, SelectDimensionHdl, void *, EMPTYARG ) +{ + FillTypeSet(aRbt3D.IsChecked() ? CHDIM_3D : CHDIM_2D); + return 0; +} + +/************************************************************************* +|* +|* Select-Hdl des ValueSets +|* +\************************************************************************/ + +IMPL_LINK( SchDiagramTypeDlg, SelectTypeHdl, void *, EMPTYARG ) +{ + FillVariantSet(aCtlType.GetSelectItemId()); + return 0; +} + +/************************************************************************* +|* +|* Select-Hdl des ValueSets +|* +\************************************************************************/ + +IMPL_LINK( SchDiagramTypeDlg, DoubleClickHdl, void *, EMPTYARG ) +{ + EndDialog(RET_OK); + return 0; +} + +/************************************************************************* +|* +|* Fuellt uebergebenen Item-Set mit Dialogbox-Attributen +|* +\*************************************************************************/ + +void SchDiagramTypeDlg::GetAttr(SfxItemSet& rOutAttrs) +{ + long nId=aCtlVariant.GetSelectItemId() - 1; + long nGeo=CHART_SHAPE3D_ANY; + if(nId>OFFSET_CONE) + { + nId-=OFFSET_CONE; + nGeo=CHART_SHAPE3D_CONE; + } + if(nId>OFFSET_ROUND) + { + nId-=OFFSET_ROUND; + nGeo=CHART_SHAPE3D_CYLINDER; + } + if(nId>OFFSET_PYRAMID) + { + nId-=OFFSET_PYRAMID; + nGeo=CHART_SHAPE3D_PYRAMID; + } + if(nGeo != n3DGeometry) + rOutAttrs.Put(SfxInt32Item(SCHATTR_STYLE_SHAPE,nGeo)); + else + rOutAttrs.ClearItem(SCHATTR_STYLE_SHAPE); + + rOutAttrs.Put(SvxChartStyleItem((SvxChartStyle) (nId))); + + rOutAttrs.Put( SfxInt32Item( SCHATTR_NUM_OF_LINES_FOR_BAR, aMtrFldNumLines.GetValue())); + rOutAttrs.Put( SfxInt32Item( SCHATTR_SPLINE_RESOLUTION, aMtrFldGran.GetValue())); + rOutAttrs.Put( SfxInt32Item( SCHATTR_SPLINE_ORDER, aMtrFldDeep.GetValue())); +} + +/************************************************************************* +|* +|* Gibt die eingestellte Intensitaet als double zurueck +|* +\************************************************************************/ + +// int SchDiagramTypeDlg::GetDepth() +// { +// return aMtrFldDeep.GetValue(); +// } + +/************************************************************************* +|* +|* Setzt die uebergebene Intensitaet +|* +\************************************************************************/ + +// void SchDiagramTypeDlg::SetDepth( int nDepth ) +// { +// aMtrFldDeep.SetValue( nDepth ); +// } + +/************************************************************************* +|* +|* Setzt die uebergebene Intensitaet +|* +\************************************************************************/ + +void SchDiagramTypeDlg::SwitchDepth (USHORT nID) +{ + aFtDeep.Hide (); + aMtrFldDeep.Hide (); + aFtGran.Hide (); + aMtrFldGran.Hide (); + + switch (nID) + { + case CHSTYLE_2D_B_SPLINE : + case CHSTYLE_2D_B_SPLINE_SYMBOL : + case CHSTYLE_2D_B_SPLINE_XY : + case CHSTYLE_2D_B_SPLINE_SYMBOL_XY : + aFtDeep.Show (); + aMtrFldDeep.Show (); + + case CHSTYLE_2D_CUBIC_SPLINE : + case CHSTYLE_2D_CUBIC_SPLINE_SYMBOL : + case CHSTYLE_2D_CUBIC_SPLINE_XY : + case CHSTYLE_2D_CUBIC_SPLINE_SYMBOL_XY : + aFtGran.Show (); + aMtrFldGran.Show (); + break; + + default : + break; + } +} + +/************************************************************************* +|* +|* Select-Hdl des ValueSets +|* +\************************************************************************/ + +IMPL_LINK( SchDiagramTypeDlg, ClickHdl, void *, EMPTYARG ) +{ + SwitchDepth (aCtlVariant.GetSelectItemId() - 1); + SwitchNumLines( aCtlVariant.GetSelectItemId() - 1 ); + return 0; +} + +/************************************************************************* +|* +|* Laedt die Splineaufloesung +|* +\************************************************************************/ + +// int SchDiagramTypeDlg::GetGranularity() +// { +// return aMtrFldGran.GetValue(); +// } + +/************************************************************************* +|* +|* Setzt die Splineaufloesung +|* +\************************************************************************/ + +// void SchDiagramTypeDlg::SetGranularity( int nGranularity ) +// { +// aMtrFldGran.SetValue( nGranularity ); +// } + +void SchDiagramTypeDlg::FillValueSets() +{ + // type category (2d or 3d) + FillTypeSet( eDimension, true /* force change */ ); + + // sub-type + USHORT nId = aCtlType.GetSelectItemId(); + if( nId != 0 ) + { + FillVariantSet( nId ); + } +} + +void SchDiagramTypeDlg::DataChanged( const DataChangedEvent& rDCEvt ) +{ + ModalDialog::DataChanged( rDCEvt ); + + if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) + FillValueSets(); +} + + +void SchDiagramTypeDlg::SwitchNumLines( USHORT nID ) +{ + switch( nID ) + { + case CHSTYLE_2D_LINE_COLUMN: + case CHSTYLE_2D_LINE_STACKEDCOLUMN: + aFtNumLines.Show(); + aMtrFldNumLines.Show(); + break; + + default: + aFtNumLines.Hide(); + aMtrFldNumLines.Hide(); + break; + } +} + +void SchDiagramTypeDlg::SetMaximumNumberOfLines( long nMaxLines ) +{ + aMtrFldNumLines.SetLast( nMaxLines ); + aMtrFldNumLines.SetMax( nMaxLines ); +} + +// void SchDiagramTypeDlg::SetNumberOfLines( long nLines ) +// { +// aMtrFldNumLines.SetValue( nLines ); +// } + +// long SchDiagramTypeDlg::GetNumberOfLines() const +// { +// return aMtrFldNumLines.GetValue(); +// } + +//............................................................................. +} //namespace chart +//............................................................................. diff --git a/chart2/source/controller/dialogs/dlg_ChartType.hrc b/chart2/source/controller/dialogs/dlg_ChartType.hrc new file mode 100644 index 000000000..244fb58d7 --- /dev/null +++ b/chart2/source/controller/dialogs/dlg_ChartType.hrc @@ -0,0 +1,78 @@ +/************************************************************************* + * + * $RCSfile: dlg_ChartType.hrc,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:25 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#define DLG_DIAGRAM_TYPE 743 +#define BTN_OK 1 +#define BTN_CANCEL 1 +#define BTN_HELP 1 +#define BTN_OPTIONS 1 +#define FL_DIMENSION 1 +#define RBT_2D 1 +#define RBT_3D 2 +#define FT_TYPE 1 +#define FT_VARIANT 2 +#define FT_DEEP 3 +#define FT_GRAN 4 +#define FT_NUM_OF_LINES 5 +#define CTL_TYPE 1 +#define CTL_VARIANT 2 +#define MTR_FLD_DEEP 1 +#define MTR_FLD_GRAN 2 +#define MTR_FLD_NUM_OF_LINES 3 diff --git a/chart2/source/controller/dialogs/dlg_ChartType.src b/chart2/source/controller/dialogs/dlg_ChartType.src new file mode 100644 index 000000000..8e5539c7f --- /dev/null +++ b/chart2/source/controller/dialogs/dlg_ChartType.src @@ -0,0 +1,482 @@ +/************************************************************************* + * + * $RCSfile: dlg_ChartType.src,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:25 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +/* +#include "diagrtyp.hrc" +#ifndef _SVX_SVXIDS_HRC +#include <svx/svxids.hrc> +#endif +#include "app.hrc" +#include "schhids.h" +*/ + +#include "dlg_ChartType.hrc" +#include "SchSlotIds.hxx" +#include "HelpIds.hrc" + +ModalDialog DLG_DIAGRAM_TYPE +{ + HelpID = SID_DIAGRAM_TYPE ; + OutputSize = TRUE ; + SVLook = TRUE ; + Size = MAP_APPFONT ( 260 , 246 ) ; + Text = "Diagrammtyp" ; + Text [ ENGLISH ] = "Diagram Type" ; + Text [ NORWEGIAN ] = "Diagram Type" ; + Text [ DANISH ] = "Diagramtype" ; + Text [ ENGLISH_US ] = "Chart Type" ; + Text [ SPANISH ] = "Tipo de diagrama" ; + Text [ FINNISH ] = "Kaaviotyyppi" ; + Text [ FRENCH ] = "Type de diagramme" ; + Text [ ITALIAN ] = "Tipo di diagramma" ; + Text [ DUTCH ] = "Diagramtype" ; + Text [ PORTUGUESE_BRAZILIAN ] = "Tipo de Grfico" ; + Text [ SWEDISH ] = "Diagramtyp" ; + Text [ PORTUGUESE ] = "Tipo de grfico" ; + Moveable = TRUE ; + // Closeable = TRUE; // Dialog hat Cancel und/oder OK-Button ! (KH) + OKButton BTN_OK + { + Pos = MAP_APPFONT ( 204 , 6 ) ; + Size = MAP_APPFONT ( 50 , 14 ) ; + TabStop = TRUE ; + DefButton = TRUE ; + }; + CancelButton BTN_CANCEL + { + Pos = MAP_APPFONT ( 204 , 23 ) ; + Size = MAP_APPFONT ( 50 , 14 ) ; + TabStop = TRUE ; + }; + HelpButton BTN_HELP + { + Pos = MAP_APPFONT ( 204 , 43 ) ; + Size = MAP_APPFONT ( 50 , 14 ) ; + TabStop = TRUE ; + }; + FixedLine FL_DIMENSION + { + Pos = MAP_APPFONT ( 6 , 3 ) ; + Size = MAP_APPFONT ( 100 , 8 ) ; + Text = "Diagrammkategorie" ; + Text [ ENGLISH ] = "Dimension" ; + Text [ NORWEGIAN ] = "Dimension" ; + Text [ DANISH ] = "Diagramkategori" ; + Text [ ENGLISH_US ] = "Chart category" ; + Text [ SPANISH ] = "Categora de diagrama" ; + Text [ FINNISH ] = "Kaavioluokka" ; + Text [ FRENCH ] = "Catgorie" ; + Text [ ITALIAN ] = "Categoria diagramma" ; + Text [ DUTCH ] = "Diagramcategorie" ; + Text [ PORTUGUESE_BRAZILIAN ] = "Categoria de grfico" ; + Text [ SWEDISH ] = "Diagramkategori" ; + Text [ PORTUGUESE ] = "Categoria de grfico" ; + Text[ chinese_simplified ] = "图表分类"; + Text[ russian ] = " "; + Text[ polish ] = "Kategoria wykresu"; + Text[ japanese ] = "次元"; + Text[ language_user1 ] = " "; + Text[ chinese_traditional ] = "圖表分類"; + Text[ arabic ] = ""; + Text[ greek ] = " "; + Text[ korean ] = "차트 범주"; + Text[ turkish ] = "izelge kategorisi"; + Text[ catalan ] = "Dimensi"; + Text[ thai ] = "มิติ"; + Text[ czech ] = "Kategorie grafu"; + Text[ hebrew ] = "Diagrammkategorie"; + Text[ hindi ] = "चार्ट वर्ग"; + Text[ slovak ] = "Kategória grafu"; + }; + RadioButton RBT_2D + { + Pos = MAP_APPFONT ( 12 , 14 ) ; + Size = MAP_APPFONT ( 88 , 12 ) ; + Text = "~2D" ; + Text [ ENGLISH ] = "~2D" ; + Text [ NORWEGIAN ] = "~2D" ; + Text [ DANISH ] = "2D" ; + Text [ ENGLISH_US ] = "~2D" ; + Text [ SPANISH ] = "~2D" ; + Text [ FINNISH ] = "~Kaksiulotteinen" ; + Text [ FRENCH ] = "~2D" ; + Text [ ITALIAN ] = "2D" ; + Text [ DUTCH ] = "~2D" ; + Text [ PORTUGUESE_BRAZILIAN ] = "~2D" ; + Text [ SWEDISH ] = "~2D" ; + Text [ PORTUGUESE ] = "~2D" ; + TabStop = TRUE ; + Text[ chinese_simplified ] = "~2 维"; + Text[ russian ] = ""; + Text[ polish ] = "~2D"; + Text[ japanese ] = "~2D"; + Text[ chinese_traditional ] = "平面"; + Text[ arabic ] = ""; + Text[ greek ] = "~2"; + Text[ korean ] = "2D"; + Text[ turkish ] = "~2B"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "~2D"; + Text[ thai ] = "~2มิติ"; + Text[ czech ] = "2D"; + Text[ hebrew ] = "~2D"; + Text[ hindi ] = "~2D"; + Text[ slovak ] = "~2D"; + }; + RadioButton RBT_3D + { + Pos = MAP_APPFONT ( 12 , 30 ) ; + Size = MAP_APPFONT ( 88 , 12 ) ; + Text = "~3D" ; + Text [ ENGLISH ] = "~3D" ; + Text [ NORWEGIAN ] = "~3D" ; + Text [ DANISH ] = "3D" ; + Text [ ENGLISH_US ] = "~3D" ; + Text [ SPANISH ] = "~3D" ; + Text [ FINNISH ] = "~Kolmiulotteinen" ; + Text [ FRENCH ] = "~3D" ; + Text [ ITALIAN ] = "3D" ; + Text [ DUTCH ] = "~3D" ; + Text [ PORTUGUESE_BRAZILIAN ] = "~3D" ; + Text [ SWEDISH ] = "~3D" ; + Text [ PORTUGUESE ] = "~3D" ; + TabStop = TRUE ; + Text[ chinese_simplified ] = "~3 维"; + Text[ russian ] = ""; + Text[ polish ] = "~3D"; + Text[ japanese ] = "~3D"; + Text[ chinese_traditional ] = "~3D"; + Text[ arabic ] = ""; + Text[ greek ] = "~3"; + Text[ korean ] = "3D"; + Text[ turkish ] = "~3B"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "~3D"; + Text[ thai ] = "~3มิติ"; + Text[ czech ] = "3D"; + Text[ hebrew ] = "~3D"; + Text[ hindi ] = "~3D"; + Text[ slovak ] = "~3D"; + }; + FixedText FT_TYPE + { + Pos = MAP_APPFONT ( 6 , 48 ) ; + Size = MAP_APPFONT ( 192 , 10 ) ; + Text = "~Diagrammtyp" ; + Text [ ENGLISH ] = "~Type" ; + Text [ NORWEGIAN ] = "~Type:" ; + Text [ DANISH ] = "~Diagramtype" ; + Text [ ENGLISH_US ] = "Chart ~type" ; + Text [ SPANISH ] = "~Tipo de diagrama:" ; + Text [ FINNISH ] = "Kaaviot~yyppi" ; + Text [ FRENCH ] = "Type" ; + Text [ ITALIAN ] = "~Tipo diagramma" ; + Text [ DUTCH ] = "~Diagramtype" ; + Text [ PORTUGUESE_BRAZILIAN ] = "~Tipo de grfico" ; + Text [ SWEDISH ] = "~Diagramtyp:" ; + Text [ PORTUGUESE ] = "~Tipo de grfico" ; + Text[ chinese_simplified ] = "图表类型(~T)"; + Text[ russian ] = " "; + Text[ polish ] = "~Typ wykresu"; + Text[ japanese ] = "種類(~T)"; + Text[ chinese_traditional ] = "圖表類型(~T)"; + Text[ arabic ] = ":"; + Text[ greek ] = " ~"; + Text[ korean ] = "차트 유형(~T)"; + Text[ turkish ] = "Karakter ~tipi"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "~Tipus:"; + Text[ thai ] = "~ชนิด:"; + Text[ czech ] = "Typ grafu"; + Text[ hebrew ] = "~Diagrammtyp"; + Text[ hindi ] = "चार्ट वर्ग"; + Text[ slovak ] = "~Typ grafu"; + }; + Control CTL_TYPE + { + HelpId = HID_SCH_CTL_TYPE ; + Border = TRUE ; + Hide = TRUE ; + Pos = MAP_APPFONT ( 6 , 61 ) ; + Size = MAP_APPFONT ( 188 , 97 ) ; + TabStop = TRUE ; + }; + FixedText FT_VARIANT + { + Pos = MAP_APPFONT ( 6 , 169 ) ; + Size = MAP_APPFONT ( 192 , 10 ) ; + Text = "~Variante:" ; + Text [ ENGLISH ] = "~Variant:" ; + Text [ NORWEGIAN ] = "~Variant:" ; + Text [ DANISH ] = "Undertype:" ; + Text [ ENGLISH_US ] = "~Variants:" ; + Text [ SPANISH ] = "~Variante:" ; + Text [ FINNISH ] = "~Vaihtoehdot:" ; + Text [ FRENCH ] = "~Variante :" ; + Text [ ITALIAN ] = "~Varianti:" ; + Text [ DUTCH ] = "~Variantie:" ; + Text [ PORTUGUESE_BRAZILIAN ] = "~Variantes:" ; + Text [ SWEDISH ] = "~Variant:" ; + Text [ PORTUGUESE ] = "Variantes:" ; + Text[ chinese_simplified ] = "变体(~V)"; + Text[ russian ] = ":"; + Text[ polish ] = "~Warianty:"; + Text[ japanese ] = "バリエーション(~V):"; + Text[ chinese_traditional ] = "變體(~V)"; + Text[ arabic ] = " :"; + Text[ greek ] = ":"; + Text[ korean ] = "변수(~V):"; + Text[ turkish ] = "~Varyant:"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "~Variants"; + Text[ thai ] = "~ตัวแปรผัน:"; + Text[ czech ] = "Varianty:"; + Text[ hebrew ] = "~Variante:"; + Text[ hindi ] = "~वेरिएन्ट्स::"; + Text[ slovak ] = "~Varianty:"; + }; + Control CTL_VARIANT + { + HelpId = HID_SCH_CTL_VARIANT ; + Border = TRUE ; + Pos = MAP_APPFONT ( 6 , 182 ) ; + Size = MAP_APPFONT ( 188 , 53 ) ; + TabStop = TRUE ; + }; + FixedText FT_DEEP + { + Pos = MAP_APPFONT ( 114 , 16 ) ; + Size = MAP_APPFONT ( 60 , 10 ) ; + Text = "~Sttzpunktordnung" ; + Text [ ENGLISH ] = "~Order of points" ; + Text [ english_us ] = "~Data points order" ; + Text [ italian ] = "Ordine dei punti di appoggio" ; + Text [ spanish ] = "~Orden de los puntos" ; + Text [ french ] = "~Ordre des points d'appui" ; + Text [ dutch ] = "~Steunpuntordening" ; + Text [ swedish ] = "~Punktordning" ; + Text [ danish ] = "Stttepunktorden" ; + Text [ portuguese_brazilian ] = "Ordem ~dos pontos de dados" ; + Text [ portuguese ] = "Ordem dos pontos de apoio" ; + Text[ chinese_simplified ] = "数据点顺序(~D)"; + Text[ russian ] = " "; + Text[ polish ] = "Kolejno punktw ~danych"; + Text[ japanese ] = "データポイントの配列(~D)"; + Text[ chinese_traditional ] = "資料點順序(~D)"; + Text[ arabic ] = " "; + Text[ greek ] = " ~ "; + Text[ korean ] = "데이터 포인트 배열(~D)"; + Text[ turkish ] = "~Destek noktas sras"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "Ordre dels punts de ~dades"; + Text[ finnish ] = "~Arvopisteiden jrjestys"; + Text[ thai ] = "ลำดับจุด~ข้อมูล"; + Text[ czech ] = "Pořadí datových bodů"; + Text[ hebrew ] = "~Stützpunktordnung"; + Text[ hindi ] = "~ड़ॉटा बिन्दु क्रम"; + Text[ slovak ] = "Poradie ~dátových bodov"; + }; + MetricField MTR_FLD_DEEP + { + Border = TRUE ; + Pos = MAP_APPFONT ( 178 , 14 ) ; + Size = MAP_APPFONT ( 20 , 12 ) ; + TabStop = TRUE ; + Repeat = TRUE ; + Spin = TRUE ; + Minimum = 1 ; + Maximum = 100 ; + StrictFormat = TRUE ; + Unit = FUNIT_CUSTOM ; + First = 1 ; + Last = 100 ; + SpinSize = 1 ; + }; + FixedText FT_NUM_OF_LINES + { + Pos = MAP_APPFONT ( 114 , 16 ) ; + Size = MAP_APPFONT ( 60 , 10 ) ; + Text = "Anzahl an ~Linien" ; + Text[ ENGLISH ] = "~Number of lines" ; + Text[ english_us ] = "~Number of lines"; + Text[ portuguese ] = "~Number of lines"; + Text[ russian ] = "~Number of lines"; + Text[ greek ] = "~Number of lines"; + Text[ dutch ] = "~Number of lines"; + Text[ french ] = "Nombre de lignes"; + Text[ spanish ] = "~Nmero de lneas"; + Text[ finnish ] = "~Number of lines"; + Text[ italian ] = "~Numero di righe"; + Text[ danish ] = "~Number of lines"; + Text[ swedish ] = "Antal ~linjer"; + Text[ polish ] = "~Number of lines"; + Text[ japanese ] = "線の本数"; + Text[ korean ] = "줄 수"; + Text[ chinese_simplified ] = "线条的数目"; + Text[ chinese_traditional ] = "線條的數目(~N)"; + Text[ turkish ] = "izgi ~Says"; + Text[ arabic ] = "~Number of lines"; + Text[ czech ] = "Počet řádků"; + Text[ hebrew ] = "Anzahl an ~Linien"; + Text[ catalan ] = "~Number of lines"; + Text[ portuguese_brazilian ] = "~Number of lines"; + Text[ thai ] = "~Number of lines"; + Text[ hindi ] = "~Number of lines"; + Text[ slovak ] = "Počet ria~dkov"; + }; + MetricField MTR_FLD_NUM_OF_LINES + { + HelpId = HID_SCH_NUM_OF_LINES ; + Border = TRUE ; + Pos = MAP_APPFONT ( 178 , 14 ) ; + Size = MAP_APPFONT ( 20 , 12 ) ; + TabStop = TRUE ; + Repeat = TRUE ; + Spin = TRUE ; + Minimum = 1 ; + Maximum = 100 ; + StrictFormat = TRUE ; + Unit = FUNIT_CUSTOM ; + First = 1 ; + Last = 100 ; + SpinSize = 1 ; + }; + FixedText FT_GRAN + { + Pos = MAP_APPFONT ( 114 , 31 ) ; + Size = MAP_APPFONT ( 60 , 10 ) ; + Text = "~Auflsung" ; + Text [ ENGLISH ] = "~Order of points" ; + Text [ english_us ] = "~Resolution" ; + Text [ italian ] = "Risoluzione" ; + Text [ spanish ] = "~Resolucin" ; + Text [ french ] = "~Rsolution" ; + Text [ dutch ] = "~Resolutie" ; + Text [ swedish ] = "~Upplsning" ; + Text [ danish ] = "Oplsning" ; + Text [ portuguese_brazilian ] = "~Resoluo" ; + Text [ portuguese ] = "Resoluo" ; + Text[ chinese_simplified ] = "分辨率(~R)"; + Text[ russian ] = ""; + Text[ polish ] = "~Rozdzielczo"; + Text[ japanese ] = "中間点(~R)"; + Text[ chinese_traditional ] = "解析度(~R)"; + Text[ arabic ] = ""; + Text[ greek ] = ""; + Text[ korean ] = "해상도(~R)"; + Text[ turkish ] = "~znrlk"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "~Resoluci"; + Text[ finnish ] = "~Tarkkuus"; + Text[ thai ] = "~ความละเอียด"; + Text[ czech ] = "Rozlišení"; + Text[ hebrew ] = "~Auflösung"; + Text[ hindi ] = "~Resolution"; + Text[ slovak ] = "~Rozlíšenie"; + }; + MetricField MTR_FLD_GRAN + { + Border = TRUE ; + Pos = MAP_APPFONT ( 178 , 30 ) ; + Size = MAP_APPFONT ( 20 , 12 ) ; + TabStop = TRUE ; + Repeat = TRUE ; + Spin = TRUE ; + Minimum = 1 ; + Maximum = 1000 ; + StrictFormat = TRUE ; + Unit = FUNIT_CUSTOM ; + First = 1 ; + Last = 1000 ; + SpinSize = 1 ; + }; + Text[ chinese_simplified ] = "图表类型"; + Text[ russian ] = " "; + Text[ polish ] = "Typ wykresu"; + Text[ japanese ] = "グラフの種類"; + Text[ chinese_traditional ] = "圖表類型"; + Text[ arabic ] = " "; + Text[ greek ] = " "; + Text[ korean ] = "차트 유형"; + Text[ turkish ] = "ema tipi"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "Tipus de diagrama"; + Text[ thai ] = "ชนิดแผนภูมิ"; + Text[ czech ] = "Typ grafu"; + Text[ hebrew ] = "Diagrammtyp"; + Text[ hindi ] = "Chart Type"; + Text[ slovak ] = "Typ grafu"; +}; + + + + + + + + + + + + + + + + diff --git a/chart2/source/controller/dialogs/dlg_InsertAxis_Grid.cxx b/chart2/source/controller/dialogs/dlg_InsertAxis_Grid.cxx new file mode 100644 index 000000000..1def4b8a4 --- /dev/null +++ b/chart2/source/controller/dialogs/dlg_InsertAxis_Grid.cxx @@ -0,0 +1,173 @@ +/************************************************************************* + * + * $RCSfile: dlg_InsertAxis_Grid.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:25 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "dlg_InsertAxis_Grid.hxx" +#include "dlg_InsertAxis_Grid.hrc" + +#include "ResId.hxx" +#include "SchSfxItemIds.hxx" +#include "Strings.hrc" +#include "SchSlotIds.hxx" + +// header for class SfxBoolItem +#ifndef _SFXENUMITEM_HXX +#include <svtools/eitem.hxx> +#endif + +//............................................................................. +namespace chart +{ +//............................................................................. + +InsertMeterDialogData::InsertMeterDialogData() + : aPossibilityList(6) + , aExistenceList(6) +{ + for(sal_Int32 nN=6;nN--;) + aPossibilityList[nN]=true; + for(nN=6;nN--;) + aExistenceList[nN]=false; +} + +//============================== +// +// SchAxisDlg +// +//============================== + +SchAxisDlg::SchAxisDlg( Window* pWindow + , const InsertMeterDialogData& rInput, BOOL bAxisDlg ) + : + ModalDialog( pWindow, SchResId( DLG_AXIS_OR_GRID )), + + aFlPrimary( this, ResId( FL_PRIMARY_AXIS )), + aFlPrimaryGrid( this, ResId( FL_PRIMARY_GRID )), + aCbPrimaryX( this, ResId( CB_X_PRIMARY )), + aCbPrimaryY( this, ResId( CB_Y_PRIMARY )), + aCbPrimaryZ( this, ResId( CB_Z_PRIMARY )), + + aFlSecondary( this, ResId( FL_SECONDARY_AXIS )), + aFlSecondaryGrid( this, ResId( FL_SECONDARY_GRID )), + aCbSecondaryX( this, ResId( CB_X_SECONDARY )), + aCbSecondaryY( this, ResId( CB_Y_SECONDARY )), + aCbSecondaryZ( this, ResId( CB_Z_SECONDARY )), + + aPbOK( this, ResId( BTN_OK )), + aPbCancel( this, ResId( BTN_CANCEL )), + aPbHelp( this, ResId( BTN_HELP )) + + //rOutAttrs( rInAttrs ) +{ + if(!bAxisDlg) + { + SetHelpId( SID_INSERT_GRIDS ); + SetText( String( SchResId( STR_TITLE_GRID ) ) ); + + aFlPrimary.Hide(); + aFlSecondary.Hide(); + aFlPrimaryGrid.Show(); + aFlSecondaryGrid.Show(); + } + FreeResource(); + + aCbPrimaryX.Check( rInput.aExistenceList[0] ); + aCbPrimaryY.Check( rInput.aExistenceList[1] ); + aCbPrimaryZ.Check( rInput.aExistenceList[2] ); + aCbSecondaryX.Check( rInput.aExistenceList[3] ); + aCbSecondaryY.Check( rInput.aExistenceList[4] ); + aCbSecondaryZ.Check( rInput.aExistenceList[5] ); + + aCbPrimaryX.Enable( rInput.aPossibilityList[0] ); + aCbPrimaryY.Enable( rInput.aPossibilityList[1] ); + aCbPrimaryZ.Enable( rInput.aPossibilityList[2] ); + aCbSecondaryX.Enable( rInput.aPossibilityList[3] ); + aCbSecondaryY.Enable( rInput.aPossibilityList[4] ); + aCbSecondaryZ.Enable( rInput.aPossibilityList[5] ); +} + +SchAxisDlg::~SchAxisDlg() +{ +} + +void SchAxisDlg::getResult( InsertMeterDialogData& rOutput ) +{ + rOutput.aExistenceList[0]=aCbPrimaryX.IsChecked(); + rOutput.aExistenceList[1]=aCbPrimaryY.IsChecked(); + rOutput.aExistenceList[2]=aCbPrimaryZ.IsChecked(); + rOutput.aExistenceList[3]=aCbSecondaryX.IsChecked(); + rOutput.aExistenceList[4]=aCbSecondaryY.IsChecked(); + rOutput.aExistenceList[5]=aCbSecondaryZ.IsChecked(); +} + +SchGridDlg::SchGridDlg( Window* pParent, const InsertMeterDialogData& rInput ) + : SchAxisDlg( pParent, rInput, false )//rInAttrs, b3D, bNet, bSecondaryX, bSecondaryY, false ) +{ +} + +SchGridDlg::~SchGridDlg() +{ +} + +//............................................................................. +} //namespace chart +//............................................................................. + + + diff --git a/chart2/source/controller/dialogs/dlg_InsertAxis_Grid.hrc b/chart2/source/controller/dialogs/dlg_InsertAxis_Grid.hrc new file mode 100644 index 000000000..99594d7d1 --- /dev/null +++ b/chart2/source/controller/dialogs/dlg_InsertAxis_Grid.hrc @@ -0,0 +1,82 @@ +/************************************************************************* + * + * $RCSfile: dlg_InsertAxis_Grid.hrc,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:25 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +// Axis+Grid dialogue + +#define DLG_AXIS_OR_GRID 839 + +#define FL_PRIMARY_AXIS 1 +#define FL_SECONDARY_AXIS 2 + +#define FL_PRIMARY_GRID 3 +#define FL_SECONDARY_GRID 4 + +#define CB_X_PRIMARY 1 +#define CB_Y_PRIMARY 2 +#define CB_Z_PRIMARY 3 + +#define CB_X_SECONDARY 4 +#define CB_Y_SECONDARY 5 +#define CB_Z_SECONDARY 6 + +#define BTN_OK 1 +#define BTN_CANCEL 2 +#define BTN_HELP 3 diff --git a/chart2/source/controller/dialogs/dlg_InsertAxis_Grid.src b/chart2/source/controller/dialogs/dlg_InsertAxis_Grid.src new file mode 100644 index 000000000..1493cb9e5 --- /dev/null +++ b/chart2/source/controller/dialogs/dlg_InsertAxis_Grid.src @@ -0,0 +1,434 @@ +/************************************************************************* + * + * $RCSfile: dlg_InsertAxis_Grid.src,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:25 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +#include "dlg_InsertAxis_Grid.hrc" +#include "SchSlotIds.hxx" +#include "CommonResources.hrc" + +ModalDialog DLG_AXIS_OR_GRID +{ + HelpID = SID_INSERT_AXIS ; + OutputSize = TRUE ; + SVLook = TRUE ; + //Size = MAP_APPFONT ( 160 , 99 ) ; + Size = MAP_APPFONT ( 160 , 113 ) ; + Text = "Achsen" ; + Text [ ENGLISH ] = "Axes"; + Text [ english_us ] = "Axes" ; + Moveable = TRUE ; + + FixedLine FL_PRIMARY_AXIS + { + Pos = MAP_APPFONT ( 6 , 3 ) ; + Size = MAP_APPFONT ( 92 , 8 ) ; + Text = "Hauptachse" ; + Text [ ENGLISH ] = "Major axis" ; + Text [ english_us ] = "Major axis" ; + Text[ portuguese ] = "Eixo principal"; + Text[ russian ] = " "; + Text[ greek ] = " "; + Text[ dutch ] = "Hoofdas"; + Text[ french ] = "Axe principal"; + Text[ spanish ] = "Eje principal"; + Text[ italian ] = "Asse principale"; + Text[ danish ] = "Overordnet akse"; + Text[ swedish ] = "Huvudaxel"; + Text[ polish ] = "O gwna"; + Text[ portuguese_brazilian ] = "Eixo principal"; + Text[ japanese ] = "数値軸"; + Text[ korean ] = "주 축"; + Text[ chinese_simplified ] = "主轴"; + Text[ chinese_traditional ] = "主軸"; + Text[ arabic ] = " "; + Text[ turkish ] = "Byk eksen"; + Text[ catalan ] = "Eix principal"; + Text[ finnish ] = "Pakseli"; + Text[ thai ] = "แกนหลัก"; + Text[ czech ] = "Hlavní osa"; + Text[ hebrew ] = "Hauptachse"; + Text[ hindi ] = "Major axis"; + Text[ slovak ] = "Hlavná os"; + }; + FixedLine FL_PRIMARY_GRID + { + Hide = TRUE ; + Pos = MAP_APPFONT ( 6 , 3 ) ; + Size = MAP_APPFONT ( 92 , 8 ) ; + Text = "Hauptgitter" ; + Text [ ENGLISH ] = "Major gridlines" ; + Text [ italian ] = "Griglia principale" ; + Text [ portuguese_brazilian ] = "Grade Principal" ; + Text [ portuguese ] = "Grelha principal" ; + Text [ finnish ] = "Pruudukko" ; + Text [ danish ] = "Overordnet gitter" ; + Text [ french ] = "Grille principale" ; + Text [ swedish ] = "Huvudgitter" ; + Text [ dutch ] = "Hoofdraster" ; + Text [ spanish ] = "Cuadrcula principal" ; + Text [ english_us ] = "Main grid" ; + Text[ chinese_simplified ] = "主网格线"; + Text[ russian ] = " "; + Text[ polish ] = "Gwna siatka"; + Text[ japanese ] = "主目盛線"; + Text[ chinese_traditional ] = "主網格"; + Text[ arabic ] = " "; + Text[ greek ] = " "; + Text[ korean ] = "주 눈금선"; + Text[ turkish ] = "Ana zgara"; + Text[ catalan ] = "Cuadr. principal"; + Text[ thai ] = "เส้นตารางหลัก"; + Text[ czech ] = "Hlavní mřížka"; + Text[ hebrew ] = "Hauptgitter"; + Text[ hindi ] = "प्रधान जाल"; + Text[ slovak ] = "Hlavná mriežka"; + }; + CheckBox CB_X_PRIMARY + { + Pos = MAP_APPFONT ( 12 , 14 ); + Size = MAP_APPFONT ( 80 , 10 ); + TabStop = TRUE; + Text= "~X-Achse"; + Text [ ENGLISH ] = "~X axis"; + Text [ english_us ] = "~X axis"; + Text[ portuguese ] = "Eixo ~X"; + Text[ russian ] = " ~X"; + Text[ greek ] = " X"; + Text[ dutch ] = "~X-as"; + Text[ french ] = "Axe X"; + Text[ spanish ] = "Eje ~X"; + Text[ italian ] = "Asse ~X"; + Text[ danish ] = "X-akse"; + Text[ swedish ] = "~X-axel"; + Text[ polish ] = "O ~X"; + Text[ portuguese_brazilian ] = "Eixo ~X"; + Text[ japanese ] = "~X 軸"; + Text[ korean ] = "~X 축"; + Text[ chinese_simplified ] = "~X 轴"; + Text[ chinese_traditional ] = "~X 軸"; + Text[ arabic ] = " "; + Text[ turkish ] = "~X ekseni"; + Text[ catalan ] = "Eix ~X"; + Text[ finnish ] = "X-akseli"; + Text[ thai ] = "แกน~X "; + Text[ czech ] = "Osa X"; + Text[ hebrew ] = "~X-Achse"; + Text[ hindi ] = "~X अक्ष"; + Text[ slovak ] = "Os ~X"; + }; + CheckBox CB_Y_PRIMARY + { + Pos = MAP_APPFONT ( 12 , 28 ); + Size = MAP_APPFONT ( 80 , 10 ); + TabStop = TRUE; + Text= "~Y-Achse"; + Text [ ENGLISH ] = "~Y axis"; + Text [ english_us ] = "~Y axis"; + Text[ portuguese ] = "Eixo ~Y"; + Text[ russian ] = " ~Y"; + Text[ greek ] = " ~"; + Text[ dutch ] = "~Y-as"; + Text[ french ] = "Axe ~Y"; + Text[ spanish ] = "Eje ~Y"; + Text[ italian ] = "Asse ~Y"; + Text[ danish ] = "Y-akse"; + Text[ swedish ] = "Y-axel"; + Text[ polish ] = "O ~Y"; + Text[ portuguese_brazilian ] = "Eixo ~Y"; + Text[ japanese ] = "~Y 軸"; + Text[ korean ] = "~Y 축"; + Text[ chinese_simplified ] = "~Y 轴"; + Text[ chinese_traditional ] = "~Y 軸"; + Text[ arabic ] = " "; + Text[ turkish ] = "~Y ekseni"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "Eix ~Y"; + Text[ finnish ] = "Y-akseli"; + Text[ thai ] = "แกน~Y "; + Text[ czech ] = "Osa Y"; + Text[ hebrew ] = "~Y-Achse"; + Text[ hindi ] = "~Y axis"; + Text[ slovak ] = "Os ~Y"; + }; + CheckBox CB_Z_PRIMARY + { + Pos = MAP_APPFONT ( 12 , 42 ); + Size = MAP_APPFONT ( 80 , 10 ); + TabStop = TRUE; + Text= "~Z-Achse"; + Text [ ENGLISH ] = "~Z axis"; + Text [ english_us ] = "~Z axis"; + Text[ portuguese ] = "Eixo ~Z"; + Text[ russian ] = " ~Z"; + Text[ greek ] = " Z"; + Text[ dutch ] = "~Z-as"; + Text[ french ] = "Axe ~Z"; + Text[ spanish ] = "Eje ~Z"; + Text[ italian ] = "Asse ~Z"; + Text[ danish ] = "Z-akse"; + Text[ swedish ] = "Z-axel"; + Text[ polish ] = "O ~Z"; + Text[ portuguese_brazilian ] = "Eixo ~Z"; + Text[ japanese ] = "~Z 軸"; + Text[ korean ] = "~Z 축"; + Text[ chinese_simplified ] = "~Z 轴"; + Text[ chinese_traditional ] = "~Z 軸"; + Text[ arabic ] = " "; + Text[ turkish ] = "~Z ekseni"; + Text[ catalan ] = "Eix ~Z"; + Text[ finnish ] = "Z-akseli"; + Text[ thai ] = "แกน~Z "; + Text[ czech ] = "Osa Z"; + Text[ hebrew ] = "~Z-Achse"; + Text[ hindi ] = "~Z अक्ष"; + Text[ slovak ] = "Os ~Z"; + }; + + FixedLine FL_SECONDARY_AXIS + { + Pos = MAP_APPFONT ( 6 , 58 ) ; + Size = MAP_APPFONT ( 92 , 8 ) ; + Text = "Sekundre Achse" ; + Text [ ENGLISH ] = "Secondary axis" ; + Text [ english_us ] = "Secondary axis" ; + Text[ portuguese ] = "Eixo secundrio"; + Text[ russian ] = " "; + Text[ greek ] = " "; + Text[ dutch ] = "Secundaire as"; + Text[ french ] = "Axe secondaire"; + Text[ spanish ] = "Eje secundario"; + Text[ italian ] = "Asse secondario"; + Text[ danish ] = "Underordnet akse"; + Text[ swedish ] = "Sekundr axel"; + Text[ polish ] = "O pomocnicza"; + Text[ portuguese_brazilian ] = "Eixo secundrio"; + Text[ japanese ] = "第2数値軸"; + Text[ korean ] = "2차 축"; + Text[ chinese_simplified ] = "次轴"; + Text[ chinese_traditional ] = "副軸"; + Text[ arabic ] = " "; + Text[ turkish ] = "kincil eksen"; + Text[ catalan ] = "Eix secundari"; + Text[ finnish ] = "Toissijainen akseli"; + Text[ thai ] = "แกนทุติยภูมิ"; + Text[ czech ] = "Sekundární osa"; + Text[ hebrew ] = "Sekundäre Achse"; + Text[ hindi ] = "दूसरा अक्ष"; + Text[ slovak ] = "Sekundárna os"; + }; + FixedLine FL_SECONDARY_GRID + { + Hide = TRUE ; + Pos = MAP_APPFONT ( 6 , 58 ) ; + Size = MAP_APPFONT ( 92 , 8 ) ; + Text = "Hilfsgitter" ; + Text [ ENGLISH ] = "Minor gridlines" ; + Text [ italian ] = "Griglia ausiliaria" ; + Text [ portuguese_brazilian ] = "Grade auxiliar" ; + Text [ portuguese ] = "Grelha auxiliar" ; + Text [ danish ] = "Underordnet gitter" ; + Text [ french ] = "Grille auxiliaire" ; + Text [ swedish ] = "Stdgitter" ; + Text [ dutch ] = "Hulpraster" ; + Text [ spanish ] = "Cuadrcula auxiliar" ; + Text [ english_us ] = "Minor grid" ; + Text[ chinese_simplified ] = "次网格线"; + Text[ russian ] = " "; + Text[ polish ] = "Pomocnicza siatka"; + Text[ japanese ] = "補助目盛線"; + Text[ chinese_traditional ] = "輔助網格"; + Text[ arabic ] = " "; + Text[ greek ] = " "; + Text[ korean ] = "보조 눈금선"; + Text[ turkish ] = "Kk zgara"; + Text[ catalan ] = "Cuadr. auxiliar"; + Text[ finnish ] = "Apuruudukko"; + Text[ thai ] = "เส้นตารางรอง"; + Text[ czech ] = "Vedlejší mřížka"; + Text[ hebrew ] = "Hilfsgitter"; + Text[ hindi ] = "छोटा जाल"; + Text[ slovak ] = "Vedľajšia mriežka"; + }; + CheckBox CB_X_SECONDARY + { + Pos = MAP_APPFONT ( 12 , 69 ); + Size = MAP_APPFONT ( 80 , 10 ); + TabStop = TRUE; + Text= "X-~Achse"; + Text [ ENGLISH ] = "X ~axis"; + Text [ english_us ] = "X ~axis"; + Text[ portuguese ] = "~Eixo X"; + Text[ russian ] = "~ X"; + Text[ greek ] = " X"; + Text[ dutch ] = "X~-as"; + Text[ french ] = "Axe X"; + Text[ spanish ] = "~Eje X"; + Text[ italian ] = "~Asse X"; + Text[ danish ] = "X-akse"; + Text[ swedish ] = "X-axel"; + Text[ polish ] = "O ~X"; + Text[ portuguese_brazilian ] = "~Eixo X"; + Text[ japanese ] = "X軸(~A)"; + Text[ korean ] = "X 축(~A)"; + Text[ chinese_simplified ] = "X 轴(~A)"; + Text[ chinese_traditional ] = "X 軸(~A)"; + Text[ arabic ] = " "; + Text[ turkish ] = "X ~ekseni"; + Text[ catalan ] = "~Eix X"; + Text[ finnish ] = "X-akseli"; + Text[ thai ] = "แ~กนX "; + Text[ czech ] = "Osa X"; + Text[ hebrew ] = "X-~Achse"; + Text[ hindi ] = "X ~अक्ष"; + Text[ slovak ] = "~Os X"; + }; + CheckBox CB_Y_SECONDARY + { + Pos = MAP_APPFONT ( 12 , 83 ); + Size = MAP_APPFONT ( 80 , 10 ); + TabStop = TRUE; + Text= "Y-A~chse"; + Text [ ENGLISH ] = "Y ax~is"; + Text [ english_us ] = "Y ax~is"; + Text[ portuguese ] = "Ei~xo Y"; + Text[ russian ] = "~ Y"; + Text[ greek ] = "~ "; + Text[ dutch ] = "Y-a~s"; + Text[ french ] = "~Axe Y"; + Text[ spanish ] = "Eje Y"; + Text[ italian ] = "Asse Y"; + Text[ danish ] = "Y-akse"; + Text[ swedish ] = "Y-axel"; + Text[ polish ] = "O ~Y"; + Text[ portuguese_brazilian ] = "Ei~xo Y"; + Text[ japanese ] = "Y軸(~I)"; + Text[ korean ] = "Y 축(~I)"; + Text[ chinese_simplified ] = "Y 轴(~I)"; + Text[ chinese_traditional ] = "Y 軸(~I)"; + Text[ arabic ] = " "; + Text[ turkish ] = "Y e~kseni"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "E~ix Y"; + Text[ finnish ] = "Y-ak~seli"; + Text[ thai ] = "แก~นY "; + Text[ czech ] = "Osa Y"; + Text[ hebrew ] = "Y-A~chse"; + Text[ hindi ] = "Y अ~क्ष"; + Text[ slovak ] = "O~s Y"; + }; + CheckBox CB_Z_SECONDARY + { + Pos = MAP_APPFONT ( 12 , 97 ); + Size = MAP_APPFONT ( 80 , 10 ); + TabStop = TRUE; + Text= "Z-Ac~hse"; + Text [ ENGLISH ] = "Z axi~s"; + Text [ english_us ] = "Z axi~s"; + Text[ portuguese ] = "Eix~o Z"; + Text[ russian ] = " Z"; + Text[ greek ] = " Z"; + Text[ dutch ] = "~Z-as"; + Text[ french ] = "Ax~e Z"; + Text[ spanish ] = "Eje Z"; + Text[ italian ] = "Asse Z"; + Text[ danish ] = "Z-akse"; + Text[ swedish ] = "Z-axel"; + Text[ polish ] = "O ~Z"; + Text[ portuguese_brazilian ] = "Ei~xo Y"; + Text[ japanese ] = "Z軸(~S)"; + Text[ korean ] = "Z 축(~S)"; + Text[ chinese_simplified ] = "Z 轴(~S)"; + Text[ chinese_traditional ] = "Z 軸(~S)"; + Text[ arabic ] = " "; + Text[ turkish ] = "Z ek~seni"; + Text[ catalan ] = "Ei~x Z"; + Text[ finnish ] = "Z-ak~seli"; + Text[ thai ] = "~แกนZ "; + Text[ czech ] = "Osa Z"; + Text[ hebrew ] = "Z-Ac~hse"; + Text[ hindi ] = "Z ~अक्ष"; + Text[ slovak ] = "Os ~Z"; + }; + BUTTONS_OK_CANCEL_HELP_STACKED(104) + Text[ portuguese ] = "Eixos"; + Text[ russian ] = ""; + Text[ greek ] = ""; + Text[ dutch ] = "Assen"; + Text[ french ] = "Axes"; + Text[ spanish ] = "Ejes"; + Text[ italian ] = "Assi"; + Text[ danish ] = "Akser"; + Text[ swedish ] = "Axlar"; + Text[ polish ] = "Osie"; + Text[ portuguese_brazilian ] = "Eixos"; + Text[ japanese ] = "軸"; + Text[ korean ] = "축"; + Text[ chinese_simplified ] = "轴"; + Text[ chinese_traditional ] = "軸"; + Text[ arabic ] = ""; + Text[ turkish ] = "Eksen"; + Text[ catalan ] = "Eixos"; + Text[ finnish ] = "Akselit"; + Text[ thai ] = "แกน"; + Text[ czech ] = "Osy"; + Text[ hebrew ] = "Achsen"; + Text[ hindi ] = "अक्ष रेखा"; + Text[ slovak ] = "Osi"; +}; diff --git a/chart2/source/controller/dialogs/dlg_InsertDataLabel.cxx b/chart2/source/controller/dialogs/dlg_InsertDataLabel.cxx new file mode 100644 index 000000000..616775f57 --- /dev/null +++ b/chart2/source/controller/dialogs/dlg_InsertDataLabel.cxx @@ -0,0 +1,244 @@ +/************************************************************************* + * + * $RCSfile: dlg_InsertDataLabel.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:25 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "dlg_InsertDataLabel.hxx" +#include "dlg_InsertDataLabel.hrc" + +#include "ResId.hxx" +#include "SchSfxItemIds.hxx" + +// header for class SfxBoolItem +#ifndef _SFXENUMITEM_HXX +#include <svtools/eitem.hxx> +#endif +// header for class SvxChartDataDescrItem +#define ITEMID_CHARTDATADESCR SCHATTR_DATADESCR_DESCR +#ifndef _SVX_CHRTITEM_HXX +#include <svx/chrtitem.hxx> +#endif + +//............................................................................. +namespace chart +{ +//............................................................................. + +/************************************************************************* +|* +|* Dialog zum Aendern der Beschriftungen +|* +\************************************************************************/ + +SchDataDescrDlg::SchDataDescrDlg(Window* pWindow, const SfxItemSet& rInAttrs) : + ModalDialog(pWindow, SchResId(DLG_DATA_DESCR)), + aCbValue(this, ResId(CB_VALUE)), + aRbNumber(this, ResId(RB_NUMBER)), + aRbPercent(this, ResId(RB_PERCENT)), + aCbText(this, ResId(CB_TEXT)), + aFlDescr(this, ResId(FL_DESCR)), + aCbSymbol(this, ResId(CB_SYMBOL)), + aBtnOK(this, ResId(BTN_OK)), + aBtnCancel(this, ResId(BTN_CANCEL)), + aBtnHelp(this, ResId(BTN_HELP)), + rOutAttrs(rInAttrs) +{ + FreeResource(); + + aCbValue.SetClickHdl( LINK( this, SchDataDescrDlg, EnableHdl )); + aCbText.SetClickHdl( LINK( this, SchDataDescrDlg, EnableHdl )); + + Reset(); +} + +/************************************************************************* +|* +|* Dtor +|* +\************************************************************************/ + +SchDataDescrDlg::~SchDataDescrDlg() +{ +} + +/************************************************************************* +|* +|* handler for enable/disable 'show symbol' and options for value +|* +\*************************************************************************/ + +IMPL_LINK( SchDataDescrDlg, EnableHdl, CheckBox *, pControl ) +{ + aCbSymbol.Enable( aCbValue.IsChecked() || aCbText.IsChecked() ); + if( pControl == &aCbValue ) + { + aRbPercent.Enable( aCbValue.IsChecked() ); + aRbNumber.Enable( aCbValue.IsChecked() ); + } + + return 0; +} + +/************************************************************************* +|* +|* Initialisierung +|* +\*************************************************************************/ + +void SchDataDescrDlg::Reset() +{ + const SfxPoolItem *pPoolItem = NULL; + + // default state + aRbNumber.Enable( FALSE ); + aRbPercent.Enable( FALSE ); + aCbSymbol.Enable( FALSE ); + + SfxItemState aState = rOutAttrs.GetItemState(SCHATTR_DATADESCR_SHOW_SYM, TRUE, &pPoolItem); + if( aState == SFX_ITEM_SET ) + aCbSymbol.Check( ((const SfxBoolItem*)pPoolItem)->GetValue() ); + else + { + aCbSymbol.EnableTriState( TRUE ); + aCbSymbol.SetState( STATE_DONTKNOW ); + } + + aState = rOutAttrs.GetItemState(SCHATTR_DATADESCR_DESCR, TRUE, &pPoolItem); + if( aState == SFX_ITEM_SET ) + { + switch( ((const SvxChartDataDescrItem*)pPoolItem)->GetValue() ) + { + case CHDESCR_VALUE: + aCbValue.Check(); + aRbNumber.Check(); + EnableHdl( &aCbValue ); + break; + + case CHDESCR_PERCENT: + aCbValue.Check(); + aRbPercent.Check(); + EnableHdl( &aCbValue ); + break; + + case CHDESCR_TEXT: + aCbText.Check(); + EnableHdl( &aCbText ); + break; + + case CHDESCR_TEXTANDPERCENT: + aCbText.Check(); + aCbValue.Check(); + aRbPercent.Check(); + EnableHdl( &aCbValue ); + break; + + case CHDESCR_TEXTANDVALUE: + aCbText.Check(); + aCbValue.Check(); + aRbNumber.Check(); + EnableHdl( &aCbValue ); + break; + + default: + break; + } + } + else + { + aCbText.EnableTriState( TRUE ); + aCbText.SetState( STATE_DONTKNOW ); + + aCbValue.EnableTriState( TRUE ); + aCbValue.SetState( STATE_DONTKNOW ); + } + if( !aRbNumber.IsChecked() && !aRbPercent.IsChecked() ) + aRbNumber.Check(); +} + +/************************************************************************* +|* +|* Fuellt uebergebenen Item-Set mit Dialogbox-Attributen +|* +\*************************************************************************/ + +void SchDataDescrDlg::GetAttr(SfxItemSet& rOutAttrs) +{ + BOOL bText = aCbText.IsChecked(); + SvxChartDataDescr eDescr; + + if( aCbValue.IsChecked() ) + { + if( aRbNumber.IsChecked() ) + eDescr = (bText? CHDESCR_TEXTANDVALUE : CHDESCR_VALUE); + else + eDescr = (bText? CHDESCR_TEXTANDPERCENT : CHDESCR_PERCENT); + } + else if( aCbText.IsChecked() ) + eDescr = CHDESCR_TEXT; + else + eDescr = CHDESCR_NONE; + + rOutAttrs.Put(SvxChartDataDescrItem(eDescr)); + rOutAttrs.Put(SfxBoolItem( SCHATTR_DATADESCR_SHOW_SYM, + aCbSymbol.IsChecked()) ); +} + +//............................................................................. +} //namespace chart +//............................................................................. + diff --git a/chart2/source/controller/dialogs/dlg_InsertDataLabel.hrc b/chart2/source/controller/dialogs/dlg_InsertDataLabel.hrc new file mode 100644 index 000000000..050e9d076 --- /dev/null +++ b/chart2/source/controller/dialogs/dlg_InsertDataLabel.hrc @@ -0,0 +1,70 @@ +/************************************************************************* + * + * $RCSfile: dlg_InsertDataLabel.hrc,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:25 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#define DLG_DATA_DESCR 836 +#define BTN_OK 1 +#define BTN_CANCEL 1 +#define BTN_HELP 1 +#define FL_DESCR 1 +#define CB_VALUE 1 +#define CB_TEXT 2 +#define CB_SYMBOL 3 +#define RB_NUMBER 1 +#define RB_PERCENT 2 diff --git a/chart2/source/controller/dialogs/dlg_InsertDataLabel.src b/chart2/source/controller/dialogs/dlg_InsertDataLabel.src new file mode 100644 index 000000000..c5bd106eb --- /dev/null +++ b/chart2/source/controller/dialogs/dlg_InsertDataLabel.src @@ -0,0 +1,175 @@ +/************************************************************************* + * + * $RCSfile: dlg_InsertDataLabel.src,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:25 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +#include "dlg_InsertDataLabel.hrc" +#include "SchSlotIds.hxx" +#include "CommonResources.hrc" +#include "res_DataLabel.hrc" + +ModalDialog DLG_DATA_DESCR +{ + HelpID = SID_INSERT_DESCRIPTION ; + OutputSize = TRUE ; + SVLook = TRUE ; + Size = MAP_APPFONT ( 200 , 86 ) ; + Text = "Datenbeschriftung" ; + Text [ ENGLISH ] = "Data Description" ; + Text [ norwegian ] = "Data Description" ; + Text [ italian ] = "Dicitura dati" ; + Text [ portuguese_brazilian ] = "Rtulos dos Dados" ; + Text [ portuguese ] = "Legenda para dados" ; + Text [ finnish ] = "Tietoselitteet" ; + Text [ danish ] = "Dataetiketter" ; + Text [ french ] = "tiquetage des donnes" ; + Text [ swedish ] = "Dataetiketter" ; + Text [ dutch ] = "Gegevenslabels" ; + Text [ spanish ] = "Etiqueta de datos" ; + Text [ english_us ] = "Data Labels" ; + Moveable = TRUE ; + BUTTONS_OK_CANCEL_HELP_STACKED(144) + RESOURCE_DATALABEL( 12, 14 ) + FixedLine FL_DESCR + { + Pos = MAP_APPFONT ( 6 , 3 ) ; + Size = MAP_APPFONT ( 132 , 8 ) ; + Text = "Datenbeschriftung" ; + Text [ ENGLISH ] = "Data Description" ; + Text [ norwegian ] = "Data Description" ; + Text [ italian ] = "Dicitura dati" ; + Text [ portuguese_brazilian ] = "Rtulos de dados" ; + Text [ portuguese ] = "Etiqueta de dados" ; + Text [ finnish ] = "Tietoselitteet" ; + Text [ danish ] = "Dataetiketter" ; + Text [ french ] = "tiquetage des donnes" ; + Text [ swedish ] = "Dataetikett" ; + Text [ dutch ] = "Gegevenslabels" ; + Text [ spanish ] = "Etiqueta de datos" ; + Text [ english_us ] = "Data labels" ; + Text[ chinese_simplified ] = "数据标志"; + Text[ russian ] = " "; + Text[ polish ] = "Etykiety danych"; + Text[ japanese ] = "データラベル"; + Text[ chinese_traditional ] = "資料標籤"; + Text[ arabic ] = " "; + Text[ greek ] = " "; + Text[ korean ] = "데이터 레이블"; + Text[ turkish ] = "Veri etiketleri"; + Text[ catalan ] = "Etiqueta de dades"; + Text[ thai ] = "ป้ายชื่อข้อมูล"; + Text[ czech ] = "Popisky dat"; + Text[ hebrew ] = "Datenbeschriftung"; + Text[ hindi ] = "ड़ॉटा लेबिलें"; + Text[ slovak ] = "Popisy dát"; + }; + + Text[ chinese_simplified ] = "数据标志"; + Text[ russian ] = " "; + Text[ polish ] = "Etykiety danych"; + Text[ japanese ] = "データラベル"; + Text[ chinese_traditional ] = "資料標籤"; + Text[ arabic ] = " "; + Text[ greek ] = " "; + Text[ korean ] = "데이터 레이블"; + Text[ turkish ] = "Veri etiketi"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "Etiquetes de dades"; + Text[ thai ] = "ป้ายชื่อข้อมูล"; + Text[ czech ] = "Popisky dat"; + Text[ hebrew ] = "Datenbeschriftung"; + Text[ hindi ] = "ड़ॉटा लेबिलें"; + Text[ slovak ] = "Popisy dát"; +}; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/chart2/source/controller/dialogs/dlg_InsertLegend.cxx b/chart2/source/controller/dialogs/dlg_InsertLegend.cxx new file mode 100644 index 000000000..9f16c0ff9 --- /dev/null +++ b/chart2/source/controller/dialogs/dlg_InsertLegend.cxx @@ -0,0 +1,203 @@ +/************************************************************************* + * + * $RCSfile: dlg_InsertLegend.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:25 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "dlg_InsertLegend.hxx" +#include "dlg_InsertLegend.hrc" + +#include "ResId.hxx" +#include "SchSfxItemIds.hxx" + +// header for enum SvxChartLegendPos +#define ITEMID_CHARTLEGENDPOS SCHATTR_LEGEND_POS +#ifndef _SVX_CHRTITEM_HXX +#include <svx/chrtitem.hxx> +#endif +// header for class SfxItemPool +#ifndef _SFXITEMPOOL_HXX +#include <svtools/itempool.hxx> +#endif + +//............................................................................. +namespace chart +{ +//............................................................................. + +/************************************************************************* +|* +|* Dialog zur Ausrichtung der Legende +|* +\************************************************************************/ + +SchLegendDlg::SchLegendDlg(Window* pWindow, const SfxItemSet& rInAttrs) : + ModalDialog(pWindow, SchResId(DLG_LEGEND)), + aCbxShow(this, ResId(CBX_SHOW)), + aRbtLeft(this, ResId(RBT_LEFT)), + aRbtTop(this, ResId(RBT_TOP)), + aRbtRight(this, ResId(RBT_RIGHT)), + aRbtBottom(this, ResId(RBT_BOTTOM)), + aFlLegend(this, ResId(FL_LEGEND)), + aBtnOK(this, ResId(BTN_OK)), + aBtnCancel(this, ResId(BTN_CANCEL)), + aBtnHelp(this, ResId(BTN_HELP)), + rOutAttrs(rInAttrs) +{ + FreeResource(); + + aCbxShow.SetClickHdl (LINK(this, SchLegendDlg, CbxClick)); + + Reset(); +} + +/************************************************************************* +|* +|* Dtor +|* +/************************************************************************/ + +SchLegendDlg::~SchLegendDlg() +{ +} + +/************************************************************************* +|* +|* Initialisierung +|* +\*************************************************************************/ + +void SchLegendDlg::Reset() +{ + SvxChartLegendPos ePos = CHLEGEND_NONE; + + const SfxPoolItem* pPoolItem = NULL; + if( rOutAttrs.GetItemState( SCHATTR_LEGEND_POS, + TRUE, &pPoolItem ) != SFX_ITEM_SET ) + pPoolItem = &(rOutAttrs.GetPool()->GetDefaultItem( SCHATTR_LEGEND_POS )); + + if( pPoolItem ) + ePos = ((const SvxChartLegendPosItem*)pPoolItem)->GetValue(); + + switch( ePos ) + { + case CHLEGEND_LEFT: + aRbtLeft.Check(TRUE); + break; + case CHLEGEND_TOP: + aRbtTop.Check(TRUE); + break; + case CHLEGEND_NONE: + case CHLEGEND_RIGHT: + aRbtRight.Check(TRUE); + break; + case CHLEGEND_BOTTOM: + aRbtBottom.Check(TRUE); + break; + } + + aCbxShow.Check (ePos != CHLEGEND_NONE); + aRbtLeft.Enable (ePos != CHLEGEND_NONE); + aRbtTop.Enable (ePos != CHLEGEND_NONE); + aRbtRight.Enable (ePos != CHLEGEND_NONE); + aRbtBottom.Enable (ePos != CHLEGEND_NONE); +} + +/************************************************************************* +|* +|* Fuellt uebergebenen Item-Set mit Dialogbox-Attributen +|* +\*************************************************************************/ + +void SchLegendDlg::GetAttr(SfxItemSet& rOutAttrs) +{ + SvxChartLegendPos ePos; + + if ( ! aCbxShow.IsChecked()) + ePos = CHLEGEND_NONE; + else if (aRbtLeft.IsChecked()) + ePos = CHLEGEND_LEFT; + else if (aRbtTop.IsChecked()) + ePos = CHLEGEND_TOP; + else if (aRbtRight.IsChecked()) + ePos = CHLEGEND_RIGHT; + else if (aRbtBottom.IsChecked()) + ePos = CHLEGEND_BOTTOM; + else + ePos = CHLEGEND_NONE; + + rOutAttrs.Put(SvxChartLegendPosItem(ePos)); +} + + + + +IMPL_LINK (SchLegendDlg, CbxClick, CheckBox *, pBtn) +{ + BOOL bChecked = aCbxShow.IsChecked(); + + aRbtLeft.Enable (bChecked); + aRbtTop.Enable (bChecked); + aRbtRight.Enable (bChecked); + aRbtBottom.Enable (bChecked); + + return 0; +} + +//............................................................................. +} //namespace chart +//............................................................................. diff --git a/chart2/source/controller/dialogs/dlg_InsertLegend.hrc b/chart2/source/controller/dialogs/dlg_InsertLegend.hrc new file mode 100644 index 000000000..a446e2cda --- /dev/null +++ b/chart2/source/controller/dialogs/dlg_InsertLegend.hrc @@ -0,0 +1,70 @@ +/************************************************************************* + * + * $RCSfile: dlg_InsertLegend.hrc,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:25 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#define DLG_LEGEND 835 +#define CBX_SHOW 1 +#define FL_LEGEND 1 +#define RBT_LEFT 2 +#define RBT_TOP 3 +#define RBT_RIGHT 4 +#define RBT_BOTTOM 5 +#define BTN_OK 1 +#define BTN_CANCEL 1 +#define BTN_HELP 1 diff --git a/chart2/source/controller/dialogs/dlg_InsertLegend.src b/chart2/source/controller/dialogs/dlg_InsertLegend.src new file mode 100644 index 000000000..e6599054d --- /dev/null +++ b/chart2/source/controller/dialogs/dlg_InsertLegend.src @@ -0,0 +1,211 @@ +/************************************************************************* + * + * $RCSfile: dlg_InsertLegend.src,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:25 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +#include "dlg_InsertLegend.hrc" +#include "SchSlotIds.hxx" +#include "CommonResources.hrc" +#include "res_LegendPosition.hrc" + +ModalDialog DLG_LEGEND +{ + HelpID = SID_INSERT_CHART_LEGEND ; + OutputSize = TRUE ; + SVLook = TRUE ; + Size = MAP_APPFONT ( 135 , 90 ) ; + Text = "Legende" ; + Text [ ENGLISH ] = "Legend" ; + Text [ norwegian ] = "Legend" ; + Text [ italian ] = "Legenda" ; + Text [ portuguese_brazilian ] = "Legenda" ; + Text [ portuguese ] = "Legenda" ; + Text [ finnish ] = "Selite" ; + Text [ danish ] = "Forklaring" ; + Text [ french ] = "Lgende" ; + Text [ swedish ] = "Frklaring" ; + Text [ dutch ] = "Legenda" ; + Text [ spanish ] = "Leyenda" ; + Text [ english_us ] = "Legend" ; + Moveable = TRUE ; + // Closeable = TRUE; // Dialog hat Cancel und/oder OK-Button ! (KH) + BUTTONS_OK_CANCEL_HELP_STACKED( 79 ) + FixedLine FL_LEGEND + { + Pos = MAP_APPFONT ( 6 , 21 ) ; + Size = MAP_APPFONT ( 67 , 8 ) ; + Text = "Position" ; + Text [ ENGLISH ] = "Show" ; + Text [ norwegian ] = "Show" ; + Text [ italian ] = "Posizione" ; + Text [ portuguese_brazilian ] = "Posio" ; + Text [ portuguese ] = "Posio" ; + Text [ finnish ] = "Sijainti" ; + Text [ danish ] = "Stilling" ; + Text [ french ] = "Position" ; + Text [ swedish ] = "Placering" ; + Text [ dutch ] = "Positie" ; + Text [ spanish ] = "Posicin" ; + Text [ english_us ] = "Position" ; + Text[ chinese_simplified ] = "位置"; + Text[ russian ] = ""; + Text[ polish ] = "Pozycja"; + Text[ japanese ] = "表示位置"; + Text[ chinese_traditional ] = "位置"; + Text[ arabic ] = ""; + Text[ greek ] = ""; + Text[ korean ] = "표시 위치"; + Text[ turkish ] = "Konum"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "Mostra"; + Text[ thai ] = "แสดงผล"; + Text[ czech ] = "Umístění"; + Text[ hebrew ] = "מיקום"; + Text[ hindi ] = "स्थान"; + Text[ slovak ] = "Umiestnenie"; + }; + CheckBox CBX_SHOW + { + Pos = MAP_APPFONT ( 6 , 6 ) ; + Size = MAP_APPFONT ( 67 , 12 ) ; + Text = "~Anzeigen" ; + Text [ ENGLISH ] = "~None" ; + Text [ norwegian ] = "~Ingen " ; + Text [ italian ] = "~Mostra" ; + Text [ portuguese_brazilian ] = "~Exibir" ; + Text [ portuguese ] = "~Mostrar" ; + Text [ finnish ] = "~Nyt" ; + Text [ danish ] = "~Vis" ; + Text [ french ] = "~Afficher" ; + Text [ swedish ] = "Vis~a" ; + Text [ dutch ] = "~Weergeven" ; + Text [ spanish ] = "~Mostrar" ; + Text [ english_us ] = "~Display" ; + TabStop = TRUE ; + Text[ chinese_simplified ] = "显示(~D)"; + Text[ russian ] = "~"; + Text[ polish ] = "~Wywietl"; + Text[ japanese ] = "表示する(~D)"; + Text[ chinese_traditional ] = "顯示(~D)"; + Text[ arabic ] = ""; + Text[ greek ] = ""; + Text[ korean ] = "표시(~D)"; + Text[ turkish ] = "~Gster"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "~Cap"; + Text[ thai ] = "ไ~ม่มี"; + Text[ czech ] = "Displej"; + Text[ hebrew ] = "~Anzeigen"; + Text[ hindi ] = "~दिखाओ"; + Text[ slovak ] = "~Displej"; + }; + RESOURCE_LEGENDPOSITION( 32 ) + Text[ chinese_simplified ] = "图例"; + Text[ russian ] = ""; + Text[ polish ] = "Legenda"; + Text[ japanese ] = "凡例"; + Text[ chinese_traditional ] = "圖例"; + Text[ arabic ] = " "; + Text[ greek ] = ""; + Text[ korean ] = "범례"; + Text[ turkish ] = "Aklama"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "Llegenda"; + Text[ thai ] = "คำอธิบาย"; + Text[ czech ] = "Legenda"; + Text[ hebrew ] = "Legende"; + Text[ hindi ] = "लेजेन्ड़"; + Text[ slovak ] = "Legenda"; +}; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/chart2/source/controller/dialogs/dlg_InsertTitle.cxx b/chart2/source/controller/dialogs/dlg_InsertTitle.cxx new file mode 100644 index 000000000..373ee8257 --- /dev/null +++ b/chart2/source/controller/dialogs/dlg_InsertTitle.cxx @@ -0,0 +1,188 @@ +/************************************************************************* + * + * $RCSfile: dlg_InsertTitle.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:25 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "dlg_InsertTitle.hxx" +#include "dlg_InsertTitle.hrc" + +#include "ResId.hxx" +#include "SchSfxItemIds.hxx" + +// header for class SfxBoolItem +#ifndef _SFXENUMITEM_HXX +#include <svtools/eitem.hxx> +#endif +// header for class SfxStringItem +#ifndef _SFXSTRITEM_HXX +#include <svtools/stritem.hxx> +#endif + +//............................................................................. +namespace chart +{ +//............................................................................. + +InsertTitleDialogData::InsertTitleDialogData() + : aPossibilityList(5) + , aExistenceList(5) + , aTextList(5) +{ + for(sal_Int32 nN=5;nN--;) + aPossibilityList[nN]=true; + for(nN=5;nN--;) + aExistenceList[nN]=false; +} + + +SchTitleDlg::SchTitleDlg(Window* pWindow, const InsertTitleDialogData& rInput ) : + ModalDialog(pWindow, SchResId(DLG_TITLE)), + aCbxMain(this, ResId(CBX_MAINTITLE)), + aEdtMain(this, ResId(EDT_MAINTITLE)), + aCbxSub(this, ResId(CBX_SUBTITLE)), + aEdtSub(this, ResId(EDT_SUBTITLE)), + aCbxXAxis(this, ResId(CBX_TITLE_X_AXIS)), + aEdtXAxis(this, ResId(EDT_X_AXIS)), + aCbxYAxis(this, ResId(CBX_TITLE_Y_AXIS)), + aEdtYAxis(this, ResId(EDT_Y_AXIS)), + aCbxZAxis(this, ResId(CBX_TITLE_Z_AXIS)), + aEdtZAxis(this, ResId(EDT_Z_AXIS)), + aBtnOK(this, ResId(BTN_OK)), + aBtnCancel(this, ResId(BTN_CANCEL)), + aBtnHelp(this, ResId(BTN_HELP)) +{ + FreeResource(); + + aCbxMain.SetClickHdl(LINK(this, SchTitleDlg, EnableTitleHdl)); + aCbxSub.SetClickHdl(LINK(this, SchTitleDlg, EnableTitleHdl)); + aCbxXAxis.SetClickHdl(LINK(this, SchTitleDlg, EnableTitleHdl)); + aCbxYAxis.SetClickHdl(LINK(this, SchTitleDlg, EnableTitleHdl)); + aCbxZAxis.SetClickHdl(LINK(this, SchTitleDlg, EnableTitleHdl)); + + aCbxMain.Check( rInput.aExistenceList[0] ); + aCbxSub.Check( rInput.aExistenceList[1] ); + aCbxXAxis.Check( rInput.aExistenceList[2] ); + aCbxYAxis.Check( rInput.aExistenceList[3] ); + aCbxZAxis.Check( rInput.aExistenceList[4] ); + + aCbxMain.Enable( rInput.aPossibilityList[0] ); + aEdtMain.Enable( rInput.aPossibilityList[0] && aCbxMain.IsChecked()); + aCbxSub.Enable( rInput.aPossibilityList[1] ); + aEdtSub.Enable( rInput.aPossibilityList[1] && aCbxSub.IsChecked()); + aCbxXAxis.Enable( rInput.aPossibilityList[2] ); + aEdtXAxis.Enable( rInput.aPossibilityList[2] && aCbxXAxis.IsChecked()); + aCbxYAxis.Enable( rInput.aPossibilityList[3] ); + aEdtYAxis.Enable( rInput.aPossibilityList[3] && aCbxYAxis.IsChecked()); + aCbxZAxis.Enable( rInput.aPossibilityList[4] ); + aEdtZAxis.Enable( rInput.aPossibilityList[4] && aCbxZAxis.IsChecked()); + + aEdtMain.SetText(rInput.aTextList[0]); + aEdtSub.SetText(rInput.aTextList[1]); + aEdtXAxis.SetText(rInput.aTextList[2]); + aEdtYAxis.SetText(rInput.aTextList[3]); + aEdtZAxis.SetText(rInput.aTextList[4]); +} + +SchTitleDlg::~SchTitleDlg() +{ +} + +IMPL_LINK( SchTitleDlg, EnableTitleHdl, CheckBox *, pCbx ) +{ + if (pCbx == &aCbxMain) + { + aEdtMain.Enable(aCbxMain.IsChecked()); + } + else if (pCbx == &aCbxSub) + { + aEdtSub.Enable(aCbxSub.IsChecked()); + } + else if (pCbx == &aCbxXAxis) + { + aEdtXAxis.Enable(aCbxXAxis.IsChecked()); + } + else if (pCbx == &aCbxYAxis) + { + aEdtYAxis.Enable(aCbxYAxis.IsChecked()); + } + else if (pCbx == &aCbxZAxis) + { + aEdtZAxis.Enable(aCbxZAxis.IsChecked()); + } + return 0; +} + +void SchTitleDlg::getResult( InsertTitleDialogData& rOutput ) +{ + rOutput.aExistenceList[0] = aCbxMain.IsChecked() && aEdtMain.GetText().Len(); + rOutput.aExistenceList[1] = aCbxSub.IsChecked() && aEdtSub.GetText().Len(); + rOutput.aExistenceList[2] = aCbxXAxis.IsChecked() && aEdtXAxis.GetText().Len(); + rOutput.aExistenceList[3] = aCbxYAxis.IsChecked() && aEdtYAxis.GetText().Len(); + rOutput.aExistenceList[4] = aCbxZAxis.IsChecked() && aEdtZAxis.GetText().Len(); + + rOutput.aTextList[0] = aEdtMain.GetText(); + rOutput.aTextList[1] = aEdtSub.GetText(); + rOutput.aTextList[2] = aEdtXAxis.GetText(); + rOutput.aTextList[3] = aEdtYAxis.GetText(); + rOutput.aTextList[4] = aEdtZAxis.GetText(); +} + +//............................................................................. +} //namespace chart +//............................................................................. + diff --git a/chart2/source/controller/dialogs/dlg_InsertTitle.hrc b/chart2/source/controller/dialogs/dlg_InsertTitle.hrc new file mode 100644 index 000000000..984d49708 --- /dev/null +++ b/chart2/source/controller/dialogs/dlg_InsertTitle.hrc @@ -0,0 +1,74 @@ +/************************************************************************* + * + * $RCSfile: dlg_InsertTitle.hrc,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:26 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#define BTN_OK 1 +#define BTN_CANCEL 1 +#define BTN_HELP 1 +#define EDT_MAINTITLE 1 +#define EDT_SUBTITLE 2 +#define EDT_X_AXIS 3 +#define EDT_Y_AXIS 4 +#define EDT_Z_AXIS 5 +#define CBX_MAINTITLE 1 +#define CBX_SUBTITLE 2 +#define CBX_TITLE_X_AXIS 3 +#define CBX_TITLE_Y_AXIS 4 +#define CBX_TITLE_Z_AXIS 5 +#define DLG_TITLE 834 diff --git a/chart2/source/controller/dialogs/dlg_InsertTitle.src b/chart2/source/controller/dialogs/dlg_InsertTitle.src new file mode 100644 index 000000000..a8b1382d2 --- /dev/null +++ b/chart2/source/controller/dialogs/dlg_InsertTitle.src @@ -0,0 +1,342 @@ +/************************************************************************* + * + * $RCSfile: dlg_InsertTitle.src,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:26 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +#include "dlg_InsertTitle.hrc" +#include "SchSlotIds.hxx" +#include "CommonResources.hrc" + +ModalDialog DLG_TITLE +{ + HelpID = SID_INSERT_TITLE ; + OutputSize = TRUE ; + SVLook = TRUE ; + Size = MAP_APPFONT ( 240 , 88 ) ; + Text = "Titel" ; + Text [ ENGLISH ] = "Title" ; + Text [ norwegian ] = "Tittel" ; + Text [ italian ] = "Titolo" ; + Text [ portuguese_brazilian ] = "Ttulos" ; + Text [ portuguese ] = "Ttulo" ; + Text [ finnish ] = "Otsikot" ; + Text [ danish ] = "Titel" ; + Text [ french ] = "Titre" ; + Text [ swedish ] = "Rubrik" ; + Text [ dutch ] = "Titel" ; + Text [ spanish ] = "Ttulo" ; + Text [ english_us ] = "Titles" ; + Moveable = TRUE ; + // Closeable = TRUE; // Dialog hat Cancel und/oder OK-Button ! (KH) + BUTTONS_OK_CANCEL_HELP_STACKED(184) + Edit EDT_MAINTITLE + { + Border = TRUE ; + Pos = MAP_APPFONT ( 78 , 6 ) ; + Size = MAP_APPFONT ( 100 , 12 ) ; + TabStop = TRUE ; + }; + Edit EDT_SUBTITLE + { + Border = TRUE ; + Pos = MAP_APPFONT ( 78 , 22 ) ; + Size = MAP_APPFONT ( 100 , 12 ) ; + TabStop = TRUE ; + }; + Edit EDT_X_AXIS + { + Border = TRUE ; + Pos = MAP_APPFONT ( 78 , 38 ) ; + Size = MAP_APPFONT ( 100 , 12 ) ; + TabStop = TRUE ; + }; + Edit EDT_Y_AXIS + { + Border = TRUE ; + Pos = MAP_APPFONT ( 78 , 54 ) ; + Size = MAP_APPFONT ( 100 , 12 ) ; + TabStop = TRUE ; + }; + Edit EDT_Z_AXIS + { + Border = TRUE ; + Pos = MAP_APPFONT ( 78 , 70 ) ; + Size = MAP_APPFONT ( 100 , 12 ) ; + TabStop = TRUE ; + }; + CheckBox CBX_MAINTITLE + { + Pos = MAP_APPFONT ( 6 , 6 ) ; + Size = MAP_APPFONT ( 68 , 12 ) ; + Text = "~Haupttitel" ; + Text [ ENGLISH ] = "~Main Title" ; + Text [ norwegian ] = "~Main Title" ; + Text [ italian ] = "Titolo principale" ; + Text [ portuguese_brazilian ] = "Ttulo ~Principal" ; + Text [ portuguese ] = "Ttulo ~principal" ; + Text [ finnish ] = "~Potsikko" ; + Text [ danish ] = "Overskrift" ; + Text [ french ] = "Titre ~principal" ; + Text [ swedish ] = "Huvud~rubrik" ; + Text [ dutch ] = "~Hoofdtitel" ; + Text [ spanish ] = "~Ttulo principal" ; + Text [ english_us ] = "~Main Title" ; + TabStop = TRUE ; + Text[ chinese_simplified ] = "主标题(~M)"; + Text[ russian ] = " "; + Text[ polish ] = "Tytu ~gwny"; + Text[ japanese ] = "メインタイトル(~M)"; + Text[ chinese_traditional ] = "主標題(~M)"; + Text[ arabic ] = " "; + Text[ greek ] = "~ "; + Text[ korean ] = "주 제목(~M)"; + Text[ turkish ] = "~Ana balk"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "~Ttol principal"; + Text[ thai ] = "ชื่อ~หลัก"; + Text[ czech ] = "Titul"; + Text[ hebrew ] = "~Haupttitel"; + Text[ hindi ] = "~प्रधान शीर्षक"; + Text[ slovak ] = "~Hlavný nadpis"; + }; + CheckBox CBX_SUBTITLE + { + Pos = MAP_APPFONT ( 6 , 22 ) ; + Size = MAP_APPFONT ( 68 , 12 ) ; + Text = "~Untertitel" ; + Text [ ENGLISH ] = "~Sub Title" ; + Text [ norwegian ] = "~Sub Title" ; + Text [ italian ] = "Sottotitolo" ; + Text [ portuguese_brazilian ] = "~Sub-ttulo" ; + Text [ portuguese ] = "~Subttulo" ; + Text [ finnish ] = "~Alaotsikko" ; + Text [ danish ] = "Undertitel" ; + Text [ french ] = "~Sous-titre" ; + Text [ swedish ] = "~Underrubrik" ; + Text [ dutch ] = "~Subtitel" ; + Text [ spanish ] = "~Subttulo" ; + Text [ english_us ] = "~Subtitle" ; + TabStop = TRUE ; + Text[ chinese_simplified ] = "分标题(~S)"; + Text[ russian ] = ""; + Text[ polish ] = "~Podtytu"; + Text[ japanese ] = "サブタイトル(~S)"; + Text[ chinese_traditional ] = "分標題(~S)"; + Text[ arabic ] = " "; + Text[ greek ] = ""; + Text[ korean ] = "부제(~S)"; + Text[ turkish ] = "~Alt balk"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "~Subttol"; + Text[ thai ] = "ชื่อ~รอง"; + Text[ czech ] = "Podtitul"; + Text[ hebrew ] = "~Untertitel"; + Text[ hindi ] = "~उपशीर्षक"; + Text[ slovak ] = "P~odnadpis"; + }; + CheckBox CBX_TITLE_X_AXIS + { + Pos = MAP_APPFONT ( 6 , 38 ) ; + Size = MAP_APPFONT ( 68 , 12 ) ; + Text = "~X-Achse" ; + Text [ ENGLISH ] = "~X-Axis" ; + Text [ norwegian ] = "~X-Axis" ; + Text [ italian ] = "Asse ~X" ; + Text [ portuguese_brazilian ] = "Eixo ~X" ; + Text [ portuguese ] = "~Eixo X" ; + Text [ finnish ] = "~X-akseli" ; + Text [ danish ] = "X-akse" ; + Text [ french ] = "Axe X" ; + Text [ swedish ] = "~X-axel" ; + Text [ dutch ] = "~X-as" ; + Text [ spanish ] = "Eje ~X" ; + Text [ english_us ] = "~X axis" ; + TabStop = TRUE ; + Text[ chinese_simplified ] = "~X 轴"; + Text[ russian ] = " X"; + Text[ polish ] = "O ~X"; + Text[ japanese ] = "~X 軸"; + Text[ chinese_traditional ] = "~X 軸"; + Text[ arabic ] = " "; + Text[ greek ] = " X"; + Text[ korean ] = "~X 축"; + Text[ turkish ] = "~X ekseni"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "Eix ~X"; + Text[ thai ] = "แกน~X "; + Text[ czech ] = "Osa X"; + Text[ hebrew ] = "~X-Achse"; + Text[ hindi ] = "~X अक्ष"; + Text[ slovak ] = "Os ~X"; + }; + CheckBox CBX_TITLE_Y_AXIS + { + Pos = MAP_APPFONT ( 6 , 54 ) ; + Size = MAP_APPFONT ( 68 , 12 ) ; + Text = "~Y-Achse" ; + Text [ ENGLISH ] = "~Y-Axis" ; + Text [ norwegian ] = "~Y-Axis" ; + Text [ italian ] = "Asse ~Y" ; + Text [ portuguese_brazilian ] = "Eixo ~Y" ; + Text [ portuguese ] = "~Eixo Y" ; + Text [ finnish ] = "~Y-akseli" ; + Text [ danish ] = "Y-akse" ; + Text [ french ] = "Axe ~Y" ; + Text [ swedish ] = "~Y-axel" ; + Text [ dutch ] = "~Y-as" ; + Text [ spanish ] = "Eje ~Y" ; + Text [ english_us ] = "~Y axis" ; + TabStop = TRUE ; + Text[ chinese_simplified ] = "~Y 轴"; + Text[ russian ] = " Y"; + Text[ polish ] = "O ~Y"; + Text[ japanese ] = "~Y 軸"; + Text[ chinese_traditional ] = "~Y 軸"; + Text[ arabic ] = " "; + Text[ greek ] = " ~"; + Text[ korean ] = "~Y 축"; + Text[ turkish ] = "~Y ekseni"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "Eix ~Y"; + Text[ thai ] = "แกน~Y "; + Text[ czech ] = "Osa Y"; + Text[ hebrew ] = "~Y-Achse"; + Text[ hindi ] = "~Y अक्ष"; + Text[ slovak ] = "Os ~Y"; + }; + CheckBox CBX_TITLE_Z_AXIS + { + Pos = MAP_APPFONT ( 6 , 70 ) ; + Size = MAP_APPFONT ( 68 , 12 ) ; + Text = "~Z-Achse" ; + Text [ ENGLISH ] = "~Z-Axis" ; + Text [ norwegian ] = "~Z-Axis" ; + Text [ italian ] = "Asse ~Z" ; + Text [ portuguese_brazilian ] = "Eixo ~Z" ; + Text [ portuguese ] = "Eixo ~Z" ; + Text [ finnish ] = "~Z-akseli" ; + Text [ danish ] = "Z-akse" ; + Text [ french ] = "Axe ~Z" ; + Text [ swedish ] = "~Z-axel" ; + Text [ dutch ] = "~Z-as" ; + Text [ spanish ] = "Eje ~Z" ; + Text [ english_us ] = "~Z axis" ; + TabStop = TRUE ; + Text[ chinese_simplified ] = "~Z 轴"; + Text[ russian ] = " Z"; + Text[ polish ] = "O ~Z"; + Text[ japanese ] = "~Z 軸"; + Text[ chinese_traditional ] = "~Z 軸"; + Text[ arabic ] = " "; + Text[ greek ] = " Z"; + Text[ korean ] = "~Z 축"; + Text[ turkish ] = "~Z ekseni"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "Eix ~Z"; + Text[ thai ] = "แกน~Z "; + Text[ czech ] = "Osa Z"; + Text[ hebrew ] = "~Z-Achse"; + Text[ hindi ] = "~Z अक्ष"; + Text[ slovak ] = "Os ~Z"; + }; + Text[ chinese_simplified ] = "标题"; + Text[ russian ] = ""; + Text[ polish ] = "Tytu"; + Text[ japanese ] = "タイトル"; + Text[ chinese_traditional ] = "標題"; + Text[ arabic ] = ""; + Text[ greek ] = ""; + Text[ korean ] = "제목"; + Text[ turkish ] = "Balk"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "Ttol"; + Text[ thai ] = "ชื่อ"; + Text[ czech ] = "Tituly"; + Text[ hebrew ] = "Titel"; + Text[ hindi ] = "शीर्षक"; + Text[ slovak ] = "Nadpisy"; +}; + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx new file mode 100644 index 000000000..f43234a41 --- /dev/null +++ b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx @@ -0,0 +1,605 @@ +/************************************************************************* + * + * $RCSfile: dlg_ObjectProperties.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:26 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef _ZFORLIST_HXX +#ifndef _ZFORLIST_DECLARE_TABLE +#define _ZFORLIST_DECLARE_TABLE +#endif +#include <svtools/zforlist.hxx> +#endif + +#include "dlg_ObjectProperties.hxx" +#include "dlg_ObjectProperties.hrc" +#include "TabPages.hrc" +#include "tp_AxisLabel.hxx" +#include "tp_DataLabel.hxx" +#include "tp_LegendPosition.hxx" +#include "tp_PointGeometry.hxx" +#include "tp_Scale.hxx" +#include "tp_SeriesStatistic.hxx" +#include "tp_SeriesToAxis.hxx" +#include "tp_TitleRotation.hxx" +#include "SchSlotIds.hxx" +#include "ResId.hxx" +#include "ViewElementListProvider.hxx" + +#ifndef _SVX_CHARDLG_HXX +#include <svx/chardlg.hxx> +#endif +#ifndef _SVX_DIALOGS_HRC +#include <svx/dialogs.hrc> +#endif +#ifndef _SVX_FLSTITEM_HXX +#include <svx/flstitem.hxx> +#endif +#ifndef _SVX_TAB_LINE_HXX +#include <svx/tabline.hxx> +#endif + + +#ifndef _SVX_NUMFMT_HXX +#include <svx/numfmt.hxx> +#endif + +#define ITEMID_NUMBERINFO SID_ATTR_NUMBERFORMAT_INFO +#ifndef _SVX_NUMINF_HXX +#include <svx/numinf.hxx> +#endif + +//............................................................................. +namespace chart +{ +//............................................................................. + +/************************************************************************/ + +//provide Resource-Id of a tab dialog for the given ObjectType +USHORT SchAttribTabDlg::GetResId(ObjectType eObjectType) +{ + USHORT nRet=0; + switch( eObjectType ) + { + case OBJECTTYPE_PAGE: + nRet=TAB_DIAGRAM_AREA; + break; + case OBJECTTYPE_TITLE: + nRet=TAB_TITLE; + break; + case OBJECTTYPE_LEGEND: + nRet=TAB_LEGEND; + break; + case OBJECTTYPE_LEGEND_ENTRY: + nRet=0;//@todo there is not tab dialog so far + break; + case OBJECTTYPE_DIAGRAM: + nRet=TAB_DIAGRAM_WALL;//@todo ... maybe size,pos,rotation depth ...? + break; + case OBJECTTYPE_DIAGRAM_WALL: + nRet=TAB_DIAGRAM_WALL; + break; + case OBJECTTYPE_DIAGRAM_FLOOR: + nRet=TAB_DIAGRAM_FLOOR; + break; + case OBJECTTYPE_AXIS: + nRet=TAB_AXIS;//@todo need further specialisation for titles (x,y,z axis) + //and for z axis hide pages PAGE_AXISSCALE and PAGE_NUMBERFORMAT + break; + case OBJECTTYPE_AXIS_UNITLABEL: + nRet=0;//@todo there is not tab dialog so far + break; + case OBJECTTYPE_GRID: + nRet=TAB_GRID; + break; + case OBJECTTYPE_DATA_LABELS: + case OBJECTTYPE_DATA_SERIES: + nRet=TAB_DATA_ROW; + //@todo ( old case ATTR_DATA_LINE - TAB_DATA_LINE ) + //for line oriented series hide folloing pages: PAGE_AREA PAGE_TRANSPARENCE and PAGE_LAYOUT + break; + case OBJECTTYPE_DATA_LABEL: + case OBJECTTYPE_DATA_POINT: + nRet=TAB_DATA_POINT; + break; + case OBJECTTYPE_DATA_ERRORS: + nRet=TAB_LINE; + break; + case OBJECTTYPE_DATA_ERRORS_X: + nRet=TAB_LINE; + break; + case OBJECTTYPE_DATA_ERRORS_Y: + nRet=TAB_LINE; + break; + case OBJECTTYPE_DATA_ERRORS_Z: + nRet=TAB_LINE; + break; + case OBJECTTYPE_DATA_FUNCTION: + nRet=TAB_LINE; + break; + case OBJECTTYPE_DATA_STOCK_RANGE: + nRet=TAB_LINE; + break; + case OBJECTTYPE_DATA_STOCK_LOSS: + nRet=TAB_DIAGRAM_STOCK_LOSS; + break; + case OBJECTTYPE_DATA_STOCK_GAIN: + nRet=TAB_DIAGRAM_STOCK_PLUS; + break; + default: //OBJECTTYPE_UNKNOWN + nRet=0; + } + if(nRet==0) + { + DBG_ERROR("Do not have an associated tab dialog for this ObjectType"); + nRet=TAB_LINE; + } + return nRet; +} +/* +USHORT SchAttribTabDlg::GetResId(AttrType eType) +{ + switch (eType) + { + case ATTR_TITLE: return TAB_TITLE; + case ATTR_LEGEND: return TAB_LEGEND; + case ATTR_DATA_ROW: return TAB_DATA_ROW; + case ATTR_DATA_LINE: return TAB_DATA_LINE; + case ATTR_DATA_POINT: return TAB_DATA_POINT; + case ATTR_AXIS: return TAB_AXIS; + case ATTR_X_AXIS_2D: + case ATTR_X_AXIS_3D: return TAB_X_AXIS; + case ATTR_Y_AXIS_2D: + case ATTR_Y_AXIS_3D: return TAB_Y_AXIS; + case ATTR_Z_AXIS: return TAB_Z_AXIS; + case ATTR_GRID: return TAB_GRID; + case ATTR_LINE: return TAB_LINE; + case ATTR_DIAGRAM_AREA: return TAB_DIAGRAM_AREA; + case ATTR_DIAGRAM_WALL: return TAB_DIAGRAM_WALL; + case ATTR_DIAGRAM_FLOOR: return TAB_DIAGRAM_FLOOR; + case ATTR_DIAGRAM_STOCK_LOSS: return TAB_DIAGRAM_STOCK_LOSS; + case ATTR_DIAGRAM_STOCK_PLUS: return TAB_DIAGRAM_STOCK_PLUS; + default: return 0; + } +} +*/ +//------------------------------------------------------------------- + +OldModelWrapper::OldModelWrapper() +{ +} + +OldModelWrapper::~OldModelWrapper() +{ +} +/* +BOOL OldModelWrapper::IsXYChart() const +{ + return false; +} +*/ +BOOL OldModelWrapper::IsBar() const +{ + return true; +} +BOOL OldModelWrapper::Is3DChart() const +{ + return false; +} +/* +BOOL OldModelWrapper::Is3DPie() const +{ + return false; +} +*/ +BOOL OldModelWrapper::IsStatisticChart() const +{ + return true; +} + +BOOL OldModelWrapper::HasAreaProperties() const +{ + return true; +} +BOOL OldModelWrapper::HasScaleProperties() const +{ + return true; +} + +BOOL OldModelWrapper::ProvidesSecondaryYAxis() const +{ + return true; +} +BOOL OldModelWrapper::IsCol( long nRow ) const +{ + return false; +} + +/************************************************************************* +|* +|* Konstruktor des Tab-Dialogs: Fuegt die Seiten zum Dialog hinzu +|* +\************************************************************************/ + +//const USHORT nNoArrowDlg = 1100; +const USHORT nNoArrowNoShadowDlg = 1101; + +SchAttribTabDlg::SchAttribTabDlg(Window* pParent, ObjectType eType, + const SfxItemSet* pAttr, + const ViewElementListProvider* pViewElementListProvider, + const OldModelWrapper* pModel, + bool AffectsMultipleObjects, + const SfxItemSet* pSymbolAttr, + Graphic aGraphic) + : SfxTabDialog(pParent, SchResId(GetResId(eType)), pAttr) + , eObjectType(eType) + , bAffectsMultipleObjects(AffectsMultipleObjects) + , nDlgType(nNoArrowNoShadowDlg) + , nPageType(0) + , m_pModelWrapper( pModel ) + , m_pViewElementListProvider( pViewElementListProvider ) + , mpSymbolAttr(pSymbolAttr) + , maSymbolGraphic(aGraphic) +/* + , pColorTab(pViewElementListProvider->GetColorTable()) + , pGradientList(pViewElementListProvider->GetGradientList()) + , pHatchingList(pViewElementListProvider->GetHatchList()) + , pBitmapList(pViewElementListProvider->GetBitmapList()) + , pDashList(pViewElementListProvider->GetDashList()) + , pLineEndList(pViewElementListProvider->GetLineEndList()) +*/ + , nColorTableState(CT_NONE) + , nGradientListState(CT_NONE) + , nHatchingListState(CT_NONE) + , nBitmapListState(CT_NONE) +{ + FreeResource(); + switch (eObjectType) + { + case OBJECTTYPE_TITLE://ATTR_TITLE: + AddTabPage(RID_SVXPAGE_LINE, SvxLineTabPage::Create, NULL); + AddTabPage(RID_SVXPAGE_AREA, SvxAreaTabPage::Create, NULL); + AddTabPage(RID_SVXPAGE_TRANSPARENCE, SvxTransparenceTabPage::Create, NULL); + AddTabPage(RID_SVXPAGE_CHAR_NAME, SvxCharNamePage::Create, NULL); + AddTabPage(RID_SVXPAGE_CHAR_EFFECTS, SvxCharEffectsPage::Create, NULL); + AddTabPage(TP_ALIGNMENT, SchAlignmentTabPage::Create, NULL); + /*if (//(nID == CHOBJID_DIAGRAM_TITLE_X_AXIS) || (nID == CHOBJID_DIAGRAM_TITLE_Z_AXIS) || + (nID == CHOBJID_TITLE_MAIN) || (nID == CHOBJID_TITLE_SUB)) + RemoveTabPage (TP_ALIGNMENT);*/ +//// nDlgType = nNoArrowDlg; + break; + + case OBJECTTYPE_LEGEND://ATTR_LEGEND: + AddTabPage(RID_SVXPAGE_LINE, SvxLineTabPage::Create, NULL); + AddTabPage(RID_SVXPAGE_AREA, SvxAreaTabPage::Create, NULL); + AddTabPage(RID_SVXPAGE_TRANSPARENCE, SvxTransparenceTabPage::Create, NULL); + AddTabPage(RID_SVXPAGE_CHAR_NAME, SvxCharNamePage::Create, NULL); + AddTabPage(RID_SVXPAGE_CHAR_EFFECTS, SvxCharEffectsPage::Create, NULL); + AddTabPage(TP_LEGEND_POS, SchLegendPosTabPage::Create, NULL); +//// nDlgType = nNoArrowDlg; + break; + + case OBJECTTYPE_DATA_SERIES://ATTR_DATA_ROW: + case OBJECTTYPE_DATA_POINT://ATTR_DATA_POINT: + case OBJECTTYPE_DATA_LABEL: + case OBJECTTYPE_DATA_LABELS: + AddTabPage(RID_SVXPAGE_LINE, SvxLineTabPage::Create, NULL); + AddTabPage(RID_SVXPAGE_AREA, SvxAreaTabPage::Create, NULL); + AddTabPage(RID_SVXPAGE_TRANSPARENCE, SvxTransparenceTabPage::Create, NULL); + if(!m_pModelWrapper->HasAreaProperties()) + { + RemoveTabPage(RID_SVXPAGE_AREA); + RemoveTabPage(RID_SVXPAGE_TRANSPARENCE); + } + AddTabPage(RID_SVXPAGE_CHAR_NAME, SvxCharNamePage::Create, NULL); + AddTabPage(RID_SVXPAGE_CHAR_EFFECTS, SvxCharEffectsPage::Create, NULL); + AddTabPage(TP_DATA_DESCR, SchDataDescrTabPage::Create, NULL); + AddTabPage(TP_STAT, SchStatisticTabPage::Create, NULL); + if( OBJECTTYPE_DATA_POINT == eObjectType + || OBJECTTYPE_DATA_LABEL == eObjectType + || !m_pModelWrapper->IsStatisticChart()) + { + RemoveTabPage (TP_STAT); + } + AddTabPage(TP_LAYOUT,SchLayoutTabPage::Create, NULL); + // Layout tab only for 3D bar and column charts. + if( !(m_pModelWrapper->Is3DChart() && (m_pModelWrapper->IsBar() || m_pModelWrapper->IsCol(0)))) + RemoveTabPage(TP_LAYOUT); + /* + if(m_pModelWrapper->Is3DPie() ) + RemoveTabPage(TP_LAYOUT); + */ + + AddTabPage(TP_OPTIONS,SchOptionTabPage::Create, NULL); + //if ((((const SfxInt32Item &)pAttr->Get (SCHATTR_DUMMY1)).GetValue () == CHOBJID_DIAGRAM_DATA) || + + if( OBJECTTYPE_DATA_POINT == eObjectType + || OBJECTTYPE_DATA_LABEL == eObjectType + || !m_pModelWrapper->ProvidesSecondaryYAxis() ) + RemoveTabPage(TP_OPTIONS); + +//// nDlgType = nNoArrowNoShadowDlg; + break; + + /* + case OBJECTTYPE_DATA_SERIES://ATTR_DATA_LINE: + + AddTabPage(RID_SVXPAGE_LINE, SvxLineTabPage::Create, NULL); + AddTabPage(RID_SVXPAGE_CHAR_NAME, SvxCharNamePage::Create, NULL); + AddTabPage(RID_SVXPAGE_CHAR_EFFECTS, SvxCharEffectsPage::Create, NULL); + AddTabPage(TP_DATA_DESCR, SchDataDescrTabPage::Create, NULL); + //if (m_pModelWrapper->IsStatisticChart()) + AddTabPage(TP_STAT, SchStatisticTabPage::Create, NULL); + AddTabPage(TP_OPTIONS,SchOptionTabPage::Create, NULL); + if (!m_pModelWrapper->IsStatisticChart()) + RemoveTabPage (TP_STAT); + if(!m_pModelWrapper->ProvidesSecondaryYAxis()) + RemoveTabPage(TP_OPTIONS); + nDlgType = nNoArrowDlg; + break; + */ + + + /* + case OBJECTTYPE_AXIS://ATTR_AXIS: + AddTabPage(RID_SVXPAGE_LINE, SvxLineTabPage::Create, NULL); + AddTabPage(RID_SVXPAGE_CHAR_NAME, SvxCharNamePage::Create, NULL); + AddTabPage(RID_SVXPAGE_CHAR_EFFECTS, SvxCharEffectsPage::Create, NULL); + AddTabPage(TP_AXIS_LABEL, SchAxisLabelTabPage::Create, NULL); + nDlgType = nNoArrowDlg; + break; + + case ATTR_X_AXIS_2D: + */ + case OBJECTTYPE_AXIS: + { + AddTabPage(RID_SVXPAGE_LINE, SvxLineTabPage::Create, NULL); + AddTabPage(RID_SVXPAGE_CHAR_NAME, SvxCharNamePage::Create, NULL); + AddTabPage(RID_SVXPAGE_CHAR_EFFECTS, SvxCharEffectsPage::Create, NULL); + AddTabPage(TP_AXIS_LABEL, SchAxisLabelTabPage::Create, NULL); + AddTabPage(TP_SCALE_Y, SchScaleYAxisTabPage::Create, NULL); + AddTabPage(RID_SVXPAGE_NUMBERFORMAT, SvxNumberFormatTabPage::Create, NULL); + + if( bAffectsMultipleObjects || !m_pModelWrapper->HasScaleProperties() ) + { + RemoveTabPage (TP_SCALE_Y); + RemoveTabPage (RID_SVXPAGE_NUMBERFORMAT); + } +//// nDlgType = nNoArrowDlg; +//// ((SfxItemSet * const) pAttr)->ClearItem (SCHATTR_AXISTYPE); +//// ((SfxItemSet *) pAttr)->Put (SfxInt32Item (SCHATTR_AXISTYPE, CHART_AXIS_X)); + +//// nAxisType = 1; + break; + } + + /* + case ATTR_Y_AXIS_2D: + case ATTR_Y_AXIS_3D: + AddTabPage(RID_SVXPAGE_LINE, SvxLineTabPage::Create, NULL); + AddTabPage(RID_SVXPAGE_CHAR_NAME, SvxCharNamePage::Create, NULL); + AddTabPage(RID_SVXPAGE_CHAR_EFFECTS, SvxCharEffectsPage::Create, NULL); + AddTabPage(TP_SCALE_Y, SchScaleYAxisTabPage::Create, NULL); + AddTabPage(RID_SVXPAGE_NUMBERFORMAT, SvxNumberFormatTabPage::Create, NULL); + AddTabPage(TP_AXIS_LABEL, SchAxisLabelTabPage::Create, NULL); + nDlgType = nNoArrowDlg; +//// ((SfxItemSet * const) pAttr)->ClearItem (SCHATTR_AXISTYPE); +//// ((SfxItemSet *) pAttr)->Put (SfxInt32Item (SCHATTR_AXISTYPE, CHART_AXIS_Y)); + +//// nAxisType = 2; + break; + + case ATTR_Z_AXIS: + AddTabPage(RID_SVXPAGE_LINE, SvxLineTabPage::Create, NULL); + AddTabPage(RID_SVXPAGE_CHAR_NAME, SvxCharNamePage::Create, NULL); + AddTabPage(RID_SVXPAGE_CHAR_EFFECTS, SvxCharEffectsPage::Create, NULL); + AddTabPage(TP_AXIS_LABEL, SchAxisLabelTabPage::Create, NULL); + nDlgType = nNoArrowDlg; +//// ((SfxItemSet * const) pAttr)->ClearItem (SCHATTR_AXISTYPE); +//// ((SfxItemSet *) pAttr)->Put (SfxInt32Item (SCHATTR_AXISTYPE, CHART_AXIS_Z)); + +//// nAxisType = 3; + break; + */ + case OBJECTTYPE_GRID: //ATTR_GRID + case OBJECTTYPE_DATA_ERRORS: + case OBJECTTYPE_DATA_ERRORS_X: + case OBJECTTYPE_DATA_ERRORS_Y: + case OBJECTTYPE_DATA_ERRORS_Z: + case OBJECTTYPE_DATA_FUNCTION: + case OBJECTTYPE_DATA_STOCK_RANGE://ATTR_LINE + AddTabPage(RID_SVXPAGE_LINE, SvxLineTabPage::Create, NULL); +//// nDlgType = nNoArrowDlg; + break; + + case OBJECTTYPE_DATA_STOCK_LOSS://ATTR_DIAGRAM_STOCK_LOSS: + case OBJECTTYPE_DATA_STOCK_GAIN://ATTR_DIAGRAM_STOCK_PLUS: + case OBJECTTYPE_PAGE://ATTR_DIAGRAM_AREA: + case OBJECTTYPE_DIAGRAM_FLOOR://ATTR_DIAGRAM_FLOOR: + case OBJECTTYPE_DIAGRAM_WALL://ATTR_DIAGRAM_WALL: + case OBJECTTYPE_DIAGRAM://ATTR_DIAGRAM_WALL: //@todo + AddTabPage(RID_SVXPAGE_LINE, SvxLineTabPage::Create, NULL); + AddTabPage(RID_SVXPAGE_AREA, SvxAreaTabPage::Create, NULL); + AddTabPage(RID_SVXPAGE_TRANSPARENCE, SvxTransparenceTabPage::Create, NULL); +//// nDlgType = nNoArrowNoShadowDlg; + break; + } +} + +/************************************************************************* +|* +|* Destruktor +|* +\************************************************************************/ + +SchAttribTabDlg::~SchAttribTabDlg() +{ +} + +/************************************************************************* +|* +|* +|* +\************************************************************************/ + +void SchAttribTabDlg::PageCreated(USHORT nId, SfxTabPage &rPage) +{ + switch (nId) + { + case TP_LAYOUT: + break; + case RID_SVXPAGE_LINE: + ((SvxLineTabPage&)rPage).SetColorTable(m_pViewElementListProvider->GetColorTable()); + ((SvxLineTabPage&)rPage).SetDashList(m_pViewElementListProvider->GetDashList()); + ((SvxLineTabPage&)rPage).SetLineEndList(m_pViewElementListProvider->GetLineEndList()); + ((SvxLineTabPage&)rPage).SetPageType(&nPageType); + ((SvxLineTabPage&)rPage).SetDlgType(&nDlgType); + ((SvxLineTabPage&)rPage).Construct(); + ((SvxLineTabPage&)rPage).ActivatePage(*GetInputSetImpl()); + if(mpSymbolAttr)//unfein, aber wenn man schon die Attribute setzt, wird es wohl ne Linie + { //mit Symbolen sein. + ((SvxLineTabPage&)rPage).ShowSymbolControls(TRUE); + ((SvxLineTabPage&)rPage).SetSymbolList(m_pViewElementListProvider->GetSymbolList()); + ((SvxLineTabPage&)rPage).SetSymbolAttr(mpSymbolAttr); + ((SvxLineTabPage&)rPage).SetAutoSymbolGraphic(&maSymbolGraphic); + } + break; + + case RID_SVXPAGE_AREA: + ((SvxAreaTabPage&)rPage).SetColorTable(m_pViewElementListProvider->GetColorTable()); + ((SvxAreaTabPage&)rPage).SetGradientList(m_pViewElementListProvider->GetGradientList()); + ((SvxAreaTabPage&)rPage).SetHatchingList(m_pViewElementListProvider->GetHatchList()); + ((SvxAreaTabPage&)rPage).SetBitmapList(m_pViewElementListProvider->GetBitmapList()); + ((SvxAreaTabPage&)rPage).SetPageType(&nPageType); + ((SvxAreaTabPage&)rPage).SetDlgType(&nDlgType); + ((SvxAreaTabPage&)rPage).SetGrdChgd(&nGradientListState); + ((SvxAreaTabPage&)rPage).SetHtchChgd(&nHatchingListState); + ((SvxAreaTabPage&)rPage).SetBmpChgd(&nBitmapListState); + ((SvxAreaTabPage&)rPage).SetColorChgd(&nColorTableState); + ((SvxAreaTabPage&)rPage).Construct(); + ((SvxAreaTabPage&)rPage).ActivatePage(*GetInputSetImpl()); + break; + + case RID_SVXPAGE_TRANSPARENCE: + ( (SvxTransparenceTabPage&) rPage ).SetPageType( &nPageType ); + ( (SvxTransparenceTabPage&) rPage ).SetDlgType( &nDlgType ); + ( (SvxTransparenceTabPage&) rPage ).Construct(); + break; + + case RID_SVXPAGE_CHAR_NAME: + ((SvxCharNamePage&)rPage). + SetFontList(SvxFontListItem(m_pViewElementListProvider->getFontList())); + break; + + case RID_SVXPAGE_CHAR_EFFECTS: + ((SvxCharEffectsPage&) rPage).DisableControls( DISABLE_CASEMAP ); + break; + + case TP_AXIS_LABEL: + { + //for 3D axis staggering is disabled + BOOL bShowStaggeringControls = !m_pModelWrapper->Is3DChart(); + ((SchAxisLabelTabPage&)rPage).ShowStaggeringControls( bShowStaggeringControls ); +//// ((SchAxisLabelTabPage&)rPage).AllowTextOverlap( TRUE ); + break; + } + + case TP_ALIGNMENT: + { + /* + OrderMode eMode; + switch (eObjectType) + { + case ATTR_X_AXIS_2D: + eMode = CHORDMODE_X_AXIS; + break; + + case ATTR_Y_AXIS_2D: + eMode = CHORDMODE_Y_AXIS; + break; + + default: + eMode = CHORDMODE_NONE; + break; + } + ((SchAlignmentTabPage&)rPage).SetOrderMode(eMode); + xxx + */ + ((SchAlignmentTabPage&)rPage).SetTextCanOverlap(/*m_pModelWrapper->IsReal3D()*/TRUE); + break; + } + + case TP_SCALE_Y: + { + SchScaleYAxisTabPage & rAxisTabPage = static_cast< SchScaleYAxisTabPage & >( rPage ); + + // #101318# use own number formatter with higher precision for + // rendering the values in the dialog. + rAxisTabPage.SetNumFormatter( m_pViewElementListProvider->GetOwnNumberFormatter() ); + } + break; + + case RID_SVXPAGE_NUMBERFORMAT: + ((SvxNumberFormatTabPage&)rPage).SetNumberFormatList(SvxNumberInfoItem(m_pViewElementListProvider->GetNumFormatter())); + break; + } +} + +//............................................................................. +} //namespace chart +//............................................................................. diff --git a/chart2/source/controller/dialogs/dlg_ObjectProperties.src b/chart2/source/controller/dialogs/dlg_ObjectProperties.src new file mode 100644 index 000000000..2161a281f --- /dev/null +++ b/chart2/source/controller/dialogs/dlg_ObjectProperties.src @@ -0,0 +1,1602 @@ +/************************************************************************* + * + * $RCSfile: dlg_ObjectProperties.src,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:26 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "dlg_ObjectProperties.hrc" +#include "TabPages.hrc" + +#ifndef _SVX_DIALOGS_HRC +#include <svx/dialogs.hrc> +#endif + +#define PAGE_LINE \ +PageItem \ +{ \ + Identifier = RID_SVXPAGE_LINE ; \ + PageResID = RID_SVXPAGE_LINE ; \ + Text = "Linie" ; \ +}; +/* + Text [ ENGLISH ] = "Line" ; + Text [ english_us ] = "Borders" ; + Text [ italian ] = "Linea" ; + Text [ spanish ] = "Bordes" ; + Text [ french ] = "Bordure" ; + Text [ dutch ] = "Lijn" ; + Text [ swedish ] = "Linje" ; + Text [ danish ] = "Ramme" ; + Text [ portuguese ] = "Contornos" ; + Text [ portuguese_brazilian ] = "Bordas" ; + Text[ chinese_simplified ] = "线条"; + Text[ russian ] = ""; + Text[ polish ] = "Krawdzie"; + Text[ japanese ] = "外枠線"; + Text[ chinese_traditional ] = "線條"; + Text[ arabic ] = ""; + Text[ dutch ] = "Lijn"; + Text[ chinese_simplified ] = "线条"; + Text[ greek ] = ""; + Text[ korean ] = "테두리"; + Text[ turkish ] = "izgi"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "Vores"; + Text[ finnish ] = "Reunat"; + Text[ thai ] = "เส้นขอบ"; + Text[ czech ] = "Okraje"; + Text[ hebrew ] = "מסגרות"; + Text[ hindi ] = "किनारें"; + Text[ slovak ] = "Okraje"; +*/ + + +#define PAGE_AREA \ +PageItem \ +{ \ + Identifier = RID_SVXPAGE_AREA ; \ + PageResID = RID_SVXPAGE_AREA ; \ + Text = "Flche" ; \ +}; +/* + Text [ ENGLISH ] = "Area" ; + Text [ english_us ] = "Area" ; + Text [ norwegian ] = "Omrde" ; + Text [ italian ] = "Area" ; + Text [ portuguese_brazilian ] = "rea" ; + Text [ portuguese ] = "Preenchimento" ; + Text [ finnish ] = "Alue" ; + Text [ danish ] = "Omrde" ; + Text [ french ] = "Remplissage" ; + Text [ swedish ] = "Yta" ; + Text [ dutch ] = "Vlak" ; + Text [ spanish ] = "rea" ; + Text[ chinese_simplified ] = "平面"; + Text[ russian ] = ""; + Text[ polish ] = "Obszar"; + Text[ japanese ] = "エリア"; + Text[ chinese_traditional ] = "平面"; + Text[ arabic ] = ""; + Text[ dutch ] = "Vlak"; + Text[ chinese_simplified ] = "平面"; + Text[ greek ] = ""; + Text[ korean ] = "영역"; + Text[ turkish ] = "Yzey"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "rea"; + Text[ thai ] = "พื้นที่"; + Text[ czech ] = "Oblast"; + Text[ hebrew ] = "Fläche"; + Text[ hindi ] = "विस्तीर्ण"; + Text[ slovak ] = "Oblasť"; +*/ + +#define PAGE_TRANSPARENCE \ +PageItem \ +{ \ + Identifier = RID_SVXPAGE_TRANSPARENCE ; \ + PageResID = RID_SVXPAGE_TRANSPARENCE ; \ + Text = "Transparenz" ; \ +}; +/* + Text [ ENGLISH ] = "Transparence"; + Text[ english_us ] = "Transparency"; + Text[ portuguese ] = "Transparncia"; + Text[ russian ] = ""; + Text[ greek ] = ""; + Text[ dutch ] = "Transparantie"; + Text[ french ] = "Transparence"; + Text[ spanish ] = "Transparencia"; + Text[ italian ] = "Trasparenza"; + Text[ danish ] = "Transparens"; + Text[ swedish ] = "Transparens"; + Text[ polish ] = "Przezroczysto"; + Text[ portuguese_brazilian ] = "Transparncia"; + Text[ japanese ] = "透過性"; + Text[ korean ] = "투명도"; + Text[ chinese_simplified ] = "透明"; + Text[ chinese_traditional ] = "透明"; + Text[ arabic ] = ""; + Text[ turkish ] = "Saydamlk"; + Text[ catalan ] = "Transparncia"; + Text[ finnish ] = "Lpinkyvyys"; + Text[ thai ] = "โปร่งแสง"; + Text[ czech ] = "Průhlednost"; + Text[ hebrew ] = "Transparenz"; + Text[ hindi ] = "पारदर्शकता"; + Text[ slovak ] = "Priehľadnosť"; +*/ + +#define PAGE_CHARACTERS \ +PageItem \ +{ \ + Identifier = RID_SVXPAGE_CHAR_NAME ; \ + PageResID = RID_SVXPAGE_CHAR_NAME ; \ + Text = "Zeichen" ; \ +}; +/* + Text [ ENGLISH ] = "Char" ; + Text [ english_us ] = "Characters" ; + Text [ norwegian ] = "Char" ; + Text [ italian ] = "Carattere" ; + Text [ portuguese_brazilian ] = "Caracteres" ; + Text [ portuguese ] = "Caracteres" ; + Text [ finnish ] = "Merkit" ; + Text [ danish ] = "Tegn" ; + Text [ french ] = "Caractres" ; + Text [ swedish ] = "Tecken" ; + Text [ dutch ] = "Tekens" ; + Text [ spanish ] = "Caracteres" ; + Text[ chinese_simplified ] = "字符"; + Text[ russian ] = ""; + Text[ polish ] = "Znaki"; + Text[ japanese ] = "文字"; + Text[ chinese_traditional ] = "字元"; + Text[ arabic ] = ""; + Text[ dutch ] = "Tekens"; + Text[ chinese_simplified ] = "字符"; + Text[ greek ] = ""; + Text[ korean ] = "글꼴"; + Text[ turkish ] = "Karakterler"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "Carcters"; + Text[ thai ] = "ตัวอักขระ"; + Text[ czech ] = "Znaky"; + Text[ hebrew ] = "תוים"; + Text[ hindi ] = "अक्षरें"; + Text[ slovak ] = "Znaky"; +*/ + +#define PAGE_FONTEFFECTS \ +PageItem \ +{ \ + Identifier = RID_SVXPAGE_CHAR_EFFECTS ; \ + PageResID = RID_SVXPAGE_CHAR_EFFECTS ; \ + Text = "Schrifteffekt" ; \ +}; +/* + Text [ ENGLISH ] = "Character Extension" ; + Text [ english_us ] = "Font Effects" ; + Text [ norwegian ] = "Character Extension" ; + Text [ italian ] = "Effetto carattere" ; + Text [ portuguese_brazilian ] = "Efeitos da Fonte" ; + Text [ portuguese ] = "Efeitos do tipo de letra" ; + Text [ finnish ] = "Fonttitehosteet" ; + Text [ danish ] = "Skrifteffekt" ; + Text [ french ] = "Effets de caractres" ; + Text [ swedish ] = "Teckeneffekt" ; + Text [ dutch ] = "Schrifteffect" ; + Text [ spanish ] = "Efectos de fuente" ; + Text[ chinese_simplified ] = "字体效果"; + Text[ russian ] = " "; + Text[ polish ] = "Efekty czcionki"; + Text[ japanese ] = "フォント効果"; + Text[ chinese_traditional ] = "字型效果"; + Text[ arabic ] = " "; + Text[ greek ] = " "; + Text[ korean ] = "글꼴 효과"; + Text[ turkish ] = "Yaz Tipi Efektleri"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "Efectes de lletra"; + Text[ thai ] = "ลักษณะตัวอักษร"; + Text[ czech ] = "Efekty písma"; + Text[ hebrew ] = "Font Effects"; + Text[ hindi ] = "फ़ॉन्ट् प्रभाव"; + Text[ slovak ] = "Efekty pre písmo"; +*/ + +#define PAGE_DATALABELS \ +PageItem \ +{ \ + Identifier = TP_DATA_DESCR ; \ + PageResID = TP_DATA_DESCR ; \ + Text = "Datenbeschriftung" ; \ +}; +/* + Text [ ENGLISH ] = "Data Descritption" ; + Text [ english_us ] = "Data Labels" ; + Text [ norwegian ] = "Data Descritption" ; + Text [ italian ] = "Dicitura dati" ; + Text [ portuguese_brazilian ] = "Rtulos dos Dados" ; + Text [ portuguese ] = "Legenda para dados" ; + Text [ finnish ] = "Tietoselitteet" ; + Text [ danish ] = "Dataetiketter" ; + Text [ french ] = "tiquetage des donnes" ; + Text [ swedish ] = "Dataetiketter" ; + Text [ dutch ] = "Gegevenslabels" ; + Text [ spanish ] = "Etiqueta de datos" ; + Text[ chinese_simplified ] = "数据标志"; + Text[ russian ] = " "; + Text[ polish ] = "Etykiety danych"; + Text[ japanese ] = "データラベル"; + Text[ chinese_traditional ] = "資料標籤"; + Text[ arabic ] = " "; + Text[ dutch ] = "Gegevenslabels"; + Text[ chinese_simplified ] = "数据标志"; + Text[ greek ] = " "; + Text[ korean ] = "데이터 레이블"; + Text[ turkish ] = "Veri etiketi"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "Etiquetes de dades"; + Text[ thai ] = "ป้ายชื่อข้อมูล"; + Text[ czech ] = "Popisky dat"; + Text[ hebrew ] = "Datenbeschriftung"; + Text[ hindi ] = "ड़ॉटा लेबिलें"; + Text[ slovak ] = "Popisy dát"; +*/ + +#define PAGE_STATISTIC \ +PageItem \ +{ \ + Identifier = TP_STAT ; \ + PageResID = TP_STAT ; \ + Text = "Statistik" ; \ +}; +/* + Text [ ENGLISH ] = "Statistics" ; + Text [ english_us ] = "Statistics" ; + Text [ italian ] = "Statistica" ; + Text [ spanish ] = "Estadstica" ; + Text [ french ] = "Statistiques" ; + Text [ dutch ] = "Statistiek" ; + Text [ swedish ] = "Statistik" ; + Text [ danish ] = "Statistik" ; + Text [ portuguese_brazilian ] = "Estatsticas" ; + Text [ portuguese ] = "Estatstica" ; + Text[ chinese_simplified ] = "统计"; + Text[ russian ] = ""; + Text[ polish ] = "Statystyka"; + Text[ japanese ] = "統計"; + Text[ chinese_traditional ] = "統計"; + Text[ arabic ] = ""; + Text[ dutch ] = "Statistiek"; + Text[ chinese_simplified ] = "统计"; + Text[ greek ] = ""; + Text[ korean ] = "통계"; + Text[ turkish ] = "statistik"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "Estadstica"; + Text[ finnish ] = "Tilastotiedot"; + Text[ thai ] = "สถิติ"; + Text[ czech ] = "Statistika"; + Text[ hebrew ] = "סטטיסטיקות"; + Text[ hindi ] = "अँकड़े"; + Text[ slovak ] = "Štatistika"; +*/ + +#define PAGE_LAYOUT \ +PageItem \ +{ \ + Identifier = TP_LAYOUT ; \ + PageResID = TP_LAYOUT ; \ + Text = "Layout" ; \ +}; +/* + Text [ ENGLISH ] = "Layout" ; + Text[ english_us ] = "Layout"; + Text[ italian ] = "Layout"; + Text[ portuguese_brazilian ] = "Layout"; + Text[ portuguese ] = "Layout"; + Text[ danish ] = "Layout"; + Text[ french ] = "Mise en page"; + Text[ swedish ] = "Layout"; + Text[ dutch ] = "Lay-out"; + Text[ spanish ] = "Diseo"; + Text[ chinese_simplified ] = "版式"; + Text[ russian ] = ""; + Text[ polish ] = "Ukad"; + Text[ japanese ] = "レイアウト"; + Text[ chinese_traditional ] = "版式"; + Text[ arabic ] = ""; + Text[ dutch ] = "Lay-out"; + Text[ chinese_simplified ] = "版式"; + Text[ greek ] = ""; + Text[ korean ] = "레이아웃"; + Text[ turkish ] = "Sayfa dzeni"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "Format"; + Text[ finnish ] = "Asettelu"; + Text[ thai ] = "เค้าร่าง"; + Text[ czech ] = "Vzhled"; + Text[ hebrew ] = "פריסה"; + Text[ hindi ] = "अभिन्यास"; + Text[ slovak ] = "Formát"; +*/ + +#define PAGE_OPTIONS \ +PageItem \ +{ \ + Identifier = TP_OPTIONS; \ + PageResID = TP_OPTIONS; \ + Text = "Optionen"; \ +}; +/* + Text[ENGLISH] = "Options"; + Text[ english_us ] = "Options"; + Text[ portuguese ] = "Opes"; + Text[ russian ] = ""; + Text[ dutch ] = "Opties"; + Text[ french ] = "Options"; + Text[ spanish ] = "Opciones"; + Text[ italian ] = "Opzioni"; + Text[ danish ] = "Indstillinger"; + Text[ swedish ] = "Alternativ"; + Text[ polish ] = "Opcje"; + Text[ portuguese_brazilian ] = "Opes"; + Text[ japanese ] = "オプション"; + Text[ chinese_simplified ] = "选项"; + Text[ chinese_traditional ] = "選項"; + Text[ arabic ] = ""; + Text[ dutch ] = "Opties"; + Text[ chinese_simplified ] = "选项"; + Text[ greek ] = ""; + Text[ korean ] = "옵션"; + Text[ turkish ] = "Seenekler"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "Opcions"; + Text[ finnish ] = "Asetukset"; + Text[ thai ] = "ตัวเลือก"; + Text[ czech ] = "Volby"; + Text[ hebrew ] = "אפשרויות"; + Text[ hindi ] = "विकल्प"; + Text[ slovak ] = "Nastavenia"; +*/ + +#define PAGE_AXISLABEL \ +PageItem \ +{ \ + Identifier = TP_AXIS_LABEL ; \ + PageResID = TP_AXIS_LABEL ; \ + Text = "Beschriftung" ; \ +}; +/* + Text [ ENGLISH ] = "Labelling" ; + Text [ english_us ] = "Label" ; + Text[ portuguese ] = "Legenda"; + Text[ russian ] = ""; + Text[ greek ] = ""; + Text[ dutch ] = "Opschrift"; + Text[ french ] = "tiquette"; + Text[ spanish ] = "Etiqueta"; + Text[ italian ] = "Dicitura"; + Text[ danish ] = "Etiket"; + Text[ swedish ] = "Etikett"; + Text[ polish ] = "Etykieta"; + Text[ portuguese_brazilian ] = "Rtulo"; + Text[ japanese ] = "ラベル"; + Text[ korean ] = "레이블"; + Text[ chinese_simplified ] = "数据标志"; + Text[ chinese_traditional ] = "標籤"; + Text[ arabic ] = ""; + Text[ turkish ] = "Etiket"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "Etiqueta"; + Text[ finnish ] = "Selite"; + Text[ thai ] = "ป้ายชื่อ"; + Text[ czech ] = "Popisek"; + Text[ hebrew ] = "Beschriftung"; + Text[ hindi ] = "लेबिल"; + Text[ slovak ] = "Označenie"; +*/ + +#define PAGE_AXISSCALE \ +PageItem \ +{ \ + Identifier = TP_SCALE_Y ; \ + PageResID = TP_SCALE_Y ; \ + Text = "Skalierung" ; \ +}; +/* + Text [ ENGLISH ] = "Scale" ; + Text [ english_us ] = "Scale" ; + Text [ norwegian ] = "Scale" ; + Text [ italian ] = "Scala" ; + Text [ portuguese_brazilian ] = "Escala" ; + Text [ portuguese ] = "Escala" ; + Text [ finnish ] = "Skaalaa" ; + Text [ danish ] = "Skalering" ; + Text [ french ] = "chelle" ; + Text [ swedish ] = "Skalning" ; + Text [ dutch ] = "Schaal" ; + Text [ spanish ] = "Escala" ; + Text[ chinese_simplified ] = "显示比例"; + Text[ russian ] = ""; + Text[ polish ] = "Skala"; + Text[ japanese ] = "目盛"; + Text[ chinese_traditional ] = "顯示比例"; + Text[ arabic ] = ""; + Text[ dutch ] = "Schaal"; + Text[ chinese_simplified ] = "显示比例"; + Text[ greek ] = ""; + Text[ korean ] = "배율 조정"; + Text[ turkish ] = "leklendirme"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "Escala"; + Text[ thai ] = "สเกล"; + Text[ czech ] = "Měřítko"; + Text[ hebrew ] = "התאמת גודל"; + Text[ hindi ] = "स्केल"; + Text[ slovak ] = "Pravítko"; +*/ + +#define PAGE_NUMBERFORMAT \ +PageItem \ +{ \ + Identifier = RID_SVXPAGE_NUMBERFORMAT ; \ + PageResID = RID_SVXPAGE_NUMBERFORMAT ; \ + Text = "Zahlen" ; \ +}; +/* + Text [ english_us ] = "Numbers" ; + Text [ ENGLISH ] = "Number" ; + Text [ norwegian ] = "Number" ; + Text [ italian ] = "Numeri" ; + Text [ portuguese_brazilian ] = "Nmeros" ; + Text [ portuguese ] = "Nmeros" ; + Text [ finnish ] = "Luku" ; + Text [ danish ] = "Tal" ; + Text [ french ] = "Nombres" ; + Text [ swedish ] = "Tal" ; + Text [ dutch ] = "Getallen" ; + Text [ spanish ] = "Nmeros" ; + + Text[ chinese_simplified ] = "数字"; + Text[ russian ] = ""; + Text[ polish ] = "Liczby"; + Text[ japanese ] = "数"; + Text[ chinese_traditional ] = "數字"; + Text[ arabic ] = ""; + Text[ dutch ] = "Getallen"; + Text[ chinese_simplified ] = "数字"; + Text[ greek ] = ""; + Text[ korean ] = "숫자"; + Text[ turkish ] = "Saylar"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "Nmeros"; + Text[ thai ] = "ตัวเลข"; + Text[ czech ] = "Čísla"; + Text[ hebrew ] = "Zahlen"; + Text[ hindi ] = "संख्या"; + Text[ slovak ] = "Čísla"; +*/ +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- + +#define BUTTONS \ +OKButton 1 \ +{ \ + Pos = MAP_APPFONT ( 6 , 151 ) ; \ + Size = MAP_APPFONT ( 50 , 14 ) ; \ + TabStop = TRUE ; \ +}; \ +CancelButton 1 \ +{ \ + Pos = MAP_APPFONT ( 60 , 151 ) ; \ + Size = MAP_APPFONT ( 50 , 14 ) ; \ + TabStop = TRUE ; \ +}; \ +HelpButton 1 \ +{ \ + Pos = MAP_APPFONT ( 114 , 151 ) ; \ + Size = MAP_APPFONT ( 50 , 14 ) ; \ + TabStop = TRUE ; \ +}; \ +PushButton 1 \ +{ \ + Pos = MAP_APPFONT ( 169 , 151 ) ; \ + Size = MAP_APPFONT ( 50 , 14 ) ; \ + TabStop = TRUE ; \ + Text = "Zurck" ; \ +}; +/* + Text [ ENGLISH ] = "Return" ; + Text [ norwegian ] = "Return" ; + Text [ italian ] = "Indietro" ; + Text [ portuguese_brazilian ] = "Voltar" ; + Text [ portuguese ] = "Anterior" ; + Text [ finnish ] = "Edellinen" ; + Text [ danish ] = "Tilbage" ; + Text [ french ] = "Prcdent" ; + Text [ swedish ] = "Tillbaka" ; + Text [ dutch ] = "Vorige" ; + Text [ spanish ] = "Regresar" ; + Text [ english_us ] = "Back" ; + Text[ chinese_simplified ] = "返回"; + Text[ russian ] = ""; + Text[ polish ] = "Wstecz"; + Text[ japanese ] = "戻る"; + Text[ chinese_traditional ] = "返回"; + Text[ arabic ] = ""; + Text[ dutch ] = "Vorige"; + Text[ chinese_simplified ] = "返回"; + Text[ greek ] = ""; + Text[ korean ] = "뒤로"; + Text[ turkish ] = "Geri"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "Enrere"; + Text[ thai ] = "กลับ"; + Text[ czech ] = "Zpět"; + Text[ hebrew ] = "קודם"; + Text[ hindi ] = "पीछे"; + Text[ slovak ] = "Späť"; +*/ +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +TabDialog TAB_TITLE +{ + // HelpID = SID_CHART_TITLE ; + OutputSize = TRUE ; + SVLook = TRUE ; + Text = "Titel" ; + Text [ ENGLISH ] = "Title" ; + Text [ norwegian ] = "Tittel" ; + Text [ italian ] = "Titolo" ; + Text [ portuguese_brazilian ] = "Ttulo" ; + Text [ portuguese ] = "Ttulo" ; + Text [ finnish ] = "Otsikko" ; + Text [ danish ] = "Titel" ; + Text [ french ] = "Titre" ; + Text [ swedish ] = "Rubrik" ; + Text [ dutch ] = "Titel" ; + Text [ spanish ] = "Ttulo" ; + Text [ english_us ] = "Title" ; + Moveable = TRUE ; + // Closeable = TRUE; // Dialog hat Cancel und/oder OK-Button ! (KH) + TabControl 1 + { + OutputSize = TRUE ; + PageList = + { + PAGE_LINE + PAGE_AREA + PAGE_TRANSPARENCE + PAGE_CHARACTERS + PAGE_FONTEFFECTS + PageItem + { + Identifier = TP_ALIGNMENT ; + Text = "Ausrichtung" ; + Text [ ENGLISH ] = "Alignment" ; + Text [ norwegian ] = "Alignment" ; + Text [ italian ] = "Allineamento" ; + Text [ portuguese_brazilian ] = "Alinhamento" ; + Text [ portuguese ] = "Alinhamento" ; + Text [ finnish ] = "Tasaus" ; + Text [ danish ] = "Justering" ; + Text [ french ] = "Alignement" ; + Text [ swedish ] = "Justering" ; + Text [ dutch ] = "Uitlijning" ; + Text [ spanish ] = "Alineacin" ; + Text [ english_us ] = "Alignment" ; + PageResID = TP_ALIGNMENT ; + Text[ chinese_simplified ] = "对齐"; + Text[ russian ] = ""; + Text[ polish ] = "Wyrwnanie"; + Text[ japanese ] = "配置"; + Text[ chinese_traditional ] = "對齊"; + Text[ arabic ] = ""; + Text[ dutch ] = "Uitlijning"; + Text[ chinese_simplified ] = "对齐"; + Text[ greek ] = ""; + Text[ korean ] = "맞춤"; + Text[ turkish ] = "Hizalama"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "Alineament"; + Text[ thai ] = "จัดตำแหน่ง"; + Text[ czech ] = "Zarovnání"; + Text[ hebrew ] = "ישור"; + Text[ hindi ] = "Alignment"; + Text[ slovak ] = "Zarovnanie"; + }; + }; + }; +//// BUTTONS + Text[ chinese_simplified ] = "标题"; + Text[ russian ] = ""; + Text[ polish ] = "Tytu"; + Text[ japanese ] = "タイトル"; + Text[ chinese_traditional ] = "標題"; + Text[ arabic ] = ""; + Text[ dutch ] = "Titel"; + Text[ chinese_simplified ] = "标题"; + Text[ greek ] = ""; + Text[ korean ] = "제목"; + Text[ turkish ] = "Balk"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "Ttol"; + Text[ thai ] = "ชื่อ"; + Text[ czech ] = "Titul"; + Text[ hebrew ] = "כותקת"; + Text[ hindi ] = "शीर्षक"; + Text[ slovak ] = "Nadpis"; +}; +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +TabDialog TAB_LEGEND +{ + // HelpID = SID_LEGEND ; + OutputSize = TRUE ; + SVLook = TRUE ; + Text = "Legende" ; + Text [ ENGLISH ] = "Legend" ; + Text [ norwegian ] = "Legend" ; + Text [ italian ] = "Legenda" ; + Text [ portuguese_brazilian ] = "Legenda" ; + Text [ portuguese ] = "Legenda" ; + Text [ finnish ] = "Selite" ; + Text [ danish ] = "Forklaring" ; + Text [ french ] = "Lgende" ; + Text [ swedish ] = "Frklaring" ; + Text [ dutch ] = "Legenda" ; + Text [ spanish ] = "Leyenda" ; + Text [ english_us ] = "Legend" ; + Moveable = TRUE ; + // Closeable = TRUE; // Dialog hat Cancel und/oder OK-Button ! (KH) + TabControl 1 + { + OutputSize = TRUE ; + PageList = + { + PAGE_LINE + PAGE_AREA + PAGE_TRANSPARENCE + PAGE_CHARACTERS + PAGE_FONTEFFECTS + PageItem + { + Identifier = TP_LEGEND_POS ; + Text = "Anordnung" ; + Text [ ENGLISH ] = "Arrangement" ; + Text [ norwegian ] = "Arrangement" ; + Text [ italian ] = "Disponi" ; + Text [ portuguese_brazilian ] = "Posio" ; + Text [ portuguese ] = "Disposio" ; + Text [ finnish ] = "Sijainti" ; + Text [ danish ] = "Placering" ; + Text [ french ] = "Disposition" ; + Text [ swedish ] = "Placering" ; + Text [ dutch ] = "Positie" ; + Text [ spanish ] = "Posicin" ; + Text [ english_us ] = "Position" ; + PageResID = TP_LEGEND_POS ; + Text[ chinese_simplified ] = "排序"; + Text[ russian ] = ""; + Text[ polish ] = "Pozycja"; + Text[ japanese ] = "配置"; + Text[ chinese_traditional ] = "排序"; + Text[ arabic ] = ""; + Text[ dutch ] = "Positie"; + Text[ chinese_simplified ] = "排序"; + Text[ greek ] = ""; + Text[ korean ] = "위치"; + Text[ turkish ] = "Konum"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "Posici"; + Text[ thai ] = "ตำแหน่ง"; + Text[ czech ] = "Umístění"; + Text[ hebrew ] = "מיקום"; + Text[ hindi ] = "स्थान"; + Text[ slovak ] = "Umiestnenie"; + }; + }; + }; +//// BUTTONS + Text[ chinese_simplified ] = "图例"; + Text[ russian ] = ""; + Text[ polish ] = "Legenda"; + Text[ japanese ] = "凡例"; + Text[ chinese_traditional ] = "圖例"; + Text[ arabic ] = " "; + Text[ dutch ] = "Legenda"; + Text[ chinese_simplified ] = "图例"; + Text[ greek ] = ""; + Text[ korean ] = "범례"; + Text[ turkish ] = "Aklama"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "Llegenda"; + Text[ thai ] = "คำอธิบาย"; + Text[ czech ] = "Legenda"; + Text[ hebrew ] = "Legende"; + Text[ hindi ] = "लेजेन्ड़"; + Text[ slovak ] = "Legenda"; +}; +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +TabDialog TAB_DATA_ROW +{ + // HelpID = HID_SCH_DATA_ROW ; + OutputSize = TRUE ; + SVLook = TRUE ; + Text = "Datenreihe" ; + Text [ ENGLISH ] = "Data Row" ; + Text [ norwegian ] = "Data Row" ; + Text [ italian ] = "Serie di dati" ; + Text [ portuguese_brazilian ] = "Srie de Dados" ; + Text [ portuguese ] = "Srie de dados" ; + Text [ finnish ] = "Tietojoukot" ; + Text [ danish ] = "Dataserie" ; + Text [ french ] = "Srie de donnes" ; + Text [ swedish ] = "Dataserie" ; + Text [ dutch ] = "Gegevensreeks" ; + Text [ spanish ] = "Serie de datos" ; + Text [ english_us ] = "Data Series" ; + Moveable = TRUE ; + // Closeable = TRUE; // Dialog hat Cancel und/oder OK-Button ! (KH) + TabControl 1 + { + OutputSize = TRUE ; + PageList = + { + PAGE_LINE + PAGE_AREA + PAGE_TRANSPARENCE + PAGE_CHARACTERS + PAGE_FONTEFFECTS + PAGE_DATALABELS + PAGE_STATISTIC + PAGE_LAYOUT + PAGE_OPTIONS + }; + }; +// BUTTONS + Text[ chinese_simplified ] = "数据组"; + Text[ russian ] = " "; + Text[ polish ] = "Seria danych"; + Text[ japanese ] = "データ系列"; + Text[ chinese_traditional ] = "數據欄"; + Text[ arabic ] = " "; + Text[ dutch ] = "Gegevensreeks"; + Text[ chinese_simplified ] = "数据组"; + Text[ greek ] = " "; + Text[ korean ] = "연속 데이터 "; + Text[ turkish ] = "Veri dizisi"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "Srie de dades"; + Text[ thai ] = "ชุดข้อมูล"; + Text[ czech ] = "Datová řada"; + Text[ hebrew ] = "Datenreihe"; + Text[ hindi ] = "ड़ॉटा श्रृंखला"; + Text[ slovak ] = "Dátová rada"; +}; +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +/* +TabDialog TAB_DATA_LINE +{ + // HelpID = HID_SCH_DATA_LINE ; + OutputSize = TRUE ; + SVLook = TRUE ; + Text = "Datenreihe" ; + Text [ ENGLISH ] = "Data Row" ; + Text [ norwegian ] = "Data Row" ; + Text [ italian ] = "Serie di dati" ; + Text [ portuguese_brazilian ] = "Srie de Dados" ; + Text [ portuguese ] = "Srie de dados" ; + Text [ finnish ] = "Tietojoukot" ; + Text [ danish ] = "Dataserie" ; + Text [ french ] = "Srie de donnes" ; + Text [ swedish ] = "Dataserie" ; + Text [ dutch ] = "Gegevensreeks" ; + Text [ spanish ] = "Serie de datos" ; + Text [ english_us ] = "Data Series" ; + Moveable = TRUE ; + // Closeable = TRUE; // Dialog hat Cancel und/oder OK-Button ! (KH) + TabControl 1 + { + OutputSize = TRUE ; + PageList = + { + PAGE_LINE + PAGE_CHARACTERS + PAGE_FONTEFFECTS + PAGE_DATALABELS + PAGE_STATISTIC + PAGE_OPTIONS + }; + }; +//// BUTTONS + Text[ chinese_simplified ] = "数据组"; + Text[ russian ] = " "; + Text[ polish ] = "Seria danych"; + Text[ japanese ] = "データ系列"; + Text[ chinese_traditional ] = "數據欄"; + Text[ arabic ] = " "; + Text[ dutch ] = "Gegevensreeks"; + Text[ chinese_simplified ] = "数据组"; + Text[ greek ] = " "; + Text[ korean ] = "연속 데이터"; + Text[ turkish ] = "Veri dizisi"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "Srie de dades"; + Text[ thai ] = "ชุดข้อมูล"; + Text[ czech ] = "Datová řada"; + Text[ hebrew ] = "Datenreihe"; + Text[ hindi ] = "ड़ॉटा श्रृंखला"; + Text[ slovak ] = "Dátové rady"; +}; +*/ +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +TabDialog TAB_DATA_POINT +{ + // HelpID = HID_SCH_DATA_POINT ; + OutputSize = TRUE ; + SVLook = TRUE ; + Text = "Datenpunkt" ; + Text [ ENGLISH ] = "Data Point" ; + Text [ norwegian ] = "Data Point" ; + Text [ italian ] = "Punto dati" ; + Text [ portuguese_brazilian ] = "Ponto de dados" ; + Text [ portuguese ] = "Ponto de dados" ; + Text [ finnish ] = "Arvopiste" ; + Text [ danish ] = "Datapunkt" ; + Text [ french ] = "Point de donnes" ; + Text [ swedish ] = "Datapunkt" ; + Text [ dutch ] = "Gegevenspunt" ; + Text [ spanish ] = "Punto de datos" ; + Text [ english_us ] = "Data Point" ; + Moveable = TRUE ; + // Closeable = TRUE; // Dialog hat Cancel und/oder OK-Button ! (KH) + TabControl 1 + { + OutputSize = TRUE ; + PageList = + { + PAGE_LINE + PAGE_AREA + PAGE_TRANSPARENCE + PAGE_CHARACTERS + PAGE_FONTEFFECTS + PAGE_DATALABELS + PAGE_STATISTIC + PAGE_LAYOUT + }; + }; +//// BUTTONS + Text[ chinese_simplified ] = "数据点"; + Text[ russian ] = " "; + Text[ polish ] = "Punkt danych"; + Text[ japanese ] = "データポイント"; + Text[ chinese_traditional ] = "資料點"; + Text[ arabic ] = " "; + Text[ dutch ] = "Gegevenspunt"; + Text[ chinese_simplified ] = "数据点"; + Text[ greek ] = " "; + Text[ korean ] = "데이터 포인트"; + Text[ turkish ] = "Veri noktas"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "Punt de dades"; + Text[ thai ] = "จุดข้อมูล"; + Text[ czech ] = "Datový bod"; + Text[ hebrew ] = "Datenpunkt"; + Text[ hindi ] = "ड़ॉटा बिंदु"; + Text[ slovak ] = "Dátový bod"; +}; +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +TabDialog TAB_LINE +{ + // HelpID = SID_DIAGRAM_GRID ; + OutputSize = TRUE ; + SVLook = TRUE ; + Size = MAP_APPFONT ( 289 , 176 ) ; + Text = "Linien" ; + Text [ ENGLISH ] = "Lines" ; + Text [ english_us ] = "Lines" ; + Moveable = TRUE ; + // Closeable = TRUE; // Dialog hat Cancel und/oder OK-Button ! (KH) + TabControl 1 + { + OutputSize = TRUE ; + Pos = MAP_APPFONT ( 3 , 3 ) ; + Size = MAP_APPFONT ( 260 , 135 ) ; + PageList = + { + PAGE_LINE + }; + }; +//// BUTTONS + Text [ italian ] = "Linee" ; + Text [ spanish ] = "Lneas" ; + Text [ french ] = "Lignes" ; + Text [ dutch ] = "Lijnen" ; + Text [ swedish ] = "Linjer" ; + Text [ danish ] = "Linjer" ; + Text [ portuguese ] = "Linhas" ; + Text [ portuguese_brazilian ] = "Linhas" ; + Text[ chinese_simplified ] = "线条"; + Text[ russian ] = ""; + Text[ polish ] = "Linie"; + Text[ japanese ] = "軸"; + Text[ chinese_traditional ] = "線條"; + Text[ arabic ] = ""; + Text[ dutch ] = "Lijnen"; + Text[ chinese_simplified ] = "线条"; + Text[ greek ] = ""; + Text[ korean ] = "선"; + Text[ turkish ] = "izgi"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "Lnies"; + Text[ finnish ] = "Rivit"; + Text[ thai ] = "บรรทัด"; + Text[ czech ] = "Řádky"; + Text[ hebrew ] = "Linien"; + Text[ hindi ] = "रेखा"; + Text[ slovak ] = "Riadky"; +}; +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +TabDialog TAB_DIAGRAM_STOCK_LOSS +{ + OutputSize = TRUE ; + SVLook = TRUE ; + Text = "Negative Abweichung" ; + Text [ ENGLISH ] = "negativ deviation" ; + Moveable = TRUE ; + TabControl 1 + { + OutputSize = TRUE ; + Pos = MAP_APPFONT ( 3 , 3 ) ; + PageList = + { + PAGE_LINE + PAGE_AREA + PAGE_TRANSPARENCE + }; + }; +//// BUTTONS + Text[ italian ] = "Deviazione negativa"; + Text[ portuguese_brazilian ] = "Desvio negativo"; + Text[ portuguese ] = "Desvio negativo"; + Text[ danish ] = "Negativ afvigelse"; + Text[ french ] = "Dviation ngative"; + Text[ swedish ] = "Negativ avvikelse"; + Text[ dutch ] = "Negatieve deviatie"; + Text[ spanish ] = "Desviacin negativa"; + Text[ english_us ] = "Negative deviation"; + Text[ chinese_simplified ] = "负值偏差"; + Text[ russian ] = " "; + Text[ polish ] = "Odchylenie ujemne"; + Text[ japanese ] = "マイナス偏差"; + Text[ chinese_traditional ] = "負值偏差"; + Text[ arabic ] = " "; + Text[ dutch ] = "Negatieve deviatie"; + Text[ chinese_simplified ] = "负值偏差"; + Text[ greek ] = " "; + Text[ korean ] = "음수 편차"; + Text[ turkish ] = "Negatif sapma"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "Desviaci negativa"; + Text[ finnish ] = "Negatiivinen poikkeama"; + Text[ thai ] = "ค่าเบี่ยงเบนบวก"; + Text[ czech ] = "Záporná odchylka"; + Text[ hebrew ] = "Negative Abweichung"; + Text[ hindi ] = "Negative deviation"; + Text[ slovak ] = "Záporná odchýlka"; +}; +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +TabDialog TAB_DIAGRAM_STOCK_PLUS +{ + OutputSize = TRUE ; + SVLook = TRUE ; + Text = "Positive Abweichung" ; + Text [ ENGLISH ] = "positive deviation" ; + Moveable = TRUE ; + TabControl 1 + { + OutputSize = TRUE ; + Pos = MAP_APPFONT ( 3 , 3 ) ; + PageList = + { + PAGE_LINE + PAGE_AREA + PAGE_TRANSPARENCE + }; + }; +//// BUTTONS + Text[ italian ] = "Deviazione positiva"; + Text[ portuguese_brazilian ] = "Desvio positivo"; + Text[ portuguese ] = "Desvio positivo"; + Text[ danish ] = "Positiv afvigelse"; + Text[ french ] = "Dviation positive"; + Text[ swedish ] = "Positiv avvikelse"; + Text[ dutch ] = "Positieve deviatie"; + Text[ spanish ] = "Desviacin positiva"; + Text[ english_us ] = "Positive deviation"; + Text[ chinese_simplified ] = "正值偏差"; + Text[ russian ] = " "; + Text[ polish ] = "Odchylenie dodatnie"; + Text[ japanese ] = "プラス偏差"; + Text[ chinese_traditional ] = "正值偏差"; + Text[ arabic ] = " "; + Text[ dutch ] = "Positieve deviatie"; + Text[ chinese_simplified ] = "正值偏差"; + Text[ greek ] = " "; + Text[ korean ] = "양수 편차"; + Text[ turkish ] = "Pozitif sapma"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "Desviaci positiva"; + Text[ finnish ] = "Positiivinen poikkeama"; + Text[ thai ] = "ค่าเบี่ยงเบนบวก"; + Text[ czech ] = "Kladná odchylka"; + Text[ hebrew ] = "Positive Abweichung"; + Text[ hindi ] = "धनात्मक डीविएशन"; + Text[ slovak ] = "Kladná odchýlka"; +}; +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +TabDialog TAB_AXIS +{ + // HelpID = HID_SCH_DIAGRAM_Y_AXIS ; + OutputSize = TRUE ; + SVLook = TRUE ; + Size = MAP_APPFONT ( 289 , 176 ) ; + Text = "Achse" ; + Moveable = TRUE ; + // Closeable = TRUE; // Dialog has Cancel and/or OK-Button ! (KH) + TabControl 1 + { + OutputSize = TRUE ; + Pos = MAP_APPFONT ( 3 , 3 ) ; + Size = MAP_APPFONT ( 260 , 135 ) ; + PageList = + { + PAGE_LINE + PAGE_CHARACTERS + PAGE_FONTEFFECTS + PAGE_AXISSCALE + PAGE_NUMBERFORMAT + PAGE_AXISLABEL + }; + }; +//// BUTTONS +}; +/* +TabDialog TAB_AXIS +{ + // HelpID = SID_DIAGRAM_AXIS ; + OutputSize = TRUE ; + SVLook = TRUE ; + Size = MAP_APPFONT ( 289 , 176 ) ; + Text = "Achsen" ; + Text [ ENGLISH ] = "Axis" ; + Text [ norwegian ] = "Axis" ; + Text [ italian ] = "Asse" ; + Text [ portuguese_brazilian ] = "Eixos" ; + Text [ portuguese ] = "Eixos" ; + Text [ finnish ] = "Akselit" ; + Text [ danish ] = "Akser" ; + Text [ french ] = "Axes" ; + Text [ swedish ] = "Axlar" ; + Text [ dutch ] = "Assen" ; + Text [ spanish ] = "Ejes" ; + Text [ english_us ] = "Axes" ; + Moveable = TRUE ; + // Closeable = TRUE; // Dialog hat Cancel und/oder OK-Button ! (KH) + TabControl 1 + { + OutputSize = TRUE ; + Pos = MAP_APPFONT ( 3 , 3 ) ; + Size = MAP_APPFONT ( 260 , 135 ) ; + PageList = + { + PAGE_LINE + PAGE_CHARACTERS + PAGE_FONTEFFECTS + PAGE_AXISLABEL + }; + }; +//// BUTTONS + Text[ chinese_simplified ] = "轴"; + Text[ russian ] = ""; + Text[ polish ] = "Osie"; + Text[ japanese ] = "軸"; + Text[ chinese_traditional ] = "軸"; + Text[ arabic ] = ""; + Text[ dutch ] = "Assen"; + Text[ chinese_simplified ] = "轴"; + Text[ greek ] = ""; + Text[ korean ] = "축"; + Text[ turkish ] = "Eksen"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "Eixos"; + Text[ thai ] = "แกน"; + Text[ czech ] = "Osy"; + Text[ hebrew ] = "Achsen"; + Text[ hindi ] = "अक्ष रेखाएँ"; + Text[ slovak ] = "Osi"; +}; +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +TabDialog TAB_X_AXIS +{ + // HelpID = HID_SCH_DIAGRAM_X_AXIS ; + OutputSize = TRUE ; + SVLook = TRUE ; + Size = MAP_APPFONT ( 289 , 176 ) ; + Text = "X-Achse" ; + Text [ ENGLISH ] = "X-Axis" ; + Text [ norwegian ] = "X-Axis" ; + Text [ italian ] = "Asse X" ; + Text [ portuguese_brazilian ] = "Eixo X" ; + Text [ portuguese ] = "Eixo X" ; + Text [ finnish ] = "X-akseli" ; + Text [ danish ] = "X-akse" ; + Text [ french ] = "Axe X" ; + Text [ swedish ] = "X-axel" ; + Text [ dutch ] = "X-as" ; + Text [ spanish ] = "Eje X" ; + Text [ english_us ] = "X Axis" ; + Moveable = TRUE ; + // Closeable = TRUE; // Dialog hat Cancel und/oder OK-Button ! (KH) + TabControl 1 + { + OutputSize = TRUE ; + Pos = MAP_APPFONT ( 3 , 3 ) ; + Size = MAP_APPFONT ( 260 , 135 ) ; + PageList = + { + PAGE_LINE + PAGE_CHARACTERS + PAGE_FONTEFFECTS + PAGE_AXISSCALE + PAGE_NUMBERFORMAT + PAGE_AXISLABEL + }; + }; +//// BUTTONS + Text[ chinese_simplified ] = "X 轴数值"; + Text[ russian ] = " X"; + Text[ polish ] = "O X"; + Text[ japanese ] = "X軸"; + Text[ chinese_traditional ] = "X 軸"; + Text[ arabic ] = " "; + Text[ dutch ] = "X-as"; + Text[ chinese_simplified ] = "X 轴数值"; + Text[ greek ] = " X"; + Text[ korean ] = "X 축"; + Text[ turkish ] = "X ekseni"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "Eix X"; + Text[ thai ] = "แกนX "; + Text[ czech ] = "Osa X"; + Text[ hebrew ] = "X-Achse"; + Text[ hindi ] = "X अक्ष"; + Text[ slovak ] = "Os X"; +}; +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +TabDialog TAB_Y_AXIS +{ + // HelpID = HID_SCH_DIAGRAM_Y_AXIS ; + OutputSize = TRUE ; + SVLook = TRUE ; + Size = MAP_APPFONT ( 289 , 176 ) ; + Text = "Y-Achse" ; + Text [ ENGLISH ] = "Y-Axis" ; + Text [ norwegian ] = "Y-Axis" ; + Text [ italian ] = "Asse Y" ; + Text [ portuguese_brazilian ] = "Eixo Y" ; + Text [ portuguese ] = "Eixo Y" ; + Text [ finnish ] = "Y-akseli" ; + Text [ danish ] = "Y-akse" ; + Text [ french ] = "Axe Y" ; + Text [ swedish ] = "Y-axel" ; + Text [ dutch ] = "Y-as" ; + Text [ spanish ] = "Eje Y" ; + Text [ english_us ] = "Y Axis" ; + Moveable = TRUE ; + // Closeable = TRUE; // Dialog hat Cancel und/oder OK-Button ! (KH) + TabControl 1 + { + OutputSize = TRUE ; + Pos = MAP_APPFONT ( 3 , 3 ) ; + Size = MAP_APPFONT ( 260 , 135 ) ; + PageList = + { + PAGE_LINE + PAGE_CHARACTERS + PAGE_FONTEFFECTS + PAGE_AXISSCALE + PAGE_NUMBERFORMAT + PAGE_AXISLABEL + }; + }; +//// BUTTONS + Text[ chinese_simplified ] = "Y 轴数值"; + Text[ russian ] = " Y"; + Text[ polish ] = "O Y"; + Text[ japanese ] = "Y軸"; + Text[ chinese_traditional ] = "Y 軸"; + Text[ arabic ] = " "; + Text[ dutch ] = "Y-as"; + Text[ chinese_simplified ] = "Y 轴数值"; + Text[ greek ] = " Y"; + Text[ korean ] = "Y 축"; + Text[ turkish ] = "Y ekseni"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "Eix Y"; + Text[ thai ] = "แกนY "; + Text[ czech ] = "Osa Y"; + Text[ hebrew ] = "Y-Achse"; + Text[ hindi ] = "Y अक्ष"; + Text[ slovak ] = "Os Y"; +}; +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +TabDialog TAB_Z_AXIS +{ + // HelpID = SID_DIAGRAM_AXIS ; + OutputSize = TRUE ; + SVLook = TRUE ; + Size = MAP_APPFONT ( 289 , 176 ) ; + Text = "Z-Achse" ; + Text [ ENGLISH ] = "Z-Axis" ; + Text [ norwegian ] = "Z-Axis" ; + Text [ italian ] = "Asse Z" ; + Text [ portuguese_brazilian ] = "Eixo Z" ; + Text [ portuguese ] = "Eixo Z" ; + Text [ finnish ] = "Z-akseli" ; + Text [ danish ] = "Z-akse" ; + Text [ french ] = "Axe Z" ; + Text [ swedish ] = "Z-axel" ; + Text [ dutch ] = "Z-as" ; + Text [ spanish ] = "Eje Z" ; + Text [ english_us ] = "Z Axis" ; + Moveable = TRUE ; + // Closeable = TRUE; // Dialog hat Cancel und/oder OK-Button ! (KH) + TabControl 1 + { + OutputSize = TRUE ; + Pos = MAP_APPFONT ( 3 , 3 ) ; + Size = MAP_APPFONT ( 260 , 135 ) ; + PageList = + { + PAGE_LINE + PAGE_CHARACTERS + PAGE_FONTEFFECTS + PAGE_AXISLABEL + }; + }; +//// BUTTONS + Text[ chinese_simplified ] = "Z 轴"; + Text[ russian ] = " Z"; + Text[ polish ] = "O Z"; + Text[ japanese ] = "Z軸"; + Text[ chinese_traditional ] = "Z 軸"; + Text[ arabic ] = " "; + Text[ dutch ] = "Z-as"; + Text[ chinese_simplified ] = "Z 轴"; + Text[ greek ] = " Z"; + Text[ korean ] = "Z 축"; + Text[ turkish ] = "Z ekseni"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "Eix Z"; + Text[ thai ] = "แกนZ "; + Text[ czech ] = "Osa Z"; + Text[ hebrew ] = "Z-Achse"; + Text[ hindi ] = "Z अक्ष"; + Text[ slovak ] = "Os Z"; +}; +*/ +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +TabDialog TAB_GRID +{ + // HelpID = SID_DIAGRAM_GRID ; + OutputSize = TRUE ; + SVLook = TRUE ; + Size = MAP_APPFONT ( 289 , 176 ) ; + Text = "Gitter" ; + Text [ ENGLISH ] = "Grid" ; + Text [ norwegian ] = "Grid" ; + Text [ italian ] = "Griglia" ; + Text [ portuguese_brazilian ] = "Grade" ; + Text [ portuguese ] = "Grelha" ; + Text [ finnish ] = "Ruudukko" ; + Text [ danish ] = "Gitter" ; + Text [ french ] = "Grille" ; + Text [ swedish ] = "Gitter" ; + Text [ dutch ] = "Raster" ; + Text [ spanish ] = "Cuadrcula" ; + Text [ english_us ] = "Grid" ; + Moveable = TRUE ; + // Closeable = TRUE; // Dialog hat Cancel und/oder OK-Button ! (KH) + TabControl 1 + { + OutputSize = TRUE ; + Pos = MAP_APPFONT ( 3 , 3 ) ; + Size = MAP_APPFONT ( 260 , 135 ) ; + PageList = + { + PAGE_LINE + }; + }; +//// BUTTONS + Text[ chinese_simplified ] = "网格线"; + Text[ russian ] = ""; + Text[ polish ] = "Siatka"; + Text[ japanese ] = "目盛線"; + Text[ chinese_traditional ] = "網格"; + Text[ arabic ] = ""; + Text[ dutch ] = "Raster"; + Text[ chinese_simplified ] = "网格线"; + Text[ greek ] = ""; + Text[ korean ] = "눈금선"; + Text[ turkish ] = "Klavuz izgiler"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "Graella"; + Text[ thai ] = "เส้นตาราง"; + Text[ czech ] = "Mřížka"; + Text[ hebrew ] = "Gitter"; + Text[ hindi ] = "जाल"; + Text[ slovak ] = "Mriežka"; +}; +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +TabDialog TAB_DIAGRAM_WALL +{ + // HelpID = SID_DIAGRAM_WALL ; + OutputSize = TRUE ; + SVLook = TRUE ; + Text = "Diagrammwand" ; + Text [ ENGLISH ] = "Diagram Wall" ; + Moveable = TRUE ; + // Closeable = TRUE; // Dialog hat Cancel und/oder OK-Button ! (KH) + TabControl 1 + { + OutputSize = TRUE ; + SVLook = TRUE ; + Pos = MAP_APPFONT ( 6 , 3 ) ; + PageList = + { + PAGE_LINE + PAGE_AREA + PAGE_TRANSPARENCE + }; + }; +// BUTTONS + Text[ italian ] = "Pareti del diagramma"; + Text[ portuguese_brazilian ] = "Parede do Grfico"; + Text[ portuguese ] = "Parede do grfico"; + Text[ danish ] = "Diagramvg"; + Text[ french ] = "Paroi du diagramme"; + Text[ swedish ] = "Diagramvgg"; + Text[ dutch ] = "Diagramwand"; + Text[ spanish ] = "Plano lateral"; + Text[ english_us ] = "Chart Wall"; + Text[ chinese_simplified ] = "图表背景墙"; + Text[ russian ] = " "; + Text[ polish ] = "ciana wykresu"; + Text[ japanese ] = "グラフの壁面"; + Text[ chinese_traditional ] = "圖表背景牆"; + Text[ arabic ] = " "; + Text[ dutch ] = "Diagramwand"; + Text[ chinese_simplified ] = "图表背景墙"; + Text[ greek ] = " "; + Text[ korean ] = "차트 옆면"; + Text[ turkish ] = "ema duvar"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "Pla lateral del diagrama"; + Text[ finnish ] = "Kaaviosein"; + Text[ thai ] = "ผนังแผนภูมิ"; + Text[ czech ] = "Stěna grafu"; + Text[ hebrew ] = "Diagrammwand"; + Text[ hindi ] = "Chart Wall"; + Text[ slovak ] = "Bok grafu"; +}; +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +TabDialog TAB_DIAGRAM_FLOOR +{ + // HelpID = SID_DIAGRAM_FLOOR ; + OutputSize = TRUE ; + SVLook = TRUE ; + Text = "Diagrammboden" ; + Text [ ENGLISH ] = "Diagram Floor" ; + Text [ norwegian ] = "Diagram Floor" ; + Text [ italian ] = "Pavimento del diagramma" ; + Text [ portuguese_brazilian ] = "Piso do Grfico" ; + Text [ portuguese ] = "Base do grfico" ; + Text [ finnish ] = "Kaavion perusta" ; + Text [ danish ] = "Diagramgulv" ; + Text [ french ] = "Plancher du diagramme" ; + Text [ swedish ] = "Diagramgolv" ; + Text [ dutch ] = "Diagrambodem" ; + Text [ spanish ] = "Base del diagrama" ; + Text [ english_us ] = "Chart Floor" ; + Moveable = TRUE ; + // Closeable = TRUE; // Dialog hat Cancel und/oder OK-Button ! (KH) + TabControl 1 + { + OutputSize = TRUE ; + Pos = MAP_APPFONT ( 3 , 3 ) ; + PageList = + { + PAGE_LINE + PAGE_AREA + PAGE_TRANSPARENCE + }; + }; +//// BUTTONS + Text[ chinese_simplified ] = "图表基底"; + Text[ russian ] = " "; + Text[ polish ] = "Podstawa wykresu"; + Text[ japanese ] = "グラフの床面"; + Text[ chinese_traditional ] = "座標軸"; + Text[ arabic ] = " "; + Text[ dutch ] = "Diagrambodem"; + Text[ chinese_simplified ] = "图表基底"; + Text[ greek ] = " "; + Text[ korean ] = "차트 밑면"; + Text[ turkish ] = "ema taban"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "Base del diagrama"; + Text[ thai ] = "พื้นแผนภูมิ"; + Text[ czech ] = "Pata grafu"; + Text[ hebrew ] = "Diagrammboden"; + Text[ hindi ] = "चार्ट फ्लोर"; + Text[ slovak ] = "Päta grafu"; +}; +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +TabDialog TAB_DIAGRAM_AREA +{ + // HelpID = SID_DIAGRAM_AREA ; + OutputSize = TRUE ; + SVLook = TRUE ; + Text = "Diagrammflche" ; + Text [ ENGLISH ] = "Diagram Area" ; + Text [ norwegian ] = "Diagram Area" ; + Text [ italian ] = "Area del diagramma" ; + Text [ portuguese_brazilian ] = "rea do Grfico" ; + Text [ portuguese ] = "rea do grfico" ; + Text [ finnish ] = "Kaavioalue" ; + Text [ danish ] = "Diagramomrde" ; + Text [ french ] = "Arrire-plan du diagramme" ; + Text [ swedish ] = "Diagramomrde" ; + Text [ dutch ] = "Diagramoppervlak" ; + Text [ spanish ] = "Superficie del diagrama" ; + Text [ english_us ] = "Chart Area" ; + Moveable = TRUE ; + // Closeable = TRUE; // Dialog hat Cancel und/oder OK-Button ! (KH) + TabControl 1 + { + OutputSize = TRUE ; + Pos = MAP_APPFONT ( 3 , 3 ) ; + PageList = + { + PAGE_LINE + PAGE_AREA + PAGE_TRANSPARENCE + }; + }; +//// BUTTONS + Text[ chinese_simplified ] = "图表区"; + Text[ russian ] = " "; + Text[ polish ] = "Obszar wykresu"; + Text[ japanese ] = "グラフエリア"; + Text[ chinese_traditional ] = "圖表平面"; + Text[ arabic ] = " "; + Text[ dutch ] = "Diagramoppervlak"; + Text[ chinese_simplified ] = "图表区"; + Text[ greek ] = " "; + Text[ korean ] = "차트 영역"; + Text[ turkish ] = "ema yzeyi"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "rea del diagrama"; + Text[ thai ] = "พื้นที่แผนภูมิ"; + Text[ czech ] = "Plocha grafu"; + Text[ hebrew ] = "Diagrammfläche"; + Text[ hindi ] = "Chart Area"; + Text[ slovak ] = "Plocha grafu"; +}; diff --git a/chart2/source/controller/dialogs/makefile.mk b/chart2/source/controller/dialogs/makefile.mk new file mode 100644 index 000000000..170bd37bf --- /dev/null +++ b/chart2/source/controller/dialogs/makefile.mk @@ -0,0 +1,129 @@ +#************************************************************************* +# +# $RCSfile: makefile.mk,v $ +# +# $Revision: 1.1.1.1 $ +# +# last change: $Author: bm $ $Date: 2003-10-06 09:58:26 $ +# +# The Contents of this file are made available subject to the terms of +# either of the following licenses +# +# - GNU Lesser General Public License Version 2.1 +# - Sun Industry Standards Source License Version 1.1 +# +# Sun Microsystems Inc., October, 2000 +# +# GNU Lesser General Public License Version 2.1 +# ============================================= +# Copyright 2000 by Sun Microsystems, Inc. +# 901 San Antonio Road, Palo Alto, CA 94303, USA +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License version 2.1, as published by the Free Software Foundation. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# +# +# Sun Industry Standards Source License Version 1.1 +# ================================================= +# The contents of this file are subject to the Sun Industry Standards +# Source License Version 1.1 (the "License"); You may not use this file +# except in compliance with the License. You may obtain a copy of the +# License at http://www.openoffice.org/license.html. +# +# Software provided under this License is provided on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, +# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, +# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. +# See the License for the specific provisions governing your rights and +# obligations concerning the Software. +# +# The Initial Developer of the Original Code is: Sun Microsystems, Inc. +# +# Copyright: 2000 by Sun Microsystems, Inc. +# +# All Rights Reserved. +# +# Contributor(s): _______________________________________ +# +# +# +#************************************************************************* + +PRJ= ..$/..$/.. +PRJINC= $(PRJ)$/source +PRJNAME= chart2 +TARGET= chcdialogs + +ENABLE_EXCEPTIONS= TRUE +#GEN_HID= TRUE + +#BMP_IN=$(PRJ)$/res + +# --- Settings ----------------------------------------------------- + +.INCLUDE: settings.mk + +# --- export library ------------------------------------------------- + +#object files to build and link together to lib $(SLB)$/$(TARGET).lib +SLOFILES= $(SLO)$/tp_AxisLabel.obj \ + $(SLO)$/tp_DataLabel.obj \ + $(SLO)$/tp_LegendPosition.obj \ + $(SLO)$/tp_PointGeometry.obj \ + $(SLO)$/tp_Scale.obj \ + $(SLO)$/tp_SeriesStatistic.obj \ + $(SLO)$/tp_SeriesToAxis.obj \ + $(SLO)$/tp_TitleRotation.obj \ + $(SLO)$/dlg_ObjectProperties.obj \ + $(SLO)$/dlg_ChartType.obj \ + $(SLO)$/dlg_InsertAxis_Grid.obj \ + $(SLO)$/dlg_InsertDataLabel.obj \ + $(SLO)$/dlg_InsertLegend.obj \ + $(SLO)$/dlg_InsertStatistic.obj \ + $(SLO)$/dlg_InsertTitle.obj + +# --- Resources --------------------------------------------------------------- + +# Bitmaps.src +# Bitmaps_HC.src + + +SRC1FILES= \ + tp_AxisLabel.src \ + tp_DataLabel.src \ + tp_LegendPosition.src \ + tp_PointGeometry.src \ + tp_Scale.src \ + tp_SeriesStatistic.src \ + tp_SeriesToAxis.src \ + tp_TitleRotation.src \ + dlg_ObjectProperties.src \ + Strings_Statistic.src \ + Strings_Scale.src \ + Strings_ChartTypes.src \ + Strings.src \ + dlg_ChartType.src \ + Bitmaps.src \ + Bitmaps_HC.src \ + dlg_InsertAxis_Grid.src \ + dlg_InsertDataLabel.src \ + dlg_InsertLegend.src \ + dlg_InsertStatistic.src \ + dlg_InsertTitle.src + +SRS1NAME=$(TARGET) + +# --- Targets ----------------------------------------------------------------- + +.INCLUDE: target.mk diff --git a/chart2/source/controller/dialogs/tp_AxisLabel.cxx b/chart2/source/controller/dialogs/tp_AxisLabel.cxx new file mode 100644 index 000000000..32f15f1ad --- /dev/null +++ b/chart2/source/controller/dialogs/tp_AxisLabel.cxx @@ -0,0 +1,416 @@ +/************************************************************************* + * + * $RCSfile: tp_AxisLabel.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:26 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "tp_AxisLabel.hxx" + +#include "ResId.hxx" +#include "TabPages.hrc" +#include "SchSfxItemIds.hxx" +#include "SchSlotIds.hxx" + +#define ITEMID_CHARTTEXTORDER SCHATTR_TEXT_ORDER +// #define ITEMID_CHARTTEXTORIENT SCHATTR_TEXT_ORIENT +// header for SvxChartTextOrientItem / SvxChartTextOrderItem +#ifndef _SVX_CHRTITEM_HXX +#include <svx/chrtitem.hxx> +#endif + +/* +#ifndef _SFXITEMSET_HXX +#include <svtools/itemset.hxx> +#endif +*/ +// header for SfxInt32Item +#ifndef _SFXINTITEM_HXX +#include <svtools/intitem.hxx> +#endif +/* +// header for SfxBoolItem +#ifndef _SFXENUMITEM_HXX +#include <svtools/eitem.hxx> +#endif + +#include "schattr.hxx" +#define ITEMID_CHARTTEXTORDER SCHATTR_TEXT_ORDER +#define ITEMID_CHARTTEXTORIENT SCHATTR_TEXT_ORIENT +// header for SvxChartTextOrientItem / SvxChartTextOrderItem +#ifndef _SVX_CHRTITEM_HXX +#include <svx/chrtitem.hxx> +#endif + +#include "chtmodel.hxx" +#include "schresid.hxx" +#include "app.hrc" + +#include "tplabel.hxx" +#include "tplabel.hrc" +*/ +//............................................................................. +namespace chart +{ +//............................................................................. + +SchAxisLabelTabPage::SchAxisLabelTabPage( Window* pParent, const SfxItemSet& rInAttrs ) : + SfxTabPage( pParent, SchResId( TP_AXIS_LABEL ), rInAttrs ), + + aCbShowDescription( this, SchResId( CB_AXIS_LABEL_SCHOW_DESCR ) ), + + aWOAngle( this, + SchResId( CT_AXIS_LABEL_DIAL ), + SchResId( PB_AXIS_LABEL_TEXTSTACKED ), + SchResId( FT_AXIS_LABEL_DEGREES ), + SchResId( NF_AXIS_LABEL_ORIENT ), + SchResId( FT_UNUSED ), + SchResId( CT_UNUSED ), + SchResId( FL_AXIS_LABEL_ORIENTATION ) ), + + aFlTextFlow( this, SchResId( FL_AXIS_LABEL_TEXTFLOW ) ), + aCbTextOverlap( this, SchResId( CB_AXIS_LABEL_TEXTOVERLAP ) ), + aCbTextBreak( this, SchResId( CB_AXIS_LABEL_TEXTBREAK ) ), + + aFlOrder( this, SchResId( FL_AXIS_LABEL_ORDER ) ), + aRbSideBySide( this, SchResId( RB_AXIS_LABEL_SIDEBYSIDE ) ), + aRbUpDown( this, SchResId( RB_AXIS_LABEL_UPDOWN ) ), + aRbDownUp( this, SchResId( RB_AXIS_LABEL_DOWNUP ) ), + aRbAuto( this, SchResId( RB_AXIS_LABEL_AUTOORDER ) ), + + aFlSeparator( this, SchResId( FL_SEPARATOR ) ), + + bShowStaggeringControls( true ), +//// bAllowTextOverlap( TRUE ), + + m_nInitialDegrees( 0 ), + m_bInitialStacking( FALSE ) +{ + FreeResource(); + + aCbShowDescription.SetClickHdl( LINK( this, SchAxisLabelTabPage, ToggleShowLabel ) ); + + // Make the fixed line separator vertical. + aFlSeparator.SetStyle (aFlSeparator.GetStyle() | WB_VERT); + + Construct(); +} + +SchAxisLabelTabPage::~SchAxisLabelTabPage() +{} + +void SchAxisLabelTabPage::Construct() +{ +} + + +SfxTabPage* SchAxisLabelTabPage::Create( Window* pParent, const SfxItemSet& rAttrs ) +{ + return new SchAxisLabelTabPage( pParent, rAttrs ); +} + +BOOL SchAxisLabelTabPage::FillItemSet( SfxItemSet& rOutAttrs ) +{ +// SvxChartTextOrient eOrient; + BOOL bIsStacked = FALSE; + long nDegrees = aWOAngle.GetDegrees() * 100L; + + if( nDegrees != m_nInitialDegrees ) + { + rOutAttrs.Put( SfxInt32Item( SCHATTR_TEXT_DEGREES, nDegrees ) ); + } + + BOOL bStacked = aWOAngle.IsStackedTxt(); + if( bStacked != m_bInitialStacking ) + { + if( aWOAngle.IsStackedTxt() ) + { +// eOrient = CHTXTORIENT_STACKED; + bIsStacked = TRUE; +// rOutAttrs.Put( SfxInt32Item( SCHATTR_TEXT_DEGREES, 0 ) ); + } + } + +// if( eOrient != CHTXTORIENT_STACKED ) +// { +// if( nDegrees == 0L ) +// eOrient = CHTXTORIENT_STANDARD; +// else if( nDegrees <= 18000L ) +// eOrient = CHTXTORIENT_BOTTOMTOP; +// else +// eOrient = CHTXTORIENT_TOPBOTTOM; +// } + +// rOutAttrs.Put( SvxChartTextOrientItem( eOrient ) ); + rOutAttrs.Put( SfxBoolItem( SCHATTR_TEXT_STACKED, bIsStacked ) ); + + if( bShowStaggeringControls ) + { + SvxChartTextOrder eOrder; + bool bRadioButtonChecked = true; + + if( aRbUpDown.IsChecked()) + eOrder = CHTXTORDER_UPDOWN; + else if( aRbDownUp.IsChecked()) + eOrder = CHTXTORDER_DOWNUP; + else if( aRbAuto.IsChecked()) + eOrder = CHTXTORDER_AUTO; + else if( aRbSideBySide.IsChecked()) + eOrder = CHTXTORDER_SIDEBYSIDE; + else + bRadioButtonChecked = false; + + if( bRadioButtonChecked ) + rOutAttrs.Put( SvxChartTextOrderItem( eOrder )); + } + + if( aCbTextOverlap.GetState() != STATE_DONTKNOW ) + rOutAttrs.Put( SfxBoolItem( SCHATTR_TEXT_OVERLAP, aCbTextOverlap.IsChecked() ) ); + if( aCbTextBreak.GetState() != STATE_DONTKNOW ) +// rOutAttrs.Put( SfxBoolItem( SID_TEXTBREAK, aCbTextBreak.IsChecked() ) ); + rOutAttrs.Put( SfxBoolItem( SCHATTR_TEXTBREAK, aCbTextBreak.IsChecked() ) ); + if( aCbShowDescription.GetState() != STATE_DONTKNOW ) + rOutAttrs.Put( SfxBoolItem( SCHATTR_AXIS_SHOWDESCR, aCbShowDescription.IsChecked() ) ); + + return TRUE; +} + +void SchAxisLabelTabPage::Reset( const SfxItemSet& rInAttrs ) +{ + const SfxPoolItem* pPoolItem = NULL; + SfxItemState aState = SFX_ITEM_UNKNOWN; + + // show description ---------- + aState = rInAttrs.GetItemState( SCHATTR_AXIS_SHOWDESCR, FALSE, &pPoolItem ); + if( aState == SFX_ITEM_DONTCARE ) + { + aCbShowDescription.EnableTriState( TRUE ); + aCbShowDescription.SetState( STATE_DONTKNOW ); + } + else + { + aCbShowDescription.EnableTriState( FALSE ); + BOOL bCheck = FALSE; + if( aState == SFX_ITEM_SET ) + bCheck = static_cast< const SfxBoolItem * >( pPoolItem )->GetValue(); + aCbShowDescription.Check( bCheck ); + + if( ( aState & SFX_ITEM_DEFAULT ) == 0 ) + aCbShowDescription.Hide(); + } + + // Rotation as orient item or in degrees ---------- + BOOL bStacked = FALSE; + short nDegrees = 0; + + // check new degree item + aState = rInAttrs.GetItemState( SCHATTR_TEXT_DEGREES, FALSE, &pPoolItem ); + if( aState == SFX_ITEM_DONTCARE ) + { + // tristate for SvxWinOrientation missing + nDegrees = 0; + } + else if( aState == SFX_ITEM_SET ) + { + nDegrees = static_cast< short >( static_cast< const SfxInt32Item * >( pPoolItem )->GetValue() / 100L ); + } + + // check old orientation item +// if( rInAttrs.GetItemState( SCHATTR_TEXT_ORIENT, TRUE, &pPoolItem ) == SFX_ITEM_SET ) +// { +// SvxChartTextOrient eOrient = static_cast< const SvxChartTextOrientItem * >( pPoolItem )->GetValue(); +// switch( eOrient ) +// { +// case CHTXTORIENT_AUTOMATIC: +// case CHTXTORIENT_STANDARD: +// break; +// case CHTXTORIENT_TOPBOTTOM: +// if( !nDegrees ) +// nDegrees = 270; +// break; +// case CHTXTORIENT_BOTTOMTOP: +// if( !nDegrees ) +// nDegrees = 90; +// break; +// case CHTXTORIENT_STACKED: +// bStacked = TRUE; +// break; +// } +// } + + if( rInAttrs.GetItemState( SCHATTR_TEXT_STACKED, TRUE, &pPoolItem ) == SFX_ITEM_SET ) + { + bStacked = reinterpret_cast< const SfxBoolItem * >( pPoolItem )->GetValue(); + } + + aWOAngle.SetDegrees( nDegrees ); + aWOAngle.SetStackedTxt( bStacked ); + m_nInitialDegrees = nDegrees; + m_bInitialStacking = bStacked; + + // Text overlap ---------- + aState = rInAttrs.GetItemState( SCHATTR_TEXT_OVERLAP, FALSE, &pPoolItem ); + if( aState == SFX_ITEM_DONTCARE ) + { + aCbTextOverlap.EnableTriState( TRUE ); + aCbTextOverlap.SetState( STATE_DONTKNOW ); + } + else + { + aCbTextOverlap.EnableTriState( FALSE ); + BOOL bCheck = FALSE; + if( aState == SFX_ITEM_SET ) + bCheck = static_cast< const SfxBoolItem * >( pPoolItem )->GetValue(); + aCbTextOverlap.Check( bCheck ); + + if( ( aState & SFX_ITEM_DEFAULT ) == 0 ) + aCbTextOverlap.Hide(); + } + + // text break ---------- +// aState = rInAttrs.GetItemState( SID_TEXTBREAK, FALSE, &pPoolItem ); + aState = rInAttrs.GetItemState( SCHATTR_TEXTBREAK, FALSE, &pPoolItem ); + if( aState == SFX_ITEM_DONTCARE ) + { + aCbTextBreak.EnableTriState( TRUE ); + aCbTextBreak.SetState( STATE_DONTKNOW ); + } + else + { + aCbTextBreak.EnableTriState( FALSE ); + BOOL bCheck = FALSE; + if( aState == SFX_ITEM_SET ) + bCheck = static_cast< const SfxBoolItem * >( pPoolItem )->GetValue(); + aCbTextBreak.Check( bCheck ); + + if( ( aState & SFX_ITEM_DEFAULT ) == 0 ) + { + aCbTextBreak.Hide(); + if( ! aCbTextOverlap.IsVisible() ) + aFlTextFlow.Hide(); + } + } + + // text order ---------- + if( bShowStaggeringControls ) + { + aState = rInAttrs.GetItemState( SCHATTR_TEXT_ORDER, FALSE, &pPoolItem ); + if( aState == SFX_ITEM_SET ) + { + SvxChartTextOrder eOrder = static_cast< const SvxChartTextOrderItem * >( pPoolItem )->GetValue(); + + switch( eOrder ) + { + case CHTXTORDER_SIDEBYSIDE: + aRbSideBySide.Check(); + break; + case CHTXTORDER_UPDOWN: + aRbUpDown.Check(); + break; + case CHTXTORDER_DOWNUP: + aRbDownUp.Check(); + break; + case CHTXTORDER_AUTO: + aRbAuto.Check(); + break; + } + } + } + + ToggleShowLabel( (void*)0 ); +} + +void SchAxisLabelTabPage::ShowStaggeringControls( BOOL ShowStaggeringControls ) +{ + bShowStaggeringControls = ShowStaggeringControls; + + if( !bShowStaggeringControls ) + { + aRbSideBySide.Hide(); + aRbUpDown.Hide(); + aRbDownUp.Hide(); + aRbAuto.Hide(); + aFlOrder.Hide(); + } +} + +// event handling routines +// ----------------------- + +IMPL_LINK ( SchAxisLabelTabPage, ToggleShowLabel, void *, EMPTYARG ) +{ + BOOL bEnable = ( aCbShowDescription.GetState() != STATE_NOCHECK ); + + if( bEnable ) + aWOAngle.Enable(); + else + aWOAngle.Disable(); + + aFlOrder.Enable( bEnable ); + aRbSideBySide.Enable( bEnable ); + aRbUpDown.Enable( bEnable ); + aRbDownUp.Enable( bEnable ); + aRbAuto.Enable( bEnable ); + + aFlTextFlow.Enable( bEnable ); + aCbTextOverlap.Enable( bEnable ); + aCbTextBreak.Enable( bEnable ); + + return 0L; +} +//............................................................................. +} //namespace chart +//............................................................................. diff --git a/chart2/source/controller/dialogs/tp_AxisLabel.hxx b/chart2/source/controller/dialogs/tp_AxisLabel.hxx new file mode 100644 index 000000000..369c2ce3c --- /dev/null +++ b/chart2/source/controller/dialogs/tp_AxisLabel.hxx @@ -0,0 +1,132 @@ +/************************************************************************* + * + * $RCSfile: tp_AxisLabel.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:26 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef _CHART2_TP_AXISLABEL_HXX +#define _CHART2_TP_AXISLABEL_HXX + +#ifndef _SFXTABDLG_HXX +#include <sfx2/tabdlg.hxx> +#endif +// header for CheckBox +#ifndef _SV_BUTTON_HXX +#include <vcl/button.hxx> +#endif +// header for SvxWinOrientation +#ifndef WORIENT_HXX +#include <svx/worient.hxx> +#endif + +//#include "attrib.hxx" + +//............................................................................. +namespace chart +{ +//............................................................................. + +//----------------------------------------------------------------------------- +/** +*/ + +class SchAxisLabelTabPage : public SfxTabPage +{ +private: + CheckBox aCbShowDescription; + + SvxWinOrientation aWOAngle; + + FixedLine aFlTextFlow; + CheckBox aCbTextOverlap; + CheckBox aCbTextBreak; + + FixedLine aFlOrder; + RadioButton aRbSideBySide; + RadioButton aRbUpDown; + RadioButton aRbDownUp; + RadioButton aRbAuto; + + FixedLine aFlSeparator; + + BOOL bShowStaggeringControls; +//// BOOL bAllowTextOverlap; + + short m_nInitialDegrees; + BOOL m_bInitialStacking; + + DECL_LINK ( ToggleShowLabel, void* ); + +public: + SchAxisLabelTabPage( Window* pParent, const SfxItemSet& rInAttrs ); + virtual ~SchAxisLabelTabPage(); + + void Construct(); + + static SfxTabPage* Create( Window* pParent, const SfxItemSet& rInAttrs ); + virtual BOOL FillItemSet( SfxItemSet& rOutAttrs ); + virtual void Reset( const SfxItemSet& rInAttrs ); + + void ShowStaggeringControls( BOOL ShowStaggeringControls ); +//// void AllowTextOverlap( BOOL bOverLap ) { bAllowTextOverlap = bOverLap; } +}; +//............................................................................. +} //namespace chart +//............................................................................. + +#endif + diff --git a/chart2/source/controller/dialogs/tp_AxisLabel.src b/chart2/source/controller/dialogs/tp_AxisLabel.src new file mode 100644 index 000000000..683e95eb1 --- /dev/null +++ b/chart2/source/controller/dialogs/tp_AxisLabel.src @@ -0,0 +1,589 @@ +/************************************************************************* + * + * $RCSfile: tp_AxisLabel.src,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:26 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "HelpIds.hrc" +#include "TabPages.hrc" + +#define MASKCOLOR MaskColor = Color { Red = 0xC000 ; Green = 0xC000 ; Blue = 0xC000 ; } + +TabPage TP_AXIS_LABEL +{ + HelpID = HID_SCH_TP_AXIS_LABEL; + Size = MAP_APPFONT ( 260 , 185 ) ; + Hide = TRUE; + + Text = "Beschriftung" ; + Text [ ENGLISH ] = "Labelling" ; + Text [ english_us ] = "Label" ; + + CheckBox CB_AXIS_LABEL_SCHOW_DESCR + { + Pos = MAP_APPFONT ( 6 , 6 ) ; + Size = MAP_APPFONT ( 104 , 12 ) ; + + Text = "~Beschriftung anzeigen"; + Text [ ENGLISH ] = "s~how labels"; + Text [ english_us ] = "Sho~w labels"; + Text[ portuguese ] = "Mostrar ~rtulos"; + Text[ russian ] = " "; + Text[ greek ] = " "; + Text[ dutch ] = "O~pschriften weergeven"; + Text[ french ] = "Afficher l'~tiquette"; + Text[ spanish ] = "Mostrar ~etiqueta"; + Text[ italian ] = "Mostra dicitura"; + Text[ danish ] = "Vis etiketter"; + Text[ swedish ] = "Visa etikett"; + Text[ polish ] = "Pok~a etykiety"; + Text[ portuguese_brazilian ] = "Mostrar ~rtulos"; + Text[ japanese ] = "ラベルの表示(~W)"; + Text[ korean ] = "레이블 표시(~W)"; + Text[ chinese_simplified ] = "显示数据标志(~W)"; + Text[ chinese_traditional ] = "顯示標籤(~W)"; + Text[ arabic ] = " "; + Text[ turkish ] = "~Etiketleri grntle"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "Mos~tra les etiquetes"; + Text[ finnish ] = "Nyt ~selitteet"; + Text[ thai ] = "แสด~งป้ายชื่อ"; + Text[ czech ] = "Zobrazit popisky"; + Text[ hebrew ] = "~Beschriftung anzeigen"; + Text[ hindi ] = "लेबिलों को दिखा~ओ "; + Text[ slovak ] = "~Zobraziť popisy"; + }; + + FixedLine FL_AXIS_LABEL_ORIENTATION + { + Pos = MAP_APPFONT ( 6 , 91 ) ; + Size = MAP_APPFONT ( 248 , 8 ) ; + + Text = "Beschriftung drehen" ; + Text [ ENGLISH ] = "Orientation" ; + Text [ norwegian ] = "Orientation" ; + Text [ italian ] = "Orientamento" ; + Text [ portuguese_brazilian ] = "Girar texto" ; + Text [ portuguese ] = "Rodar texto" ; + Text [ finnish ] = "Kierr teksti" ; + Text [ danish ] = "Roter etiket" ; + Text [ french ] = "Orientation" ; + Text [ swedish ] = "Rotera etikett" ; + Text [ dutch ] = "Opschrift draaien" ; + Text [ spanish ] = "Girar etiqueta" ; + Text [ english_us ] = "Rotate text" ; + Text[ chinese_simplified ] = "书写方向"; + Text[ russian ] = " "; + Text[ polish ] = "Obr tekst"; + Text[ japanese ] = "文字方向"; + Text[ chinese_traditional ] = "書寫方向"; + Text[ arabic ] = " "; + Text[ dutch ] = "Opschrift draaien"; + Text[ chinese_simplified ] = "书写方向"; + Text[ greek ] = " "; + Text[ korean ] = "텍스트 회전"; + Text[ turkish ] = "Metni evir"; + Text[ catalan ] = "Direcci d'escriptura"; + Text[ thai ] = "ทิศทางข้อความ"; + Text[ czech ] = "Otočit text"; + Text[ hebrew ] = "Beschriftung drehen"; + Text[ hindi ] = "टैक्स्ट् घुमाओ"; + Text[ slovak ] = "Otočiť text"; + }; + Control CT_AXIS_LABEL_DIAL + { + HelpId = HID_SCH_ALIGNMENT_CTR_DIAL ; + Pos = MAP_APPFONT ( 30 , 105 ) ; + Size = MAP_APPFONT ( 42 , 43 ) ; + Text = "ABCD" ; + }; + ImageButton PB_AXIS_LABEL_TEXTSTACKED + { + HelpId = HID_SCH_ALIGNMENT_STACKED ; + Pos = MAP_APPFONT ( 12 , 105 ) ; + Size = MAP_APPFONT ( 12 , 43 ) ; + TabStop = TRUE ; + ButtonImage = Image + { + ImageBitmap = Bitmap { File = "txtstk.bmp" ; }; + MaskColor = Color { Red = 0xff00 ; Green = 0x0000 ; Blue = 0xff00 ; } ; +// MASKCOLOR ; + }; + }; + FixedText FT_AXIS_LABEL_DEGREES + { + Pos = MAP_APPFONT ( 110 , 122 ) ; + Size = MAP_APPFONT ( 35 , 8 ) ; + + Text = "~Grad" ; + Text [ ENGLISH ] = "~Degrees" ; + Text [ english_us ] = "~Degrees" ; + Text [ portuguese_brazilian ] = "Gr~aus" ; + Text [ swedish ] = "grader" ; + Text [ danish ] = "grader" ; + Text [ italian ] = "~Grado" ; + Text [ spanish ] = "~Grado" ; + Text [ french ] = "Degr~s" ; + Text [ dutch ] = "~Graden" ; + Text [ portuguese ] = "Gr~aus" ; + Text[ chinese_simplified ] = "度(~D)"; + Text[ russian ] = ""; + Text[ polish ] = "~Stopnie"; + Text[ japanese ] = "度(~D)"; + Text[ chinese_traditional ] = "度(~D)"; + Text[ arabic ] = ""; + Text[ dutch ] = "~Graden"; + Text[ chinese_simplified ] = "度(~D)"; + Text[ greek ] = ""; + Text[ korean ] = "도(~D)"; + Text[ turkish ] = "~Derece"; + Text[ catalan ] = "~Graus"; + Text[ finnish ] = "~Asteet"; + Text[ thai ] = "~องศา"; + Text[ czech ] = "stupňů"; + Text[ hebrew ] = "~Grad"; + Text[ hindi ] = "~Degrees"; + Text[ slovak ] = "Stup~ne"; + }; + NumericField NF_AXIS_LABEL_ORIENT + { + HelpId = HID_SCH_ALIGNMENT_DEGREES ; + Border = TRUE ; + Pos = MAP_APPFONT ( 78 , 120 ) ; + Size = MAP_APPFONT ( 28 , 12 ) ; + TabStop = TRUE ; + Repeat = TRUE ; + Spin = TRUE ; + StrictFormat = TRUE ; + }; + FixedText FT_UNUSED + { + //only necessary for constructor of SvxWinOrientation + Hide = TRUE ; + Pos = MAP_APPFONT ( 204 , 117 ) ; + Size = MAP_APPFONT ( 50 , 10 ) ; + Text = "unbenutzt" ; + // This text is never displayed and does therefore not have to be translated! + }; + Control CT_UNUSED + { + //only necessary for constructor of SvxWinOrientation + Hide = TRUE ; + Pos = MAP_APPFONT ( 204 , 133 ) ; + Size = MAP_APPFONT ( 50 , 15 ) ; + //TabStop = TRUE ; + }; + FixedLine FL_SEPARATOR + { + Pos = MAP_APPFONT ( 128 , 33 ) ; + Size = MAP_APPFONT ( 4 , 52 ) ; + }; + + FixedLine FL_AXIS_LABEL_TEXTFLOW + { + Pos = MAP_APPFONT ( 133 , 22 ) ; + Size = MAP_APPFONT ( 121 , 8 ) ; + + Text = "Textfluss" ; + Text [ ENGLISH ] = "Textflow" ; + Text [ english_us ] = "Text flow" ; + Text[ portuguese ] = "Fluxo de texto"; + Text[ russian ] = " "; + Text[ greek ] = " "; + Text[ dutch ] = "Tekstverloop"; + Text[ french ] = "Enchanements"; + Text[ spanish ] = "Flujo del texto"; + Text[ italian ] = "Testo"; + Text[ danish ] = "Tekstretning"; + Text[ swedish ] = "Textflde"; + Text[ polish ] = "Przepyw tekstu"; + Text[ portuguese_brazilian ] = "Fluxo do texto"; + Text[ japanese ] = "体裁"; + Text[ korean ] = "텍스트 흐름"; + Text[ chinese_simplified ] = "换行和分页"; + Text[ chinese_traditional ] = "換行和分頁"; + Text[ arabic ] = " "; + Text[ turkish ] = "Metin ak"; + Text[ catalan ] = "Flux de text"; + Text[ finnish ] = "Tekstin rivitys"; + Text[ thai ] = "การไหลของข้อความ"; + Text[ czech ] = "Tok textu"; + Text[ hebrew ] = "Textfluss"; + Text[ hindi ] = "टेक्स्ट् धारा"; + Text[ slovak ] = "Tok textu"; + }; + CheckBox CB_AXIS_LABEL_TEXTOVERLAP + { + Pos = MAP_APPFONT ( 139 , 33 ) ; + Size = MAP_APPFONT ( 76 , 10 ) ; + TabStop = TRUE ; + + Text = "~berlappend" ; + Text [ ENGLISH ] = "~Overlap" ; + Text [ english_us ] = "O~verlap" ; + Text [ portuguese_brazilian ] = "Sobr~epor" ; + Text [ swedish ] = "verlappande" ; + Text [ danish ] = "Overlappet" ; + Text [ italian ] = "Sovrapponi" ; + Text [ spanish ] = "So~breponer" ; + Text [ french ] = "~Chevauchement" ; + Text [ dutch ] = "~Overlappend" ; + Text [ portuguese ] = "Em ~cascata" ; + Text [ chinese_simplified ] = "重叠(~V)"; + Text [ russian ] = ""; + Text [ polish ] = "Nakadanie"; + Text [ japanese ] = "重ね合わせ(~V)"; + Text [ chinese_traditional ] = "重疊(~V)"; + Text [ arabic ] = ""; + Text [ dutch ] = "~Overlappend"; + Text [ chinese_simplified ] = "重叠(~V)"; + Text[ greek ] = ""; + Text[ korean ] = "겹침(~V)"; + Text[ turkish ] = "B~asamakla"; + Text[ catalan ] = "~Superposa"; + Text[ finnish ] = "~Pllekkisyys"; + Text[ thai ] = "ซ้~อนทับ"; + Text[ czech ] = "Přesah"; + Text[ hebrew ] = "~Überlappend"; + Text[ hindi ] = "ऑ~वरलाप्"; + Text[ slovak ] = "P~resah"; + }; + CheckBox CB_AXIS_LABEL_TEXTBREAK + { + Pos = MAP_APPFONT ( 139 , 47 ) ; + Size = MAP_APPFONT ( 76 , 10 ) ; + TabStop = TRUE ; + + Text = "~Umbruch" ; + Text [ ENGLISH ] = "~Break" ; + Text [ english_us ] = "~Break" ; + Text [ portuguese_brazilian ] = "~Quebrar" ; + Text [ swedish ] = "Brytning" ; + Text [ danish ] = "Skift" ; + Text [ italian ] = "A capo" ; + Text [ spanish ] = "~Salto" ; + Text [ french ] = "~Saut" ; + Text [ dutch ] = "~Afbreking" ; + Text [ portuguese ] = "~Quebra" ; + Text [ chinese_simplified ] = "换行(~B)"; + Text [ russian ] = "~"; + Text [ polish ] = "~Podzia"; + Text [ japanese ] = "折り返し(~B)"; + Text [ chinese_traditional ] = "換行(~B)"; + Text [ arabic ] = ""; + Text [ dutch ] = "~Afbreking"; + Text [ chinese_simplified ] = "换行(~B)"; + Text[ greek ] = ""; + Text[ korean ] = "나누기(~B)"; + Text[ turkish ] = "~Kesme"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "~Salta"; + Text[ finnish ] = "~Vaihto"; + Text[ thai ] = "แ~บ่ง"; + Text[ czech ] = "Zalomení"; + Text[ hebrew ] = "~Umbruch"; + Text[ hindi ] = "~खण्डन"; + Text[ slovak ] = "~Zalomenie"; + }; + + + FixedLine FL_AXIS_LABEL_ORDER + { + Pos = MAP_APPFONT ( 6 , 22 ) ; + Size = MAP_APPFONT ( 121 , 8 ) ; + + Text = "Anordnung" ; + Text [ ENGLISH ] = "Order" ; + Text [ norwegian ] = "Rekkeflge" ; + Text [ italian ] = "Disponi" ; + Text [ portuguese_brazilian ] = "Ordem" ; + Text [ portuguese ] = "Disposio" ; + Text [ english_us ] = "Order" ; + Text [ spanish ] = "Organizar" ; + Text [ french ] = "Disposition" ; + Text [ dutch ] = "Positie" ; + Text [ swedish ] = "Placering" ; + Text [ danish ] = "Placering" ; + Text[ chinese_simplified ] = "排序"; + Text[ russian ] = ""; + Text[ polish ] = "Kolejno"; + Text[ japanese ] = "配置"; + Text[ chinese_traditional ] = "排序"; + Text[ arabic ] = ""; + Text[ dutch ] = "Positie"; + Text[ chinese_simplified ] = "排序"; + Text[ greek ] = ""; + Text[ korean ] = "배열 순서"; + Text[ turkish ] = "Dzenle"; + Text[ catalan ] = "Organitzar"; + Text[ finnish ] = "Jrjestys"; + Text[ thai ] = "ลำดับ"; + Text[ czech ] = "Pořadí"; + Text[ hebrew ] = "Anordnung"; + Text[ hindi ] = "क्रम"; + Text[ slovak ] = "Poradie"; + }; + RadioButton RB_AXIS_LABEL_SIDEBYSIDE + { + Pos = MAP_APPFONT ( 12 , 33 ) ; + Size = MAP_APPFONT ( 98 , 10 ) ; + TabStop = TRUE ; + + Text = "~Nebeneinander" ; + Text [ ENGLISH ] = "~Side by Side" ; + Text [ norwegian ] = "~Side by Side" ; + Text [ italian ] = "Affianca" ; + Text [ portuguese_brazilian ] = "~Lado a Lado" ; + Text [ portuguese ] = "~Lado a lado" ; + Text [ english_us ] = "~Tile" ; + Text [ spanish ] = "~Mosaico" ; + Text [ french ] = "~Juxtaposer" ; + Text [ dutch ] = "~Naast elkaar" ; + Text [ swedish ] = "Bredvid vara~ndra" ; + Text [ danish ] = "Side om side" ; + Text[ chinese_simplified ] = "并排(~T)"; + Text[ russian ] = ""; + Text[ polish ] = "~Ssiadujco"; + Text[ japanese ] = "1列に並べる(~T)"; + Text[ chinese_traditional ] = "並排(~T)"; + Text[ arabic ] = ""; + Text[ dutch ] = "~Naast elkaar"; + Text[ chinese_simplified ] = "并排(~T)"; + Text[ greek ] = " "; + Text[ korean ] = "바둑판식 배치(~T)"; + Text[ turkish ] = "~De"; + Text[ catalan ] = "~Mosaic"; + Text[ finnish ] = "~Vierekkin"; + Text[ thai ] = "แ~บบกระเบื้อง"; + Text[ czech ] = "Dlaždice"; + Text[ hebrew ] = "~Nebeneinander"; + Text[ hindi ] = "~पटिया"; + Text[ slovak ] = "~Dlaždice"; + }; + RadioButton RB_AXIS_LABEL_UPDOWN + { + Pos = MAP_APPFONT ( 12 , 47 ) ; + Size = MAP_APPFONT ( 98 , 10 ) ; + TabStop = TRUE ; + + Text = "~Hoch-tief versetzt" ; + Text [ ENGLISH ] = "~Up-down transposed" ; + Text [ norwegian ] = "~Up-down transposed" ; + Text [ italian ] = "Sposta pari/dispari" ; + Text [ portuguese_brazilian ] = "~mpares em cima" ; + Text [ portuguese ] = "~mpares em cima" ; + Text [ english_us ] = "St~agger odd" ; + Text [ spanish ] = "~Organizacin impar" ; + Text [ french ] = "Transposer ~haut-bas" ; + Text [ dutch ] = "Laag-h~oog verzet" ; + Text [ swedish ] = "Upphjt/nedsnkt" ; + Text [ danish ] = "Ulige tal forskudt" ; + Text[ chinese_simplified ] = "上下移动(~A)"; + Text[ russian ] = " ( ~)"; + Text[ polish ] = "Roz~m. przest. (gra-d)"; + Text[ japanese ] = "上下交互(~A)"; + Text[ chinese_traditional ] = "上下移動(~A)"; + Text[ arabic ] = " "; + Text[ dutch ] = "Laag-h~oog verzet"; + Text[ chinese_simplified ] = "上下移动(~A)"; + Text[ greek ] = "~ -"; + Text[ korean ] = "위 아래 엇갈림(~A)"; + Text[ turkish ] = "Yukar/aa hizalama"; + Text[ catalan ] = "Esc~alonament senar"; + Text[ finnish ] = "Lo~mita parittomat"; + Text[ thai ] = "สลั~บเลขคี่"; + Text[ czech ] = "Předsunout liché"; + Text[ hebrew ] = "~Hoch-tief versetzt"; + Text[ hindi ] = "स्टा~ग्गेर् ऑड़"; + Text[ slovak ] = "~Posunúť nepárne"; + }; + RadioButton RB_AXIS_LABEL_DOWNUP + { + Pos = MAP_APPFONT ( 12 , 61 ) ; + Size = MAP_APPFONT ( 98 , 10 ) ; + TabStop = TRUE ; + + Text = "~Tief-hoch versetzt" ; + Text [ ENGLISH ] = "~Down-up transposed" ; + Text [ norwegian ] = "~Down-up transposed" ; + Text [ italian ] = "Sposta dispari/pari" ; + Text [ portuguese_brazilian ] = "~Pares em cima" ; + Text [ portuguese ] = "~Pares em cima" ; + Text [ english_us ] = "Stagger ~even" ; + Text [ dutch ] = "~Hoog-laag verzet" ; + Text [ spanish ] = "Orga~nizacin par" ; + Text [ french ] = "Transposer ~bas-haut" ; + Text [ swedish ] = "Nedsnkt/upphjt" ; + Text [ danish ] = "Lige tal forskudt" ; + Text[ chinese_simplified ] = "下上移动(~E)"; + Text[ russian ] = " ( )"; + Text[ polish ] = "~Rozm. przest. (d-gra)"; + Text[ japanese ] = "下上交互(~E)"; + Text[ chinese_traditional ] = "下上移動(~E)"; + Text[ arabic ] = " "; + Text[ dutch ] = "~Hoog-laag verzet"; + Text[ chinese_simplified ] = "下上移动(~E)"; + Text[ greek ] = " ~-"; + Text[ korean ] = "아래 위 엇갈림(~E)"; + Text[ turkish ] = "Aa/yukar hizalama"; + Text[ catalan ] = "Escalonament ~parell "; + Text[ finnish ] = "Lomita ~parilliset"; + Text[ thai ] = "สลับเลข~คู่"; + Text[ czech ] = "Předsunout sudé"; + Text[ hebrew ] = "~Tief-hoch versetzt"; + Text[ hindi ] = "स्टाग्गेर् ~इवन"; + Text[ slovak ] = "Po~sunúť párne"; + }; + RadioButton RB_AXIS_LABEL_AUTOORDER + { + Pos = MAP_APPFONT ( 12 , 75 ) ; + Size = MAP_APPFONT ( 98 , 10 ) ; + TabStop = TRUE ; + + Text = "~Automatisch" ; + Text [ ENGLISH ] = "~Automatic" ; + Text [ norwegian ] = "~Automatisk" ; + Text [ italian ] = "Automatico" ; + Text [ portuguese_brazilian ] = "~Automtico" ; + Text [ portuguese ] = "~Automtico" ; + Text [ english_us ] = "A~utomatic" ; + Text [ spanish ] = "Automtico" ; + Text [ french ] = "Automatique" ; + Text [ dutch ] = "A~utomatisch" ; + Text [ swedish ] = "Automatiskt" ; + Text [ danish ] = "Automatisk" ; + Text[ chinese_simplified ] = "自动(~U)"; + Text[ russian ] = ""; + Text[ polish ] = "A~utomatycznie"; + Text[ japanese ] = "自動(~U)"; + Text[ chinese_traditional ] = "自動(~U)"; + Text[ arabic ] = ""; + Text[ dutch ] = "A~utomatisch"; + Text[ chinese_simplified ] = "自动(~U)"; + Text[ greek ] = "~"; + Text[ korean ] = "자동(~U)"; + Text[ turkish ] = "~Otomatik"; + Text[ catalan ] = "Automtic"; + Text[ finnish ] = "A~utomaattinen"; + Text[ thai ] = "อั~ตโนมัติ"; + Text[ czech ] = "Automaticky"; + Text[ hebrew ] = "אוטומטי"; + Text[ hindi ] = "A~utomatic"; + Text[ slovak ] = "A~utomaticky"; + }; + Text[ portuguese ] = "Legenda"; + Text[ russian ] = ""; + Text[ greek ] = ""; + Text[ dutch ] = "Opschrift"; + Text[ french ] = "tiquette"; + Text[ spanish ] = "Etiqueta"; + Text[ italian ] = "Dicitura"; + Text[ danish ] = "Etiket"; + Text[ swedish ] = "Etikett"; + Text[ polish ] = "Etykieta"; + Text[ portuguese_brazilian ] = "Rtulo"; + Text[ japanese ] = "ラベル"; + Text[ korean ] = "레이블"; + Text[ chinese_simplified ] = "数据标志"; + Text[ chinese_traditional ] = "標籤"; + Text[ arabic ] = ""; + Text[ turkish ] = "Etiket"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "Etiqueta"; + Text[ finnish ] = "Selite"; + Text[ thai ] = "ป้ายชื่อ"; + Text[ czech ] = "Popisek"; + Text[ hebrew ] = "Beschriftung"; + Text[ hindi ] = "लेबिल"; + Text[ slovak ] = "Označenie"; +}; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/chart2/source/controller/dialogs/tp_DataLabel.cxx b/chart2/source/controller/dialogs/tp_DataLabel.cxx new file mode 100644 index 000000000..e7664d974 --- /dev/null +++ b/chart2/source/controller/dialogs/tp_DataLabel.cxx @@ -0,0 +1,229 @@ +/************************************************************************* + * + * $RCSfile: tp_DataLabel.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:26 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "tp_DataLabel.hxx" +#include "TabPages.hrc" +#include "ResId.hxx" +#include "SchSfxItemIds.hxx" + +#ifndef _SFXENUMITEM_HXX +#include <svtools/eitem.hxx> +#endif +#define ITEMID_CHARTDATADESCR SCHATTR_DATADESCR_DESCR +#ifndef _SVX_CHRTITEM_HXX +#include <svx/chrtitem.hxx> +#endif + +//............................................................................. +namespace chart +{ +//............................................................................. + +SchDataDescrTabPage::SchDataDescrTabPage(Window* pWindow, + const SfxItemSet& rInAttrs) : + SfxTabPage(pWindow, SchResId(TP_DATA_DESCR), rInAttrs), + aCbValue(this, ResId(CB_VALUE)), + aRbNumber(this, ResId(RB_NUMBER)), + aRbPercent(this, ResId(RB_PERCENT)), + aCbText(this, ResId(CB_TEXT)), + aCbSymbol(this, ResId(CB_SYMBOL)), + rOutAttrs(rInAttrs) +{ + FreeResource(); + + aCbValue.SetClickHdl( LINK( this, SchDataDescrTabPage, EnableHdl )); + aCbText.SetClickHdl( LINK( this, SchDataDescrTabPage, EnableHdl )); +} + +/************************************************************************* +|* +|* Dtor +|* +\************************************************************************/ + +SchDataDescrTabPage::~SchDataDescrTabPage() +{ +} + +/************************************************************************* +|* +|* Handler fuer ShowSym-Button enablen/disablen +|* +\*************************************************************************/ + +IMPL_LINK( SchDataDescrTabPage, EnableHdl, CheckBox *, pControl ) +{ + aCbSymbol.Enable( aCbValue.IsChecked() || aCbText.IsChecked() ); + if( pControl == &aCbValue ) + { + aRbPercent.Enable( aCbValue.IsChecked() ); + aRbNumber.Enable( aCbValue.IsChecked() ); + } + + return 0; +} + +/************************************************************************* +|* +|* Erzeugung +|* +\*************************************************************************/ + +SfxTabPage* SchDataDescrTabPage::Create(Window* pWindow, + const SfxItemSet& rOutAttrs) +{ + return new SchDataDescrTabPage(pWindow, rOutAttrs); +} + +/************************************************************************* +|* +|* Fuellt uebergebenen Item-Set mit Dialogbox-Attributen +|* +\*************************************************************************/ + +BOOL SchDataDescrTabPage::FillItemSet(SfxItemSet& rOutAttrs) +{ + BOOL bText = aCbText.IsChecked(); + SvxChartDataDescr eDescr; + + if( aCbValue.IsChecked() ) + { + if( aRbNumber.IsChecked() ) + eDescr = (bText? CHDESCR_TEXTANDVALUE : CHDESCR_VALUE); + else + eDescr = (bText? CHDESCR_TEXTANDPERCENT : CHDESCR_PERCENT); + } + else if( aCbText.IsChecked() ) + eDescr = CHDESCR_TEXT; + else + eDescr = CHDESCR_NONE; + + rOutAttrs.Put(SvxChartDataDescrItem(eDescr)); + rOutAttrs.Put(SfxBoolItem( SCHATTR_DATADESCR_SHOW_SYM, + aCbSymbol.IsChecked()) ); + return TRUE; +} + +/************************************************************************* +|* +|* Initialisierung +|* +\*************************************************************************/ + +void SchDataDescrTabPage::Reset(const SfxItemSet& rInAttrs) +{ + const SfxPoolItem *pPoolItem = NULL; + + // default state + aRbNumber.Enable( FALSE ); + aRbPercent.Enable( FALSE ); + aCbSymbol.Enable( FALSE ); + + if( rOutAttrs.GetItemState(SCHATTR_DATADESCR_SHOW_SYM, + TRUE, &pPoolItem) == SFX_ITEM_SET ) + aCbSymbol.Check( ((const SfxBoolItem*)pPoolItem)->GetValue() ); + + if( rOutAttrs.GetItemState(SCHATTR_DATADESCR_DESCR, + TRUE, &pPoolItem) == SFX_ITEM_SET ) + { + switch( ((const SvxChartDataDescrItem*)pPoolItem)->GetValue() ) + { + case CHDESCR_VALUE: + aCbValue.Check(); + aRbNumber.Check(); + EnableHdl( &aCbValue ); + break; + + case CHDESCR_PERCENT: + aCbValue.Check(); + aRbPercent.Check(); + EnableHdl( &aCbValue ); + break; + + case CHDESCR_TEXT: + aCbText.Check(); + EnableHdl( &aCbText ); + break; + + case CHDESCR_TEXTANDPERCENT: + aCbText.Check(); + aCbValue.Check(); + aRbPercent.Check(); + EnableHdl( &aCbValue ); + break; + + case CHDESCR_TEXTANDVALUE: + aCbText.Check(); + aCbValue.Check(); + aRbNumber.Check(); + EnableHdl( &aCbValue ); + break; + + default: + break; + } + } + if( !aRbNumber.IsChecked() && !aRbPercent.IsChecked() ) + aRbNumber.Check(); +} + +//............................................................................. +} //namespace chart +//............................................................................. diff --git a/chart2/source/controller/dialogs/tp_DataLabel.hxx b/chart2/source/controller/dialogs/tp_DataLabel.hxx new file mode 100644 index 000000000..31e558d40 --- /dev/null +++ b/chart2/source/controller/dialogs/tp_DataLabel.hxx @@ -0,0 +1,102 @@ +/************************************************************************* + * + * $RCSfile: tp_DataLabel.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:26 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef _CHART2_TP_DATALABEL_HXX +#define _CHART2_TP_DATALABEL_HXX + +#ifndef _SFXTABDLG_HXX +#include <sfx2/tabdlg.hxx> +#endif + +//............................................................................. +namespace chart +{ +//............................................................................. + +//----------------------------------------------------------------------------- +/** +*/ + +class SchDataDescrTabPage : public SfxTabPage +{ +private: + CheckBox aCbValue; + RadioButton aRbNumber; + RadioButton aRbPercent; + CheckBox aCbText; + CheckBox aCbSymbol; + + const SfxItemSet& rOutAttrs; + + DECL_LINK(EnableHdl, CheckBox * ); + +public: + SchDataDescrTabPage(Window* pParent, const SfxItemSet& rInAttrs); + virtual ~SchDataDescrTabPage(); + + static SfxTabPage* Create(Window* pParent, const SfxItemSet& rInAttrs); + virtual BOOL FillItemSet(SfxItemSet& rOutAttrs); + virtual void Reset(const SfxItemSet& rInAttrs); +}; + +//............................................................................. +} //namespace chart +//............................................................................. +#endif diff --git a/chart2/source/controller/dialogs/tp_DataLabel.src b/chart2/source/controller/dialogs/tp_DataLabel.src new file mode 100644 index 000000000..ebe92daff --- /dev/null +++ b/chart2/source/controller/dialogs/tp_DataLabel.src @@ -0,0 +1,76 @@ +/************************************************************************* + * + * $RCSfile: tp_DataLabel.src,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:26 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "HelpIds.hrc" +#include "TabPages.hrc" +#include "res_DataLabel.hrc" + +#ifndef _GLOBLMN_HRC +#include <svx/globlmn.hrc> +#endif + +TabPage TP_DATA_DESCR +{ + Hide = TRUE ; + HelpID = HID_SCH_DATA_DESCR ; + SVLook = TRUE ; + Size = MAP_APPFONT ( 260 , 185 ) ; + RESOURCE_DATALABEL( 6, 6 ) +}; diff --git a/chart2/source/controller/dialogs/tp_LegendPosition.cxx b/chart2/source/controller/dialogs/tp_LegendPosition.cxx new file mode 100644 index 000000000..73a6ee08c --- /dev/null +++ b/chart2/source/controller/dialogs/tp_LegendPosition.cxx @@ -0,0 +1,187 @@ +/************************************************************************* + * + * $RCSfile: tp_LegendPosition.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:26 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "tp_LegendPosition.hxx" + +#include "ResId.hxx" +#include "TabPages.hrc" +#include "SchSfxItemIds.hxx" + +//#include "schattr.hxx" +#define ITEMID_CHARTLEGENDPOS SCHATTR_LEGEND_POS +#ifndef _SVX_CHRTITEM_HXX //autogen +#include <svx/chrtitem.hxx> +#endif +/* +#include "schresid.hxx" +#include "chtmodel.hxx" +#include "attrib.hxx" +#include "attrib.hrc" +*/ +//............................................................................. +namespace chart +{ +//............................................................................. + +/************************************************************************* +|* +|* Dialog zur Ausrichtung der Legende +|* +\************************************************************************/ + +SchLegendPosTabPage::SchLegendPosTabPage(Window* pWindow, + const SfxItemSet& rInAttrs) : + SfxTabPage(pWindow, SchResId(TP_LEGEND_POS), rInAttrs), + aRbtLeft(this, ResId(RBT_LEFT)), + aRbtTop(this, ResId(RBT_TOP)), + aRbtRight(this, ResId(RBT_RIGHT)), + aRbtBottom(this, ResId(RBT_BOTTOM)), + aGrpLegend(this, ResId(GRP_LEGEND)), + rOutAttrs(rInAttrs) +{ + FreeResource(); +} + +/************************************************************************* +|* +|* Dtor +|* +/************************************************************************/ + +SchLegendPosTabPage::~SchLegendPosTabPage() +{ +} + +/************************************************************************* +|* +|* Erzeugung +|* +\*************************************************************************/ + +SfxTabPage* SchLegendPosTabPage::Create(Window* pWindow, + const SfxItemSet& rOutAttrs) +{ + return new SchLegendPosTabPage(pWindow, rOutAttrs); +} + +/************************************************************************* +|* +|* Fuellt uebergebenen Item-Set mit Dialogbox-Attributen +|* +\*************************************************************************/ + +BOOL SchLegendPosTabPage::FillItemSet(SfxItemSet& rOutAttrs) +{ + SvxChartLegendPos ePos; + + if (aRbtLeft.IsChecked()) + ePos = CHLEGEND_LEFT; + else if (aRbtTop.IsChecked()) + ePos = CHLEGEND_TOP; + else if (aRbtRight.IsChecked()) + ePos = CHLEGEND_RIGHT; + else if (aRbtBottom.IsChecked()) + ePos = CHLEGEND_BOTTOM; + else + ePos = CHLEGEND_NONE; + + rOutAttrs.Put(SvxChartLegendPosItem(ePos)); + + return TRUE; +} + +/************************************************************************* +|* +|* Initialisierung +|* +\*************************************************************************/ + +void SchLegendPosTabPage::Reset(const SfxItemSet& rInAttrs) +{ + SvxChartLegendPos ePos = CHLEGEND_NONE; + + const SfxPoolItem* pPoolItem = NULL; + if( rInAttrs.GetItemState( SCHATTR_LEGEND_POS, + TRUE, &pPoolItem ) != SFX_ITEM_SET ) + pPoolItem = &(rInAttrs.GetPool()->GetDefaultItem( SCHATTR_LEGEND_POS )); + + if( pPoolItem ) + ePos = ((const SvxChartLegendPosItem*)pPoolItem)->GetValue(); + + switch( ePos ) + { + case CHLEGEND_LEFT: + aRbtLeft.Check(TRUE); + break; + case CHLEGEND_TOP: + aRbtTop.Check(TRUE); + break; + case CHLEGEND_RIGHT: + aRbtRight.Check(TRUE); + break; + case CHLEGEND_BOTTOM: + aRbtBottom.Check(TRUE); + break; + } +} + +//............................................................................. +} //namespace chart +//............................................................................. diff --git a/chart2/source/controller/dialogs/tp_LegendPosition.hxx b/chart2/source/controller/dialogs/tp_LegendPosition.hxx new file mode 100644 index 000000000..c25ba0ad3 --- /dev/null +++ b/chart2/source/controller/dialogs/tp_LegendPosition.hxx @@ -0,0 +1,108 @@ +/************************************************************************* + * + * $RCSfile: tp_LegendPosition.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:26 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef _CHART2_TP_LEGENDPOSITION_HXX +#define _CHART2_TP_LEGENDPOSITION_HXX + +// header for SfxTabPage +#ifndef _SFXTABDLG_HXX +#include <sfx2/tabdlg.hxx> +#endif +// header for FixedText +#ifndef _SV_FIXED_HXX +#include <vcl/fixed.hxx> +#endif + +//............................................................................. +namespace chart +{ +//............................................................................. + +/************************************************************************* +|* +|* Legenden-Anordnungs-Tab-Page +|* +\************************************************************************/ +class SchLegendPosTabPage : public SfxTabPage +{ +private: + FixedLine aGrpLegend; + RadioButton aRbtLeft; + RadioButton aRbtTop; + RadioButton aRbtBottom; + RadioButton aRbtRight; + + const SfxItemSet& rOutAttrs; + +public: + SchLegendPosTabPage(Window* pParent, const SfxItemSet& rInAttrs); + virtual ~SchLegendPosTabPage(); + + static SfxTabPage* Create(Window* pParent, const SfxItemSet& rInAttrs); + virtual BOOL FillItemSet(SfxItemSet& rOutAttrs); + virtual void Reset(const SfxItemSet& rInAttrs); +}; + +//............................................................................. +} //namespace chart +//............................................................................. + +#endif + diff --git a/chart2/source/controller/dialogs/tp_LegendPosition.src b/chart2/source/controller/dialogs/tp_LegendPosition.src new file mode 100644 index 000000000..e9d066e05 --- /dev/null +++ b/chart2/source/controller/dialogs/tp_LegendPosition.src @@ -0,0 +1,108 @@ +/************************************************************************* + * + * $RCSfile: tp_LegendPosition.src,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:26 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "HelpIds.hrc" +#include "TabPages.hrc" +#include "res_LegendPosition.hrc" + +TabPage TP_LEGEND_POS +{ + Hide = TRUE ; + HelpID = HID_SCH_LEGEND_POS ; + SVLook = TRUE ; + Size = MAP_APPFONT ( 260 , 185 ) ; + FixedLine GRP_LEGEND + { + Pos = MAP_APPFONT ( 6 , 3 ) ; + Size = MAP_APPFONT ( 248 , 8 ) ; + Text = "Anordnung" ; + Text [ ENGLISH ] = "Arrangement" ; + Text [ norwegian ] = "Arrangement" ; + Text [ italian ] = "Disponi" ; + Text [ portuguese_brazilian ] = "Posio" ; + Text [ portuguese ] = "Disposio" ; + Text [ finnish ] = "Sijainti" ; + Text [ danish ] = "Placering" ; + Text [ french ] = "Disposition" ; + Text [ swedish ] = "Placering" ; + Text [ dutch ] = "Positie" ; + Text [ spanish ] = "Posicin" ; + Text [ english_us ] = "Position" ; + Text[ chinese_simplified ] = "排序"; + Text[ russian ] = ""; + Text[ polish ] = "Pozycja"; + Text[ japanese ] = "配置"; + Text[ chinese_traditional ] = "排序"; + Text[ arabic ] = ""; + Text[ dutch ] = "Positie"; + Text[ chinese_simplified ] = "排序"; + Text[ greek ] = ""; + Text[ korean ] = "배열"; + Text[ turkish ] = "Konum"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "Posici"; + Text[ thai ] = "ตำแหน่ง"; + Text[ czech ] = "Umístění"; + Text[ hebrew ] = "מיקום"; + Text[ hindi ] = "स्थान"; + Text[ slovak ] = "Umiestnenie"; + }; + RESOURCE_LEGENDPOSITION( 14 ) +}; diff --git a/chart2/source/controller/dialogs/tp_PointGeometry.cxx b/chart2/source/controller/dialogs/tp_PointGeometry.cxx new file mode 100644 index 000000000..d4689267c --- /dev/null +++ b/chart2/source/controller/dialogs/tp_PointGeometry.cxx @@ -0,0 +1,190 @@ +/************************************************************************* + * + * $RCSfile: tp_PointGeometry.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:26 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "tp_PointGeometry.hxx" + +#include "ResId.hxx" +#include "TabPages.hrc" +#include "SchSfxItemIds.hxx" + +// header for SfxInt32Item +#ifndef _SFXINTITEM_HXX +#include <svtools/intitem.hxx> +#endif +// header for class Svx3DHorizontalSegmentsItem +#ifndef _SVX3DITEMS_HXX +#include <svx/svx3ditems.hxx> +#endif +/* +#include "schattr.hxx" +#include "chmod3d.hxx" +#include "schresid.hxx" +#include "chtmodel.hxx" +#include "attrib.hxx" +#include "attrib.hrc" + +#ifndef _SVX_SVXIDS_HRC //autogen +#include <svx/svxids.hrc> +#endif +*/ + +//............................................................................. +namespace chart +{ +//............................................................................. + +SchLayoutTabPage::SchLayoutTabPage(Window* pWindow,const SfxItemSet& rInAttrs) : + SfxTabPage(pWindow, SchResId(TP_LAYOUT), rInAttrs), +/* aSquare(this, ResId(RBT_LY_CUBE)), + aCylinder(this, ResId(RBT_LY_CYLINDER)), + aCone(this, ResId(RBT_LY_CONE)), + aPyramid(this, ResId(RBT_LY_PYRAMID)), + aHanoi(this,ResId(RBT_LY_HANOI)), + */ + aListShapes(this,ResId(LB_LY_SHAPE)), + aFtLayout(this, ResId(FT_LY_SHAPE)), + rOutAttrs(rInAttrs) +{ + FreeResource(); +} +/************************************************************************* +|* +|* Dtor +|* +\************************************************************************/ + +SchLayoutTabPage::~SchLayoutTabPage() +{ +} + +/************************************************************************* +|* +|* Erzeugung +|* +\*************************************************************************/ + +SfxTabPage* SchLayoutTabPage::Create(Window* pWindow, + const SfxItemSet& rOutAttrs) +{ + return new SchLayoutTabPage(pWindow, rOutAttrs); +} + +/************************************************************************* +|* +|* Fuellt uebergebenen Item-Set mit Dialogbox-Attributen +|* +\*************************************************************************/ +BOOL SchLayoutTabPage::FillItemSet(SfxItemSet& rOutAttrs) +{ + + if(aListShapes.GetSelectEntryCount()) + { + long nShape=CHART_SHAPE3D_SQUARE; + long nSegs=32; + + nShape = aListShapes.GetSelectEntryPos(); + if(nShape==CHART_SHAPE3D_PYRAMID) + nSegs=4; + + rOutAttrs.Put(SfxInt32Item(SCHATTR_STYLE_SHAPE,nShape)); +//-/ rOutAttrs.Put(SfxUInt32Item(SID_ATTR_3D_HORZ_SEGS,nSegs)); + rOutAttrs.Put(Svx3DHorizontalSegmentsItem(nSegs)); + } + return TRUE; +} +/************************************************************************* +|* +|* Initialisierung +|* +\*************************************************************************/ + +void SchLayoutTabPage::Reset(const SfxItemSet& rInAttrs) +{ + const SfxPoolItem *pPoolItem = NULL; + + if (rInAttrs.GetItemState(SCHATTR_STYLE_SHAPE,TRUE, &pPoolItem) == SFX_ITEM_SET) + { + long nVal=((const SfxInt32Item*)pPoolItem)->GetValue(); + aListShapes.SelectEntryPos(nVal); + } +/* switch (nVal) + { + case CHART_SHAPE3D_SQUARE: + aSquare.Check(TRUE); + break; + case CHART_SHAPE3D_CYLINDER: + aCylinder.Check(TRUE); + break; + case CHART_SHAPE3D_CONE: + aCone.Check(TRUE); + break; + case CHART_SHAPE3D_PYRAMID: + aPyramid.Check(TRUE); + break; + case CHART_SHAPE3D_HANOI: + aHanoi.Check(TRUE); + break; + } +*/ +} + +//............................................................................. +} //namespace chart +//............................................................................. diff --git a/chart2/source/controller/dialogs/tp_PointGeometry.hxx b/chart2/source/controller/dialogs/tp_PointGeometry.hxx new file mode 100644 index 000000000..96d61015f --- /dev/null +++ b/chart2/source/controller/dialogs/tp_PointGeometry.hxx @@ -0,0 +1,104 @@ +/************************************************************************* + * + * $RCSfile: tp_PointGeometry.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:26 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef _CHART2_TP_POINTGEOMETRY_HXX +#define _CHART2_TP_POINTGEOMETRY_HXX + +// header for SfxTabPage +#ifndef _SFXTABDLG_HXX +#include <sfx2/tabdlg.hxx> +#endif +// header for FixedText +#ifndef _SV_FIXED_HXX +#include <vcl/fixed.hxx> +#endif +// header for class ListBox +#ifndef _SV_LSTBOX_HXX +#include <vcl/lstbox.hxx> +#endif + +//............................................................................. +namespace chart +{ +//............................................................................. + +class SchLayoutTabPage : public SfxTabPage +{ +private: + FixedText aFtLayout; + ListBox aListShapes; + + const SfxItemSet& rOutAttrs; + +public: + SchLayoutTabPage(Window* pParent, const SfxItemSet& rInAttrs); + virtual ~SchLayoutTabPage(); + + static SfxTabPage* Create(Window* pParent, const SfxItemSet& rInAttrs); + virtual BOOL FillItemSet(SfxItemSet& rOutAttrs); + virtual void Reset(const SfxItemSet& rInAttrs); +}; + +//............................................................................. +} //namespace chart +//............................................................................. + +#endif + diff --git a/chart2/source/controller/dialogs/tp_PointGeometry.src b/chart2/source/controller/dialogs/tp_PointGeometry.src new file mode 100644 index 000000000..10bfed441 --- /dev/null +++ b/chart2/source/controller/dialogs/tp_PointGeometry.src @@ -0,0 +1,329 @@ +/************************************************************************* + * + * $RCSfile: tp_PointGeometry.src,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:26 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "HelpIds.hrc" +#include "TabPages.hrc" + +TabPage TP_LAYOUT +{ + Hide = TRUE ; +// HelpID = HID_LAYOUT ; + SVLook = TRUE ; + Size = MAP_APPFONT ( 260 , 185 ) ; + FixedText FT_LY_SHAPE + { + Pos = MAP_APPFONT ( 6 , 6 ) ; + Size = MAP_APPFONT ( 248 , 8 ) ; + Text = "Balken/Sulen Form" ; + Text [ ENGLISH ] = "Bar/Column Shape"; + Text[ italian ] = "Forma barre/colonne"; + Text[ portuguese_brazilian ] = "Forma da barra/coluna"; + Text[ portuguese ] = "Forma: barras/colunas"; + Text[ danish ] = "Liggende sjler/Sjler Form"; + Text[ french ] = "Barres/colonnes : forme"; + Text[ swedish ] = "Form p staplar"; + Text[ dutch ] = "Balken-/zuilenvorm"; + Text[ spanish ] = "Barras/columnas: forma"; + Text[ english_us ] = "Bar/column shape"; + Text[ chinese_simplified ] = "条块/圓柱形"; + Text[ russian ] = " ./. "; + Text[ polish ] = "Ksztat supka/kolumny"; + Text[ japanese ] = "形状"; + Text[ chinese_traditional ] = "條塊/圓柱體"; + Text[ arabic ] = ""; + Text[ dutch ] = "Balken-/zuilenvorm"; + Text[ chinese_simplified ] = "条块/圓柱形"; + Text[ greek ] = " /"; + Text[ korean ] = "형태"; + Text[ turkish ] = "Bar/Sutn ekli"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "Forma"; + Text[ finnish ] = "Palkin/sarakkeen muoto"; + Text[ thai ] = "รูปร่าง"; + Text[ czech ] = "Profil sloupků/sloupců"; + Text[ hebrew ] = "Balken/Säulen Form"; + Text[ hindi ] = "पट्टी/स्तंभ आकार"; + Text[ slovak ] = "Tvar stĺpca/pásu"; + }; + ListBox LB_LY_SHAPE + { + Border = TRUE ; + AutoHScroll = TRUE ; + Pos = MAP_APPFONT ( 6 , 17 ) ; + Size = MAP_APPFONT ( 100 , 38 ) ; + TabStop = TRUE ; + Group = TRUE ; + DropDown=FALSE; + DDExtraWidth = TRUE ; + + StringList = + { + "Quader"; + "Zylinder"; + "Kegel"; + "Pyramiden"; + // "Turm von Hanoi"; + }; + StringList [ ENGLISH ] = + { + "Cube"; + "Cylinder"; + "Cone"; + "Pyramid"; + // "Tower of Hanoi"; + }; + StringList [ language_user1 ] = + { + "Quader" ; + "Zylinder" ; + "Kegel" ; + "Pyramiden" ; + }; + StringList [ english_us ] = + { + "Rectangular parallelepiped" ; + "Cylinder" ; + "Cone" ; + "Pyramid" ; + }; + StringList [ portuguese ] = + { + "Paraleleppedo" ; + "Cilindro" ; + "Cone" ; + "Pirmides" ; + }; + StringList [ russian ] = + { + "" ; + "" ; + "" ; + "" ; + }; + StringList [ dutch ] = + { + "blokken" ; + "cilinders" ; + "kegels" ; + "piramiden" ; + }; + StringList [ french ] = + { + "Paralllpipde" ; + "Cylindre" ; + "Cne" ; + "Pyramides" ; + }; + StringList [ spanish ] = + { + "Paraleleppedo" ; + "Cilindro" ; + "Cono" ; + "Pirmides" ; + }; + StringList [ italian ] = + { + "Parallelepipedo" ; + "Cilindro" ; + "Cono" ; + "Piramide" ; + }; + StringList [ danish ] = + { + "Kasser" ; + "Cylindre" ; + "Kegler" ; + "Pyramider" ; + }; + StringList [ swedish ] = + { + "Kvader" ; + "Cylinder" ; + "Kon" ; + "Pyramider" ; + }; + StringList [ polish ] = + { + "Prostopadocian" ; + "Walec" ; + "Stoek" ; + "Ostrosup" ; + }; + StringList [ portuguese_brazilian ] = + { + "Paraleleppedo retangular" ; + "Cilindro" ; + "Cone" ; + "Pirmide" ; + }; + StringList [ japanese ] = + { + "直方体" ; + "円柱" ; + "円錐" ; + "角錐" ; + }; + StringList [ chinese_simplified ] = + { + "直角平行六面体" ; + "圆柱体" ; + "圆锥体" ; + "棱锥体" ; + }; + StringList [ chinese_traditional ] = + { + "直角平行六面體" ; + "圓柱體" ; + "圓錐體" ; + "棱錐體" ; + }; + StringList [ arabic ] = + { + " " ; + "" ; + "" ; + "" ; + }; + StringList [ dutch ] = + { + "blokken" ; + "cilinders" ; + "kegels" ; + "piramiden" ; + }; + StringList [ chinese_simplified ] = + { + "直角平行六面体" ; + "圆柱体" ; + "圆锥体" ; + "棱锥体" ; + }; + StringList [ greek ] = + { + " " ; + "" ; + "K" ; + "" ; + }; + StringList [ korean ] = + { + "직육면체" ; + "실린더" ; + "원추형" ; + "피라미드" ; + }; + StringList [ turkish ] = + { + "Dikdrtgen prizma" ; + "Silindir" ; + "Koni" ; + "Piramit" ; + }; + StringList [ catalan ] = + { + "Paraleleppede" ; + "Cilindre" ; + "Con" ; + "Pirmides" ; + }; + StringList [ finnish ] = + { + "Suorakulmainen suuntaissrmi" ; + "Lieri" ; + "Kartio" ; + "Pyramidi" ; + }; + StringList [ thai ] = + { + "รูปปริมาตรที่มีด้าน 6 ด้าน" ; + "ทรงกระบอก" ; + "กรวย" ; + "ปิรามิด" ; + }; + StringList [ czech ] = + { + "Kvádr" ; + "Válec" ; + "Kužel" ; + "Jehlan" ; + }; + StringList [ hebrew ] = + { + "Quader" ; + "Zylinder" ; + "Kegel" ; + "Pyramiden" ; + }; + StringList [ hindi ] = + { + "चतुर्भुज" ; + "वर्तुलाकार" ; + "शंकु" ; + "स्तूप" ; + }; + StringList [ slovak ] = + { + "Kváder" ; + "Valec" ; + "Kužeľ" ; + "Ihlan" ; + }; + }; +}; diff --git a/chart2/source/controller/dialogs/tp_Scale.cxx b/chart2/source/controller/dialogs/tp_Scale.cxx new file mode 100644 index 000000000..7a22b5dff --- /dev/null +++ b/chart2/source/controller/dialogs/tp_Scale.cxx @@ -0,0 +1,882 @@ +/************************************************************************* + * + * $RCSfile: tp_Scale.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:27 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "tp_Scale.hxx" + +#include "ResId.hxx" +#include "TabPages.hrc" +#include "Strings.hrc" +#include "SchSfxItemIds.hxx" + +#ifndef INCLUDED_RTL_MATH_HXX +#include <rtl/math.hxx> +#endif +// header for class SvxDoubleItem +#define ITEMID_DOUBLE 0 +#ifndef _SVX_CHRTITEM_HXX +#include <svx/chrtitem.hxx> +#endif +// header for class SfxBoolItem +#ifndef _SFXENUMITEM_HXX +#include <svtools/eitem.hxx> +#endif +// header for SfxInt32Item +#ifndef _SFXINTITEM_HXX +#include <svtools/intitem.hxx> +#endif + +// header for class WarningBox +#ifndef _SV_MSGBOX_HXX +#include <vcl/msgbox.hxx> +#endif + +/* +#ifndef _SV_MSGBOX_HXX //autogen +#include <vcl/msgbox.hxx> +#endif + +// header for class Table +#ifndef _TOOLS_TABLE_HXX +#include <tools/table.hxx> +#endif +*/ +// header for class SvNumberformat +#ifndef _ZFORMAT_HXX +#ifndef _ZFORLIST_DECLARE_TABLE +#define _ZFORLIST_DECLARE_TABLE +#endif +#include <svtools/zformat.hxx> +#endif +/* +// header for SvNumberFormatter +#ifndef _ZFORLIST_HXX +#include <svtools/zforlist.hxx> +#endif + +#include "schattr.hxx" +#define ITEMID_DOUBLE 0 +#ifndef _SVX_CHRTITEM_HXX //autogen +#include <svx/chrtitem.hxx> +#endif + +#include "schresid.hxx" +#include "strings.hrc" +#include "chtmodel.hxx" +#include "attrib.hxx" +#include "tpscaley.hxx" +#include "tpscaley.hrc" + +#include "chaxis.hxx" + +#include <rtl/math.hxx> +*/ +//............................................................................. +namespace chart +{ +//............................................................................. + +SchScaleYAxisTabPage::SchScaleYAxisTabPage(Window* pWindow,const SfxItemSet& rInAttrs) : + SfxTabPage(pWindow, SchResId(TP_SCALE_Y), rInAttrs), + + aFlScale(this, ResId(FL_SCALE_Y)), + aTxtMin (this, ResId (TXT_MIN)), + aFmtFldMin(this, ResId(EDT_MIN)), + aCbxAutoMin(this, ResId(CBX_AUTO_MIN)), + aTxtMax(this, ResId (TXT_MAX)), + aFmtFldMax(this, ResId(EDT_MAX)), + aCbxAutoMax(this, ResId(CBX_AUTO_MAX)), + aTxtMain (this, ResId (TXT_STEP_MAIN)), + aFmtFldStepMain(this, ResId(EDT_STEP_MAIN)), + aCbxAutoStepMain(this, ResId(CBX_AUTO_STEP_MAIN)), + aTxtHelp (this, ResId (TXT_STEP_HELP)), +// aFmtFldStepHelp(this, ResId(EDT_STEP_HELP)), + aMtStepHelp (this, ResId (MT_STEPHELP)), + aCbxAutoStepHelp(this, ResId(CBX_AUTO_STEP_HELP)), + aTxtOrigin (this, ResId (TXT_ORIGIN)), + aFmtFldOrigin(this, ResId(EDT_ORIGIN)), + aCbxAutoOrigin(this, ResId(CBX_AUTO_ORIGIN)), + aCbxLogarithm(this, ResId(CBX_LOGARITHM)), + + aFlTicks(this,ResId(FL_TICKS)), + aCbxTicksInner(this, ResId(CBX_TICKS_INNER)), + aCbxTicksOuter(this, ResId(CBX_TICKS_OUTER)), + + aFlHelpTicks(this,ResId(FL_HELPTICKS)), + aCbxHelpTicksInner(this, ResId(CBX_HELPTICKS_INNER)), + aCbxHelpTicksOuter(this, ResId(CBX_HELPTICKS_OUTER)), + + fMin(0.0), + fMax(0.0), + fStepMain(0.0), + nStepHelp(0), + fOrigin(0.0), + nAxisType(0), + rOutAttrs(rInAttrs), + pNumFormatter(NULL) //, +// bLastStepMain(FALSE) +{ + FreeResource(); + SetExchangeSupport(); + + aCbxAutoMin.SetClickHdl(LINK(this, SchScaleYAxisTabPage, EnableValueHdl)); + aCbxAutoMax.SetClickHdl(LINK(this, SchScaleYAxisTabPage, EnableValueHdl)); + aCbxAutoStepMain.SetClickHdl(LINK(this, SchScaleYAxisTabPage, EnableValueHdl)); + aCbxAutoStepHelp.SetClickHdl(LINK(this, SchScaleYAxisTabPage, EnableValueHdl)); + aCbxAutoOrigin.SetClickHdl(LINK(this, SchScaleYAxisTabPage, EnableValueHdl)); +// aCbxLogarithm.SetClickHdl(LINK(this, SchScaleYAxisTabPage, HandleLogs)); + const SfxPoolItem *pPoolItem = NULL; + if (rInAttrs.GetItemState(SCHATTR_AXISTYPE, TRUE, &pPoolItem) == SFX_ITEM_SET) + nAxisType = (int) ((const SfxInt32Item*)pPoolItem)->GetValue(); +} + +/************************************************************************* +|* +|* Werte-Editierfelder je nach Checkbox-Markierung enablen/disablen +|* +*************************************************************************/ + +IMPL_LINK( SchScaleYAxisTabPage, EnableValueHdl, CheckBox *, pCbx ) +{ + if (pCbx == &aCbxAutoMin) + { + aFmtFldMin.Enable(!aCbxAutoMin.IsChecked()); + } + else if (pCbx == &aCbxAutoMax) + { + aFmtFldMax.Enable(!aCbxAutoMax.IsChecked()); + } + else if (pCbx == &aCbxAutoStepMain) + { + aFmtFldStepMain.Enable(!aCbxAutoStepMain.IsChecked()); +// bLastStepMain = aCbxAutoStepMain.IsChecked(); + } + else if (pCbx == &aCbxAutoStepHelp) + { + aMtStepHelp.Show (); + aMtStepHelp.Enable( ! aCbxAutoStepHelp.IsChecked() ); + +// if (aCbxLogarithm.IsChecked ()) +// { +// // aFmtFldStepHelp.Hide (); +// aMtStepHelp.Show (); +// aMtStepHelp.Enable(!aCbxAutoStepHelp.IsChecked()); +// } +// else +// { +// // aFmtFldStepHelp.Show (); +// aMtStepHelp.Hide (); +// // aFmtFldStepHelp.Enable(!aCbxAutoStepHelp.IsChecked()); +// } + } + else if (pCbx == &aCbxAutoOrigin) + { + aFmtFldOrigin.Enable(!aCbxAutoOrigin.IsChecked()); + } + return 0; +} + +/************************************************************************* +|* +|* Erzeugung +|* +\*************************************************************************/ + +SfxTabPage* SchScaleYAxisTabPage::Create(Window* pWindow,const SfxItemSet& rOutAttrs) +{ + return new SchScaleYAxisTabPage(pWindow, rOutAttrs); +} + +/************************************************************************* +|* +|* Fuellt uebergebenen Item-Set mit Dialogbox-Attributen +|* +\*************************************************************************/ + +BOOL SchScaleYAxisTabPage::FillItemSet(SfxItemSet& rOutAttrs) +{ + DBG_ASSERT( pNumFormatter, "No NumberFormatter available" ); + + long nTicks=0; + long nHelpTicks=0; + + if(aCbxHelpTicksInner.IsChecked()) + nHelpTicks|=CHAXIS_MARK_INNER; + if(aCbxHelpTicksOuter.IsChecked()) + nHelpTicks|=CHAXIS_MARK_OUTER; + if(aCbxTicksInner.IsChecked()) + nTicks|=CHAXIS_MARK_INNER; + if(aCbxTicksOuter.IsChecked()) + nTicks|=CHAXIS_MARK_OUTER; + + rOutAttrs.Put(SfxInt32Item(SCHATTR_AXIS_TICKS,nTicks)); + rOutAttrs.Put(SfxInt32Item(SCHATTR_AXIS_HELPTICKS,nHelpTicks)); + + rOutAttrs.Put(SfxBoolItem(SCHATTR_AXIS_AUTO_MIN ,aCbxAutoMin.IsChecked())); + rOutAttrs.Put(SfxBoolItem(SCHATTR_AXIS_AUTO_MAX ,aCbxAutoMax.IsChecked())); + rOutAttrs.Put(SfxBoolItem(SCHATTR_AXIS_AUTO_STEP_HELP,aCbxAutoStepHelp.IsChecked())); + rOutAttrs.Put(SfxBoolItem(SCHATTR_AXIS_AUTO_ORIGIN ,aCbxAutoOrigin.IsChecked())); + rOutAttrs.Put(SfxBoolItem(SCHATTR_AXIS_LOGARITHM ,aCbxLogarithm.IsChecked())); + rOutAttrs.Put(SvxDoubleItem(fMax , SCHATTR_AXIS_MAX)); + rOutAttrs.Put(SvxDoubleItem(fMin , SCHATTR_AXIS_MIN)); + rOutAttrs.Put(SfxInt32Item(SCHATTR_AXIS_STEP_HELP, nStepHelp)); + rOutAttrs.Put(SvxDoubleItem(fOrigin , SCHATTR_AXIS_ORIGIN)); + + rOutAttrs.Put(SfxBoolItem(SCHATTR_AXIS_AUTO_STEP_MAIN,aCbxAutoStepMain.IsChecked())); + rOutAttrs.Put(SvxDoubleItem(fStepMain,SCHATTR_AXIS_STEP_MAIN)); + + return TRUE; +} + +/************************************************************************* +|* +|* Initialisierung +|* +\*************************************************************************/ + +void SchScaleYAxisTabPage::Reset(const SfxItemSet& rInAttrs) +{ + DBG_ASSERT( pNumFormatter, "No NumberFormatter available" ); + if(!pNumFormatter) + return; + + const SfxPoolItem *pPoolItem = NULL; + + long nTicks=0,nHelpTicks=0; + if(rInAttrs.GetItemState(SCHATTR_AXIS_TICKS,TRUE, &pPoolItem)== SFX_ITEM_SET) + nTicks=((const SfxInt32Item*)pPoolItem)->GetValue(); + if(rInAttrs.GetItemState(SCHATTR_AXIS_HELPTICKS,TRUE, &pPoolItem)== SFX_ITEM_SET) + nHelpTicks=((const SfxInt32Item*)pPoolItem)->GetValue(); + + aCbxHelpTicksInner.Check(nHelpTicks&CHAXIS_MARK_INNER); + aCbxHelpTicksOuter.Check(nHelpTicks&CHAXIS_MARK_OUTER); + aCbxTicksInner.Check(nTicks&CHAXIS_MARK_INNER); + aCbxTicksOuter.Check(nTicks&CHAXIS_MARK_OUTER); + + if (rInAttrs.GetItemState(SCHATTR_AXIS_AUTO_MIN,TRUE,&pPoolItem) == SFX_ITEM_SET) + aCbxAutoMin.Check(((const SfxBoolItem*)pPoolItem)->GetValue()); + + if (rInAttrs.GetItemState(SCHATTR_AXIS_MIN,TRUE, &pPoolItem) == SFX_ITEM_SET) + { + fMin = ((const SvxDoubleItem*)pPoolItem)->GetValue(); + aFmtFldMin.SetValue( fMin ); + } + + if (rInAttrs.GetItemState(SCHATTR_AXIS_AUTO_MAX,TRUE, &pPoolItem) == SFX_ITEM_SET) + aCbxAutoMax.Check(((const SfxBoolItem*)pPoolItem)->GetValue()); + + if (rInAttrs.GetItemState(SCHATTR_AXIS_MAX,TRUE, &pPoolItem) == SFX_ITEM_SET) + { + fMax = ((const SvxDoubleItem*)pPoolItem)->GetValue(); + aFmtFldMax.SetValue( fMax ); + } + + if (rInAttrs.GetItemState(SCHATTR_AXIS_AUTO_STEP_MAIN,TRUE, &pPoolItem) == SFX_ITEM_SET) + aCbxAutoStepMain.Check(((const SfxBoolItem*)pPoolItem)->GetValue()); + + if (rInAttrs.GetItemState(SCHATTR_AXIS_STEP_MAIN,TRUE, &pPoolItem) == SFX_ITEM_SET) + { + fStepMain = ((const SvxDoubleItem*)pPoolItem)->GetValue(); + aFmtFldStepMain.SetValue( fStepMain ); + } + if (rInAttrs.GetItemState(SCHATTR_AXIS_AUTO_STEP_HELP,TRUE, &pPoolItem) == SFX_ITEM_SET) + aCbxAutoStepHelp.Check(((const SfxBoolItem*)pPoolItem)->GetValue()); + if (rInAttrs.GetItemState(SCHATTR_AXIS_LOGARITHM,TRUE, &pPoolItem) == SFX_ITEM_SET) + aCbxLogarithm.Check(((const SfxBoolItem*)pPoolItem)->GetValue()); + if (rInAttrs.GetItemState(SCHATTR_AXIS_STEP_HELP,TRUE, &pPoolItem) == SFX_ITEM_SET) + { + nStepHelp = ((const SfxInt32Item*)pPoolItem)->GetValue(); +// if (aCbxLogarithm.IsChecked ()) + + aMtStepHelp.SetValue( nStepHelp ); + +// else +// { +// // aFmtFldStepHelp.SetValue( fStepHelp ); +// } + } + if (rInAttrs.GetItemState(SCHATTR_AXIS_AUTO_ORIGIN,TRUE, &pPoolItem) == SFX_ITEM_SET) + aCbxAutoOrigin.Check(((const SfxBoolItem*)pPoolItem)->GetValue()); + if (rInAttrs.GetItemState(SCHATTR_AXIS_ORIGIN,TRUE, &pPoolItem) == SFX_ITEM_SET) + { + fOrigin = ((const SvxDoubleItem*)pPoolItem)->GetValue(); + aFmtFldOrigin.SetValue( fOrigin ); + } + + EnableValueHdl(&aCbxAutoMin); + EnableValueHdl(&aCbxAutoMax); + EnableValueHdl(&aCbxAutoStepMain); + EnableValueHdl(&aCbxAutoStepHelp); + EnableValueHdl(&aCbxAutoOrigin); +// CheckLogControls (); +} + +/************************************************************************* +|* +|* Prueft die eingegebenen Werte +|* +\*************************************************************************/ + +int SchScaleYAxisTabPage::DeactivatePage(SfxItemSet* pItemSet) +{ + if( !pNumFormatter ) + { + DBG_ERROR( "No NumberFormatter available" ); + return LEAVE_PAGE; + } + + ULONG nIndex = pNumFormatter->GetStandardIndex(LANGUAGE_SYSTEM); + Edit* pEdit = NULL; + USHORT nErrStrId = 0; + double fDummy; + +// if( CheckLogs ()) +// return KEEP_PAGE; + + + fMax = aFmtFldMax.GetValue(); + fMin = aFmtFldMin.GetValue(); + fOrigin = aFmtFldOrigin.GetValue(); + fStepMain = aFmtFldStepMain.GetValue(); +// fStepHelp = aFmtFldStepHelp.GetValue(); + nStepHelp = aMtStepHelp.GetValue(); + + //do some reasonable automatic correction of user input if necessary + if (!aCbxAutoMax.IsChecked() && !aCbxAutoMin.IsChecked() && + fMin >= fMax) + { + //do not bother the user with error boxes + //just correct hte error and exchance minimum and maximum + double fSwap = fMin; + fMin = fMax; + fMax = fSwap; + /* + pEdit = &aFmtFldMin; + nErrStrId = STR_MINVALUE_LT_MAXVALUE; + */ + } + // check for entries in invalid ranges + if ( aCbxLogarithm.IsChecked() && + ( ( !aCbxAutoMin.IsChecked() && fMin <= 0.0 ) + || ( !aCbxAutoMax.IsChecked() && fMax <= 0.0 ) ) ) + { + //do not bother the user with error boxes for minimum greater 0 + //just set some suiteable default value + if( !aCbxAutoMax.IsChecked() && fMax<=0.0 ) + fMax = 100.0; + if( !aCbxAutoMin.IsChecked() && fMin<=0.0 ) + { + fMin = 0.1; + if(!aCbxAutoMax.IsChecked() && fMin>=fMax) + fMin = log(fMax)/10.0; + } + /* + pEdit = &aFmtFldMin; + nErrStrId = STR_BAD_LOGARITHM; + */ + } + if (!aCbxAutoStepHelp.IsChecked() && nStepHelp <= 0) + { + //do not bother the user with error boxes for minimum greater 0 + nStepHelp = 1; + /* + pEdit = &aFmtFldStepMain; + nErrStrId = STR_STEP_GT_ZERO; + */ + } + //user often forgets to switch visibility of help tickmarks on + if( !aCbxAutoStepHelp.IsChecked() && aMtStepHelp.IsModified() && nStepHelp > 1 + && !aCbxHelpTicksInner.IsChecked() && !aCbxHelpTicksOuter.IsChecked() ) + //&& !aCbxHelpTicksInner.IsModified() && !aCbxHelpTicksOuter.IsModified() ) + { + //check help ticks like main ticks + if(aCbxTicksInner.IsChecked()) + aCbxHelpTicksInner.Check(); + if(aCbxTicksOuter.IsChecked()) + aCbxHelpTicksOuter.Check(); + } + + //check wich entries need user action + + // check for entries that cannot be parsed for the current number format + if ( aFmtFldMin.IsModified() + && !aCbxAutoMin.IsChecked() + && !pNumFormatter->IsNumberFormat(aFmtFldMin.GetText(), nIndex, fDummy)) + { + pEdit = &aFmtFldMin; + nErrStrId = STR_INVALID_NUMBER; + } + else if (aFmtFldMax.IsModified() && !aCbxAutoMax.IsChecked() && + !pNumFormatter->IsNumberFormat(aFmtFldMax.GetText(), + nIndex, fDummy)) + { + pEdit = &aFmtFldMax; + nErrStrId = STR_INVALID_NUMBER; + } + else if (aFmtFldStepMain.IsModified() && !aCbxAutoStepMain.IsChecked() && + !pNumFormatter->IsNumberFormat(aFmtFldStepMain.GetText(), + nIndex, fDummy)) + { + pEdit = &aFmtFldStepMain; + nErrStrId = STR_INVALID_NUMBER; + } + /* + else if (!GetHelpValue ()) + { +// pEdit = &aFmtFldStepHelp; + nErrStrId = STR_INVALID_NUMBER; + } + */ + else if (aFmtFldOrigin.IsModified() && !aCbxAutoOrigin.IsChecked() && + !pNumFormatter->IsNumberFormat(aFmtFldOrigin.GetText(), + nIndex, fDummy)) + { + pEdit = &aFmtFldOrigin; + nErrStrId = STR_INVALID_NUMBER; + } + /* + //do not bother the user with error boxes for origin + //any values are tolerable + else if (!aCbxAutoOrigin.IsChecked() && aCbxLogarithm.IsChecked() && + fOrigin <= 0.0) + { + pEdit = &aFmtFldOrigin; + nErrStrId = STR_BAD_LOGARITHM; + } + */ + else if (!aCbxAutoStepMain.IsChecked() && fStepMain <= 0.0) + { + //show error message only if no reasonable value can be found here + if( !aCbxAutoMin.IsChecked() && !aCbxAutoMax.IsChecked() ) + { + if(aCbxLogarithm.IsChecked()) + fStepMain = 1.0; + else + fStepMain = (fMax - fMin)/2.0; + } + else + { + pEdit = &aFmtFldStepMain; + nErrStrId = STR_STEP_GT_ZERO; + } + } + /* + //do not bother the user with error boxes Main Step + //the main step is allowed to be greater than the visible range + else if (!aCbxAutoStepMain.IsChecked() && fStepMain > fabs( fMax - fMin )) + { + pEdit = &aFmtFldStepMain; + nErrStrId = STR_STEPMAIN_LT_MAXVALUE; + } + */ + // step may now be anything, independent from main step +// else if (!aCbxLogarithm.IsChecked () && !aCbxAutoStepHelp.IsChecked() && fStepHelp > fStepMain) +// { +// // pEdit = &aFmtFldStepHelp; +// nErrStrId = STR_STEPHELP_LT_STEPMAIN; +// } + /* + else + { + //do not bother the user with error boxes for origin + //any values are tolerable + if(( ! aCbxAutoMin.IsChecked() && + fOrigin < fMin ) || + ( ! aCbxAutoMax.IsChecked() && + fMax < fOrigin )) + { + nErrStrId = STR_WRONG_ORIGIN; + + if( ! aCbxAutoOrigin.IsChecked ()) + pEdit = &aFmtFldOrigin; + else if( ! aCbxAutoMin.IsChecked()) + pEdit = &aFmtFldMin; + else + pEdit = &aFmtFldMax; + } + } + */ + + if( ShowWarning( nErrStrId, pEdit ) ) + return KEEP_PAGE; + + if( pItemSet ) + FillItemSet( *pItemSet ); + + return LEAVE_PAGE; +} + +/************************************************************************* +|* +|* pruefe die eingaben fuer logarithmische werte +|* +*************************************************************************/ + +// IMPL_LINK( SchScaleYAxisTabPage, HandleLogs, CheckBox *, pCbx ) +// { +// CheckLogs (); + +// return 0; +// } + +/************************************************************************* +|* +|* pruefe die eingaben fuer logarithmische werte +|* +*************************************************************************/ + +// bool SchScaleYAxisTabPage::CheckLogs () +// { +// if( !pNumFormatter ) +// { +// DBG_ERROR( "No NumberFormatter available" ); +// return false; +// } + +// ULONG nIndex = pNumFormatter->GetStandardIndex(LANGUAGE_SYSTEM); +// Edit *pEdit = NULL; +// USHORT nErrStrId = 0; +// String aNumStr; +// double fDummy; + +// // CheckLogControls (); + +// if (!aCbxAutoMin.IsChecked ()) +// { +// fMin = aFmtFldMin.GetValue(); +// if (!pNumFormatter->IsNumberFormat(aFmtFldMin.GetText(), nIndex, fDummy)) +// { +// pEdit = &aFmtFldMin; +// nErrStrId = STR_INVALID_NUMBER; +// } +// else if (aCbxLogarithm.IsChecked ()) +// { +// if (fMin > 1.0) +// { +// double fVal = 1.0; + +// while (fVal < fMin) +// fVal *= 10.0; + +// if (fVal > fMin) fVal /= 10.0; +// fMin = fVal; +// } +// else if (fMin > 0.0) +// { +// double fVal = 1.0; + +// while (fVal > fMin) +// { +// fVal /= 10.0; +// if(::rtl::math::approxEqual(fVal,fMin)) +// fMin=fVal; //Double-Ungenauigkeiten (last-bits) ausgleichen +// } + +// fMin = fVal; +// } +// else fMin = 1.0; + +// aFmtFldMin.SetValue( fMin ); +// } +// } + +// if (!aCbxAutoMin.IsChecked ()) +// { +// fMax = aFmtFldMax.GetValue(); +// if( !pNumFormatter->IsNumberFormat(aFmtFldMax.GetText(), nIndex, fDummy)) +// { +// pEdit = &aFmtFldMax; +// nErrStrId = STR_INVALID_NUMBER; +// } +// else if (aCbxLogarithm.IsChecked ()) +// { +// if (fMax > 1.0) +// { +// double fVal = 1.0; + +// while (fVal < fMax) +// fVal *= 10.0; + +// fMax = fVal; +// } +// else if (fMax > 0.0) +// { +// double fVal = 1.0; + +// while (fVal > fMax) +// fVal /= 10.0; + +// if (fVal < fMax) fVal *= 10.0; +// fMax = fVal; +// } +// else fMax = 1.0; + +// aFmtFldMax.SetValue( fMax ); +// } +// } + +// BOOL bNewOrigin = FALSE; + +// if (aCbxAutoOrigin.IsChecked()) +// { +// if (fMax < 0.0) +// { +// fOrigin = fMax; +// bNewOrigin = TRUE; +// } +// if (fMin > 0.0) +// { +// fOrigin = fMin; +// bNewOrigin = TRUE; +// } +// if ((fMax >= 0.0) && (fMin <= 0.0)) +// { +// fOrigin = 0.0; +// bNewOrigin = TRUE; +// } +// } + +// if (aCbxLogarithm.IsChecked ()) +// { +// fOrigin = fMin; +// bNewOrigin = TRUE; +// } + +// if( bNewOrigin ) +// { +// aFmtFldOrigin.SetValue( fOrigin ); +// } + +// return ShowWarning( nErrStrId, pEdit ); +// } + +/************************************************************************* +|* +|* pruefe die eingaben fuer logarithmische werte +|* +*************************************************************************/ + +// bool SchScaleYAxisTabPage::CheckLogControls () +// { +// USHORT nErrorId = 0; +// Edit * pControl = NULL; + +// if( !pNumFormatter ) +// { +// DBG_ERROR( "No NumberFormatter available" ); +// return false; +// } + +// if (aCbxLogarithm.IsChecked ()) +// { +// ULONG nIndex = pNumFormatter->GetStandardIndex(LANGUAGE_SYSTEM); + +// // aFmtFldOrigin.Enable (FALSE); +// // aCbxAutoOrigin.Enable (FALSE); +// // aFmtFldStepMain.Enable (FALSE); +// // bLastStepMain = aCbxAutoStepMain.IsChecked(); +// // aCbxAutoStepMain.Check(); +// // aCbxAutoStepMain.Enable (FALSE); +// // aFmtFldStepHelp.Enable (FALSE); +// // aFmtFldStepHelp.Hide (); +// // aMtStepHelp.Show (); + +// double fNewMin; +// if (pNumFormatter->IsNumberFormat(aFmtFldMin.GetText(), nIndex, fNewMin )) +// { +// if (fNewMin <= 0.0) +// { +// nErrorId = STR_BAD_LOGARITHM; +// pControl = & aFmtFldMin; +// } +// else +// fMin = fNewMin; +// } +// else +// { +// nErrorId = STR_BAD_FORMAT; +// pControl = & aFmtFldMin; +// } + +// // aMtStepHelp.Enable (!aCbxAutoStepHelp.IsChecked ()); +// } +// // else +// // { +// // aCbxAutoStepMain.Check( bLastStepMain ); + +// // aCbxAutoOrigin.Enable (TRUE); +// // aCbxAutoStepMain.Enable (TRUE); + +// // aFmtFldStepHelp.Enable (!aCbxAutoStepHelp.IsChecked ()); + +// // aFmtFldStepHelp.Show (); +// // aMtStepHelp.Hide (); +// // } + +// aFmtFldOrigin.Enable (!aCbxAutoOrigin.IsChecked ()); +// aFmtFldStepMain.Enable (!aCbxAutoStepMain.IsChecked ()); +// aMtStepHelp.Enable (!aCbxAutoStepHelp.IsChecked ()); + +// return ShowWarning( nErrorId, pControl ); +// } + +/************************************************************************* +|* +|* pruefe die eingaben fuer logarithmische werte +|* +*************************************************************************/ + +/* +BOOL SchScaleYAxisTabPage::GetHelpValue () +{ + if (!aCbxAutoStepHelp.IsChecked()) + nStepHelp = aMtStepHelp.GetValue (); + return TRUE; + +// if (aCbxLogarithm.IsChecked ()) +// { +// if (!aCbxAutoStepHelp.IsChecked()) fStepHelp = aMtStepHelp.GetValue (); + +// return TRUE; +// } +// else +// { +// ULONG nIndex = pNumFormatter->GetStandardIndex(LANGUAGE_SYSTEM); +// double fDummy; + +// fStepHelp = aFmtFldStepHelp.GetValue(); +// return !(aFmtFldStepHelp.IsModified() && !aCbxAutoStepHelp.IsChecked() && +// !pNumFormatter->IsNumberFormat(aFmtFldStepHelp.GetText(), +// nIndex, fDummy)); +// } +} +*/ + +void SchScaleYAxisTabPage::SetNumFormatter( SvNumberFormatter* pFormatter ) +{ + pNumFormatter = pFormatter; + aFmtFldMax.SetFormatter( pNumFormatter ); + aFmtFldMin.SetFormatter( pNumFormatter ); + aFmtFldStepMain.SetFormatter( pNumFormatter ); +// aFmtFldStepHelp.SetFormatter( pNumFormatter ); + aFmtFldOrigin.SetFormatter( pNumFormatter ); + SetNumFormat(); +} + +void SchScaleYAxisTabPage::SetNumFormat() +{ + const SfxPoolItem *pPoolItem = NULL; + + if( rOutAttrs.GetItemState( SCHATTR_AXIS_NUMFMT, TRUE, &pPoolItem ) == SFX_ITEM_SET ) + { + ULONG nFmt = (ULONG)((const SfxInt32Item*)pPoolItem)->GetValue(); + short eType = pNumFormatter->GetType( nFmt ); + + // change nFmt to an editable format (without loss of information) + if( eType == NUMBERFORMAT_CURRENCY ) // for currencies just display decimals + { + nFmt = pNumFormatter->GetStandardIndex(); + } + else + { + const SvNumberformat* pFormat = pNumFormatter->GetEntry( nFmt ); + if( pFormat ) + { + LanguageType eLanguage = pFormat->GetLanguage(); + nFmt = pNumFormatter->GetStandardFormat( nFmt, eType, eLanguage ); + } + // else: format is 'standard' + } + + aFmtFldMax.SetFormatKey( nFmt ); + aFmtFldMin.SetFormatKey( nFmt ); + aFmtFldOrigin.SetFormatKey( nFmt ); + + // for steps use standard format if date or time format is chosen + if( pNumFormatter && + ( eType == NUMBERFORMAT_DATE || + eType == NUMBERFORMAT_TIME || + eType == NUMBERFORMAT_DATETIME ) ) + { + nFmt = pNumFormatter->GetStandardIndex(); + } + + aFmtFldStepMain.SetFormatKey( nFmt ); +// aFmtFldStepHelp.SetFormatKey( nFmt ); + } +} + +bool SchScaleYAxisTabPage::ShowWarning( USHORT nResIdMessage, Edit * pControl /* = NULL */ ) +{ + if( nResIdMessage == 0 ) + return false; + + WarningBox( this, WinBits( WB_OK ), String( SchResId( nResIdMessage ))).Execute(); + if( pControl ) + { + pControl->GrabFocus(); + pControl->SetSelection( Selection( 0, SELECTION_MAX )); + } + return true; +} + +//............................................................................. +} //namespace chart +//............................................................................. + diff --git a/chart2/source/controller/dialogs/tp_Scale.hxx b/chart2/source/controller/dialogs/tp_Scale.hxx new file mode 100644 index 000000000..4d1eb6599 --- /dev/null +++ b/chart2/source/controller/dialogs/tp_Scale.hxx @@ -0,0 +1,178 @@ +/************************************************************************* + * + * $RCSfile: tp_Scale.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:27 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef _CHART2_TP_SCALES_HXX +#define _CHART2_TP_SCALES_HXX + +// header for SfxTabPage +#ifndef _SFXTABDLG_HXX +#include <sfx2/tabdlg.hxx> +#endif +// header for class FormattedField +#ifndef _FMTFIELD_HXX_ +#include <svtools/fmtfield.hxx> +#endif +// header for FixedText +#ifndef _SV_FIXED_HXX +#include <vcl/fixed.hxx> +#endif +// header for CheckBox +#ifndef _SV_BUTTON_HXX +#include <vcl/button.hxx> +#endif +// header for MetricField +#ifndef _SV_FIELD_HXX +#include <vcl/field.hxx> +#endif +//class SvNumberFormatter; + +//............................................................................. +namespace chart +{ +//............................................................................. + +class SchScaleYAxisTabPage : public SfxTabPage +{ +private: + FixedLine aFlScale; + + FixedText aTxtMin; + FormattedField aFmtFldMin; + CheckBox aCbxAutoMin; + + FixedText aTxtMax; + FormattedField aFmtFldMax; + CheckBox aCbxAutoMax; + + FixedText aTxtMain; + FormattedField aFmtFldStepMain; + CheckBox aCbxAutoStepMain; + + FixedText aTxtHelp; +// FormattedField aFmtFldStepHelp; + MetricField aMtStepHelp; + CheckBox aCbxAutoStepHelp; + + FixedText aTxtOrigin; + FormattedField aFmtFldOrigin; + CheckBox aCbxAutoOrigin; + CheckBox aCbxLogarithm; + + FixedLine aFlTicks; + CheckBox aCbxTicksInner; + CheckBox aCbxTicksOuter; + + FixedLine aFlHelpTicks; + CheckBox aCbxHelpTicksInner; + CheckBox aCbxHelpTicksOuter; + + double fMin; + double fMax; + double fStepMain; +// double fStepHelp; + sal_Int32 nStepHelp; + double fOrigin; + int nAxisType; + const SfxItemSet& rOutAttrs; + SvNumberFormatter* pNumFormatter; + +// BOOL bLastStepMain; + +// bool CheckLogs (); +// void CheckLogControls (); + +// BOOL GetHelpValue (); + + DECL_LINK( EnableValueHdl, CheckBox* ); +// DECL_LINK( HandleLogs, CheckBox * ); + + /** shows a warning window due to an invalid input. + + @param nResIdMessage + The resource identifier that represents the localized warning text. + If this is 0, no warning is shown and false is returned. + + @param pControl + If non-NULL, contains a pointer to the control in which the + errornous value was in. This method gives this control the focus + and selects its content. + + @return false, if nResIdMessage was 0, true otherwise + */ + bool ShowWarning( USHORT nResIdMessage, Edit * pControl = NULL ); + +public: + SchScaleYAxisTabPage( Window* pParent, const SfxItemSet& rInAttrs ); + + static SfxTabPage* Create( Window* pParent, const SfxItemSet& rInAttrs ); + virtual BOOL FillItemSet( SfxItemSet& rOutAttrs ); + virtual void Reset( const SfxItemSet& rInAttrs ); + virtual int DeactivatePage( SfxItemSet* pItemSet = NULL ); + + void SetNumFormatter( SvNumberFormatter* pFormatter ); + void SetNumFormat(); +}; + +//............................................................................. +} //namespace chart +//............................................................................. + +#endif + diff --git a/chart2/source/controller/dialogs/tp_Scale.src b/chart2/source/controller/dialogs/tp_Scale.src new file mode 100644 index 000000000..9177e2a94 --- /dev/null +++ b/chart2/source/controller/dialogs/tp_Scale.src @@ -0,0 +1,806 @@ +/************************************************************************* + * + * $RCSfile: tp_Scale.src,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:27 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "HelpIds.hrc" +#include "TabPages.hrc" + +TabPage TP_SCALE_Y +{ + Hide = TRUE ; + HelpID = HID_SCH_SCALE_Y ; + SVLook = TRUE ; + Size = MAP_APPFONT ( 260 , 185 ) ; + + FixedLine FL_SCALE_Y + { + Pos = MAP_APPFONT ( 5 , 4 ) ; + Size = MAP_APPFONT ( 248 , 8 ) ; + Text = "Achsenskalierung" ; + Text[ ENGLISH ] = "Scaling Axis" ; + Text[ norwegian ] = "Scaling Axis" ; + Text[ italian ] = "Scala degli assi" ; + Text[ portuguese_brazilian ] = "Escalonar eixos" ; + Text[ portuguese ] = "Escala de eixos" ; + Text[ finnish ] = "Skaalaa akselit" ; + Text[ danish ] = "Akseskalering" ; + Text[ french ] = "chelle de l'axe" ; + Text[ swedish ] = "Axelskalning" ; + Text[ dutch ] = "As-schaalverdeling" ; + Text[ spanish ] = "Escala de los ejes" ; + Text[ english_us ] = "Scale axes" ; + Text[ chinese_simplified ] = "轴的刻度显示"; + Text[ russian ] = " "; + Text[ polish ] = "Skaluj osie"; + Text[ japanese ] = "軸の目盛"; + Text[ chinese_traditional ] = "軸的顯示比例"; + Text[ arabic ] = " "; + Text[ dutch ] = "As-schaalverdeling"; + Text[ chinese_simplified ] = "轴的刻度显示"; + Text[ greek ] = " "; + Text[ korean ] = "축 배율 조정"; + Text[ turkish ] = "Eksenleri lekle"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "Mida dels eixos"; + Text[ thai ] = "สเกลแกน"; + Text[ czech ] = "Měřítka os"; + Text[ hebrew ] = "Achsenskalierung"; + Text[ hindi ] = "अक्षों को स्केल करो"; + Text[ slovak ] = "Upraviť stupnicu osí"; + }; + FixedText TXT_MIN + { + Pos = MAP_APPFONT ( 11 , 16 ) ; + Size = MAP_APPFONT ( 88 , 8 ) ; + Text = "~Minimum:" ; + Text [ ENGLISH ] = "Min:" ; + Text [ dutch ] = "~Minimum:" ; + Text [ english_us ] = "~Minimum:" ; + Text [ italian ] = "~Minimo:" ; + Text [ spanish ] = "M~nimo:" ; + Text [ french ] = "M~inimum :" ; + Text [ swedish ] = "~Minimum:" ; + Text [ danish ] = "~Minimum:" ; + Text [ portuguese_brazilian ] = "~Mnimo:" ; + Text [ portuguese ] = "~Mnimo:" ; + Text[ chinese_simplified ] = "最小值(~M):"; + Text[ russian ] = ":"; + Text[ polish ] = "~Minimum:"; + Text[ japanese ] = "最小値(~M):"; + Text[ chinese_traditional ] = "最小值(~M):"; + Text[ arabic ] = " :"; + Text[ dutch ] = "~Minimum:"; + Text[ chinese_simplified ] = "最小值(~M):"; + Text[ greek ] = "~:"; + Text[ korean ] = "최소(~M):"; + Text[ turkish ] = "~Minimum:"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "M~nim:"; + Text[ finnish ] = "~Vhintn:"; + Text[ thai ] = "~น้อยที่สุด:"; + Text[ czech ] = "Minimum:"; + Text[ hebrew ] = "~Minimum:"; + Text[ hindi ] = "~न्यूनतम:"; + Text[ slovak ] = "~Minimum:"; + }; + SpinField EDT_MIN + { + Border = TRUE ; + SVLook = TRUE ; + Pos = MAP_APPFONT ( 103 , 14 ) ; + Size = MAP_APPFONT ( 50 , 12 ) ; + TabStop = TRUE ; + }; + CheckBox CBX_AUTO_MIN + { + Pos = MAP_APPFONT ( 159 , 15 ) ; + Size = MAP_APPFONT ( 88 , 10 ) ; + Text = "~Automatisch" ; + Text [ ENGLISH ] = "~Auto" ; + TabStop = TRUE ; + Text [ dutch ] = "A~utomatisch" ; + Text [ english_us ] = "Automatic" ; + Text [ italian ] = "Automatico" ; + Text [ spanish ] = "Automtico" ; + Text [ french ] = "Automatique" ; + Text [ swedish ] = "~Automatiskt" ; + Text [ danish ] = "~Automatisk" ; + Text [ portuguese_brazilian ] = "Automtico" ; + Text [ portuguese ] = "~Automtico" ; + Text[ chinese_simplified ] = "自动"; + Text[ russian ] = "~"; + Text[ polish ] = "Automatycznie"; + Text[ japanese ] = "自動"; + Text[ chinese_traditional ] = "自動"; + Text[ arabic ] = ""; + Text[ dutch ] = "A~utomatisch"; + Text[ chinese_simplified ] = "自动"; + Text[ greek ] = "~"; + Text[ korean ] = "자동"; + Text[ turkish ] = "~Otomatik"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "Automtic"; + Text[ finnish ] = "Automaattinen"; + Text[ thai ] = "อัตโนมัติ"; + Text[ czech ] = "Automaticky"; + Text[ hebrew ] = "אוטומטי"; + Text[ hindi ] = "स्वचालित"; + Text[ slovak ] = "Automaticky"; + }; + + FixedText TXT_MAX + { + Pos = MAP_APPFONT ( 11 , 32 ) ; + Size = MAP_APPFONT ( 88 , 8 ) ; + Text = "Ma~ximum:" ; + Text [ ENGLISH ] = "Max:" ; + Text [ dutch ] = "Ma~ximum:" ; + Text [ english_us ] = "Ma~ximum:" ; + Text [ italian ] = "Massimo:" ; + Text [ spanish ] = "M~ximo:" ; + Text [ french ] = "M~aximum :" ; + Text [ swedish ] = "Ma~ximum:" ; + Text [ danish ] = "Maksimum:" ; + Text [ portuguese ] = "M~ximo:" ; + Text [ portuguese_brazilian ] = "M~ximo:" ; + Text[ chinese_simplified ] = "最大值(~X):"; + Text[ russian ] = ":"; + Text[ polish ] = "Ma~ksimum:"; + Text[ japanese ] = "最大値(~X):"; + Text[ chinese_traditional ] = "最大值(~X):"; + Text[ arabic ] = " :"; + Text[ dutch ] = "Ma~ximum:"; + Text[ chinese_simplified ] = "最大值(~X):"; + Text[ greek ] = "~:"; + Text[ korean ] = "최대(~X):"; + Text[ turkish ] = "Ma~ksimum:"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "M~xim:"; + Text[ finnish ] = "E~nintn:"; + Text[ thai ] = "มา~กที่สุด:"; + Text[ czech ] = "Maximum:"; + Text[ hebrew ] = "Ma~ximum:"; + Text[ hindi ] = "अधि~कतम:"; + Text[ slovak ] = "Ma~ximum:"; + }; + SpinField EDT_MAX + { + Border = TRUE ; + SVLook = TRUE ; + Pos = MAP_APPFONT ( 103 , 30 ) ; + Size = MAP_APPFONT ( 50 , 12 ) ; + TabStop = TRUE ; + }; + CheckBox CBX_AUTO_MAX + { + Pos = MAP_APPFONT ( 159 , 31 ) ; + Size = MAP_APPFONT ( 88 , 10 ) ; + Text = "A~utomatisch" ; + Text [ ENGLISH ] = "~Auto" ; + TabStop = TRUE ; + Text [ dutch ] = "~Automatisch" ; + Text [ english_us ] = "Automatic" ; + Text [ italian ] = "A~utomatico" ; + Text [ spanish ] = "Automtico" ; + Text [ french ] = "Automatique" ; + Text [ swedish ] = "A~utomatiskt" ; + Text [ danish ] = "A~utomatisk" ; + Text [ portuguese ] = "~Automtico" ; + Text [ portuguese_brazilian ] = "Automtico" ; + Text[ chinese_simplified ] = "自动"; + Text[ russian ] = "~"; + Text[ polish ] = "Automatycznie"; + Text[ japanese ] = "自動"; + Text[ chinese_traditional ] = "自動"; + Text[ arabic ] = ""; + Text[ dutch ] = "~Automatisch"; + Text[ chinese_simplified ] = "自动"; + Text[ greek ] = "~"; + Text[ korean ] = "자동"; + Text[ turkish ] = "O~tomatik"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "Automtic"; + Text[ finnish ] = "Automaattinen"; + Text[ thai ] = "อัตโนมัติ"; + Text[ czech ] = "Automaticky"; + Text[ hebrew ] = "אוטומטי"; + Text[ hindi ] = "स्वचालित"; + Text[ slovak ] = "Automaticky"; + }; + + FixedText TXT_STEP_MAIN + { + Pos = MAP_APPFONT ( 11 , 48 ) ; + Size = MAP_APPFONT ( 88 , 8 ) ; + Text = "Hau~ptintervall:" ; + Text [ ENGLISH ] = "Ma~in Interval:" ; + Text [ english_us ] = "Major ~interval:" ; + Text [ italian ] = "Interv. ~princip." ; + Text [ spanish ] = "Intervalo prin~cipal:" ; + Text [ french ] = "Intervalle ~principal :" ; + Text [ dutch ] = "Hoo~fdinterval:" ; + Text [ swedish ] = "Huvudintervall:" ; + Text [ danish ] = "Overinterval:" ; + Text [ portuguese_brazilian ] = "Intervalo ~Principal:" ; + Text [ portuguese ] = "Intervalo ~principal:" ; + Text[ chinese_simplified ] = "主区间值(~I):"; + Text[ russian ] = " :"; + Text[ polish ] = "Przedz~ia g.:"; + Text[ japanese ] = "主間隔(~I):"; + Text[ chinese_traditional ] = "主區間值(~I):"; + Text[ arabic ] = " :"; + Text[ dutch ] = "Hoo~fdinterval:"; + Text[ chinese_simplified ] = "主区间值(~I):"; + Text[ greek ] = " ~:"; + Text[ korean ] = "주 간격(~I):"; + Text[ turkish ] = "Ana A~ralk:"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "~Interval principal"; + Text[ finnish ] = "P~vli:"; + Text[ thai ] = "~ช่วงหลัก:"; + Text[ czech ] = "Hlavní interval"; + Text[ hebrew ] = "Hau~ptintervall:"; + Text[ hindi ] = "प्रधान ~अंतराल:"; + Text[ slovak ] = "Väčší ~interval:"; + }; + SpinField EDT_STEP_MAIN + { + Border = TRUE ; + Pos = MAP_APPFONT ( 103 , 46 ) ; + Size = MAP_APPFONT ( 50 , 12 ) ; + TabStop = TRUE ; + }; + CheckBox CBX_AUTO_STEP_MAIN + { + Pos = MAP_APPFONT ( 159 , 47 ) ; + Size = MAP_APPFONT ( 88 , 10 ) ; + Text = "Au~tomatisch" ; + Text [ ENGLISH ] = "~Auto" ; + TabStop = TRUE ; + Text [ english_us ] = "Automatic" ; + Text [ italian ] = "Au~tomatico" ; + Text [ spanish ] = "Automtico" ; + Text [ french ] = "Automatique" ; + Text [ dutch ] = "A~utomatisch" ; + Text [ swedish ] = "Au~tomatiskt" ; + Text [ danish ] = "Au~tomatisk" ; + Text [ portuguese_brazilian ] = "Automtico" ; + Text [ portuguese ] = "~Automtico" ; + Text[ chinese_simplified ] = "自动"; + Text[ russian ] = "~"; + Text[ polish ] = "Automatycznie"; + Text[ japanese ] = "自動"; + Text[ chinese_traditional ] = "自動"; + Text[ arabic ] = ""; + Text[ dutch ] = "A~utomatisch"; + Text[ chinese_simplified ] = "自动"; + Text[ greek ] = "~"; + Text[ korean ] = "자동"; + Text[ turkish ] = "Oto~matik"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "Automtic"; + Text[ finnish ] = "Automaattinen"; + Text[ thai ] = "อัตโนมัติ"; + Text[ czech ] = "Automaticky"; + Text[ hebrew ] = "אוטומטי"; + Text[ hindi ] = "स्वचालित"; + Text[ slovak ] = "Automaticky"; + }; + + FixedText TXT_STEP_HELP + { + Pos = MAP_APPFONT ( 11 , 64 ) ; + Size = MAP_APPFONT ( 88 , 8 ) ; + Text = "Teilinte~rvall:" ; + Text [ ENGLISH ] = "~Help Interval:" ; + Text [ dutch ] = "~Hulpinterval" ; + Text [ english_us ] = "Mi~nor interval:" ; + Text [ italian ] = "Interv. ausil." ; + Text [ spanish ] = "Intervalo a~uxiliar:" ; + Text [ french ] = "Intervalle secondaire :" ; + Text [ swedish ] = "Delintervall:" ; + Text [ danish ] = "Underinterval:" ; + Text [ portuguese_brazilian ] = "~Intervalo auxiliar:" ; + Text [ portuguese ] = "~Intervalo auxiliar:" ; + Text[ chinese_simplified ] = "次区间值(~N):"; + Text[ russian ] = " :"; + Text[ polish ] = "Przedzia pomocn.:"; + Text[ japanese ] = "補助間隔(~N):"; + Text[ chinese_traditional ] = "次區間值(~N):"; + Text[ arabic ] = " :"; + Text[ dutch ] = "~Hulpinterval"; + Text[ chinese_simplified ] = "次区间值(~N):"; + Text[ greek ] = "~. :"; + Text[ korean ] = "보조 간격(~N):"; + Text[ turkish ] = "K~k aralk"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "Interval secu~ndari:"; + Text[ finnish ] = "Pie~ni vli:"; + Text[ thai ] = "ช่วงร~อง:"; + Text[ czech ] = "Vedlejší interval:"; + Text[ hebrew ] = "Teilinte~rvall:"; + Text[ hindi ] = "छो~टा अंतराल:"; + Text[ slovak ] = "Me~nší interval:"; + }; +// SpinField EDT_STEP_HELP +// { +// Border = TRUE ; +// SVLook = TRUE ; +// Pos = MAP_APPFONT ( 103 , 62 ) ; +// Size = MAP_APPFONT ( 50 , 12 ) ; +// TabStop = TRUE ; +// }; + MetricField MT_STEPHELP + { + Border = TRUE ; + Pos = MAP_APPFONT ( 103 , 62 ) ; + Size = MAP_APPFONT ( 50 , 12 ) ; + TabStop = TRUE ; + Repeat = TRUE ; + Spin = TRUE ; + Minimum = 1 ; + Maximum = 100 ; + StrictFormat = TRUE ; + Unit = FUNIT_CUSTOM ; + First = 1 ; + Last = 100 ; + SpinSize = 1 ; + }; + CheckBox CBX_AUTO_STEP_HELP + { + Pos = MAP_APPFONT ( 159 , 63 ) ; + Size = MAP_APPFONT ( 88 , 10 ) ; + Text = "Aut~omatisch" ; + Text [ ENGLISH ] = "~Auto" ; + TabStop = TRUE ; + Text [ dutch ] = "A~utomatisch" ; + Text [ english_us ] = "Automatic" ; + Text [ italian ] = "Aut~omatico" ; + Text [ spanish ] = "Automtico" ; + Text [ french ] = "Automatique" ; + Text [ swedish ] = "Aut~omatiskt" ; + Text [ danish ] = "Aut~omatisk" ; + Text [ portuguese_brazilian ] = "Automtico" ; + Text [ portuguese ] = "~Automtico" ; + Text[ chinese_simplified ] = "自动"; + Text[ russian ] = "~"; + Text[ polish ] = "Automatycznie"; + Text[ japanese ] = "自動"; + Text[ chinese_traditional ] = "自動"; + Text[ arabic ] = ""; + Text[ dutch ] = "A~utomatisch"; + Text[ chinese_simplified ] = "自动"; + Text[ greek ] = ""; + Text[ korean ] = "자동"; + Text[ turkish ] = "Otomat~ik"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "Automtic"; + Text[ finnish ] = "Automaattinen"; + Text[ thai ] = "อัตโนมัติ"; + Text[ czech ] = "Automaticky"; + Text[ hebrew ] = "אוטומטי"; + Text[ hindi ] = "स्वचालित"; + Text[ slovak ] = "Automaticky"; + }; + + FixedText TXT_ORIGIN + { + Pos = MAP_APPFONT ( 11 , 80 ) ; + Size = MAP_APPFONT ( 88 , 8 ) ; + Text = "A~chse bei:" ; + Text [ ENGLISH ] = "~Axis at:" ; + Text [ dutch ] = "~As op:" ; + Text [ english_us ] = "~Axis at:" ; + Text [ italian ] = "Asse a:" ; + Text [ spanish ] = "~Eje en:" ; + Text [ french ] = "A~xe :" ; + Text [ swedish ] = "A~xel vid:" ; + Text [ danish ] = "Akse ved:" ; + Text [ portuguese_brazilian ] = "~Eixo em:" ; + Text [ portuguese ] = "~Eixo em:" ; + Text[ chinese_simplified ] = "轴位置(~A):"; + Text[ russian ] = "~ :"; + Text[ polish ] = "~O przy:"; + Text[ japanese ] = "基準線(~A):"; + Text[ chinese_traditional ] = "軸位置(~A):"; + Text[ arabic ] = " :"; + Text[ dutch ] = "~As op:"; + Text[ chinese_simplified ] = "轴位置(~A):"; + Text[ greek ] = "~ :"; + Text[ korean ] = "축의 기준(~A):"; + Text[ turkish ] = "E~ksen deeri:"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "~Eix a:"; + Text[ finnish ] = "~Akseli:"; + Text[ thai ] = "แ~กนที่:"; + Text[ czech ] = "Osa na:"; + Text[ hebrew ] = "A~chse bei:"; + Text[ hindi ] = "में ~अक्ष:"; + Text[ slovak ] = "Osi s~a pretínajú v:"; + }; + SpinField EDT_ORIGIN + { + Border = TRUE ; + SVLook = TRUE ; + Pos = MAP_APPFONT ( 103 , 78 ) ; + Size = MAP_APPFONT ( 50 , 12 ) ; + TabStop = TRUE ; + }; + CheckBox CBX_AUTO_ORIGIN + { + Pos = MAP_APPFONT ( 159 , 79 ) ; + Size = MAP_APPFONT ( 88 , 10 ) ; + Text = "Automati~sch" ; + Text [ ENGLISH ] = "~Auto" ; + TabStop = TRUE ; + Text [ dutch ] = "A~utomatisch" ; + Text [ english_us ] = "Automatic" ; + Text [ italian ] = "Automatico" ; + Text [ spanish ] = "Automtico" ; + Text [ french ] = "Automatique" ; + Text [ swedish ] = "Automati~skt" ; + Text [ danish ] = "Automati~sk" ; + Text [ portuguese_brazilian ] = "Automtico" ; + Text [ portuguese ] = "~Automtico" ; + Text[ chinese_simplified ] = "自动"; + Text[ russian ] = ""; + Text[ polish ] = "Automatycznie"; + Text[ japanese ] = "自動"; + Text[ chinese_traditional ] = "自動"; + Text[ arabic ] = ""; + Text[ dutch ] = "A~utomatisch"; + Text[ chinese_simplified ] = "自动"; + Text[ greek ] = ""; + Text[ korean ] = "자동"; + Text[ turkish ] = "Otomatik"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "Automtic"; + Text[ finnish ] = "Automaattinen"; + Text[ thai ] = "อัตโนมัติ"; + Text[ czech ] = "Automaticky"; + Text[ hebrew ] = "אוטומטי"; + Text[ hindi ] = "स्वचालित"; + Text[ slovak ] = "Automaticky"; + }; + + CheckBox CBX_LOGARITHM + { + Pos = MAP_APPFONT ( 11 , 97 ) ; + Size = MAP_APPFONT ( 236 , 10 ) ; + Text = "~Logarithmische Skalierung" ; + Text [ ENGLISH ] = "~Logarithmic Scaling:" ; + Text [ norwegian ] = "~Logarithmic Scaling:" ; + Text [ italian ] = "Scala ~logaritmica:" ; + Text [ portuguese_brazilian ] = "Escala ~logartmica" ; + Text [ portuguese ] = "Escala de ~logoritmos:" ; + Text [ finnish ] = "Logaritmia~steikko" ; + Text [ danish ] = "~Logaritmisk skalering" ; + Text [ french ] = "~chelle logarithmique" ; + Text [ swedish ] = "~Logaritmisk skalning" ; + Text [ dutch ] = "~Logaritmische schaalverdeling" ; + Text [ spanish ] = "~Escala logartmica" ; + Text [ english_us ] = "Logarithmic ~scale" ; + TabStop = TRUE ; + Text[ chinese_simplified ] = "对数型刻度显示(~S)"; + Text[ russian ] = " "; + Text[ polish ] = "~Skala logarytmiczna"; + Text[ japanese ] = "対数目盛(~S)"; + Text[ chinese_traditional ] = "對數的顯示比例(~S)"; + Text[ arabic ] = " "; + Text[ dutch ] = "~Logaritmische schaalverdeling"; + Text[ chinese_simplified ] = "对数型刻度显示(~S)"; + Text[ greek ] = "~ "; + Text[ korean ] = "대수적 확대(~S)"; + Text[ turkish ] = "~Logaritmik leklendirme"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "Escalat logartmic"; + Text[ thai ] = "~สเกลแบบลอการิธึม"; + Text[ czech ] = "Logaritmické měřítko"; + Text[ hebrew ] = "~Logarithmische Skalierung"; + Text[ hindi ] = "लघुगणकविधि ~स्केल"; + Text[ slovak ] = "~Logaritmická stupnica"; + }; + + FixedLine FL_TICKS + { + Pos = MAP_APPFONT ( 6 , 116 ) ; + Size = MAP_APPFONT ( 248 , 8 ) ; + Text = "Marken fr Hauptintervalle" ; + Text[ ENGLISH ] = "tick marks" ; + Text[ english_us ] = "Major interval marks"; + Text[ portuguese ] = "Marcas de eixos"; + Text[ russian ] = " "; + Text[ dutch ] = "Asmarkeringen"; + Text[ french ] = "Marques pour l'intervalle principal"; + Text[ spanish ] = "Marcas para el intervalo principal"; + Text[ italian ] = "Contrassegni degli intervalli principali"; + Text[ danish ] = "Aksemarkeringer"; + Text[ swedish ] = "Markeringar fr huvudintervall"; + Text[ polish ] = "Znaczniki osi"; + Text[ portuguese_brazilian ] = "Marcas nos eixos"; + Text[ japanese ] = "軸の区切り"; + Text[ chinese_simplified ] = "主区间值的标记"; + Text[ chinese_traditional ] = "主區間值標記"; + Text[ arabic ] = " "; + Text[ dutch ] = "Asmarkeringen"; + Text[ chinese_simplified ] = "主区间值的标记"; + Text[ greek ] = " "; + Text[ korean ] = "주 간격 표시"; + Text[ turkish ] = "Byk aralk iaretleri"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "Marques d'eix"; + Text[ finnish ] = "Akselimerkit"; + Text[ thai ] = "เครื่องหมายแกน"; + Text[ czech ] = "Značky na osách"; + Text[ hebrew ] = "Marken für Hauptintervalle"; + Text[ hindi ] = "अक्ष संकेत"; + Text[ slovak ] = "Značky na osi"; + }; + + CheckBox CBX_TICKS_INNER + { + Pos = MAP_APPFONT ( 11 , 127 ) ; + Size = MAP_APPFONT ( 78 , 10 ) ; + Text = "~innen"; + Text[ ENGLISH ] = "~inner"; + Text[ english_us ] = "inn~er"; + Text[ portuguese ] = "~interior"; + Text[ russian ] = "~"; + Text[ dutch ] = "~binnenste"; + Text[ french ] = "~Intrieur"; + Text[ spanish ] = "~interior"; + Text[ italian ] = "~Interno"; + Text[ danish ] = "indre"; + Text[ swedish ] = "~inre"; + Text[ polish ] = "wewntrz"; + Text[ portuguese_brazilian ] = "~interior"; + Text[ japanese ] = "内側(~E)"; + Text[ chinese_simplified ] = "内(~E)"; + Text[ chinese_traditional ] = "內(~E)"; + Text[ arabic ] = ""; + Text[ dutch ] = "~binnenste"; + Text[ chinese_simplified ] = "内(~E)"; + Text[ greek ] = "~"; + Text[ korean ] = "내부(~E)"; + Text[ turkish ] = "~ierde"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "int~erior"; + Text[ finnish ] = "si~sempi"; + Text[ thai ] = "ภายใ~น"; + Text[ czech ] = "vnitřní"; + Text[ hebrew ] = "~innen"; + Text[ hindi ] = "भीत~री"; + Text[ slovak ] = "~vnútorné"; + }; + CheckBox CBX_TICKS_OUTER + { + Pos = MAP_APPFONT ( 93 , 127 ) ; + Size = MAP_APPFONT ( 78 , 10 ) ; + Text = "au~en"; + Text[ ENGLISH ] = "~outer"; + Text[ english_us ] = "~outer"; + Text[ portuguese ] = "~exterior"; + Text[ russian ] = ""; + Text[ dutch ] = "~buitenste"; + Text[ french ] = "~Extrieur"; + Text[ spanish ] = "~exterior"; + Text[ italian ] = "Esterno"; + Text[ danish ] = "ydre"; + Text[ swedish ] = "~yttre"; + Text[ polish ] = "~na zewntrz"; + Text[ portuguese_brazilian ] = "~exterior"; + Text[ japanese ] = "外側(~O)"; + Text[ chinese_simplified ] = "外(~O)"; + Text[ chinese_traditional ] = "外(~O)"; + Text[ arabic ] = ""; + Text[ dutch ] = "~buitenste"; + Text[ chinese_simplified ] = "外(~O)"; + Text[ greek ] = "~"; + Text[ korean ] = "외부(~O)"; + Text[ turkish ] = "d~arda"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "exteri~or"; + Text[ finnish ] = "~ulompi"; + Text[ thai ] = "~ภายนอก"; + Text[ czech ] = "vnější"; + Text[ hebrew ] = "au~ßen"; + Text[ hindi ] = "~बाहरी"; + Text[ slovak ] = "v~onkajšie"; + }; + + FixedLine FL_HELPTICKS + { + Pos = MAP_APPFONT ( 6 , 149 ) ; + Size = MAP_APPFONT ( 248 , 8 ) ; + Text = "Marken fr Teilintervalle" ; + Text[ ENGLISH ] = "tick marks" ; + Text[ english_us ] = "Minor interval marks"; + Text[ portuguese ] = "Marcas auxiliares"; + Text[ russian ] = " "; + Text[ dutch ] = "Hulpmarkeringen"; + Text[ french ] = "Marques pour l'intervalle secondaire"; + Text[ spanish ] = "Marcas para el intervalo auxiliar"; + Text[ italian ] = "Contrassegni per intervalli ausiliari"; + Text[ danish ] = "Hjlpemarkeringer"; + Text[ swedish ] = "Markeringar fr delintervall"; + Text[ polish ] = "Znaczniki podziaki"; + Text[ portuguese_brazilian ] = "Marcas auxiliares"; + Text[ japanese ] = "補助区切り"; + Text[ chinese_simplified ] = "次区间值的标记"; + Text[ chinese_traditional ] = "次區間值標記"; + Text[ arabic ] = " "; + Text[ dutch ] = "Hulpmarkeringen"; + Text[ chinese_simplified ] = "次区间值的标记"; + Text[ greek ] = " "; + Text[ korean ] = "보조 선택 표시"; + Text[ turkish ] = "Kk aralk iaretleri"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "Marques auxiliars"; + Text[ finnish ] = "Jakoviivat"; + Text[ thai ] = "เครื่องหมายขีด"; + Text[ czech ] = "Stupnice"; + Text[ hebrew ] = "Marken für Teilintervalle"; + Text[ hindi ] = "टिक् मार्क"; + Text[ slovak ] = "Stupnica"; + }; + + CheckBox CBX_HELPTICKS_INNER + { + Pos = MAP_APPFONT ( 11 , 160 ); + Size = MAP_APPFONT ( 78 , 10 ) ; + Text = "inn~en"; + Text[ ENGLISH ] = "i~nner"; + Text[ english_us ] = "i~nner"; + Text[ portuguese ] = "i~nterior"; + Text[ russian ] = ""; + Text[ dutch ] = "bi~nnenste"; + Text[ french ] = "~Intrieur"; + Text[ spanish ] = "i~nterior"; + Text[ italian ] = "Int~erno"; + Text[ danish ] = "indre"; + Text[ swedish ] = "inr~e"; + Text[ polish ] = "~wewntrz"; + Text[ portuguese_brazilian ] = "i~nterior"; + Text[ japanese ] = "内側(~N)"; + Text[ chinese_simplified ] = "内(~N)"; + Text[ chinese_traditional ] = "內(~N)"; + Text[ arabic ] = ""; + Text[ dutch ] = "bi~nnenste"; + Text[ chinese_simplified ] = "内(~N)"; + Text[ greek ] = "~"; + Text[ korean ] = "내부(~N)"; + Text[ turkish ] = "ie~rde"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "i~nterior"; + Text[ finnish ] = "s~isempi"; + Text[ thai ] = "ภา~ยใน"; + Text[ czech ] = "vnitřní"; + Text[ hebrew ] = "inn~en"; + Text[ hindi ] = "भी~तरी"; + Text[ slovak ] = "vnú~torná"; + }; + CheckBox CBX_HELPTICKS_OUTER + { + Pos = MAP_APPFONT ( 93 , 160 ) ; + Size = MAP_APPFONT ( 78 , 10 ) ; + Text = "aue~n"; + Text[ ENGLISH ] = "o~uter"; + Text[ english_us ] = "o~uter"; + Text[ portuguese ] = "e~xterior"; + Text[ russian ] = ""; + Text[ dutch ] = "bu~itenste"; + Text[ french ] = "~Extrieur"; + Text[ spanish ] = "e~xterior"; + Text[ italian ] = "Ester~no"; + Text[ danish ] = "ydre"; + Text[ swedish ] = "ytt~re"; + Text[ polish ] = "na zewntrz"; + Text[ portuguese_brazilian ] = "e~xterior"; + Text[ japanese ] = "外側(~U)"; + Text[ chinese_simplified ] = "外(~U)"; + Text[ chinese_traditional ] = "外(~U)"; + Text[ arabic ] = ""; + Text[ dutch ] = "bu~itenste"; + Text[ chinese_simplified ] = "外(~U)"; + Text[ greek ] = "~"; + Text[ korean ] = "외부(~U)"; + Text[ turkish ] = "d~arda"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "e~xterior"; + Text[ finnish ] = "u~lompi"; + Text[ thai ] = "ภายน~อก"; + Text[ czech ] = "vnější"; + Text[ hebrew ] = "auße~n"; + Text[ hindi ] = "बा~हरी"; + Text[ slovak ] = "von~kajšia"; + }; +}; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx b/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx new file mode 100644 index 000000000..ab74231b2 --- /dev/null +++ b/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx @@ -0,0 +1,213 @@ +/************************************************************************* + * + * $RCSfile: tp_SeriesToAxis.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:27 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "tp_SeriesToAxis.hxx" + +#include "ResId.hxx" +#include "TabPages.hrc" +#include "SchSfxItemIds.hxx" + +// header for class SfxBoolItem +#ifndef _SFXENUMITEM_HXX +#include <svtools/eitem.hxx> +#endif +// header for SfxInt32Item +#ifndef _SFXINTITEM_HXX +#include <svtools/intitem.hxx> +#endif + + +/* +#include "schattr.hxx" +#include "schresid.hxx" +#include "chtmodel.hxx" +#include "attrib.hxx" +#include "attrib.hrc" + +#ifndef _SVX_SVXIDS_HRC //autogen +#include <svx/svxids.hrc> +#endif +*/ + +//............................................................................. +namespace chart +{ +//............................................................................. + +SchOptionTabPage::SchOptionTabPage(Window* pWindow,const SfxItemSet& rInAttrs) : + SfxTabPage(pWindow, SchResId(TP_OPTIONS), rInAttrs), + aGrpAxis(this, ResId(GRP_OPT_AXIS)), + aGrpBar(this, ResId(GB_BAR)), + aRbtAxis1(this,ResId(RBT_OPT_AXIS_1)), + aRbtAxis2(this,ResId(RBT_OPT_AXIS_2)), + aMTOverlap(this,ResId(MT_OVERLAP)), + aMTGap(this,ResId(MT_GAP)), + aFTOverlap(this,ResId(FT_OVERLAP)), + aFTGap(this,ResId(FT_GAP)), + aCBConnect(this,ResId(CB_CONNECTOR)), + rOutAttrs(rInAttrs) +{ + FreeResource(); + +} +/************************************************************************* +|* +|* Dtor +|* +\************************************************************************/ + +SchOptionTabPage::~SchOptionTabPage() +{ +} + +/************************************************************************* +|* +|* Erzeugung +|* +\*************************************************************************/ + +SfxTabPage* SchOptionTabPage::Create(Window* pWindow,const SfxItemSet& rOutAttrs) +{ + return new SchOptionTabPage(pWindow, rOutAttrs); +} + +/************************************************************************* +|* +|* Fuellt uebergebenen Item-Set mit Dialogbox-Attributen +|* +\*************************************************************************/ +BOOL SchOptionTabPage::FillItemSet(SfxItemSet& rOutAttrs) +{ + if(aRbtAxis2.IsChecked()) + rOutAttrs.Put(SfxInt32Item(SCHATTR_AXIS,CHART_AXIS_SECONDARY_Y)); + else + rOutAttrs.Put(SfxInt32Item(SCHATTR_AXIS,CHART_AXIS_PRIMARY_Y)); + + if(aMTGap.IsVisible()) + rOutAttrs.Put(SfxInt32Item(CHATTR_DIAGRAM_GAPWIDTH,aMTGap.GetValue())); + + if(aMTOverlap.IsVisible()) + rOutAttrs.Put(SfxInt32Item(CHATTR_DIAGRAM_OVERLAP,aMTOverlap.GetValue())); + + if(aCBConnect.IsVisible()) + rOutAttrs.Put(SfxBoolItem(CHATTR_BARCONNECT,aCBConnect.IsChecked())); + + return TRUE; +} +/************************************************************************* +|* +|* Initialisierung +|* +\*************************************************************************/ + +void SchOptionTabPage::Reset(const SfxItemSet& rInAttrs) +{ + const SfxPoolItem *pPoolItem = NULL; + + aRbtAxis1.Check(TRUE); + aRbtAxis2.Check(FALSE); + if (rInAttrs.GetItemState(SCHATTR_AXIS,TRUE, &pPoolItem) == SFX_ITEM_SET) + { + long nVal=((const SfxInt32Item*)pPoolItem)->GetValue(); + if(nVal==CHART_AXIS_SECONDARY_Y) + { + aRbtAxis2.Check(TRUE); + aRbtAxis1.Check(FALSE); + } + } + + long nTmp; + if (rInAttrs.GetItemState(CHATTR_DIAGRAM_GAPWIDTH, TRUE, &pPoolItem) == SFX_ITEM_SET) + { + nTmp = (long)((const SfxInt32Item*)pPoolItem)->GetValue(); + aMTGap.SetValue(nTmp); + } + else + { + aMTGap.Show(FALSE); + aFTGap.Show(FALSE); + } + + if (rInAttrs.GetItemState(CHATTR_DIAGRAM_OVERLAP, TRUE, &pPoolItem) == SFX_ITEM_SET) + { + nTmp = (long)((const SfxInt32Item*)pPoolItem)->GetValue(); + aMTOverlap.SetValue(nTmp); + } + else + { + aMTOverlap.Show(FALSE); + aFTOverlap.Show(FALSE); + } + if (rInAttrs.GetItemState(CHATTR_BARCONNECT, TRUE, &pPoolItem) == SFX_ITEM_SET) + { + nTmp = (long)((const SfxInt32Item*)pPoolItem)->GetValue(); + aCBConnect.Check(nTmp); + } + else + { + aCBConnect.Show(FALSE); + } + + +} + +//............................................................................. +} //namespace chart +//............................................................................. diff --git a/chart2/source/controller/dialogs/tp_SeriesToAxis.hxx b/chart2/source/controller/dialogs/tp_SeriesToAxis.hxx new file mode 100644 index 000000000..99c570777 --- /dev/null +++ b/chart2/source/controller/dialogs/tp_SeriesToAxis.hxx @@ -0,0 +1,115 @@ +/************************************************************************* + * + * $RCSfile: tp_SeriesToAxis.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:27 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef _CHART2_TP_SERIESTOAXIS_HXX +#define _CHART2_TP_SERIESTOAXIS_HXX + +// header for SfxTabPage +#ifndef _SFXTABDLG_HXX +#include <sfx2/tabdlg.hxx> +#endif +// header for FixedText +#ifndef _SV_FIXED_HXX +#include <vcl/fixed.hxx> +#endif +// header for CheckBox +#ifndef _SV_BUTTON_HXX +#include <vcl/button.hxx> +#endif +// header for MetricField +#ifndef _SV_FIELD_HXX +#include <vcl/field.hxx> +#endif + +//............................................................................. +namespace chart +{ +//............................................................................. + +class SchOptionTabPage : public SfxTabPage +{ +private: + FixedLine aGrpAxis; + RadioButton aRbtAxis1; + RadioButton aRbtAxis2; + + FixedLine aGrpBar; + FixedText aFTGap; + MetricField aMTGap; + FixedText aFTOverlap; + MetricField aMTOverlap; + CheckBox aCBConnect; + + const SfxItemSet& rOutAttrs; +public: + SchOptionTabPage(Window* pParent, const SfxItemSet& rInAttrs); + virtual ~SchOptionTabPage(); + + static SfxTabPage* Create(Window* pParent, const SfxItemSet& rInAttrs); + virtual BOOL FillItemSet(SfxItemSet& rOutAttrs); + virtual void Reset(const SfxItemSet& rInAttrs); +}; + +//............................................................................. +} //namespace chart +//............................................................................. + +#endif + diff --git a/chart2/source/controller/dialogs/tp_SeriesToAxis.src b/chart2/source/controller/dialogs/tp_SeriesToAxis.src new file mode 100644 index 000000000..095e67d03 --- /dev/null +++ b/chart2/source/controller/dialogs/tp_SeriesToAxis.src @@ -0,0 +1,360 @@ +/************************************************************************* + * + * $RCSfile: tp_SeriesToAxis.src,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:27 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "HelpIds.hrc" +#include "TabPages.hrc" + +TabPage TP_OPTIONS +{ + Hide = TRUE ; +// HelpID = HID_LAYOUT ; + SVLook = TRUE ; + Size = MAP_APPFONT ( 260 , 185 ) ; + FixedLine 1 + { + Pos = MAP_APPFONT ( 6 , 3 ) ; + Size = MAP_APPFONT ( 248 , 8 ) ; + Text = "Datenreihe ausrichten an" ; + Text [ ENGLISH ]= "Assign Data Row To"; + Text[ english_us ] = "Align data series to"; + Text[ portuguese ] = "Alinhar srie de dados em"; + Text[ russian ] = " :"; + Text[ dutch ] = "Gegevensreeks uitlijnen aan"; + Text[ french ] = "Aligner la srie de donnes sur"; + Text[ spanish ] = "Alinear lnea de datos a"; + Text[ italian ] = "Allinea serie di dati a"; + Text[ danish ] = "Juster dataserie til"; + Text[ swedish ] = "Justera dataserie till"; + Text[ polish ] = "Wyrwnaj seri danych do"; + Text[ portuguese_brazilian ] = "Alinhar a srie de dados em"; + Text[ japanese ] = "データ系列の方向"; + Text[ chinese_simplified ] = "数据组对齐按照"; + Text[ chinese_traditional ] = "資料列對準依照"; + Text[ arabic ] = " :"; + Text[ dutch ] = "Gegevensreeks uitlijnen aan"; + Text[ chinese_simplified ] = "数据组对齐按照"; + Text[ greek ] = " "; + Text[ korean ] = "연속 데이터 맞춤:"; + Text[ turkish ] = "Veri serilerini buna hizala"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "Alinea la lnia de dades a:"; + Text[ finnish ] = "Tietolhteiden tasaus:"; + Text[ thai ] = "จัดตำแหน่งชุดข้อมูลไปยัง:"; + Text[ czech ] = "Zarovnat série dat na"; + Text[ hebrew ] = "Datenreihe ausrichten an"; + Text[ hindi ] = "ड़ॉटा श्रृंखला को पंक्तिकरण करो:"; + Text[ slovak ] = "Zarovnať série dát na"; + }; + RadioButton RBT_OPT_AXIS_1 + { + Pos = MAP_APPFONT ( 12 , 14 ) ; + Size = MAP_APPFONT ( 80 , 10 ) ; + Text = "~Primrer Y-Achse" ; + Text [ ENGLISH ]= "~Primary Y axis"; + TabStop = TRUE ; + Text[ english_us ] = "Primary Y axis"; + Text[ portuguese ] = "Eixo Y ~primrio"; + Text[ russian ] = " Y"; + Text[ dutch ] = "~Primaire Y-as"; + Text[ french ] = "Axe Y ~primaire"; + Text[ spanish ] = "~Eje primario Y"; + Text[ italian ] = "Asse Y primario"; + Text[ danish ] = "~Primr Y-akse"; + Text[ swedish ] = "~Primr Y-axel"; + Text[ polish ] = "Gwna o Y"; + Text[ portuguese_brazilian ] = "Eixo Y Primrio"; + Text[ japanese ] = "第1Y軸"; + Text[ chinese_simplified ] = "Y 主轴"; + Text[ chinese_traditional ] = "主 Y 軸"; + Text[ arabic ] = " "; + Text[ dutch ] = "~Primaire Y-as"; + Text[ chinese_simplified ] = "Y 主轴"; + Text[ greek ] = "~ Y"; + Text[ korean ] = "1차 Y 축"; + Text[ turkish ] = "~Birincil Y ekseni"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "Eix Y primari"; + Text[ finnish ] = "Ensisijainen Y-akseli"; + Text[ thai ] = "แกน Y ปฐมภูมิ"; + Text[ czech ] = "Primární osa Y"; + Text[ hebrew ] = "~Primärer Y-Achse"; + Text[ hindi ] = "प्रथम् Y अक्ष"; + Text[ slovak ] = "Primárna os Y"; + }; + RadioButton RBT_OPT_AXIS_2 + { + Pos = MAP_APPFONT ( 12 , 28 ) ; + Size = MAP_APPFONT ( 80 , 10 ) ; + Text = "~Sekundrer Y-Achse" ; + Text [ ENGLISH ]= "~Secondary Y axis"; + TabStop = TRUE ; + Text[ english_us ] = "2nd Y axis"; + Text[ portuguese ] = "Eixo Y ~secundrio"; + Text[ russian ] = " Y"; + Text[ dutch ] = "~Secundaire Y-as"; + Text[ french ] = "Axe Y ~secondaire"; + Text[ spanish ] = "Eje ~secundario Y"; + Text[ italian ] = "Asse Y secondario"; + Text[ danish ] = "~Sekundr Y-akse"; + Text[ swedish ] = "~Sekundr Y-axel"; + Text[ polish ] = "Pomocniczej osi Y"; + Text[ portuguese_brazilian ] = "Eixo Y secundrio"; + Text[ japanese ] = "第2Y軸"; + Text[ chinese_simplified ] = "Y 次轴"; + Text[ chinese_traditional ] = "次 Y 軸"; + Text[ arabic ] = " "; + Text[ dutch ] = "~Secundaire Y-as"; + Text[ chinese_simplified ] = "Y 次轴"; + Text[ greek ] = " ~ Y"; + Text[ korean ] = "2차 Y 축"; + Text[ turkish ] = "~kincil Y ekseni"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "2on eix Y"; + Text[ finnish ] = "Toinen Y-akseli"; + Text[ thai ] = "แกน Y แกนที่สอง"; + Text[ czech ] = "Upravit druhou osu Y"; + Text[ hebrew ] = "~Sekundärer Y-Achse"; + Text[ hindi ] = "दूसरा Y अक्ष"; + Text[ slovak ] = "Druhá os Y"; + }; + + FixedLine GB_BAR + { + Pos = MAP_APPFONT ( 6 , 44 ) ; + Size = MAP_APPFONT ( 248 , 8 ) ; + Text = "Einstellungen" ; + Text [ ENGLISH ]= "Settings"; + Text[ english_us ] = "Settings"; + Text[ portuguese ] = "Definies"; + Text[ russian ] = ""; + Text[ dutch ] = "Instellingen"; + Text[ french ] = "Paramtres"; + Text[ spanish ] = "Configuracin"; + Text[ italian ] = "Impostazioni:"; + Text[ danish ] = "Indstillinger"; + Text[ swedish ] = "Instllningar"; + Text[ polish ] = "Ustawienia"; + Text[ portuguese_brazilian ] = "Definies"; + Text[ japanese ] = "設定"; + Text[ chinese_simplified ] = "设定"; + Text[ chinese_traditional ] = "設定"; + Text[ arabic ] = ":"; + Text[ dutch ] = "Instellingen"; + Text[ chinese_simplified ] = "设定"; + Text[ greek ] = ""; + Text[ korean ] = "설정:"; + Text[ turkish ] = "Tercihler"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "Configuraci:"; + Text[ finnish ] = "Asetukset"; + Text[ thai ] = "ตั้งค่า"; + Text[ czech ] = "Nastavení"; + Text[ hebrew ] = "הגדרות"; + Text[ hindi ] = "निर्धारण"; + Text[ slovak ] = "Nastavenia"; + }; + FixedText FT_OVERLAP + { + Pos = MAP_APPFONT ( 12 , 73 ) ; + Size = MAP_APPFONT ( 47 , 8 ) ; + Text = "~berlapp" ; + Text [ ENGLISH ]= "~Overlap" ; + Text[ english_us ] = "~Overlap"; + Text[ portuguese ] = "~Sobrepor"; + Text[ russian ] = ""; + Text[ dutch ] = "~Overlappend"; + Text[ french ] = "~Chevauchement"; + Text[ spanish ] = "~Sobreponer"; + Text[ italian ] = "Sovrapponi"; + Text[ danish ] = "Overlap"; + Text[ swedish ] = "~verlappning"; + Text[ polish ] = "~Nakadanie"; + Text[ portuguese_brazilian ] = "~Sobrepor"; + Text[ japanese ] = "重ね合わせる(~O)"; + Text[ chinese_simplified ] = "重叠(~O)"; + Text[ chinese_traditional ] = "重疊(~O)"; + Text[ arabic ] = ""; + Text[ dutch ] = "~Overlappend"; + Text[ chinese_simplified ] = "重叠(~O)"; + Text[ greek ] = "~"; + Text[ korean ] = "겹침(~O)"; + Text[ turkish ] = "~Basamakla"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "~Superposa"; + Text[ finnish ] = "~Pllekkin"; + Text[ thai ] = "~ซ้อนทับ"; + Text[ czech ] = "Přesah"; + Text[ hebrew ] = "~Überlapp"; + Text[ hindi ] = "~Overlap"; + Text[ slovak ] = "~Presah"; + }; + + MetricField MT_OVERLAP + { + Border = TRUE ; + Pos = MAP_APPFONT ( 63 , 71 ) ; + Size = MAP_APPFONT ( 40 , 12 ) ; + TabStop = TRUE ; + Repeat = TRUE ; + Spin = TRUE ; + Minimum = -100 ; + Maximum = 100 ; + StrictFormat = TRUE ; + Unit = FUNIT_CUSTOM ; + CustomUnitText = " %" ; + First = 1 ; + Last = 100 ; + SpinSize = 1 ; + DecimalDigits = 0 ; + }; + + FixedText FT_GAP + { + Pos = MAP_APPFONT ( 12 , 57 ) ; + Size = MAP_APPFONT ( 47 , 8 ) ; + Text = "~Abstand"; + Text [ ENGLISH ] = "~Gap"; + Text[ english_us ] = "~Spacing"; + Text[ portuguese ] = "~Espaamento"; + Text[ russian ] = ""; + Text[ dutch ] = "~Afstand"; + Text[ french ] = "cart"; + Text[ spanish ] = "~Espacio"; + Text[ italian ] = "Dist~anza"; + Text[ danish ] = "~Afstand"; + Text[ swedish ] = "~Avstnd"; + Text[ polish ] = "~Odstp"; + Text[ portuguese_brazilian ] = "A~fastamento"; + Text[ japanese ] = "間隔(~S)"; + Text[ chinese_simplified ] = "间隔(~S)"; + Text[ chinese_traditional ] = "間隔(~S)"; + Text[ arabic ] = ""; + Text[ dutch ] = "~Afstand"; + Text[ chinese_simplified ] = "间隔(~S)"; + Text[ greek ] = "~"; + Text[ korean ] = "간격(~S)"; + Text[ turkish ] = "~Uzaklk"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "~Espaiat"; + Text[ finnish ] = "~Objektivlit"; + Text[ thai ] = "~ระยะห่าง"; + Text[ czech ] = "Mezery"; + Text[ hebrew ] = "ריווח"; + Text[ hindi ] = "~अंतर देना"; + Text[ slovak ] = "~Medzery"; + }; + + MetricField MT_GAP + { + Border = TRUE ; + Pos = MAP_APPFONT ( 63 , 55 ) ; + Size = MAP_APPFONT ( 40 , 12 ) ; + TabStop = TRUE ; + Repeat = TRUE ; + Spin = TRUE ; + Minimum = 0 ; + Maximum = 600 ; + StrictFormat = TRUE ; + Unit = FUNIT_CUSTOM ; + CustomUnitText = " %" ; + First = 1 ; + Last = 100 ; + SpinSize = 1 ; + DecimalDigits = 0 ; + }; + + CheckBox CB_CONNECTOR + { + Pos = MAP_APPFONT ( 12 , 87 ) ; + Size = MAP_APPFONT ( 200 , 10 ) ; + Text = "~Verbindungslinien" ; + Text [ ENGLISH ]= "Connection Lines"; + TabStop = TRUE ; + Text[ english_us ] = "Connection Lines"; + Text[ portuguese ] = "~Linhas de ligao"; + Text[ russian ] = " "; + Text[ dutch ] = "~Verbindingslijnen"; + Text[ french ] = "Lignes de ~connexion"; + Text[ spanish ] = "Lneas ~conectoras"; + Text[ italian ] = "Linee di collegamento"; + Text[ danish ] = "Forbindelseslinjer"; + Text[ swedish ] = "~Frbindelselinjer"; + Text[ polish ] = "Linie pocze"; + Text[ portuguese_brazilian ] = "Linhas Conectoras"; + Text[ japanese ] = "接続線"; + Text[ chinese_simplified ] = "连接线"; + Text[ chinese_traditional ] = "連結線條"; + Text[ arabic ] = " "; + Text[ dutch ] = "~Verbindingslijnen"; + Text[ chinese_simplified ] = "连接线"; + Text[ greek ] = " ~"; + Text[ korean ] = "연결선"; + Text[ turkish ] = "~Balant izgileri"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "Lnies ~connectoras"; + Text[ finnish ] = "Yhteysviivat"; + Text[ thai ] = "เชื่อมต่อบรรทัด"; + Text[ czech ] = "Spojovací čáry"; + Text[ hebrew ] = "~Verbindungslinien"; + Text[ hindi ] = "मिलाव रेखाएँ"; + Text[ slovak ] = "Spojovacie čiary"; + }; + +}; diff --git a/chart2/source/controller/dialogs/tp_TitleRotation.cxx b/chart2/source/controller/dialogs/tp_TitleRotation.cxx new file mode 100644 index 000000000..a0475ec88 --- /dev/null +++ b/chart2/source/controller/dialogs/tp_TitleRotation.cxx @@ -0,0 +1,376 @@ +/************************************************************************* + * + * $RCSfile: tp_TitleRotation.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:27 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "tp_TitleRotation.hxx" + +#include "ResId.hxx" +#include "TabPages.hrc" +#include "SchSfxItemIds.hxx" +/* +#include "Strings.hrc" +#include "Bitmaps.hrc" +#include "Bitmaps_HC.hrc" +*/ + +/* +#ifndef _SVX_SVXIDS_HRC //autogen +#include <svx/svxids.hrc> +#endif +#include "schattr.hxx" +*/ +// header for class SfxInt32Item +#ifndef _SFXINTITEM_HXX +#include <svtools/intitem.hxx> +#endif +//#define ITEMID_CHARTTEXTORDER SCHATTR_TEXT_ORDER +// #define ITEMID_CHARTTEXTORIENT SCHATTR_TEXT_ORIENT +#ifndef _SVX_CHRTITEM_HXX //autogen +#include <svx/chrtitem.hxx> +#endif +/* +#include "schresid.hxx" +#include "strings.hrc" +#include "chtmodel.hxx" +#include "attrib.hxx" +#include "attrib.hrc" +#include "app.hrc" +*/ + +//............................................................................. +namespace chart +{ +//............................................................................. + +SchAlignmentTabPage::SchAlignmentTabPage(Window* pWindow, + const SfxItemSet& rInAttrs) : + SfxTabPage(pWindow, SchResId(TP_ALIGNMENT), rInAttrs), + +// aCbxTextBreak ( this, ResId( CBX_TEXTBREAK ) ), +// aCbxTextOverlap ( this, ResId( CBX_TEXTOVERLAP ) ), +// aFlTextBreak ( this, ResId( FL_TEXTBREAK ) ), +// aRbtSideBySide(this, ResId(RBT_SIDEBYSIDE)), +// aRbtUpDown(this, ResId(RBT_UPDOWN)), +// aRbtDownUp(this, ResId(RBT_DOWNUP)), +// aRbtAutoOrder(this, ResId(RBT_AUTOORDER)), +// aFlOrder(this, ResId(FL_ORDER)), +// eOrderMode(CHORDMODE_X_AXIS), + rOutAttrs(rInAttrs), + + //Seit 4/1998 koennen Texte frei gedreht werden: SCHATTR_TEXT_DEGREES + aWinOrient ( this,ResId(CTR_DIAL),ResId(BTN_TXTSTACKED), + ResId(FT_DEGREES),ResId(NF_ORIENT), + ResId(FT_DUMMY), + ResId(CTR_DUMMY), + ResId( FL_ALIGN)) + +{ + FreeResource(); +} + +/************************************************************************* +|* +|* Dtor +|* +\************************************************************************/ + +SchAlignmentTabPage::~SchAlignmentTabPage() +{ +} + +/************************************************************************* +|* +|* Markierungs-Handler +|* +\************************************************************************/ + +/* +IMPL_LINK( SchAlignmentTabPage, CheckButtonHdl, Button *, pBtn ) +{ + + if (eOrderMode != CHORDMODE_NONE) + { + BOOL bEnable=TRUE; + aRbtSideBySide.Enable(bEnable); + aRbtUpDown.Enable(bEnable); + aRbtDownUp.Enable(bEnable); + aRbtAutoOrder.Enable(bEnable); + aFlOrder.Enable(bEnable); + } + return 0; +} +*/ + +/************************************************************************* +|* +|* Erzeugung +|* +\*************************************************************************/ + +SfxTabPage* SchAlignmentTabPage::Create(Window* pWindow, + const SfxItemSet& rOutAttrs) +{ + return new SchAlignmentTabPage(pWindow, rOutAttrs); +} + +/************************************************************************* +|* +|* Fuellt uebergebenen Item-Set mit Dialogbox-Attributen +|* +\*************************************************************************/ + +BOOL SchAlignmentTabPage::FillItemSet(SfxItemSet& rOutAttrs) +{ + //Seit 4/1998 koennen Texte frei gedreht werden: SCHATTR_TEXT_DEGREES +// SvxChartTextOrient eOrient; + BOOL bIsStacked = FALSE; + + long nDegrees=aWinOrient.GetDegrees()*100L; + rOutAttrs.Put(SfxInt32Item( SCHATTR_TEXT_DEGREES ,nDegrees) ); + + if (aWinOrient.IsStackedTxt()) + { +// eOrient = CHTXTORIENT_STACKED; + bIsStacked = TRUE; + rOutAttrs.Put(SfxInt32Item(SCHATTR_TEXT_DEGREES,0)); + } +// else +// { +// if(nDegrees==0) +// { +// eOrient = CHTXTORIENT_STANDARD; +// } +// else if(nDegrees <=18000) +// { +// eOrient = CHTXTORIENT_BOTTOMTOP; +// } +// else +// { +// eOrient = CHTXTORIENT_TOPBOTTOM; +// } +// } +// rOutAttrs.Put(SvxChartTextOrientItem(eOrient)); + rOutAttrs.Put( SfxBoolItem( SCHATTR_TEXT_STACKED, bIsStacked )); + + /* + if (eOrderMode != CHORDMODE_NONE) + { + SvxChartTextOrder eOrder; + +// if (aRbtUpDown.IsChecked()) eOrder = CHTXTORDER_UPDOWN; +// else if (aRbtDownUp.IsChecked()) eOrder = CHTXTORDER_DOWNUP; +// else if (aRbtAutoOrder.IsChecked()) eOrder = CHTXTORDER_AUTO; + else eOrder = CHTXTORDER_SIDEBYSIDE; + + rOutAttrs.Put(SvxChartTextOrderItem(eOrder)); + } + */ + + // Textumbruch +// BOOL bTextOverlap = aCbxTextOverlap.IsChecked(); +// rOutAttrs.Put( SfxBoolItem( SCHATTR_TEXT_OVERLAP, bTextOverlap ) ); + +// BOOL bTextBreak = aCbxTextBreak.IsChecked(); +// rOutAttrs.Put( SfxBoolItem( SID_TEXTBREAK, bTextBreak ) ); + + /* + BOOL bAttrsChanged = FALSE; + const SfxItemSet& rOldSet = GetItemSet(); + */ +// TriState eState; + + + + return TRUE; +} + +/************************************************************************* +|* +|* Initialisierung +|* +\*************************************************************************/ + +void SchAlignmentTabPage::Reset(const SfxItemSet& rInAttrs) +{ + const SfxPoolItem *pPoolItem = NULL; + + /* + if (rInAttrs.GetItemState(SCHATTR_TEXT_ORDER, + TRUE, &pPoolItem) == SFX_ITEM_SET && + eOrderMode != CHORDMODE_NONE) + { + switch (((const SvxChartTextOrderItem*)pPoolItem)->GetValue()) + { + case CHTXTORDER_SIDEBYSIDE: + aRbtSideBySide.Check(TRUE); + break; + + case CHTXTORDER_UPDOWN: + aRbtUpDown.Check(TRUE); + break; + + case CHTXTORDER_DOWNUP: + aRbtDownUp.Check(TRUE); + break; + + case CHTXTORDER_AUTO: + aRbtAutoOrder.Check(TRUE); + break; + } + } + */ + + //Seit 4/1998 koennen Texte frei gedreht werden: SCHATTR_TEXT_DEGREES + const SfxPoolItem* pItem ; + long nDegrees=0; + pItem = GetItem( rInAttrs, SCHATTR_TEXT_DEGREES ); + if(pItem) + { + nDegrees=((const SfxInt32Item*) pItem)->GetValue()/100; + } + +// if (rInAttrs.GetItemState(SCHATTR_TEXT_ORIENT, +// TRUE, &pPoolItem) == SFX_ITEM_SET) +// { +// SvxChartTextOrient eOrient = +// ((const SvxChartTextOrientItem*)pPoolItem)->GetValue(); + +// aWinOrient.SetDegrees((short)nDegrees); +// switch (eOrient) +// { +// case CHTXTORIENT_AUTOMATIC: +// break; + +// case CHTXTORIENT_STANDARD: +// break; + +// case CHTXTORIENT_TOPBOTTOM: +// if(!nDegrees) +// aWinOrient.SetDegrees(270); +// break; +// case CHTXTORIENT_BOTTOMTOP: +// if(!nDegrees) +// aWinOrient.SetDegrees(90); +// break; + +// case CHTXTORIENT_STACKED: +// aWinOrient.SetStackedTxt(TRUE); +// break; + +// } +// } + + aWinOrient.SetDegrees( static_cast< short >( nDegrees )); + if( rInAttrs.GetItemState( SCHATTR_TEXT_STACKED, TRUE, &pPoolItem ) == SFX_ITEM_SET ) + { + aWinOrient.SetStackedTxt( reinterpret_cast< const SfxBoolItem * >( pPoolItem )->GetValue() ); + } + + // Textumbruch + /* + if( rInAttrs.GetItemState( SID_TEXTBREAK, FALSE, &pPoolItem ) >= SFX_ITEM_AVAILABLE ) + { + BOOL bTextBreak = ( (const SfxBoolItem*) pPoolItem)->GetValue(); +// aCbxTextBreak.Check( bTextBreak ); + } + else + { +// aCbxTextBreak.Hide(); +// aFlTextBreak.Hide(); + } + // Textueberlapp + if( (rInAttrs.GetItemState( SCHATTR_TEXT_OVERLAP, FALSE, &pPoolItem ) >= SFX_ITEM_AVAILABLE) && bTextCanOverlap) + { + BOOL bTextOverlap = ( (const SfxBoolItem*) pPoolItem)->GetValue(); +// aCbxTextOverlap.Check( bTextOverlap ); + } + else + { +// aCbxTextOverlap.Hide(); + } + */ +} + +/************************************************************************* +|* +|* Anordnungs-Controls hiden +|* +\*************************************************************************/ + +/* +void SchAlignmentTabPage::SetOrderMode(OrderMode eMode) +{ + eOrderMode = eMode; + + if (eOrderMode == CHORDMODE_NONE) + { + aRbtSideBySide.Hide(); + aRbtUpDown.Hide(); + aRbtDownUp.Hide(); + aRbtAutoOrder.Hide(); + aFlOrder.Hide(); + } +} +*/ + +//............................................................................. +} //namespace chart +//............................................................................. + + diff --git a/chart2/source/controller/dialogs/tp_TitleRotation.hxx b/chart2/source/controller/dialogs/tp_TitleRotation.hxx new file mode 100644 index 000000000..719a1d57b --- /dev/null +++ b/chart2/source/controller/dialogs/tp_TitleRotation.hxx @@ -0,0 +1,144 @@ +/************************************************************************* + * + * $RCSfile: tp_TitleRotation.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:27 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef _CHART2_TP_TITLEROTATION_HXX +#define _CHART2_TP_TITLEROTATION_HXX +/* +#include "SchSfxItemIds.hxx" +// header for enum SvxChartKindError +#include "SchAllDefinesFor_svx_chrtitem.hxx" +#ifndef _SVX_CHRTITEM_HXX //autogen +#include <svx/chrtitem.hxx> +#endif +*/ +// header for SfxTabPage +#ifndef _SFXTABDLG_HXX +#include <sfx2/tabdlg.hxx> +#endif +// header for SvxWinOrientation +#ifndef WORIENT_HXX //autogen +#include <svx/worient.hxx> +#endif +/* +// header for class ValueSet +#ifndef _VALUESET_HXX +#include <svtools/valueset.hxx> +#endif +*/ +// header for FixedLine +#ifndef _SV_FIXED_HXX +#include <vcl/fixed.hxx> +#endif +// header for CheckBox +#ifndef _SV_BUTTON_HXX +#include <vcl/button.hxx> +#endif +/* +// header for MetricField +#ifndef _SV_FIELD_HXX +#include <vcl/field.hxx> +#endif +*/ +//............................................................................. +namespace chart +{ +//............................................................................. + +class SchAlignmentTabPage : public SfxTabPage +{ +private: + + + //Seit 4/1998 koennen Texte frei gedreht werden: SID_ATTR_ALIGN_DEGREES + SvxWinOrientation aWinOrient; + +// CheckBox aCbxTextOverlap; + +// CheckBox aCbxTextBreak; +// FixedLine aFlTextBreak; + +// RadioButton aRbtSideBySide; +// RadioButton aRbtUpDown; +// RadioButton aRbtDownUp; +// RadioButton aRbtAutoOrder; +// FixedLine aFlOrder; +// OrderMode eOrderMode; + + const SfxItemSet& rOutAttrs; + +// DECL_LINK(CheckButtonHdl, Button*); + BOOL bTextCanOverlap; +public: + SchAlignmentTabPage(Window* pParent, const SfxItemSet& rInAttrs); + virtual ~SchAlignmentTabPage(); + + static SfxTabPage* Create(Window* pParent, const SfxItemSet& rInAttrs); + virtual BOOL FillItemSet(SfxItemSet& rOutAttrs); + virtual void Reset(const SfxItemSet& rInAttrs); + +// void SetOrderMode(OrderMode eMode); + void SetTextCanOverlap(BOOL b){bTextCanOverlap=b;} +}; + +//............................................................................. +} //namespace chart +//............................................................................. + +#endif diff --git a/chart2/source/controller/dialogs/tp_TitleRotation.src b/chart2/source/controller/dialogs/tp_TitleRotation.src new file mode 100644 index 000000000..74b800b2c --- /dev/null +++ b/chart2/source/controller/dialogs/tp_TitleRotation.src @@ -0,0 +1,484 @@ +/************************************************************************* + * + * $RCSfile: tp_TitleRotation.src,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:27 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "HelpIds.hrc" +#include "TabPages.hrc" + +#define MASKCOLOR MaskColor = Color { Red = 0xC000 ; Green = 0xC000 ; Blue = 0xC000 ; } + +TabPage TP_ALIGNMENT +{ + Hide = TRUE ; + HelpID = HID_SCH_ALIGNMENT ; + SVLook = TRUE ; + Size = MAP_APPFONT ( 260 , 185 ) ; + Control CTR_DIAL + { + HelpId = HID_SCH_ALIGNMENT_CTR_DIAL ; + Pos = MAP_APPFONT ( 30 , 14 ) ; + Size = MAP_APPFONT ( 42 , 43 ) ; + Text = "ABCD" ; + }; + ImageButton BTN_TXTSTACKED + { + HelpId = HID_SCH_ALIGNMENT_STACKED ; + Pos = MAP_APPFONT ( 12 , 14 ) ; + Size = MAP_APPFONT ( 12 , 43 ) ; + TabStop = TRUE ; + ButtonImage = Image + { + ImageBitmap = Bitmap { File = "txtstk.bmp" ; }; + MASKCOLOR ; + }; + }; + FixedText FT_DEGREES + { + Pos = MAP_APPFONT ( 110 , 32 ) ; + Size = MAP_APPFONT ( 32 , 8 ) ; + Text = "Gra~d" ; + Text [ ENGLISH ] = "Degrees" ; + Text [ english_us ] = "~Degrees" ; + Text [ portuguese_brazilian ] = "Gr~aus" ; + Text [ swedish ] = "gra~der" ; + Text [ danish ] = "gra~der" ; + Text [ italian ] = "Gra~do" ; + Text [ spanish ] = "~Grados" ; + Text [ french ] = "Degr~s" ; + Text [ dutch ] = "Gra~den" ; + Text [ portuguese ] = "Gr~aus" ; + Text[ chinese_simplified ] = "度(~D)"; + Text[ russian ] = ""; + Text[ polish ] = "~Stopnie"; + Text[ japanese ] = "度(~D)"; + Text[ chinese_traditional ] = "度(~D)"; + Text[ arabic ] = ""; + Text[ dutch ] = "Gra~den"; + Text[ chinese_simplified ] = "度(~D)"; + Text[ greek ] = "~"; + Text[ korean ] = "도(~D)"; + Text[ turkish ] = "Der~ece"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "~Graus"; + Text[ finnish ] = "Ast~eet"; + Text[ thai ] = "~องศา"; + Text[ czech ] = "Stupňů"; + Text[ hebrew ] = "Gra~d"; + Text[ hindi ] = "~डिग्रियाँ"; + Text[ slovak ] = "Stup~ne"; + }; + NumericField NF_ORIENT + { + HelpId = HID_SCH_ALIGNMENT_DEGREES ; + Border = TRUE ; + Pos = MAP_APPFONT ( 78 , 30 ) ; + Size = MAP_APPFONT ( 28 , 12 ) ; + TabStop = TRUE ; + Repeat = TRUE ; + Spin = TRUE ; + StrictFormat = TRUE ; + }; + FixedText FT_DUMMY + { + //only necessary for constructor of SvxWinOrientation + Hide = TRUE ; + Pos = MAP_APPFONT ( 194 , 26 ) ; + Size = MAP_APPFONT ( 60 , 10 ) ; + Text = "unbenutzt" ; + //This text is never displayed and does therefore not have to be translated! + }; + Control CTR_DUMMY + { + //only necessary for constructor of SvxWinOrientation + Hide = TRUE ; + Pos = MAP_APPFONT ( 204 , 42 ) ; + Size = MAP_APPFONT ( 50 , 15 ) ; + //TabStop = TRUE ; + }; + FixedLine FL_ALIGN + { + Pos = MAP_APPFONT ( 6 , 3 ) ; + Size = MAP_APPFONT ( 248 , 8 ) ; + Text = "Schreibrichtung" ; + Text [ ENGLISH ] = "Orientation" ; + Text [ norwegian ] = "Orientation" ; + Text [ italian ] = "Orientamento" ; + Text [ portuguese_brazilian ] = "Orientao do texto" ; + Text [ portuguese ] = "Orientao" ; + Text [ finnish ] = "Tekstin suunta" ; + Text [ danish ] = "Skriveretning" ; + Text [ french ] = "Orientation du texte" ; + Text [ swedish ] = "Skrivriktning" ; + Text [ dutch ] = "Schrijfrichting" ; + Text [ spanish ] = "Direccin de escritura" ; + Text [ english_us ] = "Text direction" ; + Text[ chinese_simplified ] = "书写方向"; + Text[ russian ] = " "; + Text[ polish ] = "Kierunek tekstu"; + Text[ japanese ] = "文字方向"; + Text[ chinese_traditional ] = "書寫方向"; + Text[ arabic ] = " "; + Text[ dutch ] = "Schrijfrichting"; + Text[ chinese_simplified ] = "书写方向"; + Text[ greek ] = " "; + Text[ korean ] = "텍스트 방향"; + Text[ turkish ] = "Metin ynlendirmesi"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "Direcci d'escriptura"; + Text[ thai ] = "ทิศทางข้อความ"; + Text[ czech ] = "Směr textu"; + Text[ hebrew ] = "Schreibrichtung"; + Text[ hindi ] = "टेक्स्ट् दिशा"; + Text[ slovak ] = "Smer textu"; + }; + /* + FixedLine FL_ORDER + { + Pos = MAP_APPFONT ( 6 , 63 ) ; + Size = MAP_APPFONT ( 248 , 8 ) ; + Text = "Anordnung" ; + Text [ ENGLISH ] = "Order" ; + Text [ norwegian ] = "Rekkeflge" ; + Text [ italian ] = "Disponi" ; + Text [ portuguese_brazilian ] = "Disposio" ; + Text [ portuguese ] = "Disposio" ; + Text [ english_us ] = "Arrangement" ; + Text [ spanish ] = "Disposicin" ; + Text [ french ] = "Disposition" ; + Text [ dutch ] = "Positie" ; + Text [ swedish ] = "Placering" ; + Text [ danish ] = "Placering" ; + Text[ chinese_simplified ] = "排序"; + Text[ russian ] = ""; + Text[ polish ] = "Rozmieszczenie"; + Text[ japanese ] = "整列"; + Text[ chinese_traditional ] = "排序"; + Text[ arabic ] = ""; + Text[ dutch ] = "Positie"; + Text[ chinese_simplified ] = "排序"; + Text[ greek ] = ""; + Text[ korean ] = "배치"; + Text[ turkish ] = "Dzenleme"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "Posici"; + Text[ finnish ] = "Jrjest jrjestys"; + Text[ thai ] = "จัดเรียงคำสั่ง"; + Text[ czech ] = "Uspořádání"; + Text[ hebrew ] = "Anordnung"; + Text[ hindi ] = "व्यवस्था"; + Text[ slovak ] = "Usporiadanie"; + }; + RadioButton RBT_SIDEBYSIDE + { + Pos = MAP_APPFONT ( 12 , 74 ) ; + Size = MAP_APPFONT ( 70 , 10 ) ; + Text = "~Nebeneinander" ; + Text [ ENGLISH ] = "~Side by Side" ; + Text [ norwegian ] = "~Side by Side" ; + Text [ italian ] = "Affianca" ; + Text [ portuguese_brazilian ] = "~Lado a lado" ; + Text [ portuguese ] = "~Lado a lado" ; + Text [ english_us ] = "~Tile" ; + TabStop = TRUE ; + Text [ spanish ] = "~Mosaico" ; + Text [ french ] = "~Juxtaposer" ; + Text [ dutch ] = "~Naast elkaar" ; + Text [ swedish ] = "Bredvid vara~ndra" ; + Text [ danish ] = "Side om side" ; + Text[ chinese_simplified ] = "并排(~T)"; + Text[ russian ] = ""; + Text[ polish ] = "~Ssiadujco"; + Text[ japanese ] = "並べて配置(~T)"; + Text[ chinese_traditional ] = "並排(~T)"; + Text[ arabic ] = ""; + Text[ dutch ] = "~Naast elkaar"; + Text[ chinese_simplified ] = "并排(~T)"; + Text[ greek ] = " ~"; + Text[ korean ] = "바둑판식 배치(~T)"; + Text[ turkish ] = "~De"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "~Mosaic"; + Text[ finnish ] = "~Vierekkin"; + Text[ thai ] = "~ชื่อ"; + Text[ czech ] = "Dlaždice"; + Text[ hebrew ] = "~Nebeneinander"; + Text[ hindi ] = "~पटिया"; + Text[ slovak ] = "~Dlaždice"; + }; + RadioButton RBT_UPDOWN + { + Pos = MAP_APPFONT ( 12 , 88 ) ; + Size = MAP_APPFONT ( 70 , 10 ) ; + Text = "~Hoch-tief versetzt" ; + Text [ ENGLISH ] = "~Up-down transposed" ; + Text [ norwegian ] = "~Up-down transposed" ; + Text [ italian ] = "Sposta in alto/in basso" ; + Text [ portuguese_brazilian ] = "~mpares em cima" ; + Text [ portuguese ] = "~mpares em cima" ; + Text [ english_us ] = "Stagger ~odd" ; + TabStop = TRUE ; + Text [ spanish ] = "Organizacin i~mpar" ; + Text [ french ] = "Transposer ~haut-bas" ; + Text [ dutch ] = "~Hoog-laag verzet" ; + Text [ swedish ] = "Upphjt/nedsnkt" ; + Text [ danish ] = "Ulige tal forskudt" ; + Text[ chinese_simplified ] = "上下移动(~O)"; + Text[ russian ] = " ( )"; + Text[ polish ] = "Rozm. przest. (gra-d)"; + Text[ japanese ] = "上下に配置(~O)"; + Text[ chinese_traditional ] = "上下移動(~O)"; + Text[ arabic ] = " "; + Text[ dutch ] = "~Hoog-laag verzet"; + Text[ chinese_simplified ] = "上下移动(~O)"; + Text[ greek ] = "~ -"; + Text[ korean ] = "위 아래 엇갈림(~O)"; + Text[ turkish ] = "Yukar/aa hizalama"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "Escalonament ~senar"; + Text[ finnish ] = "Lomita ~parittomat"; + Text[ thai ] = "สลับเลข~คี่"; + Text[ czech ] = "Předsunout liché"; + Text[ hebrew ] = "~Hoch-tief versetzt"; + Text[ hindi ] = "स्टाग्गेर् ~ऑड़"; + Text[ slovak ] = "P~osunúť nepárne"; + }; + RadioButton RBT_DOWNUP + { + Pos = MAP_APPFONT ( 12 , 102 ) ; + Size = MAP_APPFONT ( 70 , 10 ) ; + Text = "~Tief-hoch versetzt" ; + Text [ ENGLISH ] = "~Down-up transposed" ; + Text [ norwegian ] = "~Down-up transposed" ; + Text [ italian ] = "Sposta in basso/in alto" ; + Text [ portuguese_brazilian ] = "~Pares em cima" ; + Text [ portuguese ] = "~Pares em cima" ; + Text [ english_us ] = "Stagger ~even" ; + TabStop = TRUE ; + Text [ dutch ] = "~Hoog-laag verzet" ; + Text [ spanish ] = "Organizacin p~ar" ; + Text [ french ] = "Transposer ~bas-haut" ; + Text [ swedish ] = "Nedsnkt/upphjt" ; + Text [ danish ] = "Lige tal forskudt" ; + Text[ chinese_simplified ] = "下上移动(~E)"; + Text[ russian ] = " ( )"; + Text[ polish ] = "Rozm. przest. (d-gra)"; + Text[ japanese ] = "上下に配置(~E)"; + Text[ chinese_traditional ] = "下上移動(~E)"; + Text[ arabic ] = " "; + Text[ dutch ] = "~Hoog-laag verzet"; + Text[ chinese_simplified ] = "下上移动(~E)"; + Text[ greek ] = " ~-"; + Text[ korean ] = "아래 위 엇갈림(~E)"; + Text[ turkish ] = "Aa/yukar hizalama"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "Escalonament ~parell"; + Text[ finnish ] = "Lomita ~parilliset"; + Text[ thai ] = "สลับเล~ขคู่"; + Text[ czech ] = "Předsunout sudé"; + Text[ hebrew ] = "~Tief-hoch versetzt"; + Text[ hindi ] = "स्टाग्गेर् ~इवन"; + Text[ slovak ] = "Posunúť párn~e"; + }; + RadioButton RBT_AUTOORDER + { + Pos = MAP_APPFONT ( 12 , 116 ) ; + Size = MAP_APPFONT ( 70 , 10 ) ; + Text = "~Automatisch" ; + Text [ ENGLISH ] = "~Automatic" ; + Text [ norwegian ] = "~Automatisk" ; + Text [ italian ] = "Automatico" ; + Text [ portuguese_brazilian ] = "~Automtico" ; + Text [ portuguese ] = "~Automtico" ; + Text [ english_us ] = "A~utomatic" ; + TabStop = TRUE ; + Text [ spanish ] = "~Automtico" ; + Text [ french ] = "Automatique" ; + Text [ dutch ] = "~Automatisch" ; + Text [ swedish ] = "~Automatiskt" ; + Text [ danish ] = "~Automatisk" ; + Text[ chinese_simplified ] = "自动(~U)"; + Text[ russian ] = ""; + Text[ polish ] = "A~utomatycznie"; + Text[ japanese ] = "自動(~U)"; + Text[ chinese_traditional ] = "自動(~U)"; + Text[ arabic ] = ""; + Text[ dutch ] = "~Automatisch"; + Text[ chinese_simplified ] = "自动(~U)"; + Text[ greek ] = "~"; + Text[ korean ] = "자동(~U)"; + Text[ turkish ] = "~Otomatik"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "~Automtic"; + Text[ finnish ] = "A~utomaattinen"; + Text[ thai ] = "อั~ตโนมัติ"; + Text[ czech ] = "Automaticky"; + Text[ hebrew ] = "אוטומטי"; + Text[ hindi ] = "स्व~यं-चालित"; + Text[ slovak ] = "A~utomaticky"; + }; + */ + /* + CheckBox CBX_TEXTBREAK + { + Pos = MAP_APPFONT ( 12 , 157 ) ; + Size = MAP_APPFONT ( 69 , 10 ) ; + + Text = "~Umbruch" ; + Text [ ENGLISH ] = "~Break" ; + Text [ english_us ] = "~Break" ; + Text [ portuguese_brazilian ] = "~Quebra" ; + Text [ swedish ] = "~Brytning" ; + Text [ danish ] = "Skift" ; + Text [ italian ] = "A capo" ; + Text [ spanish ] = "~Salto" ; + Text [ french ] = "~Saut" ; + Text [ dutch ] = "~Afbreking" ; + Text [ portuguese ] = "~Quebra" ; + Text[ chinese_simplified ] = "换行(~B)"; + Text[ russian ] = ""; + Text[ polish ] = "~Rozerwij"; + Text[ japanese ] = "改行(~B)"; + Text[ chinese_traditional ] = "換行(~B)"; + Text[ arabic ] = ""; + Text[ dutch ] = "~Afbreking"; + Text[ chinese_simplified ] = "换行(~B)"; + Text[ greek ] = "~"; + Text[ korean ] = "나누기(~B)"; + Text[ turkish ] = "~Kesme"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "~Salt"; + Text[ finnish ] = "~Vaihto"; + Text[ thai ] = "แ~บ่ง"; + Text[ czech ] = "Zalomení"; + Text[ hebrew ] = "~Umbruch"; + Text[ hindi ] = "~खण्डन"; + Text[ slovak ] = "~Zalomenie"; + }; + CheckBox CBX_TEXTOVERLAP + { + Pos = MAP_APPFONT ( 12 , 143 ) ; + Size = MAP_APPFONT ( 69 , 10 ) ; + + Text = "~berlappend" ; + Text [ ENGLISH ] = "" ; + Text [ english_us ] = "~Overlap" ; + Text [ portuguese_brazilian ] = "~Sobrepor" ; + Text [ swedish ] = "~verlappande" ; + Text [ danish ] = "Overlappet" ; + Text [ italian ] = "~Sovrapponi" ; + Text [ spanish ] = "~Sobreponer" ; + Text [ french ] = "~Chevauchement" ; + Text [ dutch ] = "~Overlappend" ; + Text [ portuguese ] = "Em ~cascata" ; + Text[ chinese_simplified ] = "重叠(~O)"; + Text[ russian ] = ""; + Text[ polish ] = "~Nakadanie"; + Text[ japanese ] = "重ね合わせる(~O)"; + Text[ chinese_traditional ] = "重疊(~O)"; + Text[ arabic ] = ""; + Text[ dutch ] = "~Overlappend"; + Text[ chinese_simplified ] = "重叠(~O)"; + Text[ greek ] = "~"; + Text[ korean ] = "겹침(~O)"; + Text[ turkish ] = "B~asamakla"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "Superp~osa"; + Text[ finnish ] = "~Pllekkin"; + Text[ thai ] = "~ซ้อนทับ"; + Text[ czech ] = "Přesah"; + Text[ hebrew ] = "~Überlappend"; + Text[ hindi ] = "~Overlap"; + Text[ slovak ] = "~Presah"; + }; + FixedLine FL_TEXTBREAK + { + Pos = MAP_APPFONT ( 6 , 132 ) ; + Size = MAP_APPFONT ( 248 , 8 ) ; + + Text = "Textfluss" ; + Text [ ENGLISH ] = "Textflow" ; + Text [ english_us ] = "Text flow" ; + Text[ portuguese ] = "Fluxo de texto"; + Text[ russian ] = " "; + Text[ greek ] = " "; + Text[ dutch ] = "Tekstverloop"; + Text[ french ] = "Enchanements"; + Text[ spanish ] = "Flujo de texto"; + Text[ italian ] = "Testo"; + Text[ danish ] = "Tekstretning"; + Text[ swedish ] = "Textflde"; + Text[ polish ] = "Przepyw tekstu"; + Text[ portuguese_brazilian ] = "Fluxo do texto"; + Text[ japanese ] = "体裁"; + Text[ korean ] = "텍스트 흐름"; + Text[ chinese_simplified ] = "换行和分页"; + Text[ chinese_traditional ] = "換行和分頁"; + Text[ arabic ] = " "; + Text[ turkish ] = "Metin ak"; + Text[ language_user1 ] = " "; + Text[ catalan ] = "Flux de text"; + Text[ finnish ] = "Tekstin rivitys"; + Text[ thai ] = "การไหลของข้อความ"; + Text[ czech ] = "Tok textu"; + Text[ hebrew ] = "Textfluss"; + Text[ hindi ] = "टेक्स्ट् धारा"; + Text[ slovak ] = "Tok textu"; + }; + */ +}; diff --git a/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx b/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx new file mode 100644 index 000000000..cd496c199 --- /dev/null +++ b/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx @@ -0,0 +1,156 @@ +/************************************************************************* + * + * $RCSfile: DrawViewWrapper.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:27 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "DrawViewWrapper.hxx" +#include "DrawModelWrapper.hxx" + +// header for class SdrPage +#ifndef _SVDPAGE_HXX +#include <svx/svdpage.hxx> +#endif +//header for class SdrPageView +#ifndef _SVDPAGV_HXX +#include <svx/svdpagv.hxx> +#endif +// header for class SdrModel +#ifndef _SVDMODEL_HXX +#include <svx/svdmodel.hxx> +#endif + +//............................................................................. +namespace chart +{ +//............................................................................. + +DrawViewWrapper::DrawViewWrapper( SdrModel* pModel, OutputDevice* pOut) + : E3dView(pModel, pOut) + , m_pWrappedDLPageView(NULL) + , m_pMarkHandleProvider(NULL) +{ + m_pWrappedDLPageView = this->ShowPagePgNum( 0, Point(0,0) ); + + /* + m_pWrappedDLPageView->GetPage()->SetBorder(0, 0, 0, 0); + m_pWrappedDLPageView->GetPage()->SetSize(Size(1000,1000)); + this->SetBordVisible(false); + this->SetPageBorderVisible(false); + */ +} + +DrawViewWrapper::~DrawViewWrapper() +{ + m_pWrappedDLPageView = NULL;//@ todo: sufficient? or remove necessary +} + +//virtual +void DrawViewWrapper::SetMarkHandles() +{ + if( m_pMarkHandleProvider && m_pMarkHandleProvider->getMarkHandles( aHdl ) ) + return; + else + SdrView::SetMarkHandles(); +} + +SdrObject* DrawViewWrapper::getHitObject( const Point& rPnt ) const +{ + const short HITPIX=2; //hit-tolerance in pixel + + SdrObject* pRet = NULL; + //ULONG nOptions =SDRSEARCH_DEEP|SDRSEARCH_PASS2BOUND|SDRSEARCH_PASS3NEAREST; + //ULONG nOptions = SDRSEARCH_TESTMARKABLE; + ULONG nOptions = SDRSEARCH_DEEP | SDRSEARCH_TESTMARKABLE; + //ULONG nOptions = SDRSEARCH_DEEP|SDRSEARCH_ALSOONMASTER|SDRSEARCH_WHOLEPAGE|SDRSEARCH_PASS2BOUND|SDRSEARCH_PASS3NEAREST; + //ULONG nOptions = 0; + + short nHitTolerance = 50; + { + OutputDevice* pOutDev = this->GetWin(0); + if(pOutDev) + nHitTolerance = pOutDev->PixelToLogic(Size(HITPIX,0)).Width(); + } + this->SdrView::PickObj(rPnt, nHitTolerance, pRet, m_pWrappedDLPageView, nOptions); + return pRet; +} + +void DrawViewWrapper::MarkObject( SdrObject* pObj ) +{ + bool bFrameDragSingles = true;//true == green == surrounding handles + pObj->SetMarkProtect(false); + if( m_pMarkHandleProvider ) + bFrameDragSingles = m_pMarkHandleProvider->getFrameDragSingles(); + this->SetFrameDragSingles(bFrameDragSingles);//decide wether each single object should get handles + this->SdrView::MarkObj( pObj, m_pWrappedDLPageView ); + this->SetMarkHdlHidden(FALSE); +} + + +void DrawViewWrapper::setMarkHandleProvider( MarkHandleProvider* pMarkHandleProvider ) +{ + m_pMarkHandleProvider = pMarkHandleProvider; +} + +void DrawViewWrapper::InitRedraw( OutputDevice* pOut, const Region& rReg ) +{ + this->E3dView::InitRedraw( pOut, rReg ); +} + +//............................................................................. +} //namespace chart +//............................................................................. diff --git a/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx b/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx new file mode 100644 index 000000000..a67ff24ea --- /dev/null +++ b/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx @@ -0,0 +1,239 @@ +/************************************************************************* + * + * $RCSfile: ViewElementListProvider.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:27 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "ViewElementListProvider.hxx" +#include "chartview/NumberFormatterWrapper.hxx" +#include "DrawModelWrapper.hxx" + +/* +#ifndef _SVDMODEL_HXX +#include <svx/svdmodel.hxx> +#endif +*/ + +//------------ +//oldChartModelWrapper +/* +// header for class SfxPrinter +#ifndef _SFX_PRINTER_HXX +#include <sfx2/printer.hxx> +#endif +*/ +// header for class FontList +#ifndef _CTRLTOOL_HXX +#include <svtools/ctrltool.hxx> +#endif +// header for class Application +#ifndef _SV_SVAPP_HXX +#include <vcl/svapp.hxx> +#endif +//------------ +/* +//for creation of own number formatter +#ifndef _COMPHELPER_PROCESSFACTORY_HXX_ +#include <comphelper/processfactory.hxx> +#endif +*/ + +//............................................................................. +namespace chart +{ +//............................................................................. +//using namespace ::com::sun::star; +//using namespace ::drafts::com::sun::star::chart2; + +ViewElementListProvider::ViewElementListProvider( DrawModelWrapper* pDrawModelWrapper + , NumberFormatterWrapper* pNumberFormatterWrapper ) + : m_pDrawModelWrapper( pDrawModelWrapper ) + , m_pFontList(NULL) + , m_pNumberFormatterWrapper(pNumberFormatterWrapper) +{ + DBG_ASSERT(m_pDrawModelWrapper,"A DrawModelWrapper is missing - maybe not all services can be provided"); + DBG_ASSERT(m_pNumberFormatterWrapper,"A Numberformatter is missing - maybe not all services can be provided"); +} + +ViewElementListProvider::~ViewElementListProvider() +{ + if(m_pFontList) + delete m_pFontList; +} + +XColorTable* ViewElementListProvider::GetColorTable() const +{ + if(m_pDrawModelWrapper) + return m_pDrawModelWrapper->GetColorTable(); + return NULL; +} +XDashList* ViewElementListProvider::GetDashList() const +{ + if(m_pDrawModelWrapper) + return m_pDrawModelWrapper->GetDashList(); + return NULL; +} +XLineEndList* ViewElementListProvider::GetLineEndList() const +{ + if(m_pDrawModelWrapper) + return m_pDrawModelWrapper->GetLineEndList(); + return NULL; +} +XGradientList* ViewElementListProvider::GetGradientList() const +{ + if(m_pDrawModelWrapper) + return m_pDrawModelWrapper->GetGradientList(); + return NULL; +} +XHatchList* ViewElementListProvider::GetHatchList() const +{ + if(m_pDrawModelWrapper) + return m_pDrawModelWrapper->GetHatchList(); + return NULL; +} +XBitmapList* ViewElementListProvider::GetBitmapList() const +{ + if(m_pDrawModelWrapper) + return m_pDrawModelWrapper->GetBitmapList(); + return NULL; +} + +//create chartspecific symbols for linecharts +SdrObjList* ViewElementListProvider::GetSymbolList() const +{ + // in old chart called GetSdrObjList + //@todo create symbols here + return NULL; +} + +FontList* ViewElementListProvider::getFontList() const +{ + //was old chart: + //SvxFontListItem* SfxObjectShell::.GetItem(SID_ATTR_CHAR_FONTLIST) + + if(!m_pFontList) + { + OutputDevice* pPrinter = NULL;//getPrinter(); + OutputDevice* pDefaultOut = Application::GetDefaultDevice(); // #67730# + m_pFontList = new FontList( pPrinter ? pPrinter : pDefaultOut + , pPrinter ? pDefaultOut : NULL + , FALSE ); + } + return m_pFontList; +} + +/* +SfxPrinter* OldModelWrapper::getPrinter() +{ + //was old chart: + //SfxPrinter* SchChartDocShell::GetPrinter() + + // OLE-Objekt: kein Printer anlegen ??? see old chart: :UpdateTablePointers + //@todo get printer from calc or other container + //return NULL; + + SfxPrinter* pPrinter = NULL; + bool bOwnPrinter = true; + if (!pPrinter) + { + SfxBoolItem aItem(SID_PRINTER_NOTFOUND_WARN, TRUE); + // ItemSet mit speziellem Poolbereich anlegen + SfxItemSet* pSet = new SfxItemSet(GetPool(), + SID_PRINTER_NOTFOUND_WARN, + SID_PRINTER_NOTFOUND_WARN, 0); + pSet->Put(aItem); + pPrinter = new SfxPrinter(pSet); //@todo ->need to remember and delete + bOwnPrinter = TRUE; + + MapMode aMapMode = pPrinter->GetMapMode(); + aMapMode.SetMapUnit(MAP_100TH_MM); + pPrinter->SetMapMode(aMapMode); + + if (pChDoc) + { + if (pPrinter != pChDoc->GetRefDevice()) + pChDoc->SetRefDevice(pPrinter); + + if (pPrinter != pChDoc->GetOutliner()->GetRefDevice()) + pChDoc->GetOutliner()->SetRefDevice(pPrinter); + } + } + return pPrinter; +} +*/ + +SvNumberFormatter* ViewElementListProvider::GetOwnNumberFormatter() const +{ + if( m_pNumberFormatterWrapper ) + return m_pNumberFormatterWrapper->getSvNumberFormatter(); + return NULL; + /* + static SvNumberFormatter aNumberFormatter = SvNumberFormatter( + ::comphelper::getProcessServiceFactory(), + LANGUAGE_SYSTEM ); + return &aNumberFormatter; + */ +} +SvNumberFormatter* ViewElementListProvider::GetNumFormatter() const +{ + //@todo + return GetOwnNumberFormatter(); +} + +//............................................................................. +} //namespace chart +//............................................................................. diff --git a/chart2/source/controller/drawinglayer/makefile.mk b/chart2/source/controller/drawinglayer/makefile.mk new file mode 100644 index 000000000..a20916f46 --- /dev/null +++ b/chart2/source/controller/drawinglayer/makefile.mk @@ -0,0 +1,84 @@ +#************************************************************************* +# +# $RCSfile: makefile.mk,v $ +# +# $Revision: 1.1.1.1 $ +# +# last change: $Author: bm $ $Date: 2003-10-06 09:58:27 $ +# +# The Contents of this file are made available subject to the terms of +# either of the following licenses +# +# - GNU Lesser General Public License Version 2.1 +# - Sun Industry Standards Source License Version 1.1 +# +# Sun Microsystems Inc., October, 2000 +# +# GNU Lesser General Public License Version 2.1 +# ============================================= +# Copyright 2000 by Sun Microsystems, Inc. +# 901 San Antonio Road, Palo Alto, CA 94303, USA +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License version 2.1, as published by the Free Software Foundation. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# +# +# Sun Industry Standards Source License Version 1.1 +# ================================================= +# The contents of this file are subject to the Sun Industry Standards +# Source License Version 1.1 (the "License"); You may not use this file +# except in compliance with the License. You may obtain a copy of the +# License at http://www.openoffice.org/license.html. +# +# Software provided under this License is provided on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, +# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, +# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. +# See the License for the specific provisions governing your rights and +# obligations concerning the Software. +# +# The Initial Developer of the Original Code is: Sun Microsystems, Inc. +# +# Copyright: 2000 by Sun Microsystems, Inc. +# +# All Rights Reserved. +# +# Contributor(s): _______________________________________ +# +# +# +#************************************************************************* + +PRJ= ..$/..$/.. +PRJINC= $(PRJ)$/source +PRJNAME= chart2 +TARGET= chcdrawinglayer + +ENABLE_EXCEPTIONS= TRUE + +# --- Settings ----------------------------------------------------- + +.INCLUDE: settings.mk + +# --- export library ------------------------------------------------- + +#object files to build and link together to lib $(SLB)$/$(TARGET).lib +SLOFILES= $(SLO)$/DrawModelWrapper.obj \ + $(SLO)$/DrawViewWrapper.obj \ + $(SLO)$/ViewElementListProvider.obj + +# --- Targets ----------------------------------------------------------------- + +.INCLUDE: target.mk + diff --git a/chart2/source/controller/inc/AxisItemConverter.hxx b/chart2/source/controller/inc/AxisItemConverter.hxx new file mode 100644 index 000000000..c17400483 --- /dev/null +++ b/chart2/source/controller/inc/AxisItemConverter.hxx @@ -0,0 +1,129 @@ +/************************************************************************* + * + * $RCSfile: AxisItemConverter.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:27 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef CHART_AXISITEMCONVERTER_HXX +#define CHART_AXISITEMCONVERTER_HXX + +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XAXIS_HPP_ +#include <drafts/com/sun/star/chart2/XAxis.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_EXPLICITSCALEDATA_HPP_ +#include <drafts/com/sun/star/chart2/ExplicitScaleData.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_EXPLICITINCREMENTDATA_HPP_ +#include <drafts/com/sun/star/chart2/ExplicitIncrementData.hpp> +#endif + +#include "ItemConverter.hxx" +#include "chartview/NumberFormatterWrapper.hxx" + +#include <vector> + +class SdrModel; + +namespace chart +{ +namespace wrapper +{ + +class AxisItemConverter : public ItemConverter +{ +public: + AxisItemConverter( + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertySet > & rPropertySet, + SfxItemPool& rItemPool, + SdrModel& rDrawModel, + NumberFormatterWrapper * pNumFormatter, + ::drafts::com::sun::star::chart2::ExplicitScaleData * pScale = NULL, + ::drafts::com::sun::star::chart2::ExplicitIncrementData * pIncrement = NULL, + double * pExplicitOrigin = NULL ); + virtual ~AxisItemConverter(); + + virtual void FillItemSet( SfxItemSet & rOutItemSet ) const; + virtual bool ApplyItemSet( const SfxItemSet & rItemSet ); + +protected: + virtual const USHORT * GetWhichPairs() const; + virtual bool GetItemPropertyName( USHORT nWhichId, ::rtl::OUString & rOutName ) const; + + virtual void FillSpecialItem( USHORT nWhichId, SfxItemSet & rOutItemSet ) const; + virtual bool ApplySpecialItem( USHORT nWhichId, const SfxItemSet & rItemSet ) const; + +private: + ::std::vector< ItemConverter * > m_aConverters; + ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XAxis > m_xAxis; + ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XBoundedCoordinateSystem > + m_xCoordinateSystem; + sal_Int32 m_nDimension; + NumberFormatterWrapper * m_pNumberFormatterWrapper; + + ::drafts::com::sun::star::chart2::ExplicitScaleData * m_pExplicitScale; + ::drafts::com::sun::star::chart2::ExplicitIncrementData * m_pExplicitIncrement; + double * m_pExplicitOrigin; +}; + +} // namespace wrapper +} // namespace chart + +// CHART_AXISITEMCONVERTER_HXX +#endif diff --git a/chart2/source/controller/inc/CharacterPropertyItemConverter.hxx b/chart2/source/controller/inc/CharacterPropertyItemConverter.hxx new file mode 100644 index 000000000..861af79ce --- /dev/null +++ b/chart2/source/controller/inc/CharacterPropertyItemConverter.hxx @@ -0,0 +1,100 @@ +/************************************************************************* + * + * $RCSfile: CharacterPropertyItemConverter.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:27 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef CHART_CHARACTERPROPERTYITEMCONVERTER_HXX +#define CHART_CHARACTERPROPERTYITEMCONVERTER_HXX + +#include "ItemConverter.hxx" + +#ifndef _COM_SUN_STAR_UNO_ANY_HXX_ +#include <com/sun/star/uno/Any.hxx> +#endif +#ifndef _COM_SUN_STAR_BEANS_PROPERTYSTATE_HPP_ +#include <com/sun/star/beans/PropertyState.hpp> +#endif + +namespace chart +{ +namespace wrapper +{ + +class CharacterPropertyItemConverter : + public ItemConverter +{ +public: + CharacterPropertyItemConverter( + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertySet > & rPropertySet, + SfxItemPool& rItemPool ); + virtual ~CharacterPropertyItemConverter(); + +protected: + virtual const USHORT * GetWhichPairs() const; + virtual bool GetItemPropertyName( USHORT nWhichId, ::rtl::OUString & rOutName ) const; + + virtual void FillSpecialItem( USHORT nWhichId, SfxItemSet & rOutItemSet ) const; + virtual bool ApplySpecialItem( USHORT nWhichId, const SfxItemSet & rItemSet ) const; +}; + +} // namespace wrapper +} // namespace chart + +// CHART_CHARACTERPROPERTYITEMCONVERTER_HXX +#endif diff --git a/chart2/source/controller/inc/DataPointItemConverter.hxx b/chart2/source/controller/inc/DataPointItemConverter.hxx new file mode 100644 index 000000000..3853bda01 --- /dev/null +++ b/chart2/source/controller/inc/DataPointItemConverter.hxx @@ -0,0 +1,110 @@ +/************************************************************************* + * + * $RCSfile: DataPointItemConverter.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:27 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef CHART_DATAPOINTITEMCONVERTER_HXX +#define CHART_DATAPOINTITEMCONVERTER_HXX + +#include "ItemConverter.hxx" +#include "GraphicPropertyItemConverter.hxx" +#include "chartview/NumberFormatterWrapper.hxx" + +#include <vector> + +class SdrModel; + +namespace chart +{ +namespace wrapper +{ + +class DataPointItemConverter : + public ItemConverter +{ +public: + DataPointItemConverter( + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertySet > & rPropertySet, + SfxItemPool& rItemPool, + SdrModel& rDrawModel, + NumberFormatterWrapper * pNumFormatter, + GraphicPropertyItemConverter::eGraphicObjectType eMapTo = + GraphicPropertyItemConverter::FILLED_DATA_POINT ); + virtual ~DataPointItemConverter(); + + virtual void FillItemSet( SfxItemSet & rOutItemSet ) const; + virtual bool ApplyItemSet( const SfxItemSet & rItemSet ); + +protected: + virtual const USHORT * GetWhichPairs() const; + virtual bool GetItemPropertyName( USHORT nWhichId, ::rtl::OUString & rOutName ) const; + + virtual void FillSpecialItem( USHORT nWhichId, SfxItemSet & rOutItemSet ) const; + virtual bool ApplySpecialItem( USHORT nWhichId, const SfxItemSet & rItemSet ) const; + +private: + ::std::vector< ItemConverter * > m_aConverters; + NumberFormatterWrapper * m_pNumberFormatterWrapper; +}; + +} // namespace wrapper +} // namespace chart + +// CHART_DATAPOINTITEMCONVERTER_HXX +#endif diff --git a/chart2/source/controller/inc/DrawViewWrapper.hxx b/chart2/source/controller/inc/DrawViewWrapper.hxx new file mode 100644 index 000000000..6898ffbb7 --- /dev/null +++ b/chart2/source/controller/inc/DrawViewWrapper.hxx @@ -0,0 +1,121 @@ +/************************************************************************* + * + * $RCSfile: DrawViewWrapper.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:27 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef _CHART2_DRAW_VIEW_WRAPPER_HXX +#define _CHART2_DRAW_VIEW_WRAPPER_HXX + +#ifndef _E3D_VIEW3D_HXX +#include <svx/view3d.hxx> +#endif + +class SdrModel; + +//............................................................................. +namespace chart +{ +//............................................................................. + +//----------------------------------------------------------------------------- +/** The DrawViewWrapper should help us to reduce effort if the underlying DrawingLayer changes. +Another task is to hide functionality we do not need, for example more than one page. +*/ + +class MarkHandleProvider +{ +public: + virtual bool getMarkHandles( SdrHdlList& rHdlList ) =0; + virtual bool getFrameDragSingles() =0; +}; + +class DrawViewWrapper : public E3dView +{ +public: + DrawViewWrapper(SdrModel* pModel, OutputDevice* pOut); + virtual ~DrawViewWrapper(); + + //fill list of selection handles 'aHdl' + virtual void SetMarkHandles(); + + //SdrPageView* GetPageView() { return m_pWrappedDLPageView; }; + + SdrObject* getHitObject( const Point& rPnt ) const; + //BOOL PickObj(const Point& rPnt, short nTol, SdrObject*& rpObj, SdrPageView*& rpPV, ULONG nOptions, SdrObject** ppRootObj, ULONG* pnMarkNum=NULL, USHORT* pnPassNum=NULL) const; + //BOOL PickObj(const Point& rPnt, short nTol, SdrObject*& rpObj, SdrPageView*& rpPV, ULONG nOptions=0) const; + //BOOL PickObj(const Point& rPnt, SdrObject*& rpObj, SdrPageView*& rpPV, ULONG nOptions=0) const { return PickObj(rPnt,nHitTolLog,rpObj,rpPV,nOptions); } + + //void MarkObj(SdrObject* pObj, SdrPageView* pPV, BOOL bUnmark=FALSE, BOOL bImpNoSetMarkHdl=FALSE); + void MarkObject( SdrObject* pObj ); + + //---------------------- + //pMarkHandleProvider can be NULL; ownership is not taken + void setMarkHandleProvider( MarkHandleProvider* pMarkHandleProvider ); + + void InitRedraw( OutputDevice* pOut, const Region& rReg ); + +private: + mutable SdrPageView* m_pWrappedDLPageView; + mutable MarkHandleProvider* m_pMarkHandleProvider; +}; + +//............................................................................. +} //namespace chart +//............................................................................. +#endif + diff --git a/chart2/source/controller/inc/GraphicPropertyItemConverter.hxx b/chart2/source/controller/inc/GraphicPropertyItemConverter.hxx new file mode 100644 index 000000000..2c068b4a0 --- /dev/null +++ b/chart2/source/controller/inc/GraphicPropertyItemConverter.hxx @@ -0,0 +1,122 @@ +/************************************************************************* + * + * $RCSfile: GraphicPropertyItemConverter.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:27 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef CHART_GRAPHICPROPERTYITEMCONVERTER_HXX +#define CHART_GRAPHICPROPERTYITEMCONVERTER_HXX + +#include "ItemConverter.hxx" + +#ifndef _COM_SUN_STAR_UNO_ANY_HXX_ +#include <com/sun/star/uno/Any.hxx> +#endif +#ifndef _COM_SUN_STAR_BEANS_PROPERTYSTATE_HPP_ +#include <com/sun/star/beans/PropertyState.hpp> +#endif + +class SdrModel; + +namespace chart +{ +namespace wrapper +{ + +class GraphicPropertyItemConverter : + public ItemConverter +{ +public: + enum eGraphicObjectType + { + FILLED_DATA_POINT, + LINE_DATA_POINT, + LINE_PROPERTIES, + FILL_PROPERTIES, + LINE_AND_FILL_PROPERTIES + }; + + GraphicPropertyItemConverter( + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertySet > & rPropertySet, + SfxItemPool& rItemPool, + SdrModel& rDrawModel, + eGraphicObjectType eObjectType = FILLED_DATA_POINT ); + virtual ~GraphicPropertyItemConverter(); + +protected: + virtual const USHORT * GetWhichPairs() const; + virtual bool GetItemPropertyName( USHORT nWhichId, ::rtl::OUString & rOutName ) const; + + virtual void FillSpecialItem( USHORT nWhichId, SfxItemSet & rOutItemSet ) const; + virtual bool ApplySpecialItem( USHORT nWhichId, const SfxItemSet & rItemSet ) const; + + void FillBitmapItem( USHORT nWhichId, SfxItemSet & rOutItemSet ) const + throw( ::com::sun::star::beans::UnknownPropertyException ); + void ApplyBitmapItem( USHORT nWhichId, const SfxItemSet & rItemSet ) const + throw( ::com::sun::star::beans::UnknownPropertyException ); + +private: + eGraphicObjectType m_eGraphicObjectType; + SdrModel & m_rDrawModel; +}; + +} // namespace wrapper +} // namespace chart + +// CHART_GRAPHICPROPERTYITEMCONVERTER_HXX +#endif diff --git a/chart2/source/controller/inc/HelpIds.hrc b/chart2/source/controller/inc/HelpIds.hrc new file mode 100644 index 000000000..489f868d7 --- /dev/null +++ b/chart2/source/controller/inc/HelpIds.hrc @@ -0,0 +1,142 @@ +/************************************************************************* + * + * $RCSfile: HelpIds.hrc,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:27 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef CHART_HELPIDS_HRC +#define CHART_HELPIDS_HRC + +#include <svtools/solar.hrc> + +//see old chart: schhids.h + +/* +#define HID_SCH_DATA_ROW (HID_SCH_START + 0) +#define HID_SCH_DATA_LINE (HID_SCH_START + 1) +#define HID_SCH_DATA_POINT (HID_SCH_START + 2) +#define HID_SCH_DIAGRAM_X_AXIS (HID_SCH_START + 3) +*/ +#define HID_SCH_ALIGNMENT (HID_SCH_START + 4) +#define HID_SCH_LEGEND_POS (HID_SCH_START + 5) +#define HID_SCH_DATA_DESCR (HID_SCH_START + 6) + +#define HID_SCH_SCALE_Y (HID_SCH_START + 7) + +#define HID_SCH_STAT (HID_SCH_START + 8) +/* +#define HID_SCH_WIN_DOCUMENT (HID_SCH_START + 9) +#define HID_SCH_CTL_DATA (HID_SCH_START + 10) +*/ +#define HID_SCH_CT_INDICATE (HID_SCH_START + 11) +#define HID_SCH_CT_REGRESS (HID_SCH_START + 12) +/* +#define HID_SCH_CT_1_CHARTTYPE (HID_SCH_START + 13) +#define HID_SCH_CT_2_CHARTVARIANT (HID_SCH_START + 14) +*/ +//for chart type dialog: +#define HID_SCH_CTL_TYPE (HID_SCH_START + 15) +#define HID_SCH_CTL_VARIANT (HID_SCH_START + 16) +#define HID_SCH_NUM_OF_LINES (HID_SCH_START + 43) +// +/* +#define HID_SCH_CTL_LIGHT (HID_SCH_START + 17) +*/ +#define HID_SCH_CT_INDICATE2 (HID_SCH_START + 18) +#define HID_SCH_CT_REGRESS2 (HID_SCH_START + 19) +/* +#define HID_SCH_TBI_EDIT_CANCEL (HID_SCH_START + 20) +#define HID_SCH_TBI_EDIT_ACCEPT (HID_SCH_START + 21) +#define HID_SCH_TBI_DATA_TRANSFER (HID_SCH_START + 22) +#define HID_SCH_TBI_DATA_INSERT_ROW (HID_SCH_START + 23) +#define HID_SCH_TBI_DATA_INSERT_COL (HID_SCH_START + 24) +#define HID_SCH_TBI_DATA_DELETE_ROW (HID_SCH_START + 25) +#define HID_SCH_TBI_DATA_DELETE_COL (HID_SCH_START + 26) +#define HID_SCH_TBI_DATA_SWAP_COL (HID_SCH_START + 27) +#define HID_SCH_TBI_DATA_SWAP_ROW (HID_SCH_START + 28) +#define HID_SCH_TBI_DATA_SORT_ROW (HID_SCH_START + 29) +#define HID_SCH_TBI_DATA_SORT_COL (HID_SCH_START + 30) +#define HID_SCH_TBI_DATA_SORT_TABLE_ROW (HID_SCH_START + 31) +#define HID_SCH_TBI_DATA_SORT_TABLE_COL (HID_SCH_START + 32) + +#define HID_SCH_TBX_EDIT (HID_SCH_START + 33) +#define HID_SCH_TBX_DATA (HID_SCH_START + 34) +*/ + +#define HID_SCH_ALIGNMENT_CTR_DIAL (HID_SCH_START + 35) +#define HID_SCH_ALIGNMENT_STACKED (HID_SCH_START + 36) +#define HID_SCH_ALIGNMENT_DEGREES (HID_SCH_START + 37) +/* +#define HID_SCH_LAYOUT (HID_SCH_START + 38) + +#define HID_SCH_TBX_EDIT_FIELD (HID_SCH_START + 39) +#define HID_SCH_DIAGRAM_Y_AXIS (HID_SCH_START + 40)//war mal 3 + +#define HID_SCH_DEF_COLOR (HID_SCH_START + 41) +*/ +#define HID_SCH_TP_AXIS_LABEL (HID_SCH_START + 42) + +#define HID_SCH_CHART_AUTO_FORMAT (HID_SCH_START + 44) + +// HID_SCH_START should be 63280 (checked 25.Nov 2002) + +// 453 == SCH_IF_CHARTVIEWSHELL, da SFX_INTERFACE_LIB kein +// Define sondern neuerdings ein Enum ist +//#define HID_SCH_VIEWSHELL_DOCUMENT (453) + + +#endif diff --git a/chart2/source/controller/inc/ItemConverter.hxx b/chart2/source/controller/inc/ItemConverter.hxx new file mode 100644 index 000000000..e7176feeb --- /dev/null +++ b/chart2/source/controller/inc/ItemConverter.hxx @@ -0,0 +1,235 @@ +/************************************************************************* + * + * $RCSfile: ItemConverter.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:27 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef CHART_ITEMCONVERTER_HXX +#define CHART_ITEMCONVERTER_HXX + +#ifndef _CPPUHELPER_IMPLBASE1_HXX_ +#include <cppuhelper/implbase1.hxx> +#endif + +#ifndef _SFXITEMPOOL_HXX +#include <svtools/itempool.hxx> +#endif +#ifndef _SFXITEMSET_HXX +#include <svtools/itemset.hxx> +#endif +// #ifndef _SVX_UNOIPSET_HXX_ +// #include <svx/unoipset.hxx> +// #endif + +#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_ +#include <com/sun/star/beans/XPropertySet.hpp> +#endif +#ifndef _COM_SUN_STAR_LANG_XEVENTLISTENER_HPP_ +#include <com/sun/star/lang/XEventListener.hpp> +#endif + +class SfxItemPropertyMap; + +namespace chart +{ +namespace wrapper +{ + +/** This class serves for conversion between properties of an XPropertySet and + SfxItems in SfxItemSets. + + <p>With this helper classes, you can feed dialogs with XPropertySets and let + those modify by the dialogs.</p> + + <p>You must implement GetWhichPairs() such that an SfxItemSet created with + CreateEmptyItemSet() is able to hold all items that may be mapped.</p> + + <p>You also have to implement GetItemPropertyName(), in order to return the + property name for a given which-id.</p> + + <p>FillSpecialItem and ApplySpecialItem may be used for special handling of + individual item, e.g. if you need member-ids in QueryValue/PutValue</p> + */ +class ItemConverter : + public ::cppu::WeakImplHelper1< + ::com::sun::star::lang::XEventListener + > +{ +public: + /** Construct an item converter that uses the given property set for + reading/writing converted items + */ + ItemConverter( + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertySet > & rPropertySet , + SfxItemPool& rItemPool ); + virtual ~ItemConverter(); + + /** applies all properties that can be mapped to items into the given item + set. + + <p>Call this method before opening a dialog.</p> + + @param rOutItemSet the SfxItemSet is filled with all items that are a + result of a conversion from a property of the internal + XPropertySet. + */ + virtual void FillItemSet( SfxItemSet & rOutItemSet ) const; + + /** applies all properties that are results of a conversion from all items + in rItemSet to the internal XPropertySet. + + <p>Call this method after a dialog was closed with OK</p> + + @return true, if any properties have been changed, false otherwise. + */ + virtual bool ApplyItemSet( const SfxItemSet & rItemSet ); + + /** creates an empty item set using the given pool + or a common pool if empty (see GetItemPool) and + allowing all items given in the ranges returned by GetWhichPairs. + */ + SfxItemSet CreateEmptyItemSet() const; + + /** States whether conversion is still likely to work. + + <p>In particular, it is checked if the XPropertySet given in the CTOR is + still valid, i.e. not disposed. It is assumed that the XPropertySet is + valid when the converter is constructed.</p> + + <p>This only works if the XPropertySet given in the CTOR supports the + interface ::com::sun::star::lang::XComponent.</p> + */ + bool IsValid() const; + + /// creates a pure chart item pool + static SfxItemPool* CreateSchItemPool(); + + static void InvalidateUnequalItems( SfxItemSet &rDestSet, const SfxItemSet &rSourceSet ); + +protected: + // ________ + + /** implement this method to provide an array of which-ranges of the form: + + <pre> + const USHORT aMyPairs[] = + { + from_1, to_1, + from_2, to_2, + ... + from_n, to_n, + 0 + }; + </pre> + */ + virtual const USHORT * GetWhichPairs() const = 0; + + /** implement this method to return a Property object for a given which id. + + @param rOutName If </TRUE> is returned, this contains the property name. + + @return </TRUE>, if the item can be mapped to a property. + */ + virtual bool GetItemPropertyName( USHORT nWhichId, ::rtl::OUString & rOutName ) const; + + /** for items that can not be mapped directly to a property. + + This method is called from FillItemSet(), if GetItemPropertyName() returns + false. + */ + virtual void FillSpecialItem( USHORT nWhichId, SfxItemSet & rOutItemSet ) const; + + /** for items that can not be mapped directly to a property. + + This method is called from ApplyItemSet(), if GetItemPropertyName() returns + false. + + @return </TRUE> if the item changed a property, </FALSE> otherwise. + */ + virtual bool ApplySpecialItem( USHORT nWhichId, const SfxItemSet & rItemSet ) const; + + // ________ + + /// Returns the pool + SfxItemPool & GetItemPool() const; + + /** Returns the XPropertySet that was given in the CTOR and is used to apply + items in ApplyItemSet(). + */ + ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertySet > GetPropertySet() const; + + // ____ XEventListener ____ + virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) + throw (::com::sun::star::uno::RuntimeException); + +private: + ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertySet > m_xPropertySet; + ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertySetInfo > m_xPropertySetInfo; + + SfxItemPool& m_rItemPool; + bool m_bIsValid; +}; + +} // namespace wrapper +} // namespace chart + +// CHART_ITEMCONVERTER_HXX +#endif diff --git a/chart2/source/controller/inc/ItemPropertyMap.hxx b/chart2/source/controller/inc/ItemPropertyMap.hxx new file mode 100644 index 000000000..7fb51e46f --- /dev/null +++ b/chart2/source/controller/inc/ItemPropertyMap.hxx @@ -0,0 +1,119 @@ +/************************************************************************* + * + * $RCSfile: ItemPropertyMap.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:27 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef CHART_ITEMPROPERTYMAP_HXX +#define CHART_ITEMPROPERTYMAP_HXX + +#include "InlineContainer.hxx" + +namespace chart +{ +namespace wrapper +{ + +typedef ::std::map< USHORT, ::rtl::OUString > ItemPropertyMapType; +typedef ::comphelper::MakeMap< USHORT, ::rtl::OUString > MakeItemPropertyMap; + +class FillItemSetFunc : public ::std::unary_function< void, ItemConverter * > +{ +public: + explicit FillItemSetFunc( SfxItemSet & rOutItemSet ) : + m_rOutItemSet( rOutItemSet ) + {} + + void operator() ( ItemConverter * pConv ) + { + pConv->FillItemSet( m_rOutItemSet ); + } + +private: + SfxItemSet & m_rOutItemSet; +}; + +class ApplyItemSetFunc : public ::std::unary_function< void, ItemConverter * > +{ +public: + explicit ApplyItemSetFunc( const SfxItemSet & rItemSet, + bool & rOutResult ) : + m_rItemSet( rItemSet ), + m_rOutResult( rOutResult ) + {} + + void operator() ( ItemConverter * pConv ) + { + m_rOutResult = pConv->ApplyItemSet( m_rItemSet ) || m_rOutResult; + } + +private: + const SfxItemSet & m_rItemSet; + bool & m_rOutResult; +}; + +struct DeleteItemConverterPtr : public ::std::unary_function< void, ItemConverter * > +{ + void operator() ( ItemConverter * pConv ) + { delete pConv; } +}; + +} // namespace wrapper +} // namespace chart + +// CHART_ITEMPROPERTYMAP_HXX +#endif diff --git a/chart2/source/controller/inc/MultipleItemConverter.hxx b/chart2/source/controller/inc/MultipleItemConverter.hxx new file mode 100644 index 000000000..8284a0254 --- /dev/null +++ b/chart2/source/controller/inc/MultipleItemConverter.hxx @@ -0,0 +1,138 @@ +/************************************************************************* + * + * $RCSfile: MultipleItemConverter.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:27 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef CHART_ALLAXISITEMCONVERTER_HXX +#define CHART_ALLAXISITEMCONVERTER_HXX + +#ifndef _COM_SUN_STAR_FRAME_XMODEL_HPP_ +#include <com/sun/star/frame/XModel.hpp> +#endif + +#include "ItemConverter.hxx" + +#include <vector> + +class SdrModel; + +namespace chart +{ +namespace wrapper +{ + +class MultipleItemConverter : public ItemConverter +{ +public: + virtual ~MultipleItemConverter(); + + virtual void FillItemSet( SfxItemSet & rOutItemSet ) const; + virtual bool ApplyItemSet( const SfxItemSet & rItemSet ); + +protected: + MultipleItemConverter( SfxItemPool& rItemPool ); + + ::std::vector< ItemConverter * > m_aConverters; +}; + +class AllAxisItemConverter : public MultipleItemConverter +{ +public: + AllAxisItemConverter( + const ::com::sun::star::uno::Reference< + ::com::sun::star::frame::XModel > & xChartModel, + SfxItemPool& rItemPool, + SdrModel& rDrawModel ); + virtual ~AllAxisItemConverter(); + +protected: + virtual const USHORT * GetWhichPairs() const; +}; + +class AllGridItemConverter : public MultipleItemConverter +{ +public: + AllGridItemConverter( + const ::com::sun::star::uno::Reference< + ::com::sun::star::frame::XModel > & xChartModel, + SfxItemPool& rItemPool, + SdrModel& rDrawModel ); + virtual ~AllGridItemConverter(); + +protected: + virtual const USHORT * GetWhichPairs() const; +}; + +class AllDataLabelItemConverter : public MultipleItemConverter +{ +public: + AllDataLabelItemConverter( + const ::com::sun::star::uno::Reference< + ::com::sun::star::frame::XModel > & xChartModel, + SfxItemPool& rItemPool, + SdrModel& rDrawModel ); + virtual ~AllDataLabelItemConverter(); + +protected: + virtual const USHORT * GetWhichPairs() const; +}; + +} // namespace wrapper +} // namespace chart + +#endif diff --git a/chart2/source/controller/inc/SchSlotIds.hxx b/chart2/source/controller/inc/SchSlotIds.hxx new file mode 100644 index 000000000..b4efbfd9e --- /dev/null +++ b/chart2/source/controller/inc/SchSlotIds.hxx @@ -0,0 +1,183 @@ +/************************************************************************* + * + * $RCSfile: SchSlotIds.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:27 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef SCH_SLOTIDS_HXX +#define SCH_SLOTIDS_HXX + +// header for SID_OBJ1_START +#ifndef _SFXSIDS_HRC +#include <sfx2/sfxsids.hrc> +#endif + +// SID_OBJ1_START == 30000 + 512 +#define SID_COPYFORMAT SID_OBJ1_START + +#define SID_PASTEFORMAT (SID_OBJ1_START + 1) +#define SID_DIAGRAM_DATA (SID_OBJ1_START + 2) +#define SID_INSERT_TITLE (SID_OBJ1_START + 3) +#define SID_INSERT_CHART_LEGEND (SID_OBJ1_START + 4) +#define SID_INSERT_DESCRIPTION (SID_OBJ1_START + 5) +#define SID_INSERT_AXIS (SID_OBJ1_START + 6) +#define SID_DATA_ROW_POINT (SID_OBJ1_START + 7) +#define SID_CHART_TITLE (SID_OBJ1_START + 8) +#define SID_LEGEND (SID_OBJ1_START + 9) +#define SID_DIAGRAM_AXIS (SID_OBJ1_START + 10) +#define SID_DIAGRAM_GRID (SID_OBJ1_START + 11) +#define SID_DIAGRAM_WALL (SID_OBJ1_START + 12) +#define SID_DIAGRAM_FLOOR (SID_OBJ1_START + 13) +#define SID_DIAGRAM_AREA (SID_OBJ1_START + 14) +#define SID_3D_VIEW (SID_OBJ1_START + 15) +#define SID_DIAGRAM_TYPE (SID_OBJ1_START + 16) +#define SID_TOGGLE_TITLE (SID_OBJ1_START + 17) +#define SID_TOGGLE_LEGEND (SID_OBJ1_START + 18) +#define SID_TOGGLE_AXIS_TITLE (SID_OBJ1_START + 19) +#define SID_TOGGLE_AXIS_DESCR (SID_OBJ1_START + 20) // 30532 +#define SID_TOGGLE_GRID_HORZ (SID_OBJ1_START + 21) +#define SID_TOGGLE_GRID_VERT (SID_OBJ1_START + 22) +#define SID_DATA_IN_ROWS (SID_OBJ1_START + 23) +#define SID_DATA_IN_COLUMNS (SID_OBJ1_START + 24) +#define SID_TOOL_SELECT (SID_OBJ1_START + 25) +#define SID_CONTEXT_TYPE (SID_OBJ1_START + 26) +#define SID_NEW_ARRANGEMENT (SID_OBJ1_START + 27) // 30539 +#define SID_INSERT_GRIDS (SID_OBJ1_START + 28) + +#define SID_MAINTITLE (SID_OBJ1_START + 29) +#define SID_SUBTITLE (SID_OBJ1_START + 30) +#define SID_XAXIS_TITLE (SID_OBJ1_START + 31) +#define SID_YAXIS_TITLE (SID_OBJ1_START + 32) +#define SID_ZAXIS_TITLE (SID_OBJ1_START + 33) + +#ifdef SID_UPDATE +#undef SID_UPDATE +#endif +#define SID_UPDATE (SID_OBJ1_START + 34) + +// DataCollection +#define SID_DATA (SID_OBJ1_START + 35) +#define SID_ADD_COLUMN (SID_OBJ1_START + 36) +#define SID_ADD_ROW (SID_OBJ1_START + 37) + +#define SID_DIAGRAM_AXIS_X (SID_OBJ1_START + 40) +#define SID_DIAGRAM_AXIS_Y (SID_OBJ1_START + 41) +#define SID_DIAGRAM_AXIS_Z (SID_OBJ1_START + 42) +#define SID_DIAGRAM_AXIS_ALL (SID_OBJ1_START + 43) +#define SID_INSERT_STATISTICS (SID_OBJ1_START + 44) +#define SID_DIAGRAM_TITLE_MAIN (SID_OBJ1_START + 45) +#define SID_DIAGRAM_TITLE_SUB (SID_OBJ1_START + 46) +#define SID_DIAGRAM_TITLE_X (SID_OBJ1_START + 47) +#define SID_DIAGRAM_TITLE_Y (SID_OBJ1_START + 48) +#define SID_DIAGRAM_TITLE_Z (SID_OBJ1_START + 49) +#define SID_DIAGRAM_TITLE_ALL (SID_OBJ1_START + 50) +#define SID_DIAGRAM_GRID_Y_MAIN (SID_OBJ1_START + 51) +#define SID_DIAGRAM_GRID_X_MAIN (SID_OBJ1_START + 52) +#define SID_DIAGRAM_GRID_Z_MAIN (SID_OBJ1_START + 53) +#define SID_DIAGRAM_GRID_ALL (SID_OBJ1_START + 54) + +#define SID_HAS_X_DESCR (SID_OBJ1_START + 55) +#define SID_HAS_Y_DESCR (SID_OBJ1_START + 56) +#define SID_HAS_Z_DESCR (SID_OBJ1_START + 57) + +#define SID_DIAGRAM_OBJECTS (SID_OBJ1_START + 60) + +#define SID_HAS_X_TITLE (SID_OBJ1_START + 61) +#define SID_HAS_Y_TITLE (SID_OBJ1_START + 62) +#define SID_HAS_Z_TITLE (SID_OBJ1_START + 63) +#define SID_HAS_MAIN_TITLE (SID_OBJ1_START + 64) +#define SID_HAS_SUB_TITLE (SID_OBJ1_START + 65) + +#define SID_DIAGRAM_GRID_Y_HELP (SID_OBJ1_START + 66) +#define SID_DIAGRAM_GRID_X_HELP (SID_OBJ1_START + 67) +#define SID_DIAGRAM_GRID_Z_HELP (SID_OBJ1_START + 68) + +#define SID_DIAGRAM_DATA_WIN (SID_OBJ1_START + 70) + +#define SID_DIAGRAM_ERROR (SID_OBJ1_START + 71) +#define SID_DIAGRAM_AVERAGEVALUE (SID_OBJ1_START + 72) +#define SID_DIAGRAM_REGRESSION (SID_OBJ1_START + 73) +#define SID_SCALE_TEXT (SID_OBJ1_START + 74) +#define SID_TEXTBREAK (SID_OBJ1_START + 75) + +#define SID_DIAGRAM_DATADESCRIPTION (SID_OBJ1_START + 76) +#define SID_DIAGRAM_POSLEGEND (SID_OBJ1_START + 77) +#define SID_DIAGRAM_DEFAULTCOLORS (SID_OBJ1_START + 78) +#define SID_DIAGRAM_BARWIDTH (SID_OBJ1_START + 79) +#define SID_DIAGRAM_NUMLINES (SID_OBJ1_START + 80) + + +#define SID_ROW_POSITION (SID_OBJ1_START + 81) +#define SID_ROW_MOREFRONT (SID_OBJ1_START + 82) +#define SID_ROW_MOREBACK (SID_OBJ1_START + 83) + +// Title-Object +#define SID_TITLE_TEXT (SID_OBJ1_START + 100) + +#define SID_DIAGRAM_STOCK_LINE (SID_OBJ1_START + 101) +#define SID_DIAGRAM_STOCK_LOSS (SID_OBJ1_START + 102) +#define SID_DIAGRAM_STOCK_PLUS (SID_OBJ1_START + 103) + + +#define SID_DIAGRAM_AXIS_A (SID_OBJ1_START + 104) +#define SID_DIAGRAM_AXIS_B (SID_OBJ1_START + 105) +#define SID_DIAGRAM_AXIS_C (SID_OBJ1_START + 106) + +// Reserved till (SID_OBJ1_START + 110) + +#endif +// SCH_SLOTIDS_HXX diff --git a/chart2/source/controller/inc/TitleItemConverter.hxx b/chart2/source/controller/inc/TitleItemConverter.hxx new file mode 100644 index 000000000..1168d3290 --- /dev/null +++ b/chart2/source/controller/inc/TitleItemConverter.hxx @@ -0,0 +1,104 @@ +/************************************************************************* + * + * $RCSfile: TitleItemConverter.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:27 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef CHART_TITLEITEMCONVERTER_HXX +#define CHART_TITLEITEMCONVERTER_HXX + +#include "ItemConverter.hxx" + +#include <vector> + +class SdrModel; + +namespace chart +{ +namespace wrapper +{ + +class TitleItemConverter : + public ItemConverter +{ +public: + TitleItemConverter( + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertySet > & rPropertySet, + SfxItemPool& rItemPool, + SdrModel& rDrawModel ); + virtual ~TitleItemConverter(); + + virtual void FillItemSet( SfxItemSet & rOutItemSet ) const; + virtual bool ApplyItemSet( const SfxItemSet & rItemSet ); + +protected: + virtual const USHORT * GetWhichPairs() const; + virtual bool GetItemPropertyName( USHORT nWhichId, ::rtl::OUString & rOutName ) const; + + virtual void FillSpecialItem( USHORT nWhichId, SfxItemSet & rOutItemSet ) const; + virtual bool ApplySpecialItem( USHORT nWhichId, const SfxItemSet & rItemSet ) const; + +private: + ::std::vector< ItemConverter * > m_aConverters; +}; + +} // namespace wrapper +} // namespace chart + +// CHART_TITLEITEMCONVERTER_HXX +#endif diff --git a/chart2/source/controller/inc/ViewElementListProvider.hxx b/chart2/source/controller/inc/ViewElementListProvider.hxx new file mode 100644 index 000000000..ccea24ce6 --- /dev/null +++ b/chart2/source/controller/inc/ViewElementListProvider.hxx @@ -0,0 +1,129 @@ +/************************************************************************* + * + * $RCSfile: ViewElementListProvider.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:27 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef _CHART2_VIEWELEMENTLISTPROVIDER_HXX +#define _CHART2_VIEWELEMENTLISTPROVIDER_HXX + +#ifndef _XTABLE_HXX +#include <svx/xtable.hxx> +#endif +#ifndef _SVDPAGE_HXX +#include <svx/svdpage.hxx> +#endif + +class FontList; +class SvNumberFormatter; + +//............................................................................. +namespace chart +{ +//............................................................................. + +class DrawModelWrapper; +class NumberFormatterWrapper; + +class ViewElementListProvider +{ +public: + ViewElementListProvider( DrawModelWrapper* pDrawModelWrapper, NumberFormatterWrapper* pNumberFormatterWrapper ); + virtual ~ViewElementListProvider(); + + XColorTable* GetColorTable() const;//from class SdrModel + XDashList* GetDashList() const;//from class SdrModel + XLineEndList* GetLineEndList() const;//from class SdrModel + XGradientList* GetGradientList() const;//from class SdrModel + XHatchList* GetHatchList() const;//from class SdrModel + XBitmapList* GetBitmapList() const;//from class SdrModel + + //create chartspecific symbols for linecharts + SdrObjList* GetSymbolList() const;// in old chart called GetSdrObjList + + FontList* getFontList() const; + //SfxPrinter* getPrinter(); + + //infrastructure + /** introduced for #101318#: + + The chart-internal number formatter is necessary to render values for + the UI with a higher standard precision than the one you might get + externally (from Calc). As you should not modify the precision of an + external number formatter, this one comes in handy. + + Note that for the dialog only the standard format is used, i.e., any + user-defined formats that are only available in the external formatter + are not required here. + + This method is used by SchAttribTabDlg::PageCreated (attrib.cxx) + + @returns the chart internal number formatter + */ + SvNumberFormatter * GetOwnNumberFormatter() const; + SvNumberFormatter * GetNumFormatter() const; + +private: + DrawModelWrapper* m_pDrawModelWrapper; + mutable FontList* m_pFontList; + mutable NumberFormatterWrapper* m_pNumberFormatterWrapper; +}; + +//............................................................................. +} //namespace chart +//............................................................................. +#endif diff --git a/chart2/source/controller/inc/dlg_ChartType.hxx b/chart2/source/controller/inc/dlg_ChartType.hxx new file mode 100644 index 000000000..8cd9308e2 --- /dev/null +++ b/chart2/source/controller/inc/dlg_ChartType.hxx @@ -0,0 +1,209 @@ +/************************************************************************* + * + * $RCSfile: dlg_ChartType.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:27 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef _CHART2_DLG_CHARTTYPE_HXX +#define _CHART2_DLG_CHARTTYPE_HXX + +/* +#ifndef _SCH_DIAGRTYP_HXX_ +#define _SCH_DIAGRTYP_HXX_ + +#ifndef _SV_BUTTON_HXX //autogen +#include <vcl/button.hxx> +#endif +#ifndef _SV_FIXED_HXX //autogen +#include <vcl/fixed.hxx> +#endif +#ifndef _SV_FIELD_HXX //autogen +#include <vcl/field.hxx> +#endif +#ifndef _VALUESET_HXX //autogen +#include <svtools/valueset.hxx> +#endif +#ifndef _SV_DIALOG_HXX //autogen +#include <vcl/dialog.hxx> +#endif +#ifndef _SFXITEMSET_HXX //autogen +#include <svtools/itemset.hxx> +#endif +*/ + +// header for class ModalDialog +#ifndef _SV_DIALOG_HXX +#include <vcl/dialog.hxx> +#endif +// header for class RadioButton +#ifndef _SV_BUTTON_HXX +#include <vcl/button.hxx> +#endif +// header for class FixedLine +#ifndef _SV_FIXED_HXX +#include <vcl/fixed.hxx> +#endif +// header for class MetricField +#ifndef _SV_FIELD_HXX +#include <vcl/field.hxx> +#endif +// header for class ValueSet +#ifndef _VALUESET_HXX +#include <svtools/valueset.hxx> +#endif +// header for class SfxItemSet +#ifndef _SFXITEMSET_HXX +#include <svtools/itemset.hxx> +#endif + +//............................................................................. +namespace chart +{ +//............................................................................. + +enum ChartDimension +{ + CHDIM_2D, + CHDIM_3D +}; + +#define CHDIM_COUNT (CHDIM_3D + 1) + +/************************************************************************* +|* +|* Dialog zur Auswahl eines Diagrammtyps +|* +\************************************************************************/ +class SchDiagramTypeDlg : public ModalDialog +{ +private: + long n3DGeometry; + RadioButton aRbt2D; + RadioButton aRbt3D; + FixedLine aFlDimension; + FixedText aFtDeep; + MetricField aMtrFldDeep; + FixedText aFtGran; + MetricField aMtrFldGran; + FixedText aFtNumLines; + MetricField aMtrFldNumLines; + + FixedText aFtType; + ValueSet aCtlType; + FixedText aFtVariant; + ValueSet aCtlVariant; + OKButton aBtnOK; + CancelButton aBtnCancel; + HelpButton aBtnHelp; + ChartDimension eDimension; + + const SfxItemSet& rOutAttrs; + + void Reset(); + + void FillTypeSet(ChartDimension eDim, bool bForce=false); + void FillVariantSet(USHORT nType); + + DECL_LINK(SelectDimensionHdl, void*); + DECL_LINK(SelectTypeHdl, void*); + DECL_LINK(DoubleClickHdl, void*); + DECL_LINK(ClickHdl, void*); + + void SwitchDepth (USHORT nID); + + /** Hides/Shows the controls for line/bar combination chart according to the + chart type id given as nID. + */ + void SwitchNumLines( USHORT nID ); + + void FillValueSets(); + +public: + SchDiagramTypeDlg(Window* pWindow, const SfxItemSet& rInAttrs); + virtual ~SchDiagramTypeDlg(); + + void GetAttr(SfxItemSet& rOutAttrs); +// int GetDepth(); +// void SetDepth( int nDeep ); + +// int GetGranularity(); +// void SetGranularity( int nGranularity ); + + /** The value set here determines the maximum number of lines in a line/bar + combination chart. This should usually be one less than the number of + series, such that at least one series remains a bar. + */ + void SetMaximumNumberOfLines( long nMaxLines ); + /** set the current number of lines that are used in a line/bar combination + chart. + */ +// void SetNumberOfLines( long nLines ); + /** get the number of lines that should be used for a line/bar combination + chart. This has to be set before to be meaningful + */ +// long GetNumberOfLines() const; + + virtual void DataChanged( const DataChangedEvent& rDCEvt ); +}; + +//............................................................................. +} //namespace chart +//............................................................................. + +#endif + + diff --git a/chart2/source/controller/inc/dlg_InsertAxis_Grid.hxx b/chart2/source/controller/inc/dlg_InsertAxis_Grid.hxx new file mode 100644 index 000000000..4e0640568 --- /dev/null +++ b/chart2/source/controller/inc/dlg_InsertAxis_Grid.hxx @@ -0,0 +1,142 @@ +/************************************************************************* + * + * $RCSfile: dlg_InsertAxis_Grid.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:27 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef _CHART2_DLG_INSERT_AXIS_GRID_HXX +#define _CHART2_DLG_INSERT_AXIS_GRID_HXX + +// header for class ModalDialog +#ifndef _SV_DIALOG_HXX +#include <vcl/dialog.hxx> +#endif +// header for class FixedLine +#ifndef _SV_FIXED_HXX +#include <vcl/fixed.hxx> +#endif +// header for class CheckBox +#ifndef _SV_BUTTON_HXX +#include <vcl/button.hxx> +#endif + +#ifndef _COM_SUN_STAR_UNO_SEQUENCE_HXX_ +#include <com/sun/star/uno/Sequence.hxx> +#endif + +//............................................................................. +namespace chart +{ +//............................................................................. + +struct InsertMeterDialogData +{ + ::com::sun::star::uno::Sequence< sal_Bool > aPossibilityList; + ::com::sun::star::uno::Sequence< sal_Bool > aExistenceList; + + InsertMeterDialogData(); +}; + +/************************************************************************* +|* +|* insert Axis dialog (also base for grid dialog) +|* +\************************************************************************/ +class SchAxisDlg : public ModalDialog +{ +protected: + FixedLine aFlPrimary; + FixedLine aFlPrimaryGrid; + CheckBox aCbPrimaryX; + CheckBox aCbPrimaryY; + CheckBox aCbPrimaryZ; + + FixedLine aFlSecondary; + FixedLine aFlSecondaryGrid; + CheckBox aCbSecondaryX; + CheckBox aCbSecondaryY; + CheckBox aCbSecondaryZ; + + OKButton aPbOK; + CancelButton aPbCancel; + HelpButton aPbHelp; + +public: + SchAxisDlg( Window* pParent, const InsertMeterDialogData& rInput, BOOL bAxisDlg=true ); + virtual ~SchAxisDlg(); + + void getResult( InsertMeterDialogData& rOutput ); +}; + + +/************************************************************************* +|* +|* Grid dialog +|* +\************************************************************************/ +class SchGridDlg : public SchAxisDlg +{ +public: + SchGridDlg( Window* pParent, const InsertMeterDialogData& rInput ); + virtual ~SchGridDlg(); +}; + +//............................................................................. +} //namespace chart +//............................................................................. + +#endif diff --git a/chart2/source/controller/inc/dlg_InsertDataLabel.hxx b/chart2/source/controller/inc/dlg_InsertDataLabel.hxx new file mode 100644 index 000000000..06dfc035a --- /dev/null +++ b/chart2/source/controller/inc/dlg_InsertDataLabel.hxx @@ -0,0 +1,122 @@ +/************************************************************************* + * + * $RCSfile: dlg_InsertDataLabel.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:27 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef _CHART2_DLG_INSERT_DATALABELS_GRID_HXX +#define _CHART2_DLG_INSERT_DATALABELS_GRID_HXX + +// header for class ModalDialog +#ifndef _SV_DIALOG_HXX +#include <vcl/dialog.hxx> +#endif +// header for class FixedLine +#ifndef _SV_FIXED_HXX +#include <vcl/fixed.hxx> +#endif +// header for class CheckBox +#ifndef _SV_BUTTON_HXX +#include <vcl/button.hxx> +#endif +// header for class SfxItemSet +#ifndef _SFXITEMSET_HXX +#include <svtools/itemset.hxx> +#endif + +//............................................................................. +namespace chart +{ +//............................................................................. + +/************************************************************************* +|* +|* Datenbeschriftungen-Dialog +|* +\************************************************************************/ +class SchDataDescrDlg : public ModalDialog +{ +private: + CheckBox aCbValue; + RadioButton aRbNumber; + RadioButton aRbPercent; + CheckBox aCbText; + FixedLine aFlDescr; + CheckBox aCbSymbol; + OKButton aBtnOK; + CancelButton aBtnCancel; + HelpButton aBtnHelp; + + const SfxItemSet& rOutAttrs; + + DECL_LINK( EnableHdl, CheckBox * ); + + void Reset(); + +public: + SchDataDescrDlg(Window* pParent, const SfxItemSet& rInAttrs); + virtual ~SchDataDescrDlg(); + + void GetAttr(SfxItemSet& rOutAttrs); +}; + +//............................................................................. +} //namespace chart +//............................................................................. + +#endif + diff --git a/chart2/source/controller/inc/dlg_InsertLegend.hxx b/chart2/source/controller/inc/dlg_InsertLegend.hxx new file mode 100644 index 000000000..ae23abe5f --- /dev/null +++ b/chart2/source/controller/inc/dlg_InsertLegend.hxx @@ -0,0 +1,122 @@ +/************************************************************************* + * + * $RCSfile: dlg_InsertLegend.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:27 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef _CHART2_DLG_INSERT_LEGEND_GRID_HXX +#define _CHART2_DLG_INSERT_LEGEND_GRID_HXX + +// header for class ModalDialog +#ifndef _SV_DIALOG_HXX +#include <vcl/dialog.hxx> +#endif +// header for class FixedLine +#ifndef _SV_FIXED_HXX +#include <vcl/fixed.hxx> +#endif +// header for class CheckBox +#ifndef _SV_BUTTON_HXX +#include <vcl/button.hxx> +#endif +// header for class SfxItemSet +#ifndef _SFXITEMSET_HXX +#include <svtools/itemset.hxx> +#endif + +//............................................................................. +namespace chart +{ +//............................................................................. + + +/************************************************************************* +|* +|* Legenden-Dialog +|* +\************************************************************************/ +class SchLegendDlg : public ModalDialog +{ +private: + CheckBox aCbxShow; + RadioButton aRbtLeft; + RadioButton aRbtTop; + RadioButton aRbtRight; + RadioButton aRbtBottom; + FixedLine aFlLegend; + OKButton aBtnOK; + CancelButton aBtnCancel; + HelpButton aBtnHelp; + + const SfxItemSet& rOutAttrs; + + void Reset(); + DECL_LINK (CbxClick, CheckBox *); + +public: + SchLegendDlg(Window* pParent, const SfxItemSet& rInAttrs); + virtual ~SchLegendDlg(); + + void GetAttr(SfxItemSet& rOutAttrs); +}; + +//............................................................................. +} //namespace chart +//............................................................................. + +#endif + diff --git a/chart2/source/controller/inc/dlg_InsertTitle.hxx b/chart2/source/controller/inc/dlg_InsertTitle.hxx new file mode 100644 index 000000000..c600fc715 --- /dev/null +++ b/chart2/source/controller/inc/dlg_InsertTitle.hxx @@ -0,0 +1,132 @@ +/************************************************************************* + * + * $RCSfile: dlg_InsertTitle.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:27 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef _CHART2_DLG_INSERT_TITLE_GRID_HXX +#define _CHART2_DLG_INSERT_TITLE_GRID_HXX + +// header for class ModalDialog +#ifndef _SV_DIALOG_HXX +#include <vcl/dialog.hxx> +#endif +// header for class Edit +#ifndef _SV_EDIT_HXX +#include <vcl/edit.hxx> +#endif +// header for class CheckBox +#ifndef _SV_BUTTON_HXX +#include <vcl/button.hxx> +#endif + +#ifndef _COM_SUN_STAR_UNO_SEQUENCE_HXX_ +#include <com/sun/star/uno/Sequence.hxx> +#endif + +//............................................................................. +namespace chart +{ +//............................................................................. + +struct InsertTitleDialogData +{ + ::com::sun::star::uno::Sequence< sal_Bool > aPossibilityList; + ::com::sun::star::uno::Sequence< sal_Bool > aExistenceList; + ::com::sun::star::uno::Sequence< rtl::OUString > aTextList; + + InsertTitleDialogData(); +}; + +/************************************************************************* +|* +|* Titel-Dialog +|* +\************************************************************************/ + +class SchTitleDlg : public ModalDialog +{ +private: + CheckBox aCbxMain; + Edit aEdtMain; + CheckBox aCbxSub; + Edit aEdtSub; + CheckBox aCbxXAxis; + Edit aEdtXAxis; + CheckBox aCbxYAxis; + Edit aEdtYAxis; + CheckBox aCbxZAxis; + Edit aEdtZAxis; + OKButton aBtnOK; + CancelButton aBtnCancel; + HelpButton aBtnHelp; + + DECL_LINK(EnableTitleHdl, CheckBox*); + +public: + SchTitleDlg( Window* pParent, const InsertTitleDialogData& rInput ); + virtual ~SchTitleDlg(); + + void getResult( InsertTitleDialogData& rOutput ); +}; + +//............................................................................. +} //namespace chart +//............................................................................. + +#endif + diff --git a/chart2/source/controller/inc/dlg_ObjectProperties.hxx b/chart2/source/controller/inc/dlg_ObjectProperties.hxx new file mode 100644 index 000000000..41fe7f929 --- /dev/null +++ b/chart2/source/controller/inc/dlg_ObjectProperties.hxx @@ -0,0 +1,196 @@ +/************************************************************************* + * + * $RCSfile: dlg_ObjectProperties.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:27 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef _CHART2_DLG_OBJECTPROPERTIES_HXX +#define _CHART2_DLG_OBJECTPROPERTIES_HXX + +#include "chartview/ObjectIdentifier.hxx" + +#ifndef _SFXTABDLG_HXX +#include <sfx2/tabdlg.hxx> +#endif +// header for typedef ChangeType +#ifndef _SVX_TAB_AREA_HXX +#include <svx/tabarea.hxx> +#endif + +//............................................................................. +namespace chart +{ +//............................................................................. + + /* +enum AttrType +{ + ATTR_TITLE, + ATTR_LEGEND, + ATTR_DATA_ROW, + ATTR_DATA_LINE, + ATTR_DATA_POINT, + ATTR_AXIS, + ATTR_X_AXIS_2D, + ATTR_X_AXIS_3D, + ATTR_Y_AXIS_2D, + ATTR_Y_AXIS_3D, + ATTR_Z_AXIS, + ATTR_GRID, + ATTR_DIAGRAM_AREA, + ATTR_DIAGRAM_WALL, + ATTR_DIAGRAM_FLOOR, + ATTR_LINE, + ATTR_DIAGRAM_STOCK_LOSS, + ATTR_DIAGRAM_STOCK_PLUS +}; +*/ + +class OldModelWrapper +{ +public: + OldModelWrapper(); + virtual ~OldModelWrapper(); + + //model + //// BOOL IsXYChart() const; + BOOL HasScaleProperties() const; + BOOL IsBar() const; + BOOL Is3DChart() const; + //// BOOL Is3DPie() const; + BOOL IsStatisticChart() const; + BOOL HasAreaProperties() const; + + /// return TRUE if the current chart type supports a given axis type + BOOL ProvidesSecondaryYAxis() const;//was BOOL CanAxis(CHART_AXIS_SECONDARY_Y) + BOOL IsCol( long nRow ) const; +}; + +/* +#define CHATTR_COUNT (CHATTR_DIAGRAM_FLOOR + 1) + +enum OrderMode +{ + CHORDMODE_NONE, + CHORDMODE_X_AXIS, + CHORDMODE_Y_AXIS +}; + +#define CHORDMODE_COUNT (CHORDMODE_Y_AXIS + 1) + +#define AxisTypeX 1 +#define AxisTypeY 2 +#define AxisTypeZ 3 +*/ + +/************************************************************************* +|* +|* Attributs-Tab-Dialog +|* +\************************************************************************/ + +class ViewElementListProvider; + +class SchAttribTabDlg : public SfxTabDialog +{ +private: + ObjectType eObjectType; + bool bAffectsMultipleObjects;//is true if more than one object of the given type will be changed (e.g. all axes or all titles) + USHORT nDlgType; + USHORT nPageType; + + const OldModelWrapper * const m_pModelWrapper; + const ViewElementListProvider* const m_pViewElementListProvider; + + const SfxItemSet* mpSymbolAttr; + Graphic maSymbolGraphic; + + /* + XColorTable* pColorTab; + XGradientList* pGradientList; + XHatchList* pHatchingList; + XBitmapList* pBitmapList; + XDashList* pDashList; + XLineEndList* pLineEndList; + */ + + ChangeType nColorTableState; + ChangeType nGradientListState; + ChangeType nHatchingListState; + ChangeType nBitmapListState; + + static USHORT GetResId(ObjectType eObjectType); + ////static USHORT GetResId(AttrType eType); + virtual void PageCreated(USHORT nId, SfxTabPage& rPage); + +public: + SchAttribTabDlg(Window* pParent, ObjectType eType, + const SfxItemSet* pAttr, + const ViewElementListProvider* pViewElementListProvider, + const OldModelWrapper* pModel, + bool bAffectsMultipleObjects = false, + const SfxItemSet* pSymbolAttr=NULL, + Graphic aSymbolGraphic=Graphic()); + virtual ~SchAttribTabDlg(); +}; + +//............................................................................. +} //namespace chart +//............................................................................. + +#endif + diff --git a/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx b/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx new file mode 100644 index 000000000..9f1ef04c6 --- /dev/null +++ b/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx @@ -0,0 +1,700 @@ +/************************************************************************* + * + * $RCSfile: AxisItemConverter.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:28 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "AxisItemConverter.hxx" +#include "ItemPropertyMap.hxx" +#include "CharacterPropertyItemConverter.hxx" +#include "GraphicPropertyItemConverter.hxx" +#include "SchSfxItemIds.hxx" +#include "SchWhichPairs.hxx" +#include "macros.hxx" +#include "Scaling.hxx" + +#ifndef _COM_SUN_STAR_LANG_XSERVICENAME_HPP_ +#include <com/sun/star/lang/XServiceName.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XAXIS_HPP_ +#include <drafts/com/sun/star/chart2/XAxis.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XBOUNDEDCOORDINATESYSTEM_HPP_ +#include <drafts/com/sun/star/chart2/XBoundedCoordinateSystem.hpp> +#endif + +// #ifndef _COMPHELPER_PROCESSFACTORY_HXX_ +// #include <comphelper/processfactory.hxx> +// #endif +// for SfxBoolItem +#ifndef _SFXENUMITEM_HXX +#include <svtools/eitem.hxx> +#endif +// for SvxDoubleItem +#ifndef _SVX_CHRTITEM_HXX +#define ITEMID_DOUBLE 0 +#include <svx/chrtitem.hxx> +#endif +// for SfxInt32Item +#ifndef _SFXINTITEM_HXX +#include <svtools/intitem.hxx> +#endif +#ifndef INCLUDED_RTL_MATH_HXX +#include <rtl/math.hxx> +#endif + +#include <algorithm> + +using namespace ::com::sun::star; +using namespace ::drafts::com::sun::star; + +namespace +{ +::chart::wrapper::ItemPropertyMapType & lcl_GetAxisPropertyMap() +{ + static ::chart::wrapper::ItemPropertyMapType aAxisPropertyMap( + ::chart::wrapper::MakeItemPropertyMap + ( SCHATTR_AXIS_SHOWDESCR, C2U( "DisplayLabels" )) + ( SCHATTR_AXIS_TICKS, C2U( "MajorTickmarks" )) + ( SCHATTR_AXIS_HELPTICKS, C2U( "MinorTickmarks" )) + ( SCHATTR_TEXT_ORDER, C2U( "ArrangeOrder" )) + ( SCHATTR_TEXT_STACKED, C2U( "StackCharacters" )) + ( SCHATTR_TEXTBREAK, C2U( "TextBreak" )) + ( SCHATTR_TEXT_OVERLAP, C2U( "TextOverlap" )) + ); + + return aAxisPropertyMap; +}; +} // anonymous namespace + +namespace chart +{ +namespace wrapper +{ + +AxisItemConverter::AxisItemConverter( + const uno::Reference< beans::XPropertySet > & rPropertySet, + SfxItemPool& rItemPool, + SdrModel& rDrawModel, + NumberFormatterWrapper * pNumFormatter, + chart2::ExplicitScaleData * pScale /* = NULL */, + chart2::ExplicitIncrementData * pIncrement /* = NULL */, + double * pExplicitOrigin /* = NULL */ ) : + ItemConverter( rPropertySet, rItemPool ), + m_pNumberFormatterWrapper( pNumFormatter ), + m_pExplicitScale( NULL ), + m_pExplicitIncrement( NULL ), + m_pExplicitOrigin( NULL ) +{ + if( pScale ) + m_pExplicitScale = new chart2::ExplicitScaleData( *pScale ); + if( pIncrement ) + m_pExplicitIncrement = new chart2::ExplicitIncrementData( *pIncrement ); + if( pExplicitOrigin ) + m_pExplicitOrigin = new double( *pExplicitOrigin ); + + m_aConverters.push_back( new GraphicPropertyItemConverter( + rPropertySet, rItemPool, rDrawModel, + GraphicPropertyItemConverter::LINE_PROPERTIES )); + m_aConverters.push_back( new CharacterPropertyItemConverter( rPropertySet, rItemPool )); + + uno::Reference< chart2::XAxis > xAxis( rPropertySet, uno::UNO_QUERY ); + OSL_ASSERT( xAxis.is()); + if( xAxis.is()) + { + m_xAxis = xAxis; + + m_xCoordinateSystem.set( xAxis->getCoordinateSystem()); + if( m_xCoordinateSystem.is()) + { + m_nDimension = xAxis->getRepresentedDimension(); + } + else + { + OSL_ENSURE( false, "No coordinate system found at axis!" ); + } + } +} + +AxisItemConverter::~AxisItemConverter() +{ + delete m_pExplicitScale; + delete m_pExplicitIncrement; + delete m_pExplicitOrigin; + + ::std::for_each( m_aConverters.begin(), m_aConverters.end(), + DeleteItemConverterPtr() ); +} + +void AxisItemConverter::FillItemSet( SfxItemSet & rOutItemSet ) const +{ + ::std::for_each( m_aConverters.begin(), m_aConverters.end(), + FillItemSetFunc( rOutItemSet )); + + // own items + ItemConverter::FillItemSet( rOutItemSet ); +} + +bool AxisItemConverter::ApplyItemSet( const SfxItemSet & rItemSet ) +{ + bool bResult = false; + + ::std::for_each( m_aConverters.begin(), m_aConverters.end(), + ApplyItemSetFunc( rItemSet, bResult )); + + // own items + return ItemConverter::ApplyItemSet( rItemSet ) || bResult; +} + +const USHORT * AxisItemConverter::GetWhichPairs() const +{ + // must span all used items! + return nAxisWhichPairs; +} + +bool AxisItemConverter::GetItemPropertyName( USHORT nWhichId, ::rtl::OUString & rOutName ) const +{ + ItemPropertyMapType & rMap( lcl_GetAxisPropertyMap()); + ItemPropertyMapType::const_iterator aIt( rMap.find( nWhichId )); + +// OSL_TRACE( "Which-Id: %d", nWhichId ); + + if( aIt == rMap.end()) + return false; + + rOutName =(*aIt).second; +// OSL_TRACE( "Which-Id: %d, Entry found in map: %s.", nWhichId, +// ::rtl::OUStringToOString( rOutName, RTL_TEXTENCODING_ASCII_US ).getStr()); + + return true; +} + +void AxisItemConverter::FillSpecialItem( USHORT nWhichId, SfxItemSet & rOutItemSet ) const +{ + if( ! m_xAxis.is() || + ! m_xCoordinateSystem.is() ) + return; + + uno::Reference< chart2::XScale > xScale( m_xCoordinateSystem->getScaleByDimension( m_nDimension )); + OSL_ASSERT( xScale.is()); + uno::Reference< chart2::XIncrement > xIncrement( m_xAxis->getIncrement() ); + OSL_ASSERT( xIncrement.is()); + if( ! xScale.is() || + ! xIncrement.is() ) + return; + + const chart2::ScaleData aScale( xScale->getScaleData() ); + const chart2::IncrementData aInc( xIncrement->getIncrementData() ); + const uno::Sequence< chart2::SubIncrement > aSubIncs( xIncrement->getSubIncrements() ); + + switch( nWhichId ) + { + case SCHATTR_AXIS_AUTO_MAX: + // if the any has no value => auto is on + rOutItemSet.Put( SfxBoolItem( nWhichId, ( ! aScale.Maximum.hasValue()))); + break; + + case SCHATTR_AXIS_MAX: + if( aScale.Maximum.hasValue()) + { + OSL_ASSERT( aScale.Maximum.getValueTypeClass() == uno::TypeClass_DOUBLE ); + rOutItemSet.Put( + SvxDoubleItem( + *reinterpret_cast< const double * >( aScale.Maximum.getValue()), nWhichId )); + } + else + { + double fExplicitMax = 10.0; + if( m_pExplicitScale ) + fExplicitMax = m_pExplicitScale->Maximum; + + rOutItemSet.Put( + SvxDoubleItem( fExplicitMax, nWhichId )); + } + break; + + case SCHATTR_AXIS_AUTO_MIN: + // if the any has no value => auto is on + rOutItemSet.Put( SfxBoolItem( nWhichId, ( ! aScale.Minimum.hasValue()))); + break; + + case SCHATTR_AXIS_MIN: + if( aScale.Minimum.hasValue()) + { + OSL_ASSERT( aScale.Minimum.getValueTypeClass() == uno::TypeClass_DOUBLE ); + rOutItemSet.Put( + SvxDoubleItem( + *reinterpret_cast< const double * >( aScale.Minimum.getValue()), nWhichId )); + } + else + { + if( m_pExplicitScale ) + rOutItemSet.Put( SvxDoubleItem( m_pExplicitScale->Minimum, nWhichId )); + } + break; + + case SCHATTR_AXIS_LOGARITHM: + { + uno::Reference< lang::XServiceName > xServiceName( aScale.Scaling, uno::UNO_QUERY ); + BOOL bValue = + // if the following is true, we have logarithmic scaling, + // otherwise not (per definition) + ( xServiceName.is() && + (xServiceName->getServiceName()).equals( + C2U( "com.sun.star.chart2.LogarithmicScaling" )) ); + + rOutItemSet.Put( SfxBoolItem( nWhichId, bValue )); + } + break; + + // Increment + case SCHATTR_AXIS_AUTO_STEP_MAIN: + // if the any has no value => auto is on + rOutItemSet.Put( SfxBoolItem( nWhichId, ( ! aInc.Distance.hasValue()))); + break; + + case SCHATTR_AXIS_STEP_MAIN: + if( aInc.Distance.hasValue()) + { + OSL_ASSERT( aInc.Distance.getValueTypeClass() == uno::TypeClass_DOUBLE ); + rOutItemSet.Put( + SvxDoubleItem( + *reinterpret_cast< const double * >( aInc.Distance.getValue()), nWhichId )); + } + else + { + if( m_pExplicitIncrement ) + rOutItemSet.Put( SvxDoubleItem( m_pExplicitIncrement->Distance, nWhichId )); + } + break; + + // SubIncrement + case SCHATTR_AXIS_AUTO_STEP_HELP: + { + // if the any has no value => auto is on + rOutItemSet.Put( + SfxBoolItem( + nWhichId, + ! ( aSubIncs.getLength() > 0 && + aSubIncs[0].IntervalCount.hasValue() ))); + } + break; + + case SCHATTR_AXIS_STEP_HELP: + { + if( aSubIncs.getLength() > 0 && + aSubIncs[0].IntervalCount.hasValue()) + { + OSL_ASSERT( aSubIncs[0].IntervalCount.getValueTypeClass() == uno::TypeClass_LONG ); + rOutItemSet.Put( + SfxInt32Item( + nWhichId, + *reinterpret_cast< const sal_Int32 * >( + aSubIncs[0].IntervalCount.getValue()) )); + } + else + { + if( m_pExplicitIncrement && + m_pExplicitIncrement->SubIncrements.getLength() > 0 ) + { + rOutItemSet.Put( + SfxInt32Item( + nWhichId, + m_pExplicitIncrement->SubIncrements[0].IntervalCount )); + } + } + } + break; + + case SCHATTR_AXIS_AUTO_ORIGIN: + { + uno::Sequence< uno::Any > aCoord( m_xCoordinateSystem->getOrigin() ); + OSL_ASSERT( m_nDimension <= aCoord.getLength()); + rOutItemSet.Put( + SfxBoolItem( + nWhichId, + ! ( aCoord.getLength() > m_nDimension && + aCoord[ m_nDimension ].hasValue() ) )); + } + break; + + case SCHATTR_AXIS_ORIGIN: + { + bool bIsAuto = true; + uno::Sequence< uno::Any > aCoord( m_xCoordinateSystem->getOrigin() ); + if( aCoord.getLength() > m_nDimension && + aCoord[ m_nDimension ].hasValue() ) + { + OSL_ASSERT( aCoord[ m_nDimension ].getValueTypeClass() == uno::TypeClass_DOUBLE ); + rOutItemSet.Put( + SvxDoubleItem( + *reinterpret_cast< const double * >(aCoord[ m_nDimension ].getValue()), + nWhichId )); + bIsAuto = false; + } + + if( bIsAuto && m_pExplicitOrigin ) + rOutItemSet.Put( SvxDoubleItem( *m_pExplicitOrigin, nWhichId )); + } + break; + + case SCHATTR_TEXT_DEGREES: + { + // convert double to int (times 100) + double fVal; + + if( GetPropertySet()->getPropertyValue( C2U( "TextRotation" )) >>= fVal ) + { + rOutItemSet.Put( SfxInt32Item( nWhichId, static_cast< sal_Int32 >( + ::rtl::math::round( fVal * 100.0 ) ) )); + } + } + break; + + case SID_ATTR_NUMBERFORMAT_VALUE: +// case SCHATTR_AXIS_NUMFMT: + { + if( m_pNumberFormatterWrapper ) + { + chart2::NumberFormat aNumFmt; + if( GetPropertySet()->getPropertyValue( C2U( "NumberFormat" )) >>= aNumFmt ) + { + sal_Int32 nKey = m_pNumberFormatterWrapper->getKeyForNumberFormat( aNumFmt ); + + OSL_TRACE( "NumberFormat: ""%s"", Locale: %s_%s@%s, Key: %d", + U2C( aNumFmt.aFormat ), + U2C( aNumFmt.aLocale.Language ), + U2C( aNumFmt.aLocale.Country ), + U2C( aNumFmt.aLocale.Variant ), + nKey ); + rOutItemSet.Put( SfxUInt32Item( nWhichId, nKey )); + } + } + else + { + OSL_ENSURE( false, "No NumberFormatterWrapper !" ); + } + } + break; + +// case SID_ATTR_NUMBERFORMAT_SOURCE: + } +} + +bool AxisItemConverter::ApplySpecialItem( USHORT nWhichId, const SfxItemSet & rItemSet ) const +{ + if( ! ( m_xAxis.is() && + m_xCoordinateSystem.is())) + return false; + + uno::Reference< chart2::XScale > xScale( m_xCoordinateSystem->getScaleByDimension( m_nDimension )); + OSL_ASSERT( xScale.is()); + uno::Reference< chart2::XIncrement > xIncrement( m_xAxis->getIncrement() ); + OSL_ASSERT( xIncrement.is()); + if( ! xScale.is() || + ! xIncrement.is() ) + return false; + + chart2::ScaleData aScale( xScale->getScaleData() ); + chart2::IncrementData aInc( xIncrement->getIncrementData() ); + uno::Sequence< chart2::SubIncrement > aSubIncs( xIncrement->getSubIncrements() ); + uno::Sequence< uno::Any > aOrigin( m_xCoordinateSystem->getOrigin()); + + bool bSetScale = false; + bool bSetIncrement = false; + bool bSetSubIncrement = false; + bool bSetOrigin = false; + bool bChangedOtherwise = false; + + uno::Any aValue; + + switch( nWhichId ) + { + case SCHATTR_AXIS_AUTO_MAX: + if( (reinterpret_cast< const SfxBoolItem & >( + rItemSet.Get( nWhichId )).GetValue() )) + { + aScale.Maximum.clear(); + bSetScale = true; + } + // else SCHATTR_AXIS_MAX must have some value + break; + + case SCHATTR_AXIS_MAX: + // only if auto if false + if( ! (reinterpret_cast< const SfxBoolItem & >( + rItemSet.Get( SCHATTR_AXIS_AUTO_MAX )).GetValue() )) + { + rItemSet.Get( nWhichId ).QueryValue( aValue ); + + if( aScale.Maximum != aValue ) + { + aScale.Maximum = aValue; + bSetScale = true; + } + } + break; + + case SCHATTR_AXIS_AUTO_MIN: + if( (reinterpret_cast< const SfxBoolItem & >( + rItemSet.Get( nWhichId )).GetValue() )) + { + aScale.Minimum.clear(); + bSetScale = true; + } + // else SCHATTR_AXIS_MIN must have some value + break; + + case SCHATTR_AXIS_MIN: + // only if auto if false + if( ! (reinterpret_cast< const SfxBoolItem & >( + rItemSet.Get( SCHATTR_AXIS_AUTO_MIN )).GetValue() )) + { + rItemSet.Get( nWhichId ).QueryValue( aValue ); + + if( aScale.Minimum != aValue ) + { + aScale.Minimum = aValue; + bSetScale = true; + } + } + break; + + case SCHATTR_AXIS_LOGARITHM: + { + uno::Reference< lang::XServiceName > xServiceName( aScale.Scaling, uno::UNO_QUERY ); + bool bWasLogarithm = + // if the following is true, we have logarithmic scaling, + // otherwise not (per definition) + ( xServiceName.is() && + (xServiceName->getServiceName()).equals( + C2U( "com.sun.star.chart2.LogarithmicScaling" ))); + + if( (reinterpret_cast< const SfxBoolItem & >( + rItemSet.Get( nWhichId )).GetValue() )) + { + // logarithm is true + if( ! bWasLogarithm ) + { + aScale.Scaling = new LogarithmicScaling( 10.0 ); + bSetScale = true; + } + } + else + { + // logarithm is false => linear scaling + if( bWasLogarithm ) + { + aScale.Scaling = new LinearScaling( 1.0, 0.0 ); + bSetScale = true; + } + } + } + break; + + // Increment + case SCHATTR_AXIS_AUTO_STEP_MAIN: + if( (reinterpret_cast< const SfxBoolItem & >( + rItemSet.Get( nWhichId )).GetValue() )) + { + aInc.Distance.clear(); + bSetIncrement = true; + } + // else SCHATTR_AXIS_STEP_MAIN must have some value + break; + + case SCHATTR_AXIS_STEP_MAIN: + // only if auto if false + if( ! (reinterpret_cast< const SfxBoolItem & >( + rItemSet.Get( SCHATTR_AXIS_AUTO_STEP_MAIN )).GetValue() )) + { + rItemSet.Get( nWhichId ).QueryValue( aValue ); + + if( aInc.Distance != aValue ) + { + aInc.Distance = aValue; + bSetIncrement = true; + } + } + break; + + // SubIncrement + case SCHATTR_AXIS_AUTO_STEP_HELP: + if( (reinterpret_cast< const SfxBoolItem & >( + rItemSet.Get( nWhichId )).GetValue() ) && + aSubIncs.getLength() > 0 && + aSubIncs[0].IntervalCount.hasValue() ) + { + aSubIncs[0].IntervalCount.clear(); + bSetSubIncrement = true; + } + // else SCHATTR_AXIS_STEP_MAIN must have some value + break; + + case SCHATTR_AXIS_STEP_HELP: + // only if auto if false + if( ! (reinterpret_cast< const SfxBoolItem & >( + rItemSet.Get( SCHATTR_AXIS_AUTO_STEP_HELP )).GetValue() ) && + aSubIncs.getLength() > 0 ) + { + rItemSet.Get( nWhichId ).QueryValue( aValue ); + + if( ! aSubIncs[0].IntervalCount.hasValue() || + aSubIncs[0].IntervalCount != aValue ) + { + OSL_ASSERT( aValue.getValueTypeClass() == uno::TypeClass_LONG ); + aSubIncs[0].IntervalCount = aValue; + bSetSubIncrement = true; + } + } + break; + + case SCHATTR_AXIS_AUTO_ORIGIN: + { + if( (reinterpret_cast< const SfxBoolItem & >( + rItemSet.Get( nWhichId )).GetValue() ) && + ( aOrigin.getLength() > m_nDimension && + aOrigin[ m_nDimension ].hasValue() )) + { + aOrigin[ m_nDimension ].clear(); + bSetOrigin = true; + } + } + break; + + case SCHATTR_AXIS_ORIGIN: + { + if( ! (reinterpret_cast< const SfxBoolItem & >( + rItemSet.Get( SCHATTR_AXIS_AUTO_ORIGIN )).GetValue() )) + { + if( aOrigin.getLength() > m_nDimension ) + { + rItemSet.Get( nWhichId ).QueryValue( aValue ); + if( aValue != aOrigin[ m_nDimension ] ) + { + aOrigin[ m_nDimension ] = aValue; + bSetOrigin = true; + } + } + } + } + break; + + case SCHATTR_TEXT_DEGREES: + { + // convert int to double (divided by 100) + double fVal = static_cast< double >( + reinterpret_cast< const SfxInt32Item & >( + rItemSet.Get( nWhichId )).GetValue()) / 100.0; + double fOldVal = 0.0; + bool bPropExisted = + ( GetPropertySet()->getPropertyValue( C2U( "TextRotation" )) >>= fOldVal ); + + if( ! bPropExisted || + ( bPropExisted && fOldVal != fVal )) + { + GetPropertySet()->setPropertyValue( C2U( "TextRotation" ), uno::makeAny( fVal )); + bChangedOtherwise = true; + } + } + break; + + case SID_ATTR_NUMBERFORMAT_VALUE: +// case SCHATTR_AXIS_NUMFMT: + { + if( m_pNumberFormatterWrapper ) + { + sal_Int32 nFmt = static_cast< sal_Int32 >( + reinterpret_cast< const SfxUInt32Item & >( + rItemSet.Get( nWhichId )).GetValue()); + + aValue = uno::makeAny( + m_pNumberFormatterWrapper->getNumberFormatForKey( nFmt )); + if( GetPropertySet()->getPropertyValue( C2U( "NumberFormat" )) != aValue ) + { + GetPropertySet()->setPropertyValue( C2U( "NumberFormat" ), aValue ); + bChangedOtherwise = true; + } + } + else + { + OSL_ENSURE( false, "No NumberFormatterWrapper !" ); + } + } + break; + +// case SID_ATTR_NUMBERFORMAT_SOURCE: + } + + if( bSetScale && + xScale.is() ) + xScale->setScaleData( aScale ); + if( bSetIncrement && + xIncrement.is() ) + xIncrement->setIncrementData( aInc ); + if( bSetSubIncrement && + xIncrement.is() ) + xIncrement->setSubIncrements( aSubIncs ); + if( bSetOrigin ) + m_xCoordinateSystem->setOrigin( aOrigin ); + + return (bSetScale || bSetIncrement || bSetSubIncrement || + bSetOrigin || bChangedOtherwise); +} + +} // namespace wrapper +} // namespace chart diff --git a/chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx b/chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx new file mode 100644 index 000000000..2c4d4ac6b --- /dev/null +++ b/chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx @@ -0,0 +1,398 @@ +/************************************************************************* + * + * $RCSfile: CharacterPropertyItemConverter.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:28 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "CharacterPropertyItemConverter.hxx" +#include "SchWhichPairs.hxx" +#include "macros.hxx" +#include "ItemPropertyMap.hxx" + +#ifndef _EEITEM_HXX +#include <svx/eeitem.hxx> +#endif +#ifndef _SVX_UDLNITEM_HXX +#define ITEMID_UNDERLINE EE_CHAR_UNDERLINE +#include <svx/udlnitem.hxx> +#endif +#ifndef _SVX_FONTITEM_HXX +#define ITEMID_FONT EE_CHAR_FONTINFO +#include <svx/fontitem.hxx> +#endif +#ifndef _SVX_CRSDITEM_HXX +#define ITEMID_CROSSEDOUT EE_CHAR_STRIKEOUT +#include <svx/crsditem.hxx> +#endif +#ifndef _SVX_POSTITEM_HXX +#define ITEMID_POSTURE EE_CHAR_ITALIC +#include <svx/postitem.hxx> +#endif +#ifndef _SVX_WGHTITEM_HXX +#define ITEMID_WEIGHT EE_CHAR_WEIGHT +#include <svx/wghtitem.hxx> +#endif + +#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSTATE_HPP_ +#include <com/sun/star/beans/XPropertyState.hpp> +#endif + +using namespace ::com::sun::star; + +namespace +{ +::chart::wrapper::ItemPropertyMapType & lcl_GetCharacterPropertyPropertyMap() +{ + static ::chart::wrapper::ItemPropertyMapType aCharacterPropertyMap( + ::chart::wrapper::MakeItemPropertyMap + ( EE_CHAR_COLOR, C2U( "CharColor" )) + ( EE_CHAR_FONTHEIGHT, C2U( "CharHeight" )) +// ( EE_CHAR_ITALIC, C2U( "CharPosture" )) +// ( EE_CHAR_WEIGHT, C2U( "CharWeight" )) +// ( EE_CHAR_STRIKEOUT, C2U( "CharStrikeout" )) + ( EE_CHAR_WLM, C2U( "CharWordMode" )) + ( EE_CHAR_SHADOW, C2U( "CharShadowed" )) + ( EE_CHAR_RELIEF, C2U( "CharRelief" )) + ( EE_CHAR_OUTLINE, C2U( "CharContoured" )) + ( EE_CHAR_EMPHASISMARK, C2U( "CharEmphasis" )) + ); + + return aCharacterPropertyMap; +} +} // anonymous namespace + +// ======================================== + +namespace chart +{ +namespace wrapper +{ + +CharacterPropertyItemConverter::CharacterPropertyItemConverter( + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertySet > & rPropertySet, + SfxItemPool& rItemPool ) : + ItemConverter( rPropertySet, rItemPool ) +{} + +CharacterPropertyItemConverter::~CharacterPropertyItemConverter() +{} + +const USHORT * CharacterPropertyItemConverter::GetWhichPairs() const +{ + return nCharacterPropertyWhichPairs; +} + +bool CharacterPropertyItemConverter::GetItemPropertyName( USHORT nWhichId, ::rtl::OUString & rOutName ) const +{ + ItemPropertyMapType & rMap( lcl_GetCharacterPropertyPropertyMap()); + ItemPropertyMapType::const_iterator aIt( rMap.find( nWhichId )); + + if( aIt == rMap.end()) + return false; + + rOutName =(*aIt).second; + return true; +} + +void CharacterPropertyItemConverter::FillSpecialItem( + USHORT nWhichId, SfxItemSet & rOutItemSet ) const +{ + switch( nWhichId ) + { + case EE_CHAR_FONTINFO: + { + SvxFontItem aItem; + + aItem.PutValue( GetPropertySet()->getPropertyValue( C2U( "CharFontName" )), + MID_FONT_FAMILY_NAME ); + aItem.PutValue( GetPropertySet()->getPropertyValue( C2U( "CharFontFamily" )), + MID_FONT_FAMILY ); + aItem.PutValue( GetPropertySet()->getPropertyValue( C2U( "CharFontStyleName" )), + MID_FONT_STYLE_NAME ); + aItem.PutValue( GetPropertySet()->getPropertyValue( C2U( "CharFontCharSet" )), + MID_FONT_CHAR_SET ); + aItem.PutValue( GetPropertySet()->getPropertyValue( C2U( "CharFontPitch" )), + MID_FONT_PITCH ); + + rOutItemSet.Put( aItem ); + } + break; + + case EE_CHAR_UNDERLINE: + { + SvxUnderlineItem aItem; + bool bModified = false; + + uno::Any aValue( GetPropertySet()->getPropertyValue( C2U( "CharUnderline" ))); + if( aValue.hasValue()) + { + aItem.PutValue( aValue, MID_UNDERLINE ); + bModified = true; + } + + aValue = GetPropertySet()->getPropertyValue( C2U( "CharUnderlineHasColor" )); + if( aValue.hasValue() && + ( *reinterpret_cast< const sal_Bool * >( aValue.getValue()) != sal_False )) + { + aItem.PutValue( aValue, MID_UL_HASCOLOR ); + bModified = true; + } + + aValue = GetPropertySet()->getPropertyValue( C2U( "CharUnderlineColor" )); + if( aValue.hasValue()) + { + aItem.PutValue( aValue, MID_UL_COLOR ); + bModified = true; + } + + if( bModified ) + rOutItemSet.Put( aItem ); + } + break; + + case EE_CHAR_STRIKEOUT: + { + SvxCrossedOutItem aItem; + + uno::Any aValue( GetPropertySet()->getPropertyValue( C2U( "CharStrikeout" ))); + if( aValue.hasValue()) + { + // default member-id is MID_CROSSED_OUT (bool flag) + aItem.PutValue( aValue, MID_CROSS_OUT ); + rOutItemSet.Put( aItem ); + } + } + break; + + case EE_CHAR_ITALIC: + { + SvxPostureItem aItem; + + uno::Any aValue( GetPropertySet()->getPropertyValue( C2U( "CharPosture" ))); + if( aValue.hasValue()) + { + aItem.PutValue( aValue, MID_POSTURE ); + rOutItemSet.Put( aItem ); + } + } + break; + + case EE_CHAR_WEIGHT: + { + SvxWeightItem aItem; + + uno::Any aValue( GetPropertySet()->getPropertyValue( C2U( "CharWeight" ))); + if( aValue.hasValue()) + { + aItem.PutValue( aValue, MID_WEIGHT ); + rOutItemSet.Put( aItem ); + } + } + break; + } +} + +bool CharacterPropertyItemConverter::ApplySpecialItem( + USHORT nWhichId, const SfxItemSet & rItemSet ) const +{ + bool bChanged = false; + uno::Any aValue; + + switch( nWhichId ) + { + case EE_CHAR_FONTINFO: + { + const SvxFontItem & rItem = + reinterpret_cast< const SvxFontItem & >( + rItemSet.Get( nWhichId )); + + if( rItem.QueryValue( aValue, MID_FONT_FAMILY_NAME )) + { + if( aValue != GetPropertySet()->getPropertyValue( C2U( "CharFontName" ) )) + { + GetPropertySet()->setPropertyValue( C2U( "CharFontName" ), aValue ); + bChanged = true; + } + } + if( rItem.QueryValue( aValue, MID_FONT_FAMILY )) + { + if( aValue != GetPropertySet()->getPropertyValue( C2U( "CharFontFamily" ) )) + { + GetPropertySet()->setPropertyValue( C2U( "CharFontFamily" ), aValue ); + bChanged = true; + } + } + if( rItem.QueryValue( aValue, MID_FONT_STYLE_NAME )) + { + if( aValue != GetPropertySet()->getPropertyValue( C2U( "CharFontStyleName" ) )) + { + GetPropertySet()->setPropertyValue( C2U( "CharFontStyleName" ), aValue ); + bChanged = true; + } + } + if( rItem.QueryValue( aValue, MID_FONT_CHAR_SET )) + { + if( aValue != GetPropertySet()->getPropertyValue( C2U( "CharFontCharSet" ) )) + { + GetPropertySet()->setPropertyValue( C2U( "CharFontCharSet" ), aValue ); + bChanged = true; + } + } + if( rItem.QueryValue( aValue, MID_FONT_PITCH )) + { + if( aValue != GetPropertySet()->getPropertyValue( C2U( "CharFontPitch" ) )) + { + GetPropertySet()->setPropertyValue( C2U( "CharFontPitch" ), aValue ); + bChanged = true; + } + } + } + break; + + case EE_CHAR_UNDERLINE: + { + const SvxUnderlineItem & rItem = + reinterpret_cast< const SvxUnderlineItem & >( + rItemSet.Get( nWhichId )); + + if( rItem.QueryValue( aValue, MID_UNDERLINE )) + { + if( aValue != GetPropertySet()->getPropertyValue( C2U( "CharUnderline" ) )) + { + GetPropertySet()->setPropertyValue( C2U( "CharUnderline" ), aValue ); + bChanged = true; + } + } + + if( rItem.QueryValue( aValue, MID_UL_COLOR )) + { + if( aValue != GetPropertySet()->getPropertyValue( C2U( "CharUnderlineColor" ) )) + { + GetPropertySet()->setPropertyValue( C2U( "CharUnderlineColor" ), aValue ); + bChanged = true; + } + } + + if( rItem.QueryValue( aValue, MID_UL_HASCOLOR )) + { + if( aValue != GetPropertySet()->getPropertyValue( C2U( "CharUnderlineHasColor" ) )) + { + GetPropertySet()->setPropertyValue( C2U( "CharUnderlineHasColor" ), aValue ); + bChanged = true; + } + } + } + break; + + case EE_CHAR_STRIKEOUT: + { + const SvxCrossedOutItem & rItem = + reinterpret_cast< const SvxCrossedOutItem & >( + rItemSet.Get( nWhichId )); + + if( rItem.QueryValue( aValue, MID_CROSS_OUT )) + { + if( aValue != GetPropertySet()->getPropertyValue( C2U( "CharStrikeout" ) )) + { + GetPropertySet()->setPropertyValue( C2U( "CharStrikeout" ), aValue ); + bChanged = true; + } + } + } + break; + + case EE_CHAR_ITALIC: + { + const SvxPostureItem & rItem = + reinterpret_cast< const SvxPostureItem & >( + rItemSet.Get( nWhichId )); + + if( rItem.QueryValue( aValue, MID_POSTURE )) + { + if( aValue != GetPropertySet()->getPropertyValue( C2U( "CharPosture" ) )) + { + GetPropertySet()->setPropertyValue( C2U( "CharPosture" ), aValue ); + bChanged = true; + } + } + } + break; + + case EE_CHAR_WEIGHT: + { + const SvxWeightItem & rItem = + reinterpret_cast< const SvxWeightItem & >( + rItemSet.Get( nWhichId )); + + if( rItem.QueryValue( aValue, MID_WEIGHT )) + { + if( aValue != GetPropertySet()->getPropertyValue( C2U( "CharWeight" ) )) + { + GetPropertySet()->setPropertyValue( C2U( "CharWeight" ), aValue ); + bChanged = true; + } + } + } + break; + } + + return bChanged; +} + +} // namespace wrapper +} // namespace chart diff --git a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx new file mode 100644 index 000000000..80ff5e49f --- /dev/null +++ b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx @@ -0,0 +1,337 @@ +/************************************************************************* + * + * $RCSfile: DataPointItemConverter.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:28 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "DataPointItemConverter.hxx" +#include "SchWhichPairs.hxx" +#include "macros.hxx" +#include "ItemPropertyMap.hxx" + +#include "GraphicPropertyItemConverter.hxx" +#include "CharacterPropertyItemConverter.hxx" + +#ifndef _SVX_CHRTITEM_HXX +#define ITEMID_CHARTDATADESCR SCHATTR_DATADESCR_DESCR +#include <svx/chrtitem.hxx> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_DATACAPTIONSTYLE_HPP__ +#include <drafts/com/sun/star/chart2/DataCaptionStyle.hpp> +#endif +#ifndef _SFXINTITEM_HXX +#include <svtools/intitem.hxx> +#endif + +#include <functional> +#include <algorithm> + +using namespace ::com::sun::star; +using namespace ::drafts::com::sun::star; + +namespace +{ +::chart::wrapper::ItemPropertyMapType & lcl_GetDataPointPropertyMap() +{ + static ::chart::wrapper::ItemPropertyMapType aDataPointPropertyMap( + ::chart::wrapper::MakeItemPropertyMap + ( CHATTR_PIE_SEGMENT_OFFSET, C2U( "Offset" )) + ); + + return aDataPointPropertyMap; +}; +} // anonymous namespace + +namespace chart +{ +namespace wrapper +{ + +DataPointItemConverter::DataPointItemConverter( + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertySet > & rPropertySet, + SfxItemPool& rItemPool, + SdrModel& rDrawModel, + NumberFormatterWrapper * pNumFormatter, + GraphicPropertyItemConverter::eGraphicObjectType eMapTo /* = FILL_PROPERTIES */ + ) : + ItemConverter( rPropertySet, rItemPool ), + m_pNumberFormatterWrapper( pNumFormatter ) +{ + m_aConverters.push_back( new GraphicPropertyItemConverter( rPropertySet, rItemPool, rDrawModel, eMapTo )); + m_aConverters.push_back( new CharacterPropertyItemConverter( rPropertySet, rItemPool )); +} + +DataPointItemConverter::~DataPointItemConverter() +{ + ::std::for_each( m_aConverters.begin(), m_aConverters.end(), + DeleteItemConverterPtr() ); +} + +void DataPointItemConverter::FillItemSet( SfxItemSet & rOutItemSet ) const +{ + ::std::for_each( m_aConverters.begin(), m_aConverters.end(), + FillItemSetFunc( rOutItemSet )); + + // own items + ItemConverter::FillItemSet( rOutItemSet ); +} + +bool DataPointItemConverter::ApplyItemSet( const SfxItemSet & rItemSet ) +{ + bool bResult = false; + + ::std::for_each( m_aConverters.begin(), m_aConverters.end(), + ApplyItemSetFunc( rItemSet, bResult )); + + // own items + return ItemConverter::ApplyItemSet( rItemSet ) || bResult; +} + +const USHORT * DataPointItemConverter::GetWhichPairs() const +{ + // must span all used items! + return nRowWhichPairs; +} + +bool DataPointItemConverter::GetItemPropertyName( USHORT nWhichId, ::rtl::OUString & rOutName ) const +{ + ItemPropertyMapType & rMap( lcl_GetDataPointPropertyMap()); + ItemPropertyMapType::const_iterator aIt( rMap.find( nWhichId )); + + if( aIt == rMap.end()) + return false; + + rOutName =(*aIt).second; + return true; +} + + +bool DataPointItemConverter::ApplySpecialItem( + USHORT nWhichId, const SfxItemSet & rItemSet ) const +{ + bool bChanged = false; + uno::Any aValue; + + switch( nWhichId ) + { + case SCHATTR_DATADESCR_DESCR: + { + const SvxChartDataDescrItem & rItem = + reinterpret_cast< const SvxChartDataDescrItem & >( + rItemSet.Get( nWhichId )); + + chart2::DataCaptionStyle aStyle; + if( GetPropertySet()->getPropertyValue( C2U( "DataCaption" )) >>= aStyle ) + { + switch( rItem.GetValue()) + { + case CHDESCR_NONE: + aStyle.ShowNumber = sal_False; + aStyle.ShowCategoryName = sal_False; + break; + case CHDESCR_VALUE: + aStyle.ShowNumber = sal_True; + aStyle.ShowNumberInPercent = sal_False; + aStyle.ShowCategoryName = sal_False; + break; + case CHDESCR_PERCENT: + aStyle.ShowNumber = sal_True; + aStyle.ShowNumberInPercent = sal_True; + aStyle.ShowCategoryName = sal_False; + break; + case CHDESCR_TEXT: + aStyle.ShowNumber = sal_False; + aStyle.ShowCategoryName = sal_True; + break; + case CHDESCR_TEXTANDPERCENT: + aStyle.ShowNumber = sal_True; + aStyle.ShowNumberInPercent = sal_True; + aStyle.ShowCategoryName = sal_True; + break; + case CHDESCR_TEXTANDVALUE: + aStyle.ShowNumber = sal_True; + aStyle.ShowNumberInPercent = sal_False; + aStyle.ShowCategoryName = sal_True; + break; + default: + break; + } + + aValue <<= aStyle; + if( aValue != GetPropertySet()->getPropertyValue( C2U( "DataCaption" ) )) + { + GetPropertySet()->setPropertyValue( C2U( "DataCaption" ), aValue ); + bChanged = true; + } + } + } + break; + + case SCHATTR_DATADESCR_SHOW_SYM: + { + const SvxChartDataDescrItem & rItem = + reinterpret_cast< const SvxChartDataDescrItem & >( + rItemSet.Get( nWhichId )); + + chart2::DataCaptionStyle aStyle; + if( GetPropertySet()->getPropertyValue( C2U( "DataCaption" )) >>= aStyle ) + { + sal_Bool bOldValue = aStyle.ShowLegendSymbol; + aStyle.ShowLegendSymbol = static_cast< sal_Bool >( rItem.GetValue() ); + if( bOldValue != aStyle.ShowLegendSymbol ) + { + GetPropertySet()->setPropertyValue( C2U( "DataCaption" ), uno::makeAny( aStyle )); + bChanged = true; + } + } + } + break; + + case SID_ATTR_NUMBERFORMAT_VALUE: + { + if( m_pNumberFormatterWrapper ) + { + sal_Int32 nFmt = static_cast< sal_Int32 >( + reinterpret_cast< const SfxUInt32Item & >( + rItemSet.Get( nWhichId )).GetValue()); + + aValue = uno::makeAny( + m_pNumberFormatterWrapper->getNumberFormatForKey( nFmt )); + if( GetPropertySet()->getPropertyValue( C2U( "NumberFormat" )) != aValue ) + { + GetPropertySet()->setPropertyValue( C2U( "NumberFormat" ), aValue ); + bChanged = true; + } + } + else + { + OSL_ENSURE( false, "No NumberFormatterWrapper !" ); + } + } + break; + } + + return bChanged; +} + +void DataPointItemConverter::FillSpecialItem( + USHORT nWhichId, SfxItemSet & rOutItemSet ) const +{ + switch( nWhichId ) + { + case SCHATTR_DATADESCR_DESCR: + case SCHATTR_DATADESCR_SHOW_SYM: + { + chart2::DataCaptionStyle aStyle; + if( GetPropertySet()->getPropertyValue( C2U( "DataCaption" )) >>= aStyle ) + { + SvxChartDataDescr aDescr; + + if( aStyle.ShowNumber ) + { + if( aStyle.ShowNumberInPercent ) + { + if( aStyle.ShowCategoryName ) + aDescr = CHDESCR_TEXTANDPERCENT; + else + aDescr = CHDESCR_PERCENT; + } + else + { + if( aStyle.ShowCategoryName ) + aDescr = CHDESCR_TEXTANDVALUE; + else + aDescr = CHDESCR_VALUE; + } + } + else + { + if( aStyle.ShowCategoryName ) + aDescr = CHDESCR_TEXT; + else + aDescr = CHDESCR_NONE; + } + + rOutItemSet.Put( SvxChartDataDescrItem( aDescr )); + rOutItemSet.Put( SfxBoolItem( SCHATTR_DATADESCR_SHOW_SYM, aStyle.ShowLegendSymbol )); + } + } + break; + + case SID_ATTR_NUMBERFORMAT_VALUE: + { + if( m_pNumberFormatterWrapper ) + { + chart2::NumberFormat aNumFmt; + if( GetPropertySet()->getPropertyValue( C2U( "NumberFormat" )) >>= aNumFmt ); + { + sal_Int32 nKey = m_pNumberFormatterWrapper->getKeyForNumberFormat( aNumFmt ); + rOutItemSet.Put( SfxUInt32Item( nWhichId, nKey )); + } + } + else + { + OSL_ENSURE( false, "No NumberFormatterWrapper !" ); + } + } + break; + } +} + +} // namespace wrapper +} // namespace chart diff --git a/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx b/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx new file mode 100644 index 000000000..af423d7f0 --- /dev/null +++ b/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx @@ -0,0 +1,710 @@ +/************************************************************************* + * + * $RCSfile: GraphicPropertyItemConverter.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:28 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "GraphicPropertyItemConverter.hxx" +#include "SchWhichPairs.hxx" +#include "macros.hxx" +#include "ItemPropertyMap.hxx" + +// #ifndef _SFXINTITEM_HXX +// #include <svtools/intitem.hxx> +// #endif +#ifndef _SVX_XFLCLIT_HXX +#include <svx/xflclit.hxx> +#endif +#ifndef _SVX_XLNCLIT_HXX +#include <svx/xlnclit.hxx> +#endif +#ifndef _SVX_XFLBMTIT_HXX +#include <svx/xflbmtit.hxx> +#endif +#ifndef _SVX_XFLBSTIT_HXX +#include <svx/xflbstit.hxx> +#endif +#ifndef _SVX_XBTMPIT_HXX +#include <svx/xbtmpit.hxx> +#endif +#ifndef _SVX_XFLFTRIT_HXX +#include <svx/xflftrit.hxx> +#endif +#ifndef _SVX_XLNDSIT_HXX +#include <svx/xlndsit.hxx> +#endif +#ifndef _SVX_XFLHTIT_HXX +#include <svx/xflhtit.hxx> +#endif +#ifndef _SVX_XFLGRIT_HXX +#include <svx/xflgrit.hxx> +#endif +#ifndef _EEITEM_HXX +#include <svx/eeitem.hxx> +#endif +#ifndef _SVX_UDLNITEM_HXX +#define ITEMID_UNDERLINE EE_CHAR_UNDERLINE +#include <svx/udlnitem.hxx> +#endif +#ifndef _SVX_FONTITEM_HXX +#define ITEMID_FONT EE_CHAR_FONTINFO +#include <svx/fontitem.hxx> +#endif +// for SfxBoolItem +#ifndef _SFXENUMITEM_HXX +#include <svtools/eitem.hxx> +#endif +// for XFillGradientStepCountItem +#ifndef _SVX_XGRSCIT_HXX +#include <svx/xgrscit.hxx> +#endif + +#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSTATE_HPP_ +#include <com/sun/star/beans/XPropertyState.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_FILLBITMAP_HPP_ +#include <drafts/com/sun/star/chart2/FillBitmap.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_TRANSPARENCYSTYLE_HPP_ +#include <drafts/com/sun/star/chart2/TransparencyStyle.hpp> +#endif +#ifndef _COM_SUN_STAR_AWT_GRADIENT_HPP_ +#include <com/sun/star/awt/Gradient.hpp> +#endif + +using namespace ::com::sun::star; +using namespace ::drafts::com::sun::star; + +namespace +{ +::chart::wrapper::ItemPropertyMapType & lcl_GetDataPointFilledPropertyMap() +{ + static ::chart::wrapper::ItemPropertyMapType aDataPointPropertyFilledMap( + ::chart::wrapper::MakeItemPropertyMap + ( XATTR_FILLSTYLE, C2U( "FillStyle" )) + ( XATTR_FILLCOLOR, C2U( "Color" )) + ( XATTR_FILLTRANSPARENCE, C2U( "Transparency" )) +// ( XATTR_FILLGRADIENT, C2U( "Gradient" )) +// ( XATTR_FILLHATCH, C2U( "Hatch" )) + ( XATTR_LINECOLOR, C2U( "BorderColor" )) + ( XATTR_LINESTYLE, C2U( "BorderStyle" )) + ( XATTR_LINEWIDTH, C2U( "BorderWidth" )) +// ( XATTR_LINEDASH, C2U( "BorderDash" )) + ( XATTR_LINETRANSPARENCE, C2U( "BorderTransparency" )) + ); + + return aDataPointPropertyFilledMap; +} +::chart::wrapper::ItemPropertyMapType & lcl_GetDataPointLinePropertyMap() +{ + static ::chart::wrapper::ItemPropertyMapType aDataPointPropertyLineMap( + ::chart::wrapper::MakeItemPropertyMap + ( XATTR_LINECOLOR, C2U( "Color" )) + ( XATTR_LINETRANSPARENCE, C2U( "Transparency" )) + ( XATTR_LINESTYLE, C2U( "LineStyle" )) + ( XATTR_LINEWIDTH, C2U( "LineWidth" )) +// ( XATTR_LINEDASH, C2U( "LineDash" )) + ); + + return aDataPointPropertyLineMap; +} +::chart::wrapper::ItemPropertyMapType & lcl_GetLinePropertyMap() +{ + static ::chart::wrapper::ItemPropertyMapType aLinePropertyMap( + ::chart::wrapper::MakeItemPropertyMap + ( XATTR_LINESTYLE, C2U( "LineStyle" )) + ( XATTR_LINEWIDTH, C2U( "LineWidth" )) +// ( XATTR_LINEDASH, C2U( "LineDash" )) + ( XATTR_LINECOLOR, C2U( "LineColor" )) + ( XATTR_LINETRANSPARENCE, C2U( "LineTransparence" )) + ( XATTR_LINEJOINT, C2U( "LineJoint" )) + ); + + return aLinePropertyMap; +} +::chart::wrapper::ItemPropertyMapType & lcl_GetFillPropertyMap() +{ + static ::chart::wrapper::ItemPropertyMapType aFillPropertyMap( + ::chart::wrapper::MakeItemPropertyMap + ( XATTR_FILLSTYLE, C2U( "FillStyle" )) + ( XATTR_FILLCOLOR, C2U( "FillColor" )) + ( XATTR_FILLTRANSPARENCE, C2U( "FillTransparence" )) +// ( XATTR_FILLGRADIENT, C2U( "FillGradient" )) +// ( XATTR_FILLHATCH, C2U( "FillHatch" )) + ); + + return aFillPropertyMap; +} +} // anonymous namespace + +// ======================================== + +namespace chart +{ +namespace wrapper +{ + +GraphicPropertyItemConverter::GraphicPropertyItemConverter( + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertySet > & rPropertySet, + SfxItemPool& rItemPool, + SdrModel& rDrawModel, + eGraphicObjectType eObjectType /* = FILL_PROPERTIES */ ) : + ItemConverter( rPropertySet, rItemPool ), + m_eGraphicObjectType( eObjectType ), + m_rDrawModel( rDrawModel ) +{} + +GraphicPropertyItemConverter::~GraphicPropertyItemConverter() +{} + +const USHORT * GraphicPropertyItemConverter::GetWhichPairs() const +{ + const USHORT * pResult = NULL; + + switch( m_eGraphicObjectType ) + { + case LINE_DATA_POINT: + case FILLED_DATA_POINT: + pResult = nRowWhichPairs; break; + case LINE_PROPERTIES: + pResult = nLinePropertyWhichPairs; break; + case FILL_PROPERTIES: + pResult = nFillPropertyWhichPairs; break; + case LINE_AND_FILL_PROPERTIES: + pResult = nLineAndFillPropertyWhichPairs; break; + } + + return pResult; +} + +bool GraphicPropertyItemConverter::GetItemPropertyName( USHORT nWhichId, ::rtl::OUString & rOutName ) const +{ + ::chart::wrapper::ItemPropertyMapType::const_iterator aEndIt; + ::chart::wrapper::ItemPropertyMapType::const_iterator aIt; + + switch( m_eGraphicObjectType ) + { + case LINE_DATA_POINT: + aEndIt = lcl_GetDataPointLinePropertyMap().end(); + aIt = lcl_GetDataPointLinePropertyMap().find( nWhichId ); + break; + case FILLED_DATA_POINT: + aEndIt = lcl_GetDataPointFilledPropertyMap().end(); + aIt = lcl_GetDataPointFilledPropertyMap().find( nWhichId ); + break; + case LINE_PROPERTIES: + aEndIt = lcl_GetLinePropertyMap().end(); + aIt = lcl_GetLinePropertyMap().find( nWhichId ); + break; + + case FILL_PROPERTIES: + aEndIt = lcl_GetFillPropertyMap().end(); + aIt = lcl_GetFillPropertyMap().find( nWhichId ); + break; + + case LINE_AND_FILL_PROPERTIES: + // line + aEndIt = lcl_GetLinePropertyMap().end(); + aIt = lcl_GetLinePropertyMap().find( nWhichId ); + + // not found => try fill + if( aIt == aEndIt ) + { + aEndIt = lcl_GetFillPropertyMap().end(); + aIt = lcl_GetFillPropertyMap().find( nWhichId ); + } + break; + } + + if( aIt == aEndIt ) + return false; + + rOutName =(*aIt).second; + return true; +} + +void GraphicPropertyItemConverter::FillSpecialItem( + USHORT nWhichId, SfxItemSet & rOutItemSet ) const +{ +// if( m_eGraphicObjectType == LINE_DATA_POINT || +// m_eGraphicObjectType == LINE_PROPERTIES ) +// return; + + switch( nWhichId ) + { + // bitmap property + case XATTR_FILLBITMAP: + case XATTR_FILLBMP_TILE: + case XATTR_FILLBMP_POS: + case XATTR_FILLBMP_SIZEX: + case XATTR_FILLBMP_SIZEY: + case XATTR_FILLBMP_SIZELOG: + case XATTR_FILLBMP_TILEOFFSETX: + case XATTR_FILLBMP_TILEOFFSETY: + case XATTR_FILLBMP_STRETCH: + case XATTR_FILLBMP_POSOFFSETX: + case XATTR_FILLBMP_POSOFFSETY: + // avoid assertions while bitmap stuff is not working +// try +// { +// FillBitmapItem( nWhichId, rOutItemSet ); +// } +// catch( beans::UnknownPropertyException ex ) +// { +// ASSERT_EXCEPTION( ex ); +// } + break; + + case XATTR_FILLFLOATTRANSPARENCE: + { + try + { + chart2::TransparencyStyle aTranspStyle; + ( GetPropertySet()->getPropertyValue( C2U( "TransparencyStyle" ))) + >>= aTranspStyle; + + uno::Any aValue( GetPropertySet()->getPropertyValue( C2U( "TransparencyGradient" ))); + if( aValue.hasValue()) + { + XFillFloatTransparenceItem aItem; + aItem.PutValue( aValue ); + + // this is important to enable the item + aItem.SetEnabled( ( aTranspStyle == chart2::TransparencyStyle_GRADIENT )); + rOutItemSet.Put( aItem ); + } + } + catch( beans::UnknownPropertyException ex ) + { + ASSERT_EXCEPTION( ex ); + } + } + break; + + case XATTR_GRADIENTSTEPCOUNT: + { + ::rtl::OUString aPropName = + (m_eGraphicObjectType == FILLED_DATA_POINT) + ? C2U( "Gradient" ) + : C2U( "FillGradient" ); + try + { + awt::Gradient aGradient; + if( GetPropertySet()->getPropertyValue( aPropName ) >>= aGradient ) + { + rOutItemSet.Put( XGradientStepCountItem( aGradient.StepCount )); + } + } + catch( beans::UnknownPropertyException ex ) + { + ASSERT_EXCEPTION( ex ); + } + } + break; + + case XATTR_LINEDASH: + { + ::rtl::OUString aPropName = + (m_eGraphicObjectType == FILLED_DATA_POINT) + ? C2U( "BorderDash" ) + : C2U( "LineDash" ); + + XLineDashItem aItem; + aItem.PutValue( GetPropertySet()->getPropertyValue( aPropName ) ); + + // find the name for the dialog table + XLineDashItem * pItemToPut = & aItem; + pItemToPut = aItem.checkForUniqueItem( & m_rDrawModel ); + + rOutItemSet.Put( * pItemToPut ); + } + break; + + case XATTR_FILLGRADIENT: + { + ::rtl::OUString aPropName = + (m_eGraphicObjectType == FILLED_DATA_POINT) + ? C2U( "Gradient" ) + : C2U( "FillGradient" ); + + XFillGradientItem aItem; + aItem.PutValue( GetPropertySet()->getPropertyValue( aPropName ) ); + + // find the name for the dialog table + XFillGradientItem * pItemToPut = & aItem; + pItemToPut = aItem.checkForUniqueItem( & m_rDrawModel ); + + rOutItemSet.Put( * pItemToPut ); + } + break; + + case XATTR_FILLHATCH: + { + ::rtl::OUString aPropName = + (m_eGraphicObjectType == FILLED_DATA_POINT) + ? C2U( "Hatch" ) + : C2U( "FillHatch" ); + + XFillHatchItem aItem; + aItem.PutValue( GetPropertySet()->getPropertyValue( aPropName ) ); + + // find the name for the dialog table + XFillHatchItem * pItemToPut = & aItem; + pItemToPut = aItem.checkForUniqueItem( & m_rDrawModel ); + + rOutItemSet.Put( * pItemToPut ); + } + break; + + } +} + +bool GraphicPropertyItemConverter::ApplySpecialItem( + USHORT nWhichId, const SfxItemSet & rItemSet ) const +{ +// if( m_eGraphicObjectType == LINE_DATA_POINT || +// m_eGraphicObjectType == LINE_PROPERTIES ) +// return false; + + bool bChanged = false; + uno::Any aValue; + + switch( nWhichId ) + { + // bitmap property + case XATTR_FILLBITMAP: + case XATTR_FILLBMP_TILE: + case XATTR_FILLBMP_POS: + case XATTR_FILLBMP_SIZEX: + case XATTR_FILLBMP_SIZEY: + case XATTR_FILLBMP_SIZELOG: + case XATTR_FILLBMP_TILEOFFSETX: + case XATTR_FILLBMP_TILEOFFSETY: + case XATTR_FILLBMP_STRETCH: + case XATTR_FILLBMP_POSOFFSETX: + case XATTR_FILLBMP_POSOFFSETY: + // avoid assertions while bitmap stuff is not working +// try +// { +// ApplyBitmapItem( nWhichId, rItemSet ); +// bChanged = true; +// } +// catch( beans::UnknownPropertyException ex ) +// { +// ASSERT_EXCEPTION( ex ); +// } + break; + + case XATTR_FILLFLOATTRANSPARENCE: + try + { + const XFillFloatTransparenceItem & rItem = + reinterpret_cast< const XFillFloatTransparenceItem & >( + rItemSet.Get( nWhichId )); + if( rItem.IsEnabled() ) + { + rItem.QueryValue( aValue ); + GetPropertySet()->setPropertyValue( C2U( "TransparencyGradient" ), aValue ); + GetPropertySet()->setPropertyValue( C2U( "TransparencyStyle" ), + uno::makeAny( chart2::TransparencyStyle_GRADIENT )); + } + else + { + GetPropertySet()->setPropertyValue( + C2U( "TransparencyStyle" ), + uno::makeAny( chart2::TransparencyStyle_LINEAR )); + } + bChanged = true; + } + catch( beans::UnknownPropertyException ex ) + { + ASSERT_EXCEPTION( ex ); + } + break; + + case XATTR_GRADIENTSTEPCOUNT: + { + ::rtl::OUString aPropName = + (m_eGraphicObjectType == FILLED_DATA_POINT) + ? C2U( "Gradient" ) + : C2U( "FillGradient" ); + try + { + sal_Int16 nStepCount = + ( reinterpret_cast< const XGradientStepCountItem & >( + rItemSet.Get( nWhichId ))).GetValue(); + + awt::Gradient aGradient; + if( GetPropertySet()->getPropertyValue( aPropName ) >>= aGradient ) + { + if( aGradient.StepCount != nStepCount ) + { + aGradient.StepCount = nStepCount; + GetPropertySet()->setPropertyValue( + aPropName, + uno::makeAny( aGradient )); + bChanged = true; + } + } + } + catch( beans::UnknownPropertyException ex ) + { + ASSERT_EXCEPTION( ex ); + } + } + break; + + case XATTR_LINEDASH: + { + ::rtl::OUString aPropName = + (m_eGraphicObjectType == FILLED_DATA_POINT) + ? C2U( "BorderDash" ) + : C2U( "LineDash" ); + + const XLineDashItem & rItem = + reinterpret_cast< const XLineDashItem & >( + rItemSet.Get( nWhichId )); + + if( rItem.QueryValue( aValue )) + { + if( aValue != GetPropertySet()->getPropertyValue( aPropName )) + { + GetPropertySet()->setPropertyValue( aPropName, aValue ); + bChanged = true; + } + } + } + break; + + case XATTR_FILLGRADIENT: + { + ::rtl::OUString aPropName = + (m_eGraphicObjectType == FILLED_DATA_POINT) + ? C2U( "Gradient" ) + : C2U( "FillGradient" ); + + const XFillGradientItem & rItem = + reinterpret_cast< const XFillGradientItem & >( + rItemSet.Get( nWhichId )); + + if( rItem.QueryValue( aValue )) + { + if( aValue != GetPropertySet()->getPropertyValue( aPropName )) + { + GetPropertySet()->setPropertyValue( aPropName, aValue ); + bChanged = true; + } + } + } + break; + + case XATTR_FILLHATCH: + { + ::rtl::OUString aPropName = + (m_eGraphicObjectType == FILLED_DATA_POINT) + ? C2U( "Hatch" ) + : C2U( "FillHatch" ); + + const XFillHatchItem & rItem = + reinterpret_cast< const XFillHatchItem & >( + rItemSet.Get( nWhichId )); + + if( rItem.QueryValue( aValue )) + { + if( aValue != GetPropertySet()->getPropertyValue( aPropName )) + { + GetPropertySet()->setPropertyValue( aPropName, aValue ); + bChanged = true; + } + } + } + break; + } + + return bChanged; +} + +void GraphicPropertyItemConverter::FillBitmapItem( + USHORT nWhichId, SfxItemSet & rOutItemSet ) const + throw( beans::UnknownPropertyException ) +{ + uno::Reference< beans::XPropertySet > xProp( GetPropertySet() ); + OSL_ASSERT( xProp.is()); + chart2::FillBitmap aBitmap; + ( xProp->getPropertyValue( C2U( "Bitmap" ))) >>= aBitmap; + + switch( nWhichId ) + { + // bitmap property + case XATTR_FILLBITMAP: + { + XFillBitmapItem aBmpIt; + aBmpIt.PutValue( uno::makeAny( aBitmap.aURL ), MID_GRAFURL ); + rOutItemSet.Put( aBmpIt ); + } + break; + + case XATTR_FILLBMP_TILE: + rOutItemSet.Put( XFillBmpTileItem( + aBitmap.aBitmapMode == drawing::BitmapMode_REPEAT )); + rOutItemSet.Put( XFillBmpStretchItem( FALSE )); + break; + case XATTR_FILLBMP_STRETCH: + rOutItemSet.Put( XFillBmpStretchItem( + aBitmap.aBitmapMode == drawing::BitmapMode_STRETCH )); + rOutItemSet.Put( XFillBmpTileItem( FALSE )); + break; + case XATTR_FILLBMP_POS: + break; + case XATTR_FILLBMP_SIZEX: + break; + case XATTR_FILLBMP_SIZEY: + break; + case XATTR_FILLBMP_SIZELOG: + break; + case XATTR_FILLBMP_TILEOFFSETX: + break; + case XATTR_FILLBMP_TILEOFFSETY: + break; + case XATTR_FILLBMP_POSOFFSETX: + break; + case XATTR_FILLBMP_POSOFFSETY: + break; + } +} + +void GraphicPropertyItemConverter::ApplyBitmapItem( + USHORT nWhichId, const SfxItemSet & rItemSet ) const + throw( beans::UnknownPropertyException ) +{ + static const ::rtl::OUString aBitmapPropName( + RTL_CONSTASCII_USTRINGPARAM( "Bitmap" )); + uno::Reference< beans::XPropertySet > xProp( GetPropertySet() ); + OSL_ASSERT( xProp.is()); + chart2::FillBitmap aBitmap; + uno::Any aValue; + + try + { + ( xProp->getPropertyValue( aBitmapPropName )) >>= aBitmap; + + switch( nWhichId ) + { + // bitmap property + case XATTR_FILLBITMAP: + { + const XFillBitmapItem & rBitmapItem = + reinterpret_cast< const XFillBitmapItem & >( + rItemSet.Get( nWhichId )); + rBitmapItem.QueryValue( aValue, MID_GRAFURL ); + aValue >>= aBitmap.aURL; + + // must remember bitmap, so that URL stays valid + //ToDo: Never deleted yet !!! +// GraphicObject * pTESTING_CACHE = new GraphicObject( +// rBitmapItem.GetValue().GetGraphicObject() ); + } + break; + + case XATTR_FILLBMP_TILE: + case XATTR_FILLBMP_STRETCH: + { + const XFillBmpStretchItem & rStretchItem = + reinterpret_cast< const XFillBmpStretchItem & >( + rItemSet.Get( XATTR_FILLBMP_STRETCH )); + const XFillBmpTileItem & rTileItem = + reinterpret_cast< const XFillBmpTileItem & >( + rItemSet.Get( XATTR_FILLBMP_TILE )); + + if( rTileItem.GetValue() != FALSE ) + aBitmap.aBitmapMode = drawing::BitmapMode_REPEAT; + else if( rStretchItem.GetValue() != FALSE ) + aBitmap.aBitmapMode = drawing::BitmapMode_STRETCH; + else + aBitmap.aBitmapMode = drawing::BitmapMode_NO_REPEAT; + } + break; + + case XATTR_FILLBMP_POS: + break; + case XATTR_FILLBMP_SIZEX: + break; + case XATTR_FILLBMP_SIZEY: + break; + case XATTR_FILLBMP_SIZELOG: + break; + case XATTR_FILLBMP_TILEOFFSETX: + break; + case XATTR_FILLBMP_TILEOFFSETY: + break; + case XATTR_FILLBMP_POSOFFSETX: + break; + case XATTR_FILLBMP_POSOFFSETY: + break; + } + + xProp->setPropertyValue( aBitmapPropName, uno::makeAny( aBitmap )); + } + catch( beans::UnknownPropertyException ex ) + { + ASSERT_EXCEPTION( ex ); + } +} + +} // namespace wrapper +} // namespace chart diff --git a/chart2/source/controller/itemsetwrapper/ItemConverter.cxx b/chart2/source/controller/itemsetwrapper/ItemConverter.cxx new file mode 100644 index 000000000..c8f844a18 --- /dev/null +++ b/chart2/source/controller/itemsetwrapper/ItemConverter.cxx @@ -0,0 +1,296 @@ +/************************************************************************* + * + * $RCSfile: ItemConverter.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:28 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "ItemConverter.hxx" +#include "SchItemPool.hxx" + +// only used for OSL_ENSURE +#if OSL_DEBUG_LEVEL > 0 +#include "macros.hxx" +#endif + +#ifndef _COM_SUN_STAR_LANG_XCOMPONENT_HPP_ +#include <com/sun/star/lang/XComponent.hpp> +#endif +#ifndef _SFX_ITEMPROP_HXX +#include <svtools/itemprop.hxx> +#endif + +#ifndef _SFXITEMITER_HXX +#include <svtools/itemiter.hxx> +#endif +// header for class SfxWhichIter +#ifndef _SFX_WHITER_HXX +#include <svtools/whiter.hxx> +#endif + +using namespace ::com::sun::star; + +namespace chart +{ +namespace wrapper +{ + +ItemConverter::ItemConverter( + const uno::Reference< beans::XPropertySet > & rPropertySet, + SfxItemPool& rItemPool ) : + m_xPropertySet( rPropertySet ), + m_xPropertySetInfo( NULL ), + m_rItemPool( rItemPool ), + m_bIsValid( true ) +{ + if( m_xPropertySet.is()) + { + m_xPropertySetInfo = m_xPropertySet->getPropertySetInfo(); + + // Note: Do not add this as Reference in the CTOR !!!! +// uno::Reference< lang::XComponent > xComp( m_xPropertySet, uno::UNO_QUERY ); +// if( xComp.is()) +// { +// xComp->addEventListener( this ); +// } + } +} + +ItemConverter::~ItemConverter() +{} + + +//static +SfxItemPool* ItemConverter::CreateSchItemPool() +{ + return new SchItemPool(); +} + +SfxItemPool & ItemConverter::GetItemPool() const +{ + return m_rItemPool; +} + +SfxItemSet ItemConverter::CreateEmptyItemSet() const +{ + return SfxItemSet( GetItemPool(), GetWhichPairs() ); +} + +uno::Reference< beans::XPropertySet > ItemConverter::GetPropertySet() const +{ + return m_xPropertySet; +} + +void ItemConverter::FillItemSet( SfxItemSet & rOutItemSet ) const +{ + const USHORT * pRanges = rOutItemSet.GetRanges(); + ::rtl::OUString aPropName; + SfxItemPool & rPool = GetItemPool(); + + OSL_ASSERT( pRanges != NULL ); + OSL_ASSERT( m_xPropertySetInfo.is()); + OSL_ASSERT( m_xPropertySet.is()); + + while( (*pRanges) != 0) + { + USHORT nBeg = (*pRanges); + ++pRanges; + USHORT nEnd = (*pRanges); + ++pRanges; + + OSL_ASSERT( nBeg <= nEnd ); + for( USHORT nWhich = nBeg; nWhich <= nEnd; ++nWhich ) + { + if( GetItemPropertyName( nWhich, aPropName )) + { +#if OSL_DEBUG_LEVEL > 0 + try + { + beans::Property aProp( m_xPropertySetInfo->getPropertyByName( aPropName )); + OSL_ASSERT( aProp.Name.equals( aPropName )); + } + catch( beans::UnknownPropertyException ex ) + { + ASSERT_EXCEPTION( ex ); + } +#endif + + // put the Property into the itemset + SfxPoolItem * pItem = rPool.GetDefaultItem( nWhich ).Clone(); + + if( pItem ) + { + try + { + if( ! pItem->PutValue( m_xPropertySet->getPropertyValue( aPropName ), + 0 // nMemberId + )) + { + delete pItem; +// throw lang::IllegalArgumentException(); + } + else + { + rOutItemSet.Put( *pItem, nWhich ); + delete pItem; + } + } + catch( beans::UnknownPropertyException ex ) + { + OSL_ENSURE( false, U2C( ex.Message + C2U( " - unknown Property: " ) + aPropName ) ); + delete pItem; + } + } + } + else + { + FillSpecialItem( nWhich, rOutItemSet ); + } + } + } +} + +bool ItemConverter::GetItemPropertyName( + USHORT nWhichId, ::rtl::OUString & rOutName ) const +{ + return false; +} + +void ItemConverter::FillSpecialItem( + USHORT nWhichId, SfxItemSet & rOutItemSet ) const +{ + OSL_ENSURE( false, "ItemConverter: Unhandled special item found!" ); +} + +bool ItemConverter::ApplySpecialItem( + USHORT nWhichId, const SfxItemSet & rItemSet ) const +{ + OSL_ENSURE( false, "ItemConverter: Unhandled special item found!" ); + return false; +} + +bool ItemConverter::ApplyItemSet( const SfxItemSet & rItemSet ) +{ + OSL_ASSERT( m_xPropertySet.is()); + + bool bItemsChanged = false; + SfxItemIter aIter( rItemSet ); + const SfxPoolItem * pItem = aIter.FirstItem(); + ::rtl::OUString aPropName; + uno::Any aValue; + + while( pItem ) + { + if( rItemSet.GetItemState( pItem->Which(), FALSE ) == SFX_ITEM_SET ) + { + if( GetItemPropertyName( pItem->Which(), aPropName )) + { + pItem->QueryValue( aValue, 0 /* nMemberId */ ); + + try + { + if( aValue != m_xPropertySet->getPropertyValue( aPropName )) + { + m_xPropertySet->setPropertyValue( aPropName, aValue ); + bItemsChanged = true; + } + } + catch( beans::UnknownPropertyException ex ) + { + OSL_ENSURE( false, U2C( ex.Message + C2U( " - unknown Property: " ) + aPropName ) ); + } + } + else + { + bItemsChanged = ApplySpecialItem( pItem->Which(), rItemSet ) || bItemsChanged; + } + } + pItem = aIter.NextItem(); + } + + return bItemsChanged; +} + +// ____ XEventListener ____ +void SAL_CALL ItemConverter::disposing( const lang::EventObject& Source ) + throw (uno::RuntimeException) +{ + if( Source.Source == m_xPropertySet ) + { + m_bIsValid = false; + } +} + +//static +void ItemConverter::InvalidateUnequalItems( SfxItemSet &rDestSet, const SfxItemSet &rSourceSet ) +{ + SfxWhichIter aIter (rSourceSet); + USHORT nWhich = aIter.FirstWhich (); + const SfxPoolItem *pPoolItem = NULL; + + while (nWhich) + { + if ((rSourceSet.GetItemState(nWhich, TRUE, &pPoolItem) == SFX_ITEM_SET) && + (rDestSet.GetItemState(nWhich, TRUE, &pPoolItem) == SFX_ITEM_SET)) + if (rSourceSet.Get(nWhich) != rDestSet.Get(nWhich)) + rDestSet.InvalidateItem(nWhich); + + nWhich = aIter.NextWhich (); + } +} + +} // namespace wrapper +} // namespace chart diff --git a/chart2/source/controller/itemsetwrapper/MultipleItemConverter.cxx b/chart2/source/controller/itemsetwrapper/MultipleItemConverter.cxx new file mode 100644 index 000000000..a543df2f4 --- /dev/null +++ b/chart2/source/controller/itemsetwrapper/MultipleItemConverter.cxx @@ -0,0 +1,230 @@ +/************************************************************************* + * + * $RCSfile: MultipleItemConverter.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:28 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "MultipleItemConverter.hxx" +#include "ItemPropertyMap.hxx" +#include "SchSfxItemIds.hxx" +#include "SchWhichPairs.hxx" +#include "AxisItemConverter.hxx" +#include "GraphicPropertyItemConverter.hxx" +#include "DataPointItemConverter.hxx" +#include "ChartModelHelper.hxx" + +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XAXISCONTAINER_HPP_ +#include <drafts/com/sun/star/chart2/XAxisContainer.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XGRIDCONTAINER_HPP_ +#include <drafts/com/sun/star/chart2/XGridContainer.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XCHARTDOCUMENT_HPP_ +#include <drafts/com/sun/star/chart2/XChartDocument.hpp> +#endif + +#include <algorithm> + +using namespace ::com::sun::star; +using namespace ::drafts::com::sun::star; + +namespace chart +{ +namespace wrapper +{ +MultipleItemConverter::MultipleItemConverter( SfxItemPool& rItemPool ) + : ItemConverter( NULL, rItemPool ) +{ +} +MultipleItemConverter::~MultipleItemConverter() +{ + ::std::for_each( m_aConverters.begin(), m_aConverters.end(), + DeleteItemConverterPtr() ); +} + +void MultipleItemConverter::FillItemSet( SfxItemSet & rOutItemSet ) const +{ + ::std::vector< ItemConverter* >::const_iterator aIter = m_aConverters.begin(); + const ::std::vector< ItemConverter* >::const_iterator aEnd = m_aConverters.end(); + if( aIter != aEnd ) + { + (*aIter)->FillItemSet( rOutItemSet ); + aIter++; + } + for( ; aIter != aEnd; aIter++ ) + { + SfxItemSet aSet = this->CreateEmptyItemSet(); + (*aIter)->FillItemSet( aSet ); + InvalidateUnequalItems( rOutItemSet, aSet ); + } + // no own items +} + +bool MultipleItemConverter::ApplyItemSet( const SfxItemSet & rItemSet ) +{ + bool bResult = false; + + ::std::for_each( m_aConverters.begin(), m_aConverters.end(), + ApplyItemSetFunc( rItemSet, bResult )); + + // no own items + return bResult; +} + +//----------------------------------------------------------------------------- + +AllAxisItemConverter::AllAxisItemConverter( + const uno::Reference< frame::XModel > & xChartModel, + SfxItemPool& rItemPool, + SdrModel& rDrawModel ) + : MultipleItemConverter( rItemPool ) +{ + uno::Reference< chart2::XChartDocument > xChartDocument( xChartModel, uno::UNO_QUERY ); + if(!xChartDocument.is()) + return; + uno::Reference< chart2::XDiagram > xDiagram = xChartDocument->getDiagram(); + uno::Reference< chart2::XAxisContainer > xContainer( xDiagram, uno::UNO_QUERY ); + if(!xContainer.is()) + return; + uno::Sequence< uno::Reference< chart2::XAxis > > aElementList = xContainer->getAxes(); + for( sal_Int32 nA = 0; nA < aElementList.getLength(); nA++ ) + { + uno::Reference< beans::XPropertySet > xObjectProperties(aElementList[nA], uno::UNO_QUERY); + m_aConverters.push_back( new wrapper::AxisItemConverter( + xObjectProperties, rItemPool, rDrawModel, 0, 0, 0, 0 ) ); + } +} + +AllAxisItemConverter::~AllAxisItemConverter() +{ +} + +const USHORT * AllAxisItemConverter::GetWhichPairs() const +{ + // must span all used items! + return nAllAxisWhichPairs; +} + +//----------------------------------------------------------------------------- + +AllGridItemConverter::AllGridItemConverter( + const uno::Reference< frame::XModel > & xChartModel, + SfxItemPool& rItemPool, + SdrModel& rDrawModel ) + : MultipleItemConverter( rItemPool ) +{ + uno::Reference< chart2::XChartDocument > xChartDocument( xChartModel, uno::UNO_QUERY ); + if(!xChartDocument.is()) + return; + uno::Reference< chart2::XDiagram > xDiagram = xChartDocument->getDiagram(); + uno::Reference< chart2::XGridContainer > xContainer( xDiagram, uno::UNO_QUERY ); + if(!xContainer.is()) + return; + uno::Sequence< uno::Reference< chart2::XGrid > > aElementList = xContainer->getGrids(); + for( sal_Int32 nA = 0; nA < aElementList.getLength(); nA++ ) + { + uno::Reference< beans::XPropertySet > xObjectProperties(aElementList[nA], uno::UNO_QUERY); + m_aConverters.push_back( new wrapper::GraphicPropertyItemConverter( + xObjectProperties, rItemPool, rDrawModel, + wrapper::GraphicPropertyItemConverter::LINE_PROPERTIES ) ); + } +} + +AllGridItemConverter::~AllGridItemConverter() +{ +} + +const USHORT * AllGridItemConverter::GetWhichPairs() const +{ + // must span all used items! + return nGridWhichPairs; +} + +//----------------------------------------------------------------------------- + +AllDataLabelItemConverter::AllDataLabelItemConverter( + const uno::Reference< frame::XModel > & xChartModel, + SfxItemPool& rItemPool, + SdrModel& rDrawModel ) + : MultipleItemConverter( rItemPool ) +{ + ::std::vector< uno::Reference< chart2::XDataSeries > > aSeriesList( + ChartModelHelper::getDataSeries( xChartModel )); + + ::std::vector< uno::Reference< chart2::XDataSeries > >::const_iterator aIt; + for( aIt = aSeriesList.begin(); aIt != aSeriesList.end(); ++aIt ) + { + uno::Reference< beans::XPropertySet > xObjectProperties( *aIt, uno::UNO_QUERY); + m_aConverters.push_back( new wrapper::DataPointItemConverter( + xObjectProperties, rItemPool, rDrawModel, NULL ) ); + } +} + +AllDataLabelItemConverter::~AllDataLabelItemConverter() +{ +} + +const USHORT * AllDataLabelItemConverter::GetWhichPairs() const +{ + // must span all used items! + return nDataLabelWhichPairs; +} + +//----------------------------------------------------------------------------- + +} // namespace wrapper +} // namespace chart diff --git a/chart2/source/controller/itemsetwrapper/SchWhichPairs.hxx b/chart2/source/controller/itemsetwrapper/SchWhichPairs.hxx new file mode 100644 index 000000000..0045a96c1 --- /dev/null +++ b/chart2/source/controller/itemsetwrapper/SchWhichPairs.hxx @@ -0,0 +1,273 @@ +/************************************************************************* + * + * $RCSfile: SchWhichPairs.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:28 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef CHART_SCHWHICHPAIRS_HXX +#define CHART_SCHWHICHPAIRS_HXX + +#ifndef _SVX_SVXIDS_HRC +#include <svx/svxids.hrc> +#endif + +#ifndef _XDEF_HXX +#include <svx/xdef.hxx> +#endif +#ifndef _SVDDEF_HXX +#include <svx/svddef.hxx> +#endif +#ifndef _EEITEM_HXX +#include <svx/eeitem.hxx> +#endif + +#include "SchSfxItemIds.hxx" +#include "SchSlotIds.hxx" + +namespace +{ + +const USHORT nTitleWhichPairs[] = +{ +// SCHATTR_TEXT_ORIENT, SCHATTR_TEXT_ORIENT, // 4 sch/schattr.hxx + SCHATTR_TEXT_STACKED, SCHATTR_TEXT_STACKED, // 4 sch/schattr.hxx + SCHATTR_TEXT_DEGREES,SCHATTR_TEXT_DEGREES, // 53 sch/schattr.hxx + SCHATTR_USER_DEFINED_ATTR, SCHATTR_USER_DEFINED_ATTR, // 100 sch/schattr.hxx + XATTR_LINE_FIRST, XATTR_LINE_LAST, // 1000 - 1016 svx/xdef.hxx + XATTR_FILL_FIRST, XATTR_FILL_LAST, // 1018 - 1046 svx/xdef.hxx + SDRATTR_SHADOW_FIRST, SDRATTR_SHADOW_LAST, // 1067 - 1078 svx/svddef.hxx + EE_ITEMS_START, EE_ITEMS_END, // 3994 - 4037 svx/eeitem.hxx + 0 +}; + +const USHORT nAxisWhichPairs[] = +{ + XATTR_LINE_FIRST, XATTR_LINE_LAST, // 1000 - 1016 svx/xdef.hxx + EE_ITEMS_START, EE_ITEMS_END, // 3994 - 4037 svx/eeitem.hxx + SID_ATTR_NUMBERFORMAT_VALUE, SID_ATTR_NUMBERFORMAT_VALUE, // 10585 - 10585 svx/svxids.hrc + SID_ATTR_NUMBERFORMAT_SOURCE, SID_ATTR_NUMBERFORMAT_SOURCE, // 11432 svx/svxids.hrc + SCHATTR_AXISTYPE, SCHATTR_AXISTYPE, // 39 sch/schattr.hxx + SCHATTR_TEXT_START, SCHATTR_TEXT_END, // 4 - 6 sch/schattr.hxx + SCHATTR_TEXT_DEGREES,SCHATTR_TEXT_DEGREES, // 53 sch/schattr.hxx + SCHATTR_TEXT_OVERLAP, SCHATTR_TEXT_OVERLAP, // 54 sch/schattr.hxx + SCHATTR_AXIS_START, SCHATTR_AXIS_END, // 70 - 95 sch/schattr.hxx + SCHATTR_USER_DEFINED_ATTR, SCHATTR_USER_DEFINED_ATTR, // 100 sch/schattr.hxx + // SID_TEXTBREAK, SID_TEXTBREAK, // 30587 sch/app.hrc + SCHATTR_TEXTBREAK, SCHATTR_TEXTBREAK, // 30587 sch/schattr.hxx + 0 +}; + +const USHORT nAllAxisWhichPairs[] = +{ + XATTR_LINE_FIRST, XATTR_LINE_LAST, // 1000 - 1016 svx/xdef.hxx + EE_ITEMS_START, EE_ITEMS_END, // 3994 - 4037 svx/eeitem.hxx +// SCHATTR_TEXT_ORIENT, SCHATTR_TEXT_ORIENT, // 4 sch/schattr.hxx + SCHATTR_TEXT_START, SCHATTR_TEXT_END, // 4 - 6 sch/schattr.hxx + SCHATTR_TEXT_DEGREES,SCHATTR_TEXT_DEGREES, // 53 sch/schattr.hxx + SCHATTR_TEXT_OVERLAP, SCHATTR_TEXT_OVERLAP, // 54 sch/schattr.hxx + SCHATTR_AXIS_SHOWDESCR, SCHATTR_AXIS_SHOWDESCR, // 85 sch/schattr.hxx + // SID_TEXTBREAK, SID_TEXTBREAK, // 30587 sch/app.hrc + SCHATTR_TEXTBREAK, SCHATTR_TEXTBREAK, // 30587 sch/schattr.hxx + 0 +}; + +const USHORT nGridWhichPairs[] = +{ + XATTR_LINE_FIRST, XATTR_LINE_LAST, // 1000 - 1016 svx/xdef.hxx + SCHATTR_USER_DEFINED_ATTR, SCHATTR_USER_DEFINED_ATTR, // 100 sch/schattr.hxx + 0 +}; + +const USHORT nChartWhichPairs[] = +{ + SCHATTR_STYLE_START,SCHATTR_STYLE_END, // 59 - 68 sch/schattr.hxx + SCHATTR_USER_DEFINED_ATTR, SCHATTR_USER_DEFINED_ATTR, // 100 sch/schattr.hxx + 0 +}; + +const USHORT nDiagramAreaWhichPairs[] = +{ + XATTR_LINE_FIRST, XATTR_LINE_LAST, // 1000 - 1016 svx/xdef.hxx + XATTR_FILL_FIRST, XATTR_FILL_LAST, // 1018 - 1046 svx/xdef.hxx + SCHATTR_USER_DEFINED_ATTR, SCHATTR_USER_DEFINED_ATTR, // 100 sch/schattr.hxx + 0 +}; + +const USHORT nAreaAndChartWhichPairs[] = // pairs for chart AND area +{ + XATTR_LINE_FIRST, XATTR_LINE_LAST, // 1000 - 1016 svx/xdef.hxx + XATTR_FILL_FIRST, XATTR_FILL_LAST, // 1018 - 1046 svx/xdef.hxx + SCHATTR_STYLE_START,SCHATTR_STYLE_END, // 59 - 68 sch/schattr.hxx + SCHATTR_USER_DEFINED_ATTR, SCHATTR_USER_DEFINED_ATTR, // 100 sch/schattr.hxx + 0 +}; + +const USHORT nLegendWhichPairs[] = +{ + XATTR_LINE_FIRST, XATTR_LINE_LAST, // 1000 - 1016 svx/xdef.hxx + XATTR_FILL_FIRST, XATTR_FILL_LAST, // 1018 - 1046 svx/xdef.hxx + SDRATTR_SHADOW_FIRST, SDRATTR_SHADOW_LAST, // 1067 - 1078 svx/svddef.hxx + EE_ITEMS_START, EE_ITEMS_END, // 3994 - 4037 svx/eeitem.hxx + SCHATTR_LEGEND_START, SCHATTR_LEGEND_END, // 3 - 3 sch/schattr.hxx + SCHATTR_USER_DEFINED_ATTR, SCHATTR_USER_DEFINED_ATTR, // 100 sch/schattr.hxx + 0 +}; + +const USHORT nDataLabelWhichPairs[] = +{ + SCHATTR_DATADESCR_START, SCHATTR_DATADESCR_END, + 0 +}; + +#define CHART_ROW_WHICHPAIRS \ + XATTR_LINE_FIRST, XATTR_LINE_LAST, /* 1000 - 1016 svx/xdef.hxx */ \ + XATTR_FILL_FIRST, XATTR_FILL_LAST, /* 1018 - 1046 svx/xdef.hxx */ \ + EE_ITEMS_START, EE_ITEMS_END, /* 3994 - 4037 svx/eeitem.hxx */ \ + SCHATTR_DATADESCR_START, SCHATTR_DATADESCR_END, /* 1 - 2 sch/schattr.hxx*/ \ + SCHATTR_DUMMY0, SCHATTR_DUMMY0, /* 40 sch/schattr.hxx*/ \ + SCHATTR_DUMMY1, SCHATTR_DUMMY1, /* 41 sch/schattr.hxx*/ \ + SCHATTR_STAT_START, SCHATTR_STAT_END, /* 45 - 52 sch/schattr.hxx*/ \ + SCHATTR_STYLE_START,SCHATTR_STYLE_END, /* 59 - 68 sch/schattr.hxx*/ \ + SCHATTR_AXIS,SCHATTR_AXIS, /* 69 sch/schattr.hxx*/ \ + SCHATTR_SYMBOL_BRUSH,SCHATTR_SYMBOL_BRUSH, /* 96 sch/schattr.hxx*/ \ + SCHATTR_SYMBOL_SIZE,SCHATTR_USER_DEFINED_ATTR, /* 99 - 100 sch/schattr.hxx*/ \ + SDRATTR_3D_FIRST, SDRATTR_3D_LAST /* 1244 - 1334 svx/svddef.hxx */ + +const USHORT nRowWhichPairs[] = +{ + CHART_ROW_WHICHPAIRS, + 0 +}; + +const USHORT nAreaWhichPairs[] = +{ + XATTR_LINE_FIRST, XATTR_LINE_LAST, // 1000 - 1016 svx/xdef.hxx + XATTR_FILL_FIRST, XATTR_FILL_LAST, // 1000 - 1016 svx/xdef.hxx + SDRATTR_SHADOW_FIRST, SDRATTR_SHADOW_LAST, // 1067 - 1078 svx/svddef.hxx + SCHATTR_USER_DEFINED_ATTR, SCHATTR_USER_DEFINED_ATTR, // 100 sch/schattr.hxx + 0 +}; + +const USHORT nTextWhichPairs[] = +{ + EE_ITEMS_START, EE_ITEMS_END, // 3994 - 4037 svx/eeitem.hxx +// SCHATTR_TEXT_ORIENT, SCHATTR_TEXT_ORIENT, // 4 sch/schattr.hxx + SCHATTR_TEXT_STACKED, SCHATTR_TEXT_STACKED, // 4 sch/schattr.hxx + SCHATTR_TEXT_DEGREES,SCHATTR_TEXT_DEGREES, // 53 sch/schattr.hxx + SCHATTR_USER_DEFINED_ATTR, SCHATTR_USER_DEFINED_ATTR, // 100 sch/schattr.hxx + 0 +}; + +const USHORT nTextOrientWhichPairs[] = +{ + EE_ITEMS_START, EE_ITEMS_END, // 3994 - 4037 svx/eeitem.hxx +// SCHATTR_TEXT_ORIENT, SCHATTR_TEXT_ORIENT, // 4 sch/schattr.hxx + SCHATTR_TEXT_STACKED, SCHATTR_TEXT_STACKED, // 4 sch/schattr.hxx + SCHATTR_TEXT_DEGREES,SCHATTR_TEXT_DEGREES, // 53 sch/schattr.hxx + 0 +}; + +const USHORT nStatWhichPairs[]= +{ + SCHATTR_STAT_START, SCHATTR_STAT_END, // 45 - 52 sch/schattr.hxx + 0 +}; + +// for CharacterProperties + +const USHORT nCharacterPropertyWhichPairs[] = +{ + EE_ITEMS_START, EE_ITEMS_END, // 3994 - 4037 svx/eeitem.hxx + 0 +}; + +const USHORT nLinePropertyWhichPairs[] = +{ + XATTR_LINE_FIRST, XATTR_LINE_LAST, // 1000 - 1016 svx/xdef.hxx + 0 +}; + +const USHORT nFillPropertyWhichPairs[] = +{ + XATTR_FILL_FIRST, XATTR_FILL_LAST, // 1000 - 1016 svx/xdef.hxx + SDRATTR_SHADOW_FIRST, SDRATTR_SHADOW_LAST, // 1067 - 1078 svx/svddef.hxx + 0 +}; + +const USHORT nLineAndFillPropertyWhichPairs[] = +{ + XATTR_LINE_FIRST, XATTR_LINE_LAST, // 1000 - 1016 svx/xdef.hxx + XATTR_FILL_FIRST, XATTR_FILL_LAST, // 1000 - 1016 svx/xdef.hxx + SDRATTR_SHADOW_FIRST, SDRATTR_SHADOW_LAST, // 1067 - 1078 svx/svddef.hxx + 0 +}; + +const USHORT nChartStyleWhichPairs[] = +{ + SCHATTR_DIAGRAM_STYLE, SCHATTR_DIAGRAM_STYLE, + SCHATTR_STYLE_SHAPE, SCHATTR_STYLE_SHAPE, + SCHATTR_NUM_OF_LINES_FOR_BAR, SCHATTR_NUM_OF_LINES_FOR_BAR, + SCHATTR_SPLINE_ORDER, SCHATTR_SPLINE_ORDER, + SCHATTR_SPLINE_RESOLUTION, SCHATTR_SPLINE_RESOLUTION, + 0 +}; + + +} // anonymous namespace + +// CHART_SCHWHICHPAIRS_HXX +#endif diff --git a/chart2/source/controller/itemsetwrapper/TitleItemConverter.cxx b/chart2/source/controller/itemsetwrapper/TitleItemConverter.cxx new file mode 100644 index 000000000..b8818f2b8 --- /dev/null +++ b/chart2/source/controller/itemsetwrapper/TitleItemConverter.cxx @@ -0,0 +1,262 @@ +/************************************************************************* + * + * $RCSfile: TitleItemConverter.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:28 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "TitleItemConverter.hxx" +#include "SchWhichPairs.hxx" +#include "macros.hxx" +#include "ItemPropertyMap.hxx" +#include "GraphicPropertyItemConverter.hxx" +#include "CharacterPropertyItemConverter.hxx" +#include "MultipleItemConverter.hxx" + +#ifndef _SFXINTITEM_HXX +#include <svtools/intitem.hxx> +#endif +#ifndef INCLUDED_RTL_MATH_HXX +#include <rtl/math.hxx> +#endif + +#include <drafts/com/sun/star/chart2/XTitled.hpp> + +#include <functional> +#include <algorithm> + +using namespace ::com::sun::star; +using namespace ::drafts::com::sun::star; + +namespace +{ +::chart::wrapper::ItemPropertyMapType & lcl_GetTitlePropertyMap() +{ + static ::chart::wrapper::ItemPropertyMapType aTitlePropertyMap( + ::chart::wrapper::MakeItemPropertyMap + ( SCHATTR_TEXT_STACKED, C2U( "StackCharacters" )) + ); + + return aTitlePropertyMap; +}; +} // anonymous namespace + +namespace chart +{ +namespace wrapper +{ + +// ======================================== + +class FormattedStringsConverter : public MultipleItemConverter +{ +public: + FormattedStringsConverter( + const uno::Sequence< uno::Reference< chart2::XFormattedString > > & aStrings, + SfxItemPool & rItemPool ); + virtual ~FormattedStringsConverter(); + +protected: + virtual const USHORT * GetWhichPairs() const; +}; + +// ---------------------------------------- + +FormattedStringsConverter::FormattedStringsConverter( + const uno::Sequence< uno::Reference< chart2::XFormattedString > > & aStrings, + SfxItemPool & rItemPool ) + : MultipleItemConverter( rItemPool ) +{ + for( sal_Int32 i = 0; i < aStrings.getLength(); ++i ) + { + uno::Reference< beans::XPropertySet > xProp( aStrings[ i ], uno::UNO_QUERY ); + if( xProp.is()) + m_aConverters.push_back( new CharacterPropertyItemConverter( xProp, rItemPool )); + } +} + +FormattedStringsConverter::~FormattedStringsConverter() +{ +} + +const USHORT * FormattedStringsConverter::GetWhichPairs() const +{ + return nCharacterPropertyWhichPairs; +} + +// ======================================== + +TitleItemConverter::TitleItemConverter( + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertySet > & rPropertySet, + SfxItemPool& rItemPool, + SdrModel& rDrawModel ) : + ItemConverter( rPropertySet, rItemPool ) +{ + m_aConverters.push_back( new GraphicPropertyItemConverter( + rPropertySet, rItemPool, rDrawModel, + GraphicPropertyItemConverter::LINE_AND_FILL_PROPERTIES )); + + // CharacterProperties are not at the title but at its contained XFormattedString objects + // take the first formatted string in the sequence + uno::Reference< chart2::XTitle > xTitle( rPropertySet, uno::UNO_QUERY ); + if( xTitle.is()) + { + uno::Sequence< uno::Reference< chart2::XFormattedString > > aStringSeq( xTitle->getText()); + if( aStringSeq.getLength() > 0 ) + { + m_aConverters.push_back( new FormattedStringsConverter( aStringSeq, rItemPool )); + } + } +} + +TitleItemConverter::~TitleItemConverter() +{ + ::std::for_each( m_aConverters.begin(), m_aConverters.end(), + DeleteItemConverterPtr() ); +} + +void TitleItemConverter::FillItemSet( SfxItemSet & rOutItemSet ) const +{ + ::std::for_each( m_aConverters.begin(), m_aConverters.end(), + FillItemSetFunc( rOutItemSet )); + + // own items + ItemConverter::FillItemSet( rOutItemSet ); +} + +bool TitleItemConverter::ApplyItemSet( const SfxItemSet & rItemSet ) +{ + bool bResult = false; + + ::std::for_each( m_aConverters.begin(), m_aConverters.end(), + ApplyItemSetFunc( rItemSet, bResult )); + + // own items + return ItemConverter::ApplyItemSet( rItemSet ) || bResult; +} + +const USHORT * TitleItemConverter::GetWhichPairs() const +{ + // must span all used items! + return nTitleWhichPairs; +} + +bool TitleItemConverter::GetItemPropertyName( USHORT nWhichId, ::rtl::OUString & rOutName ) const +{ + ItemPropertyMapType & rMap( lcl_GetTitlePropertyMap()); + ItemPropertyMapType::const_iterator aIt( rMap.find( nWhichId )); + + if( aIt == rMap.end()) + return false; + + rOutName =(*aIt).second; + return true; +} + + +bool TitleItemConverter::ApplySpecialItem( + USHORT nWhichId, const SfxItemSet & rItemSet ) const +{ + bool bChanged = false; + + switch( nWhichId ) + { + case SCHATTR_TEXT_DEGREES: + { + // convert int to double (divided by 100) + double fVal = static_cast< double >( + reinterpret_cast< const SfxInt32Item & >( + rItemSet.Get( nWhichId )).GetValue()) / 100.0; + double fOldVal = 0.0; + bool bPropExisted = + ( GetPropertySet()->getPropertyValue( C2U( "TextRotation" )) >>= fOldVal ); + + if( ! bPropExisted || + ( bPropExisted && fOldVal != fVal )) + { + GetPropertySet()->setPropertyValue( C2U( "TextRotation" ), uno::makeAny( fVal )); + bChanged = true; + } + } + break; + } + + return bChanged; +} + +void TitleItemConverter::FillSpecialItem( + USHORT nWhichId, SfxItemSet & rOutItemSet ) const +{ + switch( nWhichId ) + { + case SCHATTR_TEXT_DEGREES: + { + // convert double to int (times 100) + double fVal; + + if( GetPropertySet()->getPropertyValue( C2U( "TextRotation" )) >>= fVal ) + { + rOutItemSet.Put( SfxInt32Item( nWhichId, static_cast< sal_Int32 >( + ::rtl::math::round( fVal * 100.0 ) ) )); + } + } + break; + } +} + +} // namespace wrapper +} // namespace chart diff --git a/chart2/source/controller/itemsetwrapper/makefile.mk b/chart2/source/controller/itemsetwrapper/makefile.mk new file mode 100644 index 000000000..d7b6e2cd1 --- /dev/null +++ b/chart2/source/controller/itemsetwrapper/makefile.mk @@ -0,0 +1,89 @@ +#************************************************************************* +# +# $RCSfile: makefile.mk,v $ +# +# $Revision: 1.1.1.1 $ +# +# last change: $Author: bm $ $Date: 2003-10-06 09:58:28 $ +# +# The Contents of this file are made available subject to the terms of +# either of the following licenses +# +# - GNU Lesser General Public License Version 2.1 +# - Sun Industry Standards Source License Version 1.1 +# +# Sun Microsystems Inc., October, 2000 +# +# GNU Lesser General Public License Version 2.1 +# ============================================= +# Copyright 2000 by Sun Microsystems, Inc. +# 901 San Antonio Road, Palo Alto, CA 94303, USA +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License version 2.1, as published by the Free Software Foundation. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# +# +# Sun Industry Standards Source License Version 1.1 +# ================================================= +# The contents of this file are subject to the Sun Industry Standards +# Source License Version 1.1 (the "License"); You may not use this file +# except in compliance with the License. You may obtain a copy of the +# License at http://www.openoffice.org/license.html. +# +# Software provided under this License is provided on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, +# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, +# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. +# See the License for the specific provisions governing your rights and +# obligations concerning the Software. +# +# The Initial Developer of the Original Code is: Sun Microsystems, Inc. +# +# Copyright: 2000 by Sun Microsystems, Inc. +# +# All Rights Reserved. +# +# Contributor(s): _______________________________________ +# +# +# +#************************************************************************* +PRJ= ..$/..$/.. +PRJINC= $(PRJ)$/source +PRJNAME= chart2 +TARGET= chcitemsetwrapper + +ENABLE_EXCEPTIONS= TRUE + +# --- Settings ----------------------------------------------------- + +.INCLUDE: settings.mk + +# --- export library ------------------------------------------------- + +#object files to build and link together to lib $(SLB)$/$(TARGET).lib +SLOFILES= $(SLO)$/SchItemPool.obj \ + $(SLO)$/ItemConverter.obj \ + $(SLO)$/AxisItemConverter.obj \ + $(SLO)$/MultipleItemConverter.obj \ + $(SLO)$/CharacterPropertyItemConverter.obj \ + $(SLO)$/ChartTypeItemConverter.obj \ + $(SLO)$/DataPointItemConverter.obj \ + $(SLO)$/GraphicPropertyItemConverter.obj \ + $(SLO)$/TitleItemConverter.obj + +# --- Targets ----------------------------------------------------------------- + +.INCLUDE: target.mk + diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx new file mode 100644 index 000000000..72e58b40b --- /dev/null +++ b/chart2/source/controller/main/ChartController.cxx @@ -0,0 +1,1124 @@ +/************************************************************************* + * + * $RCSfile: ChartController.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:28 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "ChartController.hxx" +#include "servicenames.hxx" + +#include "InlineContainer.hxx" +#include "Chart.hrc" +#include "ResId.hxx" +#include "SchSlotIds.hxx" + +#include "chartview/ChartView.hxx" +#include "ChartWindow.hxx" +#include "DrawModelWrapper.hxx" +#include "DrawViewWrapper.hxx" + +#include "macros.hxx" + +#include "chartview/NumberFormatterWrapper.hxx" + +#include "dlg_ChartType.hxx" +#include "ChartTypeItemConverter.hxx" + +//for SID_CHARMAP: +#ifndef _SVX_SVXIDS_HRC +#include <svx/svxids.hrc> +#endif + +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XCHARTDOCUMENT_HPP_ +#include <drafts/com/sun/star/chart2/XChartDocument.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XSTACKABLESCALEGROUP_HPP_ +#include <drafts/com/sun/star/chart2/XStackableScaleGroup.hpp> +#endif + +//------- +// header for define RET_OK +#ifndef _SV_MSGBOX_HXX +#include <vcl/msgbox.hxx> +#endif +//------- + +//------- +#ifndef _TOOLKIT_AWT_VCLXWINDOW_HXX_ +#include <toolkit/awt/vclxwindow.hxx> +#endif +#ifndef _TOOLKIT_HELPER_VCLUNOHELPER_HXX_ +#include <toolkit/helper/vclunohelper.hxx> +#endif +#ifndef _VOS_MUTEX_HXX_ +#include <vos/mutex.hxx> +#endif +//------- +#ifndef _COMPHELPER_PROCESSFACTORY_HXX_ +#include <comphelper/processfactory.hxx> +#endif +#ifndef _COM_SUN_STAR_UTIL_XURLTRANSFORMER_HPP_ +#include <com/sun/star/util/XURLTransformer.hpp> +#endif + +//............................................................................. +namespace chart +{ +//............................................................................. + +using namespace ::com::sun::star; +using namespace ::drafts::com::sun::star::chart2; + +//----------------------------------------------------------------- +// ChartController Constructor and Destructor +//----------------------------------------------------------------- + +ChartController::ChartController(uno::Reference<uno::XComponentContext> const & xContext) + : m_aLifeTimeManager( NULL ) + , m_xFrame( NULL ) + , m_aModelMutex() + , m_aModel( NULL, m_aModelMutex ) + , m_bSuspended( sal_False ) + , m_bCanClose( sal_True ) + , m_pChartWindow( NULL ) + , m_xViewWindow( NULL ) + , m_pChartView( NULL ) + , m_pDrawModelWrapper( NULL ) + , m_pDrawViewWrapper(NULL) + , m_xCC(xContext) //@todo is it allowed to hold this context?? + , m_bViewDirty( false ) + , m_pNumberFormatterWrapper(NULL) +{ + + //@todo + m_pNumberFormatterWrapper = new NumberFormatterWrapper(); +} + +ChartController::~ChartController() +{ + impl_deleteView(); + //m_pChartWindow is deleted via UNO by Window hierarchy or Framework + if(m_pNumberFormatterWrapper) + delete m_pNumberFormatterWrapper; + + //@todo ? +} + +//----------------------------------------------------------------- + +ChartController::RefCountable::RefCountable() : m_nRefCount(0) +{ +} + +ChartController::RefCountable::~RefCountable() +{ +} +void ChartController::RefCountable::acquire() +{ + m_nRefCount++; +} +void ChartController::RefCountable::release() +{ + m_nRefCount--; + if(!m_nRefCount) + delete this; +} + +//----------------------------------------------------------------- + +ChartController::TheModel::TheModel( const uno::Reference< frame::XModel > & xModel ) + : m_xModel( xModel ) + , m_xCloseable( NULL ) + , m_bOwnership( sal_True ) + , m_bOwnershipIsWellKnown( sal_False ) +{ + m_xCloseable = + uno::Reference< util::XCloseable >( xModel, uno::UNO_QUERY ); +} + +ChartController::TheModel::~TheModel() +{ +} + +void ChartController::TheModel::SetOwnerShip( sal_Bool bGetsOwnership ) +{ + m_bOwnership = bGetsOwnership; + m_bOwnershipIsWellKnown = sal_True; +} + +void ChartController::TheModel::addListener( ChartController* pController ) +{ + if(m_xCloseable.is()) + { + //if you need to be able to veto against the destruction of the model + // you must add as a close listener + + //otherwise you 'can' add as closelistener or 'must' add as dispose event listener + + m_xCloseable->addCloseListener( + static_cast<util::XCloseListener*>(pController) ); + } + else if( m_xModel.is() ) + { + //we need to add as dispose event listener + m_xModel->addEventListener( + static_cast<lang::XEventListener*>(pController) ); + } + +} + +void ChartController::TheModel::removeListener( ChartController* pController ) +{ + if(m_xCloseable.is()) + m_xCloseable->removeCloseListener( + static_cast<util::XCloseListener*>(pController) ); + + else if( m_xModel.is() ) + m_xModel->removeEventListener( + static_cast<lang::XEventListener*>(pController) ); +} + +void ChartController::TheModel::tryTermination() +{ + if(!m_bOwnership) + return; + + try + { + if(m_xCloseable.is()) + { + try + { + //@todo ? are we allowed to use sal_True here if we have the explicit ownership? + //I think yes, because there might be other closelistners later in the list which might be interested still + //but make sure that we do not throw the CloseVetoException here ourselfs + //so stop listening before trying to terminate or check the source of queryclosing event + m_xCloseable->close(sal_True); + + m_bOwnership = false; + m_bOwnershipIsWellKnown = sal_True; + } + catch( util::CloseVetoException& ) + { + //since we have indicated to give up the ownership with paramter true in close call + //the one who has thrown the CloseVetoException is the new owner + + OSL_ENSURE( !m_bOwnership, + "INFO: a well known owner has catched a CloseVetoException after calling close(true)" ); + + m_bOwnership = false; + m_bOwnershipIsWellKnown = sal_True; + return; + } + + } + else if( m_xModel.is() ) + { + //@todo correct?? + m_xModel->dispose(); + return; + } + } + catch( uno::Exception& ex) + { + OSL_ENSURE( sal_False, ( rtl::OString("Termination of model failed: ") + + rtl::OUStringToOString( ex.Message, RTL_TEXTENCODING_ASCII_US ) ).getStr() ); + } +} + +//----------------------------------------------------------------- + +ChartController::TheModelRef::TheModelRef( TheModel* pTheModel, ::osl::Mutex& rMutex ) + : m_pTheModel(pTheModel), m_rModelMutex(rMutex) +{ + ::osl::Guard< ::osl::Mutex > aGuard( m_rModelMutex ); + if(m_pTheModel) + m_pTheModel->acquire(); +} +ChartController::TheModelRef::TheModelRef( const TheModelRef& rTheModel, ::osl::Mutex& rMutex ) + : m_rModelMutex(rMutex) +{ + ::osl::Guard< ::osl::Mutex > aGuard( m_rModelMutex ); + m_pTheModel=rTheModel.operator->(); + if(m_pTheModel) + m_pTheModel->acquire(); +} +ChartController::TheModelRef& ChartController::TheModelRef::operator=(TheModel* pTheModel) +{ + ::osl::Guard< ::osl::Mutex > aGuard( m_rModelMutex ); + if(m_pTheModel==pTheModel) + return *this; + if(m_pTheModel) + m_pTheModel->release(); + m_pTheModel=pTheModel; + if(m_pTheModel) + m_pTheModel->acquire(); + return *this; +} +ChartController::TheModelRef& ChartController::TheModelRef::operator=(const TheModelRef& rTheModel) +{ + ::osl::Guard< ::osl::Mutex > aGuard( m_rModelMutex ); + TheModel* pNew=rTheModel.operator->(); + if(m_pTheModel==pNew) + return *this; + if(m_pTheModel) + m_pTheModel->release(); + m_pTheModel=pNew; + if(m_pTheModel) + m_pTheModel->acquire(); + return *this; +} +ChartController::TheModelRef::~TheModelRef() +{ + ::osl::Guard< ::osl::Mutex > aGuard( m_rModelMutex ); + if(m_pTheModel) + m_pTheModel->release(); +} +sal_Bool ChartController::TheModelRef::is() const +{ + return (m_pTheModel != 0); +} + + +//----------------------------------------------------------------- +// private methods +//----------------------------------------------------------------- + + sal_Bool ChartController +::impl_isDisposedOrSuspended() +{ + if( m_aLifeTimeManager.impl_isDisposed() ) + return sal_True; + + if( m_bSuspended ) + { + OSL_ENSURE( sal_False, "This Controller is suspended" ); + return sal_True; + } + return sal_False; +} + +//----------------------------------------------------------------- +// lang::XServiceInfo +//----------------------------------------------------------------- + +APPHELPER_XSERVICEINFO_IMPL(ChartController,CHART_CONTROLLER_SERVICE_IMPLEMENTATION_NAME) + + uno::Sequence< rtl::OUString > ChartController +::getSupportedServiceNames_Static() +{ + uno::Sequence< rtl::OUString > aSNS( 2 ); + aSNS.getArray()[ 0 ] = CHART_CONTROLLER_SERVICE_NAME; + aSNS.getArray()[ 1 ] = ::rtl::OUString::createFromAscii("com.sun.star.frame.Controller"); + //// @todo : add additional services if you support any further + return aSNS; +} + +//----------------------------------------------------------------- +// XController +//----------------------------------------------------------------- + + void SAL_CALL ChartController +::attachFrame( const uno::Reference<frame::XFrame>& xFrame ) + throw(uno::RuntimeException) +{ + osl::Guard< osl::Mutex > aGuard( m_aControllerMutex ); + + if( impl_isDisposedOrSuspended() ) //@todo? allow attaching the frame while suspended? + return; //behave passive if already disposed or suspended + + if(m_xFrame.is()) //what happens, if we do have a Frame already?? + { + //@todo? throw exception? + OSL_ENSURE( sal_False, "there is already a frame attached to the controller" ); + return; + } + + //--attach frame + m_xFrame = xFrame; //the frameloader is responsible to call xFrame->setComponent + + //add as disposelistener to the frame (due to persistent reference) ??...: + + //the frame is considered to be owner of this controller and will live longer than we do + //the frame or the disposer of the frame has the duty to call suspend and dispose on this object + //so we do not need to add as lang::XEventListener for DisposingEvents right? + + //@todo nothing right??? + + + + //-------------------------------------------------- + //create view @todo is this the correct place here?? + + Window* pParent = NULL; + //get the window parent from the frame to use as parent for our new window + if(xFrame.is()) + { + uno::Reference< awt::XWindow > xContainerWindow = xFrame->getContainerWindow(); + VCLXWindow* pParentComponent = VCLXWindow::GetImplementation(xContainerWindow); + pParentComponent->setVisible(sal_True); + + pParent = VCLUnoHelper::GetWindow( xContainerWindow ); + } + + if(m_pChartWindow) + { + //@todo delete ... + } + { + // calls to VCL + ::vos::OGuard aSolarGuard( Application::GetSolarMutex()); + m_pChartWindow = new ChartWindow(this,pParent,pParent?pParent->GetStyle():0); + m_xViewWindow = uno::Reference< awt::XWindow >( m_pChartWindow->GetComponentInterface(), uno::UNO_QUERY ); + m_pChartWindow->Show(); + } + + impl_tryInitializeView(); + + {//create the menu + util::URL aURL( SchResId(RID_MENU).getURL() ); + + uno::Reference< lang::XMultiServiceFactory > xMgr = comphelper::getProcessServiceFactory(); + uno::Reference< util::XURLTransformer > xTrans( + xMgr->createInstance( ::rtl::OUString::createFromAscii( + "com.sun.star.util.URLTransformer") ), uno::UNO_QUERY ); + if( xTrans.is() ) + { + // Datei laden + xTrans->parseStrict( aURL ); + + uno::Reference< frame::XDispatchProvider > xProv( xFrame, uno::UNO_QUERY ); + if ( xProv.is() ) + { + uno::Reference< frame::XDispatch > aDisp = + xProv->queryDispatch( aURL, + ::rtl::OUString::createFromAscii("_menubar"), 12 ); + if ( aDisp.is() ) + aDisp->dispatch( aURL, uno::Sequence<beans::PropertyValue>() ); + } + } + } +} + +void SAL_CALL ChartController +::impl_rebuildView() + throw(uno::RuntimeException) +{ + m_bViewDirty = false; + impl_deleteView(); + impl_tryInitializeView(); + if( m_aSelectedObjectCID.getLength() ) + { + //@todo reselect object + m_aSelectedObjectCID = C2U(""); + } +} + +void SAL_CALL ChartController +::impl_deleteView() + throw(uno::RuntimeException) +{ + delete m_pChartView; m_pChartView = NULL; + delete m_pDrawViewWrapper; m_pDrawViewWrapper = NULL; + delete m_pDrawModelWrapper; m_pDrawModelWrapper = NULL; +} + + sal_Bool SAL_CALL ChartController +::impl_tryInitializeView() + throw(uno::RuntimeException) +{ + osl::ClearableGuard< osl::Mutex > aGuard( m_aControllerMutex ); + if(!m_pChartWindow || !m_aModel.is() ) + return sal_False; + + m_pDrawModelWrapper = new DrawModelWrapper(m_xCC + ,wrapper::ItemConverter::CreateSchItemPool()); + + uno::Reference< frame::XModel > xDrawModel = m_pDrawModelWrapper->getUnoModel(); + if( xDrawModel.is()) + xDrawModel->lockControllers(); + + m_pChartView = ChartView::createView( m_xCC, m_aModel->getModel() + , uno::Reference<drawing::XDrawPagesSupplier>::query( xDrawModel ) + , m_pNumberFormatterWrapper ); + //OutputDevice* pOutDev = m_pDrawViewWrapper->GetWin(0); + Size aPageSize = m_pChartWindow->GetOutputSize(); + m_pChartView->create( awt::Size( aPageSize.Width(), aPageSize.Height() ) ); +// m_pChartWindow->SetChartView(m_pChartView);//enable event flow from window to View (Window knows View) + + //create draw view: + m_pDrawViewWrapper = new DrawViewWrapper(&m_pDrawModelWrapper->getSdrModel(),m_pChartWindow); + //test: + //Rectangle aTest = m_pDrawViewWrapper->GetWorkArea(); + //m_pDrawViewWrapper->SetWorkArea(pOutDev->PixelToLogic(Rectangle(rOfs, rSize))); + + if( xDrawModel.is()) + { + xDrawModel->unlockControllers(); + m_pChartWindow->Invalidate(); + } + return sal_True; +} + + sal_Bool SAL_CALL ChartController +::attachModel( const uno::Reference< frame::XModel > & xModel ) + throw(uno::RuntimeException) +{ + //is called to attach the controller to a new model. + //return true if attach was successfully, false otherwise (e.g. if you do not work with a model) + + osl::ClearableGuard< osl::Mutex > aGuard( m_aControllerMutex ); + if( impl_isDisposedOrSuspended() ) //@todo? allow attaching a new model while suspended? + return sal_False; //behave passive if already disposed or suspended + aGuard.clear(); + + + TheModelRef aNewModelRef( new TheModel( xModel), m_aModelMutex); + TheModelRef aOldModelRef(m_aModel,m_aModelMutex); + m_aModel = aNewModelRef; + + //--handle relations to the old model if any + if( aOldModelRef.is() ) + { + aOldModelRef->removeListener( this ); + //@todo?? termination correct? + aOldModelRef->tryTermination(); + } + + //--handle relations to the new model + aNewModelRef->addListener( this ); + + //the frameloader is responsible to call xModel->connectController + + { + // Indirect calls to VCL + ::vos::OGuard aSolarGuard( Application::GetSolarMutex()); + impl_tryInitializeView(); + } + + return sal_True; +} + + uno::Reference< frame::XFrame > SAL_CALL ChartController +::getFrame() throw(uno::RuntimeException) +{ + //provides access to owner frame of this controller + //return the frame containing this controller + + return m_xFrame; +} + + uno::Reference< frame::XModel > SAL_CALL ChartController +::getModel() throw(uno::RuntimeException) +{ + //provides access to currently attached model + //returns the currently attached model + + //return nothing, if you do not have a model + TheModelRef aModelRef( m_aModel, m_aModelMutex); + if(aModelRef.is()) + return aModelRef->getModel(); + + return uno::Reference< frame::XModel > (); +} + + uno::Any SAL_CALL ChartController +::getViewData() throw(uno::RuntimeException) +{ + //provides access to current view status + //set of data that can be used to restore the current view status at later time + // by using XController::restoreViewData() + + osl::ResettableGuard< osl::Mutex > aGuard( m_aControllerMutex ); + if( impl_isDisposedOrSuspended() ) + return uno::Any(); //behave passive if already disposed or suspended //@todo? or throw an exception?? + + //-- collect current view state + uno::Any aRet; + //// @todo integrate specialized implementation + + return aRet; +} + + void SAL_CALL ChartController +::restoreViewData( const uno::Any& Value ) + throw(uno::RuntimeException) +{ + //restores the view status using the data gotten from a previous call to XController::getViewData() + + osl::ResettableGuard< osl::Mutex > aGuard( m_aControllerMutex ); + if( impl_isDisposedOrSuspended() ) + return; //behave passive if already disposed or suspended //@todo? or throw an exception?? + + //// @todo integrate specialized implementation +} + + sal_Bool SAL_CALL ChartController +::suspend( sal_Bool bSuspend ) + throw(uno::RuntimeException) +{ + //is called to prepare the controller for closing the view + //bSuspend==true: force the controller to suspend his work + //bSuspend==false try to reactivate the controller + //returns true if request was accepted and of course successfully finished, false otherwise + + //we may show dialogs here to ask the user for saving changes ... @todo? + + osl::ResettableGuard< osl::Mutex > aGuard( m_aControllerMutex ); + if( m_aLifeTimeManager.impl_isDisposed() ) + return sal_False; //behave passive if already disposed, return false because request was not accepted //@todo? correct + + if(bSuspend==m_bSuspended) + { + OSL_ENSURE( sal_False, "new suspend mode equals old suspend mode" ); + //@todo ??? or return true in this case? + return sal_False; + } + + //change suspend mode + if(bSuspend) + { + //aGuard.clear(); + //@todo ??? try to stop all what may prevent me from becoming disposed + //aGuard.reset(); + + m_bSuspended = bSuspend; + return sal_True; + } + else + { + //aGuard.clear(); + //@todo ??? redo what was made in section bSuspend==true + //aGuard.reset(); + + m_bSuspended = bSuspend; + return sal_True; + } + + + /* + if ( bSuspend ) + getFrame()->removeFrameActionListener( pImp ); + else + getFrame()->addFrameActionListener( pImp ); + */ + return sal_True; +} + +//----------------------------------------------------------------- +// XComponent (base of XController) +//----------------------------------------------------------------- + + void SAL_CALL ChartController +::dispose() throw(uno::RuntimeException) +{ + //This object should release all resources and references in the + //easiest possible manner + //This object must notify all registered listeners using the method + //<member>XEventListener::disposing</member> + + //hold no mutex + if( !m_aLifeTimeManager.dispose() ) + return; + + OSL_ENSURE( m_bSuspended, "dispose was called but controller is not suspended" ); + + //--release all resources and references + + impl_deleteView(); + m_pChartWindow = NULL;//m_pChartWindow is deleted via UNO by Window hierarchy or Framework + + m_xFrame = NULL; + TheModelRef aModelRef( m_aModel, m_aModelMutex); + m_aModel = NULL; + + if(aModelRef.is()) + { + aModelRef->removeListener( this ); + aModelRef->tryTermination(); + } + + //// @todo integrate specialized implementation + //e.g. release further resources and references + } + + void SAL_CALL ChartController +::addEventListener( const uno::Reference<lang::XEventListener>& xListener ) + throw(uno::RuntimeException) +{ + osl::Guard< osl::Mutex > aGuard( m_aControllerMutex ); + if( impl_isDisposedOrSuspended() )//@todo? allow adding of listeners in suspend mode? + return; //behave passive if already disposed or suspended + + //--add listener + m_aLifeTimeManager.m_aListenerContainer.addInterface( ::getCppuType((const uno::Reference< lang::XEventListener >*)0), xListener ); +} + + void SAL_CALL ChartController +::removeEventListener( const uno::Reference< + lang::XEventListener>& xListener ) + throw(uno::RuntimeException) +{ + osl::Guard< osl::Mutex > aGuard( m_aControllerMutex ); + if( impl_isDisposedOrSuspended() ) //@todo? allow removing of listeners in suspend mode? + return; //behave passive if already disposed or suspended + + //--remove listener + m_aLifeTimeManager.m_aListenerContainer.removeInterface( ::getCppuType((const uno::Reference< lang::XEventListener >*)0), xListener ); +} + + +//----------------------------------------------------------------- +// util::XCloseListener +//----------------------------------------------------------------- + void SAL_CALL ChartController +::queryClosing( const lang::EventObject& rSource, sal_Bool bGetsOwnership ) + throw(util::CloseVetoException, uno::RuntimeException) +{ + //do not use the m_aControllerMutex here because this call is not allowed to block + + TheModelRef aModelRef( m_aModel, m_aModelMutex); + + if( !aModelRef.is() ) + return; + + if( !(aModelRef->getModel() == rSource.Source) ) + { + OSL_ENSURE( sal_False, "queryClosing was called on a controller from an unknown source" ); + return; + } + + if( !m_bCanClose )//@todo tryaqcuire mutex + { + if( bGetsOwnership ) + { + aModelRef->SetOwnerShip( bGetsOwnership ); + } + + throw util::CloseVetoException(); + } + else + { + //@ todo prepare to to closing model -> don't start any further hindering actions + } +} + + void SAL_CALL ChartController +::notifyClosing( const lang::EventObject& rSource ) + throw(uno::RuntimeException) +{ + //Listener should deregister himself and relaese all references to the closing object. + + TheModelRef aModelRef( 0, m_aModelMutex); + bool bReleaseModel = sal_False; + { + ::osl::Guard< ::osl::Mutex > aGuard( m_aModelMutex ); + aModelRef = m_aModel; + if( aModelRef.is() && aModelRef->getModel() == rSource.Source ) + { + m_aModel = NULL; + bReleaseModel = sal_True; + } + } + //@todo ?? why remove the listener??? this could be handled by the closing object + if( bReleaseModel ) + { + //--stop listening to the closing model + aModelRef->removeListener( this ); + } +} + +//----------------------------------------------------------------- +// util::XEventListener (base of XCloseListener) +//----------------------------------------------------------------- + void SAL_CALL ChartController +::disposing( const lang::EventObject& rSource ) + throw(uno::RuntimeException) +{ + notifyClosing(rSource); +} + +//----------------------------------------------------------------- +// XDispatchProvider (required interface) +//----------------------------------------------------------------- + +bool isFormatObjectSID( sal_Int32 nSlotID ) +{ + if((sal_Int32)SID_DIAGRAM_TITLE_MAIN == nSlotID + || (sal_Int32)SID_DIAGRAM_TITLE_SUB == nSlotID + || (sal_Int32)SID_DIAGRAM_TITLE_X == nSlotID + || (sal_Int32)SID_DIAGRAM_TITLE_Y == nSlotID + || (sal_Int32)SID_DIAGRAM_TITLE_Z == nSlotID + || (sal_Int32)SID_DIAGRAM_TITLE_ALL == nSlotID + || (sal_Int32)SID_LEGEND == nSlotID + || (sal_Int32)SID_DIAGRAM_AXIS_X == nSlotID + || (sal_Int32)SID_DIAGRAM_AXIS_Y == nSlotID + || (sal_Int32)SID_DIAGRAM_AXIS_Z == nSlotID + || (sal_Int32)SID_DIAGRAM_AXIS_A == nSlotID //secondary x axis + || (sal_Int32)SID_DIAGRAM_AXIS_B == nSlotID + || (sal_Int32)SID_DIAGRAM_AXIS_ALL == nSlotID + || (sal_Int32)SID_DIAGRAM_GRID_X_MAIN == nSlotID + || (sal_Int32)SID_DIAGRAM_GRID_Y_MAIN == nSlotID + || (sal_Int32)SID_DIAGRAM_GRID_Z_MAIN == nSlotID + || (sal_Int32)SID_DIAGRAM_GRID_X_HELP == nSlotID + || (sal_Int32)SID_DIAGRAM_GRID_Y_HELP == nSlotID + || (sal_Int32)SID_DIAGRAM_GRID_Z_HELP == nSlotID + || (sal_Int32)SID_DIAGRAM_GRID_ALL == nSlotID + || (sal_Int32)SID_DIAGRAM_WALL == nSlotID + || (sal_Int32)SID_DIAGRAM_FLOOR == nSlotID + || (sal_Int32)SID_DIAGRAM_AREA == nSlotID + ) + return true; + return false; +} + + uno::Reference<frame::XDispatch> SAL_CALL ChartController +::queryDispatch( const util::URL& rURL + , const rtl::OUString& rTargetFrameName + , sal_Int32 nSearchFlags) + throw(uno::RuntimeException) +{ + //// @todo integrate specialized implementation + //decide which commands you can handle + + if ( !m_aLifeTimeManager.impl_isDisposed() ) + { + //@todo avoid OString (see Mathias mail on bug #104387#) + rtl::OString aCommand( rtl::OUStringToOString( rURL.Path, RTL_TEXTENCODING_ASCII_US ) ); + if( aCommand.equals("Save") + || aCommand.equals("SaveAs") + || aCommand.equals("SaveAll") + + || aCommand.equals("Undo") + || aCommand.equals("Cut") + || aCommand.equals("Copy") + || aCommand.equals("Paste") + || aCommand.equals("SelectAll") + || aCommand.equals("Close") + || aCommand.equals("TESTTEST") + || aCommand.equals("slot:23") + //|| aCommand.copy(0,4).EqualsAscii("Bib/") + //|| aURL.Complete.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("slot:5503")) + ) + { + //@todo create a seperate dispatcher object or implement XDispatch interface by yourself + //to return it here + return static_cast< frame::XDispatch* >( this ); + } + else if(rURL.Protocol.equalsIgnoreAsciiCase( C2U("slot:") ) ) + { + sal_Int32 nSlotID = rURL.Path.toInt32(); + if( (sal_Int32)SID_DIAGRAM_OBJECTS == nSlotID + || (sal_Int32)SID_DIAGRAM_TYPE == nSlotID + || (sal_Int32)SID_INSERT_TITLE == nSlotID + || (sal_Int32)SID_INSERT_CHART_LEGEND == nSlotID + || (sal_Int32)SID_INSERT_DESCRIPTION == nSlotID + || (sal_Int32)SID_INSERT_AXIS == nSlotID + || (sal_Int32)SID_INSERT_GRIDS == nSlotID + || (sal_Int32)SID_INSERT_STATISTICS == nSlotID + || (sal_Int32)SID_CHARMAP == nSlotID + || isFormatObjectSID(nSlotID) + ) + { + return static_cast< frame::XDispatch* >( this ); + } + } + } + return uno::Reference< frame::XDispatch > (); +} +/* +typedef ::std::map< sal_Int32, ::rtl::OUString > tSlotIdCommandMap; +typedef ::comphelper::MakeMap< sal_Int32, ::rtl::OUString > tMakeSlotIdCommandMap; +tMakeSlotIdCommandMap m_aSlotIdCommandMap = + tMakeSlotIdCommandMap + ( (sal_Int32)SID_DIAGRAM_TITLE_MAIN, C2U( "slot:" )+=rtl::OUString::valueOf( (sal_Int32)SID_DIAGRAM_TITLE_MAIN ) ) + ; +*/ + uno::Sequence<uno::Reference<frame::XDispatch > > ChartController +::queryDispatches( const uno::Sequence< + frame::DispatchDescriptor>& xDescripts) + throw(uno::RuntimeException) +{ + sal_Int32 nCount = xDescripts.getLength(); + + if( !nCount ) + return uno::Sequence<uno::Reference<frame::XDispatch > > (); + + uno::Sequence<uno::Reference<frame::XDispatch > > aRet( nCount ); + for( sal_Int32 nPos = 0; nPos<nCount; ++nPos ) + { + aRet[ nPos ] = queryDispatch( + xDescripts[nPos].FeatureURL + , xDescripts[nPos].FrameName + , xDescripts[nPos].SearchFlags ); + } + return aRet; +} + +//----------------------------------------------------------------- +// frame::XDispatch +//----------------------------------------------------------------- + + void SAL_CALL ChartController +::dispatch( const util::URL& rURL + , const uno::Sequence< beans::PropertyValue >& rArgs ) + throw (uno::RuntimeException) +{ + //@todo avoid OString (see Mathias mail on bug #104387#) + rtl::OString aCommand( rtl::OUStringToOString( rURL.Path, RTL_TEXTENCODING_ASCII_US ) ); + //test only + if(aCommand.equals("TESTTEST") + || aCommand.equals("Undo") ) + { + Window* pWindow = m_pChartWindow; + Rectangle aRect( Point(0,0), pWindow->GetOutputSize() ); + Region aRegion( aRect ); + m_pDrawViewWrapper->InitRedraw(pWindow, aRegion ); + + /* + INVALIDATE_CHILDREN + INVALIDATE_NOCHILDREN + INVALIDATE_NOERASE + INVALIDATE_UPDATE + INVALIDATE_TRANSPARENT + INVALIDATE_NOTRANSPARENT + INVALIDATE_NOCLIPCHILDREN + */ + //Invalidate(INVALIDATE_UPDATE); + } + + else if(aCommand.equals("Save")) + { + //only test: + impl_rebuildView(); + } + else if(aCommand.equals("SaveAs")) + { + //only test: + this->executeDispatch_ObjectToDefault(); + } + //---------------------------------- + else if(rURL.Protocol.equalsIgnoreAsciiCase( C2U("slot:") ) ) + { + sal_Int32 nSlotID = rURL.Path.toInt32(); + if((sal_Int32)SID_DIAGRAM_OBJECTS == nSlotID) + { + this->executeDispatch_ObjectProperties(); + } + else if((sal_Int32)SID_DIAGRAM_TYPE == nSlotID) + { + this->executeDispatch_ChartType(); + } + else if((sal_Int32)SID_INSERT_TITLE == nSlotID) + { + this->executeDispatch_InsertTitle(); + } + else if((sal_Int32)SID_INSERT_CHART_LEGEND == nSlotID) + { + this->executeDispatch_InsertLegend(); + } + else if((sal_Int32)SID_INSERT_DESCRIPTION == nSlotID) + { + this->executeDispatch_InsertDataLabel(); + } + else if((sal_Int32)SID_INSERT_AXIS == nSlotID) + { + this->executeDispatch_InsertAxis(); + } + else if((sal_Int32)SID_INSERT_GRIDS == nSlotID) + { + this->executeDispatch_InsertGrid(); + } + else if((sal_Int32)SID_INSERT_STATISTICS == nSlotID) + { + this->executeDispatch_InsertStatistic(); + } + else if((sal_Int32)SID_CHARMAP == nSlotID) + { + this->executeDispatch_InsertSpecialCharacter(); + } + else if( isFormatObjectSID(nSlotID) ) + { + this->executeDispatch_FormatObject(nSlotID); + } + } + else if(aCommand.equals("SaveAll")) + { + if( m_aModel.is()) + { + uno::Reference< ::drafts::com::sun::star::chart2::XChartDocument > xDoc( + m_aModel->getModel(), uno::UNO_QUERY ); + OSL_ASSERT( xDoc.is()); + + uno::Reference< ::drafts::com::sun::star::chart2::XDataProvider > xDataProvider( + m_xCC->getServiceManager()->createInstanceWithContext( + C2U( "com.sun.star.comp.chart.FileDataProvider" ), + m_xCC ), uno::UNO_QUERY ); + OSL_ASSERT( xDataProvider.is()); + + ::rtl::OUString aFileName( +#if defined WNT + RTL_CONSTASCII_USTRINGPARAM( "file:///D:/files/data.chd" ) +#else + RTL_CONSTASCII_USTRINGPARAM( "file:///work/data/data.chd" ) +#endif + ); + + xDoc->attachDataProvider( xDataProvider ); + xDoc->setRangeRepresentation( aFileName ); + impl_rebuildView(); + } + } +} + + void SAL_CALL ChartController +::addStatusListener( const uno::Reference<frame::XStatusListener >& xControl + , const util::URL& aURL ) + throw (uno::RuntimeException) +{ +} + + void SAL_CALL ChartController +::removeStatusListener( const uno::Reference<frame::XStatusListener >& xControl + , const util::URL& aURL ) + throw (uno::RuntimeException) +{ +} + +//----------------------------------------------------------------- +// XContextMenuInterception (optional interface) +//----------------------------------------------------------------- + void SAL_CALL ChartController +::registerContextMenuInterceptor( const uno::Reference< + ui::XContextMenuInterceptor > & xInterceptor) + throw(uno::RuntimeException) +{ + //@todo +} + + void SAL_CALL ChartController +::releaseContextMenuInterceptor( const uno::Reference< + ui::XContextMenuInterceptor > & xInterceptor) + throw(uno::RuntimeException) +{ + //@todo +} + +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- + +void SAL_CALL ChartController::executeDispatch_ChartType() +{ + bool bChanged = false; + + //------------------------------------------------------------- + //convert properties to ItemSet + uno::Reference< beans::XPropertySet > xProp; + uno::Reference< XChartDocument > xChartDoc( m_aModel->getModel(), uno::UNO_QUERY ); + if( xChartDoc.is()) + xProp.set( xChartDoc->getChartTypeManager(), uno::UNO_QUERY ); + DBG_ASSERT( xProp.is(), "Invalid ChartTypeManager" ); + + { + wrapper::ChartTypeItemConverter aItemConverter( xProp, m_pDrawModelWrapper->GetItemPool() ); + SfxItemSet aItemSet = aItemConverter.CreateEmptyItemSet();//creates only an empty itemset + aItemConverter.FillItemSet( aItemSet ); + //------------------------------------------------------------- + //prepare and open dialog + Window* pParent( NULL ); + SchDiagramTypeDlg aDlg( pParent, aItemSet ); + if( aDlg.Execute() == RET_OK ) + { + SfxItemSet aOutItemSet = aItemConverter.CreateEmptyItemSet(); + aDlg.GetAttr( aOutItemSet ); + + bChanged = aItemConverter.ApplyItemSet( aOutItemSet );//model should be changed now + } + } + + try + { + //make sure that all objects using m_pDrawModelWrapper or m_pChartView are already deleted + if(bChanged && + xChartDoc.is()) + { + uno::Reference< lang::XMultiServiceFactory > xFact( xProp, uno::UNO_QUERY ); + if( xFact.is() ) + { + ::rtl::OUString aServiceName; + if( xProp->getPropertyValue( C2U( "ChartStyleTemplateServiceName" )) >>= aServiceName ) + { + uno::Reference< XChartTypeTemplate > xTemplate( + xFact->createInstance( aServiceName ), uno::UNO_QUERY ); + xChartDoc->setChartTypeTemplate( xTemplate ); + if( xTemplate.is()) + xTemplate->changeDiagram( xChartDoc->getDiagram() ); + impl_rebuildView(); + } + } + } + } + catch( uno::RuntimeException& e) + { + e; + } +} + +//............................................................................. +} //namespace chart +//............................................................................. diff --git a/chart2/source/controller/main/ChartController.hxx b/chart2/source/controller/main/ChartController.hxx new file mode 100644 index 000000000..de3650b0d --- /dev/null +++ b/chart2/source/controller/main/ChartController.hxx @@ -0,0 +1,526 @@ +/************************************************************************* + * + * $RCSfile: ChartController.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:28 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef _CHART_CONTROLLER_HXX +#define _CHART_CONTROLLER_HXX + +#include "LifeTime.hxx" +#include "ServiceMacros.hxx" + +#ifndef _COM_SUN_STAR_FRAME_XCONTROLLER_HPP_ +#include <com/sun/star/frame/XController.hpp> +#endif +#ifndef _COM_SUN_STAR_FRAME_XDISPATCHPROVIDER_HPP_ +#include <com/sun/star/frame/XDispatchProvider.hpp> +#endif +#ifndef _COM_SUN_STAR_FRAME_XDISPATCH_HPP_ +#include <com/sun/star/frame/XDispatch.hpp> +#endif +#ifndef _COM_SUN_STAR_VIEW_XSELECTIONSUPPLIER_HPP_ +#include <com/sun/star/view/XSelectionSupplier.hpp> +#endif +#ifndef _COM_SUN_STAR_UI_XCONTEXTMENUINTERCEPTION_HPP_ +#include <com/sun/star/ui/XContextMenuInterception.hpp> +#endif +#ifndef _COM_SUN_STAR_UNO_XWEAK_HPP_ +#include <com/sun/star/uno/XWeak.hpp> +#endif +#ifndef _COM_SUN_STAR_SDBC_XCLOSELISTENER_HPP_ +#include <com/sun/star/util/XCloseListener.hpp> +#endif +#ifndef _COM_SUN_STAR_SDBC_XCLOSEABLE_HPP_ +#include <com/sun/star/util/XCloseable.hpp> +#endif +#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_ +#include <com/sun/star/lang/XServiceInfo.hpp> +#endif +#ifndef _COM_SUN_STAR_UNO_XCOMPONENTCONTEXT_HPP_ +#include <com/sun/star/uno/XComponentContext.hpp> +#endif +#ifndef _CPPUHELPER_IMPLBASE6_HXX_ +#include <cppuhelper/implbase8.hxx> +#endif + +// header for class MouseEvent +#ifndef _SV_EVENT_HXX +#include <vcl/event.hxx> +#endif + +//============================================================================= +/** this is an example implementation for the service ::com::sun::star::frame::Controller +*/ + +//............................................................................. +namespace chart +{ +//............................................................................. + +class WindowController +{ +public: + virtual void execute_Paint( const Rectangle& rRect )=0; + virtual void execute_MouseButtonDown( const MouseEvent& rMEvt )=0; + virtual void execute_MouseMove( const MouseEvent& rMEvt )=0; + virtual void execute_Tracking( const TrackingEvent& rTEvt )=0; + virtual void execute_MouseButtonUp( const MouseEvent& rMEvt )=0; + virtual void execute_Resize()=0; + virtual void execute_Activate()=0; + virtual void execute_Deactivate()=0; + virtual void execute_GetFocus()=0; + virtual void execute_LoseFocus()=0; + virtual void execute_Command( const CommandEvent& rCEvt )=0; +}; + +class ChartWindow; +class ChartView; +class DrawModelWrapper; +class DrawViewWrapper; +class NumberFormatterWrapper; +class ChartController : public ::cppu::WeakImplHelper8 < + ::com::sun::star::frame::XController //comprehends XComponent (required interface) + ,::com::sun::star::frame::XDispatchProvider //(required interface) + ,::com::sun::star::view::XSelectionSupplier //(optional interface) + ,::com::sun::star::ui::XContextMenuInterception //(optional interface) + ,::com::sun::star::util::XCloseListener //(needed for communication with XModel) + ,::com::sun::star::lang::XServiceInfo + // ,public ::com::sun::star::uno::XWeak // implemented by WeakImplHelper(optional interface) + // ,public ::com::sun::star::uno::XInterface // implemented by WeakImplHelper(optional interface) + // ,public ::com::sun::star::lang::XTypeProvider // implemented by WeakImplHelper + ,::com::sun::star::frame::XDispatch + ,::com::sun::star::awt::XWindow //this is the Window Controller part of this Controller, that will be given to a Frame via setComponent + > + , public WindowController +{ + +private: + class TheModelRef; + friend class ChartController::TheModelRef; + class RefCountable + { + public: + RefCountable(); + virtual ~RefCountable(); + void acquire(); + void release(); + private: + sal_Int32 volatile m_nRefCount; + }; + class TheModel : public RefCountable + { + public: + TheModel( const ::com::sun::star::uno::Reference< + ::com::sun::star::frame::XModel > & xModel ); + + virtual ~TheModel(); + + void SetOwnerShip( sal_Bool bGetsOwnership ); + void addListener( ChartController* pController ); + void removeListener( ChartController* pController ); + void tryTermination(); + ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > + getModel() { return m_xModel;} + + private: + ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > m_xModel; + ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloseable > m_xCloseable; + + //the ownership between model and controller is not clear at first + //each controller might consider himself as owner of the model first + sal_Bool volatile m_bOwnership; + //with a XCloseable::close call and during XCloseListener::queryClosing + //the ownership can be regulated more explicit, + //if so the ownership is considered to be well known + sal_Bool volatile m_bOwnershipIsWellKnown; + }; + class TheModelRef + { + public: + TheModelRef( TheModel* pTheModel, ::osl::Mutex& rMutex ); + TheModelRef( const TheModelRef& rTheModel, ::osl::Mutex& rMutex ); + TheModelRef& operator=(ChartController::TheModel* pTheModel); + TheModelRef& operator=(const TheModelRef& rTheModel); + virtual ~TheModelRef(); + sal_Bool is() const; + TheModel* operator->() const { return m_pTheModel; } + private: + TheModel* m_pTheModel; + mutable ::osl::Mutex& m_rModelMutex; + }; + +private: + mutable ::apphelper::LifeTimeManager m_aLifeTimeManager; + + mutable ::osl::Mutex m_aControllerMutex; + sal_Bool volatile m_bSuspended; + sal_Bool volatile m_bCanClose; + + + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext> m_xCC; + + //model + ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > m_xFrame; + mutable ::osl::Mutex m_aModelMutex; + TheModelRef m_aModel; + + //view + ChartWindow* m_pChartWindow; + ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > m_xViewWindow; + ChartView* m_pChartView; + DrawModelWrapper* m_pDrawModelWrapper; + DrawViewWrapper* m_pDrawViewWrapper; + + ::rtl::OUString m_aSelectedObjectCID;//only single object selection so far + + bool m_bViewDirty; //states wether the view needs to be rebuild + + NumberFormatterWrapper* m_pNumberFormatterWrapper; + +private: + //private methods + + sal_Bool impl_isDisposedOrSuspended(); + + sal_Bool SAL_CALL impl_tryInitializeView() throw(::com::sun::star::uno::RuntimeException); + void SAL_CALL impl_deleteView() throw(::com::sun::star::uno::RuntimeException); + void SAL_CALL impl_rebuildView() throw(::com::sun::star::uno::RuntimeException); + + //executeDispatch methods + void SAL_CALL executeDispatch_ObjectProperties(); + void SAL_CALL executeDispatch_FormatObject(sal_Int32 nSlotId); + void SAL_CALL executeDlg_ObjectProperties( const ::rtl::OUString& rObjectCID ); + + void SAL_CALL executeDispatch_ChartType(); + void SAL_CALL executeDispatch_ObjectToDefault(); + + void SAL_CALL executeDispatch_InsertTitle(); + void SAL_CALL executeDispatch_InsertLegend(); + void SAL_CALL executeDispatch_InsertDataLabel(); + void SAL_CALL executeDispatch_InsertAxis(); + void SAL_CALL executeDispatch_InsertGrid(); + void SAL_CALL executeDispatch_InsertStatistic(); + void SAL_CALL executeDispatch_InsertSpecialCharacter(); + + // + void execute_DoubleClick(); + + +public: + //no default constructor + ChartController(::com::sun::star::uno::Reference< + ::com::sun::star::uno::XComponentContext > const & xContext); + virtual ~ChartController(); + + //----------------------------------------------------------------- + // ::com::sun::star::lang::XServiceInfo + //----------------------------------------------------------------- + + APPHELPER_XSERVICEINFO_DECL() + APPHELPER_SERVICE_FACTORY_HELPER(ChartController) + + //----------------------------------------------------------------- + // ::com::sun::star::frame::XController (required interface) + //----------------------------------------------------------------- + virtual void SAL_CALL + attachFrame( const ::com::sun::star::uno::Reference< + ::com::sun::star::frame::XFrame > & xFrame ) + throw (::com::sun::star::uno::RuntimeException); + + virtual sal_Bool SAL_CALL + attachModel( const ::com::sun::star::uno::Reference< + ::com::sun::star::frame::XModel > & xModel ) + throw (::com::sun::star::uno::RuntimeException); + + virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > SAL_CALL + getFrame() throw (::com::sun::star::uno::RuntimeException); + + virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > SAL_CALL + getModel() throw (::com::sun::star::uno::RuntimeException); + + virtual ::com::sun::star::uno::Any SAL_CALL + getViewData() throw (::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL + restoreViewData( const ::com::sun::star::uno::Any& rValue ) + throw (::com::sun::star::uno::RuntimeException); + + virtual sal_Bool SAL_CALL + suspend( sal_Bool bSuspend ) + throw (::com::sun::star::uno::RuntimeException); + + //----------------------------------------------------------------- + // ::com::sun::star::lang::XComponent (base of XController) + //----------------------------------------------------------------- + virtual void SAL_CALL + dispose() throw (::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL + addEventListener( const ::com::sun::star::uno::Reference< + ::com::sun::star::lang::XEventListener > & xListener ) + throw (::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL + removeEventListener( const ::com::sun::star::uno::Reference< + ::com::sun::star::lang::XEventListener > & xListener ) + throw (::com::sun::star::uno::RuntimeException); + + //----------------------------------------------------------------- + // ::com::sun::star::frame::XDispatchProvider (required interface) + //----------------------------------------------------------------- + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::frame::XDispatch> SAL_CALL + queryDispatch( const ::com::sun::star::util::URL& rURL + , const rtl::OUString& rTargetFrameName + , sal_Int32 nSearchFlags) + throw (::com::sun::star::uno::RuntimeException); + + virtual ::com::sun::star::uno::Sequence< + ::com::sun::star::uno::Reference< + ::com::sun::star::frame::XDispatch > > SAL_CALL + queryDispatches( const ::com::sun::star::uno::Sequence< + ::com::sun::star::frame::DispatchDescriptor > & xDescripts) + throw (::com::sun::star::uno::RuntimeException); + + //----------------------------------------------------------------- + // ::com::sun::star::view::XSelectionSupplier (optional interface) + //----------------------------------------------------------------- + virtual sal_Bool SAL_CALL + select( const ::com::sun::star::uno::Any& rSelection ) + throw ( com::sun::star::lang::IllegalArgumentException ); + + virtual ::com::sun::star::uno::Any SAL_CALL + getSelection() throw (::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL + addSelectionChangeListener( const ::com::sun::star::uno::Reference< + com::sun::star::view::XSelectionChangeListener > & xListener ) + throw (::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL + removeSelectionChangeListener( const ::com::sun::star::uno::Reference< + com::sun::star::view::XSelectionChangeListener > & xListener ) + throw (::com::sun::star::uno::RuntimeException); + + //----------------------------------------------------------------- + // ::com::sun::star::ui::XContextMenuInterception (optional interface) + //----------------------------------------------------------------- + virtual void SAL_CALL + registerContextMenuInterceptor( const ::com::sun::star::uno::Reference< + ::com::sun::star::ui::XContextMenuInterceptor > & xInterceptor) + throw (::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL + releaseContextMenuInterceptor( const ::com::sun::star::uno::Reference< + ::com::sun::star::ui::XContextMenuInterceptor > & xInterceptor) + throw (::com::sun::star::uno::RuntimeException); + + + //----------------------------------------------------------------- + //----------------------------------------------------------------- + //additional interfaces + + //----------------------------------------------------------------- + // ::com::sun::star::util::XCloseListener + //----------------------------------------------------------------- + virtual void SAL_CALL + queryClosing( const ::com::sun::star::lang::EventObject& Source + , sal_Bool GetsOwnership ) + throw (::com::sun::star::util::CloseVetoException + , ::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL + notifyClosing( const ::com::sun::star::lang::EventObject& Source ) + throw (::com::sun::star::uno::RuntimeException); + + //----------------------------------------------------------------- + // ::com::sun::star::util::XEventListener (base of XCloseListener) + //----------------------------------------------------------------- + virtual void SAL_CALL + disposing( const ::com::sun::star::lang::EventObject& Source ) + throw (::com::sun::star::uno::RuntimeException); + + //----------------------------------------------------------------- + // ::com::sun::star::frame::XDispatch + //----------------------------------------------------------------- + + virtual void SAL_CALL + dispatch( const ::com::sun::star::util::URL& aURL + , const ::com::sun::star::uno::Sequence< + ::com::sun::star::beans::PropertyValue >& aArgs ) + throw (::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL + addStatusListener( const ::com::sun::star::uno::Reference< + ::com::sun::star::frame::XStatusListener >& xControl + , const ::com::sun::star::util::URL& aURL ) + throw (::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL + removeStatusListener( const ::com::sun::star::uno::Reference< + ::com::sun::star::frame::XStatusListener >& xControl + , const ::com::sun::star::util::URL& aURL ) + throw (::com::sun::star::uno::RuntimeException); + + //----------------------------------------------------------------- + // ::com::sun::star::awt::XWindow + //----------------------------------------------------------------- + virtual void SAL_CALL + setPosSize( sal_Int32 X, sal_Int32 Y + , sal_Int32 Width, sal_Int32 Height, sal_Int16 Flags ) + throw (::com::sun::star::uno::RuntimeException); + + virtual ::com::sun::star::awt::Rectangle SAL_CALL + getPosSize() + throw (::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL + setVisible( sal_Bool Visible ) + throw (::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL + setEnable( sal_Bool Enable ) + throw (::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL + setFocus() throw (::com::sun::star::uno::RuntimeException); + + //---------------- + virtual void SAL_CALL + addWindowListener( const ::com::sun::star::uno::Reference< + ::com::sun::star::awt::XWindowListener >& xListener ) + throw (::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL + removeWindowListener( const ::com::sun::star::uno::Reference< + ::com::sun::star::awt::XWindowListener >& xListener ) + throw (::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL + addFocusListener( const ::com::sun::star::uno::Reference< + ::com::sun::star::awt::XFocusListener >& xListener ) + throw (::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL + removeFocusListener( const ::com::sun::star::uno::Reference< + ::com::sun::star::awt::XFocusListener >& xListener ) + throw (::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL + addKeyListener( const ::com::sun::star::uno::Reference< + ::com::sun::star::awt::XKeyListener >& xListener ) + throw (::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL + removeKeyListener( const ::com::sun::star::uno::Reference< + ::com::sun::star::awt::XKeyListener >& xListener ) + throw (::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL + addMouseListener( const ::com::sun::star::uno::Reference< + ::com::sun::star::awt::XMouseListener >& xListener ) + throw (::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL + removeMouseListener( const ::com::sun::star::uno::Reference< + ::com::sun::star::awt::XMouseListener >& xListener ) + throw (::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL + addMouseMotionListener( const ::com::sun::star::uno::Reference< + ::com::sun::star::awt::XMouseMotionListener >& xListener ) + throw (::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL + removeMouseMotionListener( const ::com::sun::star::uno::Reference< + ::com::sun::star::awt::XMouseMotionListener >& xListener ) + throw (::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL + addPaintListener( const ::com::sun::star::uno::Reference< + ::com::sun::star::awt::XPaintListener >& xListener ) + throw (::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL + removePaintListener( const ::com::sun::star::uno::Reference< + ::com::sun::star::awt::XPaintListener >& xListener ) + throw (::com::sun::star::uno::RuntimeException); + + //----------------------------------------------------------------- + // chart2::WindowController + //----------------------------------------------------------------- + virtual void execute_Paint( const Rectangle& rRect ); + virtual void execute_MouseButtonDown( const MouseEvent& rMEvt ); + virtual void execute_MouseMove( const MouseEvent& rMEvt ); + virtual void execute_Tracking( const TrackingEvent& rTEvt ); + virtual void execute_MouseButtonUp( const MouseEvent& rMEvt ); + virtual void execute_Resize(); + virtual void execute_Activate(); + virtual void execute_Deactivate(); + virtual void execute_GetFocus(); + virtual void execute_LoseFocus(); + virtual void execute_Command( const CommandEvent& rCEvt ); + //----------------------------------------------------------------- +}; + +//............................................................................. +} // namespace chart +//............................................................................. + +#endif + diff --git a/chart2/source/controller/main/ChartController_Insert.cxx b/chart2/source/controller/main/ChartController_Insert.cxx new file mode 100644 index 000000000..2c6e84803 --- /dev/null +++ b/chart2/source/controller/main/ChartController_Insert.cxx @@ -0,0 +1,588 @@ +/************************************************************************* + * + * $RCSfile: ChartController_Insert.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:28 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "ChartController.hxx" + +#include "dlg_InsertAxis_Grid.hxx" +#include "dlg_InsertDataLabel.hxx" +#include "dlg_InsertLegend.hxx" +#include "dlg_InsertStatistic.hxx" +#include "dlg_InsertTitle.hxx" + +#include "ChartModelHelper.hxx" +#include "MeterHelper.hxx" +#include "TitleHelper.hxx" +#include "ContextHelper.hxx" +#include "macros.hxx" +#include "DrawModelWrapper.hxx" +#include "MultipleItemConverter.hxx" + +//maybe superfluous in future: +#include "ChartTypeItemConverter.hxx" + +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XAXISCONTAINER_HPP_ +#include <drafts/com/sun/star/chart2/XAxisContainer.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XBOUNDEDCOORDINATESYSTEMCONTAINER_HPP_ +#include <drafts/com/sun/star/chart2/XBoundedCoordinateSystemContainer.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XDIAGRAM_HPP_ +#include <drafts/com/sun/star/chart2/XDiagram.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XGRIDCONTAINER_HPP_ +#include <drafts/com/sun/star/chart2/XGridContainer.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XTITLED_HPP_ +#include <drafts/com/sun/star/chart2/XTitled.hpp> +#endif + +//-------------------------------------- + +// header for define RET_OK +#ifndef _SV_MSGBOX_HXX +#include <vcl/msgbox.hxx> +#endif +// header for class OUStringBuffer +#ifndef _RTL_USTRBUF_HXX_ +#include <rtl/ustrbuf.hxx> +#endif +// header for class SvxCharacterMap +#ifndef _SVX_CHARMAP_HXX +#include <svx/charmap.hxx> +#endif + +#ifndef _COM_SUN_STAR_UTIL_XCLONEABLE_HPP_ +#include <com/sun/star/util/XCloneable.hpp> +#endif + + +//............................................................................. +namespace chart +{ +//............................................................................. + +using namespace ::com::sun::star; +using namespace ::drafts::com::sun::star::chart2; + +namespace +{ +//----------------------------------------------------------------------------- +//status of grid or axis + +void getExistingAxes( uno::Sequence< sal_Bool >& rExistenceList, const uno::Reference< XDiagram >& xDiagram ) +{ + rExistenceList.realloc(6); + + sal_Int32 nN; + uno::Reference< XAxis > xAxis; + for(nN=0;nN<3;nN++) + { + xAxis = MeterHelper::getAxis( nN, true, xDiagram ); + rExistenceList[nN] = xAxis.is(); + } + for(nN=3;nN<6;nN++) + { + xAxis = MeterHelper::getAxis( nN%3, false, xDiagram ); + rExistenceList[nN] = xAxis.is(); + } +} + +void getExistingGrids( uno::Sequence< sal_Bool >& rExistenceList, const uno::Reference< XDiagram >& xDiagram ) +{ + sal_Int32 nN; + uno::Reference< XGrid > xGrid; + for(nN=0;nN<3;nN++) + { + xGrid = MeterHelper::getGrid( nN, true, xDiagram ); + rExistenceList[nN] = xGrid.is(); + } + for(nN=3;nN<6;nN++) + { + xGrid = MeterHelper::getGrid( nN%3, false, xDiagram ); + rExistenceList[nN] = xGrid.is(); + } +} + +//----------------------------------------------------------------------------- +//change grid or axis + +void createAxis( sal_Int32 nDimensionIndex, bool bMainAxis + , const uno::Reference< XDiagram >& xDiagram + , const uno::Reference< uno::XComponentContext >& xContext ) +{ + sal_Int32 nCooSysIndex = bMainAxis ? 0 : 1; + uno::Reference< XBoundedCoordinateSystem > xCooSys = MeterHelper::getBoundedCoordinateSystemByIndex( xDiagram, nCooSysIndex ); + if(!xCooSys.is()) + { + //create a new CooSys by cloning it from another exsisting one + uno::Reference< XBoundedCoordinateSystem > xOtherCooSys + = MeterHelper::getBoundedCoordinateSystemByIndex( xDiagram, nCooSysIndex-1 ); + if(!xOtherCooSys.is()) //@todo? ... + return; + + uno::Reference< util::XCloneable > xCloneable( xOtherCooSys,uno::UNO_QUERY); + if( xCloneable.is() ) + xCooSys = uno::Reference< XBoundedCoordinateSystem >( xCloneable->createClone(), uno::UNO_QUERY ); + + uno::Reference< XBoundedCoordinateSystemContainer > xCooSysCnt( xDiagram, uno::UNO_QUERY ); + if( xCooSysCnt.is() && xCooSys.is() ) + xCooSysCnt->addCoordinateSystem( xCooSys ); + } + // create axis + MeterHelper::createAxis( nDimensionIndex, xCooSys, uno::Reference< XAxisContainer >( xDiagram, uno::UNO_QUERY ), xContext ); +} + +void createGrid( sal_Int32 nDimensionIndex, sal_Int32 nCooSysIndex, bool bMainGrid + , const uno::Reference< XDiagram >& xDiagram + , const uno::Reference< uno::XComponentContext >& xContext ) +{ + uno::Reference< XBoundedCoordinateSystem > xCooSys = MeterHelper::getBoundedCoordinateSystemByIndex( xDiagram, nCooSysIndex ); + if(!xCooSys.is()) + { + //@todo create initial coosys if none exsists (but this state is not likly to occur) + return; + } + // create grid + uno::Reference< XGrid > xGrid; + OSL_ENSURE( nDimensionIndex <= 3, "Check Code for more than 3 dimensions" ); + + ::rtl::OUStringBuffer aId( MeterHelper::makeGridIdentifier( nDimensionIndex, nCooSysIndex, bMainGrid ) ); + + ContextHelper::tContextEntryMapType aContextValues( + ContextHelper::MakeContextEntryMap( + C2U( "Identifier" ), uno::makeAny( aId.makeStringAndClear()) )); + + xGrid.set( xContext->getServiceManager()->createInstanceWithContext( + C2U( "drafts.com.sun.star.chart2.Grid" ), + ContextHelper::createContext( aContextValues, xContext ) ) + , uno::UNO_QUERY ); + OSL_ASSERT( xGrid.is()); + if( xGrid.is()) + { + xGrid->attachCoordinateSystem( xCooSys, nDimensionIndex ); + uno::Reference< XGridContainer > xGridContainer( xDiagram, uno::UNO_QUERY ); + xGridContainer->addGrid( xGrid ); + } +} + +bool changeExistingAxes( const uno::Reference< XDiagram >& xDiagram + , const uno::Sequence< sal_Bool >& rOldExistenceList + , const uno::Sequence< sal_Bool >& rNewExistenceList + , const uno::Reference< uno::XComponentContext >& xContext ) +{ + bool bChanged = false; + for(sal_Int32 nN=0;nN<6;nN++) + { + if(rOldExistenceList[nN]!=rNewExistenceList[nN]) + { + bChanged = true; + if(rNewExistenceList[nN]) //add axis + { + createAxis( nN%3, nN<3, xDiagram, xContext ); + } + else //remove axis + { + uno::Reference< XAxisContainer > xAxisContainer( xDiagram, uno::UNO_QUERY ); + if(xAxisContainer.is()) + { + uno::Reference< XAxis > xAxis = MeterHelper::getAxis( nN%3, nN<3, xDiagram ); + xAxisContainer->removeAxis(xAxis); + } + } + } + } + return bChanged; +} + +bool changeExistingGrids( const uno::Reference< XDiagram >& xDiagram + , const uno::Sequence< sal_Bool >& rOldExistenceList + , const uno::Sequence< sal_Bool >& rNewExistenceList + , const uno::Reference< uno::XComponentContext >& xContext ) +{ + bool bChanged = false; + for(sal_Int32 nN=0;nN<6;nN++) + { + if(rOldExistenceList[nN]!=rNewExistenceList[nN]) + { + bChanged = true; + if(rNewExistenceList[nN]) //add grid + { + createGrid( nN%3, 0, nN<3, xDiagram, xContext ); + } + else //remove grid + { + uno::Reference< XGridContainer > xGridContainer( xDiagram, uno::UNO_QUERY ); + if(xGridContainer.is()) + { + uno::Reference< XGrid > xGrid = MeterHelper::getGrid( nN%3, nN<3, xDiagram ); + xGridContainer->removeGrid(xGrid); + } + } + } + } + return bChanged; +} + +//----------------------------------------------------------------------------- +//status of titles +void fillInsertTitleDialogDataFromModel( InsertTitleDialogData& rDialogData + , const uno::Reference< frame::XModel>& xChartModel ) +{ + uno::Reference< XDiagram > xDiagram = ChartModelHelper::findDiagram(xChartModel); + + //get possibilities + uno::Sequence< sal_Bool > aMeterPossibilityList; + MeterHelper::getMeterPossibilities( aMeterPossibilityList, xDiagram ); + rDialogData.aPossibilityList[2]=aMeterPossibilityList[0];//x axis title + rDialogData.aPossibilityList[3]=aMeterPossibilityList[1];//y axis title + rDialogData.aPossibilityList[4]=aMeterPossibilityList[2];//z axis title + + //find out which title exsist and get their text + //main title: + for( sal_Int32 nTitleIndex = 0; nTitleIndex<5; nTitleIndex++) + { + uno::Reference< XTitle > xTitle = TitleHelper::getTitle( + static_cast< TitleHelper::eTitleType >( nTitleIndex ), xChartModel ); + rDialogData.aExistenceList[nTitleIndex] = xTitle.is(); + rDialogData.aTextList[nTitleIndex]=TitleHelper::getCompleteString( xTitle ); + } +} + +//----------------------------------------------------------------------------- +//change existing titles + +bool changeExistingTitles( const uno::Reference< frame::XModel >& xModel + , const InsertTitleDialogData& rOldState + , const InsertTitleDialogData& rNewState + , const uno::Reference< uno::XComponentContext >& xContext ) +{ + bool bChanged = false; + for(sal_Int32 nN=0;nN<5;nN++) + { + if( rOldState.aExistenceList[nN] != rNewState.aExistenceList[nN] ) + { + if(rNewState.aExistenceList[nN]) + { + TitleHelper::createTitle( + static_cast< TitleHelper::eTitleType >( nN ), rNewState.aTextList[nN], xModel, xContext ); + bChanged = true; + } + else + { + TitleHelper::removeTitle( static_cast< TitleHelper::eTitleType >( nN ), xModel ); + bChanged = true; + } + } + else if( rOldState.aTextList[nN] != rNewState.aTextList[nN] ) + { + //change content + uno::Reference< XTitle > xTitle( + TitleHelper::getTitle( static_cast< TitleHelper::eTitleType >( nN ), xModel ) ); + if(xTitle.is()) + { + TitleHelper::setCompleteString( rNewState.aTextList[nN], xTitle, xContext ); + bChanged = true; + } + } + } + return bChanged; +} + +}// anonymous namespace + +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- + +void SAL_CALL ChartController::executeDispatch_InsertAxis() +{ + try + { + Window* pParent( NULL ); + InsertMeterDialogData aDialogInput; + uno::Reference< XDiagram > xDiagram = ChartModelHelper::findDiagram(m_aModel->getModel()); + getExistingAxes( aDialogInput.aExistenceList, xDiagram ); + MeterHelper::getMeterPossibilities( aDialogInput.aPossibilityList, xDiagram ); + + SchAxisDlg aDlg( pParent, aDialogInput ); + if( aDlg.Execute() == RET_OK ) + { + InsertMeterDialogData aDialogOutput; + aDlg.getResult( aDialogOutput ); + bool bChanged = changeExistingAxes( xDiagram + , aDialogInput.aExistenceList, aDialogOutput.aExistenceList, m_xCC ); + if(bChanged) + impl_rebuildView(); + } + } + catch( uno::RuntimeException& e) + { + e; + } +} + +void SAL_CALL ChartController::executeDispatch_InsertGrid() +{ + try + { + Window* pParent( NULL ); + InsertMeterDialogData aDialogInput; + uno::Reference< XDiagram > xDiagram = ChartModelHelper::findDiagram(m_aModel->getModel()); + getExistingGrids( aDialogInput.aExistenceList, xDiagram ); + MeterHelper::getMeterPossibilities( aDialogInput.aPossibilityList, xDiagram, false ); + + SchGridDlg aDlg( pParent, aDialogInput );//aItemSet, b3D, bNet, bSecondaryX, bSecondaryY ); + if( aDlg.Execute() == RET_OK ) + { + InsertMeterDialogData aDialogOutput; + aDlg.getResult( aDialogOutput ); + bool bChanged = changeExistingGrids( xDiagram + , aDialogInput.aExistenceList, aDialogOutput.aExistenceList, m_xCC ); + if(bChanged) + impl_rebuildView(); + } + } + catch( uno::RuntimeException& e) + { + e; + } +} + +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- + +void SAL_CALL ChartController::executeDispatch_InsertTitle() +{ + try + { + Window* pParent( NULL ); + InsertTitleDialogData aDialogInput; + fillInsertTitleDialogDataFromModel( aDialogInput, m_aModel->getModel() ); + + SchTitleDlg aDlg( pParent, aDialogInput ); + if( aDlg.Execute() == RET_OK ) + { + InsertTitleDialogData aDialogOutput; + aDlg.getResult( aDialogOutput ); + bool bChanged = changeExistingTitles( + m_aModel->getModel(), aDialogInput, aDialogOutput, m_xCC ); + if(bChanged) + impl_rebuildView(); + } + } + catch( uno::RuntimeException& e) + { + e; + } +} + +void SAL_CALL ChartController::executeDispatch_InsertLegend() +{ + try + { + bool bChanged = false; + + uno::Reference< beans::XPropertySet > xProp=NULL; + //@todo use correct ItemConverter if available + wrapper::ChartTypeItemConverter aItemConverter( xProp, m_pDrawModelWrapper->GetItemPool() ); + SfxItemSet aItemSet = aItemConverter.CreateEmptyItemSet(); + //aItemConverter.FillItemSet( aItemSet ); + + //prepare and open dialog + Window* pParent( NULL ); + SchLegendDlg aDlg( pParent, aItemSet); + if( aDlg.Execute() == RET_OK ) + { + SfxItemSet aOutItemSet = aItemConverter.CreateEmptyItemSet(); + aDlg.GetAttr( aOutItemSet ); + + bChanged = aItemConverter.ApplyItemSet( aOutItemSet );//model should be changed now + } + } + catch( uno::RuntimeException& e) + { + e; + } +} + +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- + +void SAL_CALL ChartController::executeDispatch_InsertDataLabel() +{ + bool bChanged = false; + try + { + wrapper::AllDataLabelItemConverter aItemConverter( + m_aModel->getModel(), + m_pDrawModelWrapper->GetItemPool(), + m_pDrawModelWrapper->getSdrModel()); + SfxItemSet aItemSet = aItemConverter.CreateEmptyItemSet(); + aItemConverter.FillItemSet( aItemSet ); + + //prepare and open dialog + Window* pParent( NULL ); + SchDataDescrDlg aDlg( pParent, aItemSet); + if( aDlg.Execute() == RET_OK ) + { + SfxItemSet aOutItemSet = aItemConverter.CreateEmptyItemSet(); + aDlg.GetAttr( aOutItemSet ); + bChanged = aItemConverter.ApplyItemSet( aOutItemSet );//model should be changed now + } + } + catch( uno::RuntimeException& e) + { + e; + } + //make sure that all objects using m_pDrawModelWrapper or m_pChartView are already deleted + if(bChanged) try + { + impl_rebuildView(); + } + catch( uno::RuntimeException& e) + { + e; + } +} + +void SAL_CALL ChartController::executeDispatch_InsertStatistic() +{ + try + { + bool bChanged = false; + + uno::Reference< beans::XPropertySet > xProp=NULL; + //@todo use correct ItemConverter if available + wrapper::ChartTypeItemConverter aItemConverter( xProp, m_pDrawModelWrapper->GetItemPool() ); + SfxItemSet aItemSet = aItemConverter.CreateEmptyItemSet(); + //aItemConverter.FillItemSet( aItemSet ); + + //prepare and open dialog + Window* pParent( NULL ); + SchDataStatisticsDlg aDlg( pParent, aItemSet); + if( aDlg.Execute() == RET_OK ) + { + SfxItemSet aOutItemSet = aItemConverter.CreateEmptyItemSet(); + aDlg.GetAttr( aOutItemSet ); + + bChanged = aItemConverter.ApplyItemSet( aOutItemSet );//model should be changed now + } + } + catch( uno::RuntimeException& e) + { + e; + } +} + +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- + +void SAL_CALL ChartController::executeDispatch_InsertSpecialCharacter() +{ + SvxCharacterMap aDlg( NULL, FALSE ); + /* + OutlinerView* pOV = NULL; + SdrOutliner* pOL = NULL; + + // set the current font + pOV = pView->GetTextEditOutlinerView(); + if( !pOV ) + return; + pOL = pView->GetTextEditOutliner(); + OutputDevice *pOut = pOL->GetRefDevice(); + aDlg.SetFont( pOut->GetFont() ); + + // the font mustn't be changed + aDlg.DisableFontSelection(); + */ + if( aDlg.Execute() == RET_OK ) + { + String aString( aDlg.GetCharacters() ); + /* + // insert string + + // prevent flicker + pOV->HideCursor(); + pOL->SetUpdateMode(FALSE); + + // delete current selection by inserting empty String, so current + // attributes become unique (sel. has to be erased anyway) + pOV->InsertText(String()); + + SfxUndoManager& rUndoMgr = pOL->GetUndoManager(); + rUndoMgr.EnterListAction( String( SchResId( STR_UNDO_INSERT_SPECCHAR )), String( SchResId( STR_UNDO_INSERT_SPECCHAR ))); + pOV->InsertText(aString, TRUE); + + ESelection aSel = pOV->GetSelection(); + aSel.nStartPara = aSel.nEndPara; + aSel.nStartPos = aSel.nEndPos; + pOV->SetSelection(aSel); + + rUndoMgr.LeaveListAction(); + + // show changes + pOL->SetUpdateMode(TRUE); + pOV->ShowCursor(); + */ + } +} + +//............................................................................. +} //namespace chart +//............................................................................. diff --git a/chart2/source/controller/main/ChartController_Properties.cxx b/chart2/source/controller/main/ChartController_Properties.cxx new file mode 100644 index 000000000..e73815c51 --- /dev/null +++ b/chart2/source/controller/main/ChartController_Properties.cxx @@ -0,0 +1,676 @@ +/************************************************************************* + * + * $RCSfile: ChartController_Properties.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:28 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "ChartController.hxx" + +#include "DrawModelWrapper.hxx" +#include "chartview/ChartView.hxx" +#include "chartview/ObjectIdentifier.hxx" + +#include "SchSlotIds.hxx" + +#include "dlg_ObjectProperties.hxx" +#include "ViewElementListProvider.hxx" +#include "DataPointItemConverter.hxx" +#include "AxisItemConverter.hxx" +#include "MultipleItemConverter.hxx" +#include "TitleItemConverter.hxx" +#include "ChartModelHelper.hxx" +#include "MeterHelper.hxx" +#include "macros.hxx" +#include "TitleHelper.hxx" + +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XAXISCONTAINER_HPP_ +#include <drafts/com/sun/star/chart2/XAxisContainer.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XCHARTDOCUMENT_HPP_ +#include <drafts/com/sun/star/chart2/XChartDocument.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XGRIDCONTAINER_HPP_ +#include <drafts/com/sun/star/chart2/XGridContainer.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XIDENTIFIABLE_HPP_ +#include <drafts/com/sun/star/chart2/XIdentifiable.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XTITLED_HPP_ +#include <drafts/com/sun/star/chart2/XTitled.hpp> +#endif + +//for auto_ptr +#include <memory> + +// for test in executeDispatch_ObjectToDefault +#include <com/sun/star/beans/XPropertyState.hpp> +#include <com/sun/star/beans/PropertyAttribute.hpp> + +// header for define RET_OK +#ifndef _SV_MSGBOX_HXX +#include <vcl/msgbox.hxx> +#endif + +//............................................................................. +namespace chart +{ +//............................................................................. +using namespace ::com::sun::star; +using namespace ::drafts::com::sun::star::chart2; + +namespace +{ + +uno::Reference< beans::XPropertySet > getObjectPropertySet( const rtl::OUString& rObjectCID + , const uno::Reference< frame::XModel >& xModel ) +{ + if(!rObjectCID.getLength()) + return NULL; + if(!xModel.is()) + return NULL; + + uno::Reference< beans::XPropertySet > xObjectProperties = NULL; + try + { + ObjectType eObjectType = ObjectIdentifier::getObjectType( rObjectCID ); + rtl::OUString aParticleID = ObjectIdentifier::getParticleID( rObjectCID ); + switch(eObjectType) + { + case OBJECTTYPE_PAGE: + break; + case OBJECTTYPE_TITLE: + { + if( TitleHelper::getIdentifierForTitle(TitleHelper::MAIN_TITLE).equals( aParticleID ) ) + xObjectProperties.set( TitleHelper::getTitle(TitleHelper::MAIN_TITLE,xModel), uno::UNO_QUERY ); + } + break; + case OBJECTTYPE_LEGEND: + break; + case OBJECTTYPE_LEGEND_ENTRY: + break; + case OBJECTTYPE_DIAGRAM: + break; + case OBJECTTYPE_DIAGRAM_WALL: + { + uno::Reference< XDiagram > xDia( ChartModelHelper::findDiagram( xModel ) ); + if( xDia.is()) + xObjectProperties.set( xDia->getWall() ); + } + break; + case OBJECTTYPE_DIAGRAM_FLOOR: + break; + case OBJECTTYPE_AXIS: + { + uno::Reference< XAxisContainer > xAxisCnt( ChartModelHelper::findDiagram(xModel), uno::UNO_QUERY ); + if( xAxisCnt.is()) + xObjectProperties.set( + xAxisCnt->getAxisByIdentifier( aParticleID ), + uno::UNO_QUERY ); + } + break; + case OBJECTTYPE_AXIS_UNITLABEL: + break; + case OBJECTTYPE_GRID: + { + uno::Reference< XGridContainer > xGridCnt( ChartModelHelper::findDiagram(xModel), uno::UNO_QUERY ); + if( xGridCnt.is()) + xObjectProperties.set( + xGridCnt->getGridByIdentifier( aParticleID ), + uno::UNO_QUERY ); + } + break; + case OBJECTTYPE_DATA_LABELS: + case OBJECTTYPE_DATA_SERIES: + { + uno::Reference< XDataSeries > xSeries = + ChartModelHelper::getSeriesByIdentifier( aParticleID, xModel ); + if(xSeries.is()) + xObjectProperties = uno::Reference< beans::XPropertySet >( + xSeries, uno::UNO_QUERY ); + break; + } + case OBJECTTYPE_DATA_LABEL: + case OBJECTTYPE_DATA_POINT: + { + rtl::OUString aSeriesID = ObjectIdentifier::getParentParticleID( rObjectCID ); + + uno::Reference< XDataSeries > xSeries = + ChartModelHelper::getSeriesByIdentifier( aSeriesID, xModel ); + if(xSeries.is()) + { + sal_Int32 nIndex = aParticleID.toInt32(); + xObjectProperties = xSeries->getDataPointByIndex( nIndex ); + } + break; + } + case OBJECTTYPE_DATA_ERRORS: + break; + case OBJECTTYPE_DATA_ERRORS_X: + break; + case OBJECTTYPE_DATA_ERRORS_Y: + break; + case OBJECTTYPE_DATA_ERRORS_Z: + break; + case OBJECTTYPE_DATA_FUNCTION: + break; + case OBJECTTYPE_DATA_STOCK_RANGE: + break; + case OBJECTTYPE_DATA_STOCK_LOSS: + break; + case OBJECTTYPE_DATA_STOCK_GAIN: + break; + default: //OBJECTTYPE_UNKNOWN + break; + } + } + catch( uno::Exception& ex) + { + ex; + } + return xObjectProperties; +} + +wrapper::ItemConverter* createItemConverter( + const ::rtl::OUString & aObjectCID + , const uno::Reference< frame::XModel > & xModel + , SdrModel & rDrawModel + , NumberFormatterWrapper * pNumberFormatterWrapper = NULL + , ExplicitValueProvider * pExplicitValueProvider = NULL + ) +{ + wrapper::ItemConverter* pItemConverter=NULL; + + //------------------------------------------------------------- + //get type of selected object + ObjectType eObjectType = ObjectIdentifier::getObjectType( aObjectCID ); + if( OBJECTTYPE_UNKNOWN==eObjectType ) + { + DBG_ERROR("unknown ObjectType"); + return NULL; + } + //-- + rtl::OUString aParticleID = ObjectIdentifier::getParticleID( aObjectCID ); + bool bAffectsMultipleObjects = aParticleID.equals(C2U("ALLELEMENTS")); + //------------------------------------------------------------- + if( !bAffectsMultipleObjects ) + { + uno::Reference< beans::XPropertySet > xObjectProperties= getObjectPropertySet( aObjectCID, xModel ); + if(!xObjectProperties.is()) + return NULL; + //create itemconverter for a single object + switch(eObjectType) + { + case OBJECTTYPE_PAGE: + break; + case OBJECTTYPE_TITLE: + pItemConverter = new wrapper::TitleItemConverter( xObjectProperties, + rDrawModel.GetItemPool(), + rDrawModel ); + break; + case OBJECTTYPE_LEGEND: + break; + case OBJECTTYPE_LEGEND_ENTRY: + break; + case OBJECTTYPE_DIAGRAM: + break; + case OBJECTTYPE_DIAGRAM_WALL: + pItemConverter = new wrapper::GraphicPropertyItemConverter( + xObjectProperties, rDrawModel.GetItemPool(), + rDrawModel, + wrapper::GraphicPropertyItemConverter::LINE_AND_FILL_PROPERTIES ); + break; + case OBJECTTYPE_DIAGRAM_FLOOR: + break; + case OBJECTTYPE_AXIS: + { + uno::Reference< beans::XPropertySet > xDiaProp; + xDiaProp.set( ChartModelHelper::findDiagram( xModel ), uno::UNO_QUERY ); + + // the second property set contains the property CoordinateOrigin + // nOriginIndex is the index of the corresponding index of the + // origin (x=0, y=1, z=2) + + ExplicitScaleData aExplicitScale; + ExplicitIncrementData aExplicitIncrement; + double fExplicitOrigin; + if( pExplicitValueProvider ) + pExplicitValueProvider->getExplicitValuesForMeter( + uno::Reference< XMeter >( xObjectProperties, uno::UNO_QUERY ), + aExplicitScale, aExplicitIncrement, fExplicitOrigin ); + + pItemConverter = new wrapper::AxisItemConverter( + xObjectProperties, rDrawModel.GetItemPool(), + rDrawModel, + pNumberFormatterWrapper, + &aExplicitScale, &aExplicitIncrement, &fExplicitOrigin ); + } + break; + case OBJECTTYPE_AXIS_UNITLABEL: + break; + case OBJECTTYPE_GRID: + pItemConverter = new wrapper::GraphicPropertyItemConverter( + xObjectProperties, rDrawModel.GetItemPool(), + rDrawModel, + wrapper::GraphicPropertyItemConverter::LINE_PROPERTIES ); + break; + case OBJECTTYPE_DATA_LABELS: + case OBJECTTYPE_DATA_SERIES: + pItemConverter = new wrapper::DataPointItemConverter( + xObjectProperties, rDrawModel.GetItemPool(), rDrawModel, + pNumberFormatterWrapper ); + break; + case OBJECTTYPE_DATA_LABEL: + case OBJECTTYPE_DATA_POINT: + pItemConverter = new wrapper::DataPointItemConverter( + xObjectProperties, rDrawModel.GetItemPool(), rDrawModel, + pNumberFormatterWrapper ); + break; + case OBJECTTYPE_DATA_ERRORS: + break; + case OBJECTTYPE_DATA_ERRORS_X: + break; + case OBJECTTYPE_DATA_ERRORS_Y: + break; + case OBJECTTYPE_DATA_ERRORS_Z: + break; + case OBJECTTYPE_DATA_FUNCTION: + break; + case OBJECTTYPE_DATA_STOCK_RANGE: + break; + case OBJECTTYPE_DATA_STOCK_LOSS: + break; + case OBJECTTYPE_DATA_STOCK_GAIN: + break; + default: //OBJECTTYPE_UNKNOWN + break; + } + } + else + { + //create itemconverter for a all objects of given type + switch(eObjectType) + { + case OBJECTTYPE_TITLE: + break; + case OBJECTTYPE_AXIS: + pItemConverter = new wrapper::AllAxisItemConverter( xModel, rDrawModel.GetItemPool(), + rDrawModel ); + break; + case OBJECTTYPE_GRID: + pItemConverter = new wrapper::AllGridItemConverter( xModel, rDrawModel.GetItemPool(), + rDrawModel ); + break; + default: //for this type it is not supported to change all elements at once + break; + } + + } + return pItemConverter; +} + +rtl::OUString getTitleIDForSlotId( sal_Int32 nSlotID, const uno::Reference< XChartDocument > & xChartDocument ) +{ + rtl::OUString aRet; + switch(nSlotID) + { + //@todo get id for special objects + case SID_DIAGRAM_TITLE_MAIN: + aRet = TitleHelper::getIdentifierForTitle(TitleHelper::MAIN_TITLE); + break; + case SID_DIAGRAM_TITLE_SUB: + aRet = TitleHelper::getIdentifierForTitle(TitleHelper::SUB_TITLE); + break; + case SID_DIAGRAM_TITLE_X: + aRet = TitleHelper::getIdentifierForTitle(TitleHelper::X_AXIS_TITLE); + break; + case SID_DIAGRAM_TITLE_Y: + aRet = TitleHelper::getIdentifierForTitle(TitleHelper::Y_AXIS_TITLE); + break; + case SID_DIAGRAM_TITLE_Z: + aRet = TitleHelper::getIdentifierForTitle(TitleHelper::Z_AXIS_TITLE); + break; + case SID_DIAGRAM_TITLE_ALL: + break; + default: + break; + } + return aRet; +} + +rtl::OUString getAxisIDForSlotId( sal_Int32 nSlotID, const uno::Reference< XDiagram >& xDiagram ) +{ + if( (sal_Int32)SID_DIAGRAM_AXIS_ALL == nSlotID ) + return rtl::OUString(); + + sal_Int32 nDimensionIndex=0; + bool bMainAxis=true; + switch( nSlotID ) + { + case (sal_Int32)SID_DIAGRAM_AXIS_X: + nDimensionIndex=0; bMainAxis=true; break; + case (sal_Int32)SID_DIAGRAM_AXIS_Y: + nDimensionIndex=1; bMainAxis=true; break; + case (sal_Int32)SID_DIAGRAM_AXIS_Z: + nDimensionIndex=2; bMainAxis=true; break; + case (sal_Int32)SID_DIAGRAM_AXIS_A: + nDimensionIndex=0; bMainAxis=false; break; + case (sal_Int32)SID_DIAGRAM_AXIS_B: + nDimensionIndex=1; bMainAxis=false; break; + default: + break; + } + uno::Reference< XAxis > xAxis = MeterHelper::getAxis( nDimensionIndex, bMainAxis, xDiagram ); + + uno::Reference< XIdentifiable > xIdent( xAxis, uno::UNO_QUERY ); + if( xIdent.is() ) + return xIdent->getIdentifier(); + return rtl::OUString(); +} + +rtl::OUString getGridIDForSlotId( sal_Int32 nSlotID, const uno::Reference< XDiagram >& xDiagram ) +{ + if( (sal_Int32)SID_DIAGRAM_GRID_ALL == nSlotID ) + return rtl::OUString(); + + sal_Int32 nDimensionIndex=0; + bool bMainGrid=true; + switch( nSlotID ) + { + case (sal_Int32)SID_DIAGRAM_GRID_X_MAIN: + nDimensionIndex=0; bMainGrid=true; break; + case (sal_Int32)SID_DIAGRAM_GRID_X_HELP: + nDimensionIndex=0; bMainGrid=false; break; + case (sal_Int32)SID_DIAGRAM_GRID_Y_MAIN: + nDimensionIndex=1; bMainGrid=true; break; + case (sal_Int32)SID_DIAGRAM_GRID_Y_HELP: + nDimensionIndex=1; bMainGrid=false; break; + case (sal_Int32)SID_DIAGRAM_GRID_Z_MAIN: + nDimensionIndex=2; bMainGrid=true; break; + case (sal_Int32)SID_DIAGRAM_GRID_Z_HELP: + nDimensionIndex=2; bMainGrid=false; break; + default: + break; + } + uno::Reference< XGrid > xGrid = MeterHelper::getGrid( nDimensionIndex, bMainGrid, xDiagram ); + + uno::Reference< XIdentifiable > xIdent( xGrid, uno::UNO_QUERY ); + if( xIdent.is() ) + return xIdent->getIdentifier(); + return rtl::OUString(); +} + +rtl::OUString getObjectCIDForSlotId( sal_Int32 nSlotID, const uno::Reference< XChartDocument > & xChartDocument ) +{ + ObjectType eObjectType; + rtl::OUString aParticleID; + + if( (sal_Int32)SID_DIAGRAM_TITLE_MAIN == nSlotID + || (sal_Int32)SID_DIAGRAM_TITLE_SUB == nSlotID + || (sal_Int32)SID_DIAGRAM_TITLE_X == nSlotID + || (sal_Int32)SID_DIAGRAM_TITLE_Y == nSlotID + || (sal_Int32)SID_DIAGRAM_TITLE_Z == nSlotID + || (sal_Int32)SID_DIAGRAM_TITLE_ALL == nSlotID ) + { + eObjectType = OBJECTTYPE_TITLE; + aParticleID = getTitleIDForSlotId( nSlotID, xChartDocument ); + } + else if( (sal_Int32)SID_DIAGRAM_AXIS_X == nSlotID + || (sal_Int32)SID_DIAGRAM_AXIS_Y == nSlotID + || (sal_Int32)SID_DIAGRAM_AXIS_Z == nSlotID + || (sal_Int32)SID_DIAGRAM_AXIS_A == nSlotID //secondary x axis + || (sal_Int32)SID_DIAGRAM_AXIS_B == nSlotID + || (sal_Int32)SID_DIAGRAM_AXIS_ALL == nSlotID ) + { + eObjectType = OBJECTTYPE_AXIS; + aParticleID = getAxisIDForSlotId( nSlotID, xChartDocument->getDiagram() ); + } + else if( (sal_Int32)SID_DIAGRAM_GRID_X_MAIN == nSlotID + || (sal_Int32)SID_DIAGRAM_GRID_Y_MAIN == nSlotID + || (sal_Int32)SID_DIAGRAM_GRID_Z_MAIN == nSlotID + || (sal_Int32)SID_DIAGRAM_GRID_X_HELP == nSlotID + || (sal_Int32)SID_DIAGRAM_GRID_Y_HELP == nSlotID + || (sal_Int32)SID_DIAGRAM_GRID_Z_HELP == nSlotID + || (sal_Int32)SID_DIAGRAM_GRID_ALL == nSlotID ) + { + eObjectType = OBJECTTYPE_GRID; + aParticleID = getGridIDForSlotId( nSlotID, xChartDocument->getDiagram() ); + } + else if( (sal_Int32)SID_LEGEND == nSlotID ) + { + eObjectType = OBJECTTYPE_LEGEND; + //@todo set particular aParticleID if we have more than one legend + } + else if( (sal_Int32)SID_DIAGRAM_WALL == nSlotID ) + { + //OBJECTTYPE_DIAGRAM; + eObjectType = OBJECTTYPE_DIAGRAM_WALL; + //@todo set particular aParticleID if we have more than one diagram + } + else if( (sal_Int32)SID_DIAGRAM_FLOOR == nSlotID ) + { + eObjectType = OBJECTTYPE_DIAGRAM_FLOOR; + //@todo set particular aParticleID if we have more than one diagram + } + else if( (sal_Int32)SID_DIAGRAM_AREA == nSlotID ) + { + eObjectType = OBJECTTYPE_PAGE; + } + + if( (sal_Int32)SID_DIAGRAM_TITLE_ALL == nSlotID + || (sal_Int32)SID_DIAGRAM_AXIS_ALL == nSlotID + || (sal_Int32)SID_DIAGRAM_GRID_ALL == nSlotID ) + { + aParticleID = C2U("ALLELEMENTS"); + } + return ObjectIdentifier::createClassifiedIdentifier( + eObjectType, aParticleID ); +} + +} +// anonymous namespace + +void SAL_CALL ChartController::executeDispatch_FormatObject(sal_Int32 nSlotID) +{ + uno::Reference< XChartDocument > xChartDocument( m_aModel->getModel(), uno::UNO_QUERY ); + rtl::OUString rObjectCID = getObjectCIDForSlotId( nSlotID, xChartDocument ); + executeDlg_ObjectProperties( rObjectCID ); +} + +void SAL_CALL ChartController::executeDispatch_ObjectProperties() +{ + executeDlg_ObjectProperties( m_aSelectedObjectCID ); +} + +void SAL_CALL ChartController::executeDlg_ObjectProperties( const ::rtl::OUString& rObjectCID ) +{ + bool bChanged = false; + if( !rObjectCID.getLength() ) + { + //DBG_ERROR("empty ObjectID"); + return; + } + try + { + //------------------------------------------------------------- + //get type of selected object + ObjectType eObjectType = ObjectIdentifier::getObjectType( rObjectCID ); + if( OBJECTTYPE_UNKNOWN==eObjectType ) + { + //DBG_ERROR("unknown ObjectType"); + return; + } + rtl::OUString aParticleID = ObjectIdentifier::getParticleID( rObjectCID ); + bool bAffectsMultipleObjects = aParticleID.equals(C2U("ALLELEMENTS")); + //------------------------------------------------------------- + //convert properties to ItemSet + ::std::auto_ptr< wrapper::ItemConverter > apItemConverter( + createItemConverter( rObjectCID, m_aModel->getModel(), + m_pDrawModelWrapper->getSdrModel(), + m_pNumberFormatterWrapper, + m_pChartView )); + if(!apItemConverter.get()) + return; + SfxItemSet aItemSet = apItemConverter->CreateEmptyItemSet(); + apItemConverter->FillItemSet( aItemSet ); + + //------------------------------------------------------------- + //prepare dialog + OldModelWrapper aOldChartModelWrapper = OldModelWrapper(); + Window* pParent( NULL ); + ViewElementListProvider aViewElementListProvider( m_pDrawModelWrapper, m_pNumberFormatterWrapper ); + Graphic aSymbolGraphic; + + SchAttribTabDlg aDlg( pParent + , eObjectType, &aItemSet + , &aViewElementListProvider, &aOldChartModelWrapper + , bAffectsMultipleObjects ); + //, pSymbolAttr, aSymbolGraphic ); + + //------------------------------------------------------------- + //open the dialog + if( aDlg.Execute() == RET_OK ) + { + const SfxItemSet* pOutItemSet = aDlg.GetOutputItemSet(); + if(pOutItemSet) + { + bChanged = apItemConverter->ApplyItemSet( *pOutItemSet );//model should be changed now + } + } + /* + pDlg = new SchAttribTabDlg(NULL, eType, &aRowAttr,pDoc->GetObjectShell() ,pDoc + , 0, pDoc->ChartStyle(),&aSymbolAttr + ,GenSymbolGraphic(pDataRow->GetRow())); + + SfxItemSet aSymbolAttr(aPointAttr); + if(pDoc->HasSymbols(pDataPoint->GetRow())) + { + pDoc->GenerateSymbolAttr(aSymbolAttr,pDataPoint->GetRow()); + pDlg = new SchAttribTabDlg(NULL, ATTR_DATA_POINT, &aPointAttr, pDoc->GetObjectShell(), pDoc + , 0, pDoc->ChartStyle(),&aSymbolAttr + ,GenSymbolGraphic(pDataPoint->GetRow(),pDataPoint->GetCol())); + } + else + { + pDlg = new SchAttribTabDlg(NULL, ATTR_DATA_POINT, &aPointAttr, pDoc->GetObjectShell(), pDoc + , 0, pDoc->ChartStyle()); + } + */ + } + catch( util::CloseVetoException& ) + { + } + catch( uno::RuntimeException& ) + { + } + + try + { + //make sure that all objects using m_pDrawModelWrapper or m_pChartView are already deleted + if(bChanged) + impl_rebuildView(); + } + catch( uno::RuntimeException& e) + { + e; + } +} + +void SAL_CALL ChartController::executeDispatch_ObjectToDefault() +{ + if( !m_aSelectedObjectCID.getLength() ) + { + DBG_ERROR("nothing is selected"); + return; + } + + try + { + //------------------------------------------------------------- + //get type of selected object + ObjectType eObjectType = ObjectIdentifier::getObjectType( m_aSelectedObjectCID ); + if( OBJECTTYPE_UNKNOWN==eObjectType ) + { + DBG_ERROR("unknown ObjectType"); + return; + } + //------------------------------------------------------------- + //get properties of selected object + uno::Reference< beans::XPropertySet > xObjectProperties = NULL; + xObjectProperties = getObjectPropertySet( m_aSelectedObjectCID, getModel() ); + if(!xObjectProperties.is()) + return; + + uno::Sequence< beans::Property > aProps( xObjectProperties->getPropertySetInfo()->getProperties() ); + uno::Reference< beans::XPropertyState > xState( xObjectProperties, uno::UNO_QUERY ); + + for( sal_Int32 i = 0; i < aProps.getLength(); ++i ) + { + if( aProps[i].Attributes & beans::PropertyAttribute::MAYBEDEFAULT ) + xState->setPropertyToDefault( aProps[i].Name ); + } + + impl_rebuildView(); + } + catch( uno::Exception& ) + { + DBG_ERROR( "Exception caught" ); + } +} + +//............................................................................. +} //namespace chart +//............................................................................. diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx new file mode 100644 index 000000000..8b1720b9a --- /dev/null +++ b/chart2/source/controller/main/ChartController_Window.cxx @@ -0,0 +1,659 @@ +/************************************************************************* + * + * $RCSfile: ChartController_Window.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:28 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "ChartController.hxx" +#include "SelectionHelper.hxx" +#include "ChartWindow.hxx" +#include "chartview/ChartView.hxx" +#include "Chart.hrc" +#include "ResId.hxx" +// header for class PopupMenu +#ifndef _SV_MENU_HXX +#include <vcl/menu.hxx> +#endif +#include "macros.hxx" +#include "SchSlotIds.hxx" +#ifndef _SVX_SVXIDS_HRC +#include <svx/svxids.hrc> +#endif + +#define DRGPIX 2 // Drag MinMove in Pixel + +//............................................................................. +namespace chart +{ +//............................................................................. + +using namespace ::com::sun::star; +//using namespace ::drafts::com::sun::star::chart2; + +//----------------------------------------------------------------- +// awt::XWindow +//----------------------------------------------------------------- + void SAL_CALL ChartController +::setPosSize( sal_Int32 X, sal_Int32 Y + , sal_Int32 Width, sal_Int32 Height, sal_Int16 Flags ) + throw (uno::RuntimeException) +{ + //@todo + uno::Reference<awt::XWindow> xWindow = m_xViewWindow; + + if(xWindow.is()) + xWindow->setPosSize( X, Y, Width, Height, Flags ); +} + + awt::Rectangle SAL_CALL ChartController +::getPosSize() + throw (uno::RuntimeException) +{ + //@todo + uno::Reference<awt::XWindow> xWindow = m_xViewWindow; + + if(xWindow.is()) + return xWindow->getPosSize(); + return awt::Rectangle(0,0,0,0); +} + + void SAL_CALL ChartController +::setVisible( sal_Bool Visible ) + throw (uno::RuntimeException) +{ + //@todo + uno::Reference<awt::XWindow> xWindow = m_xViewWindow; + + if(xWindow.is()) + xWindow->setVisible( Visible ); +} + + void SAL_CALL ChartController +::setEnable( sal_Bool Enable ) + throw (uno::RuntimeException) +{ + //@todo + uno::Reference<awt::XWindow> xWindow = m_xViewWindow; + + if(xWindow.is()) + xWindow->setEnable( Enable ); +} + + void SAL_CALL ChartController +::setFocus() throw (uno::RuntimeException) +{ + //@todo + uno::Reference<awt::XWindow> xWindow = m_xViewWindow; + + if(xWindow.is()) + xWindow->setFocus(); +} + + void SAL_CALL ChartController +::addWindowListener( const uno::Reference< + awt::XWindowListener >& xListener ) + throw (uno::RuntimeException) +{ + //@todo + uno::Reference<awt::XWindow> xWindow = m_xViewWindow; + + if(xWindow.is()) + xWindow->addWindowListener( xListener ); +} + + void SAL_CALL ChartController +::removeWindowListener( const uno::Reference< + awt::XWindowListener >& xListener ) + throw (uno::RuntimeException) +{ + //@todo + uno::Reference<awt::XWindow> xWindow = m_xViewWindow; + + if(xWindow.is()) + xWindow->removeWindowListener( xListener ); +} + + void SAL_CALL ChartController +::addFocusListener( const uno::Reference< + awt::XFocusListener >& xListener ) + throw (uno::RuntimeException) +{ + //@todo + uno::Reference<awt::XWindow> xWindow = m_xViewWindow; + + if(xWindow.is()) + xWindow->addFocusListener( xListener ); +} + + void SAL_CALL ChartController +::removeFocusListener( const uno::Reference< + awt::XFocusListener >& xListener ) + throw (uno::RuntimeException) +{ + //@todo + uno::Reference<awt::XWindow> xWindow = m_xViewWindow; + + if(xWindow.is()) + xWindow->removeFocusListener( xListener ); +} + + void SAL_CALL ChartController +::addKeyListener( const uno::Reference< + awt::XKeyListener >& xListener ) + throw (uno::RuntimeException) +{ + //@todo + uno::Reference<awt::XWindow> xWindow = m_xViewWindow; + + if(xWindow.is()) + xWindow->addKeyListener( xListener ); +} + + void SAL_CALL ChartController +::removeKeyListener( const uno::Reference< + awt::XKeyListener >& xListener ) + throw (uno::RuntimeException) +{ + //@todo + uno::Reference<awt::XWindow> xWindow = m_xViewWindow; + + if(xWindow.is()) + xWindow->removeKeyListener( xListener ); +} + + void SAL_CALL ChartController +::addMouseListener( const uno::Reference< + awt::XMouseListener >& xListener ) + throw (uno::RuntimeException) +{ + //@todo + uno::Reference<awt::XWindow> xWindow = m_xViewWindow; + + if(xWindow.is()) + xWindow->addMouseListener( xListener ); +} + + void SAL_CALL ChartController +::removeMouseListener( const uno::Reference< + awt::XMouseListener >& xListener ) + throw (uno::RuntimeException) +{ + //@todo + uno::Reference<awt::XWindow> xWindow = m_xViewWindow; + + if(xWindow.is()) + xWindow->removeMouseListener( xListener ); +} + + void SAL_CALL ChartController +::addMouseMotionListener( const uno::Reference< + awt::XMouseMotionListener >& xListener ) + throw (uno::RuntimeException) +{ + //@todo + uno::Reference<awt::XWindow> xWindow = m_xViewWindow; + + if(xWindow.is()) + xWindow->addMouseMotionListener( xListener ); +} + + void SAL_CALL ChartController +::removeMouseMotionListener( const uno::Reference< + awt::XMouseMotionListener >& xListener ) + throw (uno::RuntimeException) +{ + //@todo + uno::Reference<awt::XWindow> xWindow = m_xViewWindow; + + if(xWindow.is()) + xWindow->removeMouseMotionListener( xListener ); +} + + void SAL_CALL ChartController +::addPaintListener( const uno::Reference< + awt::XPaintListener >& xListener ) + throw (uno::RuntimeException) +{ + //@todo + uno::Reference<awt::XWindow> xWindow = m_xViewWindow; + + if(xWindow.is()) + xWindow->addPaintListener( xListener ); +} + + void SAL_CALL ChartController +::removePaintListener( const uno::Reference< + awt::XPaintListener >& xListener ) + throw (uno::RuntimeException) +{ + //@todo + uno::Reference<awt::XWindow> xWindow = m_xViewWindow; + + if(xWindow.is()) + xWindow->removePaintListener( xListener ); +} + +//----------------------------------------------------------------- +// impl vcl window controller methods +//----------------------------------------------------------------- +void ChartController::execute_Paint( const Rectangle& rRect ) +{ + //Window::Paint(rRect); + //??? @todo initialize doc if not ready or update view state if not ready and invalidate all + + if(m_bViewDirty) + { + impl_rebuildView(); + return; + } + + Window* pWindow = m_pChartWindow; + DrawViewWrapper* pDrawViewWrapper = m_pDrawViewWrapper; + pDrawViewWrapper->InitRedraw(pWindow, Region(rRect) ); +} + +bool isDoubleClick( const MouseEvent& rMEvt ) +{ + return rMEvt.GetClicks() == 2 && rMEvt.IsLeft() && + !rMEvt.IsMod1() && !rMEvt.IsMod2() && !rMEvt.IsShift(); +} + +void ChartController::execute_MouseButtonDown( const MouseEvent& rMEvt ) +{ + Window* pWindow = m_pChartWindow; + DrawViewWrapper* pDrawViewWrapper = m_pDrawViewWrapper; + + Point aMPos = pWindow->PixelToLogic(rMEvt.GetPosPixel()); + + if ( MOUSE_LEFT == rMEvt.GetButtons() ) + { + pWindow->GrabFocus(); + pWindow->CaptureMouse(); + } + + //old chart: + //ForcePointer(&rMEvt); //shouldn't be necessary if pointer was set correct in mousemove .... + //SuspendSelectionChangeBroadcasting aSelectionSuspender( pViewShell ); + //pViewShell->SetMousePos( aMPos ); + + //??? select Fu ( SchFuDraw SchFuText SchFuSelection ) and call MouseButtonDown there + + //abort running action + if( pDrawViewWrapper->IsAction() ) + { + if( rMEvt.IsRight() ) + pDrawViewWrapper->BckAction(); + return; + } + + //selection + if( !isDoubleClick(rMEvt) && !rMEvt.IsRight() ) //do not change selection if double click or right click + { + pDrawViewWrapper->UnmarkAll(); + SdrObject* pNewObj = SelectionHelper::getObjectToSelect( + aMPos, m_aSelectedObjectCID + , *pDrawViewWrapper ); + if(!pNewObj) + return; + SelectionHelper aSelectionHelper( pNewObj, m_aSelectedObjectCID ); + SdrObject* pMarkObj = aSelectionHelper.getObjectToMark(); + pDrawViewWrapper->setMarkHandleProvider(&aSelectionHelper); + pDrawViewWrapper->MarkObject(pMarkObj); + pDrawViewWrapper->setMarkHandleProvider(NULL); + } + + //dragging + if(false) + { + SdrDragMode eDragMode(SDRDRAG_MOVE);//SDRDRAG_CREATE,SDRDRAG_MOVE,SDRDRAG_RESIZE,SDRDRAG_ROTATE,SDRDRAG_MIRROR,SDRDRAG_SHEAR,SDRDRAG_CROOK + + pDrawViewWrapper->SetDragMode(eDragMode); + SdrHdl* pHdl = NULL;//pDrawViewWrapper->PickHandle( aMPos, *pWindow ); + USHORT nDrgLog = (USHORT)pWindow->PixelToLogic(Size(DRGPIX,0)).Width(); + pDrawViewWrapper->BegDragObj(aMPos, NULL, pHdl, nDrgLog); + } + + //pDrawViewWrapper->UnmarkAll(); + //pDrawViewWrapper->GetPageViewPvNum(0)->GetEnteredLevel() + //pDrawViewWrapper->IsMarkedHit(aMPos, nHitLog) + //pDrawViewWrapper->HasMarkedObj(); + //pDrawViewWrapper->MarkLogicalGroup(); + //pDrawViewWrapper->EnterMarkedGroup(); + //pDrawViewWrapper->LeaveOneGroup(); + + //pDrawViewWrapper->MovAction( pWindow->PixelToLogic( rMEvt.GetPosPixel() ) ); + //pDrawViewWrapper->EndAction(); + + //pDrawViewWrapper->IsDragObj(); + //pDrawViewWrapper->EndDragObj(rMEvt.IsMod1()); + //pDrawViewWrapper->SetDragWithCopy( rMEvt.IsMod1()); + //pDrawViewWrapper->GetDragMode() + //pDrawViewWrapper->SetEditMode(FALSE); + + //pDrawViewWrapper->GetPageView()->DragPoly() ; + + //pView->BeginDrag(pWindow, aMPos); + + + //if(!pFunction) //if no Fu active/set ... + // Window::MouseButtonDown(rMEvt); +} + +// Timer-Handler fuer Drag&Drop +/* +IMPL_LINK( ChartWindow, DragHdl, Timer *, pTimer ) +{ + *//* + USHORT nHitLog = (USHORT)pWindow->PixelToLogic(Size(HITPIX,0)).Width(); + SdrHdl* pHdl = pView->HitHandle(aMPos, *pWindow); + + if (pHdl==NULL && pView->IsMarkedHit(aMPos, nHitLog)) + { + pWindow->ReleaseMouse(); + m_bIsInDragMode = TRUE; + + pView->BeginDrag(pWindow, aMPos); + } + *//* + this->ReleaseMouse(); + return 0; +} +*/ + +void ChartController::execute_MouseMove( const MouseEvent& rMEvt ) +{ + Window* pWindow = m_pChartWindow; + DrawViewWrapper* pDrawViewWrapper = m_pDrawViewWrapper; + if(!pDrawViewWrapper) + return; + + //ForcePointer(&rMEvt); should be sufficient and correct to do it at the end + //??? select Fu ( SchFuDraw SchFuText SchFuSelection ) and call MouseMove there + +/* + if(m_aDragTimer.IsActive()) + { + m_aDragTimer.Stop(); + m_bIsInDragMode = FALSE; + } +*/ + + if(pDrawViewWrapper->IsAction()) + pDrawViewWrapper->MovAction( pWindow->PixelToLogic( rMEvt.GetPosPixel() ) ); + + //text: pView->MouseMove(rMEvt, pWindow) // Event von der SdrView ausgewertet + //?? pDrawViewWrapper->GetPageView()->DragPoly(); + + //if(!pFunction) //if no Fu active/set ... + // Window::MouseMove(rMEvt); + + //@todo ForcePointer(&rMEvt); +} +void ChartController::execute_Tracking( const TrackingEvent& rTEvt ) +{ +} +void ChartController::execute_MouseButtonUp( const MouseEvent& rMEvt ) +{ + Window* pWindow = m_pChartWindow; + DrawViewWrapper* pDrawViewWrapper = m_pDrawViewWrapper; + + //??? select Fu ( SchFuDraw SchFuText SchFuSelection ) and call MouseButtonUp there + //---------------------------- + /* + uno::Reference< uno::XInterface > xI; + uno::Reference< drawing::XShape > xShape; + uno::Reference< beans::XPropertySet > xShapeProps; + + if(s_pObj) + { + xI = s_pObj->getUnoShape(); + xShape = uno::Reference<drawing::XShape>( xI, uno::UNO_QUERY ); + xShapeProps = uno::Reference<beans::XPropertySet>( xI, uno::UNO_QUERY ); + } + + awt::Point aOldPoint; + awt::Point aNewPoint; + awt::Size aOldSize; + awt::Size aNewSize; + drawing::HomogenMatrix3 aOldMatrix; + drawing::HomogenMatrix3 aNewMatrix; + + if(xShape.is()) + { + aOldPoint = xShape->getPosition(); + aOldSize = xShape->getSize(); + } + if(xShapeProps.is()) + { + uno::Any aVal = xShapeProps->getPropertyValue( + ::rtl::OUString::createFromAscii("Transformation") ); + aVal >>= aOldMatrix; + } + */ + //---------------------------- + + if(!pDrawViewWrapper) + return; + if(pDrawViewWrapper->IsDragObj()) + { + if( pDrawViewWrapper->EndDragObj(rMEvt.IsMod1()) ) + { + + /* + if(xShape.is()) + { + aNewPoint = xShape->getPosition(); + aNewSize = xShape->getSize(); + } + if(xShapeProps.is()) + { + uno::Any aVal = xShapeProps->getPropertyValue( + ::rtl::OUString::createFromAscii("Transformation") ); + aVal >>= aNewMatrix; + } + */ + + pDrawViewWrapper->SetDragWithCopy( rMEvt.IsMod1()); + } + } + + pWindow->ReleaseMouse(); + + //if(pDrawViewWrapper->IsAction()) + // pDrawViewWrapper->EndAction(); + + /* SchFuText: + SfxBindings& rBindings = pViewShell->GetViewFrame()->GetBindings(); + + rBindings.Invalidate(SID_CUT); + rBindings.Invalidate(SID_COPY); + + if (pView->MouseButtonUp(rMEvt, pWindow)) + return TRUE; // Event von der SdrView ausgewertet + + */ + if( isDoubleClick(rMEvt) ) + execute_DoubleClick(); + + //if(!pFunction) //if no Fu active/set ... + // Window::MouseButtonUp(rMEvt); + + //@todo ForcePointer(&rMEvt); + //pWindow->ReleaseMouse(); +} + +void ChartController::execute_DoubleClick() +{ + executeDispatch_ObjectProperties(); +} + +void ChartController::execute_Resize() +{ + m_bViewDirty = true; + m_pChartWindow->Invalidate(); +} +void ChartController::execute_Activate() +{ + ///// pDrawViewWrapper->SetEditMode(TRUE); +} +void ChartController::execute_Deactivate() +{ + /* + m_aDragTimer.Stop(); + + pDrawViewWrapper->SetEditMode(FALSE); + + this->ReleaseMouse(); + */ +} +void ChartController::execute_GetFocus() +{ +} +void ChartController::execute_LoseFocus() +{ + //this->ReleaseMouse(); +} +util::URL createDispatchURL( USHORT nSID ) +{ + util::URL aRet; + aRet.Protocol = C2U("slot:"); + aRet.Path = rtl::OUString::valueOf((sal_Int32)nSID); + return aRet; +} +void ChartController::execute_Command( const CommandEvent& rCEvt ) +{ + // pop-up menu + if (rCEvt.GetCommand() == COMMAND_CONTEXTMENU && !m_pDrawViewWrapper->IsAction()) + { + m_pChartWindow->ReleaseMouse(); + + BOOL bAxisChart = true;//@todo get from somewhere + BOOL bIs3DChart = false;//@todo get from somewhere + BOOL bHasOwnData = false; + BOOL bHasSomethingToPaste = true; + + USHORT nRId = 0; + if( !m_aSelectedObjectCID.getLength() ) + nRId = RID_FORMAT_POPUP; + else + nRId = RID_OBJECT_POPUP; + + PopupMenu aMenu=PopupMenu ( SchResId( nRId ) ); + if(!bIs3DChart) + { + aMenu.RemoveItem( aMenu.GetItemPos( SID_DIAGRAM_FLOOR ) ); + aMenu.RemoveItem( aMenu.GetItemPos( SID_3D_WIN ) ); + } + if(!bAxisChart) + { + aMenu.RemoveItem( aMenu.GetItemPos( SID_INSERT_AXIS ) ); + aMenu.RemoveItem( aMenu.GetItemPos( SID_INSERT_GRIDS ) ); + aMenu.RemoveItem( aMenu.GetItemPos( SID_DIAGRAM_WALL ) ); + aMenu.RemoveItem( aMenu.GetItemPos( SID_DIAGRAM_FLOOR ) ); + } + if(!bHasOwnData) + { + aMenu.RemoveItem( aMenu.GetItemPos( SID_DIAGRAM_DATA ) ); + } + if( !bHasSomethingToPaste ) + { + aMenu.RemoveItem( aMenu.GetItemPos( SID_PASTE ) ); + } + + USHORT nId = aMenu.Execute( m_pChartWindow, rCEvt.GetMousePosPixel() ); + util::URL aURL( createDispatchURL( nId ) ); + uno::Sequence< beans::PropertyValue > aArgs; + this->dispatch( aURL, aArgs ); + } +} +//----------------------------------------------------------------- +// XSelectionSupplier (optional interface) +//----------------------------------------------------------------- + sal_Bool SAL_CALL ChartController +::select( const uno::Any& rSelection ) + throw( lang::IllegalArgumentException ) +{ + //@todo + return sal_False; +} + + uno::Any SAL_CALL ChartController +::getSelection() throw(uno::RuntimeException) +{ + //@todo + return uno::Any(); +} + + void SAL_CALL ChartController +::addSelectionChangeListener( const uno::Reference< + view::XSelectionChangeListener > & xListener ) + throw(uno::RuntimeException) +{ + //@todo +} + + void SAL_CALL ChartController +::removeSelectionChangeListener( const uno::Reference< + view::XSelectionChangeListener > & xListener ) + throw(uno::RuntimeException) +{ + //@todo +} + +//............................................................................. +} //namespace chart +//............................................................................. diff --git a/chart2/source/controller/main/ChartFrameloader.cxx b/chart2/source/controller/main/ChartFrameloader.cxx new file mode 100644 index 000000000..4c08da71b --- /dev/null +++ b/chart2/source/controller/main/ChartFrameloader.cxx @@ -0,0 +1,211 @@ +/************************************************************************* + * + * $RCSfile: ChartFrameloader.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:28 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "ChartFrameloader.hxx" +#include "servicenames.hxx" +#include "MediaDescriptorHelper.hxx" + +//............................................................................. +namespace chart +{ +//............................................................................. + +using namespace ::com::sun::star; + +ChartFrameLoader::ChartFrameLoader( + uno::Reference<uno::XComponentContext> const & xContext) + : m_bCancelRequired( sal_False ) +{ + m_xCC = xContext; + m_oCancelFinished.reset(); +} + +ChartFrameLoader::~ChartFrameLoader() +{ +} + + sal_Bool ChartFrameLoader +::impl_checkCancel() +{ + if(m_bCancelRequired) + { + m_oCancelFinished.set(); + return sal_True; + } + return sal_False; +} + +//----------------------------------------------------------------- +// lang::XServiceInfo +//----------------------------------------------------------------- + +APPHELPER_XSERVICEINFO_IMPL(ChartFrameLoader,CHART_FRAMELOADER_SERVICE_IMPLEMENTATION_NAME) + + uno::Sequence< rtl::OUString > ChartFrameLoader +::getSupportedServiceNames_Static() +{ + uno::Sequence< rtl::OUString > aSNS( 1 ); + aSNS.getArray()[ 0 ] = CHART_FRAMELOADER_SERVICE_NAME; + return aSNS; +} + +//----------------------------------------------------------------- +// frame::XFrameLoader +//----------------------------------------------------------------- + + sal_Bool SAL_CALL ChartFrameLoader +::load( const uno::Sequence< beans::PropertyValue >& rMediaDescriptor + , const uno::Reference<frame::XFrame >& xFrame ) + throw (uno::RuntimeException) +{ + //@todo ? need to add as terminate listener to desktop? + + //create mediadescriptor to be attached to the model + apphelper::MediaDescriptorHelper aMediaDescriptorHelper(rMediaDescriptor); + + //prepare data for model ... missing interface XPersist or XLoadable at Model.... + { + //@todo ... + } + + /* + static uno::Reference< frame::XFrame > xTestFrame = uno::Reference< frame::XFrame >( + m_xCC->getServiceManager()->createInstanceWithContext( + ::rtl::OUString::createFromAscii("com.sun.star.frame.Frame"), m_xCC ) + , uno::UNO_QUERY ); + + static uno::Reference< awt::XWindow > xTestWindow = uno::Reference< awt::XWindow >( + m_xCC->getServiceManager()->createInstanceWithContext( + ::rtl::OUString::createFromAscii("com.sun.star.awt.Window"), m_xCC ) + , uno::UNO_QUERY ); + xTestFrame->initialize(xTestWindow); + */ + + //create and initialize the model + uno::Reference< frame::XModel > xModel = NULL; + { + //@todo?? load mechanism to cancel during loading of document + xModel = uno::Reference< frame::XModel >( + m_xCC->getServiceManager()->createInstanceWithContext( + CHART_MODEL_SERVICE_IMPLEMENTATION_NAME, m_xCC ) + , uno::UNO_QUERY ); + + if( impl_checkCancel() ) + return sal_False; + + //@todo load data to model ... missing interface XPersist or XLoadable at Model.... + xModel->attachResource( aMediaDescriptorHelper.URL.Complete, aMediaDescriptorHelper.getReducedForModel() ); + } + + //create the component context for the controller + uno::Reference< uno::XComponentContext > xComponentContext_ForController = NULL; + { + xComponentContext_ForController = uno::Reference< uno::XComponentContext >( + m_xCC->getServiceManager()->createInstanceWithContext( + ::rtl::OUString::createFromAscii("com.sun.star.uno.ComponentContext"), m_xCC ) + , uno::UNO_QUERY ); + + //@todo + if( impl_checkCancel() ) + return sal_False; + } + + //create the controller(+XWindow) + uno::Reference< frame::XController > xController = NULL; + uno::Reference< awt::XWindow > xComponentWindow = NULL; + { + xController = uno::Reference< frame::XController >( + m_xCC->getServiceManager()->createInstanceWithContext( + CHART_CONTROLLER_SERVICE_IMPLEMENTATION_NAME,m_xCC ) //, xComponentContext_ForController ) + , uno::UNO_QUERY ); + + //!!!it is a special characteristic of the example application + //that the controller simultaniously provides the XWindow controller functionality + xComponentWindow = + uno::Reference< awt::XWindow >( xController, uno::UNO_QUERY ); + + if( impl_checkCancel() ) + return sal_False; + } + + //connect frame, controller and model one to each other: + if(xController.is()&&xModel.is()) + { + xController->attachFrame(xFrame); + xController->attachModel(xModel); + xModel->connectController(xController); + if(xFrame.is()) + xFrame->setComponent(xComponentWindow,xController); + } + return sal_True; +} + + void SAL_CALL ChartFrameLoader +::cancel() throw (uno::RuntimeException) +{ + m_oCancelFinished.reset(); + m_bCancelRequired = sal_True; + m_oCancelFinished.wait(); + m_bCancelRequired = sal_False; +} + +//............................................................................. +} //namespace chart +//............................................................................. diff --git a/chart2/source/controller/main/ChartFrameloader.hxx b/chart2/source/controller/main/ChartFrameloader.hxx new file mode 100644 index 000000000..82557febc --- /dev/null +++ b/chart2/source/controller/main/ChartFrameloader.hxx @@ -0,0 +1,136 @@ +/************************************************************************* + * + * $RCSfile: ChartFrameloader.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:28 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef _CHARTFRAMELOADER_HXX +#define _CHARTFRAMELOADER_HXX + +#include "ServiceMacros.hxx" + +#ifndef _OSL_CONDITN_HXX_ +#include <osl/conditn.hxx> +#endif +#ifndef _COM_SUN_STAR_FRAME_XSYNCHRONOUSFRAMELOADER_HPP_ +#include <com/sun/star/frame/XSynchronousFrameLoader.hpp> +#endif +#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_ +#include <com/sun/star/lang/XServiceInfo.hpp> +#endif +#ifndef _COM_SUN_STAR_UNO_XCOMPONENTCONTEXT_HPP_ +#include <com/sun/star/uno/XComponentContext.hpp> +#endif +#ifndef _CPPUHELPER_IMPLBASE2_HXX_ +#include <cppuhelper/implbase2.hxx> +#endif + +//............................................................................. +namespace chart +{ +//............................................................................. + +class ChartFrameLoader : public ::cppu::WeakImplHelper2< + ::com::sun::star::frame::XSynchronousFrameLoader + , ::com::sun::star::lang::XServiceInfo + //comprehends XComponent (required interface) + // ,public ::com::sun::star::uno::XWeak // implemented by WeakImplHelper(optional interface) + // ,public ::com::sun::star::uno::XInterface // implemented by WeakImplHelper(optional interface) + // ,public ::com::sun::star::lang::XTypeProvider // implemented by WeakImplHelper + > +{ +private: + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext> m_xCC; + sal_Bool m_bCancelRequired; + ::osl::Condition m_oCancelFinished; + +private: + sal_Bool impl_checkCancel(); + //no default constructor + ChartFrameLoader(){}; +public: + ChartFrameLoader(::com::sun::star::uno::Reference< + ::com::sun::star::uno::XComponentContext > const & xContext); + virtual ~ChartFrameLoader(); + + //----------------------------------------------------------------- + // ::com::sun::star::lang::XServiceInfo + //----------------------------------------------------------------- + + APPHELPER_XSERVICEINFO_DECL() + APPHELPER_SERVICE_FACTORY_HELPER(ChartFrameLoader) + + //----------------------------------------------------------------- + // ::com::sun::star::frame::XFrameLoader + //----------------------------------------------------------------- + + virtual sal_Bool SAL_CALL + load( const ::com::sun::star::uno::Sequence< + ::com::sun::star::beans::PropertyValue >& rMediaDescriptor + ,const ::com::sun::star::uno::Reference< + ::com::sun::star::frame::XFrame >& xFrame ) + throw (::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL + cancel() throw (::com::sun::star::uno::RuntimeException); +}; + +//............................................................................. +} //namespace chart +//............................................................................. + +#endif diff --git a/chart2/source/controller/main/ChartWindow.cxx b/chart2/source/controller/main/ChartWindow.cxx new file mode 100644 index 000000000..09f48334c --- /dev/null +++ b/chart2/source/controller/main/ChartWindow.cxx @@ -0,0 +1,137 @@ +/************************************************************************* + * + * $RCSfile: ChartWindow.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:28 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "ChartWindow.hxx" +#include "ChartController.hxx" + +using namespace ::com::sun::star; + +//............................................................................. +namespace chart +{ +//............................................................................. + +ChartWindow::ChartWindow( WindowController* pWindowController, Window* pParent, WinBits nStyle ) + : Window(pParent, nStyle) + , m_pWindowController( pWindowController ) +{ + this->SetMapMode( MapMode(MAP_100TH_MM) ); +} + +ChartWindow::~ChartWindow() +{ +} + +void ChartWindow::Paint( const Rectangle& rRect ) +{ + m_pWindowController->execute_Paint( rRect ); +} + +void ChartWindow::MouseButtonDown(const MouseEvent& rMEvt) +{ + m_pWindowController->execute_MouseButtonDown(rMEvt); +} + +void ChartWindow::MouseMove( const MouseEvent& rMEvt ) +{ + m_pWindowController->execute_MouseMove( rMEvt ); +} + +void ChartWindow::Tracking( const TrackingEvent& rTEvt ) +{ + m_pWindowController->execute_Tracking( rTEvt ); +} + +void ChartWindow::MouseButtonUp( const MouseEvent& rMEvt ) +{ + m_pWindowController->execute_MouseButtonUp( rMEvt ); +} + +void ChartWindow::Resize() +{ + m_pWindowController->execute_Resize(); +} + +void ChartWindow::Activate() +{ + m_pWindowController->execute_Activate(); +} + +void ChartWindow::Deactivate() +{ + m_pWindowController->execute_Deactivate(); +} + +void ChartWindow::GetFocus() +{ + m_pWindowController->execute_GetFocus(); +} + +void ChartWindow::LoseFocus() +{ + m_pWindowController->execute_LoseFocus(); +} +void ChartWindow::Command( const CommandEvent& rCEvt ) +{ + m_pWindowController->execute_Command( rCEvt ); +} +//............................................................................. +} //namespace chart +//............................................................................. diff --git a/chart2/source/controller/main/ChartWindow.hxx b/chart2/source/controller/main/ChartWindow.hxx new file mode 100644 index 000000000..07a8db38e --- /dev/null +++ b/chart2/source/controller/main/ChartWindow.hxx @@ -0,0 +1,108 @@ +/************************************************************************* + * + * $RCSfile: ChartWindow.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:28 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef _CHARTWINDOW_HXX +#define _CHARTWINDOW_HXX + +#ifndef _SV_WINDOW_HXX +#include <vcl/window.hxx> +#endif + +//............................................................................. +namespace chart +{ +//............................................................................. + + +class WindowController; + +//----------------------------------------------------------------------------- +/** The ChartWindow collects events from the window and forwards them the to the controller +thus the controller can perform appropriate actions +*/ + +class ChartWindow : public Window +{ +public: + ChartWindow( WindowController* pWindowController, Window* pParent, WinBits nStyle ); + virtual ~ChartWindow(); + + //from base class Window: + virtual void Paint( const Rectangle& rRect ); + virtual void MouseButtonDown( const MouseEvent& rMEvt ); + virtual void MouseMove( const MouseEvent& rMEvt ); + virtual void Tracking( const TrackingEvent& rTEvt ); + virtual void MouseButtonUp( const MouseEvent& rMEvt ); + virtual void Resize(); + virtual void Activate(); + virtual void Deactivate(); + virtual void GetFocus(); + virtual void LoseFocus(); + virtual void Command( const CommandEvent& rCEvt ); + +private: + WindowController* m_pWindowController; +}; + +//............................................................................. +} //namespace chart +//............................................................................. + +#endif diff --git a/chart2/source/controller/main/SelectionHelper.cxx b/chart2/source/controller/main/SelectionHelper.cxx new file mode 100644 index 000000000..638ed4e53 --- /dev/null +++ b/chart2/source/controller/main/SelectionHelper.cxx @@ -0,0 +1,339 @@ +/************************************************************************* + * + * $RCSfile: SelectionHelper.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:28 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "SelectionHelper.hxx" +#include "chartview/ObjectIdentifier.hxx" +//for C2U +#include "macros.hxx" + +// header for class SdrObjList +#ifndef _SVDPAGE_HXX +#include <svx/svdpage.hxx> +#endif + +#ifndef _SVDITER_HXX +#include <svx/svditer.hxx> +#endif +#ifndef _E3D_OBJ3D_HXX +#include "svx/obj3d.hxx" +#endif +// header for class SdrPathObj +#ifndef _SVDOPATH_HXX +#include <svx/svdopath.hxx> +#endif + +#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_ +#include <com/sun/star/beans/XPropertySet.hpp> +#endif + +//............................................................................. +namespace chart +{ +//............................................................................. +using namespace ::com::sun::star; +//using namespace ::drafts::com::sun::star::chart2; + +//static +rtl::OUString SelectionHelper::getObjectName( SdrObject* pObj ) +{ + rtl::OUString aName; + if(pObj) + { + try + { + uno::Reference< uno::XInterface > xShape = pObj->getUnoShape(); + uno::Reference< beans::XPropertySet > xShapeProps( + uno::Reference< beans::XPropertySet >::query( xShape ) ); + uno::Any aAName = xShapeProps->getPropertyValue( C2U( "Name" ) ); //UNO_NAME_MISC_OBJ_NAME + aAName >>= aName; + } + catch( uno::Exception &e) + { + e; + } + } + return aName; +} + +//static +bool SelectionHelper::findNamedParent( SdrObject*& pInOutObject + , rtl::OUString& rOutName + , bool bGivenObjectMayBeResult ) +{ + //find the deepest named group + SdrObject* pObj = pInOutObject; + rtl::OUString aName; + if( bGivenObjectMayBeResult ) + aName = getObjectName( pObj ); + + while( pObj && !ObjectIdentifier::isCID( aName ) ) + { + SdrObjList* pObjList = pObj->GetObjList(); + if( !pObjList ) + return false;; + SdrObject* pOwner = pObjList->GetOwnerObj(); + if( !pOwner ) + return false; + pObj = pOwner; + aName = getObjectName( pObj ); + } + + if(!pObj) + return false; + if(!aName.getLength()) + return false; + + pInOutObject = pObj; + rOutName = aName; + return true; +} + +//static +SdrObject* SelectionHelper::getObjectToSelect( const Point& rMPos + , rtl::OUString& rNameOfLastSelectedObject + , const DrawViewWrapper& rDrawViewWrapper ) +{ + //the search for the object to select starts with the hit object deepest in the grouping hierarchy (a leaf in the tree) + //further we travel along the grouping hierarchy from child to parent + SdrObject* pNewObj = rDrawViewWrapper.getHitObject(rMPos); + rtl::OUString aNewName = getObjectName( pNewObj );//name of pNewObj + rtl::OUString aTestFirstHit = aNewName; + + //ignore handle only objects for hit test + while( pNewObj && aNewName.match(C2U("HandlesOnly")) ) + { + pNewObj->SetMarkProtect(true); + pNewObj = rDrawViewWrapper.getHitObject(rMPos); + aNewName = getObjectName( pNewObj ); + } + + //accept only named objects while searching for the object to select + if( !findNamedParent( pNewObj, aNewName, true ) ) + { + rNameOfLastSelectedObject = C2U(""); + return NULL; + } + //if the so far found object is a multi click object further steps are necessary + while( ObjectIdentifier::isMultiClickObject( aNewName ) ) + { + if( rNameOfLastSelectedObject.getLength() && aNewName.match( rNameOfLastSelectedObject ) ) + { + //if the same child is clicked again don't go up further + break; + } + if( ObjectIdentifier::areSiblings(rNameOfLastSelectedObject,aNewName) ) + { + //if a sibling of the last selected object is clicked don't go up further + break; + } + SdrObject* pLastChild = pNewObj; + rtl::OUString aLastChildName = aNewName; + if(!findNamedParent( pNewObj, aNewName, false )) + { + //take the one found so far + break; + } + //if the last selected object is found don't go up further but take the last child + if( rNameOfLastSelectedObject.getLength() && aNewName.match( rNameOfLastSelectedObject ) ) + { + pNewObj = pLastChild; + aNewName = aLastChildName; + break; + } + } + DBG_ASSERT(pNewObj && aNewName.getLength(),"somehow lost selected object"); + rNameOfLastSelectedObject = aNewName; + return pNewObj; +} + + +SelectionHelper::SelectionHelper( SdrObject* pSelectedObj + , const rtl::OUString& rSelectedObjectCID ) + : m_pSelectedObj( pSelectedObj ) + , m_aSelectedObjectCID( rSelectedObjectCID ) +{ + +} +SelectionHelper::~SelectionHelper() +{ +} + +//virtual +bool SelectionHelper::getFrameDragSingles() +{ + bool bFrameDragSingles = true;//true == green == surrounding handles + if( m_pSelectedObj && m_pSelectedObj->ISA(E3dObject) ) + bFrameDragSingles = false; + return bFrameDragSingles; +} + +SdrObject* SelectionHelper::getObjectToMark() +{ + //return the selected object itself + //or a sub object if one with name "Handles" exsists + + SdrObject* pObj = m_pSelectedObj; + + m_pMarkObj = pObj; + if(pObj) + { + SdrObjList* pSubList = pObj->GetSubList(); + if(pSubList) + { + SdrObjListIter aIterator(*pSubList, IM_DEEPWITHGROUPS); + while (aIterator.IsMore()) + { + SdrObject* pSubObj = aIterator.Next(); + rtl::OUString aName = SelectionHelper::getObjectName( pSubObj ); + if( aName.match(C2U("Handles")) ) + { + m_pMarkObj = pSubObj; + break; + } + } + } + } + return m_pMarkObj; +} + +//virtual +bool SelectionHelper::getMarkHandles( SdrHdlList& rHdlList ) +{ + //@todo -> more flexible handle creation + //2 scenarios possible: + //1. add an additional invisible shape as a child to the selected object + //this child needs to be named somehow and handles need to be generated therefrom ... + //or 2. offer a central service per view where renderer and so can register for handle creation for a special shape + //.. or 3. feature from drawinglayer to create handles for each shape ... (bad performance ... ?) ? + + //scenario 1 is now used: + //if a child with name Handles exsists + //this child is marked instead of the logical selected object + +/* + //if a special mark object was found + //that object should be used for marking only + if( m_pMarkObj != m_pSelectedObj) + return false; +*/ + //if a special mark object was found + //that object should be used to create handles from + if( m_pMarkObj && m_pMarkObj != m_pSelectedObj) + { + rHdlList.Clear(); + if( m_pMarkObj->ISA(SdrPathObj) ) + { + //if th object is a polygon + //from each point a handle is generated + const XPolyPolygon& rPolyPolygon = ((SdrPathObj*)m_pMarkObj)->GetPathPoly(); + for( sal_Int32 nN = 0; nN < rPolyPolygon.Count(); nN++) + { + const XPolygon& rPolygon = rPolyPolygon[nN]; + for( sal_Int32 nM = 0; nM < rPolygon.GetPointCount(); nM++) + { + SdrHdl* pHdl = new SdrHdl(rPolygon[nM],HDL_POLY); + rHdlList.AddHdl(pHdl); + } + } + return true; + } + else + return false; //use the special MarkObject for marking + } + + //@todo: + //add and document good marking defaults ... + + rHdlList.Clear(); + + SdrObject* pObj = m_pSelectedObj; + if(!pObj) + return false; + SdrObjList* pSubList = pObj->GetSubList(); + if( !pSubList )//no group object !pObj->IsGroupObject() + return false; + + SdrObjListIter aIterator(*pSubList, IM_DEEPWITHGROUPS); + + if( pObj->ISA(E3dObject) ) + { + /* + E3dObject* p3DObj = (E3dObject*) pObj; + USHORT nGroup = p3DObj->GetLogicalGroup(); + if(nGroup>0) + aIterator = SdrObjListIter(*((SdrObject*)p3DObj->GetScene()), IM_DEEPWITHGROUPS); + else + */ + return false; + } + + while (aIterator.IsMore()) + { + SdrObject* pSubObj = aIterator.Next(); + Point aPos = pSubObj->GetBoundRect().Center(); + SdrHdl* pHdl = new SdrHdl(aPos,HDL_POLY); + rHdlList.AddHdl(pHdl); + } + return true; +} + +//............................................................................. +} //namespace chart +//............................................................................. diff --git a/chart2/source/controller/main/SelectionHelper.hxx b/chart2/source/controller/main/SelectionHelper.hxx new file mode 100644 index 000000000..52d4c782c --- /dev/null +++ b/chart2/source/controller/main/SelectionHelper.hxx @@ -0,0 +1,113 @@ +/************************************************************************* + * + * $RCSfile: SelectionHelper.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:28 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef _CHART2_SELECTIONHELPER_HXX +#define _CHART2_SELECTIONHELPER_HXX + +#include "DrawViewWrapper.hxx" + +class SdrObject; +// header for enum SdrDragMode +#ifndef _SVDTYPES_HXX +#include <svx/svdtypes.hxx> +#endif + +//............................................................................. +namespace chart +{ +//............................................................................. + +//----------------------------------------------------------------------------- +/** +*/ + +class SelectionHelper : public MarkHandleProvider +{ +public: + static rtl::OUString getObjectName( SdrObject* pObj ); + static bool findNamedParent( SdrObject*& pInOutObject + , rtl::OUString& rOutName + , bool bGivenObjectMayBeResult ); + static SdrObject* getObjectToSelect( const Point& rMPos + , rtl::OUString& rNameOfLastSelectedObject + , const DrawViewWrapper& rDrawViewWrapper ); + + SelectionHelper( SdrObject* pSelectedObj, const rtl::OUString& rSelectedObjectCID ); + virtual ~SelectionHelper(); + + + //MarkHandleProvider: + virtual bool getMarkHandles( SdrHdlList& rHdlList ); + virtual bool getFrameDragSingles(); + + SdrObject* getObjectToMark();//sets also internally the mark object + //-> getMarkHandles will behave different if this method has found a Mark Object different from m_pSelectedObj + +private: + SdrObject* m_pSelectedObj;//hit and logically selected object + rtl::OUString m_aSelectedObjectCID; + + SdrObject* m_pMarkObj;//object that is marked instead to have more pretty handles +}; + +//............................................................................. +} //namespace chart +//............................................................................. +#endif diff --git a/chart2/source/controller/main/_serviceregistration_controller.cxx b/chart2/source/controller/main/_serviceregistration_controller.cxx new file mode 100644 index 000000000..2fc615dc4 --- /dev/null +++ b/chart2/source/controller/main/_serviceregistration_controller.cxx @@ -0,0 +1,116 @@ +/************************************************************************* + * + * $RCSfile: _serviceregistration_controller.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:28 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef _CPPUHELPER_IMPLEMENATIONENTRY_HXX_ +#include <cppuhelper/implementationentry.hxx> +#endif +#ifndef _CHARTCONTROLLER_HXX +#include "ChartController.hxx" +#endif +#ifndef _CHARTFRAMELOADER_HXX +#include "ChartFrameloader.hxx" +#endif + +static struct ::cppu::ImplementationEntry g_entries_chart2_view[] = +{ + { + ::chart::ChartController::create + , ::chart::ChartController::getImplementationName_Static + , ::chart::ChartController::getSupportedServiceNames_Static + , ::cppu::createSingleComponentFactory + , 0 + , 0 + } + ,{ + ::chart::ChartFrameLoader::create + , ::chart::ChartFrameLoader::getImplementationName_Static + , ::chart::ChartFrameLoader::getSupportedServiceNames_Static + , ::cppu::createSingleComponentFactory + , 0 + , 0 + } + ,{ 0, 0, 0, 0, 0, 0 } +}; + +// component exports +extern "C" +{ +//================================================================================================== +void SAL_CALL component_getImplementationEnvironment( + const sal_Char ** ppEnvTypeName, uno_Environment ** ppEnv ) +{ + *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; +} +//================================================================================================== +sal_Bool SAL_CALL component_writeInfo( + void * pServiceManager, void * pRegistryKey ) +{ + return ::cppu::component_writeInfoHelper( + pServiceManager, pRegistryKey, g_entries_chart2_view ); +} +//================================================================================================== +void * SAL_CALL component_getFactory( + const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey ) +{ + return ::cppu::component_getFactoryHelper( + pImplName, pServiceManager, pRegistryKey , g_entries_chart2_view ); +} +} +//========================================================================= diff --git a/chart2/source/controller/main/makefile.mk b/chart2/source/controller/main/makefile.mk new file mode 100644 index 000000000..410dd2f27 --- /dev/null +++ b/chart2/source/controller/main/makefile.mk @@ -0,0 +1,94 @@ +#************************************************************************* +# +# $RCSfile: makefile.mk,v $ +# +# $Revision: 1.1.1.1 $ +# +# last change: $Author: bm $ $Date: 2003-10-06 09:58:28 $ +# +# The Contents of this file are made available subject to the terms of +# either of the following licenses +# +# - GNU Lesser General Public License Version 2.1 +# - Sun Industry Standards Source License Version 1.1 +# +# Sun Microsystems Inc., October, 2000 +# +# GNU Lesser General Public License Version 2.1 +# ============================================= +# Copyright 2000 by Sun Microsystems, Inc. +# 901 San Antonio Road, Palo Alto, CA 94303, USA +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License version 2.1, as published by the Free Software Foundation. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# +# +# Sun Industry Standards Source License Version 1.1 +# ================================================= +# The contents of this file are subject to the Sun Industry Standards +# Source License Version 1.1 (the "License"); You may not use this file +# except in compliance with the License. You may obtain a copy of the +# License at http://www.openoffice.org/license.html. +# +# Software provided under this License is provided on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, +# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, +# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. +# See the License for the specific provisions governing your rights and +# obligations concerning the Software. +# +# The Initial Developer of the Original Code is: Sun Microsystems, Inc. +# +# Copyright: 2000 by Sun Microsystems, Inc. +# +# All Rights Reserved. +# +# Contributor(s): _______________________________________ +# +# +# +#************************************************************************* + +PRJ= ..$/..$/.. +PRJINC= $(PRJ)$/source +PRJNAME= chart2 +TARGET= chcontroller + +ENABLE_EXCEPTIONS= TRUE + +# --- Settings ----------------------------------------------------- + +.INCLUDE: settings.mk + +# --- export library ------------------------------------------------- + +#object files to build and link together to lib $(SLB)$/$(TARGET).lib +SLOFILES = \ + $(SLO)$/ViewSingletons.obj \ + $(SLO)$/ResId.obj \ + $(SLO)$/SelectionHelper.obj \ + $(SLO)$/ChartWindow.obj \ + $(SLO)$/ChartController.obj \ + $(SLO)$/ChartController_Window.obj \ + $(SLO)$/ChartController_Properties.obj \ + $(SLO)$/ChartController_Insert.obj \ + $(SLO)$/ChartFrameloader.obj \ + $(SLO)$/_serviceregistration_controller.obj + +# $(SLO)$/CommonConverters.obj \ +# $(SLO)$/Scaling.obj \ + +# --- Targets ----------------------------------------------------------------- + +.INCLUDE: target.mk diff --git a/chart2/source/controller/makefile.mk b/chart2/source/controller/makefile.mk new file mode 100644 index 000000000..656430f14 --- /dev/null +++ b/chart2/source/controller/makefile.mk @@ -0,0 +1,152 @@ +#************************************************************************* +# +# $RCSfile: makefile.mk,v $ +# +# $Revision: 1.1.1.1 $ +# +# last change: $Author: bm $ $Date: 2003-10-06 09:58:24 $ +# +# The Contents of this file are made available subject to the terms of +# either of the following licenses +# +# - GNU Lesser General Public License Version 2.1 +# - Sun Industry Standards Source License Version 1.1 +# +# Sun Microsystems Inc., October, 2000 +# +# GNU Lesser General Public License Version 2.1 +# ============================================= +# Copyright 2000 by Sun Microsystems, Inc. +# 901 San Antonio Road, Palo Alto, CA 94303, USA +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License version 2.1, as published by the Free Software Foundation. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# +# +# Sun Industry Standards Source License Version 1.1 +# ================================================= +# The contents of this file are subject to the Sun Industry Standards +# Source License Version 1.1 (the "License"); You may not use this file +# except in compliance with the License. You may obtain a copy of the +# License at http://www.openoffice.org/license.html. +# +# Software provided under this License is provided on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, +# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, +# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. +# See the License for the specific provisions governing your rights and +# obligations concerning the Software. +# +# The Initial Developer of the Original Code is: Sun Microsystems, Inc. +# +# Copyright: 2000 by Sun Microsystems, Inc. +# +# All Rights Reserved. +# +# Contributor(s): _______________________________________ +# +# +# +#************************************************************************* + +PRJ= ..$/.. +PRJNAME= chart2 +TARGET= chartcontroller + +USE_DEFFILE= TRUE +ENABLE_EXCEPTIONS= TRUE + +# --- Settings ----------------------------------------------------- + +.INCLUDE: $(PRJ)$/util$/makefile.pmk + +# --- export library ------------------------------------------------- + +#You can use several library macros of this form to build libraries that +#do not consist of all object files in a directory or to merge different libraries. +LIB1TARGET= $(SLB)$/$(TARGET).lib + +LIB1FILES= \ + $(SLB)$/chcontroller.lib \ + $(SLB)$/chcdrawinglayer.lib \ + $(SLB)$/chcitemsetwrapper.lib \ + $(SLB)$/chcdialogs.lib + +#-------- + +#Indicates the filename of the shared library. +SHL1TARGET= $(TARGET)$(UPD)$(DLLPOSTFIX) + +#indicates dependencies: +# .IF "$(COM)" == "MSC" +# SHL1DEPN = \ +# $(SLB)$/charttools.lib \ +# $(SLB)$/chartview.lib +# .ELSE +# SHL1DEPN = +# .ENDIF + +#Specifies an import library to create. For Win32 only. +SHL1IMPLIB= i$(TARGET) + +#Specifies libraries from the same module to put into the shared library. +#was created above +SHL1LIBS= $(LIB1TARGET) + +#Links import libraries. + +SHL1STDLIBS= $(CHARTTOOLS) \ + $(CHARTVIEW) \ + $(CPPULIB) \ + $(CPPUHELPERLIB) \ + $(COMPHELPERLIB) \ + $(GOODIESLIB) \ + $(SALLIB) \ + $(SVLIB) \ + $(SVLLIB) \ + $(SVTOOLLIB) \ + $(SVXLIB) \ + $(TKLIB) \ + $(TOOLSLIB) \ + $(VCLLIB) \ + $(SFXLIB) + +#--------exports + +#specifies the exported symbols for Windows only: +SHL1DEF= $(MISC)$/$(SHL1TARGET).def + +SHL1VERSIONMAP = controller.map + +#--------definition file + +#name of the definition file: +DEF1NAME= $(SHL1TARGET) + +# --- Resources --------------------------------------------------------------- + +RESLIB1LIST=\ + $(SRS)$/chcmenu.srs \ + $(SRS)$/chcdialogs.srs + +RESLIB1NAME= $(TARGET) +RESLIB1SRSFILES=$(RESLIB1LIST) +RESLIB1DEPN=$(RESLIB1LIST) + +#RESLIB1SRSFILES=$(SRS)$/$(TARGET).srs +#RESLIB1DEPN= SRCFILES + +# --- Targets ----------------------------------------------------------------- + +.INCLUDE: target.mk diff --git a/chart2/source/inc/CachedDataSequence.hxx b/chart2/source/inc/CachedDataSequence.hxx new file mode 100644 index 000000000..160a782cb --- /dev/null +++ b/chart2/source/inc/CachedDataSequence.hxx @@ -0,0 +1,252 @@ +/************************************************************************* + * + * $RCSfile: CachedDataSequence.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:29 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2002 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef _CHART_CACHEDDATASEQUENCE_HXX +#define _CHART_CACHEDDATASEQUENCE_HXX + +// helper classes +#ifndef _CPPUHELPER_COMPBASE3_HXX_ +#include <cppuhelper/compbase3.hxx> +#endif +#ifndef _COMPHELPER_UNO3_HXX_ +#include <comphelper/uno3.hxx> +#endif +#ifndef _COMPHELPER_BROADCASTHELPER_HXX_ +#include <comphelper/broadcasthelper.hxx> +#endif +#ifndef _COMPHELPER_PROPERTYCONTAINER_HXX_ +#include <comphelper/propertycontainer.hxx> +#endif +#ifndef _COMPHELPER_PROPERTY_ARRAY_HELPER_HXX_ +#include <comphelper/proparrhlp.hxx> +#endif +#include "ServiceMacros.hxx" + +// interfaces and types +#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_ +#include <com/sun/star/lang/XServiceInfo.hpp> +#endif +#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_ +#include <com/sun/star/beans/XPropertySet.hpp> +#endif +#ifndef _COM_SUN_STAR_UNO_XCOMPONENTCONTEXT_HPP_ +#include <com/sun/star/uno/XComponentContext.hpp> +#endif + +// +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XNUMERICALDATASEQUENCE_HPP_ +#include <drafts/com/sun/star/chart2/XNumericalDataSequence.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XTEXTUALDATASEQUENCE_HPP_ +#include <drafts/com/sun/star/chart2/XTextualDataSequence.hpp> +#endif + +#include <vector> + +// ____________________ +namespace chart +{ + +namespace impl +{ +typedef ::cppu::WeakComponentImplHelper3< + ::drafts::com::sun::star::chart2::XNumericalDataSequence, + ::drafts::com::sun::star::chart2::XTextualDataSequence, + ::com::sun::star::lang::XServiceInfo > + CachedDataSequence_Base; +} + +class CachedDataSequence : + public ::comphelper::OMutexAndBroadcastHelper, + public ::comphelper::OPropertyContainer, + public ::comphelper::OPropertyArrayUsageHelper< CachedDataSequence >, + public impl::CachedDataSequence_Base +{ +public: + /** constructs an empty sequence + */ + CachedDataSequence(); + + /** creates a sequence and initializes it with the given vector of floating + point numbers + */ + explicit CachedDataSequence( const ::std::vector< double > & rVector ); + + /** creates a sequence and initializes it with the given vector of strings + */ + explicit CachedDataSequence( const ::std::vector< ::rtl::OUString > & rVector ); + + /** creates a sequence and initializes it with the given vector of arbitrary + content + */ + explicit CachedDataSequence( const ::std::vector< ::com::sun::star::uno::Any > & rVector ); + + virtual ~CachedDataSequence(); + + /** optimizes internal storage such that getData() is the fastest method for + retrieving data. + */ + void PreferMixedData(); + /** optimizes internal storage such that getNumericalData() is the fastest + method for retrieving data. + */ + void PreferNumericalData(); + /** optimizes internal storage such that getTextualData() is the fastest + method for retrieving data. + */ + void PreferTextualData(); + + + /// declare XServiceInfo methods + APPHELPER_XSERVICEINFO_DECL() + + /// merge XInterface implementations + DECLARE_XINTERFACE() + /// merge XTypeProvider implementations + DECLARE_XTYPEPROVIDER() + +protected: + // ____ XPropertySet ____ + /// @see ::com::sun::star::beans::XPropertySet + virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() + throw (::com::sun::star::uno::RuntimeException); + /// @see ::comphelper::OPropertySetHelper + virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); + /// @see ::comphelper::OPropertyArrayUsageHelper + virtual ::cppu::IPropertyArrayHelper* createArrayHelper() const; + + // ____ XNumericalDataSequence ____ + /// @see ::drafts::com::sun::star::chart::XNumericalDataSequence + virtual ::com::sun::star::uno::Sequence< double > SAL_CALL getNumericalData() throw (::com::sun::star::uno::RuntimeException); + /// @see ::drafts::com::sun::star::chart::XNumericalDataSequence +// virtual void SAL_CALL setNumericalData( const ::com::sun::star::uno::Sequence< double >& aData ) throw (::com::sun::star::uno::RuntimeException); + + // ____ XTextualDataSequence ____ + /// @see ::drafts::com::sun::star::chart::XTextualDataSequence + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getTextualData() throw (::com::sun::star::uno::RuntimeException); + /// @see ::drafts::com::sun::star::chart::XNumericalDataSequence +// virtual void SAL_CALL setTextualData( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aData ) throw (::com::sun::star::uno::RuntimeException); + + // ____ XDataSequence ____ + /// @see ::drafts::com::sun::star::chart::XDataSequence + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL getData() throw (::com::sun::star::uno::RuntimeException); + /// @see ::drafts::com::sun::star::chart::XDataSequence + virtual ::rtl::OUString SAL_CALL getSourceIdentifier() throw (::com::sun::star::uno::RuntimeException); + + mutable ::osl::Mutex m_aMutex; + + // <properties> + sal_Int32 m_nNumberFormatKey; + ::rtl::OUString m_sRole; + // </properties> + + enum DataType + { + NUMERICAL, + TEXTUAL, + MIXED + }; + + /** This method registers all properties. It should be called by all + constructors. + */ + void registerProperties(); + + /** is used by interface method getNumericalData() as well as + PreferNumericalData(). + */ + ::com::sun::star::uno::Sequence< double > Impl_getNumericalData() const; + /** is used by interface method getTextualData() as well as + PreferTextualData(). + */ + ::com::sun::star::uno::Sequence< ::rtl::OUString > Impl_getTextualData() const; + /** is used by interface method getData() as well as PreferMixedData(). + */ + ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > Impl_getMixedData() const; + + /** is used by PreferNumericalData(). + */ + void Impl_setNumericalData( const ::com::sun::star::uno::Sequence< double > & rSeq ); + /** is used by PreferTextualData(). + */ + void Impl_setTextualData( const ::com::sun::star::uno::Sequence< ::rtl::OUString > & rSeq ); + /** is used by PreferMixedData(). + */ + void Impl_setMixedData( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > & rSeq ); + +private: + ::rtl::OUString m_sSourceIdentifier; + + enum DataType m_eCurrentDataType; + + ::com::sun::star::uno::Sequence< double > m_aNumericalSequence; + ::com::sun::star::uno::Sequence< ::rtl::OUString > m_aTextualSequence; + ::com::sun::star::uno::Sequence< + ::com::sun::star::uno::Any > m_aMixedSequence; + + sal_Bool m_bIsHidden; + ::com::sun::star::uno::Sequence< sal_Int32 > m_aHiddenValues; +}; + +} // namespace chart + + +// _CHART_CACHEDDATASEQUENCE_HXX +#endif diff --git a/chart2/source/inc/ChartModelHelper.hxx b/chart2/source/inc/ChartModelHelper.hxx new file mode 100644 index 000000000..81d908b44 --- /dev/null +++ b/chart2/source/inc/ChartModelHelper.hxx @@ -0,0 +1,112 @@ +/************************************************************************* + * + * $RCSfile: ChartModelHelper.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:29 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef _CHART2_CONTROLLER_CHARTMODELHELPER_HXX +#define _CHART2_CONTROLLER_CHARTMODELHELPER_HXX + +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XDATASERIES_HPP_ +#include <drafts/com/sun/star/chart2/XDataSeries.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XDIAGRAM_HPP_ +#include <drafts/com/sun/star/chart2/XDiagram.hpp> +#endif + +#ifndef _COM_SUN_STAR_FRAME_XMODEL_HPP_ +#include <com/sun/star/frame/XModel.hpp> +#endif + +#include <vector> + +//............................................................................. +namespace chart +{ +//............................................................................. + +//----------------------------------------------------------------------------- +/** +*/ + +class ChartModelHelper +{ +public: + static ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XDiagram > + findDiagram( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xModel ); + + static sal_Int32 getDimensionAndFirstChartType( const ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XDiagram >& xDiagram, rtl::OUString& rChartType ); + + static ::std::vector< ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XDataSeries > > getDataSeries( + const ::com::sun::star::uno::Reference< + ::com::sun::star::frame::XModel > & xModel ); + + static ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XDataSeries > + getSeriesByIdentifier( + const rtl::OUString& rIdentifier + , const ::com::sun::star::uno::Reference< + ::com::sun::star::frame::XModel > xModel ); +}; + +//............................................................................. +} //namespace chart +//............................................................................. +#endif diff --git a/chart2/source/inc/CommonConverters.hxx b/chart2/source/inc/CommonConverters.hxx new file mode 100644 index 000000000..96921e39c --- /dev/null +++ b/chart2/source/inc/CommonConverters.hxx @@ -0,0 +1,266 @@ +/************************************************************************* + * + * $RCSfile: CommonConverters.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:29 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef __CHART_COMMON_CONVERTERS_HXX +#define __CHART_COMMON_CONVERTERS_HXX + +#ifndef _SVX_VECTOR3D_HXX +#include <goodies/vector3d.hxx> +#endif +#ifndef _B3D_HMATRIX_HXX +#include <goodies/hmatrix.hxx> +#endif +#ifndef _B2D_MATRIX3D_HXX +#include <goodies/matrix3d.hxx> +#endif +#ifndef _TL_POLY_HXX +#include <tools/poly.hxx> +#endif + +#ifndef _COM_SUN_STAR_DRAWING_DIRECTION3D_HPP_ +#include <com/sun/star/drawing/Direction3D.hpp> +#endif +#ifndef _COM_SUN_STAR_DRAWING_HOMOGENMATRIX_HPP_ +#include <com/sun/star/drawing/HomogenMatrix.hpp> +#endif +#ifndef _COM_SUN_STAR_DRAWING_HOMOGENMATRIX3_HPP_ +#include <com/sun/star/drawing/HomogenMatrix3.hpp> +#endif +#ifndef _COM_SUN_STAR_DRAWING_POINTSEQUENCESEQUENCE_HPP_ +#include <com/sun/star/drawing/PointSequenceSequence.hpp> +#endif +#ifndef _COM_SUN_STAR_DRAWING_POSITION3D_HPP_ +#include <com/sun/star/drawing/Position3D.hpp> +#endif +#ifndef _COM_SUN_STAR_DRAWING_POLYPOLYGONSHAPE3D_HPP_ +#include <com/sun/star/drawing/PolyPolygonShape3D.hpp> +#endif +#ifndef _COM_SUN_STAR_TEXT_WRITINGMODE_HPP_ +#include <com/sun/star/text/WritingMode.hpp> +#endif + +//............................................................................. +namespace chart +{ +//............................................................................. + +//----------------------------------------------------------------------------- +/** +diverse methods for class conversions; e.g. Matrix4D to HomogenMatrix +and operations e.g drawing::Position3D + drawing::Direction3D +*/ + +//----------------------------------------------------------------------------- +/** Matrix4D -> HomogenMatrix +*/ +com::sun::star::drawing::HomogenMatrix + Matrix4DToHomogenMatrix( const Matrix4D& rM4 ); + +//----------------------------------------------------------------------------- +/** HomogenMatrix -> Matrix4D +*/ +Matrix4D HomogenMatrixToMatrix4D( const com::sun::star::drawing::HomogenMatrix& rHM ); + +//----------------------------------------------------------------------------- +/** Matrix4D -> Matrix3D +*/ +Matrix3D IgnoreZ( const Matrix4D& rM4 ); + +//----------------------------------------------------------------------------- +/** Matrix3D <-> HomogenMatrix3 +*/ +com::sun::star::drawing::HomogenMatrix3 + Matrix3DToHomogenMatrix3( const Matrix3D& rM3 ); + +Matrix3D HomogenMatrix3ToMatrix3D( const com::sun::star::drawing::HomogenMatrix3& rHM ); + +//----------------------------------------------------------------------------- +/** Position3D -> Vector3D +*/ +Vector3D Position3DToVector3D( const com::sun::star::drawing::Position3D& rPosition ); + +//----------------------------------------------------------------------------- +/** Vector3D -> Direction3D +*/ +com::sun::star::drawing::Direction3D + Vector3DToDirection3D( const Vector3D& rVector); + +//----------------------------------------------------------------------------- +/** two drawing::Position3D -> PolyPolygonShape3D +*/ +::com::sun::star::drawing::PolyPolygonShape3D + MakeLine3D( const ::com::sun::star::drawing::Position3D & rStart, + const ::com::sun::star::drawing::Position3D & rEnd ); + +//----------------------------------------------------------------------------- +/** PolyPolygonShape3D + drawing::Position3D -> PolyPolygonShape3D +*/ +void AddPointToPoly( com::sun::star::drawing::PolyPolygonShape3D& rPoly + , const com::sun::star::drawing::Position3D& rPos + , sal_Int32 nSequenceIndex=0 ); + +//----------------------------------------------------------------------------- +/** PolyPolygonShape3D + PolyPolygonShape3D -> PolyPolygonShape3D +*/ +void appendPoly( com::sun::star::drawing::PolyPolygonShape3D& rRet + , const com::sun::star::drawing::PolyPolygonShape3D& rAdd ); + +//----------------------------------------------------------------------------- +/** PolyPolygonShape3D -> drawing::PointSequenceSequence (2D) +*/ +com::sun::star::drawing::PointSequenceSequence PolyToPointSequence( + const com::sun::star::drawing::PolyPolygonShape3D& rPolyPolygon ); + +//----------------------------------------------------------------------------- +/** PolyPolygonShape3D -> Polygon (2D,integer!) +*/ +Polygon PolyToToolsPoly( + const com::sun::star::drawing::PolyPolygonShape3D& rPolyPolygon ); + +//----------------------------------------------------------------------------- +/** tools Polygon (2D,integer!) -> PolyPolygonShape3D +*/ +com::sun::star::drawing::PolyPolygonShape3D ToolsPolyToPoly( + const Polygon& rToolsPoly, double zValue ); + + +//----------------------------------------------------------------------------- +/** Position3D + Direction3D == Position3D +*/ +com::sun::star::drawing::Position3D + operator+( const com::sun::star::drawing::Position3D& rPos + , const com::sun::star::drawing::Direction3D& rDirection); + +//----------------------------------------------------------------------------- +/** Position3D - Direction3D == Position3D +*/ +com::sun::star::drawing::Position3D + operator-( const com::sun::star::drawing::Position3D& rPos + , const com::sun::star::drawing::Direction3D& rDirection); + + +//----------------------------------------------------------------------------- +/** Position3D - Position3D == Direction3D +*/ +com::sun::star::drawing::Direction3D + operator-( const com::sun::star::drawing::Position3D& rPos1 + , const com::sun::star::drawing::Position3D& rPos2); + +//----------------------------------------------------------------------------- +/** Direction3D * double == Direction3D +*/ +com::sun::star::drawing::Direction3D + operator*( const com::sun::star::drawing::Direction3D& rDirection + , double fFraction); + +//----------------------------------------------------------------------------- +/** Sequence<double> -> Vector3D +*/ +Vector3D SequenceToVector3D( const com::sun::star::uno::Sequence< double >& rSeq ); + +//----------------------------------------------------------------------------- +/** Vector3D -> Sequence<double> +*/ +com::sun::star::uno::Sequence< double > + Vector3DToSequence( const Vector3D& rVector ); + +//----------------------------------------------------------------------------- +/** Sequence<double> -> drawing::Position3D +*/ +com::sun::star::drawing::Position3D + SequenceToPosition3D( const com::sun::star::uno::Sequence< double >& rSeq ); + +//----------------------------------------------------------------------------- +/** drawing::Position3D -> Sequence<double> +*/ + +com::sun::star::uno::Sequence< double > + Position3DToSequence( const com::sun::star::drawing::Position3D& rPosition ); + +//----------------------------------------------------------------------------- +/** Sequence<double> -> drawing::Direction3D +*/ +com::sun::star::drawing::Direction3D + SequenceToDirection3D( const com::sun::star::uno::Sequence< double >& rSeq ); + +//----------------------------------------------------------------------------- +/** drawing::Direction3D -> Sequence<double> +*/ + +com::sun::star::uno::Sequence< double > + Direction3DToSequence( const com::sun::star::drawing::Direction3D& rDirection ); + +//----------------------------------------------------------------------------- +/** drawing::Direction3D / double +*/ + +com::sun::star::drawing::Direction3D + operator/( const com::sun::star::drawing::Direction3D& rDirection, double f ); + +//----------------------------------------------------------------------------- +/** text::WritingMode2 -> text::WritingMode +*/ + +com::sun::star::text::WritingMode WritingMode2ToWritingMode1( sal_Int16 nWritingMode ); + +//............................................................................. +} //namespace chart +//............................................................................. +#endif diff --git a/chart2/source/inc/ContextHelper.hxx b/chart2/source/inc/ContextHelper.hxx new file mode 100644 index 000000000..a3812f086 --- /dev/null +++ b/chart2/source/inc/ContextHelper.hxx @@ -0,0 +1,99 @@ +/************************************************************************* + * + * $RCSfile: ContextHelper.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:29 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef CHART_CONTEXTHELPER_HXX +#define CHART_CONTEXTHELPER_HXX + +#include "InlineContainer.hxx" + +#include <com/sun/star/uno/XComponentContext.hpp> +#include <com/sun/star/uno/Any.hxx> +#include <rtl/ustring.hxx> + +#include <map> + +namespace chart +{ + +namespace ContextHelper +{ + +typedef ::std::map< ::rtl::OUString, ::com::sun::star::uno::Any > + tContextEntryMapType; +typedef ::comphelper::MakeMap< ::rtl::OUString, ::com::sun::star::uno::Any > + MakeContextEntryMap; + +/** creates a component context containing the properties given in the map. + + @param rDelegateContext + delegation to further context + */ +::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > + createContext( const tContextEntryMapType & rMap, + const ::com::sun::star::uno::Reference< + ::com::sun::star::uno::XComponentContext > & rDelegateContext = + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >() ); + +} // namespace ContextHelper + +} // namespace chart + +// CHART_CONTEXTHELPER_HXX +#endif diff --git a/chart2/source/inc/LegendHelper.hxx b/chart2/source/inc/LegendHelper.hxx new file mode 100644 index 000000000..cf9c1a5c0 --- /dev/null +++ b/chart2/source/inc/LegendHelper.hxx @@ -0,0 +1,87 @@ +/************************************************************************* + * + * $RCSfile: LegendHelper.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:29 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef _CHART2_TOOLS_LEGENDHELPER_HXX +#define _CHART2_TOOLS_LEGENDHELPER_HXX + +// header for class OUString +#ifndef _RTL_USTRING_HXX_ +#include <rtl/ustring.hxx> +#endif + +//............................................................................. +namespace chart +{ +//............................................................................. + +//----------------------------------------------------------------------------- +/** +*/ + +class LegendHelper +{ +public: + static rtl::OUString getIdentifierForLegend(); +}; + +//............................................................................. +} //namespace chart +//............................................................................. +#endif diff --git a/chart2/source/inc/LifeTime.hxx b/chart2/source/inc/LifeTime.hxx new file mode 100644 index 000000000..b3510dc3c --- /dev/null +++ b/chart2/source/inc/LifeTime.hxx @@ -0,0 +1,301 @@ +/************************************************************************* + * + * $RCSfile: LifeTime.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:29 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef _LIFETIME_HXX +#define _LIFETIME_HXX + +#ifndef _OSL_MUTEX_HXX_ +#include <osl/mutex.hxx> +#endif +#ifndef _OSL_CONDITN_HXX_ +#include <osl/conditn.hxx> +#endif +#ifndef _COM_SUN_STAR_UNO_EXCEPTION_HDL_ +#include <com/sun/star/uno/Exception.hdl> +#endif +#ifndef _CPPUHELPER_INTERFACECONTAINER_HXX_ +#include <cppuhelper/interfacecontainer.hxx> +#endif +#ifndef _COM_SUN_STAR_UTIL_XCLOSELISTENER_HPP_ +#include <com/sun/star/util/XCloseListener.hpp> +#endif +#ifndef _COM_SUN_STAR_UTIL_XCLOSEABLE_HPP_ +#include <com/sun/star/util/XCloseable.hpp> +#endif +#ifndef _COM_SUN_STAR_LANG_XCOMPONENT_HPP_ +#include <com/sun/star/lang/XComponent.hpp> +#endif +#ifndef _CPPUHELPER_WEAKREF_HXX_ +#include <cppuhelper/weakref.hxx> +#endif + +namespace apphelper +{ + +class LifeTimeGuard; +class LifeTimeManager +{ +friend class LifeTimeGuard; +public: + LifeTimeManager( ::com::sun::star::lang::XComponent* pComponent, sal_Bool bLongLastingCallsCancelable = sal_False ); + virtual ~LifeTimeManager(); + + sal_Bool impl_isDisposed(); + sal_Bool dispose() throw(::com::sun::star::uno::RuntimeException); + +public: + ::cppu::OMultiTypeInterfaceContainerHelper m_aListenerContainer; + +protected: + virtual sal_Bool impl_canStartApiCall(); + virtual void impl_apiCallCountReachedNull(){}; + + void impl_registerApiCall(sal_Bool bLongLastingCall); + void impl_unregisterApiCall(sal_Bool bLongLastingCall); + + void impl_init(); + +protected: + mutable ::osl::Mutex m_aAccessMutex; + + ::com::sun::star::lang::XComponent* m_pComponent; + + ::osl::Condition m_aNoAccessCountCondition; + sal_Int32 volatile m_nAccessCount; + + sal_Bool volatile m_bDisposed; + sal_Bool volatile m_bInDispose; + + // + sal_Bool m_bLongLastingCallsCancelable; + ::osl::Condition m_aNoLongLastingCallCountCondition; + sal_Int32 volatile m_nLongLastingCallCount; +}; + +class CloseableLifeTimeManager : public LifeTimeManager +{ +protected: + ::com::sun::star::util::XCloseable* m_pCloseable; + + ::osl::Condition m_aEndTryClosingCondition; + sal_Bool volatile m_bClosed; + sal_Bool volatile m_bInTryClose; + //the ownership between model and controller is not clear at first + //each controller might consider him as owner of the model first + //at start the model is not considered as owner of itself + sal_Bool volatile m_bOwnership; + //with a XCloseable::close call and during XCloseListener::queryClosing + //the ownership can be regulated more explicit, + //if so the ownership is considered to be well known + sal_Bool volatile m_bOwnershipIsWellKnown; + +public: + CloseableLifeTimeManager( ::com::sun::star::util::XCloseable* pCloseable + , ::com::sun::star::lang::XComponent* pComponent + , sal_Bool bLongLastingCallsCancelable = sal_False ); + virtual ~CloseableLifeTimeManager(); + + sal_Bool impl_isDisposedOrClosed(); + sal_Bool g_close_startTryClose(sal_Bool bDeliverOwnership) + throw ( ::com::sun::star::uno::Exception ); + sal_Bool g_close_isNeedToCancelLongLastingCalls( sal_Bool bDeliverOwnership, ::com::sun::star::uno::Exception& ex ) + throw ( ::com::sun::star::uno::Exception ); + void g_close_endTryClose(sal_Bool bDeliverOwnership, sal_Bool bMyVeto, ::com::sun::star::uno::Exception& ex) + throw ( ::com::sun::star::uno::Exception ); + void g_close_endTryClose_doClose(); + sal_Bool g_addCloseListener( const ::com::sun::star::uno::Reference< + ::com::sun::star::util::XCloseListener > & xListener ) + throw(::com::sun::star::uno::RuntimeException); + +protected: + virtual sal_Bool impl_canStartApiCall(); + virtual void impl_apiCallCountReachedNull(); + + void impl_setOwnership( sal_Bool bDeliverOwnership, sal_Bool bMyVeto ); + sal_Bool impl_shouldCloseAtNextChance(); + void impl_doClose(); + + void impl_init() + { + m_bClosed = sal_False; + m_bInTryClose = sal_False; + m_bOwnership = sal_False; + m_bOwnershipIsWellKnown = sal_False; + m_aEndTryClosingCondition.set(); + } +}; + +//----------------------------------------------------------------- +/* +Use this Guard in your apicalls to protect access on resources +which will be released in dispose. +It's guarantied, that the release of resources only starts if your +guarded call has finished. +! It's only partly guaranteed that this resources will not change during the call. +See the example for details. + +This class is to be used as described in the example. + +If this guard is used in all api calls of an XCloseable object +it's guarantied, that the closeable will close itself after finishing the last call +if it should do so. + + ::ApiCall +{ + //hold no mutex!!! + LifeTimeGuard aLifeTimeGuard(m_aLifeTimeManager); + + //mutex is acquired; call is not registered + + if(!aGuard.startApiCall()) + return ; //behave as passive as possible, if disposed or closed + + //mutex is acquired, call is registered + { + //you might access some private members here + //but than you need to protect access to these members always like this + //never call to the outside here + } + + aLifeTimeGuard.clear(); //!!! + + //Mutex is released, the running call is still registered + //this call will finish before the 'release-section' in dispose is allowed to start + + { + //you might access some private members here guarded with your own mutex + //but release your mutex at the end of this block + } + + //you can call to the outside (without holding the mutex) without becoming disposed + + //End of method -> ~LifeTimeGuard + //-> call is unregistered + //-> this object might be disposed now +} + +your XComponent::dispose method has to be implemented in the following way: + + ::dispose() +{ + //hold no mutex!!! + if( !m_aLifeTimeManager.dispose() ) + return; + + //--release all resources and references + //... +} + +*/ +//----------------------------------------------------------------- + +class LifeTimeGuard : public ::osl::ResettableMutexGuard +{ + +public: + LifeTimeGuard( LifeTimeManager& rManager ) + : ::osl::ResettableGuard< ::osl::Mutex >( rManager.m_aAccessMutex ) + , m_rManager(rManager) + , m_bCallRegistered(sal_False) + , m_bLongLastingCallRegistered(sal_False) + { + + } + sal_Bool startApiCall(sal_Bool bLongLastingCall=sal_False); + virtual ~LifeTimeGuard(); + +private: + LifeTimeManager& m_rManager; + sal_Bool m_bCallRegistered; + sal_Bool m_bLongLastingCallRegistered; + +private: + // these make no sense + LifeTimeGuard( ::osl::Mutex& rMutex ); + LifeTimeGuard( const LifeTimeGuard& ); + LifeTimeGuard& operator= ( const LifeTimeGuard& ); +}; + + +template<class T> +class NegativeGuard +{ +protected: + T * m_pT; +public: + + NegativeGuard(T * pT) : m_pT(pT) + { + m_pT->release(); + } + + NegativeGuard(T & t) : m_pT(&t) + { + m_pT->release(); + } + + ~NegativeGuard() + { + m_pT->acquire(); + } +}; + +}//end namespace apphelper +#endif diff --git a/chart2/source/inc/MediaDescriptorHelper.hxx b/chart2/source/inc/MediaDescriptorHelper.hxx new file mode 100644 index 000000000..61f55aeff --- /dev/null +++ b/chart2/source/inc/MediaDescriptorHelper.hxx @@ -0,0 +1,225 @@ +/************************************************************************* + * + * $RCSfile: MediaDescriptorHelper.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:29 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef _MEDIADESCRIPTORHELPER_HXX +#define _MEDIADESCRIPTORHELPER_HXX + +#ifndef _COM_SUN_STAR_UNO_SEQUENCE_HXX_ +#include <com/sun/star/uno/Sequence.hxx> +#endif +#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_ +#include <com/sun/star/beans/PropertyValue.hpp> +#endif +#ifndef _COM_SUN_STAR_UTIL_URL_HPP_ +#include <com/sun/star/util/URL.hpp> +#endif +#ifndef _COM_SUN_STAR_AWT_RECTANGLE_HPP_ +#include <com/sun/star/awt/Rectangle.hpp> +#endif + +/* +* This class helps to read and write the properties mentioned in the service description +* com.sun.star.document.MediaDescriptor from and to a sequence of PropertyValues. +* Properties that are not mentioned in the service description +* are stored in the member AdditionalProperties. +* +* As an additional feature this helper class can generate a reduced sequence of PropertyValues +* that does not contain properties which are known to be only view relevant. This +* reduced sequence than might be attached to a model directly. +*/ + +namespace apphelper +{ + +class MediaDescriptorHelper +{ +private: + //MediaDescriptorHelper(){}; +public: + MediaDescriptorHelper( const ::com::sun::star::uno::Sequence< + ::com::sun::star::beans::PropertyValue > & rMediaDescriptor ); + virtual ~MediaDescriptorHelper(); + + ::com::sun::star::uno::Sequence< + ::com::sun::star::beans::PropertyValue > getAll(); + ::com::sun::star::uno::Sequence< + ::com::sun::star::beans::PropertyValue > getReducedForModel(); + +public: + //--------------------- + //all properties given in the constructor are stored in the following three sequences + + ::com::sun::star::uno::Sequence< + ::com::sun::star::beans::PropertyValue > + m_aRegularProperties; //these are the properties which are described in service com.sun.star.document.MediaDescriptor and not marked as deprecated + + ::com::sun::star::uno::Sequence< + ::com::sun::star::beans::PropertyValue > + m_aDeprecatedProperties; //these are properties which are described in service com.sun.star.document.MediaDescriptor but are marked as deprecated + + ::com::sun::star::uno::Sequence< + ::com::sun::star::beans::PropertyValue > + m_aAdditionalProperties; //these are properties which are not described in service com.sun.star.document.MediaDescriptor + + //---------------------- + //properties which should be given to a model are additionally stored in this sequence (not documented properties and deprecated properties are not included!) + ::com::sun::star::uno::Sequence< + ::com::sun::star::beans::PropertyValue > + m_aModelProperties; //these are properties which are not described in service com.sun.star.document.MediaDescriptor + + + //@todo define this for debug only, except URL + sal_Bool AsTemplate; //document is a template. + sal_Bool ISSET_AsTemplate; + ::rtl::OUString Author; // + sal_Bool ISSET_Author; + ::rtl::OUString CharacterSet; //identifier of used character set. + sal_Bool ISSET_CharacterSet; + ::rtl::OUString Comment;// + sal_Bool ISSET_Comment; + + ::com::sun::star::uno::Any + ComponentData;// + sal_Bool ISSET_ComponentData; + ::rtl::OUString FileName; //deprecated, same as url + sal_Bool ISSET_FileName; + ::com::sun::star::uno::Any + FilterData;// + sal_Bool ISSET_FilterData; + ::rtl::OUString FilterName; //internal filter name. + sal_Bool ISSET_FilterName; + ::rtl::OUString FilterFlags;//deprecated, + sal_Bool ISSET_FilterFlags; + ::rtl::OUString FilterOptions;// + sal_Bool ISSET_FilterOptions; + //not documented ... @todo remove? + ::rtl::OUString FrameName; //name of target frame. + sal_Bool ISSET_FrameName; + sal_Bool Hidden; //load document, invisible. + sal_Bool ISSET_Hidden; + + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > + InputStream; //content of document. //::com::sun::star::io::XInputStream + sal_Bool ISSET_InputStream; + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > + InteractionHandler; // //::com::sun::star::task::XInteractionHandler + sal_Bool ISSET_InteractionHandler; + + ::rtl::OUString JumpMark; //specifies the name of a mark within the document where the first view is to position itself. + sal_Bool ISSET_JumpMark; + ::rtl::OUString MediaType; //mime type. + sal_Bool ISSET_MediaType; + ::rtl::OUString OpenFlags; //deprecated + sal_Bool ISSET_OpenFlags; + sal_Bool OpenNewView; //opens a new view for an already loaded document. + sal_Bool ISSET_OpenNewView; + sal_Bool Overwrite; //opens a new view for an already loaded document. + sal_Bool ISSET_Overwrite; + ::rtl::OUString Password; // + sal_Bool ISSET_Password; + + //not documented ... @todo remove? + ::com::sun::star::awt::Rectangle + PosSize; //position and size of document window. + sal_Bool ISSET_PosSize; + + ::com::sun::star::uno::Sequence< sal_Int8 > + PostData; //contains the data for HTTP post method as a sequence of bytes. + sal_Bool ISSET_PostData; + ::rtl::OUString PostString; //deprecated, contains the data for HTTP post method as a sequence of bytes. + sal_Bool ISSET_PostString; + sal_Bool Preview; //show preview. + sal_Bool ISSET_Preview; + sal_Bool ReadOnly; //open document readonly. + sal_Bool ISSET_ReadOnly; + ::rtl::OUString Referer; //name of document referrer. + sal_Bool ISSET_Referer; + + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > + StatusIndicator; // //::com::sun::star::task::XStatusIndicator + sal_Bool ISSET_StatusIndicator; + //not documented ... @todo remove? + sal_Bool Silent; //prevents dialogs to query for more information. + sal_Bool ISSET_Silent; + ::rtl::OUString TemplateName; //deprecated, name of the template instead of the URL. + sal_Bool ISSET_TemplateName; + ::rtl::OUString TemplateRegionName; //deprecated, name of the region of the template. + sal_Bool ISSET_TemplateRegionName; + sal_Bool Unpacked; + sal_Bool ISSET_Unpacked; + ::com::sun::star::util::URL + URL;// FileName, URL of the document. + sal_Bool ISSET_URL; + sal_Int16 Version; //storage version. + sal_Bool ISSET_Version; + + ::com::sun::star::uno::Any + ViewData;// + sal_Bool ISSET_ViewData; + sal_Int16 ViewId; //id of the initial view. + sal_Bool ISSET_ViewId; + +protected: + void impl_init(); +}; + +} + +#endif diff --git a/chart2/source/inc/MutexContainer.hxx b/chart2/source/inc/MutexContainer.hxx new file mode 100644 index 000000000..105b7cff8 --- /dev/null +++ b/chart2/source/inc/MutexContainer.hxx @@ -0,0 +1,88 @@ +/************************************************************************* + * + * $RCSfile: MutexContainer.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:29 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef CHART_MUTEXCONTAINER_HXX +#define CHART_MUTEXCONTAINER_HXX + +#ifndef _OSL_MUTEX_HXX_ +#include <osl/mutex.hxx> +#endif + +namespace chart +{ +namespace helper +{ + +class MutexContainer +{ +public: + virtual ~MutexContainer(); + +protected: + mutable ::osl::Mutex m_aMutex; + + virtual ::osl::Mutex & GetMutex() const; +}; + +} // namespace helper +} // namespace chart + +// CHART_MUTEXCONTAINER_HXX +#endif diff --git a/chart2/source/inc/OEnumeration.hxx b/chart2/source/inc/OEnumeration.hxx new file mode 100644 index 000000000..60adfb673 --- /dev/null +++ b/chart2/source/inc/OEnumeration.hxx @@ -0,0 +1,101 @@ +/************************************************************************* + * + * $RCSfile: OEnumeration.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:29 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef CHART_OENUMERATION_HXX +#define CHART_OENUMERATION_HXX + +#ifndef _CPPUHELPER_IMPLBASE1_HXX_ +#include <cppuhelper/implbase1.hxx> +#endif +#ifndef _COM_SUN_STAR_CONTAINER_XENUMERATION_HPP_ +#include <com/sun/star/container/XEnumeration.hpp> +#endif + +#include <vector> + +namespace comphelper +{ + +class OEnumeration : + public ::cppu::WeakImplHelper1< + ::com::sun::star::container::XEnumeration > +{ +public: + OEnumeration( const ::std::vector< ::com::sun::star::uno::Any > & rContainer ); + virtual ~OEnumeration(); + +protected: + // ____ XEnumeration ____ + virtual sal_Bool SAL_CALL hasMoreElements() + throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL nextElement() + throw (::com::sun::star::container::NoSuchElementException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + +private: + ::std::vector< ::com::sun::star::uno::Any > m_aContainer; + ::std::vector< ::com::sun::star::uno::Any >::const_iterator m_aIter; +}; + +} // namespace comphelper + +// CHART_OENUMERATION_HXX +#endif diff --git a/chart2/source/inc/OIndexContainer.hxx b/chart2/source/inc/OIndexContainer.hxx new file mode 100644 index 000000000..6171839c9 --- /dev/null +++ b/chart2/source/inc/OIndexContainer.hxx @@ -0,0 +1,152 @@ +/************************************************************************* + * + * $RCSfile: OIndexContainer.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:29 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef CHART_OINDEXCONTAINER_HXX +#define CHART_OINDEXCONTAINER_HXX + +#ifndef _CPPUHELPER_IMPLBASE1_HXX_ +#include <cppuhelper/implbase1.hxx> +#endif +#ifndef _OSL_MUTEX_HXX_ +#include <osl/mutex.hxx> +#endif + +#ifndef _COM_SUN_STAR_CONTAINER_XINDEXCONTAINER_HPP_ +#include <com/sun/star/container/XIndexContainer.hpp> +#endif +#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_ +#include <com/sun/star/lang/XServiceInfo.hpp> +#endif +#ifndef _COM_SUN_STAR_LANG_XTYPEPROVIDER_HPP_ +#include <com/sun/star/lang/XTypeProvider.hpp> +#endif + +#include <vector> + +namespace comphelper +{ + +class OIndexContainer : + public ::com::sun::star::container::XIndexContainer +{ +public: + explicit OIndexContainer( ::osl::Mutex & rMutex ); + virtual ~OIndexContainer(); + + ::osl::Mutex & GetMutex(); + + // ____ XInterface ____ + virtual ::com::sun::star::uno::Any SAL_CALL + queryInterface( const ::com::sun::star::uno::Type& aType ) + throw (::com::sun::star::uno::RuntimeException); + +protected: + /// implemented as a standard-library vector + typedef ::std::vector< ::com::sun::star::uno::Any > tHelperContainerType; + + /// allows direct standard-library access to the container + tHelperContainerType m_aContainer; + + // you have to implement this in derived classes + // ____ XElementAccess ____ +// virtual ::com::sun::star::uno::Type SAL_CALL getElementType() +// throw (::com::sun::star::uno::RuntimeException) = 0; + + // implemented by this class + // ========================= + + // ____ XIndexContainer ____ + virtual void SAL_CALL insertByIndex( sal_Int32 Index, const ::com::sun::star::uno::Any& Element ) + throw (::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::lang::IndexOutOfBoundsException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeByIndex( sal_Int32 Index ) + throw (::com::sun::star::lang::IndexOutOfBoundsException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + + // ____ XIndexReplace ____ + virtual void SAL_CALL replaceByIndex( sal_Int32 Index, const ::com::sun::star::uno::Any& Element ) + throw (::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::lang::IndexOutOfBoundsException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + + // ____ XIndexAccess ____ + virtual sal_Int32 SAL_CALL getCount() + throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index ) + throw (::com::sun::star::lang::IndexOutOfBoundsException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + + // ____ XElementAccess ____ + virtual sal_Bool SAL_CALL hasElements() + throw (::com::sun::star::uno::RuntimeException); + +private: + ::osl::Mutex & m_rMutex; +}; + +} // namespace comphelper + +// CHART_OINDEXCONTAINER_HXX +#endif diff --git a/chart2/source/inc/OPropertySet.hxx b/chart2/source/inc/OPropertySet.hxx new file mode 100644 index 000000000..ce271c2ed --- /dev/null +++ b/chart2/source/inc/OPropertySet.hxx @@ -0,0 +1,346 @@ +/************************************************************************* + * + * $RCSfile: OPropertySet.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:29 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef CHART_OPROPERTYSET_HXX +#define CHART_OPROPERTYSET_HXX + +// helper classes +#ifndef _CPPUHELPER_PROPSHLP_HXX +#include <cppuhelper/propshlp.hxx> +#endif +#ifndef _CPPUHELPER_INTERFACECONTAINER_HXX_ +#include <cppuhelper/interfacecontainer.hxx> +#endif +#ifndef _CPPUHELPER_WEAK_HXX_ +#include <cppuhelper/weak.hxx> +#endif + +// interfaces and types +// #ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_ +// #include <com/sun/star/lang/XServiceInfo.hpp> +// #endif +#ifndef _COM_SUN_STAR_LANG_XTYPEPROVIDER_HPP_ +#include <com/sun/star/lang/XTypeProvider.hpp> +#endif +#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSTATE_HPP_ +#include <com/sun/star/beans/XPropertyState.hpp> +#endif +#ifndef _COM_SUN_STAR_BEANS_XMULTIPROPERTYSTATES_HPP_ +#include <com/sun/star/beans/XMultiPropertyStates.hpp> +#endif +#ifndef _COM_SUN_STAR_BEANS_PROPERTY_HPP_ +#include <com/sun/star/beans/Property.hpp> +#endif + +#ifndef _DRAFTS_COM_SUN_STAR_STYLE_XSTYLESUPPLIER_HPP_ +#include <drafts/com/sun/star/style/XStyleSupplier.hpp> +#endif +// #ifndef _DRAFTS_COM_SUN_STAR_BEANS_XFASTPROPERTYSTATE_HPP_ +// #include <drafts/com/sun/star/beans/XFastPropertyState.hpp> +// #endif + +#ifndef _OSL_MUTEX_HXX_ +#include <osl/mutex.hxx> +#endif + +#include <memory> + +namespace property +{ + +namespace impl +{ class ImplOPropertySet; } + + +class OPropertySet : + public ::cppu::OBroadcastHelper, + // includes beans::XPropertySet, XMultiPropertySet and XFastPropertySet + public ::cppu::OPropertySetHelper, + // includes uno::XWeak (and XInterface, esp. ref-counting) +// public virtual ::cppu::OWeakObject, + +// public virtual ::com::sun::star::lang::XServiceInfo, + public ::com::sun::star::lang::XTypeProvider, + public ::com::sun::star::beans::XPropertyState, + public ::com::sun::star::beans::XMultiPropertyStates, + public ::drafts::com::sun::star::style::XStyleSupplier +// public ::drafts::com::sun::star::beans::XFastPropertyState +{ +public: + OPropertySet( ::osl::Mutex & rMutex ); + virtual ~OPropertySet(); + +protected: + /** implement this method to provide default values for all properties + supporting defaults. If a property does not have a default value, you + may throw an UnknownPropertyException. + */ + virtual ::com::sun::star::uno::Any GetDefaultValue( sal_Int32 nHandle ) const + throw(::com::sun::star::beans::UnknownPropertyException) = 0; + + /** The InfoHelper table contains all property names and types of + this object. + + @return the object that provides information for the + PropertySetInfo + + @see ::cppu::OPropertySetHelper + */ + virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() = 0; + + // ____ XPropertySet ____ + /** sample implementation using the InfoHelper: + + <pre> + uno::Reference< beans::XPropertySetInfo > SAL_CALL + OPropertySet::getPropertySetInfo() + throw (uno::RuntimeException) + { + static uno::Reference< beans::XPropertySetInfo > xInfo; + + // /-- + ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); + if( !xInfo.is()) + { + xInfo = ::cppu::OPropertySetHelper::createPropertySetInfo( + getInfoHelper()); + } + + return xInfo; + // \-- + } + </pre> + + <p>(The reason why this isn't implemented here is, that the static + object is only valid per concrete PropertySet. Otherwise all + PropertySets derived from this base calss would have the same + properties.)</p> + + @see ::cppu::OPropertySetHelper + */ + virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL + getPropertySetInfo() + throw (::com::sun::star::uno::RuntimeException) = 0; + + /** Try to convert the value <code>rValue</code> to the type required by the + property associated with <code>nHandle</code>. + + Overload this method to take influence in modification of properties. + + If the conversion changed , </TRUE> is returned and the converted value + is in <code>rConvertedValue</code>. The former value is contained in + <code>rOldValue</code>. + + After this call returns successfully, the vetoable listeners are + notified. + + @throws IllegalArgumentException, if the conversion was not successful, + or if there is no corresponding property to the given handle. + + @param rConvertedValue the converted value. Only set if return is true. + @param rOldValue the old value. Only set if return is true. + @param nHandle the handle of the property. + + @return true, if the conversion was successful and converted value + differs from the old value. + + @see ::cppu::OPropertySetHelper + */ + virtual sal_Bool SAL_CALL convertFastPropertyValue + ( ::com::sun::star::uno::Any & rConvertedValue, + ::com::sun::star::uno::Any & rOldValue, + sal_Int32 nHandle, + const ::com::sun::star::uno::Any& rValue ) + throw (::com::sun::star::lang::IllegalArgumentException); + + /** The same as setFastProperyValue; nHandle is always valid. + The changes must not be broadcasted in this method. + + @attention + Although you are permitted to throw any UNO exception, only the following + are valid for usage: + -- ::com::sun::star::beans::UnknownPropertyException + -- ::com::sun::star::beans::PropertyVetoException + -- ::com::sun::star::lang::IllegalArgumentException + -- ::com::sun::star::lang::WrappedTargetException + -- ::com::sun::star::uno::RuntimeException + + @param nHandle handle + @param rValue value + + @see ::cppu::OPropertySetHelper + */ + virtual void SAL_CALL setFastPropertyValue_NoBroadcast + ( sal_Int32 nHandle, + const ::com::sun::star::uno::Any& rValue ) + throw (::com::sun::star::uno::Exception); + + /** + The same as getFastProperyValue, but return the value through rValue and + nHandle is always valid. + + @see ::cppu::OPropertySetHelper + */ + virtual void SAL_CALL getFastPropertyValue + ( ::com::sun::star::uno::Any& rValue, + sal_Int32 nHandle ) const; + + /// make original interface function visible again + using ::com::sun::star::beans::XFastPropertySet::getFastPropertyValue; + + // ======================================== + // Interfaces + // ======================================== + + // ____ XInterface ____ + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) + throw (::com::sun::star::uno::RuntimeException); +// virtual void SAL_CALL acquire() throw (); +// virtual void SAL_CALL release() throw (); + + + // ____ XServiceInfo ____ +// virtual ::rtl::OUString SAL_CALL +// getImplementationName() +// throw (::com::sun::star::uno::RuntimeException); +// virtual sal_Bool SAL_CALL +// supportsService( const ::rtl::OUString& ServiceName ) +// throw (::com::sun::star::uno::RuntimeException); +// virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL +// getSupportedServiceNames() +// throw (::com::sun::star::uno::RuntimeException); + + // ____ XTypeProvider ____ + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL + getTypes() + throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL + getImplementationId() + throw (::com::sun::star::uno::RuntimeException); + + // ____ XPropertyState ____ + virtual ::com::sun::star::beans::PropertyState SAL_CALL + getPropertyState( const ::rtl::OUString& PropertyName ) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL + getPropertyStates( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyName ) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL + setPropertyToDefault( const ::rtl::OUString& PropertyName ) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL + getPropertyDefault( const ::rtl::OUString& aPropertyName ) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + + // ____ XMultiPropertyStates ____ + // Note: getPropertyStates() is already implemented in XPropertyState with the + // same signature + virtual void SAL_CALL + setAllPropertiesToDefault() + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL + setPropertiesToDefault( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL + getPropertyDefaults( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + + // ____ XStyleSupplier ____ + virtual ::com::sun::star::uno::Reference< ::com::sun::star::style::XStyle > SAL_CALL getStyle() + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setStyle( const ::com::sun::star::uno::Reference< ::com::sun::star::style::XStyle >& xStyle ) + throw (::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::uno::RuntimeException); + + // ____ XFastPropertyState ____ +// virtual ::com::sun::star::beans::PropertyState SAL_CALL getFastPropertyState( sal_Int32 nHandle ) +// throw (::com::sun::star::beans::UnknownPropertyException, +// ::com::sun::star::uno::RuntimeException); +// virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL getFastPropertyStates( const ::com::sun::star::uno::Sequence< sal_Int32 >& aHandles ) +// throw (::com::sun::star::beans::UnknownPropertyException, +// ::com::sun::star::uno::RuntimeException); +// virtual void SAL_CALL setFastPropertyToDefault( sal_Int32 nHandle ) +// throw (::com::sun::star::beans::UnknownPropertyException, +// ::com::sun::star::uno::RuntimeException); +// virtual ::com::sun::star::uno::Any SAL_CALL getFastPropertyDefault( sal_Int32 nHandle ) +// throw (::com::sun::star::beans::UnknownPropertyException, +// ::com::sun::star::lang::WrappedTargetException, +// ::com::sun::star::uno::RuntimeException); + +private: + /// reference to mutex of class deriving from here + ::osl::Mutex & m_rMutex; + + /// pImpl idiom implementation + ::std::auto_ptr< impl::ImplOPropertySet > m_pImplProperties; +}; + +} // namespace property + +// CHART_OPROPERTYSET_HXX +#endif diff --git a/chart2/source/inc/OStyle.hxx b/chart2/source/inc/OStyle.hxx new file mode 100644 index 000000000..b18ee46ff --- /dev/null +++ b/chart2/source/inc/OStyle.hxx @@ -0,0 +1,152 @@ +/************************************************************************* + * + * $RCSfile: OStyle.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:29 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef CHART_OSTYLE_HXX +#define CHART_OSTYLE_HXX + +#include "OPropertySet.hxx" + +#ifndef _COM_SUN_STAR_STYLE_XSTYLE_HPP_ +#include <com/sun/star/style/XStyle.hpp> +#endif +#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_ +#include <com/sun/star/container/XNameAccess.hpp> +#endif + +namespace property +{ + +class OStyle : + public OPropertySet, + public ::com::sun::star::style::XStyle +{ +public: + OStyle( const ::com::sun::star::uno::Reference< + ::com::sun::star::container::XNameAccess > &xStyleFamily, + ::osl::Mutex & rMutex ); + virtual ~OStyle(); + + ::osl::Mutex & GetMutex(); + +// inline SAL_CALL operator ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > () throw () +// { return static_cast< ::cppu::OWeakObject * >( this ); } + +protected: + + // ____ XStyle ____ + virtual sal_Bool SAL_CALL isUserDefined() + throw (::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL isInUse() + throw (::com::sun::star::uno::RuntimeException); + virtual ::rtl::OUString SAL_CALL getParentStyle() + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setParentStyle( const ::rtl::OUString& aParentStyle ) + throw (::com::sun::star::container::NoSuchElementException, + ::com::sun::star::uno::RuntimeException); + + // ____ XNamed (base of XStyle) ____ + virtual ::rtl::OUString SAL_CALL getName() + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setName( const ::rtl::OUString& aName ) + throw (::com::sun::star::uno::RuntimeException); + + // necessary overloads from OPropertySet + + // ____ XInterface ____ + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) + throw (::com::sun::star::uno::RuntimeException); +// virtual void SAL_CALL acquire() throw (); +// virtual void SAL_CALL release() throw (); + + // ____ XServiceInfo ____ +// virtual ::rtl::OUString SAL_CALL +// getImplementationName() +// throw (::com::sun::star::uno::RuntimeException); +// virtual sal_Bool SAL_CALL +// supportsService( const ::rtl::OUString& ServiceName ) +// throw (::com::sun::star::uno::RuntimeException); +// virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL +// getSupportedServiceNames() +// throw (::com::sun::star::uno::RuntimeException); + + // ____ XTypeProvider ____ +// virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL +// getTypes() +// throw (::com::sun::star::uno::RuntimeException); +// virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL +// getImplementationId() +// throw (::com::sun::star::uno::RuntimeException); + +private: + ::com::sun::star::uno::Reference< + ::com::sun::star::container::XNameAccess > m_xStyleFamily; + + ::rtl::OUString m_aName; + ::rtl::OUString m_aParentStyleName; + sal_Bool m_bUserDefined; + + ::osl::Mutex & m_rMutex; +}; + +} // namespace property + +// CHART_OSTYLE_HXX +#endif + diff --git a/chart2/source/inc/Scaling.hxx b/chart2/source/inc/Scaling.hxx new file mode 100644 index 000000000..4993bdfe3 --- /dev/null +++ b/chart2/source/inc/Scaling.hxx @@ -0,0 +1,203 @@ +/************************************************************************* + * + * $RCSfile: Scaling.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:29 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef _CHART2_SCALING_HXX +#define _CHART2_SCALING_HXX + +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XSCALING_HPP_ +#include <drafts/com/sun/star/chart2/XScaling.hpp> +#endif +#ifndef _COM_SUN_STAR_LANG_XSERVICENAME_HPP_ +#include <com/sun/star/lang/XServiceName.hpp> +#endif + +#ifndef _CPPUHELPER_IMPLBASE2_HXX_ +#include <cppuhelper/implbase2.hxx> +#endif + +//............................................................................. +namespace chart +{ +//............................................................................. + +//----------------------------------------------------------------------------- +/** +*/ + +class LogarithmicScaling : public ::cppu::WeakImplHelper2 < + ::drafts::com::sun::star::chart2::XScaling, + ::com::sun::star::lang::XServiceName + > +{ +public: + LogarithmicScaling(); + explicit LogarithmicScaling( double fBase ); + virtual ~LogarithmicScaling(); + + // ____ XScaling ____ + virtual double SAL_CALL + doScaling( double value ) + throw (::com::sun::star::uno::RuntimeException); + + virtual ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XScaling > SAL_CALL + getInverseScaling() throw (::com::sun::star::uno::RuntimeException); + + // ____ XServiceName ____ + virtual ::rtl::OUString SAL_CALL getServiceName() + throw (::com::sun::star::uno::RuntimeException); + +private: + const double m_fBase; + const double m_fLogOfBase; +}; + +// ---------------------------------------- + +class ExponentialScaling : public ::cppu::WeakImplHelper2 < + ::drafts::com::sun::star::chart2::XScaling, + ::com::sun::star::lang::XServiceName + > +{ +public: + ExponentialScaling(); + explicit ExponentialScaling( double fBase ); + virtual ~ExponentialScaling(); + + // ____ XScaling ____ + virtual double SAL_CALL + doScaling( double value ) + throw (::com::sun::star::uno::RuntimeException); + + virtual ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XScaling > SAL_CALL + getInverseScaling() throw (::com::sun::star::uno::RuntimeException); + + // ____ XServiceName ____ + virtual ::rtl::OUString SAL_CALL getServiceName() + throw (::com::sun::star::uno::RuntimeException); + +private: + const double m_fBase; +}; + +// ---------------------------------------- + +class LinearScaling : public ::cppu::WeakImplHelper2 < + ::drafts::com::sun::star::chart2::XScaling, + ::com::sun::star::lang::XServiceName + > +{ +public: + /// y(x) = fSlope * x + fOffset + LinearScaling( double fSlope, double fOffset ); + virtual ~LinearScaling(); + + // ____ XScaling ____ + virtual double SAL_CALL + doScaling( double value ) + throw (::com::sun::star::uno::RuntimeException); + + virtual ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XScaling > SAL_CALL + getInverseScaling() throw (::com::sun::star::uno::RuntimeException); + + // ____ XServiceName ____ + virtual ::rtl::OUString SAL_CALL getServiceName() + throw (::com::sun::star::uno::RuntimeException); + +private: + const double m_fSlope; + const double m_fOffset; +}; + +// ---------------------------------------- + +class PowerScaling : public ::cppu::WeakImplHelper2 < + ::drafts::com::sun::star::chart2::XScaling, + ::com::sun::star::lang::XServiceName + > +{ +public: + PowerScaling( double fExponent ); + virtual ~PowerScaling(); + + // ____ XScaling ____ + virtual double SAL_CALL + doScaling( double value ) + throw (::com::sun::star::uno::RuntimeException); + + virtual ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XScaling > SAL_CALL + getInverseScaling() throw (::com::sun::star::uno::RuntimeException); + + // ____ XServiceName ____ + virtual ::rtl::OUString SAL_CALL getServiceName() + throw (::com::sun::star::uno::RuntimeException); + +private: + const double m_fExponent; +}; + +//............................................................................. +} //namespace chart +//............................................................................. +#endif + diff --git a/chart2/source/inc/ServiceMacros.hxx b/chart2/source/inc/ServiceMacros.hxx new file mode 100644 index 000000000..3a92dc84d --- /dev/null +++ b/chart2/source/inc/ServiceMacros.hxx @@ -0,0 +1,182 @@ +/************************************************************************* + * + * $RCSfile: ServiceMacros.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:29 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef _APPHELPER_SERVICEMACROS_HXX +#define _APPHELPER_SERVICEMACROS_HXX + +/* +to use these macros the supported services and the implementation name needs to be static +especially you need to implement (declaration is contained in macro already): + +static com::sun::star::uno::Sequence< rtl::OUString > + Class::getSupportedServiceNames_Static(); +*/ + +//========================================================================= +// +// XServiceInfo decl +// +//========================================================================= +namespace apphelper +{ + +#define APPHELPER_XSERVICEINFO_DECL() \ + virtual ::rtl::OUString SAL_CALL \ + getImplementationName() \ + throw( ::com::sun::star::uno::RuntimeException ); \ + virtual sal_Bool SAL_CALL \ + supportsService( const ::rtl::OUString& ServiceName ) \ + throw( ::com::sun::star::uno::RuntimeException ); \ + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL \ + getSupportedServiceNames() \ + throw( ::com::sun::star::uno::RuntimeException ); \ + \ + static ::rtl::OUString getImplementationName_Static(); \ + static ::com::sun::star::uno::Sequence< ::rtl::OUString > \ + getSupportedServiceNames_Static(); + +//========================================================================= +// +// XServiceInfo impl +// +//========================================================================= + +#define APPHELPER_XSERVICEINFO_IMPL( Class, ImplName ) \ +::rtl::OUString SAL_CALL Class::getImplementationName() \ + throw( ::com::sun::star::uno::RuntimeException ) \ +{ \ + return getImplementationName_Static(); \ +} \ + \ +::rtl::OUString Class::getImplementationName_Static() \ +{ \ + return ImplName; \ +} \ + \ +sal_Bool SAL_CALL \ +Class::supportsService( const ::rtl::OUString& ServiceName ) \ + throw( ::com::sun::star::uno::RuntimeException ) \ +{ \ + ::com::sun::star::uno::Sequence< ::rtl::OUString > aSNL = \ + getSupportedServiceNames(); \ + const ::rtl::OUString* pArray = aSNL.getArray(); \ + for( sal_Int32 i = 0; i < aSNL.getLength(); i++ ) \ + { \ + if( pArray[ i ] == ServiceName ) \ + return sal_True; \ + } \ + \ + return sal_False; \ +} \ + \ +::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL \ +Class::getSupportedServiceNames() \ + throw( ::com::sun::star::uno::RuntimeException ) \ +{ \ + return getSupportedServiceNames_Static(); \ +} + +//========================================================================= +// +// Service factory helper decl+impl +// +//to use this macro you need to provide a constructor: +//class( Reference< XComponentContext > const & xContext ) +//and implement OWeakObject +//========================================================================= + +#define APPHELPER_SERVICE_FACTORY_HELPER(Class) \ +static ::com::sun::star::uno::Reference< \ + ::com::sun::star::uno::XInterface > SAL_CALL \ + create( ::com::sun::star::uno::Reference< \ + ::com::sun::star::uno::XComponentContext > const & xContext) \ + throw(::com::sun::star::uno::Exception) \ +{ \ + return (::cppu::OWeakObject *)new Class( xContext ); \ +} + +/** This macro contains the default implementation for getImplementationId(). + Note, that you have to include the header necessary for rtl_createUuid. + Insert the following into your file: + + <code> +#ifndef _RTL_UUID_H_ +#include <rtl/uuid.h> +#endif + </code> + + @param Class the Class-Name for which getImplementationId() should be + implemented + */ +#define APPHELPER_GETIMPLEMENTATIONID_IMPL(Class) \ +::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL Class::getImplementationId() \ + throw (::com::sun::star::uno::RuntimeException) \ +{ \ + static ::com::sun::star::uno::Sequence< sal_Int8 > aId; \ + if( aId.getLength() == 0 ) \ + { \ + aId.realloc( 16 ); \ + rtl_createUuid( (sal_uInt8 *)aId.getArray(), 0, sal_True ); \ + } \ + return aId; \ +} + +}//end namespace apphelper +#endif diff --git a/chart2/source/inc/TitleHelper.hxx b/chart2/source/inc/TitleHelper.hxx new file mode 100644 index 000000000..85840d632 --- /dev/null +++ b/chart2/source/inc/TitleHelper.hxx @@ -0,0 +1,127 @@ +/************************************************************************* + * + * $RCSfile: TitleHelper.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:29 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef _CHART2_TOOLS_TITLEHELPER_HXX +#define _CHART2_TOOLS_TITLEHELPER_HXX + +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XTITLED_HPP_ +#include <drafts/com/sun/star/chart2/XTitled.hpp> +#endif + +#ifndef _COM_SUN_STAR_FRAME_XMODEL_HPP_ +#include <com/sun/star/frame/XModel.hpp> +#endif +#ifndef _COM_SUN_STAR_UNO_XCOMPONENTCONTEXT_HPP_ +#include <com/sun/star/uno/XComponentContext.hpp> +#endif + +//............................................................................. +namespace chart +{ +//............................................................................. + +class TitleHelper +{ +public: + enum eTitleType + { + MAIN_TITLE, + SUB_TITLE, + X_AXIS_TITLE, + Y_AXIS_TITLE, + Z_AXIS_TITLE, + SECOND_X_AXIS_TITLE, + SECOND_Y_AXIS_TITLE + }; + + static rtl::OUString getIdentifierForTitle( eTitleType nTitleIndex ); + + static ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XTitle > + getTitle( eTitleType nTitleIndex + , const ::com::sun::star::uno::Reference< + ::com::sun::star::frame::XModel >& xModel ); + + static ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XTitle > + createTitle( eTitleType nTitleIndex + , const rtl::OUString& rTitleText + , const ::com::sun::star::uno::Reference< + ::com::sun::star::frame::XModel >& xModel + , const ::com::sun::star::uno::Reference< + ::com::sun::star::uno::XComponentContext > & xContext ); + + static void removeTitle( eTitleType nTitleIndex + , const ::com::sun::star::uno::Reference< + ::com::sun::star::frame::XModel >& xModel ); + + static rtl::OUString getCompleteString( const ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XTitle >& xTitle ); + static void setCompleteString( const rtl::OUString& rNewText + , const ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XTitle >& xTitle + , const ::com::sun::star::uno::Reference< + ::com::sun::star::uno::XComponentContext > & xContext ); +}; + +//............................................................................. +} //namespace chart +//............................................................................. +#endif diff --git a/chart2/source/inc/chartview/ExplicitValueProvider.hxx b/chart2/source/inc/chartview/ExplicitValueProvider.hxx new file mode 100644 index 000000000..35339c6eb --- /dev/null +++ b/chart2/source/inc/chartview/ExplicitValueProvider.hxx @@ -0,0 +1,96 @@ +/************************************************************************* + * + * $RCSfile: ExplicitValueProvider.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:29 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef _CHART2_EXPLICITVALUEPROVIDER_HXX +#define _CHART2_EXPLICITVALUEPROVIDER_HXX + +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_EXPLICITINCREMENTDATA_HPP_ +#include <drafts/com/sun/star/chart2/ExplicitIncrementData.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_EXPLICITSCALEDATA_HPP_ +#include <drafts/com/sun/star/chart2/ExplicitScaleData.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XMETER_HPP_ +#include <drafts/com/sun/star/chart2/XMeter.hpp> +#endif + +//............................................................................. +namespace chart +{ +//............................................................................. + +//----------------------------------------------------------------------------- +/** +*/ + +class ExplicitValueProvider +{ +public: + virtual void getExplicitValuesForMeter( + ::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XMeter > xMeter + , ::drafts::com::sun::star::chart2::ExplicitScaleData& rExplicitScale + , ::drafts::com::sun::star::chart2::ExplicitIncrementData& rExplicitIncrement + , double& rfExplicitOrigin )=0; +}; + +//............................................................................. +} //namespace chart +//............................................................................. +#endif diff --git a/chart2/source/inc/chartview/NumberFormatterWrapper.hxx b/chart2/source/inc/chartview/NumberFormatterWrapper.hxx new file mode 100644 index 000000000..9bff634e1 --- /dev/null +++ b/chart2/source/inc/chartview/NumberFormatterWrapper.hxx @@ -0,0 +1,119 @@ +/************************************************************************* + * + * $RCSfile: NumberFormatterWrapper.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:29 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef _CHART2_VIEW_NUMBERFORMATTERWRAPPER_HXX +#define _CHART2_VIEW_NUMBERFORMATTERWRAPPER_HXX + +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_NUMBERFORMAT_HPP_ +#include <drafts/com/sun/star/chart2/NumberFormat.hpp> +#endif + +//only needed for temp numberformatter +#ifndef _ZFORLIST_HXX +#include <svtools/zforlist.hxx> +#endif + +//............................................................................. +namespace chart +{ +//............................................................................. + +//----------------------------------------------------------------------------- +/** +*/ +class FixedNumberFormatter; + +class NumberFormatterWrapper +{ +public: + NumberFormatterWrapper(); + virtual ~NumberFormatterWrapper(); + + ::drafts::com::sun::star::chart2::NumberFormat getNumberFormatForKey( sal_Int32 nIndex ) const; + sal_Int32 getKeyForNumberFormat( const ::drafts::com::sun::star::chart2::NumberFormat& rNumberFormat ) const; + + //this method should only be used by the ViewElementListProvider + SvNumberFormatter* getSvNumberFormatter() const; + +private: //private member + SvNumberFormatter* m_pNumberFormatter; + +friend class FixedNumberFormatter; +}; + + +class FixedNumberFormatter +{ +public: + FixedNumberFormatter( NumberFormatterWrapper* pNumberFormatterWrapper + , const ::drafts::com::sun::star::chart2::NumberFormat& rNumberFormat ); + virtual ~FixedNumberFormatter(); + + rtl::OUString getFormattedString( double fValue, sal_Int32& rLabelColor, bool& rbColorChanged ) const; + +private: + NumberFormatterWrapper* m_pNumberFormatterWrapper; + ULONG m_nFormatIndex; +}; + +//............................................................................. +} //namespace chart +//............................................................................. +#endif diff --git a/chart2/source/inc/chartview/servicenames_charttypes.hxx b/chart2/source/inc/chartview/servicenames_charttypes.hxx new file mode 100644 index 000000000..7605e744a --- /dev/null +++ b/chart2/source/inc/chartview/servicenames_charttypes.hxx @@ -0,0 +1,81 @@ +/************************************************************************* + * + * $RCSfile: servicenames_charttypes.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:29 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef _CHART2_SERVICENAMES_CHARTTYPES_HXX +#define _CHART2_SERVICENAMES_CHARTTYPES_HXX + +//............................................................................. +namespace chart +{ +//............................................................................. + +#define CHART2_VIEW_BARCHART_SERVICE_IMPLEMENTATION_NAME ::rtl::OUString::createFromAscii("com.sun.star.chart2.BarChart_Impl") +#define CHART2_VIEW_BARCHART_SERVICE_NAME ::rtl::OUString::createFromAscii("com.sun.star.chart2.BarChart") + +#define CHART2_VIEW_PIECHART_SERVICE_IMPLEMENTATION_NAME ::rtl::OUString::createFromAscii("com.sun.star.chart2.PieChart_Impl") +#define CHART2_VIEW_PIECHART_SERVICE_NAME ::rtl::OUString::createFromAscii("com.sun.star.chart2.PieChart") + +#define CHART2_VIEW_AREACHART_SERVICE_IMPLEMENTATION_NAME ::rtl::OUString::createFromAscii("com.sun.star.chart2.AreaChart_Impl") +#define CHART2_VIEW_AREACHART_SERVICE_NAME ::rtl::OUString::createFromAscii("com.sun.star.chart2.AreaChart") + +//............................................................................. +} //namespace chart +//............................................................................. +#endif diff --git a/chart2/source/inc/exports.dxp b/chart2/source/inc/exports.dxp new file mode 100644 index 000000000..9630d7e06 --- /dev/null +++ b/chart2/source/inc/exports.dxp @@ -0,0 +1,3 @@ +component_getImplementationEnvironment +component_writeInfo +component_getFactory diff --git a/chart2/source/inc/macros.hxx b/chart2/source/inc/macros.hxx new file mode 100644 index 000000000..30626d40d --- /dev/null +++ b/chart2/source/inc/macros.hxx @@ -0,0 +1,76 @@ +/************************************************************************* + * + * $RCSfile: macros.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:29 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2002 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef CHART_MACROS_HXX +#define CHART_MACROS_HXX + +/// creates a unicode-string from an ASCII string +#define C2U(constAsciiStr) (::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( constAsciiStr ) )) + +/// shows an error-box for an exception ex +#define ASSERT_EXCEPTION(ex) \ + OSL_ENSURE( false, ::rtl::OUStringToOString( \ + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Exception caught: " )) + \ + ex.Message, RTL_TEXTENCODING_ASCII_US ).getStr()); + +#define U2C(ouString) (::rtl::OUStringToOString(ouString,RTL_TEXTENCODING_ASCII_US).getStr()) + +// CHART_MACROS_HXX +#endif diff --git a/chart2/source/inc/servicenames.hxx b/chart2/source/inc/servicenames.hxx new file mode 100644 index 000000000..300ea20e9 --- /dev/null +++ b/chart2/source/inc/servicenames.hxx @@ -0,0 +1,84 @@ +/************************************************************************* + * + * $RCSfile: servicenames.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:29 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef _CHART_SERVICENAMES_HXX +#define _CHART_SERVICENAMES_HXX + +//............................................................................. +namespace chart +{ +//............................................................................. + +#define CHART_MODEL_SERVICE_IMPLEMENTATION_NAME ::rtl::OUString::createFromAscii("com.sun.star.comp.chart2.ChartModel") +#define CHART_MODEL_SERVICE_NAME ::rtl::OUString::createFromAscii("com.sun.star.chart2.ChartModel") +//@todo create your own service containing the service com.sun.star.document.OfficeDocument + +#define CHART_CONTROLLER_SERVICE_IMPLEMENTATION_NAME ::rtl::OUString::createFromAscii("com.sun.star.comp.chart2.ChartController") +#define CHART_CONTROLLER_SERVICE_NAME ::rtl::OUString::createFromAscii("com.sun.star.chart2.ChartController") +//@todo create your own service containing the service com.sun.star.frame.Controller + +#define CHART_FRAMELOADER_SERVICE_IMPLEMENTATION_NAME ::rtl::OUString::createFromAscii("com.sun.star.comp.chart2.ChartFrameLoader") +#define CHART_FRAMELOADER_SERVICE_NAME ::rtl::OUString::createFromAscii("com.sun.star.frame.SynchronousFrameLoader") + +//............................................................................. +} //namespace chart +//............................................................................. + +#endif diff --git a/chart2/source/inc/servicenames_dlwrapper.hxx b/chart2/source/inc/servicenames_dlwrapper.hxx new file mode 100644 index 000000000..31885e644 --- /dev/null +++ b/chart2/source/inc/servicenames_dlwrapper.hxx @@ -0,0 +1,75 @@ +/************************************************************************* + * + * $RCSfile: servicenames_dlwrapper.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:29 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef _CHART2_SERVICENAMES_DLWRAPPER_HXX +#define _CHART2_SERVICENAMES_DLWRAPPER_HXX + +//............................................................................. +namespace chart +{ +//............................................................................. + +#define CHART2_VIEW_DLWRAPPER_SERVICE_IMPLEMENTATION_NAME ::rtl::OUString::createFromAscii("com.sun.star.chart2.DrawModelWrapper") +#define CHART2_VIEW_DLWRAPPER_SERVICE_NAME ::rtl::OUString::createFromAscii("com.sun.star.chart2.DrawModelWrapper") + +//............................................................................. +} //namespace chart +//............................................................................. +#endif diff --git a/chart2/source/model/inc/ChartTypeManager.hxx b/chart2/source/model/inc/ChartTypeManager.hxx new file mode 100644 index 000000000..18681eae4 --- /dev/null +++ b/chart2/source/model/inc/ChartTypeManager.hxx @@ -0,0 +1,172 @@ +/************************************************************************* + * + * $RCSfile: ChartTypeManager.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:29 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef CHART_CHARTTYPEMANAGER_HXX +#define CHART_CHARTTYPEMANAGER_HXX + +#ifndef CHART_OPROPERTYSET_HXX +#include "OPropertySet.hxx" +#endif +#ifndef CHART_MUTEXCONTAINER_HXX +#include "MutexContainer.hxx" +#endif + +#ifndef _CPPUHELPER_IMPLBASE2_HXX_ +#include <cppuhelper/implbase2.hxx> +#endif +#ifndef _COMPHELPER_UNO3_HXX_ +#include <comphelper/uno3.hxx> +#endif +#include "ServiceMacros.hxx" + +#ifndef _COM_SUN_STAR_UNO_XCOMPONENTCONTEXT_HPP_ +#include <com/sun/star/uno/XComponentContext.hpp> +#endif +#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_ +#include <com/sun/star/lang/XMultiServiceFactory.hpp> +#endif +// #ifndef _COM_SUN_STAR_LANG_XMULTICOMPONENTFACTORY_HPP_ +// #include <com/sun/star/lang/XMultiComponentFactory.hpp> +// #endif + +#include <drafts/com/sun/star/chart2/XChartTypeManager.hpp> + +// #include <map> + +namespace chart +{ + +namespace impl +{ +typedef ::cppu::WeakImplHelper2< + ::com::sun::star::lang::XMultiServiceFactory, +// ::com::sun::star::lang::XMultiComponentFactory, + ::drafts::com::sun::star::chart2::XChartTypeManager > + ChartTypeManager_Base; +} + +class ChartTypeManager : + public helper::MutexContainer, + public impl::ChartTypeManager_Base, + public ::property::OPropertySet +{ +public: + explicit ChartTypeManager( + ::com::sun::star::uno::Reference< + ::com::sun::star::uno::XComponentContext > const & xContext ); + virtual ~ChartTypeManager(); + + APPHELPER_XSERVICEINFO_DECL() + /// establish methods for factory instatiation + APPHELPER_SERVICE_FACTORY_HELPER( ChartTypeManager ) + +protected: + // ____ XMultiServiceFactory ____ + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::uno::XInterface > SAL_CALL createInstance( const ::rtl::OUString& aServiceSpecifier ) + throw (::com::sun::star::uno::Exception, + ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::uno::XInterface > SAL_CALL createInstanceWithArguments( + const ::rtl::OUString& ServiceSpecifier, + const ::com::sun::star::uno::Sequence< + ::com::sun::star::uno::Any >& Arguments ) + throw (::com::sun::star::uno::Exception, + ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< + ::rtl::OUString > SAL_CALL getAvailableServiceNames() + throw (::com::sun::star::uno::RuntimeException); + + // ____ OPropertySet ____ + virtual ::com::sun::star::uno::Any GetDefaultValue( sal_Int32 nHandle ) const + throw(::com::sun::star::beans::UnknownPropertyException); + + // ____ OPropertySet ____ + virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper(); + + // ____ XPropertySet ____ + virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL + getPropertySetInfo() + throw (::com::sun::star::uno::RuntimeException); + +// virtual sal_Bool SAL_CALL convertFastPropertyValue +// ( ::com::sun::star::uno::Any & rConvertedValue, +// ::com::sun::star::uno::Any & rOldValue, +// sal_Int32 nHandle, +// const ::com::sun::star::uno::Any& rValue ) +// throw (::com::sun::star::lang::IllegalArgumentException); + + // ____ XChartTypeManager ____ + // currently empty + + /// merge XInterface implementations + DECLARE_XINTERFACE() + /// merge XTypeProvider implementations + DECLARE_XTYPEPROVIDER() + +private: + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > + m_xContext; +}; + +} // namespace chart + +// CHART_CHARTTYPEMANAGER_HXX +#endif diff --git a/chart2/source/model/inc/DataSeriesTree.hxx b/chart2/source/model/inc/DataSeriesTree.hxx new file mode 100644 index 000000000..cc560325a --- /dev/null +++ b/chart2/source/model/inc/DataSeriesTree.hxx @@ -0,0 +1,131 @@ +/************************************************************************* + * + * $RCSfile: DataSeriesTree.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:30 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef CHART_DATASERIESTREE_HXX +#define CHART_DATASERIESTREE_HXX + +#ifndef _CPPUHELPER_IMPLBASE2_HXX_ +#include <cppuhelper/implbase2.hxx> +#endif + +#include "ServiceMacros.hxx" + +#ifndef _COM_SUN_STAR_UNO_XCOMPONENTCONTEXT_HPP_ +#include <com/sun/star/uno/XComponentContext.hpp> +#endif +#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_ +#include <com/sun/star/lang/XServiceInfo.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XDATASERIESTREEPARENT_HPP_ +#include <drafts/com/sun/star/chart2/XDataSeriesTreeParent.hpp> +#endif + +#include <vector> + +namespace chart +{ + +class DataSeriesTree : public + ::cppu::WeakImplHelper2< + ::com::sun::star::lang::XServiceInfo, + ::drafts::com::sun::star::chart2::XDataSeriesTreeParent > +{ +public: + DataSeriesTree( const ::com::sun::star::uno::Reference< + ::com::sun::star::uno::XComponentContext > & xContext ); + virtual ~DataSeriesTree(); + + /// declare XServiceInfo methods + APPHELPER_XSERVICEINFO_DECL() + /// establish methods for factory instatiation + APPHELPER_SERVICE_FACTORY_HELPER( DataSeriesTree ) + +protected: + + // ____ XDataSeriesTreeParent ____ + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XDataSeriesTreeNode > > + SAL_CALL getChildren() + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addChild( + const ::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XDataSeriesTreeNode >& aNode ) + throw (::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeChild( + const ::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XDataSeriesTreeNode >& aNode ) + throw (::com::sun::star::container::NoSuchElementException, + ::com::sun::star::uno::RuntimeException); + + // ____ XDataSeriesTreeNode ____ + +private: + typedef ::std::vector< ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XDataSeriesTreeNode > > + m_tChildType; + + m_tChildType m_aChildren; + + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > + m_xContext; +}; + +} // namespace chart + +// CHART_DATASERIESTREE_HXX +#endif diff --git a/chart2/source/model/inc/Diagram.hxx b/chart2/source/model/inc/Diagram.hxx new file mode 100644 index 000000000..edb679173 --- /dev/null +++ b/chart2/source/model/inc/Diagram.hxx @@ -0,0 +1,310 @@ +/************************************************************************* + * + * $RCSfile: Diagram.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:30 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef CHART_DIAGRAM_HXX +#define CHART_DIAGRAM_HXX + +#ifndef CHART_OPROPERTYSET_HXX +#include "OPropertySet.hxx" +#endif +#ifndef CHART_MUTEXCONTAINER_HXX +#include "MutexContainer.hxx" +#endif + +#ifndef _CPPUHELPER_IMPLBASE8_HXX_ +#include <cppuhelper/implbase8.hxx> +#endif +#ifndef _COMPHELPER_UNO3_HXX_ +#include <comphelper/uno3.hxx> +#endif + +#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_ +#include <com/sun/star/lang/XServiceInfo.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XDIAGRAM_HPP_ +#include <drafts/com/sun/star/chart2/XDiagram.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XCHARTELEMENT_HPP_ +#include <drafts/com/sun/star/chart2/XChartElement.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XAXISCONTAINER_HPP_ +#include <drafts/com/sun/star/chart2/XAxisContainer.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XBOUNDEDCOORDINATESYSTEMCONTAINER_HPP_ +#include <drafts/com/sun/star/chart2/XBoundedCoordinateSystemContainer.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XGRIDCONTAINER_HPP_ +#include <drafts/com/sun/star/chart2/XGridContainer.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XTITLED_HPP_ +#include <drafts/com/sun/star/chart2/XTitled.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_LAYOUT_XLAYOUTELEMENT_HPP_ +#include <drafts/com/sun/star/layout/XLayoutElement.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XIDENTIFIABLE_HPP_ +#include <drafts/com/sun/star/chart2/XIdentifiable.hpp> +#endif +#ifndef _COM_SUN_STAR_UNO_XCOMPONENTCONTEXT_HPP_ +#include <com/sun/star/uno/XComponentContext.hpp> +#endif + +#include "ServiceMacros.hxx" + +#include <map> +// #include <set> +#include <vector> + +namespace chart +{ + +namespace impl +{ +typedef ::cppu::WeakImplHelper8< + ::drafts::com::sun::star::chart2::XDiagram, + ::com::sun::star::lang::XServiceInfo, + ::drafts::com::sun::star::chart2::XAxisContainer, + ::drafts::com::sun::star::chart2::XBoundedCoordinateSystemContainer, + ::drafts::com::sun::star::chart2::XGridContainer, + ::drafts::com::sun::star::chart2::XTitled, + ::drafts::com::sun::star::layout::XLayoutElement, + ::drafts::com::sun::star::chart2::XIdentifiable > + Diagram_Base; +} + +class Diagram : + public helper::MutexContainer, + public impl::Diagram_Base, + public ::property::OPropertySet +{ +public: + Diagram( ::com::sun::star::uno::Reference< + ::com::sun::star::uno::XComponentContext > const & xContext ); + virtual ~Diagram(); + + /// establish methods for factory instatiation + APPHELPER_SERVICE_FACTORY_HELPER( Diagram ) + + /// XServiceInfo declarations + APPHELPER_XSERVICEINFO_DECL() + + /// merge XInterface implementations + DECLARE_XINTERFACE() + /// merge XTypeProvider implementations + DECLARE_XTYPEPROVIDER() + +protected: + // ____ OPropertySet ____ + virtual ::com::sun::star::uno::Any GetDefaultValue( sal_Int32 nHandle ) const + throw(::com::sun::star::beans::UnknownPropertyException); + + // ____ OPropertySet ____ + virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper(); + + // ____ XPropertySet ____ + virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL + getPropertySetInfo() + throw (::com::sun::star::uno::RuntimeException); + +// virtual sal_Bool SAL_CALL convertFastPropertyValue +// ( ::com::sun::star::uno::Any & rConvertedValue, +// ::com::sun::star::uno::Any & rOldValue, +// sal_Int32 nHandle, +// const ::com::sun::star::uno::Any& rValue ) +// throw (::com::sun::star::lang::IllegalArgumentException); + + // ____ XDiagram ____ + virtual ::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XDataSeriesTreeParent > + SAL_CALL getTree() + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setTree( + const ::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XDataSeriesTreeParent >& xTree ) + throw (::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertySet > SAL_CALL getWall() + throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XLegend > SAL_CALL getLegend() + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setLegend( const ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XLegend >& xLegend ) + throw (::com::sun::star::uno::RuntimeException); + + // ____ XAxisContainer ____ + virtual void SAL_CALL addAxis( + const ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XAxis >& aAxis ) + throw (::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeAxis( + const ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XAxis >& aAxis ) + throw (::com::sun::star::container::NoSuchElementException, + ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< + ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XAxis > > SAL_CALL getAxes() + throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XAxis > SAL_CALL getAxisByIdentifier( + const ::rtl::OUString& aIdentifier ) + throw (::com::sun::star::uno::RuntimeException); + + // ____ XBoundedCoordinateSystemContainer ____ + virtual void SAL_CALL addCoordinateSystem( + const ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XBoundedCoordinateSystem >& aCoordSys ) + throw (::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeCoordinateSystem( + const ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XBoundedCoordinateSystem >& aCoordSys ) + throw (::com::sun::star::container::NoSuchElementException, + ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< + ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XBoundedCoordinateSystem > > SAL_CALL getCoordinateSystems() + throw (::com::sun::star::uno::RuntimeException); + + // ____ XGridContainer ____ + virtual void SAL_CALL addGrid( + const ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XGrid >& aGrid ) + throw (::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeGrid( + const ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XGrid >& aGrid ) + throw (::com::sun::star::container::NoSuchElementException, + ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< + ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XGrid > > SAL_CALL getGrids() + throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XGrid > SAL_CALL getGridByIdentifier( + const ::rtl::OUString& aIdentifier ) + throw (::com::sun::star::uno::RuntimeException); + + // ____ XTitled ____ + virtual ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XTitle > SAL_CALL getTitle() + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setTitle( const ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XTitle >& Title ) + throw (::com::sun::star::uno::RuntimeException); + + // ____ XLayoutElement ____ + // (empty) + + // ____ XIdentifiable ____ + virtual ::rtl::OUString SAL_CALL getIdentifier() + throw (::com::sun::star::uno::RuntimeException); + +private: + ::com::sun::star::uno::Reference< + ::com::sun::star::uno::XComponentContext > m_xContext; + +// ::std::vector< ::drafts::com::sun::star::chart2::DataSeriesGroup > +// m_aSeriesGroups; + ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XDataSeriesTreeParent > m_xSeriesTree; + + typedef + ::std::map< + ::rtl::OUString, + ::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XAxis > > + tAxisContainerType; + typedef + ::std::map< + ::rtl::OUString, + ::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XGrid > > + tGridContainerType; + + tAxisContainerType m_aAxes; + tGridContainerType m_aGrids; + +// ::std::set< ::com::sun::star::uno::Reference< +// ::drafts::com::sun::star::chart2::XBoundedCoordinateSystem > > +// m_aCoordSystems; + ::std::vector< ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XBoundedCoordinateSystem > > + m_aCoordSystems; + + ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertySet > + m_xWall; + + ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XTitle > + m_xTitle; + + ::rtl::OUString m_aIdentifier; + + ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XLegend > + m_xLegend; +}; + +} // namespace chart + +// CHART_DIAGRAM_HXX +#endif diff --git a/chart2/source/model/inc/PolarCoordinateSystem.hxx b/chart2/source/model/inc/PolarCoordinateSystem.hxx new file mode 100644 index 000000000..4754833c0 --- /dev/null +++ b/chart2/source/model/inc/PolarCoordinateSystem.hxx @@ -0,0 +1,113 @@ +/************************************************************************* + * + * $RCSfile: PolarCoordinateSystem.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:30 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2002 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef _CHART_POLARCOORDINATESYSTEM_HXX +#define _CHART_POLARCOORDINATESYSTEM_HXX + +#include "ServiceMacros.hxx" + +#ifndef _CPPUHELPER_IMPLBASE2_HXX_ +#include <cppuhelper/implbase2.hxx> +#endif + +#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_ +#include <com/sun/star/lang/XServiceInfo.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XCOORDINATESYSTEM_HPP_ +#include <drafts/com/sun/star/chart2/XCoordinateSystem.hpp> +#endif + +namespace chart +{ + +class PolarCoordinateSystem : public ::cppu::WeakImplHelper2< + ::com::sun::star::lang::XServiceInfo, + ::drafts::com::sun::star::chart2::XCoordinateSystem + > +{ +public: + explicit PolarCoordinateSystem( sal_Int32 nDim = 2 ); + virtual ~PolarCoordinateSystem(); + + // ____ XCoordinateSystem ____ + // ___________________________ + /// @see ::drafts::com::sun::star::chart2::XCoordinateSystem + virtual ::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XTransformation > SAL_CALL getTransformationToCartesian() + throw (::com::sun::star::uno::RuntimeException); + /// @see ::drafts::com::sun::star::chart2::XCoordinateSystem + virtual ::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XTransformation > SAL_CALL getTransformationFromCartesian() + throw (::com::sun::star::uno::RuntimeException); + /// @see ::drafts::com::sun::star::chart2::XCoordinateSystem + virtual sal_Int32 SAL_CALL getDimension() throw (::com::sun::star::uno::RuntimeException); + + APPHELPER_XSERVICEINFO_DECL() + +private: + ::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XTransformation > + m_aTransformationToCartesian; + ::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XTransformation > + m_aTransformationFromCartesian; + sal_Int32 m_nDim; +}; + +} // namespace chart + +// _CHART_POLARCOORDINATESYSTEM_HXX +#endif diff --git a/chart2/source/model/main/Axis.cxx b/chart2/source/model/main/Axis.cxx new file mode 100644 index 000000000..9b5189769 --- /dev/null +++ b/chart2/source/model/main/Axis.cxx @@ -0,0 +1,510 @@ +/************************************************************************* + * + * $RCSfile: Axis.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:30 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "Axis.hxx" +#include "macros.hxx" +#include "CharacterProperties.hxx" +#include "UserDefinedProperties.hxx" +#include "algohelper.hxx" +#include "PropertyHelper.hxx" +#include "Increment.hxx" + +#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HPP_ +#include <com/sun/star/beans/PropertyAttribute.hpp> +#endif +#ifndef _COM_SUN_STAR_LANG_LOCALE_HPP_ +#include <com/sun/star/lang/Locale.hpp> +#endif + +#ifndef _DRAFTS_COM_SUN_STAR_LAYOUT_ALIGNMENT_HPP_ +#include <drafts/com/sun/star/layout/Alignment.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_LAYOUT_STRETCHMODE_HPP_ +#include <drafts/com/sun/star/layout/StretchMode.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_NUMBERFORMAT_HPP_ +#include <drafts/com/sun/star/chart2/NumberFormat.hpp> +#endif + +#ifndef _COM_SUN_STAR_DRAWING_LINESTYLE_HPP_ +#include <com/sun/star/drawing/LineStyle.hpp> +#endif +#ifndef _COM_SUN_STAR_DRAWING_LINEDASH_HPP_ +#include <com/sun/star/drawing/LineDash.hpp> +#endif +#ifndef _COM_SUN_STAR_DRAWING_LINEJOINT_HPP_ +#include <com/sun/star/drawing/LineJoint.hpp> +#endif +#ifndef _COM_SUN_STAR_CHART_CHARTAXISARRANGEORDERTYPE_HPP_ +#include <com/sun/star/chart/ChartAxisArrangeOrderType.hpp> +#endif + +#ifndef _RTL_UUID_H_ +#include <rtl/uuid.h> +#endif +#ifndef _CPPUHELPER_QUERYINTERFACE_HXX_ +#include <cppuhelper/queryinterface.hxx> +#endif + +#include <vector> +#include <algorithm> + +using namespace ::com::sun::star; +using namespace ::com::sun::star::beans::PropertyAttribute; +using namespace ::drafts::com::sun::star; + +using ::com::sun::star::beans::Property; +using ::osl::MutexGuard; + +namespace +{ + +static const ::rtl::OUString lcl_aServiceName( + RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.chart2.Axis" )); + +enum +{ + PROP_AXIS_DISPLAY_LABELS, + PROP_AXIS_TEXT_ROTATION, + PROP_AXIS_TEXT_BREAK, + PROP_AXIS_TEXT_OVERLAP, + PROP_AXIS_TEXT_STACKED, + PROP_AXIS_TEXT_ARRANGE_ORDER, + PROP_AXIS_NUMBER_FORMAT, + + // for Testing only! + PROP_AXIS_MAJOR_TICKMARKS, + // for Testing only! + PROP_AXIS_MINOR_TICKMARKS, + + // com.sun.star.drawing.LineProperties + PROP_AXIS_LINE_STYLE, + PROP_AXIS_LINE_WIDTH, + PROP_AXIS_LINE_DASH, + PROP_AXIS_LINE_COLOR, + PROP_AXIS_LINE_TRANSPARENCE, + PROP_AXIS_LINE_JOINT +}; + +void lcl_AddPropertiesToVector( + ::std::vector< Property > & rOutProperties ) +{ + rOutProperties.push_back( + Property( C2U( "DisplayLabels" ), + PROP_AXIS_DISPLAY_LABELS, + ::getBooleanCppuType(), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEDEFAULT )); + + rOutProperties.push_back( + Property( C2U( "TextRotation" ), + PROP_AXIS_TEXT_ROTATION, + ::getCppuType( reinterpret_cast< const double * >(0)), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEDEFAULT )); + + rOutProperties.push_back( + Property( C2U( "TextBreak" ), + PROP_AXIS_TEXT_BREAK, + ::getBooleanCppuType(), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEDEFAULT )); + + rOutProperties.push_back( + Property( C2U( "TextOverlap" ), + PROP_AXIS_TEXT_OVERLAP, + ::getBooleanCppuType(), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEDEFAULT )); + + rOutProperties.push_back( + Property( C2U( "StackCharacters" ), + PROP_AXIS_TEXT_STACKED, + ::getBooleanCppuType(), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEDEFAULT )); + + rOutProperties.push_back( + Property( C2U( "ArrangeOrder" ), + PROP_AXIS_TEXT_ARRANGE_ORDER, + ::getCppuType( reinterpret_cast< const ::com::sun::star::chart::ChartAxisArrangeOrderType * >(0)), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEDEFAULT )); + + rOutProperties.push_back( + Property( C2U( "NumberFormat" ), + PROP_AXIS_NUMBER_FORMAT, + ::getCppuType( reinterpret_cast< const chart2::NumberFormat * >(0)), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEDEFAULT )); + + // for Testing only! + rOutProperties.push_back( + Property( C2U( "MajorTickmarks" ), + PROP_AXIS_MAJOR_TICKMARKS, + ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEDEFAULT )); + // for Testing only! + rOutProperties.push_back( + Property( C2U( "MinorTickmarks" ), + PROP_AXIS_MINOR_TICKMARKS, + ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEDEFAULT )); + + // com.sun.star.drawing.LineProperties + // ----------------------------------- + rOutProperties.push_back( + Property( C2U( "LineStyle" ), + PROP_AXIS_LINE_STYLE, + ::getCppuType( reinterpret_cast< const drawing::LineStyle * >(0)), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEDEFAULT )); + rOutProperties.push_back( + Property( C2U( "LineWidth" ), + PROP_AXIS_LINE_WIDTH, + ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEDEFAULT )); + rOutProperties.push_back( + Property( C2U( "LineDash" ), + PROP_AXIS_LINE_DASH, + ::getCppuType( reinterpret_cast< const drawing::LineDash * >(0)), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEVOID )); + rOutProperties.push_back( + Property( C2U( "LineColor" ), + PROP_AXIS_LINE_COLOR, + ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEDEFAULT )); + rOutProperties.push_back( + Property( C2U( "LineTransparence" ), + PROP_AXIS_LINE_TRANSPARENCE, + ::getCppuType( reinterpret_cast< const sal_Int16 * >(0)), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEDEFAULT )); + rOutProperties.push_back( + Property( C2U( "LineJoint" ), + PROP_AXIS_LINE_JOINT, + ::getCppuType( reinterpret_cast< const drawing::LineJoint * >(0)), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEDEFAULT )); +} + +void lcl_AddDefaultsToMap( + ::chart::helper::tPropertyValueMap & rOutMap ) +{ + OSL_ASSERT( rOutMap.end() == rOutMap.find( PROP_AXIS_DISPLAY_LABELS )); + rOutMap[ PROP_AXIS_DISPLAY_LABELS ] = + uno::makeAny( sal_Bool( sal_True ) ); + + OSL_ASSERT( rOutMap.end() == rOutMap.find( PROP_AXIS_TEXT_ROTATION )); + rOutMap[ PROP_AXIS_TEXT_ROTATION ] = + uno::makeAny( double( 0.0 ) ); + OSL_ASSERT( rOutMap.end() == rOutMap.find( PROP_AXIS_TEXT_BREAK )); + rOutMap[ PROP_AXIS_TEXT_BREAK ] = + uno::makeAny( sal_Bool( sal_True ) ); + OSL_ASSERT( rOutMap.end() == rOutMap.find( PROP_AXIS_TEXT_OVERLAP )); + rOutMap[ PROP_AXIS_TEXT_OVERLAP ] = + uno::makeAny( sal_Bool( sal_False ) ); + OSL_ASSERT( rOutMap.end() == rOutMap.find( PROP_AXIS_TEXT_STACKED )); + rOutMap[ PROP_AXIS_TEXT_STACKED ] = + uno::makeAny( sal_Bool( sal_False ) ); + OSL_ASSERT( rOutMap.end() == rOutMap.find( PROP_AXIS_TEXT_ARRANGE_ORDER )); + rOutMap[ PROP_AXIS_TEXT_ARRANGE_ORDER ] = + uno::makeAny( ::com::sun::star::chart::ChartAxisArrangeOrderType_AUTO ); + chart2::NumberFormat aFormat( C2U( "Standard" ), + lang::Locale( C2U( "DE" ), C2U( "de" ), ::rtl::OUString())); + OSL_ASSERT( rOutMap.end() == rOutMap.find( PROP_AXIS_NUMBER_FORMAT )); + rOutMap[ PROP_AXIS_NUMBER_FORMAT ] = + uno::makeAny( aFormat ); + + // for Testing only! + OSL_ASSERT( rOutMap.end() == rOutMap.find( PROP_AXIS_MAJOR_TICKMARKS )); + rOutMap[ PROP_AXIS_MAJOR_TICKMARKS ] = + uno::makeAny( sal_Int32( 2 /* CHAXIS_MARK_OUTER */ ) ); + // for Testing only! + OSL_ASSERT( rOutMap.end() == rOutMap.find( PROP_AXIS_MINOR_TICKMARKS )); + rOutMap[ PROP_AXIS_MINOR_TICKMARKS ] = + uno::makeAny( sal_Int32( 0 /* CHAXIS_MARK_NONE */ ) ); + + + OSL_ASSERT( rOutMap.end() == rOutMap.find( PROP_AXIS_LINE_STYLE )); + rOutMap[ PROP_AXIS_LINE_STYLE ] = + uno::makeAny( drawing::LineStyle_SOLID ); + OSL_ASSERT( rOutMap.end() == rOutMap.find( PROP_AXIS_LINE_WIDTH )); + rOutMap[ PROP_AXIS_LINE_WIDTH ] = + uno::makeAny( sal_Int32( 0 ) ); + OSL_ASSERT( rOutMap.end() == rOutMap.find( PROP_AXIS_LINE_COLOR )); + rOutMap[ PROP_AXIS_LINE_COLOR ] = + uno::makeAny( sal_Int32( 0x000000 ) ); // black + OSL_ASSERT( rOutMap.end() == rOutMap.find( PROP_AXIS_LINE_TRANSPARENCE )); + rOutMap[ PROP_AXIS_LINE_TRANSPARENCE ] = + uno::makeAny( sal_Int16( 0 ) ); + OSL_ASSERT( rOutMap.end() == rOutMap.find( PROP_AXIS_LINE_JOINT )); + rOutMap[ PROP_AXIS_LINE_JOINT ] = + uno::makeAny( drawing::LineJoint_NONE ); +} + +const uno::Sequence< Property > & lcl_GetPropertySequence() +{ + static uno::Sequence< Property > aPropSeq; + + // /-- + MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); + if( 0 == aPropSeq.getLength() ) + { + // get properties + ::std::vector< ::com::sun::star::beans::Property > aProperties; + lcl_AddPropertiesToVector( aProperties ); + ::chart::CharacterProperties::AddPropertiesToVector( + aProperties, /* bIncludeStyleProperties = */ true ); + ::chart::UserDefinedProperties::AddPropertiesToVector( aProperties ); + + // and sort them for access via bsearch + ::std::sort( aProperties.begin(), aProperties.end(), + ::chart::helper::PropertyNameLess() ); + + // transfer result to static Sequence + aPropSeq = ::chart::helper::VectorToSequence( aProperties ); + } + + return aPropSeq; +} + +::cppu::IPropertyArrayHelper & lcl_getInfoHelper() +{ + static ::cppu::OPropertyArrayHelper aArrayHelper( + lcl_GetPropertySequence(), + /* bSorted = */ sal_True ); + + return aArrayHelper; +} + +} // anonymous namespace + +// ================================================================================ + +namespace chart +{ + +Axis::Axis( uno::Reference< uno::XComponentContext > const & xContext ) : + ::property::OPropertySet( m_aMutex ) +{ + m_xIncrement = new Increment(); + + if( ! ( xContext->getValueByName( C2U( "Identifier" )) >>= m_aIdentifier )) + { + OSL_ENSURE( false, "Missing Axis identifier" ); + } + +#if OSL_DEBUG_LEVEL > 1 + OSL_TRACE( "Axis CTOR: Id=%s", U2C( m_aIdentifier )); +#endif +} + +Axis::~Axis() +{ +} + +// -------------------------------------------------------------------------------- + +// ____ XAxis ____ +// (nothing) + +// ____ XMeter ____ +void SAL_CALL Axis::attachCoordinateSystem( + const uno::Reference< chart2::XBoundedCoordinateSystem >& xCoordSys, + sal_Int32 nRepresentedDimension ) + throw (lang::IndexOutOfBoundsException, + uno::RuntimeException) +{ + // /-- + MutexGuard aGuard( GetMutex()); + if( nRepresentedDimension >= xCoordSys->getDimension()) + throw lang::IndexOutOfBoundsException(); + + m_xCoordinateSystem = xCoordSys; + m_nRepresentedDimension = nRepresentedDimension; + // \-- +} + +uno::Reference< chart2::XBoundedCoordinateSystem > SAL_CALL Axis::getCoordinateSystem() + throw (uno::RuntimeException) +{ + // /-- + MutexGuard aGuard( GetMutex()); + return m_xCoordinateSystem; + // \-- +} + +sal_Int32 SAL_CALL Axis::getRepresentedDimension() + throw (uno::RuntimeException) +{ + // /-- + MutexGuard aGuard( GetMutex()); + return m_nRepresentedDimension; + // \-- +} + +void SAL_CALL Axis::setIncrement( const uno::Reference< chart2::XIncrement >& aIncrement ) + throw (uno::RuntimeException) +{ + // /-- + MutexGuard aGuard( GetMutex()); + m_xIncrement = aIncrement; + // \-- +} + +uno::Reference< chart2::XIncrement > SAL_CALL Axis::getIncrement() + throw (uno::RuntimeException) +{ + // /-- + MutexGuard aGuard( GetMutex()); + return m_xIncrement; + // \-- +} + +// ____ XIdentifiable ____ +::rtl::OUString SAL_CALL Axis::getIdentifier() + throw (uno::RuntimeException) +{ + // /-- + MutexGuard aGuard( GetMutex()); + return m_aIdentifier; + // \-- +} + +// ================================================================================ + +// ____ OPropertySet ____ +uno::Any Axis::GetDefaultValue( sal_Int32 nHandle ) const + throw(beans::UnknownPropertyException) +{ + static helper::tPropertyValueMap aStaticDefaults; + + // /-- + ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); + if( 0 == aStaticDefaults.size() ) + { + // initialize defaults + lcl_AddDefaultsToMap( aStaticDefaults ); + CharacterProperties::AddDefaultsToMap( + aStaticDefaults, + /* bIncludeStyleProperties = */ true ); + } + + helper::tPropertyValueMap::const_iterator aFound( + aStaticDefaults.find( nHandle )); + + if( aFound == aStaticDefaults.end()) + return uno::Any(); + + return (*aFound).second; + // \-- +} + +::cppu::IPropertyArrayHelper & SAL_CALL Axis::getInfoHelper() +{ + return lcl_getInfoHelper(); +} + + +// ____ XPropertySet ____ +uno::Reference< beans::XPropertySetInfo > SAL_CALL + Axis::getPropertySetInfo() + throw (uno::RuntimeException) +{ + static uno::Reference< beans::XPropertySetInfo > xInfo; + + // /-- + MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); + if( !xInfo.is()) + { + xInfo = ::cppu::OPropertySetHelper::createPropertySetInfo( + getInfoHelper()); + } + + return xInfo; + // \-- +} + +// ================================================================================ + +uno::Sequence< ::rtl::OUString > Axis::getSupportedServiceNames_Static() +{ + uno::Sequence< ::rtl::OUString > aServices( 3 ); + aServices[ 0 ] = C2U( "drafts.com.sun.star.chart2.Axis" ); + aServices[ 1 ] = C2U( "drafts.com.sun.star.chart2.ChartElement" ); + aServices[ 2 ] = C2U( "com.sun.star.beans.PropertySet" ); + return aServices; +} + +using impl::Axis_Base; + +IMPLEMENT_FORWARD_XINTERFACE2( Axis, Axis_Base, ::property::OPropertySet ) +IMPLEMENT_FORWARD_XTYPEPROVIDER2( Axis, Axis_Base, ::property::OPropertySet ) + +// implement XServiceInfo methods basing upon getSupportedServiceNames_Static +APPHELPER_XSERVICEINFO_IMPL( Axis, lcl_aServiceName ); + +} // namespace chart diff --git a/chart2/source/model/main/Axis.hxx b/chart2/source/model/main/Axis.hxx new file mode 100644 index 000000000..8895edd94 --- /dev/null +++ b/chart2/source/model/main/Axis.hxx @@ -0,0 +1,187 @@ +/************************************************************************* + * + * $RCSfile: Axis.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:30 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef CHART_AXIS_HXX +#define CHART_AXIS_HXX + +#ifndef _COM_SUN_STAR_UNO_XCOMPONENTCONTEXT_HPP_ +#include <com/sun/star/uno/XComponentContext.hpp> +#endif + +#ifndef CHART_MUTEXCONTAINER_HXX +#include "MutexContainer.hxx" +#endif +#ifndef CHART_OPROPERTYSET_HXX +#include "OPropertySet.hxx" +#endif + +#ifndef _CPPUHELPER_IMPLBASE3_HXX_ +#include <cppuhelper/implbase3.hxx> +#endif +#ifndef _COMPHELPER_UNO3_HXX_ +#include <comphelper/uno3.hxx> +#endif + +#include "ServiceMacros.hxx" + +#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_ +#include <com/sun/star/lang/XServiceInfo.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XAXIS_HPP_ +#include <drafts/com/sun/star/chart2/XAxis.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XIDENTIFIABLE_HPP_ +#include <drafts/com/sun/star/chart2/XIdentifiable.hpp> +#endif + +namespace chart +{ + +namespace impl +{ +typedef ::cppu::WeakImplHelper3< + ::drafts::com::sun::star::chart2::XAxis, + ::drafts::com::sun::star::chart2::XIdentifiable, + ::com::sun::star::lang::XServiceInfo > + Axis_Base; +} + +class Axis : + public helper::MutexContainer, + public impl::Axis_Base, + public ::property::OPropertySet +{ +public: + Axis( ::com::sun::star::uno::Reference< + ::com::sun::star::uno::XComponentContext > const & xContext ); + virtual ~Axis(); + + /// establish methods for factory instatiation + APPHELPER_SERVICE_FACTORY_HELPER( Axis ) + /// XServiceInfo declarations + APPHELPER_XSERVICEINFO_DECL() + + /// merge XInterface implementations + DECLARE_XINTERFACE() + /// merge XTypeProvider implementations + DECLARE_XTYPEPROVIDER() + +protected: + // ____ OPropertySet ____ + virtual ::com::sun::star::uno::Any GetDefaultValue( sal_Int32 nHandle ) const + throw(::com::sun::star::beans::UnknownPropertyException); + + // ____ OPropertySet ____ + virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper(); + + // ____ XPropertySet ____ + virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL + getPropertySetInfo() + throw (::com::sun::star::uno::RuntimeException); + +// virtual sal_Bool SAL_CALL convertFastPropertyValue +// ( ::com::sun::star::uno::Any & rConvertedValue, +// ::com::sun::star::uno::Any & rOldValue, +// sal_Int32 nHandle, +// const ::com::sun::star::uno::Any& rValue ) +// throw (::com::sun::star::lang::IllegalArgumentException); + + // ____ XAxis ____ + + // ____ XMeter ____ + virtual void SAL_CALL attachCoordinateSystem( + const ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XBoundedCoordinateSystem >& xCoordSys, + sal_Int32 nRepresentedDimension ) + throw (::com::sun::star::lang::IndexOutOfBoundsException, + ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XBoundedCoordinateSystem > SAL_CALL getCoordinateSystem() + throw (::com::sun::star::uno::RuntimeException); + virtual sal_Int32 SAL_CALL getRepresentedDimension() + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setIncrement( + const ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XIncrement >& aIncrement ) + throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XIncrement > SAL_CALL getIncrement() + throw (::com::sun::star::uno::RuntimeException); + + // ____ XIdentifiable ____ + virtual ::rtl::OUString SAL_CALL getIdentifier() + throw (::com::sun::star::uno::RuntimeException); + +private: + ::rtl::OUString m_aIdentifier; + + ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XBoundedCoordinateSystem > + m_xCoordinateSystem; + sal_Int32 m_nRepresentedDimension; + ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XIncrement > + m_xIncrement; +}; + +} // namespace chart + +// CHART_AXIS_HXX +#endif diff --git a/chart2/source/model/main/CartesianCoordinateSystem.cxx b/chart2/source/model/main/CartesianCoordinateSystem.cxx new file mode 100644 index 000000000..be117ce2b --- /dev/null +++ b/chart2/source/model/main/CartesianCoordinateSystem.cxx @@ -0,0 +1,116 @@ +/************************************************************************* + * + * $RCSfile: CartesianCoordinateSystem.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:30 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2002 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "CartesianCoordinateSystem.hxx" +#include "IdentityTransformation.hxx" +#include "macros.hxx" + +using ::com::sun::star::uno::RuntimeException; +using ::com::sun::star::uno::Sequence; +using ::rtl::OUString; + +namespace chart +{ + +CartesianCoordinateSystem::CartesianCoordinateSystem( sal_Int32 nDim /* = 2 */ ) : + m_aTransformationToCartesian( new IdentityTransformation( nDim ) ), + m_aTransformationFromCartesian( new IdentityTransformation( nDim ) ), + m_nDim( nDim ) +{ +} + +CartesianCoordinateSystem::~CartesianCoordinateSystem() +{} + +// ____ XCoordinateSystem ____ +::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XTransformation > SAL_CALL + CartesianCoordinateSystem::getTransformationToCartesian() + throw (RuntimeException) +{ + return m_aTransformationToCartesian; +} + +::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XTransformation > SAL_CALL + CartesianCoordinateSystem::getTransformationFromCartesian() + throw (RuntimeException) +{ + return m_aTransformationFromCartesian; +} + +sal_Int32 SAL_CALL CartesianCoordinateSystem::getDimension() throw (RuntimeException) +{ + return m_nDim; +} + + +// ____ XServiceInfo ____ + +Sequence< OUString > CartesianCoordinateSystem::getSupportedServiceNames_Static() +{ + Sequence< OUString > aServices; +// Sequence< OUString > aServices( 1 ); +// aServices[ 0 ] = OUString( RTL_CONSTASCII_USTRINGPARAM( "drafts.com.sun.star.chart2.CoordinateSystem" )); + return aServices; +} + +APPHELPER_XSERVICEINFO_IMPL( CartesianCoordinateSystem, + C2U( "com.sun.star.comp.chart.CartesianCoordinateSystem" )) + +} // namespace chart diff --git a/chart2/source/model/main/ChartModel.cxx b/chart2/source/model/main/ChartModel.cxx new file mode 100644 index 000000000..a70a71861 --- /dev/null +++ b/chart2/source/model/main/ChartModel.cxx @@ -0,0 +1,923 @@ +/************************************************************************* + * + * $RCSfile: ChartModel.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:30 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "ChartModel.hxx" +#include "ImplChartModel.hxx" +#include "servicenames.hxx" +#include "MediaDescriptorHelper.hxx" + +#ifndef _COM_SUN_STAR_UNO_REFERENCE_H_ +#include <com/sun/star/uno/Reference.h> +#endif + +#ifndef _COM_SUN_STAR_LANG_DISPOSEDEXCEPTION_HPP_ +#include <com/sun/star/lang/DisposedException.hpp> +#endif + +#ifndef _COM_SUN_STAR_VIEW_XSELECTIONSUPPLIER_HPP_ +#include <com/sun/star/view/XSelectionSupplier.hpp> +#endif + +using ::com::sun::star::uno::Sequence; +using ::com::sun::star::uno::Reference; +using ::rtl::OUString; +using ::osl::MutexGuard; + +using namespace ::drafts::com::sun::star; +using namespace ::com::sun::star; +using namespace ::apphelper; + +//----------------------------------------------------------------- +// ChartModel Constructor and Destructor +//----------------------------------------------------------------- + +namespace chart +{ + +ChartModel::ChartModel(uno::Reference<uno::XComponentContext > const & xContext) + : m_aLifeTimeManager( this, this ) + , m_bReadOnly( sal_False ) + , m_bModified( sal_False ) + , m_aResource() + , m_pControllers( NULL ) + , m_xCurrentController( NULL ) + , m_nControllerLockCount(0) + , m_pImplChartModel( new impl::ImplChartModel( xContext ) ) +{ + OSL_TRACE( "ChartModel: CTOR" ); +} + +ChartModel::~ChartModel() +{ + //@todo + + if ( m_pControllers ) + delete m_pControllers; +} + +//----------------------------------------------------------------- +// private methods +//----------------------------------------------------------------- + + ::rtl::OUString ChartModel +::impl_g_getLocation() +{ + + LifeTimeGuard aGuard(m_aLifeTimeManager); + if(!aGuard.startApiCall()) + return ::rtl::OUString(); //behave passive if already disposed or closed or throw exception @todo? + //mutex is acquired + return m_aResource; +} + + ::cppu::OInterfaceContainerHelper* ChartModel +::impl_getControllerContainer() throw(uno::RuntimeException) +{ + if ( m_pControllers ) + return m_pControllers; + m_pControllers = + new ::cppu::OInterfaceContainerHelper( m_aModelMutex ); + return m_pControllers; +} + + sal_Bool ChartModel +::impl_isControllerConnected( const uno::Reference< frame::XController >& xController ) +{ + try + { + if( !m_pControllers ) + return sal_False; + + uno::Sequence< uno::Reference<uno::XInterface> > aSeq = impl_getControllerContainer()->getElements(); + for( sal_Int32 nN = aSeq.getLength(); nN--; ) + { + if( aSeq[nN] == xController ) + return sal_True; + } + } + catch( uno::Exception ) + { + } + return sal_False; +} + + uno::Reference< frame::XController > ChartModel +::impl_getCurrentController() throw(uno::RuntimeException) +{ + //@todo? hold only weak references to controllers + + // get the last active controller of this model + if( m_xCurrentController.is() ) + return m_xCurrentController; + + // get the first controller of this model + if( m_pControllers && impl_getControllerContainer()->getLength() ) + { + uno::Reference<uno::XInterface> xI = impl_getControllerContainer()->getElements()[0]; + return uno::Reference<frame::XController>( xI, uno::UNO_QUERY ); + } + + //return nothing if no controllers are connected at all + return uno::Reference< frame::XController > (); +} + + void SAL_CALL ChartModel +::impl_notifyModifiedListeners() + throw( uno::RuntimeException) +{ + ::cppu::OInterfaceContainerHelper* pIC = m_aLifeTimeManager.m_aListenerContainer + .getContainer( ::getCppuType((const uno::Reference< util::XModifyListener >*)0) ); + if( pIC ) + { + lang::EventObject aEvent( static_cast< lang::XComponent*>(this) ); + ::cppu::OInterfaceIteratorHelper aIt( *pIC ); + while( aIt.hasMoreElements() ) + (static_cast< util::XModifyListener*>(aIt.next()))->modified( aEvent ); + } +} + +//----------------------------------------------------------------- +// lang::XServiceInfo +//----------------------------------------------------------------- + +APPHELPER_XSERVICEINFO_IMPL(ChartModel,CHART_MODEL_SERVICE_IMPLEMENTATION_NAME) + + uno::Sequence< rtl::OUString > ChartModel +::getSupportedServiceNames_Static() +{ + uno::Sequence< rtl::OUString > aSNS( 2 ); + aSNS.getArray()[ 0 ] = CHART_MODEL_SERVICE_NAME; + aSNS.getArray()[ 1 ] = ::rtl::OUString::createFromAscii("com.sun.star.document.OfficeDocument"); + //// @todo : add additional services if you support any further + return aSNS; +} + +//----------------------------------------------------------------- +// frame::XModel (required interface) +//----------------------------------------------------------------- + + sal_Bool SAL_CALL ChartModel +::attachResource( const ::rtl::OUString& rURL + , const uno::Sequence< beans::PropertyValue >& rMediaDescriptor ) + throw(uno::RuntimeException) +{ + /* + The method attachResource() is used by the frame loader implementations + to inform the model about its URL and MediaDescriptor. + */ + + LifeTimeGuard aGuard(m_aLifeTimeManager); + if(!aGuard.startApiCall()) + return sal_False; //behave passive if already disposed or closed or throw exception @todo? + //mutex is acquired + + if(m_aResource.getLength()!=0)//we have a resource already //@todo? or is setting a new resource allowed? + return sal_False; + m_aResource = rtl::OUString( rURL ); + m_aMediaDescriptor = rMediaDescriptor; + + //@todo ? check rURL ?? + //@todo ? evaluate m_aMediaDescriptor; + //@todo ? ... ??? --> nothing, this method is only for setting informations + + return sal_True; +} + + ::rtl::OUString SAL_CALL ChartModel +::getURL() throw(uno::RuntimeException) +{ + return impl_g_getLocation(); +} + + uno::Sequence< beans::PropertyValue > SAL_CALL ChartModel +::getArgs() throw(uno::RuntimeException) +{ + /* + The method getArgs() returns a sequence of property values + that report the resource description according to com.sun.star.document.MediaDescriptor, + specified on loading or saving with storeAsURL. + */ + + LifeTimeGuard aGuard(m_aLifeTimeManager); + if(!aGuard.startApiCall()) + return uno::Sequence< beans::PropertyValue >(); //behave passive if already disposed or closed or throw exception @todo? + //mutex is acquired + + return m_aMediaDescriptor; +} + + void SAL_CALL ChartModel +::connectController( const uno::Reference< frame::XController >& xController ) + throw(uno::RuntimeException) +{ + //@todo? this method is declared as oneway -> ...? + + LifeTimeGuard aGuard(m_aLifeTimeManager); + if(!aGuard.startApiCall()) + return ; //behave passive if already disposed or closed + //mutex is acquired + + //--add controller + impl_getControllerContainer()->addInterface(xController); +} + + void SAL_CALL ChartModel +::disconnectController( const uno::Reference< frame::XController >& xController ) + throw(uno::RuntimeException) +{ + //@todo? this method is declared as oneway -> ...? + + LifeTimeGuard aGuard(m_aLifeTimeManager); + if(!aGuard.startApiCall()) + return; //behave passive if already disposed or closed + + //--remove controller + impl_getControllerContainer()->removeInterface(xController); + + //case: current controller is disconnected: + if( m_xCurrentController == xController ) + m_xCurrentController = uno::Reference< frame::XController > (); +} + + void SAL_CALL ChartModel +::lockControllers() throw(uno::RuntimeException) +{ + /* + suspends some notifications to the controllers which are used for display updates. + + The calls to lockControllers() and unlockControllers() may be nested + and even overlapping, but they must be in pairs. While there is at least one lock + remaining, some notifications for display updates are not broadcasted. + */ + + //@todo? this method is declared as oneway -> ...? + + LifeTimeGuard aGuard(m_aLifeTimeManager); + if(!aGuard.startApiCall()) + return; //behave passive if already disposed or closed or throw exception @todo? + ++m_nControllerLockCount; +} + + void SAL_CALL ChartModel +::unlockControllers() throw(uno::RuntimeException) +{ + /* + resumes the notifications which were suspended by lockControllers() . + + The calls to lockControllers() and unlockControllers() may be nested + and even overlapping, but they must be in pairs. While there is at least one lock + remaining, some notifications for display updates are not broadcasted. + */ + + //@todo? this method is declared as oneway -> ...? + + LifeTimeGuard aGuard(m_aLifeTimeManager); + if(!aGuard.startApiCall()) + return; //behave passive if already disposed or closed or throw exception @todo? + --m_nControllerLockCount; +} + + sal_Bool SAL_CALL ChartModel +::hasControllersLocked() throw(uno::RuntimeException) +{ + LifeTimeGuard aGuard(m_aLifeTimeManager); + if(!aGuard.startApiCall()) + return sal_False; //behave passive if already disposed or closed or throw exception @todo? + return ( m_nControllerLockCount != 0 ) ; +} + + uno::Reference< frame::XController > SAL_CALL ChartModel +::getCurrentController() throw(uno::RuntimeException) +{ + LifeTimeGuard aGuard(m_aLifeTimeManager); + if(!aGuard.startApiCall()) + throw lang::DisposedException(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( + "getCurrentController was called on an already disposed or closed model" ) ) + , static_cast< ::cppu::OWeakObject* >(this)); + + return impl_getCurrentController(); +} + + void SAL_CALL ChartModel +::setCurrentController( const uno::Reference< frame::XController >& xController ) + throw(container::NoSuchElementException, uno::RuntimeException) +{ + LifeTimeGuard aGuard(m_aLifeTimeManager); + if(!aGuard.startApiCall()) + throw lang::DisposedException(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( + "setCurrentController was called on an already disposed or closed model" ) ) + , static_cast< ::cppu::OWeakObject* >(this)); + + //OSL_ENSURE( impl_isControllerConnected(xController), "setCurrentController is called with a Controller which is not connected" ); + if(!impl_isControllerConnected(xController)) + throw container::NoSuchElementException(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( + "setCurrentController is called with a Controller which is not connected" ) ) + , static_cast< ::cppu::OWeakObject* >(this)); + + m_xCurrentController = xController; +} + + uno::Reference< uno::XInterface > SAL_CALL ChartModel +::getCurrentSelection() throw(uno::RuntimeException) +{ + LifeTimeGuard aGuard(m_aLifeTimeManager); + if(!aGuard.startApiCall()) + throw lang::DisposedException(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( + "getCurrentSelection was called on an already disposed or closed model" ) ) + , static_cast< ::cppu::OWeakObject* >(this)); + + + uno::Reference< uno::XInterface > xReturn=NULL; + uno::Reference< frame::XController > xController = impl_getCurrentController(); + + aGuard.clear(); + if( xController.is() ) + { + uno::Reference< view::XSelectionSupplier > xSelectionSupl( xController, uno::UNO_QUERY ); + if ( xSelectionSupl.is() ) + { + uno::Any aSel = xSelectionSupl->getSelection(); + aSel >>= xReturn ; + } + } + return xReturn; +} + + +//----------------------------------------------------------------- +// lang::XComponent (base of XModel) +//----------------------------------------------------------------- + void SAL_CALL ChartModel +::dispose() throw(uno::RuntimeException) +{ + //This object should release all resources and references in the + //easiest possible manner + //This object must notify all registered listeners using the method + //<member>XEventListener::disposing</member> + + //hold no mutex + if( !m_aLifeTimeManager.dispose() ) + return; + + //--release all resources and references + //// @todo +} + + void SAL_CALL ChartModel +::addEventListener( const uno::Reference< lang::XEventListener > & xListener ) + throw(uno::RuntimeException) +{ + if( m_aLifeTimeManager.impl_isDisposedOrClosed() ) + return; //behave passive if already disposed or closed + + m_aLifeTimeManager.m_aListenerContainer.addInterface( ::getCppuType((const uno::Reference< util::XCloseListener >*)0), xListener ); +} + + void SAL_CALL ChartModel +::removeEventListener( const uno::Reference< lang::XEventListener > & xListener ) + throw(uno::RuntimeException) +{ + if( m_aLifeTimeManager.impl_isDisposedOrClosed() ) + return; //behave passive if already disposed or closed + + m_aLifeTimeManager.m_aListenerContainer.removeInterface( ::getCppuType((const uno::Reference< util::XCloseListener >*)0), xListener ); + return; +} + +//----------------------------------------------------------------- +// util::XCloseBroadcaster (base of XCloseable) +//----------------------------------------------------------------- + void SAL_CALL ChartModel +::addCloseListener( const uno::Reference< util::XCloseListener > & xListener ) + throw(uno::RuntimeException) +{ + m_aLifeTimeManager.g_addCloseListener( xListener ); +} + + void SAL_CALL ChartModel +::removeCloseListener( const uno::Reference< util::XCloseListener > & xListener ) + throw(uno::RuntimeException) +{ + if( m_aLifeTimeManager.impl_isDisposedOrClosed() ) + return; //behave passive if already disposed or closed + + m_aLifeTimeManager.m_aListenerContainer.removeInterface( ::getCppuType((const uno::Reference< util::XCloseListener >*)0), xListener ); + return; +} + +//----------------------------------------------------------------- +// util::XCloseable +//----------------------------------------------------------------- + void SAL_CALL ChartModel +::close( sal_Bool bDeliverOwnership ) + throw( util::CloseVetoException ) +{ + //hold no mutex + + if( !m_aLifeTimeManager.g_close_startTryClose( bDeliverOwnership ) ) + return; + //no mutex is acquired + + // At the end of this method may we must dispose ourself ... + // and may nobody from outside hold a reference to us ... + // then it's a good idea to do that by ourself. + uno::Reference< uno::XInterface > xSelfHold( static_cast< ::cppu::OWeakObject* >(this) ); + + //the listeners have had no veto + //check wether we self can close + { + util::CloseVetoException aVetoException = util::CloseVetoException( + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( + "the model itself could not be closed" ) ) + , static_cast< ::cppu::OWeakObject* >(this)); + + if( m_aLifeTimeManager.g_close_isNeedToCancelLongLastingCalls( bDeliverOwnership, aVetoException) ) + { + ////you can empty this block, if you never start longlasting calls or + ////if your longlasting calls are per default not cancelable (check how you have constructed your LifeTimeManager) + + sal_Bool bLongLastingCallsAreCanceled = sal_False; + try + { + //try to cancel running longlasting calls + //// @todo + } + catch( uno::Exception ) + { + //// @todo + //do not throw anything here!! (without endTryClose) + } + //if not successful canceled + if(!bLongLastingCallsAreCanceled) + { + m_aLifeTimeManager.g_close_endTryClose(bDeliverOwnership, sal_True, aVetoException); + //the exception is thrown in the above method + } + } + + } + m_aLifeTimeManager.g_close_endTryClose_doClose(); +} + +//----------------------------------------------------------------- +// frame::XStorable (required interface) +//----------------------------------------------------------------- + sal_Bool SAL_CALL ChartModel +::hasLocation() throw(uno::RuntimeException) +{ + //@todo guard + return m_aResource.getLength()!=0; +} + + ::rtl::OUString SAL_CALL ChartModel +::getLocation() throw(uno::RuntimeException) +{ + return impl_g_getLocation(); +} + + sal_Bool SAL_CALL ChartModel +::isReadonly() throw(uno::RuntimeException) +{ + //@todo guard + return m_bReadOnly; +} + + void SAL_CALL ChartModel +::store() throw(io::IOException, uno::RuntimeException) +{ + LifeTimeGuard aGuard(m_aLifeTimeManager); + if(!aGuard.startApiCall(sal_True)) //start LongLastingCall + return; //behave passive if already disposed or closed or throw exception @todo? + + ::rtl::OUString aLocation = m_aResource; + + if( aLocation.getLength() == 0 ) + throw io::IOException(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "no location specified" ) ) + , static_cast< ::cppu::OWeakObject* >(this)); + //@todo check wether aLocation is something like private:factory... + if( m_bReadOnly ) + throw io::IOException(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "document is read only" ) ) + , static_cast< ::cppu::OWeakObject* >(this)); + + m_bModified = sal_False; + aGuard.clear(); + + //@todo store +} + + void SAL_CALL ChartModel +::storeAsURL( const ::rtl::OUString& rURL + , const uno::Sequence< beans::PropertyValue >& rMediaDescriptor ) + throw(io::IOException, uno::RuntimeException) +{ + LifeTimeGuard aGuard(m_aLifeTimeManager); + if(!aGuard.startApiCall(sal_True)) //start LongLastingCall + return; //behave passive if already disposed or closed or throw exception @todo? + + apphelper::MediaDescriptorHelper aMediaDescriptorHelper(rMediaDescriptor); + m_aMediaDescriptor = aMediaDescriptorHelper.getReducedForModel(); + m_aResource = rURL; + + m_bReadOnly = sal_False; + m_bModified = sal_False; + aGuard.clear(); + + //@todo saveTo(rURL) +} + + void SAL_CALL ChartModel +::storeToURL( const ::rtl::OUString& rURL + , const uno::Sequence< beans::PropertyValue >& rMediaDescriptor ) + throw(io::IOException, uno::RuntimeException) +{ + LifeTimeGuard aGuard(m_aLifeTimeManager); + if(!aGuard.startApiCall(sal_True)) //start LongLastingCall + return; //behave passive if already disposed or closed or throw exception @todo? + //do not change the internal state of the document here + //... + + aGuard.clear(); + //@todo saveTo(rURL) +} + +//----------------------------------------------------------------- +// util::XModifiable (required interface) +//----------------------------------------------------------------- + sal_Bool SAL_CALL ChartModel +::isModified() throw(uno::RuntimeException) +{ + //@todo guard + return m_bModified; +} + + void SAL_CALL ChartModel +::setModified( sal_Bool bModified ) + throw(beans::PropertyVetoException, uno::RuntimeException) +{ + LifeTimeGuard aGuard(m_aLifeTimeManager); + if(!aGuard.startApiCall())//@todo ? is this a long lasting call?? + return; //behave passive if already disposed or closed or throw exception @todo? + m_bModified = bModified; + aGuard.clear(); + + if(bModified) + impl_notifyModifiedListeners(); +} + +//----------------------------------------------------------------- +// util::XModifyBroadcaster (base of XModifiable) +//----------------------------------------------------------------- + void SAL_CALL ChartModel +::addModifyListener( const uno::Reference< util::XModifyListener >& xListener ) + throw(uno::RuntimeException) +{ + if( m_aLifeTimeManager.impl_isDisposedOrClosed() ) + return; //behave passive if already disposed or closed + + m_aLifeTimeManager.m_aListenerContainer.addInterface( ::getCppuType((const uno::Reference< util::XModifyListener >*)0), xListener ); +} + + void SAL_CALL ChartModel +::removeModifyListener( const uno::Reference< util::XModifyListener >& xListener ) + throw(uno::RuntimeException) +{ + if( m_aLifeTimeManager.impl_isDisposedOrClosed() ) + return; //behave passive if already disposed or closed + + m_aLifeTimeManager.m_aListenerContainer.removeInterface( ::getCppuType((const uno::Reference< util::XModifyListener >*)0), xListener ); +} +/* +//----------------------------------------------------------------- +// view::XPrintable (optional interface) +//----------------------------------------------------------------- + uno::Sequence< beans::PropertyValue > SAL_CALL ChartModel +::getPrinter() throw(uno::RuntimeException) +{ + //@todo guard + return m_aPrinterOptions; +} + + void SAL_CALL ChartModel +::setPrinter( const uno::Sequence< beans::PropertyValue >& rPrinter ) + throw(lang::IllegalArgumentException, uno::RuntimeException) +{ + //@todo guard + m_aPrinterOptions = rPrinter; +} + + void SAL_CALL ChartModel +::print( const uno::Sequence< beans::PropertyValue >& rOptions ) + throw(lang::IllegalArgumentException, uno::RuntimeException) +{ + //@todo +} + +//----------------------------------------------------------------- +// document::XEventBroadcaster (optional interface) +//----------------------------------------------------------------- + + void SAL_CALL ChartModel +::addEventListener( const uno::Reference< document::XEventListener >& xListener ) + throw(uno::RuntimeException) +{ + //@todo +} + + void SAL_CALL ChartModel +::removeEventListener( const uno::Reference< document::XEventListener >& xListener ) + throw(uno::RuntimeException) +{ + //@todo +} + +//----------------------------------------------------------------- +// document::XEventsSupplier (optional interface) +//----------------------------------------------------------------- + + uno::Reference< container::XNameReplace > SAL_CALL ChartModel +::getEvents() throw(uno::RuntimeException) +{ + //@todo +} + +//----------------------------------------------------------------- +// document::XDocumentInfoSupplier (optional interface) +//----------------------------------------------------------------- + + uno::Reference< document::XDocumentInfo > SAL_CALL ChartModel +::getDocumentInfo() throw(uno::RuntimeException) +{ + //@todo +} + +//----------------------------------------------------------------- +// document::XViewDataSupplier (optional interface) +//----------------------------------------------------------------- + + uno::Reference< container::XIndexAccess > SAL_CALL ChartModel +::getViewData() throw(uno::RuntimeException) +{ + //@todo +} + + void SAL_CALL ChartModel +::setViewData( const uno::Reference< container::XIndexAccess >& xData ) + throw(uno::RuntimeException) +{ + //m_bModified = sal_True;//@todo? is this really correct + //@todo +} +*/ + +//----------------------------------------------------------------- +// ::com::sun::star::style::XStyleFamiliesSupplier +//----------------------------------------------------------------- +::com::sun::star::uno::Reference< + ::com::sun::star::container::XNameAccess > SAL_CALL ChartModel + ::getStyleFamilies() + throw (uno::RuntimeException) +{ + OSL_ASSERT( m_pImplChartModel.get() != 0 ); + // /-- + MutexGuard aGuard( m_aModelMutex ); + return m_pImplChartModel->GetStyleFamilies(); + // \-- +} + +//----------------------------------------------------------------- +// chart2::XModelDataProvider +//----------------------------------------------------------------- +// Sequence< Reference< chart2::XDataSeries > > SAL_CALL ChartModel +// ::getDataSeries() +// throw (uno::RuntimeException) +// { +// OSL_ASSERT( m_pImplChartModel.get() != 0 ); +// // /-- +// MutexGuard aGuard( m_aModelMutex ); +// return m_pImplChartModel->GetDataSeries(); +// // \-- +// } + +//----------------------------------------------------------------- +// chart2::XChartDocument +//----------------------------------------------------------------- + + uno::Reference< chart2::XDiagram > SAL_CALL ChartModel +::getDiagram() + throw (uno::RuntimeException) +{ + OSL_ASSERT( m_pImplChartModel.get() != 0 ); + // /-- + MutexGuard aGuard( m_aModelMutex ); + try + { + return m_pImplChartModel->GetDiagram( 0 ); + } + catch( container::NoSuchElementException ) + { + } + + return uno::Reference< chart2::XDiagram >(); + // \-- +} + + void SAL_CALL ChartModel +::setDiagram( const uno::Reference< chart2::XDiagram >& xDiagram ) + throw (lang::IllegalArgumentException, + uno::RuntimeException) +{ + OSL_ASSERT( m_pImplChartModel.get() != 0 ); + // /-- + MutexGuard aGuard( m_aModelMutex ); + m_pImplChartModel->RemoveAllDiagrams(); + m_pImplChartModel->AppendDiagram( xDiagram ); + // \-- +} + + void SAL_CALL ChartModel +::attachDataProvider( const uno::Reference< chart2::XDataProvider >& xProvider ) + throw (uno::RuntimeException) +{ + OSL_ASSERT( m_pImplChartModel.get() != 0 ); + // /-- + MutexGuard aGuard( m_aModelMutex ); + m_pImplChartModel->SetDataProvider( xProvider ); + // \-- +} + + void SAL_CALL ChartModel +::setRangeRepresentation( const ::rtl::OUString& aRangeRepresentation ) + throw (lang::IllegalArgumentException, + uno::RuntimeException) +{ + OSL_ASSERT( m_pImplChartModel.get() != 0 ); + // /-- + MutexGuard aGuard( m_aModelMutex ); + m_pImplChartModel->SetRangeRepresentation( aRangeRepresentation ); + // \-- +} + + void SAL_CALL ChartModel +::setChartTypeManager( const uno::Reference< chart2::XChartTypeManager >& xNewManager ) + throw (uno::RuntimeException) +{ + OSL_ASSERT( m_pImplChartModel.get() != 0 ); + // /-- + MutexGuard aGuard( m_aModelMutex ); + m_pImplChartModel->SetChartTypeManager( xNewManager ); + // \-- +} + + uno::Reference< chart2::XChartTypeManager > SAL_CALL ChartModel +::getChartTypeManager() + throw (uno::RuntimeException) +{ + OSL_ASSERT( m_pImplChartModel.get() != 0 ); + // /-- + MutexGuard aGuard( m_aModelMutex ); + return m_pImplChartModel->GetChartTypeManager(); + // \-- +} + + void SAL_CALL ChartModel +::setChartTypeTemplate( const uno::Reference< chart2::XChartTypeTemplate >& xNewTemplate ) + throw (uno::RuntimeException) +{ + OSL_ASSERT( m_pImplChartModel.get() != 0 ); + // /-- + MutexGuard aGuard( m_aModelMutex ); + m_pImplChartModel->SetChartTypeTemplate( xNewTemplate ); + // \-- +} + + uno::Reference< chart2::XChartTypeTemplate > SAL_CALL ChartModel +::getChartTypeTemplate() + throw (uno::RuntimeException) +{ + OSL_ASSERT( m_pImplChartModel.get() != 0 ); + // /-- + MutexGuard aGuard( m_aModelMutex ); + return m_pImplChartModel->GetChartTypeTemplate(); + // \-- +} + +// void SAL_CALL ChartModel +// ::setSplitLayoutContainer( const uno::Reference< layout::XSplitLayoutContainer >& xLayoutCnt ) +// throw (uno::RuntimeException) +// { +// OSL_ASSERT( m_pImplChartModel.get() != 0 ); +// // /-- +// MutexGuard aGuard( m_aModelMutex ); +// m_pImplChartModel->SetSplitLayoutContainer( xLayoutCnt ); +// // \-- +// } + +// uno::Reference< layout::XSplitLayoutContainer > SAL_CALL ChartModel +// ::getSplitLayoutContainer() +// throw (uno::RuntimeException) +// { +// OSL_ASSERT( m_pImplChartModel.get() != 0 ); +// // /-- +// MutexGuard aGuard( m_aModelMutex ); +// return m_pImplChartModel->GetSplitLayoutContainer(); +// // \-- +// } + + + +// ____ XTitled ____ +uno::Reference< chart2::XTitle > SAL_CALL ChartModel::getTitle() + throw (uno::RuntimeException) +{ + OSL_ASSERT( m_pImplChartModel.get() != 0 ); + // /-- + MutexGuard aGuard( m_aModelMutex ); + return m_pImplChartModel->GetTitle(); + // \-- +} + +void SAL_CALL ChartModel::setTitle( + const uno::Reference< + chart2::XTitle >& Title ) + throw (uno::RuntimeException) +{ + OSL_ASSERT( m_pImplChartModel.get() != 0 ); + // /-- + MutexGuard aGuard( m_aModelMutex ); + m_pImplChartModel->SetTitle( Title ); + // \-- +} + +// ____ XInterface (for old API wrapper) ____ +uno::Any SAL_CALL ChartModel::queryInterface( const uno::Type& aType ) + throw (uno::RuntimeException) +{ + // return old API wrapper + if( aType == + ::getCppuType( (uno::Reference< ::com::sun::star::chart::XChartDocument > *)0 )) + { + return uno::makeAny( m_pImplChartModel->GetOldChartDocument( this )); + } + + return impl::ChartModel_Base::queryInterface( aType ); +} + + +} // namespace chart diff --git a/chart2/source/model/main/ChartModel.hxx b/chart2/source/model/main/ChartModel.hxx new file mode 100644 index 000000000..9b0564685 --- /dev/null +++ b/chart2/source/model/main/ChartModel.hxx @@ -0,0 +1,518 @@ +/************************************************************************* + * + * $RCSfile: ChartModel.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:30 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef _CHART_MODEL_HXX +#define _CHART_MODEL_HXX + +#include "LifeTime.hxx" +#include "ServiceMacros.hxx" + +#ifndef _COM_SUN_STAR_FRAME_XMODEL_HPP_ +#include <com/sun/star/frame/XModel.hpp> +#endif +#ifndef _COM_SUN_STAR_FRAME_XSTORABLE_HPP_ +#include <com/sun/star/frame/XStorable.hpp> +#endif +#ifndef _COM_SUN_STAR_UTIL_XMODIFIABLE_HPP_ +#include <com/sun/star/util/XModifiable.hpp> +#endif +/* +#ifndef _COM_SUN_STAR_SDBC_XCLOSEABLE_HPP_ +#include <com/sun/star/util/XCloseable.hpp> +#endif +*/ +#ifndef _COM_SUN_STAR_VIEW_XPRINTABLE_HPP_ +#include <com/sun/star/view/XPrintable.hpp> +#endif +#ifndef _COM_SUN_STAR_DOCUMENT_XEVENTBROADCASTER_HPP_ +#include <com/sun/star/document/XEventBroadcaster.hpp> +#endif +#ifndef _COM_SUN_STAR_DOCUMENT_XEVENTSSUPPLIER_HPP_ +#include <com/sun/star/document/XEventsSupplier.hpp> +#endif +#ifndef _COM_SUN_STAR_DOCUMENT_XDOCUMENTINFOSUPPLIER_HPP_ +#include <com/sun/star/document/XDocumentInfoSupplier.hpp> +#endif +#ifndef _COM_SUN_STAR_DOCUMENT_XVIEWDATASUPPLIER_HPP_ +#include <com/sun/star/document/XViewDataSupplier.hpp> +#endif +#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_ +#include <com/sun/star/lang/XServiceInfo.hpp> +#endif +#ifndef _COM_SUN_STAR_UNO_XCOMPONENTCONTEXT_HPP_ +#include <com/sun/star/uno/XComponentContext.hpp> +#endif +#ifndef _COM_SUN_STAR_STYLE_XSTYLEFAMILIESSUPPLIER_HPP_ +#include <com/sun/star/style/XStyleFamiliesSupplier.hpp> +#endif + +// #ifndef _DRAFTS_COM_SUN_STAR_CHART2_XMODELDATAPROVIDER_HPP_ +// #include <drafts/com/sun/star/chart2/XModelDataProvider.hpp> +// #endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XCHARTDOCUMENT_HPP_ +#include <drafts/com/sun/star/chart2/XChartDocument.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XTITLED_HPP_ +#include <drafts/com/sun/star/chart2/XTitled.hpp> +#endif + +/* +#ifndef _COM_SUN_STAR_FRAME_XCONTROLLER_HPP_ +#include <com/sun/star/frame/XController.hpp> +#endif +#ifndef _COM_SUN_STAR_FRAME_XDISPATCHPROVIDER_HPP_ +#include <com/sun/star/frame/XDispatchProvider.hpp> +#endif +#ifndef _COM_SUN_STAR_VIEW_XSELECTIONSUPPLIER_HPP_ +#include <com/sun/star/view/XSelectionSupplier.hpp> +#endif +#ifndef _COM_SUN_STAR_UI_XCONTEXTMENUINTERCEPTION_HPP_ +#include <com/sun/star/ui/XContextMenuInterception.hpp> +#endif +#ifndef _COM_SUN_STAR_UNO_XWEAK_HPP_ +#include <com/sun/star/uno/XWeak.hpp> +#endif +#ifndef _COM_SUN_STAR_SDBC_XCLOSELISTENER_HPP_ +#include <com/sun/star/util/XCloseListener.hpp> +#endif + +*/ +/* +#ifndef _COM_SUN_STAR_BEANS_XPROPERTYCHANGELISTENER_HPP_ +#include <com/sun/star/beans/XPropertyChangeListener.hpp> +#endif +#ifndef _COM_SUN_STAR_FRAME_XDISPATCH_HPP_ +#include <com/sun/star/frame/XDispatch.hpp> +#endif +#ifndef _COM_SUN_STAR_FORM_XLOADABLE_HPP_ +#include <com/sun/star/form/XLoadable.hpp> +#endif +*/ +#ifndef _CPPUHELPER_IMPLBASE7_HXX_ +#include <cppuhelper/implbase7.hxx> +#endif + +// for auto_ptr +#include <memory> + +//============================================================================= +/** this is an example implementation for the service ::com::sun::star::document::OfficeDocument +*/ + +namespace chart +{ + +namespace impl +{ + class ImplChartModel; + +// Note: needed for queryInterface (if it calls the base-class implementation) +typedef ::cppu::WeakImplHelper7 < +// ::com::sun::star::frame::XModel //comprehends XComponent (required interface), base of XChartDocument + ::com::sun::star::util::XCloseable //comprehends XCloseBroadcaster + ,::com::sun::star::frame::XStorable //(required interface) + ,::com::sun::star::util::XModifiable //comprehends XModifyBroadcaster (required interface) +// ,::com::sun::star::view::XPrintable //(optional interface) +// ,::com::sun::star::document::XEventBroadcaster //(optional interface) +// ,::com::sun::star::document::XEventsSupplier //(optional interface) +// ,::com::sun::star::document::XDocumentInfoSupplier //(optional interface) +// ,::com::sun::star::document::XViewDataSupplier //(optional interface) + + // ,::com::sun::star::uno::XWeak // implemented by WeakImplHelper(optional interface) + // ,::com::sun::star::uno::XInterface // implemented by WeakImplHelper(optional interface) + // ,::com::sun::star::lang::XTypeProvider // implemented by WeakImplHelper + ,::com::sun::star::lang::XServiceInfo +// ,::drafts::com::sun::star::chart2::XModelDataProvider + ,::drafts::com::sun::star::chart2::XChartDocument // derived from XModel + ,::com::sun::star::style::XStyleFamiliesSupplier + ,::drafts::com::sun::star::chart2::XTitled + > + ChartModel_Base; +} + +class ChartModel : public impl::ChartModel_Base +{ + +private: + mutable ::apphelper::CloseableLifeTimeManager m_aLifeTimeManager; + + mutable ::osl::Mutex m_aModelMutex; + sal_Bool volatile m_bReadOnly; + sal_Bool volatile m_bModified; + + ::rtl::OUString m_aResource; + ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > m_aMediaDescriptor; + + ::cppu::OInterfaceContainerHelper* volatile m_pControllers; + ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController > m_xCurrentController; + sal_uInt16 m_nControllerLockCount; + +// ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > m_aPrinterOptions; + + ::std::auto_ptr< impl::ImplChartModel > m_pImplChartModel; + +private: + //private methods + + ::rtl::OUString impl_g_getLocation(); + + ::cppu::OInterfaceContainerHelper* + impl_getControllerContainer() + throw (::com::sun::star::uno::RuntimeException); + + sal_Bool + impl_isControllerConnected( const com::sun::star::uno::Reference< + com::sun::star::frame::XController >& xController ); + + com::sun::star::uno::Reference< com::sun::star::frame::XController > + impl_getCurrentController() + throw( com::sun::star::uno::RuntimeException); + + void SAL_CALL + impl_notifyModifiedListeners() + throw( com::sun::star::uno::RuntimeException); + +public: + //no default constructor + ChartModel(::com::sun::star::uno::Reference< + ::com::sun::star::uno::XComponentContext > const & xContext); + virtual ~ChartModel(); + + //----------------------------------------------------------------- + // ::com::sun::star::lang::XServiceInfo + //----------------------------------------------------------------- + + APPHELPER_XSERVICEINFO_DECL() + APPHELPER_SERVICE_FACTORY_HELPER(ChartModel) + + //----------------------------------------------------------------- + // ::com::sun::star::frame::XModel (required interface) + //----------------------------------------------------------------- + + virtual sal_Bool SAL_CALL + attachResource( const ::rtl::OUString& rURL + , const ::com::sun::star::uno::Sequence< + ::com::sun::star::beans::PropertyValue >& rMediaDescriptor ) + throw (::com::sun::star::uno::RuntimeException); + + virtual ::rtl::OUString SAL_CALL + getURL() throw (::com::sun::star::uno::RuntimeException); + + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL + getArgs() throw (::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL + connectController( const ::com::sun::star::uno::Reference< + ::com::sun::star::frame::XController >& xController ) + throw (::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL + disconnectController( const ::com::sun::star::uno::Reference< + ::com::sun::star::frame::XController >& xController ) + throw (::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL + lockControllers() throw (::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL + unlockControllers() throw (::com::sun::star::uno::RuntimeException); + + virtual sal_Bool SAL_CALL + hasControllersLocked() + throw (::com::sun::star::uno::RuntimeException); + + virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController > SAL_CALL + getCurrentController() + throw (::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL + setCurrentController( const ::com::sun::star::uno::Reference< + ::com::sun::star::frame::XController >& xController ) + throw (::com::sun::star::container::NoSuchElementException + , ::com::sun::star::uno::RuntimeException); + + virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL + getCurrentSelection() + throw (::com::sun::star::uno::RuntimeException); + + + //----------------------------------------------------------------- + // ::com::sun::star::lang::XComponent (base of XModel) + //----------------------------------------------------------------- + virtual void SAL_CALL + dispose() throw (::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL + addEventListener( const ::com::sun::star::uno::Reference< + ::com::sun::star::lang::XEventListener > & xListener ) + throw (::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL + removeEventListener( const ::com::sun::star::uno::Reference< + ::com::sun::star::lang::XEventListener > & xListener ) + throw (::com::sun::star::uno::RuntimeException); + + //----------------------------------------------------------------- + // ::com::sun::star::util::XCloseable + //----------------------------------------------------------------- + virtual void SAL_CALL + close( sal_Bool bDeliverOwnership ) + throw( ::com::sun::star::util::CloseVetoException ); + + //----------------------------------------------------------------- + // ::com::sun::star::util::XCloseBroadcaster (base of XCloseable) + //----------------------------------------------------------------- + virtual void SAL_CALL + addCloseListener( const ::com::sun::star::uno::Reference< + ::com::sun::star::util::XCloseListener > & xListener ) + throw (::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL + removeCloseListener( const ::com::sun::star::uno::Reference< + ::com::sun::star::util::XCloseListener > & xListener ) + throw (::com::sun::star::uno::RuntimeException); + + //----------------------------------------------------------------- + // ::com::sun::star::frame::XStorable (required interface) + //----------------------------------------------------------------- + virtual sal_Bool SAL_CALL + hasLocation() throw (::com::sun::star::uno::RuntimeException); + + virtual ::rtl::OUString SAL_CALL + getLocation() throw (::com::sun::star::uno::RuntimeException); + + virtual sal_Bool SAL_CALL + isReadonly() throw (::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL + store() throw (::com::sun::star::io::IOException + , ::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL + storeAsURL( const ::rtl::OUString& rURL + , const ::com::sun::star::uno::Sequence< + ::com::sun::star::beans::PropertyValue >& rMediaDescriptor ) + throw (::com::sun::star::io::IOException + , ::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL + storeToURL( const ::rtl::OUString& rURL + , const ::com::sun::star::uno::Sequence< + ::com::sun::star::beans::PropertyValue >& rMediaDescriptor ) + throw (::com::sun::star::io::IOException + , ::com::sun::star::uno::RuntimeException); + + //----------------------------------------------------------------- + // ::com::sun::star::util::XModifiable (required interface) + //----------------------------------------------------------------- + virtual sal_Bool SAL_CALL + isModified() throw (::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL + setModified( sal_Bool bModified ) + throw (::com::sun::star::beans::PropertyVetoException + , ::com::sun::star::uno::RuntimeException); + + //----------------------------------------------------------------- + // ::com::sun::star::util::XModifyBroadcaster (base of XModifiable) + //----------------------------------------------------------------- + virtual void SAL_CALL + addModifyListener( const ::com::sun::star::uno::Reference< + ::com::sun::star::util::XModifyListener >& xListener ) + throw (::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL + removeModifyListener( const ::com::sun::star::uno::Reference< + ::com::sun::star::util::XModifyListener >& xListener ) + throw (::com::sun::star::uno::RuntimeException); +/* + //----------------------------------------------------------------- + // ::com::sun::star::view::XPrintable (optional interface) + //----------------------------------------------------------------- + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL + getPrinter() throw (::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL + setPrinter( const ::com::sun::star::uno::Sequence< + ::com::sun::star::beans::PropertyValue >& rPrinter ) + throw (::com::sun::star::lang::IllegalArgumentException + , ::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL + print( const ::com::sun::star::uno::Sequence< + ::com::sun::star::beans::PropertyValue >& rOptions ) + throw (::com::sun::star::lang::IllegalArgumentException + , ::com::sun::star::uno::RuntimeException); + + //----------------------------------------------------------------- + // ::com::sun::star::document::XEventBroadcaster (optional interface) + //----------------------------------------------------------------- + + virtual void SAL_CALL + addEventListener( const ::com::sun::star::uno::Reference< + ::com::sun::star::document::XEventListener >& xListener ) + throw (::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL + removeEventListener( const ::com::sun::star::uno::Reference< + ::com::sun::star::document::XEventListener >& xListener ) + throw (::com::sun::star::uno::RuntimeException); + + //----------------------------------------------------------------- + // ::com::sun::star::document::XEventsSupplier (optional interface) + //----------------------------------------------------------------- + + virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameReplace > SAL_CALL + getEvents() throw (::com::sun::star::uno::RuntimeException); + + //----------------------------------------------------------------- + // ::com::sun::star::document::XDocumentInfoSupplier (optional interface) + //----------------------------------------------------------------- + + virtual ::com::sun::star::uno::Reference< ::com::sun::star::document::XDocumentInfo > SAL_CALL + getDocumentInfo() throw (::com::sun::star::uno::RuntimeException); + + //----------------------------------------------------------------- + // ::com::sun::star::document::XViewDataSupplier (optional interface) + //----------------------------------------------------------------- + + virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > SAL_CALL + getViewData() throw (::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL + setViewData( const ::com::sun::star::uno::Reference< + ::com::sun::star::container::XIndexAccess >& xData ) + throw (::com::sun::star::uno::RuntimeException); + */ + + //----------------------------------------------------------------- + // ::com::sun::star::style::XStyleFamiliesSupplier + //----------------------------------------------------------------- + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::container::XNameAccess > SAL_CALL + getStyleFamilies() throw (::com::sun::star::uno::RuntimeException); + + //----------------------------------------------------------------- + // ::drafts::com::sun::star::chart2::XModelDataProvider + //----------------------------------------------------------------- +// virtual ::com::sun::star::uno::Sequence< +// ::com::sun::star::uno::Reference< +// ::drafts::com::sun::star::chart2::XDataSeries > > SAL_CALL +// getDataSeries() throw (::com::sun::star::uno::RuntimeException); + + //----------------------------------------------------------------- + // ::drafts::com::sun::star::chart2::XChartDocument + //----------------------------------------------------------------- + virtual ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XDiagram > SAL_CALL + getDiagram() throw (::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL + setDiagram( const ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XDiagram >& xDiagram ) + throw (::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL + attachDataProvider( const ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XDataProvider >& xProvider ) + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL + setRangeRepresentation( const ::rtl::OUString& aRangeRepresentation ) + throw (::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL + setChartTypeManager( const ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XChartTypeManager >& xNewManager ) + throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XChartTypeManager > SAL_CALL + getChartTypeManager() + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL + setChartTypeTemplate( const ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XChartTypeTemplate >& xNewTemplate ) + throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XChartTypeTemplate > SAL_CALL + getChartTypeTemplate() + throw (::com::sun::star::uno::RuntimeException); +// virtual void SAL_CALL setSplitLayoutContainer( +// const ::com::sun::star::uno::Reference< +// ::drafts::com::sun::star::layout::XSplitLayoutContainer >& xLayoutCnt ) +// throw (::com::sun::star::uno::RuntimeException); +// virtual ::com::sun::star::uno::Reference< +// ::drafts::com::sun::star::layout::XSplitLayoutContainer > SAL_CALL getSplitLayoutContainer() +// throw (::com::sun::star::uno::RuntimeException); + + // ____ XTitled ____ + virtual ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XTitle > SAL_CALL getTitle() + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setTitle( const ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XTitle >& Title ) + throw (::com::sun::star::uno::RuntimeException); + + // ____ XInterface (for old API wrapper) ____ + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) + throw (::com::sun::star::uno::RuntimeException); +}; + +} // namespace chart + +#endif + diff --git a/chart2/source/model/main/DataPoint.cxx b/chart2/source/model/main/DataPoint.cxx new file mode 100644 index 000000000..784e5078d --- /dev/null +++ b/chart2/source/model/main/DataPoint.cxx @@ -0,0 +1,217 @@ +/************************************************************************* + * + * $RCSfile: DataPoint.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:30 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "DataPoint.hxx" +#include "DataPointProperties.hxx" +#include "CharacterProperties.hxx" +#include "UserDefinedProperties.hxx" +#include "PropertyHelper.hxx" +#include "macros.hxx" +#include "algohelper.hxx" + +#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HPP_ +#include <com/sun/star/beans/PropertyAttribute.hpp> +#endif +#ifndef _COM_SUN_STAR_STYLE_XSTYLE_HPP_ +#include <com/sun/star/style/XStyle.hpp> +#endif +#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_ +#include <com/sun/star/beans/XPropertySet.hpp> +#endif + +#ifndef _COM_SUN_STAR_UNO_SEQUENCE_HXX_ +#include <com/sun/star/uno/Sequence.hxx> +#endif + +#include <algorithm> + +using namespace ::com::sun::star; +using namespace ::drafts::com::sun::star; + +using ::com::sun::star::uno::Reference; +using ::com::sun::star::beans::Property; +using ::osl::MutexGuard; + +// ____________________________________________________________ + +namespace +{ +const uno::Sequence< Property > & lcl_GetPropertySequence() +{ + static uno::Sequence< Property > aPropSeq; + + // /-- + ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); + if( 0 == aPropSeq.getLength() ) + { + // get properties + ::std::vector< ::com::sun::star::beans::Property > aProperties; + ::chart::DataPointProperties::AddPropertiesToVector( + aProperties, /* bIncludeStyleProperties = */ true ); + ::chart::CharacterProperties::AddPropertiesToVector( + aProperties, /* bIncludeStyleProperties = */ true ); + ::chart::UserDefinedProperties::AddPropertiesToVector( aProperties ); + + // and sort them for access via bsearch + ::std::sort( aProperties.begin(), aProperties.end(), + ::chart::helper::PropertyNameLess() ); + + // transfer result to static Sequence + aPropSeq = ::chart::helper::VectorToSequence( aProperties ); + } + + return aPropSeq; +} +} // anonymous namespace + +// ____________________________________________________________ + +namespace chart +{ + +DataPoint::DataPoint( ::osl::Mutex & _rMutex ) : + ::property::OPropertySet( _rMutex ), + m_rMutex( _rMutex ) +{} + +DataPoint::DataPoint( ::osl::Mutex & _rMutex, + const uno::Reference< + beans::XPropertySet > & rParentProperties ) : + ::property::OPropertySet( _rMutex ), + m_rMutex( _rMutex ), + m_xParentProperties( rParentProperties ) +{} + +DataPoint::~DataPoint() +{} + +// ____ XInterface ____ +uno::Any SAL_CALL DataPoint::queryInterface( + const uno::Type & rType ) + throw (uno::RuntimeException) +{ + // OPropertySet interfaces + uno::Any aAny = ::property::OPropertySet::queryInterface( rType ); + if( aAny.hasValue() ) + return aAny; + + // OWeakObject interfaces + return ::cppu::OWeakObject::queryInterface( rType ); +} + +void SAL_CALL DataPoint::acquire() throw () +{ + ::cppu::OWeakObject::acquire(); +} + +void SAL_CALL DataPoint::release() throw () +{ + ::cppu::OWeakObject::release(); +} + +// ____ OPropertySet ____ +uno::Any DataPoint::GetDefaultValue( sal_Int32 nHandle ) const + throw(beans::UnknownPropertyException) +{ + // the value set at the data series is the default + uno::Reference< beans::XFastPropertySet > xFast( m_xParentProperties, uno::UNO_QUERY ); + OSL_ASSERT( xFast.is()); + return xFast->getFastPropertyValue( nHandle ); +} + +::cppu::IPropertyArrayHelper & SAL_CALL DataPoint::getInfoHelper() +{ + return getInfoHelperConst(); +} + +::cppu::IPropertyArrayHelper & SAL_CALL DataPoint::getInfoHelperConst() const +{ + static ::cppu::OPropertyArrayHelper aArrayHelper( + lcl_GetPropertySequence(), + /* bSorted = */ sal_True ); + + return aArrayHelper; +} + +// ____ XPropertySet ____ +Reference< beans::XPropertySetInfo > SAL_CALL + DataPoint::getPropertySetInfo() + throw (uno::RuntimeException) +{ + static Reference< beans::XPropertySetInfo > xInfo; + + // /-- + ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); + if( !xInfo.is()) + { + xInfo = ::cppu::OPropertySetHelper::createPropertySetInfo( + getInfoHelper()); + } + + return xInfo; + // \-- +} + +::osl::Mutex & DataPoint::GetMutex() +{ + return m_rMutex; +} + +} // namespace chart diff --git a/chart2/source/model/main/DataPoint.hxx b/chart2/source/model/main/DataPoint.hxx new file mode 100644 index 000000000..f89ddc5df --- /dev/null +++ b/chart2/source/model/main/DataPoint.hxx @@ -0,0 +1,121 @@ +/************************************************************************* + * + * $RCSfile: DataPoint.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:30 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef CHART_DATAPOINT_HXX +#define CHART_DATAPOINT_HXX + +#ifndef _CPPUHELPER_WEAK_HXX_ +#include <cppuhelper/weak.hxx> +#endif +#ifndef _OSL_MUTEX_HXX_ +#include <osl/mutex.hxx> +#endif + +#include "OPropertySet.hxx" + +namespace chart +{ + +class DataPoint : + public ::cppu::OWeakObject, + public ::property::OPropertySet +{ +public: + explicit DataPoint( ::osl::Mutex & _rMutex ); + DataPoint( ::osl::Mutex & _rMutex, + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertySet > & rParentProperties ); + virtual ~DataPoint(); + + // ____ XInterface ____ + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( + const ::com::sun::star::uno::Type & rType ) + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL acquire() throw (); + virtual void SAL_CALL release() throw (); + +protected: + // ____ OPropertySet ____ + virtual ::com::sun::star::uno::Any GetDefaultValue( sal_Int32 nHandle ) const + throw(::com::sun::star::beans::UnknownPropertyException); + + virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper(); + + // ____ XPropertySet ____ + virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL + getPropertySetInfo() + throw (::com::sun::star::uno::RuntimeException); + + ::osl::Mutex & GetMutex(); + + /** const variant of getInfoHelper() + */ + ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelperConst() const; + +private: + ::osl::Mutex & m_rMutex; + ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertySet > m_xParentProperties; +}; + +} // namespace chart + +// CHART_DATAPOINT_HXX +#endif diff --git a/chart2/source/model/main/DataPointProperties.cxx b/chart2/source/model/main/DataPointProperties.cxx new file mode 100644 index 000000000..9881da9b8 --- /dev/null +++ b/chart2/source/model/main/DataPointProperties.cxx @@ -0,0 +1,365 @@ +/************************************************************************* + * + * $RCSfile: DataPointProperties.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:30 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "DataPointProperties.hxx" +#include "macros.hxx" + +#ifndef _COM_SUN_STAR_AWT_GRADIENT_HPP_ +#include <com/sun/star/awt/Gradient.hpp> +#endif +#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HPP_ +#include <com/sun/star/beans/PropertyAttribute.hpp> +#endif +#ifndef _COM_SUN_STAR_DRAWING_FILLSTYLE_HPP_ +#include <com/sun/star/drawing/FillStyle.hpp> +#endif +#ifndef _COM_SUN_STAR_DRAWING_LINESTYLE_HPP_ +#include <com/sun/star/drawing/LineStyle.hpp> +#endif +#ifndef _COM_SUN_STAR_DRAWING_LINEDASH_HPP_ +#include <com/sun/star/drawing/LineDash.hpp> +#endif +#ifndef _COM_SUN_STAR_DRAWING_POLYPOLYGONBEZIERCOORDS_HPP_ +#include <com/sun/star/drawing/PolyPolygonBezierCoords.hpp> +#endif +#ifndef _COM_SUN_STAR_DRAWING_HATCH_HPP_ +#include <com/sun/star/drawing/Hatch.hpp> +#endif +#ifndef _COM_SUN_STAR_STYLE_XSTYLE_HPP_ +#include <com/sun/star/style/XStyle.hpp> +#endif + +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_FILLBITMAP_HPP_ +#include <drafts/com/sun/star/chart2/FillBitmap.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_TRANSPARENCYSTYLE_HPP_ +#include <drafts/com/sun/star/chart2/TransparencyStyle.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_DATACAPTIONSTYLE_HPP_ +#include <drafts/com/sun/star/chart2/DataCaptionStyle.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_NUMBERFORMAT_HPP_ +#include <drafts/com/sun/star/chart2/NumberFormat.hpp> +#endif + +using namespace ::com::sun::star; +using namespace ::drafts::com::sun::star; + +using ::com::sun::star::beans::Property; + +namespace chart +{ + +void DataPointProperties::AddPropertiesToVector( + ::std::vector< Property > & rOutProperties, + bool bIncludeStyleProperties /* = false */ ) +{ + if( bIncludeStyleProperties ) + { + rOutProperties.push_back( + Property( C2U( "Style" ), + PROP_DATAPOINT_STYLE, + ::getCppuType( reinterpret_cast< const uno::Reference< ::com::sun::star::style::XStyle > * >(0)), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEVOID )); + } + + // DataPointProperties + // =================== + + // Common + // ------ + rOutProperties.push_back( + Property( C2U( "Color" ), + PROP_DATAPOINT_COLOR, + ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEVOID // "maybe auto" + | beans::PropertyAttribute::MAYBEDEFAULT )); + + rOutProperties.push_back( + Property( C2U( "Transparency" ), + PROP_DATAPOINT_TRANSPARENCY, + ::getCppuType( reinterpret_cast< const sal_Int16 * >(0)), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEDEFAULT )); + + // Fill Properties + // --------------- + rOutProperties.push_back( + Property( C2U( "FillStyle" ), + PROP_DATAPOINT_FILL_STYLE, + ::getCppuType( reinterpret_cast< const drawing::FillStyle * >(0)), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEDEFAULT )); + + rOutProperties.push_back( + Property( C2U( "TransparencyStyle" ), + PROP_DATAPOINT_TRANSPARENCY_STYLE, + ::getCppuType( reinterpret_cast< const chart2::TransparencyStyle * >(0)), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEDEFAULT + | beans::PropertyAttribute::MAYBEVOID )); + + rOutProperties.push_back( + Property( C2U( "TransparencyGradient" ), + PROP_DATAPOINT_TRANSPARENCY_GRADIENT, + ::getCppuType( reinterpret_cast< const awt::Gradient * >(0)), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEDEFAULT + | beans::PropertyAttribute::MAYBEVOID )); + + rOutProperties.push_back( + Property( C2U( "Gradient" ), + PROP_DATAPOINT_GRADIENT, + ::getCppuType( reinterpret_cast< const awt::Gradient * >(0)), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEDEFAULT + | beans::PropertyAttribute::MAYBEVOID )); + + rOutProperties.push_back( + Property( C2U( "Hatch" ), + PROP_DATAPOINT_HATCH, + ::getCppuType( reinterpret_cast< const drawing::Hatch * >(0)), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEDEFAULT + | beans::PropertyAttribute::MAYBEVOID )); + + rOutProperties.push_back( + Property( C2U( "Bitmap" ), + PROP_DATAPOINT_BITMAP, + ::getCppuType( reinterpret_cast< const chart2::FillBitmap * >(0)), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEDEFAULT + | beans::PropertyAttribute::MAYBEVOID )); + + // border for filled objects + rOutProperties.push_back( + Property( C2U( "BorderColor" ), + PROP_DATAPOINT_BORDER_COLOR, + ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEVOID // "maybe auto" + | beans::PropertyAttribute::MAYBEDEFAULT )); + rOutProperties.push_back( + Property( C2U( "BorderStyle" ), + PROP_DATAPOINT_BORDER_STYLE, + ::getCppuType( reinterpret_cast< const drawing::LineStyle * >(0)), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEDEFAULT )); + rOutProperties.push_back( + Property( C2U( "BorderWidth" ), + PROP_DATAPOINT_BORDER_WIDTH, + ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEDEFAULT )); + rOutProperties.push_back( + Property( C2U( "BorderDash" ), + PROP_DATAPOINT_BORDER_DASH, + ::getCppuType( reinterpret_cast< const drawing::LineDash * >(0)), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEVOID )); + rOutProperties.push_back( + Property( C2U( "BorderTransparency" ), + PROP_DATAPOINT_BORDER_TRANSPARENCY, + ::getCppuType( reinterpret_cast< const sal_Int16 * >(0)), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEVOID )); + + // Line Properties + // --------------- + rOutProperties.push_back( + Property( C2U( "LineStyle" ), + PROP_DATAPOINT_LINE_STYLE, + ::getCppuType( reinterpret_cast< const drawing::LineStyle * >(0)), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEDEFAULT )); + rOutProperties.push_back( + Property( C2U( "LineWidth" ), + PROP_DATAPOINT_LINE_WIDTH, + ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEDEFAULT )); + rOutProperties.push_back( + Property( C2U( "LineDash" ), + PROP_DATAPOINT_LINE_DASH, + ::getCppuType( reinterpret_cast< const drawing::LineDash * >(0)), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEVOID )); + + // others + rOutProperties.push_back( + Property( C2U( "Symbol" ), + PROP_DATAPOINT_SYMBOL, + ::getCppuType( reinterpret_cast< const drawing::PolyPolygonBezierCoords * >(0)), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEVOID )); + rOutProperties.push_back( + Property( C2U( "Offset" ), + PROP_DATAPOINT_OFFSET, + ::getCppuType( reinterpret_cast< const double * >(0)), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEDEFAULT )); + + rOutProperties.push_back( + Property( C2U( "DataCaption" ), + PROP_DATAPOINT_DATA_CAPTION, + ::getCppuType( reinterpret_cast< const chart2::DataCaptionStyle * >(0)), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEDEFAULT )); + + rOutProperties.push_back( + Property( C2U( "NumberFormat" ), + PROP_DATAPOINT_NUMBER_FORMAT, + ::getCppuType( reinterpret_cast< const chart2::NumberFormat * >(0)), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEDEFAULT )); +} + +void DataPointProperties::AddDefaultsToMap( + ::chart::helper::tPropertyValueMap & rOutMap, + bool bIncludeStyleProperties /* = false */ ) +{ + OSL_ASSERT( rOutMap.end() == rOutMap.find( PROP_DATAPOINT_COLOR )); + rOutMap[ PROP_DATAPOINT_COLOR ] = + uno::makeAny( sal_Int32( 0x0000b8ff )); // blue 7 + + OSL_ASSERT( rOutMap.end() == rOutMap.find( PROP_DATAPOINT_TRANSPARENCY )); + rOutMap[ PROP_DATAPOINT_TRANSPARENCY ] = + uno::makeAny( sal_Int16( 0 ) ); + + //fill + OSL_ASSERT( rOutMap.end() == rOutMap.find( PROP_DATAPOINT_FILL_STYLE )); + rOutMap[ PROP_DATAPOINT_FILL_STYLE ] = + uno::makeAny( drawing::FillStyle_SOLID ); + + OSL_ASSERT( rOutMap.end() == rOutMap.find( PROP_DATAPOINT_TRANSPARENCY_STYLE )); + rOutMap[ PROP_DATAPOINT_TRANSPARENCY_STYLE ] = + uno::makeAny( chart2::TransparencyStyle_NONE ); + + OSL_ASSERT( rOutMap.end() == rOutMap.find( PROP_DATAPOINT_TRANSPARENCY_GRADIENT )); + rOutMap[ PROP_DATAPOINT_TRANSPARENCY_GRADIENT ] = + uno::Any();//need this empty default value otherwise get a costly exception in DataSeries::GetDefaultValue + OSL_ASSERT( rOutMap.end() == rOutMap.find( PROP_DATAPOINT_GRADIENT )); + rOutMap[ PROP_DATAPOINT_GRADIENT ] = + uno::Any();//need this empty default value otherwise get a costly exception in DataSeries::GetDefaultValue + OSL_ASSERT( rOutMap.end() == rOutMap.find( PROP_DATAPOINT_HATCH )); + rOutMap[ PROP_DATAPOINT_HATCH ] = + uno::Any();//need this empty default value otherwise get a costly exception in DataSeries::GetDefaultValue + OSL_ASSERT( rOutMap.end() == rOutMap.find( PROP_DATAPOINT_BITMAP )); + rOutMap[ PROP_DATAPOINT_BITMAP ] = + uno::Any();//need this empty default value otherwise get a costly exception in DataSeries::GetDefaultValue + + //border + OSL_ASSERT( rOutMap.end() == rOutMap.find( PROP_DATAPOINT_BORDER_COLOR )); + rOutMap[ PROP_DATAPOINT_BORDER_COLOR ] = + uno::makeAny( sal_Int32( 0x00000000 )); // black + OSL_ASSERT( rOutMap.end() == rOutMap.find( PROP_DATAPOINT_BORDER_STYLE )); + rOutMap[ PROP_DATAPOINT_BORDER_STYLE ] = + uno::makeAny( drawing::LineStyle_SOLID ); + OSL_ASSERT( rOutMap.end() == rOutMap.find( PROP_DATAPOINT_BORDER_WIDTH )); + rOutMap[ PROP_DATAPOINT_BORDER_WIDTH ] = + uno::makeAny( sal_Int32( 0 ) ); + OSL_ASSERT( rOutMap.end() == rOutMap.find( PROP_DATAPOINT_BORDER_DASH )); + rOutMap[ PROP_DATAPOINT_BORDER_DASH ] = + uno::Any();//need this empty default value otherwise get a costly exception in DataSeries::GetDefaultValue + OSL_ASSERT( rOutMap.end() == rOutMap.find( PROP_DATAPOINT_BORDER_TRANSPARENCY )); + rOutMap[ PROP_DATAPOINT_BORDER_TRANSPARENCY ] = + uno::makeAny( sal_Int16( 0 ) ); + + //line + OSL_ASSERT( rOutMap.end() == rOutMap.find( PROP_DATAPOINT_LINE_STYLE )); + rOutMap[ PROP_DATAPOINT_LINE_STYLE ] = + uno::makeAny( drawing::LineStyle_SOLID ); + OSL_ASSERT( rOutMap.end() == rOutMap.find( PROP_DATAPOINT_LINE_WIDTH )); + rOutMap[ PROP_DATAPOINT_LINE_WIDTH ] = + uno::makeAny( sal_Int32( 0 ) ); + OSL_ASSERT( rOutMap.end() == rOutMap.find( PROP_DATAPOINT_LINE_DASH )); + rOutMap[ PROP_DATAPOINT_LINE_DASH ] = + uno::Any();//need this empty default value otherwise get a costly exception in DataSeries::GetDefaultValue + + + //others + OSL_ASSERT( rOutMap.end() == rOutMap.find( PROP_DATAPOINT_SYMBOL )); + rOutMap[ PROP_DATAPOINT_SYMBOL ] = + uno::Any();//need this empty default value otherwise get a costly exception in DataSeries::GetDefaultValue + + OSL_ASSERT( rOutMap.end() == rOutMap.find( PROP_DATAPOINT_OFFSET )); + rOutMap[ PROP_DATAPOINT_OFFSET ] = + uno::makeAny( double( 0.0 ) ); + + OSL_ASSERT( rOutMap.end() == rOutMap.find( PROP_DATAPOINT_DATA_CAPTION )); + rOutMap[ PROP_DATAPOINT_DATA_CAPTION ] = + uno::makeAny( chart2::DataCaptionStyle( + sal_False, // ShowNumber + sal_False, // ShowNumberInPercent + sal_False, // ShowCategoryName + sal_False // ShowLegendSymbol + )); + + chart2::NumberFormat aFormat( + C2U( "Standard" ), + lang::Locale( C2U( "DE" ), C2U( "de" ), ::rtl::OUString())); + OSL_ASSERT( rOutMap.end() == rOutMap.find( PROP_DATAPOINT_NUMBER_FORMAT )); + rOutMap[ PROP_DATAPOINT_NUMBER_FORMAT ] = + uno::makeAny( aFormat ); +} + +} // namespace chart diff --git a/chart2/source/model/main/DataPointProperties.hxx b/chart2/source/model/main/DataPointProperties.hxx new file mode 100644 index 000000000..010427657 --- /dev/null +++ b/chart2/source/model/main/DataPointProperties.hxx @@ -0,0 +1,129 @@ +/************************************************************************* + * + * $RCSfile: DataPointProperties.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:30 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef CHART_DATAPOINTPROPERTIES_HXX +#define CHART_DATAPOINTPROPERTIES_HXX + +#include "PropertyHelper.hxx" +#include "FastPropertyIdRanges.hxx" + +#ifndef _COM_SUN_STAR_BEANS_PROPERTY_HPP_ +#include <com/sun/star/beans/Property.hpp> +#endif + +#include <vector> + +namespace chart +{ + +// implements service DataPointProperties +class DataPointProperties +{ +public: + // FastProperty Ids for properties + enum + { + // common + PROP_DATAPOINT_STYLE = FAST_PROPERTY_ID_START_DATA_POINT, + PROP_DATAPOINT_COLOR, + PROP_DATAPOINT_TRANSPARENCY, + + // fill + PROP_DATAPOINT_FILL_STYLE, + PROP_DATAPOINT_TRANSPARENCY_STYLE, + PROP_DATAPOINT_TRANSPARENCY_GRADIENT, + PROP_DATAPOINT_GRADIENT, + PROP_DATAPOINT_HATCH, + PROP_DATAPOINT_BITMAP, + + // border (of filled objects) + PROP_DATAPOINT_BORDER_COLOR, + PROP_DATAPOINT_BORDER_STYLE, + PROP_DATAPOINT_BORDER_WIDTH, + PROP_DATAPOINT_BORDER_DASH, + PROP_DATAPOINT_BORDER_TRANSPARENCY, + + // line + PROP_DATAPOINT_LINE_STYLE, + PROP_DATAPOINT_LINE_WIDTH, + PROP_DATAPOINT_LINE_DASH, + + // others + PROP_DATAPOINT_SYMBOL, + PROP_DATAPOINT_OFFSET, + PROP_DATAPOINT_DATA_CAPTION, + PROP_DATAPOINT_NUMBER_FORMAT + }; + + static void AddPropertiesToVector( + ::std::vector< ::com::sun::star::beans::Property > & rOutProperties, + bool bIncludeStyleProperties = false ); + + static void AddDefaultsToMap( ::chart::helper::tPropertyValueMap & rOutMap, bool bIncludeStyleProperties = false ); + +private: + // not implemented + DataPointProperties(); +}; + +} // namespace chart + +// CHART_DATAPOINTPROPERTIES_HXX +#endif diff --git a/chart2/source/model/main/DataPointStyle.cxx b/chart2/source/model/main/DataPointStyle.cxx new file mode 100644 index 000000000..64533c303 --- /dev/null +++ b/chart2/source/model/main/DataPointStyle.cxx @@ -0,0 +1,216 @@ +/************************************************************************* + * + * $RCSfile: DataPointStyle.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:30 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "DataPointStyle.hxx" +#include "DataPointProperties.hxx" +#include "PropertyHelper.hxx" +#include "macros.hxx" +#include "algohelper.hxx" + +#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HPP_ +#include <com/sun/star/beans/PropertyAttribute.hpp> +#endif +#ifndef _COM_SUN_STAR_STYLE_XSTYLE_HPP_ +#include <com/sun/star/style/XStyle.hpp> +#endif +#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_ +#include <com/sun/star/beans/XPropertySet.hpp> +#endif + +#ifndef _COM_SUN_STAR_UNO_SEQUENCE_HXX_ +#include <com/sun/star/uno/Sequence.hxx> +#endif + +#include <algorithm> + +using namespace ::com::sun::star; +using namespace ::drafts::com::sun::star; + +using ::com::sun::star::uno::Reference; +using ::com::sun::star::beans::Property; +using ::osl::MutexGuard; + +// ____________________________________________________________ + +namespace +{ +const uno::Sequence< Property > & lcl_GetPropertySequence() +{ + static uno::Sequence< Property > aPropSeq; + + // /-- + ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); + if( 0 == aPropSeq.getLength() ) + { + // get properties + ::std::vector< ::com::sun::star::beans::Property > aProperties; + ::chart::DataPointProperties::AddPropertiesToVector( + aProperties, /* bIncludeStyleProperties = */ false ); + + // and sort them for access via bsearch + ::std::sort( aProperties.begin(), aProperties.end(), + ::chart::helper::PropertyNameLess() ); + + // transfer result to static Sequence + aPropSeq = ::chart::helper::VectorToSequence( aProperties ); + } + + return aPropSeq; +} +} // anonymous namespace + +// ____________________________________________________________ + +namespace chart +{ + +DataPointStyle::DataPointStyle( + const uno::Reference< container::XNameAccess > & xStyleFamily, + ::osl::Mutex & _rMutex ) : + ::property::OStyle( xStyleFamily, _rMutex ), + m_rMutex( _rMutex ) +{} + +DataPointStyle::~DataPointStyle() +{} + +// ____ XInterface ____ +uno::Any SAL_CALL DataPointStyle::queryInterface( + const uno::Type & rType ) + throw (uno::RuntimeException) +{ + return ::cppu::OWeakObject::queryInterface( rType ); +} + +void SAL_CALL DataPointStyle::acquire() throw () +{ + ::cppu::OWeakObject::acquire(); +} + +void SAL_CALL DataPointStyle::release() throw () +{ + ::cppu::OWeakObject::release(); +} + +// ____ OPropertySet ____ +uno::Any DataPointStyle::GetDefaultValue( sal_Int32 nHandle ) const + throw(beans::UnknownPropertyException) +{ + static helper::tPropertyValueMap aStaticDefaults; + + // /-- + ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); + if( 0 == aStaticDefaults.size() ) + { + // initialize defaults + DataPointProperties::AddDefaultsToMap( + aStaticDefaults, + /* bIncludeStyleProperties = */ false ); + } + + helper::tPropertyValueMap::const_iterator aFound( + aStaticDefaults.find( nHandle )); + + if( aFound == aStaticDefaults.end()) + throw beans::UnknownPropertyException(); + + return (*aFound).second; + // \-- +} + +::cppu::IPropertyArrayHelper & SAL_CALL DataPointStyle::getInfoHelper() +{ + return getInfoHelperConst(); +} + +::cppu::IPropertyArrayHelper & SAL_CALL DataPointStyle::getInfoHelperConst() const +{ + static ::cppu::OPropertyArrayHelper aArrayHelper( + lcl_GetPropertySequence(), + /* bSorted = */ sal_True ); + + return aArrayHelper; +} + +// ____ XPropertySet ____ +Reference< beans::XPropertySetInfo > SAL_CALL + DataPointStyle::getPropertySetInfo() + throw (uno::RuntimeException) +{ + static Reference< beans::XPropertySetInfo > xInfo; + + // /-- + ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); + if( !xInfo.is()) + { + xInfo = ::cppu::OPropertySetHelper::createPropertySetInfo( + getInfoHelper()); + } + + return xInfo; + // \-- +} + +::osl::Mutex & DataPointStyle::GetMutex() +{ + return m_rMutex; +} + +} // namespace chart diff --git a/chart2/source/model/main/DataPointStyle.hxx b/chart2/source/model/main/DataPointStyle.hxx new file mode 100644 index 000000000..ab26df675 --- /dev/null +++ b/chart2/source/model/main/DataPointStyle.hxx @@ -0,0 +1,118 @@ +/************************************************************************* + * + * $RCSfile: DataPointStyle.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:30 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef CHART_DATAPOINTSTYLE_HXX +#define CHART_DATAPOINTSTYLE_HXX + +#ifndef _CPPUHELPER_WEAK_HXX_ +#include <cppuhelper/weak.hxx> +#endif +#ifndef _OSL_MUTEX_HXX_ +#include <osl/mutex.hxx> +#endif + +#include "OStyle.hxx" + +namespace chart +{ + +class DataPointStyle : + public ::cppu::OWeakObject, + public ::property::OStyle +{ +public: + DataPointStyle( const ::com::sun::star::uno::Reference< + ::com::sun::star::container::XNameAccess > & xStyleFamily, + ::osl::Mutex & rMutex ); + virtual ~DataPointStyle(); + + // ____ XInterface ____ + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( + const ::com::sun::star::uno::Type & rType ) + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL acquire() throw (); + virtual void SAL_CALL release() throw (); + +protected: + // ____ OPropertySet ____ + virtual ::com::sun::star::uno::Any GetDefaultValue( sal_Int32 nHandle ) const + throw(::com::sun::star::beans::UnknownPropertyException); + + virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper(); + + // ____ XPropertySet ____ + virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL + getPropertySetInfo() + throw (::com::sun::star::uno::RuntimeException); + + ::osl::Mutex & GetMutex(); + + /** const variant of getInfoHelper() + */ + ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelperConst() const; + +private: + ::osl::Mutex & m_rMutex; +}; + +} // namespace chart + +// CHART_DATAPOINTSTYLE_HXX +#endif diff --git a/chart2/source/model/main/DataSeries.cxx b/chart2/source/model/main/DataSeries.cxx new file mode 100644 index 000000000..ecdec74d1 --- /dev/null +++ b/chart2/source/model/main/DataSeries.cxx @@ -0,0 +1,302 @@ +/************************************************************************* + * + * $RCSfile: DataSeries.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:30 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2002 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "DataSeries.hxx" +#include "DataSeriesProperties.hxx" +#include "CharacterProperties.hxx" +#include "UserDefinedProperties.hxx" +#include "DataPoint.hxx" +#include "macros.hxx" +#include "algohelper.hxx" + +#include <algorithm> + +using namespace ::com::sun::star; +using namespace ::drafts::com::sun::star; + +using ::com::sun::star::beans::Property; +using ::com::sun::star::uno::Sequence; +using ::com::sun::star::uno::Reference; +using ::com::sun::star::uno::Any; +using ::rtl::OUString; +using ::osl::MutexGuard; + +// ---------------------------------------- + +namespace +{ +const uno::Sequence< Property > & lcl_GetPropertySequence() +{ + static uno::Sequence< Property > aPropSeq; + + // /-- + ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); + if( 0 == aPropSeq.getLength() ) + { + // get properties + ::std::vector< ::com::sun::star::beans::Property > aProperties; + ::chart::DataSeriesProperties::AddPropertiesToVector( + aProperties, /* bIncludeStyleProperties = */ true ); + ::chart::CharacterProperties::AddPropertiesToVector( + aProperties, /* bIncludeStyleProperties = */ true ); + ::chart::UserDefinedProperties::AddPropertiesToVector( aProperties ); + + // and sort them for access via bsearch + ::std::sort( aProperties.begin(), aProperties.end(), + ::chart::helper::PropertyNameLess() ); + + // transfer result to static Sequence + aPropSeq = ::chart::helper::VectorToSequence( aProperties ); + } + + return aPropSeq; +} +} // anonymous namespace + +// ---------------------------------------- + +namespace chart +{ + +DataSeries::DataSeries( const ::rtl::OUString & rIdentifier ) : + ::property::OPropertySet( m_aMutex ), + m_aIdentifier( rIdentifier ) +{} + +DataSeries::~DataSeries() +{} + +Sequence< OUString > DataSeries::getSupportedServiceNames_Static() +{ + Sequence< OUString > aServices( 3 ); + aServices[ 0 ] = C2U( "drafts.com.sun.star.chart2.DataSeries" ); + aServices[ 1 ] = C2U( "drafts.com.sun.star.chart2.DataPointProperties" ); + aServices[ 2 ] = C2U( "com.sun.star.beans.PropertySet" ); + return aServices; +} + + +// ____ OPropertySet ____ +uno::Any DataSeries::GetDefaultValue( sal_Int32 nHandle ) const + throw(beans::UnknownPropertyException) +{ + static helper::tPropertyValueMap aStaticDefaults; + + // /-- + ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); + if( 0 == aStaticDefaults.size() ) + { + // initialize defaults + DataSeriesProperties::AddDefaultsToMap( + aStaticDefaults, + /* bIncludeStyleProperties = */ true ); + CharacterProperties::AddDefaultsToMap( + aStaticDefaults, + /* bIncludeStyleProperties = */ true ); + } + + helper::tPropertyValueMap::const_iterator aFound( + aStaticDefaults.find( nHandle )); + + if( aFound == aStaticDefaults.end()) + { + if( nHandle == DataSeriesProperties::PROP_DATASERIES_IDENTIFIER ) + { + return uno::makeAny( m_aIdentifier ); + } + else + throw beans::UnknownPropertyException(); + } + + return (*aFound).second; + // \-- +} + +// ____ OPropertySet ____ +::cppu::IPropertyArrayHelper & SAL_CALL DataSeries::getInfoHelper() +{ + static ::cppu::OPropertyArrayHelper aArrayHelper( + lcl_GetPropertySequence(), + /* bSorted = */ sal_True ); + + return aArrayHelper; +} + + +// ____ XPropertySet ____ +uno::Reference< beans::XPropertySetInfo > SAL_CALL + DataSeries::getPropertySetInfo() + throw (uno::RuntimeException) +{ + static uno::Reference< beans::XPropertySetInfo > xInfo; + + // /-- + ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); + if( !xInfo.is()) + { + xInfo = ::cppu::OPropertySetHelper::createPropertySetInfo( + getInfoHelper()); + } + + return xInfo; + // \-- +} + +void SAL_CALL DataSeries::getFastPropertyValue + ( uno::Any& rValue, + sal_Int32 nHandle ) const +{ + // special handling for get. set is not possible for this property + if( nHandle == DataSeriesProperties::PROP_DATASERIES_ATTRIBUTED_DATA_POINTS ) + { + // ToDo: only add those property sets that are really modified + uno::Sequence< sal_Int32 > aSeq( m_aAttributedDataPoints.size()); + sal_Int32 * pIndexArray = aSeq.getArray(); + sal_Int32 i = 0; + + for( tDataPointAttributeContainer::const_iterator aIt( m_aAttributedDataPoints.begin()); + aIt != m_aAttributedDataPoints.end(); ++aIt ) + { + pIndexArray[ i ] = (*aIt).first; + ++i; + } + + rValue <<= aSeq; + } + else + OPropertySet::getFastPropertyValue( rValue, nHandle ); +} + +Reference< beans::XPropertySet > + SAL_CALL DataSeries::getDataPointByIndex( sal_Int32 nIndex ) + throw (lang::IndexOutOfBoundsException, + uno::RuntimeException) +{ + Reference< beans::XPropertySet > aResult; + + // /-- + MutexGuard aGuard( GetMutex() ); + + if( m_aDataSequences.begin() != m_aDataSequences.end()) + { + if( 0 <= nIndex && nIndex < + (*(m_aDataSequences.begin()))->getData().getLength() ) + { + tDataPointAttributeContainer::iterator aIt( + m_aAttributedDataPoints.find( nIndex )); + + if( aIt == m_aAttributedDataPoints.end()) + { + // create a new XPropertySet for this data point + aResult.set( new DataPoint( GetMutex(), this )); + m_aAttributedDataPoints[ nIndex ] = aResult; + } + else + { + aResult = (*aIt).second; + } + } + else + { + throw lang::IndexOutOfBoundsException(); + } + } + else + { + throw lang::IndexOutOfBoundsException(); + } + + return aResult; + // \-- +} + +// ____ XDataSink ____ +void SAL_CALL DataSeries::setData( const uno::Sequence< Reference< chart2::XDataSequence > >& aData ) + throw (uno::RuntimeException) +{ + // /-- + MutexGuard aGuard( GetMutex() ); + m_aDataSequences = helper::SequenceToVector( aData ); + // \-- +} + +// ____ XDataSource ____ +Sequence< Reference< chart2::XDataSequence > > SAL_CALL DataSeries::getDataSequences() + throw (uno::RuntimeException) +{ + // /-- + MutexGuard aGuard( GetMutex() ); + return helper::VectorToSequence( m_aDataSequences ); + // \-- +} + +// ================================================================================ + +using impl::DataSeries_Base; +using ::property::OPropertySet; + +IMPLEMENT_FORWARD_XINTERFACE2( DataSeries, DataSeries_Base, OPropertySet ) +IMPLEMENT_FORWARD_XTYPEPROVIDER2( DataSeries, DataSeries_Base, OPropertySet ) + +// implement XServiceInfo methods basing upon getSupportedServiceNames_Static +APPHELPER_XSERVICEINFO_IMPL( DataSeries, + C2U( "com.sun.star.comp.chart.DataSeries" )); + +} // namespace chart diff --git a/chart2/source/model/main/DataSeriesProperties.cxx b/chart2/source/model/main/DataSeriesProperties.cxx new file mode 100644 index 000000000..4e5e19d90 --- /dev/null +++ b/chart2/source/model/main/DataSeriesProperties.cxx @@ -0,0 +1,134 @@ +/************************************************************************* + * + * $RCSfile: DataSeriesProperties.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:30 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "DataSeriesProperties.hxx" +#include "DataPointProperties.hxx" +#include "DataPoint.hxx" +#include "macros.hxx" + +#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HPP_ +#include <com/sun/star/beans/PropertyAttribute.hpp> +#endif +#ifndef _COM_SUN_STAR_STYLE_XSTYLE_HPP_ +#include <com/sun/star/style/XStyle.hpp> +#endif + +#include <algorithm> + +using namespace ::com::sun::star; + +using ::rtl::OUString; +using ::com::sun::star::beans::Property; +using ::com::sun::star::uno::Reference; + +namespace chart +{ + +void DataSeriesProperties::AddPropertiesToVector( + ::std::vector< Property > & rOutProperties, + bool bIncludeStyleProperties /* = false */ ) +{ + rOutProperties.push_back( + Property( C2U( "DataPointStyle" ), + PROP_DATASERIES_DATA_POINT_STYLE, + ::getCppuType( reinterpret_cast< const Reference< style::XStyle > * >(0)), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEDEFAULT )); + + rOutProperties.push_back( + Property( C2U( "AttributedDataPoints" ), + PROP_DATASERIES_ATTRIBUTED_DATA_POINTS, + ::getCppuType( reinterpret_cast< const uno::Sequence< sal_Int32 > * >(0)), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEVOID )); + + rOutProperties.push_back( + Property( C2U( "Identifier" ), + PROP_DATASERIES_IDENTIFIER, + ::getCppuType( reinterpret_cast< const ::rtl::OUString * >(0)), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::READONLY + | beans::PropertyAttribute::MAYBEVOID )); + + // add properties of service DataPointProperties + DataPointProperties::AddPropertiesToVector( + rOutProperties, bIncludeStyleProperties ); +} + +void DataSeriesProperties::AddDefaultsToMap( + helper::tPropertyValueMap & rOutMap, + bool bIncludeStyleProperties /* = false */ ) +{ + OSL_ASSERT( rOutMap.end() == rOutMap.find( PROP_DATASERIES_DATA_POINT_STYLE )); + rOutMap[ PROP_DATASERIES_DATA_POINT_STYLE ] = + uno::makeAny( Reference< style::XStyle >() ); + + // PROP_DATASERIES_ATTRIBUTED_DATA_POINTS has no default + + // PROP_DATASERIES_IDENTIFIER has no default + // It is read-only. So there will be a 'static' default handled in + // DataSeries + + // add properties of service DataPointProperties + DataPointProperties::AddDefaultsToMap( + rOutMap, bIncludeStyleProperties ); +} + +} // namespace chart diff --git a/chart2/source/model/main/DataSeriesProperties.hxx b/chart2/source/model/main/DataSeriesProperties.hxx new file mode 100644 index 000000000..efa191d23 --- /dev/null +++ b/chart2/source/model/main/DataSeriesProperties.hxx @@ -0,0 +1,100 @@ +/************************************************************************* + * + * $RCSfile: DataSeriesProperties.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:30 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef CHART_DATASERIESPROPERTIES_HXX +#define CHART_DATASERIESPROPERTIES_HXX + +#include "PropertyHelper.hxx" +#include "FastPropertyIdRanges.hxx" + +#ifndef _COM_SUN_STAR_BEANS_PROPERTY_HPP_ +#include <com/sun/star/beans/Property.hpp> +#endif + +#include <vector> + +namespace chart +{ + +class DataSeriesProperties +{ +public: + enum + { + PROP_DATASERIES_DATA_POINT_STYLE = FAST_PROPERTY_ID_START_DATA_SERIES, + PROP_DATASERIES_ATTRIBUTED_DATA_POINTS, + PROP_DATASERIES_IDENTIFIER + }; + + static void AddPropertiesToVector( + ::std::vector< ::com::sun::star::beans::Property > & rOutProperties, + bool bIncludeStyleProperties = false ); + + static void AddDefaultsToMap( helper::tPropertyValueMap & rOutMap, bool bIncludeStyleProperties = false ); + +private: + // not implemented + DataSeriesProperties(); +}; + +} // namespace chart + +// CHART_DATASERIESPROPERTIES_HXX +#endif diff --git a/chart2/source/model/main/DataSeriesStyle.cxx b/chart2/source/model/main/DataSeriesStyle.cxx new file mode 100644 index 000000000..57bdf106d --- /dev/null +++ b/chart2/source/model/main/DataSeriesStyle.cxx @@ -0,0 +1,222 @@ +/************************************************************************* + * + * $RCSfile: DataSeriesStyle.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:30 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "DataSeriesStyle.hxx" +#include "DataSeriesProperties.hxx" +#include "CharacterProperties.hxx" +#include "PropertyHelper.hxx" +#include "macros.hxx" +#include "algohelper.hxx" + +#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HPP_ +#include <com/sun/star/beans/PropertyAttribute.hpp> +#endif +#ifndef _COM_SUN_STAR_STYLE_XSTYLE_HPP_ +#include <com/sun/star/style/XStyle.hpp> +#endif +#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_ +#include <com/sun/star/beans/XPropertySet.hpp> +#endif + +#ifndef _COM_SUN_STAR_UNO_SEQUENCE_HXX_ +#include <com/sun/star/uno/Sequence.hxx> +#endif + +#include <algorithm> + +using namespace ::com::sun::star; +using namespace ::drafts::com::sun::star; + +using ::com::sun::star::uno::Reference; +using ::com::sun::star::beans::Property; +using ::osl::MutexGuard; + +// ____________________________________________________________ + +namespace +{ +const uno::Sequence< Property > & lcl_GetPropertySequence() +{ + static uno::Sequence< Property > aPropSeq; + + // /-- + ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); + if( 0 == aPropSeq.getLength() ) + { + // get properties + ::std::vector< ::com::sun::star::beans::Property > aProperties; + ::chart::DataSeriesProperties::AddPropertiesToVector( + aProperties, /* bIncludeStyleProperties = */ false ); + ::chart::CharacterProperties::AddPropertiesToVector( + aProperties, /* bIncludeStyleProperties = */ false ); + + // and sort them for access via bsearch + ::std::sort( aProperties.begin(), aProperties.end(), + ::chart::helper::PropertyNameLess() ); + + // transfer result to static Sequence + aPropSeq = ::chart::helper::VectorToSequence( aProperties ); + } + + return aPropSeq; +} +} // anonymous namespace + +// ____________________________________________________________ + +namespace chart +{ + +DataSeriesStyle::DataSeriesStyle( + const uno::Reference< container::XNameAccess > & xStyleFamily, + ::osl::Mutex & _rMutex ) : + ::property::OStyle( xStyleFamily, _rMutex ), + m_rMutex( _rMutex ) +{} + +DataSeriesStyle::~DataSeriesStyle() +{} + +// ____ XInterface ____ +uno::Any SAL_CALL DataSeriesStyle::queryInterface( + const uno::Type & rType ) + throw (uno::RuntimeException) +{ + return ::cppu::OWeakObject::queryInterface( rType ); +} + +void SAL_CALL DataSeriesStyle::acquire() throw () +{ + ::cppu::OWeakObject::acquire(); +} + +void SAL_CALL DataSeriesStyle::release() throw () +{ + ::cppu::OWeakObject::release(); +} + +// ____ OPropertySet ____ +uno::Any DataSeriesStyle::GetDefaultValue( sal_Int32 nHandle ) const + throw(beans::UnknownPropertyException) +{ + static helper::tPropertyValueMap aStaticDefaults; + + // /-- + ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); + if( 0 == aStaticDefaults.size() ) + { + // initialize defaults + DataSeriesProperties::AddDefaultsToMap( + aStaticDefaults, + /* bIncludeStyleProperties = */ false ); + CharacterProperties::AddDefaultsToMap( + aStaticDefaults, + /* bIncludeStyleProperties = */ false ); + } + + helper::tPropertyValueMap::const_iterator aFound( + aStaticDefaults.find( nHandle )); + + if( aFound == aStaticDefaults.end()) + throw beans::UnknownPropertyException(); + + return (*aFound).second; + // \-- +} + +::cppu::IPropertyArrayHelper & SAL_CALL DataSeriesStyle::getInfoHelper() +{ + return getInfoHelperConst(); +} + +::cppu::IPropertyArrayHelper & SAL_CALL DataSeriesStyle::getInfoHelperConst() const +{ + static ::cppu::OPropertyArrayHelper aArrayHelper( + lcl_GetPropertySequence(), + /* bSorted = */ sal_True ); + + return aArrayHelper; +} + +// ____ XPropertySet ____ +Reference< beans::XPropertySetInfo > SAL_CALL + DataSeriesStyle::getPropertySetInfo() + throw (uno::RuntimeException) +{ + static Reference< beans::XPropertySetInfo > xInfo; + + // /-- + ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); + if( !xInfo.is()) + { + xInfo = ::cppu::OPropertySetHelper::createPropertySetInfo( + getInfoHelper()); + } + + return xInfo; + // \-- +} + +::osl::Mutex & DataSeriesStyle::GetMutex() +{ + return m_rMutex; +} + +} // namespace chart diff --git a/chart2/source/model/main/DataSeriesStyle.hxx b/chart2/source/model/main/DataSeriesStyle.hxx new file mode 100644 index 000000000..4b4706a56 --- /dev/null +++ b/chart2/source/model/main/DataSeriesStyle.hxx @@ -0,0 +1,118 @@ +/************************************************************************* + * + * $RCSfile: DataSeriesStyle.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:30 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef CHART_DATASERIESSTYLE_HXX +#define CHART_DATASERIESSTYLE_HXX + +#ifndef _CPPUHELPER_WEAK_HXX_ +#include <cppuhelper/weak.hxx> +#endif +#ifndef _OSL_MUTEX_HXX_ +#include <osl/mutex.hxx> +#endif + +#include "OStyle.hxx" + +namespace chart +{ + +class DataSeriesStyle : + public ::cppu::OWeakObject, + public ::property::OStyle +{ +public: + DataSeriesStyle( const ::com::sun::star::uno::Reference< + ::com::sun::star::container::XNameAccess > & xStyleFamily, + ::osl::Mutex & rMutex ); + virtual ~DataSeriesStyle(); + + // ____ XInterface ____ + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( + const ::com::sun::star::uno::Type & rType ) + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL acquire() throw (); + virtual void SAL_CALL release() throw (); + +protected: + // ____ OPropertySet ____ + virtual ::com::sun::star::uno::Any GetDefaultValue( sal_Int32 nHandle ) const + throw(::com::sun::star::beans::UnknownPropertyException); + + virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper(); + + // ____ XPropertySet ____ + virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL + getPropertySetInfo() + throw (::com::sun::star::uno::RuntimeException); + + ::osl::Mutex & GetMutex(); + + /** const variant of getInfoHelper() + */ + ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelperConst() const; + +private: + ::osl::Mutex & m_rMutex; +}; + +} // namespace chart + +// CHART_DATASERIESSTYLE_HXX +#endif diff --git a/chart2/source/model/main/Diagram.cxx b/chart2/source/model/main/Diagram.cxx new file mode 100644 index 000000000..ec8ef4021 --- /dev/null +++ b/chart2/source/model/main/Diagram.cxx @@ -0,0 +1,490 @@ +/************************************************************************* + * + * $RCSfile: Diagram.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:31 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "Diagram.hxx" +#include "macros.hxx" +#include "PropertyHelper.hxx" +#include "algohelper.hxx" +#include "Wall.hxx" +#include "TitleHelper.hxx" +#include "ContextHelper.hxx" +#include "UserDefinedProperties.hxx" + +#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HPP_ +#include <com/sun/star/beans/PropertyAttribute.hpp> +#endif + +#include <algorithm> +#include <iterator> +#include <functional> + +using namespace ::com::sun::star; +using namespace ::com::sun::star::beans::PropertyAttribute; +using namespace ::drafts::com::sun::star; + +using ::rtl::OUString; +using ::com::sun::star::beans::Property; +using ::com::sun::star::uno::Sequence; +using ::com::sun::star::uno::Reference; +using ::com::sun::star::uno::Any; +using ::osl::MutexGuard; + +// ====================================================================== + +namespace +{ + +// enum +// { +// PROP_DIAGRAM_PREFERRED_ALIGNMENT, +// PROP_DIAGRAM_PREFERRED_STRETCH_MODE +// }; + +void lcl_AddPropertiesToVector( + ::std::vector< Property > & rOutProperties ) +{ +// rOutProperties.push_back( +// Property( C2U( "PreferredAlignment" ), +// PROP_DIAGRAM_PREFERRED_ALIGNMENT, +// ::getCppuType( reinterpret_cast< const layout::Alignment * >(0)), +// beans::PropertyAttribute::BOUND +// | beans::PropertyAttribute::MAYBEDEFAULT )); + +// rOutProperties.push_back( +// Property( C2U( "PreferredStretchMode" ), +// PROP_DIAGRAM_PREFERRED_STRETCH_MODE, +// ::getCppuType( reinterpret_cast< const layout::StretchMode * >(0)), +// beans::PropertyAttribute::BOUND +// | beans::PropertyAttribute::MAYBEDEFAULT )); +} + +void lcl_AddDefaultsToMap( + ::chart::helper::tPropertyValueMap & rOutMap ) +{ +// layout::Alignment aCenterAlign( 0.5, 0.5, true ); +// OSL_ASSERT( rOutMap.end() == rOutMap.find( PROP_DIAGRAM_PREFERRED_ALIGNMENT )); +// rOutMap[ PROP_DIAGRAM_PREFERRED_ALIGNMENT ] = +// uno::makeAny( aCenterAlign ); + +// OSL_ASSERT( rOutMap.end() == rOutMap.find( PROP_DIAGRAM_PREFERRED_STRETCH_MODE )); +// rOutMap[ PROP_DIAGRAM_PREFERRED_STRETCH_MODE ] = +// uno::makeAny( layout::StretchMode_BOTH ); +} + +const Sequence< Property > & lcl_GetPropertySequence() +{ + static Sequence< Property > aPropSeq; + + // /-- + ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); + if( 0 == aPropSeq.getLength() ) + { + // get properties + ::std::vector< ::com::sun::star::beans::Property > aProperties; + lcl_AddPropertiesToVector( aProperties ); + ::chart::UserDefinedProperties::AddPropertiesToVector( aProperties ); + + // and sort them for access via bsearch + ::std::sort( aProperties.begin(), aProperties.end(), + ::chart::helper::PropertyNameLess() ); + + // transfer result to static Sequence + aPropSeq = ::chart::helper::VectorToSequence( aProperties ); + } + + return aPropSeq; +} + +} // anonymous namespace + +// ====================================================================== + +namespace chart +{ + +Diagram::Diagram( uno::Reference< uno::XComponentContext > const & xContext ) : + ::property::OPropertySet( m_aMutex ), + m_xContext( xContext ), + m_xWall( new Wall()), + m_xTitle( NULL ), + m_aIdentifier( C2U( "@diagram" )) +{ +} + +Diagram::~Diagram() +{} + +// ____ XDiagram ____ +Reference< chart2::XDataSeriesTreeParent > SAL_CALL Diagram::getTree() + throw (uno::RuntimeException) +{ + // /-- + MutexGuard aGuard( GetMutex() ); + return m_xSeriesTree; + // \-- +} + +void SAL_CALL Diagram::setTree( + const Reference< chart2::XDataSeriesTreeParent >& xTree ) + throw (lang::IllegalArgumentException, + uno::RuntimeException) +{ + uno::Reference< lang::XServiceInfo > xInfo( xTree, uno::UNO_QUERY ); + if( xInfo.is() && + xInfo->supportsService( C2U( "drafts.com.sun.star.chart2.DataSeriesTree" )) ) + { + // /-- + MutexGuard aGuard( GetMutex() ); + m_xSeriesTree = xTree; + // \-- + } + else + { + throw lang::IllegalArgumentException(); + } +} + +uno::Reference< beans::XPropertySet > SAL_CALL Diagram::getWall() + throw (uno::RuntimeException) +{ + // /-- + MutexGuard aGuard( GetMutex() ); + return m_xWall; + // \-- +} + +uno::Reference< chart2::XLegend > SAL_CALL Diagram::getLegend() + throw (uno::RuntimeException) +{ + // /-- + MutexGuard aGuard( GetMutex() ); + return m_xLegend; + // \-- +} + +void SAL_CALL Diagram::setLegend( const uno::Reference< chart2::XLegend >& xLegend ) + throw (uno::RuntimeException) +{ + // /-- + MutexGuard aGuard( GetMutex() ); + m_xLegend = xLegend; + // \-- +} + +// ____ XAxisContainer ____ +void SAL_CALL Diagram::addAxis( const uno::Reference< chart2::XAxis >& aAxis ) + throw (lang::IllegalArgumentException, + uno::RuntimeException) +{ + uno::Reference< chart2::XIdentifiable > xIdent( aAxis, uno::UNO_QUERY ); + if( ! xIdent.is() || + m_aAxes.find( xIdent->getIdentifier() ) != m_aAxes.end() ) + throw lang::IllegalArgumentException(); + + m_aAxes.insert( tAxisContainerType::value_type( xIdent->getIdentifier(), aAxis ) ); +} + +void SAL_CALL Diagram::removeAxis( const uno::Reference< chart2::XAxis >& aAxis ) + throw (container::NoSuchElementException, + uno::RuntimeException) +{ + if( ! aAxis.is()) + throw container::NoSuchElementException(); + + uno::Reference< chart2::XIdentifiable > xIdent( aAxis, uno::UNO_QUERY ); + if( xIdent.is()) + { + tAxisContainerType::iterator aIt( m_aAxes.find( xIdent->getIdentifier() )); + + if( aIt == m_aAxes.end()) + throw container::NoSuchElementException(); + + m_aAxes.erase( aIt ); + } + else + throw container::NoSuchElementException(); +} + +uno::Sequence< uno::Reference< chart2::XAxis > > SAL_CALL Diagram::getAxes() + throw (uno::RuntimeException) +{ + uno::Sequence< uno::Reference< chart2::XAxis > > aResult( m_aAxes.size()); + + ::std::transform( m_aAxes.begin(), m_aAxes.end(), + aResult.getArray(), + ::std::select2nd< tAxisContainerType::value_type >() ); + + return aResult; +} + +uno::Reference< chart2::XAxis > SAL_CALL Diagram::getAxisByIdentifier( const ::rtl::OUString& aIdentifier ) + throw (uno::RuntimeException) +{ + if(!aIdentifier.getLength()) + return NULL; + uno::Reference< chart2::XAxis > aResult; + tAxisContainerType::const_iterator aIt( m_aAxes.find( aIdentifier )); + + if( aIt != m_aAxes.end()) + aResult = (*aIt).second; + + return aResult; +} + +// ____ XGridContainer ____ +void SAL_CALL Diagram::addGrid( const uno::Reference< chart2::XGrid >& aGrid ) + throw (lang::IllegalArgumentException, + uno::RuntimeException) +{ + uno::Reference< chart2::XIdentifiable > xIdent( aGrid, uno::UNO_QUERY ); + if( ! xIdent.is() || + m_aGrids.find( xIdent->getIdentifier() ) != m_aGrids.end() ) + throw lang::IllegalArgumentException(); + + m_aGrids.insert( tGridContainerType::value_type( xIdent->getIdentifier(), aGrid )); +} + +void SAL_CALL Diagram::removeGrid( const uno::Reference< chart2::XGrid >& aGrid ) + throw (container::NoSuchElementException, + uno::RuntimeException) +{ + if( ! aGrid.is()) + throw container::NoSuchElementException(); + + uno::Reference< chart2::XIdentifiable > xIdent( aGrid, uno::UNO_QUERY ); + if( xIdent.is()) + { + tGridContainerType::iterator aIt( m_aGrids.find( xIdent->getIdentifier() )); + + if( aIt == m_aGrids.end()) + throw container::NoSuchElementException(); + + m_aGrids.erase( aIt ); + } + else + throw container::NoSuchElementException(); +} + +uno::Sequence< uno::Reference< chart2::XGrid > > SAL_CALL Diagram::getGrids() + throw (uno::RuntimeException) +{ + uno::Sequence< uno::Reference< chart2::XGrid > > aResult( m_aGrids.size()); + + ::std::transform( m_aGrids.begin(), m_aGrids.end(), + aResult.getArray(), + ::std::select2nd< tGridContainerType::value_type >() ); + + return aResult; +} + +uno::Reference< chart2::XGrid > SAL_CALL Diagram::getGridByIdentifier( const ::rtl::OUString& aIdentifier ) + throw (uno::RuntimeException) +{ + if(!aIdentifier.getLength()) + return NULL; + uno::Reference< chart2::XGrid > aResult; + tGridContainerType::const_iterator aIt( m_aGrids.find( aIdentifier )); + + if( aIt != m_aGrids.end()) + aResult = (*aIt).second; + + return aResult; +} + +// ____ XTitled ____ +uno::Reference< chart2::XTitle > SAL_CALL Diagram::getTitle() + throw (uno::RuntimeException) +{ + // /-- + MutexGuard aGuard( GetMutex() ); + return m_xTitle; + // \-- +} + +void SAL_CALL Diagram::setTitle( const uno::Reference< chart2::XTitle >& Title ) + throw (uno::RuntimeException) +{ + // /-- + MutexGuard aGuard( GetMutex() ); + m_xTitle = Title; + // \-- +} + +// ____ XBoundedCoordinateSystemContainer ____ +void SAL_CALL Diagram::addCoordinateSystem( + const uno::Reference< chart2::XBoundedCoordinateSystem >& aCoordSys ) + throw (lang::IllegalArgumentException, + uno::RuntimeException) +{ +// if( m_aCoordSystems.find( aCoordSys ) != m_aCoordSystems.end()) + if( ::std::find( m_aCoordSystems.begin(), m_aCoordSystems.end(), aCoordSys ) + != m_aCoordSystems.end()) + throw lang::IllegalArgumentException(); + +// m_aCoordSystems.insert( aCoordSys ); + m_aCoordSystems.push_back( aCoordSys ); +} + +void SAL_CALL Diagram::removeCoordinateSystem( + const uno::Reference< chart2::XBoundedCoordinateSystem >& aCoordSys ) + throw (container::NoSuchElementException, + uno::RuntimeException) +{ + ::std::vector< uno::Reference< chart2::XBoundedCoordinateSystem > >::iterator + aIt( ::std::find( m_aCoordSystems.begin(), m_aCoordSystems.end(), aCoordSys )); +// if( m_aCoordSystems.find( aCoordSys ) == m_aCoordSystems.end()) + if( aIt != m_aCoordSystems.end()) + throw container::NoSuchElementException(); + +// m_aCoordSystems.erase( aCoordSys ); + m_aCoordSystems.erase( aIt ); +} + +uno::Sequence< uno::Reference< chart2::XBoundedCoordinateSystem > > SAL_CALL Diagram::getCoordinateSystems() + throw (uno::RuntimeException) +{ +// return helper::SetToSequence( m_aCoordSystems ); + return helper::VectorToSequence( m_aCoordSystems ); +} + +// ____ XIdentifiable ____ +::rtl::OUString SAL_CALL Diagram::getIdentifier() + throw (uno::RuntimeException) +{ + return m_aIdentifier; +} + +// ________ + +Sequence< OUString > Diagram::getSupportedServiceNames_Static() +{ + Sequence< OUString > aServices( 3 ); + + aServices[ 0 ] = C2U( "drafts.com.sun.star.chart2.Diagram" ); + aServices[ 1 ] = C2U( "drafts.com.sun.star.layout.LayoutElement" ); + aServices[ 2 ] = C2U( "com.sun.star.beans.PropertySet" ); + return aServices; +} + +// ____ OPropertySet ____ +uno::Any Diagram::GetDefaultValue( sal_Int32 nHandle ) const + throw(beans::UnknownPropertyException) +{ + static helper::tPropertyValueMap aStaticDefaults; + + // /-- + ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); + if( 0 == aStaticDefaults.size() ) + { + // initialize defaults + lcl_AddDefaultsToMap( aStaticDefaults ); + } + + helper::tPropertyValueMap::const_iterator aFound( + aStaticDefaults.find( nHandle )); + + if( aFound == aStaticDefaults.end()) + return uno::Any(); + + return (*aFound).second; + // \-- +} + +// ____ OPropertySet ____ +::cppu::IPropertyArrayHelper & SAL_CALL Diagram::getInfoHelper() +{ + static ::cppu::OPropertyArrayHelper aArrayHelper( lcl_GetPropertySequence(), + /* bSorted = */ sal_True ); + + return aArrayHelper; +} + + +// ____ XPropertySet ____ +uno::Reference< beans::XPropertySetInfo > SAL_CALL + Diagram::getPropertySetInfo() + throw (uno::RuntimeException) +{ + static uno::Reference< beans::XPropertySetInfo > xInfo; + + // /-- + ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); + if( !xInfo.is()) + { + xInfo = ::cppu::OPropertySetHelper::createPropertySetInfo( + getInfoHelper()); + } + + return xInfo; + // \-- +} + +// ================================================================================ + +using impl::Diagram_Base; + +IMPLEMENT_FORWARD_XINTERFACE2( Diagram, Diagram_Base, ::property::OPropertySet ) +IMPLEMENT_FORWARD_XTYPEPROVIDER2( Diagram, Diagram_Base, ::property::OPropertySet ) + +// implement XServiceInfo methods basing upon getSupportedServiceNames_Static +APPHELPER_XSERVICEINFO_IMPL( Diagram, + C2U( "com.sun.star.comp.chart.Diagram" )); + +} // namespace chart diff --git a/chart2/source/model/main/FormattedString.cxx b/chart2/source/model/main/FormattedString.cxx new file mode 100644 index 000000000..e3c652f6e --- /dev/null +++ b/chart2/source/model/main/FormattedString.cxx @@ -0,0 +1,227 @@ +/************************************************************************* + * + * $RCSfile: FormattedString.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:31 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "FormattedString.hxx" + +#include "CharacterProperties.hxx" +#include "PropertyHelper.hxx" +#include "algohelper.hxx" +#include "macros.hxx" + +#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HPP_ +#include <com/sun/star/beans/PropertyAttribute.hpp> +#endif + +using namespace ::com::sun::star; +using namespace ::drafts::com::sun::star; + +using ::rtl::OUString; +using ::com::sun::star::beans::Property; +using ::com::sun::star::uno::Sequence; +using ::com::sun::star::uno::Reference; +using ::com::sun::star::uno::Any; +using ::osl::MutexGuard; + +namespace +{ + +const Sequence< Property > & lcl_GetPropertySequence() +{ + static Sequence< Property > aPropSeq; + + // /-- + ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); + if( 0 == aPropSeq.getLength() ) + { + // get properties + ::std::vector< ::com::sun::star::beans::Property > aProperties; + ::chart::CharacterProperties::AddPropertiesToVector( + aProperties, /* bIncludeStyleProperties = */ true ); + + // and sort them for access via bsearch + ::std::sort( aProperties.begin(), aProperties.end(), + ::chart::helper::PropertyNameLess() ); + + // transfer result to static Sequence + aPropSeq = ::chart::helper::VectorToSequence( aProperties ); + } + + return aPropSeq; +} + +} // anonymous namespace + +namespace chart +{ + +FormattedString::FormattedString( const ::rtl::OUString & rString ) : + ::property::OPropertySet( m_aMutex ), + m_aString( rString ) +{} + +FormattedString::FormattedString( + uno::Reference< uno::XComponentContext > const & xContext ) : + ::property::OPropertySet( m_aMutex ), + m_aString() +{} + +FormattedString::~FormattedString() +{} + +// ____ XFormattedString ____ +::rtl::OUString SAL_CALL FormattedString::getString() + throw (uno::RuntimeException) +{ + // /-- + MutexGuard aGuard( GetMutex()); + return m_aString; + // \-- +} + +void SAL_CALL FormattedString::setString( const ::rtl::OUString& String ) + throw (uno::RuntimeException) +{ + // /-- + MutexGuard aGuard( GetMutex()); + m_aString = String; + // \-- +} + +// ---------------------------------------- + +Sequence< OUString > FormattedString::getSupportedServiceNames_Static() +{ + Sequence< OUString > aServices( 2 ); + + aServices[ 0 ] = C2U( "drafts.com.sun.star.chart2.FormattedString" ); + aServices[ 1 ] = C2U( "com.sun.star.beans.PropertySet" ); + return aServices; +} + +// ____ OPropertySet ____ +uno::Any FormattedString::GetDefaultValue( sal_Int32 nHandle ) const + throw(beans::UnknownPropertyException) +{ + static helper::tPropertyValueMap aStaticDefaults; + + // /-- + ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); + if( 0 == aStaticDefaults.size() ) + { + // initialize defaults + CharacterProperties::AddDefaultsToMap( + aStaticDefaults, + /* bIncludeStyleProperties = */ true ); + } + + helper::tPropertyValueMap::const_iterator aFound( + aStaticDefaults.find( nHandle )); + + if( aFound == aStaticDefaults.end()) + throw beans::UnknownPropertyException(); + + return (*aFound).second; + // \-- +} + +// ____ OPropertySet ____ +::cppu::IPropertyArrayHelper & SAL_CALL FormattedString::getInfoHelper() +{ + static ::cppu::OPropertyArrayHelper aArrayHelper( + lcl_GetPropertySequence(), + /* bSorted = */ sal_True ); + + return aArrayHelper; +} + + +// ____ XPropertySet ____ +uno::Reference< beans::XPropertySetInfo > SAL_CALL + FormattedString::getPropertySetInfo() + throw (uno::RuntimeException) +{ + static uno::Reference< beans::XPropertySetInfo > xInfo; + + // /-- + ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); + if( !xInfo.is()) + { + xInfo = ::cppu::OPropertySetHelper::createPropertySetInfo( + getInfoHelper()); + } + + return xInfo; + // \-- +} + +// ================================================================================ + +using impl::FormattedString_Base; + +IMPLEMENT_FORWARD_XINTERFACE2( FormattedString, FormattedString_Base, ::property::OPropertySet ) +IMPLEMENT_FORWARD_XTYPEPROVIDER2( FormattedString, FormattedString_Base, ::property::OPropertySet ) + +// do this in derived classes! + +// implement XServiceInfo methods basing upon getSupportedServiceNames_Static +APPHELPER_XSERVICEINFO_IMPL( FormattedString, + C2U( "com.sun.star.comp.chart.FormattedString" )); + +} // namespace chart diff --git a/chart2/source/model/main/FormattedString.hxx b/chart2/source/model/main/FormattedString.hxx new file mode 100644 index 000000000..3408771e6 --- /dev/null +++ b/chart2/source/model/main/FormattedString.hxx @@ -0,0 +1,156 @@ +/************************************************************************* + * + * $RCSfile: FormattedString.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:31 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef CHART_FORMATTEDSTRING_HXX +#define CHART_FORMATTEDSTRING_HXX + +#ifndef CHART_MUTEXCONTAINER_HXX +#include "MutexContainer.hxx" +#endif +#ifndef CHART_OPROPERTYSET_HXX +#include "OPropertySet.hxx" +#endif + +#ifndef _CPPUHELPER_IMPLBASE2_HXX_ +#include <cppuhelper/implbase2.hxx> +#endif +#ifndef _COMPHELPER_UNO3_HXX_ +#include <comphelper/uno3.hxx> +#endif +#include "ServiceMacros.hxx" + +#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_ +#include <com/sun/star/lang/XServiceInfo.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XFORMATTEDSTRING_HPP_ +#include <drafts/com/sun/star/chart2/XFormattedString.hpp> +#endif + +#ifndef _COM_SUN_STAR_UNO_XCOMPONENTCONTEXT_HPP_ +#include <com/sun/star/uno/XComponentContext.hpp> +#endif + +namespace chart +{ + +namespace impl +{ +typedef ::cppu::WeakImplHelper2< + ::drafts::com::sun::star::chart2::XFormattedString, + ::com::sun::star::lang::XServiceInfo + > + FormattedString_Base; +} + +class FormattedString : + public helper::MutexContainer, + public impl::FormattedString_Base, + public ::property::OPropertySet +{ +public: + FormattedString( const ::rtl::OUString & rString ); + FormattedString( ::com::sun::star::uno::Reference< + ::com::sun::star::uno::XComponentContext > const & xContext ); + virtual ~FormattedString(); + + /// declare XServiceInfo methods + APPHELPER_XSERVICEINFO_DECL() + /// establish methods for factory instatiation + APPHELPER_SERVICE_FACTORY_HELPER( FormattedString ) + + /// merge XInterface implementations + DECLARE_XINTERFACE() + /// merge XTypeProvider implementations + DECLARE_XTYPEPROVIDER() + +protected: + // ____ XFormattedString ____ + virtual ::rtl::OUString SAL_CALL getString() + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setString( const ::rtl::OUString& String ) + throw (::com::sun::star::uno::RuntimeException); + + // ____ OPropertySet ____ + virtual ::com::sun::star::uno::Any GetDefaultValue( sal_Int32 nHandle ) const + throw(::com::sun::star::beans::UnknownPropertyException); + + // ____ OPropertySet ____ + virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper(); + + // ____ XPropertySet ____ + virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL + getPropertySetInfo() + throw (::com::sun::star::uno::RuntimeException); + +// virtual sal_Bool SAL_CALL convertFastPropertyValue +// ( ::com::sun::star::uno::Any & rConvertedValue, +// ::com::sun::star::uno::Any & rOldValue, +// sal_Int32 nHandle, +// const ::com::sun::star::uno::Any& rValue ) +// throw (::com::sun::star::lang::IllegalArgumentException); + +private: + ::rtl::OUString m_aString; +}; + +} // namespace chart + +// CHART_FORMATTEDSTRING_HXX +#endif diff --git a/chart2/source/model/main/ImplChartModel.cxx b/chart2/source/model/main/ImplChartModel.cxx new file mode 100644 index 000000000..8904f4088 --- /dev/null +++ b/chart2/source/model/main/ImplChartModel.cxx @@ -0,0 +1,396 @@ +/************************************************************************* + * + * $RCSfile: ImplChartModel.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:31 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "ImplChartModel.hxx" +#include "CachedDataSequence.hxx" +#include "DataSeries.hxx" +#include "DataInterpreter.hxx" +#include "StyleFamilies.hxx" +#include "StyleFamily.hxx" +#include "macros.hxx" +#include "algohelper.hxx" +#include "ContextHelper.hxx" +#include "TitleHelper.hxx" +// #include "SplitLayoutContainer.hxx" +#include "LayoutDefaults.hxx" +#include "ChartDocumentWrapper.hxx" + +#ifndef _CPPUHELPER_COMPONENT_CONTEXT_HXX_ +#include <cppuhelper/component_context.hxx> +#endif + +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XDATASINK_HPP_ +#include <drafts/com/sun/star/chart2/XDataSink.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XDATASEQUENCE_HPP_ +#include <drafts/com/sun/star/chart2/XDataSequence.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XDATASERIES_HPP_ +#include <drafts/com/sun/star/chart2/XDataSeries.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XAXIS_HPP_ +#include <drafts/com/sun/star/chart2/XAxis.hpp> +#endif + +#ifndef _COM_SUN_STAR_LANG_XINITIALIZATION_HPP_ +#include <com/sun/star/lang/XInitialization.hpp> +#endif +#ifndef _COM_SUN_STAR_UNO_XCOMPONENTCONTEXT_HPP_ +#include <com/sun/star/uno/XComponentContext.hpp> +#endif + +#include <vector> +#include <algorithm> + +using namespace ::com::sun::star; +using namespace ::drafts::com::sun::star; + +using ::com::sun::star::uno::Reference; +using ::com::sun::star::uno::Sequence; + +using ::rtl::OUString; + +namespace chart +{ +namespace impl +{ + +ImplChartModel::ImplChartModel( Reference< uno::XComponentContext > const & xContext ) : + m_xContext( xContext ), + m_xChartTypeManager( + xContext->getServiceManager()->createInstanceWithContext( + C2U( "drafts.com.sun.star.chart2.ChartTypeManager" ), + xContext ), uno::UNO_QUERY ) +// m_xLayoutContainer( new SplitLayoutContainer() ) +{ + GetStyleFamilies(); + + + uno::Reference< beans::XPropertySet > xProp( m_xChartTypeManager, uno::UNO_QUERY ); + uno::Reference< lang::XMultiServiceFactory > xFact( m_xChartTypeManager, uno::UNO_QUERY ); + if( xProp.is() && + xFact.is() ) + { + OUString aServiceName; + if( xProp->getPropertyValue( C2U( "ChartStyleTemplateServiceName" )) >>= aServiceName ) + { + m_xChartTypeTemplate.set( xFact->createInstance( aServiceName ), uno::UNO_QUERY ); + } + } +} + +// ImplChartModel::CreateStyles() +// { +// // set style +// Reference< container::XNameAccess > xGraphicsFamily( +// GetStyleFamilies()->getByName( C2U( "graphics" )), uno::UNO_QUERY ); + +// if( xGraphicsFamily.is()) +// const sal_Int32 nModul = Reference< container::XIndexAccess >( +// xGraphicsFamily, uno::UNO_QUERY )->getCount(); +// for( size_t nI = 0; nI < nMaxSeries; ++nI ) +// { +// try +// { +// Reference< ::com::sun::star::style::XStyle > xStyle( +// xGraphicsFamily->getByName( +// aStyleNameStub + OUString::valueOf( +// static_cast< sal_Int32 >( (nI % nModul)+1 ))), uno::UNO_QUERY ); + +// Reference< beans::XPropertySet > xSeriesProp( +// aResult[ nI ], uno::UNO_QUERY ); + +// if( xSeriesProp.is()) +// { +// xSeriesProp->setPropertyValue( +// C2U( "Color" ), +// uno::makeAny( nDefaultColors[ sal_Int32( nI % nMaxDefaultColors ) ])); + +// // set style +// Reference< ::drafts::com::sun::star::style::XStyleSupplier > +// xStyleSupp( xSeriesProp->getPropertyValue( C2U( "FirstGraphicsFormat" )), +// uno::UNO_QUERY ); + +// if( xStyleSupp.is()) +// { +// xStyleSupp->setStyle( xStyle ); +// } +// } +// } +// catch( uno::Exception ex ) +// { +// OSL_ENSURE( false, "Couldn't set style" ); +// } +// } +// } + + +void ImplChartModel::ReadData( const ::rtl::OUString & rRangeRepresentation ) +{ + static sal_Int32 nDefaultColors[] = { + 0xd43b3a, + 0xd0976d, + 0x76934b, + 0x386a53, + 0x14816b, + 0x103841, + 0x12406c, + 0x5929ba, + 0xda42c0, + 0xc179a2, + 0x31181b, + 0x4e6129 + }; + static const sal_Int32 nMaxDefaultColors = sizeof( nDefaultColors ) / sizeof( sal_Int32 ); + + if( m_xDataProvider.is()) + { + m_xChartData = m_xDataProvider->getDataByRangeRepresentation( rRangeRepresentation ); + + // create DataSeries objects using the standard data interpreter + m_aInterpretedData = DataInterpreter::InterpretData( m_xChartData ); + + const size_t nMaxSeries = m_aInterpretedData.size(); + const OUString aStyleNameStub( RTL_CONSTASCII_USTRINGPARAM( "Series " )); + + for( size_t nI = 0; nI < nMaxSeries; ++nI ) + { + try + { + Reference< beans::XPropertySet > xSeriesProp( + m_aInterpretedData[ nI ], uno::UNO_QUERY ); + + if( xSeriesProp.is()) + { + xSeriesProp->setPropertyValue( + C2U( "Color" ), + uno::makeAny( nDefaultColors[ sal_Int32( nI % nMaxDefaultColors ) ])); + } + } + catch( uno::Exception ex ) + { + OSL_ENSURE( false, "Couldn't set style" ); + } + } + } +} + +Reference< container::XNameAccess > ImplChartModel::GetStyleFamilies() +{ + if( ! m_xFamilies.is()) + { +// StyleFamilies * pStyleFamilies = new StyleFamilies(); +// StyleFamily * pGraphicsFamily = new StyleFamily(); +// Reference< container::XNameAccess > xGraphicsFamily( pGraphicsFamily ); + + // add some default styles for graphics + + // randomly generated default colors + +// sal_Int32 i = 0; +// const sal_Int32 nMax = sizeof( nDefaults ) / sizeof( sal_Int32 ); +// for( ; i < nMax; ++i ) +// { +// try +// { +// Reference< ::com::sun::star::style::XStyle > xStyle( +// new GraphicsPropertiesStyle( xGraphicsFamily ) ); +// xStyle->setName( C2U( "Series " ) + OUString::valueOf( static_cast< sal_Int32 >(i + 1) ) ); +// Reference< beans::XPropertySet > xProp( xStyle, uno::UNO_QUERY ); +// if( xProp.is()) +// { +// xProp->setPropertyValue( C2U( "Color" ), uno::makeAny( nDefaults[ i ] )); +// } +// pGraphicsFamily->AddStyle( xStyle ); +// } +// catch( uno::Exception ex ) +// { +// OSL_ENSURE( false, "Error on creating styles" ); +// } +// } + +// bool bResult = pStyleFamilies->AddStyleFamily( +// C2U( "graphics" ), xGraphicsFamily ); + +// OSL_ASSERT( bResult ); +// m_xFamilies.set( pStyleFamilies ); + } + + return m_xFamilies; +} + +// Diagram Access + +void ImplChartModel::RemoveAllDiagrams() +{ + m_aDiagrams.clear(); +} + +bool ImplChartModel::RemoveDiagram( const Reference< chart2::XDiagram > & xDiagram ) +{ + tDiagramContainer::iterator aIt( ::std::find( + m_aDiagrams.begin(), m_aDiagrams.end(), + xDiagram )); + if( aIt == m_aDiagrams.end() ) + return false; + + m_aDiagrams.erase( aIt ); + return true; +} + +void ImplChartModel::AppendDiagram( const Reference< chart2::XDiagram > & xDiagram ) +{ + m_aDiagrams.push_back( xDiagram ); +} + +Reference< chart2::XDiagram > ImplChartModel::GetDiagram( size_t nIndex ) const + throw( container::NoSuchElementException ) +{ + if( nIndex >= m_aDiagrams.size() ) + throw container::NoSuchElementException(); + + return m_aDiagrams[ nIndex ]; +} + +void ImplChartModel::SetDataProvider( + const Reference< chart2::XDataProvider > & xProvider ) +{ + m_xDataProvider = xProvider; + + // release other ressources + m_xChartData = 0; + m_aInterpretedData.clear(); +} + +void SAL_CALL ImplChartModel::SetRangeRepresentation( const ::rtl::OUString& aRangeRepresentation ) + throw (lang::IllegalArgumentException) +{ + OSL_TRACE( ::rtl::OUStringToOString( + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Chart Range: \"" )) + + aRangeRepresentation + + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "\"")), + RTL_TEXTENCODING_ASCII_US ).getStr() ); + ReadData( aRangeRepresentation ); + CreateDefaultChart(); +} + +void ImplChartModel::SetChartTypeManager( + const Reference< chart2::XChartTypeManager > & xManager ) +{ + m_xChartTypeManager = xManager; +} + +Reference< chart2::XChartTypeManager > ImplChartModel::GetChartTypeManager() +{ + return m_xChartTypeManager; +} + +void ImplChartModel::SetChartTypeTemplate( + const Reference< chart2::XChartTypeTemplate > & xTemplate ) +{ + m_xChartTypeTemplate = xTemplate; +} + +Reference< chart2::XChartTypeTemplate > ImplChartModel::GetChartTypeTemplate() +{ + return m_xChartTypeTemplate; +} + +void ImplChartModel::CreateDefaultChart() +{ + // clean up + RemoveAllDiagrams(); + + if( GetChartTypeTemplate().is()) + { + AppendDiagram( + GetChartTypeTemplate()->createDiagram( helper::VectorToSequence( m_aInterpretedData ))); + } +} + +uno::Reference< chart2::XTitle > ImplChartModel::GetTitle() +{ + return m_xTitle; +} + +void ImplChartModel::SetTitle( const uno::Reference< chart2::XTitle >& rTitle ) +{ + m_xTitle = rTitle; +} + +uno::Reference< ::com::sun::star::chart::XChartDocument > ImplChartModel::GetOldChartDocument( + const uno::Reference< chart2::XChartDocument > & xNewModel ) +{ + // put weak reference into a strong one + uno::Reference< ::com::sun::star::chart::XChartDocument > xRef( m_xOldModel ); + + if( ! xRef.is()) + { + xRef.set( new wrapper::ChartDocumentWrapper( xNewModel, m_xContext )); + + // assing reference to weak reference + m_xOldModel = xRef; + } + + return xRef; +} + +} // namespace impl +} // namespace chart diff --git a/chart2/source/model/main/ImplChartModel.hxx b/chart2/source/model/main/ImplChartModel.hxx new file mode 100644 index 000000000..5eaa5aa56 --- /dev/null +++ b/chart2/source/model/main/ImplChartModel.hxx @@ -0,0 +1,229 @@ +/************************************************************************* + * + * $RCSfile: ImplChartModel.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:31 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef CHART_IMPLCHARTMODEL_HXX +#define CHART_IMPLCHARTMODEL_HXX + +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XDATASOURCE_HPP_ +#include <drafts/com/sun/star/chart2/XDataSource.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XDATASERIES_HPP_ +#include <drafts/com/sun/star/chart2/XDataSeries.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XDIAGRAM_HPP_ +#include <drafts/com/sun/star/chart2/XDiagram.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XDATAPROVIDER_HPP_ +#include <drafts/com/sun/star/chart2/XDataProvider.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XCHARTTYPEMANAGER_HPP_ +#include <drafts/com/sun/star/chart2/XChartTypeManager.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XCHARTTYPETEMPLATE_HPP_ +#include <drafts/com/sun/star/chart2/XChartTypeTemplate.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XTITLE_HPP_ +#include <drafts/com/sun/star/chart2/XTitle.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XCHARTDOCUMENT_HPP_ +#include <drafts/com/sun/star/chart2/XChartDocument.hpp> +#endif +// #ifndef _DRAFTS_COM_SUN_STAR_LAYOUT_XSPLITLAYOUTCONTAINER_HPP_ +// #include <drafts/com/sun/star/layout/XSplitLayoutContainer.hpp> +// #endif + +#ifndef _COM_SUN_STAR_CONTAINER_NOSUCHELEMENTEXCEPTION_HPP_ +#include <com/sun/star/container/NoSuchElementException.hpp> +#endif + +#ifndef _COM_SUN_STAR_CHART_XCHARTDOCUMENT_HPP_ +#include <com/sun/star/chart/XChartDocument.hpp> +#endif + +#ifndef _CPPUHELPER_WEAKREF_HXX_ +#include <cppuhelper/weakref.hxx> +#endif + +#include <vector> + +namespace com { namespace sun { namespace star { + namespace container { + class XNameAccess; + } + namespace uno { + class XComponentContext; + } +}}} + +namespace chart +{ +namespace impl +{ + +class ImplChartModel +{ +public: + ImplChartModel( ::com::sun::star::uno::Reference< + ::com::sun::star::uno::XComponentContext > const & xContext ); + +// ::com::sun::star::uno::Sequence< +// ::com::sun::star::uno::Reference< +// ::drafts::com::sun::star::chart2::XDataSeries > > +// GetDataSeries() const; + + ::com::sun::star::uno::Reference< + ::com::sun::star::container::XNameAccess > + GetStyleFamilies(); + + // Diagram Access + void RemoveAllDiagrams(); + /** @return true, if the chart was found and removed, false otherwise. + */ + bool RemoveDiagram( const ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XDiagram > & xDiagram ); + void AppendDiagram( const ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XDiagram > & xDiagram ); + ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XDiagram > + GetDiagram( size_t nIndex ) const + throw( ::com::sun::star::container::NoSuchElementException ); + + void SetDataProvider( const ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XDataProvider > & xProvider ); + + void SAL_CALL SetRangeRepresentation( const ::rtl::OUString& aRangeRepresentation ) + throw (::com::sun::star::lang::IllegalArgumentException); + + void SetChartTypeManager( + const ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XChartTypeManager > & xManager ); + + ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XChartTypeManager > + GetChartTypeManager(); + + void SetChartTypeTemplate( + const ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XChartTypeTemplate > & xTemplate ); + + ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XChartTypeTemplate > + GetChartTypeTemplate(); + +// void SetSplitLayoutContainer( +// const ::com::sun::star::uno::Reference< +// ::drafts::com::sun::star::layout::XSplitLayoutContainer > & xLayoutCnt ); + +// ::com::sun::star::uno::Reference< +// ::drafts::com::sun::star::layout::XSplitLayoutContainer > GetSplitLayoutContainer(); + + ::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XTitle > + GetTitle(); + + void SetTitle( const ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XTitle >& rTitle ); + + ::com::sun::star::uno::Reference< + ::com::sun::star::chart::XChartDocument > GetOldChartDocument( + const ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XChartDocument > & xNewModel ); + +private: + void ReadData( const ::rtl::OUString & rRangeRepresentation ); + void CreateDefaultChart(); +// void CreateDefaultLayout(); + + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext; + ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > m_xFamilies; + + // Data Access (deprecated, temporary solution) + ::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XDataSource > m_xChartData; + ::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XDataProvider > m_xDataProvider; + + ::std::vector< ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XDataSeries > > m_aInterpretedData; + + ::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XChartTypeManager > + m_xChartTypeManager; + ::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XChartTypeTemplate > + m_xChartTypeTemplate; + + // Diagram Access + typedef ::std::vector< ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XDiagram > > + tDiagramContainer; + + tDiagramContainer m_aDiagrams; + +// ::com::sun::star::uno::Reference< ::drafts::com::sun::star::layout::XSplitLayoutContainer > +// m_xLayoutContainer; + + ::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XTitle > + m_xTitle; + + ::com::sun::star::uno::WeakReference< ::com::sun::star::chart::XChartDocument > + m_xOldModel; +}; + +} // namespace impl +} // namespace chart + +// CHART_IMPLCHARTMODEL_HXX +#endif diff --git a/chart2/source/model/main/LayoutContainer.cxx b/chart2/source/model/main/LayoutContainer.cxx new file mode 100644 index 000000000..d4ad05762 --- /dev/null +++ b/chart2/source/model/main/LayoutContainer.cxx @@ -0,0 +1,170 @@ +/************************************************************************* + * + * $RCSfile: LayoutContainer.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:31 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "LayoutContainer.hxx" +#include "algohelper.hxx" +#include "macros.hxx" + +#include <algorithm> + +using namespace ::com::sun::star; +using namespace ::drafts::com::sun::star; + +namespace +{ + +static const ::rtl::OUString lcl_aServiceName( + RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.layout.LayoutContainer" )); +} // anonymous namespace + +namespace chart +{ + +LayoutContainer::LayoutContainer() +{} + +LayoutContainer::~LayoutContainer() +{} + +// ____ XLayoutContainer ____ +void SAL_CALL LayoutContainer::addConstrainedElementByIdentifier( + const ::rtl::OUString& aIdentifier, + const layout::Constraint& Constraint ) + throw (layout::IllegalConstraintException, + lang::IllegalArgumentException, + uno::RuntimeException) +{ + addElementByIdentifier( aIdentifier ); + m_aConstraints[ aIdentifier ] = Constraint; +} + +void SAL_CALL LayoutContainer::addElementByIdentifier( const ::rtl::OUString& aIdentifier ) + throw (lang::IllegalArgumentException, + uno::RuntimeException) +{ + if( ::std::find( m_aLayoutElements.begin(), + m_aLayoutElements.end(), + aIdentifier ) != m_aLayoutElements.end()) + throw lang::IllegalArgumentException(); + + m_aLayoutElements.push_back( aIdentifier ); +} + +void SAL_CALL LayoutContainer::removeElementByIdentifier( const ::rtl::OUString& aIdentifier ) + throw (container::NoSuchElementException, + uno::RuntimeException) +{ + tLayoutElements::iterator aIt( + ::std::find( m_aLayoutElements.begin(), + m_aLayoutElements.end(), + aIdentifier )); + + if( aIt == m_aLayoutElements.end()) + throw container::NoSuchElementException(); + + m_aLayoutElements.erase( aIt ); + m_aConstraints.erase( aIdentifier ); +} + +void SAL_CALL LayoutContainer::setConstraintByIdentifier( + const ::rtl::OUString& aIdentifier, + const layout::Constraint& Constraint ) + throw (container::NoSuchElementException, + uno::RuntimeException) +{ + if( ::std::find( m_aLayoutElements.begin(), + m_aLayoutElements.end(), + aIdentifier ) == m_aLayoutElements.end()) + throw container::NoSuchElementException(); + + m_aConstraints[ aIdentifier ] = Constraint; +} + +layout::Constraint SAL_CALL LayoutContainer::getConstraintByIdentifier( const ::rtl::OUString& aIdentifier ) + throw (container::NoSuchElementException, + uno::RuntimeException) +{ + tConstraintsMap::const_iterator aIt( m_aConstraints.find( aIdentifier )); + if( aIt == m_aConstraints.end()) + throw container::NoSuchElementException(); + + return (*aIt).second; +} + +uno::Sequence< ::rtl::OUString > SAL_CALL LayoutContainer::getElementIdentifiers() + throw (uno::RuntimeException) +{ + return ::chart::helper::VectorToSequence( m_aLayoutElements ); +} + +uno::Sequence< ::rtl::OUString > LayoutContainer::getSupportedServiceNames_Static() +{ + uno::Sequence< ::rtl::OUString > aServices( 1 ); + + aServices[ 0 ] = C2U( "drafts.com.sun.star.layout.LayoutContainer" ); + return aServices; +} + +// -------------------------------------------------------------------------------- + +// implement XServiceInfo methods basing upon getSupportedServiceNames_Static +APPHELPER_XSERVICEINFO_IMPL( LayoutContainer, lcl_aServiceName ); + +} // namespace chart diff --git a/chart2/source/model/main/LayoutContainer.hxx b/chart2/source/model/main/LayoutContainer.hxx new file mode 100644 index 000000000..0f6255ced --- /dev/null +++ b/chart2/source/model/main/LayoutContainer.hxx @@ -0,0 +1,131 @@ +/************************************************************************* + * + * $RCSfile: LayoutContainer.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:31 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef CHART_LAYOUTCONTAINER_HXX +#define CHART_LAYOUTCONTAINER_HXX + +#ifndef _CPPUHELPER_IMPLBASE2_HXX_ +#include <cppuhelper/implbase2.hxx> +#endif + +#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_ +#include <com/sun/star/lang/XServiceInfo.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_LAYOUT_XLAYOUTCONTAINER_HPP_ +#include <drafts/com/sun/star/layout/XLayoutContainer.hpp> +#endif + +#include "ServiceMacros.hxx" + +#include <vector> +#include <map> + +namespace chart +{ + +class LayoutContainer : public + ::cppu::WeakImplHelper2< + ::com::sun::star::lang::XServiceInfo, + ::drafts::com::sun::star::layout::XLayoutContainer > +{ +public: + LayoutContainer(); + virtual ~LayoutContainer(); + + /// XServiceInfo declarations + APPHELPER_XSERVICEINFO_DECL() + +protected: + // ____ XLayoutContainer ____ + virtual void SAL_CALL addConstrainedElementByIdentifier( const ::rtl::OUString& aIdentifier, const ::drafts::com::sun::star::layout::Constraint& Constraint ) + throw (::drafts::com::sun::star::layout::IllegalConstraintException, + ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addElementByIdentifier( const ::rtl::OUString& aIdentifier ) + throw (::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeElementByIdentifier( const ::rtl::OUString& aIdentifier ) + throw (::com::sun::star::container::NoSuchElementException, + ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setConstraintByIdentifier( const ::rtl::OUString& aIdentifier, const ::drafts::com::sun::star::layout::Constraint& Constraint ) + throw (::com::sun::star::container::NoSuchElementException, + ::com::sun::star::uno::RuntimeException); + virtual ::drafts::com::sun::star::layout::Constraint SAL_CALL getConstraintByIdentifier( const ::rtl::OUString& aIdentifier ) + throw (::com::sun::star::container::NoSuchElementException, + ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< + ::rtl::OUString > SAL_CALL getElementIdentifiers() + throw (::com::sun::star::uno::RuntimeException); + +private: + typedef ::std::vector< ::rtl::OUString > tLayoutElements; + + typedef ::std::map< + ::rtl::OUString, + ::drafts::com::sun::star::layout::Constraint > tConstraintsMap; + + tLayoutElements m_aLayoutElements; + tConstraintsMap m_aConstraints; +}; + +} // namespace chart + +// CHART_LAYOUTCONTAINER_HXX +#endif diff --git a/chart2/source/model/main/Legend.cxx b/chart2/source/model/main/Legend.cxx new file mode 100644 index 000000000..ed041ffac --- /dev/null +++ b/chart2/source/model/main/Legend.cxx @@ -0,0 +1,263 @@ +/************************************************************************* + * + * $RCSfile: Legend.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:31 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "Legend.hxx" +#include "macros.hxx" +#include "algohelper.hxx" +#include "LineProperties.hxx" +#include "FillProperties.hxx" +#include "UserDefinedProperties.hxx" +#include "LegendHelper.hxx" + +#ifndef CHART_PROPERTYHELPER_HXX +#include "PropertyHelper.hxx" +#endif +#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HPP_ +#include <com/sun/star/beans/PropertyAttribute.hpp> +#endif + +#ifndef _DRAFTS_COM_SUN_STAR_LAYOUT_ALIGNMENT_HPP_ +#include <drafts/com/sun/star/layout/Alignment.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_LAYOUT_STRETCHMODE_HPP_ +#include <drafts/com/sun/star/layout/StretchMode.hpp> +#endif + +#include <algorithm> + +using namespace ::com::sun::star; +using namespace ::com::sun::star::beans::PropertyAttribute; +using namespace ::drafts::com::sun::star; + +using ::com::sun::star::beans::Property; + +namespace +{ + +static const ::rtl::OUString lcl_aServiceName( + RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.chart2.Legend" )); + +const uno::Sequence< Property > & lcl_GetPropertySequence() +{ + static uno::Sequence< Property > aPropSeq; + + // /-- + ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); + if( 0 == aPropSeq.getLength() ) + { + // get properties + ::std::vector< ::com::sun::star::beans::Property > aProperties; + ::chart::LineProperties::AddPropertiesToVector( + aProperties, /* bIncludeStyleProperties = */ false ); + ::chart::FillProperties::AddPropertiesToVector( + aProperties, /* bIncludeStyleProperties = */ false ); + ::chart::UserDefinedProperties::AddPropertiesToVector( aProperties ); + + // and sort them for access via bsearch + ::std::sort( aProperties.begin(), aProperties.end(), + ::chart::helper::PropertyNameLess() ); + + // transfer result to static Sequence + aPropSeq = ::chart::helper::VectorToSequence( aProperties ); + } + + return aPropSeq; +} + +::cppu::IPropertyArrayHelper & lcl_getInfoHelper() +{ + static ::cppu::OPropertyArrayHelper aArrayHelper( + lcl_GetPropertySequence(), + /* bSorted = */ sal_True ); + + return aArrayHelper; +} + +} // anonymous namespace + +namespace chart +{ + +Legend::Legend( uno::Reference< uno::XComponentContext > const & xContext ) : + ::property::OPropertySet( m_aMutex ), + m_aIdentifier( LegendHelper::getIdentifierForLegend() ) +{ +} + +Legend::~Legend() +{ +} + +// ____ XLegend ____ +void SAL_CALL Legend::registerEntry( const uno::Reference< chart2::XLegendEntry >& xEntry ) + throw (lang::IllegalArgumentException, + uno::RuntimeException) +{ + if( ::std::find( m_aLegendEntries.begin(), + m_aLegendEntries.end(), + xEntry ) != m_aLegendEntries.end()) + throw lang::IllegalArgumentException(); + + m_aLegendEntries.push_back( xEntry ); +} + +void SAL_CALL Legend::revokeEntry( const uno::Reference< chart2::XLegendEntry >& xEntry ) + throw (container::NoSuchElementException, + uno::RuntimeException) +{ + tLegendEntries::iterator aIt( + ::std::find( m_aLegendEntries.begin(), + m_aLegendEntries.end(), + xEntry )); + + if( aIt == m_aLegendEntries.end()) + throw container::NoSuchElementException(); + + m_aLegendEntries.erase( aIt ); +} + +uno::Sequence< uno::Reference< chart2::XLegendEntry > > SAL_CALL Legend::getEntries() + throw (uno::RuntimeException) +{ + return ::chart::helper::VectorToSequence( m_aLegendEntries ); +} + +::rtl::OUString SAL_CALL Legend::getIdentifier() + throw (uno::RuntimeException) +{ + return m_aIdentifier; +} + +// ================================================================================ + +uno::Sequence< ::rtl::OUString > Legend::getSupportedServiceNames_Static() +{ + uno::Sequence< ::rtl::OUString > aServices( 5 ); + aServices[ 0 ] = C2U( "drafts.com.sun.star.chart2.Legend" ); + aServices[ 1 ] = C2U( "com.sun.star.beans.PropertySet" ); + aServices[ 2 ] = C2U( "com.sun.star.drawing.FillProperties" ); + aServices[ 3 ] = C2U( "com.sun.star.drawing.LineProperties" ); + aServices[ 4 ] = C2U( "drafts.com.sun.star.layout.LayoutElement" ); + return aServices; +} + +// ____ OPropertySet ____ +uno::Any Legend::GetDefaultValue( sal_Int32 nHandle ) const + throw(beans::UnknownPropertyException) +{ + static helper::tPropertyValueMap aStaticDefaults; + + // /-- + ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); + if( 0 == aStaticDefaults.size() ) + { + LineProperties::AddDefaultsToMap( + aStaticDefaults, + /* bIncludeStyleProperties = */ false ); + FillProperties::AddDefaultsToMap( + aStaticDefaults, + /* bIncludeStyleProperties = */ false ); + } + + helper::tPropertyValueMap::const_iterator aFound( + aStaticDefaults.find( nHandle )); + + if( aFound == aStaticDefaults.end()) + return uno::Any(); + + return (*aFound).second; + // \-- +} + +::cppu::IPropertyArrayHelper & SAL_CALL Legend::getInfoHelper() +{ + return lcl_getInfoHelper(); +} + + +// ____ XPropertySet ____ +uno::Reference< beans::XPropertySetInfo > SAL_CALL + Legend::getPropertySetInfo() + throw (uno::RuntimeException) +{ + static uno::Reference< beans::XPropertySetInfo > xInfo; + + // /-- + ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); + if( !xInfo.is()) + { + xInfo = ::cppu::OPropertySetHelper::createPropertySetInfo( + getInfoHelper()); + } + + return xInfo; + // \-- +} + +// implement XServiceInfo methods basing upon getSupportedServiceNames_Static +APPHELPER_XSERVICEINFO_IMPL( Legend, lcl_aServiceName ); + +// needed by MSC compiler +using impl::Legend_Base; + +IMPLEMENT_FORWARD_XINTERFACE2( Legend, Legend_Base, ::property::OPropertySet ) +IMPLEMENT_FORWARD_XTYPEPROVIDER2( Legend, Legend_Base, ::property::OPropertySet ) + +} // namespace chart diff --git a/chart2/source/model/main/Legend.hxx b/chart2/source/model/main/Legend.hxx new file mode 100644 index 000000000..a388e97dd --- /dev/null +++ b/chart2/source/model/main/Legend.hxx @@ -0,0 +1,182 @@ +/************************************************************************* + * + * $RCSfile: Legend.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:31 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef CHART_LEGEND_HXX +#define CHART_LEGEND_HXX + +#include "ServiceMacros.hxx" + +#ifndef CHART_OPROPERTYSET_HXX +#include "OPropertySet.hxx" +#endif +#ifndef CHART_MUTEXCONTAINER_HXX +#include "MutexContainer.hxx" +#endif +#ifndef _CPPUHELPER_IMPLBASE4_HXX_ +#include <cppuhelper/implbase4.hxx> +#endif +#ifndef _COMPHELPER_UNO3_HXX_ +#include <comphelper/uno3.hxx> +#endif + +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XLEGEND_HPP_ +#include <drafts/com/sun/star/chart2/XLegend.hpp> +#endif +#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_ +#include <com/sun/star/lang/XServiceInfo.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XIDENTIFIABLE_HPP_ +#include <drafts/com/sun/star/chart2/XIdentifiable.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_LAYOUT_XLAYOUTELEMENT_HPP_ +#include <drafts/com/sun/star/layout/XLayoutElement.hpp> +#endif +#ifndef _COM_SUN_STAR_UNO_XCOMPONENTCONTEXT_HPP_ +#include <com/sun/star/uno/XComponentContext.hpp> +#endif + +namespace chart +{ + +namespace impl +{ +typedef ::cppu::WeakImplHelper4< + ::drafts::com::sun::star::chart2::XLegend, + ::com::sun::star::lang::XServiceInfo, + ::drafts::com::sun::star::chart2::XIdentifiable, + ::drafts::com::sun::star::layout::XLayoutElement > + Legend_Base; +} + +class Legend : + public helper::MutexContainer, + public impl::Legend_Base, + public ::property::OPropertySet +{ +public: + Legend( ::com::sun::star::uno::Reference< + ::com::sun::star::uno::XComponentContext > const & xContext ); + virtual ~Legend(); + + /// establish methods for factory instatiation + APPHELPER_SERVICE_FACTORY_HELPER( Legend ) + + /// XServiceInfo declarations + APPHELPER_XSERVICEINFO_DECL() + + /// merge XInterface implementations + DECLARE_XINTERFACE() + /// merge XTypeProvider implementations + DECLARE_XTYPEPROVIDER() + +protected: + // ____ OPropertySet ____ + virtual ::com::sun::star::uno::Any GetDefaultValue( sal_Int32 nHandle ) const + throw(::com::sun::star::beans::UnknownPropertyException); + + // ____ OPropertySet ____ + virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper(); + + // ____ XPropertySet ____ + virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL + getPropertySetInfo() + throw (::com::sun::star::uno::RuntimeException); + +// virtual sal_Bool SAL_CALL convertFastPropertyValue +// ( ::com::sun::star::uno::Any & rConvertedValue, +// ::com::sun::star::uno::Any & rOldValue, +// sal_Int32 nHandle, +// const ::com::sun::star::uno::Any& rValue ) +// throw (::com::sun::star::lang::IllegalArgumentException); + + // ____ XLegend ____ + virtual void SAL_CALL registerEntry( const ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XLegendEntry >& xEntry ) + throw (::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL revokeEntry( const ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XLegendEntry >& xEntry ) + throw (::com::sun::star::container::NoSuchElementException, + ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< + ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XLegendEntry > > SAL_CALL getEntries() + throw (::com::sun::star::uno::RuntimeException); + + // ____ XIdentifiable ____ + virtual ::rtl::OUString SAL_CALL getIdentifier() + throw (::com::sun::star::uno::RuntimeException); + + // ____ XLayoutElement ____ + // (empty) + +private: + typedef ::std::vector< + ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XLegendEntry > > tLegendEntries; + + tLegendEntries m_aLegendEntries; + ::rtl::OUString m_aIdentifier; +}; + +} // namespace chart + +// CHART_LEGEND_HXX +#endif diff --git a/chart2/source/model/main/PolarCoordinateSystem.cxx b/chart2/source/model/main/PolarCoordinateSystem.cxx new file mode 100644 index 000000000..9f215a97c --- /dev/null +++ b/chart2/source/model/main/PolarCoordinateSystem.cxx @@ -0,0 +1,118 @@ +/************************************************************************* + * + * $RCSfile: PolarCoordinateSystem.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:31 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2002 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "PolarCoordinateSystem.hxx" +#include "PolarTransformation.hxx" +#include "macros.hxx" + +using ::com::sun::star::uno::RuntimeException; +using ::com::sun::star::uno::Sequence; +using ::rtl::OUString; + +namespace chart +{ + +PolarCoordinateSystem::PolarCoordinateSystem( sal_Int32 nDim ) : + m_aTransformationToCartesian( + new PolarTransformation( PolarTransformation::TRANSFORM_FROM, nDim ) ), + m_aTransformationFromCartesian( + new PolarTransformation( PolarTransformation::TRANSFORM_TO, nDim ) ), + m_nDim( nDim ) +{ +} + +PolarCoordinateSystem::~PolarCoordinateSystem() +{} + +// ____ XCoordinateSystem ____ +::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XTransformation > SAL_CALL + PolarCoordinateSystem::getTransformationToCartesian() + throw (RuntimeException) +{ + return m_aTransformationToCartesian; +} + +::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XTransformation > SAL_CALL + PolarCoordinateSystem::getTransformationFromCartesian() + throw (RuntimeException) +{ + return m_aTransformationFromCartesian; +} + +sal_Int32 SAL_CALL PolarCoordinateSystem::getDimension() throw (RuntimeException) +{ + return m_nDim; +} + + +// ____ XServiceInfo ____ + +Sequence< OUString > PolarCoordinateSystem::getSupportedServiceNames_Static() +{ + Sequence< OUString > aServices; +// Sequence< OUString > aServices( 1 ); +// aServices[ 0 ] = C2U( "drafts.com.sun.star.chart2.CoordinateSystem" ); + return aServices; +} + +APPHELPER_XSERVICEINFO_IMPL( PolarCoordinateSystem, + C2U( "com.sun.star.comp.chart.PolarCoordinateSystem" )); + +} // namespace chart diff --git a/chart2/source/model/main/RectangularDataSource.cxx b/chart2/source/model/main/RectangularDataSource.cxx new file mode 100644 index 000000000..a40f134e9 --- /dev/null +++ b/chart2/source/model/main/RectangularDataSource.cxx @@ -0,0 +1,335 @@ +/************************************************************************* + * + * $RCSfile: RectangularDataSource.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:31 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "RectangularDataSource.hxx" +#include "CachedDataSequence.hxx" +#include "StandardNaNHelper.hxx" + +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XNUMERICALDATASEQUENCE_HPP_ +#include <drafts/com/sun/star/chart2/XNumericalDataSequence.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XTEXTUALDATASEQUENCE_HPP_ +#include <drafts/com/sun/star/chart2/XTextualDataSequence.hpp> +#endif +#ifndef _COM_SUN_STAR_UTIL_XNUMBERFORMATSSUPPLIER_HPP_ +#include <com/sun/star/util/XNumberFormatsSupplier.hpp> +#endif +#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HPP_ +#include <com/sun/star/beans/PropertyAttribute.hpp> +#endif + +using namespace ::com::sun::star; +using namespace ::drafts::com::sun::star; + +using ::rtl::OUString; +using ::osl::MutexGuard; +using ::com::sun::star::uno::Sequence; +using ::com::sun::star::uno::Reference; +using ::com::sun::star::beans::Property; +using ::com::sun::star::uno::RuntimeException; +using ::com::sun::star::uno::Any; +using ::com::sun::star::beans::PropertyAttribute::MAYBEDEFAULT; + +// necessary for MS compiler +using ::comphelper::OPropertyContainer; +using ::chart::impl::RectangularDataSource_Base; + +// ________________________________________ + +// Property-Ids + +namespace +{ +enum +{ + PROP_SOURCE_RANGE, + PROP_DATA_ROW_SOURCE +}; +} // anonymous namespace + + +// ________________________________________ + +namespace chart +{ + +#define STANDARD_PROPERTY_ATTRIBUTES ::com::sun::star::beans::PropertyAttribute::MAYBEDEFAULT + +RectangularDataSource::RectangularDataSource( uno::Reference< uno::XComponentContext > const & xContext ) + : OPropertyContainer( GetBroadcastHelper() ), + RectangularDataSource_Base( GetMutex() ), + m_aDataRowSource( ::com::sun::star::chart::ChartDataRowSource_COLUMNS ) +{ + registerProperty( C2U( "SourceRange" ), + PROP_SOURCE_RANGE, // Handle for fast access + 0, // PropertyAttributes + & m_aSourceRange, // pointer to corresponding member + ::getCppuType( & m_aSourceRange ) // Type of property + ); + + registerProperty( C2U( "DataRowSource" ), + PROP_DATA_ROW_SOURCE, // Handle for fast access + MAYBEDEFAULT, // PropertyAttributes + & m_aDataRowSource, // pointer to corresponding member + ::getCppuType( & m_aDataRowSource ) // Type of property + ); +} + +RectangularDataSource::~RectangularDataSource() +{} + +// base for XServiceInfo +Sequence< OUString > RectangularDataSource::getSupportedServiceNames_Static() +{ + Sequence< OUString > aServices( 4 ); + aServices[ 0 ] = C2U( "drafts.com.sun.star.chart2.RectangularDataSource" ); + aServices[ 1 ] = C2U( "drafts.com.sun.star.chart2.DataFilter" ); + aServices[ 2 ] = C2U( "drafts.com.sun.star.chart2.DataSource" ); + aServices[ 3 ] = C2U( "drafts.com.sun.star.chart2.DataSink" ); + return aServices; +} + +// ____ XDataSink ____ +void SAL_CALL RectangularDataSource::setData( const uno::Sequence< Reference< chart2::XDataSequence > >& aData ) + throw (RuntimeException) +{ + m_aDataSequences = aData; +} + +// ____ XDataSource ____ +uno::Sequence< Reference< chart2::XDataSequence > > SAL_CALL RectangularDataSource::getDataSequences() + throw (RuntimeException) +{ + return m_aDataSequences; +} + +double SAL_CALL RectangularDataSource::getNotANumber() + throw (uno::RuntimeException) +{ + return helper::StandardNaNHelper::getNotANumber(); +} + +sal_Bool SAL_CALL RectangularDataSource::isNotANumber( double fNumber ) + throw (uno::RuntimeException) +{ + return helper::StandardNaNHelper::isNotANumber( fNumber ); +} + +// ____ XIndexAccess ____ + sal_Int32 SAL_CALL RectangularDataSource::getCount() + throw (RuntimeException) +{ + // /-- + MutexGuard aGuard( GetMutex() ); + return m_aDataSequences.getLength(); + // \-- +} + + Any SAL_CALL RectangularDataSource::getByIndex( sal_Int32 Index ) + throw (lang::IndexOutOfBoundsException, + lang::WrappedTargetException, + RuntimeException) +{ + // /-- + MutexGuard aGuard( GetMutex() ); + return uno::makeAny( GetDataByIndex( Index ) ); + // \-- +} + +// ____ XElementAccess (base of XIndexAccess) ____ + uno::Type SAL_CALL RectangularDataSource::getElementType() + throw (RuntimeException) +{ + return ::getCppuType((const Reference< chart2::XDataSequence >*)0); +} + +sal_Bool SAL_CALL RectangularDataSource::hasElements() + throw (RuntimeException) +{ + // /-- + MutexGuard aGuard( GetMutex() ); + return static_cast< sal_Bool >( m_aDataSequences.getLength() > 0 ); + // \-- +} + +Reference< chart2::XDataSequence > RectangularDataSource::GetDataByIndex( sal_Int32 Index ) const + throw (lang::IndexOutOfBoundsException) +{ + if( 0 > Index || Index >= m_aDataSequences.getLength() ) + throw lang::IndexOutOfBoundsException(); + + return m_aDataSequences.getConstArray() [ Index ]; +} + +void SAL_CALL RectangularDataSource::setFastPropertyValue_NoBroadcast( + sal_Int32 nHandle, + const Any& rValue ) + throw (uno::Exception) +{ + // at this point it is clear that rValue contains a different value than the + // property currently still has, and that it will be overwritten by it in + // the final base class call + + switch( nHandle ) + { + case PROP_DATA_ROW_SOURCE: + { + ::com::sun::star::chart::ChartDataRowSource aRowSource; + if( rValue >>= aRowSource ) + { + if( aRowSource != m_aDataRowSource ) + { + SwapData(); + } + } + } + break; + } + + OPropertyContainer::setFastPropertyValue_NoBroadcast( nHandle, rValue ); +} + +// ================================================================================ + +using impl::RectangularDataSource_Base; + +IMPLEMENT_FORWARD_XINTERFACE2( RectangularDataSource, RectangularDataSource_Base, OPropertyContainer ) +IMPLEMENT_FORWARD_XTYPEPROVIDER2( RectangularDataSource, RectangularDataSource_Base, OPropertyContainer ) + +// ____ XPropertySet ____ +Reference< beans::XPropertySetInfo > SAL_CALL RectangularDataSource::getPropertySetInfo() + throw(RuntimeException) +{ + return Reference< beans::XPropertySetInfo >( createPropertySetInfo( getInfoHelper() ) ); +} + +// ____ ::comphelper::OPropertySetHelper ____ +// __________________________________________ +::cppu::IPropertyArrayHelper& RectangularDataSource::getInfoHelper() +{ + return *getArrayHelper(); +} + +// ____ ::comphelper::OPropertyArrayHelper ____ +// ____________________________________________ +::cppu::IPropertyArrayHelper* RectangularDataSource::createArrayHelper() const +{ + Sequence< Property > aProps; + // describes all properties which have been registered in the ctor + describeProperties( aProps ); + + return new ::cppu::OPropertyArrayHelper( aProps ); +} + +// implement XServiceInfo methods basing upon getSupportedServiceNames_Static +APPHELPER_XSERVICEINFO_IMPL( RectangularDataSource, + C2U( "com.sun.star.comp.chart.RectangularDataSource" )) + +void RectangularDataSource::SwapData() +{ + try + { + // assume that there are always text labels + Reference< chart2::XTextualDataSequence > xCategories( GetDataByIndex( 0 ), uno::UNO_QUERY ); + + // -1: the first sequence contains labels + sal_Int32 nNewSequenceSize = m_aDataSequences.getLength() - 1; + if( nNewSequenceSize > 0 ) + { + // +1: one series more for labels + sal_Int32 nNewNumOfSequences = GetDataByIndex( 0 )->getData().getLength() + 1; + Sequence< Reference< chart2::XDataSequence > > aResult( nNewNumOfSequences ); + ::std::vector< OUString > aCategoryVector( nNewSequenceSize ); + sal_Int32 nIdx = 0; + + // fill new categories consisting of former labels + for( nIdx = 0; nIdx < nNewSequenceSize; ++nIdx ) + { + aCategoryVector.push_back( GetDataByIndex( nIdx )->getLabel() ); + } + aResult[ 0 ] = Reference< chart2::XDataSequence >( + static_cast< chart2::XTextualDataSequence * >( + new ::chart::CachedDataSequence( aCategoryVector ))); + + // fill new data sequences. The label is set by the former categories + for( sal_Int32 nSeqIdx = 1; nSeqIdx < nNewNumOfSequences; ++ nSeqIdx ) + { + ::std::vector< double > aDataVector( nNewSequenceSize ); + for( nIdx = 0; nIdx < nNewSequenceSize; ++nIdx ) + { + aDataVector.push_back( + Reference< chart2::XNumericalDataSequence >( + GetDataByIndex( nIdx ), + uno::UNO_QUERY )->getNumericalData().getConstArray()[ nSeqIdx - 1 ] ); + } + aResult[ nSeqIdx ] = Reference< chart2::XDataSequence >( + static_cast< chart2::XNumericalDataSequence * >( + new ::chart::CachedDataSequence( aDataVector ))); + } + + setData( aResult ); + } + } + catch( lang::IndexOutOfBoundsException aEx ) + { + } +} + +} // namespace chart diff --git a/chart2/source/model/main/Style.cxx b/chart2/source/model/main/Style.cxx new file mode 100644 index 000000000..d93160640 --- /dev/null +++ b/chart2/source/model/main/Style.cxx @@ -0,0 +1,194 @@ +/************************************************************************* + * + * $RCSfile: Style.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:31 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "Style.hxx" +#include "macros.hxx" + +#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HPP_ +#include <com/sun/star/beans/PropertyAttribute.hpp> +#endif +#ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_ +#include <com/sun/star/container/XNameContainer.hpp> +#endif + +using namespace ::com::sun::star; +using ::com::sun::star::uno::Reference; +using ::com::sun::star::uno::RuntimeException; +using ::rtl::OUString; +using ::osl::MutexGuard; + +// necessary for MS compiler +using ::comphelper::OPropertyContainer; +using ::chart::impl::Style_Base; + +namespace +{ +static const ::rtl::OUString lcl_aImplName( + RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.chart.Style" )); +} // anonymous namespace + +namespace chart +{ + +Style::Style( const Reference< container::XNameContainer > & xStyleFamiliyToAddTo ) : + OPropertyContainer( GetBroadcastHelper()), + Style_Base( GetMutex()), + m_xStyleFamily( xStyleFamiliyToAddTo ), + m_aName( C2U( "Default" ) ), + m_bUserDefined( sal_False ) +{ + OSL_ENSURE( m_xStyleFamily.is(), "No StyleFamily to add style to" ); +} + +Style::~Style() +{} + +sal_Bool SAL_CALL Style::isUserDefined() + throw (RuntimeException) +{ + // /-- + MutexGuard aGuard( GetMutex() ); + return m_bUserDefined; + // \-- +} + +sal_Bool SAL_CALL Style::isInUse() + throw (RuntimeException) +{ + // /-- + MutexGuard aGuard( GetMutex() ); + + // aBoundLC is a member of cppuhelper::OPropertySetHelper + // it is assumed that a style is in use whenever some component is + // registered here as listener + return ( aBoundLC.getContainedTypes().getLength() > 0 ); + // \-- +} + +OUString SAL_CALL Style::getParentStyle() + throw (RuntimeException) +{ + // /-- + MutexGuard aGuard( GetMutex() ); + return m_aParentStyleName; + // \-- +} + +void SAL_CALL Style::setParentStyle( const OUString& aParentStyle ) + throw (container::NoSuchElementException, + RuntimeException) +{ + // /-- + MutexGuard aGuard( GetMutex() ); + m_aParentStyleName = aParentStyle; + // \-- +} + + +OUString SAL_CALL Style::getName() + throw (RuntimeException) +{ + // /-- + MutexGuard aGuard( GetMutex() ); + return m_aName; + // \-- +} + +void SAL_CALL Style::setName( const OUString& aName ) + throw (RuntimeException) +{ + // /-- + MutexGuard aGuard( GetMutex() ); + OSL_ASSERT( m_xStyleFamily.is()); + + if( m_xStyleFamily.is() ) + { + // remove old name + if( m_aName.getLength() > 0 ) + { + Reference< container::XNameAccess > xAccess( m_xStyleFamily, uno::UNO_QUERY ); + OSL_ASSERT( xAccess.is()); + if( xAccess->hasByName( m_aName )) + m_xStyleFamily->removeByName( m_aName ); + } + + // change name + m_aName = aName; + + // add new name + m_xStyleFamily->insertByName( m_aName, uno::makeAny( this )); + } + // \-- +} + +IMPLEMENT_FORWARD_XINTERFACE2( Style, Style_Base, OPropertyContainer ) +IMPLEMENT_FORWARD_XTYPEPROVIDER2( Style, Style_Base, OPropertyContainer ) + +// implement XServiceInfo methods basing upon getSupportedServiceNames_Static +APPHELPER_XSERVICEINFO_IMPL( Style, lcl_aImplName ) + +uno::Sequence< OUString > Style::getSupportedServiceNames_Static() +{ + uno::Sequence< OUString > aServices( 1 ); + aServices[ 0 ] = C2U( "com.sun.star.style.Style" ); + return aServices; +} + +} // namespace chart diff --git a/chart2/source/model/main/Style.hxx b/chart2/source/model/main/Style.hxx new file mode 100644 index 000000000..957113211 --- /dev/null +++ b/chart2/source/model/main/Style.hxx @@ -0,0 +1,163 @@ +/************************************************************************* + * + * $RCSfile: Style.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:31 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef CHART_STYLE_HXX +#define CHART_STYLE_HXX + +// helper classes +#ifndef _CPPUHELPER_COMPBASE2_HXX_ +#include <cppuhelper/compbase2.hxx> +#endif +#ifndef _COMPHELPER_UNO3_HXX_ +#include <comphelper/uno3.hxx> +#endif +#ifndef _COMPHELPER_BROADCASTHELPER_HXX_ +#include <comphelper/broadcasthelper.hxx> +#endif +#ifndef _COMPHELPER_PROPERTYCONTAINER_HXX_ +#include <comphelper/propertycontainer.hxx> +#endif +#ifndef _COMPHELPER_PROPERTY_ARRAY_HELPER_HXX_ +#include <comphelper/proparrhlp.hxx> +#endif + +#include "ServiceMacros.hxx" + +// interfaces and types +#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_ +#include <com/sun/star/lang/XServiceInfo.hpp> +#endif +#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_ +#include <com/sun/star/beans/XPropertySet.hpp> +#endif +#ifndef _COM_SUN_STAR_STYLE_XSTYLE_HPP_ +#include <com/sun/star/style/XStyle.hpp> +#endif + +namespace com { namespace sun { namespace star { namespace container { + class XNameContainer; +}}}} + +namespace chart +{ + +namespace impl +{ +typedef ::cppu::WeakComponentImplHelper2< + ::com::sun::star::style::XStyle, + ::com::sun::star::lang::XServiceInfo > Style_Base; +} + +class Style : + public ::comphelper::OMutexAndBroadcastHelper, + public ::comphelper::OPropertyContainer, + public ::comphelper::OPropertyArrayUsageHelper< Style >, + public impl::Style_Base +{ +public: + Style( const ::com::sun::star::uno::Reference< + ::com::sun::star::container::XNameContainer > & xStyleFamiliyToAddTo ); + virtual ~Style(); + + void RegisterProperties( + const ::std::vector< ::com::sun::star::beans::Property > & rProperties, + ::std::vector< ::com::sun::star::uno::Any > & rOutProperties ); + + /// declare XServiceInfo methods + APPHELPER_XSERVICEINFO_DECL() + + /// merge XInterface implementations + DECLARE_XINTERFACE() + /// merge XTypeProvider implementations + DECLARE_XTYPEPROVIDER() + +protected: + // ____ style::XStyle ____ + virtual sal_Bool SAL_CALL isUserDefined() throw (::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL isInUse() throw (::com::sun::star::uno::RuntimeException); + virtual ::rtl::OUString SAL_CALL getParentStyle() throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setParentStyle( const ::rtl::OUString& aParentStyle ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException); + + // ____ container::XNamed (base of XStyle) ____ + virtual ::rtl::OUString SAL_CALL getName() throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setName( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException); + + // ____ beans::XPropertySet ____ + /// @see ::com::sun::star::beans::XPropertySet + virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() + throw (::com::sun::star::uno::RuntimeException); + /// @see ::comphelper::OPropertySetHelper + virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); + /// @see ::comphelper::OPropertyArrayUsageHelper + virtual ::cppu::IPropertyArrayHelper* createArrayHelper() const; + +private: + ::com::sun::star::uno::Reference< + ::com::sun::star::container::XNameContainer > m_xStyleFamily; + + ::rtl::OUString m_aName; + ::rtl::OUString m_aParentStyleName; + sal_Bool m_bUserDefined; +}; + +} // namespace chart + +// CHART_STYLE_HXX +#endif diff --git a/chart2/source/model/main/StyleFamilies.cxx b/chart2/source/model/main/StyleFamilies.cxx new file mode 100644 index 000000000..48627b536 --- /dev/null +++ b/chart2/source/model/main/StyleFamilies.cxx @@ -0,0 +1,207 @@ +/************************************************************************* + * + * $RCSfile: StyleFamilies.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:31 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "StyleFamilies.hxx" +#include "macros.hxx" + +#include <algorithm> +#include <functional> + +using namespace ::com::sun::star; +using ::com::sun::star::uno::Reference; +using ::com::sun::star::uno::Any; +using ::com::sun::star::uno::RuntimeException; +using ::com::sun::star::uno::Sequence; +using ::rtl::OUString; +using ::osl::MutexGuard; + +namespace chart +{ + +StyleFamilies::StyleFamilies() +{ +} + +StyleFamilies::~StyleFamilies() +{} + +bool StyleFamilies::AddStyleFamily( + const OUString & rName, + const Reference< container::XNameAccess > & rFamily ) +{ + if( m_aStyleFamilies.find( rName ) == m_aStyleFamilies.end() ) + { + m_aStyleFamilies[ rName ] = rFamily; + return true; + } + + return false; +} + +// container::XNameAccess +Any SAL_CALL StyleFamilies::getByName( const OUString& aName ) + throw (container::NoSuchElementException, + lang::WrappedTargetException, + RuntimeException) +{ + // /-- + MutexGuard aGuard( m_aMutex ); + + tStyleFamilyContainer::const_iterator aIt( m_aStyleFamilies.find( aName )); + if( aIt == m_aStyleFamilies.end()) + { + throw container::NoSuchElementException( + aName, + static_cast< ::cppu::OWeakObject* >( this )); + } + + OSL_ASSERT( (*aIt).first.equals( aName )); + return uno::makeAny( (*aIt).second ); + // \-- +} + +uno::Sequence< OUString > SAL_CALL StyleFamilies::getElementNames() + throw (RuntimeException) +{ + // /-- + MutexGuard aGuard( m_aMutex ); + Sequence< OUString > aResult( m_aStyleFamilies.size()); + + ::std::transform( m_aStyleFamilies.begin(), m_aStyleFamilies.end(), + aResult.getArray(), + ::std::select1st< tStyleFamilyContainer::value_type >() ); + + return aResult; + // \-- +} + +sal_Bool SAL_CALL StyleFamilies::hasByName( const OUString& aName ) + throw (RuntimeException) +{ + // /-- + MutexGuard aGuard( m_aMutex ); + + return ( m_aStyleFamilies.find( aName ) != m_aStyleFamilies.end() ); + // \-- +} + + +// container::XIndexAccess (optional) +sal_Int32 SAL_CALL StyleFamilies::getCount() + throw (RuntimeException) +{ + // /-- + MutexGuard aGuard( m_aMutex ); + return m_aStyleFamilies.size(); + // \-- +} + +Any SAL_CALL StyleFamilies::getByIndex( sal_Int32 Index ) + throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, RuntimeException) +{ + // /-- + MutexGuard aGuard( m_aMutex ); + tStyleFamilyContainer::const_iterator aIt( m_aStyleFamilies.begin()); + sal_Int32 nCounter = 0; + for( ; + ( nCounter < Index ) && ( aIt != m_aStyleFamilies.end()); + ++nCounter, ++aIt ); + + if( aIt == m_aStyleFamilies.end()) + { + throw container::NoSuchElementException( + OUString::valueOf( Index ), + static_cast< ::cppu::OWeakObject* >( this )); + } + + return uno::makeAny( (*aIt).second ); + // \-- +} + + +// container::XElementAccess (base of XNameAccess and XIndexAccess) +uno::Type SAL_CALL StyleFamilies::getElementType() + throw (RuntimeException) +{ + return ::getCppuType( reinterpret_cast< Reference< container::XNameAccess > * >(0)); +} + +sal_Bool SAL_CALL StyleFamilies::hasElements() + throw (RuntimeException) +{ + // /-- + MutexGuard aGuard( m_aMutex ); + return ! m_aStyleFamilies.empty(); + // \-- +} + +// lang::XServiceInfo + +APPHELPER_XSERVICEINFO_IMPL( StyleFamilies, C2U( "com.sun.star.comp.chart2.StyleFamilies" )) + +Sequence< OUString > StyleFamilies::getSupportedServiceNames_Static() +{ + uno::Sequence< OUString > aServices( 1 ); + aServices[ 0 ] = C2U( "com.sun.star.style.StyleFamilies" ); + + return aServices; +} + +} // namespace chart diff --git a/chart2/source/model/main/StyleFamilies.hxx b/chart2/source/model/main/StyleFamilies.hxx new file mode 100644 index 000000000..d22a9ce49 --- /dev/null +++ b/chart2/source/model/main/StyleFamilies.hxx @@ -0,0 +1,145 @@ +/************************************************************************* + * + * $RCSfile: StyleFamilies.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:31 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef CHART_STYLEFAMILIES_HXX +#define CHART_STYLEFAMILIES_HXX + +#ifndef _CPPUHELPER_IMPLBASE2_HXX_ +#include <cppuhelper/implbase2.hxx> +#endif +#ifndef _OSL_MUTEX_HXX_ +#include <osl/mutex.hxx> +#endif + +#include "ServiceMacros.hxx" + +#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_ +#include <com/sun/star/container/XNameAccess.hpp> +#endif +#ifndef _COM_SUN_STAR_CONTAINER_XINDEXACCESS_HPP_ +#include <com/sun/star/container/XIndexAccess.hpp> +#endif +#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_ +#include <com/sun/star/lang/XServiceInfo.hpp> +#endif + +#include <map> + +namespace chart +{ + +class StyleFamilies : public ::cppu::WeakImplHelper2 < + ::com::sun::star::container::XNameAccess, + ::com::sun::star::lang::XServiceInfo > +{ +public: + StyleFamilies(); + virtual ~StyleFamilies(); + + /** adds a style family. + + @param rName the name under which the family can later be accessed + through the XNameAccess. + + @param rFamily the style family object supporting the service + ::com::sun::star::style::StyleFamily. + + @return true, if the family was added. In case there already exists a + family with the name given in rName, nothing is done and false + is returned. + */ + bool AddStyleFamily( + const ::rtl::OUString & rName, + const ::com::sun::star::uno::Reference< + ::com::sun::star::container::XNameAccess > & rFamily ); + +protected: + // container::XNameAccess + // + // Note: The elements within this collection are StyleFamily instances. + // (only mandatory interface: XNameAccess) + virtual ::com::sun::star::uno::Any SAL_CALL getByName( const ::rtl::OUString& aName ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames() throw (::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException); + + // container::XIndexAccess (optional) + virtual sal_Int32 SAL_CALL getCount() throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + + // container::XElementAccess (base of XNameAccess and XIndexAccess) + virtual ::com::sun::star::uno::Type SAL_CALL getElementType() throw (::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL hasElements() throw (::com::sun::star::uno::RuntimeException); + + APPHELPER_XSERVICEINFO_DECL() + + typedef ::std::map< ::rtl::OUString, + ::com::sun::star::uno::Reference< + ::com::sun::star::container::XNameAccess > > + tStyleFamilyContainer; + +private: + tStyleFamilyContainer m_aStyleFamilies; + ::osl::Mutex m_aMutex; +}; + +} // namespace chart + +// CHART_STYLEFAMILIES_HXX +#endif diff --git a/chart2/source/model/main/StyleFamily.cxx b/chart2/source/model/main/StyleFamily.cxx new file mode 100644 index 000000000..29b246a2f --- /dev/null +++ b/chart2/source/model/main/StyleFamily.cxx @@ -0,0 +1,298 @@ +/************************************************************************* + * + * $RCSfile: StyleFamily.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:31 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "StyleFamily.hxx" +#include "macros.hxx" + +#ifndef _COM_SUN_STAR_STYLE_XSTYLE_HPP_ +#include <com/sun/star/style/XStyle.hpp> +#endif + +#include <algorithm> +#include <functional> + +using namespace ::com::sun::star; +using ::com::sun::star::uno::Reference; +using ::com::sun::star::uno::Any; +using ::com::sun::star::uno::RuntimeException; +using ::com::sun::star::uno::Sequence; +using ::rtl::OUString; +using ::osl::MutexGuard; + +namespace chart +{ + +StyleFamily::StyleFamily() +{} + +StyleFamily::~StyleFamily() +{} + +bool StyleFamily::AddStyle( + const Reference< style::XStyle > & rStyle ) +{ + bool bRet = false; + + if( rStyle.is()) + { + OUString aName( rStyle->getName() ); + m_aStyles[ aName ] = rStyle; + bRet = true; + } + + return bRet; +} + +// container::XNameAccess (also base of XNameReplace) +uno::Any SAL_CALL StyleFamily::getByName( const OUString& aName ) + throw (container::NoSuchElementException, + lang::WrappedTargetException, + RuntimeException) +{ + // /-- + MutexGuard aGuard( m_aMutex ); + + tStyleContainer::const_iterator aIt( m_aStyles.find( aName )); + if( aIt == m_aStyles.end()) + { + throw container::NoSuchElementException( + aName, + static_cast< ::cppu::OWeakObject* >( this )); + } + + OSL_ASSERT( (*aIt).first.equals( aName )); + return uno::makeAny( (*aIt).second ); + // \-- +} + +Sequence< OUString > SAL_CALL StyleFamily::getElementNames() + throw (RuntimeException) +{ + // /-- + MutexGuard aGuard( m_aMutex ); + Sequence< OUString > aResult( m_aStyles.size()); + + ::std::transform( m_aStyles.begin(), m_aStyles.end(), + aResult.getArray(), + ::std::select1st< tStyleContainer::value_type >() ); + + return aResult; + // \-- +} + +sal_Bool SAL_CALL StyleFamily::hasByName( const OUString& aName ) + throw (RuntimeException) +{ + // /-- + MutexGuard aGuard( m_aMutex ); + + return ( m_aStyles.find( aName ) != m_aStyles.end() ); + // \-- +} + + +// container::XNameContainer (optional) +void SAL_CALL StyleFamily::insertByName( const OUString& aName, const uno::Any& aElement ) + throw (lang::IllegalArgumentException, + container::ElementExistException, + lang::WrappedTargetException, + RuntimeException) +{ + uno::Reference< style::XStyle > xStyle; + if( aElement >>= xStyle ) + { + // /-- + MutexGuard aGuard( m_aMutex ); + if( m_aStyles.find( aName ) != m_aStyles.end() ) + { + throw container::ElementExistException( + aName, + static_cast< ::cppu::OWeakObject* >( this ) ); + } + + m_aStyles[ aName ] = xStyle; + // \-- + } + else + { + throw lang::IllegalArgumentException( + aName, + static_cast< ::cppu::OWeakObject* >( this ), + 1 /* index */ ); + } +} + +void SAL_CALL StyleFamily::removeByName( const OUString& Name ) + throw (container::NoSuchElementException, + lang::WrappedTargetException, + RuntimeException) +{ + // /-- + MutexGuard aGuard( m_aMutex ); + tStyleContainer::iterator aIt( m_aStyles.find( Name )); + if( aIt == m_aStyles.end()) + { + throw container::NoSuchElementException( + Name, + static_cast< ::cppu::OWeakObject* >( this ) ); + } + + m_aStyles.erase( aIt ); + // \-- +} + + +// container::XIndexAccess (optional) +sal_Int32 SAL_CALL StyleFamily::getCount() + throw (RuntimeException) +{ + // /-- + MutexGuard aGuard( m_aMutex ); + return m_aStyles.size(); + // \-- +} + +uno::Any SAL_CALL StyleFamily::getByIndex( sal_Int32 Index ) + throw (lang::IndexOutOfBoundsException, + lang::WrappedTargetException, + RuntimeException) +{ + // /-- + MutexGuard aGuard( m_aMutex ); + tStyleContainer::const_iterator aIt( m_aStyles.begin()); + sal_Int32 nCounter = 0; + for( ; + ( nCounter < Index ) && ( aIt != m_aStyles.end()); + ++nCounter, ++aIt ); + + if( aIt == m_aStyles.end()) + { + throw container::NoSuchElementException( + OUString::valueOf( Index ), + static_cast< ::cppu::OWeakObject* >( this )); + } + + return uno::makeAny( (*aIt).second ); + // \-- +} + + +// container::XElementAccess (base of XNameAccess and XIndexAccess) +uno::Type SAL_CALL StyleFamily::getElementType() + throw (RuntimeException) +{ + return ::getCppuType( reinterpret_cast< Reference< style::XStyle > * >(0)); +} + +sal_Bool SAL_CALL StyleFamily::hasElements() + throw (RuntimeException) +{ + // /-- + MutexGuard aGuard( m_aMutex ); + return ! m_aStyles.empty(); + // \-- +} + + +// container::XNameReplace +void SAL_CALL StyleFamily::replaceByName( const OUString& aName, const uno::Any& aElement ) + throw (lang::IllegalArgumentException, + container::NoSuchElementException, + lang::WrappedTargetException, + RuntimeException) +{ + uno::Reference< style::XStyle > xStyle; + if( aElement >>= xStyle ) + { + // /-- + MutexGuard aGuard( m_aMutex ); + tStyleContainer::const_iterator aIt( m_aStyles.begin()); + if( aIt == m_aStyles.end()) + { + throw container::NoSuchElementException( + aName, + static_cast< ::cppu::OWeakObject* >( this ) ); + } + + m_aStyles[ aName ] = xStyle; + // \-- + } + else + { + throw lang::IllegalArgumentException( + aName, + static_cast< ::cppu::OWeakObject* >( this ), + 1 /* index */ ); + } +} + +// lang::XServiceInfo + +APPHELPER_XSERVICEINFO_IMPL( StyleFamily, C2U( "com.sun.star.comp.chart2.StyleFamily" )) + +Sequence< OUString > StyleFamily::getSupportedServiceNames_Static() +{ + uno::Sequence< OUString > aServices( 1 ); + aServices[ 0 ] = C2U( "com.sun.star.style.StyleFamily" ); + + return aServices; +} + +} // namespace chart diff --git a/chart2/source/model/main/StyleFamily.hxx b/chart2/source/model/main/StyleFamily.hxx new file mode 100644 index 000000000..4531bce34 --- /dev/null +++ b/chart2/source/model/main/StyleFamily.hxx @@ -0,0 +1,159 @@ +/************************************************************************* + * + * $RCSfile: StyleFamily.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:31 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef CHART_STYLEFAMILY_HXX +#define CHART_STYLEFAMILY_HXX + +#ifndef _CPPUHELPER_IMPLBASE3_HXX_ +#include <cppuhelper/implbase3.hxx> +#endif +#ifndef _OSL_MUTEX_HXX_ +#include <osl/mutex.hxx> +#endif + +#include "ServiceMacros.hxx" + +#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_ +#include <com/sun/star/container/XNameAccess.hpp> +#endif +#ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_ +#include <com/sun/star/container/XNameContainer.hpp> +#endif +#ifndef _COM_SUN_STAR_CONTAINER_XINDEXACCESS_HPP_ +#include <com/sun/star/container/XIndexAccess.hpp> +#endif +#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_ +#include <com/sun/star/lang/XServiceInfo.hpp> +#endif + +#include <map> + +namespace com { namespace sun { namespace star { + namespace style { + class XStyle; + } +}}} + +namespace chart +{ + +class StyleFamily : public + ::cppu::WeakImplHelper3< + ::com::sun::star::container::XNameContainer, + ::com::sun::star::container::XIndexAccess, + ::com::sun::star::lang::XServiceInfo + > +{ +public: + StyleFamily(); + virtual ~StyleFamily(); + + /** adds a style. + + @param rStyle the style object supporting the service + ::com::sun::star::style::Style. The name under which this object + can be accessed through XNameAccess is the one you get from + XNamed::getName() (XNamed is a base interface for XStyle.) + + @return true, if the style was added. In case there already exists a + style with the name given in getName(), nothing is done and + false is returned. + */ + bool AddStyle( const ::com::sun::star::uno::Reference< + ::com::sun::star::style::XStyle > & rStyle ); + +protected: + + // container::XNameAccess (also base of XNameReplace) + virtual ::com::sun::star::uno::Any SAL_CALL getByName( const ::rtl::OUString& aName ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames() throw (::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException); + + // container::XNameContainer (optional, base of XNameReplace) + virtual void SAL_CALL insertByName( const ::rtl::OUString& aName, const ::com::sun::star::uno::Any& aElement ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::ElementExistException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeByName( const ::rtl::OUString& Name ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + + // container::XIndexAccess (optional) + virtual sal_Int32 SAL_CALL getCount() throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + + // container::XElementAccess (base of XNameAccess and XIndexAccess) + virtual ::com::sun::star::uno::Type SAL_CALL getElementType() throw (::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL hasElements() throw (::com::sun::star::uno::RuntimeException); + + // container::XNameReplace (base of XNameAccess) + virtual void SAL_CALL replaceByName( const ::rtl::OUString& aName, const ::com::sun::star::uno::Any& aElement ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + + APPHELPER_XSERVICEINFO_DECL() + + typedef ::std::map< ::rtl::OUString, + ::com::sun::star::uno::Reference< + ::com::sun::star::style::XStyle > > + tStyleContainer; + +private: + tStyleContainer m_aStyles; + ::osl::Mutex m_aMutex; +}; + +} // namespace chart + +// CHART_STYLEFAMILY_HXX +#endif diff --git a/chart2/source/model/main/Title.cxx b/chart2/source/model/main/Title.cxx new file mode 100644 index 000000000..a449346f8 --- /dev/null +++ b/chart2/source/model/main/Title.cxx @@ -0,0 +1,393 @@ +/************************************************************************* + * + * $RCSfile: Title.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:31 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "Title.hxx" +#include "macros.hxx" +#include "algohelper.hxx" +#include "FormattedString.hxx" +#include "LineProperties.hxx" +#include "FillProperties.hxx" + +#ifndef CHART_PROPERTYHELPER_HXX +#include "PropertyHelper.hxx" +#endif +#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HPP_ +#include <com/sun/star/beans/PropertyAttribute.hpp> +#endif + +#ifndef _COM_SUN_STAR_STYLE_PARAGRAPHADJUST_HPP_ +#include <com/sun/star/style/ParagraphAdjust.hpp> +#endif +#ifndef _COM_SUN_STAR_DRAWING_FILLSTYLE_HPP_ +#include <com/sun/star/drawing/FillStyle.hpp> +#endif +#ifndef _COM_SUN_STAR_DRAWING_LINESTYLE_HPP_ +#include <com/sun/star/drawing/LineStyle.hpp> +#endif + +#ifndef _RTL_UUID_H_ +#include <rtl/uuid.h> +#endif +#ifndef _CPPUHELPER_QUERYINTERFACE_HXX_ +#include <cppuhelper/queryinterface.hxx> +#endif + +#include <vector> +#include <algorithm> + +using namespace ::com::sun::star; +using namespace ::com::sun::star::beans::PropertyAttribute; +using namespace ::drafts::com::sun::star; + +using ::com::sun::star::beans::Property; +using ::osl::MutexGuard; + +namespace +{ + +static const ::rtl::OUString lcl_aServiceName( + RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.chart2.Title" )); + +enum +{ + PROP_TITLE_PARA_ADJUST, + PROP_TITLE_PARA_LAST_LINE_ADJUST, + PROP_TITLE_PARA_LEFT_MARGIN, + PROP_TITLE_PARA_RIGHT_MARGIN, + PROP_TITLE_PARA_TOP_MARGIN, + PROP_TITLE_PARA_BOTTOM_MARGIN, + PROP_TITLE_PARA_IS_HYPHENATION, + + PROP_TITLE_TEXT_ROTATION, + PROP_TITLE_TEXT_STACKED +}; + +void lcl_AddPropertiesToVector( + ::std::vector< Property > & rOutProperties ) +{ + rOutProperties.push_back( + Property( C2U( "ParaAdjust" ), + PROP_TITLE_PARA_ADJUST, + ::getCppuType( reinterpret_cast< ::com::sun::star::style::ParagraphAdjust * >(0)), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEDEFAULT )); + + rOutProperties.push_back( + Property( C2U( "ParaLastLineAdjust" ), + PROP_TITLE_PARA_LAST_LINE_ADJUST, + ::getCppuType( reinterpret_cast< sal_Int16 * >(0)), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEDEFAULT )); + + rOutProperties.push_back( + Property( C2U( "ParaLeftMargin" ), + PROP_TITLE_PARA_LEFT_MARGIN, + ::getCppuType( reinterpret_cast< sal_Int32 * >(0)), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEDEFAULT )); + + rOutProperties.push_back( + Property( C2U( "ParaRightMargin" ), + PROP_TITLE_PARA_RIGHT_MARGIN, + ::getCppuType( reinterpret_cast< sal_Int32 * >(0)), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEDEFAULT )); + + rOutProperties.push_back( + Property( C2U( "ParaTopMargin" ), + PROP_TITLE_PARA_TOP_MARGIN, + ::getCppuType( reinterpret_cast< sal_Int32 * >(0)), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEDEFAULT )); + + rOutProperties.push_back( + Property( C2U( "ParaBottomMargin" ), + PROP_TITLE_PARA_BOTTOM_MARGIN, + ::getCppuType( reinterpret_cast< sal_Int32 * >(0)), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEDEFAULT )); + + rOutProperties.push_back( + Property( C2U( "ParaIsHyphenation" ), + PROP_TITLE_PARA_IS_HYPHENATION, + ::getBooleanCppuType(), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEDEFAULT )); + + rOutProperties.push_back( + Property( C2U( "TextRotation" ), + PROP_TITLE_TEXT_ROTATION, + ::getCppuType( reinterpret_cast< const double * >(0)), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEDEFAULT )); + rOutProperties.push_back( + Property( C2U( "StackCharacters" ), + PROP_TITLE_TEXT_STACKED, + ::getBooleanCppuType(), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEDEFAULT )); +} + +void lcl_AddDefaultsToMap( + ::chart::helper::tPropertyValueMap & rOutMap ) +{ + // ParagraphProperties + OSL_ASSERT( rOutMap.end() == rOutMap.find( PROP_TITLE_PARA_ADJUST )); + rOutMap[ PROP_TITLE_PARA_ADJUST ] = + uno::makeAny( ::com::sun::star::style::ParagraphAdjust_CENTER ); + // PROP_TITLE_PARA_LAST_LINE_ADJUST + + OSL_ASSERT( rOutMap.end() == rOutMap.find( PROP_TITLE_PARA_LEFT_MARGIN )); + rOutMap[ PROP_TITLE_PARA_LEFT_MARGIN ] = + uno::makeAny( sal_Int32( 0 )); + OSL_ASSERT( rOutMap.end() == rOutMap.find( PROP_TITLE_PARA_RIGHT_MARGIN )); + rOutMap[ PROP_TITLE_PARA_RIGHT_MARGIN ] = + uno::makeAny( sal_Int32( 0 )); + OSL_ASSERT( rOutMap.end() == rOutMap.find( PROP_TITLE_PARA_TOP_MARGIN )); + rOutMap[ PROP_TITLE_PARA_TOP_MARGIN ] = + uno::makeAny( sal_Int32( 0 )); + OSL_ASSERT( rOutMap.end() == rOutMap.find( PROP_TITLE_PARA_BOTTOM_MARGIN )); + rOutMap[ PROP_TITLE_PARA_BOTTOM_MARGIN ] = + uno::makeAny( sal_Int32( 0 )); + + OSL_ASSERT( rOutMap.end() == rOutMap.find( PROP_TITLE_PARA_IS_HYPHENATION )); + rOutMap[ PROP_TITLE_PARA_IS_HYPHENATION ] = + uno::makeAny( sal_True ); + + // own properties + OSL_ASSERT( rOutMap.end() == rOutMap.find( PROP_TITLE_TEXT_ROTATION )); + rOutMap[ PROP_TITLE_TEXT_ROTATION ] = + uno::makeAny( double( 0.0 ) ); + OSL_ASSERT( rOutMap.end() == rOutMap.find( PROP_TITLE_TEXT_STACKED )); + rOutMap[ PROP_TITLE_TEXT_STACKED ] = + uno::makeAny( sal_Bool( sal_False ) ); + + // override other defaults + rOutMap[ ::chart::FillProperties::PROP_FILL_STYLE ] = + uno::makeAny( drawing::FillStyle_NONE ); + rOutMap[ ::chart::LineProperties::PROP_LINE_STYLE ] = + uno::makeAny( drawing::LineStyle_NONE ); +} + +const uno::Sequence< Property > & lcl_GetPropertySequence() +{ + static uno::Sequence< Property > aPropSeq; + + // /-- + MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); + if( 0 == aPropSeq.getLength() ) + { + // get properties + ::std::vector< ::com::sun::star::beans::Property > aProperties; + lcl_AddPropertiesToVector( aProperties ); + ::chart::LineProperties::AddPropertiesToVector( + aProperties, /* bIncludeStyleProperties = */ true ); + ::chart::FillProperties::AddPropertiesToVector( + aProperties, /* bIncludeStyleProperties = */ true ); + + // and sort them for access via bsearch + ::std::sort( aProperties.begin(), aProperties.end(), + ::chart::helper::PropertyNameLess() ); + + // transfer result to static Sequence + aPropSeq = ::chart::helper::VectorToSequence( aProperties ); + } + + return aPropSeq; +} + +::cppu::IPropertyArrayHelper & lcl_getInfoHelper() +{ + static ::cppu::OPropertyArrayHelper aArrayHelper( + lcl_GetPropertySequence(), + /* bSorted = */ sal_True ); + + return aArrayHelper; +} + +} // anonymous namespace + +// ================================================================================ + +namespace chart +{ + +Title::Title( uno::Reference< uno::XComponentContext > const & xContext ) : + ::property::OPropertySet( m_aMutex ) +{ + if( ! ( xContext->getValueByName( C2U( "Identifier" )) >>= m_aIdentifier )) + { + OSL_ENSURE( false, "Missing Title identifier" ); + } +} + +Title::~Title() +{} + +// -------------------------------------------------------------------------------- + +// ____ XTitle ____ +uno::Sequence< uno::Reference< chart2::XFormattedString > > SAL_CALL Title::getText() + throw (uno::RuntimeException) +{ + // /-- + MutexGuard aGuard( GetMutex() ); + return m_aStrings; + // \-- +} + +void SAL_CALL Title::setText( const uno::Sequence< uno::Reference< chart2::XFormattedString > >& Strings ) + throw (uno::RuntimeException) +{ + // /-- + MutexGuard aGuard( GetMutex() ); + m_aStrings = Strings; + // \-- +} + +// ____ XIdentifiable ____ +::rtl::OUString SAL_CALL Title::getIdentifier() + throw (uno::RuntimeException) +{ + return m_aIdentifier; +} + +// ================================================================================ + +// ____ OPropertySet ____ +uno::Any Title::GetDefaultValue( sal_Int32 nHandle ) const + throw(beans::UnknownPropertyException) +{ + static helper::tPropertyValueMap aStaticDefaults; + + // /-- + ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); + if( 0 == aStaticDefaults.size() ) + { + LineProperties::AddDefaultsToMap( + aStaticDefaults, + /* bIncludeStyleProperties = */ true ); + FillProperties::AddDefaultsToMap( + aStaticDefaults, + /* bIncludeStyleProperties = */ true ); + + // initialize defaults + // Note: this should be last to override defaults of the previously + // added defaults + lcl_AddDefaultsToMap( aStaticDefaults ); + } + + helper::tPropertyValueMap::const_iterator aFound( + aStaticDefaults.find( nHandle )); + + if( aFound == aStaticDefaults.end()) + return uno::Any(); + + return (*aFound).second; + // \-- +} + +::cppu::IPropertyArrayHelper & SAL_CALL Title::getInfoHelper() +{ + return lcl_getInfoHelper(); +} + + +// ____ XPropertySet ____ +uno::Reference< beans::XPropertySetInfo > SAL_CALL + Title::getPropertySetInfo() + throw (uno::RuntimeException) +{ + static uno::Reference< beans::XPropertySetInfo > xInfo; + + // /-- + MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); + if( !xInfo.is()) + { + xInfo = ::cppu::OPropertySetHelper::createPropertySetInfo( + getInfoHelper()); + } + + return xInfo; + // \-- +} + +// ================================================================================ + +uno::Sequence< ::rtl::OUString > Title::getSupportedServiceNames_Static() +{ + uno::Sequence< ::rtl::OUString > aServices( 4 ); + aServices[ 0 ] = C2U( "drafts.com.sun.star.chart2.Title" ); + aServices[ 1 ] = C2U( "com.sun.star.style.ParagraphProperties" ); + aServices[ 2 ] = C2U( "com.sun.star.beans.PropertySet" ); + aServices[ 3 ] = C2U( "drafts.com.sun.star.layout.LayoutElement" ); + return aServices; +} + +// implement XServiceInfo methods basing upon getSupportedServiceNames_Static +APPHELPER_XSERVICEINFO_IMPL( Title, lcl_aServiceName ); + +// needed by MSC compiler +using impl::Title_Base; + +IMPLEMENT_FORWARD_XINTERFACE2( Title, Title_Base, ::property::OPropertySet ) +IMPLEMENT_FORWARD_XTYPEPROVIDER2( Title, Title_Base, ::property::OPropertySet ) + +} // namespace chart diff --git a/chart2/source/model/main/Title.hxx b/chart2/source/model/main/Title.hxx new file mode 100644 index 000000000..af6bbd4a2 --- /dev/null +++ b/chart2/source/model/main/Title.hxx @@ -0,0 +1,177 @@ +/************************************************************************* + * + * $RCSfile: Title.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:31 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef CHART_TITLE_HXX +#define CHART_TITLE_HXX + +#include "ServiceMacros.hxx" + +#ifndef CHART_OPROPERTYSET_HXX +#include "OPropertySet.hxx" +#endif +#ifndef CHART_MUTEXCONTAINER_HXX +#include "MutexContainer.hxx" +#endif +#ifndef _CPPUHELPER_IMPLBASE4_HXX_ +#include <cppuhelper/implbase4.hxx> +#endif +#ifndef _COMPHELPER_UNO3_HXX_ +#include <comphelper/uno3.hxx> +#endif + +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XTITLE_HPP_ +#include <drafts/com/sun/star/chart2/XTitle.hpp> +#endif +#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_ +#include <com/sun/star/lang/XServiceInfo.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XIDENTIFIABLE_HPP_ +#include <drafts/com/sun/star/chart2/XIdentifiable.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_LAYOUT_XLAYOUTELEMENT_HPP_ +#include <drafts/com/sun/star/layout/XLayoutElement.hpp> +#endif +#ifndef _COM_SUN_STAR_UNO_XCOMPONENTCONTEXT_HPP_ +#include <com/sun/star/uno/XComponentContext.hpp> +#endif + +namespace chart +{ + +namespace impl +{ +typedef ::cppu::WeakImplHelper4< + ::drafts::com::sun::star::chart2::XTitle, + ::com::sun::star::lang::XServiceInfo, + ::drafts::com::sun::star::chart2::XIdentifiable, + ::drafts::com::sun::star::layout::XLayoutElement > + Title_Base; +} + +class Title : + public helper::MutexContainer, + public impl::Title_Base, + public ::property::OPropertySet +{ +public: + Title( ::com::sun::star::uno::Reference< + ::com::sun::star::uno::XComponentContext > const & xContext ); + virtual ~Title(); + + /// establish methods for factory instatiation + APPHELPER_SERVICE_FACTORY_HELPER( Title ) + + /// XServiceInfo declarations + APPHELPER_XSERVICEINFO_DECL() + + /// merge XInterface implementations + DECLARE_XINTERFACE() + /// merge XTypeProvider implementations + DECLARE_XTYPEPROVIDER() + +protected: + // ____ OPropertySet ____ + virtual ::com::sun::star::uno::Any GetDefaultValue( sal_Int32 nHandle ) const + throw(::com::sun::star::beans::UnknownPropertyException); + + // ____ OPropertySet ____ + virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper(); + + // ____ XPropertySet ____ + virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL + getPropertySetInfo() + throw (::com::sun::star::uno::RuntimeException); + +// virtual sal_Bool SAL_CALL convertFastPropertyValue +// ( ::com::sun::star::uno::Any & rConvertedValue, +// ::com::sun::star::uno::Any & rOldValue, +// sal_Int32 nHandle, +// const ::com::sun::star::uno::Any& rValue ) +// throw (::com::sun::star::lang::IllegalArgumentException); + + // ____ XTitle ____ + virtual ::com::sun::star::uno::Sequence< + ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XFormattedString > > SAL_CALL getText() + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setText( const ::com::sun::star::uno::Sequence< + ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XFormattedString > >& Strings ) + throw (::com::sun::star::uno::RuntimeException); + + // ____ XIdentifiable ____ + virtual ::rtl::OUString SAL_CALL getIdentifier() + throw (::com::sun::star::uno::RuntimeException); + + // ____ XLayoutElement ____ + // (empty) + +private: + ::rtl::OUString m_aIdentifier; + + ::com::sun::star::uno::Sequence< + ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XFormattedString > > m_aStrings; +}; + +} // namespace chart + +// CHART_TITLE_HXX +#endif diff --git a/chart2/source/model/main/Wall.cxx b/chart2/source/model/main/Wall.cxx new file mode 100644 index 000000000..4de963bd7 --- /dev/null +++ b/chart2/source/model/main/Wall.cxx @@ -0,0 +1,256 @@ +/************************************************************************* + * + * $RCSfile: Wall.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:31 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "Wall.hxx" +#include "macros.hxx" +#include "algohelper.hxx" +#include "LineProperties.hxx" +#include "FillProperties.hxx" +#include "UserDefinedProperties.hxx" + +#ifndef CHART_PROPERTYHELPER_HXX +#include "PropertyHelper.hxx" +#endif +#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HPP_ +#include <com/sun/star/beans/PropertyAttribute.hpp> +#endif + +#ifndef _COM_SUN_STAR_DRAWING_FILLSTYLE_HPP_ +#include <com/sun/star/drawing/FillStyle.hpp> +#endif +#ifndef _COM_SUN_STAR_AWT_GRADIENT_HPP_ +#include <com/sun/star/awt/Gradient.hpp> +#endif +#ifndef _COM_SUN_STAR_DRAWING_HATCH_HPP_ +#include <com/sun/star/drawing/Hatch.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_TRANSPARENCYSTYLE_HPP_ +#include <drafts/com/sun/star/chart2/TransparencyStyle.hpp> +#endif +#ifndef _COM_SUN_STAR_DRAWING_LINESTYLE_HPP_ +#include <com/sun/star/drawing/LineStyle.hpp> +#endif +#ifndef _COM_SUN_STAR_DRAWING_LINEDASH_HPP_ +#include <com/sun/star/drawing/LineDash.hpp> +#endif +#ifndef _COM_SUN_STAR_DRAWING_LINEJOINT_HPP_ +#include <com/sun/star/drawing/LineJoint.hpp> +#endif + +#ifndef _RTL_UUID_H_ +#include <rtl/uuid.h> +#endif +#ifndef _CPPUHELPER_QUERYINTERFACE_HXX_ +#include <cppuhelper/queryinterface.hxx> +#endif + +#include <vector> +#include <algorithm> + +using namespace ::com::sun::star; +using namespace ::com::sun::star::beans::PropertyAttribute; +using namespace ::drafts::com::sun::star; + +using ::com::sun::star::beans::Property; +using ::osl::MutexGuard; + +namespace +{ + +static const ::rtl::OUString lcl_aServiceName( + RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.chart2.Wall" )); + +const uno::Sequence< Property > & lcl_GetPropertySequence() +{ + static uno::Sequence< Property > aPropSeq; + + // /-- + MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); + if( 0 == aPropSeq.getLength() ) + { + // get properties + ::std::vector< ::com::sun::star::beans::Property > aProperties; + ::chart::LineProperties::AddPropertiesToVector( + aProperties, /* bIncludeStyleProperties = */ true ); + ::chart::FillProperties::AddPropertiesToVector( + aProperties, /* bIncludeStyleProperties = */ true ); + ::chart::UserDefinedProperties::AddPropertiesToVector( aProperties ); + + // and sort them for access via bsearch + ::std::sort( aProperties.begin(), aProperties.end(), + ::chart::helper::PropertyNameLess() ); + + // transfer result to static Sequence + aPropSeq = ::chart::helper::VectorToSequence( aProperties ); + } + + return aPropSeq; +} + +::cppu::IPropertyArrayHelper & lcl_getInfoHelper() +{ + static ::cppu::OPropertyArrayHelper aArrayHelper( + lcl_GetPropertySequence(), + /* bSorted = */ sal_True ); + + return aArrayHelper; +} + +} // anonymous namespace + +// ================================================================================ + +namespace chart +{ + +Wall::Wall() : + ::property::OPropertySet( m_aMutex ) +{} + +Wall::~Wall() +{} + +// ================================================================================ + +// ____ OPropertySet ____ +uno::Any Wall::GetDefaultValue( sal_Int32 nHandle ) const + throw(beans::UnknownPropertyException) +{ + static helper::tPropertyValueMap aStaticDefaults; + + // /-- + ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); + if( 0 == aStaticDefaults.size() ) + { + // initialize defaults + LineProperties::AddDefaultsToMap( + aStaticDefaults, + /* bIncludeStyleProperties = */ true ); + FillProperties::AddDefaultsToMap( + aStaticDefaults, + /* bIncludeStyleProperties = */ true ); + } + + helper::tPropertyValueMap::const_iterator aFound( + aStaticDefaults.find( nHandle )); + + if( aFound == aStaticDefaults.end()) + return uno::Any(); + + return (*aFound).second; + // \-- +} + +::cppu::IPropertyArrayHelper & SAL_CALL Wall::getInfoHelper() +{ + return lcl_getInfoHelper(); +} + + +// ____ XPropertySet ____ +uno::Reference< beans::XPropertySetInfo > SAL_CALL + Wall::getPropertySetInfo() + throw (uno::RuntimeException) +{ + static uno::Reference< beans::XPropertySetInfo > xInfo; + + // /-- + MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); + if( !xInfo.is()) + { + xInfo = ::cppu::OPropertySetHelper::createPropertySetInfo( + getInfoHelper()); + } + + return xInfo; + // \-- +} + +// ____ XInterface ____ +uno::Any SAL_CALL Wall::queryInterface( const uno::Type& aType ) + throw (uno::RuntimeException) +{ + return ::cppu::OWeakObject::queryInterface( aType ); +} + +void SAL_CALL Wall::acquire() throw () +{ + ::cppu::OWeakObject::acquire(); +} + +void SAL_CALL Wall::release() throw () +{ + ::cppu::OWeakObject::release(); +} + +// ================================================================================ + +uno::Sequence< ::rtl::OUString > Wall::getSupportedServiceNames_Static() +{ + uno::Sequence< ::rtl::OUString > aServices( 2 ); + aServices[ 0 ] = C2U( "drafts.com.sun.star.chart2.Wall" ); + aServices[ 1 ] = C2U( "com.sun.star.beans.PropertySet" ); + return aServices; +} + +// implement XServiceInfo methods basing upon getSupportedServiceNames_Static +APPHELPER_XSERVICEINFO_IMPL( Wall, lcl_aServiceName ); + +} // namespace chart diff --git a/chart2/source/model/main/Wall.hxx b/chart2/source/model/main/Wall.hxx new file mode 100644 index 000000000..63aab0f1e --- /dev/null +++ b/chart2/source/model/main/Wall.hxx @@ -0,0 +1,131 @@ +/************************************************************************* + * + * $RCSfile: Wall.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:31 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef CHART_WALL_HXX +#define CHART_WALL_HXX + +// #ifndef _COM_SUN_STAR_UNO_XCOMPONENTCONTEXT_HPP_ +// #include <com/sun/star/uno/XComponentContext.hpp> +// #endif + +#ifndef CHART_MUTEXCONTAINER_HXX +#include "MutexContainer.hxx" +#endif + +#ifndef CHART_OPROPERTYSET_HXX +#include "OPropertySet.hxx" +#endif +#ifndef _CPPUHELPER_WEAK_HXX_ +#include <cppuhelper/weak.hxx> +#endif + +#include "ServiceMacros.hxx" + +#ifndef _COMPHELPER_UNO3_HXX_ +#include <comphelper/uno3.hxx> +#endif + +namespace chart +{ + +class Wall : + public helper::MutexContainer, + public ::property::OPropertySet, + public ::cppu::OWeakObject +{ +public: + Wall(); +// Wall( ::com::sun::star::uno::Reference< +// ::com::sun::star::uno::XComponentContext > const & xContext ); + virtual ~Wall(); + + /// XServiceInfo declarations + APPHELPER_XSERVICEINFO_DECL() + + /// merge XInterface implementations + DECLARE_XINTERFACE() + +protected: + // ____ OPropertySet ____ + virtual ::com::sun::star::uno::Any GetDefaultValue( sal_Int32 nHandle ) const + throw(::com::sun::star::beans::UnknownPropertyException); + + // ____ OPropertySet ____ + virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper(); + + // ____ XPropertySet ____ + virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL + getPropertySetInfo() + throw (::com::sun::star::uno::RuntimeException); + +// virtual sal_Bool SAL_CALL convertFastPropertyValue +// ( ::com::sun::star::uno::Any & rConvertedValue, +// ::com::sun::star::uno::Any & rOldValue, +// sal_Int32 nHandle, +// const ::com::sun::star::uno::Any& rValue ) +// throw (::com::sun::star::lang::IllegalArgumentException); + +private: +}; + +} // namespace chart + +// CHART_WALL_HXX +#endif diff --git a/chart2/source/model/main/_serviceregistration_model.cxx b/chart2/source/model/main/_serviceregistration_model.cxx new file mode 100644 index 000000000..853cd7ede --- /dev/null +++ b/chart2/source/model/main/_serviceregistration_model.cxx @@ -0,0 +1,265 @@ +/************************************************************************* + * + * $RCSfile: _serviceregistration_model.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:31 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef _CPPUHELPER_IMPLEMENATIONENTRY_HXX_ +#include <cppuhelper/implementationentry.hxx> +#endif +#ifndef _CHARTMODEL_HXX +#include "ChartModel.hxx" +#endif +#ifndef CHART_FILEDATAPROVIDER_HXX +#include "FileDataProvider.hxx" +#endif +#ifndef CHART_FILEDATASOURCE_HXX +#include "FileDataSource.hxx" +#endif + +#include "Diagram.hxx" +#include "Legend.hxx" +#include "Axis.hxx" +#include "Grid.hxx" +#include "Title.hxx" +#include "FormattedString.hxx" + +#include "DataSeriesTree.hxx" +#include "ChartTypeGroup.hxx" +#include "ContinuousScaleGroup.hxx" +#include "DiscreteScaleGroup.hxx" + +#include "ChartTypeManager.hxx" +// #include "BoundedCoordinateSystem.hxx" +#include "Scale.hxx" + +static struct ::cppu::ImplementationEntry g_entries_chart2_model[] = +{ + { + ::chart::ChartModel::create + , ::chart::ChartModel::getImplementationName_Static + , ::chart::ChartModel::getSupportedServiceNames_Static + , ::cppu::createSingleComponentFactory + , 0 + , 0 + } + ,{ + ::chart::FileDataProvider::create + , ::chart::FileDataProvider::getImplementationName_Static + , ::chart::FileDataProvider::getSupportedServiceNames_Static + , ::cppu::createSingleComponentFactory + , 0 + , 0 + } + ,{ + ::chart::FileDataSource::create + , ::chart::FileDataSource::getImplementationName_Static + , ::chart::FileDataSource::getSupportedServiceNames_Static + , ::cppu::createSingleComponentFactory + , 0 + , 0 + } + ,{ + ::chart::Diagram::create + , ::chart::Diagram::getImplementationName_Static + , ::chart::Diagram::getSupportedServiceNames_Static + , ::cppu::createSingleComponentFactory + , 0 + , 0 + } + ,{ + ::chart::Legend::create + , ::chart::Legend::getImplementationName_Static + , ::chart::Legend::getSupportedServiceNames_Static + , ::cppu::createSingleComponentFactory + , 0 + , 0 + } + ,{ + ::chart::Axis::create + , ::chart::Axis::getImplementationName_Static + , ::chart::Axis::getSupportedServiceNames_Static + , ::cppu::createSingleComponentFactory + , 0 + , 0 + } + ,{ + ::chart::Grid::create + , ::chart::Grid::getImplementationName_Static + , ::chart::Grid::getSupportedServiceNames_Static + , ::cppu::createSingleComponentFactory + , 0 + , 0 + } + ,{ + ::chart::Title::create + , ::chart::Title::getImplementationName_Static + , ::chart::Title::getSupportedServiceNames_Static + , ::cppu::createSingleComponentFactory + , 0 + , 0 + } + + ,{ + ::chart::FormattedString::create + , ::chart::FormattedString::getImplementationName_Static + , ::chart::FormattedString::getSupportedServiceNames_Static + , ::cppu::createSingleComponentFactory + , 0 + , 0 + } + + ,{ + ::chart::DataSeriesTree::create + , ::chart::DataSeriesTree::getImplementationName_Static + , ::chart::DataSeriesTree::getSupportedServiceNames_Static + , ::cppu::createSingleComponentFactory + , 0 + , 0 + } + ,{ + ::chart::ChartTypeGroup::create + , ::chart::ChartTypeGroup::getImplementationName_Static + , ::chart::ChartTypeGroup::getSupportedServiceNames_Static + , ::cppu::createSingleComponentFactory + , 0 + , 0 + } + ,{ + ::chart::ContinuousScaleGroup::create + , ::chart::ContinuousScaleGroup::getImplementationName_Static + , ::chart::ContinuousScaleGroup::getSupportedServiceNames_Static + , ::cppu::createSingleComponentFactory + , 0 + , 0 + } + ,{ + ::chart::DiscreteScaleGroup::create + , ::chart::DiscreteScaleGroup::getImplementationName_Static + , ::chart::DiscreteScaleGroup::getSupportedServiceNames_Static + , ::cppu::createSingleComponentFactory + , 0 + , 0 + } + ,{ + ::chart::ContinuousStackableScaleGroup::create + , ::chart::ContinuousStackableScaleGroup::getImplementationName_Static + , ::chart::ContinuousStackableScaleGroup::getSupportedServiceNames_Static + , ::cppu::createSingleComponentFactory + , 0 + , 0 + } + ,{ + ::chart::DiscreteStackableScaleGroup::create + , ::chart::DiscreteStackableScaleGroup::getImplementationName_Static + , ::chart::DiscreteStackableScaleGroup::getSupportedServiceNames_Static + , ::cppu::createSingleComponentFactory + , 0 + , 0 + } + ,{ + ::chart::ChartTypeManager::create + , ::chart::ChartTypeManager::getImplementationName_Static + , ::chart::ChartTypeManager::getSupportedServiceNames_Static + , ::cppu::createSingleComponentFactory + , 0 + , 0 + } +// ,{ +// ::chart::BoundedCoordinateSystem::create +// , ::chart::BoundedCoordinateSystem::getImplementationName_Static +// , ::chart::BoundedCoordinateSystem::getSupportedServiceNames_Static +// , ::cppu::createSingleComponentFactory +// , 0 +// , 0 +// } + ,{ + ::chart::Scale::create + , ::chart::Scale::getImplementationName_Static + , ::chart::Scale::getSupportedServiceNames_Static + , ::cppu::createSingleComponentFactory + , 0 + , 0 + } + ,{ 0, 0, 0, 0, 0, 0 } +}; + +// component exports +extern "C" +{ +//================================================================================================== +void SAL_CALL component_getImplementationEnvironment( + const sal_Char ** ppEnvTypeName, uno_Environment ** ppEnv ) +{ + *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; +} +//================================================================================================== +sal_Bool SAL_CALL component_writeInfo( + void * pServiceManager, void * pRegistryKey ) +{ + return ::cppu::component_writeInfoHelper( + pServiceManager, pRegistryKey, g_entries_chart2_model ); +} +//================================================================================================== +void * SAL_CALL component_getFactory( + const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey ) +{ + return ::cppu::component_getFactoryHelper( + pImplName, pServiceManager, pRegistryKey , g_entries_chart2_model ); +} +} +//========================================================================= diff --git a/chart2/source/model/main/makefile.mk b/chart2/source/model/main/makefile.mk new file mode 100644 index 000000000..35b7c0eb3 --- /dev/null +++ b/chart2/source/model/main/makefile.mk @@ -0,0 +1,116 @@ +#************************************************************************* +# +# $RCSfile: makefile.mk,v $ +# +# $Revision: 1.1.1.1 $ +# +# last change: $Author: bm $ $Date: 2003-10-06 09:58:31 $ +# +# The Contents of this file are made available subject to the terms of +# either of the following licenses +# +# - GNU Lesser General Public License Version 2.1 +# - Sun Industry Standards Source License Version 1.1 +# +# Sun Microsystems Inc., October, 2000 +# +# GNU Lesser General Public License Version 2.1 +# ============================================= +# Copyright 2000 by Sun Microsystems, Inc. +# 901 San Antonio Road, Palo Alto, CA 94303, USA +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License version 2.1, as published by the Free Software Foundation. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# +# +# Sun Industry Standards Source License Version 1.1 +# ================================================= +# The contents of this file are subject to the Sun Industry Standards +# Source License Version 1.1 (the "License"); You may not use this file +# except in compliance with the License. You may obtain a copy of the +# License at http://www.openoffice.org/license.html. +# +# Software provided under this License is provided on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, +# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, +# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. +# See the License for the specific provisions governing your rights and +# obligations concerning the Software. +# +# The Initial Developer of the Original Code is: Sun Microsystems, Inc. +# +# Copyright: 2000 by Sun Microsystems, Inc. +# +# All Rights Reserved. +# +# Contributor(s): _______________________________________ +# +# +# +#************************************************************************* + +PRJ= ..$/..$/.. +PRJNAME= chart2 +TARGET= chmodelmain + +PRJINC= $(PRJ)$/source + +ENABLE_EXCEPTIONS= TRUE + +# --- Settings ----------------------------------------------------- + +.INCLUDE: settings.mk + +# --- export library ------------------------------------------------- + +#Specifies object files to bind into linked libraries. +SLOFILES= \ + $(SLO)$/Axis.obj \ + $(SLO)$/BoundedCoordinateSystem.obj \ + $(SLO)$/CachedDataSequence.obj \ + $(SLO)$/CartesianCoordinateSystem.obj \ + $(SLO)$/ChartModel.obj \ + $(SLO)$/DataInterpreter.obj \ + $(SLO)$/DataPoint.obj \ + $(SLO)$/DataPointProperties.obj \ + $(SLO)$/DataPointStyle.obj \ + $(SLO)$/DataSeries.obj \ + $(SLO)$/DataSeriesStyle.obj \ + $(SLO)$/Diagram.obj \ + $(SLO)$/DataSeriesProperties.obj \ + $(SLO)$/FileDataProvider.obj \ + $(SLO)$/FileDataSource.obj \ + $(SLO)$/FillProperties.obj \ + $(SLO)$/FormattedString.obj \ + $(SLO)$/Grid.obj \ + $(SLO)$/IdentityTransformation.obj \ + $(SLO)$/ImplChartModel.obj \ + $(SLO)$/Increment.obj \ + $(SLO)$/LayoutContainer.obj \ + $(SLO)$/Legend.obj \ + $(SLO)$/LineProperties.obj \ + $(SLO)$/PolarCoordinateSystem.obj \ + $(SLO)$/PolarTransformation.obj \ + $(SLO)$/Scale.obj \ + $(SLO)$/StyleFamilies.obj \ + $(SLO)$/StyleFamily.obj \ + $(SLO)$/Title.obj \ + $(SLO)$/UserDefinedProperties.obj \ + $(SLO)$/Wall.obj \ + $(SLO)$/CharacterProperties.obj \ + $(SLO)$/_serviceregistration_model.obj + +# --- Targets ----------------------------------------------------------------- + +.INCLUDE: target.mk diff --git a/chart2/source/model/makefile.mk b/chart2/source/model/makefile.mk new file mode 100644 index 000000000..5350ef564 --- /dev/null +++ b/chart2/source/model/makefile.mk @@ -0,0 +1,127 @@ +#************************************************************************* +# +# $RCSfile: makefile.mk,v $ +# +# $Revision: 1.1.1.1 $ +# +# last change: $Author: bm $ $Date: 2003-10-06 09:58:29 $ +# +# The Contents of this file are made available subject to the terms of +# either of the following licenses +# +# - GNU Lesser General Public License Version 2.1 +# - Sun Industry Standards Source License Version 1.1 +# +# Sun Microsystems Inc., October, 2000 +# +# GNU Lesser General Public License Version 2.1 +# ============================================= +# Copyright 2000 by Sun Microsystems, Inc. +# 901 San Antonio Road, Palo Alto, CA 94303, USA +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License version 2.1, as published by the Free Software Foundation. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# +# +# Sun Industry Standards Source License Version 1.1 +# ================================================= +# The contents of this file are subject to the Sun Industry Standards +# Source License Version 1.1 (the "License"); You may not use this file +# except in compliance with the License. You may obtain a copy of the +# License at http://www.openoffice.org/license.html. +# +# Software provided under this License is provided on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, +# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, +# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. +# See the License for the specific provisions governing your rights and +# obligations concerning the Software. +# +# The Initial Developer of the Original Code is: Sun Microsystems, Inc. +# +# Copyright: 2000 by Sun Microsystems, Inc. +# +# All Rights Reserved. +# +# Contributor(s): _______________________________________ +# +# +# +#************************************************************************* + +PRJ= ..$/.. +PRJNAME= chart2 +TARGET= chartmodel + +USE_DEFFILE= TRUE +ENABLE_EXCEPTIONS= TRUE + +# --- Settings ----------------------------------------------------- + +.INCLUDE: $(PRJ)$/util$/makefile.pmk + +# --- export library ------------------------------------------------- + +#You can use several library macros of this form to build libraries that +#do not consist of all object files in a directory or to merge different libraries. +LIB1TARGET= $(SLB)$/_$(TARGET).lib + +LIB1FILES= \ + $(SLB)$/chmodelmain.lib \ + $(SLB)$/chmodeltree.lib \ + $(SLB)$/chmodeltemplate.lib \ + $(SLB)$/chmodeloldapi.lib + +#-------- + +#Indicates the filename of the shared library. +SHL1TARGET= $(TARGET)$(UPD)$(DLLPOSTFIX) + +#indicates dependencies: +# SHL1DEPN = \ +# $(SLB)$/charttools.lib + +#Specifies an import library to create. For Win32 only. +SHL1IMPLIB= i$(TARGET) + +#Specifies libraries from the same module to put into the shared library. +#was created above +SHL1LIBS= $(LIB1TARGET) + +#Links import libraries. + +SHL1STDLIBS= $(CHARTTOOLS) \ + $(CPPULIB) \ + $(CPPUHELPERLIB) \ + $(COMPHELPERLIB) \ + $(TOOLSLIB) \ + $(SALLIB) + +#--------exports + +#specifies the exported symbols for Windows only: +SHL1DEF= $(MISC)$/$(SHL1TARGET).def + +SHL1VERSIONMAP = model.map + +#--------definition file + +#name of the definition file: +DEF1NAME= $(SHL1TARGET) + +# --- Resources --------------------------------------------------------------- + +# --- Targets ----------------------------------------------------------------- + +.INCLUDE: target.mk diff --git a/chart2/source/model/model.map b/chart2/source/model/model.map new file mode 100644 index 000000000..7698cb349 --- /dev/null +++ b/chart2/source/model/model.map @@ -0,0 +1,9 @@ +CHART_1_0 { + global: + component_getImplementationEnvironment; + component_writeInfo; + component_getFactory; + component_getDescriptionFunc; + local: + *; +}; diff --git a/chart2/source/model/template/AreaChartType.cxx b/chart2/source/model/template/AreaChartType.cxx new file mode 100644 index 000000000..b8f5b9c96 --- /dev/null +++ b/chart2/source/model/template/AreaChartType.cxx @@ -0,0 +1,83 @@ +/************************************************************************* + * + * $RCSfile: AreaChartType.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:31 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "AreaChartType.hxx" + +using namespace ::com::sun::star; +using namespace ::drafts::com::sun::star; + +namespace chart +{ + +AreaChartType::AreaChartType( sal_Int32 nDim /* = 2 */ ) : + ChartType( nDim ) +{} + +AreaChartType::~AreaChartType() +{} + +// ____ XChartType ____ +::rtl::OUString SAL_CALL AreaChartType::getChartType() + throw (uno::RuntimeException) +{ + return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart2.AreaChart" )); +} + +} // namespace chart diff --git a/chart2/source/model/template/AreaChartType.hxx b/chart2/source/model/template/AreaChartType.hxx new file mode 100644 index 000000000..d3e7cd40b --- /dev/null +++ b/chart2/source/model/template/AreaChartType.hxx @@ -0,0 +1,84 @@ +/************************************************************************* + * + * $RCSfile: AreaChartType.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:31 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef CHART_AREACHARTTYPE_HXX +#define CHART_AREACHARTTYPE_HXX + +#include "ChartType.hxx" + +namespace chart +{ + +class AreaChartType : public ChartType +{ +public: + AreaChartType( sal_Int32 nDim = 2 ); + virtual ~AreaChartType(); + +protected: + // ____ XChartType ____ + virtual ::rtl::OUString SAL_CALL getChartType() + throw (::com::sun::star::uno::RuntimeException); +}; + +} // namespace chart + +// CHART_AREACHARTTYPE_HXX +#endif diff --git a/chart2/source/model/template/AreaChartTypeTemplate.cxx b/chart2/source/model/template/AreaChartTypeTemplate.cxx new file mode 100644 index 000000000..d84b17d09 --- /dev/null +++ b/chart2/source/model/template/AreaChartTypeTemplate.cxx @@ -0,0 +1,100 @@ +/************************************************************************* + * + * $RCSfile: AreaChartTypeTemplate.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:31 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "AreaChartTypeTemplate.hxx" +#include "AreaChartType.hxx" + +using namespace ::com::sun::star; +using namespace ::drafts::com::sun::star; + +namespace chart +{ + +AreaChartTypeTemplate::AreaChartTypeTemplate( + uno::Reference< + uno::XComponentContext > const & xContext, + chart2::StackMode eStackMode, + sal_Int32 nDim /* = 2 */ ) : + ChartTypeTemplate( xContext ), + m_eStackMode( eStackMode ), + m_nDim( nDim ) +{} + +AreaChartTypeTemplate::~AreaChartTypeTemplate() +{} + +sal_Int32 AreaChartTypeTemplate::getDimension() const +{ + return m_nDim; +} + +chart2::StackMode AreaChartTypeTemplate::getStackMode() const +{ + return m_eStackMode; +} + +// ____ XChartTypeTemplate ____ +uno::Reference< chart2::XChartType > SAL_CALL AreaChartTypeTemplate::getChartTypeForAdditionalSeries() + throw (uno::RuntimeException) +{ + return new AreaChartType( m_nDim ); +} + +} // namespace chart diff --git a/chart2/source/model/template/AreaChartTypeTemplate.hxx b/chart2/source/model/template/AreaChartTypeTemplate.hxx new file mode 100644 index 000000000..4c0dbdc1f --- /dev/null +++ b/chart2/source/model/template/AreaChartTypeTemplate.hxx @@ -0,0 +1,102 @@ +/************************************************************************* + * + * $RCSfile: AreaChartTypeTemplate.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:31 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef CHART_AREACHARTTYPETEMPLATE_HXX +#define CHART_AREACHARTTYPETEMPLATE_HXX + +#include "ChartTypeTemplate.hxx" + +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_STACKMODE_HPP_ +#include <drafts/com/sun/star/chart2/StackMode.hpp> +#endif + +namespace chart +{ + +class AreaChartTypeTemplate : public ChartTypeTemplate +{ +public: + explicit AreaChartTypeTemplate( + ::com::sun::star::uno::Reference< + ::com::sun::star::uno::XComponentContext > const & xContext, + ::drafts::com::sun::star::chart2::StackMode eStackMode, + sal_Int32 nDim = 2 ); + virtual ~AreaChartTypeTemplate(); + +protected: + // ____ ChartTypeTemplate ____ + virtual sal_Int32 getDimension() const; + virtual ::drafts::com::sun::star::chart2::StackMode getStackMode() const; + + // ____ XChartTypeTemplate ____ + virtual ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XChartType > SAL_CALL getChartTypeForAdditionalSeries() + throw (::com::sun::star::uno::RuntimeException); + +private: + ::drafts::com::sun::star::chart2::StackMode + m_eStackMode; + sal_Int32 m_nDim; +}; + +} // namespace chart + +// CHART_AREACHARTTYPETEMPLATE_HXX +#endif diff --git a/chart2/source/model/template/BarChartType.cxx b/chart2/source/model/template/BarChartType.cxx new file mode 100644 index 000000000..cd4b4f5ee --- /dev/null +++ b/chart2/source/model/template/BarChartType.cxx @@ -0,0 +1,83 @@ +/************************************************************************* + * + * $RCSfile: BarChartType.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:31 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "BarChartType.hxx" + +using namespace ::com::sun::star; +using namespace ::drafts::com::sun::star; + +namespace chart +{ + +BarChartType::BarChartType( sal_Int32 nDim /* = 2 */ ) : + ChartType( nDim ) +{} + +BarChartType::~BarChartType() +{} + +// ____ XChartType ____ +::rtl::OUString SAL_CALL BarChartType::getChartType() + throw (uno::RuntimeException) +{ + return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart2.BarChart" )); +} + +} // namespace chart diff --git a/chart2/source/model/template/BarChartType.hxx b/chart2/source/model/template/BarChartType.hxx new file mode 100644 index 000000000..42819f712 --- /dev/null +++ b/chart2/source/model/template/BarChartType.hxx @@ -0,0 +1,84 @@ +/************************************************************************* + * + * $RCSfile: BarChartType.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:31 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef CHART_BARCHARTTYPE_HXX +#define CHART_BARCHARTTYPE_HXX + +#include "ChartType.hxx" + +namespace chart +{ + +class BarChartType : public ChartType +{ +public: + BarChartType( sal_Int32 nDim = 2 ); + virtual ~BarChartType(); + +protected: + // ____ XChartType ____ + virtual ::rtl::OUString SAL_CALL getChartType() + throw (::com::sun::star::uno::RuntimeException); +}; + +} // namespace chart + +// CHART_BARCHARTTYPE_HXX +#endif diff --git a/chart2/source/model/template/BarChartTypeTemplate.cxx b/chart2/source/model/template/BarChartTypeTemplate.cxx new file mode 100644 index 000000000..91f988602 --- /dev/null +++ b/chart2/source/model/template/BarChartTypeTemplate.cxx @@ -0,0 +1,104 @@ +/************************************************************************* + * + * $RCSfile: BarChartTypeTemplate.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:31 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "BarChartTypeTemplate.hxx" +#include "BarChartType.hxx" + +using namespace ::com::sun::star; +using namespace ::drafts::com::sun::star; + +namespace chart +{ + +BarChartTypeTemplate::BarChartTypeTemplate( + uno::Reference< + uno::XComponentContext > const & xContext, + chart2::StackMode eStackMode, + BarDirection eDirection, + sal_Int32 nDim /* = 2 */, + ThreeDMode eThreeDMode /* = THREE_D_FLAT */ ) : + ChartTypeTemplate( xContext ), + m_eStackMode( eStackMode ), + m_eBarDirection( eDirection ), + m_nDim( nDim ), + m_eThreeDMode( eThreeDMode ) +{} + +BarChartTypeTemplate::~BarChartTypeTemplate() +{} + +sal_Int32 BarChartTypeTemplate::getDimension() const +{ + return m_nDim; +} + +chart2::StackMode BarChartTypeTemplate::getStackMode() const +{ + return m_eStackMode; +} + +// ____ XChartTypeTemplate ____ +uno::Reference< chart2::XChartType > SAL_CALL BarChartTypeTemplate::getChartTypeForAdditionalSeries() + throw (uno::RuntimeException) +{ + return new BarChartType( m_nDim ); +} + +} // namespace chart diff --git a/chart2/source/model/template/BarChartTypeTemplate.hxx b/chart2/source/model/template/BarChartTypeTemplate.hxx new file mode 100644 index 000000000..6ca1e720e --- /dev/null +++ b/chart2/source/model/template/BarChartTypeTemplate.hxx @@ -0,0 +1,118 @@ +/************************************************************************* + * + * $RCSfile: BarChartTypeTemplate.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:31 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef CHART_BARCHARTTYPETEMPLATE_HXX +#define CHART_BARCHARTTYPETEMPLATE_HXX + +#include "ChartTypeTemplate.hxx" + +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_STACKMODE_HPP_ +#include <drafts/com/sun/star/chart2/StackMode.hpp> +#endif + +namespace chart +{ + +class BarChartTypeTemplate : public ChartTypeTemplate +{ +public: + enum BarDirection + { + HORIZONTAL, + VERTICAL + }; + + enum ThreeDMode + { + THREE_D_FLAT, + THREE_D_DEEP + }; + + explicit BarChartTypeTemplate( + ::com::sun::star::uno::Reference< + ::com::sun::star::uno::XComponentContext > const & xContext, + ::drafts::com::sun::star::chart2::StackMode eStackMode, + BarDirection eDirection, + sal_Int32 nDim = 2, + ThreeDMode eThreeDMode = THREE_D_FLAT ); + virtual ~BarChartTypeTemplate(); + +protected: + // ____ ChartTypeTemplate ____ + virtual sal_Int32 getDimension() const; + virtual ::drafts::com::sun::star::chart2::StackMode getStackMode() const; + + // ____ XChartTypeTemplate ____ + virtual ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XChartType > SAL_CALL getChartTypeForAdditionalSeries() + throw (::com::sun::star::uno::RuntimeException); + +private: + ::drafts::com::sun::star::chart2::StackMode + m_eStackMode; + BarDirection m_eBarDirection; + sal_Int32 m_nDim; + ThreeDMode m_eThreeDMode; +}; + +} // namespace chart + +// CHART_BARCHARTTYPETEMPLATE_HXX +#endif diff --git a/chart2/source/model/template/ChartType.cxx b/chart2/source/model/template/ChartType.cxx new file mode 100644 index 000000000..6462db1a8 --- /dev/null +++ b/chart2/source/model/template/ChartType.cxx @@ -0,0 +1,221 @@ +/************************************************************************* + * + * $RCSfile: ChartType.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:31 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "ChartType.hxx" +#include "PropertyHelper.hxx" +#include "algohelper.hxx" +#include "macros.hxx" + +#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HPP_ +#include <com/sun/star/beans/PropertyAttribute.hpp> +#endif + +using namespace ::com::sun::star; +using namespace ::drafts::com::sun::star; + +using ::rtl::OUString; +using ::com::sun::star::beans::Property; +using ::com::sun::star::uno::Sequence; +using ::com::sun::star::uno::Reference; +using ::com::sun::star::uno::Any; +using ::osl::MutexGuard; + +namespace +{ + +enum +{ + PROP_CHARTTYPE_DIMENSION +}; + +void lcl_AddPropertiesToVector( + ::std::vector< Property > & rOutProperties ) +{ + rOutProperties.push_back( + Property( C2U( "Dimension" ), + PROP_CHARTTYPE_DIMENSION, + ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEDEFAULT )); +} + +void lcl_AddDefaultsToMap( + ::chart::helper::tPropertyValueMap & rOutMap ) +{ + // must match default in CTOR! + OSL_ASSERT( rOutMap.end() == rOutMap.find( PROP_CHARTTYPE_DIMENSION )); + rOutMap[ PROP_CHARTTYPE_DIMENSION ] = + uno::makeAny( sal_Int32( 2 ) ); +} + +const Sequence< Property > & lcl_GetPropertySequence() +{ + static Sequence< Property > aPropSeq; + + // /-- + ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); + if( 0 == aPropSeq.getLength() ) + { + // get properties + ::std::vector< ::com::sun::star::beans::Property > aProperties; + lcl_AddPropertiesToVector( aProperties ); + + // and sort them for access via bsearch + ::std::sort( aProperties.begin(), aProperties.end(), + ::chart::helper::PropertyNameLess() ); + + // transfer result to static Sequence + aPropSeq = ::chart::helper::VectorToSequence( aProperties ); + } + + return aPropSeq; +} + +} // anonymous namespace + +namespace chart +{ + +ChartType::ChartType( sal_Int32 nDim /* = 2 */ ) : + ::property::OPropertySet( m_aMutex ) +{ + if( nDim != 2 ) + setFastPropertyValue_NoBroadcast( PROP_CHARTTYPE_DIMENSION, uno::makeAny( nDim )); +} + +ChartType::~ChartType() +{} + +Sequence< OUString > ChartType::getSupportedServiceNames_Static() +{ + Sequence< OUString > aServices( 2 ); + + aServices[ 0 ] = C2U( "drafts.com.sun.star.chart2.ChartType" ); + aServices[ 1 ] = C2U( "com.sun.star.beans.PropertySet" ); + return aServices; +} + +// ____ OPropertySet ____ +uno::Any ChartType::GetDefaultValue( sal_Int32 nHandle ) const + throw(beans::UnknownPropertyException) +{ + static helper::tPropertyValueMap aStaticDefaults; + + // /-- + ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); + if( 0 == aStaticDefaults.size() ) + { + // initialize defaults + lcl_AddDefaultsToMap( aStaticDefaults ); + } + + helper::tPropertyValueMap::const_iterator aFound( + aStaticDefaults.find( nHandle )); + + if( aFound == aStaticDefaults.end()) + return uno::Any(); + + return (*aFound).second; + // \-- +} + +// ____ OPropertySet ____ +::cppu::IPropertyArrayHelper & SAL_CALL ChartType::getInfoHelper() +{ + static ::cppu::OPropertyArrayHelper aArrayHelper( lcl_GetPropertySequence(), + /* bSorted = */ sal_True ); + + return aArrayHelper; +} + + +// ____ XPropertySet ____ +uno::Reference< beans::XPropertySetInfo > SAL_CALL + ChartType::getPropertySetInfo() + throw (uno::RuntimeException) +{ + static uno::Reference< beans::XPropertySetInfo > xInfo; + + // /-- + ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); + if( !xInfo.is()) + { + xInfo = ::cppu::OPropertySetHelper::createPropertySetInfo( + getInfoHelper()); + } + + return xInfo; + // \-- +} + +// ================================================================================ + +using impl::ChartType_Base; + +IMPLEMENT_FORWARD_XINTERFACE2( ChartType, ChartType_Base, ::property::OPropertySet ) +IMPLEMENT_FORWARD_XTYPEPROVIDER2( ChartType, ChartType_Base, ::property::OPropertySet ) + +// do this in derived classes! + +// implement XServiceInfo methods basing upon getSupportedServiceNames_Static +APPHELPER_XSERVICEINFO_IMPL( ChartType, + C2U( "com.sun.star.comp.chart.ChartType" )); + +} // namespace chart diff --git a/chart2/source/model/template/ChartType.hxx b/chart2/source/model/template/ChartType.hxx new file mode 100644 index 000000000..7e5cca953 --- /dev/null +++ b/chart2/source/model/template/ChartType.hxx @@ -0,0 +1,144 @@ +/************************************************************************* + * + * $RCSfile: ChartType.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:31 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef CHART_CHARTTYPE_HXX +#define CHART_CHARTTYPE_HXX + +#ifndef CHART_MUTEXCONTAINER_HXX +#include "MutexContainer.hxx" +#endif +#ifndef CHART_OPROPERTYSET_HXX +#include "OPropertySet.hxx" +#endif + +#ifndef _CPPUHELPER_IMPLBASE1_HXX_ +#include <cppuhelper/implbase1.hxx> +#endif +#ifndef _COMPHELPER_UNO3_HXX_ +#include <comphelper/uno3.hxx> +#endif +#include "ServiceMacros.hxx" + +#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_ +#include <com/sun/star/lang/XServiceInfo.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XCHARTTYPE_HPP_ +#include <drafts/com/sun/star/chart2/XChartType.hpp> +#endif + +namespace chart +{ + +namespace impl +{ +typedef ::cppu::WeakImplHelper1< + ::drafts::com::sun::star::chart2::XChartType > + ChartType_Base; +} + +class ChartType : + public helper::MutexContainer, + public impl::ChartType_Base, + public ::property::OPropertySet +{ +public: + ChartType( sal_Int32 nDim = 2 ); + virtual ~ChartType(); + +protected: + // ____ XChartType ____ + // still abstract ! implement ! + virtual ::rtl::OUString SAL_CALL getChartType() + throw (::com::sun::star::uno::RuntimeException) = 0; + + // ____ OPropertySet ____ + virtual ::com::sun::star::uno::Any GetDefaultValue( sal_Int32 nHandle ) const + throw(::com::sun::star::beans::UnknownPropertyException); + + // ____ OPropertySet ____ + virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper(); + + // ____ XPropertySet ____ + virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL + getPropertySetInfo() + throw (::com::sun::star::uno::RuntimeException); + +// virtual sal_Bool SAL_CALL convertFastPropertyValue +// ( ::com::sun::star::uno::Any & rConvertedValue, +// ::com::sun::star::uno::Any & rOldValue, +// sal_Int32 nHandle, +// const ::com::sun::star::uno::Any& rValue ) +// throw (::com::sun::star::lang::IllegalArgumentException); + + // declare this in derived classes ! + APPHELPER_XSERVICEINFO_DECL() + + /// merge XInterface implementations + DECLARE_XINTERFACE() + /// merge XTypeProvider implementations + DECLARE_XTYPEPROVIDER() + +private: +}; + +} // namespace chart + +// CHART_CHARTTYPE_HXX +#endif diff --git a/chart2/source/model/template/ChartTypeManager.cxx b/chart2/source/model/template/ChartTypeManager.cxx new file mode 100644 index 000000000..4457ba879 --- /dev/null +++ b/chart2/source/model/template/ChartTypeManager.cxx @@ -0,0 +1,734 @@ +/************************************************************************* + * + * $RCSfile: ChartTypeManager.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:31 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "ChartTypeManager.hxx" +#include "PropertyHelper.hxx" +#include "algohelper.hxx" +#include "macros.hxx" +#include "ContextHelper.hxx" + +#include "Scaling.hxx" +#include "CartesianCoordinateSystem.hxx" +#include "DoubleStackedBarChartTypeTemplate.hxx" + +#include "LineChartTypeTemplate.hxx" +#include "BarChartTypeTemplate.hxx" +#include "ColumnLineChartTypeTemplate.hxx" +#include "AreaChartTypeTemplate.hxx" +#include "PieChartTypeTemplate.hxx" + +#ifndef _CPPUHELPER_COMPONENT_CONTEXT_HXX_ +#include <cppuhelper/component_context.hxx> +#endif + +#ifndef _COM_SUN_STAR_CONTAINER_XCONTENTENUMERATIONACCESS_HPP_ +#include <com/sun/star/container/XContentEnumerationAccess.hpp> +#endif +#ifndef _COM_SUN_STAR_LANG_XSERVICENAME_HPP_ +#include <com/sun/star/lang/XServiceName.hpp> +#endif +#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HPP_ +#include <com/sun/star/beans/PropertyAttribute.hpp> +#endif +#ifndef _COM_SUN_STAR_CHART_CHARTSOLIDTYPE_HPP_ +#include <com/sun/star/chart/ChartSolidType.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XCHARTTYPEGROUP_HPP_ +#include <drafts/com/sun/star/chart2/XChartTypeGroup.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XSTACKABLESCALEGROUP_HPP_ +#include <drafts/com/sun/star/chart2/XStackableScaleGroup.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_STACKMODE_HPP_ +#include <drafts/com/sun/star/chart2/StackMode.hpp> +#endif + +#include <algorithm> +#include <iterator> +#include <functional> + +using namespace ::com::sun::star; +using namespace ::com::sun::star::beans::PropertyAttribute; +using namespace ::drafts::com::sun::star; + +using ::rtl::OUString; +using ::com::sun::star::beans::Property; +using ::com::sun::star::uno::Sequence; +using ::com::sun::star::uno::Reference; +using ::com::sun::star::uno::Any; +using ::osl::MutexGuard; + +// ====================================================================== + +namespace +{ +enum +{ + PROP_TEMPLATE_MANAGER_CHART_TEMPLATE_NAME, + PROP_TEMPLATE_MANAGER_SOLID_TYPE, + PROP_TEMPLATE_MANAGER_NUMBER_OF_LINES, + PROP_TEMPLATE_MANAGER_SPLINE_ORDER, + PROP_TEMPLATE_MANAGER_SPLINE_RESOLUTION +}; + +void lcl_AddPropertiesToVector( + ::std::vector< Property > & rOutProperties ) +{ + // preliminary + rOutProperties.push_back( + Property( C2U( "ChartStyleTemplateServiceName" ), + PROP_TEMPLATE_MANAGER_CHART_TEMPLATE_NAME, + ::getCppuType( reinterpret_cast< const OUString * >(0)), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEDEFAULT )); + + // properties for the chart type dialog + rOutProperties.push_back( + Property( C2U( "SolidType" ), + PROP_TEMPLATE_MANAGER_SOLID_TYPE, + ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEDEFAULT )); + + rOutProperties.push_back( + Property( C2U( "NumberOfLines" ), + PROP_TEMPLATE_MANAGER_NUMBER_OF_LINES, + ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEDEFAULT )); + + rOutProperties.push_back( + Property( C2U( "SplineOrder" ), + PROP_TEMPLATE_MANAGER_SPLINE_ORDER, + ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEDEFAULT )); + + rOutProperties.push_back( + Property( C2U( "SplineResolution" ), + PROP_TEMPLATE_MANAGER_SPLINE_RESOLUTION, + ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEDEFAULT )); +} + +void lcl_AddDefaultsToMap( + ::chart::helper::tPropertyValueMap & rOutMap ) +{ + OSL_ASSERT( rOutMap.end() == rOutMap.find( PROP_TEMPLATE_MANAGER_CHART_TEMPLATE_NAME )); + rOutMap[ PROP_TEMPLATE_MANAGER_CHART_TEMPLATE_NAME ] = + uno::makeAny( + ::rtl::OUString( C2U( "com.sun.star.chart2.template.Column" ))); + + OSL_ASSERT( rOutMap.end() == rOutMap.find( PROP_TEMPLATE_MANAGER_SOLID_TYPE )); + rOutMap[ PROP_TEMPLATE_MANAGER_SOLID_TYPE ] = + uno::makeAny( ::com::sun::star::chart::ChartSolidType::RECTANGULAR_SOLID ); + + OSL_ASSERT( rOutMap.end() == rOutMap.find( PROP_TEMPLATE_MANAGER_NUMBER_OF_LINES )); + rOutMap[ PROP_TEMPLATE_MANAGER_NUMBER_OF_LINES ] = + uno::makeAny( sal_Int32( 0 )); + + OSL_ASSERT( rOutMap.end() == rOutMap.find( PROP_TEMPLATE_MANAGER_SPLINE_ORDER )); + rOutMap[ PROP_TEMPLATE_MANAGER_SPLINE_ORDER ] = + uno::makeAny( sal_Int32( 3 )); + + OSL_ASSERT( rOutMap.end() == rOutMap.find( PROP_TEMPLATE_MANAGER_SPLINE_RESOLUTION )); + rOutMap[ PROP_TEMPLATE_MANAGER_SPLINE_RESOLUTION ] = + uno::makeAny( sal_Int32( 20 )); +} + +const Sequence< Property > & lcl_GetPropertySequence() +{ + static Sequence< Property > aPropSeq; + + // /-- + ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); + if( 0 == aPropSeq.getLength() ) + { + // get properties + ::std::vector< ::com::sun::star::beans::Property > aProperties; + lcl_AddPropertiesToVector( aProperties ); + + // and sort them for access via bsearch + ::std::sort( aProperties.begin(), aProperties.end(), + ::chart::helper::PropertyNameLess() ); + + // transfer result to static Sequence + aPropSeq = ::chart::helper::VectorToSequence( aProperties ); + } + + return aPropSeq; +} + +enum TemplateId +{ + TEMPLATE_LINE, + TEMPLATE_STACKEDLINE, + TEMPLATE_PERCENTSTACKEDLINE, + TEMPLATE_LINESYMBOL, + TEMPLATE_STACKEDLINESYMBOL, + TEMPLATE_PERCENTSTACKEDLINESYMBOL, + TEMPLATE_CUBICSPLINE, + TEMPLATE_CUBICSPLINESYMBOL, + TEMPLATE_BSPLINE, + TEMPLATE_BSPLINESYMBOL, + TEMPLATE_THREEDLINE, + TEMPLATE_COLUMN, + TEMPLATE_STACKEDCOLUMN, + TEMPLATE_PERCENTSTACKEDCOLUMN, + TEMPLATE_BAR, + TEMPLATE_STACKEDBAR, + TEMPLATE_PERCENTSTACKEDBAR, + TEMPLATE_THREEDCOLUMNDEEP, + TEMPLATE_THREEDCOLUMNFLAT, + TEMPLATE_STACKEDTHREEDCOLUMNFLAT, + TEMPLATE_PERCENTSTACKEDTHREEDCOLUMNFLAT, + TEMPLATE_THREEDBARDEEP, + TEMPLATE_THREEDBARFLAT, + TEMPLATE_STACKEDTHREEDBARFLAT, + TEMPLATE_PERCENTSTACKEDTHREEDBARFLAT, + TEMPLATE_COLUMNWITHONELINE, + TEMPLATE_STACKEDCOLUMNWITHONELINE, + TEMPLATE_AREA, + TEMPLATE_STACKEDAREA, + TEMPLATE_PERCENTSTACKEDAREA, + TEMPLATE_THREEDAREA, + TEMPLATE_STACKEDTHREEDAREA, + TEMPLATE_PERCENTSTACKEDTHREEDAREA, + TEMPLATE_PIE, + TEMPLATE_PIEONEEXPLODED, + TEMPLATE_PIEALLEXPLODED, + TEMPLATE_RING, + TEMPLATE_THREEDPIE, + TEMPLATE_SCATTERLINESYMBOL, + TEMPLATE_CUBICSPLINESCATTER, + TEMPLATE_CUBICSPLINESCATTERSYMBOL, + TEMPLATE_BSPLINESCATTER, + TEMPLATE_BSPLINESCATTERSYMBOL, + TEMPLATE_SCATTERLINE, + TEMPLATE_SCATTERSYMBOL, + TEMPLATE_NET, + TEMPLATE_NETSYMBOL, + TEMPLATE_STACKEDNET, + TEMPLATE_STACKEDNETSYMBOL, + TEMPLATE_PERCENTSTACKEDNET, + TEMPLATE_PERCENTSTACKEDNETSYMBOL, + TEMPLATE_STOCKLOWHIGHCLOSE, + TEMPLATE_STOCKOPENLOWHIGHCLOSE, + TEMPLATE_STOCKVOLUMELOWHIGHCLOSE, + TEMPLATE_STOCKVOLUMEOPENLOWHIGHCLOSE, + TEMPLATE_SURFACE, + TEMPLATE_THREEDSCATTER, + TEMPLATE_THREEDSCATTERSYMBOL, + TEMPLATE_ADDIN, + TEMPLATE_NOT_FOUND = 0xffff +}; + +typedef ::std::map< OUString, TemplateId > tTemplateMapType; + +const tTemplateMapType & lcl_DefaultChartTypeMap() +{ + static const tTemplateMapType aMap = tTemplateMapType( + ::comphelper::MakeMap< tTemplateMapType::key_type, tTemplateMapType::data_type > + ( C2U( "com.sun.star.chart2.template.Line" ), TEMPLATE_LINE ) + ( C2U( "com.sun.star.chart2.template.StackedLine" ), TEMPLATE_STACKEDLINE ) + ( C2U( "com.sun.star.chart2.template.PercentStackedLine" ), TEMPLATE_PERCENTSTACKEDLINE ) + ( C2U( "com.sun.star.chart2.template.LineSymbol" ), TEMPLATE_LINESYMBOL ) + ( C2U( "com.sun.star.chart2.template.StackedLineSymbol" ), TEMPLATE_STACKEDLINESYMBOL ) + ( C2U( "com.sun.star.chart2.template.PercentStackedLineSymbol" ), TEMPLATE_PERCENTSTACKEDLINESYMBOL ) + ( C2U( "com.sun.star.chart2.template.CubicSpline" ), TEMPLATE_CUBICSPLINE ) + ( C2U( "com.sun.star.chart2.template.CubicSplineSymbol" ), TEMPLATE_CUBICSPLINESYMBOL ) + ( C2U( "com.sun.star.chart2.template.BSpline" ), TEMPLATE_BSPLINE ) + ( C2U( "com.sun.star.chart2.template.BSplineSymbol" ), TEMPLATE_BSPLINESYMBOL ) + ( C2U( "com.sun.star.chart2.template.ThreeDLine" ), TEMPLATE_THREEDLINE ) + ( C2U( "com.sun.star.chart2.template.Column" ), TEMPLATE_COLUMN ) + ( C2U( "com.sun.star.chart2.template.StackedColumn" ), TEMPLATE_STACKEDCOLUMN ) + ( C2U( "com.sun.star.chart2.template.PercentStackedColumn" ), TEMPLATE_PERCENTSTACKEDCOLUMN ) + ( C2U( "com.sun.star.chart2.template.Bar" ), TEMPLATE_BAR ) + ( C2U( "com.sun.star.chart2.template.StackedBar" ), TEMPLATE_STACKEDBAR ) + ( C2U( "com.sun.star.chart2.template.PercentStackedBar" ), TEMPLATE_PERCENTSTACKEDBAR ) + ( C2U( "com.sun.star.chart2.template.ThreeDColumnDeep" ), TEMPLATE_THREEDCOLUMNDEEP ) + ( C2U( "com.sun.star.chart2.template.ThreeDColumnFlat" ), TEMPLATE_THREEDCOLUMNFLAT ) + ( C2U( "com.sun.star.chart2.template.StackedThreeDColumnFlat" ), TEMPLATE_STACKEDTHREEDCOLUMNFLAT ) + ( C2U( "com.sun.star.chart2.template.PercentStackedThreeDColumnFlat" ), TEMPLATE_PERCENTSTACKEDTHREEDCOLUMNFLAT ) + ( C2U( "com.sun.star.chart2.template.ThreeDBarDeep" ), TEMPLATE_THREEDBARDEEP ) + ( C2U( "com.sun.star.chart2.template.ThreeDBarFlat" ), TEMPLATE_THREEDBARFLAT ) + ( C2U( "com.sun.star.chart2.template.StackedThreeDBarFlat" ), TEMPLATE_STACKEDTHREEDBARFLAT ) + ( C2U( "com.sun.star.chart2.template.PercentStackedThreeDBarFlat" ), TEMPLATE_PERCENTSTACKEDTHREEDBARFLAT ) + ( C2U( "com.sun.star.chart2.template.ColumnWithOneLine" ), TEMPLATE_COLUMNWITHONELINE ) + ( C2U( "com.sun.star.chart2.template.StackedColumnWithOneLine" ), TEMPLATE_STACKEDCOLUMNWITHONELINE ) + ( C2U( "com.sun.star.chart2.template.Area" ), TEMPLATE_AREA ) + ( C2U( "com.sun.star.chart2.template.StackedArea" ), TEMPLATE_STACKEDAREA ) + ( C2U( "com.sun.star.chart2.template.PercentStackedArea" ), TEMPLATE_PERCENTSTACKEDAREA ) + ( C2U( "com.sun.star.chart2.template.ThreeDArea" ), TEMPLATE_THREEDAREA ) + ( C2U( "com.sun.star.chart2.template.StackedThreeDArea" ), TEMPLATE_STACKEDTHREEDAREA ) + ( C2U( "com.sun.star.chart2.template.PercentStackedThreeDArea" ), TEMPLATE_PERCENTSTACKEDTHREEDAREA ) + ( C2U( "com.sun.star.chart2.template.Pie" ), TEMPLATE_PIE ) + ( C2U( "com.sun.star.chart2.template.PieOneExploded" ), TEMPLATE_PIEONEEXPLODED ) + ( C2U( "com.sun.star.chart2.template.PieAllExploded" ), TEMPLATE_PIEALLEXPLODED ) + ( C2U( "com.sun.star.chart2.template.Ring" ), TEMPLATE_RING ) + ( C2U( "com.sun.star.chart2.template.ThreeDPie" ), TEMPLATE_THREEDPIE ) + ( C2U( "com.sun.star.chart2.template.ScatterLineSymbol" ), TEMPLATE_SCATTERLINESYMBOL ) + ( C2U( "com.sun.star.chart2.template.CubicSplineScatter" ), TEMPLATE_CUBICSPLINESCATTER ) + ( C2U( "com.sun.star.chart2.template.CubicSplineScatterSymbol" ), TEMPLATE_CUBICSPLINESCATTERSYMBOL ) + ( C2U( "com.sun.star.chart2.template.BSplineScatter" ), TEMPLATE_BSPLINESCATTER ) + ( C2U( "com.sun.star.chart2.template.BSplineScatterSymbol" ), TEMPLATE_BSPLINESCATTERSYMBOL ) + ( C2U( "com.sun.star.chart2.template.ScatterLine" ), TEMPLATE_SCATTERLINE ) + ( C2U( "com.sun.star.chart2.template.ScatterSymbol" ), TEMPLATE_SCATTERSYMBOL ) + ( C2U( "com.sun.star.chart2.template.Net" ), TEMPLATE_NET ) + ( C2U( "com.sun.star.chart2.template.NetSymbol" ), TEMPLATE_NETSYMBOL ) + ( C2U( "com.sun.star.chart2.template.StackedNet" ), TEMPLATE_STACKEDNET ) + ( C2U( "com.sun.star.chart2.template.StackedNetSymbol" ), TEMPLATE_STACKEDNETSYMBOL ) + ( C2U( "com.sun.star.chart2.template.PercentStackedNet" ), TEMPLATE_PERCENTSTACKEDNET ) + ( C2U( "com.sun.star.chart2.template.PercentStackedNetSymbol" ), TEMPLATE_PERCENTSTACKEDNETSYMBOL ) + ( C2U( "com.sun.star.chart2.template.StockLowHighClose" ), TEMPLATE_STOCKLOWHIGHCLOSE ) + ( C2U( "com.sun.star.chart2.template.StockOpenLowHighClose" ), TEMPLATE_STOCKOPENLOWHIGHCLOSE ) + ( C2U( "com.sun.star.chart2.template.StockVolumeLowHighClose" ), TEMPLATE_STOCKVOLUMELOWHIGHCLOSE ) + ( C2U( "com.sun.star.chart2.template.StockVolumeOpenLowHighClose" ), TEMPLATE_STOCKVOLUMEOPENLOWHIGHCLOSE ) + ( C2U( "com.sun.star.chart2.template.Surface" ), TEMPLATE_SURFACE ) + ( C2U( "com.sun.star.chart2.template.ThreeDScatter" ), TEMPLATE_THREEDSCATTER ) + ( C2U( "com.sun.star.chart2.template.ThreeDScatterSymbol" ), TEMPLATE_THREEDSCATTERSYMBOL ) + ( C2U( "com.sun.star.chart2.template.Addin" ), TEMPLATE_ADDIN ) + ); + + return aMap; +} + +TemplateId lcl_GetTemplateIdForService( const OUString & rServiceName ) +{ + TemplateId eResult = TEMPLATE_NOT_FOUND; + const tTemplateMapType & rMap = lcl_DefaultChartTypeMap(); + tTemplateMapType::const_iterator aIt( rMap.find( rServiceName )); + + if( aIt != rMap.end()) + eResult = (*aIt).second; + + return eResult; +} + +} // anonymous namespace + +namespace chart +{ + +ChartTypeManager::ChartTypeManager( + uno::Reference< + uno::XComponentContext > const & xContext ) : + ::property::OPropertySet( m_aMutex ), + m_xContext( xContext ) +{} + +ChartTypeManager::~ChartTypeManager() +{} + +// ____ XMultiServiceFactory ____ +uno::Reference< uno::XInterface > SAL_CALL ChartTypeManager::createInstance( + const OUString& aServiceSpecifier ) + throw (uno::Exception, + uno::RuntimeException) +{ + uno::Reference< uno::XInterface > xResult; + TemplateId nId = lcl_GetTemplateIdForService( aServiceSpecifier ); + + if( nId == TEMPLATE_NOT_FOUND ) + { + xResult = m_xContext->getServiceManager()->createInstanceWithContext( + aServiceSpecifier, m_xContext ); + } + else + { + uno::Reference< chart2::XChartTypeTemplate > xTemplate; + switch( nId ) + { + // Line + case TEMPLATE_LINE: + xTemplate.set( new LineChartTypeTemplate( m_xContext, + chart2::StackMode_NONE, LineChartTypeTemplate::NO_SPLINE, false )); + break; + case TEMPLATE_STACKEDLINE: + xTemplate.set( new LineChartTypeTemplate( m_xContext, + chart2::StackMode_STACKED, LineChartTypeTemplate::NO_SPLINE, false )); + break; + case TEMPLATE_PERCENTSTACKEDLINE: + xTemplate.set( new LineChartTypeTemplate( m_xContext, + chart2::StackMode_STACKED_PERCENT, LineChartTypeTemplate::NO_SPLINE, false )); + break; + case TEMPLATE_LINESYMBOL: + xTemplate.set( new LineChartTypeTemplate( m_xContext, + chart2::StackMode_NONE, LineChartTypeTemplate::NO_SPLINE, true )); + break; + case TEMPLATE_STACKEDLINESYMBOL: + xTemplate.set( new LineChartTypeTemplate( m_xContext, + chart2::StackMode_STACKED, LineChartTypeTemplate::NO_SPLINE, true )); + break; + case TEMPLATE_PERCENTSTACKEDLINESYMBOL: + xTemplate.set( new LineChartTypeTemplate( m_xContext, + chart2::StackMode_STACKED_PERCENT, LineChartTypeTemplate::NO_SPLINE, true )); + break; + case TEMPLATE_CUBICSPLINE: + xTemplate.set( new LineChartTypeTemplate( m_xContext, + chart2::StackMode_NONE, LineChartTypeTemplate::CUBIC_SPLINE, false )); + break; + case TEMPLATE_CUBICSPLINESYMBOL: + xTemplate.set( new LineChartTypeTemplate( m_xContext, + chart2::StackMode_NONE, LineChartTypeTemplate::CUBIC_SPLINE, true )); + break; + case TEMPLATE_BSPLINE: + xTemplate.set( new LineChartTypeTemplate( m_xContext, + chart2::StackMode_NONE, LineChartTypeTemplate::B_SPLINE, false )); + break; + case TEMPLATE_BSPLINESYMBOL: + xTemplate.set( new LineChartTypeTemplate( m_xContext, + chart2::StackMode_NONE, LineChartTypeTemplate::B_SPLINE, true )); + break; + case TEMPLATE_THREEDLINE: + xTemplate.set( new LineChartTypeTemplate( m_xContext, + chart2::StackMode_NONE, LineChartTypeTemplate::NO_SPLINE, false, 3 )); + break; + + // Bar/Column + case TEMPLATE_COLUMN: + xTemplate.set( new BarChartTypeTemplate( m_xContext, + chart2::StackMode_NONE, BarChartTypeTemplate::VERTICAL )); + break; + case TEMPLATE_STACKEDCOLUMN: + xTemplate.set( new BarChartTypeTemplate( m_xContext, + chart2::StackMode_STACKED, BarChartTypeTemplate::VERTICAL )); + break; + case TEMPLATE_PERCENTSTACKEDCOLUMN: + xTemplate.set( new BarChartTypeTemplate( m_xContext, + chart2::StackMode_STACKED_PERCENT, BarChartTypeTemplate::VERTICAL )); + break; + case TEMPLATE_BAR: + xTemplate.set( new BarChartTypeTemplate( m_xContext, + chart2::StackMode_NONE, BarChartTypeTemplate::HORIZONTAL )); + break; + case TEMPLATE_STACKEDBAR: + xTemplate.set( new BarChartTypeTemplate( m_xContext, + chart2::StackMode_STACKED, BarChartTypeTemplate::HORIZONTAL )); + break; + case TEMPLATE_PERCENTSTACKEDBAR: + xTemplate.set( new BarChartTypeTemplate( m_xContext, + chart2::StackMode_STACKED_PERCENT, BarChartTypeTemplate::HORIZONTAL )); + break; + case TEMPLATE_THREEDCOLUMNDEEP: + xTemplate.set( new BarChartTypeTemplate( m_xContext, + chart2::StackMode_NONE, BarChartTypeTemplate::VERTICAL, + 3, BarChartTypeTemplate::THREE_D_DEEP )); + break; + case TEMPLATE_THREEDCOLUMNFLAT: + xTemplate.set( new BarChartTypeTemplate( m_xContext, + chart2::StackMode_NONE, BarChartTypeTemplate::VERTICAL, + 3, BarChartTypeTemplate::THREE_D_FLAT )); + break; + case TEMPLATE_STACKEDTHREEDCOLUMNFLAT: + xTemplate.set( new BarChartTypeTemplate( m_xContext, + chart2::StackMode_STACKED, BarChartTypeTemplate::VERTICAL, + 3, BarChartTypeTemplate::THREE_D_FLAT )); + case TEMPLATE_PERCENTSTACKEDTHREEDCOLUMNFLAT: + xTemplate.set( new BarChartTypeTemplate( m_xContext, + chart2::StackMode_STACKED_PERCENT, BarChartTypeTemplate::VERTICAL, + 3, BarChartTypeTemplate::THREE_D_FLAT )); + case TEMPLATE_THREEDBARDEEP: + xTemplate.set( new BarChartTypeTemplate( m_xContext, + chart2::StackMode_NONE, BarChartTypeTemplate::HORIZONTAL, + 3, BarChartTypeTemplate::THREE_D_DEEP )); + break; + case TEMPLATE_THREEDBARFLAT: + xTemplate.set( new BarChartTypeTemplate( m_xContext, + chart2::StackMode_NONE, BarChartTypeTemplate::HORIZONTAL, + 3, BarChartTypeTemplate::THREE_D_FLAT )); + break; + case TEMPLATE_STACKEDTHREEDBARFLAT: + xTemplate.set( new BarChartTypeTemplate( m_xContext, + chart2::StackMode_STACKED, BarChartTypeTemplate::HORIZONTAL, + 3, BarChartTypeTemplate::THREE_D_FLAT )); + break; + case TEMPLATE_PERCENTSTACKEDTHREEDBARFLAT: + xTemplate.set( new BarChartTypeTemplate( m_xContext, + chart2::StackMode_STACKED_PERCENT, BarChartTypeTemplate::HORIZONTAL, + 3, BarChartTypeTemplate::THREE_D_FLAT )); + break; + + // Combi-Chart Line/Column + case TEMPLATE_COLUMNWITHONELINE: + case TEMPLATE_STACKEDCOLUMNWITHONELINE: + { + chart2::StackMode eMode = ( nId == TEMPLATE_COLUMNWITHONELINE ) + ? chart2::StackMode_NONE + : chart2::StackMode_STACKED; + sal_Int32 nNumOfLines = 1; + getFastPropertyValue( PROP_TEMPLATE_MANAGER_NUMBER_OF_LINES ) >>= nNumOfLines; + + xTemplate.set( new ColumnLineChartTypeTemplate( m_xContext, eMode, nNumOfLines )); + } + break; + + // Area + case TEMPLATE_AREA: + xTemplate.set( new AreaChartTypeTemplate( m_xContext, chart2::StackMode_NONE )); + break; + case TEMPLATE_STACKEDAREA: + xTemplate.set( new AreaChartTypeTemplate( m_xContext, chart2::StackMode_STACKED )); + break; + case TEMPLATE_PERCENTSTACKEDAREA: + xTemplate.set( new AreaChartTypeTemplate( m_xContext, chart2::StackMode_STACKED_PERCENT )); + break; + case TEMPLATE_THREEDAREA: + xTemplate.set( new AreaChartTypeTemplate( m_xContext, chart2::StackMode_NONE, 3 )); + break; + case TEMPLATE_STACKEDTHREEDAREA: + xTemplate.set( new AreaChartTypeTemplate( m_xContext, chart2::StackMode_STACKED, 3 )); + break; + case TEMPLATE_PERCENTSTACKEDTHREEDAREA: + xTemplate.set( new AreaChartTypeTemplate( m_xContext, chart2::StackMode_STACKED_PERCENT, 3 )); + break; + + case TEMPLATE_PIE: + xTemplate.set( new PieChartTypeTemplate( m_xContext, + PieChartTypeTemplate::NO_OFFSET, false )); + break; + case TEMPLATE_PIEONEEXPLODED: + xTemplate.set( new PieChartTypeTemplate( m_xContext, + PieChartTypeTemplate::FIRST_EXPLODED, false )); + break; + case TEMPLATE_PIEALLEXPLODED: + xTemplate.set( new PieChartTypeTemplate( m_xContext, + PieChartTypeTemplate::ALL_EXPLODED, false )); + break; + case TEMPLATE_RING: + xTemplate.set( new PieChartTypeTemplate( m_xContext, + PieChartTypeTemplate::NO_OFFSET, true )); + break; + case TEMPLATE_THREEDPIE: + xTemplate.set( new PieChartTypeTemplate( m_xContext, + PieChartTypeTemplate::NO_OFFSET, false, 3 )); + break; + + case TEMPLATE_SCATTERLINESYMBOL: + case TEMPLATE_CUBICSPLINESCATTER: + case TEMPLATE_CUBICSPLINESCATTERSYMBOL: + case TEMPLATE_BSPLINESCATTER: + case TEMPLATE_BSPLINESCATTERSYMBOL: + case TEMPLATE_SCATTERLINE: + case TEMPLATE_SCATTERSYMBOL: + + // TEST !!! + case TEMPLATE_NET: + xTemplate.set( new DoubleStackedBarChartTypeTemplate( m_xContext, + chart2::StackMode_NONE, chart2::StackMode_STACKED )); + break; + + // TEST !!! + case TEMPLATE_NETSYMBOL: + case TEMPLATE_STACKEDNET: + case TEMPLATE_STACKEDNETSYMBOL: + xTemplate.set( new DoubleStackedBarChartTypeTemplate( m_xContext, + chart2::StackMode_STACKED, chart2::StackMode_STACKED )); + break; + + // TEST !!! + case TEMPLATE_PERCENTSTACKEDNET: + case TEMPLATE_PERCENTSTACKEDNETSYMBOL: + xTemplate.set( new DoubleStackedBarChartTypeTemplate( m_xContext, + chart2::StackMode_STACKED_PERCENT, chart2::StackMode_STACKED )); + break; + + case TEMPLATE_STOCKLOWHIGHCLOSE: + case TEMPLATE_STOCKOPENLOWHIGHCLOSE: + case TEMPLATE_STOCKVOLUMELOWHIGHCLOSE: + case TEMPLATE_STOCKVOLUMEOPENLOWHIGHCLOSE: + case TEMPLATE_SURFACE: + case TEMPLATE_THREEDSCATTER: + case TEMPLATE_THREEDSCATTERSYMBOL: + case TEMPLATE_ADDIN: + break; + + case TEMPLATE_NOT_FOUND: + OSL_ASSERT( false ); + break; + } + xResult.set( xTemplate, uno::UNO_QUERY ); + } + + return xResult; +} + +uno::Reference< uno::XInterface > SAL_CALL ChartTypeManager::createInstanceWithArguments( + const OUString& ServiceSpecifier, + const uno::Sequence< uno::Any >& Arguments ) + throw (uno::Exception, + uno::RuntimeException) +{ + OSL_ENSURE( false, "createInstanceWithArguments: No arguments supported" ); + return createInstance( ServiceSpecifier ); +} + +uno::Sequence< OUString > SAL_CALL ChartTypeManager::getAvailableServiceNames() + throw (uno::RuntimeException) +{ + ::std::vector< OUString > aServices; + const tTemplateMapType & rMap = lcl_DefaultChartTypeMap(); + aServices.reserve( rMap.size()); + + // get own default templates + ::std::transform( rMap.begin(), rMap.end(), ::std::back_inserter( aServices ), + ::std::select1st< tTemplateMapType::value_type >()); + + // add components that were registered in the context's factory + uno::Reference< container::XContentEnumerationAccess > xEnumAcc( + m_xContext->getServiceManager(), uno::UNO_QUERY ); + if( xEnumAcc.is()) + { + uno::Reference< container::XEnumeration > xEnum( + xEnumAcc->createContentEnumeration( C2U( "drafts.com.sun.star.chart2.ChartTypeTemplate" ) )); + if( xEnum.is()) + { + uno::Reference< uno::XInterface > xFactIntf; + + while( xEnum->hasMoreElements()) + { + if( xEnum->nextElement() >>= xFactIntf ) + { + uno::Reference< lang::XServiceName > xServiceName( xFactIntf, uno::UNO_QUERY ); + if( xServiceName.is()) + aServices.push_back( xServiceName->getServiceName()); + } + } + } + } + + return helper::VectorToSequence( aServices ); +} + +// ____ XServiceInfo ____ +Sequence< OUString > ChartTypeManager::getSupportedServiceNames_Static() +{ + Sequence< OUString > aServices( 3 ); + aServices[ 0 ] = C2U( "drafts.com.sun.star.chart2.ChartTypeManager" ); + aServices[ 1 ] = C2U( "drafts.com.sun.star.lang.MultiServiceFactory" ); + aServices[ 2 ] = C2U( "com.sun.star.beans.PropertySet" ); + return aServices; +} + +// ____ OPropertySet ____ +uno::Any ChartTypeManager::GetDefaultValue( sal_Int32 nHandle ) const + throw(beans::UnknownPropertyException) +{ + static helper::tPropertyValueMap aStaticDefaults; + + // /-- + ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); + if( 0 == aStaticDefaults.size() ) + { + // initialize defaults + lcl_AddDefaultsToMap( aStaticDefaults ); + } + + helper::tPropertyValueMap::const_iterator aFound( + aStaticDefaults.find( nHandle )); + + if( aFound == aStaticDefaults.end()) + return uno::Any(); + + return (*aFound).second; + // \-- +} + +// ____ OPropertySet ____ +::cppu::IPropertyArrayHelper & SAL_CALL ChartTypeManager::getInfoHelper() +{ + static ::cppu::OPropertyArrayHelper aArrayHelper( lcl_GetPropertySequence(), + /* bSorted = */ sal_True ); + + return aArrayHelper; +} + + +// ____ XPropertySet ____ +uno::Reference< beans::XPropertySetInfo > SAL_CALL + ChartTypeManager::getPropertySetInfo() + throw (uno::RuntimeException) +{ + static uno::Reference< beans::XPropertySetInfo > xInfo; + + // /-- + ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); + if( !xInfo.is()) + { + xInfo = ::cppu::OPropertySetHelper::createPropertySetInfo( + getInfoHelper()); + } + + return xInfo; + // \-- +} + +// ================================================================================ + +using impl::ChartTypeManager_Base; + +IMPLEMENT_FORWARD_XINTERFACE2( ChartTypeManager, ChartTypeManager_Base, ::property::OPropertySet ) +IMPLEMENT_FORWARD_XTYPEPROVIDER2( ChartTypeManager, ChartTypeManager_Base, ::property::OPropertySet ) + +// implement XServiceInfo methods basing upon getSupportedServiceNames_Static +APPHELPER_XSERVICEINFO_IMPL( ChartTypeManager, + C2U( "com.sun.star.comp.chart.ChartTypeManager" )); +} // namespace chart diff --git a/chart2/source/model/template/ChartTypeTemplate.cxx b/chart2/source/model/template/ChartTypeTemplate.cxx new file mode 100644 index 000000000..99fae6300 --- /dev/null +++ b/chart2/source/model/template/ChartTypeTemplate.cxx @@ -0,0 +1,727 @@ +/************************************************************************* + * + * $RCSfile: ChartTypeTemplate.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:32 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "ChartTypeTemplate.hxx" +#include "PropertyHelper.hxx" +#include "algohelper.hxx" +#include "macros.hxx" +#include "ContextHelper.hxx" +#include "Scale.hxx" +#include "TitleHelper.hxx" + +#include "Diagram.hxx" +#include "Scaling.hxx" +#include "CartesianCoordinateSystem.hxx" +#include "BoundedCoordinateSystem.hxx" +#include "MeterHelper.hxx" + +#ifndef _CPPUHELPER_COMPONENT_CONTEXT_HXX_ +#include <cppuhelper/component_context.hxx> +#endif + +#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HPP_ +#include <com/sun/star/beans/PropertyAttribute.hpp> +#endif +#ifndef _COM_SUN_STAR_CHART_CHARTSOLIDTYPE_HPP_ +#include <com/sun/star/chart/ChartSolidType.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XCHARTTYPEGROUP_HPP_ +#include <drafts/com/sun/star/chart2/XChartTypeGroup.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XSTACKABLESCALEGROUP_HPP_ +#include <drafts/com/sun/star/chart2/XStackableScaleGroup.hpp> +#endif + +#include <algorithm> +#include <iterator> + +using namespace ::com::sun::star; +using namespace ::com::sun::star::beans::PropertyAttribute; +using namespace ::drafts::com::sun::star; + +using ::rtl::OUString; +using ::com::sun::star::beans::Property; +using ::com::sun::star::uno::Sequence; +using ::com::sun::star::uno::Reference; +using ::com::sun::star::uno::Any; + +// ====================================================================== + +namespace +{ +bool lcl_SetStackModeAtTree( + const Reference< chart2::XDataSeriesTreeParent > & rTree, + chart2::StackMode eMode ) +{ + if( ! rTree.is()) + return false; + + bool bResult = false; + + // seek value stacking group + Sequence< Reference< chart2::XDataSeriesTreeNode > > aChildren( rTree->getChildren()); + for( sal_Int32 i = 0; + ( ! bResult ) && ( i < aChildren.getLength() ); + ++i ) + { + Reference< chart2::XStackableScaleGroup > xStackGroup( aChildren[ i ], uno::UNO_QUERY ); + if( xStackGroup.is()) + { + Reference< lang::XServiceInfo > xServInfo( aChildren[ i ], uno::UNO_QUERY ); + if( xServInfo.is() && + xServInfo->supportsService( + C2U( "drafts.com.sun.star.chart2.ContinuousScaleGroup" ))) + { + xStackGroup->setStackMode( eMode ); + bResult = true; + break; + } + } + + // recurse + Reference< chart2::XDataSeriesTreeParent > xNewParent( aChildren[ i ], uno::UNO_QUERY ); + if( xNewParent.is() && + lcl_SetStackModeAtTree( xNewParent, eMode )) + bResult = true; + } + + return bResult; +} + +// helping method for lcl_GetDataSeries() (see below) +void lcl_AddSeriesRecursive( + Reference< chart2::XDataSeriesTreeParent > xParent, + ::std::vector< Reference< chart2::XDataSeries > > & rOutSeriesVec ) +{ + if( xParent.is()) + { + Sequence< Reference< chart2::XDataSeriesTreeNode > > aChildren( xParent->getChildren()); + for( sal_Int32 i = 0; i < aChildren.getLength(); ++i ) + { + Reference< chart2::XDataSeries > aDataSeries( aChildren[ i ], uno::UNO_QUERY ); + if( aDataSeries.is()) + { + rOutSeriesVec.push_back( aDataSeries ); + } + else + { + Reference< chart2::XDataSeriesTreeParent > xNewParent( aChildren[ i ], uno::UNO_QUERY ); + if( xNewParent.is()) + lcl_AddSeriesRecursive( xNewParent, rOutSeriesVec ); + } + } + } +} +Sequence< Reference< chart2::XDataSeries > > + lcl_GetDataSeries( const Reference< chart2::XDiagram > & xDia ) +{ + ::std::vector< Reference< chart2::XDataSeries > > aSeriesVec; + + if( xDia.is()) + { + Reference< chart2::XDataSeriesTreeParent > aParent( xDia->getTree()); + + if( aParent.is()) + lcl_AddSeriesRecursive( aParent, aSeriesVec ); + } + + return ::chart::helper::VectorToSequence( aSeriesVec ); +} + +void lcl_FlushLegend( const Reference< chart2::XLegend > & xLegend ) +{ + if( xLegend.is()) + { + Sequence< Reference< chart2::XLegendEntry > > aEntries( xLegend->getEntries()); + for( sal_Int32 i = 0; i < aEntries.getLength(); ++i ) + { + xLegend->revokeEntry( aEntries[ i ] ); + } + } +} + +#if OSL_DEBUG_LEVEL > 1 + +#include <drafts/com/sun/star/chart2/XChartTypeGroup.hpp> +#include <drafts/com/sun/star/chart2/XScaleGroup.hpp> + +// forward declatation +void lcl_ShowTree( const Reference< chart2::XDataSeriesTreeParent > & xParent, sal_Int32 nLevel = 0 ); + +#endif + +} // anonymous namespace + +namespace chart +{ + +ChartTypeTemplate::ChartTypeTemplate( + Reference< uno::XComponentContext > const & xContext ) : + m_xContext( xContext ) +{ +} + +ChartTypeTemplate::~ChartTypeTemplate() +{} + +// ____ XChartTypeTemplate ____ + +Reference< chart2::XDiagram > SAL_CALL ChartTypeTemplate::createDiagram( + const Sequence< Reference< chart2::XDataSeries > >& aSeriesSeq ) + throw (uno::RuntimeException) +{ + // create diagram + Reference< chart2::XDiagram > xDia( new Diagram( m_xContext ) ); + + // modify diagram + FillDiagram( xDia, aSeriesSeq ); + + // create and attach legend + Reference< chart2::XLegend > xLegend( + m_xContext->getServiceManager()->createInstanceWithContext( + C2U( "drafts.com.sun.star.chart2.Legend" ), + m_xContext ), + uno::UNO_QUERY ); + + xDia->setLegend( xLegend ); + fillEmptyLegend( xLegend, xDia ); + + return xDia; +} + +// simple first approach +void SAL_CALL ChartTypeTemplate::changeDiagram( const Reference< chart2::XDiagram >& xDiagram ) + throw (uno::RuntimeException) +{ + Sequence< Reference< chart2::XDataSeries > > aSeriesSeq( lcl_GetDataSeries( xDiagram )); + FillDiagram( xDiagram, aSeriesSeq ); + + Reference< chart2::XLegend > xLegend( xDiagram->getLegend()); + lcl_FlushLegend( xLegend ); + fillEmptyLegend( xLegend, xDiagram ); +} + +// ________________________________________ + +sal_Int32 ChartTypeTemplate::getDimension() const +{ + return 2; +} + +chart2::StackMode ChartTypeTemplate::getStackMode() const +{ + return chart2::StackMode_NONE; +} + +// ________________________________________ + +Reference< chart2::XBoundedCoordinateSystem > ChartTypeTemplate::createCoordinateSystem( + const Reference< chart2::XBoundedCoordinateSystemContainer > & xCoordSysCnt ) +{ + Reference< chart2::XCoordinateSystem > xCoordSys( new CartesianCoordinateSystem( getDimension() )); + Reference< chart2::XBoundedCoordinateSystem > xResult( + new BoundedCoordinateSystem( xCoordSys )); + + chart2::ScaleData aScale; + aScale.Orientation = chart2::AxisOrientation_MATHEMATICAL; + aScale.Scaling = new LinearScaling( 1.0, 0.0 ); + + for( sal_Int32 i = 0; i < getDimension(); ++i ) + xResult->setScaleByDimension( + i, Reference< chart2::XScale >( new Scale( m_xContext, aScale ) )); + + try + { + if( xCoordSys.is()) + xCoordSysCnt->addCoordinateSystem( xResult ); + } + catch( lang::IllegalArgumentException ex ) + { + ASSERT_EXCEPTION( ex ); + } + + return xResult; +} + +void ChartTypeTemplate::createAndAddAxes( + const Reference< chart2::XBoundedCoordinateSystem > & rCoordSys, + const Reference< chart2::XAxisContainer > & rOutAxisCnt ) +{ + if( rCoordSys.is() && rOutAxisCnt.is()) + { + // create axes + Reference< chart2::XAxis > aAxis; + sal_Int32 nDim = rCoordSys->getDimension(), + i = 0; + + for( ; i < nDim; ++i ) + MeterHelper::createAxis( i, rCoordSys, rOutAxisCnt, m_xContext ); + } +} + +void ChartTypeTemplate::createAndAddGrids( + const Reference< chart2::XBoundedCoordinateSystem > & rCoordSys, + const Reference< chart2::XGridContainer > & rOutGridCnt ) +{ + // just add one y-grid + static const sal_Int32 nGridDim = 1; + + if( rOutGridCnt.is() && + rCoordSys.is() && + rCoordSys->getDimension() >= 2 ) + { + ContextHelper::tContextEntryMapType aContextValues( + ContextHelper::MakeContextEntryMap + ( C2U( "Identifier" ), uno::makeAny( MeterHelper::makeGridIdentifier( 1, 0, true ) )) + ); + + Reference< chart2::XGrid > xGrid( + m_xContext->getServiceManager()->createInstanceWithContext( + C2U( "drafts.com.sun.star.chart2.Grid" ), + ContextHelper::createContext( aContextValues, m_xContext ) ), + uno::UNO_QUERY ); + + if( xGrid.is()) + { + // try to share XIncrement with axis + Reference< chart2::XAxisContainer > xAxisCnt( rOutGridCnt, uno::UNO_QUERY ); + if( xAxisCnt.is()) + { + Sequence< Reference< chart2::XAxis > > aAxes( xAxisCnt->getAxes()); + for( sal_Int32 i = 0; i < aAxes.getLength(); ++i ) + { + if( aAxes[i].is() && + aAxes[i]->getRepresentedDimension() == nGridDim && + aAxes[i]->getCoordinateSystem() == rCoordSys ) + { + xGrid->setIncrement( aAxes[i]->getIncrement()); + break; + } + } + } + + xGrid->attachCoordinateSystem( rCoordSys, nGridDim ); + rOutGridCnt->addGrid( xGrid ); + } + } +} + +void ChartTypeTemplate::FillDiagram( + const Reference< chart2::XDiagram >& xDiagram, + const Sequence< Reference< chart2::XDataSeries > >& aSeriesSeq ) +{ + Reference< chart2::XBoundedCoordinateSystemContainer > xCoordSysCnt( xDiagram, uno::UNO_QUERY ); + // scales + Reference< chart2::XBoundedCoordinateSystem > xCoordSys( createCoordinateSystem( xCoordSysCnt )); + + // data series tree + Reference< chart2::XDataSeriesTreeParent > xTree( + createDataSeriesTree( aSeriesSeq, xCoordSys)); + xDiagram->setTree( xTree ); + +#if OSL_DEBUG_LEVEL > 1 + lcl_ShowTree( xTree ); +#endif + + // set stacking mode +// sal_Int32 nStyle = CHSTYLE_ADDIN; +// getFastPropertyValue( PROP_CHARTTYPE_CHART_TEMPLATE_NAME ) >>= nStyle; +// SetStackModeAtTree( xTree, lcl_GetStackModeForChartStyle( +// static_cast< ChartStyle >( nStyle ) )); + + // axes + Reference< chart2::XAxisContainer > xAxisCnt( xDiagram, uno::UNO_QUERY ); + OSL_ASSERT( xAxisCnt.is()); + if( xAxisCnt.is()) + { + // remove formerly existing axes + Sequence< Reference< chart2::XAxis > > aAxes( xAxisCnt->getAxes() ); + sal_Int32 i = 0; + for( ; i < aAxes.getLength(); ++i ) + { + xAxisCnt->removeAxis( aAxes[ i ] ); + } + + createAndAddAxes( xCoordSys, xAxisCnt ); + } + + // grid + Reference< chart2::XGridContainer > xGridCnt( xDiagram, uno::UNO_QUERY ); + if( xGridCnt.is()) + { + Sequence< Reference< chart2::XGrid > > aGrids( xGridCnt->getGrids() ); + sal_Int32 i = 0; + for( ; i < aGrids.getLength(); ++i ) + { + xGridCnt->removeGrid( aGrids[ i ] ); + } + + createAndAddGrids( xCoordSys, xGridCnt ); + } +} + +Reference< chart2::XDataSeriesTreeParent > ChartTypeTemplate::createRootNode() +{ + Reference< chart2::XDataSeriesTreeParent > aRoot( + m_xContext->getServiceManager()->createInstanceWithContext( + C2U( "drafts.com.sun.star.chart2.DataSeriesTree" ), m_xContext ), + uno::UNO_QUERY ); + OSL_ASSERT( aRoot.is()); + + return aRoot; +} + +Reference< chart2::XDataSeriesTreeNode > ChartTypeTemplate::createChartTypeGroup( + const Reference< chart2::XChartType > & xChartType ) +{ + Reference< chart2::XDataSeriesTreeNode > aChartTypeNode( + m_xContext->getServiceManager()->createInstanceWithContext( + C2U( "drafts.com.sun.star.chart2.ChartTypeGroup" ), m_xContext ), + uno::UNO_QUERY ); + OSL_ASSERT( aChartTypeNode.is()); + Reference< chart2::XChartTypeGroup > aChartTypeGroup( aChartTypeNode, uno::UNO_QUERY ); + OSL_ASSERT( aChartTypeGroup.is()); + aChartTypeGroup->setChartType( xChartType ); + + return aChartTypeNode; +} + +void ChartTypeTemplate::addDataSeriesToGroup( + const Reference< chart2::XDataSeriesTreeNode > & rParent, + const Sequence< Reference< chart2::XDataSeries > > & rDataSeries ) +{ + Reference< chart2::XDataSeriesTreeParent > xParent( rParent, uno::UNO_QUERY ); + OSL_ASSERT( xParent.is()); + if( xParent.is()) + { + const sal_Int32 nSeriesCount = rDataSeries.getLength(); + sal_Int32 i = 0; + for( i = 0; i < nSeriesCount; ++i ) + { + Reference< chart2::XDataSeriesTreeNode > xNode( rDataSeries[ i ], uno::UNO_QUERY ); + xParent->addChild( xNode ); + } + } +} + + +Reference< chart2::XDataSeriesTreeNode > ChartTypeTemplate::createScaleGroup( + bool bIsDiscrete, + bool bIsStackable, + Reference< chart2::XBoundedCoordinateSystem > xCoordSys, + sal_Int32 nRepresentedDimension, + chart2::StackMode eStackMode /* = chart2::StackMode_NONE */ ) +{ + ContextHelper::tContextEntryMapType aContextValues( + ContextHelper::MakeContextEntryMap + ( C2U( "CoordinateSystem" ), uno::makeAny( xCoordSys ) ) + ( C2U( "RepresentedDimension" ), uno::makeAny( sal_Int32( nRepresentedDimension ) ) ) + ); + + Reference< chart2::XDataSeriesTreeNode > aNode; + ::rtl::OUString aServiceName; + + if( bIsDiscrete ) + { + if( bIsStackable ) + aServiceName = C2U( "drafts.com.sun.star.chart2.DiscreteStackableScaleGroup" ); + else + aServiceName = C2U( "drafts.com.sun.star.chart2.DiscreteScaleGroup" ); + } + else + { + if( bIsStackable ) + aServiceName = C2U( "drafts.com.sun.star.chart2.ContinuousStackableScaleGroup" ); + else + aServiceName = C2U( "drafts.com.sun.star.chart2.ContinuousScaleGroup" ); + } + + aNode.set( + m_xContext->getServiceManager()->createInstanceWithContext( + aServiceName, + ContextHelper::createContext( aContextValues, m_xContext )), + uno::UNO_QUERY ); + + OSL_ASSERT( aNode.is()); + + Reference< chart2::XStackableScaleGroup > aStackGroup( aNode, uno::UNO_QUERY ); + if( aStackGroup.is()) + aStackGroup->setStackMode( eStackMode ); + + return aNode; +} + +void ChartTypeTemplate::attachNodeToNode( + const Reference< chart2::XDataSeriesTreeNode > & rParent, + const Reference< chart2::XDataSeriesTreeNode > & rChild ) +{ + Reference< chart2::XDataSeriesTreeParent > xParent( rParent, uno::UNO_QUERY ); + OSL_ASSERT( xParent.is()); + if( xParent.is()) + xParent->addChild( rChild ); +} + +Reference< chart2::XDataSeriesTreeParent > ChartTypeTemplate::createDataSeriesTree( + const Sequence< Reference< chart2::XDataSeries > > & aSeriesSeq, + const Reference< chart2::XBoundedCoordinateSystem > & rCoordSys ) +{ + // create series tree nodes + // root + Reference< chart2::XDataSeriesTreeParent > aRoot( createRootNode()); + + // chart type group + Reference< chart2::XDataSeriesTreeNode > aChartTypeNode( + createChartTypeGroup( getChartTypeForAdditionalSeries())); + + // 'x-axis' group + Reference< chart2::XDataSeriesTreeNode > aCategoryNode( + createScaleGroup( true, true, rCoordSys, 0, chart2::StackMode_STACKED )); + + // 'y-axis' group + Reference< chart2::XDataSeriesTreeNode > aValueNode( + createScaleGroup( false, true, rCoordSys, 1, getStackMode() )); + + // build tree + // add series node to value node + addDataSeriesToGroup( aValueNode, aSeriesSeq ); + + // add value node to category node + attachNodeToNode( aCategoryNode, aValueNode ); + + // add category node to chart type node + attachNodeToNode( aChartTypeNode, aCategoryNode ); + + // add chart type node to root of tree + aRoot->addChild( aChartTypeNode ); + + return aRoot; +} + +// finds all chart type groups in the given diagram tree and adds them to the +// legend +void ChartTypeTemplate::fillEmptyLegend( + const Reference< chart2::XLegend > & xLegend, + const Reference< chart2::XDiagram > & xDiagram ) +{ + if( xLegend.is() && + xDiagram.is() ) + { + Reference< chart2::XDataSeriesTreeParent > xRoot( xDiagram->getTree()); + + Sequence< Reference< chart2::XDataSeriesTreeNode > > aChildren( xRoot->getChildren()); + for( sal_Int32 i = 0; i < aChildren.getLength(); ++i ) + { + Reference< lang::XServiceInfo > xInfo( aChildren[ i ], uno::UNO_QUERY ); + if( xInfo.is() && + xInfo->supportsService( C2U( "drafts.com.sun.star.chart2.ChartTypeGroup" ))) + { + Reference< chart2::XLegendEntry > xEntry( xInfo, uno::UNO_QUERY ); + if( xEntry.is()) + xLegend->registerEntry( xEntry ); + } + } + } +} + +void ChartTypeTemplate::setStackModeAtTree( + const Reference< chart2::XDataSeriesTreeParent > & rTree, + chart2::StackMode eMode ) +{ + bool bResult = lcl_SetStackModeAtTree( rTree, eMode ); + OSL_ENSURE( bResult, "stack-mode could not be set" ); +} + +// ________ + +Sequence< OUString > ChartTypeTemplate::getSupportedServiceNames_Static() +{ + Sequence< OUString > aServices( 3 ); + aServices[ 0 ] = C2U( "drafts.com.sun.star.chart2.ChartTypeTemplate" ); + aServices[ 1 ] = C2U( "drafts.com.sun.star.layout.LayoutElement" ); + aServices[ 2 ] = C2U( "com.sun.star.beans.PropertySet" ); + return aServices; +} + +Reference< uno::XComponentContext > ChartTypeTemplate::GetComponentContext() const +{ + return m_xContext; +} + +// ================================================================================ + +// implement XServiceInfo methods basing upon getSupportedServiceNames_Static +APPHELPER_XSERVICEINFO_IMPL( ChartTypeTemplate, + C2U( "com.sun.star.comp.chart.ChartTypeTemplate" )); +} // namespace chart + +// ____ DEBUG helper ____ + +#if OSL_DEBUG_LEVEL > 1 +namespace +{ + +// prints the data series tree +void lcl_ShowTree( const Reference< chart2::XDataSeriesTreeParent > & xParent, sal_Int32 nLevel ) +{ + if( nLevel == 0 ) + { + OSL_TRACE( "DataSeriesTree" ); + OSL_TRACE( "--------------" ); + } + + if( xParent.is()) + { +// char aIndent[ nLevel * 4 + 1]; + char aIndent[ 200 ]; + // avoids including any C-headers + for( int j = 0; j < nLevel * 4; ++j ) + aIndent[j] = ' '; + aIndent[j] = '\0'; + + Sequence< Reference< chart2::XDataSeriesTreeNode > > aChildren( xParent->getChildren()); + for( sal_Int32 i = 0; i < aChildren.getLength(); ++i ) + { + Reference< lang::XServiceInfo > xInfo( aChildren[ i ], uno::UNO_QUERY ); + if( xInfo.is()) + { + Reference< chart2::XStackableScaleGroup > xStackableGroup( xInfo, uno::UNO_QUERY ); + Reference< chart2::XScaleGroup > xScaleGroup( xInfo, uno::UNO_QUERY ); + bool bIsDiscrete = ( xInfo->supportsService( + C2U( "drafts.com.sun.star.chart2.DiscreteScaleGroup" )) || + xInfo->supportsService( + C2U( "drafts.com.sun.star.chart2.DiscreteStackableScaleGroup" ))); + + if( xStackableGroup.is()) + { + if( xStackableGroup.is()) + { + OSL_TRACE( "%s<%s stackable scale group> (Dim %d, %s)", + aIndent, + bIsDiscrete ? "discrete" : "continuous", + xStackableGroup->getRepresentedDimension(), + ( xStackableGroup->getStackMode() == chart2::StackMode_NONE ) + ? "unstacked" + : ( xStackableGroup->getStackMode() == chart2::StackMode_STACKED ) + ? "stacked" + : "percent stacked" ); + } + else + { + OSL_TRACE( "%s<stackable scale group>", aIndent ); + } + } + else if( xScaleGroup.is()) + { + if( xStackableGroup.is()) + { + OSL_TRACE( "%s<%s scale group> (Dim %d)", + aIndent, + bIsDiscrete ? "discrete" : "continuous", + xScaleGroup->getRepresentedDimension() ); + } + else + { + OSL_TRACE( "%s<scale group>", aIndent ); + } + } + else if( xInfo->supportsService( C2U( "drafts.com.sun.star.chart2.ChartTypeGroup" ))) + { + Reference< chart2::XChartTypeGroup > xGroup( xInfo, uno::UNO_QUERY ); + if( xGroup.is() ) + { + OSL_TRACE( "%s<chart type group> (%s)", aIndent, U2C( xGroup->getChartType()->getChartType()) ); + } + else + { + OSL_TRACE( "%s<chart type group>", aIndent ); + } + } + else if( xInfo->supportsService( C2U( "drafts.com.sun.star.chart2.DataSeries" ))) + { + Reference< beans::XPropertySet > xProp( xInfo, uno::UNO_QUERY ); + ::rtl::OUString aId; + if( xProp.is() && + ( xProp->getPropertyValue( C2U( "Identifier" )) >>= aId )) + { + OSL_TRACE( "%s<data series> (%s)", aIndent, U2C( aId )); + } + else + { + OSL_TRACE( "%s<data series>", aIndent ); + } + } + else + { + OSL_TRACE( "%s<unknown Node>", aIndent ); + } + } + else + { + OSL_TRACE( "%s<unknown Node>", aIndent ); + } + + Reference< chart2::XDataSeriesTreeParent > xNewParent( aChildren[ i ], uno::UNO_QUERY ); + if( xNewParent.is()) + lcl_ShowTree( xNewParent, nLevel + 1 ); + } + } +} +} // anonymous namespace +#endif diff --git a/chart2/source/model/template/ChartTypeTemplate.hxx b/chart2/source/model/template/ChartTypeTemplate.hxx new file mode 100644 index 000000000..99f79a854 --- /dev/null +++ b/chart2/source/model/template/ChartTypeTemplate.hxx @@ -0,0 +1,274 @@ +/************************************************************************* + * + * $RCSfile: ChartTypeTemplate.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:32 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef CHART_CHARTTYPETEMPLATE_HXX +#define CHART_CHARTTYPETEMPLATE_HXX + +#ifndef _CPPUHELPER_IMPLBASE1_HXX_ +#include <cppuhelper/implbase1.hxx> +#endif +#include "ServiceMacros.hxx" + +#ifndef _COM_SUN_STAR_UNO_XCOMPONENTCONTEXT_HPP_ +#include <com/sun/star/uno/XComponentContext.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XCHARTTYPETEMPLATE_HPP_ +#include <drafts/com/sun/star/chart2/XChartTypeTemplate.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XAXISCONTAINER_HPP_ +#include <drafts/com/sun/star/chart2/XAxisContainer.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_STACKMODE_HPP_ +#include <drafts/com/sun/star/chart2/StackMode.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XGRIDCONTAINER_HPP_ +#include <drafts/com/sun/star/chart2/XGridContainer.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XBOUNDEDCOORDINATESYSTEMCONTAINER_HPP_ +#include <drafts/com/sun/star/chart2/XBoundedCoordinateSystemContainer.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XLEGEND_HPP_ +#include <drafts/com/sun/star/chart2/XLegend.hpp> +#endif + +namespace chart +{ + +class ChartTypeTemplate : public ::cppu::WeakImplHelper1< + ::drafts::com::sun::star::chart2::XChartTypeTemplate > +{ +public: + explicit ChartTypeTemplate( + ::com::sun::star::uno::Reference< + ::com::sun::star::uno::XComponentContext > const & xContext ); + virtual ~ChartTypeTemplate(); + + APPHELPER_XSERVICEINFO_DECL() + /// establish methods for factory instatiation +// APPHELPER_SERVICE_FACTORY_HELPER( ChartTypeTemplate ) + +protected: + // ____ XChartTypeTemplate ____ + // still abstract ! + virtual ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XChartType > SAL_CALL getChartTypeForAdditionalSeries() + throw (::com::sun::star::uno::RuntimeException) = 0; + virtual ::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XDiagram > SAL_CALL + createDiagram( const ::com::sun::star::uno::Sequence< + ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XDataSeries > >& aSeriesSeq ) + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL changeDiagram( + const ::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XDiagram >& xDiagram ) + throw (::com::sun::star::uno::RuntimeException); + + // Methods to overload for automatic creation + // ------------------------------------------ + + /// returns 2 by default. Supported are 2 and 3 + virtual sal_Int32 getDimension() const; + + /** returns StackMode_NONE by default. This is a global flag used for all series + if createDataSeriesTree() is not overloaded + */ + virtual ::drafts::com::sun::star::chart2::StackMode getStackMode() const; + + // Methods for creating the diagram piecewise + // ------------------------------------------ + + /** Creates a 2d or 3d cartesian coordinate system with mathematically + oriented, linear scales with auto-min/max. + + <p>The dimension depends on the property "ChartStyle".</p> + + @param xCoordSysCnt + If this container is valid, the coordinate system is added to it. + */ + virtual ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XBoundedCoordinateSystem > + createCoordinateSystem( + const ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XBoundedCoordinateSystemContainer > & xCoordSysCnt ); + + /** create axes and add them to the given container. + + <p>As default, this method creates as many axes as there are dimensions + in the given coordinate system. Each of the axis represents one of the + dimensions of the coordinate system.</p> + */ + virtual void createAndAddAxes( + const ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XBoundedCoordinateSystem > & rCoordSys, + const ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XAxisContainer > & rOutAxisCnt ); + + /** create grids and add them to the given container. + + <p>As default, this method creates a major grid for the second + coordinate of the coordinate system.</p> + */ + virtual void createAndAddGrids( + const ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XBoundedCoordinateSystem > & rCoordSys, + const ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XGridContainer > & rOutGridCnt ); + + /** create a data series tree, that fits the requirements of the chart type. + + <p>As default, this creates a tree with the following structure:</p> + + <pre> + root + | + +-- chart type + | + +-- category (DiscreteStackableScaleGroup using scale 0) + | + +-- values (ContinuousStackableScaleGroup using scale 1) + | + +-- series 0 + | + +-- series 1 + | + ... + | + +.. series n-1 + </pre> + + <p>If there are less than two scales available the returned tree is + empty.</p> + */ + virtual ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XDataSeriesTreeParent > createDataSeriesTree( + const ::com::sun::star::uno::Sequence< + ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XDataSeries > >& aSeriesSeq, + const ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XBoundedCoordinateSystem > & rCoordSys + ); + + virtual void fillEmptyLegend( + const ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XLegend > & xLegend, + const ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XDiagram > & xDiagram ); + + // helper methods + // -------------- + ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XDataSeriesTreeParent > createRootNode(); + + ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XDataSeriesTreeNode > + createChartTypeGroup( + const ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XChartType > & xChartType ); + + ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XDataSeriesTreeNode > + createScaleGroup( bool bIsDiscrete, + bool bIsStackable, + ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XBoundedCoordinateSystem > xCoordSys, + sal_Int32 nRepresentedDimension, + ::drafts::com::sun::star::chart2::StackMode eStackMode = + ::drafts::com::sun::star::chart2::StackMode_NONE ); + + void addDataSeriesToGroup( + const ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XDataSeriesTreeNode > & rParent, + const ::com::sun::star::uno::Sequence< + ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XDataSeries > > & rDataSeries ); + + /** Finds the first ContinuousScaleGroup in the tree and sets the stacking + mode there if it is a stackable group + */ + void setStackModeAtTree( + const ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XDataSeriesTreeParent > & rTree, + ::drafts::com::sun::star::chart2::StackMode eMode ); + + void attachNodeToNode( + const ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XDataSeriesTreeNode > & rParent, + const ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XDataSeriesTreeNode > & rChild ); + + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > + GetComponentContext() const; + +private: + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > + m_xContext; + + /** modifies the given diagram + */ + void FillDiagram( const ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XDiagram > & xDiagram, + const ::com::sun::star::uno::Sequence< + ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XDataSeries > >& aSeriesSeq ); +}; + +} // namespace chart + +// CHART_CHARTTYPETEMPLATE_HXX +#endif diff --git a/chart2/source/model/template/ColumnLineChartTypeTemplate.cxx b/chart2/source/model/template/ColumnLineChartTypeTemplate.cxx new file mode 100644 index 000000000..4a264b6d1 --- /dev/null +++ b/chart2/source/model/template/ColumnLineChartTypeTemplate.cxx @@ -0,0 +1,175 @@ +/************************************************************************* + * + * $RCSfile: ColumnLineChartTypeTemplate.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:32 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "ColumnLineChartTypeTemplate.hxx" +#include "macros.hxx" +#include "LineChartType.hxx" +#include "BarChartType.hxx" + +#include <algorithm> + +using namespace ::com::sun::star; +using namespace ::drafts::com::sun::star; + +using ::com::sun::star::uno::Reference; +using ::com::sun::star::uno::Sequence; +using ::rtl::OUString; + +namespace chart +{ + +ColumnLineChartTypeTemplate::ColumnLineChartTypeTemplate( + Reference< + uno::XComponentContext > const & xContext, + chart2::StackMode eStackMode, + sal_Int32 nNumberOfLines ) : + ChartTypeTemplate( xContext ), + m_eStackMode( eStackMode ), + m_nNumberOfLines( nNumberOfLines ) +{} + +ColumnLineChartTypeTemplate::~ColumnLineChartTypeTemplate() +{} + +Reference< chart2::XDataSeriesTreeParent > ColumnLineChartTypeTemplate::createDataSeriesTree( + const Sequence< Reference< chart2::XDataSeries > > & aSeriesSeq, + const Reference< chart2::XBoundedCoordinateSystem > & rCoordSys ) +{ + // create series tree nodes + // root + Reference< chart2::XDataSeriesTreeParent > aRoot( createRootNode()); + + sal_Int32 nNumberOfBars = aSeriesSeq.getLength(); + sal_Int32 nNumberOfLines = m_nNumberOfLines; + if( nNumberOfLines >= nNumberOfBars ) + { + nNumberOfLines = 1; + nNumberOfBars -= 1; + } + else + nNumberOfBars -= nNumberOfLines; + + // Bars + // ---- + // chart type group + Reference< chart2::XDataSeriesTreeNode > aBarNode( + createChartTypeGroup( new BarChartType() )); + + // 'x-axis' group + Reference< chart2::XDataSeriesTreeNode > aBarCategoryNode( + createScaleGroup( true, true, rCoordSys, 0, chart2::StackMode_STACKED )); + + // 'y-axis' group + Reference< chart2::XDataSeriesTreeNode > aBarValueNode( + createScaleGroup( false, true, rCoordSys, 1, m_eStackMode )); + + // Lines + // ----- + // chart type group + Reference< chart2::XDataSeriesTreeNode > aLineNode( + createChartTypeGroup( new LineChartType() )); + + // 'x-axis' group + Reference< chart2::XDataSeriesTreeNode > aLineCategoryNode( + createScaleGroup( true, false, rCoordSys, 0, chart2::StackMode_STACKED )); + + // 'y-axis' group + Reference< chart2::XDataSeriesTreeNode > aLineValueNode( + createScaleGroup( false, false, rCoordSys, 1, chart2::StackMode_NONE )); + + // Build Tree + // ---------- + + // add series node to value nodes + Sequence< Reference< chart2::XDataSeries > > aBarSeq( nNumberOfBars ); + ::std::copy( aSeriesSeq.getConstArray(), + aSeriesSeq.getConstArray() + nNumberOfBars, + aBarSeq.getArray()); + addDataSeriesToGroup( aBarValueNode, aBarSeq ); + + Sequence< Reference< chart2::XDataSeries > > aLineSeq( nNumberOfLines ); + ::std::copy( aSeriesSeq.getConstArray() + nNumberOfBars, + aSeriesSeq.getConstArray() + aSeriesSeq.getLength(), + aLineSeq.getArray()); + addDataSeriesToGroup( aLineValueNode, aLineSeq ); + + // add value nodes to category nodes + attachNodeToNode( aBarCategoryNode, aBarValueNode ); + attachNodeToNode( aLineCategoryNode, aLineValueNode ); + + // add category node to chart type node + attachNodeToNode( aBarNode, aBarCategoryNode ); + attachNodeToNode( aLineNode, aLineCategoryNode ); + + // add chart type nodes to root of tree + aRoot->addChild( aBarNode ); + aRoot->addChild( aLineNode ); + + return aRoot; +} + +// ____ XChartTypeTemplate ____ +uno::Reference< chart2::XChartType > SAL_CALL ColumnLineChartTypeTemplate::getChartTypeForAdditionalSeries() + throw (uno::RuntimeException) +{ + return new LineChartType(); +} + +} // namespace chart diff --git a/chart2/source/model/template/ColumnLineChartTypeTemplate.hxx b/chart2/source/model/template/ColumnLineChartTypeTemplate.hxx new file mode 100644 index 000000000..fed23a93a --- /dev/null +++ b/chart2/source/model/template/ColumnLineChartTypeTemplate.hxx @@ -0,0 +1,108 @@ +/************************************************************************* + * + * $RCSfile: ColumnLineChartTypeTemplate.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:32 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef CHART_COLUMNLINECHARTTYPETEMPLATE_HXX +#define CHART_COLUMNLINECHARTTYPETEMPLATE_HXX + +#include "ChartTypeTemplate.hxx" + +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_STACKMODE_HPP_ +#include <drafts/com/sun/star/chart2/StackMode.hpp> +#endif + +namespace chart +{ + +class ColumnLineChartTypeTemplate : public ChartTypeTemplate +{ +public: + explicit ColumnLineChartTypeTemplate( + ::com::sun::star::uno::Reference< + ::com::sun::star::uno::XComponentContext > const & xContext, + ::drafts::com::sun::star::chart2::StackMode eStackMode, + sal_Int32 nNumberOfLines ); + virtual ~ColumnLineChartTypeTemplate(); + +protected: + // ____ XChartTypeTemplate ____ + virtual ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XChartType > SAL_CALL getChartTypeForAdditionalSeries() + throw (::com::sun::star::uno::RuntimeException); + + // ____ ChartTypeTemplate ____ + virtual ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XDataSeriesTreeParent > createDataSeriesTree( + const ::com::sun::star::uno::Sequence< + ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XDataSeries > >& aSeriesSeq, + const ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XBoundedCoordinateSystem > & rCoordSys + ); + +private: + ::drafts::com::sun::star::chart2::StackMode + m_eStackMode; + sal_Int32 m_nNumberOfLines; +}; + +} // namespace chart + +// CHART_COLUMNLINECHARTTYPETEMPLATE_HXX +#endif diff --git a/chart2/source/model/template/LineChartType.cxx b/chart2/source/model/template/LineChartType.cxx new file mode 100644 index 000000000..b4c366ac2 --- /dev/null +++ b/chart2/source/model/template/LineChartType.cxx @@ -0,0 +1,83 @@ +/************************************************************************* + * + * $RCSfile: LineChartType.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:32 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "LineChartType.hxx" + +using namespace ::com::sun::star; +using namespace ::drafts::com::sun::star; + +namespace chart +{ + +LineChartType::LineChartType( sal_Int32 nDim /* = 2 */ ) : + ChartType( nDim ) +{} + +LineChartType::~LineChartType() +{} + +// ____ XChartType ____ +::rtl::OUString SAL_CALL LineChartType::getChartType() + throw (uno::RuntimeException) +{ + return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart2.LineChart" )); +} + +} // namespace chart diff --git a/chart2/source/model/template/LineChartType.hxx b/chart2/source/model/template/LineChartType.hxx new file mode 100644 index 000000000..8dd307702 --- /dev/null +++ b/chart2/source/model/template/LineChartType.hxx @@ -0,0 +1,84 @@ +/************************************************************************* + * + * $RCSfile: LineChartType.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:32 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef CHART_LINECHARTTYPE_HXX +#define CHART_LINECHARTTYPE_HXX + +#include "ChartType.hxx" + +namespace chart +{ + +class LineChartType : public ChartType +{ +public: + LineChartType( sal_Int32 nDim = 2 ); + virtual ~LineChartType(); + +protected: + // ____ XChartType ____ + virtual ::rtl::OUString SAL_CALL getChartType() + throw (::com::sun::star::uno::RuntimeException); +}; + +} // namespace chart + +// CHART_LINECHARTTYPE_HXX +#endif diff --git a/chart2/source/model/template/LineChartTypeTemplate.cxx b/chart2/source/model/template/LineChartTypeTemplate.cxx new file mode 100644 index 000000000..1334b365c --- /dev/null +++ b/chart2/source/model/template/LineChartTypeTemplate.cxx @@ -0,0 +1,104 @@ +/************************************************************************* + * + * $RCSfile: LineChartTypeTemplate.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:32 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "LineChartTypeTemplate.hxx" +#include "LineChartType.hxx" + +using namespace ::com::sun::star; +using namespace ::drafts::com::sun::star; + +namespace chart +{ + +LineChartTypeTemplate::LineChartTypeTemplate( + uno::Reference< + uno::XComponentContext > const & xContext, + chart2::StackMode eStackMode, + SplineMode eSplineMode, + bool bSymbols, + sal_Int32 nDim /* = 2 */ ) : + ChartTypeTemplate( xContext ), + m_eStackMode( eStackMode ), + m_eSplineMode( eSplineMode ), + m_bHasSymbols( bSymbols ), + m_nDim( nDim ) +{} + +LineChartTypeTemplate::~LineChartTypeTemplate() +{} + +sal_Int32 LineChartTypeTemplate::getDimension() const +{ + return m_nDim; +} + +chart2::StackMode LineChartTypeTemplate::getStackMode() const +{ + return m_eStackMode; +} + +// ____ XChartTypeTemplate ____ +uno::Reference< chart2::XChartType > SAL_CALL LineChartTypeTemplate::getChartTypeForAdditionalSeries() + throw (uno::RuntimeException) +{ + return new LineChartType( m_nDim ); +} + +} // namespace chart diff --git a/chart2/source/model/template/LineChartTypeTemplate.hxx b/chart2/source/model/template/LineChartTypeTemplate.hxx new file mode 100644 index 000000000..d8c2c9391 --- /dev/null +++ b/chart2/source/model/template/LineChartTypeTemplate.hxx @@ -0,0 +1,111 @@ +/************************************************************************* + * + * $RCSfile: LineChartTypeTemplate.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:32 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef CHART_LINECHARTTYPETEMPLATE_HXX +#define CHART_LINECHARTTYPETEMPLATE_HXX + +#include "ChartTypeTemplate.hxx" + +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_STACKMODE_HPP_ +#include <drafts/com/sun/star/chart2/StackMode.hpp> +#endif + +namespace chart +{ + +class LineChartTypeTemplate : public ChartTypeTemplate +{ +public: + enum SplineMode + { + NO_SPLINE, + CUBIC_SPLINE, + B_SPLINE + }; + + explicit LineChartTypeTemplate( + ::com::sun::star::uno::Reference< + ::com::sun::star::uno::XComponentContext > const & xContext, + ::drafts::com::sun::star::chart2::StackMode eStackMode, SplineMode eSplineMode, + bool bSymbols, sal_Int32 nDim = 2 ); + virtual ~LineChartTypeTemplate(); + +protected: + // ____ ChartTypeTemplate ____ + virtual sal_Int32 getDimension() const; + virtual ::drafts::com::sun::star::chart2::StackMode getStackMode() const; + + // ____ XChartTypeTemplate ____ + virtual ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XChartType > SAL_CALL getChartTypeForAdditionalSeries() + throw (::com::sun::star::uno::RuntimeException); + +private: + ::drafts::com::sun::star::chart2::StackMode + m_eStackMode; + SplineMode m_eSplineMode; + bool m_bHasSymbols; + sal_Int32 m_nDim; +}; + +} // namespace chart + +// CHART_LINECHARTTYPETEMPLATE_HXX +#endif diff --git a/chart2/source/model/template/PieChartType.cxx b/chart2/source/model/template/PieChartType.cxx new file mode 100644 index 000000000..afc3247c3 --- /dev/null +++ b/chart2/source/model/template/PieChartType.cxx @@ -0,0 +1,220 @@ +/************************************************************************* + * + * $RCSfile: PieChartType.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:32 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "PieChartType.hxx" +#include "PropertyHelper.hxx" +#include "algohelper.hxx" +#include "macros.hxx" + +#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HPP_ +#include <com/sun/star/beans/PropertyAttribute.hpp> +#endif + +using namespace ::com::sun::star; +using namespace ::drafts::com::sun::star; + +using ::rtl::OUString; +using ::com::sun::star::beans::Property; +using ::com::sun::star::uno::Sequence; +using ::com::sun::star::uno::Reference; +using ::com::sun::star::uno::Any; +using ::osl::MutexGuard; + +namespace +{ + +enum +{ + PROP_PIECHARTTYPE_DIMENSION, + PROP_PIECHARTTYPE_OFFSET +}; + +void lcl_AddPropertiesToVector( + ::std::vector< Property > & rOutProperties ) +{ + rOutProperties.push_back( + Property( C2U( "Dimension" ), + PROP_PIECHARTTYPE_DIMENSION, + ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEDEFAULT )); + + rOutProperties.push_back( + Property( C2U( "Offset" ), + PROP_PIECHARTTYPE_OFFSET, + ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEDEFAULT )); +} + +void lcl_AddDefaultsToMap( + ::chart::helper::tPropertyValueMap & rOutMap ) +{ + // must match default in CTOR! + OSL_ASSERT( rOutMap.end() == rOutMap.find( PROP_PIECHARTTYPE_DIMENSION )); + rOutMap[ PROP_PIECHARTTYPE_DIMENSION ] = + uno::makeAny( sal_Int32( 2 ) ); + + OSL_ASSERT( rOutMap.end() == rOutMap.find( PROP_PIECHARTTYPE_OFFSET )); + rOutMap[ PROP_PIECHARTTYPE_OFFSET ] = + uno::makeAny( sal_Int32( 0 ) ); +} + +const Sequence< Property > & lcl_GetPropertySequence() +{ + static Sequence< Property > aPropSeq; + + // /-- + ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); + if( 0 == aPropSeq.getLength() ) + { + // get properties + ::std::vector< ::com::sun::star::beans::Property > aProperties; + lcl_AddPropertiesToVector( aProperties ); + + // and sort them for access via bsearch + ::std::sort( aProperties.begin(), aProperties.end(), + ::chart::helper::PropertyNameLess() ); + + // transfer result to static Sequence + aPropSeq = ::chart::helper::VectorToSequence( aProperties ); + } + + return aPropSeq; +} + +} // anonymous namespace + +namespace chart +{ + +PieChartType::PieChartType( + sal_Int32 nDim /* = 2 */, + sal_Int32 nOffset /* = 0 */ ) : + ChartType( nDim ) +{ + setFastPropertyValue_NoBroadcast( PROP_PIECHARTTYPE_OFFSET, uno::makeAny( nOffset )); +} + +PieChartType::~PieChartType() +{} + +// ____ XChartType ____ +::rtl::OUString SAL_CALL PieChartType::getChartType() + throw (uno::RuntimeException) +{ + return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart2.PieChart" )); +} + + +// ____ OPropertySet ____ +uno::Any PieChartType::GetDefaultValue( sal_Int32 nHandle ) const + throw(beans::UnknownPropertyException) +{ + static helper::tPropertyValueMap aStaticDefaults; + + // /-- + ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); + if( 0 == aStaticDefaults.size() ) + { + // initialize defaults + lcl_AddDefaultsToMap( aStaticDefaults ); + } + + helper::tPropertyValueMap::const_iterator aFound( + aStaticDefaults.find( nHandle )); + + if( aFound == aStaticDefaults.end()) + return uno::Any(); + + return (*aFound).second; + // \-- +} + +// ____ OPropertySet ____ +::cppu::IPropertyArrayHelper & SAL_CALL PieChartType::getInfoHelper() +{ + static ::cppu::OPropertyArrayHelper aArrayHelper( lcl_GetPropertySequence(), + /* bSorted = */ sal_True ); + + return aArrayHelper; +} + + +// ____ XPropertySet ____ +uno::Reference< beans::XPropertySetInfo > SAL_CALL + PieChartType::getPropertySetInfo() + throw (uno::RuntimeException) +{ + static uno::Reference< beans::XPropertySetInfo > xInfo; + + // /-- + ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); + if( !xInfo.is()) + { + xInfo = ::cppu::OPropertySetHelper::createPropertySetInfo( + getInfoHelper()); + } + + return xInfo; + // \-- +} + +} // namespace chart diff --git a/chart2/source/model/template/PieChartType.hxx b/chart2/source/model/template/PieChartType.hxx new file mode 100644 index 000000000..2e389f6e1 --- /dev/null +++ b/chart2/source/model/template/PieChartType.hxx @@ -0,0 +1,97 @@ +/************************************************************************* + * + * $RCSfile: PieChartType.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:32 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef CHART_PIECHARTTYPE_HXX +#define CHART_PIECHARTTYPE_HXX + +#include "ChartType.hxx" + +namespace chart +{ + +class PieChartType : public ChartType +{ +public: + PieChartType( sal_Int32 nDim = 2, + sal_Int32 nOffset = 0 ); + virtual ~PieChartType(); + +protected: + // ____ XChartType ____ + virtual ::rtl::OUString SAL_CALL getChartType() + throw (::com::sun::star::uno::RuntimeException); + + // ____ OPropertySet ____ + virtual ::com::sun::star::uno::Any GetDefaultValue( sal_Int32 nHandle ) const + throw(::com::sun::star::beans::UnknownPropertyException); + + // ____ OPropertySet ____ + virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper(); + + // ____ XPropertySet ____ + virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL + getPropertySetInfo() + throw (::com::sun::star::uno::RuntimeException); +}; + +} // namespace chart + +// CHART_PIECHARTTYPE_HXX +#endif diff --git a/chart2/source/model/template/PieChartTypeTemplate.cxx b/chart2/source/model/template/PieChartTypeTemplate.cxx new file mode 100644 index 000000000..01037b7d4 --- /dev/null +++ b/chart2/source/model/template/PieChartTypeTemplate.cxx @@ -0,0 +1,222 @@ +/************************************************************************* + * + * $RCSfile: PieChartTypeTemplate.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:32 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "PieChartTypeTemplate.hxx" +#include "PolarCoordinateSystem.hxx" +#include "BoundedCoordinateSystem.hxx" +#include "Scaling.hxx" +#include "PieChartType.hxx" +#include "Scale.hxx" +#include "macros.hxx" + +using namespace ::com::sun::star; +using namespace ::drafts::com::sun::star; + +using ::rtl::OUString; +using ::com::sun::star::beans::Property; +using ::com::sun::star::uno::Sequence; +using ::com::sun::star::uno::Reference; +using ::com::sun::star::uno::Any; +using ::osl::MutexGuard; + +namespace chart +{ + +PieChartTypeTemplate::PieChartTypeTemplate( + uno::Reference< + uno::XComponentContext > const & xContext, + PieOffsetMode eMode, + bool bRings /* = false */, + sal_Int32 nDim /* = 2 */ ) : + ChartTypeTemplate( xContext ), + m_ePieOffsetMode( eMode ), + m_nDim( nDim ), + m_bIsRingChart( bRings ) +{} + +PieChartTypeTemplate::~PieChartTypeTemplate() +{} + +sal_Int32 PieChartTypeTemplate::getDimension() const +{ + return m_nDim; +} + +uno::Reference< chart2::XBoundedCoordinateSystem > PieChartTypeTemplate::createCoordinateSystem( + const uno::Reference< chart2::XBoundedCoordinateSystemContainer > & xCoordSysCnt ) +{ + uno::Reference< chart2::XCoordinateSystem > xCoordSys( + new PolarCoordinateSystem( getDimension() )); + uno::Reference< chart2::XBoundedCoordinateSystem > xResult( + new BoundedCoordinateSystem( xCoordSys )); + + chart2::ScaleData aScale; + aScale.Orientation = chart2::AxisOrientation_MATHEMATICAL; + aScale.Scaling = new LinearScaling( 1.0, 0.0 ); + + for( sal_Int32 i = 0; i < getDimension(); ++i ) + xResult->setScaleByDimension( + i, uno::Reference< chart2::XScale >( new Scale( GetComponentContext(), aScale ) )); + + try + { + if( xCoordSys.is()) + xCoordSysCnt->addCoordinateSystem( xResult ); + } + catch( lang::IllegalArgumentException ex ) + { + ASSERT_EXCEPTION( ex ); + } + + return xResult; +} + +void PieChartTypeTemplate::createAndAddAxes( + const uno::Reference< chart2::XBoundedCoordinateSystem > & rCoordSys, + const uno::Reference< chart2::XAxisContainer > & rOutAxisCnt ) +{ + // do nothing -- there are no axes in a pie chart +} + +Reference< chart2::XDataSeriesTreeParent > PieChartTypeTemplate::createDataSeriesTree( + const Sequence< Reference< chart2::XDataSeries > > & aSeriesSeq, + const Reference< chart2::XBoundedCoordinateSystem > & rCoordSys ) +{ + sal_Int32 nOffset = (m_ePieOffsetMode == NO_OFFSET) + ? 0 + : m_nDefaultOffset; + + // create series tree nodes + // root + Reference< chart2::XDataSeriesTreeParent > aRoot( createRootNode()); + + // chart type group + Reference< chart2::XDataSeriesTreeNode > aChartTypeNode( + createChartTypeGroup( new PieChartType( m_nDim, nOffset ))); + + // 'x-axis' group + Reference< chart2::XDataSeriesTreeNode > aCategoryNode( + createScaleGroup( true, true, rCoordSys, 0, chart2::StackMode_STACKED )); + + // 'y-axis' group + Reference< chart2::XDataSeriesTreeNode > aValueNode( + createScaleGroup( false, true, rCoordSys, 1, getStackMode() )); + + // add chart type node to root of tree + aRoot->addChild( aChartTypeNode ); + + // build tree + // add series node to value node + if( m_ePieOffsetMode == FIRST_EXPLODED ) + { + if( aSeriesSeq.getLength() >= 1 ) + { + Sequence< Reference< chart2::XDataSeries > > aFirst( aSeriesSeq.getConstArray(), 1 ); + addDataSeriesToGroup( aValueNode, aFirst ); + } + + if( aSeriesSeq.getLength() > 1 ) + { + // chart type group + Reference< chart2::XDataSeriesTreeNode > aChartTypeNode2( + createChartTypeGroup( new PieChartType( m_nDim, 0 ))); + + // 'x-axis' group + Reference< chart2::XDataSeriesTreeNode > aCategoryNode2( + createScaleGroup( true, true, rCoordSys, 0, chart2::StackMode_STACKED )); + + // 'y-axis' group + Reference< chart2::XDataSeriesTreeNode > aValueNode2( + createScaleGroup( false, true, rCoordSys, 1, getStackMode() )); + + Sequence< Reference< chart2::XDataSeries > > aRest( aSeriesSeq.getConstArray() + 1, + aSeriesSeq.getLength() - 1 ); + addDataSeriesToGroup( aValueNode2, aRest ); + + attachNodeToNode( aCategoryNode2, aValueNode2 ); + attachNodeToNode( aChartTypeNode2, aCategoryNode2 ); + + aRoot->addChild( aChartTypeNode2 ); + } + } + else + addDataSeriesToGroup( aValueNode, aSeriesSeq ); + + // add value node to category node + attachNodeToNode( aCategoryNode, aValueNode ); + + // add category node to chart type node + attachNodeToNode( aChartTypeNode, aCategoryNode ); + + return aRoot; +} + +// ____ XChartTypeTemplate ____ +uno::Reference< chart2::XChartType > SAL_CALL PieChartTypeTemplate::getChartTypeForAdditionalSeries() + throw (uno::RuntimeException) +{ + sal_Int32 nOffset = 0; + if( m_ePieOffsetMode == ALL_EXPLODED ) + nOffset = m_nDefaultOffset; + + return new PieChartType( m_nDim, nOffset ); +} + +} // namespace chart diff --git a/chart2/source/model/template/PieChartTypeTemplate.hxx b/chart2/source/model/template/PieChartTypeTemplate.hxx new file mode 100644 index 000000000..8d2bbdd24 --- /dev/null +++ b/chart2/source/model/template/PieChartTypeTemplate.hxx @@ -0,0 +1,129 @@ +/************************************************************************* + * + * $RCSfile: PieChartTypeTemplate.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:32 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef CHART_PIECHARTTYPETEMPLATE_HXX +#define CHART_PIECHARTTYPETEMPLATE_HXX + +#include "ChartTypeTemplate.hxx" + +namespace chart +{ + +class PieChartTypeTemplate : public ChartTypeTemplate +{ +public: + enum PieOffsetMode + { + NO_OFFSET, + FIRST_EXPLODED, + ALL_EXPLODED + }; + + PieChartTypeTemplate( + ::com::sun::star::uno::Reference< + ::com::sun::star::uno::XComponentContext > const & xContext, + PieOffsetMode eMode, + bool bRings = false, + sal_Int32 nDim = 2 ); + virtual ~PieChartTypeTemplate(); + +protected: + // ____ ChartTypeTemplate ____ + virtual sal_Int32 getDimension() const; + + virtual void createAndAddAxes( + const ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XBoundedCoordinateSystem > & rCoordSys, + const ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XAxisContainer > & rOutAxisCnt ); + + virtual ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XBoundedCoordinateSystem > + createCoordinateSystem( + const ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XBoundedCoordinateSystemContainer > & xCoordSysCnt ); + + virtual ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XDataSeriesTreeParent > createDataSeriesTree( + const ::com::sun::star::uno::Sequence< + ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XDataSeries > >& aSeriesSeq, + const ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XBoundedCoordinateSystem > & rCoordSys + ); + + // ____ XChartTypeTemplate ____ + virtual ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XChartType > SAL_CALL getChartTypeForAdditionalSeries() + throw (::com::sun::star::uno::RuntimeException); + +private: + PieOffsetMode m_ePieOffsetMode; + sal_Int32 m_nDim; + bool m_bIsRingChart; + + // same value as in old chart + static const sal_Int32 m_nDefaultOffset = 10; +}; + +} // namespace chart + +// CHART_PIECHARTTYPETEMPLATE_HXX +#endif diff --git a/chart2/source/model/template/makefile.mk b/chart2/source/model/template/makefile.mk new file mode 100644 index 000000000..a24cb6d3e --- /dev/null +++ b/chart2/source/model/template/makefile.mk @@ -0,0 +1,95 @@ +#************************************************************************* +# +# $RCSfile: makefile.mk,v $ +# +# $Revision: 1.1.1.1 $ +# +# last change: $Author: bm $ $Date: 2003-10-06 09:58:32 $ +# +# The Contents of this file are made available subject to the terms of +# either of the following licenses +# +# - GNU Lesser General Public License Version 2.1 +# - Sun Industry Standards Source License Version 1.1 +# +# Sun Microsystems Inc., October, 2000 +# +# GNU Lesser General Public License Version 2.1 +# ============================================= +# Copyright 2000 by Sun Microsystems, Inc. +# 901 San Antonio Road, Palo Alto, CA 94303, USA +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License version 2.1, as published by the Free Software Foundation. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# +# +# Sun Industry Standards Source License Version 1.1 +# ================================================= +# The contents of this file are subject to the Sun Industry Standards +# Source License Version 1.1 (the "License"); You may not use this file +# except in compliance with the License. You may obtain a copy of the +# License at http://www.openoffice.org/license.html. +# +# Software provided under this License is provided on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, +# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, +# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. +# See the License for the specific provisions governing your rights and +# obligations concerning the Software. +# +# The Initial Developer of the Original Code is: Sun Microsystems, Inc. +# +# Copyright: 2000 by Sun Microsystems, Inc. +# +# All Rights Reserved. +# +# Contributor(s): _______________________________________ +# +# +# +#************************************************************************* + +PRJ= ..$/..$/.. +PRJNAME= chart2 +TARGET= chmodeltemplate + +PRJINC= $(PRJ)$/source + +ENABLE_EXCEPTIONS= TRUE + +# --- Settings ----------------------------------------------------- + +.INCLUDE: settings.mk + +# --- export library ------------------------------------------------- + +#Specifies object files to bind into linked libraries. +SLOFILES= \ + $(SLO)$/AreaChartType.obj \ + $(SLO)$/AreaChartTypeTemplate.obj \ + $(SLO)$/BarChartType.obj \ + $(SLO)$/BarChartTypeTemplate.obj \ + $(SLO)$/ChartType.obj \ + $(SLO)$/ChartTypeManager.obj \ + $(SLO)$/ChartTypeTemplate.obj \ + $(SLO)$/ColumnLineChartTypeTemplate.obj \ + $(SLO)$/DoubleStackedBarChartTypeTemplate.obj \ + $(SLO)$/LineChartType.obj \ + $(SLO)$/LineChartTypeTemplate.obj \ + $(SLO)$/PieChartType.obj \ + $(SLO)$/PieChartTypeTemplate.obj + +# --- Targets ----------------------------------------------------------------- + +.INCLUDE: target.mk diff --git a/chart2/source/tools/ChartModelHelper.cxx b/chart2/source/tools/ChartModelHelper.cxx new file mode 100644 index 000000000..50e560395 --- /dev/null +++ b/chart2/source/tools/ChartModelHelper.cxx @@ -0,0 +1,213 @@ +/************************************************************************* + * + * $RCSfile: ChartModelHelper.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:32 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "ChartModelHelper.hxx" +#include "macros.hxx" + +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XCHARTDOCUMENT_HPP_ +#include <drafts/com/sun/star/chart2/XChartDocument.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XCHARTTYPEGROUP_HPP_ +#include <drafts/com/sun/star/chart2/XChartTypeGroup.hpp> +#endif + +// header for define DBG_ASSERT +#ifndef _TOOLS_DEBUG_HXX +#include <tools/debug.hxx> +#endif + +//............................................................................. +namespace chart +{ +//............................................................................. +using namespace ::com::sun::star; +using namespace ::drafts::com::sun::star::chart2; + +//static +uno::Reference< XDiagram > ChartModelHelper::findDiagram( const uno::Reference< frame::XModel >& xModel ) +{ + uno::Reference< XChartDocument > xChartDoc( xModel, uno::UNO_QUERY ); + if( xChartDoc.is()) + return xChartDoc->getDiagram(); + return NULL; +} + +//static +sal_Int32 ChartModelHelper::getDimensionAndFirstChartType( const uno::Reference< XDiagram >& xDiagram, rtl::OUString& rChartType ) +{ + sal_Int32 nDimension = 2; + + //@todo maybe get the dimension better from diagram properties ... -> need model change + if(!xDiagram.is()) + return nDimension; + uno::Reference< XDataSeriesTreeParent > xTree = xDiagram->getTree(); + if(!xTree.is()) + return nDimension; + uno::Sequence< uno::Reference< XDataSeriesTreeNode > > aChartTypes( xTree->getChildren() ); + for( sal_Int32 i = 0; i < aChartTypes.getLength(); ++i ) + { + uno::Reference< XChartTypeGroup > xChartTypeGroup( aChartTypes[i], uno::UNO_QUERY ); + DBG_ASSERT(xChartTypeGroup.is(),"First node at the diagram tree needs to be a ChartTypeGroup"); + if( !xChartTypeGroup.is() ) + continue; + uno::Reference< XChartType > xChartType = xChartTypeGroup->getChartType(); + if( !xChartType.is() ) + continue; + uno::Reference< beans::XPropertySet > xChartTypeProp( xChartType, uno::UNO_QUERY ); + if( xChartTypeProp.is()) + { + try + { + if( (xChartTypeProp->getPropertyValue( C2U( "Dimension" )) >>= nDimension) ) + { + rChartType = xChartType->getChartType(); + return nDimension; + } + else + { + DBG_ERROR( "Couldn't get Dimension from ChartTypeGroup" ); + } + } + catch( beans::UnknownPropertyException ex ) + { + ASSERT_EXCEPTION( ex ); + } + break; + } + } + return nDimension; +} + +namespace +{ +void lcl_addSeries( uno::Reference< XDataSeriesTreeParent > xParent, + ::std::vector< uno::Reference< XDataSeries > > & rOutSeriesVec ) +{ + if( xParent.is()) + { + uno::Sequence< uno::Reference< XDataSeriesTreeNode > > aChildren( xParent->getChildren()); + for( sal_Int32 i = 0; i < aChildren.getLength(); ++i ) + { + uno::Reference< XDataSeries > aDataSeries( aChildren[ i ], uno::UNO_QUERY ); + if( aDataSeries.is()) + { + rOutSeriesVec.push_back( aDataSeries ); + } + else + { + uno::Reference< XDataSeriesTreeParent > xNewParent( aChildren[ i ], uno::UNO_QUERY ); + if( xNewParent.is()) + lcl_addSeries( xNewParent, rOutSeriesVec ); + } + } + } +} +} // anonymous namespace + +// static +::std::vector< uno::Reference< XDataSeries > > ChartModelHelper::getDataSeries( + const uno::Reference< frame::XModel > & xModel ) +{ + ::std::vector< uno::Reference< XDataSeries > > aResult; + uno::Reference< XChartDocument > xDocument( xModel, uno::UNO_QUERY ); + if( xDocument.is()) + { + uno::Reference< XDiagram > xDia( xDocument->getDiagram()); + if( xDia.is()) + lcl_addSeries( xDia->getTree(), aResult ); + } + + return aResult; +} + +//static +uno::Reference< XDataSeries > ChartModelHelper::getSeriesByIdentifier( + const rtl::OUString& rIdentifier + , const uno::Reference< frame::XModel > xModel ) +{ + if(!rIdentifier.getLength()) + return NULL; + + ::std::vector< uno::Reference< XDataSeries > > aSeriesList( + getDataSeries( xModel )); + uno::Reference< XDataSeries > xRet; + uno::Reference< beans::XPropertySet > xProp; + rtl::OUString aIdentifier; + + ::std::vector< uno::Reference< XDataSeries > >::const_iterator aIt; + for( aIt = aSeriesList.begin(); aIt != aSeriesList.end(); ++aIt ) + { + xProp = uno::Reference< beans::XPropertySet >( *aIt, uno::UNO_QUERY ); + if(!xProp.is()) + continue; + uno::Any aAIdentifier = xProp->getPropertyValue( C2U( "Identifier" ) ); + aAIdentifier >>= aIdentifier; + if(aIdentifier.getLength() && rIdentifier.match(aIdentifier)) + { + xRet = *aIt; + break; + } + } + return xRet; +} + +//............................................................................. +} //namespace chart +//............................................................................. diff --git a/chart2/source/tools/CommonConverters.cxx b/chart2/source/tools/CommonConverters.cxx new file mode 100644 index 000000000..53df5d1f1 --- /dev/null +++ b/chart2/source/tools/CommonConverters.cxx @@ -0,0 +1,640 @@ +/************************************************************************* + * + * $RCSfile: CommonConverters.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:32 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef __CHART_COMMON_CONVERTERS_HXX +#include "CommonConverters.hxx" +#endif + +#ifndef _COM_SUN_STAR_DRAWING_DOUBLESEQUENCE_HPP_ +#include <com/sun/star/drawing/DoubleSequence.hpp> +#endif +#ifndef _COM_SUN_STAR_TEXT_WRITINGMODE2_HPP_ +#include <com/sun/star/text/WritingMode2.hpp> +#endif + +#include <cstdarg> + + +//............................................................................. +namespace chart +{ +//............................................................................. + +using namespace ::com::sun::star; + +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +// diverse methods for class conversions; e.g. Matrix4D to HomogenMatrix +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- + +drawing::HomogenMatrix Matrix4DToHomogenMatrix( const Matrix4D& rM4 ) +{ + drawing::HomogenMatrix aHM; + aHM.Line1.Column1 = rM4[0][0]; + aHM.Line1.Column2 = rM4[0][1]; + aHM.Line1.Column3 = rM4[0][2]; + aHM.Line1.Column4 = rM4[0][3]; + aHM.Line2.Column1 = rM4[1][0]; + aHM.Line2.Column2 = rM4[1][1]; + aHM.Line2.Column3 = rM4[1][2]; + aHM.Line2.Column4 = rM4[1][3]; + aHM.Line3.Column1 = rM4[2][0]; + aHM.Line3.Column2 = rM4[2][1]; + aHM.Line3.Column3 = rM4[2][2]; + aHM.Line3.Column4 = rM4[2][3]; + aHM.Line4.Column1 = rM4[3][0]; + aHM.Line4.Column2 = rM4[3][1]; + aHM.Line4.Column3 = rM4[3][2]; + aHM.Line4.Column4 = rM4[3][3]; + return aHM; +} + +Matrix4D HomogenMatrixToMatrix4D( + const drawing::HomogenMatrix& rHM ) +{ + Matrix4D aM4; + aM4[0][0] = rHM.Line1.Column1; + aM4[0][1] = rHM.Line1.Column2; + aM4[0][2] = rHM.Line1.Column3; + aM4[0][3] = rHM.Line1.Column4; + aM4[1][0] = rHM.Line2.Column1; + aM4[1][1] = rHM.Line2.Column2; + aM4[1][2] = rHM.Line2.Column3; + aM4[1][3] = rHM.Line2.Column4; + aM4[2][0] = rHM.Line3.Column1; + aM4[2][1] = rHM.Line3.Column2; + aM4[2][2] = rHM.Line3.Column3; + aM4[2][3] = rHM.Line3.Column4; + aM4[3][0] = rHM.Line4.Column1; + aM4[3][1] = rHM.Line4.Column2; + aM4[3][2] = rHM.Line4.Column3; + aM4[3][3] = rHM.Line4.Column4; + return aM4; +} + +Matrix3D IgnoreZ( const Matrix4D& rM4 ) +{ + Matrix3D aM3; + aM3[0][0] = rM4[0][0]; + aM3[0][1] = rM4[0][1]; + aM3[0][2] = rM4[0][3]; + aM3[1][0] = rM4[1][0]; + aM3[1][1] = rM4[1][1]; + aM3[1][2] = rM4[1][3]; + aM3[2][0] = rM4[3][0]; + aM3[2][1] = rM4[3][1]; + aM3[2][2] = rM4[3][3]; + return aM3; +} + + +drawing::HomogenMatrix3 Matrix3DToHomogenMatrix3( const Matrix3D& rM3 ) +{ + drawing::HomogenMatrix3 aHM; + aHM.Line1.Column1 = rM3[0][0]; + aHM.Line1.Column2 = rM3[0][1]; + aHM.Line1.Column3 = rM3[0][2]; + aHM.Line2.Column1 = rM3[1][0]; + aHM.Line2.Column2 = rM3[1][1]; + aHM.Line2.Column3 = rM3[1][2]; + aHM.Line3.Column1 = rM3[2][0]; + aHM.Line3.Column2 = rM3[2][1]; + aHM.Line3.Column3 = rM3[2][2]; + return aHM; +} + +Matrix3D HomogenMatrix3ToMatrix3D( const drawing::HomogenMatrix3& rHM ) +{ + Matrix3D aM3; + aM3[0][0] = rHM.Line1.Column1; + aM3[0][1] = rHM.Line1.Column2; + aM3[0][2] = rHM.Line1.Column3; + aM3[1][0] = rHM.Line2.Column1; + aM3[1][1] = rHM.Line2.Column2; + aM3[1][2] = rHM.Line2.Column3; + aM3[2][0] = rHM.Line3.Column1; + aM3[2][1] = rHM.Line3.Column2; + aM3[2][2] = rHM.Line3.Column3; + return aM3; +} + +Vector3D Position3DToVector3D( const drawing::Position3D& rPosition ) +{ + return Vector3D( + rPosition.PositionX + , rPosition.PositionY + , rPosition.PositionZ + ); +} + +drawing::Direction3D Vector3DToDirection3D( const Vector3D& rVector) +{ + return drawing::Direction3D( + rVector.X() + , rVector.Y() + , rVector.Z() + ); +} + +/* +drawing::PolyPolygonShape3D XPolygonToPolyPolygonShape3D( const XPolygon& rP ) +{ + USHORT nPointCount = rP.GetPointCount(); + + drawing::PolyPolygonShape3D aPP; + + aPP.SequenceX.realloc(1); + aPP.SequenceY.realloc(1); + aPP.SequenceZ.realloc(1); + + drawing::DoubleSequence* pOuterSequenceX = aPP.SequenceX.getArray(); + drawing::DoubleSequence* pOuterSequenceY = aPP.SequenceY.getArray(); + drawing::DoubleSequence* pOuterSequenceZ = aPP.SequenceZ.getArray(); + + pOuterSequenceX->realloc(nPointCount); + pOuterSequenceY->realloc(nPointCount); + pOuterSequenceZ->realloc(nPointCount); + + double* pInnerSequenceX = pOuterSequenceX->getArray(); + double* pInnerSequenceY = pOuterSequenceY->getArray(); + double* pInnerSequenceZ = pOuterSequenceZ->getArray(); + + for(sal_Int32 nN = 0; nN < nPointCount; nN++) + { + *pInnerSequenceX++ = (double)rP[nN].X(); + *pInnerSequenceY++ = (double)rP[nN].Y(); + *pInnerSequenceZ++ = 0.0; + } + return aPP; +} +*/ + +drawing::PolyPolygonShape3D MakeLine3D( + const drawing::Position3D & rStart, + const drawing::Position3D & rEnd ) +{ + drawing::PolyPolygonShape3D aPP; + + aPP.SequenceX.realloc(1); + aPP.SequenceY.realloc(1); + aPP.SequenceZ.realloc(1); + + drawing::DoubleSequence* pOuterSequenceX = aPP.SequenceX.getArray(); + drawing::DoubleSequence* pOuterSequenceY = aPP.SequenceY.getArray(); + drawing::DoubleSequence* pOuterSequenceZ = aPP.SequenceZ.getArray(); + + pOuterSequenceX->realloc(2); + pOuterSequenceY->realloc(2); + pOuterSequenceZ->realloc(2); + + double* pInnerSequenceX = pOuterSequenceX->getArray(); + double* pInnerSequenceY = pOuterSequenceY->getArray(); + double* pInnerSequenceZ = pOuterSequenceZ->getArray(); + + *pInnerSequenceX++ = rStart.PositionX; + *pInnerSequenceY++ = rStart.PositionY; + *pInnerSequenceZ++ = rStart.PositionZ; + + *pInnerSequenceX++ = rEnd.PositionX; + *pInnerSequenceY++ = rEnd.PositionY; + *pInnerSequenceZ++ = rEnd.PositionZ; + + return aPP; +} + +void AddPointToPoly( drawing::PolyPolygonShape3D& rPoly, const drawing::Position3D& rPos, sal_Int32 nPolygonIndex ) +{ + if(nPolygonIndex<0) + { + OSL_ENSURE( false, "The polygon index needs to be > 0"); + nPolygonIndex=0; + } + + //make sure that we have enough polygons + if(nPolygonIndex >= rPoly.SequenceX.getLength() ) + { + rPoly.SequenceX.realloc(nPolygonIndex+1); + rPoly.SequenceY.realloc(nPolygonIndex+1); + rPoly.SequenceZ.realloc(nPolygonIndex+1); + } + + drawing::DoubleSequence* pOuterSequenceX = &rPoly.SequenceX.getArray()[nPolygonIndex]; + drawing::DoubleSequence* pOuterSequenceY = &rPoly.SequenceY.getArray()[nPolygonIndex]; + drawing::DoubleSequence* pOuterSequenceZ = &rPoly.SequenceZ.getArray()[nPolygonIndex]; + + sal_Int32 nOldPointCount = pOuterSequenceX->getLength(); + + pOuterSequenceX->realloc(nOldPointCount+1); + pOuterSequenceY->realloc(nOldPointCount+1); + pOuterSequenceZ->realloc(nOldPointCount+1); + + double* pInnerSequenceX = pOuterSequenceX->getArray(); + double* pInnerSequenceY = pOuterSequenceY->getArray(); + double* pInnerSequenceZ = pOuterSequenceZ->getArray(); + + pInnerSequenceX[nOldPointCount] = rPos.PositionX; + pInnerSequenceY[nOldPointCount] = rPos.PositionY; + pInnerSequenceZ[nOldPointCount] = rPos.PositionZ; +} + +void appendPoly( drawing::PolyPolygonShape3D& rRet, const drawing::PolyPolygonShape3D& rAdd ) +{ + sal_Int32 nOuterCount = Max( rRet.SequenceX.getLength(), rAdd.SequenceX.getLength() ); + rRet.SequenceX.realloc(nOuterCount); + rRet.SequenceY.realloc(nOuterCount); + rRet.SequenceZ.realloc(nOuterCount); + + for( sal_Int32 nOuter=0;nOuter<nOuterCount;nOuter++ ) + { + sal_Int32 nOldPointCount = rRet.SequenceX[nOuter].getLength(); + sal_Int32 nAddPointCount = 0; + if(nOuter<rAdd.SequenceX.getLength()) + nAddPointCount = rAdd.SequenceX[nOuter].getLength(); + if(!nAddPointCount) + continue; + + sal_Int32 nNewPointCount = nOldPointCount + nAddPointCount; + + rRet.SequenceX[nOuter].realloc(nNewPointCount); + rRet.SequenceY[nOuter].realloc(nNewPointCount); + rRet.SequenceZ[nOuter].realloc(nNewPointCount); + + sal_Int32 nPointTarget=nOldPointCount; + sal_Int32 nPointSource=nAddPointCount; + for( ; nPointSource-- ; nPointTarget++ ) + { + rRet.SequenceX[nOuter][nPointTarget] = rAdd.SequenceX[nOuter][nPointSource]; + rRet.SequenceY[nOuter][nPointTarget] = rAdd.SequenceY[nOuter][nPointSource]; + rRet.SequenceZ[nOuter][nPointTarget] = rAdd.SequenceZ[nOuter][nPointSource]; + } + } +} + +/* +drawing::PolyPolygonShape3D operator+( + const drawing::PolyPolygonShape3D& rPoly1 + , const drawing::PolyPolygonShape3D& rPoly2 ) +{ + drawing::PolyPolygonShape3D aRet; + + sal_Int32 nOuterCount = Max( rPoly1.SequenceX.getLength(), rPoly2.SequenceX.getLength() ); + aRet.SequenceX.realloc(nOuterCount); + aRet.SequenceY.realloc(nOuterCount); + aRet.SequenceZ.realloc(nOuterCount); + + for( sal_Int32 nOuter=0;nOuter<nOuterCount;nOuter++ ) + { + sal_Int32 nPointCount_1 = 0; + sal_Int32 nPointCount_2 = 0; + if(nOuter<rPoly1.SequenceX.getLength()) + nPointCount_1 = rPoly1.SequenceX[nOuter].getLength(); + if(nOuter<rPoly2.SequenceX.getLength()) + nPointCount_2 = rPoly2.SequenceX[nOuter].getLength(); + + sal_Int32 nPointCount = nPointCount_1 + nPointCount_2; + + aRet.SequenceX[nOuter].realloc(nPointCount); + aRet.SequenceY[nOuter].realloc(nPointCount); + aRet.SequenceZ[nOuter].realloc(nPointCount); + + sal_Int32 nPointTarget=0; + + { + sal_Int32 nPointSourceCount = nPointCount_1; + const drawing::PolyPolygonShape3D* pPoly = &rPoly1; + for( sal_Int32 nPointSource=0; nPointSource<nPointSourceCount ; nPointSource++,nPointTarget++ ) + { + aRet.SequenceX[nOuter][nPointTarget] = pPoly->SequenceX[nOuter][nPointSource]; + aRet.SequenceY[nOuter][nPointTarget] = pPoly->SequenceY[nOuter][nPointSource]; + aRet.SequenceZ[nOuter][nPointTarget] = pPoly->SequenceZ[nOuter][nPointSource]; + } + } + { + sal_Int32 nPointSourceCount = nPointCount_2; + const drawing::PolyPolygonShape3D* pPoly = &rPoly2; + for( sal_Int32 nPointSource=nPointSourceCount; nPointSource-- ; nPointTarget++ ) + { + aRet.SequenceX[nOuter][nPointTarget] = pPoly->SequenceX[nOuter][nPointSource]; + aRet.SequenceY[nOuter][nPointTarget] = pPoly->SequenceY[nOuter][nPointSource]; + aRet.SequenceZ[nOuter][nPointTarget] = pPoly->SequenceZ[nOuter][nPointSource]; + } + } + } + return aRet; +} +*/ +/* +drawing::PolyPolygonShape3D operator+( + const drawing::PolyPolygonShape3D& rPoly1 + , const drawing::PolyPolygonShape3D& rPoly2 ) +{ + drawing::PolyPolygonShape3D aRet; + + sal_Int32 nOuterCount = rPoly1.SequenceX.getLength()+rPoly2.SequenceX.getLength(); + aRet.SequenceX.realloc(nOuterCount); + aRet.SequenceY.realloc(nOuterCount); + aRet.SequenceZ.realloc(nOuterCount); + + drawing::DoubleSequence* pOuterSequenceX = aRet.SequenceX.getArray(); + drawing::DoubleSequence* pOuterSequenceY = aRet.SequenceY.getArray(); + drawing::DoubleSequence* pOuterSequenceZ = aRet.SequenceZ.getArray(); + + for( sal_Int32 nOuterTarget=0;nOuterTarget<nOuterCount;nOuterTarget++ ) + { + const drawing::PolyPolygonShape3D* pPoly = &rPoly1; + sal_Int32 nOuterSource = nOuterTarget; + if(nOuterTarget>=rPoly1.SequenceX.getLength()) + { + pPoly = &rPoly2; + nOuterSource -= rPoly1.SequenceX.getLength(); + } + + sal_Int32 nPointCount = pPoly->SequenceX[nOuterSource].getLength(); + + pOuterSequenceX->realloc(nPointCount); + pOuterSequenceY->realloc(nPointCount); + pOuterSequenceZ->realloc(nPointCount); + + double* pInnerSequenceX = pOuterSequenceX->getArray(); + double* pInnerSequenceY = pOuterSequenceY->getArray(); + double* pInnerSequenceZ = pOuterSequenceZ->getArray(); + + for( sal_Int32 nPoint=0;nPoint<nPointCount;nPoint++ ) + { + *pInnerSequenceX = pPoly->SequenceX[nOuterSource][nPoint]; + *pInnerSequenceY = pPoly->SequenceY[nOuterSource][nPoint]; + *pInnerSequenceZ = pPoly->SequenceZ[nOuterSource][nPoint]; + + pInnerSequenceX++; pInnerSequenceY++; pInnerSequenceZ++; + } + + pOuterSequenceX++; pOuterSequenceY++; pOuterSequenceZ++; + } + return aRet; +} +*/ + +drawing::PointSequenceSequence PolyToPointSequence( + const drawing::PolyPolygonShape3D& rPolyPolygon ) +{ + drawing::PointSequenceSequence aRet; + aRet.realloc( rPolyPolygon.SequenceX.getLength() ); + + for(sal_Int32 nN = 0; nN < rPolyPolygon.SequenceX.getLength(); nN++) + { + sal_Int32 nInnerLength = rPolyPolygon.SequenceX[nN].getLength(); + aRet[nN].realloc( nInnerLength ); + for( sal_Int32 nM = 0; nM < nInnerLength; nM++) + { + aRet[nN][nM].X = static_cast<sal_Int32>(rPolyPolygon.SequenceX[nN][nM]); + aRet[nN][nM].Y = static_cast<sal_Int32>(rPolyPolygon.SequenceY[nN][nM]); + } + } + return aRet; +} + +Polygon PolyToToolsPoly( const drawing::PolyPolygonShape3D& rPolyPolygon ) +{ + sal_Int32 nOuterLength = rPolyPolygon.SequenceX.getLength(); + if(!nOuterLength) + return Polygon(); + + sal_Int32 nNewSize = nOuterLength; + sal_Int32 nNewIndex = 0; + Polygon aRet(static_cast<USHORT>(nNewSize)); + + for(sal_Int32 nN = 0; nN < nOuterLength; nN++) + { + sal_Int32 nInnerLength = rPolyPolygon.SequenceX[nN].getLength(); + nNewSize += nInnerLength-1, + aRet.SetSize(static_cast<USHORT>(nNewSize)); + for( sal_Int32 nM = 0; nM < nInnerLength; nM++) + { + aRet.SetPoint( Point( static_cast<long>(rPolyPolygon.SequenceX[nN][nM]) + , static_cast<long>(rPolyPolygon.SequenceY[nN][nM]) + ) + , static_cast<USHORT>(nNewIndex) ); + nNewIndex++; + } + } + return aRet; +} + +drawing::PolyPolygonShape3D ToolsPolyToPoly( const Polygon& rToolsPoly, double zValue ) +{ + sal_Int32 nPointCount = rToolsPoly.GetSize(); + + drawing::PolyPolygonShape3D aPP; + + aPP.SequenceX.realloc(1); + aPP.SequenceY.realloc(1); + aPP.SequenceZ.realloc(1); + + drawing::DoubleSequence* pOuterSequenceX = aPP.SequenceX.getArray(); + drawing::DoubleSequence* pOuterSequenceY = aPP.SequenceY.getArray(); + drawing::DoubleSequence* pOuterSequenceZ = aPP.SequenceZ.getArray(); + + pOuterSequenceX->realloc(nPointCount); + pOuterSequenceY->realloc(nPointCount); + pOuterSequenceZ->realloc(nPointCount); + + double* pInnerSequenceX = pOuterSequenceX->getArray(); + double* pInnerSequenceY = pOuterSequenceY->getArray(); + double* pInnerSequenceZ = pOuterSequenceZ->getArray(); + + for( sal_Int32 nN = 0; nN<nPointCount; nN++ ) + { + const Point& rPos = rToolsPoly.GetPoint( static_cast<USHORT>(nN) ); + *pInnerSequenceX++ = rPos.X(); + *pInnerSequenceY++ = rPos.Y(); + *pInnerSequenceZ++ = zValue; + } + + return aPP; +} + +drawing::Position3D operator+( const drawing::Position3D& rPos + , const drawing::Direction3D& rDirection) +{ + return drawing::Position3D( + rPos.PositionX + rDirection.DirectionX + , rPos.PositionY + rDirection.DirectionY + , rPos.PositionZ + rDirection.DirectionZ + ); +} + +drawing::Position3D operator-( const drawing::Position3D& rPos + , const drawing::Direction3D& rDirection) +{ + return drawing::Position3D( + rPos.PositionX - rDirection.DirectionX + , rPos.PositionY - rDirection.DirectionY + , rPos.PositionZ - rDirection.DirectionZ + ); +} + +drawing::Direction3D operator-( const drawing::Position3D& rPos1 + , const drawing::Position3D& rPos2) +{ + return drawing::Direction3D( + rPos1.PositionX - rPos2.PositionX + , rPos1.PositionY - rPos2.PositionY + , rPos1.PositionZ - rPos2.PositionZ + ); +} + +drawing::Direction3D operator*( const drawing::Direction3D& rDirection + , double fFraction) +{ + return drawing::Direction3D( + fFraction*rDirection.DirectionX + , fFraction*rDirection.DirectionY + , fFraction*rDirection.DirectionZ + ); +} + +Vector3D SequenceToVector3D( const uno::Sequence< double >& rSeq ) +{ + OSL_ENSURE(rSeq.getLength()==3,"The sequence needs to have length 3 for conversion into vector"); + + double x=rSeq.getLength()>0?rSeq[0]:0.0; + double y=rSeq.getLength()>1?rSeq[1]:0.0; + double z=rSeq.getLength()>2?rSeq[2]:0.0; + + Vector3D aRet(x,y,z); + return aRet; +} + +uno::Sequence< double > Vector3DToSequence( const Vector3D& rVector ) +{ + uno::Sequence< double > aRet(3); + aRet[0] = rVector.X(); + aRet[1] = rVector.Y(); + aRet[2] = rVector.Z(); + return aRet; +} + +drawing::Position3D SequenceToPosition3D( const uno::Sequence< double >& rSeq ) +{ + OSL_ENSURE(rSeq.getLength()==3,"The sequence needs to have length 3 for conversion into vector"); + + drawing::Position3D aRet; + aRet.PositionX = rSeq.getLength()>0?rSeq[0]:0.0; + aRet.PositionY = rSeq.getLength()>1?rSeq[1]:0.0; + aRet.PositionZ = rSeq.getLength()>2?rSeq[2]:0.0; + return aRet; +} + +uno::Sequence< double > Position3DToSequence( const drawing::Position3D& rPosition ) +{ + uno::Sequence< double > aRet(3); + aRet[0] = rPosition.PositionX; + aRet[1] = rPosition.PositionY; + aRet[2] = rPosition.PositionZ; + return aRet; +} + +drawing::Direction3D SequenceToDirection3D( const uno::Sequence< double >& rSeq ) +{ + drawing::Direction3D aRet; + aRet.DirectionX = rSeq.getLength()>0?rSeq[0]:0.0; + aRet.DirectionY = rSeq.getLength()>1?rSeq[1]:0.0; + aRet.DirectionZ = rSeq.getLength()>2?rSeq[2]:0.0; + return aRet; +} + +uno::Sequence< double > Direction3DToSequence( const drawing::Direction3D& rDirection ) +{ + uno::Sequence< double > aRet(3); + aRet[0] = rDirection.DirectionX; + aRet[1] = rDirection.DirectionY; + aRet[2] = rDirection.DirectionZ; + return aRet; +} + +drawing::Direction3D operator/( const drawing::Direction3D& rDirection, double f ) +{ + OSL_ENSURE(f,"a Direction3D is divided by NULL"); + return drawing::Direction3D( + rDirection.DirectionX/f + , rDirection.DirectionY/f + , rDirection.DirectionZ/f + ); +} + +text::WritingMode WritingMode2ToWritingMode1( sal_Int16 nWritingMode2 ) +{ + switch(nWritingMode2) + { + case text::WritingMode2::RL_TB: + return text::WritingMode_RL_TB; + case text::WritingMode2::TB_RL: + return text::WritingMode_TB_RL; + case text::WritingMode2::LR_TB: + return text::WritingMode_LR_TB; + default: // TL + return text::WritingMode_TB_RL;//there can no correct conversion be done here + } +} + +//............................................................................. +} //namespace chart +//............................................................................. diff --git a/chart2/source/tools/ContextHelper.cxx b/chart2/source/tools/ContextHelper.cxx new file mode 100644 index 000000000..abe516566 --- /dev/null +++ b/chart2/source/tools/ContextHelper.cxx @@ -0,0 +1,92 @@ +/************************************************************************* + * + * $RCSfile: ContextHelper.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:32 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "ContextHelper.hxx" +#include <cppuhelper/component_context.hxx> + +#include <vector> + +using namespace ::com::sun::star; + +namespace chart +{ + +namespace ContextHelper +{ + +uno::Reference< uno::XComponentContext > + createContext( + const tContextEntryMapType & rMap, + const uno::Reference< uno::XComponentContext > & rDelegateContext ) +{ + ::std::vector< ::cppu::ContextEntry_Init > aVec( rMap.size()); + for( tContextEntryMapType::const_iterator aIt = rMap.begin(); + aIt != rMap.end(); + ++aIt ) + { + aVec.push_back( ::cppu::ContextEntry_Init( (*aIt).first, (*aIt).second) ); + } + + return ::cppu::createComponentContext( & aVec[0], aVec.size(), rDelegateContext ); +} + +} // namespace ContextHelper + +} // namespace chart diff --git a/chart2/source/tools/ImplOPropertySet.cxx b/chart2/source/tools/ImplOPropertySet.cxx new file mode 100644 index 000000000..517d11504 --- /dev/null +++ b/chart2/source/tools/ImplOPropertySet.cxx @@ -0,0 +1,206 @@ +/************************************************************************* + * + * $RCSfile: ImplOPropertySet.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:32 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "ImplOPropertySet.hxx" + +#include <algorithm> +#include <functional> + +#ifndef _COM_SUN_STAR_BEANS_XFASTPROPERTYSET_HPP_ +#include <com/sun/star/beans/XFastPropertySet.hpp> +#endif + +using namespace ::com::sun::star; + +namespace +{ + +struct lcl_getPropertyStateByHandle : + public ::std::unary_function< beans::PropertyState, sal_Int32 > +{ + lcl_getPropertyStateByHandle( + const ::property::impl::ImplOPropertySet::tPropertyMap & rMap ) + : m_rMap( rMap ) + {} + + inline beans::PropertyState operator() ( sal_Int32 nHandle ) + { + if( m_rMap.end() == m_rMap.find( nHandle )) + return beans::PropertyState_DEFAULT_VALUE; + return beans::PropertyState_DIRECT_VALUE; + } + +private: + const ::property::impl::ImplOPropertySet::tPropertyMap & m_rMap; +}; + +template< typename K, typename V > +struct lcl_eraseMapEntry : + public ::std::unary_function< void, K > +{ + lcl_eraseMapEntry( ::std::map< K, V > & rMap ) + : m_rMap( rMap ) + {} + + inline void operator() ( const K & aKey ) + { + m_rMap.erase( aKey ); + } + +private: + ::std::map< K, V > m_rMap; +}; + +} // anonymous namespace + +namespace property +{ +namespace impl +{ + +ImplOPropertySet::ImplOPropertySet() +{} + +beans::PropertyState ImplOPropertySet::GetPropertyStateByHandle( sal_Int32 nHandle ) const +{ + return lcl_getPropertyStateByHandle( m_aProperties ) ( nHandle ); +} + +uno::Sequence< beans::PropertyState > ImplOPropertySet::GetPropertyStatesByHandle( + const ::std::vector< sal_Int32 > & aHandles ) const +{ + uno::Sequence< beans::PropertyState > aResult( aHandles.size()); + + ::std::transform( aHandles.begin(), aHandles.end(), + aResult.getArray(), + lcl_getPropertyStateByHandle( m_aProperties )); + + return aResult; +} + +void ImplOPropertySet::SetPropertyToDefault( sal_Int32 nHandle ) +{ + tPropertyMap::iterator aFoundIter( m_aProperties.find( nHandle ) ); + + if( m_aProperties.end() != aFoundIter ) + { + m_aProperties.erase( aFoundIter ); + } +} + +void ImplOPropertySet::SetPropertiesToDefault( + const ::std::vector< sal_Int32 > & aHandles ) +{ + ::std::for_each( aHandles.begin(), aHandles.end(), + lcl_eraseMapEntry< sal_Int32, uno::Any >( m_aProperties ) ); +} + +void ImplOPropertySet::SetAllPropertiesToDefault() +{ + m_aProperties.clear(); +} + +bool ImplOPropertySet::GetPropertyValueByHandle( + uno::Any & rValue, + sal_Int32 nHandle ) const +{ + bool bResult = false; + + tPropertyMap::const_iterator aFoundIter( m_aProperties.find( nHandle ) ); + + if( m_aProperties.end() != aFoundIter ) + { + rValue = (*aFoundIter).second; + bResult = true; + } + + return bResult; +} + +void ImplOPropertySet::SetPropertyValueByHandle( + sal_Int32 nHandle, const uno::Any & rValue, uno::Any * pOldValue ) +{ + if( pOldValue != NULL ) + { + tPropertyMap::const_iterator aFoundIter( m_aProperties.find( nHandle ) ); + if( m_aProperties.end() != aFoundIter ) + (*pOldValue) = (*aFoundIter).second; + } + + m_aProperties[ nHandle ] = rValue; +} + +bool ImplOPropertySet::SetStyle( const uno::Reference< style::XStyle > & xStyle ) +{ + if( ! xStyle.is()) + return false; + + m_xStyle = xStyle; + return true; +} + +uno::Reference< style::XStyle > ImplOPropertySet::GetStyle() const +{ + return m_xStyle; +} + + +} // namespace impl +} // namespace chart diff --git a/chart2/source/tools/ImplOPropertySet.hxx b/chart2/source/tools/ImplOPropertySet.hxx new file mode 100644 index 000000000..e598b4686 --- /dev/null +++ b/chart2/source/tools/ImplOPropertySet.hxx @@ -0,0 +1,133 @@ +/************************************************************************* + * + * $RCSfile: ImplOPropertySet.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:32 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef CHART_IMPLOPROPERTYSET_HXX +#define CHART_IMPLOPROPERTYSET_HXX + +#ifndef _COM_SUN_STAR_BEANS_PROPERTYSTATE_HPP_ +#include <com/sun/star/beans/PropertyState.hpp> +#endif +#ifndef _COM_SUN_STAR_UNO_SEQUENCE_HXX_ +#include <com/sun/star/uno/Sequence.hxx> +#endif +#ifndef _COM_SUN_STAR_STYLE_XSTYLE_HPP_ +#include <com/sun/star/style/XStyle.hpp> +#endif + +#include <map> +#include <vector> + +namespace property +{ +namespace impl +{ + +class ImplOPropertySet +{ +public: + ImplOPropertySet(); + + /** supports states DIRECT_VALUE and DEFAULT_VALUE + */ + ::com::sun::star::beans::PropertyState + GetPropertyStateByHandle( sal_Int32 nHandle ) const; + + ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > + GetPropertyStatesByHandle( const ::std::vector< sal_Int32 > & aHandles ) const; + + void SetPropertyToDefault( sal_Int32 nHandle ); + void SetPropertiesToDefault( const ::std::vector< sal_Int32 > & aHandles ); + void SetAllPropertiesToDefault(); + + /** @param rValue is set to the value for the property given in nHandle. If + the property is not set, the style chain is searched for any + instance set there. If there was no value found either in the + property set itself or any of its styles, rValue remains + unchanged and false is returned. + + @return false if the property is default, true otherwise. + */ + bool GetPropertyValueByHandle( + ::com::sun::star::uno::Any & rValue, + sal_Int32 nHandle ) const; + + void SetPropertyValueByHandle( sal_Int32 nHandle, + const ::com::sun::star::uno::Any & rValue, + ::com::sun::star::uno::Any * pOldValue = NULL ); + + bool SetStyle( const ::com::sun::star::uno::Reference< ::com::sun::star::style::XStyle > & xStyle ); + ::com::sun::star::uno::Reference< ::com::sun::star::style::XStyle > + GetStyle() const; + + typedef + ::std::map< sal_Int32, ::com::sun::star::uno::Any > + tPropertyMap; + +private: + tPropertyMap m_aProperties; + ::com::sun::star::uno::Reference< ::com::sun::star::style::XStyle > + m_xStyle; +}; + +} // namespace impl +} // namespace chart + +// CHART_IMPLOPROPERTYSET_HXX +#endif diff --git a/chart2/source/tools/LegendHelper.cxx b/chart2/source/tools/LegendHelper.cxx new file mode 100644 index 000000000..b3027f3d5 --- /dev/null +++ b/chart2/source/tools/LegendHelper.cxx @@ -0,0 +1,78 @@ +/************************************************************************* + * + * $RCSfile: LegendHelper.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:32 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "LegendHelper.hxx" +#include "macros.hxx" + +//............................................................................. +namespace chart +{ +//............................................................................. + +rtl::OUString LegendHelper::getIdentifierForLegend() +{ + static rtl::OUString m_aIdentifier( C2U( "@legend" ) ); + return m_aIdentifier; +} + +//............................................................................. +} //namespace chart +//............................................................................. + diff --git a/chart2/source/tools/LifeTime.cxx b/chart2/source/tools/LifeTime.cxx new file mode 100644 index 000000000..1a45acc66 --- /dev/null +++ b/chart2/source/tools/LifeTime.cxx @@ -0,0 +1,572 @@ +/************************************************************************* + * + * $RCSfile: LifeTime.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:32 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "LifeTime.hxx" + +#ifndef _OSL_DIAGNOSE_H_ +#include <osl/diagnose.h> +#endif +/* +#ifndef _COM_SUN_STAR_LANG_XEVENTLISTENER_HPP_ +#include <com/sun/star/lang/XEventListener.hpp> +#endif +*/ + +using namespace ::com::sun::star; + +namespace apphelper +{ +//-------------------------- + +LifeTimeManager::LifeTimeManager( lang::XComponent* pComponent, sal_Bool bLongLastingCallsCancelable ) + : m_aListenerContainer( m_aAccessMutex ) + , m_pComponent(pComponent) + , m_bLongLastingCallsCancelable(bLongLastingCallsCancelable) +{ + impl_init(); +} + +void LifeTimeManager::impl_init() +{ + m_bDisposed = sal_False; + m_bInDispose = sal_False; + m_nAccessCount = 0; + m_nLongLastingCallCount = 0; + m_aNoAccessCountCondition.set(); + m_aNoLongLastingCallCountCondition.set(); +} + +LifeTimeManager::~LifeTimeManager() +{ +} + + sal_Bool LifeTimeManager +::impl_isDisposed() +{ + if( m_bDisposed || m_bInDispose ) + { + OSL_ENSURE( sal_False, "This component is already disposed " ); + return sal_True; + } + return sal_False; +} + sal_Bool LifeTimeManager +::impl_canStartApiCall() +{ + if( impl_isDisposed() ) + return sal_False; //behave passive if already disposed + + //mutex is acquired + return sal_True; +} + + void LifeTimeManager +::impl_registerApiCall(sal_Bool bLongLastingCall) +{ + //only allowed if not disposed + //do not acquire the mutex here because it will be acquired already + m_nAccessCount++; + if(m_nAccessCount==1) + //@todo? is it ok to wake some threads here while we have acquired the mutex? + m_aNoAccessCountCondition.reset(); + + if(bLongLastingCall) + m_nLongLastingCallCount++; + if(m_nLongLastingCallCount==1) + m_aNoLongLastingCallCountCondition.reset(); +} + void LifeTimeManager +::impl_unregisterApiCall(sal_Bool bLongLastingCall) +{ + //Mutex needs to be acquired exactly ones + //mutex may be released inbetween in special case of impl_apiCallCountReachedNull() + + OSL_ENSURE( m_nAccessCount>0, "access count mismatch" ); + m_nAccessCount--; + if(bLongLastingCall) + m_nLongLastingCallCount--; + if( m_nLongLastingCallCount==0 ) + { + m_aNoLongLastingCallCountCondition.set(); + } + if( m_nAccessCount== 0) + { + m_aNoAccessCountCondition.set(); + impl_apiCallCountReachedNull(); + + } +} + + sal_Bool LifeTimeManager +::dispose() throw(uno::RuntimeException) +{ + //hold no mutex + { + osl::Guard< osl::Mutex > aGuard( m_aAccessMutex ); + + if( m_bDisposed || m_bInDispose ) + { + OSL_ENSURE( sal_False, "This component is already disposed " ); + return sal_False; //behave passive if already disposed + } + + m_bInDispose = true; + //adding any listener is not allowed anymore + //new calls will not be accepted + //still running calls have the freedom to finish their work without crash + } + //no mutex is acquired + + //--do the disposing of listeners after calling this method + { + uno::Reference< lang::XComponent > xComponent = + uno::Reference< lang::XComponent >(m_pComponent);; + if(xComponent.is()) + { + ::cppu::OInterfaceContainerHelper* pIC = m_aListenerContainer.getContainer( + ::getCppuType((const uno::Reference< lang::XEventListener >*)0) ); + if( pIC ) + { + lang::EventObject aEvent( xComponent ); + pIC->disposeAndClear( aEvent ); + } + } + } + + //no mutex is acquired + { + osl::ClearableGuard< osl::Mutex > aGuard( m_aAccessMutex ); + OSL_ENSURE( !m_bDisposed, "dispose was called already" ); + m_bDisposed = sal_True; + aGuard.clear(); + } + //no mutex is acquired + + //wait until all still running calls have finished + //the accessCount cannot grow anymore, because all calls will return after checking m_bDisposed + m_aNoAccessCountCondition.wait(); + + //we are the only ones working on our data now + + return sal_True; + //--release all resources and references after calling this method successful +} + +//----------------------------------------------------------------- + +CloseableLifeTimeManager::CloseableLifeTimeManager( ::com::sun::star::util::XCloseable* pCloseable + , ::com::sun::star::lang::XComponent* pComponent + , sal_Bool bLongLastingCallsCancelable ) + : LifeTimeManager( pComponent, bLongLastingCallsCancelable ) + , m_pCloseable(pCloseable) +{ + impl_init(); +} + +CloseableLifeTimeManager::~CloseableLifeTimeManager() +{ +} + + sal_Bool CloseableLifeTimeManager +::impl_isDisposedOrClosed() +{ + if( impl_isDisposed() ) + return sal_True; + + if( m_bClosed ) + { + OSL_ENSURE( sal_False, "This object is already closed" ); + return sal_True; + } + return sal_False; +} + + sal_Bool CloseableLifeTimeManager +::g_close_startTryClose(sal_Bool bDeliverOwnership) + throw ( uno::Exception ) +{ + //no mutex is allowed to be acquired + { + osl::ResettableGuard< osl::Mutex > aGuard( m_aAccessMutex ); + + //Mutex needs to be acquired exactly ones; will be released inbetween + if( !impl_canStartApiCall() ) + return sal_False; + //mutex is acquired + + //not closed already -> we try to close again + m_bInTryClose = sal_True; + m_aEndTryClosingCondition.reset(); + + impl_registerApiCall(sal_False); + } + + //------------------------------------------------ + //no mutex is acquired + + //only remove listener calls will be worked on until end of tryclose + //all other new calls will wait till end of try close // @todo? is that really ok + + //?? still running calls have the freedom to finish their work without crash + + try + { + uno::Reference< util::XCloseable > xCloseable = + uno::Reference< util::XCloseable >(m_pCloseable);; + if(xCloseable.is()) + { + //--call queryClosing on all registered close listeners + ::cppu::OInterfaceContainerHelper* pIC = m_aListenerContainer.getContainer( + ::getCppuType((const uno::Reference< util::XCloseListener >*)0) );; + if( pIC ) + { + //lang::EventObject aEvent( static_cast< util::XCloseable*>(xCloseable) ); + lang::EventObject aEvent( xCloseable ); + ::cppu::OInterfaceIteratorHelper aIt( *pIC ); + while( aIt.hasMoreElements() ) + (static_cast< util::XCloseListener*>(aIt.next()))->queryClosing( aEvent, bDeliverOwnership ); + } + } + } + catch( uno::Exception& ex ) + { + //no mutex is acquired + g_close_endTryClose(bDeliverOwnership, sal_False, ex); + //the exception is thrown in the above method + } + return sal_True; +} + + void CloseableLifeTimeManager +::g_close_endTryClose(sal_Bool bDeliverOwnership, sal_Bool bMyVeto, uno::Exception& ex) + throw ( uno::Exception ) +{ + //this method is called, if the try to close was not successfull + osl::Guard< osl::Mutex > aGuard( m_aAccessMutex ); + impl_setOwnership( bDeliverOwnership, sal_False ); + + m_bInTryClose = sal_False; + m_aEndTryClosingCondition.set(); + + //Mutex needs to be acquired exactly ones + //mutex may be released inbetween in special case of impl_apiCallCountReachedNull() + impl_unregisterApiCall(sal_False); + + //this exception must be thrown to the caller + throw ex; +} + + sal_Bool CloseableLifeTimeManager +::g_close_isNeedToCancelLongLastingCalls( sal_Bool bDeliverOwnership, uno::Exception& ex ) + throw ( uno::Exception ) +{ + //this method is called when no closelistener has had a veto during queryclosing + //the method returns false, if nothing stands against closing anymore + //it returns true, if some longlasting calls are running, which might be cancelled + //it throws the given exception, if long calls are running but not cancelable + + osl::Guard< osl::Mutex > aGuard( m_aAccessMutex ); + //this count cannot grow after try of close has started, because we wait in all those methods for end of try closing + if( !m_nLongLastingCallCount ) + return sal_False; + + if(m_bLongLastingCallsCancelable) + return sal_True; + + impl_setOwnership( bDeliverOwnership, sal_True ); + + m_bInTryClose = sal_False; + m_aEndTryClosingCondition.set(); + + //Mutex needs to be acquired exactly ones + //mutex may be released inbetween in special case of impl_apiCallCountReachedNull() + impl_unregisterApiCall(sal_False); + + throw ex; +} + + void CloseableLifeTimeManager +::g_close_endTryClose_doClose() +{ + //this method is called, if the try to close was successfull + osl::ResettableGuard< osl::Mutex > aGuard( m_aAccessMutex ); + + m_bInTryClose = sal_False; + m_aEndTryClosingCondition.set(); + + //Mutex needs to be acquired exactly ones + //mutex may be released inbetween in special case of impl_apiCallCountReachedNull() + impl_unregisterApiCall(sal_False); + impl_doClose(); +} + + void CloseableLifeTimeManager +::impl_setOwnership( sal_Bool bDeliverOwnership, sal_Bool bMyVeto ) +{ + m_bOwnership = bDeliverOwnership && bMyVeto; + m_bOwnershipIsWellKnown = sal_True; +} + sal_Bool CloseableLifeTimeManager +::impl_shouldCloseAtNextChance() +{ + return m_bOwnership; +} + + void CloseableLifeTimeManager +::impl_apiCallCountReachedNull() +{ + //Mutex needs to be acquired exactly ones + //mutex will be released inbetween in impl_doClose() + if( m_pCloseable && impl_shouldCloseAtNextChance() ) + impl_doClose(); +} + + void CloseableLifeTimeManager +::impl_doClose() +{ + //Mutex needs to be acquired exactly ones before calling impl_doClose() + + if(m_bClosed) + return; //behave as passive as possible, if disposed or closed already + if( m_bDisposed || m_bInDispose ) + return; //behave as passive as possible, if disposed or closed already + + //-------- + m_bClosed = sal_True; + + NegativeGuard< osl::Mutex > aNegativeGuard( m_aAccessMutex ); + //mutex is not acquired, mutex will be reacquired at the end of this method automatically + + uno::Reference< util::XCloseable > xCloseable=NULL; + try + { + xCloseable = uno::Reference< util::XCloseable >(m_pCloseable);; + if(xCloseable.is()) + { + //--call notifyClosing on all registered close listeners + ::cppu::OInterfaceContainerHelper* pIC = m_aListenerContainer.getContainer( + ::getCppuType((const uno::Reference< util::XCloseListener >*)0) );; + if( pIC ) + { + //lang::EventObject aEvent( static_cast< util::XCloseable*>(xCloseable) ); + lang::EventObject aEvent( xCloseable ); + ::cppu::OInterfaceIteratorHelper aIt( *pIC ); + while( aIt.hasMoreElements() ) + (static_cast< util::XCloseListener*>(aIt.next()))->notifyClosing( aEvent ); + } + } + } + catch( uno::Exception& ex ) + { + OSL_ENSURE( sal_False, "Exception during notifyClosing of XCloseListener" ); + } + + if(xCloseable.is()) + { + uno::Reference< lang::XComponent > xComponent = + uno::Reference< lang::XComponent >( xCloseable, uno::UNO_QUERY ); + if(xComponent.is()) + { + OSL_ENSURE( m_bClosed, "a not closed component will be disposed " ); + xComponent->dispose(); + } + } + //mutex will be reacquired in destructor of aNegativeGuard +} + + sal_Bool CloseableLifeTimeManager +::g_addCloseListener( const uno::Reference< util::XCloseListener > & xListener ) + throw(uno::RuntimeException) +{ + osl::Guard< osl::Mutex > aGuard( m_aAccessMutex ); + //Mutex needs to be acquired exactly ones; will be released inbetween + if( !impl_canStartApiCall() ) + return sal_False; + //mutex is acquired + + m_aListenerContainer.addInterface( ::getCppuType((const uno::Reference< util::XCloseListener >*)0),xListener ); + m_bOwnership = sal_False; + return sal_True; +} + + sal_Bool CloseableLifeTimeManager +::impl_canStartApiCall() +{ + //Mutex needs to be acquired exactly ones before calling this method + //the mutex will be released inbetween and reacquired + + if( impl_isDisposed() ) + return sal_False; //behave passive if already disposed + if( m_bClosed ) + return sal_False; //behave passive if closing is already done + + //during try-close most calls need to wait for the decision + while( m_bInTryClose ) + { + //if someone tries to close this object at the moment + //we need to wait for his end because the result of the preceding call + //is relevant for our behaviour here + + m_aAccessMutex.release(); + m_aEndTryClosingCondition.wait(); //@todo??? this may block??? try closing + m_aAccessMutex.acquire(); + if( m_bDisposed || m_bInDispose || m_bClosed ) + return sal_False; //return if closed already + } + //mutex is acquired + return sal_True; +} + +//-------------------------- + + sal_Bool LifeTimeGuard +::startApiCall(sal_Bool bLongLastingCall) +{ + //Mutex needs to be acquired exactly ones; will be released inbetween + //mutex is requiered due to constructor of LifeTimeGuard + + OSL_ENSURE( !m_bCallRegistered, "this method is only allowed ones" ); + if(m_bCallRegistered) + return sal_False; + + //Mutex needs to be acquired exactly ones; will be released inbetween + if( !m_rManager.impl_canStartApiCall() ) + return sal_False; + //mutex is acquired + + m_bCallRegistered = sal_True; + m_bLongLastingCallRegistered = bLongLastingCall; + m_rManager.impl_registerApiCall(bLongLastingCall); + return sal_True; +} + +LifeTimeGuard::~LifeTimeGuard() +{ + try + { + //do acquire the mutex if it was cleared before + if(!pT) + reset(); + if(m_bCallRegistered) + { + //Mutex needs to be acquired exactly ones + //mutex may be released inbetween in special case of impl_apiCallCountReachedNull() + m_rManager.impl_unregisterApiCall(m_bLongLastingCallRegistered); + } + } + catch( uno::Exception& ex ) + { + //@todo ? allow a uno::RuntimeException from dispose to travel through?? + } +} + +/* +the XCloseable::close method has to be implemented in the following way: +::close +{ + //hold no mutex + + if( !m_aLifeTimeManager.g_close_startTryClose( bDeliverOwnership ) ) + return; + //no mutex is acquired + + // At the end of this method may we must dispose ourself ... + // and may nobody from outside hold a reference to us ... + // then it's a good idea to do that by ourself. + uno::Reference< uno::XInterface > xSelfHold( static_cast< ::cppu::OWeakObject* >(this) ); + + //the listeners have had no veto + //check wether we self can close + { + util::CloseVetoException aVetoException = util::CloseVetoException( + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( + "the model itself could not be closed" ) ) + , static_cast< ::cppu::OWeakObject* >(this)); + + if( m_aLifeTimeManager.g_close_isNeedToCancelLongLastingCalls( bDeliverOwnership, aVetoException) ) + { + ////you can empty this block, if you never start longlasting calls or + ////if your longlasting calls are per default not cancelable (check how you have constructed your LifeTimeManager) + + sal_Bool bLongLastingCallsAreCanceled = sal_False; + try + { + //try to cancel running longlasting calls + //// @todo + } + catch( uno::Exception& ex ) + { + //// @todo + //do not throw anything here!! (without endTryClose) + } + //if not successful canceled + if(!bLongLastingCallsAreCanceled) + { + m_aLifeTimeManager.g_close_endTryClose(bDeliverOwnership, sal_True, aVetoException); + //the exception is thrown in the above method + } + } + + } + m_aLifeTimeManager.g_close_endTryClose_doClose(); +} +*/ + +}//end namespace apphelper diff --git a/chart2/source/tools/MediaDescriptorHelper.cxx b/chart2/source/tools/MediaDescriptorHelper.cxx new file mode 100644 index 000000000..251eaefef --- /dev/null +++ b/chart2/source/tools/MediaDescriptorHelper.cxx @@ -0,0 +1,260 @@ +/************************************************************************* + * + * $RCSfile: MediaDescriptorHelper.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:32 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "MediaDescriptorHelper.hxx" + +using namespace ::com::sun::star; + +namespace apphelper +{ + + +const short FLAG_DEPRECATED =1; +const short FLAG_MODEL =2; + +#define WRITE_PROPERTY( MediaName, nFlags ) \ +if(rProp.Name.equals(::rtl::OUString::createFromAscii(#MediaName))) \ +{ \ + if( rProp.Value >>= MediaName ) \ + ISSET_##MediaName = sal_True; \ + if(nFlags & FLAG_DEPRECATED) \ + { \ + m_aDeprecatedProperties[nDeprecatedCount]=rProp;\ + nDeprecatedCount++; \ + } \ + else \ + { \ + m_aRegularProperties[nRegularCount]=rProp; \ + nRegularCount++; \ + if( nFlags & FLAG_MODEL) \ + { \ + m_aModelProperties[nModelCount]=rProp; \ + nModelCount++; \ + } \ + } \ +} + +MediaDescriptorHelper::MediaDescriptorHelper( const uno::Sequence< + beans::PropertyValue > & rMediaDescriptor ) +{ + impl_init(); + + m_aRegularProperties.realloc(0); + m_aRegularProperties.realloc(rMediaDescriptor.getLength()); + sal_Int32 nRegularCount = 0; + + m_aDeprecatedProperties.realloc(0); + m_aDeprecatedProperties.realloc(rMediaDescriptor.getLength()); + sal_Int32 nDeprecatedCount = 0; + + m_aAdditionalProperties.realloc(0); + m_aAdditionalProperties.realloc(rMediaDescriptor.getLength()); + sal_Int32 nAdditionalCount = 0; + + m_aModelProperties.realloc(0); + m_aModelProperties.realloc(rMediaDescriptor.getLength()); + sal_Int32 nModelCount = 0; + + + //read given rMediaDescriptor and store in internal structures: + for( sal_Int32 i= rMediaDescriptor.getLength();i--;) + { + const beans::PropertyValue& rProp = rMediaDescriptor[i]; + WRITE_PROPERTY( AsTemplate, FLAG_MODEL ) + else WRITE_PROPERTY( Author, FLAG_MODEL ) + else WRITE_PROPERTY( CharacterSet, FLAG_MODEL ) + else WRITE_PROPERTY( Comment, FLAG_MODEL ) + else WRITE_PROPERTY( ComponentData, FLAG_MODEL ) + else WRITE_PROPERTY( FileName, FLAG_DEPRECATED ) + else WRITE_PROPERTY( FilterData, FLAG_MODEL ) + else WRITE_PROPERTY( FilterName, FLAG_MODEL ) + else WRITE_PROPERTY( FilterFlags, FLAG_DEPRECATED) + else WRITE_PROPERTY( FilterOptions, FLAG_MODEL ) + else WRITE_PROPERTY( FrameName, FLAG_MODEL ) + else WRITE_PROPERTY( Hidden, FLAG_MODEL ) + else WRITE_PROPERTY( InputStream, 0 ) + else WRITE_PROPERTY( InteractionHandler, 0 ) + else WRITE_PROPERTY( JumpMark, 0 ) + else WRITE_PROPERTY( MediaType, FLAG_MODEL ) + else WRITE_PROPERTY( OpenFlags, FLAG_DEPRECATED ) + else WRITE_PROPERTY( OpenNewView, 0 ) + else WRITE_PROPERTY( Overwrite, FLAG_MODEL ) + else WRITE_PROPERTY( Password, FLAG_MODEL ) + else WRITE_PROPERTY( PosSize, 0 ) + else WRITE_PROPERTY( PostData, 0 ) + else WRITE_PROPERTY( PostString, FLAG_DEPRECATED ) + else WRITE_PROPERTY( Preview, FLAG_MODEL ) + else WRITE_PROPERTY( ReadOnly, 0 ) + else WRITE_PROPERTY( Referer, FLAG_MODEL ) + else WRITE_PROPERTY( Silent, 0 ) + else WRITE_PROPERTY( StatusIndicator, 0 ) + else WRITE_PROPERTY( TemplateName, FLAG_DEPRECATED ) + else WRITE_PROPERTY( TemplateRegionName, FLAG_DEPRECATED ) + else WRITE_PROPERTY( Unpacked, FLAG_MODEL ) + else WRITE_PROPERTY( URL, FLAG_MODEL ) + else WRITE_PROPERTY( Version, FLAG_MODEL ) + else WRITE_PROPERTY( ViewData, FLAG_MODEL ) + else WRITE_PROPERTY( ViewId, FLAG_MODEL ) + else + { + m_aAdditionalProperties[nAdditionalCount]=rProp; + nAdditionalCount++; + } + } + + m_aRegularProperties.realloc(nRegularCount); + m_aDeprecatedProperties.realloc(nDeprecatedCount); + m_aAdditionalProperties.realloc(nAdditionalCount); + m_aModelProperties.realloc(nModelCount); +} + +void MediaDescriptorHelper::impl_init() +{ + AsTemplate = sal_False; + ISSET_AsTemplate = sal_False; + + ISSET_Author = sal_False; + ISSET_CharacterSet = sal_False; + ISSET_Comment = sal_False; + +// ::com::sun::star::uno::Any ComponentData; + ISSET_ComponentData = sal_False; + ISSET_FileName = sal_False; + +// ::com::sun::star::uno::Any FilterData; + ISSET_FilterData = sal_False; + ISSET_FilterName = sal_False; + ISSET_FilterFlags = sal_False; + ISSET_FilterOptions = sal_False; + ISSET_FrameName = sal_False; + + Hidden = sal_False; + ISSET_Hidden = sal_False; + ISSET_InputStream = sal_False; + ISSET_InteractionHandler = sal_False; + ISSET_JumpMark = sal_False; + ISSET_MediaType = sal_False; + ISSET_OpenFlags = sal_False; + OpenNewView = sal_False; + ISSET_OpenNewView = sal_False; + Overwrite = sal_False; + ISSET_Overwrite = sal_False; + ISSET_Password = sal_False; + +// ::com::sun::star::awt::Rectangle PosSize; + ISSET_PosSize = sal_False; + +// ::com::sun::star::uno::Sequence< sal_Int8 > PostData; + ISSET_PostData = sal_False; + ISSET_PostString = sal_False; + Preview = sal_False; + ISSET_Preview = sal_False; + ReadOnly = sal_False; + ISSET_ReadOnly = sal_False; + ISSET_Referer = sal_False; + ISSET_StatusIndicator = sal_False; + Silent = sal_False; + ISSET_Silent = sal_False; + ISSET_TemplateName = sal_False; + ISSET_TemplateRegionName = sal_False; + Unpacked = sal_False; + ISSET_Unpacked = sal_False; + ISSET_URL = sal_False; + Version = 0; + ISSET_Version = sal_False; + +// ::com::sun::star::uno::Any ViewData; + ISSET_ViewData = sal_False; + ViewId = 0; + ISSET_ViewId = sal_False; +} + +MediaDescriptorHelper::~MediaDescriptorHelper() +{ + +} + + uno::Sequence< beans::PropertyValue > MediaDescriptorHelper +::getAll() +{ + uno::Sequence< beans::PropertyValue > aAll( m_aRegularProperties ); + //write properties to aAll + if( m_aDeprecatedProperties.getLength() ) + { + sal_Int32 nCount = m_aRegularProperties.getLength(); + m_aRegularProperties.realloc( nCount + m_aDeprecatedProperties.getLength()); + for(sal_Int32 i=0;i<m_aDeprecatedProperties.getLength();i++) + aAll[nCount+i]=m_aDeprecatedProperties[i]; + } + if( m_aAdditionalProperties.getLength() ) + { + sal_Int32 nCount = m_aRegularProperties.getLength(); + m_aRegularProperties.realloc(nCount + m_aAdditionalProperties.getLength()); + for(sal_Int32 i=0;i<m_aAdditionalProperties.getLength();i++) + aAll[nCount+i]=m_aAdditionalProperties[i]; + } + return aAll; +} + uno::Sequence< beans::PropertyValue > MediaDescriptorHelper +::getReducedForModel() +{ + return m_aModelProperties; +} +} diff --git a/chart2/source/tools/MutexContainer.cxx b/chart2/source/tools/MutexContainer.cxx new file mode 100644 index 000000000..9a2f5c5fa --- /dev/null +++ b/chart2/source/tools/MutexContainer.cxx @@ -0,0 +1,77 @@ +/************************************************************************* + * + * $RCSfile: MutexContainer.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:32 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "MutexContainer.hxx" + +namespace chart +{ +namespace helper +{ + +MutexContainer::~MutexContainer() +{} + +::osl::Mutex & MutexContainer::GetMutex() const +{ + return m_aMutex; +} + +} // namespace helper +} // namespace chart diff --git a/chart2/source/tools/OEnumeration.cxx b/chart2/source/tools/OEnumeration.cxx new file mode 100644 index 000000000..918b6a03e --- /dev/null +++ b/chart2/source/tools/OEnumeration.cxx @@ -0,0 +1,95 @@ +/************************************************************************* + * + * $RCSfile: OEnumeration.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:32 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "OEnumeration.hxx" + +using namespace ::com::sun::star; + +namespace comphelper +{ + +OEnumeration::OEnumeration( + const ::std::vector< uno::Any > & rContainer ) : + m_aContainer( rContainer ), + m_aIter( m_aContainer.begin() ) +{} + +OEnumeration::~OEnumeration() +{} + +sal_Bool SAL_CALL OEnumeration::hasMoreElements() + throw (uno::RuntimeException) +{ + return ! m_aContainer.empty(); +} + +uno::Any SAL_CALL OEnumeration::nextElement() + throw (container::NoSuchElementException, + lang::WrappedTargetException, + uno::RuntimeException) +{ + if( m_aIter == m_aContainer.end()) + throw container::NoSuchElementException(); + + return *m_aIter++; +} + + +} // namespace comphelper diff --git a/chart2/source/tools/OIndexContainer.cxx b/chart2/source/tools/OIndexContainer.cxx new file mode 100644 index 000000000..80973b537 --- /dev/null +++ b/chart2/source/tools/OIndexContainer.cxx @@ -0,0 +1,214 @@ +/************************************************************************* + * + * $RCSfile: OIndexContainer.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:32 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "OIndexContainer.hxx" + +#ifndef _CPPUHELPER_QUERYINTERFACE_HXX_ +#include <cppuhelper/queryinterface.hxx> +#endif + +using namespace ::com::sun::star; +using ::osl::MutexGuard; + +namespace comphelper +{ + +OIndexContainer::OIndexContainer( ::osl::Mutex & rMutex ) : + m_rMutex( rMutex ) +{ +} + +OIndexContainer::~OIndexContainer() +{ +} + +::osl::Mutex & OIndexContainer::GetMutex() +{ + return m_rMutex; +} + +// ____ XInterface ____ +uno::Any SAL_CALL OIndexContainer::queryInterface( const uno::Type& aType ) + throw (uno::RuntimeException) +{ + return ::cppu::queryInterface( + aType, + static_cast< container::XIndexContainer * >( this ), + static_cast< container::XIndexReplace * >( this ), + static_cast< container::XIndexAccess * >( this ), + static_cast< container::XElementAccess * >( this ) ); +} + +// ____ XIndexContainer ____ +void SAL_CALL OIndexContainer::insertByIndex( sal_Int32 Index, const uno::Any& Element ) + throw (lang::IllegalArgumentException, + lang::IndexOutOfBoundsException, + lang::WrappedTargetException, + uno::RuntimeException) +{ + // valid range [0..size] + size_t nIndex( Index ); + + // /-- + MutexGuard aGuard( GetMutex()); + + if( nIndex < 0 || + nIndex > m_aContainer.size() ) + throw lang::IndexOutOfBoundsException(); + + if( getElementType().isAssignableFrom( Element.getValueType()) ) + throw lang::IllegalArgumentException(); + + if( nIndex == m_aContainer.size()) + m_aContainer.push_back( Element ); + else + { + m_aContainer.insert( m_aContainer.begin() + nIndex, Element ); + } + // \-- +} + +void SAL_CALL OIndexContainer::removeByIndex( sal_Int32 Index ) + throw (lang::IndexOutOfBoundsException, + lang::WrappedTargetException, + uno::RuntimeException) +{ + // valid range [0..size-1] + size_t nIndex( Index ); + + // /-- + MutexGuard aGuard( GetMutex()); + + if( nIndex < 0 || + nIndex > m_aContainer.size() ) + throw lang::IndexOutOfBoundsException(); + + m_aContainer.erase( m_aContainer.begin() + nIndex ); + // \-- +} + + +// ____ XIndexReplace ____ +void SAL_CALL OIndexContainer::replaceByIndex( sal_Int32 Index, const uno::Any& Element ) + throw (lang::IllegalArgumentException, + lang::IndexOutOfBoundsException, + lang::WrappedTargetException, + uno::RuntimeException) +{ + // valid range [0..size-1] + size_t nIndex( Index ); + + // /-- + MutexGuard aGuard( GetMutex()); + + if( nIndex < 0 || + nIndex > m_aContainer.size() ) + throw lang::IndexOutOfBoundsException(); + + if( getElementType().isAssignableFrom( Element.getValueType()) ) + throw lang::IllegalArgumentException(); + + m_aContainer[ nIndex ] = Element; + // \-- +} + + +// ____ XIndexAccess ____ +sal_Int32 SAL_CALL OIndexContainer::getCount() + throw (uno::RuntimeException) +{ + // /-- + MutexGuard aGuard( GetMutex()); + + return m_aContainer.size(); + // \-- +} + +uno::Any SAL_CALL OIndexContainer::getByIndex( sal_Int32 Index ) + throw (lang::IndexOutOfBoundsException, + lang::WrappedTargetException, + uno::RuntimeException) +{ + // valid range [0..size-1] + size_t nIndex( Index ); + + // /-- + MutexGuard aGuard( GetMutex()); + + if( nIndex < 0 || + nIndex > m_aContainer.size() ) + throw lang::IndexOutOfBoundsException(); + + return m_aContainer.at( nIndex ); + // \-- +} + +sal_Bool SAL_CALL OIndexContainer::hasElements() + throw (uno::RuntimeException) +{ + // /-- + MutexGuard aGuard( GetMutex()); + + return ! m_aContainer.empty(); + // \-- +} + + +} // namespace comphelper diff --git a/chart2/source/tools/OPropertySet.cxx b/chart2/source/tools/OPropertySet.cxx new file mode 100644 index 000000000..6501d9637 --- /dev/null +++ b/chart2/source/tools/OPropertySet.cxx @@ -0,0 +1,463 @@ +/************************************************************************* + * + * $RCSfile: OPropertySet.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:32 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "OPropertySet.hxx" +#include "ImplOPropertySet.hxx" +#include "algohelper.hxx" + +#ifndef _RTL_UUID_H_ +#include <rtl/uuid.h> +#endif +#ifndef _CPPUHELPER_QUERYINTERFACE_HXX_ +#include <cppuhelper/queryinterface.hxx> +#endif + +#include <vector> +#include <algorithm> + +using namespace ::com::sun::star; + +using ::drafts::com::sun::star::style::XStyleSupplier; +// using ::drafts::com::sun::star::beans::XFastPropertyState; + +using ::com::sun::star::uno::Reference; +using ::com::sun::star::uno::Sequence; +using ::com::sun::star::uno::Any; +using ::rtl::OUString; +using ::osl::MutexGuard; + +// needed for MS compiler +using ::cppu::OBroadcastHelper; +using ::cppu::OPropertySetHelper; +using ::cppu::OWeakObject; + +namespace property +{ + +OPropertySet::OPropertySet( ::osl::Mutex & _rMutex ) : + OBroadcastHelper( _rMutex ), + // the following causes a warning; there seems to be no way to avoid it + OPropertySetHelper( static_cast< OBroadcastHelper & >( *this )), + m_rMutex( _rMutex ), + m_pImplProperties( new impl::ImplOPropertySet() ) +{ +} + +OPropertySet::~OPropertySet() +{} + +Any SAL_CALL OPropertySet::queryInterface( const uno::Type& aType ) + throw (uno::RuntimeException) +{ + return ::cppu::queryInterface( + aType, +// static_cast< uno::XInterface * >( +// static_cast< uno::XWeak * >( this )), +// static_cast< uno::XWeak * >( this ), +// static_cast< lang::XServiceInfo * >( this ), + static_cast< lang::XTypeProvider * >( this ), + static_cast< beans::XPropertySet * >( this ), + static_cast< beans::XMultiPropertySet * >( this ), + static_cast< beans::XFastPropertySet * >( this ), + static_cast< beans::XPropertyState * >( this ), + static_cast< beans::XMultiPropertyStates * >( this ), + static_cast< XStyleSupplier * >( this ) ); +// static_cast< XFastPropertyState * >( this ) ); +} + +// void SAL_CALL OPropertySet::acquire() throw () +// { +// OWeakObject::acquire(); +// } + +// void SAL_CALL OPropertySet::release() throw () +// { +// OWeakObject::release(); +// } + + +// ____ XServiceInfo ____ +// OUString SAL_CALL +// OPropertySet::getImplementationName() +// throw (uno::RuntimeException) +// { +// return OUString( RTL_CONSTASCII_USTRINGPARAM( "property::OPropertySet" )); +// } + +// sal_Bool SAL_CALL +// OPropertySet::supportsService( const OUString& ServiceName ) +// throw (uno::RuntimeException) +// { +// return ( 0 == ServiceName.reverseCompareToAsciiL( +// RTL_CONSTASCII_STRINGPARAM( "com.sun.star.beans.PropertySet" ))); +// } + +// Sequence< OUString > SAL_CALL +// OPropertySet::getSupportedServiceNames() +// throw (uno::RuntimeException) +// { +// Sequence< OUString > aServiceNames( 1 ); +// aServiceNames[ 0 ] = OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.beans.PropertySet" )); +// return aServiceNames; +// } + +#define LCL_PROP_CPPUTYPE(t) (::getCppuType( reinterpret_cast< const Reference<t> *>(0))) + +// // ____ XTypeProvider ____ +Sequence< uno::Type > SAL_CALL + OPropertySet::getTypes() + throw (uno::RuntimeException) +{ + static Sequence< uno::Type > aTypeList; + + // /-- + MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); + + if( aTypeList.getLength() == 0 ) + { + ::std::vector< uno::Type > aTypes; + +// aTypes.push_back( LCL_PROP_CPPUTYPE( uno::XWeak )); +// aTypes.push_back( LCL_PROP_CPPUTYPE( lang::XServiceInfo )); + aTypes.push_back( LCL_PROP_CPPUTYPE( lang::XTypeProvider )); + aTypes.push_back( LCL_PROP_CPPUTYPE( beans::XPropertySet )); + aTypes.push_back( LCL_PROP_CPPUTYPE( beans::XMultiPropertySet )); + aTypes.push_back( LCL_PROP_CPPUTYPE( beans::XFastPropertySet )); + aTypes.push_back( LCL_PROP_CPPUTYPE( beans::XPropertyState )); + aTypes.push_back( LCL_PROP_CPPUTYPE( beans::XMultiPropertyStates )); + aTypes.push_back( LCL_PROP_CPPUTYPE( XStyleSupplier )); +// aTypes.push_back( LCL_PROP_CPPUTYPE( XFastPropertyState )); + + aTypeList = ::chart::helper::VectorToSequence( aTypes ); + } + + return aTypeList; + // \-- +} + +Sequence< sal_Int8 > SAL_CALL + OPropertySet::getImplementationId() + throw (uno::RuntimeException) +{ + static uno::Sequence< sal_Int8 > aId; + if( aId.getLength() == 0 ) + { + aId.realloc( 16 ); + rtl_createUuid( (sal_uInt8 *)aId.getArray(), 0, sal_True ); + } + return aId; +} + + +// ____ XPropertyState ____ +beans::PropertyState SAL_CALL + OPropertySet::getPropertyState( const OUString& PropertyName ) + throw (beans::UnknownPropertyException, + uno::RuntimeException) +{ + cppu::IPropertyArrayHelper & rPH = getInfoHelper(); + + return m_pImplProperties->GetPropertyStateByHandle( + rPH.getHandleByName( PropertyName )); +} + +Sequence< beans::PropertyState > SAL_CALL + OPropertySet::getPropertyStates( const Sequence< OUString >& aPropertyName ) + throw (beans::UnknownPropertyException, + uno::RuntimeException) +{ + cppu::IPropertyArrayHelper & rPH = getInfoHelper(); + + sal_Int32 * pHandles = new sal_Int32[ aPropertyName.getLength() ]; + rPH.fillHandles( pHandles, aPropertyName ); + + ::std::vector< sal_Int32 > aHandles( pHandles, pHandles + aPropertyName.getLength()); + delete[] pHandles; + + return m_pImplProperties->GetPropertyStatesByHandle( aHandles ); +} + +void SAL_CALL + OPropertySet::setPropertyToDefault( const OUString& PropertyName ) + throw (beans::UnknownPropertyException, + uno::RuntimeException) +{ + cppu::IPropertyArrayHelper & rPH = getInfoHelper(); + + m_pImplProperties->SetPropertyToDefault( rPH.getHandleByName( PropertyName )); +} + +Any SAL_CALL + OPropertySet::getPropertyDefault( const OUString& aPropertyName ) + throw (beans::UnknownPropertyException, + lang::WrappedTargetException, + uno::RuntimeException) +{ + cppu::IPropertyArrayHelper & rPH = getInfoHelper(); + + return GetDefaultValue( rPH.getHandleByName( aPropertyName ) ); +} + + +// ____ XMultiPropertyStates ____ + +// Note: getPropertyStates() is already implemented in XPropertyState with the +// same signature + +void SAL_CALL + OPropertySet::setAllPropertiesToDefault() + throw (uno::RuntimeException) +{ + m_pImplProperties->SetAllPropertiesToDefault(); +} + +void SAL_CALL + OPropertySet::setPropertiesToDefault( const Sequence< OUString >& aPropertyNames ) + throw (beans::UnknownPropertyException, + uno::RuntimeException) +{ + cppu::IPropertyArrayHelper & rPH = getInfoHelper(); + + sal_Int32 * pHandles = new sal_Int32[ aPropertyNames.getLength() ]; + rPH.fillHandles( pHandles, aPropertyNames ); + + ::std::vector< sal_Int32 > aHandles( pHandles, pHandles + aPropertyNames.getLength()); + delete[] pHandles; + + m_pImplProperties->SetPropertiesToDefault( aHandles ); +} + +Sequence< Any > SAL_CALL + OPropertySet::getPropertyDefaults( const Sequence< OUString >& aPropertyNames ) + throw (beans::UnknownPropertyException, + lang::WrappedTargetException, + uno::RuntimeException) +{ + ::cppu::IPropertyArrayHelper & rPH = getInfoHelper(); + const sal_Int32 nElements = aPropertyNames.getLength(); + + Sequence< Any > aResult( nElements ); + Any * pResultArray = aResult.getArray(); + sal_Int32 nI = 0; + + for( ; nI < nElements; ++nI ) + { + pResultArray[ nI ] = GetDefaultValue( + rPH.getHandleByName( aPropertyNames[ nI ] )); + } + + return aResult; +} + +sal_Bool SAL_CALL OPropertySet::convertFastPropertyValue + ( Any & rConvertedValue, + Any & rOldValue, + sal_Int32 nHandle, + const Any& rValue ) + throw (lang::IllegalArgumentException) +{ + getFastPropertyValue( rOldValue, nHandle ); + rConvertedValue = rValue; + return sal_True; +} + +void SAL_CALL OPropertySet::setFastPropertyValue_NoBroadcast + ( sal_Int32 nHandle, + const Any& rValue ) + throw (uno::Exception) +{ + m_pImplProperties->SetPropertyValueByHandle( nHandle, rValue ); +} + +void SAL_CALL OPropertySet::getFastPropertyValue + ( Any& rValue, + sal_Int32 nHandle ) const +{ + if( ! m_pImplProperties->GetPropertyValueByHandle( rValue, nHandle )) + { +// OSL_TRACE( "OPropertySet: asking style for property" ); + // property was not set -> try style + uno::Reference< beans::XFastPropertySet > xStylePropSet( m_pImplProperties->GetStyle(), uno::UNO_QUERY ); + if( xStylePropSet.is() ) + { +#ifndef NDEBUG + { + // check if the handle of the style points to the same property + // name as the handle in this property set + uno::Reference< beans::XPropertySet > xPropSet( xStylePropSet, uno::UNO_QUERY ); + if( xPropSet.is()) + { + uno::Reference< beans::XPropertySetInfo > xInfo( xPropSet->getPropertySetInfo(), + uno::UNO_QUERY ); + if( xInfo.is() ) + { + // for some reason the virtual method getInfoHelper() is + // not const + ::cppu::IPropertyArrayHelper & rPH = + const_cast< OPropertySet * >( this )->getInfoHelper(); + + // find the Property with Handle nHandle in Style + Sequence< beans::Property > aProps( xInfo->getProperties() ); + sal_Int32 nI = aProps.getLength() - 1; + while( ( nI >= 0 ) && nHandle != aProps[ nI ].Handle ) + --nI; + + if( nI >= 0 ) // => nHandle == aProps[nI].Handle + { + // check whether the handle in this property set is + // the same as the one in the style + beans::Property aProp( rPH.getPropertyByName( aProps[ nI ].Name ) ); + OSL_ENSURE( nHandle == aProp.Handle, + "HandleCheck: Handles for same property differ!" ); + + if( nHandle == aProp.Handle ) + { + OSL_ENSURE( aProp.Type == aProps[nI].Type, + "HandleCheck: Types differ!" ); + OSL_ENSURE( aProp.Attributes == aProps[nI].Attributes, + "HandleCheck: Attributes differ!" ); + } + } + else + { + OSL_ENSURE( false, "HandleCheck: Handle not found in Style" ); + } + } + else + OSL_ENSURE( false, "HandleCheck: Invalid XPropertySetInfo returned" ); + } + else + OSL_ENSURE( false, "HandleCheck: XPropertySet not supported" ); + } +#endif + rValue = xStylePropSet->getFastPropertyValue( nHandle ); + } + else + { +// OSL_TRACE( "OPropertySet: no style => getting default for property" ); + // there is no style (or the style does not support XFastPropertySet) + // => take the default value + try + { + rValue = GetDefaultValue( nHandle ); + } + catch( beans::UnknownPropertyException ex ) + { + rValue.clear(); + } + } + } +} + +// ____ XStyleSupplier ____ +Reference< style::XStyle > SAL_CALL OPropertySet::getStyle() + throw (uno::RuntimeException) +{ + return m_pImplProperties->GetStyle(); +} + +void SAL_CALL OPropertySet::setStyle( const Reference< style::XStyle >& xStyle ) + throw (lang::IllegalArgumentException, + uno::RuntimeException) +{ + if( ! m_pImplProperties->SetStyle( xStyle )) + throw lang::IllegalArgumentException( + OUString( RTL_CONSTASCII_USTRINGPARAM( "Empty Style" )), + static_cast< beans::XPropertySet * >( this ), + 0 ); +} + +// ____ XFastPropertyState ____ +// beans::PropertyState OPropertySet::SAL_CALL getFastPropertyState( sal_Int32 nHandle ) +// throw (beans::UnknownPropertyException, +// uno::RuntimeException) +// { +// return m_pImplProperties->GetPropertyStateByHandle( nHandle ); +// } + +// uno::Sequence< beans::PropertyState > OPropertySet::SAL_CALL getFastPropertyStates( +// const uno::Sequence< sal_Int32 >& aHandles ) +// throw (beans::UnknownPropertyException, +// uno::RuntimeException) +// { +// ::std::vector< sal_Int32 > aHandleVec( +// aHandles.getConstArray(), +// aHandles.getConstArray() + aHandles.getLength() ); + +// return m_pImplProperties->GetPropertyStatesByHandle( aHandleVec ); +// } + +// void OPropertySet::SAL_CALL setFastPropertyToDefault( sal_Int32 nHandle ) +// throw (beans::UnknownPropertyException, +// uno::RuntimeException) +// { +// m_pImplProperties->SetPropertyToDefault( nHandle ); +// } + +// uno::Any OPropertySet::SAL_CALL getFastPropertyDefault( sal_Int32 nHandle ) +// throw (beans::UnknownPropertyException, +// lang::WrappedTargetException, +// uno::RuntimeException) +// { +// return GetDefaultValue( nHandle ); +// } + + +} // namespace property diff --git a/chart2/source/tools/OStyle.cxx b/chart2/source/tools/OStyle.cxx new file mode 100644 index 000000000..e9c2813dd --- /dev/null +++ b/chart2/source/tools/OStyle.cxx @@ -0,0 +1,265 @@ +/************************************************************************* + * + * $RCSfile: OStyle.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:32 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "OStyle.hxx" +#include "macros.hxx" + +#ifndef _RTL_UUID_H_ +#include <rtl/uuid.h> +#endif +#ifndef _CPPUHELPER_QUERYINTERFACE_HXX_ +#include <cppuhelper/queryinterface.hxx> +#endif + +using namespace ::com::sun::star; + +using ::com::sun::star::uno::Sequence; +using ::com::sun::star::uno::Reference; +using ::rtl::OUString; +using ::osl::MutexGuard; + +namespace property +{ + +OStyle::OStyle( const Reference< container::XNameAccess > & xStyleFamily, + ::osl::Mutex & _rMutex ) : + OPropertySet( _rMutex ), + m_xStyleFamily( xStyleFamily ), + m_bUserDefined( false ), + m_rMutex( _rMutex ) +{} + +OStyle::~OStyle() +{} + +::osl::Mutex & OStyle::GetMutex() +{ + return m_rMutex; +} + +// ____ XStyle ____ +sal_Bool SAL_CALL OStyle::isUserDefined() + throw (uno::RuntimeException) +{ + // /-- + MutexGuard aGuard( GetMutex() ); + return m_bUserDefined; + // \-- +} + +sal_Bool SAL_CALL OStyle::isInUse() + throw (uno::RuntimeException) +{ + // /-- + MutexGuard aGuard( GetMutex() ); + + // aBoundLC is a member of cppuhelper::OPropertySetHelper + // it is assumed that a style is in use whenever some component is + // registered here as listener + return ( aBoundLC.getContainedTypes().getLength() > 0 ); + // \-- +} + +OUString SAL_CALL OStyle::getParentStyle() + throw (uno::RuntimeException) +{ + // /-- + MutexGuard aGuard( GetMutex() ); + return m_aParentStyleName; + // \-- +} + +void SAL_CALL OStyle::setParentStyle( const OUString& aParentStyle ) + throw (container::NoSuchElementException, + uno::RuntimeException) +{ + // /-- + MutexGuard aGuard( GetMutex() ); + m_aParentStyleName = aParentStyle; + // \-- +} + +// ____ XNamed (base of XStyle) ____ + +OUString SAL_CALL OStyle::getName() + throw (uno::RuntimeException) +{ + // /-- + MutexGuard aGuard( GetMutex() ); + return m_aName; + // \-- +} + +void SAL_CALL OStyle::setName( const ::rtl::OUString& aName ) + throw (uno::RuntimeException) +{ + // /-- + MutexGuard aGuard( GetMutex() ); + OSL_ASSERT( m_xStyleFamily.is() ); + + // note: RuntimeException is not very apropriate for this, but I have no + // other choice + if( m_xStyleFamily->hasByName( aName )) + { + OSL_ENSURE( false, "Style name already exists!" ); + throw uno::RuntimeException( + C2U( "Style name already exists: " ) + aName, + static_cast< style::XStyle * >( this )); + } + else + { + // ToDo: Change the name in the container (XStyleFamiliy) + m_aName = aName; + } + // \-- +} + +// ____ XInterface ____ +uno::Any SAL_CALL OStyle::queryInterface( const uno::Type& aType ) + throw (uno::RuntimeException) +{ + uno::Any aResult = OPropertySet::queryInterface( aType ); + + if( ! aResult.hasValue()) + { + return ::cppu::queryInterface( + aType, + static_cast< style::XStyle * >( this )); + } + + return aResult; +} + +// void SAL_CALL OStyle::acquire() throw () +// { +// OPropertySet::acquire(); +// } + +// void SAL_CALL OStyle::release() throw () +// { +// OPropertySet::release(); +// } + + + +// ____ XServiceInfo ____ +// OUString SAL_CALL +// OStyle::getImplementationName() +// throw (uno::RuntimeException) +// { +// return OUString( RTL_CONSTASCII_USTRINGPARAM( "property::OStyle" )); +// } + +// sal_Bool SAL_CALL +// OStyle::supportsService( const OUString& ServiceName ) +// throw (uno::RuntimeException) +// { +// Sequence< OUString > aServices( getSupportedServiceNames() ); + +// sal_Int32 nI = aServices.getLength() - 1; +// for( ; nI >= 0; --nI ) +// { +// if( aServices[ nI ].equals( ServiceName )) +// return sal_True; +// } +// return sal_False; +// } + +// Sequence< OUString > SAL_CALL +// OStyle::getSupportedServiceNames() +// throw (uno::RuntimeException) +// { +// Sequence< OUString > aServiceNames( 2 ); +// // from base OPropertySet +// aServiceNames[ 0 ] = OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.beans.PropertySet" )); +// // new service +// aServiceNames[ 1 ] = OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.style.Style" )); +// return aServiceNames; +// } + + +// ____ XTypeProvider ____ +// Sequence< uno::Type > SAL_CALL +// OStyle::getTypes() +// throw (uno::RuntimeException) +// { +// Sequence< uno::Type > aResult( OPropertySet::getTypes() ); +// aResult.realloc( aResult.getLength() + 1 ); +// aResult[ aResult.getLength() - 1 ] = +// ::getCppuType( reinterpret_cast< const Reference< style::XStyle > *>(0)); + +// return aResult; +// } + +// Sequence< sal_Int8 > SAL_CALL +// OStyle::getImplementationId() +// throw (uno::RuntimeException) +// { +// static uno::Sequence< sal_Int8 > aId; +// if( aId.getLength() == 0 ) +// { +// aId.realloc( 16 ); +// rtl_createUuid( (sal_uInt8 *)aId.getArray(), 0, sal_True ); +// } +// return aId; +// } + + +} // namespace property diff --git a/chart2/source/tools/Scaling.cxx b/chart2/source/tools/Scaling.cxx new file mode 100644 index 000000000..13215b248 --- /dev/null +++ b/chart2/source/tools/Scaling.cxx @@ -0,0 +1,232 @@ +/************************************************************************* + * + * $RCSfile: Scaling.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:32 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef _CHART2_SCALING_HXX +#include "Scaling.hxx" +#endif + +#ifndef INCLUDED_RTL_MATH_HXX +#include <rtl/math.hxx> +#endif + +namespace +{ + +static const ::rtl::OUString lcl_aServiceName_Logarithmic( + RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart2.LogarithmicScaling" )); +static const ::rtl::OUString lcl_aServiceName_Exponential( + RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart2.ExponentialScaling" )); +static const ::rtl::OUString lcl_aServiceName_Linear( + RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart2.LinearScaling" )); +static const ::rtl::OUString lcl_aServiceName_Power( + RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart2.PowerScaling" )); +} + +//............................................................................. +namespace chart +{ +//............................................................................. +using namespace ::com::sun::star; +using namespace ::drafts::com::sun::star::chart2; + +LogarithmicScaling::LogarithmicScaling() : + m_fBase( 10.0 ), + m_fLogOfBase( log( 10.0 ) ) +{ +} + +LogarithmicScaling::LogarithmicScaling( double fBase ) : + m_fBase( fBase ), + m_fLogOfBase( log( fBase ) ) +{ +} + +LogarithmicScaling::~LogarithmicScaling() +{ +} + + double SAL_CALL +LogarithmicScaling::doScaling( double value ) + throw (uno::RuntimeException) +{ + return log( value ) / m_fLogOfBase; +} + + uno::Reference< XScaling > SAL_CALL +LogarithmicScaling::getInverseScaling() + throw (uno::RuntimeException) +{ + return new ExponentialScaling( m_fBase ); +} + + ::rtl::OUString SAL_CALL +LogarithmicScaling::getServiceName() + throw (uno::RuntimeException) +{ + return lcl_aServiceName_Logarithmic; +} + +// ---------------------------------------- + +ExponentialScaling::ExponentialScaling() : + m_fBase( 10.0 ) +{ +} + +ExponentialScaling::ExponentialScaling( double fBase ) : + m_fBase( fBase ) +{ +} + +ExponentialScaling::~ExponentialScaling() +{ +} + + double SAL_CALL +ExponentialScaling::doScaling( double value ) + throw (uno::RuntimeException) +{ + return pow( m_fBase, value ); +} + + uno::Reference< XScaling > SAL_CALL +ExponentialScaling::getInverseScaling() + throw (uno::RuntimeException) +{ + return new LogarithmicScaling( m_fBase ); +} + + ::rtl::OUString SAL_CALL +ExponentialScaling::getServiceName() + throw (uno::RuntimeException) +{ + return lcl_aServiceName_Exponential; +} + +// ---------------------------------------- + +LinearScaling::LinearScaling( double fSlope, double fOffset ) : + m_fSlope( fSlope ), + m_fOffset( fOffset ) +{} + +LinearScaling::~LinearScaling() +{} + +double SAL_CALL LinearScaling::doScaling( double value ) + throw (uno::RuntimeException) +{ + return m_fOffset + m_fSlope * value; +} + +uno::Reference< XScaling > SAL_CALL + LinearScaling::getInverseScaling() + throw (uno::RuntimeException) +{ + // ToDo: ApproxEqual ? + if( m_fSlope == 0 ) + throw uno::RuntimeException(); + + return new LinearScaling( 1.0 / m_fSlope, m_fOffset / m_fSlope ); +} + + ::rtl::OUString SAL_CALL +LinearScaling::getServiceName() + throw (uno::RuntimeException) +{ + return lcl_aServiceName_Linear; +} + +// ---------------------------------------- + +PowerScaling::PowerScaling( double fExponent ) : + m_fExponent( fExponent ) +{} + +PowerScaling::~PowerScaling() +{} + +double SAL_CALL PowerScaling::doScaling( double value ) + throw (uno::RuntimeException) +{ + return pow( value, m_fExponent ); +} + +uno::Reference< XScaling > SAL_CALL + PowerScaling::getInverseScaling() + throw (uno::RuntimeException) +{ + // ToDo: ApproxEqual ? + if( m_fExponent == 0 ) + throw uno::RuntimeException(); + + return new PowerScaling( 1.0 / m_fExponent ); +} + + ::rtl::OUString SAL_CALL +PowerScaling::getServiceName() + throw (uno::RuntimeException) +{ + return lcl_aServiceName_Power; +} + +//............................................................................. +} //namespace chart +//............................................................................. diff --git a/chart2/source/tools/TitleHelper.cxx b/chart2/source/tools/TitleHelper.cxx new file mode 100644 index 000000000..2cac24c67 --- /dev/null +++ b/chart2/source/tools/TitleHelper.cxx @@ -0,0 +1,241 @@ +/************************************************************************* + * + * $RCSfile: TitleHelper.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:32 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "TitleHelper.hxx" +#include "ChartModelHelper.hxx" +#include "macros.hxx" +#include "ContextHelper.hxx" + +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XCHARTDOCUMENT_HPP_ +#include <drafts/com/sun/star/chart2/XChartDocument.hpp> +#endif + +//............................................................................. +namespace chart +{ +//............................................................................. + +using namespace ::com::sun::star; +using namespace ::drafts::com::sun::star::chart2; + +rtl::OUString TitleHelper::getIdentifierForTitle( TitleHelper::eTitleType nTitleIndex ) +{ + switch( nTitleIndex ) + { + case MAIN_TITLE: + { + static rtl::OUString m_aIdentifier( C2U( "@main-title" ) ); + return m_aIdentifier; + } + case SUB_TITLE: + { + static rtl::OUString m_aIdentifier( C2U( "@sub-title" ) ); + return m_aIdentifier; + } + case X_AXIS_TITLE: + { + static rtl::OUString m_aIdentifier( C2U( "@xaxis-title" ) ); + return m_aIdentifier; + } + case Y_AXIS_TITLE: + { + static rtl::OUString m_aIdentifier( C2U( "@yaxis-title" ) ); + return m_aIdentifier; + } + case Z_AXIS_TITLE: + { + static rtl::OUString m_aIdentifier( C2U( "@zaxis-title" ) ); + return m_aIdentifier; + } + default: + OSL_ENSURE( false, "Unsupported Title-Type requested" ); + return ::rtl::OUString(); + } +} + +uno::Reference< XTitled > lcl_getTitleParent( TitleHelper::eTitleType nTitleIndex + , const uno::Reference< frame::XModel >& xModel ) +{ + switch( nTitleIndex ) + { + case TitleHelper::MAIN_TITLE: + return uno::Reference< XTitled >( xModel, uno::UNO_QUERY ); + case TitleHelper::SUB_TITLE: + { + uno::Reference< XChartDocument > xChartDoc( xModel, uno::UNO_QUERY ); + if( !xChartDoc.is()) + return NULL; + return uno::Reference< XTitled >( xChartDoc->getDiagram(), uno::UNO_QUERY ); + } + case TitleHelper::X_AXIS_TITLE: + //@todo + break; + case TitleHelper::Y_AXIS_TITLE: + //@todo + break; + case TitleHelper::Z_AXIS_TITLE: + //@todo + break; + default: + OSL_ENSURE( false, "Unsupported Title-Type requested" ); + return NULL; + } +} + +uno::Reference< XTitle > TitleHelper::getTitle( TitleHelper::eTitleType nTitleIndex + , const uno::Reference< frame::XModel >& xModel ) +{ + uno::Reference< XTitled > xTitled( lcl_getTitleParent( nTitleIndex, xModel ) ); + if( xTitled.is()) + return xTitled->getTitle(); + return NULL; +} + +uno::Reference< XTitle > TitleHelper::createTitle( + TitleHelper::eTitleType nTitleIndex + , const rtl::OUString& rTitleText + , const uno::Reference< frame::XModel >& xModel + , const uno::Reference< uno::XComponentContext > & xContext ) +{ + if( !rTitleText.getLength() ) + return NULL; + + uno::Reference< XTitle > xTitle(NULL); + uno::Reference< XTitled > xTitled( lcl_getTitleParent( nTitleIndex, xModel ) ); + + ContextHelper::tContextEntryMapType aContextValues( + ContextHelper::MakeContextEntryMap( C2U( "Identifier" ) + , uno::makeAny( TitleHelper::getIdentifierForTitle(nTitleIndex) )) ); + uno::Reference< uno::XComponentContext > xNewContext( + ContextHelper::createContext( aContextValues, xContext ) ); + + if(xNewContext.is() && xTitled.is()) + { + xTitle.set( xContext->getServiceManager()->createInstanceWithContext( + C2U( "drafts.com.sun.star.chart2.Title" ), + xNewContext ), uno::UNO_QUERY ); + + if(xTitle.is()) + { + setCompleteString( rTitleText, xTitle, xNewContext ); + xTitled->setTitle( xTitle ); + } + } + return xTitle; +} + +rtl::OUString TitleHelper::getCompleteString( const uno::Reference< XTitle >& xTitle ) +{ + rtl::OUString aRet; + if(!xTitle.is()) + return aRet; + uno::Sequence< uno::Reference< XFormattedString > > aStringList = xTitle->getText(); + for( sal_Int32 nN=0; nN<aStringList.getLength();nN++ ) + aRet += aStringList[nN]->getString(); + return aRet; +} + +void TitleHelper::setCompleteString( const rtl::OUString& rNewText + , const uno::Reference< XTitle >& xTitle + , const uno::Reference< uno::XComponentContext > & xContext ) +{ + //the format of the first old text portion will be maintained if there is any + if(!xTitle.is()) + return; + + uno::Sequence< uno::Reference< XFormattedString > > aNewStringList(1); + + uno::Sequence< uno::Reference< XFormattedString > > aOldStringList = xTitle->getText(); + if( aOldStringList.getLength() ) + { + aNewStringList[0].set( aOldStringList[0] ); + aNewStringList[0]->setString( rNewText ); + } + else + { + uno::Reference< uno::XInterface > xI( + xContext->getServiceManager()->createInstanceWithContext( + C2U( "drafts.com.sun.star.chart2.FormattedString" ), xContext ) ); + uno::Reference< XFormattedString > xFormattedString( xI, uno::UNO_QUERY ); + + if(xFormattedString.is()) + { + xFormattedString->setString( rNewText ); + aNewStringList[0].set( xFormattedString ); + } + } + xTitle->setText( aNewStringList ); +} + +void TitleHelper::removeTitle( TitleHelper::eTitleType nTitleIndex + , const ::com::sun::star::uno::Reference< + ::com::sun::star::frame::XModel >& xModel ) +{ + uno::Reference< XTitled > xTitled( lcl_getTitleParent( nTitleIndex, xModel ) ); + if( xTitled.is()) + { + xTitled->setTitle(NULL); + } +} + +//............................................................................. +} //namespace chart +//............................................................................. + diff --git a/chart2/source/tools/exports.flt b/chart2/source/tools/exports.flt new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/chart2/source/tools/exports.flt diff --git a/chart2/source/tools/makefile.mk b/chart2/source/tools/makefile.mk new file mode 100644 index 000000000..21392c341 --- /dev/null +++ b/chart2/source/tools/makefile.mk @@ -0,0 +1,166 @@ +#************************************************************************* +# +# $RCSfile: makefile.mk,v $ +# +# $Revision: 1.1.1.1 $ +# +# last change: $Author: bm $ $Date: 2003-10-06 09:58:32 $ +# +# The Contents of this file are made available subject to the terms of +# either of the following licenses +# +# - GNU Lesser General Public License Version 2.1 +# - Sun Industry Standards Source License Version 1.1 +# +# Sun Microsystems Inc., October, 2000 +# +# GNU Lesser General Public License Version 2.1 +# ============================================= +# Copyright 2000 by Sun Microsystems, Inc. +# 901 San Antonio Road, Palo Alto, CA 94303, USA +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License version 2.1, as published by the Free Software Foundation. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# +# +# Sun Industry Standards Source License Version 1.1 +# ================================================= +# The contents of this file are subject to the Sun Industry Standards +# Source License Version 1.1 (the "License"); You may not use this file +# except in compliance with the License. You may obtain a copy of the +# License at http://www.openoffice.org/license.html. +# +# Software provided under this License is provided on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, +# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, +# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. +# See the License for the specific provisions governing your rights and +# obligations concerning the Software. +# +# The Initial Developer of the Original Code is: Sun Microsystems, Inc. +# +# Copyright: 2000 by Sun Microsystems, Inc. +# +# All Rights Reserved. +# +# Contributor(s): _______________________________________ +# +# +# +#************************************************************************* + +PRJ= ..$/.. +PRJNAME= chart2 +TARGET= charttools + +PRJINC= $(PRJ)$/source + +USE_DEFFILE= TRUE +ENABLE_EXCEPTIONS= TRUE + +# --- Settings ----------------------------------------------------- + +.INCLUDE: $(PRJ)$/util$/makefile.pmk + +# --- export library ------------------------------------------------- + +#You can use several library macros of this form to build libraries that +#do not consist of all object files in a directory or to merge different libraries. +#LIB1TARGET= $(SLB)$/_$(TARGET).lib + +#Specifies object files to bind into linked libraries. +SLOFILES= \ + $(SLO)$/LifeTime.obj \ + $(SLO)$/MediaDescriptorHelper.obj \ + $(SLO)$/CommonConverters.obj \ + $(SLO)$/ContextHelper.obj \ + $(SLO)$/ImplOPropertySet.obj \ + $(SLO)$/OChartElementContainerHelper.obj \ + $(SLO)$/OEnumeration.obj \ + $(SLO)$/OIndexContainer.obj \ + $(SLO)$/OPropertySet.obj \ + $(SLO)$/OStyle.obj \ + $(SLO)$/Scaling.obj \ + $(SLO)$/ChartModelHelper.obj \ + $(SLO)$/MeterHelper.obj \ + $(SLO)$/MutexContainer.obj \ + $(SLO)$/TitleHelper.obj \ + $(SLO)$/LegendHelper.obj + +LIB1OBJFILES = $(SLOFILES) + +#-------- + +#Indicates the filename of the shared library. +SHL1TARGET= $(TARGET)$(UPD)$(DLLPOSTFIX) + +#indicates dependencies: +SHL1DEPN= +#Specifies an import library to create. For Win32 only. +SHL1IMPLIB= i$(TARGET) + +#Specifies libraries from the same module to put into the shared library. +#was created above +SHL1LIBS= $(SLB)$/$(TARGET).lib + +#Links import libraries. + +SHL1STDLIBS= \ + $(CPPULIB) \ + $(CPPUHELPERLIB) \ + $(SALLIB) \ + $(TOOLSLIB) + +# $(COMPHELPERLIB) \ +# $(GOODIESLIB) \ +# $(SVLIB) \ +# $(SVLLIB) \ +# $(SVTOOLLIB) \ +# $(SVXLIB) \ +# $(TKLIB) \ +# $(VCLLIB) \ +# $(SFXLIB) + +#--------exports + +#specifies the exported symbols for Windows only: +SHL1DEF= $(MISC)$/$(SHL1TARGET).def + +#Specifies the library name to parse for symbols. For Win32 only. +#DEFLIB1NAME= _$(TARGET) + +#A file of symbols to export. +#DEF1EXPORTFILE= $(PRJ)$/source$/inc$/exports.dxp + +#--------definition file + +#name of the definition file: +DEF1NAME= $(SHL1TARGET) + +# indicates definition file dependencies +DEF1DEPN= $(MISC)$/$(SHL1TARGET).flt + +#A comment on the definition file. +DEF1DES= Chart Tools + +# --- Targets ----------------------------------------------------------------- + +.INCLUDE: target.mk + +# --- Filter ----------------------------------------------------------- + +$(MISC)$/$(SHL1TARGET).flt: makefile.mk \ + exports.flt + +$(TYPE) exports.flt > $@ + diff --git a/chart2/source/tools/tools.map b/chart2/source/tools/tools.map new file mode 100644 index 000000000..7698cb349 --- /dev/null +++ b/chart2/source/tools/tools.map @@ -0,0 +1,9 @@ +CHART_1_0 { + global: + component_getImplementationEnvironment; + component_writeInfo; + component_getFactory; + component_getDescriptionFunc; + local: + *; +}; diff --git a/chart2/source/view/axes/ScaleAutomatism.cxx b/chart2/source/view/axes/ScaleAutomatism.cxx new file mode 100644 index 000000000..6f9c14700 --- /dev/null +++ b/chart2/source/view/axes/ScaleAutomatism.cxx @@ -0,0 +1,357 @@ +/************************************************************************* + * + * $RCSfile: ScaleAutomatism.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:33 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "ScaleAutomatism.hxx" +#include "macros.hxx" +#include "TickmarkHelper.hxx" + +#ifndef _COM_SUN_STAR_LANG_XSERVICENAME_HPP_ +#include <com/sun/star/lang/XServiceName.hpp> +#endif + +#ifndef INCLUDED_RTL_MATH_HXX +#include <rtl/math.hxx> +#endif + +#ifndef _TOOLS_DEBUG_HXX +#include <tools/debug.hxx> +#endif + +//............................................................................. +namespace chart +{ +//............................................................................. +using namespace ::com::sun::star; +using namespace ::drafts::com::sun::star::chart2; + +ScaleAutomatism::ScaleAutomatism( const ScaleData& rSourceScale ) + : m_fValueMinimum( 0.0 ) + , m_fValueMaximum( 0.0 ) + , m_nMaximumAutomaticMainIncrementCount(10) + , m_aSourceScale( rSourceScale ) + , m_aSourceIncrement() + , m_aSourceSubIncrementList() +{ + ::rtl::math::setNan( &m_fValueMinimum ); + ::rtl::math::setNan( &m_fValueMaximum ); +} + +ScaleAutomatism::ScaleAutomatism( const ScaleData& rSourceScale + , const IncrementData& rSourceIncrement + , const uno::Sequence< SubIncrement >& rSourceSubIncrementList ) + : m_fValueMinimum( 0.0 ) + , m_fValueMaximum( 0.0 ) + , m_nMaximumAutomaticMainIncrementCount(9) + , m_aSourceScale( rSourceScale ) + , m_aSourceIncrement( rSourceIncrement ) + , m_aSourceSubIncrementList( rSourceSubIncrementList ) +{ + ::rtl::math::setNan( &m_fValueMinimum ); + ::rtl::math::setNan( &m_fValueMaximum ); +} + +ScaleAutomatism::~ScaleAutomatism() +{ +} + +//@todo these method should become part of the scaling interface and implementation somehow +//@todo problem with outparamters at api +ExplicitIncrementData getExplicitIncrementAndScaleForLogarithm( + bool bChangeMinimumToIncrementRythm, bool bChangeMaximumToIncrementRythm + , sal_Int32 nMaximumAutomaticMainIncrementCount + , ExplicitScaleData& rExplicitScale + , const IncrementData& rSourceIncrement + , const uno::Sequence< SubIncrement >& rSourceSubIncrementList ) +{ + //minimum and maximum of the ExplicitScaleData may be changed + //to suiteable values if allowed + //but they will definitly be changed if they are out of allowed borders + + if( nMaximumAutomaticMainIncrementCount <= 0 ) + nMaximumAutomaticMainIncrementCount = 5; + + //make sure that minimum and maximum are not out of allowed range + { + if( rExplicitScale.Maximum<=0.0 ) + rExplicitScale.Maximum = 100.0; + if( rExplicitScale.Minimum<=0.0 ) + { + rExplicitScale.Minimum = 0.1; + if( rExplicitScale.Minimum >= rExplicitScale.Maximum ) + rExplicitScale.Minimum = log(rExplicitScale.Maximum)/10.0; + } + } + + ExplicitIncrementData aRet; + if(!(rSourceIncrement.PostEquidistant>>=aRet.PostEquidistant)) + { + //maybe scaling dependent + aRet.PostEquidistant = sal_True; + } + if(!(rSourceIncrement.Distance>>=aRet.Distance)) + { + //autocalculate the distance + if(aRet.PostEquidistant && rExplicitScale.Scaling.is() ) + { + double fRange = rExplicitScale.Scaling->doScaling( rExplicitScale.Maximum ) + - rExplicitScale.Scaling->doScaling( rExplicitScale.Minimum ); + double fSlice = fRange/nMaximumAutomaticMainIncrementCount; + //make a fine value out of fSlice now: + //only integers are reasonable as distance values + sal_Int32 nDistance = static_cast<sal_Int32>(fSlice); + if(nDistance<=0) + nDistance=1; + aRet.Distance = nDistance; + } + else + { + //@todo this was not tested + double fRange = rExplicitScale.Maximum - rExplicitScale.Minimum; + double fSlice = fRange/nMaximumAutomaticMainIncrementCount; + //make a fine value out of fSlice now: + double fSliceMagnitude = pow (10, floor (log10 (fSlice))); + aRet.Distance = static_cast<sal_Int32>(fSlice/fSliceMagnitude)*fSliceMagnitude; + } + } + + if(!(rSourceIncrement.BaseValue>>=aRet.BaseValue)) + { + //scaling dependent + //@maybe todo is this default also plotter dependent ?? + aRet.BaseValue = 1.0; + } + else if( aRet.BaseValue<=0.0 ) //make sure that BaseValue is not out of allowed ranges + aRet.BaseValue = 1.0; + + if(bChangeMinimumToIncrementRythm) + { + double fMin = rExplicitScale.Minimum; + if( aRet.PostEquidistant && rExplicitScale.Scaling.is() ) + fMin = rExplicitScale.Scaling->doScaling(fMin); + + fMin = TickmarkHelper::getMinimumAtIncrement( fMin, aRet ); + if( aRet.PostEquidistant && rExplicitScale.Scaling.is() ) + fMin = rExplicitScale.Scaling->getInverseScaling()->doScaling(fMin); + rExplicitScale.Minimum = fMin; + + if( rExplicitScale.Minimum<=0.0 ) + { + rExplicitScale.Minimum = 0.1; + if( rExplicitScale.Minimum >= rExplicitScale.Maximum ) + rExplicitScale.Minimum = log(rExplicitScale.Maximum)/10.0; + } + } + if(bChangeMaximumToIncrementRythm) + { + double fMax = rExplicitScale.Maximum; + if( aRet.PostEquidistant && rExplicitScale.Scaling.is() ) + fMax = rExplicitScale.Scaling->doScaling(fMax); + fMax = TickmarkHelper::getMaximumAtIncrement( fMax, aRet ); + if( aRet.PostEquidistant && rExplicitScale.Scaling.is() ) + fMax = rExplicitScale.Scaling->getInverseScaling()->doScaling(fMax); + rExplicitScale.Maximum = fMax; + } + //--------------------------------------------------------------- + //fill explicit sub increment + sal_Int32 nSubCount = rSourceSubIncrementList.getLength(); + aRet.SubIncrements.realloc(nSubCount); + for( sal_Int32 nN=0; nN<nSubCount; nN++ ) + { + const SubIncrement& rSubIncrement = rSourceSubIncrementList[nN]; + ExplicitSubIncrement& rExplicitSubIncrement = aRet.SubIncrements[nN]; + + if(!(rSubIncrement.IntervalCount>>=rExplicitSubIncrement.IntervalCount)) + { + //scaling dependent + //@todo autocalculate IntervalCount dependent on MainIncrement and scaling + rExplicitSubIncrement.IntervalCount = 5; + } + if(!(rSubIncrement.PostEquidistant>>=rExplicitSubIncrement.PostEquidistant)) + { + //scaling dependent + rExplicitSubIncrement.PostEquidistant = sal_False; + } + } + return aRet; +} + +ExplicitIncrementData getExplicitIncrementAndScaleForLinear( + bool bChangeMinimumToIncrementRythm, bool bChangeMaximumToIncrementRythm + , sal_Int32 nMaximumAutomaticMainIncrementCount + , ExplicitScaleData& rExplicitScale + , const IncrementData& rSourceIncrement + , const uno::Sequence< SubIncrement >& rSourceSubIncrementList ) +{ + //minimum and maximum of the ExplicitScaleData may be changed + //to suiteable values if allowed + //but they will definitly be changed if they are out of allowed borders + + ExplicitIncrementData aRet; + if(!(rSourceIncrement.PostEquidistant>>=aRet.PostEquidistant)) + { + //maybe scaling dependent + aRet.PostEquidistant = sal_True; + } + if(!(rSourceIncrement.Distance>>=aRet.Distance)) + { + //autocalculate the distance + double fRange = rExplicitScale.Maximum - rExplicitScale.Minimum; + double fSlice = fRange/nMaximumAutomaticMainIncrementCount; + + //make a fine value out of fSlice now: + double fSliceMagnitude = pow (10, floor (log10 (fSlice))); + fSlice /= fSliceMagnitude; + if(fSlice<=1.0) + fSlice=1.0; + else if( fSlice<= 2.0 ) + fSlice=2.0; + else if( fSlice<= 2.5 ) + fSlice=2.5; + else if( fSlice<= 5.0) + fSlice=5.0; + else + fSlice=10.0; + + aRet.Distance = fSlice*fSliceMagnitude; + } + if(!(rSourceIncrement.BaseValue>>=aRet.BaseValue)) + { + //@maybe todo is this default also plotter dependent ?? + aRet.BaseValue = 0.0; + } + if(bChangeMinimumToIncrementRythm) + { + rExplicitScale.Minimum = TickmarkHelper::getMinimumAtIncrement( rExplicitScale.Minimum, aRet ); + } + if(bChangeMaximumToIncrementRythm) + { + rExplicitScale.Maximum = TickmarkHelper::getMaximumAtIncrement( rExplicitScale.Maximum, aRet ); + } + //--------------------------------------------------------------- + //fill explicit sub increment + sal_Int32 nSubCount = rSourceSubIncrementList.getLength(); + aRet.SubIncrements.realloc(nSubCount); + for( sal_Int32 nN=0; nN<nSubCount; nN++ ) + { + const SubIncrement& rSubIncrement = rSourceSubIncrementList[nN]; + ExplicitSubIncrement& rExplicitSubIncrement = aRet.SubIncrements[nN]; + + if(!(rSubIncrement.IntervalCount>>=rExplicitSubIncrement.IntervalCount)) + { + //scaling dependent + //@todo autocalculate IntervalCount dependent on MainIncrement and scaling + rExplicitSubIncrement.IntervalCount = 2; + } + if(!(rSubIncrement.PostEquidistant>>=rExplicitSubIncrement.PostEquidistant)) + { + //scaling dependent + rExplicitSubIncrement.PostEquidistant = sal_False; + } + } + return aRet; +} + +void ScaleAutomatism::calculateExplicitScaleAndIncrement( + ExplicitScaleData& rExplicitScale + , ExplicitIncrementData& rExplicitIncrement ) +{ + //--------------------------------------------------------------- + //fill explicit scale + bool bChangeMinimumToIncrementRythm=false, bChangeMaximumToIncrementRythm=false; + if(!(m_aSourceScale.Minimum>>=rExplicitScale.Minimum)) + { + //autocalculate the minimum in first iteration + //the increment is considered below + if( !::rtl::math::isNan(m_fValueMinimum) ) + rExplicitScale.Minimum = m_fValueMinimum; + else + rExplicitScale.Minimum = 0.0;//@todo get Minimum from scsaling or from plotter???? + bChangeMinimumToIncrementRythm = true; + } + if(!(m_aSourceScale.Maximum>>=rExplicitScale.Maximum)) + { + //autocalculate the maximum in first iteration + //the increment is considered below + if( !::rtl::math::isNan(m_fValueMaximum) ) + rExplicitScale.Maximum = m_fValueMaximum; + else + rExplicitScale.Maximum = 10.0;//@todo get Maximum from scaling or from plotter???? + bChangeMaximumToIncrementRythm=true; + } + rExplicitScale.Orientation = m_aSourceScale.Orientation;//AxisOrientation_MATHEMATICAL; + rExplicitScale.Scaling = m_aSourceScale.Scaling; + rExplicitScale.Breaks = m_aSourceScale.Breaks; + //--------------------------------------------------------------- + //fill explicit increment + //minimum and maximum of the ExplicitScaleData may be changed if allowed + uno::Reference< lang::XServiceName > xServiceName( rExplicitScale.Scaling, uno::UNO_QUERY ); + bool bIsLogarithm = ( xServiceName.is() && (xServiceName->getServiceName()).equals( + C2U( "com.sun.star.chart2.LogarithmicScaling" ))); + if(bIsLogarithm) + rExplicitIncrement = getExplicitIncrementAndScaleForLogarithm( bChangeMinimumToIncrementRythm, bChangeMaximumToIncrementRythm, m_nMaximumAutomaticMainIncrementCount + , rExplicitScale, m_aSourceIncrement, m_aSourceSubIncrementList ); + else + rExplicitIncrement = getExplicitIncrementAndScaleForLinear( bChangeMinimumToIncrementRythm, bChangeMaximumToIncrementRythm, m_nMaximumAutomaticMainIncrementCount + , rExplicitScale, m_aSourceIncrement, m_aSourceSubIncrementList ); +} + +//............................................................................. +} //namespace chart +//............................................................................. diff --git a/chart2/source/view/axes/TickmarkHelper.cxx b/chart2/source/view/axes/TickmarkHelper.cxx new file mode 100644 index 000000000..5c2563f13 --- /dev/null +++ b/chart2/source/view/axes/TickmarkHelper.cxx @@ -0,0 +1,797 @@ +/************************************************************************* + * + * $RCSfile: TickmarkHelper.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:33 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "TickmarkHelper.hxx" +#include "ViewDefines.hxx" + +#ifndef INCLUDED_RTL_MATH_HXX +#include <rtl/math.hxx> +#endif +#ifndef _TOOLS_DEBUG_HXX +#include <tools/debug.hxx> +#endif + +//............................................................................. +namespace chart +{ +//............................................................................. +using namespace ::com::sun::star; +using namespace ::drafts::com::sun::star::chart2; +using namespace ::rtl::math; + +TickInfo::TickInfo() +: fScaledTickValue( 0.0 ) +, fUnscaledTickValue( 0.0 ) +, nScreenTickValue( 0 ) +, bPaintIt( true ) +, xTextShape( NULL ) +{ +} + +void TickInfo::updateUnscaledValue( const uno::Reference< XScaling >& xInverseScaling ) +{ + if( xInverseScaling.is() ) + this->fUnscaledTickValue = xInverseScaling->doScaling( this->fScaledTickValue ); + else + this->fUnscaledTickValue = this->fScaledTickValue; +} + +TickIter::TickIter( const uno::Sequence< uno::Sequence< double > >& rTicks + , const ExplicitIncrementData& rIncrement + , sal_Int32 nMinDepth, sal_Int32 nMaxDepth ) + : m_pSimpleTicks(&rTicks), m_pInfoTicks(NULL) + , m_rIncrement(rIncrement) + , m_nMinDepth(0), m_nMaxDepth(0) + , m_nTickCount(0), m_pnPositions(NULL) + , m_pnPreParentCount(NULL), m_pbIntervalFinished(NULL) + , m_nCurrentDepth(-1), m_nCurrentPos(-1), m_fCurrentValue( 0.0 ) +{ + initIter( nMinDepth, nMaxDepth ); +} + +TickIter::TickIter( ::std::vector< ::std::vector< TickInfo > >& rTicks + , const ExplicitIncrementData& rIncrement + , sal_Int32 nMinDepth, sal_Int32 nMaxDepth ) + : m_pSimpleTicks(NULL), m_pInfoTicks(&rTicks) + , m_rIncrement(rIncrement) + , m_nMinDepth(0), m_nMaxDepth(0) + , m_nTickCount(0), m_pnPositions(NULL) + , m_pnPreParentCount(NULL), m_pbIntervalFinished(NULL) + , m_nCurrentDepth(-1), m_nCurrentPos(-1), m_fCurrentValue( 0.0 ) +{ + initIter( nMinDepth, nMaxDepth ); +} + +void TickIter::initIter( sal_Int32 nMinDepth, sal_Int32 nMaxDepth ) +{ + m_nMaxDepth = nMaxDepth; + if(nMaxDepth<0 || m_nMaxDepth>_getMaxDepth()) + m_nMaxDepth=_getMaxDepth(); + + sal_Int32 nDepth = 0; + for( nDepth = 0; nDepth<=m_nMaxDepth ;nDepth++ ) + m_nTickCount += _getTickCount(nDepth); + + if(!m_nTickCount) + return; + + m_pnPositions = new sal_Int32[m_nMaxDepth+1]; + + m_pnPreParentCount = new sal_Int32[m_nMaxDepth+1]; + m_pbIntervalFinished = new bool[m_nMaxDepth+1]; + m_pnPreParentCount[0] = 0; + m_pbIntervalFinished[0] = false; + double fParentValue = _getTickValue(0,0); + for( nDepth = 1; nDepth<=m_nMaxDepth ;nDepth++ ) + { + m_pbIntervalFinished[nDepth] = false; + + sal_Int32 nPreParentCount = 0; + sal_Int32 nCount = _getTickCount(nDepth); + for(sal_Int32 nN = 0; nN<nCount; nN++) + { + if(_getTickValue(nDepth,nN) < fParentValue) + nPreParentCount++; + else + break; + } + m_pnPreParentCount[nDepth] = nPreParentCount; + if(nCount) + { + double fNextParentValue = _getTickValue(nDepth,0); + if( fNextParentValue < fParentValue ) + fParentValue = fNextParentValue; + } + } +} + +TickIter::~TickIter() +{ + delete[] m_pnPositions; + delete[] m_pnPreParentCount; + delete[] m_pbIntervalFinished; +} + +sal_Int32 TickIter::getStartDepth() const +{ + //find the depth of the first visible tickmark: + //it is the depth of the smallest value + sal_Int32 nReturnDepth=0; + double fMinValue = DBL_MAX; + for(sal_Int32 nDepth = 0; nDepth<=m_nMaxDepth ;nDepth++ ) + { + sal_Int32 nCount = _getTickCount(nDepth); + if( !nCount ) + continue; + double fThisValue = _getTickValue(nDepth,0); + if(fThisValue<fMinValue) + { + nReturnDepth = nDepth; + fMinValue = fThisValue; + } + } + return nReturnDepth; +} + +double* TickIter::firstValue() +{ + if( gotoFirst() ) + { + m_fCurrentValue = _getTickValue(m_nCurrentDepth, m_pnPositions[m_nCurrentDepth]); + return &m_fCurrentValue; + } + return NULL; +} + +TickInfo* TickIter::firstInfo() +{ + if( m_pInfoTicks && gotoFirst() ) + return &(*m_pInfoTicks)[m_nCurrentDepth][m_pnPositions[m_nCurrentDepth]]; + return NULL; +} + +sal_Int32 TickIter::getIntervalCount( sal_Int32 nDepth ) +{ + if(nDepth>m_rIncrement.SubIncrements.getLength() || nDepth<0) + return 0; + + if(!nDepth) + return m_nTickCount; + + return m_rIncrement.SubIncrements[nDepth-1].IntervalCount; +} + +bool TickIter::isAtLastPartTick() +{ + if(!m_nCurrentDepth) + return false; + sal_Int32 nIntervalCount = getIntervalCount( m_nCurrentDepth ); + if(!nIntervalCount || nIntervalCount == 1) + return true; + if( m_pbIntervalFinished[m_nCurrentDepth] ) + return false; + sal_Int32 nPos = m_pnPositions[m_nCurrentDepth]+1; + if(m_pnPreParentCount[m_nCurrentDepth]) + nPos += nIntervalCount-1 - m_pnPreParentCount[m_nCurrentDepth]; + bool bRet = nPos && nPos % (nIntervalCount-1) == 0; + if(!nPos && !m_pnPreParentCount[m_nCurrentDepth] + && m_pnPositions[m_nCurrentDepth-1]==-1 ) + bRet = true; + return bRet; +} + +bool TickIter::gotoFirst() +{ + if( m_nMaxDepth<0 ) + return false; + if( !m_nTickCount ) + return false; + + for(sal_Int32 nDepth = 0; nDepth<=m_nMaxDepth ;nDepth++ ) + m_pnPositions[nDepth] = -1; + + m_nCurrentPos = 0; + m_nCurrentDepth = getStartDepth(); + m_pnPositions[m_nCurrentDepth] = 0; + return true; +} + +bool TickIter::gotoNext() +{ + if( m_nCurrentPos < 0 ) + return false; + m_nCurrentPos++; + + if( m_nCurrentPos >= m_nTickCount ) + return false; + + if( m_nCurrentDepth==m_nMaxDepth && isAtLastPartTick() ) + { + do + { + m_pbIntervalFinished[m_nCurrentDepth] = true; + m_nCurrentDepth--; + } + while( m_nCurrentDepth && isAtLastPartTick() ); + } + else if( m_nCurrentDepth<m_nMaxDepth ) + { + do + { + m_nCurrentDepth++; + } + while( m_nCurrentDepth<m_nMaxDepth ); + } + m_pbIntervalFinished[m_nCurrentDepth] = false; + m_pnPositions[m_nCurrentDepth] = m_pnPositions[m_nCurrentDepth]+1; + return true; +} + +double* TickIter::nextValue() +{ + if( gotoNext() ) + { + m_fCurrentValue = _getTickValue(m_nCurrentDepth, m_pnPositions[m_nCurrentDepth]); + return &m_fCurrentValue; + } + return NULL; +} + +TickInfo* TickIter::nextInfo() +{ + if( m_pInfoTicks && gotoNext() ) + return &(*m_pInfoTicks)[m_nCurrentDepth][m_pnPositions[m_nCurrentDepth]]; + return NULL; +} + +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- + +//static +double TickmarkHelper::getMinimumAtIncrement( double fMin, const ExplicitIncrementData& rIncrement ) +{ + //the returned value will be <= fMin and on a Major Tick given by rIncrement + if(rIncrement.Distance<=0.0) + return fMin; + + double fRet = rIncrement.BaseValue + + static_cast<sal_Int32>( + approxSub( fMin, rIncrement.BaseValue ) + / rIncrement.Distance) + *rIncrement.Distance; + + if( fRet > fMin ) + { + if( !approxEqual(fRet, fMin) ) + fRet -= rIncrement.Distance; + } + return fRet; +} +//static +double TickmarkHelper::getMaximumAtIncrement( double fMax, const ExplicitIncrementData& rIncrement ) +{ + //the returned value will be >= fMax and on a Major Tick given by rIncrement + if(rIncrement.Distance<=0.0) + return fMax; + + double fRet = rIncrement.BaseValue + + static_cast<sal_Int32>( + approxSub( fMax, rIncrement.BaseValue ) + / rIncrement.Distance) + *rIncrement.Distance; + + if( fRet < fMax ) + { + if( !approxEqual(fRet, fMax) ) + fRet += rIncrement.Distance; + } + return fRet; +} + +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- + +TickmarkHelper::TickmarkHelper( + const ExplicitScaleData& rScale, const ExplicitIncrementData& rIncrement ) + : m_rScale( rScale ) + , m_rIncrement( rIncrement ) + , m_xInverseScaling(NULL) + , m_pfCurrentValues(NULL) +{ + //@todo: make sure that the scale is valid for the scaling + + m_pfCurrentValues = new double[getTickDepth()]; + + if( m_rScale.Scaling.is() ) + { + m_xInverseScaling = m_rScale.Scaling->getInverseScaling(); + DBG_ASSERT( m_xInverseScaling.is(), "each Scaling needs to return a inverse Scaling" ); + } + + double fMin = m_fScaledVisibleMin = m_rScale.Minimum; + if( m_xInverseScaling.is() ) + { + m_fScaledVisibleMin = m_rScale.Scaling->doScaling(m_fScaledVisibleMin); + if(m_rIncrement.PostEquidistant ) + fMin = m_fScaledVisibleMin; + } + + double fMax = m_fScaledVisibleMax = m_rScale.Maximum; + if( m_xInverseScaling.is() ) + { + m_fScaledVisibleMax = m_rScale.Scaling->doScaling(m_fScaledVisibleMax); + if(m_rIncrement.PostEquidistant ) + fMax = m_fScaledVisibleMax; + } + + //-- + m_fOuterMajorTickBorderMin = TickmarkHelper::getMinimumAtIncrement( fMin, m_rIncrement ); + m_fOuterMajorTickBorderMax = TickmarkHelper::getMaximumAtIncrement( fMax, m_rIncrement ); + //-- + + m_fOuterMajorTickBorderMin_Scaled = m_fOuterMajorTickBorderMin; + m_fOuterMajorTickBorderMax_Scaled = m_fOuterMajorTickBorderMax; + if(!m_rIncrement.PostEquidistant && m_xInverseScaling.is() ) + { + m_fOuterMajorTickBorderMin_Scaled = m_rScale.Scaling->doScaling(m_fOuterMajorTickBorderMin); + m_fOuterMajorTickBorderMax_Scaled = m_rScale.Scaling->doScaling(m_fOuterMajorTickBorderMax); + + //check validity of new range: m_fOuterMajorTickBorderMin <-> m_fOuterMajorTickBorderMax + //it is assumed here, that the original range in the given Scale is valid + if( !rtl::math::isFinite(m_fOuterMajorTickBorderMin_Scaled) ) + { + m_fOuterMajorTickBorderMin += m_rIncrement.Distance; + m_fOuterMajorTickBorderMin_Scaled = m_rScale.Scaling->doScaling(m_fOuterMajorTickBorderMin); + } + if( !rtl::math::isFinite(m_fOuterMajorTickBorderMax_Scaled) ) + { + m_fOuterMajorTickBorderMax -= m_rIncrement.Distance; + m_fOuterMajorTickBorderMax_Scaled = m_rScale.Scaling->doScaling(m_fOuterMajorTickBorderMax); + } + } +} + +TickmarkHelper::~TickmarkHelper() +{ + delete[] m_pfCurrentValues; +} + +sal_Int32 TickmarkHelper::getTickDepth() const +{ + return m_rIncrement.SubIncrements.getLength() + 1; +} + +sal_Int32 TickmarkHelper::getMaxTickCount( sal_Int32 nDepth ) const +{ + //return the maximum amount of ticks + //possibly open intervals at the two ends of the region are handled as if they were completely visible + //(this is necessary for calculating the sub ticks at the borders correctly) + + if( nDepth >= getTickDepth() ) + return 0; + if( m_fOuterMajorTickBorderMax < m_fOuterMajorTickBorderMin ) + return 0; + + sal_Int32 nIntervalCount; + if(m_rIncrement.PostEquidistant ) + nIntervalCount = static_cast<sal_Int32> + ( approxSub( m_fScaledVisibleMax, m_fScaledVisibleMin ) + / m_rIncrement.Distance ); + else + nIntervalCount = static_cast<sal_Int32> + ( approxSub( m_rScale.Maximum, m_rScale.Minimum ) + / m_rIncrement.Distance ); + nIntervalCount+=3; + for(sal_Int32 nN=0; nN<nDepth-1; nN++) + { + if( m_rIncrement.SubIncrements[nN].IntervalCount>1 ) + nIntervalCount *= m_rIncrement.SubIncrements[nN].IntervalCount; + } + + sal_Int32 nTickCount = nIntervalCount; + if(nDepth>0 && m_rIncrement.SubIncrements[nDepth-1].IntervalCount>1) + nTickCount = nIntervalCount * (m_rIncrement.SubIncrements[nDepth-1].IntervalCount-1); + + return nTickCount; +} + +double* TickmarkHelper::getMajorTick( sal_Int32 nTick ) const +{ + m_pfCurrentValues[0] = m_fOuterMajorTickBorderMin + nTick*m_rIncrement.Distance; + + if(m_pfCurrentValues[0]>m_fOuterMajorTickBorderMax) + return NULL; + if(m_pfCurrentValues[0]<m_fOuterMajorTickBorderMin) + return NULL; + + //return always the value after scaling + if(!m_rIncrement.PostEquidistant && m_xInverseScaling.is() ) + m_pfCurrentValues[0] = m_rScale.Scaling->doScaling( m_pfCurrentValues[0] ); + + return &m_pfCurrentValues[0]; +} + +double* TickmarkHelper::getMinorTick( sal_Int32 nTick, sal_Int32 nDepth + , double fStartParentTick, double fNextParentTick ) const +{ + //check validity of arguments + { + //DBG_ASSERT( fStartParentTick < fNextParentTick, "fStartParentTick >= fNextParentTick"); + if(fStartParentTick >= fNextParentTick) + return NULL; + if(nDepth>m_rIncrement.SubIncrements.getLength() || nDepth<=0) + return NULL; + + //subticks are only calculated if they are laying between parent ticks: + if(nTick<=0) + return NULL; + if(nTick>=m_rIncrement.SubIncrements[nDepth-1].IntervalCount) + return NULL; + } + + bool bPostEquidistant = m_rIncrement.SubIncrements[nDepth-1].PostEquidistant; + + double fAdaptedStartParent = fStartParentTick; + double fAdaptedNextParent = fNextParentTick; + + if( !bPostEquidistant && m_xInverseScaling.is() ) + { + fAdaptedStartParent = m_xInverseScaling->doScaling(fStartParentTick); + fAdaptedNextParent = m_xInverseScaling->doScaling(fNextParentTick); + } + + double fDistance = (fAdaptedNextParent - fAdaptedStartParent)/m_rIncrement.SubIncrements[nDepth-1].IntervalCount; + + m_pfCurrentValues[nDepth] = fAdaptedStartParent + nTick*fDistance; + double& fTest = m_pfCurrentValues[nDepth]; + + //return always the value after scaling + if(!bPostEquidistant && m_xInverseScaling.is() ) + m_pfCurrentValues[nDepth] = m_rScale.Scaling->doScaling( m_pfCurrentValues[nDepth] ); + + if( !isWithinOuterBorder( m_pfCurrentValues[nDepth] ) ) + return NULL; + + return &m_pfCurrentValues[nDepth]; +} + +bool TickmarkHelper::isWithinOuterBorder( double fScaledValue ) const +{ + if(fScaledValue>m_fOuterMajorTickBorderMax_Scaled) + return false; + if(fScaledValue<m_fOuterMajorTickBorderMin_Scaled) + return false; + + return true; +} + + +bool TickmarkHelper::isVisible( double fScaledValue ) const +{ + if(fScaledValue>m_fScaledVisibleMax) + return false; + if(fScaledValue<m_fScaledVisibleMin) + return false; + + return true; +} + +bool TickmarkHelper::isPostEquidistant( sal_Int32 nDepth ) const +{ + if( nDepth<0 || nDepth>m_rIncrement.SubIncrements.getLength() ) + { + DBG_ERROR("invalid depth for tickmark"); + return true; + } + + if( nDepth==0 ) + return m_rIncrement.PostEquidistant; + + return m_rIncrement.SubIncrements[nDepth-1].PostEquidistant; +} + +void TickmarkHelper::getAllTicks( ::std::vector< ::std::vector< TickInfo > >& rAllTickInfos ) const +{ + uno::Sequence< uno::Sequence< double > > aAllTicks; + + //create point sequences for each tick depth + sal_Int32 nDepthCount = this->getTickDepth(); + sal_Int32 nMaxMajorTickCount = this->getMaxTickCount( 0 ); + + aAllTicks.realloc(nDepthCount); + aAllTicks[0].realloc(nMaxMajorTickCount); + + sal_Int32 nRealMajorTickCount = 0; + double* pValue = NULL; + for( sal_Int32 nMajorTick=0; nMajorTick<nMaxMajorTickCount; nMajorTick++ ) + { + pValue = this->getMajorTick( nMajorTick ); + if(!pValue) + continue; + aAllTicks[0][nRealMajorTickCount] = *pValue; + nRealMajorTickCount++; + } + if(!nRealMajorTickCount) + return; + aAllTicks[0].realloc(nRealMajorTickCount); + + if(nDepthCount>0) + this->addSubTicks( 1, aAllTicks ); + + //so far we have added all ticks between the outer major tick marks + //this was necessary to create sub ticks correctly + //now we reduce all ticks to the visible ones that lie between the real borders + sal_Int32 nDepth = 0; + for( nDepth = 0; nDepth < nDepthCount; nDepth++) + { + sal_Int32 nInvisibleAtLowerBorder = 0; + sal_Int32 nInvisibleAtUpperBorder = 0; + //we need only to check all ticks within the first major interval at each border + sal_Int32 nCheckCount = 1; + for(sal_Int32 nN=0; nN<nDepth; nN++) + { + if( m_rIncrement.SubIncrements[nN].IntervalCount>1 ) + nCheckCount *= m_rIncrement.SubIncrements[nN].IntervalCount; + } + uno::Sequence< double >& rTicks = aAllTicks[nDepth]; + sal_Int32 nCount = rTicks.getLength(); + //check lower border + for( sal_Int32 nTick=0; nTick<nCheckCount && nTick<nCount; nTick++) + { + if( !isVisible( rTicks[nTick] ) ) + nInvisibleAtLowerBorder++; + } + //check upper border + for( nTick=nCount-1; nTick>nCount-1-nCheckCount && nTick>=0; nTick--) + { + if( !isVisible( rTicks[nTick] ) ) + nInvisibleAtUpperBorder++; + } + //resize sequence + if( !nInvisibleAtLowerBorder && !nInvisibleAtUpperBorder) + continue; + if( !nInvisibleAtLowerBorder ) + rTicks.realloc(nCount-nInvisibleAtUpperBorder); + else + { + sal_Int32 nNewCount = nCount-nInvisibleAtUpperBorder-nInvisibleAtLowerBorder; + if(nNewCount<0) + nNewCount=0; + + uno::Sequence< double > aOldTicks(rTicks); + rTicks.realloc(nNewCount); + for(sal_Int32 nTick = 0; nTick<nNewCount; nTick++) + rTicks[nTick] = aOldTicks[nInvisibleAtLowerBorder+nTick]; + } + } + + //fill return value + rAllTickInfos.resize(aAllTicks.getLength()); + for( nDepth=0 ;nDepth<aAllTicks.getLength(); nDepth++ ) + { + sal_Int32 nCount = aAllTicks[nDepth].getLength(); + rAllTickInfos[nDepth].resize( nCount ); + for(sal_Int32 nN = 0; nN<nCount; nN++) + { + rAllTickInfos[nDepth][nN].fScaledTickValue = aAllTicks[nDepth][nN]; + } + } + + //----------------------------------------- + //get the transformed screen values for all tickmarks in aAllTickInfos + this->updateScreenValues( rAllTickInfos ); + + //----------------------------------------- + //'hide' tickmarks with identical screen values in aAllTickInfos + this->hideIdenticalScreenValues( rAllTickInfos ); +} + +void TickmarkHelper::addSubTicks( sal_Int32 nDepth, uno::Sequence< uno::Sequence< double > >& rParentTicks ) const +{ + TickIter aIter( rParentTicks, m_rIncrement, 0, nDepth-1 ); + double* pfNextParentTick = aIter.firstValue(); + if(!pfNextParentTick) + return; + double fLastParentTick = *pfNextParentTick; + pfNextParentTick = aIter.nextValue(); + if(!pfNextParentTick) + return; + + sal_Int32 nMaxSubTickCount = this->getMaxTickCount( nDepth ); + if(!nMaxSubTickCount) + return; + + uno::Sequence< double > aSubTicks(nMaxSubTickCount); + sal_Int32 nRealSubTickCount = 0; + sal_Int32 nIntervalCount = m_rIncrement.SubIncrements[nDepth-1].IntervalCount; + + double* pValue = NULL; + for(; pfNextParentTick; fLastParentTick=*pfNextParentTick, pfNextParentTick = aIter.nextValue()) + { + for( sal_Int32 nPartTick = 1; nPartTick<nIntervalCount; nPartTick++ ) + { + pValue = this->getMinorTick( nPartTick, nDepth + , fLastParentTick, *pfNextParentTick ); + if(!pValue) + continue; + + aSubTicks[nRealSubTickCount] = *pValue; + nRealSubTickCount++; + } + } + + aSubTicks.realloc(nRealSubTickCount); + rParentTicks[nDepth] = aSubTicks; + if(m_rIncrement.SubIncrements.getLength()>nDepth) + addSubTicks( nDepth+1, rParentTicks ); +} + +//----------------------------------------------------------------------------- +// ___TickmarkHelper_3D___ +//----------------------------------------------------------------------------- +TickmarkHelper_2D::TickmarkHelper_2D( + const ExplicitScaleData& rScale, const ExplicitIncrementData& rIncrement + , double fStrech_SceneToScreen, double fOffset_SceneToScreen ) + : TickmarkHelper( rScale, rIncrement ) + , m_fStrech_LogicToScreen(1.0) + , m_fOffset_LogicToScreen(0.0) +{ + double fWidthY = m_fScaledVisibleMax - m_fScaledVisibleMin; + m_fStrech_LogicToScreen = FIXED_SIZE_FOR_3D_CHART_VOLUME/fWidthY * fStrech_SceneToScreen; + m_fOffset_LogicToScreen = -m_fScaledVisibleMin*m_fStrech_LogicToScreen + fOffset_SceneToScreen; +} + +TickmarkHelper_2D::~TickmarkHelper_2D() +{ +} + +sal_Int32 TickmarkHelper_2D::transformScaledLogicTickToScreen( double fValue ) const +{ + sal_Int32 nRet = static_cast<sal_Int32>( + fValue*m_fStrech_LogicToScreen + m_fOffset_LogicToScreen); + return nRet; +} + +//static +sal_Int32 TickmarkHelper_2D::getTickScreenDistance( TickIter& rIter ) +{ + //return the positive distance between the two first tickmarks in screen values + //if there are less than two tickmarks -1 is returned + + const TickInfo* pFirstTickInfo = rIter.firstInfo(); + const TickInfo* pSecondTickInfo = rIter.nextInfo(); + if(!pSecondTickInfo || !pFirstTickInfo) + return -1; + + sal_Int32 nRet = pSecondTickInfo->nScreenTickValue - pFirstTickInfo->nScreenTickValue; + if(nRet<0) + nRet *= -1; + return nRet; +} + +sal_Int32 TickmarkHelper_2D::getScreenValueForMinimum() const +{ + //return the screen value at the end of the axis where the scale has its minimum + //(lower end of axis line) + return this->transformScaledLogicTickToScreen( + m_fScaledVisibleMin ); +} + +sal_Int32 TickmarkHelper_2D::getScreenValueForMaximum() const +{ + //return the screen value at the end of the axis where the scale has its maximum + //(upper end of axis line) + return this->transformScaledLogicTickToScreen( + m_fScaledVisibleMax ); +} + +void TickmarkHelper_2D::updateScreenValues( ::std::vector< ::std::vector< TickInfo > >& rAllTickInfos ) const +{ + //get the transformed screen values for all tickmarks in rAllTickInfos + ::std::vector< ::std::vector< TickInfo > >::iterator aDepthIter = rAllTickInfos.begin(); + const ::std::vector< ::std::vector< TickInfo > >::const_iterator aDepthEnd = rAllTickInfos.end(); + for( ; aDepthIter != aDepthEnd; aDepthIter++ ) + { + ::std::vector< TickInfo >::iterator aTickIter = (*aDepthIter).begin(); + const ::std::vector< TickInfo >::const_iterator aTickEnd = (*aDepthIter).end(); + for( ; aTickIter != aTickEnd; aTickIter++ ) + { + TickInfo& rTickInfo = (*aTickIter); + rTickInfo.nScreenTickValue = + this->transformScaledLogicTickToScreen( + rTickInfo.fScaledTickValue ); + } + } +} + +//'hide' tickmarks with identical screen values in aAllTickInfos +void TickmarkHelper_2D::hideIdenticalScreenValues( + ::std::vector< ::std::vector< TickInfo > >& rAllTickInfos ) const +{ + TickIter aIter( rAllTickInfos, m_rIncrement ); + + TickInfo* pPreviousTickInfo = aIter.firstInfo(); + if(!pPreviousTickInfo) + return; + pPreviousTickInfo->bPaintIt = true; + for( TickInfo* pTickInfo = aIter.nextInfo(); pTickInfo; pTickInfo = aIter.nextInfo()) + { + pTickInfo->bPaintIt = pTickInfo->nScreenTickValue != pPreviousTickInfo->nScreenTickValue; + pPreviousTickInfo = pTickInfo; + } +} +//----------------------------------------------------------------------------- +// ___TickmarkHelper_3D___ +//----------------------------------------------------------------------------- +TickmarkHelper_3D::TickmarkHelper_3D( + const ExplicitScaleData& rScale, const ExplicitIncrementData& rIncrement ) + : TickmarkHelper( rScale, rIncrement ) +{ +} + +TickmarkHelper_3D::~TickmarkHelper_3D() +{ +} + +//............................................................................. +} //namespace chart +//............................................................................. diff --git a/chart2/source/view/axes/TickmarkHelper.hxx b/chart2/source/view/axes/TickmarkHelper.hxx new file mode 100644 index 000000000..1462cc8dc --- /dev/null +++ b/chart2/source/view/axes/TickmarkHelper.hxx @@ -0,0 +1,265 @@ +/************************************************************************* + * + * $RCSfile: TickmarkHelper.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:33 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef _CHART2_TICKMARKHELPER_HXX +#define _CHART2_TICKMARKHELPER_HXX + +#include <vector> + +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_EXPLICITINCREMENTDATA_HPP_ +#include <drafts/com/sun/star/chart2/ExplicitIncrementData.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_EXPLICITSCALEDATA_HPP_ +#include <drafts/com/sun/star/chart2/ExplicitScaleData.hpp> +#endif + +#ifndef _COM_SUN_STAR_DRAWING_XSHAPE_HPP_ +#include <com/sun/star/drawing/XShape.hpp> +#endif +#ifndef _COM_SUN_STAR_UNO_SEQUENCE_H_ +#include <com/sun/star/uno/Sequence.h> +#endif + +//............................................................................. +namespace chart +{ +//............................................................................. + +//----------------------------------------------------------------------------- +/** +*/ + +struct TickInfo +{ + double fScaledTickValue; + double fUnscaledTickValue; + + sal_Int32 nScreenTickValue; + + bool bPaintIt; + + ::com::sun::star::uno::Reference< + ::com::sun::star::drawing::XShape > xTextShape; + +//methods: + TickInfo(); + void updateUnscaledValue( const ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XScaling >& xInverseScaling ); +}; + +class TickIter +{ +public: + TickIter( const ::com::sun::star::uno::Sequence< + ::com::sun::star::uno::Sequence< double > >& rTicks + , const ::drafts::com::sun::star::chart2::ExplicitIncrementData& rIncrement + , sal_Int32 nMinDepth=0, sal_Int32 nMaxDepth=-1 ); + TickIter( ::std::vector< ::std::vector< TickInfo > >& rTickInfos + , const ::drafts::com::sun::star::chart2::ExplicitIncrementData& rIncrement + , sal_Int32 nMinDepth=0, sal_Int32 nMaxDepth=-1 ); + virtual ~TickIter(); + + double* firstValue(); + double* nextValue(); + + TickInfo* firstInfo(); + TickInfo* nextInfo(); + + sal_Int32 getCurrentDepth() const { return m_nCurrentDepth; } + +private: //methods + sal_Int32 getIntervalCount( sal_Int32 nDepth ); + bool isAtLastPartTick(); + + void initIter( sal_Int32 nMinDepth, sal_Int32 nMaxDepth ); + sal_Int32 getStartDepth() const; + + bool gotoFirst(); + bool gotoNext(); + + + double _getTickValue(sal_Int32 nDepth, sal_Int32 nIndex) const + { + if(m_pSimpleTicks) + return (*m_pSimpleTicks)[nDepth][nIndex]; + else + return (((*m_pInfoTicks)[nDepth])[nIndex]).fScaledTickValue; + } + sal_Int32 _getTickCount( sal_Int32 nDepth ) const + { + if(m_pSimpleTicks) + return (*m_pSimpleTicks)[nDepth].getLength(); + else + return (*m_pInfoTicks)[nDepth].size(); + } + sal_Int32 _getMaxDepth() const + { + if(m_pSimpleTicks) + return (*m_pSimpleTicks).getLength()-1; + else + return (*m_pInfoTicks).size()-1; + } + +private: //member + const ::com::sun::star::uno::Sequence< + ::com::sun::star::uno::Sequence< double > >* m_pSimpleTicks; + ::std::vector< ::std::vector< TickInfo > >* m_pInfoTicks; + const ::drafts::com::sun::star::chart2::ExplicitIncrementData& m_rIncrement; + //iteration from m_nMinDepth to m_nMaxDepth + sal_Int32 m_nMinDepth; + sal_Int32 m_nMaxDepth; + sal_Int32 m_nTickCount; + sal_Int32* m_pnPositions; //current positions in the different sequences + sal_Int32* m_pnPreParentCount; //the tickmarks do not start with a major tick always, + //the PreParentCount states for each depth how many subtickmarks are available in front of the first parent tickmark + bool* m_pbIntervalFinished; + sal_Int32 m_nCurrentDepth; + sal_Int32 m_nCurrentPos; + double m_fCurrentValue; +}; + +class TickmarkHelper +{ +public: + TickmarkHelper( + const ::drafts::com::sun::star::chart2::ExplicitScaleData& rScale + , const ::drafts::com::sun::star::chart2::ExplicitIncrementData& rIncrement ); + virtual ~TickmarkHelper(); + + void getAllTicks( ::std::vector< ::std::vector< TickInfo > >& rAllTickInfos ) const; + bool isPostEquidistant( sal_Int32 nDepth ) const; + + // + static double getMinimumAtIncrement( double fMin, const ::drafts::com::sun::star::chart2::ExplicitIncrementData& rIncrement ); + static double getMaximumAtIncrement( double fMax, const ::drafts::com::sun::star::chart2::ExplicitIncrementData& rIncrement ); + +protected: //methods + void addSubTicks( sal_Int32 nDepth, + ::com::sun::star::uno::Sequence< + ::com::sun::star::uno::Sequence< double > >& rParentTicks ) const; + double* getMajorTick( sal_Int32 nTick ) const; + double* getMinorTick( sal_Int32 nTick, sal_Int32 nDepth + , double fStartParentTick, double fNextParentTick ) const; + sal_Int32 getMaxTickCount( sal_Int32 nDepth = 0 ) const; + sal_Int32 getTickDepth() const; + bool isVisible( double fValue ) const; + bool isWithinOuterBorder( double fScaledValue ) const; //all within the outer major tick marks + + virtual void updateScreenValues( ::std::vector< ::std::vector< TickInfo > >& rAllTickInfos ) const {} + virtual void hideIdenticalScreenValues( ::std::vector< ::std::vector< TickInfo > >& rAllTickInfos ) const {} + +protected: //member + const ::drafts::com::sun::star::chart2::ExplicitScaleData& m_rScale; + const ::drafts::com::sun::star::chart2::ExplicitIncrementData& m_rIncrement; + + ::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XScaling > + m_xInverseScaling; + double* m_pfCurrentValues; + //major-tick positions that may lay outside the visible range but complete partly visible intervals at the borders + double m_fOuterMajorTickBorderMin; + double m_fOuterMajorTickBorderMax; + double m_fOuterMajorTickBorderMin_Scaled; + double m_fOuterMajorTickBorderMax_Scaled; + + //minimum and maximum of the visible range after scaling + double m_fScaledVisibleMin; + double m_fScaledVisibleMax; +}; + +class TickmarkHelper_2D : public TickmarkHelper +{ +public: + TickmarkHelper_2D( + const ::drafts::com::sun::star::chart2::ExplicitScaleData& rScale + , const ::drafts::com::sun::star::chart2::ExplicitIncrementData& rIncrement + , double fStrech_SceneToScreen, double fOffset_SceneToScreen ); + virtual ~TickmarkHelper_2D(); + + static sal_Int32 getTickScreenDistance( TickIter& rIter ); + + //methods more for axis line + sal_Int32 getScreenValueForMinimum() const; + sal_Int32 getScreenValueForMaximum() const; + +protected: //methods + virtual void updateScreenValues( ::std::vector< ::std::vector< TickInfo > >& rAllTickInfos ) const; + virtual void hideIdenticalScreenValues( ::std::vector< ::std::vector< TickInfo > >& rAllTickInfos ) const; + + sal_Int32 transformScaledLogicTickToScreen( double fValue ) const; + +private: //member + double m_fStrech_LogicToScreen; + double m_fOffset_LogicToScreen; +}; + +class TickmarkHelper_3D : public TickmarkHelper +{ +public: + TickmarkHelper_3D( + const ::drafts::com::sun::star::chart2::ExplicitScaleData& rScale + , const ::drafts::com::sun::star::chart2::ExplicitIncrementData& rIncrement ); + virtual ~TickmarkHelper_3D(); + +}; + +//............................................................................. +} //namespace chart +//............................................................................. +#endif diff --git a/chart2/source/view/axes/VAxisProperties.cxx b/chart2/source/view/axes/VAxisProperties.cxx new file mode 100644 index 000000000..b94493b16 --- /dev/null +++ b/chart2/source/view/axes/VAxisProperties.cxx @@ -0,0 +1,468 @@ +/************************************************************************* + * + * $RCSfile: VAxisProperties.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:33 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "VAxisProperties.hxx" +#include "macros.hxx" +#include "ViewDefines.hxx" +#include "CommonConverters.hxx" + +#ifndef _TOOLS_COLOR_HXX +#include <tools/color.hxx> +#endif + +#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_ +#include <com/sun/star/beans/XPropertySet.hpp> +#endif +#ifndef _COM_SUN_STAR_CHART_CHARTAXISARRANGEORDERTYPE_HPP_ +#include <com/sun/star/chart/ChartAxisArrangeOrderType.hpp> +#endif +#ifndef _COM_SUN_STAR_DRAWING_LINESTYLE_HPP_ +#include <com/sun/star/drawing/LineStyle.hpp> +#endif +#ifndef _COM_SUN_STAR_TEXT_WRITINGMODE2_HPP_ +#include <com/sun/star/text/WritingMode2.hpp> +#endif + +//............................................................................. +namespace chart +{ +//............................................................................. +using namespace ::com::sun::star; +using namespace ::drafts::com::sun::star::chart2; + +sal_Int32 AxisProperties::calcTickLengthForDepth(sal_Int32 nDepth,sal_Int32 nTickmarkStyle) const +{ + sal_Int32 nWidth = AXIS2D_TICKLENGTH; //@maybefuturetodo this length could be offered by the model + double fPercent = 1.0; + switch(nDepth) + { + case 0: + fPercent = 1.0; + break; + case 1: + fPercent = 0.75;//percentage like in the old chart + break; + case 2: + fPercent = 0.5; + break; + default: + fPercent = 0.3; + break; + } + if(nTickmarkStyle==3)//inner and outer tickmarks + fPercent*=2.0; + return static_cast<sal_Int32>(nWidth*fPercent); +} + +sal_Int32 getTickOffset(sal_Int32 nLength,sal_Int32 nTickmarkStyle) +{ + double fPercent = 0.0; //0<=fPercent<=1 + //0.0: completly inner + //1.0: completly outer + //0.5: half and half + + /* + nTickmarkStyle: + 1: inner tickmarks + 2: outer tickmarks + 3: inner and outer tickmarks + */ + switch(nTickmarkStyle) + { + case 1: + fPercent = 0.0; + break; + case 2: + fPercent = 1.0; + break; + default: + fPercent = 0.5; + break; + } + return static_cast<sal_Int32>(fPercent*nLength); +} + +LineProperties AxisProperties::makeLinePropertiesForDepth( sal_Int32 nDepth ) const +{ + //@todo get this from somewhere; maybe for each subincrement + //so far the model does not offer different settings for each tick depth + return m_aLineProperties; +} + +TickmarkProperties AxisProperties::makeTickmarkProperties( + sal_Int32 nDepth ) const +{ + /* + nTickmarkStyle: + 1: inner tickmarks + 2: outer tickmarks + 3: inner and outer tickmarks + */ + sal_Int32 nTickmarkStyle = 1; + if(nDepth==0) + { + nTickmarkStyle = m_nMajorTickmarks; + if(!nTickmarkStyle) + { + //create major tickmarks as if they were minor tickmarks + nDepth = 1; + nTickmarkStyle = m_nMinorTickmarks; + } + } + else if( nDepth==1) + { + nTickmarkStyle = m_nMinorTickmarks; + } + + TickmarkProperties aTickmarkProperties; + aTickmarkProperties.Length = this->calcTickLengthForDepth(nDepth,nTickmarkStyle); + + sal_Int32 nSign = m_bIsLeftOrBottomAxis ? 1 : -1; + if(m_bIsYAxis) + nSign *= -1; + aTickmarkProperties.RelativePos = nSign*getTickOffset(aTickmarkProperties.Length,nTickmarkStyle); + aTickmarkProperties.Length *= -nSign; + aTickmarkProperties.aLineProperties = this->makeLinePropertiesForDepth( nDepth ); + return aTickmarkProperties; +} + +//-------------------------------------------------------------------------- + +AxisProperties::AxisProperties() + : m_xAxisModel(NULL) + , m_bIsYAxis(true) + , m_bIsLeftOrBottomAxis(true) + , m_pfMainLinePositionAtOtherAxis(NULL) + , m_pfExrtaLinePositionAtOtherAxis(NULL) + /* + , m_nOrthogonalAxisScreenPosition(0) + , m_nOrthogonalAxisExtraLineScreenPosition(0) + */ + , m_eRelativeLabelPosition(LEFTORBOTTOM_OF_AXIS) + , m_nMajorTickmarks(1) + , m_nMinorTickmarks(1) + , m_aTickmarkPropertiesList() + , m_aLineProperties() + , m_bTESTTEST_HorizontalAdjustmentIsLeft(true) +{ +} + +AxisProperties::AxisProperties( const AxisProperties& rAxisProperties ) + : m_xAxisModel( rAxisProperties.m_xAxisModel ) + , m_bIsYAxis( rAxisProperties.m_bIsYAxis ) + , m_bIsLeftOrBottomAxis( rAxisProperties.m_bIsLeftOrBottomAxis ) + , m_pfMainLinePositionAtOtherAxis( NULL ) + , m_pfExrtaLinePositionAtOtherAxis( NULL ) + , m_eRelativeLabelPosition( rAxisProperties.m_eRelativeLabelPosition ) + , m_nMajorTickmarks( rAxisProperties.m_nMajorTickmarks ) + , m_nMinorTickmarks( rAxisProperties.m_nMinorTickmarks ) + , m_aTickmarkPropertiesList( rAxisProperties.m_aTickmarkPropertiesList ) + , m_aLineProperties( rAxisProperties.m_aLineProperties ) + , m_bTESTTEST_HorizontalAdjustmentIsLeft( rAxisProperties.m_bTESTTEST_HorizontalAdjustmentIsLeft ) +{ + if( rAxisProperties.m_pfMainLinePositionAtOtherAxis ) + m_pfMainLinePositionAtOtherAxis = new double(*rAxisProperties.m_pfMainLinePositionAtOtherAxis); + if( rAxisProperties.m_pfExrtaLinePositionAtOtherAxis ) + m_pfExrtaLinePositionAtOtherAxis = new double (*rAxisProperties.m_pfExrtaLinePositionAtOtherAxis); +} + +AxisProperties::~AxisProperties() +{ + delete m_pfMainLinePositionAtOtherAxis; + delete m_pfExrtaLinePositionAtOtherAxis; +} + +void AxisProperties::init() +{ + if( !m_xAxisModel.is() ) + return; + sal_Int32 nDimension = m_xAxisModel->getRepresentedDimension(); + m_bIsYAxis = (nDimension==1); + + //init LineProperties + m_aLineProperties.initFromPropertySet( uno::Reference<beans::XPropertySet>::query( m_xAxisModel ) ); + + //init TickmarkProperties + uno::Reference< beans::XPropertySet > xProp = + uno::Reference<beans::XPropertySet>::query( this->m_xAxisModel ); + if(xProp.is()) + { + try + { + xProp->getPropertyValue( C2U( "MajorTickmarks" ) ) >>= m_nMajorTickmarks; + xProp->getPropertyValue( C2U( "MinorTickmarks" ) ) >>= m_nMinorTickmarks; + + sal_Int32 nMaxDepth = 0; + if(m_nMinorTickmarks!=0) + nMaxDepth=2; + else if(m_nMajorTickmarks!=0) + nMaxDepth=1; + + this->m_aTickmarkPropertiesList.clear(); + for( sal_Int32 nDepth=0; nDepth<nMaxDepth; nDepth++ ) + { + TickmarkProperties aTickmarkProperties = this->makeTickmarkProperties( nDepth ); + this->m_aTickmarkPropertiesList.push_back( aTickmarkProperties ); + } + } + catch( uno::Exception& e ) + { + e; + } + } +} + +sal_Int32 getAxisScreenPosition( double fCrossOtherAxis + , const PlottingPositionHelper& rPosHelper, bool bIsYAxis ) +{ + double fX = bIsYAxis ? fCrossOtherAxis : rPosHelper.getLogicMinX(); + double fY = bIsYAxis ? rPosHelper.getLogicMinY() : fCrossOtherAxis; + + rPosHelper.clipLogicValues( &fX,&fY,0 ); + rPosHelper.doLogicScaling( &fX,&fY,0 ); + drawing::Position3D aPos( fX, fY, 0); + + uno::Reference< XTransformation > xTransformation = + rPosHelper.getTransformationLogicToScene(); + uno::Sequence< double > aSeq = + xTransformation->transform( Position3DToSequence(aPos) ); + + return static_cast<sal_Int32>( + bIsYAxis ? aSeq[0] : aSeq[1] ); +} + + + +sal_Int32 AxisProperties::getMainLineScreenPosition( + const PlottingPositionHelper& rPosHelper ) const +{ + double fMin = m_bIsYAxis ? rPosHelper.getLogicMinX() : rPosHelper.getLogicMinY(); + double fMax = m_bIsYAxis ? rPosHelper.getLogicMaxX() : rPosHelper.getLogicMaxY(); + + double fCrossOtherAxis; + if(m_pfMainLinePositionAtOtherAxis) + fCrossOtherAxis = *m_pfMainLinePositionAtOtherAxis; + else + fCrossOtherAxis = m_bIsLeftOrBottomAxis ? fMin : fMax; + sal_Int32 nRet = getAxisScreenPosition( fCrossOtherAxis, rPosHelper, m_bIsYAxis ); + return nRet; +} + +bool AxisProperties::getExtraLineScreenPosition( + sal_Int32& rnExtraLineScreenPosition, const PlottingPositionHelper& rPosHelper ) const +{ + if( !m_pfExrtaLinePositionAtOtherAxis ) + return false; + + double fMin = m_bIsYAxis ? rPosHelper.getLogicMinX() : rPosHelper.getLogicMinY(); + double fMax = m_bIsYAxis ? rPosHelper.getLogicMaxX() : rPosHelper.getLogicMaxY(); + if( *m_pfExrtaLinePositionAtOtherAxis <= fMin + || *m_pfExrtaLinePositionAtOtherAxis >= fMax ) + return false; + rnExtraLineScreenPosition = getAxisScreenPosition( + *m_pfExrtaLinePositionAtOtherAxis, rPosHelper, m_bIsYAxis ); + return true; +} + +//----------------------------------------------------------------------------- + +AxisLabelProperties::AxisLabelProperties() + : aNumberFormat() + , bDisplayLabels( true ) + , eStaggering( SIDE_BY_SIDE ) + , bLineBreakAllowed( true ) + , bOverlapAllowed( false ) + , bStackCharacters( false ) + , fRotationAngleDegree( 0.0 ) + , nRhythm( 1 ) + , bRhythmIsFix(false) +{ + /* + aLocale.Language = C2U( "en" ); + aLocale.Country = C2U( "US" ); + + //aLocale.Language = C2U( "ar" ); + //aLocale.Country = C2U( "IR" ); + + //aLocale.Language = C2U( "ja" ); + //aLocale.Country = C2U( "JP" ); + */ +} + +void AxisLabelProperties::init( const uno::Reference< XAxis >& xAxisModel ) +{ + uno::Reference< beans::XPropertySet > xProp = + uno::Reference<beans::XPropertySet>::query( xAxisModel ); + if(xProp.is()) + { + try + { + if( !( xProp->getPropertyValue( C2U( "NumberFormat" ) ) >>= this->aNumberFormat ) ) + { + //@todo get number format from calc + } + + xProp->getPropertyValue( C2U( "DisplayLabels" ) ) >>= this->bDisplayLabels; + xProp->getPropertyValue( C2U( "TextBreak" ) ) >>= this->bLineBreakAllowed; + xProp->getPropertyValue( C2U( "TextOverlap" ) ) >>= this->bOverlapAllowed; + xProp->getPropertyValue( C2U( "StackCharacters" ) ) >>= this->bStackCharacters; + xProp->getPropertyValue( C2U( "TextRotation" ) ) >>= this->fRotationAngleDegree; + + ::com::sun::star::chart::ChartAxisArrangeOrderType eArrangeOrder; + xProp->getPropertyValue( C2U( "ArrangeOrder" ) ) >>= eArrangeOrder; + switch(eArrangeOrder) + { + case ::com::sun::star::chart::ChartAxisArrangeOrderType_SIDE_BY_SIDE: + this->eStaggering = SIDE_BY_SIDE; + break; + case ::com::sun::star::chart::ChartAxisArrangeOrderType_STAGGER_EVEN: + this->eStaggering = STAGGER_EVEN; + break; + case ::com::sun::star::chart::ChartAxisArrangeOrderType_STAGGER_ODD: + this->eStaggering = STAGGER_ODD; + break; + default: + this->eStaggering = STAGGER_AUTO; + break; + } + } + catch( uno::Exception& e ) + { + e; + } + } +} + +/* +sal_Int16 getSwappedWritingMode( sal_Int16 nWritingMode ) +{ + //LR_TB == LT + //RL_TB == RT (Arabic, Hebrew) + //TB_RL == TR (Japanese, Chinese, Korean) + // ?? TL (Mongolian) see also text::WritingMode2 + + switch(nWritingMode) + { + case text::WritingMode2::RL_TB: + return text::WritingMode2::TB_RL; + case text::WritingMode2::TB_RL: + return text::WritingMode2::RL_TB; + case text::WritingMode2::LR_TB: + return text::WritingMode2::TB_LR; + default: + return text::WritingMode2::LR_TB; + } +} +*/ + +sal_Bool AxisLabelProperties::getIsStaggered() const +{ + if( STAGGER_ODD == eStaggering || STAGGER_EVEN == eStaggering ) + return sal_True; + return sal_False; +} + +//------------------------ + +drawing::TextVerticalAdjust AxisProperties::getVerticalAdjustment() const +{ + drawing::TextVerticalAdjust aRet = + !m_bIsYAxis && !m_bIsLeftOrBottomAxis + ? drawing::TextVerticalAdjust_BOTTOM + : drawing::TextVerticalAdjust_TOP; + return aRet; +} + +sal_Int16 AxisProperties::getWritingMode()const +{ + //@todo get this dependent on the locale ... + sal_Int16 nWritingMode( text::WritingMode2::LR_TB ); + return nWritingMode; +} + +drawing::TextHorizontalAdjust AxisProperties::getHorizontalAdjustment() const +{ + return m_bTESTTEST_HorizontalAdjustmentIsLeft + ? drawing::TextHorizontalAdjust_LEFT + : drawing::TextHorizontalAdjust_RIGHT; +// + + bool bIsYAxis = m_bIsYAxis; + bool bIsLeftOrBottomAxis = m_bIsLeftOrBottomAxis; + sal_Int16 nWritingMode = getWritingMode(); + + switch( nWritingMode ) + { + case text::WritingMode2::RL_TB: + case text::WritingMode2::TB_RL: + return bIsYAxis && !bIsLeftOrBottomAxis + ? drawing::TextHorizontalAdjust_LEFT + : drawing::TextHorizontalAdjust_RIGHT; + case text::WritingMode2::TB_LR: + default: + return bIsYAxis && bIsLeftOrBottomAxis + ? drawing::TextHorizontalAdjust_RIGHT + : drawing::TextHorizontalAdjust_LEFT; + } +} + +//............................................................................. +} //namespace chart +//............................................................................. diff --git a/chart2/source/view/axes/VCoordinateSystem.cxx b/chart2/source/view/axes/VCoordinateSystem.cxx new file mode 100644 index 000000000..dc9c9e08c --- /dev/null +++ b/chart2/source/view/axes/VCoordinateSystem.cxx @@ -0,0 +1,226 @@ +/************************************************************************* + * + * $RCSfile: VCoordinateSystem.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:33 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "VCoordinateSystem.hxx" +#include "ScaleAutomatism.hxx" +#include "VSeriesPlotter.hxx" +#include "VGrid.hxx" + +//............................................................................. +namespace chart +{ +//............................................................................. +using namespace ::com::sun::star; +using namespace ::drafts::com::sun::star::chart2; + +VCoordinateSystem::VCoordinateSystem( const uno::Reference< XBoundedCoordinateSystem >& xCooSys ) + : m_xCooSysModel(xCooSys) + , m_xAxis0(NULL) + , m_xAxis1(NULL) + , m_xAxis2(NULL) + , m_xGridList0() + , m_xGridList1() + , m_xGridList2() + , m_aExplicitScales(3) + , m_aExplicitIncrements(3) +{ +} +VCoordinateSystem::~VCoordinateSystem() +{ + +} + +void VCoordinateSystem::setOrigin( double* fCoordinateOrigin ) +{ + m_fCoordinateOrigin[0]=fCoordinateOrigin[0]; + m_fCoordinateOrigin[1]=fCoordinateOrigin[1]; + m_fCoordinateOrigin[2]=fCoordinateOrigin[2]; +} + +uno::Reference< XBoundedCoordinateSystem > VCoordinateSystem::getModel() const +{ + return m_xCooSysModel; +} + +void VCoordinateSystem::addAxis( const uno::Reference< XAxis >& xAxis ) +{ + if(!xAxis.is()) + return; + sal_Int32 nDim = xAxis->getRepresentedDimension(); + if(0==nDim) + m_xAxis0 = xAxis; + else if(1==nDim) + m_xAxis1 = xAxis; + else if(2==nDim) + m_xAxis2 = xAxis; +} + +uno::Sequence< uno::Reference< XGrid > >& VCoordinateSystem::getGridListByDimension( sal_Int32 nDim ) +{ + if( 0==nDim ) + return m_xGridList0; + if( 1==nDim ) + return m_xGridList1; + return m_xGridList2; +} + +void VCoordinateSystem::addGrid( const uno::Reference< XGrid >& xGrid ) +{ + if(!xGrid.is()) + return; + sal_Int32 nDim = xGrid->getRepresentedDimension(); + uno::Sequence< uno::Reference< XGrid > >& rGridList + = getGridListByDimension( nDim ); + + rGridList.realloc(rGridList.getLength()+1); + rGridList[rGridList.getLength()-1] = xGrid; +} + +void VCoordinateSystem::createGridShapes( + const uno::Reference< lang::XMultiServiceFactory>& xShapeFactory + , const uno::Reference< drawing::XShapes >& xTarget + , const drawing::HomogenMatrix& rHM_SceneToScreen ) +{ + sal_Int32 nDimensionCount = m_xCooSysModel->getDimension(); + for( sal_Int32 nDim=0; nDim<3; nDim++) + { + uno::Sequence< uno::Reference< XGrid > >& rGridList + = getGridListByDimension( nDim ); + for( sal_Int32 nN=0; nN<rGridList.getLength(); nN++ ) + { + VGrid aGrid(rGridList[nN],nDimensionCount); + aGrid.setMeterData( m_aExplicitScales[nDim], m_aExplicitIncrements[nDim] ); + + aGrid.init(xTarget,xTarget,xShapeFactory); + if(2==nDimensionCount) + aGrid.setTransformationSceneToScreen( rHM_SceneToScreen ); + aGrid.setScales( m_aExplicitScales ); + aGrid.createShapes(); + } + } +} + +uno::Reference< XAxis > VCoordinateSystem::getAxisByDimension( sal_Int32 nDim ) const +{ + uno::Reference< XAxis > xAxis(NULL); + if(0==nDim) + xAxis = m_xAxis0; + else if(1==nDim) + xAxis = m_xAxis1; + else if(2==nDim) + xAxis = m_xAxis2; + return xAxis; +} + +void setExplicitScaleToDefault( ExplicitScaleData& rExplicitScale ) +{ + rExplicitScale.Minimum = 0.0; + rExplicitScale.Maximum = 1.0; + rExplicitScale.Orientation = AxisOrientation_MATHEMATICAL; + //rExplicitScale.Scaling = ; + //rExplicitScale.Breaks = ; +} + +void VCoordinateSystem::doAutoScale( MinimumAndMaximumSupplier* pMinMaxSupplier ) +{ + for( sal_Int32 nDim = 0; nDim < 2; nDim++ ) + { + if(nDim < 0 || nDim > 2 ) + return; + + uno::Reference< XScale > xScale( + m_xCooSysModel->getScaleByDimension( nDim ), + uno::UNO_QUERY ); + if( ! xScale.is() ) + return; + ScaleAutomatism aScaleAutomatism( xScale->getScaleData() ); + uno::Reference< XAxis > xAxis( this->getAxisByDimension(nDim) ); + if(xAxis.is()) + { + uno::Reference< XIncrement > xInc( xAxis->getIncrement() ); + if( xInc.is() ) + { + aScaleAutomatism.m_aSourceIncrement = xInc->getIncrementData(); + aScaleAutomatism.m_aSourceSubIncrementList = xInc->getSubIncrements(); + } + } + if(0==nDim) + { + aScaleAutomatism.m_fValueMinimum = pMinMaxSupplier->getMinimumX(); + aScaleAutomatism.m_fValueMaximum = pMinMaxSupplier->getMaximumX(); + } + else if(1==nDim) + { + const ExplicitScaleData& rScale = m_aExplicitScales[0]; + //@todo iterate through all xSlots which belong to coordinate system dimension in this plotter + //and iterate through all plotter for this coordinate system dimension + sal_Int32 nXSlotIndex = 0; + aScaleAutomatism.m_fValueMinimum = pMinMaxSupplier->getMinimumYInRange(rScale.Minimum,rScale.Maximum); + aScaleAutomatism.m_fValueMaximum = pMinMaxSupplier->getMaximumYInRange(rScale.Minimum,rScale.Maximum); + } + aScaleAutomatism.calculateExplicitScaleAndIncrement( + m_aExplicitScales[nDim], m_aExplicitIncrements[nDim] ); + } + setExplicitScaleToDefault(m_aExplicitScales[2]); +} + +//............................................................................. +} //namespace chart +//............................................................................. diff --git a/chart2/source/view/axes/makefile.mk b/chart2/source/view/axes/makefile.mk new file mode 100644 index 000000000..dd0fac9cf --- /dev/null +++ b/chart2/source/view/axes/makefile.mk @@ -0,0 +1,91 @@ +#************************************************************************* +# +# $RCSfile: makefile.mk,v $ +# +# $Revision: 1.1.1.1 $ +# +# last change: $Author: bm $ $Date: 2003-10-06 09:58:33 $ +# +# The Contents of this file are made available subject to the terms of +# either of the following licenses +# +# - GNU Lesser General Public License Version 2.1 +# - Sun Industry Standards Source License Version 1.1 +# +# Sun Microsystems Inc., October, 2000 +# +# GNU Lesser General Public License Version 2.1 +# ============================================= +# Copyright 2000 by Sun Microsystems, Inc. +# 901 San Antonio Road, Palo Alto, CA 94303, USA +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License version 2.1, as published by the Free Software Foundation. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# +# +# Sun Industry Standards Source License Version 1.1 +# ================================================= +# The contents of this file are subject to the Sun Industry Standards +# Source License Version 1.1 (the "License"); You may not use this file +# except in compliance with the License. You may obtain a copy of the +# License at http://www.openoffice.org/license.html. +# +# Software provided under this License is provided on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, +# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, +# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. +# See the License for the specific provisions governing your rights and +# obligations concerning the Software. +# +# The Initial Developer of the Original Code is: Sun Microsystems, Inc. +# +# Copyright: 2000 by Sun Microsystems, Inc. +# +# All Rights Reserved. +# +# Contributor(s): _______________________________________ +# +# +# +#************************************************************************* + +PRJ= ..$/..$/.. +PRJINC= $(PRJ)$/source +PRJNAME= chart2 +TARGET= chvaxes + +ENABLE_EXCEPTIONS= TRUE + +# --- Settings ----------------------------------------------------- + +.INCLUDE: settings.mk +#.IF "$(GUI)" == "WNT" +#CFLAGS+=-GR +#.ENDIF + +# --- export library ------------------------------------------------- + +#object files to build and link together to lib $(SLB)$/$(TARGET).lib +SLOFILES = \ + $(SLO)$/VMeterBase.obj \ + $(SLO)$/TickmarkHelper.obj \ + $(SLO)$/ScaleAutomatism.obj \ + $(SLO)$/VCoordinateSystem.obj \ + $(SLO)$/VAxisProperties.obj \ + $(SLO)$/VAxis.obj \ + $(SLO)$/VGrid.obj + +# --- Targets ----------------------------------------------------------------- + +.INCLUDE: target.mk diff --git a/chart2/source/view/charttypes/AreaChart.cxx b/chart2/source/view/charttypes/AreaChart.cxx new file mode 100644 index 000000000..8fc65d9fe --- /dev/null +++ b/chart2/source/view/charttypes/AreaChart.cxx @@ -0,0 +1,464 @@ +#include "AreaChart.hxx" +#include "PlottingPositionHelper.hxx" +#include "ShapeFactory.hxx" +//#include "chartview/servicenames_charttypes.hxx" +//#include "chartview/servicenames_coosystems.hxx" +#include "CommonConverters.hxx" +#include "macros.hxx" +#include "ViewDefines.hxx" +#include "TransformationHelper.hxx" +#include "chartview/ObjectIdentifier.hxx" + +#ifndef _SV_GEN_HXX +#include <vcl/gen.hxx> +#endif +#ifndef _TOOLS_DEBUG_HXX +#include <tools/debug.hxx> +#endif +#ifndef _TOOLS_COLOR_HXX +#include <tools/color.hxx> +#endif +#ifndef _SVX_UNOPRNMS_HXX +#include <svx/unoprnms.hxx> +#endif +#ifndef INCLUDED_RTL_MATH_HXX +#include <rtl/math.hxx> +#endif + +#ifndef _COM_SUN_STAR_LANG_XSERVICENAME_HPP_ +#include <com/sun/star/lang/XServiceName.hpp> +#endif + +//............................................................................. +namespace chart +{ +//............................................................................. +using namespace ::com::sun::star; +using namespace ::rtl::math; +using namespace ::drafts::com::sun::star::chart2; + +class AreaPositionHelper : public PlottingPositionHelper +{ +public: + AreaPositionHelper(); //@todo + virtual ~AreaPositionHelper(); + + //double getSlotPos( double fCategoryX ) const; + + double getTransformedDepth() const; + Rectangle getTransformedClipRect() const; + + double getLogicGrounding() const; + +private: //member +}; + +AreaPositionHelper::AreaPositionHelper() +{ +} + +AreaPositionHelper::~AreaPositionHelper() +{ +} + +double AreaPositionHelper::getTransformedDepth() const +{ + double MinZ = getLogicMinZ(); + double MaxZ = getLogicMaxZ(); + if(m_aScales[2].Scaling.is()) + MinZ = m_aScales[2].Scaling->doScaling(MinZ); + if(m_aScales[2].Scaling.is()) + MaxZ = m_aScales[2].Scaling->doScaling(MaxZ); + return FIXED_SIZE_FOR_3D_CHART_VOLUME/(MaxZ-MinZ); +} + +Rectangle AreaPositionHelper::getTransformedClipRect() const +{ + //get logic clip values: + double MinX = getLogicMinX(); + double MinY = getLogicMinY(); + double MinZ = getLogicMinZ(); + double MaxX = getLogicMaxX(); + double MaxY = getLogicMaxY(); + double MaxZ = getLogicMaxZ(); + + //apply scaling + doLogicScaling( &MinX, &MinY, &MinZ ); + doLogicScaling( &MaxX, &MaxY, &MaxZ); + + drawing::Position3D aMimimum( MinX, MinY, MinZ); + drawing::Position3D aMaximum( MaxX, MaxY, MaxZ); + + //transform to screen coordinates + aMimimum = SequenceToPosition3D( getTransformationLogicToScene() + ->transform( Position3DToSequence(aMimimum) ) ); + aMaximum = SequenceToPosition3D( getTransformationLogicToScene() + ->transform( Position3DToSequence(aMaximum) ) ); + + Rectangle aRet( aMimimum.PositionX, aMaximum.PositionY, aMaximum.PositionX, aMimimum.PositionY ); + return aRet; +} + +double AreaPositionHelper::getLogicGrounding() const +{ + //@todo get this from model axis crosses at if that value is between min and max + //@todo get this for other directions - so far only y + double fRet=0.0; + uno::Reference< lang::XServiceName > xServiceName( m_aScales[1].Scaling, uno::UNO_QUERY ); + bool bIsLogarithm = ( xServiceName.is() && (xServiceName->getServiceName()).equals( + C2U( "com.sun.star.chart2.LogarithmicScaling" ))); + if( bIsLogarithm ) + fRet = m_aScales[1].Minimum; + return fRet; +} + +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- + +AreaChart::AreaChart( sal_Int32 nDimension ) + : VSeriesPlotter( nDimension ) + , m_pPosHelper( new AreaPositionHelper() ) +{ + PlotterBase::m_pPosHelper = m_pPosHelper; +} + +AreaChart::~AreaChart() +{ + delete m_pPosHelper; +} + +//----------------------------------------------------------------- +// lang::XServiceInfo +//----------------------------------------------------------------- +/* +APPHELPER_XSERVICEINFO_IMPL(AreaChart,CHART2_VIEW_AREACHART_SERVICE_IMPLEMENTATION_NAME) + + uno::Sequence< rtl::OUString > AreaChart +::getSupportedServiceNames_Static() +{ + uno::Sequence< rtl::OUString > aSNS( 1 ); + aSNS.getArray()[ 0 ] = CHART2_VIEW_AREACHART_SERVICE_NAME; + return aSNS; +} +*/ +/* +//----------------------------------------------------------------- +// chart2::XPlotter +//----------------------------------------------------------------- + + ::rtl::OUString SAL_CALL AreaChart +::getCoordinateSystemTypeID() + throw (uno::RuntimeException) +{ + return CHART2_COOSYSTEM_CARTESIAN2D_SERVICE_NAME; +} + + void SAL_CALL AreaChart +::setScales( const uno::Sequence< ExplicitScaleData >& rScales ) throw (uno::RuntimeException) +{ +} + void SAL_CALL AreaChart +::setTransformation( const uno::Reference< XTransformation >& xTransformationToLogicTarget, const uno::Reference< XTransformation >& xTransformationToFinalPage ) throw (uno::RuntimeException) +{ +} +*/ + +bool isPolygonEmptyOrSinglePoint(drawing::PolyPolygonShape3D& rPoly) +{ + if(!rPoly.SequenceX.getLength()) + return true; + if(rPoly.SequenceX[0].getLength()<=1) + return true; + return false; +} + +void closePolygon( drawing::PolyPolygonShape3D& rPoly) +{ + //add a last point == first point + if(isPolygonEmptyOrSinglePoint(rPoly)) + return; + drawing::Position3D aFirst(rPoly.SequenceX[0][0],rPoly.SequenceY[0][0],rPoly.SequenceZ[0][0]); + AddPointToPoly( rPoly, aFirst ); +} + +void AreaChart::addSeries( VDataSeries* pSeries, sal_Int32 xSlot, sal_Int32 ySlot ) +{ + VSeriesPlotter::addSeries( pSeries, xSlot, ySlot ); +} + +void AreaChart::createShapes() +{ + DBG_ASSERT(m_pShapeFactory&&m_xLogicTarget.is()&&m_xFinalTarget.is(),"AreaChart is not proper initialized"); + if(!(m_pShapeFactory&&m_xLogicTarget.is()&&m_xFinalTarget.is())) + return; + + //--------------------------------------------- + //check necessary here that different Y axis can not be stacked in the same group? ... hm? + + //update/create information for current group + double fLogicZ = 0.0;//as defined + double fLogicBaseWidth = 1.0;//as defined + double fLogicBaseDepth = fLogicBaseWidth;//Logic Depth and Width are identical by define ... (symmetry is not necessary anymore) + + sal_Int32 nStartIndex = 0; // inclusive ;..todo get somehow from x scale + sal_Int32 nEndIndex = VSeriesPlotter::getPointCount(m_aXSlots); + if(nEndIndex<=0) + nEndIndex=1; +//============================================================================= + //iterate through all x values per indices + for( sal_Int32 nIndex = nStartIndex; nIndex < nEndIndex; nIndex++ ) + { + ::std::vector< VDataSeriesGroup >::iterator aXSlotIter = m_aXSlots.begin(); + const ::std::vector< VDataSeriesGroup >::const_iterator aXSlotEnd = m_aXSlots.end(); +//============================================================================= + //for the area chart there should be at most one x slot (no side by side stacking available) + //attention different: xSlots are always interpreted as independent areas one behind the other: @todo this doesn't work why not??? + for( ; aXSlotIter != aXSlotEnd; aXSlotIter++ ) + { + ::std::vector< VDataSeries* >* pSeriesList = &(aXSlotIter->m_aSeriesVector); + + ::std::vector< VDataSeries* >::const_iterator aSeriesIter = pSeriesList->begin(); + const ::std::vector< VDataSeries* >::const_iterator aSeriesEnd = pSeriesList->end(); + + double fLogicYForNextSeries = 0.0; + + double fLogicYSum = 0.0; + for( ; aSeriesIter != aSeriesEnd; aSeriesIter++ ) + { + double fAdd = (*aSeriesIter)->getY( nIndex ); + if( !::rtl::math::isNan(fAdd) ) + fLogicYSum += fAdd; + } + aSeriesIter = pSeriesList->begin(); +//============================================================================= + //iterate through all series + for( ; aSeriesIter != aSeriesEnd; aSeriesIter++ ) + { + uno::Reference< drawing::XShapes > xSeriesGroupShape_Shapes = getSeriesGroupShape(*aSeriesIter, m_xLogicTarget); + + //set z order for series group shape + { + uno::Reference< beans::XPropertySet > xProp( xSeriesGroupShape_Shapes, uno::UNO_QUERY ); + DBG_ASSERT(xProp.is(), "created shape offers no XPropertySet"); + if( xProp.is()) + { + try + { + uno::Any aAZOrder = xProp->getPropertyValue( C2U( UNO_NAME_MISC_OBJ_ZORDER ) ); + sal_Int32 nZOrder=33; + aAZOrder >>= nZOrder; + xProp->setPropertyValue( C2U( UNO_NAME_MISC_OBJ_ZORDER ) + , uno::makeAny( sal_Int32(0) ) ); + } + catch( uno::Exception& e ) + { + e; + } + } + } + + //collect data point information (logic coordinates, style ): + double fLogicX = (*aSeriesIter)->getX(nIndex); + double fLogicY = (*aSeriesIter)->getY(nIndex); + if( ::rtl::math::isNan(fLogicY) ) + fLogicY=0;//@todo maybe there is another grounding ?? - for sum 0 is right + fLogicY += fLogicYForNextSeries; + fLogicYForNextSeries = fLogicY; + + bool bIsVisible = m_pPosHelper->isLogicVisible( fLogicX, fLogicY, fLogicZ ); + + //remind minimal and maximal x values for area 'grounding' points + //only for filled area + { + double& rfMinX = (*aSeriesIter)->m_fMinX; + if(!nIndex||fLogicX<rfMinX) + rfMinX=fLogicX; + double& rfMaxX = (*aSeriesIter)->m_fMaxX; + if(!nIndex||fLogicX>rfMaxX) + rfMaxX=fLogicX; + } + + //apply scaling + //(for more accurat clipping it would be better to first clip and than scale and transform, + //but as long as we only have integer Polygon clipping we need to apply scaling and transformation first ) see QQQ + m_pPosHelper->doLogicScaling( &fLogicX, &fLogicY, &fLogicZ ); + + //store point information for series polygon + //for area and/or line (symbols only do not need this) + if( !::rtl::math::isNan(fLogicX) && !::rtl::math::isInf(fLogicX) + && !::rtl::math::isNan(fLogicY) && !::rtl::math::isInf(fLogicY) + && !::rtl::math::isNan(fLogicZ) && !::rtl::math::isInf(fLogicZ) ) + { + drawing::PolyPolygonShape3D& rSeriesPoly = (*aSeriesIter)->m_aPolyPolygonShape3D; + drawing::Position3D aScaledLogicPosition( fLogicX, fLogicY,fLogicZ); + //transformation 3) -> 4) + drawing::Position3D aTransformedPosition( + SequenceToPosition3D( + m_pPosHelper->getTransformationLogicToScene()->transform( + Position3DToSequence(aScaledLogicPosition) ) ) ); + AddPointToPoly( rSeriesPoly, aTransformedPosition ); + } + + //create a single datapoint if point is visible + //apply clipping: + if( !bIsVisible ) + continue; + + //create a group shape for this point and add to the series shape: + rtl::OUString aPointCID = ObjectIdentifier::createPointCID( + (*aSeriesIter)->getPointCID_Stub(), nIndex ); + uno::Reference< drawing::XShapes > xPointGroupShape_Shapes( + createGroupShape(xSeriesGroupShape_Shapes,aPointCID) ); + uno::Reference<drawing::XShape> xPointGroupShape_Shape = + uno::Reference<drawing::XShape>( xPointGroupShape_Shapes, uno::UNO_QUERY ); + + { + DataPointGeometry aLogicGeom( drawing::Position3D(fLogicX,fLogicY,fLogicZ) + , drawing::Direction3D(1,1,1) ); + //transformation 3) -> 4) + DataPointGeometry aTransformedGeom( + TransformationHelper::transformLogicGeom( + aLogicGeom,m_pPosHelper->getTransformationLogicToScene()) ); + + //create data point + bool bShowSymbols = false; + if( bShowSymbols ) + { + if(m_nDimension==3) + { + m_pShapeFactory->createSymbol3D( xPointGroupShape_Shapes + , aTransformedGeom + , (*aSeriesIter)->getAppearanceOfPoint( nIndex ) ); + } + else //m_nDimension!=3 + { + m_pShapeFactory->createSymbol2D( xPointGroupShape_Shapes + , aTransformedGeom + , (*aSeriesIter)->getAppearanceOfPoint( nIndex ) ); + } + } + } + + //remove PointGroupShape if empty + if(!xPointGroupShape_Shapes->getCount()) + xSeriesGroupShape_Shapes->remove(xPointGroupShape_Shape); + + }//next series in x slot (next y slot) + }//next x slot + }//next category +//============================================================================= +//============================================================================= +//============================================================================= + + //iterate through all series again to create the series shapes + ::std::vector< VDataSeriesGroup >::iterator aXSlotIter = m_aXSlots.begin(); + const ::std::vector< VDataSeriesGroup >::const_iterator aXSlotEnd = m_aXSlots.end(); +//============================================================================= + //for the area chart there should be at most one x slot (no side by side stacking available) + if( aXSlotIter != aXSlotEnd ) + { + ::std::vector< VDataSeries* >* pSeriesList = &(aXSlotIter->m_aSeriesVector); + + ::std::vector< VDataSeries* >::const_iterator aSeriesIter = pSeriesList->begin(); + const ::std::vector< VDataSeries* >::const_iterator aSeriesEnd = pSeriesList->end(); +//============================================================================= + + drawing::PolyPolygonShape3D* pPreviousSeriesPoly = NULL; + drawing::PolyPolygonShape3D* pSeriesPoly = NULL; + + //iterate through all series + for( ; aSeriesIter != aSeriesEnd; aSeriesIter++ ) + { + uno::Reference< drawing::XShapes > xSeriesGroupShape_Shapes = getSeriesGroupShape(*aSeriesIter, m_xLogicTarget); + pSeriesPoly = &(*aSeriesIter)->m_aPolyPolygonShape3D; + + double zValue = m_pPosHelper->getLogicMinZ(); + + drawing::PolyPolygonShape3D aPoly( *pSeriesPoly ); + //add second part to the polygon (grounding points or previous series points) + if(!pPreviousSeriesPoly) + { + double fMinX = (*aSeriesIter)->m_fMinX; + double fMaxX = (*aSeriesIter)->m_fMaxX; + //clip to scale + if(fMaxX<m_pPosHelper->getLogicMinX() || fMinX>m_pPosHelper->getLogicMaxX()) + continue;//no visible shape needed + if(fMaxX > m_pPosHelper->getLogicMaxX()) + fMaxX = m_pPosHelper->getLogicMaxX(); + if(fMinX < m_pPosHelper->getLogicMinX()) + fMinX = m_pPosHelper->getLogicMinX(); + + //apply scaling + { + m_pPosHelper->doLogicScaling( &fMinX, NULL, &zValue ); + m_pPosHelper->doLogicScaling( &fMaxX, NULL, NULL ); + } + double fY = m_pPosHelper->getLogicGrounding(); + + drawing::Position3D aScaledLogicPosition2( fMaxX,fY,zValue); + drawing::Position3D aTransformedPosition2( SequenceToPosition3D( m_pPosHelper->getTransformationLogicToScene()->transform( Position3DToSequence(aScaledLogicPosition2) ) ) ); + AddPointToPoly( aPoly, aTransformedPosition2 ); + + drawing::Position3D aScaledLogicPosition( fMinX,fY,zValue); + drawing::Position3D aTransformedPosition( SequenceToPosition3D( m_pPosHelper->getTransformationLogicToScene()->transform( Position3DToSequence(aScaledLogicPosition) ) ) ); + AddPointToPoly( aPoly, aTransformedPosition ); + } + else + { + appendPoly( aPoly, *pPreviousSeriesPoly ); + } + + closePolygon(aPoly); + + //apply clipping + //(for more accurat clipping it would be better to first clip and than scale and transform, + //but as long as we only have integer Polygon clipping we need to apply scaling and transformation first ) see QQQ + { + Polygon aToolsPoly = PolyToToolsPoly( aPoly ); + aToolsPoly.Clip( m_pPosHelper->getTransformedClipRect() ); + aPoly = ToolsPolyToPoly( aToolsPoly, zValue ); + closePolygon(aPoly); //again necessary after clipping + } + + if(isPolygonEmptyOrSinglePoint(aPoly)) + continue; + + //create area: + uno::Reference< drawing::XShape > xShape(NULL); + if(m_nDimension==3) + { + xShape = m_pShapeFactory->createArea3D( xSeriesGroupShape_Shapes + , aPoly, m_pPosHelper->getTransformedDepth() ); + } + else //m_nDimension!=3 + { + xShape = m_pShapeFactory->createArea2D( xSeriesGroupShape_Shapes + , aPoly ); + } + this->setMappedProperties( xShape + , (*aSeriesIter)->getPropertiesOfSeries() + , m_aShapePropertyMapForArea ); + pPreviousSeriesPoly = pSeriesPoly; + }//next series in x slot (next y slot) + }//next x slot +//============================================================================= +//============================================================================= + + /* @todo remove series shapes if empty + //remove and delete point-group-shape if empty + if(!xSeriesGroupShape_Shapes->getCount()) + { + (*aSeriesIter)->m_xShape.set(NULL); + m_xLogicTarget->remove(xSeriesGroupShape_Shape); + } + */ + + //remove and delete series-group-shape if empty + + //... todo +} + +//............................................................................. +} //namespace chart +//............................................................................. diff --git a/chart2/source/view/charttypes/AreaChart.hxx b/chart2/source/view/charttypes/AreaChart.hxx new file mode 100644 index 000000000..bb4fa37ad --- /dev/null +++ b/chart2/source/view/charttypes/AreaChart.hxx @@ -0,0 +1,47 @@ +#ifndef _CHART2_AREACHART_HXX +#define _CHART2_AREACHART_HXX + +#include "VSeriesPlotter.hxx" + +//............................................................................. +namespace chart +{ +//............................................................................. +class AreaPositionHelper; + +class AreaChart : public VSeriesPlotter +{ + //------------------------------------------------------------------------- + // public methods + //------------------------------------------------------------------------- +public: + AreaChart( sal_Int32 nDimension ); + virtual ~AreaChart(); + + //------------------------------------------------------------------------- + // chart2::XPlotter + //------------------------------------------------------------------------- + + virtual void SAL_CALL createShapes(); + /* + virtual ::rtl::OUString SAL_CALL getCoordinateSystemTypeID( ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setScales( const ::com::sun::star::uno::Sequence< ::drafts::com::sun::star::chart2::ExplicitScaleData >& rScales ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setTransformation( const ::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XTransformation >& xTransformationToLogicTarget, const ::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XTransformation >& xTransformationToFinalPage ) throw (::com::sun::star::uno::RuntimeException); + */ + + virtual void addSeries( VDataSeries* pSeries, sal_Int32 xSlot = -1,sal_Int32 ySlot = -1 ); + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- +private: //methods + //no default constructor + AreaChart(); + +private: //member + AreaPositionHelper* m_pPosHelper; +}; +//............................................................................. +} //namespace chart +//............................................................................. +#endif diff --git a/chart2/source/view/charttypes/BarChart.cxx b/chart2/source/view/charttypes/BarChart.cxx new file mode 100644 index 000000000..71b31fa6e --- /dev/null +++ b/chart2/source/view/charttypes/BarChart.cxx @@ -0,0 +1,544 @@ +#include "BarChart.hxx" +#include "PlottingPositionHelper.hxx" +#include "ShapeFactory.hxx" +//#include "chartview/servicenames_charttypes.hxx" +//#include "chartview/servicenames_coosystems.hxx" +#include "CommonConverters.hxx" +#include "macros.hxx" +#include "Linear3DTransformation.hxx" +#include "ViewDefines.hxx" +#include "CategoryPositionHelper.hxx" +#include "TransformationHelper.hxx" +#include "chartview/ObjectIdentifier.hxx" + +#ifndef _SV_GEN_HXX +#include <vcl/gen.hxx> +#endif +#ifndef _TOOLS_DEBUG_HXX +#include <tools/debug.hxx> +#endif +#ifndef _TOOLS_COLOR_HXX +#include <tools/color.hxx> +#endif +#ifndef _SVX_UNOPRNMS_HXX +#include <svx/unoprnms.hxx> +#endif +#ifndef INCLUDED_RTL_MATH_HXX +#include <rtl/math.hxx> +#endif + +// #define TRANSP_GRADIENT_HACK 1 + +#ifdef TRANSP_GRADIENT_HACK +# ifndef _DRAFTS_COM_SUN_STAR_CHART2_TRANSPARENCYSTYLE_HPP_ +# include <drafts/com/sun/star/chart2/TransparencyStyle.hpp> +# endif +# ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_ +# include <com/sun/star/container/XNameContainer.hpp> +# endif +#endif + +//............................................................................. +namespace chart +{ +//............................................................................. +using namespace ::com::sun::star; +using namespace ::rtl::math; +using namespace ::drafts::com::sun::star::chart2; + +class BarPositionHelper : public CategoryPositionHelper, public PlottingPositionHelper +{ +public: + BarPositionHelper( double fSeriesCount=0 ); //@todo + virtual ~BarPositionHelper(); + + virtual ::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XTransformation > + getTransformationLogicToScene() const; + + void updateSeriesCount( double fSeriesCount ); /*only enter the size of x stacked series*/ + + double getStartCategoryIndex() const { + sal_Int32 nStart = static_cast<sal_Int32>(getLogicMinX() + 1.49);//@todo +0.5 if clipping of half categories is implemented + if( nStart < 0 ) + nStart = 0; + return nStart; + } + double getEndCategoryIndex() const { + sal_Int32 nEnd = static_cast<sal_Int32>(getLogicMaxX() + 0.5); + if( nEnd < 0 ) + nEnd = 0; + return nEnd; + } +}; + +BarPositionHelper::BarPositionHelper( double fSeriesCount ) + : CategoryPositionHelper( fSeriesCount) +{ +} + +BarPositionHelper::~BarPositionHelper() +{ +} + +void BarPositionHelper::updateSeriesCount( double fSeriesCount ) +{ + m_fSeriesCount = fSeriesCount; +} + +uno::Reference< XTransformation > BarPositionHelper::getTransformationLogicToScene() const +{ + //transformation from 2) to 4) //@todo 2) and 4) need a link to a document + + //we need to apply this transformation to each geometric object because of a bug/problem + //of the old drawing layer (the UNO_NAME_3D_EXTRUDE_DEPTH is an integer value instead of an double ) + + if( !m_xTransformationLogicToScene.is() ) + { + Matrix4D aMatrix; + + double MinX = getLogicMinX(); + double MinY = getLogicMinY(); + double MinZ = getLogicMinZ(); + double MaxX = getLogicMaxX(); + double MaxY = getLogicMaxY(); + double MaxZ = getLogicMaxZ(); + + //apply scaling + //scaling of x axis is refused/ignored + doLogicScaling( NULL, &MinY, &MinZ ); + doLogicScaling( NULL, &MaxY, &MaxZ); + + aMatrix.TranslateX(-MinX); + aMatrix.TranslateY(-MinY); + aMatrix.TranslateZ(-MinZ+0.5*getSlotWidth()); + + double fWidthX = MaxX - MinX; + double fWidthY = MaxY - MinY; + double fWidthZ = MaxZ - MinZ; + + aMatrix.ScaleX(FIXED_SIZE_FOR_3D_CHART_VOLUME/fWidthX); + aMatrix.ScaleY(FIXED_SIZE_FOR_3D_CHART_VOLUME/fWidthY); + aMatrix.ScaleZ(FIXED_SIZE_FOR_3D_CHART_VOLUME/fWidthZ/getSlotWidth()); + + //if(nDim==2) + aMatrix = aMatrix*m_aMatrixScreenToScene; + + m_xTransformationLogicToScene = new Linear3DTransformation(Matrix4DToHomogenMatrix( aMatrix )); + } + return m_xTransformationLogicToScene; +} + +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- + +BarChart::BarChart( sal_Int32 nDimension ) + : VSeriesPlotter( nDimension ) + , m_pPosHelper( new BarPositionHelper() ) +{ + PlotterBase::m_pPosHelper = m_pPosHelper; +} + +BarChart::~BarChart() +{ + delete m_pPosHelper; +} + +//----------------------------------------------------------------- +// lang::XServiceInfo +//----------------------------------------------------------------- +/* +APPHELPER_XSERVICEINFO_IMPL(BarChart,CHART2_VIEW_BARCHART_SERVICE_IMPLEMENTATION_NAME) + + uno::Sequence< rtl::OUString > BarChart +::getSupportedServiceNames_Static() +{ + uno::Sequence< rtl::OUString > aSNS( 1 ); + aSNS.getArray()[ 0 ] = CHART2_VIEW_BARCHART_SERVICE_NAME; + return aSNS; +} +*/ +/* +//----------------------------------------------------------------- +// chart2::XPlotter +//----------------------------------------------------------------- + + ::rtl::OUString SAL_CALL BarChart +::getCoordinateSystemTypeID() + throw (uno::RuntimeException) +{ + return CHART2_COOSYSTEM_CARTESIAN2D_SERVICE_NAME; +} + + void SAL_CALL BarChart +::setScales( const uno::Sequence< ExplicitScaleData >& rScales ) throw (uno::RuntimeException) +{ +} + void SAL_CALL BarChart +::setTransformation( const uno::Reference< XTransformation >& xTransformationToLogicTarget, const uno::Reference< XTransformation >& xTransformationToFinalPage ) throw (uno::RuntimeException) +{ +} +*/ + +uno::Reference< drawing::XShape > BarChart::createDataPoint2D_Bar( + const uno::Reference< drawing::XShapes >& xTarget + , const DataPointGeometry& rGeometry + , const uno::Reference< beans::XPropertySet >& xObjectProperties + ) +{ + uno::Reference< drawing::XShape > xShape( + m_xShapeFactory->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.drawing.RectangleShape" ) ) ), uno::UNO_QUERY ); + xTarget->add(xShape); + + //@todo check wether this needs to be done before transformation to avoid rounding errors + double fLeftCorner = rGeometry.m_aPosition.PositionX - rGeometry.m_aSize.DirectionX/2.0; + xShape->setPosition(awt::Point( + static_cast<sal_Int32>(fLeftCorner) + ,static_cast<sal_Int32>(rGeometry.m_aPosition.PositionY))); + xShape->setSize(rGeometry.getSize2D()); + this->setMappedProperties( xShape, xObjectProperties, m_aShapePropertyMapForArea ); +/* +#ifdef TRANSP_GRADIENT_HACK + uno::Reference< beans::XPropertySet > xProp( xShape, uno::UNO_QUERY ); + //HACK: Setting a transparency gradient currently does not work well. With + //this hack you can create one gradient that is the only one used. + // see bug #110940#. + + // if transparency style is not gradient, disable it by setting + // FillTransparenceGradientName to an empty string + // Note: TransparencyStyle should become a new property in FillProperties + // (FillTransparenceStyle) + ::drafts::com::sun::star::chart2::TransparencyStyle aTransStyle; + xObjectProperties->getPropertyValue( C2U( "TransparencyStyle" )) >>= aTransStyle; + if( aTransStyle != ::drafts::com::sun::star::chart2::TransparencyStyle_GRADIENT ) + { + xProp->setPropertyValue( C2U( "FillTransparenceGradientName" ), + uno::makeAny( ::rtl::OUString())); + } + else + { + uno::Reference< container::XNameContainer > xGradientTable( + m_xShapeFactory->createInstance( + C2U( "com.sun.star.drawing.TransparencyGradientTable" )), uno::UNO_QUERY ); + // note: generate unique name + if( ! xGradientTable->hasByName( C2U( "Test" ) ) ) + { + xGradientTable->insertByName( C2U( "Test" ), + xObjectProperties->getPropertyValue( C2U( "TransparencyGradient"))); + } + xProp->setPropertyValue( C2U( "FillTransparenceGradientName" ), + uno::makeAny( C2U( "Test" ))); + } +#endif +*/ + return xShape; +} + +uno::Reference< drawing::XShape > BarChart::createDataPoint3D_Bar( + const uno::Reference< drawing::XShapes >& xTarget + , const DataPointGeometry& rGeometry + , const uno::Reference< beans::XPropertySet >& xObjectProperties + , Geometry3D eGeometry ) +{ + uno::Reference< drawing::XShape > xShape(NULL); + //test @todo remove + eGeometry = GEOMETRY_CYLINDER; + switch( eGeometry ) + { + case GEOMETRY_CYLINDER: + xShape = m_pShapeFactory->createCylinder( xTarget, rGeometry ); + break; + case GEOMETRY_CONE: + xShape = m_pShapeFactory->createCone( xTarget, rGeometry ); + break; + case GEOMETRY_PYRAMID: + xShape = m_pShapeFactory->createPyramid( xTarget, rGeometry ); + break; + case GEOMETRY_CUBOID: + default: + xShape = m_pShapeFactory->createRoundedCube( xTarget, rGeometry ); + } + this->setMappedProperties( xShape, xObjectProperties, m_aShapePropertyMapForArea ); + return xShape; +} + +void BarChart::createShapes() +{ + DBG_ASSERT(m_pShapeFactory&&m_xLogicTarget.is()&&m_xFinalTarget.is(),"BarChart is not proper initialized"); + if(!(m_pShapeFactory&&m_xLogicTarget.is()&&m_xFinalTarget.is())) + return; + + //the text labels should be always on top of the other series shapes + //therefore create an own group for the texts to move them to front + //(because the text group is created after the series group the texts are displayed on top) + uno::Reference< drawing::XShapes > xSeriesTarget( + createGroupShape( m_xLogicTarget,rtl::OUString() )); + uno::Reference< drawing::XShapes > xTextTarget( + createGroupShape( m_xLogicTarget,rtl::OUString() )); + + //--------------------------------------------- + //check necessary here that different Y axis can not be stacked in the same group? ... hm? + + //update/create information for current group + m_pPosHelper->updateSeriesCount( m_aXSlots.size() ); + double fLogicZ = 0.0;//as defined + double fLogicBaseWidth = m_pPosHelper->getSlotWidth(); + + //(@todo maybe different iteration for breaks in axis ?) + sal_Int32 nStartCategoryIndex = static_cast<sal_Int32>(m_pPosHelper->getStartCategoryIndex()); // inclusive + sal_Int32 nEndCategoryIndex = static_cast<sal_Int32>(m_pPosHelper->getEndCategoryIndex()); //inclusive +//============================================================================= + //iterate through all shown categories + for( sal_Int32 nCatIndex = nStartCategoryIndex; nCatIndex < nEndCategoryIndex; nCatIndex++ ) + { + ::std::vector< VDataSeriesGroup >::iterator aXSlotIter = m_aXSlots.begin(); + const ::std::vector< VDataSeriesGroup >::const_iterator aXSlotEnd = m_aXSlots.end(); +//============================================================================= + //iterate through all x slots in this category + for( double fSlotX=0; aXSlotIter != aXSlotEnd; aXSlotIter++, fSlotX+=1.0 ) + { + ::std::vector< VDataSeries* >* pSeriesList = &(aXSlotIter->m_aSeriesVector); + + double fLogicPositiveYSum = 0.0, fLogicNegativeYSum = 0.0; + aXSlotIter->calculateYSumsForCategory( nCatIndex, fLogicPositiveYSum, fLogicNegativeYSum ); + if(fLogicPositiveYSum==0.0 && fLogicNegativeYSum==0.0) + continue; + + double fScaledLogicPositiveYSum = 0.0, fScaledLogicNegativeYSum = 0.0; + m_pPosHelper->doLogicScaling(NULL,&fScaledLogicPositiveYSum,NULL); + m_pPosHelper->doLogicScaling(NULL,&fScaledLogicNegativeYSum,NULL); + + double fPositiveLogicYForNextSeries = 0.0; + double fNegativeLogicYForNextSeries = 0.0; + + ::std::vector< VDataSeries* >::const_iterator aSeriesIter = pSeriesList->begin(); + const ::std::vector< VDataSeries* >::const_iterator aSeriesEnd = pSeriesList->end(); + aSeriesIter = pSeriesList->begin(); +//============================================================================= + //iterate through all series in this x slot + for( ; aSeriesIter != aSeriesEnd; aSeriesIter++ ) + { + uno::Reference< drawing::XShapes > xSeriesGroupShape_Shapes( + getSeriesGroupShape(*aSeriesIter, xSeriesTarget) ); + uno::Reference< drawing::XShapes > xLabelGroupShape_Shapes( + getLabelsGroupShape(*aSeriesIter, xTextTarget) ); + + //collect data point information (logic coordinates, style ): + double fLogicX = m_pPosHelper->getSlotPos( (double)nCatIndex, fSlotX ); + double fLogicBarHeight = (*aSeriesIter)->getY( nCatIndex ); + if( ::rtl::math::isNan( fLogicBarHeight )) //no value at this category + continue; + if(fLogicBarHeight==0.0)//@todo: continue also if the resolution to small + continue; + + //todo sort negative and positive values, to display them on different sides of the Y axis + bool bPositive = fLogicBarHeight > 0.0; + double fLowerYValue = bPositive ? fPositiveLogicYForNextSeries : fNegativeLogicYForNextSeries; + double fUpperYValue = fLowerYValue+fLogicBarHeight; + if( bPositive ) + fPositiveLogicYForNextSeries += fLogicBarHeight; + else + fNegativeLogicYForNextSeries += fLogicBarHeight; + /* + if( !bPositive ) + { + double fHelp = fLowerYValue; + fLowerYValue = fUpperYValue; + fUpperYValue = fHelp; + } + */ + + //@todo ... start an iteration over the different breaks of the axis + //each subsystem may add an additional shape to form the whole point + //create a group shape for this point and add to the series shape: +// uno::Reference< drawing::XShapes > xPointGroupShape_Shapes( createGroupShape(xSeriesGroupShape_Shapes) ); +// uno::Reference<drawing::XShape> xPointGroupShape_Shape = +// uno::Reference<drawing::XShape>( xPointGroupShape_Shapes, uno::UNO_QUERY ); + //as long as we do not iterate we do not need to create an additional group for each point + uno::Reference< drawing::XShapes > xPointGroupShape_Shapes = xSeriesGroupShape_Shapes; + + //@todo iterate through all subsystems to create partial points + { + //@todo select a suiteable PositionHelper for this subsystem + BarPositionHelper* pPosHelper = m_pPosHelper; + + //apply clipping to Y + //@todo clipping of X and Z is not fully integrated so far, as there is a need to create different objects + { + double fLower = bPositive ? fLowerYValue : fUpperYValue; + double fUpper = bPositive ? fUpperYValue : fLowerYValue; + if( fLower > pPosHelper->getLogicMaxY() ) + continue; + if( fUpper < pPosHelper->getLogicMinY() ) + continue; + if( fLower < pPosHelper->getLogicMinY() ) + fLower = pPosHelper->getLogicMinY(); + if( fUpper > pPosHelper->getLogicMaxY() ) + fUpper = pPosHelper->getLogicMaxY(); + if( approxEqual(fLower, fUpper) ) + continue; + fLowerYValue = bPositive ? fLower : fUpper; + fUpperYValue = bPositive ? fUpper : fLower; + } + + //apply scaling to Y before calculating width (necessary to maintain gradient in clipped objects) + pPosHelper->doLogicScaling(NULL,&fLowerYValue,NULL); + pPosHelper->doLogicScaling(NULL,&fUpperYValue,NULL); + //scaling of X and Z is not provided as the created objects should be symmetric in that dimensions + + //calculate resulting width + double fCompleteHeight = bPositive ? fScaledLogicPositiveYSum : fScaledLogicNegativeYSum; + double fLogicBarWidth = fLogicBaseWidth; + if(m_nDimension==3) + { + //@todo? modify depth and width only dependend on the geomtric form ... : + if(fCompleteHeight!=0.0) + fLogicBarWidth = fLogicBaseWidth*(fCompleteHeight-fLowerYValue)/(fCompleteHeight); + } + double fLogicBarDepth = fLogicBarWidth; //Logic Depth and Width are identical by define ... (symmetry is not necessary anymore) + + DataPointGeometry aLogicGeom( drawing::Position3D(fLogicX,fLowerYValue,fLogicZ) + , drawing::Direction3D(fLogicBarWidth,fUpperYValue-fLowerYValue,fLogicBarDepth) + , drawing::Direction3D(0,approxSub(fCompleteHeight,fUpperYValue),0) ); + //transformation 3) -> 4) + DataPointGeometry aTransformedGeom( + TransformationHelper::transformLogicGeom( + aLogicGeom,pPosHelper->getTransformationLogicToScene()) ); + + //create partial point + uno::Reference< drawing::XShape > xShape; + if(m_nDimension==3) + { + xShape = createDataPoint3D_Bar( + xPointGroupShape_Shapes + , aTransformedGeom + ,(*aSeriesIter)->getPropertiesOfPoint( nCatIndex ) + ,(*aSeriesIter)->getAppearanceOfPoint( nCatIndex ).m_eGeometry3D ); + } + else //m_nDimension!=3 + { + xShape = createDataPoint2D_Bar( + xPointGroupShape_Shapes + , aTransformedGeom + , (*aSeriesIter)->getPropertiesOfPoint( nCatIndex )); + } + //set name/classified ObjectID (CID) + ShapeFactory::setShapeName(xShape + , ObjectIdentifier::createPointCID( + (*aSeriesIter)->getPointCID_Stub(),nCatIndex) ); + + //------------ + //create data point label + + bool bMiddlePosition = false; + if( pSeriesList->begin() != pSeriesList->end() ) + bMiddlePosition = true; + + awt::Point aScreenPosition2D = awt::Point( + static_cast<sal_Int32>(aTransformedGeom.m_aPosition.PositionX) + ,static_cast<sal_Int32>(aTransformedGeom.m_aPosition.PositionY + +aTransformedGeom.m_aSize.DirectionY ) + ); + if(bMiddlePosition) + aScreenPosition2D.Y -= static_cast<sal_Int32>(aTransformedGeom.m_aSize.DirectionY/2.0); + + double fLogicSum = bPositive ? fLogicPositiveYSum : fLogicNegativeYSum; + this->createDataLabel( xLabelGroupShape_Shapes, *(*aSeriesIter), nCatIndex + , fLogicBarHeight, fLogicSum, aScreenPosition2D ); + }//end iteration through partial points + + //remove PointGroupShape if empty +// if(!xPointGroupShape_Shapes->getCount()) +// xSeriesGroupShape_Shapes->remove(xPointGroupShape_Shape); + + }//next series in x slot (next y slot) + }//next x slot + }//next category +//============================================================================= +//============================================================================= +//============================================================================= + /* @todo remove series shapes if empty + //remove and delete point-group-shape if empty + if(!xSeriesGroupShape_Shapes->getCount()) + { + (*aSeriesIter)->m_xShape.set(NULL); + m_xLogicTarget->remove(xSeriesGroupShape_Shape); + } + */ + + //remove and delete series-group-shape if empty + + //... todo +} + +//e.g. for Rectangle +/* +uno::Reference< drawing::XShape > BarChart::createPartialPointShape( + CooPoint + series dependent properties ...(create a special struct for each chart type) + , uno::Reference< XThinCoordinateSystem > xCoo + , sal_Bool bIsInBreak + , PointStyle* pStyle ) +{ + //create one here; use scaling and transformation to logic target + + //maybe do not show anything in the break //maybe read the behavior out of the configuration + //if(bIsInBreak) + // return NULL; + + uno::Reference< drawing::XShape > xNewPartialPointShape( + m_xShapeFactory->createInstance( + rtl::OUString::createFromAscii( "com.sun.star.drawing.RectangleShape" ) ) + , uno::UNO_QUERY ); + //set size and position + { + // + } + if(pStyle||bIsInBreak) + { + //set style properties if any for a single point + uno::Reference< beans::XPropertySet > xProp( xNewPartialPointShape, uno::UNO_QUERY ); + xProp->setPropertyValue( ... ); + + //set special properties if point in break (e.g. additional transparency ...) + } +} + +//e.g. for BarChart in 2 dim cartesian coordinates: +sal_Bool ShapeFactory::isShown( const Sequence< ExplicitScaleData >& rScales, const CooPoint& rP, double dLogicalWidthBeforeScaling ) +{ + ASSERT(rScales.getLength()==2) + double dMin_x = rScales[0].Minimum; + double dMax_x = rScales[0].Maximum; + double dMin_y = rScales[1].Minimum; + double dMax_y = rScales[1].Maximum; + + //we know that we have cartesian geometry + Rectangle aSysRect( rScales[0].Minimum, rScales[1].Maximum, rScales[0].Maximum, rScales[1].Minimum ); + Rectangle aPointRect( dLogicalWidthBeforeScaling ) + if(rP) +} + +//----------------------------------------------------------------------------- + +class FatCoordinateSystem +{ +public: + //XCoordinateSystemType getType(); + Sequence<XThinCoordinateSystem> getCoordinateSystems(); +} + +class ThinCoordinateSystem +{ +private: + +public: + sal_Bool isBreak(); + Sequence< ExplicitScaleData > getScales();//SubScales without beak + + +} +*/ +//............................................................................. +} //namespace chart +//............................................................................. diff --git a/chart2/source/view/charttypes/BarChart.hxx b/chart2/source/view/charttypes/BarChart.hxx new file mode 100644 index 000000000..9c477f674 --- /dev/null +++ b/chart2/source/view/charttypes/BarChart.hxx @@ -0,0 +1,63 @@ +#ifndef _CHART2_BARCHART_HXX +#define _CHART2_BARCHART_HXX + +#include "VSeriesPlotter.hxx" +#include "DatapointGeometry.hxx" + +//............................................................................. +namespace chart +{ +//............................................................................. +class BarPositionHelper; + +class BarChart : public VSeriesPlotter +{ + //------------------------------------------------------------------------- + // public methods + //------------------------------------------------------------------------- +public: + BarChart( sal_Int32 nDimension ); + virtual ~BarChart(); + + //------------------------------------------------------------------------- + // chart2::XPlotter + //------------------------------------------------------------------------- + + virtual void SAL_CALL createShapes(); + /* + virtual ::rtl::OUString SAL_CALL getCoordinateSystemTypeID( ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setScales( const ::com::sun::star::uno::Sequence< ::drafts::com::sun::star::chart2::ExplicitScaleData >& rScales ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setTransformation( const ::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XTransformation >& xTransformationToLogicTarget, const ::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XTransformation >& xTransformationToFinalPage ) throw (::com::sun::star::uno::RuntimeException); + */ + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + +private: //methods + //no default constructor + BarChart(); + + ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > + createDataPoint3D_Bar( + const ::com::sun::star::uno::Reference< + ::com::sun::star::drawing::XShapes >& xTarget + , const DataPointGeometry& rGeometry + , const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertySet >& xObjectProperties + , Geometry3D eGeometry ); + ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > + createDataPoint2D_Bar( + const ::com::sun::star::uno::Reference< + ::com::sun::star::drawing::XShapes >& xTarget + , const DataPointGeometry& rGeometry + , const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertySet >& xObjectProperties ); + +private: //member + BarPositionHelper* m_pPosHelper; +}; +//............................................................................. +} //namespace chart +//............................................................................. +#endif diff --git a/chart2/source/view/charttypes/CategoryPositionHelper.cxx b/chart2/source/view/charttypes/CategoryPositionHelper.cxx new file mode 100644 index 000000000..bb6001be3 --- /dev/null +++ b/chart2/source/view/charttypes/CategoryPositionHelper.cxx @@ -0,0 +1,54 @@ +#ifndef _CHART2_CATEGORYPOSITIONHELPER_HXX +#include "CategoryPositionHelper.hxx" +#endif + +//............................................................................. +namespace chart +{ +//............................................................................. +//using namespace ::com::sun::star; +//using namespace ::drafts::com::sun::star::chart2; + +CategoryPositionHelper::CategoryPositionHelper( double fSeriesCount, double fCategoryWidth ) + : m_fSeriesCount(fSeriesCount) + , m_fCategoryWidth(fCategoryWidth) + , m_fInnerDistance(0.0) + , m_fOuterDistance(1.0) +{ +} + +CategoryPositionHelper::CategoryPositionHelper() + : m_fSeriesCount(1.0) + , m_fCategoryWidth(1.0) + , m_fInnerDistance(0.0) + , m_fOuterDistance(0.0) +{ +} + +CategoryPositionHelper::~CategoryPositionHelper() +{ +} + +double CategoryPositionHelper::getSlotWidth() const +{ + double fWidth = m_fCategoryWidth / + ( m_fSeriesCount + + m_fOuterDistance + + m_fInnerDistance*( m_fSeriesCount - 1.0) ); + return fWidth; +} + +double CategoryPositionHelper::getSlotPos( double fCategoryX, double fSeriesNumber ) const +{ + //the returned position is in the middle of the rect + //fSeriesNumber 0...n-1 + double fPos = fCategoryX - (m_fCategoryWidth/2.0) + + (m_fOuterDistance/2.0 + fSeriesNumber*(1.0+m_fInnerDistance)) * getSlotWidth() + + getSlotWidth()/2.0; + + return fPos; +} + +//............................................................................. +} //namespace chart +//............................................................................. diff --git a/chart2/source/view/charttypes/CategoryPositionHelper.hxx b/chart2/source/view/charttypes/CategoryPositionHelper.hxx new file mode 100644 index 000000000..ec1d3ec59 --- /dev/null +++ b/chart2/source/view/charttypes/CategoryPositionHelper.hxx @@ -0,0 +1,35 @@ +#ifndef _CHART2_CATEGORYPOSITIONHELPER_HXX +#define _CHART2_CATEGORYPOSITIONHELPER_HXX + +//............................................................................. +namespace chart +{ +//............................................................................. + +//----------------------------------------------------------------------------- +/** +*/ + +class CategoryPositionHelper +{ +public: + CategoryPositionHelper( double fSeriesCount, double CategoryWidth = 1.0); + CategoryPositionHelper(); + virtual ~CategoryPositionHelper(); + + double getSlotWidth() const; + double getSlotPos( double fCategoryX, double fSeriesNumber ) const; + +protected: + double m_fSeriesCount; + double m_fCategoryWidth; + //Distance between two neighboring bars in same category, seen relative to width of the bar: + double m_fInnerDistance; //[-1,1] m_fInnerDistance=1 --> distance == width; m_fInnerDistance=-1-->all rects are painted on the same position + //Distance between two neighboring bars in different category, seen relative to width of the bar: + double m_fOuterDistance; //>=0 m_fOuterDistance=1 --> distance == width +}; + +//............................................................................. +} //namespace chart +//............................................................................. +#endif diff --git a/chart2/source/view/charttypes/PieChart.cxx b/chart2/source/view/charttypes/PieChart.cxx new file mode 100644 index 000000000..3da6d8a65 --- /dev/null +++ b/chart2/source/view/charttypes/PieChart.cxx @@ -0,0 +1,485 @@ +#include "PieChart.hxx" +#include "PlottingPositionHelper.hxx" +#include "ShapeFactory.hxx" +//#include "chartview/servicenames_charttypes.hxx" +//#include "chartview/servicenames_coosystems.hxx" +#include "CommonConverters.hxx" +#include "macros.hxx" +#include "Linear3DTransformation.hxx" +#include "ViewDefines.hxx" +#include "chartview/ObjectIdentifier.hxx" + +#ifndef _SV_GEN_HXX +#include <vcl/gen.hxx> +#endif +#ifndef _TOOLS_DEBUG_HXX +#include <tools/debug.hxx> +#endif +#ifndef _TOOLS_COLOR_HXX +#include <tools/color.hxx> +#endif +#ifndef _SVX_UNOPRNMS_HXX +#include <svx/unoprnms.hxx> +#endif +#ifndef INCLUDED_RTL_MATH_HXX +#include <rtl/math.hxx> +#endif + + +//............................................................................. +namespace chart +{ +//............................................................................. +using namespace ::com::sun::star; +using namespace ::drafts::com::sun::star::chart2; + +class PiePositionHelper : public PlottingPositionHelper +{ +public: + PiePositionHelper(); + virtual ~PiePositionHelper(); + + ::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XTransformation > + getTransformationLogicToScene( sal_Int32 nDim ) const; + + double getCatCount() const { + double fMin = getLogicMinX(); + double fMax = getLogicMaxX(); + //categories are defined to be at positive whole numbers only + if(fMax<0.0) + return 0.0; + if(fMin<0.0) + fMin=0.0; + //don't remove cast + return (long)(fMax - fMin)+1; } + + double getInnerRadius( double fCategoryX, bool& bIsVisible ) const; + double getOuterRadius( double fCategoryX ) const; + + DataPointGeometry transformLogicGeom( const DataPointGeometry& rGeom, sal_Int32 nDim ); + + double getStartCategoryIndex() const { + sal_Int32 nStart = getLogicMinX() + 0.5; + if( nStart < 0 ) + nStart = 0; + return nStart; + } + double getEndCategoryIndex() const { + sal_Int32 nEnd = getLogicMaxX() + 0.5; + if( nEnd < 0 ) + nEnd = 0; + return nEnd; + } + +private: //member + double m_fDepth; + + //Radius Offset for all rings in absolute logic values (1.0 == 1 category) + double m_fRingOffset; + + //Distance between different category rings, seen relative to width of a ring: + double m_fRingDistance; //>=0 m_fRingDistance=1 --> distance == width +}; + +PiePositionHelper::PiePositionHelper() + : m_fDepth(1.0) + , m_fRingOffset(0.5) + , m_fRingDistance(0.2) +{ +} + +PiePositionHelper::~PiePositionHelper() +{ +} + +double PiePositionHelper::getInnerRadius( double fCategoryX, bool& bIsVisible ) const +{ + bIsVisible = true; + double fRet = m_fRingOffset + fCategoryX-0.5+m_fRingDistance/(2.0*(1+m_fRingDistance)) - getLogicMinX(); + if(fRet<m_fRingOffset) + fRet=m_fRingOffset; + if(fRet>(m_fRingOffset+getLogicMaxX()-getLogicMinX())) + { + fRet=m_fRingOffset+getLogicMaxX()- getLogicMinX(); + bIsVisible = false; + } + doLogicScaling(&fRet,NULL,NULL); + return fRet; +} + +double PiePositionHelper::getOuterRadius( double fCategoryX ) const +{ + double fRet = m_fRingOffset + fCategoryX+0.5-m_fRingDistance/(2.0*(1+m_fRingDistance)) - getLogicMinX(); + if(fRet<m_fRingOffset) + fRet=m_fRingOffset; + if(fRet>(m_fRingOffset+getLogicMaxX()-getLogicMinX())) + fRet=m_fRingOffset+getLogicMaxX()- getLogicMinX(); + doLogicScaling(&fRet,NULL,NULL); + return fRet; +} + + +uno::Reference< XTransformation > PiePositionHelper::getTransformationLogicToScene( + sal_Int32 nDim ) const +{ + //transformation from 2) to 4) //@todo 2) and 4) need a ink to a document + + //?? need to apply this transformation to each geometric object, or would group be sufficient?? + + if( !m_xTransformationLogicToScene.is() ) + { + double fLogicDiameter = 2*(getLogicMaxX() - getLogicMinX() + m_fRingOffset); + + Matrix4D aMatrix; + //the middle of the pie circle is the middle of the diagram + aMatrix.TranslateX(fLogicDiameter/2.0); + aMatrix.ScaleX(FIXED_SIZE_FOR_3D_CHART_VOLUME/fLogicDiameter); + + aMatrix.TranslateY(fLogicDiameter/2.0); + aMatrix.ScaleY(FIXED_SIZE_FOR_3D_CHART_VOLUME/fLogicDiameter); + + aMatrix.ScaleZ(FIXED_SIZE_FOR_3D_CHART_VOLUME/m_fDepth); + + if(nDim==2) + aMatrix = aMatrix*m_aMatrixScreenToScene; + + m_xTransformationLogicToScene = new Linear3DTransformation(Matrix4DToHomogenMatrix( aMatrix )); + } + return m_xTransformationLogicToScene; +} + +DataPointGeometry PiePositionHelper::transformLogicGeom( const DataPointGeometry& rGeom, sal_Int32 nDim ) +{ + uno::Reference< XTransformation > xTransformation = getTransformationLogicToScene( nDim ); + DataPointGeometry aTransformedGeom( rGeom ); + + /* + DataPointGeometry aLogicGeom( drawing::Position3D(0.0,0.0,0.0) + , drawing::Direction3D(fOuterXDiameter,fOuterYDiameter,fDepth) + , drawing::Direction3D(fInnerXDiameter,fStartAngleDegree,fWidthAngleDegree) ); + */ + aTransformedGeom.m_aPosition = SequenceToPosition3D( xTransformation->transform( Position3DToSequence(rGeom.m_aPosition) ) ); + + drawing::Position3D aLogicPos1; + drawing::Position3D aLogicPos2( aLogicPos1 ); + aLogicPos2.PositionX += rGeom.m_aSize2.DirectionX;//fInnerXDiameter; + aLogicPos2.PositionZ += rGeom.m_aSize.DirectionZ; + drawing::Position3D aLogicPos3( aLogicPos1 ); + aLogicPos3.PositionX += rGeom.m_aSize.DirectionX; //fOuterXDiameter; + aLogicPos3.PositionY += rGeom.m_aSize.DirectionY; //fOuterYDiameter; + + drawing::Position3D aTransformedPos1( SequenceToPosition3D( xTransformation->transform( Position3DToSequence(aLogicPos1) ) ) ); + drawing::Position3D aTransformedPos2( SequenceToPosition3D( xTransformation->transform( Position3DToSequence(aLogicPos2) ) ) ); + drawing::Position3D aTransformedPos3( SequenceToPosition3D( xTransformation->transform( Position3DToSequence(aLogicPos3) ) ) ); + + + double fTransformedInnerXDiameter = aTransformedPos2.PositionX - aTransformedPos1.PositionX; + double fTransformedOuterXDiameter = aTransformedPos3.PositionX - aTransformedPos1.PositionX; + double fTransformedOuterYDiameter = aTransformedPos3.PositionY - aTransformedPos1.PositionY; + double fTransformedDepth = aTransformedPos2.PositionZ - aTransformedPos1.PositionZ; + + aTransformedGeom.m_aSize2.DirectionX = fTransformedInnerXDiameter; + aTransformedGeom.m_aSize.DirectionX = fTransformedOuterXDiameter; + aTransformedGeom.m_aSize.DirectionY = fTransformedOuterYDiameter; + aTransformedGeom.m_aSize.DirectionZ = fTransformedDepth; + + return aTransformedGeom; +} + + +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- + +PieChart::PieChart( sal_Int32 nDimension ) + : VSeriesPlotter( nDimension ) + , m_pPosHelper( new PiePositionHelper() ) +{ + PlotterBase::m_pPosHelper = m_pPosHelper; +} + +PieChart::~PieChart() +{ + delete m_pPosHelper; +} + +//----------------------------------------------------------------- +// lang::XServiceInfo +//----------------------------------------------------------------- +/* +APPHELPER_XSERVICEINFO_IMPL(PieChart,CHART2_VIEW_PIECHART_SERVICE_IMPLEMENTATION_NAME) + + uno::Sequence< rtl::OUString > PieChart +::getSupportedServiceNames_Static() +{ + uno::Sequence< rtl::OUString > aSNS( 1 ); + aSNS.getArray()[ 0 ] = CHART2_VIEW_PIECHART_SERVICE_NAME; + return aSNS; +} +*/ + +/* +//----------------------------------------------------------------- +// chart2::XPlotter +//----------------------------------------------------------------- + + ::rtl::OUString SAL_CALL PieChart +::getCoordinateSystemTypeID() + throw (uno::RuntimeException) +{ + return CHART2_COOSYSTEM_CARTESIAN2D_SERVICE_NAME; +} + + void SAL_CALL PieChart +::setScales( const uno::Sequence< ExplicitScaleData >& rScales ) throw (uno::RuntimeException) +{ +} + void SAL_CALL PieChart +::setTransformation( const uno::Reference< XTransformation >& xTransformationToLogicTarget, const uno::Reference< XTransformation >& xTransformationToFinalPage ) throw (uno::RuntimeException) +{ +} +*/ + + +uno::Reference< drawing::XShape > PieChart::createDataPoint2D( + const uno::Reference< drawing::XShapes >& xTarget + , const DataPointGeometry& rGeometry + , const uno::Reference< beans::XPropertySet >& xObjectProperties ) +{ + uno::Reference< drawing::XShape > xShape = + m_pShapeFactory->createPieSegment2D( xTarget, rGeometry ); + + this->setMappedProperties( xShape, xObjectProperties, m_aShapePropertyMapForArea ); + return xShape; +} + +uno::Reference< drawing::XShape > PieChart::createDataPoint3D( + const uno::Reference< drawing::XShapes >& xTarget + , const DataPointGeometry& rGeometry + , const uno::Reference< beans::XPropertySet >& xObjectProperties ) +{ + uno::Reference< drawing::XShape > xShape = + m_pShapeFactory->createPieSegment( xTarget, rGeometry ); + + this->setMappedProperties( xShape, xObjectProperties, m_aShapePropertyMapForArea ); + return xShape; +} + +void PieChart::addSeries( VDataSeries* pSeries, sal_Int32 xSlot, sal_Int32 ySlot ) +{ + VSeriesPlotter::addSeries( pSeries, 0, ySlot ); +} + +void PieChart::createShapes() +{ + DBG_ASSERT(m_pShapeFactory&&m_xLogicTarget.is()&&m_xFinalTarget.is(),"PieChart is not proper initialized"); + if(!(m_pShapeFactory&&m_xLogicTarget.is()&&m_xFinalTarget.is())) + return; + + //--------------------------------------------- + //check necessary here that different Y axis can not be stacked in the same group? ... hm? + + //update/create information for current group + double fLogicZ = 0.0;//as defined + + //(@todo maybe different iteration for breaks in axis ?) + sal_Int32 nStartCategoryIndex = m_pPosHelper->getStartCategoryIndex(); // inclusive + sal_Int32 nEndCategoryIndex = m_pPosHelper->getEndCategoryIndex(); //inclusive +//============================================================================= + //iterate through all shown categories + for( sal_Int32 nCatIndex = nStartCategoryIndex; nCatIndex <= nEndCategoryIndex; nCatIndex++ ) + { + ::std::vector< VDataSeriesGroup >::iterator aXSlotIter = m_aXSlots.begin(); + const ::std::vector< VDataSeriesGroup >::const_iterator aXSlotEnd = m_aXSlots.end(); +//============================================================================= + //for the pie chart there should be at most one x slot per category (one ring is one x slot and there is only one ring per category) + if( aXSlotIter != aXSlotEnd ) + { + ::std::vector< VDataSeries* >* pSeriesList = &(aXSlotIter->m_aSeriesVector); + + ::std::vector< VDataSeries* >::const_iterator aSeriesIter = pSeriesList->begin(); + const ::std::vector< VDataSeries* >::const_iterator aSeriesEnd = pSeriesList->end(); + + double fLogicYForNextSeries = 0.0; + + double fLogicYSum = 0.0; + for( ; aSeriesIter != aSeriesEnd; aSeriesIter++ ) + { + double fY = (*aSeriesIter)->getY( nCatIndex ); + if(fY<0.0) + { + //@todo warn somehow that negative values are treated as positive + continue; + } + if( ::rtl::math::isNan(fY) ) + continue; + fLogicYSum += fabs(fY); + } + if(fLogicYSum==0.0) + continue; + aSeriesIter = pSeriesList->begin(); + + bool bIsVisible; + double fInnerXRadius = m_pPosHelper->getInnerRadius( (double)nCatIndex, bIsVisible ); + if( !bIsVisible ) + continue; + double fOuterXRadius = m_pPosHelper->getOuterRadius( (double)nCatIndex ); + double fOuterYRadius = fOuterXRadius; + //the radii are already clipped and had scaling now + + double fDepth = 1.0; +//============================================================================= + //iterate through all series in this x slot (in this ring) + for( ; aSeriesIter != aSeriesEnd; aSeriesIter++ ) + { + uno::Reference< drawing::XShapes > xSeriesGroupShape_Shapes = getSeriesGroupShape(*aSeriesIter, m_xLogicTarget); + //collect data point information (logic coordinates, style ): + double fLogicYValue = fabs((*aSeriesIter)->getY( nCatIndex )); + if( ::rtl::math::isNan(fLogicYValue) ) + continue; + if(fLogicYValue==0.0)//@todo: continue also if the resolution to small + continue; + double fLogicYPos = fLogicYForNextSeries; + fLogicYForNextSeries += fLogicYValue; + + rtl::OUString aPointCID = ObjectIdentifier::createPointCID( + (*aSeriesIter)->getPointCID_Stub(), nCatIndex ); + //each subsystem may add an additional shape to form the whole point + //create a group shape for this point and add to the series shape: + uno::Reference< drawing::XShapes > xPointGroupShape_Shapes( + createGroupShape(xSeriesGroupShape_Shapes,aPointCID) ); + uno::Reference<drawing::XShape> xPointGroupShape_Shape = + uno::Reference<drawing::XShape>( xPointGroupShape_Shapes, uno::UNO_QUERY ); + + //iterate through all subsystems to create partial points + { + //clip logic coordinates: + //check fLogicX only necessary if we will allow breaks in category axes (see above for-loop) + //check fLogicZ hm ... + //check fLogicYValue get Y-scale for this series/stack group + //@todo fLogicYValue =... fInnerRadius = ... + + //---------------------------------- + double fStartAngleDegree = fLogicYPos/fLogicYSum*360.0; + double fWidthAngleDegree = fLogicYValue/fLogicYSum*360.0; + + DataPointGeometry aLogicGeom( drawing::Position3D(0.0,0.0,0.0) + , drawing::Direction3D(2.0*fOuterXRadius,2.0*fOuterYRadius,fDepth) + , drawing::Direction3D(2.0*fInnerXRadius,fStartAngleDegree,fWidthAngleDegree) ); + + //@todo: consider scaling here (transformation logic to logic) + //assumed scaling here: linear + + //transformation 3) -> 4) + DataPointGeometry aTransformedGeom( m_pPosHelper->transformLogicGeom(aLogicGeom, m_nDimension) ); + + if(m_nDimension==3) + { + uno::Reference< drawing::XShape > xShape = createDataPoint3D( + xPointGroupShape_Shapes + , aTransformedGeom + ,(*aSeriesIter)->getPropertiesOfPoint( nCatIndex )); + } + else //m_nDimension!=3 + { + uno::Reference< drawing::XShape > xShape = createDataPoint2D( + xPointGroupShape_Shapes + , aTransformedGeom + ,(*aSeriesIter)->getPropertiesOfPoint( nCatIndex )); + } + } + + //remove PointGroupShape if empty + if(!xPointGroupShape_Shapes->getCount()) + xSeriesGroupShape_Shapes->remove(xPointGroupShape_Shape); + + }//next series in x slot (next y slot) + }//next x slot + }//next category +//============================================================================= +//============================================================================= +//============================================================================= + /* @todo remove series shapes if empty + //remove and delete point-group-shape if empty + if(!xSeriesGroupShape_Shapes->getCount()) + { + (*aSeriesIter)->m_xShape.set(NULL); + m_xLogicTarget->remove(xSeriesGroupShape_Shape); + } + */ + + //remove and delete series-group-shape if empty + + //... todo +} + +//e.g. for Rectangle +/* +uno::Reference< drawing::XShape > PieChart::createPartialPointShape( + CooPoint + series dependent properties ...(create a special struct for each chart type) + , uno::Reference< XThinCoordinateSystem > xCoo + , sal_Bool bIsInBreak + , PointStyle* pStyle ) +{ + //create one here; use scaling and transformation to logic target + + //maybe do not show anything in the break //maybe read the behavior out of the configuration + //if(bIsInBreak) + // return NULL; + + uno::Reference< drawing::XShape > xNewPartialPointShape( + m_xShapeFactory->createInstance( + rtl::OUString::createFromAscii( "com.sun.star.drawing.RectangleShape" ) ) + , uno::UNO_QUERY ); + //set size and position + { + // + } + if(pStyle||bIsInBreak) + { + //set style properties if any for a single point + uno::Reference< beans::XPropertySet > xProp( xNewPartialPointShape, uno::UNO_QUERY ); + xProp->setPropertyValue( ... ); + + //set special properties if point in break (e.g. additional transparency ...) + } +} + +//e.g. for PieChart in 2 dim cartesian coordinates: +sal_Bool ShapeFactory::isShown( const Sequence< ExplicitScaleData >& rScales, const CooPoint& rP, double dLogicalWidthBeforeScaling ) +{ + ASSERT(rScales.getLength()==2) + double dMin_x = rScales[0].Minimum; + double dMax_x = rScales[0].Maximum; + double dMin_y = rScales[1].Minimum; + double dMax_y = rScales[1].Maximum; + + //we know that we have cartesian geometry + Rectangle aSysRect( rScales[0].Minimum, rScales[1].Maximum, rScales[0].Maximum, rScales[1].Minimum ); + Rectangle aPointRect( dLogicalWidthBeforeScaling ) + if(rP) +} + +//----------------------------------------------------------------------------- + +class FatCoordinateSystem +{ +public: + //XCoordinateSystemType getType(); + Sequence<XThinCoordinateSystem> getCoordinateSystems(); +} + +class ThinCoordinateSystem +{ +private: + +public: + sal_Bool isBreak(); + Sequence< ExplicitScaleData > getScales();//SubScales without beak + + +} +*/ +//............................................................................. +} //namespace chart +//............................................................................. diff --git a/chart2/source/view/charttypes/PieChart.hxx b/chart2/source/view/charttypes/PieChart.hxx new file mode 100644 index 000000000..4ca239731 --- /dev/null +++ b/chart2/source/view/charttypes/PieChart.hxx @@ -0,0 +1,63 @@ +#ifndef _CHART2_PIECHART_HXX +#define _CHART2_PIECHART_HXX + +#include "VSeriesPlotter.hxx" +#include "DatapointGeometry.hxx" + +//............................................................................. +namespace chart +{ +//............................................................................. +class PiePositionHelper; + +class PieChart : public VSeriesPlotter +{ + //------------------------------------------------------------------------- + // public methods + //------------------------------------------------------------------------- +public: + PieChart( sal_Int32 nDimension ); + virtual ~PieChart(); + + //------------------------------------------------------------------------- + // chart2::XPlotter + //------------------------------------------------------------------------- + + virtual void SAL_CALL createShapes(); + /* + virtual ::rtl::OUString SAL_CALL getCoordinateSystemTypeID( ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setScales( const ::com::sun::star::uno::Sequence< ::drafts::com::sun::star::chart2::ExplicitScaleData >& rScales ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setTransformation( const ::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XTransformation >& xTransformationToLogicTarget, const ::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XTransformation >& xTransformationToFinalPage ) throw (::com::sun::star::uno::RuntimeException); + */ + + virtual void addSeries( VDataSeries* pSeries, sal_Int32 xSlot = -1,sal_Int32 ySlot = -1 ); + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- +private: //methods + //no default constructor + PieChart(); + + ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > + createDataPoint3D( + const ::com::sun::star::uno::Reference< + ::com::sun::star::drawing::XShapes >& xTarget + , const DataPointGeometry& rGeometry + , const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertySet >& xObjectProperties ); + ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > + createDataPoint2D( + const ::com::sun::star::uno::Reference< + ::com::sun::star::drawing::XShapes >& xTarget + , const DataPointGeometry& rGeometry + , const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertySet >& xObjectProperties ); + +private: //member + PiePositionHelper* m_pPosHelper; +}; +//............................................................................. +} //namespace chart +//............................................................................. +#endif diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx new file mode 100644 index 000000000..7bee4e083 --- /dev/null +++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx @@ -0,0 +1,496 @@ +#include "VSeriesPlotter.hxx" +#include "ShapeFactory.hxx" + +#include "CommonConverters.hxx" +#include "macros.hxx" +#include "ViewDefines.hxx" +#include "chartview/ObjectIdentifier.hxx" + +//only for creation: @todo remove if all plotter are uno components and instanciated via servicefactory +#include "BarChart.hxx" +#include "PieChart.hxx" +#include "AreaChart.hxx" +// + +#ifndef _SVX_UNOPRNMS_HXX +#include <svx/unoprnms.hxx> +#endif + +#ifndef _TOOLS_COLOR_HXX +#include <tools/color.hxx> +#endif +// header for class OUStringBuffer +#ifndef _RTL_USTRBUF_HXX_ +#include <rtl/ustrbuf.hxx> +#endif +#ifndef INCLUDED_RTL_MATH_HXX +#include <rtl/math.hxx> +#endif +#ifndef _TOOLS_DEBUG_HXX +#include <tools/debug.hxx> +#endif + +//............................................................................. +namespace chart +{ +//............................................................................. +using namespace ::com::sun::star; +using namespace ::drafts::com::sun::star::chart2; + +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- + +VDataSeriesGroup::VDataSeriesGroup() + : m_aSeriesVector() + , m_bSumValuesDirty(true) + , m_fPositiveSum(0.0) + , m_fNegativeSum(0.0) + , m_bMaxPointCountDirty(true) + , m_nMaxPointCount(0) + +{ +} + +VDataSeriesGroup::VDataSeriesGroup( VDataSeries* pSeries ) + : m_aSeriesVector(1,pSeries) + , m_bSumValuesDirty(true) + , m_fPositiveSum(0.0) + , m_fNegativeSum(0.0) + , m_bMaxPointCountDirty(true) + , m_nMaxPointCount(0) +{ +} + +VDataSeriesGroup::VDataSeriesGroup( const ::std::vector< VDataSeries* >& rSeriesVector ) + : m_aSeriesVector(rSeriesVector) + , m_bSumValuesDirty(true) + , m_fPositiveSum(0.0) + , m_fNegativeSum(0.0) + , m_bMaxPointCountDirty(true) + , m_nMaxPointCount(0) +{ +} +VDataSeriesGroup::~VDataSeriesGroup() +{ +} + +void VDataSeriesGroup::deleteSeries() +{ + //delete all data series help objects: + ::std::vector< VDataSeries* >::const_iterator aIter = m_aSeriesVector.begin(); + const ::std::vector< VDataSeries* >::const_iterator aEnd = m_aSeriesVector.end(); + for( ; aIter != aEnd; aIter++ ) + { + delete *aIter; + } + m_aSeriesVector.clear(); +} + +void VDataSeriesGroup::addSeries( VDataSeries* pSeries ) +{ + m_aSeriesVector.push_back(pSeries); + m_bSumValuesDirty=true; + m_bMaxPointCountDirty=true; +} + +sal_Int32 VDataSeriesGroup::getSeriesCount() const +{ + return m_aSeriesVector.size(); +} + +void VDataSeriesGroup::setSums( double fPositiveSum, double fNegativeSum ) +{ + m_fPositiveSum = fPositiveSum; + m_fNegativeSum = fNegativeSum; + m_bSumValuesDirty = false; +} + +bool VDataSeriesGroup::getSums( double& rfPositiveSum, double& rfNegativeSum ) const +{ + if(m_bSumValuesDirty) + return false; + rfPositiveSum = m_fPositiveSum; + rfNegativeSum = m_fNegativeSum; + return true; +} + +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- + +VSeriesPlotter::VSeriesPlotter( sal_Int32 nDimension ) + : PlotterBase( nDimension ) + , m_aXSlots() +{ +} + +VSeriesPlotter::~VSeriesPlotter() +{ + //delete all data series help objects: + ::std::vector< VDataSeriesGroup >::iterator aXSlotIter = m_aXSlots.begin(); + const ::std::vector< VDataSeriesGroup >::const_iterator aXSlotEnd = m_aXSlots.end(); + for( ; aXSlotIter != aXSlotEnd; aXSlotIter++ ) + { + aXSlotIter->deleteSeries(); + } + m_aXSlots.clear(); +} + +//shape property -- chart model object property +tMakePropertyNameMap VSeriesPlotter::m_aShapePropertyMapForArea = + tMakePropertyNameMap + //area properties + ( C2U( UNO_NAME_FILLSTYLE ), C2U("FillStyle") ) + ( C2U( UNO_NAME_FILLCOLOR ), C2U("Color") ) + ( C2U(UNO_NAME_FILLGRADIENT), C2U("Gradient") ) + ( C2U(UNO_NAME_FILL_TRANSPARENCE), C2U("Transparency") ) + ( C2U("FillTransparenceGradient"), C2U("TransparencyGradient") ) + ( C2U(UNO_NAME_FILLHATCH), C2U("Hatch") ) + //line properties + ( C2U(UNO_NAME_LINESTYLE), C2U("BorderStyle") ) + ( C2U(UNO_NAME_LINECOLOR), C2U("BorderColor") ) + ( C2U(UNO_NAME_LINEWIDTH), C2U("BorderWidth") ) + ( C2U(UNO_NAME_LINEDASH), C2U("BorderDash") ) + ( C2U(UNO_NAME_LINETRANSPARENCE), C2U("BorderTransparency") ) + ; + +void VSeriesPlotter::addSeries( VDataSeries* pSeries, sal_Int32 xSlot,sal_Int32 ySlot ) +{ + //take ownership of pSeries + + DBG_ASSERT( pSeries, "series to add is NULL" ); + if(!pSeries) + return; + + if(xSlot<0 || xSlot>=static_cast<sal_Int32>(m_aXSlots.size())) + { + //append the series to already existing x series + m_aXSlots.push_back( VDataSeriesGroup(pSeries) ); + } + else + { + //x slot is already occupied + //y slot decides what to do: + + VDataSeriesGroup& rYSlots = m_aXSlots[xSlot]; + sal_Int32 nYSlotCount = rYSlots.getSeriesCount(); + + if( ySlot < -1 ) + { + //move all existing series in the xSlot to next slot + //@todo + DBG_ASSERT(0,"Not implemented yet"); + } + else if( ySlot == -1 || ySlot >= nYSlotCount) + { + //append the series to already existing y series + rYSlots.addSeries(pSeries); + } + else + { + //y slot is already occupied + //insert at given y and x position + + //@todo + DBG_ASSERT(0,"Not implemented yet"); + } + } +} + +uno::Reference< drawing::XShapes > VSeriesPlotter::getSeriesGroupShape( VDataSeries* pDataSeries + , const uno::Reference< drawing::XShapes >& xTarget ) +{ + if(pDataSeries->m_xShape.is()) + { + return uno::Reference<drawing::XShapes>( pDataSeries->m_xShape, uno::UNO_QUERY ); + } + + //create a group shape for this series and add to logic target: + uno::Reference< drawing::XShapes > xShapes( + createGroupShape( xTarget,pDataSeries->getCID() )); + uno::Reference<drawing::XShape> xShape = + uno::Reference<drawing::XShape>( xShapes, uno::UNO_QUERY ); + pDataSeries->m_xShape.set(xShape); + return xShapes; +} + +uno::Reference< drawing::XShapes > VSeriesPlotter::getLabelsGroupShape( VDataSeries* pDataSeries + , const uno::Reference< drawing::XShapes >& xTarget ) +{ + if(pDataSeries->m_xLabelsShape.is()) + { + return uno::Reference<drawing::XShapes>( pDataSeries->m_xLabelsShape, uno::UNO_QUERY ); + } + //create a group shape for this series and add to logic target: + uno::Reference< drawing::XShapes > xShapes( + createGroupShape( xTarget,pDataSeries->getLabelsCID() )); + uno::Reference<drawing::XShape> xShape = + uno::Reference<drawing::XShape>( xShapes, uno::UNO_QUERY ); + pDataSeries->m_xLabelsShape.set(xShape); + return xShapes; + +} + +void VSeriesPlotter::createDataLabel( const uno::Reference< drawing::XShapes >& xTarget + , const VDataSeries& rDataSeries + , sal_Int32 nPointIndex + , double fValue + , double fSumValue + , const awt::Point& rScreenPosition2D ) +{ + //check wether the label needs to be created and how: + DataCaptionStyle* pCaption = rDataSeries.getDataCaptionStyle( nPointIndex ); + + if( !pCaption || (!pCaption->ShowNumber && !pCaption->ShowNumberInPercent + && !pCaption->ShowCategoryName && !pCaption->ShowLegendSymbol ) ) + return; + + //------------------------------------------------ + //prepare text + ::rtl::OUStringBuffer aText; + { + if(pCaption->ShowNumberInPercent) + { + fValue = fValue*100.0/fSumValue; + sal_Int32 nRound = fValue*100; + fValue = nRound/100.0; + if( fValue < 0 ) + fValue*=-1.0; + } + if(pCaption->ShowCategoryName) + aText.append( rDataSeries.getCategoryString(nPointIndex) ); + + if(pCaption->ShowNumber || pCaption->ShowNumberInPercent) + { + if(aText.getLength()) + aText.append(sal_Unicode(' ')); + + //@todo as default use numberformat and formatter from calc fro this range + sal_Unicode cDecSeparator = '.';//@todo get this locale dependent + aText.append( ::rtl::math::doubleToUString( fValue + , rtl_math_StringFormat_G //rtl_math_StringFormat + , 3// DecPlaces + , cDecSeparator + //,sal_Int32 const * pGroups + //,sal_Unicode cGroupSeparator + ,false //bEraseTrailingDecZeros + ) ); + } + if(pCaption->ShowNumberInPercent) + aText.append(sal_Unicode('%')); + } + //------------------------------------------------ + //prepare properties for multipropertyset-interface of shape + tNameSequence* pPropNames; + tAnySequence* pPropValues; + if( !rDataSeries.getTextLabelMultiPropertyLists( nPointIndex, pPropNames, pPropValues ) ) + return; + uno::Any* pCIDAny = PropertyMapper::getValuePointer(*pPropValues,*pPropNames,C2U("Name")); + if(pCIDAny) + { + rtl::OUString aCID = ObjectIdentifier::createPointCID( rDataSeries.getLabelCID_Stub(),nPointIndex ); + *pCIDAny = uno::makeAny(aCID); + } + //------------------------------------------------ + + //create text shape + uno::Reference< drawing::XShape > xTextShape = ShapeFactory(m_xShapeFactory). + createText( xTarget, aText.makeStringAndClear() + , *pPropNames, *pPropValues + , ShapeFactory::makeTransformation( rScreenPosition2D ) ); +} + +void VSeriesPlotter::setMappedProperties( + const uno::Reference< drawing::XShape >& xTargetShape + , const uno::Reference< beans::XPropertySet >& xSource + , const tPropertyNameMap& rMap ) +{ + uno::Reference< beans::XPropertySet > xTargetProp( xTargetShape, uno::UNO_QUERY ); + PropertyMapper::setMappedProperties(xTargetProp,xSource,rMap); +} + +//------------------------------------------------------------------------- +// MinimumAndMaximumSupplier +//------------------------------------------------------------------------- + +double VSeriesPlotter::getMinimumX() +{ + //this is the default for all category charts + //@todo for other types + return -0.5; +} +double VSeriesPlotter::getMaximumX() +{ + //this is the default for all category charts + //@todo for other types + + //return category count + sal_Int32 nPointCount = getPointCount( m_aXSlots ); + return nPointCount-0.5; +} + +double VSeriesPlotter::getMinimumYInRange( double fMinimumX, double fMaximumX ) +{ + double fMinimum, fMaximum; + ::rtl::math::setInf(&fMinimum, false); + ::rtl::math::setInf(&fMaximum, true); + for(sal_Int32 nN =0; nN<m_aXSlots.size();nN++ ) + { + double fLocalMinimum, fLocalMaximum; + if( m_aXSlots[nN].calculateYMinAndMaxForCategoryRange( + static_cast<sal_Int32>(fMinimumX+0.5) + , static_cast<sal_Int32>(fMaximumX+0.5) + , fLocalMinimum, fLocalMaximum ) ) + { + if(fMaximum<fLocalMaximum) + fMaximum=fLocalMaximum; + if(fMinimum>fLocalMinimum) + fMinimum=fLocalMinimum; + } + } + if(::rtl::math::isInf(fMinimum)) + ::rtl::math::setNan(&fMinimum); + return fMinimum; +} + +double VSeriesPlotter::getMaximumYInRange( double fMinimumX, double fMaximumX ) +{ + double fMinimum, fMaximum; + ::rtl::math::setInf(&fMinimum, false); + ::rtl::math::setInf(&fMaximum, true); + for(sal_Int32 nN =0; nN<m_aXSlots.size();nN++ ) + { + double fLocalMinimum, fLocalMaximum; + if( m_aXSlots[nN].calculateYMinAndMaxForCategoryRange( + static_cast<sal_Int32>(fMinimumX+0.5) + , static_cast<sal_Int32>(fMaximumX+0.5) + , fLocalMinimum, fLocalMaximum ) ) + { + if(fMaximum<fLocalMaximum) + fMaximum=fLocalMaximum; + if(fMinimum>fLocalMinimum) + fMinimum=fLocalMinimum; + } + } + if(::rtl::math::isInf(fMaximum)) + ::rtl::math::setNan(&fMaximum); + return fMaximum; +} + +//static +sal_Int32 VSeriesPlotter::getPointCount( const ::std::vector< VDataSeriesGroup >& rSlots ) +{ + sal_Int32 nRet = 0; + + ::std::vector< VDataSeriesGroup >::const_iterator aXSlotIter = rSlots.begin(); + const ::std::vector< VDataSeriesGroup >::const_iterator aXSlotEnd = rSlots.end(); + + for( ; aXSlotIter != aXSlotEnd; aXSlotIter++ ) + { + sal_Int32 nPointCount = getPointCount( *aXSlotIter ); + if( nPointCount>nRet ) + nRet = nPointCount; + } + return nRet; +} + +//static +sal_Int32 VSeriesPlotter::getPointCount( const VDataSeriesGroup& rSeriesGroup ) +{ + sal_Int32 nRet = 0; + + const ::std::vector< VDataSeries* >* pSeriesList = &(rSeriesGroup.m_aSeriesVector); + + ::std::vector< VDataSeries* >::const_iterator aSeriesIter = pSeriesList->begin(); + const ::std::vector< VDataSeries* >::const_iterator aSeriesEnd = pSeriesList->end(); + + for( ; aSeriesIter != aSeriesEnd; aSeriesIter++ ) + { + sal_Int32 nPointCount = (*aSeriesIter)->getTotalPointCount(); + if( nPointCount>nRet ) + nRet = nPointCount; + } + return nRet; +} + +void VDataSeriesGroup::calculateYSumsForCategory( sal_Int32 nCategoryIndex + , double& rfPositiveSum, double& rfNegativeSum ) +{ + //@todo maybe cach these values + + ::std::vector< VDataSeries* >* pSeriesList = &this->m_aSeriesVector; + + ::std::vector< VDataSeries* >::const_iterator aSeriesIter = pSeriesList->begin(); + const ::std::vector< VDataSeries* >::const_iterator aSeriesEnd = pSeriesList->end(); + + double fLogicPositiveYSum = 0.0; + double fLogicNegativeYSum = 0.0; + for( ; aSeriesIter != aSeriesEnd; aSeriesIter++ ) + { + double fY = (*aSeriesIter)->getY( nCategoryIndex ); + if( ::rtl::math::isNan(fY) ) + continue; + if(fY>=0) + fLogicPositiveYSum+=fY; + else + fLogicNegativeYSum+=fY; + } + + rfPositiveSum = fLogicPositiveYSum; + rfNegativeSum = fLogicNegativeYSum; +} + +bool VDataSeriesGroup::calculateYMinAndMaxForCategoryRange( + sal_Int32 nStartCategoryIndex, sal_Int32 nEndCategoryIndex + , double& rfMinimum, double& rfMaximum ) +{ + //return true if valid values were found otherwise false + + //@todo maybe cache these values + ::rtl::math::setInf(&rfMinimum, false); + ::rtl::math::setInf(&rfMaximum, true); + + double fPositiveValue=0.0, fNegativeValue=0.0; + //iterate through the given categories + if(nStartCategoryIndex<0) + nStartCategoryIndex=0; + if(nEndCategoryIndex<0) + nEndCategoryIndex=0; + for( sal_Int32 nCatIndex = nStartCategoryIndex; nCatIndex < nEndCategoryIndex; nCatIndex++ ) + { + this->calculateYSumsForCategory( nCatIndex, fPositiveValue, fNegativeValue ); + if(rfMaximum<fPositiveValue) + rfMaximum=fPositiveValue; + if(rfMinimum>fNegativeValue) + rfMinimum=fNegativeValue; + } + return !::rtl::math::isInf( rfMinimum ) && !::rtl::math::isInf( rfMaximum ); +} + +//static +VSeriesPlotter* VSeriesPlotter::createSeriesPlotter( const rtl::OUString& rChartType, sal_Int32 nDimension ) +{ + //@todo: in future the plotter should be instanciated via service factory + VSeriesPlotter* pRet=NULL; + if( rChartType.equalsIgnoreAsciiCase(C2U("com.sun.star.chart2.BarChart")) ) + pRet = new BarChart(nDimension); + else if( rChartType.equalsIgnoreAsciiCase(C2U("com.sun.star.chart2.AreaChart")) ) + pRet = new AreaChart(nDimension); + else if( rChartType.equalsIgnoreAsciiCase(C2U("com.sun.star.chart2.PieChart")) ) + pRet = new PieChart(nDimension); + else + { + //@todo create other charttypes + //com.sun.star.chart2.LineChart? + //com.sun.star.chart2.NetChart? + //com.sun.star.chart2.ScatterChart? + pRet = new BarChart(nDimension); + } + + return pRet; +} + +//............................................................................. +} //namespace chart +//............................................................................. diff --git a/chart2/source/view/charttypes/makefile.mk b/chart2/source/view/charttypes/makefile.mk new file mode 100644 index 000000000..c5d53fcde --- /dev/null +++ b/chart2/source/view/charttypes/makefile.mk @@ -0,0 +1,86 @@ +#************************************************************************* +# +# $RCSfile: makefile.mk,v $ +# +# $Revision: 1.1.1.1 $ +# +# last change: $Author: bm $ $Date: 2003-10-06 09:58:34 $ +# +# The Contents of this file are made available subject to the terms of +# either of the following licenses +# +# - GNU Lesser General Public License Version 2.1 +# - Sun Industry Standards Source License Version 1.1 +# +# Sun Microsystems Inc., October, 2000 +# +# GNU Lesser General Public License Version 2.1 +# ============================================= +# Copyright 2000 by Sun Microsystems, Inc. +# 901 San Antonio Road, Palo Alto, CA 94303, USA +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License version 2.1, as published by the Free Software Foundation. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# +# +# Sun Industry Standards Source License Version 1.1 +# ================================================= +# The contents of this file are subject to the Sun Industry Standards +# Source License Version 1.1 (the "License"); You may not use this file +# except in compliance with the License. You may obtain a copy of the +# License at http://www.openoffice.org/license.html. +# +# Software provided under this License is provided on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, +# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, +# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. +# See the License for the specific provisions governing your rights and +# obligations concerning the Software. +# +# The Initial Developer of the Original Code is: Sun Microsystems, Inc. +# +# Copyright: 2000 by Sun Microsystems, Inc. +# +# All Rights Reserved. +# +# Contributor(s): _______________________________________ +# +# +# +#************************************************************************* + +PRJ= ..$/..$/.. +PRJINC= $(PRJ)$/source +PRJNAME= chart2 +TARGET= chvtypes + +ENABLE_EXCEPTIONS= TRUE + +# --- Settings ----------------------------------------------------- + +.INCLUDE: settings.mk + +# --- export library ------------------------------------------------- + +#object files to build and link together to lib $(SLB)$/$(TARGET).lib +SLOFILES = $(SLO)$/TransformationHelper.obj \ + $(SLO)$/CategoryPositionHelper.obj \ + $(SLO)$/VSeriesPlotter.obj \ + $(SLO)$/BarChart.obj \ + $(SLO)$/PieChart.obj \ + $(SLO)$/AreaChart.obj + +# --- Targets ----------------------------------------------------------------- + +.INCLUDE: target.mk diff --git a/chart2/source/view/diagram/VDiagram.cxx b/chart2/source/view/diagram/VDiagram.cxx new file mode 100644 index 000000000..562cad6db --- /dev/null +++ b/chart2/source/view/diagram/VDiagram.cxx @@ -0,0 +1,562 @@ +/************************************************************************* + * + * $RCSfile: VDiagram.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:34 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "VDiagram.hxx" +//#include "DebugHelper.hxx" +#include "PropertyMapper.hxx" +#include "CommonConverters.hxx" +#include "ViewDefines.hxx" +#include "Stripe.hxx" +#include "macros.hxx" + +#ifndef _SVX_UNOPRNMS_HXX +#include <svx/unoprnms.hxx> +#endif + +#ifndef _TOOLS_COLOR_HXX +#include <tools/color.hxx> +#endif + +#ifndef _TOOLS_DEBUG_HXX +#include <tools/debug.hxx> +#endif + +#ifndef _COM_SUN_STAR_DRAWING_PROJECTIONMODE_HPP_ +#include <com/sun/star/drawing/ProjectionMode.hpp> +#endif +#ifndef _COM_SUN_STAR_DRAWING_SHADEMODE_HPP_ +#include <com/sun/star/drawing/ShadeMode.hpp> +#endif + +//............................................................................. +namespace chart +{ +//............................................................................. +using namespace ::com::sun::star; +using namespace ::drafts::com::sun::star::chart2; + +VDiagram::VDiagram( + const uno::Reference< XDiagram > & xDiagram, + sal_Int32 nDimension, sal_Bool bPolar ) + : m_xLogicTarget(NULL) + , m_xFinalTarget(NULL) + , m_xShapeFactory(NULL) + , m_pShapeFactory(NULL) + , m_xOuterGroupShape(NULL) + , m_xCoordinateRegionShape(NULL) + , m_oSceneMatrix() + , m_nDimension(nDimension) + , m_bPolar(bPolar) + , m_xDiagram(xDiagram) +{ + +} + +VDiagram::~VDiagram() +{ + delete m_pShapeFactory; +} + +void SAL_CALL VDiagram::init( + const uno::Reference< drawing::XShapes >& xLogicTarget + , const uno::Reference< drawing::XShapes >& xFinalTarget + , const uno::Reference< lang::XMultiServiceFactory >& xFactory ) +{ + DBG_ASSERT(xLogicTarget.is()&&xFinalTarget.is()&&xFactory.is(),"no proper initialization parameters"); + + m_xLogicTarget = xLogicTarget; + m_xFinalTarget = xFinalTarget; + m_xShapeFactory = xFactory; + m_pShapeFactory = new ShapeFactory(xFactory); +} + +void VDiagram::setSceneMatrix( const drawing::HomogenMatrix& rMatrix ) +{ + m_oSceneMatrix = rMatrix; +} + +void VDiagram::createShapes( const awt::Point& rPos, const awt::Size& rSize ) +{ + if( m_nDimension == 3 ) + createShapes_3d( rPos, rSize ); + else + createShapes_2d( rPos, rSize ); +} + +// const sal_Int32 nWallColor = 0xb0d8e8; //Color(COL_LIGHTGRAY).GetColor(); +// const sal_Int32 nWallColor = 0xf5fffa; // mint cream +// const sal_Int32 nWallColor = 0xc6e2ff; // SlateGray1 +const sal_Int32 nWallColor = 0xe0eeee; // azure2 +const sal_Int32 nWallTransparency = 90; + +namespace +{ +tPropertyNameMap & lcl_GetWallPropertyMap() +{ + static tPropertyNameMap aWallPropertyMap( + tMakePropertyNameMap + ( C2U( "FillStyle" ), C2U( "FillStyle" ) ) + ( C2U( "FillColor" ), C2U( "FillColor" ) ) + ( C2U( "FillTransparence" ), C2U( "FillTransparence" ) ) + ( C2U( "FillGradient" ), C2U( "FillGradient" ) ) + ( C2U( "FillHatch" ), C2U( "FillHatch" ) ) + ( C2U( "LineStyle" ), C2U( "LineStyle" ) ) + ( C2U( "LineWidth" ), C2U( "LineWidth" ) ) + ( C2U( "LineDash" ), C2U( "LineDash" ) ) + ( C2U( "LineColor" ), C2U( "LineColor" ) ) + ( C2U( "LineTransparence" ), C2U( "LineTransparence" ) ) + ( C2U( "LineJoint" ), C2U( "LineJoint" ) ) + ); + + return aWallPropertyMap; +}; +} // anonymous namespace + +void VDiagram::createShapes_2d( const awt::Point& rPos, const awt::Size& rSize ) +{ + DBG_ASSERT(m_pShapeFactory&&m_xLogicTarget.is()&&m_xFinalTarget.is()&&m_xShapeFactory.is(),"is not proper initialized"); + if(!(m_pShapeFactory&&m_xLogicTarget.is()&&m_xFinalTarget.is()&&m_xShapeFactory.is())) + return; + + //create group shape + uno::Reference< drawing::XShapes > xOuterGroup_Shapes = m_pShapeFactory->createGroup2D(m_xLogicTarget,C2U("CID/Diagram=XXX_CID"));//@todo read CID from model + m_xOuterGroupShape = uno::Reference<drawing::XShape>( xOuterGroup_Shapes, uno::UNO_QUERY ); + + //--------------------------- + //add back wall + { + uno::Reference< drawing::XShape > xShape2D( + m_xShapeFactory->createInstance( C2U( + "com.sun.star.drawing.RectangleShape" ) ), uno::UNO_QUERY ); + xShape2D->setPosition(awt::Point(0,0)); + xShape2D->setSize(awt::Size(FIXED_SIZE_FOR_3D_CHART_VOLUME,FIXED_SIZE_FOR_3D_CHART_VOLUME)); + xOuterGroup_Shapes->add(xShape2D); + uno::Reference< beans::XPropertySet > xProp( xShape2D, uno::UNO_QUERY ); + if( xProp.is()) + { + try + { + if( m_xDiagram.is() ) + { + uno::Reference< beans::XPropertySet > xWallProp( m_xDiagram->getWall()); + if( xWallProp.is()) + PropertyMapper::setMappedProperties( xProp, xWallProp, lcl_GetWallPropertyMap() ); + } + else + { + DBG_ERROR( "Invalid Diagram model" ); + //Transparency + xProp->setPropertyValue( C2U( UNO_NAME_FILL_TRANSPARENCE ) + , uno::makeAny( (sal_Int16)nWallTransparency ) ); + //xProp->setPropertyValue( C2U( UNO_NAME_LINETRANSPARENCE ) + // , uno::makeAny( (sal_Int16)100 ) ); + + //FillColor + xProp->setPropertyValue( C2U( UNO_NAME_FILLCOLOR ) + , uno::makeAny(nWallColor) ); + } + + //CID for selection handling + xProp->setPropertyValue( C2U( UNO_NAME_MISC_OBJ_NAME ) + , uno::makeAny( C2U("CID/DiagramWall=XXX_CID") ) ); + } + catch( uno::Exception& e ) + { + e; + } + } + + } + //--------------------------- + + m_xOuterGroupShape->setPosition(rPos); + m_xOuterGroupShape->setSize(rSize); + + //create independent group shape as container for datapoints and such things + { + uno::Reference< drawing::XShapes > xShapes = m_pShapeFactory->createGroup2D(m_xLogicTarget,C2U("testonly;CooContainer=XXX_CID")); + m_xCoordinateRegionShape = uno::Reference<drawing::XShape>( xShapes, uno::UNO_QUERY ); + } +} + +void VDiagram::createShapes_3d( const awt::Point& rPos, const awt::Size& rSize ) +{ + DBG_ASSERT(m_pShapeFactory&&m_xLogicTarget.is()&&m_xFinalTarget.is()&&m_xShapeFactory.is(),"is not proper initialized"); + if(!(m_pShapeFactory&&m_xLogicTarget.is()&&m_xFinalTarget.is()&&m_xShapeFactory.is())) + return; + + //create shape + m_xOuterGroupShape = uno::Reference< drawing::XShape >( + m_xShapeFactory->createInstance( C2U( + "com.sun.star.drawing.Shape3DSceneObject" ) ), uno::UNO_QUERY ); + m_xLogicTarget->add(m_xOuterGroupShape); + + //set properties + uno::Reference< beans::XPropertySet > xProp( m_xOuterGroupShape, uno::UNO_QUERY ); + DBG_ASSERT(xProp.is(), "created shape offers no XPropertySet"); + if( xProp.is()) + { + //set TransformationMatrix + uno::Any aTM = uno::Any( &m_oSceneMatrix, ::getCppuType((const drawing::HomogenMatrix*)0) ); + + sal_Int32 nDistance = (sal_Int32)FIXED_SIZE_FOR_3D_CHART_VOLUME*8; //(FIXED_SIZE_FOR_3D_CHART_VOLUME * 4) / 6 + sal_Int32 nFocalLen = nDistance*3; + + try + { + xProp->setPropertyValue( C2U( UNO_NAME_3D_TRANSFORM_MATRIX ), aTM ); + //uno::Any aCG = createDefaultCameraGeometry(); + //xProp->setPropertyValue( C2U( UNO_NAME_3D_CAMERA_GEOMETRY ), aCG ); + xProp->setPropertyValue( C2U( UNO_NAME_3D_SCENE_DISTANCE ), uno::makeAny(nDistance) ); + xProp->setPropertyValue( C2U( UNO_NAME_3D_SCENE_FOCAL_LENGTH ), uno::makeAny(nFocalLen) ); + xProp->setPropertyValue( C2U( UNO_NAME_3D_SCENE_PERSPECTIVE ), uno::makeAny(drawing::ProjectionMode_PERSPECTIVE) ); //ProjectionMode_PARALLEL + + + //default is Light 1 on, but we want to use the Light 2 as in the old chart (Light 2 is not specular by default) + xProp->setPropertyValue( C2U( UNO_NAME_3D_SCENE_LIGHTON_1 ), uno::makeAny((sal_Bool)false) ); + xProp->setPropertyValue( C2U( UNO_NAME_3D_SCENE_LIGHTON_2 ), uno::makeAny((sal_Bool)true) ); + + //(204,204,204); + uno::Any aAnyLightColor_1 = xProp->getPropertyValue( C2U( UNO_NAME_3D_SCENE_LIGHTCOLOR_1 ) ); + uno::Any aAnyLightDirection_1 = xProp->getPropertyValue( C2U( UNO_NAME_3D_SCENE_LIGHTDIRECTION_1 ) ); + + sal_Int32 nLightColor_1; aAnyLightColor_1 >>= nLightColor_1; + drawing::Direction3D aLightDirection_1; aAnyLightDirection_1 >>= aLightDirection_1; + + xProp->setPropertyValue( C2U( UNO_NAME_3D_SCENE_LIGHTCOLOR_2 ), aAnyLightColor_1 ); + xProp->setPropertyValue( C2U( UNO_NAME_3D_SCENE_LIGHTDIRECTION_2 ), uno::makeAny(drawing::Direction3D(1,1,1)) ); + + xProp->setPropertyValue( C2U( UNO_NAME_3D_SCENE_SHADE_MODE ), uno::makeAny(drawing::ShadeMode_PHONG) ); //FLAT, PHONG, SMOOTH, DRAFT + + //UNO_NAME_3D_SCENE_DISTANCE D3DSceneDistance sal_Int32 + //UNO_NAME_3D_SCENE_FOCAL_LENGTH sal_Int32 + //UNO_NAME_3D_SCENE_PERSPECTIVE drawing::ProjectionMode + + //UNO_NAME_3D_SCENE_AMBIENTCOLOR sal_Int32 + //UNO_NAME_3D_SCENE_LIGHTCOLOR_1 sal_Int32 + //UNO_NAME_3D_SCENE_LIGHTDIRECTION_1 drawing::Direction3D + //UNO_NAME_3D_SCENE_LIGHTON_1 Bool + //UNO_NAME_3D_SCENE_SHADOW_SLANT sal_Int16 + //UNO_NAME_3D_SCENE_SHADE_MODE drawing::ShadeMode + //UNO_NAME_3D_SCENE_TWO_SIDED_LIGHTING Bool + + //test only - CID for selection handling + xProp->setPropertyValue( C2U( UNO_NAME_MISC_OBJ_NAME ) + , uno::makeAny( C2U("testonly;3DScene=XXX_CID") ) ); + } + catch( uno::Exception& e ) + { + e; + } + } + m_xOuterGroupShape->setPosition(rPos); //FIXED_SIZE_FOR_3D_CHART_VOLUME + m_xOuterGroupShape->setSize(rSize); //FIXED_SIZE_FOR_3D_CHART_VOLUME + + + uno::Reference< drawing::XShapes > xOuterGroup_Shapes = + uno::Reference<drawing::XShapes>( m_xOuterGroupShape, uno::UNO_QUERY ); + + + xOuterGroup_Shapes = m_pShapeFactory->createGroup3D( xOuterGroup_Shapes, C2U("CID/Diagram=XXX_CID") ); + + //------------------------------------------------------------------------- + //create additional group to manipulate the aspect ratio of the whole diagram: + /* + { + uno::Reference< beans::XPropertySet > xProp( xOuterGroup_Shapes, uno::UNO_QUERY ); + DBG_ASSERT(xProp.is(), "created shape offers no XPropertySet"); + if( xProp.is()) + { + try + { + Matrix4D aM4; + double CatsFactor = 15.0;//@todo needs to be calculated from seriescount and slot distance ... + aM4.Scale(1.0, 1.0, 1.0/CatsFactor); + xProp->setPropertyValue( C2U( UNO_NAME_3D_TRANSFORM_MATRIX ) + , uno::makeAny(Matrix4DToHomogenMatrix(aM4)) ); + } + catch( uno::Exception& e ) + { + e; + } + } + } + */ + + //--------------------------- + + //add floor plate + { + uno::Reference< drawing::XShape > xShape = + m_pShapeFactory->createCube(xOuterGroup_Shapes, + DataPointGeometry( drawing::Position3D(FIXED_SIZE_FOR_3D_CHART_VOLUME/2.0,0,FIXED_SIZE_FOR_3D_CHART_VOLUME/2.0) + ,drawing::Direction3D(FIXED_SIZE_FOR_3D_CHART_VOLUME,FLOOR_THICKNESS,FIXED_SIZE_FOR_3D_CHART_VOLUME) ) + , ShapeAppearance( Color(COL_LIGHTGRAY).GetColor(), 0 ) ); + ShapeFactory::setShapeName( xShape, C2U("CID/DiagramFloor=XXX_CID") ); + } + + //add left wall + { + uno::Reference< drawing::XShape > xShape = + m_pShapeFactory->createStripe(xOuterGroup_Shapes + , Stripe( + drawing::Position3D(0,0,FIXED_SIZE_FOR_3D_CHART_VOLUME) + , drawing::Direction3D(0,0,-FIXED_SIZE_FOR_3D_CHART_VOLUME) + , drawing::Direction3D(0,FIXED_SIZE_FOR_3D_CHART_VOLUME,0) ) + , ShapeAppearance( nWallColor, nWallTransparency ) + , false ); + ShapeFactory::setShapeName( xShape, C2U("CID/DiagramWall=XXX_CID") ); + } + //add back wall + { + uno::Reference< drawing::XShape > xShape = + m_pShapeFactory->createStripe(xOuterGroup_Shapes + , Stripe( + drawing::Position3D(0,0,0) + , drawing::Direction3D(FIXED_SIZE_FOR_3D_CHART_VOLUME,0,0) + , drawing::Direction3D(0,FIXED_SIZE_FOR_3D_CHART_VOLUME,0) ) + , ShapeAppearance( nWallColor, nWallTransparency ) + , false ); + ShapeFactory::setShapeName( xShape, C2U("CID/DiagramWall=XXX_CID") ); + } + //--------------------------- + + //create an additional scene for the smaller inner coordinate region: + { + uno::Reference< drawing::XShapes > xShapes = m_pShapeFactory->createGroup3D( xOuterGroup_Shapes,C2U("testonly;CooContainer=XXX_CID") ); + m_xCoordinateRegionShape = uno::Reference< drawing::XShape >( xShapes, uno::UNO_QUERY ); + + uno::Reference< beans::XPropertySet > xProp( m_xCoordinateRegionShape, uno::UNO_QUERY ); + DBG_ASSERT(xProp.is(), "created shape offers no XPropertySet"); + if( xProp.is()) + { + try + { + double fXScale = (FIXED_SIZE_FOR_3D_CHART_VOLUME -GRID_TO_WALL_DISTANCE) /FIXED_SIZE_FOR_3D_CHART_VOLUME; + double fYScale = (FIXED_SIZE_FOR_3D_CHART_VOLUME -FLOOR_THICKNESS ) /FIXED_SIZE_FOR_3D_CHART_VOLUME; + double fZScale = (FIXED_SIZE_FOR_3D_CHART_VOLUME -GRID_TO_WALL_DISTANCE) /FIXED_SIZE_FOR_3D_CHART_VOLUME; + + Matrix4D aM4; + aM4.Translate(GRID_TO_WALL_DISTANCE/fXScale, FLOOR_THICKNESS/fYScale, GRID_TO_WALL_DISTANCE/fZScale); + aM4.Scale( fXScale, fYScale, fZScale ); + xProp->setPropertyValue( C2U( UNO_NAME_3D_TRANSFORM_MATRIX ) + , uno::makeAny(Matrix4DToHomogenMatrix(aM4)) ); + } + catch( uno::Exception& e ) + { + e; + } + } + } + + //--------------------------- + {//only test + + //only test: create grey borders as replacement for axes + /* + uno::Reference< drawing::XShapes > xTarget( m_xCoordinateRegionShape, uno::UNO_QUERY ); + m_pShapeFactory->createCube(xTarget, + DataPointGeometry( drawing::Position3D(FIXED_SIZE_FOR_3D_CHART_VOLUME/2,0,FIXED_SIZE_FOR_3D_CHART_VOLUME-50) + ,drawing::Direction3D(FIXED_SIZE_FOR_3D_CHART_VOLUME,100,100) ) + , ShapeAppearance( Color(COL_LIGHTGRAY).GetColor() ) ); + m_pShapeFactory->createCube(xTarget, + DataPointGeometry( drawing::Position3D(50,0,FIXED_SIZE_FOR_3D_CHART_VOLUME/2) + ,drawing::Direction3D(100,100,FIXED_SIZE_FOR_3D_CHART_VOLUME) ) + , ShapeAppearance( Color(COL_LIGHTGRAY).GetColor() ) ); + m_pShapeFactory->createCube(xTarget, + DataPointGeometry( drawing::Position3D(50,0,FIXED_SIZE_FOR_3D_CHART_VOLUME-50) + ,drawing::Direction3D(100,FIXED_SIZE_FOR_3D_CHART_VOLUME,100) ) + , ShapeAppearance( Color(COL_LIGHTGRAY).GetColor() ) ); + m_pShapeFactory->createCube(xTarget, + DataPointGeometry( drawing::Position3D(50,0,50) + ,drawing::Direction3D(100,FIXED_SIZE_FOR_3D_CHART_VOLUME,100) ) + , ShapeAppearance( Color(COL_LIGHTGRAY).GetColor() ) ); + + m_pShapeFactory->createCube(xTarget, + DataPointGeometry( drawing::Position3D(FIXED_SIZE_FOR_3D_CHART_VOLUME-50,0,FIXED_SIZE_FOR_3D_CHART_VOLUME-50) + ,drawing::Direction3D(100,FIXED_SIZE_FOR_3D_CHART_VOLUME,100) ) + , ShapeAppearance( Color(COL_LIGHTGRAY).GetColor() ) ); + m_pShapeFactory->createCube(xTarget, + DataPointGeometry( drawing::Position3D(FIXED_SIZE_FOR_3D_CHART_VOLUME-50,0,50) + ,drawing::Direction3D(100,FIXED_SIZE_FOR_3D_CHART_VOLUME,100) ) + , ShapeAppearance( Color(COL_LIGHTGRAY).GetColor() ) ); + */ + } + +} + +uno::Reference< drawing::XShapes > VDiagram::getCoordinateRegion() +{ + return uno::Reference<drawing::XShapes>( m_xCoordinateRegionShape, uno::UNO_QUERY ); +} + + + + +/* +uno::Any createDefaultCameraGeometry( ) +{ + long nX = 0; + long nY = 0; + long nW = (long)FIXED_SIZE_FOR_3D_CHART_VOLUME; + long nH = (long)FIXED_SIZE_FOR_3D_CHART_VOLUME; + long nZ = (long)((FIXED_SIZE_FOR_3D_CHART_VOLUME * 4.0) / 6.0); + long nDepth = -nZ; +*/ + /* + //defaults: + double fFocalLen = 80.0; //UNO_NAME_3D_SCENE_FOCAL_LENGTH sal_Int32 + //UNO_NAME_3D_SCENE_AMBIENTCOLOR sal_Int32 + //UNO_NAME_3D_SCENE_PERSPECTIVE drawing::ProjectionMode + double fTiltAng = DEG2RAD(-(double)nZAngle / 10.0); + */ + +// drawing::CameraGeometry aRet; + // Vector3D aCamPosition(nX + nW/2, nH/2, nW/2); + // Vector3D aLookDirection(nX + nW/2, nH/2, nDepth/2) ; + //Vector3D aVUP; + + + /* + Vector3D aCamPosition(0, 0, 400); + Vector3D aLookDirection(0,0,1) ; + Vector3D aVUP(1,1,0); + */ +/* + Vector3D aCamPosition(0, 0, 0); + Vector3D aLookDirection(0,0,0) ; + Vector3D aVUP(0,0,0); + + aRet.vrp.PositionX = aCamPosition.X(); //ViewReferencePoint (Point on the View plane) + aRet.vrp.PositionY = aCamPosition.Y(); + aRet.vrp.PositionZ = aCamPosition.Z(); + aRet.vpn.DirectionX = aLookDirection.X(); //ViewPlaneNormal (Normal to the View Plane) + aRet.vpn.DirectionY = aLookDirection.Y(); + aRet.vpn.DirectionZ = aLookDirection.Z(); +*/ + //on the view plane there is a '3D viewing-reference coordinate (VCR) system' with VRP as origin + //and orthogonal axes n,v,u (v and u in the view plane) +/* aRet.vup.DirectionX = aVUP.X(); //view up vector; determines the v-axis direction on the view plane as projection of VUP parallel to VPN onto th view pane + aRet.vup.DirectionY = aVUP.Y(); + aRet.vup.DirectionZ = aVUP.Z(); +*/ + //a window is defined on the view plane with minimum and maximum v and u values + //...where to set via uno?? + +// return uno::Any(&aRet, ::getCppuType((const drawing::CameraGeometry*)0) ); + /* + -------------- + Camera3D aCam(pScene->GetCamera()); + Vector3D aCamPos(nX + nW/2, nH/2, nW/2); + Vector3D aLookAt(nX + nW/2, nH/2, nDepth/2); + aCam.SetViewWindow(-nW/2, -nH/2, nW, nH); + aCam.SetDefaults(aCamPos, aLookAt, 80, DEG2RAD(-(double)nZAngle / 10.0)); + //double fFocalLen = 35.0, double fBankAng = 0); + aCam.Reset(); + aCam.SetProjection(eProjection); + aCam.RotateAroundLookAt(DEG2RAD((double)nYAngle / 10.0), DEG2RAD((double)nXAngle / 10.0)); + aCam.SetAspectMapping(AS_HOLD_SIZE); + pScene->SetCamera(aCam); + -------------- + // copy lightsource 1 (Base3DLight0) to lightsource 2 + // color + SetItem( Svx3DLightcolor2Item( GetLightGroup().GetIntensity( Base3DMaterialDiffuse, Base3DLight0 ))); + // direction + SetItem( Svx3DLightDirection2Item( GetLightGroup().GetDirection( Base3DLight0 ))); + + // enable light source 2 + SetItem( Svx3DLightOnOff2Item( TRUE )); + // disable light source 1 + SetItem( Svx3DLightOnOff1Item( FALSE )); + */ +//} + + +/* +void DebugHelper_ShowSceneProperties(uno::Reference< drawing::XShape > xShape) +{ + drawing::HomogenMatrix aMatrix; + drawing::CameraGeometry aCamera; + sal_Int32 nDistance = 0; + sal_Int32 nFocalLen = 0; + drawing::ProjectionMode ePerspective; + + uno::Reference< beans::XPropertySet > xProp( xShape, uno::UNO_QUERY ); + DBG_ASSERT(xProp.is(), "created shape offers no XPropertySet"); + if( xProp.is()) + { + xProp->getPropertyValue( rtl::OUString::createFromAscii( UNO_NAME_3D_TRANSFORM_MATRIX ) ) + >>= aMatrix; + xProp->getPropertyValue( rtl::OUString::createFromAscii( UNO_NAME_3D_CAMERA_GEOMETRY ) ) + >>= aCamera; + xProp->getPropertyValue( rtl::OUString::createFromAscii( UNO_NAME_3D_SCENE_DISTANCE ) ) + >>= nDistance; + xProp->getPropertyValue( rtl::OUString::createFromAscii( UNO_NAME_3D_SCENE_FOCAL_LENGTH ) ) + >>= nFocalLen; + xProp->getPropertyValue( rtl::OUString::createFromAscii( UNO_NAME_3D_SCENE_PERSPECTIVE ) ) + >>= ePerspective; + } +} +*/ + +//............................................................................. +} //namespace chart +//............................................................................. + diff --git a/chart2/source/view/diagram/makefile.mk b/chart2/source/view/diagram/makefile.mk new file mode 100644 index 000000000..4e694eb5f --- /dev/null +++ b/chart2/source/view/diagram/makefile.mk @@ -0,0 +1,82 @@ +#************************************************************************* +# +# $RCSfile: makefile.mk,v $ +# +# $Revision: 1.1.1.1 $ +# +# last change: $Author: bm $ $Date: 2003-10-06 09:58:34 $ +# +# The Contents of this file are made available subject to the terms of +# either of the following licenses +# +# - GNU Lesser General Public License Version 2.1 +# - Sun Industry Standards Source License Version 1.1 +# +# Sun Microsystems Inc., October, 2000 +# +# GNU Lesser General Public License Version 2.1 +# ============================================= +# Copyright 2000 by Sun Microsystems, Inc. +# 901 San Antonio Road, Palo Alto, CA 94303, USA +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License version 2.1, as published by the Free Software Foundation. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# +# +# Sun Industry Standards Source License Version 1.1 +# ================================================= +# The contents of this file are subject to the Sun Industry Standards +# Source License Version 1.1 (the "License"); You may not use this file +# except in compliance with the License. You may obtain a copy of the +# License at http://www.openoffice.org/license.html. +# +# Software provided under this License is provided on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, +# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, +# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. +# See the License for the specific provisions governing your rights and +# obligations concerning the Software. +# +# The Initial Developer of the Original Code is: Sun Microsystems, Inc. +# +# Copyright: 2000 by Sun Microsystems, Inc. +# +# All Rights Reserved. +# +# Contributor(s): _______________________________________ +# +# +# +#************************************************************************* + +PRJ= ..$/..$/.. +PRJINC= $(PRJ)$/source +PRJNAME= chart2 +TARGET= chvdiagram + +ENABLE_EXCEPTIONS= TRUE + +# --- Settings ----------------------------------------------------- + +.INCLUDE: settings.mk + +# --- export library ------------------------------------------------- + +#object files to build and link together to lib $(SLB)$/$(TARGET).lib +SLOFILES = $(SLO)$/VDiagram.obj + +# --- Targets ----------------------------------------------------------------- + +.INCLUDE: target.mk + diff --git a/chart2/source/view/exports.flt b/chart2/source/view/exports.flt new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/chart2/source/view/exports.flt diff --git a/chart2/source/view/inc/Linear3DTransformation.hxx b/chart2/source/view/inc/Linear3DTransformation.hxx new file mode 100644 index 000000000..7fe7bb652 --- /dev/null +++ b/chart2/source/view/inc/Linear3DTransformation.hxx @@ -0,0 +1,108 @@ +/************************************************************************* + * + * $RCSfile: Linear3DTransformation.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:33 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2002 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef _CHART_LINEAR3DTRANSFORMATION_HXX +#define _CHART_LINEAR3DTRANSFORMATION_HXX + +#ifndef _CPPUHELPER_IMPLBASE1_HXX_ +#include <cppuhelper/implbase1.hxx> +#endif + +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XTRANSFORMATION_HPP_ +#include <drafts/com/sun/star/chart2/XTransformation.hpp> +#endif + +#ifndef _COM_SUN_STAR_DRAWING_HOMOGENMATRIX_HPP_ +#include <com/sun/star/drawing/HomogenMatrix.hpp> +#endif + +namespace chart +{ + +class Linear3DTransformation : public ::cppu::WeakImplHelper1< + ::drafts::com::sun::star::chart2::XTransformation + > +{ +public: + Linear3DTransformation( const ::com::sun::star::drawing::HomogenMatrix& rHomMatrix ); + virtual ~Linear3DTransformation(); + + // ____ XTransformation ____ + /// @see ::drafts::com::sun::star::chart2::XTransformation + virtual ::com::sun::star::uno::Sequence< double > SAL_CALL transform( + const ::com::sun::star::uno::Sequence< double >& rSourceValues ) + throw (::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::uno::RuntimeException); + /// @see ::drafts::com::sun::star::chart2::XTransformation + virtual sal_Int32 SAL_CALL getSourceDimension() + throw (::com::sun::star::uno::RuntimeException); + /// @see ::drafts::com::sun::star::chart2::XTransformation + virtual sal_Int32 SAL_CALL getTargetDimension() + throw (::com::sun::star::uno::RuntimeException); + +private: + ::com::sun::star::drawing::HomogenMatrix m_Matrix; +}; + +} // namespace chart + +// _CHART_LINEAR3DTRANSFORMATION_HXX +#endif + diff --git a/chart2/source/view/inc/PlotterBase.hxx b/chart2/source/view/inc/PlotterBase.hxx new file mode 100644 index 000000000..7fc4f8a4b --- /dev/null +++ b/chart2/source/view/inc/PlotterBase.hxx @@ -0,0 +1,175 @@ +/************************************************************************* + * + * $RCSfile: PlotterBase.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:33 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef _CHART2_PLOTTERBASE_HXX +#define _CHART2_PLOTTERBASE_HXX + +#ifndef _COM_SUN_STAR_DRAWING_HOMOGENMATRIX_HPP_ +#include <com/sun/star/drawing/HomogenMatrix.hpp> +#endif +#ifndef _COM_SUN_STAR_DRAWING_XSHAPES_HPP_ +#include <com/sun/star/drawing/XShapes.hpp> +#endif +#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_ +#include <com/sun/star/lang/XServiceInfo.hpp> +#endif +#ifndef _COM_SUN_STAR_UNO_XCOMPONENTCONTEXT_HPP_ +#include <com/sun/star/uno/XComponentContext.hpp> +#endif +/* +#ifndef _COM_SUN_STAR_LANG_XCOMPONENT_HPP_ +#include <com/sun/star/lang/XComponent.hpp> +#endif +*/ + +//---- +#include <vector> + +//---- chart2 +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_EXPLICITSCALEDATA_HPP_ +#include <drafts/com/sun/star/chart2/ExplicitScaleData.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XTRANSFORMATION_HPP_ +#include <drafts/com/sun/star/chart2/XTransformation.hpp> +#endif +/* +#ifndef _COM_SUN_STAR_CHART2_XPLOTTER_HPP_ +#include <drafts/com/sun/star/chart2/XPlotter.hpp> +#endif +*/ + +//---- +#ifndef _CPPUHELPER_IMPLBASE1_HXX_ +#include <cppuhelper/implbase1.hxx> +#endif + +#ifndef _B3D_HMATRIX_HXX +#include <goodies/hmatrix.hxx> +#endif + +//............................................................................. +namespace chart +{ +//............................................................................. + +class ShapeFactory; +class PlottingPositionHelper; + +class PlotterBase +{ +public: + PlotterBase( sal_Int32 nDimension ); + virtual ~PlotterBase(); + + // ___chart2::XPlotter___ + virtual void SAL_CALL init( + const ::com::sun::star::uno::Reference< + ::com::sun::star::drawing::XShapes >& xLogicTarget + , const ::com::sun::star::uno::Reference< + ::com::sun::star::drawing::XShapes >& xFinalTarget + , const ::com::sun::star::uno::Reference< + ::com::sun::star::lang::XMultiServiceFactory >& xFactory ) + throw (::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL setScales( + const ::com::sun::star::uno::Sequence< + ::drafts::com::sun::star::chart2::ExplicitScaleData >& rScales ) + throw (::com::sun::star::uno::RuntimeException); + + void setTransformationSceneToScreen( const ::com::sun::star::drawing::HomogenMatrix& rMatrix ); + + virtual void SAL_CALL createShapes() = 0; + + /* + virtual ::rtl::OUString SAL_CALL getCoordinateSystemTypeID( ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setTransformation( const ::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XTransformation >& xTransformationToLogicTarget, const ::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XTransformation >& xTransformationToFinalPage ) throw (::com::sun::star::uno::RuntimeException); + */ + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- +private: //methods + //no default constructor + PlotterBase(); + +protected: //methods + ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes > + createGroupShape( const ::com::sun::star::uno::Reference< + ::com::sun::star::drawing::XShapes >& xTarget + , const ::rtl::OUString& rName ); + +protected: //member + ::com::sun::star::uno::Reference< + ::com::sun::star::drawing::XShapes > m_xLogicTarget; + ::com::sun::star::uno::Reference< + ::com::sun::star::drawing::XShapes > m_xFinalTarget; + ::com::sun::star::uno::Reference< + ::com::sun::star::lang::XMultiServiceFactory> m_xShapeFactory; + ShapeFactory* m_pShapeFactory; + //::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext> m_xCC; + + sal_Int32 m_nDimension; + // needs to be created by the derived class + PlottingPositionHelper* m_pPosHelper; +}; +//............................................................................. +} //namespace chart +//............................................................................. +#endif diff --git a/chart2/source/view/inc/PlottingPositionHelper.hxx b/chart2/source/view/inc/PlottingPositionHelper.hxx new file mode 100644 index 000000000..4833de793 --- /dev/null +++ b/chart2/source/view/inc/PlottingPositionHelper.hxx @@ -0,0 +1,201 @@ +/************************************************************************* + * + * $RCSfile: PlottingPositionHelper.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:33 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef _CHART2_PLOTTINGPOSITIONHELPER_HXX +#define _CHART2_PLOTTINGPOSITIONHELPER_HXX + +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_EXPLICITSCALEDATA_HPP_ +#include <drafts/com/sun/star/chart2/ExplicitScaleData.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XTRANSFORMATION_HPP_ +#include <drafts/com/sun/star/chart2/XTransformation.hpp> +#endif + +#ifndef _COM_SUN_STAR_DRAWING_HOMOGENMATRIX_HPP_ +#include <com/sun/star/drawing/HomogenMatrix.hpp> +#endif + +#ifndef _B3D_HMATRIX_HXX +#include <goodies/hmatrix.hxx> +#endif + +//............................................................................. +namespace chart +{ +//............................................................................. + +//----------------------------------------------------------------------------- +/** +*/ + +class PlottingPositionHelper +{ +public: + PlottingPositionHelper(); + virtual ~PlottingPositionHelper(); + + void setTransformationSceneToScreen( const ::com::sun::star::drawing::HomogenMatrix& rMatrix); + + void setScales( const ::com::sun::star::uno::Sequence< + ::drafts::com::sun::star::chart2::ExplicitScaleData >& rScales ); + + inline bool isLogicVisible( double fX, double fY, double fZ ) const; + inline void doLogicScaling( double* pX, double* pY, double* pZ ) const; + inline void clipLogicValues( double* pX, double* pY, double* pZ ) const; + + virtual ::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XTransformation > + getTransformationLogicToScene() const; + + inline double getLogicMinX() const; + inline double getLogicMinY() const; + inline double getLogicMinZ() const; + inline double getLogicMaxX() const; + inline double getLogicMaxY() const; + inline double getLogicMaxZ() const; + + void getLogicMinimum( ::com::sun::star::uno::Sequence< double >& rSeq ) const; + void getLogicMaximum( ::com::sun::star::uno::Sequence< double >& rSeq ) const; + + void getScreenValuesForMinimum( ::com::sun::star::uno::Sequence< double >& rSeq ) const; + void getScreenValuesForMaximum( ::com::sun::star::uno::Sequence< double >& rSeq ) const; + +protected: //member + ::com::sun::star::uno::Sequence< + ::drafts::com::sun::star::chart2::ExplicitScaleData > m_aScales; + Matrix4D m_aMatrixScreenToScene; + + //this is calculated based on m_aScales and m_aMatrixScreenToScene + mutable ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XTransformation > m_xTransformationLogicToScene; +}; + +bool PlottingPositionHelper::isLogicVisible( + double fX, double fY, double fZ ) const +{ + return fX >= m_aScales[0].Minimum && fX <= m_aScales[0].Maximum + && fY >= m_aScales[1].Minimum && fY <= m_aScales[1].Maximum + && fZ >= m_aScales[2].Minimum && fZ <= m_aScales[2].Maximum; +} + +void PlottingPositionHelper::doLogicScaling( double* pX, double* pY, double* pZ ) const +{ + if(pX && m_aScales[0].Scaling.is()) + *pX = m_aScales[0].Scaling->doScaling(*pX); + if(pY && m_aScales[1].Scaling.is()) + *pY = m_aScales[1].Scaling->doScaling(*pY); + if(pZ && m_aScales[2].Scaling.is()) + *pZ = m_aScales[2].Scaling->doScaling(*pZ); +} + +void PlottingPositionHelper::clipLogicValues( double* pX, double* pY, double* pZ ) const +{ + if(pX) + { + if( *pX < m_aScales[0].Minimum ) + *pX = m_aScales[0].Minimum; + else if( *pX > m_aScales[0].Maximum ) + *pX = m_aScales[0].Maximum; + } + if(pY) + { + if( *pY < m_aScales[1].Minimum ) + *pY = m_aScales[1].Minimum; + else if( *pY > m_aScales[1].Maximum ) + *pY = m_aScales[1].Maximum; + } + if(pZ) + { + if( *pZ < m_aScales[2].Minimum ) + *pZ = m_aScales[2].Minimum; + else if( *pZ > m_aScales[2].Maximum ) + *pZ = m_aScales[2].Maximum; + } +} + +inline double PlottingPositionHelper::getLogicMinX() const +{ + return m_aScales[0].Minimum; +} +inline double PlottingPositionHelper::getLogicMinY() const +{ + return m_aScales[1].Minimum; +} +inline double PlottingPositionHelper::getLogicMinZ() const +{ + return m_aScales[2].Minimum; +} + +inline double PlottingPositionHelper::getLogicMaxX() const +{ + return m_aScales[0].Maximum; +} +inline double PlottingPositionHelper::getLogicMaxY() const +{ + return m_aScales[1].Maximum; +} +inline double PlottingPositionHelper::getLogicMaxZ() const +{ + return m_aScales[2].Maximum; +} + +//............................................................................. +} //namespace chart +//............................................................................. +#endif diff --git a/chart2/source/view/inc/PropertyMapper.hxx b/chart2/source/view/inc/PropertyMapper.hxx new file mode 100644 index 000000000..638d9141e --- /dev/null +++ b/chart2/source/view/inc/PropertyMapper.hxx @@ -0,0 +1,145 @@ +/************************************************************************* + * + * $RCSfile: PropertyMapper.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:33 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef _CHART2_PROPERTYMAPPER_HXX +#define _CHART2_PROPERTYMAPPER_HXX + +#include "InlineContainer.hxx" + +#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_ +#include <com/sun/star/beans/XPropertySet.hpp> +#endif +#ifndef _COM_SUN_STAR_DRAWING_XSHAPE_HPP_ +#include <com/sun/star/drawing/XShape.hpp> +#endif + +//............................................................................. +namespace chart +{ +//............................................................................. + +//----------------------------------------------------------------------------- +/** +*/ + +typedef ::std::map< ::rtl::OUString, ::rtl::OUString > tPropertyNameMap; +typedef ::comphelper::MakeMap< ::rtl::OUString, ::rtl::OUString > tMakePropertyNameMap; + +typedef ::std::map< ::rtl::OUString, ::com::sun::star::uno::Any > tPropertyNameValueMap; +typedef ::comphelper::MakeMap< ::rtl::OUString, ::com::sun::star::uno::Any > tMakePropertyNameValueMap; + +typedef ::com::sun::star::uno::Sequence< rtl::OUString > tNameSequence; +typedef ::comphelper::MakeSequence< rtl::OUString > tMakeNameSequence; + +typedef ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > tAnySequence; +typedef ::comphelper::MakeSequence< ::com::sun::star::uno::Any > tMakeAnySequence; + +class PropertyMapper +{ +public: + static void setMappedProperties( + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertySet >& xTarget + , const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertySet >& xSource + , const tPropertyNameMap& rMap ); + + static void getValueMap( + tPropertyNameValueMap& rValueMap + , const tPropertyNameMap& rNameMap + , const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertySet >& xSourceProp + ); + + static void getMultiPropertyLists( + tNameSequence& rNames + , tAnySequence& rValues + , const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xProp + , const tPropertyNameMap& rMap + ); + + static void getMultiPropertyListsFromValueMap( + tNameSequence& rNames + , tAnySequence& rValues + , const tPropertyNameValueMap& rValueMap + ); + + static ::com::sun::star::uno::Any* + getValuePointer( tAnySequence& rPropValues + , const tNameSequence& rPropNames + , const rtl::OUString& rPropName ); + + static void setMultiProperties( + const tNameSequence& rNames + , const tAnySequence& rValues + , const ::com::sun::star::uno::Reference< + ::com::sun::star::drawing::XShape >& xTarget ); + + static const tMakePropertyNameMap& getPropertyNameMapForCharacterProperties(); + static const tMakePropertyNameMap& getPropertyNameMapForParagraphProperties(); + static const tMakePropertyNameMap& getPropertyNameMapForFillProperties(); + static const tMakePropertyNameMap& getPropertyNameMapForLineProperties(); + +}; + +//............................................................................. +} //namespace chart +//............................................................................. +#endif diff --git a/chart2/source/view/inc/ShapeFactory.hxx b/chart2/source/view/inc/ShapeFactory.hxx new file mode 100644 index 000000000..108d17c5a --- /dev/null +++ b/chart2/source/view/inc/ShapeFactory.hxx @@ -0,0 +1,234 @@ +/************************************************************************* + * + * $RCSfile: ShapeFactory.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:33 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef _CHART2_VIEW_SHAPEFACTORY_HXX +#define _CHART2_VIEW_SHAPEFACTORY_HXX + +#include "DatapointGeometry.hxx" +#include "ShapeAppearance.hxx" +#include "PropertyMapper.hxx" + + +#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_ +#include <com/sun/star/beans/XPropertySet.hpp> +#endif +#ifndef _COM_SUN_STAR_DRAWING_POINTSEQUENCESEQUENCE_HPP_ +#include <com/sun/star/drawing/PointSequenceSequence.hpp> +#endif +#ifndef _COM_SUN_STAR_DRAWING_POLYPOLYGONSHAPE3D_HPP_ +#include <com/sun/star/drawing/PolyPolygonShape3D.hpp> +#endif +#ifndef _COM_SUN_STAR_DRAWING_XSHAPES_HPP_ +#include <com/sun/star/drawing/XShapes.hpp> +#endif +#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_ +#include <com/sun/star/lang/XMultiServiceFactory.hpp> +#endif + +//............................................................................. +namespace chart +{ +//............................................................................. + +class Stripe; + +class ShapeFactory +{ +public: + ShapeFactory(::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory> xFactory) + {m_xShapeFactory = xFactory;} + + ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes > + createGroup2D( + const ::com::sun::star::uno::Reference< + ::com::sun::star::drawing::XShapes >& xTarget + , ::rtl::OUString aName = ::rtl::OUString() ); + + + ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes > + createGroup3D( + const ::com::sun::star::uno::Reference< + ::com::sun::star::drawing::XShapes >& xTarget + , ::rtl::OUString aName = ::rtl::OUString() ); + + //------ + + ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > + createCube( const ::com::sun::star::uno::Reference< + ::com::sun::star::drawing::XShapes >& xTarget + , const DataPointGeometry& rGeometry + , const ShapeAppearance& rAppearance ); + + ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > + createRoundedCube(const ::com::sun::star::uno::Reference< + ::com::sun::star::drawing::XShapes >& xTarget + , const DataPointGeometry& rGeometry ); + + ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > + createCylinder( const ::com::sun::star::uno::Reference< + ::com::sun::star::drawing::XShapes >& xTarget + , const DataPointGeometry& rGeometry ); + + ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > + createPyramid( const ::com::sun::star::uno::Reference< + ::com::sun::star::drawing::XShapes >& xTarget + , const DataPointGeometry& rGeometry ); + + ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > + createCone( const ::com::sun::star::uno::Reference< + ::com::sun::star::drawing::XShapes >& xTarget + , const DataPointGeometry& rGeometry ); + + ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > + createPieSegment( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& xTarget + , const DataPointGeometry& rGeometry ); + + ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > + createPieSegment2D( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& xTarget + , const DataPointGeometry& rGeometry ); + + ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > + createStripe( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& xTarget + , const Stripe& rStripe + , const ShapeAppearance& rAppearance + , sal_Bool bDoubleSided = true); + + ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > + createArea3D( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& xTarget + , const ::com::sun::star::drawing::PolyPolygonShape3D& rPolyPolygon + , double fDepth); + + ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > + createArea2D( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& xTarget + , const ::com::sun::star::drawing::PolyPolygonShape3D& rPolyPolygon); + + ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > + createSymbol2D( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& xTarget + , const DataPointGeometry& rGeometry + , const ShapeAppearance& rAppearance ); + + ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > + createSymbol3D( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& xTarget + , const DataPointGeometry& rGeometry + , const ShapeAppearance& rAppearance ); + + ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > + createLine2D( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& xTarget + , const ::com::sun::star::drawing::PointSequenceSequence& rPoints + , const LineProperties& rLineProperties ); + + ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > + createLine3D( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& xTarget + , const ::com::sun::star::drawing::PolyPolygonShape3D& rPoints + , const LineProperties& rLineProperties ); + + //------------------- create 2D elements: + + ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > + createText( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& xTarget2D + , const ::rtl::OUString& rText + , const tNameSequence& rPropNames + , const tAnySequence& rPropValues + , const ::com::sun::star::uno::Any& rATransformation + ); + + //------ + + static void setShapeAppearance( const ShapeAppearance& rAppearance + , const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertySet >& xProp + , sal_Bool bNoLines = true ) + throw (::com::sun::star::beans::UnknownPropertyException + , ::com::sun::star::beans::PropertyVetoException + , ::com::sun::star::lang::IllegalArgumentException + , ::com::sun::star::lang::WrappedTargetException + , ::com::sun::star::uno::RuntimeException); + + static void setShapeName( const ::com::sun::star::uno::Reference< + ::com::sun::star::drawing::XShape >& xShape + , const rtl::OUString& rName ); + + static ::com::sun::star::uno::Any makeTransformation( const ::com::sun::star::awt::Point& rScreenPosition2D, double fRotationAnglePi=0.0 ); + + static rtl::OUString getStackedString( const rtl::OUString& rString, bool bStacked=true ); + +private: + ShapeFactory(); + + ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > + impl_createCube( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& xTarget + , const DataPointGeometry& rGeometry + , sal_Bool bRounded ); + + ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > + impl_createConeOrCylinder( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& xTarget + , const DataPointGeometry& rGeometry + , sal_Int32 nSegments + , bool bCylinder = false); + + //member: + ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory> + m_xShapeFactory; +}; + +//............................................................................. +} //namespace chart +//............................................................................. +#endif diff --git a/chart2/source/view/inc/Stripe.hxx b/chart2/source/view/inc/Stripe.hxx new file mode 100644 index 000000000..a7e8c4533 --- /dev/null +++ b/chart2/source/view/inc/Stripe.hxx @@ -0,0 +1,123 @@ +/************************************************************************* + * + * $RCSfile: Stripe.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:33 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef _CHART_STRIPE_HXX +#define _CHART_STRIPE_HXX + +#ifndef _COM_SUN_STAR_DRAWING_POSITION3D_HPP_ +#include <com/sun/star/drawing/Position3D.hpp> +#endif +#ifndef _COM_SUN_STAR_DRAWING_DIRECTION3D_HPP_ +#include <com/sun/star/drawing/Direction3D.hpp> +#endif + +#ifndef _COM_SUN_STAR_UNO_ANY_H_ +#include <com/sun/star/uno/Any.h> +#endif + +//............................................................................. +namespace chart +{ +//............................................................................. + +//----------------------------------------------------------------------------- +/** A Stripe represents a 2 dimensional foursquare plane in a 3 dimaensional room. + +@todo could: it is not necessary to have 4 point members here; it would be sufficient to have one point and 2 directions +*/ + +class Stripe +{ +public: + Stripe( const ::com::sun::star::drawing::Position3D& rPoint1 + , const ::com::sun::star::drawing::Direction3D& rDirectionToPoint2 + , const ::com::sun::star::drawing::Direction3D& rDirectionToPoint4 ); + +/* + Stripe( const ::com::sun::star::drawing::Position3D& rPoint1 + , const ::com::sun::star::drawing::Position3D& rPoint2 + , const ::com::sun::star::drawing::Position3D& rPoint3 + , const ::com::sun::star::drawing::Position3D& rPoint4 );*/ + + + ::com::sun::star::uno::Any getPolyPolygonShape3D() const; + ::com::sun::star::uno::Any getNormalsPolyPolygonShape3D() const; + + ::com::sun::star::drawing::Position3D GetPosition1() const { return m_aPoint1;}; + ::com::sun::star::drawing::Position3D GetPosition2() const { return m_aPoint2;}; + ::com::sun::star::drawing::Position3D GetPosition3() const { return m_aPoint3;}; + ::com::sun::star::drawing::Position3D GetPosition4() const { return m_aPoint4;}; + + ::com::sun::star::drawing::Direction3D GetDirectionTo4() const; + +private: + ::com::sun::star::drawing::Position3D m_aPoint1; + ::com::sun::star::drawing::Position3D m_aPoint2; + ::com::sun::star::drawing::Position3D m_aPoint3; + ::com::sun::star::drawing::Position3D m_aPoint4; + + ::com::sun::star::drawing::Direction3D + getNormal() const; +}; + +//............................................................................. +} //namespace chart +//............................................................................. +#endif diff --git a/chart2/source/view/inc/VCoordinateSystem.hxx b/chart2/source/view/inc/VCoordinateSystem.hxx new file mode 100644 index 000000000..4a071cf48 --- /dev/null +++ b/chart2/source/view/inc/VCoordinateSystem.hxx @@ -0,0 +1,163 @@ +/************************************************************************* + * + * $RCSfile: VCoordinateSystem.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:33 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef _CHART2_VCOORDINATESYSTEM_HXX +#define _CHART2_VCOORDINATESYSTEM_HXX + +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_EXPLICITINCREMENTDATA_HPP_ +#include <drafts/com/sun/star/chart2/ExplicitIncrementData.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_EXPLICITSCALEDATA_HPP_ +#include <drafts/com/sun/star/chart2/ExplicitScaleData.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XAXIS_HPP_ +#include <drafts/com/sun/star/chart2/XAxis.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XGRID_HPP_ +#include <drafts/com/sun/star/chart2/XGrid.hpp> +#endif + +#ifndef _COM_SUN_STAR_DRAWING_HOMOGENMATRIX_HPP_ +#include <com/sun/star/drawing/HomogenMatrix.hpp> +#endif +#ifndef _COM_SUN_STAR_DRAWING_XSHAPES_HPP_ +#include <com/sun/star/drawing/XShapes.hpp> +#endif +#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_ +#include <com/sun/star/lang/XMultiServiceFactory.hpp> +#endif +// #ifndef _DRAFTS_COM_SUN_STAR_CHART2_XBOUNDEDCOORDINATESYSTEMCONTAINER_HPP_ +// #include <drafts/com/sun/star/chart2/XBoundedCoordinateSystemContainer.hpp> +// #endif + +//............................................................................. +namespace chart +{ +//............................................................................. + +//----------------------------------------------------------------------------- +/** +*/ +class MinimumAndMaximumSupplier; + +class VCoordinateSystem +{ +public: + VCoordinateSystem( const ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XBoundedCoordinateSystem >& xCooSys ); + virtual ~VCoordinateSystem(); + + void addAxis( const ::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XAxis >& xAxis ); + void setOrigin( double* fCoordinateOrigin ); + void addGrid( const ::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XGrid >& xGrid ); + + void doAutoScale( MinimumAndMaximumSupplier* pMinMaxSupplier ); + + ::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XAxis > getAxisByDimension( sal_Int32 nDim ) const; + + const ::com::sun::star::uno::Sequence< ::drafts::com::sun::star::chart2::ExplicitScaleData >& getExplicitScales() const {return m_aExplicitScales;} + const ::com::sun::star::uno::Sequence< ::drafts::com::sun::star::chart2::ExplicitIncrementData >& getExplicitIncrements() const {return m_aExplicitIncrements;} + double getOriginByDimension( sal_Int32 nDim ) const { return m_fCoordinateOrigin[nDim]; } + + ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XBoundedCoordinateSystem > + getModel() const; + + void createGridShapes( const ::com::sun::star::uno::Reference< + ::com::sun::star::lang::XMultiServiceFactory>& xShapeFactory + , const ::com::sun::star::uno::Reference< + ::com::sun::star::drawing::XShapes >& xTarget + , const ::com::sun::star::drawing::HomogenMatrix& rHM_SceneToScreen + ); + +private: //methods + ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XGrid > >& + getGridListByDimension( sal_Int32 nDim ); + +private: //member + + ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XBoundedCoordinateSystem > m_xCooSysModel; + + ::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XAxis > m_xAxis0; + ::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XAxis > m_xAxis1; + ::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XAxis > m_xAxis2; + + ::com::sun::star::uno::Sequence< + ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XGrid > > m_xGridList0; + ::com::sun::star::uno::Sequence< + ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XGrid > > m_xGridList1; + ::com::sun::star::uno::Sequence< + ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XGrid > > m_xGridList2; + + double m_fCoordinateOrigin[3]; + + ::com::sun::star::uno::Sequence< ::drafts::com::sun::star::chart2::ExplicitScaleData > m_aExplicitScales; + ::com::sun::star::uno::Sequence< ::drafts::com::sun::star::chart2::ExplicitIncrementData > m_aExplicitIncrements; +}; + +//............................................................................. +} //namespace chart +//............................................................................. +#endif diff --git a/chart2/source/view/inc/VDataSeries.hxx b/chart2/source/view/inc/VDataSeries.hxx new file mode 100644 index 000000000..b45b1e959 --- /dev/null +++ b/chart2/source/view/inc/VDataSeries.hxx @@ -0,0 +1,200 @@ +/************************************************************************* + * + * $RCSfile: VDataSeries.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:33 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef _CHART2_VIEW_DATASERIES_HXX +#define _CHART2_VIEW_DATASERIES_HXX + +#include "ShapeAppearance.hxx" +#include "PropertyMapper.hxx" +/* +#ifndef _B3D_HMATRIX_HXX +#include <goodies/hmatrix.hxx> +#endif +*/ +#include <vector> +//for auto_ptr +#include <memory> + +/* +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_EXPLICITSCALEDATA_HPP_ +#include <drafts/com/sun/star/chart2/ExplicitScaleData.hpp> +#endif +*/ +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_DATACAPTIONSTYLE_HPP_ +#include <drafts/com/sun/star/chart2/DataCaptionStyle.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XDATASEQUENCE_HPP_ +#include <drafts/com/sun/star/chart2/XDataSequence.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XDATASERIES_HPP_ +#include <drafts/com/sun/star/chart2/XDataSeries.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XDATASOURCE_HPP_ +#include <drafts/com/sun/star/chart2/XDataSource.hpp> +#endif +#ifndef _COM_SUN_STAR_DRAWING_HOMOGENMATRIX_HPP_ +#include <com/sun/star/drawing/HomogenMatrix.hpp> +#endif +#ifndef _COM_SUN_STAR_DRAWING_POLYPOLYGONSHAPE3D_HPP_ +#include <com/sun/star/drawing/PolyPolygonShape3D.hpp> +#endif +#ifndef _COM_SUN_STAR_DRAWING_XSHAPE_HPP_ +#include <com/sun/star/drawing/XShape.hpp> +#endif + + +//............................................................................. +namespace chart +{ +//............................................................................. + +//----------------------------------------------------------------------------- +/** +*/ + +class VDataSeries +{ +public: + VDataSeries(); + VDataSeries( ::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XDataSeries > + , const ShapeAppearance& rDefaultAppearence ); + virtual ~VDataSeries(); + + sal_Int32 getTotalPointCount() const; + double getX( sal_Int32 index ) const; + double getY( sal_Int32 index ) const; + + rtl::OUString getCategoryString( sal_Int32 index ) const; + + ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > + getPropertiesOfPoint( sal_Int32 index ) const; + + ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > + getPropertiesOfSeries() const; + + ShapeAppearance getAppearanceOfPoint( sal_Int32 index ) const; + + ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > m_xShape; + ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > m_xLabelsShape; + + //this is only temporarily here for area chart: + ::com::sun::star::drawing::PolyPolygonShape3D m_aPolyPolygonShape3D; + double m_fMinX; + double m_fMaxX; + // + + rtl::OUString getCID() const; + rtl::OUString getPointCID_Stub() const; + rtl::OUString getLabelsCID() const; + rtl::OUString getLabelCID_Stub() const; + + ::drafts::com::sun::star::chart2::DataCaptionStyle* + getDataCaptionStyle( sal_Int32 index ) const; + bool getTextLabelMultiPropertyLists( sal_Int32 index, tNameSequence*& pPropNames, tAnySequence*& pPropValues ) const; + +private: //methods + bool isAttributedDataPoint( sal_Int32 index ) const; + +private: //member + + ShapeAppearance m_aAppearanceOfSeries; + + ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XDataSeries > m_xDataSeries; + ::com::sun::star::uno::Sequence< + ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XDataSequence > > m_aDataSequences; + + //all points given by the model data (here are not only the visible points meant) + sal_Int32 m_nPointCount; + ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XDataSequence > m_xData_XValues; + ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XDataSequence > m_xData_YValues; + ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XDataSequence > m_xData_ZValues; + + ::com::sun::star::uno::Sequence< double > m_YValues_Double; + + ::com::sun::star::uno::Sequence< sal_Int32 > m_aAttributedDataPointIndexList; + + rtl::OUString m_aIdentifier;//model identifier of this series + rtl::OUString m_aCID; + rtl::OUString m_aPointCID_Stub; + rtl::OUString m_aLabelCID_Stub; + + //some cached values for data labels as they are very expensive + mutable ::std::auto_ptr< ::drafts::com::sun::star::chart2::DataCaptionStyle > + m_apCaption_Series; + mutable ::std::auto_ptr< tNameSequence > m_apLabelPropNames_Series; + mutable ::std::auto_ptr< tAnySequence > m_apLabelPropValues_Series; + + mutable ::std::auto_ptr< ::drafts::com::sun::star::chart2::DataCaptionStyle > + m_apCaption_AttributedPoint; + mutable ::std::auto_ptr< tNameSequence > m_apLabelPropNames_AttributedPoint; + mutable ::std::auto_ptr< tAnySequence > m_apLabelPropValues_AttributedPoint; + mutable sal_Int32 m_nCurrentAttributedPoint; + // +}; + +//............................................................................. +} //namespace chart +//............................................................................. +#endif diff --git a/chart2/source/view/inc/VDiagram.hxx b/chart2/source/view/inc/VDiagram.hxx new file mode 100644 index 000000000..e706c0266 --- /dev/null +++ b/chart2/source/view/inc/VDiagram.hxx @@ -0,0 +1,152 @@ +/************************************************************************* + * + * $RCSfile: VDiagram.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:33 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef _CHART2_VDIAGRAM_HXX +#define _CHART2_VDIAGRAM_HXX + +#ifndef _COM_SUN_STAR_DRAWING_HOMOGENMATRIX_HPP_ +#include <com/sun/star/drawing/HomogenMatrix.hpp> +#endif +#ifndef _COM_SUN_STAR_DRAWING_XSHAPES_HPP_ +#include <com/sun/star/drawing/XShapes.hpp> +#endif + +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XDIAGRAM_HPP_ +#include <drafts/com/sun/star/chart2/XDiagram.hpp> +#endif + +#ifndef _CHART2_VIEW_SHAPEFACTORY_HXX +#include "ShapeFactory.hxx" +#endif + +//............................................................................. +namespace chart +{ +//............................................................................. + +class ShapeFactory; + +//----------------------------------------------------------------------------- +/** The VDiagram is responsible to generate the visible parts of the Diagram +that is wall, floor, axes and data series. +The axes and data series are subobjects which are created and managed by the +diagram. +*/ + +class VDiagram +{ +public: //methods + VDiagram( const ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XDiagram > & xDiagram, + sal_Int32 nDimension=3, sal_Bool bPolar=sal_False); + virtual ~VDiagram(); + + void SAL_CALL init( const ::com::sun::star::uno::Reference< + ::com::sun::star::drawing::XShapes >& xLogicTarget + , const ::com::sun::star::uno::Reference< + ::com::sun::star::drawing::XShapes >& xFinalTarget + , const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xFactory); + + void setSceneMatrix( const ::com::sun::star::drawing::HomogenMatrix& rMatrix ); + + void createShapes( const ::com::sun::star::awt::Point& rPos + , const ::com::sun::star::awt::Size& rSize ); + + ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes > + getCoordinateRegion(); + + // updateShapes(..); + // const awt::Point& rPos, const awt::Size& rSize ); + +private: //methods + void createShapes_2d( const ::com::sun::star::awt::Point& rPos + , const ::com::sun::star::awt::Size& rSize ); + void createShapes_3d( const ::com::sun::star::awt::Point& rPos + , const ::com::sun::star::awt::Size& rSize ); + +private: //members + VDiagram(const VDiagram& rD); + + ::com::sun::star::uno::Reference< + ::com::sun::star::drawing::XShapes > m_xLogicTarget; + ::com::sun::star::uno::Reference< + ::com::sun::star::drawing::XShapes > m_xFinalTarget; + ::com::sun::star::uno::Reference< + ::com::sun::star::lang::XMultiServiceFactory> m_xShapeFactory; + ShapeFactory* m_pShapeFactory; + + // this is the surrounding shape which contains floor, wall and coordinate + ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > m_xOuterGroupShape; + // this is an additional inner shape that represents the coordinate region - that is - where to place data points + ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > m_xCoordinateRegionShape; + + ::com::sun::star::drawing::HomogenMatrix m_oSceneMatrix; + sal_Int32 m_nDimension; + sal_Bool m_bPolar; + ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XDiagram > m_xDiagram; +}; + +//............................................................................. +} //namespace chart +//............................................................................. +#endif + + diff --git a/chart2/source/view/inc/VSeriesPlotter.hxx b/chart2/source/view/inc/VSeriesPlotter.hxx new file mode 100644 index 000000000..fbd2bd9c7 --- /dev/null +++ b/chart2/source/view/inc/VSeriesPlotter.hxx @@ -0,0 +1,208 @@ +/************************************************************************* + * + * $RCSfile: VSeriesPlotter.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:33 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef _CHART2_VSERIESPLOTTER_HXX +#define _CHART2_VSERIESPLOTTER_HXX + +#include "PlotterBase.hxx" +#include "VDataSeries.hxx" +#include "PropertyMapper.hxx" + +//............................................................................. +namespace chart +{ +//............................................................................. + +//----------------------------------------------------------------------------- +/** +*/ + +class MinimumAndMaximumSupplier +{ +public: + virtual double getMinimumX() { return -0.5; }; + virtual double getMaximumX() { return 10.0; }; + + //problem y maybe not is always the second border to ask for + virtual double getMinimumYInRange( double fMinimumX, double fMaximumX ) { return -2.0; }; + virtual double getMaximumYInRange( double fMinimumX, double fMaximumX ) { return 20.0; }; +}; + +//enum StackType { STACK_NORMAL, STACK_NONE, STACK_BESIDES, STACK_ONTOP, STACK_BEHIND }; + +class VDataSeriesGroup +{ + //a list of series that have the same BoundedCoordinateSystem + //they are used to be plotted maybe in a stacked manner by a plotter + +public: + VDataSeriesGroup(); + VDataSeriesGroup( VDataSeries* pSeries ); + VDataSeriesGroup( const ::std::vector< VDataSeries* >& rSeriesVector ); + virtual ~VDataSeriesGroup(); + + void addSeries( VDataSeries* pSeries );//takes ownership of pSeries + sal_Int32 getSeriesCount() const; + void deleteSeries(); + + void calculateYSumsForCategory( sal_Int32 nCategoryIndex, double& rfPositiveSum, double& rfNegativeSum ); + bool calculateYMinAndMaxForCategoryRange( sal_Int32 nStartCategoryIndex, sal_Int32 nEndCategoryIndex + , double& rfMinimum, double& rfMaximum ); + + void setSums( double fPositiveSum, double fNegativeSum ); + bool getSums( double& rfPositiveSum, double& rfNegativeSum ) const; + + ::std::vector< VDataSeries* > m_aSeriesVector; + +private: + bool m_bSumValuesDirty; + double m_fPositiveSum; + double m_fNegativeSum; + + bool m_bMaxPointCountDirty; + sal_Int32 m_nMaxPointCount; +}; + +class VSeriesPlotter : public PlotterBase, public MinimumAndMaximumSupplier +{ + //------------------------------------------------------------------------- + // public methods + //------------------------------------------------------------------------- +public: + VSeriesPlotter( sal_Int32 nDimension ); + virtual ~VSeriesPlotter(); + + /* + * A new series can be positioned relative to other series in a chart. + * This positioning has two dimensions. First a series can be placed + * next to each other on the category axis. This position is indicated by xSlot. + * Second a series can be stacked on top of another. This position is indicated by ySlot. + * The positions are counted from 0 on. + * xSlot < 0 : append the series to already existing x series + * xSlot > occupied : append the series to already existing x series + * + * If the xSlot is already occupied the given ySlot decides what should happen: + * ySlot < -1 : move all existing series in the xSlot to next slot + * ySlot == -1 : stack on top at given x position + * ySlot == already occupied : insert at given y and x position + * ySlot > occupied : stack on top at given x position + */ + virtual void addSeries( VDataSeries* pSeries, sal_Int32 xSlot = -1,sal_Int32 ySlot = -1 ); + + //------------------------------------------------------------------------- + // MinimumAndMaximumSupplier + //------------------------------------------------------------------------- + + virtual double getMinimumX(); + virtual double getMaximumX(); + + virtual double getMinimumYInRange( double fMinimumX, double fMaximumX ); + virtual double getMaximumYInRange( double fMinimumX, double fMaximumX ); + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + + static sal_Int32 getPointCount( const VDataSeriesGroup& rSeriesGroup ); + static sal_Int32 getPointCount( const ::std::vector< VDataSeriesGroup >& rSlots ); + + static VSeriesPlotter* createSeriesPlotter( const rtl::OUString& rChartType, sal_Int32 nDimension ); + + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- + //------------------------------------------------------------------------- +private: //methods + //no default constructor + VSeriesPlotter(); + +protected: //methods + ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes > + getSeriesGroupShape( VDataSeries* pDataSeries + , const::com::sun::star:: uno::Reference< + ::com::sun::star::drawing::XShapes >& xTarget ); + + ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes > + getLabelsGroupShape( VDataSeries* pDataSeries + , const::com::sun::star:: uno::Reference< + ::com::sun::star::drawing::XShapes >& xTarget ); + + void createDataLabel( const ::com::sun::star::uno::Reference< + ::com::sun::star::drawing::XShapes >& xTarget + , const VDataSeries& rDataSeries + , sal_Int32 nPointIndex + , double fValue + , double fSumValue + , const ::com::sun::star::awt::Point& rScreenPosition2D ); + + virtual void setMappedProperties( + const ::com::sun::star::uno::Reference< + ::com::sun::star::drawing::XShape >& xTarget + , const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertySet >& xSource + , const tPropertyNameMap& rMap ); + +protected: //member + ::std::vector< VDataSeriesGroup > m_aXSlots; + static tMakePropertyNameMap m_aShapePropertyMapForArea; +}; + +//............................................................................. +} //namespace chart +//............................................................................. +#endif diff --git a/chart2/source/view/inc/ViewDefines.hxx b/chart2/source/view/inc/ViewDefines.hxx new file mode 100644 index 000000000..b9e7d2326 --- /dev/null +++ b/chart2/source/view/inc/ViewDefines.hxx @@ -0,0 +1,82 @@ +/************************************************************************* + * + * $RCSfile: ViewDefines.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:33 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef _CHART_COMMONDEFINES_HXX +#define _CHART_COMMONDEFINES_HXX + +namespace chart +{ + +//========================================================================= +// +//========================================================================= +#define CHART_3DOBJECT_SEGMENTCOUNT ((sal_Int32)32) +#define FIXED_SIZE_FOR_3D_CHART_VOLUME (10000.0) +//There needs to be a little distance betweengrid lines and walls in 3D, otherwise the lines are partly hidden by the walls +#define GRID_TO_WALL_DISTANCE (20.0) +#define FLOOR_THICKNESS (100.0) + +const double ZDIRECTION = 1.0; +const sal_Int32 AXIS2D_TICKLENGTH = 150;//value like in old chart +const sal_Int32 AXIS2D_TICKLABELSPACING = 100;//value like in old chart + + +}//end namespace chart +#endif diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx new file mode 100644 index 000000000..1a13f806d --- /dev/null +++ b/chart2/source/view/main/ChartView.cxx @@ -0,0 +1,627 @@ +/************************************************************************* + * + * $RCSfile: ChartView.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:34 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "ChartViewImpl.hxx" +#include "PlottingPositionHelper.hxx" +#include "ViewDefines.hxx" +#include "VDiagram.hxx" +#include "VTitle.hxx" +#include "ShapeFactory.hxx" +#include "VAxis.hxx" +#include "VSeriesPlotter.hxx" +#include "CommonConverters.hxx" +#include "macros.hxx" +#include "TitleHelper.hxx" + +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_AXISORIENTATION_HPP_ +#include <drafts/com/sun/star/chart2/AxisOrientation.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_EXPLICITSUBINCREMENT_HPP_ +#include <drafts/com/sun/star/chart2/ExplicitSubIncrement.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XAXISCONTAINER_HPP_ +#include <drafts/com/sun/star/chart2/XAxisContainer.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XCHARTDOCUMENT_HPP_ +#include <drafts/com/sun/star/chart2/XChartDocument.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XCHARTTYPEGROUP_HPP_ +#include <drafts/com/sun/star/chart2/XChartTypeGroup.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XDATASERIES_HPP_ +#include <drafts/com/sun/star/chart2/XDataSeries.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XDIAGRAM_HPP_ +#include <drafts/com/sun/star/chart2/XDiagram.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XGRIDCONTAINER_HPP_ +#include <drafts/com/sun/star/chart2/XGridContainer.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XSTACKABLESCALEGROUP_HPP_ +#include <drafts/com/sun/star/chart2/XStackableScaleGroup.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XTITLED_HPP_ +#include <drafts/com/sun/star/chart2/XTitled.hpp> +#endif + +//............................................................................. +namespace chart +{ +//............................................................................. + +using namespace ::com::sun::star; +using namespace ::drafts::com::sun::star::chart2; + +//static +ChartView* ChartView::createView( + const uno::Reference< uno::XComponentContext >& xCC + , const uno::Reference< frame::XModel >& xChartModel + , const uno::Reference<drawing::XDrawPagesSupplier>& xDrawPagesSuplier + , NumberFormatterWrapper* pNumberFormatterWrapper ) +{ + return new ChartViewImpl(xCC,xChartModel,xDrawPagesSuplier,pNumberFormatterWrapper); +} + +ChartViewImpl::ChartViewImpl( + const uno::Reference< uno::XComponentContext >& xCC + , const uno::Reference< frame::XModel >& xChartModel + , const uno::Reference<drawing::XDrawPagesSupplier>& xDrawPagesSuplier + , NumberFormatterWrapper* pNumberFormatterWrapper ) + : m_xCC(xCC) + , m_xChartModel(xChartModel) + , m_xShapeFactory(NULL) + , m_xDrawPage(NULL) + , m_pNumberFormatterWrapper( pNumberFormatterWrapper ) + , m_pVDiagram(NULL) + , m_pVLegend(NULL) + , m_pVTitle(NULL) + , m_pVSubtitle(NULL) +{ + //get factory from draw model + m_xShapeFactory = uno::Reference<lang::XMultiServiceFactory>( xDrawPagesSuplier, uno::UNO_QUERY ); + + //create draw page: + uno::Reference<drawing::XDrawPages> xDrawPages = xDrawPagesSuplier->getDrawPages (); + m_xDrawPage = xDrawPages->insertNewByIndex ( 0 ); +} + +ChartViewImpl::~ChartViewImpl() +{ + m_xDrawPage = NULL; +} + +Matrix4D createTransformationSceneToScreen( + const awt::Point& rPos, const awt::Size& rSize ) +{ + Matrix4D aM4; + aM4.Scale(double(rSize.Width)/FIXED_SIZE_FOR_3D_CHART_VOLUME + , -double(rSize.Height)/FIXED_SIZE_FOR_3D_CHART_VOLUME, 1.0 ); + aM4.Translate(double(rPos.X), double(rPos.Y+rSize.Height-1), 0); + return aM4; +} + +drawing::HomogenMatrix createTransformationMatrix() +{ + Matrix4D aM4; + aM4.RotateY( -ZDIRECTION*F_PI/9.0 ); + aM4.RotateX( ZDIRECTION*F_PI/10.0 ); + + //aM4.RotateY( ZDIRECTION*F_PI/2.0 ); + //aM4.RotateX( -ZDIRECTION*F_PI/2.0 ); + + //aM4.RotateX( -ZDIRECTION*F_PI/2.0 ); + + aM4.Translate(0, -FIXED_SIZE_FOR_3D_CHART_VOLUME/2.0, 0); +// aM4.Scale(1, 1, ZDIRECTION); //invert direction of z coordinate to get a left handed system + aM4.Scale(1.0, 1.0, ZDIRECTION); + drawing::HomogenMatrix aHM = Matrix4DToHomogenMatrix(aM4); + return aHM; +} + +ShapeAppearance getDefaultStyle( sal_Int32 nStyle ) +{ + switch(nStyle%8) + { + case 1: + return ShapeAppearance( 0, 0, GEOMETRY_CYLINDER, SYMBOL_DIAMOND ); + case 2: + return ShapeAppearance( 0, 0, GEOMETRY_PYRAMID, SYMBOL_ARROW_DOWN ); + case 3: + return ShapeAppearance( 0, 0, GEOMETRY_CONE, SYMBOL_ARROW_UP ); + case 4: + return ShapeAppearance( 0, 0, GEOMETRY_CUBOID, SYMBOL_ARROW_RIGHT ); + case 5: + return ShapeAppearance( 0, 0, GEOMETRY_CYLINDER, SYMBOL_ARROW_LEFT ); + case 6: + return ShapeAppearance( 0, 0, GEOMETRY_PYRAMID, SYMBOL_BOWTIE ); + case 7: + return ShapeAppearance( 0, 0, GEOMETRY_CONE, SYMBOL_SANDGLASS ); + default: + return ShapeAppearance( 0, 0, GEOMETRY_CUBOID, SYMBOL_SQUARE ); + } +} + +uno::Reference< drawing::XShapes > createDiagram( + const uno::Reference< drawing::XShapes>& xPageShapes + , const uno::Reference< lang::XMultiServiceFactory>& xShapeFactory + , const awt::Point& rPos, const awt::Size& rSize + , sal_Int32 nDimension + , const uno::Reference< XDiagram > & xDia + ) +{ + VDiagram aVDiagram(xDia, nDimension); + aVDiagram.init(xPageShapes,xPageShapes,xShapeFactory); + if(3==nDimension) + aVDiagram.setSceneMatrix( createTransformationMatrix() ); + aVDiagram.createShapes(rPos,rSize); + uno::Reference< drawing::XShapes > xTarget = aVDiagram.getCoordinateRegion(); + return xTarget; +} + +void getCoordinateOrigin( double* fCoordinateOrigin, const uno::Reference< XBoundedCoordinateSystem >& xCoordSys ) +{ + if(xCoordSys.is()) + try + { + uno::Sequence< uno::Any > aCoord( xCoordSys->getOrigin()); + if( aCoord.getLength() >= 1 ) + aCoord[0]>>=fCoordinateOrigin[0]; + if( aCoord.getLength() >= 2 ) + aCoord[1]>>=fCoordinateOrigin[1]; + if( aCoord.getLength() >= 3 ) + aCoord[2]>>=fCoordinateOrigin[2]; + } + catch( uno::Exception& ex) + { + ex; + } +} + +sal_Int32 getDimension( const uno::Reference< XDiagram >& xDiagram ) +{ + sal_Int32 nDimension = 2; + + //@todo maybe get the dimension better from diagram properties ... -> need model change + uno::Reference< XDataSeriesTreeParent > xTree = xDiagram->getTree(); + if(!xTree.is()) + return nDimension; + uno::Sequence< uno::Reference< XDataSeriesTreeNode > > aChartTypes( xTree->getChildren() ); + for( sal_Int32 i = 0; i < aChartTypes.getLength(); ++i ) + { + uno::Reference< XChartTypeGroup > xChartTypeGroup( aChartTypes[i], uno::UNO_QUERY ); + DBG_ASSERT(xChartTypeGroup.is(),"First node at the diagram tree needs to be a ChartTypeGroup"); + if( !xChartTypeGroup.is() ) + continue; + uno::Reference< XChartType > xChartType = xChartTypeGroup->getChartType(); + if( !xChartType.is() ) + continue; + uno::Reference< beans::XPropertySet > xChartTypeProp( xChartType, uno::UNO_QUERY ); + if( xChartTypeProp.is()) + { + try + { + if( !(xChartTypeProp->getPropertyValue( C2U( "Dimension" )) >>= nDimension) ) + { + DBG_ERROR( "Couldn't get Dimension from ChartTypeGroup" ); + } + } + catch( beans::UnknownPropertyException ex ) + { + ex; + } + break; + } + } + return nDimension; +} + +// void getCoordinateSystems( std::vector< VCoordinateSystem >& rVCooSysList, const uno::Reference< XDiagram >& xDiagram ) +// { +// uno::Reference< XBoundedCoordinateSystemContainer > xCooSysContainer = +// uno::Reference< XBoundedCoordinateSystemContainer >::query( xDiagram ); +// if(xCooSysContainer.is()) +// { +// uno::Sequence< uno::Reference< XBoundedCoordinateSystem > > aXCooSysList = xCooSysContainer->getCoordinateSystems(); +// for( sal_Int32 nC=0; nC < aXCooSysList.getLength(); nC++) +// { +// VCoordinateSystem aCooSys(aXCooSysList[nC]); + +// double fCoordinateOrigin[3] = { 0.0, 0.0, 0.0 }; +// getCoordinateOrigin( fCoordinateOrigin, aXCooSysList ); +// aCooSys.setOrigin(fCoordinateOrigin); + +// rVCooSysList.push_back( aCooSys ); +// } +// if(!aXCooSysList.getLength()) +// { +// //get coosys from diagram tree +// //... +// } +// } +// } + +const VCoordinateSystem* findInCooSysList( const std::vector< VCoordinateSystem >& rVCooSysList + , const uno::Reference< XBoundedCoordinateSystem >& xCooSys ) +{ + for( sal_Int32 nC=0; nC < rVCooSysList.size(); nC++) + { + const VCoordinateSystem& rVCooSys = rVCooSysList[nC]; + if(rVCooSys.getModel()==xCooSys) + return &rVCooSys; + } + return NULL; +} + +void addCooSysToList( std::vector< VCoordinateSystem >& rVCooSysList + , const uno::Reference< XBoundedCoordinateSystem >& xCooSys + , double fCoordinateOrigin [] ) +{ + if( !findInCooSysList( rVCooSysList, xCooSys ) ) + { + VCoordinateSystem aVCooSys(xCooSys); + aVCooSys.setOrigin(fCoordinateOrigin); + + rVCooSysList.push_back( aVCooSys ); + } +} + +void getAxesAndAddToCooSys( uno::Sequence< uno::Reference< XAxis > >& rAxisList + , const uno::Reference< XDiagram >& xDiagram + , std::vector< VCoordinateSystem >& rVCooSysList ) +{ + uno::Reference< XAxisContainer > xAxisContainer( xDiagram, uno::UNO_QUERY ); + if( xAxisContainer.is()) + { + rAxisList = xAxisContainer->getAxes(); + for( sal_Int32 nA = 0; nA < rAxisList.getLength(); nA++ ) + { + uno::Reference< XAxis > xAxis( rAxisList[nA] ); + for( sal_Int32 nC=0; nC < rVCooSysList.size(); nC++) + { + if(xAxis->getCoordinateSystem() == rVCooSysList[nC].getModel() ) + { + rVCooSysList[nC].addAxis( xAxis ); + } + } + } + } +} + +void addGridsToCooSys( const uno::Reference< XDiagram >& xDiagram + , std::vector< VCoordinateSystem >& rVCooSysList ) +{ + uno::Reference< XGridContainer > xGridContainer( xDiagram, uno::UNO_QUERY ); + if( xGridContainer.is()) + { + uno::Sequence< uno::Reference< XGrid > > aGridList( + xGridContainer->getGrids() ); + for( sal_Int32 nA = 0; nA < aGridList.getLength(); nA++ ) + { + uno::Reference< XGrid > xGrid( aGridList[nA] ); + for( sal_Int32 nC=0; nC < rVCooSysList.size(); nC++) + { + if(xGrid->getCoordinateSystem() == rVCooSysList[nC].getModel() ) + { + rVCooSysList[nC].addGrid( xGrid ); + } + } + } + } +} + +void initializeDiagramAndGetCooSys( std::vector< VCoordinateSystem >& rVCooSysList + , const uno::Reference< uno::XComponentContext>& xCC + , const uno::Reference< drawing::XShapes>& xPageShapes + , const uno::Reference< lang::XMultiServiceFactory>& xShapeFactory + , NumberFormatterWrapper* pNumberFormatterWrapper + , const awt::Point& rPos, const awt::Size& rSize + , const uno::Reference< frame::XModel >& xModel ) +{ + //------------ get model series from model + uno::Reference< XChartDocument > xChartDocument( xModel, uno::UNO_QUERY ); + if( !xChartDocument.is() ) + return; + uno::Reference< XDiagram > xDiagram = xChartDocument->getDiagram(); + if( !xDiagram.is()) + return; + + sal_Int32 nDimension = getDimension( xDiagram ); + + //------------ create Diagram shapes + uno::Reference< drawing::XShapes > xTarget = createDiagram( xPageShapes, xShapeFactory, rPos, rSize, nDimension, xDiagram ); + + //------------ get all coordinatesystems +// getCoordinateSystems( rVCooSysList, xDiagram ); + + //------------ add series to plotter and thus prepare him for providing minimum and maximum values + uno::Reference< XDataSeriesTreeParent > xTree = xDiagram->getTree(); + uno::Sequence< uno::Reference< XDataSeriesTreeNode > > aChartTypes( xTree->getChildren() ); + for( sal_Int32 i = 0; i < aChartTypes.getLength(); ++i ) + { + //iterate through different charttypes: + + uno::Reference< XChartTypeGroup > xChartTypeGroup( aChartTypes[i], uno::UNO_QUERY ); + DBG_ASSERT(xChartTypeGroup.is(),"First node at the diagram tree needs to be a ChartTypeGroup"); + if( !xChartTypeGroup.is() ) + continue; + ::std::auto_ptr< VSeriesPlotter > apPlotter( VSeriesPlotter::createSeriesPlotter( xChartTypeGroup->getChartType()->getChartType(), nDimension ) ); + + //------------ add series to plotter and thus prepare him for providing minimum and maximum values + + sal_Int32 nXSlot = -1; + sal_Int32 nYSlot = -1; + uno::Sequence< uno::Reference< XDataSeriesTreeNode > > aXSlots( xChartTypeGroup->getChildren() ); + for( sal_Int32 nX = 0; nX < aXSlots.getLength(); ++nX ) + { + uno::Reference< XDataSeriesTreeParent > xXSlot = uno::Reference< XDataSeriesTreeParent >::query( aXSlots[nX] ); + DBG_ASSERT( xXSlot.is(), "a node for the first dimension of a chart tree should always be a parent" ); + if(!xXSlot.is()) + return; + uno::Reference< XStackableScaleGroup > xStackGroup = uno::Reference< XStackableScaleGroup >::query( xXSlot ); + if( xStackGroup.is() && + xStackGroup->getStackMode()==StackMode_STACKED) + nXSlot++; + uno::Sequence< uno::Reference< XDataSeriesTreeNode > > aYSlots( + xXSlot->getChildren() ); + for( sal_Int32 nY = 0; nY < aYSlots.getLength(); ++nY ) + { + uno::Reference< XDataSeriesTreeParent > xYSlot = uno::Reference< XDataSeriesTreeParent >::query( aYSlots[nY] ); + DBG_ASSERT( xYSlot.is(), "a node for the second dimension of a chart tree should always be a parent" ); + if(!xYSlot.is()) + return; + + uno::Reference< XScaleGroup > xScaleGroup( xYSlot, uno::UNO_QUERY ); + + { + double fCoordinateOrigin[3] = { 0.0, 0.0, 0.0 }; + getCoordinateOrigin( fCoordinateOrigin, xScaleGroup->getCoordinateSystem() ); + addCooSysToList(rVCooSysList,xScaleGroup->getCoordinateSystem(),fCoordinateOrigin); + } + + uno::Reference< XStackableScaleGroup > xStackGroup = uno::Reference< XStackableScaleGroup >::query( xYSlot ); + StackMode aYStackMode = StackMode_NONE; + if(xStackGroup.is()) + aYStackMode = xStackGroup->getStackMode(); + if(aYStackMode==StackMode_STACKED) + nYSlot++; + uno::Sequence< uno::Reference< XDataSeriesTreeNode > > aSeriesList( xYSlot->getChildren() ); + for( sal_Int32 nS = 0; nS < aSeriesList.getLength(); ++nS ) + { + uno::Reference< XDataSeries > xDataSeries( aSeriesList[nS], uno::UNO_QUERY ); + + VDataSeries* pTestSeries = new VDataSeries( xDataSeries, getDefaultStyle(nS) ); + //virtual void addSeries( VDataSeries* pSeries, sal_Int32 xSlot = -1,sal_Int32 ySlot = -1 ); + sal_Int32 nXSlot = 0; + if(aYStackMode==StackMode_NONE) + nXSlot=-1; + //@todo + apPlotter->addSeries( pTestSeries, nXSlot ); + // apPlotter->addSeries( pTestSeries, nXSlot, nYSlot ); + /* + if(nN==nSeriesCount-1) + apPlotter->addSeries( pTestSeries, -1 ); + else + apPlotter->addSeries( pTestSeries, 0 ); + */ + } + } + } + + //------------ get all axes from model and add to VCoordinateSystems + uno::Sequence< uno::Reference< XAxis > > aAxisList; + getAxesAndAddToCooSys( aAxisList, xDiagram, rVCooSysList ); + + addGridsToCooSys( xDiagram, rVCooSysList ); + + + //------------ iterate through all coordinate systems + for( sal_Int32 nC=0; nC < rVCooSysList.size(); nC++) + { + //------------ create explicit scales and increments + VCoordinateSystem& rVCooSys = rVCooSysList[nC]; + rVCooSys.doAutoScale( apPlotter.get() ); + + const uno::Sequence< ExplicitScaleData >& rExplicitScales = rVCooSys.getExplicitScales(); + const uno::Sequence< ExplicitIncrementData >& rExplicitIncrements = rVCooSys.getExplicitIncrements(); + + double fCoordinateOrigin[3] = { 0.0, 0.0, 0.0 }; + for( sal_Int32 nDim = 0; nDim < 3; nDim++ ) + fCoordinateOrigin[nDim] = rVCooSys.getOriginByDimension( nDim ); + + Matrix4D aM4_SceneToScreen( createTransformationSceneToScreen(rPos,rSize) ); + drawing::HomogenMatrix aHM_SceneToScreen( Matrix4DToHomogenMatrix(aM4_SceneToScreen) ); + + //------------ create axes --- @todo do auto layout / fontscaling + for( nDim = 0; nDim < 3; nDim++ ) + { + uno::Reference< XAxis > xAxis = rVCooSys.getAxisByDimension(nDim); + if(xAxis.is() + &&2==nDimension) //@todo remove this restriction if 3D axes are available + { + AxisProperties aAxisProperties; + aAxisProperties.m_xAxisModel = xAxis; + aAxisProperties.m_pfExrtaLinePositionAtOtherAxis = + new double(nDim==1?fCoordinateOrigin[0]:fCoordinateOrigin[1]); + aAxisProperties.m_bTESTTEST_HorizontalAdjustmentIsLeft = sal_False; + //------------------- + VAxis aAxis(aAxisProperties,pNumberFormatterWrapper); + aAxis.setMeterData( rExplicitScales[nDim], rExplicitIncrements[nDim] ); + + aAxis.init(xTarget,xPageShapes,xShapeFactory); + if(2==nDimension) + aAxis.setTransformationSceneToScreen( aHM_SceneToScreen ); + aAxis.setScales( rExplicitScales ); + aAxis.createShapes(); + } + } + //------------ create grids + rVCooSys.createGridShapes( xShapeFactory, xTarget, aHM_SceneToScreen ); + + //------------ set scale to plotter + apPlotter->init(xTarget,xPageShapes,xShapeFactory); + if(2==nDimension) + apPlotter->setTransformationSceneToScreen( aHM_SceneToScreen ); + apPlotter->setScales( rExplicitScales ); + apPlotter->createShapes(); + } + } +} + +//------------------------------------------------------------- +//------------------------------------------------------------- +//------------------------------------------------------------- + +void ChartViewImpl::getExplicitValuesForMeter( + uno::Reference< XMeter > xMeter + , ExplicitScaleData& rExplicitScale + , ExplicitIncrementData& rExplicitIncrement + , double& rfExplicitOrigin ) +{ + if(!xMeter.is()) + return; + uno::Reference< XBoundedCoordinateSystem > xCooSys = xMeter->getCoordinateSystem(); + const VCoordinateSystem* pVCooSys = findInCooSysList(m_aVCooSysList,xCooSys); + if(!pVCooSys) + return; + const uno::Sequence< ExplicitScaleData >& rScales =pVCooSys->getExplicitScales(); + const uno::Sequence< ExplicitIncrementData >& rIncrements =pVCooSys->getExplicitIncrements(); + sal_Int32 nDim = xMeter->getRepresentedDimension(); + if(nDim<=rScales.getLength()) + rExplicitScale=rScales[nDim]; + if(nDim<=rIncrements.getLength()) + rExplicitIncrement=rIncrements[nDim]; + rfExplicitOrigin = pVCooSys->getOriginByDimension( nDim ); +} + +bool getPosAndSizeForDiagram( awt::Point& rPos, awt::Size& rSize, const awt::Size& rPageSize, sal_Int32 nYOffset ) +{ + if(rPageSize.Width <= 0 || rPageSize.Height <= 0 ) + return false; + + long nHeight = (rPageSize.Height-nYOffset)*5/6; + long nOffsetY = (rPageSize.Height-nYOffset)-nHeight; + nOffsetY /= 2; + nOffsetY += nYOffset; + + long nWidth = rPageSize.Width*5/6; + long nOffsetX = rPageSize.Width-nWidth; + nOffsetX /= 2; + + if( nHeight <= 0 || nWidth <= 0 ) + return false; + + rPos = awt::Point(nOffsetX,nOffsetY); + rSize = awt::Size(nWidth,nHeight); + return true; +} + +void createTitle( const uno::Reference< XTitle >& xTitle + , sal_Int32 nXPosition + , sal_Int32& nrYOffset + , const uno::Reference< drawing::XShapes>& xPageShapes + , const uno::Reference< lang::XMultiServiceFactory>& xShapeFactory + ) +{ + if(xTitle.is()) + { + VTitle aVTitle(xTitle); + aVTitle.init(xPageShapes,xShapeFactory); + aVTitle.createShapes( awt::Point(0,0) ); + awt::Size aTitleSize = aVTitle.getSize(); + sal_Int32 nYSpacing = aTitleSize.Height/2; + aVTitle.changePosition( awt::Point( nXPosition, nrYOffset + aTitleSize.Height/2 + nYSpacing ) ); + nrYOffset += aTitleSize.Height + nYSpacing; + } +} + +bool ChartViewImpl::create( const awt::Size& rPageSize ) +{ + uno::Reference<drawing::XShapes> xPageShapes = + uno::Reference<drawing::XShapes>( m_xDrawPage, uno::UNO_QUERY ); + + sal_Int32 nYOffset = 0; + sal_Int32 nXPosition = rPageSize.Width/2; + + //------------ create main title shape + createTitle( TitleHelper::getTitle( TitleHelper::MAIN_TITLE, m_xChartModel ) + , nXPosition, nYOffset, xPageShapes, m_xShapeFactory ); + if(nYOffset>=rPageSize.Height) + return true; + + //------------ create sub title shape + createTitle( TitleHelper::getTitle( TitleHelper::SUB_TITLE, m_xChartModel ) + , nXPosition, nYOffset, xPageShapes, m_xShapeFactory ); + if(nYOffset>=rPageSize.Height) + return true; + + //------------ create complete diagram shape (inclusive axis and series) + awt::Point aPosDia; + awt::Size aSizeDia; + if( getPosAndSizeForDiagram( aPosDia, aSizeDia, rPageSize, nYOffset ) ) + initializeDiagramAndGetCooSys( m_aVCooSysList + , m_xCC, xPageShapes, m_xShapeFactory, m_pNumberFormatterWrapper + , aPosDia ,aSizeDia + , m_xChartModel ); + return true; +} + +//............................................................................. +} //namespace chart +//............................................................................. diff --git a/chart2/source/view/main/Linear3DTransformation.cxx b/chart2/source/view/main/Linear3DTransformation.cxx new file mode 100644 index 000000000..ff33bf304 --- /dev/null +++ b/chart2/source/view/main/Linear3DTransformation.cxx @@ -0,0 +1,136 @@ +/************************************************************************* + * + * $RCSfile: Linear3DTransformation.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:34 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2002 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "Linear3DTransformation.hxx" + +using namespace ::com::sun::star; + +using ::com::sun::star::uno::Sequence; +using ::com::sun::star::uno::RuntimeException; + +namespace chart +{ + + Linear3DTransformation::Linear3DTransformation( const drawing::HomogenMatrix& rHomMatrix ) + : m_Matrix(rHomMatrix) +{} + +Linear3DTransformation::~Linear3DTransformation() +{} + +// ____ XTransformation ____ +Sequence< double > SAL_CALL Linear3DTransformation::transform( + const Sequence< double >& rSourceValues ) + throw (RuntimeException, + lang::IllegalArgumentException) +{ + /* + Vector3D aSource( SequenceToVector3D( rSourceValues ) ); + Vector3D aTarget = m_Matrix*aSource; + return Vector3DToSequence(aTarget); + */ + Sequence< double > aNewVec(3); + double fZwi; + + fZwi = m_Matrix.Line1.Column1 * rSourceValues[0] + + m_Matrix.Line1.Column2 * rSourceValues[1] + + m_Matrix.Line1.Column3 * rSourceValues[2] + + m_Matrix.Line1.Column4; + aNewVec[0] = fZwi; + + fZwi = m_Matrix.Line2.Column1 * rSourceValues[0] + + m_Matrix.Line2.Column2 * rSourceValues[1] + + m_Matrix.Line2.Column3 * rSourceValues[2] + + m_Matrix.Line2.Column4; + aNewVec[1] = fZwi; + + fZwi = m_Matrix.Line3.Column1 * rSourceValues[0] + + m_Matrix.Line3.Column2 * rSourceValues[1] + + m_Matrix.Line3.Column3 * rSourceValues[2] + + m_Matrix.Line3.Column4; + aNewVec[2] = fZwi; + + fZwi = m_Matrix.Line4.Column1 * rSourceValues[0] + + m_Matrix.Line4.Column2 * rSourceValues[1] + + m_Matrix.Line4.Column3 * rSourceValues[2] + + m_Matrix.Line4.Column4; + if(fZwi != 1.0 && fZwi != 0.0) + { + aNewVec[0] /= fZwi; + aNewVec[1] /= fZwi; + aNewVec[2] /= fZwi; + } + return aNewVec; +} + +sal_Int32 SAL_CALL Linear3DTransformation::getSourceDimension() + throw (RuntimeException) +{ + return 3; +} + +sal_Int32 SAL_CALL Linear3DTransformation::getTargetDimension() + throw (RuntimeException) +{ + return 3; +} + + +} // namespace chart diff --git a/chart2/source/view/main/NumberFormatterWrapper.cxx b/chart2/source/view/main/NumberFormatterWrapper.cxx new file mode 100644 index 000000000..06f5f4f6a --- /dev/null +++ b/chart2/source/view/main/NumberFormatterWrapper.cxx @@ -0,0 +1,208 @@ +/************************************************************************* + * + * $RCSfile: NumberFormatterWrapper.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:34 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "chartview/NumberFormatterWrapper.hxx" +#include "macros.hxx" + +#ifndef _COMPHELPER_PROCESSFACTORY_HXX_ +#include <comphelper/processfactory.hxx> +#endif +// header for class SvNumberformat +#ifndef _ZFORMAT_HXX +#include <svtools/zformat.hxx> +#endif +#ifndef _TOOLS_COLOR_HXX +#include <tools/color.hxx> +#endif +#ifndef _ISOLANG_HXX +#include <tools/isolang.hxx> +#endif + +//............................................................................. +namespace chart +{ +//............................................................................. +using namespace ::com::sun::star; +using namespace ::drafts::com::sun::star::chart2; + +FixedNumberFormatter::FixedNumberFormatter( + NumberFormatterWrapper* pNumberFormatterWrapper + , const ::drafts::com::sun::star::chart2::NumberFormat& rNumberFormat ) + : m_pNumberFormatterWrapper(pNumberFormatterWrapper) + , m_nFormatIndex(0) +{ + //add the given format string to the NumberFormatter and + //get the index of that format to use further + if( m_pNumberFormatterWrapper ) + m_nFormatIndex = m_pNumberFormatterWrapper->getKeyForNumberFormat( rNumberFormat ); +} + +FixedNumberFormatter::~FixedNumberFormatter() +{ +} + +/* +sal_Int32 FixedNumberFormatter::getTextAndColor( double fUnscaledValueForText, rtl::OUString& rLabel ) const +{ + sal_Int32 nLabelColor = Color(COL_BLUE).GetColor(); //@todo get this from somewheres + rLabel = getFormattedString( fUnscaledValueForText, nLabelColor ); + return nLabelColor; +} +*/ + +rtl::OUString FixedNumberFormatter::getFormattedString( double fValue, sal_Int32& rLabelColor, bool& rbColorChanged ) const +{ + String aText; + Color* pTextColor = NULL; + m_pNumberFormatterWrapper->m_pNumberFormatter->GetOutputString( + fValue, m_nFormatIndex, aText, &pTextColor); + rtl::OUString aRet( aText ); + + if(pTextColor) + { + rbColorChanged = true; + rLabelColor = pTextColor->GetColor(); + } + else + rbColorChanged = false; + + return aRet; +} + +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- + +NumberFormatterWrapper::NumberFormatterWrapper() + : m_pNumberFormatter(NULL) + +{ + //@todo: use a formatter via api (does not exsist so far) + m_pNumberFormatter = new SvNumberFormatter( + //m_xCC->getServiceManager() , + ::comphelper::getProcessServiceFactory(), + LANGUAGE_SYSTEM ); +} +NumberFormatterWrapper::~NumberFormatterWrapper() +{ + delete m_pNumberFormatter; +} + +SvNumberFormatter* NumberFormatterWrapper::getSvNumberFormatter() const +{ + return m_pNumberFormatter; +} + +LanguageType lcl_GetLanguage( const lang::Locale& rLocale ) +{ + // empty language -> LANGUAGE_SYSTEM + if ( rLocale.Language.getLength() == 0 ) + return LANGUAGE_SYSTEM; + + String aLangStr = rLocale.Language; + String aCtryStr = rLocale.Country; + // Variant is ignored + + LanguageType eRet = ConvertIsoNamesToLanguage( aLangStr, aCtryStr ); + if ( eRet == LANGUAGE_NONE ) + eRet = LANGUAGE_SYSTEM; //! or throw an exception? + + return eRet; +} + +sal_Int32 NumberFormatterWrapper::getKeyForNumberFormat( const NumberFormat& rNumberFormat ) const +{ + String aStr( rNumberFormat.aFormat ); + LanguageType eLnge = lcl_GetLanguage( rNumberFormat.aLocale ); + return m_pNumberFormatter->GetEntryKey( aStr, eLnge ); +} + +NumberFormat NumberFormatterWrapper::getNumberFormatForKey( sal_Int32 nIndex ) const +{ + const SvNumberformat* pSvNumberformat = m_pNumberFormatter->GetEntry( nIndex ); + + NumberFormat aNumberFormat; + aNumberFormat.aFormat = pSvNumberformat->GetFormatstring(); + LanguageType nLanguageType = pSvNumberformat->GetLanguage(); + aNumberFormat.aLocale = SvNumberFormatter::ConvertLanguageToLocale( nLanguageType ); + return aNumberFormat; +} + +/* + uno::Reference< i18n::XNumberFormatCode > xNumberFormatCode( + m_xCC->getServiceManager()->createInstanceWithContext( C2U( + "com.sun.star.i18n.NumberFormatMapper" ), m_xCC ), uno::UNO_QUERY ); + + i18n::NumberFormatCode aNumberFormatCode = xNumberFormatCode->getDefault ( + i18n::KNumberFormatType::MEDIUM, + i18n::KNumberFormatUsage::SCIENTIFIC_NUMBER, + aLocale ); + + uno::Sequence< i18n::NumberFormatCode > aListOfNumberFormatCode = xNumberFormatCode->getAllFormatCode( + i18n::KNumberFormatUsage::SCIENTIFIC_NUMBER, + aLocale ); + + i18n::NumberFormatCode aNumberFormatCode0 = aListOfNumberFormatCode[0]; + i18n::NumberFormatCode aNumberFormatCode1 = aListOfNumberFormatCode[1]; +*/ + +//............................................................................. +} //namespace chart +//............................................................................. diff --git a/chart2/source/view/main/PlotterBase.cxx b/chart2/source/view/main/PlotterBase.cxx new file mode 100644 index 000000000..e1558e135 --- /dev/null +++ b/chart2/source/view/main/PlotterBase.cxx @@ -0,0 +1,244 @@ +/************************************************************************* + * + * $RCSfile: PlotterBase.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:34 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "PlotterBase.hxx" +#include "PlottingPositionHelper.hxx" +#include "ShapeFactory.hxx" + +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_DATACAPTIONSTYLE_HPP_ +#include <drafts/com/sun/star/chart2/DataCaptionStyle.hpp> +#endif + +/* +#ifndef _SV_GEN_HXX +#include <vcl/gen.hxx> +#endif +*/ +#ifndef _TOOLS_DEBUG_HXX +#include <tools/debug.hxx> +#endif + +//............................................................................. +namespace chart +{ +//............................................................................. +using namespace ::com::sun::star; +using namespace ::drafts::com::sun::star::chart2; + +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- + +PlotterBase::PlotterBase( sal_Int32 nDimensionCount ) + : m_xLogicTarget(NULL) + , m_xFinalTarget(NULL) + , m_xShapeFactory(NULL) + , m_pShapeFactory(NULL) + , m_nDimension(nDimensionCount) + , m_pPosHelper(NULL) +{ +} + + void SAL_CALL PlotterBase +::init( const uno::Reference< drawing::XShapes >& xLogicTarget + , const uno::Reference< drawing::XShapes >& xFinalTarget + , const uno::Reference< lang::XMultiServiceFactory >& xShapeFactory ) + throw (uno::RuntimeException) +{ + DBG_ASSERT(xLogicTarget.is()&&xFinalTarget.is()&&xShapeFactory.is(),"no proper initialization parameters"); + //is only allowed to be called once + m_xLogicTarget = xLogicTarget; + m_xFinalTarget = xFinalTarget; + m_xShapeFactory = xShapeFactory; + m_pShapeFactory = new ShapeFactory(xShapeFactory); +} + +PlotterBase::~PlotterBase() +{ + delete m_pShapeFactory; +} + +void SAL_CALL PlotterBase::setScales( const uno::Sequence< ExplicitScaleData >& rScales ) + throw (uno::RuntimeException) +{ + DBG_ASSERT(m_nDimension<=rScales.getLength(),"Dimension of Plotter does not fit two dimension of given scale sequence"); + m_pPosHelper->setScales( rScales ); +} + + +void PlotterBase::setTransformationSceneToScreen( const drawing::HomogenMatrix& rMatrix) +{ + DBG_ASSERT(m_nDimension==2,"Set this transformation only in case of 2D"); + if(m_nDimension!=2) + return; + m_pPosHelper->setTransformationSceneToScreen( rMatrix ); +} + +uno::Reference< drawing::XShapes > PlotterBase::createGroupShape( + const uno::Reference< drawing::XShapes >& xTarget + , const ::rtl::OUString& rName ) +{ + if(!m_xShapeFactory.is()) + return NULL; + + if(m_nDimension==2) + { + //create and add to target + return m_pShapeFactory->createGroup2D( xTarget, rName ); + } + else + { + //create and added to target + return m_pShapeFactory->createGroup3D( xTarget, rName ); + } +} + +/* +//----------------------------------------------------------------- +// chart2::XPlotter +//----------------------------------------------------------------- + + ::rtl::OUString SAL_CALL PlotterBase +::getCoordinateSystemTypeID() + throw (uno::RuntimeException) +{ + return CHART2_COOSYSTEM_CARTESIAN2D_SERVICE_NAME; +} + + void SAL_CALL PlotterBase +::setScales( const uno::Sequence< ExplicitScaleData >& rScales ) throw (uno::RuntimeException) +{ +} + void SAL_CALL PlotterBase +::setTransformation( const uno::Reference< XTransformation >& xTransformationToLogicTarget, const uno::Reference< XTransformation >& xTransformationToFinalPage ) throw (uno::RuntimeException) +{ +} +*/ + +//e.g. for Rectangle +/* +uno::Reference< drawing::XShape > PlotterBase::createPartialPointShape( + CooPoint + series dependent properties ...(create a special struct for each chart type) + , uno::Reference< XThinCoordinateSystem > xCoo + , sal_Bool bIsInBreak + , PointStyle* pStyle ) +{ + //create one here; use scaling and transformation to logic target + + //maybe do not show anything in the break //maybe read the behavior out of the configuration + //if(bIsInBreak) + // return NULL; + + uno::Reference< drawing::XShape > xNewPartialPointShape( + m_xShapeFactory->createInstance( + rtl::OUString::createFromAscii( "com.sun.star.drawing.RectangleShape" ) ) + , uno::UNO_QUERY ); + //set size and position + { + // + } + if(pStyle||bIsInBreak) + { + //set style properties if any for a single point + uno::Reference< beans::XPropertySet > xProp( xNewPartialPointShape, uno::UNO_QUERY ); + xProp->setPropertyValue( ... ); + + //set special properties if point in break (e.g. additional transparency ...) + } +} + +//e.g. for PlotterBase in 2 dim cartesian coordinates: +sal_Bool ShapeFactory::isShown( const Sequence< ExplicitScaleData >& rScales, const CooPoint& rP, double dLogicalWidthBeforeScaling ) +{ + ASSERT(rScales.getLength()==2) + double dMin_x = rScales[0].Minimum; + double dMax_x = rScales[0].Maximum; + double dMin_y = rScales[1].Minimum; + double dMax_y = rScales[1].Maximum; + + //we know that we have cartesian geometry + Rectangle aSysRect( rScales[0].Minimum, rScales[1].Maximum, rScales[0].Maximum, rScales[1].Minimum ); + Rectangle aPointRect( dLogicalWidthBeforeScaling ) + if(rP) +} + +//----------------------------------------------------------------------------- + +class FatCoordinateSystem +{ +public: + //XCoordinateSystemType getType(); + Sequence<XThinCoordinateSystem> getCoordinateSystems(); +} + +class ThinCoordinateSystem +{ +private: + +public: + sal_Bool isBreak(); + Sequence< ExplicitScaleData > getScales();//SubScales without beak + + +} +*/ +//............................................................................. +} //namespace chart +//............................................................................. diff --git a/chart2/source/view/main/PlottingPositionHelper.cxx b/chart2/source/view/main/PlottingPositionHelper.cxx new file mode 100644 index 000000000..c05355a37 --- /dev/null +++ b/chart2/source/view/main/PlottingPositionHelper.cxx @@ -0,0 +1,188 @@ +/************************************************************************* + * + * $RCSfile: PlottingPositionHelper.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:34 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "PlottingPositionHelper.hxx" +#include "CommonConverters.hxx" +#include "ViewDefines.hxx" +#include "Linear3DTransformation.hxx" + +#ifndef _COM_SUN_STAR_DRAWING_POSITION3D_HPP_ +#include <com/sun/star/drawing/Position3D.hpp> +#endif + +//............................................................................. +namespace chart +{ +//............................................................................. +using namespace ::com::sun::star; +using namespace ::drafts::com::sun::star::chart2; + +PlottingPositionHelper::PlottingPositionHelper() + : m_aScales() + , m_aMatrixScreenToScene() + , m_xTransformationLogicToScene(NULL) + +{ +} + +PlottingPositionHelper::~PlottingPositionHelper() +{ + +} + +void PlottingPositionHelper::setTransformationSceneToScreen( const drawing::HomogenMatrix& rMatrix) +{ + m_aMatrixScreenToScene = HomogenMatrixToMatrix4D(rMatrix); + m_xTransformationLogicToScene = NULL; +} + +void PlottingPositionHelper::setScales( const uno::Sequence< ExplicitScaleData >& rScales ) +{ + m_aScales = rScales; + m_xTransformationLogicToScene = NULL; +} + +uno::Reference< XTransformation > PlottingPositionHelper::getTransformationLogicToScene() const +{ + //this is a standard transformation for a cartesian coordinate system + + //transformation from 2) to 4) //@todo 2) and 4) need a ink to a document + + //we need to apply this transformation to each geometric object because of a bug/problem + //of the old drawing layer (the UNO_NAME_3D_EXTRUDE_DEPTH is an integer value instead of an double ) + if(!m_xTransformationLogicToScene.is()) + { + Matrix4D aMatrix; + double MinX = getLogicMinX(); + double MinY = getLogicMinY(); + double MinZ = getLogicMinZ(); + double MaxX = getLogicMaxX(); + double MaxY = getLogicMaxY(); + double MaxZ = getLogicMaxZ(); + + //apply scaling + doLogicScaling( &MinX, &MinY, &MinZ ); + doLogicScaling( &MaxX, &MaxY, &MaxZ); + + aMatrix.TranslateX(-MinX); + aMatrix.TranslateY(-MinY); + aMatrix.TranslateZ(-MinZ); + + double fWidthX = MaxX - MinX; + double fWidthY = MaxY - MinY; + double fWidthZ = MaxZ - MinZ; + + aMatrix.ScaleX(FIXED_SIZE_FOR_3D_CHART_VOLUME/fWidthX); + aMatrix.ScaleY(FIXED_SIZE_FOR_3D_CHART_VOLUME/fWidthY); + aMatrix.ScaleZ(FIXED_SIZE_FOR_3D_CHART_VOLUME/fWidthZ); + + aMatrix = aMatrix*m_aMatrixScreenToScene; + + m_xTransformationLogicToScene = new Linear3DTransformation(Matrix4DToHomogenMatrix( aMatrix )); + } + return m_xTransformationLogicToScene; +} + +void PlottingPositionHelper::getScreenValuesForMinimum( uno::Sequence< double >& rSeq ) const +{ + double fX = this->getLogicMinX(); + double fY = this->getLogicMinY(); + double fZ = this->getLogicMinZ(); + + this->doLogicScaling( &fX,&fY,&fZ ); + drawing::Position3D aPos( fX, fY, fZ); + + uno::Reference< XTransformation > xTransformation = + this->getTransformationLogicToScene(); + rSeq = xTransformation->transform( Position3DToSequence(aPos) ); +} + +void PlottingPositionHelper::getScreenValuesForMaximum( uno::Sequence< double >& rSeq ) const +{ + double fX = this->getLogicMaxX(); + double fY = this->getLogicMaxY(); + double fZ = this->getLogicMaxZ(); + + this->doLogicScaling( &fX,&fY,&fZ ); + drawing::Position3D aPos( fX, fY, fZ); + + uno::Reference< XTransformation > xTransformation = + this->getTransformationLogicToScene(); + rSeq = xTransformation->transform( Position3DToSequence(aPos) ); +} + +void PlottingPositionHelper::getLogicMinimum( ::com::sun::star::uno::Sequence< double >& rSeq ) const +{ + rSeq.realloc(3); + rSeq[0] = this->getLogicMinX(); + rSeq[1] = this->getLogicMinY(); + rSeq[2] = this->getLogicMinZ(); +} +void PlottingPositionHelper::getLogicMaximum( ::com::sun::star::uno::Sequence< double >& rSeq ) const +{ + rSeq.realloc(3); + rSeq[0] = this->getLogicMaxX(); + rSeq[1] = this->getLogicMaxY(); + rSeq[2] = this->getLogicMaxZ(); +} + +//............................................................................. +} //namespace chart +//............................................................................. diff --git a/chart2/source/view/main/PropertyMapper.cxx b/chart2/source/view/main/PropertyMapper.cxx new file mode 100644 index 000000000..aedf30cd0 --- /dev/null +++ b/chart2/source/view/main/PropertyMapper.cxx @@ -0,0 +1,358 @@ +/************************************************************************* + * + * $RCSfile: PropertyMapper.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:34 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "PropertyMapper.hxx" +#include "macros.hxx" + +#ifndef _COM_SUN_STAR_BEANS_XMULTIPROPERTYSET_HPP_ +#include <com/sun/star/beans/XMultiPropertySet.hpp> +#endif + +//............................................................................. +namespace chart +{ +//............................................................................. +using namespace ::com::sun::star; + +//static +void PropertyMapper::setMappedProperties( + const uno::Reference< beans::XPropertySet >& xTarget + , const uno::Reference< beans::XPropertySet >& xSource + , const tPropertyNameMap& rMap ) +{ + if( !xTarget.is() || !xSource.is() ) + return; + + uno::Reference< beans::XMultiPropertySet > xMultiProp( xTarget, uno::UNO_QUERY ); + if( xMultiProp.is() ) + { + tNameSequence aNames; + tAnySequence aValues; + getMultiPropertyLists(aNames, aValues, xSource, rMap ); + try + { + xMultiProp->setPropertyValues( aNames,aValues ); + } + catch( uno::Exception& e ) + { + e; + } + } + else + { + tPropertyNameMap::const_iterator aIt( rMap.begin() ); + tPropertyNameMap::const_iterator aEnd( rMap.end() ); + for( ; aIt != aEnd; ++aIt ) + { + rtl::OUString aTarget = aIt->first; + rtl::OUString aSource = aIt->second; + try + { + uno::Any aAny( xSource->getPropertyValue(aSource) ); + xTarget->setPropertyValue( aTarget, aAny ); + } + catch( uno::Exception& e ) + { + e; + } + } + } +} + +void PropertyMapper::getValueMap( + tPropertyNameValueMap& rValueMap + , const tPropertyNameMap& rNameMap + , const uno::Reference< beans::XPropertySet >& xSourceProp + ) +{ + tPropertyNameMap::const_iterator aIt( rNameMap.begin() ); + tPropertyNameMap::const_iterator aEnd( rNameMap.end() ); + + for( ; aIt != aEnd; ++aIt ) + { + rtl::OUString aTarget = aIt->first; + rtl::OUString aSource = aIt->second; + try + { + uno::Any aAny( xSourceProp->getPropertyValue(aSource) ); + if( aAny.hasValue() ) + rValueMap.insert( tPropertyNameValueMap::value_type( aTarget, aAny ) ); + } + catch( uno::Exception& e ) + { + e; + } + } +} + +void PropertyMapper::getMultiPropertyLists( + tNameSequence& rNames + , tAnySequence& rValues + , const uno::Reference< beans::XPropertySet >& xSourceProp + , const tPropertyNameMap& rNameMap + ) +{ + tPropertyNameValueMap aValueMap; + getValueMap( aValueMap, rNameMap, xSourceProp ); + getMultiPropertyListsFromValueMap( rNames, rValues, aValueMap ); +} + +void PropertyMapper::getMultiPropertyListsFromValueMap( + tNameSequence& rNames + , tAnySequence& rValues + , const tPropertyNameValueMap& rValueMap + ) +{ + sal_Int32 nPropertyCount = rValueMap.size(); + rNames.realloc(nPropertyCount); + rValues.realloc(nPropertyCount); + + //fill sequences + tPropertyNameValueMap::const_iterator aValueIt( rValueMap.begin() ); + tPropertyNameValueMap::const_iterator aValueEnd( rValueMap.end() ); + sal_Int32 nN=0; + for( ; aValueIt != aValueEnd; ++aValueIt ) + { + const uno::Any& rAny = aValueIt->second; + if( rAny.hasValue() ) + { + //do not set empty anys because of performance (otherwise SdrAttrObj::ItemChange will take much longer) + rNames[nN] = aValueIt->first; + rValues[nN] = rAny; + ++nN; + } + } + //reduce to real property count + rNames.realloc(nN); + rValues.realloc(nN); +} + +uno::Any* PropertyMapper::getValuePointer( tAnySequence& rPropValues + , const tNameSequence& rPropNames + , const rtl::OUString& rPropName ) +{ + sal_Int32 nCount = rPropNames.getLength(); + for( sal_Int32 nN = 0; nN < nCount; nN++ ) + { + if(rPropNames[nN].equals(rPropName)) + return &rPropValues[nN]; + } + return NULL; +} + +/* +//set some properties from service style::CharacterProperties: +//-------- tabpage: Zeichen ----------- +//Schriftart z.B. Albany UNO_NAME_EDIT_CHAR_FONTNAME == UNO_NAME_EDIT_CHAR_FONTSTYLENAME //UNO_NAME_CHAR_FONT +//Schriftschnitt z.B. kursiv UNO_NAME_EDIT_CHAR_POSTURE UNO_NAME_CHAR_POSTURE awt::FontSlant NONE OBLIQUE ITALIC DONTKNOW REVERSE_OBLIQUE REVERSE_ITALIC +//Schriftgrad (Punktgrsse z.B. 12) UNO_NAME_EDIT_CHAR_HEIGHT == UNO_NAME_CHAR_HEIGHT + //? UNO_NAME_EDIT_CHAR_WEIGHT == UNO_NAME_CHAR_WEIGHT +//Sprache UNO_NAME_EDIT_CHAR_LOCALE lang::Locale + +//-------- tabpage: Schrifteffekt ----------- +//Unterstreichung UNO_NAME_CHAR_UNDERLINE sal_Int16 awt::FontUnderline_NONE _SINGLE _DOUBLE _DOTTED _DONTKNOW _DASH ... +//Unterstreichung-farbe ??? 'CharUnderlineColor' + CharUnderlineHasColor +//Durchstreichung z.B. doppelt "CharStrikeout" sal_Int16 awt::FontStrikeout_NONE _SINGLE _DOUBLE ... +//wortweise-Durchstreichung ja/nein "CharWordMode" bool +//Schriftfarbe UNO_NAME_EDIT_CHAR_COLOR sal_Int32 UNO_NAME_CHAR_COLOR +//ReliefArt ohne/erhaben/tief "CharRelief" sal_Int16 text::FontRelief_NONE FontRelief_EMBOSSED FontRelief_ENGRAVED +//Kontur "CharContoured" bool +//Schatten UNO_NAME_CHAR_SHADOWED bool +*/ + +//static +const tMakePropertyNameMap& PropertyMapper::getPropertyNameMapForCharacterProperties() +{ + //shape property -- chart model object property + static tMakePropertyNameMap m_aShapePropertyMapForCharacterProperties = + tMakePropertyNameMap + ( C2U( "CharFontName" ), C2U("CharFontName") ) + ( C2U( "CharFontStyleName" ), C2U("CharFontStyleName") ) + ( C2U( "CharFontFamily" ), C2U("CharFontFamily") ) + ( C2U( "CharFontCharSet" ), C2U("CharFontCharSet") ) + ( C2U( "CharFontPitch" ), C2U("CharFontPitch") ) + ( C2U( "CharColor" ), C2U("CharColor") ) +// ( C2U( "CharBackColor" ), C2U("TextBackgroundColor") ) + ( C2U( "CharEscapement" ), C2U("CharEscapement") ) + ( C2U( "CharHeight" ), C2U("CharHeight") ) + ( C2U( "CharUnderline" ), C2U("CharUnderline") ) + ( C2U( "CharUnderlineColor" ), C2U("CharUnderlineColor") ) + ( C2U( "CharUnderlineHasColor" ), C2U("CharUnderlineHasColor") ) + ( C2U( "CharWeight" ), C2U("CharWeight") ) + ( C2U( "CharPosture" ), C2U("CharPosture") ) + ( C2U( "CharKerning" ), C2U("CharKerning") ) +// ( C2U( "CharCaseMap" ), C2U("CaseMapping") ) +// ( C2U( "CharRotation" ), C2U("Rotation") ) --> additional feature ... +// ( C2U( "CharScaleWidth" ), C2U("CharScaleWidth") ) +// ( C2U( "CharEscapementHeight" ), C2U("EscapementHeight") ) -> assertion +/////// ( C2U( "CharCrossedOut" ), C2U("CharCrossedOut") ) //setting this explicitly somehow conflicts with CharStrikeout + ( C2U( "CharStrikeout" ), C2U("CharStrikeout") ) + ( C2U( "CharWordMode" ), C2U("CharWordMode") ) +// ( C2U( "CharFlash" ), C2U("Flashing") ) + ( C2U( "CharLocale" ), C2U("CharLocale") ) + ( C2U( "CharShadowed" ), C2U("CharShadowed") ) + ( C2U( "CharContoured" ), C2U("CharContoured") ) + ( C2U( "CharRelief" ), C2U("CharRelief") ) + ( C2U( "CharEmphasis" ), C2U("CharEmphasis") )//the service style::CharacterProperties describes a property called 'CharEmphasize' wich is nowhere implemented +// ( C2U( "RubyText" ), C2U("RubyText") ) +// ( C2U( "RubyAdjust" ), C2U("RubyAdjust") ) +// ( C2U( "RubyCharStyleName" ), C2U("RubyStyleName") ) +// ( C2U( "RubyIsAbove" ), C2U("RubyIsAbove") ) +// ( C2U( "CharNoHyphenation" ), C2U("InhibitHyphenation") ) + ( C2U( "CharFontStyleNameAsian" ), C2U("CharFontNameAsian") ) + ( C2U( "CharFontStyleNameAsian" ), C2U("CharFontStyleNameAsian") ) + ( C2U( "CharFontFamilyAsian" ), C2U("CharFontFamilyAsian") ) + ( C2U( "CharFontCharSetAsian" ), C2U("CharFontCharSetAsian") ) + ( C2U( "CharFontPitchAsian" ), C2U("CharFontPitchAsian") ) + ( C2U( "CharHeightAsian" ), C2U("CharHeightAsian") ) + ( C2U( "CharWeightAsian" ), C2U("CharWeightAsian") ) + ( C2U( "CharPostureAsian" ), C2U("CharPostureAsian") ) + ( C2U( "CharLocaleAsian" ), C2U("CharLocaleAsian") ) + + ( C2U( "CharFontStyleNameComplex" ), C2U("CharFontNameComplex") ) + ( C2U( "CharFontStyleNameComplex" ), C2U("CharFontStyleNameComplex") ) + ( C2U( "CharFontFamilyComplex" ), C2U("CharFontFamilyComplex") ) + ( C2U( "CharFontCharSetComplex" ), C2U("CharFontCharSetComplex") ) + ( C2U( "CharFontPitchComplex" ), C2U("CharFontPitchComplex") ) + ( C2U( "CharHeightComplex" ), C2U("CharHeightComplex") ) + ( C2U( "CharWeightComplex" ), C2U("CharWeightComplex") ) + ( C2U( "CharPostureComplex" ), C2U("CharPostureComplex") ) + ( C2U( "CharLocaleComplex" ), C2U("CharLocaleComplex") ) + ; + return m_aShapePropertyMapForCharacterProperties; +} + +//static +const tMakePropertyNameMap& PropertyMapper::getPropertyNameMapForParagraphProperties() +{ + //shape property -- chart model object property + static tMakePropertyNameMap m_aShapePropertyMapForParagraphProperties = + tMakePropertyNameMap + ( C2U( "ParaAdjust" ), C2U("ParaAdjust") ) + ( C2U( "ParaLastLineAdjust" ), C2U("ParaLastLineAdjust") ) + ( C2U( "ParaLeftMargin" ), C2U("ParaLeftMargin") ) + ( C2U( "ParaRightMargin" ), C2U("ParaRightMargin") ) + ( C2U( "ParaTopMargin" ), C2U("ParaTopMargin") ) + ( C2U( "ParaBottomMargin" ), C2U("ParaBottomMargin") ) + ( C2U( "ParaIsHyphenation" ), C2U("ParaIsHyphenation") ) + ; + return m_aShapePropertyMapForParagraphProperties; +} + +//static +const tMakePropertyNameMap& PropertyMapper::getPropertyNameMapForFillProperties() +{ + //shape property -- chart model object property + static tMakePropertyNameMap m_aShapePropertyMapForFillProperties = + tMakePropertyNameMap + ( C2U( "FillStyle" ), C2U("FillStyle") ) + ( C2U( "FillColor" ), C2U("FillColor") ) + ( C2U( "FillTransparence" ), C2U("FillTransparence") ) + ( C2U( "FillGradient" ), C2U("FillGradient") ) + ( C2U( "FillHatch" ), C2U("FillHatch") ) +// ( C2U( "FillTransparenceGradientName" ), C2U("TransparencyStyle") ) //@todo this property name seems to be wrong in chart model +// ( C2U( "FillTransparenceGradient" ), C2U("TransparencyGradient") ) //@todo this property name seems to be wrong in chart model + ; + return m_aShapePropertyMapForFillProperties; +} + +//static +const tMakePropertyNameMap& PropertyMapper::getPropertyNameMapForLineProperties() +{ + //shape property -- chart model object property + static tMakePropertyNameMap m_aShapePropertyMapForLineProperties = + tMakePropertyNameMap + ( C2U( "LineStyle" ), C2U("LineStyle") ) + ( C2U( "LineWidth" ), C2U("LineWidth") ) + ( C2U( "LineDash" ), C2U("LineDash") ) + ( C2U( "LineColor" ), C2U("LineColor") ) + ( C2U( "LineTransparence" ), C2U("LineTransparence") ) + ( C2U( "LineJoint" ), C2U("LineJoint") ) + ; + return m_aShapePropertyMapForLineProperties; +} + +//static +void PropertyMapper::setMultiProperties( + const tNameSequence& rNames + , const tAnySequence& rValues + , const uno::Reference< drawing::XShape >& xTarget ) +{ + try + { + uno::Reference< beans::XMultiPropertySet > xShapeMultiProp( xTarget, uno::UNO_QUERY ); + if( xShapeMultiProp.is() ) + { + xShapeMultiProp->setPropertyValues( rNames,rValues ); + } + else + { + //@todo: if no multipropertyset is available try the unperformant normal XPropertySet + } + } + catch( uno::Exception& e ) + { + e; + } +} + +//............................................................................. +} //namespace chart +//............................................................................. diff --git a/chart2/source/view/main/ShapeFactory.cxx b/chart2/source/view/main/ShapeFactory.cxx new file mode 100644 index 000000000..7f34e0bc2 --- /dev/null +++ b/chart2/source/view/main/ShapeFactory.cxx @@ -0,0 +1,1978 @@ +/************************************************************************* + * + * $RCSfile: ShapeFactory.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:34 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "ShapeFactory.hxx" +#include "ViewDefines.hxx" +#include "Stripe.hxx" +#include "CommonConverters.hxx" +#include "macros.hxx" +#include "InlineContainer.hxx" +#include "PropertyMapper.hxx" + +/* +#ifndef _E3D_EXTRUD3D_HXX +#include <svx/extrud3d.hxx> +#endif +*/ + +#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_ +#include <com/sun/star/beans/XPropertySet.hpp> +#endif +/* +#ifndef _COM_SUN_STAR_DRAWING_CAMERAGEOMETRY_HPP_ +#include <com/sun/star/drawing/CameraGeometry.hpp> +#endif +*/ +#ifndef _COM_SUN_STAR_DRAWING_CIRCLEKIND_HPP_ +#include <com/sun/star/drawing/CircleKind.hpp> +#endif +#ifndef _COM_SUN_STAR_DRAWING_DOUBLESEQUENCE_HPP_ +#include <com/sun/star/drawing/DoubleSequence.hpp> +#endif +#ifndef _COM_SUN_STAR_DRAWING_FLAGSEQUENCE_HPP_ +#include <com/sun/star/drawing/FlagSequence.hpp> +#endif +#ifndef _COM_SUN_STAR_DRAWING_LINESTYLE_HPP_ +#include <com/sun/star/drawing/LineStyle.hpp> +#endif +#ifndef _COM_SUN_STAR_DRAWING_NORMALSKIND_HPP_ +#include <com/sun/star/drawing/NormalsKind.hpp> +#endif +#ifndef _COM_SUN_STAR_DRAWING_POINTSEQUENCE_HPP_ +#include <com/sun/star/drawing/PointSequence.hpp> +#endif +#ifndef _COM_SUN_STAR_DRAWING_POLYGONKIND_HPP_ +#include <com/sun/star/drawing/PolygonKind.hpp> +#endif +#ifndef _COM_SUN_STAR_DRAWING_POLYPOLYGONBEZIERCOORDS_HPP_ +#include <com/sun/star/drawing/PolyPolygonBezierCoords.hpp> +#endif +#ifndef _COM_SUN_STAR_DRAWING_PROJECTIONMODE_HPP_ +#include <com/sun/star/drawing/ProjectionMode.hpp> +#endif +#ifndef _COM_SUN_STAR_DRAWING_SHADEMODE_HPP_ +#include <com/sun/star/drawing/ShadeMode.hpp> +#endif +#ifndef _COM_SUN_STAR_DRAWING_TEXTFITTOSIZETYPE_HPP_ +#include <com/sun/star/drawing/TextFitToSizeType.hpp> +#endif +#ifndef _COM_SUN_STAR_DRAWING_TEXTVERTICALADJUST_HPP_ +#include <com/sun/star/drawing/TextVerticalAdjust.hpp> +#endif +#ifndef _COM_SUN_STAR_DRAWING_TEXTHORIZONTALADJUST_HPP_ +#include <com/sun/star/drawing/TextHorizontalAdjust.hpp> +#endif +#ifndef _COM_SUN_STAR_TEXT_XTEXT_HPP_ +#include <com/sun/star/text/XText.hpp> +#endif +/* +#ifndef _COM_SUN_STAR_DRAWING_TEXTUREMODE_HPP_ +#include <com/sun/star/drawing/TextureMode.hpp> +#endif +*/ + +//only test +/* +#ifndef _COM_SUN_STAR_AWT_FONTSTRIKEOUT_HPP_ +#include <com/sun/star/awt/FontStrikeout.hpp> +#endif +#ifndef _COM_SUN_STAR_TEXT_FONTEMPHASIS_HPP_ +#include <com/sun/star/text/FontEmphasis.hpp> +#endif +#ifndef _COM_SUN_STAR_CONTAINER_XENUMERATION_HPP_ +#include <com/sun/star/container/XEnumeration.hpp> +#endif +#ifndef _COM_SUN_STAR_CONTAINER_XENUMERATIONACCESS_HPP_ +#include <com/sun/star/container/XEnumerationAccess.hpp> +#endif +*/ + +#ifndef _COM_SUN_STAR_UNO_ANY_HXX_ +#include <com/sun/star/uno/Any.hxx> +#endif + + +#ifndef _SVX_UNOPRNMS_HXX +#include <svx/unoprnms.hxx> +#endif +#ifndef _TOOLS_COLOR_HXX +#include <tools/color.hxx> +#endif +#ifndef _TOOLS_DEBUG_HXX +#include <tools/debug.hxx> +#endif + +#ifndef INCLUDED_RTL_MATH_HXX +#include <rtl/math.hxx> +#endif + +#ifndef _XPOLY_HXX +#include <svx/xpoly.hxx> +#endif +#ifndef _SVDOCIRC_HXX +#include <svx/svdocirc.hxx> +#endif +#ifndef _SVDOPATH_HXX +#include <svx/svdopath.hxx> +#endif + +#include <algorithm> + +using namespace ::com::sun::star; + +//............................................................................. +namespace chart +{ +//............................................................................. + +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +// set a name/CID at a shape (is used for selection handling) +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- + +//static +void ShapeFactory::setShapeName( const uno::Reference< drawing::XShape >& xShape + , const rtl::OUString& rName ) +{ + uno::Reference< beans::XPropertySet > xProp( xShape, uno::UNO_QUERY ); + DBG_ASSERT(xProp.is(), "shape offers no XPropertySet"); + if( xProp.is()) + { + try + { + xProp->setPropertyValue( C2U( UNO_NAME_MISC_OBJ_NAME ) + , uno::makeAny( rName ) ); + } + catch( uno::Exception& e ) + { + e; + } + } +} + +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +// set appearance properties at a shape +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- + +//static +void ShapeFactory::setShapeAppearance( + const ShapeAppearance& rAppearance + , const uno::Reference< beans::XPropertySet >& xProp + , sal_Bool bNoLines ) + throw (beans::UnknownPropertyException + , beans::PropertyVetoException + , lang::IllegalArgumentException + , lang::WrappedTargetException + , uno::RuntimeException) +{ + //LineStyle + if(bNoLines) + { + xProp->setPropertyValue( C2U( UNO_NAME_LINESTYLE ) + , uno::makeAny(drawing::LineStyle_NONE) ); + } + //FillColor + xProp->setPropertyValue( C2U( UNO_NAME_FILLCOLOR ) + , uno::makeAny(rAppearance.m_nColorData) ); + //Transparency + xProp->setPropertyValue( C2U( UNO_NAME_FILL_TRANSPARENCE ) + , uno::makeAny( (sal_Int16)rAppearance.m_nTransparency ) ); +} + +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +// diverse PolyPolygon create methods +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- + +uno::Any createPolyPolygon_Cube( + const drawing::Direction3D& rSize, double fRoundedEdge, sal_Bool bRounded = true ) +{ + DBG_ASSERT(fRoundedEdge>=0, "fRoundedEdge needs to be >= 0"); + + // always use extra points, so set percent diagonal to 0.4 which is 0% in the UI (old Chart comment) + if( fRoundedEdge == 0.0 && bRounded) + fRoundedEdge = 0.4 / 200.0; + else if(!bRounded) + fRoundedEdge = 0.0; + + const double fWidthH = rSize.DirectionX/2.0; //fWidthH stands for Half Width + const double fHeight = rSize.DirectionY; + const double fDepth = rSize.DirectionZ; + + const double fOffset = (fDepth * fRoundedEdge) * 1.05; // increase by 5% for safety + const bool bRoundEdges = fRoundedEdge && fOffset < fWidthH && 2.0 * fOffset < fHeight; + const sal_Int32 nPointCount = bRoundEdges ? 13 : 5; + + //-------------------------------------- + drawing::PolyPolygonShape3D aPP; + + aPP.SequenceX.realloc(1); + aPP.SequenceY.realloc(1); + aPP.SequenceZ.realloc(1); + + drawing::DoubleSequence* pOuterSequenceX = aPP.SequenceX.getArray(); + drawing::DoubleSequence* pOuterSequenceY = aPP.SequenceY.getArray(); + drawing::DoubleSequence* pOuterSequenceZ = aPP.SequenceZ.getArray(); + + pOuterSequenceX->realloc(nPointCount); + pOuterSequenceY->realloc(nPointCount); + pOuterSequenceZ->realloc(nPointCount); + + double* pInnerSequenceX = pOuterSequenceX->getArray(); + double* pInnerSequenceY = pOuterSequenceY->getArray(); + double* pInnerSequenceZ = pOuterSequenceZ->getArray(); + + for(sal_Int32 nN = nPointCount; nN--;) + *pInnerSequenceZ++ = 0.0; + //*pInnerSequenceZ++ = -fDepth/2.0; + + if(nPointCount == 5) + { + *pInnerSequenceY++ = 0.0; + *pInnerSequenceY++ = fHeight; + *pInnerSequenceY++ = fHeight; + *pInnerSequenceY++ = 0.0; + *pInnerSequenceY++ = 0.0; + + *pInnerSequenceX++ = -fWidthH; + *pInnerSequenceX++ = -fWidthH; + *pInnerSequenceX++ = fWidthH; + *pInnerSequenceX++ = fWidthH; + *pInnerSequenceX++ = -fWidthH; + } + else + { + *pInnerSequenceY++ = 0.0; //1. + *pInnerSequenceY++ = 0.0; + *pInnerSequenceY++ = fOffset; + *pInnerSequenceY++ = fHeight - fOffset; + *pInnerSequenceY++ = fHeight; + *pInnerSequenceY++ = fHeight; //6. + *pInnerSequenceY++ = fHeight; + *pInnerSequenceY++ = fHeight; + *pInnerSequenceY++ = fHeight - fOffset; + *pInnerSequenceY++ = fOffset; //10. + *pInnerSequenceY++ = 0.0; + *pInnerSequenceY++ = 0.0; + *pInnerSequenceY++ = 0.0; + + + *pInnerSequenceX++ = -fWidthH + fOffset; //1. + *pInnerSequenceX++ = -fWidthH; + *pInnerSequenceX++ = -fWidthH; + *pInnerSequenceX++ = -fWidthH; + *pInnerSequenceX++ = -fWidthH; + *pInnerSequenceX++ = -fWidthH + fOffset; //6. + *pInnerSequenceX++ = fWidthH - fOffset; + *pInnerSequenceX++ = fWidthH; + *pInnerSequenceX++ = fWidthH; + *pInnerSequenceX++ = fWidthH; //10. + *pInnerSequenceX++ = fWidthH; + *pInnerSequenceX++ = fWidthH - fOffset; + *pInnerSequenceX++ = -fWidthH + fOffset; + } + return uno::Any( &aPP, ::getCppuType((const drawing::PolyPolygonShape3D*)0) ); +} + +uno::Any createPolyPolygon_Cylinder( + double fHeight + , double fRadius + , double fRoundedEdge ) +{ + //@todo consider offset if Height is negative + +// DBG_ASSERT(fHeight>0, "The height of a cylinder needs to be > 0"); + DBG_ASSERT(fRadius>0, "The radius of a cylinder needs to be > 0"); + DBG_ASSERT(fRoundedEdge>=0, "fRoundedEdge needs to be >= 0"); + + // always use extra points, so set percent diagonal to 0.4 which is 0% in the UI (old Chart comment) + if( fRoundedEdge == 0.0 ) + fRoundedEdge = 0.4 / 200.0; + + const double fWidth = fRadius; + + const double fOffset = (fRadius * 2.0 * fRoundedEdge) * 1.05; // increase by 5% for safety + const bool bRoundEdges = fRoundedEdge && fOffset < fRadius && 2.0 * fOffset < fHeight; + const sal_Int32 nPointCount = bRoundEdges ? 8 : 4; + + //-------------------------------------- + drawing::PolyPolygonShape3D aPP; + + aPP.SequenceX.realloc(1); + aPP.SequenceY.realloc(1); + aPP.SequenceZ.realloc(1); + + drawing::DoubleSequence* pOuterSequenceX = aPP.SequenceX.getArray(); + drawing::DoubleSequence* pOuterSequenceY = aPP.SequenceY.getArray(); + drawing::DoubleSequence* pOuterSequenceZ = aPP.SequenceZ.getArray(); + + pOuterSequenceX->realloc(nPointCount); + pOuterSequenceY->realloc(nPointCount); + pOuterSequenceZ->realloc(nPointCount); + + double* pInnerSequenceX = pOuterSequenceX->getArray(); + double* pInnerSequenceY = pOuterSequenceY->getArray(); + double* pInnerSequenceZ = pOuterSequenceZ->getArray(); + + for(sal_Int32 nN = nPointCount; nN--;) + *pInnerSequenceZ++ = 0.0; + + if(nPointCount == 4) + { + *pInnerSequenceY++ = 0.0; + *pInnerSequenceY++ = 0.0; + *pInnerSequenceY++ = fHeight; + *pInnerSequenceY++ = fHeight; + + *pInnerSequenceX++ = 0.0; + *pInnerSequenceX++ = fRadius; + *pInnerSequenceX++ = fRadius; + *pInnerSequenceX++ = 0.0; + } + else + { + *pInnerSequenceY++ = 0.0; //1. + *pInnerSequenceY++ = 0.0; + *pInnerSequenceY++ = 0.0; + *pInnerSequenceY++ = fOffset; + *pInnerSequenceY++ = fHeight - fOffset; + *pInnerSequenceY++ = fHeight; //6. + *pInnerSequenceY++ = fHeight; + *pInnerSequenceY++ = fHeight; + + *pInnerSequenceX++ = 0.0; //1. + *pInnerSequenceX++ = fRadius - fOffset; + *pInnerSequenceX++ = fRadius; + *pInnerSequenceX++ = fRadius; + *pInnerSequenceX++ = fRadius; + *pInnerSequenceX++ = fRadius; //6. + *pInnerSequenceX++ = fRadius - fOffset; + *pInnerSequenceX++ = 0.0; + } + return uno::Any( &aPP, ::getCppuType((const drawing::PolyPolygonShape3D*)0) ); +} + +uno::Any createPolyPolygon_Cone( + double fHeight + , double fRadius + , double fTopHeight + , double fRoundedEdge) +{ + //@todo consider offset if Height is negative +/* + DBG_ASSERT(fHeight>0, "The height of a cone needs to be > 0"); + DBG_ASSERT(fTopHeight>=0, "The height of the cutted top of a cone needs to be >= 0"); +*/ + + DBG_ASSERT(fRadius>0, "The radius of a cone needs to be > 0"); + DBG_ASSERT(fRoundedEdge>=0, "fRoundedEdge needs to be >= 0"); + + //for stacked charts we need cones without top -> fTopHeight != 0 resp. bTopless == true + //fTopHeight indicates the high of the cutted top only (not the full height) + + // always use extra points, so set percent diagonal to 0.4 which is 0% in the UI (old Chart comment) + if( fRoundedEdge == 0.0 ) + fRoundedEdge = 0.4 / 200.0; + + fRoundedEdge = 0.0; + + BOOL bTopless = fTopHeight != 0.0; + + double r1= 0.0, r2 = fRadius; + if(bTopless) + r1 = fRadius * (fTopHeight)/(fHeight+fTopHeight); + + const double fMinimumDimension = ::std::min(r2*2.0,fHeight); + const double fOffset = (fMinimumDimension * fRoundedEdge) * 1.05; // increase by 5% for safety + const bool bRoundEdges = fRoundedEdge && fOffset < r2 && 2.0 * fOffset < fHeight + && ( bTopless ? fOffset < r1 : true ); + sal_Int32 nPointCount = 8; + if(bTopless) + { + if(!bRoundEdges) + nPointCount = 4; + } + else + { + if(bRoundEdges) + nPointCount = 6; + else + nPointCount = 3; + } + + //-------------------------------------- + drawing::PolyPolygonShape3D aPP; + + aPP.SequenceX.realloc(1); + aPP.SequenceY.realloc(1); + aPP.SequenceZ.realloc(1); + + drawing::DoubleSequence* pOuterSequenceX = aPP.SequenceX.getArray(); + drawing::DoubleSequence* pOuterSequenceY = aPP.SequenceY.getArray(); + drawing::DoubleSequence* pOuterSequenceZ = aPP.SequenceZ.getArray(); + + pOuterSequenceX->realloc(nPointCount); + pOuterSequenceY->realloc(nPointCount); + pOuterSequenceZ->realloc(nPointCount); + + double* pInnerSequenceX = pOuterSequenceX->getArray(); + double* pInnerSequenceY = pOuterSequenceY->getArray(); + double* pInnerSequenceZ = pOuterSequenceZ->getArray(); + + for(sal_Int32 nN = nPointCount; nN--;) + *pInnerSequenceZ++ = 0.0; + + if(bTopless) + { + *pInnerSequenceY++ = fHeight; //1. + *pInnerSequenceX++ = 0.0; //1. + + if(bRoundEdges) + { + *pInnerSequenceY++ = fHeight; //2. + *pInnerSequenceX++ = r1 - fOffset; //2. + } + } + + *pInnerSequenceY++ = fHeight; //3. + *pInnerSequenceX++ = r1; //3. + + if(bRoundEdges) + { + *pInnerSequenceY++ = fHeight - fOffset; //4. + *pInnerSequenceX++ = r1 + fOffset; //4. + + *pInnerSequenceY++ = fOffset; //5. + *pInnerSequenceX++ = r2 - fOffset; //5. + } + + *pInnerSequenceY++ = 0.0; //6. + *pInnerSequenceX++ = r2; //6. + + if(bRoundEdges) + { + *pInnerSequenceY++ = 0.0; //7. + *pInnerSequenceX++ = r2 - fOffset; //7. + } + + *pInnerSequenceY++ = 0.0; //8. + *pInnerSequenceX++ = 0.0; //8. + + return uno::Any( &aPP, ::getCppuType((const drawing::PolyPolygonShape3D*)0) ); +} + +uno::Any createPolyPolygon_PieSegment( + double fHeight + , double fXWidthRadius + , double fInnerXRadius = 0.0) +{ + DBG_ASSERT(fHeight>0, "The height of a pie segment needs to be > 0"); + DBG_ASSERT(fInnerXRadius>=0, "The inner radius of a pie segment needs to be >= 0"); + DBG_ASSERT(fXWidthRadius>0, "The width radius of a pie segment needs to be > 0"); + + const BOOL bClosed = true; + + const sal_Int32 nPointCount = bClosed ? 5 : 4; + + //-------------------------------------- + drawing::PolyPolygonShape3D aPP; + + aPP.SequenceX.realloc(1); + aPP.SequenceY.realloc(1); + aPP.SequenceZ.realloc(1); + + drawing::DoubleSequence* pOuterSequenceX = aPP.SequenceX.getArray(); + drawing::DoubleSequence* pOuterSequenceY = aPP.SequenceY.getArray(); + drawing::DoubleSequence* pOuterSequenceZ = aPP.SequenceZ.getArray(); + + pOuterSequenceX->realloc(nPointCount); + pOuterSequenceY->realloc(nPointCount); + pOuterSequenceZ->realloc(nPointCount); + + double* pInnerSequenceX = pOuterSequenceX->getArray(); + double* pInnerSequenceY = pOuterSequenceY->getArray(); + double* pInnerSequenceZ = pOuterSequenceZ->getArray(); + + for(sal_Int32 nN = nPointCount; nN--;) + *pInnerSequenceZ++ = 0.0; + + *pInnerSequenceY++ = 0.0; + *pInnerSequenceY++ = 0.0; + *pInnerSequenceY++ = fHeight; + *pInnerSequenceY++ = fHeight; + if(bClosed) + *pInnerSequenceY++ = 0.0; + + *pInnerSequenceX++ = fInnerXRadius; + *pInnerSequenceX++ = fInnerXRadius+fXWidthRadius; + *pInnerSequenceX++ = fInnerXRadius+fXWidthRadius; + *pInnerSequenceX++ = fInnerXRadius; + if(bClosed) + *pInnerSequenceX++ = fInnerXRadius; + + return uno::Any( &aPP, ::getCppuType((const drawing::PolyPolygonShape3D*)0) ); +} + + +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +// methods for 3D shape creation +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- + +uno::Reference<drawing::XShape> + ShapeFactory::createCube( + const uno::Reference<drawing::XShapes>& xTarget + , const DataPointGeometry& rGeometry + , const ShapeAppearance& rAppearance) +{ + uno::Reference<drawing::XShape> xShape = impl_createCube( xTarget, rGeometry, FALSE ); + uno::Reference< beans::XPropertySet > xProp( xShape, uno::UNO_QUERY ); + ShapeFactory::setShapeAppearance( rAppearance, xProp ); + return xShape; +} + +uno::Reference<drawing::XShape> + ShapeFactory::createRoundedCube( + const uno::Reference<drawing::XShapes>& xTarget + , const DataPointGeometry& rGeometry ) +{ + return impl_createCube( xTarget, rGeometry, TRUE); +} + +uno::Reference<drawing::XShape> + ShapeFactory::impl_createCube( + const uno::Reference<drawing::XShapes>& xTarget + , const DataPointGeometry& rGeometry + //, const ShapeAppearance& rAppearance + , sal_Bool bRounded ) +{ + //create shape + uno::Reference< drawing::XShape > xShape( + m_xShapeFactory->createInstance( C2U( + "com.sun.star.drawing.Shape3DExtrudeObject") ), uno::UNO_QUERY ); + xTarget->add(xShape); + + //set properties + uno::Reference< beans::XPropertySet > xProp( xShape, uno::UNO_QUERY ); + DBG_ASSERT(xProp.is(), "created shape offers no XPropertySet"); + if( xProp.is()) + { + try + { + //depth + xProp->setPropertyValue( C2U( UNO_NAME_3D_EXTRUDE_DEPTH ) + , uno::makeAny((sal_Int32)rGeometry.m_aSize.DirectionZ) ); + + //PercentDiagonal + sal_Int16 nPercentDiagonal = bRounded ? 5 : 0; + xProp->setPropertyValue( C2U( UNO_NAME_3D_PERCENT_DIAGONAL ) + , uno::makeAny( nPercentDiagonal ) ); + + //Polygon + xProp->setPropertyValue( C2U( UNO_NAME_3D_POLYPOLYGON3D ) + , createPolyPolygon_Cube( rGeometry.m_aSize, double(nPercentDiagonal)/200.0,bRounded) ); + + //Matrix for position + { + Matrix4D aM4; + aM4.Translate(rGeometry.m_aPosition.PositionX + , rGeometry.m_aPosition.PositionY + , rGeometry.m_aPosition.PositionZ - (rGeometry.m_aSize.DirectionZ/2.0)); + drawing::HomogenMatrix aHM = Matrix4DToHomogenMatrix(aM4); + xProp->setPropertyValue( C2U( UNO_NAME_3D_TRANSFORM_MATRIX ) + , uno::makeAny(aHM) ); + } + } + catch( uno::Exception& e ) + { + e; + } + } + return xShape; +} + +uno::Reference<drawing::XShape> + ShapeFactory::createCylinder( + const uno::Reference<drawing::XShapes>& xTarget + , const DataPointGeometry& rGeometry ) +{ + return impl_createConeOrCylinder( + xTarget, rGeometry, CHART_3DOBJECT_SEGMENTCOUNT, true ); +} + +uno::Reference<drawing::XShape> + ShapeFactory::createPyramid( + const uno::Reference<drawing::XShapes>& xTarget + , const DataPointGeometry& rGeometry ) +{ + return impl_createConeOrCylinder( xTarget, rGeometry, 4 ); +} + +uno::Reference<drawing::XShape> + ShapeFactory::createCone( + const uno::Reference<drawing::XShapes>& xTarget + , const DataPointGeometry& rGeometry ) +{ + return impl_createConeOrCylinder( xTarget, rGeometry, CHART_3DOBJECT_SEGMENTCOUNT ); +} + +uno::Reference<drawing::XShape> + ShapeFactory::impl_createConeOrCylinder( + const uno::Reference<drawing::XShapes>& xTarget + , const DataPointGeometry& rGeometry + , sal_Int32 nSegments + , bool bCylinder ) +{ + + static int ntest = 0; + ntest++; + + //create shape + uno::Reference< drawing::XShape > xShape( + m_xShapeFactory->createInstance( C2U( + "com.sun.star.drawing.Shape3DLatheObject") ), uno::UNO_QUERY ); + xTarget->add(xShape); + + + double fYRotateAnglePi = -ZDIRECTION*(F_PI/2.0 - F_PI/(double)nSegments); // alwayas rotate edge to front (important for pyramids) + //or: ZDIRECTION*(F_PI/2.0 - F_PI/(double)nSegments); // rotate edge to front for even segment count otherwise rotate corner to front + double fAngle = fYRotateAnglePi; + { + while(fAngle<0.0) + fAngle+=F_PI/2.0; + while(fAngle>F_PI/2.0) + fAngle-=F_PI/2.0; + } + //double fWidth = ::std::min( rGeometry.m_aSize.DirectionX, rGeometry.m_aSize.DirectionZ )/2.0; + double fWidth = rGeometry.m_aSize.DirectionX/2.0; //The depth will be corrrected within Matrix + double fRadius = fWidth; //!!!!!!!! problem in drawing layer: rotation object calculates wrong needed size -> wrong camera (it's a problem with bounding boxes) +// double fRadius = fWidth/cos(fAngle); llllllllllllllllllll + double fHeight = rGeometry.m_aSize.DirectionY; + //for Cones: + double fTopHeight = rGeometry.m_aSize2.DirectionY; + + //set properties + uno::Reference< beans::XPropertySet > xProp( xShape, uno::UNO_QUERY ); + DBG_ASSERT(xProp.is(), "created shape offers no XPropertySet"); + if( xProp.is()) + { + try + { + //UNO_NAME_3D_TRANSFORM_MATRIX drawing::HomogenMatrix + //UNO_NAME_3D_POLYPOLYGON3D PolyPolygonShape3D + //UNO_NAME_3D_LATHE_END_ANGLE sal_Int16 + //UNO_NAME_3D_HORZ_SEGS sal_Int32 + //UNO_NAME_3D_PERCENT_DIAGONAL sal_Int16 + //UNO_NAME_3D_VERT_SEGS sal_Int32 + + //PercentDiagonal + sal_Int16 nPercentDiagonal = 5; + xProp->setPropertyValue( C2U( UNO_NAME_3D_PERCENT_DIAGONAL ) + , uno::makeAny( nPercentDiagonal ) ); + + //Polygon + uno::Any aPPolygon = bCylinder ? createPolyPolygon_Cylinder( + fHeight, fRadius, double(nPercentDiagonal)/200.0) + : createPolyPolygon_Cone( + fHeight, fRadius, fTopHeight, double(nPercentDiagonal)/200.0); + xProp->setPropertyValue( C2U( UNO_NAME_3D_POLYPOLYGON3D ), aPPolygon ); + + //Matrix for position + { + Matrix4D aM4; + //if(ntest%2) //llllllllllllllllllll + //aM4.RotateY( fYRotateAnglePi ); + + // Note: Uncomment the following to let the objects grow in z + // direction to fill the diagram +// aM4.ScaleZ(rGeometry.m_aSize.DirectionZ/rGeometry.m_aSize.DirectionX); + aM4.Translate(rGeometry.m_aPosition.PositionX, rGeometry.m_aPosition.PositionY, rGeometry.m_aPosition.PositionZ); + drawing::HomogenMatrix aHM = Matrix4DToHomogenMatrix(aM4); + xProp->setPropertyValue( C2U( UNO_NAME_3D_TRANSFORM_MATRIX ) + , uno::makeAny(aHM) ); + } + + //Segments + xProp->setPropertyValue( C2U( UNO_NAME_3D_VERT_SEGS ) + , uno::makeAny(CHART_3DOBJECT_SEGMENTCOUNT) ); + xProp->setPropertyValue( C2U( UNO_NAME_3D_HORZ_SEGS ) + , uno::makeAny(nSegments) ); + +//// ShapeFactory::setShapeAppearance( rAppearance, xProp ); + } + catch( uno::Exception& e ) + { + e; + } + } + return xShape; +} + +void appendBezierCoords( drawing::PolyPolygonBezierCoords& rReturn, const drawing::PolyPolygonBezierCoords& rAdd, sal_Bool bAppendInverse ) +{ + if(!rAdd.Coordinates.getLength()) + return; + sal_Int32 nAddCount = rAdd.Coordinates[0].getLength(); + if(!nAddCount) + return; + + sal_Int32 nOldCount = rReturn.Coordinates[0].getLength(); + + rReturn.Coordinates[0].realloc(nOldCount+nAddCount); + rReturn.Flags[0].realloc(nOldCount+nAddCount); + + for(sal_Int32 nN=0;nN<nAddCount; nN++ ) + { + sal_Int32 nAdd = bAppendInverse ? (nAddCount-1-nN) : nN; + rReturn.Coordinates[0][nOldCount+nN] = rAdd.Coordinates[0][nAdd]; + rReturn.Flags[0][nOldCount+nN] = rAdd.Flags[0][nAdd]; + } +} + +drawing::PolyPolygonBezierCoords getCircularArcBezierCoords( + double fAngleRadian + , const Matrix3D& rTransformationFromUnitCircle ) +{ + //at least one polygon is created using two normal and two control points + //if the angle is larger it is separated into multiple sub angles + + const double fSmallAngleRadian = F_PI/10.0; + + drawing::PolyPolygonBezierCoords aReturn = drawing::PolyPolygonBezierCoords(); + sal_Int32 nSegmentCount = fAngleRadian/fSmallAngleRadian; + if( fAngleRadian > fSmallAngleRadian*nSegmentCount ) + nSegmentCount++; + + sal_Int32 nPointCount = 1 + 3*nSegmentCount; //first point of next segment equals last point of former segment + + aReturn.Coordinates = drawing::PointSequenceSequence(1); + aReturn.Flags = drawing::FlagSequenceSequence(1); + + drawing::PointSequence aPoints(nPointCount); + drawing::FlagSequence aFlags(nPointCount); + + // + + Vector2D P0,P1,P2,P3; + Vector2D POrigin = rTransformationFromUnitCircle*Vector2D(0,0); + + sal_Int32 nPoint=0; + for(sal_Int32 nSegment=0; nSegment<nSegmentCount; nSegment++) + { + double fCurrentSegmentAngle = fSmallAngleRadian; + //the last segment gets the rest angle that does not fit into equal pieces + if(nSegment==(nSegmentCount-1)) + fCurrentSegmentAngle = fAngleRadian - fSmallAngleRadian*(nSegmentCount-1); + + //first create untransformed points for a unit circle arc: + const double fCos = cos(fCurrentSegmentAngle/2.0); + const double fSin = sin(fCurrentSegmentAngle/2.0); + P0.X() = P3.X() = fCos; + P0.Y() = -fSin; + P3.Y() = -P0.Y(); + + P1.X() = P2.X() = (4.0-fCos)/3.0; + P1.Y() = (1.0-fCos)*(fCos-3.0)/(3.0*fSin); + P2.Y() = -P1.Y(); + //transform thus startangle equals NULL + Matrix3D aStart; + aStart.Rotate(fCurrentSegmentAngle/2.0 + nSegment*fSmallAngleRadian); + + //apply given transformation to get final points + P0 = rTransformationFromUnitCircle*(aStart*P0); + P1 = rTransformationFromUnitCircle*(aStart*P1); + P2 = rTransformationFromUnitCircle*(aStart*P2); + P3 = rTransformationFromUnitCircle*(aStart*P3); + + aPoints[nPoint].X = P0.X(); + aPoints[nPoint].Y = P0.Y(); + aFlags [nPoint++] = drawing::PolygonFlags_NORMAL; + + aPoints[nPoint].X = P1.X(); + aPoints[nPoint].Y = P1.Y(); + aFlags[nPoint++] = drawing::PolygonFlags_CONTROL; + + aPoints[nPoint].X = P2.X(); + aPoints[nPoint].Y = P2.Y(); + aFlags [nPoint++] = drawing::PolygonFlags_CONTROL; + + if(nSegment==(nSegmentCount-1)) + { + aPoints[nPoint].X = P3.X(); + aPoints[nPoint].Y = P3.Y(); + aFlags [nPoint++] = drawing::PolygonFlags_NORMAL; + } + } + + aReturn.Coordinates[0] = aPoints; + aReturn.Flags[0] = aFlags; + + return aReturn; +} + +drawing::PolyPolygonBezierCoords getRingBezierCoords( + double fInnerXRadius + , double fOuterXRadius, double fOuterYRadius + , double fWidthAngleRadian, double fStartAngleRadian + , double fPosX, double fPosY ) +{ + drawing::PolyPolygonBezierCoords aReturn = drawing::PolyPolygonBezierCoords(); + + aReturn.Coordinates = drawing::PointSequenceSequence(1); + aReturn.Flags = drawing::FlagSequenceSequence(1); + + Matrix3D aTransformationFromUnitCircle_Outer; + aTransformationFromUnitCircle_Outer.Rotate(fStartAngleRadian); + aTransformationFromUnitCircle_Outer.ScaleX(fOuterXRadius); + aTransformationFromUnitCircle_Outer.ScaleY(fOuterYRadius); + aTransformationFromUnitCircle_Outer.TranslateX(fPosX); + aTransformationFromUnitCircle_Outer.TranslateY(fPosY); + + drawing::PolyPolygonBezierCoords aOuterArc = getCircularArcBezierCoords( fWidthAngleRadian, aTransformationFromUnitCircle_Outer ); + aReturn.Coordinates[0] = aOuterArc.Coordinates[0]; + aReturn.Flags[0] = aOuterArc.Flags[0]; + + Matrix3D aTransformationFromUnitCircle_Inner; + aTransformationFromUnitCircle_Inner.Rotate(fStartAngleRadian); + aTransformationFromUnitCircle_Inner.ScaleX(fInnerXRadius); + aTransformationFromUnitCircle_Inner.ScaleY(fInnerXRadius*fOuterYRadius/fOuterXRadius); + aTransformationFromUnitCircle_Inner.TranslateX(fPosX); + aTransformationFromUnitCircle_Inner.TranslateY(fPosY); + + drawing::PolyPolygonBezierCoords aInnerArc = getCircularArcBezierCoords( fWidthAngleRadian, aTransformationFromUnitCircle_Inner ); + appendBezierCoords( aReturn, aInnerArc, sal_True ); + + return aReturn; +} +/* +XPolygon ImpCalcXPoly(const Rectangle& rRect1, long nStart, long nEnd) +{ + long rx=rRect1.GetWidth()/2; // Da GetWidth()/GetHeight() jeweils 1 + long ry=rRect1.GetHeight()/2; // draufaddieren wird korrekt gerundet. + long a=0,e=3600; + { + a=nStart/10; + e=nEnd/10; + { + // Drehrichtung umkehren, damit Richtungssinn genauso wie Rechteck + rx=-rx; + a=1800-a; if (a<0) a+=3600; + e=1800-e; if (e<0) e+=3600; + long nTmp=a; + a=e; + e=nTmp; + } + } + FASTBOOL bClose=FALSE; + XPolygon aXPoly(rRect1.Center(),rx,ry,USHORT(a),USHORT(e),bClose); + if (nStart==nEnd) + { + Point aMerk(aXPoly[0]); + aXPoly=XPolygon(2); + aXPoly[0]=rRect1.Center(); + aXPoly[1]=aMerk; + } + { // Der Sektor soll Start/Ende im Zentrum haben + // Polygon um einen Punkt rotieren (Punkte im Array verschieben) + unsigned nPointAnz=aXPoly.GetPointCount(); + aXPoly.Insert(0,rRect1.Center(),XPOLY_NORMAL); + aXPoly[aXPoly.GetPointCount()]=rRect1.Center(); + } + // Die Winkelangaben beziehen sich immer auf die linke obere Ecke von !aRect! +// if (aGeo.nShearWink!=0) ShearXPoly(aXPoly,aRect.TopLeft(),aGeo.nTan); +// if (aGeo.nDrehWink!=0) RotateXPoly(aXPoly,aRect.TopLeft(),aGeo.nSin,aGeo.nCos); + return aXPoly; +} +*/ +uno::Reference< drawing::XShape > + ShapeFactory::createPieSegment2D( + const uno::Reference< drawing::XShapes >& xTarget + , const DataPointGeometry& rGeometry ) +// , const ShapeAppearance& rAppearance ) +{ + /* + DataPointGeometry aLogicGeom( drawing::Position3D(0.0,0.0,0.0) + , drawing::Direction3D(fOuterXDiameter,fOuterYDiameter,fDepth) + , drawing::Direction3D(fInnerXDiameter,fStartAngleDegree,fWidthAngleDegree) ); + */ + + double fInnerXRadius = rGeometry.m_aSize2.DirectionX/2.0; + //only test + //fInnerXRadius = 0.0; + //if( fInnerXRadius > 0.0 ) return NULL; + + double fOuterXRadius = rGeometry.m_aSize.DirectionX/2.0; + double fOuterYRadius = rGeometry.m_aSize.DirectionY/2.0; + + double fStartAngleDegree = rGeometry.m_aSize2.DirectionY; + double fWidthAngleDegree = rGeometry.m_aSize2.DirectionZ; + + /* + DBG_ASSERT(fOuterXRadius>0, "The radius of a pie needs to be > 0"); + DBG_ASSERT(fInnerXRadius>=0, "The inner radius of a pie needs to be >= 0"); + DBG_ASSERT(fOuterXRadius>fInnerXRadius, "The outer radius needs to be greater than the inner radius of a pie"); + DBG_ASSERT(fOuterYRadius>0, "The radius of a pie needs to be > 0"); + + DBG_ASSERT(fWidthAngleDegree>0, "The angle of a pie needs to be > 0"); + DBG_ASSERT(fWidthAngleDegree<=360, "The angle of a pie needs to be <= 360 degree"); + */ + + while(fWidthAngleDegree>360) + fWidthAngleDegree -= 360.0; + while(fWidthAngleDegree<0) + fWidthAngleDegree += 360.0; + + //create shape + uno::Reference< drawing::XShape > xShape( + m_xShapeFactory->createInstance( +// C2U("com.sun.star.drawing.EllipseShape") ), uno::UNO_QUERY ); +// C2U("com.sun.star.drawing.PolyPolygonShape") ), uno::UNO_QUERY ); +// C2U("com.sun.star.drawing.OpenFreeHandShape") ), uno::UNO_QUERY ); + C2U("com.sun.star.drawing.ClosedBezierShape") ), uno::UNO_QUERY ); +// C2U("com.sun.star.drawing.LineShape") ), uno::UNO_QUERY ); +// C2U("com.sun.star.drawing.PolyLineShape") ), uno::UNO_QUERY ); + + //need to add the shape before setting of properties + xTarget->add(xShape); + + //need left upper corner not the middle of the circle (!! x and y are assumed to scale in the same way here) + double fXPos = rGeometry.m_aPosition.PositionX; + double fYPos = rGeometry.m_aPosition.PositionY; + + double fXSize = rGeometry.m_aSize.DirectionX; + double fYSize = rGeometry.m_aSize.DirectionY; + + fXPos -= fXSize/2.0; + fYPos -= fYSize/2.0; + + //set properties + uno::Reference< beans::XPropertySet > xProp( xShape, uno::UNO_QUERY ); + DBG_ASSERT(xProp.is(), "created shape offers no XPropertySet"); + if( xProp.is()) + { + try + { + /* + Matrix3D aTransformationFromUnitCircle; + aTransformationFromUnitCircle.Rotate(fStartAngleDegree*F_PI/180.0); + aTransformationFromUnitCircle.ScaleX(fInnerXRadius+fXWidthRadius); + aTransformationFromUnitCircle.ScaleY(fInnerXRadius+fXWidthRadius); + aTransformationFromUnitCircle.TranslateX(rGeometry.m_aPosition.PositionX); + aTransformationFromUnitCircle.TranslateY(rGeometry.m_aPosition.PositionY); + drawing::PolyPolygonBezierCoords aCoords = getCircularArcBezierCoords( fWidthAngleDegree * F_PI/180.0 + , aTransformationFromUnitCircle ); + */ + + drawing::PolyPolygonBezierCoords aCoords = getRingBezierCoords( + fInnerXRadius, fOuterXRadius, fOuterYRadius + , fWidthAngleDegree*F_PI/180.0, fStartAngleDegree*F_PI/180.0 + , rGeometry.m_aPosition.PositionX, rGeometry.m_aPosition.PositionY); + xProp->setPropertyValue( C2U( "PolyPolygonBezier" ) + , uno::makeAny( aCoords ) ); + + /* + Rectangle aRect(fXPos,fYPos+fYSize,fXPos+fXSize,fYPos); + XPolygon aXPolygon = ImpCalcXPoly(aRect + , fStartAngleDegree*100.0 + , (fStartAngleDegree+fWidthAngleDegree)*100.0); + + sal_Int32 nCount = aXPolygon.GetSize(); + if( nCount > 0 ) + { + */ + /* + drawing::PointSequence aSeq( nCount ); + awt::Point* pSequence = aSeq.getArray(); + + for(sal_Int32 b=0;b<nCount;b++) + { + *pSequence = awt::Point( aXPolygon[b].X(), aXPolygon[b].Y() ); + pSequence++; + } + */ + /* + + drawing::PointSequence aSeq( 4 ); + awt::Point* pSequence = aSeq.getArray(); + pSequence[0] = awt::Point( 0, 0 ); + pSequence[1] = awt::Point( 10000, -10000 ); + pSequence[2] = awt::Point( 10000, 0 ); + pSequence[3] = awt::Point( 0, 0 ); + + + //UNO_NAME_POLYGON drawing::PointSequence* + xProp->setPropertyValue( C2U( UNO_NAME_POLYGON ) + , uno::makeAny( aSeq ) ); + } + */ + +/* +UNO_NAME_POLYGONKIND "PolygonKind" drawing::PolygonKind* (readonly) + +UNO_NAME_POLYPOLYGON "PolyPolygon" drawing::PointSequenceSequence* +UNO_NAME_POLYGON "Polygon" drawing::PointSequence* + +UNO_NAME_POLYPOLYGONBEZIER "PolyPolygonBezier" drawing::PolyPolygonBezierCoords* +*/ + + /* + //UNO_NAME_CIRCKIND drawing::CircleKind + xProp->setPropertyValue( C2U( UNO_NAME_CIRCKIND ) + , uno::makeAny(drawing::CircleKind_SECTION) ); + + double factor = 100.0; + + //UNO_NAME_CIRCSTARTANGLE sal_Int32 + xProp->setPropertyValue( C2U( UNO_NAME_CIRCSTARTANGLE ) + , uno::makeAny((sal_Int32)(fStartAngleDegree*factor)) ); + + //UNO_NAME_CIRCENDANGLE sal_Int32 + xProp->setPropertyValue( C2U( UNO_NAME_CIRCENDANGLE ) + , uno::makeAny((sal_Int32)((fStartAngleDegree+fWidthAngleDegree)*factor)) ); + */ + +// ShapeFactory::setShapeAppearance( rAppearance, xProp, sal_False ); + } + catch( uno::Exception& e ) + { + e; + } + } + +// xShape->setPosition(awt::Point(rGeometry.m_aPosition.PositionX,rGeometry.m_aPosition.PositionY)); + +// xShape->setPosition(awt::Point(fXPos,fYPos)); +// xShape->setSize(awt::Size(fXSize,fYSize)); + + /* + xShape->setPosition(awt::Point(100,100)); + xShape->setSize(awt::Size(10000,10000)); + */ + + /* + //create shape + uno::Reference< drawing::XShape > xShape( + m_xShapeFactory->createInstance( + //C2U("com.sun.star.drawing.EllipseShape") ), uno::UNO_QUERY ); + C2U("com.sun.star.drawing.Shape3DExtrudeObject") ), uno::UNO_QUERY ); + + xTarget->add(xShape); + + //set properties + uno::Reference< beans::XPropertySet > xProp( xShape, uno::UNO_QUERY ); + DBG_ASSERT(xProp.is(), "created shape offers no XPropertySet"); + if( xProp.is()) + { + try + { + //UNO_NAME_CIRCKIND drawing::CircleKind + xProp->setPropertyValue( C2U( UNO_NAME_CIRCKIND ) + , uno::makeAny(drawing::CircleKind_SECTION) ); + + double factor = 100.0; + + //UNO_NAME_CIRCSTARTANGLE sal_Int32 + xProp->setPropertyValue( C2U( UNO_NAME_CIRCSTARTANGLE ) + , uno::makeAny((sal_Int32)(fStartAngleDegree*factor)) ); + + //UNO_NAME_CIRCENDANGLE sal_Int32 + xProp->setPropertyValue( C2U( UNO_NAME_CIRCENDANGLE ) + , uno::makeAny((sal_Int32)((fStartAngleDegree+fWidthAngleDegree)*factor)) ); + + ShapeFactory::setShapeAppearance( rAppearance, xProp ); + } + catch( uno::Exception& e ) + { + e; + } + } + //need left upper corner not the middle of the circle (!! x and y are assumed to scale in the same way here) + double fXPos = rGeometry.m_aPosition.PositionX; + double fYPos = rGeometry.m_aPosition.PositionY; + + double fXSize = rGeometry.m_aSize.DirectionX; + double fYSize = rGeometry.m_aSize.DirectionY; + + fXPos -= fXSize/2.0; + fYPos -= fYSize/2.0; + + xShape->setPosition(awt::Point(fXPos,fYPos)); + xShape->setSize(awt::Size(fXSize,fYSize)); + */ + return xShape; +} + +uno::Reference< drawing::XShape > + ShapeFactory::createPieSegment( + const uno::Reference< drawing::XShapes >& xTarget + , const DataPointGeometry& rGeometry ) +// , const ShapeAppearance& rAppearance ) +{ + double fInnerXRadius = rGeometry.m_aSize2.DirectionX/2.0; + double fXWidthRadius = rGeometry.m_aSize.DirectionX/2.0 - fInnerXRadius; + + double fDepth = rGeometry.m_aSize.DirectionZ; + + double fStartAngleDegree = rGeometry.m_aSize2.DirectionY; + double fWidthAngleDegree = rGeometry.m_aSize2.DirectionZ; + + DBG_ASSERT(fDepth>0, "The height of a pie needs to be > 0"); + DBG_ASSERT(fXWidthRadius>0, "The radius of a pie needs to be > 0"); + DBG_ASSERT(fInnerXRadius>=0, "The inner radius of a pie needs to be > 0"); + DBG_ASSERT(fWidthAngleDegree>0, "The angle of a pie needs to be > 0"); + DBG_ASSERT(fWidthAngleDegree<=360, "The angle of a pie needs to be <= 360 degree"); + + while(fWidthAngleDegree>360) + fWidthAngleDegree -= 360.0; + while(fWidthAngleDegree<0) + fWidthAngleDegree += 360.0; + + //create shape + uno::Reference< drawing::XShape > xShape( + m_xShapeFactory->createInstance( + C2U("com.sun.star.drawing.Shape3DLatheObject") ), uno::UNO_QUERY ); + + xTarget->add(xShape); + + //set properties + uno::Reference< beans::XPropertySet > xProp( xShape, uno::UNO_QUERY ); + DBG_ASSERT(xProp.is(), "created shape offers no XPropertySet"); + if( xProp.is()) + { + try + { + //PercentDiagonal + xProp->setPropertyValue( C2U( UNO_NAME_3D_PERCENT_DIAGONAL ) + , uno::makeAny((sal_Int16)0) ); + + //Polygon + xProp->setPropertyValue( C2U( UNO_NAME_3D_POLYPOLYGON3D ) + , createPolyPolygon_PieSegment( fDepth, fXWidthRadius, fInnerXRadius ) ); + + //UNO_NAME_3D_LATHE_END_ANGLE sal_Int16 + xProp->setPropertyValue( C2U( UNO_NAME_3D_LATHE_END_ANGLE ) + , uno::makeAny((sal_Int16)(fWidthAngleDegree*10.0)) ); + + //Matrix for position + { + Matrix4D aM4; + aM4.ScaleZ(rGeometry.m_aSize.DirectionY/rGeometry.m_aSize.DirectionX); + aM4.RotateY( ZDIRECTION*fStartAngleDegree*F_PI/180.0 ); + aM4.Translate(rGeometry.m_aPosition.PositionX, rGeometry.m_aPosition.PositionZ, rGeometry.m_aPosition.PositionY); + drawing::HomogenMatrix aHM = Matrix4DToHomogenMatrix(aM4); + xProp->setPropertyValue( C2U( UNO_NAME_3D_TRANSFORM_MATRIX ) + , uno::makeAny(aHM) ); + } + + //Segments + xProp->setPropertyValue( C2U( UNO_NAME_3D_VERT_SEGS ) + , uno::makeAny(CHART_3DOBJECT_SEGMENTCOUNT) ); + xProp->setPropertyValue( C2U( UNO_NAME_3D_HORZ_SEGS ) + , uno::makeAny(CHART_3DOBJECT_SEGMENTCOUNT) ); + +// ShapeFactory::setShapeAppearance( rAppearance, xProp ); + } + catch( uno::Exception& e ) + { + e; + } + } + return xShape; +} + +uno::Reference< drawing::XShape > + ShapeFactory::createStripe( const uno::Reference< drawing::XShapes >& xTarget + , const Stripe& rStripe + , const ShapeAppearance& rAppearance + , sal_Bool bDoubleSided ) +{ + //create shape + uno::Reference< drawing::XShape > xShape( + m_xShapeFactory->createInstance( C2U( + "com.sun.star.drawing.Shape3DPolygonObject" ) ), uno::UNO_QUERY ); + xTarget->add(xShape); + + //set properties + uno::Reference< beans::XPropertySet > xProp( xShape, uno::UNO_QUERY ); + DBG_ASSERT(xProp.is(), "created shape offers no XPropertySet"); + if( xProp.is()) + { + try + { + //Polygon + xProp->setPropertyValue( C2U( UNO_NAME_3D_POLYPOLYGON3D ) + , rStripe.getPolyPolygonShape3D() ); + + //Normals Polygon + xProp->setPropertyValue( C2U( UNO_NAME_3D_NORMALSPOLYGON3D ) + , rStripe.getNormalsPolyPolygonShape3D() ); + + //NormalsKind + xProp->setPropertyValue( C2U( UNO_NAME_3D_NORMALS_KIND ) + , uno::makeAny( drawing::NormalsKind_FLAT ) ); + + //LineOnly + xProp->setPropertyValue( C2U( UNO_NAME_3D_LINEONLY ) + , uno::makeAny( (sal_Bool)false) ); + + //DoubleSided + xProp->setPropertyValue( C2U( UNO_NAME_3D_DOUBLE_SIDED ) + , uno::makeAny(bDoubleSided) ); + + ShapeFactory::setShapeAppearance( rAppearance, xProp ); + } + catch( uno::Exception& e ) + { + e; + } + } + return xShape; +} + +uno::Reference< drawing::XShape > + ShapeFactory::createArea3D( const uno::Reference< drawing::XShapes >& xTarget + , const drawing::PolyPolygonShape3D& rPolyPolygon + , double fDepth ) +{ + //create shape + uno::Reference< drawing::XShape > xShape( + m_xShapeFactory->createInstance( C2U( + "com.sun.star.drawing.Shape3DExtrudeObject") ), uno::UNO_QUERY ); + xTarget->add(xShape); + + //set properties + uno::Reference< beans::XPropertySet > xProp( xShape, uno::UNO_QUERY ); + DBG_ASSERT(xProp.is(), "created shape offers no XPropertySet"); + if( xProp.is()) + { + try + { + //depth + xProp->setPropertyValue( C2U( UNO_NAME_3D_EXTRUDE_DEPTH ) + , uno::makeAny((sal_Int32)fDepth) ); + + //PercentDiagonal + sal_Int16 nPercentDiagonal = 0; + xProp->setPropertyValue( C2U( UNO_NAME_3D_PERCENT_DIAGONAL ) + , uno::makeAny( nPercentDiagonal ) ); + + //Polygon + xProp->setPropertyValue( C2U( UNO_NAME_3D_POLYPOLYGON3D ) + , uno::makeAny( rPolyPolygon ) ); + } + catch( uno::Exception& e ) + { + e; + } + } + return xShape; +} + +uno::Reference< drawing::XShape > + ShapeFactory::createArea2D( const uno::Reference< drawing::XShapes >& xTarget + , const drawing::PolyPolygonShape3D& rPolyPolygon ) +{ + //create shape + uno::Reference< drawing::XShape > xShape( + m_xShapeFactory->createInstance( C2U( + "com.sun.star.drawing.PolyPolygonShape") ), uno::UNO_QUERY ); + xTarget->add(xShape); + + //set properties + uno::Reference< beans::XPropertySet > xProp( xShape, uno::UNO_QUERY ); + DBG_ASSERT(xProp.is(), "created shape offers no XPropertySet"); + if( xProp.is()) + { + try + { + //UNO_NAME_POLYGON "Polygon" drawing::PointSequence* + drawing::PointSequenceSequence aPoints( PolyToPointSequence(rPolyPolygon) ); + + //Polygon + xProp->setPropertyValue( C2U( UNO_NAME_POLYPOLYGON ) + , uno::makeAny( aPoints ) ); + + //ZOrder + //an area should always be behind other shapes + xProp->setPropertyValue( C2U( UNO_NAME_MISC_OBJ_ZORDER ) + , uno::makeAny( sal_Int32(0) ) ); + } + catch( uno::Exception& e ) + { + e; + } + } + return xShape; +} + +drawing::PolyPolygonShape3D createPolyPolygon_Symbol( const drawing::Position3D& rPos + , const drawing::Direction3D& rSize + , SymbolType eSymbolType ) +{ + const double& fX = rPos.PositionX; + const double& fY = rPos.PositionY; + + const double fWidthH = rSize.DirectionX/2.0; //fWidthH stands for Half Width + const double fHeightH = rSize.DirectionY/2.0; //fHeightH stands for Half Height + + DBG_ASSERT(eSymbolType!=SYMBOL_NONE, "do not create a symbol with type SYMBOL_NONE"); + if(eSymbolType==SYMBOL_NONE) + eSymbolType=SYMBOL_SQUARE; + + sal_Int32 nPointCount = 4; //all arrow symbols only need 4 points + switch( eSymbolType ) + { + case SYMBOL_SQUARE: + case SYMBOL_DIAMOND: + case SYMBOL_BOWTIE: + case SYMBOL_SANDGLASS: + nPointCount = 5; + break; + default: + break; + } + + //-------------------------------------- + drawing::PolyPolygonShape3D aPP; + + aPP.SequenceX.realloc(1); + aPP.SequenceY.realloc(1); + aPP.SequenceZ.realloc(1); + + drawing::DoubleSequence* pOuterSequenceX = aPP.SequenceX.getArray(); + drawing::DoubleSequence* pOuterSequenceY = aPP.SequenceY.getArray(); + drawing::DoubleSequence* pOuterSequenceZ = aPP.SequenceZ.getArray(); + + pOuterSequenceX->realloc(nPointCount); + pOuterSequenceY->realloc(nPointCount); + pOuterSequenceZ->realloc(nPointCount); + + double* pInnerSequenceX = pOuterSequenceX->getArray(); + double* pInnerSequenceY = pOuterSequenceY->getArray(); + double* pInnerSequenceZ = pOuterSequenceZ->getArray(); + + for(sal_Int32 nN = nPointCount; nN--;) + *pInnerSequenceZ++ = 0.0; + + switch(eSymbolType) + { + case SYMBOL_ARROW_DOWN: + { + *pInnerSequenceX++ = fX-fWidthH; + *pInnerSequenceY++ = fY+fHeightH; + + *pInnerSequenceX++ = fX+fWidthH; + *pInnerSequenceY++ = fY+fHeightH; + + *pInnerSequenceX++ = fX; + *pInnerSequenceY++ = fY-fHeightH; + + *pInnerSequenceX++ = fX-fWidthH; + *pInnerSequenceY++ = fY+fHeightH; + break; + } + case SYMBOL_ARROW_UP: + { + *pInnerSequenceX++ = fX-fWidthH; + *pInnerSequenceY++ = fY-fHeightH; + + *pInnerSequenceX++ = fX; + *pInnerSequenceY++ = fY+fHeightH; + + *pInnerSequenceX++ = fX+fWidthH; + *pInnerSequenceY++ = fY-fHeightH; + + *pInnerSequenceX++ = fX-fWidthH; + *pInnerSequenceY++ = fY-fHeightH; + break; + } + case SYMBOL_ARROW_RIGHT: + { + *pInnerSequenceX++ = fX-fWidthH; + *pInnerSequenceY++ = fY-fHeightH; + + *pInnerSequenceX++ = fX-fWidthH; + *pInnerSequenceY++ = fY+fHeightH; + + *pInnerSequenceX++ = fX+fWidthH; + *pInnerSequenceY++ = fY; + + *pInnerSequenceX++ = fX-fWidthH; + *pInnerSequenceY++ = fY-fHeightH; + break; + } + case SYMBOL_ARROW_LEFT: + { + *pInnerSequenceX++ = fX-fWidthH; + *pInnerSequenceY++ = fY; + + *pInnerSequenceX++ = fX+fWidthH; + *pInnerSequenceY++ = fY+fHeightH; + + *pInnerSequenceX++ = fX+fWidthH; + *pInnerSequenceY++ = fY-fHeightH; + + *pInnerSequenceX++ = fX-fWidthH; + *pInnerSequenceY++ = fY; + break; + } + case SYMBOL_BOWTIE: + { + *pInnerSequenceX++ = fX-fWidthH; + *pInnerSequenceY++ = fY-fHeightH; + + *pInnerSequenceX++ = fX-fWidthH; + *pInnerSequenceY++ = fY+fHeightH; + + *pInnerSequenceX++ = fX+fWidthH; + *pInnerSequenceY++ = fY-fHeightH; + + *pInnerSequenceX++ = fX+fWidthH; + *pInnerSequenceY++ = fY+fHeightH; + + *pInnerSequenceX++ = fX-fWidthH; + *pInnerSequenceY++ = fY-fHeightH; + break; + } + case SYMBOL_SANDGLASS: + { + *pInnerSequenceX++ = fX-fWidthH; + *pInnerSequenceY++ = fY+fHeightH; + + *pInnerSequenceX++ = fX+fWidthH; + *pInnerSequenceY++ = fY+fHeightH; + + *pInnerSequenceX++ = fX-fWidthH; + *pInnerSequenceY++ = fY-fHeightH; + + + *pInnerSequenceX++ = fX+fWidthH; + *pInnerSequenceY++ = fY-fHeightH; + + *pInnerSequenceX++ = fX-fWidthH; + *pInnerSequenceY++ = fY+fHeightH; + break; + } + case SYMBOL_DIAMOND: + { + *pInnerSequenceX++ = fX-fWidthH; + *pInnerSequenceY++ = fY; + + *pInnerSequenceX++ = fX; + *pInnerSequenceY++ = fY+fHeightH; + + *pInnerSequenceX++ = fX+fWidthH; + *pInnerSequenceY++ = fY; + + *pInnerSequenceX++ = fX; + *pInnerSequenceY++ = fY-fHeightH; + + *pInnerSequenceX++ = fX-fWidthH; + *pInnerSequenceY++ = fY; + break; + } + default: //case SYMBOL_SQUARE: + { + *pInnerSequenceX++ = fX-fWidthH; + *pInnerSequenceY++ = fY-fHeightH; + + *pInnerSequenceX++ = fX-fWidthH; + *pInnerSequenceY++ = fY+fHeightH; + + *pInnerSequenceX++ = fX+fWidthH; + *pInnerSequenceY++ = fY+fHeightH; + + *pInnerSequenceX++ = fX+fWidthH; + *pInnerSequenceY++ = fY-fHeightH; + + *pInnerSequenceX++ = fX-fWidthH; + *pInnerSequenceY++ = fY-fHeightH; + break; + } + } + //return uno::Any( &aPP, ::getCppuType((const drawing::PolyPolygonShape3D*)0) ); + return aPP; +} + +uno::Reference< drawing::XShape > + ShapeFactory::createSymbol2D( + const uno::Reference< drawing::XShapes >& xTarget + , const DataPointGeometry& rGeometry + , const ShapeAppearance& rAppearance ) +{ + //create shape + uno::Reference< drawing::XShape > xShape( + m_xShapeFactory->createInstance( C2U( + "com.sun.star.drawing.PolyPolygonShape") ), uno::UNO_QUERY ); + xTarget->add(xShape); + + //set properties + uno::Reference< beans::XPropertySet > xProp( xShape, uno::UNO_QUERY ); + DBG_ASSERT(xProp.is(), "created shape offers no XPropertySet"); + if( xProp.is()) + { + try + { + drawing::PointSequenceSequence aPoints( PolyToPointSequence( + createPolyPolygon_Symbol( rGeometry.m_aPosition + , rGeometry.m_aSize + , rAppearance.m_eSymbolType ) )); + + //Polygon + xProp->setPropertyValue( C2U( UNO_NAME_POLYPOLYGON ) + , uno::makeAny( aPoints ) ); + + ShapeFactory::setShapeAppearance( rAppearance, xProp, sal_False ); + } + catch( uno::Exception& e ) + { + e; + } + } + return xShape; +} + +uno::Reference< drawing::XShape > + ShapeFactory::createSymbol3D( const uno::Reference< drawing::XShapes >& xTarget + , const DataPointGeometry& rGeometry + , const ShapeAppearance& rAppearance ) +{ + //create shape + uno::Reference< drawing::XShape > xShape( + m_xShapeFactory->createInstance( C2U( + "com.sun.star.drawing.Shape3DExtrudeObject") ), uno::UNO_QUERY ); + xTarget->add(xShape); + + //set properties + uno::Reference< beans::XPropertySet > xProp( xShape, uno::UNO_QUERY ); + DBG_ASSERT(xProp.is(), "created shape offers no XPropertySet"); + if( xProp.is()) + { + try + { + //depth + xProp->setPropertyValue( C2U( UNO_NAME_3D_EXTRUDE_DEPTH ) + , uno::makeAny((sal_Int32)rGeometry.m_aSize.DirectionZ) ); + + //PercentDiagonal + sal_Int16 nPercentDiagonal = 0; + xProp->setPropertyValue( C2U( UNO_NAME_3D_PERCENT_DIAGONAL ) + , uno::makeAny( nPercentDiagonal ) ); + + //Polygon + xProp->setPropertyValue( C2U( UNO_NAME_3D_POLYPOLYGON3D ) + , uno::makeAny( createPolyPolygon_Symbol( rGeometry.m_aPosition + , rGeometry.m_aSize + , rAppearance.m_eSymbolType ) ) ); + + ShapeFactory::setShapeAppearance( rAppearance, xProp ); + } + catch( uno::Exception& e ) + { + e; + } + } + return xShape; +} + +void setShapeName( uno::Reference< drawing::XShape >& xShape , const ::rtl::OUString& rName ) +{ + uno::Reference< beans::XPropertySet > xProp( xShape, uno::UNO_QUERY ); + DBG_ASSERT(xProp.is(), "created shape offers no XPropertySet"); + if( xProp.is()) + { + try + { + xProp->setPropertyValue( C2U( UNO_NAME_MISC_OBJ_NAME ) + , uno::makeAny( rName ) ); + } + catch( uno::Exception& e ) + { + e; + } + } +} + +uno::Reference< drawing::XShapes > + ShapeFactory::createGroup2D( const uno::Reference< drawing::XShapes >& xTarget + , ::rtl::OUString aName ) +{ + //create and add to target + uno::Reference< drawing::XShape > xShape( + m_xShapeFactory->createInstance( C2U( + "com.sun.star.drawing.GroupShape" ) ), uno::UNO_QUERY ); + xTarget->add(xShape); + + //set name + if(aName.getLength()) + setShapeName( xShape , aName ); + + {//workaround + //need this null size as otherwise empty group shapes where painted with a gray border + xShape->setSize(awt::Size(0,0)); + } + + //return + uno::Reference< drawing::XShapes > xShapes = + uno::Reference<drawing::XShapes>( xShape, uno::UNO_QUERY ); + return xShapes; +} + +uno::Reference< drawing::XShapes > + ShapeFactory::createGroup3D( const uno::Reference< drawing::XShapes >& xTarget + , ::rtl::OUString aName ) +{ + //create shape + uno::Reference< drawing::XShape > xShape( + m_xShapeFactory->createInstance( C2U( + "com.sun.star.drawing.Shape3DSceneObject" ) ), uno::UNO_QUERY ); + + xTarget->add(xShape); + + //it is necessary to set the transform matrix to initialize the scene properly (bug #106316#) + //otherwise all objects which are placed into this Group will not be visible + //the following should be unnecessary after a the bug is fixed + { + //set properties + uno::Reference< beans::XPropertySet > xProp( xShape, uno::UNO_QUERY ); + DBG_ASSERT(xProp.is(), "created shape offers no XPropertySet"); + if( xProp.is()) + { + try + { + Matrix4D aM4; + xProp->setPropertyValue( C2U( UNO_NAME_3D_TRANSFORM_MATRIX ) + , uno::makeAny(Matrix4DToHomogenMatrix(aM4)) ); + } + catch( uno::Exception& e ) + { + e; + } + } + } + + //set name + if(aName.getLength()) + setShapeName( xShape , aName ); + + //return + uno::Reference< drawing::XShapes > xShapes = + uno::Reference<drawing::XShapes>( xShape, uno::UNO_QUERY ); + return xShapes; +} + +uno::Reference< drawing::XShape > + ShapeFactory::createLine3D( const uno::Reference< drawing::XShapes >& xTarget + , const drawing::PolyPolygonShape3D& rPoints + , const LineProperties& rLineProperties ) +{ + if(!rPoints.SequenceX.getLength()) + return NULL; + + //create shape + uno::Reference< drawing::XShape > xShape( + m_xShapeFactory->createInstance( C2U( + "com.sun.star.drawing.Shape3DPolygonObject") ), uno::UNO_QUERY ); + xTarget->add(xShape); + + //set properties + uno::Reference< beans::XPropertySet > xProp( xShape, uno::UNO_QUERY ); + DBG_ASSERT(xProp.is(), "created shape offers no XPropertySet"); + if( xProp.is()) + { + try + { + //Polygon + xProp->setPropertyValue( C2U( UNO_NAME_3D_POLYPOLYGON3D ) + , uno::makeAny( rPoints ) ); + + //LineOnly + xProp->setPropertyValue( C2U( UNO_NAME_3D_LINEONLY ) + , uno::makeAny( (sal_Bool)true ) ); +/* + //Transparency + if(rLineProperties.Transparence.hasValue()) + xProp->setPropertyValue( C2U( UNO_NAME_LINETRANSPARENCE ) + , rLineProperties.Transparence ); + + //LineStyle + if(rLineProperties.LineStyle.hasValue()) + xProp->setPropertyValue( C2U( UNO_NAME_LINESTYLE ) + , rLineProperties.LineStyle ); + + //LineWidth + if(rLineProperties.Width.hasValue()) + xProp->setPropertyValue( C2U( UNO_NAME_LINEWIDTH ) + , rLineProperties.Width ); +*/ + //LineColor + if(rLineProperties.Color.hasValue()) + xProp->setPropertyValue( C2U( UNO_NAME_LINECOLOR ) + , rLineProperties.Color ); + //, uno::makeAny( sal_Int32( Color(COL_RED).GetColor()) ) ); + } + catch( uno::Exception& e ) + { + e; + } + } + return xShape; +} + +uno::Reference< drawing::XShape > + ShapeFactory::createLine2D( const uno::Reference< drawing::XShapes >& xTarget + , const drawing::PointSequenceSequence& rPoints + , const LineProperties& rLineProperties ) +{ + if(!rPoints.getLength()) + return NULL; + + //create shape + uno::Reference< drawing::XShape > xShape( + m_xShapeFactory->createInstance( C2U( + //"com.sun.star.drawing.LineShape") ), uno::UNO_QUERY ); + "com.sun.star.drawing.PolyLineShape") ), uno::UNO_QUERY ); + //"com.sun.star.drawing.PolyLinePathShape") ), uno::UNO_QUERY ); + //"com.sun.star.drawing.PolyPolygonPathShape") ), uno::UNO_QUERY ); + //"com.sun.star.drawing.PolyPolygonShape") ), uno::UNO_QUERY ); + xTarget->add(xShape); + + //set properties + uno::Reference< beans::XPropertySet > xProp( xShape, uno::UNO_QUERY ); + DBG_ASSERT(xProp.is(), "created shape offers no XPropertySet"); + if( xProp.is()) + { + try + { + //Polygon + xProp->setPropertyValue( C2U( UNO_NAME_POLYPOLYGON ) + , uno::makeAny( rPoints ) ); + + //Transparency + if(rLineProperties.Transparence.hasValue()) + xProp->setPropertyValue( C2U( UNO_NAME_LINETRANSPARENCE ) + , rLineProperties.Transparence ); + + //LineStyle + if(rLineProperties.LineStyle.hasValue()) + xProp->setPropertyValue( C2U( UNO_NAME_LINESTYLE ) + , rLineProperties.LineStyle ); + + //LineWidth + if(rLineProperties.Width.hasValue()) + xProp->setPropertyValue( C2U( UNO_NAME_LINEWIDTH ) + , rLineProperties.Width ); + + //LineColor + if(rLineProperties.Color.hasValue()) + xProp->setPropertyValue( C2U( UNO_NAME_LINECOLOR ) + , rLineProperties.Color ); + + //LineDash + if(rLineProperties.Dash.hasValue()) + xProp->setPropertyValue( C2U( UNO_NAME_LINEDASH ) + , rLineProperties.Dash ); + } + catch( uno::Exception& e ) + { + e; + } + } + return xShape; +} + +uno::Any ShapeFactory::makeTransformation( const awt::Point& rScreenPosition2D, double fRotationAnglePi ) +{ + Matrix3D aM3; + //As autogrow is active the rectangle is automatically expanded to that side + //to which the text is not adjusted. + aM3.Scale( 1, 1 ); + aM3.Rotate( fRotationAnglePi ); + aM3.Translate( rScreenPosition2D.X, rScreenPosition2D.Y ); + uno::Any aATransformation = uno::makeAny( Matrix3DToHomogenMatrix3(aM3) ); + return aATransformation; +} + +uno::Reference< drawing::XShape > + ShapeFactory::createText( const uno::Reference< drawing::XShapes >& xTarget + , const ::rtl::OUString& rText + , const tNameSequence& rPropNames + , const tAnySequence& rPropValues + , const uno::Any& rATransformation ) +{ + //create shape and add to page + uno::Reference< drawing::XShape > xShape( + m_xShapeFactory->createInstance( C2U( + "com.sun.star.drawing.TextShape" ) ), uno::UNO_QUERY ); + xTarget->add(xShape); + + //set text + uno::Reference< text::XTextRange > xTextRange( xShape, uno::UNO_QUERY ); + if( xTextRange.is() ) + xTextRange->setString( rText ); + + //set properties + PropertyMapper::setMultiProperties( rPropNames, rPropValues, xShape ); + + //set position matrix + //the matrix needs to be set at the end behind autogrow and such position influencing properties + uno::Reference< beans::XPropertySet > xProp( xShape, uno::UNO_QUERY ); + if( xProp.is() ) + { + try + { + xProp->setPropertyValue( C2U( "Transformation" ), rATransformation ); + } + catch( uno::Exception& e ) + { + e; + } + } + return xShape; + /* + //create 3D anchor shape + uno::Reference< drawing::XShape > xShape3DAnchor = createCube( xTarget3D + , DataPointGeometry( rGeometry.m_aPosition,drawing::Direction3D(1000,1000,1000) ) + , ShapeAppearance( Color(COL_YELLOW).GetColor() ) ); + //get 2D position from xShape3DAnchor + //the 2D position of the 3D Shape is not correct initially this is a bug in draw @todo + //awt::Point aPosition2D( xShape3DAnchor->getPosition() ); + */ + + //-- + /* + uno::Reference< text::XTextRange > xTextRange( xShape2DText, uno::UNO_QUERY ); + uno::Reference< text::XText > xText11( xShape2DText, uno::UNO_QUERY ); + if( xTextRange.is() ) + { + uno::Reference< text::XText > xText = xTextRange->getText(); + + xText->insertString( xTextRange, C2U( "Hello" ), true ); + xText->insertControlCharacter( xTextRange, + text::ControlCharacter::LINE_BREAK, false ); + xText->insertString( xTextRange, C2U( "World" ), false ); + + rtl::OUString aTmp = xText->getString(); + int a=1; + } + */ + + //-- + /* + //get the created paragraph and set the character properties there + uno::Reference< container::XEnumerationAccess > xEnumerationAccess( xShape, uno::UNO_QUERY ); + uno::Reference< container::XEnumeration > xEnumeration = xEnumerationAccess->createEnumeration(); + uno::Any aAParagraph = xEnumeration->nextElement(); + uno::Reference< text::XTextContent > xTextContent = NULL; + aAParagraph >>= xTextContent; + uno::Reference< beans::XPropertySet > xParaProp( xTextContent, uno::UNO_QUERY ); + if(xParaProp.is()) + { + try + { + //test: + //ControlTextEmphasis + //FontEmphasisMark + //CharEmphasis + xParaProp->setPropertyValue( C2U( "CharEmphasize" ), + uno::makeAny( text::FontEmphasis::DOT_ABOVE ) ); + + xParaProp->setPropertyValue( C2U( "FontEmphasisMark" ), + uno::makeAny( sal_Int16(2) ) ); + + xParaProp->setPropertyValue( C2U( "ControlTextEmphasis" ), + uno::makeAny( sal_Int16(2) ) ); + } + catch( uno::Exception& e ) + { + e; + } + } + */ +} + +//static +rtl::OUString ShapeFactory::getStackedString( const rtl::OUString& rString, bool bStacked ) +{ + sal_Int32 nLen = rString.getLength(); + if(!bStacked || !nLen) + return rString; + + rtl::OUStringBuffer aStackStr; + rtl::OUStringBuffer aSource(rString); + + //add a newline after each letter + //as we do not no letters here add a newline after each char + for( sal_Int32 nPosSrc=0; nPosSrc < nLen; nPosSrc++ ) + { + aStackStr.append( aSource.charAt( nPosSrc ) ); + aStackStr.append( sal_Unicode('\r') ); + } + return aStackStr.makeStringAndClear(); +} + +//............................................................................. +} //namespace chart +//............................................................................. diff --git a/chart2/source/view/main/Stripe.cxx b/chart2/source/view/main/Stripe.cxx new file mode 100644 index 000000000..6a090558a --- /dev/null +++ b/chart2/source/view/main/Stripe.cxx @@ -0,0 +1,197 @@ +/************************************************************************* + * + * $RCSfile: Stripe.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:34 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "Stripe.hxx" + +#ifndef __CHART_COMMON_CONVERTERS_HXX +#include "CommonConverters.hxx" +#endif + +#ifndef _COM_SUN_STAR_DRAWING_POLYPOLYGONSHAPE3D_HPP_ +#include <com/sun/star/drawing/PolyPolygonShape3D.hpp> +#endif +#ifndef _COM_SUN_STAR_DRAWING_DOUBLESEQUENCE_HPP_ +#include <com/sun/star/drawing/DoubleSequence.hpp> +#endif + +#ifndef _POLY3D_HXX +#include <svx/poly3d.hxx> +#endif + +using namespace ::com::sun::star; + +//............................................................................. +namespace chart +{ +//............................................................................. + +Stripe::Stripe( const drawing::Position3D& rPoint1 + , const drawing::Direction3D& rDirectionToPoint2 + , const drawing::Direction3D& rDirectionToPoint4 ) + : m_aPoint1(rPoint1) + , m_aPoint2(rPoint1+rDirectionToPoint2) + , m_aPoint3(m_aPoint2+rDirectionToPoint4) + , m_aPoint4(rPoint1+rDirectionToPoint4) +{ + +} + +drawing::Direction3D Stripe::GetDirectionTo4() const +{ + return m_aPoint4-m_aPoint1; +} + +/* +Stripe::Stripe( const drawing::Position3D& rPoint1 + , const drawing::Position3D& rPoint2 + , const drawing::Position3D& rPoint3 + , const drawing::Position3D& rPoint4 ) + : m_aPoint1(rPoint1) + , m_aPoint2(rPoint2) + , m_aPoint3(rPoint3) + , m_aPoint4(rPoint4) +{ + +} +*/ + +uno::Any Stripe::getPolyPolygonShape3D() const +{ + drawing::PolyPolygonShape3D aPP; + + aPP.SequenceX.realloc(1); + aPP.SequenceY.realloc(1); + aPP.SequenceZ.realloc(1); + + drawing::DoubleSequence* pOuterSequenceX = aPP.SequenceX.getArray(); + drawing::DoubleSequence* pOuterSequenceY = aPP.SequenceY.getArray(); + drawing::DoubleSequence* pOuterSequenceZ = aPP.SequenceZ.getArray(); + + pOuterSequenceX->realloc(4); + pOuterSequenceY->realloc(4); + pOuterSequenceZ->realloc(4); + + double* pInnerSequenceX = pOuterSequenceX->getArray(); + double* pInnerSequenceY = pOuterSequenceY->getArray(); + double* pInnerSequenceZ = pOuterSequenceZ->getArray(); + + *pInnerSequenceX++ = m_aPoint1.PositionX; + *pInnerSequenceY++ = m_aPoint1.PositionY; + *pInnerSequenceZ++ = m_aPoint1.PositionZ; + + *pInnerSequenceX++ = m_aPoint2.PositionX; + *pInnerSequenceY++ = m_aPoint2.PositionY; + *pInnerSequenceZ++ = m_aPoint2.PositionZ; + + *pInnerSequenceX++ = m_aPoint3.PositionX; + *pInnerSequenceY++ = m_aPoint3.PositionY; + *pInnerSequenceZ++ = m_aPoint3.PositionZ; + + *pInnerSequenceX++ = m_aPoint4.PositionX; + *pInnerSequenceY++ = m_aPoint4.PositionY; + *pInnerSequenceZ++ = m_aPoint4.PositionZ; + + return uno::Any( &aPP, ::getCppuType((const drawing::PolyPolygonShape3D*)0) ); +} + +drawing::Direction3D Stripe::getNormal() const +{ + Polygon3D aPolygon3D(3); + aPolygon3D[0] = Position3DToVector3D( m_aPoint1 ); + aPolygon3D[1] = Position3DToVector3D( m_aPoint2 ); + aPolygon3D[2] = Position3DToVector3D( m_aPoint3 ); + Vector3D aNormal = aPolygon3D.GetNormal(); + return Vector3DToDirection3D(aNormal); +} + +uno::Any Stripe::getNormalsPolyPolygonShape3D() const +{ + drawing::PolyPolygonShape3D aPP; + + aPP.SequenceX.realloc(1); + aPP.SequenceY.realloc(1); + aPP.SequenceZ.realloc(1); + + drawing::DoubleSequence* pOuterSequenceX = aPP.SequenceX.getArray(); + drawing::DoubleSequence* pOuterSequenceY = aPP.SequenceY.getArray(); + drawing::DoubleSequence* pOuterSequenceZ = aPP.SequenceZ.getArray(); + + pOuterSequenceX->realloc(4); + pOuterSequenceY->realloc(4); + pOuterSequenceZ->realloc(4); + + double* pInnerSequenceX = pOuterSequenceX->getArray(); + double* pInnerSequenceY = pOuterSequenceY->getArray(); + double* pInnerSequenceZ = pOuterSequenceZ->getArray(); + + drawing::Direction3D aNormal( getNormal() ); + + for(sal_Int32 nN=4; --nN; ) + { + *pInnerSequenceX++ = aNormal.DirectionX; + *pInnerSequenceY++ = aNormal.DirectionY; + *pInnerSequenceZ++ = aNormal.DirectionZ; + } + return uno::Any( &aPP, ::getCppuType((const drawing::PolyPolygonShape3D*)0) ); +} + +//............................................................................. +} //namespace chart +//............................................................................. diff --git a/chart2/source/view/main/VDataSeries.cxx b/chart2/source/view/main/VDataSeries.cxx new file mode 100644 index 000000000..e4fa63820 --- /dev/null +++ b/chart2/source/view/main/VDataSeries.cxx @@ -0,0 +1,500 @@ +/************************************************************************* + * + * $RCSfile: VDataSeries.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:34 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "VDataSeries.hxx" +#include "chartview/ObjectIdentifier.hxx" +#include "macros.hxx" + +//#include "CommonConverters.hxx" + +#ifndef INCLUDED_RTL_MATH_HXX +#include <rtl/math.hxx> +#endif + +#ifndef _TOOLS_DEBUG_HXX +#include <tools/debug.hxx> +#endif + +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XNUMERICALDATASEQUENCE_HPP_ +#include <drafts/com/sun/star/chart2/XNumericalDataSequence.hpp> +#endif +#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_ +#include <com/sun/star/beans/XPropertySet.hpp> +#endif +#ifndef _COM_SUN_STAR_DRAWING_LINESTYLE_HPP_ +#include <com/sun/star/drawing/LineStyle.hpp> +#endif +#ifndef _COM_SUN_STAR_DRAWING_TEXTVERTICALADJUST_HPP_ +#include <com/sun/star/drawing/TextVerticalAdjust.hpp> +#endif +#ifndef _COM_SUN_STAR_DRAWING_TEXTHORIZONTALADJUST_HPP_ +#include <com/sun/star/drawing/TextHorizontalAdjust.hpp> +#endif +#ifndef _COM_SUN_STAR_TEXT_WRITINGMODE_HPP_ +#include <com/sun/star/text/WritingMode.hpp> +#endif + +//............................................................................. +namespace chart +{ +//............................................................................. +using namespace ::com::sun::star; +using namespace ::drafts::com::sun::star::chart2; +/* +void PlottingPositionHelper::setTransformationSceneToScreen( const drawing::HomogenMatrix& rMatrix) +{ + m_aMatrixScreenToScene = HomogenMatrixToMatrix4D(rMatrix); +} + +void PlottingPositionHelper::setScales( const uno::Sequence< ExplicitScaleData >& rScales ) +{ + m_aScales = rScales; +} +*/ +VDataSeries::VDataSeries() + : m_xShape(NULL) + , m_xLabelsShape(NULL) + , m_aAppearanceOfSeries(12632256) //LIGHT_GRAY is default color for dataseries for testing + , m_xDataSeries(NULL) + , m_aDataSequences() + , m_nPointCount(0) + , m_xData_XValues(NULL) + , m_xData_YValues(NULL) + , m_xData_ZValues(NULL) + + , m_apCaption_Series(NULL) + , m_apLabelPropNames_Series(NULL) + , m_apLabelPropValues_Series(NULL) + , m_apCaption_AttributedPoint(NULL) + , m_apLabelPropNames_AttributedPoint(NULL) + , m_apLabelPropValues_AttributedPoint(NULL) +{ + +} + +void initDoubleValues( uno::Sequence< double >& rDoubleValues, + const uno::Reference< XDataSequence >& xDataSequence ) +{ + OSL_ASSERT( xDataSequence.is()); + if(!xDataSequence.is()) + return; + + uno::Reference< XNumericalDataSequence > xNumericalDataSequence + = uno::Reference< XNumericalDataSequence >( xDataSequence, uno::UNO_QUERY ); + if( xNumericalDataSequence.is() ) + { + rDoubleValues = xNumericalDataSequence->getNumericalData(); + } + else + { + uno::Sequence< uno::Any > aValues = xDataSequence->getData(); + rDoubleValues.realloc(aValues.getLength()); + for(sal_Int32 nN=aValues.getLength();nN--;) + { + if( !(aValues[nN] >>= rDoubleValues[nN]) ) + { + ::rtl::math::setNan( &rDoubleValues[nN] ); + } + } + } +} + +VDataSeries::VDataSeries( uno::Reference< XDataSeries > xDataSeries, const ShapeAppearance& rDefaultAppearence ) + : m_xShape(NULL) + , m_xLabelsShape(NULL) + , m_aAppearanceOfSeries(rDefaultAppearence) //LIGHT_GRAY is default color for dataseries for testing + , m_xDataSeries(xDataSeries) + , m_aDataSequences() + , m_nPointCount(0) + , m_xData_XValues(NULL) + , m_xData_YValues(NULL) + , m_xData_ZValues(NULL) + + , m_apCaption_Series(NULL) + , m_apLabelPropNames_Series(NULL) + , m_apLabelPropValues_Series(NULL) + , m_apCaption_AttributedPoint(NULL) + , m_apLabelPropNames_AttributedPoint(NULL) + , m_apLabelPropValues_AttributedPoint(NULL) +{ + uno::Reference<XDataSource> xDataSource = + uno::Reference<XDataSource>( xDataSeries, uno::UNO_QUERY ); + + m_aDataSequences = xDataSource->getDataSequences(); + + for(sal_Int32 nN = m_aDataSequences.getLength();nN--;) + { + uno::Reference<XDataSequence> xDataSequence = m_aDataSequences[nN]; + uno::Reference<beans::XPropertySet> xProp(xDataSequence, uno::UNO_QUERY ); + if( xProp.is()) + { + try + { + uno::Any aARole = xProp->getPropertyValue( C2U( "Role" ) ); + rtl::OUString aRole; + aARole >>= aRole; + + if( aRole.equals(C2U("x-values")) ) + { + m_xData_XValues = xDataSequence; + } + else if( aRole.equals(C2U("values")) ) + { + m_xData_YValues = xDataSequence; + initDoubleValues( m_YValues_Double, m_xData_YValues ); + m_nPointCount = xDataSequence->getData().getLength(); //@todo determination of m_nPointCount may needs to be improved (e.g. max of x,y,z or something) + } + //@todo assign the other roles (+ error for unknown?) + } + catch( uno::Exception& e ) + { + e; + } + } + } + + + uno::Reference<beans::XPropertySet> xProp(xDataSeries, uno::UNO_QUERY ); + if( xProp.is()) + { + try + { + //get style + uno::Any aAFirstColor = xProp->getPropertyValue( C2U( "Color" ) ); + sal_Int32 nFirstColor; + if(aAFirstColor>>=nFirstColor) + m_aAppearanceOfSeries.m_nColorData = nFirstColor; + + //get CID + uno::Any aAIdentifier = xProp->getPropertyValue( C2U( "Identifier" ) ); + aAIdentifier >>= m_aIdentifier; + + m_aCID = ObjectIdentifier::createClassifiedIdentifier( + OBJECTTYPE_DATA_SERIES, m_aIdentifier ); + m_aPointCID_Stub = ObjectIdentifier::createPointCID_Stub( m_aCID ); + + m_aLabelCID_Stub = ObjectIdentifier::createClassifiedIdentifier( + OBJECTTYPE_DATA_LABEL, ::rtl::OUString(), getLabelsCID() ); + + //get AttributedDataPoints + xProp->getPropertyValue( C2U( "AttributedDataPoints" ) ) >>= m_aAttributedDataPointIndexList; + } + catch( uno::Exception& e ) + { + e; + } + } +} + +VDataSeries::~VDataSeries() +{ +} + +rtl::OUString VDataSeries::getCID() const +{ + return m_aCID; +} +rtl::OUString VDataSeries::getPointCID_Stub() const +{ + return m_aPointCID_Stub; +} +rtl::OUString VDataSeries::getLabelsCID() const +{ + return ObjectIdentifier::createClassifiedIdentifier( + OBJECTTYPE_DATA_LABELS, m_aIdentifier ); +} +rtl::OUString VDataSeries::getLabelCID_Stub() const +{ + return m_aLabelCID_Stub; +} + +sal_Int32 VDataSeries::getTotalPointCount() const +{ + return m_nPointCount; +} + +double VDataSeries::getX( sal_Int32 index ) const +{ + if(m_xData_XValues.is()) + { + return 1; //@todo + } + else + { + return index; + } +} + +double VDataSeries::getY( sal_Int32 index ) const +{ + if( 0<=index && index<m_YValues_Double.getLength() ) + return m_YValues_Double[index]; + else + { + double fNan; + ::rtl::math::setNan( & fNan ); + return fNan; + } +} + +rtl::OUString VDataSeries::getCategoryString( sal_Int32 index ) const +{ + //@todo get real Category string if any - else return empty string + rtl::OUString aRet; + if( 0<=index && index<m_nPointCount ) + { + aRet+=C2U("index "); + aRet+=rtl::OUString::valueOf(index); + } + return aRet; +} + +ShapeAppearance VDataSeries::getAppearanceOfPoint( sal_Int32 index ) const +{ + return m_aAppearanceOfSeries; +} + +bool VDataSeries::isAttributedDataPoint( sal_Int32 index ) const +{ + //returns true if the data point assigned by the given index has set it's own properties + if( index>=m_nPointCount || m_nPointCount==0) + return false; + for(sal_Int32 nN=m_aAttributedDataPointIndexList.getLength();nN--;) + { + if(index==m_aAttributedDataPointIndexList[nN]) + return true; + } + return false; +} + +uno::Reference< beans::XPropertySet > VDataSeries::getPropertiesOfPoint( sal_Int32 index ) const +{ + if( isAttributedDataPoint( index ) ) + return m_xDataSeries->getDataPointByIndex(index); + return this->getPropertiesOfSeries(); +} + +uno::Reference< beans::XPropertySet > VDataSeries::getPropertiesOfSeries() const +{ + return uno::Reference<beans::XPropertySet>(m_xDataSeries, uno::UNO_QUERY ); +} + +::std::auto_ptr< DataCaptionStyle > getDataCaptionStyleFromPropertySet( + const uno::Reference< beans::XPropertySet >& xProp ) +{ + ::std::auto_ptr< DataCaptionStyle > apCaption( new DataCaptionStyle() ); + try + { + if( !(xProp->getPropertyValue( C2U( "DataCaption" ) ) >>= *apCaption) ) + apCaption.reset(); + } + catch( uno::Exception &e) + { + e; + } + return apCaption; +} + +DataCaptionStyle* VDataSeries::getDataCaptionStyle( sal_Int32 index ) const +{ + DataCaptionStyle* pRet = NULL; + if( isAttributedDataPoint( index ) ) + { + if(!m_apCaption_AttributedPoint.get() || m_nCurrentAttributedPoint!=index) + { + m_apCaption_AttributedPoint = getDataCaptionStyleFromPropertySet( this->getPropertiesOfPoint( index ) ); + m_nCurrentAttributedPoint = index; + } + pRet = m_apCaption_AttributedPoint.get(); + } + else + { + if(!m_apCaption_Series.get()) + m_apCaption_Series = getDataCaptionStyleFromPropertySet( this->getPropertiesOfPoint( index ) ); + pRet = m_apCaption_Series.get(); + } + return pRet; +} + + +void createTextLabelMultiPropertyListsFromPropertySet( + const uno::Reference< beans::XPropertySet >& xSourceProp + , ::std::auto_ptr< tNameSequence >& rLabelPropNames + , ::std::auto_ptr< tAnySequence >& rLabelPropValues + ) +{ + tPropertyNameValueMap aValueMap; + + //fill character properties into the ValueMap + PropertyMapper::getValueMap( aValueMap + , PropertyMapper::getPropertyNameMapForCharacterProperties() + , uno::Reference< beans::XPropertySet >::query( xSourceProp ) //Text Properties source + ); + + //------------------------- + //some more shape properties apart from character properties, position-matrix and label string + + //@todo get correct horizontal and vertical adjust and writing mode + drawing::TextHorizontalAdjust eHorizontalAdjust = drawing::TextHorizontalAdjust_CENTER; + drawing::TextVerticalAdjust eVerticalAdjust = drawing::TextVerticalAdjust_CENTER; + //text::WritingMode eWritingMode = text::WritingMode_LR_TB;//@todo get correct one + + aValueMap.insert( tPropertyNameValueMap::value_type( C2U("LineStyle"), uno::makeAny(drawing::LineStyle_NONE) ) ); // drawing::LineStyle + aValueMap.insert( tPropertyNameValueMap::value_type( C2U("TextHorizontalAdjust"), uno::makeAny(eHorizontalAdjust) ) ); // drawing::TextHorizontalAdjust + aValueMap.insert( tPropertyNameValueMap::value_type( C2U("TextVerticalAdjust"), uno::makeAny(eVerticalAdjust) ) ); //drawing::TextVerticalAdjust + //aValueMap.insert( tPropertyNameValueMap::value_type( C2U("TextWritingMode"), uno::makeAny(eWritingMode) ) ); //text::WritingMode + aValueMap.insert( tPropertyNameValueMap::value_type( C2U("TextAutoGrowHeight"), uno::makeAny(sal_True) ) ); // sal_Bool + aValueMap.insert( tPropertyNameValueMap::value_type( C2U("TextAutoGrowWidth"), uno::makeAny(sal_True) ) ); // sal_Bool + aValueMap.insert( tPropertyNameValueMap::value_type( C2U("Name"), uno::makeAny( rtl::OUString() ) ) ); //CID rtl::OUString - needs to be overwritten for each point + + //------------------------- + tNameSequence* pPropNames = new tNameSequence(); + tAnySequence* pPropValues = new tAnySequence(); + PropertyMapper::getMultiPropertyListsFromValueMap( *pPropNames, *pPropValues, aValueMap ); + + rLabelPropNames = ::std::auto_ptr< tNameSequence >(pPropNames); + rLabelPropValues = ::std::auto_ptr< tAnySequence >(pPropValues); +} + +bool VDataSeries::getTextLabelMultiPropertyLists( sal_Int32 index + , tNameSequence*& pPropNames + , tAnySequence*& pPropValues ) const +{ + pPropNames = NULL; pPropValues = NULL; + if( isAttributedDataPoint( index ) ) + { + if(!m_apLabelPropValues_AttributedPoint.get() || m_nCurrentAttributedPoint!=index) + { + createTextLabelMultiPropertyListsFromPropertySet( + this->getPropertiesOfPoint( index ) + , m_apLabelPropNames_AttributedPoint + , m_apLabelPropValues_AttributedPoint ); + m_nCurrentAttributedPoint = index; + } + pPropNames = m_apLabelPropNames_AttributedPoint.get(); + pPropValues = m_apLabelPropValues_AttributedPoint.get(); + } + else + { + if(!m_apLabelPropValues_Series.get()) + { + createTextLabelMultiPropertyListsFromPropertySet( + this->getPropertiesOfPoint( index ) + , m_apLabelPropNames_Series + , m_apLabelPropValues_Series ); + } + pPropNames = m_apLabelPropNames_Series.get(); + pPropValues = m_apLabelPropValues_Series.get(); + } + if(pPropNames&&pPropValues) + return true; + return false; +} + +//----------------------------------------------------------------------------- + +/* +//static +sal_Int32 VDataSeries::getCategoryCount( + const uno::Sequence< uno::Reference< XDataSeries > >& rSeriesList ) +{ + sal_Int32 nRet = 1; + for( sal_Int32 nN = rSeriesList.getLength(); nN--; ) + { + uno::Reference<XDataSource> xDataSource = + uno::Reference<XDataSource>( rSeriesList[nN], uno::UNO_QUERY ); + + uno::Sequence< uno::Reference< XDataSequence > > aDataSequences + = xDataSource->getDataSequences(); + + for(sal_Int32 nN = aDataSequences.getLength();nN--;) + { + uno::Reference<XDataSequence> xDataSequence = aDataSequences[nN]; + uno::Reference<beans::XPropertySet> xProp(xDataSequence, uno::UNO_QUERY ); + if( xProp.is()) + { + try + { + uno::Any aARole = xProp->getPropertyValue( C2U( "Role" ) ); + rtl::OUString aRole; + aARole >>= aRole; + + if( aRole.equals(C2U("categories")) ) + { + sal_Int32 nCount = xDataSequence->getData().getLength(); + if(nRet<nCount) + nRet = nCount; + } + } + catch( uno::Exception& e ) + { + e; + } + } + } + + } + return nRet; +} +*/ + +//............................................................................. +} //namespace chart +//............................................................................. diff --git a/chart2/source/view/main/VLegend.cxx b/chart2/source/view/main/VLegend.cxx new file mode 100644 index 000000000..bf081365d --- /dev/null +++ b/chart2/source/view/main/VLegend.cxx @@ -0,0 +1,72 @@ +/************************************************************************* + * + * $RCSfile: VLegend.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:34 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef _VLEGEND_HXX +#include "VLegend.hxx" +#endif + +//............................................................................. +namespace chart +{ +//............................................................................. + +//............................................................................. +} //namespace chart +//............................................................................. diff --git a/chart2/source/view/main/VLegend.hxx b/chart2/source/view/main/VLegend.hxx new file mode 100644 index 000000000..f9712b6c6 --- /dev/null +++ b/chart2/source/view/main/VLegend.hxx @@ -0,0 +1,81 @@ +/************************************************************************* + * + * $RCSfile: VLegend.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:34 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef _VLEGEND_HXX +#define _VLEGEND_HXX + +//............................................................................. +namespace chart +{ +//............................................................................. + +//----------------------------------------------------------------------------- +/** +*/ + +class VLegend +{ +}; + +//............................................................................. +} //namespace chart +//............................................................................. +#endif + diff --git a/chart2/source/view/main/VTitle.cxx b/chart2/source/view/main/VTitle.cxx new file mode 100644 index 000000000..a70235e8f --- /dev/null +++ b/chart2/source/view/main/VTitle.cxx @@ -0,0 +1,314 @@ +/************************************************************************* + * + * $RCSfile: VTitle.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:34 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "VTitle.hxx" +#include "CommonConverters.hxx" +#include "macros.hxx" +#include "PropertyMapper.hxx" +#include "ShapeFactory.hxx" +#include "chartview/ObjectIdentifier.hxx" + +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XFORMATTEDSTRING_HPP_ +#include <drafts/com/sun/star/chart2/XFormattedString.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XIDENTIFIABLE_HPP_ +#include <drafts/com/sun/star/chart2/XIdentifiable.hpp> +#endif + +// header for class Matrix3D +#ifndef _B2D_MATRIX3D_HXX +#include <goodies/matrix3d.hxx> +#endif + +#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_ +#include <com/sun/star/beans/XPropertySet.hpp> +#endif +#ifndef _COM_SUN_STAR_DRAWING_TEXTVERTICALADJUST_HPP_ +#include <com/sun/star/drawing/TextVerticalAdjust.hpp> +#endif +#ifndef _COM_SUN_STAR_DRAWING_TEXTHORIZONTALADJUST_HPP_ +#include <com/sun/star/drawing/TextHorizontalAdjust.hpp> +#endif +#ifndef _COM_SUN_STAR_TEXT_CONTROLCHARACTER_HPP_ +#include <com/sun/star/text/ControlCharacter.hpp> +#endif +#ifndef _COM_SUN_STAR_TEXT_XTEXT_HPP_ +#include <com/sun/star/text/XText.hpp> +#endif +#ifndef _COM_SUN_STAR_TEXT_XTEXTCURSOR_HPP_ +#include <com/sun/star/text/XTextCursor.hpp> +#endif + +//............................................................................. +namespace chart +{ +//............................................................................. +using namespace ::com::sun::star; +using namespace ::drafts::com::sun::star::chart2; + +VTitle::VTitle( const uno::Reference< XTitle > & xTitle ) + : m_xTarget(NULL) + , m_xShapeFactory(NULL) + , m_xTitle(xTitle) + , m_xShape(NULL) + , m_fRotationAngleDegree(0.0) + , m_nXPos(0) + , m_nYPos(0) +{ +} + +VTitle::~VTitle() +{ +} + +void SAL_CALL VTitle::init( + const uno::Reference< drawing::XShapes >& xTargetPage + , const uno::Reference< lang::XMultiServiceFactory >& xFactory ) +{ + m_xTarget = xTargetPage; + m_xShapeFactory = xFactory; +} + + +awt::Size VTitle::getSize() const +{ + awt::Size aRet; + if(m_xShape.is()) + { + aRet = m_xShape->getSize(); + } + return aRet; +} + +void VTitle::changePosition( const awt::Point& rPos ) +{ + if(!m_xShape.is()) + return; + uno::Reference< beans::XPropertySet > xShapeProp( m_xShape, uno::UNO_QUERY ); + if(!xShapeProp.is()) + return; + try + { + m_nXPos = rPos.X; + m_nYPos = rPos.Y; + + //set position matrix + //the matrix needs to be set at the end behind autogrow and such position influencing properties + Matrix3D aM3; + aM3.Scale( 1, 1 ); + aM3.Rotate( m_fRotationAngleDegree ); + aM3.Translate( m_nXPos, m_nYPos); + xShapeProp->setPropertyValue( C2U( "Transformation" ), uno::makeAny( Matrix3DToHomogenMatrix3(aM3) ) ); + } + catch( uno::Exception& e ) + { + e; + } +} + +void VTitle::createShapes( const awt::Point& rPos ) +{ + try + { + if(!m_xTitle.is()) + return; + + uno::Sequence< uno::Reference< XFormattedString > > aStringList = m_xTitle->getText(); + if(aStringList.getLength()<=0) + return; + + //create shape and add to page + uno::Reference< drawing::XShape > xShape( + m_xShapeFactory->createInstance( C2U( + "com.sun.star.drawing.TextShape" ) ), uno::UNO_QUERY ); + m_xTarget->add(xShape); + m_xShape = xShape; + + //set text and text properties + uno::Reference< text::XText > xText( xShape, uno::UNO_QUERY ); + uno::Reference< text::XTextRange > xTextRange( xShape, uno::UNO_QUERY ); + uno::Reference< text::XTextCursor > xTextCursor( xText->createTextCursor() ); + uno::Reference< beans::XPropertySet > xShapeProp( xShape, uno::UNO_QUERY ); + uno::Reference< beans::XPropertySet > xTitleProperties( m_xTitle, uno::UNO_QUERY ); + if( !xText.is() || !xTextRange.is() || !xTextCursor.is() || !xShapeProp.is() || !xTitleProperties.is() ) + return; + + tPropertyNameValueMap aValueMap; + //fill line-, fill- and paragraph-properties into the ValueMap + { + tMakePropertyNameMap aNameMap = PropertyMapper::getPropertyNameMapForParagraphProperties(); + const tMakePropertyNameMap& rFillPropMap = PropertyMapper::getPropertyNameMapForFillProperties(); + const tMakePropertyNameMap& rLinePropMap = PropertyMapper::getPropertyNameMapForLineProperties(); + aNameMap.insert(rFillPropMap.begin(),rFillPropMap.end()); + aNameMap.insert(rLinePropMap.begin(),rLinePropMap.end()); + + PropertyMapper::getValueMap( aValueMap, aNameMap, xTitleProperties ); + } + + //fill some more shape properties into the ValueMap + { + drawing::TextHorizontalAdjust eHorizontalAdjust = drawing::TextHorizontalAdjust_CENTER; + drawing::TextVerticalAdjust eVerticalAdjust = drawing::TextVerticalAdjust_CENTER; + //text::WritingMode eWritingMode = text::WritingMode_LR_TB;//@todo get correct one + + aValueMap.insert( tPropertyNameValueMap::value_type( C2U("TextHorizontalAdjust"), uno::makeAny(eHorizontalAdjust) ) ); // drawing::TextHorizontalAdjust + aValueMap.insert( tPropertyNameValueMap::value_type( C2U("TextVerticalAdjust"), uno::makeAny(eVerticalAdjust) ) ); //drawing::TextVerticalAdjust + //aValueMap.insert( tPropertyNameValueMap::value_type( C2U("TextWritingMode"), uno::makeAny(eWritingMode) ) ); //text::WritingMode + aValueMap.insert( tPropertyNameValueMap::value_type( C2U("TextAutoGrowHeight"), uno::makeAny(sal_True) ) ); // sal_Bool + aValueMap.insert( tPropertyNameValueMap::value_type( C2U("TextAutoGrowWidth"), uno::makeAny(sal_True) ) ); // sal_Bool + + ////aValueMap.insert( tPropertyNameValueMap::value_type( C2U("TextMaximumFrameWidth"), uno::makeAny(rSize.Width) ) ); //sal_Int32 + ////aValueMap.insert( tPropertyNameValueMap::value_type( C2U("TextMaximumFrameHeight"), uno::makeAny(rSize.Height) ) ); //sal_Int32 + + //set name/classified ObjectID (CID) + uno::Reference< XIdentifiable > xIdent( m_xTitle, uno::UNO_QUERY ); + if( xIdent.is()) + { + rtl::OUString aCID = ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_TITLE, xIdent->getIdentifier() ); + aValueMap.insert( tPropertyNameValueMap::value_type( C2U("Name"), uno::makeAny( aCID ) ) ); //CID rtl::OUString + } + } + + //set global title properties + { + tNameSequence aPropNames; + tAnySequence aPropValues; + PropertyMapper::getMultiPropertyListsFromValueMap( aPropNames, aPropValues, aValueMap ); + PropertyMapper::setMultiProperties( aPropNames, aPropValues, xShape ); + } + + sal_Bool bStackCharacters(sal_False); + try + { + xTitleProperties->getPropertyValue( C2U( "StackCharacters" ) ) >>= bStackCharacters; + } + catch( uno::Exception& e ) + { + e; + } + if(bStackCharacters) + { + //if the characters should be stacked we use only the first character properties for code simplicity + if( aStringList.getLength()>0 ) + { + rtl::OUString aLabel; + for( sal_Int32 nN=0; nN<aStringList.getLength();nN++ ) + aLabel += aStringList[nN]->getString(); + aLabel = ShapeFactory::getStackedString( aLabel, bStackCharacters ); + xTextCursor->gotoEnd(false); + xText->insertString( xTextRange, aLabel, false ); + xTextCursor->gotoEnd(true); + uno::Reference< beans::XPropertySet > xTargetProps( xTextCursor, uno::UNO_QUERY ); + uno::Reference< beans::XPropertySet > xSourceProps( aStringList[0], uno::UNO_QUERY ); + + PropertyMapper::setMappedProperties( xTargetProps, xSourceProps + , PropertyMapper::getPropertyNameMapForCharacterProperties() ); + } + } + else + { + uno::Sequence< uno::Reference< text::XTextCursor > > aCursorList( aStringList.getLength() ); + for( sal_Int32 nN=0; nN<aStringList.getLength();nN++ ) + { + xTextCursor->gotoEnd(false); + xText->insertString( xTextRange, aStringList[nN]->getString(), false ); + xTextCursor->gotoEnd(true); + aCursorList[nN] = xText->createTextCursorByRange( uno::Reference< text::XTextRange >(xTextCursor,uno::UNO_QUERY) ); + } + for( nN=0; nN<aStringList.getLength();nN++ ) + { + uno::Reference< beans::XPropertySet > xTargetProps( aCursorList[nN], uno::UNO_QUERY ); + uno::Reference< beans::XPropertySet > xSourceProps( aStringList[nN], uno::UNO_QUERY ); + PropertyMapper::setMappedProperties( xTargetProps, xSourceProps, PropertyMapper::getPropertyNameMapForCharacterProperties() ); + } + } + + double fRotationAngleDegree( 0.0 ); + try + { + xTitleProperties->getPropertyValue( C2U( "TextRotation" ) ) >>= fRotationAngleDegree; + // convert DEG to RAD + fRotationAngleDegree *= ( F_PI / 180.0 ); + } + catch( uno::Exception& e ) + { + e; + } + m_fRotationAngleDegree = fRotationAngleDegree; + m_nXPos = rPos.X; + m_nYPos = rPos.Y; + + //set position matrix + //the matrix needs to be set at the end behind autogrow and such position influencing properties + Matrix3D aM3; + aM3.Scale( 1, 1 ); + aM3.Rotate( m_fRotationAngleDegree ); + aM3.Translate( m_nXPos, m_nYPos ); + xShapeProp->setPropertyValue( C2U( "Transformation" ), uno::makeAny( Matrix3DToHomogenMatrix3(aM3) ) ); + } + catch( uno::Exception& e ) + { + e; + } +} + +//............................................................................. +} //namespace chart +//............................................................................. diff --git a/chart2/source/view/main/VTitle.hxx b/chart2/source/view/main/VTitle.hxx new file mode 100644 index 000000000..50af276af --- /dev/null +++ b/chart2/source/view/main/VTitle.hxx @@ -0,0 +1,121 @@ +/************************************************************************* + * + * $RCSfile: VTitle.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:34 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef _CHART2_VTITLE_HXX +#define _CHART2_VTITLE_HXX + +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XTITLE_HPP_ +#include <drafts/com/sun/star/chart2/XTitle.hpp> +#endif + +#ifndef _COM_SUN_STAR_DRAWING_XSHAPES_HPP_ +#include <com/sun/star/drawing/XShapes.hpp> +#endif +#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_ +#include <com/sun/star/lang/XMultiServiceFactory.hpp> +#endif + +//............................................................................. +namespace chart +{ +//............................................................................. + +//----------------------------------------------------------------------------- +/** +*/ + +class VTitle +{ +public: + VTitle( const ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XTitle > & xTitle ); + virtual ~VTitle(); + + void SAL_CALL init( const ::com::sun::star::uno::Reference< + ::com::sun::star::drawing::XShapes >& xTargetPage + , const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xFactory); + + //void setSceneMatrix( const ::com::sun::star::drawing::HomogenMatrix& rMatrix ); + + void createShapes( const ::com::sun::star::awt::Point& rPos ); + + ::com::sun::star::awt::Size getSize() const; + void changePosition( const ::com::sun::star::awt::Point& rPos ); + +private: + ::com::sun::star::uno::Reference< + ::com::sun::star::drawing::XShapes > m_xTarget; + ::com::sun::star::uno::Reference< + ::com::sun::star::lang::XMultiServiceFactory> m_xShapeFactory; + ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XTitle > m_xTitle; + ::com::sun::star::uno::Reference< + ::com::sun::star::drawing::XShape > m_xShape; + + double m_fRotationAngleDegree; + sal_Int32 m_nXPos; + sal_Int32 m_nYPos; +}; + +//............................................................................. +} //namespace chart +//............................................................................. +#endif + diff --git a/chart2/source/view/main/makefile.mk b/chart2/source/view/main/makefile.mk new file mode 100644 index 000000000..7e5024ac1 --- /dev/null +++ b/chart2/source/view/main/makefile.mk @@ -0,0 +1,95 @@ +#************************************************************************* +# +# $RCSfile: makefile.mk,v $ +# +# $Revision: 1.1.1.1 $ +# +# last change: $Author: bm $ $Date: 2003-10-06 09:58:34 $ +# +# The Contents of this file are made available subject to the terms of +# either of the following licenses +# +# - GNU Lesser General Public License Version 2.1 +# - Sun Industry Standards Source License Version 1.1 +# +# Sun Microsystems Inc., October, 2000 +# +# GNU Lesser General Public License Version 2.1 +# ============================================= +# Copyright 2000 by Sun Microsystems, Inc. +# 901 San Antonio Road, Palo Alto, CA 94303, USA +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License version 2.1, as published by the Free Software Foundation. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# +# +# Sun Industry Standards Source License Version 1.1 +# ================================================= +# The contents of this file are subject to the Sun Industry Standards +# Source License Version 1.1 (the "License"); You may not use this file +# except in compliance with the License. You may obtain a copy of the +# License at http://www.openoffice.org/license.html. +# +# Software provided under this License is provided on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, +# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, +# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. +# See the License for the specific provisions governing your rights and +# obligations concerning the Software. +# +# The Initial Developer of the Original Code is: Sun Microsystems, Inc. +# +# Copyright: 2000 by Sun Microsystems, Inc. +# +# All Rights Reserved. +# +# Contributor(s): _______________________________________ +# +# +# +#************************************************************************* + +PRJ= ..$/..$/.. +PRJINC= $(PRJ)$/source +PRJNAME= chart2 +TARGET= chview + +ENABLE_EXCEPTIONS= TRUE + +# --- Settings ----------------------------------------------------- + +.INCLUDE: settings.mk + +# --- export library ------------------------------------------------- + +#object files to build and link together to lib $(SLB)$/$(TARGET).lib +SLOFILES = \ + $(SLO)$/NumberFormatterWrapper.obj \ + $(SLO)$/ObjectIdentifier.obj \ + $(SLO)$/PropertyMapper.obj \ + $(SLO)$/Stripe.obj \ + $(SLO)$/DatapointGeometry.obj \ + $(SLO)$/ShapeAppearance.obj \ + $(SLO)$/ShapeFactory.obj \ + $(SLO)$/Linear3DTransformation.obj \ + $(SLO)$/PlottingPositionHelper.obj \ + $(SLO)$/PlotterBase.obj \ + $(SLO)$/VDataSeries.obj \ + $(SLO)$/VLegend.obj \ + $(SLO)$/VTitle.obj \ + $(SLO)$/ChartView.obj + +# --- Targets ----------------------------------------------------------------- + +.INCLUDE: target.mk diff --git a/chart2/source/view/makefile.mk b/chart2/source/view/makefile.mk new file mode 100644 index 000000000..89605b2a9 --- /dev/null +++ b/chart2/source/view/makefile.mk @@ -0,0 +1,147 @@ +#************************************************************************* +# +# $RCSfile: makefile.mk,v $ +# +# $Revision: 1.1.1.1 $ +# +# last change: $Author: bm $ $Date: 2003-10-06 09:58:32 $ +# +# The Contents of this file are made available subject to the terms of +# either of the following licenses +# +# - GNU Lesser General Public License Version 2.1 +# - Sun Industry Standards Source License Version 1.1 +# +# Sun Microsystems Inc., October, 2000 +# +# GNU Lesser General Public License Version 2.1 +# ============================================= +# Copyright 2000 by Sun Microsystems, Inc. +# 901 San Antonio Road, Palo Alto, CA 94303, USA +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License version 2.1, as published by the Free Software Foundation. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# +# +# Sun Industry Standards Source License Version 1.1 +# ================================================= +# The contents of this file are subject to the Sun Industry Standards +# Source License Version 1.1 (the "License"); You may not use this file +# except in compliance with the License. You may obtain a copy of the +# License at http://www.openoffice.org/license.html. +# +# Software provided under this License is provided on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, +# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, +# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. +# See the License for the specific provisions governing your rights and +# obligations concerning the Software. +# +# The Initial Developer of the Original Code is: Sun Microsystems, Inc. +# +# Copyright: 2000 by Sun Microsystems, Inc. +# +# All Rights Reserved. +# +# Contributor(s): _______________________________________ +# +# +# +#************************************************************************* + +PRJ= ..$/.. +PRJNAME= chart2 +TARGET= chartview + +USE_DEFFILE= TRUE +ENABLE_EXCEPTIONS= TRUE + +# --- Settings ----------------------------------------------------- + +.INCLUDE: $(PRJ)$/util$/makefile.pmk + +# --- export library ------------------------------------------------- + +#You can use several library macros of this form to build libraries that +#do not consist of all object files in a directory or to merge different libraries. +LIB1TARGET= $(SLB)$/$(TARGET).lib + +LIB1FILES= \ + $(SLB)$/chvaxes.lib \ + $(SLB)$/chvtypes.lib \ + $(SLB)$/chvdiagram.lib \ + $(SLB)$/chview.lib + +#-------- + +#Indicates the filename of the shared library. +SHL1TARGET= $(TARGET)$(UPD)$(DLLPOSTFIX) + +#indicates dependencies: +SHL1DEPN= +#Specifies an import library to create. For Win32 only. +SHL1IMPLIB= i$(TARGET) + +#Specifies libraries from the same module to put into the shared library. +#was created above +SHL1LIBS= $(LIB1TARGET) + +#Links import libraries. + +SHL1STDLIBS= $(CHARTTOOLS) \ + $(CPPULIB) \ + $(CPPUHELPERLIB) \ + $(COMPHELPERLIB) \ + $(GOODIESLIB) \ + $(SALLIB) \ + $(SVLIB) \ + $(SVLLIB) \ + $(SVTOOLLIB) \ + $(SVXLIB) \ + $(TKLIB) \ + $(TOOLSLIB) \ + $(VCLLIB) \ + $(SFXLIB) + +#--------exports + +#specifies the exported symbols for Windows only: +SHL1DEF= $(MISC)$/$(SHL1TARGET).def + +#Specifies the library name to parse for symbols. For Win32 only. +#DEFLIB1NAME= _$(TARGET) + +#A file of symbols to export. +DEF1EXPORTFILE= $(PRJ)$/source$/inc$/exports.dxp + +#--------definition file + +#name of the definition file: +DEF1NAME= $(SHL1TARGET) + +# indicates definition file dependencies +DEF1DEPN= $(MISC)$/$(SHL1TARGET).flt + +#A comment on the definition file. +DEF1DES= Viewable Component Chart View + +# --- Targets ----------------------------------------------------------------- + +.INCLUDE: target.mk + +# --- Filter ----------------------------------------------------------- + +$(MISC)$/$(SHL1TARGET).flt: makefile.mk \ + exports.flt + +$(TYPE) exports.flt > $@
\ No newline at end of file diff --git a/chart2/source/view/view.map b/chart2/source/view/view.map new file mode 100644 index 000000000..706bab0af --- /dev/null +++ b/chart2/source/view/view.map @@ -0,0 +1,10 @@ +CHART_1_0 { + global: + component_getImplementationEnvironment; + component_writeInfo; + component_getFactory; + component_getDescriptionFunc; + + local: + *; +}; diff --git a/chart2/util/makefile.mk b/chart2/util/makefile.mk new file mode 100644 index 000000000..6ed071c84 --- /dev/null +++ b/chart2/util/makefile.mk @@ -0,0 +1,92 @@ +#************************************************************************* +# +# $RCSfile: makefile.mk,v $ +# +# $Revision: 1.1.1.1 $ +# +# last change: $Author: bm $ $Date: 2003-10-06 09:58:34 $ +# +# The Contents of this file are made available subject to the terms of +# either of the following licenses +# +# - GNU Lesser General Public License Version 2.1 +# - Sun Industry Standards Source License Version 1.1 +# +# Sun Microsystems Inc., October, 2000 +# +# GNU Lesser General Public License Version 2.1 +# ============================================= +# Copyright 2000 by Sun Microsystems, Inc. +# 901 San Antonio Road, Palo Alto, CA 94303, USA +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License version 2.1, as published by the Free Software Foundation. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# +# +# Sun Industry Standards Source License Version 1.1 +# ================================================= +# The contents of this file are subject to the Sun Industry Standards +# Source License Version 1.1 (the "License"); You may not use this file +# except in compliance with the License. You may obtain a copy of the +# License at http://www.openoffice.org/license.html. +# +# Software provided under this License is provided on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, +# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, +# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. +# See the License for the specific provisions governing your rights and +# obligations concerning the Software. +# +# The Initial Developer of the Original Code is: Sun Microsystems, Inc. +# +# Copyright: 2000 by Sun Microsystems, Inc. +# +# All Rights Reserved. +# +# Contributor(s): _______________________________________ +# +# +#************************************************************************* + +PRJ=.. +PRJPCH= + +PRJNAME=chart2 +TARGET=chart_db + +# --- Settings ----------------------------------------------------- + +.INCLUDE : makefile.pmk + +#------------------------------------------------------------------- + +UNOIDLDBFILES= \ + $(UCR)$/csschart2.db \ + $(UCR)$/csslayout.db + +# --- Targets ------------------------------------------------------ + +ALL : \ + ALLTAR \ + $(BIN)$/$(PRJNAME).rdb \ + $(MISC)$/$(TARGET).don + +$(BIN)$/$(PRJNAME).rdb : $(UCR)$/$(PRJNAME).db + +$(GNUCOPY) -f $(UCR)$/$(PRJNAME).db $@ + +$(MISC)$/$(TARGET).don : $(UCR)$/$(PRJNAME).db + +$(CPPUMAKER) -O$(OUT)$/inc -BUCR $(UCR)$/$(PRJNAME).db -X$(SOLARBINDIR)$/types.rdb && echo > $@ + echo $@ + +.INCLUDE : target.mk diff --git a/chart2/util/makefile.pmk b/chart2/util/makefile.pmk new file mode 100644 index 000000000..543950e7b --- /dev/null +++ b/chart2/util/makefile.pmk @@ -0,0 +1,102 @@ +# -*- makefile -*- +#************************************************************************* +# +# $RCSfile: makefile.pmk,v $ +# +# $Revision: 1.1.1.1 $ +# +# last change: $Author: bm $ $Date: 2003-10-06 09:58:34 $ +# +# The Contents of this file are made available subject to the terms of +# either of the following licenses +# +# - GNU Lesser General Public License Version 2.1 +# - Sun Industry Standards Source License Version 1.1 +# +# Sun Microsystems Inc., October, 2000 +# +# GNU Lesser General Public License Version 2.1 +# ============================================= +# Copyright 2000 by Sun Microsystems, Inc. +# 901 San Antonio Road, Palo Alto, CA 94303, USA +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License version 2.1, as published by the Free Software Foundation. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# +# +# Sun Industry Standards Source License Version 1.1 +# ================================================= +# The contents of this file are subject to the Sun Industry Standards +# Source License Version 1.1 (the "License"); You may not use this file +# except in compliance with the License. You may obtain a copy of the +# License at http://www.openoffice.org/license.html. +# +# Software provided under this License is provided on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, +# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, +# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. +# See the License for the specific provisions governing your rights and +# obligations concerning the Software. +# +# The Initial Developer of the Original Code is: Sun Microsystems, Inc. +# +# Copyright: 2000 by Sun Microsystems, Inc. +# +# All Rights Reserved. +# +# Contributor(s): _______________________________________ +# +# +# +#************************************************************************* + +PRJPCH= +ENABLE_EXCEPTIONS=TRUE + +JAVAPREPRO= +.IF "$(JDK_VERSION)" == "110" +JAVAPREPRO=-jdk11 +.ENDIF +.IF "$(PRODUCT)" != "" +JAVAPREPRO=$(JAVAPREPRO) + " -product" +.ENDIF + +# --- Settings ----------------------------------------------------- +.INCLUDE : settings.mk +.INCLUDE : sv.mk + +NOUNODOC= +BUILD_URD_ONLY=TRUE +LOCALIDLFILES=TRUE + +URDDOC=TRUE + +.IF "$(OS)"=="SOLARIS" +.IF "$(CPU)"=="I" +UNOIDL=unoidl +.ENDIF +.ENDIF + +# define macro for (chart-specific) tools library +.IF "$(COM)" == "MSC" + CHARTTOOLS= charttools.lib +.ELSE + CHARTTOOLS= -lcharttools$(UPD)$(DLLSUFFIX) +.ENDIF + +.IF "$(COM)" == "MSC" + CHARTVIEW= chartview.lib +.ELSE + CHARTVIEW= -lchartview$(UPD)$(DLLSUFFIX) +.ENDIF diff --git a/chart2/util/target.pmk b/chart2/util/target.pmk new file mode 100644 index 000000000..8d2230d05 --- /dev/null +++ b/chart2/util/target.pmk @@ -0,0 +1,67 @@ +# -*- makefile -*- +#************************************************************************* +# +# $RCSfile: target.pmk,v $ +# +# $Revision: 1.1.1.1 $ +# +# last change: $Author: bm $ $Date: 2003-10-06 09:58:34 $ +# +# The Contents of this file are made available subject to the terms of +# either of the following licenses +# +# - GNU Lesser General Public License Version 2.1 +# - Sun Industry Standards Source License Version 1.1 +# +# Sun Microsystems Inc., October, 2000 +# +# GNU Lesser General Public License Version 2.1 +# ============================================= +# Copyright 2000 by Sun Microsystems, Inc. +# 901 San Antonio Road, Palo Alto, CA 94303, USA +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License version 2.1, as published by the Free Software Foundation. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# +# +# Sun Industry Standards Source License Version 1.1 +# ================================================= +# The contents of this file are subject to the Sun Industry Standards +# Source License Version 1.1 (the "License"); You may not use this file +# except in compliance with the License. You may obtain a copy of the +# License at http://www.openoffice.org/license.html. +# +# Software provided under this License is provided on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, +# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, +# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. +# See the License for the specific provisions governing your rights and +# obligations concerning the Software. +# +# The Initial Developer of the Original Code is: Sun Microsystems, Inc. +# +# Copyright: 2000 by Sun Microsystems, Inc. +# +# All Rights Reserved. +# +# Contributor(s): _______________________________________ +# +# +# +#************************************************************************* +$(OUT)$/misc$/$(TARGET).idls: makefile.mk + +-$(RM) $@ + +$(TYPE) $(mktmp $(foreach,i,$(IDLFILES) $(PACKAGE)$/$i)) >>$@ + +ALLTAR: $(OUT)$/misc$/$(TARGET).idls diff --git a/chart2/workbench/anyperformance/anyperformance.cxx b/chart2/workbench/anyperformance/anyperformance.cxx new file mode 100644 index 000000000..02cde3895 --- /dev/null +++ b/chart2/workbench/anyperformance/anyperformance.cxx @@ -0,0 +1,221 @@ +/************************************************************************* + * + * $RCSfile: anyperformance.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:34 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2002 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +#include <cstdlib> +#include <vector> +#include <string> +#include <sstream> +#include <algorithm> +#include <iostream> +#include <iterator> + +#include <com/sun/star/uno/Type.hxx> +#include <com/sun/star/uno/Any.hxx> +#include <com/sun/star/uno/Sequence.hxx> + +using namespace ::std; +using namespace ::com::sun::star; + +#define DBG_OUTPUT + +typedef double testType; +// typedef sal_Int32 testType; + +struct lcl_Data +{ + int m_nSeries; + int m_nPoints; + enum Type + { + TYPE_DOUBLE, + TYPE_ANY + } m_eType; + + lcl_Data() : + m_nSeries( 10 ), + m_nPoints( 10000 ), + m_eType( TYPE_DOUBLE ) + {} + + lcl_Data( int nSeries, int nPoints, Type eType ) : + m_nSeries( nSeries ), + m_nPoints( nPoints ), + m_eType( eType ) + {} +}; + +lcl_Data lcl_parseArgs( const vector< string > & aArgs ) +{ + lcl_Data aResult; + + if( aArgs.size() > 1 ) + { + aResult.m_eType = ( aArgs[ 1 ] == string( "any" )) + ? lcl_Data::TYPE_ANY + : lcl_Data::TYPE_DOUBLE; + } + else + { + cerr << "Usage: " << aArgs[ 0 ] << " double|any [series] [points-per-series]" << endl; + exit( EXIT_FAILURE ); + } + + if( aArgs.size() > 2 ) + { + stringstream aStrStream; + aStrStream << aArgs[ 2 ]; + aStrStream >> aResult.m_nSeries; + } + if( aArgs.size() > 3 ) + { + stringstream aStrStream; + aStrStream << aArgs[ 3 ]; + aStrStream >> aResult.m_nPoints; + } + + return aResult; +} + +template< typename T > + struct lcl_MakeAny : public unary_function< uno::Any, T > + { + uno::Any operator() ( const T & rVal ) + { + return uno::makeAny( rVal ); + } + }; + +// ======================================== +// MAIN +// ======================================== + +int SAL_CALL main( int argc, char* argv[] ) +{ + // parse arguments + // arg0: number of series + // arg1: number of points per series + vector< string > aArgs( argc ); + copy( argv, argv + argc, aArgs.begin() ); + + lcl_Data aParams( lcl_parseArgs( aArgs )); + + // create data + vector< testType > aSeries( aParams.m_nPoints, 23 ); + vector< vector< testType > > aData( aParams.m_nSeries, aSeries ); + + switch( aParams.m_eType ) + { + case lcl_Data::TYPE_DOUBLE: +#ifdef DBG_OUTPUT + cout << "Testing native type: " << endl; +#endif + { + uno::Sequence< uno::Sequence< testType > > aSeq; + aSeq.realloc( aParams.m_nSeries ); + uno::Sequence< testType > * pArr = aSeq.getArray(); + + for( vector< vector< testType > >::const_iterator aIter = aData.begin(); + aIter != aData.end(); + ++aIter, ++pArr ) + { + pArr->realloc( aParams.m_nPoints ); + copy( (*aIter).begin(), (*aIter).end(), + pArr->getArray() ); + } + } + break; + case lcl_Data::TYPE_ANY: +#ifdef DBG_OUTPUT + cout << "Testing Anies" << endl; +#endif + { + uno::Sequence< uno::Sequence< uno::Any > > aSeq; + aSeq.realloc( aParams.m_nSeries ); + uno::Sequence< uno::Any > * pArr = aSeq.getArray(); + + for( vector< vector< testType > >::const_iterator aIter = aData.begin(); + aIter != aData.end(); + ++aIter, ++pArr ) + { + pArr->realloc( aParams.m_nPoints ); + transform( (*aIter).begin(), (*aIter).end(), + pArr->getArray(), lcl_MakeAny< testType >() ); + } + } + break; + } + + +#if 0 + // output data + for( vector< vector< testType > >::const_iterator aIter = aData.begin(); + aIter != aData.end(); + ++aIter) + { + cout << "Series: * "; + copy( (*aIter).begin(), (*aIter).end(), + ostream_iterator< testType >( cout, " * " )); + cout << endl; + } +#endif + + return EXIT_SUCCESS; +} diff --git a/chart2/workbench/anyperformance/makefile.mk b/chart2/workbench/anyperformance/makefile.mk new file mode 100644 index 000000000..3fa2dd660 --- /dev/null +++ b/chart2/workbench/anyperformance/makefile.mk @@ -0,0 +1,173 @@ +#************************************************************************* +# +# $RCSfile: makefile.mk,v $ +# +# $Revision: 1.1.1.1 $ +# +# last change: $Author: bm $ $Date: 2003-10-06 09:58:34 $ +# +# The Contents of this file are made available subject to the terms of +# either of the following licenses +# +# - GNU Lesser General Public License Version 2.1 +# - Sun Industry Standards Source License Version 1.1 +# +# Sun Microsystems Inc., October, 2000 +# +# GNU Lesser General Public License Version 2.1 +# ============================================= +# Copyright 2000 by Sun Microsystems, Inc. +# 901 San Antonio Road, Palo Alto, CA 94303, USA +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License version 2.1, as published by the Free Software Foundation. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# +# +# Sun Industry Standards Source License Version 1.1 +# ================================================= +# The contents of this file are subject to the Sun Industry Standards +# Source License Version 1.1 (the "License"); You may not use this file +# except in compliance with the License. You may obtain a copy of the +# License at http://www.openoffice.org/license.html. +# +# Software provided under this License is provided on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, +# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, +# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. +# See the License for the specific provisions governing your rights and +# obligations concerning the Software. +# +# The Initial Developer of the Original Code is: Sun Microsystems, Inc. +# +# Copyright: 2000 by Sun Microsystems, Inc. +# +# All Rights Reserved. +# +# Contributor(s): _______________________________________ +# +# +# +#************************************************************************* +PRJ=.. + +PRJNAME=anyperformance +TARGET= anyperformance +LIBTARGET=NO +ENABLE_EXCEPTIONS=TRUE + +# --- Settings ----------------------------------------------------- + +.INCLUDE : svpre.mk +.INCLUDE : settings.mk +.INCLUDE : sv.mk + +# --- Files -------------------------------------------------------- + +UNOUCRDEP=$(SOLARBINDIR)$/udkapi.rdb +UNOUCRRDB=$(SOLARBINDIR)$/udkapi.rdb +UNOUCROUT=$(OUT)$/inc$/test +INCPRE+=$(OUT)$/inc$/test + +OBJFILES= \ + $(OBJ)$/anyperformance.obj + +APP1TARGET= anyperformance +APP1OBJS= \ + $(OBJ)$/anyperformance.obj + +APP1STDLIBS+= \ + $(CPPULIB) \ + $(CPPUHELPERLIB) \ + $(SALHELPERLIB) \ + $(SALLIB) + +APP1DEF=$(MISC)$/$(APP1TARGET).def + +#ALLIDLFILES:= \ +# cpputest.idl \ +# language_binding.idl \ +# alignment.idl + +# --- Targets ------------------------------------------------------ + +.IF "$(depend)" == "" +#ALL : $(BIN)$/anyperformance.rdb unoheader ALLTAR +ALL : ALLTAR +.ELSE +ALL: ALLDEP +.ENDIF + +.IF "$(COM)" == "MSC" +.IF "$(debug)" != "" +CFLAGS += /Ob0 +.ENDIF +.ENDIF + +.IF "$(extra_mapping)" != "" +CFLAGS += -DEXTRA_MAPPING +.ENDIF + +.INCLUDE : target.mk + +CPPUMAKERFLAGS = -C +.IF "$(COM)" == "MSC" +CPPUMAKERFLAGS = -L +.ENDIF + +#TYPES:= -Ttest.XLanguageBindingTest \ +# -Ttest.XSimpleInterface \ +# -Ttest.Test1 \ +# -Ttest.Test2 \ +# -Ttest.TdTest1 \ +# -Ttest.Test3 \ +# -Ttest.Base \ +# -Ttest.Base1 \ +# -Ttest.Base2 \ +# -Tcom.sun.star.lang.XMultiServiceFactory \ +# -Tcom.sun.star.lang.XSingleServiceFactory \ +# -Tcom.sun.star.lang.XInitialization \ +# -Tcom.sun.star.lang.XServiceInfo \ +# -Tcom.sun.star.lang.XEventListener \ +# -Tcom.sun.star.lang.XTypeProvider \ +# -Tcom.sun.star.registry.XSimpleRegistry \ +# -Tcom.sun.star.registry.XRegistryKey \ +# -Tcom.sun.star.loader.XImplementationLoader \ +# -Tcom.sun.star.registry.XImplementationRegistration \ +# -Tcom.sun.star.lang.XComponent \ +# -Tcom.sun.star.uno.XComponentContext \ +# -Tcom.sun.star.container.XSet \ +# -Tcom.sun.star.container.XNameContainer \ +# -Tcom.sun.star.uno.TypeClass \ +# -Tcom.sun.star.uno.XReference \ +# -Tcom.sun.star.uno.XAdapter \ +# -Tcom.sun.star.uno.XAggregation \ +# -Tcom.sun.star.uno.XWeak \ +# -Tcom.sun.star.beans.XPropertySet \ +# -Tcom.sun.star.reflection.XIdlClassProvider \ +# -Tcom.sun.star.container.XHierarchicalNameAccess \ +# -Tcom.sun.star.uno.XCurrentContext + +$(BIN)$/anyperformance.rdb: $(ALLIDLFILES) + +idlc -I$(PRJ) -I$(SOLARIDLDIR) -O$(BIN) $? + +regmerge $@ /UCR $(BIN)$/{$(?:f:s/.idl/.urd/)} + +regmerge $@ / $(UNOUCRRDB) + touch $@ + +# +regcomp -register -r $@ -c javaloader.dll +# +regcomp -register -r $@ -c jen.dll + +unoheader: $(BIN)$/anyperformance.rdb + +cppumaker $(CPPUMAKERFLAGS) -BUCR -O$(UNOUCROUT) $(TYPES) $(BIN)$/anyperformance.rdb +# +cunomaker -BUCR -O$(UNOUCROUT) $(TYPES) $(BIN)$/anyperformance.rdb + diff --git a/chart2/workbench/fileformat/chart.mod b/chart2/workbench/fileformat/chart.mod new file mode 100644 index 000000000..2190d95c6 --- /dev/null +++ b/chart2/workbench/fileformat/chart.mod @@ -0,0 +1,261 @@ +<!-- + $Id: chart.mod,v 1.1.1.1 2003-10-06 09:58:34 bm Exp $ + + The Contents of this file are made available subject to the terms of + either of the following licenses + + - GNU Lesser General Public License Version 2.1 + - Sun Industry Standards Source License Version 1.1 + + Sun Microsystems Inc., October, 2000 + + GNU Lesser General Public License Version 2.1 + ============================================= + Copyright 2000 by Sun Microsystems, Inc. + 901 San Antonio Road, Palo Alto, CA 94303, USA + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License version 2.1, as published by the Free Software Foundation. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, + MA 02111-1307 USA + + + Sun Industry Standards Source License Version 1.1 + ================================================= + The contents of this file are subject to the Sun Industry Standards + Source License Version 1.1 (the "License"); You may not use this file + except in compliance with the License. You may obtain a copy of the + License at http://www.openoffice.org/license.html. + + Software provided under this License is provided on an "AS IS" basis, + WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, + WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + See the License for the specific provisions governing your rights and + obligations concerning the Software. + + The Initial Developer of the Original Code is: Sun Microsystems, Inc. + + Copyright: 2000 by Sun Microsystems, Inc. + + All Rights Reserved. + + Contributor(s): _______________________________________ + +--> + + +<!ENTITY % chart-class "(line|area|circle|ring|scatter|radar|bar|stock|add-in)"> +<!-- xxxx ::: maybe expand this for K-Office: +gantt and +surface ? for excel --> +<!ENTITY % chart-solid-type "(cuboid|cylinder|cone|pyramid)"> + +<!-- Chart element --> +<!ELEMENT chart:chart ( chart:title?, chart:subtitle?, chart:legend?, + chart:plot-area, + table:table? )> +<!ATTLIST chart:chart + chart:class %chart-class; #REQUIRED + chart:add-in-name %string; #IMPLIED + chart:table-number-list %string; #IMPLIED + draw:name %string; #IMPLIED + %draw-position; + %draw-size; + %draw-style-name; + chart:column-mapping %string; #IMPLIED + chart:row-mapping %string; #IMPLIED + chart:style-name %styleName; #IMPLIED> + +<!ATTLIST chart:chart %presentation-class; > +<!ATTLIST chart:chart %zindex;> +<!ATTLIST chart:chart %draw-end-position; > +<!ATTLIST chart:chart draw:id %draw-shape-id; > +<!ATTLIST chart:chart draw:layer %layerName; #IMPLIED> + +<!ATTLIST style:properties + chart:scale-text %boolean; "true" + chart:stock-updown-bars %boolean; "false" + chart:stock-with-volume %boolean; "false" + chart:three-dimensional %boolean; "false" + chart:deep %boolean; "false" + chart:lines %boolean; "false" + chart:percentage %boolean; "false" + chart:solid-type %chart-solid-type; "cuboid" + chart:splines %nonNegativeInteger; "0" + chart:stacked %boolean; "false" + chart:symbol %integer; "-1" + chart:vertical %boolean; "false" + chart:lines-used %nonNegativeInteger; "0" + chart:connect-bars %boolean; "false" + chart:spline-order %nonNegativeInteger; "2" + chart:spline-resolution %nonNegativeInteger; "20" + chart:pie-offset %nonNegativeInteger; "0"> + +<!-- Main/Sub Title --> +<!-- the cell-address attribute is currently not supported for titles --> +<!ELEMENT chart:title (text:p)?> +<!ATTLIST chart:title + table:cell-range %cell-address; #IMPLIED + svg:x %coordinate; #IMPLIED + svg:y %coordinate; #IMPLIED + chart:style-name %styleName; #IMPLIED > + +<!ELEMENT chart:subtitle (text:p)?> +<!ATTLIST chart:subtitle + table:cell-range %cell-address; #IMPLIED + svg:x %coordinate; #IMPLIED + svg:y %coordinate; #IMPLIED + chart:style-name %styleName; #IMPLIED > + +<!-- you must specify either a legend-position or both, x and y coordinates --> +<!ELEMENT chart:legend EMPTY> +<!ATTLIST chart:legend + chart:legend-position (top|left|bottom|right) "right" +<!-- xxxx ::: add this for K-Office --> + chart:legend-alignment (center|left-or-top|right-or-bottom) + svg:x %coordinate; #IMPLIED + svg:y %coordinate; #IMPLIED + chart:style-name %styleName; #IMPLIED > +<!-- Plot-Area specification --> +<!ELEMENT chart:plot-area (dr3d:light*, + chart:axis*, +<!-- xxxx ::: for K-Office move categories to axis--> + chart:categories?, + chart:series*, + chart:stock-gain-marker?, + chart:stock-loss-marker?, + chart:stock-range-line?, + chart:wall?, + chart:floor?) > +<!ATTLIST chart:plot-area + svg:x %coordinate; #IMPLIED + svg:y %coordinate; #IMPLIED + svg:width %length; #IMPLIED + svg:height %length; #IMPLIED + chart:style-name %styleName; #IMPLIED + table:cell-range-address %cell-range-address; #IMPLIED + chart:table-number-list %string; #IMPLIED + chart:data-source-has-labels (none|row|column|both) "none" > +<!-- 3d scene attributes on plot-area --> +<!ATTLIST chart:plot-area + dr3d:vrp %vector3D; #IMPLIED + dr3d:vpn %vector3D; #IMPLIED + dr3d:vup %vector3D; #IMPLIED + dr3d:projection (parallel|perspective) #IMPLIED + dr3d:transform CDATA #IMPLIED + dr3d:distance %length; #IMPLIED + dr3d:focal-length %length; #IMPLIED + dr3d:shadow-slant %nonNegativeInteger; #IMPLIED + dr3d:shade-mode (flat|phong|gouraud|draft) #IMPLIED + dr3d:ambient-color %color; #IMPLIED + dr3d:lighting-mode %boolean; #IMPLIED > +<!ATTLIST style:properties + chart:series-source (columns|rows) "columns" > +<!ELEMENT chart:wall EMPTY> +<!ATTLIST chart:wall + svg:width %length; #IMPLIED + chart:style-name %styleName; #IMPLIED > +<!ELEMENT chart:floor EMPTY> +<!ATTLIST chart:floor + svg:width %length; #IMPLIED + chart:style-name %styleName; #IMPLIED > +<!-- Stock chart elements --> +<!ELEMENT chart:stock-gain-marker EMPTY> +<!ATTLIST chart:stock-gain-marker + chart:style-name %styleName; #IMPLIED > +<!ELEMENT chart:stock-loss-marker EMPTY> +<!ATTLIST chart:stock-loss-marker + chart:style-name %styleName; #IMPLIED > +<!ELEMENT chart:stock-range-line EMPTY> +<!ATTLIST chart:stock-range-line + chart:style-name %styleName; #IMPLIED > +<!-- Axis --> +<!ELEMENT chart:axis (chart:title?, chart:grid*)> +<!ATTLIST chart:axis + chart:class (category|value|series|domain) #REQUIRED + chart:name %string; #IMPLIED + chart:style-name %styleName; #IMPLIED > +<!ATTLIST style:properties + chart:tick-marks-major-inner %boolean; "false" + chart:tick-marks-major-outer %boolean; "true" + chart:tick-marks-minor-inner %boolean; "false" + chart:tick-marks-minor-outer %boolean; "false" + chart:logarithmic %boolean; "false" + chart:maximum %float; #IMPLIED + chart:minimum %float; #IMPLIED + chart:origin %float; #IMPLIED + chart:interval-major %float; #IMPLIED + chart:interval-minor %float; #IMPLIED + chart:gap-width %integer; #IMPLIED + chart:overlap %integer; #IMPLIED + text:line-break %boolean; "true" + chart:display-label %boolean; "true" + chart:label-arrangement (side-by-side|stagger-even|stagger-odd) "side-by-side" + chart:text-overlap %boolean; "false" + chart:visible %boolean; "true" + chart:link-data-style-to-source %boolean; "true" > +<!ELEMENT chart:grid EMPTY> +<!ATTLIST chart:grid + chart:class (major|minor) "major" + chart:style-name %styleName; #IMPLIED > +<!ELEMENT chart:categories EMPTY> +<!ATTLIST chart:categories + table:cell-range-address %cell-range-address; #IMPLIED > +<!-- + each series element must have an cell-range-address element that points + to the underlying table data. + Impl. Note: Internally all href elements are merged to one table range + that represents the data for the whole chart +--> +<!ELEMENT chart:series ( chart:domain*, + chart:data-point* )> +<!ATTLIST chart:series + chart:values-cell-range-address %cell-range-address; #IMPLIED + chart:label-cell-address %cell-address; #IMPLIED + chart:class %chart-class; #IMPLIED + chart:attached-axis %string; #IMPLIED +<!-- xxxx ::: replace? this for K-Office --> + chart:attached-axis-x %string; #IMPLIED + chart:attached-axis-y %string; #IMPLIED + chart:attached-axis-z %string; #IMPLIED + chart:style-name %styleName; #IMPLIED > +<!ELEMENT chart:domain EMPTY> +<!ATTLIST chart:domain + table:cell-range-address %cell-range-address; #IMPLIED > +<!ELEMENT chart:data-point EMPTY> +<!ATTLIST chart:data-point + chart:repeated %nonNegativeInteger; #IMPLIED + chart:style-name %styleName; #IMPLIED > +<!-- statistical properties --> +<!ATTLIST style:properties + chart:mean-value %boolean; #IMPLIED + chart:error-category (none|variance|standard-deviation|percentage|error-margin|constant) "none" + chart:error-percentage %float; #IMPLIED + chart:error-margin %float; #IMPLIED + chart:error-lower-limit %float; #IMPLIED + chart:error-upper-limit %float; #IMPLIED + chart:error-upper-indicator %boolean; #IMPLIED + chart:error-lower-indicator %boolean; #IMPLIED + chart:regression-type (none|linear|logarithmic|exponential|power) "none" > +<!-- data label properties --> +<!ATTLIST style:properties + chart:data-label-number (none|value|percentage) "none" + chart:data-label-text %boolean; "false" + chart:data-label-symbol %boolean; "false" > +<!-- general text properties --> +<!ATTLIST style:properties + text:rotation-angle %integer; "0" + fo:direction (ltr|ttb) #IMPLIED > +<!-- symbol properties --> +<!ATTLIST style:properties + chart:symbol-width %nonNegativeLength; #IMPLIED + chart:symbol-height %nonNegativeLength; #IMPLIED + chart:symbol-image-name %string; #IMPLIED >
\ No newline at end of file diff --git a/chart2/workbench/fileformat/chart2.mod b/chart2/workbench/fileformat/chart2.mod new file mode 100644 index 000000000..33cf50b6e --- /dev/null +++ b/chart2/workbench/fileformat/chart2.mod @@ -0,0 +1,187 @@ +<!-- ************************************************************************************************************************ --> +<!-- a name of a registered UNO service--> +<!ENTITY % service-name "CDATA"> +<!-- chart2 *************************************************************************************************************** --> +<!ELEMENT chart2:chart2 (chart2:legend*, chart2:scale*, chart2:increment*, chart2:final-target+, chart2:resident*, table:table?)> +<!-- title ******************************************************************************************************************* --> +<!ELEMENT chart2:title EMPTY> +<!-- create your own name here to identifiy this title object for use in a ... ?--> +<!ATTLIST chart2:title + id ID #REQUIRED +> +<!-- legend *************************************************************************************************************** --> +<!ELEMENT chart2:legend EMPTY> +<!-- create your own name here to identifiy this legend object for use in a plot-container or coordinate-system--> +<!ATTLIST chart2:legend + id ID #REQUIRED +> +<!-- contains a name of a registered uno component implementing the service ...'legend' ... --> +<!ATTLIST chart2:legend + service %service-name; #REQUIRED +> +<!-- final-target *********************************************************************************************************** --> +<!ELEMENT chart2:final-target (chart2:title?, chart2:logic-target)> +<!-- create your own name here to identifiy this final-target object --> +<!ATTLIST chart2:final-target + id ID #REQUIRED +> +<!-- choose the id of a legend that should be used as default legend for all data series contained in this final target; + the legend has to be described somewhere else in this document --> +<!ATTLIST chart2:final-target + legend IDREF #IMPLIED +> +<!-- logic-target ********************************************************************************************************** --> +<!ELEMENT chart2:logic-target (chart2:coordinate-system+, chart2:logic-target*)> +<!-- create your own name here to identifiy this logic-target object --> +<!ATTLIST chart2:logic-target + id ID #REQUIRED +> +<!-- choose the id of a legend that should be used as default legend for all data series contained in this logic target; + the legend has to be described somewhere else in this document --> +<!ATTLIST chart2:logic-target + legend IDREF #IMPLIED +> +<!-- coordinatesystem ************************************************************************************************** --> +<!ELEMENT chart2:coordinate-system (chart2:scaleRef*)> +<!-- create your own name here to identifiy this coordinatesystem object for use in a renderer--> +<!ATTLIST chart2:coordinate-system + id ID #REQUIRED +> +<!-- contains a name of a registered uno component implementing the service ...'coordinate-system' ... --> +<!ATTLIST chart2:coordinate-system + service %service-name; #REQUIRED +> +<!-- choose the id of a legend that should be used for this coordinate system; + the legend has to be described somewhere else in this document --> +<!ATTLIST chart2:coordinate-system + legend IDREF #IMPLIED +> +<!-- scale ***************************************************************************************************************** --> +<!ELEMENT chart2:scale (chart2:break*)> +<!-- create your own name here to identifiy this scale object for use in a coordinate system--> +<!ATTLIST chart2:scale + id ID #REQUIRED +> +<!-- if the maximum value of the scale should be calculated automatically do not set this attribute--> +<!ATTLIST chart2:scale + maximum %float; #IMPLIED +> +<!-- if the minimum value of the scale should be calculated automatically do not set this attribute--> +<!ATTLIST chart2:scale + minimum %float; #IMPLIED +> +<!-- choose a name of a registered uno component implementing the service ...scaling' ... e.g. drafts.com.sun.star.LogarithmicScaling; + if no scaling-service is set a linear scaling will be used--> +<!ATTLIST chart2:scale + scaling-service %service-name; #IMPLIED +> +<!-- scaleRef ************************************************************************************************************* --> +<!ELEMENT chart2:scaleRef EMPTY> +<!-- choose the id of a scale that should be used here --> +<!ATTLIST chart2:scaleRef + scale IDREF #REQUIRED +> +<!-- choose the direction in which the scale should be applied; + if no direction is set the mathematical direction is used --> +<!-- !!!!!!!!!! .... maybe remove languagedependent here --> +<!ATTLIST chart2:scaleRef + direction (mathematical | reverse | languagedependent) #IMPLIED +> +<!-- break ***************************************************************************************************************** --> +<!ELEMENT chart2:break EMPTY> +<!-- the value where the break starts and ends on the scale --> +<!ATTLIST chart2:break + start %float; #REQUIRED + end %float; #REQUIRED +> +<!-- increment ************************************************************************************************************ --> +<!ELEMENT chart2:increment (chart2:subincrement*)> +<!-- create your own name here to identifiy this increment object for use in an axis and/or grid --> +<!ATTLIST chart2:increment + id ID #REQUIRED +> +<!-- choose the id of a scale that should be used for autocalculation of the values of this increment; + the scale has to be described somewhere else in this document --> +<!ATTLIST chart2:increment + scale IDREF #REQUIRED +> +<!-- an offset (measured in values before scaling) to which ticks are relatively positioned; + if this attribute is not set 0 is assumed; + if the given value is not valid in the associated scaling(s) the minimum of the scaling(s) is assumed )--> +<!ATTLIST chart2:increment + pre-offset %float; #IMPLIED +> +<!-- a distance (measured in values before scaling) how far ticks are seperated one from each other; + this value is ignored as long as the attribute post-equidistant is true; + if attribute post-equidistant is false and this value is missing it will be automatically calculated --> +<!ATTLIST chart2:increment + pre-distance %float; #IMPLIED +> +<!-- a distance (measured in values after scaling) how far ticks are seperated one from each other + this value is ignored as long as the attribute post-equidistant is false; + if attribute post-equidistant is true and this value is missing it will be automatically calculated --> +<!ATTLIST chart2:increment + post-distance %float; #IMPLIED +> +<!-- if the post-equidistant attribute is missing or set to false tickmarks will be positioned equidistant measured in values before scaling otherwise equidistant after scaling; + for example lets assume to have a logarithmic scaling - then with post-equidistant=true and post-distance=1 you will get tichmarks at 0, 1, 10, 100 etc. + having post-equidistant=false and pre-distance=1 you will have tickmarks at 0,1,2,3,4 etc.--> +<!ATTLIST chart2:increment + post-equidistant %boolean; #IMPLIED +> +<!-- subincrement ************************************************************************************************************ --> +<!ELEMENT chart2:subincrement EMPTY> +<!-- any parent range will be divided into this count of sub-ranges; values lower than 2 have no effect; + if no value is set the count will be calculated automatically --> +<!ATTLIST chart2:subincrement + count %integer; #IMPLIED +> +<!-- if the post-equidistant attribute is missing or set to false the sub-ranges will be equal to each other measured in values before scaling otherwise measured after scaling --> +<!ATTLIST chart2:subincrement + post-equidistant %boolean; #IMPLIED +> +<!-- resident ************************************************************************************************************** --> +<!ELEMENT chart2:resident ANY> +<!-- contained child elements could be for example (chart2:axis|chart2:grid|chart2:renderer) --> +<!-- create your own name to identifiy this resident object --> +<!ATTLIST chart2:resident + id ID #REQUIRED +> +<!-- contains a name of a registered UNO component supporting the service ... or interface?...'resident' ...; +if a child element is contained there are additional requirements to the UNO component: +axis: the service ... 'axis' needs to be supported +grid: the service ... 'grid' needs to be supported +renderer: the service ... 'datarenderer' needs to be supported +--> +<!ATTLIST chart2:resident + service %service-name; #REQUIRED +> +<!-- choose the id of a coordinatesystem that should be used; + that coordinatesystem has to be described somewhere else in this document --> +<!ATTLIST chart2:resident + coordinate-system IDREF #REQUIRED +> +<!-- axis ******************************************************************************************************************* --> +<!ELEMENT chart2:axis EMPTY> +<!-- state which dimension of the coordinate system the axis should use (e.g. for cartesian coordinates x is dimension 1 and y is dimansion 2)--> +<!ATTLIST chart2:axis + dimension %integer; #REQUIRED +> +<!-- choose the id of an increment that should be used; + that increment has to be described somewhere else in this document --> +<!ATTLIST chart2:axis + increment IDREF #REQUIRED +> +<!-- grid ******************************************************************************************************************* --> +<!ELEMENT chart2:grid EMPTY> +<!-- state which dimension of the coordinate system the axis should use (e.g. for cartesian coordinates x is dimension 1 and y is dimansion 2)--> +<!ATTLIST chart2:grid + dimension %integer; #REQUIRED +> +<!-- choose the id of an increment that should be used; + that increment has to be described somewhere else in this document --> +<!ATTLIST chart2:grid + increment IDREF #REQUIRED +> +<!-- renderer ************************************************************************************************************* --> +<!ELEMENT chart2:renderer EMPTY>
\ No newline at end of file diff --git a/chart2/workbench/fileformat/content.xml b/chart2/workbench/fileformat/content.xml new file mode 100644 index 000000000..b476d182b --- /dev/null +++ b/chart2/workbench/fileformat/content.xml @@ -0,0 +1,97 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE office:document-content PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "office.dtd"><office:document-content xmlns:office="http://openoffice.org/2000/office" xmlns:style="http://openoffice.org/2000/style" xmlns:text="http://openoffice.org/2000/text" xmlns:table="http://openoffice.org/2000/table" xmlns:draw="http://openoffice.org/2000/drawing" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:number="http://openoffice.org/2000/datastyle" xmlns:svg="http://www.w3.org/2000/svg" xmlns:chart="http://openoffice.org/2000/chart" xmlns:dr3d="http://openoffice.org/2000/dr3d" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="http://openoffice.org/2000/form" xmlns:script="http://openoffice.org/2000/script" office:class="chart" office:version="1.0"> + +<office:automatic-styles> + <number:number-style style:name="N0" style:family="data-style"> + <number:number number:min-integer-digits="1"/> + </number:number-style> + <style:style style:name="ch1" style:family="chart"> + <style:properties draw:stroke="none" draw:fill-color="#ffffff"/> + </style:style> + <style:style style:name="ch2" style:family="chart"> + <style:properties fo:direction="ltr" draw:stroke="none" draw:fill="none" fo:color="#000000" fo:font-family="Albany" style:font-family-generic="swiss" style:font-pitch="variable" fo:font-size="23.2000007629395pt" style:font-family-asian="'Andale Sans UI'" style:font-pitch-asian="variable" style:font-size-asian="23.2000007629395pt" style:font-family-complex="'Arial Unicode MS'" style:font-pitch-complex="variable" style:font-size-complex="23.2000007629395pt"/> + </style:style> + <style:style style:name="ch3" style:family="chart"> + <style:properties draw:fill="none" fo:font-family="Albany" style:font-family-generic="swiss" style:font-pitch="variable" fo:font-size="10.6999998092651pt" style:font-family-asian="'Andale Sans UI'" style:font-pitch-asian="variable" style:font-size-asian="10.6999998092651pt" style:font-family-complex="'Arial Unicode MS'" style:font-pitch-complex="variable" style:font-size-complex="10.6999998092651pt"/> + </style:style> + <style:style style:name="ch4" style:family="chart"> + <style:properties chart:stock-updown-bars="false" chart:stock-with-volume="false" chart:three-dimensional="false" chart:deep="false" chart:lines="false" chart:splines="0" chart:symbol="-3" chart:vertical="false" chart:lines-used="0" chart:connect-bars="false" chart:series-source="columns" chart:mean-value="false" chart:error-margin="0" chart:error-lower-limit="0" chart:error-upper-limit="0" chart:error-category="none" chart:error-percentage="0" chart:regression-type="none" chart:data-label-number="none" chart:data-label-text="false" chart:data-label-symbol="false"/> + </style:style> + <style:style style:name="ch5" style:family="chart" style:data-style-name="N0"> + <style:properties chart:display-label="true" chart:tick-marks-major-inner="false" chart:tick-marks-major-outer="true" chart:logarithmic="false" chart:text-overlap="false" text:line-break="true" chart:label-arrangement="side-by-side" chart:visible="true" fo:direction="ltr" draw:stroke="solid" svg:stroke-width="0.051cm" svg:stroke-color="#000000" draw:marker-start-width="0.279cm" draw:marker-end-width="0.279cm" fo:color="#000000" fo:font-family="Albany" style:font-family-generic="swiss" style:font-pitch="variable" fo:font-size="10.8999996185303pt" style:font-family-asian="'Andale Sans UI'" style:font-pitch-asian="variable" style:font-size-asian="10.8999996185303pt" style:font-family-complex="'Arial Unicode MS'" style:font-pitch-complex="variable" style:font-size-complex="10.8999996185303pt"/> + </style:style> + <style:style style:name="ch6" style:family="chart" style:data-style-name="N0"> + <style:properties chart:display-label="true" chart:tick-marks-major-inner="false" chart:tick-marks-major-outer="true" chart:logarithmic="false" chart:origin="0" chart:gap-width="100" chart:overlap="0" chart:text-overlap="false" text:line-break="false" chart:label-arrangement="side-by-side" chart:visible="true" fo:direction="ltr" + draw:stroke="solid" svg:stroke-width="0cm" svg:stroke-color="#000000" fo:color="#000000" fo:font-family="Albany" style:font-family-generic="swiss" style:font-pitch="variable" fo:font-size="12.5pt" style:font-family-asian="'Andale Sans UI'" style:font-pitch-asian="variable" style:font-size-asian="12.5pt" style:font-family-complex="'Arial Unicode MS'" style:font-pitch-complex="variable" style:font-size-complex="12.5pt"/> + </style:style> + <style:style style:name="ch7" style:family="chart" style:data-style-name="N0"> + <style:properties chart:display-label="true" chart:tick-marks-major-inner="false" chart:tick-marks-major-outer="true" chart:logarithmic="false" chart:text-overlap="false" text:line-break="false" chart:label-arrangement="side-by-side" chart:visible="true" fo:direction="ltr" draw:stroke="solid" svg:stroke-width="0cm" svg:stroke-color="#000000" fo:color="#000000" fo:font-family="Albany" style:font-family-generic="swiss" style:font-pitch="variable" fo:font-size="12.5pt" style:font-family-asian="'Andale Sans UI'" style:font-pitch-asian="variable" style:font-size-asian="12.5pt" style:font-family-complex="'Arial Unicode MS'" style:font-pitch-complex="variable" style:font-size-complex="12.5pt"/> + </style:style> + <style:style style:name="ch8" style:family="chart"> + <style:properties draw:fill-color="#9999ff" fo:font-family="Albany" style:font-family-generic="swiss" style:font-pitch="variable" fo:font-size="10.6999998092651pt" style:font-family-asian="'Andale Sans UI'" style:font-pitch-asian="variable" style:font-size-asian="10.6999998092651pt" style:font-family-complex="'Arial Unicode MS'" style:font-pitch-complex="variable" style:font-size-complex="10.6999998092651pt"/> + </style:style> + <style:style style:name="ch9" style:family="chart"> + <style:properties draw:stroke="none" draw:fill="none"/> + </style:style> + <style:style style:name="ch10" style:family="chart"> + <style:properties draw:stroke="none" draw:fill-color="#999999"/> + </style:style> +</office:automatic-styles> + +<office:body> + <chart:chart svg:width="20.088cm" svg:height="12.514cm" chart:class="bar" chart:style-name="ch1"> + <chart:title svg:x="8.318cm" svg:y="0.25cm" chart:style-name="ch2"> + <text:p>Haupttitel</text:p> + </chart:title> + <chart:legend chart:legend-position="right" svg:x="17.516cm" svg:y="5.92cm" chart:style-name="ch3"/> + <chart:plot-area chart:style-name="ch4" table:cell-range-address="Tabelle1.$A$6:.$A$7" chart:table-number-list="0" svg:x="0.4cm" svg:y="1.656cm" svg:width="16.317cm" svg:height="10.608cm"> + <chart:axis chart:class="category" chart:name="primary-x" chart:style-name="ch5"/> + <chart:axis chart:class="value" chart:name="primary-y" chart:style-name="ch6"/> + <chart:axis chart:class="series" chart:name="primary-z" chart:style-name="ch7"/> + <chart:series chart:style-name="ch8"> + <chart:data-point chart:repeated="2"/> + </chart:series> + <chart:wall chart:style-name="ch9"/> + <chart:floor chart:style-name="ch10"/> + </chart:plot-area> + <table:table table:name="local-table"> + <table:table-header-columns> + <table:table-column/> + </table:table-header-columns> + <table:table-columns> + <table:table-column table:number-columns-repeated="1"/> + </table:table-columns> + <table:table-header-rows> + <table:table-row> + <table:table-cell/> + <table:table-cell table:value-type="string"> + <text:p>Spalte A</text:p> + </table:table-cell> + </table:table-row> + </table:table-header-rows> + <table:table-rows> + <table:table-row> + <table:table-cell table:value-type="string"> + <text:p>Zeile 6</text:p> + </table:table-cell> + <table:table-cell table:value-type="float" table:value="-2"> + <text:p>-2 + </text:p> + </table:table-cell> + </table:table-row> + <table:table-row> + <table:table-cell table:value-type="string"> + <text:p>Zeile 7 + </text:p> + </table:table-cell> + <table:table-cell table:value-type="float" table:value="2"> + <text:p>2 + </text:p> + </table:table-cell> + </table:table-row> + </table:table-rows> + </table:table> +</chart:chart> +</office:body> + +</office:document-content>
\ No newline at end of file diff --git a/chart2/workbench/fileformat/datastyl.mod b/chart2/workbench/fileformat/datastyl.mod new file mode 100644 index 000000000..fa1caef69 --- /dev/null +++ b/chart2/workbench/fileformat/datastyl.mod @@ -0,0 +1,200 @@ +<!-- + + $Id: datastyl.mod,v 1.1.1.1 2003-10-06 09:58:34 bm Exp $ + + The Contents of this file are made available subject to the terms of + either of the following licenses + + - GNU Lesser General Public License Version 2.1 + - Sun Industry Standards Source License Version 1.1 + + Sun Microsystems Inc., October, 2000 + + GNU Lesser General Public License Version 2.1 + ============================================= + Copyright 2000 by Sun Microsystems, Inc. + 901 San Antonio Road, Palo Alto, CA 94303, USA + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License version 2.1, as published by the Free Software Foundation. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, + MA 02111-1307 USA + + + Sun Industry Standards Source License Version 1.1 + ================================================= + The contents of this file are subject to the Sun Industry Standards + Source License Version 1.1 (the "License"); You may not use this file + except in compliance with the License. You may obtain a copy of the + License at http://www.openoffice.org/license.html. + + Software provided under this License is provided on an "AS IS" basis, + WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, + WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + See the License for the specific provisions governing your rights and + obligations concerning the Software. + + The Initial Developer of the Original Code is: Sun Microsystems, Inc. + + Copyright: 2000 by Sun Microsystems, Inc. + + All Rights Reserved. + + Contributor(s): _______________________________________ + +--> + +<!-- data styles --> +<!ENTITY % any-number "( number:number | number:scientific-number | number:fraction )"> +<!ENTITY % number-style-content "( (number:text,(%any-number;,number:text?)?) | (%any-number;,number:text?) )"> +<!ELEMENT number:number-style ( style:properties?, %number-style-content;, style:map* )> +<!ELEMENT number:number ( number:embedded-text* )> +<!ELEMENT number:scientific-number EMPTY> +<!ELEMENT number:fraction EMPTY> + +<!ELEMENT number:embedded-text (#PCDATA)> +<!ATTLIST number:embedded-text number:position %integer; #REQUIRED> + +<!ENTITY % currency-symbol-and-text "number:currency-symbol,number:text?"> +<!ENTITY % number-and-text "number:number,number:text?"> +<!ENTITY % currency-symbol-and-number "((%number-and-text;),(%currency-symbol-and-text;)?) | ((%currency-symbol-and-text;),(%number-and-text;)?)"> +<!ENTITY % currency-style-content "number:text?, (%currency-symbol-and-number;)?"> + +<!ELEMENT number:currency-style ( style:properties?, (%currency-style-content;), style:map* )> +<!ELEMENT number:currency-symbol (#PCDATA)> +<!ATTLIST number:currency-symbol number:language CDATA #IMPLIED> +<!ATTLIST number:currency-symbol number:country CDATA #IMPLIED> + +<!ENTITY % percentage-style-content "( (number:text,(%number-and-text;)?) | (%number-and-text;) )"> +<!ELEMENT number:percentage-style ( style:properties?, %percentage-style-content;, style:map* )> + +<!ENTITY % any-date "( number:day | number:month | number:year | number:era | number:day-of-week | number:week-of-year | number:quarter| number:hours | number:am-pm | number:minutes | number:seconds )"> +<!ENTITY % date-style-content "( (number:text,(%any-date;,number:text?)+) | (%any-date;,number:text?)+ )"> +<!ELEMENT number:date-style ( style:properties?, %date-style-content;, style:map* )> +<!ELEMENT number:day EMPTY> +<!ATTLIST number:day number:style (short|long) "short"> +<!ATTLIST number:day number:calendar CDATA #IMPLIED> +<!ELEMENT number:month EMPTY> +<!ATTLIST number:month number:textual %boolean; "false"> +<!ATTLIST number:month number:style (short|long) "short"> +<!ATTLIST number:month number:calendar CDATA #IMPLIED> +<!ELEMENT number:year EMPTY> +<!ATTLIST number:year number:style (short|long) "short"> +<!ATTLIST number:year number:calendar CDATA #IMPLIED> +<!ELEMENT number:era EMPTY> +<!ATTLIST number:era number:style (short|long) "short"> +<!ATTLIST number:era number:calendar CDATA #IMPLIED> +<!ELEMENT number:day-of-week EMPTY> +<!ATTLIST number:day-of-week number:style (short|long) "short"> +<!ATTLIST number:day-of-week number:calendar CDATA #IMPLIED> +<!ELEMENT number:week-of-year EMPTY> +<!ATTLIST number:week-of-year number:calendar CDATA #IMPLIED> +<!ELEMENT number:quarter EMPTY> +<!ATTLIST number:quarter number:style (short|long) "short"> +<!ATTLIST number:quarter number:calendar CDATA #IMPLIED> + +<!ENTITY % any-time "( number:hours | number:am-pm | number:minutes | number:seconds )"> +<!ENTITY % time-style-content "( (number:text,(%any-time;,number:text?)+) | (%any-time;,number:text?)+)"> +<!ELEMENT number:time-style ( style:properties?, %time-style-content;, style:map* )> +<!ELEMENT number:hours EMPTY> +<!ATTLIST number:hours number:style (short|long) "short"> +<!ELEMENT number:minutes EMPTY> +<!ATTLIST number:minutes number:style (short|long) "short"> +<!ELEMENT number:seconds EMPTY> +<!ATTLIST number:seconds number:style (short|long) "short"> +<!ATTLIST number:seconds number:decimal-places %integer; "0"> +<!ELEMENT number:am-pm EMPTY> + +<!ENTITY % boolean-style-content "( (number:text,(number:boolean,number:text?)?) | (number:boolean,number:text?) )"> +<!ELEMENT number:boolean-style ( style:properties?,%boolean-style-content;, style:map* )> +<!ELEMENT number:boolean EMPTY> + +<!ENTITY % text-style-content "( (number:text,(number:text-content,number:text?)?) | (number:text-content,number:text?) )"> +<!ELEMENT number:text-style ( style:properties?,%text-style-content;, style:map* )> +<!ELEMENT number:text (#PCDATA)> +<!ELEMENT number:text-content EMPTY> + +<!ATTLIST number:number-style style:name %styleName; #REQUIRED> +<!ATTLIST number:currency-style style:name %styleName; #REQUIRED> +<!ATTLIST number:percentage-style style:name %styleName; #REQUIRED> +<!ATTLIST number:date-style style:name %styleName; #REQUIRED> +<!ATTLIST number:time-style style:name %styleName; #REQUIRED> +<!ATTLIST number:boolean-style style:name %styleName; #REQUIRED> +<!ATTLIST number:text-style style:name %styleName; #REQUIRED> + +<!ATTLIST number:number-style style:family CDATA #REQUIRED> +<!ATTLIST number:currency-style style:family CDATA #REQUIRED> +<!ATTLIST number:percentage-style style:family CDATA #REQUIRED> +<!ATTLIST number:date-style style:family CDATA #REQUIRED> +<!ATTLIST number:time-style style:family CDATA #REQUIRED> +<!ATTLIST number:boolean-style style:family CDATA #REQUIRED> +<!ATTLIST number:text-style style:family CDATA #REQUIRED> + +<!ATTLIST number:number-style number:language CDATA #IMPLIED> +<!ATTLIST number:currency-style number:language CDATA #IMPLIED> +<!ATTLIST number:percentage-style number:language CDATA #IMPLIED> +<!ATTLIST number:date-style number:language CDATA #IMPLIED> +<!ATTLIST number:time-style number:language CDATA #IMPLIED> +<!ATTLIST number:boolean-style number:language CDATA #IMPLIED> +<!ATTLIST number:text-style number:language CDATA #IMPLIED> + +<!ATTLIST number:number-style number:country CDATA #IMPLIED> +<!ATTLIST number:currency-style number:country CDATA #IMPLIED> +<!ATTLIST number:percentage-style number:country CDATA #IMPLIED> +<!ATTLIST number:date-style number:country CDATA #IMPLIED> +<!ATTLIST number:time-style number:country CDATA #IMPLIED> +<!ATTLIST number:boolean-style number:country CDATA #IMPLIED> +<!ATTLIST number:text-style number:country CDATA #IMPLIED> + +<!ATTLIST number:number-style number:title CDATA #IMPLIED> +<!ATTLIST number:currency-style number:title CDATA #IMPLIED> +<!ATTLIST number:percentage-style number:title CDATA #IMPLIED> +<!ATTLIST number:date-style number:title CDATA #IMPLIED> +<!ATTLIST number:time-style number:title CDATA #IMPLIED> +<!ATTLIST number:boolean-style number:title CDATA #IMPLIED> +<!ATTLIST number:text-style number:title CDATA #IMPLIED> + +<!ATTLIST number:number-style style:volatile %boolean; #IMPLIED> +<!ATTLIST number:currency-style style:volatile %boolean; #IMPLIED> +<!ATTLIST number:percentage-style style:volatile %boolean; #IMPLIED> +<!ATTLIST number:date-style style:volatile %boolean; #IMPLIED> +<!ATTLIST number:time-style style:volatile %boolean; #IMPLIED> +<!ATTLIST number:boolean-style style:volatile %boolean; #IMPLIED> +<!ATTLIST number:text-style style:volatile %boolean; #IMPLIED> + +<!ATTLIST number:currency-style number:automatic-order %boolean; "false"> +<!ATTLIST number:date-style number:automatic-order %boolean; "false"> + +<!ATTLIST number:date-style number:format-source (fixed|language) "fixed"> +<!ATTLIST number:time-style number:format-source (fixed|language) "fixed"> + +<!ATTLIST number:time-style number:truncate-on-overflow %boolean; "true"> + +<!ATTLIST number:number number:decimal-places %integer; #IMPLIED> +<!ATTLIST number:scientific-number number:decimal-places %integer; #IMPLIED> + +<!ATTLIST number:number number:min-integer-digits %integer; #IMPLIED> +<!ATTLIST number:scientific-number number:min-integer-digits %integer; #IMPLIED> +<!ATTLIST number:fraction number:min-integer-digits %integer; #IMPLIED> + +<!ATTLIST number:number number:grouping %boolean; "false"> +<!ATTLIST number:scientific-number number:grouping %boolean; "false"> +<!ATTLIST number:fraction number:grouping %boolean; "false"> + +<!ATTLIST number:number number:decimal-replacement CDATA #IMPLIED> + +<!ATTLIST number:scientific-number number:min-exponent-digits %integer; #IMPLIED> + +<!ATTLIST number:fraction number:min-numerator-digits %integer; #IMPLIED> + +<!ATTLIST number:fraction number:min-denominator-digits %integer; #IMPLIED> diff --git a/chart2/workbench/fileformat/drawing.mod b/chart2/workbench/fileformat/drawing.mod new file mode 100644 index 000000000..4c210f4eb --- /dev/null +++ b/chart2/workbench/fileformat/drawing.mod @@ -0,0 +1,881 @@ +<!-- + $Id: drawing.mod,v 1.1.1.1 2003-10-06 09:58:35 bm Exp $ + + The Contents of this file are made available subject to the terms of + either of the following licenses + + - GNU Lesser General Public License Version 2.1 + - Sun Industry Standards Source License Version 1.1 + + Sun Microsystems Inc., October, 2000 + + GNU Lesser General Public License Version 2.1 + ============================================= + Copyright 2000 by Sun Microsystems, Inc. + 901 San Antonio Road, Palo Alto, CA 94303, USA + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License version 2.1, as published by the Free Software Foundation. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, + MA 02111-1307 USA + + + Sun Industry Standards Source License Version 1.1 + ================================================= + The contents of this file are subject to the Sun Industry Standards + Source License Version 1.1 (the "License"); You may not use this file + except in compliance with the License. You may obtain a copy of the + License at http://www.openoffice.org/license.html. + + Software provided under this License is provided on an "AS IS" basis, + WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, + WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + See the License for the specific provisions governing your rights and + obligations concerning the Software. + + The Initial Developer of the Original Code is: Sun Microsystems, Inc. + + Copyright: 2000 by Sun Microsystems, Inc. + + All Rights Reserved. + + Contributor(s): _______________________________________ + +--> + +<!ENTITY % points "CDATA" > +<!ENTITY % pathData "CDATA" > +<!ENTITY % gradient-style "(linear|axial|radial|ellipsoid|square|rectangular)" > +<!ENTITY % draw-position "svg:x %coordinate; #IMPLIED svg:y %coordinate; #IMPLIED"> +<!ENTITY % draw-end-position "table:end-cell-address %cell-address; #IMPLIED table:end-x %coordinate; #IMPLIED table:end-y %coordinate; #IMPLIED"> +<!ENTITY % draw-size "svg:width %coordinate; #IMPLIED svg:height %coordinate; #IMPLIED"> +<!ENTITY % draw-transform "draw:transform CDATA #IMPLIED"> +<!ENTITY % draw-viewbox "svg:viewBox CDATA #REQUIRED"> +<!ENTITY % draw-style-name "draw:style-name %styleName; #IMPLIED presentation:style-name %styleName; #IMPLIED draw:text-style-name %styleName; #IMPLIED"> +<!ENTITY % draw-shape-id "CDATA #IMPLIED" > +<!ENTITY % draw-text "(text:p|text:unordered-list|text:ordered-list)*"> +<!ENTITY % zindex "draw:z-index %nonNegativeInteger; #IMPLIED"> +<!ENTITY % distance "CDATA"> +<!ENTITY % rectanglePoint "(top-left|top|top-right|left|center|right|bottom-left|bottom|bottom-right)"> +<!ENTITY % vector3D "CDATA"> +<!ENTITY % text-anchor "text:anchor-type %anchorType; #IMPLIED text:anchor-page-number %positiveInteger; #IMPLIED"> +<!ENTITY % layerName "CDATA"> +<!ENTITY % table-background "table:table-background (true | false) #IMPLIED"> + +<!-- commont presentation shape attributes --> +<!ENTITY % presentation-style-name "presentation:style-name %styleName; #IMPLIED"> +<!ENTITY % presentation-classes "(title|outline|subtitle|text|graphic|object|chart|table|orgchart|page|notes)" > +<!-- ENTITY % presentation-class "presentation:class %presentation-classes; #IMPLIED" --> +<!ENTITY % presentation-class "presentation:class %presentation-classes; #IMPLIED presentation:placeholder (true|false) #IMPLIED presentation:user-transformed (true|false) #IMPLIED"> +<!ENTITY % presentationEffects "(none|fade|move|stripes|open|close|dissolve|wavyline|random|lines|laser|appear|hide|move-short|checkerboard|rotate|stretch)" > +<!ENTITY % presentationEffectDirections "(none|from-left|from-top|from-right|from-bottom|from-center|from-upper-left|from-upper-right|from-lower-left|from-lower-right|to-left|to-top|to-right|to-bottom|to-upper-left|to-upper-right|to-lower-right|to-lower-left|path|spiral-inward-left|spiral-inward-right|spiral-outward-left|spiral-outward-right|vertical|horizontal|to-center|clockwise|counter-clockwise)" > +<!ENTITY % presentationSpeeds "(slow|medium|fast)" > + +<!-- Drawing shapes --> +<!ELEMENT draw:rect ( office:events?, %draw-text; )> +<!ATTLIST draw:rect %draw-position; > +<!ATTLIST draw:rect %draw-end-position; > +<!ATTLIST draw:rect %table-background; > +<!ATTLIST draw:rect %draw-size; > +<!ATTLIST draw:rect %draw-style-name; > +<!ATTLIST draw:rect %draw-transform; > +<!ATTLIST draw:rect draw:corner-radius %nonNegativeLength; #IMPLIED> +<!ATTLIST draw:rect %zindex;> +<!ATTLIST draw:rect draw:id %draw-shape-id;> +<!ATTLIST draw:rect %text-anchor;> +<!ATTLIST draw:rect draw:layer %layerName; #IMPLIED> + +<!ELEMENT draw:line ( office:events?, %draw-text; )> +<!ATTLIST draw:line svg:x1 %length; #IMPLIED> +<!ATTLIST draw:line svg:y1 %length; #IMPLIED> +<!ATTLIST draw:line svg:x2 %length; #REQUIRED> +<!ATTLIST draw:line svg:y2 %length; #REQUIRED> +<!ATTLIST draw:line svg:y %coordinate; #IMPLIED> +<!ATTLIST draw:line %draw-style-name; > +<!ATTLIST draw:line %draw-transform; > +<!ATTLIST draw:line %zindex;> +<!ATTLIST draw:line %draw-end-position; > +<!ATTLIST draw:line %table-background; > +<!ATTLIST draw:line draw:id %draw-shape-id;> +<!ATTLIST draw:line %text-anchor;> +<!ATTLIST draw:line draw:layer %layerName; #IMPLIED> + +<!ELEMENT draw:polyline ( office:events?, %draw-text; )> +<!ATTLIST draw:polyline %draw-position; > +<!ATTLIST draw:polyline %draw-size; > +<!ATTLIST draw:polyline %draw-viewbox; > +<!ATTLIST draw:polyline draw:points %points; #REQUIRED> +<!ATTLIST draw:polyline %draw-style-name; > +<!ATTLIST draw:polyline %draw-transform; > +<!ATTLIST draw:polyline %zindex;> +<!ATTLIST draw:polyline %draw-end-position; > +<!ATTLIST draw:polyline %table-background; > +<!ATTLIST draw:polyline draw:id %draw-shape-id;> +<!ATTLIST draw:polyline %text-anchor;> +<!ATTLIST draw:polyline draw:layer %layerName; #IMPLIED> + +<!ELEMENT draw:polygon ( office:events?, %draw-text; )> +<!ATTLIST draw:polygon %draw-position; > +<!ATTLIST draw:polygon %draw-end-position; > +<!ATTLIST draw:polygon %table-background; > +<!ATTLIST draw:polygon %draw-size; > +<!ATTLIST draw:polygon %draw-viewbox; > +<!ATTLIST draw:polygon draw:points %points; #REQUIRED > +<!ATTLIST draw:polygon %draw-style-name; > +<!ATTLIST draw:polygon %draw-transform; > +<!ATTLIST draw:polygon %zindex;> +<!ATTLIST draw:polygon draw:id %draw-shape-id;> +<!ATTLIST draw:polygon %text-anchor;> +<!ATTLIST draw:polygon draw:layer %layerName; #IMPLIED> + +<!ELEMENT draw:path ( office:events?, %draw-text; )> +<!ATTLIST draw:path %draw-position;> +<!ATTLIST draw:path %draw-end-position; > +<!ATTLIST draw:path %table-background; > +<!ATTLIST draw:path %draw-size; > +<!ATTLIST draw:path %draw-viewbox; > +<!ATTLIST draw:path svg:d %pathData; #REQUIRED > +<!ATTLIST draw:path %draw-style-name; > +<!ATTLIST draw:path %draw-transform; > +<!ATTLIST draw:path %zindex;> +<!ATTLIST draw:path draw:id %draw-shape-id;> +<!ATTLIST draw:path %text-anchor;> +<!ATTLIST draw:path draw:layer %layerName; #IMPLIED> + +<!ELEMENT draw:circle ( office:events?, %draw-text; )> +<!ATTLIST draw:circle %draw-position; > +<!ATTLIST draw:circle %draw-size; > +<!ATTLIST draw:circle %draw-style-name; > +<!ATTLIST draw:circle %draw-transform; > +<!ATTLIST draw:circle %zindex;> +<!ATTLIST draw:circle %draw-end-position; > +<!ATTLIST draw:circle %table-background; > +<!ATTLIST draw:circle draw:id %draw-shape-id;> +<!ATTLIST draw:circle draw:kind (full|section|cut|arc) "full"> +<!ATTLIST draw:circle draw:start-angle %nonNegativeInteger; #IMPLIED> +<!ATTLIST draw:circle draw:end-angle %nonNegativeInteger; #IMPLIED> +<!ATTLIST draw:circle %text-anchor;> +<!ATTLIST draw:circle draw:layer %layerName; #IMPLIED> + +<!ELEMENT draw:ellipse ( office:events?, %draw-text; )> +<!ATTLIST draw:ellipse %draw-position; > +<!ATTLIST draw:ellipse %draw-size; > +<!ATTLIST draw:ellipse %draw-style-name; > +<!ATTLIST draw:ellipse %draw-transform; > +<!ATTLIST draw:ellipse %zindex;> +<!ATTLIST draw:ellipse %draw-end-position; > +<!ATTLIST draw:ellipse %table-background; > +<!ATTLIST draw:ellipse draw:id %draw-shape-id;> +<!ATTLIST draw:ellipse draw:kind (full|section|cut|arc) "full"> +<!ATTLIST draw:ellipse draw:start-angle %nonNegativeInteger; #IMPLIED> +<!ATTLIST draw:ellipse draw:end-angle %nonNegativeInteger; #IMPLIED> +<!ATTLIST draw:ellipse %text-anchor;> +<!ATTLIST draw:ellipse draw:layer %layerName; #IMPLIED> + +<!ELEMENT draw:connector ( office:events?, %draw-text;)> +<!ATTLIST draw:connector draw:type (standard|lines|line|curve) "standard"> +<!ATTLIST draw:connector draw:line-skew CDATA #IMPLIED> +<!ATTLIST draw:connector %draw-style-name;> +<!ATTLIST draw:connector svg:x1 %coordinate; #REQUIRED> +<!ATTLIST draw:connector svg:y1 %coordinate; #REQUIRED> +<!ATTLIST draw:connector svg:x2 %coordinate; #REQUIRED> +<!ATTLIST draw:connector svg:y2 %coordinate; #REQUIRED> +<!ATTLIST draw:connector draw:start-shape %draw-shape-id;> +<!ATTLIST draw:connector draw:start-glue-point %integer; #IMPLIED> +<!ATTLIST draw:connector draw:end-shape %draw-shape-id;> +<!ATTLIST draw:connector draw:end-glue-point %integer; #IMPLIED> +<!ATTLIST draw:connector %zindex;> +<!ATTLIST draw:connector %draw-end-position; > +<!ATTLIST draw:connector %table-background; > +<!ATTLIST draw:connector draw:id %draw-shape-id;> +<!ATTLIST draw:connector %text-anchor;> +<!ATTLIST draw:connector draw:layer %layerName; #IMPLIED> + +<!ELEMENT draw:control EMPTY> +<!ATTLIST draw:control %draw-style-name;> +<!ATTLIST draw:control %draw-position; > +<!ATTLIST draw:control %draw-size; > +<!ATTLIST draw:control %control-id; > +<!ATTLIST draw:control %zindex;> +<!ATTLIST draw:control %draw-end-position; > +<!ATTLIST draw:control %table-background; > +<!ATTLIST draw:control draw:id %draw-shape-id;> +<!ATTLIST draw:control %text-anchor;> +<!ATTLIST draw:control draw:layer %layerName; #IMPLIED> + +<!ELEMENT draw:g ( office:events?, (%shapes;)* ) > +<!ATTLIST draw:g svg:y %coordinate; #IMPLIED> +<!ATTLIST draw:g %draw-transform; > +<!ATTLIST draw:g %draw-style-name; > +<!ATTLIST draw:g %zindex;> +<!ATTLIST draw:g %draw-end-position; > +<!ATTLIST draw:g %table-background; > +<!ATTLIST draw:g draw:id %draw-shape-id;> +<!ATTLIST draw:g %text-anchor;> +<!ATTLIST draw:g draw:layer %layerName; #IMPLIED> + +<!ELEMENT draw:page-thumbnail EMPTY> +<!ATTLIST draw:page-thumbnail draw:page-number %positiveInteger; #IMPLIED> +<!ATTLIST draw:page-thumbnail %draw-position; > +<!ATTLIST draw:page-thumbnail %draw-size; > +<!ATTLIST draw:page-thumbnail %draw-style-name; > +<!ATTLIST draw:page-thumbnail %presentation-class; > +<!ATTLIST draw:page-thumbnail %zindex;> +<!ATTLIST draw:page-thumbnail %draw-end-position; > +<!ATTLIST draw:page-thumbnail %table-background; > +<!ATTLIST draw:page-thumbnail draw:id %draw-shape-id;> +<!ATTLIST draw:page-thumbnail %text-anchor;> +<!ATTLIST draw:page-thumbnail draw:layer %layerName; #IMPLIED> + +<!ELEMENT draw:caption ( office:events?, %draw-text;)> +<!ATTLIST draw:caption %draw-position; > +<!ATTLIST draw:caption %draw-end-position; > +<!ATTLIST draw:caption %table-background; > +<!ATTLIST draw:caption %draw-size; > +<!ATTLIST draw:caption %draw-style-name; > +<!ATTLIST draw:caption %draw-transform; > +<!ATTLIST draw:caption draw:caption-point-x %coordinate; #IMPLIED> +<!ATTLIST draw:caption draw:caption-point-y %coordinate; #IMPLIED> +<!ATTLIST draw:caption %zindex;> +<!ATTLIST draw:caption draw:id %draw-shape-id;> +<!ATTLIST draw:caption %text-anchor;> +<!ATTLIST draw:caption draw:layer %layerName; #IMPLIED> +<!ATTLIST draw:caption draw:corner-radius %nonNegativeLength; #IMPLIED> + +<!ELEMENT draw:measure ( office:events?, %draw-text;)> +<!ATTLIST draw:measure svg:x1 %coordinate; #REQUIRED> +<!ATTLIST draw:measure svg:y1 %coordinate; #REQUIRED> +<!ATTLIST draw:measure svg:x2 %coordinate; #REQUIRED> +<!ATTLIST draw:measure svg:y2 %coordinate; #REQUIRED> +<!ATTLIST draw:measure %draw-end-position; > +<!ATTLIST draw:measure %table-background; > +<!ATTLIST draw:measure %draw-style-name; > +<!ATTLIST draw:measure %draw-transform; > +<!ATTLIST draw:measure %zindex;> +<!ATTLIST draw:measure draw:id %draw-shape-id;> +<!ATTLIST draw:measure %text-anchor;> +<!ATTLIST draw:measure draw:layer %layerName; #IMPLIED> + +<!-- graphic style elements --> +<!ELEMENT draw:gradient EMPTY > +<!ATTLIST draw:gradient draw:name %styleName; #REQUIRED> +<!ATTLIST draw:gradient draw:style %gradient-style; #REQUIRED> +<!ATTLIST draw:gradient draw:cx %coordinate; #IMPLIED> +<!ATTLIST draw:gradient draw:cy %coordinate; #IMPLIED> +<!ATTLIST draw:gradient draw:start-color %color; #IMPLIED> +<!ATTLIST draw:gradient draw:end-color %color; #IMPLIED> +<!ATTLIST draw:gradient draw:start-intensity %percentage; #IMPLIED> +<!ATTLIST draw:gradient draw:end-intensity %percentage; #IMPLIED> +<!ATTLIST draw:gradient draw:angle %integer; #IMPLIED> +<!ATTLIST draw:gradient draw:border %percentage; #IMPLIED> + +<!ELEMENT draw:hatch EMPTY > +<!ATTLIST draw:hatch draw:name %styleName; #REQUIRED> +<!ATTLIST draw:hatch draw:style (single|double|triple) #REQUIRED > +<!ATTLIST draw:hatch draw:color %color; #IMPLIED> +<!ATTLIST draw:hatch draw:distance %length; #IMPLIED> +<!ATTLIST draw:hatch draw:rotation %integer; #IMPLIED> + + +<!ELEMENT draw:fill-image EMPTY > +<!ATTLIST draw:fill-image draw:name %styleName; #REQUIRED> +<!ATTLIST draw:fill-image xlink:href %uriReference; #REQUIRED> +<!ATTLIST draw:fill-image xlink:type (simple) #IMPLIED> +<!ATTLIST draw:fill-image xlink:show (embed) #IMPLIED> +<!ATTLIST draw:fill-image xlink:actuate (onLoad) #IMPLIED> +<!ATTLIST draw:fill-image svg:width %length; #IMPLIED> +<!ATTLIST draw:fill-image svg:height %length; #IMPLIED> + +<!ELEMENT draw:transparency EMPTY> +<!ATTLIST draw:transparency draw:name %styleName; #REQUIRED> +<!ATTLIST draw:transparency draw:style %gradient-style; #REQUIRED> +<!ATTLIST draw:transparency draw:cx %coordinate; #IMPLIED> +<!ATTLIST draw:transparency draw:cy %coordinate; #IMPLIED> +<!ATTLIST draw:transparency draw:start %percentage; #IMPLIED> +<!ATTLIST draw:transparency draw:end %percentage; #IMPLIED> +<!ATTLIST draw:transparency draw:angle %integer; #IMPLIED> +<!ATTLIST draw:transparency draw:border %percentage; #IMPLIED> + +<!ELEMENT draw:marker EMPTY> +<!ATTLIST draw:marker draw:name %styleName; #REQUIRED> +<!ATTLIST draw:marker %draw-viewbox; > +<!ATTLIST draw:marker svg:d %pathData; #REQUIRED> + +<!ELEMENT draw:stroke-dash EMPTY> +<!ATTLIST draw:stroke-dash draw:name %styleName; #REQUIRED> +<!ATTLIST draw:stroke-dash draw:style (rect|round) #IMPLIED> +<!ATTLIST draw:stroke-dash draw:dots1 %integer; #IMPLIED> +<!ATTLIST draw:stroke-dash draw:dots1-length %length; #IMPLIED> +<!ATTLIST draw:stroke-dash draw:dots2 %integer; #IMPLIED> +<!ATTLIST draw:stroke-dash draw:dots2-length %length; #IMPLIED> +<!ATTLIST draw:stroke-dash draw:distance %length; #IMPLIED> + +<!-- stroke attributes --> +<!ATTLIST style:properties draw:stroke (none|dash|solid) #IMPLIED> +<!ATTLIST style:properties draw:stroke-dash CDATA #IMPLIED> +<!ATTLIST style:properties svg:stroke-width %length; #IMPLIED> +<!ATTLIST style:properties svg:stroke-color %color; #IMPLIED> +<!ATTLIST style:properties draw:marker-start %styleName; #IMPLIED> +<!ATTLIST style:properties draw:marker-end %styleName; #IMPLIED> +<!ATTLIST style:properties draw:marker-start-width %length; #IMPLIED> +<!ATTLIST style:properties draw:marker-end-width %length; #IMPLIED> +<!ATTLIST style:properties draw:marker-start-center %boolean; #IMPLIED> +<!ATTLIST style:properties draw:marker-end-center %boolean; #IMPLIED> +<!ATTLIST style:properties svg:stroke-opacity %floatOrPercentage; #IMPLIED> +<!ATTLIST style:properties svg:stroke-linejoin (miter|round|bevel|middle|none|inherit) #IMPLIED> + +<!-- text attributes --> +<!ATTLIST style:properties draw:auto-grow-width %boolean; #IMPLIED> +<!ATTLIST style:properties draw:auto-grow-height %boolean; #IMPLIED> +<!ATTLIST style:properties draw:fit-to-size %boolean; #IMPLIED> +<!ATTLIST style:properties draw:fit-to-contour %boolean; #IMPLIED> +<!ATTLIST style:properties draw:textarea-horizontal-align ( left | center | right | justify ) #IMPLIED> +<!ATTLIST style:properties draw:textarea-vertical-align ( top | middle | bottom ) #IMPLIED> + +<!-- fill attributes --> +<!ATTLIST style:properties draw:fill (none|solid|bitmap|gradient|hatch) #IMPLIED> +<!ATTLIST style:properties draw:fill-color %color; #IMPLIED> +<!ATTLIST style:properties draw:fill-gradient-name %styleName; #IMPLIED> +<!ATTLIST style:properties draw:gradient-step-count CDATA #IMPLIED> +<!ATTLIST style:properties draw:fill-hatch-name %styleName; #IMPLIED> +<!ATTLIST style:properties draw:fill-hatch-solid %boolean; #IMPLIED> +<!ATTLIST style:properties draw:fill-image-name %styleName; #IMPLIED> +<!ATTLIST style:properties style:repeat (no-repeat|repeat|stretch) #IMPLIED> +<!ATTLIST style:properties draw:fill-image-width %lengthOrPercentage; #IMPLIED> +<!ATTLIST style:properties draw:fill-image-height %lengthOrPercentage; #IMPLIED> +<!ATTLIST style:properties draw:fill-image-ref-point-x %percentage; #IMPLIED> +<!ATTLIST style:properties draw:fill-image-ref-point-y %percentage; #IMPLIED> +<!ATTLIST style:properties draw:fill-image-ref-point %rectanglePoint; #IMPLIED> +<!ATTLIST style:properties draw:tile-repeat-offset CDATA #IMPLIED> +<!ATTLIST style:properties draw:transparency %percentage; #IMPLIED> +<!ATTLIST style:properties draw:transparency-name %styleName; #IMPLIED> + +<!-- graphic attributes --> +<!ATTLIST style:properties draw:color-mode (greyscale|mono|watermark|standard) #IMPLIED> +<!ATTLIST style:properties draw:luminance %percentage; #IMPLIED> +<!ATTLIST style:properties draw:contrast %percentage; #IMPLIED> +<!ATTLIST style:properties draw:gamma %percentage; #IMPLIED> +<!ATTLIST style:properties draw:red %percentage; #IMPLIED> +<!ATTLIST style:properties draw:green %percentage; #IMPLIED> +<!ATTLIST style:properties draw:blue %percentage; #IMPLIED> +<!ATTLIST style:properties draw:color-inversion %boolean; #IMPLIED> +<!ATTLIST style:properties draw:mirror %boolean; #IMPLIED> + +<!-- shadow attributes --> +<!ATTLIST style:properties draw:shadow (visible|hidden) #IMPLIED> +<!ATTLIST style:properties draw:shadow-offset-x %length; #IMPLIED> +<!ATTLIST style:properties draw:shadow-offset-y %length; #IMPLIED> +<!ATTLIST style:properties draw:shadow-color %color; #IMPLIED> +<!ATTLIST style:properties draw:shadow-transparency CDATA #IMPLIED> + +<!-- connector attributes --> +<!ATTLIST style:properties draw:start-line-spacing-horizontal %distance; #IMPLIED> +<!ATTLIST style:properties draw:start-line-spacing-vertical %distance; #IMPLIED> +<!ATTLIST style:properties draw:end-line-spacing-horizontal %distance; #IMPLIED> +<!ATTLIST style:properties draw:end-line-spacing-vertical %distance; #IMPLIED> + +<!-- measure attributes --> +<!ATTLIST style:properties draw:line-distance %distance; #IMPLIED> +<!ATTLIST style:properties draw:guide-overhang %distance; #IMPLIED> +<!ATTLIST style:properties draw:guide-distance %distance; #IMPLIED> +<!ATTLIST style:properties draw:start-guide %distance; #IMPLIED> +<!ATTLIST style:properties draw:end-guide %distance; #IMPLIED> +<!ATTLIST style:properties draw:measure-align (automatic|left-outside|inside|right-outside) #IMPLIED> +<!ATTLIST style:properties draw:measure-vertical-align (automatic|above|below|center) #IMPLIED> +<!ATTLIST style:properties draw:unit (automatic|mm|cm|m|km|pt|pc|inch|ft|mi) #IMPLIED> +<!ATTLIST style:properties draw:show-unit %boolean; #IMPLIED> +<!ATTLIST style:properties draw:placing (below|above) #IMPLIED> +<!ATTLIST style:properties draw:parallel %boolean; #IMPLIED> + +<!-- frame attributes --> +<!ATTLIST style:properties draw:frame-display-scrollbar %boolean; #IMPLIED> +<!ATTLIST style:properties draw:frame-display-border %boolean; #IMPLIED> +<!ATTLIST style:properties draw:frame-margin-horizontal %nonNegativePixelLength; #IMPLIED> +<!ATTLIST style:properties draw:frame-margin-vertical %nonNegativePixelLength; #IMPLIED> +<!ATTLIST style:properties draw:size-protect %boolean; #IMPLIED> +<!ATTLIST style:properties draw:move-protect %boolean; #IMPLIED> + +<!-- ole object attributes --> +<!ATTLIST style:properties draw:visible-area-left %nonNegativeLength; #IMPLIED> +<!ATTLIST style:properties draw:visible-area-top %nonNegativeLength; #IMPLIED> +<!ATTLIST style:properties draw:visible-area-width %positiveLength; #IMPLIED> +<!ATTLIST style:properties draw:visible-area-height %positiveLength; #IMPLIED> + +<!-- fontwork attributes --> +<!ATTLIST style:properties draw:fontwork-style (rotate|upright|slant-x|slant-y|none) #IMPLIED> +<!ATTLIST style:properties draw:fontwork-adjust (left|right|autosize|center) #IMPLIED> +<!ATTLIST style:properties draw:fontwork-distance %distance; #IMPLIED> +<!ATTLIST style:properties draw:fontwork-start %distance; #IMPLIED> +<!ATTLIST style:properties draw:fontwork-mirror %boolean; #IMPLIED> +<!ATTLIST style:properties draw:fontwork-outline %boolean; #IMPLIED> +<!ATTLIST style:properties draw:fontwork-shadow (normal|slant|none) #IMPLIED> +<!ATTLIST style:properties draw:fontwork-shadow-color %color; #IMPLIED> +<!ATTLIST style:properties draw:fontwork-shadow-offset-x %distance; #IMPLIED> +<!ATTLIST style:properties draw:fontwork-shadow-offset-y %distance; #IMPLIED> +<!ATTLIST style:properties draw:fontwork-form (none|top-circle|bottom-circle|left-circle|right-circle|top-arc|bottom-arc|left-arc|right-arc|button1|button2|button3|button4) #IMPLIED> +<!ATTLIST style:properties draw:fontwork-hide-form %boolean; #IMPLIED> +<!ATTLIST style:properties draw:fontwork-shadow-transparence %percentage; #IMPLIED> + +<!-- caption attributes --> +<!ATTLIST style:properties draw:caption-type (straight-line|angled-line|angled-connector-line) #IMPLIED> +<!ATTLIST style:properties draw:caption-angle-type (fixed|free) #IMPLIED> +<!ATTLIST style:properties draw:caption-angle %nonNegativeInteger; #IMPLIED> +<!ATTLIST style:properties draw:caption-gap %distance; #IMPLIED> +<!ATTLIST style:properties draw:caption-escape-direction (horizontal|vertical|auto) #IMPLIED> +<!ATTLIST style:properties draw:caption-escape %lengthOrPercentage; #IMPLIED> +<!ATTLIST style:properties draw:caption-line-length %distance; #IMPLIED> +<!ATTLIST style:properties draw:caption-fit-line-length %boolean; #IMPLIED> + +<!-- Animations --> +<!ELEMENT presentation:sound EMPTY> +<!ATTLIST presentation:sound xlink:href %uriReference; #REQUIRED> +<!ATTLIST presentation:sound xlink:type (simple) #FIXED "simple"> +<!ATTLIST presentation:sound xlink:show (new|replace) #IMPLIED> +<!ATTLIST presentation:sound xlink:actuate (onRequest) "onRequest"> +<!ATTLIST presentation:sound presentation:play-full %boolean; #IMPLIED> + +<!ELEMENT presentation:show-shape (presentation:sound)?> +<!ATTLIST presentation:show-shape draw:shape-id CDATA #REQUIRED> +<!ATTLIST presentation:show-shape presentation:effect %presentationEffects; "none"> +<!ATTLIST presentation:show-shape presentation:direction %presentationEffectDirections; "none"> +<!ATTLIST presentation:show-shape presentation:speed %presentationSpeeds; "medium"> +<!ATTLIST presentation:show-shape presentation:start-scale %percentage; "100%"> +<!ATTLIST presentation:show-shape presentation:path-id CDATA #IMPLIED > + +<!ELEMENT presentation:show-text (presentation:sound)?> +<!ATTLIST presentation:show-text draw:shape-id CDATA #REQUIRED> +<!ATTLIST presentation:show-text presentation:effect %presentationEffects; "none"> +<!ATTLIST presentation:show-text presentation:direction %presentationEffectDirections; "none"> +<!ATTLIST presentation:show-text presentation:speed %presentationSpeeds; "medium"> +<!ATTLIST presentation:show-text presentation:start-scale %percentage; "100%"> +<!ATTLIST presentation:show-text presentation:path-id CDATA #IMPLIED > + +<!ELEMENT presentation:hide-shape (presentation:sound)?> +<!ATTLIST presentation:hide-shape draw:shape-id CDATA #REQUIRED> +<!ATTLIST presentation:hide-shape presentation:effect %presentationEffects; "none"> +<!ATTLIST presentation:hide-shape presentation:direction %presentationEffectDirections; "none"> +<!ATTLIST presentation:hide-shape presentation:speed %presentationSpeeds; "medium"> +<!ATTLIST presentation:hide-shape presentation:start-scale %percentage; "100%"> +<!ATTLIST presentation:hide-shape presentation:path-id CDATA #IMPLIED > + +<!ELEMENT presentation:hide-text (presentation:sound)?> +<!ATTLIST presentation:hide-text draw:shape-id CDATA #REQUIRED> +<!ATTLIST presentation:hide-text presentation:effect %presentationEffects; "none"> +<!ATTLIST presentation:hide-text presentation:direction %presentationEffectDirections; "none"> +<!ATTLIST presentation:hide-text presentation:speed %presentationSpeeds; "medium"> +<!ATTLIST presentation:hide-text presentation:start-scale %percentage; "100%"> +<!ATTLIST presentation:hide-text presentation:path-id CDATA #IMPLIED > + +<!ELEMENT presentation:dim (presentation:sound)?> +<!ATTLIST presentation:dim draw:shape-id CDATA #REQUIRED> +<!ATTLIST presentation:dim draw:color %color; #REQUIRED> + +<!ELEMENT presentation:play EMPTY> +<!ATTLIST presentation:play draw:shape-id CDATA #REQUIRED> +<!ATTLIST presentation:play presentation:speed %presentationSpeeds; "medium"> + +<!ELEMENT presentation:animations (presentation:show-shape|presentation:show-text|presentation:hide-shape|presentation:hide-text|presentation:dim|presentation:play)*> + +<!ELEMENT presentation:show EMPTY> +<!ATTLIST presentation:show presentation:name %styleName; #REQUIRED> +<!ATTLIST presentation:show presentation:pages CDATA #REQUIRED> + +<!ELEMENT presentation:settings (presentation:show)*> +<!ATTLIST presentation:settings presentation:start-page %styleName; #IMPLIED> +<!ATTLIST presentation:settings presentation:show %styleName; #IMPLIED> +<!ATTLIST presentation:settings presentation:full-screen %boolean; "true"> +<!ATTLIST presentation:settings presentation:endless %boolean; "false"> +<!ATTLIST presentation:settings presentation:pause %timeDuration; #IMPLIED> +<!ATTLIST presentation:settings presentation:show-logo %boolean; "false"> +<!ATTLIST presentation:settings presentation:force-manual %boolean; "false"> +<!ATTLIST presentation:settings presentation:mouse-visible %boolean; "true"> +<!ATTLIST presentation:settings presentation:mouse-as-pen %boolean; "false"> +<!ATTLIST presentation:settings presentation:start-with-navigator %boolean; "false"> +<!ATTLIST presentation:settings presentation:animations (enabled|disabled) "enabled"> +<!ATTLIST presentation:settings presentation:stay-on-top %boolean; "false"> +<!ATTLIST presentation:settings presentation:transition-on-click (enabled|disabled) "enabled"> + +<!-- Drawing page --> +<!ELEMENT draw:page (office:forms?,(%shapes;)*,presentation:animations?,presentation:notes?)> +<!ATTLIST draw:page draw:name %string; #IMPLIED> +<!ATTLIST draw:page draw:style-name %styleName; #IMPLIED> +<!ATTLIST draw:page draw:master-page-name %styleName; #REQUIRED> +<!ATTLIST draw:page presentation:presentation-page-layout-name %styleName; #IMPLIED> +<!ATTLIST draw:page draw:id %nonNegativeInteger; #IMPLIED> +<!ATTLIST draw:page xlink:href %uriReference; #IMPLIED> +<!ATTLIST draw:page xlink:type (simple) #IMPLIED> +<!ATTLIST draw:page xlink:show (replace) #IMPLIED> +<!ATTLIST draw:page xlink:actuate (onRequest) #IMPLIED> + +<!-- Presentation notes --> +<!ELEMENT presentation:notes (%shapes;)*> + + +<!-- presentation page layouts --> +<!ELEMENT style:presentation-page-layout (presentation:placeholder)* > +<!ATTLIST style:presentation-page-layout style:name %styleName; #REQUIRED> +<!ELEMENT presentation:placeholder EMPTY > +<!ATTLIST presentation:placeholder presentation:object (title|outline|subtitle|text|graphic|object|chart|orgchart|page|notes|handout) #REQUIRED> +<!ATTLIST presentation:placeholder svg:x %coordinateOrPercentage; #REQUIRED> +<!ATTLIST presentation:placeholder svg:y %coordinateOrPercentage; #REQUIRED> +<!ATTLIST presentation:placeholder svg:width %lengthOrPercentage; #REQUIRED> +<!ATTLIST presentation:placeholder svg:height %lengthOrPercentage; #REQUIRED> + +<!-- presentation page attributes --> +<!ATTLIST style:properties presentation:transition-type (manual|automatic|semi-automatic) #IMPLIED > +<!ATTLIST style:properties presentation:transition-style (none|fade-from-left|fade-from-top|fade-from-right|fade-from-bottom|fade-to-center|fade-from-center|move-from-left|move-from-top|move-from-right|move-from-bottom|roll-from-top|roll-from-left|roll-from-right|roll-from-bottom|vertical-stripes|horizontal-stripes|clockwise|counterclockwise|fade-from-upperleft|fade-from-upperright|fade-from-lowerleft|fade-from-lowerright|close-vertical|close-horizontal|open-vertical|open-horizontal|spiralin-left|spiralin-right|spiralout-left|spiralout-right|dissolve|wavyline-from-left|wavyline-from-top|wavyline-from-right|wavyline-from-bottom|random|stretch-from-left|stretch-from-top|stretch-from-right|stretch-from-bottom|vertical-lines|horizontal-lines) #IMPLIED > +<!ATTLIST style:properties presentation:transition-speed %presentationSpeeds; #IMPLIED > +<!ATTLIST style:properties presentation:duration %timeDuration; #IMPLIED> +<!ATTLIST style:properties presentation:visibility (visible|hidden) #IMPLIED> +<!ATTLIST style:properties draw:background-size (full|border) #IMPLIED> +<!ATTLIST style:properties presentation:background-objects-visible %boolean; #IMPLIED> +<!ATTLIST style:properties presentation:background-visible %boolean; #IMPLIED> + + +<!-- text boxes --> +<!ELEMENT draw:text-box (office:events?,draw:image-map?, + %sectionText;)> +<!ATTLIST draw:text-box %draw-style-name;> +<!ATTLIST draw:text-box %draw-transform; > +<!ATTLIST draw:text-box draw:name %string; #IMPLIED> +<!ATTLIST draw:text-box draw:chain-next-name %string; #IMPLIED> + +<!ATTLIST draw:text-box %text-anchor;> +<!ATTLIST draw:text-box %draw-position;> +<!ATTLIST draw:text-box %draw-end-position; > +<!ATTLIST draw:text-box %table-background; > +<!ATTLIST draw:text-box svg:width %lengthOrPercentage; #IMPLIED> +<!ATTLIST draw:text-box svg:height %lengthOrPercentage; #IMPLIED> +<!ATTLIST draw:text-box style:rel-width %percentage; #IMPLIED> +<!ATTLIST draw:text-box style:rel-height %percentage; #IMPLIED> +<!ATTLIST draw:text-box fo:min-height %lengthOrPercentage; #IMPLIED> +<!ATTLIST draw:text-box %zindex;> +<!ATTLIST draw:text-box %presentation-class; > +<!ATTLIST draw:text-box %draw-transform; > +<!ATTLIST draw:text-box draw:id %draw-shape-id;> +<!ATTLIST draw:text-box draw:layer %layerName; #IMPLIED> +<!ATTLIST draw:text-box draw:corner-radius %nonNegativeLength; #IMPLIED> + +<!-- image --> +<!ELEMENT draw:image (office:binary-data?,office:events?,draw:image-map?,svg:desc?,(draw:contour-polygon|draw:contour-path)?)> +<!ATTLIST draw:image %draw-style-name;> +<!ATTLIST draw:image draw:name %string; #IMPLIED> +<!ATTLIST draw:image xlink:href %uriReference; #IMPLIED> +<!ATTLIST draw:image xlink:type (simple) #IMPLIED> +<!ATTLIST draw:image xlink:show (embed) #IMPLIED> +<!ATTLIST draw:image xlink:actuate (onLoad) #IMPLIED> +<!ATTLIST draw:image draw:filter-name %string; #IMPLIED> +<!ATTLIST draw:image %text-anchor;> +<!ATTLIST draw:image %draw-position;> +<!ATTLIST draw:image %draw-end-position; > +<!ATTLIST draw:image %table-background; > +<!ATTLIST draw:image svg:width %lengthOrPercentage; #IMPLIED> +<!ATTLIST draw:image svg:height %lengthOrPercentage; #IMPLIED> +<!ATTLIST draw:image %presentation-class; > +<!ATTLIST draw:image %zindex;> +<!ATTLIST draw:image draw:id %draw-shape-id;> +<!ATTLIST draw:image draw:layer %layerName; #IMPLIED> +<!ATTLIST draw:image style:rel-width %percentage; #IMPLIED> +<!ATTLIST draw:image style:rel-height %percentage; #IMPLIED> + +<!-- objects --> +<!ELEMENT draw:thumbnail EMPTY> +<!ATTLIST draw:thumbnail xlink:href %uriReference; #REQUIRED> +<!ATTLIST draw:thumbnail xlink:type (simple) #IMPLIED> +<!ATTLIST draw:thumbnail xlink:show (embed) #IMPLIED> +<!ATTLIST draw:thumbnail xlink:actuate (onLoad) #IMPLIED> + +<!ELEMENT math:math ANY> <!-- dummy (we have no MathML DTD currently)--> +<!ELEMENT draw:object (draw:thumbnail?,(office:document|math:math)?,office:events?, draw:image-map?, svg:desc?,(draw:contour-polygon|draw:contour-path)?)> +<!ATTLIST draw:object %draw-style-name;> +<!ATTLIST draw:object draw:name %string; #IMPLIED> +<!ATTLIST draw:object xlink:href %uriReference; #IMPLIED> +<!ATTLIST draw:object xlink:type (simple) #IMPLIED> +<!ATTLIST draw:object xlink:show (embed) #IMPLIED> +<!ATTLIST draw:object xlink:actuate (onLoad) #IMPLIED> +<!ATTLIST draw:object %text-anchor;> +<!ATTLIST draw:object %draw-position;> +<!ATTLIST draw:object %draw-end-position; > +<!ATTLIST draw:object %table-background; > +<!ATTLIST draw:object svg:width %lengthOrPercentage; #IMPLIED> +<!ATTLIST draw:object svg:height %lengthOrPercentage; #IMPLIED> +<!ATTLIST draw:object %presentation-class; > +<!ATTLIST draw:object %zindex;> +<!ATTLIST draw:object draw:id %draw-shape-id;> +<!ATTLIST draw:object draw:layer %layerName; #IMPLIED> +<!ATTLIST draw:object draw:notify-on-update-of-ranges %string; #IMPLIED> +<!ATTLIST draw:object style:rel-width %percentage; #IMPLIED> +<!ATTLIST draw:object style:rel-height %percentage; #IMPLIED> + +<!ELEMENT draw:object-ole (office:binary-data?|office:events?|draw:image-map?|svg:desc?|draw:contour-polygon?|draw:contour-path?|draw:thumbnail?)> +<!ATTLIST draw:object-ole draw:class-id CDATA #IMPLIED> +<!ATTLIST draw:object-ole %draw-style-name;> +<!ATTLIST draw:object-ole draw:name %string; #IMPLIED> +<!ATTLIST draw:object-ole xlink:href %uriReference; #IMPLIED> +<!ATTLIST draw:object-ole xlink:type (simple) #IMPLIED> +<!ATTLIST draw:object-ole xlink:show (embed) #IMPLIED> +<!ATTLIST draw:object-ole xlink:actuate (onLoad) #IMPLIED> +<!ATTLIST draw:object-ole %text-anchor;> +<!ATTLIST draw:object-ole %draw-position;> +<!ATTLIST draw:object-ole %draw-end-position; > +<!ATTLIST draw:object-ole %table-background; > +<!ATTLIST draw:object-ole svg:width %lengthOrPercentage; #IMPLIED> +<!ATTLIST draw:object-ole svg:height %lengthOrPercentage; #IMPLIED> +<!ATTLIST draw:object-ole %presentation-class; > +<!ATTLIST draw:object-ole %zindex;> +<!ATTLIST draw:object-ole draw:id %draw-shape-id;> +<!ATTLIST draw:object-ole draw:layer %layerName; #IMPLIED> +<!ATTLIST draw:object-ole style:rel-width %percentage; #IMPLIED> +<!ATTLIST draw:object-ole style:rel-height %percentage; #IMPLIED> + +<!ELEMENT svg:desc (#PCDATA)> + +<!ELEMENT draw:contour-polygon EMPTY> +<!ATTLIST draw:contour-polygon svg:width %coordinate; #REQUIRED> +<!ATTLIST draw:contour-polygon svg:height %coordinate; #REQUIRED> +<!ATTLIST draw:contour-polygon %draw-viewbox;> +<!ATTLIST draw:contour-polygon draw:points %points; #REQUIRED> +<!ATTLIST draw:contour-polygon draw:recreate-on-edit %boolean; #IMPLIED> + +<!ELEMENT draw:contour-path EMPTY> +<!ATTLIST draw:contour-path svg:width %coordinate; #REQUIRED> +<!ATTLIST draw:contour-path svg:height %coordinate; #REQUIRED> +<!ATTLIST draw:contour-path %draw-viewbox;> +<!ATTLIST draw:contour-path svg:d %pathData; #REQUIRED> +<!ATTLIST draw:contour-path draw:recreate-on-edit %boolean; #IMPLIED> + +<!-- hyperlink --> +<!ELEMENT draw:a (draw:image|draw:text-box)> +<!ATTLIST draw:a xlink:href %uriReference; #REQUIRED> +<!ATTLIST draw:a xlink:type (simple) #FIXED "simple"> +<!ATTLIST draw:a xlink:show (new|replace) #IMPLIED> +<!ATTLIST draw:a xlink:actuate (onRequest) "onRequest"> +<!ATTLIST draw:a office:name %string; #IMPLIED> +<!ATTLIST draw:a office:target-frame-name %string; #IMPLIED> +<!ATTLIST draw:a office:server-map %boolean; "false"> + +<!-- 3d properties --> +<!ATTLIST style:properties dr3d:horizontal-segments %nonNegativeInteger; #IMPLIED> +<!ATTLIST style:properties dr3d:vertical-segments %nonNegativeInteger; #IMPLIED> +<!ATTLIST style:properties dr3d:edge-rounding %percentage; #IMPLIED> +<!ATTLIST style:properties dr3d:edge-rounding-mode (correct|attractive) #IMPLIED> +<!ATTLIST style:properties dr3d:back-scale %percentage; #IMPLIED> +<!ATTLIST style:properties dr3d:end-angle %nonNegativeInteger; #IMPLIED> +<!ATTLIST style:properties dr3d:depth %length; #IMPLIED> +<!ATTLIST style:properties dr3d:backface-culling (enabled|disabled) #IMPLIED> +<!ATTLIST style:properties dr3d:lighting-mode (standard|double-sided) #IMPLIED> +<!ATTLIST style:properties dr3d:normals-kind (object|flat|sphere) #IMPLIED> +<!ATTLIST style:properties dr3d:normals-direction (normal|inverse) #IMPLIED> +<!ATTLIST style:properties dr3d:texture-generation-mode-x (object|parallel|sphere) #IMPLIED> +<!ATTLIST style:properties dr3d:texture-generation-mode-y (object|parallel|sphere) #IMPLIED> +<!ATTLIST style:properties dr3d:texture-kind (luminance|intesity|color) #IMPLIED> +<!ATTLIST style:properties dr3d:texture-filter (enabled|disabled) #IMPLIED> +<!ATTLIST style:properties dr3d:texture-mode (replace|modulate|blend) #IMPLIED> +<!ATTLIST style:properties dr3d:ambient-color %color; #IMPLIED> +<!ATTLIST style:properties dr3d:emissive-color %color; #IMPLIED> +<!ATTLIST style:properties dr3d:specular-color %color; #IMPLIED> +<!ATTLIST style:properties dr3d:diffuse-color %color; #IMPLIED> +<!ATTLIST style:properties dr3d:shininess %percentage; #IMPLIED> +<!ATTLIST style:properties dr3d:shadow (visible|hidden) #IMPLIED> + +<!ELEMENT dr3d:light EMPTY> +<!ATTLIST dr3d:light dr3d:diffuse-color %color; #IMPLIED> +<!ATTLIST dr3d:light dr3d:direction %vector3D; #REQUIRED> +<!ATTLIST dr3d:light dr3d:enabled %boolean; #IMPLIED> +<!ATTLIST dr3d:light dr3d:specular %boolean; #IMPLIED> + +<!ENTITY % shapes3d "(dr3d:scene|dr3d:extrude|dr3d:sphere|dr3d:rotate|dr3d:cube)"> + +<!ELEMENT dr3d:cube EMPTY> +<!ATTLIST dr3d:cube dr3d:transform CDATA #IMPLIED> +<!ATTLIST dr3d:cube dr3d:min-edge %vector3D; #IMPLIED> +<!ATTLIST dr3d:cube dr3d:max-edge %vector3D; #IMPLIED> +<!ATTLIST dr3d:cube %zindex;> +<!ATTLIST dr3d:cube draw:id %draw-shape-id;> +<!ATTLIST dr3d:cube %draw-end-position; > +<!ATTLIST dr3d:cube %table-background; > +<!ATTLIST dr3d:cube %draw-style-name; > +<!ATTLIST dr3d:cube draw:layer %layerName; #IMPLIED> + +<!ELEMENT dr3d:sphere EMPTY> +<!ATTLIST dr3d:sphere dr3d:transform CDATA #IMPLIED> +<!ATTLIST dr3d:sphere dr3d:center %vector3D; #IMPLIED> +<!ATTLIST dr3d:sphere dr3d:size %vector3D; #IMPLIED> +<!ATTLIST dr3d:sphere %zindex;> +<!ATTLIST dr3d:sphere draw:id %draw-shape-id;> +<!ATTLIST dr3d:sphere %draw-end-position; > +<!ATTLIST dr3d:sphere %table-background; > +<!ATTLIST dr3d:sphere %draw-style-name; > +<!ATTLIST dr3d:sphere draw:layer %layerName; #IMPLIED> + +<!ELEMENT dr3d:extrude EMPTY> +<!ATTLIST dr3d:extrude dr3d:transform CDATA #IMPLIED> +<!ATTLIST dr3d:extrude %draw-viewbox;> +<!ATTLIST dr3d:extrude svg:d %pathData; #REQUIRED > +<!ATTLIST dr3d:extrude %zindex;> +<!ATTLIST dr3d:extrude draw:id %draw-shape-id;> +<!ATTLIST dr3d:extrude %draw-end-position; > +<!ATTLIST dr3d:extrude %table-background; > +<!ATTLIST dr3d:extrude %draw-style-name; > +<!ATTLIST dr3d:extrude draw:layer %layerName; #IMPLIED> + +<!ELEMENT dr3d:rotate EMPTY> +<!ATTLIST dr3d:rotate dr3d:transform CDATA #IMPLIED> +<!ATTLIST dr3d:rotate %draw-viewbox;> +<!ATTLIST dr3d:rotate svg:d %pathData; #REQUIRED > +<!ATTLIST dr3d:rotate %zindex;> +<!ATTLIST dr3d:rotate draw:id %draw-shape-id;> +<!ATTLIST dr3d:rotate %draw-end-position; > +<!ATTLIST dr3d:rotate %table-background; > +<!ATTLIST dr3d:rotate %draw-style-name; > +<!ATTLIST dr3d:rotate draw:layer %layerName; #IMPLIED> + +<!ELEMENT dr3d:scene (dr3d:light*,(%shapes3d;)*)> +<!ATTLIST dr3d:scene %draw-style-name; > +<!ATTLIST dr3d:scene svg:x %coordinate; #IMPLIED> +<!ATTLIST dr3d:scene svg:y %coordinate; #IMPLIED> +<!ATTLIST dr3d:scene svg:width %length; #IMPLIED> +<!ATTLIST dr3d:scene svg:height %length; #IMPLIED> +<!ATTLIST dr3d:scene dr3d:vrp %vector3D; #IMPLIED> +<!ATTLIST dr3d:scene dr3d:vpn %vector3D; #IMPLIED> +<!ATTLIST dr3d:scene dr3d:vup %vector3D; #IMPLIED> +<!ATTLIST dr3d:scene dr3d:projection (parallel|perspective) #IMPLIED> +<!ATTLIST dr3d:scene dr3d:transform CDATA #IMPLIED> +<!ATTLIST dr3d:scene dr3d:distance %length; #IMPLIED> +<!ATTLIST dr3d:scene dr3d:focal-length %length; #IMPLIED> +<!ATTLIST dr3d:scene dr3d:shadow-slant %nonNegativeInteger; #IMPLIED> +<!ATTLIST dr3d:scene dr3d:shade-mode (flat|phong|gouraud|draft) #IMPLIED> +<!ATTLIST dr3d:scene dr3d:ambient-color %color; #IMPLIED> +<!ATTLIST dr3d:scene dr3d:lighting-mode %boolean; #IMPLIED> +<!ATTLIST dr3d:scene %zindex;> +<!ATTLIST dr3d:scene draw:id %draw-shape-id;> +<!ATTLIST dr3d:scene %draw-end-position; > +<!ATTLIST dr3d:scene %table-background; > + +<!-- layer --> + +<!ELEMENT draw:layer-set (draw:layer*)> + +<!ELEMENT draw:layer EMPTY> +<!ATTLIST draw:layer draw:name %layerName; #REQUIRED> + +<!-- events --> +<!ELEMENT presentation:event (presentation:sound)?> +<!ATTLIST presentation:event %event-name;> +<!ATTLIST presentation:event presentation:action (none|previous-page|next-page|first-page|last-page|hide|stop|execute|show|verb|fade-out|sound) #REQUIRED> +<!ATTLIST presentation:event presentation:effect %presentationEffects; "none"> +<!ATTLIST presentation:event presentation:direction %presentationEffectDirections; "none"> +<!ATTLIST presentation:event presentation:speed %presentationSpeeds; "medium"> +<!ATTLIST presentation:event presentation:start-scale %percentage; "100%"> +<!ATTLIST presentation:event xlink:href %uriReference; #IMPLIED> +<!ATTLIST presentation:event xlink:type (simple) #IMPLIED> +<!ATTLIST presentation:event xlink:show (embed) #IMPLIED> +<!ATTLIST presentation:event xlink:actuate (onRequest) #IMPLIED> +<!ATTLIST presentation:event presentation:verb %nonNegativeInteger; #IMPLIED> + +<!-- applets --> +<!ELEMENT draw:applet (draw:thumbnail?, draw:param*, svg:desc?)> +<!ATTLIST draw:applet xlink:href %uriReference; #IMPLIED> +<!ATTLIST draw:applet xlink:type (simple) #IMPLIED> +<!ATTLIST draw:applet xlink:show (embed) #IMPLIED> +<!ATTLIST draw:applet xlink:actuate (onLoad) #IMPLIED> +<!ATTLIST draw:applet draw:code CDATA #REQUIRED> +<!ATTLIST draw:applet draw:object CDATA #IMPLIED> +<!ATTLIST draw:applet draw:archive CDATA #IMPLIED> +<!ATTLIST draw:applet draw:may-script %boolean; "false"> +<!ATTLIST draw:applet draw:name CDATA #IMPLIED> +<!ATTLIST draw:applet %draw-style-name;> +<!ATTLIST draw:applet svg:width %lengthOrPercentage; #IMPLIED> +<!ATTLIST draw:applet svg:height %lengthOrPercentage; #IMPLIED> +<!ATTLIST draw:applet %zindex;> +<!ATTLIST draw:applet draw:layer %layerName; #IMPLIED> +<!ATTLIST draw:applet %draw-position;> +<!ATTLIST draw:applet %draw-end-position; > + +<!-- plugins --> +<!ELEMENT draw:plugin (draw:thumbnail?, draw:param*, svg:desc?)> +<!ATTLIST draw:plugin xlink:href %uriReference; #IMPLIED> +<!ATTLIST draw:plugin xlink:type (simple) #IMPLIED> +<!ATTLIST draw:plugin xlink:show (embed) #IMPLIED> +<!ATTLIST draw:plugin xlink:actuate (onLoad) #IMPLIED> +<!ATTLIST draw:plugin draw:mime-type CDATA #IMPLIED> +<!ATTLIST draw:plugin draw:name CDATA #IMPLIED> +<!ATTLIST draw:plugin %draw-style-name;> +<!ATTLIST draw:plugin svg:width %lengthOrPercentage; #IMPLIED> +<!ATTLIST draw:plugin svg:height %lengthOrPercentage; #IMPLIED> +<!ATTLIST draw:plugin %zindex;> +<!ATTLIST draw:plugin draw:layer %layerName; #IMPLIED> +<!ATTLIST draw:plugin %draw-position;> +<!ATTLIST draw:plugin %draw-end-position; > + +<!-- Paramaters --> +<!ELEMENT draw:param EMPTY> +<!ATTLIST draw:param draw:name CDATA #IMPLIED> +<!ATTLIST draw:param draw:value CDATA #IMPLIED> + +<!-- Floating Frames --> +<!ELEMENT draw:floating-frame (draw:thumbnail?, svg:desc?)> +<!ATTLIST draw:floating-frame xlink:href %uriReference; #IMPLIED> +<!ATTLIST draw:floating-frame xlink:type (simple) #IMPLIED> +<!ATTLIST draw:floating-frame xlink:show (embed) #IMPLIED> +<!ATTLIST draw:floating-frame xlink:actuate (onLoad) #IMPLIED> +<!ATTLIST draw:floating-frame draw:name CDATA #IMPLIED> +<!ATTLIST draw:floating-frame draw:frame-name CDATA #IMPLIED> +<!ATTLIST draw:floating-frame %draw-style-name;> +<!ATTLIST draw:floating-frame svg:width %lengthOrPercentage; #IMPLIED> +<!ATTLIST draw:floating-frame svg:height %lengthOrPercentage; #IMPLIED> +<!ATTLIST draw:floating-frame %zindex;> +<!ATTLIST draw:floating-frame draw:layer %layerName; #IMPLIED> +<!ATTLIST draw:floating-frame %draw-position;> +<!ATTLIST draw:floating-frame %draw-end-position; > + +<!-- Image Maps --> +<!ELEMENT draw:image-map + (draw:area-rectangle|draw:area-circle|draw:area-polygon)*> + +<!ELEMENT draw:area-rectangle (svg:desc?,office:events?)> +<!ATTLIST draw:area-rectangle xlink:href %uriReference; #IMPLIED> +<!ATTLIST draw:area-rectangle xlink:type (simple) #IMPLIED> +<!ATTLIST draw:area-rectangle office:target-frame-name CDATA #IMPLIED> +<!ATTLIST draw:area-rectangle xlink:show (new|replace) #IMPLIED> +<!ATTLIST draw:area-rectangle office:name CDATA #IMPLIED> +<!ATTLIST draw:area-rectangle draw:nohref (nohref) #IMPLIED> +<!ATTLIST draw:area-rectangle svg:x %coordinate; #REQUIRED> +<!ATTLIST draw:area-rectangle svg:y %coordinate; #REQUIRED> +<!ATTLIST draw:area-rectangle svg:width %coordinate; #REQUIRED> +<!ATTLIST draw:area-rectangle svg:height %coordinate; #REQUIRED> + +<!ELEMENT draw:area-circle (svg:desc?,office:events?)> +<!ATTLIST draw:area-circle xlink:href %uriReference; #IMPLIED> +<!ATTLIST draw:area-circle xlink:type (simple) #IMPLIED> +<!ATTLIST draw:area-circle office:target-frame-name CDATA #IMPLIED> +<!ATTLIST draw:area-circle xlink:show (new|replace) #IMPLIED> +<!ATTLIST draw:area-circle office:name CDATA #IMPLIED> +<!ATTLIST draw:area-circle draw:nohref (nohref) #IMPLIED> +<!ATTLIST draw:area-circle svg:cx %coordinate; #REQUIRED> +<!ATTLIST draw:area-circle svg:cy %coordinate; #REQUIRED> +<!ATTLIST draw:area-circle svg:r %coordinate; #REQUIRED> + +<!ELEMENT draw:area-polygon (svg:desc?,office:events?)> +<!ATTLIST draw:area-polygon xlink:href %uriReference; #IMPLIED> +<!ATTLIST draw:area-polygon xlink:type (simple) #IMPLIED> +<!ATTLIST draw:area-polygon office:target-frame-name CDATA #IMPLIED> +<!ATTLIST draw:area-polygon xlink:show (new|replace) #IMPLIED> +<!ATTLIST draw:area-polygon office:name CDATA #IMPLIED> +<!ATTLIST draw:area-polygon draw:nohref (nohref) #IMPLIED> +<!ATTLIST draw:area-polygon svg:x %coordinate; #REQUIRED> +<!ATTLIST draw:area-polygon svg:y %coordinate; #REQUIRED> +<!ATTLIST draw:area-polygon svg:width %coordinate; #REQUIRED> +<!ATTLIST draw:area-polygon svg:height %coordinate; #REQUIRED> +<!ATTLIST draw:area-polygon svg:points %points; #REQUIRED> +<!ATTLIST draw:area-polygon svg:viewBox CDATA #REQUIRED> diff --git a/chart2/workbench/fileformat/dtypes.mod b/chart2/workbench/fileformat/dtypes.mod new file mode 100644 index 000000000..4776a079b --- /dev/null +++ b/chart2/workbench/fileformat/dtypes.mod @@ -0,0 +1,171 @@ +<!-- + $Id: dtypes.mod,v 1.1.1.1 2003-10-06 09:58:35 bm Exp $ + + The Contents of this file are made available subject to the terms of + either of the following licenses + + - GNU Lesser General Public License Version 2.1 + - Sun Industry Standards Source License Version 1.1 + + Sun Microsystems Inc., October, 2000 + + GNU Lesser General Public License Version 2.1 + ============================================= + Copyright 2000 by Sun Microsystems, Inc. + 901 San Antonio Road, Palo Alto, CA 94303, USA + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License version 2.1, as published by the Free Software Foundation. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, + MA 02111-1307 USA + + + Sun Industry Standards Source License Version 1.1 + ================================================= + The contents of this file are subject to the Sun Industry Standards + Source License Version 1.1 (the "License"); You may not use this file + except in compliance with the License. You may obtain a copy of the + License at http://www.openoffice.org/license.html. + + Software provided under this License is provided on an "AS IS" basis, + WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, + WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + See the License for the specific provisions governing your rights and + obligations concerning the Software. + + The Initial Developer of the Original Code is: Sun Microsystems, Inc. + + Copyright: 2000 by Sun Microsystems, Inc. + + All Rights Reserved. + + Contributor(s): _______________________________________ + +--> + +<!-- datatypes corresponding to XML Schema Part 2 W3C Working draft of --> +<!-- 07 April 2000 --> + +<!-- string --> +<!ENTITY % string "CDATA"> +<!ENTITY % cString "#PCDATA"> + +<!-- boolean (values are "true" and "false" --> +<!ENTITY % boolean "CDATA"> + +<!-- integer ( ..., -2, -1, 0, 1, 2, ...) --> +<!ENTITY % integer "CDATA"> + +<!-- non negative integer ( 0, 1, 2, ...) --> +<!ENTITY % nonNegativeInteger "CDATA"> + +<!-- positive integer ( 1, 2, ...) --> +<!ENTITY % positiveInteger "CDATA"> +<!ENTITY % cPositiveInteger "#PCDATA"> + +<!ENTITY % positiveNumberOrDefault "CDATA"> + +<!-- time duration as specified by ISO8601, section 5.5.3.2 --> +<!ENTITY % timeDuration "CDATA"> +<!ENTITY % cTimeDuration "#PCDATA"> + +<!-- time instance as specified by ISO8601, section 5.4 --> +<!ENTITY % timeInstance "CDATA"> +<!ENTITY % cTimeInstance "#PCDATA"> + +<!-- date instance as specified by ISO8601, section 5.2.1.1, extended format--> +<!ENTITY % date "CDATA"> +<!ENTITY % cDate "#PCDATA"> + +<!-- date duration, like timDuration but truncated to full dates --> +<!ENTITY % dateDuration "CDATA"> +<!ENTITY % cDateDuration "#PCDATA"> + +<!-- URI reference --> +<!ENTITY % uriReference "CDATA"> + +<!-- language code as specified by RFC1766 --> +<!ENTITY % language "CDATA"> +<!ENTITY % cLanguage "#PCDATA"> + +<!-- float --> +<!ENTITY % float "CDATA"> + +<!-- Some other common used data types --> + +<!-- a single UNICODE character --> +<!ENTITY % character "CDATA"> + +<!-- a style name --> +<!ENTITY % styleName "CDATA"> + +<!-- a target frame mame --> +<!ENTITY % targetFrameName "CDATA"> + +<!-- a language without a country as specified by ISO639 --> +<!ENTITY % languageOnly "CDATA"> + +<!-- a country as specified by ISO3166 --> +<!ENTITY % country "CDATA"> + +<!-- a color value having the format #rrggbb --> +<!ENTITY % color "CDATA"> +<!-- a color value having the format #rrggbb or "transparent" --> +<!ENTITY % transparentOrColor "CDATA"> + +<!-- a percentage --> +<!ENTITY % percentage "CDATA"> + +<!-- a length (i.e. 1cm or .6inch) --> +<!ENTITY % length "CDATA"> +<!ENTITY % positiveLength "CDATA"> +<!ENTITY % nonNegativeLength "CDATA"> +<!ENTITY % lengthOrNoLimit "CDATA"> + +<!-- a length or a percentage --> +<!ENTITY % lengthOrPercentage "CDATA"> +<!ENTITY % positiveLengthOrPercentage "CDATA"> + +<!-- a pixel length (i.e. 2px) --> +<!ENTITY % nonNegativePixelLength "CDATA"> + +<!-- a float or a percentage --> +<!ENTITY % floatOrPercentage "CDATA"> + +<!-- a text encoding --> +<!ENTITY % textEncoding "CDATA"> + +<!-- cell address and cell range address --> +<!ENTITY % cell-address "CDATA"> +<!ENTITY % cell-range-address "CDATA"> +<!ENTITY % cell-range-address-list "CDATA"> + +<!-- value types --> +<!ENTITY % valueType "(float|time|date|percentage|currency|boolean|string)"> + +<!-- an svg coordinate in different distance formats --> +<!ENTITY % coordinate "CDATA"> + +<!ENTITY % coordinateOrPercentage "CDATA"> + +<!ENTITY % shape "draw:rect|draw:line|draw:polyline|draw:polygon|draw:path| + draw:circle|draw:ellipse|draw:g|draw:page-thumbnail| + draw:text-box|draw:image|draw:object|draw:object-ole| + draw:applet|draw:floating-frame|draw:plugin| + draw:measure|draw:caption|draw:connector| + dr3d:scene|draw:control" > +<!ENTITY % shapes "(%shape;)" > + +<!ENTITY % anchorType "(page|frame|paragraph|char|as-char)"> + +<!ENTITY % control-id "form:id CDATA #REQUIRED"> diff --git a/chart2/workbench/fileformat/form.mod b/chart2/workbench/fileformat/form.mod new file mode 100644 index 000000000..d66e23428 --- /dev/null +++ b/chart2/workbench/fileformat/form.mod @@ -0,0 +1,336 @@ +<!-- + $Id: form.mod,v 1.1.1.1 2003-10-06 09:58:35 bm Exp $ + + The Contents of this file are made available subject to the terms of + either of the following licenses + + - GNU Lesser General Public License Version 2.1 + - Sun Industry Standards Source License Version 1.1 + + Sun Microsystems Inc., October, 2000 + + GNU Lesser General Public License Version 2.1 + ============================================= + Copyright 2000 by Sun Microsystems, Inc. + 901 San Antonio Road, Palo Alto, CA 94303, USA + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License version 2.1, as published by the Free Software Foundation. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, + MA 02111-1307 USA + + + Sun Industry Standards Source License Version 1.1 + ================================================= + The contents of this file are subject to the Sun Industry Standards + Source License Version 1.1 (the "License"); You may not use this file + except in compliance with the License. You may obtain a copy of the + License at http://www.openoffice.org/license.html. + + Software provided under this License is provided on an "AS IS" basis, + WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, + WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + See the License for the specific provisions governing your rights and + obligations concerning the Software. + + The Initial Developer of the Original Code is: Sun Microsystems, Inc. + + Copyright: 2000 by Sun Microsystems, Inc. + + All Rights Reserved. + + Contributor(s): _______________________________________ + +--> + +<!ENTITY % controls "form:text|form:textarea|form:fixed-text|form:file| + form:password|form:formatted-text|form:button|form:image| + form:checkbox|form:radio|form:listbox|form:combobox|form:frame| + form:hidden|form:image-frame|form:grid|form:generic-control"> + +<!ENTITY % name "form:name CDATA #IMPLIED"> +<!ENTITY % service-name "form:service-name CDATA #IMPLIED"> + +<!ENTITY % navigation "(none|current|parent)"> +<!ENTITY % cycles "(records|current|page)"> +<!ENTITY % url "CDATA"> + + +<!ENTITY % types "(submit|reset|push|url)"> +<!ENTITY % button-type "form:button-type %types; 'push'"> +<!ENTITY % current-selected "form:current-selected %boolean; 'false'"> +<!ENTITY % current-value "form:current-value CDATA #IMPLIED"> +<!ENTITY % value "form:value CDATA #IMPLIED"> +<!ENTITY % disabled "form:disabled %boolean; 'false'"> +<!ENTITY % dropdown "form:dropdown %boolean; 'false'"> +<!ENTITY % for "form:for CDATA #IMPLIED"> +<!ENTITY % image-data "form:image-data %url; #IMPLIED"> +<!ENTITY % label "form:label CDATA #IMPLIED"> +<!ENTITY % max-length "form:max-length CDATA #IMPLIED"> +<!ENTITY % printable "form:printable %boolean; 'true'"> +<!ENTITY % readonly "form:readonly %boolean; 'false'"> +<!ENTITY % size "form:size CDATA #IMPLIED"> +<!ENTITY % selected "form:selected %boolean; 'false'"> +<!ENTITY % size "form:size CDATA #IMPLIED"> +<!ENTITY % tab-index "form:tab-index CDATA #IMPLIED"> +<!ENTITY % target-frame "office:target-frame CDATA '_blank'"> +<!ENTITY % target-location "xlink:href %url; #IMPLIED"> +<!ENTITY % tab-stop "form:tab-stop %boolean; 'true'"> +<!ENTITY % title "form:title CDATA #IMPLIED"> +<!ENTITY % default-value "form:default-value CDATA #IMPLIED"> +<!ENTITY % bound-column "form:bound-column CDATA #IMPLIED"> +<!ENTITY % convert-empty "form:convert-empty-to-null %boolean; 'false'"> +<!ENTITY % data-field "form:data-field CDATA #IMPLIED"> +<!ENTITY % list-source "form:list-source CDATA #IMPLIED"> +<!ENTITY % list-source-types "(table|query|sql|sql-pass-through|value-list|table-fields)"> +<!ENTITY % list-source-type "form:list-source-type %list-source-types; #IMPLIED"> + +<!ELEMENT form:control (%controls;)+> +<!ATTLIST form:control %name; + %service-name; + %control-id;> + +<!ELEMENT form:form (form:properties?, office:events?, (form:control|form:form)*)> +<!ATTLIST form:form %name; %service-name;> +<!ATTLIST form:form xlink:href %url; #IMPLIED> +<!ATTLIST form:form form:enctype CDATA "application/x-www-form-urlencoded"> +<!ATTLIST form:form form:method CDATA "get"> +<!ATTLIST form:form office:target-frame CDATA "_blank"> +<!ATTLIST form:form form:allow-deletes %boolean; "true"> +<!ATTLIST form:form form:allow-inserts %boolean; "true"> +<!ATTLIST form:form form:allow-updates %boolean; "true"> +<!ATTLIST form:form form:apply-filter %boolean; "false"> +<!ATTLIST form:form form:command CDATA #IMPLIED> +<!ATTLIST form:form form:command-type (table|query|command) "command"> +<!ATTLIST form:form form:datasource CDATA #IMPLIED> +<!ATTLIST form:form form:detail-fields CDATA #IMPLIED> +<!ATTLIST form:form form:escape-processing %boolean; "true"> +<!ATTLIST form:form form:filter CDATA #IMPLIED> +<!ATTLIST form:form form:ignore-result %boolean; "false"> +<!ATTLIST form:form form:master-fields CDATA #IMPLIED> +<!ATTLIST form:form form:navigation-mode %navigation; #IMPLIED> +<!ATTLIST form:form form:order CDATA #IMPLIED> +<!ATTLIST form:form form:tab-cycle %cycles; #IMPLIED> + +<!ELEMENT office:forms (form:form*)> +<!ATTLIST office:forms form:automatic-focus %boolean; "false"> +<!ATTLIST office:forms form:apply-design-mode %boolean; "true"> + +<!ELEMENT form:text (form:properties?, office:events?)> +<!ATTLIST form:text %current-value; + %disabled; + %max-length; + %printable; + %readonly; + %tab-index; + %tab-stop; + %title; + %value; + %convert-empty; + %data-field;> + +<!ELEMENT form:textarea (form:properties?, office:events?)> +<!ATTLIST form:textarea %current-value; + %disabled; + %max-length; + %printable; + %readonly; + %tab-index; + %tab-stop; + %title; + %value; + %convert-empty; + %data-field;> + +<!ELEMENT form:password (form:properties?, office:events?)> +<!ATTLIST form:password %disabled; + %max-length; + %printable; + %tab-index; + %tab-stop; + %title; + %value; + %convert-empty;> + +<!ATTLIST form:password form:echo-char CDATA "*"> + +<!ELEMENT form:file (form:properties?, office:events?)> +<!ATTLIST form:file %current-value; + %disabled; + %max-length; + %printable; + %readonly; + %tab-index; + %tab-stop; + %title; + %value;> + +<!ELEMENT form:formatted-text (form:properties?, office:events?)> +<!ATTLIST form:formatted-text %current-value; + %disabled; + %max-length; + %printable; + %readonly; + %tab-index; + %tab-stop; + %title; + %value; + %convert-empty; + %data-field;> +<!ATTLIST form:formatted-text form:max-value CDATA #IMPLIED> +<!ATTLIST form:formatted-text form:min-value CDATA #IMPLIED> +<!ATTLIST form:formatted-text form:validation %boolean; "false"> + +<!ELEMENT form:fixed-text (form:properties?, office:events?)> +<!ATTLIST form:fixed-text %for; + %disabled; + %label; + %printable; + %title;> +<!ATTLIST form:fixed-text form:multi-line %boolean; "false"> + +<!ELEMENT form:combobox (form:properties?, office:events?, form:item*)> +<!ATTLIST form:combobox %current-value; + %disabled; + %dropdown; + %max-length; + %printable; + %readonly; + %size; + %tab-index; + %tab-stop; + %title; + %value; + %convert-empty; + %data-field; + %list-source; + %list-source-type;> +<!ATTLIST form:combobox form:auto-complete %boolean; #IMPLIED> + +<!ELEMENT form:item (#PCDATA)> +<!ATTLIST form:item %label;> + +<!ELEMENT form:listbox (form:properties?, office:events?, form:option*)> +<!ATTLIST form:listbox %disabled; + %dropdown; + %printable; + %size; + %tab-index; + %tab-stop; + %title; + %bound-column; + %data-field; + %list-source; + %list-source-type;> +<!ATTLIST form:listbox form:multiple %boolean; "false"> + +<!ELEMENT form:option (#PCDATA)> +<!ATTLIST form:option %current-selected; + %selected; + %label; + %value;> + +<!ELEMENT form:button (form:properties?, office:events?)> +<!ATTLIST form:button %button-type; + %disabled; + %label; + %image-data; + %printable; + %tab-index; + %tab-stop; + %target-frame; + %target-location; + %title; + %value;> +<!ATTLIST form:button form:default-button %boolean; "false"> + +<!ELEMENT form:image (form:properties?, office:events?)> +<!ATTLIST form:image %button-type; + %disabled; + %image-data; + %printable; + %tab-index; + %tab-stop; + %target-frame; + %target-location; + %title; + %value;> + +<!ELEMENT form:checkbox (form:properties?, office:events?)> +<!ATTLIST form:checkbox %disabled; + %label; + %printable; + %tab-index; + %tab-stop; + %title; + %value; + %data-field;> +<!ENTITY % states "(unchecked|checked|unknown)"> +<!ATTLIST form:checkbox form:current-state %states; #IMPLIED> +<!ATTLIST form:checkbox form:is-tristate %boolean; "false"> +<!ATTLIST form:checkbox form:state %states; "unchecked"> + +<!ELEMENT form:radio (form:properties?, office:events?)> +<!ATTLIST form:radio %current-selected; + %disabled; + %label; + %printable; + %selected; + %tab-index; + %tab-stop; + %title; + %value; + %data-field;> + +<!ELEMENT form:frame (form:properties?, office:events?)> +<!ATTLIST form:frame %disabled; + %for; + %label; + %printable; + %title;> + +<!ELEMENT form:image-frame (form:properties?, office:events?)> +<!ATTLIST form:image-frame %disabled; + %image-data; + %printable; + %readonly; + %title; + %data-field;> + +<!ELEMENT form:hidden (form:properties?, office:events?)> +<!ATTLIST form:hidden %name; + %service-name; + %value;> + +<!ELEMENT form:grid (form:properties?, office:events?, form:column*)> +<!ATTLIST form:grid %disabled; + %printable; + %tab-index; + %tab-stop; + %title;> +<!ENTITY % column-type "form:text| form:textarea| form:formatted-text|form:checkbox| form:listbox| form:combobox"> +<!ELEMENT form:column (%column-type;)+> +<!ATTLIST form:column %name; + %service-name; + %label;> + +<!ELEMENT form:generic-control (form:properties?, office:events?)> + + +<!ELEMENT form:properties (form:property+)> +<!ELEMENT form:property (form:property-value*)> +<!ATTLIST form:property form:property-is-list %boolean; #IMPLIED> +<!ATTLIST form:property form:property-name CDATA #REQUIRED> +<!ATTLIST form:property form:property-type (boolean|short|int|long|double|string) #REQUIRED> +<!ELEMENT form:property-value (#PCDATA)> + diff --git a/chart2/workbench/fileformat/meta.mod b/chart2/workbench/fileformat/meta.mod new file mode 100644 index 000000000..dd620ae18 --- /dev/null +++ b/chart2/workbench/fileformat/meta.mod @@ -0,0 +1,118 @@ +<!-- + $Id: meta.mod,v 1.1.1.1 2003-10-06 09:58:35 bm Exp $ + + The Contents of this file are made available subject to the terms of + either of the following licenses + + - GNU Lesser General Public License Version 2.1 + - Sun Industry Standards Source License Version 1.1 + + Sun Microsystems Inc., October, 2000 + + GNU Lesser General Public License Version 2.1 + ============================================= + Copyright 2000 by Sun Microsystems, Inc. + 901 San Antonio Road, Palo Alto, CA 94303, USA + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License version 2.1, as published by the Free Software Foundation. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, + MA 02111-1307 USA + + + Sun Industry Standards Source License Version 1.1 + ================================================= + The contents of this file are subject to the Sun Industry Standards + Source License Version 1.1 (the "License"); You may not use this file + except in compliance with the License. You may obtain a copy of the + License at http://www.openoffice.org/license.html. + + Software provided under this License is provided on an "AS IS" basis, + WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, + WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + See the License for the specific provisions governing your rights and + obligations concerning the Software. + + The Initial Developer of the Original Code is: Sun Microsystems, Inc. + + Copyright: 2000 by Sun Microsystems, Inc. + + All Rights Reserved. + + Contributor(s): _______________________________________ + +--> + + +<!ELEMENT meta:generator (%cString;)> + +<!ELEMENT dc:title (%cString;)> + +<!ELEMENT dc:description (%cString;)> + +<!ELEMENT dc:subject (%cString;)> + +<!ELEMENT meta:keywords (meta:keyword)*> +<!ELEMENT meta:keyword (%cString;)> + +<!ELEMENT meta:initial-creator (%cString;)> + +<!ELEMENT dc:creator (%cString;)> + +<!ELEMENT meta:printed-by (%cString;)> + +<!ELEMENT meta:creation-date (%cTimeInstance;)> + +<!ELEMENT dc:date (%cTimeInstance;)> + +<!ELEMENT meta:print-date (%cTimeInstance;)> + +<!ELEMENT meta:template EMPTY> +<!ATTLIST meta:template xlink:type (simple) #FIXED "simple"> +<!ATTLIST meta:template xlink:actuate (onRequest) "onRequest"> +<!ATTLIST meta:template xlink:href %uriReference; #REQUIRED> +<!ATTLIST meta:template xlink:title %string; #IMPLIED> +<!ATTLIST meta:template meta:date %timeInstance; #IMPLIED> + +<!ELEMENT meta:auto-reload EMPTY> +<!ATTLIST meta:auto-reload xlink:type (simple) #IMPLIED> +<!ATTLIST meta:auto-reload xlink:show (replace) #IMPLIED> +<!ATTLIST meta:auto-reload xlink:actuate (onLoad) #IMPLIED> +<!ATTLIST meta:auto-reload xlink:href %uriReference; #IMPLIED> +<!ATTLIST meta:auto-reload meta:delay %timeDuration; "P0S"> + +<!ELEMENT meta:hyperlink-behaviour EMPTY> +<!ATTLIST meta:hyperlink-behaviour office:target-frame-name %targetFrameName; #IMPLIED> +<!ATTLIST meta:hyperlink-behaviour xlink:show (new|replace) #IMPLIED> + +<!ELEMENT dc:language (%cLanguage;)> + +<!ELEMENT meta:editing-cycles (%cPositiveInteger;)> + +<!ELEMENT meta:editing-duration (%cTimeDuration;)> + +<!ELEMENT meta:user-defined (%cString;)> +<!ATTLIST meta:user-defined meta:name %string; #REQUIRED> + +<!ELEMENT meta:document-statistic EMPTY> +<!ATTLIST meta:document-statistic meta:page-count %positiveInteger; #IMPLIED + meta:table-count %nonNegativeInteger; #IMPLIED + meta:draw-count %nonNegativeInteger; #IMPLIED + meta:image-count %nonNegativeInteger; #IMPLIED + meta:ole-object-count %nonNegativeInteger; #IMPLIED + meta:paragraph-count %nonNegativeInteger; #IMPLIED + meta:word-count %nonNegativeInteger; #IMPLIED + meta:character-count %nonNegativeInteger; #IMPLIED + meta:row-count %nonNegativeInteger; #IMPLIED + meta:cell-count %nonNegativeInteger; #IMPLIED + meta:object-count %positiveInteger; #IMPLIED> diff --git a/chart2/workbench/fileformat/newchart.xml_hints b/chart2/workbench/fileformat/newchart.xml_hints new file mode 100644 index 000000000..d964dca78 --- /dev/null +++ b/chart2/workbench/fileformat/newchart.xml_hints @@ -0,0 +1,77 @@ +/* +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE office:document-content PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "office.dtd"> + + <office:document-content xmlns:office="http://openoffice.org/2000/office" + xmlns:style="http://openoffice.org/2000/style" + xmlns:text="http://openoffice.org/2000/text" + xmlns:table="http://openoffice.org/2000/table" + xmlns:draw="http://openoffice.org/2000/drawing" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:number="http://openoffice.org/2000/datastyle" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:chart="http://openoffice.org/2000/chart" + xmlns:dr3d="http://openoffice.org/2000/dr3d" + xmlns:math="http://www.w3.org/1998/Math/MathML" + xmlns:form="http://openoffice.org/2000/form" + xmlns:script="http://openoffice.org/2000/script" + + office:class="chart" office:version="1.0"> + + +*/ + +// dtd ----------------------------------------------------- +// <!ELEMENT elementname regel> +// <!ELEMENT elementname (subelement1,subelement2)> subelemente mssen vorhanden sein und 1 muss vor 2 stehen +// <!ELEMENT elementname (subelement1|subelement2)> subelement 1 oder 2 muss vorhanden sein +// <!ELEMENT elementname subelement?+*> ?: einmal oder gar nicht; + +: mindestens einmal + *: keinmal oder mehrmals +// <!ATTLIST zielelement-name +// attribut-name attribut-datentyp defaultwert> +// +// defaultwert: "geeigneter wert" +// defaultwert: #REQUIRED +// defaultwert: #IMPLIED (kann weggelassen werden) +// defaultwert: #FIXED "nicht zu ndernder wert" +// attribut-datentyp: CDATA +// attribut-datentyp: enumerated (werte aufzhlung z.B.) +// attribut-datentyp: ENTITY (deklariert in dtd) +// attribut-datentyp: ENTITIES (mehrfache durch whitespace getrennte ENTITYs) +// attribut-datentyp: ID (eindeutiges elementkennzeichen) +// attribut-datentyp: IDREF (wert eines ID-attributes) +// attribut-datentyp: IDREFS (mehrfache durch whitespace getrennte IDREFs) +// attribut-datentyp: NMTOKEN (xml-namen-token) +// attribut-datentyp: NMTOKENS (mehrfache durch whitespace getrennte NMTOKENs) +// attribut-datentyp: NOTATION (notation deklariert in dtd) + +<!----------------style:style----------------------------------- --> + +//<!ELEMENT style:style ( style:properties?,office:events?,style:map*)> +//<!ELEMENT style:properties ANY> +//<!ATTLIST style:style style:name %styleName; #REQUIRED> +//<!ENTITY % styleFamily "(paragraph|text|section| +// table|table-column|table-row|table-cell|table-page|chart|graphics|default|drawing-page|presentation|control|ruby)"> +//<!ATTLIST style:style style:family %styleFamily; #REQUIRED> +//<!ATTLIST style:style style:parent-style-name %styleName; #IMPLIED> +//<!ATTLIST style:style style:master-page-name %styleName; #IMPLIED> +//<!ATTLIST style:style style:next-style-name %styleName; #IMPLIED> +//<!ATTLIST style:style style:list-style-name %styleName; #IMPLIED> +//<!ATTLIST style:style style:data-style-name %styleName; #IMPLIED> +//<!ATTLIST style:style style:auto-update %boolean; "false"> +//<!ATTLIST style:style style:class %string; #IMPLIED> + +//---------------- expand styleFamily??: +<!ENTITY % styleFamily "(...|chart|chart-axis||...)"> + +an chart-axis style 'contains': +number:number-style (as attribute style:data-style-name="name of a number:number-style") + +!!!!!!!!!!!!!! add chart2.mod to office.dtd + +!!!!!!!!!!!!!! remove chart from shape entity in dtypes.mod +than add chart and chart2 to body entity in office.mod + +?????????legend-service name as style??
\ No newline at end of file diff --git a/chart2/workbench/fileformat/newchart_test.xml b/chart2/workbench/fileformat/newchart_test.xml new file mode 100644 index 000000000..44aaa602f --- /dev/null +++ b/chart2/workbench/fileformat/newchart_test.xml @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE office:document-content PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "office.dtd"> +<office:document-content xmlns:office="http://openoffice.org/2000/office" xmlns:style="http://openoffice.org/2000/style" xmlns:text="http://openoffice.org/2000/text" xmlns:table="http://openoffice.org/2000/table" xmlns:draw="http://openoffice.org/2000/drawing" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:number="http://openoffice.org/2000/datastyle" xmlns:svg="http://www.w3.org/2000/svg" xmlns:chart="http://openoffice.org/2000/chart" xmlns:dr3d="http://openoffice.org/2000/dr3d" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="http://openoffice.org/2000/form" xmlns:script="http://openoffice.org/2000/script" office:class="chart" office:version="1.0"> + <office:automatic-styles> + <!-- auto-styles ***************************************************************************************************** --> + <!-- ******************************************************************************************************************* --> + </office:automatic-styles> + <office:body> + <!-- body ***************************************************************************************************************** --> + <chart2:chart2> + <chart2:legend id="legend_0" service="drafts.com.sun.star.chart2.Legend"/> + <chart2:legend id="legend_1" service="drafts.com.sun.star.chart2.Legend"/> + <chart2:scale id="scale1_x" minimum="0" maximum="10"> + <chart2:break start="2" end="3"/> + </chart2:scale> + <chart2:scale id="scale1_y" scaling-service="drafts.com.sun.star.LogarithmicScaling"/> + <chart2:increment id="increment1_x" scale="scale1_x"> + <chart2:subincrement count="2"/> + <chart2:subincrement count="5"/> + </chart2:increment> + <chart2:increment id="increment1_y" scale="scale1_y" pre-offset="0" post-equidistant="true" post-distance="1"> + <chart2:subincrement count="10" post-equidistant="false"/> + </chart2:increment> + <!-- *************************************** container ***************************************************************--> + <chart2:final-target id="final_1"> + <chart2:title id="title_1"/> + <chart2:logic-target id="logic_1"> + <chart2:coordinate-system id="coosys_1" service="drafts.com.sun.star.chart2.ThreeDimCartesian" legend="legend_1"> + <chart2:scaleRef scale="scale1_x" direction="reverse"/> + <chart2:scaleRef scale="scale1_y"/> + </chart2:coordinate-system> + </chart2:logic-target> + </chart2:final-target> + <!-- *************************************** axes ********************************************************************--> + <chart2:resident id="axis1_x" service="drafts.com.sun.star.chart2.CartesianAxis" coordinate-system="coosys_1"> + <chart2:axis dimension="1" increment="increment1_x"/> + </chart2:resident> + <chart2:resident id="axis1_y" service="drafts.com.sun.star.chart2.CartesianAxis" coordinate-system="coosys_1"> + <chart2:axis dimension="2" increment="increment1_y"/> + </chart2:resident> + <!-- *************************************** grids *******************************************************************--> + <chart2:resident id="grid1_x" service="drafts.com.sun.star.chart2.CartesianGrid" coordinate-system="coosys_1"> + <chart2:grid dimension="1" increment="increment1_x"/> + </chart2:resident> + <chart2:resident id="grid1_y" service="drafts.com.sun.star.chart2.CartesianGrid" coordinate-system="coosys_1"> + <chart2:grid dimension="2" increment="increment1_y"/> + </chart2:resident> + <!-- *************************************** renderer ***************************************************************--> + <chart2:resident id="barchart_1" service="drafts.com.sun.star.chart2.BarChart" coordinate-system="coosys_1"> + <chart2:renderer/> + </chart2:resident> + </chart2:chart2> + <!-- ************************************************************************************************************************ --> + </office:body> +</office:document-content> diff --git a/chart2/workbench/fileformat/nmspace.mod b/chart2/workbench/fileformat/nmspace.mod new file mode 100644 index 000000000..1eb86451f --- /dev/null +++ b/chart2/workbench/fileformat/nmspace.mod @@ -0,0 +1,79 @@ +<!-- + $Id: nmspace.mod,v 1.1.1.1 2003-10-06 09:58:35 bm Exp $ + + The Contents of this file are made available subject to the terms of + either of the following licenses + + - GNU Lesser General Public License Version 2.1 + - Sun Industry Standards Source License Version 1.1 + + Sun Microsystems Inc., October, 2000 + + GNU Lesser General Public License Version 2.1 + ============================================= + Copyright 2000 by Sun Microsystems, Inc. + 901 San Antonio Road, Palo Alto, CA 94303, USA + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License version 2.1, as published by the Free Software Foundation. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, + MA 02111-1307 USA + + + Sun Industry Standards Source License Version 1.1 + ================================================= + The contents of this file are subject to the Sun Industry Standards + Source License Version 1.1 (the "License"); You may not use this file + except in compliance with the License. You may obtain a copy of the + License at http://www.openoffice.org/license.html. + + Software provided under this License is provided on an "AS IS" basis, + WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, + WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + See the License for the specific provisions governing your rights and + obligations concerning the Software. + + The Initial Developer of the Original Code is: Sun Microsystems, Inc. + + Copyright: 2000 by Sun Microsystems, Inc. + + All Rights Reserved. + + Contributor(s): _______________________________________ + +--> + +<!ENTITY nFO "http://www.w3.org/1999/XSL/Format"> +<!ENTITY nXLink "http://www.w3.org/1999/xlink"> +<!ENTITY nSVG "http://www.w3.org/2000/svg"> + +<!-- StarOffice namespace names and prefixes --> + +<!ENTITY nOpenOffice "http://openoffice.org/2000"> +<!ENTITY nOpenOffice2001 "http://openoffice.org/2001"> + +<!ENTITY nOffice "&nOpenOffice;/office"> +<!ENTITY nStyle "&nOpenOffice;/style"> +<!ENTITY nText "&nOpenOffice;/text"> +<!ENTITY nTable "&nOpenOffice;/table"> +<!ENTITY nMeta "&nOpenOffice;/meta"> +<!ENTITY nScript "&nOpenOffice;/script"> +<!ENTITY nDraw "&nOpenOffice;/drawing"> +<!ENTITY nChart "&nOpenOffice;/chart"> +<!ENTITY nChart2 "&nOpenOffice;/chart2"> +<!ENTITY nNumber "&nOpenOffice;/datastyle"> +<!ENTITY nConfig "&nOpenOffice2001;/config"> + + +<!-- dublin core namespace name and prefic --> +<!ENTITY nDC "http://purl.org/dc/elements/1.1/"> diff --git a/chart2/workbench/fileformat/office.dtd b/chart2/workbench/fileformat/office.dtd new file mode 100644 index 000000000..55aa5d9dc --- /dev/null +++ b/chart2/workbench/fileformat/office.dtd @@ -0,0 +1,83 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + $Id: office.dtd,v 1.1.1.1 2003-10-06 09:58:35 bm Exp $ + + The Contents of this file are made available subject to the terms of + either of the following licenses + + - GNU Lesser General Public License Version 2.1 + - Sun Industry Standards Source License Version 1.1 + + Sun Microsystems Inc., October, 2000 + + GNU Lesser General Public License Version 2.1 + ============================================= + Copyright 2000 by Sun Microsystems, Inc. + 901 San Antonio Road, Palo Alto, CA 94303, USA + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License version 2.1, as published by the Free Software Foundation. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, + MA 02111-1307 USA + + + Sun Industry Standards Source License Version 1.1 + ================================================= + The contents of this file are subject to the Sun Industry Standards + Source License Version 1.1 (the "License"); You may not use this file + except in compliance with the License. You may obtain a copy of the + License at http://www.openoffice.org/license.html. + + Software provided under this License is provided on an "AS IS" basis, + WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, + WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + See the License for the specific provisions governing your rights and + obligations concerning the Software. + + The Initial Developer of the Original Code is: Sun Microsystems, Inc. + + Copyright: 2000 by Sun Microsystems, Inc. + + All Rights Reserved. + + Contributor(s): _______________________________________ + +--> +<!ENTITY % dtypes-mod SYSTEM "dtypes.mod"> +%dtypes-mod; +<!ENTITY % nmspace-mod SYSTEM "nmspace.mod"> +%nmspace-mod; +<!ENTITY % office-mod SYSTEM "office.mod"> +%office-mod; +<!ENTITY % style-mod SYSTEM "style.mod"> +%style-mod; +<!ENTITY % meta-mod SYSTEM "meta.mod"> +%meta-mod; +<!ENTITY % script-mod SYSTEM "script.mod"> +%script-mod; +<!ENTITY % drawing-mod SYSTEM "drawing.mod"> +%drawing-mod; +<!ENTITY % text-mod SYSTEM "text.mod"> +%text-mod; +<!ENTITY % table-mod SYSTEM "table.mod"> +%table-mod; +<!ENTITY % chart2-mod SYSTEM "chart2.mod"> +%chart2-mod; +<!ENTITY % chart-mod SYSTEM "chart.mod"> +%chart-mod; +<!ENTITY % datastyl-mod SYSTEM "datastyl.mod"> +%datastyl-mod; +<!ENTITY % form-mod SYSTEM "form.mod"> +%form-mod; +<!ENTITY % settings-mod SYSTEM "settings.mod"> +%settings-mod; diff --git a/chart2/workbench/fileformat/office.mod b/chart2/workbench/fileformat/office.mod new file mode 100644 index 000000000..fabca96d9 --- /dev/null +++ b/chart2/workbench/fileformat/office.mod @@ -0,0 +1,255 @@ +<!-- + $Id: office.mod,v 1.1.1.1 2003-10-06 09:58:35 bm Exp $ + + The Contents of this file are made available subject to the terms of + either of the following licenses + + - GNU Lesser General Public License Version 2.1 + - Sun Industry Standards Source License Version 1.1 + + Sun Microsystems Inc., October, 2000 + + GNU Lesser General Public License Version 2.1 + ============================================= + Copyright 2000 by Sun Microsystems, Inc. + 901 San Antonio Road, Palo Alto, CA 94303, USA + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License version 2.1, as published by the Free Software Foundation. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, + MA 02111-1307 USA + + + Sun Industry Standards Source License Version 1.1 + ================================================= + The contents of this file are subject to the Sun Industry Standards + Source License Version 1.1 (the "License"); You may not use this file + except in compliance with the License. You may obtain a copy of the + License at http://www.openoffice.org/license.html. + + Software provided under this License is provided on an "AS IS" basis, + WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, + WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + See the License for the specific provisions governing your rights and + obligations concerning the Software. + + The Initial Developer of the Original Code is: Sun Microsystems, Inc. + + Copyright: 2000 by Sun Microsystems, Inc. + + All Rights Reserved. + + Contributor(s): _______________________________________ + +--> + +<!ELEMENT office:document ( office:meta?, + office:settings?, + office:script?, + office:font-decls?, + office:styles?, + office:automatic-styles?, + office:master-styles?, + office:body ) > + +<!ATTLIST office:document xmlns:office CDATA #FIXED "&nOffice;"> +<!ATTLIST office:document xmlns:meta CDATA #FIXED "&nMeta;"> +<!ATTLIST office:document xmlns:script CDATA #FIXED "&nScript;"> +<!ATTLIST office:document xmlns:style CDATA #FIXED "&nStyle;"> +<!ATTLIST office:document xmlns:text CDATA #FIXED "&nText;"> +<!ATTLIST office:document xmlns:table CDATA #FIXED "&nTable;"> +<!ATTLIST office:document xmlns:draw CDATA #FIXED "&nDraw;"> +<!ATTLIST office:document xmlns:chart CDATA #FIXED "&nChart;"> +<!ATTLIST office:document xmlns:number CDATA #FIXED "&nNumber;"> +<!ATTLIST office:document xmlns:fo CDATA #FIXED "&nFO;"> +<!ATTLIST office:document xmlns:xlink CDATA #FIXED "&nXLink;"> +<!ATTLIST office:document xmlns:svg CDATA #FIXED "&nSVG;"> +<!ATTLIST office:document xmlns:dc CDATA #FIXED "&nDC;"> + +<!ATTLIST office:document office:class + (text|text-global| + drawing|presentation| + spreadsheet|chart) #REQUIRED> + +<!ATTLIST office:document office:version %string; #IMPLIED> + +<!-- document-styles --> +<!ELEMENT office:document-styles ( + office:font-decls?, + office:styles?, + office:automatic-styles?, + office:master-styles? ) > + +<!ATTLIST office:document-styles xmlns:office CDATA #FIXED "&nOffice;"> +<!ATTLIST office:document-styles xmlns:meta CDATA #FIXED "&nMeta;"> +<!ATTLIST office:document-styles xmlns:script CDATA #FIXED "&nScript;"> +<!ATTLIST office:document-styles xmlns:style CDATA #FIXED "&nStyle;"> +<!ATTLIST office:document-styles xmlns:text CDATA #FIXED "&nText;"> +<!ATTLIST office:document-styles xmlns:table CDATA #FIXED "&nTable;"> +<!ATTLIST office:document-styles xmlns:draw CDATA #FIXED "&nDraw;"> +<!ATTLIST office:document-styles xmlns:chart CDATA #FIXED "&nChart;"> +<!ATTLIST office:document-styles xmlns:number CDATA #FIXED "&nNumber;"> +<!ATTLIST office:document-styles xmlns:fo CDATA #FIXED "&nFO;"> +<!ATTLIST office:document-styles xmlns:xlink CDATA #FIXED "&nXLink;"> +<!ATTLIST office:document-styles xmlns:svg CDATA #FIXED "&nSVG;"> +<!ATTLIST office:document-styles xmlns:dc CDATA #FIXED "&nDC;"> + +<!ATTLIST office:document-styles office:version %string; #IMPLIED> + +<!-- document-content --> + +<!ELEMENT office:document-content ( + office:script?, + office:font-decls?, + office:automatic-styles?, + office:body ) > + +<!ATTLIST office:document-content xmlns:office CDATA #FIXED "&nOffice;"> +<!ATTLIST office:document-content xmlns:meta CDATA #FIXED "&nMeta;"> +<!ATTLIST office:document-content xmlns:script CDATA #FIXED "&nScript;"> +<!ATTLIST office:document-content xmlns:style CDATA #FIXED "&nStyle;"> +<!ATTLIST office:document-content xmlns:text CDATA #FIXED "&nText;"> +<!ATTLIST office:document-content xmlns:table CDATA #FIXED "&nTable;"> +<!ATTLIST office:document-content xmlns:draw CDATA #FIXED "&nDraw;"> +<!ATTLIST office:document-content xmlns:chart CDATA #FIXED "&nChart;"> +<!ATTLIST office:document-content xmlns:number CDATA #FIXED "&nNumber;"> +<!ATTLIST office:document-content xmlns:fo CDATA #FIXED "&nFO;"> +<!ATTLIST office:document-content xmlns:xlink CDATA #FIXED "&nXLink;"> +<!ATTLIST office:document-content xmlns:svg CDATA #FIXED "&nSVG;"> +<!ATTLIST office:document-content xmlns:dc CDATA #FIXED "&nDC;"> + +<!ATTLIST office:document-content office:class + (text|text-global| + drawing|presentation| + spreadsheet|chart) #REQUIRED> + +<!ATTLIST office:document-content office:version %string; #IMPLIED> + +<!-- document-content --> + +<!ELEMENT office:document-meta ( office:meta? ) > + +<!ATTLIST office:document-meta xmlns:office CDATA #FIXED "&nOffice;"> +<!ATTLIST office:document-meta xmlns:meta CDATA #FIXED "&nMeta;"> +<!ATTLIST office:document-meta xmlns:script CDATA #FIXED "&nScript;"> +<!ATTLIST office:document-meta xmlns:style CDATA #FIXED "&nStyle;"> +<!ATTLIST office:document-meta xmlns:text CDATA #FIXED "&nText;"> +<!ATTLIST office:document-meta xmlns:table CDATA #FIXED "&nTable;"> +<!ATTLIST office:document-meta xmlns:draw CDATA #FIXED "&nDraw;"> +<!ATTLIST office:document-meta xmlns:chart CDATA #FIXED "&nChart;"> +<!ATTLIST office:document-meta xmlns:number CDATA #FIXED "&nNumber;"> +<!ATTLIST office:document-meta xmlns:fo CDATA #FIXED "&nFO;"> +<!ATTLIST office:document-meta xmlns:xlink CDATA #FIXED "&nXLink;"> +<!ATTLIST office:document-meta xmlns:svg CDATA #FIXED "&nSVG;"> +<!ATTLIST office:document-meta xmlns:dc CDATA #FIXED "&nDC;"> + +<!ATTLIST office:document-meta office:version %string; #IMPLIED> + +<!ELEMENT office:document-settings (office:settings) > +<!ATTLIST office:document-settings xmlns:office CDATA #FIXED "&nOffice;"> +<!ATTLIST office:document-settings xmlns:xlink CDATA #FIXED "&nXLink;"> +<!ATTLIST office:document-settings xmlns:config CDATA #FIXED "&nConfig;"> + +<!ATTLIST office:document-settings office:version %string; #IMPLIED> + +<!ENTITY % meta "(meta:generator?, + dc:title?, + dc:description?, + dc:subject?, + meta:initial-creator?, + meta:creation-date?, + dc:creator?, + dc:date?, + meta:printed-by?, + meta:print-date?, + meta:keywords?, + dc:language?, + meta:editing-cycles?, + meta:editing-duration?, + meta:hyperlink-behaviour?, + meta:auto-reload?, + meta:template?, + meta:user-defined*, + meta:document-statistic?)"> +<!ELEMENT office:meta %meta;> + +<!ENTITY % script "(script:library-embedded | + script:library-linked)*,office:events?"> +<!ELEMENT office:script (%script;)> + +<!ELEMENT office:font-decls (style:font-decl)*> + +<!ENTITY % styles "(style:default-style|style:style|text:list-style| + number:number-style|number:currency-style|number:percentage-style| + number:date-style|number:time-style|number:boolean-style| + number:text-style| + draw:gradient|draw:hatch|draw:fill-image|draw:marker|draw:stroke-dash| + style:presentation-page-layout|draw:transparency)"> + +<!-- Validity constraint: The elements + text:outline-style, + text:footnotes-configuration, + text:endnotes-configuration, + text:bibliography-configuration and + text:linenumbering-configuration + may appear only once! + Unfortunatetly, this constraint cannot be easily specified in the DTD. +--> +<!ELEMENT office:styles (%styles;|text:outline-style| + text:footnotes-configuration|text:endnotes-configuration| + text:bibliography-configuration|text:linenumbering-configuration)*> + +<!ELEMENT office:automatic-styles (%styles;|style:page-master)*> + +<!ELEMENT office:master-styles (draw:layer-set?,style:handout-master?,style:master-page*) > + +<!ENTITY % text-decls "text:variable-decls?, text:sequence-decls?, + text:user-field-decls?, text:dde-connection-decls?, + text:alphabetical-index-auto-mark-file?" > +<!ENTITY % change-marks "text:change | text:change-start | text:change-end"> +<!ENTITY % body "(office:forms?,(text:tracked-changes|table:tracked-changes)?,%text-decls;,table:calculation-settings?,table:content-validations?,table:label-ranges?, + (text:h|text:p|text:ordered-list| + text:unordered-list|table:table|draw:page| + draw:a|%shape;|chart:chart|chart2:chart2|text:section|text:table-of-content| + text:illustration-index|text:table-index|text:object-index| + text:user-index|text:alphabetical-index|text:bibliography| + %change-marks;)*, + table:named-expressions?, + table:database-ranges?,table:data-pilot-tables?, + table:consolidation?, + table:dde-links?, + presentation:settings?)"> +<!ELEMENT office:body %body;> +<!ATTLIST office:body table:structure-protected %boolean; "false" + table:protection-key CDATA #IMPLIED> +<!ELEMENT office:events (script:event|presentation:event)*> +<!-- DDE source: for text sections and tables --> +<!ELEMENT office:dde-source EMPTY> +<!ATTLIST office:dde-source office:dde-application CDATA #IMPLIED> +<!ATTLIST office:dde-source office:dde-topic CDATA #IMPLIED> +<!ATTLIST office:dde-source office:dde-item CDATA #IMPLIED> +<!ATTLIST office:dde-source office:automatic-update %boolean; "false"> +<!ATTLIST office:dde-source office:name CDATA #IMPLIED> +<!ATTLIST office:dde-source table:conversion-mode (into-default-style-data-style|into-english-number|let-text) "into-default-style-data-style" > +<!-- annotations --> +<!-- limitation: in the current implementation, only plain text inside of + paragraphs is supported --> +<!ELEMENT office:annotation (text:p)*> +<!ATTLIST office:annotation office:author %string; #IMPLIED> +<!ATTLIST office:annotation office:create-date %date; #IMPLIED> +<!ATTLIST office:annotation office:create-date-string %string; #IMPLIED> +<!ATTLIST office:annotation office:display %boolean; "false"> +<!ELEMENT office:change-info (text:p)*> +<!ATTLIST office:change-info office:chg-author %string; #REQUIRED> +<!ATTLIST office:change-info office:chg-date-time %timeInstance; #REQUIRED> +<!ELEMENT office:binary-data (#PCDATA)>
\ No newline at end of file diff --git a/chart2/workbench/fileformat/script.mod b/chart2/workbench/fileformat/script.mod new file mode 100644 index 000000000..dc96a22b5 --- /dev/null +++ b/chart2/workbench/fileformat/script.mod @@ -0,0 +1,79 @@ +<!-- + $Id: script.mod,v 1.1.1.1 2003-10-06 09:58:35 bm Exp $ + + The Contents of this file are made available subject to the terms of + either of the following licenses + + - GNU Lesser General Public License Version 2.1 + - Sun Industry Standards Source License Version 1.1 + + Sun Microsystems Inc., October, 2000 + + GNU Lesser General Public License Version 2.1 + ============================================= + Copyright 2000 by Sun Microsystems, Inc. + 901 San Antonio Road, Palo Alto, CA 94303, USA + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License version 2.1, as published by the Free Software Foundation. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, + MA 02111-1307 USA + + + Sun Industry Standards Source License Version 1.1 + ================================================= + The contents of this file are subject to the Sun Industry Standards + Source License Version 1.1 (the "License"); You may not use this file + except in compliance with the License. You may obtain a copy of the + License at http://www.openoffice.org/license.html. + + Software provided under this License is provided on an "AS IS" basis, + WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, + WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + See the License for the specific provisions governing your rights and + obligations concerning the Software. + + The Initial Developer of the Original Code is: Sun Microsystems, Inc. + + Copyright: 2000 by Sun Microsystems, Inc. + + All Rights Reserved. + + Contributor(s): _______________________________________ + +--> + +<!ELEMENT script:library-embedded (script:module*)> +<!ATTLIST script:library-embedded script:name %string; #REQUIRED> +<!ATTLIST script:library-embedded script:password %string; #IMPLIED> + +<!ELEMENT script:library-linked EMPTY> +<!ATTLIST script:library-linked script:name %string; #REQUIRED> +<!ATTLIST script:library-linked xlink:href %string; #REQUIRED> +<!ATTLIST script:library-linked xlink:type (simple) #FIXED "simple"> + +<!ELEMENT script:module (#PCDATA)> +<!ATTLIST script:module script:name %string; #REQUIRED> +<!ATTLIST script:module script:language %string; #IMPLIED> + + +<!ENTITY % script-language "script:language %string; #REQUIRED"> +<!ENTITY % event-name "script:event-name %string; #REQUIRED"> +<!ENTITY % location "script:location (document|application) #REQUIRED"> +<!ENTITY % macro-name "script:macro-name %string; #REQUIRED"> + +<!ELEMENT script:event (#PCDATA)> +<!ATTLIST script:event %script-language; + %event-name; + %location; + %macro-name;> diff --git a/chart2/workbench/fileformat/settings.mod b/chart2/workbench/fileformat/settings.mod new file mode 100644 index 000000000..a3ba17007 --- /dev/null +++ b/chart2/workbench/fileformat/settings.mod @@ -0,0 +1,77 @@ +<!-- + $Id: settings.mod,v 1.1.1.1 2003-10-06 09:58:35 bm Exp $ + + The Contents of this file are made available subject to the terms of + either of the following licenses + + - GNU Lesser General Public License Version 2.1 + - Sun Industry Standards Source License Version 1.1 + + Sun Microsystems Inc., October, 2000 + + GNU Lesser General Public License Version 2.1 + ============================================= + Copyright 2000 by Sun Microsystems, Inc. + 901 San Antonio Road, Palo Alto, CA 94303, USA + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License version 2.1, as published by the Free Software Foundation. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, + MA 02111-1307 USA + + + Sun Industry Standards Source License Version 1.1 + ================================================= + The contents of this file are subject to the Sun Industry Standards + Source License Version 1.1 (the "License"); You may not use this file + except in compliance with the License. You may obtain a copy of the + License at http://www.openoffice.org/license.html. + + Software provided under this License is provided on an "AS IS" basis, + WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, + WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + See the License for the specific provisions governing your rights and + obligations concerning the Software. + + The Initial Developer of the Original Code is: Sun Microsystems, Inc. + + Copyright: 2000 by Sun Microsystems, Inc. + + All Rights Reserved. + + Contributor(s): _______________________________________ + +--> + +<!ELEMENT office:settings (config:config-item-set+)> + +<!ENTITY % items "(config:config-item | + config:config-item-set | + config:config-item-map-named | + config:config-item-map-indexed)+"> + +<!ELEMENT config:config-item-set %items;> +<!ATTLIST config:config-item-set config:name CDATA #REQUIRED> + +<!ELEMENT config:config-item (#PCDATA)> +<!ATTLIST config:config-item config:name CDATA #REQUIRED + config:type (boolean | short | int | long | double | string | datetime | base64Binary) #REQUIRED> + +<!ELEMENT config:config-item-map-named (config:config-item-map-entry)+> +<!ATTLIST config:config-item-map-named config:name CDATA #REQUIRED> + +<!ELEMENT config:config-item-map-indexed (config:config-item-map-entry)+> +<!ATTLIST config:config-item-map-indexed config:name CDATA #REQUIRED> + +<!ELEMENT config:config-item-map-entry %items;> +<!ATTLIST config:config-item-map-entry config:name CDATA #IMPLIED> diff --git a/chart2/workbench/fileformat/style.mod b/chart2/workbench/fileformat/style.mod new file mode 100644 index 000000000..e9a374d07 --- /dev/null +++ b/chart2/workbench/fileformat/style.mod @@ -0,0 +1,436 @@ +<!-- + $Id: style.mod,v 1.1.1.1 2003-10-06 09:58:35 bm Exp $ + + The Contents of this file are made available subject to the terms of + either of the following licenses + + - GNU Lesser General Public License Version 2.1 + - Sun Industry Standards Source License Version 1.1 + + Sun Microsystems Inc., October, 2000 + + GNU Lesser General Public License Version 2.1 + ============================================= + Copyright 2000 by Sun Microsystems, Inc. + 901 San Antonio Road, Palo Alto, CA 94303, USA + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License version 2.1, as published by the Free Software Foundation. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, + MA 02111-1307 USA + + + Sun Industry Standards Source License Version 1.1 + ================================================= + The contents of this file are subject to the Sun Industry Standards + Source License Version 1.1 (the "License"); You may not use this file + except in compliance with the License. You may obtain a copy of the + License at http://www.openoffice.org/license.html. + + Software provided under this License is provided on an "AS IS" basis, + WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, + WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + See the License for the specific provisions governing your rights and + obligations concerning the Software. + + The Initial Developer of the Original Code is: Sun Microsystems, Inc. + + Copyright: 2000 by Sun Microsystems, Inc. + + All Rights Reserved. + + Contributor(s): _______________________________________ + +--> + +<!ELEMENT style:font-decl EMPTY> +<!ATTLIST style:font-decl style:name %string; #REQUIRED> +<!ATTLIST style:font-decl fo:font-family %string; #REQUIRED> +<!ATTLIST style:font-decl style:font-style-name %string; #IMPLIED> +<!ENTITY % fontFamilyGeneric "(roman|swiss|modern|decorative|script|system)"> +<!ATTLIST style:font-decl style:font-family-generic %fontFamilyGeneric; + #IMPLIED> +<!ENTITY % fontPitch "(fixed|variable)"> +<!ATTLIST style:font-decl style:font-pitch %fontPitch; #IMPLIED> +<!ATTLIST style:font-decl style:font-charset %textEncoding; #IMPLIED> + +<!ELEMENT style:style ( style:properties?,office:events?,style:map*)> + +<!ATTLIST style:style style:name %styleName; #REQUIRED> + +<!ENTITY % styleFamily "(paragraph|text|section| + table|table-column|table-row|table-cell|table-page|chart|graphics|default|drawing-page|presentation|control|ruby)"> +<!ATTLIST style:style style:family %styleFamily; #REQUIRED> + +<!ATTLIST style:style style:parent-style-name %styleName; #IMPLIED> +<!ATTLIST style:style style:master-page-name %styleName; #IMPLIED> +<!ATTLIST style:style style:next-style-name %styleName; #IMPLIED> +<!ATTLIST style:style style:list-style-name %styleName; #IMPLIED> +<!ATTLIST style:style style:data-style-name %styleName; #IMPLIED> + +<!ATTLIST style:style style:auto-update %boolean; "false"> + +<!ATTLIST style:style style:class %string; #IMPLIED> + +<!ELEMENT style:default-style (style:properties?)> +<!ATTLIST style:default-style style:family %styleFamily; #REQUIRED> + +<!ELEMENT style:map EMPTY> + +<!ATTLIST style:map style:condition %string; #REQUIRED> +<!ATTLIST style:map style:apply-style-name %styleName; #REQUIRED> +<!ATTLIST style:map style:base-cell-address %cell-address; #IMPLIED> + +<!ELEMENT style:properties ANY> + +<!-- number format properties --> +<!ATTLIST style:properties style:num-prefix %string; #IMPLIED> +<!ATTLIST style:properties style:num-suffix %string; #IMPLIED> +<!ATTLIST style:properties style:num-format %string; #IMPLIED> +<!ATTLIST style:properties style:num-letter-sync %boolean; #IMPLIED> + +<!-- frame properties --> +<!ATTLIST style:properties fo:width %positiveLength; #IMPLIED> +<!ATTLIST style:properties fo:height %positiveLength; #IMPLIED> +<!ATTLIST style:properties style:vertical-pos (top|middle|bottom|from-top|below) #IMPLIED> +<!ATTLIST style:properties style:vertical-rel (page|page-content| + frame|frame-content| + paragraph|paragraph-content|char| + line|baseline|text) #IMPLIED> +<!ATTLIST style:properties style:horizontal-pos (left|center|right|from-left|inside|outside|from-inside) #IMPLIED> +<!ATTLIST style:properties style:horizontal-rel (page|page-content| + page-start-margin|page-end-margin| + frame|frame-content| + frame-start-margin|frame-end-margin| + paragraph|paragraph-content| + paragraph-start-margin|paragraph-end-margin| + char) #IMPLIED> +<!ATTLIST style:properties svg:width %lengthOrPercentage; #IMPLIED> +<!ATTLIST style:properties svg:height %lengthOrPercentage; #IMPLIED> +<!ATTLIST style:properties fo:min-height %lengthOrPercentage; #IMPLIED> +<!ATTLIST style:properties fo:min-width %lengthOrPercentage; #IMPLIED> +<!ATTLIST style:properties fo:max-height %lengthOrPercentage; #IMPLIED> +<!ATTLIST style:properties fo:max-width %lengthOrPercentage; #IMPLIED> +<!ATTLIST style:properties text:anchor-type %anchorType; #IMPLIED> +<!ATTLIST style:properties text:anchor-page-number %positiveInteger; #IMPLIED> +<!ATTLIST style:properties svg:x %coordinate; #IMPLIED> +<!ATTLIST style:properties svg:y %coordinate; #IMPLIED> +<!ATTLIST style:properties style:print-content %boolean; #IMPLIED> +<!ATTLIST style:properties style:protect %boolean; #IMPLIED> +<!ATTLIST style:properties style:wrap (none|left|right|parallel|dynamic|run-through) #IMPLIED> +<!ENTITY % noLimitOrPositiveInteger "CDATA"> +<!ATTLIST style:properties style:number-wrapped-paragraphs %noLimitOrPositiveInteger; #IMPLIED> +<!ATTLIST style:properties style:wrap-contour %boolean; #IMPLIED> +<!ATTLIST style:properties style:wrap-contour-mode (full|outside) #IMPLIED> +<!ATTLIST style:properties style:run-through (foreground|background) #IMPLIED> +<!ATTLIST style:properties style:editable %boolean; #IMPLIED> +<!ATTLIST style:properties style:mirror CDATA #IMPLIED> +<!ATTLIST style:properties fo:clip CDATA #IMPLIED> +<!ATTLIST style:properties text:animation (none|scroll|alternate|slide) #IMPLIED> +<!ATTLIST style:properties text:animation-direction (left|right|up|down) #IMPLIED> +<!ATTLIST style:properties text:animation-start-inside %boolean; #IMPLIED> +<!ATTLIST style:properties text:animation-stop-inside %boolean; #IMPLIED> +<!ATTLIST style:properties text:animation-repeat %integer; #IMPLIED> +<!ATTLIST style:properties text:animation-delay %timeDuration; #IMPLIED> +<!ATTLIST style:properties text:animation-steps %length; #IMPLIED> + +<!-- text properties --> +<!ATTLIST style:properties fo:font-variant (normal|small-caps) #IMPLIED> +<!ATTLIST style:properties fo:text-transform (none|lowercase| + uppercase|capitalize) #IMPLIED> +<!ATTLIST style:properties fo:color %color; #IMPLIED> +<!ATTLIST style:properties style:use-window-font-color %boolean; #IMPLIED> +<!ATTLIST style:properties style:text-outline %boolean; #IMPLIED> +<!ATTLIST style:properties style:text-crossing-out + (none|single-line|double-line|thick-line|slash|X) + #IMPLIED> +<!ATTLIST style:properties style:text-position CDATA #IMPLIED> +<!ATTLIST style:properties style:text-align (left|right|start|center|end|justify|justified) #IMPLIED> + +<!ATTLIST style:properties style:font-name %string; #IMPLIED> +<!ATTLIST style:properties fo:font-family %string; #IMPLIED> +<!ATTLIST style:properties style:font-family-generic %fontFamilyGeneric; + #IMPLIED> +<!ATTLIST style:properties style:font-style-name %string; #IMPLIED> +<!ATTLIST style:properties style:font-pitch %fontPitch; #IMPLIED> +<!ATTLIST style:properties style:font-charset %textEncoding; #IMPLIED> +<!ATTLIST style:properties style:font-name-asian %string; #IMPLIED> +<!ATTLIST style:properties style:font-family-asian %string; #IMPLIED> +<!ATTLIST style:properties style:font-family-generic-asian %fontFamilyGeneric; + #IMPLIED> +<!ATTLIST style:properties style:font-style-name-asian %string; #IMPLIED> +<!ATTLIST style:properties style:font-pitch-asian %fontPitch; #IMPLIED> +<!ATTLIST style:properties style:font-charset-asian %textEncoding; #IMPLIED> +<!ATTLIST style:properties style:font-name-complex %string; #IMPLIED> +<!ATTLIST style:properties style:font-family-complex %string; #IMPLIED> +<!ATTLIST style:properties style:font-family-generic-complex %fontFamilyGeneric; + #IMPLIED> +<!ATTLIST style:properties style:font-style-name-complex %string; #IMPLIED> +<!ATTLIST style:properties style:font-pitch-complex %fontPitch; #IMPLIED> +<!ATTLIST style:properties style:font-charset-complex %textEncoding; #IMPLIED> + +<!ATTLIST style:properties fo:font-size %positiveLengthOrPercentage; #IMPLIED> +<!ATTLIST style:properties style:font-size-rel %length; #IMPLIED> +<!ATTLIST style:properties style:font-size-asian %positiveLengthOrPercentage; #IMPLIED> +<!ATTLIST style:properties style:font-size-rel-asian %length; #IMPLIED> +<!ATTLIST style:properties style:font-size-complex %positiveLengthOrPercentage; #IMPLIED> +<!ATTLIST style:properties style:font-size-rel-complex %length; #IMPLIED> +<!ENTITY % normalOrLength "CDATA"> +<!ATTLIST style:properties fo:letter-spacing %normalOrLength; #IMPLIED> +<!ATTLIST style:properties fo:language %languageOnly; #IMPLIED> +<!ATTLIST style:properties style:language-asian %languageOnly; #IMPLIED> +<!ATTLIST style:properties style:language-complex %languageOnly; #IMPLIED> +<!ATTLIST style:properties fo:country %country; #IMPLIED> +<!ATTLIST style:properties style:country-asian %country; #IMPLIED> +<!ATTLIST style:properties style:country-complex %country; #IMPLIED> +<!ENTITY % fontStyle "(normal|italic|oblique)"> +<!ATTLIST style:properties fo:font-style %fontStyle; #IMPLIED> +<!ATTLIST style:properties style:font-style-asian %fontStyle; #IMPLIED> +<!ATTLIST style:properties style:font-style-complex %fontStyle; #IMPLIED> +<!ENTITY % fontRelief "(none|embossed|engraved)"> +<!ATTLIST style:properties style:font-relief %fontRelief; #IMPLIED> +<!ATTLIST style:properties fo:text-shadow CDATA #IMPLIED> +<!ATTLIST style:properties style:text-underline + (none|single|double|dotted|dash|long-dash|dot-dash| + dot-dot-dash|wave|bold|bold-dotted|bold-dash| + bold-long-dash|bold-dot-dash|bold-dot-dot-dash| + bold-wave|double-wave|small-wave) #IMPLIED> +<!ATTLIST style:properties style:text-autospace (none | ideograph-alpha) #IMPLIED> +<!ATTLIST style:properties style:punctuation-wrap (simple | hanging) #IMPLIED> +<!ATTLIST style:properties style:line-break (normal | strict) #IMPLIED> +<!ENTITY % fontColorOrColor "CDATA"> +<!ATTLIST style:properties style:text-underline-color %fontColorOrColor; + #IMPLIED> +<!ATTLIST style:properties fo:font-weight CDATA #IMPLIED> +<!ATTLIST style:properties style:font-weight-asian CDATA #IMPLIED> +<!ATTLIST style:properties style:font-weight-complex CDATA #IMPLIED> +<!ATTLIST style:properties fo:score-spaces %boolean; #IMPLIED> +<!ATTLIST style:properties style:letter-kerning %boolean; #IMPLIED> +<!ATTLIST style:properties style:text-blinking %boolean; #IMPLIED> +<!ATTLIST style:properties style:text-background-color %transparentOrColor; + #IMPLIED> + +<!ATTLIST style:properties style:text-combine (none|letters|lines) #IMPLIED> +<!ATTLIST style:properties style:text-combine-start-char %character; #IMPLIED> +<!ATTLIST style:properties style:text-combine-end-char %character; #IMPLIED> +<!ATTLIST style:properties style:text-emphasize CDATA #IMPLIED> +<!ATTLIST style:properties style:text-scale %percentage; #IMPLIED> +<!ATTLIST style:properties style:text-rotation-angle %integer; #IMPLIED> +<!ATTLIST style:properties style:text-rotation-scale (fixed|line-height) #IMPLIED> + +<!-- paragraph properties --> +<!ENTITY % nonNegativeLengthOrPercentageOrNormal "CDATA"> +<!ATTLIST style:properties fo:line-height + %nonNegativeLengthOrPercentageOrNormal; #IMPLIED> +<!ATTLIST style:properties style:line-height-at-least %nonNegativeLength; + #IMPLIED> +<!ATTLIST style:properties style:line-spacing %length; #IMPLIED> +<!ATTLIST style:properties fo:text-align (start|end|center|justify) #IMPLIED> +<!ATTLIST style:properties fo:text-align-last (start|center|justify) #IMPLIED> +<!ATTLIST style:properties style:text-align-source (fix|value-type) #IMPLIED> +<!ATTLIST style:properties style:justify-single-word %boolean; #IMPLIED> +<!ATTLIST style:properties style:break-inside (auto|avoid) #IMPLIED> +<!ATTLIST style:properties fo:widows %nonNegativeInteger; #IMPLIED> +<!ATTLIST style:properties fo:orphans %nonNegativeInteger; #IMPLIED> + +<!ATTLIST style:properties fo:hyphenate %boolean; #IMPLIED> +<!ATTLIST style:properties fo:hyphenate-keep (none|page) #IMPLIED> +<!ATTLIST style:properties fo:hyphenation-remain-char-count %positiveInteger; + #IMPLIED> +<!ATTLIST style:properties fo:hyphenation-push-char-count %positiveInteger; + #IMPLIED> +<!ATTLIST style:properties fo:hyphenation-ladder-count + %noLimitOrPositiveInteger; #IMPLIED> +<!ATTLIST style:properties style:page-number %positiveInteger; #IMPLIED> + +<!ELEMENT style:tab-stops (style:tab-stop)*> +<!ELEMENT style:tab-stop EMPTY> +<!ATTLIST style:tab-stop style:position %nonNegativeLength; #REQUIRED> +<!ATTLIST style:tab-stop style:type (left|center|right|char|default) "left"> +<!ATTLIST style:tab-stop style:char %character; #IMPLIED> +<!ATTLIST style:tab-stop style:leader-char %character; " "> + +<!ELEMENT style:drop-cap EMPTY> +<!ENTITY % wordOrPositiveInteger "CDATA"> +<!ATTLIST style:drop-cap style:length %wordOrPositiveInteger; "1"> +<!ATTLIST style:drop-cap style:lines %positiveInteger; "1"> +<!ATTLIST style:drop-cap style:distance %length; "0cm"> +<!ATTLIST style:drop-cap style:style-name %styleName; #IMPLIED> + +<!ATTLIST style:properties style:register-true %boolean; #IMPLIED> +<!ATTLIST style:properties style:register-truth-ref-style-name %styleName; #IMPLIED> +<!ATTLIST style:properties fo:margin-left %positiveLengthOrPercentage; #IMPLIED> +<!ATTLIST style:properties fo:margin-right %positiveLengthOrPercentage; + #IMPLIED> +<!ATTLIST style:properties fo:text-indent %lengthOrPercentage; #IMPLIED> +<!ATTLIST style:properties style:auto-text-indent %boolean; #IMPLIED> +<!ATTLIST style:properties fo:margin-top %positiveLengthOrPercentage; #IMPLIED> +<!ATTLIST style:properties fo:margin-bottom %positiveLengthOrPercentage; #IMPLIED> +<!ATTLIST style:properties fo:break-before (auto|column|page) #IMPLIED> +<!ATTLIST style:properties fo:break-after (auto|column|page) #IMPLIED> +<!ATTLIST style:properties fo:background-color %transparentOrColor; #IMPLIED> + +<!ELEMENT style:background-image (office:binary-data?)> +<!ATTLIST style:background-image xlink:type (simple) #IMPLIED> +<!ATTLIST style:background-image xlink:href %uriReference; #IMPLIED> +<!ATTLIST style:background-image xlink:show (embed) #IMPLIED> +<!ATTLIST style:background-image xlink:actuate (onLoad) #IMPLIED> +<!ATTLIST style:background-image style:repeat (no-repeat|repeat|stretch) + "repeat"> +<!ATTLIST style:background-image style:position CDATA "center"> +<!ATTLIST style:background-image style:filter-name %string; #IMPLIED> + +<!ELEMENT style:symbol-image (office:binary-data?)> +<!ATTLIST style:symbol-image xlink:type (simple) #IMPLIED> +<!ATTLIST style:symbol-image xlink:href %uriReference; #IMPLIED> +<!ATTLIST style:symbol-image xlink:show (embed) #IMPLIED> +<!ATTLIST style:symbol-image xlink:actuate (onLoad) #IMPLIED> + +<!ATTLIST style:properties fo:border CDATA #IMPLIED> +<!ATTLIST style:properties fo:border-top CDATA #IMPLIED> +<!ATTLIST style:properties fo:border-bottom CDATA #IMPLIED> +<!ATTLIST style:properties fo:border-left CDATA #IMPLIED> +<!ATTLIST style:properties fo:border-right CDATA #IMPLIED> +<!ATTLIST style:properties style:border-line-width CDATA #IMPLIED> +<!ATTLIST style:properties style:border-line-width-top CDATA #IMPLIED> +<!ATTLIST style:properties style:border-line-width-bottom CDATA #IMPLIED> +<!ATTLIST style:properties style:border-line-width-left CDATA #IMPLIED> +<!ATTLIST style:properties style:border-line-width-right CDATA #IMPLIED> +<!ATTLIST style:properties fo:padding %nonNegativeLength; #IMPLIED> +<!ATTLIST style:properties fo:padding-top %nonNegativeLength; #IMPLIED> +<!ATTLIST style:properties fo:padding-bottom %nonNegativeLength; #IMPLIED> +<!ATTLIST style:properties fo:padding-left %nonNegativeLength; #IMPLIED> +<!ATTLIST style:properties fo:padding-right %nonNegativeLength; #IMPLIED> +<!ATTLIST style:properties style:shadow CDATA #IMPLIED> +<!ATTLIST style:properties fo:keep-with-next %boolean; #IMPLIED> + +<!ATTLIST style:properties text:number-lines %boolean; "false"> +<!ATTLIST style:properties text:line-number %nonNegativeInteger; #IMPLIED> + +<!ATTLIST style:properties style:decimal-places %nonNegativeInteger; #IMPLIED> +<!ATTLIST style:properties style:tab-stop-distance %nonNegativeLength; #IMPLIED> + +<!-- ruby properties --> +<!ATTLIST style:properties style:ruby-align (left|center|right|distribute-letter|distribute-space) #IMPLIED> +<!ATTLIST style:properties style:ruby-position (above|below) #IMPLIED> + + +<!-- table properties --> +<!ATTLIST style:properties style:width %positiveLength; #IMPLIED> +<!ATTLIST style:properties style:rel-width %percentage; #IMPLIED> +<!ATTLIST style:properties style:may-break-between-rows %boolean; #IMPLIED> +<!ATTLIST style:properties table:page-style-name %styleName; #IMPLIED> +<!ATTLIST style:properties table:display %boolean; #IMPLIED> + +<!-- table column properties --> +<!ATTLIST style:properties style:column-width %positiveLength; #IMPLIED> +<!ENTITY % relWidth "CDATA"> +<!ATTLIST style:properties style:rel-column-width %relWidth; #IMPLIED> +<!ATTLIST style:properties style:use-optimal-column-width %boolean; #IMPLIED> + +<!-- table row properties --> +<!ATTLIST style:properties style:row-height %positiveLength; #IMPLIED> +<!ATTLIST style:properties style:min-row-height %nonNegativeLength; #IMPLIED> +<!ATTLIST style:properties style:use-optimal-row-height %boolean; #IMPLIED> + +<!-- table cell properties --> +<!ATTLIST style:properties + table:align (left | center | right | margins) #IMPLIED + table:border-model (collapsing | separating) #IMPLIED + fo:vertical-align (top | middle | bottom | automatic) #IMPLIED + fo:direction (ltr | ttb) #IMPLIED + style:rotation-angle %nonNegativeInteger; #IMPLIED + style:rotation-align (none | bottom | top | center) #IMPLIED + style:cell-protect CDATA #IMPLIED + fo:wrap-option (no-wrap | wrap) #IMPLIED +> +<!ELEMENT style:columns (style:column-sep?,style:column*)> +<!ATTLIST style:columns fo:column-count %nonNegativeInteger; #IMPLIED> +<!ATTLIST style:columns fo:column-gap %positiveLength; #IMPLIED> + +<!ELEMENT style:column EMPTY> +<!ATTLIST style:column style:rel-width CDATA #IMPLIED> +<!ATTLIST style:column fo:margin-left %positiveLength; #IMPLIED> +<!ATTLIST style:column fo:margin-right %positiveLength; #IMPLIED> + +<!ELEMENT style:column-sep EMPTY> +<!ATTLIST style:column-sep style:style (none|solid|dotted|dashed|dot-dashed) + "solid"> +<!ATTLIST style:column-sep style:width %length; #REQUIRED> +<!ATTLIST style:column-sep style:height %percentage; "100%"> +<!ATTLIST style:column-sep style:vertical-align (top|middle|bottom) "top"> +<!ATTLIST style:column-sep style:color %color; "#000000"> + +<!-- page master properties --> +<!ELEMENT style:page-master (style:properties?, style:header-style?, style:footer-style?)> +<!ATTLIST style:page-master style:name %styleName; #REQUIRED> +<!ATTLIST style:page-master style:page-usage (all|left|right|mirrored) "all"> + +<!ELEMENT style:header-style (style:properties?)> +<!ELEMENT style:footer-style (style:properties?)> + +<!ATTLIST style:properties fo:page-width %length; #IMPLIED> +<!ATTLIST style:properties fo:page-height %length; #IMPLIED> +<!ATTLIST style:properties style:paper-tray-name %string; #IMPLIED> +<!ATTLIST style:properties style:print-orientation (portrait|landscape) #IMPLIED> +<!ATTLIST style:properties style:print CDATA #IMPLIED> +<!ATTLIST style:properties style:print-page-order (ttb|ltr) #IMPLIED> +<!ATTLIST style:properties style:first-page-number %positiveInteger; #IMPLIED> +<!ATTLIST style:properties style:scale-to %percentage; #IMPLIED> +<!ATTLIST style:properties style:scale-to-pages %positiveInteger; #IMPLIED> +<!ATTLIST style:properties style:table-centering (horizontal | vertical | both | none) #IMPLIED> + +<!ATTLIST style:properties style:footnote-max-height %lengthOrNoLimit; #IMPLIED> +<!ATTLIST style:properties style:vertical-align (top|bottom|middle|basline|auto) #IMPLIED> + +<!ELEMENT style:footnote-sep EMPTY> +<!ATTLIST style:footnote-sep style:width %length; #IMPLIED> +<!ATTLIST style:footnote-sep style:rel-width %percentage; #IMPLIED> +<!ATTLIST style:footnote-sep style:color %color; #IMPLIED> +<!ATTLIST style:footnote-sep style:adjustment (left|center|right) "left"> +<!ATTLIST style:footnote-sep style:distance-before-sep %length; #IMPLIED> +<!ATTLIST style:footnote-sep style:distance-after-sep %length; #IMPLIED> + +<!-- master page --> +<!ELEMENT style:master-page ( (style:header, style:header-left?)?, (style:footer, style:footer-left?)?, + office:forms?,style:style*, (%shapes;)*, presentation:notes? )> +<!ATTLIST style:master-page style:name %styleName; #REQUIRED> +<!ATTLIST style:master-page style:page-master-name %styleName; #REQUIRED> +<!ATTLIST style:master-page style:next-style-name %styleName; #IMPLIED> +<!ATTLIST style:master-page draw:style-name %styleName; #IMPLIED> + +<!-- handout master --> +<!ELEMENT style:handout-master (%shapes;)*> +<!ATTLIST style:handout-master presentation:presentation-page-layout-name %styleName; #IMPLIED> + + +<!ENTITY % headerText "(text:h|text:p|text:ordered-list| + text:unordered-list|table:table|text:section| + text:table-of-content|text:illustration-index| + text:table-index|text:object-index|text:user-index| + text:alphabetical-index|text:bibliography| + text:index-title|%change-marks;)*"> + + +<!ENTITY % hd-ft-content "( %headerText; | (style:region-left?, style:region-center?, style:region-right?) )"> +<!ELEMENT style:header %hd-ft-content;> +<!ELEMENT style:footer %hd-ft-content;> +<!ELEMENT style:header-left %hd-ft-content;> +<!ATTLIST style:header-left style:display %boolean; "true"> +<!ELEMENT style:footer-left %hd-ft-content;> +<!ATTLIST style:footer-left style:display %boolean; "true"> + +<!ENTITY % region-content "(text:p*)"> +<!ELEMENT style:region-left %region-content;> +<!ELEMENT style:region-center %region-content;> +<!ELEMENT style:region-right %region-content;> diff --git a/chart2/workbench/fileformat/table.mod b/chart2/workbench/fileformat/table.mod new file mode 100644 index 000000000..1d57c690d --- /dev/null +++ b/chart2/workbench/fileformat/table.mod @@ -0,0 +1,521 @@ +<!-- + $Id: table.mod,v 1.1.1.1 2003-10-06 09:58:35 bm Exp $ + + The Contents of this file are made available subject to the terms of + either of the following licenses + + - GNU Lesser General Public License Version 2.1 + - Sun Industry Standards Source License Version 1.1 + + Sun Microsystems Inc., October, 2000 + + GNU Lesser General Public License Version 2.1 + ============================================= + Copyright 2000 by Sun Microsystems, Inc. + 901 San Antonio Road, Palo Alto, CA 94303, USA + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License version 2.1, as published by the Free Software Foundation. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, + MA 02111-1307 USA + + + Sun Industry Standards Source License Version 1.1 + ================================================= + The contents of this file are subject to the Sun Industry Standards + Source License Version 1.1 (the "License"); You may not use this file + except in compliance with the License. You may obtain a copy of the + License at http://www.openoffice.org/license.html. + + Software provided under this License is provided on an "AS IS" basis, + WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, + WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + See the License for the specific provisions governing your rights and + obligations concerning the Software. + + The Initial Developer of the Original Code is: Sun Microsystems, Inc. + + Copyright: 2000 by Sun Microsystems, Inc. + + All Rights Reserved. + + Contributor(s): _______________________________________ + +--> + +<!ELEMENT table:calculation-settings (table:null-date?, table:iteration?)> +<!ATTLIST table:calculation-settings + table:case-sensitive %boolean; "true" + table:precision-as-shown %boolean; "false" + table:search-criteria-must-apply-to-whole-cell %boolean; "true" + table:automatic-find-labels %boolean; "true" + table:use-regular-expressions %boolean; "true" + table:null-year %positiveInteger; "1930" +> +<!ELEMENT table:null-date EMPTY> +<!ATTLIST table:null-date + table:value-type %valueType; #FIXED "date" + table:date-value %date; "1899-12-30" +> +<!ELEMENT table:iteration EMPTY> +<!ATTLIST table:iteration + table:status (enable | disable) "disable" + table:steps %positiveInteger; "100" + table:maximum-difference %float; "0.001" +> + +<!ELEMENT table:tracked-changes (table:cell-content-change | table:insertion | table:deletion | table:movement | table:rejection)*> +<!ATTLIST table:tracked-changes table:track-changes %boolean; "true" + table:protected %boolean; "false" + table:protection-key CDATA #IMPLIED +> + +<!ELEMENT table:dependences (table:dependence)+> +<!ELEMENT table:dependence EMPTY> +<!ATTLIST table:dependence + table:id CDATA #REQUIRED +> +<!ELEMENT table:deletions (table:cell-content-deletion | table:change-deletion)+> +<!ELEMENT table:cell-content-deletion (table:cell-address?, table:change-track-table-cell?)> +<!ATTLIST table:cell-content-deletion + table:id CDATA #IMPLIED +> +<!ELEMENT table:change-deletion EMPTY> +<!ATTLIST table:change-deletion + table:id CDATA #IMPLIED +> +<!ELEMENT table:insertion (office:change-info, table:dependences?, table:deletions?)> +<!ATTLIST table:insertion + table:id CDATA #REQUIRED + table:acceptance-state (accepted | rejected | pending) "pending" + table:rejecting-change-id %positiveInteger; #IMPLIED + table:type (row | column | table) #REQUIRED + table:position %integer; #REQUIRED + table:count %positiveInteger; "1" + table:table %integer; #IMPLIED +> +<!ELEMENT table:deletion (office:change-info, table:dependences?, table:deletions?, table:cut-offs?)> +<!ATTLIST table:deletion + table:id CDATA #REQUIRED + table:acceptance-state (accepted | rejected | pending) "pending" + table:rejecting-change-id %positiveInteger; #IMPLIED + table:type (row | column | table) #REQUIRED + table:position %integer; #REQUIRED + table:count %positiveInteger; "1" + table:table %integer; #IMPLIED + table:multi-deletion-spanned %integer; #IMPLIED +> +<!ELEMENT table:cut-offs (table:movement-cut-off+ | (table:insertion-cut-off, table:movement-cut-off*))> +<!ELEMENT table:insertion-cut-off EMPTY> +<!ATTLIST table:insertion-cut-off + table:id CDATA #REQUIRED + table:position %integer; #REQUIRED +> +<!ELEMENT table:movement-cut-off EMPTY> +<!ATTLIST table:movement-cut-off + table:id CDATA #REQUIRED + table:start-position %integer; #IMPLIED + table:end-position %integer; #IMPLIED + table:position %integer; #IMPLIED +> +<!ELEMENT table:movement (table:source-range-address, table:target-range-address, office:change-info, table:dependences?, table:deletions?)> +<!ATTLIST table:movement + table:id CDATA #REQUIRED + table:acceptance-state (accepted | rejected | pending) "pending" + table:rejecting-change-id %positiveInteger; #IMPLIED +> +<!ELEMENT table:target-range-address EMPTY> +<!ATTLIST table:target-range-address + table:column %integer; #IMPLIED + table:row %integer; #IMPLIED + table:table %integer; #IMPLIED + table:start-column %integer; #IMPLIED + table:start-row %integer; #IMPLIED + table:start-table %integer; #IMPLIED + table:end-column %integer; #IMPLIED + table:end-row %integer; #IMPLIED + table:end-table %integer; #IMPLIED +> +<!ELEMENT table:source-range-address EMPTY> +<!ATTLIST table:source-range-address + table:column %integer; #IMPLIED + table:row %integer; #IMPLIED + table:table %integer; #IMPLIED + table:start-column %integer; #IMPLIED + table:start-row %integer; #IMPLIED + table:start-table %integer; #IMPLIED + table:end-column %integer; #IMPLIED + table:end-row %integer; #IMPLIED + table:end-table %integer; #IMPLIED +> +<!ELEMENT table:change-track-table-cell (text:p*)> +<!ATTLIST table:change-track-table-cell + table:cell-address %cell-address; #IMPLIED + table:matrix-covered (true | false) "false" + table:formula %string; #IMPLIED + table:number-matrix-rows-spanned %positiveInteger; #IMPLIED + table:number-matrix-columns-spanned %positiveInteger; #IMPLIED + table:value-type %valueType; "string" + table:value %float; #IMPLIED + table:date-value %date; #IMPLIED + table:time-value %timeInstance; #IMPLIED + table:string-value %string; #IMPLIED +> +<!ELEMENT table:cell-content-change (table:cell-address, office:change-info, table:dependences?, table:deletions?, table:previous)> +<!ATTLIST table:cell-content-change + table:id CDATA #REQUIRED + table:acceptance-state (accepted | rejected | pending) "pending" + table:rejecting-change-id %positiveInteger; #IMPLIED +> +<!ELEMENT table:cell-address EMPTY> +<!ATTLIST table:cell-address + table:column %integer; #IMPLIED + table:row %integer; #IMPLIED + table:table %integer; #IMPLIED +> +<!ELEMENT table:previous (table:change-track-table-cell)> +<!ATTLIST table:previous + table:id CDATA #IMPLIED +> +<!ELEMENT table:rejection (office:change-info, table:dependences?, table:deletions?)> +<!ATTLIST table:rejection + table:id CDATA #REQUIRED + table:acceptance-state (accepted | rejected | pending) "pending" + table:rejecting-change-id %positiveInteger; #IMPLIED +> + +<!ENTITY % table-columns "table:table-columns | ( table:table-column | table:table-column-group )+"> +<!ENTITY % table-header-columns "table:table-header-columns"> +<!ENTITY % table-rows "table:table-rows | ( table:table-row | table:table-row-group )+"> +<!ENTITY % table-header-rows "table:table-header-rows"> +<!ENTITY % table-column-groups "((%table-columns;),(%table-header-columns;,(%table-columns;)?)?) | (%table-header-columns;,(%table-columns;)?)"> +<!ENTITY % table-row-groups "((%table-rows;),(%table-header-rows;,(%table-rows;)?)?) | (%table-header-rows;,(%table-rows;)?)"> +<!ELEMENT table:table (table:table-source?, table:scenario?, office:forms?, table:shapes?, (%table-column-groups;), (%table-row-groups;))> +<!ATTLIST table:table + table:name %string; #IMPLIED + table:style-name %styleName; #IMPLIED + table:protected %boolean; "false" + table:protection-key CDATA #IMPLIED + table:print-ranges %cell-range-address-list; #IMPLIED +> +<!ELEMENT table:table-source EMPTY> +<!ATTLIST table:table-source + table:mode (copy-all | copy-results-only) "copy-all" + xlink:type (simple) #FIXED "simple" + xlink:actuate (onRequest) "onRequest" + xlink:href %uriReference; #REQUIRED + table:filter-name CDATA #IMPLIED + table:table-name CDATA #IMPLIED + table:filter-options CDATA #IMPLIED + table:refresh-delay %timeDuration; #IMPLIED +> +<!ELEMENT table:scenario EMPTY> +<!ATTLIST table:scenario + table:display-border %boolean; "true" + table:border-color %color; #IMPLIED + table:copy-back %boolean; "true" + table:copy-styles %boolean; "true" + table:copy-formulas %boolean; "true" + table:is-active %boolean; #REQUIRED + table:scenario-ranges %cell-range-address-list; #REQUIRED + table:comment CDATA #IMPLIED +> +<!ELEMENT table:shapes %shapes;> +<!ELEMENT table:table-column-group (table:table-header-columns | table:table-column | table:table-column-group)+> +<!ATTLIST table:table-column-group + table:display %boolean; "true" +> +<!ELEMENT table:table-header-columns (table:table-column | table:table-column-group)+> +<!ELEMENT table:table-columns (table:table-column | table:table-column-group)+> +<!ELEMENT table:table-column EMPTY> +<!ATTLIST table:table-column + table:number-columns-repeated %positiveInteger; "1" + table:style-name %styleName; #IMPLIED + table:visibility (visible | collapse | filter) "visible" + table:default-cell-style-name %styleName; #IMPLIED +> +<!ELEMENT table:table-row-group (table:table-header-rows | table:table-row | table:table-row-group)+> +<!ATTLIST table:table-row-group + table:display %boolean; "true" +> +<!ELEMENT table:table-header-rows (table:table-row | table:table-row-group)+> +<!ELEMENT table:table-rows (table:table-row | table:table-row-group)+> +<!ENTITY % table-cells "(table:table-cell|table:covered-table-cell)+"> +<!ELEMENT table:table-row %table-cells;> +<!ATTLIST table:table-row + table:number-rows-repeated %positiveInteger; "1" + table:style-name %styleName; #IMPLIED + table:visibility (visible | collapse | filter) "visible" + table:default-cell-style-name %styleName; #IMPLIED +> + +<!ENTITY % text-wo-table "(text:h|text:p|text:ordered-list|text:unordered-list|%shapes;)*"> +<!ENTITY % cell-content "(table:cell-range-source?,office:annotation?,table:detective?,(table:sub-table|%text-wo-table;))"> +<!ELEMENT table:table-cell %cell-content;> +<!ELEMENT table:covered-table-cell %cell-content;> +<!ATTLIST table:table-cell + table:number-columns-repeated %positiveInteger; "1" + table:number-rows-spanned %positiveInteger; "1" + table:number-columns-spanned %positiveInteger; "1" + table:style-name %styleName; #IMPLIED + table:validation-name CDATA #IMPLIED + table:formula %string; #IMPLIED + table:number-matrix-rows-spanned %positiveInteger; #IMPLIED + table:number-matrix-columns-spanned %positiveInteger; #IMPLIED + table:value-type %valueType; "string" + table:value %float; #IMPLIED + table:date-value %date; #IMPLIED + table:time-value %timeInstance; #IMPLIED + table:boolean-value %boolean; #IMPLIED + table:string-value %string; #IMPLIED + table:currency %string; #IMPLIED +> +<!ATTLIST table:covered-table-cell + table:number-columns-repeated %positiveInteger; "1" + table:style-name %styleName; #IMPLIED + table:validation-name CDATA #IMPLIED + table:formula %string; #IMPLIED + table:number-matrix-rows-spanned %positiveInteger; #IMPLIED + table:number-matrix-columns-spanned %positiveInteger; #IMPLIED + table:value-type %valueType; "string" + table:value %float; #IMPLIED + table:date-value %date; #IMPLIED + table:time-value %timeInstance; #IMPLIED + table:boolean-value %boolean; #IMPLIED + table:string-value %string; #IMPLIED + table:currency %string; #IMPLIED +> +<!-- cell protection in writer: cell attribute; calc uses format --> +<!ATTLIST table:table-cell table:protected %boolean; "false"> + +<!ELEMENT table:cell-range-source EMPTY> +<!ATTLIST table:cell-range-source + table:name %string; #REQUIRED + xlink:type (simple) #FIXED "simple" + xlink:actuate (onRequest) #FIXED "onRequest" + xlink:href %uriReference; #REQUIRED + table:filter-name %string; #REQUIRED + table:filter-options %string; #IMPLIED + table:last-column-spanned %positiveInteger; #REQUIRED + table:last-row-spanned %positiveInteger; #REQUIRED + table:refresh-delay %timeDuration; #IMPLIED +> + +<!ELEMENT table:detective (table:highlighted-range*, table:operation*)> +<!ELEMENT table:highlighted-range EMPTY> +<!ATTLIST table:highlighted-range + table:cell-range-address %cell-range-address; #IMPLIED + table:direction (from-another-table | to-another-table | from-same-table | to-same-table) #REQUIRED + table:contains-error %boolean; "false" +> +<!ELEMENT table:operation EMPTY> +<!ATTLIST table:operation + table:name (trace-dependents | remove-dependents | trace-precedents | remove-precedents | trace-errors) #REQUIRED + table:index %nonNegativeInteger; #REQUIRED +> + +<!ELEMENT table:content-validations (table:content-validation)+> +<!ELEMENT table:content-validation (table:help-message?, (table:error-message | (table:error-macro, office:events?))?)> +<!ATTLIST table:content-validation + table:name CDATA #REQUIRED + table:condition CDATA #IMPLIED + table:base-cell-address %cell-address; #IMPLIED + table:allow-empty-cell %boolean; #IMPLIED +> +<!ELEMENT table:help-message (text:p*)> +<!ATTLIST table:help-message + table:title CDATA #IMPLIED + table:display %boolean; #IMPLIED +> +<!ELEMENT table:error-message (text:p*)> +<!ATTLIST table:error-message + table:title CDATA #IMPLIED + table:message-type (stop | warning | information) #IMPLIED + table:display %boolean; #IMPLIED +> +<!ELEMENT table:error-macro EMPTY> +<!ATTLIST table:error-macro + table:name CDATA #IMPLIED + table:execute %boolean; #IMPLIED +> + +<!ELEMENT table:sub-table ((%table-column-groups;) , (%table-row-groups;))> + +<!ELEMENT table:label-ranges (table:label-range)*> +<!ELEMENT table:label-range EMPTY> +<!ATTLIST table:label-range + table:label-cell-range-address %cell-range-address; #REQUIRED + table:data-cell-range-address %cell-range-address; #REQUIRED + table:orientation (column | row) #REQUIRED +> + +<!ELEMENT table:named-expressions (table:named-range | table:named-expression)*> +<!ELEMENT table:named-range EMPTY> +<!ATTLIST table:named-range + table:name CDATA #REQUIRED + table:cell-range-address %cell-range-address; #REQUIRED + table:base-cell-address %cell-address; #IMPLIED + table:range-usable-as CDATA "none" +> +<!ELEMENT table:named-expression EMPTY> +<!ATTLIST table:named-expression + table:name CDATA #REQUIRED + table:expression CDATA #REQUIRED + table:base-cell-address %cell-address; #IMPLIED +> + +<!ELEMENT table:filter (table:filter-condition | table:filter-and | table:filter-or)> +<!ATTLIST table:filter + table:target-range-address %cell-range-address; #IMPLIED + table:condition-source-range-address %cell-range-address; #IMPLIED + table:condition-source (self | cell-range) "self" + table:display-duplicates %boolean; "true" +> +<!ELEMENT table:filter-and (table:filter-or | table:filter-condition)+> +<!ELEMENT table:filter-or (table:filter-and | table:filter-condition)+> +<!ELEMENT table:filter-condition EMPTY> +<!ATTLIST table:filter-condition + table:field-number %nonNegativeInteger; #REQUIRED + table:case-sensitive %boolean; "false" + table:data-type (text | number) "text" + table:value CDATA #REQUIRED + table:operator CDATA #REQUIRED +> + +<!ELEMENT table:database-ranges (table:database-range)*> +<!ELEMENT table:database-range ((table:database-source-sql | table:database-source-table | table:database-source-query)?, table:filter?, table:sort?, table:subtotal-rules?)> +<!ATTLIST table:database-range + table:name CDATA #IMPLIED + table:is-selection %boolean; "false" + table:on-update-keep-styles %boolean; "false" + table:on-update-keep-size %boolean; "true" + table:has-persistant-data %boolean; "true" + table:orientation (row | column) "row" + table:contains-header %boolean; "true" + table:display-filter-buttons %boolean; "false" + table:target-range-address %cell-range-address; #REQUIRED + table:refresh-delay %timeDuration; #IMPLIED +> +<!ELEMENT table:database-source-sql EMPTY> +<!ATTLIST table:database-source-sql + table:database-name CDATA #REQUIRED + table:sql-statement CDATA #REQUIRED + table:parse-sql-statements %boolean; "false" +> +<!ELEMENT table:database-source-table EMPTY> +<!ATTLIST table:database-source-table + table:database-name CDATA #REQUIRED + table:table-name CDATA #REQUIRED +> +<!ELEMENT table:database-source-query EMPTY> +<!ATTLIST table:database-source-query + table:database-name CDATA #REQUIRED + table:query-name CDATA #REQUIRED +> + +<!ELEMENT table:sort (table:sort-by)+> +<!ATTLIST table:sort + table:bind-styles-to-content %boolean; "true" + table:target-range-address %cell-range-address; #IMPLIED + table:case-sensitive %boolean; "false" + table:language CDATA #IMPLIED + table:country CDATA #IMPLIED + table:algorithm CDATA #IMPLIED +> +<!ELEMENT table:sort-by EMPTY> +<!ATTLIST table:sort-by + table:field-number %nonNegativeInteger; #REQUIRED + table:data-type (text | number | automatic | qname-but-not-ncname) "automatic" + table:order (ascending | descending) "ascending" +> + +<!ELEMENT table:subtotal-rules (table:sort-groups? | table:subtotal-rule*)?> +<!ATTLIST table:subtotal-rules + table:bind-styles-to-content %boolean; "true" + table:case-sensitive %boolean; "false" + table:page-breaks-on-group-change %boolean; "false" +> +<!ELEMENT table:sort-groups EMPTY> +<!ATTLIST table:sort-groups + table:data-type (text | number | automatic | qname-but-not-ncname) "automatic" + table:order (ascending | descending) "ascending" +> +<!ELEMENT table:subtotal-rule (table:subtotal-field)*> +<!ATTLIST table:subtotal-rule + table:group-by-field-number %nonNegativeInteger; #REQUIRED +> +<!ELEMENT table:subtotal-field EMPTY> +<!ATTLIST table:subtotal-field + table:field-number %nonNegativeInteger; #REQUIRED + table:function CDATA #REQUIRED +> + +<!ELEMENT table:data-pilot-tables (table:data-pilot-table)*> +<!ELEMENT table:data-pilot-table ((table:database-source-sql | table:database-source-table | table:database-source-query | table:source-service | table:source-cell-range)?, table:data-pilot-field+)> +<!ATTLIST table:data-pilot-table + table:name CDATA #REQUIRED + table:application-data CDATA #IMPLIED + table:grand-total (none | row | column | both) "both" + table:ignore-empty-rows %boolean; "false" + table:identify-categories %boolean; "false" + table:target-range-address %cell-range-address; #REQUIRED + table:buttons %cell-range-address-list; #REQUIRED +> +<!ELEMENT table:source-service EMPTY> +<!ATTLIST table:source-service + table:name CDATA #REQUIRED + table:source-name CDATA #REQUIRED + table:object-name CDATA #REQUIRED + table:username CDATA #IMPLIED + table:password CDATA #IMPLIED +> +<!ELEMENT table:source-cell-range (table:filter)?> +<!ATTLIST table:source-cell-range + table:cell-range-address %cell-range-address; #REQUIRED +> +<!ELEMENT table:data-pilot-field (table:data-pilot-level)?> +<!ATTLIST table:data-pilot-field + table:source-field-name CDATA #REQUIRED + table:is-data-layout-field %boolean; "false" + table:function CDATA #REQUIRED + table:orientation (row | column | data | page | hidden) #REQUIRED + table:used-hierarchy %positiveInteger; "1" +> +<!ELEMENT table:data-pilot-level (table:data-pilot-subtotals?, table:data-pilot-members?)> +<!ATTLIST table:data-pilot-level + table:display-empty %boolean; #IMPLIED +> +<!ELEMENT table:data-pilot-subtotals (table:data-pilot-subtotal)*> +<!ELEMENT table:data-pilot-subtotal EMPTY> +<!ATTLIST table:data-pilot-subtotal + table:function CDATA #REQUIRED +> +<!ELEMENT table:data-pilot-members (table:data-pilot-member)*> +<!ELEMENT table:data-pilot-member EMPTY> +<!ATTLIST table:data-pilot-member + table:name CDATA #REQUIRED + table:display %boolean; #IMPLIED + table:display-details %boolean; #IMPLIED +> + +<!ELEMENT table:consolidation EMPTY> +<!ATTLIST table:consolidation + table:function CDATA #REQUIRED + table:source-cell-range-addresses %cell-range-address-list; #REQUIRED + table:target-cell-address %cell-address; #REQUIRED + table:use-label (none | column | row | both) "none" + table:link-to-source-data %boolean; "false" +> + +<!ELEMENT table:dde-links (table:dde-link)+> +<!ELEMENT table:dde-link (office:dde-source, table:table)> diff --git a/chart2/workbench/fileformat/text.mod b/chart2/workbench/fileformat/text.mod new file mode 100644 index 000000000..6a257e4c8 --- /dev/null +++ b/chart2/workbench/fileformat/text.mod @@ -0,0 +1,902 @@ +<!-- + $Id: text.mod,v 1.1.1.1 2003-10-06 09:58:35 bm Exp $ + + The Contents of this file are made available subject to the terms of + either of the following licenses + + - GNU Lesser General Public License Version 2.1 + - Sun Industry Standards Source License Version 1.1 + Sun Microsystems Inc., October, 2000 + GNU Lesser General Public License Version 2.1 + ============================================= + Copyright 2000 by Sun Microsystems, Inc. + 901 San Antonio Road, Palo Alto, CA 94303, USA + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License version 2.1, as published by the Free Software Foundation. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, + MA 02111-1307 USA + Sun Industry Standards Source License Version 1.1 + ================================================= + The contents of this file are subject to the Sun Industry Standards + Source License Version 1.1 (the "License"); You may not use this file + except in compliance with the License. You may obtain a copy of the + License at http://www.openoffice.org/license.html. + Software provided under this License is provided on an "AS IS" basis, + WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, + WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + See the License for the specific provisions governing your rights and + obligations concerning the Software. + The Initial Developer of the Original Code is: Sun Microsystems, Inc. + Copyright: 2000 by Sun Microsystems, Inc. + All Rights Reserved. + Contributor(s): _______________________________________ +--> +<!ENTITY % fields "text:date | + text:time | + text:page-number | + text:page-continuation | + text:sender-firstname | + text:sender-lastname | + text:sender-initials | + text:sender-title | + text:sender-position | + text:sender-email | + text:sender-phone-private | + text:sender-fax | + text:sender-company | + text:sender-phone-work | + text:sender-street | + text:sender-city | + text:sender-postal-code | + text:sender-country | + text:sender-state-or-province | + text:author-name | + text:author-initials | + text:placeholder | + text:variable-set | + text:variable-get | + text:variable-input | + text:user-field-get | + text:user-field-input | + text:sequence | + text:expression | + text:text-input | + text:database-display | + text:database-next | + text:database-row-select | + text:database-row-number | + text:database-name | + text:initial-creator | + text:creation-date | + text:creation-time | + text:description | + text:user-defined | + text:print-time | + text:print-date | + text:printed-by | + text:title | + text:subject | + text:keywords | + text:editing-cycles | + text:editing-duration | + text:modification-time | + text:modification-date | + text:creator | + text:conditional-text | + text:hidden-text | + text:hidden-paragraph | + text:chapter | + text:file-name | + text:template-name | + text:page-variable-set | + text:page-variable-get | + text:execute-macro | + text:dde-connection | + text:reference-ref | + text:sequence-ref | + text:bookmark-ref | + text:footnote-ref | + text:endnote-ref | + text:sheet-name | + text:bibliography-mark | + text:page-count | + text:paragraph-count | + text:word-count | + text:character-count | + text:table-count | + text:image-count | + text:object-count | + office:annotation | + text:script | + text:measure" > +<!ENTITY % inline-text-elements " + text:span|text:tab-stop|text:s|text:line-break| + text:footnote|text:endnote|text:a| + text:bookmark|text:bookmark-start|text:bookmark-end| + text:reference-mark|text:reference-mark-start| + text:reference-mark-end|%fields;|%shape;| + text:toc-mark-start | text:toc-mark-end | + text:toc-mark | text:user-index-mark-start | + text:user-index-mark-end | text:user-index-mark | + text:alphabetical-index-mark-start | + text:alphabetical-index-mark-end | + text:alphabetical-index-mark | + %change-marks; | draw:a | text:ruby"> +<!ENTITY % inline-text "( #PCDATA | %inline-text-elements; )*"> +<!ELEMENT text:p %inline-text;> +<!ELEMENT text:h %inline-text;> +<!ATTLIST text:p text:style-name %styleName; #IMPLIED> +<!ATTLIST text:p text:cond-style-name %styleName; #IMPLIED> +<!ATTLIST text:h text:style-name %styleName; #IMPLIED> +<!ATTLIST text:h text:cond-style-name %styleName; #IMPLIED> +<!ATTLIST text:h text:level %positiveInteger; "1"> +<!ELEMENT text:span %inline-text;> +<!ATTLIST text:span text:style-name %styleName; #REQUIRED> +<!ELEMENT text:a (#PCDATA | office:events | %inline-text-elements;)*> +<!ATTLIST text:a xlink:href %uriReference; #REQUIRED> +<!ATTLIST text:a xlink:type (simple) #FIXED "simple"> +<!ATTLIST text:a xlink:actuate (onRequest) "onRequest"> +<!ATTLIST text:a xlink:show (new|replace) "replace"> +<!ATTLIST text:a office:name %string; #IMPLIED> +<!ATTLIST text:a office:target-frame-name %string; #IMPLIED> +<!ATTLIST text:a text:style-name %styleName; #IMPLIED> +<!ATTLIST text:a text:visited-style-name %styleName; #IMPLIED> +<!ELEMENT text:s EMPTY> +<!ATTLIST text:s text:c %positiveInteger; "1"> +<!ELEMENT text:tab-stop EMPTY> +<!ELEMENT text:line-break EMPTY> +<!ENTITY % list-items "((text:list-header,text:list-item*)|text:list-item+)"> +<!ELEMENT text:ordered-list %list-items;> +<!ELEMENT text:unordered-list %list-items;> +<!ATTLIST text:ordered-list text:style-name %styleName; #IMPLIED> +<!ATTLIST text:unordered-list text:style-name %styleName; #IMPLIED> +<!ATTLIST text:ordered-list text:continue-numbering %boolean; "false"> +<!ELEMENT text:list-header (text:p)+> +<!ELEMENT text:list-item (text:p|text:ordered-list|text:unordered-list)+> +<!ATTLIST text:list-item text:restart-numbering %boolean; "false"> +<!ATTLIST text:list-item text:start-value %positiveInteger; #IMPLIED> +<!ELEMENT text:list-style (text:list-level-style-number| + text:list-level-style-bullet| + text:list-level-style-image)+> +<!ATTLIST text:list-style style:name %styleName; #IMPLIED> +<!ATTLIST text:list-style text:consecutive-numbering %boolean; "false"> +<!ELEMENT text:list-level-style-number (style:properties?)> +<!ATTLIST text:list-level-style-number text:level %positiveInteger; + #REQUIRED> +<!ATTLIST text:list-level-style-number text:style-name %styleName; #IMPLIED> +<!ATTLIST text:list-level-style-number style:num-format %string; #REQUIRED> +<!ATTLIST text:list-level-style-number style:num-prefix %string; #IMPLIED> +<!ATTLIST text:list-level-style-number style:num-suffix %string; #IMPLIED> +<!ATTLIST text:list-level-style-number style:num-letter-sync %boolean; + "false"> +<!ATTLIST text:list-level-style-number text:display-levels %positiveInteger; + "1"> +<!ATTLIST text:list-level-style-number text:start-value %positiveInteger; + "1"> +<!ELEMENT text:list-level-style-bullet (style:properties?)> +<!ATTLIST text:list-level-style-bullet text:level %positiveInteger; #REQUIRED> +<!ATTLIST text:list-level-style-bullet text:style-name %styleName; #IMPLIED> +<!ATTLIST text:list-level-style-bullet text:bullet-char %character; #REQUIRED> +<!ATTLIST text:list-level-style-bullet style:num-prefix %string; #IMPLIED> +<!ATTLIST text:list-level-style-bullet style:num-suffix %string; #IMPLIED> +<!ELEMENT text:list-level-style-image (style:properties?,office:binary-data?)> +<!ATTLIST text:list-level-style-image text:level %positiveInteger; #REQUIRED> +<!ATTLIST text:list-level-style-image xlink:type (simple) #IMPLIED> +<!ATTLIST text:list-level-style-image xlink:href %uriReference; #IMPLIED> +<!ATTLIST text:list-level-style-image xlink:actuate (onLoad) #IMPLIED> +<!ATTLIST text:list-level-style-image xlink:show (embed) #IMPLIED> +<!-- list properties --> +<!ATTLIST style:properties text:space-before %nonNegativeLength; #IMPLIED> +<!ATTLIST style:properties text:min-label-width %nonNegativeLength; #IMPLIED> +<!ATTLIST style:properties text:min-label-distance %nonNegativeLength; #IMPLIED> +<!ATTLIST style:properties text:enable-numbering %boolean; #IMPLIED> +<!ATTLIST style:properties style:list-style-name %styleName; #IMPLIED> +<!ELEMENT text:outline-style (text:outline-level-style)+> +<!ELEMENT text:outline-level-style (style:properties?)> +<!ATTLIST text:outline-level-style text:level %positiveInteger; + #REQUIRED> +<!ATTLIST text:outline-level-style text:style-name %styleName; #IMPLIED> +<!ATTLIST text:outline-level-style style:num-format %string; #REQUIRED> +<!ATTLIST text:outline-level-style style:num-prefix %string; #IMPLIED> +<!ATTLIST text:outline-level-style style:num-suffix %string; #IMPLIED> +<!ATTLIST text:outline-level-style style:num-letter-sync %boolean; + "false"> +<!ATTLIST text:outline-level-style text:display-levels %positiveInteger; + "1"> +<!ATTLIST text:outline-level-style text:start-value %positiveInteger; + "1"> +<!ENTITY % field-declarations "text:variable-decls?, + text:user-field-decls?, + text:sequence-decls?"> +<!ENTITY % variableName "CDATA"> +<!ENTITY % formula "CDATA"> +<!ENTITY % valueAttr "text:value-type %valueType; #IMPLIED + text:currency CDATA #IMPLIED" > +<!ENTITY % valueAndTypeAttr "%valueAttr; + text:value %float; #IMPLIED + text:date-value %date; #IMPLIED + text:time-value %timeInstance; #IMPLIED + text:boolean-value %boolean; #IMPLIED + text:string-value %string; #IMPLIED" > +<!ENTITY % numFormat 'style:num-format CDATA #IMPLIED + style:num-letter-sync %boolean; "false"'> +<!ELEMENT text:date (#PCDATA)> +<!ATTLIST text:date text:date-value %timeInstance; #IMPLIED> +<!ATTLIST text:date text:date-adjust %dateDuration; #IMPLIED> +<!ATTLIST text:date text:fixed %boolean; "false"> +<!ATTLIST text:date style:data-style-name %styleName; #IMPLIED> +<!ELEMENT text:time (#PCDATA)> +<!ATTLIST text:time text:time-value %timeInstance; #IMPLIED> +<!ATTLIST text:time text:time-adjust %timeDuration; #IMPLIED> +<!ATTLIST text:time text:fixed %boolean; "false"> +<!ATTLIST text:time style:data-style-name %styleName; #IMPLIED> +<!ELEMENT text:page-number (#PCDATA)> +<!ATTLIST text:page-number text:page-adjust %positiveInteger; #IMPLIED> +<!ATTLIST text:page-number text:select-page (previous|current|next) "current"> +<!ATTLIST text:page-number %numFormat;> +<!ELEMENT text:page-continuation (#PCDATA)> +<!ATTLIST text:page-continuation text:select-page (previous|next) #REQUIRED> +<!ATTLIST text:page-continuation text:string-value %string; #IMPLIED> +<!ELEMENT text:sender-firstname (#PCDATA)> +<!ATTLIST text:sender-firstname text:fixed %boolean; "true"> +<!ELEMENT text:sender-lastname (#PCDATA)> +<!ATTLIST text:sender-lastname text:fixed %boolean; "true"> +<!ELEMENT text:sender-initials (#PCDATA)> +<!ATTLIST text:sender-initials text:fixed %boolean; "true"> +<!ELEMENT text:sender-title (#PCDATA)> +<!ATTLIST text:sender-title text:fixed %boolean; "true"> +<!ELEMENT text:sender-position (#PCDATA)> +<!ATTLIST text:sender-position text:fixed %boolean; "true"> +<!ELEMENT text:sender-email (#PCDATA)> +<!ATTLIST text:sender-email text:fixed %boolean; "true"> +<!ELEMENT text:sender-phone-private (#PCDATA)> +<!ATTLIST text:sender-phone-private text:fixed %boolean; "true"> +<!ELEMENT text:sender-fax (#PCDATA)> +<!ATTLIST text:sender-fax text:fixed %boolean; "true"> +<!ELEMENT text:sender-company (#PCDATA)> +<!ATTLIST text:sender-company text:fixed %boolean; "true"> +<!ELEMENT text:sender-phone-work (#PCDATA)> +<!ATTLIST text:sender-phone-work text:fixed %boolean; "true"> +<!ELEMENT text:sender-street (#PCDATA)> +<!ATTLIST text:sender-street text:fixed %boolean; "true"> +<!ELEMENT text:sender-city (#PCDATA)> +<!ATTLIST text:sender-city text:fixed %boolean; "true"> +<!ELEMENT text:sender-postal-code (#PCDATA)> +<!ATTLIST text:sender-postal-code text:fixed %boolean; "true"> +<!ELEMENT text:sender-country (#PCDATA)> +<!ATTLIST text:sender-country text:fixed %boolean; "true"> +<!ELEMENT text:sender-state-or-province (#PCDATA)> +<!ATTLIST text:sender-state-or-province text:fixed %boolean; "true"> +<!ELEMENT text:author-name (#PCDATA)> +<!ATTLIST text:author-name text:fixed %boolean; "true"> +<!ELEMENT text:author-initials (#PCDATA)> +<!ATTLIST text:author-initials text:fixed %boolean; "true"> +<!ELEMENT text:placeholder (#PCDATA)> +<!ATTLIST text:placeholder text:placeholder-type (text|table|text-box|image|object) #REQUIRED> +<!ATTLIST text:placeholder text:description %string; #IMPLIED> +<!ELEMENT text:variable-decls (text:variable-decl)*> +<!ELEMENT text:variable-decl EMPTY> +<!ATTLIST text:variable-decl text:name %variableName; #REQUIRED> +<!ATTLIST text:variable-decl %valueAndTypeAttr;> +<!ELEMENT text:variable-set (#PCDATA)> +<!ATTLIST text:variable-set text:name %variableName; #REQUIRED> +<!ATTLIST text:variable-set text:formula %formula; #IMPLIED> +<!ATTLIST text:variable-set %valueAndTypeAttr;> +<!ATTLIST text:variable-set text:display (value|none) "value"> +<!ATTLIST text:variable-set style:data-style-name %styleName; #IMPLIED> +<!ELEMENT text:variable-get (#PCDATA)> +<!ATTLIST text:variable-get text:name %variableName; #REQUIRED> +<!ATTLIST text:variable-get text:display (value|formula) "value"> +<!ATTLIST text:variable-get style:data-style-name %styleName; #IMPLIED> +<!ATTLIST text:variable-get %valueAttr;> +<!ELEMENT text:variable-input (#PCDATA)> +<!ATTLIST text:variable-input text:name %variableName; #REQUIRED> +<!ATTLIST text:variable-input text:description %string; #IMPLIED> +<!ATTLIST text:variable-input %valueAndTypeAttr;> +<!ATTLIST text:variable-input text:display (value|none) "value"> +<!ATTLIST text:variable-input style:data-style-name %styleName; #IMPLIED> +<!ELEMENT text:user-field-decls (text:user-field-decl)*> +<!ELEMENT text:user-field-decl EMPTY> +<!ATTLIST text:user-field-decl text:name %variableName; #REQUIRED> +<!ATTLIST text:user-field-decl text:formula %formula; #IMPLIED> +<!ATTLIST text:user-field-decl %valueAndTypeAttr;> +<!ELEMENT text:user-field-get (#PCDATA)> +<!ATTLIST text:user-field-get text:name %variableName; #REQUIRED> +<!ATTLIST text:user-field-get text:display (value|formula|none) "value"> +<!ATTLIST text:user-field-get style:data-style-name %styleName; #IMPLIED> +<!ELEMENT text:user-field-input (#PCDATA)> +<!ATTLIST text:user-field-input text:name %variableName; #REQUIRED> +<!ATTLIST text:user-field-input text:description %string; #IMPLIED> +<!ATTLIST text:user-field-input style:data-style-name %styleName; #IMPLIED> +<!ELEMENT text:sequence-decls (text:sequence-decl)*> +<!ELEMENT text:sequence-decl EMPTY> +<!ATTLIST text:sequence-decl text:name %variableName; #REQUIRED> +<!ATTLIST text:sequence-decl text:display-outline-level %positiveInteger; "0"> +<!ATTLIST text:sequence-decl text:separation-character %character; "."> +<!ELEMENT text:sequence (#PCDATA)> +<!ATTLIST text:sequence text:name %variableName; #REQUIRED> +<!ATTLIST text:sequence text:formula %formula; #IMPLIED> +<!ATTLIST text:sequence %numFormat;> +<!ATTLIST text:sequence text:ref-name ID #IMPLIED> +<!ELEMENT text:expression (#PCDATA)> +<!ATTLIST text:expression text:formula %formula; #IMPLIED> +<!ATTLIST text:expression text:display (value|formula ) "value"> +<!ATTLIST text:expression %valueAndTypeAttr;> +<!ATTLIST text:expression style:data-style-name %styleName; #IMPLIED> +<!ELEMENT text:text-input (#PCDATA)> +<!ATTLIST text:text-input text:description %string; #IMPLIED> +<!ENTITY % database-table "text:database-name CDATA #REQUIRED + text:table-name CDATA #REQUIRED"> +<!ELEMENT text:database-display (#PCDATA)> +<!ATTLIST text:database-display %database-table;> +<!ATTLIST text:database-display text:column-name %string; #REQUIRED> +<!ATTLIST text:database-display style:data-style-name %styleName; #IMPLIED> +<!ELEMENT text:database-next (#PCDATA)> +<!ATTLIST text:database-next %database-table;> +<!ATTLIST text:database-next text:condition %formula; #IMPLIED> +<!ELEMENT text:database-row-select (#PCDATA)> +<!ATTLIST text:database-row-select %database-table;> +<!ATTLIST text:database-row-select text:condition %formula; #IMPLIED> +<!ATTLIST text:database-row-select text:row-number %integer; #REQUIRED> +<!ELEMENT text:database-row-number (#PCDATA)> +<!ATTLIST text:database-row-number %database-table;> +<!ATTLIST text:database-row-number %numFormat;> +<!ATTLIST text:database-row-number text:value %integer; #IMPLIED> +<!ELEMENT text:database-name (#PCDATA)> +<!ATTLIST text:database-name %database-table;> +<!ELEMENT text:initial-creator (#PCDATA)> +<!ATTLIST text:initial-creator text:fixed %boolean; "false"> +<!ELEMENT text:creation-date (#PCDATA)> +<!ATTLIST text:creation-date text:fixed %boolean; "false"> +<!ATTLIST text:creation-date text:date-value %date; #IMPLIED> +<!ATTLIST text:creation-date style:data-style-name %styleName; #IMPLIED> +<!ELEMENT text:creation-time (#PCDATA)> +<!ATTLIST text:creation-time text:fixed %boolean; "false"> +<!ATTLIST text:creation-time text:time-value %timeInstance; #IMPLIED> +<!ATTLIST text:creation-time style:data-style-name %styleName; #IMPLIED> +<!ELEMENT text:description (#PCDATA)> +<!ATTLIST text:description text:fixed %boolean; "false"> +<!ELEMENT text:user-defined (#PCDATA)> +<!ATTLIST text:user-defined text:fixed %boolean; "false"> +<!ATTLIST text:user-defined text:name %string; #REQUIRED> +<!ELEMENT text:print-time (#PCDATA)> +<!ATTLIST text:print-time text:fixed %boolean; "false"> +<!ATTLIST text:print-time text:time-value %timeInstance; #IMPLIED> +<!ATTLIST text:print-time style:data-style-name %styleName; #IMPLIED> +<!ELEMENT text:print-date (#PCDATA)> +<!ATTLIST text:print-date text:fixed %boolean; "false"> +<!ATTLIST text:print-date text:date-value %date; #IMPLIED> +<!ATTLIST text:print-date style:data-style-name %styleName; #IMPLIED> +<!ELEMENT text:printed-by (#PCDATA)> +<!ATTLIST text:printed-by text:fixed %boolean; "false"> +<!ELEMENT text:title (#PCDATA)> +<!ATTLIST text:title text:fixed %boolean; "false"> +<!ELEMENT text:subject (#PCDATA)> +<!ATTLIST text:subject text:fixed %boolean; "false"> +<!ELEMENT text:keywords (#PCDATA)> +<!ATTLIST text:keywords text:fixed %boolean; "false"> +<!ELEMENT text:editing-cycles (#PCDATA)> +<!ATTLIST text:editing-cycles text:fixed %boolean; "false"> +<!ELEMENT text:editing-duration (#PCDATA)> +<!ATTLIST text:editing-duration text:fixed %boolean; "false"> +<!ATTLIST text:editing-duration text:duration %timeDuration; #IMPLIED> +<!ATTLIST text:editing-duration style:data-style-name %styleName; #IMPLIED> +<!ELEMENT text:modification-time (#PCDATA)> +<!ATTLIST text:modification-time text:fixed %boolean; "false"> +<!ATTLIST text:modification-time text:time-value %timeInstance; #IMPLIED> +<!ATTLIST text:modification-time style:data-style-name %styleName; #IMPLIED> +<!ELEMENT text:modification-date (#PCDATA)> +<!ATTLIST text:modification-date text:fixed %boolean; "false"> +<!ATTLIST text:modification-date text:date-value %date; #IMPLIED> +<!ATTLIST text:modification-date style:data-style-name %styleName; #IMPLIED> +<!ELEMENT text:creator (#PCDATA)> +<!ATTLIST text:creator text:fixed %boolean; "false"> +<!ELEMENT text:conditional-text (#PCDATA)> +<!ATTLIST text:conditional-text text:condition %formula; #REQUIRED> +<!ATTLIST text:conditional-text text:string-value-if-false %string; #REQUIRED> +<!ATTLIST text:conditional-text text:string-value-if-true %string; #REQUIRED> +<!ATTLIST text:conditional-text text:current-value %boolean; "false"> +<!ELEMENT text:hidden-text (#PCDATA)> +<!ATTLIST text:hidden-text text:condition %formula; #REQUIRED> +<!ATTLIST text:hidden-text text:string-value %string; #REQUIRED> +<!ATTLIST text:hidden-text text:is-hidden %boolean; "false"> +<!ELEMENT text:hidden-paragraph EMPTY> +<!ATTLIST text:hidden-paragraph text:condition %formula; #REQUIRED> +<!ATTLIST text:hidden-paragraph text:is-hidden %boolean; "false"> +<!ELEMENT text:chapter (#PCDATA)> +<!ATTLIST text:chapter text:display (name|number|number-and-name| + plain-number-and-name|plain-number) + "number-and-name"> +<!ATTLIST text:chapter text:outline-level %integer; "1"> +<!ELEMENT text:file-name (#PCDATA)> +<!ATTLIST text:file-name text:display (full|path|name|name-and-extension) + "full"> +<!ATTLIST text:file-name text:fixed %boolean; "false"> +<!ELEMENT text:template-name (#PCDATA)> +<!ATTLIST text:template-name text:display (full|path|name|name-and-extension| + area|title) "full"> +<!ELEMENT text:page-variable-set EMPTY> +<!ATTLIST text:page-variable-set text:active %boolean; "true"> +<!ATTLIST text:page-variable-set text:page-adjust %integer; "0"> +<!ELEMENT text:page-variable-get (#PCDATA)> +<!ATTLIST text:page-variable-get %numFormat;> +<!ELEMENT text:execute-macro (#PCDATA|office:events)* > +<!ATTLIST text:execute-macro text:description %string; #IMPLIED> +<!ELEMENT text:dde-connection-decls (text:dde-connection-decl)*> +<!ELEMENT text:dde-connection-decl EMPTY> +<!ATTLIST text:dde-connection-decl text:name %string; #REQUIRED> +<!ATTLIST text:dde-connection-decl office:dde-application %string; #REQUIRED> +<!ATTLIST text:dde-connection-decl office:dde-topic %string; #REQUIRED> +<!ATTLIST text:dde-connection-decl office:dde-item %string; #REQUIRED> +<!ATTLIST text:dde-connection-decl office:automatic-update %boolean; "false"> +<!ELEMENT text:dde-connection (#PCDATA)> +<!ATTLIST text:dde-connection text:connection-name %string; #REQUIRED> +<!ELEMENT text:reference-ref (#PCDATA)> +<!ATTLIST text:reference-ref text:ref-name %string; #REQUIRED> +<!ATTLIST text:reference-ref text:reference-format (page|chapter|text|direction) #IMPLIED> +<!ELEMENT text:sequence-ref (#PCDATA)> +<!ATTLIST text:sequence-ref text:ref-name %string; #REQUIRED> +<!ATTLIST text:sequence-ref text:reference-format (page|chapter|text|direction|category-and-value|caption|value) #IMPLIED> +<!ELEMENT text:bookmark-ref (#PCDATA)> +<!ATTLIST text:bookmark-ref text:ref-name %string; #REQUIRED> +<!ATTLIST text:bookmark-ref text:reference-format (page|chapter|text|direction) #IMPLIED> +<!ELEMENT text:footnote-ref (#PCDATA)> +<!ATTLIST text:footnote-ref text:ref-name %string; #REQUIRED> +<!ATTLIST text:footnote-ref text:reference-format (page|chapter|text|direction) #IMPLIED> +<!ELEMENT text:endnote-ref (#PCDATA)> +<!ATTLIST text:endnote-ref text:ref-name %string; #REQUIRED> +<!ATTLIST text:endnote-ref text:reference-format (page|chapter|text|direction) #IMPLIED> +<!ELEMENT text:sheet-name (#PCDATA)> +<!ELEMENT text:page-count (#PCDATA)> +<!ATTLIST text:page-count style:num-format %string; #IMPLIED> +<!ATTLIST text:page-count style:num-letter-sync %boolean; "false"> +<!ELEMENT text:paragraph-count (#PCDATA)> +<!ATTLIST text:paragraph-count style:num-format %string; #IMPLIED> +<!ATTLIST text:paragraph-count style:num-letter-sync %boolean; "false"> +<!ELEMENT text:word-count (#PCDATA)> +<!ATTLIST text:word-count style:num-format %string; #IMPLIED> +<!ATTLIST text:word-count style:num-letter-sync %boolean; "false"> +<!ELEMENT text:character-count (#PCDATA)> +<!ATTLIST text:character-count style:num-format %string; #IMPLIED> +<!ATTLIST text:character-count style:num-letter-sync %boolean; "false"> +<!ELEMENT text:table-count (#PCDATA)> +<!ATTLIST text:table-count style:num-format %string; #IMPLIED> +<!ATTLIST text:table-count style:num-letter-sync %boolean; "false"> +<!ELEMENT text:image-count (#PCDATA)> +<!ATTLIST text:image-count style:num-format %string; #IMPLIED> +<!ATTLIST text:image-count style:num-letter-sync %boolean; "false"> +<!ELEMENT text:object-count (#PCDATA)> +<!ATTLIST text:object-count style:num-format %string; #IMPLIED> +<!ATTLIST text:object-count style:num-letter-sync %boolean; "false"> +<!ELEMENT text:bibliography-mark (#PCDATA)> +<!ATTLIST text:bibliography-mark text:bibliography-type + ( article | book | booklet | conference | custom1 | custom2 | custom3 | + custom4 | custom5 | email | inbook | incollection | inproceedings | + journal | manual | mastersthesis | misc | phdthesis | proceedings | + techreport | unpublished | www ) #REQUIRED > +<!ATTLIST text:bibliography-mark text:identifier CDATA #IMPLIED> +<!ATTLIST text:bibliography-mark text:address CDATA #IMPLIED> +<!ATTLIST text:bibliography-mark text:annote CDATA #IMPLIED> +<!ATTLIST text:bibliography-mark text:author CDATA #IMPLIED> +<!ATTLIST text:bibliography-mark text:booktitle CDATA #IMPLIED> +<!ATTLIST text:bibliography-mark text:chapter CDATA #IMPLIED> +<!ATTLIST text:bibliography-mark text:edition CDATA #IMPLIED> +<!ATTLIST text:bibliography-mark text:editor CDATA #IMPLIED> +<!ATTLIST text:bibliography-mark text:howpublished CDATA #IMPLIED> +<!ATTLIST text:bibliography-mark text:institution CDATA #IMPLIED> +<!ATTLIST text:bibliography-mark text:journal CDATA #IMPLIED> +<!ATTLIST text:bibliography-mark text:month CDATA #IMPLIED> +<!ATTLIST text:bibliography-mark text:note CDATA #IMPLIED> +<!ATTLIST text:bibliography-mark text:number CDATA #IMPLIED> +<!ATTLIST text:bibliography-mark text:organizations CDATA #IMPLIED> +<!ATTLIST text:bibliography-mark text:pages CDATA #IMPLIED> +<!ATTLIST text:bibliography-mark text:publisher CDATA #IMPLIED> +<!ATTLIST text:bibliography-mark text:school CDATA #IMPLIED> +<!ATTLIST text:bibliography-mark text:series CDATA #IMPLIED> +<!ATTLIST text:bibliography-mark text:title CDATA #IMPLIED> +<!ATTLIST text:bibliography-mark text:report-type CDATA #IMPLIED> +<!ATTLIST text:bibliography-mark text:volume CDATA #IMPLIED> +<!ATTLIST text:bibliography-mark text:year CDATA #IMPLIED> +<!ATTLIST text:bibliography-mark text:url CDATA #IMPLIED> +<!ATTLIST text:bibliography-mark text:custom1 CDATA #IMPLIED> +<!ATTLIST text:bibliography-mark text:custom2 CDATA #IMPLIED> +<!ATTLIST text:bibliography-mark text:custom3 CDATA #IMPLIED> +<!ATTLIST text:bibliography-mark text:custom4 CDATA #IMPLIED> +<!ATTLIST text:bibliography-mark text:custom5 CDATA #IMPLIED> +<!ATTLIST text:bibliography-mark text:isbn CDATA #IMPLIED> +<!ELEMENT text:bookmark EMPTY> +<!ATTLIST text:bookmark text:name CDATA #REQUIRED> +<!ELEMENT text:bookmark-start EMPTY> +<!ATTLIST text:bookmark-start text:name CDATA #REQUIRED> +<!ELEMENT text:bookmark-end EMPTY> +<!ATTLIST text:bookmark-end text:name CDATA #REQUIRED> +<!ELEMENT text:reference-mark EMPTY> +<!ATTLIST text:reference-mark text:name CDATA #REQUIRED> +<!ELEMENT text:reference-mark-start EMPTY> +<!ATTLIST text:reference-mark-start text:name CDATA #REQUIRED> +<!ELEMENT text:reference-mark-end EMPTY> +<!ATTLIST text:reference-mark-end text:name CDATA #REQUIRED> +<!ELEMENT text:footnotes-configuration (text:footnote-continuation-notice-forward?,text:footnote-continuation-notice-backward?)> +<!ATTLIST text:footnotes-configuration style:num-prefix %string; #IMPLIED> +<!ATTLIST text:footnotes-configuration style:num-suffix %string; #IMPLIED> +<!ATTLIST text:footnotes-configuration style:num-format %string; #IMPLIED> +<!ATTLIST text:footnotes-configuration style:num-letter-sync %string; #IMPLIED> +<!ATTLIST text:footnotes-configuration text:citation-body-style-name %styleName; #IMPLIED> +<!ATTLIST text:footnotes-configuration text:citation-style-name %styleName; #IMPLIED> +<!ATTLIST text:footnotes-configuration text:default-style-name %styleName; #IMPLIED> +<!ATTLIST text:footnotes-configuration text:master-page-name %styleName; #IMPLIED> +<!ATTLIST text:footnotes-configuration text:start-value %integer; #IMPLIED> +<!ATTLIST text:footnotes-configuration text:footnotes-position (document|page) "page"> +<!ATTLIST text:footnotes-configuration text:start-numbering-at (document|chapter|page) "document"> +<!ELEMENT text:footnote-continuation-notice-forward (#PCDATA)> +<!ELEMENT text:footnote-continuation-notice-backward (#PCDATA)> +<!ELEMENT text:endnotes-configuration EMPTY> +<!ATTLIST text:endnotes-configuration style:num-prefix %string; #IMPLIED> +<!ATTLIST text:endnotes-configuration style:num-suffix %string; #IMPLIED> +<!ATTLIST text:endnotes-configuration style:num-format %string; #IMPLIED> +<!ATTLIST text:endnotes-configuration style:num-letter-sync %string; #IMPLIED> +<!ATTLIST text:endnotes-configuration text:start-value %integer; #IMPLIED> +<!ATTLIST text:endnotes-configuration text:citation-style-name %styleName; #IMPLIED> +<!ATTLIST text:endnotes-configuration text:citation-body-style-name %styleName; #IMPLIED> +<!ATTLIST text:endnotes-configuration text:default-style-name %styleName; #IMPLIED> +<!ATTLIST text:endnotes-configuration text:master-page-name %styleName; #IMPLIED> +<!-- Validity constraint: text:footnote and text:endnote elements may not + contain other text:footnote or text:endnote elements, even though the DTD + allows this (via the %text; in the foot-/endnote-body). + Unfortunatetly, this constraint cannot be easily specified in the DTD. +--> +<!ELEMENT text:footnote (text:footnote-citation, text:footnote-body)> +<!ATTLIST text:footnote text:id ID #IMPLIED> +<!ELEMENT text:footnote-citation (#PCDATA)> +<!ATTLIST text:footnote-citation text:label %string; #IMPLIED> +<!ELEMENT text:footnote-body (text:h|text:p| + text:ordered-list|text:unordered-list)*> +<!ELEMENT text:endnote (text:endnote-citation, text:endnote-body)> +<!ATTLIST text:endnote text:id ID #IMPLIED> +<!ELEMENT text:endnote-citation (#PCDATA)> +<!ATTLIST text:endnote-citation text:label %string; #IMPLIED> +<!ELEMENT text:endnote-body (text:h|text:p| + text:ordered-list|text:unordered-list)*> +<!ENTITY % sectionText "(text:h|text:p|text:ordered-list| + text:unordered-list|table:table|text:section| + text:table-of-content|text:illustration-index| + text:table-index|text:object-index|text:user-index| + text:alphabetical-index|text:bibliography| + text:index-title|%change-marks;)*"> +<!ENTITY % sectionAttr "text:name CDATA #REQUIRED + text:style-name %styleName; #IMPLIED + text:protected %boolean; 'false' "> +<!ELEMENT text:section ((text:section-source|office:dde-source)?, + %sectionText;) > +<!ATTLIST text:section %sectionAttr;> +<!ATTLIST text:section text:display (true|none|condition) "true"> +<!ATTLIST text:section text:condition %formula; #IMPLIED> +<!ATTLIST text:section text:protection-key CDATA #IMPLIED> +<!ELEMENT text:section-source EMPTY> +<!ATTLIST text:section-source xlink:href %string; #IMPLIED> +<!ATTLIST text:section-source xlink:type (simple) #FIXED "simple"> +<!ATTLIST text:section-source xlink:show (embed) #FIXED "embed"> +<!ATTLIST text:section-source text:section-name %string; #IMPLIED> +<!ATTLIST text:section-source text:filter-name %string; #IMPLIED> +<!ELEMENT text:table-of-content (text:table-of-content-source, + text:index-body) > +<!ATTLIST text:table-of-content %sectionAttr;> +<!ELEMENT text:table-of-content-source (text:index-title-template? , + text:table-of-content-entry-template*, + text:index-source-styles* ) > +<!ATTLIST text:table-of-content-source text:outline-level %integer; #IMPLIED> +<!ATTLIST text:table-of-content-source text:use-index-marks %boolean; "true"> +<!ATTLIST text:table-of-content-source text:use-index-source-styles + %boolean; "false"> +<!ATTLIST text:table-of-content-source text:index-scope (document|chapter) + "document"> +<!ATTLIST text:table-of-content-source text:relative-tab-stop-position + %boolean; "true"> +<!ATTLIST text:table-of-content-source fo:language %string; #IMPLIED> +<!ATTLIST text:table-of-content-source fo:country %string; #IMPLIED> +<!ATTLIST text:table-of-content-source text:sort-algorithm %string; #IMPLIED> +<!ELEMENT text:table-of-content-entry-template (text:index-entry-chapter-number | + text:index-entry-page-number | + text:index-entry-text | + text:index-entry-span | + text:index-entry-tab-stop | + text:index-entry-link-start | + text:index-entry-link-end)* > +<!ATTLIST text:table-of-content-entry-template text:outline-level + %integer; #REQUIRED> +<!ATTLIST text:table-of-content-entry-template text:style-name + %styleName; #REQUIRED> +<!ELEMENT text:illustration-index + (text:illustration-index-source, text:index-body)> +<!ATTLIST text:illustration-index %sectionAttr;> +<!ELEMENT text:illustration-index-source (text:index-title-template?, + text:illustration-index-entry-template?) > +<!ATTLIST text:illustration-index-source text:index-scope + (document|chapter) "document"> +<!ATTLIST text:illustration-index-source text:relative-tab-stop-position + %boolean; "true"> +<!ATTLIST text:illustration-index-source text:use-caption %boolean; "true"> +<!ATTLIST text:illustration-index-source text:caption-sequence-name + %string; #IMPLIED> +<!ATTLIST text:illustration-index-source text:caption-sequence-format + (text|category-and-value|caption) "text"> +<!ATTLIST text:illustration-index-source fo:language %string; #IMPLIED> +<!ATTLIST text:illustration-index-source fo:country %string; #IMPLIED> +<!ATTLIST text:illustration-index-source text:sort-algorithm %string; #IMPLIED> +<!ELEMENT text:illustration-index-entry-template + ( text:index-entry-page-number | + text:index-entry-text | + text:index-entry-span | + text:index-entry-tab-stop )* > +<!ATTLIST text:illustration-index-entry-template text:style-name + %styleName; #REQUIRED> +<!ELEMENT text:table-index (text:table-index-source, text:index-body)> +<!ATTLIST text:table-index %sectionAttr;> +<!ELEMENT text:table-index-source (text:index-title-template?, + text:table-index-entry-template?) > +<!ATTLIST text:table-index-source text:index-scope + (document|chapter) "document"> +<!ATTLIST text:table-index-source text:relative-tab-stop-position + %boolean; "true"> +<!ATTLIST text:table-index-source text:use-caption %boolean; "true"> +<!ATTLIST text:table-index-source text:caption-sequence-name + %string; #IMPLIED> +<!ATTLIST text:table-index-source text:caption-sequence-format + (text|category-and-value|caption) "text"> +<!ATTLIST text:table-index-source fo:language %string; #IMPLIED> +<!ATTLIST text:table-index-source fo:country %string; #IMPLIED> +<!ATTLIST text:table-index-source text:sort-algorithm %string; #IMPLIED> +<!ELEMENT text:table-index-entry-template ( text:index-entry-page-number | + text:index-entry-text | + text:index-entry-span | + text:index-entry-tab-stop )* > +<!ATTLIST text:table-index-entry-template text:style-name + %styleName; #REQUIRED> +<!ELEMENT text:object-index ( text:object-index-source, text:index-body ) > +<!ATTLIST text:object-index %sectionAttr;> +<!ELEMENT text:object-index-source ( text:index-title-template?, + text:object-index-entry-template? ) > +<!ATTLIST text:object-index-source text:index-scope + (document|chapter) "document"> +<!ATTLIST text:object-index-source text:relative-tab-stop-position + %boolean; "true"> +<!ATTLIST text:object-index-source text:use-spreadsheet-objects + %boolean; "false"> +<!ATTLIST text:object-index-source text:use-draw-objects %boolean; "false"> +<!ATTLIST text:object-index-source text:use-chart-objects %boolean; "false"> +<!ATTLIST text:object-index-source text:use-other-objects %boolean; "false"> +<!ATTLIST text:object-index-source text:use-math-objects %boolean; "false"> +<!ATTLIST text:object-index-source fo:language %string; #IMPLIED> +<!ATTLIST text:object-index-source fo:country %string; #IMPLIED> +<!ATTLIST text:object-index-source text:sort-algorithm %string; #IMPLIED> +<!ELEMENT text:object-index-entry-template ( text:index-entry-page-number | + text:index-entry-text | + text:index-entry-span | + text:index-entry-tab-stop )* > +<!ATTLIST text:object-index-entry-template text:style-name + %styleName; #REQUIRED > +<!ELEMENT text:user-index (text:user-index-source, text:index-body) > +<!ATTLIST text:user-index %sectionAttr;> +<!ELEMENT text:user-index-source ( text:index-title-template?, + text:user-index-entry-template*, + text:index-source-styles* ) > +<!ATTLIST text:user-index-source text:index-scope + (document|chapter) "document"> +<!ATTLIST text:user-index-source text:relative-tab-stop-position + %boolean; "true"> +<!ATTLIST text:user-index-source text:use-index-marks %boolean; "false"> +<!ATTLIST text:user-index-source text:use-graphics %boolean; "false"> +<!ATTLIST text:user-index-source text:use-tables %boolean; "false"> +<!ATTLIST text:user-index-source text:use-floating-frames %boolean; "false"> +<!ATTLIST text:user-index-source text:use-objects %boolean; "false"> +<!ATTLIST text:user-index-source text:use-index-source-styles + %boolean; "false"> +<!ATTLIST text:user-index-source text:copy-outline-levels %boolean; "false"> +<!ATTLIST text:user-index-source fo:language %string; #IMPLIED> +<!ATTLIST text:user-index-source fo:country %string; #IMPLIED> +<!ATTLIST text:user-index-source text:sort-algorithm %string; #IMPLIED> +<!ATTLIST text:user-index-source text:index-name %string; #IMPLIED> +<!ELEMENT text:user-index-entry-template ( text:index-entry-chapter | + text:index-entry-page-number | + text:index-entry-text | + text:index-entry-span | + text:index-entry-tab-stop )* > +<!ATTLIST text:user-index-entry-template text:outline-level %integer; #REQUIRED> +<!ATTLIST text:user-index-entry-template text:style-name %styleName; #REQUIRED> +<!ELEMENT text:alphabetical-index (text:alphabetical-index-source, + text:index-body)> +<!ATTLIST text:alphabetical-index %sectionAttr;> +<!ELEMENT text:alphabetical-index-source ( text:index-title-template?, + text:alphabetical-index-entry-template* ) > +<!ATTLIST text:alphabetical-index-source text:index-scope + (document|chapter) "document"> +<!ATTLIST text:alphabetical-index-source text:relative-tab-stop-position + %boolean; "true"> +<!ATTLIST text:alphabetical-index-source text:ignore-case %boolean; "false"> +<!ATTLIST text:alphabetical-index-source text:main-entry-style-name + %styleName; #IMPLIED> +<!ATTLIST text:alphabetical-index-source text:alphabetical-separators + %boolean; "false"> +<!ATTLIST text:alphabetical-index-source text:combine-entries + %boolean; "true"> +<!ATTLIST text:alphabetical-index-source text:combine-entries-with-dash + %boolean; "false"> +<!ATTLIST text:alphabetical-index-source text:combine-entries-with-pp + %boolean; "true"> +<!ATTLIST text:alphabetical-index-source text:use-keys-as-entries + %boolean; "false"> +<!ATTLIST text:alphabetical-index-source text:capitalize-entries + %boolean; "false"> +<!ATTLIST text:alphabetical-index-source text:comma-separated + %boolean; "false"> +<!ATTLIST text:alphabetical-index-source fo:language %string; #IMPLIED> +<!ATTLIST text:alphabetical-index-source fo:country %string; #IMPLIED> +<!ATTLIST text:alphabetical-index-source text:sort-algorithm %string; #IMPLIED> +<!ELEMENT text:alphabetical-index-entry-template ( text:index-entry-chapter | + text:index-entry-page-number | + text:index-entry-text | + text:index-entry-span | + text:index-entry-tab-stop )* > +<!ATTLIST text:alphabetical-index-entry-template text:outline-level + (1|2|3|separator) #REQUIRED> +<!ATTLIST text:alphabetical-index-entry-template text:style-name + %styleName; #REQUIRED> +<!ELEMENT text:alphabetical-index-auto-mark-file EMPTY> +<!ATTLIST text:alphabetical-index-auto-mark-file xlink:href CDATA #IMPLIED> +<!ATTLIST text:alphabetical-index-auto-mark-file xlink:type (simple) #FIXED "simple"> +<!ELEMENT text:bibliography (text:bibliography-source, text:index-body) > +<!ATTLIST text:bibliography %sectionAttr;> +<!ELEMENT text:bibliography-source ( text:index-title-template?, + text:bibliography-entry-template* ) > +<!ELEMENT text:bibliography-entry-template ( text:index-entry-span | + text:index-entry-tab-stop | + text:index-entry-bibliography )* > +<!ATTLIST text:bibliography-entry-template text:bibliography-type + ( article | book | booklet | conference | custom1 | custom2 | + custom3 | custom4 | custom5 | email | inbook | incollection | + inproceedings | journal | manual | mastersthesis | misc | + phdthesis | proceedings | techreport | unpublished | www ) + #REQUIRED > +<!ATTLIST text:bibliography-entry-template text:style-name + %styleName; #REQUIRED> +<!ELEMENT text:index-body %sectionText; > +<!-- +Validity constraint: text:index-title elements may appear only in +indices, and there may be only one text:index-title element. +--> +<!ELEMENT text:index-title %sectionText; > +<!ATTLIST text:index-title text:style-name %styleName; #IMPLIED> +<!ATTLIST text:index-title text:name %string; #IMPLIED> +<!ELEMENT text:index-title-template (#PCDATA)> +<!ATTLIST text:index-title-template text:style-name %styleName; #IMPLIED> +<!ELEMENT text:index-entry-chapter-number EMPTY> +<!ATTLIST text:index-entry-chapter-number text:style-name %styleName; #IMPLIED> +<!ELEMENT text:index-entry-chapter EMPTY> +<!ATTLIST text:index-entry-chapter text:style-name %styleName; #IMPLIED> +<!ATTLIST text:index-entry-chapter text:display (name|number|number-and-name) + "number-and-name" > +<!ELEMENT text:index-entry-text EMPTY> +<!ATTLIST text:index-entry-text text:style-name %styleName; #IMPLIED> +<!ELEMENT text:index-entry-page-number EMPTY> +<!ATTLIST text:index-entry-page-number text:style-name %styleName; #IMPLIED> +<!ELEMENT text:index-entry-span (#PCDATA)> +<!ATTLIST text:index-entry-span text:style-name %styleName; #IMPLIED> +<!ELEMENT text:index-entry-bibliography EMPTY> +<!ATTLIST text:index-entry-bibliography text:style-name %styleName; #IMPLIED> +<!ATTLIST text:index-entry-bibliography text:bibliography-data-field + ( address | annote | author | bibliography-type | + booktitle | chapter | custom1 | custom2 | + custom3 | custom4 | custom5 | edition | editor | + howpublished | identifier | institution | isbn | + journal | month | note | number | organizations | + pages | publisher | report-type | school | + series | title | url | volume | year ) #REQUIRED> +<!ELEMENT text:index-entry-tab-stop EMPTY> +<!ATTLIST text:index-entry-tab-stop text:style-name %styleName; #IMPLIED> +<!ATTLIST text:index-entry-tab-stop style:leader-char %character; " "> +<!ATTLIST text:index-entry-tab-stop style:type (left|right) "left"> +<!ATTLIST text:index-entry-tab-stop style:position %length; #IMPLIED> +<!ELEMENT text:index-entry-link-start EMPTY> +<!ATTLIST text:index-entry-link-start text:style-name %styleName; #IMPLIED> +<!ELEMENT text:index-entry-link-end EMPTY> +<!ATTLIST text:index-entry-link-end text:style-name %styleName; #IMPLIED> +<!ELEMENT text:index-source-styles (text:index-source-style)*> +<!ATTLIST text:index-source-styles text:outline-level %integer; #REQUIRED> +<!ELEMENT text:index-source-style EMPTY> +<!ATTLIST text:index-source-style text:style-name %styleName; #REQUIRED> +<!ELEMENT text:toc-mark-start EMPTY> +<!ATTLIST text:toc-mark-start text:id %string; #REQUIRED> +<!ATTLIST text:toc-mark-start text:outline-level %integer; #IMPLIED> +<!ELEMENT text:toc-mark-end EMPTY> +<!ATTLIST text:toc-mark-end text:id %string; #REQUIRED> +<!ELEMENT text:toc-mark EMPTY> +<!ATTLIST text:toc-mark text:string-value %string; #REQUIRED> +<!ATTLIST text:toc-mark text:outline-level %integer; #IMPLIED> +<!ELEMENT text:user-index-mark-start EMPTY> +<!ATTLIST text:user-index-mark-start text:id %string; #REQUIRED> +<!ATTLIST text:user-index-mark-start text:outline-level %integer; #IMPLIED> +<!ATTLIST text:user-index-mark-start text:index-name %string; #IMPLIED> +<!ELEMENT text:user-index-mark-end EMPTY> +<!ATTLIST text:user-index-mark-end text:id %string; #REQUIRED> +<!ELEMENT text:user-index-mark EMPTY> +<!ATTLIST text:user-index-mark text:string-value %string; #REQUIRED> +<!ATTLIST text:user-index-mark text:outline-level %integer; #IMPLIED> +<!ATTLIST text:user-index-mark text:index-name %string; #IMPLIED> +<!ELEMENT text:alphabetical-index-mark-start EMPTY> +<!ATTLIST text:alphabetical-index-mark-start text:id %string; #REQUIRED> +<!ATTLIST text:alphabetical-index-mark-start text:key1 %string; #IMPLIED> +<!ATTLIST text:alphabetical-index-mark-start text:key2 %string; #IMPLIED> +<!ATTLIST text:alphabetical-index-mark-start text:main-etry %boolean; "false"> +<!ELEMENT text:alphabetical-index-mark-end EMPTY> +<!ATTLIST text:alphabetical-index-mark-end text:id %string; #REQUIRED> +<!ELEMENT text:alphabetical-index-mark EMPTY> +<!ATTLIST text:alphabetical-index-mark text:string-value %string; #REQUIRED> +<!ATTLIST text:alphabetical-index-mark text:key1 %string; #IMPLIED> +<!ATTLIST text:alphabetical-index-mark text:key2 %string; #IMPLIED> +<!ATTLIST text:alphabetical-index-mark text:main-etry %boolean; "false"> +<!ELEMENT text:bibliography-configuration (text:sort-key)*> +<!ATTLIST text:bibliography-configuration text:prefix %string; #IMPLIED> +<!ATTLIST text:bibliography-configuration text:suffix %string; #IMPLIED> +<!ATTLIST text:bibliography-configuration text:sort-by-position %boolean; "true"> +<!ATTLIST text:bibliography-configuration text:numbered-entries %boolean; "false"> +<!ATTLIST text:bibliography-configuration fo:language %string; #IMPLIED> +<!ATTLIST text:bibliography-configuration fo:country %string; #IMPLIED> +<!ATTLIST text:bibliography-configuration text:sort-algorithm %string; #IMPLIED> +<!ELEMENT text:sort-key EMPTY> +<!ATTLIST text:sort-key text:key ( address | annote | author | + bibliography-type | booktitle | chapter | custom1 | custom2 | + custom3 | custom4 | custom5 | edition | editor | howpublished | + identifier | institution | isbn | journal | month | note | number | + organizations | pages | publisher | report-type | school | series | + title | url | volume | year ) #REQUIRED> +<!ATTLIST text:sort-key text:sort-ascending %boolean; "true"> +<!ELEMENT text:linenumbering-configuration (text:linenumbering-separator?)> +<!ATTLIST text:linenumbering-configuration text:style-name %styleName; #IMPLIED> +<!ATTLIST text:linenumbering-configuration text:number-lines %boolean; "true"> +<!ATTLIST text:linenumbering-configuration text:count-empty-lines %boolean; "true"> +<!ATTLIST text:linenumbering-configuration text:count-in-floating-frames %boolean; "false"> +<!ATTLIST text:linenumbering-configuration text:restart-numbering %boolean; "false"> +<!ATTLIST text:linenumbering-configuration text:offset %nonNegativeLength; #IMPLIED> +<!ATTLIST text:linenumbering-configuration style:num-format (1|a|A|i|I) "1"> +<!ATTLIST text:linenumbering-configuration style:num-letter-sync %boolean; "false"> +<!ATTLIST text:linenumbering-configuration text:number-position (left|rigth|inner|outer) "left"> +<!ATTLIST text:linenumbering-configuration text:increment %nonNegativeInteger; #IMPLIED> +<!ELEMENT text:linenumbering-separator (#PCDATA)> +<!ATTLIST text:linenumbering-separator text:increment %nonNegativeInteger; #IMPLIED> +<!ELEMENT text:script (#PCDATA)> +<!ATTLIST text:script script:language CDATA #REQUIRED> +<!ATTLIST text:script xlink:href CDATA #IMPLIED> +<!ATTLIST text:script xlink:type (simple) #FIXED "simple"> +<!ELEMENT text:measure (#PCDATA)> +<!ATTLIST text:measure text:kind (value|unit|gap) #REQUIRED> +<!ELEMENT text:ruby (text:ruby-base, text:ruby-text)> +<!ATTLIST text:ruby text:style-name %styleName; #IMPLIED> +<!ELEMENT text:ruby-base %inline-text;> +<!ELEMENT text:ruby-text (#PCDATA)> +<!ATTLIST text:ruby-text text:style-name %styleName; #IMPLIED> +<!-- elements for change tracking --> +<!ELEMENT text:change EMPTY> +<!ATTLIST text:change text:change-id CDATA #REQUIRED> +<!ELEMENT text:change-start EMPTY> +<!ATTLIST text:change-start text:change-id CDATA #REQUIRED> +<!ELEMENT text:change-end EMPTY> +<!ATTLIST text:change-end text:change-id CDATA #REQUIRED> +<!ELEMENT text:tracked-changes (text:changed-region)*> +<!ATTLIST text:tracked-changes text:track-changes %boolean; "true"> +<!ATTLIST text:tracked-changes text:protection-key CDATA #IMPLIED> +<!ELEMENT text:changed-region (text:insertion | + (text:deletion, text:insertion?) | + text:format-change) > +<!ATTLIST text:changed-region text:id ID #REQUIRED> +<!ATTLIST text:changed-region text:merge-last-paragraph %boolean; "true"> +<!ELEMENT text:insertion (office:change-info, %sectionText;)> +<!ELEMENT text:deletion (office:change-info, %sectionText;)> +<!ELEMENT text:format-change (office:change-info)>
\ No newline at end of file diff --git a/chart2/workbench/fileformat/xmlSpyProject.spp b/chart2/workbench/fileformat/xmlSpyProject.spp new file mode 100644 index 000000000..b3e4df86b --- /dev/null +++ b/chart2/workbench/fileformat/xmlSpyProject.spp @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Project> + <Folder FolderName="XML Files" ExtStr="xml;cml;math;mtx;rdf;smil;svg;wml"> + <File FilePath=".\newchart_test.xml" HomeFolder="Yes"/> + </Folder> + <Folder FolderName="XSL Files" ExtStr="xsl;xslt"/> + <Folder FolderName="HTML Files" ExtStr="html;htm;xhtml;asp"/> + <Folder FolderName="DTD/Schemas" ExtStr="dtd;dcd;xdr;biz;xsd"> + <File FilePath=".\chart2.mod" HomeFolder="Yes"/> + <File FilePath=".\office.dtd" HomeFolder="Yes"/> + </Folder> + <Folder FolderName="Entities" ExtStr="ent"/> +</Project> diff --git a/chart2/workbench/officeintegration/install.pl b/chart2/workbench/officeintegration/install.pl new file mode 100644 index 000000000..010713835 --- /dev/null +++ b/chart2/workbench/officeintegration/install.pl @@ -0,0 +1,154 @@ +: +eval 'exec perl -S $0 ${1+"$@"}' + if 0; + +# ------------------------------------------------------------------------------ +# This script installs the new chart-libraries and resources. +# This is done by symbolic linking rather than copying. Thus this installation +# is only necessary once after a fresh office installation. +# +# It also registers all types in the types.rdb and all components in the +# services.rdb. Finally the TypeDetection.xcu is installed, such that you can +# invoke the new chart with the URL 'private:factory/chart' +# ------------------------------------------------------------------------------ + +# With this package you get better readable variable names +use English; + +# determine automatic project path assuming that this script stayed in its +# default location + +$PRJ_PATH = $0; +if( $OSNAME eq "MSWin32" ) { + chomp( $PWD = `cd` ); + $PRJ_PATH =~ s,^(.*)\\chart2\\workbench\\.*$,$1,; + + $SVERSION = "$ENV{UserProfile}\\Application Data\\sversion.ini"; + $PATHSEP = "\\"; + $LIBPATTERN = "bin\\*mi*.dll"; + $COPYCMD = "copy"; +} else { + chomp( $PWD = `pwd` ); + $PRJ_PATH = $PWD . "/" . $PRJ_PATH if( $PRJ_PATH !~ m,^/, ); + $PRJ_PATH =~ s,^(.*)/chart2/workbench/.*$,$1,; + + $SVERSION = "$ENV{HOME}/.sversionrc"; + $PATHSEP = "/"; + $LIBPATTERN = "lib/lib*li.so"; + $COPYCMD = "cp"; +} + +print "$OSNAME\n"; + +# determine office path according to .sversionrc. Note: this only looks for a +# prefix 'StarOffice 6.1', such that 'StarOffice 6.1 dbg=...' is still found + +open( SVERSION, "$SVERSION" ) || die( "couldn't find .sversionrc/sversion.ini\n" ); +while( <SVERSION> ) +{ + if( m,^StarOffice 7.*=file://(.*)$, ) + { + $OFF_PATH = $1,; + if( $OSNAME eq "MSWin32" ) + { + # remove first / + $OFF_PATH =~ s/^.//; + # replace path separators + $OFF_PATH =~ s,/,\\,g; + } + last; + } +} +close SVERSION; + +# ================================================================================ + +print "Chart2 project is in <$PRJ_PATH>\n"; +print "Office 6.1 is installed in <$OFF_PATH>\n"; +print "Are these assumptions correct? [y/n] "; +if( <STDIN> !~ /^y?$/i ) +{ + print "Enter project path [$PRJ_PATH]: "; + chomp( $path = <STDIN> ); + $PRJ_PATH = $path if( length( $path ) > 0 ); + + print "Enter office path [$OFF_PATH]: "; + chomp( $path = <STDIN> ); + $OFF_PATH = $path if( length( $path ) > 0 ); +} + +# ---------------------------------------- + +$MY_OUTPATH = $ENV{OUTPATH}; +$MY_RESPATH = "common"; + +$REGCOMMAND = "register"; +#$REGCOMMAND = "revoke"; + +if( $ENV{PROEXT} ) { + $MY_OUTPATH .= $ENV{PROEXT}; + $MY_RESPATH .= $ENV{PROEXT}; +} + +chmod 0664, "$OFF_PATH${PATHSEP}program${PATHSEP}types.rdb"; +print "registering types...\n"; +print `regmerge $OFF_PATH${PATHSEP}program${PATHSEP}types.rdb / $PRJ_PATH${PATHSEP}chart2${PATHSEP}$MY_OUTPATH${PATHSEP}bin${PATHSEP}chart2.rdb`; + +# print "installing apphelper library...\n"; +# @files = glob( "$PRJ_PATH${PATHSEP}apphelper${PATHSEP}$MY_OUTPATH${PATHSEP}${LIBPATTERN}" ); +# foreach $dll (@files) +# { +# if( $OSNAME eq "MSWin32" ) { +# print `copy "$dll" "$OFF_PATH\\program"`; +# $dll =~ s,\\,/,g; +# $dll = "/" . $dll; +# } else { +# $dll =~ m,/([^/]*)$,; +# $copied_dll = "$OFF_PATH/program/$1"; +# if( -l "$copied_dll" ) { +# unlink "$copied_dll"; +# } +# symlink "$dll", "$copied_dll"; +# } +# } + +print "installing shlibs and registering services...\n"; +@files = glob( "$PRJ_PATH${PATHSEP}chart2${PATHSEP}$MY_OUTPATH${PATHSEP}${LIBPATTERN}" ); +foreach $dll (@files) +{ + if( $OSNAME eq "MSWin32" ) { + print `copy "$dll" "$OFF_PATH\\program"`; + $dll =~ s,\\,/,g; + $dll =~ m,/([^/]*)$,; + $copied_dll = "/$dll"; + } else { + $dll =~ m,/([^/]*)$,; + $copied_dll = "$OFF_PATH/program/$1"; + if( -l "$copied_dll" ) { + unlink "$copied_dll"; + } + symlink "$dll", "$copied_dll"; + } + chmod 0664, "$OFF_PATH${PATHSEP}program${PATHSEP}services.rdb"; + print `regcomp -$REGCOMMAND -r $OFF_PATH${PATHSEP}program${PATHSEP}services.rdb -c file://$copied_dll`; + print `regcomp -$REGCOMMAND -r $OFF_PATH${PATHSEP}program${PATHSEP}types.rdb -c file://$copied_dll`; +} + +print "installing resources\n"; +@files = glob( "$PRJ_PATH${PATHSEP}chart2${PATHSEP}$MY_RESPATH${PATHSEP}bin${PATHSEP}*.res" ); +foreach $res (@files) +{ + if( $OSNAME eq "MSWin32" ) { + print `copy "$res" "$OFF_PATH\\program\\resource"`; + } else { + $res =~ m,/([^/]*)$,; + $copied_res = "$OFF_PATH/program/resource/$1"; + if( -l "$copied_dll" ) { + unlink "$copied_res"; + } + symlink "$res", "$copied_res"; + } +} + +print "installing filter...\n"; +print `$COPYCMD $PRJ_PATH${PATHSEP}chart2${PATHSEP}workbench${PATHSEP}officeintegration${PATHSEP}TypeDetection.xcu $OFF_PATH${PATHSEP}user${PATHSEP}registry${PATHSEP}data${PATHSEP}org${PATHSEP}openoffice${PATHSEP}Office`; diff --git a/chart2/workbench/sampledata/12series.chd b/chart2/workbench/sampledata/12series.chd new file mode 100644 index 000000000..762638579 --- /dev/null +++ b/chart2/workbench/sampledata/12series.chd @@ -0,0 +1,18 @@ +# -*- coding: utf-8; -*- +# Series Labels +∑ ℕ⊆ℕ₀ локализации ▁▂▃▄▅▆▇█ ☺† ░▒▓█ გთხოვთ አይተዳደርም። „Anführungszeichen“ ⠅⠝⠪⠇⠫⠛⠑⠂ Umsatz_in_€ ᚾᚩᚱᚦᚹᛖᚪᚱᛞᚢᛗ +# categories +Öl Ruß Süßstoff +# series +2 1 3 +1 2 3 +3 1 2 +1 3 2 +3 2 1 +2 3 1 +2 1 3 +1 2 3 +3 1 2 +1 3 2 +3 2 1 +2 3 1
\ No newline at end of file diff --git a/chart2/workbench/sampledata/29series.chd b/chart2/workbench/sampledata/29series.chd new file mode 100644 index 000000000..34f49c6ca --- /dev/null +++ b/chart2/workbench/sampledata/29series.chd @@ -0,0 +1,35 @@ +# -*- coding: utf-8; -*- +# Series Labels +1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 +# categories +one two three four five random +# series +0.1 0.2 0.43478260869565216 0.58823529411764705 1.7 2.119047619047619 +0.2 0.4 0.8695652173913043 0.11764705882352941 2.3 1.8095238095238095 +0.3 0.6 0.13043478260869565 0.17647058823529413 1.6666666666666667 2.3095238095238093 +0.4 0.8 0.17391304347826086 0.23529411764705882 1.25 1.4047619047619047 +0.5 0.10 0.21739130434782608 0.29411764705882354 1.0 1.6428571428571428 +0.6 0.12 0.2608695652173913 0.35294117647058826 0.8333333333333334 0.21428571428571427 +0.7 0.14 0.30434782608695654 0.4117647058823529 0.7142857142857143 0.8333333333333334 +0.8 0.16 0.34782608695652173 0.47058823529411764 0.625 1.1428571428571428 +0.9 0.18 0.391304347826087 0.5294117647058824 0.5555555555555556 2.2142857142857144 +0.10 0.20 0.43478260869565216 0.5882352941176471 0.5 2.1904761904761907 +0.11 0.22 0.4782608695652174 0.6470588235294118 0.45454545454545453 2.0952380952380953 +0.12 0.24 0.5217391304347826 0.7058823529411765 0.4166666666666667 0.21428571428571427 +0.13 0.26 0.5652173913043478 0.7647058823529411 0.38461538461538464 1.4285714285714286 +0.14 0.28 0.6086956521739131 0.8235294117647058 0.35714285714285715 0.07142857142857143 +0.15 0.30 0.6521739130434783 0.8823529411764706 0.3333333333333333 1.3571428571428572 +0.16 0.32 0.6956521739130435 0.9411764705882353 0.3125 1.5476190476190477 +0.17 0.34 0.7391304347826087 1.0 0.29411764705882354 0.8571428571428571 +0.18 0.36 0.782608695652174 1.0588235294117647 0.2777777777777778 1.880952380952381 +0.19 0.38 0.8260869565217391 1.1176470588235294 0.2631578947368421 1.5 +0.20 0.40 0.8695652173913043 1.1764705882352942 0.25 0.3333333333333333 +0.21 0.42 0.9130434782608695 1.2352941176470589 0.23809523809523808 0.5 +0.22 0.44 0.9565217391304348 1.2941176470588236 0.22727272727272727 0.07142857142857143 +0.23 0.46 1.0 1.3529411764705883 0.21739130434782608 1.0714285714285714 +0.24 0.48 1.0434782608695652 1.411764705882353 0.20833333333333334 0.8095238095238095 +0.25 0.50 1.0869565217391304 1.4705882352941178 0.2 1.9761904761904763 +0.26 0.52 1.1304347826086956 1.5294117647058822 0.19230769230769232 1.0714285714285714 +0.27 0.54 1.173913043478261 1.588235294117647 0.18518518518518517 0.40476190476190477 +0.28 0.56 1.2173913043478262 1.6470588235294117 0.17857142857142858 1.3571428571428572 +0.29 0.58 1.2608695652173914 1.7058823529411764 0.1724137931034483 0.7380952380952381
\ No newline at end of file diff --git a/chart2/workbench/sampledata/big.chd b/chart2/workbench/sampledata/big.chd new file mode 100644 index 000000000..0af64972d --- /dev/null +++ b/chart2/workbench/sampledata/big.chd @@ -0,0 +1,14 @@ +# Labels +x sin(x) cos(x) + +# Categories +0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 + +# x +0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.13 0.14 0.15 0.16 0.17 0.18 0.19 0.2 0.21 0.22 0.23 0.24 0.25 0.26 0.27 0.28 0.29 0.3 0.31 0.32 0.33 0.34 0.35 0.36 0.37 0.38 0.39 0.4 0.41 0.42 0.43 0.44 0.45 0.46 0.47 0.48 0.49 0.5 0.51 0.52 0.53 0.54 0.55 0.56 0.57 0.58 0.59 0.6 0.61 0.62 0.63 0.64 0.65 0.66 0.67 0.68 0.69 0.7 0.71 0.72 0.73 0.74 0.75 0.76 0.77 0.78 0.79 0.8 0.81 0.820000000000001 0.830000000000001 0.840000000000001 0.850000000000001 0.860000000000001 0.870000000000001 0.880000000000001 0.890000000000001 0.900000000000001 0.910000000000001 0.920000000000001 0.930000000000001 0.940000000000001 0.950000000000001 0.960000000000001 0.970000000000001 0.980000000000001 0.990000000000001 1 1.01 1.02 1.03 1.04 1.05 1.06 1.07 1.08 1.09 1.1 1.11 1.12 1.13 1.14 1.15 1.16 1.17 1.18 1.19 1.2 1.21 1.22 1.23 1.24 1.25 1.26 1.27 1.28 1.29 1.3 1.31 1.32 1.33 1.34 1.35 1.36 1.37 1.38 1.39 1.4 1.41 1.42 1.43 1.44 1.45 1.46 1.47 1.48 1.49 1.5 1.51 1.52 1.53 1.54 1.55 1.56 1.57 1.58 1.59 1.6 1.61 1.62 1.63 1.64 1.65 1.66 1.67 1.68 1.69 1.7 1.71 1.72 1.73 1.74 1.75 1.76 1.77 1.78 1.79 1.8 1.81 1.82 1.83 1.84 1.85 1.86 1.87 1.88 1.89 1.9 1.91 1.92 1.93 1.94 1.95 1.96 1.97 1.98 1.99 2 2.01 2.02 2.03 2.04 2.05 2.06 2.07 2.08 2.09 2.1 2.11 2.12 2.13 2.14 2.15 2.16 2.17 2.18 2.19 2.2 2.21 2.22 2.23 2.24 2.25 2.26 2.27 2.28 2.29 2.29999999999999 2.30999999999999 2.31999999999999 2.32999999999999 2.33999999999999 2.34999999999999 2.35999999999999 2.36999999999999 2.37999999999999 2.38999999999999 2.39999999999999 2.40999999999999 2.41999999999999 2.42999999999999 2.43999999999999 2.44999999999999 2.45999999999999 2.46999999999999 2.47999999999999 2.48999999999999 2.49999999999999 2.50999999999999 2.51999999999999 2.52999999999999 2.53999999999999 2.54999999999999 2.55999999999999 2.56999999999999 2.57999999999999 2.58999999999999 2.59999999999999 2.60999999999999 2.61999999999999 2.62999999999999 2.63999999999999 2.64999999999999 2.65999999999999 2.66999999999999 2.67999999999999 2.68999999999999 2.69999999999999 2.70999999999999 2.71999999999999 2.72999999999999 2.73999999999999 2.74999999999999 2.75999999999999 2.76999999999998 2.77999999999998 2.78999999999998 2.79999999999998 2.80999999999998 2.81999999999998 2.82999999999998 2.83999999999998 2.84999999999998 2.85999999999998 2.86999999999998 2.87999999999998 2.88999999999998 2.89999999999998 2.90999999999998 2.91999999999998 2.92999999999998 2.93999999999998 2.94999999999998 2.95999999999998 2.96999999999998 2.97999999999998 2.98999999999998 2.99999999999998 3.00999999999998 3.01999999999998 3.02999999999998 3.03999999999998 3.04999999999998 3.05999999999998 3.06999999999998 3.07999999999998 3.08999999999998 3.09999999999998 3.10999999999998 3.11999999999998 3.12999999999998 3.13999999999998 3.14999999999998 3.15999999999998 3.16999999999998 3.17999999999998 3.18999999999998 3.19999999999998 3.20999999999998 3.21999999999998 3.22999999999998 3.23999999999997 3.24999999999997 3.25999999999997 3.26999999999997 3.27999999999997 3.28999999999997 3.29999999999997 3.30999999999997 3.31999999999997 3.32999999999997 3.33999999999997 3.34999999999997 3.35999999999997 3.36999999999997 3.37999999999997 3.38999999999997 3.39999999999997 3.40999999999997 3.41999999999997 3.42999999999997 3.43999999999997 3.44999999999997 3.45999999999997 3.46999999999997 3.47999999999997 3.48999999999997 3.49999999999997 3.50999999999997 3.51999999999997 3.52999999999997 3.53999999999997 3.54999999999997 3.55999999999997 3.56999999999997 3.57999999999997 3.58999999999997 3.59999999999997 3.60999999999997 3.61999999999997 3.62999999999997 3.63999999999997 3.64999999999997 3.65999999999997 3.66999999999997 3.67999999999997 3.68999999999997 3.69999999999997 3.70999999999996 3.71999999999996 3.72999999999996 3.73999999999996 3.74999999999996 3.75999999999996 3.76999999999996 3.77999999999996 3.78999999999996 3.79999999999996 3.80999999999996 3.81999999999996 3.82999999999996 3.83999999999996 3.84999999999996 3.85999999999996 3.86999999999996 3.87999999999996 3.88999999999996 3.89999999999996 3.90999999999996 3.91999999999996 3.92999999999996 3.93999999999996 3.94999999999996 3.95999999999996 3.96999999999996 3.97999999999996 3.98999999999996 3.99999999999996 4.00999999999996 4.01999999999996 4.02999999999996 4.03999999999996 4.04999999999996 4.05999999999996 4.06999999999996 4.07999999999996 4.08999999999996 4.09999999999996 4.10999999999996 4.11999999999996 4.12999999999996 4.13999999999996 4.14999999999996 4.15999999999996 4.16999999999996 4.17999999999996 4.18999999999996 4.19999999999995 4.20999999999995 4.21999999999995 4.22999999999995 4.23999999999995 4.24999999999995 4.25999999999995 4.26999999999995 4.27999999999995 4.28999999999995 4.29999999999995 4.30999999999995 4.31999999999995 4.32999999999995 4.33999999999995 4.34999999999995 4.35999999999995 4.36999999999995 4.37999999999995 4.38999999999995 4.39999999999995 4.40999999999995 4.41999999999995 4.42999999999995 4.43999999999995 4.44999999999995 4.45999999999995 4.46999999999995 4.47999999999995 4.48999999999995 4.49999999999995 4.50999999999995 4.51999999999995 4.52999999999995 4.53999999999995 4.54999999999995 4.55999999999995 4.56999999999995 4.57999999999995 4.58999999999995 4.59999999999995 4.60999999999995 4.61999999999995 4.62999999999995 4.63999999999995 4.64999999999995 4.65999999999995 4.66999999999994 4.67999999999994 4.68999999999994 4.69999999999994 4.70999999999994 4.71999999999994 4.72999999999994 4.73999999999994 4.74999999999994 4.75999999999994 4.76999999999994 4.77999999999994 4.78999999999994 4.79999999999994 4.80999999999994 4.81999999999994 4.82999999999994 4.83999999999994 4.84999999999994 4.85999999999994 4.86999999999994 4.87999999999994 4.88999999999994 4.89999999999994 4.90999999999994 4.91999999999994 4.92999999999994 4.93999999999994 4.94999999999994 4.95999999999994 4.96999999999994 4.97999999999994 4.98999999999994 4.99999999999994 5.00999999999994 5.01999999999994 5.02999999999994 5.03999999999994 5.04999999999994 5.05999999999994 5.06999999999994 5.07999999999994 5.08999999999994 5.09999999999994 5.10999999999994 5.11999999999994 5.12999999999994 5.13999999999993 5.14999999999993 5.15999999999993 5.16999999999993 5.17999999999993 5.18999999999993 5.19999999999993 5.20999999999993 5.21999999999993 5.22999999999993 5.23999999999993 5.24999999999993 5.25999999999993 5.26999999999993 5.27999999999993 5.28999999999993 5.29999999999993 5.30999999999993 5.31999999999993 5.32999999999993 5.33999999999993 5.34999999999993 5.35999999999993 5.36999999999993 5.37999999999993 5.38999999999993 5.39999999999993 5.40999999999993 5.41999999999993 5.42999999999993 5.43999999999993 5.44999999999993 5.45999999999993 5.46999999999993 5.47999999999993 5.48999999999993 5.49999999999993 5.50999999999993 5.51999999999993 5.52999999999993 5.53999999999993 5.54999999999993 5.55999999999993 5.56999999999993 5.57999999999993 5.58999999999993 5.59999999999993 5.60999999999992 5.61999999999992 5.62999999999992 5.63999999999992 5.64999999999992 5.65999999999992 5.66999999999992 5.67999999999992 5.68999999999992 5.69999999999992 5.70999999999992 5.71999999999992 5.72999999999992 5.73999999999992 5.74999999999992 5.75999999999992 5.76999999999992 5.77999999999992 5.78999999999992 5.79999999999992 5.80999999999992 5.81999999999992 5.82999999999992 5.83999999999992 5.84999999999992 5.85999999999992 5.86999999999992 5.87999999999992 5.88999999999992 5.89999999999992 5.90999999999992 5.91999999999992 5.92999999999992 5.93999999999992 5.94999999999992 5.95999999999992 5.96999999999992 5.97999999999992 5.98999999999992 5.99999999999992 6.00999999999992 6.01999999999992 6.02999999999992 6.03999999999992 6.04999999999992 6.05999999999992 6.06999999999992 6.07999999999991 6.08999999999991 6.09999999999991 6.10999999999991 6.11999999999991 6.12999999999991 6.13999999999991 6.14999999999991 6.15999999999991 6.16999999999991 6.17999999999991 6.18999999999991 6.19999999999991 6.20999999999991 6.21999999999991 6.22999999999991 6.23999999999991 6.24999999999991 6.25999999999991 6.26999999999991 6.27999999999991 6.28999999999991 6.29999999999991 6.30999999999991 6.31999999999991 6.32999999999991 6.33999999999991 6.34999999999991 6.35999999999991 6.36999999999991 6.37999999999991 6.38999999999991 6.39999999999991 6.40999999999991 6.41999999999991 6.42999999999991 6.43999999999991 6.44999999999991 6.45999999999991 6.46999999999991 6.47999999999991 6.48999999999991 6.49999999999991 6.50999999999991 6.51999999999991 6.52999999999991 6.53999999999991 6.5499999999999 6.5599999999999 6.5699999999999 6.5799999999999 6.5899999999999 6.5999999999999 6.6099999999999 6.6199999999999 6.6299999999999 6.6399999999999 6.6499999999999 6.6599999999999 6.6699999999999 6.6799999999999 6.6899999999999 6.6999999999999 6.7099999999999 6.7199999999999 6.7299999999999 6.7399999999999 6.7499999999999 6.7599999999999 6.7699999999999 6.7799999999999 6.7899999999999 6.7999999999999 6.8099999999999 6.8199999999999 6.8299999999999 6.8399999999999 6.8499999999999 6.8599999999999 6.8699999999999 6.8799999999999 6.8899999999999 6.8999999999999 6.9099999999999 6.9199999999999 6.9299999999999 6.9399999999999 6.9499999999999 6.9599999999999 6.9699999999999 6.9799999999999 6.9899999999999 6.9999999999999 7.00999999999989 7.01999999999989 7.02999999999989 7.03999999999989 7.04999999999989 7.05999999999989 7.06999999999989 7.07999999999989 7.08999999999989 7.09999999999989 7.10999999999989 7.11999999999989 7.12999999999989 7.13999999999989 7.14999999999989 7.15999999999989 7.16999999999989 7.17999999999989 7.18999999999989 7.19999999999989 7.20999999999989 7.21999999999989 7.22999999999989 7.23999999999989 7.24999999999989 7.25999999999989 7.26999999999989 7.27999999999989 7.28999999999989 7.29999999999989 7.30999999999989 7.31999999999989 7.32999999999989 7.33999999999989 7.34999999999989 7.35999999999989 7.36999999999989 7.37999999999989 7.38999999999989 7.39999999999989 7.40999999999989 7.41999999999989 7.42999999999989 7.43999999999989 7.44999999999989 7.45999999999989 7.46999999999989 7.47999999999988 7.48999999999988 7.49999999999988 7.50999999999988 7.51999999999988 7.52999999999988 7.53999999999988 7.54999999999988 7.55999999999988 7.56999999999988 7.57999999999988 7.58999999999988 7.59999999999988 7.60999999999988 7.61999999999988 7.62999999999988 7.63999999999988 7.64999999999988 7.65999999999988 7.66999999999988 7.67999999999988 7.68999999999988 7.69999999999988 7.70999999999988 7.71999999999988 7.72999999999988 7.73999999999988 7.74999999999988 7.75999999999988 7.76999999999988 7.77999999999988 7.78999999999988 7.79999999999988 7.80999999999988 7.81999999999988 7.82999999999988 7.83999999999988 7.84999999999988 7.85999999999988 7.86999999999988 7.87999999999988 7.88999999999988 7.89999999999988 7.90999999999988 7.91999999999988 7.92999999999988 7.93999999999988 7.94999999999987 7.95999999999987 7.96999999999987 7.97999999999987 7.98999999999987 7.99999999999987 8.00999999999987 8.01999999999987 8.02999999999987 8.03999999999987 8.04999999999987 8.05999999999987 8.06999999999987 8.07999999999987 8.08999999999987 8.09999999999987 8.10999999999987 8.11999999999987 8.12999999999987 8.13999999999987 8.14999999999987 8.15999999999987 8.16999999999987 8.17999999999987 8.18999999999987 8.19999999999987 8.20999999999987 8.21999999999987 8.22999999999987 8.23999999999987 8.24999999999987 8.25999999999987 8.26999999999987 8.27999999999987 8.28999999999987 8.29999999999987 8.30999999999987 8.31999999999987 8.32999999999987 8.33999999999987 8.34999999999987 8.35999999999987 8.36999999999987 8.37999999999987 8.38999999999987 8.39999999999987 8.40999999999987 8.41999999999986 8.42999999999986 8.43999999999986 8.44999999999986 8.45999999999986 8.46999999999986 8.47999999999986 8.48999999999986 8.49999999999986 8.50999999999986 8.51999999999986 8.52999999999986 8.53999999999986 8.54999999999986 8.55999999999986 8.56999999999986 8.57999999999986 8.58999999999986 8.59999999999986 8.60999999999986 8.61999999999986 8.62999999999986 8.63999999999986 8.64999999999986 8.65999999999986 8.66999999999986 8.67999999999986 8.68999999999986 8.69999999999986 8.70999999999986 8.71999999999986 8.72999999999986 8.73999999999986 8.74999999999986 8.75999999999986 8.76999999999986 8.77999999999986 8.78999999999986 8.79999999999986 8.80999999999986 8.81999999999986 8.82999999999986 8.83999999999986 8.84999999999986 8.85999999999986 8.86999999999986 8.87999999999986 8.88999999999985 8.89999999999985 8.90999999999985 8.91999999999985 8.92999999999985 8.93999999999985 8.94999999999985 8.95999999999985 8.96999999999985 8.97999999999985 8.98999999999985 8.99999999999985 9.00999999999985 9.01999999999985 9.02999999999985 9.03999999999985 9.04999999999985 9.05999999999985 9.06999999999985 9.07999999999985 9.08999999999985 9.09999999999985 9.10999999999985 9.11999999999985 9.12999999999985 9.13999999999985 9.14999999999985 9.15999999999985 9.16999999999985 9.17999999999985 9.18999999999985 9.19999999999985 9.20999999999985 9.21999999999985 9.22999999999985 9.23999999999985 9.24999999999985 9.25999999999985 9.26999999999985 9.27999999999985 9.28999999999985 9.29999999999985 9.30999999999985 9.31999999999985 9.32999999999985 9.33999999999985 9.34999999999985 9.35999999999984 9.36999999999984 9.37999999999984 9.38999999999984 9.39999999999984 9.40999999999984 9.41999999999984 9.42999999999984 9.43999999999984 9.44999999999984 9.45999999999984 9.46999999999984 9.47999999999984 9.48999999999984 9.49999999999984 9.50999999999984 9.51999999999984 9.52999999999984 9.53999999999984 9.54999999999984 9.55999999999984 9.56999999999984 9.57999999999984 9.58999999999984 9.59999999999984 9.60999999999984 9.61999999999984 9.62999999999984 9.63999999999984 9.64999999999984 9.65999999999984 9.66999999999984 9.67999999999984 9.68999999999984 9.69999999999984 9.70999999999984 9.71999999999984 9.72999999999984 9.73999999999984 9.74999999999984 9.75999999999984 9.76999999999984 9.77999999999984 9.78999999999984 9.79999999999984 9.80999999999984 9.81999999999984 9.82999999999983 9.83999999999983 9.84999999999983 9.85999999999983 9.86999999999983 9.87999999999983 9.88999999999983 9.89999999999983 9.90999999999983 9.91999999999983 9.92999999999983 9.93999999999983 9.94999999999983 9.95999999999983 9.96999999999983 9.97999999999983 9.98999999999983 9.99999999999983 10.0099999999998 10.0199999999998 10.0299999999998 10.0399999999998 10.0499999999998 10.0599999999998 10.0699999999998 10.0799999999998 10.0899999999998 10.0999999999998 10.1099999999998 10.1199999999998 10.1299999999998 10.1399999999998 10.1499999999998 10.1599999999998 10.1699999999998 10.1799999999998 10.1899999999998 10.1999999999998 10.2099999999998 10.2199999999998 10.2299999999998 10.2399999999998 10.2499999999998 10.2599999999998 10.2699999999998 10.2799999999998 10.2899999999998 10.2999999999998 10.3099999999998 10.3199999999998 10.3299999999998 10.3399999999998 10.3499999999998 10.3599999999998 10.3699999999998 10.3799999999998 10.3899999999998 10.3999999999998 10.4099999999998 10.4199999999998 10.4299999999998 10.4399999999998 10.4499999999998 10.4599999999998 10.4699999999998 10.4799999999998 10.4899999999998 10.4999999999998 10.5099999999998 10.5199999999998 10.5299999999998 10.5399999999998 10.5499999999998 10.5599999999998 10.5699999999998 10.5799999999998 10.5899999999998 10.5999999999998 10.6099999999998 10.6199999999998 10.6299999999998 10.6399999999998 10.6499999999998 10.6599999999998 10.6699999999998 10.6799999999998 10.6899999999998 10.6999999999998 10.7099999999998 10.7199999999998 10.7299999999998 10.7399999999998 10.7499999999998 10.7599999999998 10.7699999999998 10.7799999999998 10.7899999999998 10.7999999999998 10.8099999999998 10.8199999999998 10.8299999999998 10.8399999999998 10.8499999999998 10.8599999999998 10.8699999999998 10.8799999999998 10.8899999999998 10.8999999999998 10.9099999999998 10.9199999999998 10.9299999999998 10.9399999999998 10.9499999999998 10.9599999999998 10.9699999999998 10.9799999999998 10.9899999999998 10.9999999999998 11.0099999999998 11.0199999999998 11.0299999999998 11.0399999999998 11.0499999999998 11.0599999999998 11.0699999999998 11.0799999999998 11.0899999999998 11.0999999999998 11.1099999999998 11.1199999999998 11.1299999999998 11.1399999999998 11.1499999999998 11.1599999999998 11.1699999999998 11.1799999999998 11.1899999999998 11.1999999999998 11.2099999999998 11.2199999999998 11.2299999999998 11.2399999999998 11.2499999999998 11.2599999999998 11.2699999999998 11.2799999999998 11.2899999999998 11.2999999999998 11.3099999999998 11.3199999999998 11.3299999999998 11.3399999999998 11.3499999999998 11.3599999999998 11.3699999999998 11.3799999999998 11.3899999999998 11.3999999999998 11.4099999999998 11.4199999999998 11.4299999999998 11.4399999999998 11.4499999999998 11.4599999999998 11.4699999999998 11.4799999999998 11.4899999999998 11.4999999999998 11.5099999999998 11.5199999999998 11.5299999999998 11.5399999999998 11.5499999999998 11.5599999999998 11.5699999999998 11.5799999999998 11.5899999999998 11.5999999999998 11.6099999999998 11.6199999999998 11.6299999999998 11.6399999999998 11.6499999999998 11.6599999999998 11.6699999999998 11.6799999999998 11.6899999999998 11.6999999999998 11.7099999999998 11.7199999999998 11.7299999999998 11.7399999999998 11.7499999999998 11.7599999999998 11.7699999999998 11.7799999999998 11.7899999999998 11.7999999999998 11.8099999999998 11.8199999999998 11.8299999999998 11.8399999999998 11.8499999999998 11.8599999999998 11.8699999999998 11.8799999999998 11.8899999999998 11.8999999999998 11.9099999999998 11.9199999999998 11.9299999999998 11.9399999999998 11.9499999999998 11.9599999999998 11.9699999999998 11.9799999999998 11.9899999999998 11.9999999999998 12.0099999999998 12.0199999999998 12.0299999999998 12.0399999999998 12.0499999999998 12.0599999999998 12.0699999999998 12.0799999999998 12.0899999999998 12.0999999999998 12.1099999999998 12.1199999999998 12.1299999999998 12.1399999999998 12.1499999999998 12.1599999999998 12.1699999999998 12.1799999999998 12.1899999999998 12.1999999999998 12.2099999999998 12.2199999999998 12.2299999999998 12.2399999999998 12.2499999999998 12.2599999999998 12.2699999999998 12.2799999999998 12.2899999999998 12.2999999999998 12.3099999999998 12.3199999999998 12.3299999999998 12.3399999999998 12.3499999999998 12.3599999999998 12.3699999999998 12.3799999999998 12.3899999999998 12.3999999999998 12.4099999999998 12.4199999999998 12.4299999999998 12.4399999999998 12.4499999999998 12.4599999999998 12.4699999999998 12.4799999999998 12.4899999999998 12.4999999999998 12.5099999999998 12.5199999999998 12.5299999999998 12.5399999999998 12.5499999999998 12.5599999999998 12.5699999999998 12.5799999999998 12.5899999999998 12.5999999999998 12.6099999999998 12.6199999999998 12.6299999999998 12.6399999999998 12.6499999999998 12.6599999999998 12.6699999999998 12.6799999999998 12.6899999999998 12.6999999999998 12.7099999999998 12.7199999999998 12.7299999999998 12.7399999999998 12.7499999999998 12.7599999999998 12.7699999999998 12.7799999999998 12.7899999999998 12.7999999999998 12.8099999999998 12.8199999999998 12.8299999999998 12.8399999999998 12.8499999999998 12.8599999999998 12.8699999999998 12.8799999999998 12.8899999999998 12.8999999999998 12.9099999999998 12.9199999999998 12.9299999999998 12.9399999999998 12.9499999999998 12.9599999999998 12.9699999999998 12.9799999999998 12.9899999999998 12.9999999999998 13.0099999999998 13.0199999999998 13.0299999999998 13.0399999999998 13.0499999999998 13.0599999999998 13.0699999999998 13.0799999999998 13.0899999999998 13.0999999999998 13.1099999999998 13.1199999999998 13.1299999999998 13.1399999999998 13.1499999999998 13.1599999999998 13.1699999999998 13.1799999999998 13.1899999999998 13.1999999999998 13.2099999999998 13.2199999999998 13.2299999999998 13.2399999999998 13.2499999999998 13.2599999999998 13.2699999999998 13.2799999999998 13.2899999999998 13.2999999999998 13.3099999999998 13.3199999999998 13.3299999999998 13.3399999999998 13.3499999999998 13.3599999999998 13.3699999999998 13.3799999999998 13.3899999999998 13.3999999999998 13.4099999999998 13.4199999999998 13.4299999999998 13.4399999999998 13.4499999999998 13.4599999999998 13.4699999999998 13.4799999999998 13.4899999999998 13.4999999999998 13.5099999999998 13.5199999999998 13.5299999999998 13.5399999999998 13.5499999999998 13.5599999999998 13.5699999999998 13.5799999999998 13.5899999999998 13.5999999999998 13.6099999999998 13.6199999999998 13.6299999999998 13.6399999999998 13.6499999999998 13.6599999999998 13.6699999999998 13.6799999999998 13.6899999999998 13.6999999999998 13.7099999999998 13.7199999999998 13.7299999999998 13.7399999999998 13.7499999999998 13.7599999999998 13.7699999999998 13.7799999999998 13.7899999999998 13.7999999999998 13.8099999999998 13.8199999999997 13.8299999999997 13.8399999999997 13.8499999999997 13.8599999999997 13.8699999999997 13.8799999999997 13.8899999999997 13.8999999999997 13.9099999999997 13.9199999999997 13.9299999999997 13.9399999999997 13.9499999999997 13.9599999999997 13.9699999999997 13.9799999999997 13.9899999999997 13.9999999999997 14.0099999999997 14.0199999999997 14.0299999999997 14.0399999999997 14.0499999999997 14.0599999999997 14.0699999999997 14.0799999999997 14.0899999999997 14.0999999999997 14.1099999999997 14.1199999999997 14.1299999999997 14.1399999999997 14.1499999999997 14.1599999999997 14.1699999999997 14.1799999999997 14.1899999999997 14.1999999999997 14.2099999999997 14.2199999999997 14.2299999999997 14.2399999999997 14.2499999999997 14.2599999999997 14.2699999999997 14.2799999999997 14.2899999999997 14.2999999999997 14.3099999999997 14.3199999999997 14.3299999999997 14.3399999999997 14.3499999999997 14.3599999999997 14.3699999999997 14.3799999999997 14.3899999999997 14.3999999999997 14.4099999999997 14.4199999999997 14.4299999999997 14.4399999999997 14.4499999999997 14.4599999999997 14.4699999999997 14.4799999999997 14.4899999999997 14.4999999999997 14.5099999999997 14.5199999999997 14.5299999999997 14.5399999999997 14.5499999999997 14.5599999999997 14.5699999999997 14.5799999999997 14.5899999999997 14.5999999999997 14.6099999999997 14.6199999999997 14.6299999999997 14.6399999999997 14.6499999999997 14.6599999999997 14.6699999999997 14.6799999999997 14.6899999999997 14.6999999999997 14.7099999999997 14.7199999999997 14.7299999999997 14.7399999999997 14.7499999999997 14.7599999999997 14.7699999999997 14.7799999999997 14.7899999999997 14.7999999999997 14.8099999999997 14.8199999999997 14.8299999999997 14.8399999999997 14.8499999999997 14.8599999999997 14.8699999999997 14.8799999999997 14.8899999999997 14.8999999999997 14.9099999999997 14.9199999999997 14.9299999999997 14.9399999999997 14.9499999999997 14.9599999999997 14.9699999999997 14.9799999999997 14.9899999999997 14.9999999999997 15.0099999999997 15.0199999999997 15.0299999999997 15.0399999999997 15.0499999999997 15.0599999999997 15.0699999999997 15.0799999999997 15.0899999999997 15.0999999999997 15.1099999999997 15.1199999999997 15.1299999999997 15.1399999999997 15.1499999999997 15.1599999999997 15.1699999999997 15.1799999999997 15.1899999999997 15.1999999999997 15.2099999999997 15.2199999999997 15.2299999999997 15.2399999999997 15.2499999999997 15.2599999999997 15.2699999999997 15.2799999999997 15.2899999999997 15.2999999999997 15.3099999999997 15.3199999999997 15.3299999999997 15.3399999999997 15.3499999999997 15.3599999999997 15.3699999999997 15.3799999999997 15.3899999999997 15.3999999999997 15.4099999999997 15.4199999999997 15.4299999999997 15.4399999999997 15.4499999999997 15.4599999999997 15.4699999999997 15.4799999999997 15.4899999999997 15.4999999999997 15.5099999999997 15.5199999999997 15.5299999999997 15.5399999999997 15.5499999999997 15.5599999999997 15.5699999999997 15.5799999999997 15.5899999999997 15.5999999999997 15.6099999999997 15.6199999999997 15.6299999999997 15.6399999999997 15.6499999999997 15.6599999999997 15.6699999999997 15.6799999999997 15.6899999999997 15.6999999999997 15.7099999999997 15.7199999999997 15.7299999999997 15.7399999999997 15.7499999999997 15.7599999999997 15.7699999999997 15.7799999999997 15.7899999999997 15.7999999999997 15.8099999999997 15.8199999999997 15.8299999999997 15.8399999999997 15.8499999999997 15.8599999999997 15.8699999999997 15.8799999999997 15.8899999999997 15.8999999999997 15.9099999999997 15.9199999999997 15.9299999999997 15.9399999999997 15.9499999999997 15.9599999999997 15.9699999999997 15.9799999999997 15.9899999999997 15.9999999999997 16.0099999999997 16.0199999999997 16.0299999999997 16.0399999999997 16.0499999999997 16.0599999999997 16.0699999999997 16.0799999999997 16.0899999999997 16.0999999999997 16.1099999999997 16.1199999999997 16.1299999999997 16.1399999999997 16.1499999999997 16.1599999999997 16.1699999999997 16.1799999999997 16.1899999999997 16.1999999999997 16.2099999999997 16.2199999999997 16.2299999999997 16.2399999999997 16.2499999999997 16.2599999999997 16.2699999999997 16.2799999999997 16.2899999999997 16.2999999999997 16.3099999999998 16.3199999999998 16.3299999999998 16.3399999999998 16.3499999999998 16.3599999999998 16.3699999999998 16.3799999999998 16.3899999999998 16.3999999999998 16.4099999999998 16.4199999999998 16.4299999999998 16.4399999999998 16.4499999999998 16.4599999999998 16.4699999999998 16.4799999999998 16.4899999999998 16.4999999999998 16.5099999999998 16.5199999999998 16.5299999999998 16.5399999999998 16.5499999999998 16.5599999999998 16.5699999999998 16.5799999999998 16.5899999999998 16.5999999999998 16.6099999999998 16.6199999999998 16.6299999999998 16.6399999999998 16.6499999999998 16.6599999999998 16.6699999999998 16.6799999999998 16.6899999999998 16.6999999999998 16.7099999999998 16.7199999999998 16.7299999999998 16.7399999999998 16.7499999999998 16.7599999999998 16.7699999999998 16.7799999999998 16.7899999999998 16.7999999999998 16.8099999999998 16.8199999999998 16.8299999999998 16.8399999999998 16.8499999999998 16.8599999999998 16.8699999999998 16.8799999999998 16.8899999999998 16.8999999999998 16.9099999999998 16.9199999999998 16.9299999999998 16.9399999999998 16.9499999999999 16.9599999999999 16.9699999999999 16.9799999999999 16.9899999999999 16.9999999999999 17.0099999999999 17.0199999999999 17.0299999999999 17.0399999999999 17.0499999999999 17.0599999999999 17.0699999999999 17.0799999999999 17.0899999999999 17.0999999999999 17.1099999999999 17.1199999999999 17.1299999999999 17.1399999999999 17.1499999999999 17.1599999999999 17.1699999999999 17.1799999999999 17.1899999999999 17.1999999999999 17.2099999999999 17.2199999999999 17.2299999999999 17.2399999999999 17.2499999999999 17.2599999999999 17.2699999999999 17.2799999999999 17.2899999999999 17.2999999999999 17.3099999999999 17.3199999999999 17.3299999999999 17.3399999999999 17.3499999999999 17.3599999999999 17.3699999999999 17.3799999999999 17.3899999999999 17.3999999999999 17.4099999999999 17.4199999999999 17.4299999999999 17.4399999999999 17.4499999999999 17.4599999999999 17.4699999999999 17.4799999999999 17.4899999999999 17.4999999999999 17.5099999999999 17.5199999999999 17.5299999999999 17.5399999999999 17.5499999999999 17.5599999999999 17.5699999999999 17.5799999999999 17.59 17.6 17.61 17.62 17.63 17.64 17.65 17.66 17.67 17.68 17.69 17.7 17.71 17.72 17.73 17.74 17.75 17.76 17.77 17.78 17.79 17.8 17.81 17.82 17.83 17.84 17.85 17.86 17.87 17.88 17.89 17.9 17.91 17.92 17.93 17.94 17.95 17.96 17.97 17.98 17.99 18 18.01 18.02 18.03 18.04 18.05 18.06 18.07 18.08 18.09 18.1 18.11 18.12 18.13 18.14 18.15 18.16 18.17 18.18 18.19 18.2 18.21 18.22 18.2300000000001 18.2400000000001 18.2500000000001 18.2600000000001 18.2700000000001 18.2800000000001 18.2900000000001 18.3000000000001 18.3100000000001 18.3200000000001 18.3300000000001 18.3400000000001 18.3500000000001 18.3600000000001 18.3700000000001 18.3800000000001 18.3900000000001 18.4000000000001 18.4100000000001 18.4200000000001 18.4300000000001 18.4400000000001 18.4500000000001 18.4600000000001 18.4700000000001 18.4800000000001 18.4900000000001 18.5000000000001 18.5100000000001 18.5200000000001 18.5300000000001 18.5400000000001 18.5500000000001 18.5600000000001 18.5700000000001 18.5800000000001 18.5900000000001 18.6000000000001 18.6100000000001 18.6200000000001 18.6300000000001 18.6400000000001 18.6500000000001 18.6600000000001 18.6700000000001 18.6800000000001 18.6900000000001 18.7000000000001 18.7100000000001 18.7200000000001 18.7300000000001 18.7400000000001 18.7500000000001 18.7600000000001 18.7700000000001 18.7800000000001 18.7900000000001 18.8000000000001 18.8100000000001 18.8200000000001 18.8300000000001 18.8400000000001 18.8500000000001 18.8600000000001 18.8700000000002 18.8800000000002 18.8900000000002 18.9000000000002 18.9100000000002 18.9200000000002 18.9300000000002 18.9400000000002 18.9500000000002 18.9600000000002 18.9700000000002 18.9800000000002 18.9900000000002 19.0000000000002 19.0100000000002 19.0200000000002 19.0300000000002 19.0400000000002 19.0500000000002 19.0600000000002 19.0700000000002 19.0800000000002 19.0900000000002 19.1000000000002 19.1100000000002 19.1200000000002 19.1300000000002 19.1400000000002 19.1500000000002 19.1600000000002 19.1700000000002 19.1800000000002 19.1900000000002 19.2000000000002 19.2100000000002 19.2200000000002 19.2300000000002 19.2400000000002 19.2500000000002 19.2600000000002 19.2700000000002 19.2800000000002 19.2900000000002 19.3000000000002 19.3100000000002 19.3200000000002 19.3300000000002 19.3400000000002 19.3500000000002 19.3600000000002 19.3700000000002 19.3800000000002 19.3900000000002 19.4000000000002 19.4100000000002 19.4200000000002 19.4300000000002 19.4400000000002 19.4500000000002 19.4600000000002 19.4700000000002 19.4800000000002 19.4900000000002 19.5000000000002 19.5100000000003 19.5200000000003 19.5300000000003 19.5400000000003 19.5500000000003 19.5600000000003 19.5700000000003 19.5800000000003 19.5900000000003 19.6000000000003 19.6100000000003 19.6200000000003 19.6300000000003 19.6400000000003 19.6500000000003 19.6600000000003 19.6700000000003 19.6800000000003 19.6900000000003 19.7000000000003 19.7100000000003 19.7200000000003 19.7300000000003 19.7400000000003 19.7500000000003 19.7600000000003 19.7700000000003 19.7800000000003 19.7900000000003 19.8000000000003 19.8100000000003 19.8200000000003 19.8300000000003 19.8400000000003 19.8500000000003 19.8600000000003 19.8700000000003 19.8800000000003 19.8900000000003 19.9000000000003 19.9100000000003 19.9200000000003 19.9300000000003 19.9400000000003 19.9500000000003 19.9600000000003 19.9700000000003 19.9800000000003 19.9900000000003 20.0000000000003 20.0100000000003 20.0200000000003 20.0300000000003 20.0400000000003 20.0500000000003 20.0600000000003 20.0700000000003 20.0800000000003 20.0900000000003 20.1000000000003 20.1100000000003 20.1200000000003 20.1300000000003 20.1400000000003 20.1500000000004 20.1600000000004 20.1700000000004 20.1800000000004 20.1900000000004 20.2000000000004 20.2100000000004 20.2200000000004 20.2300000000004 20.2400000000004 20.2500000000004 20.2600000000004 20.2700000000004 20.2800000000004 20.2900000000004 20.3000000000004 20.3100000000004 20.3200000000004 20.3300000000004 20.3400000000004 20.3500000000004 20.3600000000004 20.3700000000004 20.3800000000004 20.3900000000004 20.4000000000004 20.4100000000004 20.4200000000004 20.4300000000004 20.4400000000004 20.4500000000004 20.4600000000004 20.4700000000004 20.4800000000004 20.4900000000004 20.5000000000004 20.5100000000004 20.5200000000004 20.5300000000004 20.5400000000004 20.5500000000004 20.5600000000004 20.5700000000004 20.5800000000004 20.5900000000004 20.6000000000004 20.6100000000004 20.6200000000004 20.6300000000004 20.6400000000004 20.6500000000004 20.6600000000004 20.6700000000004 20.6800000000004 20.6900000000004 20.7000000000004 20.7100000000004 20.7200000000004 20.7300000000004 20.7400000000004 20.7500000000004 20.7600000000004 20.7700000000004 20.7800000000004 20.7900000000005 20.8000000000005 20.8100000000005 20.8200000000005 20.8300000000005 20.8400000000005 20.8500000000005 20.8600000000005 20.8700000000005 20.8800000000005 20.8900000000005 20.9000000000005 20.9100000000005 20.9200000000005 20.9300000000005 20.9400000000005 20.9500000000005 20.9600000000005 20.9700000000005 20.9800000000005 20.9900000000005 21.0000000000005 21.0100000000005 21.0200000000005 21.0300000000005 21.0400000000005 21.0500000000005 21.0600000000005 21.0700000000005 21.0800000000005 21.0900000000005 21.1000000000005 21.1100000000005 21.1200000000005 21.1300000000005 21.1400000000005 21.1500000000005 21.1600000000005 21.1700000000005 21.1800000000005 21.1900000000005 21.2000000000005 21.2100000000005 21.2200000000005 21.2300000000005 21.2400000000005 21.2500000000005 21.2600000000005 21.2700000000005 21.2800000000005 21.2900000000005 21.3000000000005 21.3100000000005 21.3200000000005 21.3300000000005 21.3400000000005 21.3500000000005 21.3600000000005 21.3700000000005 21.3800000000005 21.3900000000005 21.4000000000005 21.4100000000005 21.4200000000005 21.4300000000006 21.4400000000006 21.4500000000006 21.4600000000006 21.4700000000006 21.4800000000006 21.4900000000006 21.5000000000006 21.5100000000006 21.5200000000006 21.5300000000006 21.5400000000006 21.5500000000006 21.5600000000006 21.5700000000006 21.5800000000006 21.5900000000006 21.6000000000006 21.6100000000006 21.6200000000006 21.6300000000006 21.6400000000006 21.6500000000006 21.6600000000006 21.6700000000006 21.6800000000006 21.6900000000006 21.7000000000006 21.7100000000006 21.7200000000006 21.7300000000006 21.7400000000006 21.7500000000006 21.7600000000006 21.7700000000006 21.7800000000006 21.7900000000006 21.8000000000006 21.8100000000006 21.8200000000006 21.8300000000006 21.8400000000006 21.8500000000006 21.8600000000006 21.8700000000006 21.8800000000006 21.8900000000006 21.9000000000006 21.9100000000006 21.9200000000006 21.9300000000006 21.9400000000006 21.9500000000006 21.9600000000006 21.9700000000006 21.9800000000006 21.9900000000006 22.0000000000006 22.0100000000006 22.0200000000006 22.0300000000006 22.0400000000006 22.0500000000006 22.0600000000006 22.0700000000007 22.0800000000007 22.0900000000007 22.1000000000007 22.1100000000007 22.1200000000007 22.1300000000007 22.1400000000007 22.1500000000007 22.1600000000007 22.1700000000007 22.1800000000007 22.1900000000007 22.2000000000007 22.2100000000007 22.2200000000007 22.2300000000007 22.2400000000007 22.2500000000007 22.2600000000007 22.2700000000007 22.2800000000007 22.2900000000007 22.3000000000007 22.3100000000007 22.3200000000007 22.3300000000007 22.3400000000007 22.3500000000007 22.3600000000007 22.3700000000007 22.3800000000007 22.3900000000007 22.4000000000007 22.4100000000007 22.4200000000007 22.4300000000007 22.4400000000007 22.4500000000007 22.4600000000007 22.4700000000007 22.4800000000007 22.4900000000007 22.5000000000007 22.5100000000007 22.5200000000007 22.5300000000007 22.5400000000007 22.5500000000007 22.5600000000007 22.5700000000007 22.5800000000007 22.5900000000007 22.6000000000007 22.6100000000007 22.6200000000007 22.6300000000007 22.6400000000007 22.6500000000007 22.6600000000007 22.6700000000007 22.6800000000007 22.6900000000007 22.7000000000007 22.7100000000008 22.7200000000008 22.7300000000008 22.7400000000008 22.7500000000008 22.7600000000008 22.7700000000008 22.7800000000008 22.7900000000008 22.8000000000008 22.8100000000008 22.8200000000008 22.8300000000008 22.8400000000008 22.8500000000008 22.8600000000008 22.8700000000008 22.8800000000008 22.8900000000008 22.9000000000008 22.9100000000008 22.9200000000008 22.9300000000008 22.9400000000008 22.9500000000008 22.9600000000008 22.9700000000008 22.9800000000008 22.9900000000008 23.0000000000008 23.0100000000008 23.0200000000008 23.0300000000008 23.0400000000008 23.0500000000008 23.0600000000008 23.0700000000008 23.0800000000008 23.0900000000008 23.1000000000008 23.1100000000008 23.1200000000008 23.1300000000008 23.1400000000008 23.1500000000008 23.1600000000008 23.1700000000008 23.1800000000008 23.1900000000008 23.2000000000008 23.2100000000008 23.2200000000008 23.2300000000008 23.2400000000008 23.2500000000008 23.2600000000008 23.2700000000008 23.2800000000008 23.2900000000008 23.3000000000008 23.3100000000008 23.3200000000008 23.3300000000008 23.3400000000008 23.3500000000009 23.3600000000009 23.3700000000009 23.3800000000009 23.3900000000009 23.4000000000009 23.4100000000009 23.4200000000009 23.4300000000009 23.4400000000009 23.4500000000009 23.4600000000009 23.4700000000009 23.4800000000009 23.4900000000009 23.5000000000009 23.5100000000009 23.5200000000009 23.5300000000009 23.5400000000009 23.5500000000009 23.5600000000009 23.5700000000009 23.5800000000009 23.5900000000009 23.6000000000009 23.6100000000009 23.6200000000009 23.6300000000009 23.6400000000009 23.6500000000009 23.6600000000009 23.6700000000009 23.6800000000009 23.6900000000009 23.7000000000009 23.7100000000009 23.7200000000009 23.7300000000009 23.7400000000009 23.7500000000009 23.7600000000009 23.7700000000009 23.7800000000009 23.7900000000009 23.8000000000009 23.8100000000009 23.8200000000009 23.8300000000009 23.8400000000009 23.8500000000009 23.8600000000009 23.8700000000009 23.8800000000009 23.8900000000009 23.9000000000009 23.9100000000009 23.9200000000009 23.9300000000009 23.9400000000009 23.9500000000009 23.9600000000009 23.9700000000009 23.9800000000009 23.990000000001 24.000000000001 24.010000000001 24.020000000001 24.030000000001 24.040000000001 24.050000000001 24.060000000001 24.070000000001 24.080000000001 24.090000000001 24.100000000001 24.110000000001 24.120000000001 24.130000000001 24.140000000001 24.150000000001 24.160000000001 24.170000000001 24.180000000001 24.190000000001 24.200000000001 24.210000000001 24.220000000001 24.230000000001 24.240000000001 24.250000000001 24.260000000001 24.270000000001 24.280000000001 24.290000000001 24.300000000001 24.310000000001 24.320000000001 24.330000000001 24.340000000001 24.350000000001 24.360000000001 24.370000000001 24.380000000001 24.390000000001 24.400000000001 24.410000000001 24.420000000001 24.430000000001 24.440000000001 24.450000000001 24.460000000001 24.470000000001 24.480000000001 24.490000000001 24.500000000001 24.510000000001 24.520000000001 24.530000000001 24.540000000001 24.550000000001 24.560000000001 24.570000000001 24.580000000001 24.590000000001 24.600000000001 24.610000000001 24.620000000001 24.6300000000011 24.6400000000011 24.6500000000011 24.6600000000011 24.6700000000011 24.6800000000011 24.6900000000011 24.7000000000011 24.7100000000011 24.7200000000011 24.7300000000011 24.7400000000011 24.7500000000011 24.7600000000011 24.7700000000011 24.7800000000011 24.7900000000011 24.8000000000011 24.8100000000011 24.8200000000011 24.8300000000011 24.8400000000011 24.8500000000011 24.8600000000011 24.8700000000011 24.8800000000011 24.8900000000011 24.9000000000011 24.9100000000011 24.9200000000011 24.9300000000011 24.9400000000011 24.9500000000011 24.9600000000011 24.9700000000011 24.9800000000011 24.9900000000011 25.0000000000011 25.0100000000011 25.0200000000011 25.0300000000011 25.0400000000011 25.0500000000011 25.0600000000011 25.0700000000011 25.0800000000011 25.0900000000011 25.1000000000011 25.1100000000011 25.1200000000011 25.1300000000011 25.1400000000011 25.1500000000011 25.1600000000011 25.1700000000011 25.1800000000011 25.1900000000011 25.2000000000011 25.2100000000011 25.2200000000011 25.2300000000011 25.2400000000011 25.2500000000011 25.2600000000011 25.2700000000012 25.2800000000012 25.2900000000012 25.3000000000012 25.3100000000012 25.3200000000012 25.3300000000012 25.3400000000012 25.3500000000012 25.3600000000012 25.3700000000012 25.3800000000012 25.3900000000012 25.4000000000012 25.4100000000012 25.4200000000012 25.4300000000012 25.4400000000012 25.4500000000012 25.4600000000012 25.4700000000012 25.4800000000012 25.4900000000012 25.5000000000012 25.5100000000012 25.5200000000012 25.5300000000012 25.5400000000012 25.5500000000012 25.5600000000012 25.5700000000012 25.5800000000012 25.5900000000012 25.6000000000012 25.6100000000012 25.6200000000012 25.6300000000012 25.6400000000012 25.6500000000012 25.6600000000012 25.6700000000012 25.6800000000012 25.6900000000012 25.7000000000012 25.7100000000012 25.7200000000012 25.7300000000012 25.7400000000012 25.7500000000012 25.7600000000012 25.7700000000012 25.7800000000012 25.7900000000012 25.8000000000012 25.8100000000012 25.8200000000012 25.8300000000012 25.8400000000012 25.8500000000012 25.8600000000012 25.8700000000012 25.8800000000012 25.8900000000012 25.9000000000012 25.9100000000013 25.9200000000013 25.9300000000013 25.9400000000013 25.9500000000013 25.9600000000013 25.9700000000013 25.9800000000013 25.9900000000013 26.0000000000013 26.0100000000013 26.0200000000013 26.0300000000013 26.0400000000013 26.0500000000013 26.0600000000013 26.0700000000013 26.0800000000013 26.0900000000013 26.1000000000013 26.1100000000013 26.1200000000013 26.1300000000013 26.1400000000013 26.1500000000013 26.1600000000013 26.1700000000013 26.1800000000013 26.1900000000013 26.2000000000013 26.2100000000013 26.2200000000013 26.2300000000013 26.2400000000013 26.2500000000013 26.2600000000013 26.2700000000013 26.2800000000013 26.2900000000013 26.3000000000013 26.3100000000013 26.3200000000013 26.3300000000013 26.3400000000013 26.3500000000013 26.3600000000013 26.3700000000013 26.3800000000013 26.3900000000013 26.4000000000013 26.4100000000013 26.4200000000013 26.4300000000013 26.4400000000013 26.4500000000013 26.4600000000013 26.4700000000013 26.4800000000013 26.4900000000013 26.5000000000013 26.5100000000013 26.5200000000013 26.5300000000013 26.5400000000013 26.5500000000014 26.5600000000014 26.5700000000014 26.5800000000014 26.5900000000014 26.6000000000014 26.6100000000014 26.6200000000014 26.6300000000014 26.6400000000014 26.6500000000014 26.6600000000014 26.6700000000014 26.6800000000014 26.6900000000014 26.7000000000014 26.7100000000014 26.7200000000014 26.7300000000014 26.7400000000014 26.7500000000014 26.7600000000014 26.7700000000014 26.7800000000014 26.7900000000014 26.8000000000014 26.8100000000014 26.8200000000014 26.8300000000014 26.8400000000014 26.8500000000014 26.8600000000014 26.8700000000014 26.8800000000014 26.8900000000014 26.9000000000014 26.9100000000014 26.9200000000014 26.9300000000014 26.9400000000014 26.9500000000014 26.9600000000014 26.9700000000014 26.9800000000014 26.9900000000014 27.0000000000014 27.0100000000014 27.0200000000014 27.0300000000014 27.0400000000014 27.0500000000014 27.0600000000014 27.0700000000014 27.0800000000014 27.0900000000014 27.1000000000014 27.1100000000014 27.1200000000014 27.1300000000014 27.1400000000014 27.1500000000014 27.1600000000014 27.1700000000014 27.1800000000014 27.1900000000015 27.2000000000015 27.2100000000015 27.2200000000015 27.2300000000015 27.2400000000015 27.2500000000015 27.2600000000015 27.2700000000015 27.2800000000015 27.2900000000015 27.3000000000015 27.3100000000015 27.3200000000015 27.3300000000015 27.3400000000015 27.3500000000015 27.3600000000015 27.3700000000015 27.3800000000015 27.3900000000015 27.4000000000015 27.4100000000015 27.4200000000015 27.4300000000015 27.4400000000015 27.4500000000015 27.4600000000015 27.4700000000015 27.4800000000015 27.4900000000015 27.5000000000015 27.5100000000015 27.5200000000015 27.5300000000015 27.5400000000015 27.5500000000015 27.5600000000015 27.5700000000015 27.5800000000015 27.5900000000015 27.6000000000015 27.6100000000015 27.6200000000015 27.6300000000015 27.6400000000015 27.6500000000015 27.6600000000015 27.6700000000015 27.6800000000015 27.6900000000015 27.7000000000015 27.7100000000015 27.7200000000015 27.7300000000015 27.7400000000015 27.7500000000015 27.7600000000015 27.7700000000015 27.7800000000015 27.7900000000015 27.8000000000015 27.8100000000015 27.8200000000015 27.8300000000016 27.8400000000016 27.8500000000016 27.8600000000016 27.8700000000016 27.8800000000016 27.8900000000016 27.9000000000016 27.9100000000016 27.9200000000016 27.9300000000016 27.9400000000016 27.9500000000016 27.9600000000016 27.9700000000016 27.9800000000016 27.9900000000016 28.0000000000016 28.0100000000016 28.0200000000016 28.0300000000016 28.0400000000016 28.0500000000016 28.0600000000016 28.0700000000016 28.0800000000016 28.0900000000016 28.1000000000016 28.1100000000016 28.1200000000016 28.1300000000016 28.1400000000016 28.1500000000016 28.1600000000016 28.1700000000016 28.1800000000016 28.1900000000016 28.2000000000016 28.2100000000016 28.2200000000016 28.2300000000016 28.2400000000016 28.2500000000016 28.2600000000016 28.2700000000016 28.2800000000016 28.2900000000016 28.3000000000016 28.3100000000016 28.3200000000016 28.3300000000016 28.3400000000016 28.3500000000016 28.3600000000016 28.3700000000016 28.3800000000016 28.3900000000016 28.4000000000016 28.4100000000016 28.4200000000016 28.4300000000016 28.4400000000016 28.4500000000016 28.4600000000016 28.4700000000017 28.4800000000017 28.4900000000017 28.5000000000017 28.5100000000017 28.5200000000017 28.5300000000017 28.5400000000017 28.5500000000017 28.5600000000017 28.5700000000017 28.5800000000017 28.5900000000017 28.6000000000017 28.6100000000017 28.6200000000017 28.6300000000017 28.6400000000017 28.6500000000017 28.6600000000017 28.6700000000017 28.6800000000017 28.6900000000017 28.7000000000017 28.7100000000017 28.7200000000017 28.7300000000017 28.7400000000017 28.7500000000017 28.7600000000017 28.7700000000017 28.7800000000017 28.7900000000017 28.8000000000017 28.8100000000017 28.8200000000017 28.8300000000017 28.8400000000017 28.8500000000017 28.8600000000017 28.8700000000017 28.8800000000017 28.8900000000017 28.9000000000017 28.9100000000017 28.9200000000017 28.9300000000017 28.9400000000017 28.9500000000017 28.9600000000017 28.9700000000017 28.9800000000017 28.9900000000017 29.0000000000017 29.0100000000017 29.0200000000017 29.0300000000017 29.0400000000017 29.0500000000017 29.0600000000017 29.0700000000017 29.0800000000017 29.0900000000017 29.1000000000017 29.1100000000018 29.1200000000018 29.1300000000018 29.1400000000018 29.1500000000018 29.1600000000018 29.1700000000018 29.1800000000018 29.1900000000018 29.2000000000018 29.2100000000018 29.2200000000018 29.2300000000018 29.2400000000018 29.2500000000018 29.2600000000018 29.2700000000018 29.2800000000018 29.2900000000018 29.3000000000018 29.3100000000018 29.3200000000018 29.3300000000018 29.3400000000018 29.3500000000018 29.3600000000018 29.3700000000018 29.3800000000018 29.3900000000018 29.4000000000018 29.4100000000018 29.4200000000018 29.4300000000018 29.4400000000018 29.4500000000018 29.4600000000018 29.4700000000018 29.4800000000018 29.4900000000018 29.5000000000018 29.5100000000018 29.5200000000018 29.5300000000018 29.5400000000018 29.5500000000018 29.5600000000018 29.5700000000018 29.5800000000018 29.5900000000018 29.6000000000018 29.6100000000018 29.6200000000018 29.6300000000018 29.6400000000018 29.6500000000018 29.6600000000018 29.6700000000018 29.6800000000018 29.6900000000018 29.7000000000018 29.7100000000018 29.7200000000018 29.7300000000018 29.7400000000018 29.7500000000019 29.7600000000019 29.7700000000019 29.7800000000019 29.7900000000019 29.8000000000019 29.8100000000019 29.8200000000019 29.8300000000019 29.8400000000019 29.8500000000019 29.8600000000019 29.8700000000019 29.8800000000019 29.8900000000019 29.9000000000019 29.9100000000019 29.9200000000019 29.9300000000019 29.9400000000019 29.9500000000019 29.9600000000019 29.9700000000019 29.9800000000019 29.9900000000019 30.0000000000019 30.0100000000019 30.0200000000019 30.0300000000019 30.0400000000019 30.0500000000019 30.0600000000019 30.0700000000019 30.0800000000019 30.0900000000019 30.1000000000019 30.1100000000019 30.1200000000019 30.1300000000019 30.1400000000019 30.1500000000019 30.1600000000019 30.1700000000019 30.1800000000019 30.1900000000019 30.2000000000019 30.2100000000019 30.2200000000019 30.2300000000019 30.2400000000019 30.2500000000019 30.2600000000019 30.2700000000019 30.2800000000019 30.2900000000019 30.3000000000019 30.3100000000019 30.3200000000019 30.3300000000019 30.3400000000019 30.3500000000019 30.3600000000019 30.3700000000019 30.3800000000019 30.390000000002 30.400000000002 30.410000000002 30.420000000002 30.430000000002 30.440000000002 30.450000000002 30.460000000002 30.470000000002 30.480000000002 30.490000000002 30.500000000002 30.510000000002 30.520000000002 30.530000000002 30.540000000002 30.550000000002 30.560000000002 30.570000000002 30.580000000002 30.590000000002 30.600000000002 30.610000000002 30.620000000002 30.630000000002 30.640000000002 30.650000000002 30.660000000002 30.670000000002 30.680000000002 30.690000000002 30.700000000002 30.710000000002 30.720000000002 30.730000000002 30.740000000002 30.750000000002 30.760000000002 30.770000000002 30.780000000002 30.790000000002 30.800000000002 30.810000000002 30.820000000002 30.830000000002 30.840000000002 30.850000000002 30.860000000002 30.870000000002 30.880000000002 30.890000000002 30.900000000002 30.910000000002 30.920000000002 30.930000000002 30.940000000002 30.950000000002 30.960000000002 30.970000000002 30.980000000002 30.990000000002 31.000000000002 31.010000000002 31.020000000002 31.0300000000021 31.0400000000021 31.0500000000021 31.0600000000021 31.0700000000021 31.0800000000021 31.0900000000021 31.1000000000021 31.1100000000021 31.1200000000021 31.1300000000021 31.1400000000021 31.1500000000021 31.1600000000021 31.1700000000021 31.1800000000021 31.1900000000021 31.2000000000021 31.2100000000021 31.2200000000021 31.2300000000021 31.2400000000021 31.2500000000021 31.2600000000021 31.2700000000021 31.2800000000021 31.2900000000021 31.3000000000021 31.3100000000021 31.3200000000021 31.3300000000021 31.3400000000021 31.3500000000021 31.3600000000021 31.3700000000021 31.3800000000021 31.3900000000021 31.4000000000021 31.4100000000021 31.4200000000021 31.4300000000021 31.4400000000021 31.4500000000021 31.4600000000021 31.4700000000021 31.4800000000021 31.4900000000021 31.5000000000021 31.5100000000021 31.5200000000021 31.5300000000021 31.5400000000021 31.5500000000021 31.5600000000021 31.5700000000021 31.5800000000021 31.5900000000021 31.6000000000021 31.6100000000021 31.6200000000021 31.6300000000021 31.6400000000021 31.6500000000021 31.6600000000021 31.6700000000022 31.6800000000022 31.6900000000022 31.7000000000022 31.7100000000022 31.7200000000022 31.7300000000022 31.7400000000022 31.7500000000022 31.7600000000022 31.7700000000022 31.7800000000022 31.7900000000022 31.8000000000022 31.8100000000022 31.8200000000022 31.8300000000022 31.8400000000022 31.8500000000022 31.8600000000022 31.8700000000022 31.8800000000022 31.8900000000022 31.9000000000022 31.9100000000022 31.9200000000022 31.9300000000022 31.9400000000022 31.9500000000022 31.9600000000022 31.9700000000022 31.9800000000022 31.9900000000022 32.0000000000022 32.0100000000022 32.0200000000022 32.0300000000022 32.0400000000022 32.0500000000022 32.0600000000022 32.0700000000022 32.0800000000022 32.0900000000022 32.1000000000022 32.1100000000022 32.1200000000022 32.1300000000022 32.1400000000022 32.1500000000022 32.1600000000022 32.1700000000022 32.1800000000022 32.1900000000022 32.2000000000022 32.2100000000022 32.2200000000022 32.2300000000022 32.2400000000022 32.2500000000022 32.2600000000022 32.2700000000021 32.2800000000021 32.2900000000021 32.3000000000021 32.3100000000021 32.3200000000021 32.3300000000021 32.3400000000021 32.3500000000021 32.3600000000021 32.3700000000021 32.3800000000021 32.3900000000021 32.4000000000021 32.4100000000021 32.4200000000021 32.4300000000021 32.4400000000021 32.4500000000021 32.4600000000021 32.4700000000021 32.4800000000021 32.4900000000021 32.5000000000021 32.5100000000021 32.5200000000021 32.5300000000021 32.5400000000021 32.5500000000021 32.5600000000021 32.5700000000021 32.5800000000021 32.5900000000021 32.6000000000021 32.6100000000021 32.6200000000021 32.6300000000021 32.6400000000021 32.6500000000021 32.6600000000021 32.6700000000021 32.6800000000021 32.6900000000021 32.7000000000021 32.7100000000021 32.7200000000021 32.7300000000021 32.7400000000021 32.7500000000021 32.7600000000021 32.770000000002 32.780000000002 32.790000000002 32.800000000002 32.810000000002 32.820000000002 32.830000000002 32.840000000002 32.850000000002 32.860000000002 32.870000000002 32.880000000002 32.890000000002 32.900000000002 32.910000000002 32.920000000002 32.930000000002 32.940000000002 32.950000000002 32.960000000002 32.970000000002 32.980000000002 32.990000000002 33.000000000002 33.010000000002 33.020000000002 33.030000000002 33.040000000002 33.050000000002 33.060000000002 33.070000000002 33.080000000002 33.090000000002 33.100000000002 33.110000000002 33.120000000002 33.130000000002 33.140000000002 33.150000000002 33.160000000002 33.170000000002 33.180000000002 33.190000000002 33.200000000002 33.210000000002 33.220000000002 33.230000000002 33.240000000002 33.250000000002 33.260000000002 33.270000000002 33.2800000000019 33.2900000000019 33.3000000000019 33.3100000000019 33.3200000000019 33.3300000000019 33.3400000000019 33.3500000000019 33.3600000000019 33.3700000000019 33.3800000000019 33.3900000000019 33.4000000000019 33.4100000000019 33.4200000000019 33.4300000000019 33.4400000000019 33.4500000000019 33.4600000000019 33.4700000000019 33.4800000000019 33.4900000000019 33.5000000000019 33.5100000000019 33.5200000000019 33.5300000000019 33.5400000000019 33.5500000000019 33.5600000000019 33.5700000000019 33.5800000000019 33.5900000000019 33.6000000000019 33.6100000000019 33.6200000000019 33.6300000000019 33.6400000000019 33.6500000000019 33.6600000000019 33.6700000000019 33.6800000000019 33.6900000000019 33.7000000000019 33.7100000000019 33.7200000000019 33.7300000000019 33.7400000000019 33.7500000000019 33.7600000000019 33.7700000000019 33.7800000000018 33.7900000000018 33.8000000000018 33.8100000000018 33.8200000000018 33.8300000000018 33.8400000000018 33.8500000000018 33.8600000000018 33.8700000000018 33.8800000000018 33.8900000000018 33.9000000000018 33.9100000000018 33.9200000000018 33.9300000000018 33.9400000000018 33.9500000000018 33.9600000000018 33.9700000000018 33.9800000000018 33.9900000000018 34.0000000000018 34.0100000000018 34.0200000000018 34.0300000000018 34.0400000000018 34.0500000000018 34.0600000000018 34.0700000000018 34.0800000000018 34.0900000000018 34.1000000000018 34.1100000000018 34.1200000000018 34.1300000000018 34.1400000000018 34.1500000000018 34.1600000000018 34.1700000000018 34.1800000000018 34.1900000000018 34.2000000000018 34.2100000000018 34.2200000000018 34.2300000000018 34.2400000000018 34.2500000000018 34.2600000000018 34.2700000000018 34.2800000000017 34.2900000000017 34.3000000000017 34.3100000000017 34.3200000000017 34.3300000000017 34.3400000000017 34.3500000000017 34.3600000000017 34.3700000000017 34.3800000000017 34.3900000000017 34.4000000000017 34.4100000000017 34.4200000000017 34.4300000000017 34.4400000000017 34.4500000000017 34.4600000000017 34.4700000000017 34.4800000000017 34.4900000000017 34.5000000000017 34.5100000000017 34.5200000000017 34.5300000000017 34.5400000000017 34.5500000000017 34.5600000000017 34.5700000000017 34.5800000000017 34.5900000000017 34.6000000000017 34.6100000000017 34.6200000000017 34.6300000000017 34.6400000000017 34.6500000000017 34.6600000000017 34.6700000000017 34.6800000000017 34.6900000000017 34.7000000000017 34.7100000000017 34.7200000000017 34.7300000000017 34.7400000000017 34.7500000000017 34.7600000000017 34.7700000000017 34.7800000000016 34.7900000000016 34.8000000000016 34.8100000000016 34.8200000000016 34.8300000000016 34.8400000000016 34.8500000000016 34.8600000000016 34.8700000000016 34.8800000000016 34.8900000000016 34.9000000000016 34.9100000000016 34.9200000000016 34.9300000000016 34.9400000000016 34.9500000000016 34.9600000000016 34.9700000000016 34.9800000000016 34.9900000000016 35.0000000000016 35.0100000000016 35.0200000000016 35.0300000000016 35.0400000000016 35.0500000000016 35.0600000000016 35.0700000000016 35.0800000000016 35.0900000000016 35.1000000000016 35.1100000000016 35.1200000000016 35.1300000000016 35.1400000000016 35.1500000000016 35.1600000000016 35.1700000000016 35.1800000000016 35.1900000000016 35.2000000000016 35.2100000000016 35.2200000000016 35.2300000000016 35.2400000000016 35.2500000000016 35.2600000000016 35.2700000000016 35.2800000000016 35.2900000000015 35.3000000000015 35.3100000000015 35.3200000000015 35.3300000000015 35.3400000000015 35.3500000000015 35.3600000000015 35.3700000000015 35.3800000000015 35.3900000000015 35.4000000000015 35.4100000000015 35.4200000000015 35.4300000000015 35.4400000000015 35.4500000000015 35.4600000000015 35.4700000000015 35.4800000000015 35.4900000000015 35.5000000000015 35.5100000000015 35.5200000000015 35.5300000000015 35.5400000000015 35.5500000000015 35.5600000000015 35.5700000000015 35.5800000000015 35.5900000000015 35.6000000000015 35.6100000000015 35.6200000000015 35.6300000000015 35.6400000000015 35.6500000000015 35.6600000000015 35.6700000000015 35.6800000000015 35.6900000000015 35.7000000000015 35.7100000000015 35.7200000000015 35.7300000000015 35.7400000000015 35.7500000000015 35.7600000000015 35.7700000000015 35.7800000000015 35.7900000000014 35.8000000000014 35.8100000000014 35.8200000000014 35.8300000000014 35.8400000000014 35.8500000000014 35.8600000000014 35.8700000000014 35.8800000000014 35.8900000000014 35.9000000000014 35.9100000000014 35.9200000000014 35.9300000000014 35.9400000000014 35.9500000000014 35.9600000000014 35.9700000000014 35.9800000000014 35.9900000000014 36.0000000000014 36.0100000000014 36.0200000000014 36.0300000000014 36.0400000000014 36.0500000000014 36.0600000000014 36.0700000000014 36.0800000000014 36.0900000000014 36.1000000000014 36.1100000000014 36.1200000000014 36.1300000000014 36.1400000000014 36.1500000000014 36.1600000000014 36.1700000000014 36.1800000000014 36.1900000000014 36.2000000000014 36.2100000000014 36.2200000000014 36.2300000000014 36.2400000000014 36.2500000000014 36.2600000000014 36.2700000000014 36.2800000000014 36.2900000000013 36.3000000000013 36.3100000000013 36.3200000000013 36.3300000000013 36.3400000000013 36.3500000000013 36.3600000000013 36.3700000000013 36.3800000000013 36.3900000000013 36.4000000000013 36.4100000000013 36.4200000000013 36.4300000000013 36.4400000000013 36.4500000000013 36.4600000000013 36.4700000000013 36.4800000000013 36.4900000000013 36.5000000000013 36.5100000000013 36.5200000000013 36.5300000000013 36.5400000000013 36.5500000000013 36.5600000000013 36.5700000000013 36.5800000000013 36.5900000000013 36.6000000000013 36.6100000000013 36.6200000000013 36.6300000000013 36.6400000000013 36.6500000000013 36.6600000000013 36.6700000000013 36.6800000000013 36.6900000000013 36.7000000000013 36.7100000000013 36.7200000000013 36.7300000000013 36.7400000000013 36.7500000000013 36.7600000000013 36.7700000000013 36.7800000000013 36.7900000000012 36.8000000000012 36.8100000000012 36.8200000000012 36.8300000000012 36.8400000000012 36.8500000000012 36.8600000000012 36.8700000000012 36.8800000000012 36.8900000000012 36.9000000000012 36.9100000000012 36.9200000000012 36.9300000000012 36.9400000000012 36.9500000000012 36.9600000000012 36.9700000000012 36.9800000000012 36.9900000000012 37.0000000000012 37.0100000000012 37.0200000000012 37.0300000000012 37.0400000000012 37.0500000000012 37.0600000000012 37.0700000000012 37.0800000000012 37.0900000000012 37.1000000000012 37.1100000000012 37.1200000000012 37.1300000000012 37.1400000000012 37.1500000000012 37.1600000000012 37.1700000000012 37.1800000000012 37.1900000000012 37.2000000000012 37.2100000000012 37.2200000000012 37.2300000000012 37.2400000000012 37.2500000000012 37.2600000000012 37.2700000000012 37.2800000000012 37.2900000000012 37.3000000000011 37.3100000000011 37.3200000000011 37.3300000000011 37.3400000000011 37.3500000000011 37.3600000000011 37.3700000000011 37.3800000000011 37.3900000000011 37.4000000000011 37.4100000000011 37.4200000000011 37.4300000000011 37.4400000000011 37.4500000000011 37.4600000000011 37.4700000000011 37.4800000000011 37.4900000000011 37.5000000000011 37.5100000000011 37.5200000000011 37.5300000000011 37.5400000000011 37.5500000000011 37.5600000000011 37.5700000000011 37.5800000000011 37.5900000000011 37.6000000000011 37.6100000000011 37.6200000000011 37.6300000000011 37.6400000000011 37.6500000000011 37.6600000000011 37.6700000000011 37.6800000000011 37.6900000000011 37.7000000000011 37.7100000000011 37.7200000000011 37.7300000000011 37.7400000000011 37.7500000000011 37.7600000000011 37.7700000000011 37.7800000000011 37.7900000000011 37.800000000001 37.810000000001 37.820000000001 37.830000000001 37.840000000001 37.850000000001 37.860000000001 37.870000000001 37.880000000001 37.890000000001 37.900000000001 37.910000000001 37.920000000001 37.930000000001 37.940000000001 37.950000000001 37.960000000001 37.970000000001 37.980000000001 37.990000000001 38.000000000001 38.010000000001 38.020000000001 38.030000000001 38.040000000001 38.050000000001 38.060000000001 38.070000000001 38.080000000001 38.090000000001 38.100000000001 38.110000000001 38.120000000001 38.130000000001 38.140000000001 38.150000000001 38.160000000001 38.170000000001 38.180000000001 38.190000000001 38.200000000001 38.210000000001 38.220000000001 38.230000000001 38.240000000001 38.250000000001 38.260000000001 38.270000000001 38.280000000001 38.290000000001 38.3000000000009 38.3100000000009 38.3200000000009 38.3300000000009 38.3400000000009 38.3500000000009 38.3600000000009 38.3700000000009 38.3800000000009 38.3900000000009 38.4000000000009 38.4100000000009 38.4200000000009 38.4300000000009 38.4400000000009 38.4500000000009 38.4600000000009 38.4700000000009 38.4800000000009 38.4900000000009 38.5000000000009 38.5100000000009 38.5200000000009 38.5300000000009 38.5400000000009 38.5500000000009 38.5600000000009 38.5700000000009 38.5800000000009 38.5900000000009 38.6000000000009 38.6100000000009 38.6200000000009 38.6300000000009 38.6400000000009 38.6500000000009 38.6600000000009 38.6700000000009 38.6800000000009 38.6900000000009 38.7000000000009 38.7100000000009 38.7200000000009 38.7300000000009 38.7400000000009 38.7500000000009 38.7600000000009 38.7700000000009 38.7800000000009 38.7900000000009 38.8000000000008 38.8100000000008 38.8200000000008 38.8300000000008 38.8400000000008 38.8500000000008 38.8600000000008 38.8700000000008 38.8800000000008 38.8900000000008 38.9000000000008 38.9100000000008 38.9200000000008 38.9300000000008 38.9400000000008 38.9500000000008 38.9600000000008 38.9700000000008 38.9800000000008 38.9900000000008 39.0000000000008 39.0100000000008 39.0200000000008 39.0300000000008 39.0400000000008 39.0500000000008 39.0600000000008 39.0700000000008 39.0800000000008 39.0900000000008 39.1000000000008 39.1100000000008 39.1200000000008 39.1300000000008 39.1400000000008 39.1500000000008 39.1600000000008 39.1700000000008 39.1800000000008 39.1900000000008 39.2000000000008 39.2100000000008 39.2200000000008 39.2300000000008 39.2400000000008 39.2500000000008 39.2600000000008 39.2700000000008 39.2800000000008 39.2900000000008 39.3000000000008 39.3100000000007 39.3200000000007 39.3300000000007 39.3400000000007 39.3500000000007 39.3600000000007 39.3700000000007 39.3800000000007 39.3900000000007 39.4000000000007 39.4100000000007 39.4200000000007 39.4300000000007 39.4400000000007 39.4500000000007 39.4600000000007 39.4700000000007 39.4800000000007 39.4900000000007 39.5000000000007 39.5100000000007 39.5200000000007 39.5300000000007 39.5400000000007 39.5500000000007 39.5600000000007 39.5700000000007 39.5800000000007 39.5900000000007 39.6000000000007 39.6100000000007 39.6200000000007 39.6300000000007 39.6400000000007 39.6500000000007 39.6600000000007 39.6700000000007 39.6800000000007 39.6900000000007 39.7000000000007 39.7100000000007 39.7200000000007 39.7300000000007 39.7400000000007 39.7500000000007 39.7600000000007 39.7700000000007 39.7800000000007 39.7900000000007 39.8000000000007 39.8100000000006 39.8200000000006 39.8300000000006 39.8400000000006 39.8500000000006 39.8600000000006 39.8700000000006 39.8800000000006 39.8900000000006 39.9000000000006 39.9100000000006 39.9200000000006 39.9300000000006 39.9400000000006 39.9500000000006 39.9600000000006 39.9700000000006 39.9800000000006 39.9900000000006 40.0000000000006 40.0100000000006 40.0200000000006 40.0300000000006 40.0400000000006 40.0500000000006 40.0600000000006 40.0700000000006 40.0800000000006 40.0900000000006 40.1000000000006 40.1100000000006 40.1200000000006 40.1300000000006 40.1400000000006 40.1500000000006 40.1600000000006 40.1700000000006 40.1800000000006 40.1900000000006 40.2000000000006 40.2100000000006 40.2200000000006 40.2300000000006 40.2400000000006 40.2500000000006 40.2600000000006 40.2700000000006 40.2800000000006 40.2900000000006 40.3000000000006 40.3100000000005 40.3200000000005 40.3300000000005 40.3400000000005 40.3500000000005 40.3600000000005 40.3700000000005 40.3800000000005 40.3900000000005 40.4000000000005 40.4100000000005 40.4200000000005 40.4300000000005 40.4400000000005 40.4500000000005 40.4600000000005 40.4700000000005 40.4800000000005 40.4900000000005 40.5000000000005 40.5100000000005 40.5200000000005 40.5300000000005 40.5400000000005 40.5500000000005 40.5600000000005 40.5700000000005 40.5800000000005 40.5900000000005 40.6000000000005 40.6100000000005 40.6200000000005 40.6300000000005 40.6400000000005 40.6500000000005 40.6600000000005 40.6700000000005 40.6800000000005 40.6900000000005 40.7000000000005 40.7100000000005 40.7200000000005 40.7300000000005 40.7400000000005 40.7500000000005 40.7600000000005 40.7700000000005 40.7800000000005 40.7900000000005 40.8000000000005 40.8100000000004 40.8200000000004 40.8300000000004 40.8400000000004 40.8500000000004 40.8600000000004 40.8700000000004 40.8800000000004 40.8900000000004 40.9000000000004 40.9100000000004 40.9200000000004 40.9300000000004 40.9400000000004 40.9500000000004 40.9600000000004 40.9700000000004 40.9800000000004 40.9900000000004 41.0000000000004 41.0100000000004 41.0200000000004 41.0300000000004 41.0400000000004 41.0500000000004 41.0600000000004 41.0700000000004 41.0800000000004 41.0900000000004 41.1000000000004 41.1100000000004 41.1200000000004 41.1300000000004 41.1400000000004 41.1500000000004 41.1600000000004 41.1700000000004 41.1800000000004 41.1900000000004 41.2000000000004 41.2100000000004 41.2200000000004 41.2300000000004 41.2400000000004 41.2500000000004 41.2600000000004 41.2700000000004 41.2800000000004 41.2900000000004 41.3000000000004 41.3100000000004 41.3200000000003 41.3300000000003 41.3400000000003 41.3500000000003 41.3600000000003 41.3700000000003 41.3800000000003 41.3900000000003 41.4000000000003 41.4100000000003 41.4200000000003 41.4300000000003 41.4400000000003 41.4500000000003 41.4600000000003 41.4700000000003 41.4800000000003 41.4900000000003 41.5000000000003 41.5100000000003 41.5200000000003 41.5300000000003 41.5400000000003 41.5500000000003 41.5600000000003 41.5700000000003 41.5800000000003 41.5900000000003 41.6000000000003 41.6100000000003 41.6200000000003 41.6300000000003 41.6400000000003 41.6500000000003 41.6600000000003 41.6700000000003 41.6800000000003 41.6900000000003 41.7000000000003 41.7100000000003 41.7200000000003 41.7300000000003 41.7400000000003 41.7500000000003 41.7600000000003 41.7700000000003 41.7800000000003 41.7900000000003 41.8000000000003 41.8100000000003 41.8200000000002 41.8300000000002 41.8400000000002 41.8500000000002 41.8600000000002 41.8700000000002 41.8800000000002 41.8900000000002 41.9000000000002 41.9100000000002 41.9200000000002 41.9300000000002 41.9400000000002 41.9500000000002 41.9600000000002 41.9700000000002 41.9800000000002 41.9900000000002 42.0000000000002 42.0100000000002 42.0200000000002 42.0300000000002 42.0400000000002 42.0500000000002 42.0600000000002 42.0700000000002 42.0800000000002 42.0900000000002 42.1000000000002 42.1100000000002 42.1200000000002 42.1300000000002 42.1400000000002 42.1500000000002 42.1600000000002 42.1700000000002 42.1800000000002 42.1900000000002 42.2000000000002 42.2100000000002 42.2200000000002 42.2300000000002 42.2400000000002 42.2500000000002 42.2600000000002 42.2700000000002 42.2800000000002 42.2900000000002 42.3000000000002 42.3100000000002 42.3200000000001 42.3300000000001 42.3400000000001 42.3500000000001 42.3600000000001 42.3700000000001 42.3800000000001 42.3900000000001 42.4000000000001 42.4100000000001 42.4200000000001 42.4300000000001 42.4400000000001 42.4500000000001 42.4600000000001 42.4700000000001 42.4800000000001 42.4900000000001 42.5000000000001 42.5100000000001 42.5200000000001 42.5300000000001 42.5400000000001 42.5500000000001 42.5600000000001 42.5700000000001 42.5800000000001 42.5900000000001 42.6000000000001 42.6100000000001 42.6200000000001 42.6300000000001 42.6400000000001 42.6500000000001 42.6600000000001 42.6700000000001 42.6800000000001 42.6900000000001 42.7000000000001 42.7100000000001 42.7200000000001 42.7300000000001 42.7400000000001 42.7500000000001 42.7600000000001 42.7700000000001 42.7800000000001 42.7900000000001 42.8000000000001 42.8100000000001 42.8200000000001 42.83 42.84 42.85 42.86 42.87 42.88 42.89 42.9 42.91 42.92 42.93 42.94 42.95 42.96 42.97 42.98 42.99 43 43.01 43.02 43.03 43.04 43.05 43.06 43.07 43.08 43.09 43.1 43.11 43.12 43.13 43.14 43.15 43.16 43.17 43.18 43.19 43.2 43.21 43.22 43.23 43.24 43.25 43.26 43.27 43.28 43.29 43.3 43.31 43.32 43.3299999999999 43.3399999999999 43.3499999999999 43.3599999999999 43.3699999999999 43.3799999999999 43.3899999999999 43.3999999999999 43.4099999999999 43.4199999999999 43.4299999999999 43.4399999999999 43.4499999999999 43.4599999999999 43.4699999999999 43.4799999999999 43.4899999999999 43.4999999999999 43.5099999999999 43.5199999999999 43.5299999999999 43.5399999999999 43.5499999999999 43.5599999999999 43.5699999999999 43.5799999999999 43.5899999999999 43.5999999999999 43.6099999999999 43.6199999999999 43.6299999999999 43.6399999999999 43.6499999999999 43.6599999999999 43.6699999999999 43.6799999999999 43.6899999999999 43.6999999999999 43.7099999999999 43.7199999999999 43.7299999999999 43.7399999999999 43.7499999999999 43.7599999999999 43.7699999999999 43.7799999999999 43.7899999999999 43.7999999999999 43.8099999999999 43.8199999999999 43.8299999999998 43.8399999999998 43.8499999999998 43.8599999999998 43.8699999999998 43.8799999999998 43.8899999999998 43.8999999999998 43.9099999999998 43.9199999999998 43.9299999999998 43.9399999999998 43.9499999999998 43.9599999999998 43.9699999999998 43.9799999999998 43.9899999999998 43.9999999999998 44.0099999999998 44.0199999999998 44.0299999999998 44.0399999999998 44.0499999999998 44.0599999999998 44.0699999999998 44.0799999999998 44.0899999999998 44.0999999999998 44.1099999999998 44.1199999999998 44.1299999999998 44.1399999999998 44.1499999999998 44.1599999999998 44.1699999999998 44.1799999999998 44.1899999999998 44.1999999999998 44.2099999999998 44.2199999999998 44.2299999999998 44.2399999999998 44.2499999999998 44.2599999999998 44.2699999999998 44.2799999999998 44.2899999999998 44.2999999999998 44.3099999999998 44.3199999999998 44.3299999999997 44.3399999999997 44.3499999999997 44.3599999999997 44.3699999999997 44.3799999999997 44.3899999999997 44.3999999999997 44.4099999999997 44.4199999999997 44.4299999999997 44.4399999999997 44.4499999999997 44.4599999999997 44.4699999999997 44.4799999999997 44.4899999999997 44.4999999999997 44.5099999999997 44.5199999999997 44.5299999999997 44.5399999999997 44.5499999999997 44.5599999999997 44.5699999999997 44.5799999999997 44.5899999999997 44.5999999999997 44.6099999999997 44.6199999999997 44.6299999999997 44.6399999999997 44.6499999999997 44.6599999999997 44.6699999999997 44.6799999999997 44.6899999999997 44.6999999999997 44.7099999999997 44.7199999999997 44.7299999999997 44.7399999999997 44.7499999999997 44.7599999999997 44.7699999999997 44.7799999999997 44.7899999999997 44.7999999999997 44.8099999999997 44.8199999999997 44.8299999999997 44.8399999999996 44.8499999999996 44.8599999999996 44.8699999999996 44.8799999999996 44.8899999999996 44.8999999999996 44.9099999999996 44.9199999999996 44.9299999999996 44.9399999999996 44.9499999999996 44.9599999999996 44.9699999999996 44.9799999999996 44.9899999999996 44.9999999999996 45.0099999999996 45.0199999999996 45.0299999999996 45.0399999999996 45.0499999999996 45.0599999999996 45.0699999999996 45.0799999999996 45.0899999999996 45.0999999999996 45.1099999999996 45.1199999999996 45.1299999999996 45.1399999999996 45.1499999999996 45.1599999999996 45.1699999999996 45.1799999999996 45.1899999999996 45.1999999999996 45.2099999999996 45.2199999999996 45.2299999999996 45.2399999999996 45.2499999999996 45.2599999999996 45.2699999999996 45.2799999999996 45.2899999999996 45.2999999999996 45.3099999999996 45.3199999999996 45.3299999999996 45.3399999999995 45.3499999999995 45.3599999999995 45.3699999999995 45.3799999999995 45.3899999999995 45.3999999999995 45.4099999999995 45.4199999999995 45.4299999999995 45.4399999999995 45.4499999999995 45.4599999999995 45.4699999999995 45.4799999999995 45.4899999999995 45.4999999999995 45.5099999999995 45.5199999999995 45.5299999999995 45.5399999999995 45.5499999999995 45.5599999999995 45.5699999999995 45.5799999999995 45.5899999999995 45.5999999999995 45.6099999999995 45.6199999999995 45.6299999999995 45.6399999999995 45.6499999999995 45.6599999999995 45.6699999999995 45.6799999999995 45.6899999999995 45.6999999999995 45.7099999999995 45.7199999999995 45.7299999999995 45.7399999999995 45.7499999999995 45.7599999999995 45.7699999999995 45.7799999999995 45.7899999999995 45.7999999999995 45.8099999999995 45.8199999999995 45.8299999999995 45.8399999999994 45.8499999999994 45.8599999999994 45.8699999999994 45.8799999999994 45.8899999999994 45.8999999999994 45.9099999999994 45.9199999999994 45.9299999999994 45.9399999999994 45.9499999999994 45.9599999999994 45.9699999999994 45.9799999999994 45.9899999999994 45.9999999999994 46.0099999999994 46.0199999999994 46.0299999999994 46.0399999999994 46.0499999999994 46.0599999999994 46.0699999999994 46.0799999999994 46.0899999999994 46.0999999999994 46.1099999999994 46.1199999999994 46.1299999999994 46.1399999999994 46.1499999999994 46.1599999999994 46.1699999999994 46.1799999999994 46.1899999999994 46.1999999999994 46.2099999999994 46.2199999999994 46.2299999999994 46.2399999999994 46.2499999999994 46.2599999999994 46.2699999999994 46.2799999999994 46.2899999999994 46.2999999999994 46.3099999999994 46.3199999999994 46.3299999999994 46.3399999999993 46.3499999999993 46.3599999999993 46.3699999999993 46.3799999999993 46.3899999999993 46.3999999999993 46.4099999999993 46.4199999999993 46.4299999999993 46.4399999999993 46.4499999999993 46.4599999999993 46.4699999999993 46.4799999999993 46.4899999999993 46.4999999999993 46.5099999999993 46.5199999999993 46.5299999999993 46.5399999999993 46.5499999999993 46.5599999999993 46.5699999999993 46.5799999999993 46.5899999999993 46.5999999999993 46.6099999999993 46.6199999999993 46.6299999999993 46.6399999999993 46.6499999999993 46.6599999999993 46.6699999999993 46.6799999999993 46.6899999999993 46.6999999999993 46.7099999999993 46.7199999999993 46.7299999999993 46.7399999999993 46.7499999999993 46.7599999999993 46.7699999999993 46.7799999999993 46.7899999999993 46.7999999999993 46.8099999999993 46.8199999999993 46.8299999999993 46.8399999999993 46.8499999999992 46.8599999999992 46.8699999999992 46.8799999999992 46.8899999999992 46.8999999999992 46.9099999999992 46.9199999999992 46.9299999999992 46.9399999999992 46.9499999999992 46.9599999999992 46.9699999999992 46.9799999999992 46.9899999999992 46.9999999999992 47.0099999999992 47.0199999999992 47.0299999999992 47.0399999999992 47.0499999999992 47.0599999999992 47.0699999999992 47.0799999999992 47.0899999999992 47.0999999999992 47.1099999999992 47.1199999999992 47.1299999999992 47.1399999999992 47.1499999999992 47.1599999999992 47.1699999999992 47.1799999999992 47.1899999999992 47.1999999999992 47.2099999999992 47.2199999999992 47.2299999999992 47.2399999999992 47.2499999999992 47.2599999999992 47.2699999999992 47.2799999999992 47.2899999999992 47.2999999999992 47.3099999999992 47.3199999999992 47.3299999999992 47.3399999999992 47.3499999999991 47.3599999999991 47.3699999999991 47.3799999999991 47.3899999999991 47.3999999999991 47.4099999999991 47.4199999999991 47.4299999999991 47.4399999999991 47.4499999999991 47.4599999999991 47.4699999999991 47.4799999999991 47.4899999999991 47.4999999999991 47.5099999999991 47.5199999999991 47.5299999999991 47.5399999999991 47.5499999999991 47.5599999999991 47.5699999999991 47.5799999999991 47.5899999999991 47.5999999999991 47.6099999999991 47.6199999999991 47.6299999999991 47.6399999999991 47.6499999999991 47.6599999999991 47.6699999999991 47.6799999999991 47.6899999999991 47.6999999999991 47.7099999999991 47.7199999999991 47.7299999999991 47.7399999999991 47.7499999999991 47.7599999999991 47.7699999999991 47.7799999999991 47.7899999999991 47.7999999999991 47.8099999999991 47.8199999999991 47.8299999999991 47.8399999999991 47.849999999999 47.859999999999 47.869999999999 47.879999999999 47.889999999999 47.899999999999 47.909999999999 47.919999999999 47.929999999999 47.939999999999 47.949999999999 47.959999999999 47.969999999999 47.979999999999 47.989999999999 47.999999999999 48.009999999999 48.019999999999 48.029999999999 48.039999999999 48.049999999999 48.059999999999 48.069999999999 48.079999999999 48.089999999999 48.099999999999 48.109999999999 48.119999999999 48.129999999999 48.139999999999 48.149999999999 48.159999999999 48.169999999999 48.179999999999 48.189999999999 48.199999999999 48.209999999999 48.219999999999 48.229999999999 48.239999999999 48.249999999999 48.259999999999 48.269999999999 48.279999999999 48.289999999999 48.299999999999 48.309999999999 48.319999999999 48.329999999999 48.339999999999 48.3499999999989 48.3599999999989 48.3699999999989 48.3799999999989 48.3899999999989 48.3999999999989 48.4099999999989 48.4199999999989 48.4299999999989 48.4399999999989 48.4499999999989 48.4599999999989 48.4699999999989 48.4799999999989 48.4899999999989 48.4999999999989 48.5099999999989 48.5199999999989 48.5299999999989 48.5399999999989 48.5499999999989 48.5599999999989 48.5699999999989 48.5799999999989 48.5899999999989 48.5999999999989 48.6099999999989 48.6199999999989 48.6299999999989 48.6399999999989 48.6499999999989 48.6599999999989 48.6699999999989 48.6799999999989 48.6899999999989 48.6999999999989 48.7099999999989 48.7199999999989 48.7299999999989 48.7399999999989 48.7499999999989 48.7599999999989 48.7699999999989 48.7799999999989 48.7899999999989 48.7999999999989 48.8099999999989 48.8199999999989 48.8299999999989 48.8399999999989 48.8499999999989 48.8599999999988 48.8699999999988 48.8799999999988 48.8899999999988 48.8999999999988 48.9099999999988 48.9199999999988 48.9299999999988 48.9399999999988 48.9499999999988 48.9599999999988 48.9699999999988 48.9799999999988 48.9899999999988 48.9999999999988 49.0099999999988 49.0199999999988 49.0299999999988 49.0399999999988 49.0499999999988 49.0599999999988 49.0699999999988 49.0799999999988 49.0899999999988 49.0999999999988 49.1099999999988 49.1199999999988 49.1299999999988 49.1399999999988 49.1499999999988 49.1599999999988 49.1699999999988 49.1799999999988 49.1899999999988 49.1999999999988 49.2099999999988 49.2199999999988 49.2299999999988 49.2399999999988 49.2499999999988 49.2599999999988 49.2699999999988 49.2799999999988 49.2899999999988 49.2999999999988 49.3099999999988 49.3199999999988 49.3299999999988 49.3399999999988 49.3499999999988 49.3599999999987 49.3699999999987 49.3799999999987 49.3899999999987 49.3999999999987 49.4099999999987 49.4199999999987 49.4299999999987 49.4399999999987 49.4499999999987 49.4599999999987 49.4699999999987 49.4799999999987 49.4899999999987 49.4999999999987 49.5099999999987 49.5199999999987 49.5299999999987 49.5399999999987 49.5499999999987 49.5599999999987 49.5699999999987 49.5799999999987 49.5899999999987 49.5999999999987 49.6099999999987 49.6199999999987 49.6299999999987 49.6399999999987 49.6499999999987 49.6599999999987 49.6699999999987 49.6799999999987 49.6899999999987 49.6999999999987 49.7099999999987 49.7199999999987 49.7299999999987 49.7399999999987 49.7499999999987 49.7599999999987 49.7699999999987 49.7799999999987 49.7899999999987 49.7999999999987 49.8099999999987 49.8199999999987 49.8299999999987 49.8399999999987 49.8499999999987 49.8599999999986 49.8699999999986 49.8799999999986 49.8899999999986 49.8999999999986 49.9099999999986 49.9199999999986 49.9299999999986 49.9399999999986 49.9499999999986 49.9599999999986 49.9699999999986 49.9799999999986 49.9899999999986 + +# sin(x) +0 0.00999983333416666 0.0199986666933331 0.0299955002024957 0.0399893341866342 0.0499791692706783 0.0599640064794446 0.0699428473375328 0.0799146939691727 0.089878549198011 0.0998334166468281 0.109778300837175 0.119712207288919 0.129634142619695 0.139543114644236 0.149438132473599 0.159318206614246 0.169182349066996 0.179029573425824 0.188858894976501 0.198669330795061 0.2084598998461 0.218229623080869 0.227977523535188 0.237702626427135 0.247403959254523 0.257080551892155 0.266731436688831 0.276355648564114 0.285952225104836 0.29552020666134 0.305058636443444 0.314566560616118 0.324043028394868 0.333487092140815 0.342897807455452 0.35227423327509 0.361615431964962 0.370920469412983 0.380188415123162 0.389418342308651 0.398609327984423 0.40776045305957 0.416870802429211 0.425939465066 0.43496553411123 0.44394810696552 0.452886285379068 0.461779175541483 0.470625888171158 0.479425538604203 0.488177246882908 0.496880137843737 0.505533341204847 0.514135991653113 0.522687228930659 0.531186197920884 0.53963204873397 0.548023936791874 0.556361022912784 0.564642473395036 0.572867460100482 0.581035160537305 0.58914475794227 0.597195441362392 0.60518640573604 0.613116851973434 0.62098598703656 0.628793024018469 0.636537182221968 0.644217687237691 0.651833771021537 0.659384671971473 0.666869635003698 0.674287911628145 0.681638760023334 0.688921445110552 0.696135238627357 0.70327941920041 0.710353272417608 0.717356090899523 0.724287174370143 0.731145829726896 0.737931371109963 0.74464311997086 0.751280405140293 0.757842562895277 0.764328937025505 0.77073887889897 0.777071747526824 0.783326909627484 0.789503739689951 0.795601620036366 0.801619940883778 0.807558100405115 0.813415504789374 0.819191568300999 0.82488571333845 0.830497370491971 0.836025978600521 0.841470984807897 0.846831844618016 0.852108021949363 0.857298989188604 0.862404227243339 0.867423225594017 0.872355482344987 0.877200504274682 0.881957806884948 0.886626914449488 0.891207360061436 0.895698685680048 0.900100442176505 0.904412189378826 0.908633496115884 0.912763940260521 0.916803108771767 0.920750597736136 0.924606012408021 0.928368967249167 0.932039085967227 0.935616001553386 0.939099356319068 0.942488801931698 0.945783999449539 0.948984619355587 0.952090341590516 0.955100855584692 0.958015860289225 0.960835064206073 0.963558185417193 0.966184951612734 0.968715100118265 0.971148377921045 0.97348454169532 0.975723357826659 0.977864602435316 0.979908061398614 0.98185353037236 0.983700814811277 0.98544972998846 0.98710010101385 0.98865176285172 0.990104560337178 0.991458348191687 0.992712991037589 0.993868363411645 0.994924349777581 0.99588084453764 0.996737752043144 0.997494986604055 0.998152472497548 0.998710143975583 0.999167945271476 0.999525830605479 0.999783764189357 0.999941720229966 0.999999682931835 0.99995764649874 0.999815615134291 0.999573603041505 0.999231634421391 0.998789743470524 0.998247974377632 0.997606381319174 0.996865028453919 0.996023989916537 0.99508334981018 0.994043202198076 0.992903651094118 0.991664810452468 0.990326804156158 0.988889766004701 0.987353839700716 0.985719178835553 0.983985946873937 0.982154317137618 0.980224472788045 0.978196606808044 0.976070921982524 0.973847630878195 0.971526955822315 0.969109128880456 0.966594391833297 0.963982996152448 0.9612752029753 0.958471283078914 0.955571516852944 0.952576194271595 0.94948561486463 0.946300087687414 0.94301993129001 0.939645473685324 0.936177052316306 0.9326150140222 0.928959715003869 0.925211520788168 0.921370806191395 0.917437955281809 0.913413361341225 0.909297426825681 0.9050905633252 0.900793191522627 0.89640574115156 0.891928650953379 0.887362368633375 0.882707350815974 0.877964062999078 0.873132979507517 0.868214583445613 0.863209366648874 0.858117829634809 0.852940481552877 0.847677840133571 0.842330431636647 0.836898790798499 0.831383460778684 0.825784993105609 0.820103947621376 0.814340892425798 0.808496403819592 0.802571066246749 0.796565472236089 0.790480222342007 0.784315925084422 0.778073196887924 0.771752662020128 0.765354952529256 0.758880708180925 0.752330576394174 0.745705212176724 0.739005278059474 0.732231444030255 0.725384387466824 0.71846479306913 0.711473352790849 0.704410765770181 0.697277738259943 0.690074983556941 0.682803221930645 0.675463180551156 0.668055593416497 0.660581201279206 0.653040751572271 0.645434998334377 0.63776470213451 0.630030629995899 0.622233555319312 0.614374257805719 0.606453523378322 0.598472144103964 0.590430918113921 0.58233064952409 0.574172148354581 0.565956230448711 0.557683717391426 0.549355436427136 0.540972220376998 0.53253490755563 0.524044341687286 0.515501371821474 0.506906852248063 0.498261642411849 0.48956660682661 0.480822614988659 0.472030541289894 0.463191264930357 0.454305669830318 0.445374644541883 0.436399082160138 0.427379880233842 0.418317940675671 0.40921416967203 0.400069477592433 0.390884778898466 0.381660992052345 0.372399039425069 0.363099847204182 0.353764345301157 0.344393467258405 0.33498815015592 0.325549334517575 0.316077964217069 0.306574986383539 0.297041351306848 0.287478012342561 0.277885925816603 0.268266050929635 0.258619349661128 0.24894678667317 0.239249329214 0.229527947021282 0.219783612225135 0.210017299250917 0.200229984721789 0.190422647361046 0.180596267894252 0.170751828951165 0.160890314967475 0.151012712086364 0.141120008059887 0.131213192150204 0.12129325503065 0.11136118868667 0.101417986316623 0.091464642232458 0.0815021517602904 0.071531511140865 0.0615537174299349 0.0515697683985564 0.0415806624333127 0.0315873984364761 0.0215909757261186 0.0115923939361809 0.00159265291650992 -0.00840724736712553 -0.0184063069330303 -0.0284035258835803 -0.0383979045052114 -0.0483884433683902 -0.0583741434275557 -0.0683540061210234 -0.0783270334708405 -0.0882922281825828 -0.0982485937450835 -0.108195134530083 -0.118130855891792 -0.128054764266354 -0.137965867271201 -0.147863173804293 -0.157745694143222 -0.167612440044192 -0.177462424840834 -0.187294663542877 -0.197108172934643 -0.206901971673373 -0.216675080387353 -0.226426521773856 -0.23615532069687 -0.245860504284609 -0.255541102026804 -0.265196145871746 -0.274824670323096 -0.284425712536434 -0.29399831241554 -0.303541512708401 -0.313054359102942 -0.32253590032245 -0.331985188220706 -0.341401277876792 -0.350783227689591 -0.36013009947194 -0.369440958544448 -0.378714873828969 -0.387950917941701 -0.397148167285931 -0.406305702144388 -0.415422606771217 -0.424497969483553 -0.433530882752688 -0.442520443294823 -0.451465752161394 -0.460365914828969 -0.469220041288698 -0.478027246135313 -0.48678664865567 -0.495497372916815 -0.504158547853582 -0.512769307355694 -0.521328790354377 -0.529836140908464 -0.538290508289988 -0.546691047069257 -0.555036917199394 -0.56332728410034 -0.571561318742314 -0.579738197728713 -0.587857103378453 -0.595917223807735 -0.603917753011231 -0.61185789094269 -0.619736843594934 -0.627553823079264 -0.635308047704247 -0.64299874205388 -0.650625137065138 -0.658186470104876 -0.66568198504609 -0.673110932343533 -0.680472569108665 -0.687766159183945 -0.694990973216444 -0.702146288730777 -0.709231390201358 -0.716245569123943 -0.723188124086484 -0.730058360839272 -0.736855592364356 -0.743579138944247 -0.750228328229892 -0.756802495307901 -0.763300982767047 -0.769723140763998 -0.776068327088306 -0.782335907226627 -0.788525254426169 -0.794635749757372 -0.800666782175792 -0.806617748583215 -0.812488053887959 -0.818277111064386 -0.823984341211601 -0.829609173611347 -0.83515104578507 -0.840609403550171 -0.845983701075423 -0.851273400935551 -0.856477974164978 -0.861596900310718 -0.866629667484422 -0.871575772413566 -0.87643472049178 -0.881206025828304 -0.885889211296581 -0.890483808581968 -0.894989358228563 -0.899405409685157 -0.903731521350286 -0.907967260616386 -0.912112203913061 -0.916165936749436 -0.920128053755605 -0.92399815872317 -0.927775864644858 -0.931460793753225 -0.935052577558432 -0.938550856885091 -0.941955281908185 -0.945265512188047 -0.94848121670441 -0.951602073889501 -0.954627771660202 -0.957558007449257 -0.960392488235529 -0.963130930573303 -0.965773060620626 -0.968318614166695 -0.970767336658276 -0.973118983225162 -0.975373318704655 -0.977530117665086 -0.979589164428357 -0.981550253091506 -0.983413187547301 -0.98517778150385 -0.986843858503228 -0.988411251939122 -0.989879805073496 -0.99124937105226 -0.992519812919957 -0.993691003633458 -0.99476282607467 -0.99573517306224 -0.996607947362281 -0.997381061698089 -0.998054438758876 -0.998628011207496 -0.999101721687182 -0.999475522827282 -0.999749377247993 -0.9999232575641 -0.999997146387718 -0.999971036330025 -0.999844930002005 -0.999618840014187 -0.99929278897538 -0.998866809490417 -0.998340944156891 -0.997715245560897 -0.996989776271774 -0.996164608835846 -0.995239825769168 -0.994215519549278 -0.993091792605942 -0.99186875731092 -0.990546535966721 -0.989125260794379 -0.987605073920225 -0.98598612736168 -0.984268583012052 -0.982452612624344 -0.980538397794081 -0.978526129941151 -0.976416010290663 -0.974208249852823 -0.971903069401835 -0.969500699453824 -0.967001380243782 -0.964405361701547 -0.96171290342681 -0.958924274663156 -0.956039754271136 -0.953059630700387 -0.94998420196078 -0.946813775592629 -0.943548668635927 -0.94018920759865 -0.936735728424101 -0.933188576457321 -0.929548106410549 -0.925814682327757 -0.921988677548241 -0.918070474669293 -0.914060465507933 -0.909959051061738 -0.905766641468732 -0.901483655966383 -0.897110522849671 -0.892647679428264 -0.888095571982785 -0.883454655720184 -0.878725394728222 -0.873908261929055 -0.869003739031949 -0.864012316485108 -0.858934493426627 -0.853770777634579 -0.84852168547624 -0.843187741856454 -0.837769480165135 -0.832267442223939 -0.826682178232075 -0.821014246711287 -0.815264214450004 -0.80943265644666 -0.803520155852197 -0.797527303911747 -0.791454699905509 -0.785302951088824 -0.779072672631447 -0.772764487556032 -0.76637902667583 -0.759916928531607 -0.753378839327793 -0.74676541286786 -0.740077310488943 -0.733315200995705 -0.726479760593463 -0.719571672820558 -0.712591628480013 -0.705540325570444 -0.698418469216266 -0.69122677159718 -0.683965951876954 -0.676636736131511 -0.669239857276317 -0.661776054993093 -0.654246075655848 -0.64665067225624 -0.638990604328281 -0.631266637872379 -0.623479545278744 -0.615630105250146 -0.607719102724046 -0.599747328794104 -0.591715580631071 -0.583624661403069 -0.57547538019528 -0.567268551929032 -0.559004997280313 -0.550685542597702 -0.542311019819735 -0.53388226639171 -0.525400125181946 -0.516865444397496 -0.508279077499326 -0.49964188311697 -0.49095472496267 -0.482218471745001 -0.473433997082005 -0.464602179413827 -0.455723901914876 -0.446800052405502 -0.437831523263219 -0.428819211333468 -0.419764017839932 -0.410666848294415 -0.401528612406289 -0.392350223991528 -0.383132600881326 -0.373876664830312 -0.364583341424377 -0.355253559988119 -0.345888253491905 -0.336488358458582 -0.327054814869819 -0.317588566072113 -0.308090558682457 -0.298561742493673 -0.289003070379441 -0.279415498199006 -0.269799984701597 -0.26015749143055 -0.250488982627157 -0.240795425134241 -0.231077788299474 -0.221337043878442 -0.211574165937468 -0.201790130756212 -0.191985916730039 -0.18216250427218 -0.172320875715695 -0.162462015215239 -0.152586908648646 -0.142696543518344 -0.132791908852603 -0.122873995106636 -0.112943794063554 -0.103002298735184 -0.0930505032627764 -0.083089402817584 -0.0731199935013508 -0.0631432722467005 -0.0531602367174448 -0.0431718852088174 -0.0331792165476456 -0.0231832299924682 -0.013184925133611 -0.0031853017932277 0.00681464007468047 0.01681390048426 0.0268114795178027 0.0368063774257364 0.0467975947265994 0.0567841323069876 0.0667649915214651 0.0767391742924277 0.0867056832099102 0.0966635216313262 0.106611693781132 0.116549204850402 0.126475061096311 0.136388269941506 0.146287840073364 0.15617278154312 0.166042105864865 0.175894826114392 0.185729957027886 0.195546515100452 0.205343518684462 0.215119988087724 0.224874945671442 0.234607415947988 0.244316425678446 0.254001003969931 0.263660182372687 0.273292994976921 0.282898478509401 0.292475672429778 0.302023619026641 0.311541363513287 0.321027954123198 0.33048244220522 0.339903882318422 0.349291332326644 0.358643853492709 0.367960510572294 0.377240371907454 0.386482509519789 0.39568599920324 0.404849920616508 0.413973357375088 0.423055397142908 0.432095131723557 0.441091657151113 0.450044073780529 0.458951486377602 0.467813004208496 0.476627741128811 0.485394815672203 0.494113351138521 0.502782475681485 0.511401322395865 0.519969029404172 0.528484739942845 0.536947602447926 0.545356770640216 0.553711403609906 0.562010665900659 0.570253727593162 0.578439764388116 0.586567957688663 0.594637494682246 0.60264756842189 0.610597377906897 0.618486128162942 0.626313030321575 0.634077301699101 0.641778165874853 0.649414852768832 0.65698659871871 0.664492646556204 0.671932245682784 0.679304652144737 0.686609128707562 0.693844944929688 0.701011377235523 0.708107708987809 0.715133230559283 0.722087239403645 0.728969040125803 0.735777944551421 0.74251327179573 0.749174348331618 0.755760508056983 0.762271092361341 0.768705450191686 0.775062938117599 0.781342920395582 0.787544769032644 0.793667863849087 0.799711592540533 0.805675350739149 0.811558542074084 0.817360578231109 0.823080879011443 0.828718872389774 0.834273994571462 0.83974569004892 0.845133411657158 0.850436620628506 0.855654786646486 0.860787387898845 0.865833911129734 0.870793851691036 0.875666713592828 0.880452009552981 0.885149261045886 0.889757998350308 0.894277760596358 0.898708095811577 0.903048560966136 0.907298722017136 0.911458153952014 0.915526440831044 0.919503175828926 0.923387961275475 0.927180408695384 0.930880138847071 0.934486781760605 0.937999976774699 0.941419372572779 0.944744627218116 0.947975408188015 0.951111392407073 0.95415226627948 0.957097725720383 0.959947476186293 0.962701232704538 0.965358719901761 0.967919672031457 0.970383833000546 0.972750956394986 0.97502080550441 0.977193153345798 0.979267782686176 0.981244486064339 0.983123065811597 0.98490333407154 0.986585112818826 0.988168233876982 0.989652538935221 0.991037879564274 0.992324117231232 0.993511123313402 0.994598779111164 0.995586975859843 0.99647561474059 0.997264606890257 0.997953873410285 0.998543345374598 0.999032963836491 0.999422679834524 0.999712454397423 0.999902258547973 0.999992073305918 0.999981889689856 0.999871708718141 0.999661541408777 0.999351408778321 0.998941341839778 0.998431381599498 0.997821579053083 0.997111995180276 0.996302700938876 0.995393777257632 0.994385315028154 0.993277415095824 0.992070188249714 0.990763755211501 0.9893582466234 0.9878538030351 0.986250574889705 0.984548722508693 0.982748416075885 0.980849835620424 0.978853170998774 0.976758621875731 0.974566397704464 0.972276717705562 0.969889810845117 0.967405915811827 0.964825280993125 0.962148164450342 0.959374833892901 0.956505566651547 0.953540649650613 0.950480379379329 0.947325061862171 0.944075012628262 0.940730556679817 0.937292028459643 0.933759771817698 0.930134139976701 0.926415495496816 0.922604210239391 0.918700665329777 0.914705251119211 0.910618367145785 0.90644042209449 0.902171833756351 0.897813028986643 0.893364443662212 0.888826522637882 0.884199719701975 0.879484497530928 0.87468132764303 0.869790690351266 0.86481307471529 0.859748978492517 0.854598908088351 0.849363378505539 0.844042913292676 0.838638044491852 0.833149312585441 0.82757726644206 0.82192246326168 0.816185468519907 0.810366855911435 0.804467207292675 0.798487112623573 0.792427169908612 0.786287985137014 0.78007017222214 0.7737743529401 0.767401156867576 0.760951221318864 0.754425191282144 0.747823719354982 0.741147465679068 0.734397097874207 0.727573290971555 0.720676727346114 0.713708096648501 0.706668095735977 0.699557428602768 0.692376806309662 0.685126946912903 0.67780857539239 0.670422423579176 0.662969230082288 0.655449740214865 0.647864705919626 0.64021488569368 0.632501044512676 0.624723953754303 0.616884391121157 0.608983140562966 0.601020992198204 0.592998742235071 0.584917192891878 0.576777152316826 0.568579434507188 0.560324859227914 0.552014251929653 0.543648443666209 0.535228271011438 0.526754575975587 0.5182282059211 0.509650013477876 0.501020856458011 0.492341597770016 0.483613105332527 0.474836251987515 0.466011915413 0.457140978035285 0.448224326940717 0.439262853786973 0.430257454713902 0.421209030253906 0.412118485241891 0.402986728724783 0.393814673870623 0.384603237877254 0.375353341880599 0.36606591086255 0.356741873558468 0.347382162364314 0.337987713243408 0.328559465632833 0.319098362349494 0.309605349495833 0.300081376365227 0.290527395347052 0.280944361831447 0.271333234113778 0.261694973298808 0.252030543204587 0.24234091026607 0.232627043438477 0.222889914100395 0.213130495956644 0.203349764940905 0.19354869911813 0.183728278586733 0.173889485380584 0.164033303370804 0.154160718167381 0.144272717020608 0.13437028872236 0.124454423507215 0.114526112953431 0.104586349883789 0.0946361282663139 0.0846764431148754 0.0747082903896889 0.0647326668977201 0.0547505701930053 0.0447629984768964 0.0347709504982423 0.024775425453514 0.0147774228868865 0.00477794259028483 -0.0052220154965943 -0.0152214513862754 -0.0252193651435025 -0.0352147569852312 -0.0452066273806069 -0.0551939771509167 -0.0651758075695061 -0.0751511204616517 -0.0851189183043767 -0.0950782043262036 -0.105027982606829 -0.114967258176718 -0.124895037116594 -0.134810326656837 -0.144712135276756 -0.154599472803741 -0.164471350512278 -0.174326781222822 -0.184164779400516 -0.19398436125374 -0.203784544832492 -0.213564350126581 -0.223322799163626 -0.233058916106857 -0.242771727352693 -0.252460261628102 -0.262123550087731 -0.271760626410787 -0.281370526897668 -0.290952290566334 -0.300504959248403 -0.310027577684968 -0.319519193622119 -0.328978857906173 -0.338405624578584 -0.347798550970542 -0.357156697797233 -0.366479129251775 -0.375764913098789 -0.38501312076763 -0.394222827445238 -0.403393112168618 -0.412523057916942 -0.421611751703242 -0.430658284665714 -0.4396617521586 -0.448621253842654 -0.457535893775173 -0.466404780499593 -0.475227027134633 -0.48400175146298 -0.492728076019515 -0.501405128179053 -0.510032040243609 -0.518607949529166 -0.527131998451943 -0.535603334614149 -0.544021110889228 -0.552384485506568 -0.560692622135676 -0.568944689969813 -0.577139863809072 -0.585277324142898 -0.59335625723204 -0.60137585518992 -0.609335316063426 -0.617233843913103 -0.625070648892749 -0.632844947328396 -0.640555961796679 -0.648202921202578 -0.655785060856523 -0.663301622550869 -0.670751854635709 -0.678135012094044 -0.685450356616279 -0.69269715667406 -0.699874687593419 -0.706982231627246 -0.71401907802706 -0.720984523114085 -0.727877870349617 -0.734698430404677 -0.741445521228944 -0.748118468118956 -0.754716603785587 -0.761239268420767 -0.76768580976347 -0.774055583164932 -0.780347951653122 -0.786562285996434 -0.792697964766613 -0.798754374400895 -0.804730909263363 -0.810626971705511 -0.81644197212601 -0.822175329029661 -0.827826469085554 -0.833394827184391 -0.838879846495003 -0.84428097852003 -0.84959768315077 -0.854829428721191 -0.859975692061095 -0.865035958548436 -0.870009722160784 -0.874896485525922 -0.879695759971585 -0.884407065574328 -0.889029931207517 -0.893563894588441 -0.898008502324541 -0.902363309958746 -0.906627882013922 -0.910801792036417 -0.914884622638707 -0.918875965541135 -0.922775421612737 -0.926582600911154 -0.930297122721629 -0.933918615595078 -0.93744671738523 -0.940881075284846 -0.944221345860999 -0.947467195089414 -0.950618298387873 -0.953674340648673 -0.956635016270135 -0.959500029187162 -0.962269092900851 -0.964941930507139 -0.967518274724491 -0.969997867920634 -0.972380462138313 -0.974665819120093 -0.976853710332179 -0.978943916987275 -0.980936230066455 -0.982830450340073 -0.98462638838768 -0.986323864616967 -0.987922709281727 -0.989422762498824 -0.990823874264188 -0.992125904467809 -0.993328722907752 -0.994432209303175 -0.995436253306359 -0.99634075451374 -0.997145622475951 -0.997850776706866 -0.99845614669165 -0.998961671893808 -0.999367301761243 -0.999672995731305 -0.999878723234851 -0.999984463699304 -0.999990206550704 -0.999895951214772 -0.999701707116962 -0.999407493681522 -0.999013340329551 -0.998519286476056 -0.997925381526009 -0.997231684869412 -0.996438265875351 -0.995545203885065 -0.994552588204009 -0.993460518092924 -0.99226910275791 -0.990978461339509 -0.989588722900786 -0.988100026414428 -0.986512520748842 -0.984826364653273 -0.983041726741924 -0.981158785477099 -0.979177729151357 -0.977098755868678 -0.974922073524658 -0.972647899785718 -0.970276462067337 -0.967807997511311 -0.965242752962037 -0.962580984941833 -0.959822959625283 -0.95696895281262 -0.954019249902148 -0.950974145861699 -0.947833945199139 -0.944598961931919 -0.941269519555668 -0.937845951011851 -0.934328598654468 -0.930717814215824 -0.927013958771355 -0.923217402703517 -0.919328525664754 -0.915347716539529 -0.911275373405438 -0.907111903493399 -0.902857723146935 -0.898513257780536 -0.894078941837117 -0.889555218744578 -0.884942540871457 -0.8802413694817 -0.875452174688526 -0.870575435407424 -0.865611639308258 -0.860561282766503 -0.855424870813603 -0.850202917086473 -0.844895943776134 -0.839504481575496 -0.834029069626285 -0.828470255465133 -0.822828594968824 -0.817104652298706 -0.811298999844277 -0.805412218165944 -0.799444895936969 -0.793397629884601 -0.787271024730408 -0.781065693129799 -0.774782255610763 -0.768421340511815 -0.761983583919166 -0.755469629603108 -0.748880128953646 -0.742215740915354 -0.735477131921481 -0.728664975827311 -0.721779953842778 -0.714822754464341 -0.707794073406142 -0.700694613530428 -0.693525084777272 -0.686286204093574 -0.678978695361369 -0.671603289325442 -0.66416072352025 -0.656651742196172 -0.649077096245082 -0.641437543125263 -0.633733846785661 -0.62596677758949 -0.618137112237198 -0.610245633688794 -0.602293131085558 -0.594280399671123 -0.586208240711953 -0.578077461417216 -0.569888874858068 -0.561643299886339 -0.553341561052656 -0.544984488523985 -0.536572918000613 -0.528107690632584 -0.51958965293558 -0.511019656706272 -0.502398558937142 -0.493727221730783 -0.485006512213688 -0.476237302449543 -0.467420469352015 -0.458556894597069 -0.449647464534792 -0.440693070100766 -0.431694606726974 -0.422652974252253 -0.413569076832317 -0.404443822849337 -0.395278124821107 -0.386072899309793 -0.376829066830274 -0.367547551758095 -0.358229282237029 -0.348875190086263 -0.339486210707217 -0.330063282990004 -0.320607349219543 -0.311119354981333 -0.30160024906689 -0.292050983378873 -0.282472512835893 -0.272865795277023 -0.263231791366012 -0.253571464495223 -0.243885780689294 -0.234175708508534 -0.224442218952068 -0.214686285360742 -0.204908883319784 -0.195110990561252 -0.185293586866255 -0.175457653966982 -0.165604175448527 -0.15573413665053 -0.145848524568645 -0.135948327755844 -0.126034536223558 -0.116108141342677 -0.106170135744419 -0.0962215132210608 -0.0862632686265651 -0.0762963977770924 -0.0663218973514222 -0.056340764791285 -0.046353998201619 -0.0363625962507611 -0.0263675580705802 -0.0163698831565652 -0.00637057126787595 0.00362937767263125 0.0136289636783957 0.0236271867991497 0.033623047220913 0.0436155453659734 0.0536036819928433 0.0635864582961835 0.0735628760066827 0.0835319374908834 0.0934926458509447 0.103444005024331 0.113385019883418 0.123314696335004 0.133232041419719 0.143136063411317 0.153025771915855 0.162900177970721 0.172758294143541 0.18259913463091 0.192421715356983 0.20222505407187 0.21200817044987 0.221770086187499 0.231509825101316 0.241226413225547 0.250918878909478 0.260586252914615 0.270227568511616 0.279841861576955 0.289428170689336 0.298985537225838 0.308513005457771 0.318009622646252 0.327474439137475 0.336906508457679 0.346304887407791 0.35566863615775 0.364996818340482 0.374288501145543 0.383542755412395 0.392758655723324 0.401935280495979 0.411071712075529 0.42016703682643 0.429220345223786 0.438230731944303 0.447197295956816 0.456119140612396 0.464995373734014 0.473825107705752 0.482607459561574 0.49134155107361 0.500026508839989 0.508661464372172 0.5172455541818 0.525777919867047 0.534257708198454 0.542684071204254 0.551056166255169 0.559373156148671 0.5676342091927 0.575838499288837 0.583985206014909 0.592073514707033 0.600102616541078 0.608071708613553 0.615979994021892 0.623826681944143 0.631610987718054 0.639332132919534 0.646989345440497 0.654581859566071 0.662108916051173 0.669569762196424 0.676963651923429 0.684289845849376 0.691547611360978 0.698736222687732 0.705854960974495 0.712903114353371 0.719879978014895 0.726784854278516 0.733617052662362 0.740375889952286 0.747060690270193 0.753670785141622 0.760205513562594 0.766664222065711 0.773046264785507 0.779351003523027 0.785577807809652 0.791726054970142 0.797795130184905 0.803784426551476 0.80969334514521 0.815521295079172 0.821267693563225 0.826931965962309 0.832513545853904 0.838011875084673 0.843426403826274 0.848756590630346 0.854001902482649 0.85916181485637 0.864235811764572 0.86922338581179 0.874124038244779 0.878937279002377 0.88366262676452 0.888299609000369 0.892847762015566 0.897306630998599 0.901675770066284 0.905954742308357 0.910143119831159 0.914240483800428 0.918246424483182 0.92216054128869 0.925982442808533 0.929711746855746 0.933348080503029 0.936891080120051 0.9403403914098 0.943695669444022 0.94695657869771 0.950122793082657 0.953193995980062 0.956169880272194 0.959050148373105 0.961834512258384 0.964522693493963 0.96711442326396 0.969609442397555 0.972007501394917 0.974308360452142 0.976511789485243 0.978617568153153 0.980625485879759 0.982535341874963 0.984346945154755 0.986060114560319 0.987674678776141 0.989190476347144 0.990607355694836 0.991925175132461 0.993143802879175 0.994263117073217 0.995283005784103 0.996203367023809 0.99702410875698 0.997745148910126 0.998366415379833 0.998887846039971 0.999309388747908 0.999631001349726 0.999852651684432 0.999974317587177 0.999995986891473 0.999917657430406 0.999739337036859 0.999461043542721 0.999082804777111 0.998604658563589 0.998026652716378 0.997348845035582 0.996571303301403 0.995694105267368 0.994717338652548 0.993641101132792 0.992465500330953 0.991190653806134 0.989816689041923 0.988343743433652 0.986771964274656 0.985101508741539 0.983332543878463 0.98146524658044 0.979499803575644 0.977436411406738 0.975275276411218 0.973016614700785 0.970660652139725 0.968207624322333 0.965657776549346 0.963011363803416 0.960268650723612 0.957429911578957 0.954495430241 0.951465500155429 0.948340424312727 0.945120515217876 0.9418060948591 0.938397494675675 0.934895055524777 0.931299127647403 0.927610070633345 0.923828253385229 0.919954054081629 0.915987860139246 0.91193006817417 0.907781083962216 0.903541322398348 0.899211207455188 0.894791172140623 0.890281658454501 0.885683117344432 0.880996008660695 0.876220801110254 0.871357972209883 0.86640800823842 0.861371404188138 0.856248663715243 0.851040299089516 0.845746831143077 0.840368789218311 0.834906711114928 0.829361143036187 0.823732639534274 0.818021763454849 0.812229085880762 0.806355186074941 0.800400651422474 0.794366077371862 0.788252067375483 0.782059232829241 0.77578819301143 0.769439575020806 0.763014013713877 0.75651215164142 0.749934638984223 0.743282133488071 0.73655530039797 0.729754812391624 0.722881349512165 0.715935599100154 0.708918255724844 0.701830021114725 0.694671604087351 0.687443720478459 0.680147093070387 0.672782451519796 0.665350532284703 0.657852078550838 0.650287840157326 0.642658573521703 0.634965041564275 0.627208013631827 0.619388265420687 0.61150657889916 0.60356374222933 0.595560549688246 0.587497801588491 0.579376304198157 0.571196869660216 0.562960315911304 0.554667466599934 0.546319151004124 0.537916203948479 0.529459465720701 0.520949781987565 0.512388003710355 0.503774987059761 0.495111593330273 0.486398688854043 0.477637144914259 0.468827837658013 0.45997164800869 0.451069461577875 0.442122168576791 0.433130663727284 0.424095846172345 0.415018619386201 0.405899891083966 0.396740573130871 0.38754158145108 0.378303835936093 0.369028260352765 0.359715782250924 0.350367332870621 0.340983847049002 0.33156626312683 0.32211552285465 0.312632571298613 0.303118356745973 0.293573830610256 0.283999947336122 0.27439766430392 0.264767941733952 0.255111742590449 0.24543003248528 0.235723779581387 0.225993954495971 0.216241530203434 0.206467481938076 0.196672787096581 0.186858425140269 0.177025377497159 0.167174627463819 0.157307160107044 0.147423962165348 0.137526021950288 0.127614329247638 0.117689875218408 0.10775365229973 0.0978066541056171 0.0878498753275988 0.0778843116352557 0.0679109595766525 0.0579308164786839 0.0479448803473429 0.0379541497679211 0.0279596238051509 0.0179623019032998 0.00796318378622688 -0.00203673064258869 -0.0120364414000373 -0.0220349485233762 -0.0320312521702252 -0.0420243527185497 -0.0520132508666226 -0.0619969477329531 -0.0719744449561742 -0.0819447447948782 -0.0919068502273898 -0.101859765051467 -0.111802493983923 -0.121734042760148 -0.131653418233542 -0.141559628474824 -0.151451682871224 -0.161328592225546 -0.171189368855086 -0.181033026690397 -0.1908585813739 -0.200665050358314 -0.210451453004912 -0.220216810681585 -0.229960146860704 -0.239680487216769 -0.249376859723846 -0.259048294752764 -0.268693825168079 -0.278312486424788 -0.287903316664781 -0.297465356813026 -0.306997650673479 -0.316499245024695 -0.325969189715157 -0.335406537758287 -0.344810345427146 -0.354179672348803 -0.363513581598374 -0.372811139792713 -0.382071417183746 -0.391293487751454 -0.400476429296463 -0.409619323532271 -0.418721256177075 -0.427781317045194 -0.436798600138092 -0.445772203734973 -0.454701230482957 -0.463584787486809 -0.472421986398231 -0.481211943504698 -0.489953779817822 -0.498646621161258 -0.507289598258116 -0.515881846817887 -0.524422507622877 -0.532910726614122 -0.541345654976796 -0.549726449225092 -0.55805227128657 -0.566322288585961 -0.574535674128427 -0.582691606582258 -0.590789270361006 -0.598827855705041 -0.606806558762526 -0.614724581669806 -0.622581132631187 -0.630375425998121 -0.638106682347767 -0.645774128560931 -0.653376997899383 -0.660914530082524 -0.668385971363416 -0.675790574604159 -0.683127599350599 -0.690396311906374 -0.697595985406287 -0.704725899888987 -0.711785342368968 -0.718773606907865 -0.725689994685047 -0.7325338140675 -0.739304380678989 -0.746001017468495 -0.752623054777919 -0.75916983040905 -0.765640689689779 -0.772034985539571 -0.778352078534169 -0.784591336969538 -0.790752136925035 -0.796833862325796 -0.802835905004351 -0.808757664761434 -0.814598549426002 -0.820357974914458 -0.826035365289052 -0.831630152815477 -0.837141778019644 -0.842569689743624 -0.847913345200769 -0.853172210029986 -0.858345758349175 -0.863433472807814 -0.868434844638698 -0.873349373708812 -0.878176568569343 -0.882915946504828 -0.887567033581424 -0.892129364694299 -0.896602483614143 -0.900985943032791 -0.905279304607955 -0.909482139007056 -0.913594025950155 -0.917614554251984 -0.921543321863065 -0.92537993590991 -0.929124012734311 -0.932775177931706 -0.936333066388617 -0.939797322319165 -0.943167599300643 -0.946443560308161 -0.949624877748348 -0.952711233492112 -0.955702318906451 -0.958597834885314 -0.961397491879518 -0.964101009925695 -0.966708118674295 -0.969218557416615 -0.971632075110873 -0.97394843040731 -0.976167391672327 -0.978288737011648 -0.980312254292505 -0.982237741164857 -0.984065005081621 -0.985793863317928 -0.987424142989396 -0.988955681069415 -0.990388324405454 -0.991721929734374 -0.992956363696752 -0.994091502850222 -0.995127233681813 -0.996063452619306 -0.996900066041587 -0.997636990288012 -0.998274151666769 -0.998811486462251 -0.999248940941427 -0.999586471359214 -0.999824043962851 -0.999961634995276 -0.999999230697499 -0.999936827309983 -0.999774431073013 -0.999512058226079 -0.999149735006246 -0.998687497645534 -0.998125392367295 -0.997463475381587 -0.996701812879558 -0.995840481026823 -0.99487956595585 -0.993819163757344 -0.992659380470643 -0.991400332073107 -0.990042144468529 -0.988584953474536 -0.987028904809014 -0.985374154075532 -0.983620866747785 -0.981769218153045 -0.979819393454627 -0.977771587633378 -0.975626005468172 -0.973382861515438 -0.971042380087702 -0.968604795231157 -0.966070350702256 -0.963439299943341 -0.960711906057295 -0.957888441781234 -0.954969189459233 -0.951954441014091 -0.94884449791814 -0.945639671163098 -0.94234028122897 -0.938946658052001 -0.935459140991679 -0.931878078796804 -0.928203829570612 -0.924436760734964 -0.920577248993604 -0.916625680294489 -0.912582449791198 -0.908447961803409 -0.904222629776478 -0.899906876240086 -0.895501132765989 -0.891005839924865 -0.88642144724225 -0.881748413153593 -0.876987204958408 -0.872138298773548 -0.86720217948559 -0.86217934070235 -0.857070284703519 -0.851875522390441 -0.846595573235018 -0.841230965227766 -0.835782234825014 -0.830249926895262 -0.824634594664693 -0.818936799661852 -0.813157111661489 -0.807296108627588 -0.801354376655569 -0.795332509913678 -0.78923111058357 -0.783050788800094 -0.776792162590279 -0.770455857811529 -0.764042508089042 -0.757552754752446 -0.750987246771667 -0.744346640692031 -0.737631600568613 -0.730842797899829 -0.723980911560288 -0.717046627732907 -0.710040639840289 -0.702963648475386 -0.695816361331437 -0.688599493131199 -0.681313765555479 -0.673959907170963 -0.666538653357362 -0.659050746233871 -0.651496934584965 -0.643877973785512 -0.636194625725244 -0.628447658732564 -0.620637847497715 -0.612765972995313 -0.604832822406247 -0.596839189038967 -0.588785872250147 -0.580673677364756 -0.572503415595521 -0.564275903961811 -0.555991965207933 -0.54765242772086 -0.53925812544739 -0.530809897810755 -0.52230858962668 -0.513755051018898 -0.505150137334141 -0.496494709056608 -0.487789631721913 -0.479035775830537 -0.470234016760772 -0.461385234681192 -0.45249031446263 -0.443550145589696 -0.434565622071826 -0.425537642353887 -0.416467109226325 -0.407354929734895 -0.398202015089954 -0.389009280575337 -0.379777645456836 -0.370508032890269 -0.36120136982917 -0.351858586932087 -0.342480618469526 -0.333068402230517 -0.323622879428841 -0.314144994608908 -0.3046356955513 -0.295095933177999 -0.285526661457292 -0.275928837308379 -0.266303420505674 -0.256651373582837 -0.246973661736518 -0.237271252729835 -0.227545116795605 -0.217796226539316 -0.208025556841869 -0.198234084762092 -0.188422789439033 -0.178592651994048 -0.168744655432691 -0.158879784546411 -0.148999025814076 -0.139103367303324 -0.129193798571762 -0.119271310568003 -0.10933689553258 -0.0993915468987174 -0.0894362591929909 -0.0794720279358752 -0.0694998495421923 -0.0595207212214715 -0.049535640878229 -0.0395456070121783 -0.0295516186183809 -0.0195546750873479 -0.00955577610510173 0.000444078446791853 0.0104438885912108 0.0204426543554739 0.0304393758713369 0.0404330534749788 0.0504226878069673 0.0604072799121939 0.0703858313397685 0.0803573442428638 0.0903208214784991 0.100275266707254 0.1102196844929 0.120153080401946 0.130074461103079 0.139982834466498 0.149877209663121 0.159756597263675 0.169620009337633 0.179466459552007 0.189294963269981 0.199104537649372 0.208894201740919 0.21866297658637 0.22840988531638 0.2381339532482 0.247834207983139 0.257509679503807 0.267159400271116 0.27678240532103 0.286377732361063 0.295944421866508 0.305481517176385 0.314988064589111 0.324463113457868 0.333905716285664 0.343314928820086 0.35268981014772 0.362029422788246 0.371332832788184 0.380599109814286 0.389827327246572 0.399016562270987 0.408165895971689 0.41727441342293 0.426341203780557 0.435365360373088 0.444345980792386 0.453282166983891 0.462173025336432 0.471017666771582 0.479815206832569 0.488564765772716 0.497265468643423 0.505916445381651 0.514516830896937 0.523065765157896 0.531562393278226 0.540005865602195 0.548395337789607 0.556729970900235 0.565008931477713 0.573231391632883 0.58139652912658 0.58950352745186 0.597551575915646 0.605539869719799 0.613467610041594 0.621334004113607 0.629138265302985 0.636879613190113 0.644557273646652 0.652170478912957 0.659718467674844 0.667200485139726 0.674615783112094 0.681963620068328 0.689243261230856 0.696453978641629 0.703595051234914 0.710665764909402 0.71766541259962 0.724593294346629 0.73144871736803 0.738230996127233 0.744939452402013 0.751573415352333 0.758132221587428 0.764615215232139 0.771021747992503 0.777351179220584 0.783602875978534 0.789776213101886 0.795870573262073 0.801885347028156 0.807819932927772 0.813673737507277 0.81944617539109 0.825136669340233 0.830744650310054 0.836269557507129 0.841710838445341 0.847067949001133 0.852340353467912 0.857527524609626 0.862628943713483 0.867644100641823 0.872572493883133 0.877413630602196 0.882167026689375 0.886832206809022 0.891408704447011 0.895896061957395 0.90029383060816 0.904601570626106 0.908818851240823 0.912945250727761 0.916980356450412 0.920923764901565 0.924775081743663 0.928533921848229 0.932199909334386 0.93577267760644 0.939251869390542 0.942637136770411 0.945928141222132 0.949124553648002 0.952226054409441 0.955232333358959 0.958143089871164 0.960958032872833 0.96367688087201 0.966299361986161 0.96882521396936 0.971254184238514 0.973586029898619 0.975820517767054 0.977957424396893 0.979996536099254 0.981937648964667 0.983780568883461 0.985525111565182 0.987171102557014 0.98871837726123 0.990166780951649 0.99151616878911 0.992766405835952 0.993917367069513 0.994968937394629 0.995921011655143 0.996773494644423 0.997526301114881 0.998179355786496 0.998732593354346 0.999185958495135 0.999539405872726 0.999792900142677 0.999946415955772 0.999999937960557 0.999953460804876 0.999806989136406 0.999560537602193 0.999214130847183 0.998767803511765 0.998221600228299 0.997575575616659 0.996829794278767 0.995984330792136 0.99503926970241 0.993994705514911 0.992850742685185 0.991607495608565 0.99026508860872 0.988823655925233 0.98728334170017 0.98564429996367 0.983906694618541 0.98207069942387 0.980136497977646 0.978104283698402 0.975974259805873 0.973746639300672 0.971421644942993 0.968999509230336 0.966480474374252 0.963864792276129 0.961152724501996 0.958344542256371 0.955440526355138 0.952440967197467 0.949346164736774 0.946156428450727 0.942872077310296 0.939493439747858 0.936020853624354 0.932454666195502 0.928795234077073 0.92504292320923 0.921198108819933 0.917261175387416 0.913232516601743 0.909112535325433 0.904901643553182 0.900600262370658 0.896208821912395 0.891727761318779 0.887157528692135 0.882498581051917 0.877751384289006 0.872916413119124 0.867994151035358 0.862985090259815 0.857889731694397 0.852708584870715 0.847442167899135 0.842091007416964 0.836655638535791 0.831136604787976 0.825534458072293 0.819849758598746 0.814083074832545 0.808234983437261 0.802306069217161 0.796296925058724 0.790208151871361 0.784040358527314 0.77779416180078 0.771470186306226 0.76506906443593 0.758591436296746 0.75203794964609 0.745409259827165 0.73870602970343 0.731928929592311 0.725078637198172 0.718155837544543 0.71116122290562 0.70409549273704 0.69695935360593 0.689753519120256 0.682478709857464 0.675135653292416 0.66772508372465 0.660247742204947 0.652704376461228 0.645095740823782 0.637422596149831 0.629685709747449 0.621885855298828 0.614023812782915 0.606100368397407 0.598116314480142 0.590072449429857 0.581969577626355 0.573808509350063 0.565590060701008 0.557315053517207 0.548984315292482 0.540598679093712 0.532158983477531 0.523666072406466 0.515120795164548 0.506524006272379 0.497876565401685 0.489179337289346 0.480433191650926 0.471639003093701 0.462797651029198 0.453910019585255 0.444976997517611 0.435999478121028 0.426978359139964 0.417914542678801 0.408808935111631 0.399662446991622 0.390475992959965 0.381250491654408 0.371986865617393 0.362686041203804 0.353348948488333 0.343976521172469 0.334569696491133 0.325129415118956 0.315656621076207 0.306152261634397 0.29661728722155 0.28705265132716 0.277459310406848 0.26783822378671 0.258190353567391 0.248516664527874 0.238818124029 0.229095701916737 0.219350370425196 0.209583104079403 0.199794879597855 0.189986675794841 0.18015947348257 0.170314255373083 0.160452005979987 0.150573711520003 0.140680359814344 0.130772940189937 0.120852443380488 0.11091986142741 0.100976187580624 0.0910224161992252 0.0810595426520586 0.0710885632181762 0.0611104749872123 0.0511262757596749 0.0411369639471666 0.0311435384725442 0.0211469986700275 0.0111483441852662 0.00114857487537662 -0.00885130929104334 -0.0188503083339103 -0.0288474223616523 -0.0388416516711977 -0.0488319968479438 -0.0588174588656984 -0.0687970391865808 -0.0787697398608752 -0.0887345636268247 -0.0986905140103567 -0.10863659542473 -0.11857181327009 -0.128495174032933 -0.138405685385452 -0.14830235628477 -0.158184197072044 -0.168050219571431 -0.177899437188902 -0.187730865010903 -0.197543519902845 -0.207336420607416 -0.217108587842705 -0.226859044400134 -0.236586815242171 -0.246290927599839 -0.255970411069989 -0.26562429771234 -0.275251622146272 -0.284851421647365 -0.294422736243669 -0.3039646088117 -0.313476085172153 -0.322956214185318 -0.332404047846193 -0.341818641379287 -0.35119905333309 -0.360544345674225 -0.369853583881245 -0.379125837038087 -0.388360177927163 -0.397555683122078 -0.406711433079977 -0.415826512233492 -0.424900009082305 -0.433931016284292 -0.442918630746258 -0.451861953714248 -0.460760090863416 -0.469612152387464 -0.478417253087614 -0.487174512461136 -0.495883054789389 -0.504542009225398 -0.513150509880934 -0.521707695913107 -0.530212711610442 -0.53866470647846 -0.547062835324715 -0.555406258343322 -0.563694141198931 -0.571925655110164 -0.580099976932489 -0.588216289240536 -0.596273780409838 -0.604271644697992 -0.612209082325234 -0.620085299554415 -0.627899508770378 -0.635650928558711 -0.643338783783896 -0.650962305666816 -0.658520731861636 -0.666013306532036 -0.673439280426791 -0.680797910954701 -0.688088462258846 -0.69531020529017 -0.702462417880388 -0.709544384814201 -0.716555397900818 -0.723494756044772 -0.730361765316032 -0.737155739019394 -0.743875997763147 -0.750521869527019 -0.757092689729371 -0.763587801293659 -0.770006554714138 -0.776348308120816 -0.782612427343636 -0.788798285975897 -0.79490526543689 -0.800932755033758 -0.806880152022564 -0.812746861668566 -0.818532297305688 -0.824235880395188 -0.829857040583508 -0.835395215759316 -0.840849852109708 -0.846220404175595 -0.851506334906245 -0.856707115712991 -0.861822226522087 -0.866851155826712 -0.871793400738129 -0.876648467035963 -0.881415869217632 -0.88609513054689 -0.890685783101504 -0.895187367820043 -0.899599434547787 -0.90392154208174 -0.90815325821475 -0.91229415977873 -0.916343832686975 -0.920301871975569 -0.924167881843881 -0.927941475694145 -0.931622276170122 -0.935209915194832 -0.938704034007361 -0.94210428319874 -0.945410322746883 -0.948621822050591 -0.95173845996261 -0.954759924821745 -0.957685914484028 -0.960516136352932 -0.963250307408627 -0.965888154236288 -0.96842941305343 -0.970873829736288 -0.973221159845231 -0.975471168649204 -0.977623631149202 -0.979678332100769 -0.981635066035522 -0.983493637281698 -0.985253859983721 -0.986915558120787 -0.988478565524469 -0.989942725895327 -0.991307892818545 -0.992573929778569 -0.993740710172757 -0.994808117324042 -0.995776044492598 -0.996644394886516 -0.997413081671479 -0.99808202797945 -0.998651166916356 -0.999120441568776 -0.999489805009637 -0.999759220302902 -0.999928660507267 -0.999998108678852 -0.999967557872898 -0.999837011144461 -0.999606481548103 -0.999275992136594 -0.998845575958598 -0.998315276055375 -0.997685145456472 -0.996955247174426 -0.996125654198455 -0.995196449487167 -0.994167725960257 -0.993039586489221 -0.991812143887067 -0.990485520897032 -0.989059850180308 -0.987535274302781 -0.985911945720766 -0.98419002676577 -0.982369689628253 -0.980451116340411 -0.978434498757976 -0.976320038541024 -0.974107947133815 -0.971798445743646 -0.969391765318733 -0.966888146525111 -0.964287839722575 -0.961591104939636 -0.958798211847527 -0.955909439733229 -0.952925077471546 -0.949845423496218 -0.946670785770075 -0.943401481754244 -0.940037838376404 -0.936580191998088 -0.933028888381053 -0.929384282652702 -0.925646739270569 -0.921816631985879 -0.917894343806169 -0.913880266956987 -0.909774802842674 -0.90557836200622 -0.901291364088211 -0.896914237784867 -0.892447420805171 -0.887891359827097 -0.883246510452948 -0.87851333716379 -0.873692313273008 -0.868783920878973 -0.863788650816834 -0.858707002609434 -0.853539484417361 -0.848286612988126 -0.842948913604496 -0.83752692003196 -0.832021174465358 -0.826432227474658 -0.820760637949901 -0.815006973045315 -0.809171808122594 -0.803255726693369 -0.797259320360851 -0.791183188760678 -0.785027939500947 -0.778794188101452 -0.772482557932141 -0.76609368015077 -0.759628193639793 -0.753086744942473 -0.746469988198229 -0.739778585077222 -0.733013204714187 -0.726174523641522 -0.719263225721637 -0.712280002078564 -0.705225551028848 -0.698100578011715 -0.690905795518529 -0.683641923021544 -0.676309686901957 -0.668909820377269 -0.661443063427966 -0.653910162723521 -0.646311871547728 -0.63864894972337 -0.630922163536246 -0.623132285658536 -0.615280095071534 -0.607366376987757 -0.599391922772418 -0.591357529864294 -0.583264001695979 -0.575112147613546 -0.566902782795611 -0.558636728171813 -0.550314810340728 -0.541937861487202 -0.533506719299141 -0.525022226883737 -0.516485232683163 -0.507896590389722 -0.499257158860489 -0.490567802031416 -0.481829388830944 -0.473042793093113 -0.464208893470173 -0.455328573344726 -0.446402720741384 -0.437432228237968 -0.428417992876255 -0.419360916072267 -0.410261903526138 -0.401121865131541 -0.391941714884698 -0.382722370792983 -0.373464754783123 -0.364169792609004 -0.354838413759098 -0.345471551363514 -0.336070142100686 -0.326635126103705 -0.317167446866308 -0.307668051148531 -0.298137888882028 -0.288577913075083 -0.278989079717313 -0.26937234768406 -0.259728678640516 -0.250059036945547 -0.240364389555265 -0.230645705926331 -0.220903957919008 -0.21114011969998 -0.201355167644931 -0.191550080240913 -0.181725837988495 -0.171883423303716 -0.162023820419843 -0.152148015288946 -0.142256995483311 -0.132351750096674 -0.122433269645321 -0.11250254596903 -0.102560572131894 -0.0926083423230121 -0.082646851757071 -0.0726770965748263 -0.0627000737434883 -0.0527167809570257 -0.0427282165363979 -0.0327353793297233 -0.022739268612395 -0.0127408839871548 -0.00274122528413334 0.00725870753913224 0.0172579144976928 0.0272553956791852 0.0372501513438223 0.0472411820243668 0.0572274886260764 0.0672080725266128 0.077181935675903 0.0871480806959437 0.097105510980538 0.107053230794955 0.116990245375504 0.126915561029006 0.136828185232168 0.14672712673083 0.156611395639091 0.166480003538298 0.176331963575883 0.186166290564054 0.195982001078306 0.205778113555768 0.215553648393356 0.225307628045732 0.235039077123059 0.244747022488539 0.254430493355725 0.2640885213856 0.27372014078341 0.283324388395241 0.292900303804335 0.302446929427132 0.311963310609024 0.321448495719823 0.330901536248924 0.34032148690015 0.349707405686286 0.359058354023276 0.368373396824077 0.377651602592173 0.386892043514718 0.396093795555321 0.405255938546445 0.414377556281427 0.423457736606094 0.432495571509981 0.441490157217128 0.450440594276461 0.459345987651733 0.468205446811026 0.477018085815808 0.485783023409522 0.494499383105713 0.503166293275674 0.511782887235612 0.520348303333311 0.528861685034299 0.5373221810075 0.545728945210367 0.554081136973485 0.562377921084639 0.570618467872331 0.57880195328875 0.586927558992173 0.594994472428801 0.603001886914014 0.610949001713035 0.618835022121008 0.626659159542462 0.634420631570176 0.642118662063416 0.649752481225546 0.657321325681012 0.664824438551676 0.672261069532503 0.679630474966593 0.686931917919543 0.694164668253142 0.701328002698385 0.708421204927795 0.715443565627062 0.722394382565968 0.72927296066861 0.73607861208291 0.742810656249399 0.74946841996927 0.756051237471699 0.762558450480421 0.768989408279558 0.77534346777869 0.781619993577161 0.787818358027623 0.793937941298795 0.799978131437449 0.805938324429606 0.811817924260933 0.817616342976347 0.823333000738807 0.828967325887303 0.834518754994013 0.839986732920654 0.845370712873989 0.85067015646051 0.855884533740275 0.8610133232799 0.866056012204706 0.871012096250003 0.875881079811515 0.880662475994945 0.885355806664658 0.889960602491498 0.894476402999721 0.898902756613039 0.903239220699778 0.907485361617144 0.911640754754583 0.915704984576245 0.919677644662535 0.923558337750753 0.927346675774826 0.931042279904108 0.934644780581265 0.938153817559232 0.941569039937236 0.944890106195883 0.948116684231318 0.951248451388423 0.954285094493094 0.957226309883551 0.960071803440705 0.962821290617572 0.965474496467726 0.968031155672793 0.970491012568982 0.972853821172654 0.975119345204917 0.977287358115257 0.979357643104188 0.981329993144938 0.983204211004146 0.984980109261587 0.986657510328916 0.988236246467424 0.989716159804813 0.991097102350982 0.992378936012827 0.99356153260805 0.994644773877978 0.995628551499386 0.996512767095332 0.997297332244993 0.997982168492507 0.998567207354822 0.999052390328537 0.99943766889576 0.999723004528956 0.999908368694798 0.999993742857026 0.999979118478292 0.999864497021024 0.999649889947272 0.999335318717563 0.99892081478876 0.998406419610909 0.997792184623099 0.997078171248318 0.996264450887307 0.995351104911425 0.994338224654509 0.99322591140374 0.992014276389515 0.990703440774328 0.989293535640646 0.987784701977809 0.986177090667925 0.984470862470786 0.98266618800779 0.980763247744878 0.978762231974492 0.976663340796541 0.974466784098394 0.972172781533889 0.969781562501373 0.967293366120755 0.9647084412096 0.962027046258245 0.959249449403951 0.956375928404088 0.953406770608362 0.950342272930078 0.94718274181645 0.943928493217957 0.940579852556747 0.937137154694095 0.933600743896918 0.92997097380335 0.926248207387375 0.922432816922532 0.918525183944688 0.914525699213884 0.910434762675261 0.906252783419064 0.901980179639733 0.897617378594086 0.893164816558591 0.888622938785742 0.883992199459531 0.879273061650032 0.874465997267093 0.869571487013146 0.864590020335139 0.859522095375587 0.854368218922764 0.849128906360019 0.843804681614244 0.838396077103475 0.832903633683657 0.827327900594554 0.82166943540483 0.815928803956288 0.810106580307288 0.804203346675344 0.7982196933789 0.792156218778298 0.786013529215947 0.779792238955684 0.773492970121349 0.767116352634577 0.760663024151804 0.754133630000499 0.747528823114637 0.740849263969402 0.734095620515142 0.727268568110574 0.720368789455251 0.713396974521288 0.706353820484368 0.699240031654026 0.692056319403216 0.684803402097178 0.677482005021598 0.670092860310082 0.662636706870944 0.655114290313314 0.647526362872579 0.639873683335161 0.632157016962635 0.624377135415209 0.616534816674554 0.608630844966009 0.600666010680158 0.592641110293792 0.584556946290263 0.576414327079233 0.56821406691584 0.559956985819265 0.551643909490737 0.543275669230962 0.534853101856992 0.526377049618546 0.517848360113784 0.50926788620455 0.500636485931083 0.491955022426219 0.483224363829074 0.474445383198231 0.465618958424439 0.456745972142818 0.447827311644603 0.438863868788413 0.429856539911062 0.420806225737932 0.411713831292899 0.402580265807831 0.393406442631664 0.384193279139072 0.374941696638726 0.365652620281166 0.356326978966288 0.346965705250451 0.337569735253227 0.328140008563784 0.318677468146934 0.309183060248833 0.299657734302358 0.290102442832168 0.280518141359445 0.270905788306351 0.26126634490018 0.25160077507724 0.241910045386459 0.232195124892731 0.222456985080009 0.212696599754158 0.202914944945579 0.193112998811601 0.183291741538668 0.173452155244325 0.163595223878999 0.153721933127615 0.143833270311019 0.133930224287253 0.124013785352666 0.114084945142888 0.104144696533667 0.0941940335415788 0.0842339512246314 0.0742654455827564 0.0642895134582107 0.0543071524358936 0.0443193607435887 0.0343271371521422 0.0243314808755863 0.014333391471219 0.00433386873964898 -0.00566608737518342 -0.015665476886 -0.0256632998621825 -0.0356585565297649 -0.0456502473714096 -0.0556373732263589 -0.0656189353903499 -0.0755939357154841 -0.0855613767100415 -0.0955202616382288 -0.105469594619852 -0.115408380729905 -0.125335626098058 -0.135250338008047 -0.145151524996943 -0.155038196954299 -0.164909365221158 -0.174764042688918 -0.184601243898046 -0.194419985136618 -0.204219284538692 -0.213998162182494 -0.22375564018841 -0.233490742816769 -0.243202496565421 -0.252889930267085 -0.262552075186464 -0.272187965117116 -0.281796636478079 -0.291377128410223 -0.300928482872341 -0.310449744736944 -0.31993996188578 -0.329398185305044 -0.338823469180275 -0.348214870990939 -0.357571451604683 -0.366892275371241 -0.376176410216005 -0.385422927733226 -0.394630903278859 -0.403799416063022 -0.412927549242077 -0.422014390010313 -0.431059029691225 -0.440060563828383 -0.449018092275874 -0.457930719288318 -0.466797553610441 -0.475617708566199 -0.484390302147447 -0.493114457102138 -0.501789301022046 -0.510413966430008 -0.518987590866671 -0.527509316976735 -0.535978292594691 -0.544393670830035 -0.552754610151956 -0.561060274473488 -0.569309833235122 -0.577502461487856 -0.585637339975691 -0.593713655217559 -0.601730599588664 -0.609687371401251 -0.617583174984769 -0.625417220765439 -0.633188725345212 -0.640896911580106 -0.648541008657921 -0.656120252175319 -0.663633884214264 -0.671081153417815 -0.678461315065256 -0.685773631146573 -0.693017370436252 -0.7001918085664 -0.707296228099182 -0.714329918598565 -0.721292176701362 -0.728182306187564 -0.734999618049963 -0.741743430563055 -0.748413069351208 -0.755007867456101 -0.76152716540342 -0.767970311268802 -0.774336660743031 -0.780625577196463 -0.786836431742695 -0.792968603301448 -0.799021478660676 -0.804994452537886 -0.810886927640669 -0.816698314726425 -0.822428032661287 -0.828075508478238 -0.833640177434402 -0.83912148306752 -0.844518877251597 -0.849831820251712 -0.855059780777993 -0.860202236038744 -0.865258671792723 -0.870228582400569 -0.875111470875364 -0.879906848932328 -0.884614237037652 -0.889233164456448 -0.893763169299824 -0.89820379857107 -0.902554608210959 -0.906815163142154 -0.910985037312711 -0.915063813738689 -0.919051084545843 -0.922946451010416 -0.926749523599008 -0.930459922007528 -0.934077275199228 -0.937601221441804 -0.941031408343567 -0.944367492888685 -0.947609141471485 -0.95075602992981 -0.953807843577436 -0.956764277235541 -0.959625035263223 -0.962389831587064 -0.965058389729735 -0.967630442837646 -0.970105733707629 -0.972484014812659 -0.97476504832661 -0.976948606148029 -0.979034469922954 -0.981022431066746 -0.982912290784948 -0.984703860093162 -0.98639695983595 -0.987991420704749 -0.989487083254802 -0.990883797921098 -0.992181425033337 -0.993379834829887 -0.994478907470768 -0.995478533049631 -0.996378611604752 -0.997179053129025 -0.997879777578965 -0.998480714882711 -0.998981804947033 -0.999382997663343 -0.999684252912702 -0.999885540569838 -0.999986840506151 -0.999988142591734 -0.999889446696378 -0.999690762689591 -0.999392110439608 -0.998993519811404 -0.998495030663712 -0.997896692845029 -0.99719856618864 -0.996400720506628 -0.995503235582896 -0.994506201165189 -0.993409716956118 -0.99221389260319 -0.990918847687844 -0.989524711713492 -0.98803162409257 -0.986439734132596 -0.984749201021238 -0.9829601938104 -0.981072891399312 -0.979087482516642 -0.977004165701624 -0.974823149284202 -0.972544651364203 -0.970168899789518 -0.967696132133325 -0.96512659567033 -0.962460547352037 -0.959698253781057 -0.956839991184445 -0.953886045386078 -0.950836711778074 -0.947692295291255 -0.944453110364647 -0.941119480914044 -0.937691740299613 -0.93417023129256 -0.93055530604085 -0.926847326033996 -0.923046662066908 -0.919153694202817 -0.915168811735265 -0.911092413149177 -0.906924906081015 -0.902666707278014 -0.898318242556504 -0.893879946759335 -0.889352263712387 -0.884735646180192 -0.880030555820657 -0.875237463138896 -0.870356847440183 -0.865389196782021 -0.860335007925336 -0.855194786284801 -0.849969045878299 -0.844658309275513 -0.83926310754568 -0.833783980204475 -0.828221475160068 -0.822576148658327 -0.816848565227198 -0.811039297620251 -0.805148926759406 -0.79917804167684 -0.793127239456086 -0.786997125172324 -0.780788311831873 -0.774501420310893 -0.768137079293298 -0.761695925207886 -0.755178602164698 -0.748585761890606 -0.741918063664145 -0.73517617424958 -0.728360767830235 -0.721472525941072 -0.714512137400541 -0.707480298241694 -0.700377711642587 -0.693205087855963 -0.685963144138222 -0.678652604677701 -0.671274200522254 -0.663828669506149 -0.656316756176281 -0.648739211717725 -0.641096793878611 -0.633390266894355 -0.625620401411232 -0.617787974409318 -0.609893769124783 -0.60193857497158 -0.593923187462493 -0.585848408129594 -0.577715044444087 -0.569523909735564 -0.561275823110669 -0.552971609371191 -0.544612098931584 -0.536198127735926 -0.527730537174324 -0.519210173998779 -0.510637890238508 -0.502014543114743 -0.493340994955011 -0.484618113106899 -0.475846769851324 -0.467027842315301 -0.458162212384235 -0.449250766613731 -0.44029439614094 -0.431293996595446 -0.422250468009703 -0.413164714729033 -0.404037645321193 -0.394870172485518 -0.385663212961651 -0.376417687437874 -0.367134520459033 -0.35781464033409 -0.348458979043292 -0.339068472144971 -0.329644058681991 -0.320186681087846 -0.310697285092414 -0.301176819627385 -0.291626236731374 -0.282046491454711 -0.27243854176394 -0.262803348446024 -0.253141875012266 -0.243455087601957 -0.233743954885767 -0.224009447968874 -0.214252540293858 -0.204474207543355 -0.194675427542493 -0.184857180161106 -0.17502044721575 -0.165166212371522 -0.155295461043695 -0.145409180299176 -0.135508358757801 -0.125593986493474 -0.115667054935158 -0.105728556767738 -0.0957794858327482 -0.0858208370289909 -0.0758536062130477 -0.0658787900996944 -0.0558973861622299 -0.0459103925327302 -0.0359188079022358 -0.0259236314208833 -0.0159258625979918 -0.00592650120211189 0.00407345283894945 0.0140729995381214 0.0240711389490671 0.034066871266177 0.0440591969245493 0.054047116699945 0.0640296318087098 0.0740057440076516 0.0839744556938638 0.0939347700044852 0.103885690916385 0.113826223345764 0.123755373247663 0.133672147715367 0.143575555079692 0.153464605008156 0.163338308604005 0.173195678505108 0.183035728982691 0.192857476039904 0.202659937510227 0.212442133155682 0.222203084764856 0.231941816250722 0.241657353748247 0.251348725711778 0.261014963012194 0.270655099033821 0.28026816977109 0.289853213924937 0.299409272998935 0.308935391395141 0.318430616509652 0.32789399882787 0.33732459201945 0.34672145303293 0.356083642190041 0.365410223279668 0.374700263651475 0.383952834309165 0.393167010003384 0.402341869324242 0.41147649479345 0.420569972956075 0.429621394471878 0.438629854206251 0.447594451320726 0.456514289363064 0.465388476356893 0.474216124890908 0.482996352207613 0.491728280291593 0.500411035957316 0.509043750936451 0.517625561964694 0.526155610868093 0.534633044648868 0.543057015570704 0.551426681243528 0.559741204707746 0.567999754517943 0.576201504826019 0.584345635463779 0.592431332024946 0.600457785946601 0.608424194590042 0.616329761321042 0.624173695589517 0.631955213008575 0.639673535432961 0.647327891036863 0.654917514391099 0.662441646539658 0.669899535075597 0.677290434216276 0.68461360487794 0.691868314749626 0.699053838366392 0.706169457181864 0.71321445964009 0.720188141246696 0.727089804639332 0.733918759657411 0.74067432341112 0.747355820349716 0.75396258232907 0.760493948678492 0.766949266266789 0.773327889567581 0.779629180723855 0.785852509611744 0.791997253903548 0.798062799129957 0.804048538741503 0.809953874169213 0.815778214884465 0.821520978458043 0.827181590618372 0.832759485308956 0.838254104744973 0.843664899469058 0.848991328406248 0.854232858918087 0.859388966855894 0.864459136613169 0.869442861177164 0.874339642179574 0.879148989946381 0.883870423546814 0.888503470841449 0.893047668529418 0.897502562194737 0.901867706351753 0.906142664489687 0.910327009116289 0.914420321800583 0.918422193214711 0.922332223174868 0.926150020681314 0.929875203957481 0.933507400488146 0.937046247056682 0.940491389781383 0.943842484150845 0.947099195058425 0.950261196835746 0.953328173285265 0.956299817711892 0.959175832953663 0.961955931411449 0.964639835077721 0.967227275564349 0.969717994129441 0.972111741703216 0.97440827891291 0.976607376106718 0.978708813376752 0.980712380581036 0.982617877364519 0.984425113179112 0.986133907302738 0.98774408885741 0.989255496826313 0.990667980069911 0.991981397341055 0.993195617299114 0.994310518523103 0.99532598952383 0.996241928755039 0.997058244623572 0.997774855498522 0.998391689719398 0.998908685603292 0.999325791451047 0.999642965552426 0.999860176190283 0.999977401643735 0.999994630190334 0.999911860107241 0.999729099671393 0.999446367158684 0.999063690842128 0.998581108989038 0.997998669857197 0.997316431690033 0.996534462710795 0.995652841115728 0.994671655066258 0.993591002680171 0.992410992021806 0.991131741091245 0.989753377812516 0.988276040020797 0.986699875448637 0.985025041711179 0.983251706290401 0.981380046518368 0.979410249559498 0.977342512391844 0.9751770417874 0.972914054291422 0.970553776200774 0.968096443541298 0.965542302044213 0.962891607121539 0.96014462384056 0.957301626897314 0.954362900589128 0.951328738786183 0.94819944490213 0.944975331863751 0.941656722079662 0.938243947408077 0.934737349123618 0.931137277883192 0.927444093690923 0.923658165862152 0.919779872986508 0.915809602890046 0.911747752596467 0.907594728287415 0.903350945261862 0.899016827894572 0.894592809593671 0.890079332757302 0.885476848729387 0.880785817754495 0.876006708931813 0.871140000168241 0.8661861781306 0.861145738196965 0.85601918440713 0.850807029412201 0.845509794423334 0.840128009159614 0.834662211795082 0.829112948904921 0.823480775410794 0.817766254525358 0.811969957695939 0.80609246454739 0.800134362824127 0.794096248331359 0.787978724875502 0.781782404203804 0.77550790594317 0.769155857538195 0.762726894188427 0.756221658784845 0.749640801845566 0.742984981450802 0.736254863177045 0.729451120030513 0.722574432379853 0.715625487888098 0.708604981443907 0.701513615092073 0.694352097963323 0.687121146203402 0.679821482901459 0.672453838017743 0.665018948310601 0.657517557262808 0.649950415007219 0.642318278251752 0.634621910203724 0.626862080493525 0.619039565097661 0.611155146261151 0.603209612419309 0.595203758118898 0.587138383938677 0.579014296409343 0.570832307932878 0.562593236701311 0.554297906614901 0.545947147199743 0.537541793524819 0.529082686118492 0.520570670884455 0.512006599017136 0.503391326916587 0.494725716102837 0.486010633129748 0.477246949498352 0.468435541569712 0.459577290477276 0.450673082038772 0.441723806667624 0.432730359283911 0.423693639224877 0.414614550154998 0.405493999975614 0.396332900734143 0.387132168532875 0.377892723437363 0.368615489384416 0.35930139408971 0.349951368955011 0.340566348975043 0.331147272643981 0.32169508186161 0.312210721839131 0.302695141004643 0.293149290908299 0.283574126127155 0.27397060416971 0.264339685380155 0.254682332842345 0.244999512283485 0.235292191977562 0.225561342648518 0.215807937373176 0.206032951483936 0.196237362471241 0.18642214988583 0.176588295240782 0.166736781913365 0.156868595046705 0.146984721451263 0.137086149506163 0.12717386906035 0.117248871333609 0.107312148817442 0.0973646951758194 0.0874075051458163 0.0774415744381381 0.0674678996375504 0.0574874781032221 0.0475013078689895 0.0375103875435543 0.0275157162106233 0.0175182933290009 0.00751911863264421 -0.00248080796930988 -0.0124804864925344 -0.02247891697751 -0.0324750995895202 -0.042468034718634 -0.0524567230796658 -0.0624401658121035 -0.0724173645799932 -0.0823873216717725 -0.0923490401000406 -0.102301523701256 -0.112243777235352 -0.122174806485261 -0.132093618356333 -0.141999220975648 -0.151890623791197 -0.161766837670942 -0.171626875001725 -0.18146974978803 -0.19129447775058 -0.201100076424767 -0.210885565258894 -0.220649965712233 -0.230392301352875 -0.240111597955375 -0.249806883598171 -0.259477188760779 -0.269121546420742 -0.27873899215033 -0.288328564212984 -0.29788930365949 -0.30742025442387 -0.316920463418991 -0.326388980631869 -0.335824859218675 -0.345227155599411 -0.354594929552276 -0.36392724430768 -0.373223166641925 -0.382481766970525 -0.391702119441161 -0.40088330202627 -0.410024396615245 -0.419124489106244 -0.428182669497602 -0.437198031978828 -0.446169675021187 -0.45509670146785 -0.463978218623612 -0.47281333834416 -0.481601177124883 -0.490340856189226 -0.499031501576566 -0.507672244229607 -0.516262220081284 -0.52480057014117 -0.533286440581374 -0.541718982821924 -0.550097353615622 -0.558420715132372 -0.566688235042958 -0.574899086602278 -0.583052448732019 -0.591147506102763 -0.599183449215517 -0.607159474482667 -0.615074784308334 -0.622928587168131 -0.630720097688316 -0.638448536724331 -0.646113131438712 -0.653713115378375 -0.66124772855126 -0.668716217502327 -0.676117835388906 -0.683451842055375 -0.69071750410718 -0.697914094984171 -0.705040895033256 -0.71209719158037 -0.719082279001739 -0.72599545879444 -0.732836039646257 -0.739603337504803 -0.746296675645933 -0.75291538474141 -0.759458802925841 -0.765926275862859 -0.772317156810561 -0.778630806686177 -0.784866594129982 -0.791023895568426 -0.797102095276499 -0.803100585439293 -0.809018766212792 -0.814856045783849 -0.820611840429373 -0.826285574574695 -0.831876680851128 -0.837384600152704 -0.842808781692083 -0.848148683055632 -0.853403770257663 -0.858573517793836 -0.863657408693705 -0.868654934572416 -0.873565595681548 -0.87838890095908 -0.883124368078504 -0.887771523497055 -0.892329902503064 -0.896799049262428 -0.901178516864196 -0.905467867365257 -0.909666671834136 -0.913774510393885 -0.91779097226407 -0.921715655801852 -0.925548168542148 -0.929288127236877 -0.932935157893287 -0.936488895811351 -0.939948985620238 -0.943315081313852 -0.946586846285428 -0.949763953361195 -0.952846084833093 -0.955832932490544 -0.95872419765127 -0.961519591191166 -0.964218833573206 -0.966821654875402 -0.969327794817792 -0.971737002788471 -0.97404903786865 -0.976263668856746 -0.978380674291507 -0.980399842474154 -0.98232097148955 -0.984143869226396 -0.985868353396436 -0.98749425155269 -0.989021401106699 -0.990449649344779 -0.991778853443296 -0.993008880482948 -0.994139607462057 -0.995170921308867 -0.996102718892852 -0.996934907035031 -0.997667402517282 -0.998300132090669 -0.998833032482761 -0.999266050403962 -0.999599142552842 -0.999832275620464 -0.999965426293714 -0.999998581257636 -0.999931737196762 -0.999764900795442 -0.999498088737178 -0.999131327702952 -0.998664654368562 -0.998098115400953 -0.99743176745355 -0.996665677160592 -0.99579992113047 -0.994834585938066 -0.993769768116093 -0.992605574145448 -0.991342120444557 -0.989979533357737 -0.988517949142562 -0.986957513956234 -0.985298383840973 -0.983540724708407 -0.981684712322985 -0.979730532284398 -0.977678380009023 -0.975528460710376 -0.973280989378595 -0.970936190758941 -0.968494299329323 -0.965955559276847 -0.963320224473404 -0.960588558450278 -0.957760834371795 -0.954837335008006 -0.951818352706411 -0.948704189362725 -0.945495156390687 -0.94219157469092 -0.938793774618841 -0.935302095951626 -0.931716887854231 -0.928038508844479 -0.924267326757205 -0.920403718707476 -0.916448071052877 -0.912400779354877 -0.908262248339273 -0.904032891855717 -0.899713132836334 -0.895303403253426 -0.890804144076277 -0.886215805227054 -0.881538845535819 -0.876773732694644 -0.871920943210842 -0.866980962359317 -0.861954284134038 -0.856841411198639 -0.851642854836152 -0.846359134897881 -0.840990779751417 -0.835538326227802 -0.830002319567843 -0.824383313367594 -0.818681869522992 -0.812898558173671 -0.807033957645945 -0.801088654394981 -0.795063242946149 -0.788958325835573 -0.782774513549876 -0.776512424465135 -0.770172684785038 -0.763755928478271 -0.757262797215118 -0.750693940303294 -0.744050014623015 -0.737331684561314 -0.730539621945598 -0.723674505976468 -0.7167370231598 -0.709727867238096 -0.702647739121105 -0.695497346815741 -0.688277405355274 -0.680988636727834 -0.67363176980421 -0.666207540264964 -0.658716690526862 -0.651159969668636 -0.643538133356075 -0.635851943766458 -0.62810216951234 -0.620289585564687 -0.612414973175384 -0.604479119799107 -0.596482819014582 -0.588426870445222 -0.580312079679172 -0.572139258188746 -0.563909223249282 -0.555622797857417 -0.547280810648782 -0.538884095815149 -0.530433493021003 -0.521929847319581 -0.513374009068368 -0.504766833844058 -0.496109182357001 -0.487401920365131 -0.478645918587392 -0.469842052616664 -0.460991202832209 -0.452094254311628 -0.44315209674236 -0.43416562433271 -0.42513573572243 -0.416063333892857 -0.406949326076612 -0.397794623666884 -0.388600142126283 -0.379366800895302 -0.370095523300369 -0.360787236461518 -0.351442871199676 -0.342063361943582 -0.332649646636346 -0.323202666641653 -0.313723366649631 -0.304212694582379 -0.294671601499178 -0.285101041501386 -0.275501971637028 -0.26587535180509 -0.256222144659534 -0.24654331551303 -0.236839832240426 -0.227112665181964 -0.217362787046244 -0.207591172812955 -0.197798799635376 -0.187986646742665 -0.178155695341935 -0.168306928520134 -0.158441331145736 -0.148559889770257 -0.138663592529601 -0.128753429045244 -0.118830390325277 -0.108895468665303 -0.0989496575492077 -0.0889939515498155 -0.0790293462294297 -0.0690568380402786 -0.0590774242248705 -0.0490921027162711 -0.0391018720383099 -0.0291077312057297 -0.0191106796242853 -0.00911171699080393 0.000888156806783406 0.0108879417894302 0.0208866379869713 0.0308832455381192 0.0408767647904492 0.050866196400364 0.0608505414330272 0.0708288014622557 0.0807999786703617 0.0907630759479338 0.100717096993547 0.110661046413391 0.120593929820811 0.130514753935744 0.140422526684045 0.150316257296696 0.16019495640888 0.170057636158919 0.179903310287057 0.189730994234084 0.199539705239797 0.209328462441268 0.219096286970935 0.228842202054485 0.23856523310853 0.248264407838068 0.257938756333709 0.267587311168665 0.277209107495492 0.286803183142577 0.296368578710349 0.305904337667223 0.31540950644525 0.324883134535473 0.334324274582977 0.343731982481626 0.353105317468469 0.362443342217819 0.371745122934981 0.381009729449637 0.390236235308855 0.399423717869738 0.408571258391687 0.41767794212827 0.426742858418705 0.435765100778916 0.444743766992185 0.453677959199374 0.462566783988706 0.471409352485111 0.480204780439107 0.488952188315228 0.497650701379977 0.506299449789295 0.514897568675549 0.523444198234015 0.53193848380886 0.540379575978605 0.548766630641067 0.557098809097769 0.565375278137808 0.573595210121178 0.581757783061531 0.589862180708374 0.597907592628696 0.60589321428801 0.613818247130805 0.6216818986604 0.629483382518195 0.637221918562307 0.644896732945579 0.652507058192968 0.660052133278292 0.66753120370033 0.674943521558273 0.68228834562651 0.689564941428757 0.696772581311496 0.703910544516746 0.710978117254134 0.717974592772277 0.724899271429453 0.731751460763567 0.738530475561395 0.745235637927107 0.751866277350054 0.758421730771819 0.764901342652523 0.771304465036378 0.77763045761648 0.783878687798844 0.790048530765659 0.796139369537768 0.802150595036371 0.808081606143927 0.813931809764267 0.819700620881906 0.825387462620538 0.830991766300728 0.836512971496779 0.841950526092773 0.84730388633778 0.852572516900238 0.85775589092148 0.862853490068425 0.867864804585404 0.872789333345144 0.877626583898871 0.882376072525562 0.887037324280311 0.891609873041827 0.896093261559044 0.900487041496848 0.904790773480906 0.909004027141605 0.913126381157091 0.917157423295397 0.921096750455669 0.924943968708474 0.928698693335192 0.93236054886649 0.935929169119865 0.939404197236267 0.942785285715779 0.946072096452372 0.94926430076771 0.952361579444023 0.955363622756023 0.958270130501881 0.961080812033245 0.963795386284304 0.966413581799894 0.968935136762647 0.971359799019166 0.973687326105247 0.975917485270122 0.978050053499731 0.980084817539029 0.982021573913308 0.983860128948544 0.985600298790766 0.98724190942444 0.988784796689871 0.990228806299617 0.991573793853921 0.992819624855148 0.993966174721237 0.995013328798156 0.995960982371371 0.996809040676313 0.997557418907859 0.998206042228809 0.998754845777372 0.99920377467365 0.999552784025128 0.999801838931161 0.999950914486467 0.999999995783614 0.999949077914513 0.999798165970908 0.999547275043869 0.999196430222279 0.998745666590328 0.998195029224003 0.997544573186582 0.996794363523126 0.995944475253978 0.994994993367255 0.993946012810356 0.992797638480461 0.991549985214046 0.990203177775399 0.988757350844141 0.987212649001761 0.985569226717154 0.983827248331181 0.981986888040229 0.980048329878792 0.978011767701071 0.975877405161587 0.973645455694816 0.971316142493844 0.96888969848805 0.966366366319812 0.963746398320245 0.961030056483966 0.958217612442894 0.955309347439089 0.952305552296629 0.949206527392525 0.946012582626685 0.942724037390923 0.939341220537023 0.93586447034385 0.932294134483528 0.928630569986667 0.924874143206663 0.921025229783065 0.917084214604007 0.913051491767723 0.908927464543135 0.904712545329531 0.900407155615318 0.89601172593588 0.891526695830523 0.88695251379852 0.882289637254261 0.877538532481515 0.872699674586802 0.867773547451876 0.862760643685348 0.857661464573417 0.852476520029743 0.847206328544461 0.841851417132328 0.836412321280022 0.830889584892596 0.825283760239086 0.819595407897287 0.813825096697692 0.807973403666613 0.802040913968475 0.796028220847307 0.789935925567408 0.78376463735323 0.777514973328452 0.771187558454268 0.764783025466893 0.758302014814288 0.751745174592118 0.745113160478941 0.738406635670642 0.731626270814113 0.724772743940188 0.717846740395846 0.710848952775667 0.703780080852582 0.696640831507894 0.689431918660588 0.682154063195939 0.674807992893432 0.667394442353973 0.659914152926438 0.652367872633538 0.644756356097013 0.637080364462173 0.629340665321785 0.621538032639314 0.613673246671526 0.605747093890463 0.597760366904799 0.589713864380576 0.581608390961342 0.573444757187684 0.565223779416176 0.556946279737745 0.548613085895461 0.540225031201763 0.53178295445513 0.523287699856204 0.514740116923363 0.506141060407779 0.497491390207936 0.488791971283648 0.480043673569557 0.471247371888144 0.462403945862246 0.453514279827098 0.444579262741895 0.435599788100899 0.426576753844091 0.417511062267379 0.408403619932364 0.399255337575692 0.390067130017973 0.380839916072308 0.371574618452401 0.362272163680293 0.35293348199371 0.343559507253037 0.334151176847938 0.324709431603613 0.315235215686717 0.305729476510948 0.296193164642302 0.286627233704018 0.277032640281219 0.267410343825252 0.257761306557743 0.248086493374379 0.238386871748416 0.228663411633933 0.218917085368838 0.209148867577638 0.199359735073969 0.189550666762926 0.179722643543164 0.169876648208817 0.160013665351213 0.150134681260417 0.140240683826607 0.130332662441282 0.120411607898322 0.110478512294916 0.100534368932345 0.0905801722166588 0.0806169175592345 0.0706456012772348 0.0606672204939785 0.0506827730392287 0.0406932573494105 0.0306996723677683 0.0207030174444722 0.0107042922366842 0.000704496608592712 -0.00929536946857255 -0.0192943060165371 -0.0292913131499785 -0.0392853911765142 -0.04927554069667 -0.059260762703819 -0.0692400586840814 -0.0792124307161752 -0.0891768815712076 -0.0991324148123967 -0.109078034894715 -0.119012747264441 -0.128935558458618 -0.138845476204395 -0.148741509518256 -0.158622668805116 -0.16848796595728 -0.178336414453255 -0.188167029456398 -0.197978827913401 -0.207770828652594 -0.217542052482063 -0.227291522287569 -0.237018263130255 -0.246721302344142 -0.256399669633396 -0.266052397169352 -0.2756785196873 -0.285277074583011 -0.294847102008994 -0.304387644970481 -0.313897749421127 -0.323376464358411 -0.332822841918739 -0.342235937472226 -0.351614809717162 -0.360958520774138 -0.370266136279834 -0.379536725480456 -0.388769361324809 -0.397963120557003 -0.407117083808777 -0.416230335691433 -0.425301964887377 -0.43433106424125 -0.443316730850639 -0.452258066156373 -0.461154176032372 -0.470004170875062 -0.478807165692333 -0.487562280192039 -0.496268638870027 -0.504925371097684 -0.513531611209 -0.522086498587138 -0.530589177750487 -0.539038798438217 -0.547434515695301 -0.55577548995701 -0.564060887132867 -0.57228987869006 -0.580461641736291 -0.588575359102065 -0.596630219422407 -0.604625417217996 -0.612560152975717 -0.620433633228605 -0.628245070635197 -0.63599368405826 -0.643678698642911 -0.651299345894095 -0.658854863753438 -0.666344496675448 -0.673767495703077 -0.681123118542606 -0.688410629637882 -0.695629300243867 -0.702778408499518 -0.709857239499965 -0.716865085368008 -0.723801245324899 -0.730665025760424 -0.737455740302259 -0.744172709884607 -0.750815262816109 -0.757382734847007 -0.76387446923557 -0.77028981681377 -0.776628136052194 -0.782888793124201 -0.789071161969301 -0.795174624355761 -0.801198569942429 -0.807142396339766 -0.813005509170086 -0.81878732212699 -0.824487257034003 -0.830104743902383 -0.835639220988124 -0.84109013484813 -0.846456940395557 -0.851739100954323 -0.856936088312774 -0.862047382776505 -0.867072473220329 -0.872010857139389 -0.876862040699408 -0.881625538786073 -0.886300875053544 -0.890887581972093 -0.895385200874848 -0.899793282003667 -0.904111384554111 -0.908339076719524 -0.912475935734211 -0.916521547915719 -0.920475508706201 -0.924337422712873 -0.928106903747552 -0.931783574865276 -0.935367068401997 -0.938857026011348 -0.942253098700477 -0.945554946864943 -0.948762240322683 -0.951874658347023 -0.954891889698755 -0.957813632657258 -0.96063959505067 -0.963369494285108 -0.966003057372922 -0.968540020959999 -0.970980131352094 -0.973323144540201 -0.975568826224955 -0.977716951840057 -0.979767306574736 -0.981719685395228 -0.983573893065278 -0.985329744165663 -0.986987063112737 -0.988545684175987 -0.990005451494604 -0.991366219093073 -0.99262785089577 -0.993790220740563 -0.994853212391439 -0.995816719550116 -0.996680645866684 -0.997444904949229 -0.99810942037248 -0.99867412568545 -0.999138964418077 -0.999503890086874 -0.999768866199581 -0.999933866258805 -0.999998873764679 -0.999963882216506 -0.999828895113412 -0.999593925953995 -0.999258998234975 -0.998824145448844 -0.998289411080519 -0.997654848602991 -0.996920521471979 -0.996086503119584 -0.995152876946947 -0.994119736315906 -0.992987184539664 -0.991755334872454 -0.990424310498218 -0.988994244518283 -0.987465279938054 -0.985837569652718 -0.984111276431944 -0.982286572903617 -0.98036364153657 -0.978342674622335 -0.976223874255922 -0.9740074523156 -0.971693630441716 -0.969282640014531 -0.966774722131077 -0.964170127581053 -0.961469116821743 -0.958671959951972 -0.955778936685098 -0.952790336321034 -0.949706457717328 -0.946527609259269 -0.943254108829055 -0.939886283774 -0.936424470873804 -0.932869016306872 -0.929220275615698 -0.925478613671309 -0.921644404636783 -0.917718031929828 -0.913699888184442 -0.909590375211653 -0.905389903959331 -0.901098894471102 -0.89671777584434 -0.892246986187256 -0.887686972575089 -0.883038191005402 -0.878301106352477 -0.873476192320832 -0.868563931397849 -0.863564814805528 -0.858479342451361 -0.853308022878345 -0.84805137321413 -0.8427099191193 -0.837284194734815 -0.83177474262859 -0.826182113741246 -0.820506867331011 -0.814749570917796 -0.808910800226445 -0.802991139129162 -0.796991179587122 -0.790911521591281 -0.784752773102372 -0.778515549990111 -0.772200475971612 -0.765808182549014 -0.759339308946332 -0.752794502045537 -0.746174416321863 -0.739479713778368 -0.732711063879725 -0.725869143485285 -0.718954636781386 -0.711968235212935 -0.704910637414268 -0.697782549139283 -0.690584683190868 -0.683317759349619 -0.675982504301865 -0.668579651566997 -0.661109941424121 -0.653574120838025 -0.645972943384489 -0.638307169174923 -0.630577564780361 -0.6227849031548 -0.61492996355791 -0.607013531477104 -0.599036398548993 -0.590999362480222 -0.582903226967701 -0.574748801618235 -0.566536901867562 -0.558268348898816 -0.549943969560401 -0.541564596283316 -0.533131066997904 -0.524644225050068 -0.516104919116928 -0.507514003121962 -0.498872336149612 -0.490180782359372 -0.481440210899379 -0.472651495819494 -0.463815515983903 -0.454933154983225 -0.446005301046158 -0.437032846950657 -0.428016689934653 -0.418957731606335 -0.409856877853987 -0.4007150387554 -0.391533128486865 -0.382312065231759 -0.373052771088721 -0.363756171979451 -0.354423197556112 -0.345054781108369 -0.33565185947006 -0.326215372925513 -0.316746265115518 -0.307245482942967 -0.297713976478158 -0.288152698863796 -0.278562606219673 -0.268944657547063 -0.259299814632819 -0.249629041953194 -0.239933306577397 -0.230213578070885 -0.220470828398411 -0.210706031826822 -0.200920164827639 -0.191114205979405 -0.181289135869835 -0.171445936997751 -0.161585593674839 -0.151709091927214 -0.141817419396819 -0.131911565242666 -0.121992520041915 -0.112061275690819 -0.102118825305538 -0.0921661631228261 -0.0822042844006063 -0.0722341853184498 -0.0622568628779564 -0.0522733148030557 -0.0422845394402358 -0.0322915356587087 -0.0222953027505254 -0.0122968403306463 -0.00229714823698153 0.00770277356959267 0.0177019251052289 0.0276993064631061 0.0376939179134197 0.0476847600033534 0.057670833657024 0.0676511402753878 0.0776246818360998 0.0875904609933152 0.097547481177423 0.107494746694702 0.117431262826891 0.127356035930656 0.137268073536958 0.147166384450295 0.157049978847826 0.166917868378347 0.176769066261127 0.186602587384589 0.196417448404813 0.206212667843878 0.215987266188002 0.225740265985496 0.235470691944507 0.245177571030549 0.254859932563802 0.264516808316181 0.274147232608159 0.283750242405331 0.29332487741472 0.302870180180804 0.312385196181261 0.32186897392242 0.331320565034411 0.340739024365997 0.350123410079095 0.359472783742954 0.368786210427998 0.37806275879932 0.387301501209813 0.396501513792935 0.405661876555096 0.414781673467651 0.423859992558509 0.432895926003327 0.441888570216291 0.450837025940472 0.459740398337755 0.46859779707832 0.477408336429674 0.486171135345224 0.494885317552381 0.503550011640186 0.51216435114645 0.520727474644402 0.529238525828828 0.537696653601701 0.546101012157294 0.554450761066753 0.562745065362146 0.570983095619956 0.579164028044022 0.587287044547918 0.595351332836764 0.60335608648845 0.611300505034283 0.619183794039028 0.627005165180353 0.634763836327664 0.642459031620309 0.650089981545174 0.657655923013623 0.665156099437816 0.672589760806361 0.679956163759314 0.687254571662519 0.694484254681269 0.701644489853285 0.708734561161018 0.715753759603245 0.722701383265971 0.72957673739262 0.736379134453508 0.743107894214598 0.749762343805522 0.756341817786864 0.762845658216711 0.769273214716438 0.775623844535753 0.781896912616965 0.788091791658494 0.794207862177599 0.800244512572323 0.806201139182658 0.812077146350908 0.81787194648125 0.823584960098503 0.829215615906064 0.834763350843045 0.840227610140576 0.84560784737728 0.850903524533917 0.856114112047185 0.861239088862674 0.866277942486973 0.87123016903892 0.876095273299986 0.880872768763799 0.885562177684794 0.890163031125986 0.894674869005866 0.899097240144405 0.903429702308175 0.907671822254569 0.911823175775129 0.915883347737962 0.919851932129254 0.923728532093874 0.927512759975056 0.931204237353166 0.934802595083541 0.938307473333407 0.94171852161786 0.945035398834914 0.948257773299612 0.951385322777192 0.954417734515313 0.957354705275328 0.960195941362608 0.962941158655912 0.9655900826358 0.968142448412079 0.9705980007503 0.972956494097275 0.975217692605635 0.977381370157412 0.979447310386656 0.981415306701065 0.983285162302647 0.9850566902074 0.98672971326401 0.988304064171566 0.989779585496289 0.991156129687276 0.992433559091255 0.99361174596635 0.994690572494856 0.995669930795018 0.996549722931823 0.997329860926789 0.998010266766769 0.998590872411745 0.999071619801636 0.999452460862103 0.999733357509359 0.999914281653972 0.999995215203679 0.999976150065192 0.999857088145009 0.999638041349223 0.999319031582331 0.998900090745045 0.998381260731097 0.997762593423059 0.997044150687144 0.996226004367027 0.99530823627666 0.994290938192086 0.993174211842266 0.991958168898903 0.99064293096528 0.989228629564094 0.987715406124306 0.986103411966998 0.984392808290245 0.982583766152986 0.98067646645793 0.978671099933455 0.976567867114544 0.974366978322725 0.972068653645044 0.969673122912053 0.967180625674829 0.964591411181018 0.961905738349913 0.959123875746559 0.956246101554897 0.953272703549948 0.950203979069036 0.947040234982051 0.943781787660766 0.940428962947197 0.936982096121021 0.933441531866049 0.929807624235756 0.926080736617876 0.922261241698066 0.918349521422635 0.91434596696035 0.910250978663321 0.906064966026967 0.901788347649061 0.897421551187878 0.892965013319425 0.888419179693776 0.883784504890503 0.879061452373227 0.874250494443262 0.869352112192392 0.864366795454761 0.859295042757887 0.854137361272815 0.848894266763394 0.843566283534706 0.838153944380635 0.832657790530585 0.82707837159536 0.821416245512206 0.815671978489013 0.809846144947694 0.803939327466751 0.797952116723008 0.79188511143255 0.785738918290852 0.779514151912104 0.773211434767759 0.766831397124277 0.760374676980107 0.753841920001883 0.747233779459858 0.740550916162579 0.733793998390808 0.726963701830691 0.720060709506193 0.713085711710792 0.706039405938456 0.69892249681389 0.691735696022077 0.684479722237106 0.677155301050309 0.669763164897701 0.662304052986738 0.654778711222394 0.647187892132575 0.639532354792865 0.631812864750617 0.624030193948403 0.616185120646817 0.608278429346653 0.600310910710451 0.592283361483435 0.584196584413839 0.576051388172631 0.567848587272646 0.55958900198714 0.551273458267758 0.542902787661942 0.534477827229777 0.525999419460286 0.517468412187181 0.508885658504079 0.500252016679196 0.491568350069521 0.482835527034478 0.474054420849093 0.465225909616667 0.456350876180967 0.447430208037939 0.438464797246966 0.429455540341653 0.420403338240185 0.411309096155228 0.402173723503411 0.392998133814388 0.383783244639481 0.374529977459929 0.365239257594737 0.355912014108151 0.346549179716747 0.337151690696161 0.327720486787465 0.318256511103189 0.308760710033015 0.299234033149138 0.289677433111308 0.280091865571563 0.270478289078669 0.260837664982266 0.251170957336729 0.241479132804767 0.231763160560755 0.222024012193824 0.212262661610692 0.202480084938284 0.192677260426115 0.182855168348468 0.173014790906364 0.163157112129348 0.153283117777083 0.143393795240776 0.133490133444439 0.123573122746 0.113643754838263 0.103703022649744 0.0937519202453802 0.0837914427271178 0.0738225861344087 0.0638463473446048 0.0538637239732715 0.0438757142744272 0.0338833170407184 0.0238875315035415 0.0138893572331205 0.00388979403855066 -0.0061101581321816 -0.0161094992921924 -0.0261072295156986 -0.0361023490380091 -0.046093858355501 -0.0560807583255688 -0.0660620502665378 -0.0760367360575317 -0.0860038182382836 -0.0959623001088813 -0.105911185829436 -0.115849480519668 -0.125776190358388 -0.135690322682885 -0.145590886088189 -0.15547689052621 -0.165347347404742 -0.175201269686322 -0.185037671986934 -0.194855570674545 -0.204653983967467 -0.214431932032538 -0.224188437083097 -0.233922523476772 -0.243633217813033 -0.253319549030541 -0.262980548504244 -0.272615250142247 -0.282222690482413 -0.291801908788717 -0.301351947147309 -0.310871850562312 -0.320360667051318 -0.329817447740585 -0.339241246959925 -0.348631122337269 -0.357986134892905 -0.367305349133372 -0.376587833145012 -0.38583265868716 -0.395038901284966 -0.404205640321841 -0.41333195913152 -0.422416945089729 -0.431459689705442 -0.440459288711733 -0.449414842156201 -0.458325454490964 -0.467190234662215 -0.476008296199323 -0.484778757303484 -0.493500740935896 -0.502173374905463 -0.510795791956016 -0.519367129853035 -0.527886531469873 -0.536353144873469 -0.544766123409536 -0.553124625787233 -0.561427816163287 -0.56967486422558 -0.577864945276177 -0.5859972403138 -0.59407093611572 -0.602085225319086 -0.610039306501657 -0.617932384261942 -0.625763669298742 -0.633532378490081 -0.641237734971512 -0.64887896821381 -0.656455314100016 -0.663966015001857 -0.671410319855501 -0.678787484236667 -0.686096770435062 -0.69333744752816 -0.700508791454285 -0.707610085085019 -0.714640618296918 -0.721599688042519 -0.728486598420647 -0.735300660746003 -0.742041193618033 -0.748707522989067 -0.755298982231723 -0.76181491220557 -0.768254661323039 -0.774617585614586 -0.780903048793085 -0.787110422317454 -0.793239085455515 -0.799288425346061 -0.805257837060144 -0.811146723661567 -0.816954496266577 -0.822680574102753 -0.828324384567084 -0.833885363283227 -0.839362954157943 -0.84475660943671 -0.850065789758495 -0.855289964209691 -0.860428610377204 -0.865481214400701 -0.87044727102399 -0.875326283645548 -0.880117764368176 -0.884821234047797 -0.889436222341362 -0.893962267753887 -0.898398917684603 -0.902745728472213 -0.907002265439262 -0.9111681029356 -0.915242824380949 -0.919226022306559 -0.923117298395958 -0.926916263524779 -0.930622537799675 -0.934235750596308 -0.937755540596408 -0.941181555823909 -0.944513453680143 -0.947750900978101 -0.950893573975751 -0.953941158408412 -0.95689334952018 -0.959749852094405 -0.96251038048321 -0.965174658636055 -0.967742420127347 -0.970213408183075 -0.972587375706493 -0.974864085302828 -0.977043309303016 -0.979124829786474 -0.981108438602888 -0.98299393739303 -0.984781137608591 -0.986469860531039 -0.98805993728949 -0.989551208877593 -0.990943526169431 -0.992236749934435 -0.993430750851308 -0.994525409520951 -0.995520616478411 -0.996416272203821 -0.997212287132355 -0.997908581663183 -0.998505086167432 -0.99900174099515 -0.999398496481266 -0.999695312950564 -0.999892160721644 -0.999989020109892 -0.99998588142945 -0.999882744994185 -0.999679621117653 -0.999376530112073 -0.998973502286292 -0.998470577942758 -0.997867807373486 -0.99716525085503 -0.996362978642458 -0.99546107096232 -0.994459618004635 -0.993358719913863 -0.992158486778895 -0.990859038622046 -0.989460505387048 -0.987963026926058 -0.986366752985676 -0.984671843191965 -0.982878467034492 -0.980986803849378 -0.978997042801366 -0.976909382864901 -0.974724032804239 -0.972441211152564 -0.970061146190138 -0.967584075921475 -0.965010248051537 -0.962339919960966 -0.959573358680347 -0.956710840863502 -0.953752652759826 -0.950699090185666 -0.947550458494734 -0.944307072547576 -0.940969256680082 -0.937537344671059 -0.934011679708847 -0.930392614357006 -0.926680510519053 -0.922875739402279 -0.918978681480626 -0.914989726456637 -0.910909273222492 -0.906737729820113 -0.902475513400365 -0.898123050181337 -0.893680775405724 -0.889149133297302 -0.884528577016506 -0.879819568615113 -0.875022578990038 -0.870138087836248 -0.865166583598787 -0.860108563423936 -0.854964533109497 -0.849735007054215 -0.844420508206339 -0.839021568011322 -0.833538726358688 -0.82797253152803 -0.822323540134195 -0.816592317071613 -0.810779435457816 -0.80488547657612 -0.798911029817503 -0.79285669262166 -0.786723070417268 -0.780510776561434 -0.774220432278367 -0.767852666597254 -0.761408116289356 -0.754887425804334 -0.748291247205803 -0.741620240106125 -0.734875071600451 -0.728056416200011 -0.721164955764662 -0.714201379434706 -0.707166383561973 -0.700060671640186 -0.692884954234618 -0.685639948911028 -0.678326380163912 -0.67094497934405 -0.663496484585372 -0.655981640731148 -0.6484011992595 -0.640755918208259 -0.633046562099158 -0.625273901861384 -0.617438714754485 -0.60954178429064 -0.601583900156316 -0.593565858133295 -0.585488460019097 -0.577352513546803 -0.569158832304279 -0.560908235652823 -0.552601548645223 -0.544239601943258 -0.535823231734631 -0.527353279649348 -0.51883059267556 -0.510256023074861 -0.501630428297067 -0.492954670894467 -0.484229618435573 -0.475456143418357 -0.466635123183013 -0.457767439824211 -0.448853980102898 -0.439895635357619 -0.430893301415383 -0.421847878502081 -0.412760271152469 -0.403631388119706 -0.39446214228449 -0.385253450563763 -0.376006233819024 -0.366721416764239 -0.357399927873379 -0.348042699287563 -0.338650666721854 -0.32922476937168 -0.319765949818922 -0.310275153937653 -0.300753330799551 -0.291201432578997 -0.281620414457852 -0.272011234529945 + +# cos(x) +1 0.999950000416665 0.999800006666578 0.999550033748988 0.999200106660978 0.998750260394966 0.998200539935204 0.99755100025328 0.996801706302619 0.995952733011994 0.995004165278026 0.993956097956697 0.992808635853866 0.991561893714788 0.990215996212637 0.988771077936042 0.987227283375627 0.985584766909561 0.983843692788121 0.98200423511727 0.980066577841242 0.978030914724148 0.975897449330606 0.973666395005375 0.97133797485203 0.968912421710645 0.966389978134513 0.963770896365891 0.961055438310771 0.958243875512697 0.955336489125606 0.952333569885713 0.949235418082441 0.946042343528387 0.942754665528346 0.939372712847379 0.935896823677935 0.932327345606034 0.92866463557651 0.924909059857313 0.921060994002885 0.917120822816605 0.913088940312308 0.908965749674885 0.904751663219963 0.900447102352677 0.896052497525525 0.891568288195329 0.886994922779284 0.882332858610121 0.877582561890373 0.872744507645751 0.86781917967765 0.862807070514761 0.857708681363824 0.852524522059506 0.847255111013416 0.841900975162269 0.836462649915187 0.830940679100163 0.825335614909678 0.819648017845479 0.813878456662534 0.808027508312152 0.802095757884292 0.796083798549056 0.789992231497365 0.783821665880849 0.777572718750928 0.771246014997106 0.764842187284488 0.758361875990508 0.751805729140895 0.74517440234487 0.738468558729588 0.731688868873821 0.724836010740905 0.717910669610943 0.710913538012277 0.703845315652236 0.696706709347165 0.689498432951747 0.682221207287613 0.674875760071267 0.667462825841308 0.659983145884982 0.652437468164051 0.644826547240001 0.63715114419858 0.629412026573696 0.621609968270664 0.613745749488811 0.605820156643462 0.597833982287298 0.589788025031098 0.581683089463883 0.573519986072456 0.565299531160354 0.557022546766217 0.548689860581587 0.540302305868139 0.531860721374355 0.523365951251649 0.514818844969955 0.506220257232778 0.497571047891726 0.488872081860527 0.480124229028533 0.471328364173739 0.4624853668753 0.453596121425577 0.444661516741706 0.435682446276711 0.426659807930157 0.417594503958357 0.408487440884157 0.399339529406272 0.390151684308229 0.380924824366881 0.371659872260532 0.362357754476673 0.35301940121933 0.343645746316046 0.334237727124502 0.324796284438775 0.315322362395268 0.305816908378288 0.296280872925318 0.286715209631955 0.277120875056557 0.267498828624587 0.257850032532669 0.248175451652372 0.238476053433722 0.228752807808459 0.219006687093041 0.209238665891418 0.199449720997572 0.189640831297833 0.179812977672998 0.16996714290024 0.16010431155483 0.150225469911685 0.140331605846736 0.130423708738144 0.120502769367366 0.110569779820068 0.100625733386931 0.0906716244643086 0.0807084484547995 0.0707372016677018 0.0607588812193848 0.0507744849335781 0.0407850112415899 0.030791459082465 0.0207948278030913 0.0107961170582663 0.000796326710732153 -0.00920354326880945 -0.0192024929016938 -0.0291995223012899 -0.0391936317729888 -0.0491838219141717 -0.0591690937141495 -0.0691484486540633 -0.0791208888067352 -0.0890854169364603 -0.0990410365987293 -0.108986752239872 -0.118921569296614 -0.128844494295526 -0.138754534952379 -0.148650700271365 -0.158532000644199 -0.168397447949078 -0.178246055649493 -0.188076838892881 -0.19788881460911 -0.207681001608785 -0.217452420681366 -0.227202094693088 -0.236929048684676 -0.246632309968835 -0.256310908227524 -0.265963875608982 -0.275590246824514 -0.285189059245022 -0.294759352997262 -0.304300171059835 -0.313810559358884 -0.323289566863505 -0.332736245680847 -0.3421496511509 -0.351528841940961 -0.360872880139769 -0.370180831351288 -0.379451764788156 -0.388684753364753 -0.397878873789917 -0.407033206659267 -0.416146836547144 -0.425218852098153 -0.434248346118301 -0.44323441566571 -0.452176162140912 -0.461072691376713 -0.469923113727602 -0.47872654415872 -0.487482102334359 -0.496188912705998 -0.504846104599857 -0.513452812303959 -0.522008175154706 -0.530511337622944 -0.53896144939951 -0.54735766548027 -0.555699146250611 -0.563985057569408 -0.572214570852435 -0.58038686315522 -0.588501117255343 -0.596556521734157 -0.604552271057927 -0.612487565658382 -0.620361612012677 -0.628173622722736 -0.635922816593999 -0.643608418713537 -0.651229660527542 -0.658785779918184 -0.66627602127982 -0.673699635594557 -0.681055880507149 -0.688344020399234 -0.695563326462898 -0.70271307677355 -0.709792556362116 -0.716801057286538 -0.723737878702564 -0.730602326933832 -0.737393715541241 -0.744111365391588 -0.750754604725486 -0.757322769224539 -0.763815202077769 -0.770231254047302 -0.776570283533288 -0.78283165663806 -0.789014747229526 -0.795118937003779 -0.801143615546928 -0.80708818039614 -0.812952037099884 -0.818734599277376 -0.824435288677216 -0.830053535235216 -0.835588777131402 -0.841040460846196 -0.84640804121577 -0.85169098148656 -0.856888753368941 -0.862000837090058 -0.867026721445797 -0.871965903851911 -0.876817890394275 -0.88158219587828 -0.886258343877346 -0.890845866780571 -0.895344305839486 -0.899753211213935 -0.904072142017055 -0.908300666359364 -0.912438361391952 -0.916484813348764 -0.920439617587975 -0.924302378632458 -0.928072710209327 -0.931750235288567 -0.935334586120733 -0.938825404273731 -0.942222340668653 -0.945525055614691 -0.948733218843102 -0.951846509540237 -0.954864616379622 -0.957787237553085 -0.960614080800948 -0.963344863441239 -0.96597931239797 -0.968517164228442 -0.970958165149586 -0.973302071063344 -0.975548647581079 -0.977697670047009 -0.979748923560681 -0.98170220299845 -0.983557313034003 -0.98531406815788 -0.986972292696034 -0.988531820827393 -0.989992496600443 -0.991354173948823 -0.992616716705935 -0.993779998618553 -0.994843903359457 -0.995808324539059 -0.996673165716045 -0.997438340407017 -0.998103772095144 -0.998669394237812 -0.999135150273279 -0.999500993626327 -0.999766887712928 -0.999932805943894 -0.99999873172754 -0.999964658471342 -0.999830589582599 -0.999596538468086 -0.999262528532722 -0.99882859317722 -0.998294775794754 -0.997661129766619 -0.996927718456889 -0.996094615206083 -0.995161903323833 -0.994129676080549 -0.992998036698096 -0.991767098339468 -0.990436984097477 -0.989007826982437 -0.987479769908869 -0.985852965681208 -0.984127576978519 -0.982303776338237 -0.980381746138904 -0.97836167858194 -0.976243775672416 -0.974028249198858 -0.971715320712069 -0.969305221502968 -0.966798192579468 -0.964194484642373 -0.961494358060307 -0.958698082843677 -0.955805938617675 -0.952818214594314 -0.949735209543505 -0.946557231763186 -0.943284599048486 -0.939917638659948 -0.936456687290807 -0.932902091033315 -0.929254205344135 -0.925513395008796 -0.921680034105216 -0.917754505966288 -0.913737203141558 -0.909628527357958 -0.905428889479643 -0.901138709466903 -0.896758416334162 -0.892288448107083 -0.887729251778765 -0.883081283265042 -0.87834500735889 -0.873520897683954 -0.868609436647182 -0.863611115390583 -0.858526433742119 -0.853355900165717 -0.848100031710427 -0.842759353958712 -0.837334400973899 -0.831825715246765 -0.826233847641292 -0.820559357339581 -0.814802811785933 -0.808964786630107 -0.803045865669753 -0.797046640792034 -0.790967711914439 -0.784809686924791 -0.778573181620456 -0.772258819646768 -0.765867232434662 -0.759399059137533 -0.75285494656732 -0.746235549129829 -0.739541528759284 -0.732773554852147 -0.725932304200167 -0.719018460922709 -0.712032716398338 -0.704975769195686 -0.697848325003592 -0.690651096560537 -0.683384803583366 -0.676050172695322 -0.668647937353382 -0.661178837774911 -0.653643620863643 -0.64604304013499 -0.638377855640691 -0.630648833892808 -0.622856747787074 -0.615002376525607 -0.607086505538988 -0.599109926407719 -0.591073436783066 -0.582977840307294 -0.574823946533304 -0.56661257084368 -0.558344534369146 -0.550020663906461 -0.541641791835735 -0.533208756037192 -0.524722399807384 -0.516183571774863 -0.507593125815316 -0.49895192096618 -0.490260821340739 -0.481520696041713 -0.47273241907435 -0.463896869259021 -0.455014930143346 -0.446087489913834 -0.437115441307069 -0.428099681520436 -0.419041112122398 -0.409940638962349 -0.400799172080019 -0.391617625614479 -0.382396917712725 -0.373137970437862 -0.363841709676903 -0.354509065048177 -0.345140969808369 -0.335738360759197 -0.32630217815373 -0.316833365602365 -0.307332869978467 -0.297801641323681 -0.288240632752929 -0.278650800359102 -0.269033103117448 -0.259388502789675 -0.24971796382778 -0.240022453277599 -0.230302940682109 -0.220560397984469 -0.21079579943083 -0.201010121472911 -0.191204342670352 -0.181379443592863 -0.171536406722163 -0.161676216353738 -0.151799858498407 -0.141908320783726 -0.132002592355223 -0.122083663777486 -0.112152526935108 -0.102210174933496 -0.0922576019995656 -0.0822958033823164 -0.0723257752533085 -0.0623485146070466 -0.0523650191612809 -0.0423762872572365 -0.0323833177597798 -0.0223871099575331 -0.0123886634629465 -0.00238897811233749 0.00761094613409195 0.0176101092922504 0.0276075114541547 0.0376021528879198 0.047593034137731 0.0575791561237893 0.0675595202422176 0.0775331284649211 0.0874989834393889 0.0974560885884283 0.107403448209822 0.117340067575897 0.127264953032998 0.137177112100849 0.147075553571804 0.156959287609965 0.166827325850163 0.176678681496799 0.186512369422516 0.196327406266718 0.206122810533899 0.215897602691795 0.225650805269336 0.235381442954392 0.245088542691302 0.254771133778184 0.264428247963996 0.274058919545368 0.283662185463167 0.293237085398804 0.302782661870264 0.312297960327856 0.321782029249662 0.331233920236694 0.34065268810773 0.350037390993831 0.35938709043253 0.368700851461674 0.377977742712921 0.387216836504877 0.396417208935863 0.405577939976301 0.414698113560723 0.423776817679369 0.432813144469393 0.441806190305646 0.45075505589104 0.459658846346473 0.468516671300318 0.477327644977463 0.486090886287882 0.494805518914746 0.503470671402056 0.512085477241783 0.520649074960522 0.529160608205638 0.537619225830899 0.546024081981591 0.554374336179104 0.562669153404976 0.570907704184397 0.579089164669154 0.587212716720017 0.59527754798855 0.603282851998348 0.61122782822568 0.619111682179544 0.626933625481114 0.63469287594258 0.64238865764536 0.650020201017698 0.657586742911615 0.665087526679229 0.672521802248413 0.679888826197804 0.687187861831148 0.694418179250964 0.701579055431534 0.708669774291209 0.71568962676401 0.722637910870541 0.729513931788182 0.736317001920569 0.743046440966361 0.749701575987258 0.756281741475307 0.76278627941944 0.769214539371285 0.775565878510202 0.781839661707572 0.788035261590301 0.794152058603565 0.80018944107276 0.806146805264671 0.812023555447841 0.817819103952151 0.823532871227579 0.829164285902159 0.834712784839117 0.840177813193183 0.845558824466076 0.850855280561151 0.856066651837215 0.861192417161481 0.866232063961689 0.871185088277359 0.876050994810186 0.880829296973572 0.885519516941282 0.890121185695229 0.894633843072372 0.899057037810733 0.903390327594525 0.90763327909838 0.911785468030683 0.915846479176003 0.919815906436607 0.923693352873079 0.927478430744005 0.931170761544753 0.93476997604532 0.938275714327254 0.94168762581965 0.9450053693342 0.948228613099319 0.951357034793317 0.954390321576629 0.957328170123107 0.960170286650343 0.962916386949053 0.965566196411496 0.968119450058934 0.970575892568129 0.972935278296878 0.975197371308574 0.977361945395801 0.979428784102954 0.981397680747884 0.983268438442569 0.985040870112797 0.986714798516878 0.988290056263367 0.989766485827802 0.991143939568457 0.992422279741106 0.993601378512797 0.994681117974634 0.995661390153572 0.99654209702321 0.997323150513595 0.998004472520028 0.998585994910877 0.999067659534386 0.999449418224497 0.999731232805656 0.999913075096641 0.999994926913375 0.999976780070744 0.999858636383417 0.999640507665664 0.999322415730176 0.99890439238588 0.998386479434764 0.99776872866769 0.997051201859221 0.996233970761438 0.995317117096772 0.994300732549825 0.993184918758203 0.991969787302358 0.99065545969442 0.989242067366057 0.987729751655323 0.986118663792528 0.984408964885117 0.982600825901556 0.980694427654236 0.978689960781393 0.976587625728044 0.974387632725942 0.972090201772555 0.969695562609064 0.967203954697388 0.964615627196243 0.961930838936222 0.959149858393914 0.956272963665056 0.953300442436722 0.950232591958559 0.947069719013059 0.943812139884879 0.940460180329218 0.937014175539238 0.933474470112547 0.929841418016737 0.926115382553991 0.92229673632475 0.918385861190455 0.914383148235359 0.910288997727424 0.906103819078287 0.901828030802326 0.897462060474806 0.893006344689121 0.888461329013137 0.883827467944634 0.879105224865856 0.874295071997177 0.869397490349875 0.864412969678033 0.859342008429566 0.854185113696372 0.848942801163626 0.843615595058214 0.838204028096307 0.832708641430091 0.827129984593654 0.82146861544803 0.815725100125416 0.809900012972559 0.803993936493318 0.798007461290421 0.791941186006399 0.785795717263725 0.779571669604153 0.77326966542726 0.766890334928215 0.760434316034749 0.753902254343374 0.747294803054813 0.740612622908691 0.733856382117453 0.727026756299548 0.720124428411867 0.713150088681447 0.706104434536448 0.698988170536414 0.691802008301814 0.684546666442884 0.677222870487764 0.669831352809945 0.662372852555036 0.654848115566847 0.647257894312806 0.639602947808714 0.631884041542842 0.624101947399383 0.616257443581268 0.608351314532341 0.600384350858919 0.592357349250729 0.584271112401244 0.576126448927409 0.567924173288786 0.559665105706102 0.551350072079233 0.542979903904614 0.534555438192086 0.5260775173812 0.517546989256972 0.508964706865107 0.50033152842669 0.491648317252373 0.482915941656036 0.474135274867962 0.465307194947512 0.456432584695323 0.447512331565023 0.438547327574492 0.429538469216659 0.420486657369852 0.411392797207712 0.402257798108678 0.393082573565046 0.383868041091626 0.374615122133985 0.365324741976309 0.355997829648872 0.346635317835134 0.337238142778474 0.327807244188567 0.318343565147414 0.30884805201503 0.299321654334818 0.289765324738606 0.280180018851391 0.270566695195773 0.260926315096107 0.251259842582369 0.241568244293756 0.231852489382019 0.222113549414554 0.212352398277241 0.202570012077061 0.19276736904448 0.182945449435634 0.173105235434299 0.163247711053674 0.153373862037983 0.143484675763899 0.133581141141809 0.123664248516922 0.113734989570237 0.103794357219373 0.0938433455192826 0.0838829495628426 0.0739141653813487 0.0639379898449115 0.0539554205627713 0.0439674557835375 0.0339750942953648 0.023979335326075 0.0139811784432353 0.00398162345420231 -0.00601832969385814 -0.0160176810139645 -0.0260154305793174 -0.0360105786232919 -0.0460021256394127 -0.0559890724813046 -0.0659704204626058 -0.0759451714568359 -0.0859123279972077 -0.0958708933763732 -0.105819871746093 -0.115758268216821 -0.125685088957193 -0.135599341293406 -0.145500033808489 -0.15538617644144 -0.165256780586236 -0.175110859190686 -0.184947426855143 -0.194765499931036 -0.20456409661924 -0.214342237068252 -0.224098943472175 -0.233833240168499 -0.243544153735667 -0.253230713090414 -0.262891949584877 -0.272526897103457 -0.282134592159432 -0.291714073991302 -0.301264384658868 -0.31078456913902 -0.320273675421245 -0.329730754602822 -0.339154860983713 -0.348545052161133 -0.357900389123791 -0.367219936345786 -0.376502761880162 -0.385747937452101 -0.39495453855175 -0.404121644526672 -0.413248338673908 -0.422333708331649 -0.431376844970501 -0.440376844284335 -0.44933280628072 -0.45824383537092 -0.467109040459451 -0.475927535033192 -0.484698437250036 -0.493420870027068 -0.50209396112828 -0.51071684325179 -0.51928865411657 -0.527808536548678 -0.53627563856697 -0.5446891134683 -0.55304811991219 -0.56135182200496 -0.569599389383321 -0.577789997297408 -0.585922826693256 -0.593997064294702 -0.602011902684714 -0.609966540386133 -0.617860181941817 -0.625692037994188 -0.633461325364169 -0.641167267129495 -0.648809092702413 -0.656386037906734 -0.66389734505425 -0.671342263020506 -0.678720047319911 -0.686029960180181 -0.693271270616124 -0.700443254502729 -0.707545194647584 -0.714576380862594 -0.721536110034996 -0.728423686197672 -0.735238420598746 -0.741979631770457 -0.748646645597306 -0.755238795383464 -0.761755421919448 -0.768195873548034 -0.774559506229427 -0.78084568360566 -0.787053777064236 -0.793183165800981 -0.79923323688213 -0.805203385305616 -0.811093014061572 -0.81690153419203 -0.822628364849819 -0.828272933356643 -0.833834675260357 -0.839313034391405 -0.84470746291844 -0.850017421403102 -0.85524237885397 -0.860381812779653 -0.865435209241039 -0.870402062902696 -0.875281877083394 -0.880074163805783 -0.884778443845185 -0.889394246777515 -0.893921111026326 -0.898358583908967 -0.902706221681846 -0.90696358958481 -0.911130261884616 -0.915205821917506 -0.919189862130874 -0.923081984124017 -0.92688179868798 -0.930588925844474 -0.934202994883871 -0.93772364440228 -0.941150522337682 -0.94448328600514 -0.947721602131064 -0.950865146886541 -0.953913605919714 -0.95686667438722 -0.959724056984674 -0.962485467976196 -0.96515063122299 -0.967719280210951 -0.970191158077321 -0.972566017636373 -0.97484362140413 -0.977023741622114 -0.979106160280119 -0.981090669138016 -0.982977069746571 -0.984765173467297 -0.986454801491311 -0.988045784857219 -0.989537964468009 -0.990931191106966 -0.992225325452584 -0.993420238092509 -0.994515809536473 -0.995511930228243 -0.996408500556581 -0.9972054308652 -0.997902641461735 -0.998500062625707 -0.998997634615497 -0.99939530767432 -0.999693042035203 -0.999890807924956 -0.999988585567157 -0.999986365184123 -0.999884146997889 -0.999681941230189 -0.999379768101432 -0.998977657828678 -0.99847565062262 -0.99787379668356 -0.99717215619639 -0.996370799324575 -0.995469806203134 -0.994469266930627 -0.99336928156015 -0.992169960089321 -0.990871422449289 -0.989473798492735 -0.987977227980891 -0.98638186056956 -0.984687855794155 -0.98289538305374 -0.981004621594097 -0.979015760489796 -0.97692899862529 -0.974744544675025 -0.972462617082578 -0.970083444038805 -0.967607263459029 -0.965034322959243 -0.962364879831354 -0.95959920101745 -0.956737563083108 -0.953780252189736 -0.950727564065959 -0.947579803978045 -0.944337286699382 -0.941000336478993 -0.937569287009121 -0.934044481391853 -0.930426272104814 -0.926715020965917 -0.922911099097183 -0.919014886887629 -0.91502677395523 -0.910947159107956 -0.90677645030389 -0.902515064610439 -0.89816342816262 -0.893721976120452 -0.889191152625437 -0.884571410756151 -0.879863212482928 -0.875067028621675 -0.87018333878678 -0.865212631343156 -0.860155403357406 -0.855012160548114 -0.849783417235275 -0.844469696288863 -0.839071529076544 -0.833589455410542 -0.828024023493654 -0.822375789864435 -0.81664531934154 -0.810833184967247 -0.804939967950148 -0.798966257607036 -0.792912651303966 -0.786779754396524 -0.78056818016929 -0.774278549774511 -0.767911492169984 -0.761467644056164 -0.754947649812493 -0.748352161432961 -0.741681838460911 -0.734937347923081 -0.728119364262904 -0.721228569273065 -0.714265652027321 -0.707231308811593 -0.700126243054342 -0.692951165256222 -0.685706792919033 -0.678393850473973 -0.671013069209192 -0.663565187196666 -0.656050949218389 -0.648471106691898 -0.640826417595128 -0.633117646390619 -0.625345563949068 -0.617510947472241 -0.609614580415257 -0.601657252408242 -0.593639759177366 -0.585562902465271 -0.577427489950896 -0.569234335168714 -0.560984257427376 -0.55267808172778 -0.544316638680575 -0.535900764423098 -0.527431300535761 -0.518909093957894 -0.510334996903055 -0.501709866773804 -0.493034566075965 -0.484309962332379 -0.47553692799615 -0.466716340363402 -0.457849081485545 -0.44893603808108 -0.439978101446919 -0.430976167369261 -0.421931136034011 -0.412843911936766 -0.403715403792362 -0.394546524444008 -0.385338190771997 -0.376091323602023 -0.366806847613097 -0.357485691245081 -0.348128786605844 -0.338737069378053 -0.329311478725605 -0.319852957199709 -0.310362450644636 -0.300840908103134 -0.291289281721521 -0.281708526654476 -0.272099600969522 -0.26246346555122 -0.252801084005081 -0.243113422561209 -0.233401449977675 -0.223666137443643 -0.213908458482255 -0.204129388853276 -0.194329906455518 -0.184510991229055 -0.174673625057229 -0.164818791668457 -0.154947476537868 -0.145060666788746 -0.13515935109383 -0.125244519576436 -0.115317163711455 -0.105378276226201 -0.0954288510011381 -0.0854698829704992 -0.075502368022788 -0.0655273029011929 -0.0555456851039136 -0.0455585127844118 -0.0355667846515969 -0.0255714998699557 -0.015573657959637 -0.00557425869650037 0.00442569798786072 0.0144252121061111 0.0244232837151718 0.0344189130162137 0.0444111004546363 0.0543988468200225 0.064381153346059 0.0743570218104117 0.0843254546345473 0.0942854549834904 0.104236026865506 0.114176175231698 0.124104906075514 0.134021226532142 0.143924144977801 0.153812671128899 0.163685816141061 0.173542592708013 0.183382015160312 0.193203099563914 0.203004863818561 0.212786327755996 0.222546513237977 0.232284444254089 0.241999147019346 0.251689650071565 0.261354984368519 0.27099418338483 0.280606283208631 0.290190322637948 0.299745343276827 0.309270389631164 0.318764509204263 0.328226752592078 0.337656173578155 0.347051829228253 0.356412779984638 0.365738089760033 0.375026826031234 0.384278059932352 0.393490866347708 0.402664324004337 0.411797515564118 0.420889527715506 0.429939451264863 0.438946381227375 0.447909416917552 0.456827662039293 0.465700224775519 0.47452621787735 0.48330475875283 0.492034969555188 0.500715977270617 0.509346913805582 0.51792691607362 0.526455126081656 0.534930691015794 0.543352763326605 0.551720500813876 0.560033066710831 0.568289629767807 0.57648936433538 0.584631450446925 0.592715073900617 0.600739426340847 0.608703705339057 0.616607114473984 0.624448863411302 0.63222816798265 0.639944250264056 0.64759633865372 0.655183667949181 0.662705479423831 0.670161020902792 0.677549546838128 0.684870318383403 0.692122603467563 0.699305676868143 0.70641882028379 0.713461322406088 0.720432478990695 0.727331592927761 0.734157974311642 0.740910940509888 0.747589816231506 0.754193933594491 0.76072263219261 0.767175259161442 0.77355116924367 0.779849724853596 0.78607029614091 0.792212261053666 0.798275005400491 0.804257922912004 0.810160415301437 0.815981892324472 0.821721771838258 0.827379479859625 0.832954450622487 0.838446126634413 0.843853958732379 0.84917740613768 0.854415936510013 0.859569026000707 0.864636159305105 0.8696168297141 0.874510539164803 0.879316798290345 0.884035126468819 0.888665051871341 0.893206111509227 0.897657851280298 0.902019826014286 0.906291599517354 0.910472744615711 0.914562843198331 0.918561486258764 0.922468273936036 0.926282815554637 0.930004729663581 0.93363364407456 0.937169195899158 0.940611031585137 0.943958806951797 0.947212187224393 0.950370847067606 0.953434470618086 0.95640275151603 0.959275392935822 0.962052107615714 0.964732617886552 0.967316655699543 0.969803962653058 0.972194290018475 0.974487398765049 0.976683059583817 0.978781052910527 0.980781168947593 0.98268320768508 0.984486978920698 0.986192302278827 0.987799007228553 0.989306933100718 0.990715929103994 0.992025854339952 0.993236577817163 0.994347978464286 0.995359945142183 0.99627237665503 0.997085181760435 0.997798279178566 0.998411597600275 0.998925075694231 0.999338662113052 0.999652315498441 0.999866004485321 0.999979707704972 0.999993413787166 0.999907121361306 0.999720839056563 0.999434585501012 0.999048389319771 0.998562289132135 0.997976333547719 0.997290581161592 0.996505100548421 0.995619970255614 0.994635278795462 0.99355112463629 0.992367616192611 0.991084871814283 0.989703019774675 0.98822219825784 0.986642555344694 0.984964248998213 0.983187447047633 0.981312327171669 0.979339076880745 0.977267893498246 0.975098984140784 0.972832565697488 0.970468864808314 0.96800811784138 0.965450570869333 0.962796479644738 0.960046109574506 0.957199735693353 0.954257642636294 0.951220124610184 0.948087485364293 0.944860038159936 0.941538105739144 0.938122020292391 0.934612123425374 0.931008766124855 0.927312308723562 0.923523120864154 0.91964158146226 0.915668078668585 0.911603009830098 0.907446781450294 0.903199809148548 0.898862517618552 0.894435340585843 0.889918720764435 0.885313109812548 0.880618968287438 0.875836765599346 0.870966979964556 0.866010098357572 0.860966616462426 0.855837038623103 0.850621877793113 0.845321655484192 0.839936901714156 0.834468154953893 0.828915962073523 0.823280878287707 0.817563467100127 0.811764300247137 0.805883957640591 0.799923027309848 0.793882105342975 0.787761795827133 0.781562710788175 0.775285470129438 0.768930701569758 0.762499040580693 0.755991130322985 0.749407621582234 0.74274917270383 0.736016449527111 0.729210125318784 0.722330880705598 0.715379403606283 0.708356389162754 0.701262539670604 0.69409856450887 0.686865180069099 0.679563109683707 0.672193083553647 0.664755838675391 0.657252118767228 0.649682674194898 0.642048261896548 0.634349645307047 0.626587594281638 0.618762885018955 0.610876299983405 0.602928627826918 0.594920663310088 0.586853207222692 0.578727066303616 0.570543053160181 0.562301986186881 0.554004689483546 0.545651992772931 0.537244731317748 0.528783745837135 0.52026988242259 0.51170399245336 0.503086932511303 0.494419564295232 0.485702754534747 0.476937374903559 0.468124301932328 0.459264416921006 0.45035860585071 0.441407759295127 0.432412772331453 0.423374544450889 0.414293979468691 0.405171985433789 0.396009474537987 0.386807363024737 0.377566571097524 0.368288022827838 0.358972646062775 0.349621372332249 0.34023513675584 0.330814877949283 0.32136153793061 0.311876062025944 0.302359398774972 0.292812499836087 0.283236319891228 0.273631816550409 0.263999950255962 0.254341684186488 0.244657984160545 0.234949818540068 0.225218158133528 0.215463976098855 0.205688247846126 0.195891950940018 0.186076065002059 0.176241571612662 0.166389454212972 0.156520698006518 0.146636289860696 0.136737218208085 0.126824472947601 0.116899045345508 0.106961927936297 0.0970141144234263 0.0870565995799583 0.0770903791490792 0.067116449744527 0.0571358087509305 0.0471494542240719 0.037158384791082 0.0271635995505782 0.0171660979727557 0.00716687979944085 -0.00283305505588154 -0.0128327066080592 -0.02283107490027 -0.0328271601040165 -0.0428199626191085 -0.0528084831736218 -0.0627917229238247 -0.0727686835540614 -0.0827383673765831 -0.0926997774313156 -0.102651917585554 -0.112593792633578 -0.122524408396166 -0.132442771820017 -0.142347891077055 -0.152238775663608 -0.162114436499461 -0.171973886026758 -0.181816138308763 -0.191640209128451 -0.201445116086925 -0.211229878701661 -0.220993518504551 -0.230735059139752 -0.240453526461317 -0.250147948630613 -0.259817356213502 -0.269460782277283 -0.279077262487387 -0.288665835203805 -0.298225541577258 -0.307755425645072 -0.317254534426785 -0.326721918019432 -0.336156629692545 -0.345557725982819 -0.354924266788458 -0.364255315463187 -0.373549938909915 -0.382807207674042 -0.392026196036408 -0.401205982105857 -0.410345647911432 -0.41944427949417 -0.428500966998494 -0.437514804763202 -0.446484891412027 -0.455410329943781 -0.464290227822048 -0.47312369706444 -0.481909854331393 -0.490647821014504 -0.499336723324386 -0.507975692378047 -0.516563864285782 -0.525100380237557 -0.533584386588891 -0.542015034946218 -0.550391482251728 -0.55871289086767 -0.566978428660119 -0.575187269082182 -0.583338591256658 -0.591431580058122 -0.599465426194438 -0.607439326287688 -0.615352482954507 -0.623204104885822 -0.630993406925983 -0.638719610151279 -0.646381941947823 -0.653979636088823 -0.661511932811195 -0.668978078891544 -0.676377327721484 -0.683708939382297 -0.690972180718928 -0.698166325413295 -0.705290654056924 -0.712344454222888 -0.719327020537048 -0.726237654748591 -0.733075665799856 -0.739840369895435 -0.746531090570556 -0.753147158758727 -0.759687912858642 -0.766152698800343 -0.772540870110623 -0.778851787977673 -0.785084821314966 -0.791239346824363 -0.797314749058442 -0.803310420482042 -0.809225761533016 -0.81506018068219 -0.82081309449251 -0.826483927677389 -0.832072113158235 -0.837577092121157 -0.842998314072845 -0.848335236895621 -0.853587326901652 -0.858754058886313 -0.863834916180712 -0.868829390703352 -0.873736983010944 -0.878557202348347 -0.883289566697644 -0.887933602826343 -0.892488846334701 -0.896954841702165 -0.901331142332918 -0.905617310600544 -0.909812917891789 -0.91391754464942 -0.917930780414181 -0.921852223865841 -0.925681482863321 -0.929418174483914 -0.933061925061571 -0.936612370224271 -0.940069154930457 -0.943431933504537 -0.946700369671458 -0.949874136590326 -0.952952916887094 -0.955936402686298 -0.958824295641845 -0.961616306966845 -0.964312157462492 -0.966911577545984 -0.969414307277479 -0.971820096386088 -0.974128704294906 -0.976339900145066 -0.978453462818825 -0.980469180961678 -0.982386853003489 -0.984206287178653 -0.985927301545268 -0.987549724003332 -0.989073392311951 -0.990498154105564 -0.991823866909178 -0.993050398152619 -0.994177625183784 -0.995205435280909 -0.996133725663842 -0.996962403504316 -0.997691385935239 -0.998320600058976 -0.998849982954637 -0.999279481684376 -0.999609053298676 -0.999838664840651 -0.999968293349338 -0.999997925861994 -0.999927559415393 -0.99975720104612 -0.999486867789871 -0.999116586679746 -0.998646394743548 -0.998076339000077 -0.997406476454435 -0.996636874092316 -0.995767608873316 -0.994798767723232 -0.993730447525371 -0.992562755110865 -0.99129580724798 -0.989929730630447 -0.98846466186479 -0.986900747456665 -0.985238143796208 -0.983477017142401 -0.981617543606441 -0.979659909134132 -0.97760430948729 -0.975450950224167 -0.973200046678895 -0.970851823939952 -0.968406516827656 -0.96586436987068 -0.963225637281601 -0.960490582931479 -0.95765948032347 -0.954732612565476 -0.951710272341832 -0.948592761884044 -0.945380392940558 -0.942073486745593 -0.938672373987012 -0.935177394773256 -0.931588898599335 -0.927907244311875 -0.924132800073238 -0.920265943324702 -0.916307060748718 -0.912256548230247 -0.908114810817163 -0.903882262679758 -0.899559327069318 -0.8951464362758 -0.890644031584608 -0.886052563232459 -0.881372490362361 -0.876604280977701 -0.871748411895444 -0.866805368698453 -0.861775645686927 -0.856659745828976 -0.851458180710323 -0.846171470483145 -0.84080014381406 -0.835344737831257 -0.82980579807079 -0.824183878422018 -0.818479541072221 -0.812693356450381 -0.806825903170139 -0.800877767971931 -0.794849545664323 -0.788741839064521 -0.782555258938094 -0.776290423937901 -0.769947960542221 -0.763528502992108 -0.757032693227967 -0.750461180825362 -0.743814622930057 -0.737093684192301 -0.73029903670037 -0.723431359913349 -0.716491340593194 -0.709479672736053 -0.70239705750287 -0.695244203149266 -0.688021824954715 -0.680730645151018 -0.67337139285008 -0.665944803970998 -0.65845162116647 -0.650892593748534 -0.643268477613632 -0.635580035167023 -0.627828035246546 -0.620013253045733 -0.612136470036291 -0.604198473889958 -0.596200058399732 -0.588142023400498 -0.580025174689041 -0.571850323943468 -0.563618288642041 -0.555329891981429 -0.546985962794393 -0.538587335466898 -0.530134849854677 -0.521629351199248 -0.513071690043389 -0.504462722146084 -0.495803308396949 -0.487094314730142 -0.478336612037772 -0.469531076082812 -0.460678587411517 -0.451780031265379 -0.442836297492596 -0.433848280459093 -0.424816878959084 -0.415742996125191 -0.406627539338137 -0.397471420136004 -0.388275554123083 -0.379040860878312 -0.369768263863318 -0.360458690330078 -0.351113071228186 -0.341732341111764 -0.332317438046008 -0.322869303513376 -0.313388882319451 -0.30387712249845 -0.294334975218429 -0.284763394686165 -0.275163338051734 -0.265535765312799 -0.255881639218613 -0.246201925173739 -0.236497591141515 -0.226769607547257 -0.217018947181219 -0.207246585101311 -0.197453498535598 -0.187640666784576 -0.177809071123241 -0.167959694702969 -0.158093522453191 -0.148211540982913 -0.138314738482045 -0.128404104622592 -0.118480630459678 -0.108545308332453 -0.0985991317648484 -0.088643095366233 -0.0786781947319499 -0.0687054263437586 -0.0587257874701873 -0.0487402760668069 -0.0387498906764366 -0.0287556303292902 -0.0187584944430737 -0.00875948272304495 0.00124040493795654 0.0112401685594979 0.0212388081735501 0.0312353239244839 0.0412287161690546 0.0512179855763655 0.0612021332278003 0.071180160716914 0.0811510702492725 0.0911138647422318 0.101067547924645 0.111011124436488 0.120943599928397 0.130863981161098 0.140771276104737 0.150664494038074 0.16054264564756 0.170404743126267 0.180249800272665 0.190076832589243 0.199884857380959 0.209672893853507 0.219439963211397 0.229185088755831 0.238907295982377 0.248605612678413 0.258279069020353 0.267926697670621 0.277547533874395 0.28714061555607 0.296704983415472 0.306239681023786 0.315743754919196 0.325216254702234 0.334656233130813 0.344062746214959 0.353434853311202 0.362771617216641 0.372072104262668 0.381335384408327 0.390560531333324 0.399746622530653 0.408892739398851 0.417997967333851 0.427061395820448 0.436082118523347 0.445059233377794 0.453991842679785 0.462879053175833 0.471719976152294 0.480513727524239 0.489259427923858 0.4979562027884 0.506603182447625 0.515199502210773 0.523744302453032 0.532236728701497 0.540675931720621 0.549061067597135 0.557391297824439 0.565665789386451 0.573883714840911 0.582044252402122 0.590146586023128 0.598189905477319 0.606173406439452 0.614096290566084 0.621957765575405 0.629757045326464 0.637493349897786 0.645165905665362 0.652773945380007 0.660316708244091 0.667793439987612 0.675203392943627 0.682545826123016 0.689820005288578 0.69702520302846 0.704160698828891 0.711225779146238 0.718219737478357 0.725141874435242 0.731991497808966 0.7387679226429 0.745470471300208 0.75209847353161 0.758651266542404 0.765128195058752 0.771528611393198 0.777851875509444 0.784097355086346 0.790264425581152 0.796352470291951 0.802360880419346 0.808289055127331 0.814136401603375 0.819902335117703 0.825586279081769 0.831187665105913 0.836705933056201 0.842140531110436 0.847490915813341 0.852756552130905 0.857936913503883 0.863031481900457 0.868039747868031 0.872961210584182 0.87779537790674 0.882541766423 0.887199901498068 0.891769317322316 0.896249556957971 0.900640172384802 0.904940724544926 0.90915078338671 0.913269927907778 0.917297746197111 0.921233835476237 0.925077802139508 0.92882926179346 0.932487839295254 0.93605316879019 0.939524893748288 0.942902666999946 0.946186150770653 0.94937501671477 0.952468945948358 0.955467629081073 0.958370766247099 0.961178067135141 0.963889251017449 0.966504046777893 0.969022192939076 0.971443437688482 0.973767538903652 0.975994264176401 0.978123390836059 0.980154705971734 0.982088006453604 0.983923098953233 0.985659799962899 0.98729793581395 0.988837342694164 0.990277866664138 0.991619363672674 0.99286169957119 0.99400475012713 0.995048401036392 0.995992547934754 0.996837096408315 0.997581962002929 0.998227070232658 0.998772356587217 0.999217766538425 0.999563255545658 0.999808789060302 0.999954342529212 0.999999901397162 0.999945461108302 0.999791027106616 0.999536614835376 0.999182249735597 0.998727967243494 0.998173812786936 0.997519841780909 0.996766119621967 0.995912721681699 0.994959733299187 0.993907249772475 0.99275537634904 0.991504228215263 0.990153930484915 0.988704618186644 0.987156436250472 0.985509539493303 0.983764092603439 0.981920270124116 0.979978256436044 0.977938245738975 0.975800442032278 0.973565059094541 0.971232320462197 0.968802459407164 0.966275718913523 0.963652351653218 0.960932619960788 0.958116795807137 0.955205160772333 0.952198006017453 0.949095632255468 0.945898349721167 0.94260647814014 0.939220346696801 0.935740294001474 0.932166668056528 0.928499826221579 0.924740135177755 0.920887970891028 0.916943718574615 0.912907772650463 0.908780536709799 0.904562423472778 0.90025385474721 0.895855261386376 0.891367083245947 0.886789769139997 0.882123776796122 0.877369572809668 0.872527632597072 0.86759844034832 0.862582488978529 0.857480280078657 0.852292323865342 0.847019139129881 0.841661253186354 0.836219201818891 0.830693529228092 0.825084787976613 0.819393538933905 0.813620351220129 0.807765802149246 0.801830477171283 0.795814969813793 0.789719881622499 0.783545822101141 0.777293408650524 0.770963266506785 0.764556028678863 0.758072335885201 0.751512836489674 0.744878186436758 0.738169049185928 0.731386095645317 0.724530004104629 0.717601460167303 0.71060115668196 0.703529793673114 0.696388078271173 0.689176724641727 0.681896453914129 0.674547994109384 0.66713208006735 0.659649453373251 0.65210086228352 0.644487061650977 0.636808812849339 0.629066883697089 0.621262048380689 0.613395087377168 0.605466787376071 0.597477941200789 0.589429347729284 0.581321811814196 0.573156144202359 0.564933161453731 0.556653685859733 0.548318545361026 0.539928573464713 0.531484609160993 0.522987496839259 0.514438086203663 0.505837232188143 0.497185794870934 0.488484639388558 0.479734635849312 0.470936659246259 0.462091589369727 0.453200310719334 0.444263712415533 0.43528268811071 0.42625813589981 0.417190958230535 0.408082061813094 0.398932357529539 0.389742760342673 0.380514189204558 0.371247566964616 0.36194382027735 0.352603879509675 0.343228678647885 0.333819155204252 0.324376250123281 0.314900907687611 0.305394075423588 0.295856704006516 0.286289747165591 0.276694161588523 0.267070906825874 0.257420945195101 0.247745241684325 0.238044763855834 0.228320481749327 0.218573367784913 0.208804396665863 0.19901454528115 0.189204792607753 0.179376119612766 0.169529509155298 0.159665945888188 0.149786416159543 0.139891907914105 0.129983410594451 0.120061915042056 0.110128413398209 0.100183899004796 0.0902293663049677 0.0802658107437002 0.0702942286682464 0.060315617228504 0.0503309742773016 0.0403412982706138 0.0303475881677167 0.0203508433312923 0.0103520634274937 0.000352248325979116 -0.00964760200007455 -0.0196464875739678 -0.0296434085154758 -0.0396373651408349 -0.049627358062711 -0.0596123882901367 -0.0695914573284103 -0.0795635672789438 -0.0895277209390521 -0.0994829219016727 -0.109428174655005 -0.119362484682062 -0.129284858560119 -0.139194304060057 -0.149089830245584 -0.158970447572328 -0.168835167986789 -0.178683005025147 -0.188512973911905 -0.198324091658364 -0.208115377160928 -0.217885851299205 -0.227634537033922 -0.237360459504631 -0.247062646127189 -0.256740126691019 -0.26639193345613 -0.276017101249887 -0.285614667563533 -0.295183672648434 -0.304723159612056 -0.314232174513651 -0.323709766459655 -0.33315498769877 -0.342566893716743 -0.351944543330816 -0.361286998783841 -0.37059332583806 -0.379862593868522 -0.389093875956149 -0.398286248980423 -0.407438793711703 -0.416550594903144 -0.425620741382218 -0.434648326141837 -0.443632446431048 -0.452572203845308 -0.461466704416325 -0.470315058701456 -0.479116381872644 -0.487869793804907 -0.496574419164346 -0.50522938749568 -0.513833833309287 -0.522386896167756 -0.53088772077193 -0.539335457046431 -0.547729260224673 -0.556068290933331 -0.564351715276285 -0.572578704918003 -0.580748437166376 -0.588860095054988 -0.59691286742481 -0.604905949005315 -0.612838540495006 -0.620709848641344 -0.628519086320075 -0.636265472613938 -0.643948232890759 -0.651566598880912 -0.659119808754148 -0.666607107195773 -0.674027745482183 -0.681380981555732 -0.688666080098942 -0.695882312608027 -0.703028957465752 -0.710105300013586 -0.717110632623171 -0.724044254767084 -0.730905473088888 -0.73769360147247 -0.744407961110646 -0.75104788057305 -0.757612695873267 -0.764101750535239 -0.770514395658906 -0.776849989985101 -0.78310789995967 -0.789287499796831 -0.795388171541749 -0.801409305132335 -0.807350298460246 -0.813210557431101 -0.818989496023886 -0.824686536349557 -0.83030110870883 -0.835832651649147 -0.841280612020825 -0.846644445032365 -0.851923614304936 -0.857117591926011 -0.862225858502155 -0.867247903210969 -0.872183223852165 -0.877031326897794 -0.881791727541589 -0.886463949747454 -0.891047526297062 -0.895541998836577 -0.899946917922491 -0.904261843066566 -0.908486342779884 -0.912619994615993 -0.916662385213154 -0.920613110335677 -0.924471774914341 -0.928237993085904 -0.931911388231688 -0.935491593015239 -0.938978249419062 -0.942371008780422 -0.945669531826211 -0.948873488706873 -0.951982559029389 -0.954996431889318 -0.957914805901886 -0.960737389232123 -0.963463899624049 -0.966094064428897 -0.968627620632377 -0.971064314880981 -0.973403903507315 -0.975646152554465 -0.977790837799395 -0.979837744775368 -0.981786668793392 -0.98363741496269 -0.985389798210187 -0.987043643299018 -0.988598784846052 -0.990055067338432 -0.991412345149121 -0.992670482551469 -0.993829353732784 -0.994888842806915 -0.995848843825836 -0.996709260790246 -0.997470007659165 -0.998131008358541 -0.998692196788853 -0.999153516831728 -0.999514922355544 -0.999776377220051 -0.99993785527998 -0.99999934038766 -0.999960826394631 -0.999822317152261 -0.999583826511358 -0.999245378320787 -0.998807006425086 -0.998268754661079 -0.997630676853494 -0.996892836809579 -0.996055308312725 -0.995118175115082 -0.994081530929191 -0.992945479418605 -0.991710134187529 -0.990375618769456 -0.988942066614817 -0.987409621077632 -0.985778435401178 -0.984048672702663 -0.982220505956915 -0.980294117979086 -0.978269701406368 -0.976147458678732 -0.973927602018681 -0.971610353410032 -0.969195944575714 -0.9666846169546 -0.964076621677357 -0.961372219541342 -0.958571680984513 -0.955675286058393 -0.95268332440006 -0.949596095203187 -0.946413907188122 -0.943137078571013 -0.939765937031992 -0.936300819682404 -0.932742073031095 -0.929090052949766 -0.925345124637381 -0.92150766258365 -0.917578050531582 -0.913556681439106 -0.909443957439781 -0.905240289802579 -0.900946098890761 -0.896561814119841 -0.89208787391464 -0.887524725665452 -0.8828728256833 -0.878132639154303 -0.873304640093166 -0.868389311295771 -0.863387144290902 -0.85829863929109 -0.853124305142596 -0.847864659274522 -0.842520227647073 -0.837091544698956 -0.831579153293943 -0.825983604666581 -0.82030545836707 -0.814545282205308 -0.808703652194111 -0.802781152491612 -0.796778375342845 -0.790695921020524 -0.784534397765013 -0.778294421723501 -0.771976616888393 -0.765581615034908 -0.759110055657902 -0.75256258590792 -0.74593986052648 -0.739242541780602 -0.73247129939658 -0.725626810493009 -0.718709759513075 -0.711720838156113 -0.704660745308433 -0.697530186973439 -0.69032987620102 -0.683060533016254 -0.675722884347401 -0.668317663953215 -0.660845612349562 -0.653307476735378 -0.645704010917941 -0.638035975237497 -0.630304136491224 -0.622509267856553 -0.614652148813853 -0.60673356506848 -0.59875430847221 -0.590715176944053 -0.582616974390462 -0.574460510624945 -0.566246601287081 -0.557976067760958 -0.549649737093038 -0.541268441909449 -0.532833020332724 -0.524344315897992 -0.515803177468622 -0.50721045915134 -0.498567020210817 -0.489873724983744 -0.481131442792399 -0.472341047857716 -0.463503419211864 -0.454619440610343 -0.445690000443608 -0.436715991648236 -0.427698311617628 -0.418637862112273 -0.40953554916957 -0.400392283013228 -0.391208977962244 -0.381986552339471 -0.372725928379784 -0.363428032137864 -0.354093793395585 -0.344724145569044 -0.335320025615215 -0.325882373938257 -0.316412134295473 -0.306910253702935 -0.297377682340785 -0.287815373458214 -0.278224283278143 -0.268605370901597 -0.258959598211798 -0.249287929777977 -0.239591332758917 -0.22987077680624 -0.22012723396744 -0.210361678588683 -0.200575087217367 -0.190768438504476 -0.180942713106707 -0.171098893588412 -0.16123796432334 -0.151360911396201 -0.141468722504056 -0.13156238685755 -0.121642895081994 -0.111711239118298 -0.101768412123783 -0.0918154083728617 -0.0818532231576161 -0.0718828526882655 -0.0619052939935483 -0.0519215448210192 -0.0419326035372759 -0.0319394690281226 -0.0219431405986826 -0.0119446178734686 -0.00194490069642107 0.00805501096907534 0.0180541171401873 0.0280514179146304 0.038045913570658 0.0480366046670334 0.0580224921429725 0.0680025774180492 0.0779758624920527 0.0879413500447867 0.0978980435358004 0.107844947304042 0.117781066667424 0.127705408022289 0.137616978942773 0.147514788280043 0.157397846261414 0.167265164589323 0.17711575654016 0.18694863706294 0.196762822877803 0.206557332574346 0.216331186709763 0.226083407906784 0.235813020951417 0.245519052890464 0.255200533128822 0.264856493526532 0.274485968495603 0.284087995096562 0.293661613134751 0.303205865256343 0.312719797044081 0.322202457112713 0.331652897204134 0.341070172282212 0.350453340627286 0.35980146393034 0.369113607386835 0.378388839790185 0.387626233624879 0.396824865159232 0.405983814537754 0.415102165873142 0.424179007337859 0.433213431255324 0.442204534190674 0.451151417041107 0.460053185125794 0.468908948275345 0.477717820920824 0.486478922182308 0.495191375956972 0.503854311006698 0.512466861045201 0.521028164824653 0.529537366221812 0.537993614323628 0.546396063512338 0.554743873550025 0.563036209662643 0.571272242623489 0.579451148836132 0.587572110416766 0.595634315275999 0.603636957200065 0.611579235931441 0.61946035724887 0.627279533046791 0.635035981414137 0.642728926712537 0.650357599653872 0.657921237377204 0.665419083525064 0.672850388319085 0.680214408634982 0.687510408076858 0.69473765705085 0.701895432838083 0.708983019666943 0.715999708784654 0.722944798528151 0.729817594394247 0.736617409109082 0.743343562696853 0.749995382547804 0.756572203485495 0.763073367833312 0.769498225480239 0.775846133945863 0.782116458444629 0.788308571949312 0.794421855253722 0.800455697034623 0.806409493912864 0.812282650513719 0.818074579526423 0.823784701762901 0.829412446215688 0.834957250115028 0.840418558985151 0.845795826699723 0.851088515536452 0.856296096230865 0.861418048029233 0.866453858740644 0.871403024788224 0.876265051259491 0.881039451955851 0.885725749441212 0.890323475089732 0.894832169132676 0.899251380704398 0.903580667887423 0.907819597756641 0.911967746422597 0.916024699073881 0.919990050018609 0.923863402724991 0.927644369860984 0.931332573333025 0.934927644323841 0.938429223329329 0.941836960194505 0.945150514148523 0.948369553838749 0.951493757363896 0.954522812306216 0.957456415762738 0.960294274375562 0.96303610436119 0.96568163153891 0.968230591358208 0.970682728925227 0.973037799028252 0.975295566162236 0.977455804552348 0.979518298176549 0.981482840787194 0.98334923593166 0.985117296971988 0.986786847103547 0.988357719372715 0.989829756693575 0.99120281186362 0.992476747578479 0.993651436445641 0.994726760997199 0.995702613701593 0.996578896974366 0.997355523187922 0.998032414680285 0.998609503762872 0.999086732727254 0.999464053850932 0.99974142940211 0.999918831643462 0.999996242834913 0.999973655235407 0.999851071103687 0.999628502698063 0.99930597227519 0.998883512087841 0.998361164381684 0.997738981391054 0.997017025333731 0.996195368404719 0.995274092769026 0.994253290553449 0.993133063837359 0.991913524642492 0.990594794921754 0.989177006547016 0.987660301295934 0.986044830837771 0.984330756718225 0.98251825034328 0.980607492962063 0.97859867564872 0.976491999283309 0.97428767453171 0.971985921824561 0.969586971335215 0.967091062956722 0.96449844627784 0.961809380558076 0.959024134701762 0.956142987231161 0.95316622625862 0.950094149457756 0.946927064033689 0.943665286692322 0.94030914360867 0.936858970394246 0.933315112063496 0.929677922999299 0.925947766917532 0.922125016830693 0.918210055010606 0.91420327295019 0.910105071324313 0.905915859949722 0.901636057744063 0.89726609268399 0.892806401762369 0.888257430944574 0.883619635123896 0.878893478076054 0.874079432412812 0.869177979534727 0.864189609583 0.859114821390471 0.853954122431729 0.84870802877237 0.843377065017388 0.837961764258716 0.832462668021918 0.826880326212034 0.821215297058593 0.81546814705979 0.809639450925836 0.803729791521487 0.797739759807757 0.791669954782828 0.785520983422144 0.779293460617716 0.772988009116635 0.766605259458797 0.760145849913848 0.753610426417361 0.746999642506239 0.740314159253364 0.733554645201489 0.726721776296389 0.719816235819258 0.71283871431839 0.70578990954012 0.698670526359052 0.691481276707572 0.684222879504654 0.676896060583969 0.669501552621304 0.662040095061293 0.654512434043474 0.646919322327676 0.639261519218743 0.631539790490603 0.623754908309697 0.615907651157753 0.607998803753948 0.600029156976432 0.59199950778324 0.583910659132602 0.575763419902641 0.567558604810491 0.559297034330824 0.550979534613803 0.542606937402468 0.534180079949565 0.525699804933814 0.517166960375653 0.508582399552424 0.499946980913058 0.491261567992221 0.482527029323969 0.473744238354889 0.464914073356758 0.456037417338719 0.447115157958976 0.438148187436032 0.429137402459467 0.420083704100269 0.410987997720729 0.401851192883906 0.39267420326267 0.383457946548335 0.374203344358892 0.364911322146849 0.355582809106682 0.346218738081923 0.33682004547187 0.327387671137953 0.317922558309743 0.308425653490638 0.298897906363204 0.289340269694214 0.279753699239371 0.270139153647731 0.260497594365842 0.250829985541597 0.241137293927822 0.231420488785601 0.221680541787351 0.211918426919656 0.202135120385867 0.192331600508484 0.182508847631327 0.172667844021497 0.162809573771154 0.152935022699108 0.143045178252237 0.133141029406745 0.123223566569264 0.113293781477811 0.103352667102621 0.0934012175468481 0.0834404279471546 0.0734712943741999 0.0634948137330336 0.0535119836634061 0.0435238024400055 0.0335312688726306 0.0235353822063111 0.0135371420213837 0.00353754813353505 -0.00646239950617898 -0.0164617009113277 -0.0264593561601034 -0.0364543654953124 -0.0464457294243504 -0.0564324488191506 -0.0664135250160958 -0.0763879599158838 -0.0863547560833367 -0.0963129168471432 -0.106261446399526 -0.116199349895819 -0.126125633553955 -0.13603930475384 -0.145939372136616 -0.155824845703793 -0.165694736916254 -0.175548058793101 -0.185383826010359 -0.195201054999502 -0.204998764045812 -0.214775973386549 -0.224531705308927 -0.234264984247883 -0.243974836883634 -0.253660292239009 -0.263320381776542 -0.272954139495331 -0.282560602027631 -0.292138808735195 -0.301687801805334 -0.311206626346698 -0.320694330484765 -0.330149965457028 -0.339572585707869 -0.348961248983116 -0.358315016424264 -0.367632952662365 -0.376914125911559 -0.386157608062257 -0.395362474773945 -0.404527805567623 -0.41365268391785 -0.422736197344394 -0.431777437503483 -0.440775500278635 -0.449729485871071 -0.458638498889693 -0.467501648440623 -0.476318048216293 -0.485086816584071 -0.493807076674429 -0.502477956468624 -0.511098588885902 -0.519668111870206 -0.528185668476378 -0.536650406955855 -0.545061480841844 -0.553418049033966 -0.561719275882364 -0.569964331271271 -0.578152390702021 -0.586282635375492 -0.594354252273992 -0.602366434242559 -0.610318380069672 -0.618209294567375 -0.626038388650794 -0.633804879417044 -0.641507990223522 -0.649146950765566 -0.656720997153487 -0.664229371988958 -0.671671324440754 -0.679046110319829 -0.686352992153742 -0.693591239260399 -0.70076012782112 -0.707858940953024 -0.714886968780713 -0.721843508507262 -0.728727864484494 -0.735539348282548 -0.742277278758722 -0.748940982125582 -0.755529792018345 -0.762043049561512 -0.768480103434757 -0.774840309938056 -0.781123033056059 -0.787327644521691 -0.793453523878974 -0.799500058545079 -0.805466643871577 -0.811352683204908 -0.817157587946043 -0.822880777609346 -0.828521679880619 -0.834079730674337 -0.839554374190052 -0.844945062967974 -0.850251257943718 -0.855472428502207 -0.860608052530738 -0.865657616471187 -0.870620615371367 -0.875496552935525 -0.880284941573968 -0.884985302451821 -0.889597165536914 -0.894120069646782 -0.898553562494784 -0.902897200735327 -0.907150550008209 -0.911313184982047 -0.915384689396811 -0.919364656105454 -0.92325268711462 -0.92704839362445 -0.930751396067455 -0.934361324146477 -0.937877816871716 -0.941300522596831 -0.9446290990541 -0.947863213388651 -0.951002542191748 -0.954046771533124 -0.956995596992384 -0.959848723689438 -0.962605866313994 -0.965266749154088 -0.967831106123652 -0.970298680789128 -0.972669226395103 -0.974942505888995 -0.977118291944747 -0.979196366985567 -0.981176523205682 -0.983058562591121 -0.984842296939514 -0.986527547878913 -0.988114146885626 -0.989601935301077 -0.990990764347663 -0.992280495143638 -0.993470998716995 -0.994562156018371 -0.995553857932944 -0.996446005291349 -0.997238508879593 -0.997931289447979 -0.998524277719027 -0.999017414394404 -0.999410650160853 -0.999703945695125 -0.999897271667911 -0.999990608746776 -0.999983947598089 -0.999877288887959 -0.999670643282168 -0.999364031445105 -0.998957484037699 -0.99845104171435 -0.99784475511887 -0.997138684879412 -0.996332901602412 -0.995427485865527 -0.994422528209576 -0.993318129129486 -0.992114399064245 -0.990811458385857 -0.989409437387304 -0.987908476269518 -0.986308725127358 -0.984610343934607 -0.982813502527969 -0.980918380590086 -0.978925167631574 -0.976834062972066 -0.974645275720287 -0.972359024753138 -0.96997553869381 -0.967495055888922 -0.964917824384689 -0.962244101902113 -0.959474155811214 -0.956608263104293 -0.953646710368232 -0.950589793755838 -0.947437818956223 -0.944191101164242 -0.940849965048968 -0.937414744721227 -0.933885783700191 -0.93026343487902 -0.926548060489579 -0.922740032066209 -0.91883973040858 -0.914847545543607 -0.910763876686451 -0.906589132200593 -0.902323729557003 -0.897968095292392 -0.893522664966555 -0.888987883118822 -0.884364203223597 -0.879652087645018 -0.874852007590715 -0.869964443064694 -0.864989882819335 -0.859928824306516 -0.854781773627871 -0.849549245484179 -0.844231763123894 -0.838829858290821 -0.833344071170942 -0.827774950338396 -0.822123052700627 -0.816388943442687 -0.810573195970726 -0.804676391854642 -0.798699120769935 -0.792641980438731 -0.786505576570016 -0.780290522799063 -0.773997440626069 -0.767626959354009 -0.761179716025701 -0.754656355360104 -0.74805752968785 -0.741383898886006 -0.734636130312091 -0.727814898737339 -0.720920886279225 -0.713954782333247 -0.706917283503997 -0.699809093535492 -0.692630923240806 -0.685383490430986 -0.678067519843274 -0.670683743068632 -0.663232898478584 -0.655715731151381 -0.648132992797491 -0.64048544168443 -0.632773842560936 -0.624998966580496 -0.617161591224229 -0.609262500223139 -0.601302483479744 -0.593282336989084 -0.585202862759126 -0.57706486873056 -0.568869168696006 -0.560616582218638 -0.552307934550228 -0.543944056548617 -0.535525784594637 -0.527053960508467 -0.518529431465457 -0.509953049911407 -0.501325673477325 -0.492648164893665 -0.483921391904054 -0.47514622717852 -0.466323548226221 -0.457454237307702 -0.448539181346662 -0.43957927184127 -0.430575404775007 -0.421528480527079 -0.412439403782371 -0.403309083440983 -0.394138432527341 -0.384928368098893 -0.375679811154408 -0.366393686541873 -0.357070922866011 -0.347712452395421 -0.33831921096935 -0.328892137904114 -0.319432175899164 -0.309940270942816 -0.300417372217657 -0.290864432005623 -0.281282405592774 -0.271672251173768 -0.262034929756036 -0.252371405063691 -0.242682643441149 -0.232969613756497 -0.22323328730461 -0.21347463771002 -0.203694640829553 -0.193894274654749 -0.184074519214057 -0.174236356474839 -0.16438077024517 -0.15450874607546 -0.144621271159899 -0.134719334237739 -0.124803925494422 -0.114876036462557 -0.104936659922777 -0.0949867898044507 -0.0850274210862996 -0.0750595496968958 -0.0650841724150717 -0.0551022867702427 -0.0451148909426552 -0.035122983663569 -0.0251275641153854 -0.01512963183173 -0.00513018659749929 0.004869771651116 0.0148692429266243 0.0248672272902309 0.0348627249518312 0.0448547363699884 0.0548422623518874 0.064824304153253 0.0747998635782233 0.0847679430791689 0.0947275458564462 0.104677675958077 0.114617338379344 0.124545539162286 0.1344612854951 0.144363585811415 0.154251449889451 0.164123888951041 0.173979915760506 0.183818544723377 0.193638791984957 0.203439675528704 0.213220215274431 0.222979433176313 0.232716353320693 0.24243000202367 0.25211940792847 0.261783602102575 0.271421618134623 0.281032492231041 0.290615263312428 0.300168973109664 0.309692666259728 0.319185390401242 0.328646196269703 0.338074137792409 0.347468272183062 0.356827660036053 0.366151365420396 0.375438455973322 0.384688002993515 0.393899081533981 0.403070770494541 0.412202152713944 0.421292315061575 0.430340348528776 0.43934534831974 0.448306413941992 0.457222649296437 0.46609316276697 0.474917067309637 0.483693480541334 0.492421524828055 0.501100327372642 0.509729020302075 0.51830674075425 0.52683263096427 0.53530583835022 0.543725515598421 0.552090820748165 0.560400917275909 0.568654974178925 0.5768521660584 0.584991673201978 0.593072681665726 0.601094383355534 0.609055976107917 0.616956663770234 0.624795656280303 0.632572169745405 0.640285426520674 0.64793465528686 0.655519091127462 0.663037975605214 0.670490556837936 0.677876089573715 0.685193835265431 0.692443062144613 0.699623045294615 0.706733066723105 0.713772415433864 0.720740387497889 0.727636286123778 0.734459421727417 0.741209112000931 0.747884681980916 0.754485464115939 0.761010798333286 0.767460032104973 0.773832520512997 0.780127626313828 0.786344720002133 0.792483179873722 0.798542392087724 0.804521750727967 0.810420657863569 0.816238523608734 0.821974766181734 0.827628811963093 0.833200095552944 0.83868805982757 0.844092155995119 0.849411843650475 0.854646590829307 0.85979587406126 0.8648591784223 0.869835997586212 0.874725833875226 0.879528198309788 0.884242610657457 0.888868599480926 0.893405702185169 0.897853465063696 0.902211443343924 0.906479201231659 0.910656311954667 0.914742357805358 0.918736930182551 0.922639629632337 0.926450065888024 0.93016785790916 0.933792633919644 0.937324031444893 0.940761697348098 0.944105287865534 0.947354468640936 0.950508914758932 0.953568310777541 0.95653235075971 0.95940073830391 0.962173186573778 0.964849418326796 0.967429165942021 0.969912171446839 0.972298186542771 0.974586972630293 0.976778300832706 0.978871952019015 0.980867716825846 0.982765395678381 0.984564798810316 0.986265746282839 0.987868068002619 0.989371603738818 0.990776203139118 0.992081725744748 0.993288041004535 0.994395028287959 0.995402576897214 0.996310586078279 0.997118965030992 0.997827632918131 0.998436518873499 0.998945562009007 0.999354711420766 0.999663926194176 0.999873175408016 0.999982438137541 0.999991703456568 0.999900970438573 0.999710248156782 0.999419555683264 0.999028922087025 0.998538386431099 0.997947997768642 0.997257815138028 0.996467907556946 0.995578354015496 0.99458924346829 0.993500674825559 0.992312756943259 0.99102560861219 0.989639358546111 0.988154145368874 0.98657011760056 0.984887433642625 0.983106261762062 0.981226780074575 0.979249176526767 0.977173648877344 0.975000404677343 0.972729661249371 0.97036164566588 0.967896594726454 0.965334754934133 0.962676382470762 0.959921743171371 0.957071112497595 0.954124775510126 0.951083026840208 0.947946170660171 0.944714520653022 0.941388399981066 0.9379681412536 0.934454086493646 0.930846587103752 0.92714600383085 0.923352706730185 0.919467075128304 0.915489497585131 0.911420371855104 0.907260104847406 0.903009112585271 0.898667820164383 0.894236661710365 0.889716080335371 0.885106528093771 0.880408465936948 0.875622363667203 0.870748699890774 0.865787961969977 0.860740645974471 0.855607256631648 0.850388307276166 0.845084319798611 0.839695824593311 0.834223360505296 0.828667474776415 0.823028722990612 0.817307669018364 0.811504884960301 0.805620951089995 0.799656455795928 0.79361199552266 0.787488174711181 0.781285605738468 0.775004908856251 0.768646712128984 0.76221165137104 0.755700370083134 0.749113519387967 0.742451757965121 0.735715751985186 0.728906175043148 0.722023708091024 0.715069039369776 0.70804286434048 0.700945885614784 0.693778812884646 0.686542362851366 0.679237259153919 0.671864232296585 0.664424019575906 0.656917365006954 0.649345019248932 0.641707739530103 0.634006289572076 0.626241439513429 0.618413965832696 0.610524651270724 0.602574284752393 0.594563661307731 0.586493581992406 0.578364853807624 0.570178289619432 0.561934708077424 0.553634933532886 0.545279795956355 0.536870130854627 0.528406779187204 0.5198905872822 0.511322406751709 0.502703094406643 0.494033512171054 0.485314526995941 0.476547010772556 0.467731840245215 0.458869896923624 0.449962066994732 0.441009241234107 0.432012314916866 0.422972187728141 0.41388976367312 0.404765950986639 0.395601662042362 0.386397813261548 0.377155325021406 0.367875121563056 0.358558130899111 0.349205284720874 0.339817518305168 0.330395770420813 0.320940983234744 0.311454102217801 0.301936076050181 0.292387856526569 0.282810398460959 0.273204659591178 0.263571600483108 0.253912184434631 0.244227377379304 0.234518147789762 0.224785466580871 0.215030307012643 0.205253644592905 0.195456456979752 0.185639723883781 0.17580442697012 0.165951549760266 0.156082077533728 0.146196997229505 0.136297297347389 0.12638396784912 0.116458000059385 0.106520386566692 0.0965721211241089 0.0866141985498901 0.0766476146279946 0.0666733660085091 0.0566924501079837 0.046705865009691 0.0367146093638188 0.0267196822876056 0.01672208326543 0.00672281204886293 -0.00327713144330675 -0.013276747225063 -0.0232750353431607 -0.0332709959771199 -0.0432636295392071 -0.0532519367743933 -0.0632349188602785 -0.0732115775069733 -0.0831809150569268 -0.0931419345846919 -0.103093639996616 -0.113035036130453 -0.122965128854871 -0.132882925168875 -0.142787433301097 -0.152677662808978 -0.162552624677809 -0.172411331419633 -0.18225279717199 -0.192076037796507 -0.201880070977307 -0.211663916319242 -0.221426595445931 -0.231167132097598 -0.240884552228693 -0.250577884105301 -0.260246158402314 -0.269888408300357 -0.279503669582477 -0.289090980730557 -0.298649383021472 -0.308177920622959 -0.317675640689198 -0.327141593456097 -0.336574832336267 -0.345974414013682 -0.355339398538006 -0.364668849418592 -0.373961833718125 -0.383217422145921 -0.392434689150849 -0.40161271301389 -0.410750575940305 -0.419847364151417 -0.428902167975986 -0.437914081941175 -0.446882204863096 -0.455805639936932 -0.464683494826611 -0.473514881754043 -0.482298917587893 -0.491034723931899 -0.499721427212706 -0.508358158767225 -0.516944054929498 -0.525478257117063 -0.533959911916814 -0.542388171170338 -0.550762192058733 -0.55908113718689 -0.567344174667227 -0.575550478202883 -0.583699227170343 -0.591789606701499 -0.599820807765142 -0.607792027247858 -0.61570246803434 -0.623551339087103 -0.631337855525582 -0.639061238704621 -0.646720716292339 -0.654315522347359 -0.661844897395407 -0.66930808850525 -0.676704349363997 -0.684032940351727 -0.691293128615447 -0.698484188142381 -0.70560539983257 -0.712656051570777 -0.719635438297706 -0.726542862080499 -0.733377632182534 -0.740139065132497 -0.746826484792728 -0.753439222426832 -0.759976616766558 -0.766438014077919 -0.772822768226568 -0.779130240742412 -0.785359800883454 -0.791510825698873 -0.797582700091312 -0.803574816878391 -0.809486576853426 -0.815317388845346 -0.821066669777811 -0.826733844727517 -0.832318346981693 -0.837819618094768 -0.843237107944213 -0.84857027478556 -0.853818585306568 -0.858981514680558 -0.864058546618895 -0.869049173422617 -0.873952896033203 -0.878769224082476 -0.883497675941647 -0.888137778769469 -0.892689068559526 -0.897151090186633 -0.901523397452344 -0.905805553129577 -0.909997129006333 -0.914097705928517 -0.918106873841853 -0.922024231832892 -0.925849388169098 -0.929581960338026 -0.933221575085569 -0.936767868453286 -0.940220485814795 -0.943579081911237 -0.946843320885801 -0.95001287631731 -0.953087431252862 -0.956066678239526 -0.958950319355085 -0.961738066237832 -0.9644296401154 -0.967024771832646 -0.96952320187856 -0.971924680412219 -0.974228967287772 -0.97643583207845 -0.978545054099615 -0.980556422430821 -0.982469735936912 -0.984284803288131 -0.986001442979256 -0.987619483347748 -0.989138762590919 -0.990559128782111 -0.991880439885887 -0.993102563772239 -0.994225378229797 -0.99524877097805 -0.996172639678577 -0.996996891945277 -0.99772144535361 -0.99834622744884 -0.998871175753278 -0.99929623777253 -0.999621371000749 -0.999846542924883 -0.999971731027927 -0.999996922791175 -0.999922115695472 -0.999747317221466 -0.999472544848857 -0.999097826054655 -0.998623198310425 -0.998048709078548 -0.997374415807468 -0.99660038592595 -0.995726696836336 -0.994753435906809 -0.993680700462649 -0.992508597776507 -0.991237245057676 -0.989866769440367 -0.988397307971001 -0.986829007594499 -0.985162025139592 -0.983396527303137 -0.981532690633446 -0.979570701512633 -0.977510756137975 -0.975353060502293 -0.973097830373353 -0.970745291272287 -0.968295678451045 -0.965749236868869 -0.963106221167794 -0.960366895647189 -0.957531534237322 -0.954600420471971 -0.951573847460071 -0.948452117856401 -0.945235543831319 -0.941924447039548 -0.938519158588007 -0.935020019002704 -0.931427378194681 -0.927741595425027 -0.923963039268945 -0.920092087578902 -0.916129127446843 -0.912074555165478 -0.907928776188656 -0.903692205090819 -0.899365265525548 -0.894948390183193 -0.890442020747607 -0.88584660785198 -0.88116261103377 -0.876390498688757 -0.871530748024197 -0.866583845011109 -0.86155028433567 -0.856430569349754 -0.851225212020593 -0.845934732879581 -0.840559660970225 -0.835100533795237 -0.829557897262783 -0.823932305631899 -0.81822432145706 -0.812434515531926 -0.806563466832266 -0.800611762458057 -0.794579997574776 -0.788468775353886 -0.782278706912515 -0.77601041125235 -0.769664515197732 -0.76324165333298 -0.756742467938928 -0.750167608928698 -0.743517733782713 -0.736793507482945 -0.729995602446422 -0.723124698457982 -0.716181482602298 -0.70916664919517 -0.702080899714092 -0.694924942728109 -0.687699493826955 -0.680405275549499 -0.673043017311491 -0.665613455332619 -0.65811733256289 -0.650555398608334 -0.642928409656045 -0.635237128398562 -0.627482323957602 -0.619664771807146 -0.611785253695895 -0.603844557569094 -0.595843477489739 -0.587782813559168 -0.57966337183706 -0.571485964260818 -0.563251408564388 -0.554960528196476 -0.546614152238209 -0.538213115320229 -0.529758257539227 -0.521250424373934 -0.512690466600578 -0.504079240207802 -0.495417606311071 -0.486706431066555 -0.477946585584519 -0.469138945842213 -0.46028439259627 -0.451383811294637 -0.442438091988026 -0.433448129240914 -0.424414822042083 -0.415339073714725 -0.406221791826111 -0.397063888096832 -0.387866278309628 -0.378629882217814 -0.369355623453302 -0.360044429434241 -0.350697231272271 -0.341314963679422 -0.331898564874632 -0.322448976489937 -0.312967143476299 -0.303454014009118 -0.293910539393414 -0.284337673968696 -0.274736375013527 -0.265107602649804 -0.255452319746738 -0.245771491824573 -0.236066086958035 -0.226337075679522 -0.216585430882055 -0.206812127721987 -0.19701814352149 -0.187204457670822 -0.177372051530389 -0.167521908332614 -0.157655013083606 -0.147772352464669 -0.137874914733628 -0.127963689626009 -0.118039668256064 -0.10810384301766 -0.0981572074850393 -0.088200756313468 -0.0782354851397657 -0.0682623904827454 -0.058282469643562 -0.0482967206059829 -0.0383061419365903 -0.0283117326849256 -0.0183144922835856 -0.00831542044827918 0.00168448292214256 0.0116842178456758 0.0216827843571613 0.03167918260828 0.0416724129675371 0.0516614761202244 0.0616453731683507 0.0716231057305312 0.0815936760418243 0.0915560870535078 0.101509342532782 0.111452447162395 0.121384406640167 0.131304227778429 0.141210918603333 0.151103488454052 0.160980948081845 0.17084230974898 0.180686587327508 0.190512796397875 0.200319954347362 0.210107080468348 0.219873196056375 0.229617324508024 0.239338491418569 0.24903572467942 0.258708054575333 0.268354513881377 0.277974137959661 0.287565964855793 0.297129035395078 0.306662393278429 0.316165085178004 0.325636160832531 0.335074673142338 0.344479678264058 0.353850235705017 0.36318540841728 0.372484262891355 0.381745869249543 0.390969301338927 0.400153636823984 0.409297957278818 0.418401348279005 0.427462899493031 0.436481704773325 0.445456862246876 0.454387474405415 0.463272648195168 0.472111495106161 0.480903131261068 0.489646677503601 0.49834125948642 0.506986007758574 0.51558005785244 0.524122550370168 0.532612631069627 0.541049450949821 0.549432166335794 0.557759938962991 0.566031936061091 0.574247330437276 0.582405300558955 0.590505030635915 0.598545710701897 0.606526536695595 0.614446710541061 0.62230544022751 0.630101939888522 0.637835429880629 0.645505136861275 0.653110293866154 0.660650140385904 0.668123922442155 0.67553089266293 0.682870310357379 0.690141441589849 0.697343559253277 0.704475943141896 0.711537880023263 0.718528663709573 0.725447595128285 0.732293982392021 0.739067140867762 0.745766393245302 0.752391069604989 0.758940507484705 0.765414051946121 0.771811055640185 0.778130878871859 0.784372889664086 0.790536463820989 0.796620984990288 0.802625844724936 0.808550442543965 0.814394185992529 0.820156490701153 0.825836780444169 0.831434487197336 0.836949051194642 0.842379920984284 0.847726553483809 0.852988414034422 0.858164976454453 0.863255723091973 0.868260144876562 0.873177741370211 0.878008020817368 0.882750500194115 0.887404705256465 0.891970170587791 0.896446439645365 0.90083306480601 0.905129607410866 0.909335637809253 0.913450735401637 0.917474488681687 0.921406495277428 0.925246361991478 0.928993704840364 0.932648149092926 0.936209329307783 0.93967688936988 0.943050482526102 0.946329771419945 0.94951442812525 0.952604134179003 0.955598580613172 0.95849746798561 0.961300506409994 0.964007415584818 0.96661792482142 0.969131773071053 0.971548708950986 0.973868490769644 0.976090886550781 0.978215674056668 0.980242640810327 0.982171584116772 0.984002311083278 0.985734638638675 0.987368393551651 0.988903412448076 0.99033954182734 0.991676638077701 0.992914567490649 0.994053206274274 0.995092440565646 0.996032166442203 0.99687228993214 0.997612727023808 0.998253403674115 0.998794255815929 0.999235229364487 0.999576280222803 0.999817374286073 0.999958487445094 0.999999605588666 0.999940724605009 0.999781850382173 0.999522998807447 0.999164195765774 0.998705477137159 0.998146888793081 0.997488486591911 0.996730336373319 0.995872513951695 0.994915105108568 0.993858205584023 0.992701921067131 0.991446367185382 0.990091669493118 0.988637963458977 0.987085394452353 0.985434117728852 0.98368429841477 0.981836111490582 0.979889741773438 0.977845383898689 0.975703242300419 0.973463531191002 0.971126474539682 0.968692306050179 0.966161269137311 0.963533616902661 0.960809612109263 0.957989527155326 0.955073644046996 0.952062254370153 0.948955659261255 0.945754169377225 0.942458104864384 0.939067795326435 0.935583579791507 0.932005806678251 0.928334833760996 0.924571028133974 0.920714766174613 0.916766433505893 0.912726424957793 0.9085951445278 0.904373005340514 0.900060429606336 0.895657848579245 0.891165702513675 0.886584440620489 0.881914521022059 0.877156410706454 0.872310585480739 0.867377529923399 0.862357737335879 0.857251709693255 0.852059957594035 0.846783000209104 0.841421365229801 0.835975588815158 0.830446215538278 0.82483379833188 0.819138898433008 0.813362085326906 0.807503936690071 0.801565038332484 0.795545984139034 0.789447376010122 0.783269823801479 0.777013945263179 0.770680365977863 0.76426971929818 0.757782646283457 0.751219795635588 0.744581823634171 0.737869394070873 0.731083178183057 0.724223854586657 0.717292109208316 0.710288635216796 0.703214132953659 0.696069309863237 0.688854880421884 0.681571566066533 0.67422009512255 0.666801202730902 0.659315630774648 0.651764127804743 0.644147448965194 0.636466355917535 0.628721616764672 0.620914005974065 0.613044304300288 0.605113298706949 0.597121782287999 0.589070554188419 0.580960419524312 0.572792189302384 0.564566680338851 0.556284715177755 0.54794712200871 0.539554734584086 0.53110839213563 0.52260893929055 0.514057225987047 0.505454107389325 0.496800443802074 0.488097100584442 0.479344948063498 0.4705448614472 0.461697720736877 0.452804410639227 0.443865820477849 0.43488284410431 0.425856379808762 0.416787330230112 0.407676602265761 0.398525106980912 0.389333759517469 0.380103479002518 0.370835188456418 0.361529814700501 0.352188288264387 0.342811543292937 0.333400517452833 0.323956151838816 0.314479390879578 0.304971182243317 0.295432476742973 0.285864228241149 0.276267393554719 0.266642932359157 0.25699180709256 0.247314982859412 0.237613427334075 0.227888110664014 0.218140005372793 0.208370086262817 0.198579330317856 0.188768716605346 0.178939226178482 0.169091841978116 0.159227548734461 0.149347332868622 0.139452182393952 0.129543086817252 0.119621037039823 0.109687025258373 0.0997420448658034 0.0897870903518652 0.0798231572037141 0.0698512418063618 0.059872341343038 0.0498874536954733 0.0398975773441119 0.0299037112682638 0.0199068548462087 0.00990800775525791 -9.18301282117572e-05 -0.0100916588287451 -0.0200904783718053 -0.0300872888837703 -0.0400810906919196 -0.0500708844244005 -0.0600556711101646 -0.0700344522788638 -0.0800062300606971 -0.0899700072861959 -0.0999247875859408 -0.109869575490198 -0.119803376528463 -0.129725197328911 -0.139634045717731 -0.14952893081834 -0.159408863150474 -0.169272854729133 -0.17911991916338 -0.188949071754977 -0.198759329596855 -0.208549711671405 -0.21831923894858 -0.228066934483791 -0.23779182351561 -0.247492933563236 -0.257169294523749 -0.266819938769117 -0.276443901242957 -0.286040219557042 -0.295607934087537 -0.305146088070963 -0.314653727699869 -0.324129902218216 -0.333573664016448 -0.342984068726256 -0.35236017531501 -0.361701046179865 -0.371005747241519 -0.380273348037619 -0.389502921815809 -0.398693545626402 -0.407844300414676 -0.416954271112777 -0.426022546731228 -0.435048220450024 -0.444030389709313 -0.452968156299656 -0.461860626451841 -0.470706910926263 -0.479506125101847 -0.488257389064508 -0.496959827695143 -0.50561257075714 -0.514214752983403 -0.522765514162879 -0.531263999226575 -0.539709358333067 -0.548100746953483 -0.556437325955951 -0.564718261689521 -0.572942726067519 -0.58110989665036 -0.589218956727793 -0.597269095400568 -0.605259507661525 -0.613189394476097 -0.621057962862211 -0.628864425969586 -0.636608003158415 -0.644287920077434 -0.65190340874135 -0.659453707607642 -0.666938061652717 -0.674355722447407 -0.681705948231813 -0.688988003989482 -0.696201161520907 -0.703344699516345 -0.710417903627951 -0.717420066541207 -0.724350488045657 -0.731208475104925 -0.737993341926022 -0.744704410027918 -0.751341008309397 -0.75790247311616 -0.764388148307195 -0.770797385320387 -0.777129543237376 -0.783383988847647 -0.789560096711852 -0.795657249224349 -0.80167483667497 -0.807612257309984 -0.813468917392274 -0.819244231260714 -0.824937621388729 -0.830548518442051 -0.83607636133565 -0.841520597289843 -0.846880681885573 -0.852156079118845 -0.857346261454334 -0.862450709878129 -0.867468913949644 -0.872400371852652 -0.877244590445473 -0.882001085310283 -0.886669380801562 -0.891249010093649 -0.895739515227431 -0.900140447156138 -0.904451365790244 -0.908671840041478 -0.912801447865932 -0.916839776306264 -0.920786421532997 -0.924640988884896 -0.928403092908437 -0.932072357396355 -0.935648415425258 -0.939130909392322 -0.942519491051054 -0.945813821546111 -0.949013571447189 -0.952118420781964 -0.955128059068091 -0.958042185344248 -0.960860508200236 -0.963582745806119 -0.966208625940405 -0.968737886017267 -0.971170273112807 -0.973505543990341 -0.975743465124729 -0.97788381272572 -0.97992637276034 -0.981870940974286 -0.983717322912358 -0.9854653339379 -0.987114799251268 -0.988665553907302 -0.990117442831832 -0.991470320837173 -0.992724052636653 -0.993878512858137 -0.994933586056564 -0.995889166725495 -0.996745159307658 -0.997501478204508 -0.998158047784786 -0.998714802392081 -0.999171686351397 -0.999528653974718 -0.999785669565579 -0.999942707422636 -0.999999751842233 -0.999956797119977 -0.999813847551303 -0.999570917431049 -0.999228031052026 -0.998785222702584 -0.998242536663191 -0.997600027201997 -0.996857758569413 -0.996015804991685 -0.995074250663468 -0.994033189739411 -0.992892726324738 -0.99165297446484 -0.99031405813387 -0.988876111222346 -0.987339277523761 -0.985703710720203 -0.983969574366991 -0.982137041876313 -0.980206296499893 -0.978177531310659 -0.976050949183438 -0.973826762774673 -0.97150519450115 -0.969086476517762 -0.966570850694291 -0.963958568591224 -0.961249891434594 -0.95844509008986 -0.955544445034818 -0.952548246331557 -0.94945679359745 -0.946270395975195 -0.942989372101899 -0.939614050077215 -0.936144767430531 -0.932581871087223 -0.928925717333955 -0.925176671783056 -0.921335109335957 -0.917401414145701 -0.913375979578529 -0.909259208174543 -0.905051511607453 -0.90075331064341 -0.896365035098928 -0.891887123797904 -0.887320024527737 -0.882664193994548 -0.877920097777511 -0.873088210282294 -0.86816901469362 -0.863163002926948 -0.858070675579284 -0.852892541879118 -0.847629119635506 -0.842280935186285 -0.836848523345445 -0.831332427349641 -0.825733198803877 -0.820051397626341 -0.814287591992417 -0.808442358277864 -0.802516281001184 -0.796509952765164 -0.790423974197624 -0.784258953891349 -0.778015508343232 -0.771694261892624 -0.765295846658903 -0.758820902478262 -0.752270076839721 -0.745644024820385 -0.738943409019936 -0.732168899494369 -0.725321173688991 -0.718400916370676 -0.71140881955939 -0.704345582458987 -0.697211911387291 -0.690008519705464 -0.682736127746671 -0.675395462744049 -0.66798725875798 -0.660512256602689 -0.652971203772163 -0.645364854365401 -0.637693969011005 -0.629959314791118 -0.622161665164715 -0.614301799890263 -0.606380504947738 -0.598398572460034 -0.590356800613747 -0.582255993579362 -0.57409696143083 -0.565880520064568 -0.557607491117865 -0.549278701886721 -0.54089498524312 -0.532457179551739 -0.523966128586115 -0.51542268144427 -0.506827692463797 -0.498182021136434 -0.489486532022107 -0.480742094662482 -0.471949583494008 -0.463109877760474 -0.454223861425088 -0.445292423082078 -0.436316455867836 -0.427296857371603 -0.418234529545712 -0.409130378615394 -0.399985314988156 -0.390800253162739 -0.381576111637671 -0.372313812819419 -0.363014282930145 -0.353678451915089 -0.344307253349572 -0.334901624345643 -0.325462505458362 -0.315990840591754 -0.306487576904411 -0.296953664714784 -0.287390057406145 -0.277797711331257 -0.268177585716733 -0.258530642567118 -0.248857846568687 -0.239160164992981 -0.229438567600075 -0.219694026541607 -0.209927516263562 -0.200140013408831 -0.190332496719541 -0.180505946939189 -0.170661346714564 -0.160799680497485 -0.150921934446356 -0.14102909632755 -0.131122155416635 -0.121202102399447 -0.11126992927302 -0.10132662924639 -0.0913731966412743 -0.0814106267926385 -0.0714399159491654 -0.0614620611736304 -0.0514780602431964 -0.0414889115496362 -0.031495613999495 -0.0214991669142002 -0.0115005699301299 -0.00150082289865029 0.00849907421386848 0.0184981214260484 0.0284953188415008 0.038489666748815 0.048480165721529 0.0584658167180708 0.0684456211816621 0.0784185811401732 0.0883836993059188 0.0983399791753867 0.108286425128887 0.118222042530112 0.128145837825603 0.138056818644099 0.147953993895777 0.157836373871361 0.167702970341087 0.177552796653531 0.18738486783427 0.197198200684379 0.206991813878751 0.216764728064227 0.226515965957534 0.236244552443008 0.245949514670107 0.255629882150697 0.265284686856096 0.274912963313878 0.284513748704423 0.294086082957192 0.303629008846736 0.313141572088418 0.322622821433842 0.332071808765974 0.341487589193955 0.350869221147589 0.360215766471498 0.369526290518939 0.378799862245265 0.388035554301032 0.397232443124732 0.406389609035144 0.41550613632331 0.424581113344098 0.433613632607368 0.44260279086872 0.45154768921982 0.460447433178287 0.46930113277714 0.478107902653799 0.486866862138615 0.495577135342937 0.504237851246705 0.512848143785545 0.521407151937379 0.529914019808523 0.538367896719281 0.546767937289004 0.555113301520638 0.563403154884711 0.571636668402798 0.579813018730407 0.587931388239318 0.595990965099347 0.603990943359524 0.611930523028688 0.619808910155491 0.627625316907783 0.635378961651404 0.64306906902834 0.650694870034263 0.658255602095427 0.665750509144925 0.673178841698299 0.680539856928484 0.687832818740091 0.695056997843015 0.702211671825368 0.709296125225713 0.716309649604613 0.723251543615476 0.730121113074684 0.736917671031018 0.743640537834344 0.750289041203585 0.756862516293945 0.763360305763392 0.769781759838395 0.776126236378896 0.782393100942529 0.788581726848059 0.794691495238055 0.800721795140767 0.806672023531231 0.812541585391567 0.818329893770479 0.824036369841953 0.829660442963138 0.835201550731408 0.840659139040604 0.846032662136443 0.851321582671093 0.856525371756908 0.861643509019316 0.866675482648857 0.871620789452359 0.876478934903265 0.881249433191077 0.885931807269942 0.890525588906354 0.895030318725978 0.899445546259585 0.903770829988102 0.90800573738676 0.912149844968348 0.916202738325562 0.920164012172443 0.924033270384907 0.927810126040359 0.931494201456379 0.935085128228495 0.938582547267024 0.941986108832976 0.94529547257303 0.948510307553571 0.951630292293779 0.95465511479778 0.957584472585845 0.960418072724636 0.963155631856499 0.965796876227805 0.968341541716315 0.970789373857603 0.973140127870493 0.975393568681544 0.977549470948552 0.979607619083087 0.981567807272051 0.983429839498258 0.985193529560037 0.986858701089852 0.988425187571938 0.989892832358951 0.991261488687637 0.992531019693502 0.993701298424504 0.994772207853746 0.995743640891177 0.996615500394302 0.997387699177897 0.998060160022729 0.998632815683272 0.999105608894439 0.999478492377301 0.999751428843821 0.999924391000581 0.999997361551508 0.999970333199608 0.999843308647694 0.999616300598116 0.999289331751488 0.998862434804424 0.998335652446262 0.997709037354799 0.996982652191022 0.996156569592842 0.99523087216783 0.994205652484958 0.99308101306534 0.99185706637198 0.990533934798527 0.989111750657037 0.987590656164738 0.985970803429812 0.984252354436183 0.982435481027318 0.980520364889043 0.978507197531378 0.976396180269379 0.974187524203014 0.971881450196049 0.969478188853963 0.966977980500887 0.964381075155574 0.961687732506393 0.958898221885366 0.956012822241229 0.953031822111543 0.949955519593836 0.946784222315797 0.94351824740451 0.940157921454746 0.936703580496299 0.933155569960385 0.929514244645103 0.925779968679949 0.921953115489408 0.918034067755609 0.914023217380061 0.909920965444458 0.905727722170576 0.901443906879248 0.897069947948432 0.892606282770377 0.888053357707882 0.883411628049657 0.878681557964802 0.873863620456382 0.868958297314134 0.863966079066284 0.858887464930497 0.853722962763954 0.848473089012568 0.843138368659339 0.837719335171858 0.832216530448956 0.826630504766521 0.820961816722466 0.815211033180871 0.809378729215299 0.803465488051285 0.797471901008018 0.791398567439208 0.785246094673151 0.779015097951996 0.772706200370223 0.766320032812333 0.759857233889759 0.753318449877009 0.746704334647034 0.740015549605846 0.733252763626375 0.726416652981584 0.71950790127684 0.712527199381556 0.705475245360104 0.69835274440201 0.691160408751435 0.683898957635951 0.676569117194616 0.669171620405367 0.66170720701172 0.654176623448792 0.646580622768664 0.638919964565075 0.631195414897461 0.623407746214352 0.615557737276126 0.607646173077136 0.599673844767208 0.591641549572529 0.583550090715927 0.575400277336543 0.567192924408924 0.558928852661524 0.55060888849463 0.542233863897725 0.533804616366291 0.525321988818056 0.516786829508706 0.50819999194706 0.499562334809717 0.490874721855194 0.482138021837546 0.473353108419495 0.464520860085062 0.45564216005172 0.446717896182073 0.437748960895071 0.42873625107677 0.41968066799064 0.410583117187443 0.40144450841468 0.39226575552561 0.383047776387876 0.373791492791708 0.364497830357753 0.355167718444509 0.345802090055392 0.336401881745438 0.326968033527643 0.317501488778968 0.308003194145999 0.298474099450283 0.288915157593351 0.27932732446142 0.269711558829816 0.260068822267087 0.250400079038855 0.240706296011385 0.230988442554902 0.221247490446653 0.211484413773732 0.20170018883567 0.191895794046807 0.182072209838453 0.17223041856084 0.162371404384897 0.152496153203824 0.14260565253451 0.132700891418781 0.122782860324493 0.112852551046492 0.10291095660743 0.0929590711584653 0.0829978898798508 0.0730284088814129 0.0630516251029437 0.0530685362145071 0.0430801405166726 0.0330874368406865 0.0230914244485891 0.0130931029332896 0.00309347211860763 -0.00690646804070828 -0.0169057175589755 -0.0269032765195749 -0.0368981451749416 -0.0468893240465392 -0.0568758140248064 -0.0668566164690675 -0.0768307333073954 -0.086797167136418 -0.0967549213210576 -0.106703000094194 -0.11664040865624 -0.12656615327462 -0.136479241383144 -0.146378681681262 -0.156263484233194 -0.166132660566922 -0.175985223773037 -0.185820188603428 -0.195636571569808 -0.205433391042061 -0.215209667346404 -0.224964422863353 -0.234696682125486 -0.244405471914986 -0.254089821360965 -0.263748762036549 -0.273381328055719 -0.2829865561699 -0.292563485864286 -0.302111159453888 -0.311628622179302 -0.321114922302189 -0.33056911120044 -0.339990243463044 -0.349377376984626 -0.358729573059657 -0.368045896476322 -0.377325415610043 -0.38656720251664 -0.395770333025124 -0.404933886830113 -0.414056947583862 -0.4231386029879 -0.432177944884253 -0.441174069346265 -0.450126076768986 -0.459033071959133 -0.467894164224612 -0.476708467463578 -0.485475100253054 -0.494193185937065 -0.502861852714309 -0.511480233725332 -0.520047467139215 -0.528562696239755 -0.537025069511139 -0.545433740723091 -0.553787869015497 -0.56208661898249 -0.570329160755989 -0.578514670088685 -0.586642328436466 -0.59471132304027 -0.602720847007362 -0.610670099392018 -0.618558285275626 -0.626384615846169 -0.634148308477113 -0.641848586805665 -0.649484680810408 -0.657055826888305 -0.664561267931059 -0.672000253400819 -0.679372039405236 -0.686675888771855 -0.693911071121825 -0.70107686294294 -0.708172547661989 -0.715197415716414 -0.722150764625264 -0.729031899059441 -0.735840130911236 -0.742574779363139 -0.749235170955916 -0.755820639655957 -0.762330526921882 -0.768764181770388 -0.775120960841351 -0.781400228462162 -0.787601356711292 -0.793723725481083 -0.79976672253976 -0.805729743592653 -0.811612192342626 -0.817413480549706 -0.823133028089907 -0.828770263013241 -0.834324621600913 -0.839795548421693 -0.845182496387459 -0.850484926807902 -0.855702309444399 -0.860834122563035 -0.865879852986774 -0.870838996146779 -0.875711056132865 -0.880495545743095 -0.885191986532495 -0.889799908860899 -0.894318851939914 -0.898748363878999 -0.90308800173065 -0.907337331534699 -0.911495928361707 -0.915563376355456 -0.919539268774536 -0.923423208033019 -0.927214805740215 -0.930913682739514 -0.934519469146298 -0.938031804384931 -0.941450337224816 -0.944774725815518 -0.948004637720948 -0.951139749952607 -0.954179749001885 -0.95712433087141 -0.959973201105448 -0.962726074819352 -0.965382676728042 -0.967942741173542 -0.970406012151542 -0.972772243336995 -0.975041198108755 -0.977212649573236 -0.979286380587101 -0.981262183778977 -0.983139861570191 -0.984919226194528 -0.986600099717009 -0.988182314051682 -0.989665710978433 -0.991050142158804 -0.992335469150832 -0.993521563422889 -0.994608306366535 -0.995595589308382 -0.996483313520958 -0.997271390232582 -0.99795974063624 -0.998548295897465 -0.999036997161221 -0.999425795557788 -0.999714652207652 -0.999903538225388 -0.999992434722552 -0.999981332809568 -0.999870233596618 -0.99965914819353 -0.99934809770867 -0.998937113246826 -0.998426235906103 -0.997815516773808 -0.997105016921346 -0.99629480739811 -0.995384969224376 -0.994375593383206 -0.99326678081134 -0.992058642389113 -0.99075129892936 -0.989344881165338 -0.98783952973765 -0.986235395180185 -0.984532637905062 -0.982731428186591 -0.98083194614424 -0.978834381724633 -0.976738934682545 -0.974545814560936 -0.972255240669989 -0.969867442065186 -0.967382657524396 -0.964801135524004 -0.962123134214057 -0.959348921392456 -0.95647877447817 -0.953512980483499 -0.950451835985371 -0.947295647095686 -0.944044729430702 -0.940699408079475 -0.937260017571355 -0.933726901842524 -0.930100414201613 -0.926380917294362 -0.922568783067364 -0.918664392730864 -0.914668136720642 -0.910580414658969 -0.906401635314644 -0.90213221656212 -0.897772585339714 -0.893323177606916 -0.88878443830079 -0.884156821291486 -0.879440789336848 -0.87463681403614 -0.869745375782891 -0.864766963716849 -0.859702075675072 -0.854551218142143 -0.849314906199524 -0.843993663474045 -0.838588022085545 -0.833098522593656 -0.827525713943755 -0.821870153412063 -0.816132406549918 -0.810313047127227 -0.804412657075081 -0.79843182642757 -0.792371153262773 -0.786231243642958 -0.780012711553969 -0.773716178843832 -0.767342275160573 -0.760891637889248 -0.754364912088207 -0.747762750424594 -0.741085813109071 -0.734334767829807 -0.727510289685704 -0.720613061118889 -0.713643771846471 -0.706603118791569 -0.699491806013622 -0.692310544637982 -0.685060052784801 -0.677741055497224 -0.670354284668879 -0.662900478970694 -0.655380383777027 -0.647794751091131 -0.640144339469953 -0.63242991394828 -0.624652245962235 -0.616812113272136 -0.608910299884718 -0.600947595974735 -0.592924797805943 -0.584842707651473 -0.576702133713604 -0.568503890042948 -0.560248796457039 -0.551937678458358 -0.543571367151776 -0.535150699161454 -0.526676516547174 -0.518149666720134 -0.509571002358213 -0.500941381320696 -0.492261666562498 -0.48353272604786 -0.474755432663559 -0.465930664131621 -0.457059302921544 -0.448142236162056 -0.439180355552402 -0.430174557273176 -0.4211257418967 -0.412034814296971 -0.402902683559174 -0.393730262888772 -0.384518469520188 -0.375268224625084 -0.365980453220239 -0.356656084075056 -0.347296049618677 -0.337901285846748 -0.328472732227819 -0.319011331609393 -0.309518030123648 -0.299993777092822 -0.29043952493428 -0.280856229065277 -0.271244847807413 -0.261606342290806 -0.251941676357974 -0.242251816467456 -0.232537731597168 -0.222800393147501 -0.213040774844186 -0.20325985264092 -0.193458604621772 -0.183638010903377 -0.173799053536923 -0.163942716409947 -0.154069985147949 -0.144181847015827 -0.134279290819154 -0.124363306805299 -0.114434886564399 -0.104495022930205 -0.0945447098807964 -0.0845849424391868 -0.0746167165738206 -0.0646410290989774 -0.0546588775750916 -0.0446712602089973 -0.034679175754108 -0.0246836234105424 -0.0146856027252055 -0.00468611349183397 0.00531384434898165 0.0153132708097906 0.0253111659562795 0.0353065300072654 0.0452983634346726 0.0552856670634848 0.0652674421716619 0.0752426905900112 0.0852104148020035 0.0951696180435241 0.105119304402548 0.115058478918731 0.124986147682904 0.134901317936463 0.144802998170646 0.154690198225681 0.164561929389801 0.174417204498116 0.18425503803133 0.194074446214285 0.203874447114347 0.213654060739592 0.223412309136808 0.233148216489287 0.242860809214406 0.252549116060987 0.262212168206419 0.27184899935354 0.281458645827265 0.291040146670956 0.300592543742512 0.310114881810187 0.319606208648109 0.329065575131505 0.338492035331607 0.347884646610252 0.357242469714139 0.366564568868755 0.375850011871954 0.385097870187173 0.394307219036288 0.403477137492087 0.412606708570366 0.421695019321627 0.430741160922366 0.439744228765963 0.448703322553136 0.457617546381972 0.466486008837516 0.475307823080914 0.484082106938092 0.492807982987977 0.501484578650234 0.51011102627253 0.518686463217289 0.527210031947963 0.535680880114783 0.544098160639991 0.552461031802549 0.560768657322309 0.569020206443642 0.577214854018513 0.585351780588993 0.593430172469206 0.601449221826695 0.609408126763208 0.617306091394882 0.625142325931838 0.63291604675715 0.640626476505215 0.648272844139483 0.655854385029563 0.663370341027683 0.670819960544507 0.678202498624292 0.685517217019381 0.69276338426403 0.699940275747554 0.707047173786785 0.714083367697842 0.721048153867196 0.727940835822035 0.734760724299907 0.741507137317648 0.748179400239577 0.754776845844963 0.761298814394744 0.767744653697498 0.774113719174668 0.780405373925013 0.786618988788302 0.792753942408225 0.798809621294533 0.804785419884385 0.8106807406029 0.81649499392292 0.822227598423958 0.827877980850341 0.833445576168535 0.838929827623648 0.844330186795105 0.849646113651488 0.854877076604542 0.860022552562331 0.865082026981546 0.870054993918963 0.874940956082032 0.879739424878607 0.884449920465808 0.889071971798002 0.893605116673907 0.898048901782813 0.902402882749912 0.906666624180737 0.910839699704696 0.914921692017715 0.918912192923965 0.92281080337668 0.926617133518064 0.930330802718275 0.933951439613486 0.937478682143027 0.940912177585583 0.944251582594472 0.947496563231974 0.950646795002732 0.953701962886192 0.956661761368113 0.959525894471112 0.962294075784266
\ No newline at end of file diff --git a/chart2/workbench/sampledata/data.chd b/chart2/workbench/sampledata/data.chd new file mode 100644 index 000000000..363cc3153 --- /dev/null +++ b/chart2/workbench/sampledata/data.chd @@ -0,0 +1,35 @@ +# -*- coding: utf-8; -*- +# +# Simple File-Data Format: +# all empty lines and lines beginning with a hash '#' are ignored +# then the following is read: +# - labels, one for each series +# - categories, for each element of all series +# - the series data +# + +# Series Labels + +Müsli Brot Milch + +# Categories + +Morgens Mittags Nachmittags Abends Nachts + +# Data + +# Series Müsli + +1 10 30 + +# Series Brot + +1 1 2 2 1 + +# Series Milch + +-3.5 6 4 1 + +# Series Marmelade + +-5 2 3 4 5 6 7 8 9 10 diff --git a/chart2/workbench/sampledata/default.chd b/chart2/workbench/sampledata/default.chd new file mode 100644 index 000000000..01888e4c1 --- /dev/null +++ b/chart2/workbench/sampledata/default.chd @@ -0,0 +1,14 @@ +# Series Labels +Column_1 Column_2 Column_3 + +# Categories +Row_1 Row_2 Row_3 Row_4 + +# Column 1 +9.1 2.4 3.1 4.3 + +# Column 2 +3.2 8.8 1.5 9.02 + +# Column 3 +4.54 9.65 3.7 6.2 diff --git a/chart2/workbench/sampledata/manyseries.chd b/chart2/workbench/sampledata/manyseries.chd new file mode 100644 index 000000000..ea7b0c293 --- /dev/null +++ b/chart2/workbench/sampledata/manyseries.chd @@ -0,0 +1,1006 @@ +# -*- coding: utf-8; -*- +# Series Labels +empty +# categories +0 +# series +0 0 1 +0,01 0,00999983333416667 0,999950000416665 +0,02 0,0199986666933331 0,999800006666578 +0,03 0,0299955002024957 0,999550033748988 +0,04 0,0399893341866342 0,999200106660978 +0,05 0,0499791692706783 0,998750260394966 +0,06 0,0599640064794446 0,998200539935204 +0,07 0,0699428473375328 0,99755100025328 +0,08 0,0799146939691727 0,996801706302619 +0,09 0,089878549198011 0,995952733011994 +0,1 0,0998334166468282 0,995004165278026 +0,11 0,109778300837175 0,993956097956697 +0,12 0,119712207288919 0,992808635853866 +0,13 0,129634142619695 0,991561893714788 +0,14 0,139543114644237 0,990215996212637 +0,15 0,149438132473599 0,988771077936042 +0,16 0,159318206614246 0,987227283375627 +0,17 0,169182349066996 0,985584766909561 +0,18 0,179029573425824 0,983843692788122 +0,19 0,188858894976501 0,98200423511727 +0,2 0,198669330795061 0,980066577841242 +0,21 0,2084598998461 0,978030914724148 +0,22 0,218229623080869 0,975897449330606 +0,23 0,227977523535188 0,973666395005375 +0,24 0,237702626427135 0,97133797485203 +0,25 0,247403959254523 0,968912421710645 +0,26 0,257080551892155 0,966389978134513 +0,27 0,266731436688831 0,963770896365891 +0,28 0,276355648564114 0,961055438310771 +0,29 0,285952225104836 0,958243875512697 +0,3 0,29552020666134 0,955336489125606 +0,31 0,305058636443443 0,952333569885713 +0,32 0,314566560616118 0,949235418082441 +0,33 0,324043028394868 0,946042343528387 +0,34 0,333487092140814 0,942754665528346 +0,35 0,342897807455451 0,939372712847379 +0,36 0,35227423327509 0,935896823677935 +0,37 0,361615431964962 0,932327345606035 +0,38 0,370920469412983 0,92866463557651 +0,39 0,380188415123161 0,924909059857313 +0,4 0,389418342308651 0,921060994002885 +0,41 0,398609327984423 0,917120822816605 +0,42 0,40776045305957 0,913088940312308 +0,43 0,416870802429211 0,908965749674885 +0,44 0,425939465066 0,904751663219963 +0,45 0,43496553411123 0,900447102352677 +0,46 0,44394810696552 0,896052497525525 +0,47 0,452886285379068 0,891568288195329 +0,48 0,461779175541483 0,886994922779284 +0,49 0,470625888171158 0,882332858610121 +0,5 0,479425538604203 0,877582561890373 +0,51 0,488177246882908 0,872744507645751 +0,52 0,496880137843737 0,86781917967765 +0,53 0,505533341204847 0,862807070514761 +0,54 0,514135991653113 0,857708681363824 +0,55 0,522687228930659 0,852524522059506 +0,56 0,531186197920883 0,847255111013416 +0,57 0,539632048733969 0,841900975162269 +0,58 0,548023936791874 0,836462649915187 +0,59 0,556361022912784 0,830940679100164 +0,6 0,564642473395035 0,825335614909678 +0,61 0,572867460100481 0,81964801784548 +0,62 0,581035160537305 0,813878456662534 +0,63 0,58914475794227 0,808027508312152 +0,64 0,597195441362392 0,802095757884293 +0,65 0,60518640573604 0,796083798549056 +0,66 0,613116851973434 0,789992231497365 +0,67 0,62098598703656 0,783821665880849 +0,68 0,628793024018469 0,777572718750928 +0,69 0,636537182221968 0,771246014997107 +0,7 0,644217687237691 0,764842187284488 +0,71 0,651833771021537 0,758361875990508 +0,72 0,659384671971473 0,751805729140895 +0,73 0,666869635003698 0,74517440234487 +0,74 0,674287911628145 0,738468558729588 +0,75 0,681638760023334 0,731688868873821 +0,76 0,688921445110551 0,724836010740905 +0,77 0,696135238627357 0,717910669610943 +0,78 0,70327941920041 0,710913538012277 +0,79 0,710353272417608 0,703845315652236 +0,8 0,717356090899523 0,696706709347165 +0,81 0,724287174370143 0,689498432951747 +0,82 0,731145829726896 0,682221207287614 +0,83 0,737931371109963 0,674875760071267 +0,84 0,744643119970859 0,667462825841308 +0,85 0,751280405140293 0,659983145884982 +0,86 0,757842562895277 0,652437468164052 +0,87 0,764328937025505 0,644826547240001 +0,88 0,770738878898969 0,63715114419858 +0,89 0,777071747526824 0,629412026573697 +0,9 0,783326909627483 0,621609968270664 +0,91 0,789503739689951 0,613745749488812 +0,92 0,795601620036366 0,605820156643463 +0,93 0,801619940883777 0,597833982287298 +0,94 0,807558100405114 0,589788025031098 +0,95 0,813415504789374 0,581683089463883 +0,96 0,819191568300998 0,573519986072457 +0,97 0,82488571333845 0,565299531160354 +0,98 0,830497370491971 0,557022546766217 +0,99 0,836025978600521 0,548689860581588 +1 0,841470984807897 0,54030230586814 +1,01 0,846831844618015 0,531860721374355 +1,02 0,852108021949363 0,52336595125165 +1,03 0,857298989188603 0,514818844969955 +1,04 0,862404227243338 0,506220257232778 +1,05 0,867423225594017 0,497571047891727 +1,06 0,872355482344986 0,488872081860528 +1,07 0,877200504274682 0,480124229028534 +1,08 0,881957806884948 0,47132836417374 +1,09 0,886626914449487 0,462485366875301 +1,1 0,891207360061435 0,453596121425577 +1,11 0,895698685680048 0,444661516741707 +1,12 0,900100442176505 0,435682446276712 +1,13 0,904412189378826 0,426659807930157 +1,14 0,908633496115883 0,417594503958358 +1,15 0,912763940260521 0,408487440884157 +1,16 0,916803108771767 0,399339529406273 +1,17 0,920750597736136 0,39015168430823 +1,18 0,92460601240802 0,380924824366882 +1,19 0,928368967249167 0,371659872260533 +1,2 0,932039085967226 0,362357754476674 +1,21 0,935616001553386 0,35301940121933 +1,22 0,939099356319068 0,343645746316047 +1,23 0,942488801931697 0,334237727124503 +1,24 0,945783999449539 0,324796284438776 +1,25 0,948984619355586 0,315322362395269 +1,26 0,952090341590516 0,305816908378289 +1,27 0,955100855584692 0,296280872925319 +1,28 0,958015860289225 0,286715209631955 +1,29 0,960835064206073 0,277120875056558 +1,3 0,963558185417193 0,267498828624587 +1,31 0,966184951612734 0,25785003253267 +1,32 0,968715100118265 0,248175451652373 +1,33 0,971148377921045 0,238476053433723 +1,34 0,973484541695319 0,228752807808459 +1,35 0,975723357826659 0,219006687093041 +1,36 0,977864602435316 0,209238665891419 +1,37 0,979908061398614 0,199449720997573 +1,38 0,98185353037236 0,189640831297834 +1,39 0,983700814811277 0,179812977672999 +1,4 0,98544972998846 0,169967142900241 +1,41 0,98710010101385 0,160104311554831 +1,42 0,98865176285172 0,150225469911686 +1,43 0,990104560337178 0,140331605846737 +1,44 0,991458348191686 0,130423708738146 +1,45 0,992712991037589 0,120502769367367 +1,46 0,993868363411645 0,11056977982007 +1,47 0,994924349777581 0,100625733386932 +1,48 0,99588084453764 0,0906716244643097 +1,49 0,996737752043143 0,0807084484548006 +1,5 0,997494986604055 0,0707372016677029 +1,51 0,998152472497548 0,0607588812193859 +1,52 0,998710143975583 0,0507744849335792 +1,53 0,999167945271476 0,040785011241591 +1,54 0,999525830605479 0,0307914590824661 +1,55 0,999783764189357 0,0207948278030924 +1,56 0,999941720229966 0,0107961170582674 +1,57 0,999999682931835 0,000796326710733263 +1,58 0,99995764649874 -0,00920354326880834 +1,59 0,999815615134291 -0,0192024929016927 +1,6 0,999573603041505 -0,0291995223012888 +1,61 0,99923163442139 -0,0391936317729877 +1,62 0,998789743470524 -0,0491838219141706 +1,63 0,998247974377632 -0,0591690937141484 +1,64 0,997606381319174 -0,0691484486540622 +1,65 0,996865028453919 -0,0791208888067341 +1,66 0,996023989916537 -0,0890854169364592 +1,67 0,99508334981018 -0,099041036598728 +1,68 0,994043202198076 -0,108986752239871 +1,69 0,992903651094118 -0,118921569296612 +1,7 0,991664810452469 -0,128844494295525 +1,71 0,990326804156158 -0,138754534952378 +1,72 0,988889766004701 -0,148650700271364 +1,73 0,987353839700717 -0,158532000644198 +1,74 0,985719178835554 -0,168397447949077 +1,75 0,983985946873937 -0,178246055649492 +1,76 0,982154317137618 -0,18807683889288 +1,77 0,980224472788045 -0,197888814609109 +1,78 0,978196606808045 -0,207681001608784 +1,79 0,976070921982524 -0,217452420681365 +1,8 0,973847630878195 -0,227202094693087 +1,81 0,971526955822315 -0,236929048684675 +1,82 0,969109128880456 -0,246632309968834 +1,83 0,966594391833297 -0,256310908227523 +1,84 0,963982996152448 -0,26596387560898 +1,85 0,9612752029753 -0,275590246824513 +1,86 0,958471283078914 -0,285189059245021 +1,87 0,955571516852944 -0,294759352997261 +1,88 0,952576194271595 -0,304300171059833 +1,89 0,94948561486463 -0,313810559358882 +1,9 0,946300087687414 -0,323289566863504 +1,91 0,94301993129001 -0,332736245680845 +1,92 0,939645473685325 -0,342149651150898 +1,93 0,936177052316306 -0,35152884194096 +1,94 0,932615014022201 -0,360872880139767 +1,95 0,928959715003869 -0,370180831351287 +1,96 0,925211520788168 -0,379451764788155 +1,97 0,921370806191396 -0,388684753364752 +1,98 0,91743795528181 -0,397878873789916 +1,99 0,913413361341225 -0,407033206659266 +2 0,909297426825682 -0,416146836547142 +2,01 0,905090563325201 -0,425218852098153 +2,02 0,900793191522627 -0,434248346118301 +2,03 0,89640574115156 -0,443234415665709 +2,04 0,89192865095338 -0,452176162140912 +2,05 0,887362368633375 -0,461072691376713 +2,06 0,882707350815974 -0,469923113727602 +2,07 0,877964062999078 -0,47872654415872 +2,08 0,873132979507517 -0,487482102334359 +2,09 0,868214583445613 -0,496188912705999 +2,1 0,863209366648874 -0,504846104599858 +2,11 0,858117829634809 -0,513452812303959 +2,12 0,852940481552876 -0,522008175154707 +2,13 0,84767784013357 -0,530511337622945 +2,14 0,842330431636646 -0,538961449399512 +2,15 0,836898790798498 -0,547357665480271 +2,16 0,831383460778683 -0,555699146250613 +2,17 0,825784993105608 -0,56398505756941 +2,18 0,820103947621374 -0,572214570852437 +2,19 0,814340892425796 -0,580386863155222 +2,2 0,80849640381959 -0,588501117255346 +2,21 0,802571066246747 -0,59655652173416 +2,22 0,796565472236087 -0,60455227105793 +2,23 0,790480222342005 -0,612487565658385 +2,24 0,78431592508442 -0,62036161201268 +2,25 0,778073196887921 -0,628173622722739 +2,26 0,771752662020126 -0,635922816594003 +2,27 0,765354952529254 -0,643608418713541 +2,28 0,758880708180922 -0,651229660527546 +2,29 0,752330576394171 -0,658785779918188 +2,3 0,74570521217672 -0,666276021279824 +2,31 0,739005278059471 -0,673699635594561 +2,32 0,732231444030251 -0,681055880507152 +2,33 0,72538438746682 -0,688344020399238 +2,34 0,718464793069126 -0,695563326462902 +2,35 0,711473352790844 -0,702713076773554 +2,36 0,704410765770176 -0,709792556362121 +2,37 0,697277738259938 -0,716801057286543 +2,38 0,690074983556936 -0,723737878702569 +2,39 0,68280322193064 -0,730602326933837 +2,4 0,675463180551151 -0,737393715541245 +2,41 0,668055593416491 -0,744111365391593 +2,42 0,660581201279201 -0,750754604725491 +2,43 0,653040751572265 -0,757322769224544 +2,44 0,645434998334371 -0,763815202077774 +2,45 0,637764702134504 -0,770231254047307 +2,46 0,630030629995892 -0,776570283533293 +2,47 0,622233555319305 -0,782831656638065 +2,48 0,614374257805712 -0,789014747229531 +2,49 0,606453523378315 -0,795118937003784 +2,5 0,598472144103957 -0,801143615546934 +2,51 0,590430918113913 -0,807088180396146 +2,52 0,582330649524082 -0,81295203709989 +2,53 0,574172148354572 -0,818734599277382 +2,54 0,565956230448703 -0,824435288677222 +2,55 0,557683717391417 -0,830053535235222 +2,56 0,549355436427127 -0,835588777131408 +2,57 0,540972220376989 -0,841040460846202 +2,58 0,532534907555621 -0,846408041215776 +2,59 0,524044341687276 -0,851690981486566 +2,6 0,515501371821464 -0,856888753368947 +2,61 0,506906852248053 -0,862000837090064 +2,62 0,498261642411839 -0,867026721445802 +2,63 0,4895666068266 -0,871965903851917 +2,64 0,480822614988648 -0,876817890394281 +2,65 0,472030541289883 -0,881582195878286 +2,66 0,463191264930345 -0,886258343877352 +2,67 0,454305669830306 -0,890845866780576 +2,68 0,445374644541871 -0,895344305839492 +2,69 0,436399082160126 -0,899753211213941 +2,7 0,42737988023383 -0,904072142017061 +2,71 0,418317940675659 -0,90830066635937 +2,72 0,409214169672017 -0,912438361391958 +2,73 0,40006947759242 -0,916484813348769 +2,74 0,390884778898452 -0,920439617587981 +2,75 0,381660992052332 -0,924302378632464 +2,76 0,372399039425055 -0,928072710209333 +2,77 0,363099847204168 -0,931750235288572 +2,78 0,353764345301143 -0,935334586120739 +2,79 0,34439346725839 -0,938825404273736 +2,8 0,334988150155905 -0,942222340668658 +2,81 0,32554933451756 -0,945525055614696 +2,82 0,316077964217054 -0,948733218843107 +2,83 0,306574986383523 -0,951846509540242 +2,84 0,297041351306832 -0,954864616379626 +2,85 0,287478012342544 -0,95778723755309 +2,86 0,277885925816587 -0,960614080800952 +2,87 0,268266050929618 -0,963344863441243 +2,88 0,258619349661111 -0,965979312397975 +2,89 0,248946786673153 -0,968517164228447 +2,9 0,239249329213982 -0,970958165149591 +2,91 0,229527947021264 -0,973302071063349 +2,92 0,219783612225117 -0,975548647581083 +2,93 0,210017299250899 -0,977697670047013 +2,94 0,200229984721771 -0,979748923560684 +2,95 0,190422647361027 -0,981702202998454 +2,96 0,180596267894233 -0,983557313034006 +2,97 0,170751828951145 -0,985314068157884 +2,98 0,160890314967456 -0,986972292696038 +2,99 0,151012712086344 -0,988531820827396 +3 0,141120008059867 -0,989992496600445 +3,01 0,131213192150184 -0,991354173948826 +3,02 0,12129325503063 -0,992616716705937 +3,03 0,11136118868665 -0,993779998618556 +3,04 0,101417986316602 -0,994843903359459 +3,05 0,0914646422324368 -0,995808324539061 +3,06 0,0815021517602691 -0,996673165716047 +3,07 0,0715315111408433 -0,997438340407019 +3,08 0,0615537174299131 -0,998103772095146 +3,09 0,0515697683985346 -0,998669394237814 +3,1 0,0415806624332905 -0,999135150273279 +3,11 0,0315873984364539 -0,999500993626328 +3,12 0,021590975726096 -0,999766887712928 +3,13 0,0115923939361583 -0,999932805943894 +3,14 0,00159265291648683 -0,999998731727539 +3,15 -0,00840724736714862 -0,999964658471342 +3,16 -0,0184063069330538 -0,999830589582598 +3,17 -0,0284035258836038 -0,999596538468086 +3,18 -0,0383979045052354 -0,999262528532721 +3,19 -0,0483884433684142 -0,998828593177219 +3,2 -0,0583741434275801 -0,998294775794753 +3,21 -0,0683540061210478 -0,997661129766618 +3,22 -0,0783270334708653 -0,996927718456887 +3,23 -0,0882922281826076 -0,996094615206081 +3,24 -0,0982485937451087 -0,99516190332383 +3,25 -0,108195134530108 -0,994129676080546 +3,26 -0,118130855891818 -0,992998036698093 +3,27 -0,12805476426638 -0,991767098339465 +3,28 -0,137965867271227 -0,990436984097473 +3,29 -0,147863173804319 -0,989007826982433 +3,3 -0,157745694143249 -0,987479769908865 +3,31 -0,167612440044218 -0,985852965681203 +3,32 -0,177462424840861 -0,984127576978515 +3,33 -0,187294663542903 -0,982303776338232 +3,34 -0,19710817293467 -0,980381746138899 +3,35 -0,2069019716734 -0,978361678581934 +3,36 -0,21667508038738 -0,97624377567241 +3,37 -0,226426521773883 -0,974028249198852 +3,38 -0,236155320696897 -0,971715320712062 +3,39 -0,245860504284637 -0,969305221502961 +3,4 -0,255541102026831 -0,966798192579461 +3,41 -0,265196145871773 -0,964194484642366 +3,42 -0,274824670323124 -0,961494358060299 +3,43 -0,284425712536462 -0,958698082843669 +3,44 -0,293998312415568 -0,955805938617666 +3,45 -0,303541512708429 -0,952818214594305 +3,46 -0,31305435910297 -0,949735209543496 +3,47 -0,322535900322479 -0,946557231763176 +3,48 -0,331985188220734 -0,943284599048476 +3,49 -0,341401277876821 -0,939917638659938 +3,5 -0,35078322768962 -0,936456687290796 +3,51 -0,360130099471969 -0,932902091033304 +3,52 -0,369440958544477 -0,929254205344123 +3,53 -0,378714873828998 -0,925513395008784 +3,54 -0,38795091794173 -0,921680034105203 +3,55 -0,39714816728596 -0,917754505966276 +3,56 -0,406305702144417 -0,913737203141545 +3,57 -0,415422606771246 -0,909628527357944 +3,58 -0,424497969483583 -0,90542888947963 +3,59 -0,433530882752718 -0,901138709466889 +3,6 -0,442520443294853 -0,896758416334147 +3,61 -0,451465752161423 -0,892288448107068 +3,62 -0,460365914828998 -0,88772925177875 +3,63 -0,469220041288727 -0,883081283265026 +3,64 -0,478027246135343 -0,878345007358874 +3,65 -0,486786648655699 -0,873520897683938 +3,66 -0,495497372916845 -0,868609436647165 +3,67 -0,504158547853612 -0,863611115390566 +3,68 -0,512769307355724 -0,858526433742102 +3,69 -0,521328790354407 -0,8533559001657 +3,7 -0,529836140908493 -0,848100031710408 +3,71 -0,538290508290018 -0,842759353958694 +3,72 -0,546691047069287 -0,83733440097388 +3,73 -0,555036917199424 -0,831825715246746 +3,74 -0,56332728410037 -0,826233847641272 +3,75 -0,571561318742344 -0,820559357339561 +3,76 -0,579738197728743 -0,814802811785912 +3,77 -0,587857103378483 -0,808964786630085 +3,78 -0,595917223807764 -0,803045865669731 +3,79 -0,603917753011261 -0,797046640792012 +3,8 -0,611857890942719 -0,790967711914417 +3,81 -0,619736843594963 -0,784809686924768 +3,82 -0,627553823079294 -0,778573181620432 +3,83 -0,635308047704276 -0,772258819646744 +3,84 -0,642998742053909 -0,765867232434637 +3,85 -0,650625137065167 -0,759399059137508 +3,86 -0,658186470104905 -0,752854946567295 +3,87 -0,665681985046119 -0,746235549129803 +3,88 -0,673110932343562 -0,739541528759259 +3,89 -0,680472569108694 -0,732773554852121 +3,9 -0,687766159183974 -0,72593230420014 +3,91 -0,694990973216472 -0,719018460922681 +3,92 -0,702146288730805 -0,71203271639831 +3,93 -0,709231390201386 -0,704975769195658 +3,94 -0,716245569123971 -0,697848325003564 +3,95 -0,723188124086512 -0,690651096560508 +3,96 -0,7300583608393 -0,683384803583336 +3,97 -0,736855592364383 -0,676050172695292 +3,98 -0,743579138944275 -0,668647937353351 +3,99 -0,750228328229919 -0,66117883777488 +4 -0,756802495307928 -0,653643620863612 +4,01 -0,763300982767073 -0,646043040134959 +4,02 -0,769723140764024 -0,638377855640659 +4,03 -0,776068327088332 -0,630648833892775 +4,04 -0,782335907226653 -0,622856747787042 +4,05 -0,788525254426195 -0,615002376525574 +4,06 -0,794635749757397 -0,607086505538955 +4,07 -0,800666782175818 -0,599109926407685 +4,08 -0,806617748583241 -0,591073436783031 +4,09 -0,812488053887984 -0,582977840307259 +4,1 -0,81827711106441 -0,574823946533269 +4,11 -0,823984341211626 -0,566612570843644 +4,12 -0,829609173611371 -0,55834453436911 +4,13 -0,835151045785094 -0,550020663906425 +4,14 -0,840609403550195 -0,541641791835699 +4,15 -0,845983701075447 -0,533208756037154 +4,16 -0,851273400935574 -0,524722399807346 +4,17 -0,856477974165001 -0,516183571774825 +4,18 -0,861596900310741 -0,507593125815277 +4,19 -0,866629667484444 -0,49895192096614 +4,2 -0,871575772413588 -0,490260821340699 +4,21 -0,876434720491801 -0,481520696041674 +4,22 -0,881206025828325 -0,47273241907431 +4,23 -0,885889211296603 -0,46389686925898 +4,24 -0,890483808581988 -0,455014930143305 +4,25 -0,894989358228584 -0,446087489913793 +4,26 -0,899405409685178 -0,437115441307028 +4,27 -0,903731521350306 -0,428099681520393 +4,28 -0,907967260616405 -0,419041112122356 +4,29 -0,91211220391308 -0,409940638962306 +4,3 -0,916165936749455 -0,400799172079975 +4,31 -0,920128053755624 -0,391617625614435 +4,32 -0,923998158723188 -0,38239691771268 +4,33 -0,927775864644875 -0,373137970437818 +4,34 -0,931460793753243 -0,363841709676858 +4,35 -0,935052577558449 -0,354509065048131 +4,36 -0,938550856885108 -0,345140969808323 +4,37 -0,941955281908201 -0,335738360759151 +4,38 -0,945265512188063 -0,326302178153683 +4,39 -0,948481216704426 -0,316833365602319 +4,4 -0,951602073889516 -0,307332869978419 +4,41 -0,954627771660216 -0,297801641323633 +4,42 -0,957558007449271 -0,288240632752882 +4,43 -0,960392488235543 -0,278650800359055 +4,44 -0,963130930573317 -0,269033103117399 +4,45 -0,965773060620639 -0,259388502789626 +4,46 -0,968318614166707 -0,249717963827731 +4,47 -0,970767336658288 -0,24002245327755 +4,48 -0,973118983225174 -0,230302940682059 +4,49 -0,975373318704667 -0,220560397984419 +4,5 -0,977530117665097 -0,21079579943078 +4,51 -0,979589164428367 -0,20101012147286 +4,52 -0,981550253091516 -0,191204342670301 +4,53 -0,983413187547311 -0,181379443592811 +4,54 -0,98517778150386 -0,171536406722112 +4,55 -0,986843858503237 -0,161676216353687 +4,56 -0,988411251939131 -0,151799858498355 +4,57 -0,989879805073504 -0,141908320783673 +4,58 -0,991249371052267 -0,13200259235517 +4,59 -0,992519812919963 -0,122083663777433 +4,6 -0,993691003633465 -0,112152526935054 +4,61 -0,994762826074676 -0,102210174933442 +4,62 -0,995735173062245 -0,0922576019995117 +4,63 -0,996607947362286 -0,0822958033822624 +4,64 -0,997381061698093 -0,0723257752532545 +4,65 -0,99805443875888 -0,0623485146069917 +4,66 -0,998628011207499 -0,0523650191612259 +4,67 -0,999101721687185 -0,0423762872571815 +4,68 -0,999475522827284 -0,0323833177597247 +4,69 -0,999749377247994 -0,0223871099574771 +4,7 -0,999923257564101 -0,0123886634628906 +4,71 -0,999997146387718 -0,00238897811228154 +4,72 -0,999971036330025 0,0076109461341479 +4,73 -0,999844930002004 0,0176101092923073 +4,74 -0,999618840014185 0,0276075114542115 +4,75 -0,999292788975378 0,0376021528879766 +4,76 -0,998866809490414 0,0475930341377878 +4,77 -0,998340944156888 0,0575791561238469 +4,78 -0,997715245560893 0,0675595202422752 +4,79 -0,99698977627177 0,0775331284649787 +4,8 -0,996164608835841 0,0874989834394464 +4,81 -0,995239825769163 0,0974560885884866 +4,82 -0,994215519549271 0,10740344820988 +4,83 -0,993091792605935 0,117340067575955 +4,84 -0,991868757310913 0,127264953033056 +4,85 -0,990546535966713 0,137177112100908 +4,86 -0,98912526079437 0,147075553571863 +4,87 -0,987605073920215 0,156959287610023 +4,88 -0,98598612736167 0,166827325850222 +4,89 -0,984268583012042 0,176678681496857 +4,9 -0,982452612624332 0,186512369422576 +4,91 -0,980538397794069 0,196327406266778 +4,92 -0,978526129941139 0,206122810533958 +4,93 -0,97641601029065 0,215897602691854 +4,94 -0,974208249852809 0,225650805269396 +4,95 -0,971903069401821 0,235381442954451 +4,96 -0,969500699453809 0,245088542691362 +4,97 -0,967001380243766 0,254771133778243 +4,98 -0,96440536170153 0,264428247964056 +4,99 -0,961712903426793 0,274058919545427 +5 -0,958924274663139 0,283662185463226 +5,01 -0,956039754271118 0,293237085398863 +5,02 -0,953059630700368 0,302782661870324 +5,03 -0,949984201960761 0,312297960327916 +5,04 -0,946813775592609 0,321782029249722 +5,05 -0,943548668635907 0,331233920236754 +5,06 -0,940189207598628 0,34065268810779 +5,07 -0,936735728424079 0,350037390993891 +5,08 -0,933188576457298 0,35938709043259 +5,09 -0,929548106410525 0,368700851461733 +5,1 -0,925814682327732 0,377977742712981 +5,11 -0,921988677548216 0,387216836504937 +5,12 -0,918070474669267 0,396417208935922 +5,13 -0,914060465507907 0,405577939976361 +5,14 -0,909959051061711 0,414698113560782 +5,15 -0,905766641468705 0,423776817679428 +5,16 -0,901483655966355 0,432813144469452 +5,17 -0,897110522849643 0,441806190305706 +5,18 -0,892647679428235 0,450755055891099 +5,19 -0,888095571982754 0,459658846346532 +5,2 -0,883454655720153 0,468516671300377 +5,21 -0,87872539472819 0,477327644977522 +5,22 -0,873908261929022 0,48609088628794 +5,23 -0,869003739031916 0,494805518914805 +5,24 -0,864012316485074 0,503470671402114 +5,25 -0,858934493426592 0,512085477241841 +5,26 -0,853770777634543 0,52064907496058 +5,27 -0,848521685476204 0,529160608205696 +5,28 -0,843187741856417 0,537619225830956 +5,29 -0,837769480165098 0,546024081981648 +5,3 -0,832267442223901 0,554374336179161 +5,31 -0,826682178232036 0,562669153405033 +5,32 -0,821014246711247 0,570907704184454 +5,33 -0,815264214449963 0,57908916466921 +5,34 -0,809432656446619 0,587212716720073 +5,35 -0,803520155852155 0,595277547988607 +5,36 -0,797527303911704 0,603282851998404 +5,37 -0,791454699905466 0,611227828225735 +5,38 -0,785302951088781 0,619111682179599 +5,39 -0,779072672631403 0,626933625481169 +5,4 -0,772764487555987 0,634692875942635 +5,41 -0,766379026675784 0,642388657645414 +5,42 -0,759916928531561 0,650020201017752 +5,43 -0,753378839327747 0,657586742911669 +5,44 -0,746765412867812 0,665087526679283 +5,45 -0,740077310488894 0,672521802248466 +5,46 -0,733315200995657 0,679888826197857 +5,47 -0,726479760593413 0,687187861831201 +5,48 -0,719571672820508 0,694418179251016 +5,49 -0,712591628479962 0,701579055431586 +5,5 -0,705540325570392 0,70866977429126 +5,51 -0,698418469216214 0,715689626764061 +5,52 -0,691226771597126 0,722637910870592 +5,53 -0,683965951876901 0,729513931788232 +5,54 -0,676636736131457 0,736317001920619 +5,55 -0,669239857276262 0,74304644096641 +5,56 -0,661776054993037 0,749701575987308 +5,57 -0,654246075655791 0,756281741475356 +5,58 -0,646650672256183 0,762786279419489 +5,59 -0,638990604328224 0,769214539371333 +5,6 -0,631266637872321 0,77556587851025 +5,61 -0,623479545278685 0,781839661707619 +5,62 -0,615630105250086 0,788035261590348 +5,63 -0,607719102723986 0,794152058603611 +5,64 -0,599747328794044 0,800189441072806 +5,65 -0,591715580631009 0,806146805264716 +5,66 -0,583624661403007 0,812023555447886 +5,67 -0,575475380195217 0,817819103952195 +5,68 -0,567268551928969 0,823532871227622 +5,69 -0,559004997280249 0,829164285902202 +5,7 -0,550685542597638 0,83471278483916 +5,71 -0,54231101981967 0,840177813193225 +5,72 -0,533882266391644 0,845558824466117 +5,73 -0,525400125181879 0,850855280561193 +5,74 -0,516865444397429 0,856066651837255 +5,75 -0,508279077499258 0,861192417161521 +5,76 -0,499641883116902 0,866232063961728 +5,77 -0,490954724962601 0,871185088277398 +5,78 -0,482218471744932 0,876050994810224 +5,79 -0,473433997081935 0,880829296973609 +5,8 -0,464602179413757 0,885519516941319 +5,81 -0,455723901914805 0,890121185695266 +5,82 -0,44680005240543 0,894633843072407 +5,83 -0,437831523263147 0,899057037810768 +5,84 -0,428819211333396 0,903390327594559 +5,85 -0,419764017839859 0,907633279098414 +5,86 -0,410666848294341 0,911785468030717 +5,87 -0,401528612406215 0,915846479176035 +5,88 -0,392350223991454 0,919815906436639 +5,89 -0,383132600881251 0,92369335287311 +5,9 -0,373876664830236 0,927478430744036 +5,91 -0,364583341424301 0,931170761544783 +5,92 -0,355253559988043 0,934769976045349 +5,93 -0,345888253491829 0,938275714327282 +5,94 -0,336488358458504 0,941687625819678 +5,95 -0,327054814869741 0,945005369334228 +5,96 -0,317588566072035 0,948228613099346 +5,97 -0,308090558682378 0,951357034793342 +5,98 -0,298561742493594 0,954390321576654 +5,99 -0,289003070379361 0,957328170123131 +6 -0,279415498198926 0,960170286650366 +6,01 -0,269799984701516 0,962916386949076 +6,02 -0,260157491430468 0,965566196411518 +6,03 -0,250488982627075 0,968119450058955 +6,04 -0,240795425134159 0,970575892568149 +6,05 -0,231077788299392 0,972935278296897 +6,06 -0,221337043878359 0,975197371308593 +6,07 -0,211574165937385 0,977361945395819 +6,08 -0,201790130756129 0,979428784102971 +6,09 -0,191985916729955 0,981397680747901 +6,1 -0,182162504272095 0,983268438442585 +6,11 -0,17232087571561 0,985040870112812 +6,12 -0,162462015215154 0,986714798516892 +6,13 -0,152586908648561 0,98829005626338 +6,14 -0,142696543518258 0,989766485827815 +6,15 -0,132791908852517 0,991143939568469 +6,16 -0,12287399510655 0,992422279741117 +6,17 -0,112943794063467 0,993601378512807 +6,18 -0,103002298735098 0,994681117974643 +6,19 -0,0930505032626889 0,995661390153581 +6,2 -0,0830894028174964 0,996542097023218 +6,21 -0,0731199935012631 0,997323150513601 +6,22 -0,0631432722466128 0,998004472520034 +6,23 -0,0531602367173561 0,998585994910881 +6,24 -0,0431718852087287 0,99906765953439 +6,25 -0,0331792165475568 0,999449418224499 +6,26 -0,0231832299923794 0,999731232805658 +6,27 -0,0131849251335213 0,999913075096642 +6,28 -0,00318530179313799 0,999994926913375 +6,29 0,00681464007477018 0,999976780070743 +6,3 0,0168139004843497 0,999858636383415 +6,31 0,0268114795178932 0,999640507665662 +6,32 0,0368063774258269 0,999322415730173 +6,33 0,0467975947266899 0,998904392385876 +6,34 0,0567841323070781 0,998386479434759 +6,35 0,0667649915215564 0,997768728667684 +6,36 0,0767391742925189 0,997051201859214 +6,37 0,0867056832100013 0,996233970761431 +6,38 0,0966635216314172 0,995317117096764 +6,39 0,106611693781224 0,994300732549815 +6,4 0,116549204850494 0,993184918758193 +6,41 0,126475061096403 0,991969787302346 +6,42 0,136388269941598 0,990655459694407 +6,43 0,146287840073455 0,989242067366043 +6,44 0,156172781543212 0,987729751655308 +6,45 0,166042105864957 0,986118663792513 +6,46 0,175894826114484 0,984408964885101 +6,47 0,185729957027978 0,982600825901539 +6,48 0,195546515100544 0,980694427654217 +6,49 0,205343518684555 0,978689960781373 +6,5 0,215119988087816 0,976587625728024 +6,51 0,224874945671534 0,974387632725921 +6,52 0,234607415948081 0,972090201772533 +6,53 0,244316425678538 0,96969556260904 +6,54 0,254001003970023 0,967203954697364 +6,55 0,263660182372778 0,964615627196218 +6,56 0,273292994977013 0,961930838936196 +6,57 0,282898478509493 0,959149858393887 +6,58 0,29247567242987 0,956272963665028 +6,59 0,302023619026732 0,953300442436693 +6,6 0,311541363513379 0,950232591958529 +6,61 0,32102795412329 0,947069719013028 +6,62 0,330482442205311 0,943812139884847 +6,63 0,339903882318513 0,940460180329185 +6,64 0,349291332326736 0,937014175539204 +6,65 0,3586438534928 0,933474470112512 +6,66 0,367960510572385 0,929841418016702 +6,67 0,377240371907544 0,926115382553954 +6,68 0,386482509519879 0,922296736324713 +6,69 0,395685999203331 0,918385861190416 +6,7 0,404849920616598 0,914383148235319 +6,71 0,413973357375178 0,910288997727383 +6,72 0,423055397142997 0,906103819078245 +6,73 0,432095131723647 0,901828030802283 +6,74 0,441091657151202 0,897462060474762 +6,75 0,450044073780618 0,893006344689077 +6,76 0,45895148637769 0,888461329013092 +6,77 0,467813004208584 0,883827467944587 +6,78 0,476627741128899 0,879105224865808 +6,79 0,48539481567229 0,874295071997128 +6,8 0,494113351138608 0,869397490349825 +6,81 0,502782475681573 0,864412969677982 +6,82 0,511401322395952 0,859342008429514 +6,83 0,519969029404259 0,854185113696319 +6,84 0,528484739942931 0,848942801163572 +6,85 0,536947602448012 0,843615595058159 +6,86 0,545356770640302 0,838204028096251 +6,87 0,553711403609991 0,832708641430035 +6,88 0,562010665900743 0,827129984593597 +6,89 0,570253727593247 0,821468615447972 +6,9 0,5784397643882 0,815725100125357 +6,91 0,586567957688746 0,809900012972498 +6,92 0,594637494682329 0,803993936493257 +6,93 0,602647568421972 0,798007461290359 +6,94 0,610597377906979 0,791941186006336 +6,95 0,618486128163024 0,785795717263661 +6,96 0,626313030321656 0,779571669604088 +6,97 0,634077301699181 0,773269665427194 +6,98 0,641778165874934 0,766890334928147 +6,99 0,649414852768911 0,760434316034681 +7 0,656986598718789 0,753902254343305 +7,01 0,664492646556282 0,747294803054744 +7,02 0,671932245682862 0,74061262290862 +7,03 0,679304652144815 0,733856382117381 +7,04 0,686609128707639 0,727026756299476 +7,05 0,693844944929764 0,720124428411794 +7,06 0,701011377235599 0,713150088681372 +7,07 0,708107708987884 0,706104434536373 +7,08 0,715133230559358 0,698988170536338 +7,09 0,722087239403718 0,691802008301737 +7,1 0,728969040125877 0,684546666442806 +7,11 0,735777944551494 0,677222870487685 +7,12 0,742513271795802 0,669831352809865 +7,13 0,749174348331689 0,662372852554955 +7,14 0,755760508057054 0,654848115566765 +7,15 0,762271092361411 0,647257894312724 +7,16 0,768705450191756 0,639602947808631 +7,17 0,775062938117667 0,631884041542758 +7,18 0,78134292039565 0,624101947399299 +7,19 0,787544769032711 0,616257443581182 +7,2 0,793667863849153 0,608351314532255 +7,21 0,799711592540598 0,600384350858831 +7,22 0,805675350739213 0,592357349250641 +7,23 0,811558542074149 0,584271112401154 +7,24 0,817360578231173 0,576126448927319 +7,25 0,823080879011506 0,567924173288695 +7,26 0,828718872389835 0,559665105706011 +7,27 0,834273994571523 0,551350072079141 +7,28 0,83974569004898 0,542979903904521 +7,29 0,845133411657217 0,534555438191992 +7,3 0,850436620628564 0,526077517381105 +7,31 0,855654786646544 0,517546989256876 +7,32 0,860787387898902 0,50896470686501 +7,33 0,86583391112979 0,500331528426593 +7,34 0,870793851691091 0,491648317252276 +7,35 0,875666713592883 0,482915941655937 +7,36 0,880452009553034 0,474135274867862 +7,37 0,885149261045938 0,465307194947413 +7,38 0,88975799835036 0,456432584695223 +7,39 0,894277760596409 0,447512331564921 +7,4 0,898708095811627 0,43854732757439 +7,41 0,903048560966185 0,429538469216557 +7,42 0,907298722017184 0,420486657369749 +7,43 0,911458153952061 0,411392797207609 +7,44 0,91552644083109 0,402257798108573 +7,45 0,919503175828971 0,393082573564941 +7,46 0,923387961275519 0,38386804109152 +7,47 0,927180408695427 0,374615122133879 +7,48 0,930880138847114 0,365324741976202 +7,49 0,934486781760646 0,355997829648764 +7,5 0,937999976774739 0,346635317835026 +7,51 0,941419372572818 0,337238142778366 +7,52 0,944744627218154 0,327807244188457 +7,53 0,947975408188053 0,318343565147303 +7,54 0,951111392407109 0,30884805201492 +7,55 0,954152266279515 0,299321654334707 +7,56 0,957097725720417 0,289765324738494 +7,57 0,959947476186326 0,280180018851278 +7,58 0,96270123270457 0,27056669519566 +7,59 0,965358719901792 0,260926315095994 +7,6 0,967919672031487 0,251259842582255 +7,61 0,970383833000575 0,241568244293641 +7,62 0,972750956395014 0,231852489381904 +7,63 0,975020805504436 0,222113549414439 +7,64 0,977193153345823 0,212352398277125 +7,65 0,9792677826862 0,202570012076944 +7,66 0,981244486064362 0,192767369044364 +7,67 0,983123065811619 0,182945449435517 +7,68 0,984903334071561 0,173105235434182 +7,69 0,986585112818846 0,163247711053556 +7,7 0,988168233877 0,153373862037864 +7,71 0,989652538935238 0,14348467576378 +7,72 0,99103787956429 0,13358114114169 +7,73 0,992324117231247 0,123664248516802 +7,74 0,993511123313416 0,113734989570117 +7,75 0,994598779111176 0,103794357219253 +7,76 0,995586975859855 0,0938433455191623 +7,77 0,996475614740601 0,0838829495627214 +7,78 0,997264606890266 0,0739141653812273 +7,79 0,997953873410293 0,06393798984479 +7,8 0,998543345374605 0,0539554205626498 +7,81 0,999032963836496 0,043967455783415 +7,82 0,999422679834528 0,0339750942952423 +7,83 0,999712454397426 0,0239793353259525 +7,84 0,999902258547975 0,0139811784431128 +7,85 0,999992073305919 0,00398162345407885 +7,86 0,999981889689856 -0,0060183296939816 +7,87 0,999871708718139 -0,0160176810140879 +7,88 0,999661541408774 -0,0260154305794408 +7,89 0,999351408778317 -0,0360105786234161 +7,9 0,998941341839772 -0,046002125639537 +7,91 0,998431381599491 -0,0559890724814288 +7,92 0,997821579053074 -0,0659704204627299 +7,93 0,997111995180267 -0,0759451714569607 +7,94 0,996302700938866 -0,0859123279973325 +7,95 0,99539377725762 -0,0958708933764978 +7,96 0,99438531502814 -0,105819871746218 +7,97 0,99327741509581 -0,115758268216946 +7,98 0,992070188249698 -0,125685088957318 +7,99 0,990763755211484 -0,135599341293531 +8 0,989358246623382 -0,145500033808614 +8,01 0,98785380303508 -0,155386176441565 +8,02 0,986250574889684 -0,16525678058636 +8,03 0,984548722508671 -0,17511085919081 +8,04 0,982748416075862 -0,184947426855268 +8,05 0,980849835620399 -0,194765499931161 +8,06 0,978853170998747 -0,204564096619365 +8,07 0,976758621875704 -0,214342237068377 +8,08 0,974566397704435 -0,2240989434723 +8,09 0,972276717705532 -0,233833240168624 +8,1 0,969889810845086 -0,243544153735791 +8,11 0,967405915811795 -0,253230713090538 +8,12 0,964825280993091 -0,262891949585002 +8,13 0,962148164450306 -0,272526897103582 +8,14 0,959374833892864 -0,282134592159557 +8,15 0,956505566651509 -0,291714073991427 +8,16 0,953540649650574 -0,301264384658992 +8,17 0,950480379379289 -0,310784569139144 +8,18 0,94732506186213 -0,320273675421368 +8,19 0,94407501262822 -0,329730754602944 +8,2 0,940730556679773 -0,339154860983835 +8,21 0,937292028459598 -0,348545052161256 +8,22 0,933759771817651 -0,357900389123914 +8,23 0,930134139976653 -0,367219936345908 +8,24 0,926415495496766 -0,376502761880283 +8,25 0,92260421023934 -0,385747937452222 +8,26 0,918700665329725 -0,394954538551871 +8,27 0,914705251119158 -0,404121644526792 +8,28 0,91061836714573 -0,413248338674028 +8,29 0,906440422094434 -0,42233370833177 +8,3 0,902171833756293 -0,431376844970621 +8,31 0,897813028986585 -0,440376844284454 +8,32 0,893364443662152 -0,449332806280839 +8,33 0,888826522637821 -0,458243835371038 +8,34 0,884199719701913 -0,467109040459569 +8,35 0,879484497530865 -0,47592753503331 +8,36 0,874681327642965 -0,484698437250152 +8,37 0,869790690351199 -0,493420870027185 +8,38 0,864813074715222 -0,502093961128397 +8,39 0,859748978492448 -0,510716843251906 +8,4 0,854598908088281 -0,519288654116686 +8,41 0,849363378505467 -0,527808536548793 +8,42 0,844042913292604 -0,536275638567084 +8,43 0,838638044491778 -0,544689113468413 +8,44 0,833149312585366 -0,553048119912302 +8,45 0,827577266441984 -0,561351822005071 +8,46 0,821922463261602 -0,569599389383433 +8,47 0,816185468519828 -0,57778999729752 +8,48 0,810366855911355 -0,585922826693367 +8,49 0,804467207292594 -0,593997064294812 +8,5 0,79848711262349 -0,602011902684824 +8,51 0,792427169908528 -0,609966540386242 +8,52 0,786287985136929 -0,617860181941925 +8,53 0,780070172222054 -0,625692037994295 +8,54 0,773774352940012 -0,633461325364276 +8,55 0,767401156867487 -0,641167267129602 +8,56 0,760951221318774 -0,648809092702519 +8,57 0,754425191282054 -0,656386037906838 +8,58 0,74782371935489 -0,663897345054353 +8,59 0,741147465678975 -0,671342263020609 +8,6 0,734397097874113 -0,678720047320013 +8,61 0,72757329097146 -0,686029960180282 +8,62 0,720676727346017 -0,693271270616225 +8,63 0,713708096648402 -0,700443254502829 +8,64 0,706668095735878 -0,707545194647683 +8,65 0,699557428602668 -0,714576380862692 +8,66 0,69237680630956 -0,721536110035093 +8,67 0,685126946912801 -0,728423686197768 +8,68 0,677808575392287 -0,735238420598841 +8,69 0,670422423579072 -0,741979631770551 +8,7 0,662969230082182 -0,7486466455974 +8,71 0,655449740214757 -0,755238795383558 +8,72 0,647864705919518 -0,76175542191954 +8,73 0,640214885693571 -0,768195873548125 +8,74 0,632501044512566 -0,774559506229517 +8,75 0,624723953754192 -0,780845683605749 +8,76 0,616884391121045 -0,787053777064324 +8,77 0,608983140562854 -0,793183165801068 +8,78 0,60102099219809 -0,799233236882215 +8,79 0,592998742234955 -0,805203385305701 +8,8 0,584917192891762 -0,811093014061656 +8,81 0,576777152316708 -0,816901534192113 +8,82 0,56857943450707 -0,8226283648499 +8,83 0,560324859227795 -0,828272933356724 +8,84 0,552014251929533 -0,833834675260437 +8,85 0,543648443666088 -0,839313034391484 +8,86 0,535228271011316 -0,844707462918517 +8,87 0,526754575975463 -0,850017421403179 +8,88 0,518228205920975 -0,855242378854046 +8,89 0,50965001347775 -0,860381812779727 +8,9 0,501020856457885 -0,865435209241112 +8,91 0,492341597769889 -0,870402062902767 +8,92 0,4836131053324 -0,875281877083465 +8,93 0,474836251987387 -0,880074163805853 +8,94 0,466011915412871 -0,884778443845253 +8,95 0,457140978035154 -0,889394246777582 +8,96 0,448224326940585 -0,893921111026392 +8,97 0,439262853786841 -0,898358583909032 +8,98 0,430257454713769 -0,90270622168191 +8,99 0,421209030253772 -0,906963589584873 +9 0,412118485241757 -0,911130261884677 +9,01 0,402986728724648 -0,915205821917566 +9,02 0,393814673870488 -0,919189862130932 +9,03 0,384603237877118 -0,923081984124074 +9,04 0,375353341880461 -0,926881798688036 +9,05 0,366065910862411 -0,930588925844529 +9,06 0,356741873558329 -0,934202994883924 +9,07 0,347382162364174 -0,937723644402332 +9,08 0,337987713243268 -0,941150522337732 +9,09 0,328559465632692 -0,944483286005189 +9,1 0,319098362349352 -0,947721602131112 +9,11 0,309605349495691 -0,950865146886587 +9,12 0,300081376365083 -0,953913605919759 +9,13 0,290527395346907 -0,956866674387264 +9,14 0,280944361831302 -0,959724056984716 +9,15 0,271333234113633 -0,962485467976237 +9,16 0,261694973298663 -0,965150631223029 +9,17 0,252030543204441 -0,967719280210989 +9,18 0,242340910265924 -0,970191158077357 +9,19 0,23262704343833 -0,972566017636408 +9,2 0,222889914100246 -0,974843621404164 +9,21 0,213130495956494 -0,977023741622146 +9,22 0,203349764940756 -0,97910616028015 +9,23 0,19354869911798 -0,981090669138045 +9,24 0,183728278586583 -0,982977069746599 +9,25 0,173889485380434 -0,984765173467324 +9,26 0,164033303370654 -0,986454801491336 +9,27 0,15416071816723 -0,988045784857242 +9,28 0,144272717020457 -0,989537964468031 +9,29 0,134370288722207 -0,990931191106986 +9,3 0,124454423507062 -0,992225325452603 +9,31 0,114526112953277 -0,993420238092527 +9,32 0,104586349883635 -0,994515809536489 +9,33 0,0946361282661601 -0,995511930228257 +9,34 0,0846764431147214 -0,996408500556594 +9,35 0,0747082903895348 -0,997205430865212 +9,36 0,0647326668975659 -0,997902641461745 +9,37 0,0547505701928492 -0,998500062625716 +9,38 0,0447629984767403 -0,998997634615504 +9,39 0,0347709504980861 -0,999395307674326 +9,4 0,0247754254533578 -0,999693042035207 +9,41 0,0147774228867302 -0,999890807924959 +9,42 0,00477794259012851 -0,999988585567158 +9,43 -0,00522201549675062 -0,999986365184122 +9,44 -0,0152214513864317 -0,999884146997886 +9,45 -0,0252193651436605 -0,999681941230185 +9,46 -0,0352147569853892 -0,999379768101426 +9,47 -0,0452066273807649 -0,998977657828671 +9,48 -0,0551939771510745 -0,998475650622611 +9,49 -0,0651758075696639 -0,99787379668355 +9,5 -0,0751511204618093 -0,997172156196378 +9,51 -0,0851189183045343 -0,996370799324562 +9,52 -0,0950782043263609 -0,995469806203119 +9,53 -0,105027982606987 -0,994469266930611 +9,54 -0,114967258176876 -0,993369281560131 +9,55 -0,124895037116752 -0,992169960089301 +9,56 -0,134810326656996 -0,990871422449267 +9,57 -0,144712135276915 -0,989473798492712 +9,58 -0,154599472803899 -0,987977227980866 +9,59 -0,164471350512435 -0,986381860569534 +9,6 -0,17432678122298 -0,984687855794127 +9,61 -0,184164779400673 -0,982895383053711 +9,62 -0,193984361253899 -0,981004621594066 +9,63 -0,203784544832651 -0,979015760489763 +9,64 -0,213564350126739 -0,976928998625255 +9,65 -0,223322799163784 -0,974744544674989 +9,66 -0,233058916107014 -0,97246261708254 +9,67 -0,242771727352849 -0,970083444038766 +9,68 -0,252460261628258 -0,967607263458988 +9,69 -0,262123550087887 -0,965034322959201 +9,7 -0,271760626410944 -0,96236487983131 +9,71 -0,281370526897825 -0,959599201017404 +9,72 -0,290952290566491 -0,95673756308306 +9,73 -0,300504959248559 -0,953780252189686 +9,74 -0,310027577685123 -0,950727564065908 +9,75 -0,319519193622274 -0,947579803977993 +9,76 -0,328978857906327 -0,944337286699328 +9,77 -0,338405624578738 -0,941000336478938 +9,78 -0,347798550970695 -0,937569287009064 +9,79 -0,357156697797388 -0,934044481391794 +9,8 -0,366479129251928 -0,930426272104753 +9,81 -0,375764913098942 -0,926715020965855 +9,82 -0,385013120767783 -0,922911099097119 +9,83 -0,394222827445389 -0,919014886887564 +9,84 -0,40339311216877 -0,915026773955164 +9,85 -0,412523057917093 -0,910947159107888 +9,86 -0,421611751703392 -0,906776450303821 +9,87 -0,430658284665865 -0,902515064610367 +9,88 -0,43966175215875 -0,898163428162546 +9,89 -0,448621253842803 -0,893721976120377 +9,9 -0,457535893775321 -0,889191152625361 +9,91 -0,466404780499741 -0,884571410756073 +9,92 -0,47522702713478 -0,879863212482849 +9,93 -0,484001751463126 -0,875067028621594 +9,94 -0,49272807601966 -0,870183338786697 +9,95 -0,501405128179199 -0,865212631343071 +9,96 -0,510032040243754 -0,86015540335732 +9,97 -0,518607949529311 -0,855012160548026 +9,98 -0,527131998452086 -0,849783417235186 +9,99 -0,535603334614291 -0,844469696288772 diff --git a/chart2/workbench/sampledata/numbers.chd b/chart2/workbench/sampledata/numbers.chd new file mode 100644 index 000000000..7e5537904 --- /dev/null +++ b/chart2/workbench/sampledata/numbers.chd @@ -0,0 +1,22 @@ +# -*- coding: utf-8; -*- +# Series Labels + +Series1 Series2 Series3 + +# Categories + +a b c d e f g h i j k l m n o p q r s t u v w x y z ä ö ü + +# Data + +# Series 1 + +5 8 -1 6 4 2 7 5 9 8 -3 1 5 10 2 4 5 9 1 11 5 7 6 9 5 9 12 5 -1 + +# Series 2 + +5 4 2 0 1 6 5 9 8 8 9 -4 5 1 2 3 10 2 5 6 7 8 4 5 1 5 4 11 5 + +# Series 3 + +5 8 4 5 8 5 5 4 5 1 2 -1 4 5 7 5 8 9 6 -4 5 1 2 3 5 6 1 1 3 diff --git a/chart2/workbench/stub/newCHxx.cxx b/chart2/workbench/stub/newCHxx.cxx new file mode 100644 index 000000000..9692f02d3 --- /dev/null +++ b/chart2/workbench/stub/newCHxx.cxx @@ -0,0 +1,12 @@ +#include ".hxx" + +//............................................................................. +namespace chart +{ +//............................................................................. +using namespace ::com::sun::star; +using namespace ::drafts::com::sun::star::chart2; + +//............................................................................. +} //namespace chart +//............................................................................. diff --git a/chart2/workbench/stub/newCHxx.hxx b/chart2/workbench/stub/newCHxx.hxx new file mode 100644 index 000000000..1b6c48bf0 --- /dev/null +++ b/chart2/workbench/stub/newCHxx.hxx @@ -0,0 +1,20 @@ +#ifndef _CHART2__HXX +#define _CHART2__HXX + +//............................................................................. +namespace chart +{ +//............................................................................. + +//----------------------------------------------------------------------------- +/** +*/ + +class +{ +}; + +//............................................................................. +} //namespace chart +//............................................................................. +#endif diff --git a/chart2/workbench/stub/newUNOcomponent.cxx b/chart2/workbench/stub/newUNOcomponent.cxx new file mode 100644 index 000000000..6b62c179f --- /dev/null +++ b/chart2/workbench/stub/newUNOcomponent.cxx @@ -0,0 +1,45 @@ +//replace XXXX and YYYY and ... +#ifndef _CHART2_XXXX_HXX +#include "XXXX.hxx" +#endif +#ifndef _CHART2_SERVICENAMES_CHARTTYPES_HXX +#include "servicenames_ ... .hxx" +#endif + +//............................................................................. +namespace chart +{ +//............................................................................. + +XXXX::XXXX( + uno::Reference<uno::XComponentContext> const & xContext) +{ + m_xMCF = xContext->getServiceManager(); +} + +XXXX::~XXXX() +{ +} + +//----------------------------------------------------------------- +// lang::XServiceInfo +//----------------------------------------------------------------- + +APPHELPER_XSERVICEINFO_IMPL(XXXX,CHART2_VIEW_XXXX_SERVICE_IMPLEMENTATION_NAME) + + uno::Sequence< rtl::OUString > XXXX +::getSupportedServiceNames_Static() +{ + uno::Sequence< rtl::OUString > aSNS( 1 ); + aSNS.getArray()[ 0 ] = CHART2_VIEW_XXXX_SERVICE_NAME; + return aSNS; +} + +//----------------------------------------------------------------- +// chart2::YYYY +//----------------------------------------------------------------- + + +//............................................................................. +} //namespace chart +//............................................................................. diff --git a/chart2/workbench/stub/newUNOcomponent.hxx b/chart2/workbench/stub/newUNOcomponent.hxx new file mode 100644 index 000000000..2f43de2ec --- /dev/null +++ b/chart2/workbench/stub/newUNOcomponent.hxx @@ -0,0 +1,68 @@ +//replace XXXX and YYYY +#ifndef _CHART2_XXXX_HXX +#define _CHART2_XXXX_HXX + +#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_ +#include <com/sun/star/lang/XServiceInfo.hpp> +#endif +#ifndef _COM_SUN_STAR_UNO_XCOMPONENTCONTEXT_HPP_ +#include <com/sun/star/uno/XComponentContext.hpp> +#endif +/* +#ifndef _COM_SUN_STAR_LANG_XCOMPONENT_HPP_ +#include <com/sun/star/lang/XComponent.hpp> +#endif +*/ + +//---- +#include "ServiceMacros.hxx" + +//---- chart2 +#ifndef _COM_SUN_STAR_CHART2_YYYY_HPP_ +#include <drafts/com/sun/star/chart2/YYYY.hpp> +#endif + +//---- +#ifndef _CPPUHELPER_IMPLBASE2_HXX_ +#include <cppuhelper/implbase2.hxx> +#endif + +//............................................................................. +namespace chart +{ +//............................................................................. + +class XXXX : public ::cppu::WeakImplHelper2< + ::drafts::com::sun::star::chart2::YYYY + , ::com::sun::star::lang::XServiceInfo + //::com::sun::star::lang::XComponent ??? + //::com::sun::star::uno::XWeak // implemented by WeakImplHelper(optional interface) + //::com::sun::star::uno::XInterface // implemented by WeakImplHelper(optional interface) + //::com::sun::star::lang::XTypeProvider // implemented by WeakImplHelper + > +{ +private: + ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiComponentFactory > m_xMCF; + + //no default constructor + XXXX(){}; +public: + XXXX(::com::sun::star::uno::Reference< + ::com::sun::star::uno::XComponentContext > const & xContext); + virtual ~XXXX(); + + //------------------------------------------------------------------------- + // ::com::sun::star::lang::XServiceInfo + //------------------------------------------------------------------------- + + APPHELPER_XSERVICEINFO_DECL() + APPHELPER_SERVICE_FACTORY_HELPER(XXXX) + + //------------------------------------------------------------------------- + // chart2::YYYY + //------------------------------------------------------------------------- +}; +//............................................................................. +} //namespace chart +//............................................................................. +#endif diff --git a/chart2/workbench/stub/xserviceinfo.cxx b/chart2/workbench/stub/xserviceinfo.cxx new file mode 100644 index 000000000..ee1d57eae --- /dev/null +++ b/chart2/workbench/stub/xserviceinfo.cxx @@ -0,0 +1,102 @@ +// Sample implementation of the service XServiceInfo +// ------------------------------------------------- +// +// CLASSNAME: Replace this with your classes name +// +// m_aMutex: This is the mutex member of your class +// + +// -------------------- + +#include <vector> +#include <algorithm> + +// -------------------- + +using ::com::sun::star::uno::Sequence; +using ::rtl::OUString; +using ::osl::MutexGuard; +using ::com::sun::star::uno::RuntimeException; + +// -------------------- + +// this should be a private method of your class +const ::std::vector< OUString > & CLASSNAME::GetServiceNames() +{ + static ::std::vector< OUString > aServices; + + // /-- + MutexGuard aGuard( m_aMutex ); + + if( aServices.size() == 0 ) + { + aServices.push_back( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sample.Service1" ))); + aServices.push_back( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sample.Service2" ))); + aServices.push_back( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sample.Service3" ))); + // ... + } + + return aServices; + // \-- +} + +// -------------------- + +// Alternative using double-checked-locking pattern +// (untested!) + +// #ifndef INCLUDED_OSL_DOUBLECHECKEDLOCKING_H +// #include <osl/doublecheckedlocking.h> +// #endif + +// this should be a private method of your class +// const ::std::vector< OUString > & CLASSNAME::GetServiceNames() +// { +// static ::std::vector< OUString > aServices; +// static bool bIsInitialized = false; + +// if( ! bIsInitialized ) +// { +// // /-- +// MutexGuard aGuard( m_aMutex ); + +// if( ! bIsInitialized ) +// { +// aServices.push_back( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sample.Service1" ))); +// aServices.push_back( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sample.Service2" ))); +// aServices.push_back( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sample.Service3" ))); +// // ... +// OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER(); +// bIsInitialized = true; +// } +// // \-- +// } +// else +// OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER(); + +// return aServices; +// } + +// ------------------------------------ +// ::com::sun::star::lang::XServiceInfo +// ------------------------------------ + +OUString SAL_CALL CLASSNAME::getImplementationName() + throw (RuntimeException) +{ + return OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.sample.CLASSNAME" )); +} + +sal_Bool SAL_CALL CLASSNAME::supportsService( const ::rtl::OUString& ServiceName ) + throw (RuntimeException) +{ + const ::std::vector< OUString > & rServices = GetServiceNames(); + return ( rServices.end() != ::std::find( rServices.begin(), rServices.end(), ServiceName ) ); +} + +Sequence< OUString > SAL_CALL CLASSNAME::getSupportedServiceNames() + throw (RuntimeException) +{ + const ::std::vector< OUString > & rServices = GetServiceNames(); + return Sequence< OUString >( &(* rServices.begin()), rServices.size() ); +} |