1*cdf0e10cSrcweir /************************************************************************* 2*cdf0e10cSrcweir * 3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4*cdf0e10cSrcweir * 5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates. 6*cdf0e10cSrcweir * 7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite 8*cdf0e10cSrcweir * 9*cdf0e10cSrcweir * This file is part of OpenOffice.org. 10*cdf0e10cSrcweir * 11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify 12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3 13*cdf0e10cSrcweir * only, as published by the Free Software Foundation. 14*cdf0e10cSrcweir * 15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful, 16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of 17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details 19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code). 20*cdf0e10cSrcweir * 21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License 22*cdf0e10cSrcweir * version 3 along with OpenOffice.org. If not, see 23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html> 24*cdf0e10cSrcweir * for a copy of the LGPLv3 License. 25*cdf0e10cSrcweir * 26*cdf0e10cSrcweir ************************************************************************/ 27*cdf0e10cSrcweir #ifndef _SWUI_IDXMRK_HXX 28*cdf0e10cSrcweir #define _SWUI_IDXMRK_HXX 29*cdf0e10cSrcweir 30*cdf0e10cSrcweir #include <com/sun/star/container/XNameAccess.hpp> 31*cdf0e10cSrcweir #include <sfx2/basedlgs.hxx> 32*cdf0e10cSrcweir 33*cdf0e10cSrcweir #ifndef _FIXED_HXX //autogen 34*cdf0e10cSrcweir #include <vcl/fixed.hxx> 35*cdf0e10cSrcweir #endif 36*cdf0e10cSrcweir #include <vcl/lstbox.hxx> 37*cdf0e10cSrcweir #ifndef _COMBOBOX_HXX //autogen 38*cdf0e10cSrcweir #include <vcl/combobox.hxx> 39*cdf0e10cSrcweir #endif 40*cdf0e10cSrcweir #include <svx/stddlg.hxx> 41*cdf0e10cSrcweir 42*cdf0e10cSrcweir #ifndef _FIELD_HXX //autogen 43*cdf0e10cSrcweir #include <vcl/field.hxx> 44*cdf0e10cSrcweir #endif 45*cdf0e10cSrcweir 46*cdf0e10cSrcweir #ifndef _GROUP_HXX //autogen 47*cdf0e10cSrcweir #include <vcl/group.hxx> 48*cdf0e10cSrcweir #endif 49*cdf0e10cSrcweir 50*cdf0e10cSrcweir #ifndef _BUTTON_HXX //autogen 51*cdf0e10cSrcweir #include <vcl/button.hxx> 52*cdf0e10cSrcweir #endif 53*cdf0e10cSrcweir 54*cdf0e10cSrcweir #ifndef _IMAGEBTN_HXX //autogen 55*cdf0e10cSrcweir #include <vcl/button.hxx> 56*cdf0e10cSrcweir #endif 57*cdf0e10cSrcweir #include <sfx2/childwin.hxx> 58*cdf0e10cSrcweir #include "toxe.hxx" 59*cdf0e10cSrcweir #include <svtools/stdctrl.hxx> 60*cdf0e10cSrcweir #include <com/sun/star/i18n/XExtendedIndexEntrySupplier.hpp> 61*cdf0e10cSrcweir 62*cdf0e10cSrcweir class SwWrtShell; 63*cdf0e10cSrcweir class SwTOXMgr; 64*cdf0e10cSrcweir class SwTOXMark; 65*cdf0e10cSrcweir /*-------------------------------------------------------------------- 66*cdf0e10cSrcweir Beschreibung: Markierung fuer Verzeichniseintrag einfuegen 67*cdf0e10cSrcweir --------------------------------------------------------------------*/ 68*cdf0e10cSrcweir class SwIndexMarkFloatDlg; 69*cdf0e10cSrcweir class SwIndexMarkModalDlg; 70*cdf0e10cSrcweir class SwIndexMarkDlg : public Window 71*cdf0e10cSrcweir { 72*cdf0e10cSrcweir friend class SwIndexMarkFloatDlg; 73*cdf0e10cSrcweir friend class SwIndexMarkModalDlg; 74*cdf0e10cSrcweir FixedLine aIndexFL; 75*cdf0e10cSrcweir FixedText aTypeFT; 76*cdf0e10cSrcweir ListBox aTypeDCB; 77*cdf0e10cSrcweir ImageButton aNewBT; 78*cdf0e10cSrcweir 79*cdf0e10cSrcweir FixedText aEntryFT; 80*cdf0e10cSrcweir Edit aEntryED; 81*cdf0e10cSrcweir FixedText aPhoneticFT0; 82*cdf0e10cSrcweir Edit aPhoneticED0; 83*cdf0e10cSrcweir 84*cdf0e10cSrcweir FixedText aKeyFT; 85*cdf0e10cSrcweir ComboBox aKeyDCB; 86*cdf0e10cSrcweir FixedText aPhoneticFT1; 87*cdf0e10cSrcweir Edit aPhoneticED1; 88*cdf0e10cSrcweir 89*cdf0e10cSrcweir FixedText aKey2FT; 90*cdf0e10cSrcweir ComboBox aKey2DCB; 91*cdf0e10cSrcweir FixedText aPhoneticFT2; 92*cdf0e10cSrcweir Edit aPhoneticED2; 93*cdf0e10cSrcweir 94*cdf0e10cSrcweir FixedText aLevelFT; 95*cdf0e10cSrcweir NumericField aLevelED; 96*cdf0e10cSrcweir CheckBox aMainEntryCB; 97*cdf0e10cSrcweir CheckBox aApplyToAllCB; 98*cdf0e10cSrcweir CheckBox aSearchCaseSensitiveCB; 99*cdf0e10cSrcweir CheckBox aSearchCaseWordOnlyCB; 100*cdf0e10cSrcweir 101*cdf0e10cSrcweir 102*cdf0e10cSrcweir OKButton aOKBT; 103*cdf0e10cSrcweir CancelButton aCancelBT; 104*cdf0e10cSrcweir HelpButton aHelpBT; 105*cdf0e10cSrcweir PushButton aDelBT; 106*cdf0e10cSrcweir //PushButton aNewBT; 107*cdf0e10cSrcweir 108*cdf0e10cSrcweir ImageButton aPrevSameBT; 109*cdf0e10cSrcweir ImageButton aNextSameBT; 110*cdf0e10cSrcweir ImageButton aPrevBT; 111*cdf0e10cSrcweir ImageButton aNextBT; 112*cdf0e10cSrcweir 113*cdf0e10cSrcweir String aOrgStr; 114*cdf0e10cSrcweir sal_Int32 nOptionsId; 115*cdf0e10cSrcweir sal_Bool bDel; 116*cdf0e10cSrcweir sal_Bool bNewMark; 117*cdf0e10cSrcweir sal_Bool bSelected; 118*cdf0e10cSrcweir 119*cdf0e10cSrcweir sal_Bool bPhoneticED0_ChangedByUser; 120*cdf0e10cSrcweir sal_Bool bPhoneticED1_ChangedByUser; 121*cdf0e10cSrcweir sal_Bool bPhoneticED2_ChangedByUser; 122*cdf0e10cSrcweir LanguageType nLangForPhoneticReading; //Language of current text used for phonetic reading proposal 123*cdf0e10cSrcweir sal_Bool bIsPhoneticReadingEnabled; //this value states wether phopentic reading is enabled in principle dependend of global cjk settings and language of current entry 124*cdf0e10cSrcweir com::sun::star::uno::Reference< com::sun::star::i18n::XExtendedIndexEntrySupplier > 125*cdf0e10cSrcweir xExtendedIndexEntrySupplier; 126*cdf0e10cSrcweir 127*cdf0e10cSrcweir SwTOXMgr* pTOXMgr; 128*cdf0e10cSrcweir SwWrtShell* pSh; 129*cdf0e10cSrcweir 130*cdf0e10cSrcweir void Apply(); 131*cdf0e10cSrcweir void InitControls(); 132*cdf0e10cSrcweir void InsertMark(); 133*cdf0e10cSrcweir void UpdateMark(); 134*cdf0e10cSrcweir 135*cdf0e10cSrcweir DECL_LINK( InsertHdl, Button * ); 136*cdf0e10cSrcweir DECL_LINK( CloseHdl, Button * ); 137*cdf0e10cSrcweir DECL_LINK( DelHdl, Button * ); 138*cdf0e10cSrcweir DECL_LINK( NextHdl, Button * ); 139*cdf0e10cSrcweir DECL_LINK( NextSameHdl, Button * ); 140*cdf0e10cSrcweir DECL_LINK( PrevHdl, Button * ); 141*cdf0e10cSrcweir DECL_LINK( PrevSameHdl, Button * ); 142*cdf0e10cSrcweir DECL_LINK( ModifyHdl, ListBox* pBox = 0 ); 143*cdf0e10cSrcweir DECL_LINK( KeyDCBModifyHdl, ComboBox * ); 144*cdf0e10cSrcweir DECL_LINK( NewUserIdxHdl, Button*); 145*cdf0e10cSrcweir DECL_LINK( SearchTypeHdl, CheckBox*); 146*cdf0e10cSrcweir DECL_LINK( PhoneticEDModifyHdl, Edit * ); 147*cdf0e10cSrcweir 148*cdf0e10cSrcweir //this method updates the values from 'nLangForPhoneticReading' and 'bIsPhoneticReadingEnabled' 149*cdf0e10cSrcweir //it needs to be called ones if this dialog is opened to create a new entry (in InitControls), 150*cdf0e10cSrcweir //or otherwise it has to be called for each changed TOXMark (in UpdateDialog) 151*cdf0e10cSrcweir void UpdateLanguageDependenciesForPhoneticReading(); 152*cdf0e10cSrcweir String GetDefaultPhoneticReading( const String& rText ); 153*cdf0e10cSrcweir 154*cdf0e10cSrcweir void UpdateKeyBoxes(); 155*cdf0e10cSrcweir 156*cdf0e10cSrcweir void UpdateDialog(); 157*cdf0e10cSrcweir void InsertUpdate(); 158*cdf0e10cSrcweir 159*cdf0e10cSrcweir virtual void Activate(); 160*cdf0e10cSrcweir 161*cdf0e10cSrcweir public: 162*cdf0e10cSrcweir 163*cdf0e10cSrcweir SwIndexMarkDlg( Window *pParent, 164*cdf0e10cSrcweir sal_Bool bNewDlg, 165*cdf0e10cSrcweir const ResId& rResId, 166*cdf0e10cSrcweir sal_Int32 _nOptionsId, 167*cdf0e10cSrcweir SwWrtShell& rWrtShell ); 168*cdf0e10cSrcweir 169*cdf0e10cSrcweir 170*cdf0e10cSrcweir ~SwIndexMarkDlg(); 171*cdf0e10cSrcweir 172*cdf0e10cSrcweir void ReInitDlg(SwWrtShell& rWrtShell, SwTOXMark* pCurTOXMark = 0); 173*cdf0e10cSrcweir sal_Bool IsTOXType(const String& rName) 174*cdf0e10cSrcweir {return LISTBOX_ENTRY_NOTFOUND != aTypeDCB.GetEntryPos(rName);} 175*cdf0e10cSrcweir }; 176*cdf0e10cSrcweir /* -----------------06.10.99 10:11------------------- 177*cdf0e10cSrcweir 178*cdf0e10cSrcweir --------------------------------------------------*/ 179*cdf0e10cSrcweir class SwIndexMarkFloatDlg : public SfxModelessDialog 180*cdf0e10cSrcweir { 181*cdf0e10cSrcweir SwIndexMarkDlg aDlg; 182*cdf0e10cSrcweir virtual void Activate(); 183*cdf0e10cSrcweir public: 184*cdf0e10cSrcweir SwIndexMarkFloatDlg( SfxBindings* pBindings, 185*cdf0e10cSrcweir SfxChildWindow* pChild, 186*cdf0e10cSrcweir Window *pParent, 187*cdf0e10cSrcweir SfxChildWinInfo* pInfo, 188*cdf0e10cSrcweir sal_Bool bNew=sal_True); 189*cdf0e10cSrcweir void ReInitDlg(SwWrtShell& rWrtShell); 190*cdf0e10cSrcweir }; 191*cdf0e10cSrcweir /* -----------------06.10.99 10:33------------------- 192*cdf0e10cSrcweir 193*cdf0e10cSrcweir --------------------------------------------------*/ 194*cdf0e10cSrcweir class SwIndexMarkModalDlg : public SvxStandardDialog 195*cdf0e10cSrcweir { 196*cdf0e10cSrcweir SwIndexMarkDlg aDlg; 197*cdf0e10cSrcweir public: 198*cdf0e10cSrcweir SwIndexMarkModalDlg(Window *pParent, SwWrtShell& rSh, SwTOXMark* pCurTOXMark); 199*cdf0e10cSrcweir 200*cdf0e10cSrcweir virtual void Apply(); 201*cdf0e10cSrcweir void ReInitDlg(SwWrtShell& rWrtShell); 202*cdf0e10cSrcweir }; 203*cdf0e10cSrcweir 204*cdf0e10cSrcweir /* -----------------15.09.99 08:39------------------- 205*cdf0e10cSrcweir 206*cdf0e10cSrcweir --------------------------------------------------*/ 207*cdf0e10cSrcweir class SwAuthMarkModalDlg; 208*cdf0e10cSrcweir class SwAuthMarkDlg : public Window 209*cdf0e10cSrcweir { 210*cdf0e10cSrcweir static sal_Bool bIsFromComponent; 211*cdf0e10cSrcweir 212*cdf0e10cSrcweir friend class SwAuthMarkModalDlg; 213*cdf0e10cSrcweir friend class SwAuthMarkFloatDlg; 214*cdf0e10cSrcweir 215*cdf0e10cSrcweir RadioButton aFromComponentRB; 216*cdf0e10cSrcweir RadioButton aFromDocContentRB; 217*cdf0e10cSrcweir FixedText aAuthorFT; 218*cdf0e10cSrcweir FixedInfo aAuthorFI; 219*cdf0e10cSrcweir FixedText aTitleFT; 220*cdf0e10cSrcweir FixedInfo aTitleFI; 221*cdf0e10cSrcweir FixedText aEntryFT; 222*cdf0e10cSrcweir Edit aEntryED; 223*cdf0e10cSrcweir ListBox aEntryLB; 224*cdf0e10cSrcweir 225*cdf0e10cSrcweir FixedLine aEntryFL; 226*cdf0e10cSrcweir 227*cdf0e10cSrcweir OKButton aOKBT; 228*cdf0e10cSrcweir CancelButton aCancelBT; 229*cdf0e10cSrcweir HelpButton aHelpBT; 230*cdf0e10cSrcweir PushButton aCreateEntryPB; 231*cdf0e10cSrcweir PushButton aEditEntryPB; 232*cdf0e10cSrcweir 233*cdf0e10cSrcweir String sChangeST; 234*cdf0e10cSrcweir sal_Bool bNewEntry; 235*cdf0e10cSrcweir sal_Bool bBibAccessInitialized; 236*cdf0e10cSrcweir 237*cdf0e10cSrcweir SwWrtShell* pSh; 238*cdf0e10cSrcweir 239*cdf0e10cSrcweir String m_sColumnTitles[AUTH_FIELD_END]; 240*cdf0e10cSrcweir String m_sFields[AUTH_FIELD_END]; 241*cdf0e10cSrcweir 242*cdf0e10cSrcweir String m_sCreatedEntry[AUTH_FIELD_END]; 243*cdf0e10cSrcweir 244*cdf0e10cSrcweir ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > xBibAccess; 245*cdf0e10cSrcweir 246*cdf0e10cSrcweir DECL_LINK(InsertHdl, PushButton*); 247*cdf0e10cSrcweir DECL_LINK(CloseHdl, PushButton*); 248*cdf0e10cSrcweir DECL_LINK(CreateEntryHdl, PushButton*); 249*cdf0e10cSrcweir DECL_LINK(CompEntryHdl, ListBox*); 250*cdf0e10cSrcweir DECL_LINK(ChangeSourceHdl, RadioButton*); 251*cdf0e10cSrcweir DECL_LINK(IsEntryAllowedHdl, Edit*); 252*cdf0e10cSrcweir DECL_LINK(EditModifyHdl, Edit*); 253*cdf0e10cSrcweir 254*cdf0e10cSrcweir void InitControls(); 255*cdf0e10cSrcweir virtual void Activate(); 256*cdf0e10cSrcweir public: 257*cdf0e10cSrcweir 258*cdf0e10cSrcweir SwAuthMarkDlg( Window *pParent, 259*cdf0e10cSrcweir const ResId& rResId, 260*cdf0e10cSrcweir sal_Bool bNew=sal_True); 261*cdf0e10cSrcweir ~SwAuthMarkDlg(); 262*cdf0e10cSrcweir 263*cdf0e10cSrcweir void ReInitDlg(SwWrtShell& rWrtShell); 264*cdf0e10cSrcweir }; 265*cdf0e10cSrcweir /* -----------------06.10.99 10:11------------------- 266*cdf0e10cSrcweir 267*cdf0e10cSrcweir --------------------------------------------------*/ 268*cdf0e10cSrcweir class SwAuthMarkFloatDlg : public SfxModelessDialog 269*cdf0e10cSrcweir { 270*cdf0e10cSrcweir SwAuthMarkDlg aDlg; 271*cdf0e10cSrcweir virtual void Activate(); 272*cdf0e10cSrcweir public: 273*cdf0e10cSrcweir SwAuthMarkFloatDlg( SfxBindings* pBindings, 274*cdf0e10cSrcweir SfxChildWindow* pChild, 275*cdf0e10cSrcweir Window *pParent, 276*cdf0e10cSrcweir SfxChildWinInfo* pInfo, 277*cdf0e10cSrcweir sal_Bool bNew=sal_True); 278*cdf0e10cSrcweir void ReInitDlg(SwWrtShell& rWrtShell); 279*cdf0e10cSrcweir }; 280*cdf0e10cSrcweir /* -----------------06.10.99 10:33------------------- 281*cdf0e10cSrcweir 282*cdf0e10cSrcweir --------------------------------------------------*/ 283*cdf0e10cSrcweir class SwAuthMarkModalDlg : public SvxStandardDialog 284*cdf0e10cSrcweir { 285*cdf0e10cSrcweir SwAuthMarkDlg aDlg; 286*cdf0e10cSrcweir public: 287*cdf0e10cSrcweir SwAuthMarkModalDlg(Window *pParent, SwWrtShell& rSh); 288*cdf0e10cSrcweir 289*cdf0e10cSrcweir virtual void Apply(); 290*cdf0e10cSrcweir void ReInitDlg(SwWrtShell& rWrtShell); 291*cdf0e10cSrcweir }; 292*cdf0e10cSrcweir 293*cdf0e10cSrcweir 294*cdf0e10cSrcweir #endif // _SWUI_IDXMRK_HXX 295*cdf0e10cSrcweir 296