Hi,

in the course of UNOizing the Basic IDE (so it will finally be able to
work on documents which are not implemented using the SfxObjectShell), I
stumbled upon SfxObjectShell::Set/GetWorkingDocument.

As I understand it, the WorkingDocument is a dedicated document
(SfxObjectShell, that is), which is used in two places only:

- various configuration dialogs, e.g. for configuring events, toolbars,
  etc., to determine the "current" document which serves as initial
  location for storing the configuration

- sc/source/ui/vba/vbaapplication, where it is used to get/set cursors
  at all frames of the working document


There are 2 situations where the WorkingDocument seems to differ from
the object shell returned by SfxObjectShell::Current:

- when an embedded OLE object is activated
  (not sure whether I read sfx2/source/view/ipclient.cxx:237 correctly
  here)

- when  the BasicIDE switches to an arbitrary document, this one is
  set as WorkingDocument, no matter whether it's the active doc shell
  or not


No, my question is what to do with the usages of
SfxObjectShell::SetWorkingDocument in the BasicIDE ... options are
(ordered by my personal preference):

1. remove Set/GetWorkingDocument and all usages all-together. Such
   global static states are Evil (TM) ('cause prone to breakage),
   anyway. I suppose the VBA wrapper would need to determine its working
   document in another, less random, way.

2. simply remove them from the BasicIDE. If I didn't overlook something,
   then this wouldn't hurt too much.

3. UNOize the functionality, by providing something like

     [attribute, XModel] WorkingDocument;

   in a dedicated new interface, say XDesktop2, at the css.frame.Desktop
   service.


Opinions, anybody? Anybody who can correct/extend what I said about the
semantics/usage of the WorkingDocument?

Thanks & Ciao
Frank

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

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

Reply via email to