| 1 |
Index: inc/cmdid.h
|
| 2 |
===================================================================
|
| 3 |
RCS file: /cvs/sw/sw/inc/cmdid.h,v
|
| 4 |
retrieving revision 1.72
|
| 5 |
diff -u -r1.72 cmdid.h
|
| 6 |
--- openoffice.org.orig/sw/inc/cmdid.h 27 Jun 2007 13:12:47 -0000 1.72
|
| 7 |
+++ openoffice.org/sw/inc/cmdid.h 10 Jul 2007 12:54:59 -0000
|
| 8 |
@@ -539,6 +539,8 @@
|
| 9 |
|
| 10 |
#define FN_SET_PAGE_STYLE (FN_FORMAT + 93) /* Anwenden Seitenv. */
|
| 11 |
|
| 12 |
+#define FN_FORMAT_TITLEPAGE_DLG (FN_FORMAT + 98) /* Title Page */
|
| 13 |
+
|
| 14 |
|
| 15 |
#define FN_TABLE_REP (FN_FORMAT + 99) /* TableRepresentation */
|
| 16 |
#define FN_CONVERT_TEXT_TABLE (FN_FORMAT + 100) /* Konvertierung Text <-> Tabelle */
|
| 17 |
Index: inc/globals.hrc
|
| 18 |
===================================================================
|
| 19 |
RCS file: /cvs/sw/sw/inc/globals.hrc,v
|
| 20 |
retrieving revision 1.16
|
| 21 |
diff -u -r1.16 globals.hrc
|
| 22 |
--- openoffice.org.orig/sw/inc/globals.hrc 2 May 2006 15:13:43 -0000 1.16
|
| 23 |
+++ openoffice.org/sw/inc/globals.hrc 10 Jul 2007 12:55:08 -0000
|
| 24 |
@@ -282,7 +282,9 @@
|
| 25 |
#define TP_SECTION_INDENTS (RC_GLOBALS_BEGIN + 102)
|
| 26 |
#define TP_OPTCOMPATIBILITY_PAGE (RC_GLOBALS_BEGIN + 103)
|
| 27 |
#define TP_MAILCONFIG (RC_GLOBALS_BEGIN + 104)
|
| 28 |
-//maximum: RC_GLOBALS_BEGIN + 119
|
| 29 |
+#define TP_TITLEPAGE (RC_GLOBALS_BEGIN + 105)
|
| 30 |
+//maximum: RC_GLOBALS_BEGIN + 120
|
| 31 |
+
|
| 32 |
|
| 33 |
#if STR_DOC_STAT > RC_GLOBALS_END
|
| 34 |
#error Resource-Id Ueberlauf in #file, #line
|
| 35 |
@@ -294,4 +296,5 @@
|
| 36 |
#define SID_WRT_SHELL (RC_GLOBALS_BEGIN + 117)
|
| 37 |
|
| 38 |
#define DLG_LINE_NUMBERING (RC_GLOBALS_BEGIN + 118)
|
| 39 |
+#define DLG_TITLEPAGE (RC_GLOBALS_BEGIN + 119)
|
| 40 |
#endif // _GLOBALS_HRC
|
| 41 |
Index: inc/helpid.h
|
| 42 |
===================================================================
|
| 43 |
RCS file: /cvs/sw/sw/inc/helpid.h,v
|
| 44 |
retrieving revision 1.30
|
| 45 |
diff -u -r1.30 helpid.h
|
| 46 |
--- openoffice.org.orig/sw/inc/helpid.h 2 Jan 2007 16:45:16 -0000 1.30
|
| 47 |
+++ openoffice.org/sw/inc/helpid.h 10 Jul 2007 12:55:09 -0000
|
| 48 |
@@ -986,3 +986,4 @@
|
| 49 |
#define HID_MM_HEADER_12 (HID_BASE + 2279)
|
| 50 |
#define HID_MM_HEADER_13 (HID_BASE + 2280)
|
| 51 |
|
| 52 |
+#define HID_TITLEPAGE (HID_BASE + 2281)
|
| 53 |
Index: inc/rcid.hrc
|
| 54 |
===================================================================
|
| 55 |
RCS file: /cvs/sw/sw/inc/rcid.hrc,v
|
| 56 |
retrieving revision 1.12
|
| 57 |
diff -u -r1.12 rcid.hrc
|
| 58 |
--- openoffice.org.orig/sw/inc/rcid.hrc 22 May 2007 16:20:20 -0000 1.12
|
| 59 |
+++ openoffice.org/sw/inc/rcid.hrc 10 Jul 2007 12:55:14 -0000
|
| 60 |
@@ -135,7 +135,7 @@
|
| 61 |
|
| 62 |
// globale Ressourcen
|
| 63 |
#define RC_GLOBALS_BEGIN RC_GLOBALS
|
| 64 |
-#define RC_GLOBALS_END (RC_GLOBALS_BEGIN + 119)
|
| 65 |
+#define RC_GLOBALS_END (RC_GLOBALS_BEGIN + 120)
|
| 66 |
|
| 67 |
// Format-Vorlagen
|
| 68 |
#define RC_FMTUI_BEGIN RC_FMTUI
|
| 69 |
Index: inc/swabstdlg.hxx
|
| 70 |
===================================================================
|
| 71 |
RCS file: /cvs/sw/sw/inc/swabstdlg.hxx,v
|
| 72 |
retrieving revision 1.13
|
| 73 |
diff -u -r1.13 swabstdlg.hxx
|
| 74 |
--- openoffice.org.orig/sw/inc/swabstdlg.hxx 26 Apr 2007 08:48:16 -0000 1.13
|
| 75 |
+++ openoffice.org/sw/inc/swabstdlg.hxx 10 Jul 2007 12:55:16 -0000
|
| 76 |
@@ -477,6 +477,7 @@
|
| 77 |
SwField* pField, BOOL bNextButton = FALSE ) = 0; //add for SwFldInputDlg
|
| 78 |
virtual AbstractInsFootNoteDlg* CreateInsFootNoteDlg( int nResId,
|
| 79 |
Window * pParent, SwWrtShell &rSh, BOOL bEd = FALSE) = 0; //add for SwInsFootNoteDlg
|
| 80 |
+ virtual VclAbstractDialog* CreateTitlePageDlg ( Window * pParent ) = 0;
|
| 81 |
virtual VclAbstractDialog * CreateVclSwViewDialog( int nResId,
|
| 82 |
SwView& rView, BOOL bCol = FALSE ) = 0; //add for SwInsRowColDlg, SwLineNumberingDlg
|
| 83 |
virtual AbstractInsertGrfRulerDlg* CreateInsertGrfRulerDlg( int nResId,
|
| 84 |
Index: sdi/_basesh.sdi
|
| 85 |
===================================================================
|
| 86 |
RCS file: /cvs/sw/sw/sdi/_basesh.sdi,v
|
| 87 |
retrieving revision 1.16
|
| 88 |
diff -u -r1.16 _basesh.sdi
|
| 89 |
--- openoffice.org.orig/sw/sdi/_basesh.sdi 2 May 2006 15:13:56 -0000 1.16
|
| 90 |
+++ openoffice.org/sw/sdi/_basesh.sdi 10 Jul 2007 12:55:36 -0000
|
| 91 |
@@ -250,6 +250,12 @@
|
| 92 |
DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
|
| 93 |
]
|
| 94 |
|
| 95 |
+ FN_FORMAT_TITLEPAGE_DLG // status(final|play)
|
| 96 |
+ [
|
| 97 |
+ ExecMethod = ExecDlg ;
|
| 98 |
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
|
| 99 |
+ ]
|
| 100 |
+
|
| 101 |
FN_FORMAT_PAGE_COLUMN_DLG // status(final|play)
|
| 102 |
[
|
| 103 |
ExecMethod = ExecDlg ;
|
| 104 |
Index: sdi/swriter.sdi
|
| 105 |
===================================================================
|
| 106 |
RCS file: /cvs/sw/sw/sdi/swriter.sdi,v
|
| 107 |
retrieving revision 1.66
|
| 108 |
diff -u -r1.66 swriter.sdi
|
| 109 |
--- openoffice.org.orig/sw/sdi/swriter.sdi 27 Jun 2007 13:16:04 -0000 1.66
|
| 110 |
+++ openoffice.org/sw/sdi/swriter.sdi 10 Jul 2007 12:57:02 -0000
|
| 111 |
@@ -6330,6 +6330,31 @@
|
| 112 |
]
|
| 113 |
|
| 114 |
//--------------------------------------------------------------------------
|
| 115 |
+SfxVoidItem TitlePageDialog FN_FORMAT_TITLEPAGE_DLG
|
| 116 |
+()
|
| 117 |
+[
|
| 118 |
+ /* flags: */
|
| 119 |
+ AutoUpdate = FALSE,
|
| 120 |
+ Cachable = Cachable,
|
| 121 |
+ FastCall = FALSE,
|
| 122 |
+ HasCoreId = FALSE,
|
| 123 |
+ HasDialog = TRUE,
|
| 124 |
+ ReadOnlyDoc = FALSE,
|
| 125 |
+ Toggle = FALSE,
|
| 126 |
+ Container = FALSE,
|
| 127 |
+ RecordAbsolute = FALSE,
|
| 128 |
+ RecordPerItem;
|
| 129 |
+ Asynchron;
|
| 130 |
+
|
| 131 |
+ /* config: */
|
| 132 |
+ AccelConfig = TRUE,
|
| 133 |
+ MenuConfig = TRUE,
|
| 134 |
+ StatusBarConfig = FALSE,
|
| 135 |
+ ToolBoxConfig = TRUE,
|
| 136 |
+ GroupId = GID_FORMAT;
|
| 137 |
+]
|
| 138 |
+
|
| 139 |
+//--------------------------------------------------------------------------
|
| 140 |
SfxVoidItem PageDown FN_PAGEDOWN
|
| 141 |
()
|
| 142 |
[
|
| 143 |
Index: sdi/swslots.src
|
| 144 |
===================================================================
|
| 145 |
RCS file: /cvs/sw/sw/sdi/swslots.src,v
|
| 146 |
retrieving revision 1.131
|
| 147 |
diff -u -r1.131 swslots.src
|
| 148 |
--- openoffice.org.orig/sw/sdi/swslots.src 27 Jun 2007 13:16:20 -0000 1.131
|
| 149 |
+++ openoffice.org/sw/sdi/swslots.src 10 Jul 2007 12:57:02 -0000
|
| 150 |
@@ -307,6 +307,10 @@
|
| 151 |
{
|
| 152 |
Slotname [ en-US ] = "Page Settings";
|
| 153 |
};
|
| 154 |
+SfxSlotInfo FN_FORMAT_PAGE_DLG
|
| 155 |
+{
|
| 156 |
+ Slotname [ de ] = "~Title Page...";
|
| 157 |
+};
|
| 158 |
SfxSlotInfo FN_FORMAT_RESET
|
| 159 |
{
|
| 160 |
Slotname [ en-US ] = "Reset Font Attributes";
|
| 161 |
Index: source/ui/dialog/swdlgfact.cxx
|
| 162 |
===================================================================
|
| 163 |
RCS file: /cvs/sw/sw/source/ui/dialog/swdlgfact.cxx,v
|
| 164 |
retrieving revision 1.13
|
| 165 |
diff -u -r1.13 swdlgfact.cxx
|
| 166 |
--- openoffice.org.orig/sw/source/ui/dialog/swdlgfact.cxx 26 Apr 2007 09:06:20 -0000 1.13
|
| 167 |
+++ openoffice.org/sw/source/ui/dialog/swdlgfact.cxx 10 Jul 2007 13:05:50 -0000
|
| 168 |
@@ -97,6 +97,7 @@
|
| 169 |
#include <instable.hxx> //add for SwInsTableDlg
|
| 170 |
#include <javaedit.hxx> //add for SwJavaEditDialog
|
| 171 |
#include <linenum.hxx> //add for SwLineNumberingDlg
|
| 172 |
+#include <titlepage.hxx> //add for SwTitlePageDlg
|
| 173 |
#include <mailmrge.hxx> //add for SwMailMergeDlg, SwMailMergeCreateFromDlg, SwMailMergeFieldConnectionsDlg
|
| 174 |
#include <mergetbl.hxx> //add for SwMergeTblDlg
|
| 175 |
#include <multmrk.hxx> //add for SwMultiTOXMarkDlg
|
| 176 |
@@ -1357,6 +1358,14 @@
|
| 177 |
return 0;
|
| 178 |
}
|
| 179 |
|
| 180 |
+VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateTitlePageDlg ( Window *pParent )
|
| 181 |
+{
|
| 182 |
+ Dialog* pDlg = new SwTitlePageDlg( pParent );
|
| 183 |
+ if ( pDlg )
|
| 184 |
+ return new VclAbstractDialog_Impl( pDlg );
|
| 185 |
+ return 0;
|
| 186 |
+}
|
| 187 |
+
|
| 188 |
VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateVclSwViewDialog( int nResId,
|
| 189 |
SwView& rView, BOOL /*bCol*/ ) //add for SwInsRowColDlg, SwLineNumberingDlg
|
| 190 |
{
|
| 191 |
Index: source/ui/dialog/swdlgfact.hxx
|
| 192 |
===================================================================
|
| 193 |
RCS file: /cvs/sw/sw/source/ui/dialog/swdlgfact.hxx,v
|
| 194 |
retrieving revision 1.9
|
| 195 |
diff -u -r1.9 swdlgfact.hxx
|
| 196 |
--- openoffice.org.orig/sw/source/ui/dialog/swdlgfact.hxx 26 Apr 2007 09:06:34 -0000 1.9
|
| 197 |
+++ openoffice.org/sw/source/ui/dialog/swdlgfact.hxx 10 Jul 2007 13:05:50 -0000
|
| 198 |
@@ -532,6 +532,7 @@
|
| 199 |
SwField* pField, BOOL bNextButton = FALSE ); //add for SwFldInputDlg
|
| 200 |
virtual AbstractInsFootNoteDlg* CreateInsFootNoteDlg( int nResId,
|
| 201 |
Window * pParent, SwWrtShell &rSh, BOOL bEd = FALSE); //add for SwInsFootNoteDlg
|
| 202 |
+ virtual VclAbstractDialog * CreateTitlePageDlg ( Window * pParent );
|
| 203 |
virtual VclAbstractDialog * CreateVclSwViewDialog( int nResId,
|
| 204 |
SwView& rView, BOOL bCol = FALSE ); //add for SwInsRowColDlg, SwLineNumberingDlg
|
| 205 |
virtual AbstractInsertGrfRulerDlg* CreateInsertGrfRulerDlg( int nResId,
|
| 206 |
Index: source/ui/inc/swmn_tmpl.hrc
|
| 207 |
===================================================================
|
| 208 |
RCS file: /cvs/sw/sw/source/ui/inc/swmn_tmpl.hrc,v
|
| 209 |
retrieving revision 1.13
|
| 210 |
diff -u -r1.13 swmn_tmpl.hrc
|
| 211 |
--- openoffice.org.orig/sw/source/ui/inc/swmn_tmpl.hrc 27 Jun 2007 13:25:09 -0000 1.13
|
| 212 |
+++ openoffice.org/sw/source/ui/inc/swmn_tmpl.hrc 10 Jul 2007 13:08:19 -0000
|
| 213 |
@@ -67,8 +67,13 @@
|
| 214 |
Identifier = FN_FORMAT_PAGE_DLG ; \
|
| 215 |
HelpID = FN_FORMAT_PAGE_DLG ; \
|
| 216 |
Text [ en-US ] = "Pa~ge..." ; \
|
| 217 |
- };
|
| 218 |
-
|
| 219 |
+ };\
|
| 220 |
+ MenuItem\
|
| 221 |
+ {\
|
| 222 |
+ Identifier = FN_FORMAT_TITLEPAGE_DLG ; \
|
| 223 |
+ HelpID = FN_FORMAT_TITLEPAGE_DLG ; \
|
| 224 |
+ Text [ en-US ] = "~Title Page..." ; \
|
| 225 |
+ };
|
| 226 |
|
| 227 |
#define MN_TEXT_ATTR\
|
| 228 |
MenuItem\
|
| 229 |
Index: source/ui/misc/makefile.mk
|
| 230 |
===================================================================
|
| 231 |
RCS file: /cvs/sw/sw/source/ui/misc/makefile.mk,v
|
| 232 |
retrieving revision 1.12
|
| 233 |
diff -u -r1.12 makefile.mk
|
| 234 |
--- openoffice.org.orig/sw/source/ui/misc/makefile.mk 9 Sep 2005 10:35:47 -0000 1.12
|
| 235 |
+++ openoffice.org/sw/source/ui/misc/makefile.mk 10 Jul 2007 13:09:42 -0000
|
| 236 |
@@ -56,7 +56,8 @@
|
| 237 |
pgfnote.src \
|
| 238 |
pggrid.src \
|
| 239 |
redlndlg.src \
|
| 240 |
- srtdlg.src
|
| 241 |
+ srtdlg.src \
|
| 242 |
+ titlepage.src
|
| 243 |
|
| 244 |
EXCEPTIONSFILES = \
|
| 245 |
$(SLO)$/glossary.obj \
|
| 246 |
@@ -76,6 +77,7 @@
|
| 247 |
$(SLO)$/insfnote.obj \
|
| 248 |
$(SLO)$/insrule.obj \
|
| 249 |
$(SLO)$/linenum.obj \
|
| 250 |
+ $(SLO)$/titlepage.obj \
|
| 251 |
$(SLO)$/num.obj \
|
| 252 |
$(SLO)$/numberingtypelistbox.obj \
|
| 253 |
$(SLO)$/outline.obj \
|
| 254 |
Index: source/ui/shells/basesh.cxx
|
| 255 |
===================================================================
|
| 256 |
RCS file: /cvs/sw/sw/source/ui/shells/basesh.cxx,v
|
| 257 |
retrieving revision 1.81
|
| 258 |
diff -u -r1.81 basesh.cxx
|
| 259 |
--- openoffice.org.orig/sw/source/ui/shells/basesh.cxx 10 May 2007 16:22:02 -0000 1.81
|
| 260 |
+++ openoffice.org/sw/source/ui/shells/basesh.cxx 10 Jul 2007 13:10:07 -0000
|
| 261 |
@@ -2546,6 +2546,14 @@
|
| 262 |
|
| 263 |
switch ( nSlot )
|
| 264 |
{
|
| 265 |
+ case FN_FORMAT_TITLEPAGE_DLG:
|
| 266 |
+ {
|
| 267 |
+ SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
|
| 268 |
+ VclAbstractDialog* pDlg = pFact->CreateTitlePageDlg( pMDI );
|
| 269 |
+ pDlg->Execute();
|
| 270 |
+ delete pDlg;
|
| 271 |
+ }
|
| 272 |
+ break;
|
| 273 |
case FN_FORMAT_PAGE_COLUMN_DLG:
|
| 274 |
case FN_FORMAT_PAGE_DLG:
|
| 275 |
{
|
| 276 |
Index: uiconfig/swriter/menubar/menubar.xml
|
| 277 |
===================================================================
|
| 278 |
RCS file: /cvs/sw/sw/uiconfig/swriter/menubar/menubar.xml,v
|
| 279 |
retrieving revision 1.28
|
| 280 |
diff -u -r1.28 menubar.xml
|
| 281 |
--- openoffice.org.orig/sw/uiconfig/swriter/menubar/menubar.xml 29 May 2007 14:49:53 -0000 1.28
|
| 282 |
+++ openoffice.org/sw/uiconfig/swriter/menubar/menubar.xml 10 Jul 2007 13:13:00 -0000
|
| 283 |
@@ -210,6 +210,7 @@
|
| 284 |
<menu:menuitem menu:id=".uno:ParagraphDialog"/>
|
| 285 |
<menu:menuitem menu:id=".uno:BulletsAndNumberingDialog"/>
|
| 286 |
<menu:menuitem menu:id=".uno:PageDialog"/>
|
| 287 |
+ <menu:menuitem menu:id=".uno:TitlePageDialog"/>
|
| 288 |
<menu:menuseparator/>
|
| 289 |
<menu:menu menu:id=".uno:TransliterateMenu">
|
| 290 |
<menu:menupopup>
|
| 291 |
Index: util/makefile.mk
|
| 292 |
===================================================================
|
| 293 |
RCS file: /cvs/sw/sw/util/makefile.mk,v
|
| 294 |
retrieving revision 1.61
|
| 295 |
diff -u -r1.61 makefile.mk
|
| 296 |
--- openoffice.org.orig/sw/util/makefile.mk 22 May 2007 16:41:25 -0000 1.61
|
| 297 |
+++ openoffice.org/sw/util/makefile.mk 10 Jul 2007 13:13:05 -0000
|
| 298 |
@@ -263,6 +263,7 @@
|
| 299 |
$(SLO)$/instable.obj \
|
| 300 |
$(SLO)$/insrule.obj \
|
| 301 |
$(SLO)$/javaedit.obj \
|
| 302 |
+ $(SLO)$/titlepage.obj \
|
| 303 |
$(SLO)$/linenum.obj \
|
| 304 |
$(SLO)$/mailmrge.obj \
|
| 305 |
$(SLO)$/multmrk.obj \
|
| 306 |
diff -ru openoffice.org/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu openoffice.org/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
|
| 307 |
--- openoffice.org.orig/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu 2007-07-10 14:35:38.000000000 +0100
|
| 308 |
+++ openoffice.org/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu 2007-07-09 12:03:44.000000000 +0100
|
| 309 |
@@ -802,6 +802,11 @@
|
| 310 |
<value xml:lang="en-US">~Page...</value>
|
| 311 |
</prop>
|
| 312 |
</node>
|
| 313 |
+ <node oor:name=".uno:TitlePageDialog" oor:op="replace">
|
| 314 |
+ <prop oor:name="Label" oor:type="xs:string">
|
| 315 |
+ <value xml:lang="en-US">Title Page...</value>
|
| 316 |
+ </prop>
|
| 317 |
+ </node>
|
| 318 |
<node oor:name=".uno:FormatColumns" oor:op="replace">
|
| 319 |
<prop oor:name="Label" oor:type="xs:string">
|
| 320 |
<value xml:lang="en-US">Co~lumns...</value>
|
| 321 |
--- /dev/null 2008-10-28 16:28:18.200260089 +0000
|
| 322 |
+++ openoffice.org.orig/sw/source/ui/inc/titlepage.hxx 2008-11-13 12:48:59.000000000 +0000
|
| 323 |
@@ -0,0 +1,129 @@
|
| 324 |
+/*************************************************************************
|
| 325 |
+ *
|
| 326 |
+ * OpenOffice.org - a multi-platform office productivity suite
|
| 327 |
+ *
|
| 328 |
+ * $RCSfile$
|
| 329 |
+ *
|
| 330 |
+ * $Revision$
|
| 331 |
+ *
|
| 332 |
+ * last change: $Author$ $Date$
|
| 333 |
+ *
|
| 334 |
+ * The Contents of this file are made available subject to
|
| 335 |
+ * the terms of GNU Lesser General Public License Version 2.1.
|
| 336 |
+ *
|
| 337 |
+ *
|
| 338 |
+ * GNU Lesser General Public License Version 2.1
|
| 339 |
+ * =============================================
|
| 340 |
+ * Copyright 2005 by Sun Microsystems, Inc.
|
| 341 |
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
|
| 342 |
+ *
|
| 343 |
+ * This library is free software; you can redistribute it and/or
|
| 344 |
+ * modify it under the terms of the GNU Lesser General Public
|
| 345 |
+ * License version 2.1, as published by the Free Software Foundation.
|
| 346 |
+ *
|
| 347 |
+ * This library is distributed in the hope that it will be useful,
|
| 348 |
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 349 |
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
| 350 |
+ * Lesser General Public License for more details.
|
| 351 |
+ *
|
| 352 |
+ * You should have received a copy of the GNU Lesser General Public
|
| 353 |
+ * License along with this library; if not, write to the Free Software
|
| 354 |
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
| 355 |
+ * MA 02111-1307 USA
|
| 356 |
+ *
|
| 357 |
+ ************************************************************************/
|
| 358 |
+#ifndef _SWTITLEPAGE_HXX
|
| 359 |
+#define _SWTITLEPAGE_HXX
|
| 360 |
+
|
| 361 |
+#ifndef _BASEDLGS_HXX //autogen
|
| 362 |
+#include <sfx2/basedlgs.hxx>
|
| 363 |
+#endif
|
| 364 |
+
|
| 365 |
+#ifndef _SFXTABDLG_HXX //autogen
|
| 366 |
+#include <sfx2/tabdlg.hxx>
|
| 367 |
+#endif
|
| 368 |
+
|
| 369 |
+#ifndef _SV_FIXED_HXX //autogen
|
| 370 |
+#include <vcl/fixed.hxx>
|
| 371 |
+#endif
|
| 372 |
+
|
| 373 |
+#ifndef _SV_FIELD_HXX //autogen
|
| 374 |
+#include <vcl/field.hxx>
|
| 375 |
+#endif
|
| 376 |
+#ifndef _NUMBERINGTYPELISTBOX_HXX
|
| 377 |
+#include <numberingtypelistbox.hxx>
|
| 378 |
+#endif
|
| 379 |
+
|
| 380 |
+#ifndef _LSTBOX_HXX //autogen
|
| 381 |
+#include <vcl/lstbox.hxx>
|
| 382 |
+#endif
|
| 383 |
+
|
| 384 |
+class Window;
|
| 385 |
+class SfxItemSet;
|
| 386 |
+class SwView;
|
| 387 |
+class SwWrtShell;
|
| 388 |
+class SwPageDesc;
|
| 389 |
+
|
| 390 |
+/*--------------------------------------------------------------------
|
| 391 |
+ Beschreibung: SingleTabDialog
|
| 392 |
+ --------------------------------------------------------------------*/
|
| 393 |
+
|
| 394 |
+class SwTitlePageDlg : public SfxModalDialog
|
| 395 |
+{
|
| 396 |
+private:
|
| 397 |
+ FixedLine aMakeInsertFL;
|
| 398 |
+ RadioButton aUseExistingPagesRB;
|
| 399 |
+ RadioButton aInsertNewPagesRB;
|
| 400 |
+ FixedText aPageCountFT;
|
| 401 |
+ NumericField aPageCountNF;
|
| 402 |
+ FixedText aPagePagesFT;
|
| 403 |
+
|
| 404 |
+ FixedText aPageStartFT;
|
| 405 |
+ RadioButton aDocumentStartRB;
|
| 406 |
+ RadioButton aPageStartRB;
|
| 407 |
+ NumericField aPageStartNF;
|
| 408 |
+
|
| 409 |
+ FixedLine aNumberingFL;
|
| 410 |
+ CheckBox aRestartNumberingCB;
|
| 411 |
+ FixedText aRestartNumberingFT;
|
| 412 |
+ NumericField aRestartNumberingNF;
|
| 413 |
+ CheckBox aSetPageNumberCB;
|
| 414 |
+ FixedText aSetPageNumberFT;
|
| 415 |
+ NumericField aSetPageNumberNF;
|
| 416 |
+
|
| 417 |
+ FixedLine aPagePropertiesFL;
|
| 418 |
+ ListBox aPagePropertiesLB;
|
| 419 |
+ PushButton aPagePropertiesPB;
|
| 420 |
+
|
| 421 |
+ FixedLine aBottomFL;
|
| 422 |
+ OKButton aOkPB;
|
| 423 |
+ CancelButton aCancelPB;
|
| 424 |
+ HelpButton aHelpPB;
|
| 425 |
+
|
| 426 |
+ SwWrtShell *mpSh;
|
| 427 |
+
|
| 428 |
+ const SwFmtPageDesc *mpPageFmtDesc;
|
| 429 |
+
|
| 430 |
+ SwPageDesc *mpTitleDesc;
|
| 431 |
+ const SwPageDesc *mpIndexDesc;
|
| 432 |
+ const SwPageDesc *mpNormalDesc;
|
| 433 |
+
|
| 434 |
+ void FillList();
|
| 435 |
+
|
| 436 |
+ USHORT GetInsertPosition() const;
|
| 437 |
+
|
| 438 |
+ DECL_LINK( OKHdl, Button * );
|
| 439 |
+ DECL_LINK( EditHdl, Button * );
|
| 440 |
+ DECL_LINK( RestartNumberingHdl, CheckBox* );
|
| 441 |
+ DECL_LINK( SetPageNumberHdl, CheckBox* );
|
| 442 |
+ DECL_LINK( UpHdl, NumericField * );
|
| 443 |
+ DECL_LINK( DownHdl, NumericField * );
|
| 444 |
+ DECL_LINK( StartPageHdl, RadioButton * );
|
| 445 |
+public:
|
| 446 |
+ SwTitlePageDlg( Window *pParent );
|
| 447 |
+ ~SwTitlePageDlg();
|
| 448 |
+};
|
| 449 |
+
|
| 450 |
+#endif
|
| 451 |
+
|
| 452 |
+/* vi:set tabstop=4 shiftwidth=4 expandtab: */
|
| 453 |
--- /dev/null 2008-10-28 16:28:18.200260089 +0000
|
| 454 |
+++ openoffice.org/sw/source/ui/misc/titlepage.src 2008-11-13 12:03:28.000000000 +0000
|
| 455 |
@@ -0,0 +1,260 @@
|
| 456 |
+/*************************************************************************
|
| 457 |
+ *
|
| 458 |
+ * OpenOffice.org - a multi-platform office productivity suite
|
| 459 |
+ *
|
| 460 |
+ * $RCSfile$
|
| 461 |
+ *
|
| 462 |
+ * $Revision$
|
| 463 |
+ *
|
| 464 |
+ * last change: $Author$ $Date$
|
| 465 |
+ *
|
| 466 |
+ * The Contents of this file are made available subject to
|
| 467 |
+ * the terms of GNU Lesser General Public License Version 2.1.
|
| 468 |
+ *
|
| 469 |
+ *
|
| 470 |
+ * GNU Lesser General Public License Version 2.1
|
| 471 |
+ * =============================================
|
| 472 |
+ * Copyright 2005 by Sun Microsystems, Inc.
|
| 473 |
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
|
| 474 |
+ *
|
| 475 |
+ * This library is free software; you can redistribute it and/or
|
| 476 |
+ * modify it under the terms of the GNU Lesser General Public
|
| 477 |
+ * License version 2.1, as published by the Free Software Foundation.
|
| 478 |
+ *
|
| 479 |
+ * This library is distributed in the hope that it will be useful,
|
| 480 |
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 481 |
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
| 482 |
+ * Lesser General Public License for more details.
|
| 483 |
+ *
|
| 484 |
+ * You should have received a copy of the GNU Lesser General Public
|
| 485 |
+ * License along with this library; if not, write to the Free Software
|
| 486 |
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
| 487 |
+ * MA 02111-1307 USA
|
| 488 |
+ *
|
| 489 |
+ ************************************************************************/
|
| 490 |
+/* StarView ressource file */
|
| 491 |
+
|
| 492 |
+#ifndef _SFX_HRC
|
| 493 |
+#include <sfx2/sfx.hrc>
|
| 494 |
+#endif
|
| 495 |
+#ifndef _SVX_DIALOGS_HRC
|
| 496 |
+#include <svx/dialogs.hrc>
|
| 497 |
+#endif
|
| 498 |
+#include "globals.hrc"
|
| 499 |
+#include "misc.hrc"
|
| 500 |
+#include "titlepage.hrc"
|
| 501 |
+#include "helpid.h"
|
| 502 |
+/**************************************************************************/
|
| 503 |
+/* */
|
| 504 |
+/**************************************************************************/
|
| 505 |
+ModalDialog DLG_TITLEPAGE
|
| 506 |
+{
|
| 507 |
+ HelpID = HID_TITLEPAGE ;
|
| 508 |
+ OutputSize = TRUE ;
|
| 509 |
+ SVLook = TRUE ;
|
| 510 |
+ Size = MAP_APPFONT ( 216 , 201 ) ;
|
| 511 |
+ Text [ en-US ] = "Title Pages" ;
|
| 512 |
+ Moveable = TRUE ;
|
| 513 |
+
|
| 514 |
+ FixedLine FL_MAKEINSERT
|
| 515 |
+ {
|
| 516 |
+ Pos = MAP_APPFONT ( 6 , 5 ) ;
|
| 517 |
+ Size = MAP_APPFONT ( 204 , 8 ) ;
|
| 518 |
+ Text [ en-US ] = "Make Title Pages" ;
|
| 519 |
+ Text [ x-comment ] = " ";
|
| 520 |
+ };
|
| 521 |
+ RadioButton RB_USE_EXISTING_PAGES
|
| 522 |
+ {
|
| 523 |
+ Pos = MAP_APPFONT ( 12 , 18 ) ;
|
| 524 |
+ Size = MAP_APPFONT ( 150 , 10 ) ;
|
| 525 |
+ Text [ en-US ] = "Convert existing pages to title pages" ;
|
| 526 |
+ TabStop = TRUE ;
|
| 527 |
+ Check = TRUE ;
|
| 528 |
+ Text [ x-comment ] = " ";
|
| 529 |
+ };
|
| 530 |
+ RadioButton RB_INSERT_NEW_PAGES
|
| 531 |
+ {
|
| 532 |
+ Pos = MAP_APPFONT ( 12 , 34 ) ;
|
| 533 |
+ Size = MAP_APPFONT ( 150 , 10 ) ;
|
| 534 |
+ Text [ en-US ] = "Insert new title pages" ;
|
| 535 |
+ Text [ x-comment ] = " ";
|
| 536 |
+ };
|
| 537 |
+ FixedText FT_PAGE_COUNT
|
| 538 |
+ {
|
| 539 |
+ Pos = MAP_APPFONT ( 12 , 50 ) ;
|
| 540 |
+ Size = MAP_APPFONT ( 80 , 8 ) ;
|
| 541 |
+ Text [ en-US ] = "Number of title pages" ;
|
| 542 |
+ Text [ x-comment ] = " ";
|
| 543 |
+ };
|
| 544 |
+ NumericField NF_PAGE_COUNT
|
| 545 |
+ {
|
| 546 |
+ Pos = MAP_APPFONT ( 80 , 50 ) ;
|
| 547 |
+ Size = MAP_APPFONT ( 30 , 12 ) ;
|
| 548 |
+ Border = TRUE ;
|
| 549 |
+ TabStop = TRUE ;
|
| 550 |
+ Left = TRUE ;
|
| 551 |
+ Repeat = TRUE ;
|
| 552 |
+ Spin = TRUE ;
|
| 553 |
+ Minimum = 1 ;
|
| 554 |
+ Maximum = 65535;
|
| 555 |
+ First = 1 ;
|
| 556 |
+ Last = 65535;
|
| 557 |
+ SpinSize = 1 ;
|
| 558 |
+ };
|
| 559 |
+ FixedText FT_PAGE_PAGES
|
| 560 |
+ {
|
| 561 |
+ Pos = MAP_APPFONT ( 116 , 50 ) ;
|
| 562 |
+ Size = MAP_APPFONT ( 80 , 10 ) ;
|
| 563 |
+ Text [ en-US ] = "pages" ;
|
| 564 |
+ Text [ x-comment ] = " ";
|
| 565 |
+ };
|
| 566 |
+ FixedText FT_PAGE_START
|
| 567 |
+ {
|
| 568 |
+ Pos = MAP_APPFONT ( 12 , 66 ) ;
|
| 569 |
+ Size = MAP_APPFONT ( 58 , 8 ) ;
|
| 570 |
+ Text [ en-US ] = "Place title pages at" ;
|
| 571 |
+ Text [ x-comment ] = " ";
|
| 572 |
+ };
|
| 573 |
+ RadioButton RB_DOCUMENT_START
|
| 574 |
+ {
|
| 575 |
+ Pos = MAP_APPFONT ( 70 , 66 ) ;
|
| 576 |
+ Size = MAP_APPFONT ( 80 , 10 ) ;
|
| 577 |
+ Text [ en-US ] = "Document Start" ;
|
| 578 |
+ TabStop = TRUE ;
|
| 579 |
+ Check = TRUE ;
|
| 580 |
+ Text [ x-comment ] = " ";
|
| 581 |
+ };
|
| 582 |
+ RadioButton RB_PAGE_START
|
| 583 |
+ {
|
| 584 |
+ Pos = MAP_APPFONT ( 70 , 78 ) ;
|
| 585 |
+ Size = MAP_APPFONT ( 30 , 10 ) ;
|
| 586 |
+ Text [ en-US ] = "Page" ;
|
| 587 |
+ Text [ x-comment ] = " ";
|
| 588 |
+ };
|
| 589 |
+ NumericField NF_PAGE_START
|
| 590 |
+ {
|
| 591 |
+ Pos = MAP_APPFONT ( 95 , 78 ) ;
|
| 592 |
+ Size = MAP_APPFONT ( 30 , 12 ) ;
|
| 593 |
+ Border = TRUE ;
|
| 594 |
+ TabStop = TRUE ;
|
| 595 |
+ Left = TRUE ;
|
| 596 |
+ Repeat = TRUE ;
|
| 597 |
+ Spin = TRUE ;
|
| 598 |
+ Minimum = 1 ;
|
| 599 |
+ Maximum = 65535;
|
| 600 |
+ First = 1 ;
|
| 601 |
+ Last = 65535;
|
| 602 |
+ SpinSize = 1 ;
|
| 603 |
+ };
|
| 604 |
+ FixedLine FL_NUMBERING
|
| 605 |
+ {
|
| 606 |
+ Pos = MAP_APPFONT ( 6 , 98 ) ;
|
| 607 |
+ Size = MAP_APPFONT ( 204 , 8 ) ;
|
| 608 |
+ Text [ en-US ] = "Page Numbering" ;
|
| 609 |
+ Text [ x-comment ] = " ";
|
| 610 |
+ };
|
| 611 |
+ CheckBox CB_RESTART_NUMBERING
|
| 612 |
+ {
|
| 613 |
+ Pos = MAP_APPFONT ( 12, 111 ) ;
|
| 614 |
+ Size = MAP_APPFONT ( 150 , 10 ) ;
|
| 615 |
+ TabStop = TRUE ;
|
| 616 |
+ Text [ en-US ] = "Reset Page Numbering after title pages" ;
|
| 617 |
+ Text [ x-comment ] = " ";
|
| 618 |
+ };
|
| 619 |
+ FixedText FT_RESTART_NUMBERING
|
| 620 |
+ {
|
| 621 |
+ Pos = MAP_APPFONT ( 140 , 111 ) ;
|
| 622 |
+ Size = MAP_APPFONT ( 50 , 10 ) ;
|
| 623 |
+ Text [ en-US ] = "Page Number" ;
|
| 624 |
+ Text [ x-comment ] = " ";
|
| 625 |
+ };
|
| 626 |
+ NumericField NF_RESTART_NUMBERING
|
| 627 |
+ {
|
| 628 |
+ Pos = MAP_APPFONT ( 180 , 111 ) ;
|
| 629 |
+ Size = MAP_APPFONT ( 30 , 12 ) ;
|
| 630 |
+ Border = TRUE ;
|
| 631 |
+ TabStop = TRUE ;
|
| 632 |
+ Left = TRUE ;
|
| 633 |
+ Repeat = TRUE ;
|
| 634 |
+ Spin = TRUE ;
|
| 635 |
+ Minimum = 1 ;
|
| 636 |
+ Maximum = 65535;
|
| 637 |
+ First = 1 ;
|
| 638 |
+ Last = 65535;
|
| 639 |
+ SpinSize = 1 ;
|
| 640 |
+ };
|
| 641 |
+ CheckBox CB_SET_PAGE_NUMBER
|
| 642 |
+ {
|
| 643 |
+ Pos = MAP_APPFONT ( 12 , 125 ) ;
|
| 644 |
+ Size = MAP_APPFONT ( 150 , 10 ) ;
|
| 645 |
+ TabStop = TRUE ;
|
| 646 |
+ Text [ en-US ] = "Set Page Number for first title page" ;
|
| 647 |
+ Text [ x-comment ] = " ";
|
| 648 |
+ };
|
| 649 |
+ FixedText FT_SET_PAGE_NUMBER
|
| 650 |
+ {
|
| 651 |
+ Pos = MAP_APPFONT ( 140 , 125 ) ;
|
| 652 |
+ Size = MAP_APPFONT ( 50 , 10 ) ;
|
| 653 |
+ Text [ en-US ] = "Page Number" ;
|
| 654 |
+ Text [ x-comment ] = " ";
|
| 655 |
+ };
|
| 656 |
+ NumericField NF_SET_PAGE_NUMBER
|
| 657 |
+ {
|
| 658 |
+ Pos = MAP_APPFONT ( 180 , 125 ) ;
|
| 659 |
+ Size = MAP_APPFONT ( 30 , 12 ) ;
|
| 660 |
+ Border = TRUE ;
|
| 661 |
+ TabStop = TRUE ;
|
| 662 |
+ Left = TRUE ;
|
| 663 |
+ Repeat = TRUE ;
|
| 664 |
+ Spin = TRUE ;
|
| 665 |
+ Minimum = 1 ;
|
| 666 |
+ Maximum = 65535;
|
| 667 |
+ First = 1 ;
|
| 668 |
+ Last = 65535;
|
| 669 |
+ SpinSize = 1 ;
|
| 670 |
+ };
|
| 671 |
+ FixedLine FL_PAGE_PROPERTIES
|
| 672 |
+ {
|
| 673 |
+ Pos = MAP_APPFONT ( 6 , 141 ) ;
|
| 674 |
+ Size = MAP_APPFONT ( 204 , 8 ) ;
|
| 675 |
+ Text [ en-US ] = "Edit Page Properties" ;
|
| 676 |
+ Text [ x-comment ] = " ";
|
| 677 |
+ };
|
| 678 |
+ ListBox LB_PAGE_PROPERTIES
|
| 679 |
+ {
|
| 680 |
+ Border = TRUE ;
|
| 681 |
+ Pos = MAP_APPFONT ( 12 , 154 ) ;
|
| 682 |
+ Size = MAP_APPFONT ( 150 , 80 ) ;
|
| 683 |
+ TabStop = TRUE ;
|
| 684 |
+ DropDown = TRUE ;
|
| 685 |
+ CurPos = 0 ;
|
| 686 |
+ };
|
| 687 |
+ PushButton PB_PAGE_PROPERTIES
|
| 688 |
+ {
|
| 689 |
+ Pos = MAP_APPFONT ( 170 , 154 ) ;
|
| 690 |
+ Size = MAP_APPFONT ( 30 , 12 ) ;
|
| 691 |
+ Text [ en-US ] = "Edit..." ;
|
| 692 |
+ };
|
| 693 |
+ FixedLine FL_BOTTOM
|
| 694 |
+ {
|
| 695 |
+ Pos = MAP_APPFONT ( 6 , 170 ) ;
|
| 696 |
+ Size = MAP_APPFONT ( 204 , 8 ) ;
|
| 697 |
+ };
|
| 698 |
+ OKButton PB_OK
|
| 699 |
+ {
|
| 700 |
+ Pos = MAP_APPFONT ( 54 , 181 ) ;
|
| 701 |
+ Size = MAP_APPFONT ( 50 , 14 ) ;
|
| 702 |
+ DefButton = TRUE ;
|
| 703 |
+ };
|
| 704 |
+ CancelButton PB_CANCEL
|
| 705 |
+ {
|
| 706 |
+ Pos = MAP_APPFONT ( 107 , 181 ) ;
|
| 707 |
+ Size = MAP_APPFONT ( 50 , 14 ) ;
|
| 708 |
+ DefButton = TRUE ;
|
| 709 |
+ };
|
| 710 |
+ HelpButton PB_HELP
|
| 711 |
+ {
|
| 712 |
+ Pos = MAP_APPFONT ( 160 , 181 ) ;
|
| 713 |
+ Size = MAP_APPFONT ( 50 , 14 ) ;
|
| 714 |
+ };
|
| 715 |
+};
|
| 716 |
--- /dev/null 2008-10-28 16:28:18.200260089 +0000
|
| 717 |
+++ openoffice.org/sw/source/ui/misc/titlepage.cxx 2008-11-13 12:58:11.000000000 +0000
|
| 718 |
@@ -0,0 +1,401 @@
|
| 719 |
+/*************************************************************************
|
| 720 |
+ *
|
| 721 |
+ * OpenOffice.org - a multi-platform office productivity suite
|
| 722 |
+ *
|
| 723 |
+ * $RCSfile$
|
| 724 |
+ *
|
| 725 |
+ * $Revision$
|
| 726 |
+ *
|
| 727 |
+ * last change: $Author$ $Date$
|
| 728 |
+ *
|
| 729 |
+ * The Contents of this file are made available subject to
|
| 730 |
+ * the terms of GNU Lesser General Public License Version 2.1.
|
| 731 |
+ *
|
| 732 |
+ *
|
| 733 |
+ * GNU Lesser General Public License Version 2.1
|
| 734 |
+ * =============================================
|
| 735 |
+ * Copyright 2005 by Sun Microsystems, Inc.
|
| 736 |
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
|
| 737 |
+ *
|
| 738 |
+ * This library is free software; you can redistribute it and/or
|
| 739 |
+ * modify it under the terms of the GNU Lesser General Public
|
| 740 |
+ * License version 2.1, as published by the Free Software Foundation.
|
| 741 |
+ *
|
| 742 |
+ * This library is distributed in the hope that it will be useful,
|
| 743 |
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 744 |
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
| 745 |
+ * Lesser General Public License for more details.
|
| 746 |
+ *
|
| 747 |
+ * You should have received a copy of the GNU Lesser General Public
|
| 748 |
+ * License along with this library; if not, write to the Free Software
|
| 749 |
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
| 750 |
+ * MA 02111-1307 USA
|
| 751 |
+ *
|
| 752 |
+ ************************************************************************/
|
| 753 |
+
|
| 754 |
+// MARKER(update_precomp.py): autogen include statement, do not remove
|
| 755 |
+#include "precompiled_sw.hxx"
|
| 756 |
+
|
| 757 |
+#ifdef SW_DLLIMPLEMENTATION
|
| 758 |
+#undef SW_DLLIMPLEMENTATION
|
| 759 |
+#endif
|
| 760 |
+
|
| 761 |
+#ifndef _SFXVIEWFRM_HXX //autogen
|
| 762 |
+#include <sfx2/viewfrm.hxx>
|
| 763 |
+#endif
|
| 764 |
+
|
| 765 |
+#ifndef _SFXSTYLE_HXX //autogen
|
| 766 |
+#include <svtools/style.hxx>
|
| 767 |
+#endif
|
| 768 |
+
|
| 769 |
+#ifndef _SV_MSGBOX_HXX //autogen
|
| 770 |
+#include <vcl/msgbox.hxx>
|
| 771 |
+#endif
|
| 772 |
+
|
| 773 |
+#ifndef _SWVIEW_HXX //autogen
|
| 774 |
+#include <view.hxx>
|
| 775 |
+#endif
|
| 776 |
+#ifndef _SWMODULE_HXX
|
| 777 |
+#include <swmodule.hxx>
|
| 778 |
+#endif
|
| 779 |
+#ifndef _WRTSH_HXX //autogen
|
| 780 |
+#include <wrtsh.hxx>
|
| 781 |
+#endif
|
| 782 |
+#ifndef _POOLFMT_HXX
|
| 783 |
+#include <poolfmt.hxx>
|
| 784 |
+#endif
|
| 785 |
+#ifndef _SWDOCSH_HXX //autogen
|
| 786 |
+#include <docsh.hxx>
|
| 787 |
+#endif
|
| 788 |
+
|
| 789 |
+#ifndef _CHARFMT_HXX //autogen
|
| 790 |
+#include <charfmt.hxx>
|
| 791 |
+#endif
|
| 792 |
+
|
| 793 |
+#ifndef _DOCSTYLE_HXX //autogen
|
| 794 |
+#include <docstyle.hxx>
|
| 795 |
+#endif
|
| 796 |
+
|
| 797 |
+#include "fldbas.hxx"
|
| 798 |
+#include "lineinfo.hxx"
|
| 799 |
+#include "globals.hrc"
|
| 800 |
+#include "titlepage.hrc"
|
| 801 |
+#include "titlepage.hxx"
|
| 802 |
+#include "uitool.hxx"
|
| 803 |
+#include "fmtpdsc.hxx"
|
| 804 |
+#include "pagedesc.hxx"
|
| 805 |
+
|
| 806 |
+#include <IDocumentStylePoolAccess.hxx>
|
| 807 |
+
|
| 808 |
+namespace
|
| 809 |
+{
|
| 810 |
+ bool lcl_GetPageDesc(SwWrtShell *pSh, USHORT &rPageNo, const SwFmtPageDesc **ppPageFmtDesc)
|
| 811 |
+ {
|
| 812 |
+ bool bRet = false;
|
| 813 |
+ SfxItemSet aSet( pSh->GetAttrPool(), RES_PAGEDESC, RES_PAGEDESC );
|
| 814 |
+ if (pSh->GetCurAttr( aSet ))
|
| 815 |
+ {
|
| 816 |
+ const SfxPoolItem* pItem(0);
|
| 817 |
+ if (SFX_ITEM_SET == aSet.GetItemState( RES_PAGEDESC, TRUE, &pItem ) && pItem)
|
| 818 |
+ {
|
| 819 |
+ rPageNo = ((const SwFmtPageDesc *)pItem)->GetNumOffset();
|
| 820 |
+ if (ppPageFmtDesc)
|
| 821 |
+ (*ppPageFmtDesc) = (const SwFmtPageDesc *)(pItem->Clone());
|
| 822 |
+ bRet = true;
|
| 823 |
+ }
|
| 824 |
+ }
|
| 825 |
+ return bRet;
|
| 826 |
+ }
|
| 827 |
+
|
| 828 |
+ bool lcl_SkipNPages(SwWrtShell *pSh, USHORT nNoPages)
|
| 829 |
+ {
|
| 830 |
+ bool bAllOk = true;
|
| 831 |
+ for (USHORT nI = 0; nI < nNoPages && bAllOk; ++nI)
|
| 832 |
+ bAllOk = pSh->SttNxtPg();
|
| 833 |
+ return bAllOk;
|
| 834 |
+ }
|
| 835 |
+
|
| 836 |
+ void lcl_ChangePage(SwWrtShell *pSh, USHORT nNewNumber,
|
| 837 |
+ const SwPageDesc *pNewDesc)
|
| 838 |
+ {
|
| 839 |
+ const USHORT nCurIdx = pSh->GetCurPageDesc();
|
| 840 |
+ const SwPageDesc &rCurrentDesc = pSh->GetPageDesc( nCurIdx );
|
| 841 |
+
|
| 842 |
+ const SwFmtPageDesc *pPageFmtDesc(0);
|
| 843 |
+ USHORT nDontCare;
|
| 844 |
+ lcl_GetPageDesc(pSh, nDontCare, &pPageFmtDesc);
|
| 845 |
+
|
| 846 |
+ //If we want a new number then set it, otherwise reuse the existing one
|
| 847 |
+ USHORT nPgNo = nNewNumber ?
|
| 848 |
+ nNewNumber : ( pPageFmtDesc ? pPageFmtDesc->GetNumOffset() : 0 );
|
| 849 |
+
|
| 850 |
+ //If we want a new descriptior then set it, otherwise reuse the existing one
|
| 851 |
+ if (!pNewDesc)
|
| 852 |
+ {
|
| 853 |
+ SwFmtPageDesc aPageFmtDesc(pPageFmtDesc ? *pPageFmtDesc : &rCurrentDesc);
|
| 854 |
+ if (nPgNo) aPageFmtDesc.SetNumOffset(nPgNo);
|
| 855 |
+ pSh->SetAttr(aPageFmtDesc);
|
| 856 |
+ }
|
| 857 |
+ else
|
| 858 |
+ {
|
| 859 |
+ SwFmtPageDesc aPageFmtDesc(pNewDesc);
|
| 860 |
+ if (nPgNo) aPageFmtDesc.SetNumOffset(nPgNo);
|
| 861 |
+ pSh->SetAttr(aPageFmtDesc);
|
| 862 |
+ }
|
| 863 |
+
|
| 864 |
+ delete pPageFmtDesc;
|
| 865 |
+ }
|
| 866 |
+
|
| 867 |
+ void lcl_PushCursor(SwWrtShell *pSh)
|
| 868 |
+ {
|
| 869 |
+ pSh->LockView( TRUE );
|
| 870 |
+ pSh->StartAllAction();
|
| 871 |
+ pSh->SwCrsrShell::Push();
|
| 872 |
+ }
|
| 873 |
+
|
| 874 |
+ void lcl_PopCursor(SwWrtShell *pSh)
|
| 875 |
+ {
|
| 876 |
+ pSh->SwCrsrShell::Pop( FALSE );
|
| 877 |
+ pSh->EndAllAction();
|
| 878 |
+ pSh->LockView( FALSE );
|
| 879 |
+ }
|
| 880 |
+
|
| 881 |
+ USHORT lcl_GetCurrentPage(SwWrtShell *pSh)
|
| 882 |
+ {
|
| 883 |
+ String sDummy;
|
| 884 |
+ USHORT nPhyNum=1, nVirtNum=1;
|
| 885 |
+ pSh->GetPageNumber(0, true, nPhyNum, nVirtNum, sDummy);
|
| 886 |
+ return nPhyNum;
|
| 887 |
+ }
|
| 888 |
+}
|
| 889 |
+
|
| 890 |
+/*
|
| 891 |
+ * Only include the Index page in the list if the page count implies one
|
| 892 |
+ * to reduce confusing things
|
| 893 |
+ */
|
| 894 |
+void SwTitlePageDlg::FillList()
|
| 895 |
+{
|
| 896 |
+ USHORT nTitlePages = aPageCountNF.GetValue();
|
| 897 |
+ aPagePropertiesLB.Clear();
|
| 898 |
+ if (mpTitleDesc)
|
| 899 |
+ aPagePropertiesLB.InsertEntry(mpTitleDesc->GetName());
|
| 900 |
+ if (nTitlePages > 1 && mpIndexDesc)
|
| 901 |
+ aPagePropertiesLB.InsertEntry(mpIndexDesc->GetName());
|
| 902 |
+ if (mpNormalDesc)
|
| 903 |
+ aPagePropertiesLB.InsertEntry(mpNormalDesc->GetName());
|
| 904 |
+ aPagePropertiesLB.SelectEntryPos(0);
|
| 905 |
+}
|
| 906 |
+
|
| 907 |
+/*--------------------------------------------------------------------
|
| 908 |
+ Beschreibung:
|
| 909 |
+ --------------------------------------------------------------------*/
|
| 910 |
+
|
| 911 |
+USHORT SwTitlePageDlg::GetInsertPosition() const
|
| 912 |
+{
|
| 913 |
+ USHORT nPage = 1;
|
| 914 |
+ if (aPageStartNF.IsEnabled())
|
| 915 |
+ nPage = aPageStartNF.GetValue();
|
| 916 |
+ return nPage;
|
| 917 |
+}
|
| 918 |
+
|
| 919 |
+SwTitlePageDlg::SwTitlePageDlg( Window *pParent ) :
|
| 920 |
+ SfxModalDialog( pParent, SW_RES(DLG_TITLEPAGE) ),
|
| 921 |
+#pragma warning (disable : 4355)
|
| 922 |
+ aMakeInsertFL ( this, SW_RES( FL_MAKEINSERT )),
|
| 923 |
+ aUseExistingPagesRB ( this, SW_RES( RB_USE_EXISTING_PAGES )),
|
| 924 |
+ aInsertNewPagesRB ( this, SW_RES( RB_INSERT_NEW_PAGES )),
|
| 925 |
+ aPageCountFT ( this, SW_RES( FT_PAGE_COUNT )),
|
| 926 |
+ aPageCountNF ( this, SW_RES( NF_PAGE_COUNT )),
|
| 927 |
+ aPagePagesFT ( this, SW_RES( FT_PAGE_PAGES )),
|
| 928 |
+ aPageStartFT ( this, SW_RES( FT_PAGE_START )),
|
| 929 |
+ aDocumentStartRB ( this, SW_RES( RB_DOCUMENT_START )),
|
| 930 |
+ aPageStartRB ( this, SW_RES( RB_PAGE_START )),
|
| 931 |
+ aPageStartNF ( this, SW_RES( NF_PAGE_START )),
|
| 932 |
+ aNumberingFL ( this, SW_RES( FL_NUMBERING )),
|
| 933 |
+ aRestartNumberingCB ( this, SW_RES( CB_RESTART_NUMBERING )),
|
| 934 |
+ aRestartNumberingFT ( this, SW_RES( FT_RESTART_NUMBERING )),
|
| 935 |
+ aRestartNumberingNF ( this, SW_RES( NF_RESTART_NUMBERING )),
|
| 936 |
+ aSetPageNumberCB ( this, SW_RES( CB_SET_PAGE_NUMBER )),
|
| 937 |
+ aSetPageNumberFT ( this, SW_RES( FT_SET_PAGE_NUMBER )),
|
| 938 |
+ aSetPageNumberNF ( this, SW_RES( NF_SET_PAGE_NUMBER )),
|
| 939 |
+ aPagePropertiesFL ( this, SW_RES( FL_PAGE_PROPERTIES )),
|
| 940 |
+ aPagePropertiesLB ( this, SW_RES( LB_PAGE_PROPERTIES )),
|
| 941 |
+ aPagePropertiesPB ( this, SW_RES( PB_PAGE_PROPERTIES )),
|
| 942 |
+ aBottomFL ( this, SW_RES( FL_BOTTOM )),
|
| 943 |
+ aOkPB ( this, SW_RES( PB_OK )),
|
| 944 |
+ aCancelPB ( this, SW_RES( PB_CANCEL )),
|
| 945 |
+ aHelpPB ( this, SW_RES( PB_HELP )),
|
| 946 |
+ mpPageFmtDesc (0)
|
| 947 |
+#pragma warning (default : 4355)
|
| 948 |
+{
|
| 949 |
+ FreeResource();
|
| 950 |
+
|
| 951 |
+ aOkPB.SetClickHdl(LINK(this, SwTitlePageDlg, OKHdl));
|
| 952 |
+ aRestartNumberingCB.SetClickHdl(LINK(this, SwTitlePageDlg, RestartNumberingHdl));
|
| 953 |
+ aSetPageNumberCB.SetClickHdl(LINK(this, SwTitlePageDlg, SetPageNumberHdl));
|
| 954 |
+
|
| 955 |
+ USHORT nSetPage = 1;
|
| 956 |
+ USHORT nResetPage = 1;
|
| 957 |
+ USHORT nTitlePages = 1;
|
| 958 |
+ mpSh = ::GetActiveView()->GetWrtShellPtr();
|
| 959 |
+ lcl_PushCursor(mpSh);
|
| 960 |
+
|
| 961 |
+ SwView& rView = mpSh->GetView();
|
| 962 |
+ rView.InvalidateRulerPos();
|
| 963 |
+
|
| 964 |
+ bool bMaybeResetNumbering = false;
|
| 965 |
+
|
| 966 |
+ mpTitleDesc = mpSh->GetPageDescFromPool(RES_POOLPAGE_FIRST);
|
| 967 |
+ mpIndexDesc = mpSh->GetPageDescFromPool(RES_POOLPAGE_REGISTER);
|
| 968 |
+ mpNormalDesc = mpSh->GetPageDescFromPool(RES_POOLPAGE_STANDARD);
|
| 969 |
+
|
| 970 |
+ mpSh->SttDoc();
|
| 971 |
+ if (lcl_GetPageDesc( mpSh, nSetPage, &mpPageFmtDesc ))
|
| 972 |
+ {
|
| 973 |
+ if (mpPageFmtDesc->GetPageDesc() == mpTitleDesc)
|
| 974 |
+ {
|
| 975 |
+ while (mpSh->SttNxtPg())
|
| 976 |
+ {
|
| 977 |
+ const USHORT nCurIdx = mpSh->GetCurPageDesc();
|
| 978 |
+ const SwPageDesc &rPageDesc = mpSh->GetPageDesc( nCurIdx );
|
| 979 |
+
|
| 980 |
+ if (mpIndexDesc != &rPageDesc)
|
| 981 |
+ {
|
| 982 |
+ mpNormalDesc = &rPageDesc;
|
| 983 |
+ bMaybeResetNumbering = lcl_GetPageDesc(mpSh, nResetPage, NULL);
|
| 984 |
+ break;
|
| 985 |
+ }
|
| 986 |
+ ++nTitlePages;
|
| 987 |
+ }
|
| 988 |
+ }
|
| 989 |
+ }
|
| 990 |
+ lcl_PopCursor(mpSh);
|
| 991 |
+
|
| 992 |
+ aUseExistingPagesRB.Check();
|
| 993 |
+ aPageCountNF.SetValue(nTitlePages);
|
| 994 |
+ aPageCountNF.SetUpHdl(LINK(this, SwTitlePageDlg, UpHdl));
|
| 995 |
+ aPageCountNF.SetDownHdl(LINK(this, SwTitlePageDlg, DownHdl));
|
| 996 |
+
|
| 997 |
+ aDocumentStartRB.Check();
|
| 998 |
+ aPageStartNF.Enable(false);
|
| 999 |
+ aPageStartNF.SetValue(lcl_GetCurrentPage(mpSh));
|
| 1000 |
+ Link aStartPageHdl = LINK(this, SwTitlePageDlg, StartPageHdl);
|
| 1001 |
+ aDocumentStartRB.SetClickHdl(aStartPageHdl);
|
| 1002 |
+ aPageStartRB.SetClickHdl(aStartPageHdl);
|
| 1003 |
+
|
| 1004 |
+ if (bMaybeResetNumbering && nResetPage > 0)
|
| 1005 |
+ {
|
| 1006 |
+ aRestartNumberingCB.Check();
|
| 1007 |
+ aRestartNumberingNF.SetValue(nResetPage);
|
| 1008 |
+ }
|
| 1009 |
+ aRestartNumberingNF.Enable(aRestartNumberingCB.IsChecked());
|
| 1010 |
+
|
| 1011 |
+ aSetPageNumberNF.SetValue(nSetPage);
|
| 1012 |
+ if (nSetPage > 1)
|
| 1013 |
+ aSetPageNumberCB.Check();
|
| 1014 |
+ aSetPageNumberNF.Enable(aSetPageNumberCB.IsChecked());
|
| 1015 |
+
|
| 1016 |
+ FillList();
|
| 1017 |
+ aPagePropertiesPB.SetClickHdl(LINK(this, SwTitlePageDlg, EditHdl));
|
| 1018 |
+}
|
| 1019 |
+
|
| 1020 |
+IMPL_LINK(SwTitlePageDlg, UpHdl, NumericField *, EMPTYARG)
|
| 1021 |
+{
|
| 1022 |
+ if (aPageCountNF.GetValue() == 2)
|
| 1023 |
+ FillList();
|
| 1024 |
+ return 0;
|
| 1025 |
+}
|
| 1026 |
+
|
| 1027 |
+IMPL_LINK(SwTitlePageDlg, DownHdl, NumericField *, EMPTYARG)
|
| 1028 |
+{
|
| 1029 |
+ if (aPageCountNF.GetValue() == 1)
|
| 1030 |
+ FillList();
|
| 1031 |
+ return 0;
|
| 1032 |
+}
|
| 1033 |
+
|
| 1034 |
+IMPL_LINK(SwTitlePageDlg, RestartNumberingHdl, CheckBox*, EMPTYARG)
|
| 1035 |
+{
|
| 1036 |
+ aRestartNumberingNF.Enable(aRestartNumberingCB.IsChecked());
|
| 1037 |
+ return 0;
|
| 1038 |
+}
|
| 1039 |
+
|
| 1040 |
+IMPL_LINK(SwTitlePageDlg, SetPageNumberHdl, CheckBox*, EMPTYARG)
|
| 1041 |
+{
|
| 1042 |
+ aSetPageNumberNF.Enable(aSetPageNumberCB.IsChecked());
|
| 1043 |
+ return 0;
|
| 1044 |
+}
|
| 1045 |
+
|
| 1046 |
+IMPL_LINK(SwTitlePageDlg, StartPageHdl, RadioButton*, EMPTYARG)
|
| 1047 |
+{
|
| 1048 |
+ aPageStartNF.Enable(aPageStartRB.IsChecked());
|
| 1049 |
+ return 0;
|
| 1050 |
+}
|
| 1051 |
+
|
| 1052 |
+__EXPORT SwTitlePageDlg::~SwTitlePageDlg()
|
| 1053 |
+{
|
| 1054 |
+ delete mpPageFmtDesc;
|
| 1055 |
+}
|
| 1056 |
+
|
| 1057 |
+IMPL_LINK( SwTitlePageDlg, EditHdl, Button *, /*pBtn*/ )
|
| 1058 |
+{
|
| 1059 |
+ SwView& rView = mpSh->GetView();
|
| 1060 |
+ rView.GetDocShell()->FormatPage(aPagePropertiesLB.GetSelectEntry(), false, mpSh);
|
| 1061 |
+ rView.InvalidateRulerPos();
|
| 1062 |
+
|
| 1063 |
+ return 0;
|
| 1064 |
+}
|
| 1065 |
+
|
| 1066 |
+IMPL_LINK( SwTitlePageDlg, OKHdl, Button *, /*pBtn*/ )
|
| 1067 |
+{
|
| 1068 |
+ lcl_PushCursor(mpSh);
|
| 1069 |
+
|
| 1070 |
+ mpSh->StartUndo();
|
| 1071 |
+
|
| 1072 |
+ SwFmtPageDesc aTitleDesc(mpTitleDesc);
|
| 1073 |
+
|
| 1074 |
+ if (aSetPageNumberCB.IsChecked())
|
| 1075 |
+ aTitleDesc.SetNumOffset(aSetPageNumberNF.GetValue());
|
| 1076 |
+ else if (mpPageFmtDesc)
|
| 1077 |
+ aTitleDesc.SetNumOffset(mpPageFmtDesc->GetNumOffset());
|
| 1078 |
+
|
| 1079 |
+ USHORT nNoPages = aPageCountNF.GetValue();
|
| 1080 |
+ if (!aUseExistingPagesRB.IsChecked())
|
| 1081 |
+ {
|
| 1082 |
+ mpSh->GotoPage(GetInsertPosition(), false);
|
| 1083 |
+ for (USHORT nI=0; nI < nNoPages; ++nI)
|
| 1084 |
+ mpSh->InsertPageBreak();
|
| 1085 |
+ }
|
| 1086 |
+
|
| 1087 |
+ mpSh->GotoPage(GetInsertPosition(), false);
|
| 1088 |
+ for (USHORT nI=1; nI < nNoPages; ++nI)
|
| 1089 |
+ {
|
| 1090 |
+ if (mpSh->SttNxtPg())
|
| 1091 |
+ lcl_ChangePage(mpSh, 0, mpIndexDesc);
|
| 1092 |
+ }
|
| 1093 |
+
|
| 1094 |
+ mpSh->GotoPage(GetInsertPosition(), false);
|
| 1095 |
+ mpSh->SetAttr(aTitleDesc);
|
| 1096 |
+
|
| 1097 |
+ if (nNoPages > 1 && mpSh->GotoPage(GetInsertPosition() + nNoPages, false))
|
| 1098 |
+ {
|
| 1099 |
+ SwFmtPageDesc aPageFmtDesc(mpNormalDesc);
|
| 1100 |
+ mpSh->SetAttr(aPageFmtDesc);
|
| 1101 |
+ }
|
| 1102 |
+
|
| 1103 |
+ if (aRestartNumberingCB.IsChecked() || nNoPages > 1)
|
| 1104 |
+ {
|
| 1105 |
+ USHORT nPgNo = aRestartNumberingCB.IsChecked() ? aRestartNumberingNF.GetValue() : 0;
|
| 1106 |
+ const SwPageDesc *pNewDesc = nNoPages > 1 ? mpNormalDesc : 0;
|
| 1107 |
+ mpSh->GotoPage(GetInsertPosition() + nNoPages, false);
|
| 1108 |
+ lcl_ChangePage(mpSh, nPgNo, pNewDesc);
|
| 1109 |
+ }
|
| 1110 |
+
|
| 1111 |
+ mpSh->EndUndo();
|
| 1112 |
+ lcl_PopCursor(mpSh);
|
| 1113 |
+ if (!aUseExistingPagesRB.IsChecked())
|
| 1114 |
+ mpSh->GotoPage(GetInsertPosition(), false);
|
| 1115 |
+ EndDialog( RET_OK );
|
| 1116 |
+ return 0;
|
| 1117 |
+}
|
| 1118 |
+
|
| 1119 |
+/* vi:set tabstop=4 shiftwidth=4 expandtab: */
|
| 1120 |
--- /dev/null 2008-10-28 16:28:18.200260089 +0000
|
| 1121 |
+++ openoffice.org/sw/source/ui/misc/titlepage.hrc 2008-11-13 10:21:32.000000000 +0000
|
| 1122 |
@@ -0,0 +1,58 @@
|
| 1123 |
+/*************************************************************************
|
| 1124 |
+ *
|
| 1125 |
+ * OpenOffice.org - a multi-platform office productivity suite
|
| 1126 |
+ *
|
| 1127 |
+ * $RCSfile$
|
| 1128 |
+ *
|
| 1129 |
+ * $Revision$
|
| 1130 |
+ *
|
| 1131 |
+ * last change: $Author$ $Date$
|
| 1132 |
+ *
|
| 1133 |
+ * The Contents of this file are made available subject to
|
| 1134 |
+ * the terms of GNU Lesser General Public License Version 2.1.
|
| 1135 |
+ *
|
| 1136 |
+ *
|
| 1137 |
+ * GNU Lesser General Public License Version 2.1
|
| 1138 |
+ * =============================================
|
| 1139 |
+ * Copyright 2005 by Sun Microsystems, Inc.
|
| 1140 |
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
|
| 1141 |
+ *
|
| 1142 |
+ * This library is free software; you can redistribute it and/or
|
| 1143 |
+ * modify it under the terms of the GNU Lesser General Public
|
| 1144 |
+ * License version 2.1, as published by the Free Software Foundation.
|
| 1145 |
+ *
|
| 1146 |
+ * This library is distributed in the hope that it will be useful,
|
| 1147 |
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 1148 |
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
| 1149 |
+ * Lesser General Public License for more details.
|
| 1150 |
+ *
|
| 1151 |
+ * You should have received a copy of the GNU Lesser General Public
|
| 1152 |
+ * License along with this library; if not, write to the Free Software
|
| 1153 |
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
| 1154 |
+ * MA 02111-1307 USA
|
| 1155 |
+ *
|
| 1156 |
+ ************************************************************************/
|
| 1157 |
+#define FL_MAKEINSERT 1
|
| 1158 |
+#define RB_USE_EXISTING_PAGES 2
|
| 1159 |
+#define RB_INSERT_NEW_PAGES 3
|
| 1160 |
+#define FT_PAGE_COUNT 4
|
| 1161 |
+#define NF_PAGE_COUNT 5
|
| 1162 |
+#define FT_PAGE_PAGES 6
|
| 1163 |
+#define FT_PAGE_START 7
|
| 1164 |
+#define RB_DOCUMENT_START 8
|
| 1165 |
+#define RB_PAGE_START 9
|
| 1166 |
+#define NF_PAGE_START 10
|
| 1167 |
+#define FL_NUMBERING 11
|
| 1168 |
+#define CB_RESTART_NUMBERING 12
|
| 1169 |
+#define FT_RESTART_NUMBERING 13
|
| 1170 |
+#define NF_RESTART_NUMBERING 14
|
| 1171 |
+#define CB_SET_PAGE_NUMBER 15
|
| 1172 |
+#define FT_SET_PAGE_NUMBER 16
|
| 1173 |
+#define NF_SET_PAGE_NUMBER 17
|
| 1174 |
+#define FL_PAGE_PROPERTIES 18
|
| 1175 |
+#define LB_PAGE_PROPERTIES 19
|
| 1176 |
+#define PB_PAGE_PROPERTIES 20
|
| 1177 |
+#define FL_BOTTOM 21
|
| 1178 |
+#define PB_OK 22
|
| 1179 |
+#define PB_CANCEL 23
|
| 1180 |
+#define PB_HELP 24
|