20#undef SC_DLLIMPLEMENTATION
23#include <officecfg/Office/Common.hxx>
50 officecfg::Office::Common::PasteSpecial::Operations::set(0, batch);
52 officecfg::Office::Common::PasteSpecial::Operations::set(1, batch);
54 officecfg::Office::Common::PasteSpecial::Operations::set(2, batch);
56 officecfg::Office::Common::PasteSpecial::Operations::set(3, batch);
58 officecfg::Office::Common::PasteSpecial::Operations::set(4, batch);
67 officecfg::Office::Common::PasteSpecial::ShiftCells::set(4, batch);
69 officecfg::Office::Common::PasteSpecial::ShiftCells::set(0, batch);
71 officecfg::Office::Common::PasteSpecial::ShiftCells::set(1, batch);
77 const OUString* pStrTitle )
78 : GenericDialogController(pParent,
"modules/scalc/ui/pastespecial.ui",
"PasteSpecial")
82 , bMoveDownDisabled(false)
83 , bMoveRightDisabled(false)
84 , mxBtnInsAll(m_xBuilder->weld_check_button(
"paste_all"))
85 , mxBtnInsStrings(m_xBuilder->weld_check_button(
"text"))
86 , mxBtnInsNumbers(m_xBuilder->weld_check_button(
"numbers"))
87 , mxBtnInsDateTime(m_xBuilder->weld_check_button(
"datetime"))
88 , mxBtnInsFormulas(m_xBuilder->weld_check_button(
"formulas"))
89 , mxBtnInsNotes(m_xBuilder->weld_check_button(
"comments"))
90 , mxBtnInsAttrs(m_xBuilder->weld_check_button(
"formats"))
91 , mxBtnInsObjects(m_xBuilder->weld_check_button(
"objects"))
92 , mxBtnSkipEmptyCells(m_xBuilder->weld_check_button(
"skip_empty"))
93 , mxBtnTranspose(m_xBuilder->weld_check_button(
"transpose"))
94 , mxBtnLink(m_xBuilder->weld_check_button(
"link"))
95 , mxRbNoOp(m_xBuilder->weld_radio_button(
"none"))
96 , mxRbAdd(m_xBuilder->weld_radio_button(
"add"))
97 , mxRbSub(m_xBuilder->weld_radio_button(
"subtract"))
98 , mxRbMul(m_xBuilder->weld_radio_button(
"multiply"))
99 , mxRbDiv(m_xBuilder->weld_radio_button(
"divide"))
100 , mxRbMoveNone(m_xBuilder->weld_radio_button(
"no_shift"))
101 , mxRbMoveDown(m_xBuilder->weld_radio_button(
"move_down"))
102 , mxRbMoveRight(m_xBuilder->weld_radio_button(
"move_right"))
103 , mxBtnShortCutPasteValuesOnly(m_xBuilder->weld_button(
"paste_values_only"))
104 , mxBtnShortCutPasteValuesFormats(m_xBuilder->weld_button(
"paste_values_formats"))
105 , mxBtnShortCutPasteTranspose(m_xBuilder->weld_button(
"paste_transpose"))
106 , mxBtnShortCutPasteFormats(m_xBuilder->weld_button(
"paste_formats"))
107 , mxOKBtn(m_xBuilder->weld_button(
"ok"))
108 , mxImmediately(m_xBuilder->weld_check_button(
"cbImmediately"))
123 if(officecfg::Office::Common::PasteSpecial::Paste::All::get())
125 if(officecfg::Office::Common::PasteSpecial::Paste::Numbers::get())
127 if(officecfg::Office::Common::PasteSpecial::Paste::Text::get())
129 if(officecfg::Office::Common::PasteSpecial::Paste::DateTime::get())
131 if(officecfg::Office::Common::PasteSpecial::Paste::Formats::get())
133 if(officecfg::Office::Common::PasteSpecial::Paste::Comments::get())
135 if(officecfg::Office::Common::PasteSpecial::Paste::Objects::get())
137 if(officecfg::Office::Common::PasteSpecial::Paste::Formulas::get())
143 int optionFlagValue = officecfg::Office::Common::PasteSpecial::Operations::get();
144 switch(optionFlagValue)
165 if(officecfg::Office::Common::PasteSpecial::Options::AsLink::get())
167 if(officecfg::Office::Common::PasteSpecial::Options::Transpose::get())
169 if(officecfg::Office::Common::PasteSpecial::Options::SkipEmptyCells::get())
175 int shiftFlagValue = officecfg::Office::Common::PasteSpecial::ShiftCells::get();
176 switch(shiftFlagValue)
302 if ( bInsAllChecked )
420 if (&rBtn == mxBtnShortCutPasteValuesOnly.get())
425 else if (&rBtn == mxBtnShortCutPasteValuesFormats.get())
430 else if (&rBtn == mxBtnShortCutPasteTranspose.get())
435 else if (&rBtn == mxBtnShortCutPasteFormats.get())
446 if (mxImmediately->get_active())
448 storeFlagsInRegistry();
455 storeFlagsInRegistry();
461 DisableChecks( mxBtnInsAll->get_active() );
Reference< XExecutableDialog > m_xDialog
std::unique_ptr< weld::CheckButton > mxBtnInsNotes
void SetCellShiftDisabled(CellShiftDisabledFlags nDisable)
static InsertDeleteFlags nPreviousChecks
std::unique_ptr< weld::RadioButton > mxRbDiv
void DisableChecks(bool bInsAllChecked)
ScInsertContentsDlg(weld::Window *pParent, const OUString *pStrTitle)
void SetInsContentsCmdBits(const InsertDeleteFlags eFlags)
static ScPasteFunc nPreviousFormulaChecks
std::unique_ptr< weld::CheckButton > mxBtnInsAll
std::unique_ptr< weld::CheckButton > mxBtnLink
std::unique_ptr< weld::Button > mxBtnShortCutPasteTranspose
std::unique_ptr< weld::RadioButton > mxRbMul
std::unique_ptr< weld::CheckButton > mxBtnInsDateTime
InsCellCmd GetMoveMode() const
std::unique_ptr< weld::CheckButton > mxBtnInsNumbers
void SetFormulaCmdBits(const ScPasteFunc eFlags)
virtual ~ScInsertContentsDlg() override
std::unique_ptr< weld::Button > mxBtnShortCutPasteFormats
InsertDeleteFlags GetInsContentsCmdBits() const
std::unique_ptr< weld::Button > mxBtnShortCutPasteValuesFormats
std::unique_ptr< weld::RadioButton > mxRbMoveRight
std::unique_ptr< weld::Button > mxBtnShortCutPasteValuesOnly
static InsCellCmd nPreviousMoveMode
void SetCellCmdFlags(const InsCellCmd eFlags)
bool IsSkipEmptyCells() const
void SetChangeTrack(bool bSet)
std::unique_ptr< weld::Button > mxOKBtn
std::unique_ptr< weld::RadioButton > mxRbAdd
std::unique_ptr< weld::RadioButton > mxRbMoveDown
std::unique_ptr< weld::RadioButton > mxRbMoveNone
std::unique_ptr< weld::RadioButton > mxRbNoOp
static InsertContentsFlags nPreviousChecks2
ScPasteFunc GetFormulaCmdBits() const
void SetContentsFlags(const InsertContentsFlags eFlags)
std::unique_ptr< weld::RadioButton > mxRbSub
void SetFillMode(bool bSet)
void SetOtherDoc(bool bSet)
std::unique_ptr< weld::CheckButton > mxBtnTranspose
std::unique_ptr< weld::CheckButton > mxBtnInsFormulas
std::unique_ptr< weld::CheckButton > mxBtnSkipEmptyCells
void storeFlagsInRegistry()
std::unique_ptr< weld::CheckButton > mxBtnInsStrings
std::unique_ptr< weld::CheckButton > mxBtnInsObjects
std::unique_ptr< weld::CheckButton > mxBtnInsAttrs
static std::shared_ptr< ConfigurationChanges > create()
std::shared_ptr< weld::Dialog > m_xDialog
@ NOTE
Strings (and string results if InsertDeleteFlags::FORMULA is not set).
@ STRING
Dates, times, datetime values.
@ ADDNOTES
Internal use only (undo etc.): do not copy/delete caption objects of cell notes.
@ DATETIME
Numeric values (and numeric results if InsertDeleteFlags::FORMULA is not set).
@ ATTRIB
Internal use only (d&d undo): do not delete caption objects of cell notes.
IMPL_LINK_NOARG(ScInsertContentsDlg, ClickHdl, weld::Button &, void)
IMPL_LINK(ScInsertContentsDlg, ShortCutHdl, weld::Button &, rBtn, void)
#define LINK(Instance, Class, Member)