bump product version to 4.1.6.2
[LibreOffice.git] / sw / source / ui / index / multmrk.cxx
blobf5a30c558753a0ace8ef4d45e21ec5958fd11cd8
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include "swtypes.hxx"
22 #include "multmrk.hxx"
23 #include "toxmgr.hxx"
25 #include "index.hrc"
26 #include "multmrk.hrc"
29 SwMultiTOXMarkDlg::SwMultiTOXMarkDlg( Window* pParent, SwTOXMgr& rTOXMgr ) :
31 SvxStandardDialog(pParent, SW_RES(DLG_MULTMRK)),
33 aTOXFL(this, SW_RES(FL_TOX)),
34 aEntryFT(this, SW_RES(FT_ENTRY)),
35 aTextFT(this, SW_RES(FT_TEXT)),
36 aTOXFT(this, SW_RES(FT_TOX)),
37 aTOXLB(this, SW_RES(LB_TOX)),
38 aOkBT(this, SW_RES(OK_BT)),
39 aCancelBT(this, SW_RES(CANCEL_BT)),
40 rMgr( rTOXMgr ),
41 nPos(0)
43 aTOXLB.SetSelectHdl(LINK(this, SwMultiTOXMarkDlg, SelectHdl));
45 sal_uInt16 nSize = rMgr.GetTOXMarkCount();
46 for(sal_uInt16 i=0; i < nSize; ++i)
47 aTOXLB.InsertEntry(rMgr.GetTOXMark(i)->GetText());
49 aTOXLB.SelectEntryPos(0);
50 aTextFT.SetText(rMgr.GetTOXMark(0)->GetTOXType()->GetTypeName());
52 FreeResource();
56 IMPL_LINK_INLINE_START( SwMultiTOXMarkDlg, SelectHdl, ListBox *, pBox )
58 if(pBox->GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND)
59 { SwTOXMark* pMark = rMgr.GetTOXMark(pBox->GetSelectEntryPos());
60 aTextFT.SetText(pMark->GetTOXType()->GetTypeName());
61 nPos = pBox->GetSelectEntryPos();
63 return 0;
65 IMPL_LINK_INLINE_END( SwMultiTOXMarkDlg, SelectHdl, ListBox *, pBox )
68 void SwMultiTOXMarkDlg::Apply()
70 rMgr.SetCurTOXMark(nPos);
73 /*--------------------------------------------------
74 overload dtor
75 --------------------------------------------------*/
78 SwMultiTOXMarkDlg::~SwMultiTOXMarkDlg() {}
82 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */