Re: [dev] RestrictedPath working under Windows?

2006-07-14 Thread Frank Schönheit - Sun Microsystems Germa ny
Hi Allen,

 I'm trying to get RestrictedPath working, as described under Declaring
 the Permitted Folders in
 http://ui.openoffice.org/specification/FileDialog_RestrictedPaths.sxw
 
 I'm using OOo v2.0.3 under WinXP.

Do you use system dialogs, or OOo's own dialogs? The feature only works
with the latter ...

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]



Re: [dev] Warning free code: the missing modules

2006-07-14 Thread Frank Schönheit - Sun Microsystems Germa ny
Hi Stephan,

 Opinions, anyone?

sounds good, except that I would not give complete M2, M3, M4 to one
person each. Those are huge tasks, and touch code where you sometimes
better know what you're doing, so I suggest to do like before: Let
everybody fix his/her own code here.

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]



RE: [dev] RestrictedPath working under Windows?

2006-07-14 Thread Allen Pulsifer
  I'm trying to get RestrictedPath working, as described under 
  Declaring the Permitted Folders in 
  
 http://ui.openoffice.org/specification/FileDialog_RestrictedPaths.sxw
  
  I'm using OOo v2.0.3 under WinXP.
 
 Do you use system dialogs, or OOo's own dialogs? The feature 
 only works with the latter ...

Hello Frank,

I'm using what is compiled into the OOo Windows binary distribution and
configured by default, which I'm guessing is the system dialogs.  Is there a
way to select OOo's dialogs, either at run-time or build-time?

Thanks.

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



Re: [dev] RestrictedPath working under Windows?

2006-07-14 Thread Frank Schönheit - Sun Microsystems Germa ny
Hi Allen,

 I'm using what is compiled into the OOo Windows binary distribution and
 configured by default, which I'm guessing is the system dialogs.  Is there a
 way to select OOo's dialogs, either at run-time or build-time?

At runtime,
  Tools|Options|OpenOffice.org|General|[X] Use OpenOffice.org dialogs
is the place to control this.

For build time, I'm not sure whether there is a pre-configured way to
disable this. The implementation for the Windows file picker is in
fpicker/source/win32. You'll need to disable the build there. And/Or
you'd need to disable the packaging of the respective libraries
(fop.dll, fps.dll, and fpicker.uno.dll, I assume (!)) in the scp2 module.

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]



Re: [dev] Set default posSize for new created Windows

2006-07-14 Thread Carsten Driesner

Christoph Lutz wrote:

Hi,

please assueme one creates a new OOo document, moves the window of the
document using the mouse and closes the document again. If you now
create a new document, it will be placed to the position of the
previous document.

How can I modify this default-position in a programmatic way?

Hi Christoph,

I am not sure if this can really be done, it depends on the current 
implementation. I will describe a way you can try out. OpenOffice.org 
stores the default position of every document type in the configuration 
file Setup.xcu. You can find the file here: User 
folder/registry/data/org/openoffice/Setup.xcu. The user folder is 
normally located under Unix in your home directory. Under Windows 
normally in System Drive:/Documents and 
Settings/username/Application Data. I copied the following snippet 
from my Office installation:


?xml version=1.0 encoding=UTF-8?
oor:component-data xmlns:oor=http://openoffice.org/2001/registry; 
xmlns:xs=http://www.w3.org/2001/XMLSchema; oor:name=Setup 
oor:package=org.openoffice

 node oor:name=L10N
  prop oor:name=ooLocale oor:type=xs:string
   valueen-US/value
  /prop
 /node
 node oor:name=Office
  prop oor:name=ooSetupInstCompleted oor:type=xs:boolean
   valuetrue/value
  /prop
  prop oor:name=LicenseAcceptDate oor:type=xs:string
   value2006-07-14T08:05:09/value
  /prop
  prop oor:name=FirstStartWizardCompleted oor:type=xs:boolean
   valuetrue/value
  /prop
  node oor:name=Factories
   node oor:name=com.sun.star.frame.StartModule
prop oor:name=ooSetupFactoryWindowAttributes oor:type=xs:string
 value114,175,952,711;1;0,0,0,0;/value
/prop
   /node
   node oor:name=com.sun.star.text.TextDocument
prop oor:name=ooSetupFactoryWindowAttributes oor:type=xs:string
 value99,113,1179,908;1;0,0,0,0;/value
/prop
   /node
  /node
 /node
/oor:component-data

You can see that the configuration set Factories contains nodes for 
every appplication module, in the example 
com.sun.star.frame.StartModule and com.sun.star.text.TextDocument. 
The property called ooSetupFactoryWindowAttributes stores the left,top 
position and the width and height in pixel. You can use the 
configuration API to change these values programmatically.


I am not sure if the current implementation reads the values for every 
new window or if it just uses internal values. So it's possible that the 
values are only read once  from the configuration at startup time. Be 
aware that these values will be overwritten when a user changes the 
position or size of an application window.


Regards,
Carsten

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



RE: [dev] RestrictedPath working under Windows?

2006-07-14 Thread Allen Pulsifer
  Is there a way to select OOo's dialogs, either at run-time or 
  build-time?
 
 At runtime,
   Tools|Options|OpenOffice.org|General|[X] Use OpenOffice.org 
 dialogs is the place to control this.

That and the corresponding configuration option
(org.openoffice.Office.Common/Misc/UseSystemFileDialog = false) both worked
to switch to OOo's dialogs.

With that setting, RestrictedPath mostly worked.  With only one directory in
the RestrictedPath, the behavior was not quite what I expected.  It allowed
me to navigate up to the parent directories, all the way to the root (c:\).
It didn't allow me to save there, but it was unexpected I was able navigate
there since this was above the restricted directory.

When I had more than one directory in RestrictedPath, it made more sense.
By allowing me to navigate up the parents all the way to the root (c:\), I
was able to get from one directory to the other.

So it mostly worked, but the behavior was not what I expected when I had
only one directory in the RestrictedPath.

Thank you for the assistance.

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



Re: [dev] Warning free code: the missing modules

2006-07-14 Thread Stephan Bergmann

Christian Lohmaier wrote:

On Thu, Jul 13, 2006 at 06:04:41PM +0200, Stephan Bergmann wrote:
Now that CWS warnings01 is integrated and most of the OOo modules are 
C/C++ warning free for the standard platforms (unxlngi6, unxsoli4, 
unxsols4, wntmsci10),


only for specific compiler versions.
gcc 4.0.[23] at least cannot compile OOo without disabling the warnings
for quite a lot of dirs.


Please wait until CWS warningfixes02 is integrated, or manually apply 
the patch from http://www.openoffice.org/issues/show_bug.cgi?id=66577. 
 With those changes integrated, OOo should compile fine at least with 
GCC 4.1.1.  I encountered spurious warnings with GCC 4.0.2 that I would 
consider errors of GCC, and which disappeared for GCC 4.1.1.  This might 
rule out GCC 4.0.2 as an appropriate compiler for OOo.


[...] 
Which modules are missing?  As of SRC680m176, the situation is as follows:


m175 and m176 don't compile here either because typesizes.h is not
generated/ typesconfig is not built and not run. (but build walked
through the directory) - not sure why But that's another story
anyway.


You mean, unrelated to the warnings are errors thing?  (Otherwise, I 
would be interested in an issue id.)



Opinions, anyone?


I'd like to have a statement of what compiler versions will be/are still
supported by OOo.


The official Sun Hamburg builds are done with GCC 3.4.1 (plus a 
visibility patch and one other minor tweak, I think).  Other versions 
are also known to work, either by chance, or after some people put in 
enough effort to make it work.  Other versions are known not to work, 
either due to errors in GCC or in OOo (wasn't that the case for GCC 
4.0.0? I'm always bad at remembering such details).


I personally would love to see as many versions of GCC supported as 
possible, but there are certainly practical limits to this.  Thus, in 
short:  If you are looking for a hassle-free build, go with GCC 3.4.1 
for now.  If you want something else, be prepared that there might be 
problems lurking in every single build (from trivial to show-stopper), 
but also be assured that the rest of the OOo community is eager to 
remove those problems, too.


-Stephan


ciao
Christian


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



[dev] How can I find the property returned from method?(Basic Script)

2006-07-14 Thread ���Ĵ�
Hello,every here,
I'm a beginner of OO development.
I hava a question when I read the Programmer's Tutorial.pdf(Page32)


on the following script:

Sub style_init
Dim mNoArgs() REM Empty Sequence
Dim sMyText As String
Dim sUrl As String
oDesktop = createUnoService(com.sun.star.frame.Desktop)
sUrl = private:factory/swriter
oDocument = oDesktop.LoadComponentFromURL(sUrl,_blank,0,mNoArgs)
oText = oDocument.Text
sMyText = A very short paragraph for illustration only
oCursor = oText.createTextCursor()
oText.insertString(oCursor,Headline,FALSE)
oText.insertControlCharacter(oCursor,_
com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK,FALSE)
oText.insertString(oCursor,sMyText, FALSE)
End Sub
---
oText = oDocument.Text
I don't konw how can I check out the Text property of oText from the API 
reference.
  And
oCursor = oText.createTextCursor()
why oText have a creatTextCursor() method?

I just want to how can I check out these properties from OpenOffice's 
SDK(API reference)

Thanks In Advance!


Applepwc



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



Re: [dev] Set default posSize for new created Windows

2006-07-14 Thread Christoph Lutz

Hi Carsten,

thanks for the detailed explanation! I will have a try and give you
feedback if this worked!


You can see that the configuration set Factories contains nodes for
every appplication module, in the example
com.sun.star.frame.StartModule and com.sun.star.text.TextDocument.
The property called ooSetupFactoryWindowAttributes stores the left,top
position and the width and height in pixel. You can use the
configuration API to change these values programmatically.


regards,
Christoph

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



Re: [dev] RestrictedPath working under Windows?

2006-07-14 Thread Frank Schönheit - Sun Microsystems Germa ny
Hi Allen,

 With that setting, RestrictedPath mostly worked.  With only one directory in
 the RestrictedPath, the behavior was not quite what I expected.  It allowed
 me to navigate up to the parent directories, all the way to the root (c:\).
 It didn't allow me to save there, but it was unexpected I was able navigate
 there since this was above the restricted directory.

Hmm. For multiple paths, as you found, it is useful to be able to travel
above the paths. But for one path, it might make sense to let this
single path be the virtual root in the file picker.

Are you interesting in fixing this?

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]



RE: [dev] RestrictedPath working under Windows?

2006-07-14 Thread Allen Pulsifer
  With that setting, RestrictedPath mostly worked.  With only one 
  directory in the RestrictedPath, the behavior was not quite what I 
  expected.  It allowed me to navigate up to the parent 
 directories, all 
  the way to the root (c:\). It didn't allow me to save there, but it 
  was unexpected I was able navigate there since this was above the 
  restricted directory.
 
 Hmm. For multiple paths, as you found, it is useful to be 
 able to travel above the paths. But for one path, it might 
 make sense to let this single path be the virtual root in 
 the file picker.
 
 Are you interesting in fixing this?

Hello Frank,

The answer is yes, but.  I would be interested in fixing it, but I'm not
sure when I would be able to get to it.  I do have a potential customer who
is interested in this feature, and if that is an issue for him then I will
fix it.

I would also be interested in changing RestrictedPath from an environmental
variable to a configuration (.xcs/.xcu) setting.  Is there a specific reason
an environment variable was chosen over a configuration setting?  How could
changing to a configuration setting be done without adversely affecting
existing users -- use the configuration value if it is set, otherwise look
to the environment variable?

Allen

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



Re: [dev] RestrictedPath working under Windows?

2006-07-14 Thread Frank Schönheit - Sun Microsystems Germa ny
Hi Allen,

 The answer is yes, but.  I would be interested in fixing it, but I'm not
 sure when I would be able to get to it.  I do have a potential customer who
 is interested in this feature, and if that is an issue for him then I will
 fix it.

Ah, I'm looking forward to when you come asking *where* in the code to
fix it :)

 I would also be interested in changing RestrictedPath from an environmental
 variable to a configuration (.xcs/.xcu) setting.  Is there a specific reason
 an environment variable was chosen over a configuration setting?

The idea was to have a feature which prevents users from changing the
respective setting. Nowadays, where the configuration supports locking
settings into readonly state, probably nothing is to say against
making this a configuration setting.

 How could
 changing to a configuration setting be done without adversely affecting
 existing users -- use the configuration value if it is set, otherwise look
 to the environment variable?

The order probably doesn't matter, but something like this, yes.

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]



Re: [dev] Warning free code: the missing modules

2006-07-14 Thread Stephan Bergmann

Stephan Bergmann wrote:
[...]
M7  basctl, chart2, extensions, filter, lingu, xmlsecurity, starmath, 
sc, sd, slideshow, sw, writerperfect.  All depending on svx; 
additionally, sd is depending on slideshow and the canvas stuff above, 
and sw is depending on writerperfect.


What I forgot to mention: sc, sd, sw also depend on two headers 
delivered from sch, sch/memchrt.hxx and sch/schdll.hxx.  A quick check 
with testhxx shows that sch/memchrt.hxx needs to be made warning-free on 
wntmsci10[.pro].


[...]

-Stephan


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



Re: [dev] Warning free code: the missing modules

2006-07-14 Thread Bjoern Milcke

Hi Stephan,

M8  sch.  Depending on svx.  Do we want to make it warning clean, or do 
we want to wait for chart2?


IMO making sch warning free is a complete waste of time, as it will be 
replaced. All time we invest there is missing for developing chart2.


As you also mentioned the delivered headers memchrt.hxx and schdll.hxx, 
those probably must be made warning-free to avoid warnings in the 
projects that include them.


I think schdll.hxx is not very complex and similar to scdll.hxx, 
sddll.hxx etc., so fixing this might be no problem (you never know, 
though ;-) )


For memchrt.hxx the question remains how much effort it would be to make 
it warning-free. It contains a lot of inline-code. I suppose there is no 
option to ignore warnings for a single file (like preprocessor directives)?


Regards,
Bjoern

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



RE: [dev] RestrictedPath working under Windows?

2006-07-14 Thread Allen Pulsifer
 Ah, I'm looking forward to when you come asking *where* in 
 the code to fix it :)

That's easy to find.  There are only about a dozen matches in the source
code for RestrictedPath and RestrictedPaths ;-)

 The idea was to have a feature which prevents users from 
 changing the respective setting. Nowadays, where the 
 configuration supports locking settings into readonly 
 state, probably nothing is to say against making this a 
 configuration setting.

That was my concern, too, which is why I didn't understand the choice of a
environment variable.

On Windows XP, you have both system variables and user variables.  If
both values are set, the user value overrides the system value.  In fact, I
just tried this, setting two different values for RestrictedPath, one in a
system variable in the other in a user variable, and OOo used the user
value.

Is there something I'm missing?

Allen

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



Re: [dev] RestrictedPath working under Windows?

2006-07-14 Thread Joerg Barfurth

Hi,

Frank Schönheit - Sun Microsystems Germany schrieb:


I would also be interested in changing RestrictedPath from an environmental
variable to a configuration (.xcs/.xcu) setting.  Is there a specific reason
an environment variable was chosen over a configuration setting?


The idea was to have a feature which prevents users from changing the
respective setting. Nowadays, where the configuration supports locking
settings into readonly state, probably nothing is to say against
making this a configuration setting.



So how was that supposed to be used? I assume that would be by editing 
the soffice script to set that variable before invoking soffice.bin? 
(Otherwise a user could always overwrite an environment variable just as 
easily.) Not well suited for Windows use then, where there is no 
existing script 



How could
changing to a configuration setting be done without adversely affecting
existing users -- use the configuration value if it is set, otherwise look
to the environment variable?


The order probably doesn't matter, but something like this, yes.



The most correct would be to use a configuration value with no default, 
which means you get a NIL value (a VOID Any in UNO) when reading. Then 
you could have

  VOID - look at environment
  Non NIL - Use the value

If the setting is a list of pathes or URLs, the best value type would be 
string-list (Sequence String in UNO) . Note that an empty string-list 
is distinct from NIL.


The one thing this doesn't permit, is using an empty string-list to 
signify NO allowed folders.


HTH, Jörg

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



RE: [dev] RestrictedPath working under Windows?

2006-07-14 Thread Allen Pulsifer
 The most correct would be to use a configuration value with 
 no default, 
 which means you get a NIL value (a VOID Any in UNO) when 
 reading. Then 
 you could have
VOID - look at environment
Non NIL - Use the value

IMHO, that is overkill.  It is true that would allow an empty RestrictedPath
to be set in the .xcu file that could not be overridden by a user
environmental variable, but what is the benefit?  If the user overrides an
empty RestrictedPath, I don't see the harm.

It would be less complex and therefore less prone to system administrator
and programmer error to just treat a nil and empty string the same.  I
suggest:

  if .xcu value not empty: use it
  else: look to environment

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



Re: [dev] Warning free code: the missing modules

2006-07-14 Thread Stephan Bergmann

Bjoern Milcke wrote:

Hi Stephan,

M8  sch.  Depending on svx.  Do we want to make it warning clean, or 
do we want to wait for chart2?


IMO making sch warning free is a complete waste of time, as it will be 
replaced. All time we invest there is missing for developing chart2.


I can add EXTERNAL_WARNINGS_NOT_ERRORS=TRUE to every makefile.mk in sch 
on CWS sb58 to effectively exempt it from warning-freedom, just as I did 
for binfilter.


As you also mentioned the delivered headers memchrt.hxx and schdll.hxx, 
those probably must be made warning-free to avoid warnings in the 
projects that include them.


I think schdll.hxx is not very complex and similar to scdll.hxx, 
sddll.hxx etc., so fixing this might be no problem (you never know, 
though ;-) )


For memchrt.hxx the question remains how much effort it would be to make 
it warning-free. It contains a lot of inline-code. I suppose there is no 
option to ignore warnings for a single file (like preprocessor directives)?


testhxx only found (very few) problems in memchrt.hxx, and only on 
wntmsci10[.pro], so getting those headers into shape so that they do not 
break sc/sd/sw is hopefully no big deal (and can probably done in one of 
the CWS for sc/sd/sw?).


-Stephan


Regards,
Bjoern


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



Re: [dev] Warning free code: the missing modules

2006-07-14 Thread Bjoern Milcke

Hi Stephan,

I can add EXTERNAL_WARNINGS_NOT_ERRORS=TRUE to every makefile.mk in sch 
on CWS sb58 to effectively exempt it from warning-freedom, just as I did 
for binfilter.


Yes, please.

testhxx only found (very few) problems in memchrt.hxx, and only on 
wntmsci10[.pro], so getting those headers into shape so that they do not 
break sc/sd/sw is hopefully no big deal (and can probably done in one of 
the CWS for sc/sd/sw?).


That sounds good. The CWS to fix this in could be the same where the 
variables in makefile.mk are added, so we have only one warnings-CWS 
that contains sch.


-Bjoern

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



[dev] Scheduled Maintenance: 2006-07-14 23:30 UTC

2006-07-14 Thread Louis Suarez-Potts

All,

OpenOffice.org will be offline for about 1 hour commencing 23:30 UTC  
on 2006-07-14, today, for scheduled maintenance.  CVS, SVN, mail  
lists, IssueZilla will all be unavailable. Anoncvs, the developer  
wiki, and the download servers will not be affected.


We regret the inconvenience.

Best,

Louis Suarez-Potts
Community Manager
CollabNet


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