1 /**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License. You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied. See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23
24 #ifdef SVX_DLLIMPLEMENTATION
25 #undef SVX_DLLIMPLEMENTATION
26 #endif
27
28 #include <toolkit/awt/vclxwindow.hxx>
29
30 // include ---------------------------------------------------------------
31
32 #include <cstdio>
33 #include <tools/shl.hxx>
34 #include <sfx2/objsh.hxx>
35 #include <vcl/msgbox.hxx>
36
37 #include <cstdio>
38
39 namespace SVX {
40 #include <svx/paraprev.hxx> // Preview
41 };
42
43 #include "simple-paragraph.hxx"
44
45 #include <assert.h>
46
47
48
49
50
51 // StandardTabPage ----------------------------------------------------------
52
53 #define FT_LEFTINDENT 10
54 #define ED_LEFTINDENT 11
55 #define FT_FLINEINDENT 12
56 #define ED_FLINEINDENT 13
57 #define FT_RIGHTINDENT 14
58 #define ED_RIGHTINDENT 15
59 #define FL_INDENT 16
60
61 #define FT_TOPDIST 20
62 #define ED_TOPDIST 21
63 #define FT_BOTTOMDIST 22
64 #define ED_BOTTOMDIST 23
65 #define FL_DIST 24
66
67 #define BTN_LEFTALIGN 30
68 #define BTN_RIGHTALIGN 31
69 #define BTN_CENTERALIGN 32
70 #define BTN_JUSTIFYALIGN 33
71 #define FL_ALIGN 34
72 #define FL_VERTALIGN 35
73 #define LB_VERTALIGN 36
74 #define FL_VERTEX 37
75 #define CB_SNAP 38
76 #define FT_VERTALIGN 39
77
78
79 #define LB_LINEDIST 40
80 #define FT_LINEDIST 41
81 #define ED_LINEDISTPERCENT 42
82 #define ED_LINEDISTMETRIC 43
83 #define FL_LINEDIST 44
84 #define WN_EXAMPLE 46
85
86 #define CB_AUTO 48
87 #define FT_LASTLINE 49
88 #define LB_LASTLINE 50
89 #define CB_EXPAND 51
90 #define ST_LINEDIST_ABS 52
91 #define ST_LEFTALIGN_ASIAN 53
92 #define ST_RIGHTALIGN_ASIAN 54
93
94 // ExtendedTabPage ----------------------------------------------------------
95
96 #define BTN_HYPHEN 50
97 #define ED_HYPHENBEFORE 52
98 #define FT_HYPHENBEFORE 53
99 #define ED_HYPHENAFTER 55
100 #define FT_HYPHENAFTER 56
101 #define FL_HYPHEN 57
102
103 #define BTN_PAGEBREAK 60
104 #define FT_BREAKTYPE 61
105 #define LB_BREAKTYPE 62
106 #define FT_BREAKPOSITION 63
107 #define LB_BREAKPOSITION 64
108 #define BTN_PAGECOLL 65
109 #define LB_PAGECOLL 66
110 #define BTN_KEEPTOGETHER 67
111 #define BTN_WIDOWS 68
112 #define ED_WIDOWS 69
113 #define FT_WIDOWS 70
114 #define BTN_ORPHANS 71
115 #define ED_ORPHANS 72
116 #define FT_ORPHANS 73
117 #define FL_OPTIONS 74
118 #define FT_PAGENUM 75
119 #define ED_PAGENUM 76
120 #define FL_BREAKS 77
121
122 #define CB_KEEPTOGETHER 80
123 #define FT_MAXHYPH 81
124 #define ED_MAXHYPH 83
125
126 #define CB_REGISTER 84
127 #define FL_REGISTER 85
128 #define FL_PROPERTIES 90
129 #define FT_TEXTDIRECTION 91
130 #define LB_TEXTDIRECTION 92
131
132
133 //asian typography
134 #define FL_AS_OPTIONS 1
135 #define CB_AS_HANG_PUNC 2
136 #define CB_AS_ALLOW_WORD_BREAK 3
137 #define CB_AS_FORBIDDEN 4
138 #define FL_AS_CHAR_DIST 5
139 #define CB_AS_PUNCTUATION 6
140 #define CB_AS_SCRIPT_SPACE 7
141 #define CB_AS_ADJUST_NUMBERS 8
142
143
144
145
146
147
148
149
SvxSimpleParagraphDialog(Window * pParent)150 SvxSimpleParagraphDialog::SvxSimpleParagraphDialog( Window* pParent ) :
151 SfxTabPage( pParent, SVX_RES( RID_SVXPAGE_STD_PARAGRAPH ), rAttr ),
152 Dialog( pParent, "simple-paragraph.xml", "dialog" ),
153 aLineSpacingList( this, "line-spacing-list" )
154 {
155 fprintf(stderr, "creating res mgr\n");
156 pMgr = ResMgr::CreateResMgr("SOME_NAME");
157 fprintf(stderr, "getting parent\n");
158 VCLXWindow *pCompParent = VCLXWindow::GetImplementation( GetPeer() );
159 assert( pCompParent != NULL );
160 assert( pCompParent->GetWindow() != NULL );
161 fprintf(stderr, "creating foreign vcl widget\n");
162 /* pPrevWin = new SVX::SvxParaPrevWindow(
163 pCompParent->GetWindow(),
164 ResId(1234, *pMgr)
165 );*/
166
167 fprintf(stderr, "done\n");
168 FreeResource();
169 }
170
171 // -----------------------------------------------------------------------
172
~SvxSimpleParagraphDialog()173 SvxSimpleParagraphDialog::~SvxSimpleParagraphDialog()
174 {
175 }
176