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 .
22 #include "viewdata.hxx"
23 #include <vcl/weld.hxx>
27 struct DuplicatesResponse
29 std::vector
<int> vEntries
;
30 bool bRemove
; // false ==> Select
31 bool bIncludesHeaders
;
32 bool bDuplicateRows
; // false ==> DuplicateColumns
35 , bIncludesHeaders(false)
36 , bDuplicateRows(false)
41 class ScDuplicateRecordsDlg
: public weld::GenericDialogController
44 ScDuplicateRecordsDlg() = delete;
45 explicit ScDuplicateRecordsDlg(weld::Window
* pParent
,
46 css::uno::Sequence
<uno::Sequence
<uno::Any
>>& rData
,
47 ScViewData
& rViewData
, ScRange
& aRange
);
48 virtual ~ScDuplicateRecordsDlg() override
;
50 const DuplicatesResponse
& GetDialogData() { return maResponse
; };
54 void SetDialogData(bool bToggle
);
55 void SetDialogLabels();
56 std::unique_ptr
<weld::CheckButton
> m_xIncludesHeaders
;
57 std::unique_ptr
<weld::RadioButton
> m_xRadioRow
;
58 std::unique_ptr
<weld::RadioButton
> m_xRadioColumn
;
59 std::unique_ptr
<weld::RadioButton
> m_xRadioSelect
;
60 std::unique_ptr
<weld::RadioButton
> m_xRadioRemove
;
61 std::unique_ptr
<weld::TreeView
> m_xCheckList
;
62 std::unique_ptr
<weld::CheckButton
> m_xAllChkBtn
;
64 std::unique_ptr
<weld::Button
> m_xOkBtn
;
66 uno::Sequence
<uno::Sequence
<uno::Any
>>& mrCellData
;
68 ScViewData
& mrViewData
;
69 DuplicatesResponse maResponse
;
71 void InsertEntry(const OUString
& rTxt
, bool bToggle
);
73 DECL_LINK(OrientationHdl
, weld::Toggleable
&, void);
74 DECL_LINK(HeaderCkbHdl
, weld::Toggleable
&, void);
75 DECL_LINK(OkHdl
, weld::Button
&, void);
76 DECL_LINK(AllCheckBtnHdl
, weld::Toggleable
&, void);
77 DECL_LINK(RecordsChkHdl
, const weld::TreeView::iter_col
&, void);
80 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */