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,\
cui/source/dialogs/commonlingui.src \
cui/source/dialogs/cuiimapdlg.src \
cui/source/dialogs/cuires.src \
cui/source/dialogs/dlgname.src \
cui/source/dialogs/fmsearch.src \
cui/source/dialogs/gallery.src \
cui/source/dialogs/grfflt.src \
......
......@@ -20,6 +20,7 @@ $(eval $(call gb_UI_add_uifiles,cui,\
cui/uiconfig/ui/insertplugin \
cui/uiconfig/ui/insertrowcolumn \
cui/uiconfig/ui/macroselectordialog \
cui/uiconfig/ui/namedialog \
cui/uiconfig/ui/numberingformatpage \
cui/uiconfig/ui/numberingoptionspage \
cui/uiconfig/ui/numberingpositionpage \
......
......@@ -24,7 +24,6 @@
#include "dlgname.hxx"
#include "defdlgname.hxx"
#include "dlgname.hrc"
#include <dialmgr.hxx>
#define MAX_DESCRIPTION_LINES ((long)5)
......@@ -36,40 +35,37 @@
\************************************************************************/
SvxNameDialog::SvxNameDialog( Window* pWindow, const String& rName, const String& rDesc ) :
ModalDialog ( pWindow, CUI_RES( RID_SVXDLG_NAME ) ),
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 ) )
ModalDialog ( pWindow, "NameDialog", "cui/ui/namedialog.ui" )
{
FreeResource();
get(pBtnOK, "ok");
get(pFtDescription, "description_label");
get(pEdtName, "name_entry");
aFtDescription.SetText( rDesc );
aEdtName.SetText( rName );
aEdtName.SetSelection(Selection(SELECTION_MIN, SELECTION_MAX));
ModifyHdl(&aEdtName);
aEdtName.SetModifyHdl(LINK(this, SvxNameDialog, ModifyHdl));
pFtDescription->SetText( rDesc );
pEdtName->SetText( rName );
pEdtName->SetSelection(Selection(SELECTION_MIN, SELECTION_MAX));
ModifyHdl(&pEdtName);
pEdtName->SetModifyHdl(LINK(this, SvxNameDialog, ModifyHdl));
// dynamic height of the description field
Size aSize = aFtDescription.GetSizePixel();
long nTxtWidth = aFtDescription.GetCtrlTextWidth( rDesc );
Size aSize = pFtDescription->GetSizePixel();
long nTxtWidth = pFtDescription->GetCtrlTextWidth( rDesc );
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();
aSize.Height() = nHeight * nLines;
aFtDescription.SetSizePixel( aSize );
Point aPnt = aEdtName.GetPosPixel();
pFtDescription->SetSizePixel( aSize );
Point aPnt = pEdtName->GetPosPixel();
aPnt.Y() += ( aSize.Height() - nHeight );
aEdtName.SetPosPixel( aPnt );
pEdtName->SetPosPixel( aPnt );
}
}
IMPL_LINK_NOARG(SvxNameDialog, ModifyHdl)
{
if(aCheckNameHdl.IsSet())
aBtnOK.Enable(aCheckNameHdl.Call(this) > 0);
pBtnOK->Enable(aCheckNameHdl.Call(this) > 0);
return 0;
}
......@@ -80,31 +76,25 @@ IMPL_LINK_NOARG(SvxNameDialog, ModifyHdl)
SvxObjectNameDialog::SvxObjectNameDialog(
Window* pWindow,
const String& rName)
: ModalDialog(pWindow, CUI_RES(RID_SVXDLG_OBJECT_NAME)),
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))
const String& rName) :
ModalDialog ( pWindow, "ObjectNameDialog", "cui/ui/namedialog.ui" )
{
FreeResource();
get(pBtnOK, "object_name_ok");
get(pEdtName, "object_name_entry");
// set name
aEdtName.SetText(rName);
pEdtName->SetText(rName);
// activate name
aEdtName.SetSelection(Selection(SELECTION_MIN, SELECTION_MAX));
ModifyHdl(&aEdtName);
aEdtName.SetModifyHdl(LINK(this, SvxObjectNameDialog, ModifyHdl));
pEdtName->SetSelection(Selection(SELECTION_MIN, SELECTION_MAX));
ModifyHdl(&pEdtName);
pEdtName->SetModifyHdl(LINK(this, SvxObjectNameDialog, ModifyHdl));
}
IMPL_LINK_NOARG(SvxObjectNameDialog, ModifyHdl)
{
if(aCheckNameHdl.IsSet())
{
aBtnOK.Enable(aCheckNameHdl.Call(this) > 0);
pBtnOK->Enable(aCheckNameHdl.Call(this) > 0);
}
return 0;
......@@ -117,25 +107,17 @@ IMPL_LINK_NOARG(SvxObjectNameDialog, ModifyHdl)
SvxObjectTitleDescDialog::SvxObjectTitleDescDialog(
Window* pWindow,
const String& rTitle,
const String& rDescription)
: ModalDialog(pWindow, CUI_RES(RID_SVXDLG_OBJECT_TITLE_DESC)),
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))
const String& rDescription) :
ModalDialog ( pWindow, "ObjectTitleDescDialog", "cui/ui/namedialog.ui" )
{
FreeResource();
get(pEdtTitle, "object_title_entry");
get(pEdtDescription, "desc_entry");
// set title & desc
aEdtTitle.SetText(rTitle);
aEdtDescription.SetText(rDescription);
pEdtTitle->SetText(rTitle);
pEdtDescription->SetText(rDescription);
// activate title
aEdtTitle.SetSelection(Selection(SELECTION_MIN, SELECTION_MAX));
pEdtTitle->SetSelection(Selection(SELECTION_MIN, SELECTION_MAX));
}
///////////////////////////////////////////////////////////////////////////////////////////////
......@@ -147,30 +129,27 @@ SvxObjectTitleDescDialog::SvxObjectTitleDescDialog(
\************************************************************************/
SvxMessDialog::SvxMessDialog( Window* pWindow, const String& rText, const String& rDesc, Image* pImg ) :
ModalDialog ( pWindow, CUI_RES( RID_SVXDLG_MESSBOX ) ),
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 )
ModalDialog ( pWindow, "MessBox", "cui/ui/namedialog.ui" )
{
FreeResource();
get(pBtn1, "mess_box_btn1");
get(pBtn2, "mess_box_btn2");
get(pFtDescription, "mess_box_description");
get(pFtImage, "mess_box_image");
if( pImg )
{
pImage = new Image( *pImg );
aFtImage.SetImage( *pImage );
aFtImage.SetStyle( ( aFtImage.GetStyle()/* | WB_NOTABSTOP */) & ~WB_3DLOOK );
aFtImage.SetPosSizePixel( LogicToPixel( Point( 3, 6 ), MAP_APPFONT ),
aFtImage.GetImage().GetSizePixel() );
aFtImage.Show();
pFtImage->SetImage( *pImage );
pFtImage->SetStyle( ( pFtImage->GetStyle()/* | WB_NOTABSTOP */) & ~WB_3DLOOK );
pFtImage->SetPosSizePixel( LogicToPixel( Point( 3, 6 ), MAP_APPFONT ),
pFtImage->GetImage().GetSizePixel() );
pFtImage->Show();
}
SetText( rText );
aFtDescription.SetText( rDesc );
pFtDescription->SetText( rDesc );
aBtn1.SetClickHdl( LINK( this, SvxMessDialog, Button1Hdl ) );
aBtn2.SetClickHdl( LINK( this, SvxMessDialog, Button2Hdl ) );
pBtn1->SetClickHdl( LINK( this, SvxMessDialog, Button1Hdl ) );
pBtn2->SetClickHdl( LINK( this, SvxMessDialog, Button2Hdl ) );
}
SvxMessDialog::~SvxMessDialog()
......@@ -204,15 +183,15 @@ void SvxMessDialog::SetButtonText( sal_uInt16 nBtnId, const String& rNewTxt )
switch ( nBtnId )
{
case MESS_BTN_1:
aBtn1.SetText( rNewTxt );
pBtn1->SetText( rNewTxt );
break;
case MESS_BTN_2:
aBtn2.SetText( rNewTxt );
pBtn2->SetText( rNewTxt );
break;
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
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 )
{
SvxMessDialog* pDlg=NULL;
switch ( nResId )
{
case RID_SVXDLG_MESSBOX :
pDlg = new SvxMessDialog( pParent, rText, rDesc, pImg );
break;
default:
break;
}
if ( pDlg )
return new AbstractSvxMessDialog_Impl( pDlg );
return 0;
SvxMessDialog* pDlg = new SvxMessDialog( pParent, rText, rDesc, pImg );
return new AbstractSvxMessDialog_Impl( pDlg );
}
AbstractSvxMultiPathDialog * AbstractDialogFactory_Impl::CreateSvxMultiPathDialog( Window* pParent, sal_Bool bEmptyAllowed )
......
......@@ -245,12 +245,6 @@
#define RID_SVX_IMAPDLG_START (RID_SVX_START + 100)
#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
#define RID_SVX_MDLG_HANGULHANJA (RID_SVX_START + 1 )
#define RID_SVX_MDLG_HANGULHANJA_OPT ( RID_SVX_START + 4 )
......
......@@ -32,11 +32,9 @@
class SvxNameDialog : public ModalDialog
{
private:
FixedText aFtDescription;
Edit aEdtName;
OKButton aBtnOK;
CancelButton aBtnCancel;
HelpButton aBtnHelp;
FixedText* pFtDescription;
Edit* pEdtName;
OKButton* pBtnOK;
Link aCheckNameHdl;
......@@ -45,7 +43,7 @@ private:
public:
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
field is changed. The Link result determines whether the OK
......@@ -66,29 +64,23 @@ public:
{
aCheckNameHdl = rLink;
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#
Dialog for editing Object Title and Description
Dialog for editing Object name
plus uniqueness-callback-linkHandler */
class SvxObjectNameDialog : public ModalDialog
{
private:
// name
FixedText aFtName;
Edit aEdtName;
// separator
FixedLine aFlSeparator;
Edit* pEdtName;
// buttons
HelpButton aBtnHelp;
OKButton aBtnOK;
CancelButton aBtnCancel;
OKButton* pBtnOK;
// callback link for name uniqueness
Link aCheckNameHdl;
......@@ -100,7 +92,7 @@ public:
SvxObjectNameDialog(Window* pWindow, const String& rName);
// data access
void GetName(String& rName) {rName = aEdtName.GetText(); }
void GetName(String& rName) {rName = pEdtName->GetText(); }
// set handler
void SetCheckNameHdl(const Link& rLink, bool bCheckImmediately = false)
......@@ -109,7 +101,7 @@ public:
if(bCheckImmediately)
{
aBtnOK.Enable(rLink.Call(this) > 0);
pBtnOK->Enable(rLink.Call(this) > 0);
}
}
};
......@@ -120,39 +112,31 @@ class SvxObjectTitleDescDialog : public ModalDialog
{
private:
// title
FixedText aFtTitle;
Edit aEdtTitle;
Edit* pEdtTitle;
// description
FixedText aFtDescription;
MultiLineEdit aEdtDescription;
// separator
FixedLine aFlSeparator;
MultiLineEdit* pEdtDescription;
// buttons
HelpButton aBtnHelp;
OKButton aBtnOK;
CancelButton aBtnCancel;
OKButton* pBtnOK;
public:
// constructor
SvxObjectTitleDescDialog(Window* pWindow, const String& rTitle, const String& rDesc);
// data access
void GetTitle(String& rTitle) {rTitle = aEdtTitle.GetText(); }
void GetDescription(String& rDescription) {rDescription = aEdtDescription.GetText(); }
void GetTitle(String& rTitle) {rTitle = pEdtTitle->GetText(); }
void GetDescription(String& rDescription) {rDescription = pEdtDescription->GetText(); }
};
/// Dialog to cancel, save, or add
class SvxMessDialog : public ModalDialog
{
private:
FixedText aFtDescription;
PushButton aBtn1;
PushButton aBtn2;
CancelButton aBtnCancel;
FixedImage aFtImage;
FixedText* pFtDescription;
PushButton* pBtn1;
PushButton* pBtn2;
FixedImage* pFtImage;
Image* pImage;
DECL_LINK(Button1Hdl, void *);
......
......@@ -43,6 +43,7 @@
#include "cuitabarea.hxx"
#include "tabarea.hrc"
#include "defdlgname.hxx"
#include "dlgname.hxx"
#include <svx/svxdlg.hxx>
#include <dialmgr.hxx>
#include "sfx2/opengrf.hxx"
......@@ -512,9 +513,7 @@ long SvxBitmapTabPage::CheckChanges_Impl()
{
ResMgr& rMgr = CUI_MGR();
Image aWarningBoxImage = WarningBox::GetStandardImage();
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
DBG_ASSERT(pFact, "Dialogdiet fail!");
AbstractSvxMessDialog* aMessDlg = pFact->CreateSvxMessDialog( GetParentDialog(), RID_SVXDLG_MESSBOX,
SvxMessDialog* aMessDlg = new SvxMessDialog(GetParentDialog(),
String( SVX_RES( RID_SVXSTR_BITMAP ) ),
String( CUI_RES( RID_SVXSTR_ASK_CHANGE_BITMAP ) ),
&aWarningBoxImage );
......
......@@ -43,6 +43,7 @@
#include "cuitabarea.hxx"
#include "tabarea.hrc"
#include "defdlgname.hxx"
#include "dlgname.hxx"
#include <svx/svxdlg.hxx>
#include <dialmgr.hxx>
#include <cuitabline.hxx>
......@@ -525,8 +526,7 @@ long SvxColorTabPage::CheckChanges_Impl()
{
ResMgr& rMgr = CUI_MGR();
Image aWarningBoxImage = WarningBox::GetStandardImage();
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
AbstractSvxMessDialog* aMessDlg = pFact->CreateSvxMessDialog( GetParentDialog(), RID_SVXDLG_MESSBOX,
SvxMessDialog* aMessDlg = new SvxMessDialog(GetParentDialog(),
SVX_RESSTR( RID_SVXSTR_COLOR ),
String( ResId( RID_SVXSTR_ASK_CHANGE_COLOR, rMgr ) ),
&aWarningBoxImage );
......
......@@ -37,6 +37,7 @@
#include "cuitabarea.hxx"
#include "tabarea.hrc"
#include "defdlgname.hxx"
#include "dlgname.hxx"
#include <svx/svxdlg.hxx>
#include <dialmgr.hxx>
#include <svx/dialmgr.hxx>
......@@ -260,9 +261,7 @@ long SvxGradientTabPage::CheckChanges_Impl()
{
ResMgr& rMgr = CUI_MGR();
Image aWarningBoxImage = WarningBox::GetStandardImage();
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
DBG_ASSERT(pFact, "Dialogdiet fail!");
AbstractSvxMessDialog* aMessDlg = pFact->CreateSvxMessDialog( GetParentDialog(), RID_SVXDLG_MESSBOX,
SvxMessDialog* aMessDlg = new SvxMessDialog(GetParentDialog(),
SVX_RESSTR( RID_SVXSTR_GRADIENT ),
CUI_RESSTR( RID_SVXSTR_ASK_CHANGE_GRADIENT ),
&aWarningBoxImage );
......
......@@ -37,6 +37,7 @@
#include "svx/drawitem.hxx"
#include "cuitabarea.hxx"
#include "defdlgname.hxx"
#include "dlgname.hxx"
#include <svx/svxdlg.hxx>
#include <dialmgr.hxx>
#include "svx/dlgutil.hxx"
......@@ -238,9 +239,7 @@ long SvxHatchTabPage::CheckChanges_Impl()
{
ResMgr& rMgr = CUI_MGR();
Image aWarningBoxImage = WarningBox::GetStandardImage();
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
DBG_ASSERT(pFact, "Dialogdiet fail!");
AbstractSvxMessDialog* aMessDlg = pFact->CreateSvxMessDialog( GetParentDialog(), RID_SVXDLG_MESSBOX,
SvxMessDialog* aMessDlg = new SvxMessDialog(GetParentDialog(),
SVX_RESSTR( RID_SVXSTR_HATCH ),
CUI_RESSTR( RID_SVXSTR_ASK_CHANGE_HATCH ),
&aWarningBoxImage );
......
......@@ -38,6 +38,7 @@
#include "svx/drawitem.hxx"
#include "cuitabline.hxx"
#include "dlgname.hxx"
#include "defdlgname.hxx"
#include <svx/svxdlg.hxx>
#include <dialmgr.hxx>
......@@ -232,9 +233,7 @@ void SvxLineDefTabPage::CheckChanges_Impl()
{
ResMgr& rMgr = CUI_MGR();
Image aWarningBoxImage = WarningBox::GetStandardImage();
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
DBG_ASSERT(pFact, "Dialogdiet fail!");
AbstractSvxMessDialog* aMessDlg = pFact->CreateSvxMessDialog( GetParentDialog(), RID_SVXDLG_MESSBOX,
SvxMessDialog* aMessDlg = new SvxMessDialog(GetParentDialog(),
SVX_RESSTR( RID_SVXSTR_LINESTYLE ),
String( ResId( RID_SVXSTR_ASK_CHANGE_LINESTYLE, rMgr ) ),
&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