diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2020-01-08 16:16:04 +0100 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2020-01-09 15:16:29 +0100 |
commit | 8a78de65b5472b933267601cd484f3ff5e75c2a3 (patch) | |
tree | 00eff12a2402beead603405c2e82100f5956965a /include | |
parent | b8f932e1df1efb230230ab1f1b9c8cfc822a0f4c (diff) |
acc. check: move AccessibilityIssue from svx to sfx2
Move AccessibilityIssue and AccessibilityIssueCollection from
svx to sfx2 because we need to use them in sfx2, but svx is
dependent on sfx2 so this creates a circular dependency.
Change-Id: Ie71d12a018ddc65797f5115eb545f499b927ab40
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86444
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/sfx2/AccessibilityCheck.hxx (renamed from include/svx/AccessibilityCheck.hxx) | 21 | ||||
-rw-r--r-- | include/sfx2/AccessibilityIssue.hxx (renamed from include/svx/AccessibilityIssue.hxx) | 28 | ||||
-rw-r--r-- | include/svx/AccessibilityCheckDialog.hxx | 10 |
3 files changed, 30 insertions, 29 deletions
diff --git a/include/svx/AccessibilityCheck.hxx b/include/sfx2/AccessibilityCheck.hxx index f31b39d1d165..6de1069e58a1 100644 --- a/include/svx/AccessibilityCheck.hxx +++ b/include/sfx2/AccessibilityCheck.hxx @@ -8,32 +8,33 @@ * */ -#ifndef INCLUDED_SVX_ACCESSIBILITYCHECK_HXX -#define INCLUDED_SVX_ACCESSIBILITYCHECK_HXX +#ifndef INCLUDED_SFX2_ACCESSIBILITYCHECKDIALOG_HXX +#define INCLUDED_SFX2_ACCESSIBILITYCHECKDIALOG_HXX -#include <svx/svxdllapi.h> +#include <sfx2/dllapi.h> #include <vector> #include <memory> #include <rtl/ustring.hxx> -#include <svx/AccessibilityIssue.hxx> +#include <sfx2/AccessibilityIssue.hxx> -namespace svx +namespace sfx { -class SVX_DLLPUBLIC AccessibilityCheck +class SFX2_DLLPUBLIC AccessibilityCheck { protected: AccessibilityIssueCollection m_aIssueCollection; public: - virtual ~AccessibilityCheck() {} + AccessibilityCheck() = default; + virtual ~AccessibilityCheck(); virtual void check() = 0; - AccessibilityIssueCollection& getIssueCollecton() { return m_aIssueCollection; } + AccessibilityIssueCollection& getIssueCollecton(); }; -} // end svx namespace +} // end sfx namespace -#endif // INCLUDED_SVX_ACCESSIBILITYCHECKDIALOG_HXX +#endif // INCLUDED_SFX2_ACCESSIBILITYCHECKDIALOG_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/svx/AccessibilityIssue.hxx b/include/sfx2/AccessibilityIssue.hxx index 776e47ff7880..250594e769af 100644 --- a/include/svx/AccessibilityIssue.hxx +++ b/include/sfx2/AccessibilityIssue.hxx @@ -8,15 +8,15 @@ * */ -#ifndef INCLUDED_SVX_ACCESSIBILITYISSUE_HXX -#define INCLUDED_SVX_ACCESSIBILITYISSUE_HXX +#ifndef INCLUDED_SFX2_ACCESSIBILITYISSUE_HXX +#define INCLUDED_SFX2_ACCESSIBILITYISSUE_HXX -#include <svx/svxdllapi.h> +#include <sfx2/dllapi.h> #include <rtl/ustring.hxx> #include <vector> #include <memory> -namespace svx +namespace sfx { enum class AccessibilityIssueID { @@ -26,14 +26,12 @@ enum class AccessibilityIssueID STYLE_LANGUAGE }; -class SVX_DLLPUBLIC AccessibilityIssue +class SFX2_DLLPUBLIC AccessibilityIssue { public: - AccessibilityIssue(AccessibilityIssueID eIssueID = AccessibilityIssueID::UNSPECIFIED) - : m_eIssueID(eIssueID) - { - } - virtual ~AccessibilityIssue() {} + AccessibilityIssue(AccessibilityIssueID eIssueID = AccessibilityIssueID::UNSPECIFIED); + virtual ~AccessibilityIssue(); + virtual bool canGotoIssue() const = 0; virtual void gotoIssue() const = 0; @@ -41,17 +39,19 @@ public: OUString m_aIssueText; }; -class SVX_DLLPUBLIC AccessibilityIssueCollection +class SFX2_DLLPUBLIC AccessibilityIssueCollection { private: std::vector<std::shared_ptr<AccessibilityIssue>> m_aIssues; public: - std::vector<std::shared_ptr<AccessibilityIssue>>& getIssues() { return m_aIssues; } + AccessibilityIssueCollection() = default; + + std::vector<std::shared_ptr<AccessibilityIssue>>& getIssues(); }; -} // end svx namespace +} // end sfx namespace -#endif // INCLUDED_SVX_ACCESSIBILITYISSUE_HXX +#endif // INCLUDED_SFX2_ACCESSIBILITYISSUE_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/svx/AccessibilityCheckDialog.hxx b/include/svx/AccessibilityCheckDialog.hxx index 0656abe1593d..bb7205ba4dcb 100644 --- a/include/svx/AccessibilityCheckDialog.hxx +++ b/include/svx/AccessibilityCheckDialog.hxx @@ -11,7 +11,7 @@ #ifndef INCLUDED_SVX_ACCESSIBILITYCHECKDIALOG_HXX #define INCLUDED_SVX_ACCESSIBILITYCHECKDIALOG_HXX -#include <svx/AccessibilityCheck.hxx> +#include <sfx2/AccessibilityCheck.hxx> #include <sal/types.h> #include <svx/svxdllapi.h> #include <tools/gen.hxx> @@ -28,11 +28,11 @@ private: std::unique_ptr<weld::Label> m_xLabel; std::unique_ptr<weld::Button> m_xGotoButton; - std::shared_ptr<AccessibilityIssue> const& m_pAccessibilityIssue; + std::shared_ptr<sfx::AccessibilityIssue> const& m_pAccessibilityIssue; public: AccessibilityCheckEntry(weld::Container* pParent, - std::shared_ptr<AccessibilityIssue> const& pAccessibilityIssue); + std::shared_ptr<sfx::AccessibilityIssue> const& pAccessibilityIssue); weld::Widget* get_widget() const { return m_xContainer.get(); } @@ -42,7 +42,7 @@ public: class SVX_DLLPUBLIC AccessibilityCheckDialog final : public weld::GenericDialogController { private: - AccessibilityIssueCollection m_aIssueCollection; + sfx::AccessibilityIssueCollection m_aIssueCollection; std::vector<std::unique_ptr<AccessibilityCheckEntry>> m_aAccessibilityCheckEntries; // Controls @@ -50,7 +50,7 @@ private: public: AccessibilityCheckDialog(weld::Window* pParent, - AccessibilityIssueCollection const& rIssueCollection); + sfx::AccessibilityIssueCollection const& rIssueCollection); virtual ~AccessibilityCheckDialog() override; virtual short run() override; }; |