xref: /trunk/main/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx (revision 914d351e5f5b84e4342a86d6ab8d4aca7308b9bd)
12e2212a7SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
32e2212a7SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
42e2212a7SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
52e2212a7SAndrew Rist  * distributed with this work for additional information
62e2212a7SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
72e2212a7SAndrew Rist  * to you under the Apache License, Version 2.0 (the
82e2212a7SAndrew Rist  * "License"); you may not use this file except in compliance
92e2212a7SAndrew Rist  * with the License.  You may obtain a copy of the License at
10cdf0e10cSrcweir  *
112e2212a7SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir  *
132e2212a7SAndrew Rist  * Unless required by applicable law or agreed to in writing,
142e2212a7SAndrew Rist  * software distributed under the License is distributed on an
152e2212a7SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
162e2212a7SAndrew Rist  * KIND, either express or implied.  See the License for the
172e2212a7SAndrew Rist  * specific language governing permissions and limitations
182e2212a7SAndrew Rist  * under the License.
19cdf0e10cSrcweir  *
202e2212a7SAndrew Rist  *************************************************************/
212e2212a7SAndrew Rist 
222e2212a7SAndrew Rist 
23cdf0e10cSrcweir #ifndef DBAUI_QUERYDESIGN_OSELECTIONBROWSEBOX_HXX
24cdf0e10cSrcweir #define DBAUI_QUERYDESIGN_OSELECTIONBROWSEBOX_HXX
25cdf0e10cSrcweir 
26cdf0e10cSrcweir #ifndef _SVTOOLS_EDITBROWSEBOX_HXX_
27cdf0e10cSrcweir #include <svtools/editbrowsebox.hxx>
28cdf0e10cSrcweir #endif
29cdf0e10cSrcweir //#ifndef DBAUI_QUERYCONTROLLER_HXX
30cdf0e10cSrcweir //#include "querycontroller.hxx"
31cdf0e10cSrcweir //#endif
32cdf0e10cSrcweir #ifndef DBAUI_TABLEFIELDDESC_HXX
33cdf0e10cSrcweir #include "TableFieldDescription.hxx"
34cdf0e10cSrcweir #endif
35cdf0e10cSrcweir #ifndef DBAUI_JOINEXCHANGE_HXX
36cdf0e10cSrcweir #include "JoinExchange.hxx"
37cdf0e10cSrcweir #endif
38cdf0e10cSrcweir #ifndef DBAUI_ENUMTYPES_HXX
39cdf0e10cSrcweir #include "QEnumTypes.hxx"
40cdf0e10cSrcweir #endif
41cdf0e10cSrcweir #ifndef _COM_SUN_STAR_UTIL_XNUMBERFORMATTER_HPP_
42cdf0e10cSrcweir #include <com/sun/star/util/XNumberFormatter.hpp>
43cdf0e10cSrcweir #endif
44cdf0e10cSrcweir #ifndef _STRING_HXX
45cdf0e10cSrcweir #include <tools/string.hxx>
46cdf0e10cSrcweir #endif
47cdf0e10cSrcweir #ifndef _TRANSFER_HXX
48cdf0e10cSrcweir #include <svtools/transfer.hxx>
49cdf0e10cSrcweir #endif
50cdf0e10cSrcweir 
51cdf0e10cSrcweir namespace connectivity
52cdf0e10cSrcweir {
53cdf0e10cSrcweir     class OSQLParseNode;
54cdf0e10cSrcweir }
55cdf0e10cSrcweir 
56cdf0e10cSrcweir namespace dbaui
57cdf0e10cSrcweir {
58cdf0e10cSrcweir     //==================================================================
59cdf0e10cSrcweir #define SIZ_NONE        0
60cdf0e10cSrcweir #define SIZ_TOP         1
61cdf0e10cSrcweir #define SIZ_BOTTOM      2
62cdf0e10cSrcweir #define SIZ_LEFT        4
63cdf0e10cSrcweir #define SIZ_RIGHT       8
64cdf0e10cSrcweir 
65cdf0e10cSrcweir #define BROW_FIELD_ROW          0
66cdf0e10cSrcweir #define BROW_COLUMNALIAS_ROW    1
67cdf0e10cSrcweir #define BROW_TABLE_ROW          2
68cdf0e10cSrcweir #define BROW_ORDER_ROW          3
69cdf0e10cSrcweir #define BROW_VIS_ROW            4
70cdf0e10cSrcweir #define BROW_FUNCTION_ROW       5
71cdf0e10cSrcweir #define BROW_CRIT1_ROW          6
72cdf0e10cSrcweir #define BROW_CRIT2_ROW          7
73cdf0e10cSrcweir #define BROW_CRIT3_ROW          8
74cdf0e10cSrcweir #define BROW_CRIT4_ROW          9
75cdf0e10cSrcweir #define BROW_CRIT5_ROW          10
76cdf0e10cSrcweir #define BROW_CRIT6_ROW          11
77cdf0e10cSrcweir #define BROW_ROW_CNT            12
78cdf0e10cSrcweir 
79cdf0e10cSrcweir     //==================================================================
80cdf0e10cSrcweir     class OQueryDesignView;
81cdf0e10cSrcweir     class OSelectionBrowseBox : public ::svt::EditBrowseBox
82cdf0e10cSrcweir     {
83cdf0e10cSrcweir         friend class OQueryDesignView;
84cdf0e10cSrcweir         ::std::vector<bool>                 m_bVisibleRow;  // an Pos steht die RowId
85cdf0e10cSrcweir         Timer                               m_timerInvalidate;
86cdf0e10cSrcweir 
87cdf0e10cSrcweir         long                                m_nSeekRow;
88cdf0e10cSrcweir         BrowserMode                         m_nMode;                        // Merken des BrowseModes
89cdf0e10cSrcweir         Edit*                               m_pTextCell;
90cdf0e10cSrcweir         ::svt::CheckBoxControl*             m_pVisibleCell;
91cdf0e10cSrcweir         ::svt::ComboBoxControl*             m_pFieldCell;
92cdf0e10cSrcweir         ::svt::ListBoxControl*              m_pFunctionCell;
93cdf0e10cSrcweir         ::svt::ListBoxControl*              m_pTableCell;
94cdf0e10cSrcweir         ::svt::ListBoxControl*              m_pOrderCell;
95cdf0e10cSrcweir 
96cdf0e10cSrcweir         OTableFieldDescRef                  m_pEmptyEntry;      // default entry in the list may reference more than once
97cdf0e10cSrcweir 
98cdf0e10cSrcweir         sal_Int32                           m_nMaxColumns;              // maximale Anzahl der Spalten in einem Select-Statement
99cdf0e10cSrcweir 
100cdf0e10cSrcweir         String                              m_aFunctionStrings;
101cdf0e10cSrcweir         sal_uInt16                          m_nVisibleCount;                // Anzahl der max sichtbaren Zeilen
102cdf0e10cSrcweir         sal_Bool                            m_bOrderByUnRelated;
103cdf0e10cSrcweir         sal_Bool                            m_bGroupByUnRelated;
104cdf0e10cSrcweir         sal_Bool                            m_bStopTimer;
105cdf0e10cSrcweir         sal_Bool                            m_bWasEditing;
106cdf0e10cSrcweir         sal_Bool                            m_bDisableErrorBox;
107cdf0e10cSrcweir         sal_Bool                            m_bInUndoMode;
108cdf0e10cSrcweir 
109cdf0e10cSrcweir         DECL_LINK(OnInvalidateTimer, void*);
110cdf0e10cSrcweir     public:                         OSelectionBrowseBox( Window* pParent );
111cdf0e10cSrcweir                                     ~OSelectionBrowseBox();
112cdf0e10cSrcweir 
113cdf0e10cSrcweir         void                        initialize();
114cdf0e10cSrcweir         OTableFieldDescRef          InsertField( const OJoinExchangeData& jxdSource, sal_uInt16 _nColumnPostion = BROWSER_INVALIDID, sal_Bool bVis=sal_True, sal_Bool bActivate=sal_True );
115cdf0e10cSrcweir         OTableFieldDescRef          InsertField( const OTableFieldDescRef& rInfo, sal_uInt16 _nColumnPostion = BROWSER_INVALIDID, sal_Bool bVis=sal_True, sal_Bool bActivate=sal_True );
116cdf0e10cSrcweir         void                        InsertColumn( OTableFieldDescRef pEntry, sal_uInt16& _nColumnPostion );
117cdf0e10cSrcweir         void                        RemoveColumn( sal_uInt16 _nColumnId );
118cdf0e10cSrcweir         void                        DeleteFields( const String& rAliasName );
119cdf0e10cSrcweir 
120cdf0e10cSrcweir         bool                        HasFieldByAliasName(const ::rtl::OUString& rFieldName, OTableFieldDescRef& rInfo) const;
121cdf0e10cSrcweir         // AddGroupBy:: F"ugt ein Feld mit Funktion == Grupierung. Falls das Feld schon vorhanden ist und ein Aggregate Funktion
122cdf0e10cSrcweir         // benutzt, wird das Flag nicht gesetzt
123cdf0e10cSrcweir         void                        AddGroupBy( const OTableFieldDescRef& rInfo,sal_uInt32 _nCurrentPos);
124cdf0e10cSrcweir         void                        AddCondition( const OTableFieldDescRef& rInfo,
125cdf0e10cSrcweir                                                   const String& rValue,
126cdf0e10cSrcweir                                                   const sal_uInt16 nLevel,
127cdf0e10cSrcweir                                                   bool _bAddOrOnOneLine  );
128cdf0e10cSrcweir         void                        DuplicateConditionLevel( const sal_uInt16 nLevel);
129cdf0e10cSrcweir         void                        AddOrder(const OTableFieldDescRef& rInfo, const EOrderDir eDir, sal_uInt32 _nCurrentPos);
130cdf0e10cSrcweir         void                        ClearAll();
131cdf0e10cSrcweir         OTableFieldDescRef          AppendNewCol( sal_uInt16 nCnt=1 );
132cdf0e10cSrcweir         sal_Bool                    Save();
133cdf0e10cSrcweir         OQueryDesignView*           getDesignView();
134cdf0e10cSrcweir         OQueryDesignView*           getDesignView() const;
135cdf0e10cSrcweir         sal_uInt16                  FieldsCount();
136cdf0e10cSrcweir 
137cdf0e10cSrcweir         void                        SetColWidth(sal_uInt16 nColId, long lNewWidth);
138cdf0e10cSrcweir                                     // beachtet im Gegensatz zum SetColumnWidth der Basisklasse auch eine eventuell aktive Zelle in dieser Spalte
139cdf0e10cSrcweir 
140cdf0e10cSrcweir         String                      GetCellContents(sal_Int32 nCellIndex, sal_uInt16 nColId);
141cdf0e10cSrcweir         void                        SetCellContents(sal_Int32 nCellIndex, sal_uInt16 nColId, const String& strNewText);
142cdf0e10cSrcweir                                         // Zelleninhalt (als String formatiert) setzen/liefern
143cdf0e10cSrcweir         sal_Int32                   GetNoneVisibleRows() const;
144cdf0e10cSrcweir         void                        SetNoneVisbleRow(long nRows);
145cdf0e10cSrcweir         sal_Bool                    IsRowVisible(sal_uInt16 _nWhich) const;
146cdf0e10cSrcweir         void                        SetRowVisible(sal_uInt16 _nWhich, sal_Bool _bVis);
147cdf0e10cSrcweir 
148cdf0e10cSrcweir         void                        SetReadOnly(sal_Bool bRO);
149cdf0e10cSrcweir         // calculate an optimal size. Basically, this takes into account the number of visible rows.
150cdf0e10cSrcweir         Size                        CalcOptimalSize( const Size& _rAvailable );
151cdf0e10cSrcweir 
152cdf0e10cSrcweir         // can the current content be cut
153cdf0e10cSrcweir         sal_Bool                    isPasteAllowed();
154cdf0e10cSrcweir         sal_Bool                    isCutAllowed();
155cdf0e10cSrcweir         sal_Bool                    isCopyAllowed();
156cdf0e10cSrcweir         void                        cut();
157cdf0e10cSrcweir         void                        paste();
158cdf0e10cSrcweir         void                        copy();
159cdf0e10cSrcweir 
160cdf0e10cSrcweir         virtual void                GetFocus();
161cdf0e10cSrcweir         virtual void                DeactivateCell(sal_Bool bUpdate = sal_True);
ColumnMoved(sal_uInt16 nColId)162cdf0e10cSrcweir         virtual void                ColumnMoved( sal_uInt16 nColId ) { ColumnMoved(nColId,sal_True); }
163cdf0e10cSrcweir         void                        ColumnMoved( sal_uInt16 nColId,sal_Bool _bCreateUndo);
164cdf0e10cSrcweir 
165cdf0e10cSrcweir         void                        Fill();
166cdf0e10cSrcweir         void                        PreFill();
167cdf0e10cSrcweir 
168cdf0e10cSrcweir         /** Disables the generation of undo actions
169cdf0e10cSrcweir         */
EnterUndoMode()170cdf0e10cSrcweir         inline void                 EnterUndoMode() { m_bInUndoMode = sal_True; }
171cdf0e10cSrcweir         /** Enables the generation of undo actions
172cdf0e10cSrcweir         */
LeaveUndoMode()173cdf0e10cSrcweir         inline void                 LeaveUndoMode() { m_bInUndoMode = sal_False; }
174cdf0e10cSrcweir 
175cdf0e10cSrcweir         /** GetCellText returns the text at the given position
176cdf0e10cSrcweir             @param  _nRow
177cdf0e10cSrcweir                 the number of the row
178cdf0e10cSrcweir             @param  _nColId
179cdf0e10cSrcweir                 the ID of the column
180cdf0e10cSrcweir             @return
181cdf0e10cSrcweir                 the text out of the cell
182cdf0e10cSrcweir         */
183cdf0e10cSrcweir         virtual String              GetCellText(long _nRow, sal_uInt16 _nColId) const;
184cdf0e10cSrcweir 
185cdf0e10cSrcweir         /** returns the description of the row.
186cdf0e10cSrcweir             @param  _nRow
187cdf0e10cSrcweir                 The row number.
188cdf0e10cSrcweir             @return
189cdf0e10cSrcweir                 The header text of the specified row.
190cdf0e10cSrcweir         */
191cdf0e10cSrcweir         virtual ::rtl::OUString     GetRowDescription( sal_Int32 _nRow ) const;
192cdf0e10cSrcweir 
193cdf0e10cSrcweir         /** return the name of the specified object.
194cdf0e10cSrcweir             @param  eObjType
195cdf0e10cSrcweir                 The type to ask for
196cdf0e10cSrcweir             @param  _nPosition
197*07a3d7f1SPedro Giffuni                 The position of a tablecell (index position), header bar  column/row cell
198cdf0e10cSrcweir             @return
199cdf0e10cSrcweir                 The name of the specified object.
200cdf0e10cSrcweir         */
201cdf0e10cSrcweir         virtual ::rtl::OUString     GetAccessibleObjectName( ::svt::AccessibleBrowseBoxObjType eObjType,sal_Int32 _nPosition = -1) const;
202cdf0e10cSrcweir 
203cdf0e10cSrcweir         // IAccessibleTableProvider
204cdf0e10cSrcweir         /** Creates the accessible object of a data table cell.
205cdf0e10cSrcweir         @param nRow  The row index of the cell.
206cdf0e10cSrcweir         @param nColumnId  The column ID of the cell.
207cdf0e10cSrcweir         @return  The XAccessible interface of the specified cell. */
208cdf0e10cSrcweir         virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessibleCell( sal_Int32 nRow, sal_uInt16 nColumnId );
209cdf0e10cSrcweir 
210cdf0e10cSrcweir 
211cdf0e10cSrcweir     protected:
212cdf0e10cSrcweir         virtual sal_Bool            SeekRow( long nRow );
213cdf0e10cSrcweir 
214cdf0e10cSrcweir         virtual void                PaintStatusCell(OutputDevice& rDev, const Rectangle& rRect) const;
215cdf0e10cSrcweir         virtual void                PaintCell(OutputDevice& rDev, const Rectangle& rRect,
216cdf0e10cSrcweir                                               sal_uInt16 nColumnId ) const;
217cdf0e10cSrcweir 
218cdf0e10cSrcweir         virtual sal_Int8            AcceptDrop( const BrowserAcceptDropEvent& rEvt );
219cdf0e10cSrcweir         virtual sal_Int8            ExecuteDrop( const BrowserExecuteDropEvent& rEvt );
220cdf0e10cSrcweir         virtual void                MouseButtonDown( const BrowserMouseEvent& rEvt );
221cdf0e10cSrcweir         virtual void                MouseButtonUp( const BrowserMouseEvent& rEvt );
222cdf0e10cSrcweir         virtual void                KeyInput( const KeyEvent& rEvt );
223cdf0e10cSrcweir         virtual void                Command(const CommandEvent& rEvt);
224cdf0e10cSrcweir         virtual void                ArrangeControls(sal_uInt16& nX, sal_uInt16 nY);
225cdf0e10cSrcweir 
226cdf0e10cSrcweir         virtual ::svt::CellController*  GetController(long nRow, sal_uInt16 nCol);
227cdf0e10cSrcweir         virtual void                InitController(::svt::CellControllerRef& rController, long nRow, sal_uInt16 nCol);
228cdf0e10cSrcweir         virtual void                CellModified();
229cdf0e10cSrcweir         virtual sal_Bool            SaveModified();
230cdf0e10cSrcweir         virtual void                Init();
231cdf0e10cSrcweir         virtual sal_uInt32          GetTotalCellWidth(long nRow, sal_uInt16 nColId) const;
232cdf0e10cSrcweir         virtual void                ColumnResized( sal_uInt16 nColId );
233cdf0e10cSrcweir 
234cdf0e10cSrcweir         virtual sal_uInt32          GetTotalCellWidth(long nRow, sal_uInt16 nColId);
235cdf0e10cSrcweir 
236cdf0e10cSrcweir         virtual sal_uInt16          GetDefaultColumnWidth(const String& rName) const;
237cdf0e10cSrcweir         // if you want to have an own header ...
238cdf0e10cSrcweir         virtual BrowserHeader*      imp_CreateHeaderBar(BrowseBox* pParent);
239cdf0e10cSrcweir 
240cdf0e10cSrcweir         void                        stopTimer();
241cdf0e10cSrcweir         void                        startTimer();
242cdf0e10cSrcweir 
243cdf0e10cSrcweir     private:
244cdf0e10cSrcweir         OTableFieldDescRef          FindFirstFreeCol(sal_uInt16& _rColumnPosition);
245cdf0e10cSrcweir             // rCol enthaelt die Nummer (in pOTableFieldDescList) der ersten Spalte, die von sich sagt, dass sie leer ist
246cdf0e10cSrcweir             // wenn es keine solche gibt, ist rCol undefiniert und der Rueckgabewert NULL
247cdf0e10cSrcweir         void                        CheckFreeColumns(sal_uInt16& _rColumnPosition);
248cdf0e10cSrcweir             // testet, ob es noch freie Spalten gibt, wenn nicht, wird ein neuer Packen angefuegt
249cdf0e10cSrcweir             // rCol enthaelt die Nummer der ersten freien Spalte (in pOTableFieldDescList)
250cdf0e10cSrcweir 
251cdf0e10cSrcweir         void            RemoveField( sal_uInt16 nId );
252cdf0e10cSrcweir         Rectangle       GetInvalidRect( sal_uInt16 nColId );
253cdf0e10cSrcweir         long            GetRealRow(long nRow) const;
254cdf0e10cSrcweir         long            GetBrowseRow(long nRowId) const;
255cdf0e10cSrcweir         sal_Bool        GetFunctionName(sal_uInt32 _nFunctionTokenId,String& rFkt);
256cdf0e10cSrcweir         void            appendUndoAction(const String& _rOldValue,const String& _rNewValue,sal_Int32 _nRow,sal_Bool& _bListAction);
257cdf0e10cSrcweir         void            appendUndoAction(const String& _rOldValue,const String& _rNewValue,sal_Int32 _nRow);
258cdf0e10cSrcweir         OTableFields&   getFields() const;
259cdf0e10cSrcweir         void            enableControl(const OTableFieldDescRef& _rEntry,Window* _pControl);
260cdf0e10cSrcweir         void            setTextCellContext(const OTableFieldDescRef& _rEntry,const String& _sText,const rtl::OString& _sHelpId);
261cdf0e10cSrcweir         void            invalidateUndoRedo();
262cdf0e10cSrcweir         OTableFieldDescRef getEntry(OTableFields::size_type _nPos);
263cdf0e10cSrcweir 
264cdf0e10cSrcweir         void            adjustSelectionMode( sal_Bool _bClickedOntoHeader, sal_Bool _bClickedOntoHandleCol );
265cdf0e10cSrcweir 
266cdf0e10cSrcweir         /** save the filed change in save modified
267cdf0e10cSrcweir             @param  _sFieldName
268cdf0e10cSrcweir                 The field name inserted by the user.
269cdf0e10cSrcweir             @param  _pEntry
270*07a3d7f1SPedro Giffuni                 The entry which will contain the necessary entries.
271cdf0e10cSrcweir             @param  _bListAction
272cdf0e10cSrcweir                 Will be set to <TRUE/> when we are in a list action otherwise <FALSE/>
273cdf0e10cSrcweir             @return
274*07a3d7f1SPedro Giffuni                 <TRUE/> if an error occurred otherwise <FALSE/>
275cdf0e10cSrcweir         */
276cdf0e10cSrcweir         sal_Bool        saveField(const String& _sFieldName,OTableFieldDescRef& _pEntry,sal_Bool& _bListAction);
277cdf0e10cSrcweir 
278cdf0e10cSrcweir         /** sets the table window at the _pEntry
279cdf0e10cSrcweir             @param  _pEntry
280cdf0e10cSrcweir                 The entry where the window should be set.
281cdf0e10cSrcweir             @param  _sTableName
282cdf0e10cSrcweir                 The table name to search for.
283cdf0e10cSrcweir             @return
284cdf0e10cSrcweir                 <TRUE/> if the table name was set otherwise <FALSE/>
285cdf0e10cSrcweir         */
286cdf0e10cSrcweir         sal_Bool        fillEntryTable(OTableFieldDescRef& _pEntry,const ::rtl::OUString& _sTableName);
287cdf0e10cSrcweir 
288cdf0e10cSrcweir         /** uses the parse node to fill all information into the field
289cdf0e10cSrcweir             @param  _pColumnRef
290cdf0e10cSrcweir                 The parse node used to fill the info into the field.
291cdf0e10cSrcweir             @param  _xMetaData
292cdf0e10cSrcweir                 Use to parse the node to a string.
293cdf0e10cSrcweir             @param  _pEntry
294*07a3d7f1SPedro Giffuni                 The entry which will contain the necessary entries.
295cdf0e10cSrcweir             @param  _bListAction
296cdf0e10cSrcweir                 Will be set to <TRUE/> when we are in a list action otherwise <FALSE/>
297cdf0e10cSrcweir             @return
298*07a3d7f1SPedro Giffuni                 <TRUE/> if an error occurred otherwise <FALSE/>
299cdf0e10cSrcweir         */
300cdf0e10cSrcweir         sal_Bool        fillColumnRef(  const ::connectivity::OSQLParseNode* _pColumnRef,
301cdf0e10cSrcweir                                         const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection,
302cdf0e10cSrcweir                                         OTableFieldDescRef& _pEntry,
303cdf0e10cSrcweir                                         sal_Bool& _bListAction);
304cdf0e10cSrcweir         sal_Bool        fillColumnRef(  const ::rtl::OUString& _sColumnName,
305cdf0e10cSrcweir                                         const ::rtl::OUString& _sTableRange,
306cdf0e10cSrcweir                                         const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData >& _xMetaData,
307cdf0e10cSrcweir                                         OTableFieldDescRef& _pEntry,
308cdf0e10cSrcweir                                         sal_Bool& _bListAction);
309cdf0e10cSrcweir 
310cdf0e10cSrcweir 
311cdf0e10cSrcweir         /** append an undo action for the table field
312cdf0e10cSrcweir             @param  _sOldAlias
313cdf0e10cSrcweir                 The old table alias.
314cdf0e10cSrcweir             @param  _sAlias
315cdf0e10cSrcweir                 The new alias name.
316cdf0e10cSrcweir             @param  _bListAction
317cdf0e10cSrcweir                 Will be set to <TRUE/> when we are in a list action otherwise <FALSE/>
318cdf0e10cSrcweir         */
319cdf0e10cSrcweir         void            notifyTableFieldChanged(const String& _sOldAlias,const String& _sAlias,sal_Bool& _bListAction,sal_uInt16 _nColumnId);
320cdf0e10cSrcweir 
321cdf0e10cSrcweir         /** append an undo action for the function field
322cdf0e10cSrcweir             @param  _sOldFunctionName
323cdf0e10cSrcweir                 The old value.
324cdf0e10cSrcweir             @param  _sFunctionName
325cdf0e10cSrcweir                 The new function name.
326cdf0e10cSrcweir             @param  _bListAction
327cdf0e10cSrcweir                 Will be set to <TRUE/> when we are in a list action otherwise <FALSE/>
328cdf0e10cSrcweir         */
329cdf0e10cSrcweir         void            notifyFunctionFieldChanged(const String& _sOldFunctionName,const String& _sFunctionName,sal_Bool& _bListAction,sal_uInt16 _nColumnId);
330cdf0e10cSrcweir 
331cdf0e10cSrcweir         /** clears the function fields of the submitted entry if it doesn't match the SQL standard and append an undo action.
332cdf0e10cSrcweir             E.q. AGGREGATE functions are only valid when the field name isn't an asterix
333cdf0e10cSrcweir             @param  _sFieldName
334cdf0e10cSrcweir                 The field name.
335cdf0e10cSrcweir             @param  _pEntry
336cdf0e10cSrcweir                 The entry to be cleared
337cdf0e10cSrcweir             @param  _bListAction
338cdf0e10cSrcweir                 When <TRUE/> an list action will be created.
339cdf0e10cSrcweir         */
340cdf0e10cSrcweir         void            clearEntryFunctionField(const String& _sFieldName,OTableFieldDescRef& _pEntry,sal_Bool& _bListAction,sal_uInt16 _nColumnId);
341cdf0e10cSrcweir 
342cdf0e10cSrcweir         /** remove or insert the necessary function types
343cdf0e10cSrcweir             @param  _pEntry
344cdf0e10cSrcweir                 The currently edited entry.
345cdf0e10cSrcweir         */
346cdf0e10cSrcweir         void            setFunctionCell(OTableFieldDescRef& _pEntry);
347cdf0e10cSrcweir 
348cdf0e10cSrcweir     private:
349cdf0e10cSrcweir         using ::svt::EditBrowseBox::AcceptDrop;
350cdf0e10cSrcweir         using ::svt::EditBrowseBox::ExecuteDrop;
351cdf0e10cSrcweir         using ::svt::EditBrowseBox::MouseButtonDown;
352cdf0e10cSrcweir         using ::svt::EditBrowseBox::MouseButtonUp;
353cdf0e10cSrcweir     };
354cdf0e10cSrcweir }
355cdf0e10cSrcweir #endif // DBAUI_QUERYDESIGN_OSELECTIONBROWSEBOX_HXX
356