1b3f79822SAndrew Rist /**************************************************************
2cdf0e10cSrcweir *
3b3f79822SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
4b3f79822SAndrew Rist * or more contributor license agreements. See the NOTICE file
5b3f79822SAndrew Rist * distributed with this work for additional information
6b3f79822SAndrew Rist * regarding copyright ownership. The ASF licenses this file
7b3f79822SAndrew Rist * to you under the Apache License, Version 2.0 (the
8b3f79822SAndrew Rist * "License"); you may not use this file except in compliance
9b3f79822SAndrew Rist * with the License. You may obtain a copy of the License at
10b3f79822SAndrew Rist *
11b3f79822SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0
12b3f79822SAndrew Rist *
13b3f79822SAndrew Rist * Unless required by applicable law or agreed to in writing,
14b3f79822SAndrew Rist * software distributed under the License is distributed on an
15b3f79822SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16b3f79822SAndrew Rist * KIND, either express or implied. See the License for the
17b3f79822SAndrew Rist * specific language governing permissions and limitations
18b3f79822SAndrew Rist * under the License.
19b3f79822SAndrew Rist *
20b3f79822SAndrew Rist *************************************************************/
21b3f79822SAndrew Rist
22b3f79822SAndrew Rist
23cdf0e10cSrcweir
24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
25cdf0e10cSrcweir #include "precompiled_sc.hxx"
26cdf0e10cSrcweir
27cdf0e10cSrcweir #undef SC_DLLIMPLEMENTATION
28cdf0e10cSrcweir
29cdf0e10cSrcweir
30cdf0e10cSrcweir
31cdf0e10cSrcweir //------------------------------------------------------------------
32cdf0e10cSrcweir
33cdf0e10cSrcweir #include "inscodlg.hxx"
34cdf0e10cSrcweir #include "scresid.hxx"
35cdf0e10cSrcweir #include "miscdlgs.hrc"
36cdf0e10cSrcweir
37cdf0e10cSrcweir
38cdf0e10cSrcweir //==================================================================
39cdf0e10cSrcweir
40*07c8403eSTsutomu Uchino sal_Bool ScInsertContentsDlg::bPreviousAllCheck = sal_False;
41*07c8403eSTsutomu Uchino sal_uInt16 ScInsertContentsDlg::nPreviousChecks = (IDF_VALUE | IDF_DATETIME | IDF_STRING);
42cdf0e10cSrcweir sal_uInt16 ScInsertContentsDlg::nPreviousFormulaChecks = PASTE_NOFUNC;
43cdf0e10cSrcweir sal_uInt16 ScInsertContentsDlg::nPreviousChecks2 = 0;
44cdf0e10cSrcweir sal_uInt16 ScInsertContentsDlg::nPreviousMoveMode = INS_NONE; // enum InsCellCmd
45cdf0e10cSrcweir
46cdf0e10cSrcweir //-----------------------------------------------------------------------
47cdf0e10cSrcweir
ScInsertContentsDlg(Window * pParent,sal_uInt16 nCheckDefaults,const String * pStrTitle)48cdf0e10cSrcweir ScInsertContentsDlg::ScInsertContentsDlg( Window* pParent,
49cdf0e10cSrcweir sal_uInt16 nCheckDefaults,
50cdf0e10cSrcweir const String* pStrTitle )
51cdf0e10cSrcweir
52cdf0e10cSrcweir : ModalDialog ( pParent, ScResId( RID_SCDLG_INSCONT ) ),
53cdf0e10cSrcweir //
54cdf0e10cSrcweir aFlFrame ( this, ScResId( FL_FRAME ) ),
55cdf0e10cSrcweir aBtnInsAll ( this, ScResId( BTN_INSALL ) ),
56cdf0e10cSrcweir aBtnInsStrings ( this, ScResId( BTN_INSSTRINGS ) ),
57cdf0e10cSrcweir aBtnInsNumbers ( this, ScResId( BTN_INSNUMBERS ) ),
58cdf0e10cSrcweir aBtnInsDateTime ( this, ScResId( BTN_INSDATETIME ) ),
59cdf0e10cSrcweir aBtnInsFormulas ( this, ScResId( BTN_INSFORMULAS ) ),
60cdf0e10cSrcweir aBtnInsNotes ( this, ScResId( BTN_INSNOTES ) ),
61cdf0e10cSrcweir aBtnInsAttrs ( this, ScResId( BTN_INSATTRS ) ),
62cdf0e10cSrcweir aBtnInsObjects ( this, ScResId( BTN_INSOBJECTS ) ),
63cdf0e10cSrcweir aFlSep1 ( this, ScResId( FL_SEP1 ) ),
64cdf0e10cSrcweir aFlOptions ( this, ScResId( FL_OPTIONS ) ),
65cdf0e10cSrcweir aBtnSkipEmptyCells( this, ScResId(BTN_SKIP_EMPTY ) ),
66cdf0e10cSrcweir aBtnTranspose ( this, ScResId( BTN_TRANSPOSE ) ),
67cdf0e10cSrcweir aBtnLink ( this, ScResId( BTN_LINK ) ),
68cdf0e10cSrcweir aFlOperation ( this, ScResId( FL_OPERATION ) ),
69cdf0e10cSrcweir aRbNoOp ( this, ScResId( BTN_OP_NOOP ) ),
70cdf0e10cSrcweir aRbAdd ( this, ScResId( BTN_OP_ADD ) ),
71cdf0e10cSrcweir aRbSub ( this, ScResId( BTN_OP_SUB ) ),
72cdf0e10cSrcweir aRbMul ( this, ScResId( BTN_OP_MUL ) ),
73cdf0e10cSrcweir aRbDiv ( this, ScResId( BTN_OP_DIV ) ),
74cdf0e10cSrcweir aFlSep2 ( this, ScResId( FL_SEP2 ) ),
75cdf0e10cSrcweir aFlMove ( this, ScResId( FL_MOVE ) ),
76cdf0e10cSrcweir aRbMoveNone ( this, ScResId( BTN_MV_NONE ) ),
77cdf0e10cSrcweir aRbMoveDown ( this, ScResId( BTN_MV_DOWN ) ),
78cdf0e10cSrcweir aRbMoveRight ( this, ScResId( BTN_MV_RIGHT ) ),
79cdf0e10cSrcweir aBtnOk ( this, ScResId( BTN_OK ) ),
80cdf0e10cSrcweir aBtnCancel ( this, ScResId( BTN_CANCEL ) ),
81cdf0e10cSrcweir aBtnHelp ( this, ScResId( BTN_HELP ) ),
82cdf0e10cSrcweir bOtherDoc ( sal_False ),
83cdf0e10cSrcweir bFillMode ( sal_False ),
84cdf0e10cSrcweir bChangeTrack ( sal_False ),
85cdf0e10cSrcweir bMoveDownDisabled( sal_False ),
86cdf0e10cSrcweir bMoveRightDisabled( sal_False )
87cdf0e10cSrcweir {
88cdf0e10cSrcweir if ( pStrTitle )
89cdf0e10cSrcweir SetText( *pStrTitle );
90cdf0e10cSrcweir
91cdf0e10cSrcweir if ( nCheckDefaults != 0 )
92cdf0e10cSrcweir {
93cdf0e10cSrcweir ScInsertContentsDlg::nPreviousChecks = nCheckDefaults;
94cdf0e10cSrcweir ScInsertContentsDlg::bPreviousAllCheck = sal_False;
95cdf0e10cSrcweir ScInsertContentsDlg::nPreviousChecks2 = 0;
96cdf0e10cSrcweir }
97cdf0e10cSrcweir
98cdf0e10cSrcweir aBtnInsAll.Check ( ScInsertContentsDlg::bPreviousAllCheck );
99cdf0e10cSrcweir aBtnInsStrings.Check ( IS_SET( IDF_STRING,
100cdf0e10cSrcweir ScInsertContentsDlg::nPreviousChecks ) );
101cdf0e10cSrcweir aBtnInsNumbers.Check ( IS_SET( IDF_VALUE,
102cdf0e10cSrcweir ScInsertContentsDlg::nPreviousChecks ) );
103cdf0e10cSrcweir aBtnInsDateTime.Check( IS_SET( IDF_DATETIME,
104cdf0e10cSrcweir ScInsertContentsDlg::nPreviousChecks ) );
105cdf0e10cSrcweir aBtnInsFormulas.Check( IS_SET( IDF_FORMULA,
106cdf0e10cSrcweir ScInsertContentsDlg::nPreviousChecks ) );
107cdf0e10cSrcweir aBtnInsNotes.Check ( IS_SET( IDF_NOTE,
108cdf0e10cSrcweir ScInsertContentsDlg::nPreviousChecks ) );
109cdf0e10cSrcweir aBtnInsAttrs.Check ( IS_SET( IDF_ATTRIB,
110cdf0e10cSrcweir ScInsertContentsDlg::nPreviousChecks ) );
111cdf0e10cSrcweir aBtnInsObjects.Check ( IS_SET( IDF_OBJECTS,
112cdf0e10cSrcweir ScInsertContentsDlg::nPreviousChecks ) );
113cdf0e10cSrcweir
114cdf0e10cSrcweir switch( ScInsertContentsDlg::nPreviousFormulaChecks )
115cdf0e10cSrcweir {
116cdf0e10cSrcweir case PASTE_NOFUNC: aRbNoOp.Check(sal_True); break;
117cdf0e10cSrcweir case PASTE_ADD: aRbAdd.Check(sal_True); break;
118cdf0e10cSrcweir case PASTE_SUB: aRbSub.Check(sal_True); break;
119cdf0e10cSrcweir case PASTE_MUL: aRbMul.Check(sal_True); break;
120cdf0e10cSrcweir case PASTE_DIV: aRbDiv.Check(sal_True); break;
121cdf0e10cSrcweir }
122cdf0e10cSrcweir
123cdf0e10cSrcweir switch( ScInsertContentsDlg::nPreviousMoveMode )
124cdf0e10cSrcweir {
125cdf0e10cSrcweir case INS_NONE: aRbMoveNone.Check(sal_True); break;
126cdf0e10cSrcweir case INS_CELLSDOWN: aRbMoveDown.Check(sal_True); break;
127cdf0e10cSrcweir case INS_CELLSRIGHT: aRbMoveRight.Check(sal_True); break;
128cdf0e10cSrcweir }
129cdf0e10cSrcweir
130cdf0e10cSrcweir aBtnSkipEmptyCells.Check( ( ScInsertContentsDlg::nPreviousChecks2 & INS_CONT_NOEMPTY ) != 0);
131cdf0e10cSrcweir aBtnTranspose.Check( ( ScInsertContentsDlg::nPreviousChecks2 & INS_CONT_TRANS ) != 0);
132cdf0e10cSrcweir aBtnLink.Check( ( ScInsertContentsDlg::nPreviousChecks2 & INS_CONT_LINK ) != 0);
133cdf0e10cSrcweir
134cdf0e10cSrcweir DisableChecks( aBtnInsAll.IsChecked() );
135cdf0e10cSrcweir
136cdf0e10cSrcweir aFlSep1.SetStyle( aFlSep1.GetStyle() | WB_VERT );
137cdf0e10cSrcweir aFlSep2.SetStyle( aFlSep2.GetStyle() | WB_VERT );
138cdf0e10cSrcweir
139cdf0e10cSrcweir aBtnInsAll.SetClickHdl( LINK( this, ScInsertContentsDlg, InsAllHdl ) );
140cdf0e10cSrcweir aBtnLink.SetClickHdl( LINK( this, ScInsertContentsDlg, LinkBtnHdl ) );
141cdf0e10cSrcweir
142cdf0e10cSrcweir //-------------
143cdf0e10cSrcweir FreeResource();
144cdf0e10cSrcweir }
145cdf0e10cSrcweir
146cdf0e10cSrcweir //------------------------------------------------------------------------
147cdf0e10cSrcweir
GetInsContentsCmdBits() const148cdf0e10cSrcweir sal_uInt16 ScInsertContentsDlg::GetInsContentsCmdBits() const
149cdf0e10cSrcweir {
150cdf0e10cSrcweir ScInsertContentsDlg::nPreviousChecks = 0;
151cdf0e10cSrcweir
152cdf0e10cSrcweir if ( aBtnInsStrings.IsChecked() )
153cdf0e10cSrcweir ScInsertContentsDlg::nPreviousChecks = IDF_STRING;
154cdf0e10cSrcweir if ( aBtnInsNumbers.IsChecked() )
155cdf0e10cSrcweir ScInsertContentsDlg::nPreviousChecks |= IDF_VALUE;
156cdf0e10cSrcweir if ( aBtnInsDateTime.IsChecked())
157cdf0e10cSrcweir ScInsertContentsDlg::nPreviousChecks |= IDF_DATETIME;
158cdf0e10cSrcweir if ( aBtnInsFormulas.IsChecked())
159cdf0e10cSrcweir ScInsertContentsDlg::nPreviousChecks |= IDF_FORMULA;
160cdf0e10cSrcweir if ( aBtnInsNotes.IsChecked() )
161cdf0e10cSrcweir ScInsertContentsDlg::nPreviousChecks |= IDF_NOTE;
162cdf0e10cSrcweir if ( aBtnInsAttrs.IsChecked() )
163cdf0e10cSrcweir ScInsertContentsDlg::nPreviousChecks |= IDF_ATTRIB;
164cdf0e10cSrcweir if ( aBtnInsObjects.IsChecked() )
165cdf0e10cSrcweir ScInsertContentsDlg::nPreviousChecks |= IDF_OBJECTS;
166cdf0e10cSrcweir
167cdf0e10cSrcweir ScInsertContentsDlg::bPreviousAllCheck = aBtnInsAll.IsChecked();
168cdf0e10cSrcweir
169cdf0e10cSrcweir return ( (ScInsertContentsDlg::bPreviousAllCheck)
170cdf0e10cSrcweir ? IDF_ALL
171cdf0e10cSrcweir : ScInsertContentsDlg::nPreviousChecks );
172cdf0e10cSrcweir }
173cdf0e10cSrcweir
174cdf0e10cSrcweir //------------------------------------------------------------------------
175cdf0e10cSrcweir
GetMoveMode()176cdf0e10cSrcweir InsCellCmd ScInsertContentsDlg::GetMoveMode()
177cdf0e10cSrcweir {
178cdf0e10cSrcweir if ( aRbMoveDown.IsChecked() )
179cdf0e10cSrcweir return INS_CELLSDOWN;
180cdf0e10cSrcweir if ( aRbMoveRight.IsChecked() )
181cdf0e10cSrcweir return INS_CELLSRIGHT;
182cdf0e10cSrcweir
183cdf0e10cSrcweir return INS_NONE;
184cdf0e10cSrcweir }
185cdf0e10cSrcweir
186cdf0e10cSrcweir //------------------------------------------------------------------------
187cdf0e10cSrcweir
DisableChecks(sal_Bool bInsAllChecked)188cdf0e10cSrcweir void ScInsertContentsDlg::DisableChecks( sal_Bool bInsAllChecked )
189cdf0e10cSrcweir {
190cdf0e10cSrcweir if ( bInsAllChecked )
191cdf0e10cSrcweir {
192cdf0e10cSrcweir aBtnInsStrings.Disable();
193cdf0e10cSrcweir aBtnInsNumbers.Disable();
194cdf0e10cSrcweir aBtnInsDateTime.Disable();
195cdf0e10cSrcweir aBtnInsFormulas.Disable();
196cdf0e10cSrcweir aBtnInsNotes.Disable();
197cdf0e10cSrcweir aBtnInsAttrs.Disable();
198cdf0e10cSrcweir aBtnInsObjects.Disable();
199cdf0e10cSrcweir }
200cdf0e10cSrcweir else
201cdf0e10cSrcweir {
202cdf0e10cSrcweir aBtnInsStrings.Enable();
203cdf0e10cSrcweir aBtnInsNumbers.Enable();
204cdf0e10cSrcweir aBtnInsDateTime.Enable();
205cdf0e10cSrcweir aBtnInsFormulas.Enable();
206cdf0e10cSrcweir aBtnInsNotes.Enable();
207cdf0e10cSrcweir aBtnInsAttrs.Enable();
208cdf0e10cSrcweir
209cdf0e10cSrcweir // "Objects" is disabled for "Fill Tables"
210cdf0e10cSrcweir if ( bFillMode )
211cdf0e10cSrcweir aBtnInsObjects.Disable();
212cdf0e10cSrcweir else
213cdf0e10cSrcweir aBtnInsObjects.Enable();
214cdf0e10cSrcweir }
215cdf0e10cSrcweir }
216cdf0e10cSrcweir
217cdf0e10cSrcweir // Link in anderes Dokument -> alles andere disabled
218cdf0e10cSrcweir
TestModes()219cdf0e10cSrcweir void ScInsertContentsDlg::TestModes()
220cdf0e10cSrcweir {
221cdf0e10cSrcweir if ( bOtherDoc && aBtnLink.IsChecked() )
222cdf0e10cSrcweir {
223cdf0e10cSrcweir aBtnSkipEmptyCells.Disable();
224cdf0e10cSrcweir aBtnTranspose.Disable();
225cdf0e10cSrcweir aRbNoOp.Disable();
226cdf0e10cSrcweir aRbAdd.Disable();
227cdf0e10cSrcweir aRbSub.Disable();
228cdf0e10cSrcweir aRbMul.Disable();
229cdf0e10cSrcweir aRbDiv.Disable();
230cdf0e10cSrcweir aFlOperation.Disable();
231cdf0e10cSrcweir
232cdf0e10cSrcweir aRbMoveNone.Disable();
233cdf0e10cSrcweir aRbMoveDown.Disable();
234cdf0e10cSrcweir aRbMoveRight.Disable();
235cdf0e10cSrcweir aFlMove.Disable();
236cdf0e10cSrcweir
237cdf0e10cSrcweir aFlFrame.Disable();
238cdf0e10cSrcweir aBtnInsAll.Disable();
239cdf0e10cSrcweir DisableChecks(sal_True);
240cdf0e10cSrcweir }
241cdf0e10cSrcweir else
242cdf0e10cSrcweir {
243cdf0e10cSrcweir aBtnSkipEmptyCells.Enable();
244cdf0e10cSrcweir aBtnTranspose.Enable(!bFillMode);
245cdf0e10cSrcweir aRbNoOp.Enable();
246cdf0e10cSrcweir aRbAdd.Enable();
247cdf0e10cSrcweir aRbSub.Enable();
248cdf0e10cSrcweir aRbMul.Enable();
249cdf0e10cSrcweir aRbDiv.Enable();
250cdf0e10cSrcweir aFlOperation.Enable();
251cdf0e10cSrcweir
252cdf0e10cSrcweir aRbMoveNone.Enable(!bFillMode && !bChangeTrack && !(bMoveDownDisabled && bMoveRightDisabled));
253cdf0e10cSrcweir aRbMoveDown.Enable(!bFillMode && !bChangeTrack && !bMoveDownDisabled);
254cdf0e10cSrcweir aRbMoveRight.Enable(!bFillMode && !bChangeTrack && !bMoveRightDisabled);
255cdf0e10cSrcweir aFlMove.Enable(!bFillMode && !bChangeTrack && !(bMoveDownDisabled && bMoveRightDisabled));
256cdf0e10cSrcweir
257cdf0e10cSrcweir aFlFrame.Enable();
258cdf0e10cSrcweir aBtnInsAll.Enable();
259cdf0e10cSrcweir DisableChecks( aBtnInsAll.IsChecked() );
260cdf0e10cSrcweir }
261cdf0e10cSrcweir }
262cdf0e10cSrcweir
SetOtherDoc(sal_Bool bSet)263cdf0e10cSrcweir void ScInsertContentsDlg::SetOtherDoc( sal_Bool bSet )
264cdf0e10cSrcweir {
265cdf0e10cSrcweir if ( bSet != bOtherDoc )
266cdf0e10cSrcweir {
267cdf0e10cSrcweir bOtherDoc = bSet;
268cdf0e10cSrcweir TestModes();
269cdf0e10cSrcweir if ( bSet )
270cdf0e10cSrcweir aRbMoveNone.Check(sal_True);
271cdf0e10cSrcweir }
272cdf0e10cSrcweir }
273cdf0e10cSrcweir
SetFillMode(sal_Bool bSet)274cdf0e10cSrcweir void ScInsertContentsDlg::SetFillMode( sal_Bool bSet )
275cdf0e10cSrcweir {
276cdf0e10cSrcweir if ( bSet != bFillMode )
277cdf0e10cSrcweir {
278cdf0e10cSrcweir bFillMode = bSet;
279cdf0e10cSrcweir TestModes();
280cdf0e10cSrcweir if ( bSet )
281cdf0e10cSrcweir aRbMoveNone.Check(sal_True);
282cdf0e10cSrcweir }
283cdf0e10cSrcweir }
284cdf0e10cSrcweir
SetChangeTrack(sal_Bool bSet)285cdf0e10cSrcweir void ScInsertContentsDlg::SetChangeTrack( sal_Bool bSet )
286cdf0e10cSrcweir {
287cdf0e10cSrcweir if ( bSet != bChangeTrack )
288cdf0e10cSrcweir {
289cdf0e10cSrcweir bChangeTrack = bSet;
290cdf0e10cSrcweir TestModes();
291cdf0e10cSrcweir if ( bSet )
292cdf0e10cSrcweir aRbMoveNone.Check(sal_True);
293cdf0e10cSrcweir }
294cdf0e10cSrcweir }
295cdf0e10cSrcweir
SetCellShiftDisabled(int nDisable)296cdf0e10cSrcweir void ScInsertContentsDlg::SetCellShiftDisabled( int nDisable )
297cdf0e10cSrcweir {
298cdf0e10cSrcweir sal_Bool bDown = ((nDisable & SC_CELL_SHIFT_DISABLE_DOWN) != 0);
299cdf0e10cSrcweir sal_Bool bRight = ((nDisable & SC_CELL_SHIFT_DISABLE_RIGHT) != 0);
300cdf0e10cSrcweir if ( bDown != bMoveDownDisabled || bRight != bMoveRightDisabled )
301cdf0e10cSrcweir {
302cdf0e10cSrcweir bMoveDownDisabled = bDown;
303cdf0e10cSrcweir bMoveRightDisabled = bRight;
304cdf0e10cSrcweir TestModes();
305cdf0e10cSrcweir if ( bMoveDownDisabled && aRbMoveDown.IsChecked() )
306cdf0e10cSrcweir aRbMoveNone.Check(sal_True);
307cdf0e10cSrcweir if ( bMoveRightDisabled && aRbMoveRight.IsChecked() )
308cdf0e10cSrcweir aRbMoveNone.Check(sal_True);
309cdf0e10cSrcweir }
310cdf0e10cSrcweir }
311cdf0e10cSrcweir
312cdf0e10cSrcweir
313cdf0e10cSrcweir //------------------------------------------------------------------------
314cdf0e10cSrcweir
IMPL_LINK(ScInsertContentsDlg,InsAllHdl,void *,EMPTYARG)315cdf0e10cSrcweir IMPL_LINK( ScInsertContentsDlg, InsAllHdl, void*, EMPTYARG )
316cdf0e10cSrcweir {
317cdf0e10cSrcweir DisableChecks( aBtnInsAll.IsChecked() );
318cdf0e10cSrcweir
319cdf0e10cSrcweir return 0;
320cdf0e10cSrcweir }
321cdf0e10cSrcweir
IMPL_LINK(ScInsertContentsDlg,LinkBtnHdl,void *,EMPTYARG)322cdf0e10cSrcweir IMPL_LINK( ScInsertContentsDlg, LinkBtnHdl, void*, EMPTYARG )
323cdf0e10cSrcweir {
324cdf0e10cSrcweir TestModes();
325cdf0e10cSrcweir
326cdf0e10cSrcweir return 0;
327cdf0e10cSrcweir }
328cdf0e10cSrcweir
~ScInsertContentsDlg()329cdf0e10cSrcweir __EXPORT ScInsertContentsDlg::~ScInsertContentsDlg()
330cdf0e10cSrcweir {
331cdf0e10cSrcweir ScInsertContentsDlg::nPreviousChecks2 = 0;
332cdf0e10cSrcweir if(aBtnSkipEmptyCells.IsChecked())
333cdf0e10cSrcweir ScInsertContentsDlg::nPreviousChecks2 |= INS_CONT_NOEMPTY;
334cdf0e10cSrcweir if( aBtnTranspose.IsChecked())
335cdf0e10cSrcweir ScInsertContentsDlg::nPreviousChecks2 |= INS_CONT_TRANS;
336cdf0e10cSrcweir if( aBtnLink.IsChecked() )
337cdf0e10cSrcweir ScInsertContentsDlg::nPreviousChecks2 |= INS_CONT_LINK;
338cdf0e10cSrcweir
339cdf0e10cSrcweir if (!bFillMode) // im FillMode ist None gecheckt und alle 3 disabled
340cdf0e10cSrcweir {
341cdf0e10cSrcweir if ( aRbMoveNone.IsChecked() )
342cdf0e10cSrcweir ScInsertContentsDlg::nPreviousMoveMode = INS_NONE;
343cdf0e10cSrcweir else if ( aRbMoveDown.IsChecked() )
344cdf0e10cSrcweir ScInsertContentsDlg::nPreviousMoveMode = INS_CELLSDOWN;
345cdf0e10cSrcweir else if ( aRbMoveRight.IsChecked() )
346cdf0e10cSrcweir ScInsertContentsDlg::nPreviousMoveMode = INS_CELLSRIGHT;
347cdf0e10cSrcweir }
348cdf0e10cSrcweir }
349cdf0e10cSrcweir
GetFormulaCmdBits() const350cdf0e10cSrcweir sal_uInt16 ScInsertContentsDlg::GetFormulaCmdBits() const
351cdf0e10cSrcweir {
352cdf0e10cSrcweir ScInsertContentsDlg::nPreviousFormulaChecks = PASTE_NOFUNC;
353cdf0e10cSrcweir if(aRbAdd.IsChecked())
354cdf0e10cSrcweir ScInsertContentsDlg::nPreviousFormulaChecks = PASTE_ADD;
355cdf0e10cSrcweir else if(aRbSub.IsChecked())
356cdf0e10cSrcweir ScInsertContentsDlg::nPreviousFormulaChecks = PASTE_SUB;
357cdf0e10cSrcweir else if(aRbMul.IsChecked())
358cdf0e10cSrcweir ScInsertContentsDlg::nPreviousFormulaChecks = PASTE_MUL;
359cdf0e10cSrcweir else if(aRbDiv.IsChecked())
360cdf0e10cSrcweir ScInsertContentsDlg::nPreviousFormulaChecks = PASTE_DIV;
361cdf0e10cSrcweir // Bits fuer Checkboxen ausblenden
362cdf0e10cSrcweir return ScInsertContentsDlg::nPreviousFormulaChecks;
363cdf0e10cSrcweir }
364cdf0e10cSrcweir
365cdf0e10cSrcweir
366cdf0e10cSrcweir
367