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