[dev] Question on accessing hyphenation dictionaries and related metadata

2011-07-16 Thread Dr.Leo


Hello,

I am the author of PyHyphen, a hyphenation package for the Python 
programming language (http://pypi.python.org/pypi/PyHyphen/).

PyHyphen is essentially a wrapper around 'libhyphen', the
C library that oo uses for hyphenation.

PyHyphen contains some handy tools to download hyphenation dictionaries 
and related metadata from the deprecated lingual components site for OO 
2.x. See the metadata file at 
http://ftp.osuosl.org/pub/openoffice/contrib/dictionaries/hyphavail.lst


I would like to upgrade PyHyphen to use the new extensions format 
introduced with OO 3.x.But I haven't found any docs explaining where to 
find the equivalent of
hyphavail.lst. somewhere on the site there should be an xml file listing 
all available hyphenation dictionaries with some metadate on each. This 
meta data is needed to write code to access the new dictionaries.


Any help would be very much appreciated. As I am not subscribed to the 
list, please put fhaxbo...@googlemail.com on cc.


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


[dev] question of openOffice sdk

2011-01-16 Thread always_rick

Hi all, I am new here. Forgive me if the question is really silly.

I am using Java, besides *.jar file, what else do I need? Do I have to
install OpenOffice?



-- 
View this message in context: 
http://openoffice.2283327.n4.nabble.com/question-of-openOffice-sdk-tp3219919p3219919.html
Sent from the openoffice - dev mailing list archive at Nabble.com.

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



Re: [dev] question about new extended tip in Writer

2010-11-27 Thread Regina Henschel

Hi Ariel,

Ariel Constenla-Haile schrieb:

Hello Regina,

On Friday 26 November 2010, 16:37, Regina Henschel wrote:

Hi,

in a DEV300m93 build I see a new extended tip in Writer. If the mouse
hovers over the text it show something like
   Pos: (9:311)
   Abs.Vorl.: Default
   Attr: English(USA)

Can you tell me more about it? A spec for example?

I can figure out, that 311 is the character position within a paragraph.
And 9 seems to count the paragraphs, but it starts with 9 and not with 1.
I guess "Abs.Vorl." is abbreviation of "Absatzvorlage", but why in
German and not in English, although I use an English UI?


these have been there since I recall, if you build with --enable-dbgutil
see
http://hg.services.openoffice.org/DEV300/file/DEV300_m94/sw/source/core/crsr/crstrvl.cxx#l1441


I see! Working mainly in Calc and Draw I haven't noticed it before. 
Thanks for the hint.


kind regards
Regina


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



Re: [dev] question about new extended tip in Writer

2010-11-26 Thread Ariel Constenla-Haile
Hello Regina,

On Friday 26 November 2010, 16:37, Regina Henschel wrote:
> Hi,
> 
> in a DEV300m93 build I see a new extended tip in Writer. If the mouse
> hovers over the text it show something like
>   Pos: (9:311)
>   Abs.Vorl.: Default
>   Attr: English(USA)
> 
> Can you tell me more about it? A spec for example?
> 
> I can figure out, that 311 is the character position within a paragraph.
> And 9 seems to count the paragraphs, but it starts with 9 and not with 1.
> I guess "Abs.Vorl." is abbreviation of "Absatzvorlage", but why in
> German and not in English, although I use an English UI?

these have been there since I recall, if you build with --enable-dbgutil
see
http://hg.services.openoffice.org/DEV300/file/DEV300_m94/sw/source/core/crsr/crstrvl.cxx#l1441


Regards
-- 
Ariel Constenla-Haile
La Plata, Argentina


signature.asc
Description: This is a digitally signed message part.


[dev] question about new extended tip in Writer

2010-11-26 Thread Regina Henschel

Hi,

in a DEV300m93 build I see a new extended tip in Writer. If the mouse 
hovers over the text it show something like

 Pos: (9:311)
 Abs.Vorl.: Default
 Attr: English(USA)

Can you tell me more about it? A spec for example?

I can figure out, that 311 is the character position within a paragraph. 
And 9 seems to count the paragraphs, but it starts with 9 and not with 1.
I guess "Abs.Vorl." is abbreviation of "Absatzvorlage", but why in 
German and not in English, although I use an English UI?


kind regards
Regina

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



Re: [dev] Question again

2010-11-14 Thread Eike Rathke
Hi taotao.liu,

On Thursday, 2010-11-11 16:40:52 +0800, taotao.liu wrote:

> I download the OOo-Dev_OOO330m9_Win_x86_install_en-US.exe  and
> found the memory is consumed very much. When I open a blank
> document, the memory will be eated nearly 100M,

This is probably only the amount needed by code when you start the
application and open the first document. Subsequent documents use less
memory, depending on document content of course.

  Eike

-- 
 PGP/OpenPGP/GnuPG encrypted mail preferred in all private communication.
 Key ID: 0x293C05FD - 997A 4C60 CE41 0149 0DB3  9E96 2F1A D073 293C 05FD


pgpUO90ocofOI.pgp
Description: PGP signature


Re: [dev] Question about OOo saving file

2010-11-08 Thread Mathias Bauer

On 03.11.2010 10:31, Lin CHENG wrote:

When OOo saving an existed file, I found ZipOutputStream in package module
write directly the original file. What if OOo or System crash when saving
the existed file. It's impossible to recover the file after OOo or system
restart.

My question is why not write to a temp file at first, then overwriting the
existed file by copying the temp file.


That is exactly what happens when we save a document. But this happens 
outside of the zip code. This is application logic and shouldn't be 
placed into a low level module.


Regards,
Mathias

--
Mathias Bauer (mba) - Project Lead OpenOffice.org Writer
OpenOffice.org Engineering at Oracle: http://blogs.sun.com/GullFOSS
Please don't reply to "nospamfor...@gmx.de".
I use it for the OOo lists and only rarely read other mails sent to it.

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



Re: [dev] Question about OOo saving file

2010-11-03 Thread Andrew Douglas Pitonyak

On 11/03/2010 05:31 AM, Lin CHENG wrote:

When OOo saving an existed file, I found ZipOutputStream in package module
write directly the original file. What if OOo or System crash when saving
the existed file. It's impossible to recover the file after OOo or system
restart.

My question is why not write to a temp file at first, then overwriting the
existed file by copying the temp file.

Best regards!
My guess (note, just a guess) is that it has to do with file permissions 
(and similar issues).


--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
Info:  http://www.pitonyak.org/oo.php


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



[dev] Question about OOo saving file

2010-11-03 Thread Lin CHENG
When OOo saving an existed file, I found ZipOutputStream in package module
write directly the original file. What if OOo or System crash when saving
the existed file. It's impossible to recover the file after OOo or system
restart.

My question is why not write to a temp file at first, then overwriting the
existed file by copying the temp file.

Best regards!
-- 
Lin CHENG


Re: [dev] Question ad OOo update feature ...

2010-08-02 Thread Rony G. Flatscher
Hi Joachim,

thank you *very much* for the following link:

> You can find information about the update information here:
> http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Extensions/Description_of_the_Update_Information
>
It really helped me set up the relevant update.xml file such that it
works (and it works great and as intended!).

Regards,

---rony


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



Re: [dev] Question ad OOo update feature ...

2010-08-02 Thread Joachim Lingner

On 01.08.10 16:09, Rony G. Flatscher wrote:

Hi there,

for an extension I would like to have the OOo update feature active. If
an update is available then the user should be directed to a HTML page
that explains what is necessary to get and install the update.

Unfortunately, my tests do not show this feature to be triggered
(changing the update xml file to a version level that is higher than the
deployed extension).

For that purpose the "description.xml" file is defined as (just showing
the relevant elements):

 
 http://openoffice.org/extensions/description/2006";
 xmlns:d="http://openoffice.org/extensions/description/2006";
 xmlns:xlink="http://www.w3.org/1999/xlink";>

   

   

   
 
   

   
 http://wi.wu-wien.ac.at/rgf/rexx/bsf4oorexx/current/ooRexx4OOo_update.xml";
 />
   

 




You can find information about the update information here:
http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Extensions/Description_of_the_Update_Information

Best regards,
Joachim



The update xml file:

 
 http://installation.openoffice.org/description";>
   org.oorexx.uno.ScriptProviderForooRexx.package
   5.00

   http://wi.wu-wien.ac.at/rgf/rexx/bsf4oorexx/current/ooRexx4OOo_update.html"; />

 


Is there something I am doing wrong here?

TIA,

---rony

P.S.: The specifications that I used were:

 
 







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



Re: [dev] Question ad OOo update feature ...

2010-08-02 Thread Joachim Lingner

On 01.08.10 16:09, Rony G. Flatscher wrote:

Hi there,

for an extension I would like to have the OOo update feature active. If
an update is available then the user should be directed to a HTML page
that explains what is necessary to get and install the update.

Unfortunately, my tests do not show this feature to be triggered
(changing the update xml file to a version level that is higher than the
deployed extension).

For that purpose the "description.xml" file is defined as (just showing
the relevant elements):

 
 http://openoffice.org/extensions/description/2006";
 xmlns:d="http://openoffice.org/extensions/description/2006";
 xmlns:xlink="http://www.w3.org/1999/xlink";>

   

   

   
 
   

   
 http://wi.wu-wien.ac.at/rgf/rexx/bsf4oorexx/current/ooRexx4OOo_update.xml";
 />
   

 




You can find information about the update information here:
http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Extensions/Description_of_the_Update_Information

Best regards,
Joachim



The update xml file:

 
 http://installation.openoffice.org/description";>
   org.oorexx.uno.ScriptProviderForooRexx.package
   5.00

   http://wi.wu-wien.ac.at/rgf/rexx/bsf4oorexx/current/ooRexx4OOo_update.html"; />

 


Is there something I am doing wrong here?

TIA,

---rony

P.S.: The specifications that I used were:

 
 







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



[dev] Question ad OOo update feature ...

2010-08-01 Thread Rony G. Flatscher
Hi there,

for an extension I would like to have the OOo update feature active. If
an update is available then the user should be directed to a HTML page
that explains what is necessary to get and install the update.

Unfortunately, my tests do not show this feature to be triggered
(changing the update xml file to a version level that is higher than the
deployed extension).

For that purpose the "description.xml" file is defined as (just showing
the relevant elements):


http://openoffice.org/extensions/description/2006";
xmlns:d="http://openoffice.org/extensions/description/2006";
xmlns:xlink="http://www.w3.org/1999/xlink";>

  

  

  

  

  
http://wi.wu-wien.ac.at/rgf/rexx/bsf4oorexx/current/ooRexx4OOo_update.xml";
 />
  


  


The update xml file:


http://installation.openoffice.org/description";>
  org.oorexx.uno.ScriptProviderForooRexx.package
  5.00

  http://wi.wu-wien.ac.at/rgf/rexx/bsf4oorexx/current/ooRexx4OOo_update.html";
 />


  

Is there something I am doing wrong here?

TIA,

---rony

P.S.: The specifications that I used were:








Re: [dev] Question for a software-solution!

2010-05-25 Thread Sigrid Carrera
Hello Sabine, 

Am Tue, 25 May 2010 17:18:47 +0200
schrieb "sabine.ka...@arcor.de" :

> Dearest Open Office
> 
> I have a question for a software-solution, that no one can answer!
> 
> Have you specialists got a software-solution for me as a _journalist_?
> My sons are Open Office fans and told me, that you were the
> greatests!!

First, I think you wrote to the wrong list. :( Try sending your
question to us...@de.openoffice.org There you can write in German,
since it is the Germanophone list. 

> Here`s the problem:
> 
> _First_ I want to copy only the file-strukture from my extern 
> hard-disc-drive-archive,
> without the contained documents, into my laptop, so that in the laptop
> I have got the empty structure of my archive-file-system.
> This would be great!!
> 
> My file-system in the extern archive is very large
> and the file-system has got a deep strukture of file in file in
> file ..., as deep as it is possible.
> There are huge amounts of documents in these files of my archive.
> 
> _The second_ (luxury-) duty would be an order, that deletes in my
> laptop all content out of a specific chosen file and out of its
> subfiles
> - without deleting the files.
> 
> This is the archive-system, that I need urgently.
> I want to work with an "empty" laptop!
> My laptop is just a little Acer with Windows Vista.
> And I have got only Open Office.
> 
> I hope, I explained and thought about everything well enough

I don't think, that something like this is possible with
OpenOffice.org. This might be possible with some tools that are
specific to your operating system. But as I said, ask on the other list
and I'm sure, there's someone who can point you into the right
direction. 

Regards, 
Sigrid

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



[dev] Question for a software-solution!

2010-05-25 Thread sabine.ka...@arcor.de

Dearest Open Office

I have a question for a software-solution, that no one can answer!

Have you specialists got a software-solution for me as a _journalist_?
My sons are Open Office fans and told me, that you were the greatests!!

Here`s the problem:

_First_ I want to copy only the file-strukture from my extern 
hard-disc-drive-archive,

without the contained documents, into my laptop, so that in the laptop
I have got the empty structure of my archive-file-system.
This would be great!!

My file-system in the extern archive is very large
and the file-system has got a deep strukture of file in file in file ...,
as deep as it is possible.
There are huge amounts of documents in these files of my archive.

_The second_ (luxury-) duty would be an order, that deletes in my laptop
all content out of a specific chosen file and out of its subfiles
- without deleting the files.

This is the archive-system, that I need urgently.
I want to work with an "empty" laptop!
My laptop is just a little Acer with Windows Vista.
And I have got only Open Office.

I hope, I explained and thought about everything well enough

Now you... ??

Best Greetings! Sabine from Germany







Re: [dev] question about sheet ?

2010-05-17 Thread Qzi er
Good Job ! Niklas !

On Mon, May 17, 2010 at 11:52 PM, Niklas Nebel  wrote:

> On 05/17/10 16:30, Qzi er wrote:
>
>> I can't understand the code below  , what's the deference between
>> "getByIndex( 0 )"   and  "*getByName(
>> OUString::createFromAscii("Sheet2"));
>> *";
>>
>
> Just what the names suggest: getByIndex(0) returns the first sheet,
> getByName looks for a sheet with a specific name.
>
>  "XSpreadsheetDocument "  and "XSpreadsheets ";
>>
>
> See the pictures at
> http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Spreadsheets/Working_With_Spreadsheet_Documentsfor
>  an overview of the services SpreadsheetDocument and Spreadsheets.
>
>
>  why I need use Reference< XSpreadsheets > twice ?
>>
>>//query for a XSpreadsheetDocument interface
>>Reference< XSpreadsheetDocument > rSheetDoc (xComponent,
>> UNO_QUERY);
>>
>>//use it to get the XSpreadsheets interface
>>Reference< XSpreadsheets > rSheets = rSheetDoc->getSheets();
>>
>>//query for the XIndexAccess interface
>>Reference< XIndexAccess > xSheetsIA (rSheets, UNO_QUERY);
>>Any sheet = xSheetsIA->getByIndex( 0 );
>>Reference< XSpreadsheet > rSpSheet (sheet, UNO_QUERY);
>>
>
> If you mean the last line, it's XSpreadsheet, not XSpreadsheets.
>
> Niklas
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
> For additional commands, e-mail: dev-h...@openoffice.org
>
>


-- 
 作智慧的减法 ...

体会生活的微妙的富足  ...

  嗯 ...


Re: [dev] question about sheet ?

2010-05-17 Thread Niklas Nebel

On 05/17/10 16:30, Qzi er wrote:

I can't understand the code below  , what's the deference between
"getByIndex( 0 )"   and  "*getByName( OUString::createFromAscii("Sheet2"));
*";


Just what the names suggest: getByIndex(0) returns the first sheet, 
getByName looks for a sheet with a specific name.



"XSpreadsheetDocument "  and "XSpreadsheets ";


See the pictures at 
http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Spreadsheets/Working_With_Spreadsheet_Documents 
for an overview of the services SpreadsheetDocument and Spreadsheets.



why I need use Reference< XSpreadsheets > twice ?

//query for a XSpreadsheetDocument interface
Reference< XSpreadsheetDocument > rSheetDoc (xComponent, UNO_QUERY);

//use it to get the XSpreadsheets interface
Reference< XSpreadsheets > rSheets = rSheetDoc->getSheets();

//query for the XIndexAccess interface
Reference< XIndexAccess > xSheetsIA (rSheets, UNO_QUERY);
Any sheet = xSheetsIA->getByIndex( 0 );
Reference< XSpreadsheet > rSpSheet (sheet, UNO_QUERY);


If you mean the last line, it's XSpreadsheet, not XSpreadsheets.

Niklas

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



[dev] question about sheet ?

2010-05-17 Thread Qzi er
I can't understand the code below  , what's the deference between
"getByIndex( 0 )"   and  "*getByName( OUString::createFromAscii("Sheet2"));
*";

"XSpreadsheetDocument "  and "XSpreadsheets ";

why I need use Reference< XSpreadsheets > twice ?




//query for a XSpreadsheetDocument interface
Reference< XSpreadsheetDocument > rSheetDoc (xComponent, UNO_QUERY);

//use it to get the XSpreadsheets interface
Reference< XSpreadsheets > rSheets = rSheetDoc->getSheets();

//query for the XIndexAccess interface
Reference< XIndexAccess > xSheetsIA (rSheets, UNO_QUERY);
Any sheet = xSheetsIA->getByIndex( 0 );
Reference< XSpreadsheet > rSpSheet (sheet, UNO_QUERY);




-- 
 作智慧的减法 ...

体会生活的微妙的富足  ...

  嗯 ...


Re: [dev] Question

2010-03-30 Thread Jean-Baptiste Faure
Le 29.03.2010 20:00, Emília Alezárová a écrit :
> Good day
>
> When will the new OpenOffice 3.2?
>   
Hi,

OpenOffice.org 3.2 is already released.
Please have a look at http://download.openoffice.org/index.html

Regards.
JBF

-- 
Jean-Baptiste Faure
French N-L project Lead
http://fr.openoffice.org

Seuls des formats ouverts peuvent assurer la pérennité de vos documents.



[dev] Question

2010-03-29 Thread Emília Alezárová
Good day

When will the new OpenOffice 3.2?

Re: [dev] question about oDatabaseContext.getElementNames()

2010-02-24 Thread Oliver Brinzing
Hi Frank,

> When the config data is created by OOo itself, then the node name and the
> property value are identical.

yes, you are right, i tried to insert a more readable (localized) display name,
but wasn't aware that oo 3.2  will use the "node name" for database access.

so for upward compatibility i will change it back to the registration name ...
otherwise our users's will have to use "Edit - Echange Database..." or
even change macro code in oo 3.x ...

thanks :-)

Oliver


Am 24.02.2010 09:56 schrieb Frank Schoenheit, Sun Microsystems Germany:
> Hi Oliver,
> 
>> Is it correct, that "oDatabaseContext.getElementNames()" will return the 
>> displayed name
>> (shown in database brwoser)  and not the "registered Name" shown in Tools - 
>> Options ?
>>
>> for example the macro below will return "My Database", not "mydatabase"
>>
>> 
>>  
>>  
>>  file:///X:/MyDatabase.odb
>>  
>>  
>>  mydatabase
>>  
>>  
>> 
> 
> The code for this happen[s/ed] to be a little ... inconsistent. When the
> config data is created by OOo itself, then the node name and the
> property value are identical. When reading the data, the node name is
> taken as registration name. Strictly, this is wrong, of course, but it's
> noticed only when the node name and the prop value are not identical.
> 
> On the DEV300 code line, this has been fixed - now the property value is
> taken as registration name, the node name can be an arbitrary logical
> name (preferably something like "org." to ensure uniqueness).
> 
> In addition, an interface css.sdb.XDatabaseRegistrations [1] has been
> introduced, which hides the configuration data from you, so there is no
> need to tamper with it directly (The exception would be an extension
> bringing its own configuration data with it, but even here, an on-demand
> registration using XDatabaseRegistrations and the new XDeploymentHook
> would be possible).
> 
> Ciao
> Frank
> 
> [1]http://hg.services.openoffice.org/DEV300/file/1467f46f8817/offapi/com/sun/star/sdb/XDatabaseRegistrations.idl
> 


-- 
Oliver Brinzing fon   +49 7181 481401   fax +49 7181 475635
Ludwigstrasse 14mobil +49 174 3015743
73614 Schorndorfmailto:oliver.brinz...@gmx.de

GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45



signature.asc
Description: OpenPGP digital signature


Re: [dev] question about oDatabaseContext.getElementNames()

2010-02-24 Thread Frank Schoenheit, Sun Microsystems Germany
Hi Oliver,

> Is it correct, that "oDatabaseContext.getElementNames()" will return the 
> displayed name
> (shown in database brwoser)  and not the "registered Name" shown in Tools - 
> Options ?
> 
> for example the macro below will return "My Database", not "mydatabase"
> 
> 
>   
>   
>   file:///X:/MyDatabase.odb
>   
>   
>   mydatabase
>   
>   
> 

The code for this happen[s/ed] to be a little ... inconsistent. When the
config data is created by OOo itself, then the node name and the
property value are identical. When reading the data, the node name is
taken as registration name. Strictly, this is wrong, of course, but it's
noticed only when the node name and the prop value are not identical.

On the DEV300 code line, this has been fixed - now the property value is
taken as registration name, the node name can be an arbitrary logical
name (preferably something like "org." to ensure uniqueness).

In addition, an interface css.sdb.XDatabaseRegistrations [1] has been
introduced, which hides the configuration data from you, so there is no
need to tamper with it directly (The exception would be an extension
bringing its own configuration data with it, but even here, an on-demand
registration using XDatabaseRegistrations and the new XDeploymentHook
would be possible).

Ciao
Frank

[1]http://hg.services.openoffice.org/DEV300/file/1467f46f8817/offapi/com/sun/star/sdb/XDatabaseRegistrations.idl

-- 
- Frank Schönheit, Software Engineer frank.schoenh...@sun.com -
- Sun Microsystems  http://www.sun.com/staroffice -
- OpenOffice.org Base   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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



[dev] question about oDatabaseContext.getElementNames()

2010-02-23 Thread Oliver Brinzing
Is it correct, that "oDatabaseContext.getElementNames()" will return the 
displayed name
(shown in database brwoser)  and not the "registered Name" shown in Tools - 
Options ?

for example the macro below will return "My Database", not "mydatabase"




file:///X:/MyDatabase.odb


mydatabase





OPTION EXPLICIT
Sub Test()

Dim oDatabaseContext as Object
Dim oNames()
Dim s as String
Dim i as Integer

oDatabaseContext = createUnoService("com.sun.star.sdb.DatabaseContext")

oNames = oDatabaseContext.getElementNames()

For i = 0 To UBound(oNames())
s = s & Chr(13) & oNames(i)
Next i

MsgBox s
End Sub

Oliver

-- 

GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45



signature.asc
Description: OpenPGP digital signature


[dev] Question ad creating and deploying components, implemented in (dispatchable) scritpting languages ...

2010-01-27 Thread Rony G. Flatscher
Hi there,

if this is not the right list, please advise. [This e-mail is directed
at d...@api.openoffice.org and dev@openoffice.org, and the Reply-To-field
set to d...@openoffice.org.]

After peeking around the documentation (mainly developer's guide)
currently one is able to create componenents in C++ and  Java (and also
in Python).

The question: how would one create and implement UNO components in
scripting languages that can be deployed via the OOo (Java-based)
scripting framework (e.g. JavaScript/Rhino, BeanShell, but also ooRexx
or other BSF-scripting languages)?

Some of the questions that may be needed to be addressed would be:

* How can one dynamically add IDL kind of type information to the
  registry, such that the new types become reflectable?
* How can one register a component dynamically ?
* How can one supply a service manager object to be used for
  instantiating instances?
* How can one take advantage of helper classes (XWeak, XComponent) ?

Are there any links/hints to postings, definitions, sketches of such a
functionality? Is there some experimental implementation available
somewhere (or is it even available already)?

Short of that, how is the Python support implemented? Is there a
documentation about the architecture and the UNO APIs it uses? What
are/were the problems there, are there any shortcomings?

---

Maybe to rephrase this question differently: I would like to come up
with a solution for OOo disptachable scripting languages, in which
script programmers have no need for the OOo SDK, if they wish to create
UNO components in their scripting language of choice. (The necessary
complexity involved in creating UNO components, should be reduced to an
absolute minimum, where this minimum should be to have no need for
installing the OOo SDK.)

TIA,

---rony




[dev] question on open office

2009-11-13 Thread snoopmojo

I have open office installed and I used to be able to choose open office as a 
selection when asked "open with" for E mail attachments, pictures, etc. This no 
longer appears as an option. Please advise how I can put in Openoffice as an 
"open with" option. Thank you. 

Deanna Schneider 




Re: [dev] question

2009-11-07 Thread Nino Novak
On Friday 06 November 2009 17:04, laroche.claire wrote:
> Bonjour,
>
> je viens de télécharger la dernière version  d'openoffice,
> j'ai sans cesse des fenêtres de pub apparaissent depuis.
> Comment je peux faire pour m'en débarrasser?
> Merci de me donner une réponse.
> Claire Laroche
> http://www.roustina.com

Claire,

ton e-mail est arrivé dans une liste de développement (anglaise). 
Je croix qu'on te pourrait aider mieux à la liste d'aide aux 
utilisateurs francophone us...@fr.openoffice.org.

Nino

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



Re: [dev] Question

2009-06-24 Thread Stephan Bergmann

On 23.06.09 13:08, atefeh zare wrote:

hi
after entering data in "user data" page(Tools/Options/User Data),in next 
session which open office ,this data is recovered.where this data is saved and in which 
config file ? i can't find related config file.
thanks


That data is stored in the "OOo configuration" (sometimes also called 
the "OOo registry").  Although the configuration is based on XML files 
(for now, at least), you should not operate on those files directly, but 
rather use the corresponding UNO services to access the data (see the 
"Configuration Management" chapter in the OOo Developer's Guide; the 
relevant configuration data is at org.openoffice.UserProfile, I think).


-Stephan

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



[dev] Question

2009-06-24 Thread atefeh zare
hi
after entering data in "user data" page(Tools/Options/User Data),in next 
session which open office ,this data is recovered.where this data is saved and 
in which config file ? i can't find related config file.
thanks



  

Re: [dev] question about writer2latex

2007-11-19 Thread Mathias Bauer
Hi Brad,

Brad Walker wrote:

> I'm unsure which project this question should be posted to. So I
> thought I would send it here first and then you can direct me to the
> more appropriate place.
> 
> I'm interested in the Export feature of the OOo Writer. Specifically
> the export to LaTeX2e filter. From what I gather the current OOo
> export to LaTeX feature is handled by writer2latex. I've looked
> through the archives and noticed the version shipping with OOo 2.3 is
> writer2latex version 0.4.
> 
> There is a much more current version 0.5 and there have been several
> versions between the two. There are a lot of bug fixes in version 0.5.
> 
> So I'm interested in knowing if there is any desire to get our export
> filter brought up to a more current version. If so, I might be
> interested in working on it.

Yes, this would be very desirable. Thanks for offering your help, it's
highly appreciated. Please let us know if you need any assistance.

In case you didn't read Caolan's reply (as you seem to be not subscribed
to this list), here's the link to an issue he posted that can be used to
track the work:

http://qa.openoffice.org/issues/show_bug.cgi?id=83346

Best regards,
Mathias

-- 
Mathias Bauer (mba) - Project Lead OpenOffice.org Writer
OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS
Please don't reply to "[EMAIL PROTECTED]".
I use it for the OOo lists and only rarely read other mails sent to it.

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



Re: [dev] question about writer2latex

2007-11-19 Thread Caolan McNamara

On Mon, 2007-11-19 at 15:52 +0200, Zvi Har'El wrote:
> Hi,
> 
> 
> Writer2latex is also responsible to the xhtml export from OOo writer.
> Writer2latex has fixed many bugs, e.g, current xhtml export doesn't
> generate footnotes and endnotes, and Writer2later 0.5 when doing xhtml
> export handles footnotes and endnotes correclty. I have installed
> Writer2latex 0.5 as an export plugin in OOo 2.3 and it satisfies all my
> needs, but I am certain there should be give na high priority in
> updating the default version.

Updating to the latest version is the suggestion given here:
http://qa.openoffice.org/issues/show_bug.cgi?id=83346
Perhaps that's the right issue to track.

C.

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



Re: [dev] question about writer2latex

2007-11-19 Thread Zvi Har'El
Hi,


Writer2latex is also responsible to the xhtml export from OOo writer.
Writer2latex has fixed many bugs, e.g, current xhtml export doesn't
generate footnotes and endnotes, and Writer2later 0.5 when doing xhtml
export handles footnotes and endnotes correclty. I have installed
Writer2latex 0.5 as an export plugin in OOo 2.3 and it satisfies all my
needs, but I am certain there should be give na high priority in
updating the default version.


Best,


Zvi.


On 18/11/07 05:54, Brad Walker wrote:

> I'm unsure which project this question should be posted to. So I
> thought I would send it here first and then you can direct me to the
> more appropriate place.
>
> I'm interested in the Export feature of the OOo Writer. Specifically
> the export to LaTeX2e filter. From what I gather the current OOo
> export to LaTeX feature is handled by writer2latex. I've looked
> through the archives and noticed the version shipping with OOo 2.3 is
> writer2latex version 0.4.
>
> There is a much more current version 0.5 and there have been several
> versions between the two. There are a lot of bug fixes in version 0.5.
>
> So I'm interested in knowing if there is any desire to get our export
> filter brought up to a more current version. If so, I might be
> interested in working on it.
>
> Thanks.
>
> -brad w.
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>   

-- 
Dr. Zvi Har'El  mailto:[EMAIL PROTECTED]Department of Mathematics
tel:+972-54-4227607  Technion - Israel Institute of Technology
fax:+972-4-8293388  http://www.math.technion.ac.il/~rl/Haifa 32000, ISRAEL
"If you can't say somethin' nice, don't say nothin' at all." -- Thumper (1942)

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



[dev] question about writer2latex

2007-11-19 Thread Brad Walker
I'm unsure which project this question should be posted to. So I
thought I would send it here first and then you can direct me to the
more appropriate place.

I'm interested in the Export feature of the OOo Writer. Specifically
the export to LaTeX2e filter. From what I gather the current OOo
export to LaTeX feature is handled by writer2latex. I've looked
through the archives and noticed the version shipping with OOo 2.3 is
writer2latex version 0.4.

There is a much more current version 0.5 and there have been several
versions between the two. There are a lot of bug fixes in version 0.5.

So I'm interested in knowing if there is any desire to get our export
filter brought up to a more current version. If so, I might be
interested in working on it.

Thanks.

-brad w.

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



Re: [dev] question on custom XML schemas

2007-10-11 Thread ashok _
On 10/11/07, Charles-H. Schulz <[EMAIL PROTECTED]> wrote:

> this may not be the best list for this. Anyway, it was first asked in an
> ODF forum, but turned out to me (imho) a purely OOo-related question.
> See here: http://opendocument.xml.org/node/838#comment-74
>
> An answer would be appreciated.

I dont think there are plans to provide a feature like this, there was
a thread on the openoffice-xml list a while back which discussed some
alternatives :

http://xml.openoffice.org/servlets/ReadMsg?list=dev&msgNo=3064

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



[dev] question on custom XML schemas

2007-10-11 Thread Charles-H. Schulz
Hi,

this may not be the best list for this. Anyway, it was first asked in an
ODF forum, but turned out to me (imho) a purely OOo-related question.
See here: http://opendocument.xml.org/node/838#comment-74

An answer would be appreciated.

Thanks,
Charles.

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



[dev] Question: How to add formatID to OpenOfficeWriter?

2007-10-09 Thread Schuster Gerhard
Hi developers,


I'm Gerhard from www.00easytracker.org.
I want to use OpenOffice as core for a new requirements engeneering
software. (You'll find a dessign scetch of the project here:
http://www.ooeasytracker.org/tikiwiki/tiki-read_article.php?articleId=7)


Therfore I would like to know how to add formatID to
OpenOffice text.
This formatID shall be the means to link information snippets.
So if the user finds a piece of information in a OpenOffice
document, he can attach an unique ID to this section and with this ID
he can link it to another piece of information within the same
or another document.


Here the detailed requirements:

1) I want to be able to select a piece of text within OpenOfficeWriter
and attach an invisible formatID to it.
2) This formatID shall not show its self in OpenOfficeWriter but be
present in the documents ODF file.
3) It shall be possible to assign different formatID's to overlapping text
sections.
4) It shall be possible to assign a formatID to a subsection of text
that has already a formatID
5) It shall be possible to search for text that has this formatID
6) The formatID shall be a alphanumeric string with white spaces
7) The new function does not show its self to the user in OpenOffice but it will
be called by the java application that embeddes the OpenOffice
document
8) I want to code in Java, if possible and I want to use the UNO bridge
9) The new feature shall be a plugin to OpenOffice and it shall not be
necessary to build a new OpenOffice every time a new version gets
released


I could use the hyperlink format as a workarround.
I would only use the Name field and leave the URL field empty.
But this solution does not fullfill requirement 4,5 and 5.
There are workarrounds for that too, which might work fine with
short documents, but probbably not with long ones.


Is there anybody arround who is able and willing to help?

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



Re: [dev] RE:[dev] question about use XStorag

2007-07-09 Thread ???
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


> 
> Ah, I see. This was the reason why we added the SubFilter API. The
> document already was initialized as an empty document. So trying to
> assign another storage directly can lead to inconsistencies. For that
> reason we added the new, explicit API.
> 
> So the only way I see is upgrading to at least OOF680 and using SubFilter.
> 

Thank you for your help!I'll upgrade to newest version.:-)
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGkqAVzPVuye60RZQRAmZBAJ4o6w/TObxugg2QhfQvTeh5dP1jyACgkCDm
2hzUbU5r7YpZfjkh1j0TRgY=
=vBCy
-END PGP SIGNATURE-

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



Re: [dev] RE:[dev] question about use XStorag

2007-07-09 Thread Mathias Bauer
chensuchun wrote:

>> No, you can't copy the document content that way.
>> If loadFromStorage() doesn't work you have to update and use the SubFilter.
>> 
>> Perhaps you tell us what loadFromStorage() does. Or you can debug the
>> code to see what goes on there. Maybe it's a bug in the code. But even
>> then you had to update as nobody will fix bugs on this ancient code line.
>> 
> The source code of loadFromStorage in OOB680 :
> 
> When I call it in the filter,
> it goes into "if( m_pData->m_pObjectShell->GetMedium() )" statment and 
> "throw DOUBLEINITIALIZATIONEXCEPTION()".

Ah, I see. This was the reason why we added the SubFilter API. The
document already was initialized as an empty document. So trying to
assign another storage directly can lead to inconsistencies. For that
reason we added the new, explicit API.

So the only way I see is upgrading to at least OOF680 and using SubFilter.

Ciao,
Mathias


-- 
Mathias Bauer (mba) - Project Lead OpenOffice.org Writer
OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS
Please don't reply to "[EMAIL PROTECTED]".
I use it for the OOo lists and only rarely read other mails sent to it.

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



Re: [dev] RE:[dev] question about use XStorag

2007-07-08 Thread chensuchun



No, you can't copy the document content that way.
If loadFromStorage() doesn't work you have to update and use the SubFilter.

Perhaps you tell us what loadFromStorage() does. Or you can debug the
code to see what goes on there. Maybe it's a bug in the code. But even
then you had to update as nobody will fix bugs on this ancient code line.


The source code of loadFromStorage in OOB680 :

void SAL_CALL SfxBaseModel::loadFromStorage( const REFERENCE< 
XSTORAGE>& 	xStorage,

const SEQUENCE< PROPERTYVALUE >& aMediaDescriptor )
throw ( ILLEGALARGUMENTEXCEPTION,
DOUBLEINITIALIZATIONEXCEPTION,
IOEXCEPTION,
EXCEPTION,
RUNTIMEEXCEPTION )
{
::vos::OGuard aGuard( Application::GetSolarMutex() );
if ( impl_isDisposed() )
throw DISPOSEDEXCEPTION();

if ( !m_pData->m_pObjectShell.Is() )
throw IOEXCEPTION(); // TODO:

if ( m_pData->m_pObjectShell.Is() )
{
if( m_pData->m_pObjectShell->GetMedium() )
// if a Medium is present, the document is already initialized
throw DOUBLEINITIALIZATIONEXCEPTION();

// after i36090 is fixed the pool from object shell can be used
// SfxAllItemSet aSet( m_pData->m_pObjectShell->GetPool() );
SfxAllItemSet aSet( SFX_APP()->GetPool() );

// the BaseURL is part of the ItemSet
SfxMedium* pMedium = new SfxMedium( xStorage, String() );
TransformParameters( SID_OPENDOC, aMediaDescriptor, aSet );
pMedium->GetItemSet()->Put( aSet );

// allow to use an interactionhandler (if there is one)
pMedium->UseInteractionHandler( TRUE );

// TODO/LATER: in case of template storage, the temporary copy must be 
created
	SFX_ITEMSET_ARG( &aSet, pTemplateItem, SfxBoolItem, SID_TEMPLATE, 
sal_False);

BOOL bTemplate = pTemplateItem && pTemplateItem->GetValue();
m_pData->m_pObjectShell->SetActivateEvent_Impl( bTemplate ? 
SFX_EVENT_CREATEDOC : SFX_EVENT_OPENDOC );

m_pData->m_pObjectShell->Get_Impl()->bOwnsStorage = FALSE;

// load document
if ( !m_pData->m_pObjectShell->DoLoad(pMedium) )
{
sal_uInt32 nError = m_pData->m_pObjectShell->GetErrorCode();
throw task::ErrorCodeIOException( ::rtl::OUString(),
  
  uno::Reference< uno::XInterface >(),

nError ? nError : ERRCODE_IO_CANTREAD );
}
}
}

When I call it in the filter,
it goes into "if( m_pData->m_pObjectShell->GetMedium() )" statment and 
"throw DOUBLEINITIALIZATIONEXCEPTION()".


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



Re: [dev] RE:[dev] question about use XStorag

2007-07-06 Thread Mathias Bauer
chensuchun wrote:

> Sorry, there is no OwnSubFilter service in my openoffice, my openoffice
> is based on the source of OOB680 .

As recommended by others: you should upgrade.

> I want to try an other way.
> My idea is  as following:
> 1. use loadComponentFromURLto open the document in hidden mode.
> 2. copy the whole content and style from the  XComponent returned fronm 
> loadComponentFromURL to the mxDesDoc which is set by setTargetDocument.
> 3. close the hidden document.
> 
> Can I do in the filter in this way?

No, you can't copy the document content that way.
If loadFromStorage() doesn't work you have to update and use the SubFilter.

Perhaps you tell us what loadFromStorage() does. Or you can debug the
code to see what goes on there. Maybe it's a bug in the code. But even
then you had to update as nobody will fix bugs on this ancient code line.

Ciao,
Mathias

-- 
Mathias Bauer (mba) - Project Lead OpenOffice.org Writer
OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS
Please don't reply to "[EMAIL PROTECTED]".
I use it for the OOo lists and only rarely read other mails sent to it.

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



Re: [dev] RE:[dev] question about use XStorag

2007-07-06 Thread Mathias Bauer
Eike Rathke wrote:

> Hi,
> 
> On Friday, 2007-07-06 09:20:57 +0200, Rüdiger Timm wrote:
> 
>> >is based on the source of OOB680 .
>> 
>> Why do you have to use such an old code base? I'd strongly recommend to 
>> update to f.e. OOF680 m18, the latest release. From my point of view it 
>> does not make sense to do development based on old code.
> 
> In terms of development I'd even consider the OOF680 branch as way old
> and patches don't necessarily apply on SRC680 anymore. I'd recommend
> a recent SRC680 milestone instead, currently the latest available being
> SRC680_m219.

That depends. If you are developing an extension that should run on the
current stable release it's not a bad idea to use this code line for
development. But using OOB680 is definitely not recommended.

Ciao,
Mathias

-- 
Mathias Bauer (mba) - Project Lead OpenOffice.org Writer
OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS
Please don't reply to "[EMAIL PROTECTED]".
I use it for the OOo lists and only rarely read other mails sent to it.

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



Re: [dev] RE:[dev] question about use XStorag

2007-07-06 Thread Eike Rathke
Hi,

On Friday, 2007-07-06 09:20:57 +0200, Rüdiger Timm wrote:

> >is based on the source of OOB680 .
> 
> Why do you have to use such an old code base? I'd strongly recommend to 
> update to f.e. OOF680 m18, the latest release. From my point of view it 
> does not make sense to do development based on old code.

In terms of development I'd even consider the OOF680 branch as way old
and patches don't necessarily apply on SRC680 anymore. I'd recommend
a recent SRC680 milestone instead, currently the latest available being
SRC680_m219.

  Eike

-- 
 OOo/SO Calc core developer. Number formatter stricken i18n transpositionizer.
 OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS
 Please don't send personal mail to this [EMAIL PROTECTED] account, which I use 
for
 mailing lists only and don't read from outside Sun. Use [EMAIL PROTECTED] 
Thanks.

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



Re: [dev] RE:[dev] question about use XStorag

2007-07-06 Thread Rüdiger Timm



chensuchun wrote:


[...]



Sorry, there is no OwnSubFilter service in my openoffice, my openoffice
is based on the source of OOB680 .

[...]


Why do you have to use such an old code base? I'd strongly recommend to 
update to f.e. OOF680 m18, the latest release. From my point of view it 
does not make sense to do development based on old code.


Rüdiger

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



Re: [dev] RE:[dev] question about use XStorag

2007-07-05 Thread chensuchun




[EMAIL PROTECTED] wrote:

sal_Bool SAL_CALL XXFilter::filter( const Sequence< PropertyValue >& rDescriptor ) 
	throw (RuntimeException)

{
Window* pFocusWindow = Application::GetFocusWindow();

if( pFocusWindow )
pFocusWindow->EnterWait();


Please! Don't use any GUI code in filter components. This is not a job
of the filter. You never know in which content your code will be called.


sal_Bool XXFilter::implImport( const Sequence< PropertyValue >& rDescriptor )
{
...
uno::Reference< document::XStorageBasedDocument > xDoc( mxDesDoc, 
uno::UNO_QUERY );///mxDesDoc is set by setTargetDocument

...

///I use loadFromStorage to load document
uno::Sequence< beans::PropertyValue > afArgs( 1 );
afArgs[0].Name = ::rtl::OUString::createFromAscii( "FilterName" );
afArgs[0].Value <<= ::rtl::OUString::createFromAscii( "writer8" );
/**xSourceStorage is read form InputStream, I remove the sub storage and it's 
odt format now */
xDoc->loadFromStorage( xSourceStorage, afArgs ); 
...

///End
when I open a document,it goes into the function implImport
but the function loadFromStorage don't load the document.
Is there other API or method that I can load the odt document in my filter ? 

I don't understand why you need to write a filter that does the same as
the default filter. I assume that you have some additional code in your
filter that loads your own data and then wants to pass the storage to
the document so that it can load as it would to for the original format,
correct?

Yes, I add the fingerprints of the document's creator into the 
substorage when saving the document.
when opening it, I want to judge if the fingerprints are match the 
fingerprints of who open it ,if match loading the document as original 
format.

There's a new API especially for filters that create a legal ODF
document storage themselves and just want to hand it over to the document
model. It goes like this:

Sequence< Any > aArgs( 2 );
aArgs[0] <<= xDoc;
aArgs[1] <<= xStream; // the stream you have got!

Reference< XFilter > xSubFilter;
try
{
// mxMSF is the service factory you received in
// the ctor of your filter
xSubFilter = Reference(
mxMSF->createInstanceWithArguments(
OUString( RTL_CONSTASCII_USTRINGPARAM(  
"com.sun.star.document.OwnSubFilter" ) ),
aArgs ),
UNO_QUERY );
xSubFilter->filter( aDescriptor ); // the original descriptor
}
catch(Exception& )
{
// ...
}

I don't know if it works when the provided stream itself *is* an ODF
storage but you can try it out and tell us if it works. :-)


Sorry, there is no OwnSubFilter service in my openoffice, my openoffice
is based on the source of OOB680 .

I want to try an other way.
My idea is  as following:
1. use loadComponentFromURLto open the document in hidden mode.
2. copy the whole content and style from the  XComponent returned fronm 
loadComponentFromURL to the mxDesDoc which is set by setTargetDocument.

3. close the hidden document.

Can I do in the filter in this way?
Could you tell me how to copy the whole content and style from one 
document to another if this way works?

Thanks!

Best wishes!

chensuchun

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



Re: [dev] RE:[dev] question about use XStorag

2007-07-05 Thread Mathias Bauer
[EMAIL PROTECTED] wrote:

> sal_Bool SAL_CALL XXFilter::filter( const Sequence< PropertyValue >& 
> rDescriptor ) 
>   throw (RuntimeException)
> {
> Window* pFocusWindow = Application::GetFocusWindow();
> 
> if( pFocusWindow )
>   pFocusWindow->EnterWait();

Please! Don't use any GUI code in filter components. This is not a job
of the filter. You never know in which content your code will be called.

> sal_Bool XXFilter::implImport( const Sequence< PropertyValue >& rDescriptor )
> {
> ...
> uno::Reference< document::XStorageBasedDocument > xDoc( mxDesDoc, 
> uno::UNO_QUERY );///mxDesDoc is set by setTargetDocument
> 
> ...
> 
> ///I use loadFromStorage to load document
> uno::Sequence< beans::PropertyValue > afArgs( 1 );
> afArgs[0].Name = ::rtl::OUString::createFromAscii( "FilterName" );
> afArgs[0].Value <<= ::rtl::OUString::createFromAscii( "writer8" );
> /**xSourceStorage is read form InputStream, I remove the sub storage and it's 
> odt format now */
> xDoc->loadFromStorage( xSourceStorage, afArgs ); 
> ...
> ///End
> when I open a document,it goes into the function implImport
> but the function loadFromStorage don't load the document.
> Is there other API or method that I can load the odt document in my filter ? 
I don't understand why you need to write a filter that does the same as
the default filter. I assume that you have some additional code in your
filter that loads your own data and then wants to pass the storage to
the document so that it can load as it would to for the original format,
correct?

There's a new API especially for filters that create a legal ODF
document storage themselves and just want to hand it over to the document
model. It goes like this:

Sequence< Any > aArgs( 2 );
aArgs[0] <<= xDoc;
aArgs[1] <<= xStream; // the stream you have got!

Reference< XFilter > xSubFilter;
try
{
// mxMSF is the service factory you received in
// the ctor of your filter
xSubFilter = Reference(
mxMSF->createInstanceWithArguments(
OUString( RTL_CONSTASCII_USTRINGPARAM(  
"com.sun.star.document.OwnSubFilter" ) ),
aArgs ),
UNO_QUERY );
xSubFilter->filter( aDescriptor ); // the original descriptor
}
catch(Exception& )
{
// ...
}

I don't know if it works when the provided stream itself *is* an ODF
storage but you can try it out and tell us if it works. :-)

Ciao,
Mathias

-- 
Mathias Bauer (mba) - Project Lead OpenOffice.org Writer
OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS
Please don't reply to "[EMAIL PROTECTED]".
I use it for the OOo lists and only rarely read other mails sent to it.

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



[dev] RE:[dev] question about use XStorag

2007-07-05 Thread cokecola13574
Hi!
   With your help ,the exoprt in filter works well.
But now I get some problem with importing the file that I export.

I implement the XImporter as following:
void SAL_CALL XXFilter::setTargetDocument( const Reference< XComponent >& xDoc 
) 
throw(IllegalArgumentException, RuntimeException)
{
mxDesDoc = xDoc;
m_bImport = sal_True;
}
sal_Bool SAL_CALL XXFilter::filter( const Sequence< PropertyValue >& 
rDescriptor ) 
throw (RuntimeException)
{
Window* pFocusWindow = Application::GetFocusWindow();

if( pFocusWindow )
pFocusWindow->EnterWait();

sal_Bool bRet ;
if( m_bImport )
bRet = implImport( rDescriptor );
else
bRet = implExport( rDescriptor );

if( pFocusWindow )
pFocusWindow->LeaveWait();

return bRet;
}

sal_Bool XXFilter::implImport( const Sequence< PropertyValue >& rDescriptor )
{
...
uno::Reference< document::XStorageBasedDocument > xDoc( mxDesDoc, 
uno::UNO_QUERY );///mxDesDoc is set by setTargetDocument

...

///I use loadFromStorage to load document
uno::Sequence< beans::PropertyValue > afArgs( 1 );
afArgs[0].Name = ::rtl::OUString::createFromAscii( "FilterName" );
afArgs[0].Value <<= ::rtl::OUString::createFromAscii( "writer8" );
/**xSourceStorage is read form InputStream, I remove the sub storage and it's 
odt format now */
xDoc->loadFromStorage( xSourceStorage, afArgs ); 
...
///End
when I open a document,it goes into the function implImport
but the function loadFromStorage don't load the document.
Is there other API or method that I can load the odt document in my filter ? 

Thanks!

- Original Message -
From:[EMAIL PROTECTED]
To:dev@openoffice.org
Subject:[dev] RE:Re: [dev] RE:Re: [dev] RE:[dev] question about use XStorage in 
filt
Date:07-06-26 15:17:15


Thank you for your explaination!
Now I get an idea of storing a file clearly.:-)

- Original Message -
From:Mathias Bauer 
To:dev@openoffice.org
Subject:Re: [dev] RE:Re: [dev] RE:[dev] question about use XStorage in filter
Date:07-06-25 14:55:37

Hi,

first thanks for fixing the problem with the mail client.
Now about the possible problem.

[EMAIL PROTECTED] wrote:

> ///create the target storage
> 
> uno::Sequence aArgs( 2 );
>  aArgs[0]   aArgs[1]   uno::Reference xTargetStorage( 
>   xStorageFactory->createInstanceWithArguments( aArgs ),
> uno::UNO_QUERY );

The problem is that you shouldn't use the URL, you must use the
outputstream that is provided to you. The framework opens a temporary
stream and finally copies it over the target file in the Commit() in
SfxObjectShell that you have quoted. The reason is simple: if something
goes wrong in the filter the original files isn't destroyed.

So even if you already create your file at the target location the
SfxObjectShell will overwrite it with all the content stored in the
output stream. In your case the stream is empty, thus the zero byte
length of the result.

Here's what a filter creating a storage should do:

- first create a temporary file
- get the XStream interface from it
- open a storage based on that stream
- copy the document into it
- add your substorage
- commit this storage(!)
- dispose of it
- copy from this stream to the XOutputStream from the arguments
- dispose of the TempFile

The content of the output stream is handled by the framework code. It
will close the stream and copy the bits if everything went fine.

Seeing your code I wonder whether we should add a "Stream" argument so
that you don't need to create the temporary copy. But for the time being
you should proceed as recommended.

Ciao,
Mathias

-- 
Mathias Bauer (mba) - Project Lead OpenOffice.org Writer
OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS
Please don't reply to "[EMAIL PROTECTED]".
I use it for the OOo lists and only rarely read other mails sent to it.

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



---
MOTO新摄会 狂拍无极限 超多好礼等你来赢( 
http://d1.sina.com.cn/sina/limeng3/mail_zhuiyu/2007/mail_zhuiyu_20070625.html )

===
注册新浪2G免费邮箱( http://mail.sina.com.cn/chooseMode.html ) 

---
7月11日《变形金刚》首映电影票开抢了!( 
http://d1.sina.com.cn/sina/limeng3/mail_zhuiyu/2007/mail_zhuiyu_20070702.html )

===
注册新浪2G免费邮箱( http://mail.sina.com.cn/chooseMode.html )

[dev] RE:Re: [dev] RE:Re: [dev] RE:[dev] question about use XStorage in filt

2007-06-26 Thread cokecola13574

Thank you for your explaination!
Now I get an idea of storing a file clearly.:-)

- Original Message -
From:Mathias Bauer 
To:dev@openoffice.org
Subject:Re: [dev] RE:Re: [dev] RE:[dev] question about use XStorage in filter
Date:07-06-25 14:55:37

Hi,

first thanks for fixing the problem with the mail client.
Now about the possible problem.

[EMAIL PROTECTED] wrote:

> ///create the target storage
> 
> uno::Sequence aArgs( 2 );
>  aArgs[0]   aArgs[1]   uno::Reference xTargetStorage( 
>   xStorageFactory->createInstanceWithArguments( aArgs ),
> uno::UNO_QUERY );

The problem is that you shouldn't use the URL, you must use the
outputstream that is provided to you. The framework opens a temporary
stream and finally copies it over the target file in the Commit() in
SfxObjectShell that you have quoted. The reason is simple: if something
goes wrong in the filter the original files isn't destroyed.

So even if you already create your file at the target location the
SfxObjectShell will overwrite it with all the content stored in the
output stream. In your case the stream is empty, thus the zero byte
length of the result.

Here's what a filter creating a storage should do:

- first create a temporary file
- get the XStream interface from it
- open a storage based on that stream
- copy the document into it
- add your substorage
- commit this storage(!)
- dispose of it
- copy from this stream to the XOutputStream from the arguments
- dispose of the TempFile

The content of the output stream is handled by the framework code. It
will close the stream and copy the bits if everything went fine.

Seeing your code I wonder whether we should add a "Stream" argument so
that you don't need to create the temporary copy. But for the time being
you should proceed as recommended.

Ciao,
Mathias

-- 
Mathias Bauer (mba) - Project Lead OpenOffice.org Writer
OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS
Please don't reply to "[EMAIL PROTECTED]".
I use it for the OOo lists and only rarely read other mails sent to it.

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



---
MOTO新摄会 狂拍无极限 超多好礼等你来赢( 
http://d1.sina.com.cn/sina/limeng3/mail_zhuiyu/2007/mail_zhuiyu_20070625.html )

===
注册新浪2G免费邮箱( http://mail.sina.com.cn/chooseMode.html )

Re: [dev] RE:Re: [dev] RE:[dev] question about use XStorage in filter

2007-06-25 Thread Mathias Bauer
Hi,

first thanks for fixing the problem with the mail client.
Now about the possible problem.

[EMAIL PROTECTED] wrote:

> ///create the target storage
> 
> uno::Sequence< uno::Any > aArgs( 2 );
>  aArgs[0] <<= aURL; get from rDescriptor 
>  aArgs[1] <<= embed::ElementModes::READWRITE;
>  uno::Reference< embed::XStorage > xTargetStorage( 
>   xStorageFactory->createInstanceWithArguments( aArgs ),
> uno::UNO_QUERY );

The problem is that you shouldn't use the URL, you must use the
outputstream that is provided to you. The framework opens a temporary
stream and finally copies it over the target file in the Commit() in
SfxObjectShell that you have quoted. The reason is simple: if something
goes wrong in the filter the original files isn't destroyed.

So even if you already create your file at the target location the
SfxObjectShell will overwrite it with all the content stored in the
output stream. In your case the stream is empty, thus the zero byte
length of the result.

Here's what a filter creating a storage should do:

- first create a temporary file
- get the XStream interface from it
- open a storage based on that stream
- copy the document into it
- add your substorage
- commit this storage(!)
- dispose of it
- copy from this stream to the XOutputStream from the arguments
- dispose of the TempFile

The content of the output stream is handled by the framework code. It
will close the stream and copy the bits if everything went fine.

Seeing your code I wonder whether we should add a "Stream" argument so
that you don't need to create the temporary copy. But for the time being
you should proceed as recommended.

Ciao,
Mathias

-- 
Mathias Bauer (mba) - Project Lead OpenOffice.org Writer
OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS
Please don't reply to "[EMAIL PROTECTED]".
I use it for the OOo lists and only rarely read other mails sent to it.

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



[dev] RE:Re: [dev] RE:[dev] question about use XStorage in filter

2007-06-23 Thread cokecola13574
Thanks all!Let me have a try.

Hello! 

  I'm chensuchun.I'm a newbie in devloping filter.I implement a filter for 
exporting and importing my own format file,whose format is based on odt.But I 
get some problems about filter.

the code of  function filter( const Sequence< PropertyValue >& rDescriptor ) is 
following:

xDoc = uno::Reference< document::XStorageBasedDocument >( mxSrcDoc, 
uno::UNO_QUERY );  ///mxSrcDoc is set by setSourceDocument()

save to a tmp storage use filter writer8
  xSourceStorage = uno::Reference< embed::XStorage >( 
xStorageFactory->createInstance(),
uno::UNO_QUERY );
  uno::Sequence< beans::PropertyValue > afArgs( 1 );
  afArgs[0].Name = ::rtl::OUString::createFromAscii( "FilterName" );
  afArgs[0].Value <<= ::rtl::OUString::createFromAscii( "writer8" );
  xDoc->storeToStorage( xSourceStorage, afArgs );

add a sub storage to the  xSourceStorage 

const ::rtl::OUString aSubStorageName ( RTL_CONSTASCII_USTRINGPARAM ( 
"SubStorage" ) );
   uno::Reference< embed::XStorage > xSubStorage = 
xSourceStorage->openStorageElement( aSubStorageName, 
embed::ElementModes::WRITE );

uno::Reference< beans::XPropertySet > xSubStoagePro( xSubStorage, 
uno::UNO_QUERY );
   xSubStoagePro->setPropertyValue( OUString::createFromAscii("MediaType"), 
makeAny(OUString::createFromAscii("SubMediaType")) );

..

///create the target storage

uno::Sequence< uno::Any > aArgs( 2 );
 aArgs[0] <<= aURL; get from rDescriptor 
 aArgs[1] <<= embed::ElementModes::READWRITE;
 uno::Reference< embed::XStorage > xTargetStorage( 
  xStorageFactory->createInstanceWithArguments( aArgs ),
uno::UNO_QUERY );


copy to target storage and commit

xSourceStorage->copyToStorage( xTargetStorage );
   bRet = sal_True;
   uno::Reference< XTransactedObject > xTransaction = 
uno::Reference< XTransactedObject >( xTargetStorage, UNO_QUERY );
   if( xTransaction.is() )
xTransaction->commit();

/dispose them

uno::Reference< lang::XComponent > xComponent1( xSourceStorage, uno::UNO_QUERY 
);
   OSL_ENSURE( !xSourceStorage.is() || xComponent1.is(), "Wrong storage 
implementation!" );
   if ( xComponent1.is() )
xComponent1->dispose();

   uno::Reference< lang::XComponent > xComponent2( xTargetStorage, 
uno::UNO_QUERY );
   OSL_ENSURE( !xTargetStorage.is() || xComponent2.is(), "Wrong storage 
implementation!" );
   if ( xComponent2.is() )
xComponent2->dispose();

End

After the execution of filter( const Sequence< PropertyValue >& rDescriptor ),

the target file is created and the size of the file is about 7K.

But after  executing the following code in sal_Bool SfxObjectShell::SaveTo_Impl:


  // transfer data to its destinated location
  // the medium commits the storage or the stream it is based on
RegisterTransfer( rMedium );
bOk = rMedium.Commit();

the size of target file becomes 0 K.

Why? 

Is some thing wrong in my filter( const Sequence< PropertyValue >& rDescriptor 
) function?

what should I do with the XStorage ? 

Any help and sugestion in identifying the missing pieces is appreciated.

Thanks   



---
特价限量商品限时抢购,8元起!( 
http://d1.sina.com.cn/sina/limeng3/mail_zhuiyu/2007/mail_zhuiyu_20070620.html )

===
注册新浪2G免费邮箱( http://mail.sina.com.cn/chooseMode.html )

Re: [dev] RE:[dev] question about use XStorage in filter

2007-06-22 Thread Cor Nouws
Seeing all the ' ' : maybe switching from HTML to plain text might 
help?


Regards,
Cor

Mathias Bauer wrote:


The bad format is obviously caused by your mail program.

I doubt that anyone will read the bad formatted mail, at least I can't
stand it. Sorry, it's too time consuming to read it.

Please try to repost your mail with a better mail program.

My recommendation would be Thunderbird
(http://www.mozilla.com/en-US/thunderbird/).

Best regards,
Mathias

[EMAIL PROTECTED] schrieb:



Oh sorry!I don't know why the letter become so ugly.
 
Hello! 
  I'm chensuchun.I'm a newbie in devloping filter.I implement a filter for 
exporting and importing my own format file,whose format is based on odt.But I get 
some problems about filter.
the code of  function filter( const Sequence< PropertyValue >& rDescriptor 
) is following:
xDoc = uno::Reference< document::XStorageBasedDocument >( mxSrcDoc, uno::UNO_QUERY 
);  ///mxSrcDoc is set by setSourceDocument()
save to a tmp storage use filter writer8
  xSourceStorage = uno::Reference< embed::XStorage >( 
xStorageFactory->createInstance(),
   
 uno::UNO_QUERY );
  uno::Sequence< beans::PropertyValue > afArgs( 1 );
  afArgs[0].Name = ::rtl::OUString::createFromAscii( "FilterName" );
  afArgs[0].Value <<= ::rtl::OUString::createFromAscii( "writer8" );
  xDoc->storeToStorage( xSourceStorage, afArgs );
add a sub storage to the  xSourceStorage 
const ::rtl::OUString aSubStorageName ( RTL_CONSTASCII_USTRINGPARAM ( "SubStorage" ) );
   uno::Reference< embed::XStorage > xSubStorage = 
xSourceStorage->openStorageElement( aSubStorageName, embed::ElementModes::WRITE );

uno::Reference< beans::XPropertySet > xSubStoagePro( xSubStorage, 
uno::UNO_QUERY );
   xSubStoagePro->setPropertyValue( 
OUString::createFromAscii("MediaType"), makeAny(OUString::createFromAscii("SubMediaType")) );
..
///create the target storage
uno::Sequence< uno::Any > aArgs( 2 );
 aArgs[0] <<= aURL; get from rDescriptor 
 aArgs[1] <<= embed::ElementModes::READWRITE;
 uno::Reference< embed::XStorage > xTargetStorage( 
  xStorageFactory->createInstanceWithArguments( aArgs ),

   
 uno::UNO_QUERY );

copy to target storage and commit
xSourceStorage->copyToStorage( xTargetStorage );
   bRet = sal_True;
   uno::Reference< XTransactedObject > xTransaction = 
uno::Reference< XTransactedObject >( xTargetStorage, UNO_QUERY );

   if( xTransaction.is() )
xTransaction->commit();
/dispose them
uno::Reference< lang::XComponent > xComponent1( xSourceStorage, uno::UNO_QUERY 
);
   OSL_ENSURE( !xSourceStorage.is() || xComponent1.is(), "Wrong 
storage implementation!" );
   if ( xComponent1.is() )
xComponent1->dispose();
   uno::Reference< lang::XComponent > xComponent2( 
xTargetStorage, uno::UNO_QUERY );
   OSL_ENSURE( !xTargetStorage.is() || xComponent2.is(), "Wrong 
storage implementation!" );
   if ( xComponent2.is() )
xComponent2->dispose();
End
After the execution of filter( const Sequence< PropertyValue >& rDescriptor ),
the target file is created and the size of the file is about 7K.
But after  executing the following code in sal_Bool 
SfxObjectShell::SaveTo_Impl:

  // transfer data to its destinated location
  // the medium commits the storage or the stream it is based on
    RegisterTransfer( rMedium );
    bOk = rMedium.Commit();
the target file becomes 0K.
Why? 
Is some thing wrong in my filter( const Sequence< PropertyValue >& rDescriptor 
) function?
what should I do with the XStorage ? 
Any help and sugestion in identifying the missing pieces is appreciated.
Thanks   

---
特价限量商品限时抢购,8元起!( 
http://d1.sina.com.cn/sina/limeng3/mail_zhuiyu/2007/mail_zhuiyu_20070620.html )

===
注册新浪2G免费邮箱( http://mail.sina.com.cn/chooseMode.html )







--

Cor Nouws
Arnhem - Netherlands
nl.OpenOffice.org - marketing contact

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



Re: [dev] RE:[dev] question about use XStorage in filter

2007-06-22 Thread Mathias Bauer
The bad format is obviously caused by your mail program.

I doubt that anyone will read the bad formatted mail, at least I can't
stand it. Sorry, it's too time consuming to read it.

Please try to repost your mail with a better mail program.

My recommendation would be Thunderbird
(http://www.mozilla.com/en-US/thunderbird/).

Best regards,
Mathias

[EMAIL PROTECTED] schrieb:

> Oh sorry!I don't know why the letter become so ugly.
>  
> Hello! 
>   I'm chensuchun.I'm a newbie in devloping filter.I implement a filter 
> for exporting and importing my own format file,whose format is based on 
> odt.But I get some problems about filter.
> the code of  function filter( const Sequence< PropertyValue >& 
> rDescriptor ) is following:
> xDoc = uno::Reference< document::XStorageBasedDocument >( mxSrcDoc, 
> uno::UNO_QUERY );  ///mxSrcDoc is set by setSourceDocument()
> save to a tmp storage use filter writer8
>   xSourceStorage = uno::Reference< embed::XStorage >( 
> xStorageFactory->createInstance(),
>    
>  uno::UNO_QUERY );
>   uno::Sequence< beans::PropertyValue > afArgs( 1 );
>   afArgs[0].Name = ::rtl::OUString::createFromAscii( "FilterName" );
>   afArgs[0].Value <<= ::rtl::OUString::createFromAscii( "writer8" );
>   xDoc->storeToStorage( xSourceStorage, afArgs );
> add a sub storage to the  xSourceStorage 
> const ::rtl::OUString aSubStorageName ( RTL_CONSTASCII_USTRINGPARAM ( 
> "SubStorage" ) );
>    uno::Reference< embed::XStorage > xSubStorage = 
> xSourceStorage->openStorageElement(
>  aSubStorageName, embed::ElementModes::WRITE );
> uno::Reference< beans::XPropertySet > xSubStoagePro( xSubStorage, 
> uno::UNO_QUERY );
>    xSubStoagePro->setPropertyValue( 
> OUString::createFromAscii("MediaType"), 
> makeAny(OUString::createFromAscii("SubMediaType")) );
> ..
> ///create the target storage
> uno::Sequence< uno::Any > aArgs( 2 );
>  aArgs[0] <<= aURL; get from rDescriptor 
>  aArgs[1] <<= embed::ElementModes::READWRITE;
>  uno::Reference< embed::XStorage > xTargetStorage( 
>   xStorageFactory->createInstanceWithArguments(
>  aArgs ),
>    
>  uno::UNO_QUERY );
> 
> copy to target storage and commit
> xSourceStorage->copyToStorage( xTargetStorage );
>    bRet = sal_True;
>    uno::Reference< XTransactedObject > xTransaction = 
> uno::Reference< XTransactedObject >( xTargetStorage, 
> UNO_QUERY );
>    if( xTransaction.is() )
> xTransaction->commit();
> /dispose them
> uno::Reference< lang::XComponent > xComponent1( xSourceStorage, 
> uno::UNO_QUERY );
>    OSL_ENSURE( !xSourceStorage.is() || xComponent1.is(), 
> "Wrong storage implementation!" );
>    if ( xComponent1.is() )
> xComponent1->dispose();
>    uno::Reference< lang::XComponent > xComponent2( 
> xTargetStorage, uno::UNO_QUERY );
>    OSL_ENSURE( !xTargetStorage.is() || xComponent2.is(), 
> "Wrong storage implementation!" );
>    if ( xComponent2.is() )
> xComponent2->dispose();
> End
> After the execution of filter( const Sequence< PropertyValue >& rDescriptor ),
> the target file is created and the size of the file is about 7K.
> But after  executing the following code in sal_Bool 
> SfxObjectShell::SaveTo_Impl:
> 
>   // transfer data to its destinated location
>   // the medium commits the storage or the stream it is based on
>     RegisterTransfer( rMedium );
>     bOk = rMedium.Commit();
> the target file becomes 0K.
> Why? 
> Is some thing wrong in my filter( const Sequence< PropertyValue >& 
> rDescriptor ) function?
> what should I do with the XStorage ? 
> Any help and sugestion in identifying the missing pieces is appreciated.
> Thanks   
> 
> ---
> 特价限量商品限时抢购,8元起!( 
> http://d1.sina.com.cn/sina/limeng3/mail_zhuiyu/2007/mail_zhuiyu_20070620.html 
> )
> 
> ===
> 注册新浪2G免费邮箱( http://mail.sina.com.cn/chooseMode.html )


-- 
Mathias Bauer (mba) - Project Lead OpenOffice.org Writer
OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS
Please don't reply to "[EMAIL PROTECTED]".
I use it for the OOo lists and only rarely read other mails sent to it.

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



[dev] RE:[dev] question about use XStorage in filter

2007-06-22 Thread cokecola13574
Oh sorry!I don't know why the letter become so ugly.
 
Hello! 
  I'm chensuchun.I'm a newbie in devloping filter.I implement a filter for 
exporting and importing my own format file,whose format is based on odt.But I 
get some problems about filter.
the code of  function filter( const Sequence< PropertyValue >& rDescriptor 
) is following:
xDoc = uno::Reference< document::XStorageBasedDocument >( mxSrcDoc, 
uno::UNO_QUERY );  ///mxSrcDoc is set by setSourceDocument()
save to a tmp storage use filter writer8
  xSourceStorage = uno::Reference< embed::XStorage >( 
xStorageFactory->createInstance(),
   
 uno::UNO_QUERY );
  uno::Sequence< beans::PropertyValue > afArgs( 1 );
  afArgs[0].Name = ::rtl::OUString::createFromAscii( "FilterName" );
  afArgs[0].Value <<= ::rtl::OUString::createFromAscii( "writer8" );
  xDoc->storeToStorage( xSourceStorage, afArgs );
add a sub storage to the  xSourceStorage 
const ::rtl::OUString aSubStorageName ( RTL_CONSTASCII_USTRINGPARAM ( 
"SubStorage" ) );
   uno::Reference< embed::XStorage > xSubStorage = 
xSourceStorage->openStorageElement(
 aSubStorageName, embed::ElementModes::WRITE );
uno::Reference< beans::XPropertySet > xSubStoagePro( xSubStorage, 
uno::UNO_QUERY );
   xSubStoagePro->setPropertyValue( 
OUString::createFromAscii("MediaType"), 
makeAny(OUString::createFromAscii("SubMediaType")) );
..
///create the target storage
uno::Sequence< uno::Any > aArgs( 2 );
 aArgs[0] <<= aURL; get from rDescriptor 
 aArgs[1] <<= embed::ElementModes::READWRITE;
 uno::Reference< embed::XStorage > xTargetStorage( 
  xStorageFactory->createInstanceWithArguments(
 aArgs ),
   
 uno::UNO_QUERY );

copy to target storage and commit
xSourceStorage->copyToStorage( xTargetStorage );
   bRet = sal_True;
   uno::Reference< XTransactedObject > xTransaction = 
uno::Reference< XTransactedObject >( xTargetStorage, 
UNO_QUERY );
   if( xTransaction.is() )
xTransaction->commit();
/dispose them
uno::Reference< lang::XComponent > xComponent1( xSourceStorage, uno::UNO_QUERY 
);
   OSL_ENSURE( !xSourceStorage.is() || xComponent1.is(), "Wrong 
storage implementation!" );
   if ( xComponent1.is() )
xComponent1->dispose();
   uno::Reference< lang::XComponent > xComponent2( 
xTargetStorage, uno::UNO_QUERY );
   OSL_ENSURE( !xTargetStorage.is() || xComponent2.is(), "Wrong 
storage implementation!" );
   if ( xComponent2.is() )
xComponent2->dispose();
End
After the execution of filter( const Sequence< PropertyValue >& rDescriptor ),
the target file is created and the size of the file is about 7K.
But after  executing the following code in sal_Bool 
SfxObjectShell::SaveTo_Impl:

  // transfer data to its destinated location
  // the medium commits the storage or the stream it is based on
    RegisterTransfer( rMedium );
    bOk = rMedium.Commit();
the target file becomes 0K.
Why? 
Is some thing wrong in my filter( const Sequence< PropertyValue >& rDescriptor 
) function?
what should I do with the XStorage ? 
Any help and sugestion in identifying the missing pieces is appreciated.
Thanks   

---
特价限量商品限时抢购,8元起!( 
http://d1.sina.com.cn/sina/limeng3/mail_zhuiyu/2007/mail_zhuiyu_20070620.html )

===
注册新浪2G免费邮箱( http://mail.sina.com.cn/chooseMode.html )

[dev] question about use XStorage in filter

2007-06-22 Thread cokecola13574
Hello! 
  I'm chensuchun.I'm a newbie in devloping filter.I implement a filter for 
exporting and importing my own format file,whose format is based on odt.But I 
get some problems about filter.
the code of  function filter( const Sequence< PropertyValue >& rDescriptor 
) is following:
xDoc = uno::Reference< document::XStorageBasedDocument >( mxSrcDoc, 
uno::UNO_QUERY );  ///mxSrcDoc is set by setSourceDocument()
save to a tmp storage use filter writer8
  xSourceStorage = uno::Reference< embed::XStorage >( 
xStorageFactory->createInstance(),
   
 uno::UNO_QUERY );
  uno::Sequence< beans::PropertyValue > afArgs( 1 );
  afArgs[0].Name = ::rtl::OUString::createFromAscii( "FilterName" );
  afArgs[0].Value <<= ::rtl::OUString::createFromAscii( "writer8" );
  xDoc->storeToStorage( xSourceStorage, afArgs );
add a sub storage to the  xSourceStorage 
const ::rtl::OUString aSubStorageName ( RTL_CONSTASCII_USTRINGPARAM ( 
"SubStorage" ) );
   uno::Reference< embed::XStorage > xSubStorage = 
xSourceStorage->openStorageElement(
 aSubStorageName, embed::ElementModes::WRITE );
uno::Reference< beans::XPropertySet > xSubStoagePro( xSubStorage, 
uno::UNO_QUERY );
   xSubStoagePro->setPropertyValue( 
OUString::createFromAscii("MediaType"), 
makeAny(OUString::createFromAscii("SubMediaType")) );
..
///create the target storage
uno::Sequence< uno::Any > aArgs( 2 );
 aArgs[0] <<= aURL; get from rDescriptor 
 aArgs[1] <<= embed::ElementModes::READWRITE;
 uno::Reference< embed::XStorage > xTargetStorage( 
  xStorageFactory->createInstanceWithArguments(
 aArgs ),
   
 uno::UNO_QUERY );

copy to target storage and commit
xSourceStorage->copyToStorage( xTargetStorage );
   bRet = sal_True;
   uno::Reference< XTransactedObject > xTransaction = 
uno::Reference< XTransactedObject >( xTargetStorage, 
UNO_QUERY );
   if( xTransaction.is() )
xTransaction->commit();
/dispose them
uno::Reference< lang::XComponent > xComponent1( xSourceStorage, uno::UNO_QUERY 
);
   OSL_ENSURE( !xSourceStorage.is() || xComponent1.is(), "Wrong 
storage implementation!" );
   if ( xComponent1.is() )
xComponent1->dispose();
   uno::Reference< lang::XComponent > xComponent2( 
xTargetStorage, uno::UNO_QUERY );
   OSL_ENSURE( !xTargetStorage.is() || xComponent2.is(), "Wrong 
storage implementation!" );
   if ( xComponent2.is() )
xComponent2->dispose();
End
After the execution of filter( const Sequence< PropertyValue >& rDescriptor ),
the target file is created and the size of the file is about 7K.
But after  executing the following code in sal_Bool 
SfxObjectShell::SaveTo_Impl:

  // transfer data to its destinated location
  // the medium commits the storage or the stream it is based on
    RegisterTransfer( rMedium );
    bOk = rMedium.Commit();
the target file becomes 0K.
Why? 
Is some thing wrong in my filter( const Sequence< PropertyValue >& rDescriptor 
) function?
what should I do with the XStorage ? 
Any help and sugestion in identifying the missing pieces is appreciated.
Thanks   

---
特价限量商品限时抢购,8元起!( 
http://d1.sina.com.cn/sina/limeng3/mail_zhuiyu/2007/mail_zhuiyu_20070620.html )

===
注册新浪2G免费邮箱( http://mail.sina.com.cn/chooseMode.html )

Re: [dev] question on testing �0�2tools to test the stability

2007-06-01 Thread Eike Rathke
Hi Canghua,

On Wednesday, 2007-05-30 17:15:10 +0800, Canghua Qu wrote:

> Hi,All,
> 
> As we add some features and fixed some bugsof OOo, sometimes our new version 
> is unstable for unknown reason. I want to know if OOo's developers or testers 
> use any useful  testing ?0?2tools to test the stability such as memory leak. 
> And 
> How to deal with such prolbems?

You may have noticed the ongoing discussion in another tyhread on this
mailing list with subject "Can we do more regression testing?".

> BTW, any suggestion is welcomed! Thanks in advance!

You'll find information about OOo automated test tools under
http://qa.openoffice.org/ooQAReloaded/AutomationTeamsite/ooQA-TeamAutomation.html

For general code tests that detect access of memory and such please see
http://wiki.services.openoffice.org/wiki/Valgrind

If you suspect some particular class to have leaking in the sense of
instantiations not destroyed, you may temporarily derive it from class
::rtl::DebugBase, see sal/inc/osl/diagnose.hxx

Some memory leaks you only find with an adapted memory manager and good
knowledge of the application to be able to ignore false positives (not
every apparent leak is an unintended real leak). You may compile
sal/rtl/source/alloc.c with debug=t

You should also build a non-product version (configure --enable-dbgutil)
for development and use OSL_ASSURE and similar macros to gather
information about your objects. These tests are executed in product
versions. Product and non-product builds can be done from the same
source tree, the output goes into different directories (without .pro
extension for the non-pro version). However, before configuring the
non-pro, backup your existing *Env.Set* files to not have them
overwritten.

  Eike

-- 
 OOo/SO Calc core developer. Number formatter stricken i18n transpositionizer.
 OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS
 Please don't send personal mail to this [EMAIL PROTECTED] account, which I use 
for
 mailing lists only and don't read from outside Sun. Thanks.

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



[dev] question on testing �0�2tools to test the stability

2007-05-30 Thread Canghua Qu
Hi,All,

As we add some features and fixed some bugsof OOo, sometimes our new version 
is unstable for unknown reason. I want to know if OOo's developers or testers 
use any useful  testing �0�2tools to test the stability such as memory leak. 
And 
How to deal with such prolbems?

BTW, any suggestion is welcomed! Thanks in advance!

Best Regards,
Canghua

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



Re: [dev] RE:[dev] [sw-dev]question about table border line

2007-02-02 Thread Frank Meies - Sun Germany - Development - Software Engineer

Hi chensuchun,

On 02/02/07 02:52, [EMAIL PROTECTED] wrote:
 
When a table is formated with thick lines around the table and thin lines insidethe table, if you ask OO.o to add a row at the end of the table it's createdwith a thick line between it and the rest of the table instead of respecting the"thick lines around the table, thin lines inside" rule. 
I want to fix it as "thick lines around the table ,thin lines inside"after insert rows at the end of the table,but I find it is difficult to get SvxBoxInfoItem of the table in function BOOL lcl_CopyCol( const _FndBox*& rpFndBox, void* pPara ).

so I modify the insert-operation source code (in file 
sw/source/ui/shells/tabsh.cxx) as following:
 
case FN_TABLE_INSERT_COL:
case FN_TABLE_INSERT_ROW:
{ 
///-->get the SvxBoxInfoItem of the table before insert 
SfxItemSet aCoreSet( GetPool(), aUITableAttrRange); 
::lcl_TableParamToItemSet( aCoreSet, rSh ); 
SvxBoxInfoItem aBoxInfo((const SvxBoxInfoItem&) 
 aCoreSet.Get(SID_ATTR_BORDER_INNER)); 
///<--End 
///do the insert operation 
BOOL bColumn = rReq.GetSlot() == FN_TABLE_INSERT_COL; 
USHORT nCount = 0; 
BOOL bAfter = TRUE; 
if (pItem) 
{
  nCount = ((const SfxInt16Item* )pItem)->GetValue();
  if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_INSERT_AFTER, TRUE,
 &pItem))   
  bAfter = ((const SfxBoolItem* )pItem)->GetValue();  
}  
else if( !rReq.IsAPI() )   
++nCount;  
if( nCount )  
{  
if( bColumn ) 
   rSh.InsertCol( nCount, bAfter );  
else if ( !rSh.IsInRepeatedHeadline() ) 
   rSh.InsertRow( nCount, bAfter );  
bCallDone = TRUE;  
   ///-->after inserting,reset the table border according to the SvxBoxInfoItem  
   ///   get before   
   SfxItemSet aSet( GetPool(), RES_BOX, RES_BOX,

SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER,
0); 
   aSet.Put( aBoxInfo );  
   ItemSetToTableParam( aSet, rSh );  
   ///<--  
   break; 
  }
 nSlot = bColumn ? FN_TABLE_INSERT_COL_DLG : FN_TABLE_INSERT_ROW_DLG;
} 
Is this modification right,or it would cause other problem or affect other operation?How to solve this problem if the modification is wrong ? 
Thanks for help or advices!


cool, your code already looks quite good. I made some little 
modifications in order to generate only one undo event for this action:



case FN_TABLE_INSERT_COL:
case FN_TABLE_INSERT_ROW:
{
BOOL bColumn = rReq.GetSlot() == FN_TABLE_INSERT_COL;
USHORT nCount = 0;
BOOL bAfter = TRUE;
if (pItem)
{
nCount = ((const SfxInt16Item* )pItem)->GetValue();
if(SFX_ITEM_SET ==  
   pArgs->GetItemState(FN_PARAM_INSERT_AFTER, TRUE, pItem))
bAfter = ((const SfxBoolItem* )pItem)->GetValue();
}
else if( !rReq.IsAPI() )
++nCount;

if( nCount )
{
///-->get the SvxBoxInfoItem of the table before insert
SfxItemSet aCoreSet( GetPool(), aUITableAttrRange);
::lcl_TableParamToItemSet( aCoreSet, rSh );
bool bSetInnerBorders = false;
sal_uInt16 nUndoId = 0;
///<--End

if( bColumn )
{
rSh.StartUndo( UNDO_TABLE_INSCOL );
rSh.InsertCol( nCount, bAfter );
bSetInnerBorders = true;
nUndoId = UNDO_TABLE_INSCOL;
}
else if ( !rSh.IsInRepeatedHeadline() )
{
rSh.StartUndo( UNDO_TABLE_INSROW );
rSh.InsertRow( nCount, bAfter );
bSetInnerBorders = true;
nUndoId = UNDO_TABLE_INSROW;
}

bCallDone = TRUE;

   ///-->after inserting,reset the inner table borders
   if ( bSetInnerBorders )
   {
SvxBoxInfoItem aBoxInfo((const SvxBoxInfoItem&)
aCoreSet.Get(SID_ATTR_BORDER_INNER));
SfxItemSet aSet( GetPool(), SID_ATTR_BORDER_INNER,  
SID_ATTR_BORDER_INNER, 0);
aSet.Put( aBoxInfo );
ItemSetToTableParam( aSet, rSh );
rSh.EndUndo( nUndoId );
   }
   ///<--

   break;
}

nSlot = bColumn ? FN_TABLE_INSERT_COL_DLG : FN

[dev] RE:[dev] [sw-dev]question about table border line

2007-02-01 Thread cokecola13574

Sorry!
My mail editor works bad.It's difficult to make the mail easy to read.
I send the mail again.

 
Hello!
I'm chensuchun.I need some help and advices. 
 
When a table is formated with thick lines around the table and thin lines 
insidethe table, if you ask OO.o to add a row at the end of the table it's 
createdwith a thick line between it and the rest of the table instead of 
respecting the"thick lines around the table, thin lines inside" rule. 
I want to fix it as "thick lines around the table ,thin lines inside"after 
insert rows at the end of the table,but I find it is difficult to get 
SvxBoxInfoItem of the table in function BOOL lcl_CopyCol( const _FndBox*& 
rpFndBox, void* pPara ).
so I modify the insert-operation source code (in file 
sw/source/ui/shells/tabsh.cxx) as following:
 
case FN_TABLE_INSERT_COL:
case FN_TABLE_INSERT_ROW:
{ 
///-->get the SvxBoxInfoItem of the table before insert 
SfxItemSet aCoreSet( GetPool(), aUITableAttrRange); 
::lcl_TableParamToItemSet( aCoreSet, rSh ); 
SvxBoxInfoItem aBoxInfo((const SvxBoxInfoItem&) 

 aCoreSet.Get(SID_ATTR_BORDER_INNER));  
   
///<--End 
///do the insert operation 
BOOL bColumn = rReq.GetSlot() == FN_TABLE_INSERT_COL; 
USHORT nCount = 0; 
BOOL bAfter = TRUE; 
if (pItem) 
{
  nCount = ((const SfxInt16Item* )pItem)->GetValue();   
 
  if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_INSERT_AFTER, TRUE,
 &pItem))   
  bAfter = ((const SfxBoolItem* )pItem)->GetValue();  
}  
else if( !rReq.IsAPI() )   
++nCount;  
if( nCount )  
{  
if( bColumn ) 
   rSh.InsertCol( nCount, bAfter );  
else if ( !rSh.IsInRepeatedHeadline() ) 
   rSh.InsertRow( nCount, bAfter );  
bCallDone = TRUE;  
   ///-->after inserting,reset the table border according to the 
SvxBoxInfoItem  
   ///   get before   
   SfxItemSet aSet( GetPool(), RES_BOX, RES_BOX,
SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER,
0); 
   aSet.Put( aBoxInfo );  
   ItemSetToTableParam( aSet, rSh );  
   ///<--  
   break; 
  }
 nSlot = bColumn ? FN_TABLE_INSERT_COL_DLG : FN_TABLE_INSERT_ROW_DLG;   
 
} 
Is this modification right,or it would cause other problem or affect other 
operation?How to solve this problem if the modification is wrong ? 
Thanks for help or advices!
 
Kind regards!
chensuchun

---
惠普商用台式机dc5750,高性能,低功耗!( 
http://ad4.sina.com.cn/sina/limeng3/mail_zhuiyu/2006/mail_zhuiyu_20061225.html )

===
注册新浪2G免费邮箱( http://mail.sina.com.cn/chooseMode.html )

[dev] [sw-dev]question about table border line

2007-02-01 Thread cokecola13574

Hello!I'm chensuchun.I need some help and advices. When a table is formated 
with thick lines around the table and thin lines insidethe table, if you ask 
OO.o to add a row at the end of the table it's createdwith a thick line between 
it and the rest of the table instead of respecting the"thick lines around the 
table, thin lines inside" rule I want to fix it as "thick lines around the 
table ,thin lines inside"after insert rows at the end of the table,but I find 
it is difficult to get SvxBoxInfoItem of the table in function BOOL 
lcl_CopyCol( const _FndBox*& rpFndBox, void* pPara ).so I modify the 
insert-operation source code (in file sw/source/ui/shells/tabsh.cxx) as 
following:case FN_TABLE_INSERT_COL:
case FN_TABLE_INSERT_ROW:
{
 ///-->get the SvxBoxInfoItem of the table before insert
 SfxItemSet aCoreSet( GetPool(), aUITableAttrRange);
 ::lcl_TableParamToItemSet( aCoreSet, rSh );
 SvxBoxInfoItem aBoxInfo((const SvxBoxInfoItem&) 
aCoreSet.Get(SID_ATTR_BORDER_INNER));   
 
 ///<--End ///do the insert operation
 BOOL bColumn = rReq.GetSlot() == FN_TABLE_INSERT_COL;
 USHORT nCount = 0;
 BOOL bAfter = TRUE;
 if (pItem)
 {
nCount = ((const SfxInt16Item* )pItem)->GetValue();
if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_INSERT_AFTER, TRUE, 
   &pItem))
bAfter = ((const SfxBoolItem* )pItem)->GetValue();
  }
  else if( !rReq.IsAPI() )
   ++nCount;
  if( nCount )
  {
  if( bColumn )
 rSh.InsertCol( nCount, bAfter );
  else if ( !rSh.IsInRepeatedHeadline() )
 rSh.InsertRow( nCount, bAfter );
  bCallDone = TRUE;  ///-->after inserting,reset the table 
border according to the SvxBoxInfoItem  ///   get before 
  SfxItemSet aSet( GetPool(), RES_BOX, RES_BOX, 
   
   SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER,
 
   0);
  aSet.Put( aBoxInfo );
  ItemSetToTableParam( aSet, rSh );
  ///<--
  break;
 }
nSlot = bColumn ? FN_TABLE_INSERT_COL_DLG : FN_TABLE_INSERT_ROW_DLG;

} Is this modification right,or it would cause other problem or affect other 
operation?How to solve this problem if the modification is wrong ? Thanks for 
help or advices!Kind regards!chensuchun

---
惠普商用台式机dc5750,高性能,低功耗!( 
http://ad4.sina.com.cn/sina/limeng3/mail_zhuiyu/2006/mail_zhuiyu_20061225.html )

===
注册新浪2G免费邮箱( http://mail.sina.com.cn/chooseMode.html )

Re: [dev] question about add new menu item

2007-01-31 Thread Carsten Driesner
blueeagle wrote:
> Hi all,
> 
> I have some troubles with the display of the new added menu item.
> For examlpe, I want to add a menu item "WebHtml" in the file menu. I modified 
> the 
>  correlative files and added the necessary codes in those files. The result 
> is: The 
>  place of new menu item is there but the "WebHtml" is missing.
>  The files and added codes that I modified are as follows:
Hi LiuTao,


>  -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
>  svx\inc\globlmn_tmpl.hrc
>   
>  #define ITEM_FILE_OPENDOC \
>  Identifier = SID_OPENDOC ; \
>   Command = ".uno:Open" ; \
>  HelpID = SID_OPENDOC ; \
>  Text [ de ] = "��~ffnen..." ; \
>  Text [ en-US ] = "~Open..." ;\
>   Text [ x-comment ] = " "; \
>   
>  /***added begin*/ \
>  #define ITEM_FILE_WEBHTML \
>  Identifier = SID_WEBHTML ; \
>   Command = ".uno:WebHtml" ; \
>  HelpID = SID_WEBHTML ; \
>  Text [ de ] = "Web ~Html..." ; \
>  Text [ en-US ] = "Web ~Html..."; \
>   Text [ x-comment ] = "Preview Web ~Html..." ; \
>  /***added end*/ \
This is only needed for context menus. The menu bars are now specified
by xml files.
>   
>  #define ITEM_FILE_AUTOPILOT \
>  MenuItem\
>  {\
>  Identifier = SID_AUTOPILOTMENU ; \
>Command = ".uno:AutoPilotMenu" ; \
>  HelpID = SID_AUTOPILOTMENU ; \
>  Text [ de ] = "~Assistent" ; \
>  Text [ en-US ] = "A~utoPilot" ; \
>Text [ x-comment ] = " ";\
>   };
>  -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
>  sfx2\inc\sfxsids.hrc
>  #define SID_MAIL_SEND   (SID_SFX_START + 364)
>  #define SID_WEBHTML   (SID_SFX_START + 393)/*added*/
>  #define SID_MAIL_FILE   (SID_SFX_START + 365)
>  -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
Looks good.
>  sfx2\sdi\sfx.sdi
>  SfxObjectItem Open SID_OPENDOC
>  (SfxStringItem URL SID_FILE_NAME,SfxStringItem FilterName 
>  SID_FILTER_NAME,SfxStringItem OpenFlags SID_OPTIONS,SfxStringItem Password 
>  SID_PASSWORD,SfxStringItem FilterOptions SID_FILE_FILTEROPTIONS,SfxInt16Item 
> Version 
>  SID_VERSION,SfxStringItem Referer SID_REFERER)
>  [
>   /* flags: */
>   AutoUpdate = FALSE,
>   Cachable = Cachable,
>   FastCall = FALSE,
>   HasCoreId = FALSE,
>   HasDialog = TRUE,
>   ReadOnlyDoc = TRUE,
>   Toggle = FALSE,
>   Container = TRUE,
>   RecordAbsolute = FALSE,
>   RecordPerSet;
>   Asynchron;
>   
>   /* config: */
>   AccelConfig = TRUE,
>   MenuConfig = TRUE,
>   StatusBarConfig = FALSE,
>   ToolBoxConfig = TRUE,
>   GroupId = GID_APPLICATION;
>  ]
>  /**/add begin
>  SfxObjectItem WebHtml SID_WEBHTML
>  ()
>  [
>   /* flags: */
>   AutoUpdate = FALSE,
>   Cachable = Cachable,
>   FastCall = FALSE,
>   HasCoreId = FALSE,
>   HasDialog = TRUE,
>   ReadOnlyDoc = TRUE,
>   Toggle = FALSE,
>   Container = TRUE,
>   RecordAbsolute = FALSE,
>   RecordPerSet;
>   Asynchron;
>   
>   /* config: */
>   AccelConfig = TRUE,
>   MenuConfig = TRUE,
>   StatusBarConfig = FALSE,
>   ToolBoxConfig = TRUE,
>   GroupId = GID_FORMAT;
>  ]
May be the GroupId could be GID_APPLICATION.
>  /*/added end
>  //--
>  SfxObjectItem OpenHyperlink SID_OPENHYPERLINK
>  (SfxStringItem URL SID_FILE_NAME,SfxStringItem FilterName 
>  SID_FILTER_NAME,SfxStringItem OpenFlags SID_OPTIONS,SfxStringItem Password 
>  SID_PASSWORD,SfxStringItem FilterOptions D_FILE_FILTEROPTIONS,SfxInt16Item 
> Version 
>  SID_VERSION,SfxStringItem Referer SID_REFERER)
>  [
>  /* flags: */
>  AutoUpdate = FALSE,
>  Cachable = Cachable,
>  FastCall = FALSE,
>  HasCoreId = FALSE,
>  HasDialog = TRUE,
>  ReadOnlyDoc = TRUE,
>  Toggle = FALSE,
>  Container = TRUE,
>  RecordAbsolute = FALSE,
>  RecordPerSet;
>  Asynchron;
>   
>  /* config: */
>  AccelConfig = FALSE,
>  MenuConfig = FALSE,
>  StatusBarConfig = FALSE,
>  ToolBoxConfig = FALSE,
>  GroupId = GID_APPLICATION;
>  -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
>   
>  sw\uiconfig\swriter\menubar\menubar.xml
>  
> 
> 
> 
> 
> 
That's ok.

The xml file alone doesn't specify the language dependent text for the
menu entry. The are configuration files which define these language
dependent labels. Look at the "officecfg" project. It contains the
folder "registry/data/org/openoffice/Office/UI". There are two different
configuration files involved:
GenericCommands.xcu
Commands.xcu

If you add a command which is used by more than one application you
should add a node to the GenericCommands.xcu file. Otherwise to the
corresponding module dependent Commands.xcu file.
The key for the configuration entry must be the command name which, in
your case, is "WebHtml".

[dev] question about add new menu item

2007-01-31 Thread blueeagle
Hi all,

I have some troubles with the display of the new added menu item.
For examlpe, I want to add a menu item "WebHtml" in the file menu. I modified 
the 
 correlative files and added the necessary codes in those files. The result is: 
The 
 place of new menu item is there but the "WebHtml" is missing.
 The files and added codes that I modified are as follows:
 -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
 svx\inc\globlmn_tmpl.hrc
  
 #define ITEM_FILE_OPENDOC \
 Identifier = SID_OPENDOC ; \
  Command = ".uno:Open" ; \
 HelpID = SID_OPENDOC ; \
 Text [ de ] = "��~ffnen..." ; \
 Text [ en-US ] = "~Open..." ;\
  Text [ x-comment ] = " "; \
  
 /***added begin*/ \
 #define ITEM_FILE_WEBHTML \
 Identifier = SID_WEBHTML ; \
  Command = ".uno:WebHtml" ; \
 HelpID = SID_WEBHTML ; \
 Text [ de ] = "Web ~Html..." ; \
 Text [ en-US ] = "Web ~Html..."; \
  Text [ x-comment ] = "Preview Web ~Html..." ; \
 /***added end*/ \
  
 #define ITEM_FILE_AUTOPILOT \
 MenuItem\
 {\
 Identifier = SID_AUTOPILOTMENU ; \
   Command = ".uno:AutoPilotMenu" ; \
 HelpID = SID_AUTOPILOTMENU ; \
 Text [ de ] = "~Assistent" ; \
 Text [ en-US ] = "A~utoPilot" ; \
   Text [ x-comment ] = " ";\
  };
 -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
 sfx2\inc\sfxsids.hrc
 #define SID_MAIL_SEND   (SID_SFX_START + 364)
 #define SID_WEBHTML   (SID_SFX_START + 393)/*added*/
 #define SID_MAIL_FILE   (SID_SFX_START + 365)
 -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
 sfx2\sdi\sfx.sdi
 SfxObjectItem Open SID_OPENDOC
 (SfxStringItem URL SID_FILE_NAME,SfxStringItem FilterName 
 SID_FILTER_NAME,SfxStringItem OpenFlags SID_OPTIONS,SfxStringItem Password 
 SID_PASSWORD,SfxStringItem FilterOptions SID_FILE_FILTEROPTIONS,SfxInt16Item 
Version 
 SID_VERSION,SfxStringItem Referer SID_REFERER)
 [
  /* flags: */
  AutoUpdate = FALSE,
  Cachable = Cachable,
  FastCall = FALSE,
  HasCoreId = FALSE,
  HasDialog = TRUE,
  ReadOnlyDoc = TRUE,
  Toggle = FALSE,
  Container = TRUE,
  RecordAbsolute = FALSE,
  RecordPerSet;
  Asynchron;
  
  /* config: */
  AccelConfig = TRUE,
  MenuConfig = TRUE,
  StatusBarConfig = FALSE,
  ToolBoxConfig = TRUE,
  GroupId = GID_APPLICATION;
 ]
 /**/add begin
 SfxObjectItem WebHtml SID_WEBHTML
 ()
 [
  /* flags: */
  AutoUpdate = FALSE,
  Cachable = Cachable,
  FastCall = FALSE,
  HasCoreId = FALSE,
  HasDialog = TRUE,
  ReadOnlyDoc = TRUE,
  Toggle = FALSE,
  Container = TRUE,
  RecordAbsolute = FALSE,
  RecordPerSet;
  Asynchron;
  
  /* config: */
  AccelConfig = TRUE,
  MenuConfig = TRUE,
  StatusBarConfig = FALSE,
  ToolBoxConfig = TRUE,
  GroupId = GID_FORMAT;
 ]
 /*/added end
 //--
 SfxObjectItem OpenHyperlink SID_OPENHYPERLINK
 (SfxStringItem URL SID_FILE_NAME,SfxStringItem FilterName 
 SID_FILTER_NAME,SfxStringItem OpenFlags SID_OPTIONS,SfxStringItem Password 
 SID_PASSWORD,SfxStringItem FilterOptions D_FILE_FILTEROPTIONS,SfxInt16Item 
Version 
 SID_VERSION,SfxStringItem Referer SID_REFERER)
 [
 /* flags: */
 AutoUpdate = FALSE,
 Cachable = Cachable,
 FastCall = FALSE,
 HasCoreId = FALSE,
 HasDialog = TRUE,
 ReadOnlyDoc = TRUE,
 Toggle = FALSE,
 Container = TRUE,
 RecordAbsolute = FALSE,
 RecordPerSet;
 Asynchron;
  
 /* config: */
 AccelConfig = FALSE,
 MenuConfig = FALSE,
 StatusBarConfig = FALSE,
 ToolBoxConfig = FALSE,
 GroupId = GID_APPLICATION;
 -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
  
 sw\uiconfig\swriter\menubar\menubar.xml
 







刘涛

Beijing Redflag CH2000 Software Co., Ltd. 
Address: 北京亦庄经济技术开发区地盛北街 1号A区3号楼 
Postalcode: 100176 
Tel: 8610-58022828-605
Mobile: 13126869000 
Email: [EMAIL PROTECTED] 


Re: [dev] Question: UNO and D-Bus

2006-11-17 Thread Éric Bischoff
Hi Jürgen,

Le Vendredi 17 Novembre 2006 10:19, Juergen Schmidt a écrit :
> > UNO is powerful, portable, and at the core of OpenOffice.org, but it has
> > the disadvantage of not being used outside of OOo.
>
> not true, there is a bigger company (can't be named here and in fact of
> this not popular) which have chosen UNO as their component model and
> they have built their own infrastructure on top of the UNO Runtime
> Environment (URE). They have chosen UNO because of the best performance,
> best feature set, ... and the selection was based on an in-depth
> evaluation of different technologies ;-)

Yes, as I said above, UNO is powerful... But that example shows that it is far 
away from what I would call "spreading", "popular" or "widely accepted".

> > What are the plans to make OOo scriptable through d-bus?
>
> no plans so far

OK. My own order of priorities prevents me from working on this d-bus stuff in 
short or medium term. Nevertheless, we have here an opportunity for an 
unified application scripting framework, at least on Unix/Linux systems, my 
opinion is that we at OpenOffice.org should take it.


-- 
Quelle est la différence entre un rêveur, un fou et un psychanalyste ?
Le rêveur construit des châteaux dans le ciel, le fou y habite, le
psychanalyste encaisse les loyers.

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



Re: [dev] Question: UNO and D-Bus

2006-11-17 Thread Juergen Schmidt

Éric Bischoff wrote:

Hi all,


D-Bus is quickly spreading as an universal way to talk between applications on 
the Unix systems, and more particularely (but not only) the Linux platforms: 
HAL, GNOME, Avahi, udev, Beagle, Qt and KDE already use it. It is being 
ported to Windows and has bindings to many programming languages and 
environments. D-Bus is designed to be efficient and easy to use (remind 
CORBA ? ;-) ). It is mostly used on one same machine, but can be transported 
by TCP/IP. It has authentication mechanisms but no encryption so far (it must 
be tunnelled if outside of a firewall-protected area).


http://freedesktop.org/wiki/Software_2fdbus

UNO is powerful, portable, and at the core of OpenOffice.org, but it has the 
disadvantage of not being used outside of OOo.


not true, there is a bigger company (can't be named here and in fact of 
this not popular) which have chosen UNO as their component model and 
they have built their own infrastructure on top of the UNO Runtime 
Environment (URE). They have chosen UNO because of the best performance, 
best feature set, ... and the selection was based on an in-depth 
evaluation of different technologies ;-)




http://wiki.services.openoffice.org/wiki/Uno/Article/Understanding_Uno

UNO does not compare exactly to D-Bus, since UNO is a full component model 
while D-Bus is more a matter of remote method invocation. However, they can 
be used for the same thing: remote control of an application.


Here is my question:

What are the plans to make OOo scriptable through d-bus?


no plans so far

Juergen



Sorry in advance if this is already answered somewhere, I did not find it.



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



Re: [dev] Question: UNO and D-Bus

2006-11-16 Thread Kai Sommerfeld
Hi,

Éric Bischoff wrote:
> Hi all,
> 
> 
> D-Bus is quickly spreading as an universal way to talk between applications 
> on 
> the Unix systems, and more particularely (but not only) the Linux platforms: 
> HAL, GNOME, Avahi, udev, Beagle, Qt and KDE already use it. It is being 
> ported to Windows and has bindings to many programming languages and 
> environments. D-Bus is designed to be efficient and easy to use (remind 
> CORBA ? ;-) ). It is mostly used on one same machine, but can be transported 
> by TCP/IP. It has authentication mechanisms but no encryption so far (it must 
> be tunnelled if outside of a firewall-protected area).
> 
>   http://freedesktop.org/wiki/Software_2fdbus
> 
> UNO is powerful, portable, and at the core of OpenOffice.org, but it has the 
> disadvantage of not being used outside of OOo.
> 
>   http://wiki.services.openoffice.org/wiki/Uno/Article/Understanding_Uno
> 
> UNO does not compare exactly to D-Bus, since UNO is a full component model 
> while D-Bus is more a matter of remote method invocation. However, they can 
> be used for the same thing: remote control of an application.
> 
> Here is my question:
> 
>   What are the plans to make OOo scriptable through d-bus?
> 
 Speaking for SUN's StarOffice/OpenOffice.org Programmability Team (the
UNO group is part of it), at the moment there are no plans to support d-bus.

 Is someone outside SUN willing to work on this interesting topic?
Contributions would be greatly appreciated.

- Kai.



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



[dev] Question: UNO and D-Bus

2006-11-16 Thread Éric Bischoff
Hi all,


D-Bus is quickly spreading as an universal way to talk between applications on 
the Unix systems, and more particularely (but not only) the Linux platforms: 
HAL, GNOME, Avahi, udev, Beagle, Qt and KDE already use it. It is being 
ported to Windows and has bindings to many programming languages and 
environments. D-Bus is designed to be efficient and easy to use (remind 
CORBA ? ;-) ). It is mostly used on one same machine, but can be transported 
by TCP/IP. It has authentication mechanisms but no encryption so far (it must 
be tunnelled if outside of a firewall-protected area).

http://freedesktop.org/wiki/Software_2fdbus

UNO is powerful, portable, and at the core of OpenOffice.org, but it has the 
disadvantage of not being used outside of OOo.

http://wiki.services.openoffice.org/wiki/Uno/Article/Understanding_Uno

UNO does not compare exactly to D-Bus, since UNO is a full component model 
while D-Bus is more a matter of remote method invocation. However, they can 
be used for the same thing: remote control of an application.

Here is my question:

What are the plans to make OOo scriptable through d-bus?

Sorry in advance if this is already answered somewhere, I did not find it.

-- 
Quelle est la différence entre un rêveur, un fou et un psychanalyste ?
Le rêveur construit des châteaux dans le ciel, le fou y habite, le
psychanalyste encaisse les loyers.

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



Re: [dev] Question

2006-07-24 Thread Andrew Douglas Pitonyak

Hugo Pérez Bruno wrote:


Hi

How can I export data from a recordset in Visual Basic 6.0 to OOoCalc?

Thanks
Hugo


I see that you have had no answers..

First, you can not easily do this from VB. Your primary options are as 
follows:


* Export to a format supported by Calc (such as CSV)
* Write VB code to connect to OOo and then manually write the data into 
a Calc document.

* Export the data to an Excel file and then open it with Calc.

--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html

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



[dev] Question

2006-07-17 Thread Hugo Pérez Bruno

Hi

How can I export data from a recordset in Visual Basic 6.0 to OOoCalc?

Thanks
Hugo


Re: [dev] Question

2005-11-12 Thread CPHennessy
Hi Jean,

On Fri November 11 2005 18:35, Jean SUZINEAU wrote:
> Hello,
>
> I 'm about to release under LGPL a library which uses Open Office and I
> would like to get some advices before publishing it.
>
> This library allows to access OpenOffice through Ole automation from a
> program written with Borland Delphi.
> Furthermore, it allows to generate ".odt" text documents from a delphi
> dataset object.
> The ".odt" is generated from an ".ott" template which can be customized
> by the end user, by the mean of user variables and predefined styles
> (one for each column in the text tables).
> The ".ott" is generated by the library upon first execution.
>
> I would like to release this library under the LGPL licence.
> I contact you to get some advices before publishing this work.
>
> I named the package "OpenOfficeReport" but may be I should give it
> another name ?
It may be good to add "Delphi" to that name too ? Maybe 
OOoDelphiReportEngine ?
> For now I don't find any other program with this name on 
> the web.
> What is the best mean to publish this work ? For now I think I'm going
> to open a new project on SourceForge.
That seems like a reasonable way to go.

Note atht you should consider subscribing to the mailing list to see all 
responses.

-- 
CPH : openoffice.org contributor

Maybe your question has been answered already?
http://user-faq.openoffice.org/#FAQ

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



[dev] Question

2005-11-11 Thread Jean SUZINEAU

Hello,

I 'm about to release under LGPL a library which uses Open Office and I 
would like to get some advices before publishing it.


This library allows to access OpenOffice through Ole automation from a 
program written with Borland Delphi.
Furthermore, it allows to generate ".odt" text documents from a delphi 
dataset object.
The ".odt" is generated from an ".ott" template which can be customized 
by the end user, by the mean of user variables and predefined styles 
(one for each column in the text tables).

The ".ott" is generated by the library upon first execution.

I would like to release this library under the LGPL licence.
I contact you to get some advices before publishing this work.

I named the package "OpenOfficeReport" but may be I should give it 
another name ?. For now I don't find any other program with this name on 
the web.
What is the best mean to publish this work ? For now I think I'm going 
to open a new project on SourceForge.


For now you can download this library from a confidential url :
http://mars42.com/OpenOfficeReport/OpenOfficeReport_source.zip  for the 
source code
http://mars42.com/OpenOfficeReport/OpenOfficeReport.zip for the compiled 
executables
(the executables need Delphi 7 standard libraries, but I did not include 
them)


I work both as freelance and as employee for Batpro ( 
http://www.batpro.com/ ), a small company in Toulouse, France.
I use this library since autumn 2004 to produce various documents like 
invoices from delphi programs.


Yours sincerely,
Jean SUZINEAU

--
hier est ailleurs. ici est maintenant.

http://www.mars42.com :  mes pages professionnelles, astronomie & informatique



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



Re: [dev] Question about installing only a single module

2005-10-26 Thread G. Roderick Singleton
On Wed, 2005-10-26 at 13:53 +0200, Joerg Barfurth wrote:
> Hi,
> 
> G. Roderick Singleton wrote:
> > The setup guide needs to address the situation where a user wishes only
> > to install a single module, say writer. I know that the steps should be:
> >  1. Install core
> >  2. install module 
> 
> That should be sufficient. Everything else is optional - but provides 
> potentially useful functionality.
> 

[rest snipped]

Many thanks. I can now update the Guide.
-- 
PLEASE KEEP MESSAGES ON THE LIST.
OpenOffice.org Documentation Co-Lead
http://documentation.openoffice.org/ 


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



Re: [dev] Question about installing only a single module

2005-10-26 Thread Joerg Barfurth

Hi,

G. Roderick Singleton wrote:

The setup guide needs to address the situation where a user wishes only
to install a single module, say writer. I know that the steps should be:
 1. Install core
 2. install module 


That should be sufficient. Everything else is optional - but provides 
potentially useful functionality.



but what about openoffice.org-gnome-integration-2.0.0-3.i586.rpm,


Needed to get OOo to behave as a nice desktop citizen on gnome (respect 
some system preferences, etc). So installing this is still recommended 
unless you never want to run gnome.



openoffice.org-javafilter-2.0.0-3.i586.rpm,


Some import-/export filters for file formats used on some PDAs (e.g. 
PocketWord) - optional.



openoffice.org-pyuno-2.0.0-3.i586.rpm,


Support for add-ons and scripts written in python - optional.


openoffice.org-spellcheck-2.0.0-3.i586.rpm,


Without this, your writer won't do spell-checking. Recommended


openoffice.org-graphicfilter-2.0.0-3.i586.rpm,


Some filters for additional graphics file formats (e.g. flash & svg 
export) - optional (and probably only relevant for draw or impress).




openoffice.org-testtool-2.0.0-3.i586.rpm and


Needed only if you want to do qa - optional

openoffice.org-xsltfilter-2.0.0-3.i586.rpm 



More filters for xml file formats (xhtml, docbook), that showcase the 
xslt capabilities - optional




Are these optional or what and, if not, which are required to get a
functioning writer?




A functioning writer should not need any of these. For a full-featured 
writer installing spellcheck, gnome-integration and pyuno is still 
recommended.


Ciao, Jörg

--
Joerg Barfurth  Sun Microsystems - Desktop - Hamburg
>> using std::disclaimer <<<
Software Engineer [EMAIL PROTECTED]
OpenOffice.org Configuration  http://util.openoffice.org


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



[dev] question about forums

2005-09-27 Thread Hristo Simenov Hristov
Hi,
I'm wondering why these who wants to read the forums have to be registered to 
do that? Is it possible only for writing to requier registrastion?

regards
-- 
-
Hristo Simeonov Hristov
Leader of OpenOffice.org - Bulgarian
GnuPG key 0xD0D895EB: 0282 D8D0 90D3 963F E57E B0A7 2670 88D9 D0D8 95EB


Re: [dev] question about improving the speed of openning .ppt file ( delay load slide page )

2005-09-19 Thread 蒋东进
Hi,Sven Jacobi

Thanks for your reply!


- Original Message - 

> Hi,
> 
> 蒋东进 wrote:
> > Hi,all
> > 
> > I have implemented delay load slide page in impress these days. Now I 
> > can import a BIG .ppt file in several seconds.
> > Here is my way: I modify func ** sal_Bool ImplSdPPTImport::Import() **, 
> > only complete load several pages( start 4-6 pages ) at import phase, for 
> > other pages I only import their notepage, but leave their masterpage and 
> > slidepage for delay loading when those pages are realy needed,eg display or 
> > operate.
> 
> A delay load slide page mechanism might be a good thing for a PPT
> viewer, but in case you are editing the file you will not save any time
> rather it is leading to many difficulties as it is required that the
> original file is always available and you have to determine if edited
> slides have to be loaded from the original PPT document or from
> something else. Additionally import errors will occur at a very late
> time, you might get the error if you are just showing your presentation.
> 

Yes, we should make the original file available always. But we do not need pay 
more attention to it, we can get it from DrawDocShell easily( by GetMedium() ). 
What we should do is to make sure it is openned if we need import something 
from it, and to clode it if we do not need it anymore. What is your meaning of 
\"Additionally import errors\", under slide show mode I get a refresh error 
what I have said in question 1, some errors else?

> > 
> > Everything is ok but 2 questions:
> > 
> > 1. Under slide show mode, if the previous/next page is not imported, I 
> > call my import func to import its masterpage and slidepage in func ** void 
> > SlideshowImpl::slideChange() **. My import func is executed well but the 
> > page still display blank, only if I forward or backward some times, the 
> > page is updated well. So I want to know how I can update the page 
> > immediately after call my import func?
> > Under source code base 1.04, I put my import func at the frant of ** 
> > void FuSlideShow::PrepareForPage( SdPage* pPage, BOOL bInitAnimObjs ) **,it 
> > works well. Now I change my source code base to 680m104, I get the problem. 
> > 
> 
> Sorry, I don\'t know what\'s wrong here.

I have resolved the problem.In code base 680, there is a new module -- 
slideshow, it is responsible for showing the presentation. I found in func ** 
bool Presentation_Impl::prefetchSlide( sal_Int32 nPage ) **, they use bufferd 
mechanism( buffered 3 pages, previouse,current and next page ), so I import 3 
pages a time if they are unimportted in func ** void 
SlideshowImpl::slideChange() **.

> 
> > 2. When I open a .ppt file, change something and save it, I must call 
> > my import func to import all those unimported pages before export it. So 
> > even we can import a BIG .ppt file in several seconds, but it will take 
> > more time( the same as import the whole .ppt file completely ) to wait the 
> > file be saved. I found ** sal_Bool PPTWriter::ImplCreateSlide( sal_uInt32 
> > nPageNum ) ** is the func to export a slidepage, I want to know how I can 
> > only export those imported pages, for those unimported pages only copy 
> > their bytes from old file medium( inputstream ) to new file medium( 
> > outputstream )? In this way the export process will fast.
> 
> In my opinion the import of a PPT file is not finished as long as the
> original PPT document is needed. There exist the possibility to store
> changed slides only, but this requires deep knowledge of the PPT format
> and it leads to the fact that you resides on the PPT format, and this is
> something that nobody really wants.
> 

Yes, but the PPT filter is reside on the PPT format of couse. We just only 
modify some codes in class PPTWriter and will not bring some side effects. But 
I am not familiar with PPT format :)



tsmail is a mail solution, 
please visit http://www.linuxts.com

Re: [dev] question about improving the speed of openning .ppt file ( delay load slide page )

2005-09-19 Thread Sven Jacobi
Hi,

蒋东进 wrote:
> Hi,all
> 
> I have implemented delay load slide page in impress these days. Now I can 
> import a BIG .ppt file in several seconds.
> Here is my way: I modify func ** sal_Bool ImplSdPPTImport::Import() **, 
> only complete load several pages( start 4-6 pages ) at import phase, for 
> other pages I only import their notepage, but leave their masterpage and 
> slidepage for delay loading when those pages are realy needed,eg display or 
> operate.

A delay load slide page mechanism might be a good thing for a PPT
viewer, but in case you are editing the file you will not save any time
rather it is leading to many difficulties as it is required that the
original file is always available and you have to determine if edited
slides have to be loaded from the original PPT document or from
something else. Additionally import errors will occur at a very late
time, you might get the error if you are just showing your presentation.

> 
> Everything is ok but 2 questions:
>   
> 1. Under slide show mode, if the previous/next page is not imported, I 
> call my import func to import its masterpage and slidepage in func ** void 
> SlideshowImpl::slideChange() **. My import func is executed well but the page 
> still display blank, only if I forward or backward some times, the page is 
> updated well. So I want to know how I can update the page immediately after 
> call my import func?
> Under source code base 1.04, I put my import func at the frant of ** void 
> FuSlideShow::PrepareForPage( SdPage* pPage, BOOL bInitAnimObjs ) **,it works 
> well. Now I change my source code base to 680m104, I get the problem. 
>   

Sorry, I don't know what's wrong here.

> 2. When I open a .ppt file, change something and save it, I must call my 
> import func to import all those unimported pages before export it. So even we 
> can import a BIG .ppt file in several seconds, but it will take more time( 
> the same as import the whole .ppt file completely ) to wait the file be 
> saved. I found ** sal_Bool PPTWriter::ImplCreateSlide( sal_uInt32 nPageNum ) 
> ** is the func to export a slidepage, I want to know how I can only export 
> those imported pages, for those unimported pages only copy their bytes from 
> old file medium( inputstream ) to new file medium( outputstream )? In this 
> way the export process will fast.

In my opinion the import of a PPT file is not finished as long as the
original PPT document is needed. There exist the possibility to store
changed slides only, but this requires deep knowledge of the PPT format
and it leads to the fact that you resides on the PPT format, and this is
something that nobody really wants.

>   
> Thank you to read my question. Any comment and hint are welcome.
>  
> best regards,
> jiangdongjin
> 
> 
> 
> tsmail is a mail solution, 
> please visit http://www.linuxts.com

best regards,
Sven Jacobi

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



[dev] question about improving the speed of openning .ppt file ( delay load slide page )

2005-09-14 Thread 蒋东进
Hi,all

I have implemented delay load slide page in impress these days. Now I can 
import a BIG .ppt file in several seconds.
Here is my way: I modify func ** sal_Bool ImplSdPPTImport::Import() **, 
only complete load several pages( start 4-6 pages ) at import phase, for other 
pages I only import their notepage, but leave their masterpage and slidepage 
for delay loading when those pages are realy needed,eg display or operate.

Everything is ok but 2 questions:

1. Under slide show mode, if the previous/next page is not imported, I call 
my import func to import its masterpage and slidepage in func ** void 
SlideshowImpl::slideChange() **. My import func is executed well but the page 
still display blank, only if I forward or backward some times, the page is 
updated well. So I want to know how I can update the page immediately after 
call my import func?
Under source code base 1.04, I put my import func at the frant of ** void 
FuSlideShow::PrepareForPage( SdPage* pPage, BOOL bInitAnimObjs ) **,it works 
well. Now I change my source code base to 680m104, I get the problem. 

2. When I open a .ppt file, change something and save it, I must call my 
import func to import all those unimported pages before export it. So even we 
can import a BIG .ppt file in several seconds, but it will take more time( the 
same as import the whole .ppt file completely ) to wait the file be saved. I 
found ** sal_Bool PPTWriter::ImplCreateSlide( sal_uInt32 nPageNum ) ** is the 
func to export a slidepage, I want to know how I can only export those imported 
pages, for those unimported pages only copy their bytes from old file medium( 
inputstream ) to new file medium( outputstream )? In this way the export 
process will fast.

Thank you to read my question. Any comment and hint are welcome.
 
best regards,
jiangdongjin



tsmail is a mail solution, 
please visit http://www.linuxts.com

Re: [dev] question about improving the speed of openning .ppt file

2005-05-17 Thread Sven Jacobi
Thorsten Behrens wrote:
"jiangdongjin" <[EMAIL PROTECTED]> writes:

If I omit these functions, My test .ppt file opened as fast as MS
Powerpoint(maybe 1-2 seconds slower), but all my pictures are
missing.
Hi jiangdongjin,
okay, it wasn't clear to me from your original mail that delay-loading
the images is sufficient for your case (in general, it won't be
sufficient to noticeably speed up PPT import - just try a 100 slide
document with lots of polygonal content...).

So my plan is, in the load phase, I only load some basic infomation
like width and height of the picture(I think only these are
necessary for formatting), then display.After that if I really need
some pictures(display or operation), I import it from input stream.
Yes, that's a lot easier than delay-loading of the whole
document. You'd have to extend the GraphicObject to be able to swap in
from streams with a given offset (and live with the fact that some
special-casing from the PPT import might no longer work - I vaguely
remember MS putting whole GIFs into PNG chunks).
HTH,
Hi,
I also think that delay-loading of images is not so difficult to
implement, but there are some obstacles to overcome:
- some graphics are compressed some are not
- especially ole objects needs to be placed into the correct storage
  environment
- currently we do not support all graphic attributes - sometimes
  images needs to be adjusted at load time
By the way delay-loading doesn't bring any benefit if you are just
converting files into the OOo format, because then you have to wait
until the model has been converted completely.
HTH
Sven
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [dev] question about improving the speed of openning .ppt file

2005-05-17 Thread Thorsten Behrens
"jiangdongjin" <[EMAIL PROTECTED]> writes:

> If I omit these functions, My test .ppt file opened as fast as MS
> Powerpoint(maybe 1-2 seconds slower), but all my pictures are
> missing.
>
Hi jiangdongjin,

okay, it wasn't clear to me from your original mail that delay-loading
the images is sufficient for your case (in general, it won't be
sufficient to noticeably speed up PPT import - just try a 100 slide
document with lots of polygonal content...).

> So my plan is, in the load phase, I only load some basic infomation
> like width and height of the picture(I think only these are
> necessary for formatting), then display.After that if I really need
> some pictures(display or operation), I import it from input stream.
>
Yes, that's a lot easier than delay-loading of the whole
document. You'd have to extend the GraphicObject to be able to swap in
from streams with a given offset (and live with the fact that some
special-casing from the PPT import might no longer work - I vaguely
remember MS putting whole GIFs into PNG chunks).

HTH,

-- 

Thorsten

If you're not failing some of the time, you're not trying hard enough.

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



Re: [dev] question about improving the speed of openning .ppt file

2005-05-17 Thread jiangdongjin
Hi Thorsten,

- Original Message - 
From: "Thorsten Behrens" <[EMAIL PROTECTED]>
Newsgroups: openoffice.dev
To: 
Sent: Tuesday, May 17, 2005 5:38 PM
Subject: Re: [dev] question about improving the speed of openning .ppt file


> "jiangdongjin" <[EMAIL PROTECTED]> writes:
> 
> >  To my opinion, OOo impress opens .ppt file slower because of:
> >  1. It imports all contents before displays, but MS Powerpoint only
> > imports those needed;
> >  2. It create too many temp files for those pictures embeded in
> > slide pages, but MS Powerpoint do nothing about this.
> >  
> Hi jiangdongjin,
> 
> as you've found out by yourself, not streaming out the images to temp
> files hogs huge amounts of memory (and is therefore not an
> option). 
> 
> Your first item is actually the crucial point here: as our PPT import
> is just that, an import, we really have to fully read the file
> content. This is because our own, internal representation of the
> document content (the 'model') must be complete before anything can be
> displayed. There are currently no mechanisms to lazy-load only the
> first slide, and the remainder only on demand.
> 

As I mentioned :
OOo impress imports all contents before displays, but MS Powerpoint only 
imports those needed;

I have tried to change the synchronous load mechanism but I failed :)
So many things I need to know and change. 

I found when open my test .ppt file(contains many jpg or bmp pictures), the 
most time-wasted points are those functions to load picture.
i.e.
ImportGIF(...)
ImportPNG(...)
ImportJPEG(...)
ImportXBM(...)
..
If I omit these functions, My test .ppt file opened as fast as MS 
Powerpoint(maybe 1-2 seconds slower), but all my pictures are missing.
So my plan is, in the load phase, I only load some basic infomation like width 
and height of the picture(I think only these are necessary for formatting), 
then display.After that if I really need some pictures(display or operation), I 
import it from input stream.

Is my method feasible? Thanks!

best regards,
jiangdongjin

Re: [dev] question about improving the speed of openning .ppt file

2005-05-17 Thread Thorsten Behrens
"jiangdongjin" <[EMAIL PROTECTED]> writes:

>  To my opinion, OOo impress opens .ppt file slower because of:
>  1. It imports all contents before displays, but MS Powerpoint only
> imports those needed;
>  2. It create too many temp files for those pictures embeded in
> slide pages, but MS Powerpoint do nothing about this.
>  
Hi jiangdongjin,

as you've found out by yourself, not streaming out the images to temp
files hogs huge amounts of memory (and is therefore not an
option). 

Your first item is actually the crucial point here: as our PPT import
is just that, an import, we really have to fully read the file
content. This is because our own, internal representation of the
document content (the 'model') must be complete before anything can be
displayed. There are currently no mechanisms to lazy-load only the
first slide, and the remainder only on demand.

Changing that would be quite some work, as it would require large
refactorings to integrate PPT import more tightly with the drawing
layer model.

HTH,

-- 

Thorsten

If you're not failing some of the time, you're not trying hard enough.

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



[dev] question about improving the speed of openning .ppt file

2005-05-16 Thread jiangdongjin
Hi all,

These days I am doing the work to improve the speed of openning a .ppt file 
which contains many jpg or bmp pictures. 
 I found use MS Powerpoint and OOo impress to open the same .ppt file(contains 
many jpg or bmp pictures),OOo impress
 is much more slower than MS Powerpoint.In my test,MS Powerpoint open my test 
.ppt file in 3-4 seconds, but for OOo 
 it is 1-2 minutes.
 
 I have tracked the process of importing a .ppt file, here is the process:
 
 ..
 ImplSdPPTImport::Import()
 SdrPowerPointImport::ImportPage(...)
 SvxMSDffManager::ImportObj(...)
 SvxMSDffManager::ImportGraphic(...)
 SvxMSDffManager::GetBLIP(...)
 SvxMSDffManager::GetBLIPDirect(...)
 GraphicFilter::ImportGraphic(...)
 Graphic::SetLink(...) // * here save picture 
data into a temp file
 SdrGrafObj::ForceSwapOut()
 GraphicObject::FireSwapOutRequest()
 GraphicObject::ImplAutoSwapOutHdl(...)
 GraphicObject::SwapOut() //  here again swap out picture 
data to temp file
 ..
 
 To my opinion, OOo impress opens .ppt file slower because of:
 1. It imports all contents before displays, but MS Powerpoint only imports 
those needed;
 2. It create too many temp files for those pictures embeded in slide pages, 
but MS Powerpoint do nothing about this.
 
 Then I do some tests, first I omit the function Graphic::SetLink(...). In the 
case open my .ppt file(contains many jpg or
 bmp picture), the speed raise 30%-40% and only several temp files created. 
Everything looks ok except the peak memory
 is twice. Maybe too many picture data in memory?
 
 So my question is:
 1. Why we must import all things before to display it? Maybe operation speed 
will fast but load speed is too slow;
 2. Can I maintain the input sream( .ppt file stream ) all the time? So I can 
import any thing when I real need it;

 Thank you to read my question, and I need your help. Any comment and hint are 
welcome.
 
best regards,
jiangdongjin
 
 
 


 


Re: [dev] Question regarding unused code removal

2005-03-30 Thread Matt Prazak

For submitting the script using the issue tracker, it is unclear which
category is best for this type of submission.  The options appear to be
"qa", "tools", and "utilities", but a stand-alone script like this
doesn't seem to fit anywhere nicely.

Matt


--- Matt Prazak <[EMAIL PROTECTED]> wrote:
> ...
> 
> What is the best way to submit this script to OO.org for second
> opinions and to see whether it would be useful towards run-time
> optimization?
> 




__ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 

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



Re: [dev] Question regarding new Java wizards in OOo 2.0

2005-03-30 Thread Brian Raymond
On 3/30/05 2:12 AM, "Jürgen Schmidt" <[EMAIL PROTECTED]> wrote:

> Hi Brian,
> 
> if the Java look and feel for your dialog would be ok, you can simply
> use swing or awt and can use it directly from your component. If you
> prefer the same look and feel as the office then it is definitely more
> work. You can either combine Basic (Basic dialogs + some macros) and
> your Java component or you can try to design your dialog with the
> com.sun.star.awt.* toolkit and can program the dialog also directly from
> your component.
> 
I'm currently spending some time investigating those options. I'm seeing
what I can do about using com.sun.star.awt.* because I definitely like
following the OOo look and feel but you are right, it's definitely a lot of
work. If I spend a lot of time with the API docs I imagine I could do it but
I'm hunting for some code examples right now so I can make it easier to
understand. I like the concept of how the new java wizards work and I've
been bouncing around in there some more but with no documentation on the
process of how to do one from XML to source generation etc. I might punt on
that.

- Brian

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



Re: [dev] Question regarding new Java wizards in OOo 2.0

2005-03-29 Thread Jürgen Schmidt
Hi Brian,
if the Java look and feel for your dialog would be ok, you can simply 
use swing or awt and can use it directly from your component. If you 
prefer the same look and feel as the office then it is definitely more 
work. You can either combine Basic (Basic dialogs + some macros) and 
your Java component or you can try to design your dialog with the 
com.sun.star.awt.* toolkit and can program the dialog also directly from 
your component.

- Juergen
Brian Raymond wrote:
I'm currently looking at designing a multi-pane wizard for my component
because I need to allow the user to select a whole list of different options
which could insert/strip text, etc. before saving a document. This allows me
to explain to them what they are doing screen by screen and hopefully make
it easier for the less savvy users to pull it off.
I initially went the single dialog approach but things were going to get
crowded so I abandoned it. In looking through the source code for the
AgendaWizard I see what looks like generated code from XML definitions,
scripting and a few other things which together make up the wizard. I spent
some time trying to understand how it all works but realized real fast it
would take a little while to really get my hands around it.
I was wondering if anyone has more information on what I'm looking at and if
it would make sense to use that to build a wizard that would be included in
a java component?
Thanks..
- Brian
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [dev] Question regarding unused code removal

2005-03-29 Thread Matt Prazak

I ended up writing a short Bourne shell script that does the best I
know how to do when looking at just the binaries in the program/
directory.  While there is no guarantee that the reported symbols are
completely unused, they are clearly canidates for the *_DLLPRIVATE
macros.  Once made private, a per-module lint-like analysis could
finish determining whether a symbol is truly unused.

The script outputs two files.  The first file contains the symbols that
are defined but not used by any UNDEF nor used in any relocation table.
 The second file contains symbols that are defined but are used only
within a relocation table (i.e., only the defining binary uses it).

These results might be useful towards run-time linking optimization, as
the first file reports about 15,000 symbols and the second file reports
about 47,000 symbols that could be made private.  Given that there are
over 100,000 symbols exported in all the binaries, this means there is
a potential for reducing the number of exported symbols by several
percent.  I hesitate to say the full 15,000 could be privatized,
because many of the unused symbols are constructors, for example, which
probably have an intended purpose.

What is the best way to submit this script to OO.org for second
opinions and to see whether it would be useful towards run-time
optimization?





__ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 

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



[dev] Question regarding new Java wizards in OOo 2.0

2005-03-29 Thread Brian Raymond
I'm currently looking at designing a multi-pane wizard for my component
because I need to allow the user to select a whole list of different options
which could insert/strip text, etc. before saving a document. This allows me
to explain to them what they are doing screen by screen and hopefully make
it easier for the less savvy users to pull it off.

I initially went the single dialog approach but things were going to get
crowded so I abandoned it. In looking through the source code for the
AgendaWizard I see what looks like generated code from XML definitions,
scripting and a few other things which together make up the wizard. I spent
some time trying to understand how it all works but realized real fast it
would take a little while to really get my hands around it.

I was wondering if anyone has more information on what I'm looking at and if
it would make sense to use that to build a wizard that would be included in
a java component?

Thanks..

- Brian

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



Re: [dev] Re:[dev] Question regarding unused code removal

2005-03-22 Thread Matt Prazak

Your approach appears more throrough than what I've been attempting. 
My hypothesis so far is that a fair amount of information can be
obtained straight from the binaries in the program/ directory without
analyzing the source code.

One thing I've learned is that the the ELF symbol tables and relocation
tables do provide a lot of information, including revealing some of the
symbols that are used internally within the binaries.  However, there
is a lot of room for source-based analysis like your tool or the
commercial C++ lint tools.

Matt

--- Caolan McNamara <[EMAIL PROTECTED]> wrote:
> 
> FWIW here's the approach I took to find unused code, scrape the
> compiler output to get what functions were defined and which were
> called, detect virtual methods and ignore those
> http://www.skynet.ie/~caolan/Packages/callcatcher.html
> 
> 
> C.





__ 
Do you Yahoo!? 
Yahoo! Mail - You care about security. So do we. 
http://promotions.yahoo.com/new_mail

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



Re: [dev] Re:[dev] Question regarding unused code removal

2005-03-21 Thread Caolan McNamara
On Fri, 2005-03-18 at 17:08 -0800, Matt Prazak wrote:
> Thanks for the information, it is quite helpful.  It seems my approach
> so far is a start, but more definitely needs to be done to filter out
> the internally-used symbols.  A good result would be a shell script
> that automates all the details below and returns a few thousand symbols
> as canidates for removal.  If it works, then the script could be
> occasionally run against the code base as a way to check code growth.

FWIW here's the approach I took to find unused code, scrape the compiler
output to get what functions were defined and which were called, detect
virtual methods and ignore those
http://www.skynet.ie/~caolan/Packages/callcatcher.html


C.



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



Re: [dev] Re:[dev] Question regarding unused code removal

2005-03-18 Thread Matt Prazak

Thanks for the information, it is quite helpful.  It seems my approach
so far is a start, but more definitely needs to be done to filter out
the internally-used symbols.  A good result would be a shell script
that automates all the details below and returns a few thousand symbols
as canidates for removal.  If it works, then the script could be
occasionally run against the code base as a way to check code growth.

Matt

--- Jens-Heiner Rechtien <[EMAIL PROTECTED]> wrote:

> Hi Matt,
> 
> your approach is flawed in the way that a symbol which is defined
> *and* used in one shared library is not flagged "UNDEF" in this 
> library, but still be exported from the library if it's possibly used
> elsewhere. Thus you get a lot of exported symbols without equivalent 
> "UNDEF" for shared  library internal stuff.
> 
> This is an unfortunate consequence of the C++ standard which has no 
> concept of shared library "internal" classes/methods/functions.
> 
> We do something about this: Please look for all the *_DLLPUBLIC and 
> *_DLLPRIVATE macros in our headers. These macros use non standard 
> compiler extensions to mark symbols as "public" or "hidden". "Hidden"
> 
> symbols will not be exported from a shared library. This has at least
> 
> three benefits: a better API definition (think of encapsulation), 
> smaller binaries and last not least better startup performance
> because relocations are cheaper if direct binding can be used.
> 
> There is a great paper about the working of shared libraries by
> Ulrich Drepper: http://people.redhat.com/drepper/dsohowto.pdf
> 
> We probably got quite a bit of dead code in OOo but it is not easily 
> found. I think the best approach would be to do some extensive
> coverage studies, identify possibly dead code, use a cross referencer
> to find all 
> references whrere a symbol is used and determine if this is also dead
> 
> code. The call to remove the dead code must then be made by the 
> responsible developer, only he/she can tell if that symbol may not 
> possibly be referenced by some code outside OOo (ie a third party 
> component).
> 
> HTH,
>Heiner
> 
> 




__ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 

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



Re: [dev] Re:[dev] Question regarding unused code removal

2005-03-18 Thread Jens-Heiner Rechtien
Hi Matt,
your approach is flawed in the way that a symbol which is defined *and* 
used in one shared library is not flagged "UNDEF" in this library, but 
still be exported from the library if it's possibly used elsewhere. Thus 
you get a lot of exported symbols without equivalent "UNDEF" for shared 
library internal stuff.

This is an unfortunate consequence of the C++ standard which has no 
concept of shared library "internal" classes/methods/functions.

We do something about this: Please look for all the *_DLLPUBLIC and 
*_DLLPRIVATE macros in our headers. These macros use non standard 
compiler extensions to mark symbols as "public" or "hidden". "Hidden" 
symbols will not be exported from a shared library. This has at least 
three benefits: a better API definition (think of encapsulation), 
smaller binaries and last not least better startup performance because 
relocations are cheaper if direct binding can be used.

There is a great paper about the working of shared libraries by Ulrich 
Drepper: http://people.redhat.com/drepper/dsohowto.pdf

We probably got quite a bit of dead code in OOo but it is not easily 
found. I think the best approach would be to do some extensive coverage 
studies, identify possibly dead code, use a cross referencer to find all 
references whrere a symbol is used and determine if this is also dead 
code. The call to remove the dead code must then be made by the 
responsible developer, only he/she can tell if that symbol may not 
possibly be referenced by some code outside OOo (ie a third party 
component).

HTH,
  Heiner
Matt Prazak wrote:
--- Laurent David <[EMAIL PROTECTED]> wrote:
Wouldn't it be a problem with virtual methods ?
I had some problem figuring out what was actually executed when using
XML filter: it goes from the swlib to xmloff library (I don't
remember the name of the actual .so, sorry...) back and forth via
some virtual methods, the only way I found to be sure of it on was
to make some trace with a debugger,
because a simple static analysis of the code didn't give me any good
result.
If you have another method, it will be much appreciated because it
was really a painful experience :(
My opinion is that OpenOffice is a very good product but it is still
very "closed" in term of knowledge of its internal : not a lot of
comment in the sources, no available conception document (the 
information of the SDK can be very helpful but has its limits)...
I know that I am asking a lot but in some ways
it could be good to make an effort in this direction in order to get
more people to be involved in development. Cleaning up the code and
especially removing the dead and/or the duplicate code could be a
great part of solution.
I wish you the best in your search of the "losts symbols" :)

Laurent

Well, I'm still learning about this.  The current method I'm working on
is to use the elfdump utility in Solaris to extract the symbol tables
from all the *.so* and *.bin files in the program/ directory, then
extract the UNDEF and non-UNDEF entries into two text files, grep out
all the symbols I think can be ignored, and generate a list of all the
defined symbols that don't have UNDEF counterparts.  Right now, I have
a shell script that attempts to do this.  Unfortunately, the best I've
done so far indicates about 66,000 unused symbols (an improvement over
75K, though).
I'm not sure if this approach is flawed in some ways, but it seemed
like the most direct approach to the problem.  If anyone knows more
about ELF binaries, a critique of the above approach would be helpful,
especially since my knowledge of C++ is pretty stale.
Matt

		
__ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 

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

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


Re: [dev] Re:[dev] Question regarding unused code removal

2005-03-17 Thread Matt Prazak

--- Laurent David <[EMAIL PROTECTED]> wrote:
> Wouldn't it be a problem with virtual methods ?
> I had some problem figuring out what was actually executed when using
> XML filter: it goes from the swlib to xmloff library (I don't
> remember the name of the actual .so, sorry...) back and forth via
> some virtual methods, the only way I found to be sure of it on was
> to make some trace with a debugger,
> because a simple static analysis of the code didn't give me any good
> result.
> If you have another method, it will be much appreciated because it
> was really a painful experience :(
> My opinion is that OpenOffice is a very good product but it is still
> very "closed" in term of knowledge of its internal : not a lot of
> comment in the sources, no available conception document (the 
> information of the SDK can be very helpful but has its limits)...
> I know that I am asking a lot but in some ways
> it could be good to make an effort in this direction in order to get
> more people to be involved in development. Cleaning up the code and
> especially removing the dead and/or the duplicate code could be a
> great part of solution.
> I wish you the best in your search of the "losts symbols" :)
> 
> Laurent
> 

Well, I'm still learning about this.  The current method I'm working on
is to use the elfdump utility in Solaris to extract the symbol tables
from all the *.so* and *.bin files in the program/ directory, then
extract the UNDEF and non-UNDEF entries into two text files, grep out
all the symbols I think can be ignored, and generate a list of all the
defined symbols that don't have UNDEF counterparts.  Right now, I have
a shell script that attempts to do this.  Unfortunately, the best I've
done so far indicates about 66,000 unused symbols (an improvement over
75K, though).

I'm not sure if this approach is flawed in some ways, but it seemed
like the most direct approach to the problem.  If anyone knows more
about ELF binaries, a critique of the above approach would be helpful,
especially since my knowledge of C++ is pretty stale.

Matt





__ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 

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



Re: [dev] Re:[dev] Question regarding unused code removal

2005-03-17 Thread Laurent David

- Original Message -
From: "Matt Prazak" <[EMAIL PROTECTED]>
To: 
Sent: Thursday, March 17, 2005 5:00 PM
Subject: Re: [dev] Re:[dev] Question regarding unused code removal


>
> Thanks for the replies.  Actually, the number is more like 75,000.  I
> think I read the wrong number yesterday to get the 85,000.  I did
> include all the WEAK references from elfdump, and it looks like
> eliminating them might take out another 7,000 symbols.  Also, I'll feed
> in the .bin files, which will knock out some more.
>
> I'm using Solaris 10 and Studio 10, so I guess the GCC symbols won't
> apply.  Sidenote:  compiling on Solaris10/Studio10 was pretty tricky,
> especially since I was trying to use --enable-debug at first (notes
> about this are under issue 42285 at the oo.org website).
>
> One thing is that some symbols appear to be part of the normal class
> interfaces (e.g., constructors) that are unused but probably shouldn't
> be removed, so the only thing I can think would work reliably is to go
> through each canidate symbol and determine via find/grep where it
> occurs and whether it is important.
>
> Over the next few days, I'll see if the number of symbols can be shrunk
> further.
>
> Matt
Wouldn't it be a problem with virtual methods ?
I had some problem figuring out what was actually executed when using XML
filter: it goes
from the swlib to xmloff library (I don't remember the name of the actual
.so, sorry...) back and forth via some virtual methods, the
only way I found to be sure of it on was to make some trace with a debugger,
because a simple static analysis of the code didn't give me any good result.
If you have another method, it will be much appreciated because it was
really a painful experience :(
My opinion is that OpenOffice is a very good product but it is still very
"closed" in term of knowledge of its internal : not a lot of comment in the
sources, no available conception document (the information of the SDK can be
very helpful but has its limits)... I know that I am asking a lot but in
some ways
it could be good to make an effort in this direction in order to get more
people to be involved in development. Cleaning up the code and especially
removing the dead and/or the duplicate code could be a great part of
solution.
I wish you the best in your search of the "losts symbols" :)

Laurent



-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.7.3 - Release Date: 15/03/2005


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



Re: [dev] Re:[dev] Question regarding unused code removal

2005-03-17 Thread Matt Prazak

Thanks for the replies.  Actually, the number is more like 75,000.  I
think I read the wrong number yesterday to get the 85,000.  I did
include all the WEAK references from elfdump, and it looks like
eliminating them might take out another 7,000 symbols.  Also, I'll feed
in the .bin files, which will knock out some more.

I'm using Solaris 10 and Studio 10, so I guess the GCC symbols won't
apply.  Sidenote:  compiling on Solaris10/Studio10 was pretty tricky,
especially since I was trying to use --enable-debug at first (notes
about this are under issue 42285 at the oo.org website).

One thing is that some symbols appear to be part of the normal class
interfaces (e.g., constructors) that are unused but probably shouldn't
be removed, so the only thing I can think would work reliably is to go
through each canidate symbol and determine via find/grep where it
occurs and whether it is important.

Over the next few days, I'll see if the number of symbols can be shrunk
further.

Matt

--- "marius.david" <[EMAIL PROTECTED]> wrote:

> Hi,
> 
> 85, 000 symbols seems to be a lot. But, maybe ...I noticed that lot
> of code need to be cleaned up (I am talking about 1.1.2, I've no idea
> about 2.0).
> It would be a good idea to remove unused code some day because,
> without talking about performances, it can be really misleading for
> the newcomer (I remember having spend a lot of time finding if some
> portions of code were or were not used, ending up with the
> debugger...).
> 
> 
> Laurent
> 
> Accédez au courrier électronique de La Poste : www.laposte.net ; 
> 3615 LAPOSTENET (0,34€/mn) ; tél : 08 92 68 13 50 (0,34€/mn)
> 
> 

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



[dev] Re:[dev] Question regarding unused code removal

2005-03-17 Thread marius\.david


> At http://tools.openoffice.org/performance/index.html, there is a
> mention about unused code removal as a way of improving OO.org. Out of
> curiosity, I managed to generate a list of about 85,000 symbols from
> the program/ directory that have definitions but no corresponding UNDEF
> entries in the shared libraries (this is excluding "external" code like
> icu).
>
> (I just realized that I need to include .bin files, too, so the 85,000
> can probably be reduced somewhat)
>
> The main problem with this, however, is that this is really a big
> number of symbols to go through. Are there any guidelines or
> suggestions for how to find a starting point? If this is workable and
> I find something probably worth removing, is it best to simply nominate
> that function for removal or is it better to submit a patch that strips
> it out?
Hi,

85, 000 symbols seems to be a lot. But, maybe ...I noticed that lot of code 
need to be cleaned up (I am talking about 1.1.2, I've no idea about 2.0).
It would be a good idea to remove unused code some day because, without talking 
about performances, it can be really misleading for the newcomer (I remember 
having spend a lot of time finding if some portions of code were or were not 
used, ending up with the debugger...).


Laurent

Accédez au courrier électronique de La Poste : www.laposte.net ; 
3615 LAPOSTENET (0,34€/mn) ; tél : 08 92 68 13 50 (0,34€/mn)



Re: [dev] Question regarding unused code removal

2005-03-16 Thread Stephan Bergmann
Matt Prazak wrote:
At http://tools.openoffice.org/performance/index.html, there is a
mention about unused code removal as a way of improving OO.org.  Out of
curiosity, I managed to generate a list of about 85,000 symbols from
the program/ directory that have definitions but no corresponding UNDEF
entries in the shared libraries (this is excluding "external" code like
icu).
(I just realized that I need to include .bin files, too, so the 85,000
can probably be reduced somewhat)
Some more reasons why the number is that high but (some of) the symbols 
in question might nevertheless denote used code:

-  If you are doing this on Linux, and are including weak definitions, 
you will get lots of symbols that are (by necessity) exported weakly 
from multiple objects, like the _ZTI* symbols needed for proper GCC 
exception handling.

-  The default linking behaviour on Unix is that if some non-static 
C/C++ function is only used internally within an object (shared object 
or executable), it is nevertheless exported from that object.  Some 
parts of OOo use this default behaviour.

-Stephan
The main problem with this, however, is that this is really a big
number of symbols to go through.  Are there any guidelines or
suggestions for how to find a starting point?  If this is workable and
I find something probably worth removing, is it best to simply nominate
that function for removal or is it better to submit a patch that strips
it out?
Matt
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [dev] Question regarding unused code removal

2005-03-16 Thread Martin Hollmichel
Hi Matt,
I think you will be surprised how much less symbols you will get after 
including the .bin files, just because these are the starting points :)

Martin
Matt Prazak wrote:
At http://tools.openoffice.org/performance/index.html, there is a
mention about unused code removal as a way of improving OO.org.  Out of
curiosity, I managed to generate a list of about 85,000 symbols from
the program/ directory that have definitions but no corresponding UNDEF
entries in the shared libraries (this is excluding "external" code like
icu).
(I just realized that I need to include .bin files, too, so the 85,000
can probably be reduced somewhat)
The main problem with this, however, is that this is really a big
number of symbols to go through.  Are there any guidelines or
suggestions for how to find a starting point?  If this is workable and
I find something probably worth removing, is it best to simply nominate
that function for removal or is it better to submit a patch that strips
it out?
Matt
__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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

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


[dev] Question regarding unused code removal

2005-03-16 Thread Matt Prazak
At http://tools.openoffice.org/performance/index.html, there is a
mention about unused code removal as a way of improving OO.org.  Out of
curiosity, I managed to generate a list of about 85,000 symbols from
the program/ directory that have definitions but no corresponding UNDEF
entries in the shared libraries (this is excluding "external" code like
icu).

(I just realized that I need to include .bin files, too, so the 85,000
can probably be reduced somewhat)

The main problem with this, however, is that this is really a big
number of symbols to go through.  Are there any guidelines or
suggestions for how to find a starting point?  If this is workable and
I find something probably worth removing, is it best to simply nominate
that function for removal or is it better to submit a patch that strips
it out?


Matt


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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