[Libreoffice-commits] core.git: sw/AllLangResTarget_sw.mk sw/inc sw/source sw/UIConfig_swriter.mk
Caolán McNamara
caolanm at redhat.com
Mon Jun 10 08:41:54 PDT 2013
sw/AllLangResTarget_sw.mk | 1
sw/UIConfig_swriter.mk | 1
sw/inc/swabstdlg.hxx | 2 -
sw/source/ui/dialog/swdlgfact.cxx | 18 ++-----------
sw/source/ui/dialog/swdlgfact.hxx | 2 -
sw/source/ui/inc/docfnote.hxx | 4 ++
sw/source/ui/inc/frmui.hrc | 3 --
sw/source/ui/inc/misc.hrc | 1
sw/source/ui/misc/docfnote.cxx | 19 +++++--------
sw/source/ui/misc/docfnote.src | 52 --------------------------------------
sw/source/ui/shells/annotsh.cxx | 2 -
sw/source/ui/shells/drawsh.cxx | 2 -
sw/source/ui/shells/drwtxtex.cxx | 2 -
sw/source/ui/shells/frmsh.cxx | 2 -
sw/source/ui/shells/textsh1.cxx | 2 -
15 files changed, 21 insertions(+), 92 deletions(-)
New commits:
commit 1ecae380c85f891811923462d577a2e4f7bfb4d7
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Jun 10 16:28:18 2013 +0100
convert foot/endnote dialog to .ui
Change-Id: Ib2f267b85b04be91b7e9091613b0665a1eea3f01
diff --git a/sw/AllLangResTarget_sw.mk b/sw/AllLangResTarget_sw.mk
index 1b16550..ceeb41b 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 89e6eac..7cf200e 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 2e8ae75..a7563b8 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 0f5a859..81f62b1 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 7ca57c2..c46abe6 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 2ccd6fd..154bb01 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 1de6606..612a32b 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 aa37171a..95113ff 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 70741dd..e5547ad 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 f532df7..0000000
--- 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 e5ccd06..1fd0bf9 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 36c758a..a7627c6 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 548629d..ce9f3e7 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 0755f0e..8c70438 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 25976e9..340e938 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;
More information about the Libreoffice-commits
mailing list