merged tag ooo/DEV300_m102
[LibreOffice.git] / toolkit / workben / layout / simple-paragraph.cxx
blob721dd9030c67a88018d6627201e7e4818d0f2ca1
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
30 #endif
32 #include <toolkit/awt/vclxwindow.hxx>
34 // include ---------------------------------------------------------------
36 #include <cstdio>
37 #include <tools/shl.hxx>
38 #include <sfx2/objsh.hxx>
39 #include <vcl/msgbox.hxx>
41 #include <cstdio>
43 namespace SVX {
44 #include <svx/paraprev.hxx> // Preview
47 #include "simple-paragraph.hxx"
49 #include <assert.h>
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
63 #define FL_INDENT 16
65 #define FT_TOPDIST 20
66 #define ED_TOPDIST 21
67 #define FT_BOTTOMDIST 22
68 #define ED_BOTTOMDIST 23
69 #define FL_DIST 24
71 #define BTN_LEFTALIGN 30
72 #define BTN_RIGHTALIGN 31
73 #define BTN_CENTERALIGN 32
74 #define BTN_JUSTIFYALIGN 33
75 #define FL_ALIGN 34
76 #define FL_VERTALIGN 35
77 #define LB_VERTALIGN 36
78 #define FL_VERTEX 37
79 #define CB_SNAP 38
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
88 #define WN_EXAMPLE 46
90 #define CB_AUTO 48
91 #define FT_LASTLINE 49
92 #define LB_LASTLINE 50
93 #define CB_EXPAND 51
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
105 #define FL_HYPHEN 57
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
116 #define ED_WIDOWS 69
117 #define FT_WIDOWS 70
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
124 #define FL_BREAKS 77
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
137 //asian typography
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(),
168 ResId(1234, *pMgr)
169 );*/
171 fprintf(stderr, "done\n");
172 FreeResource();
175 // -----------------------------------------------------------------------
177 SvxSimpleParagraphDialog::~SvxSimpleParagraphDialog()