[Libreoffice-commits] .: sw/AllLangResTarget_sw.mk sw/inc sw/source sw/uiconfig sw/UI_sw.mk sw/UI_swriter.mk
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Tue Oct 2 05:18:32 PDT 2012
sw/AllLangResTarget_sw.mk | 1
sw/UI_sw.mk | 1
sw/UI_swriter.mk | 1
sw/inc/chrdlg.hrc | 1
sw/inc/swabstdlg.hxx | 2
sw/source/ui/chrdlg/break.cxx | 118 +++++++--------
sw/source/ui/chrdlg/break.hrc | 30 ---
sw/source/ui/chrdlg/swbreak.src | 139 ------------------
sw/source/ui/dialog/swdlgfact.cxx | 21 --
sw/source/ui/dialog/swdlgfact.hxx | 2
sw/source/ui/inc/break.hxx | 19 --
sw/source/ui/shells/textsh1.cxx | 2
sw/uiconfig/sw/ui/20705.ui | 253 --------------------------------
sw/uiconfig/swriter/ui/insertbreak.ui | 261 ++++++++++++++++++++++++++++++++++
14 files changed, 330 insertions(+), 521 deletions(-)
New commits:
commit ad09ced9f63be77831aab6708b2afa2861ff0eaa
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Oct 2 13:17:28 2012 +0100
Resolves: fdo#55524 convert insert break dialog fully
Change-Id: Id25bde8db310a83b52ebda7d47d0b1dcda79ed45
diff --git a/sw/AllLangResTarget_sw.mk b/sw/AllLangResTarget_sw.mk
index 21d313f..8d7f4f8 100644
--- a/sw/AllLangResTarget_sw.mk
+++ b/sw/AllLangResTarget_sw.mk
@@ -87,7 +87,6 @@ $(eval $(call gb_SrsTarget_add_files,sw/res,\
sw/source/ui/chrdlg/drpcps.src \
sw/source/ui/chrdlg/numpara.src \
sw/source/ui/chrdlg/paradlg.src \
- sw/source/ui/chrdlg/swbreak.src \
sw/source/ui/config/mailconfigpage.src \
sw/source/ui/config/optcomp.src \
sw/source/ui/config/optdlg.src \
diff --git a/sw/UI_sw.mk b/sw/UI_sw.mk
index 789da4f..96e8a2a 100644
--- a/sw/UI_sw.mk
+++ b/sw/UI_sw.mk
@@ -10,7 +10,6 @@
$(eval $(call gb_UI_UI,sw))
$(eval $(call gb_UI_add_uifiles,sw,\
- sw/uiconfig/sw/ui/20705 \
sw/uiconfig/sw/ui/20872 \
sw/uiconfig/sw/ui/20876 \
))
diff --git a/sw/UI_swriter.mk b/sw/UI_swriter.mk
index b08b0fb..fc53c25 100644
--- a/sw/UI_swriter.mk
+++ b/sw/UI_swriter.mk
@@ -14,6 +14,7 @@ $(eval $(call gb_UI_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/charurlpage \
sw/uiconfig/swriter/ui/columnwidth \
sw/uiconfig/swriter/ui/converttexttable \
+ sw/uiconfig/swriter/ui/insertbreak \
sw/uiconfig/swriter/ui/inserttable \
sw/uiconfig/swriter/ui/linenumbering \
sw/uiconfig/swriter/ui/printeroptions \
diff --git a/sw/inc/chrdlg.hrc b/sw/inc/chrdlg.hrc
index a365245..ea17a38 100644
--- a/sw/inc/chrdlg.hrc
+++ b/sw/inc/chrdlg.hrc
@@ -23,7 +23,6 @@
#define DLG_CHAR (RC_CHRDLG_BEGIN + 1)
#define DLG_PARA (RC_CHRDLG_BEGIN + 2)
-#define DLG_BREAK (RC_CHRDLG_BEGIN + 5)
#define DLG_DROPCAPS (RC_CHRDLG_BEGIN + 8)
#define DLG_DRAWCHAR (RC_CHRDLG_BEGIN + 9)
#define DLG_DRAWPARA (RC_CHRDLG_BEGIN + 10)
diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx
index 10398a8..5f12fa8 100644
--- a/sw/inc/swabstdlg.hxx
+++ b/sw/inc/swabstdlg.hxx
@@ -362,7 +362,7 @@ public:
SvStream* pStream, int nResId ) = 0;// add for SwAsciiFilterDlg
virtual VclAbstractDialog * CreateSwInsertBookmarkDlg( Window *pParent, SwWrtShell &rSh, SfxRequest& rReq, int nResId ) = 0;// add for SwInsertBookmarkDlg
- virtual AbstractSwBreakDlg * CreateSwBreakDlg( Window *pParent, SwWrtShell &rSh,int nResId ) = 0; // add for SwBreakDlg
+ virtual AbstractSwBreakDlg * CreateSwBreakDlg(Window *pParent, SwWrtShell &rSh) = 0; // add for SwBreakDlg
virtual VclAbstractDialog * CreateSwChangeDBDlg( SwView& rVw, int nResId ) = 0; //add for SwChangeDBDlg
virtual SfxAbstractTabDialog * CreateSwCharDlg( Window* pParent, SwView& pVw, const SfxItemSet& rCoreSet, int nResId, // add for SwCharDlg
const String* pFmtStr = 0, sal_Bool bIsDrwTxtDlg = sal_False) = 0;
diff --git a/sw/source/ui/chrdlg/break.cxx b/sw/source/ui/chrdlg/break.cxx
index 0e6e473..5abbd8d 100644
--- a/sw/source/ui/chrdlg/break.cxx
+++ b/sw/source/ui/chrdlg/break.cxx
@@ -41,25 +41,24 @@
#include <pagedesc.hxx>
#include <poolfmt.hxx>
-#include <break.hrc>
#include <chrdlg.hrc>
#include <SwStyleNameMapper.hxx>
void SwBreakDlg::Apply()
{
nKind = 0;
- if(aLineBtn.IsChecked())
+ if(m_pLineBtn->IsChecked())
nKind = 1;
- else if(aColumnBtn.IsChecked())
+ else if(m_pColumnBtn->IsChecked())
nKind = 2;
- else if(aPageBtn.IsChecked())
+ else if(m_pPageBtn->IsChecked())
{
nKind = 3;
- const sal_uInt16 nPos = aPageCollBox.GetSelectEntryPos();
+ const sal_uInt16 nPos = m_pPageCollBox->GetSelectEntryPos();
if(0 != nPos && LISTBOX_ENTRY_NOTFOUND != nPos)
{
- aTemplate = aPageCollBox.GetSelectEntry();
- nPgNum = aPageNumBox.IsChecked() ? (sal_uInt16)aPageNumEdit.GetValue() : 0;
+ aTemplate = m_pPageCollBox->GetSelectEntry();
+ nPgNum = m_pPageNumBox->IsChecked() ? (sal_uInt16)m_pPageNumEdit->GetValue() : 0;
}
}
}
@@ -77,8 +76,8 @@ IMPL_LINK_NOARG_INLINE_END(SwBreakDlg, ClickHdl)
IMPL_LINK_INLINE_START( SwBreakDlg, PageNumHdl, CheckBox *, pBox )
{
- if(pBox->IsChecked()) aPageNumEdit.SetValue(1);
- else aPageNumEdit.SetText(aEmptyStr);
+ if(pBox->IsChecked()) m_pPageNumEdit->SetValue(1);
+ else m_pPageNumEdit->SetText(OUString());
return 0;
}
IMPL_LINK_INLINE_END( SwBreakDlg, PageNumHdl, CheckBox *, pBox )
@@ -89,7 +88,7 @@ IMPL_LINK_INLINE_END( SwBreakDlg, PageNumHdl, CheckBox *, pBox )
IMPL_LINK_NOARG_INLINE_START(SwBreakDlg, PageNumModifyHdl)
{
- aPageNumBox.Check();
+ m_pPageNumBox->Check();
return 0;
}
IMPL_LINK_NOARG_INLINE_END(SwBreakDlg, PageNumModifyHdl)
@@ -103,19 +102,19 @@ IMPL_LINK_NOARG_INLINE_END(SwBreakDlg, PageNumModifyHdl)
IMPL_LINK_NOARG(SwBreakDlg, OkHdl)
{
- if(aPageNumBox.IsChecked()) {
+ if(m_pPageNumBox->IsChecked()) {
// In case of differing page descriptions, test validity
- const sal_uInt16 nPos = aPageCollBox.GetSelectEntryPos();
+ const sal_uInt16 nPos = m_pPageCollBox->GetSelectEntryPos();
// position 0 says 'Without'.
const SwPageDesc *pPageDesc;
if ( 0 != nPos && LISTBOX_ENTRY_NOTFOUND != nPos )
- pPageDesc = rSh.FindPageDescByName( aPageCollBox.GetSelectEntry(),
+ pPageDesc = rSh.FindPageDescByName( m_pPageCollBox->GetSelectEntry(),
sal_True );
else
pPageDesc = &rSh.GetPageDesc(rSh.GetCurPageDesc());
OSL_ENSURE(pPageDesc, "Page description not found.");
- const sal_uInt16 nUserPage = sal_uInt16(aPageNumEdit.GetValue());
+ const sal_uInt16 nUserPage = sal_uInt16(m_pPageNumEdit->GetValue());
sal_Bool bOk = sal_True;
switch(pPageDesc->GetUseOn())
{
@@ -127,7 +126,7 @@ IMPL_LINK_NOARG(SwBreakDlg, OkHdl)
}
if(!bOk) {
InfoBox(this, SW_RES(MSG_ILLEGAL_PAGENUM)).Execute();
- aPageNumEdit.GrabFocus();
+ m_pPageNumEdit->GrabFocus();
return 0;
}
}
@@ -135,41 +134,33 @@ IMPL_LINK_NOARG(SwBreakDlg, OkHdl)
return 0;
}
-SwBreakDlg::SwBreakDlg( Window *pParent, SwWrtShell &rS ) :
-
- SvxStandardDialog( pParent,SW_RES(DLG_BREAK) ),
-
- rSh(rS),
- aBreakFL(this,SW_RES(FL_BREAK)),
- aLineBtn(this,SW_RES(RB_LINE)),
- aColumnBtn(this,SW_RES(RB_COL)),
- aPageBtn(this,SW_RES(RB_PAGE)),
- aPageCollText(this, SW_RES(FT_COLL)),
- aPageCollBox(this, SW_RES(LB_COLL)),
- aPageNumBox(this, SW_RES(CB_PAGENUM)),
- aPageNumEdit(this, SW_RES(ED_PAGENUM)),
-
- aOkBtn(this,SW_RES(BT_OK)),
- aCancelBtn(this,SW_RES(BT_CANCEL)),
- aHelpBtn(this,SW_RES(BT_HELP)),
-
- nKind(0),
- nPgNum(0),
-
- bHtmlMode(0 != ::GetHtmlMode(rS.GetView().GetDocShell()))
+SwBreakDlg::SwBreakDlg( Window *pParent, SwWrtShell &rS )
+ : SvxStandardDialog(pParent, "BreakDialog", "modules/swriter/ui/insertbreak.ui")
+ , rSh(rS)
+ , nKind(0)
+ , nPgNum(0)
+ , bHtmlMode(0 != ::GetHtmlMode(rS.GetView().GetDocShell()))
{
- aPageNumEdit.SetAccessibleRelationLabeledBy(&aPageNumBox);
- aPageNumEdit.SetAccessibleName(aPageNumBox.GetText());
+ get(m_pLineBtn, "linerb");
+ get(m_pColumnBtn, "columnrb");
+ get(m_pPageBtn, "pagerb");
+ get(m_pPageCollText, "styleft");
+ get(m_pPageCollBox, "stylelb");
+ get(m_pPageNumBox, "pagenumcb");
+ get(m_pPageNumEdit, "pagenumsb");
+
+ m_pPageNumEdit->SetAccessibleRelationLabeledBy(m_pPageNumBox);
+ m_pPageNumEdit->SetAccessibleName(m_pPageNumBox->GetText());
Link aLk = LINK(this,SwBreakDlg,ClickHdl);
- aPageBtn.SetClickHdl( aLk );
- aLineBtn.SetClickHdl( aLk );
- aColumnBtn.SetClickHdl( aLk );
- aPageCollBox.SetSelectHdl( aLk );
+ m_pPageBtn->SetClickHdl( aLk );
+ m_pLineBtn->SetClickHdl( aLk );
+ m_pColumnBtn->SetClickHdl( aLk );
+ m_pPageCollBox->SetSelectHdl( aLk );
- aOkBtn.SetClickHdl(LINK(this,SwBreakDlg,OkHdl));
- aPageNumBox.SetClickHdl(LINK(this,SwBreakDlg,PageNumHdl));
- aPageNumEdit.SetModifyHdl(LINK(this,SwBreakDlg,PageNumModifyHdl));
+ get<OKButton>("ok")->SetClickHdl(LINK(this,SwBreakDlg,OkHdl));;
+ m_pPageNumBox->SetClickHdl(LINK(this,SwBreakDlg,PageNumHdl));
+ m_pPageNumEdit->SetModifyHdl(LINK(this,SwBreakDlg,PageNumModifyHdl));
// Insert page description to Listbox
@@ -179,21 +170,20 @@ SwBreakDlg::SwBreakDlg( Window *pParent, SwWrtShell &rS ) :
for( i = 0; i < nCount; ++i)
{
const SwPageDesc &rPageDesc = rSh.GetPageDesc(i);
- ::InsertStringSorted(rPageDesc.GetName(), aPageCollBox, 1 );
+ ::InsertStringSorted(rPageDesc.GetName(), *m_pPageCollBox, 1 );
}
String aFmtName;
for(i = RES_POOLPAGE_BEGIN; i < RES_POOLPAGE_END; ++i)
- if(LISTBOX_ENTRY_NOTFOUND == aPageCollBox.GetEntryPos( aFmtName =
+ if(LISTBOX_ENTRY_NOTFOUND == m_pPageCollBox->GetEntryPos( aFmtName =
SwStyleNameMapper::GetUIName( i, aFmtName )))
- ::InsertStringSorted(aFmtName, aPageCollBox, 1 );
+ ::InsertStringSorted(aFmtName, *m_pPageCollBox, 1 );
//add landscape page
- if(LISTBOX_ENTRY_NOTFOUND == aPageCollBox.GetEntryPos( aFmtName =
+ if(LISTBOX_ENTRY_NOTFOUND == m_pPageCollBox->GetEntryPos( aFmtName =
SwStyleNameMapper::GetUIName( RES_POOLPAGE_LANDSCAPE, aFmtName )))
- ::InsertStringSorted(aFmtName, aPageCollBox, 1 );
+ ::InsertStringSorted(aFmtName, *m_pPageCollBox, 1 );
CheckEnable();
- aPageNumEdit.SetText( aEmptyStr );
- FreeResource();
+ m_pPageNumEdit->SetText(OUString());
}
void SwBreakDlg::CheckEnable()
@@ -201,32 +191,32 @@ void SwBreakDlg::CheckEnable()
sal_Bool bEnable = sal_True;
if ( bHtmlMode )
{
- aColumnBtn .Enable(sal_False);
- aPageCollBox.Enable(sal_False);
+ m_pColumnBtn->Enable(sal_False);
+ m_pPageCollBox->Enable(sal_False);
bEnable = sal_False;
}
else if(rSh.GetFrmType(0,sal_True)
& (FRMTYPE_FLY_ANY | FRMTYPE_HEADER | FRMTYPE_FOOTER | FRMTYPE_FOOTNOTE))
{
- aPageBtn.Enable(sal_False);
- if(aPageBtn.IsChecked())
- aLineBtn.Check(sal_True);
+ m_pPageBtn->Enable(sal_False);
+ if(m_pPageBtn->IsChecked())
+ m_pLineBtn->Check(sal_True);
bEnable = sal_False;
}
- const sal_Bool bPage = aPageBtn.IsChecked();
- aPageCollText.Enable( bPage );
- aPageCollBox.Enable ( bPage );
+ const sal_Bool bPage = m_pPageBtn->IsChecked();
+ m_pPageCollText->Enable( bPage );
+ m_pPageCollBox->Enable ( bPage );
bEnable &= bPage;
if ( bEnable )
{
// position 0 says 'Without' page template.
- const sal_uInt16 nPos = aPageCollBox.GetSelectEntryPos();
+ const sal_uInt16 nPos = m_pPageCollBox->GetSelectEntryPos();
if ( 0 == nPos || LISTBOX_ENTRY_NOTFOUND == nPos )
bEnable = sal_False;
}
- aPageNumBox .Enable(bEnable);
- aPageNumEdit.Enable(bEnable);
+ m_pPageNumBox->Enable(bEnable);
+ m_pPageNumEdit->Enable(bEnable);
}
SwBreakDlg::~SwBreakDlg()
diff --git a/sw/source/ui/chrdlg/break.hrc b/sw/source/ui/chrdlg/break.hrc
deleted file mode 100644
index 29084c6..0000000
--- a/sw/source/ui/chrdlg/break.hrc
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * 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 RB_PAGE 1
-#define RB_LINE 2
-#define RB_COL 3
-#define FT_COLL 4
-#define LB_COLL 5
-#define FL_BREAK 6
-#define CB_PAGENUM 7
-#define ED_PAGENUM 8
-
-#define BT_OK 100
-#define BT_CANCEL 101
-#define BT_HELP 102
diff --git a/sw/source/ui/chrdlg/swbreak.src b/sw/source/ui/chrdlg/swbreak.src
deleted file mode 100644
index 1363b4c..0000000
--- a/sw/source/ui/chrdlg/swbreak.src
+++ /dev/null
@@ -1,139 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#include "chrdlg.hrc"
-#include "break.hrc"
-#include "cmdid.h"
-#include "helpid.h"
-ModalDialog DLG_BREAK
-{
- HelpID = CMD_FN_INSERT_BREAK_DLG ;
- OutputSize = TRUE ;
- SVLook = TRUE ;
- Size = MAP_APPFONT ( 161 , 114 ) ;
- Text [ en-US ] = "Insert Break" ;
- Moveable = TRUE ;
- OKButton BT_OK
- {
- Pos = MAP_APPFONT ( 105 , 6 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- Group = TRUE ;
- DefButton = TRUE ;
- };
- CancelButton BT_CANCEL
- {
- Pos = MAP_APPFONT ( 105 , 23 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- Group = TRUE ;
- };
- HelpButton BT_HELP
- {
- Pos = MAP_APPFONT ( 105 , 43 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- Group = TRUE ;
- };
- RadioButton RB_LINE
- {
- HelpID = "sw:RadioButton:DLG_BREAK:RB_LINE";
- Pos = MAP_APPFONT ( 12 , 15 ) ;
- Size = MAP_APPFONT ( 63 , 10 ) ;
- Text [ en-US ] = "~Line break" ;
- TabStop = TRUE ;
- Group = TRUE ;
- };
- RadioButton RB_PAGE
- {
- HelpID = "sw:RadioButton:DLG_BREAK:RB_PAGE";
- Pos = MAP_APPFONT ( 12 , 39 ) ;
- Size = MAP_APPFONT ( 63 , 10 ) ;
- Text [ en-US ] = "~Page break" ;
- TabStop = TRUE ;
- Check = TRUE ;
- };
- RadioButton RB_COL
- {
- HelpID = "sw:RadioButton:DLG_BREAK:RB_COL";
- Pos = MAP_APPFONT ( 12 , 27 ) ;
- Size = MAP_APPFONT ( 69 , 10 ) ;
- Text [ en-US ] = "~Column break" ;
- TabStop = TRUE ;
- };
- FixedLine FL_BREAK
- {
- Pos = MAP_APPFONT ( 6 , 3 ) ;
- Size = MAP_APPFONT ( 93 , 8 ) ;
- Text [ en-US ] = "Type" ;
- };
- FixedText FT_COLL
- {
- Pos = MAP_APPFONT ( 12 , 51 ) ;
- Size = MAP_APPFONT ( 69 , 8 ) ;
- Text [ en-US ] = "~Style" ;
- Group = TRUE ;
- Left = TRUE ;
- };
- ListBox LB_COLL
- {
- HelpID = "sw:ListBox:DLG_BREAK:LB_COLL";
- Pos = MAP_APPFONT ( 12 , 62 ) ;
- Size = MAP_APPFONT ( 75 , 50 ) ;
- TabStop = TRUE ;
- DropDown = TRUE ;
- CurPos = 0 ;
- StringList [ en-US ] =
- {
- < "[None]" ; > ;
- };
- };
- CheckBox CB_PAGENUM
- {
- HelpID = "sw:CheckBox:DLG_BREAK:CB_PAGENUM";
- Pos = MAP_APPFONT ( 12 , 79 ) ;
- Size = MAP_APPFONT ( 84 , 10 ) ;
- Text [ en-US ] = "Change page ~number" ;
- TabStop = TRUE ;
- };
- NumericField ED_PAGENUM
- {
- HelpID = "sw:NumericField:DLG_BREAK:ED_PAGENUM";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 12 , 94 ) ;
- Size = MAP_APPFONT ( 31 , 12 ) ;
- TabStop = TRUE ;
- Left = TRUE ;
- Repeat = TRUE ;
- Spin = TRUE ;
- Minimum = 1 ;
- Maximum = 9999 ;
- Value = 1 ;
- First = 1 ;
- Last = 9999 ;
- };
-};
diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx
index a062c72..131b707 100644
--- a/sw/source/ui/dialog/swdlgfact.cxx
+++ b/sw/source/ui/dialog/swdlgfact.cxx
@@ -713,24 +713,11 @@ VclAbstractDialog* SwAbstractDialogFactory_Impl::CreateSwInsertBookmarkDlg( Wind
return 0;
}
-AbstractSwBreakDlg * SwAbstractDialogFactory_Impl::CreateSwBreakDlg ( Window *pParent,
- SwWrtShell &rSh,
- int nResId )
+AbstractSwBreakDlg * SwAbstractDialogFactory_Impl::CreateSwBreakDlg(Window *pParent,
+ SwWrtShell &rSh)
{
- SwBreakDlg* pDlg=NULL;
- switch ( nResId )
- {
- case DLG_BREAK :
- pDlg = new SwBreakDlg( pParent, rSh );
- break;
-
- default:
- break;
- }
-
- if ( pDlg )
- return new AbstractSwBreakDlg_Impl( pDlg );
- return 0;
+ SwBreakDlg* pDlg = new SwBreakDlg(pParent, rSh);
+ return new AbstractSwBreakDlg_Impl(pDlg);
}
VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateSwChangeDBDlg( SwView& rVw, int nResId )
diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx
index da5e180..b94f61a 100644
--- a/sw/source/ui/dialog/swdlgfact.hxx
+++ b/sw/source/ui/dialog/swdlgfact.hxx
@@ -445,7 +445,7 @@ public:
virtual AbstractSwAsciiFilterDlg* CreateSwAsciiFilterDlg ( Window* pParent, SwDocShell& rDocSh,
SvStream* pStream, int nResId ); //add for SwAsciiFilterDlg
virtual VclAbstractDialog * CreateSwInsertBookmarkDlg( Window *pParent, SwWrtShell &rSh, SfxRequest& rReq, int nResId );//add for SwInsertBookmarkDlg
- virtual AbstractSwBreakDlg * CreateSwBreakDlg ( Window *pParent, SwWrtShell &rSh,int nResId ); // add for SwBreakDlg
+ virtual AbstractSwBreakDlg * CreateSwBreakDlg(Window *pParent, SwWrtShell &rSh); // add for SwBreakDlg
virtual VclAbstractDialog * CreateSwChangeDBDlg( SwView& rVw, int nResId ); //add for SwChangeDBDlg
virtual SfxAbstractTabDialog * CreateSwCharDlg( Window* pParent, SwView& pVw, const SfxItemSet& rCoreSet, int nResId, // add for SwCharDlg
const String* pFmtStr = 0, sal_Bool bIsDrwTxtDlg = sal_False);
diff --git a/sw/source/ui/inc/break.hxx b/sw/source/ui/inc/break.hxx
index caa75d1..e95d930 100644
--- a/sw/source/ui/inc/break.hxx
+++ b/sw/source/ui/inc/break.hxx
@@ -43,18 +43,13 @@ class SwWrtShell;
class SwBreakDlg: public SvxStandardDialog
{
SwWrtShell &rSh;
- FixedLine aBreakFL;
- RadioButton aLineBtn;
- RadioButton aColumnBtn;
- RadioButton aPageBtn;
- FixedText aPageCollText;
- ListBox aPageCollBox;
- CheckBox aPageNumBox;
- NumericField aPageNumEdit;
-
- OKButton aOkBtn;
- CancelButton aCancelBtn;
- HelpButton aHelpBtn;
+ RadioButton* m_pLineBtn;
+ RadioButton* m_pColumnBtn;
+ RadioButton* m_pPageBtn;
+ FixedText* m_pPageCollText;
+ ListBox* m_pPageCollBox;
+ CheckBox* m_pPageNumBox;
+ NumericField* m_pPageNumEdit;
String aTemplate;
sal_uInt16 nKind;
diff --git a/sw/source/ui/shells/textsh1.cxx b/sw/source/ui/shells/textsh1.cxx
index 4929427..d82aad7 100644
--- a/sw/source/ui/shells/textsh1.cxx
+++ b/sw/source/ui/shells/textsh1.cxx
@@ -532,7 +532,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
- AbstractSwBreakDlg* pDlg = pFact->CreateSwBreakDlg( GetView().GetWindow(), rWrtSh, DLG_BREAK );
+ AbstractSwBreakDlg* pDlg = pFact->CreateSwBreakDlg(GetView().GetWindow(), rWrtSh);
OSL_ENSURE(pDlg, "Dialogdiet fail!");
if ( pDlg->Execute() == RET_OK )
{
diff --git a/sw/uiconfig/sw/ui/20705.ui b/sw/uiconfig/sw/ui/20705.ui
deleted file mode 100644
index a5b2e2e..0000000
--- a/sw/uiconfig/sw/ui/20705.ui
+++ /dev/null
@@ -1,253 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<interface>
- <!-- interface-requires gtk+ 3.0 -->
- <object class="GtkDialog" id="20705">
- <property name="can_focus">False</property>
- <property name="border_width">5</property>
- <property name="title" translatable="yes">Insert Break</property>
- <property name="type_hint">dialog</property>
- <child internal-child="vbox">
- <object class="GtkBox" id="dialog-vbox1">
- <property name="can_focus">False</property>
- <property name="spacing">2</property>
- <child internal-child="action_area">
- <object class="GtkButtonBox" id="dialog-action_area1">
- <property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <property name="layout_style">start</property>
- <child>
- <object class="GtkButton" id="100">
- <property name="label">gtk-ok</property>
- <property name="use_action_appearance">False</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="101">
- <property name="label">gtk-cancel</property>
- <property name="use_action_appearance">False</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="102">
- <property name="label">gtk-help</property>
- <property name="use_action_appearance">False</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">2</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">end</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkFrame" id="frame1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
- <child>
- <object class="GtkAlignment" id="alignment1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="left_padding">12</property>
- <child>
- <object class="GtkBox" id="box1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <child>
- <object class="GtkRadioButton" id="2">
- <property name="label" translatable="yes">Line break</property>
- <property name="use_action_appearance">False</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
- <property name="xalign">0</property>
- <property name="active">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkRadioButton" id="3">
- <property name="label" translatable="yes">Column break</property>
- <property name="use_action_appearance">False</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
- <property name="xalign">0</property>
- <property name="active">True</property>
- <property name="draw_indicator">True</property>
- <property name="group">2</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkRadioButton" id="1">
- <property name="label" translatable="yes">Page break</property>
- <property name="use_action_appearance">False</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
- <property name="xalign">0</property>
- <property name="active">True</property>
- <property name="draw_indicator">True</property>
- <property name="group">2</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="4">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Style</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">3</property>
- </packing>
- </child>
- <child>
- <object class="GtkComboBox" id="5">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="model">liststore1</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">4</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="7">
- <property name="label" translatable="yes">Change page number</property>
- <property name="use_action_appearance">False</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
- <property name="xalign">0</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">5</property>
- </packing>
- </child>
- <child>
- <object class="GtkBox" id="box2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <object class="GtkSpinButton" id="8">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="invisible_char">â</property>
- <property name="invisible_char_set">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">6</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="6">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Type</property>
- <property name="use_markup">True</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- </child>
- <action-widgets>
- <action-widget response="0">100</action-widget>
- <action-widget response="0">101</action-widget>
- <action-widget response="0">102</action-widget>
- </action-widgets>
- </object>
- <object class="GtkListStore" id="liststore1">
- <columns>
- <!-- column-name gchararray1 -->
- <column type="gchararray"/>
- </columns>
- <data>
- <row>
- <col id="0" translatable="yes">[None]</col>
- </row>
- </data>
- </object>
-</interface>
diff --git a/sw/uiconfig/swriter/ui/insertbreak.ui b/sw/uiconfig/swriter/ui/insertbreak.ui
new file mode 100644
index 0000000..867e86a
--- /dev/null
+++ b/sw/uiconfig/swriter/ui/insertbreak.ui
@@ -0,0 +1,261 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkAdjustment" id="adjustment1">
+ <property name="lower">1</property>
+ <property name="upper">9999</property>
+ <property name="value">1</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkListStore" id="liststore1">
+ <columns>
+ <!-- column-name gchararray1 -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes">[None]</col>
+ </row>
+ </data>
+ </object>
+ <object class="GtkDialog" id="BreakDialog">
+ <property name="can_focus">False</property>
+ <property name="border_width">5</property>
+ <property name="title" translatable="yes">Insert Break</property>
+ <property name="type_hint">dialog</property>
+ <child internal-child="vbox">
+ <object class="GtkBox" id="dialog-vbox1">
+ <property name="can_focus">False</property>
+ <property name="spacing">2</property>
+ <child internal-child="action_area">
+ <object class="GtkButtonBox" id="dialog-action_area1">
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="layout_style">start</property>
+ <child>
+ <object class="GtkButton" id="ok">
+ <property name="label">gtk-ok</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="cancel">
+ <property name="label">gtk-cancel</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="help">
+ <property name="label">gtk-help</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="frame1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkBox" id="box1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkRadioButton" id="linerb">
+ <property name="label" translatable="yes">Line break</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="xalign">0</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="columnrb">
+ <property name="label" translatable="yes">Column break</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="xalign">0</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">linerb</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="pagerb">
+ <property name="label" translatable="yes">Page break</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="xalign">0</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">linerb</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="styleft">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Style</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="stylelb">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="model">liststore1</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">4</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="pagenumcb">
+ <property name="label" translatable="yes">Change page number</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">5</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="box2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkSpinButton" id="pagenumsb">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">â</property>
+ <property name="invisible_char_set">True</property>
+ <property name="adjustment">adjustment1</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">6</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Type</property>
+ <property name="use_markup">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="0">ok</action-widget>
+ <action-widget response="0">cancel</action-widget>
+ <action-widget response="0">help</action-widget>
+ </action-widgets>
+ </object>
+</interface>
More information about the Libreoffice-commits
mailing list