summaryrefslogtreecommitdiff
path: root/sw/source/ui
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/ui')
-rw-r--r--sw/source/ui/dialog/swdlgfact.cxx21
-rw-r--r--sw/source/ui/dialog/swdlgfact.hxx6
-rw-r--r--sw/source/ui/inc/swrenamexnameddlg.hxx16
-rw-r--r--sw/source/ui/utlui/content.cxx2
-rw-r--r--sw/source/ui/utlui/swrenamexnameddlg.cxx36
-rw-r--r--sw/source/ui/utlui/unotools.src51
6 files changed, 33 insertions, 99 deletions
diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx
index 3a4e0c8cc5b1..6d766bff79ff 100644
--- a/sw/source/ui/dialog/swdlgfact.cxx
+++ b/sw/source/ui/dialog/swdlgfact.cxx
@@ -1003,23 +1003,12 @@ SfxAbstractDialog* SwAbstractDialogFactory_Impl::CreateSwFldEditDlg ( SwView&
return 0;
}
-AbstractSwRenameXNamedDlg * SwAbstractDialogFactory_Impl::CreateSwRenameXNamedDlg( Window* pParent,
- ::com::sun::star::uno::Reference< ::com::sun::star::container::XNamed > & xNamed,
- ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > & xNameAccess,int nResId )
+AbstractSwRenameXNamedDlg * SwAbstractDialogFactory_Impl::CreateSwRenameXNamedDlg(Window* pParent,
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNamed > & xNamed,
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > & xNameAccess)
{
- SwRenameXNamedDlg* pDlg=NULL;
- switch ( nResId )
- {
- case DLG_RENAME_XNAMED :
- pDlg = new SwRenameXNamedDlg( pParent,xNamed, xNameAccess);
- break;
- default:
- break;
- }
-
- if ( pDlg )
- return new AbstractSwRenameXNamedDlg_Impl( pDlg );
- return 0;
+ SwRenameXNamedDlg* pDlg = new SwRenameXNamedDlg( pParent,xNamed, xNameAccess);
+ return new AbstractSwRenameXNamedDlg_Impl( pDlg );
}
AbstractSwModalRedlineAcceptDlg * SwAbstractDialogFactory_Impl::CreateSwModalRedlineAcceptDlg(Window *pParent)
diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx
index 115e926a540c..da283f2e4481 100644
--- a/sw/source/ui/dialog/swdlgfact.hxx
+++ b/sw/source/ui/dialog/swdlgfact.hxx
@@ -485,9 +485,9 @@ public:
const SfxItemSet* pItemSet, SwWrtShell* pSh); //add for SwTableTabDlg
virtual AbstractSwFldDlg * CreateSwFldDlg ( SfxBindings* pB, SwChildWinWrapper* pCW, Window *pParent, int nResId ); //add for SwFldDlg
virtual SfxAbstractDialog* CreateSwFldEditDlg ( SwView& rVw, int nResId ); //add for SwFldEditDlg
- virtual AbstractSwRenameXNamedDlg * CreateSwRenameXNamedDlg( Window* pParent, //add for SwRenameXNamedDlg
- ::com::sun::star::uno::Reference< ::com::sun::star::container::XNamed > & xNamed,
- ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > & xNameAccess, int nResId );
+ virtual AbstractSwRenameXNamedDlg * CreateSwRenameXNamedDlg(Window* pParent, //add for SwRenameXNamedDlg
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNamed > & xNamed,
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > & xNameAccess);
virtual AbstractSwModalRedlineAcceptDlg * CreateSwModalRedlineAcceptDlg(Window *pParent); //add for SwModalRedlineAcceptDlg
virtual VclAbstractDialog* CreateTblMergeDialog(Window* pParent, sal_Bool& rWithPrev); //add for SwMergeTblDlg
diff --git a/sw/source/ui/inc/swrenamexnameddlg.hxx b/sw/source/ui/inc/swrenamexnameddlg.hxx
index a4e4a6e18554..968c89f69a14 100644
--- a/sw/source/ui/inc/swrenamexnameddlg.hxx
+++ b/sw/source/ui/inc/swrenamexnameddlg.hxx
@@ -33,14 +33,10 @@
class SwRenameXNamedDlg : public ModalDialog
{
- FixedLine aNameFL;
- FixedText aNewNameFT;
- NoSpaceEdit aNewNameED;
- OKButton aOk;
- CancelButton aCancel;
- HelpButton aHelp;
+ NoSpaceEdit* m_pNewNameED;
+ OKButton* m_pOk;
- String sRemoveWarning;
+ OUString m_sRemoveWarning;
::com::sun::star::uno::Reference< ::com::sun::star::container::XNamed > & xNamed;
::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > & xNameAccess;
@@ -55,8 +51,10 @@ public:
::com::sun::star::uno::Reference< ::com::sun::star::container::XNamed > & xNamed,
::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > & xNameAccess );
- void SetForbiddenChars( const String& rSet )
- { aNewNameED.SetForbiddenChars( rSet ); }
+ void SetForbiddenChars(const OUString& rSet)
+ {
+ m_pNewNameED->SetForbiddenChars(rSet);
+ }
void SetAlternativeAccess(
::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > & xSecond,
diff --git a/sw/source/ui/utlui/content.cxx b/sw/source/ui/utlui/content.cxx
index dfd6aebeba78..0d995dd55694 100644
--- a/sw/source/ui/utlui/content.cxx
+++ b/sw/source/ui/utlui/content.cxx
@@ -2889,7 +2889,7 @@ void SwContentTree::EditEntry(SvTreeListEntry* pEntry, sal_uInt8 nMode)
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
- AbstractSwRenameXNamedDlg* pDlg = pFact->CreateSwRenameXNamedDlg( this, xNamed, xNameAccess, DLG_RENAME_XNAMED );
+ AbstractSwRenameXNamedDlg* pDlg = pFact->CreateSwRenameXNamedDlg(this, xNamed, xNameAccess);
OSL_ENSURE(pDlg, "Dialogdiet fail!");
if(xSecond.is())
pDlg->SetAlternativeAccess( xSecond, xThird);
diff --git a/sw/source/ui/utlui/swrenamexnameddlg.cxx b/sw/source/ui/utlui/swrenamexnameddlg.cxx
index 31979e3ddf6b..1da76d3e4094 100644
--- a/sw/source/ui/utlui/swrenamexnameddlg.cxx
+++ b/sw/source/ui/utlui/swrenamexnameddlg.cxx
@@ -54,36 +54,32 @@ using namespace ::com::sun::star;
SwRenameXNamedDlg::SwRenameXNamedDlg( Window* pWin,
uno::Reference< container::XNamed > & xN,
- uno::Reference< container::XNameAccess > & xNA ) :
- ModalDialog(pWin, SW_RES(DLG_RENAME_XNAMED)),
- aNameFL(this, SW_RES(FL_NAME)),
- aNewNameFT(this, SW_RES(FT_NEW_NAME)),
- aNewNameED(this, SW_RES(ED_NEW_NAME)),
- aOk(this, SW_RES(PB_OK)),
- aCancel(this, SW_RES(PB_CANCEL)),
- aHelp(this, SW_RES(PB_HELP)),
- xNamed(xN),
- xNameAccess(xNA)
+ uno::Reference< container::XNameAccess > & xNA )
+ : ModalDialog(pWin, "RenameObjectDialog",
+ "modules/swriter/ui/renameobjectdialog.ui")
+ , m_sRemoveWarning(SW_RESSTR(STR_REMOVE_WARNING))
+ , xNamed(xN)
+ , xNameAccess(xNA)
{
- FreeResource();
- sRemoveWarning = String(SW_RES(STR_REMOVE_WARNING));
+ get(m_pNewNameED, "entry");
+ get(m_pOk, "ok");
String sTmp(GetText());
- aNewNameED.SetText(xNamed->getName());
- aNewNameED.SetSelection(Selection(SELECTION_MIN, SELECTION_MAX));
+ m_pNewNameED->SetText(xNamed->getName());
+ m_pNewNameED->SetSelection(Selection(SELECTION_MIN, SELECTION_MAX));
sTmp += String(xNamed->getName());
SetText(sTmp);
- aOk.SetClickHdl(LINK(this, SwRenameXNamedDlg, OkHdl));
- aNewNameED.SetModifyHdl(LINK(this, SwRenameXNamedDlg, ModifyHdl));
- aOk.Enable(sal_False);
+ m_pOk->SetClickHdl(LINK(this, SwRenameXNamedDlg, OkHdl));
+ m_pNewNameED->SetModifyHdl(LINK(this, SwRenameXNamedDlg, ModifyHdl));
+ m_pOk->Enable(sal_False);
}
IMPL_LINK_NOARG(SwRenameXNamedDlg, OkHdl)
{
try
{
- xNamed->setName(aNewNameED.GetText());
+ xNamed->setName(m_pNewNameED->GetText());
}
catch (const uno::RuntimeException&)
{
@@ -110,12 +106,12 @@ IMPL_LINK(SwRenameXNamedDlg, ModifyHdl, NoSpaceEdit*, pEdit)
if(sTmp.Len() != nLen)
{
pEdit->SetText(sTmp);
- String sWarning(sRemoveWarning);
+ String sWarning(m_sRemoveWarning);
sWarning += sMsg;
InfoBox(this, sWarning).Execute();
}
- aOk.Enable(sTmp.Len() && !xNameAccess->hasByName(sTmp)
+ m_pOk->Enable(sTmp.Len() && !xNameAccess->hasByName(sTmp)
&& (!xSecondAccess.is() || !xSecondAccess->hasByName(sTmp))
&& (!xThirdAccess.is() || !xThirdAccess->hasByName(sTmp))
);
diff --git a/sw/source/ui/utlui/unotools.src b/sw/source/ui/utlui/unotools.src
index c7425d6fb800..7ee442ed1589 100644
--- a/sw/source/ui/utlui/unotools.src
+++ b/sw/source/ui/utlui/unotools.src
@@ -21,60 +21,11 @@
#include <globals.hrc>
#include <helpid.h>
-ModalDialog DLG_RENAME_XNAMED
-{
- HelpID = HID_RENAME_XNAMED ;
- OutputSize = TRUE ;
- SVLook = TRUE ;
- Size = MAP_APPFONT ( 220 , 60 ) ;
- Moveable = TRUE ;
- FixedText FT_NEW_NAME
- {
- Pos = MAP_APPFONT ( 12 , 15 ) ;
- Size = MAP_APPFONT ( 50 , 10 ) ;
- Text [ en-US ] = "New name";
- };
- Edit ED_NEW_NAME
- {
- HelpID = "sw:Edit:DLG_RENAME_XNAMED:ED_NEW_NAME";
- Pos = MAP_APPFONT ( 65 , 13 ) ;
- Size = MAP_APPFONT ( 87 , 12 ) ;
- Border = TRUE;
- };
- FixedLine FL_NAME
- {
- Pos = MAP_APPFONT ( 6 , 3 ) ;
- Size = MAP_APPFONT ( 152 , 8 ) ;
- Text [ en-US ] = "Change name";
- };
- OKButton PB_OK
- {
- Pos = MAP_APPFONT ( 164 , 6 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- Group = TRUE ;
- DefButton = TRUE ;
- };
- CancelButton PB_CANCEL
- {
- Pos = MAP_APPFONT ( 164 , 23 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- Group = TRUE ;
- };
- HelpButton PB_HELP
- {
- Pos = MAP_APPFONT ( 164 , 43 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- Group = TRUE ;
- };
- Text [ en-US ] = "Rename object: ";
-};
String STR_SERVICE_UNAVAILABLE
{
Text [ en-US ] = "The following service is not available: ";
};
+
Resource RES_FRMEX_MENU
{
StringArray 1