Hi Mikhail,

Thanks to Frank's fix, I can dump the two dialogs in the specification with the tool, please find the sample doc and the generated files in the attachment.

And I need your advice on the following issues:
- Currently the layout is adjusted according to the en-US strings, I fear that a localized string with larger length ( e.g. de ) will be trimmed, maybe we should leave more spaces in the label field or is there a more flexible solution? - I attempted to modify the strings for de in the .src file, in VS2003, when I was to save the changes, the IDE reminded me to save with encoding, I'm a little confused about the many choices in the comboboxes of "Encoding" and "Line endings". Would "Unicode - Codepage 1200" and "Unix(LF)" be OK?

I'm looking forward to your guidance.

Thanks and Best Regards,
Felix.


P.S.: I find some small problems in the basic dialog editor,:
- Open a sample doc with dialogs, then open the Basic Macro Organizer, the dialogs under the doc cannot be displayed in the tree view, I have to open a dialog from "My Dialogs" or "OpenOffice.org Dialogs" to open the dialog editor, then access the dialogs in docs from the "Current Library" combobox. After the dialogs be opened, the corresponding items in tree view become properly displayed, too. - When the "With Title Bar" property of a dialog is set to "Yes", adjusting the "Height" or "Width" properties will result in unwanted values. For example, in the sample file every time when the value in "Height" field is changed, the value of "Width" field automatically jumps up by 3, changing "Width" causes similar problem.

I wonder if those issues are still unfiled.



Mikhail Voitenko
Hi Felix,

The author of the dialogdump tool will investigate the problem when he has time, but currently he is very busy so we should proceed further.

First of all please change the basic dialog so that the help, cancel and ok buttons do not have any text ( Label property in the dialog editor ). Instead of that they should have the related type ( Button type in the dialog editor ).

After that please let the dialogdump generate the output without using the file ( as you did already ). The output contains contents of the .hrc and .src files. Additionally it contains the beginning of the .hxx file ( the exception will have to be filtered out :) ). Having this files you can try to create the implementation of the dialog.

A number of examples of such implementation can be found in uui project ( they are represented by four files ".hrc, .src, .hxx, .cxx" with the same prefix. I do not know any documentation regarding the creation of such dialogs, so please ask questions based on the examples.

Best Regards,
Mikhail.


Zhang Xiaofei wrote:
[...]

Mikhail Voitenko
[...]

Attachment: i21293_sample.odt
Description: application/vnd.oasis.opendocument.text

/*************************************************************************
*
*  OpenOffice.org - a multi-platform office productivity suite
*
*  $RCSfile: Generator.java,v $
*
*  $Revision: 1.2 $
*
*  last change: $Author: fs $ $Date: 2006/09/05 08:26:35 $
*
*  The Contents of this file are made available subject to
*  the terms of GNU Lesser General Public License Version 2.1.
*
*
*    GNU Lesser General Public License Version 2.1
*    =============================================
*    Copyright 2005 by Sun Microsystems, Inc.
*    901 San Antonio Road, Palo Alto, CA 94303, USA
*
*    This library is free software; you can redistribute it and/or
*    modify it under the terms of the GNU Lesser General Public
*    License version 2.1, as published by the Free Software Foundation.
*
*    This library is distributed in the hope that it will be useful,
*    but WITHOUT ANY WARRANTY; without even the implied warranty of
*    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
*    Lesser General Public License for more details.
*
*    You should have received a copy of the GNU Lesser General Public
*    License along with this library; if not, write to the Free Software
*    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
*    MA  02111-1307  USA
*
************************************************************************/

#ifndef PASSWORDDLG_HXX
#include "PasswordDlg.hxx"
#endif

#ifndef PASSWORDDLG_HRC
#include "PasswordDlg.hrc"
#endif

//=====================================================================
//= SetANewPasswordDialog
//=====================================================================
//---------------------------------------------------------------------
SetANewPasswordDialog::SetANewPasswordDialog( Window* _pParent )
    :ModalDialog( _pParent, ResId( DLG_SET_A_NEW_PASSWORD ) )
        // TODO: check whether ResId is appropriate here.
        // TODO: You probably want to replace this with the resource id class 
for your module.
    ,m_aLabel1           ( this, ResId( FT_LABEL_1 )             )
    ,m_aTextField1       ( this, ResId( ED_TEXT_FIELD_1 )        )
    ,m_aTextField2       ( this, ResId( ED_TEXT_FIELD_2 )        )
    ,m_aCommandButton1   ( this, ResId( PB_COMMAND_BUTTON_1 )    )
    ,m_aCommandButton2   ( this, ResId( PB_COMMAND_BUTTON_2 )    )
    ,m_aCommandButton3   ( this, ResId( PB_COMMAND_BUTTON_3 )    )
    ,m_aLabel2           ( this, ResId( FT_LABEL_2 )             )
    ,m_aLabel3           ( this, ResId( FT_LABEL_3 )             )
    ,m_aFixedLine1       ( this, ResId( FL_FIXED_LINE_1 )        )
{
    m_aTextField1.SetEchoChar( '*' );

    m_aTextField2.SetEchoChar( '*' );

    FreeResource();
}

//=====================================================================
//= EnterPasswordDialog
//=====================================================================
//---------------------------------------------------------------------
EnterPasswordDialog::EnterPasswordDialog( Window* _pParent )
    :ModalDialog( _pParent, ResId( DLG_ENTER_PASSWORD ) )
        // TODO: check whether ResId is appropriate here.
        // TODO: You probably want to replace this with the resource id class 
for your module.
    ,m_aEnterPasswordDlg2    ( this, ResId( FT_ENTER_PASSWORD_DLG_2 )    )
    ,m_aTextField1           ( this, ResId( ED_TEXT_FIELD_1 )            )
    ,m_aCommandButton2       ( this, ResId( PB_COMMAND_BUTTON_2 )        )
    ,m_aCommandButton3       ( this, ResId( PB_COMMAND_BUTTON_3 )        )
    ,m_aCommandButton1       ( this, ResId( PB_COMMAND_BUTTON_1 )        )
    ,m_aFixedLine1           ( this, ResId( FL_FIXED_LINE_1 )            )
{
    m_aTextField1.SetEchoChar( '*' );

    FreeResource();
}

/*************************************************************************
*
*  OpenOffice.org - a multi-platform office productivity suite
*
*  $RCSfile: Generator.java,v $
*
*  $Revision: 1.2 $
*
*  last change: $Author: fs $ $Date: 2006/09/05 08:26:35 $
*
*  The Contents of this file are made available subject to
*  the terms of GNU Lesser General Public License Version 2.1.
*
*
*    GNU Lesser General Public License Version 2.1
*    =============================================
*    Copyright 2005 by Sun Microsystems, Inc.
*    901 San Antonio Road, Palo Alto, CA 94303, USA
*
*    This library is free software; you can redistribute it and/or
*    modify it under the terms of the GNU Lesser General Public
*    License version 2.1, as published by the Free Software Foundation.
*
*    This library is distributed in the hope that it will be useful,
*    but WITHOUT ANY WARRANTY; without even the implied warranty of
*    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
*    Lesser General Public License for more details.
*
*    You should have received a copy of the GNU Lesser General Public
*    License along with this library; if not, write to the Free Software
*    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
*    MA  02111-1307  USA
*
************************************************************************/

#ifndef PASSWORDDLG_HRC
#define PASSWORDDLG_HRC

// global identifiers
// TODO: You surely want to move those to another, central file
#define DLG_SET_A_NEW_PASSWORD    ( 256 + 1 )
#define DLG_ENTER_PASSWORD        ( 256 + 2 )

// local identifiers
#define PB_COMMAND_BUTTON_2     1
#define ED_TEXT_FIELD_1         2
#define FT_LABEL_2              3
#define FT_ENTER_PASSWORD_DLG_2 4
#define FT_LABEL_3              5
#define ED_TEXT_FIELD_2         6
#define FL_FIXED_LINE_1         7
#define PB_COMMAND_BUTTON_1     8
#define PB_COMMAND_BUTTON_3     9
#define FT_LABEL_1              10


#endif // PASSWORDDLG_HRC
/*************************************************************************
*
*  OpenOffice.org - a multi-platform office productivity suite
*
*  $RCSfile: Generator.java,v $
*
*  $Revision: 1.2 $
*
*  last change: $Author: fs $ $Date: 2006/09/05 08:26:35 $
*
*  The Contents of this file are made available subject to
*  the terms of GNU Lesser General Public License Version 2.1.
*
*
*    GNU Lesser General Public License Version 2.1
*    =============================================
*    Copyright 2005 by Sun Microsystems, Inc.
*    901 San Antonio Road, Palo Alto, CA 94303, USA
*
*    This library is free software; you can redistribute it and/or
*    modify it under the terms of the GNU Lesser General Public
*    License version 2.1, as published by the Free Software Foundation.
*
*    This library is distributed in the hope that it will be useful,
*    but WITHOUT ANY WARRANTY; without even the implied warranty of
*    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
*    Lesser General Public License for more details.
*
*    You should have received a copy of the GNU Lesser General Public
*    License along with this library; if not, write to the Free Software
*    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
*    MA  02111-1307  USA
*
************************************************************************/

#ifndef PASSWORDDLG_HXX
#define PASSWORDDLG_HXX

#include <vcl/dialog.hxx>

#include <vcl/edit.hxx>
#include <vcl/fixed.hxx>
#include <vcl/button.hxx>


//=====================================================================
//= SetANewPasswordDialog
//=====================================================================
class SetANewPasswordDialog : public ModalDialog
{
private:
    FixedText       m_aLabel1;
    Edit            m_aTextField1;
    Edit            m_aTextField2;
    OKButton        m_aCommandButton1;
    CancelButton    m_aCommandButton2;
    HelpButton      m_aCommandButton3;
    FixedText       m_aLabel2;
    FixedText       m_aLabel3;
    FixedLine       m_aFixedLine1;

public:
    SetANewPasswordDialog( Window* _pParent );
};

//=====================================================================
//= EnterPasswordDialog
//=====================================================================
class EnterPasswordDialog : public ModalDialog
{
private:
    FixedText       m_aEnterPasswordDlg2;
    Edit            m_aTextField1;
    OKButton        m_aCommandButton2;
    CancelButton    m_aCommandButton3;
    HelpButton      m_aCommandButton1;
    FixedLine       m_aFixedLine1;

public:
    EnterPasswordDialog( Window* _pParent );
};


#endif // PASSWORDDLG_HXX
/*************************************************************************
*
*  OpenOffice.org - a multi-platform office productivity suite
*
*  $RCSfile: Generator.java,v $
*
*  $Revision: 1.2 $
*
*  last change: $Author: fs $ $Date: 2006/09/05 08:26:35 $
*
*  The Contents of this file are made available subject to
*  the terms of GNU Lesser General Public License Version 2.1.
*
*
*    GNU Lesser General Public License Version 2.1
*    =============================================
*    Copyright 2005 by Sun Microsystems, Inc.
*    901 San Antonio Road, Palo Alto, CA 94303, USA
*
*    This library is free software; you can redistribute it and/or
*    modify it under the terms of the GNU Lesser General Public
*    License version 2.1, as published by the Free Software Foundation.
*
*    This library is distributed in the hope that it will be useful,
*    but WITHOUT ANY WARRANTY; without even the implied warranty of
*    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
*    Lesser General Public License for more details.
*
*    You should have received a copy of the GNU Lesser General Public
*    License along with this library; if not, write to the Free Software
*    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
*    MA  02111-1307  USA
*
************************************************************************/

#ifndef PASSWORDDLG_HRC
#include "PasswordDlg.hrc"
#endif

ModalDialog DLG_SET_A_NEW_PASSWORD
{
    Pos = MAP_APPFONT( 145, 80 );
    Size = MAP_APPFONT( 145, 129 );

    Text [ de ] = ""Enter Password"";
    Text [ en-US ] = ""Enter Password"";

    FixedText FT_LABEL_1
    {
        Pos = MAP_APPFONT( 3, 4 );
        Size = MAP_APPFONT( 139, 9 );

        Text [ de ] = ""Enter password"";
        Text [ en-US ] = ""Enter password"";

        Border = FALSE;
        TabStop = FALSE;
    };

    Edit ED_TEXT_FIELD_1
    {
        Pos = MAP_APPFONT( 3, 17 );
        Size = MAP_APPFONT( 139, 13 );


        Border = TRUE;
    };

    Edit ED_TEXT_FIELD_2
    {
        Pos = MAP_APPFONT( 3, 47 );
        Size = MAP_APPFONT( 139, 13 );


        Border = TRUE;
    };

    OKButton PB_COMMAND_BUTTON_1
    {
        Pos = MAP_APPFONT( 27, 110 );
        Size = MAP_APPFONT( 37, 15 );


    };

    CancelButton PB_COMMAND_BUTTON_2
    {
        Pos = MAP_APPFONT( 66, 110 );
        Size = MAP_APPFONT( 37, 15 );


    };

    HelpButton PB_COMMAND_BUTTON_3
    {
        Pos = MAP_APPFONT( 105, 110 );
        Size = MAP_APPFONT( 37, 15 );


    };

    FixedText FT_LABEL_2
    {
        Pos = MAP_APPFONT( 3, 34 );
        Size = MAP_APPFONT( 139, 9 );

        Text [ de ] = ""Reenter password"";
        Text [ en-US ] = ""Reenter password"";

        Border = FALSE;
        TabStop = FALSE;
    };

    FixedText FT_LABEL_3
    {
        Pos = MAP_APPFONT( 4, 64 );
        Size = MAP_APPFONT( 137, 40 );

        Text [ de ] = ""WARNING: If you lose or forget the password, it cannot 
be recovered. It is advisable to keep passwords in a safe place. Passwords are 
case-sensitive and at least five characters long."";
        Text [ en-US ] = ""WARNING: If you lose or forget the password, it 
cannot be recovered. It is advisable to keep passwords in a safe place. 
Passwords are case-sensitive and at least five characters long."";

        Border = FALSE;
        WordBreak = TRUE;
    };

    FixedLine FL_FIXED_LINE_1
    {
        Pos = MAP_APPFONT( 0, 104 );
        Size = MAP_APPFONT( 145, 6 );


    };

};

ModalDialog DLG_ENTER_PASSWORD
{
    Pos = MAP_APPFONT( 145, 78 );
    Size = MAP_APPFONT( 145, 75 );

    Text [ de ] = ""Enter Password"";
    Text [ en-US ] = ""Enter Password"";

    FixedText FT_ENTER_PASSWORD_DLG_2
    {
        Pos = MAP_APPFONT( 3, 4 );
        Size = MAP_APPFONT( 139, 28 );

        Text [ de ] = ""Enter password to open file: %DOCUMENTPATHANDNAME%"";
        Text [ en-US ] = ""Enter password to open file: %DOCUMENTPATHANDNAME%"";

        Border = FALSE;
        WordBreak = TRUE;
    };

    Edit ED_TEXT_FIELD_1
    {
        Pos = MAP_APPFONT( 3, 35 );
        Size = MAP_APPFONT( 139, 13 );


        Border = TRUE;
    };

    OKButton PB_COMMAND_BUTTON_2
    {
        Pos = MAP_APPFONT( 27, 56 );
        Size = MAP_APPFONT( 37, 15 );


    };

    CancelButton PB_COMMAND_BUTTON_3
    {
        Pos = MAP_APPFONT( 66, 56 );
        Size = MAP_APPFONT( 37, 15 );


        TabStop = TRUE;
    };

    HelpButton PB_COMMAND_BUTTON_1
    {
        Pos = MAP_APPFONT( 105, 56 );
        Size = MAP_APPFONT( 37, 15 );


    };

    FixedLine FL_FIXED_LINE_1
    {
        Pos = MAP_APPFONT( 0, 50 );
        Size = MAP_APPFONT( 145, 6 );


    };

};


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

Reply via email to