diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-06-10 16:28:18 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-06-10 16:41:32 +0100 |
commit | 1ecae380c85f891811923462d577a2e4f7bfb4d7 (patch) | |
tree | 4af6aef45f7c7e586a29b590667908a734f0f04d /sw | |
parent | 8df088781c53221498e762f570d21948b7de2650 (diff) |
convert foot/endnote dialog to .ui
Change-Id: Ib2f267b85b04be91b7e9091613b0665a1eea3f01
Diffstat (limited to 'sw')
-rw-r--r-- | sw/AllLangResTarget_sw.mk | 1 | ||||
-rw-r--r-- | sw/UIConfig_swriter.mk | 1 | ||||
-rw-r--r-- | sw/inc/swabstdlg.hxx | 2 | ||||
-rw-r--r-- | sw/source/ui/dialog/swdlgfact.cxx | 18 | ||||
-rw-r--r-- | sw/source/ui/dialog/swdlgfact.hxx | 2 | ||||
-rw-r--r-- | sw/source/ui/inc/docfnote.hxx | 4 | ||||
-rw-r--r-- | sw/source/ui/inc/frmui.hrc | 3 | ||||
-rw-r--r-- | sw/source/ui/inc/misc.hrc | 1 | ||||
-rw-r--r-- | sw/source/ui/misc/docfnote.cxx | 19 | ||||
-rw-r--r-- | sw/source/ui/misc/docfnote.src | 52 | ||||
-rw-r--r-- | sw/source/ui/shells/annotsh.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/shells/drawsh.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/shells/drwtxtex.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/shells/frmsh.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/shells/textsh1.cxx | 2 |
15 files changed, 21 insertions, 92 deletions
diff --git a/sw/AllLangResTarget_sw.mk b/sw/AllLangResTarget_sw.mk index 1b1655016ffb..ceeb41b59f25 100644 --- a/sw/AllLangResTarget_sw.mk +++ b/sw/AllLangResTarget_sw.mk @@ -126,7 +126,6 @@ $(eval $(call gb_SrsTarget_add_files,sw/res,\ sw/source/ui/index/idxmrk.src \ sw/source/ui/index/multmrk.src \ sw/source/ui/lingu/olmenu.src \ - sw/source/ui/misc/docfnote.src \ sw/source/ui/misc/glossary.src \ sw/source/ui/misc/numberingtypelistbox.src \ sw/source/ui/misc/redlndlg.src \ diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk index 89e6eacd7834..7cf200e26e66 100644 --- a/sw/UIConfig_swriter.mk +++ b/sw/UIConfig_swriter.mk @@ -80,6 +80,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\ sw/uiconfig/swriter/ui/editsectiondialog \ sw/uiconfig/swriter/ui/exchangedatabases \ sw/uiconfig/swriter/ui/formattablepage \ + sw/uiconfig/swriter/ui/footendnotedialog \ sw/uiconfig/swriter/ui/footnotepage \ sw/uiconfig/swriter/ui/footnoteareapage \ sw/uiconfig/swriter/ui/indexentry \ diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx index 2e8ae75d2039..a7563b8c441f 100644 --- a/sw/inc/swabstdlg.hxx +++ b/sw/inc/swabstdlg.hxx @@ -348,7 +348,7 @@ public: ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDataSource> rxSource, com::sun::star::uno::Reference<com::sun::star::sdbcx::XColumnsSupplier> xColSupp, const SwDBData& rData, int nResId) = 0; - virtual SfxAbstractTabDialog * CreateSwFootNoteOptionDlg( Window *pParent, SwWrtShell &rSh,int nResId) = 0;//add for SwFootNoteOptionDlg + virtual SfxAbstractTabDialog * CreateSwFootNoteOptionDlg(Window *pParent, SwWrtShell &rSh) = 0;//add for SwFootNoteOptionDlg //add for DropDownFieldDialog virtual AbstractDropDownFieldDialog * CreateDropDownFieldDialog(Window *pParent, SwWrtShell &rSh, diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx index 0f5a8596a49b..81f62b11d0c3 100644 --- a/sw/source/ui/dialog/swdlgfact.cxx +++ b/sw/source/ui/dialog/swdlgfact.cxx @@ -759,22 +759,10 @@ AbstractSwInsertDBColAutoPilot* SwAbstractDialogFactory_Impl::CreateSwInsertDBCo return 0; } -SfxAbstractTabDialog * SwAbstractDialogFactory_Impl::CreateSwFootNoteOptionDlg( Window *pParent, SwWrtShell &rSh,int nResId) +SfxAbstractTabDialog * SwAbstractDialogFactory_Impl::CreateSwFootNoteOptionDlg(Window *pParent, SwWrtShell &rSh) { - SfxTabDialog* pDlg=NULL; - switch ( nResId ) - { - case DLG_DOC_FOOTNOTE : - pDlg = new SwFootNoteOptionDlg( pParent, rSh ); - break; - - default: - break; - } - - if ( pDlg ) - return new AbstractTabDialog_Impl( pDlg ); - return 0; + SfxTabDialog* pDlg = new SwFootNoteOptionDlg( pParent, rSh ); + return new AbstractTabDialog_Impl( pDlg ); } //add for DropDownFieldDialog diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx index 7ca57c282191..c46abe634f37 100644 --- a/sw/source/ui/dialog/swdlgfact.hxx +++ b/sw/source/ui/dialog/swdlgfact.hxx @@ -452,7 +452,7 @@ public: ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDataSource> rxSource, com::sun::star::uno::Reference<com::sun::star::sdbcx::XColumnsSupplier> xColSupp, const SwDBData& rData, int nResId); - virtual SfxAbstractTabDialog * CreateSwFootNoteOptionDlg( Window *pParent, SwWrtShell &rSh,int nResId);//add for SwFootNoteOptionDlg + virtual SfxAbstractTabDialog * CreateSwFootNoteOptionDlg(Window *pParent, SwWrtShell &rSh);//add for SwFootNoteOptionDlg //add for DropDownFieldDialog virtual AbstractDropDownFieldDialog * CreateDropDownFieldDialog (Window *pParent, SwWrtShell &rSh, diff --git a/sw/source/ui/inc/docfnote.hxx b/sw/source/ui/inc/docfnote.hxx index 2ccd6fd90ea2..154bb0134d5c 100644 --- a/sw/source/ui/inc/docfnote.hxx +++ b/sw/source/ui/inc/docfnote.hxx @@ -28,13 +28,15 @@ class SwFootNoteOptionDlg :public SfxTabDialog SwWrtShell &rSh; Link aOldOkHdl; + sal_uInt16 m_nFootNoteId; + sal_uInt16 m_nEndNoteId; + virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage ); DECL_LINK( OkHdl, Button * ); public: SwFootNoteOptionDlg(Window *pParent, SwWrtShell &rSh ); - ~SwFootNoteOptionDlg(); }; #endif diff --git a/sw/source/ui/inc/frmui.hrc b/sw/source/ui/inc/frmui.hrc index 1de6606b8b86..612a32b227a5 100644 --- a/sw/source/ui/inc/frmui.hrc +++ b/sw/source/ui/inc/frmui.hrc @@ -28,9 +28,6 @@ #define DLG_CAPTION (RC_FRMDLG_BEGIN + 11) #define DLG_SEQUENCE_OPTION (RC_FRMDLG_BEGIN + 12) -#define TP_FOOTNOTEOPTION (RC_FRMDLG_BEGIN + 12) -#define TP_ENDNOTEOPTION (RC_FRMDLG_BEGIN + 13) - #define STR_FRMUI_BORDER (RC_FRMDLG_BEGIN + 16) #define STR_FRMUI_PATTERN (RC_FRMDLG_BEGIN + 17) #define STR_FRMUI_WRAP (RC_FRMDLG_BEGIN + 18) diff --git a/sw/source/ui/inc/misc.hrc b/sw/source/ui/inc/misc.hrc index aa37171a3f17..95113ff989f2 100644 --- a/sw/source/ui/inc/misc.hrc +++ b/sw/source/ui/inc/misc.hrc @@ -22,7 +22,6 @@ #include "rcid.hrc" -#define DLG_DOC_FOOTNOTE (RC_MISC_BEGIN + 13) #define DLG_INSERT_BOOKMARK (RC_MISC_BEGIN + 17) #define DLG_NUM_NAMES (RC_MISC_BEGIN + 18) #define DLG_SORTING (RC_MISC_BEGIN + 19) diff --git a/sw/source/ui/misc/docfnote.cxx b/sw/source/ui/misc/docfnote.cxx index 70741dd77068..e5547ad5807c 100644 --- a/sw/source/ui/misc/docfnote.cxx +++ b/sw/source/ui/misc/docfnote.cxx @@ -37,18 +37,17 @@ #include <frmui.hrc> #include <SwStyleNameMapper.hxx> -SwFootNoteOptionDlg::SwFootNoteOptionDlg( Window *pParent, SwWrtShell &rS ) : - SfxTabDialog( pParent, SW_RES(DLG_DOC_FOOTNOTE) ), - rSh( rS ) +SwFootNoteOptionDlg::SwFootNoteOptionDlg(Window *pParent, SwWrtShell &rS) + : SfxTabDialog(pParent, "FootEndnoteDialog", "modules/swriter/ui/footendnotedialog.ui") + , rSh( rS ) { - FreeResource(); RemoveResetButton(); aOldOkHdl = GetOKButton().GetClickHdl(); GetOKButton().SetClickHdl( LINK( this, SwFootNoteOptionDlg, OkHdl ) ); - AddTabPage( TP_FOOTNOTEOPTION, SwFootNoteOptionPage::Create, 0 ); - AddTabPage( TP_ENDNOTEOPTION, SwEndNoteOptionPage::Create, 0 ); + m_nFootNoteId = AddTabPage( "footnotes", SwFootNoteOptionPage::Create, 0 ); + m_nEndNoteId = AddTabPage( "endnotes", SwEndNoteOptionPage::Create, 0 ); } void SwFootNoteOptionDlg::PageCreated( sal_uInt16 /*nId*/, SfxTabPage &rPage ) @@ -56,17 +55,13 @@ void SwFootNoteOptionDlg::PageCreated( sal_uInt16 /*nId*/, SfxTabPage &rPage ) ((SwEndNoteOptionPage&)rPage).SetShell( rSh ); } -SwFootNoteOptionDlg::~SwFootNoteOptionDlg() -{ -} - IMPL_LINK( SwFootNoteOptionDlg, OkHdl, Button *, pBtn ) { SfxItemSet aDummySet(rSh.GetAttrPool(), 1, 1 ); - SfxTabPage *pPage = GetTabPage( TP_FOOTNOTEOPTION ); + SfxTabPage *pPage = GetTabPage( m_nFootNoteId ); if ( pPage ) pPage->FillItemSet( aDummySet ); - pPage = GetTabPage( TP_ENDNOTEOPTION ); + pPage = GetTabPage( m_nEndNoteId ); if ( pPage ) pPage->FillItemSet( aDummySet ); aOldOkHdl.Call( pBtn ); diff --git a/sw/source/ui/misc/docfnote.src b/sw/source/ui/misc/docfnote.src deleted file mode 100644 index f532df7341c3..000000000000 --- a/sw/source/ui/misc/docfnote.src +++ /dev/null @@ -1,52 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * 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 "misc.hrc" -#include "helpid.h" -#include "cmdid.h" -#include "frmui.hrc" -TabDialog DLG_DOC_FOOTNOTE -{ - OutputSize = TRUE ; - SVLook = TRUE ; - Text [ en-US ] = "Footnotes/Endnotes Settings" ; - Moveable = TRUE ; - Sizeable = TRUE ; - TabControl 1 - { - OutputSize = TRUE ; - PageList = - { - PageItem - { - Identifier = TP_FOOTNOTEOPTION ; - PageResID = TP_FOOTNOTEOPTION ; - Text [ en-US ] = "Footnotes" ; - }; - PageItem - { - Identifier = TP_ENDNOTEOPTION ; - PageResID = TP_ENDNOTEOPTION ; - Text [ en-US ] = "Endnotes" ; - }; - }; - }; -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/shells/annotsh.cxx b/sw/source/ui/shells/annotsh.cxx index e5ccd066fba0..1fd0bf98a3d2 100644 --- a/sw/source/ui/shells/annotsh.cxx +++ b/sw/source/ui/shells/annotsh.cxx @@ -409,7 +409,7 @@ void SwAnnotationShell::Exec( SfxRequest &rReq ) SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); - VclAbstractDialog* pDlg = pFact->CreateSwFootNoteOptionDlg( rView.GetWindow(), rView.GetWrtShell(), DLG_DOC_FOOTNOTE ); + VclAbstractDialog* pDlg = pFact->CreateSwFootNoteOptionDlg(rView.GetWindow(), rView.GetWrtShell()); OSL_ENSURE(pDlg, "Dialogdiet fail!"); pDlg->Execute(); delete pDlg; diff --git a/sw/source/ui/shells/drawsh.cxx b/sw/source/ui/shells/drawsh.cxx index 36c758a0bf2d..a7627c61ba52 100644 --- a/sw/source/ui/shells/drawsh.cxx +++ b/sw/source/ui/shells/drawsh.cxx @@ -186,7 +186,7 @@ void SwDrawShell::Execute(SfxRequest &rReq) SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); - VclAbstractDialog* pDlg = pFact->CreateSwFootNoteOptionDlg( GetView().GetWindow(), GetView().GetWrtShell(), DLG_DOC_FOOTNOTE ); + VclAbstractDialog* pDlg = pFact->CreateSwFootNoteOptionDlg(GetView().GetWindow(), GetView().GetWrtShell()); OSL_ENSURE(pDlg, "Dialogdiet fail!"); pDlg->Execute(); delete pDlg; diff --git a/sw/source/ui/shells/drwtxtex.cxx b/sw/source/ui/shells/drwtxtex.cxx index 548629df61b7..ce9f3e790cc0 100644 --- a/sw/source/ui/shells/drwtxtex.cxx +++ b/sw/source/ui/shells/drwtxtex.cxx @@ -346,7 +346,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq ) SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); - VclAbstractDialog* pDlg = pFact->CreateSwFootNoteOptionDlg( GetView().GetWindow(), rView.GetWrtShell(), DLG_DOC_FOOTNOTE ); + VclAbstractDialog* pDlg = pFact->CreateSwFootNoteOptionDlg(GetView().GetWindow(), rView.GetWrtShell()); OSL_ENSURE(pDlg, "Dialogdiet fail!"); pDlg->Execute(); delete pDlg; diff --git a/sw/source/ui/shells/frmsh.cxx b/sw/source/ui/shells/frmsh.cxx index 0755f0e2cdb0..8c70438f6944 100644 --- a/sw/source/ui/shells/frmsh.cxx +++ b/sw/source/ui/shells/frmsh.cxx @@ -234,7 +234,7 @@ void SwFrameShell::Execute(SfxRequest &rReq) SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); - VclAbstractDialog* pDlg = pFact->CreateSwFootNoteOptionDlg( GetView().GetWindow(), GetView().GetWrtShell(), DLG_DOC_FOOTNOTE ); + VclAbstractDialog* pDlg = pFact->CreateSwFootNoteOptionDlg(GetView().GetWindow(), GetView().GetWrtShell()); OSL_ENSURE(pDlg, "Dialogdiet fail!"); pDlg->Execute(); delete pDlg; diff --git a/sw/source/ui/shells/textsh1.cxx b/sw/source/ui/shells/textsh1.cxx index 25976e97841b..340e938ddac6 100644 --- a/sw/source/ui/shells/textsh1.cxx +++ b/sw/source/ui/shells/textsh1.cxx @@ -477,7 +477,7 @@ void SwTextShell::Execute(SfxRequest &rReq) SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); - VclAbstractDialog* pDlg = pFact->CreateSwFootNoteOptionDlg( GetView().GetWindow(), rWrtSh, DLG_DOC_FOOTNOTE ); + VclAbstractDialog* pDlg = pFact->CreateSwFootNoteOptionDlg(GetView().GetWindow(), rWrtSh); OSL_ENSURE(pDlg, "Dialogdiet fail!"); pDlg->Execute(); delete pDlg; |