summaryrefslogtreecommitdiff
path: root/sfx2/inc
diff options
context:
space:
mode:
authorMuhammet Kara <muhammet.kara@collabora.com>2019-06-18 21:04:26 +0300
committerMuhammet Kara <muhammet.kara@collabora.com>2019-06-18 22:20:31 +0200
commit1200845272cb1a92507cfe01c125c5aca2d5452f (patch)
treed3b65e738450aacf260ad0167706d31647e7ae7a /sfx2/inc
parent9c2043f649078c3b316415f174e6ec2840908d7e (diff)
Copy targets instead of moving during redaction
To allow properly remembering the last state. * And some clean-up. Change-Id: Id0b0f4251e3578b8baced1e6e6b1161f46e324dc Reviewed-on: https://gerrit.libreoffice.org/74302 Tested-by: Jenkins Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/74308 Tested-by: Muhammet Kara <muhammet.kara@collabora.com>
Diffstat (limited to 'sfx2/inc')
-rw-r--r--sfx2/inc/autoredactdialog.hxx14
1 files changed, 5 insertions, 9 deletions
diff --git a/sfx2/inc/autoredactdialog.hxx b/sfx2/inc/autoredactdialog.hxx
index 2cec20cc64c8..7082052d60a9 100644
--- a/sfx2/inc/autoredactdialog.hxx
+++ b/sfx2/inc/autoredactdialog.hxx
@@ -106,6 +106,7 @@ class SFX2_DLLPUBLIC SfxAutoRedactDialog : public SfxDialogController
std::vector<std::pair<RedactionTarget*, OUString>> m_aTableTargets;
std::unique_ptr<sfx2::FileDialogHelper> m_pFileDlg;
bool m_bIsValidState;
+ bool m_bTargetsCopied;
std::unique_ptr<weld::Label> m_xRedactionTargetsLabel;
std::unique_ptr<TargetsTable> m_xTargetsBox;
@@ -138,16 +139,11 @@ public:
bool hasTargets() const;
/// Check if the dialog is in a valid state.
bool isValidState() const { return m_bIsValidState; }
- /** Literally moves targets into the given vector.
- * At the end of the operation, m_aTableTargets vector becomes empty.
- * The contents of the given vector will be erased before being filled in.
- * Returns true if successfull.
+ /** Copies targets vector
+ * Does a shallow copy.
+ * Returns true if successful.
*/
- bool moveTargets(std::vector<std::pair<RedactionTarget*, OUString>>& r_aTargets);
-
- // TODO: Some method(s) to check emptiness/validity
- // TODO: Some method(s) to get the search params/objects
- // TODO: Some method(s) to load/save redaction target sets
+ bool getTargets(std::vector<std::pair<RedactionTarget*, OUString>>& r_aTargets);
};
class SfxAddTargetDialog : public weld::GenericDialogController