diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-09-03 08:45:49 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-09-03 09:04:50 +0100 |
commit | 58fe754c70b64ee5152197b24c3e0cf92d4122ed (patch) | |
tree | bd40b9cb89618f2f735af55b05fd21088c6242ea /sw/source/ui/index | |
parent | 8b90ad8af9d72937109ded62609731033558dd84 (diff) |
convert select index dialog to .ui
Change-Id: I49a3d67e9c22c1608354b732f8aee27afcf15885
Diffstat (limited to 'sw/source/ui/index')
-rw-r--r-- | sw/source/ui/index/multmrk.cxx | 37 | ||||
-rw-r--r-- | sw/source/ui/index/multmrk.hrc | 27 | ||||
-rw-r--r-- | sw/source/ui/index/multmrk.src | 82 |
3 files changed, 15 insertions, 131 deletions
diff --git a/sw/source/ui/index/multmrk.cxx b/sw/source/ui/index/multmrk.cxx index f5a30c558753..6959487a008f 100644 --- a/sw/source/ui/index/multmrk.cxx +++ b/sw/source/ui/index/multmrk.cxx @@ -23,41 +23,34 @@ #include "toxmgr.hxx" #include "index.hrc" -#include "multmrk.hrc" -SwMultiTOXMarkDlg::SwMultiTOXMarkDlg( Window* pParent, SwTOXMgr& rTOXMgr ) : - - SvxStandardDialog(pParent, SW_RES(DLG_MULTMRK)), - - aTOXFL(this, SW_RES(FL_TOX)), - aEntryFT(this, SW_RES(FT_ENTRY)), - aTextFT(this, SW_RES(FT_TEXT)), - aTOXFT(this, SW_RES(FT_TOX)), - aTOXLB(this, SW_RES(LB_TOX)), - aOkBT(this, SW_RES(OK_BT)), - aCancelBT(this, SW_RES(CANCEL_BT)), - rMgr( rTOXMgr ), - nPos(0) +SwMultiTOXMarkDlg::SwMultiTOXMarkDlg(Window* pParent, SwTOXMgr& rTOXMgr) + : SvxStandardDialog(pParent, "SelectIndexDialog", + "modules/swriter/ui/selectindexdialog.ui") + , rMgr(rTOXMgr) + , nPos(0) { - aTOXLB.SetSelectHdl(LINK(this, SwMultiTOXMarkDlg, SelectHdl)); + get(m_pTextFT, "type"); + get(m_pTOXLB, "treeview"); + m_pTOXLB->set_height_request(m_pTOXLB->GetTextHeight() * 10); + m_pTOXLB->set_width_request(m_pTOXLB->approximate_char_width() * 25); + + m_pTOXLB->SetSelectHdl(LINK(this, SwMultiTOXMarkDlg, SelectHdl)); sal_uInt16 nSize = rMgr.GetTOXMarkCount(); for(sal_uInt16 i=0; i < nSize; ++i) - aTOXLB.InsertEntry(rMgr.GetTOXMark(i)->GetText()); + m_pTOXLB->InsertEntry(rMgr.GetTOXMark(i)->GetText()); - aTOXLB.SelectEntryPos(0); - aTextFT.SetText(rMgr.GetTOXMark(0)->GetTOXType()->GetTypeName()); - - FreeResource(); + m_pTOXLB->SelectEntryPos(0); + m_pTextFT->SetText(rMgr.GetTOXMark(0)->GetTOXType()->GetTypeName()); } - IMPL_LINK_INLINE_START( SwMultiTOXMarkDlg, SelectHdl, ListBox *, pBox ) { if(pBox->GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND) { SwTOXMark* pMark = rMgr.GetTOXMark(pBox->GetSelectEntryPos()); - aTextFT.SetText(pMark->GetTOXType()->GetTypeName()); + m_pTextFT->SetText(pMark->GetTOXType()->GetTypeName()); nPos = pBox->GetSelectEntryPos(); } return 0; diff --git a/sw/source/ui/index/multmrk.hrc b/sw/source/ui/index/multmrk.hrc deleted file mode 100644 index 949f850dd299..000000000000 --- a/sw/source/ui/index/multmrk.hrc +++ /dev/null @@ -1,27 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -#define FT_ENTRY 1 -#define FT_TOX 2 -#define OK_BT 3 -#define LB_TOX 4 -#define FT_TEXT 5 -#define FL_TOX 6 -#define CANCEL_BT 7 - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/index/multmrk.src b/sw/source/ui/index/multmrk.src deleted file mode 100644 index d79e9426dd2d..000000000000 --- a/sw/source/ui/index/multmrk.src +++ /dev/null @@ -1,82 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include "index.hrc" -#include "multmrk.hrc" -#include "cmdid.h" -#include "helpid.h" -ModalDialog DLG_MULTMRK -{ - HelpID = CMD_FN_EDIT_IDX_ENTRY_DLG ; - OutputSize = TRUE ; - SVLook = TRUE ; - Size = MAP_APPFONT ( 220 , 95 ) ; - Text [ en-US ] = "Index Markings" ; - Moveable = TRUE ; - FixedLine FL_TOX - { - Pos = MAP_APPFONT ( 6 , 3 ) ; - Size = MAP_APPFONT ( 153 , 8 ) ; - Text [ en-US ] = "Selection" ; - }; - FixedText FT_ENTRY - { - Pos = MAP_APPFONT ( 12 , 14 ) ; - Size = MAP_APPFONT ( 41 , 8 ) ; - Text [ en-US ] = "Index" ; - Left = TRUE ; - }; - FixedText FT_TEXT - { - Pos = MAP_APPFONT ( 53 , 14 ) ; - Size = MAP_APPFONT ( 100 , 8 ) ; - Left = TRUE ; - }; - FixedText FT_TOX - { - Pos = MAP_APPFONT ( 12 , 26 ) ; - Size = MAP_APPFONT ( 41 , 8 ) ; - Text [ en-US ] = "Entry" ; - Left = TRUE ; - }; - ListBox LB_TOX - { - HelpID = "sw:ListBox:DLG_MULTMRK:LB_TOX"; - Border = TRUE ; - Pos = MAP_APPFONT ( 12 , 37 ) ; - Size = MAP_APPFONT ( 100 , 49 ) ; - TabStop = TRUE ; - AutoHScroll = TRUE ; - }; - OKButton OK_BT - { - Pos = MAP_APPFONT ( 165 , 6 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - DefButton = TRUE ; - }; - CancelButton CANCEL_BT - { - Pos = MAP_APPFONT ( 165 , 23 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - }; -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |