xref: /AOO41X/main/sc/source/ui/inc/inscodlg.hxx (revision 38d50f7b14e1cf975d8c6468d9633894cd59b523)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef SC_INSCODLG_HXX
25 #define SC_INSCODLG_HXX
26 
27 #include <vcl/dialog.hxx>
28 #include <vcl/button.hxx>
29 #include <vcl/fixed.hxx>
30 #include "global.hxx"
31 
32 //------------------------------------------------------------------------
33 //CHINA001 #define INS_CONT_NOEMPTY     0x0100
34 //CHINA001 #define INS_CONT_TRANS       0x0200
35 //CHINA001 #define INS_CONT_LINK        0x0400
36 //CHINA001
37 //CHINA001 #define SC_CELL_SHIFT_DISABLE_DOWN   0x01
38 //CHINA001 #define SC_CELL_SHIFT_DISABLE_RIGHT  0x02
39 #include "scui_def.hxx"
40 
41 class ScInsertContentsDlg : public ModalDialog
42 {
43 public:
44             ScInsertContentsDlg( Window*        pParent,
45                                  sal_uInt16         nCheckDefaults = 0,
46                                  const String*  pStrTitle = NULL );
47             ~ScInsertContentsDlg();
48 
49     sal_uInt16      GetInsContentsCmdBits() const;
50     sal_uInt16      GetFormulaCmdBits() const;
IsSkipEmptyCells() const51     sal_Bool        IsSkipEmptyCells() const {return aBtnSkipEmptyCells.IsChecked();}
IsTranspose() const52     sal_Bool        IsTranspose() const {return aBtnTranspose.IsChecked();}
IsLink() const53     sal_Bool        IsLink() const {return aBtnLink.IsChecked();}
54     InsCellCmd  GetMoveMode();
55 
56     void    SetOtherDoc( sal_Bool bSet );
57     void    SetFillMode( sal_Bool bSet );
58     void    SetChangeTrack( sal_Bool bSet );
59     void    SetCellShiftDisabled( int nDisable );
60 
61 private:
62     FixedLine       aFlFrame;
63     CheckBox        aBtnInsAll;
64     CheckBox        aBtnInsStrings;
65     CheckBox        aBtnInsNumbers;
66     CheckBox        aBtnInsDateTime;
67     CheckBox        aBtnInsFormulas;
68     CheckBox        aBtnInsNotes;
69     CheckBox        aBtnInsAttrs;
70     CheckBox        aBtnInsObjects;
71 
72     FixedLine       aFlSep1;
73     FixedLine       aFlOptions;
74     CheckBox        aBtnSkipEmptyCells;
75     CheckBox        aBtnTranspose;
76     CheckBox        aBtnLink;
77 
78     FixedLine       aFlOperation;
79     RadioButton     aRbNoOp;
80     RadioButton     aRbAdd;
81     RadioButton     aRbSub;
82     RadioButton     aRbMul;
83     RadioButton     aRbDiv;
84 
85     FixedLine       aFlSep2;
86     FixedLine       aFlMove;
87     RadioButton     aRbMoveNone;
88     RadioButton     aRbMoveDown;
89     RadioButton     aRbMoveRight;
90 
91     OKButton        aBtnOk;
92     CancelButton    aBtnCancel;
93     HelpButton      aBtnHelp;
94 
95     sal_Bool            bOtherDoc;
96     sal_Bool            bFillMode;
97     sal_Bool            bChangeTrack;
98     sal_Bool            bMoveDownDisabled;
99     sal_Bool            bMoveRightDisabled;
100 
101     static sal_Bool     bPreviousAllCheck;
102     static sal_uInt16   nPreviousChecks;
103     static sal_uInt16   nPreviousChecks2;
104     static sal_uInt16   nPreviousFormulaChecks;
105     static sal_uInt16   nPreviousMoveMode;          // enum InsCellCmd
106 
107     void DisableChecks( sal_Bool bInsAllChecked = sal_True );
108     void TestModes();
109 
110     // Handler
111     DECL_LINK( InsAllHdl, void* );
112     DECL_LINK( LinkBtnHdl, void* );
113 };
114 
115 
116 #endif // SC_INSCODLG_HXX
117 
118 
119