[dev] Re: SDBC

2011-03-01 Thread Peter Eberlein

Hi,
Am 01.03.2011 06:51, schrieb Ocke Janssen:

Hello Rohit,

On 22.02.2011 16:16, Rohit Kulkarni wrote:

Hello,
We are students studying in Pune University. We are group of 3 students.
We are developing the SDBC driver for LDAP directories.
We are using OpenOffice 3.2.1 source code for this ( OOO320_m19). We
have successfully built OpenOffice and we found that currently some
Mozilla component is used for this. I think the component named XPCOM is
used. We also found some files related to LDAP connection.
We want to know more on SDBC driver. Are there any functions that SDBC
driver must implement? Architecture of SDBC ?
Also, Is it possible to build only sbase?
And, Is there anyone that is working on it...?

The list to ask such things and more is d...@dba.openoffice.org. You'll
find a lot of information in the wiki. See
http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Database/Writing_Database_Drivers

and here
http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Database/SDBC_Driver

The interface description can be found here
http://api.openoffice.org/docs/common/ref/com/sun/star/sdbc/XDriver.html

The source code is connectivity but that you already know I guess.
In which language do you plan to write the driver C++, Java, ...



good news,
and don't forget to fix the ldap bugs ;)
e.g. http://openoffice.org/bugzilla/show_bug.cgi?id=85356

Regards

Peter

--

To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: sy...@openoffice.org with Subject: help


Re: [dev] Re: API to clone a row in a writer's table - ViewCursor positioning

2011-01-04 Thread Peter Eberlein

Hi Sandro,

I tried it without a XTextViewCursor.
Don't know, if the XSelection interface is supported in headless mode, 
if no, then maybe someone of the writer team has an idea.


I didn't find a way to span a XTextRange over more then one cell to get 
the selection at a whole, so try the following:


You have to iterate over each cell of your row, put the sample code in a 
loop (after translating from Basic to Python):


cellSrc = thisComponent.TextTables.getByIndex(0).getCellByPosition(0,0,0,0)
cursorSrc = cellSrc.getText.createTextCursorbyRange(cellSrc.getStart)
cursorSrc.gotoEnd(true)
Thiscomponent.CurrentController.select(cursorSrc)
transferable = Thiscomponent.CurrentController.getTransferable()
cellDest= thisComponent.TextTables.getByIndex(0).getCellByPosition(0,1,0,1)
cursorDest = cellDest.getText.createTextCursorByRange(cellDest.getStart)
cursorDest.gotoEnd(true)
Thiscomponent.CurrentController.select(cursorDest)
Thiscomponent.CurrentController.insertTransferable(transferable)

Regards

Peter

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



Re: [dev] API to clone a row in a writer's table

2011-01-03 Thread Peter Eberlein

Hi Sandro
Am 03.01.2011 12:16, schrieb Sandro:

Hi,

I'm writing to the dev list after spending many days trying hard to
understand the best way and asking in user lists and forums.

I really hope someone can help me or point me in the correct
direction/reading.

I need to programmatically duplicate rows of a Table in openoffice writer.

It's not difficult to add rows via table.Rows.insertByIndex(idx, count),
that adds empty rows and it's easy to add text in that row assigning
DataArray to the CellRange. Doing this way you loose control on the style of
the cells and specifically if a cell has words with different style
(bold/italic) they get flattened to the same face. What I need is to
duplicate a row in a way that preserves the style of each word in the
cell/row.

As far as I understand using openoffice in headless mode prevents me
from using dispatch as no ViewCursor should be available.

Maybe the XTransferable interface is useful in this scenario. You'll 
find examples googling this or the api list.


Regards

Peter

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



Re: [dev] Copy text table between docs?

2010-02-19 Thread Peter Eberlein

Hi j,
Am 19.02.2010 15:52, schrieb j philoon:

Can someone show me how to programatically copy a text table from one
document to a different document?

The reason I ask is that I want to use the text table format/structure of
the source template to define a new table in the destination document.  I'll
be writing different cell text, so, I don't really need to copy the table if
I could transfer all of the properties to a new table in the destination
doc.

I'm using the java api, and so far I can't even get close to performing a
table copy.


Try the XTransferable Interface, that should do what you want.

Regards

Peter

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



Re: [dev] How to find table given range

2010-02-18 Thread Peter Eberlein

Hi j,
Am 17.02.2010 21:53, schrieb j philoon:

I need to navigate to the next table after or coinciding with a certain
bookmark in a MS Word doc.  Ideally I would like to determine that the range
of the bookmark and a table intersect, but if I can get to a bookmark and
then navigate forward to the next table that would work too.  Can anyone
recommend a means of doing this?  Thanks.



Contrary to MS Word a bookmark cannot start in normal text and end in 
a table and vice versa.


So you have to jump to the bookmarks anchor with a cursor and to check 
the property TextTable or Cell.


In Java it would look like this:

XPropertySet xPropertySet = (XPropertySet) 
UnoRuntime.queryInterface(XPropertySet.class, xRange);

XPropertySetInfo xPropertySetInfo = xPropertySet.getPropertySetInfo();
XCell xCell = null;
// getPropertyValue gives null or the object

if (xPropertySetInfo.hasPropertyByName(Cell)) {
	xCell = (XCell)UnoRuntime.queryInterface(XCell.class, 
xPropertySet.getPropertyValue(Cell));

}

if (xCell instanceof XCell) {
// do something
}

Regards

Peter

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



Re: [dev] Making Jdialog Modal in Java Extension

2009-04-30 Thread Peter Eberlein

Hi Dinesh,

Am 30.04.2009 12:03, schrieb Dinesh Chothe:

Hii Marcin, thanks a lot. In our case its not a simple swing
dialog, we are providing one
   JFrame dialog which consists of
  radioButtons,check-Boxes,some buttons etc.
   By using this dialog we take user inputs and use these
inputs in OO dispatch method.
We have already developed this all part using swing and
its working fine expect modal.
So now converting this all swing part to native will be
  relly more cumbersome.
Would there be any other simple trick to make it modal?

2009/4/28 Marcin Miłkowskimilek...@o2.pl



a (dirty) workaround is to create a modal UNO-AWT dialog in a new thread 
before showing the Swing dialog and to set a flag.

If the Swing dialog ends, then the UNO-AWT dialog must end.

e.g.:
XToolkit xToolkit = (XToolkit) UnoRuntime.queryInterface(XToolkit.class, 
MCF.createInstanceWithContext(

com.sun.star.awt.Toolkit, context));

Object dialog = 
xMCF.createInstanceWithContext(com.sun.star.awt.UnoControlDialog, 
Context);


Object model = 
xMCF.createInstanceWithContext(com.sun.star.awt.UnoControlDialogModel, 
context);


XControlModel xControlModel = (XControlModel) 
UnoRuntime.queryInterface(XControlModel.class, model);


XControl xControl = (XControl) UnoRuntime.queryInterface( 
XControl.class, dialog);


xDialog = (XDialog) UnoRuntime.queryInterface(XDialog.class, dialog);

xControl.setModel(xControlModel);

XWindowPeer xWindowPeer = null;

WindowDescriptor desc = new com.sun.star.awt.WindowDescriptor();

desc.Type = com.sun.star.awt.WindowClass.MODALTOP;

xWindowPeer = xToolkit.createWindow(desc);

xControl.createPeer(xToolkit, xWindowPeer);

xDialog.execute();


Regards

Peter

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



Re: [dev] OOo BASIC Calc extension - sheet functions in library other than Standard - how ?

2009-03-17 Thread Peter Eberlein

Hi,

Jan Holst Jensen schrieb:

Ariel Constenla-Haile wrote:

Hello Jan,

On Sunday 15 March 2009, 21:15, Jan Holst Jensen wrote:
 

I can add OOo Basic functions to the Standard library and use those as
sheet functions without problems. Now, when I want to deploy the
functions packaged as an extension I run into problems.

As far as I can see an extension (an .oxt package) is not able to
install functions into the Standard library. Is there a good 
solution to this ? Or will I have to use Python or Java

instead of OOo Basic to do this (a shame since OOo Basic does the job
really nice) ?



no, you cannot add functions to the Standard library using an 
extension. You'll have to develop an Add-in (in C++, Java or Python).
  
if issue http://qa.openoffice.org/issues/show_bug.cgi?id=53615 (allow 
other libraries) is solved, things will become easier.


Peter


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



Re: [dev] OOo BASIC Calc extension - sheet functions in library other than Standard - how ?

2009-03-17 Thread Peter Eberlein

Jan Holst Jensen schrieb:

Peter Eberlein wrote:


no, you cannot add functions to the Standard library using an 
extension. You'll have to develop an Add-in (in C++, Java or Python).
  
if issue http://qa.openoffice.org/issues/show_bug.cgi?id=53615 (allow 
other libraries) is solved, things will become easier.
It is an issue from 2005, so it seems I shouldn't hold my breath for a 
solution... ?



Ask Niklas...

Regards

Peter


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



Re: [dev] no-break space in user fields

2009-03-12 Thread Peter Eberlein

Hi Martin,

Martin Dvořák schrieb:

Hi,
I've noticed that OOo Writer treats no-break space in text values of
user fields like normal space, i.e. it does wrap at it. Is there some
particular reason for this behavior? How would one prevent text
wrapping between two words in user field text?
Regards, Martin

UserFields have a lot of shortcomings, see e.g. 
http://qa.openoffice.org/issues/show_bug.cgi?id=75679


Please file an issue,

Regards

Peter


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



Re: [dev] Sections and appending documents

2009-03-04 Thread Peter Eberlein

Hi,
inserting Sections:
http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Text/Text_Sections
inserting Documents at a cursors position:
http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Text/Inserting_Text_Files
Please be aware that instead of using a file-URL you can also insert 
from a Stream.


Regards

Peter

Grover Blue schrieb:

Does anyone have an example of inserting a section and merging two
XTextDocuments?

I'm stuck.  Below is what I have so far, but I'm not sure how to insert the
second document.

public void appendDocument(XTextDocument document1, XTextDocument document2)
throws IllegalArgumentException, java.lang.Exception {

XText xDocText = document1.getText();
XTextCursor xOrigDocTextCursor = xDocText.createTextCursor();
XNamed xChildNamed;
XTextContent xChildContent;
XPropertySet xOrigDocTextCursorProp;

xOrigDocTextCursor.gotoEnd(false);
xDocText.insertControlCharacter(xOrigDocTextCursor,
ControlCharacter.PARAGRAPH_BREAK, false);

xOrigDocTextCursorProp = (XPropertySet)
FileManager.getOOoUnoRuntimeQueryInterface(
XPropertySet.class,
xOrigDocTextCursor);

xOrigDocTextCursorProp.setPropertyValue(BreakType,
BreakType.PAGE_BEFORE);

xChildNamed = (XNamed) FileManager.getOOoUnoRuntimeQueryInterface(
XNamed.class,

FileManager.getOOoUnoRuntimeCreateInstance(com.sun.star.text.TextSection));

xChildNamed.setName(NewSection);
xChildContent = (XTextContent)
FileManager.getOOoUnoRuntimeQueryInterface(
XTextContent.class,
xChildNamed);

/*  Add document2 to the new section somehow */

xDocText.insertTextContent(xOrigDocTextCursor, xChildContent,
false);

Thanks





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



Re: [dev] Sections and appending documents

2009-03-04 Thread Peter Eberlein

Grover Blue schrieb:

I found examples of inserting via a file, but I'm confused on how I would go
from a XTextDocument to an input stream.  I guess I'd need to use an
XInputStream object (assuming that is the interface I want to use when
passing the InputStream property to XDocumentInsertable), but it's not
clear on how to obtain that from XTextDocument.  You wouldn't happen to have
an example?


Sorry, no.
If you have a XTextDocument, I guess you have a URL where it is stored. 
If not (created from a template and modified) you can store it to a 
temp-folder or to a stream which you can reuse, for example 
http://user.services.openoffice.org/en/forum/viewtopic.php?f=44t=3801start=0st=0sk=tsd=a


Peter



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



Re: [dev] Saving Documents

2008-04-04 Thread Peter Eberlein

Hi yaungmin,

yaungmin schrieb:

Hi Mikhail,

I did not get any exception when I tried to save the document. As you can
see in the saveDocument method, I was basically able to load a document and
save it as another document with a different name. 


All I am trying to do is like say, I have an Untitled1 document opened and
I typed some text on the document. When I click on my Add-on Save button, I
want to save that document to a certain location. I want the text on the
document to be saved and the title of the document should change from
Untitled1 document to the name of the document. What I am trying to do is
probably exactly the same as the OOo build-in save function. Please advice.

Thanks,


If you want to save the Active Document, you must instantiate the 
XDesktop Interface from the ServiceManager and then look for the 
currentFrame. Every frame as a controller and the controller has a model.


desktop = xMCF.createInstanceWithContext(com.sun.star.frame.Desktop, 
xComponentContext);
XDesktop xDesktop = (XDesktop) 
UnoRuntime.queryInterface(com.sun.star.frame.XDesktop.class, desktop);

XFrame xF = xDesktop.getCurrentFrame();
XController xC = xF.getController();

XModel xmodel = (XModel) UnoRuntime.queryInterface(XModel.class, 
xC.getModel());
XComponent xComponent = (XComponent) 
UnoRuntime.queryInterface(XComponent.class, xmodel);
XStorable xs = (XStorable) (UnoRuntime.queryInterface(XStorable.class, 
xComponent ));



Peter


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



Re: [dev] Could I use the property Help of css.text.TextField.Input to store additional metadata

2007-11-30 Thread Peter Eberlein

Mathias Bauer schrieb:

Peter Eberlein wrote:


Mathias Bauer schrieb:

Christoph Lutz wrote:


snip


OOo3.0 hopefully will support ODF 1.2 meta data. I don't remember
exactly what this Help property is about. IIRC it's a popup help text
that is displayed when the user moves the mouse cursor over the field.
That would match the description element of input fields in ODF.


And 3.0 will hopefully support tabbing of input fields [1].

Then mouse over alone makes no sense. Please consider to use the new
notes2 [2] implementation for that feature. So if a field gets the focus
and a hint is stored, wouldn't it be useful to pop up dynamically
created notes?


Notes (annotation) are permanently visible, I don't think that you are
suggesting this?! If your point is that

- the quickhelp popups for input fields should be replaced by something
nicer
- this something should be visible when the user edits the field



Exactly, with dynamically created notes I meant something could use 
code from the notes2 impl.



I agree. And something from the notes2 could be a good candidate for this.



Regards Peter

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



[dev] QuickLauncher: how to configure

2007-11-19 Thread Peter Eberlein

Hi,

we intercepted the open/save commands because of restricted access to 
the file system (documents are stored in a database).


Is there a way to configure the context menu of the QuickStarter and if 
not: how do I deactivate it in the OptionsDialog.xcu without hiding the 
whole Memory page?


The Single Option

node oor:name=Memory oor:op=replace oor:finalized=true
  node oor:name=Options
node oor:name=Quicklauncher or:op=replaceoor:finalized=true
  prop oor:name=Hide
valuetrue/value
  /prop
/node
  /node
/node

doesn't work.

Or can it be started without appearing in the Systray?

(Windows XP, OpenOffice 2.2)

Regards

Peter



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



Re: [dev] QuickLauncher: how to configure

2007-11-19 Thread Peter Eberlein

Hi Mathias,

Mathias Bauer schrieb:

Peter Eberlein wrote:




Or can it be started without appearing in the Systray?


What is the point in having the QuickLauncher running but not being
visible? You can achieve the same result (faster start of the first
Office instance called by the user) by inserting soffice -nologo
-nodefault instead of soffice -quickstart into your autostart folder.
Perhaps that helps?

The drawback of not having a visible quicklauncher running is that OOo
will be removed from memory if all documents are closed. But if you
don't wait hours for the next document it will start fast again.

Yes, the goal is the fast loading of documents, even if all documents 
have been closed.


Peter

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



Re: [dev] Security: how to avoid to pop up the Basic IDE?

2007-11-19 Thread Peter Eberlein

Hi Mathias,

Mathias Bauer schrieb:

Peter Eberlein wrote:




Macro security is about macro execution, not about availability of the
BasicIDE. 


And that's the point. You cannot forbid the execution of internal 
non-document-bound macros with the security settings.


Regards

Peter


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



Re: [dev] deploying jdbc-drivers (.jar) on multiple hosts/OOo-Installations

2007-09-21 Thread Peter Eberlein

Hi Christoph,

Christoph Lutz schrieb:

Hi,

for the connection to an oracle-db via OOo-Base, a jdbc-driver is
required. This driver normally comes as a third-party jar-archive.
Wich is the preferred way to deploy the jar-archive in a network with
multiple hosts and multiple OOo-Installations?


I did it that way (WindowsXP):
Deploy the jar file in a folder of your choice and then set the 
classpath via the options/java.
Take the generated file ./user/config/javasettings_Windows_x86.xml and 
deploy it to all users.


It's not convenient but AFAIK there's no way to do it with a uno-package 
until now.


Regards

Peter

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



Re: [dev] Read-only textfield

2007-09-05 Thread Peter Eberlein

Hi Juan,

Juan Emilio Gabito schrieb:

I've done that already, but the thing is that the protected section takes the 
whole line or paragraph, and I just want the text field, cause the text that 
it's next to it it's not going to be read realonly.


Perhaps you should try the SetExpression/GetExpression Fields;
SetExpression you can put in a protected area or insert it unvisible.

Peter


Juan Emilio Gabito
-Mensaje original-
De: Francois Gatto [mailto:[EMAIL PROTECTED] 
Enviado el: martes, 04 de septiembre de 2007 11:17

Para: dev@openoffice.org
Asunto: Re: [dev] Read-only textfield

Hi,

Juan Emilio Gabito a écrit :

Hi all.

I would like to know if it's possible to make a
com.sun.star.text.TextField.User textfield read-only. I've been
searching aroung google, the oo dev mailing list and the forums and
haven't found anything.

 

May be you can put this textfield into an protected section ! No ?


Thanks

 


Juan Emilio Gabito


Francois Gatto

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




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



Re: AW: [dev] Re: Disable automatic field updating

2007-08-16 Thread Peter Eberlein

Thullner, Robert schrieb:

I just saw, that the attachment was blocked by the list.

How can I provide you a sample document?

As Mathias said, please file an issue (and put the number to this thread 
please).

http://qa.openoffice.org/issue_handling/pre_submission.html

Regards

Peter

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



Re: [dev] Disable automatic field updating

2007-08-13 Thread Peter Eberlein

Hi Robert,
Thullner, Robert schrieb:

Hello
 
 
So my question is, if there is a way to disable the auto updating

function, using Java and the OOo API?
 
Perhaps take a look at 
http://api.openoffice.org/docs/common/ref/com/sun/star/document/UpdateDocMode.html


Peter

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



Re: [dev] How to get singleton in OOo Basic?

2007-07-03 Thread Peter Eberlein

Hi Matthias,

Matthias B. schrieb:

I want to convert a Java program that causes OOo to crash into Basic
to make it easier to reproduce for filing a bug report. Can someone
tell me how to get
/singletons/com.sun.star.script.browse.theBrowseNodeFactory in OOo
Basic? In Java I get it via getValueByName() from the DefaultContext
(which I get from my service manager), but I don't know how to get the
default context (or service manager) in OOo Basic. I examined the
StarDesktop object wit xray but didn't find anything useful.


Cont = GetProcessServiceManager().DefaultContext()
XRay 
Cont.getValueByName(/singletons/com.sun.star.script.browse.theBrowseNodeFactory)



Regards

Peter

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



Re: [dev] OpenOffice SDK

2006-12-05 Thread Peter Eberlein

Hi Dyego,

Dyego Souza Dantas Leal schrieb:
The com.sun.star.beans.XPropertyContainer add variable as a TEXT in 
document ? ex MY_VARIABLE or a property in document to view in 
propertys window ?

Not as text, it's an additional property, not visible by the user.
Please take a look at the service com.sun.star.document.DocumentInfo and 
tell us what do you want to achieve.


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 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 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 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] changing the OOo-Configuration via API has no effect during runtime

2006-11-06 Thread Peter Eberlein

Hi Christoph,

Christoph Lutz schrieb:

Hi,



So I would expect an option like ShowHiddenCharacters, in the
ViewSettings, but there is no such option. I can remember that the
support of HiddenCharacters is a feature that is much younger than
other features in ViewSettings. So could it be that the current
implementation of a ShowHiddenCharacters option (somewhere else) is
not conform the idea of ViewSettings?

There are some single properties, e.g. ShowBreaks, ShowParaBreaks, 
ShowSpaces you can turn on or off. There is no one for all property.


Regards

Peter

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



Re: [dev] changing the OOo-Configuration via API has no effect during runtime

2006-11-06 Thread Peter Eberlein

Peter Eberlein schrieb:

Hi Christoph,


There are some single properties, e.g. ShowBreaks, ShowParaBreaks, 
ShowSpaces you can turn on or off. There is no one for all property.



Sorry, misunderstood, Frank has answered it yet.

Peter

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



[dev] Broken Links in Deleveloper News

2006-09-11 Thread Peter Eberlein

Hi,

EIS is subscribed at http://planet.go-ooo.org/
It seems, that the URL's refer to internal pages 
(http://so-web.germany.sun.com/).

Is there a chance to restore the old behavior?

Regards

Peter

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



Re: [dev] Changing the default Java for OOo from command line

2006-06-08 Thread Peter Eberlein

Hi Tobias,

http://en.wikipedia.org/wiki/Sed

Regards
Peter

Tobias Krais schrieb:

Hi Tom,


Well if you are on linux a simple sed command could change the used
JDK or am I missing something. This could surely done also on win32 but
I have no idea on win32-scripting. The information is stored on my
system in:

[EMAIL PROTECTED]:~tom/.openoffice/user/config/javasettings_Linux_x86.xml


tell me more! I know this file. But what do you mean with the sed
command? How is it used?

Greetings, Tobias

[...]

-
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] suppress popup of InputFields when opening a template

2006-06-02 Thread Peter Eberlein

Hi Christoph,


Christoph Lutz schrieb:

Hi Mathias,


 is there a way to suppress the popup of InputFields when I open a

 template
  that contains InputFields?

No. If a document or a template is opened via UI all dialogs are allowed
by default. Suppressing them needs dispatch interception but I don't see
the point in doing it. Can you explain?



As a migration-strategy we would like to do a soft-migration from MS-Office
to OOo. This means we have users working parallel either with MSO or OOo 
and
with document-templates in .dot AND .ott-Format. There are about 
(estimated)

3000 dot-templates which should be accessed from OOo and don't contain
complex content, but Word's Text-FormFields. As you surely know, Word's
simple Text-FormFields which are very common in all of our .dot-Templates
are mapped to InputFields in OOo which behave different. The two main
advantages of Word's TextFields are:

1) Direct editing is possible (without popup) which provides a much better
overview of the document and the editing-result.
2) you can navigate through the Fields using the TAB-Key.
3) the user can decide by himself when it's time to fillout the Fields.

OOo's popping-up InputFields are much more annoying in this point:
1) the automatic popup overlays the interesting field which harms the
overview of the document.
2) navigation with TAB is not possible and pressing Enter in the dialog
causes the cursor to jump to the next line, not to the next InputField.
There is no easy way to navigate to the next InputField leafing the finges
on the keyboard (you have to use the mouse to press OK - YES, 5 times
pressing SHIFT+TAB works also, but this is not a real alternative)
3) You can not decide when you want to fill the fields as the popup comes
automatically on load-time.

Of course, InputFields work, but our users would not accept them in the
direct competition between MSO and OOo!

Since we don't expect OOo to provide the missing feature in the near 
future,

we decided to provide a workaround for the unwanted behaviour of
InputFields:
We would like to collect all inputFields and join all the single
dialog-windows into one large (selmade AWT) dialog-window that is diplayed
beside(!) the office-document. Users can fill in the values und use the
tab-key as used. There will be no window overlaying the document.



Why not converting the input-fields automatically into user fields and 
resaving the templates, so that you can use your (modified) program (of 
course before the user work with them)?



The corresponding program listens on the ON_NEW-Event of the
GlobalEventDispatcher, but this Event is only called AFTER the automatic
popup of inputFields. I am asking the above question, because I want my 
code

to run without the automatic popup.

Hope this helped to understand my point



of course this doesn't help at the moment,
but please take a look at the issue forms handling in OO 2.x/3.0
http://qa.openoffice.org/issues/show_bug.cgi?id=65951

I appreciate any comments.

Peter

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



Re: [dev] Encrypted Basic modules can't be modified?

2005-12-13 Thread PETER EBERLEIN

Hi Jürgen,

thx for the fast answer,

Peter

Jürgen Schmidt schrieb:

Hi Peter,

Peter Eberlein wrote:


Hi,

can somebody reproduce the three following bugs:

1. Create a new basic library and encrypt it with a password.
2. Close the office and restart it.
3. Modify the macro in your encrypted module, push the save-button and 
close the office.

4. Restart the office. Changes are not saved.



i can't reproduce this behaviour on a m143, seems to be fixed in OO.o2.0.1



It doesn't matter, if the library was created in the shared or in the 
user folder.

Read only status of the script.xlb is false of course.

Next:

1. Restart the office
2. Make a typo in the password dialog while opening your library.
3. Basic module is shown, but without any content.
4. You can't access your library until you have restarted your
   whole office.



i can reproduce this behaviour, pleases submit an issue. I have no 
workaround in place.

But the issue is important and we have to fix it asap.


Done, issue 59247





Next:

1. Try to delete the password (replacing by an empty string).
   You will get a general input- output error. The new password
   () will not be saved.
2. Try another password. It will not be saved.



i can't reproduce this behaviour on a m143, seems to be fixed in OO.o2.0.1

Juergen




I deployed a lot of macros to the users and have to change them now. 
So what? Any workaround?


OpenOffice 2.0 and WinNT SP6

Regards

Peter



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



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



[dev] Encrypted Basic modules can't be modified?

2005-12-12 Thread Peter Eberlein

Hi,

can somebody reproduce the three following bugs:

1. Create a new basic library and encrypt it with a password.
2. Close the office and restart it.
3. Modify the macro in your encrypted module, push the save-button and 
close the office.

4. Restart the office. Changes are not saved.

It doesn't matter, if the library was created in the shared or in the 
user folder.

Read only status of the script.xlb is false of course.

Next:

1. Restart the office
2. Make a typo in the password dialog while opening your library.
3. Basic module is shown, but without any content.
4. You can't access your library until you have restarted your
   whole office.

Next:

1. Try to delete the password (replacing by an empty string).
   You will get a general input- output error. The new password
   () will not be saved.
2. Try another password. It will not be saved.


I deployed a lot of macros to the users and have to change them now. So 
what? Any workaround?


OpenOffice 2.0 and WinNT SP6

Regards

Peter



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



Re: [dev] Bug? Creating document based on template locks template file

2005-09-15 Thread Peter Eberlein

Hi Matthias,

I can confirm this (for m125 and Windows), you should file an issue.
It's a rc-stopper too, I think.

Peter

Matthias Benkmann schrieb:

I've noticed that when I create a document based on a template (e.g.
double-click the .ott file which creates a new Untitled1 document) the
template file is locked until I close the Untitled1 file. I'm pretty
sure that this didn't happen with earlier version (I'm on 1.9.125
now).
Is this a bug? I see no reason for OOo to keep a hold on the template
file once the Untitled1 document has been created. Should I file a bug
report?

Matthias

-
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] Options-Dialog, MacroSecurityLevel 3 , subfolders and http://

2005-09-05 Thread Peter Eberlein

Hi,

adding http://MyServer/* and/or file:///v:/* to the string list of the 
SecureURL in the common.xcu seems not to work.


Most of our templates reside on dozens of subfolders on our http-server.
Is there a way to work with subfolders on the highest security level?

Regards

Peter

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



Re: [dev] starbasic strcmp function

2005-08-29 Thread Peter Eberlein

Hi Sven,




So where did you find the info on the StarBasic runtime functions?


F1 in the Basic IDE is your friend here...

Regards,

Peter

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



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



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



Re: [dev] How to integrate Javamail for MailMerge.

2005-05-26 Thread Peter Eberlein

Hi Roderick,
you can install the javamail correctly, but you can't use it. Even if 
you copy the files from the staroffice 8 Beta (email.jar and *.xcu IIRC) 
to your OpenOffice, it will not work as long as SUN blocks.


Please take a look at the issues 44253 and 11244,

Regards
Peter


G. Roderick Singleton schrieb:

First apologies for the cross posts. The reply-to header points to
documentation for ease of collecting the information.

Help is needed on how to add javamail for mail merges in OOo 2.0 to the
setup guide. Please add a step-by-step to 
http://www.openoffice.org/issues/show_bug.cgi?id=37513 so this

information can be integrated.

Other bits of the guide also need instructions. For example, installing
under Solaris, Gentoo, BSD et cetera. For the most part what is there is
guesses on my part and those reviewing. 


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