[dev] Re: OpenOffice sourse code

2011-06-25 Thread tora - Takamichi Akiyama

Hi,

It could be easy to implement your desire as you might guess, I think.

The key module would be vcl in the source code of OpenOffice.org.

outdev.hxx defines the OS independent interface of virtual devices such as OS 
dependent real display devices, printer, PDF exporter, and so on. The upper 
applications such as Writer, Calc, and Impress work with the virtual devices 
through the interface.
http://hg.services.openoffice.org/OOO330/file/OOO330_m20/vcl/inc/vcl/outdev.hxx
http://hg.services.openoffice.org/OOO330/file/OOO330_m20/vcl/source/gdi  
outdev?.cxx

To build your own cloud version of OpenOffice.org, you could add a new virtual 
device that serves your remote users.

E.g. the virtual device could be a hand-made web server that translates GET and 
PUT requests from the client side into key/mouse events and drawing actions for 
the upper applications.

IMHO, if I were you, I would not use any web protocol to realize it. Because it 
might require thousands of lines of JavaScript as AJAX in the client side. 
Despite the efforts, its quality might be poorer than a real OpenOffice.org.

So, how? The virtual device would draw texts and shapes on the internal bitmap 
virtual display first and then send the changes of bitmap via well-known VNC 
server protocol or video streaming protocol to the client side.

The idea comes from my situation where a VNC server is located in my SOHO in 
Japan and I travel to the US, Germany, Italy, China, ... Wherever I were, the 
view of OpenOffice.org running on a virtual machine can be projected on my 
laptop through VNC viewer. Before leaving the US I leave a document of 
OpenOffice.org open and close the VNC connection. After arriving at a hotel in 
Germany I can work with the document without any interruption. For me, that is 
the cloud.

Anyway, I believe you can do it! :-)
Serving several users concurrently for a single document might be much more 
challenging and attractive.

Source files of OpenOffice.org 3.3.0
http://download.services.openoffice.org/files/stable/3.3.0/
Get files OOo_3.3.0_src_xxx.tar.bz2 and extract them.

And then follow Alexandro's suggestion:

On 2011/06/26 2:31, Alexandro Colorado wrote:

Not a trvial job since OOo has more than 9 million of lines of code 
http://www.openoffice.org/FAQs/build_faq.html#source. But you will find most 
of the information here:
http://wiki.services.openoffice.org/wiki/Development#Getting_started_with_OOo_development


There might be much more cool, pragmatic ways. Anyone, any suggestions?

Best 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: Implementation of Row Exchange Button in Calc

2011-06-17 Thread tora - Takamichi Akiyama

Hi Oliver,

On 2011/06/17 1:12, Oliver Brinzing wrote:
 Quickly move Rows and columns like in Writer
 http://openoffice.org/bugzilla/show_bug.cgi?id=40285

 have a look at the attached example ;-)

Thanks! That is what I thought.

And now, I also have written a similar one. ;-)
https://bitbucket.org/tora/calc-move-selected-cells/src/tip/src/calc-move-selected-cells.bas.txt

Best 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: Implementation of Row Exchange Button in Calc

2011-06-17 Thread tora - Takamichi Akiyama

Oops, there was a typo bug.

Now fixed:
https://bitbucket.org/tora/calc-move-selected-cells

Best,
Tora

On 2011/06/17 23:40, tora - Takamichi Akiyama wrote:

Hi Oliver,

On 2011/06/17 1:12, Oliver Brinzing wrote:
  Quickly move Rows and columns like in Writer
  http://openoffice.org/bugzilla/show_bug.cgi?id=40285
 
  have a look at the attached example ;-)

Thanks! That is what I thought.

And now, I also have written a similar one. ;-)
https://bitbucket.org/tora/calc-move-selected-cells/src/tip/src/calc-move-selected-cells.bas.txt

Best 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: Implementation of Row Exchange Button in Calc

2011-06-17 Thread tora - Takamichi Akiyama

On 2011/06/17 16:38, Martin Hediger wrote:

Its true, i havent thought of the implications of what it means to switch rows. Should 
references pointing to cell A1 remain pointing to A1, when the content of A1 is 
traded for the content of B1? What should the references follow?

But apart from that, the way to exchange two rows is I believe indeed achieved 
most easily by a combination of the insert_row(), move_row(), delete_row() 
methods.


If you want to swap the contents of two rows or columns but you do not want to 
change their references, it might be a set of
1. insert_row as a temporal space,
2. COPY_row 1 to the temporal space,
3. COPY_row from 2 to 1,
4. COPY_row from the temporal row to 2,
5. and delete_row the temporal space.

It might look like:
  int a = 1;
  int b = 2;
  int t;
  t = a;
  a = b;
  b = t;

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


[dev] Potential dead lock during preparation of crash report

2011-06-13 Thread tora - Takamichi Akiyama

This is another thread forked from:

 2. Potential dead lock
 A code for crash reporter has a potential, dead lock problem.
 http://openoffice.org/projects/www/lists/dev/archive/2011-06/message/50

Here are codes to avoid a potential deadlock that might occurs
during preparation of crash report.
https://bitbucket.org/tora/avoid-potential-deadlock-during-preparation-of-crash-report

(a) Provided a set of alternate library functions for fopen(), fprintf(), ...
(b) Replaced functions such as fprintf(), fputs() with the alternatives.
(c) Replaced functions such as fopen(), fread() with open(), read().
(d) Substituted rtl_uString to char *
(e) Changed the timing of evaluating command line options from the
inside of signal handler to the inside of SAL initialization.

Notes: Original codes that I wrote included more additional lines. The
files above are manually rewritten by removing unrelated code fragments
from the original ones. I think the codes above work well since the
original ones are working, but not yet tested the above ones at all.

Best 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: refactoring OUString

2011-06-09 Thread tora - Takamichi Akiyama

On 2011/06/08 0:22, Niklas Nebel wrote:

Of course we should try to make more use of multiple threads. This isn't a new 
idea either, see 
http://wiki.services.openoffice.org/wiki/Calc/Performance/misc. Christian did 
some experiments with parallel loading a while ago 
(http://blogs.oracle.com/GullFOSS/entry/xml_performance_and_now_for). The 
results for Impress weren't spectacular, but Calc or Writer may be different.


Yep! I am a multithread, data-driven programming lover, too. :-)


On 07.06.2011 13:15, tora - Takamichi Akiyama wrote:

2) Slicing cheese and throwing them out at once
For the internal tasks such as Save as and Export to we might get
a big advantage. Such a task starts from the framework, calls thousands
of methods, and finally leaves the only single value meaning a SUCCESS
or FAILURE. No String instance involved during the task is needed to be
persistent.


On 2011/06/08 0:22, Niklas Nebel wrote:

Right now, that isn't entirely true. For example, saving might need to 
calculate a formula, and the calculated result is then kept in the cell, in a 
string that continues to be referenced after saving. There might be similar 
cases elsewhere. These would probably have to be moved into a separate step 
before saving. Sounds a bit fragile, but then it could actually save a 
significant amount of time.


That is why I would like to encourage programmers to take care of the life time 
of data.

For instance, in the user scenario below, there might be
 (1) data lasting until the soffice.bin quits.
 (2) data lasting until a document is closed.
 (3) data lasting until a current thread ends.
 (4) data lasting until a certain task finishes.
 (5) data lasting until a current function call returns.

 1. File - New - Spreadsheet
 2. work on it and save it.
 3. File - Close.

In the step 1, construct an instance of memory allocator for (2).
In the step 2, use it to allocate memory chunks lasting as long as the document 
is open.
In the step 3, destroy the allocator to completely free the allocated memory.

Lessons we might have learned:
 We can implement and utilize some purpose oriented memory allocators as well 
as the general, expensive one: malloc() and free().

 Programmers may wisely choose what memory allocator is appropriate for 
questioned data.



On the other hand, now might be a perfect time to discuss crazy ideas, 
without mundane details getting in the way.


Aha! here is another crazy ideas :-)

 https://bitbucket.org/tora/ooo-idea-zstring/src

  memory_allocator_for_zstring.cxx
shows an idea of reusable, cache, memory allocation mechanism for new String class. 
The key concept here is not to actually free the memory being freed, but to 
cache it for a later use.

  Reuse the most recently freed memory first so that the Translation Lookaside 
Buffer (TLB) achieves higher hit ratio.

  In contrast, if the oldest freed memory is used first, the entire system 
performance might suffer because the relevant entry is surely absent from the 
TLB and, moreover, the relevant memory page might have been swapped out to a 
disk device.

  vec.hxx
implements a c++ template for cheaply expandable vector.

  test_vec.cxx
demonstrates usage of vec.hxx

Best 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: [l10n-dev] How to build OOo with additional localizations

2011-06-09 Thread tora - Takamichi Akiyama

Cross-posting to dev@openoffice.org and d...@l10n.openoffice.org
Please follow up to d...@l10n.openoffice.org

On 2011/06/09 16:25, Dmitry A. Ashkadov wrote:
 I have cloned repository DEV300. It doesn't contain localizations. For 
localizations there is another repository. How can I build OOo with localizations? 
Should I clone l18n repository to subdirectory l20n inside DEV300 repository?

I would like to know about it, too! :-)

Here is what I currently have:

  |-- DEV300_m106  -- http://hg.services.openoffice.org/DEV300
  |-- ext_sources
  `-- l10n -- http://hg.services.openoffice.org/master_l10n/DEV300
   |-- Repository.mk
   |-- RepositoryFixes.mk
   `-- l10n
   |-- localization_present.mk
   |-- prj
   |-- source
   |-- unxsoli4
   `-- util

 symbolic link:  DEV300_m106/l10n - ../l10n/l10n

Best 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: [l10n-dev] How to build OOo with additional localizations

2011-06-09 Thread tora - Takamichi Akiyama

Hi Ariel,


On 2011/06/09 16:25, Dmitry A. Ashkadov wrote:
I have cloned repository DEV300. It doesn't contain localizations. For
localizations there is another repository. How can I build OOo with
localizations? Should I clone l18n repository to subdirectory l20n
inside DEV300 repository?


On 2011/06/09 18:13, Ariel Constenla-Haile wrote:

I used the following mail to build with localization:

http://openoffice.org/projects/www/lists/dev/archive/2011-03/message/4
[I guess this should be copied somewhere in the building guide on the wiki]

See also:
http://wiki.services.openoffice.org/wiki/Source_config


Informative!!!

Thanks a lot.
Tora



smime.p7s
Description: S/MIME Cryptographic Signature


[dev] Re: refactoring OUString

2011-06-09 Thread tora - Takamichi Akiyama

Sorry, this mail is too long...


On Thu, Jun 9, 2011 at 9:20 AM, tora - Takamichi Akiyama t...@openoffice.org 
mailto:t...@openoffice.org wrote:
That is why I would like to encourage programmers to take care of the life 
time of data.


I know that that statement is controversial.

On 2011/06/09 18:02, Stephan Bergmann wrote:

First of, I am doubtful that encouraging manual memory management is a good 
idea.  Errors in manual memory management probably are the cause for the vast 
majority of severe failures in C/C++ programs.


Please be noticed that I don't say programmers should need to explicitly call 
memory management related functions such as malloc() or free().

Rather, I would like to suggest thinking of the characteristics of the 
questioned data.

1. Delegation of the responsibility to choose a type of memory allocator
To achieve both stability and performance at the same time, I would like to propose Don't do 
all of it in the SAL, rather Delegate certain responsibility to its users, i.e. 
programmers.

Who knows the type of life time of data? SAL does? No. The programmers do.

Life time of data
 (1) data lasting until the soffice.bin quits.
 (2) data lasting until a document is closed.
 (3) data lasting until a current thread ends.
 (4) data lasting until a certain task finishes.
 (5) data lasting until a current function call returns.
 (6) data lasting until a current block ends.

Multithread awareness
 (a) data that is shared with more than one threads.
 (b) data that is used in the only this thread.

Asynchronous awareness
 (i) data that is used in a asynchronously called function such as a signal 
handler.
 (ii) data that is used in a normal function.


2. Potential dead lock
A code for crash reporter has a potential, dead lock problem.
http://hg.services.openoffice.org/DEV300/file/tip/sal/osl/unx/backtrace.c
Asynchronous-unsafe functions such as fprintf() are used in the context of 
signal handler.

Consider this situation:
1. A Segment violation, aka SEGV occurs in malloc() or free() due to memory 
corruption. Such a function holds the global mutex lock.
2. The first call of fprintf(), it internally calls malloc() to obtain a memory 
area as a text buffer. Then a dead lock occurs.

For that topic, I would be posing a question later.


 Hence, I would always try to abstract from actual memory as much as possible. 
 (Performance considerations are of course valid, but they must be balanced 
against safety and maintainability considerations.)

3. Come up with the exciting measures
There in no need to keep relying on the traditional approaches invented in the 
20th century.

With my experiences from 8 bit processor, I certainly believe the programmers' 
awareness of how memory area is treated is the crucial factor to achieve 
performance, safety, and maintainability at the same time.

I do not have an objection against your idea abstraction, though.

=
// Slicing cheese and throwing them out at once
#define ALLOCATION_SIZE ( 1024 * 1024 ) // 1MB
#define ALIGNMENT   4

void* SCATTOAO::xmalloc( size_t nSize )
{
nSize = ( ( nSize - 1 ) / ALIGNMENT + 1 ) * ALIGNMENT;
if ( m_nRest  nSize ) {
nAllocationSize = ( ( nSize - 1 ) / ALLOCATION_SIZE + 1 ) * 
ALLOCATION_SIZE;
p = memory_page_allocation( nAllocationSize, PRIVATE|ANONIMOUS );
m_vector.append( Entry( p, nAllocationSize ) );
m_pNose = p;
n_nRest = nAllocationSize;
}
ret = m_pNose;
m_pNose += nSize;  // Slice a block of cheese
m_nRest -= nSize;
return (void *) ret;
}

void SCATTOAO::xfree( void* )
{
// do nothing at all
}

SCATTOAO::~SCATTOAO()
{
if ( Applicatoin::IsMemoryCheckRequested() )
for ( iterator m_vector )  // Turn them to be a trap
alter_page_attribute( *it, NO_READ_ACCESS|NO_WRITE_ACCESS|NO_EXEC );
else
for ( iterator m_vector )  // Throw them at once
memory_page_deallocation( it-m_pAddress, it-m_nSize );
}
=

Please have a look at an additional code fragment in the destructor above:

if ( Applicatoin::IsMemoryCheckRequested() )
for ( iterator m_vector )  // Turn them to be a trap
alter_page_attribute( *it, NO_READ_ACCESS|NO_WRITE_ACCESS|NO_EXEC );

1. soffice.bin is invoked with a new command line option such as -memorycheck
2. Applicatoin::IsMemoryCheckRequested() returns TRUE.
3. The memory pages being freed turns to be a trap.
4. A problematic code mistakenly attempts to read or write data in the 
already-freed-memory-area.
5. The trap sets off the alarm and an interruption is sent by the OS.
6. A signal handler in the SAL catches the interruption.
7. A crash report that reveals the exact location of the code is made.

We have been cultivating thousands of test scenarios for more than a decade.
Just leave the qatesttool running for a day and night with the option 
-memorycheck.


4. Utilizing the cutting-edge technology invented in the 21th century.

solaris$ cat

[dev] Re: refactoring OUString

2011-06-07 Thread tora - Takamichi Akiyama

On 06.06.2011 19:43, tora - Takamichi Akiyama wrote:

And also, please cover the underlying memory allocation mechanism which
would be another key factor for the performance improvement.


On 2011/06/07 3:04, Niklas Nebel wrote:

There's an old suggestion to treat small strings differently, see 
http://wiki.services.openoffice.org/wiki/Uno/Binary/Analysis/String_Performance.


Thank you for the information!

In addition to it, I am wondering if these ideas might help a lot.

As many already know, malloc() is too general and too expensive.
Moreover, free() is much more expensive than malloc().
e.g. a source code of malloc() in glibc:
http://sourceware.org/git/?p=glibc.git;a=blob;f=malloc/malloc.c

Not only the large number of machine instructions, but also its waste
of memory usage affects the system-wide performance.
In reality, malloc(1) consumes 32 bytes on CentOS 5.4 64 bit kernel:
http://tora-japan.com/wiki/Boundaries_of_memory_allocation_with_malloc%28%29


Even though current OpenOffice.org runs as a multi-thread process,
it runs as if it is a single thread. So, we could have several options
to implement its underlying memory allocation mechanism for the specific
purposes of OpenOffice.org.

1) Memory allocation mechanism used in a kernel
For temporal use, utilize the memory allocation mechanism similar to
the one normally used in a kernel. Use a single bit to hold the status
of memory chunk. e.g: 0 means vacant ; 1 denotes occupied. The size of
memory chunk could be 128, 256, 512, 1024, ...

2) Slicing cheese and throwing them out at once
For the internal tasks such as Save as and Export to we might get
a big advantage. Such a task starts from the framework, calls thousands
of methods, and finally leaves the only single value meaning a SUCCESS
or FAILURE. No String instance involved during the task is needed to be
persistent.

#define ALLOCATION_SIZE ( 1024 * 1024 ) // 1MB
#define ALIGNMENT   4

void* SCATTOAO::xmalloc( size_t nSize )
{
nSize = ( ( nSize - 1 ) / ALIGNMENT + 1 ) * ALIGNMENT;
if ( m_nRest  nSize ) {
nAllocationSize = ( ( nSize - 1 ) / ALLOCATION_SIZE + 1 ) * 
ALLOCATION_SIZE;
p = memory_page_allocation( nAllocationSize, PRIVATE|ANONIMOUS );
m_vector.append( Entry( p, nAllocationSize ) );
m_pNose = p;
n_nRest = nAllocationSize;
}
ret = m_pNose;
m_pNose += nSize;  // Slice a block of cheese
m_nRest -= nSize;
return (void *) ret;
}

void SCATTOAO::xfree( void* )
{
// do nothing at all
}

SCATTOAO::~SCATTOAO()
{
for ( iterator m_vector )  // Throw them at once
memory_page_deallocation( it-m_pAddress, it-m_nSize );
}

The instance of allocator class SCATTOAO is a thread specific object and
it is used by the only own thread. Therefore, no mutex lock is required.

I think the above are just a tip of potential, brilliant ideas.
Let's discuss later this kind of topic once the surrounding situation is 
settled.

Best 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: HELP REQUIRED

2011-06-07 Thread tora - Takamichi Akiyama

 On Tue, Jun 7, 2011 at 9:37 AM, Shashank Sharma shashan...@iitrpr.ac.in 
mailto:shashan...@iitrpr.ac.in wrote:

 hello,
 I am a undergraduate student of third year (INDIAN INSTITTE OF 
TECHNOLOGY-IIT) and wants to develop new functionality in open office.before 
trying on the features of to do list , i want to add small functionality.However i 
am not clear how to start and how to proceed further.Also i started reading 
developers guide and it was not much clear to me
 Can u please provide me with some guidance and help on how to *start from 
scratch

Extension is deep and big enough like the ocean...

1. Tool - Macros - Organize Macros - OpenOffice.org Basic
2. [Organizer...]
3. Libraries tab
4. [New...]
5. Name it e.g. Libaray1, [OK]
6. [Edit]
7. Paste a sample code. e.g.

Sub Main
sURL = private:factory/scalc
oDoc = StarDesktop.loadComponentFromURL( sURL, _blank, 0, Array())
oCell = oDoc.getSheets().getByIndex(0).getCellByPosition(0,0)
oCell.setValue(123)
print oCell.dbg_methods
print oCell.dbg_properties
End Sub

8. Run BASIC on the tool bar
9. Save BASIC on the tool bar
10. Select Module on the tool bar
11. Libraries tab
12. Choose the one named on the step 5.
13. [Export...]
14. Export as extension [OK]
15. Name it, [Save]

Now you have the first your own extension whose file name extension is .oxt
It is actually a ZIP archive file.

16. Rename xxx.oxt to xxx.oxt.zip
17. Extract the zip file and look into several internal files.

In addition to the developer's guide:
http://www.oooforum.org/
http://user.services.openoffice.org/en/forum/
http://api.openoffice.org/docs/common/ref/com/sun/star/frame/XComponentLoader.html#loadComponentFromURL

You have an opportunity to find how to add a menu item and an icon
button on the tool bar. How to control your OpenOffice.org. ...

The forum would help you a lot rather than this mailing list.
This ML is intended for development of OpenOffice.org itself, i think :-)

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


[dev] refactoring OUString

2011-06-06 Thread tora - Takamichi Akiyama

Has anyone tried refactoring OUString?

 - It converts iso-8859-1 letters ranging 0x00-0x7f into UCS2 even it is not 
necessary.
 - It requires malloc(), realloc(), and free() or their equivalents.
 - It prevents debugging efforts because of sal_Unicode buffer[1].
 - It mixtures different purposes: passing/returning parameters and 
long-lasting data.
 - and else...

Best 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: refactoring OUString

2011-06-06 Thread tora - Takamichi Akiyama

On 2011/06/07 0:27, Michael Stahl wrote:
 refactoring OUString has to be done carefully because it is a central part
 of the URE API/ABI and those must be compatible.

 a number of people here have come to the conclusion that it would be an
 improvement to use ::rtl::OString with UTF8 encoding as the standard
 string type, but unfortunately this would be an enormous effort to change,
 and it would mean breaking the backward compatibility of the C++ UNO
 binding, so it was never likely to actually happen.

 so far we haven't even got rid of the tools strings... sigh.

I see.

This is just an idea. How about adding a new class besides OUString?

class ZString
{
sal_Char*buffer;
sal_Int32   length;
sal_uInt16  type;
rtl_TextEncodingencoding;
oslInterlockedCount refCount;
};

 - Gradually shift to the new one ZString, if applicable, in place of OUString 
and OString.
 - type might be an ID number denoting const char* char * const sal_Unicode 
*, ...
 - encoding is an encoding id defined in rtl/textenc.h
 - refCount, assignment, copy constructor, ... would be done in the same manner.
 - No encoding conversion will be done until the conversion is really demanded.
 - Use arrays as a memory pool for the fixed-sized structure ZString.
 - ...

e.g
1. String literal that is treated as it is

 ZString a( xyz );
   buffer directly points to xyz
   no memory allocation neither data copy is involved until encoding conversion 
is demanded.
   length is left uninitialized in this case, but will be measured and cached 
upon being requested.
   type denotes const char*, zero terminated
   encoding might be ASCII_US or UTF-8; which might depend on the OS and 
compiler.

 (debugger) print a.buffer  ... prints xyz

2. Receiving a result string from a callee in a storage allocated by alloca() 
instead of malloc()

 ZString temp( 100, RTL_ALLOCA );
 func( temp );

 func( ZString x )
 {
x = abc;
 }

 In a destructor of temp above,
   if a reference count is 1, nothing special would be done and the allocated 
memory in the stack area will be automatically freed upon returning to the 
upper frame.
   if a reference count is more than 1, then memory allocation and data copy 
will be involved.

Best,
Tora


On 06.06.11 16:35, tora - Takamichi Akiyama wrote:

Has anyone tried refactoring OUString?

   - It converts iso-8859-1 letters ranging 0x00-0x7f into UCS2 even it is not 
necessary.
   - It requires malloc(), realloc(), and free() or their equivalents.
   - It prevents debugging efforts because of sal_Unicode buffer[1].
   - It mixtures different purposes: passing/returning parameters and 
long-lasting data.
   - and else...

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


[dev] Re: refactoring OUString

2011-06-06 Thread tora - Takamichi Akiyama

On 06.06.2011 18:57, tora - Takamichi Akiyama wrote:

This is just an idea. How about adding a new class besides OUString?


On 2011/06/07 2:16, Mathias Bauer wrote:

We already have enough string classes. :-)


Yes, we have! :-)


Besides that, you are right, rtl::OUString is stupid. We planned to discuss its 
replacement in the context of a future OOo 4.0 release, allowing for some 
incompatibility here. If done properly, the changes would require only 
recompilation of in-process C++ code.


Sounds nice!

And also, please cover the underlying memory allocation mechanism which would 
be another key factor for the performance improvement.

One more thing. This might be controversial. But, IMHO, it would be better if a 
programmer takes care of the life duration of a string instance. Is it for a 
temporal use, or persistent use? I would like to say the new String class might 
offer certain ways to take care of its life duration.


But as you know, we are faced with a completely new situation for the OOo 
future. So we should postpone discussing this topic until the dust has settled.


Yep, we should postpone this exciting topic!

Thank you for your time, Michael, Mathias.

Best 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: Configure Error

2011-05-27 Thread tora - Takamichi Akiyama

Hi,

This might help you dig into the cause:
 
http://www.google.co.jp/search?num=50q=autoconf+%22syntax+error+near+unexpected+token+%22+case+%28ac_space%3D%27+%27%3B+set+|+grep+ac_space%29+2%3E%261+in

e.g.
 https://bugzilla.redhat.com/show_bug.cgi?id=192793
 http://lists.gnu.org/archive/html/bug-autoconf/2007-10/msg00038.html

next time, providing a version number of your OpenOffice.org source code might 
help us a lot!

Regards,
Tora

On 2011/05/27 22:40, Cristi Lacatus wrote:

Hello,
I am trying to compile OpenOffice on my headless Debian flavour NAS and I 
getting an error message that I don't how to get passed it.
This is the error message that I get:
checking whether and how to use Xinerama... yes, with dynamic linking
checking X11/extensions/Xinerama.h usability... yes
checking X11/extensions/Xinerama.h presence... yes
checking for X11/extensions/Xinerama.h... yes
checking for XineramaIsActive in -lXinerama... yes
./configure: line 29908: syntax error near unexpected token `('
./configure: line 29908: `case `(ac_space=' '; set | grep ac_space) 21` 
in'
My configure line looks like this:
./configure --prefix=/share/qpkg/ooo/opt 
CPPFLAGS=-I/share/HDA_DATA/.qpkg/Optware/include LDFLAGS=-L/opt/lib 
--disable-ldap --disable-mozilla --disable-epm --disable-odk --disable-mathmldtd --disable-directx 
--disable-gtk --disable-build-mozilla --disable-kdeab --disable-Xaw --disable-opengl 
--disable-randr --disable-gconf --disable-gnome-vfs --with-jdk-home=/share/HDA_DATA/qpkg/jdk 
--disable-systray --with-dynamic-xinerama
I also attached the config log, maybe someone can seee more there.
I am trying to get OpenOffice compiled to use with Alfresco.
Any help will be greatly appreciated.
Thanks,
Cristian.

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


[dev] Re: __attribute__((packed)) for enum

2011-05-19 Thread tora - Takamichi Akiyama

Hi Niklas,


Am 18.05.2011 13:44, schrieb tora - Takamichi Akiyama:

The motivation of this topic comes from a different point. I have been
looking for a way to prevent a well-known phenomenon A single sheet
that fits in a A4 paper with Excel turns into two or four A4 papers with
Calc.


On 2011/05/18 22:18, Niklas Nebel wrote:

Four pages means that both width and height are wrong? They are handled quite 
differently.

Column widths in Calc are static (stored in twips internally). The conversion 
from Excel's character-based units is done during import.


Yeap,  and 888 ?


Automatic row heights are updated based on cell formats and contents. The edit engine is 
used only for complex cell contents. With simple cells, we cheat a bit and 
avoid the OutputDevice::SetFont call, for performance reasons. The calculation is based 
on the height of the default font (determined from an OutputDevice once), the direct 
value from the font height format, and some tweaking, see lcl_GetAttribHeight in 
sc/source/core/data/column2.cxx. This obviously leaves lots of room to arrive at 
different values from Excel. In some cases even correctly so, because optimal height is 
supposed to fit the cell content with your current setup (system, installed fonts).


I appreciate your explanation on the inside of Calc.

As you pointed out, the installed font might be one of the factors. Excel files 
are prepared on Windows while I am trying to open them on CentOS and/or 
Solaris. Those systems have a different font set.

Another point that I have been suspecting since OpenOffice.org 2.x is artificial 
Ascendant. The vcl module had implemented a feature that mathematically produced an 
artificial Ascendant of glyph.

Compared with typical Western font files which usually have certain amount of 
ascendant, typical Japanese font files have an ascendant of value zero from, 
probably, historical reasons.

To make implementation of the upper layer applications such as Writer, Calc, and Impress, 
the underlying module, vcl, tries to internally take care of the differences.

It is good, but, I feel, the artificial ascendant, thus, virtual text height, 
might be slightly higher than its expectation. That might lead a cause to 
slightly increase unnecessary amount of row height.


BTW, in contrast to the topic on artificial ascendant, what I have been 
currently aiming at is that how to create an preview image of Microsoft Office files 
running on back-end servers without any user interaction.

For the purpose, which might be better?
 (a) One spreadsheet is converted into a single too-small image file.
 (b) One spreadsheet is converted into two or four image files.

Reducing a font size right before calling OutputDevice::SetFont seems to work. 
I am trying this attempt for a while.

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: __attribute__((packed)) for enum

2011-05-18 Thread tora - Takamichi Akiyama

On 2011/05/18 18:06, Niklas Nebel wrote:
 Generally, this is a very valid concern. In some places where we found out 
(or just assumed) that it makes a difference, we currently use smaller integer 
types directly for member variables, instead of enum. For example, see eCellType 
in ScBaseCell (sc/inc/cell.hxx). Or FormulaToken (formula/inc/formula/token.hxx), 
where the type of eOp and eType even depends on DBG_UTIL.

formula/inc/formula/opcode.hxx
enum OpCodeEnum
{
...
};

#ifndef DBG_UTIL
// save memory since compilers tend to int an enum
typedef USHORT OpCode;
#else
// have enum names in debugger
typedef OpCodeEnum OpCode;
#endif

That is a great idea!!!

 I don't know if Font objects are constructed in very large numbers.

That might not be a big concern than that of calc, I think. The font object 
tends to share the same instance using a reference counter. When a small change 
such as a font size is being made, the entire object will be duplicated first 
and then the change is applied to the new instance.

I have just tried to determine how __attribute__((packed)) works.
https://bitbucket.org/tora/ooo-enum-attribute-packed-experiment-ooo330_m20-vcl/changeset/6f5ec89f0a56
https://bitbucket.org/tora/ooo-enum-attribute-packed-experiment-ooo330_m20-vcl/changeset/110df3d51a23

gcc (GCC) 4.2.3 running CentOS release 5.4 (Final)
With the original source code of OOO330_m20 aka OpenOffice.org 3.3.0
sizeof(Impl_Font) = 88
sizeof(FontFamily) = 4

With patch applied source code
sizeof(Impl_Font) = 56
sizeof(FontFamily) = 1

That works well so far. But, unfortunately, __attribute__((packed)) seems 
relatively new.

The motivation of this topic comes from a different point. I have been looking for a way 
to prevent a well-known phenomenon A single sheet that fits in a A4 paper with 
Excel turns into two or four A4 papers with Calc.
Tweaking nPPTX and nPPTY ?
Reducing a font size just before calling OutputDevice::SetFont() from the 
inside of sc and editeng ?

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


[dev] __attribute__((packed)) for enum

2011-05-17 Thread tora - Takamichi Akiyama

Does anyone try to use __attribute__((packed)) for enum?

Gcc 4.0.0 has -fshort-enums command option and also accepts 
__attribute__((packed))
http://gcc.gnu.org/onlinedocs/gcc-4.0.0/gcc/Type-Attributes.html

Sun Studio 12 Update 1 supports _attribute_((packed))
http://developers.sun.com/sunstudio/support/CCcompare.html

A value of enum is normally treated as int. Thus, the size of enum variable 
might be 4 bytes. The number of items declared is, however, usually less than 255. It can be stored 
in a single byte rather than 4 bytes.

For example, 
http://hg.services.openoffice.org/OOO330/file/OOO330_m20/vcl/inc/vcl/impfont.hxx

In the file above, sizeof( Impl_Font ) reaches at 88 bytes on Solaris x86. The 
class Impl_Font includes 11 member variables of enum. Each enum variable 
occupies 4 bytes.

The total size of the class instance could be reduced to around 50 bytes, or -43%, if 
packed enum is applied and byte alignment between adjacent members -- i.e. 
the order of member variables -- is carefully taken into account.

Such a modifier might be defined depending on what compiler and its version is 
used:
http://hg.services.openoffice.org/OOO330/file/OOO330_m20/sal/inc/sal/types.h

I believe packing an enum value from 4 bytes to 1 byte greatly benefits while packing 
struct generally produces inefficient, assembler-level, additional instructions.

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


[dev] Re: __attribute__((packed)) for enum

2011-05-17 Thread tora - Takamichi Akiyama

Hi Stephan,

Thank you for your comments.

On 2011/05/18 4:11, Stephan Bergmann wrote:
 Binary UNO requires that its enums are of specific size, but that should be 
taken care of by the dummy max-value element in each enum.  Likewise for enums in 
the C/C++ URE ABI.

 Whether smaller enums have positive or negative runtime impact is hard to 
tell up front, I would say---and hard to measure, I would guess, as I assume the 
impact is negligible overall.  Similarly, I would assume the space savings to be 
negligible, too.

I used to think in the similar way as you did. But when I read some articles 
offered by Intel in order to find basic concepts of performance improvement, I 
was surprised and had learned.

Smaller data size improves the cache hit rate of the processor.
Smaller data size decreases the possibility of miss hit of virtual memory pages.

Programming application software in the level of C++ language, we might never 
consider underlying architecture.

When you jump in the world of what is DDR2-800 2GB memory module, what is 512-KB L2 
Cache, what is Translation Lookaside Buffer (TLB), what OS has to do when a miss 
hit occurs, ... you might be encouraged to explore the new world.

I have tried to find such articles, but cannot find them so far. This web page, 
however, might help you enjoy with the new concepts.
http://www.intel.com/products/processor/manuals/

Just an example from http://developer.intel.com/Assets/PDF/manual/248966.pdf
Example 3-44. Rearranging a Data Structure

struct unpacked { /* Fits in 20 bytes due to padding */
int a;
char b;
int c;
char d;
int e;
};

struct packed { /* Fits in 16 bytes */
int a;
int c;
int e;
char b;
char d;
}

http://hg.services.openoffice.org/OOO330/file/OOO330_m20/vcl/inc/vcl/impfont.hxx
class Impl_Font  /* Fits in 88 bytes */
{
  ... several enum ...
};

http://hg.services.openoffice.org/OOO330/file/8601acbe0e6c/vcl/inc/vcl/vclenum.hxx
enum FontItalic { ITALIC_NONE, ITALIC_OBLIQUE, ITALIC_NORMAL, ITALIC_DONTKNOW, 
FontItalic_FORCE_EQUAL_SIZE=SAL_MAX_ENUM };

could be rewrote in the following way:

#if defined( THIS_COMPILER )  ( VERSION_OF_THE_COMPILER = 0x )
#define SAL_ATTRIBUTE_PACKED __attribute__ ((packed))
#else
#define SAL_ATTRIBUTE_PACKED
#endif

enum FontItalic { ITALIC_NONE, ITALIC_OBLIQUE, ITALIC_NORMAL, ITALIC_DONTKNOW, 
FontItalic_FORCE_EQUAL_SIZE=SAL_MAX_ENUM } SAL_ATTRIBUTE_PACKED;

The size of class Impl_Font would reduce to 50 bytes or so from 88 bytes.

How big benefits could we get when such structure or class instances are 
produced in large numbers?

Best 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 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: How to change the way to the installation path for OpenOffice , on a Solaris machine?

2011-04-12 Thread tora - Takamichi Akiyama

Hi,

On 2011/04/12 21:34, Simona Pasca wrote:

My destination directory , ( the directory where I need that openOffice tool to 
be install ) is:
/opt/swe/tools/ext/openOffice/openoffice-3.3.0/sparc-solaris2.8/

I need to have the tool under this location because it has to be use after under 
/opt/swe/ 


I see. Thank you for the information.


The main purpose for what I have to install OpenOffice on a Sparc-Solaris2.8 
machine, is that there are some teams that require this, and they
want to use this tool on this architecture ( Sparc-Solaris2.8 ).


Well...


So, you suggest me:


That's a way for OpenOffice.org 2.4.3, not for 3.3.0.

As I mentioned in my previous mail like this
 BTW, http://www.openoffice.org/dev_docs/source/sys_reqs.html says
 OpenOffice.org 3 ... Solaris 10 OS or higher
 OpenOffice.org 2 ... Solaris 8 OS or higher

 OpenOffice.org 2.4.3 is available at Archive mirror servers.
 http://distribution.openoffice.org/mirrors/

You could install files of OpenOffice.org 3.3.0 into any version of Solaris 
machine.

The requirements
 OpenOffice.org 3 ... Solaris 10 OS or higher
  implies that the installation binary file is complied on a Solairs 10 machine.
The compiler on the machine had linked files with /lib/libc.so.1 of Solaris 
10.

 Consequently, when you try to start OpenOffice.org 3.3.0 on their Solaris 2.8 
machine,
 you would be notified with an error message produced by ld.so far before a 
process of OpenOffice.org starts.
 Version incompatible or things like that.

Do they really need OpenOffice.org 3.3.0?

If so, ...
http://wiki.services.openoffice.org/wiki/Compiler_versions_used_by_port_maintainers_and_release_engineers
says ...

 Solaris Sparc  Solaris 10 and newerSun Studio 12 / C++-5.9 patch level 
Dec. 08

I have no idea about whether Sun Studio 12 can be installed into Solaris 2.8.
Let me see...

http://download.oracle.com/docs/cd/E19205-01/820-0273/6nc1a9dj2/index.html#gempq
says

 Operating system  Solaris 9 or Solaris10 1/06

Sigh, downgrading version of compiler, i.e. Sun Studio 12 to a prior one, is 
not recommended in case of when we try to compile source code of OpenOffice.org 
which has already migrated from the previous version of compiler to a new one.

Well, I am sorry, there is little hope.

Anyway, I would say...
 1) install OpenOffice.org 3.3.0 into the default directory, /opt, using 
setup first and confirm if it works on a Solaris 2.8 machine.
 2) install OpenOffice.org 2.4.3 in the same way.
http://ftp.rz.tu-bs.de/pub/mirror/openoffice-archive/stable/2.4.3/



- to untar the archive

$ gunzip -c /opt/swe/install/OOOo_3.3.0_Solaris_Sparc_install-wJRE_fr.tar.gz | 
tar xvf -

- go in the directory ... /packages , that appear after I have dezarchivate the 
archive

$ cd /packages


- this step I don't understand very well what it is doing ??

$ perl -pe 's/ask/nocheck/' /var/sadm/install/admin/default  /tmp/nocheck


It's a simple magic. Without this or -a option, you will be prompted with Yes/No each 
time the packadd command tries to process a package. Actually, setup creates 
this type of file by itself and use in a similar way.


- and then create the directory where I want the tool to be install ?

# mkdir /alternative


I think so.


- and then give this command:

# pkgadd -R /alternative -a /tmp/nocheck -d . openofficeorg-core 
openofficeorg-[^0-9]


Please find what packages are there. A package on Solaris -- Linux equivalent 
is a well-known RPM -- is normally a directory. A name of directory is usually 
the same as a name of package.
You would need to place name of packages from left to right following the 
package dependency.


But before this command I don't need to run ./setup command ?
Or this command pkgadd  will make the installation of openOffice in /alternative   
location without giving ./setup before?


What setup will do is to automatically kick a sequence of pkgadd commands 
one by one.
You can do it by hand with fine tuning options, instead.

Best 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: gnu make .LOW_RESOLUTION_TIME

2011-04-10 Thread tora - Takamichi Akiyama

Hello Michael,


On 2011/04/08 18:48, Michael Stahl wrote:

i've just checked on Solaris 11 express:
both /usr/gnu/bin/cp [cp (GNU coreutils) 8.5] and /usr/bin/touch -r seem
to support nano-second timestamps.


Thanks to your inputs, everything has become clear.

Source code of the combined mv/cp/ln command bundled in OpenSolaris:
http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/cmd/mv/mv.c?a=true#1330

The recent code uses a newly created utimensat() system call, which accepts 
nanoseconds, to assign time stamps to a file.

rc = utimensat(AT_FDCWD, to, times, 0);


Meanwhile, an old code uses utimes() system call which takes microseconds.

rc = utimes(to, times);

There was an obvious code there:
/*
 * nanoseconds are rounded off to microseconds by flooring.
 */
static void
timestruc_to_timeval(timestruc_t *ts, struct timeval *tv)
{
tv-tv_sec = ts-tv_sec;
tv-tv_usec = ts-tv_nsec / 1000;
}

http://src.opensolaris.org/source/diff/onnv/onnv-gate/usr/src/cmd/mv/mv.c?r2=%2Fonnv%2Fonnv-gate%2Fusr%2Fsrc%2Fcmd%2Fmv%2Fmv.c%4010709%3A62c8735e37aar1=%2Fonnv%2Fonnv-gate%2Fusr%2Fsrc%2Fcmd%2Fmv%2Fmv.c%4010294%3Ab85a363540de



$ cat /etc/release
Solaris Express Community Edition snv_107 X86
Copyright 2009 Sun Microsystems, Inc. All Rights Reserved.
Use is subject to license terms.
Assembled 26 January 2009


The OS that I am currently using shown above seems not to have the utimensat() 
system call yet.

Best 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: gnu make .LOW_RESOLUTION_TIME

2011-04-10 Thread tora - Takamichi Akiyama

Hi,

Eventually, we are...

http://openoffice.org/bugzilla/show_bug.cgi?id=117800

Patch
 gnumake-for-DEV300_m106-2011-04-10.tar.gz
  |-- DEV300_m106
  |   `-- gnumake
  |   |-- make-3.81.patch
  |   |-- make-3.82.patch
  |   |-- makefile.mk
  |   `-- prj
  |   |-- build.lst
  |   `-- d.lst
  `-- ext_sources
  |-- 1a11100f3c63fcf5753818e59d63088f-make-3.82.tar.bz2
  `-- 354853e0b2da90c527e35aabb8d6f1e6-make-3.81.tar.bz2

Best 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: gnu make .LOW_RESOLUTION_TIME

2011-04-08 Thread tora - Takamichi Akiyama

Hi Michael,

Thank you for your valuable inputs.

On 2011/04/08 18:48, Michael Stahl wrote:

On 07/04/2011 05:03, tora - Takamichi Akiyama wrote:

I have just come up with a quick solution for the file systems using nanosecond 
time stamps.

Problem:
make: *** Warning: .LOW_RESOLUTION_TIME file 
`/x/solver/300/unxsoli4/inc/svx/sxsoitm.hxx' has a high resolution time 
stamp

Cause:
cp -p does not preserve a nanosecond part of time stamp.


i've just checked on Solaris 11 express:
both /usr/gnu/bin/cp [cp (GNU coreutils) 8.5] and /usr/bin/touch -r seem
to support nano-second timestamps.


That is a good news!

This is my first impression when I have glanced at a source code of both OpenSolaris and 
GNU versions of cp command.
They simply call fts_open() and fts_read() to obtain a nanosecond time stamp of 
original file and then set it to a newly created file.
There seems no specific source code line about rounding-up or ignoring a 
nanosecond part.
Therefore, I have concluded -- but not confirmed yet -- the OS that I am 
currently using might not be capable of setting nanosecond resolution to a file 
through the existing system call level API.

$ cat /etc/release
  Solaris Express Community Edition snv_107 X86
   Copyright 2009 Sun Microsystems, Inc.  All Rights Reserved.
Use is subject to license terms.
Assembled 26 January 2009

Michael's check result implies that the recent Solaris 11 express, obviously 
newer than what I am using, has become capable of both obtaining and assign a 
time stamp in nanosecond resolution.
That's very nice. I appreciate you for checking it.


Possible Solution:
touch itself before cp -p to loose a nanosecond part of its time stamp.


hmmm... this could work around the problem, but kind of interferes with
our goal of a read-only source directory  :)


Yep, definitely! :)

e.g. In my work environment,
 Zone A) hg pull, hg qnew, editing some source files, ...
 Zone B) building ooo.
 Zone C) testing it with a debugger. the directory is loop-back mounted with a 
read-only option.

Okay, I am stopping digging this issue. It would shortly become unnecessary 
with Solaris 11.


perhaps just installing new GNU coreutils on systems where this problem
occurs is the way to go...


That's right!
Just in my case, the chance would be coming when my ZFS RAIDZ2 configured six 
1.5TB disks reaches at disk full and consequently I would be forced to 
reconstruct my system with the latest OS.

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


[dev] build.pl debug=1 for sw and svx

2011-04-06 Thread tora - Takamichi Akiyama

Hi,

Could you tell me how to easily do build.pl debug=1 or similar
actions in a specific, renovated module such as sw and svx after
fully building the entire source code tree with normal options?

The way I used to do was like this:

(full build)
  cd $SRC_ROOT
  dmake

(individual build with a debug option)
  cd sw
  mv $INPATH ${INPATH}-normal
  build.pl debug=1

An attempt like that seems no longer applicable with the recent DEV300_m10x.
It seems files being created are now stored in solver/, instead.
It is cool and makes me excited. :-)

Best 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: build.pl debug=1 for sw and svx

2011-04-06 Thread tora - Takamichi Akiyama

Hi Niklas, Daniel, and everybody interested in,

On 2011/04/06 17:22, Daniel Rentz wrote:
 cd sw
 make clean
 make -srj9 debug=t

 The first call of make removes all output files of sw from solver/workdir. The second call 
of make builds sw with debug, libraries go into solver/workdir/LinkTarget/Library. 
j9 builds with 9 processes in parallel.

On 2011/04/06 17:24, Niklas Nebel wrote:

To rebuild a single module with debug info in the new build system, use
cd sw
make -sr clean
make -sr debug=t

See also http://blogs.sun.com/GullFOSS/entry/gbuild_meet_the_new_boss.


Thanks a lot. It works very well.

Additionally, gbuild: Meet the new boss (Same as the old boss) gives me a hot 
spice.


Here is my appreciation for developers who intend to keep every log:
bash$ mkdir log
$ cd sw
$ x=make -sr debug=t; (/bin/pwd; date; echo $x; echo; time $x; date)  
../log/build_sw_`date +%Y%m%d_%H%M`.log 21 
$ head `ls -t ../log/build_sw_*log | head -1`
/xxx/ooo/build/local/DEV300/DEV300_m106/sw
Wed Apr  6 18:10:58 JST 2011
make -sr debug=t
...
$ tail -f `ls -t ../log/build_sw_*log | head -1`
...

Best 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: build.pl debug=1 for sw and svx

2011-04-06 Thread tora - Takamichi Akiyama

Hello Christian,

On 2011/04/06 20:55, Christian Lippka wrote:

While Niklas and Daniel are absolutely right, make clean may not always
be what you want.

For example, if you just want to rebuild svx with debug and do a
make -sr clean, your next make in sw module would rebuild a lot of
stuff, since all dependency to svx would fire.


I see.


If you only want to rebuild all obj files with debug, what you can
do is

rm -fr $WORKDIR/CxxObject/svx
make -srj9 debug=t

a lot faster and also modules depending on svx will not need
a nearly full rebuild.


That makes sense. I gave it a try following your suggestion.
It took only 15 minutes to re-make svx with debug=t while 16 minutes to 
entirely re-make svx which involved resource files for both en_US and ja.
Yes, you are right, it's faster! For dependency across modules, I am being 
confused with the following unexpected phenomena.

Despite my expectation, libsvxsi.so has been delivered into $OUTDIR/lib/ without 
explicitly executing deliver.pl
In addition to .so, Package_inc.mk seems to physically copy header files from 
svx/inc/svx/ to $OUTDIR/inc/svx/.
$OUTDIR/inc/svx/deliver.log seems to be substituted with gb_deliver.log.

make -r deliverlog running on OpenSolaris x86 prints same type of warning 
messages and then eventually create the log file.

$ make -r deliverlog
...
make: *** Warning: .LOW_RESOLUTION_TIME file 
`/x/solver/300/unxsoli4/inc/svx/sxsoitm.hxx' has a high resolution time 
stamp
...(repeated 2 by 500 times for each file)...

On OpenSolaris x86, even after executing make -sr  make -r deliverlog, the 
delivered file under $OUTDIR is slightly older (in nanoseconds) than its original one. 
Consequently, copy action might occur again and again. Should I use /usr/gnu/bin/cp instead of /bin/cp, or 
else???

$ stat $OUTDIR/inc/svx/sxsoitm.hxx
...
Modify: 2011-02-22 20:59:42.717474000 +0900
...

$ stat svx/inc/svx/sxsoitm.hxx
...
Modify: 2011-02-22 20:59:42.717474450 +0900
...

Anyway, things that I am facing are really fresh for me.
I have hit the road to explore the new, wonderful world, solenv/gbuild/ :-)

Thanks a lot, cheers!
Tora
--
-
To unsubscribe send email to dev-unsubscr...@openoffice.org
For additional commands send email to sy...@openoffice.org
with Subject: help


[dev] Re: build.pl debug=1 for sw and svx

2011-04-06 Thread tora - Takamichi Akiyama

Hello Niklas,

On 2011/04/07 2:04, Niklas Nebel wrote:

On 06.04.2011 18:45, tora - Takamichi Akiyama wrote:

make -r deliverlog running on OpenSolaris x86 prints same type of
warning messages and then eventually create the log file.

$ make -r deliverlog
...
make: *** Warning: .LOW_RESOLUTION_TIME file
`/x/solver/300/unxsoli4/inc/svx/sxsoitm.hxx' has a high resolution
time stamp
...(repeated 2 by 500 times for each file)...

On OpenSolaris x86, even after executing make -sr  make -r
deliverlog, the delivered file under $OUTDIR is slightly older (in
nanoseconds) than its original one. Consequently, copy action might
occur again and again. Should I use /usr/gnu/bin/cp instead of /bin/cp,
or else???


Is it really copied again? The whole point of .LOW_RESOLUTION_TIME is to ignore 
these small differences (see 
http://www.gnu.org/software/make/manual/html_node/Special-Targets.html and 
http://wiki.services.openoffice.org/wiki/Build_Environment_Effort/Status_And_Next_Steps).


Thank you for the resources. Those explain exactly what I am encountering.

The build environment I am using is running in a Solaris Zone on raidz2 ZFS 
with 6 disk devices as well as 2 disk devices configured as a ZFS mirror for 
boot disk.

According to the log file of make -sr debug=t after running cd svx; make -r clean, the header files under 
$OUTDIR seemed to be re-created at the very beginning of make -sr, e.g. 00:12:16.643938904 -- not in the process of 
make -r deliverlog -- and then a time stamp was tried to adjust to the original one, but unfortunately its resolution 
seemed lost during cp -p, fstat(), or things like that in case of OpenSolaris x86.

$ head log/build_svx_20110407_0012.log
/wb/ooo/build/local/DEV300/DEV300_m100/svx
Thu Apr  7 00:12:16 JST 2011
make -sr debug=t

[ build PKG ] svx_inc
[ build PKG ] svx_sdi
[ build SDI ] svx/sdi/svxslots
[ build DEP ] LNK:Library/libsvxsi.so
[ build DEP ] LNK:Library/libsvxcoresi.so
[ build DEP ] LNK:Library/libtextconversiondlgssi.so

$ stat svx/inc/svx/sxsoitm.hxx
...
Access: 2011-02-22 20:59:42.717435880 +0900
Modify: 2011-02-22 20:59:42.717474450 +0900
Change: 2011-02-22 20:59:42.717474450 +0900

$ stat $OUTDIR/inc/svx/sxsoitm.hxx
...
Access: 2011-02-22 20:59:42.717435000 +0900
Modify: 2011-02-22 20:59:42.717474000 +0900
Change: 2011-04-07 00:12:16.643938904 +0900

But I am not sure, though.

Best 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: build.pl debug=1 for sw and svx

2011-04-06 Thread tora - Takamichi Akiyama

Hi Michael,

On 2011/04/07 2:47, Michael Stahl wrote:

make -r deliverlog running on OpenSolaris x86 prints same type of warning 
messages and then eventually create the log file.

$ make -r deliverlog
...
make: *** Warning: .LOW_RESOLUTION_TIME file 
`/x/solver/300/unxsoli4/inc/svx/sxsoitm.hxx' has a high resolution time 
stamp
...(repeated 2 by 500 times for each file)...


yes, this warning is a well-known problem.


On OpenSolaris x86, even after executing make -sr  make -r deliverlog, the 
delivered file under $OUTDIR is slightly older (in nanoseconds) than its original one. 
Consequently, copy action might occur again and again. Should I use /usr/gnu/bin/cp instead of /bin/cp, or 
else???


btw, in DEV300m106 configure will now find /usr/gnu/bin/cp on Solaris, and
use it :)


Good!


$ stat $OUTDIR/inc/svx/sxsoitm.hxx
...
Modify: 2011-02-22 20:59:42.717474000 +0900
...

$ stat svx/inc/svx/sxsoitm.hxx
...
Modify: 2011-02-22 20:59:42.717474450 +0900
...


that is exactly the problem that is solved by using the
.LOW_RESOLUTION_TIME directive in the rules in Deliver.mk.

ZFS has nano-second precision timestamps.
as mentioned above, when copying files to the solver, gbuild preserves the
timestamp of the source files, to prevent rebuilds in dependent modules.
this is done using --preserve=timestamp option of GNU cp if it is
available, and touch -r otherwise (such as in your case probably).

unfortunately older versions of GNU cp, as well as Solaris 10 touch, only
support micro-second precision timestamps.
the result is that on every make invocation the files will be copied
again, which is bad.

to work around this, GNU make provides the .LOW_RESOLUTION_TIME option,
which does not check the sub-second part of the timestamp.

however, because the timestamps do have a sub-second part that is not
zero, GNU make produces this annoying warning, and unfortunately there
seems to be no way to turn it off.

i haven't checked yet, but if the GNU cp in OpenSolaris can actually copy
nano-second timestamps properly, then you can set the gb_HIRESTIME
variable, so the .LOW_RESOLUTION_TIME is not used and the warnings go away.


I've just tried it and learned that unfortunately, version 6.7 of /usr/gnu/bin/cp 
-p truncates nanosecond part during copying a file.


you can set the GNUCOPY variable, or rebase to m106 where configure should
find it automatically.


Surfing in the Internet, I have devised a silly, pragmatic workaround.

1. Truncate sub-second part of all files in the module svx:
$ find svx -type f | xargs perl -e 'map{ $t=(stat($_))[9]; utime($t,$t,$_) } 
@ARGV'

$ stat svx/inc/svx/sxsoitm.hxx
...
Access: 2011-02-22 20:59:42.0 +0900
Modify: 2011-02-22 20:59:42.0 +0900
Change: 2011-04-07 03:58:23.672122611 +0900

2. Do the same thing on the target files, just one time:
$ find $OUTDIR/inc/svx -type f | xargs perl -e 'map{ $t=(stat($_))[9]; 
utime($t,$t,$_) } @ARGV'

3. Give it a try:
$ make -sr deliverlog
[ build LOG ] svx

Yahh, make abandons complaining about .LOW_RESOLUTION_TIME.
That is, I know, just for fun. :-)

Best 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: build.pl debug=1 for sw and svx

2011-04-06 Thread tora - Takamichi Akiyama

Hi,

What I have learned:

To compile an individual module including debug information, do like this:
 cd svx
 make -sr clean
 make -srj9 debug=t

or
 cd svx
 rm -fr $WORKDIR/CxxObject/svx
 make -srj9 debug=t

A warning message about .LOW_RESOLUTION_TIME on OpenSolaris with ZFS or NFS 
seems not harmful.
It might be solved by re-compiling or slightly tweaking source code of cp 
command.

ls command on OpenSolaris is aware of nanoseconds.
$ echo  x
$ ls -l x
-rw-r--r--   1 tora users  1 Apr  7 10:32 x
$ ls -E x
-rw-r--r--   1 tora users  1 2011-04-07 10:32:52.028730567 +0900 x

Source codes are available at
http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libcmd/common/cp.c
http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/cmd/touch/touch.c
http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/cmd/ls/ls.c
hg clone ssh://a...@hg.opensolaris.org/hg/onnv/onnv-gate

Resources:
http://blogs.sun.com/GullFOSS/entry/gbuild_meet_the_new_boss
http://www.gnu.org/software/make/manual/html_node/Special-Targets.html
http://wiki.services.openoffice.org/wiki/Build_Environment_Effort/Status_And_Next_Steps

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


[dev] gnu make .LOW_RESOLUTION_TIME (was: Re: build.pl debug=1 for sw and svx

2011-04-06 Thread tora - Takamichi Akiyama

Sorry again,

I have just come up with a quick solution for the file systems using nanosecond 
time stamps.

Problem:
make: *** Warning: .LOW_RESOLUTION_TIME file 
`/x/solver/300/unxsoli4/inc/svx/sxsoitm.hxx' has a high resolution time 
stamp

Cause:
cp -p does not preserve a nanosecond part of time stamp.
$ echo  x
$ ls -l x
-rw-r--r--   1 tora users  1 Apr  7 10:32 x
$ ls -E x
-rw-r--r--   1 tora users  1 2011-04-07 10:32:52.028730567 +0900 x
$ cp -p x y
$ ls -E x y
-rw-r--r--   1 tora users  1 2011-04-07 10:32:52.028730567 +0900 x
-rw-r--r--   1 tora users  1 2011-04-07 10:32:52.02873 +0900 y

http://www.gnu.org/software/make/manual/html_node/Special-Targets.html
http://wiki.services.openoffice.org/wiki/Build_Environment_Effort/Status_And_Next_Steps

Possible Solution:
touch itself before cp -p to loose a nanosecond part of its time stamp.
Makefile:

all : target1 target2

target1 : source
cp -p source target1
ls -E source target1

target2 : source
touch -r source source
cp -p source target2
ls -E source target2


outputs:

$ echo  source
$ make
cp -p source target1
ls -E source target1
-rw-r--r--   1 tora users  1 2011-04-07 11:50:52.415342276 +0900 
source
-rw-r--r--   1 tora users  1 2011-04-07 11:50:52.415342000 +0900 
target1
touch -r source source
cp -p source target2
ls -E source target2
-rw-r--r--   1 tora users  1 2011-04-07 11:50:52.415342000 +0900 
source
-rw-r--r--   1 tora users  1 2011-04-07 11:50:52.415342000 +0900 
target2


I am trying to apply this type of idea to DEV300_m106 or later.

Best 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: ERROR: File not found: msvcp80.dll

2011-03-08 Thread tora - Takamichi Akiyama

Hi,

i am not sure, but, in general, this might help.

cd $SRC_ROOT
cd external
build.pl
deliver.pl -verbose
cd ..
cd instsetoo_native
build.pl


or simply

cd $SRC_ROOT
dmake

and wait for a minutes, not hours.

Kind regards,
Tora

On 2011/03/08 21:44, Knut Olav Bøhmer wrote:

Hi,

I'm building openoffice.org http://openoffice.org, and I get the error in 
OOO320/instsetoo_native:

... reading include pathes ...
... analyzing script: C:/OOO320/solver/320/wntmsci12.pro/bin/setup_osl.inf 
http://wntmsci12.pro/bin/setup_osl.inf ...
... analyzing directories ...
... analyzing files ...
... analyzing scpactions ...
... analyzing shortcuts ...
... analyzing unix links ...
... analyzing profile ...
... analyzing profileitems ...
... analyzing folders ...
... analyzing folderitems ...
... analyzing registryitems ...
... analyzing Windows custom actions ...
... analyzing Windows merge modules ...
... analyzing modules ...

... languages en-US ...
... analyzing update database ...
... analyzing files ...
ERROR: The following files could not be found:
ERROR: File not found: msvcp80.dll
ERROR: File not found: msvcr80.dll
... cleaning the output tree ...
... removing directory C:/tmp/ooopackaging/i_11201299587239 ...

**
ERROR: ERROR: Missing files
in function: remove_Files_Without_Sourcedirectory
**

**
ERROR: Saved logfile: 
C:/OOO320/instsetoo_native/wntmsci12.pro/OpenOffice/msi/logging/en-US/log_OOO320_en-US.log
 http://wntmsci12.pro/OpenOffice/msi/logging/en-US/log_OOO320_en-US.log

I did not copy the msvcp80.dll files in external/msvcp80 before building, so I 
did it after I got the error. But it did not fix the problem doingbuild 
--from instsetoo_native   in instsetoo_native.

What do I have to build (or do) to make the files got to the right place?

--
Knut Olav Bøhmer

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


[dev] Re: ERROR: File not found: msvcp80.dll

2011-03-08 Thread tora - Takamichi Akiyama

Hi,


On 8 March 2011 15:11, tora - Takamichi Akiyama t...@openoffice.org 
mailto:t...@openoffice.org wrote:

cd $SRC_ROOT
dmake

 and wait for a minutes, not hours.

On 2011/03/09 4:07, Knut Olav Bøhmer wrote:

Which worked for me :)
Well, I'm doing this on a virtual macine it took about 30 minutes. I don't know 
why it's so slow.


Oh, sorry! I meant that wait for minutes until building instsetoo_native starts.

Taking about 30 minutes to build both your language and English versions of OOo 
is probably normal.

Some tips:
 - Disable unnecessary background services.
   Search for windows vista disable services like that.

 - Monitor the CPU usage.
   It should keep at the level of almost 100% during building OOo.
   If not, look into the bottleneck.

 - Redirect outputs to a log file.
   Do not let them force the terminal emulator of Cygwin work hard.
   A task of drawing letters and scrolling them consumes the CPU power.
   bash$ dmake  log/dmake.log 21 

 - Occasionally check the progress.
   bash$ grep Building module log/dmake.log
   bash$ tail -f log/dmake.log

 - Utilize a Solid-State Drive (SSD) and put virtual machines on it.

 - and more...

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


Re: [dev] Re: how to detect MS Office encrypted documents

2010-11-29 Thread tora - Takamichi Akiyama

For traditional binary file format, you might have already noticed
the binary file format was two-layered.

The underlaying one is Windows Compound Binary File Format, which
looks like a FAT of floppy disk.

The upper one is individual Word, Excel, PowerPoint, ... file format.
http://www.microsoft.com/interop/docs/officebinaryformats.mspx

You did not mention what programing language you were using or
what platform you were working on.

Every major programming language, such as Perl, Python, Java, ...
seems to have useful libraries for the Compound Binary File Format.
So, just search for it in the Internet.
If you are using Windows, just use its library files.

Source files of OpenOffice.org regarding such a functionality might
help to research the inside, but it would be hard to reuse them
due to lots of dependency among internal modules.

If you want to use OpenOffice.org Basic or an external language like
Java connecting to your OpenOffice.org instance as a server via API,
there would be another fun story.

Regards,
Tora


-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org



Re: [dev] Help ! how to get the source code for some really old OOo projects and build them ?

2010-02-02 Thread tora - Takamichi Akiyama

Wei Zhang wrote:

And When I was trying to build the whole thing according to
http://tools.openoffice.org/dev_docs/build_linux.html, I came across various
issues with the JDK version and ANT version. After I googled around, I am
using JDK 1.4.2 and ANT 1.6.2. There are still some other issues that I find
pretty hard to resolve even after googling.


http://wiki.services.openoffice.org/wiki/Compiler_versions_used_by_port_maintainers_and_release_engineers
Click on History at the top right and browse some previous pages around 2005 - 
2007.

For OOo 2.x series, these pages, not official or accurate though, might help a 
little
http://wiki.services.openoffice.org/wiki/Development_Environment_with_solver
http://wiki.services.openoffice.org/wiki/Build_Environment_Running_on_Fedora_Core_4

Tora


-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org



Re: [dev] Help ! how to get the source code for some really old OOo projects and build them ?

2010-02-02 Thread tora - Takamichi Akiyama

Wei Zhang wrote:

And the configure parameters I used is following :
CC=gcc34 CXX=g++34 ./configure 
--prefix=/scratch/wei/usr/local/OOO_2.0.1/ --enable-symbols 
--enable-debug --disable-mozilla 
--with-ant-home=/scratch/wei/usr/local/ant_1.6.2/ 
--with-jdk-home=/s/jdk1.4.2


I was wondering the build with the parameters above might not work properly.

There seems nothing wrong, but --enable-debug would produce huge, giant .so 
files and a set of those files could not fit in the memory.
E.g. the size of Writer's .so file is normally 10s MB, but .so file with debug 
mode reaches 100s MB.
Imagine OpenOffice.org 2.x will load about 50s .so files at its start up. How 
much memory would be needed to load those debug version of .so files?

I would recommend building the entire OpenOffice.org without debug mode first, 
then building a specific, questioned module with debug mode again.

Tora


-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org



Re: [dev] Please help: saving document as DOC format, then opening, losing position properties for TextGraphicObject

2010-01-03 Thread tora - Takamichi Akiyama

Hi,

Chris Fleischmann wrote:

Hi basically I am using the OpenOffice SDK (3.1.1) to create a new Writer
document. I add images with the following code, passing in the XText (which
in this case is an XText from a XTextFrame).



XTextCursor xTextCursor = xFrameText.createTextCursor();

...

xFrameText.insertTextContent(xTextCursor, xNewTextContent, false);


What I tried is:
XTextDocument xTextDocument = (XTextDocument) 
UnoRuntime.queryInterface(XTextDocument.class, oDoc);
XText xText = xTextDocument.getText();
XTextCursor xTextCursor = xText.createTextCursor();
...
xText.insertTextContent(xTextCursor, xTextContent, false);

Details:
 
http://tora-japan.com/wiki/Insert_an_image_file_into_OpenOffice.org_Writer_document_and_save_it_as_a_Microsoft_Office_97-2003_file

Tora

-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org



Re: [dev] Please help: saving document as DOC format, then opening, losing position properties for TextGraphicObject

2010-01-02 Thread tora - Takamichi Akiyama

I am not sure, but, hopefully, this could be a hint.

After manually inserting a graphic image into an empty Writer document,
the following code fragment of OpenOffice.org Basic reports that

HoriOrientRelation = 7
VertOrientPosition = 7

Sub Main
oObject = ThisComponent.getDrawPage().getByIndex(0)
print AnchorType =   oObject.AnchorType
print Height =   oObject.Height
print Width =oObject.Width
print HoriOrient =   oObject.HoriOrient
print HoriOrientPosition =   oObject.HoriOrientPosition
print HoriOrientRelation =   oObject.HoriOrientRelation
print VertOrient =   oObject.VertOrient
print VertOrientPosition =   oObject.VertOrientPosition
print VertOrientRelation =   oObject.VertOrientRelation
End Sub

They seem to be described at
http://api.openoffice.org/docs/common/ref/com/sun/star/text/RelOrientation.html


An export filter for Microsoft Word 97-2003 (not for 2007, though) has some 
relevant code.
http://svn.services.openoffice.org/ooo/tags/OpenOffice_3_1_1/sw/source/filter/ww8/wrtw8esh.cxx

bool WinwordAnchoring::ConvertPosition( SwFmtHoriOrient _iorHoriOri, ...
{
...
// convert horizontal position, if needed
{
enum HoriConv { NO_CONV, CONV2PG, CONV2COL, CONV2CHAR };
HoriConv eHoriConv( NO_CONV );
...
case text::RelOrientation::PAGE_FRAME:
case text::RelOrientation::PAGE_PRINT_AREA:
{
if ( bConvDueToOrientation || bFollowTextFlow )
eHoriConv = CONV2PG;
}
...
case text::RelOrientation::FRAME:
{
if ( bConvDueToOrientation )
eHoriConv = CONV2COL;
}
...

Tora


Chris Fleischmann wrote:

OpenOffice 3.1.1. Java SDK, MAC OS X 10.6.2, MS Word 2007/2008.

Firstly I am happily able to position my TextGraphicObject's where I need
them, ie., I use the following code to position the TextGrahicObject in
OpenOffice with a particular width and height:



xProps.setPropertyValue(HoriOrient, new 
Short(HoriOrientation.NONE));
xProps.setPropertyValue(HoriOrientPosition, new Integer(pos_x));



However when I open up the document in MS Word, the image, has been
left-aligned (lots its X position) and lots its Y position?

Is there a way to make sure the position is maintained in both OOo and MS
Word?

Thanks in advance,

Chris


-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org



Re: [dev] Please help: saving document as DOC format, then opening, losing position properties for TextGraphicObject

2010-01-02 Thread tora - Takamichi Akiyama

Are you using vertical writing? If so, there is a bug which
misinterprets the position of graphic object during importing
from and exporting into Microsoft Word 97-2003.

 http://qa.openoffice.org/issues/show_bug.cgi?id=86769
 
http://www.openoffice.org/nonav/issues/showattachment.cgi/61766/i86769_wordarts_01_doc_snapshots.png

How are you trying to achieve your needs?  Like this?
 1. Prepare OpenOffice.org 3.1.1 on MacOS X 10.6.2.
 2. Start your Java program to create an empty Writer document or
to open an existing Writer document and then
to import a graphic image file.
 3. How do you save the Writer document as a Word file?
by hand or by the Java program?
 4. What file type or FilterName do you use for saving the document?
Microsoft Word 97/2000/XP   writer_MS_Word_97
Microsoft Word 2003 XML writer_MS_Word_2003_XML
Microsoft Word 2007 XML writer_MS_Word_2007
 5. Anything else that you have noticed...

There might be several possibilities, I guess:
 (a) Something in your Java program.
 (b) Bugs in OpenOffice.org 3.1.1.
 (c) Bugs in Microsoft Office running on Macintosh.

What will happen with your environment?
 1. Manually create an empty Writer document.
 2. Manually import a graphic image.
 3. Move it and alter its attributes.
 4. Save it as Word 97/2000/XP and/or Word 2003 XML.
 5. Open it with your Word 2007/2008.

Tora

Chris Fleischmann wrote:

Thanks for responding, I have since tried playing around with the orientation
settings, but alas, its still not keeping the x/y position from the
paragraph anchor when I open it up in Word ... See the picture properties
here for one of my images in openoffice 3.1.1:

http://old.nabble.com/file/p26992864/Screen%2Bshot%2B2010-01-02%2Bat%2B11.46.15%2BPM.png 


Unfortunately, it still moves to the TOP of the paragraph anchor, and also
moves to the leftmost position possible.

So given the paragraph anchor, the image moves to the top left position of
the anchor.

Thanks in advance for any other tips.


-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org



Re: [dev] Please help: saving document as DOC format, then opening, losing position properties for TextGraphicObject

2010-01-02 Thread tora - Takamichi Akiyama

Hi,
What I have just noticed with writer_MS_Word_2003_XML is ...

Steps
 1. Manually create an empty Writer document.
 2. Manually import a graphic image.
 3. Move it and alter its attributes.
 4. Save it as Word 2003 XML.
 5. Open it with my favorite text editor.

The inside of the XML file
w:pict
 w:binData w:name=wordml://graphics1...(encoded image 
data).../w:binData
 v:shape id=_x0_0_0_0 
style=position:absolute;z-index:0;left:0pt;top:0pt;width:0pt;
  v:imagedata src=wordml://graphics1 o:title=graphics1/
 /v:shape
/w:pict

It says ... left:0pt;top:0pt; ...

Tora


-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org



Re: [dev] Long file names

2009-10-04 Thread tora - Takamichi Akiyama
Hi,

In what situation do you currently encounter the problem?
What do you do?
What do you expect?
What your OpenOffice.org actually does despite your expectations.


One possible, interesting topic:

Generally speaking, one Chinese, including most Far East Asian languages, 
characters will be
internally converted into 9 ASCII characters ( three occurrences of % followed 
by two hex-decimal
digits ) in a certain situation because of UTF-8 hex-decimal encoded URL.

If the length of text is limited up to 256 bytes somewhere, in the worst case, 
the limitation
for the number of Chinese characters might become 28, not 256. (256 / 9 = 28.4).

For example,
 Chinese characters: 中国
 Corresponding URL:  %E4%B8%AD%E5%9B%BD  (forcedly encoded)

 ASCII letters:  China
 Corresponding URL:  China  (no need to be encoded)

Tora

Wei Min Teo wrote:
 It seems that openoffice has a maximum path name of 260 chars? 
 
 However, I think the maximum path name for windows is 32,767 and file name is 
 260 in unicode. 


-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org



[dev] 3.1.1 Linux crashes with libgcc_s.so.1

2009-09-29 Thread tora - Takamichi Akiyama

Are there any suggestions?

OpenOffice.org 3.1.1 Linux crashes right after clicking on the button
Finish in the dialog Welocome to OpenOffice.org.
The expectation is that the StarCenter appears.

Phenomenon
 $ /opt/openoffice.org3/program/soffice.bin
 [Java framework]sunjavaplugin.so could not load Java runtime library:
 file:///usr/lib/gcj-4.1.1/libjvm.so.

Environment
 OS: CentOS release 5.2 (Final)
 Installer: localized/ja/3.1.1/OOo_3.1.1_LinuxIntel_install_ja.tar.gz

Quick investigation (see man ld.so)
 $ LD_DEBUG=all LD_DEBUG_OUTPUT=ld-linux.log 
/opt/openoffice.org3/program/soffice.bin
 Segmentation fault

 The log says:
 15158: checking for version `GCC_3.3.1' in file 
/opt/openoffice.org3/program/../basis-link/ure-link/lib/libgcc_s.so.1 [0] 
required by file /usr/lib/libgcj.so.7rh [0]
 15158: checking for version `GCC_3.3' in file 
/opt/openoffice.org3/program/../basis-link/ure-link/lib/libgcc_s.so.1 [0] 
required by file /usr/lib/libgcj.so.7rh [0]
 15158: checking for version `GCC_3.0' in file 
/opt/openoffice.org3/program/../basis-link/ure-link/lib/libgcc_s.so.1 [0] 
required by file /usr/lib/libgcj.so.7rh [0]
 15158: checking for version `GCC_4.2.0' in file 
/opt/openoffice.org3/program/../basis-link/ure-link/lib/libgcc_s.so.1 [0] 
required by file /usr/lib/libgcj.so.7rh [0]

 An attempt of finding GCC_4.2.0 seemed to result in failure.
 Consequently, it seems to start looking for 'backtrace' to prepare an error 
report.

 15158: symbol=backtrace;  lookup in 
file=/opt/openoffice.org3/program/soffice.bin [0]

 $ nm -D /opt/openoffice.org3/program/../basis-link/ure-link/lib/libgcc_s.so.1 
| grep GCC_
  A GCC_3.0
  A GCC_3.3
  A GCC_3.3.1
  A GCC_3.4

 /opt/openoffice.org/ure/lib/libgcc_s.so.1 does not have GCC_4.2.0 while
 /lib/libgcc_s.so.1 does.

 $ nm -D /lib/libgcc_s.so.1 | grep GCC_
  A GCC_3.0
  A GCC_3.3
  A GCC_3.3.1
  A GCC_3.4
  A GCC_3.4.2
  A GCC_4.0.0
  A GCC_4.2.0

 $ rpm -q -f /usr/lib/libgcj.so.7rh
 libgcj-4.1.2-42.el5

Workaround
 # mv /opt/openoffice.org/ure/lib/libgcc_s.so.1{,-original}

 $ /opt/openoffice.org3/program/soffice.bin

 Exception in thread Thread-11 java.lang.NoClassDefFoundError: 
java.lang.ProcessBuilder
at 
com.sun.star.servicetag.SystemEnvironment.getCommandOutput(SystemEnvironment.java:251)
at 
com.sun.star.servicetag.LinuxSystemEnvironment.getLinuxHostId(LinuxSystemEnvironment.java:62)
at 
com.sun.star.servicetag.LinuxSystemEnvironment.init(LinuxSystemEnvironment.java:49)
at 
com.sun.star.servicetag.SystemEnvironment.getSystemEnvironment(SystemEnvironment.java:68)
at 
com.sun.star.servicetag.RegistrationData.initEnvironment(RegistrationData.java:231)
at 
com.sun.star.servicetag.RegistrationData.init(RegistrationData.java:225)
at 
com.sun.star.servicetag.RegistrationData.init(RegistrationData.java:219)
at 
com.sun.star.registration.Registration$_Registration.executeImpl(Registration.java:280)
at 
com.sun.star.registration.Registration$_Registration$1.run(Registration.java:173)
at java.lang.Thread.run(libgcj.so.7rh)

 Even though Java, which CentOS 5.2 comes with, still does not work,
 the StarCenter comes up as expected now.

Questions
 Is /opt/openoffice.org/ure/lib/libgcc_s.so.1 needed?
 Can I simply remove or rename it?

Ciao,
Tora

-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org



Re: [dev] 3.1.1 Linux crashes with libgcc_s.so.1

2009-09-29 Thread tora - Takamichi Akiyama

P.S. and some corrections

tora - Takamichi Akiyama wrote:

OpenOffice.org 3.1.1 Linux crashes right after clicking on the button
Finish in the dialog Welocome to OpenOffice.org.
The expectation is that the StarCenter appears.

Phenomenon
 $ /opt/openoffice.org3/program/soffice.bin
 [Java framework]sunjavaplugin.so could not load Java runtime library:
 file:///usr/lib/gcj-4.1.1/libjvm.so.



Workaround
 # mv /opt/openoffice.org/ure/lib/libgcc_s.so.1{,-original}

 $ /opt/openoffice.org3/program/soffice.bin

 Exception in thread Thread-11 java.lang.NoClassDefFoundError: 

...
at com.sun.star.registration.Registration$_Registration$1.run(Registration.java:173) 


Although the registration process failed at the initial setup,
the Java seems to be working afterward. A Wizard in the Base works,
an attempt of registering a macro for a certain event in the Tools - Customize 
works, ...

E.g.
$ /opt/openoffice.org3/program/soffice 

$ grep libjvm /proc/$(pgrep soffice.bin)/maps | grep r-x
00a8-00a9b000 r-xp  08:03 1698978
/opt/openoffice.org/ure/lib/libjvmfwk.so.3
00deb000-00df r-xp  08:03 1698977
/opt/openoffice.org/ure/lib/libjvmaccessgcc3.so.3

After clicking on the button Macro... in the Events tab of Tools - 
Customize...

$ grep libjvm /proc/$(pgrep soffice.bin)/maps | grep r-x
00a8-00a9b000 r-xp  08:03 1698978
/opt/openoffice.org/ure/lib/libjvmfwk.so.3
00b35000-00b36000 r-xp  08:03 589138 /usr/lib/gcj-4.1.1/libjvm.so
00deb000-00df r-xp  08:03 1698977
/opt/openoffice.org/ure/lib/libjvmaccessgcc3.so.3

/usr/lib/gcj-4.1.1/libjvm.so has been loaded and it seems to be working.

$ cat $HOME/.openoffice.org/3/user/config/javasettings_Linux_x86.xml
?xml version=1.0 encoding=UTF-8?
!--This is a generated file. Do not alter this file!--
java xmlns=http://openoffice.org/2004/java/framework/1.0; 
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
enabled xsi:nil=true/
userClassPath xsi:nil=true/
vmParameters xsi:nil=true/
jreLocations xsi:nil=true/
javaInfo xsi:nil=false vendorUpdate=2004-01-30 autoSelect=true
vendorFree Software Foundation, Inc./vendor
locationfile:///usr/lib/location
version1.4.2/version
features0/features
requirements0/requirements
vendorData660069006C0065003A002F002F002F007500730072002F006C00690062002F00670063006A002D0034002E0031002E0031002F006C00690062006A0076006D002E0073006F00/vendorData
/javaInfo
/java

Tora


-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org



Re: [dev] 3.1.1 Linux crashes with libgcc_s.so.1

2009-09-29 Thread tora - Takamichi Akiyama

Questions
 Is /opt/openoffice.org/ure/lib/libgcc_s.so.1 needed?
 Can I simply remove or rename it?


Stephan Bergmann wrote:
libgcc_s.so.1 comes with GCC, is part of its runtime libraries, and 
evolves backwards-compatibly over time.  OOo includes the libgcc_s.so.1 
matching the GCC with which it is built.  On any given Linux machine, a 
newer libgcc_s.so.1 may be installed in the system, and any given 
dynamic library that OOo happens to load from the system may require it. 


I see.

 The only good solution, indeed, is to remove the old OOo version of 
libgcc_s.so.1 so that all pick up the new version from the system.


Good. So, one of the following files could be removed in case of CentOS 5.2.

 - /opt/openoffice.org/ure/lib/libgcc_s.so.1 embedded in the OpenOffice.org 
3.1.1 is for gcc 3.4.x used by the release engineers.

 - /lib/libgcc_s.so.1 accompanied by CentOS 5.2 seems for gcc 4.2.x.

Whether and, if yes, how that relates to your JVM problem I do not know, 
though (java.lang.ProcessBuilder was introduced in Java 5---maybe that 
gives a clue).


Thanks a lot,
Tora


-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org



Re: [dev] devel packages

2009-09-22 Thread tora - Takamichi Akiyama

Stephan Bergmann wrote:
IMO a package X-devel only makes sense if the base package X contains 
something that has an API for clients, and those clients typically need 
some additional files to interact with X through that API (C headers, 
link libraries, etc.).  The only parts of OOo that would qualify here 
are the URE and the OOo UNO API.  For the latter, there is already the 
SDK---which also covers support for the former.


Indeed.

There might be another use case. That is to instantly build desired shared
library files without waiting for finishing with full build process or,
at least, building the desired module on the way of full build.

A set of 'devel' packages would help software engineers slightly modify
source code of OpenOffice.org and build desired shared library files.

Scenario
 A customer wants to have Calc with a single sheet at its startup.
 There might be several solutions. E.g delivering and installing template
 files to every PCs over their organization, remotely replacing one of or
 some of shared library files such as scmi.dll as a patch, and so on.

 It seems the initial number of empty sheets is defined here:
 http://svn.services.openoffice.org/ooo/trunk/sc/source/ui/view/tabvwsh4.cxx

SCTAB nInitTabCount = 3;  //! konfigurierbar !!!
for (SCTAB i=1; inInitTabCount; i++)
pDoc-MakeTable(i);

 Substituting 3 with 1 and building scmi.dll might bring desired results.
SCTAB nInitTabCount = 1;  //! Try it !!!


To build the module 'sc' to get locally modified scmi.dll, several header
files 'deliver-ed' into $SOLARVER/$INPATH/inc/ by other depending modules
would be required. If they are available as a 'devel' package, steps would
be surprisingly easier than ever.

 ./configure ...
 ./bootstrap
 source xxxEnv.Set.sh
 cd sc
 export SOLARINC= $SOLARINC -I/opt/openoffice.org/basis3.1/include
 export SOLARLIB= $SOLARLIB -L/opt/openoffice.org/basis3.1/program
 build

The same concept could be applied to looking into problems with
'dmake debug=1,' fixing bugs, confirming the fix, etc.

Tora

-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org



[dev] devel packages

2009-09-21 Thread tora - Takamichi Akiyama

Hi,

Linux distributions come with additional packages for software engineers.

A package 'kernel' is the one for runtime while '-devel' and '-headers'
are for engineers and/or users to make small changes to the existing files.

E.g.
 kernel-2.6.23.1-42.fc8
 kernel-devel-2.6.23.1-42.fc8
 kernel-headers-2.6.23.1-42.fc8


Likewise how about having such auxiliary packages for the OpenOfffice.org?

E.g.
 ooobasis3.1-core04-3.1.0-9399.i586.rpm
 ooobasis3.1-core04-devel-3.1.0-9399.i586.rpm

The files from the 'devel' package would be installed into
/opt/openoffice.org/basis3.0/include/ and/or some relevant locations.

Any thoughts?
Tora

-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org



Re: [dev] compiling error python

2009-09-17 Thread tora - Takamichi Akiyama

I am not sure, but one possible solution might be either or both:
 - Update some Perl modules, at least, Archive::Zip
   http://search.cpan.org/dist/Archive-Zip/
 - Update Perl

On your system, try
$ perl -c solenv/bin/packimages.pl

That should print
solenv/bin/packimages.pl syntax OK

I have no idea about how to instantly update them with Ubuntu.
Tora

Roman Gegenbauer wrote:

Hello to all,

Can anyone help me at this error:

Bareword AZ_OK not allowed while strict subs in use at 
/home/roman/src/openoffice.org/OOO310_m19/solenv/bin/packimages.pl line 369.
Execution of /home/roman/src/openoffice.org/OOO310_m19/solenv/bin/packimages.pl 
aborted due to compilation errors.
dmake:  Error code 255, while making '../unxlngx6.pro/bin/images_tt.zip'
ERROR: Error 65280 occurred while making 
/home/roman/src/openoffice.org/OOO310_m19/automation/packimages
make: *** [all] Fehler 1

I get this error on an AMD64 Turion X2 on Linux UbuntuStudio 64-bit. The 
configure script passes correctly.
As it could be seen it is the 3.1.1 OpenOffice.org source.

thanks in advance,
roman


-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org



Re: [dev] RE: [api-dev] Re: [dev] Openoffice automation using a service

2009-09-17 Thread tora - Takamichi Akiyama
Hi Wei,

Wei Min Teo wrote:
 Thanks for your replies and suggestions. However, I do not want to start 
 soffice.exe as a normal user account as I would need the user account 
 password or wait for a user logon. 

I do not know about Windows well. How is the account 'SYSTEM' dangerous?

Microsoft TechNet describes user accounts for IIS and Built-in Accounts at
http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/3648346f-e4f5-474b-86c7-5a86e85fa1ff.mspx?mfr=true

That might help you understand and set up an account for your OpenOffice.org.
It mentions one of the accounts, built-in Local Service user account which 
might be an alternative.

 I realised the problem running a OO service as SYSTEM is that:
 
 the service runs as a special account and OpenOffice.org will try to show 
 the license agreement dialog as if it was a new user instead of starting the 
 application.

Yeah, that is the phenomenon I pointed before and said that might be well-known.

 To avoid this, you need to edit share\registry\data\org\openoffice\Setup.xcu 
 (it's an XML file) inside the OpenOffice.org installation directory and 
 replace this bit

Oh, that is a good idea, tweaking Setup.xcu under the folder 'share.' That is 
cool!

 This is the article that explains it: http://www.artofsolving.com/node/11

Cheers,
Tora


-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org



Re: [dev] compiling error python

2009-09-17 Thread tora - Takamichi Akiyama

Let me make steps to conduct syntax check in a bit detail:

Expectations:
 $ cd $SRC_ROOT/solenv/bin/modules
 $ perl -c ../packager.pl
 ../packager.pl syntax OK

Or
 $ perl -I $SRC_ROOT/solenv/bin/modules -c $SRC_ROOT/solenv/bin/packager.pl
 x/solenv/bin/packager.pl syntax OK

Tora

tora - Takamichi Akiyama wrote:

I am not sure, but one possible solution might be either or both:
 - Update some Perl modules, at least, Archive::Zip
   http://search.cpan.org/dist/Archive-Zip/
 - Update Perl

On your system, try
$ perl -c solenv/bin/packimages.pl

That should print
solenv/bin/packimages.pl syntax OK

I have no idea about how to instantly update them with Ubuntu.
Tora

Roman Gegenbauer wrote:
Bareword AZ_OK not allowed while strict subs in use at 
/home/roman/src/openoffice.org/OOO310_m19/solenv/bin/packimages.pl 
line 369.
Execution of 
/home/roman/src/openoffice.org/OOO310_m19/solenv/bin/packimages.pl 
aborted due to compilation errors.



-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org



Re: [dev] Openoffice automation using a service

2009-09-14 Thread tora - Takamichi Akiyama

Hi,

Wei Min Teo wrote:
 The first instance of soffice.exe is start by the bootstrap command, it is 
ran as SYSTEM. I did not use any command line options just the default bootstrap 
function cppu::bootstrap().

I am sorry, but I cannot understand what you are saying.
bootstrap command, bootstrap function cppu::bootstrap(), ...
Maybe, I would need to study about that more.

Possible recommended command line options could be found in this file,
which is a source code of .jar file frequently used in the SDK to start and/or 
connect to the process of soffice.bin through a named pipe.
http://svn.services.openoffice.org/ooo/branches/OOO310/javaunohelper/com/sun/star/comp/helper/Bootstrap.java

Running soffice.bin as an account SYSTEM might be discouraged
since the OpenOffice.org is a huge software and is not bug-free.
There are possibilities to harm your system caused by a bug and/or security 
hole.


 Another abnormality is that if i try to rerun the service,
 an additional copy of soffice will be run which shouldn't
 be the case because it usually searches for an existing instance.

The phenomenon can be often observed, if a running user account
has not yet accepted the license agreement. The first instance
of soffice.bin is just waiting for user's actions, i.e. clicking
on the 'OK' button behind the scene. The second one has established
a connection to the first one and is waiting for its response.

Ciao,
Tora


-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org



Re: [dev] Openoffice automation using a service

2009-09-14 Thread tora - Takamichi Akiyama
Hi Wei,

Wei Min Teo wrote:
 I used the sample code from this url 
 :http://wiki.services.openoffice.org/wiki/UNO_registery_and_Bootstrapping 
 under The new ::cppu::bootstrap() function.

Thank you for the information. Now I understand.
What I have just learned from that are

It seems that ::cppu::bootstrap()
(a) will not give an option -nofirststartwizard to soffice.exe
Therefore, you, in behalf of the user account, will need to accept the 
license agreement first.

(b) is intended to be used by a program from which soffice.bin will be remotely 
controlled.
bootstrap() will create a random pipe name, which cannot be guessed by 
other program.


So, what shall we do?
I am not sure. Here is just one idea.

(1) Start soffice.exe as normal user account with the following command line 
options.
soffice.exe -nofirststartwizard -nologo -nodefault -norestore -nocrashreport 
-nolockcheck -accept=pipe,name=MY_FAVORITE_NAME;urp;

(2) And then use a conventional way to establish a connection to the process of 
soffice.bin which is listening to the named pipe MY_FAVORITE_NAME.



http://svn.services.openoffice.org/ooo/trunk/cppuhelper/source/bootstrap.cxx
namespace cppu
{

Reference XComponentContext  SAL_CALL bootstrap()
{

// create a random pipe name
...
OUString sPipeName( buf.makeStringAndClear() );

// accept string
OSL_ASSERT( buf.getLength() == 0 );
buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( -accept=pipe,name= ) );
buf.append( sPipeName );
buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( ;urp; ) );

// arguments
OUString args [] = {
OUSTR( -nologo ),
OUSTR( -nodefault ),
OUSTR( -norestore ),
OUSTR( -nocrashreport ),
OUSTR( -nolockcheck ),


http://svn.services.openoffice.org/ooo/trunk/desktop/source/app/app.cxx
// First Start Wizard allowed ?
if ( ! pCmdLineArgs-IsNoFirstStartWizard())


http://svn.services.openoffice.org/ooo/trunk/desktop/source/app/cmdlineargs.cxx
sal_Bool CommandLineArgs::IsNoFirstStartWizard() const
{
osl::MutexGuard  aMutexGuard( m_aMutex );
return m_aBoolParams[ CMD_BOOLPARAM_NOFIRSTSTARTWIZARD ];
}

else if ( aArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( 
-nofirststartwizard )) == sal_True )
{
SetBoolParam_Impl( CMD_BOOLPARAM_NOFIRSTSTARTWIZARD, sal_True );
return sal_True;
}



Tora


-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org



Re: [dev] Openoffice automation using a service

2009-09-14 Thread tora - Takamichi Akiyama
Another possible way (still, I am not sure, though):

(1) Start soffice.exe as a normal user account with the following command line 
options.
soffice.exe -nofirststartwizard -nologo -nodefault -norestore -nocrashreport 
-nolockcheck

(2) And then use a recent way such as ::cppu::bootstrap() to connect to the 
process of soffice.bin.

Tora


-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org



Re: [dev] Openoffice automation using a service

2009-09-14 Thread tora - Takamichi Akiyama
Sorry for multiple emails.

If you attempt to use the following way, the user account for (1) and (2) must 
be identical. Otherwise, (2) will start another instance of soffice.bin from 
the scratch even though (1) is already running.

The reason is that (1) will be waiting at its own named pipe, whose name will 
be created based on a folder name for the user account or like that - I forgot 
-, and (2) will also use the identical named pipe. So they will be able to 
handshake each other.

Please correct me if anyone finds misunderstandings.

Tora

tora - Takamichi Akiyama wrote:
 Another possible way (still, I am not sure, though):
 
 (1) Start soffice.exe as a normal user account with the following command 
 line options.
 soffice.exe -nofirststartwizard -nologo -nodefault -norestore -nocrashreport 
 -nolockcheck
 
 (2) And then use a recent way such as ::cppu::bootstrap() to connect to the 
 process of soffice.bin.

-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org



Re: [dev] Openoffice automation using a service

2009-09-13 Thread tora - Takamichi Akiyama

Hi,

How do you start the first instance of soffice.exe?
You mentioned a service running as LOCAL_SYSTEM.

Could you give us a little bit details about that?
What command line options do you give to the soffice.exe?
What user account is being used for the process of soffice.exe?
etc...

I guess that behavior is well-known and its solution is described somewhere.
Does anyone know that?

Cheers,
Tora

Wei Min Teo wrote:

Hi all,

I'm trying to do some openoffice automation using a service running as LOCAL_SYSTEM on XP so that it runs without needing a login. However, the program seems to get stuck at bootstrap command: cppu::bootstrap(). It does not throw any exception and it does not crash. 

Soffice.bin/Soffice.exe is run as LOCAL_SYSTEM as well which means bootstrap is able to run soffice at least... Another abnormality is that if i try to rerun the service, an additional copy of soffice will be run which shouldn't be the case because it usually searches for an existing instance. 

Has anyone encountered a similar problem before? How can i resolve this? 


Thanks.

Cheers,
Wei Min 



-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org



Re: [dev] Re: XML Import Filter

2009-08-14 Thread tora - Takamichi Akiyama

If you will need to use several XSLT templates on demand, I am not
sure, though, but the section Importer Filtering and Parsing
the Result in [1] could be one of the possible solutions.
[1] 
http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/OfficeDev/The_Importer

 1. Create a stream (1) which will read the target file.
 2. Create a stream (2) which will read the XSLT file.
 3. Create a XSLT transformer (3) with (2).
 4. Create a pipe (4),(5).
 5. Transform (1) with (3) and write results to (4).
 6. Let the OpenOffice.org to read (5) coming from (4).

So, it could be no need to use a XSLT function embedded in OpenOffice.org.
Just use available XSLT such as javax.xml.transform, instead and
give the result to the OpenOffice.org.

Examples (also available in the SDK; actually its source code)
[2] 
http://svn.services.openoffice.org/ooo/tags/OpenOffice_3_1_0/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/

Any cool ideas?


Jakob Mandalka wrote:

Ok thanks, i figured it out. But now the next Problem.

How I can register a filter using this API?

At the moment I added my filter via the menu in Open Office but I want
to change that.



-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org



Re: [dev] Re: XML Import Filter

2009-08-14 Thread tora - Takamichi Akiyama

For better performance, here is another idea.

 0. Register a simple XSLT template as an input filter
to your OpenOffice.org.

 1. Do the XSLT transformation with Java or any other command
such as a xsltproc command alone and save the result as a
temporary file.

 2. Let the OpenOffice.org to read the temporary file through
the simple XSLT template which will just do xsl:copy.

In the step 6 below would make a bad performance if the external
Java program is running separately from OpenOffice.org and connecting
to the OpenOffice.org through TCP/IP or named pipe.

It would be possible to let the Java program run as a process
of OpenOffice.org which could dynamically load a Java VM into
a process of OpenOffice.org so that the Java program would be
running more efficiently. To do so, however, you would need to
develop your Java program as a UNO component and deploy it to
your OpenOffice.org.

As you know, Java classes could be packed into .war file and
be deployed to an application server, you can deploy your
Java classes to your OpenOffice.org as a UNO component.
However, I guess, it might be far beyond your expectation.

Any much cooler idea?
Tora

tora - Takamichi Akiyama wrote:

If you will need to use several XSLT templates on demand, I am not
sure, though, but the section Importer Filtering and Parsing
the Result in [1] could be one of the possible solutions.
[1] 
http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/OfficeDev/The_Importer 



 1. Create a stream (1) which will read the target file.
 2. Create a stream (2) which will read the XSLT file.
 3. Create a XSLT transformer (3) with (2).
 4. Create a pipe (4),(5).
 5. Transform (1) with (3) and write results to (4).
 6. Let the OpenOffice.org to read (5) coming from (4).

So, it could be no need to use a XSLT function embedded in OpenOffice.org.
Just use available XSLT such as javax.xml.transform, instead and
give the result to the OpenOffice.org.

Examples (also available in the SDK; actually its source code)
[2] 
http://svn.services.openoffice.org/ooo/tags/OpenOffice_3_1_0/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/ 



Any cool ideas?


Jakob Mandalka wrote:

Ok thanks, i figured it out. But now the next Problem.

How I can register a filter using this API?

At the moment I added my filter via the menu in Open Office but I want
to change that.




-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org



Re: [dev] Re: XML Import Filter

2009-08-11 Thread tora - Takamichi Akiyama

It would not be hard to do that. There might be lots of solutions.

This is one of the examples:
http://distribution.openoffice.org/source/browse/distribution/mirrors/repository/production/tools/Calc/

The key you might have been looking for would be:

 1. Name the filter as you like and fill Filter name field with it
during XSLT installation to your OpenOffice.org.

 2. Specify the exact same filter name as a value of FilterName
property which will be passed to loadComponentFromURL().

Tora

Jakob Mandalka wrote:

Noone any Idea how to make this?

2009/8/6 Jakob Mandalka jakob.manda...@googlemail.com:

Hello everyone, i am new here and i have a question to ask which might be a
little complicated.
What i want to do is to develop a component such as a button in open office
which , when pressed, imports an xml file which can be selected by a file
dialog and apply an already installed xslt import filter -which basically
transforms the XML file and fits its data to a simple table-.So the result
is a report-like .odt file with data provided by my xml file.
(this is the final goal,for the moment i want to just do it from command
line java program)

I am stuck at how can i use the api to load a filter package i installed
before opening the document,so that when the page opens you see the .odt
file with the table and my data..
i am able to do so from openoffice interface , the traditional way, but how
can i do it programmatically..?For the moment i open a file from java using
the NOA API but i dont find any info on how to apply a filter prior to opening
it.


-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org



Re: [dev] New Option 'Save with same password'

2009-06-30 Thread tora - Takamichi Akiyama

Hi,

Mikhail Voytenko wrote:
document. Although it would need more actions, I do not think that 
somebody who got access to the memory and was able to read the password 
would not be able to read more keys. Please correct me if I have 
misunderstood something.


I don't know about Windows, but UNIX. One possible scenario:

 1. There are some colleges in a branch and they are working on their 
individual terminal.
 2. All UNIX processes of OpenOffice.org are running in their server machine
and their visual images are projected to users' individual terminal.
 3. User A types 'ps -ef' command to find a process ID of User B's 
OpenOffice.org.
 4. User C takes User B for a coffee break.
 5. User A comes to B's desk and starts a terminal emulator.
 6. User A types 'gcore -o output.filename processID' on Solaris or
using gcore subcommand of 'gdb' on Linux to get a core dump without
terminating the OpenOffice.org.
 7. User A closes the window of the terminal emulator.
 8. User B comes back to his desk and continues his work.
 9. User A and C starts to look for the password with their debugger
referring to the source code of OpenOffice.org.

The point is that intruders have plenty time to look for the password
in their laboratory, once they have taken the contents of a process memory.

Does Windows Server have the similarity?

Best Regards,
Tora

-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org



Re: [dev] New Option 'Save with same password'

2009-06-26 Thread tora - Takamichi Akiyama

Hi,

Alexander Ritter wrote:
 It's all said by the title: I would prefer a new option box in the save
 dialog where the user can specify to take the old password to save the
 document with instead of typing a new one or even the same old password
 twice again. A nice tool for versioning e.g. confidential documents!

 Precondition - of course - would be that the actual document was already
 saved using a password. Otherwise the option box has to be disabled.

That would be a nice feature to achieve needs that you mention.

To securely implement it, we might need additional feature such as handing with 
a master pass-phrase to encrypt the password that a user types to open the 
document file.

It comes from a technical reason.

 1. A user tries to open a password protected document file.
 2. An application prompts the user to enter a password.
 3. The application opens the file with the password.
 4. The application memorizes the password somewhere.
 5. The user revises the document.
 6. The user tries to save the document.
 7. The application retrieves the password which has been kept somewhere.
 8. The application save the document with the password.
 9. The user close the document.
10. The application erases the password.

The password could be leaked during the step 2 to 10 since the password should 
be physically stored in a system memory, disk device or something else. If the 
password is stored without encryption, it could be leaked.

You might have experienced this type of behavior of one operating system.
 1. The operating system (OS) finds that an application crashes.
 2. The OS asks the user if the OS can send data to their laboratory
via the Internet for investigation.
 3. If the user answer 'Yes' to the OS, the OS sends data which might
includes the password stored in the memory.

If the password is stored in a disk device, there would be a chance to directly 
read it using a special tool, although the file is protected with a permission 
managed by the OS.

I guess, that would be the primary reason why most application do not have the 
feature that you are proposing.

Any good idea?

Regards,
Tora


-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org



Re: [dev] Document file lock system could be enhanced

2009-06-22 Thread tora - Takamichi Akiyama

Hi Mikhail,

Mikhail Voytenko wrote:
although the provided document handling scenario looks to be a little 
bit strange for me, opening the document readonly as Mathias has already 
suggested would be the solution. In your case the documents are opened 
from the file explorer. So you need probably a possibility to let office 
open every file readonly by default.


Could you provide us with a user scenario using a possible solution opening all 
documents readonly by default?

case A) a single user handling an existing document file; when the file gets 
locked and when unlocked?
case B) two users sharing one document file in a file server and one user 
editing it
case C) multiple users sharing one document file in a file server and some 
users unexpectedly editing it simultaneously
case D) File - Save As, previous one unlocked and new one locked, become 
readonly?
case E) Starting with an empty file (couldn't be readonly) and File - Save, 
become readonly, locked?
...

I have been trying to imagine that, and found it is hard for me.

In other words, there should be a possibility to configure office in the 
way, that it opens the documents readonly always. If user wants to edit 
the opened document, he has to switch the document to edit mode 
explicitly. The feature would be a consistent part of the current 
design, so please submit a new feature request to me ( 
m...@openoffice.org ) for this.



PS: Please try to avoid writing words with capital letters without necessity, 
...


Thank you for the suggestion. I will keep it in mind.

Best Regards,
Tora

-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org



Re: [dev] Document file lock system could be enhanced

2009-06-22 Thread tora - Takamichi Akiyama

Hi Mikhail,

P.S.
I do not think we are in hurry. It is Monday today. Please keep your time for 
more important things.

I would be also trying to devise some user scenarios with 
all-the-time-starting-with-read-only documents.

Regards,
Tora

tora - Takamichi Akiyama wrote:

Hi Mikhail,

Mikhail Voytenko wrote:
although the provided document handling scenario looks to be a little 
bit strange for me, opening the document readonly as Mathias has 
already suggested would be the solution. In your case the documents 
are opened from the file explorer. So you need probably a possibility 
to let office open every file readonly by default.


Could you provide us with a user scenario using a possible solution 
opening all documents readonly by default?


case A) a single user handling an existing document file; when the file 
gets locked and when unlocked?
case B) two users sharing one document file in a file server and one 
user editing it
case C) multiple users sharing one document file in a file server and 
some users unexpectedly editing it simultaneously
case D) File - Save As, previous one unlocked and new one locked, become 
readonly?
case E) Starting with an empty file (couldn't be readonly) and File - 
Save, become readonly, locked?

...

I have been trying to imagine that, and found it is hard for me.

In other words, there should be a possibility to configure office in 
the way, that it opens the documents readonly always. If user wants to 
edit the opened document, he has to switch the document to edit mode 
explicitly. The feature would be a consistent part of the current 
design, so please submit a new feature request to me ( 
m...@openoffice.org ) for this.


PS: Please try to avoid writing words with capital letters without 
necessity, ...


Thank you for the suggestion. I will keep it in mind.

Best Regards,
Tora



-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org



Re: [dev] Document file lock system could be enhanced

2009-06-19 Thread tora - Takamichi Akiyama

Hi Mikhail,

Mikhail Voytenko wrote:
 I think I see the problem. Probably you have exactly the case when file
 system locking does not work. And the current implementation checks
 whether the file was changed only if system file locking is not used by
 the document. That is of course a bug, actually the OOo locking
 mechanics was introduced to workaround the known problems with the
 system file locking, so the check should be active always. I have just
 submitted a new issue to myself
 http://qa.openoffice.org/issues/show_bug.cgi?id=102701

You mean this?
http://www.openoffice.org/issues/show_bug.cgi?id=102931


By the way, there would be some ways to confirm if a target file has been 
modified.

 (a) time stamp of a target file
 (b) digest value of a target file
 (c) original content of a target file


As you know, Subversion is not using (a) to find modified files.

 1. A programmer checks out source files from a repository.
 2. He edits one of the source files and save it.
 3. svn status reports M filename meaning the file is locally modified.
 4. He edits it again and undo the modifications and save it.
 5. svn status reports nothing meaning no file locally has been modified.

 Through the steps above, a time stamp of the file has been definitely changed.
 But, its content at the step 5 is the same as the original at the step 1.


A criteria of modified could be reconsidered.

As time goes, there would be more and more heterogeneous computing environments 
surrounding users.

Somewhat unconvincing scenario:
 1. A user downloaded (or checks out) her document file from the
Internet disk yesterday.
 2. Today, she starts editing the file with OpenOffice.org.
 3. She downloads it again since she forgets when she downloaded
it and ensures she has the latest one.
 4. She attempts to save current document on the OpenOffice.org to the file.
 5. She faces ...

On the step 5, what should happen?

 A) A dialog window appears with a message:
The file has been MODIFIED after you had loaded the file
(in fact, the content of the file has not changed, though)

 B) Nothing happens since the content of the file has NOT CHANGED,
even its time stamp has been changed, and she successfully
saves the document to the file.

I am not sure that which is better for current the generation of users:
 (A) comparing a time stamp of the file to determine modifications
 (B) comparing contents of the file to determine modifications

But I bet (B) would be better for the future.


By the way, SAL_ENABLE_FILE_LOCKING does only affect sal 
implementation. So if it is not set the framework and office 
implementation still believes that the system file locking is used, at 
least the implementation requests sal to use it ( actually this variable 
looks to be a hack for me ). To let the framework not use the system 
file locking, there is a configuration entry 
/org.openoffice.office.Common/Misc/UseDocumentSystemFileLocking, that 
let framework request no system file locking from sal for documents.


I would give it a try on a local file system using physical disk devices.

Regards,
Tora

-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org



Re: [dev] Document file lock system could be enhanced

2009-06-19 Thread tora - Takamichi Akiyama

Hi Mikhail,

Thank you for the comments.

I am still looking for how to abandon use of file locking since file
locking could not be perfect under current, near future circumstances.

There are already several types of storages in the first decade of the 21th 
century.
 - local disk device
 - local removable device
 - Network File System (NFS)
 - Common Internet File System (CIFS), aka Samba
 - Internet disk
 - Explorer-embedded remote disk connectivity
 - File Transfer Protocol (FTP) on Windows Explorer
 - File access through Web service
 - ...
And new types of storage devices and/or systems could follow in the near future.

The idea of file locking with office suites was probably introduced
in 1990s. Computer environment at the time was quite simple.
Users use a Personal Computer which does not connect to other PCs.

The circumstances have changed dramatically in the last two decades and 
relevant technology will be uninterruptedly developing, I think.


Mikhail Voytenko wrote:

A criteria of modified could be reconsidered.


Yes of course, but the coefficient efforts/benefits should be always 
in mind while doing so.


I agree.


Somewhat unconvincing scenario:
 1. A user downloaded (or checks out) her document file from the
Internet disk yesterday.
 2. Today, she starts editing the file with OpenOffice.org.
 3. She downloads it again since she forgets when she downloaded
it and ensures she has the latest one.
 4. She attempts to save current document on the OpenOffice.org to the 
file.

 5. She faces ...

On the step 5, what should happen?

 A) A dialog window appears with a message:
The file has been MODIFIED after you had loaded the file
(in fact, the content of the file has not changed, though)

 B) Nothing happens since the content of the file has NOT CHANGED,
even its time stamp has been changed, and she successfully
saves the document to the file.


Actually the step (3) should not be possible. Unfortunately it is 
possible because of bugs in system file locking, in those circumstances 
(A) looks quite good from my point of view.


Without merging functionality, the action with downloading of the 
document to get up-to-date version has no sense anyway. And sorry, but I 
see no reason to sacrifice the storing performance to let an absolutely 
theoretical from my point of view scenario look a little bit nicer. 
Especially if the scenario is only possible because of bug in system 
file locking.


 1. Start Writer with an empty document.
 2. Name it and save it. (A)

  Should the file (A) be locked?

 3. Save as another file (B)

  Should the file (A) be unlocked?
  And should the file (B) be locked?

As you might already notice, implementing file lock on just a local
file system is not so simple. How can we perfectly implement it for
several types of, complex, storage devices and/or systems?

Let's go back to the origination.
What is the goal?
What do we need to prevent from?
To satisfy the goal, what options do we have?
File locking is clearly one of the options, but is not the only one.
It might be time to think Efforts of programmers vs Quality of prevention

Regards,
Tora


-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org



Re: [dev] Document file lock system could be enhanced

2009-06-19 Thread tora - Takamichi Akiyama

Hi,

 Please DO NOT LOCK a file when a user just loads a file.

Mikhail,
 I do not want to bother you, but, ...

 Please, please, make productive office suite more PRODUCTIVE.


Another scenario, Locked out by a reviewer

 1. User A has created an Impress document for a meeting held this afternoon.
 2. User A sends an e-mail to her college User B to ask reviewing it.
 3. User B opens the document file stored in their file server.
 4. Lunch time has come and User B goes to the restaurant.
 5. User A has found some errors in the document.
 6. User A tries to load the document, but gets warned

The file is locked by the User B.

 7. User A calls the User B, but hears a message from B's answering machine.
 8. The meeting is arranged at 1:00pm. It is 12:30 now.
 9. User A tries to call User C to ask to close User B's document.
10. User C, however, is also at the restaurant with B.
11. User A runs to User B's booth located in another building.
12. 

I know, they are not so stupid.
But this type of scenario could be seen here and there since office suite 
software products are widely used by from children to elderly people.
The similar situation could be also observed in an elementary school, etc.

Regards,
Tora


-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org



Re: [dev] Document file lock system could be enhanced

2009-06-18 Thread tora - Takamichi Akiyama

Hi Mikhail,

Mikhail Voytenko wrote:
OOo3.1 has already collision detection system, although it is mostly 
useful in case system file locking is turned off. If the document was 
changed during the editing the user gets notification that he might 
remove changes from somebody else.


If the system file locking is on, the mentioned scenario is only 
possible when the system file locking does not work as expected. That 
might happen in heterogeneous networks.


Is there any document, reference, issue, ... on that?

With DEV300_m48 locally built on OpenSolaris x86,
I cannot know how to enjoy with it.

 1. Prepare two existing .odt files: (a) and (b).
 2. Start OpenOffice.org DEV300_m48.
 3. Open (a) with the OOo.
 4. Overwrite (a) with (b) using 'cp' UNIX command.
 5. Make modifications on OOo.
 6. Save the document by pressing Ctrl-S.

Nothing seems to happen. Maybe, I am doing somewhat wrongly.

Regards,
Tora


On 06/17/09 06:42, tora - Takamichi Akiyama wrote:

2. Collision detection

  User A  |++-+-- time line
   ^open^modify   ^save
   12 3

  User X  |+++-
   ^open^modify  ^save
   456

User X could be informed that the disk file has been altered by 
someone else -(6) and prompted:
 (a) Overwrite the file with yours (Warning: someone else's changes 
will be lost)

 (b) Save your document as another file
 (c) Cancel



-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org



Re: [dev] Document file lock system could be enhanced

2009-06-05 Thread tora - Takamichi Akiyama

Hi Mathias,

(Descriptions in the following scenario has been slightly revised)

A division with 100s staffs runs a file server.
1. A general manger sends them an e-mail to see a document in the file server.
2. User A opens the file with OpenOffice.org 3.0 as usual.
3. User B opens the file with OpenOffice.org 3.0 and faces a dialog window 
saying

Document file 'xxx.odt' is locked for editing by:
user_a (mm.dd. hh:mm)
Open document read only or open a copy of the document for editing.
[Open Read Only]  [Open Copy]  [Cancel]

4. User C opens the file with OpenOffice.org 3.0 and faces the same dialog.
5. User D, one of the line managers, opens it ..., rushes into User A's
   booth and scolds that A should not EDIT it.

User A did not intend to edit it or even bother anybody else,
but just wanted to SEE it following the big boss's order.


What we can learn from the scenario above:

(a) The message Document file 'xxx.odt' is locked for editing by: ...
 might not be appropriate for the situation.

 Let's see the following another scenario:

  User A  |---++- time line
  ^open it ^start to make modifications

  User B  |--+---
 ^open it

  User C  |-+
^open it

 What message should User B be given?  Has User A edited it?  Not yet.
 What message should User C be given?  User A has made modifications.

(b) Timing when a lock file will be created is reconsidered.
 So, when the lock file would be created could be one of the points.
 There might be no need to create a lock file upon opening a file.
 Rather, it would be created as a user starts editing the document.


Mathias Bauer wrote:
 OOo has an option to make a document read-only by default. And users can
 open any document read-only by setting the check mark in the file
 picker. So if user A didn't do that, maybe user D is right with blaming
 him? ;-)

 Another (not yet existing option) would be to have an explicit open
 read-only menu entry or toolbar button, but that might be an
 exaggeration. Maybe a toolbar button that is invisible by default?

Users normally double-click on an icon of desired file in the Explorer
of Windows, Nautilus of Gnome, ... They might not notice such a wonderful
feature open in the read-only mode, even though we have implemented it
for desktop of Windows, Gnome, Macintosh, ...


   Merge after editing it model - used by recent version control systems: 
CVS, Subversion, git.
   Current implementation of 3.0 could be considered Lock before editing it 
model.

 The reason why we don't allow for merge after editing is that our
 change tracking is not complete in most (all?) applications. Fixing that
 would be a major effort, so it is in concurrency with all other major
 efforts we still have on the list.

Yeah, it would be hard to do that.
Calc 3.0 already has a similar feature called Share document:
http://www.openoffice.org/dev_docs/features/3.0/#Spreadsheet_Collaboration_Through_Workbook_Sharing
But, how we can natively achieve merging two Impress documents!?


 Interoperability with other tools
   Several ODF tools - ODFToolkit, OODoc in Perl, ... - work with ODF files.
   They, however, do not work with a lock file of 3.x: .~lock.xxx.odt# .

 So they can fix that. :-)

 We can make this a kind of public API of OOo, if that helps. But
 before we do that, there should be some interest from any other ODF
 based application.

I am afraid, but that would make things worse.


Let's see other possible scenarios (some of them could be an external tool):

  User A  |+--++-- time line
   ^open it   ^modify it   ^save it


  User X  |+-+---
   ^open ^close


  User Y  |---+-+---+
  ^open ^modify ^save


  User Z  |--+++-
 ^open^modify  ^save

There is no need for either User X, Y, or Z to notice who open the file.

There is nothing wrong with User Y.

As both User A and Z attempt to save it, they should be informed that the
file has been altered after they had opened it. They would be prompted to
choose one of the choices:
 (a) Overwrite the file with your document
 (b) Save your document as another file
 (c) Cancel

Therefore, we might not need to utilize a lock file.
All we need might be:
 (1) Memorize both a size and digest value such as MD5 check sum of a file
 as the file is being opened.
 (2) Confirm if the two values have been changed as the file is being saved.
 If, at least, one of the values is different from the original value,
 prompt the user to ask what to do.

Another cool stuff might be:
As User Z 

Re: [dev] default patch owners for modules

2009-05-10 Thread tora - Takamichi Akiyama

I have just updated the script, attached in an issue 101719.
http://www.openoffice.org/nonav/issues/showattachment.cgi/62128/create_submission_gateway_2-2009-05-10.pl

Caolán,
Could you give it a try and revise it accordingly?

Frank,
If you like it, could you or someone else check-in it to the CVS repository?


 question then is who is currently seen as the sal maintainer. I feel
 that in practice it has reverted back to sb, agreed ? but maybe someone

Who should maintain the data included in the script?
Developers themselves?


Just look for sal. sb is currently assigned.

 [Module]
  crashrep  porting
  sal   porting sb
  boot  porting

If you erase a word 'sb' from the script, sal will be transferred
to the default owner of the module, thus 'mh'.

 [Project]
  Porting   porting mh porting


Thanks in advance,
Tora


Caolán McNamara wrote:

On Sat, 2009-05-09 at 13:55 +0200, Frank Schönheit - Sun Microsystems
Germany wrote:


http://qa.openoffice.org/issue_handling/create_submission_gateway.pl

And yes, that's somewhat outdated. Feel free to check out, update, run,
and commit the perl script :)


Just what I was looking for, I can update that, but the outstanding
question then is who is currently seen as the sal maintainer. I feel
that in practice it has reverted back to sb, agreed ? but maybe someone
else.




-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org



Re: [dev] default patch owners for modules

2009-05-10 Thread tora - Takamichi Akiyama

On Sun, 2009-05-10 at 16:50 +0900, tora - Takamichi Akiyama wrote:

I have just updated the script, attached in an issue 101719.
http://www.openoffice.org/nonav/issues/showattachment.cgi/62128/create_submission_gateway_2-2009-05-10.pl


Caolán McNamara wrote:

Err, wmsfontextract ?, presumably should be msfontextract, and there's
a load of entries in there that don't really need to be in there that
just clutter things up, e.g. glow never released any actual *code* as
far as I know to submit a patch against and so on.


You, great! You have found it. Thanks. The letter 'w' maybe come from my
keyboard during working with 'emacs' which requires lots of magical spells
of key sequences.



So I wouldn't just put in every entry that ever existed in the
CVSROOT/modules into that submission page, but instead only the dirs
that exist at the moment in svn (and, for the moment at least, leave in
the ones that were already listed but have gone away since then). i.e. I
added the ones that are missing from a current svn checkout into the
list earlier, so from my perspective
http://qa.openoffice.org/issue_handling/submission_gateway.html has all
the links we currently need, no ?


What I can say here is that I am an engineer making a comfortable,
easily maintainable airplane (script) for you. How you enjoy with it
is completely up to you (and members from QA).

Regards,
Tora


-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org



Re: [dev] default patch owners for modules

2009-05-09 Thread tora - Takamichi Akiyama

Frank Schönheit - Sun Microsystems Germany wrote:
 http://qa.openoffice.org/issue_handling/create_submission_gateway.pl

 And yes, that's somewhat outdated. Feel free to check out, update, run,
 and commit the perl script :)

Here is another idea for that.
How about slightly enhancing [1] instead of keeping [2] updated?

[1] http://www.openoffice.org/issues/enter_bug.cgi (need to login to see this)
[2] http://qa.openoffice.org/issue_handling/submission_gateway.html

The following list has been just created as an example by manually
classifying entries shown in the CGI web page [1] by category.

By Application
  Chart:   This is the chart application for data charts and plots.
  Database access: The database application of the OpenOffice.org suite.
  Drawing: This is the drawing application for vector and bitmap 
drawings.
  Formula editor:  This is the formula editor.
  Installation:This is the installation program.
  Presentation:This is the presentation application.
  Spreadsheet: This is the spreadsheet application.
  Word processor:  This is the word processor and HTML editor application.

By Project
  api: This is the application programming interface.
  bibliographic:   Project for bibliographic elements and integration.
  bizdev:  Business Development Project
  cnmonitoring:cnmonitoring
  council: Council-related issues
  distribution:The Distribution Project deals with all logistical 
issues related to the distribution of OpenOffice.org.
  documentation:   End-user documentation, HOW-TOs for the various 
components making up OpenOffice.org
  education:   Education Project: Central place for education-related 
development: for students, professors, developers
  extensions:  Issues related to the extensions project. Extensions 
include all elements extending OpenOffice.org
  external:External sources related to OpenOffice.org
  framework:   This is the framework of the applications.
  gsl: This project contains the visual class library and other 
modules (e.g. printing, PDF export, ...).
  imported-component:  imported-component
  kde: Integration with KDE
  l10n:Localization and Internationalization
  lingucomponent:  This project covers Linuguistic functions like 
spellchecking, hyphenation and thesaurus.
  marketing:   The Marketing Project is concerned with promoting and 
advertising OpenOffice.org, product and project.
  martincvstest:   martincvstest
  martinsvntest:   martinsvntest
  native-lang: Native-Lang deals with information and resources in a 
person's native tongue.
  odf-at-www:  Bringing ODF and OpenOffice.org into the WWW.
  oopm:Project Management Application
  performance: To improve OpenOffice.org performance.
  porting: This is the project for porting to new platforms.
  qa:  This is the project for Quality Assurance and checking.
  scripting:   Everything related to Basic, the Scripting Framework and 
the Basic IDE including the dialog editor.
  sdk: This is OpenOffice.org's software development kit
  specs:   Problems with Specifications and the accompanying web 
content
  stats:   This project works on Statistics about the project and 
product.
  svn-projecteditor:   svn-projecteditor
  testextension:   testextension
  timtest: timtest
  tools:   These are the tools used in the build process and the 
build environment.
  ucb: This is the universal content broker project, that 
allows the applications to transparently access content with different 
structure.
  udk: This project is for the object model development and 
component technology.
  ui:  Common UI of OpenOffice.org Applications
  user-faq:user-faq
  utilities:   This is the project for utilities used in development.
  vba: Visual Basic for Applications project.
  website: Where issues relating to the design and content of the 
website are addressed. For specific project problems, file an issue with that 
project, eg., if a bad link in API Project, use the component named api.
  wp:  WordPerfect Integration for OpenOffice.org - mainly a 
filter.
  www: Covers website infrastructure and mail list 
functionality, such as IssueTracker, bad links, dysfunctional mail lists.

By Language
  af:  Afrikaans Language Project--Support, discussions, 
development of Afrikaans localization in Afrikaans
  ar:  Arabic native language discussions and material in the 
native language
  az:  Azeri native language discussions and material in the 
native language
  bal: Balochi 

Re: [dev] MediaWiki *import* function ?

2009-03-25 Thread tora - Takamichi Akiyama

Hi,

There is an underdevelopment extension that converts MediaWiki
markup to OpenDocument Text format (.odt)

 Extension:OpenDocument Export (Release status: beta)
 http://www.mediawiki.org/wiki/Extension:OpenDocument_Export


T. J. Frazier wrote:
Do you think it might be useful, to consider a two-step conversion 
process, using XML as the intermediate step? That is, instead of ODF 
== Wiki, we could have ODF == XML, and Wiki == XML.


@TJ: That is a beautiful implementation.
But, I am afraid, it might not be useful, I think.


The advantage I see is the division of labor.  Both groups (MW and OO.o) 
would likely see those transformations as, not very efficient, but 
relatively simple. Neither group would have to deal with each other's 
oddities, only their own.


I can agree with lesser amount of labor. But its complexity and less
reproductivity might make it less interesting, though.


Possible user scenario which I probably want to have for the
interoperability between OpenOffice.org and MediaWiki:

(Writer to MediaWiki)
 1. On writer, select a portion of or entire document and copy it.
 2. Ctrl-N to start an empty Writer document.
 3. Ctrl-Shift-V to paste special with a choice of MediaWiki format.
 4. Ctrl-A to select all and copy it.
 5. In a text field of MediaWiki, paste it.

(MediaWiki to Writer)
 1. Click on a special link next to 'Edit.'
 2. OpenOffice.org automatically starts and draws the target page
or section in a web browser.
 3. Select it and copy it.
 4. On Writer, paste it.

Regards,
Tora

-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org



Re: [dev] MediaWiki *import* function ?

2009-03-24 Thread tora - Takamichi Akiyama

Hi,

Rich wrote:

I immensily enjoy the MediaWiki export function, but in order to make
it the perfect WYSIWIG MediaWiki editor, it would also need a
MediaWiki *import* function. Is anything like that currently planned ?


If I tried to realize such a function that converts MediaWiki's format
into OpenOffice.org format, there were some ideas:

 Idea 1: Implement it in the MediaWiki as its extension.
 Idea 2: Realize it as an offline tool.
 Idea 3: Incorporate it in the OpenOffice.org as an import filter
 or in a copy-and-paste function of OpenOffice.org.

IMHO, idea 1 would be the easiest, reliable, robust way. With an extension
of the MediaWiki, a link labeled download this page as an OpenOffice.org
file might be one of the possible user interface implementations.

The reason is that MediaWiki itself knows how to interpret MediaWiki
format and how to produce its corresponding HTML format. So, what we
might need to work to realize it would be just to write a code producing
ODF format instead of HTML format.

If we had implemented it in our OpenOffice.org, we would forever have
to follow up MediaWiki's versions. Its history shows that its format
has been being revised version by version and consequently it is easy
to infer that its format would be continuously revised in the future.

So, it is a MidiaWiki extension exporting its Wiki page into ODF format.
I don't know if it is already available or not. :-

Regards,
Tora

-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org



Re: [dev] Detailed build deps

2009-02-16 Thread tora - Takamichi Akiyama

Hi,

Nguyen Vu Hung wrote:

Tora says he has VMware images for those builds. You can ask him for a copy.


The following Wiki page might help you understand why I have chosen
Fedora Core 4 to build OpenOffice.org 2.x.

 Build Environment Running on Fedora Core 4
 
http://wiki.services.openoffice.org/wiki/Build_Environment_Running_on_Fedora_Core_4

Regards,
Tora

-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org



Re: [dev] cvs co -r DEV300_m2 swext

2009-02-13 Thread tora - Takamichi Akiyama

Hi,

Just one thing I have found in your build script is use of ccache.

Nguyen Vu Hung wrote:

export CCACHE_DIR=/tmp/DEV300_m40.ccache
ccache -M 6G -F 10
export CC=ccache gcc
export CXX=ccache g++
#export CC=gcc
#export CXX=g++



http://wiki.services.openoffice.org/wiki/Building_OpenOffice.org
says in the section ccache that


If possible, it is strongly recommended to install (and configure) ccache -
this will greatly reduce build time on subsequent builds.


Look at the word subsequent !

What we could learn here are:

 - ccache will greatly reduce build time on the *subsequent* builds.

 - ccache could take much time more than without ccache at the first build
   since ccache needs to duplicate compilation result files into cache directory
   and the act of writing files into disk sometimes blocks an act of reading
   files which are required to do the compilation of the next file.

In Nguyen's case, you modified options of ./configure several times, ccache
helped a lot, I think. In my case, however, I simply run through a build
process without any fatal error. If I build with ccache, it might take much
time than without ccache.

The most important factor to reduce build time is the amount of memory,
I guess. How to reduce disk access might be the key point. A plenty memory
could act as a disk cache and consequently the amount of disk access could
decrease.

For example, in my case, sequentially building DEV300_m41 for two languages -
English and Japanese, not to mention, including moz, binfilter, ... - takes
just only 4 hour 40 minutes on a system of Core 2 Duo 3.16GHz, 4GB memory,
Solaris Express.

'time' bash-built-in command reported

real282m31.425s
user204m5.448s
sys 43m27.166s

There were a deficit of 35 minutes (282 - (204 + 43)) to wait for something.

The 'solver' directory occupies 750MB. Files in it are most frequently and
repeatedly accessed during build process. Therefore, natively disk-caching
most of them by UNIX kernel might be one of the important factors, i guess.

The size of the entire DEV300_m41 directory reaches 11GB when the build
process is finished. If I have a chance to use a system with 8GB memory, I
would try to measure build time again.


http://ccache.samba.org/ccache-man.html

HISTORY
ccache was inspired by the compilercache shell script script written by
Erik Thiele and I would like to thank him for an excellent piece of work.
See http://www.erikyyy.de/compilercache/ for the Erik's scripts.


The author of compilercache, who have invented the original idea, well
describes what is compiler cache. That is a great idea for specific cases.

http://www.erikyyy.de/compilercache/
1.  What is compilercache and Why do I want it ?

So when you try ccache for building OpenOffice.org, understand what is
compiler cache. Have fun!

Tora

-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org



Re: [dev] cvs co -r DEV300_m2 swext

2009-02-13 Thread tora - Takamichi Akiyama

Oops, I did not mean ccahce is not helpful.

It would greatly help build process if we use the same cache directory
of ccache to build a series of milestones: DEV300_m39, m40, m41, ...

What I would like to point was For a user who just builds a specific
milestone just one time, use of ccache could be reconsidered.

tora - Takamichi Akiyama wrote:
  - ccache will greatly reduce build time on the *subsequent* builds.
  - ccache could take much time more than without ccache at the first build

Tora


-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org



Re: [dev] cvs co -r DEV300_m2 swext

2009-02-12 Thread tora - Takamichi Akiyama

Nguyen Vu Hung wrote:

I've rm -rf my $HOME/lib/{libcairo*,libpango*},
$HOME/include/{cairo*,pango*}
and the build is running again.

I have a lot of libraries installed to my $HOME so I think in the next
try,
I will create a new user and build OOO m40 with that user.

The libraries 'cairo' and 'pango' seems to be part of Gnome system. It
implies
that you would not need to manually install them if you install Gnome
desktop
in your machine.

Mozilla depends on it. I've tried to disable Mozilla.


Visual Class Library (vcl)'s gtk plugin also depends on cairo and pango.
You would face another error upon building vcl module sooner or later,
however you disable Mozilla at the very beginning of build process.

If you are not quite familiar with such libraries, cairo, pango, ...
what I can help you is to stop install libraries under your $HOME directory
and look for pre-compiled RPM packages delivered by the distribution vendor
and install them in order to put them in the default directory such as /usr/lib.

 # yum search cairo
 # yum install cairo-devel

I cannot look into individual errors that you currently see because your
build environment is somewhat strange. Most errors that you get come from
the settings of your build environment, not OpenOffice.org's source code.

Additionally, try set up your build environment again following the information
given by the release engineering team.
http://wiki.services.openoffice.org/wiki/Compiler_versions_used_by_port_maintainers_and_release_engineers

For example, use Java 1.5 to build OpenOffice.org 3.x, instead of the latest
version Java 1.6.

 JDK 5.0 Update 6
 http://java.sun.com/products/archive/j2se/5.0_06/index.html

Regards,
Tora

-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org



Re: [dev] cvs co -r DEV300_m2 swext

2009-02-12 Thread tora - Takamichi Akiyama

tora - Takamichi Akiyama wrote:
Additionally, try set up your build environment again following the 
information

given by the release engineering team.
http://wiki.services.openoffice.org/wiki/Compiler_versions_used_by_port_maintainers_and_release_engineers 


The easiest way might be to prepare another machine beside your
internet server machine, using Fedora or such a Gnome desktop
purpose machine on which OpenOffice.org 3.0 runs without any
additional software manually installed.

If you want to publish your build directory in the back-end machine,
consider reverse proxy of Apache web server.

 Internet --- server machine - desktop machine.
  (Apache, reverse proxy)   (Apache)

 http://httpd.apache.org/docs/2.0/mod/mod_proxy.html

Regards,
Tora

-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org



Re: [dev] cvs co -r DEV300_m2 swext

2009-02-12 Thread tora - Takamichi Akiyama

Nguyen Vu Hung wrote:
 I've built m40 successfully and I attach the build script at the end
 of this email.

That is good news.


 # yum search cairo
 # yum install cairo-devel

On CentOS 5.2:
$ rpm -qa | grep cairo
pycairo-devel-1.2.0-1.1
cairo-1.2.4-5.el5
cairo-devel-1.2.4-5.el5
pycairo-1.2.0-1.1

As you can see, they are too old, and some libraries (gtk specific in
this case),


That is because you have chosen CentOS 5.2.


Because I don't have another machine so the next time, I will create another
account in my Linux box, and only use it for building OOo. In this
way, I will not
mess up with libraries, headers, bin, etc... in my $HOME.


One idea that I have been using to build and debug OpenOffice.org for
years is VMware Workstation. You could choose VirtualBox, or similar
software as an alternative to such a priced software product.

It is said that they have some drawbacks in performance, ...
However, its benefits might be greater than the drawbacks.

I have the following virtual machines:
 - OpenOffice.org 2.x build environment using Fedora Core 4,
 - a test machine using Fedora Core 6
 - 3.x build environment (being prepared; I mainly use Solaris x86)
 - CentOS 5.2 machine to mimic customer's environment
 - others
on a single Fedora 8 host machine backed a Solaris ZFS file server.

The Fedora 8 host machine had been Fedora 6 with VMware 5.x some years
ago and was upgraded to Fedora 8 with VMware 6.0 last year, now VMware 6.5.
You know I did not loose any virtual machines even I reinstalled the host
machine.

Tora


-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org



Re: [dev] cvs co -r DEV300_m2 swext

2009-02-11 Thread tora - Takamichi Akiyama

Hi,

Nguyen Vu Hung wrote:
 I've rm -rf my $HOME/lib/{libcairo*,libpango*}, $HOME/include/{cairo*,pango*}
 and the build is running again.

 I have a lot of libraries installed to my $HOME so I think in the next try,
 I will create a new user and build OOO m40 with that user.

The libraries 'cairo' and 'pango' seems to be part of Gnome system. It implies
that you would not need to manually install them if you install Gnome desktop
in your machine.


I am not sure, but what I feel about differences between CentOS and Fedora is:

 CentOS -- Primarily for server use.
 Fedora -- Primarily for desktop use.

For security reasons, in general, server machines that are exposed in the
public should not have unnecessary tools such as a complier and other tools
which would help an intruder work in the target server machine.

You currently use CentOS to build OpenOffice.org, that could be one of the
reasons why you need to manually install lots of tools and libraries.
Don't you think so?

Regards,
Tora


-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org



Re: [dev] cvs co -r DEV300_m2 swext

2009-02-10 Thread tora - Takamichi Akiyama

Could you try dmake -v to find out what command dmake had invoked and
got the error code 155?


Nguyen Vu Hung wrote:

~/bin/dmake - version 4.11


I am afraid, but your dmake seems not to be the one that we intend.

 See http://tools.openoffice.org/dmake/dmake_4.11.html
 -v option is Verbose option, not print Version option.

Now I understand why your log file did not include any stderr messages
produced by build.pl --checkmodules .

So, be careful to set PATH environment variable.
Our expecting dmake should be $SRC_ROOT/solenv/$OUTPATH/bin/dmake

Before you run ./configure , carefully preset PATH environment variable.
Normally, it should include system paths and not include any directory in
the build environment or such a directory ~/bin.

It implies that vh-config.5.sh should not be run twice in the same terminal
emulator. In the first time, it is okey, but in the second time the PATH
environment variable has already included some directories in the build
environment.

Check PATH environment variable in the file
http://aoclife.ddo.jp/~vuhung/foss/src/ooo.src/DEV300_m41/LinuxX86Env.Set.sh

Be sure you should not include . in the PATH environment variable.
At least, put it at the end of path list. Do not put it in the top of path list.

Inclusion of . (meaning the current directory) is highly dangerous.
If someone put a file su in your current directory and your execution of
su (switch (to root) user) without absolute path like /bin/su, the bad man
would successfully steel a password of the root user, which you would type.



Another point: How to properly install ant?

# Is this correct?
# cd /usr/local; tar xvjf apache-ant-1.7.1-bin.tar.bz2;
# ln -s apache-ant-1.7.1 ant; export ANT_HOME=/usr/local/ant?


Sorry, I don't know well about it.


I also notice that ./configure complain about the missing of
jakarta-ant but I thought
jakarta-ant is too old and I only need apache-ant-1.7.1.tar.bz2...


See config.log in the same directory of ./configure and look for the word ant

http://aoclife.ddo.jp/~vuhung/foss/src/ooo.src/DEV300_m41/config.log

configure:27649: checking for ant

...

configure:27767: /usr/local/ant/bin/ant -buildfile conftest.xml 12

...

[javac] Compiling 1 source file

BUILD FAILED
/var/www/home/ooo.src/DEV300_m41/conftest.xml:3: Error starting modern compiler


That should be

BUILD SUCCESSFUL


Please refer to installation instructions of ant.

http://aoclife.ddo.jp/~vuhung/foss/src/ooo.src/DEV300_m41/vh-config.5.sh

There is one suggestion:
Put the following two lines in the top of the shell script

#! /bin/bash
set -e

set -e tells bash to quit when any error occur, i.e. a command returns an 
error code but 0.


I have never thought of publishing $SRC_ROOT directory to the public, but I
admire that your web site is highly helpful to look into problems.

Regards,
Tora

-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org



Re: [dev] cvs co -r DEV300_m2 swext

2009-02-10 Thread tora - Takamichi Akiyama

Nguyen Vu Hung wrote:

Checking module list
dmake:  Error code 155, while making 'check_modules


Sorry, my suspicion - something missing around Perl - seems to be wrong.


[vuh...@aoclife prj]$  perl $SRC_ROOT/solenv/bin/build.pl --checkmodules
build -- version: -

Fetching dependencies for module afms from solver... failed

...

Fetching dependencies for module beanshell from solver... failed


WARNING! Project(s):
accessibility

...

berkeleydb

not found and couldn't be built. Dependencies on that module(s)
ignored. Maybe you should correct build lists.


That is that.
The directories pointed by the build.pl are missing.

Module dependency is defined in the the first line of */prj/build.lst

http://aoclife.ddo.jp/~vuhung/foss/src/ooo.src/DEV300_m41/instsetoo_native/prj/build.lst
oon instsetoo_native::  postprocess packimages NULL

Look for postprocess and packimages
http://aoclife.ddo.jp/~vuhung/foss/src/ooo.src/DEV300_m41/postprocess/prj/build.lst
po  postprocess ::  accessibility automation basctl bean fondu 
BINFILTER:binfilter chart2 configmgr CRASHREP:crashrep dbaccess desktop dtrans 
embeddedobj embedserv EPM:epm eventattacher extensions extras fileaccess filter 
forms fpicker helpcontent2 hwpfilter io JAVAINSTALLER2:javainstaller2 
lingucomponent MATHMLDTD:MathMLDTD MSFONTEXTRACT:msfontextract ODK:odk 
officecfg package padmin psprint_config remotebridges sc scaddins sccomp scp2 
scripting sd setup_native slideshow starmath sw sysui testshl2 testtools ucb 
UnoControls unoxml ure wizards xmerge xmlsecurity 
BITSTREAM_VERA_FONTS:bitstream_vera_fonts DICTIONARIES:dictionaries OOo:pyuno 
OOo:readlicense_oo SO:top unodevtools JFREEREPORT:jfreereport 
REPORTDESIGN:reportdesign SDEXT:sdext SWEXT:swext writerfilter 
WRITER2LATEX:writer2latex oox NULL

Look for accessibility, automation, ...
http://aoclife.ddo.jp/~vuhung/foss/src/ooo.src/DEV300_m41/accessibility/prj/build.lst
Not Found

So you got
 WARNING! Project(s):
 accessibility
...
 not found and couldn't be built.

Please consider use of a DEV300_mXX source tar ball instead of svn co.

Regards,
Tora

-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org



Re: [dev] cvs co -r DEV300_m2 swext

2009-02-10 Thread tora - Takamichi Akiyama

I also notice that ./configure complain about the missing of
jakarta-ant but I thought
jakarta-ant is too old and I only need apache-ant-1.7.1.tar.bz2...


See config.log in the same directory of ./configure and look for the word ant



BUILD FAILED
/var/www/home/ooo.src/DEV300_m41/conftest.xml:3: Error starting modern compiler


The error seems well-known one. Google lists many articles regarding it:
http://www.google.co.jp/search?num=50q=ant+Error+starting+modern+compiler

Regards,
Tora

-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org



Re: [dev] cvs co -r DEV300_m2 swext

2009-02-09 Thread tora - Takamichi Akiyama

Nguyen Vu Hung wrote:

1. svn checkout http://svn.services.openoffice.org/ooo/tags/DEV300_m40



3. Now I run dmake and I get an error:
make[1]: Leaving directory `/var/www/home/ooo.src/DEV300_m40/dmake'
make: Leaving directory `/var/www/home/ooo.src/DEV300_m40/dmake'
Checking module list
dmake:  Error code 155, while making 'check_modules'
Finished dmake


Could you try dmake -v to find out what command dmake had invoked and
got the error code 155?

The error code 155 could be a value returned by the command that dmake
had invoked or a value that dmake got through wait() system call or an
equivalent.

See http://svn.services.openoffice.org/ooo/tags/DEV300_m40/dmake/sysintf.c
and look for a text Error code and then
http://svn.services.openoffice.org/ooo/tags/DEV300_m40/dmake/unix/runargv.c

I suspect that with your build environment,
 cd $SRC_ROOT/instsetoo_native/prj
 perl $SRC_ROOT/solenv/bin/build.pl --checkmodules
 echo $?
would result in failure with the error code 155, which is probably caused
by something missing around Perl.

In the next time, please show us what operating system and its version
on which you have been working?

e.g. Fedora has /etc/redhat-release; Solaris has /etc/release;
And most UNIX variants have a dmesg command that prints
Linux version 2.6.xx.x-. like that.

If the code came from wait() system call, its meaning depends on your
operating system. Consult man -s 2 wait or things like that and find
corresponding header files such as /usr/include/sys/wait.h and files
that wait.h includes and look for relevant macros and/or definitions
that help a user determine what happened with the command that dmake
had invoked and got an error.

perl -e 'printf %08b\n, 155' converts 115 into 10011011 in binary.
The 8th bit from right has been set to 1, which maybe, ... but it
depends on your system.

By the way, why don't you use DEV300_m41 source tar balls released by the
release engineering team, available at the OpenOffice.org mirror network?

Regards,
Tora

-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org



Re: [dev] Is the Solver still being used?

2009-01-26 Thread tora - Takamichi Akiyama

Hi Jörg,

Jörg Jahnke wrote:
 it looks like no one really uses the Solver tarballs. Therefore I
 suggest we simply drop the creation of them.

For the purpose of providing patch files to customers who have installed
an official build delivered by the RE and could not wait for a bug fixing
upcoming official build, solver tar ball would be quite useful and reliable.

Here is a documentation, not have been maintained though, describing how
to utilize a solver tar ball.
http://wiki.services.openoffice.org/wiki/Development_Environment_with_solver

Meanwhile, I can agree with the idea dropping a creation of solver tar
balls to avoid unnecessary costs. In such a case, it would be helpful if
a little bit more detailed information on the build tools and environment
became available.

For instance, the Wiki page could be updated for 3.x.
http://wiki.services.openoffice.org/wiki/Compiler_versions_used_by_port_maintainers_and_release_engineers

What I have been doing for customers is:
 - A customer installs an official build built by the RE.
 - The customer suffers from existing bugs and/or needs extra features.
 - I am trying to fix bugs and/or implementing some additional features
   and then providing the customer with a small set of .dll/.so files
   and concurrently submitting patch files to the development team.

Primary customers whom I have a contract with currently use 2.4.x, not 3.0
because of the instability and regressions around East Asian language specific
functionality in 3.0. However, the demand of handling with OOXML file format
is rising. So, they would need to proceed to 3.x.

The Wiki page mentions about 3.0 saying plan to migrate ... It could be
said that information on 3.x was not adequate. Additional information on
3.x would be greatly helpful.

In sum, if we were able to locally set up a build environment that was
compatible to the one used by the RE, solver tar balls would not be mandatory,
I think.

Regards,
Tora


-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org



Re: [dev] DEV300_m29: compiling ERROR: File not found: ScriptFramework.jar

2008-08-21 Thread tora - Takamichi Akiyama

Hi,

What i can propose here is not to disable any options of ./configure
since there would be possibilities of unexpected behaviors.

 ./configure --disable-something
   will set or unset some environment variables defined in LinuxX86Env.Set.sh

 'dmake' or 'build' will work depending on the values of the environment
 variables.

 'solenv/bin/make_installer.pl' would work depending on the value of
 the same environment variables as expected or would ignore the values.


I mean that there is possibility that the following situation might happen:

 One or more options you specified by --disable-something suppressed
 creation of ScriptFramework.jar, but make_installer.pl does not take
 care of the options and expected the existence of ScriptFramework.jar
 but it was not created. Consequently, build process resulted in failure.


Hung Nguyen Vu wrote:
 What should I do now?

If you want to make all options work as expected, you can investigate
your results more deeply and propose some patches for the Tools project.

If you want to just build OOo, try not to disable any options of
./configure, including Java and install somewhat old versions of tools
and use them. Those would be the simplest way to successfully go through
the build process, I think.

For example, some modules will be built with a tool Ant. Ant requires Java.
Hence, a process of building OOo definitely requires Java.


 --with-jdk-home=/usr/local/jdk1.6.0_07 and  --without-java seems to be
abnormal but I hope it is fine(?).


That seems not to make sense. But I am not sure about that since I have
no experience in disabling Java.

Some old versions of Ant does not work with the latest version of Java, 1.6.
For instance, /usr/bin/ant Apache Ant version 1.6.2 embedded in Fedora
Core 4 does not work with /usr/java/jdk1.6.0_03 from java.com.
It unfortunately stops with the following error message:

 Exception in thread main java.lang.NoClassDefFoundError: 
org/apache/tools/ant/launch/Launcher

It, however, works fine with both /usr/java/j2sdk1.4.1_03 from java.com
and /usr/bin/java embedded in Fedora Core 4.

$ /usr/bin/java -version
java version 1.4.2
gij (GNU libgcj) version 4.0.0 20050519 (Red Hat 4.0.0-8)

Therefore, using the latest tools might brings you some difficulties.



One more question:

My configure output contains a warning:

checking for xrandr = 1.2... checking X11/extensions/Xrandr.h usability...
no
checking X11/extensions/Xrandr.h presence... yes
configure: WARNING: X11/extensions/Xrandr.h: present but cannot be compiled
configure: WARNING: X11/extensions/Xrandr.h: check for missing
prerequisite headers?
configure: WARNING: X11/extensions/Xrandr.h: see the Autoconf documentation
configure: WARNING: X11/extensions/Xrandr.h: section Present But Cannot
Be Compiled
configure: WARNING: X11/extensions/Xrandr.h: proceeding with the
preprocessor's result
configure: WARNING: X11/extensions/Xrandr.h: in the future, the compiler
will take precedence

Is that safe to ignore?


I am sorry, i have no information on that.

caio,
Tora


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



Re: [dev] DEV300_m29: compiling ERROR: File not found: ScriptFramework.jar

2008-08-21 Thread tora - Takamichi Akiyama

Hi,


So, in your case, building a module 'scripting' failed and/or

'deliver' command has not been executed in the module yet,
or the module has not been built at all.


What should I do now?

cd to the $SRC_ROOT/scripting directory and try to run build there


It didn't work. I got the same error ( could not find jar file ).


1. Do the ./configure in the directory config_office with appropriate
   options on the new terminal emulator.
2. source LinuxX86Env.Set.sh

3. cd $SRC_ROOT/scripting
4. mv unxlngi6.pro unxlngi6.pro-failed
  or
   build depend=1
5. cd $SRC_ROOT and then build OOo entirely.
  (date; time dmake; date) 21 | tee dmake_`date +%Y%m%d_%H%M`.log

or

3. cd $SRC_ROOT/scripting
4. mv unxlngi6.pro unxlngi6.pro-failed
5. (date; time build.pl product=full; date) 21 | tee build_`date 
+%Y%m%d_%H%M`.log
6. (date; time deliver.pl; date) 21 | tee deliver_`date +%Y%m%d_%H%M`.log
7. cd $SRC_ROOT/instsetoo_native
8. (date; time build.pl --from scripting product=full; date) 21 | tee 
build_`date +%Y%m%d_%H%M`.log

caio,
Tora

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



Re: [dev] Compile error: external/common/apache-ant[...] not found @ OpenSolaris snv 95

2008-08-20 Thread tora - Takamichi Akiyama

Hi Ulf,

I am afraid, but I still cannot understand why you need to avoid
using gcc on Solaris.

Why do you use Java 1.6? The latest software sometimes does not
work with current source codes that were firstly prepared with
several software/tools developed several years ago. For Java, I
would like to propose use of Java 1.4 or 1.5, instead, in this
moment.

In general, please, please, do not doubt the efforts done by
professional engineers from Solaris, Java, gcc, Ant, Apache,
Mozilla, and so on.

 How did I get there? I think I copied
 /usr/jdk/instances/jdk1.6.0/jre/lib/i386/headless/libmawt.so to
 /usr/jdk/instances/jdk1.6.0/jre/lib/i386/ , though, not sure any more.

I think that kind of modification without any deep thoughts might
be wrong. I just use appropriate versions of software and tools
and have never faced the problem that you ran into and described
in this mailing list.

I would like to recommend to respect the information at [1] and
thoroughly read information written by professionals, hackers,
and experienced engineers, available at tools.openoffice.org,
wiki of OpenOffice.org, and other sources before stating the battle.

[1] 
http://wiki.services.openoffice.org/wiki/Compiler_versions_used_by_port_maintainers_and_release_engineers

Best,
Tora

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



Re: [dev] Compile error: external/common/apache-ant[...] not found @ OpenSolaris snv 95

2008-08-20 Thread tora - Takamichi Akiyama

Hi Ulf,

Ulf Wendel wrote:

The last time I tried OOo with GCC on OpenSolaris the configure failed [1]:

 [1] http://www.nabble.com/[EMAIL PROTECTED]

 checking the GNU gcc compiler version... checked (gcc 3.4.3)
 checking gcc linker... configure: error: failed (not GNU ld). Use GNU ld
 instead of Sun ld on Solaris

Hmm, why don't you tweak a PATH environment variable for the ./configure?

Setting PATH with /opt/SUNWspro/bin followed by /usr/sfw/bin like this
export 
PATH=/opt/SUNWspro/bin:/usr/sfw/bin:/usr/bin:/usr/ccs/bin:/usr/openwin/bin:/usr/local/bin
would bring you a better result.

checking for gcc... /opt/SUNWspro/bin/cc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... no
checking whether /opt/SUNWspro/bin/cc accepts -g... yes
checking for /opt/SUNWspro/bin/cc option to accept ISO C89... none needed


Because OpenSolaris comes with 1.6. In a certain way OOo and OpenSolaris 
are Sun products. Why not check if they work nicely together using 
out-of-the-box installations and OpenSolaris packages...


Is the could not find jni.h problem a problem that's likely related to 
1.5 vs. 1.6? I can't imagine that.


You might have heard that changing version of Java is problematic.
Some Java applications might become not to work after updating Java.
I do not refer to jni.h, but that is a general story.


My starting point was basically on ./configure 
CPPFLAGS=-I/path/to/jdk/some/path [...] --without-java resulting into 
CC -INO_JAVA_HOME/some/path. Is that because I used --without-java? If I 
could tell OOo where to search for jni.h my issue might be gone.


Maybe no. You would also need to specify by means of something where
jni.h relevant .so files are. Otherwise, you would face another problem
at linking stage or running stage even though compilation would have
become succeeded. .h and .so files are a set of files.

The simplest way to instantly specify both at once is to use --with-jdk-home=,
i think. For instance, --with-jdk-home=/usr/j2se brings the following settings:

$ grep j2se SolarisX86Env.Set.sh
JAVA_HOME=/usr/j2se
JAVAINTERPRETER=/usr/j2se/bin/java
JAVACOMPILER=/usr/j2se/bin/javac
JAVADOC=/usr/j2se/bin/javadoc

$ grep JAVA_HOME solenv/inc/*.mk
solenv/inc/ant.mk:JAVA_HOME=$(JDK14PATH)
solenv/inc/ant.mk:CLASSPATH!:=$(CLASSPATH)$(PATH_SEPERATOR)$(ANT_CLASSPATH)$(PATH_SEPERATOR)$(JAVA_HOME)$/lib$/tools.jar
solenv/inc/antsettings.mk:JAVA_HOME=
solenv/inc/antsettings.mk:.EXPORT : JAVA_HOME
solenv/inc/libs.mk:AWTLIB*=$(JAVA_HOME)$/lib$/jawt.lib
solenv/inc/target.mk:.IF $(JAVALOCATION)!=$(JAVA_HOME)
solenv/inc/target.mk:.ELSE  # $(JAVALOCATION)!=$(JAVA_HOME)
solenv/inc/target.mk:.ENDIF  # $(JAVALOCATION)!=$(JAVA_HOME)
solenv/inc/target.mk:   @echo JAVALOCATION:=$(JAVA_HOME)  $@
solenv/inc/tg_javav.mk:.IF $(JAVAVER)== || $(JAVALOCATION)!=$(JAVA_HOME)
solenv/inc/tg_javav.mk:JAVAVER:=$(shell @-$(JAVA_HOME)$/bin$/java 
$(JFLAGSVERSION_CMD))
solenv/inc/tg_javav.mk:JAVANUMVER:=$(shell @-$(JAVA_HOME)$/bin$/java 
$(JFLAGSNUMVERSION_CMD))
solenv/inc/tg_javav.mk:.ENDIF   # $(JAVAVER)== || 
$(JAVALOCATION)!=$(JAVA_HOME)


What's wrong with trying to build OOo on a platform that is not on the 
list of platforms used by maintainers and release engineers? Sure, its 
new grounds and likely to be bloody. But why should I not try to use 
OpenSolaris as a development platform.


Now I understand what you want to do. Thank you for the comments.
I admire your challenges.

My interest is different from yours. It is to find a cause of bug, to
try to fix a bug, to confirm a fix done by developers or myself, to make
a mock-up for proposing enhancement, to provide my customers with a binary
patch .so files, and so on.

What i normally do is building a specific module, not building entire OOo.

For example,
 1. Obtain source files of DEV300_mXX
 2. Prepare build environment
 3. cd sw; build.pl --all
 4. cd sw; make some modifications in the existing source files
 5. cd sw; build.pl debug=1
 6. Install DEV300_mXX released by the release engineer of OOo.
 7. Replace libswsi.so in the installation directory with the built one.
 8. Start OOo.
 9. Attach a debugger to the process of soffice.bin

So, I carefully try to avoid any compilation errors which are not related
to the module in which I am interested. Additionally I try to tweak my
build environment to meet the one used by the RE as much as i can.

Best,
Tora


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



Re: [dev] Compile error: external/common/apache-ant[...] not found @ OpenSolaris snv 95

2008-08-19 Thread tora - Takamichi Akiyama

Hi,

Ulf Wendel wrote:
 cd ./unxsoli4.pro/misc/build/hsqldb/  
/export/home/nixnutz/oo.org-m28/external/common/apache-ant-1.7.0/bin/ant 
-Dbuild.label=build-300m28(Build:9337) -f build/build.xml jar   touch 
/export/home/nixnutz/oo.org-m28/hsqldb/./unxsoli4.pro/misc/build/so_built_so_hsqldb

 /usr/bin/bash:
 /export/home/nixnutz/oo.org-m28/external/common/apache-ant-1.7.0/bin/ant:
 No such file or directory
 dmake:  Error code 127, while making

In my case, no error can be seen around the line:
cd ./unxsoli4.pro/misc/build/hsqldb/  /usr/local/apache-ant-1.7.0/bin/ant 
-Dbuild.label=build-300m29(Build:9339) -f build/build.xml jar   touch 
/ooo/mws/DEV300/trunk/hsqldb/./unxsoli4.pro/misc/build/so_built_so_hsqldb

Ant has been downloaded from http://ant.apache.org/bindownload.cgi
and then expanded under /usr/local/

cat /etc/release
Solaris Express Developer Edition 1/08 snv_79b X86
   Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
Use is subject to license terms.
Assembled 24 January 2008

Additional information that might help:
mv /usr/bin/patch /usr/bin/patch-renamed
ln -s gpatch /usr/bin/patch
ln -s gmake /usr/sfw/bin/make
export 
PATH=/usr/sbin:/usr/bin:/opt/SUNWspro/bin:/usr/sfw/bin:/opt/sfw/bin:/usr/ccs/bin
export CC=/usr/sfw/bin/gcc
perl -MCPAN -e '$CPAN::Defaultsite=http://ftp.nara.wide.ad.jp/pub/CPAN;; shell'
perl -MCPAN -e shell
install Archive::Zip
mkdir /usr/local
cd /usr/local
wget -N 
http://www.meisei-u.ac.jp/mirror/apache/dist/ant/binaries/apache-ant-1.7.0-bin.tar.bz2
/usr/sfw/bin/gtar -jxf apache-ant-1.7.0-bin.tar.bz2

j2se: http://java.sun.com/products/archive/j2se/1.4.1_03/index.html

Configure:
export LANG=C
export 
PATH=/opt/SUNWspro/bin:/usr/sfw/bin:/usr/bin:/usr/ccs/bin:/usr/openwin/bin:/usr/local/bin
export CC=/opt/SUNWspro/bin/cc
export CXX=/opt/SUNWspro/bin/CC
export CPPFLAGS=-I/opt/sfw/include -I/usr/sfw/include -I/opt/sfw/cups/include 
-I/usr/openwin/include -I/usr/X11R6/include
export CFLAGS=$CPPFLAGS
export CXXFLAGS=$CFLAGS
./configure \
--without-system-stdlibs \
--with-jdk-home=/usr/j2se \
--with-gnu-cp=/opt/sfw/bin/cp \
--with-ant-home=/usr/local/apache-ant-1.7.0 \
--with-lang=ja \
--with-use-shell=bash

http://wiki.services.openoffice.org/wiki/Compiler_versions_used_by_port_maintainers_and_release_engineers

Best,
Tora


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



Re: [dev] Compile error: external/common/apache-ant[...] not found @ OpenSolaris snv 95

2008-08-19 Thread tora - Takamichi Akiyama

P.S.

If you run ./configure in the directory config_office again,

1. Open a new Terminal Emulator or remotely log into the machine.
2. cd /xxx/config_office
3. ./configure ...

Since, if you have already executed . SolarisX86Env.Set.sh in one
terminal emulator, lots of environment variables are already set to
a certain value, especially PATH is tuned for building OOo, not for
a task of ./configure. Some environment variables might affect a
process of ./configure. To avoid such an unexpected behavior, use
of a new, clean Terminal Emulator or like that would be recommended.

Best,
Tora

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



Re: [dev] Compile error: external/common/apache-ant[...] not found @ OpenSolaris snv 95

2008-08-19 Thread tora - Takamichi Akiyama

Ulf Wendel wrote:
Regarding ant: I've added it manually to my source tree. It seems not to 
be part of my CVS repro.


Try to use --with-ant-home= for ./configure, instead,
since Ant is a tool to build some modules of OOo, not a source code of OOo.
IMHO, It should not be in your source tree.

Best,
Tora

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



Re: [dev] Compile error: external/common/apache-ant[...] not found @ OpenSolaris snv 95

2008-08-19 Thread tora - Takamichi Akiyama

Ulf Wendel wrote:
I do have SUNWant installed (/usr/sft/lib/ant, /usr/sfw/bin/ant, ...). 
However, I did not set --with-[ant-something] when configuring OOo. I 
ended up downloading ant and putting it in external/common/ . That 
worked more or less flawless. The ant script external/common/.../bin/ant 
first bailed a bit at me stating that it could not find javac in 
NO_JAVA_HOME/bin/javac (or something similar, I don't recall). But that 
got solved by export JAVACMD=/usr/bin/java .


Hmm, Almost!

apache-ant-1.7.0/ has bin, lib, etc, ... in its directory; while

/usr/sbin/pkgchk -v SUNWant 21 | less
/usr/sfw/bin/ant
...
/usr/sfw/lib/ant/ant-antlr.jar
...

Their directory structures slightly differ.
That means that downloading Ant could be safer than using the one
embedded in the Solaris for building modules of OOo.


export PATH=/usr/sbin:/usr/bin:/opt/SUNWspro/bin:/usr/sfw/bin:/opt/sfw/bin:/usr/ccs/bin 


Ok, similar, not exactly the same one I use... (see below)


export CC=/usr/sfw/bin/gcc


Please tell me about this one! I am still trying to compile it with the 
Sun compilers. I don't trust the GCC that comes with OpenSolaris. Its 
build against Sun ld and Sun ar. That caused some pain.


It's just for compilation of Perl modules.

The gcc bundled in OpenSolaris seems to use

/usr/sbin/pkgchk -v SUNWgcc 21 | grep /usr/sfw/bin/
/usr/sfw/bin/gcc

/usr/sbin/pkgchk -l -p /usr/sfw/bin/gld
...
SUNWbinutils
...

/usr/sbin/pkgchk -v SUNWbinutils 21 | grep /usr/sfw/bin/
/usr/sfw/bin/gar   ... for GNU ar
...
/usr/sfw/bin/gld   ... for GNU ld
...

man -M /usr/sfw/man gld
NAME
 ld - Using LD, the GNU linker

Look at the PATH above again, /usr/sfw/bin is prior to /usr/ccs/bin
/usr/ccs/bin/ld
/usr/ccs/bin/ar

How about use of an appropriate compiler since Perl modules are probably
expected to be compiled with well-known, widely-used compilers, gcc?

However, that does not matter. it just for a tool, not a binary of OOo.


My current issue is on jni.h. I'm trying to pass additional CPPFLAGS but 
maybe its just about this --without-java vs. --with-jdk-home.


Why don't you simply use Java? Any problem with Java?
Nowadays, some parts of OOo rely on Java. Omitting Java would break
some functionalities of OOo. Don't you think so?

Best,
Tora




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



Re: [dev] sandbox java errors during compile @ SuSE 11.0 @ javac = gcc 4.3.1 @ i386

2008-08-19 Thread tora - Takamichi Akiyama

Ulf Wendel wrote:

I need to set up a new VMware box to answer this question.


If you do not need to stick on any certain Linux distributions,
there is a recommendation among them. It is Fedora Core 4.

For details, see [1]. The wiki page, however, is written for
OOo 2.x, not 3.x, but it could be applied to both.

[1] 
http://wiki.services.openoffice.org/wiki/Build_Environment_Running_on_Fedora_Core_4

Best,
Tora


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



Re: [dev] Could not open include file jni.h. @ OOo 3.0 M28 @ OpenSolaris svn 95

2008-08-19 Thread tora - Takamichi Akiyama

Christian Lohmaier wrote:

No, use JDK 1.5, the baseline will be raised shortly. 1.4 will no longer work.


Thank you for the invaluable information!
I will follow that.

Tora

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



Re: [dev] Compile error: external/common/apache-ant[...] not found @ OpenSolaris snv 95

2008-08-19 Thread tora - Takamichi Akiyama

Hi,

Ulf Wendel wrote:
 tora - Takamichi Akiyama schrieb:
 Ulf Wendel wrote:
 Regarding ant: I've added it manually to my source tree. It seems not
 to be part of my CVS repro.

 Try to use --with-ant-home= for ./configure, instead,
 since Ant is a tool to build some modules of OOo, not a source code of
 OOo.
 IMHO, It should not be in your source tree.

 I'm not strict about that. Considering the amount of (external)
 libraries bundled with OOo, I don't mind to see ant bundled as well. In
 the end all I'd like to see is a configure warning (if that's possible
 at all - I don't know!) ...

It is absolutely up to you. :-)

What i wanted to mention was:

What do you want to do if you are building several versions such as
/export/home/nixnutz/oo.org-m28/
/export/home/nixnutz/oo.org-m29/
/export/home/nixnutz/oo.org-m30/

Do you want to install Ant every time to every directory or once to
your system?

If i were you, I installed Ant to the system and pointed to it by the
option --with-ant-home=. That is why such an option is offered. Right?

Ciao,
Tora


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



Re: [dev] i73155 Reconsideration of read-only mode

2007-01-28 Thread tora - Takamichi Akiyama
Mathias Bauer wrote:
 Besides that entering data into forms should be done using input fields
 and a submit button. There is no need to save the form (=document) to
 transfer form data. Even if the form is an OOo document it can perform
 this task perfectly in read-only mode.

Now I understand. You mean use of form controls in Writer and/or use of
XForm would help such kind of task. I think so, but most office workers,
not engineer, would never find such a useful-but-complex-for-novice-user
feature.

A submit button normally emits a POST operation. The web system has to
handle with submitted data.

In many cases, web based form does not work very well. Think of the following
scenario. A city office wants to conduct an questionnaire over their local
offices. A staff in a local office opens the web form and starts to fill
fields with answers and then print it and put the handout on the desk of his
boss to get an approval. Unfortunately, his boss is out of office today.
Before he leaves his office, he turns off his computer. On the next day,
he have noticed all efforts that he made yesterday are lost.

Although we have been living with the technology, we still work in a traditional
way - open it, fill it, print it, get an approval with a stamp seal, and fax it.

Ciao,
Tora

 If I understood your use case correctly it looks like the misuse of
 documents as form and data container at the same time.
 
 Some other points in the issueare quite interesting though, e.g. the
 comment about not accessible object. It fits nicely to some other more
 general ideas about the read only mode.
 
 Ciao,
 Mathias
 

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



[dev] i73155 Reconsideration of read-only mode

2007-01-26 Thread tora - Takamichi Akiyama
Hi,

Anyone, good solution?
http://www.openoffice.org/issues/show_bug.cgi?id=73155

User scenario:
  1. A citizen visits a web site of public office to obtain an application form.
  2. She clicks on a link decorated with an icon of OpenDocument file format.
  3. The document is successfully opened in her web browser with OpenOffice.org,
 but she cannot enter anything in it.

(snip)

  What she might expect are:
1. She clicks on the link to open an application form.
2. She wants to immediately start filling the document.
3. She wants to save it with its original file name or similar name.

  Realities:
a) She gets interrupted with unwanted warning messages two times.
b) The messages are enough to make her worried about violation of access 
right.
c) The original file name has been lost upon her saving the document.

Kind regards,
Tora

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



[dev] Visiting Hamburg with a list of RFEs

2006-11-24 Thread tora - Takamichi Akiyama
Hello,

I visited Hamburg last week and had several meetings with development
teams. Thanks to many people in Hamburg, especially Joost Andrea who
had organized a series of the meetings; the trip was very successful.
Here is a short report on it.

This visit aimed at sharing information on requests for enhancement
(RFE) from Japanese users. With five teams - Writer, Calc, Imress 
Draw, VCL, and User Experience - we cooperatively discussed the RFEs.
A list of the requests and outcome of the meetings [1] is available
at a web site of a project Seagull Research Team 2006 (srt2006) [2].

In short, there were almost 80 requests on the list at this time.
Some of them were for Asian languages, especially Japanese; the rest
were language independent. Every team gave me good comments and
practical suggestions that were noted in the column Outcome of the list.

In this visit we did not discuss development resource or cost, but to
realize the requests in the near future, we would need to come up with
a solution. For instance, publicly asking the community to create a
small project or team for incorporation of the request.

The project srt2006 is funded by the Information-technology Promotion
Agency, Japan (IPA) [3], an affiliate of the Ministry of Economy,
Trade and Industry (METI). The IPA sought a vendor or organization
conducting a study of RFEs on OpenOffice.org through public bidding,
and Good-day, Inc. [4] won the bid and started the project srt2006.

[1] http://ooo-research.good-day.net/docs/reports/visits/1st/20_accomplishment/
[2] http://ooo-research.good-day.net/?en_top
[3] http://www.ipa.go.jp/index-e.html
[4] http://www.good-day.co.jp/en/

Kind regards,
Tora

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