xref: /trunk/main/sc/source/ui/inc/inscodlg.hxx (revision 1ecadb572e7010ff3b3382ad9bf179dbc6efadbb)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef SC_INSCODLG_HXX
29 #define SC_INSCODLG_HXX
30 
31 #include <vcl/dialog.hxx>
32 #include <vcl/button.hxx>
33 #include <vcl/fixed.hxx>
34 #include "global.hxx"
35 
36 //------------------------------------------------------------------------
37 //CHINA001 #define INS_CONT_NOEMPTY     0x0100
38 //CHINA001 #define INS_CONT_TRANS       0x0200
39 //CHINA001 #define INS_CONT_LINK        0x0400
40 //CHINA001
41 //CHINA001 #define SC_CELL_SHIFT_DISABLE_DOWN   0x01
42 //CHINA001 #define SC_CELL_SHIFT_DISABLE_RIGHT  0x02
43 #include "scui_def.hxx"
44 
45 class ScInsertContentsDlg : public ModalDialog
46 {
47 public:
48             ScInsertContentsDlg( Window*        pParent,
49                                  sal_uInt16         nCheckDefaults = 0,
50                                  const String*  pStrTitle = NULL );
51             ~ScInsertContentsDlg();
52 
53     sal_uInt16      GetInsContentsCmdBits() const;
54     sal_uInt16      GetFormulaCmdBits() const;
55     sal_Bool        IsSkipEmptyCells() const {return aBtnSkipEmptyCells.IsChecked();}
56     sal_Bool        IsTranspose() const {return aBtnTranspose.IsChecked();}
57     sal_Bool        IsLink() const {return aBtnLink.IsChecked();}
58     InsCellCmd  GetMoveMode();
59 
60     void    SetOtherDoc( sal_Bool bSet );
61     void    SetFillMode( sal_Bool bSet );
62     void    SetChangeTrack( sal_Bool bSet );
63     void    SetCellShiftDisabled( int nDisable );
64 
65 private:
66     FixedLine       aFlFrame;
67     CheckBox        aBtnInsAll;
68     CheckBox        aBtnInsStrings;
69     CheckBox        aBtnInsNumbers;
70     CheckBox        aBtnInsDateTime;
71     CheckBox        aBtnInsFormulas;
72     CheckBox        aBtnInsNotes;
73     CheckBox        aBtnInsAttrs;
74     CheckBox        aBtnInsObjects;
75 
76     FixedLine       aFlSep1;
77     FixedLine       aFlOptions;
78     CheckBox        aBtnSkipEmptyCells;
79     CheckBox        aBtnTranspose;
80     CheckBox        aBtnLink;
81 
82     FixedLine       aFlOperation;
83     RadioButton     aRbNoOp;
84     RadioButton     aRbAdd;
85     RadioButton     aRbSub;
86     RadioButton     aRbMul;
87     RadioButton     aRbDiv;
88 
89     FixedLine       aFlSep2;
90     FixedLine       aFlMove;
91     RadioButton     aRbMoveNone;
92     RadioButton     aRbMoveDown;
93     RadioButton     aRbMoveRight;
94 
95     OKButton        aBtnOk;
96     CancelButton    aBtnCancel;
97     HelpButton      aBtnHelp;
98 
99     sal_Bool            bOtherDoc;
100     sal_Bool            bFillMode;
101     sal_Bool            bChangeTrack;
102     sal_Bool            bMoveDownDisabled;
103     sal_Bool            bMoveRightDisabled;
104 
105     static sal_Bool     bPreviousAllCheck;
106     static sal_uInt16   nPreviousChecks;
107     static sal_uInt16   nPreviousChecks2;
108     static sal_uInt16   nPreviousFormulaChecks;
109     static sal_uInt16   nPreviousMoveMode;          // enum InsCellCmd
110 
111     void DisableChecks( sal_Bool bInsAllChecked = sal_True );
112     void TestModes();
113 
114     // Handler
115     DECL_LINK( InsAllHdl, void* );
116     DECL_LINK( LinkBtnHdl, void* );
117 };
118 
119 
120 #endif // SC_INSCODLG_HXX
121 
122 
123