1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #undef SC_DLLIMPLEMENTATION
22 #include <inscodlg.hxx>
23 #include <officecfg/Office/Common.hxx>
25 InsertDeleteFlags
ScInsertContentsDlg::nPreviousChecks
= InsertDeleteFlags::NONE
;
26 ScPasteFunc
ScInsertContentsDlg::nPreviousFormulaChecks
= ScPasteFunc::NONE
;
27 InsertContentsFlags
ScInsertContentsDlg::nPreviousChecks2
= InsertContentsFlags::NONE
;
28 InsCellCmd
ScInsertContentsDlg::nPreviousMoveMode
= InsCellCmd::INS_NONE
;
30 //whether the dialog has loaded for the first time
31 static bool firstLoad
= true;
33 void ScInsertContentsDlg::storeFlagsInRegistry()
35 //store the flags in the registry
36 std::shared_ptr
<comphelper::ConfigurationChanges
> batch(comphelper::ConfigurationChanges::create());
39 officecfg::Office::Common::PasteSpecial::Paste::All::set(ScInsertContentsDlg::mxBtnInsAll
->get_active(), batch
);
40 officecfg::Office::Common::PasteSpecial::Paste::Numbers::set(ScInsertContentsDlg::mxBtnInsNumbers
->get_active(), batch
);
41 officecfg::Office::Common::PasteSpecial::Paste::Text::set(ScInsertContentsDlg::mxBtnInsStrings
->get_active(), batch
);
42 officecfg::Office::Common::PasteSpecial::Paste::DateTime::set(ScInsertContentsDlg::mxBtnInsDateTime
->get_active(), batch
);
43 officecfg::Office::Common::PasteSpecial::Paste::Formats::set(ScInsertContentsDlg::mxBtnInsAttrs
->get_active(), batch
);
44 officecfg::Office::Common::PasteSpecial::Paste::Comments::set(ScInsertContentsDlg::mxBtnInsNotes
->get_active(), batch
);
45 officecfg::Office::Common::PasteSpecial::Paste::Objects::set(ScInsertContentsDlg::mxBtnInsObjects
->get_active(), batch
);
46 officecfg::Office::Common::PasteSpecial::Paste::Formulas::set(ScInsertContentsDlg::mxBtnInsFormulas
->get_active(), batch
);
49 if(ScInsertContentsDlg::mxRbNoOp
->get_active())
50 officecfg::Office::Common::PasteSpecial::Operations::set(0, batch
);
51 else if(ScInsertContentsDlg::mxRbAdd
->get_active())
52 officecfg::Office::Common::PasteSpecial::Operations::set(1, batch
);
53 else if(ScInsertContentsDlg::mxRbSub
->get_active())
54 officecfg::Office::Common::PasteSpecial::Operations::set(2, batch
);
55 else if(ScInsertContentsDlg::mxRbMul
->get_active())
56 officecfg::Office::Common::PasteSpecial::Operations::set(3, batch
);
57 else if(ScInsertContentsDlg::mxRbDiv
->get_active())
58 officecfg::Office::Common::PasteSpecial::Operations::set(4, batch
);
61 officecfg::Office::Common::PasteSpecial::Options::AsLink::set(ScInsertContentsDlg::mxBtnLink
->get_active(), batch
);
62 officecfg::Office::Common::PasteSpecial::Options::Transpose::set(ScInsertContentsDlg::mxBtnTranspose
->get_active(), batch
);
63 officecfg::Office::Common::PasteSpecial::Options::SkipEmptyCells::set(ScInsertContentsDlg::mxBtnSkipEmptyCells
->get_active(), batch
);
66 if(ScInsertContentsDlg::mxRbMoveNone
->get_active())
67 officecfg::Office::Common::PasteSpecial::ShiftCells::set(4, batch
);
68 else if(ScInsertContentsDlg::mxRbMoveDown
->get_active())
69 officecfg::Office::Common::PasteSpecial::ShiftCells::set(0, batch
);
70 else if(ScInsertContentsDlg::mxRbMoveRight
->get_active())
71 officecfg::Office::Common::PasteSpecial::ShiftCells::set(1, batch
);
76 ScInsertContentsDlg::ScInsertContentsDlg(weld::Window
* pParent
,
77 const OUString
* pStrTitle
)
78 : GenericDialogController(pParent
, u
"modules/scalc/ui/pastespecial.ui"_ustr
, u
"PasteSpecial"_ustr
)
82 , bMoveDownDisabled(false)
83 , bMoveRightDisabled(false)
84 , mxBtnInsAll(m_xBuilder
->weld_check_button(u
"paste_all"_ustr
))
85 , mxBtnInsStrings(m_xBuilder
->weld_check_button(u
"text"_ustr
))
86 , mxBtnInsNumbers(m_xBuilder
->weld_check_button(u
"numbers"_ustr
))
87 , mxBtnInsDateTime(m_xBuilder
->weld_check_button(u
"datetime"_ustr
))
88 , mxBtnInsFormulas(m_xBuilder
->weld_check_button(u
"formulas"_ustr
))
89 , mxBtnInsNotes(m_xBuilder
->weld_check_button(u
"comments"_ustr
))
90 , mxBtnInsAttrs(m_xBuilder
->weld_check_button(u
"formats"_ustr
))
91 , mxBtnInsObjects(m_xBuilder
->weld_check_button(u
"objects"_ustr
))
92 , mxBtnSkipEmptyCells(m_xBuilder
->weld_check_button(u
"skip_empty"_ustr
))
93 , mxBtnTranspose(m_xBuilder
->weld_check_button(u
"transpose"_ustr
))
94 , mxBtnLink(m_xBuilder
->weld_check_button(u
"link"_ustr
))
95 , mxRbNoOp(m_xBuilder
->weld_radio_button(u
"none"_ustr
))
96 , mxRbAdd(m_xBuilder
->weld_radio_button(u
"add"_ustr
))
97 , mxRbSub(m_xBuilder
->weld_radio_button(u
"subtract"_ustr
))
98 , mxRbMul(m_xBuilder
->weld_radio_button(u
"multiply"_ustr
))
99 , mxRbDiv(m_xBuilder
->weld_radio_button(u
"divide"_ustr
))
100 , mxRbMoveNone(m_xBuilder
->weld_radio_button(u
"no_shift"_ustr
))
101 , mxRbMoveDown(m_xBuilder
->weld_radio_button(u
"move_down"_ustr
))
102 , mxRbMoveRight(m_xBuilder
->weld_radio_button(u
"move_right"_ustr
))
103 , mxBtnShortCutPasteValuesOnly(m_xBuilder
->weld_button(u
"paste_values_only"_ustr
))
104 , mxBtnShortCutPasteValuesFormats(m_xBuilder
->weld_button(u
"paste_values_formats"_ustr
))
105 , mxBtnShortCutPasteTranspose(m_xBuilder
->weld_button(u
"paste_transpose"_ustr
))
106 , mxBtnShortCutPasteFormats(m_xBuilder
->weld_button(u
"paste_formats"_ustr
))
107 , mxOKBtn(m_xBuilder
->weld_button(u
"ok"_ustr
))
108 , mxImmediately(m_xBuilder
->weld_check_button(u
"cbImmediately"_ustr
))
111 m_xDialog
->set_title(*pStrTitle
);
118 //set the flags from the registry
121 * Flags for nPreviousChecks
123 if(officecfg::Office::Common::PasteSpecial::Paste::All::get())
124 nPreviousChecks
|= InsertDeleteFlags::ALL
;
125 if(officecfg::Office::Common::PasteSpecial::Paste::Numbers::get())
126 nPreviousChecks
|= InsertDeleteFlags::VALUE
;
127 if(officecfg::Office::Common::PasteSpecial::Paste::Text::get())
128 nPreviousChecks
|= InsertDeleteFlags::STRING
;
129 if(officecfg::Office::Common::PasteSpecial::Paste::DateTime::get())
130 nPreviousChecks
|= InsertDeleteFlags::DATETIME
;
131 if(officecfg::Office::Common::PasteSpecial::Paste::Formats::get())
132 nPreviousChecks
|= InsertDeleteFlags::ATTRIB
;
133 if(officecfg::Office::Common::PasteSpecial::Paste::Comments::get())
134 nPreviousChecks
|= InsertDeleteFlags::NOTE
;
135 if(officecfg::Office::Common::PasteSpecial::Paste::Objects::get())
136 nPreviousChecks
|= InsertDeleteFlags::OBJECTS
;
137 if(officecfg::Office::Common::PasteSpecial::Paste::Formulas::get())
138 nPreviousChecks
|= InsertDeleteFlags::FORMULA
;
141 * Flags for nPreviousFormulaChecks
143 int optionFlagValue
= officecfg::Office::Common::PasteSpecial::Operations::get();
144 switch(optionFlagValue
)
146 case 0: nPreviousFormulaChecks
= ScPasteFunc::NONE
;
149 case 1: nPreviousFormulaChecks
= ScPasteFunc::ADD
;
152 case 2: nPreviousFormulaChecks
= ScPasteFunc::SUB
;
155 case 3: nPreviousFormulaChecks
= ScPasteFunc::MUL
;
158 case 4: nPreviousFormulaChecks
= ScPasteFunc::DIV
;
163 * Flags for nPreviousChecks2
165 if(officecfg::Office::Common::PasteSpecial::Options::AsLink::get())
166 nPreviousChecks2
|= InsertContentsFlags::Link
;
167 if(officecfg::Office::Common::PasteSpecial::Options::Transpose::get())
168 nPreviousChecks2
|= InsertContentsFlags::Trans
;
169 if(officecfg::Office::Common::PasteSpecial::Options::SkipEmptyCells::get())
170 nPreviousChecks2
|= InsertContentsFlags::NoEmpty
;
173 * Flags for nPreviousMoveMode
175 int shiftFlagValue
= officecfg::Office::Common::PasteSpecial::ShiftCells::get();
176 switch(shiftFlagValue
)
178 case 0: nPreviousMoveMode
= InsCellCmd::INS_CELLSDOWN
;
181 case 1: nPreviousMoveMode
= InsCellCmd::INS_CELLSRIGHT
;
184 case 4: nPreviousMoveMode
= InsCellCmd::INS_NONE
;
189 SetInsContentsCmdBits( ScInsertContentsDlg::nPreviousChecks
);
190 SetFormulaCmdBits( ScInsertContentsDlg::nPreviousFormulaChecks
);
191 SetCellCmdFlags( ScInsertContentsDlg::nPreviousMoveMode
);
192 SetContentsFlags( ScInsertContentsDlg::nPreviousChecks2
);
193 DisableChecks( mxBtnInsAll
->get_active() );
195 mxBtnInsAll
->connect_toggled( LINK( this, ScInsertContentsDlg
, InsAllHdl
) );
196 mxBtnLink
->connect_toggled( LINK( this, ScInsertContentsDlg
, LinkBtnHdl
) );
197 mxBtnShortCutPasteValuesOnly
->connect_clicked( LINK( this, ScInsertContentsDlg
, ShortCutHdl
) );
198 mxBtnShortCutPasteValuesFormats
->connect_clicked( LINK( this, ScInsertContentsDlg
, ShortCutHdl
) );
199 mxBtnShortCutPasteTranspose
->connect_clicked( LINK( this, ScInsertContentsDlg
, ShortCutHdl
) );
200 mxBtnShortCutPasteFormats
->connect_clicked( LINK( this, ScInsertContentsDlg
, ShortCutHdl
) );
201 mxOKBtn
->connect_clicked( LINK( this, ScInsertContentsDlg
, ClickHdl
) );
204 InsertDeleteFlags
ScInsertContentsDlg::GetInsContentsCmdBits() const
206 ScInsertContentsDlg::nPreviousChecks
= InsertDeleteFlags::NONE
;
208 if ( mxBtnInsStrings
->get_active() )
209 ScInsertContentsDlg::nPreviousChecks
= InsertDeleteFlags::STRING
;
210 if ( mxBtnInsNumbers
->get_active() )
211 ScInsertContentsDlg::nPreviousChecks
|= InsertDeleteFlags::VALUE
;
212 if ( mxBtnInsDateTime
->get_active())
213 ScInsertContentsDlg::nPreviousChecks
|= InsertDeleteFlags::DATETIME
;
214 if ( mxBtnInsFormulas
->get_active())
215 ScInsertContentsDlg::nPreviousChecks
|= InsertDeleteFlags::FORMULA
;
216 // tdf#139858 - do not delete existing cell contents when pasting notes
217 if ( mxBtnInsNotes
->get_active() )
218 ScInsertContentsDlg::nPreviousChecks
219 |= InsertDeleteFlags::NOTE
| InsertDeleteFlags::ADDNOTES
;
220 if ( mxBtnInsAttrs
->get_active() )
221 ScInsertContentsDlg::nPreviousChecks
|= InsertDeleteFlags::ATTRIB
;
222 if ( mxBtnInsObjects
->get_active() )
223 ScInsertContentsDlg::nPreviousChecks
|= InsertDeleteFlags::OBJECTS
;
225 return ( mxBtnInsAll
->get_active()
226 ? InsertDeleteFlags::ALL
227 : ScInsertContentsDlg::nPreviousChecks
);
230 void ScInsertContentsDlg::SetInsContentsCmdBits(const InsertDeleteFlags eFlags
)
232 mxBtnInsNumbers
->set_active((InsertDeleteFlags::VALUE
& eFlags
) == InsertDeleteFlags::VALUE
);
233 mxBtnInsDateTime
->set_active((InsertDeleteFlags::DATETIME
& eFlags
) == InsertDeleteFlags::DATETIME
);
234 mxBtnInsStrings
->set_active((InsertDeleteFlags::STRING
& eFlags
) == InsertDeleteFlags::STRING
);
235 mxBtnInsNotes
->set_active((InsertDeleteFlags::NOTE
& eFlags
) == InsertDeleteFlags::NOTE
);
236 mxBtnInsFormulas
->set_active((InsertDeleteFlags::FORMULA
& eFlags
) == InsertDeleteFlags::FORMULA
);
237 mxBtnInsAttrs
->set_active((InsertDeleteFlags::ATTRIB
& eFlags
) == InsertDeleteFlags::ATTRIB
);
238 mxBtnInsObjects
->set_active((InsertDeleteFlags::OBJECTS
& eFlags
) == InsertDeleteFlags::OBJECTS
);
239 mxBtnInsAll
->set_active((InsertDeleteFlags::ALL
& eFlags
) == InsertDeleteFlags::ALL
);
240 DisableChecks( mxBtnInsAll
->get_active() );
243 void ScInsertContentsDlg::SetFormulaCmdBits(const ScPasteFunc eFlags
)
247 case ScPasteFunc::NONE
: mxRbNoOp
->set_active(true); break;
248 case ScPasteFunc::ADD
: mxRbAdd
->set_active(true); break;
249 case ScPasteFunc::SUB
: mxRbSub
->set_active(true); break;
250 case ScPasteFunc::MUL
: mxRbMul
->set_active(true); break;
251 case ScPasteFunc::DIV
: mxRbDiv
->set_active(true); break;
255 void ScInsertContentsDlg::SetCellCmdFlags(const InsCellCmd eFlags
)
259 case INS_NONE
: mxRbMoveNone
->set_active(true); break;
260 case INS_CELLSDOWN
: mxRbMoveDown
->set_active(true); break;
261 case INS_CELLSRIGHT
: mxRbMoveRight
->set_active(true); break;
262 case INS_INSROWS_BEFORE
:
263 case INS_INSCOLS_BEFORE
:
264 case INS_INSROWS_AFTER
:
265 case INS_INSCOLS_AFTER
: break;
269 void ScInsertContentsDlg::SetContentsFlags(const InsertContentsFlags eFlags
)
271 mxBtnSkipEmptyCells
->set_active(bool(InsertContentsFlags::NoEmpty
& eFlags
));
272 mxBtnTranspose
->set_active(bool(InsertContentsFlags::Trans
& eFlags
));
273 mxBtnLink
->set_active(bool(InsertContentsFlags::Link
& eFlags
));
276 InsCellCmd
ScInsertContentsDlg::GetMoveMode() const
278 if ( mxRbMoveDown
->get_active() )
279 return INS_CELLSDOWN
;
280 if ( mxRbMoveRight
->get_active() )
281 return INS_CELLSRIGHT
;
286 bool ScInsertContentsDlg::IsSkipEmptyCells() const
288 return mxBtnSkipEmptyCells
->get_active();
291 bool ScInsertContentsDlg::IsTranspose() const
293 return mxBtnTranspose
->get_active();
296 bool ScInsertContentsDlg::IsLink() const
298 return mxBtnLink
->get_active();
301 void ScInsertContentsDlg::DisableChecks( bool bInsAllChecked
)
303 if ( bInsAllChecked
)
305 mxBtnInsStrings
->set_sensitive(false);
306 mxBtnInsNumbers
->set_sensitive(false);
307 mxBtnInsDateTime
->set_sensitive(false);
308 mxBtnInsFormulas
->set_sensitive(false);
309 mxBtnInsNotes
->set_sensitive(false);
310 mxBtnInsAttrs
->set_sensitive(false);
311 mxBtnInsObjects
->set_sensitive(false);
315 mxBtnInsStrings
->set_sensitive(true);
316 mxBtnInsNumbers
->set_sensitive(true);
317 mxBtnInsDateTime
->set_sensitive(true);
318 mxBtnInsFormulas
->set_sensitive(true);
319 mxBtnInsNotes
->set_sensitive(true);
320 mxBtnInsAttrs
->set_sensitive(true);
322 // "Objects" is disabled for "Fill Tables"
324 mxBtnInsObjects
->set_sensitive(false);
326 mxBtnInsObjects
->set_sensitive(true);
330 // Link to other document -> everything else is disabled
332 void ScInsertContentsDlg::TestModes()
334 if ( bOtherDoc
&& mxBtnLink
->get_active() )
336 mxBtnSkipEmptyCells
->set_sensitive(false);
337 mxBtnTranspose
->set_sensitive(false);
338 mxRbNoOp
->set_sensitive(false);
339 mxRbAdd
->set_sensitive(false);
340 mxRbSub
->set_sensitive(false);
341 mxRbMul
->set_sensitive(false);
342 mxRbDiv
->set_sensitive(false);
344 mxRbMoveNone
->set_sensitive(false);
345 mxRbMoveDown
->set_sensitive(false);
346 mxRbMoveRight
->set_sensitive(false);
348 mxBtnInsAll
->set_sensitive(false);
353 mxBtnSkipEmptyCells
->set_sensitive(true);
354 mxBtnTranspose
->set_sensitive(!bFillMode
);
355 mxRbNoOp
->set_sensitive(true);
356 mxRbAdd
->set_sensitive(true);
357 mxRbSub
->set_sensitive(true);
358 mxRbMul
->set_sensitive(true);
359 mxRbDiv
->set_sensitive(true);
361 mxRbMoveNone
->set_sensitive(!bFillMode
&& !bChangeTrack
&& !(bMoveDownDisabled
&& bMoveRightDisabled
));
362 mxRbMoveDown
->set_sensitive(!bFillMode
&& !bChangeTrack
&& !bMoveDownDisabled
);
363 mxRbMoveRight
->set_sensitive(!bFillMode
&& !bChangeTrack
&& !bMoveRightDisabled
);
365 mxBtnInsAll
->set_sensitive(true);
366 DisableChecks( mxBtnInsAll
->get_active() );
370 void ScInsertContentsDlg::SetOtherDoc( bool bSet
)
372 if ( bSet
!= bOtherDoc
)
377 mxRbMoveNone
->set_active(true);
381 void ScInsertContentsDlg::SetFillMode( bool bSet
)
383 if ( bSet
!= bFillMode
)
388 mxRbMoveNone
->set_active(true);
392 void ScInsertContentsDlg::SetChangeTrack( bool bSet
)
394 if ( bSet
!= bChangeTrack
)
399 mxRbMoveNone
->set_active(true);
403 void ScInsertContentsDlg::SetCellShiftDisabled( CellShiftDisabledFlags nDisable
)
405 bool bDown(nDisable
& CellShiftDisabledFlags::Down
);
406 bool bRight(nDisable
& CellShiftDisabledFlags::Right
);
407 if ( bDown
!= bMoveDownDisabled
|| bRight
!= bMoveRightDisabled
)
409 bMoveDownDisabled
= bDown
;
410 bMoveRightDisabled
= bRight
;
412 if ( bMoveDownDisabled
&& mxRbMoveDown
->get_active() )
413 mxRbMoveNone
->set_active(true);
414 if ( bMoveRightDisabled
&& mxRbMoveRight
->get_active() )
415 mxRbMoveNone
->set_active(true);
419 IMPL_LINK(ScInsertContentsDlg
, ShortCutHdl
, weld::Button
&, rBtn
, void)
421 if (&rBtn
== mxBtnShortCutPasteValuesOnly
.get())
423 SetInsContentsCmdBits( InsertDeleteFlags::STRING
| InsertDeleteFlags::VALUE
| InsertDeleteFlags::DATETIME
);
424 SetContentsFlags( InsertContentsFlags::NONE
);
426 else if (&rBtn
== mxBtnShortCutPasteValuesFormats
.get())
428 SetInsContentsCmdBits( InsertDeleteFlags::STRING
| InsertDeleteFlags::VALUE
| InsertDeleteFlags::DATETIME
| InsertDeleteFlags::ATTRIB
);
429 SetContentsFlags( InsertContentsFlags::NONE
);
431 else if (&rBtn
== mxBtnShortCutPasteTranspose
.get())
433 SetInsContentsCmdBits( InsertDeleteFlags::ALL
);
434 SetContentsFlags( InsertContentsFlags::Trans
);
436 else if (&rBtn
== mxBtnShortCutPasteFormats
.get())
438 SetInsContentsCmdBits( InsertDeleteFlags::ATTRIB
);
439 SetContentsFlags( InsertContentsFlags::NONE
);
444 SetCellCmdFlags( InsCellCmd::INS_NONE
);
445 SetFormulaCmdBits(ScPasteFunc::NONE
);
447 if (mxImmediately
->get_active())
449 storeFlagsInRegistry();
450 m_xDialog
->response(RET_OK
);
454 IMPL_LINK_NOARG(ScInsertContentsDlg
, ClickHdl
, weld::Button
&, void)
456 storeFlagsInRegistry();
457 m_xDialog
->response(RET_OK
);
460 IMPL_LINK_NOARG(ScInsertContentsDlg
, InsAllHdl
, weld::Toggleable
&, void)
462 DisableChecks( mxBtnInsAll
->get_active() );
465 IMPL_LINK_NOARG(ScInsertContentsDlg
, LinkBtnHdl
, weld::Toggleable
&, void)
470 ScInsertContentsDlg::~ScInsertContentsDlg()
472 ScInsertContentsDlg::nPreviousChecks2
= InsertContentsFlags::NONE
;
473 if(mxBtnSkipEmptyCells
->get_active())
474 ScInsertContentsDlg::nPreviousChecks2
|= InsertContentsFlags::NoEmpty
;
475 if( mxBtnTranspose
->get_active())
476 ScInsertContentsDlg::nPreviousChecks2
|= InsertContentsFlags::Trans
;
477 if( mxBtnLink
->get_active() )
478 ScInsertContentsDlg::nPreviousChecks2
|= InsertContentsFlags::Link
;
480 if (!bFillMode
) // in FillMode, None is checked and all three options are disabled
482 if ( mxRbMoveNone
->get_active() )
483 ScInsertContentsDlg::nPreviousMoveMode
= INS_NONE
;
484 else if ( mxRbMoveDown
->get_active() )
485 ScInsertContentsDlg::nPreviousMoveMode
= INS_CELLSDOWN
;
486 else if ( mxRbMoveRight
->get_active() )
487 ScInsertContentsDlg::nPreviousMoveMode
= INS_CELLSRIGHT
;
491 ScPasteFunc
ScInsertContentsDlg::GetFormulaCmdBits() const
493 ScInsertContentsDlg::nPreviousFormulaChecks
= ScPasteFunc::NONE
;
494 if(mxRbAdd
->get_active())
495 ScInsertContentsDlg::nPreviousFormulaChecks
= ScPasteFunc::ADD
;
496 else if(mxRbSub
->get_active())
497 ScInsertContentsDlg::nPreviousFormulaChecks
= ScPasteFunc::SUB
;
498 else if(mxRbMul
->get_active())
499 ScInsertContentsDlg::nPreviousFormulaChecks
= ScPasteFunc::MUL
;
500 else if(mxRbDiv
->get_active())
501 ScInsertContentsDlg::nPreviousFormulaChecks
= ScPasteFunc::DIV
;
502 return ScInsertContentsDlg::nPreviousFormulaChecks
;
505 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */