View | Details | Raw Unified | Return to issue 7065
Collapse All | Expand All

(-)openoffice.org.orig/sw/inc/cmdid.h (+2 lines)
Lines 539-544 Link Here
539
539
540
#define FN_SET_PAGE_STYLE			(FN_FORMAT + 93)  /* Anwenden Seitenv. */
540
#define FN_SET_PAGE_STYLE			(FN_FORMAT + 93)  /* Anwenden Seitenv. */
541
541
542
#define FN_FORMAT_TITLEPAGE_DLG		(FN_FORMAT + 98)  /* Title Page */
543
542
544
543
#define FN_TABLE_REP                (FN_FORMAT + 99)  /* TableRepresentation */
545
#define FN_TABLE_REP                (FN_FORMAT + 99)  /* TableRepresentation */
544
#define FN_CONVERT_TEXT_TABLE		(FN_FORMAT + 100)  /* Konvertierung Text <-> Tabelle */
546
#define FN_CONVERT_TEXT_TABLE		(FN_FORMAT + 100)  /* Konvertierung Text <-> Tabelle */
(-)openoffice.org.orig/sw/inc/globals.hrc (-1 / +4 lines)
Lines 282-288 Link Here
282
#define TP_SECTION_INDENTS          (RC_GLOBALS_BEGIN +  102)
282
#define TP_SECTION_INDENTS          (RC_GLOBALS_BEGIN +  102)
283
#define TP_OPTCOMPATIBILITY_PAGE	(RC_GLOBALS_BEGIN +  103)
283
#define TP_OPTCOMPATIBILITY_PAGE	(RC_GLOBALS_BEGIN +  103)
284
#define TP_MAILCONFIG               (RC_GLOBALS_BEGIN +  104)
284
#define TP_MAILCONFIG               (RC_GLOBALS_BEGIN +  104)
285
//maximum: RC_GLOBALS_BEGIN +  119
285
#define TP_TITLEPAGE                (RC_GLOBALS_BEGIN +  105)
286
//maximum: RC_GLOBALS_BEGIN +  120
287
286
288
287
#if STR_DOC_STAT > RC_GLOBALS_END
289
#if STR_DOC_STAT > RC_GLOBALS_END
288
#error Resource-Id Ueberlauf in #file, #line
290
#error Resource-Id Ueberlauf in #file, #line
Lines 294-297 Link Here
294
#define SID_WRT_SHELL               (RC_GLOBALS_BEGIN +  117)
296
#define SID_WRT_SHELL               (RC_GLOBALS_BEGIN +  117)
295
297
296
#define DLG_LINE_NUMBERING          (RC_GLOBALS_BEGIN +  118)
298
#define DLG_LINE_NUMBERING          (RC_GLOBALS_BEGIN +  118)
299
#define DLG_TITLEPAGE               (RC_GLOBALS_BEGIN +  119)
297
#endif // _GLOBALS_HRC
300
#endif // _GLOBALS_HRC
(-)openoffice.org.orig/sw/inc/helpid.h (+1 lines)
Lines 986-988 Link Here
986
#define HID_MM_HEADER_12                            (HID_BASE + 2279)
986
#define HID_MM_HEADER_12                            (HID_BASE + 2279)
987
#define HID_MM_HEADER_13                            (HID_BASE + 2280)
987
#define HID_MM_HEADER_13                            (HID_BASE + 2280)
988
988
989
#define HID_TITLEPAGE 						  		(HID_BASE + 2281)
(-)openoffice.org.orig/sw/inc/rcid.hrc (-1 / +1 lines)
Lines 135-141 Link Here
135
135
136
// globale Ressourcen
136
// globale Ressourcen
137
#define RC_GLOBALS_BEGIN        	RC_GLOBALS
137
#define RC_GLOBALS_BEGIN        	RC_GLOBALS
138
#define RC_GLOBALS_END          	(RC_GLOBALS_BEGIN + 119)
138
#define RC_GLOBALS_END          	(RC_GLOBALS_BEGIN + 120)
139
139
140
// Format-Vorlagen
140
// Format-Vorlagen
141
#define RC_FMTUI_BEGIN          	RC_FMTUI
141
#define RC_FMTUI_BEGIN          	RC_FMTUI
(-)openoffice.org.orig/sw/inc/swabstdlg.hxx (+1 lines)
Lines 477-482 Link Here
477
												SwField* pField, BOOL bNextButton = FALSE ) = 0; //add for SwFldInputDlg
477
												SwField* pField, BOOL bNextButton = FALSE ) = 0; //add for SwFldInputDlg
478
	virtual AbstractInsFootNoteDlg*		CreateInsFootNoteDlg( int nResId,
478
	virtual AbstractInsFootNoteDlg*		CreateInsFootNoteDlg( int nResId,
479
												Window * pParent, SwWrtShell &rSh, BOOL bEd = FALSE) = 0; //add for SwInsFootNoteDlg
479
												Window * pParent, SwWrtShell &rSh, BOOL bEd = FALSE) = 0; //add for SwInsFootNoteDlg
480
    virtual VclAbstractDialog*          CreateTitlePageDlg ( Window * pParent ) = 0;
480
	virtual VclAbstractDialog *			CreateVclSwViewDialog( int nResId,
481
	virtual VclAbstractDialog *			CreateVclSwViewDialog( int nResId,
481
												SwView& rView, BOOL bCol = FALSE ) = 0; //add for SwInsRowColDlg, SwLineNumberingDlg
482
												SwView& rView, BOOL bCol = FALSE ) = 0; //add for SwInsRowColDlg, SwLineNumberingDlg
482
	virtual AbstractInsertGrfRulerDlg*		CreateInsertGrfRulerDlg( int nResId,
483
	virtual AbstractInsertGrfRulerDlg*		CreateInsertGrfRulerDlg( int nResId,
(-)openoffice.org.orig/sw/sdi/_basesh.sdi (+6 lines)
Lines 250-255 Link Here
250
		DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
250
		DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
251
	]
251
	]
252
252
253
	FN_FORMAT_TITLEPAGE_DLG  // status(final|play)
254
	[
255
		ExecMethod = ExecDlg ;
256
		DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
257
	]
258
253
	FN_FORMAT_PAGE_COLUMN_DLG  // status(final|play)
259
	FN_FORMAT_PAGE_COLUMN_DLG  // status(final|play)
254
	[
260
	[
255
		ExecMethod = ExecDlg ;
261
		ExecMethod = ExecDlg ;
(-)openoffice.org.orig/sw/sdi/swriter.sdi (+25 lines)
Lines 6330-6335 Link Here
6330
]
6330
]
6331
6331
6332
//--------------------------------------------------------------------------
6332
//--------------------------------------------------------------------------
6333
SfxVoidItem TitlePageDialog FN_FORMAT_TITLEPAGE_DLG
6334
()
6335
[
6336
	/* flags: */
6337
	AutoUpdate = FALSE,
6338
	Cachable = Cachable,
6339
	FastCall = FALSE,
6340
	HasCoreId = FALSE,
6341
	HasDialog = TRUE,
6342
	ReadOnlyDoc = FALSE,
6343
	Toggle = FALSE,
6344
	Container = FALSE,
6345
	RecordAbsolute = FALSE,
6346
	RecordPerItem;
6347
	Asynchron;
6348
6349
	/* config: */
6350
	AccelConfig = TRUE,
6351
	MenuConfig = TRUE,
6352
	StatusBarConfig = FALSE,
6353
	ToolBoxConfig = TRUE,
6354
	GroupId = GID_FORMAT;
6355
]
6356
6357
//--------------------------------------------------------------------------
6333
SfxVoidItem PageDown FN_PAGEDOWN
6358
SfxVoidItem PageDown FN_PAGEDOWN
6334
()
6359
()
6335
[
6360
[
(-)openoffice.org.orig/sw/sdi/swslots.src (+4 lines)
Lines 307-312 Link Here
307
{
307
{
308
	Slotname [ en-US ] = "Page Settings";
308
	Slotname [ en-US ] = "Page Settings";
309
};
309
};
310
SfxSlotInfo FN_FORMAT_PAGE_DLG
311
{
312
	Slotname [ de ] = "~Title Page...";
313
};
310
SfxSlotInfo FN_FORMAT_RESET
314
SfxSlotInfo FN_FORMAT_RESET
311
{
315
{
312
	Slotname [ en-US ] = "Reset Font Attributes";
316
	Slotname [ en-US ] = "Reset Font Attributes";
(-)openoffice.org.orig/sw/source/ui/dialog/swdlgfact.cxx (+9 lines)
Lines 109-114 Link Here
109
#include <instable.hxx> //add for SwInsTableDlg
109
#include <instable.hxx> //add for SwInsTableDlg
110
#include <javaedit.hxx> //add for SwJavaEditDialog
110
#include <javaedit.hxx> //add for SwJavaEditDialog
111
#include <linenum.hxx> //add for SwLineNumberingDlg
111
#include <linenum.hxx> //add for SwLineNumberingDlg
112
#include <titlepage.hxx> //add for SwTitlePageDlg
112
#include <mailmrge.hxx> //add for SwMailMergeDlg, SwMailMergeCreateFromDlg, SwMailMergeFieldConnectionsDlg
113
#include <mailmrge.hxx> //add for SwMailMergeDlg, SwMailMergeCreateFromDlg, SwMailMergeFieldConnectionsDlg
113
#include <mergetbl.hxx> //add for SwMergeTblDlg
114
#include <mergetbl.hxx> //add for SwMergeTblDlg
114
#include <multmrk.hxx> //add for SwMultiTOXMarkDlg
115
#include <multmrk.hxx> //add for SwMultiTOXMarkDlg
Lines 1405-1410 Link Here
1405
	return 0;
1406
	return 0;
1406
}
1407
}
1407
1408
1409
VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateTitlePageDlg ( Window *pParent )
1410
{
1411
    Dialog* pDlg = new SwTitlePageDlg( pParent );
1412
    if ( pDlg )
1413
        return new VclAbstractDialog_Impl( pDlg );
1414
    return 0;
1415
}
1416
1408
VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateVclSwViewDialog( int nResId, 
1417
VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateVclSwViewDialog( int nResId, 
1409
											SwView& rView, BOOL bCol ) //add for SwInsRowColDlg, SwLineNumberingDlg
1418
											SwView& rView, BOOL bCol ) //add for SwInsRowColDlg, SwLineNumberingDlg
1410
{
1419
{
(-)openoffice.org.orig/sw/source/ui/dialog/swdlgfact.hxx (+1 lines)
Lines 532-537 Link Here
532
												SwField* pField, BOOL bNextButton = FALSE ); //add for SwFldInputDlg
532
												SwField* pField, BOOL bNextButton = FALSE ); //add for SwFldInputDlg
533
	virtual AbstractInsFootNoteDlg*		CreateInsFootNoteDlg( int nResId,
533
	virtual AbstractInsFootNoteDlg*		CreateInsFootNoteDlg( int nResId,
534
												Window * pParent, SwWrtShell &rSh, BOOL bEd = FALSE); //add for SwInsFootNoteDlg
534
												Window * pParent, SwWrtShell &rSh, BOOL bEd = FALSE); //add for SwInsFootNoteDlg
535
   virtual VclAbstractDialog *         CreateTitlePageDlg ( Window * pParent );
535
	virtual VclAbstractDialog *			CreateVclSwViewDialog( int nResId, 
536
	virtual VclAbstractDialog *			CreateVclSwViewDialog( int nResId, 
536
												SwView& rView, BOOL bCol = FALSE ); //add for SwInsRowColDlg, SwLineNumberingDlg
537
												SwView& rView, BOOL bCol = FALSE ); //add for SwInsRowColDlg, SwLineNumberingDlg
537
	virtual AbstractInsertGrfRulerDlg*		CreateInsertGrfRulerDlg( int nResId,
538
	virtual AbstractInsertGrfRulerDlg*		CreateInsertGrfRulerDlg( int nResId,
(-)openoffice.org.orig/sw/source/ui/inc/swmn_tmpl.hrc (-2 / +7 lines)
Lines 67-74 Link Here
67
        Identifier = FN_FORMAT_PAGE_DLG ; \
67
        Identifier = FN_FORMAT_PAGE_DLG ; \
68
        HelpID = FN_FORMAT_PAGE_DLG ; \
68
        HelpID = FN_FORMAT_PAGE_DLG ; \
69
        Text [ en-US ] = "Pa~ge..." ; \
69
        Text [ en-US ] = "Pa~ge..." ; \
70
	};
70
    };\
71
71
    MenuItem\
72
    {\
73
        Identifier = FN_FORMAT_TITLEPAGE_DLG ; \
74
        HelpID = FN_FORMAT_TITLEPAGE_DLG ; \
75
        Text [ en-US ] = "~Title Page..." ; \
76
    };
72
77
73
#define MN_TEXT_ATTR\
78
#define MN_TEXT_ATTR\
74
    MenuItem\
79
    MenuItem\
(-)openoffice.org.orig/sw/source/ui/misc/makefile.mk (-1 / +3 lines)
Lines 56-62 Link Here
56
	pgfnote.src \
56
	pgfnote.src \
57
    pggrid.src \
57
    pggrid.src \
58
    redlndlg.src \
58
    redlndlg.src \
59
    srtdlg.src
59
    srtdlg.src \
60
    titlepage.src
60
61
61
EXCEPTIONSFILES = \
62
EXCEPTIONSFILES = \
62
		$(SLO)$/glossary.obj \
63
		$(SLO)$/glossary.obj \
Lines 76-81 Link Here
76
		$(SLO)$/insfnote.obj \
77
		$(SLO)$/insfnote.obj \
77
		$(SLO)$/insrule.obj \
78
		$(SLO)$/insrule.obj \
78
		$(SLO)$/linenum.obj \
79
		$(SLO)$/linenum.obj \
80
		$(SLO)$/titlepage.obj \
79
		$(SLO)$/num.obj \
81
		$(SLO)$/num.obj \
80
		$(SLO)$/numberingtypelistbox.obj \
82
		$(SLO)$/numberingtypelistbox.obj \
81
		$(SLO)$/outline.obj \
83
		$(SLO)$/outline.obj \
(-)openoffice.org.orig/sw/source/ui/shells/basesh.cxx (+8 lines)
Lines 2546-2551 Link Here
2546
2546
2547
	switch ( nSlot )
2547
	switch ( nSlot )
2548
	{
2548
	{
2549
		case FN_FORMAT_TITLEPAGE_DLG:
2550
		{
2551
			SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
2552
			VclAbstractDialog* pDlg = pFact->CreateTitlePageDlg( pMDI );
2553
			pDlg->Execute();
2554
			delete pDlg;
2555
		}
2556
		break;
2549
		case FN_FORMAT_PAGE_COLUMN_DLG:
2557
		case FN_FORMAT_PAGE_COLUMN_DLG:
2550
		case FN_FORMAT_PAGE_DLG:
2558
		case FN_FORMAT_PAGE_DLG:
2551
		{
2559
		{
(-)openoffice.org.orig/sw/uiconfig/swriter/menubar/menubar.xml (+1 lines)
Lines 210-215 Link Here
210
            <menu:menuitem menu:id=".uno:ParagraphDialog"/>
210
            <menu:menuitem menu:id=".uno:ParagraphDialog"/>
211
            <menu:menuitem menu:id=".uno:BulletsAndNumberingDialog"/>
211
            <menu:menuitem menu:id=".uno:BulletsAndNumberingDialog"/>
212
            <menu:menuitem menu:id=".uno:PageDialog"/>
212
            <menu:menuitem menu:id=".uno:PageDialog"/>
213
            <menu:menuitem menu:id=".uno:TitlePageDialog"/>
213
            <menu:menuseparator/>
214
            <menu:menuseparator/>
214
            <menu:menu menu:id=".uno:TransliterateMenu">
215
            <menu:menu menu:id=".uno:TransliterateMenu">
215
                <menu:menupopup>
216
                <menu:menupopup>
(-)openoffice.org.orig/sw/util/makefile.mk (+1 lines)
Lines 263-268 Link Here
263
    $(SLO)$/instable.obj \
263
    $(SLO)$/instable.obj \
264
    $(SLO)$/insrule.obj \
264
    $(SLO)$/insrule.obj \
265
    $(SLO)$/javaedit.obj \
265
    $(SLO)$/javaedit.obj \
266
    $(SLO)$/titlepage.obj \
266
    $(SLO)$/linenum.obj \
267
    $(SLO)$/linenum.obj \
267
    $(SLO)$/mailmrge.obj \
268
    $(SLO)$/mailmrge.obj \
268
    $(SLO)$/multmrk.obj \
269
    $(SLO)$/multmrk.obj \
(-)openoffice.org.orig/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu (+5 lines)
Lines 802-807 Link Here
802
                    <value xml:lang="en-US">~Page...</value>
802
                    <value xml:lang="en-US">~Page...</value>
803
                </prop>
803
                </prop>
804
            </node>
804
            </node>
805
			<node oor:name=".uno:TitlePageDialog" oor:op="replace">
806
				<prop oor:name="Label" oor:type="xs:string">
807
					<value xml:lang="en-US">Title Page...</value>
808
				</prop>
809
			</node>
805
			<node oor:name=".uno:FormatColumns" oor:op="replace">
810
			<node oor:name=".uno:FormatColumns" oor:op="replace">
806
				<prop oor:name="Label" oor:type="xs:string">
811
				<prop oor:name="Label" oor:type="xs:string">
807
                    <value xml:lang="en-US">Co~lumns...</value>
812
                    <value xml:lang="en-US">Co~lumns...</value>
(-) (+129 lines)
Added Link Here
1
/*************************************************************************
2
 *
3
 *  OpenOffice.org - a multi-platform office productivity suite
4
 *
5
 *  $RCSfile$
6
 *
7
 *  $Revision$
8
 *
9
 *  last change: $Author$ $Date$
10
 *
11
 *  The Contents of this file are made available subject to
12
 *  the terms of GNU Lesser General Public License Version 2.1.
13
 *
14
 *
15
 *    GNU Lesser General Public License Version 2.1
16
 *    =============================================
17
 *    Copyright 2005 by Sun Microsystems, Inc.
18
 *    901 San Antonio Road, Palo Alto, CA 94303, USA
19
 *
20
 *    This library is free software; you can redistribute it and/or
21
 *    modify it under the terms of the GNU Lesser General Public
22
 *    License version 2.1, as published by the Free Software Foundation.
23
 *
24
 *    This library is distributed in the hope that it will be useful,
25
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
26
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
27
 *    Lesser General Public License for more details.
28
 *
29
 *    You should have received a copy of the GNU Lesser General Public
30
 *    License along with this library; if not, write to the Free Software
31
 *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
32
 *    MA  02111-1307  USA
33
 *
34
 ************************************************************************/
35
#ifndef _SWTITLEPAGE_HXX
36
#define _SWTITLEPAGE_HXX
37
38
#ifndef _BASEDLGS_HXX //autogen
39
#include <sfx2/basedlgs.hxx>
40
#endif
41
42
#ifndef _SFXTABDLG_HXX //autogen
43
#include <sfx2/tabdlg.hxx>
44
#endif
45
46
#ifndef _SV_FIXED_HXX //autogen
47
#include <vcl/fixed.hxx>
48
#endif
49
50
#ifndef _SV_FIELD_HXX //autogen
51
#include <vcl/field.hxx>
52
#endif
53
#ifndef _NUMBERINGTYPELISTBOX_HXX
54
#include <numberingtypelistbox.hxx>
55
#endif
56
57
#ifndef _LSTBOX_HXX //autogen
58
#include <vcl/lstbox.hxx>
59
#endif
60
61
class Window;
62
class SfxItemSet;
63
class SwView;
64
class SwWrtShell;
65
class SwPageDesc;
66
67
/*--------------------------------------------------------------------
68
   Beschreibung: SingleTabDialog
69
 --------------------------------------------------------------------*/
70
71
class SwTitlePageDlg : public SfxModalDialog
72
{
73
private:
74
	FixedLine	aMakeInsertFL;
75
	RadioButton	aUseExistingPagesRB;
76
	RadioButton	aInsertNewPagesRB;
77
	FixedText	aPageCountFT;
78
	NumericField	aPageCountNF;
79
	FixedText	aPagePagesFT;
80
81
	FixedText	aPageStartFT;
82
	RadioButton	aDocumentStartRB;
83
	RadioButton	aPageStartRB;
84
	NumericField	aPageStartNF;
85
86
	FixedLine	aNumberingFL;
87
	CheckBox	aRestartNumberingCB;
88
	FixedText	aRestartNumberingFT;
89
	NumericField	aRestartNumberingNF;
90
	CheckBox	aSetPageNumberCB;
91
	FixedText	aSetPageNumberFT;
92
	NumericField	aSetPageNumberNF;
93
94
	FixedLine	aPagePropertiesFL;
95
	ListBox		aPagePropertiesLB;
96
	PushButton	aPagePropertiesPB;
97
98
        FixedLine	aBottomFL;
99
        OKButton	aOkPB;
100
        CancelButton	aCancelPB;
101
        HelpButton	aHelpPB;
102
103
        SwWrtShell *mpSh;
104
105
	const SwFmtPageDesc *mpPageFmtDesc;
106
107
        SwPageDesc *mpTitleDesc;
108
        const SwPageDesc *mpIndexDesc;
109
        const SwPageDesc *mpNormalDesc;
110
111
	void FillList();
112
113
        USHORT GetInsertPosition() const;
114
115
	DECL_LINK( OKHdl, Button * );
116
	DECL_LINK( EditHdl, Button * );
117
	DECL_LINK( RestartNumberingHdl, CheckBox* );
118
	DECL_LINK( SetPageNumberHdl, CheckBox* );
119
        DECL_LINK( UpHdl, NumericField * );
120
        DECL_LINK( DownHdl, NumericField * );
121
        DECL_LINK( StartPageHdl, RadioButton * );
122
public:
123
	SwTitlePageDlg( Window *pParent );
124
	~SwTitlePageDlg();
125
};
126
127
#endif
128
129
/* vi:set tabstop=4 shiftwidth=4 expandtab: */
(-) (+260 lines)
Added Link Here
1
/*************************************************************************
2
 *
3
 *  OpenOffice.org - a multi-platform office productivity suite
4
 *
5
 *  $RCSfile$
6
 *
7
 *  $Revision$
8
 *
9
 *  last change: $Author$ $Date$
10
 *
11
 *  The Contents of this file are made available subject to
12
 *  the terms of GNU Lesser General Public License Version 2.1.
13
 *
14
 *
15
 *    GNU Lesser General Public License Version 2.1
16
 *    =============================================
17
 *    Copyright 2005 by Sun Microsystems, Inc.
18
 *    901 San Antonio Road, Palo Alto, CA 94303, USA
19
 *
20
 *    This library is free software; you can redistribute it and/or
21
 *    modify it under the terms of the GNU Lesser General Public
22
 *    License version 2.1, as published by the Free Software Foundation.
23
 *
24
 *    This library is distributed in the hope that it will be useful,
25
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
26
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
27
 *    Lesser General Public License for more details.
28
 *
29
 *    You should have received a copy of the GNU Lesser General Public
30
 *    License along with this library; if not, write to the Free Software
31
 *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
32
 *    MA  02111-1307  USA
33
 *
34
 ************************************************************************/
35
/* StarView ressource file */
36
37
#ifndef _SFX_HRC
38
#include <sfx2/sfx.hrc>
39
#endif
40
#ifndef _SVX_DIALOGS_HRC
41
#include <svx/dialogs.hrc>
42
#endif
43
#include "globals.hrc"
44
#include "misc.hrc"
45
#include "titlepage.hrc"
46
#include "helpid.h"
47
/**************************************************************************/
48
/*                                                                        */
49
/**************************************************************************/
50
ModalDialog DLG_TITLEPAGE
51
{
52
	HelpID = HID_TITLEPAGE ;
53
	OutputSize = TRUE ;
54
	SVLook = TRUE ;
55
	Size = MAP_APPFONT ( 216 , 201 ) ;
56
	Text [ en-US ] = "Title Pages" ;
57
	Moveable = TRUE ;
58
59
	FixedLine FL_MAKEINSERT
60
	{
61
		Pos = MAP_APPFONT ( 6 , 5 ) ;
62
		Size = MAP_APPFONT ( 204 , 8 ) ;
63
		Text [ en-US ] = "Make Title Pages" ;
64
		Text [ x-comment ] = " ";
65
	};
66
	RadioButton RB_USE_EXISTING_PAGES
67
	{
68
		Pos = MAP_APPFONT ( 12 , 18 ) ;
69
		Size = MAP_APPFONT ( 150 , 10 ) ;
70
		Text [ en-US ] = "Convert existing pages to title pages" ;
71
		TabStop = TRUE ;
72
		Check = TRUE ;
73
		Text [ x-comment ] = " ";
74
	};
75
	RadioButton RB_INSERT_NEW_PAGES
76
	{
77
		Pos = MAP_APPFONT ( 12 , 34 ) ;
78
		Size = MAP_APPFONT ( 150 , 10 ) ;
79
		Text [ en-US ] = "Insert new title pages" ;
80
		Text [ x-comment ] = " ";
81
	};
82
	FixedText FT_PAGE_COUNT
83
	{
84
		Pos = MAP_APPFONT ( 12 , 50 ) ;
85
		Size = MAP_APPFONT ( 80 , 8 ) ;
86
		Text [ en-US ] = "Number of title pages" ;
87
		Text [ x-comment ] = " ";
88
	};
89
	NumericField NF_PAGE_COUNT
90
	{
91
		Pos = MAP_APPFONT ( 80 , 50 ) ;
92
		Size = MAP_APPFONT ( 30 , 12 ) ;
93
		Border = TRUE ;
94
		TabStop = TRUE ;
95
		Left = TRUE ;
96
		Repeat = TRUE ;
97
		Spin = TRUE ;
98
		Minimum = 1 ;
99
		Maximum = 65535;
100
		First = 1 ;
101
		Last = 65535;
102
		SpinSize = 1 ;
103
	};
104
	FixedText FT_PAGE_PAGES
105
	{
106
		Pos = MAP_APPFONT ( 116 , 50 ) ;
107
		Size = MAP_APPFONT ( 80 , 10 ) ;
108
		Text [ en-US ] = "pages" ;
109
		Text [ x-comment ] = " ";
110
	};
111
	FixedText FT_PAGE_START
112
	{
113
		Pos = MAP_APPFONT ( 12 , 66 ) ;
114
		Size = MAP_APPFONT ( 58 , 8 ) ;
115
		Text [ en-US ] = "Place title pages at" ;
116
		Text [ x-comment ] = " ";
117
	};
118
	RadioButton RB_DOCUMENT_START
119
	{
120
		Pos = MAP_APPFONT ( 70 , 66 ) ;
121
		Size = MAP_APPFONT ( 80 , 10 ) ;
122
		Text [ en-US ] = "Document Start" ;
123
		TabStop = TRUE ;
124
		Check = TRUE ;
125
		Text [ x-comment ] = " ";
126
	};
127
	RadioButton RB_PAGE_START
128
	{
129
		Pos = MAP_APPFONT ( 70 , 78 ) ;
130
		Size = MAP_APPFONT ( 30 , 10 ) ;
131
		Text [ en-US ] = "Page" ;
132
		Text [ x-comment ] = " ";
133
	};
134
	NumericField NF_PAGE_START
135
	{
136
		Pos = MAP_APPFONT ( 95 , 78 ) ;
137
		Size = MAP_APPFONT ( 30 , 12 ) ;
138
		Border = TRUE ;
139
		TabStop = TRUE ;
140
		Left = TRUE ;
141
		Repeat = TRUE ;
142
		Spin = TRUE ;
143
		Minimum = 1 ;
144
		Maximum = 65535;
145
		First = 1 ;
146
		Last = 65535;
147
		SpinSize = 1 ;
148
	};
149
	FixedLine FL_NUMBERING
150
	{
151
		Pos = MAP_APPFONT ( 6 , 98 ) ;
152
		Size = MAP_APPFONT ( 204 , 8 ) ;
153
		Text [ en-US ] = "Page Numbering" ;
154
		Text [ x-comment ] = " ";
155
	};
156
	CheckBox CB_RESTART_NUMBERING
157
	{
158
		Pos = MAP_APPFONT ( 12, 111  ) ;
159
		Size = MAP_APPFONT ( 150 , 10 ) ;
160
		TabStop = TRUE ;
161
		Text [ en-US ] = "Reset Page Numbering after title pages" ;
162
		Text [ x-comment ] = " ";
163
	};
164
	FixedText FT_RESTART_NUMBERING
165
	{
166
		Pos = MAP_APPFONT ( 140 , 111 ) ;
167
		Size = MAP_APPFONT ( 50 , 10 ) ;
168
		Text [ en-US ] = "Page Number" ;
169
		Text [ x-comment ] = " ";
170
	};
171
	NumericField NF_RESTART_NUMBERING
172
	{
173
		Pos = MAP_APPFONT ( 180 , 111 ) ;
174
		Size = MAP_APPFONT ( 30 , 12 ) ;
175
		Border = TRUE ;
176
		TabStop = TRUE ;
177
		Left = TRUE ;
178
		Repeat = TRUE ;
179
		Spin = TRUE ;
180
		Minimum = 1 ;
181
		Maximum = 65535;
182
		First = 1 ;
183
		Last = 65535;
184
		SpinSize = 1 ;
185
	};
186
	CheckBox CB_SET_PAGE_NUMBER
187
	{
188
		Pos = MAP_APPFONT ( 12 , 125 ) ;
189
		Size = MAP_APPFONT ( 150 , 10 ) ;
190
		TabStop = TRUE ;
191
		Text [ en-US ] = "Set Page Number for first title page" ;
192
		Text [ x-comment ] = " ";
193
	};
194
	FixedText FT_SET_PAGE_NUMBER
195
	{
196
		Pos = MAP_APPFONT ( 140 , 125 ) ;
197
		Size = MAP_APPFONT ( 50 , 10 ) ;
198
		Text [ en-US ] = "Page Number" ;
199
		Text [ x-comment ] = " ";
200
	};
201
	NumericField NF_SET_PAGE_NUMBER
202
	{
203
		Pos = MAP_APPFONT ( 180 , 125 ) ;
204
		Size = MAP_APPFONT ( 30 , 12 ) ;
205
		Border = TRUE ;
206
		TabStop = TRUE ;
207
		Left = TRUE ;
208
		Repeat = TRUE ;
209
		Spin = TRUE ;
210
		Minimum = 1 ;
211
		Maximum = 65535;
212
		First = 1 ;
213
		Last = 65535;
214
		SpinSize = 1 ;
215
	};
216
	FixedLine FL_PAGE_PROPERTIES
217
	{
218
		Pos = MAP_APPFONT ( 6 , 141 ) ;
219
		Size = MAP_APPFONT ( 204 , 8 ) ;
220
		Text [ en-US ] = "Edit Page Properties" ;
221
		Text [ x-comment ] = " ";
222
	};
223
	ListBox LB_PAGE_PROPERTIES
224
	{
225
		Border = TRUE ;
226
		Pos = MAP_APPFONT ( 12 , 154 ) ;
227
		Size = MAP_APPFONT ( 150 , 80 ) ;
228
		TabStop = TRUE ;
229
		DropDown = TRUE ;
230
		CurPos = 0 ;
231
	};
232
	PushButton PB_PAGE_PROPERTIES
233
	{
234
                Pos = MAP_APPFONT ( 170 , 154 ) ;
235
		Size = MAP_APPFONT ( 30 , 12 ) ;
236
		Text [ en-US ] = "Edit..." ;
237
	};
238
	FixedLine FL_BOTTOM
239
	{
240
		Pos = MAP_APPFONT ( 6 , 170 ) ;
241
		Size = MAP_APPFONT ( 204 , 8 ) ;
242
	};
243
	OKButton PB_OK
244
	{
245
		Pos = MAP_APPFONT ( 54 , 181 ) ;
246
		Size = MAP_APPFONT ( 50 , 14 ) ;
247
		DefButton = TRUE ;
248
	};
249
	CancelButton PB_CANCEL
250
	{
251
		Pos = MAP_APPFONT ( 107 , 181 ) ;
252
		Size = MAP_APPFONT ( 50 , 14 ) ;
253
		DefButton = TRUE ;
254
	};
255
	HelpButton PB_HELP
256
	{
257
		Pos = MAP_APPFONT ( 160 , 181 ) ;
258
		Size = MAP_APPFONT ( 50 , 14 ) ;
259
	};
260
};
(-) (+401 lines)
Added Link Here
1
/*************************************************************************
2
 *
3
 *  OpenOffice.org - a multi-platform office productivity suite
4
 *
5
 *  $RCSfile$
6
 *
7
 *  $Revision$
8
 *
9
 *  last change: $Author$ $Date$
10
 *
11
 *  The Contents of this file are made available subject to
12
 *  the terms of GNU Lesser General Public License Version 2.1.
13
 *
14
 *
15
 *    GNU Lesser General Public License Version 2.1
16
 *    =============================================
17
 *    Copyright 2005 by Sun Microsystems, Inc.
18
 *    901 San Antonio Road, Palo Alto, CA 94303, USA
19
 *
20
 *    This library is free software; you can redistribute it and/or
21
 *    modify it under the terms of the GNU Lesser General Public
22
 *    License version 2.1, as published by the Free Software Foundation.
23
 *
24
 *    This library is distributed in the hope that it will be useful,
25
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
26
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
27
 *    Lesser General Public License for more details.
28
 *
29
 *    You should have received a copy of the GNU Lesser General Public
30
 *    License along with this library; if not, write to the Free Software
31
 *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
32
 *    MA  02111-1307  USA
33
 *
34
 ************************************************************************/
35
36
// MARKER(update_precomp.py): autogen include statement, do not remove
37
#include "precompiled_sw.hxx"
38
39
#ifdef SW_DLLIMPLEMENTATION
40
#undef SW_DLLIMPLEMENTATION
41
#endif
42
43
#ifndef _SFXVIEWFRM_HXX //autogen
44
#include <sfx2/viewfrm.hxx>
45
#endif
46
47
#ifndef _SFXSTYLE_HXX //autogen
48
#include <svtools/style.hxx>
49
#endif
50
51
#ifndef _SV_MSGBOX_HXX //autogen
52
#include <vcl/msgbox.hxx>
53
#endif
54
55
#ifndef _SWVIEW_HXX //autogen
56
#include <view.hxx>
57
#endif
58
#ifndef _SWMODULE_HXX
59
#include <swmodule.hxx>
60
#endif
61
#ifndef _WRTSH_HXX //autogen
62
#include <wrtsh.hxx>
63
#endif
64
#ifndef _POOLFMT_HXX
65
#include <poolfmt.hxx>
66
#endif
67
#ifndef _SWDOCSH_HXX //autogen
68
#include <docsh.hxx>
69
#endif
70
71
#ifndef _CHARFMT_HXX //autogen
72
#include <charfmt.hxx>
73
#endif
74
75
#ifndef _DOCSTYLE_HXX //autogen
76
#include <docstyle.hxx>
77
#endif
78
79
#include "fldbas.hxx"
80
#include "lineinfo.hxx"
81
#include "globals.hrc"
82
#include "titlepage.hrc"
83
#include "titlepage.hxx"
84
#include "uitool.hxx"
85
#include "fmtpdsc.hxx"
86
#include "pagedesc.hxx"
87
88
#include <IDocumentStylePoolAccess.hxx>
89
90
namespace
91
{
92
	bool lcl_GetPageDesc(SwWrtShell *pSh, USHORT &rPageNo, const SwFmtPageDesc **ppPageFmtDesc)
93
	{
94
		bool bRet = false;
95
		SfxItemSet aSet( pSh->GetAttrPool(), RES_PAGEDESC, RES_PAGEDESC );
96
		if (pSh->GetCurAttr( aSet ))
97
		{
98
			const SfxPoolItem* pItem(0);
99
			if (SFX_ITEM_SET == aSet.GetItemState( RES_PAGEDESC, TRUE, &pItem ) && pItem)
100
			{
101
				rPageNo = ((const SwFmtPageDesc *)pItem)->GetNumOffset();
102
				if (ppPageFmtDesc)
103
					(*ppPageFmtDesc) = (const SwFmtPageDesc *)(pItem->Clone());
104
				bRet = true;
105
			}
106
		}
107
		return bRet;
108
	}
109
110
    bool lcl_SkipNPages(SwWrtShell *pSh, USHORT nNoPages)
111
    {
112
		bool bAllOk = true;
113
		for (USHORT nI = 0; nI < nNoPages && bAllOk; ++nI)
114
			bAllOk = pSh->SttNxtPg();
115
        return bAllOk;
116
    }
117
118
    void lcl_ChangePage(SwWrtShell *pSh, USHORT nNewNumber,
119
        const SwPageDesc *pNewDesc)
120
	{
121
	    const USHORT nCurIdx = pSh->GetCurPageDesc();
122
	    const SwPageDesc &rCurrentDesc = pSh->GetPageDesc( nCurIdx );
123
124
	    const SwFmtPageDesc *pPageFmtDesc(0);
125
	    USHORT nDontCare;
126
	    lcl_GetPageDesc(pSh, nDontCare, &pPageFmtDesc);
127
128
	    //If we want a new number then set it, otherwise reuse the existing one
129
	    USHORT nPgNo = nNewNumber ?
130
            nNewNumber : ( pPageFmtDesc ? pPageFmtDesc->GetNumOffset() : 0 );
131
132
	    //If we want a new descriptior then set it, otherwise reuse the existing one
133
	    if (!pNewDesc)
134
	    {
135
		    SwFmtPageDesc aPageFmtDesc(pPageFmtDesc ? *pPageFmtDesc : &rCurrentDesc);
136
		    if (nPgNo) aPageFmtDesc.SetNumOffset(nPgNo);
137
		    pSh->SetAttr(aPageFmtDesc);
138
	    }
139
	    else
140
	    {
141
		    SwFmtPageDesc aPageFmtDesc(pNewDesc);
142
		    if (nPgNo) aPageFmtDesc.SetNumOffset(nPgNo);
143
		    pSh->SetAttr(aPageFmtDesc);
144
	    }
145
146
	    delete pPageFmtDesc;
147
	}
148
149
	void lcl_PushCursor(SwWrtShell *pSh)
150
	{
151
		pSh->LockView( TRUE );
152
		pSh->StartAllAction();
153
		pSh->SwCrsrShell::Push();
154
	}
155
156
	void lcl_PopCursor(SwWrtShell *pSh)
157
	{
158
		pSh->SwCrsrShell::Pop( FALSE );
159
		pSh->EndAllAction();
160
        pSh->LockView( FALSE );
161
	}
162
163
    USHORT lcl_GetCurrentPage(SwWrtShell *pSh)
164
    {
165
        String sDummy;
166
        USHORT nPhyNum=1, nVirtNum=1;
167
        pSh->GetPageNumber(0, true, nPhyNum, nVirtNum, sDummy);
168
        return nPhyNum;
169
    }
170
}
171
172
/*
173
 * Only include the Index page in the list if the page count implies one
174
 * to reduce confusing things
175
 */
176
void SwTitlePageDlg::FillList()
177
{
178
	USHORT nTitlePages = aPageCountNF.GetValue();
179
	aPagePropertiesLB.Clear();
180
	if (mpTitleDesc)
181
		aPagePropertiesLB.InsertEntry(mpTitleDesc->GetName());
182
	if (nTitlePages > 1 && mpIndexDesc)
183
		aPagePropertiesLB.InsertEntry(mpIndexDesc->GetName());
184
	if (mpNormalDesc)
185
		aPagePropertiesLB.InsertEntry(mpNormalDesc->GetName());
186
    aPagePropertiesLB.SelectEntryPos(0);
187
}
188
189
/*--------------------------------------------------------------------
190
	Beschreibung:
191
 --------------------------------------------------------------------*/
192
193
USHORT SwTitlePageDlg::GetInsertPosition() const
194
{
195
    USHORT nPage = 1;
196
    if (aPageStartNF.IsEnabled())
197
        nPage = aPageStartNF.GetValue();
198
    return nPage;
199
}
200
201
SwTitlePageDlg::SwTitlePageDlg( Window *pParent ) :
202
	SfxModalDialog( pParent, SW_RES(DLG_TITLEPAGE) ),
203
#pragma warning (disable : 4355)
204
	aMakeInsertFL		( this, SW_RES( FL_MAKEINSERT )),
205
	aUseExistingPagesRB	( this, SW_RES( RB_USE_EXISTING_PAGES )),
206
	aInsertNewPagesRB	( this, SW_RES( RB_INSERT_NEW_PAGES )),
207
	aPageCountFT		( this, SW_RES( FT_PAGE_COUNT )),
208
	aPageCountNF		( this, SW_RES( NF_PAGE_COUNT )),
209
	aPagePagesFT		( this, SW_RES( FT_PAGE_PAGES )),
210
	aPageStartFT		( this, SW_RES( FT_PAGE_START )),
211
	aDocumentStartRB	( this, SW_RES( RB_DOCUMENT_START )),
212
	aPageStartRB		( this, SW_RES( RB_PAGE_START )),
213
	aPageStartNF		( this, SW_RES( NF_PAGE_START )),
214
	aNumberingFL		( this, SW_RES( FL_NUMBERING )),
215
	aRestartNumberingCB	( this, SW_RES( CB_RESTART_NUMBERING )),
216
	aRestartNumberingFT	( this, SW_RES( FT_RESTART_NUMBERING )),
217
	aRestartNumberingNF	( this, SW_RES( NF_RESTART_NUMBERING )),
218
	aSetPageNumberCB	( this, SW_RES( CB_SET_PAGE_NUMBER )),
219
	aSetPageNumberFT	( this, SW_RES( FT_SET_PAGE_NUMBER )),
220
	aSetPageNumberNF	( this, SW_RES( NF_SET_PAGE_NUMBER )),
221
	aPagePropertiesFL	( this, SW_RES( FL_PAGE_PROPERTIES )),
222
	aPagePropertiesLB	( this, SW_RES( LB_PAGE_PROPERTIES )),
223
	aPagePropertiesPB	( this, SW_RES( PB_PAGE_PROPERTIES )),
224
    aBottomFL			( this, SW_RES( FL_BOTTOM )),
225
    aOkPB				( this, SW_RES( PB_OK )),
226
    aCancelPB			( this, SW_RES( PB_CANCEL )),
227
    aHelpPB				( this, SW_RES( PB_HELP )),
228
	mpPageFmtDesc		(0)
229
#pragma warning (default : 4355)
230
{
231
	FreeResource();
232
233
    aOkPB.SetClickHdl(LINK(this, SwTitlePageDlg, OKHdl));
234
    aRestartNumberingCB.SetClickHdl(LINK(this, SwTitlePageDlg, RestartNumberingHdl));
235
	aSetPageNumberCB.SetClickHdl(LINK(this, SwTitlePageDlg, SetPageNumberHdl));
236
237
	USHORT nSetPage = 1;
238
	USHORT nResetPage = 1;
239
	USHORT nTitlePages = 1;
240
	mpSh = ::GetActiveView()->GetWrtShellPtr();
241
	lcl_PushCursor(mpSh);
242
243
	SwView& rView = mpSh->GetView();
244
	rView.InvalidateRulerPos();
245
246
	bool bMaybeResetNumbering = false;
247
248
	mpTitleDesc = mpSh->GetPageDescFromPool(RES_POOLPAGE_FIRST);
249
	mpIndexDesc = mpSh->GetPageDescFromPool(RES_POOLPAGE_REGISTER);
250
	mpNormalDesc = mpSh->GetPageDescFromPool(RES_POOLPAGE_STANDARD);
251
252
    mpSh->SttDoc();
253
	if (lcl_GetPageDesc( mpSh, nSetPage, &mpPageFmtDesc ))
254
	{
255
   		if (mpPageFmtDesc->GetPageDesc() == mpTitleDesc)
256
   		{
257
			while (mpSh->SttNxtPg())
258
			{
259
                const USHORT nCurIdx = mpSh->GetCurPageDesc();
260
                const SwPageDesc &rPageDesc = mpSh->GetPageDesc( nCurIdx );
261
					
262
                if (mpIndexDesc != &rPageDesc)
263
				{
264
                    mpNormalDesc = &rPageDesc;
265
                    bMaybeResetNumbering = lcl_GetPageDesc(mpSh, nResetPage, NULL);
266
                    break;
267
				}
268
				++nTitlePages;
269
			}
270
    	}
271
    }
272
	lcl_PopCursor(mpSh);
273
274
    aUseExistingPagesRB.Check();
275
    aPageCountNF.SetValue(nTitlePages);
276
    aPageCountNF.SetUpHdl(LINK(this, SwTitlePageDlg, UpHdl));
277
    aPageCountNF.SetDownHdl(LINK(this, SwTitlePageDlg, DownHdl));
278
279
    aDocumentStartRB.Check();
280
    aPageStartNF.Enable(false);
281
    aPageStartNF.SetValue(lcl_GetCurrentPage(mpSh));
282
    Link aStartPageHdl = LINK(this, SwTitlePageDlg, StartPageHdl);
283
    aDocumentStartRB.SetClickHdl(aStartPageHdl);
284
    aPageStartRB.SetClickHdl(aStartPageHdl);
285
286
	if (bMaybeResetNumbering && nResetPage > 0)
287
	{
288
        aRestartNumberingCB.Check();
289
        aRestartNumberingNF.SetValue(nResetPage);
290
	}
291
	aRestartNumberingNF.Enable(aRestartNumberingCB.IsChecked());
292
293
    aSetPageNumberNF.SetValue(nSetPage);
294
	if (nSetPage > 1)
295
        aSetPageNumberCB.Check();
296
	aSetPageNumberNF.Enable(aSetPageNumberCB.IsChecked());
297
298
	FillList();
299
    aPagePropertiesPB.SetClickHdl(LINK(this, SwTitlePageDlg, EditHdl));
300
}
301
302
IMPL_LINK(SwTitlePageDlg, UpHdl, NumericField *, EMPTYARG)
303
{
304
	if (aPageCountNF.GetValue() == 2)
305
		FillList();
306
    return 0;
307
}
308
309
IMPL_LINK(SwTitlePageDlg, DownHdl, NumericField *, EMPTYARG)
310
{
311
	if (aPageCountNF.GetValue() == 1)
312
		FillList();
313
    return 0;
314
}
315
316
IMPL_LINK(SwTitlePageDlg, RestartNumberingHdl, CheckBox*, EMPTYARG)
317
{
318
    aRestartNumberingNF.Enable(aRestartNumberingCB.IsChecked());
319
    return 0;
320
}
321
322
IMPL_LINK(SwTitlePageDlg, SetPageNumberHdl, CheckBox*, EMPTYARG)
323
{
324
    aSetPageNumberNF.Enable(aSetPageNumberCB.IsChecked());
325
    return 0;
326
}
327
328
IMPL_LINK(SwTitlePageDlg, StartPageHdl, RadioButton*, EMPTYARG)
329
{
330
    aPageStartNF.Enable(aPageStartRB.IsChecked());
331
    return 0;
332
}
333
334
__EXPORT SwTitlePageDlg::~SwTitlePageDlg()
335
{
336
	delete mpPageFmtDesc;
337
}
338
339
IMPL_LINK( SwTitlePageDlg, EditHdl, Button *, /*pBtn*/ )
340
{
341
    SwView& rView = mpSh->GetView();
342
    rView.GetDocShell()->FormatPage(aPagePropertiesLB.GetSelectEntry(), false, mpSh);
343
    rView.InvalidateRulerPos();
344
345
    return 0;
346
}
347
348
IMPL_LINK( SwTitlePageDlg, OKHdl, Button *, /*pBtn*/ )
349
{
350
    lcl_PushCursor(mpSh);
351
352
    mpSh->StartUndo();
353
354
    SwFmtPageDesc aTitleDesc(mpTitleDesc);
355
356
    if (aSetPageNumberCB.IsChecked())
357
        aTitleDesc.SetNumOffset(aSetPageNumberNF.GetValue());
358
    else if (mpPageFmtDesc)
359
        aTitleDesc.SetNumOffset(mpPageFmtDesc->GetNumOffset());
360
361
    USHORT nNoPages = aPageCountNF.GetValue();
362
    if (!aUseExistingPagesRB.IsChecked())
363
    {
364
        mpSh->GotoPage(GetInsertPosition(), false);
365
        for (USHORT nI=0; nI < nNoPages; ++nI)
366
        	mpSh->InsertPageBreak();
367
    }
368
369
    mpSh->GotoPage(GetInsertPosition(), false);
370
    for (USHORT nI=1; nI < nNoPages; ++nI)
371
    {
372
        if (mpSh->SttNxtPg())
373
            lcl_ChangePage(mpSh, 0, mpIndexDesc);
374
    }
375
376
    mpSh->GotoPage(GetInsertPosition(), false);
377
    mpSh->SetAttr(aTitleDesc);
378
379
    if (nNoPages > 1 && mpSh->GotoPage(GetInsertPosition() + nNoPages, false))
380
    {
381
	    SwFmtPageDesc aPageFmtDesc(mpNormalDesc);
382
    	mpSh->SetAttr(aPageFmtDesc);
383
    }
384
385
    if (aRestartNumberingCB.IsChecked() || nNoPages > 1)
386
    {
387
        USHORT nPgNo = aRestartNumberingCB.IsChecked() ? aRestartNumberingNF.GetValue() : 0;
388
        const SwPageDesc *pNewDesc = nNoPages > 1 ? mpNormalDesc : 0;
389
        mpSh->GotoPage(GetInsertPosition() + nNoPages, false);
390
        lcl_ChangePage(mpSh, nPgNo, pNewDesc);
391
    }
392
393
    mpSh->EndUndo();
394
    lcl_PopCursor(mpSh);
395
    if (!aUseExistingPagesRB.IsChecked())
396
        mpSh->GotoPage(GetInsertPosition(), false);
397
    EndDialog( RET_OK );
398
    return 0;
399
}
400
401
/* vi:set tabstop=4 shiftwidth=4 expandtab: */
(-) (+58 lines)
Added Link Here
1
/*************************************************************************
2
 *
3
 *  OpenOffice.org - a multi-platform office productivity suite
4
 *
5
 *  $RCSfile$
6
 *
7
 *  $Revision$
8
 *
9
 *  last change: $Author$ $Date$
10
 *
11
 *  The Contents of this file are made available subject to
12
 *  the terms of GNU Lesser General Public License Version 2.1.
13
 *
14
 *
15
 *    GNU Lesser General Public License Version 2.1
16
 *    =============================================
17
 *    Copyright 2005 by Sun Microsystems, Inc.
18
 *    901 San Antonio Road, Palo Alto, CA 94303, USA
19
 *
20
 *    This library is free software; you can redistribute it and/or
21
 *    modify it under the terms of the GNU Lesser General Public
22
 *    License version 2.1, as published by the Free Software Foundation.
23
 *
24
 *    This library is distributed in the hope that it will be useful,
25
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
26
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
27
 *    Lesser General Public License for more details.
28
 *
29
 *    You should have received a copy of the GNU Lesser General Public
30
 *    License along with this library; if not, write to the Free Software
31
 *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
32
 *    MA  02111-1307  USA
33
 *
34
 ************************************************************************/
35
#define FL_MAKEINSERT         1
36
#define RB_USE_EXISTING_PAGES 2
37
#define RB_INSERT_NEW_PAGES   3
38
#define FT_PAGE_COUNT         4
39
#define NF_PAGE_COUNT         5
40
#define FT_PAGE_PAGES         6
41
#define FT_PAGE_START         7
42
#define RB_DOCUMENT_START     8
43
#define RB_PAGE_START         9
44
#define NF_PAGE_START        10
45
#define FL_NUMBERING         11
46
#define CB_RESTART_NUMBERING 12
47
#define FT_RESTART_NUMBERING 13
48
#define NF_RESTART_NUMBERING 14
49
#define CB_SET_PAGE_NUMBER   15
50
#define FT_SET_PAGE_NUMBER   16
51
#define NF_SET_PAGE_NUMBER   17
52
#define FL_PAGE_PROPERTIES   18
53
#define LB_PAGE_PROPERTIES   19
54
#define PB_PAGE_PROPERTIES   20
55
#define FL_BOTTOM            21
56
#define PB_OK                22
57
#define PB_CANCEL            23
58
#define PB_HELP              24

Return to issue 7065