1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: simple-paragraph.cxx,v $
13 * This file is part of OpenOffice.org.
15 * OpenOffice.org is free software: you can redistribute it and/or modify
16 * it under the terms of the GNU Lesser General Public License version 3
17 * only, as published by the Free Software Foundation.
19 * OpenOffice.org is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU Lesser General Public License version 3 for more details
23 * (a copy is included in the LICENSE file that accompanied this code).
25 * You should have received a copy of the GNU Lesser General Public License
26 * version 3 along with OpenOffice.org. If not, see
27 * <http://www.openoffice.org/license.html>
28 * for a copy of the LGPLv3 License.
30 ************************************************************************/
32 #ifdef SVX_DLLIMPLEMENTATION
33 #undef SVX_DLLIMPLEMENTATION
36 #include <toolkit/awt/vclxwindow.hxx>
38 // include ---------------------------------------------------------------
41 #include <tools/shl.hxx>
42 #include <sfx2/objsh.hxx>
43 #include <vcl/msgbox.hxx>
48 #include <svx/paraprev.hxx> // Preview
51 #include "simple-paragraph.hxx"
59 // StandardTabPage ----------------------------------------------------------
61 #define FT_LEFTINDENT 10
62 #define ED_LEFTINDENT 11
63 #define FT_FLINEINDENT 12
64 #define ED_FLINEINDENT 13
65 #define FT_RIGHTINDENT 14
66 #define ED_RIGHTINDENT 15
71 #define FT_BOTTOMDIST 22
72 #define ED_BOTTOMDIST 23
75 #define BTN_LEFTALIGN 30
76 #define BTN_RIGHTALIGN 31
77 #define BTN_CENTERALIGN 32
78 #define BTN_JUSTIFYALIGN 33
80 #define FL_VERTALIGN 35
81 #define LB_VERTALIGN 36
84 #define FT_VERTALIGN 39
87 #define LB_LINEDIST 40
88 #define FT_LINEDIST 41
89 #define ED_LINEDISTPERCENT 42
90 #define ED_LINEDISTMETRIC 43
91 #define FL_LINEDIST 44
95 #define FT_LASTLINE 49
96 #define LB_LASTLINE 50
98 #define ST_LINEDIST_ABS 52
99 #define ST_LEFTALIGN_ASIAN 53
100 #define ST_RIGHTALIGN_ASIAN 54
102 // ExtendedTabPage ----------------------------------------------------------
104 #define BTN_HYPHEN 50
105 #define ED_HYPHENBEFORE 52
106 #define FT_HYPHENBEFORE 53
107 #define ED_HYPHENAFTER 55
108 #define FT_HYPHENAFTER 56
111 #define BTN_PAGEBREAK 60
112 #define FT_BREAKTYPE 61
113 #define LB_BREAKTYPE 62
114 #define FT_BREAKPOSITION 63
115 #define LB_BREAKPOSITION 64
116 #define BTN_PAGECOLL 65
117 #define LB_PAGECOLL 66
118 #define BTN_KEEPTOGETHER 67
119 #define BTN_WIDOWS 68
122 #define BTN_ORPHANS 71
123 #define ED_ORPHANS 72
124 #define FT_ORPHANS 73
125 #define FL_OPTIONS 74
126 #define FT_PAGENUM 75
127 #define ED_PAGENUM 76
130 #define CB_KEEPTOGETHER 80
131 #define FT_MAXHYPH 81
132 #define ED_MAXHYPH 83
134 #define CB_REGISTER 84
135 #define FL_REGISTER 85
136 #define FL_PROPERTIES 90
137 #define FT_TEXTDIRECTION 91
138 #define LB_TEXTDIRECTION 92
142 #define FL_AS_OPTIONS 1
143 #define CB_AS_HANG_PUNC 2
144 #define CB_AS_ALLOW_WORD_BREAK 3
145 #define CB_AS_FORBIDDEN 4
146 #define FL_AS_CHAR_DIST 5
147 #define CB_AS_PUNCTUATION 6
148 #define CB_AS_SCRIPT_SPACE 7
149 #define CB_AS_ADJUST_NUMBERS 8
158 SvxSimpleParagraphDialog::SvxSimpleParagraphDialog( Window
* pParent
) :
159 SfxTabPage( pParent
, SVX_RES( RID_SVXPAGE_STD_PARAGRAPH
), rAttr
),
160 Dialog( pParent
, "simple-paragraph.xml", "dialog" ),
161 aLineSpacingList( this, "line-spacing-list" )
163 fprintf(stderr
, "creating res mgr\n");
164 pMgr
= ResMgr::CreateResMgr("SOME_NAME");
165 fprintf(stderr
, "getting parent\n");
166 VCLXWindow
*pCompParent
= VCLXWindow::GetImplementation( GetPeer() );
167 assert( pCompParent
!= NULL
);
168 assert( pCompParent
->GetWindow() != NULL
);
169 fprintf(stderr
, "creating foreign vcl widget\n");
170 /* pPrevWin = new SVX::SvxParaPrevWindow(
171 pCompParent->GetWindow(),
175 fprintf(stderr
, "done\n");
179 // -----------------------------------------------------------------------
181 SvxSimpleParagraphDialog::~SvxSimpleParagraphDialog()