Re: [dev] Specifications - summary suggestions ...

2006-11-13 Thread Michael Meeks
Hi Joerg,

On Tue, 2006-11-07 at 12:40 +0100, Joerg Sievers wrote:
  + specifications are critical for (at a minimum):
  + file formats
  + complex / unfamiliar behaviours

 + behaviour changes affecting other's work (e.g. the automated
 gui testing is extremely dependent to the basics of OOo)

hokay - well, this can easily be amortised by partitioning the tests
such that it is easy/fast to run the tests on the piece of GUI code you
changed to verify they are still perfect before marking the CWS 'Ready
for QA', and/or writing guidelines on how best to avoid breaking the GUI
test tool, and/or improving the GUI test tool  code so it is less
fragile under test :-) [ string names for key widgets eg. ]. Clearly a
situation where the regression tests are fragile over small UI changes,
require lots of maintenance and produce lots of false positives is in
no-one's interest. Presumably also getting lots of developers to run the
tests themselves  try to analyse the output may result in more interest
in improving the test framework itself.

  + we need to be able to execute these way more
quickly:  ~2 hours, to get yes/no answers on
individual CWS' faster.
 
 On it's way, You can directly contact me for an update.

Great; that's good news indeed; thank you.

  + Wiki
  + using a wiki for specs allows easier spec editing
and construction and maintenance
 
 Don't think so, but there is now one. Try to design UI in it and you 
 will love .odt :-)

As I've said before, I am certain that the process of designing a UI is
best done either in a UI Engineers head, or on some paper, or even
better with several iterative prototype models and filmed  analysed
studies of test subjects using each etc. The spec. document should not
be used as part of a workflow, but -only- to communicate relevant
information about the finished result to interested parties; hence my
desire to remove the IMHO unhelpful iTeaming aspect.

HTH,

Michael.

-- 
 [EMAIL PROTECTED]  , Pseudo Engineer, itinerant idiot


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



Re: [dev] Unicode---Give us all of it!

2006-11-13 Thread Stephan Bergmann

Niklas Nebel wrote:

Philipp Lohmann - Sun Germany wrote:
Wouldn't that be more or less any occurence of sal_Unicode? There's 
hundreds of them in Calc alone.


That depends probably on the details. If for example you are searching 
for ansi1252 code characters in a unicode string (e.g. '/' for URL or 
filename parsing springs to mind), then you need not change that code 
since those codes do not coincide with the possible surrogate values. 
I guess many instances may fall into that category where searching for 
a known constant unicode is concerned.


Hundreds to look through, still quite a lot to actually change (text 
import/export, parsing, input handling, ...).


I doubt that it is that many places that need to be changed.  (For 
example, what do you think needs to be done for text import/export?) 
To quote from an article 
(http://java.sun.com/j2se/JM_White_Paper_R6A.pdf) that details what 
needs to be done when migrating to supplementary character (i.e.,  
U+) support in Java 5:


• You do not have to change — Applications that deal with text only in 
the form of char sequences in all forms (char[], implementations of 
java.lang.CharSequence, implementations of java.text.CharacterIterator), 
and only use Java APIs that accept and return such char sequences. In 
these cases, the implementation of the Java platform APIs handles 
supplementary characters for you.


• You do not have to change — Applications that interpret individual 
characters; pass individual characters to Java platform APIs; or call 
methods that return individual characters, when supplementary characters 
are not processed. For example, if an application scans a char sequence 
for HTML tags, checking each char individually, it knows that those tags 
only use characters from the Basic Latin block, so no supplementary 
characters will not be processed-even if supplementary characters are 
included in the UTF-16 based char sequence.


• You do have to change — Applications that interpret individual 
characters; pass individual characters to Java platform APIs; or call 
methods that return individual characters when those character values 
can include supplementary characters.


However if we were to change the underlying format of OUString, then 
also these cases would possibly have to be adjusted; e.g. UTF-8 leaves 
only true ascii (128) values as a single encoded character (one byte 
in that case).


However if i'm not mistaken, changing OUString from 2 byte values will 
not be possible since it would change UNO protocol incompatibly, yes ?


I'm not saying it can't be changed as Stephan suggested, I'm just 
wondering if we really need a long list first.


I think it will be a list of features (like Insert - Special 
Character... dialog in Writer, sal/textenc code to translate between 
UTF-8 and UTF-16), not of individual code lines that use sal_Unicode. 
Starting such a list early could give people examples of where changes 
will be necessary, so that they can think more easily about their 
potential contributions to that list.


-Stephan


Niklas


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



Re: [dev] Bad PRJNAMEs

2006-11-13 Thread Frank Schönheit - Sun Microsystems Germa ny
Hi Stephan,

 Attached are two quick and dirty scripts that worked for me (within 
 Hamburg build environment on a Linux box) to find all the places where 
 PRJNAME is probably set wrongly (see below).  Feel free to fix those you 
 feel responsible for.

In case nobody already volunteered to fix the zillions of offapi-located
occurances, I do so. (which probably is better than lots of people
adding this module to their own CWS.)

Ciao
Frank

-- 
- Frank Schönheit, Software Engineer [EMAIL PROTECTED] -
- Sun Microsystems  http://www.sun.com/staroffice -
- OpenOffice.org Database   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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



[dev] updating database form controls on events

2006-11-13 Thread tofergus
what i'm looking to do is pretty obvious stuff but really struggling to
find a way.

basically i have a database form that i want to insert a combobox into.
 that combobox will contain entries from a database field.

those steps are easy via the oobase2 interface.

next i want call out to a java function when the combobox is updated.
this script will lookup the primary key of the selected item and update
another, bound control on the form to the correct value.  hopefully
this will update the database.

there are only two objects available from the script event.  the event
and the script context.

i therefore have the event and the document.

it would therefore seem simple to access the document (via script
context) to get the Forms root or access the form via the event source
(via the event).  i could then search the form for the other control
and update it with the necessary value.

unfortunately, as the database document does not seem to support the
the DrawPage interface (presumably because the actual form appears to
be a writer document) i am unable to figure out how to obtain the Forms
root  or even better just the form node i need, so that i may
locate the second, bound, control item.

option two was to find the parent of the control which would presumably
be the form and search for the required peer item.  this also appears
impossible as the control is not actually a FormComponent.

my current thinking is that, if i get the component context then i
could instantiate (via XMultiServiceFactory) the Forms service and thus
the Forms root.  if this is the correct route i need some help in doing
it as i fail to understand the service instantiation service correctly
(in this context at least) ... i.e. does this actually create the Forms
root, and if so what service name do i need to use cause
com.sun.star.form.Forms doesn't appear to be it.

perhaps there is an easier way to bind one field value to a combobox
and display the list from another field but i cannot find it.  tried
using a select statement that returns two fields but no joy.

anyway, any guidance much appreciated.

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



Re: [dev] Unicode---Give us all of it!

2006-11-13 Thread Niklas Nebel

Stephan Bergmann wrote:
I doubt that it is that many places that need to be changed.  (For 
example, what do you think needs to be done for text import/export?) 


The obvious changes for text import:
- Separator characters are user-supplied, so they can no longer be 
handled as a sal_Unicode.
- Where fixed field width is used, characters instead of code units have 
to be counted.
The less obvious ones start to appear once you look through the details 
of implementations like the preview in the dialog.


Niklas

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



Re: [dev] Bad PRJNAMEs

2006-11-13 Thread Stephan Bergmann

Frank Schönheit - Sun Microsystems Germany wrote:

Hi Stephan,

Attached are two quick and dirty scripts that worked for me (within 
Hamburg build environment on a Linux box) to find all the places where 
PRJNAME is probably set wrongly (see below).  Feel free to fix those you 
feel responsible for.


In case nobody already volunteered to fix the zillions of offapi-located
occurances, I do so. (which probably is better than lots of people
adding this module to their own CWS.)

Ciao
Frank


I am not yet aware of anybody else volunteering, so go ahead Frank.

-Stephan

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



Re: [dev] Unicode---Give us all of it!

2006-11-13 Thread Stephan Bergmann

Michael Meeks wrote:
[...]
Use sal_uInt32 to represent individual Unicode encoded characters and 
add any necessary base functionality to rtl::OUString (e.g., operating 
on the individual Unicode encoded characters represented by an instance 
of rtl::OUString).


There's no chance then of switching to UTF-8 as an underlying string
representation :-) and saving a measurable chunk of our string
overhead ?


I doubt that we can get the whole of OOo behind such a change.  For one, 
changing rtl::OUString in any way would be incompatible.  For another, 
using rtl::OString + RTL_TEXTENCODING_UTF8 instead of rtl::OUString 
would be a huge amount of work.  But, you are right, the problems with 
UTF-16 that my original posting tries to address are similar to the 
problems with UTF-8 (only, with UTF-8 they are much more apparent).


-Stephan


Interesting mail anyhow,

Regards,

Michael.


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



Re: [dev] Unicode---Give us all of it!

2006-11-13 Thread Stephan Bergmann

Niklas Nebel wrote:

Stephan Bergmann wrote:
I doubt that it is that many places that need to be changed.  (For 
example, what do you think needs to be done for text import/export?) 


The obvious changes for text import:
- Separator characters are user-supplied, so they can no longer be 
handled as a sal_Unicode.


Speaking about matching strings:  Canonical-equivalent 
(http://www.unicode.org/versions/Unicode4.0.0/ch03.pdf, D24) Unicode 
sequences (e.g., U+006F LATIN SMALL LETTER O, U+0308 COMBINING 
DIAERESIS is canonical-equivalent to U+00F6 LATIN SMALL LETTER O WITH 
DIAERESIS should be treated as being identical.  So when a 
user-supplied separator is specified as U+006F,U+0308, it should match 
U+00F6 in the imported text, and vice versa.  (This is probably 
handled most easily by converting all input to some Unicode 
Normalization Form.)  Whether you want to address this issue together 
with or independent of the surrogates issue I cannot say.


- Where fixed field width is used, characters instead of code units have 
to be counted.


I don't know, but fixed to N characters might or might not be as 
useful/useless a concept as fixed to N UTF-16 code units.


-Stephan

The less obvious ones start to appear once you look through the details 
of implementations like the preview in the dialog.


Niklas


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



[dev] Loading an unregistered CSV-database in OOo-Basic

2006-11-13 Thread Daniel Albuschat

Hello,

my goal is to load an unregistered CSV-database in an OOo-Basic script, but so
far I failed with my attempts. According to the AndrewBase.odt
document, Listings 29
and 30, it should be easily possible to load a database without
registering it first, if you
use an URL.
This works fine with OOo-Databases and possibly others, but it does
not work with
CSV-files.
Here's the script-snippet:

Service = createUnoService(com.sun.star.sdb.DatabaseContext)
DS = Service.GetByName(file:///C:/Test2.csv)
Interaction = createUnoService(com.sun.star.sdb.InteractionHandler)
Con = DS.ConnectWithCompletion(Interaction)

It works fine if I use e.g. file:///C:/TestDatabase.odb instead of the
Test2.csv.
With CSV-files it gives me an error like There's no sdbc-driver for
the external
data source[...] (Don't know the exact message, since I use a german localized
version).

I've tried many various things now, e.g. connecting thru a certain
driver for flat-files, etc.
When connecting with an XDriver, the connect() method simply returns
NULL, hence I
don't know what's wrong with it.

I hope you can help me.

Regards,
  Daniel Albuschat

--
eat(this); // delicious suicide

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



Re: [dev] Loading an unregistered CSV-database in OOo-Basic

2006-11-13 Thread Peter Eberlein

Hi Daniel,

Daniel Albuschat schrieb:

Hello,

my goal is to load an unregistered CSV-database in an OOo-Basic script, 
but so

far I failed with my attempts. According to the AndrewBase.odt
document, Listings 29
and 30, it should be easily possible to load a database without
registering it first, if you
use an URL.
This works fine with OOo-Databases and possibly others, but it does
not work with
CSV-files.
Here's the script-snippet:

Service = createUnoService(com.sun.star.sdb.DatabaseContext)


you have to use the com.sun.star.sdbc.DriverManager for those purposes.
In the Dev-Guide you will found how to connect with flat files.

Regards

Peter




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



Re: [dev] Loading an unregistered CSV-database in OOo-Basic

2006-11-13 Thread Daniel Albuschat

2006/11/13, Peter Eberlein [EMAIL PROTECTED]:

Daniel Albuschat schrieb:
 my goal is to load an unregistered CSV-database in an OOo-Basic script,
 but so
 far I failed with my attempts.

[snip]

 Service = createUnoService(com.sun.star.sdb.DatabaseContext)

you have to use the com.sun.star.sdbc.DriverManager for those purposes.
In the Dev-Guide you will found how to connect with flat files.


Thanks for your fast reply. I've already tried using a specific driver for this.
Here's the code I've put together:

aDriver = createUnoService(com.sun.star.comp.sdbc.flat.ODriver)
xDriver = createUnoService(com.sun.star.sdbc.Driver,aDriver)
Con = xDriver.Connect(sdbc:flat:C:/Test2.csv,SomeEmptyProp)

So there are several problems with this:
a) The path should be an URL (solved)
b) The path is only the base of the filename, the extension will be
given as a separate
   parameter, which leads to
c) I don't know how to specify multiple values in Connect()'s second parameter.

I'm sure you can help me with this. :-)

Thanks again,
  Daniel Albuschat
--
eat(this); // delicious suicide

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



Re: [dev] Loading an unregistered CSV-database in OOo-Basic

2006-11-13 Thread Peter Eberlein

Peter Eberlein schrieb:

Hi Daniel,

Daniel Albuschat schrieb:

Hello,



Here's the script-snippet:

Service = createUnoService(com.sun.star.sdb.DatabaseContext)


you have to use the com.sun.star.sdbc.DriverManager for those purposes.
In the Dev-Guide you will found how to connect with flat files.


may be the following will help you (not tested):

Dim mDBPropertiesText(7) As New com.sun.star.beans.PropertyValue
mDBPropertiesText(0).Name = Extension
mDBPropertiesText(0).Value = csv
mDBPropertiesText(1).Name = CharSet
mDBPropertiesText(1).Value = System
mDBPropertiesText(2).Name = FixedLength
mDBPropertiesText(2).Value = false
mDBPropertiesText(3).Name = HeaderLine
mDBPropertiesText(3).Value = false
mDBPropertiesText(4).Name = FieldDelimiter
mDBPropertiesText(4).Value = ,
mDBPropertiesText(5).Name = StringDelimiter
mDBPropertiesText(5).Value = 
mDBPropertiesText(6).Name = DecimalDelimiter
mDBPropertiesText(6).Value = 
mDBPropertiesText(7).Name = ThousandDelimiter
mDBPropertiesText(7).Value = 

sDatabaseURL = sdbc:flat:   file:///x:/MyFile.csv
oEnvironment = createUnoService(com.sun.star.sdbc.DriverManager)
oConnection = 
oEnvironment.getConnectionWithInfo(sDatabaseURL,mDBPropertiesText())


Peter


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



Re: [dev] Loading an unregistered CSV-database in OOo-Basic

2006-11-13 Thread Daniel Albuschat

2006/11/13, Peter Eberlein [EMAIL PROTECTED]:

Peter Eberlein schrieb:
 Daniel Albuschat schrieb:
 Here's the script-snippet:

 Service = createUnoService(com.sun.star.sdb.DatabaseContext)

 you have to use the com.sun.star.sdbc.DriverManager for those purposes.
 In the Dev-Guide you will found how to connect with flat files.

may be the following will help you (not tested):

Dim mDBPropertiesText(7) As New com.sun.star.beans.PropertyValue
mDBPropertiesText(0).Name = Extension
mDBPropertiesText(0).Value = csv
mDBPropertiesText(1).Name = CharSet
mDBPropertiesText(1).Value = System
mDBPropertiesText(2).Name = FixedLength
mDBPropertiesText(2).Value = false
mDBPropertiesText(3).Name = HeaderLine
mDBPropertiesText(3).Value = false
mDBPropertiesText(4).Name = FieldDelimiter
mDBPropertiesText(4).Value = ,
mDBPropertiesText(5).Name = StringDelimiter
mDBPropertiesText(5).Value = 
mDBPropertiesText(6).Name = DecimalDelimiter
mDBPropertiesText(6).Value = 
mDBPropertiesText(7).Name = ThousandDelimiter
mDBPropertiesText(7).Value = 

sDatabaseURL = sdbc:flat:   file:///x:/MyFile.csv
oEnvironment = createUnoService(com.sun.star.sdbc.DriverManager)
oConnection =
oEnvironment.getConnectionWithInfo(sDatabaseURL,mDBPropertiesText())


This works perfectly! Thanks a bunch.
I'm very sorry I have to ask another -- this time more stupid -- question :-)
A CSV-files has no tables, so how do I create an SQL-statement to select from?
Or - what's the way to iterate thru the datasets, if not using createStatement/
executeQuery?

Daniel

--
eat(this); // delicious suicide

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



Re: [dev] Loading an unregistered CSV-database in OOo-Basic

2006-11-13 Thread Peter Eberlein

Daniel Albuschat schrieb:

I'm very sorry I have to ask another -- this time more stupid -- 
question :-)
A CSV-files has no tables, so how do I create an SQL-statement to select 
from?
Or - what's the way to iterate thru the datasets, if not using 
createStatement/

executeQuery?

Of course you can use this methods. The table name is the name of the 
file without the extension.
If you want to use relations in queries, perhaps the Database-URL is the 
folder name, but that's only a guess.



Peter

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



Re: [dev] Loading an unregistered CSV-database in OOo-Basic

2006-11-13 Thread Daniel Albuschat

2006/11/13, Peter Eberlein [EMAIL PROTECTED]:

Daniel Albuschat schrieb:
 I'm very sorry I have to ask another -- this time more stupid --
 question :-)
 A CSV-files has no tables, so how do I create an SQL-statement to select
 from?
 Or - what's the way to iterate thru the datasets, if not using
 createStatement/
 executeQuery?

Of course you can use this methods. The table name is the name of the
file without the extension.


Ah, that's the bit I was missing.
I'll be able to finish my little function now, finally. :-)

Thanks again,
  Daniel Albuschat
--
eat(this); // delicious suicide

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



Re: [dev] OpenOffice Build Problem

2006-11-13 Thread Eike Rathke
Hi Indraveni,

On Saturday, 2006-11-11 07:35:03 +, Indraveni wrote:

  So I tried to execute from the
  command prompt, but there are no commands like soffice or oowriter
  etc.., there is a command openoffice.org-2.0, the following are there
  error messages when i used this command..

 [EMAIL PROTECTED]

btw, running applications as root is generally a bad idea..

Anyway, I wonder why ``openoffice.org-2.0'' should be an executable
command created by an OOo package. Are you sure the .deb you generated
from the original source tree did place it there?

 /usr/bin/openoffice.org-2.0: line 2: /etc/openoffice.org-2.0/program/soffice: 
 No such file or directory
 /usr/bin/openoffice.org-2.0: line 2: exec: 
 /etc/openoffice.org-2.0/program/soffice: cannot execute: No such file or 
 directory

Of course not. That's not the location where it is installed to.

 So I checked under /opt, its installed like openoffice.org-2.1, where
 as /etc/openoffice.org-2.0 is created a link to
 /opt/openoffice.org-2.0. So for the time being I tried to execute
 using the /opt directly as follows.
 
 [EMAIL PROTECTED]/opt/openoffice.org2.1/program/soffice
 javaldx: Could not find a Java Runtime Environment!
 no suitable windowing system found, exiting.

As you're running the app as root, is root authorized to connect to the
X display? Is there an X running at all? Try as an ordinary user who
already runs X.

  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 the [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]



Re: [dev] Calc, disable saving in Excel 5/95 format?

2006-11-13 Thread Andreas Schlüns

Mathias Bauer schrieb:

Kirill S. Palagin wrote:


Hello.

How do I disallow saving in particular format (specifically Excel 5/95)?
I need to do this because Calc produces damaged file (see
http://www.openoffice.org/issues/show_bug.cgi?id=32785) and I can not
rely on users avoiding this format.


I already answered that on the users list but for the records I repeat
it here:

Go to the share/registry/modules/org/openoffice/TypeDetection/Filter
folder and open the file fcfg_calc_filters.xcu in a text editor.
Search for the string MS Excel 5.0/95. In the line below remove the
word EXPORT and now the filter should work as a pure import filter.

If that is fine for you I could tell you how you can deploy this change
as an extension.


Of course packages are the best way to make such changes.
Because the share layer will might be changed if the next update
will be installed (!) ... your changes there will be lost then.

A package can be installed using Tools-Extension Manager 
Please use the attached file to disable the MS Excel 5.0 filter.

If you wish to make changes inside the package, you can unzip it
(internaly it's a normal zip file). Open the XCU file and edit it.


Ciao,
Mathias



Ciao
Andreas

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