xref: /trunk/main/dbaccess/source/ui/app/AppDetailPageHelper.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_APPDETAILPAGEHELPER_HXX
24cdf0e10cSrcweir #define DBAUI_APPDETAILPAGEHELPER_HXX
25cdf0e10cSrcweir 
26cdf0e10cSrcweir #include <vector>
27cdf0e10cSrcweir 
28cdf0e10cSrcweir #ifndef _RTL_USTRING_HXX_
29cdf0e10cSrcweir #include <rtl/ustring.hxx>
30cdf0e10cSrcweir #endif
31cdf0e10cSrcweir #ifndef _COM_SUN_STAR_SDBC_XDATABASEMETADATA_HPP_
32cdf0e10cSrcweir #include <com/sun/star/sdbc/XDatabaseMetaData.hpp>
33cdf0e10cSrcweir #endif
34cdf0e10cSrcweir #ifndef _COM_SUN_STAR_SDB_APPLICATION_NAMEDDATABASEOBJECT_HPP_
35cdf0e10cSrcweir #include <com/sun/star/sdb/application/NamedDatabaseObject.hpp>
36cdf0e10cSrcweir #endif
37cdf0e10cSrcweir #ifndef _COM_SUN_STAR_UCB_XCONTENT_HPP_
38cdf0e10cSrcweir #include <com/sun/star/ucb/XContent.hpp>
39cdf0e10cSrcweir #endif
40cdf0e10cSrcweir #ifndef DBAUI_APPELEMENTTYPE_HXX
41cdf0e10cSrcweir #include "AppElementType.hxx"
42cdf0e10cSrcweir #endif
43cdf0e10cSrcweir #ifndef _SVTREEBOX_HXX
44cdf0e10cSrcweir #include <svtools/svtreebx.hxx>
45cdf0e10cSrcweir #endif
46cdf0e10cSrcweir #ifndef SVTOOLS_DOCUMENTINFOPREVIEW_HXX
47cdf0e10cSrcweir #include <svtools/DocumentInfoPreview.hxx>
48cdf0e10cSrcweir #endif
49cdf0e10cSrcweir #ifndef _SV_FIXED_HXX
50cdf0e10cSrcweir #include <vcl/fixed.hxx>
51cdf0e10cSrcweir #endif
52cdf0e10cSrcweir #ifndef _SV_TOOLBOX_HXX
53cdf0e10cSrcweir #include <vcl/toolbox.hxx>
54cdf0e10cSrcweir #endif
55cdf0e10cSrcweir #ifndef _SV_CVTGRF_HXX
56cdf0e10cSrcweir #include <vcl/cvtgrf.hxx>
57cdf0e10cSrcweir #endif
58cdf0e10cSrcweir #ifndef _SV_GRAPH_HXX
59cdf0e10cSrcweir #include <vcl/graph.hxx>
60cdf0e10cSrcweir #endif
61cdf0e10cSrcweir #ifndef _GRFMGR_HXX
62cdf0e10cSrcweir #include <svtools/grfmgr.hxx>
63cdf0e10cSrcweir #endif
64cdf0e10cSrcweir #include "callbacks.hxx"
65cdf0e10cSrcweir #include <memory>
66cdf0e10cSrcweir 
67cdf0e10cSrcweir namespace com{ namespace sun { namespace star { namespace awt   { class XWindow; } } } }
68cdf0e10cSrcweir namespace com{ namespace sun { namespace star { namespace frame { class XFrame; } } } }
69cdf0e10cSrcweir namespace com{ namespace sun { namespace star { namespace io    { class XPersist; } } } }
70cdf0e10cSrcweir 
71cdf0e10cSrcweir #define ELEMENT_COUNT   size_t(E_ELEMENT_TYPE_COUNT)
72cdf0e10cSrcweir 
73cdf0e10cSrcweir namespace dbaui
74cdf0e10cSrcweir {
75cdf0e10cSrcweir     class OAppBorderWindow;
76cdf0e10cSrcweir     class DBTreeListBox;
77cdf0e10cSrcweir 
78cdf0e10cSrcweir     class OPreviewWindow : public Window
79cdf0e10cSrcweir     {
80cdf0e10cSrcweir         GraphicObject       m_aGraphicObj;
81cdf0e10cSrcweir         Rectangle           m_aPreviewRect;
82cdf0e10cSrcweir 
83cdf0e10cSrcweir         /** gets the graphic cnter rect
84cdf0e10cSrcweir             @param  rGraphic
85cdf0e10cSrcweir                 the graphic
86cdf0e10cSrcweir             @param  rResultRect
87cdf0e10cSrcweir                 the resulting rectangle
88cdf0e10cSrcweir 
89cdf0e10cSrcweir             @return
90*07a3d7f1SPedro Giffuni                 <TRUE/> when successful
91cdf0e10cSrcweir         */
92cdf0e10cSrcweir         sal_Bool ImplGetGraphicCenterRect( const Graphic& rGraphic, Rectangle& rResultRect ) const;
93cdf0e10cSrcweir         void ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground );
94cdf0e10cSrcweir     protected:
95cdf0e10cSrcweir         virtual void DataChanged(const DataChangedEvent& rDCEvt);
96cdf0e10cSrcweir     public:
97cdf0e10cSrcweir         OPreviewWindow(Window* _pParent);
98cdf0e10cSrcweir 
99cdf0e10cSrcweir         // window overloads
100cdf0e10cSrcweir         virtual void Paint(const Rectangle& rRect);
101cdf0e10cSrcweir 
setGraphic(const Graphic & _rGraphic)102cdf0e10cSrcweir         void setGraphic(const Graphic& _rGraphic ) { m_aGraphicObj.SetGraphic(_rGraphic); }
103cdf0e10cSrcweir     };
104cdf0e10cSrcweir     //==================================================================
105cdf0e10cSrcweir     // A helper class for the controls in the detail page.
106cdf0e10cSrcweir     // Combines general functionality.
107cdf0e10cSrcweir     //==================================================================
108cdf0e10cSrcweir     class OAppDetailPageHelper : public Window
109cdf0e10cSrcweir     {
110cdf0e10cSrcweir         DBTreeListBox*      m_pLists[ELEMENT_COUNT];
111cdf0e10cSrcweir         OAppBorderWindow&   m_rBorderWin;
112cdf0e10cSrcweir         FixedLine           m_aFL;
113cdf0e10cSrcweir         ToolBox             m_aTBPreview;
114cdf0e10cSrcweir         Window              m_aBorder;
115cdf0e10cSrcweir         OPreviewWindow      m_aPreview;
116cdf0e10cSrcweir         ::svtools::ODocumentInfoPreview
117cdf0e10cSrcweir                             m_aDocumentInfo;
118cdf0e10cSrcweir         Window*             m_pTablePreview;
119cdf0e10cSrcweir         ::std::auto_ptr<PopupMenu> m_aMenu;
120cdf0e10cSrcweir         PreviewMode         m_ePreviewMode;
121cdf0e10cSrcweir         ::com::sun::star::uno::Reference < ::com::sun::star::frame::XFrame >
122cdf0e10cSrcweir                             m_xFrame;
123cdf0e10cSrcweir         ::com::sun::star::uno::Reference < ::com::sun::star::io::XPersist >
124cdf0e10cSrcweir                             m_xDocInfo;
125cdf0e10cSrcweir         ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >
126cdf0e10cSrcweir                             m_xWindow;
127cdf0e10cSrcweir 
128cdf0e10cSrcweir         /// returns the index of the visible control
129cdf0e10cSrcweir         int getVisibleControlIndex() const;
130cdf0e10cSrcweir 
131cdf0e10cSrcweir         /** sorts the entries in the tree list box.
132cdf0e10cSrcweir             @param  _nPos
133cdf0e10cSrcweir                 Which list should be sorted.
134cdf0e10cSrcweir             @param  _eSortMode
135cdf0e10cSrcweir                 How should be sorted.
136cdf0e10cSrcweir         */
137cdf0e10cSrcweir         void sort(int _nPos,SvSortMode _eSortMode );
138cdf0e10cSrcweir 
139cdf0e10cSrcweir         /** retrieves the resource ids of the images representing elements of the given type
140cdf0e10cSrcweir         */
141cdf0e10cSrcweir         void getElementIcons( ElementType _eType, sal_uInt16& _rImageId, sal_uInt16& _rHighContrastImageId );
142cdf0e10cSrcweir 
143cdf0e10cSrcweir         /** fills the names in the listbox
144cdf0e10cSrcweir             @param  _xContainer
145cdf0e10cSrcweir                 This can either be the queries, forms or report names.
146cdf0e10cSrcweir             @param  _eType
147cdf0e10cSrcweir                 the type of elements which are being filled
148cdf0e10cSrcweir             @param _nImageId
149cdf0e10cSrcweir                 the resource id of the image to use for non-container entries
150cdf0e10cSrcweir             @param _nHighContrastImageId
151cdf0e10cSrcweir                 the resource id of the high contrast image to use for non-container entries
152cdf0e10cSrcweir             @param  _pParent
153cdf0e10cSrcweir                 The parent of the entries to be inserted.
154cdf0e10cSrcweir         */
155cdf0e10cSrcweir         void fillNames( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& _xContainer,
156cdf0e10cSrcweir                         const ElementType _eType,
157cdf0e10cSrcweir                         const sal_uInt16 _nImageId,
158cdf0e10cSrcweir                         const sal_uInt16 _nHighContrastImageId,
159cdf0e10cSrcweir                         SvLBoxEntry* _pParent );
160cdf0e10cSrcweir 
161cdf0e10cSrcweir         /** sets the detail page
162cdf0e10cSrcweir             @param  _pWindow
163cdf0e10cSrcweir                 The control which should be visible.
164cdf0e10cSrcweir         */
165cdf0e10cSrcweir         void setDetailPage(Window* _pWindow);
166cdf0e10cSrcweir 
167cdf0e10cSrcweir         /** sets all HandleCallbacks
168cdf0e10cSrcweir             @param  _pTreeView
169cdf0e10cSrcweir                 The newly created DBTreeListBox
170cdf0e10cSrcweir             @param  _rImage
171cdf0e10cSrcweir                 the resource id of the default icon
172cdf0e10cSrcweir             @param  _rImageHC
173cdf0e10cSrcweir                 the resource id of the default icon (HC version)
174cdf0e10cSrcweir             @return
175cdf0e10cSrcweir                 The new tree.
176cdf0e10cSrcweir         */
177cdf0e10cSrcweir         DBTreeListBox* createTree( DBTreeListBox* _pTreeView, const Image& _rImage, const Image& _rImageHC );
178cdf0e10cSrcweir 
179cdf0e10cSrcweir         /** creates the tree and sets all HandleCallbacks
180cdf0e10cSrcweir             @param  _nHelpId
181cdf0e10cSrcweir                 The help id of the control
182cdf0e10cSrcweir             @param  _nCollapsedBitmap
183cdf0e10cSrcweir                 The image to use for tree entries.
184cdf0e10cSrcweir             @param  _rImageHC
185cdf0e10cSrcweir                 The image to use in high contrast mode.
186cdf0e10cSrcweir             @return
187cdf0e10cSrcweir                 The new tree.
188cdf0e10cSrcweir         */
189cdf0e10cSrcweir         DBTreeListBox* createSimpleTree( const rtl::OString& _sHelpId, const Image& _rImage, const Image& _rImageHC );
190cdf0e10cSrcweir 
191cdf0e10cSrcweir         DECL_LINK( OnEntryDoubleClick,          SvTreeListBox* );
192cdf0e10cSrcweir         DECL_LINK( OnEntrySelChange,            void* );
193cdf0e10cSrcweir 
194cdf0e10cSrcweir         DECL_LINK( OnCutEntry,                  void* );
195cdf0e10cSrcweir         DECL_LINK( OnCopyEntry,                 void* );
196cdf0e10cSrcweir         DECL_LINK( OnPasteEntry,                void* );
197cdf0e10cSrcweir         DECL_LINK( OnDeleteEntry,               void* );
198cdf0e10cSrcweir 
199cdf0e10cSrcweir         DECL_LINK(PreviewChangeHdl, void*);
200cdf0e10cSrcweir         // click a TB slot
201cdf0e10cSrcweir         DECL_LINK(OnDropdownClickHdl, ToolBox*);
202cdf0e10cSrcweir 
getBorderWin() const203cdf0e10cSrcweir         inline OAppBorderWindow& getBorderWin() const { return m_rBorderWin; }
204cdf0e10cSrcweir         void ImplInitSettings();
205cdf0e10cSrcweir 
206cdf0e10cSrcweir     public:
207cdf0e10cSrcweir         OAppDetailPageHelper(Window* _pParent,OAppBorderWindow& _rBorderWin,PreviewMode _ePreviewMode);
208cdf0e10cSrcweir         virtual ~OAppDetailPageHelper();
209cdf0e10cSrcweir 
210cdf0e10cSrcweir         // window overloads
211cdf0e10cSrcweir         virtual void Resize();
212cdf0e10cSrcweir         virtual void KeyInput( const KeyEvent& rKEvt );
213cdf0e10cSrcweir 
214cdf0e10cSrcweir         sal_Bool isCutAllowed();
215cdf0e10cSrcweir         sal_Bool isCopyAllowed();
216cdf0e10cSrcweir         sal_Bool isPasteAllowed();
217cdf0e10cSrcweir         void copy();
218cdf0e10cSrcweir         void cut();
219cdf0e10cSrcweir         void paste();
220cdf0e10cSrcweir 
221cdf0e10cSrcweir         /** creates the tables page
222cdf0e10cSrcweir             @param  _xConnection
223cdf0e10cSrcweir                 The connection to get the table names
224cdf0e10cSrcweir         */
225cdf0e10cSrcweir         void createTablesPage(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _xConnection);
226cdf0e10cSrcweir 
227cdf0e10cSrcweir         /** creates the page for the specific type.
228cdf0e10cSrcweir             @param  _eType
229cdf0e10cSrcweir                 The type which should be created. E_TABLE isn't allowed.
230cdf0e10cSrcweir             @param  _xContainer
231cdf0e10cSrcweir                 The container of the elements to be inserted.
232cdf0e10cSrcweir         */
233cdf0e10cSrcweir         void createPage(ElementType _eType,const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& _xContainer);
234cdf0e10cSrcweir 
235cdf0e10cSrcweir         /** returns the current visible tree list box
236cdf0e10cSrcweir         */
getCurrentView() const237cdf0e10cSrcweir         inline DBTreeListBox* getCurrentView() const
238cdf0e10cSrcweir         {
239cdf0e10cSrcweir             ElementType eType = getElementType();
240cdf0e10cSrcweir             return (eType != E_NONE ) ? m_pLists[static_cast<sal_Int32>(eType)] : NULL;
241cdf0e10cSrcweir         }
242cdf0e10cSrcweir 
243cdf0e10cSrcweir         /// select all entries in the visible control
244cdf0e10cSrcweir         void selectAll();
245cdf0e10cSrcweir 
246cdf0e10cSrcweir         /// returns <TRUE/> if it sorts ascending
247cdf0e10cSrcweir         sal_Bool isSortUp() const;
248cdf0e10cSrcweir 
249cdf0e10cSrcweir         /// sorts all entries ascending
250cdf0e10cSrcweir         void sortDown();
251cdf0e10cSrcweir 
252cdf0e10cSrcweir         /// sorts all entries descending
253cdf0e10cSrcweir         void sortUp();
254cdf0e10cSrcweir 
255cdf0e10cSrcweir         /** returns the element names which are selected
256cdf0e10cSrcweir             @param  _rNames
257cdf0e10cSrcweir                 The list will be filled.
258cdf0e10cSrcweir         */
259cdf0e10cSrcweir         void getSelectionElementNames( ::std::vector< ::rtl::OUString>& _rNames ) const;
260cdf0e10cSrcweir 
261cdf0e10cSrcweir         /** describes the current selection for the given control
262cdf0e10cSrcweir         */
263cdf0e10cSrcweir         void    describeCurrentSelectionForControl(
264cdf0e10cSrcweir                     const Control& _rControl,
265cdf0e10cSrcweir                     ::com::sun::star::uno::Sequence< ::com::sun::star::sdb::application::NamedDatabaseObject >& _out_rSelectedObjects
266cdf0e10cSrcweir                 );
267cdf0e10cSrcweir 
268cdf0e10cSrcweir         /** describes the current selection for the given ElementType
269cdf0e10cSrcweir         */
270cdf0e10cSrcweir         void    describeCurrentSelectionForType(
271cdf0e10cSrcweir                     const ElementType _eType,
272cdf0e10cSrcweir                     ::com::sun::star::uno::Sequence< ::com::sun::star::sdb::application::NamedDatabaseObject >& _out_rSelectedObjects
273cdf0e10cSrcweir                 );
274cdf0e10cSrcweir 
275cdf0e10cSrcweir         /** select all names on the currently selected container. Non existence names where ignored.
276cdf0e10cSrcweir         *
277cdf0e10cSrcweir         * \param _aNames the element names
278cdf0e10cSrcweir         */
279cdf0e10cSrcweir         void selectElements(const ::com::sun::star::uno::Sequence< ::rtl::OUString>& _aNames);
280cdf0e10cSrcweir 
281cdf0e10cSrcweir         /** return the qualified name.
282cdf0e10cSrcweir             @param  _pEntry
283cdf0e10cSrcweir                 The entry of a table, or query, form, report to get the qualified name.
284cdf0e10cSrcweir                 If the entry is <NULL/>, the first selected is chosen.
285cdf0e10cSrcweir             @return
286cdf0e10cSrcweir                 the qualified name
287cdf0e10cSrcweir         */
288cdf0e10cSrcweir         ::rtl::OUString getQualifiedName( SvLBoxEntry* _pEntry ) const;
289cdf0e10cSrcweir 
290cdf0e10cSrcweir         /// return the element of currently select entry
291cdf0e10cSrcweir         ElementType getElementType() const;
292cdf0e10cSrcweir 
293cdf0e10cSrcweir         /// returns the count of selected entries
294cdf0e10cSrcweir         sal_Int32 getSelectionCount();
295cdf0e10cSrcweir 
296cdf0e10cSrcweir         /// returns the count of entries
297cdf0e10cSrcweir         sal_Int32 getElementCount();
298cdf0e10cSrcweir 
299cdf0e10cSrcweir         /** returns if an entry is a leaf
300cdf0e10cSrcweir             @param _pEntry
301cdf0e10cSrcweir                 The entry to check
302cdf0e10cSrcweir             @return
303cdf0e10cSrcweir                 <TRUE/> if the entry is a leaf, otherwise <FALSE/>
304cdf0e10cSrcweir         */
305cdf0e10cSrcweir         bool    isLeaf(SvLBoxEntry* _pEntry) const;
306cdf0e10cSrcweir 
307cdf0e10cSrcweir         /** returns if one of the selected entries is a leaf
308cdf0e10cSrcweir             @return
309cdf0e10cSrcweir                 <TRUE/> if the entry is a leaf, otherwise <FALSE/>
310cdf0e10cSrcweir         */
311cdf0e10cSrcweir         sal_Bool isALeafSelected() const;
312cdf0e10cSrcweir 
313cdf0e10cSrcweir         SvLBoxEntry* getEntry( const Point& _aPosPixel ) const;
314cdf0e10cSrcweir 
315cdf0e10cSrcweir         /// clears the detail pages
316cdf0e10cSrcweir         void clearPages();
317cdf0e10cSrcweir 
318cdf0e10cSrcweir         /// returns <TRUE/> when a detail page was filled
319cdf0e10cSrcweir         sal_Bool isFilled() const;
320cdf0e10cSrcweir 
321cdf0e10cSrcweir         /** adds a new object to the detail page.
322cdf0e10cSrcweir             @param  _eType
323cdf0e10cSrcweir                 The type where the entry shold be appended.
324cdf0e10cSrcweir             @param  _rName
325cdf0e10cSrcweir                 The name of the object to be inserted
326cdf0e10cSrcweir             @param  _rObject
327cdf0e10cSrcweir                 The object to add.
328cdf0e10cSrcweir             @param  _rxConn
329cdf0e10cSrcweir                 If we insert a table, the connection must be set.
330cdf0e10cSrcweir         */
331cdf0e10cSrcweir         SvLBoxEntry*  elementAdded(ElementType eType
332cdf0e10cSrcweir                         ,const ::rtl::OUString& _rName
333cdf0e10cSrcweir                         ,const ::com::sun::star::uno::Any& _rObject );
334cdf0e10cSrcweir 
335cdf0e10cSrcweir         /** replaces a objects name with a new one
336cdf0e10cSrcweir             @param  _eType
337cdf0e10cSrcweir                 The type where the entry shold be appended.
338cdf0e10cSrcweir             @param  _rOldName
339cdf0e10cSrcweir                 The old name of the object to be replaced
340cdf0e10cSrcweir             @param  _rNewName
341cdf0e10cSrcweir                 The new name of the object to be replaced
342cdf0e10cSrcweir             @param  _rxConn
343cdf0e10cSrcweir                 If we insert a table, the connection must be set.
344cdf0e10cSrcweir         */
345cdf0e10cSrcweir         void elementReplaced(ElementType eType
346cdf0e10cSrcweir                         ,const ::rtl::OUString& _rOldName
347cdf0e10cSrcweir                         ,const ::rtl::OUString& _rNewName );
348cdf0e10cSrcweir 
349cdf0e10cSrcweir         /** removes an element from the detail page.
350cdf0e10cSrcweir             @param  _eType
351cdf0e10cSrcweir                 The type where the entry shold be appended.
352cdf0e10cSrcweir             @param  _rName
353cdf0e10cSrcweir                 The name of the element to be removed.
354cdf0e10cSrcweir             @param  _rxConn
355cdf0e10cSrcweir                 If we remove a table, the connection must be set.
356cdf0e10cSrcweir         */
357cdf0e10cSrcweir         void elementRemoved(ElementType _eType
358cdf0e10cSrcweir                             ,const ::rtl::OUString& _rName );
359cdf0e10cSrcweir 
360cdf0e10cSrcweir 
361cdf0e10cSrcweir         /// returns the preview mode
362cdf0e10cSrcweir         PreviewMode getPreviewMode();
363cdf0e10cSrcweir 
364cdf0e10cSrcweir         /// <TRUE/> if the preview is enabled
365cdf0e10cSrcweir         sal_Bool isPreviewEnabled();
366cdf0e10cSrcweir 
367cdf0e10cSrcweir         /** switches to the given preview mode
368cdf0e10cSrcweir             @param  _eMode
369cdf0e10cSrcweir                 the mode to set for the preview
370cdf0e10cSrcweir             @param  _bForce
371cdf0e10cSrcweir                 Force the preview to be resetted
372cdf0e10cSrcweir         */
373cdf0e10cSrcweir         void switchPreview(PreviewMode _eMode,sal_Bool _bForce = sal_False);
374cdf0e10cSrcweir 
375cdf0e10cSrcweir         /** shows the Preview of the content when it is enabled.
376cdf0e10cSrcweir             @param  _xContent
377cdf0e10cSrcweir                 The content which must support the "preview" command.
378cdf0e10cSrcweir         */
379cdf0e10cSrcweir         void showPreview(const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContent >& _xContent);
380cdf0e10cSrcweir 
381cdf0e10cSrcweir         /** shows the Preview of a table or query
382cdf0e10cSrcweir             @param  _sDataSourceName
383cdf0e10cSrcweir                 the name of the data source
384cdf0e10cSrcweir             @param  _sName
385cdf0e10cSrcweir                 the name of table or query
386cdf0e10cSrcweir             @param  _bTable
387cdf0e10cSrcweir                 <TRUE/> if it is a table, otherwise <FALSE/>
388cdf0e10cSrcweir             @return void
389cdf0e10cSrcweir         */
390cdf0e10cSrcweir         void showPreview(   const ::rtl::OUString& _sDataSourceName,
391cdf0e10cSrcweir                             const ::rtl::OUString& _sName,
392cdf0e10cSrcweir                             sal_Bool _bTable);
393cdf0e10cSrcweir 
394cdf0e10cSrcweir     protected:
395cdf0e10cSrcweir         void DataChanged( const DataChangedEvent& rDCEvt );
396cdf0e10cSrcweir     };
397cdf0e10cSrcweir }
398cdf0e10cSrcweir #endif // DBAUI_APPDETAILPAGEHELPER_HXX
399