Re: [api-dev] combined chart type using com:sun:star:chart2

2008-08-22 Thread Ingrid Halama

Hi,

You didn't add any data series to the chart type so far, so there is 
nothing to display. For the roles of the different data sequences for 
the stock chart have a look here:

http://api.openoffice.org/docs/common/ref/com/sun/star/chart2/data/DataSequenceRole.html

Kind regards,
Ingrid

othman wrote:

Hi Ingrid,
I wrote below java code to change chart type with chart2 API. However this
code doesn't work !
can you please look at it and tell me what I'm doing wrong ?

thanks.
othman


Code:
XMultiComponentFactory xMCF = null;
   XEmbeddedObjectSupplier xEmbeddedObjSupplier =
(XEmbeddedObjectSupplier)
UnoRuntime.queryInterface(XEmbeddedObjectSupplier.class, xtablechart);
XInterface xInterface =
xEmbeddedObjSupplier.getEmbeddedObject();

com.sun.star.chart2.XChartDocument oChart =
(com.sun.star.chart2.XChartDocument) UnoRuntime.queryInterface(
com.sun.star.chart2.XChartDocument.class, xInterface);

   
System.out.println("com.sun.star.chart2.XChartDocument="+oChart);

/* let the Calc document create a data provider, set it at the
chart*/
com.sun.star.chart2.data.XDataProvider oDataProv =
oChart.getDataProvider();

   com.sun.star.chart2.XDiagram oDiagram=oChart.getFirstDiagram();
 
System.out.println("com.sun.star.chart2.XDiagram="+oDiagram.toString());

   //insert a coordinate system into the diagram
   
   com.sun.star.chart2.XCoordinateSystemContainer oCoordSysCnt=
  
(com.sun.star.chart2.XCoordinateSystemContainer)UnoRuntime.queryInterface(com.sun.star.chart2.XCoordinateSystemContainer.class,

oDiagram);
   com.sun.star.chart2.XCoordinateSystem[] oCoordSys=
oCoordSysCnt.getCoordinateSystems();
  
System.out.println("com.sun.star.chart2.XCoordinateSystem[0]="+oCoordSys[0].toString());

  com.sun.star.chart2.XChartTypeContainer oChartTypeCnt=
  
(com.sun.star.chart2.XChartTypeContainer)UnoRuntime.queryInterface(com.sun.star.chart2.XChartTypeContainer.class,

oCoordSys[0]);
   
   
// get the service manager from the office

xMCF = xContext.getServiceManager();
   
Object object = xMCF.createInstanceWithContext(

"com.sun.star.chart2.CandleStickChartType", xContext);
   com.sun.star.chart2.XChartType
oChartType=(com.sun.star.chart2.XChartType) UnoRuntime.queryInterface(
com.sun.star.chart2.XChartType.class, object);
   
System.out.println("com.sun.star.chart2.XChartType="+oChartType.toString());

   oChartTypeCnt.addChartType(oChartType);


Ingrid Halama wrote:

Hi othman,

othman wrote:

Sorry, i hope you bare with me & be patient answering my questions about
the
chart2 API.
i wrote a java code to change the type of my chart from default LineType
to
candlestick type.
However this code doesn't work with chart2 .but if i change to standar
com.sun.star.chart and use type "com.sun.star.StockDiagram" it does work
perfectly.
what is wrong with the chart2 code (or how to change my chart2 type to
candlestick )?

Instances of chart2 chart types (e.g. 
com.sun.star.chart2.CandleStickChartType) do support service 
com::sun::star::chart2::ChartType. Look at the corresponding idl file. 
They do not support the interface com::sun::star::chart2::XDiagram, but 
instead they support interface com::sun::star::chart2::XChartType. They 
need to be added to the com::sun::star::chart2::XChartTypeContainer as 
shown in my mail from August 18th.


In general both APIs do not have the same structure. The only touch 
point is the chart document itself which does support both interfaces 
com::sun::star::chart2::XChartDocument and 
com::sun::star::chart::XChartDocument. Starting from there both APIs 
from different object trees.


Kind regards,
Ingrid


thanks.

code :

XEmbeddedObjectSupplier xEmbeddedObjSupplier = (XEmbeddedObjectSupplier)
UnoRuntime.queryInterface(XEmbeddedObjectSupplier.class,
xtablechart);
XInterface xInterface = xEmbeddedObjSupplier.getEmbeddedObject();

com.sun.star.chart2.XChartDocument xChartDoc =

(com.sun.star.chart2.XChartDocument)UnoRuntime.queryInterface(
com.sun.star.chart2.XChartDocument.class, xInterface);
com.sun.star.chart2.XDiagram xDiagram =
(com.sun.star.chart2.XDiagram) xChartDoc.getFirstDiagram();
XMultiServiceFactory xMSF = (XMultiServiceFactory)
UnoRuntime.queryInterface( XMultiServiceFactory.class,
xChartDoc
);
Object object = xMSF.createInstance(
"com.sun.star.chart2.CandleStickChartType" );
xDiagram = (com.sun.star.chart2.XDiagram)
UnoRuntime.queryInterface(com.sun.star.chart2.XDiagram.class, object);

XPropertySet xPropSet = (XPropertySet) UnoRuntime.queryInterface(
XPropertySet.class, xDiagram );  

xChartDoc.setFirstDiagram(xDiagram);





-

Re: [api-dev] Howto create CalcAddin and then a .oxt File?

2008-08-22 Thread Juergen Schmidt

Hi Thomas,

it is more interesting why the plugin doesn't work anymore.

- on which platform do you work?
- which version of the plugin do you use?
- which office version do you use?
- which SDK version do you use?

Related to your question, check the SDK add-in example to see how you 
can build an oxt package with gnu make. Maybe it's easier for you to 
understand the necessary steps as to read the ant scripts in NetBeans.


And of course read the appropriate chapter in the DevGuide where you can 
find all the info about the package descriptor file description.xml. 
Maybe start with 
http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Extensions/Checklist_for_Writing_Extensions


Juergen


Thomas wrote:

Hi all,

i developed already some Calc-Addins with Java and Netbeans and the
OO-Netbeans-Plugin. Now i want to know the steps what i have to do to
develop a Addin without Netbeans because the OO-Netbeans-Plugin doesn't
work any longer (i already send a bug report).
I already have:
1) a working plugin (CentralRegistrationClass.java,
OOCalcAddin_Solar.java, XOOCalcAddin_Solar.java,
OOCalcAddin_SolarImpl.java, CalcAddins.xcu, description.xml)
2) i can compile the idl-files to urd-files
3) i can merge the urd files to types.rdb
4) i can use javamaker to create the java classes

My question ist, what i should do next? At the end, i want to have a
working package (.oxt) which i can install with the Extension Manager.


Best regards,

Tom



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[api-dev] Non modal dialog staying in front ?

2008-08-22 Thread Laurent Godard

Hi all

in OOoBasic
i have a non modal dialog that is shown using

oDlgDossier = loadDialog("dlgDossier")

stopDossier = false
while not stopDossier
  wait 20
wend

oDlgDossier.setVisible(false)

This works fine if i stay always in the same document

But, when I open a new document using a lodComponentFromURL, myDialog
disapear as it is bound to the previous opened document. It goes background.

if I use a
myDialog.toFront()
then this my new file that goes background

What i want to achieve is that my dialog stays at front whatever
document is active.

any idea how to achieve that ? any link is welcommed

feel free to ask for more details

Thanks in advance

Laurent


--
Laurent Godard <[EMAIL PROTECTED]> - Ingénierie OpenOffice.org - 
http://www.indesko.com
Nuxeo Enterprise Content Management >> http://www.nuxeo.com - 
http://www.nuxeo.org

Livre "Programmation OpenOffice.org", Eyrolles 2004-2006

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [api-dev] Howto create CalcAddin and then a .oxt File?

2008-08-22 Thread Thomas
Hi Juergen,

i already wrote a Bugreport (see
http://www.openoffice.org/issues/show_bug.cgi?id=92911 ) for the problem
with netbeans. I hope this will be fixed soon. But i can't wait for the
fix and have to write the plugin, so i want to do it without the help of
netbeans. 
I will try to use GNU make and hope i will understand.

Thanks & best regards,

Tom


Am Freitag, den 22.08.2008, 13:25 +0200 schrieb Juergen Schmidt:
> Hi Thomas,
> 
> it is more interesting why the plugin doesn't work anymore.
> 
> - on which platform do you work?
> - which version of the plugin do you use?
> - which office version do you use?
> - which SDK version do you use?
> 
> Related to your question, check the SDK add-in example to see how you 
> can build an oxt package with gnu make. Maybe it's easier for you to 
> understand the necessary steps as to read the ant scripts in NetBeans.
> 
> And of course read the appropriate chapter in the DevGuide where you can 
> find all the info about the package descriptor file description.xml. 
> Maybe start with 
> http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Extensions/Checklist_for_Writing_Extensions
> 
> Juergen
> 
> 
> Thomas wrote:
> > Hi all,
> > 
> > i developed already some Calc-Addins with Java and Netbeans and the
> > OO-Netbeans-Plugin. Now i want to know the steps what i have to do to
> > develop a Addin without Netbeans because the OO-Netbeans-Plugin doesn't
> > work any longer (i already send a bug report).
> > I already have:
> > 1) a working plugin (CentralRegistrationClass.java,
> > OOCalcAddin_Solar.java, XOOCalcAddin_Solar.java,
> > OOCalcAddin_SolarImpl.java, CalcAddins.xcu, description.xml)
> > 2) i can compile the idl-files to urd-files
> > 3) i can merge the urd files to types.rdb
> > 4) i can use javamaker to create the java classes
> > 
> > My question ist, what i should do next? At the end, i want to have a
> > working package (.oxt) which i can install with the Extension Manager.
> > 
> > 
> > Best regards,
> > 
> > Tom
> > 
> > 
> > 
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[api-dev] Api for enterprise dictionaries available?

2008-08-22 Thread Per Eriksson

Hi,

Can dictionary technology companies integrate their proprietary data in 
an extension NOT using the Hunspell technology, but writing their own 
engine?


Companies having dictionary data and wanting to develop solutions for 
OpenOffice.org might not be able to transform it into Hunspell data.


Thanks a lot for your help,

--
:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.
Best Regards
Per Eriksson
Co-Lead Swedish Language Project
Marketing Contact Sweden
OpenOffice.org Community
Phone: +46 70 560 10 33
Email: [EMAIL PROTECTED]
Web: http://sv.openoffice.org/


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [api-dev] combined chart type using com:sun:star:chart2

2008-08-22 Thread othman

Still not able to get the code work .
please help !

code :
XEmbeddedObjectSupplier xEmbeddedObjSupplier =
(XEmbeddedObjectSupplier)
UnoRuntime.queryInterface(XEmbeddedObjectSupplier.class, xtablechart);
XInterface xInterface =
xEmbeddedObjSupplier.getEmbeddedObject();

com.sun.star.chart2.XChartDocument oChart =
(com.sun.star.chart2.XChartDocument) UnoRuntime.queryInterface(
com.sun.star.chart2.XChartDocument.class, xInterface);

   
System.out.println("com.sun.star.chart2.XChartDocument="+oChart);
/* let the Calc document create a data provider, set it at the
chart*/
com.sun.star.chart2.data.XDataProvider oDataProv =
oChart.getDataProvider();

   com.sun.star.chart2.XDiagram oDiagram=oChart.getFirstDiagram();
 
System.out.println("com.sun.star.chart2.XDiagram="+oDiagram.toString());
  
   //insert a coordinate system into the diagram
   
   com.sun.star.chart2.XCoordinateSystemContainer oCoordSysCnt=
  
(com.sun.star.chart2.XCoordinateSystemContainer)UnoRuntime.queryInterface(com.sun.star.chart2.XCoordinateSystemContainer.class,
oDiagram);
   com.sun.star.chart2.XCoordinateSystem[] oCoordSys=
oCoordSysCnt.getCoordinateSystems();
  
System.out.println("com.sun.star.chart2.XCoordinateSystem[0]="+oCoordSys[0].toString());
  com.sun.star.chart2.XChartTypeContainer oChartTypeCnt=
  
(com.sun.star.chart2.XChartTypeContainer)UnoRuntime.queryInterface(com.sun.star.chart2.XChartTypeContainer.class,
oCoordSys[0]);
   
   
// get the servie manager rom the office
xMCF = xContext.getServiceManager();

// create a new instance of the the desktop
   
Object object = xMCF.createInstanceWithContext(
"com.sun.star.chart2.CandleStickChartType", xContext);
   com.sun.star.chart2.XChartType
stockChartType=(com.sun.star.chart2.XChartType) UnoRuntime.queryInterface(
com.sun.star.chart2.XChartType.class, object);
   
System.out.println("com.sun.star.chart2.XChartType="+stockChartType.toString());
 com.sun.star.chart2.XDataSeriesContainer dataSeriesCnt=
  
(com.sun.star.chart2.XDataSeriesContainer)UnoRuntime.queryInterface(com.sun.star.chart2.XDataSeriesContainer.class,
stockChartType);
   object = xMCF.createInstanceWithContext(
"com.sun.star.chart2.DataSeries", xContext);
   com.sun.star.chart2.XDataSeries
oSeries=(com.sun.star.chart2.XDataSeries) UnoRuntime.queryInterface(
com.sun.star.chart2.XDataSeries.class, object);
   dataSeriesCnt.addDataSeries(oSeries);
   
com.sun.star.chart2.data.XDataSink
dataSink=(com.sun.star.chart2.data.XDataSink) UnoRuntime.queryInterface(
com.sun.star.chart2.data.XDataSink.class, oSeries);
   com.sun.star.chart2.data.XDataSequence oSequence =
oDataProv.createDataSequenceByRangeRepresentation("$audusd_xls.$A$1239:$E$1740"
);
   XPropertySet oProp = (XPropertySet)UnoRuntime.queryInterface(
XPropertySet.class, oSequence );
oProp.setPropertyValue("Role", "values-y");
 object = xMCF.createInstanceWithContext(
"com.sun.star.chart2.LabeledDataSequence", xContext);
   com.sun.star.chart2.data.XLabeledDataSequence
oLabeledSequence=(com.sun.star.chart2.data.XLabeledDataSequence)
UnoRuntime.queryInterface(
com.sun.star.chart2.data.XLabeledDataSequence.class, object);
   oLabeledSequence.setValues(oSequence);
   com.sun.star.chart2.data.XLabeledDataSequence[]
aLabeledSequence={oLabeledSequence};
   dataSink.setData(aLabeledSequence);


-- 
View this message in context: 
http://www.nabble.com/combined-chart-type-using-com%3Asun%3Astar%3Achart2-tp19003238p19110966.html
Sent from the openoffice - api dev mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [api-dev] Howto create CalcAddin and then a .oxt File?

2008-08-22 Thread Tobias Krais
Hi Thomas,

we use Eclipse and created an ant file. May be it helps you:
-%<-






















































































































































































-%<-

Greetings, Tobias

Thomas schrieb:
> Hi Juergen,
> 
> i already wrote a Bugreport (see
> http://www.openoffice.org/issues/show_bug.cgi?id=92911 ) for the problem
> with netbeans. I hope this will be fixed soon. But i can't wait for the
> fix and have to write the plugin, so i want to do it without the help of
> netbeans. 
> I will try to use GNU make and hope i will understand.
> 
> Thanks & best regards,
> 
> Tom
> 
> 
> Am Freitag, den 22.08.2008, 13:25 +0200 schrieb Juergen Schmidt:
>> Hi Thomas,
>>
>> it is more interesting why the plugin doesn't work anymore.
>>
>> - on which platform do you work?
>> - which version of the plugin do you use?
>> - which office version do you use?
>> - which SDK version do you use?
>>
>> Related to your question, check the SDK add-in example to see how you 
>> can build an oxt package with gnu make. Maybe it's easier for you to 
>> understand the necessary steps as to read the ant scripts in NetBeans.
>>
>> And of course read the appropriate chapter in the DevGuide where you can 
>> find all the info about the package descriptor file description.xml. 
>> Maybe start with 
>> http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Extensions/Checklist_for_Writing_Extensions
>>
>> Juergen
>>
>>
>> Thomas wrote:
>>> Hi all,
>>>
>>> i developed already some Calc-Addins with Java and Netbeans and the
>>> OO-Netbeans-Plugin. Now i want to know the steps what i have to do to
>>> develop a Addin without Netbeans because the OO-Netbeans-Plugin doesn't
>>> work any longer (i already send a bug report).
>>> I already have:
>>> 1) a working plugin (CentralRegistrationClass.java,
>>> OOCalcAddin_Solar.java, XOOCalcAddin_Solar.java,
>>> OOCalcAddin_SolarImpl.java, CalcAddins.xcu, description.xml)
>>> 2) i can compile the idl-files to urd-files