10#ifndef INCLUDED_SFX2_INC_AUTOREDACTDIALOG_HXX
11#define INCLUDED_SFX2_INC_AUTOREDACTDIALOG_HXX
88class FileDialogHelper;
123 void addTarget(std::unique_ptr<RedactionTarget> pTarget);
139 bool getTargets(std::vector<std::pair<RedactionTarget, OUString>>& r_aTargets);
160 bool bCaseSensitive,
bool bWholeWords);
@ REDACTION_TARGET_UNKNOWN
@ REDACTION_TARGET_PREDEFINED
std::unique_ptr< weld::Label > m_xLabelContent
std::unique_ptr< weld::CheckButton > m_xCaseSensitive
std::unique_ptr< weld::Entry > m_xContent
std::unique_ptr< weld::ComboBox > m_xType
OUString getContent() const
RedactionTargetType getType() const
SfxAddTargetDialog(weld::Window *pWindow, const OUString &rName)
std::unique_ptr< weld::Label > m_xLabelPredefContent
DECL_LINK(SelectTypeHdl, weld::ComboBox &, void)
std::unique_ptr< weld::ComboBox > m_xPredefContent
bool isWholeWords() const
bool isCaseSensitive() const
std::unique_ptr< weld::Entry > m_xName
std::unique_ptr< weld::CheckButton > m_xWholeWords
DECL_LINK(DeleteHdl, weld::Button &, void)
std::unique_ptr< sfx2::FileDialogHelper > m_pFileDlg
void addTarget(std::unique_ptr< RedactionTarget > pTarget)
Carry out proper addition both to the targets box, and to the tabletargets vector.
std::vector< std::pair< std::unique_ptr< RedactionTarget >, OUString > > m_aTableTargets
void clearTargets()
Clear all targets both visually and from the targets vector.
std::unique_ptr< weld::Button > m_xEditBtn
DECL_LINK(DoubleClickEditHdl, weld::TreeView &, bool)
DECL_LINK(Load, weld::Button &, void)
std::unique_ptr< weld::Button > m_xSaveBtn
DECL_LINK(SaveHdl, sfx2::FileDialogHelper *, void)
virtual ~SfxAutoRedactDialog() override
bool hasTargets() const
Check if the dialog has any valid redaction targets.
DECL_LINK(Save, weld::Button &, void)
std::unique_ptr< weld::Button > m_xDeleteBtn
DECL_LINK(LoadHdl, sfx2::FileDialogHelper *, void)
DECL_LINK(AddHdl, weld::Button &, void)
SfxAutoRedactDialog(weld::Window *pParent)
SfxObjectShellLock m_xDocShell
void StartFileDialog(StartFileDialogType nType, const OUString &rTitle)
TargetsTable m_aTargetsBox
bool getTargets(std::vector< std::pair< RedactionTarget, OUString > > &r_aTargets)
Copies targets vector Does a shallow copy.
std::unique_ptr< weld::Button > m_xAddBtn
DECL_LINK(EditHdl, weld::Button &, void)
std::unique_ptr< weld::Button > m_xLoadBtn
bool isValidState() const
Check if the dialog is in a valid state.
Used to display the targets list.
std::vector< int > get_selected_rows() const
void connect_row_activated(const Link< weld::TreeView &, bool > &rLink)
std::unique_ptr< weld::TreeView > m_xControl
int get_selected_index() const
int GetRowByTargetName(std::u16string_view sName)
OUString GetNameProposal() const
OUString get_id(int nRow) const
void setRowData(int nRowIndex, const RedactionTarget *pTarget)
void InsertTarget(RedactionTarget *pTarget)
RedactionTarget * GetTargetByName(std::u16string_view sName)
TargetsTable(std::unique_ptr< weld::TreeView > xControl)
Keeps information for a single redaction target.
RedactionTargetType sType