Hello

this is a call for discussion to a change request within the Abi framework.
Since this change will be widespread all along the code on any platform I
want to start discussing it first.

The problem: currently AbiWord specifies every file thru file path. But
system like MacOS discurage the use of file path to specify a file. Some
other like BeOS recommend to not use them.

Solution:
Change any file referencing in AbiWord from a file path to a UT_FileSpec
that will allow custom file specification that the platform use. 

here is a sample definition of the class.


class UT_FileSpec 
{
public:
    UT_FileSpec();
    virtual ~UT_FileSpec();
    void getPath (UT_String & path) = 0;
    void setPath (const UT_String & path) = 0;
}

Then platform will have:

class UT_MacFileSpec
  : public UT_FileSpec
{
public:
    UT_MacFileSpec();
    virtual ~UT_MacFileSpec();
    void getPath (UT_String & path);
    void setPath (const UT_String & path);
    
    void getSpec (FSSpec & fss);
    void setSpec (const FSSpec & fss);
}

Then you change everything including PD_Document, XAP_Dialog_OpenSaveAs,
etc. to take a UT_FileSpec and not a const char *

If we agree on this I propose to change this for post-0.9
Semantics does not really change. Only the abstraction level. Implementation
for UINX and Win32 should be trivial.

We can extend it later to handle IO (in another class).

Any comment ?

Hub

Reply via email to