[dev] How to remove Database from File/New

2006-09-05 Thread Matthias Benkmann

Is it possible to remove the Database entry from File/New?

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



Re: [dev] How to remove Database from File/New

2006-09-05 Thread Matthias Benkmann

On 9/5/06, Frank Schönheit - Sun Microsystems Germany
[EMAIL PROTECTED] wrote:

Hi Matthias,

 Is it possible to remove the Database entry from File/New?

see share/registry/org/openoffice/Office/Common/Common-base.xcu in your
installation.


Thanks.  It's share/registry/MODULES/..., though :-)

Matthias

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



[dev] Can I listen for changes of the view cursor?

2006-08-03 Thread Matthias Benkmann

I'd like to know if there's a way to get informed whenever the user
has moved the view cursor. I've looked at the IDL and the dev guide
but I can't seem to find a function/interface for this.

Matthias

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



Re: [dev] Where do control colors come from?

2006-07-21 Thread Matthias Benkmann

Well, I know for a fact that on the system I have here at work,
changing the color theme in KDE changes the colors of the checkboxes.
Don't ask me why.

Matthias

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



[dev] Where do control colors come from?

2006-07-10 Thread Matthias Benkmann

I've just noticed that form controls have different colors (i.e.
different shades of gray for the 3D-borders) under Windows and Linux.
Where do those colors come from? I'd like to make OOo under Linux look
exactly like OOo under Windows. How do I achieve this?

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



Re: [dev] Where do control colors come from?

2006-07-10 Thread Matthias Benkmann

On 7/10/06, Frank Schönheit - Sun Microsystems Germany
[EMAIL PROTECTED] wrote:

Hi Matthias,

 I've just noticed that form controls have different colors (i.e.
 different shades of gray for the 3D-borders) under Windows and Linux.
 Where do those colors come from? I'd like to make OOo under Linux look
 exactly like OOo under Windows. How do I achieve this?

There shouldn't be a difference between Windows and Linux, there's only
a difference between the document types. For a text document, controls
by default have a 3D border, while for embedded database forms they have
a flat border in a light gray color. You can, however, always switch the
border of a color in a text document to flat, and change its border
color as you like (in the property browser).


When I create a new empty document, use View/Toolbars/Form Controls to
get the Form Controls toolbar, then select Checkbox and put a checkbox
into the document I get the following colors under Windows 2000.

top and left outside: #808080
top and left inside: #404040
bottom and right: #d4d0c8

When I save this document and open it under Linux, I get the following colors:
top and left outside: #adaead
top and left inside: #00
bottom and right: #efefef


If you really have one document which looks different on Windows and
Linux, then I'd call this a bug.


I don't know. One could argue that the checkboxes should be consistent
with other checkboxes, which would  require using Operating System
colors. I assume that's what OOo does currently and in fact that's
what I'm interested in. If OOo gets these colors from OS settings,
which are those? Settings from GTK? Something else?

Ciao

Matthias

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



Re: [dev] Where do control colors come from?

2006-07-10 Thread Matthias Benkmann

On 7/10/06, Frank Schönheit - Sun Microsystems Germany
[EMAIL PROTECTED] wrote:

The colors you describe - are they from the theming of your OS?


Indeed, they do seem to react to the KDE Color Theme I select in kcontrol.
I should have tried this earlier.

Thanks. That's all I wanted know.

MSB

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



Re: [dev] Why are the language packs so hard to find?

2006-04-11 Thread Matthias Benkmann
On 4/7/06, Sigrid Kronenberger [EMAIL PROTECTED] wrote:
 But I can tell you, where you can find the langauge-packs:
 Hope, this helps.

Thanks.

Matthias

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



[dev] Why are the language packs so hard to find?

2006-04-06 Thread Matthias Benkmann
I need an OpenOffice that I can switch between English and German, so
I either need a German version with Englisch language pack or the
other way around. Now every time a new OOo version comes out I start
hunting for a language pack. And I'm always disappointed that no
matter where I click on www.openoffice.org I just can't find a
download link for language packs. Why is that?
And where do I find language packs for OOo 2.0.2?

Matthias

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



[dev] How to bring OpenOffice window to front

2006-02-02 Thread Matthias Benkmann
I have the problem that when I launch a new OOo window with
loadComponentFromURL() it doesn't always come to the front. Sometimes
its button just blinks in the Windows task bar and I have to click it
manually to bring it to the front. Is there a way to programmatically
bring the window to the front?
XTopWindow.toFront() and XWindow.setFocus() don't do the trick as they
only work relative to other OOo windows not non-OOo windows.

Matthias

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



Re: [dev] Preview window with OOoBean ?

2006-02-01 Thread Matthias Benkmann
On 1/31/06, Mathias Bauer [EMAIL PROTECTED] wrote:
 Matthias Benkmann wrote:

  On 1/31/06, Mathias Bauer [EMAIL PROTECTED] wrote:

 Previews don't have scrollbars in OOo and a preview in OOo always has a
 fixed part of the document. I thought the Preview mode is the right
 choice because you wrote that you wanted a preview window.
 Obviously that's not the case.

Well, it's a preview with respect to my application, but I still want
to offer the user the ability to see all of the document, so indeed
OOo's notion of Preview mode doesn't seem to be what I want.

 So I think that the only way to go is switching of the UI explicitly.
 First you should load the document in readonly mode and then you need to
  switch off the Layout Manager object of the frame you are loading the
 document into.

 The Layout Manager is a property of the frame that - surprise! ;-) - is
 named LayoutManager (IIRC). You can call lock() and
 setVisible(False) on it. This will remove all toolbar and the menu.

I'll try that, thanks.

Matthias

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



[dev] Observing changes of input fields

2006-01-31 Thread Matthias Benkmann
I'd like to be notified if the the user changes the contents of an
input field. I registered a PropertyChangeListener and a
VetoableChangeListener on the textfield's Content property, but I'm
not seeing any events. Now I've found the following in section 7.3.2
of the Dev Guide:

However, the objects implemented in the writer do not provide
properties that support
com.sun.star.beans.XPropertyChangeListener or
com.sun.star.beans.XVetoableChangeListener yet.

Do I read this correctly that none of the objects in writer (including
text fields) support these 2 interfaces? Is there any other way to
track changes to input fields?

Matthias

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



[dev] Preview window with OOoBean ?

2006-01-30 Thread Matthias Benkmann
I'm developing a Java app that let's the user fill out a form. The
Java app uses this data to create a document in Writer.  I would like
to offer the user a preview window that integrates as seemlessly as
possible with the Java app.

I thought I could use the OOoBean for that purpose, however I have the
problem that the bean always contains the complete Writer GUI, with
menu bar, toolbars,...  Even worse, if the user had the Styles and
Formatting window open the last time he used writer, then when I show
the OOoBean, I get a Styles and Formatting window, too.

What should I do to get rid of all of this? All I want is the document
view with no editing GUI elements and no additional windows.  I guess
that I can get rid of the menu and toolbars with the Programmatic
Control of Menu and Toolbar features, but what about windows such as
Styles and Formatting? How do I enumerate and close all of those? And
is closing them really the only way? I'd much prefer to not have them
pop up in the first place, because having a window appear and
disappear confuses the user. Suggestions are very much welcome.

Matthias

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



[dev] How to add item category to Tools/Customize

2006-01-12 Thread Matthias Benkmann
Is it possible to create a new item category that will be listed in
Tools/Customize/Add../Category  and to put custom commands into it? I
know I can create macros that will appear in the OpenOffice.org macros
category, but this is not what I want. I want to create a custom Java
component with its own command category and commands.  Is this
possible?

Ciao

Matthias

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



Re: [dev] How to add item category to Tools/Customize

2006-01-12 Thread Matthias Benkmann
On 1/12/06, Carsten Driesner [EMAIL PROTECTED] wrote:

  From my point of view you should provide all functions of your
 component with an add-on (menu bar, toolbar, popup menu in the add-on
 menu).

Well, the functionality I want to provide is not supposed to be
visible by default, nor do I wish to force a certain menu/toolbar
location on the user. I'd like the user to determine if and where he
can access the function. I think I'll create a macro library whose
functions simply call the Java component. Then the user can add the
respective macros via Tools/Customize.../Add..   Not as elegant as
having my own category but it should work. The only problem then is
that I can't provide predefined icons for my functions.

Matthias

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



Re: [dev] How to add item category to Tools/Customize

2006-01-12 Thread Matthias Benkmann
 May be you want to write a request for enhancement as we think to extend
 our add-on concept for the next major version. Any information what
 external developers need can be of great value for us.

Done.

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


Matthias

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



[dev] How to scroll view to make a certain location visible?

2005-12-29 Thread Matthias Benkmann
I'd like to scroll the view of a writer document so that a given
bookmark will be visible or at least that the page the bookmark is on
is visible. Can someone give me a clue how to achieve that?
The interface XPageCursor allows me to jump to a given page number,
but how do I get the page number of my bookmark? Or is there another
way to achieve my goal? All ideas and pointers to relevant interfaces
are appreciated.

Ciao

Matthias

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



Re: [dev] Programmatic control of Toolbar Items: ComboBox possible?

2005-11-08 Thread Matthias Benkmann
On 9/23/05, Carsten Driesner [EMAIL PROTECTED] wrote:
 Matthias Benkmann wrote:

  That did the trick. Thanks for all your help so far. Now there's just
  one little cosmetic thing: How do we specify the size of the ComboBox
  so that it scales with the system font. Currently we're supplying
  absolute pixel values.

 Hi Matthias,

 the OOo toolbar implementation scales all item windows automatically.
 Unluckily there is no API which gives you a notification when the user
 has changed the UI system font. The best solution I am aware of is, try
 to determine which system font is used for the combo box. Use the font
 metric information to set a generic width which is appropriate for your
 needs.

Thanks. The width aspect is okay now. But what about the height? I'd
like to have my ComboBox always have the same height as the ComboBoxes
OOo has by default, such as the font selector. I could empirically
determine a factor to multiply the font height with that results in
the size being the same as the font selector, but that doesn't seem
like a robust solution. How does the font selector ComboBox determine
its height? Is there a formula I can copy?  Maybe a pointer to the
appropriate source file and method in the OOo sources where the height
is computed for the font selector could help me.

Ciao

Matthias

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



Re: [dev] Toolbar add-ons - Text, Combo Box entries

2005-10-18 Thread Matthias Benkmann
There is a thread about adding a ComboBox to a toolbar:

http://www.openoffice.org/servlets/ReadMsg?list=devmsgNo=14674

Matthias

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



[dev] Zero width space not displayed properly

2005-10-18 Thread Matthias Benkmann
When I insert a zero width space (unicode 200B hex) it is only
displayed properly (i.e. not as a box) if I format it and the
preceding character in OpenSymbol font. If I format just the ZWSP as
OpenSymbol, it's still shown as a box.

Is that a bug or just some weird feature of unicode characters and/or
fonts that I'm not aware of?  Does someone have an idea what other
invisible zero-width entity works better (anything invisible and
zero-width will do)?

Matthias

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



Re: [dev] Where does com.sun.star.script.BasicIDE come from?

2005-09-23 Thread Matthias Benkmann
On 9/22/05, Stephan Bergmann [EMAIL PROTECTED] wrote:

 Unfortunately, services.rdb and service descriptions in UNOIDL have
 little in common:

Interesting. Could you give me a little background information on how
services.rdb is generated during the build of OOo? I was under the
(apparently mistaken) impression that it's compiled from the *.idl
files. If that's not the case, how does e.g.
com.sun.star.script.BasicIDE get into services.rdb? Which
commands/source files put it there?

 That there is no UNOIDL description of that service IMO is an error,
 for which you should file an issue.

Okay.

http://www.openoffice.org/issues/show_bug.cgi?id=54998

Matthias

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



Re: [dev] Programmatic control of Toolbar Items: ComboBox possible?

2005-09-22 Thread Matthias Benkmann
Does this mailing list discard attachments or am I having a problem
with GMail? Someone told me that my attachment has not arrived on the
list. So here is the code again inline:

public XWindow createItemWindow(XWindow xWindow) {

   // xMSF is set by initialize(Object[])

   try {

   // get XWindowPeer

   XWindowPeer xWinPeer = (XWindowPeer) UnoRuntime.queryInterface(

   XWindowPeer.class, xWindow);



   // create Toolkit-Service

   Object o = xMSF.createInstance(com.sun.star.awt.Toolkit);

   XToolkit xToolkit = (XToolkit) UnoRuntime.queryInterface(

   XToolkit.class, o);



   // create WindowDescriptor

   WindowDescriptor wd = new WindowDescriptor();

   wd.Type = WindowClass.SIMPLE;

   wd.Parent = xWinPeer;

   wd.Bounds = new Rectangle(0, 0, 100, 100);

   wd.ParentIndex = -1;

   wd.WindowAttributes = WindowAttribute.SHOW;

   wd.WindowServiceName = combobox;



   // create ComboBox

   XWindowPeer cBox_xWinPeer = xToolkit.createWindow(wd);

   XComboBox cBox_xComboBox = (XComboBox) UnoRuntime.queryInterface(

   XComboBox.class, cBox_xWinPeer);

   XWindow cBox_xWindow = (XWindow) UnoRuntime.queryInterface(

   XWindow.class, cBox_xWinPeer);



   // add some elements

   cBox_xComboBox.addItems(new String[] { test, foo, bar,

   test2, foo2, bar2 }, (short) 0);

  return cBox_xWindow;

   } catch (com.sun.star.uno.Exception e) {

   return null;

   }

   }

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



Re: [dev] Programmatic control of Toolbar Items: ComboBox possible?

2005-09-22 Thread Matthias Benkmann
On 9/22/05, Carsten Driesner [EMAIL PROTECTED] wrote:

 wd.WindowAttributes = WindowAttribute.SHOW|VclWindowPeerAttribute .DROPDOWN;


That did the trick. Thanks for all your help so far. Now there's just
one little cosmetic thing: How do we specify the size of the ComboBox
so that it scales with the system font. Currently we're supplying
absolute pixel values.

Ciao

Matthias

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



[dev] Where does com.sun.star.script.BasicIDE come from?

2005-09-22 Thread Matthias Benkmann
I wonder where the service com.sun.star.script.BasicIDE comes from.
I've searched the sources for an *.idl file that declares it but
haven't found any. Is it not possible to regenerate the complete
services.rdb just from the *.idl files?

Yours

Matthias

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



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

2005-09-15 Thread Matthias Benkmann
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]



Re: [dev] Strange Bug in StarBasic? Function returning null instead of empty

2005-09-08 Thread Matthias Benkmann
On 9/7/05, Andrew Douglas Pitonyak [EMAIL PROTECTED] wrote:
I don't suppose that you can provide an example that causes theproblem...I tried to use the supplied example and there are issues.

I've just checked the copy of my mail in the archive for this mailing
list and apparently it got mangled during transit (especially
whitespace, e.g. n(0) is supposed to be a string of exactly 100 space
characters). I've attached the code again as a text file. Copy and
paste it into a new module and it should run without errors (and give
the message box This is impossible!. Sorry for the wasted time but
unfortunately GMail doesn't show the mailing list copy of my own mails
so I didn't notice that it was corrupted.
 
Matthias
Sub Main
  Dim n(1) as String
  n(0) =   
  
  n(1) =   
  
  Dim a as Variant

  f(Array(60,10,1,12,20,10,25,30), n(), 0, 76)

End Sub

Function f(splitInfo() as Variant,  daten() as String, i as Long, j as Long) as 
Variant
  If i  UBound(daten) Then
Exit Function
  End If
 
  Dim ret() as String

  for k = 0 to UBound(splitInfo)
restLen = Len(daten(i)) - j
Dim splitPos as Long
splitPos = splitInfo(k)
If splitPos = restLen Then
  j = j + splitPos
Else
  st = Right(daten(i), restLen)
  i = i + 1
  j = 0
  sta = f(Array(splitPos - restLen), daten, i, j)

  If IsNull(sta) Then
MsgBox(This is impossible!)
Exit Function
  End if
 
End If
  next k
 
  f = ret()
End Function
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: [dev] What is OnCopyTo(Done)

2005-09-06 Thread Matthias Benkmann
 
 
 From an API point of view OnCopyTo(Done) is called when storeToURL(...)
 is called on the model while OnSaveAs(Done) is called for storeAsURL(...).
 
 
So in my case (I was getting these events without any user interaction) the 
events were caused by auto-save, right?

Matthias


[dev] What is OnCopyTo(Done)

2005-09-05 Thread Matthias Benkmann
I can't find information on the OnCopyTo(Done) events that I'm receiving on 
my TextDocuments. What are they?

Matthias


[dev] How to make DisableCommandsTest.java disable Tools/Macros?

2005-09-05 Thread Matthias Benkmann
I'm trying to change the DisableCommandsTest.java example to disable the 
Tools/Macros submenu, but I can't find the command name for it. The Macro 
Recorder is no help as it can't record the opening of a submenu. Is it at 
all possible to disable a submenu entry with the code from 
DisableCommandsTest.java or does this only work for entries that perform 
some action, i.e. leaves of the menu tree?

Matthias


[dev] How to add a button to a newly created toolbar?

2005-09-05 Thread Matthias Benkmann
I've managed to create my own toolbar with the following code

layout = thisComponent.CurrentController.Frame.LayoutManager
layout.createElement( private:resource/toolbar/UITest )
layout.showElement( private:resource/toolbar/UITest )

but I can't seem to find a way to add a button to it. Could someone please 
give me a pointer in the right direction. Thanks.

Matthias


[dev] Strange Bug in StarBasic? Function returning null instead of empty

2005-09-02 Thread Matthias Benkmann
I have a problem with a recursive function in one of my macros. The function 
is supposed to either return an array of strings or Empty (in case there's 
not enough input data). However, under some circumstances the function 
mysteriously returns Object/Null instead of Variant/Empty. I'd like to know 
if this is a bug in OOo (I tested 1.9.122 and 1.9.125) or some 
misunderstanding on my part. The following is a chopped down version of my 
code:

Sub Main
Dim n(1) as String
n(0) =  
n(1) =  
Dim a as Variant

f(Array(60,10,1,12,20,10,25,30), n(), 0, 76)

End Sub

Function f(splitInfo() as Variant, daten() as String, i as Long, j as Long) 
as Variant
If i  UBound(daten) Then
Exit Function
End If

Dim ret() as String

for k = 0 to UBound(splitInfo)
restLen = Len(daten(i)) - j
Dim splitPos as Long
splitPos = splitInfo(k)
If splitPos = restLen Then
j = j + splitPos
Else
st = Right(daten(i), restLen)
i = i + 1
j = 0
sta = f(Array(splitPos - restLen), daten, i, j)

If IsNull(sta) Then
MsgBox(This is impossible!)
Exit Function
End if

End If
next k

f = ret()
End Function

As you can see there are only 2 ways out of the function f(). The first one 
is an Exit Function that is called without an assignment to the function's 
return value. On this code path the function is supposed to return 
Variant/Empty. The 2nd way out of the function is after the assignment f = 
ret() which sets the return value to an array of string. There should be no 
way for the function to return Variant/Null, so the condition IsNull(sta) 
should never be true. But strangely it is at some point. If I call the 
function directly from Main with the exact same parameters as the recursive 
call that returns Null, I get Empty as it should be. So it seems that Null 
is returned only in the recursive case.

Can someone give me a clue what's going on? Is this a bug? Should I file a 
bug report?

Matthias


[dev] Programmatic control of Toolbar Items: ComboBox possible?

2005-08-31 Thread Matthias Benkmann
I'd like to know if the new programmatic control of menu and toolbar items 
feature will allow me to create a custom ComboBox in a toolbar. Thanks.

Matthias


Re: [dev] Programmatic control of Toolbar Items: ComboBox possible?

2005-08-31 Thread Matthias Benkmann
On 8/31/05, Carsten Driesner [EMAIL PROTECTED] wrote:
 
 
 If you want to try the hard way, please let me know and I will give a
 summary how you can do it.
 
 
That would be great as I'm currently evaluating different implementation 
options for one of our projects.

Matthias


[dev] Changing cell values from custom sheet function

2005-07-26 Thread Matthias Benkmann
It seems that when I use a custom Basic function in a cell formula,
during the executing of this function, I can't write to any cells.
Statements such as

ThisComponent.Sheets.getByIndex(0).getCellByPosition(4,1).setValue(33)

are silently ignored. Why does this happen? Is there a way around it?
I'm looking for an easy way to trigger a function whenever a cell is
changed. The function is supposed to have full access to the sheet.
What's the most simple way to do this (if I can't just use a Basic
function in the cell formula) ?

Matthias

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



Re: [dev] How to keep users away from Base

2005-07-20 Thread Matthias Benkmann
Hallo Frank,

 For now, this basically only implies that the New database entries are
 removed from various places, including the ones you mentioned.
 Additionally, the data source browser (F4) is removed,

I've just tested m118 without Base and I like the feature set. I
especially like the reduced Base dialog that allows the user to edit
existing databases and to use existing queries but does not allow
saving to another file, creating new tables or queries etc.
From the POV of our policy this seems even more useful than having no
Base UI at all, because that way users can still work with existing
databases provided by the admin but can not create their own.
I also like that the Mail Merge wizard still exists and the
Insert/Fields/Other.../Database tab still works.

 and you cannot
 open DB files from the File|Open dialog. See [1] for details.

Well, in m118 you can open them with File/Open, but there's not filter
for odb files, you have to use All Files.


 If you only want to remove the menu entries, but not the DSB - Hmm. Not
 sure if this is possible, other people might know more about it.

In m118 the DSB can still be invoked programmtically with the code you
helped me write recently. So we can provide our own macro and button
to open it and it's not really a problem that it's gone.

 Removing things like the database registration (Tools|Options|Databases)
 is not possible ATM. 

That was just an idea. As long as users are more or less prevented
from creating their own databases, it doesn't hurt if they have UI to
register them.

  And maybe there's a way to disable the Base GUI completely?
 
 None except disabling it in the setup, with exactly the consequences
 described in [1].

As I've said above, I believe that the reduced Base GUI from m118 is
even better than no GUI.
 
  Any other ideas how I can make life more difficult for users who want
  to use the Base GUI?
 
 One could manually de-register certain UNO services, so that certain
 functionality becomes unavailable. 

How do I do that?

 This could include at least all
 services which are necessary for the UI. If the above doesn't fit your
 needs, this would be the way to go.

Well it looks like the way implemented in m118 would be enough to
solve my problem, although I will have to discuss this with my
superiors before I can be sure. The thing I'm worrying about is how
stable the m118 feature set is. Reading [1]  gives me the impression
that it is not stable, that disabling Base at installation time will
remove more functionality in future.

And if for instance the Mail Merge Wizard disappears completely or
registering databases via UNO stops working, then installing without
Base will no longer be an option for us and we'll be in the same fix
as we're now, only worse, because by that time we'll probably have
established a policy that mandates disabling Base at install time,
that would have to be overturned (which is difficult). To make this
more clear, it won't be a problem for us if there remains a set of
install options to get back the m118 feature set, but if OO.o 2.0
Final ships with only the option to enable or disable Base completely
and disabling removes a crucial feature, then we'll be in big trouble
if we establish a policy now based on the m118 feature set.

Matthias

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



[dev] How to keep users away from Base

2005-07-19 Thread Matthias Benkmann
I'd like to rephrase my question from yesterday regarding local databases:

Where I work we have a policy that says users are not supposed to keep
their own databases. Sophisticated users will, of course, always find
a way, but we'd like to at least remove all the obvious GUI ways to
use local databases. I'd appreciate any ideas on how to discourage
users from creating/registering Base databases.

For instance, it would be a good start to remove Database from the
quickstarter pop-up and the File/New dialog. How would I do that?

And maybe there's a way to disable the Base GUI completely?

Any other ideas how I can make life more difficult for users who want
to use the Base GUI?


Matthias Benkmann

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



[dev] How to restrict local database registration

2005-07-18 Thread Matthias Benkmann
For policy reasons I need to prevent end-users from registering local
databases (i.e. databases stored on the local hard disk) in OpenOffice
via the GUI. Does someone have an idea how to do this while retaining
the ability to register local databases via UNO calls?

Matthias

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



Re: [dev] How to open Data Source Browser

2005-07-08 Thread Matthias Benkmann
Hi Frank, 

thanks again for your help. For the archives, here's the working code
to open the DSB:

Sub openDSB()
  doc = ThisComponent
  frame = doc.getCurrentController().getFrame()
  urlTransformer = createUnoService(com.sun.star.util.URLTransformer)
  Dim url as new com.sun.star.util.URL
  url.Complete = .component:DB/DataSourceBrowser
  urlTransformer.parseStrict(url)
  dispatcher = 
frame.queryDispatch(url,_beamer,com.sun.star.frame.FrameSearchFlag.CHILDREN
+ com.sun.star.frame.FrameSearchFlag.CREATE)
  dispatcher.dispatch(url, Array() )
End Sub

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



[dev] How to open Data Source Browser

2005-07-06 Thread Matthias Benkmann
I'd like to open the DSB from a script. However, all code I could find
(including the code created by recording a macro for the F4 key)
toggles it between on and off. But I want to turn it on
unconditionally, i.e. if it is already open it should STAY open and
not close again.

Thanks for your help.

Matthias

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



Re: [dev] data source not XStorable

2005-06-13 Thread Matthias Benkmann
On 6/10/05, Frank Schönheit - Sun Microsystems Germa ny
[EMAIL PROTECTED] wrote:
 query the data source for XDocumentDataSource, and call its
 getDatabaseDocument method. The object returned there is the one
 implementing the XStorable.

Thank you. That worked.

Matthias

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



[dev] data source not XStorable

2005-06-10 Thread Matthias Benkmann
I'm trying to get the example from the Developer's Guide section
12.2.2  DataSources for adding a new data source to work:

   XSingleServiceFactory xFac =
(XSingleServiceFactory)UnoRuntime.queryInterface(
XSingleServiceFactory.class,
_rMSF.createInstance(com.sun.star.sdb.DatabaseContext));

Object xDs = xFac.createInstance();
XStorable store = (
XStorable)UnoRuntime.queryInterface(XStorable.class, xDs);

 I've tried it in Java and I've tried it in Basic:

  xFac = createUNOService(com.sun.star.sdb.DatabaseContext)
  dataSource = xFac.createInstance()
  MsgBox(dataSource.DBG_supportedInterfaces)

and both times I have the problem that the new data source returned by
 xFac.createInstance() does not implement XStorable. I've tried it
with OO 1.1.4 and 1.9.100 on 2 different computers. It just doesn't
work. Any ideas what's wrong?  Do I have do prepare the
DatabaseContext in some way (left out of the Dev Guide example) before
it will give me useful data sources?

Matthias

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



Re: [dev] How to make OO update table list

2005-05-17 Thread Matthias Benkmann
Hallo Frank,

thanks for your help so far.

 There might be a somewhat cumbersome and pretty roundabout way if you
 want to refresh the data source browser's content (the DSB is the thing
 you get view View-Data Sources). I.e., if you know that the users are
 seeing the data source in a DSB, and you want to refresh this DSB, there
 might be a way. Not sure - but if you say this would be sufficient, we
 could try to find one together :)

I'm not really interested in the DSB. What I really want to do is to
connect an open document that has mail merge fields to a different CSV
file. I played around with DocumentSettings.CurrentDatabaseCommand and
changing this seemed to be what I want. I thought my problem was just
that the value I wanted to set here was the name of a new table that
the running OO instance hadn't picked up. But now it seems that this
won't work, even if I get OO to update the table list.

I think I need to implement the Exchange Database function (see
http://www.openoffice.org/servlets/ReadMsg?list=devmsgNo=13787). If I
manage to do this, then I guess I can just register a new database for
my CSV directory. The newly registered database will naturally have an
up-to-date table list and after doing Exchange Database my mail merge
fields will access the new table. I just hope someone can point me
into the right direction for implementing this function.

Matthias

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



[dev] How to implement Exchange Databases function

2005-05-13 Thread Matthias Benkmann
I'm writing an application that creates CSV-files and automatically
loads a text template for the mail merge function. The mail merge
fields in the template are connected with a text database that refers
to the directory where the CSV files are created.

Because it must be possible to open multiple mail merge documents at
the same time with different data sets, every CSV-file gets a unique
generated name.  Obviously this generated name is different from the
table name the mail merge fields in the template refer to. So what I
need to do is  to make the mail merge fields refer to the proper
database table. Manually I can do this easily with the Edit -
Exchange Database... dialog.

But how do I  script this?  To make this clear, I'm *not* looking for
a way to call the Exchange Database... dialog from a macro.  I want to
get the effect of Exchange Database... from a script without user
intervention, i.e. given the name of a database and/or table, modify
the mail merge fields to refer to the new database/table.

I'm working with OO 2.0 Beta in Java but example code in other
languages is welcome, as are pointers to UNO
services/interfaces/properties that may help me. I also have the OO
sources lying around, so if that could be helpful I'd take a look at
the C++ implementation of Exchange Database... if someone tells me
where I can find it.

Matthias Benkmann

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