diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-10-24 14:10:20 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-10-24 15:39:27 +0100 |
commit | 4cc5ccef4bccc779f6286ac369b00dfd42ca9cdb (patch) | |
tree | 081fa1b57fe6a54be50215bcd4c11355b9fa801c /sw | |
parent | b9326cf05f1ec7ba480bef756c20eca91035bedc (diff) |
convert index dialog to .ui
Change-Id: I4b16cb517dca25f862b9dd612785dae4d0f21793
Diffstat (limited to 'sw')
-rw-r--r-- | sw/UI_swriter.mk | 1 | ||||
-rw-r--r-- | sw/inc/helpid.h | 18 | ||||
-rw-r--r-- | sw/inc/swabstdlg.hxx | 8 | ||||
-rw-r--r-- | sw/source/ui/app/docsh2.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/dialog/swdlgfact.cxx | 54 | ||||
-rw-r--r-- | sw/source/ui/dialog/swdlgfact.hxx | 6 | ||||
-rw-r--r-- | sw/source/ui/inc/swuiidxmrk.hxx | 110 | ||||
-rw-r--r-- | sw/source/ui/index/idxmrk.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/index/idxmrk.hrc | 75 | ||||
-rw-r--r-- | sw/source/ui/index/idxmrk.src | 351 | ||||
-rw-r--r-- | sw/source/ui/index/swuiidxmrk.cxx | 613 | ||||
-rw-r--r-- | sw/source/ui/misc/numberingtypelistbox.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/shells/textidx.cxx | 2 | ||||
-rw-r--r-- | sw/uiconfig/swriter/ui/bibliographyentry.ui | 2 | ||||
-rw-r--r-- | sw/uiconfig/swriter/ui/indexentry.ui | 649 |
15 files changed, 1011 insertions, 884 deletions
diff --git a/sw/UI_swriter.mk b/sw/UI_swriter.mk index 1e99bf49fc54..89eb2e4bc139 100644 --- a/sw/UI_swriter.mk +++ b/sw/UI_swriter.mk @@ -16,6 +16,7 @@ $(eval $(call gb_UI_add_uifiles,modules/swriter,\ sw/uiconfig/swriter/ui/columnwidth \ sw/uiconfig/swriter/ui/converttexttable \ sw/uiconfig/swriter/ui/horizontalrule \ + sw/uiconfig/swriter/ui/indexentry \ sw/uiconfig/swriter/ui/insertbreak \ sw/uiconfig/swriter/ui/inserttable \ sw/uiconfig/swriter/ui/linenumbering \ diff --git a/sw/inc/helpid.h b/sw/inc/helpid.h index 8f97e7b0dda6..aff7ad673b61 100644 --- a/sw/inc/helpid.h +++ b/sw/inc/helpid.h @@ -382,21 +382,6 @@ #define HID_TOX_ENTRY_EDIT "SW_HID_TOX_ENTRY_EDIT" #define HID_DLG_NEW_USER_IDX "SW_HID_DLG_NEW_USER_IDX" -#define HID_INSERT_IDX_MRK_OK "SW_HID_INSERT_IDX_MRK_OK" -#define HID_INSERT_IDX_MRK_CLOSE "SW_HID_INSERT_IDX_MRK_CLOSE" -#define HID_INSERT_IDX_MRK_DELETE "SW_HID_INSERT_IDX_MRK_DELETE" -#define HID_INSERT_IDX_MRK_NEW "SW_HID_INSERT_IDX_MRK_NEW" -#define HID_INSERT_IDX_MRK_PREV "SW_HID_INSERT_IDX_MRK_PREV" -#define HID_INSERT_IDX_MRK_PREV_SAME "SW_HID_INSERT_IDX_MRK_PREV_SAME" -#define HID_INSERT_IDX_MRK_NEXT "SW_HID_INSERT_IDX_MRK_NEXT" -#define HID_INSERT_IDX_MRK_NEXT_SAME "SW_HID_INSERT_IDX_MRK_NEXT_SAME" -#define HID_INSERT_IDX_MRK_TYPE "SW_HID_INSERT_IDX_MRK_TYPE" -#define HID_INSERT_IDX_MRK_ENTRY "SW_HID_INSERT_IDX_MRK_ENTRY" -#define HID_INSERT_IDX_MRK_PRIM_KEY "SW_HID_INSERT_IDX_MRK_PRIM_KEY" -#define HID_INSERT_IDX_MRK_SEC_KEY "SW_HID_INSERT_IDX_MRK_SEC_KEY" -#define HID_INSERT_IDX_MRK_LEVEL "SW_HID_INSERT_IDX_MRK_LEVEL" -#define HID_INSERT_IDX_MRK_MAIN_ENTRY "SW_HID_INSERT_IDX_MRK_MAIN_ENTRY" -#define HID_INSERT_IDX_MRK_APPLY_ALL "SW_HID_INSERT_IDX_MRK_APPLY_ALL" #define HID_TOKEN_WINDOW "SW_HID_TOKEN_WINDOW" #define HID_AUTH_FIELD_IDENTIFIER "SW_HID_AUTH_FIELD_IDENTIFIER" @@ -432,8 +417,6 @@ #define HID_AUTH_FIELD_ISBN "SW_HID_AUTH_FIELD_ISBN" #define HID_INSERT_INDEX_ENTRY_LEVEL_LB "SW_HID_INSERT_INDEX_ENTRY_LEVEL_LB" -#define HID_INSERT_IDX_MRK_SRCH_CASESENSITIVE "SW_HID_INSERT_IDX_MRK_SRCH_CASESENSITIVE" -#define HID_INSERT_IDX_MRK_SRCH_WORDONLY "SW_HID_INSERT_IDX_MRK_SRCH_WORDONLY" #define HID_DLG_CREATE_AUTOMARK "SW_HID_DLG_CREATE_AUTOMARK" #define HID_BUSINESS_CARD_CONTENT "SW_HID_BUSINESS_CARD_CONTENT" #define HID_SAVE_LABEL_DLG "SW_HID_SAVE_LABEL_DLG" @@ -460,7 +443,6 @@ #define HID_SEND_HTML_CTRL_CHECKBOX_AUTOEXTENSION "SW_HID_SEND_HTML_CTRL_CHECKBOX_AUTOEXTENSION" #define HID_SEND_HTML_CTRL_LISTBOX_TEMPLATE "SW_HID_SEND_HTML_CTRL_LISTBOX_TEMPLATE" -#define HID_INSERT_IDX_MRK_PHONETIC_READING "SW_HID_INSERT_IDX_MRK_PHONETIC_READING" #define HID_COLUMN_VALUESET "SW_HID_COLUMN_VALUESET" #define HID_PVIEW_ZOOM_LB "SW_HID_PVIEW_ZOOM_LB" #define HID_MAIL_MERGE_SELECT "SW_HID_MAIL_MERGE_SELECT" diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx index bd499a7a3b55..6bc093c2b182 100644 --- a/sw/inc/swabstdlg.hxx +++ b/sw/inc/swabstdlg.hxx @@ -357,7 +357,7 @@ public: virtual AbstractSwWordCountFloatDlg* CreateSwWordCountDialog(SfxBindings* pBindings, SfxChildWindow* pChild, Window *pParent, SfxChildWinInfo* pInfo) = 0; - virtual AbstractSwInsertAbstractDlg * CreateSwInsertAbstractDlg ( Window* pParent, int nResId) = 0; // add for SwInsertAbstractDlg + virtual AbstractSwInsertAbstractDlg * CreateSwInsertAbstractDlg(Window* pParent) = 0; // add for SwInsertAbstractDlg virtual AbstractSwAsciiFilterDlg* CreateSwAsciiFilterDlg ( Window* pParent, SwDocShell& rDocSh, SvStream* pStream, int nResId ) = 0;// add for SwAsciiFilterDlg virtual VclAbstractDialog * CreateSwInsertBookmarkDlg( Window *pParent, SwWrtShell &rSh, SfxRequest& rReq, int nResId ) = 0;// add for SwInsertBookmarkDlg @@ -474,7 +474,7 @@ public: Window* pParent, SwWrtShell& rWrtSh ) = 0; //add for SwEditRegionDlg virtual AbstractInsertSectionTabDialog* CreateInsertSectionTabDialog( int nResId, Window* pParent, const SfxItemSet& rSet, SwWrtShell& rSh ) = 0; //add for SwInsertSectionTabDialog - virtual AbstractMarkFloatDlg* CreateIndexMarkFloatDlg( int nResId, + virtual AbstractMarkFloatDlg* CreateIndexMarkFloatDlg( SfxBindings* pBindings, SfxChildWindow* pChild, Window *pParent, @@ -486,8 +486,8 @@ public: Window *pParent, SfxChildWinInfo* pInfo, sal_Bool bNew=sal_True) = 0; //add for SwAuthMarkFloatDlg - virtual VclAbstractDialog * CreateIndexMarkModalDlg( int nResId, - Window *pParent, SwWrtShell& rSh, SwTOXMark* pCurTOXMark ) = 0; //add for SwIndexMarkModalDlg + virtual VclAbstractDialog * CreateIndexMarkModalDlg( + Window *pParent, SwWrtShell& rSh, SwTOXMark* pCurTOXMark) = 0; //add for SwIndexMarkModalDlg virtual AbstractMailMergeWizard* CreateMailMergeWizard(SwView& rView, SwMailMergeConfigItem& rConfigItem) = 0; diff --git a/sw/source/ui/app/docsh2.cxx b/sw/source/ui/app/docsh2.cxx index 9d8efd286d16..af61d561bdfa 100644 --- a/sw/source/ui/app/docsh2.cxx +++ b/sw/source/ui/app/docsh2.cxx @@ -982,7 +982,7 @@ void SwDocShell::Execute(SfxRequest& rReq) SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); - AbstractSwInsertAbstractDlg* pDlg = pFact->CreateSwInsertAbstractDlg(0, DLG_INSERT_ABSTRACT ); + AbstractSwInsertAbstractDlg* pDlg = pFact->CreateSwInsertAbstractDlg(0); OSL_ENSURE(pDlg, "Dialogdiet fail!"); if(RET_OK == pDlg->Execute()) { diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx index d3b769432f97..51e1b809afaa 100644 --- a/sw/source/ui/dialog/swdlgfact.cxx +++ b/sw/source/ui/dialog/swdlgfact.cxx @@ -623,22 +623,10 @@ sal_uInt16 AbstractMailMergeWizard_Impl::GetRestartPage() const return pDlg->GetRestartPage(); } -AbstractSwInsertAbstractDlg * SwAbstractDialogFactory_Impl::CreateSwInsertAbstractDlg( Window* pParent, - int nResId ) +AbstractSwInsertAbstractDlg * SwAbstractDialogFactory_Impl::CreateSwInsertAbstractDlg(Window* pParent) { - SwInsertAbstractDlg* pDlg=NULL; - switch ( nResId ) - { - case DLG_INSERT_ABSTRACT : - pDlg = new SwInsertAbstractDlg( pParent); - break; - default: - break; - } - - if ( pDlg ) - return new AbstractSwInsertAbstractDlg_Impl( pDlg ); - return 0; + SwInsertAbstractDlg* pDlg = new SwInsertAbstractDlg( pParent); + return new AbstractSwInsertAbstractDlg_Impl(pDlg); } SfxAbstractDialog* SwAbstractDialogFactory_Impl::CreateSfxDialog( Window* pParent, @@ -1422,26 +1410,15 @@ AbstractInsertSectionTabDialog * SwAbstractDialogFactory_Impl::CreateInsertSecti return 0; } -AbstractMarkFloatDlg * SwAbstractDialogFactory_Impl::CreateIndexMarkFloatDlg( int nResId, +AbstractMarkFloatDlg * SwAbstractDialogFactory_Impl::CreateIndexMarkFloatDlg( SfxBindings* pBindings, SfxChildWindow* pChild, Window *pParent, SfxChildWinInfo* pInfo, sal_Bool bNew ) //add for SwIndexMarkFloatDlg { - SwIndexMarkFloatDlg* pDlg=NULL; - switch ( nResId ) - { - case DLG_INSIDXMARK_CJK : - case DLG_INSIDXMARK : - pDlg = new SwIndexMarkFloatDlg( pBindings, pChild, pParent, pInfo, bNew ); - break; - default: - break; - } - if ( pDlg ) - return new AbstractIndexMarkFloatDlg_Impl( pDlg ); - return 0; + SwIndexMarkFloatDlg* pDlg = new SwIndexMarkFloatDlg(pBindings, pChild, pParent, pInfo, bNew); + return new AbstractIndexMarkFloatDlg_Impl(pDlg); } AbstractMarkFloatDlg * SwAbstractDialogFactory_Impl::CreateAuthMarkFloatDlg( @@ -1466,24 +1443,11 @@ AbstractSwWordCountFloatDlg * SwAbstractDialogFactory_Impl::CreateSwWordCountDia } //add for SwIndexMarkModalDlg begin -VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateIndexMarkModalDlg( int nResId, +VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateIndexMarkModalDlg( Window *pParent, SwWrtShell& rSh, SwTOXMark* pCurTOXMark ) //add for SwIndexMarkModalDlg { - Dialog* pDlg=NULL; - switch ( nResId ) - { - case DLG_EDIT_IDXMARK_CJK : - case DLG_EDIT_IDXMARK : - pDlg = new SwIndexMarkModalDlg( pParent, rSh, pCurTOXMark ); - break; - - default: - break; - } - - if ( pDlg ) - return new VclAbstractDialog_Impl( pDlg ); - return 0; + Dialog* pDlg = new SwIndexMarkModalDlg( pParent, rSh, pCurTOXMark ); + return new VclAbstractDialog_Impl( pDlg ); } //add for SwIndexMarkModalDlg end diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx index 1f4c4b389caf..cbadc6ecb602 100644 --- a/sw/source/ui/dialog/swdlgfact.hxx +++ b/sw/source/ui/dialog/swdlgfact.hxx @@ -441,7 +441,7 @@ public: ); virtual AbstractSwWordCountFloatDlg* CreateSwWordCountDialog(SfxBindings* pBindings, SfxChildWindow* pChild, Window *pParent, SfxChildWinInfo* pInfo); - virtual AbstractSwInsertAbstractDlg * CreateSwInsertAbstractDlg( Window* pParent,int nResId ); + virtual AbstractSwInsertAbstractDlg * CreateSwInsertAbstractDlg(Window* pParent); virtual AbstractSwAsciiFilterDlg* CreateSwAsciiFilterDlg ( Window* pParent, SwDocShell& rDocSh, SvStream* pStream, int nResId ); //add for SwAsciiFilterDlg virtual VclAbstractDialog * CreateSwInsertBookmarkDlg( Window *pParent, SwWrtShell &rSh, SfxRequest& rReq, int nResId );//add for SwInsertBookmarkDlg @@ -553,7 +553,7 @@ public: Window* pParent, SwWrtShell& rWrtSh ); //add for SwEditRegionDlg virtual AbstractInsertSectionTabDialog* CreateInsertSectionTabDialog( int nResId, Window* pParent, const SfxItemSet& rSet, SwWrtShell& rSh); //add for SwInsertSectionTabDialog - virtual AbstractMarkFloatDlg* CreateIndexMarkFloatDlg( int nResId, + virtual AbstractMarkFloatDlg* CreateIndexMarkFloatDlg( SfxBindings* pBindings, SfxChildWindow* pChild, Window *pParent, @@ -565,7 +565,7 @@ public: Window *pParent, SfxChildWinInfo* pInfo, sal_Bool bNew=sal_True); //add for SwAuthMarkFloatDlg - virtual VclAbstractDialog * CreateIndexMarkModalDlg( int nResId, + virtual VclAbstractDialog * CreateIndexMarkModalDlg( Window *pParent, SwWrtShell& rSh, SwTOXMark* pCurTOXMark ); //add for SwIndexMarkModalDlg virtual AbstractMailMergeWizard* CreateMailMergeWizard(SwView& rView, SwMailMergeConfigItem& rConfigItem); diff --git a/sw/source/ui/inc/swuiidxmrk.hxx b/sw/source/ui/inc/swuiidxmrk.hxx index d57c15371564..c62ef5f575fa 100644 --- a/sw/source/ui/inc/swuiidxmrk.hxx +++ b/sw/source/ui/inc/swuiidxmrk.hxx @@ -31,18 +31,16 @@ #include <com/sun/star/container/XNameAccess.hpp> #include <sfx2/basedlgs.hxx> -#include <vcl/fixed.hxx> -#include <vcl/lstbox.hxx> -#include <vcl/combobox.hxx> #include <svx/stddlg.hxx> +#include <vcl/button.hxx> +#include <vcl/combobox.hxx> #include <vcl/field.hxx> - +#include <vcl/fixed.hxx> #include <vcl/group.hxx> +#include <vcl/layout.hxx> +#include <vcl/lstbox.hxx> -#include <vcl/button.hxx> - -#include <vcl/button.hxx> #include <sfx2/childwin.hxx> #include "toxe.hxx" #include <svtools/stdctrl.hxx> @@ -57,51 +55,49 @@ class SwTOXMark; class SwIndexMarkFloatDlg; class SwIndexMarkModalDlg; -class SwIndexMarkDlg : public Window +class SwIndexMarkPane { + Dialog& m_rDialog; + friend class SwIndexMarkFloatDlg; friend class SwIndexMarkModalDlg; - FixedLine aIndexFL; - FixedText aTypeFT; - ListBox aTypeDCB; - ImageButton aNewBT; - - FixedText aEntryFT; - Edit aEntryED; - FixedText aPhoneticFT0; - Edit aPhoneticED0; - - FixedText aKeyFT; - ComboBox aKeyDCB; - FixedText aPhoneticFT1; - Edit aPhoneticED1; - - FixedText aKey2FT; - ComboBox aKey2DCB; - FixedText aPhoneticFT2; - Edit aPhoneticED2; - - FixedText aLevelFT; - NumericField aLevelED; - CheckBox aMainEntryCB; - CheckBox aApplyToAllCB; - CheckBox aSearchCaseSensitiveCB; - CheckBox aSearchCaseWordOnlyCB; - - - OKButton aOKBT; - CancelButton aCancelBT; - HelpButton aHelpBT; - PushButton aDelBT; - //PushButton aNewBT; - - ImageButton aPrevSameBT; - ImageButton aNextSameBT; - ImageButton aPrevBT; - ImageButton aNextBT; + VclFrame* m_pFrame; + FixedText* m_pTypeFT; + ListBox* m_pTypeDCB; + PushButton* m_pNewBT; + + Edit* m_pEntryED; + FixedText* m_pPhoneticFT0; + Edit* m_pPhoneticED0; + + FixedText* m_pKey1FT; + ComboBox* m_pKey1DCB; + FixedText* m_pPhoneticFT1; + Edit* m_pPhoneticED1; + + FixedText* m_pKey2FT; + ComboBox* m_pKey2DCB; + FixedText* m_pPhoneticFT2; + Edit* m_pPhoneticED2; + + FixedText* m_pLevelFT; + NumericField* m_pLevelNF; + CheckBox* m_pMainEntryCB; + CheckBox* m_pApplyToAllCB; + CheckBox* m_pSearchCaseSensitiveCB; + CheckBox* m_pSearchCaseWordOnlyCB; + + + PushButton* m_pOKBT; + PushButton* m_pCloseBT; + PushButton* m_pDelBT; + + PushButton* m_pPrevSameBT; + PushButton* m_pNextSameBT; + PushButton* m_pPrevBT; + PushButton* m_pNextBT; String aOrgStr; - sal_Int32 nOptionsId; sal_Bool bDel; sal_Bool bNewMark; sal_Bool bSelected; @@ -146,27 +142,27 @@ class SwIndexMarkDlg : public Window void UpdateDialog(); void InsertUpdate(); - virtual void Activate(); + void Activate(); public: - SwIndexMarkDlg( Window *pParent, - sal_Bool bNewDlg, - const ResId& rResId, - sal_Int32 _nOptionsId, - SwWrtShell& rWrtShell ); + SwIndexMarkPane(Dialog &rDialog, + sal_Bool bNewDlg, + SwWrtShell& rWrtShell); + + Dialog &GetDialog() { return m_rDialog; } - ~SwIndexMarkDlg(); + ~SwIndexMarkPane(); void ReInitDlg(SwWrtShell& rWrtShell, SwTOXMark* pCurTOXMark = 0); sal_Bool IsTOXType(const String& rName) - {return LISTBOX_ENTRY_NOTFOUND != aTypeDCB.GetEntryPos(rName);} + {return LISTBOX_ENTRY_NOTFOUND != m_pTypeDCB->GetEntryPos(rName);} }; class SwIndexMarkFloatDlg : public SfxModelessDialog { - SwIndexMarkDlg aDlg; + SwIndexMarkPane m_aContent; virtual void Activate(); public: SwIndexMarkFloatDlg( SfxBindings* pBindings, @@ -179,7 +175,7 @@ class SwIndexMarkFloatDlg : public SfxModelessDialog class SwIndexMarkModalDlg : public SvxStandardDialog { - SwIndexMarkDlg aDlg; + SwIndexMarkPane m_aContent; public: SwIndexMarkModalDlg(Window *pParent, SwWrtShell& rSh, SwTOXMark* pCurTOXMark); diff --git a/sw/source/ui/index/idxmrk.cxx b/sw/source/ui/index/idxmrk.cxx index 55bc96d9d945..463b2d2bb3fc 100644 --- a/sw/source/ui/index/idxmrk.cxx +++ b/sw/source/ui/index/idxmrk.cxx @@ -72,7 +72,7 @@ SwInsertIdxMarkWrapper::SwInsertIdxMarkWrapper( Window *pParentWindow, { SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); - pAbstDlg = pFact->CreateIndexMarkFloatDlg( DLG_INSIDXMARK , pBindings, this, pParentWindow, pInfo ); + pAbstDlg = pFact->CreateIndexMarkFloatDlg(pBindings, this, pParentWindow, pInfo); OSL_ENSURE(pAbstDlg, "Dialogdiet fail!"); pWindow = pAbstDlg->GetWindow(); pWindow->Show(); // at this point,because before pSh has to be initialized in ReInitDlg() diff --git a/sw/source/ui/index/idxmrk.hrc b/sw/source/ui/index/idxmrk.hrc index cd00d01fc0c2..9b4d6fe16770 100644 --- a/sw/source/ui/index/idxmrk.hrc +++ b/sw/source/ui/index/idxmrk.hrc @@ -15,85 +15,10 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#define BT_OK 100 -#define BT_CANCEL 101 -#define BT_NXT 102 -#define BT_NXTSAME 103 -#define BT_PREV 104 -#define BT_PREVSAME 105 -#define BT_DEL 106 -#define BT_HELP 107 -#define LBL_INDEX 1 -#define DCB_INDEX 2 -#define LBL_ENTRY 3 -#define SL_ENTRY 4 -#define LBL_KEY 5 -#define DCB_KEY 6 -#define LBL_LEVEL 7 -#define SL_LEVEL 8 -#define FL_INDEX 10 -#define LBL_KEY2 11 -#define DCB_KEY2 12 -#define CB_APPLY_TO_ALL 13 -#define CB_MAIN_ENTRY 14 -#define FT_ENTRY 20 -#define ED_ENTRY 21 #define PB_OK 22 #define PB_CANCEL 23 #define PB_HELP 24 #define FL_ENTRIES 25 -#define PB_CREATEENTRY 26 -#define FL_ENTRY 27 -#define FT_TITLE 28 -#define FI_TITLE 29 -#define FT_AUTHOR 30 -#define FI_AUTHOR 31 -#define ST_CHANGE 32 -#define WIN_DLG 33 -#define BT_NEW 34 #define FL_NAME 37 #define FT_NAME 38 #define ED_NAME 39 -#define LB_ENTRY 40 -#define RB_FROMCOMPONENT 41 -#define RB_FROMDOCCONTENT 42 -#define PB_EDITENTRY 43 -#define CB_CASESENSITIVE 44 -#define CB_WORDONLY 45 -#define FT_PHONETIC_1 46 -#define FT_PHONETIC_2 47 -#define FT_PHONETIC_3 48 -#define ED_PHONETIC_1 48 -#define ED_PHONETIC_2 49 -#define ED_PHONETIC_3 50 - -//------------------------------------------------------ -// defines for positions and sizes for IDX_DIALOG_WINDOW - -#define IDX_COL1 12 -#define IDX_COL2 56 - -#define IDX_COL2_FULLEND 150 -#define IDX_NEWIMAGE_WIDTH 12 -#define IDX_NEWIMAGE_XPOS (IDX_COL2_FULLEND-1-IDX_NEWIMAGE_WIDTH) - -#define IDX_PHONETIC_EDIT_WIDTH 62 -#define IDX_PHONETIC_TEXT_WIDTH 62 - -#define IDX_COL_PHONETIC_TEXT (IDX_COL2+IDX_PHONETIC_EDIT_WIDTH+8) -#define IDX_COL_PHONETIC_EDIT (IDX_COL_PHONETIC_TEXT+IDX_PHONETIC_TEXT_WIDTH+1) - -#define IDX_COL_BUTTONS_NORMAL 162 -#define IDX_COL_BUTTONS_CJK (IDX_COL_PHONETIC_EDIT+IDX_PHONETIC_EDIT_WIDTH+14) - -#define IDX_WIN_WIDTH_NORMAL 218 -#define IDX_WIN_WIDTH_CJK (IDX_WIN_WIDTH_NORMAL+IDX_COL_BUTTONS_CJK-IDX_COL_BUTTONS_NORMAL) - -#define IDX_ROW_2_TEXT 31 -#define IDX_ROW_2_LIST (IDX_ROW_2_TEXT-2) -#define IDX_ROW_3_TEXT 46 -#define IDX_ROW_3_LIST (IDX_ROW_3_TEXT-2) -#define IDX_ROW_4_TEXT 62 -#define IDX_ROW_4_LIST (IDX_ROW_4_TEXT-2) - -//------------------------------------------------------ diff --git a/sw/source/ui/index/idxmrk.src b/sw/source/ui/index/idxmrk.src index 3263796d2a75..e7add7c97aeb 100644 --- a/sw/source/ui/index/idxmrk.src +++ b/sw/source/ui/index/idxmrk.src @@ -31,357 +31,6 @@ #include "helpid.h" #include "cmdid.h" -#define IDX_PHONETIC_LISTBOX_DESCRIPTION \ -Text [ en-US ] = "Phonetic reading"; \ - -#define IDX_DIALOG_WINDOW \ - Window WIN_DLG \ - { \ - Pos = MAP_APPFONT ( 0 , 0 ) ; \ - Size = MAP_APPFONT ( IDX_WIN_WIDTH , WINDOW_HEIGHT ) ; \ - OKButton BT_OK \ - { \ - Pos = MAP_APPFONT ( COL_BUTTONS , 6 ) ; \ - Size = MAP_APPFONT ( 50 , RSC_CD_PUSHBUTTON_HEIGHT ) ; \ - TabStop = TRUE ; \ - DefButton = TRUE ; \ - Text [ en-US ] = "Insert";\ - }; \ - CancelButton BT_CANCEL \ - { \ - Pos = MAP_APPFONT ( COL_BUTTONS , 23 ) ; \ - Size = MAP_APPFONT ( 50 , RSC_CD_PUSHBUTTON_HEIGHT ) ; \ - Text [ en-US ] = "Close";\ - }; \ - HelpButton BT_HELP \ - { \ - Pos = MAP_APPFONT ( COL_BUTTONS , 43 ) ; \ - Size = MAP_APPFONT ( 50 , RSC_CD_PUSHBUTTON_HEIGHT ) ; \ - }; \ - PushButton BT_DEL \ - { \ - Pos = MAP_APPFONT ( COL_BUTTONS , 63 ) ; \ - Size = MAP_APPFONT ( 50 , RSC_CD_PUSHBUTTON_HEIGHT ) ; \ - Text [ en-US ] = "~Delete" ; \ - TabStop = TRUE ; \ - }; \ - ListBox DCB_INDEX \ - { \ - Pos = MAP_APPFONT ( IDX_COL2 , 14) ; \ - Size = MAP_APPFONT ( DCB_INDEX_WIDTH , 56 ) ; \ - TabStop = TRUE ; \ - DropDown = TRUE ; \ - }; \ - ImageButton BT_NEW \ - { \ - Pos = MAP_APPFONT ( IDX_NEWIMAGE_XPOS , 13 ) ; \ - Size = MAP_APPFONT ( IDX_NEWIMAGE_WIDTH , 15 ) ; \ - QuickHelpText [ en-US ] = "New User-defined Index";\ - }; \ - ImageButton BT_PREVSAME \ - { \ - Hide = TRUE ; \ - Pos = MAP_APPFONT ( COL_BUTTONS , 80 ) ; \ - Size = MAP_APPFONT ( 24 , 14 ) ; \ - TabStop = TRUE ; \ - SYMBOL = IMAGEBUTTON_FIRST ; \ - }; \ - ImageButton BT_PREV \ - { \ - Hide = TRUE ; \ - Pos = MAP_APPFONT ( COL_BUTTONS , 97 ) ; \ - Size = MAP_APPFONT ( 24 , 14 ) ; \ - TabStop = TRUE ; \ - SYMBOL = IMAGEBUTTON_PREV ; \ - }; \ - ImageButton BT_NXT \ - { \ - Hide = TRUE ; \ - Pos = MAP_APPFONT ( COL_BUTTONS_2 , 97 ) ; \ - Size = MAP_APPFONT ( 24 , 14 ) ; \ - TabStop = TRUE ; \ - SYMBOL = IMAGEBUTTON_NEXT ; \ - }; \ - ImageButton BT_NXTSAME \ - { \ - Hide = TRUE ; \ - Pos = MAP_APPFONT ( COL_BUTTONS_2 , 80 ) ; \ - Size = MAP_APPFONT ( 24 , 14 ) ; \ - TabStop = TRUE ; \ - SYMBOL = IMAGEBUTTON_LAST ; \ - }; \ - FixedLine FL_INDEX \ - { \ - Pos = MAP_APPFONT ( 6 , 3 ) ; \ - Size = MAP_APPFONT ( COL_BUTTONS-5-6 , RSC_CD_FIXEDLINE_HEIGHT ) ; \ - Text [ en-US ] = "Selection" ; \ - }; \ - FixedText LBL_INDEX \ - { \ - Pos = MAP_APPFONT ( IDX_COL1 , 16 ) ; \ - Size = MAP_APPFONT ( 40 , 10 ) ; \ - Text [ en-US ] = "~Index" ; \ - Left = TRUE ; \ - }; \ - Edit SL_ENTRY \ - { \ - Border = TRUE ; \ - Pos = MAP_APPFONT ( IDX_COL2 , IDX_ROW_2_LIST ) ; \ - Size = MAP_APPFONT ( LIST_WIDTH , 12 ) ; \ - TabStop = TRUE ; \ - Left = TRUE ; \ - }; \ - FixedText LBL_ENTRY \ - { \ - Pos = MAP_APPFONT ( IDX_COL1 , IDX_ROW_2_TEXT ) ; \ - Size = MAP_APPFONT ( 27 , RSC_CD_FIXEDTEXT_HEIGHT ) ; \ - Text [ en-US ] = "~Entry" ; \ - Left = TRUE ; \ - }; \ - FixedText LBL_KEY \ - { \ - Disable = TRUE ; \ - Pos = MAP_APPFONT ( IDX_COL1 , IDX_ROW_3_TEXT ) ; \ - Size = MAP_APPFONT ( 42 , RSC_CD_FIXEDTEXT_HEIGHT ) ; \ - Text [ en-US ] = "~1st key" ; \ - Left = TRUE ; \ - }; \ - ComboBox DCB_KEY \ - { \ - Disable = TRUE ; \ - Pos = MAP_APPFONT ( IDX_COL2 , IDX_ROW_3_LIST ) ; \ - Size = MAP_APPFONT ( LIST_WIDTH , 56 ) ; \ - TabStop = TRUE ; \ - DropDown = TRUE ; \ - }; \ - FixedText LBL_KEY2 \ - { \ - Disable = TRUE ; \ - Pos = MAP_APPFONT ( IDX_COL1 , IDX_ROW_4_TEXT ) ; \ - Size = MAP_APPFONT ( 42 , RSC_CD_FIXEDTEXT_HEIGHT ) ; \ - Text [ en-US ] = "~2nd key" ; \ - Left = TRUE ; \ - }; \ - ComboBox DCB_KEY2 \ - { \ - Disable = TRUE ; \ - Pos = MAP_APPFONT ( IDX_COL2 , IDX_ROW_4_LIST ) ; \ - Size = MAP_APPFONT ( LIST_WIDTH , 56 ) ; \ - TabStop = TRUE ; \ - DropDown = TRUE ; \ - }; \ - FixedText FT_PHONETIC_1 \ - { \ - Pos = MAP_APPFONT ( IDX_COL_PHONETIC_TEXT , IDX_ROW_2_TEXT ) ; \ - Size = MAP_APPFONT ( IDX_PHONETIC_TEXT_WIDTH , RSC_CD_FIXEDTEXT_HEIGHT ) ; \ - Hide = PHONETIC_HIDDEN; \ - IDX_PHONETIC_LISTBOX_DESCRIPTION \ - }; \ - Edit ED_PHONETIC_1 \ - { \ - Border = TRUE ; \ - Pos = MAP_APPFONT ( IDX_COL_PHONETIC_EDIT , IDX_ROW_2_LIST ) ; \ - Size = MAP_APPFONT ( IDX_PHONETIC_EDIT_WIDTH , 12 ) ; \ - Hide = PHONETIC_HIDDEN; \ - TabStop = TRUE ; \ - Left = TRUE ; \ - }; \ - FixedText FT_PHONETIC_2 \ - { \ - Pos = MAP_APPFONT ( IDX_COL_PHONETIC_TEXT , IDX_ROW_3_TEXT ) ; \ - Size = MAP_APPFONT ( IDX_PHONETIC_TEXT_WIDTH , RSC_CD_FIXEDTEXT_HEIGHT ) ; \ - Hide = PHONETIC_HIDDEN; \ - IDX_PHONETIC_LISTBOX_DESCRIPTION \ - }; \ - Edit ED_PHONETIC_2 \ - { \ - Border = TRUE ; \ - Pos = MAP_APPFONT ( IDX_COL_PHONETIC_EDIT , IDX_ROW_3_LIST ) ; \ - Size = MAP_APPFONT ( IDX_PHONETIC_EDIT_WIDTH , 12 ) ; \ - Hide = PHONETIC_HIDDEN; \ - TabStop = TRUE ; \ - Left = TRUE ; \ - }; \ - FixedText FT_PHONETIC_3 \ - { \ - Pos = MAP_APPFONT ( IDX_COL_PHONETIC_TEXT , IDX_ROW_4_TEXT ) ; \ - Size = MAP_APPFONT ( IDX_PHONETIC_TEXT_WIDTH , RSC_CD_FIXEDTEXT_HEIGHT ) ; \ - Hide = PHONETIC_HIDDEN; \ - IDX_PHONETIC_LISTBOX_DESCRIPTION \ - }; \ - Edit ED_PHONETIC_3 \ - { \ - Border = TRUE ; \ - Pos = MAP_APPFONT ( IDX_COL_PHONETIC_EDIT , IDX_ROW_4_LIST ) ; \ - Size = MAP_APPFONT ( IDX_PHONETIC_EDIT_WIDTH , 12 ) ; \ - Hide = PHONETIC_HIDDEN; \ - TabStop = TRUE ; \ - Left = TRUE ; \ - }; \ - FixedText LBL_LEVEL \ - { \ - Pos = MAP_APPFONT ( IDX_COL1 , 76 ) ; \ - Size = MAP_APPFONT ( 41 , RSC_CD_FIXEDTEXT_HEIGHT ) ; \ - Text [ en-US ] = "~Level" ; \ - Left = TRUE ; \ - }; \ - NumericField SL_LEVEL \ - { \ - Border = TRUE ; \ - Pos = MAP_APPFONT ( IDX_COL2 , 74 ) ; \ - Size = MAP_APPFONT ( 18 , 12 ) ; \ - TabStop = TRUE ; \ - Left = TRUE ; \ - Repeat = TRUE ; \ - Spin = TRUE ; \ - Minimum = 1 ; \ - Maximum = 10 ; \ - Value = 1 ; \ - Last = 10 ; \ - SpinSize = 1 ; \ - }; \ - CheckBox CB_MAIN_ENTRY \ - { \ - Pos = MAP_APPFONT ( IDX_COL1 , 76 ) ; \ - Size = MAP_APPFONT ( 100 , 8 ) ; \ - Text [ en-US ] = "~Main entry";\ - }; \ - CheckBox CB_APPLY_TO_ALL \ - { \ - Pos = MAP_APPFONT ( IDX_COL1 , 90 ) ; \ - Size = MAP_APPFONT ( 140 , 12 ) ; \ - Hide = TRUE; \ - Text [ en-US ] = "~Apply to all similar texts"; \ - }; \ - CheckBox CB_CASESENSITIVE \ - { \ - Pos = MAP_APPFONT ( 21 , 104 ) ; \ - Size = MAP_APPFONT ( 131 , 12 ) ; \ - Hide = TRUE;\ - Text [ en-US ] = "Ma~tch case";\ - }; \ - CheckBox CB_WORDONLY \ - { \ - Pos = MAP_APPFONT ( 21 , 118 ) ; \ - Size = MAP_APPFONT ( 131 , 12 ) ; \ - Hide = TRUE;\ - Text [ en-US ] = "~Whole words only";\ - }; \ - }; - -ModalDialog DLG_EDIT_IDXMARK -{ - OutputSize = TRUE ; - Moveable = TRUE ; - Closeable = TRUE; - Sizeable = FALSE ; - HelpId = CMD_FN_EDIT_IDX_ENTRY_DLG; - SVLook = TRUE ; - #define IDX_WIN_WIDTH IDX_WIN_WIDTH_NORMAL - Size = MAP_APPFONT ( IDX_WIN_WIDTH , 118 ) ; - #define GB_HEIGHT 109 - #define DCB_INDEX_WIDTH 94 - #define PHONETIC_HIDDEN TRUE - #define LIST_WIDTH 94 - #define COL_BUTTONS IDX_COL_BUTTONS_NORMAL - #define COL_BUTTONS_2 (COL_BUTTONS+26) - #define WINDOW_HEIGHT 118 - IDX_DIALOG_WINDOW - #undef IDX_WIN_WIDTH - #undef GB_HEIGHT - #undef DCB_INDEX_WIDTH - #undef PHONETIC_HIDDEN - #undef LIST_WIDTH - #undef COL_BUTTONS - #undef COL_BUTTONS_2 - #undef WINDOW_HEIGHT -}; -ModalDialog DLG_EDIT_IDXMARK_CJK -{ - OutputSize = TRUE ; - Moveable = TRUE ; - Closeable = TRUE; - Sizeable = FALSE ; - HelpId = CMD_FN_EDIT_IDX_ENTRY_DLG; - SVLook = TRUE ; - #define IDX_WIN_WIDTH IDX_WIN_WIDTH_CJK - Size = MAP_APPFONT ( IDX_WIN_WIDTH , 118 ) ; - #define GB_HEIGHT 109 - #define DCB_INDEX_WIDTH 94 - #define PHONETIC_HIDDEN FALSE - #define LIST_WIDTH IDX_PHONETIC_EDIT_WIDTH - #define COL_BUTTONS IDX_COL_BUTTONS_CJK - #define COL_BUTTONS_2 (COL_BUTTONS+26) - #define WINDOW_HEIGHT 118 - IDX_DIALOG_WINDOW - #undef IDX_WIN_WIDTH - #undef GB_HEIGHT - #undef DCB_INDEX_WIDTH - #undef PHONETIC_HIDDEN - #undef LIST_WIDTH - #undef COL_BUTTONS - #undef COL_BUTTONS_2 - #undef WINDOW_HEIGHT -}; -ModelessDialog DLG_INSIDXMARK -{ - OutputSize = TRUE ; - Moveable = TRUE ; - Closeable = TRUE; - Sizeable = FALSE ; - Hide = TRUE ; -// Zoomable = TRUE ; - HelpId = CMD_FN_INSERT_IDX_ENTRY_DLG; - SVLook = TRUE ; - #define IDX_WIN_WIDTH IDX_WIN_WIDTH_NORMAL - Size = MAP_APPFONT ( IDX_WIN_WIDTH , 138) ; -// Moveable = TRUE ; - #define GB_HEIGHT 129 - #define DCB_INDEX_WIDTH 79 - #define PHONETIC_HIDDEN TRUE - #define LIST_WIDTH 94 - #define COL_BUTTONS IDX_COL_BUTTONS_NORMAL - #define COL_BUTTONS_2 (COL_BUTTONS+26) - #define WINDOW_HEIGHT 138 - IDX_DIALOG_WINDOW - #undef IDX_WIN_WIDTH - #undef GB_HEIGHT - #undef DCB_INDEX_WIDTH - #undef PHONETIC_HIDDEN - #undef LIST_WIDTH - #undef COL_BUTTONS - #undef COL_BUTTONS_2 - #undef WINDOW_HEIGHT -}; -ModelessDialog DLG_INSIDXMARK_CJK -{ - OutputSize = TRUE ; - Moveable = TRUE ; - Closeable = TRUE; - Sizeable = FALSE ; -// Zoomable = TRUE ; - HelpId = CMD_FN_INSERT_IDX_ENTRY_DLG; - SVLook = TRUE ; - #define IDX_WIN_WIDTH IDX_WIN_WIDTH_CJK - Size = MAP_APPFONT ( IDX_WIN_WIDTH , 138) ; -// Moveable = TRUE ; - #define GB_HEIGHT 129 - #define DCB_INDEX_WIDTH 79 - #define PHONETIC_HIDDEN FALSE - #define LIST_WIDTH IDX_PHONETIC_EDIT_WIDTH - #define COL_BUTTONS IDX_COL_BUTTONS_CJK - #define COL_BUTTONS_2 (COL_BUTTONS+26) - #define WINDOW_HEIGHT 138 - IDX_DIALOG_WINDOW - #undef IDX_WIN_WIDTH - #undef GB_HEIGHT - #undef DCB_INDEX_WIDTH - #undef PHONETIC_HIDDEN - #undef LIST_WIDTH - #undef COL_BUTTONS - #undef COL_BUTTONS_2 - #undef WINDOW_HEIGHT -}; ModalDialog DLG_NEW_USER_IDX { OutputSize = TRUE ; diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx index 30c9fb9a0a09..b754eac9d5d4 100644 --- a/sw/source/ui/index/swuiidxmrk.cxx +++ b/sw/source/ui/index/swuiidxmrk.cxx @@ -90,66 +90,50 @@ using namespace ::com::sun::star; /*-------------------------------------------------------------------- Description: dialog to insert a directory selection --------------------------------------------------------------------*/ -SwIndexMarkDlg::SwIndexMarkDlg(Window *pParent, - sal_Bool bNewDlg, - const ResId& rResId, - sal_Int32 _nOptionsId, SwWrtShell& rWrtShell ) : - Window(pParent, rResId), - aIndexFL(this, SW_RES(FL_INDEX )), - aTypeFT (this, SW_RES(LBL_INDEX )), - aTypeDCB(this, SW_RES(DCB_INDEX )), - aNewBT(this, SW_RES(BT_NEW )), - - aEntryFT(this, SW_RES(LBL_ENTRY )), - aEntryED(this, SW_RES(SL_ENTRY )), - aPhoneticFT0(this, SW_RES(FT_PHONETIC_1 )), - aPhoneticED0(this, SW_RES(ED_PHONETIC_1 )), - - aKeyFT(this, SW_RES(LBL_KEY )), - aKeyDCB(this, SW_RES(DCB_KEY )), - aPhoneticFT1(this, SW_RES(FT_PHONETIC_2 )), - aPhoneticED1(this, SW_RES(ED_PHONETIC_2 )), - - aKey2FT(this, SW_RES(LBL_KEY2 )), - aKey2DCB(this, SW_RES(DCB_KEY2 )), - aPhoneticFT2(this, SW_RES(FT_PHONETIC_3 )), - aPhoneticED2(this, SW_RES(ED_PHONETIC_3 )), - - aLevelFT(this, SW_RES(LBL_LEVEL )), - aLevelED(this, SW_RES(SL_LEVEL )), - aMainEntryCB(this, SW_RES(CB_MAIN_ENTRY )), - aApplyToAllCB(this,SW_RES(CB_APPLY_TO_ALL)), - aSearchCaseSensitiveCB(this, SW_RES(CB_CASESENSITIVE )), - aSearchCaseWordOnlyCB(this, SW_RES(CB_WORDONLY )), - - - aOKBT(this, SW_RES(BT_OK )), - aCancelBT(this, SW_RES(BT_CANCEL )), - aHelpBT(this, SW_RES(BT_HELP )), - aDelBT(this, SW_RES(BT_DEL )), - - aPrevSameBT(this,SW_RES(BT_PREVSAME)), - aNextSameBT(this,SW_RES(BT_NXTSAME)), - aPrevBT(this, SW_RES(BT_PREV )), - aNextBT(this, SW_RES(BT_NXT )), - - nOptionsId( _nOptionsId ), - bDel(sal_False), - bNewMark(bNewDlg), - bSelected(sal_False), - - bPhoneticED0_ChangedByUser(sal_False), - bPhoneticED1_ChangedByUser(sal_False), - bPhoneticED2_ChangedByUser(sal_False), - nLangForPhoneticReading(2052), - bIsPhoneticReadingEnabled(sal_False), - xExtendedIndexEntrySupplier(NULL), - pTOXMgr(0), - pSh(&rWrtShell) +SwIndexMarkPane::SwIndexMarkPane(Dialog &rDialog, sal_Bool bNewDlg, + SwWrtShell& rWrtShell) + : m_rDialog(rDialog) + , bNewMark(bNewDlg) + , bSelected(sal_False) + , bPhoneticED0_ChangedByUser(sal_False) + , bPhoneticED1_ChangedByUser(sal_False) + , bPhoneticED2_ChangedByUser(sal_False) + , nLangForPhoneticReading(LANGUAGE_CHINESE_SIMPLIFIED) + , bIsPhoneticReadingEnabled(sal_False) + , xExtendedIndexEntrySupplier(NULL) + , pTOXMgr(0) + , pSh(&rWrtShell) { - aNewBT.SetAccessibleRelationMemberOf(&aIndexFL); - - if( SvtCJKOptions().IsCJKFontEnabled() ) + rDialog.get(m_pFrame, "frame"); + rDialog.get(m_pTypeFT, "typeft"); + rDialog.get(m_pTypeDCB, "typecb"); + rDialog.get(m_pNewBT, "new"); + m_pNewBT->SetAccessibleRelationMemberOf(m_pFrame->get_label_widget()); + rDialog.get(m_pEntryED, "entryed"); + rDialog.get(m_pPhoneticFT0, "phonetic0ft"); + rDialog.get(m_pPhoneticED0, "phonetic0ed"); + rDialog.get(m_pKey1FT, "key1ft"); + rDialog.get(m_pKey1DCB, "key1cb"); + rDialog.get(m_pPhoneticFT1, "phonetic1ft"); + rDialog.get(m_pPhoneticED1, "phonetic1ed"); + rDialog.get(m_pKey2FT, "key2ft"); + rDialog.get(m_pKey2DCB, "key2cb"); + rDialog.get(m_pPhoneticFT2, "phonetic2ft"); + rDialog.get(m_pPhoneticED2, "phonetic2ed"); + rDialog.get(m_pLevelFT, "levelft"); + rDialog.get(m_pLevelNF, "levelnf"); + rDialog.get(m_pMainEntryCB, "mainentrycb"); + rDialog.get(m_pApplyToAllCB, "applytoallcb"); + rDialog.get(m_pSearchCaseSensitiveCB, "searchcasesensitivecb"); + rDialog.get(m_pSearchCaseWordOnlyCB, "searchcasewordonlycb"); + rDialog.get(m_pCloseBT, "close"); + rDialog.get(m_pDelBT, "delete"); + rDialog.get(m_pPrevSameBT, "first"); + rDialog.get(m_pNextSameBT, "last"); + rDialog.get(m_pPrevBT, "previous"); + rDialog.get(m_pNextBT, "next"); + + if (SvtCJKOptions().IsCJKFontEnabled()) { uno::Reference< lang::XMultiServiceFactory > xMSF = getProcessServiceFactory(); @@ -157,106 +141,87 @@ SwIndexMarkDlg::SwIndexMarkDlg(Window *pParent, uno::Reference< i18n::XExtendedIndexEntrySupplier > ( xMSF->createInstance( C2U("com.sun.star.i18n.IndexEntrySupplier") ), uno::UNO_QUERY ); + + m_pPhoneticFT0->Show(); + m_pPhoneticED0->Show(); + m_pPhoneticFT1->Show(); + m_pPhoneticED1->Show(); + m_pPhoneticFT2->Show(); + m_pPhoneticED2->Show(); } - SetStyle(GetStyle()|WB_DIALOGCONTROL); - FreeResource(); - aOKBT .SetHelpId(HID_INSERT_IDX_MRK_OK ); - aCancelBT .SetHelpId(HID_INSERT_IDX_MRK_CLOSE ); - aDelBT .SetHelpId(HID_INSERT_IDX_MRK_DELETE ); - aNewBT .SetHelpId(HID_INSERT_IDX_MRK_NEW ); - aPrevBT .SetHelpId(HID_INSERT_IDX_MRK_PREV ); - aPrevSameBT .SetHelpId(HID_INSERT_IDX_MRK_PREV_SAME ); - aNextBT .SetHelpId(HID_INSERT_IDX_MRK_NEXT ); - aNextSameBT .SetHelpId(HID_INSERT_IDX_MRK_NEXT_SAME ); - aTypeDCB .SetHelpId(HID_INSERT_IDX_MRK_TYPE ); - aEntryED .SetHelpId(HID_INSERT_IDX_MRK_ENTRY ); - aKeyDCB .SetHelpId(HID_INSERT_IDX_MRK_PRIM_KEY ); - aKey2DCB .SetHelpId(HID_INSERT_IDX_MRK_SEC_KEY ); - aLevelED .SetHelpId(HID_INSERT_IDX_MRK_LEVEL ); - aMainEntryCB .SetHelpId(HID_INSERT_IDX_MRK_MAIN_ENTRY); - aApplyToAllCB .SetHelpId(HID_INSERT_IDX_MRK_APPLY_ALL ); - aPhoneticED0 .SetHelpId(HID_INSERT_IDX_MRK_PHONETIC_READING ); - aPhoneticED1 .SetHelpId(HID_INSERT_IDX_MRK_PHONETIC_READING ); - aPhoneticED2 .SetHelpId(HID_INSERT_IDX_MRK_PHONETIC_READING ); - - aSearchCaseSensitiveCB.SetHelpId( HID_INSERT_IDX_MRK_SRCH_CASESENSITIVE ); - aSearchCaseWordOnlyCB.SetHelpId( HID_INSERT_IDX_MRK_SRCH_WORDONLY ); - - - GetParent()->SetText( SW_RESSTR( bNewMark ? STR_IDXMRK_INSERT : STR_IDXMRK_EDIT)); - - aDelBT.SetClickHdl(LINK(this,SwIndexMarkDlg, DelHdl)); - aPrevBT.SetClickHdl(LINK(this,SwIndexMarkDlg, PrevHdl)); - aPrevSameBT.SetClickHdl(LINK(this,SwIndexMarkDlg, PrevSameHdl)); - aNextBT.SetClickHdl(LINK(this,SwIndexMarkDlg, NextHdl)); - aNextSameBT.SetClickHdl(LINK(this,SwIndexMarkDlg, NextSameHdl)); - aTypeDCB.SetSelectHdl(LINK(this,SwIndexMarkDlg, ModifyHdl)); - aKeyDCB.SetModifyHdl(LINK(this,SwIndexMarkDlg, KeyDCBModifyHdl)); - aKey2DCB.SetModifyHdl(LINK(this,SwIndexMarkDlg, KeyDCBModifyHdl)); - aOKBT.SetClickHdl(LINK(this,SwIndexMarkDlg, InsertHdl)); - aCancelBT.SetClickHdl(LINK(this,SwIndexMarkDlg, CloseHdl)); - aEntryED.SetModifyHdl(LINK(this,SwIndexMarkDlg, ModifyHdl)); - aNewBT.SetClickHdl(LINK(this, SwIndexMarkDlg, NewUserIdxHdl)); - aApplyToAllCB.SetClickHdl(LINK(this, SwIndexMarkDlg, SearchTypeHdl)); - aPhoneticED0.SetModifyHdl(LINK(this,SwIndexMarkDlg, PhoneticEDModifyHdl)); - aPhoneticED1.SetModifyHdl(LINK(this,SwIndexMarkDlg, PhoneticEDModifyHdl)); - aPhoneticED2.SetModifyHdl(LINK(this,SwIndexMarkDlg, PhoneticEDModifyHdl)); + rDialog.SetText( SW_RESSTR( bNewMark ? STR_IDXMRK_INSERT : STR_IDXMRK_EDIT)); + + m_pDelBT->SetClickHdl(LINK(this,SwIndexMarkPane, DelHdl)); + m_pPrevBT->SetClickHdl(LINK(this,SwIndexMarkPane, PrevHdl)); + m_pPrevSameBT->SetClickHdl(LINK(this,SwIndexMarkPane, PrevSameHdl)); + m_pNextBT->SetClickHdl(LINK(this,SwIndexMarkPane, NextHdl)); + m_pNextSameBT->SetClickHdl(LINK(this,SwIndexMarkPane, NextSameHdl)); + m_pTypeDCB->SetSelectHdl(LINK(this,SwIndexMarkPane, ModifyHdl)); + m_pKey1DCB->SetModifyHdl(LINK(this,SwIndexMarkPane, KeyDCBModifyHdl)); + m_pKey2DCB->SetModifyHdl(LINK(this,SwIndexMarkPane, KeyDCBModifyHdl)); + m_pCloseBT->SetClickHdl(LINK(this,SwIndexMarkPane, CloseHdl)); + m_pEntryED->SetModifyHdl(LINK(this,SwIndexMarkPane, ModifyHdl)); + m_pNewBT->SetClickHdl(LINK(this, SwIndexMarkPane, NewUserIdxHdl)); + m_pApplyToAllCB->SetClickHdl(LINK(this, SwIndexMarkPane, SearchTypeHdl)); + m_pPhoneticED0->SetModifyHdl(LINK(this,SwIndexMarkPane, PhoneticEDModifyHdl)); + m_pPhoneticED1->SetModifyHdl(LINK(this,SwIndexMarkPane, PhoneticEDModifyHdl)); + m_pPhoneticED2->SetModifyHdl(LINK(this,SwIndexMarkPane, PhoneticEDModifyHdl)); if(bNewMark) { - aDelBT.Hide(); - ImageList aTempList( SW_RES( IMG_NAVI_ENTRYBMP ) ); - aNewBT.SetModeImage( aTempList.GetImage( SID_SW_START + CONTENT_TYPE_INDEX ) ); + m_pDelBT->Hide(); + rDialog.get(m_pOKBT, "insert"); } else { - aNewBT.Hide(); - OKButton aTmp(this, WB_HIDE); - aOKBT.SetText( aTmp.GetText() ); + m_pNewBT->Hide(); + rDialog.get(m_pOKBT, "ok"); } + m_pOKBT->Show(); + m_pOKBT->SetClickHdl(LINK(this, SwIndexMarkPane, InsertHdl)); - aEntryED.GrabFocus(); + m_pEntryED->GrabFocus(); } /*-------------------------------------------------------------------- Description: Newly initialise controls with the new selection --------------------------------------------------------------------*/ -void SwIndexMarkDlg::InitControls() +void SwIndexMarkPane::InitControls() { OSL_ENSURE(pSh && pTOXMgr, "no shell?"); // contents index const SwTOXType* pType = pTOXMgr->GetTOXType(TOX_CONTENT, 0); OSL_ENSURE(pType, "Kein Verzeichnistyp !!"); String sTmpTypeSelection; - if(aTypeDCB.GetSelectEntryCount()) - sTmpTypeSelection = aTypeDCB.GetSelectEntry(); - aTypeDCB.Clear(); - aTypeDCB.InsertEntry(pType->GetTypeName()); + if(m_pTypeDCB->GetSelectEntryCount()) + sTmpTypeSelection = m_pTypeDCB->GetSelectEntry(); + m_pTypeDCB->Clear(); + m_pTypeDCB->InsertEntry(pType->GetTypeName()); // keyword index pType = pTOXMgr->GetTOXType(TOX_INDEX, 0); OSL_ENSURE(pType, "Kein Verzeichnistyp !!"); - aTypeDCB.InsertEntry(pType->GetTypeName()); + m_pTypeDCB->InsertEntry(pType->GetTypeName()); // user index sal_uInt16 nCount = pSh->GetTOXTypeCount(TOX_USER); sal_uInt16 i; for( i = 0; i < nCount; ++i ) - aTypeDCB.InsertEntry( pSh->GetTOXType(TOX_USER, i)->GetTypeName() ); + m_pTypeDCB->InsertEntry( pSh->GetTOXType(TOX_USER, i)->GetTypeName() ); // read keywords primary std::vector<String> aArr; nCount = pSh->GetTOIKeys( TOI_PRIMARY, aArr ); std::sort(aArr.begin(), aArr.end()); for (std::vector<String>::iterator it = aArr.begin(); it != aArr.end(); ++it) - aKeyDCB.InsertEntry( *it ); + m_pKey1DCB->InsertEntry( *it ); // read keywords secondary nCount = pSh->GetTOIKeys( TOI_SECONDARY, aArr ); std::sort(aArr.begin(), aArr.end()); for (std::vector<String>::iterator it = aArr.begin(); it != aArr.end(); ++it) - aKey2DCB.InsertEntry( *it ); + m_pKey2DCB->InsertEntry( *it ); UpdateLanguageDependenciesForPhoneticReading(); @@ -276,37 +241,37 @@ void SwIndexMarkDlg::InitControls() pMoveMark = &pSh->GotoTOXMark( *pMark, TOX_PRV ); if( pMoveMark != pMark ) pSh->GotoTOXMark( *pMoveMark, TOX_NXT ), bShow = sal_True; - aPrevBT.Enable( pMoveMark != pMark ); + m_pPrevBT->Enable( pMoveMark != pMark ); pMoveMark = &pSh->GotoTOXMark( *pMark, TOX_NXT ); if( pMoveMark != pMark ) pSh->GotoTOXMark( *pMoveMark, TOX_PRV ), bShow = sal_True; - aNextBT.Enable( pMoveMark != pMark ); + m_pNextBT->Enable( pMoveMark != pMark ); if( bShow ) { - aPrevBT.Show(); - aNextBT.Show(); + m_pPrevBT->Show(); + m_pNextBT->Show(); bShow = sal_False; } pMoveMark = &pSh->GotoTOXMark( *pMark, TOX_SAME_PRV ); if( pMoveMark != pMark ) pSh->GotoTOXMark( *pMoveMark, TOX_SAME_NXT ), bShow = sal_True; - aPrevSameBT.Enable( pMoveMark != pMark ); + m_pPrevSameBT->Enable( pMoveMark != pMark ); pMoveMark = &pSh->GotoTOXMark( *pMark, TOX_SAME_NXT ); if( pMoveMark != pMark ) pSh->GotoTOXMark( *pMoveMark, TOX_SAME_PRV ), bShow = sal_True; - aNextSameBT.Enable( pMoveMark != pMark ); + m_pNextSameBT->Enable( pMoveMark != pMark ); if( bShow ) { - aNextSameBT.Show(); - aPrevSameBT.Show(); + m_pNextSameBT->Show(); + m_pPrevSameBT->Show(); } pSh->EndCrsrMove(); - aTypeFT.Show(); + m_pTypeFT->Show(); - aTypeDCB.Enable(sal_False); - aTypeFT.Enable(sal_False); + m_pTypeDCB->Enable(sal_False); + m_pTypeFT->Enable(sal_False); UpdateDialog(); } @@ -317,30 +282,30 @@ void SwIndexMarkDlg::InitControls() { bSelected = !pSh->HasSelection(); aOrgStr = pSh->GetView().GetSelectionTextParam(sal_True, sal_False); - aEntryED.SetText(aOrgStr); + m_pEntryED->SetText(aOrgStr); //to include all equal entries may only be allowed in the body and even there //only when a simple selection exists const sal_uInt16 nFrmType = pSh->GetFrmType(0,sal_True); - aApplyToAllCB.Show(); - aSearchCaseSensitiveCB.Show(); - aSearchCaseWordOnlyCB.Show(); - aApplyToAllCB.Enable(0 != aOrgStr.Len() && + m_pApplyToAllCB->Show(); + m_pSearchCaseSensitiveCB->Show(); + m_pSearchCaseWordOnlyCB->Show(); + m_pApplyToAllCB->Enable(0 != aOrgStr.Len() && 0 == (nFrmType & ( FRMTYPE_HEADER | FRMTYPE_FOOTER | FRMTYPE_FLY_ANY ))); - SearchTypeHdl(&aApplyToAllCB); + SearchTypeHdl(m_pApplyToAllCB); } // index type is default if( sTmpTypeSelection.Len() && - LISTBOX_ENTRY_NOTFOUND != aTypeDCB.GetEntryPos( sTmpTypeSelection ) ) - aTypeDCB.SelectEntry(sTmpTypeSelection); + LISTBOX_ENTRY_NOTFOUND != m_pTypeDCB->GetEntryPos( sTmpTypeSelection ) ) + m_pTypeDCB->SelectEntry(sTmpTypeSelection); else - aTypeDCB.SelectEntry(aTypeDCB.GetEntry(nTypePos)); - ModifyHdl(&aTypeDCB); + m_pTypeDCB->SelectEntry(m_pTypeDCB->GetEntry(nTypePos)); + ModifyHdl(m_pTypeDCB); } } -void SwIndexMarkDlg::UpdateLanguageDependenciesForPhoneticReading() +void SwIndexMarkPane::UpdateLanguageDependenciesForPhoneticReading() { //no phonetic reading if no global cjk support if( !xExtendedIndexEntrySupplier.is() ) @@ -388,7 +353,7 @@ void SwIndexMarkDlg::UpdateLanguageDependenciesForPhoneticReading() } -String SwIndexMarkDlg::GetDefaultPhoneticReading( const String& rText ) +String SwIndexMarkPane::GetDefaultPhoneticReading( const String& rText ) { if( !bIsPhoneticReadingEnabled ) return aEmptyStr; @@ -398,9 +363,9 @@ String SwIndexMarkDlg::GetDefaultPhoneticReading( const String& rText ) } /* -------------------------------------------------- - Change the content of aEntryED if text is selected + Change the content of m_pEntryED if text is selected --------------------------------------------------*/ -void SwIndexMarkDlg::Activate() +void SwIndexMarkPane::Activate() { // display current selection (first element) ???? if(bNewMark) @@ -410,26 +375,26 @@ void SwIndexMarkDlg::Activate() { bSelected = !pSh->HasSelection(); aOrgStr = pSh->GetView().GetSelectionTextParam(sal_True, sal_False); - aEntryED.SetText(aOrgStr); + m_pEntryED->SetText(aOrgStr); //to include all equal entries may only be allowed in the body and even there //only when a simple selection exists const sal_uInt16 nFrmType = pSh->GetFrmType(0,sal_True); - aApplyToAllCB.Show(); - aSearchCaseSensitiveCB.Show(); - aSearchCaseWordOnlyCB.Show(); - aApplyToAllCB.Enable(0 != aOrgStr.Len() && + m_pApplyToAllCB->Show(); + m_pSearchCaseSensitiveCB->Show(); + m_pSearchCaseWordOnlyCB->Show(); + m_pApplyToAllCB->Enable(0 != aOrgStr.Len() && 0 == (nFrmType & ( FRMTYPE_HEADER | FRMTYPE_FOOTER | FRMTYPE_FLY_ANY ))); - SearchTypeHdl(&aApplyToAllCB); + SearchTypeHdl(m_pApplyToAllCB); } - ModifyHdl(&aTypeDCB); + ModifyHdl(m_pTypeDCB); } } /*-------------------------------------------------------------------- Description: evaluate Ok-Button --------------------------------------------------------------------*/ -void SwIndexMarkDlg::Apply() +void SwIndexMarkPane::Apply() { InsertUpdate(); if(bSelected) @@ -439,7 +404,7 @@ void SwIndexMarkDlg::Apply() /*-------------------------------------------------------------------- Description: apply changes --------------------------------------------------------------------*/ -void SwIndexMarkDlg::InsertUpdate() +void SwIndexMarkPane::InsertUpdate() { pSh->StartUndo(bDel ? UNDO_INDEX_ENTRY_DELETE : UNDO_INDEX_ENTRY_INSERT); pSh->StartAllAction(); @@ -468,11 +433,11 @@ void SwIndexMarkDlg::InsertUpdate() pSh->EndAllAction(); pSh->EndUndo(bDel ? UNDO_INDEX_ENTRY_DELETE : UNDO_INDEX_ENTRY_INSERT); - if((nTypePos = aTypeDCB.GetEntryPos(aTypeDCB.GetSelectEntry())) == LISTBOX_ENTRY_NOTFOUND) + if((nTypePos = m_pTypeDCB->GetEntryPos(m_pTypeDCB->GetSelectEntry())) == LISTBOX_ENTRY_NOTFOUND) nTypePos = 0; - nKey1Pos = aKeyDCB.GetEntryPos(aKeyDCB.GetText()); - nKey2Pos = aKey2DCB.GetEntryPos(aKey2DCB.GetText()); + nKey1Pos = m_pKey1DCB->GetEntryPos(m_pKey1DCB->GetText()); + nKey2Pos = m_pKey2DCB->GetEntryPos(m_pKey2DCB->GetText()); } /*-------------------------------------------------------------------- @@ -502,42 +467,42 @@ static void lcl_SelectSameStrings(SwWrtShell& rSh, sal_Bool bWordOnly, sal_Bool } -void SwIndexMarkDlg::InsertMark() +void SwIndexMarkPane::InsertMark() { - sal_uInt16 nPos = aTypeDCB.GetEntryPos(aTypeDCB.GetSelectEntry()); + sal_uInt16 nPos = m_pTypeDCB->GetEntryPos(m_pTypeDCB->GetSelectEntry()); TOXTypes eType = nPos == POS_CONTENT ? TOX_CONTENT : nPos == POS_INDEX ? TOX_INDEX : TOX_USER; SwTOXMarkDescription aDesc(eType); - sal_uInt16 nLevel = (sal_uInt16)aLevelED.Denormalize(aLevelED.GetValue()); + sal_uInt16 nLevel = (sal_uInt16)m_pLevelNF->Denormalize(m_pLevelNF->GetValue()); switch(nPos) { case POS_CONTENT : break; case POS_INDEX: // keyword index mark { UpdateKeyBoxes(); - String aPrim(aKeyDCB.GetText()); - String aSec(aKey2DCB.GetText()); + String aPrim(m_pKey1DCB->GetText()); + String aSec(m_pKey2DCB->GetText()); aDesc.SetPrimKey(aPrim); aDesc.SetSecKey(aSec); - aDesc.SetMainEntry(aMainEntryCB.IsChecked()); - aDesc.SetPhoneticReadingOfAltStr(aPhoneticED0.GetText()); - aDesc.SetPhoneticReadingOfPrimKey(aPhoneticED1.GetText()); - aDesc.SetPhoneticReadingOfSecKey(aPhoneticED2.GetText()); + aDesc.SetMainEntry(m_pMainEntryCB->IsChecked()); + aDesc.SetPhoneticReadingOfAltStr(m_pPhoneticED0->GetText()); + aDesc.SetPhoneticReadingOfPrimKey(m_pPhoneticED1->GetText()); + aDesc.SetPhoneticReadingOfSecKey(m_pPhoneticED2->GetText()); } break; default: // Userdefined index mark { - String aName(aTypeDCB.GetSelectEntry()); + String aName(m_pTypeDCB->GetSelectEntry()); aDesc.SetTOUName(aName); } } - if (aOrgStr != aEntryED.GetText()) - aDesc.SetAltStr(aEntryED.GetText()); - sal_Bool bApplyAll = aApplyToAllCB.IsChecked(); - sal_Bool bWordOnly = aSearchCaseWordOnlyCB.IsChecked(); - sal_Bool bCaseSensitive = aSearchCaseSensitiveCB.IsChecked(); + if (aOrgStr != m_pEntryED->GetText()) + aDesc.SetAltStr(m_pEntryED->GetText()); + sal_Bool bApplyAll = m_pApplyToAllCB->IsChecked(); + sal_Bool bWordOnly = m_pSearchCaseWordOnlyCB->IsChecked(); + sal_Bool bCaseSensitive = m_pSearchCaseSensitiveCB->IsChecked(); pSh->StartAllAction(); // all equal strings have to be selected here so that the @@ -558,17 +523,17 @@ void SwIndexMarkDlg::InsertMark() /*-------------------------------------------------------------------- Description: update mark --------------------------------------------------------------------*/ -void SwIndexMarkDlg::UpdateMark() +void SwIndexMarkPane::UpdateMark() { - String aAltText(aEntryED.GetText()); - String* pAltText = aOrgStr != aEntryED.GetText() ? &aAltText : 0; + String aAltText(m_pEntryED->GetText()); + String* pAltText = aOrgStr != m_pEntryED->GetText() ? &aAltText : 0; //empty alternative texts are not allowed if(pAltText && !pAltText->Len()) return; UpdateKeyBoxes(); - sal_uInt16 nPos = aTypeDCB.GetEntryPos(aTypeDCB.GetSelectEntry()); + sal_uInt16 nPos = m_pTypeDCB->GetEntryPos(m_pTypeDCB->GetSelectEntry()); TOXTypes eType = TOX_USER; if(POS_CONTENT == nPos) eType = TOX_CONTENT; @@ -576,46 +541,46 @@ void SwIndexMarkDlg::UpdateMark() eType = TOX_INDEX; SwTOXMarkDescription aDesc(eType); - aDesc.SetLevel( static_cast< int >(aLevelED.GetValue()) ); + aDesc.SetLevel( static_cast< int >(m_pLevelNF->GetValue()) ); if(pAltText) aDesc.SetAltStr(*pAltText); - String aPrim(aKeyDCB.GetText()); + String aPrim(m_pKey1DCB->GetText()); if(aPrim.Len()) aDesc.SetPrimKey(aPrim); - String aSec(aKey2DCB.GetText()); + String aSec(m_pKey2DCB->GetText()); if(aSec.Len()) aDesc.SetSecKey(aSec); if(eType == TOX_INDEX) { - aDesc.SetPhoneticReadingOfAltStr(aPhoneticED0.GetText()); - aDesc.SetPhoneticReadingOfPrimKey(aPhoneticED1.GetText()); - aDesc.SetPhoneticReadingOfSecKey(aPhoneticED2.GetText()); + aDesc.SetPhoneticReadingOfAltStr(m_pPhoneticED0->GetText()); + aDesc.SetPhoneticReadingOfPrimKey(m_pPhoneticED1->GetText()); + aDesc.SetPhoneticReadingOfSecKey(m_pPhoneticED2->GetText()); } - aDesc.SetMainEntry(aMainEntryCB.IsVisible() && aMainEntryCB.IsChecked()); + aDesc.SetMainEntry(m_pMainEntryCB->IsVisible() && m_pMainEntryCB->IsChecked()); pTOXMgr->UpdateTOXMark(aDesc); } /*-------------------------------------------------------------------- Description: insert new keys --------------------------------------------------------------------*/ -void SwIndexMarkDlg::UpdateKeyBoxes() +void SwIndexMarkPane::UpdateKeyBoxes() { - String aKey(aKeyDCB.GetText()); - sal_uInt16 nPos = aKeyDCB.GetEntryPos(aKey); + String aKey(m_pKey1DCB->GetText()); + sal_uInt16 nPos = m_pKey1DCB->GetEntryPos(aKey); if(nPos == LISTBOX_ENTRY_NOTFOUND && aKey.Len() > 0) { // create new key - aKeyDCB.InsertEntry(aKey); + m_pKey1DCB->InsertEntry(aKey); } - aKey = aKey2DCB.GetText(); - nPos = aKey2DCB.GetEntryPos(aKey); + aKey = m_pKey2DCB->GetText(); + nPos = m_pKey2DCB->GetEntryPos(aKey); if(nPos == LISTBOX_ENTRY_NOTFOUND && aKey.Len() > 0) { // create new key - aKey2DCB.InsertEntry(aKey); + m_pKey2DCB->InsertEntry(aKey); } } @@ -628,20 +593,20 @@ class SwNewUserIdxDlg : public ModalDialog FixedText aNameFT; Edit aNameED; - SwIndexMarkDlg* pDlg; + SwIndexMarkPane* pDlg; DECL_LINK( ModifyHdl, Edit*); public: - SwNewUserIdxDlg(SwIndexMarkDlg* pParent) : - ModalDialog(pParent, SW_RES(DLG_NEW_USER_IDX)), + SwNewUserIdxDlg(SwIndexMarkPane* pPane) : + ModalDialog(&(pPane->GetDialog()), SW_RES(DLG_NEW_USER_IDX)), aOKPB(this, SW_RES( PB_OK )), aCancelPB(this, SW_RES( PB_CANCEL )), aHelpPB(this, SW_RES( PB_HELP )), aNameFL(this, SW_RES( FL_NAME )), aNameFT(this, SW_RES( FT_NAME )), aNameED(this, SW_RES( ED_NAME )), - pDlg(pParent) + pDlg(pPane) { FreeResource(); aNameED.SetModifyHdl(LINK(this, SwNewUserIdxDlg, ModifyHdl)); @@ -662,37 +627,37 @@ IMPL_LINK( SwNewUserIdxDlg, ModifyHdl, Edit*, pEdit) return 0; } -IMPL_LINK_NOARG(SwIndexMarkDlg, NewUserIdxHdl) +IMPL_LINK_NOARG(SwIndexMarkPane, NewUserIdxHdl) { SwNewUserIdxDlg* pDlg = new SwNewUserIdxDlg(this); if(RET_OK == pDlg->Execute()) { String sNewName(pDlg->GetName()); - aTypeDCB.InsertEntry(sNewName); - aTypeDCB.SelectEntry(sNewName); + m_pTypeDCB->InsertEntry(sNewName); + m_pTypeDCB->SelectEntry(sNewName); } delete pDlg; return 0; } -IMPL_LINK( SwIndexMarkDlg, SearchTypeHdl, CheckBox*, pBox) +IMPL_LINK( SwIndexMarkPane, SearchTypeHdl, CheckBox*, pBox) { sal_Bool bEnable = pBox->IsChecked() && pBox->IsEnabled(); - aSearchCaseWordOnlyCB.Enable(bEnable); - aSearchCaseSensitiveCB.Enable(bEnable); + m_pSearchCaseWordOnlyCB->Enable(bEnable); + m_pSearchCaseSensitiveCB->Enable(bEnable); return 0; } -IMPL_LINK( SwIndexMarkDlg, InsertHdl, Button *, pButton ) +IMPL_LINK( SwIndexMarkPane, InsertHdl, Button *, pButton ) { Apply(); //close the dialog if only one entry is available - if(!bNewMark && !aPrevBT.IsVisible() && !aNextBT.IsVisible()) + if(!bNewMark && !m_pPrevBT->IsVisible() && !m_pNextBT->IsVisible()) CloseHdl(pButton); return 0; } -IMPL_LINK_NOARG(SwIndexMarkDlg, CloseHdl) +IMPL_LINK_NOARG(SwIndexMarkPane, CloseHdl) { if(bNewMark) { @@ -702,7 +667,7 @@ IMPL_LINK_NOARG(SwIndexMarkDlg, CloseHdl) } else { - ((SwIndexMarkModalDlg*)GetParent())->EndDialog(RET_CANCEL); + m_rDialog.EndDialog(RET_CANCEL); } return 0; } @@ -710,12 +675,12 @@ IMPL_LINK_NOARG(SwIndexMarkDlg, CloseHdl) /*-------------------------------------------------------------------- Description: select index type only when inserting --------------------------------------------------------------------*/ -IMPL_LINK( SwIndexMarkDlg, ModifyHdl, ListBox *, pBox ) +IMPL_LINK( SwIndexMarkPane, ModifyHdl, ListBox *, pBox ) { - if(&aTypeDCB == pBox) + if (m_pTypeDCB == pBox) { // set index type - sal_uInt16 nPos = aTypeDCB.GetEntryPos(aTypeDCB.GetSelectEntry()); + sal_uInt16 nPos = m_pTypeDCB->GetEntryPos(m_pTypeDCB->GetSelectEntry()); sal_Bool bLevelEnable = sal_False, bKeyEnable = sal_False, bSetKey2 = sal_False, @@ -725,94 +690,94 @@ IMPL_LINK( SwIndexMarkDlg, ModifyHdl, ListBox *, pBox ) bKey2HasText = sal_False; if(nPos == POS_INDEX) { - if(aEntryED.GetText().Len()) + if(m_pEntryED->GetText().Len()) bEntryHasText = sal_True; - aPhoneticED0.SetText(GetDefaultPhoneticReading(aEntryED.GetText())); + m_pPhoneticED0->SetText(GetDefaultPhoneticReading(m_pEntryED->GetText())); bKeyEnable = sal_True; - aKeyDCB.SetText(aKeyDCB.GetEntry(nKey1Pos)); - aPhoneticED1.SetText(GetDefaultPhoneticReading(aKeyDCB.GetText())); - if(aKeyDCB.GetText().Len() > 0) + m_pKey1DCB->SetText(m_pKey1DCB->GetEntry(nKey1Pos)); + m_pPhoneticED1->SetText(GetDefaultPhoneticReading(m_pKey1DCB->GetText())); + if(m_pKey1DCB->GetText().Len() > 0) { bKey1HasText = bSetKey2 = bKey2Enable = sal_True; - aKey2DCB.SetText(aKey2DCB.GetEntry(nKey2Pos)); - aPhoneticED2.SetText(GetDefaultPhoneticReading(aKey2DCB.GetText())); - if(aKey2DCB.GetText().Len()) + m_pKey2DCB->SetText(m_pKey2DCB->GetEntry(nKey2Pos)); + m_pPhoneticED2->SetText(GetDefaultPhoneticReading(m_pKey2DCB->GetText())); + if(m_pKey2DCB->GetText().Len()) bKey2HasText = sal_True; } } else { bLevelEnable = sal_True; - aLevelED.SetMax(MAXLEVEL); - aLevelED.SetValue(aLevelED.Normalize(0)); + m_pLevelNF->SetMax(MAXLEVEL); + m_pLevelNF->SetValue(m_pLevelNF->Normalize(0)); bSetKey2 = sal_True; } - aLevelFT.Show(bLevelEnable); - aLevelED.Show(bLevelEnable); - aMainEntryCB.Show(nPos == POS_INDEX); + m_pLevelFT->Show(bLevelEnable); + m_pLevelNF->Show(bLevelEnable); + m_pMainEntryCB->Show(nPos == POS_INDEX); - aKeyFT.Enable(bKeyEnable); - aKeyDCB.Enable(bKeyEnable); + m_pKey1FT->Enable(bKeyEnable); + m_pKey1DCB->Enable(bKeyEnable); if ( bSetKey2 ) { - aKey2DCB.Enable(bKey2Enable); - aKey2FT.Enable(bKey2Enable); + m_pKey2DCB->Enable(bKey2Enable); + m_pKey2FT->Enable(bKey2Enable); } - aPhoneticFT0.Enable(bKeyEnable&&bEntryHasText&&bIsPhoneticReadingEnabled); - aPhoneticED0.Enable(bKeyEnable&&bEntryHasText&&bIsPhoneticReadingEnabled); - aPhoneticFT1.Enable(bKeyEnable&&bKey1HasText&&bIsPhoneticReadingEnabled); - aPhoneticED1.Enable(bKeyEnable&&bKey1HasText&&bIsPhoneticReadingEnabled); - aPhoneticFT2.Enable(bKeyEnable&&bKey2HasText&&bIsPhoneticReadingEnabled); - aPhoneticED2.Enable(bKeyEnable&&bKey2HasText&&bIsPhoneticReadingEnabled); + m_pPhoneticFT0->Enable(bKeyEnable&&bEntryHasText&&bIsPhoneticReadingEnabled); + m_pPhoneticED0->Enable(bKeyEnable&&bEntryHasText&&bIsPhoneticReadingEnabled); + m_pPhoneticFT1->Enable(bKeyEnable&&bKey1HasText&&bIsPhoneticReadingEnabled); + m_pPhoneticED1->Enable(bKeyEnable&&bKey1HasText&&bIsPhoneticReadingEnabled); + m_pPhoneticFT2->Enable(bKeyEnable&&bKey2HasText&&bIsPhoneticReadingEnabled); + m_pPhoneticED2->Enable(bKeyEnable&&bKey2HasText&&bIsPhoneticReadingEnabled); } - else //aEntryED !!aEntryED is not a ListBox but a Edit + else //m_pEntryED !!m_pEntryED is not a ListBox but a Edit { - sal_Bool bHasText = (aEntryED.GetText().Len()>0); + sal_Bool bHasText = (m_pEntryED->GetText().Len()>0); if(!bHasText) { - aPhoneticED0.SetText(aEmptyStr); + m_pPhoneticED0->SetText(aEmptyStr); bPhoneticED0_ChangedByUser = sal_False; } else if(!bPhoneticED0_ChangedByUser) - aPhoneticED0.SetText(GetDefaultPhoneticReading(aEntryED.GetText())); + m_pPhoneticED0->SetText(GetDefaultPhoneticReading(m_pEntryED->GetText())); - aPhoneticFT0.Enable(bHasText&&bIsPhoneticReadingEnabled); - aPhoneticED0.Enable(bHasText&&bIsPhoneticReadingEnabled); + m_pPhoneticFT0->Enable(bHasText&&bIsPhoneticReadingEnabled); + m_pPhoneticED0->Enable(bHasText&&bIsPhoneticReadingEnabled); } - aOKBT.Enable(!pSh->HasReadonlySel() && - (aEntryED.GetText().Len() || pSh->GetCrsrCnt(sal_False))); + m_pOKBT->Enable(!pSh->HasReadonlySel() && + (m_pEntryED->GetText().Len() || pSh->GetCrsrCnt(sal_False))); return 0; } -IMPL_LINK_NOARG_INLINE_START(SwIndexMarkDlg, NextHdl) +IMPL_LINK_NOARG_INLINE_START(SwIndexMarkPane, NextHdl) { InsertUpdate(); pTOXMgr->NextTOXMark(); UpdateDialog(); return 0; } -IMPL_LINK_NOARG_INLINE_END(SwIndexMarkDlg, NextHdl) +IMPL_LINK_NOARG_INLINE_END(SwIndexMarkPane, NextHdl) -IMPL_LINK_NOARG_INLINE_START(SwIndexMarkDlg, NextSameHdl) +IMPL_LINK_NOARG_INLINE_START(SwIndexMarkPane, NextSameHdl) { InsertUpdate(); pTOXMgr->NextTOXMark(sal_True); UpdateDialog(); return 0; } -IMPL_LINK_NOARG_INLINE_END(SwIndexMarkDlg, NextSameHdl) +IMPL_LINK_NOARG_INLINE_END(SwIndexMarkPane, NextSameHdl) -IMPL_LINK_NOARG_INLINE_START(SwIndexMarkDlg, PrevHdl) +IMPL_LINK_NOARG_INLINE_START(SwIndexMarkPane, PrevHdl) { InsertUpdate(); pTOXMgr->PrevTOXMark(); UpdateDialog(); return 0; } -IMPL_LINK_NOARG_INLINE_END(SwIndexMarkDlg, PrevHdl) +IMPL_LINK_NOARG_INLINE_END(SwIndexMarkPane, PrevHdl) -IMPL_LINK_NOARG_INLINE_START(SwIndexMarkDlg, PrevSameHdl) +IMPL_LINK_NOARG_INLINE_START(SwIndexMarkPane, PrevSameHdl) { InsertUpdate(); pTOXMgr->PrevTOXMark(sal_True); @@ -820,9 +785,9 @@ IMPL_LINK_NOARG_INLINE_START(SwIndexMarkDlg, PrevSameHdl) return 0; } -IMPL_LINK_NOARG_INLINE_END(SwIndexMarkDlg, PrevSameHdl) +IMPL_LINK_NOARG_INLINE_END(SwIndexMarkPane, PrevSameHdl) -IMPL_LINK_NOARG(SwIndexMarkDlg, DelHdl) +IMPL_LINK_NOARG(SwIndexMarkPane, DelHdl) { bDel = sal_True; InsertUpdate(); @@ -832,7 +797,7 @@ IMPL_LINK_NOARG(SwIndexMarkDlg, DelHdl) UpdateDialog(); else { - CloseHdl(&aCancelBT); + CloseHdl(m_pCloseBT); SfxViewFrame::Current()->GetBindings().Invalidate(FN_EDIT_IDX_ENTRY_DLG); } return 0; @@ -841,7 +806,7 @@ IMPL_LINK_NOARG(SwIndexMarkDlg, DelHdl) /*-------------------------------------------------------------------- Description: renew dialog view --------------------------------------------------------------------*/ -void SwIndexMarkDlg::UpdateDialog() +void SwIndexMarkPane::UpdateDialog() { OSL_ENSURE(pSh && pTOXMgr, "no shell?"); SwTOXMark* pMark = pTOXMgr->GetCurTOXMark(); @@ -849,10 +814,10 @@ void SwIndexMarkDlg::UpdateDialog() if(!pMark) return; - ViewShell::SetCareWin( GetParent() ); + ViewShell::SetCareWin(&m_rDialog); aOrgStr = pMark->GetText(); - aEntryED.SetText(aOrgStr); + m_pEntryED->SetText(aOrgStr); // set index type sal_Bool bLevelEnable = sal_True, @@ -870,70 +835,70 @@ void SwIndexMarkDlg::UpdateDialog() bKey1HasText = bKey2Enable = 0 != pMark->GetPrimaryKey().Len(); bKey2HasText = 0 != pMark->GetSecondaryKey().Len(); bEntryHasText = 0 != pMark->GetText().Len(); - aKeyDCB.SetText( pMark->GetPrimaryKey() ); - aKey2DCB.SetText( pMark->GetSecondaryKey() ); - aPhoneticED0.SetText( pMark->GetTextReading() ); - aPhoneticED1.SetText( pMark->GetPrimaryKeyReading() ); - aPhoneticED2.SetText( pMark->GetSecondaryKeyReading() ); - aMainEntryCB.Check(pMark->IsMainEntry()); + m_pKey1DCB->SetText( pMark->GetPrimaryKey() ); + m_pKey2DCB->SetText( pMark->GetSecondaryKey() ); + m_pPhoneticED0->SetText( pMark->GetTextReading() ); + m_pPhoneticED1->SetText( pMark->GetPrimaryKeyReading() ); + m_pPhoneticED2->SetText( pMark->GetSecondaryKeyReading() ); + m_pMainEntryCB->Check(pMark->IsMainEntry()); } else if(TOX_CONTENT == eCurType || TOX_USER == eCurType) { - aLevelED.SetValue(aLevelED.Normalize(pMark->GetLevel())); + m_pLevelNF->SetValue(m_pLevelNF->Normalize(pMark->GetLevel())); } - aKeyFT.Enable(bKeyEnable); - aKeyDCB.Enable(bKeyEnable); - aLevelED.SetMax(MAXLEVEL); - aLevelFT.Show(bLevelEnable); - aLevelED.Show(bLevelEnable); - aMainEntryCB.Show(!bLevelEnable); - aKey2FT.Enable(bKey2Enable); - aKey2DCB.Enable(bKey2Enable); + m_pKey1FT->Enable(bKeyEnable); + m_pKey1DCB->Enable(bKeyEnable); + m_pLevelNF->SetMax(MAXLEVEL); + m_pLevelFT->Show(bLevelEnable); + m_pLevelNF->Show(bLevelEnable); + m_pMainEntryCB->Show(!bLevelEnable); + m_pKey2FT->Enable(bKey2Enable); + m_pKey2DCB->Enable(bKey2Enable); UpdateLanguageDependenciesForPhoneticReading(); - aPhoneticFT0.Enable(bKeyEnable&&bEntryHasText&&bIsPhoneticReadingEnabled); - aPhoneticED0.Enable(bKeyEnable&&bEntryHasText&&bIsPhoneticReadingEnabled); - aPhoneticFT1.Enable(bKeyEnable&&bKey1HasText&&bIsPhoneticReadingEnabled); - aPhoneticED1.Enable(bKeyEnable&&bKey1HasText&&bIsPhoneticReadingEnabled); - aPhoneticFT2.Enable(bKeyEnable&&bKey2HasText&&bIsPhoneticReadingEnabled); - aPhoneticED2.Enable(bKeyEnable&&bKey2HasText&&bIsPhoneticReadingEnabled); + m_pPhoneticFT0->Enable(bKeyEnable&&bEntryHasText&&bIsPhoneticReadingEnabled); + m_pPhoneticED0->Enable(bKeyEnable&&bEntryHasText&&bIsPhoneticReadingEnabled); + m_pPhoneticFT1->Enable(bKeyEnable&&bKey1HasText&&bIsPhoneticReadingEnabled); + m_pPhoneticED1->Enable(bKeyEnable&&bKey1HasText&&bIsPhoneticReadingEnabled); + m_pPhoneticFT2->Enable(bKeyEnable&&bKey2HasText&&bIsPhoneticReadingEnabled); + m_pPhoneticED2->Enable(bKeyEnable&&bKey2HasText&&bIsPhoneticReadingEnabled); // set index type - aTypeDCB.SelectEntry(pMark->GetTOXType()->GetTypeName()); + m_pTypeDCB->SelectEntry(pMark->GetTOXType()->GetTypeName()); // set Next - Prev - Buttons pSh->SttCrsrMove(); - if( aPrevBT.IsVisible() ) + if( m_pPrevBT->IsVisible() ) { const SwTOXMark* pMoveMark = &pSh->GotoTOXMark( *pMark, TOX_PRV ); if( pMoveMark != pMark ) pSh->GotoTOXMark( *pMoveMark, TOX_NXT ); - aPrevBT.Enable( pMoveMark != pMark ); + m_pPrevBT->Enable( pMoveMark != pMark ); pMoveMark = &pSh->GotoTOXMark( *pMark, TOX_NXT ); if( pMoveMark != pMark ) pSh->GotoTOXMark( *pMoveMark, TOX_PRV ); - aNextBT.Enable( pMoveMark != pMark ); + m_pNextBT->Enable( pMoveMark != pMark ); } - if( aPrevSameBT.IsVisible() ) + if( m_pPrevSameBT->IsVisible() ) { const SwTOXMark* pMoveMark = &pSh->GotoTOXMark( *pMark, TOX_SAME_PRV ); if( pMoveMark != pMark ) pSh->GotoTOXMark( *pMoveMark, TOX_SAME_NXT ); - aPrevSameBT.Enable( pMoveMark != pMark ); + m_pPrevSameBT->Enable( pMoveMark != pMark ); pMoveMark = &pSh->GotoTOXMark( *pMark, TOX_SAME_NXT ); if( pMoveMark != pMark ) pSh->GotoTOXMark( *pMoveMark, TOX_SAME_PRV ); - aNextSameBT.Enable( pMoveMark != pMark ); + m_pNextSameBT->Enable( pMoveMark != pMark ); } sal_Bool bEnable = !pSh->HasReadonlySel(); - aOKBT.Enable( bEnable ); - aDelBT.Enable( bEnable ); - aEntryED.SetReadOnly( !bEnable ); - aLevelED.SetReadOnly( !bEnable ); - aKeyDCB.SetReadOnly( !bEnable ); - aKey2DCB.SetReadOnly( !bEnable ); + m_pOKBT->Enable( bEnable ); + m_pDelBT->Enable( bEnable ); + m_pEntryED->SetReadOnly( !bEnable ); + m_pLevelNF->SetReadOnly( !bEnable ); + m_pKey1DCB->SetReadOnly( !bEnable ); + m_pKey2DCB->SetReadOnly( !bEnable ); pSh->SelectTxtAttr( RES_TXTATR_TOXMARK, pMark->GetTxtTOXMark() ); // we need the point at the start of the attribut @@ -945,17 +910,17 @@ void SwIndexMarkDlg::UpdateDialog() /*-------------------------------------------------------------------- Remind whether the edit boxes for Phonetic reading are changed manually --------------------------------------------------------------------*/ -IMPL_LINK( SwIndexMarkDlg, PhoneticEDModifyHdl, Edit *, pEdit ) +IMPL_LINK( SwIndexMarkPane, PhoneticEDModifyHdl, Edit *, pEdit ) { - if(&aPhoneticED0 == pEdit) + if (m_pPhoneticED0 == pEdit) { bPhoneticED0_ChangedByUser = pEdit->GetText().Len()>0; } - else if(&aPhoneticED1 == pEdit) + else if (m_pPhoneticED1 == pEdit) { bPhoneticED1_ChangedByUser = pEdit->GetText().Len()>0; } - else if(&aPhoneticED2 == pEdit) + else if (m_pPhoneticED2 == pEdit) { bPhoneticED2_ChangedByUser = pEdit->GetText().Len()>0; } @@ -965,16 +930,16 @@ IMPL_LINK( SwIndexMarkDlg, PhoneticEDModifyHdl, Edit *, pEdit ) /*-------------------------------------------------------------------- Description: Enable Disable of the 2nd key --------------------------------------------------------------------*/ -IMPL_LINK( SwIndexMarkDlg, KeyDCBModifyHdl, ComboBox *, pBox ) +IMPL_LINK( SwIndexMarkPane, KeyDCBModifyHdl, ComboBox *, pBox ) { - if(&aKeyDCB == pBox) + if (m_pKey1DCB == pBox) { sal_Bool bEnable = pBox->GetText().Len() > 0; if(!bEnable) { - aKey2DCB.SetText(aEmptyStr); - aPhoneticED1.SetText(aEmptyStr); - aPhoneticED2.SetText(aEmptyStr); + m_pKey2DCB->SetText(aEmptyStr); + m_pPhoneticED1->SetText(aEmptyStr); + m_pPhoneticED2->SetText(aEmptyStr); bPhoneticED1_ChangedByUser = sal_False; bPhoneticED2_ChangedByUser = sal_False; } @@ -986,16 +951,16 @@ IMPL_LINK( SwIndexMarkDlg, KeyDCBModifyHdl, ComboBox *, pBox ) bPhoneticED1_ChangedByUser = sal_False; } if(!bPhoneticED1_ChangedByUser) - aPhoneticED1.SetText(GetDefaultPhoneticReading(pBox->GetText())); + m_pPhoneticED1->SetText(GetDefaultPhoneticReading(pBox->GetText())); } - aKey2DCB.Enable(bEnable); - aKey2FT.Enable(bEnable); + m_pKey2DCB->Enable(bEnable); + m_pKey2FT->Enable(bEnable); } - else if(&aKey2DCB == pBox) + else if (m_pKey2DCB == pBox) { if(!(pBox->GetText().Len()>0)) { - aPhoneticED2.SetText(aEmptyStr); + m_pPhoneticED2->SetText(aEmptyStr); bPhoneticED2_ChangedByUser = sal_False; } else @@ -1006,16 +971,16 @@ IMPL_LINK( SwIndexMarkDlg, KeyDCBModifyHdl, ComboBox *, pBox ) bPhoneticED2_ChangedByUser = sal_False; } if(!bPhoneticED2_ChangedByUser) - aPhoneticED2.SetText(GetDefaultPhoneticReading(pBox->GetText())); + m_pPhoneticED2->SetText(GetDefaultPhoneticReading(pBox->GetText())); } } - sal_Bool bKey1HasText = (0 != aKeyDCB.GetText().Len()); - sal_Bool bKey2HasText = (0 != aKey2DCB.GetText().Len()); + sal_Bool bKey1HasText = (0 != m_pKey1DCB->GetText().Len()); + sal_Bool bKey2HasText = (0 != m_pKey2DCB->GetText().Len()); - aPhoneticFT1.Enable(bKey1HasText&&bIsPhoneticReadingEnabled); - aPhoneticED1.Enable(bKey1HasText&bIsPhoneticReadingEnabled); - aPhoneticFT2.Enable(bKey2HasText&bIsPhoneticReadingEnabled); - aPhoneticED2.Enable(bKey2HasText&bIsPhoneticReadingEnabled); + m_pPhoneticFT1->Enable(bKey1HasText&&bIsPhoneticReadingEnabled); + m_pPhoneticED1->Enable(bKey1HasText&bIsPhoneticReadingEnabled); + m_pPhoneticFT2->Enable(bKey2HasText&bIsPhoneticReadingEnabled); + m_pPhoneticED2->Enable(bKey2HasText&bIsPhoneticReadingEnabled); return 0; } @@ -1023,13 +988,13 @@ IMPL_LINK( SwIndexMarkDlg, KeyDCBModifyHdl, ComboBox *, pBox ) /*-------------------------------------------------- overload dtor --------------------------------------------------*/ -SwIndexMarkDlg::~SwIndexMarkDlg() +SwIndexMarkPane::~SwIndexMarkPane() { delete pTOXMgr; ViewShell::SetCareWin( 0 ); } -void SwIndexMarkDlg::ReInitDlg(SwWrtShell& rWrtShell, SwTOXMark* pCurTOXMark) +void SwIndexMarkPane::ReInitDlg(SwWrtShell& rWrtShell, SwTOXMark* pCurTOXMark) { pSh = &rWrtShell; delete pTOXMgr; @@ -1047,40 +1012,36 @@ void SwIndexMarkDlg::ReInitDlg(SwWrtShell& rWrtShell, SwTOXMark* pCurTOXMark) } SwIndexMarkFloatDlg::SwIndexMarkFloatDlg(SfxBindings* _pBindings, - SfxChildWindow* pChild, - Window *pParent, - SfxChildWinInfo* pInfo, - sal_Bool bNew) : -SfxModelessDialog(_pBindings, pChild, pParent, SvtCJKOptions().IsCJKFontEnabled()?SW_RES(DLG_INSIDXMARK_CJK):SW_RES(DLG_INSIDXMARK)), - aDlg(this, bNew, SW_RES(WIN_DLG), SvtCJKOptions().IsCJKFontEnabled()?DLG_INSIDXMARK_CJK:DLG_INSIDXMARK, *::GetActiveWrtShell()) + SfxChildWindow* pChild, Window *pParent, + SfxChildWinInfo* pInfo, sal_Bool bNew) + : SfxModelessDialog(_pBindings, pChild, pParent, "IndexEntryDialog", "modules/swriter/ui/indexentry.ui") + , m_aContent(*this, bNew, *::GetActiveWrtShell()) { - FreeResource(); - aDlg.ReInitDlg(*::GetActiveWrtShell()); + m_aContent.ReInitDlg(*::GetActiveWrtShell()); Initialize(pInfo); } -void SwIndexMarkFloatDlg::Activate() +void SwIndexMarkFloatDlg::Activate() { SfxModelessDialog::Activate(); - aDlg.Activate(); + m_aContent.Activate(); } void SwIndexMarkFloatDlg::ReInitDlg(SwWrtShell& rWrtShell) { - aDlg.ReInitDlg( rWrtShell ); + m_aContent.ReInitDlg( rWrtShell ); } -SwIndexMarkModalDlg::SwIndexMarkModalDlg(Window *pParent, SwWrtShell& rSh, SwTOXMark* pCurTOXMark) : -SvxStandardDialog(pParent, SvtCJKOptions().IsCJKFontEnabled()?SW_RES(DLG_EDIT_IDXMARK_CJK):SW_RES(DLG_EDIT_IDXMARK)), - aDlg(this, sal_False, SW_RES(WIN_DLG), SvtCJKOptions().IsCJKFontEnabled()?DLG_EDIT_IDXMARK_CJK:DLG_EDIT_IDXMARK, rSh) +SwIndexMarkModalDlg::SwIndexMarkModalDlg(Window *pParent, SwWrtShell& rSh, SwTOXMark* pCurTOXMark) + : SvxStandardDialog(pParent, "IndexEntryDialog", "modules/swriter/ui/indexentry.ui") + , m_aContent(*this, sal_False, rSh) { - FreeResource(); - aDlg.ReInitDlg(rSh, pCurTOXMark); + m_aContent.ReInitDlg(rSh, pCurTOXMark); } -void SwIndexMarkModalDlg::Apply() +void SwIndexMarkModalDlg::Apply() { - aDlg.Apply(); + m_aContent.Apply(); } class SwCreateAuthEntryDlg_Impl : public ModalDialog @@ -1766,7 +1727,7 @@ SwAuthMarkFloatDlg::SwAuthMarkFloatDlg(SfxBindings* _pBindings, SfxChildWinInfo* pInfo, sal_Bool bNew) : SfxModelessDialog(_pBindings, pChild, pParent, - "BibliographyEntyDialog", "modules/swriter/ui/bibliographyentry.ui") + "BibliographyEntryDialog", "modules/swriter/ui/bibliographyentry.ui") , m_aContent(*this, bNew) { Initialize(pInfo); @@ -1787,7 +1748,7 @@ void SwAuthMarkFloatDlg::ReInitDlg(SwWrtShell& rWrtShell) } SwAuthMarkModalDlg::SwAuthMarkModalDlg(Window *pParent, SwWrtShell& rSh) - : SvxStandardDialog(pParent, "BibliographyEntyDialog", + : SvxStandardDialog(pParent, "BibliographyEntryDialog", "modules/swriter/ui/bibliographyentry.ui") , m_aContent(*this, sal_False) { diff --git a/sw/source/ui/misc/numberingtypelistbox.cxx b/sw/source/ui/misc/numberingtypelistbox.cxx index c3e46aa4e52d..5ded9af6816a 100644 --- a/sw/source/ui/misc/numberingtypelistbox.cxx +++ b/sw/source/ui/misc/numberingtypelistbox.cxx @@ -80,7 +80,7 @@ bool SwNumberingTypeListBox::set_property(const rtl::OString &rKey, const rtl::O extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSwNumberingTypeListBox(Window *pParent, VclBuilder::stringmap &) { SwNumberingTypeListBox *pListBox = new SwNumberingTypeListBox(pParent, WB_LEFT|WB_DROPDOWN|WB_VCENTER|WB_3DLOOK); - pListBox->SetBestDropDownLineCount(); + pListBox->EnableAutoSize(true); return pListBox; } diff --git a/sw/source/ui/shells/textidx.cxx b/sw/source/ui/shells/textidx.cxx index e45bffabe438..84316e7fe0b5 100644 --- a/sw/source/ui/shells/textidx.cxx +++ b/sw/source/ui/shells/textidx.cxx @@ -106,7 +106,7 @@ void SwTextShell::ExecIdx(SfxRequest &rReq) { SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "Dialogdiet fail!"); - VclAbstractDialog* pDlg = pFact->CreateIndexMarkModalDlg( DLG_EDIT_IDXMARK, pMDI, GetShell(), aMgr.GetCurTOXMark() ); + VclAbstractDialog* pDlg = pFact->CreateIndexMarkModalDlg(pMDI, GetShell(), aMgr.GetCurTOXMark()); OSL_ENSURE(pDlg, "Dialogdiet fail!"); pDlg->Execute(); delete pDlg; diff --git a/sw/uiconfig/swriter/ui/bibliographyentry.ui b/sw/uiconfig/swriter/ui/bibliographyentry.ui index b6fa08064759..4f0e1844dcdb 100644 --- a/sw/uiconfig/swriter/ui/bibliographyentry.ui +++ b/sw/uiconfig/swriter/ui/bibliographyentry.ui @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <interface> <!-- interface-requires gtk+ 3.0 --> - <object class="GtkDialog" id="BibliographyEntyDialog"> + <object class="GtkDialog" id="BibliographyEntryDialog"> <property name="can_focus">False</property> <property name="border_width">5</property> <property name="title" translatable="yes">Insert Bibliography Entry</property> diff --git a/sw/uiconfig/swriter/ui/indexentry.ui b/sw/uiconfig/swriter/ui/indexentry.ui new file mode 100644 index 000000000000..b20a6a33b395 --- /dev/null +++ b/sw/uiconfig/swriter/ui/indexentry.ui @@ -0,0 +1,649 @@ +<?xml version="1.0" encoding="UTF-8"?> +<interface> + <!-- interface-requires gtk+ 3.0 --> + <object class="GtkAdjustment" id="adjustment1"> + <property name="lower">1</property> + <property name="upper">10</property> + <property name="value">1</property> + <property name="step_increment">1</property> + <property name="page_increment">10</property> + </object> + <object class="GtkImage" id="image1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="halign">start</property> + <property name="stock">gtk-index</property> + </object> + <object class="GtkImage" id="image2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="stock">gtk-go-back</property> + </object> + <object class="GtkImage" id="image3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="stock">gtk-go-forward</property> + </object> + <object class="GtkImage" id="image4"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="stock">gtk-goto-first</property> + </object> + <object class="GtkImage" id="image5"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="stock">gtk-goto-last</property> + </object> + <object class="GtkDialog" id="IndexEntryDialog"> + <property name="can_focus">False</property> + <property name="border_width">5</property> + <property name="title" translatable="yes">Insert Index Entry</property> + <property name="type_hint">dialog</property> + <child internal-child="vbox"> + <object class="GtkBox" id="dialog-vbox1"> + <property name="can_focus">False</property> + <property name="spacing">2</property> + <child internal-child="action_area"> + <object class="GtkButtonBox" id="dialog-action_area1"> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="layout_style">start</property> + <child> + <object class="GtkButton" id="insert"> + <property name="label">Insert</property> + <property name="use_action_appearance">False</property> + <property name="can_focus">True</property> + <property name="can_default">True</property> + <property name="has_default">True</property> + <property name="receives_default">True</property> + <property name="no_show_all">True</property> + <property name="use_action_appearance">False</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkButton" id="ok"> + <property name="label">gtk-ok</property> + <property name="use_action_appearance">False</property> + <property name="can_focus">True</property> + <property name="can_default">True</property> + <property name="has_default">True</property> + <property name="receives_default">True</property> + <property name="no_show_all">True</property> + <property name="use_action_appearance">False</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkButton" id="close"> + <property name="label">gtk-close</property> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_action_appearance">False</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + <child> + <object class="GtkButton" id="help"> + <property name="label">gtk-help</property> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_action_appearance">False</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">3</property> + </packing> + </child> + <child> + <object class="GtkButton" id="delete"> + <property name="label">gtk-delete</property> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_action_appearance">False</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">4</property> + </packing> + </child> + <child> + <object class="GtkGrid" id="grid2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="row_spacing">6</property> + <property name="row_homogeneous">True</property> + <property name="column_homogeneous">True</property> + <child> + <object class="GtkButton" id="previous"> + <property name="use_action_appearance">False</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="no_show_all">True</property> + <property name="halign">center</property> + <property name="valign">center</property> + <property name="use_action_appearance">False</property> + <property name="image">image2</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkButton" id="next"> + <property name="use_action_appearance">False</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="no_show_all">True</property> + <property name="halign">center</property> + <property name="valign">center</property> + <property name="use_action_appearance">False</property> + <property name="image">image3</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkButton" id="first"> + <property name="use_action_appearance">False</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="no_show_all">True</property> + <property name="halign">center</property> + <property name="valign">center</property> + <property name="use_action_appearance">False</property> + <property name="image">image4</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkButton" id="last"> + <property name="use_action_appearance">False</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="no_show_all">True</property> + <property name="halign">center</property> + <property name="valign">center</property> + <property name="use_action_appearance">False</property> + <property name="image">image5</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">5</property> + <property name="secondary">True</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="pack_type">end</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkFrame" id="frame"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <object class="GtkAlignment" id="alignment1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="left_padding">12</property> + <child> + <object class="GtkGrid" id="grid1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="halign">start</property> + <property name="row_spacing">6</property> + <property name="column_spacing">6</property> + <child> + <object class="GtkLabel" id="typeft"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_right">12</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Index</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkComboBox" id="typecb"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkButton" id="new"> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="tooltip_text" translatable="yes">New User-defined Index</property> + <property name="use_action_appearance">False</property> + <property name="image">image1</property> + </object> + <packing> + <property name="left_attach">2</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_right">12</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Entry</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkEntry" id="entryed"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="invisible_char">●</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">1</property> + <property name="width">2</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="key1ft"> + <property name="visible">True</property> + <property name="sensitive">False</property> + <property name="can_focus">False</property> + <property name="margin_right">12</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">1st key</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">2</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="key2ft"> + <property name="visible">True</property> + <property name="sensitive">False</property> + <property name="can_focus">False</property> + <property name="margin_right">12</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">2nd key</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">3</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="levelft"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_right">12</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Level</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">4</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkSpinButton" id="levelnf"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="halign">start</property> + <property name="invisible_char">●</property> + <property name="adjustment">adjustment1</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">4</property> + <property name="width">2</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="mainentrycb"> + <property name="label" translatable="yes">Main entry</property> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_action_appearance">False</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">5</property> + <property name="width">3</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="applytoallcb"> + <property name="label" translatable="yes">Apply to all similar texts</property> + <property name="use_action_appearance">False</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="no_show_all">True</property> + <property name="use_action_appearance">False</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">6</property> + <property name="width">3</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="searchcasesensitivecb"> + <property name="label" translatable="yes">Match case</property> + <property name="use_action_appearance">False</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="no_show_all">True</property> + <property name="margin_left">12</property> + <property name="use_action_appearance">False</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">7</property> + <property name="width">3</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="searchcasewordonlycb"> + <property name="label" translatable="yes">Whole words only</property> + <property name="use_action_appearance">False</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="no_show_all">True</property> + <property name="margin_left">12</property> + <property name="use_action_appearance">False</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">8</property> + <property name="width">3</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="phonetic0ft"> + <property name="can_focus">False</property> + <property name="no_show_all">True</property> + <property name="margin_right">12</property> + <property name="label" translatable="yes">Phonetic reading</property> + </object> + <packing> + <property name="left_attach">3</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="phonetic1ft"> + <property name="can_focus">False</property> + <property name="no_show_all">True</property> + <property name="margin_right">12</property> + <property name="label" translatable="yes">Phonetic reading</property> + </object> + <packing> + <property name="left_attach">3</property> + <property name="top_attach">2</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="phonetic2ft"> + <property name="can_focus">False</property> + <property name="no_show_all">True</property> + <property name="margin_right">12</property> + <property name="label" translatable="yes">Phonetic reading</property> + </object> + <packing> + <property name="left_attach">3</property> + <property name="top_attach">3</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkEntry" id="phonetic0ed"> + <property name="can_focus">True</property> + <property name="no_show_all">True</property> + <property name="invisible_char">●</property> + </object> + <packing> + <property name="left_attach">4</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkEntry" id="phonetic1ed"> + <property name="can_focus">True</property> + <property name="no_show_all">True</property> + <property name="invisible_char">●</property> + </object> + <packing> + <property name="left_attach">4</property> + <property name="top_attach">2</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkEntry" id="phonetic2ed"> + <property name="can_focus">True</property> + <property name="no_show_all">True</property> + <property name="invisible_char">●</property> + </object> + <packing> + <property name="left_attach">4</property> + <property name="top_attach">3</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkComboBoxText" id="key1cb"> + <property name="visible">True</property> + <property name="sensitive">False</property> + <property name="can_focus">False</property> + <property name="has_entry">True</property> + <property name="entry_text_column">0</property> + <property name="id_column">1</property> + <child internal-child="entry"> + <object class="GtkEntry" id="comboboxtext-entry"> + <property name="sensitive">False</property> + <property name="can_focus">False</property> + </object> + </child> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">2</property> + <property name="width">2</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkComboBoxText" id="key2cb"> + <property name="visible">True</property> + <property name="sensitive">False</property> + <property name="can_focus">False</property> + <property name="has_entry">True</property> + <property name="entry_text_column">0</property> + <property name="id_column">1</property> + <child internal-child="entry"> + <object class="GtkEntry" id="comboboxtext-entry2"> + <property name="sensitive">False</property> + <property name="can_focus">False</property> + <property name="invisible_char">●</property> + </object> + </child> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">3</property> + <property name="width">2</property> + <property name="height">1</property> + </packing> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel" id="label1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes"><b>Selection</b></property> + <property name="use_markup">True</property> + </object> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + </child> + <action-widgets> + <action-widget response="0">insert</action-widget> + <action-widget response="0">ok</action-widget> + <action-widget response="0">close</action-widget> + <action-widget response="0">help</action-widget> + <action-widget response="0">delete</action-widget> + </action-widgets> + </object> +</interface> |