1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 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. 14 * 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). 20 * 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. 25 * 26 ************************************************************************/ 27 28 #ifdef SVX_DLLIMPLEMENTATION 29 #undef SVX_DLLIMPLEMENTATION 30 #endif 31 32 #include <toolkit/awt/vclxwindow.hxx> 33 34 // include --------------------------------------------------------------- 35 36 #include <cstdio> 37 #include <tools/shl.hxx> 38 #include <sfx2/objsh.hxx> 39 #include <vcl/msgbox.hxx> 40 41 #include <cstdio> 42 43 namespace SVX { 44 #include <svx/paraprev.hxx> // Preview 45 }; 46 47 #include "simple-paragraph.hxx" 48 49 #include <assert.h> 50 51 52 53 54 55 // StandardTabPage ---------------------------------------------------------- 56 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 64 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 70 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 81 82 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 89 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 97 98 // ExtendedTabPage ---------------------------------------------------------- 99 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 106 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 125 126 #define CB_KEEPTOGETHER 80 127 #define FT_MAXHYPH 81 128 #define ED_MAXHYPH 83 129 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 135 136 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 146 147 148 149 150 151 152 153 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" ) 158 { 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 );*/ 170 171 fprintf(stderr, "done\n"); 172 FreeResource(); 173 } 174 175 // ----------------------------------------------------------------------- 176 177 SvxSimpleParagraphDialog::~SvxSimpleParagraphDialog() 178 { 179 } 180