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