Bump version to 6.4-15
[LibreOffice.git] / include / svx / ClassificationDialog.hxx
blobd03445c77730b1b156cbf891e7aa659c57ff678e
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 */
11 #ifndef INCLUDED_SVX_CLASSIFICATIONDIALOG_HXX
12 #define INCLUDED_SVX_CLASSIFICATIONDIALOG_HXX
14 #include <sal/config.h>
15 #include <vcl/weld.hxx>
16 #include <svx/svxdllapi.h>
17 #include <sfx2/classificationhelper.hxx>
18 #include <svx/ClassificationField.hxx>
20 namespace svx { class ClassificationEditView; }
21 namespace weld { class CustomWeld; }
23 namespace svx {
25 class SVX_DLLPUBLIC ClassificationDialog final : public weld::GenericDialogController
27 private:
28 SfxClassificationHelper maHelper;
29 SfxClassificationHelper maInternationalHelper;
31 const bool m_bPerParagraph;
32 const std::function<void()> m_aParagraphSignHandler;
34 ImplSVEvent* m_nAsyncExpandEvent;
35 sal_Int32 m_nCurrentSelectedCategory;
37 std::vector<std::vector<ClassificationResult>> m_aRecentlyUsedValuesCollection;
38 std::vector<ClassificationResult> m_aInitialValues;
40 std::unique_ptr<weld::Button> m_xOkButton;
41 std::unique_ptr<weld::Button> m_xSignButton;
42 std::unique_ptr<weld::ToggleButton> m_xToolBox;
43 std::unique_ptr<weld::ComboBox> m_xRecentlyUsedListBox;
44 std::unique_ptr<weld::ComboBox> m_xClassificationListBox;
45 std::unique_ptr<weld::ComboBox> m_xInternationalClassificationListBox;
46 std::unique_ptr<weld::Label> m_xMarkingLabel;
47 std::unique_ptr<weld::TreeView> m_xMarkingListBox;
48 std::unique_ptr<weld::TreeView> m_xIntellectualPropertyPartListBox;
49 std::unique_ptr<weld::TreeView> m_xIntellectualPropertyPartNumberListBox;
50 std::unique_ptr<weld::Button> m_xIntellectualPropertyPartAddButton;
51 std::unique_ptr<weld::Entry> m_xIntellectualPropertyPartEdit;
52 std::unique_ptr<weld::Expander> m_xIntellectualPropertyExpander;
53 std::unique_ptr<ClassificationEditView> m_xEditWindow;
54 std::unique_ptr<weld::CustomWeld> m_xEditWindowWeld;
56 DECL_LINK(ButtonClicked, weld::Button&, void);
57 DECL_LINK(OkHdl, weld::Button&, void);
58 DECL_LINK(SelectToolboxHdl, weld::ToggleButton&, void);
59 DECL_LINK(SelectClassificationHdl, weld::ComboBox&, void);
60 DECL_LINK(SelectMarkingHdl, weld::TreeView&, bool);
61 DECL_LINK(SelectIPPartNumbersHdl, weld::TreeView&, bool);
62 DECL_LINK(SelectRecentlyUsedHdl, weld::ComboBox&, void);
63 DECL_LINK(SelectIPPartHdl, weld::TreeView&, bool);
64 DECL_LINK(EditWindowModifiedHdl, LinkParamNone*, void);
65 DECL_STATIC_LINK(ClassificationDialog, ExpandedHdl, weld::Expander&, void);
66 DECL_STATIC_LINK(ClassificationDialog, KeyInput, const KeyEvent&, bool);
67 DECL_LINK(OnAsyncExpandHdl, void*, void);
69 void insertField(ClassificationType eType, OUString const & rString, OUString const & rFullString, OUString const & rIdentifier = OUString());
70 void insertCategoryField(sal_Int32 nID);
72 void readIn(std::vector<ClassificationResult> const & rInput);
73 void readRecentlyUsed();
74 void writeRecentlyUsed();
75 void toggleWidgetsDependingOnCategory();
77 public:
78 ClassificationDialog(weld::Window* pParent, bool bPerParagraph, const std::function<void()>& rParagraphSignHandler = [](){});
79 ~ClassificationDialog() override;
81 std::vector<ClassificationResult> getResult();
82 void setupValues(std::vector<ClassificationResult> const & rInput);
85 } // end svx namespace
87 #endif // INCLUDED_SVX_CLASSIFICATIONDIALOG_HXX
89 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */