Kaydet (Commit) ad09ced9 authored tarafından Caolán McNamara's avatar Caolán McNamara

Resolves: fdo#55524 convert insert break dialog fully

Change-Id: Id25bde8db310a83b52ebda7d47d0b1dcda79ed45
üst 3621487e
...@@ -87,7 +87,6 @@ $(eval $(call gb_SrsTarget_add_files,sw/res,\ ...@@ -87,7 +87,6 @@ $(eval $(call gb_SrsTarget_add_files,sw/res,\
sw/source/ui/chrdlg/drpcps.src \ sw/source/ui/chrdlg/drpcps.src \
sw/source/ui/chrdlg/numpara.src \ sw/source/ui/chrdlg/numpara.src \
sw/source/ui/chrdlg/paradlg.src \ sw/source/ui/chrdlg/paradlg.src \
sw/source/ui/chrdlg/swbreak.src \
sw/source/ui/config/mailconfigpage.src \ sw/source/ui/config/mailconfigpage.src \
sw/source/ui/config/optcomp.src \ sw/source/ui/config/optcomp.src \
sw/source/ui/config/optdlg.src \ sw/source/ui/config/optdlg.src \
......
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
$(eval $(call gb_UI_UI,sw)) $(eval $(call gb_UI_UI,sw))
$(eval $(call gb_UI_add_uifiles,sw,\ $(eval $(call gb_UI_add_uifiles,sw,\
sw/uiconfig/sw/ui/20705 \
sw/uiconfig/sw/ui/20872 \ sw/uiconfig/sw/ui/20872 \
sw/uiconfig/sw/ui/20876 \ sw/uiconfig/sw/ui/20876 \
)) ))
......
...@@ -14,6 +14,7 @@ $(eval $(call gb_UI_add_uifiles,modules/swriter,\ ...@@ -14,6 +14,7 @@ $(eval $(call gb_UI_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/charurlpage \ sw/uiconfig/swriter/ui/charurlpage \
sw/uiconfig/swriter/ui/columnwidth \ sw/uiconfig/swriter/ui/columnwidth \
sw/uiconfig/swriter/ui/converttexttable \ sw/uiconfig/swriter/ui/converttexttable \
sw/uiconfig/swriter/ui/insertbreak \
sw/uiconfig/swriter/ui/inserttable \ sw/uiconfig/swriter/ui/inserttable \
sw/uiconfig/swriter/ui/linenumbering \ sw/uiconfig/swriter/ui/linenumbering \
sw/uiconfig/swriter/ui/printeroptions \ sw/uiconfig/swriter/ui/printeroptions \
......
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
#define DLG_CHAR (RC_CHRDLG_BEGIN + 1) #define DLG_CHAR (RC_CHRDLG_BEGIN + 1)
#define DLG_PARA (RC_CHRDLG_BEGIN + 2) #define DLG_PARA (RC_CHRDLG_BEGIN + 2)
#define DLG_BREAK (RC_CHRDLG_BEGIN + 5)
#define DLG_DROPCAPS (RC_CHRDLG_BEGIN + 8) #define DLG_DROPCAPS (RC_CHRDLG_BEGIN + 8)
#define DLG_DRAWCHAR (RC_CHRDLG_BEGIN + 9) #define DLG_DRAWCHAR (RC_CHRDLG_BEGIN + 9)
#define DLG_DRAWPARA (RC_CHRDLG_BEGIN + 10) #define DLG_DRAWPARA (RC_CHRDLG_BEGIN + 10)
......
...@@ -362,7 +362,7 @@ public: ...@@ -362,7 +362,7 @@ public:
SvStream* pStream, int nResId ) = 0;// add for SwAsciiFilterDlg SvStream* pStream, int nResId ) = 0;// add for SwAsciiFilterDlg
virtual VclAbstractDialog * CreateSwInsertBookmarkDlg( Window *pParent, SwWrtShell &rSh, SfxRequest& rReq, int nResId ) = 0;// add for SwInsertBookmarkDlg 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 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 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; const String* pFmtStr = 0, sal_Bool bIsDrwTxtDlg = sal_False) = 0;
......
...@@ -41,25 +41,24 @@ ...@@ -41,25 +41,24 @@
#include <pagedesc.hxx> #include <pagedesc.hxx>
#include <poolfmt.hxx> #include <poolfmt.hxx>
#include <break.hrc>
#include <chrdlg.hrc> #include <chrdlg.hrc>
#include <SwStyleNameMapper.hxx> #include <SwStyleNameMapper.hxx>
void SwBreakDlg::Apply() void SwBreakDlg::Apply()
{ {
nKind = 0; nKind = 0;
if(aLineBtn.IsChecked()) if(m_pLineBtn->IsChecked())
nKind = 1; nKind = 1;
else if(aColumnBtn.IsChecked()) else if(m_pColumnBtn->IsChecked())
nKind = 2; nKind = 2;
else if(aPageBtn.IsChecked()) else if(m_pPageBtn->IsChecked())
{ {
nKind = 3; nKind = 3;
const sal_uInt16 nPos = aPageCollBox.GetSelectEntryPos(); const sal_uInt16 nPos = m_pPageCollBox->GetSelectEntryPos();
if(0 != nPos && LISTBOX_ENTRY_NOTFOUND != nPos) if(0 != nPos && LISTBOX_ENTRY_NOTFOUND != nPos)
{ {
aTemplate = aPageCollBox.GetSelectEntry(); aTemplate = m_pPageCollBox->GetSelectEntry();
nPgNum = aPageNumBox.IsChecked() ? (sal_uInt16)aPageNumEdit.GetValue() : 0; nPgNum = m_pPageNumBox->IsChecked() ? (sal_uInt16)m_pPageNumEdit->GetValue() : 0;
} }
} }
} }
...@@ -77,8 +76,8 @@ IMPL_LINK_NOARG_INLINE_END(SwBreakDlg, ClickHdl) ...@@ -77,8 +76,8 @@ IMPL_LINK_NOARG_INLINE_END(SwBreakDlg, ClickHdl)
IMPL_LINK_INLINE_START( SwBreakDlg, PageNumHdl, CheckBox *, pBox ) IMPL_LINK_INLINE_START( SwBreakDlg, PageNumHdl, CheckBox *, pBox )
{ {
if(pBox->IsChecked()) aPageNumEdit.SetValue(1); if(pBox->IsChecked()) m_pPageNumEdit->SetValue(1);
else aPageNumEdit.SetText(aEmptyStr); else m_pPageNumEdit->SetText(OUString());
return 0; return 0;
} }
IMPL_LINK_INLINE_END( SwBreakDlg, PageNumHdl, CheckBox *, pBox ) IMPL_LINK_INLINE_END( SwBreakDlg, PageNumHdl, CheckBox *, pBox )
...@@ -89,7 +88,7 @@ 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) IMPL_LINK_NOARG_INLINE_START(SwBreakDlg, PageNumModifyHdl)
{ {
aPageNumBox.Check(); m_pPageNumBox->Check();
return 0; return 0;
} }
IMPL_LINK_NOARG_INLINE_END(SwBreakDlg, PageNumModifyHdl) IMPL_LINK_NOARG_INLINE_END(SwBreakDlg, PageNumModifyHdl)
...@@ -103,19 +102,19 @@ IMPL_LINK_NOARG_INLINE_END(SwBreakDlg, PageNumModifyHdl) ...@@ -103,19 +102,19 @@ IMPL_LINK_NOARG_INLINE_END(SwBreakDlg, PageNumModifyHdl)
IMPL_LINK_NOARG(SwBreakDlg, OkHdl) IMPL_LINK_NOARG(SwBreakDlg, OkHdl)
{ {
if(aPageNumBox.IsChecked()) { if(m_pPageNumBox->IsChecked()) {
// In case of differing page descriptions, test validity // 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'. // position 0 says 'Without'.
const SwPageDesc *pPageDesc; const SwPageDesc *pPageDesc;
if ( 0 != nPos && LISTBOX_ENTRY_NOTFOUND != nPos ) if ( 0 != nPos && LISTBOX_ENTRY_NOTFOUND != nPos )
pPageDesc = rSh.FindPageDescByName( aPageCollBox.GetSelectEntry(), pPageDesc = rSh.FindPageDescByName( m_pPageCollBox->GetSelectEntry(),
sal_True ); sal_True );
else else
pPageDesc = &rSh.GetPageDesc(rSh.GetCurPageDesc()); pPageDesc = &rSh.GetPageDesc(rSh.GetCurPageDesc());
OSL_ENSURE(pPageDesc, "Page description not found."); 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; sal_Bool bOk = sal_True;
switch(pPageDesc->GetUseOn()) switch(pPageDesc->GetUseOn())
{ {
...@@ -127,7 +126,7 @@ IMPL_LINK_NOARG(SwBreakDlg, OkHdl) ...@@ -127,7 +126,7 @@ IMPL_LINK_NOARG(SwBreakDlg, OkHdl)
} }
if(!bOk) { if(!bOk) {
InfoBox(this, SW_RES(MSG_ILLEGAL_PAGENUM)).Execute(); InfoBox(this, SW_RES(MSG_ILLEGAL_PAGENUM)).Execute();
aPageNumEdit.GrabFocus(); m_pPageNumEdit->GrabFocus();
return 0; return 0;
} }
} }
...@@ -135,41 +134,33 @@ IMPL_LINK_NOARG(SwBreakDlg, OkHdl) ...@@ -135,41 +134,33 @@ IMPL_LINK_NOARG(SwBreakDlg, OkHdl)
return 0; return 0;
} }
SwBreakDlg::SwBreakDlg( Window *pParent, SwWrtShell &rS ) : SwBreakDlg::SwBreakDlg( Window *pParent, SwWrtShell &rS )
: SvxStandardDialog(pParent, "BreakDialog", "modules/swriter/ui/insertbreak.ui")
SvxStandardDialog( pParent,SW_RES(DLG_BREAK) ), , rSh(rS)
, nKind(0)
rSh(rS), , nPgNum(0)
aBreakFL(this,SW_RES(FL_BREAK)), , bHtmlMode(0 != ::GetHtmlMode(rS.GetView().GetDocShell()))
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()))
{ {
aPageNumEdit.SetAccessibleRelationLabeledBy(&aPageNumBox); get(m_pLineBtn, "linerb");
aPageNumEdit.SetAccessibleName(aPageNumBox.GetText()); 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); Link aLk = LINK(this,SwBreakDlg,ClickHdl);
aPageBtn.SetClickHdl( aLk ); m_pPageBtn->SetClickHdl( aLk );
aLineBtn.SetClickHdl( aLk ); m_pLineBtn->SetClickHdl( aLk );
aColumnBtn.SetClickHdl( aLk ); m_pColumnBtn->SetClickHdl( aLk );
aPageCollBox.SetSelectHdl( aLk ); m_pPageCollBox->SetSelectHdl( aLk );
aOkBtn.SetClickHdl(LINK(this,SwBreakDlg,OkHdl)); get<OKButton>("ok")->SetClickHdl(LINK(this,SwBreakDlg,OkHdl));;
aPageNumBox.SetClickHdl(LINK(this,SwBreakDlg,PageNumHdl)); m_pPageNumBox->SetClickHdl(LINK(this,SwBreakDlg,PageNumHdl));
aPageNumEdit.SetModifyHdl(LINK(this,SwBreakDlg,PageNumModifyHdl)); m_pPageNumEdit->SetModifyHdl(LINK(this,SwBreakDlg,PageNumModifyHdl));
// Insert page description to Listbox // Insert page description to Listbox
...@@ -179,21 +170,20 @@ SwBreakDlg::SwBreakDlg( Window *pParent, SwWrtShell &rS ) : ...@@ -179,21 +170,20 @@ SwBreakDlg::SwBreakDlg( Window *pParent, SwWrtShell &rS ) :
for( i = 0; i < nCount; ++i) for( i = 0; i < nCount; ++i)
{ {
const SwPageDesc &rPageDesc = rSh.GetPageDesc(i); const SwPageDesc &rPageDesc = rSh.GetPageDesc(i);
::InsertStringSorted(rPageDesc.GetName(), aPageCollBox, 1 ); ::InsertStringSorted(rPageDesc.GetName(), *m_pPageCollBox, 1 );
} }
String aFmtName; String aFmtName;
for(i = RES_POOLPAGE_BEGIN; i < RES_POOLPAGE_END; ++i) 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 ))) SwStyleNameMapper::GetUIName( i, aFmtName )))
::InsertStringSorted(aFmtName, aPageCollBox, 1 ); ::InsertStringSorted(aFmtName, *m_pPageCollBox, 1 );
//add landscape page //add landscape page
if(LISTBOX_ENTRY_NOTFOUND == aPageCollBox.GetEntryPos( aFmtName = if(LISTBOX_ENTRY_NOTFOUND == m_pPageCollBox->GetEntryPos( aFmtName =
SwStyleNameMapper::GetUIName( RES_POOLPAGE_LANDSCAPE, aFmtName ))) SwStyleNameMapper::GetUIName( RES_POOLPAGE_LANDSCAPE, aFmtName )))
::InsertStringSorted(aFmtName, aPageCollBox, 1 ); ::InsertStringSorted(aFmtName, *m_pPageCollBox, 1 );
CheckEnable(); CheckEnable();
aPageNumEdit.SetText( aEmptyStr ); m_pPageNumEdit->SetText(OUString());
FreeResource();
} }
void SwBreakDlg::CheckEnable() void SwBreakDlg::CheckEnable()
...@@ -201,32 +191,32 @@ void SwBreakDlg::CheckEnable() ...@@ -201,32 +191,32 @@ void SwBreakDlg::CheckEnable()
sal_Bool bEnable = sal_True; sal_Bool bEnable = sal_True;
if ( bHtmlMode ) if ( bHtmlMode )
{ {
aColumnBtn .Enable(sal_False); m_pColumnBtn->Enable(sal_False);
aPageCollBox.Enable(sal_False); m_pPageCollBox->Enable(sal_False);
bEnable = sal_False; bEnable = sal_False;
} }
else if(rSh.GetFrmType(0,sal_True) else if(rSh.GetFrmType(0,sal_True)
& (FRMTYPE_FLY_ANY | FRMTYPE_HEADER | FRMTYPE_FOOTER | FRMTYPE_FOOTNOTE)) & (FRMTYPE_FLY_ANY | FRMTYPE_HEADER | FRMTYPE_FOOTER | FRMTYPE_FOOTNOTE))
{ {
aPageBtn.Enable(sal_False); m_pPageBtn->Enable(sal_False);
if(aPageBtn.IsChecked()) if(m_pPageBtn->IsChecked())
aLineBtn.Check(sal_True); m_pLineBtn->Check(sal_True);
bEnable = sal_False; bEnable = sal_False;
} }
const sal_Bool bPage = aPageBtn.IsChecked(); const sal_Bool bPage = m_pPageBtn->IsChecked();
aPageCollText.Enable( bPage ); m_pPageCollText->Enable( bPage );
aPageCollBox.Enable ( bPage ); m_pPageCollBox->Enable ( bPage );
bEnable &= bPage; bEnable &= bPage;
if ( bEnable ) if ( bEnable )
{ {
// position 0 says 'Without' page template. // 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 ) if ( 0 == nPos || LISTBOX_ENTRY_NOTFOUND == nPos )
bEnable = sal_False; bEnable = sal_False;
} }
aPageNumBox .Enable(bEnable); m_pPageNumBox->Enable(bEnable);
aPageNumEdit.Enable(bEnable); m_pPageNumEdit->Enable(bEnable);
} }
SwBreakDlg::~SwBreakDlg() SwBreakDlg::~SwBreakDlg()
......
/*
* 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
/*************************************************************************
*
* 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 ;
};
};
...@@ -713,24 +713,11 @@ VclAbstractDialog* SwAbstractDialogFactory_Impl::CreateSwInsertBookmarkDlg( Wind ...@@ -713,24 +713,11 @@ VclAbstractDialog* SwAbstractDialogFactory_Impl::CreateSwInsertBookmarkDlg( Wind
return 0; return 0;
} }
AbstractSwBreakDlg * SwAbstractDialogFactory_Impl::CreateSwBreakDlg ( Window *pParent, AbstractSwBreakDlg * SwAbstractDialogFactory_Impl::CreateSwBreakDlg(Window *pParent,
SwWrtShell &rSh, SwWrtShell &rSh)
int nResId )
{ {
SwBreakDlg* pDlg=NULL; SwBreakDlg* pDlg = new SwBreakDlg(pParent, rSh);
switch ( nResId ) return new AbstractSwBreakDlg_Impl(pDlg);
{
case DLG_BREAK :
pDlg = new SwBreakDlg( pParent, rSh );
break;
default:
break;
}
if ( pDlg )
return new AbstractSwBreakDlg_Impl( pDlg );
return 0;
} }
VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateSwChangeDBDlg( SwView& rVw, int nResId ) VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateSwChangeDBDlg( SwView& rVw, int nResId )
......
...@@ -445,7 +445,7 @@ public: ...@@ -445,7 +445,7 @@ public:
virtual AbstractSwAsciiFilterDlg* CreateSwAsciiFilterDlg ( Window* pParent, SwDocShell& rDocSh, virtual AbstractSwAsciiFilterDlg* CreateSwAsciiFilterDlg ( Window* pParent, SwDocShell& rDocSh,
SvStream* pStream, int nResId ); //add for SwAsciiFilterDlg SvStream* pStream, int nResId ); //add for SwAsciiFilterDlg
virtual VclAbstractDialog * CreateSwInsertBookmarkDlg( Window *pParent, SwWrtShell &rSh, SfxRequest& rReq, int nResId );//add for SwInsertBookmarkDlg 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 VclAbstractDialog * CreateSwChangeDBDlg( SwView& rVw, int nResId ); //add for SwChangeDBDlg
virtual SfxAbstractTabDialog * CreateSwCharDlg( Window* pParent, SwView& pVw, const SfxItemSet& rCoreSet, int nResId, // add for SwCharDlg virtual SfxAbstractTabDialog * CreateSwCharDlg( Window* pParent, SwView& pVw, const SfxItemSet& rCoreSet, int nResId, // add for SwCharDlg
const String* pFmtStr = 0, sal_Bool bIsDrwTxtDlg = sal_False); const String* pFmtStr = 0, sal_Bool bIsDrwTxtDlg = sal_False);
......
...@@ -43,18 +43,13 @@ class SwWrtShell; ...@@ -43,18 +43,13 @@ class SwWrtShell;
class SwBreakDlg: public SvxStandardDialog class SwBreakDlg: public SvxStandardDialog
{ {
SwWrtShell &rSh; SwWrtShell &rSh;
FixedLine aBreakFL; RadioButton* m_pLineBtn;
RadioButton aLineBtn; RadioButton* m_pColumnBtn;
RadioButton aColumnBtn; RadioButton* m_pPageBtn;
RadioButton aPageBtn; FixedText* m_pPageCollText;
FixedText aPageCollText; ListBox* m_pPageCollBox;
ListBox aPageCollBox; CheckBox* m_pPageNumBox;
CheckBox aPageNumBox; NumericField* m_pPageNumEdit;
NumericField aPageNumEdit;
OKButton aOkBtn;
CancelButton aCancelBtn;
HelpButton aHelpBtn;
String aTemplate; String aTemplate;
sal_uInt16 nKind; sal_uInt16 nKind;
......
...@@ -532,7 +532,7 @@ void SwTextShell::Execute(SfxRequest &rReq) ...@@ -532,7 +532,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); 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!"); OSL_ENSURE(pDlg, "Dialogdiet fail!");
if ( pDlg->Execute() == RET_OK ) if ( pDlg->Execute() == RET_OK )
{ {
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<interface> <interface>
<!-- interface-requires gtk+ 3.0 --> <!-- interface-requires gtk+ 3.0 -->
<object class="GtkDialog" id="20705"> <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="can_focus">False</property>
<property name="border_width">5</property> <property name="border_width">5</property>
<property name="title" translatable="yes">Insert Break</property> <property name="title" translatable="yes">Insert Break</property>
...@@ -16,7 +34,7 @@ ...@@ -16,7 +34,7 @@
<property name="orientation">vertical</property> <property name="orientation">vertical</property>
<property name="layout_style">start</property> <property name="layout_style">start</property>
<child> <child>
<object class="GtkButton" id="100"> <object class="GtkButton" id="ok">
<property name="label">gtk-ok</property> <property name="label">gtk-ok</property>
<property name="use_action_appearance">False</property> <property name="use_action_appearance">False</property>
<property name="visible">True</property> <property name="visible">True</property>
...@@ -32,7 +50,7 @@ ...@@ -32,7 +50,7 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkButton" id="101"> <object class="GtkButton" id="cancel">
<property name="label">gtk-cancel</property> <property name="label">gtk-cancel</property>
<property name="use_action_appearance">False</property> <property name="use_action_appearance">False</property>
<property name="visible">True</property> <property name="visible">True</property>
...@@ -48,7 +66,7 @@ ...@@ -48,7 +66,7 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkButton" id="102"> <object class="GtkButton" id="help">
<property name="label">gtk-help</property> <property name="label">gtk-help</property>
<property name="use_action_appearance">False</property> <property name="use_action_appearance">False</property>
<property name="visible">True</property> <property name="visible">True</property>
...@@ -88,7 +106,7 @@ ...@@ -88,7 +106,7 @@
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="orientation">vertical</property> <property name="orientation">vertical</property>
<child> <child>
<object class="GtkRadioButton" id="2"> <object class="GtkRadioButton" id="linerb">
<property name="label" translatable="yes">Line break</property> <property name="label" translatable="yes">Line break</property>
<property name="use_action_appearance">False</property> <property name="use_action_appearance">False</property>
<property name="visible">True</property> <property name="visible">True</property>
...@@ -106,7 +124,7 @@ ...@@ -106,7 +124,7 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkRadioButton" id="3"> <object class="GtkRadioButton" id="columnrb">
<property name="label" translatable="yes">Column break</property> <property name="label" translatable="yes">Column break</property>
<property name="use_action_appearance">False</property> <property name="use_action_appearance">False</property>
<property name="visible">True</property> <property name="visible">True</property>
...@@ -116,7 +134,7 @@ ...@@ -116,7 +134,7 @@
<property name="xalign">0</property> <property name="xalign">0</property>
<property name="active">True</property> <property name="active">True</property>
<property name="draw_indicator">True</property> <property name="draw_indicator">True</property>
<property name="group">2</property> <property name="group">linerb</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
...@@ -125,7 +143,7 @@ ...@@ -125,7 +143,7 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkRadioButton" id="1"> <object class="GtkRadioButton" id="pagerb">
<property name="label" translatable="yes">Page break</property> <property name="label" translatable="yes">Page break</property>
<property name="use_action_appearance">False</property> <property name="use_action_appearance">False</property>
<property name="visible">True</property> <property name="visible">True</property>
...@@ -135,7 +153,7 @@ ...@@ -135,7 +153,7 @@
<property name="xalign">0</property> <property name="xalign">0</property>
<property name="active">True</property> <property name="active">True</property>
<property name="draw_indicator">True</property> <property name="draw_indicator">True</property>
<property name="group">2</property> <property name="group">linerb</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
...@@ -144,7 +162,7 @@ ...@@ -144,7 +162,7 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkLabel" id="4"> <object class="GtkLabel" id="styleft">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="xalign">0</property> <property name="xalign">0</property>
...@@ -157,7 +175,7 @@ ...@@ -157,7 +175,7 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkComboBox" id="5"> <object class="GtkComboBox" id="stylelb">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="model">liststore1</property> <property name="model">liststore1</property>
...@@ -169,7 +187,7 @@ ...@@ -169,7 +187,7 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkCheckButton" id="7"> <object class="GtkCheckButton" id="pagenumcb">
<property name="label" translatable="yes">Change page number</property> <property name="label" translatable="yes">Change page number</property>
<property name="use_action_appearance">False</property> <property name="use_action_appearance">False</property>
<property name="visible">True</property> <property name="visible">True</property>
...@@ -190,11 +208,12 @@ ...@@ -190,11 +208,12 @@
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<child> <child>
<object class="GtkSpinButton" id="8"> <object class="GtkSpinButton" id="pagenumsb">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="invisible_char"></property> <property name="invisible_char"></property>
<property name="invisible_char_set">True</property> <property name="invisible_char_set">True</property>
<property name="adjustment">adjustment1</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
...@@ -217,7 +236,7 @@ ...@@ -217,7 +236,7 @@
</object> </object>
</child> </child>
<child type="label"> <child type="label">
<object class="GtkLabel" id="6"> <object class="GtkLabel" id="label1">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="label" translatable="yes">Type</property> <property name="label" translatable="yes">Type</property>
...@@ -234,20 +253,9 @@ ...@@ -234,20 +253,9 @@
</object> </object>
</child> </child>
<action-widgets> <action-widgets>
<action-widget response="0">100</action-widget> <action-widget response="0">ok</action-widget>
<action-widget response="0">101</action-widget> <action-widget response="0">cancel</action-widget>
<action-widget response="0">102</action-widget> <action-widget response="0">help</action-widget>
</action-widgets> </action-widgets>
</object> </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> </interface>
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