Kaydet (Commit) 45dc5f7f authored tarafından Robert Roth's avatar Robert Roth Kaydeden (comit) Caolán McNamara

Object name, description dialog and messagebox ported to UI files

Change-Id: Iad23998c9ccde22abad9d894af3dd6df7c92564f
Reviewed-on: https://gerrit.libreoffice.org/1857Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 71a8f79f
...@@ -58,7 +58,6 @@ $(eval $(call gb_SrsTarget_add_files,cui/res,\ ...@@ -58,7 +58,6 @@ $(eval $(call gb_SrsTarget_add_files,cui/res,\
cui/source/dialogs/commonlingui.src \ cui/source/dialogs/commonlingui.src \
cui/source/dialogs/cuiimapdlg.src \ cui/source/dialogs/cuiimapdlg.src \
cui/source/dialogs/cuires.src \ cui/source/dialogs/cuires.src \
cui/source/dialogs/dlgname.src \
cui/source/dialogs/fmsearch.src \ cui/source/dialogs/fmsearch.src \
cui/source/dialogs/gallery.src \ cui/source/dialogs/gallery.src \
cui/source/dialogs/grfflt.src \ cui/source/dialogs/grfflt.src \
......
...@@ -20,6 +20,7 @@ $(eval $(call gb_UI_add_uifiles,cui,\ ...@@ -20,6 +20,7 @@ $(eval $(call gb_UI_add_uifiles,cui,\
cui/uiconfig/ui/insertplugin \ cui/uiconfig/ui/insertplugin \
cui/uiconfig/ui/insertrowcolumn \ cui/uiconfig/ui/insertrowcolumn \
cui/uiconfig/ui/macroselectordialog \ cui/uiconfig/ui/macroselectordialog \
cui/uiconfig/ui/namedialog \
cui/uiconfig/ui/numberingformatpage \ cui/uiconfig/ui/numberingformatpage \
cui/uiconfig/ui/numberingoptionspage \ cui/uiconfig/ui/numberingoptionspage \
cui/uiconfig/ui/numberingpositionpage \ cui/uiconfig/ui/numberingpositionpage \
......
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
#include "dlgname.hxx" #include "dlgname.hxx"
#include "defdlgname.hxx" #include "defdlgname.hxx"
#include "dlgname.hrc"
#include <dialmgr.hxx> #include <dialmgr.hxx>
#define MAX_DESCRIPTION_LINES ((long)5) #define MAX_DESCRIPTION_LINES ((long)5)
...@@ -36,40 +35,37 @@ ...@@ -36,40 +35,37 @@
\************************************************************************/ \************************************************************************/
SvxNameDialog::SvxNameDialog( Window* pWindow, const String& rName, const String& rDesc ) : SvxNameDialog::SvxNameDialog( Window* pWindow, const String& rName, const String& rDesc ) :
ModalDialog ( pWindow, CUI_RES( RID_SVXDLG_NAME ) ), ModalDialog ( pWindow, "NameDialog", "cui/ui/namedialog.ui" )
aFtDescription ( this, CUI_RES( FT_DESCRIPTION ) ),
aEdtName ( this, CUI_RES( EDT_STRING ) ),
aBtnOK ( this, CUI_RES( BTN_OK ) ),
aBtnCancel ( this, CUI_RES( BTN_CANCEL ) ),
aBtnHelp ( this, CUI_RES( BTN_HELP ) )
{ {
FreeResource(); get(pBtnOK, "ok");
get(pFtDescription, "description_label");
get(pEdtName, "name_entry");
aFtDescription.SetText( rDesc ); pFtDescription->SetText( rDesc );
aEdtName.SetText( rName ); pEdtName->SetText( rName );
aEdtName.SetSelection(Selection(SELECTION_MIN, SELECTION_MAX)); pEdtName->SetSelection(Selection(SELECTION_MIN, SELECTION_MAX));
ModifyHdl(&aEdtName); ModifyHdl(&pEdtName);
aEdtName.SetModifyHdl(LINK(this, SvxNameDialog, ModifyHdl)); pEdtName->SetModifyHdl(LINK(this, SvxNameDialog, ModifyHdl));
// dynamic height of the description field // dynamic height of the description field
Size aSize = aFtDescription.GetSizePixel(); Size aSize = pFtDescription->GetSizePixel();
long nTxtWidth = aFtDescription.GetCtrlTextWidth( rDesc ); long nTxtWidth = pFtDescription->GetCtrlTextWidth( rDesc );
if ( nTxtWidth > aSize.Width() ) if ( nTxtWidth > aSize.Width() )
{ {
long nLines = Min( ( nTxtWidth / aSize.Width() + 1 ), MAX_DESCRIPTION_LINES ); long nLines = Min( ( nTxtWidth / (aSize.Width()+1) + 1 ), MAX_DESCRIPTION_LINES );
long nHeight = aSize.Height(); long nHeight = aSize.Height();
aSize.Height() = nHeight * nLines; aSize.Height() = nHeight * nLines;
aFtDescription.SetSizePixel( aSize ); pFtDescription->SetSizePixel( aSize );
Point aPnt = aEdtName.GetPosPixel(); Point aPnt = pEdtName->GetPosPixel();
aPnt.Y() += ( aSize.Height() - nHeight ); aPnt.Y() += ( aSize.Height() - nHeight );
aEdtName.SetPosPixel( aPnt ); pEdtName->SetPosPixel( aPnt );
} }
} }
IMPL_LINK_NOARG(SvxNameDialog, ModifyHdl) IMPL_LINK_NOARG(SvxNameDialog, ModifyHdl)
{ {
if(aCheckNameHdl.IsSet()) if(aCheckNameHdl.IsSet())
aBtnOK.Enable(aCheckNameHdl.Call(this) > 0); pBtnOK->Enable(aCheckNameHdl.Call(this) > 0);
return 0; return 0;
} }
...@@ -80,31 +76,25 @@ IMPL_LINK_NOARG(SvxNameDialog, ModifyHdl) ...@@ -80,31 +76,25 @@ IMPL_LINK_NOARG(SvxNameDialog, ModifyHdl)
SvxObjectNameDialog::SvxObjectNameDialog( SvxObjectNameDialog::SvxObjectNameDialog(
Window* pWindow, Window* pWindow,
const String& rName) const String& rName) :
: ModalDialog(pWindow, CUI_RES(RID_SVXDLG_OBJECT_NAME)), ModalDialog ( pWindow, "ObjectNameDialog", "cui/ui/namedialog.ui" )
aFtName(this, CUI_RES(NTD_FT_NAME)),
aEdtName(this, CUI_RES(NTD_EDT_NAME)),
aFlSeparator(this, CUI_RES(FL_SEPARATOR_A)),
aBtnHelp(this, CUI_RES(BTN_HELP)),
aBtnOK(this, CUI_RES(BTN_OK)),
aBtnCancel(this, CUI_RES(BTN_CANCEL))
{ {
FreeResource(); get(pBtnOK, "object_name_ok");
get(pEdtName, "object_name_entry");
// set name // set name
aEdtName.SetText(rName); pEdtName->SetText(rName);
// activate name // activate name
aEdtName.SetSelection(Selection(SELECTION_MIN, SELECTION_MAX)); pEdtName->SetSelection(Selection(SELECTION_MIN, SELECTION_MAX));
ModifyHdl(&aEdtName); ModifyHdl(&pEdtName);
aEdtName.SetModifyHdl(LINK(this, SvxObjectNameDialog, ModifyHdl)); pEdtName->SetModifyHdl(LINK(this, SvxObjectNameDialog, ModifyHdl));
} }
IMPL_LINK_NOARG(SvxObjectNameDialog, ModifyHdl) IMPL_LINK_NOARG(SvxObjectNameDialog, ModifyHdl)
{ {
if(aCheckNameHdl.IsSet()) if(aCheckNameHdl.IsSet())
{ {
aBtnOK.Enable(aCheckNameHdl.Call(this) > 0); pBtnOK->Enable(aCheckNameHdl.Call(this) > 0);
} }
return 0; return 0;
...@@ -117,25 +107,17 @@ IMPL_LINK_NOARG(SvxObjectNameDialog, ModifyHdl) ...@@ -117,25 +107,17 @@ IMPL_LINK_NOARG(SvxObjectNameDialog, ModifyHdl)
SvxObjectTitleDescDialog::SvxObjectTitleDescDialog( SvxObjectTitleDescDialog::SvxObjectTitleDescDialog(
Window* pWindow, Window* pWindow,
const String& rTitle, const String& rTitle,
const String& rDescription) const String& rDescription) :
: ModalDialog(pWindow, CUI_RES(RID_SVXDLG_OBJECT_TITLE_DESC)), ModalDialog ( pWindow, "ObjectTitleDescDialog", "cui/ui/namedialog.ui" )
aFtTitle(this, CUI_RES(NTD_FT_TITLE)),
aEdtTitle(this, CUI_RES(NTD_EDT_TITLE)),
aFtDescription(this, CUI_RES(NTD_FT_DESC)),
aEdtDescription(this, CUI_RES(NTD_EDT_DESC)),
aFlSeparator(this, CUI_RES(FL_SEPARATOR_B)),
aBtnHelp(this, CUI_RES(BTN_HELP)),
aBtnOK(this, CUI_RES(BTN_OK)),
aBtnCancel(this, CUI_RES(BTN_CANCEL))
{ {
FreeResource(); get(pEdtTitle, "object_title_entry");
get(pEdtDescription, "desc_entry");
// set title & desc // set title & desc
aEdtTitle.SetText(rTitle); pEdtTitle->SetText(rTitle);
aEdtDescription.SetText(rDescription); pEdtDescription->SetText(rDescription);
// activate title // activate title
aEdtTitle.SetSelection(Selection(SELECTION_MIN, SELECTION_MAX)); pEdtTitle->SetSelection(Selection(SELECTION_MIN, SELECTION_MAX));
} }
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
...@@ -147,30 +129,27 @@ SvxObjectTitleDescDialog::SvxObjectTitleDescDialog( ...@@ -147,30 +129,27 @@ SvxObjectTitleDescDialog::SvxObjectTitleDescDialog(
\************************************************************************/ \************************************************************************/
SvxMessDialog::SvxMessDialog( Window* pWindow, const String& rText, const String& rDesc, Image* pImg ) : SvxMessDialog::SvxMessDialog( Window* pWindow, const String& rText, const String& rDesc, Image* pImg ) :
ModalDialog ( pWindow, CUI_RES( RID_SVXDLG_MESSBOX ) ), ModalDialog ( pWindow, "MessBox", "cui/ui/namedialog.ui" )
aFtDescription ( this, CUI_RES( FT_DESCRIPTION ) ),
aBtn1 ( this, CUI_RES( BTN_1 ) ),
aBtn2 ( this, CUI_RES( BTN_2 ) ),
aBtnCancel ( this, CUI_RES( BTN_CANCEL ) ),
aFtImage ( this )
{ {
FreeResource(); get(pBtn1, "mess_box_btn1");
get(pBtn2, "mess_box_btn2");
get(pFtDescription, "mess_box_description");
get(pFtImage, "mess_box_image");
if( pImg ) if( pImg )
{ {
pImage = new Image( *pImg ); pImage = new Image( *pImg );
aFtImage.SetImage( *pImage ); pFtImage->SetImage( *pImage );
aFtImage.SetStyle( ( aFtImage.GetStyle()/* | WB_NOTABSTOP */) & ~WB_3DLOOK ); pFtImage->SetStyle( ( pFtImage->GetStyle()/* | WB_NOTABSTOP */) & ~WB_3DLOOK );
aFtImage.SetPosSizePixel( LogicToPixel( Point( 3, 6 ), MAP_APPFONT ), pFtImage->SetPosSizePixel( LogicToPixel( Point( 3, 6 ), MAP_APPFONT ),
aFtImage.GetImage().GetSizePixel() ); pFtImage->GetImage().GetSizePixel() );
aFtImage.Show(); pFtImage->Show();
} }
SetText( rText ); SetText( rText );
aFtDescription.SetText( rDesc ); pFtDescription->SetText( rDesc );
aBtn1.SetClickHdl( LINK( this, SvxMessDialog, Button1Hdl ) ); pBtn1->SetClickHdl( LINK( this, SvxMessDialog, Button1Hdl ) );
aBtn2.SetClickHdl( LINK( this, SvxMessDialog, Button2Hdl ) ); pBtn2->SetClickHdl( LINK( this, SvxMessDialog, Button2Hdl ) );
} }
SvxMessDialog::~SvxMessDialog() SvxMessDialog::~SvxMessDialog()
...@@ -204,15 +183,15 @@ void SvxMessDialog::SetButtonText( sal_uInt16 nBtnId, const String& rNewTxt ) ...@@ -204,15 +183,15 @@ void SvxMessDialog::SetButtonText( sal_uInt16 nBtnId, const String& rNewTxt )
switch ( nBtnId ) switch ( nBtnId )
{ {
case MESS_BTN_1: case MESS_BTN_1:
aBtn1.SetText( rNewTxt ); pBtn1->SetText( rNewTxt );
break; break;
case MESS_BTN_2: case MESS_BTN_2:
aBtn2.SetText( rNewTxt ); pBtn2->SetText( rNewTxt );
break; break;
default: default:
OSL_FAIL( "Falsche Button-Nummer!!!" ); OSL_FAIL( "Invalid button number!!!" );
} }
} }
......
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#define EDT_STRING 1
#define BTN_OK 1
#define BTN_CANCEL 1
#define BTN_HELP 1
#define FT_DESCRIPTION 1
#define BTN_1 1
#define BTN_2 2
// #i68101#
#define NTD_FT_NAME 2
#define NTD_EDT_NAME 2
#define NTD_FT_TITLE 3
#define NTD_EDT_TITLE 3
#define NTD_FT_DESC 4
#define NTD_EDT_DESC 4
#define FL_SEPARATOR_A 1
#define FL_SEPARATOR_B 2
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <cuires.hrc>
#include "helpid.hrc"
#include "dlgname.hrc"
// RID_SVXDLG_NAME ----------------------------------------------------------
ModalDialog RID_SVXDLG_NAME
{
HelpId = HID_DLG_NAME ;
OutputSize = TRUE ;
SvLook = TRUE ;
Size = MAP_APPFONT ( 180 , 63 ) ;
Text [ en-US ] = "Name" ;
Moveable = TRUE ;
FixedText FT_DESCRIPTION
{
Pos = MAP_APPFONT ( 6 , 6 ) ;
Size = MAP_APPFONT ( 112 , 8 ) ;
WordBreak = TRUE ;
};
Edit EDT_STRING
{
HelpID = "cui:Edit:RID_SVXDLG_NAME:EDT_STRING";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 17 ) ;
Size = MAP_APPFONT ( 112 , 12 ) ;
TabStop = TRUE ;
};
OKButton BTN_OK
{
Pos = MAP_APPFONT ( 124 , 6 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
DefButton = TRUE ;
};
CancelButton BTN_CANCEL
{
Pos = MAP_APPFONT ( 124 , 23 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
};
HelpButton BTN_HELP
{
Pos = MAP_APPFONT ( 124 , 43 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
};
};
// #i68101#
// RID_SVXDLG_OBJECT_NAME ----------------------------------------------------------
ModalDialog RID_SVXDLG_OBJECT_NAME
{
HelpId = HID_DLG_OBJECT_NAME;
OutputSize = TRUE ;
SvLook = TRUE ;
Size = MAP_APPFONT ( 180 , 54 + 2) ;
Text [ en-US ] = "Name" ;
Moveable = TRUE ;
// name
FixedText NTD_FT_NAME
{
Pos = MAP_APPFONT ( 6 , 3 ) ;
Size = MAP_APPFONT ( 168 , 8 ) ;
Text [ en-US ] = "~Name";
};
Edit NTD_EDT_NAME
{
HelpID = "cui:Edit:RID_SVXDLG_OBJECT_NAME:NTD_EDT_NAME";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 14 ) ;
Size = MAP_APPFONT ( 168 , 12 ) ;
TabStop = TRUE ;
};
// divider
FixedLine FL_SEPARATOR_A
{
Pos = MAP_APPFONT ( 0 , 39 - 6 - 2 ) ;
Size = MAP_APPFONT ( 180 , 8 ) ;
};
// Buttons
HelpButton BTN_HELP
{
Pos = MAP_APPFONT ( 6, 39 - 3 + 3) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
};
OKButton BTN_OK
{
Pos = MAP_APPFONT ( 174 - (50 + 50 + 6), 39 - 3 + 3) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
DefButton = TRUE ;
};
CancelButton BTN_CANCEL
{
Pos = MAP_APPFONT ( 174 - (50), 39 - 3 + 3) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
};
};
// #i68101#
// RID_SVXDLG_OBJECTTITLE_DESC ----------------------------------------------------------
ModalDialog RID_SVXDLG_OBJECT_TITLE_DESC
{
HelpId = HID_DLG_OBJECT_TITLE_DESC;
OutputSize = TRUE ;
SvLook = TRUE ;
Size = MAP_APPFONT ( 180 , 78 + 27 ) ;
Text [ en-US ] = "Description" ;
Moveable = TRUE ;
// title
FixedText NTD_FT_TITLE
{
Pos = MAP_APPFONT ( 6 , 3 ) ;
Size = MAP_APPFONT ( 168 , 8 ) ;
WordBreak = TRUE ;
Text [ en-US ] = "~Title";
};
Edit NTD_EDT_TITLE
{
HelpID = "cui:Edit:RID_SVXDLG_OBJECT_TITLE_DESC:NTD_EDT_TITLE";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 14 ) ;
Size = MAP_APPFONT ( 168 , 12 ) ;
TabStop = TRUE ;
};
// description
FixedText NTD_FT_DESC
{
Pos = MAP_APPFONT ( 6 , 30 ) ;
Size = MAP_APPFONT ( 168 , 8 ) ;
WordBreak = TRUE ;
Text [ en-US ] = "~Description";
};
MultiLineEdit NTD_EDT_DESC
{
HelpID = "cui:MultiLineEdit:RID_SVXDLG_OBJECT_TITLE_DESC:NTD_EDT_DESC";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 41 ) ;
Size = MAP_APPFONT ( 168 , (12 * 3) - 2 ) ;
TabStop = TRUE ;
IgnoreTab = TRUE;
VScroll = TRUE;
};
// divider
FixedLine FL_SEPARATOR_B
{
Pos = MAP_APPFONT ( 0 , 41 + 39 ) ;
Size = MAP_APPFONT ( 180 , 8 ) ;
};
// Buttons
HelpButton BTN_HELP
{
Pos = MAP_APPFONT ( 6, 41 + 39 + 3 + 5) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
};
OKButton BTN_OK
{
Pos = MAP_APPFONT ( 174 - (50 + 50 + 6), 41 + 39 + 3 + 5) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
DefButton = TRUE ;
};
CancelButton BTN_CANCEL
{
Pos = MAP_APPFONT ( 174 - (50), 41 + 39 + 3 + 5) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
};
};
// RID_SVXDLG_MESSBOX -------------------------------------------------------
ModalDialog RID_SVXDLG_MESSBOX
{
HelpId = HID_DLG_MESSBOX ;
OutputSize = TRUE ;
SvLook = TRUE ;
Size = MAP_APPFONT ( 212 , 64 ) ;
Text = "" ;
Moveable = TRUE ;
PushButton BTN_1
{
HelpID = "cui:PushButton:RID_SVXDLG_MESSBOX:BTN_1";
Pos = MAP_APPFONT ( 25 , 44 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
};
PushButton BTN_2
{
HelpID = "cui:PushButton:RID_SVXDLG_MESSBOX:BTN_2";
Pos = MAP_APPFONT ( 78 , 44 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
};
CancelButton BTN_CANCEL
{
Pos = MAP_APPFONT ( 131 , 44 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
};
FixedText FT_DESCRIPTION
{
Pos = MAP_APPFONT ( 28 , 6 ) ;
Size = MAP_APPFONT ( 200 , 35 ) ;
WordBreak = TRUE ;
};
};
// ********************************************************************** EOF
...@@ -1475,22 +1475,11 @@ AbstractSvxObjectTitleDescDialog* AbstractDialogFactory_Impl::CreateSvxObjectTit ...@@ -1475,22 +1475,11 @@ AbstractSvxObjectTitleDescDialog* AbstractDialogFactory_Impl::CreateSvxObjectTit
return new AbstractSvxObjectTitleDescDialog_Impl(new SvxObjectTitleDescDialog(pParent, rTitle, rDescription)); return new AbstractSvxObjectTitleDescDialog_Impl(new SvxObjectTitleDescDialog(pParent, rTitle, rDescription));
} }
AbstractSvxMessDialog * AbstractDialogFactory_Impl::CreateSvxMessDialog( Window* pParent, sal_uInt32 nResId, AbstractSvxMessDialog * AbstractDialogFactory_Impl::CreateSvxMessDialog( Window* pParent, sal_uInt32,
const String& rText, const String& rDesc, Image* pImg ) const String& rText, const String& rDesc, Image* pImg )
{ {
SvxMessDialog* pDlg=NULL; SvxMessDialog* pDlg = new SvxMessDialog( pParent, rText, rDesc, pImg );
switch ( nResId )
{
case RID_SVXDLG_MESSBOX :
pDlg = new SvxMessDialog( pParent, rText, rDesc, pImg );
break;
default:
break;
}
if ( pDlg )
return new AbstractSvxMessDialog_Impl( pDlg ); return new AbstractSvxMessDialog_Impl( pDlg );
return 0;
} }
AbstractSvxMultiPathDialog * AbstractDialogFactory_Impl::CreateSvxMultiPathDialog( Window* pParent, sal_Bool bEmptyAllowed ) AbstractSvxMultiPathDialog * AbstractDialogFactory_Impl::CreateSvxMultiPathDialog( Window* pParent, sal_Bool bEmptyAllowed )
......
...@@ -245,12 +245,6 @@ ...@@ -245,12 +245,6 @@
#define RID_SVX_IMAPDLG_START (RID_SVX_START + 100) #define RID_SVX_IMAPDLG_START (RID_SVX_START + 100)
#define RID_SVXDLG_IMAPURL (RID_SVX_IMAPDLG_START + 2) #define RID_SVXDLG_IMAPURL (RID_SVX_IMAPDLG_START + 2)
// name dialog
#define RID_SVXDLG_NAME (RID_SVX_START + 62)
#define RID_SVXDLG_MESSBOX (RID_SVX_START + 63)
#define RID_SVXDLG_OBJECT_NAME (RID_SVX_START + 64)
#define RID_SVXDLG_OBJECT_TITLE_DESC (RID_SVX_START + 67)
// hangulhanja // hangulhanja
#define RID_SVX_MDLG_HANGULHANJA (RID_SVX_START + 1 ) #define RID_SVX_MDLG_HANGULHANJA (RID_SVX_START + 1 )
#define RID_SVX_MDLG_HANGULHANJA_OPT ( RID_SVX_START + 4 ) #define RID_SVX_MDLG_HANGULHANJA_OPT ( RID_SVX_START + 4 )
......
...@@ -32,11 +32,9 @@ ...@@ -32,11 +32,9 @@
class SvxNameDialog : public ModalDialog class SvxNameDialog : public ModalDialog
{ {
private: private:
FixedText aFtDescription; FixedText* pFtDescription;
Edit aEdtName; Edit* pEdtName;
OKButton aBtnOK; OKButton* pBtnOK;
CancelButton aBtnCancel;
HelpButton aBtnHelp;
Link aCheckNameHdl; Link aCheckNameHdl;
...@@ -45,7 +43,7 @@ private: ...@@ -45,7 +43,7 @@ private:
public: public:
SvxNameDialog( Window* pWindow, const String& rName, const String& rDesc ); SvxNameDialog( Window* pWindow, const String& rName, const String& rDesc );
void GetName( String& rName ){rName = aEdtName.GetText();} void GetName( String& rName ){rName = pEdtName->GetText();}
/** add a callback Link that is called whenever the content of the edit /** add a callback Link that is called whenever the content of the edit
field is changed. The Link result determines whether the OK field is changed. The Link result determines whether the OK
...@@ -66,29 +64,23 @@ public: ...@@ -66,29 +64,23 @@ public:
{ {
aCheckNameHdl = rLink; aCheckNameHdl = rLink;
if ( bCheckImmediately ) if ( bCheckImmediately )
aBtnOK.Enable( rLink.Call( this ) > 0 ); pBtnOK->Enable( rLink.Call( this ) > 0 );
} }
void SetEditHelpId( const rtl::OString& aHelpId) {aEdtName.SetHelpId(aHelpId);} void SetEditHelpId( const rtl::OString& aHelpId) {pEdtName->SetHelpId(aHelpId);}
}; };
/** #i68101# /** #i68101#
Dialog for editing Object Title and Description Dialog for editing Object name
plus uniqueness-callback-linkHandler */ plus uniqueness-callback-linkHandler */
class SvxObjectNameDialog : public ModalDialog class SvxObjectNameDialog : public ModalDialog
{ {
private: private:
// name // name
FixedText aFtName; Edit* pEdtName;
Edit aEdtName;
// separator
FixedLine aFlSeparator;
// buttons // buttons
HelpButton aBtnHelp; OKButton* pBtnOK;
OKButton aBtnOK;
CancelButton aBtnCancel;
// callback link for name uniqueness // callback link for name uniqueness
Link aCheckNameHdl; Link aCheckNameHdl;
...@@ -100,7 +92,7 @@ public: ...@@ -100,7 +92,7 @@ public:
SvxObjectNameDialog(Window* pWindow, const String& rName); SvxObjectNameDialog(Window* pWindow, const String& rName);
// data access // data access
void GetName(String& rName) {rName = aEdtName.GetText(); } void GetName(String& rName) {rName = pEdtName->GetText(); }
// set handler // set handler
void SetCheckNameHdl(const Link& rLink, bool bCheckImmediately = false) void SetCheckNameHdl(const Link& rLink, bool bCheckImmediately = false)
...@@ -109,7 +101,7 @@ public: ...@@ -109,7 +101,7 @@ public:
if(bCheckImmediately) if(bCheckImmediately)
{ {
aBtnOK.Enable(rLink.Call(this) > 0); pBtnOK->Enable(rLink.Call(this) > 0);
} }
} }
}; };
...@@ -120,39 +112,31 @@ class SvxObjectTitleDescDialog : public ModalDialog ...@@ -120,39 +112,31 @@ class SvxObjectTitleDescDialog : public ModalDialog
{ {
private: private:
// title // title
FixedText aFtTitle; Edit* pEdtTitle;
Edit aEdtTitle;
// description // description
FixedText aFtDescription; MultiLineEdit* pEdtDescription;
MultiLineEdit aEdtDescription;
// separator
FixedLine aFlSeparator;
// buttons // buttons
HelpButton aBtnHelp; OKButton* pBtnOK;
OKButton aBtnOK;
CancelButton aBtnCancel;
public: public:
// constructor // constructor
SvxObjectTitleDescDialog(Window* pWindow, const String& rTitle, const String& rDesc); SvxObjectTitleDescDialog(Window* pWindow, const String& rTitle, const String& rDesc);
// data access // data access
void GetTitle(String& rTitle) {rTitle = aEdtTitle.GetText(); } void GetTitle(String& rTitle) {rTitle = pEdtTitle->GetText(); }
void GetDescription(String& rDescription) {rDescription = aEdtDescription.GetText(); } void GetDescription(String& rDescription) {rDescription = pEdtDescription->GetText(); }
}; };
/// Dialog to cancel, save, or add /// Dialog to cancel, save, or add
class SvxMessDialog : public ModalDialog class SvxMessDialog : public ModalDialog
{ {
private: private:
FixedText aFtDescription; FixedText* pFtDescription;
PushButton aBtn1; PushButton* pBtn1;
PushButton aBtn2; PushButton* pBtn2;
CancelButton aBtnCancel; FixedImage* pFtImage;
FixedImage aFtImage;
Image* pImage; Image* pImage;
DECL_LINK(Button1Hdl, void *); DECL_LINK(Button1Hdl, void *);
......
...@@ -43,6 +43,7 @@ ...@@ -43,6 +43,7 @@
#include "cuitabarea.hxx" #include "cuitabarea.hxx"
#include "tabarea.hrc" #include "tabarea.hrc"
#include "defdlgname.hxx" #include "defdlgname.hxx"
#include "dlgname.hxx"
#include <svx/svxdlg.hxx> #include <svx/svxdlg.hxx>
#include <dialmgr.hxx> #include <dialmgr.hxx>
#include "sfx2/opengrf.hxx" #include "sfx2/opengrf.hxx"
...@@ -512,9 +513,7 @@ long SvxBitmapTabPage::CheckChanges_Impl() ...@@ -512,9 +513,7 @@ long SvxBitmapTabPage::CheckChanges_Impl()
{ {
ResMgr& rMgr = CUI_MGR(); ResMgr& rMgr = CUI_MGR();
Image aWarningBoxImage = WarningBox::GetStandardImage(); Image aWarningBoxImage = WarningBox::GetStandardImage();
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); SvxMessDialog* aMessDlg = new SvxMessDialog(GetParentDialog(),
DBG_ASSERT(pFact, "Dialogdiet fail!");
AbstractSvxMessDialog* aMessDlg = pFact->CreateSvxMessDialog( GetParentDialog(), RID_SVXDLG_MESSBOX,
String( SVX_RES( RID_SVXSTR_BITMAP ) ), String( SVX_RES( RID_SVXSTR_BITMAP ) ),
String( CUI_RES( RID_SVXSTR_ASK_CHANGE_BITMAP ) ), String( CUI_RES( RID_SVXSTR_ASK_CHANGE_BITMAP ) ),
&aWarningBoxImage ); &aWarningBoxImage );
......
...@@ -43,6 +43,7 @@ ...@@ -43,6 +43,7 @@
#include "cuitabarea.hxx" #include "cuitabarea.hxx"
#include "tabarea.hrc" #include "tabarea.hrc"
#include "defdlgname.hxx" #include "defdlgname.hxx"
#include "dlgname.hxx"
#include <svx/svxdlg.hxx> #include <svx/svxdlg.hxx>
#include <dialmgr.hxx> #include <dialmgr.hxx>
#include <cuitabline.hxx> #include <cuitabline.hxx>
...@@ -525,8 +526,7 @@ long SvxColorTabPage::CheckChanges_Impl() ...@@ -525,8 +526,7 @@ long SvxColorTabPage::CheckChanges_Impl()
{ {
ResMgr& rMgr = CUI_MGR(); ResMgr& rMgr = CUI_MGR();
Image aWarningBoxImage = WarningBox::GetStandardImage(); Image aWarningBoxImage = WarningBox::GetStandardImage();
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); SvxMessDialog* aMessDlg = new SvxMessDialog(GetParentDialog(),
AbstractSvxMessDialog* aMessDlg = pFact->CreateSvxMessDialog( GetParentDialog(), RID_SVXDLG_MESSBOX,
SVX_RESSTR( RID_SVXSTR_COLOR ), SVX_RESSTR( RID_SVXSTR_COLOR ),
String( ResId( RID_SVXSTR_ASK_CHANGE_COLOR, rMgr ) ), String( ResId( RID_SVXSTR_ASK_CHANGE_COLOR, rMgr ) ),
&aWarningBoxImage ); &aWarningBoxImage );
......
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
#include "cuitabarea.hxx" #include "cuitabarea.hxx"
#include "tabarea.hrc" #include "tabarea.hrc"
#include "defdlgname.hxx" #include "defdlgname.hxx"
#include "dlgname.hxx"
#include <svx/svxdlg.hxx> #include <svx/svxdlg.hxx>
#include <dialmgr.hxx> #include <dialmgr.hxx>
#include <svx/dialmgr.hxx> #include <svx/dialmgr.hxx>
...@@ -260,9 +261,7 @@ long SvxGradientTabPage::CheckChanges_Impl() ...@@ -260,9 +261,7 @@ long SvxGradientTabPage::CheckChanges_Impl()
{ {
ResMgr& rMgr = CUI_MGR(); ResMgr& rMgr = CUI_MGR();
Image aWarningBoxImage = WarningBox::GetStandardImage(); Image aWarningBoxImage = WarningBox::GetStandardImage();
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); SvxMessDialog* aMessDlg = new SvxMessDialog(GetParentDialog(),
DBG_ASSERT(pFact, "Dialogdiet fail!");
AbstractSvxMessDialog* aMessDlg = pFact->CreateSvxMessDialog( GetParentDialog(), RID_SVXDLG_MESSBOX,
SVX_RESSTR( RID_SVXSTR_GRADIENT ), SVX_RESSTR( RID_SVXSTR_GRADIENT ),
CUI_RESSTR( RID_SVXSTR_ASK_CHANGE_GRADIENT ), CUI_RESSTR( RID_SVXSTR_ASK_CHANGE_GRADIENT ),
&aWarningBoxImage ); &aWarningBoxImage );
......
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
#include "svx/drawitem.hxx" #include "svx/drawitem.hxx"
#include "cuitabarea.hxx" #include "cuitabarea.hxx"
#include "defdlgname.hxx" #include "defdlgname.hxx"
#include "dlgname.hxx"
#include <svx/svxdlg.hxx> #include <svx/svxdlg.hxx>
#include <dialmgr.hxx> #include <dialmgr.hxx>
#include "svx/dlgutil.hxx" #include "svx/dlgutil.hxx"
...@@ -238,9 +239,7 @@ long SvxHatchTabPage::CheckChanges_Impl() ...@@ -238,9 +239,7 @@ long SvxHatchTabPage::CheckChanges_Impl()
{ {
ResMgr& rMgr = CUI_MGR(); ResMgr& rMgr = CUI_MGR();
Image aWarningBoxImage = WarningBox::GetStandardImage(); Image aWarningBoxImage = WarningBox::GetStandardImage();
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); SvxMessDialog* aMessDlg = new SvxMessDialog(GetParentDialog(),
DBG_ASSERT(pFact, "Dialogdiet fail!");
AbstractSvxMessDialog* aMessDlg = pFact->CreateSvxMessDialog( GetParentDialog(), RID_SVXDLG_MESSBOX,
SVX_RESSTR( RID_SVXSTR_HATCH ), SVX_RESSTR( RID_SVXSTR_HATCH ),
CUI_RESSTR( RID_SVXSTR_ASK_CHANGE_HATCH ), CUI_RESSTR( RID_SVXSTR_ASK_CHANGE_HATCH ),
&aWarningBoxImage ); &aWarningBoxImage );
......
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
#include "svx/drawitem.hxx" #include "svx/drawitem.hxx"
#include "cuitabline.hxx" #include "cuitabline.hxx"
#include "dlgname.hxx"
#include "defdlgname.hxx" #include "defdlgname.hxx"
#include <svx/svxdlg.hxx> #include <svx/svxdlg.hxx>
#include <dialmgr.hxx> #include <dialmgr.hxx>
...@@ -232,9 +233,7 @@ void SvxLineDefTabPage::CheckChanges_Impl() ...@@ -232,9 +233,7 @@ void SvxLineDefTabPage::CheckChanges_Impl()
{ {
ResMgr& rMgr = CUI_MGR(); ResMgr& rMgr = CUI_MGR();
Image aWarningBoxImage = WarningBox::GetStandardImage(); Image aWarningBoxImage = WarningBox::GetStandardImage();
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); SvxMessDialog* aMessDlg = new SvxMessDialog(GetParentDialog(),
DBG_ASSERT(pFact, "Dialogdiet fail!");
AbstractSvxMessDialog* aMessDlg = pFact->CreateSvxMessDialog( GetParentDialog(), RID_SVXDLG_MESSBOX,
SVX_RESSTR( RID_SVXSTR_LINESTYLE ), SVX_RESSTR( RID_SVXSTR_LINESTYLE ),
String( ResId( RID_SVXSTR_ASK_CHANGE_LINESTYLE, rMgr ) ), String( ResId( RID_SVXSTR_ASK_CHANGE_LINESTYLE, rMgr ) ),
&aWarningBoxImage ); &aWarningBoxImage );
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment