[dev] OUString

2011-04-26 Thread Rohit Kulkarni
How do I convert OUString to normal const char * in .cxx file.
Because I am using ldap_open(const char*,int) function which has const char*
as parameter.

Regards,
Rohit
-- 
-
To unsubscribe send email to dev-unsubscr...@openoffice.org
For additional commands send email to sy...@openoffice.org
with Subject: help


[dev] Re: OUString

2011-04-26 Thread Mathias Bauer

On 26.04.2011 08:07, Rohit Kulkarni wrote:

How do I convert OUString to normal const char * in .cxx file.
Because I am using ldap_open(const char*,int) function which has const
char* as parameter.

Regards,
Rohit


rtl::OUString objects contain UniCode strings. If you want to convert 
them to a char* you need to provide an encoding that shall be used, e.g. 
RTL_TEXTENCODING_UTF8. With this encoding you can do it this way:


const char* p = rtl::OString(
myOUString.getStr(), myOUString.getLength(),
RTL_TEXTENCODING_UTF8 ).getStr();

Regards,
Mathias

--
Mathias Bauer (mba) - Project Lead OpenOffice.org Writer
OpenOffice.org Engineering at Oracle: http://blogs.sun.com/GullFOSS
Please don't reply to nospamfor...@gmx.de.
I use it for the OOo lists and only rarely read other mails sent to it.
--
-
To unsubscribe send email to dev-unsubscr...@openoffice.org
For additional commands send email to sy...@openoffice.org
with Subject: help


[dev] Re: OUString

2011-04-26 Thread tora - Takamichi Akiyama

On 26.04.2011 08:07, Rohit Kulkarni wrote:

How do I convert OUString to normal const char * in .cxx file.
Because I am using ldap_open(const char*,int) function which has const
char* as parameter.


On 2011/04/26 16:46, Mathias Bauer wrote:

rtl::OUString objects contain UniCode strings. If you want to convert them to a 
char* you need to provide an encoding that shall be used, e.g. 
RTL_TEXTENCODING_UTF8. With this encoding you can do it this way:

const char* p = rtl::OString(
myOUString.getStr(), myOUString.getLength(),
RTL_TEXTENCODING_UTF8 ).getStr();


And the same as what Mathias suggests:
 http://hg.services.openoffice.org/DEV300/file/tip/sal/rtl/source/debugprint.cxx
 http://hg.services.openoffice.org/DEV300/file/tip/sal/osl/all/utility.cxx
 http://hg.services.openoffice.org/DEV300/file/tip/sal/inc/sal/types.h

Those functions and methods might also be useful when you want print the string 
in your debugger.

To learn about OUString, look into sal/inc/rtl/ and sal/rtl/source/

Regards,
Tora
--
-
To unsubscribe send email to dev-unsubscr...@openoffice.org
For additional commands send email to sy...@openoffice.org
with Subject: help


[dev] Re: OUString

2011-04-26 Thread Rohit Kulkarni
Thank you for your reply.

On Tue, Apr 26, 2011 at 1:16 PM, Mathias Bauer nospamfor...@gmx.de wrote:

 On 26.04.2011 08:07, Rohit Kulkarni wrote:

 How do I convert OUString to normal const char * in .cxx file.
 Because I am using ldap_open(const char*,int) function which has const
 char* as parameter.

 Regards,
 Rohit


 rtl::OUString objects contain UniCode strings. If you want to convert them
 to a char* you need to provide an encoding that shall be used, e.g.
 RTL_TEXTENCODING_UTF8. With this encoding you can do it this way:

 const char* p = rtl::OString(
myOUString.getStr(), myOUString.getLength(),
RTL_TEXTENCODING_UTF8 ).getStr();

 Regards,
 Mathias

 --
 Mathias Bauer (mba) - Project Lead OpenOffice.org Writer
 OpenOffice.org Engineering at Oracle: http://blogs.sun.com/GullFOSS
 Please don't reply to nospamfor...@gmx.de.
 I use it for the OOo lists and only rarely read other mails sent to it.
 --
 -
 To unsubscribe send email to dev-unsubscr...@openoffice.org
 For additional commands send email to sy...@openoffice.org
 with Subject: help

-- 
-
To unsubscribe send email to dev-unsubscr...@openoffice.org
For additional commands send email to sy...@openoffice.org
with Subject: help


[dev] RuntimeException: [msci_uno bridge error] UNO type of C++ exception unknown

2011-04-26 Thread Grover Blue
I have a muti-threaded application that processes document mostly
asynchronous.  I synchronize all UnoRuntime.* API calls, but not such calls
as setting a table cell's value, etc.  Everything runs fine in development,
qa and in a production environment for one our clients.  We have another
client, however, where we are experience a complete breakdown.  While
processing, we continually get the following exception.  Both clients are
running version 3.3 of OpenOffice/UNO.  Has anyone experienced this or is
there a way to get more information/debug OpenOffice?

Here is how OpenOffice is launched from bootstrapconnector:
C:\Program Files\OpenOffice.org 3\program\soffice.exe -nologo -nodefault
-norestore -nocrashreport -nolockcheck -headless -nofirststartwizard
-accept=pipe,name=uno3869894507064209706;urp;

Here is the RuntimeException:

com.sun.star.uno.RuntimeException: [msci_uno bridge error] UNO type of C++
exception unknown: std.bad_alloc, RTTI-name=.?AVbad_alloc@std@@!
at
com.sun.star.lib.uno.environments.remote.Job.remoteUnoRequestRaisedException(Job.java:177)
at com.sun.star.lib.uno.environments.remote.Job.execute(Job.java:143)
at
com.sun.star.lib.uno.environments.remote.JobQueue.enter(JobQueue.java:335)
at
com.sun.star.lib.uno.environments.remote.JobQueue.enter(JobQueue.java:304)
at
com.sun.star.lib.uno.environments.remote.JavaThreadPool.enter(JavaThreadPool.java:91)
at
com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge.sendRequest(java_remote_bridge.java:639)
at
com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.request(ProxyFactory.java:151)
at
com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.invoke(ProxyFactory.java:133)
at $Proxy27.storeToURL(Unknown Source)
at com.company.ooo.FileManager.componentExport(FileManager.java:135)
at com.company.util.PDFGenerator.generatePDF(PDFGenerator.java:183)
at
com.company.util.PDFGenerator.generateSinglePDFFromDocumentList(PDFGenerator.java:106)
at
com.company.service.processor.DefaultPDFStoreServiceProcessorNG.process(DefaultPDFStoreServiceProcessorNG.java:161)
at
com.company.service.DefaultPDFStoreService.process(DefaultPDFStoreService.java:38)
at com.company.core.PrintServiceThread.run(PrintServiceThread.java:129)
Apr 25, 2011 9:59:16 AM com.company.util.SyslogUtil logEvent


I'm attempting to export a PDF file named
C:/COMPANY/temp/d7255f23-f2da-42ad-972e-3fda3e42b066.pdf with the following:

public static void componentExport(XComponent xComponent, PropertyValue[]
properties, String storeFile) throws DocumentException {
XStorable xStorable = null;
synchronized (accessLock) {
try {
xStorable = (XStorable)
UnoRuntime.queryInterface(XStorable.class, xComponent);
xStorable.storeToURL(file:/// + storeFile, properties);
} catch (com.sun.star.uno.RuntimeException e) {
xStorable = null;
xRemoteContext = null;  // OOo will be relaunched
xRemoteServiceManager = null;
e.printStackTrace();
throw new DocumentException(Failed to store file:  +
storeFile, e);
} catch (java.lang.Exception e) {
xStorable = null;
throw new DocumentException(Failed to store file:  +
storeFile, e);
}
}
xStorable = null;
}


public class PDFGenerator {
private PropertyValue[] pdfStoreProps;


public PDFGenerator(){
PropertyValue[] filterData = new PropertyValue[2];

filterData[0] = new PropertyValue();
filterData[0].Name = UseLosslessCompression;
filterData[0].Value = Boolean.FALSE;

filterData[1] = new PropertyValue();
filterData[1].Name = ExportFormFields;
filterData[1].Value = Boolean.FALSE;

pdfStoreProps = new PropertyValue[4];
pdfStoreProps[0] = new PropertyValue();
pdfStoreProps[0].Name = FilterName;
pdfStoreProps[0].Value = DocumentType.WRITER_PDF_EXPORT;

pdfStoreProps[1] = new PropertyValue();
pdfStoreProps[1].Name = Pages;
pdfStoreProps[1].Value = All;

pdfStoreProps[2] = new PropertyValue();
pdfStoreProps[2].Name = Overwrite;
pdfStoreProps[2].Value = Boolean.TRUE;

pdfStoreProps[3] = new PropertyValue();
pdfStoreProps[3].Name = FilterData;
pdfStoreProps[3].Value = filterData;
}

/**
 * Generates one PDF from all the documents
 * @param copies The number of document copies to be generated
 * @param documents A hashtable holding the documents as XComponent
 * @param path The folder where the PDF will be stored
 * @param fileName  The name of the PDF to be generated
 */

public final PrintProcessStatus generateSinglePDFFromDocumentList(int
copies,

LinkedListTextDocumentReference documents,
   

[dev] OpenOffice.org status and v3.4 final release

2011-04-26 Thread Allen Pulsifer
Greetings,

Normally the OpenOffice.org holds a Release Status Meeting every Monday and
reports the minutes at
http://wiki.services.openoffice.org/wiki/ReleaseStatus_Minutes .  I notice
that no meeting has been held the last two Mondays.  Is anyone working on a
final release of OpenOffice.org v3.4?  For example, the web page at
http://wiki.services.openoffice.org/wiki/OOoRelease34 lists the following
persons that are responsible for some aspect of the release: antbryan, hde,
ja, jsc, md, mike, mla, and rosana.  Which of those persons, if any, are
still involved in the release and or involved in the OpenOffice.org project?

Second, according to http://council.openoffice.org/ , the following persons
are members or deputy members of the OpenOffice.org Community Council: Louis
Suárez-Potts, Matthias Huetsch, Kazunari Hirano, Stefan Taxhet, Martin
Hollmichel, Andreas Bartel, Juergen Schmidt, Carsten Driesner, Eike Rathke.
Which if any of these persons remain involved with the OpenOffice.org
project?  When is the next meeting of the OpenOffice.org Community Council?
Would any member of the OpenOffice.org Community Council care to comment or
inform us of the current status of the project?

Thank you,

Allen Pulsifer


-- 
-
To unsubscribe send email to dev-unsubscr...@openoffice.org
For additional commands send email to sy...@openoffice.org
with Subject: help


[dev] Re: [marketing-dev] OpenOffice.org status and v3.4 final release

2011-04-26 Thread Louis Suarez-Potts

On 2011-04-26, at 10:23 , Allen Pulsifer wrote:

 Greetings,
 
 Normally the OpenOffice.org holds a Release Status Meeting every Monday and
 reports the minutes at
 http://wiki.services.openoffice.org/wiki/ReleaseStatus_Minutes .  I notice
 that no meeting has been held the last two Mondays.  Is anyone working on a
 final release of OpenOffice.org v3.4?  
Yes.
3.4 will be going out, as I was informed of this by Mathias Bauer, cc'd here.



 For example, the web page at
 http://wiki.services.openoffice.org/wiki/OOoRelease34 lists the following
 persons that are responsible for some aspect of the release: antbryan, hde,
 ja, jsc, md, mike, mla, and rosana.  Which of those persons, if any, are
 still involved in the release and or involved in the OpenOffice.org project?
 
 Second, according to http://council.openoffice.org/ , the following persons
 are members or deputy members of the OpenOffice.org Community Council: Louis
 Suárez-Potts, Matthias Huetsch, Kazunari Hirano, Stefan Taxhet, Martin
 Hollmichel, Andreas Bartel, Juergen Schmidt, Carsten Driesner, Eike Rathke.
 Which if any of these persons remain involved with the OpenOffice.org
 project?j

All.



  When is the next meeting of the OpenOffice.org Community Council?

We had an informal one last Thursday to discuss the announcement by Edward 
Screven Oracle regarding Oracle's intentions for OOo. Nothing was concluded, as 
none of us has any special information.

From my perspective, the most important thing is to continue with the 
development of OOo and the ODF so that the market and those who use and depend 
upon the application are not disappointed.


 Would any member of the OpenOffice.org Community Council care to comment or
 inform us of the current status of the project?

Yes, I would be happy to. I'd be even happier to know what is really going on.

I have been acting as directly as possible, to preserve this project and its 
community, and to ensure that its value is both appreciated and even grows. But 
I just have zero real knowledge, though I do hope that changes Real Soon Now.

Regardless, I am quite optimistic that the outcome will be more than 
satisfactory and put OOo on truly solid ground—not one based on rhetoric but 
code  and community engagement, including that of the developers. But let's 
see…. 

I'll be posting too to my blog, http://ooo-speak.blogspot.com/ 
 
 Thank you,
 
 Allen Pulsifer
 
 
-Louis


-- 
-
To unsubscribe send email to dev-unsubscr...@openoffice.org
For additional commands send email to sy...@openoffice.org
with Subject: help