diff options
Diffstat (limited to 'sw/source/ui/inc')
-rw-r--r-- | sw/source/ui/inc/bookmark.hxx | 139 | ||||
-rw-r--r-- | sw/source/ui/inc/condedit.hxx | 122 | ||||
-rw-r--r-- | sw/source/ui/inc/mmresultdialogs.hxx | 36 | ||||
-rw-r--r-- | sw/source/ui/inc/regionsw.hxx | 262 | ||||
-rw-r--r-- | sw/source/ui/inc/swuiexp.hxx | 6 |
5 files changed, 540 insertions, 25 deletions
diff --git a/sw/source/ui/inc/bookmark.hxx b/sw/source/ui/inc/bookmark.hxx new file mode 100644 index 000000000000..c7e801c75778 --- /dev/null +++ b/sw/source/ui/inc/bookmark.hxx @@ -0,0 +1,139 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#pragma once + +#include <sfx2/basedlgs.hxx> +#include <vcl/weld.hxx> +#include <IMark.hxx> +#include "condedit.hxx" + +class SwWrtShell; + +class BookmarkTable +{ + std::unique_ptr<weld::TreeView> m_xControl; + std::unique_ptr<weld::TreeIter> GetRowByBookmarkName(const OUString& sName); + +public: + BookmarkTable(std::unique_ptr<weld::TreeView> xControl); + void InsertBookmark(SwWrtShell& rSh, sw::mark::MarkBase* pMark); + bool SelectByName(const OUString& sName); + sw::mark::MarkBase* GetBookmarkByName(const OUString& sName); + OUString GetNameProposal() const; + + void unselect_all() { m_xControl->unselect_all(); } + bool has_focus() const { return m_xControl->has_focus(); } + std::unique_ptr<weld::TreeIter> get_selected() const; + void clear() { m_xControl->clear(); } + void select(const weld::TreeIter& rIter) { m_xControl->select(rIter); } + void remove_selection() { m_xControl->remove_selection(); } + OUString get_text(const weld::TreeIter& rIter) const { return m_xControl->get_text(rIter, 2); } + OUString get_id(const weld::TreeIter& rIter) const { return m_xControl->get_id(rIter); } + void set_sort_indicator(TriState eState, int nColumn = -1) + { + m_xControl->set_sort_indicator(eState, nColumn); + } + void selected_foreach(const std::function<bool(weld::TreeIter&)>& func) + { + m_xControl->selected_foreach(func); + } + + void connect_changed(const Link<weld::TreeView&, void>& rLink) + { + m_xControl->connect_selection_changed(rLink); + } + void connect_row_activated(const Link<weld::TreeView&, bool>& rLink) + { + m_xControl->connect_row_activated(rLink); + } + void connect_column_clicked(const Link<int, void>& rLink) + { + m_xControl->connect_column_clicked(rLink); + } + void connect_editing(const Link<const weld::TreeIter&, bool>& rStartLink, + const Link<const weld::TreeView::iter_string&, bool>& rEndLink) + { + m_xControl->connect_editing(rStartLink, rEndLink); + } + void set_column_editables(::std::vector<bool> const& rEditables) + { + m_xControl->set_column_editables(rEditables); + } + void start_editing(weld::TreeIter const& rIter) { m_xControl->start_editing(rIter); } + void make_sorted() { m_xControl->make_sorted(); } + void make_unsorted() { m_xControl->make_unsorted(); } + bool get_sort_order() const { return m_xControl->get_sort_order(); } + void set_sort_order(bool bAscending) { m_xControl->set_sort_order(bAscending); } + int get_sort_column() const { return m_xControl->get_sort_column(); } + void set_sort_column(int nColumn) { m_xControl->set_sort_column(nColumn); } + + static constexpr OUString aForbiddenChars = u"/\\@*?\",#"_ustr; + static const char s_cSeparator; +}; + +class SwInsertBookmarkDlg final : public SfxDialogController +{ + SwWrtShell& m_rSh; + std::vector<std::pair<sw::mark::MarkBase*, SwMarkName>> m_aTableBookmarks; + sal_Int32 m_nLastBookmarksCount; + bool m_bSorted; + bool m_bAreProtected; + + std::unique_ptr<weld::Entry> m_xEditBox; + std::unique_ptr<weld::Button> m_xInsertBtn; + std::unique_ptr<weld::Button> m_xDeleteBtn; + std::unique_ptr<weld::Button> m_xGotoBtn; + std::unique_ptr<weld::Button> m_xEditTextBtn; + std::unique_ptr<weld::Button> m_xRenameBtn; + std::unique_ptr<weld::CheckButton> m_xHideCB; + std::unique_ptr<weld::Label> m_xConditionFT; + std::unique_ptr<ConditionEdit<weld::Entry>> m_xConditionED; + std::unique_ptr<BookmarkTable> m_xBookmarksBox; + std::unique_ptr<weld::Label> m_xForbiddenChars; + + DECL_LINK(ModifyHdl, weld::Entry&, void); + DECL_LINK(InsertHdl, weld::Button&, void); + DECL_LINK(DeleteHdl, weld::Button&, void); + DECL_LINK(EditTextHdl, weld::Button&, void); + DECL_LINK(RenameHdl, weld::Button&, void); + DECL_LINK(GotoHdl, weld::Button&, void); + DECL_LINK(SelectionChangedHdl, weld::TreeView&, void); + DECL_LINK(DoubleClickHdl, weld::TreeView&, bool); + DECL_LINK(HeaderBarClick, int, void); + DECL_LINK(ChangeHideHdl, weld::Toggleable&, void); + DECL_LINK(EditingHdl, weld::TreeIter const&, bool); + DECL_LINK(EditedHdl, weld::TreeView::iter_string const&, bool); + + // Fill table with bookmarks + void PopulateTable(); + /** + * Check if displayed bookmarks are up-to date, if not update them. + * @return True if no update was needed. + */ + bool ValidateBookmarks(); + bool HaveBookmarksChanged(); + void GotoSelectedBookmark(); + void SelectionChanged(); + +public: + SwInsertBookmarkDlg(weld::Window* pParent, SwWrtShell& rSh, OUString const* pSelected); + virtual ~SwInsertBookmarkDlg() override; +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/inc/condedit.hxx b/sw/source/ui/inc/condedit.hxx new file mode 100644 index 000000000000..ab07c0c597dd --- /dev/null +++ b/sw/source/ui/inc/condedit.hxx @@ -0,0 +1,122 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef INCLUDED_SW_SOURCE_UIBASE_INC_CONDEDIT_HXX +#define INCLUDED_SW_SOURCE_UIBASE_INC_CONDEDIT_HXX + +#include <vcl/transfer.hxx> +#include <vcl/weld.hxx> +#include <svx/dbaexchange.hxx> + +template <typename X> class ConditionEdit; + +template <class T> class ConditionEditDropTarget final : public DropTargetHelper +{ +private: + ConditionEdit<T>& m_rEdit; + + virtual sal_Int8 AcceptDrop(const AcceptDropEvent&) override + { + return svx::OColumnTransferable::canExtractColumnDescriptor( + GetDataFlavorExVector(), ColumnTransferFormatFlags::COLUMN_DESCRIPTOR) + ? DND_ACTION_COPY + : DND_ACTION_NONE; + } + virtual sal_Int8 ExecuteDrop(const ExecuteDropEvent& rEvt) override + { + sal_Int8 nRet = DND_ACTION_NONE; + if (m_rEdit.GetDropEnable()) + { + TransferableDataHelper aData(rEvt.maDropEvent.Transferable); + + const DataFlavorExVector& rVector = aData.GetDataFlavorExVector(); + if (svx::OColumnTransferable::canExtractColumnDescriptor( + rVector, ColumnTransferFormatFlags::COLUMN_DESCRIPTOR)) + { + svx::ODataAccessDescriptor aColDesc + = svx::OColumnTransferable::extractColumnDescriptor(aData); + OUString sDBName; + bool bBrackets = m_rEdit.GetBrackets(); + if (bBrackets) + sDBName += "["; + OUString sTmp = aColDesc.getDataSource(); + sDBName += sTmp + "."; + + aColDesc[svx::DataAccessDescriptorProperty::Command] >>= sTmp; + sDBName += sTmp + "."; + + aColDesc[svx::DataAccessDescriptorProperty::ColumnName] >>= sTmp; + sDBName += sTmp; + if (bBrackets) + sDBName += "]"; + + m_rEdit.get_widget().set_text(sDBName); + nRet = DND_ACTION_COPY; + } + } + return nRet; + } + +public: + ConditionEditDropTarget(ConditionEdit<T>& rEdit) + : DropTargetHelper(rEdit.get_widget().get_drop_target()) + , m_rEdit(rEdit) + { + } +}; + +//< weld::Entry > +template <class T> class ConditionEdit +{ + std::unique_ptr<T> m_xControl; + ConditionEditDropTarget<T> m_aDropTargetHelper; + bool m_bBrackets, m_bEnableDrop; + +public: + ConditionEdit(std::unique_ptr<T> xControl) + : m_xControl(std::move(xControl)) + , m_aDropTargetHelper(*this) + , m_bBrackets(true) + , m_bEnableDrop(true) + { + } + + OUString get_text() const { return m_xControl->get_text(); } + void set_text(const OUString& rText) { m_xControl->set_text(rText); } + void set_visible(bool bVisible) { m_xControl->set_visible(bVisible); } + void set_accessible_name(const OUString& rName) { m_xControl->set_accessible_name(rName); } + void save_value() { m_xControl->save_value(); } + bool get_value_changed_from_saved() const { return m_xControl->get_value_changed_from_saved(); } + void set_sensitive(bool bSensitive) { m_xControl->set_sensitive(bSensitive); } + void connect_changed(const Link<T&, void>& rLink) { m_xControl->connect_changed(rLink); } + void replace_selection(const OUString& rText) { m_xControl->replace_selection(rText); } + void hide() { m_xControl->hide(); } + T& get_widget() { return *m_xControl; } + + OUString get_buildable_name() const { return m_xControl->get_buildable_name(); } + void set_buildable_name(const OUString& rId) { m_xControl->set_buildable_name(rId); } + + void ShowBrackets(bool bShow) { m_bBrackets = bShow; } + bool GetBrackets() const { return m_bBrackets; } + void SetDropEnable(bool bFlag) { m_bEnableDrop = bFlag; } + bool GetDropEnable() const { return m_bEnableDrop; } +}; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/inc/mmresultdialogs.hxx b/sw/source/ui/inc/mmresultdialogs.hxx index 18151a810f99..78795e0a6fe7 100644 --- a/sw/source/ui/inc/mmresultdialogs.hxx +++ b/sw/source/ui/inc/mmresultdialogs.hxx @@ -16,35 +16,33 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_SW_SOURCE_UI_DBUI_MMOUTPUTPAGE_HXX -#define INCLUDED_SW_SOURCE_UI_DBUI_MMOUTPUTPAGE_HXX + +#pragma once #include <vcl/weld.hxx> #include <vcl/print.hxx> #include <sfx2/basedlgs.hxx> #include <mailmergehelper.hxx> -class SwMailMergeWizard; -class SfxPrinter; -class SwSendMailDialog; +class Timer; namespace com::sun::star::mail { class XMailMessage; } /// Dialog implementing the saving as of the result document. -class SwMMResultSaveDialog : public SfxDialogController +class SwMMResultSaveDialog final : public SfxDialogController { bool m_bCancelSaving; std::unique_ptr<weld::RadioButton> m_xSaveAsOneRB; std::unique_ptr<weld::RadioButton> m_xSaveIndividualRB; - std::unique_ptr<weld::RadioButton> m_xFromRB; + std::unique_ptr<weld::CheckButton> m_xFromRB; std::unique_ptr<weld::SpinButton> m_xFromNF; std::unique_ptr<weld::Label> m_xToFT; std::unique_ptr<weld::SpinButton> m_xToNF; std::unique_ptr<weld::Button> m_xOKButton; DECL_LINK(SaveOutputHdl_Impl, weld::Button& , void); - DECL_LINK(DocumentSelectionHdl_Impl, weld::ToggleButton&, void); + DECL_LINK(DocumentSelectionHdl_Impl, weld::Toggleable&, void); public: SwMMResultSaveDialog(weld::Window* pParent); @@ -52,11 +50,10 @@ public: }; /// Dialog implementing the printing of the result document. -class SwMMResultPrintDialog : public SfxDialogController +class SwMMResultPrintDialog final : public SfxDialogController { VclPtr<Printer> m_pTempPrinter; - std::unique_ptr<weld::Label> m_xPrinterFT; std::unique_ptr<weld::ComboBox> m_xPrinterLB; std::unique_ptr<weld::Button> m_xPrinterSettingsPB; std::unique_ptr<weld::RadioButton> m_xPrintAllRB; @@ -69,7 +66,7 @@ class SwMMResultPrintDialog : public SfxDialogController DECL_LINK(PrinterChangeHdl_Impl, weld::ComboBox&, void ); DECL_LINK(PrintHdl_Impl, weld::Button&, void); DECL_LINK(PrinterSetupHdl_Impl, weld::Button&, void ); - DECL_LINK(DocumentSelectionHdl_Impl, weld::ToggleButton&, void); + DECL_LINK(DocumentSelectionHdl_Impl, weld::Toggleable&, void); void FillInPrinterSettings(); @@ -79,19 +76,16 @@ public: }; /// Dialog implementing the sending as email of the result document. -class SwMMResultEmailDialog : public SfxDialogController +class SwMMResultEmailDialog final : public SfxDialogController { OUString m_sConfigureMail; OUString m_sCC; OUString m_sBCC; OUString m_sBody; - std::unique_ptr<weld::Label> m_xMailToFT; std::unique_ptr<weld::ComboBox> m_xMailToLB; std::unique_ptr<weld::Button> m_xCopyToPB; - std::unique_ptr<weld::Label> m_xSubjectFT; std::unique_ptr<weld::Entry> m_xSubjectED; - std::unique_ptr<weld::Label> m_xSendAsFT; std::unique_ptr<weld::ComboBox> m_xSendAsLB; std::unique_ptr<weld::Button> m_xSendAsPB; std::unique_ptr<weld::Widget> m_xAttachmentGroup; @@ -110,8 +104,8 @@ class SwMMResultEmailDialog : public SfxDialogController DECL_LINK(SendTypeHdl_Impl, weld::ComboBox&, void); DECL_LINK(SendAsHdl_Impl, weld::Button&, void); DECL_LINK(SendDocumentsHdl_Impl, weld::Button&, void); - DECL_LINK(DocumentSelectionHdl_Impl, weld::ToggleButton&, void); - DECL_LINK(CheckHdl, weld::ToggleButton&, void ); + DECL_LINK(DocumentSelectionHdl_Impl, weld::Toggleable&, void); + DECL_LINK(CheckHdl, weld::Toggleable&, void ); void FillInEmailSettings(); @@ -135,15 +129,17 @@ struct SwMailDescriptor }; struct SwSendMailDialog_Impl; class SwMailMergeConfigItem; -class SwSendMailDialog : public weld::GenericDialogController +class SwSendMailDialog final : public weld::GenericDialogController { OUString m_sContinue; OUString m_sStop; + OUString m_sClose; OUString m_sTransferStatus; OUString m_sErrorStatus; OUString m_sSendingTo; OUString m_sCompleted; OUString m_sFailed; + OUString m_sAddressInvalid; bool m_bCancel; bool m_bDestructionEnabled; @@ -151,7 +147,7 @@ class SwSendMailDialog : public weld::GenericDialogController std::unique_ptr<SwSendMailDialog_Impl> m_pImpl; SwMailMergeConfigItem* m_pConfigItem; sal_Int32 m_nExpectedCount; - sal_Int32 m_nSendCount; + sal_Int32 m_nProcessedCount; sal_Int32 m_nErrorCount; std::unique_ptr<weld::Label> m_xTransferStatus; @@ -161,7 +157,6 @@ class SwSendMailDialog : public weld::GenericDialogController std::unique_ptr<weld::TreeView> m_xStatus; std::unique_ptr<weld::Button> m_xStop; std::unique_ptr<weld::Button> m_xCancel; - std::unique_ptr<weld::Expander> m_xExpander; DECL_LINK( StopHdl_Impl, weld::Button&, void ); DECL_LINK( CancelHdl_Impl, weld::Button& , void); @@ -187,6 +182,5 @@ public: void AllMailsSent(); }; -#endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/inc/regionsw.hxx b/sw/source/ui/inc/regionsw.hxx new file mode 100644 index 000000000000..8bf5fc6770a8 --- /dev/null +++ b/sw/source/ui/inc/regionsw.hxx @@ -0,0 +1,262 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef INCLUDED_SW_SOURCE_UIBASE_INC_REGIONSW_HXX +#define INCLUDED_SW_SOURCE_UIBASE_INC_REGIONSW_HXX + +#include <sfx2/basedlgs.hxx> +#include <sfx2/tabdlg.hxx> + +#include "condedit.hxx" +#include <section.hxx> +#include <fmtftntx.hxx> +#include <numberingtypelistbox.hxx> +#include <svx/paraprev.hxx> + +#include <memory> +#include <map> + +class SwWrtShell; + +namespace sfx2 +{ +class DocumentInserter; +class FileDialogHelper; +} + +// dialog "edit regions" +class SectRepr; +typedef std::map<size_t, std::unique_ptr<SectRepr>> SectReprs_t; + +class SwEditRegionDlg final : public SfxDialogController +{ + bool m_bSubRegionsFilled; + + SwWrtShell& m_rSh; + SectReprs_t m_SectReprs; + const SwSection* m_pCurrSect; + std::unique_ptr<sfx2::DocumentInserter> m_pDocInserter; + + bool m_bDontCheckPasswd : 1; + + std::unique_ptr<weld::Entry> m_xCurName; + std::unique_ptr<weld::TreeView> m_xTree; + std::unique_ptr<weld::CheckButton> m_xFileCB; + std::unique_ptr<weld::CheckButton> m_xDDECB; + std::unique_ptr<weld::Widget> m_xDDEFrame; + std::unique_ptr<weld::Label> m_xFileNameFT; + std::unique_ptr<weld::Label> m_xDDECommandFT; + std::unique_ptr<weld::Entry> m_xFileNameED; + std::unique_ptr<weld::Button> m_xFilePB; + std::unique_ptr<weld::Label> m_xSubRegionFT; + std::unique_ptr<weld::ComboBox> m_xSubRegionED; + std::unique_ptr<weld::CheckButton> m_xProtectCB; + std::unique_ptr<weld::CheckButton> m_xPasswdCB; + std::unique_ptr<weld::Button> m_xPasswdPB; + std::unique_ptr<weld::CheckButton> m_xHideCB; + std::unique_ptr<weld::Label> m_xConditionFT; + std::unique_ptr<ConditionEdit<weld::Entry>> m_xConditionED; + // #114856# edit in readonly sections + std::unique_ptr<weld::CheckButton> m_xEditInReadonlyCB; + std::unique_ptr<weld::Button> m_xOK; + std::unique_ptr<weld::Button> m_xOptionsPB; + std::unique_ptr<weld::Button> m_xDismiss; + std::unique_ptr<weld::Widget> m_xHideFrame; + std::unique_ptr<weld::Frame> m_xLinkFrame; + + void RecurseList(const SwSectionFormat* pFormat, const weld::TreeIter* pIter); + size_t FindArrPos(const SwSectionFormat* pFormat); + + DECL_LINK(GetFirstEntryHdl, weld::TreeView&, void); + + DECL_LINK(OkHdl, weld::Button&, void); + DECL_LINK(NameEditHdl, weld::Entry&, void); + DECL_LINK(ConditionEditHdl, weld::Entry&, void); + + void ChangePasswd(bool bChange); + DECL_LINK(TogglePasswdHdl, weld::Toggleable&, void); + DECL_LINK(ChangePasswdHdl, weld::Button&, void); + DECL_LINK(ChangeProtectHdl, weld::Toggleable&, void); + DECL_LINK(ChangeHideHdl, weld::Toggleable&, void); + // #114856# edit in readonly sections + DECL_LINK(ChangeEditInReadonlyHdl, weld::Toggleable&, void); + DECL_LINK(ChangeDismissHdl, weld::Button&, void); + DECL_LINK(UseFileHdl, weld::Toggleable&, void); + DECL_LINK(FileSearchHdl, weld::Button&, void); + DECL_LINK(OptionsHdl, weld::Button&, void); + DECL_LINK(FileNameComboBoxHdl, weld::ComboBox&, void); + DECL_LINK(FileNameEntryHdl, weld::Entry&, void); + DECL_LINK(DDEHdl, weld::Toggleable&, void); + DECL_LINK(DlgClosedHdl, sfx2::FileDialogHelper*, void); + DECL_LINK(SubRegionEventHdl, weld::ComboBox&, void); + + bool CheckPasswd(weld::Toggleable* pBox = nullptr); + +public: + SwEditRegionDlg(weld::Window* pParent, SwWrtShell& rWrtSh); + virtual ~SwEditRegionDlg() override; + + void SelectSection(std::u16string_view rSectionName); +}; + +// dialog "insert region" +class SwInsertSectionTabPage final : public SfxTabPage +{ + OUString m_sFileName; + OUString m_sFilterName; + OUString m_sFilePasswd; + + css::uno::Sequence<sal_Int8> m_aNewPasswd; + SwWrtShell* m_pWrtSh; + std::unique_ptr<sfx2::DocumentInserter> m_pDocInserter; + + std::unique_ptr<weld::EntryTreeView> m_xCurName; + std::unique_ptr<weld::CheckButton> m_xFileCB; + std::unique_ptr<weld::CheckButton> m_xDDECB; + std::unique_ptr<weld::Label> m_xDDECommandFT; + std::unique_ptr<weld::Label> m_xFileNameFT; + std::unique_ptr<weld::Entry> m_xFileNameED; + std::unique_ptr<weld::Button> m_xFilePB; + std::unique_ptr<weld::Label> m_xSubRegionFT; + std::unique_ptr<weld::ComboBox> m_xSubRegionED; + std::unique_ptr<weld::CheckButton> m_xProtectCB; + std::unique_ptr<weld::CheckButton> m_xPasswdCB; + std::unique_ptr<weld::Button> m_xPasswdPB; + std::unique_ptr<weld::CheckButton> m_xHideCB; + std::unique_ptr<weld::Label> m_xConditionFT; + std::unique_ptr<ConditionEdit<weld::Entry>> m_xConditionED; + // #114856# edit in readonly sections + std::unique_ptr<weld::CheckButton> m_xEditInReadonlyCB; + + void ChangePasswd(bool bChange); + + DECL_LINK(ChangeHideHdl, weld::Toggleable&, void); + DECL_LINK(ChangeProtectHdl, weld::Toggleable&, void); + DECL_LINK(ChangePasswdHdl, weld::Button&, void); + DECL_LINK(TogglePasswdHdl, weld::Toggleable&, void); + DECL_LINK(NameEditHdl, weld::ComboBox&, void); + DECL_LINK(UseFileHdl, weld::Toggleable&, void); + DECL_LINK(FileSearchHdl, weld::Button&, void); + DECL_LINK(DDEHdl, weld::Toggleable&, void); + DECL_LINK(DlgClosedHdl, sfx2::FileDialogHelper*, void); + +public: + SwInsertSectionTabPage(weld::Container* pPage, weld::DialogController* pController, + const SfxItemSet& rAttrSet); + virtual ~SwInsertSectionTabPage() override; + + void SetWrtShell(SwWrtShell& rSh); + + virtual bool FillItemSet(SfxItemSet*) override; + virtual void Reset(const SfxItemSet*) override; + + static std::unique_ptr<SfxTabPage> + Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rAttrSet); +}; + +class SwSectionFootnoteEndTabPage final : public SfxTabPage +{ + std::unique_ptr<weld::CheckButton> m_xFootnoteNtAtTextEndCB; + std::unique_ptr<weld::CheckButton> m_xFootnoteNtNumCB; + std::unique_ptr<weld::Label> m_xFootnoteOffsetLbl; + std::unique_ptr<weld::SpinButton> m_xFootnoteOffsetField; + std::unique_ptr<weld::CheckButton> m_xFootnoteNtNumFormatCB; + std::unique_ptr<weld::Label> m_xFootnotePrefixFT; + std::unique_ptr<weld::Entry> m_xFootnotePrefixED; + std::unique_ptr<SwNumberingTypeListBox> m_xFootnoteNumViewBox; + std::unique_ptr<weld::Label> m_xFootnoteSuffixFT; + std::unique_ptr<weld::Entry> m_xFootnoteSuffixED; + std::unique_ptr<weld::CheckButton> m_xEndNtAtTextEndCB; + std::unique_ptr<weld::CheckButton> m_xEndNtNumCB; + std::unique_ptr<weld::Label> m_xEndOffsetLbl; + std::unique_ptr<weld::SpinButton> m_xEndOffsetField; + std::unique_ptr<weld::CheckButton> m_xEndNtNumFormatCB; + std::unique_ptr<weld::Label> m_xEndPrefixFT; + std::unique_ptr<weld::Entry> m_xEndPrefixED; + std::unique_ptr<SwNumberingTypeListBox> m_xEndNumViewBox; + std::unique_ptr<weld::Label> m_xEndSuffixFT; + std::unique_ptr<weld::Entry> m_xEndSuffixED; + + DECL_LINK(FootEndHdl, weld::Toggleable&, void); + void ResetState(bool bFootnote, const SwFormatFootnoteEndAtTextEnd&); + +public: + SwSectionFootnoteEndTabPage(weld::Container* pPage, weld::DialogController* pController, + const SfxItemSet& rAttrSet); + virtual ~SwSectionFootnoteEndTabPage() override; + + virtual bool FillItemSet(SfxItemSet*) override; + virtual void Reset(const SfxItemSet*) override; + + static std::unique_ptr<SfxTabPage> + Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rAttrSet); +}; + +class SwSectionIndentTabPage final : public SfxTabPage +{ + SvxParaPrevWindow m_aPreviewWin; + std::unique_ptr<weld::MetricSpinButton> m_xBeforeMF; + std::unique_ptr<weld::MetricSpinButton> m_xAfterMF; + std::unique_ptr<weld::CustomWeld> m_xPreviewWin; + + DECL_LINK(IndentModifyHdl, weld::MetricSpinButton&, void); + +public: + SwSectionIndentTabPage(weld::Container* pPage, weld::DialogController* pController, + const SfxItemSet& rAttrSet); + virtual ~SwSectionIndentTabPage() override; + + virtual bool FillItemSet(SfxItemSet*) override; + virtual void Reset(const SfxItemSet*) override; + + static std::unique_ptr<SfxTabPage> + Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rAttrSet); + + void SetWrtShell(SwWrtShell const& rSh); +}; + +class SwInsertSectionTabDialog final : public SfxTabDialogController +{ + SwWrtShell& m_rWrtSh; + std::unique_ptr<SwSectionData> m_pSectionData; + + virtual void PageCreated(const OUString& rId, SfxTabPage& rPage) override; + virtual short Ok() override; + +public: + SwInsertSectionTabDialog(weld::Window* pParent, const SfxItemSet& rSet, SwWrtShell& rSh); + virtual ~SwInsertSectionTabDialog() override; + + void SetSectionData(SwSectionData const& rSect); + SwSectionData* GetSectionData() { return m_pSectionData.get(); } +}; + +class SwSectionPropertyTabDialog final : public SfxTabDialogController +{ + SwWrtShell& m_rWrtSh; + + virtual void PageCreated(const OUString& rId, SfxTabPage& rPage) override; + +public: + SwSectionPropertyTabDialog(weld::Window* pParent, const SfxItemSet& rSet, SwWrtShell& rSh); + virtual ~SwSectionPropertyTabDialog() override; +}; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/inc/swuiexp.hxx b/sw/source/ui/inc/swuiexp.hxx index 3ea2f5f30464..a5fa95e7a094 100644 --- a/sw/source/ui/inc/swuiexp.hxx +++ b/sw/source/ui/inc/swuiexp.hxx @@ -16,8 +16,8 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_SW_SOURCE_UI_INC_SWUIEXP_HXX -#define INCLUDED_SW_SOURCE_UI_INC_SWUIEXP_HXX + +#pragma once #include <swabstdlg.hxx> @@ -26,6 +26,4 @@ namespace swui SwAbstractDialogFactory& GetFactory(); } -#endif - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |