/src/libreoffice/vcl/source/weld/ComboBox.cxx
Line | Count | Source |
1 | | /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ |
2 | | /* |
3 | | * This file is part of the LibreOffice project. |
4 | | * |
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/. |
8 | | */ |
9 | | |
10 | | #include <vcl/weld/ComboBox.hxx> |
11 | | |
12 | | namespace weld |
13 | | { |
14 | | void weld::ComboBox::insert(int pos, const OUString& rStr, const OUString* pId, |
15 | | const OUString* pIconName, VirtualDevice* pImageSurface) |
16 | 0 | { |
17 | 0 | disable_notify_events(); |
18 | 0 | do_insert(pos, rStr, pId, pIconName, pImageSurface); |
19 | 0 | enable_notify_events(); |
20 | 0 | } |
21 | | |
22 | | void weld::ComboBox::set_active(int pos) |
23 | 0 | { |
24 | 0 | disable_notify_events(); |
25 | 0 | do_set_active(pos); |
26 | 0 | enable_notify_events(); |
27 | 0 | } |
28 | | |
29 | | void weld::ComboBox::set_active_id(const OUString& rStr) |
30 | 0 | { |
31 | 0 | disable_notify_events(); |
32 | 0 | do_set_active_id(rStr); |
33 | 0 | enable_notify_events(); |
34 | 0 | } |
35 | | |
36 | | bool weld::ComboBox::get_values_changed_from_saved() const |
37 | 0 | { |
38 | 0 | return !m_aSavedValues.empty() |
39 | 0 | && std::find(m_aSavedValues.begin(), m_aSavedValues.end(), get_active_text()) |
40 | 0 | == m_aSavedValues.end(); |
41 | 0 | } |
42 | | } |
43 | | |
44 | | /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ |