fix build
[LibreOffice.git] / include / svx / ClassificationDialog.hxx
blobdd96b5bab1bb492249d086ad2f1bc81f280d552b
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
22 class ClassificationEditView;
24 namespace weld
26 class CustomWeld;
29 namespace svx
31 class SVX_DLLPUBLIC ClassificationDialog final : public weld::GenericDialogController
33 private:
34 SfxClassificationHelper maHelper;
35 SfxClassificationHelper maInternationalHelper;
37 const bool m_bPerParagraph;
38 const std::function<void()> m_aParagraphSignHandler;
40 ImplSVEvent* m_nAsyncExpandEvent;
41 sal_Int32 m_nCurrentSelectedCategory;
43 std::vector<std::vector<ClassificationResult>> m_aRecentlyUsedValuesCollection;
44 std::vector<ClassificationResult> m_aInitialValues;
46 std::unique_ptr<weld::Button> m_xOkButton;
47 std::unique_ptr<weld::Button> m_xSignButton;
48 std::unique_ptr<weld::ToggleButton> m_xToolBox;
49 std::unique_ptr<weld::ComboBox> m_xRecentlyUsedListBox;
50 std::unique_ptr<weld::ComboBox> m_xClassificationListBox;
51 std::unique_ptr<weld::ComboBox> m_xInternationalClassificationListBox;
52 std::unique_ptr<weld::Label> m_xMarkingLabel;
53 std::unique_ptr<weld::TreeView> m_xMarkingListBox;
54 std::unique_ptr<weld::TreeView> m_xIntellectualPropertyPartListBox;
55 std::unique_ptr<weld::TreeView> m_xIntellectualPropertyPartNumberListBox;
56 std::unique_ptr<weld::Button> m_xIntellectualPropertyPartAddButton;
57 std::unique_ptr<weld::Entry> m_xIntellectualPropertyPartEdit;
58 std::unique_ptr<weld::Expander> m_xIntellectualPropertyExpander;
59 std::unique_ptr<ClassificationEditView> m_xEditWindow;
60 std::unique_ptr<weld::CustomWeld> m_xEditWindowWeld;
62 DECL_DLLPRIVATE_LINK(ButtonClicked, weld::Button&, void);
63 DECL_DLLPRIVATE_LINK(OkHdl, weld::Button&, void);
64 DECL_DLLPRIVATE_LINK(SelectToolboxHdl, weld::Toggleable&, void);
65 DECL_DLLPRIVATE_LINK(SelectClassificationHdl, weld::ComboBox&, void);
66 DECL_DLLPRIVATE_LINK(SelectMarkingHdl, weld::TreeView&, bool);
67 DECL_DLLPRIVATE_LINK(SelectIPPartNumbersHdl, weld::TreeView&, bool);
68 DECL_DLLPRIVATE_LINK(SelectRecentlyUsedHdl, weld::ComboBox&, void);
69 DECL_DLLPRIVATE_LINK(SelectIPPartHdl, weld::TreeView&, bool);
70 DECL_DLLPRIVATE_LINK(EditWindowModifiedHdl, LinkParamNone*, void);
71 DECL_DLLPRIVATE_STATIC_LINK(ClassificationDialog, ExpandedHdl, weld::Expander&, void);
72 DECL_DLLPRIVATE_STATIC_LINK(ClassificationDialog, KeyInput, const KeyEvent&, bool);
73 DECL_DLLPRIVATE_LINK(OnAsyncExpandHdl, void*, void);
75 void insertField(ClassificationType eType, OUString const& rString, OUString const& rFullString,
76 OUString const& rIdentifier = OUString());
77 void insertCategoryField(sal_Int32 nID);
79 void readIn(std::vector<ClassificationResult> const& rInput);
80 void readRecentlyUsed();
81 void writeRecentlyUsed();
82 void toggleWidgetsDependingOnCategory();
84 public:
85 ClassificationDialog(weld::Window* pParent,
86 const css::uno::Reference<css::document::XDocumentProperties>& rDocProps,
87 bool bPerParagraph, std::function<void()> aParagraphSignHandler = []() {});
88 ~ClassificationDialog() override;
90 std::vector<ClassificationResult> getResult();
91 void setupValues(std::vector<ClassificationResult>&& rInput);
94 } // end svx namespace
96 #endif // INCLUDED_SVX_CLASSIFICATIONDIALOG_HXX
98 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */