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