1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 #undef SC_DLLIMPLEMENTATION
22 #include <vcl/msgbox.hxx>
24 #include "shtabdlg.hxx"
25 #include "scresid.hxx"
26 #include "miscdlgs.hrc"
28 ScShowTabDlg::ScShowTabDlg(vcl::Window
* pParent
)
29 : ModalDialog(pParent
, "ShowSheetDialog", "modules/scalc/ui/showsheetdialog.ui")
31 get(m_pFrame
, "frame");
32 get(m_pLb
, "treeview");
35 m_pLb
->EnableMultiSelection(true);
36 m_pLb
->set_height_request(m_pLb
->GetTextHeight() * 10);
37 m_pLb
->SetDoubleClickHdl( LINK( this, ScShowTabDlg
, DblClkHdl
) );
40 ScShowTabDlg::~ScShowTabDlg()
45 void ScShowTabDlg::dispose()
49 ModalDialog::dispose();
52 void ScShowTabDlg::SetDescription(
53 const OUString
& rTitle
, const OUString
& rFixedText
,
54 const OString
& rDlgHelpId
, const OString
& sLbHelpId
)
57 m_pFrame
->set_label(rFixedText
);
58 SetHelpId( rDlgHelpId
);
59 m_pLb
->SetHelpId( sLbHelpId
);
62 void ScShowTabDlg::Insert( const OUString
& rString
, bool bSelected
)
64 m_pLb
->InsertEntry( rString
);
66 m_pLb
->SelectEntryPos( m_pLb
->GetEntryCount() - 1 );
69 sal_Int32
ScShowTabDlg::GetSelectEntryCount() const
71 return m_pLb
->GetSelectEntryCount();
74 OUString
ScShowTabDlg::GetSelectEntry(sal_Int32 nPos
) const
76 return m_pLb
->GetSelectEntry(nPos
);
79 sal_Int32
ScShowTabDlg::GetSelectEntryPos(sal_Int32 nPos
) const
81 return m_pLb
->GetSelectEntryPos(nPos
);
84 IMPL_LINK_NOARG_TYPED(ScShowTabDlg
, DblClkHdl
, ListBox
&, void)
89 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */