Re: [dev] error: stripped_parser.y: conflicts: 5 shift/reduce
xili wrote: Hi, I am trying to build OpenOffice under Windows platform. Source File is: OOo_2.0beta2_src.tar.gz My OS is : Windows XP with Service Pack 2 Compiler: MS visual studio 2003 Bison version: 1.875b(20030307-1) I met this problem: = Making: ../wntmsci10.pro/misc/parser.cxx tr -d \015 parser.y ../wntmsci10.pro/misc/stripped_parser.y bison -d -l -o ../wntmsci10.pro/misc/parser.cxx ../wntmsci10.pro/misc/stripped_p arser.y ../wntmsci10.pro/misc/stripped_parser.y: conflicts: 5 shift/reduce dmake: Error code 141, while making '../wntmsci10.pro/misc/parser.cxx' ---* TARGET.MK *--- dmake: Error code 255, while making '../wntmsci10.pro/misc/idlc.dpc' ---* TG_SLO.MK *--- ERROR: Error 65280 occurred while making /cygdrive/c/OOo_2.0beta2/idlc/source dmake: Error code 1, while making 'build_instsetoo_native' ---* tg_merge.mk *--- = Can someone help please. Thanks. The grammar of the idlc parser does have some harmless shift/reduce conflicts. Normally, bison does not generate an error for this---are you using a nonstandard one? -Stephan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[dev] warnings01: Windows no copy possible warnings
Hi, warnings under Windows there exist the following four warnings: C4625: copy constructor could not be generated because a base class copy constructor is inaccessible C4626: assignment operator could not be generated because a base class assignment operator is inaccessible C4511: copy constructor could not be generated C4512: assignment operator could not be generated These warnings occur when a base class is not copyable or a member variable is not copyable which causes the class itself to be non copyable as well. C4625 and C4626 occur in a direct derivation of a non-copyable class, C4511 and C4512 in second level or further derivations. The warning gives only redundant informaton, because every time one tries to copy (or assign) such a class, the compiler will throw an error. Example code class Abc { public: Abc(); private: // Idiom to make a class non-copyable: Abc(const Abc); // not accessible Abc operator=(const Abc); // ... as well }; class Bcd { public: Bcd(int a) : n(a) {} private: int n; Abc x; // Non copyable member }; // Declaration of class Bcd causes warnings C4625 and C4626 class C : public Bcd// non copyable base class {public: C() {} }; // Declaration of class C causes warnings C4511 and C4512 void f() { Bcd a(5); Bcd b(a); // error a = b; // error C c; C d(c); // error c = d; // error } workaround when keeping the warnings The warnings can be work-arounded by declaring copy-constructor and assignment-operator explicitely private in every derived or containing class like this: class C : public Bcd {public: C() {} private: // Avoid copying: C(const C);// declared but not implemented C operator=(const C);// ... }; This is a possible workaround which ... positively: makes it immediately visible that this class is not to copy negatively1: annihilates the boost idiom of deriving from class noncopyable (see http://www.boost.org/libs/utility/utility.htm#Class_noncopyable) negatively2: is much more writing work and not clearer than the boost solution - see here: class C : public boost::noncopyable C() {} }; Conclusion and suggestion = 1) The warnings don't give any additional information. Any attempt to copy such a class results in a compiler error anyway. 2) The warnings annihilate the boost noncopyable-idiom 3) The warning tells the developer something that was intended anyway, so he does not want to be told again. In case it was not intended, see 1) So, my suggestion: let's switch off the windows warnings C4625, C4626, C4511, C4512. Regards, Nikolai - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [dev] warnings01: Windows no copy possible warnings
Nikolai Pretzell wrote: workaround when keeping the warnings The warnings can be work-arounded by declaring copy-constructor and assignment-operator explicitely private in every derived or containing class like this: class C : public Bcd {public: C() {} private: // Avoid copying: C(const C);// declared but not implemented C operator=(const C);// ... }; This is a possible workaround which ... positively: makes it immediately visible that this class is not to copy negatively1: annihilates the boost idiom of deriving from class noncopyable (see http://www.boost.org/libs/utility/utility.htm#Class_noncopyable) negatively2: is much more writing work and not clearer than the boost solution - see here: class C : public boost::noncopyable C() {} }; Ok, here I choose a bad example, because the class C has not the same semantics anymore (is no longer derived from Bcd). Nevertheless, these warnings make the use of the boost idiom impossible and transfer the need to explicitley declare two non implemented functions in all derived on containing classes. Nikolai - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [dev] warnings01: Windows no copy possible warnings
Nikolai Pretzell [EMAIL PROTECTED] writes: [about another one of those MSVCC 'hey, you've just used a C++ language feature' warnings] So, my suggestion: let's switch off the windows warnings C4625, C4626, C4511, C4512. +1 -- Thorsten If you're not failing some of the time, you're not trying hard enough. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [dev] OO2 130 and OfficeBean
Many thanks for the example. We will try to reproduce this issue and submit an issue if necessary. Joachim snpe wrote: On Friday 30 September 2005 03:21 pm, Joachim Lingner wrote: I am not sure if I understand. Does the example odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment work or not? work same in gtk and kde - resizing (for example, maximizing windows doesn't work correct in gtk, only) Previous (OOoBeanExample) work perfect on kde. I cannot say what happens when one uses OOoBean with that special eclipse frame. Anyway, the general problem with gtk should be reproducable with you previous example. If you like, you can submit an issue and attach your previous example (should be complete and runnable), so we can later reproduce this bug. eclipse frame work like awt frame, but it isn't important.I make example with JFrame zip is in attach.You have to do next for execute (this is ugly, but it is for test only and I know that I can use classloader) : -Djava.library.path=$OFFICE_HOME/program This is for loading libraries libnativeview.so - don't use classloader, compiled on rh 8.0 gcc 3.2 - changed packagge name form original only move libnativeview.so in $OFFICE_HOME/program set jars juh.jar,jurt.jar,ridl.jar and unoil.jar in classpath (or import eclipse project) Start class ooffice.test.Main I work with jdk 1.5.0 update 5 (I try and with mustang b53 and it is same) My results : - work fine with kde (open, resizing etc - it isn't necesary open OO document twice) - gtk open document fine , but I have to call openDocument twice (commented in Main.java) resizing doesn't work (try maximize frame) It work same with Frame instead JFrame Thanks - 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]
Re: [dev] warnings01: Windows no copy possible warnings
Nikolai Pretzell wrote: [...] Conclusion and suggestion = 1) The warnings don't give any additional information. Any attempt to copy such a class results in a compiler error anyway. The information is given when defining the class, not when using it, so the warning can be of value when creating an API, for example (and unit tests for that API might not trigger those copy ctors and assignment ops). 2) The warnings annihilate the boost noncopyable-idiom In how far do the warnings annihilate boost::noncopyable? The only issue I see is that the workaround (declaring private, undefined functions) and boost::noncopyable express the same thing, so using them both is redundant. 3) The warning tells the developer something that was intended anyway, so he does not want to be told again. In case it was not intended, see 1) So, my suggestion: let's switch off the windows warnings C4625, C4626, C4511, C4512. Regards, Nikolai -Stephan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [dev] Automate export to PDF
Hi Cameron, I want to be able to automate on a server the exporting of OpenDocuments to PDF. Can someone point me to resources that would help me in doing so? you could use the UNO API ... for example to store a given xTextDoc to pdf, the following java-snippet should be useful PropertyValue[] PDFArgs = new com.sun.star.beans.PropertyValue[1]; PropertyValue PDFArgs[0] = new com.sun.star.beans.PropertyValue; PDFArgs[0].Name = FilterName; PDFArgs[0].Value = writer_pdf_Export; XStrorable store = (XStorable) UnRuntime.queryInterface(XStorable.class, xTextDoc); store.storeToURL(/path/to/your/destination/nicename.pdf,PDFArgs); Hope that helps Regards Stephan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [dev] Automate export to PDF
On Fri, 2005-09-30 at 11:34 +1000, Cameron Zemek wrote: Hi Cameron, I want to be able to automate on a server the exporting of OpenDocuments to PDF. Can someone point me to resources that would help me in doing so? I wrote a simple shell script with one BASIC macro for automated conversion from all supported formats to PDF format. Old macro, shell script: http://blog.vojta.name/archives/2005-04-03T23_43_03.html Macro update: http://blog.vojta.name/archives/2005-04-04T22_22_17.html Here you can learn how to do it with UNO API. Hmm, I saw some webpage few months ago with similiar thing, but I can't find it now :( I tried Google and found this - ServOO http://www.servoo.net/. It's written in Java, some conversion, maybe it can help you too. Regards, Robert -- Robert Vojta http://blog.vojta.name/ It's God. No, not Richard Stallman, or Linus Torvalds, but God. (By Matt Welsh) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]