Re: [dev] Basic Libraries and security

2005-08-22 Thread Peter Eberlein

Christian Junker schrieb:

Hi Peter,

you're right, there seems to be no way to call a macro that is not
located in the Standard library, even if that library has been loaded.
I could reproduce this behavior with src680_m121 .
I propose you file a report at Issuezilla, thanks.


Done, #53615

Peter

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



Re: [dev] Basic Libraries and security

2005-08-19 Thread Eike Rathke
Hi Peter,

On Wed, Aug 17, 2005 at 14:36:28 +0200, Peter Eberlein wrote:

 Type a three line function MyFunction() in any module of the Standard 
 library.
 Open a calc document and type the function in a cell. You will get as 
 result the return of the function.
 Now move the function to another (loaded) library and try again.
 
 You can't specify the function call in the cell like 
 =MyLibrary.MyModul.MyFunction()

No, but you should still be able to call it as =MyFunction()

 And btw, if you use such a document as template, the cells are not 
 updated automatically nor with GUI. Doc.CalculateAll() will do it.

Why should they be updated? With what? There is no dependency in form of
a cell reference passed as an argument that tells it to do so.

  Eike

-- 
 OOo/SO Calc core developer. Number formatter bedevilled I18N transpositionizer.
 GnuPG key 0x293C05FD:  997A 4C60 CE41 0149 0DB3  9E96 2F1A D073 293C 05FD

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



Re: [dev] Basic Libraries and security

2005-08-19 Thread Peter Eberlein

Hi Eike,

Eike Rathke schrieb:

Hi Peter,

On Wed, Aug 17, 2005 at 14:36:28 +0200, Peter Eberlein wrote:


Type a three line function MyFunction() in any module of the Standard 
library.
Open a calc document and type the function in a cell. You will get as 
result the return of the function.

Now move the function to another (loaded) library and try again.

You can't specify the function call in the cell like 
=MyLibrary.MyModul.MyFunction()



No, but you should still be able to call it as =MyFunction()


No, you will get in German #WERT! as result.

The normal behavior should be:
1. Search the function in the library of the document /works
2. Search the function in the standard library /works
3. Search the function in any other loaded user libraries /doesn't work
4. Search the function in any other loaded shared libraries /doesn't work



And btw, if you use such a document as template, the cells are not 
updated automatically nor with GUI. Doc.CalculateAll() will do it.



Why should they be updated? With what? There is no dependency in form of
a cell reference passed as an argument that tells it to do so.


Because in a network installation a function =MyPhoneNumber() should 
return the phonenumber of the user, who uses the template document, and 
not the phonenumber of the owner of the template.
So you have to assign a macro to the document-event OnCreate to update 
the data.


Regards
Peter

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



Re: [dev] Basic Libraries and security

2005-08-19 Thread Christian Junker
Hi Peter,

you're right, there seems to be no way to call a macro that is not
located in the Standard library, even if that library has been loaded.
I could reproduce this behavior with src680_m121 .
I propose you file a report at Issuezilla, thanks.

2005/8/19, Peter Eberlein [EMAIL PROTECTED]:
 Hi Eike,
 
 Eike Rathke schrieb:
  Hi Peter,
 
  On Wed, Aug 17, 2005 at 14:36:28 +0200, Peter Eberlein wrote:
 
 
 Type a three line function MyFunction() in any module of the Standard
 library.
 Open a calc document and type the function in a cell. You will get as
 result the return of the function.
 Now move the function to another (loaded) library and try again.
 
 You can't specify the function call in the cell like
 =MyLibrary.MyModul.MyFunction()
 
 
  No, but you should still be able to call it as =MyFunction()
 
 No, you will get in German #WERT! as result.
 
 The normal behavior should be:
 1. Search the function in the library of the document /works
 2. Search the function in the standard library /works
 3. Search the function in any other loaded user libraries /doesn't work
 4. Search the function in any other loaded shared libraries /doesn't work
 
 
 And btw, if you use such a document as template, the cells are not
 updated automatically nor with GUI. Doc.CalculateAll() will do it.
 
 
  Why should they be updated? With what? There is no dependency in form of
  a cell reference passed as an argument that tells it to do so.
 
 Because in a network installation a function =MyPhoneNumber() should
 return the phonenumber of the user, who uses the template document, and
 not the phonenumber of the owner of the template.
 So you have to assign a macro to the document-event OnCreate to update
 the data.
 
 Regards
 Peter
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


-- 
Best Regards
Christian Junker

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



Re: [dev] Basic Libraries and security

2005-08-17 Thread Peter Eberlein

Hi Christian,
Christian Junker schrieb:

Hi Peter,
actually I am not sure about your statement:

I've written some global macros as calc functions, and calc functions
must be located in the standard library.


Where did you get to hear that and what are the services and
interfaces you use? I have never heard that any kind of interface or
service needs to be in the Standard library to work correctly and I
was just reading the Developer's Guide out of curiosity about your
statement and there doesn't seem to be any hint that the Standard
library needs to be used. So probably it would be good to see some
code, I guess you work with css::sheet::FunctionAccess and/or
css::sheet::Addin and their related interfaces.


you can reproduce this simple.
Type a three line function MyFunction() in any module of the Standard 
library.
Open a calc document and type the function in a cell. You will get as 
result the return of the function.

Now move the function to another (loaded) library and try again.

You can't specify the function call in the cell like 
=MyLibrary.MyModul.MyFunction()


There's no need for an addin for simple functions.

And btw, if you use such a document as template, the cells are not 
updated automatically nor with GUI. Doc.CalculateAll() will do it.



Regards

Peter

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



Re: [dev] Basic Libraries and security

2005-08-16 Thread Peter Eberlein

Hi Mathias,



Did you try to change the path for Basic in the share/.../Common.xcu
(remove user part) *before* you create any user directory (doing this
afterwards seems to confuse OOo)?

I didn't test if this works but you could give this a try.


I gave it a try, but it did'nt work.
Per default there is no node for pathsettings in the shared common.xcu. 
I added it and after initiating the user profile I got an General 
input/output error) while administrating basic. And the Standard library 
was created in the userprofile again.


In the msi-file are directories presets_basic and 
presets_basic_Standard. Don't know if I should modify the parent 
directory here.


Regards Peter

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



Re: [dev] Basic Libraries and security

2005-08-15 Thread Peter Eberlein

Hi Andrew,
Andrew Douglas Pitonyak schrieb:

Peter Eberlein wrote:


Hi,

is there a way to move the standard library from the userprofile to 
the shared folder?

The reason (please correct me, if I'm wrong):
I've written some global macros as calc functions, and calc functions 
must be located in the standard library.

But I want to encrypt the code or make it readonly.
Is there a way to do so?

Regards

Peter



If you can not move standard, you could always place stubs in the 
standard library that call a non-standard library that is encrypted.


Of course, but what if the user changes or deletes the code in the 
standard library?
I think it's a design problem, I will submit a rfe. Thx to Christian for 
pointing the URL too.


Regards

Peter

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



Re: [dev] Basic Libraries and security

2005-08-15 Thread Mathias Bauer
Peter Eberlein wrote:
 Hi,
 
 is there a way to move the standard library from the userprofile to the
 shared folder?
 The reason (please correct me, if I'm wrong):
 I've written some global macros as calc functions, and calc functions
 must be located in the standard library.
 But I want to encrypt the code or make it readonly.
 Is there a way to do so?

Did you try to change the path for Basic in the share/.../Common.xcu
(remove user part) *before* you create any user directory (doing this
afterwards seems to confuse OOo)?

I didn't test if this works but you could give this a try.

Ciao,
Mathias

-- 
Mathias Bauer - OpenOffice.org Application Framework Project Lead
Please reply to the list only, [EMAIL PROTECTED] is a spam sink.

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



Re: [dev] Basic Libraries and security

2005-08-13 Thread Andrew Douglas Pitonyak

Peter Eberlein wrote:


Hi,

is there a way to move the standard library from the userprofile to 
the shared folder?

The reason (please correct me, if I'm wrong):
I've written some global macros as calc functions, and calc functions 
must be located in the standard library.

But I want to encrypt the code or make it readonly.
Is there a way to do so?

Regards

Peter


If you can not move standard, you could always place stubs in the 
standard library that call a non-standard library that is encrypted.


--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.sxw
My Macro Book: http://www.hentzenwerke.com/catalog/oome.htm
Free Info:  http://www.pitonyak.org/oo.php


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



Re: [dev] Basic Libraries and security

2005-08-13 Thread Christian Junker
See http://www.oooforum.org/forum/viewtopic.phtml?t=6910 , might be of use.

2005/8/12, Peter Eberlein [EMAIL PROTECTED]:
 Hi,
 
 is there a way to move the standard library from the userprofile to the
 shared folder?
 The reason (please correct me, if I'm wrong):
 I've written some global macros as calc functions, and calc functions
 must be located in the standard library.
 But I want to encrypt the code or make it readonly.
 Is there a way to do so?
 
 Regards
 
 Peter
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


-- 
Best Regards
Christian Junker

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



[dev] Basic Libraries and security

2005-08-12 Thread Peter Eberlein

Hi,

is there a way to move the standard library from the userprofile to the 
shared folder?

The reason (please correct me, if I'm wrong):
I've written some global macros as calc functions, and calc functions 
must be located in the standard library.

But I want to encrypt the code or make it readonly.
Is there a way to do so?

Regards

Peter

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