xref: /AOO41X/main/dbaccess/source/ui/app/AppDetailView.cxx (revision cdf0e10c4e3984b49a9502b011690b615761d4a3)
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_dbaccess.hxx"
30*cdf0e10cSrcweir #ifndef DBAUI_APPDETAILVIEW_HXX
31*cdf0e10cSrcweir #include "AppDetailView.hxx"
32*cdf0e10cSrcweir #endif
33*cdf0e10cSrcweir #ifndef _TOOLS_DEBUG_HXX
34*cdf0e10cSrcweir #include <tools/debug.hxx>
35*cdf0e10cSrcweir #endif
36*cdf0e10cSrcweir #ifndef _DBA_DBACCESS_HELPID_HRC_
37*cdf0e10cSrcweir #include "dbaccess_helpid.hrc"
38*cdf0e10cSrcweir #endif
39*cdf0e10cSrcweir #ifndef _DBU_APP_HRC_
40*cdf0e10cSrcweir #include "dbu_app.hrc"
41*cdf0e10cSrcweir #endif
42*cdf0e10cSrcweir #ifndef DBAUI_APPVIEW_HXX
43*cdf0e10cSrcweir #include "AppView.hxx"
44*cdf0e10cSrcweir #endif
45*cdf0e10cSrcweir #ifndef _COM_SUN_STAR_UI_XUICONFIGURATIONMANAGER_HPP_
46*cdf0e10cSrcweir #include <com/sun/star/ui/XUIConfigurationManager.hpp>
47*cdf0e10cSrcweir #endif
48*cdf0e10cSrcweir #ifndef _COM_SUN_STAR_UI_XMODULEUICONFIGURATIONMANAGERSUPPLIER_HPP_
49*cdf0e10cSrcweir #include <com/sun/star/ui/XModuleUIConfigurationManagerSupplier.hpp>
50*cdf0e10cSrcweir #endif
51*cdf0e10cSrcweir #ifndef _COM_SUN_STAR_UI_XIMAGEMANAGER_HPP_
52*cdf0e10cSrcweir #include <com/sun/star/ui/XImageManager.hpp>
53*cdf0e10cSrcweir #endif
54*cdf0e10cSrcweir #ifndef _COM_SUN_STAR_UI_IMAGETYPE_HPP_
55*cdf0e10cSrcweir #include <com/sun/star/ui/ImageType.hpp>
56*cdf0e10cSrcweir #endif
57*cdf0e10cSrcweir #ifndef _COM_SUN_STAR_SDBCX_XVIEWSSUPPLIER_HPP_
58*cdf0e10cSrcweir #include <com/sun/star/sdbcx/XViewsSupplier.hpp>
59*cdf0e10cSrcweir #endif
60*cdf0e10cSrcweir #ifndef _COM_SUN_STAR_GRAPHIC_XGRAPHIC_HPP_
61*cdf0e10cSrcweir #include <com/sun/star/graphic/XGraphic.hpp>
62*cdf0e10cSrcweir #endif
63*cdf0e10cSrcweir #ifndef _COM_SUN_STAR_UTIL_URL_HPP_
64*cdf0e10cSrcweir #include <com/sun/star/util/URL.hpp>
65*cdf0e10cSrcweir #endif
66*cdf0e10cSrcweir #ifndef _DBAUI_LISTVIEWITEMS_HXX_
67*cdf0e10cSrcweir #include "listviewitems.hxx"
68*cdf0e10cSrcweir #endif
69*cdf0e10cSrcweir #ifndef _IMAGE_HXX //autogen
70*cdf0e10cSrcweir #include <vcl/image.hxx>
71*cdf0e10cSrcweir #endif
72*cdf0e10cSrcweir #ifndef _SV_MNEMONIC_HXX
73*cdf0e10cSrcweir #include <vcl/mnemonic.hxx>
74*cdf0e10cSrcweir #endif
75*cdf0e10cSrcweir #ifndef _SV_MNEMONIC_HXX
76*cdf0e10cSrcweir #include <vcl/mnemonic.hxx>
77*cdf0e10cSrcweir #endif
78*cdf0e10cSrcweir #ifndef DBACCESS_UI_BROWSER_ID_HXX
79*cdf0e10cSrcweir #include "browserids.hxx"
80*cdf0e10cSrcweir #endif
81*cdf0e10cSrcweir #ifndef DBAUI_APPDETAILPAGEHELPER_HXX
82*cdf0e10cSrcweir #include "AppDetailPageHelper.hxx"
83*cdf0e10cSrcweir #endif
84*cdf0e10cSrcweir #ifndef _SV_SVAPP_HXX //autogen
85*cdf0e10cSrcweir #include <vcl/svapp.hxx>
86*cdf0e10cSrcweir #endif
87*cdf0e10cSrcweir #ifndef _DBACCESS_UI_CALLBACKS_HXX_
88*cdf0e10cSrcweir #include "callbacks.hxx"
89*cdf0e10cSrcweir #endif
90*cdf0e10cSrcweir #ifndef DBAUI_ICONTROLLER_HXX
91*cdf0e10cSrcweir #include "IController.hxx"
92*cdf0e10cSrcweir #endif
93*cdf0e10cSrcweir #ifndef _DBAUI_MODULE_DBU_HXX_
94*cdf0e10cSrcweir #include "moduledbu.hxx"
95*cdf0e10cSrcweir #endif
96*cdf0e10cSrcweir #ifndef _SVTOOLS_LOCALRESACCESS_HXX_
97*cdf0e10cSrcweir #include <svtools/localresaccess.hxx>
98*cdf0e10cSrcweir #endif
99*cdf0e10cSrcweir #include <algorithm>
100*cdf0e10cSrcweir #include "dbtreelistbox.hxx"
101*cdf0e10cSrcweir #include "IApplicationController.hxx"
102*cdf0e10cSrcweir #include "imageprovider.hxx"
103*cdf0e10cSrcweir 
104*cdf0e10cSrcweir using namespace ::dbaui;
105*cdf0e10cSrcweir using namespace ::com::sun::star::uno;
106*cdf0e10cSrcweir using namespace ::com::sun::star::sdbc;
107*cdf0e10cSrcweir using namespace ::com::sun::star::sdbcx;
108*cdf0e10cSrcweir using namespace ::com::sun::star::lang;
109*cdf0e10cSrcweir using namespace ::com::sun::star::ucb;
110*cdf0e10cSrcweir using namespace ::com::sun::star::graphic;
111*cdf0e10cSrcweir using namespace ::com::sun::star::ui;
112*cdf0e10cSrcweir using namespace ::com::sun::star::container;
113*cdf0e10cSrcweir using namespace ::com::sun::star::beans;
114*cdf0e10cSrcweir using ::com::sun::star::util::URL;
115*cdf0e10cSrcweir using ::com::sun::star::sdb::application::NamedDatabaseObject;
116*cdf0e10cSrcweir 
117*cdf0e10cSrcweir #define SPACEBETWEENENTRIES		4
118*cdf0e10cSrcweir 
119*cdf0e10cSrcweir // -----------------------------------------------------------------------------
120*cdf0e10cSrcweir TaskEntry::TaskEntry( const sal_Char* _pAsciiUNOCommand, sal_uInt16 _nHelpID, sal_uInt16 _nTitleResourceID, bool _bHideWhenDisabled )
121*cdf0e10cSrcweir     :sUNOCommand( ::rtl::OUString::createFromAscii( _pAsciiUNOCommand ) )
122*cdf0e10cSrcweir     ,nHelpID( _nHelpID )
123*cdf0e10cSrcweir     ,sTitle( ModuleRes( _nTitleResourceID ) )
124*cdf0e10cSrcweir     ,bHideWhenDisabled( _bHideWhenDisabled )
125*cdf0e10cSrcweir {
126*cdf0e10cSrcweir }
127*cdf0e10cSrcweir 
128*cdf0e10cSrcweir // -----------------------------------------------------------------------------
129*cdf0e10cSrcweir OCreationList::OCreationList( OTasksWindow& _rParent )
130*cdf0e10cSrcweir     :SvTreeListBox( &_rParent, WB_TABSTOP | WB_HASBUTTONSATROOT | WB_HASBUTTONS )
131*cdf0e10cSrcweir     ,m_rTaskWindow( _rParent )
132*cdf0e10cSrcweir     ,m_pMouseDownEntry( NULL )
133*cdf0e10cSrcweir     ,m_pLastActiveEntry( NULL )
134*cdf0e10cSrcweir {
135*cdf0e10cSrcweir 	sal_uInt16 nSize = SPACEBETWEENENTRIES;
136*cdf0e10cSrcweir 	SetSpaceBetweenEntries(nSize);
137*cdf0e10cSrcweir     SetSelectionMode( NO_SELECTION );
138*cdf0e10cSrcweir     SetExtendedWinBits( EWB_NO_AUTO_CURENTRY );
139*cdf0e10cSrcweir     SetNodeDefaultImages( );
140*cdf0e10cSrcweir     EnableEntryMnemonics();
141*cdf0e10cSrcweir }
142*cdf0e10cSrcweir // -----------------------------------------------------------------------------
143*cdf0e10cSrcweir void OCreationList::Paint( const Rectangle& _rRect )
144*cdf0e10cSrcweir {
145*cdf0e10cSrcweir     if ( m_pMouseDownEntry )
146*cdf0e10cSrcweir         m_aOriginalFont = GetFont();
147*cdf0e10cSrcweir 
148*cdf0e10cSrcweir     m_aOriginalBackgroundColor = GetBackground().GetColor();
149*cdf0e10cSrcweir     SvTreeListBox::Paint( _rRect );
150*cdf0e10cSrcweir     SetBackground( m_aOriginalBackgroundColor );
151*cdf0e10cSrcweir 
152*cdf0e10cSrcweir     if ( m_pMouseDownEntry )
153*cdf0e10cSrcweir         Control::SetFont( m_aOriginalFont );
154*cdf0e10cSrcweir }
155*cdf0e10cSrcweir 
156*cdf0e10cSrcweir // -----------------------------------------------------------------------------
157*cdf0e10cSrcweir void OCreationList::PreparePaint( SvLBoxEntry* _pEntry )
158*cdf0e10cSrcweir {
159*cdf0e10cSrcweir     Wallpaper aEntryBackground( m_aOriginalBackgroundColor );
160*cdf0e10cSrcweir     if ( _pEntry )
161*cdf0e10cSrcweir     {
162*cdf0e10cSrcweir         if ( _pEntry == GetCurEntry() )
163*cdf0e10cSrcweir         {
164*cdf0e10cSrcweir             // draw a selection background
165*cdf0e10cSrcweir             bool bIsMouseDownEntry = ( _pEntry == m_pMouseDownEntry );
166*cdf0e10cSrcweir             DrawSelectionBackground( GetBoundingRect( _pEntry ), bIsMouseDownEntry ? 1 : 2, sal_False, sal_True, sal_False );
167*cdf0e10cSrcweir 
168*cdf0e10cSrcweir             if ( bIsMouseDownEntry )
169*cdf0e10cSrcweir             {
170*cdf0e10cSrcweir 	            Font aFont( GetFont() );
171*cdf0e10cSrcweir 	            aFont.SetColor( GetSettings().GetStyleSettings().GetHighlightTextColor() );
172*cdf0e10cSrcweir                 Control::SetFont( aFont );
173*cdf0e10cSrcweir             }
174*cdf0e10cSrcweir 
175*cdf0e10cSrcweir             // and temporary set a transparent background, for all the other
176*cdf0e10cSrcweir             // paint operations the SvTreeListBox is going to do
177*cdf0e10cSrcweir             aEntryBackground = Wallpaper( Color( COL_TRANSPARENT ) );
178*cdf0e10cSrcweir         }
179*cdf0e10cSrcweir     }
180*cdf0e10cSrcweir 
181*cdf0e10cSrcweir     SetBackground( aEntryBackground );
182*cdf0e10cSrcweir }
183*cdf0e10cSrcweir 
184*cdf0e10cSrcweir // -----------------------------------------------------------------------------
185*cdf0e10cSrcweir void OCreationList::SelectSearchEntry( const void* _pEntry )
186*cdf0e10cSrcweir {
187*cdf0e10cSrcweir     SvLBoxEntry* pEntry = const_cast< SvLBoxEntry* >( static_cast< const SvLBoxEntry* >( _pEntry ) );
188*cdf0e10cSrcweir     DBG_ASSERT( pEntry, "OCreationList::SelectSearchEntry: invalid entry!" );
189*cdf0e10cSrcweir 
190*cdf0e10cSrcweir     if ( pEntry )
191*cdf0e10cSrcweir         setCurrentEntryInvalidate( pEntry );
192*cdf0e10cSrcweir 
193*cdf0e10cSrcweir     if ( !HasChildPathFocus() )
194*cdf0e10cSrcweir         GrabFocus();
195*cdf0e10cSrcweir }
196*cdf0e10cSrcweir 
197*cdf0e10cSrcweir // -----------------------------------------------------------------------------
198*cdf0e10cSrcweir void OCreationList::ExecuteSearchEntry( const void* _pEntry ) const
199*cdf0e10cSrcweir {
200*cdf0e10cSrcweir     SvLBoxEntry* pEntry = const_cast< SvLBoxEntry* >( static_cast< const SvLBoxEntry* >( _pEntry ) );
201*cdf0e10cSrcweir     DBG_ASSERT( pEntry, "OCreationList::ExecuteSearchEntry: invalid entry!" );
202*cdf0e10cSrcweir     DBG_ASSERT( pEntry == GetCurEntry(), "OCreationList::ExecuteSearchEntry: SelectSearchEntry should have been called before!" );
203*cdf0e10cSrcweir 
204*cdf0e10cSrcweir     if ( pEntry )
205*cdf0e10cSrcweir         onSelected( pEntry );
206*cdf0e10cSrcweir }
207*cdf0e10cSrcweir 
208*cdf0e10cSrcweir // -----------------------------------------------------------------------------
209*cdf0e10cSrcweir Rectangle OCreationList::GetFocusRect( SvLBoxEntry* _pEntry, long _nLine )
210*cdf0e10cSrcweir {
211*cdf0e10cSrcweir     Rectangle aRect = SvTreeListBox::GetFocusRect( _pEntry, _nLine );
212*cdf0e10cSrcweir     aRect.Left() = 0;
213*cdf0e10cSrcweir 
214*cdf0e10cSrcweir     // try to let the focus rect start before the bitmap item - this looks better
215*cdf0e10cSrcweir     SvLBoxItem* pBitmapItem = _pEntry->GetFirstItem( SV_ITEM_ID_LBOXCONTEXTBMP );
216*cdf0e10cSrcweir     SvLBoxTab* pTab = pBitmapItem ? GetTab( _pEntry, pBitmapItem ) : NULL;
217*cdf0e10cSrcweir     SvViewDataItem* pItemData = pBitmapItem ? GetViewDataItem( _pEntry, pBitmapItem ) : NULL;
218*cdf0e10cSrcweir     DBG_ASSERT( pTab && pItemData, "OCreationList::GetFocusRect: could not find the first bitmap item!" );
219*cdf0e10cSrcweir     if ( pTab && pItemData )
220*cdf0e10cSrcweir         aRect.Left() = pTab->GetPos() - pItemData->aSize.Width() / 2;
221*cdf0e10cSrcweir 
222*cdf0e10cSrcweir     // inflate the rectangle a little bit - looks better, too
223*cdf0e10cSrcweir     aRect.Left() = ::std::max< long >( 0, aRect.Left() - 2 );
224*cdf0e10cSrcweir     aRect.Right() = ::std::min< long >( GetOutputSizePixel().Width() - 1, aRect.Right() + 2 );
225*cdf0e10cSrcweir 
226*cdf0e10cSrcweir     return aRect;
227*cdf0e10cSrcweir }
228*cdf0e10cSrcweir // -----------------------------------------------------------------------------
229*cdf0e10cSrcweir void OCreationList::StartDrag( sal_Int8 /*_nAction*/, const Point& /*_rPosPixel*/ )
230*cdf0e10cSrcweir {
231*cdf0e10cSrcweir     // don't give this to the base class, it does a ReleaseMouse as very first action
232*cdf0e10cSrcweir     // Though I think this is a bug (it should ReleaseMouse only if it is going to do
233*cdf0e10cSrcweir     // something with the drag-event), I hesitate to fix it in the current state,
234*cdf0e10cSrcweir     // since I don't overlook the consequences, and we're close to 2.0 ...)
235*cdf0e10cSrcweir }
236*cdf0e10cSrcweir // -----------------------------------------------------------------------------
237*cdf0e10cSrcweir void OCreationList::ModelHasCleared()
238*cdf0e10cSrcweir {
239*cdf0e10cSrcweir     SvTreeListBox::ModelHasCleared();
240*cdf0e10cSrcweir     m_pLastActiveEntry = NULL;
241*cdf0e10cSrcweir     m_pMouseDownEntry = NULL;
242*cdf0e10cSrcweir }
243*cdf0e10cSrcweir // -----------------------------------------------------------------------------
244*cdf0e10cSrcweir void OCreationList::GetFocus()
245*cdf0e10cSrcweir {
246*cdf0e10cSrcweir     SvTreeListBox::GetFocus();
247*cdf0e10cSrcweir     if ( !GetCurEntry() )
248*cdf0e10cSrcweir         setCurrentEntryInvalidate( m_pLastActiveEntry ? m_pLastActiveEntry : GetFirstEntryInView() );
249*cdf0e10cSrcweir }
250*cdf0e10cSrcweir // -----------------------------------------------------------------------------
251*cdf0e10cSrcweir void OCreationList::LoseFocus()
252*cdf0e10cSrcweir {
253*cdf0e10cSrcweir     SvTreeListBox::LoseFocus();
254*cdf0e10cSrcweir     m_pLastActiveEntry = GetCurEntry();
255*cdf0e10cSrcweir     setCurrentEntryInvalidate( NULL );
256*cdf0e10cSrcweir }
257*cdf0e10cSrcweir // -----------------------------------------------------------------------------
258*cdf0e10cSrcweir void OCreationList::MouseButtonDown( const MouseEvent& rMEvt )
259*cdf0e10cSrcweir {
260*cdf0e10cSrcweir     SvTreeListBox::MouseButtonDown( rMEvt );
261*cdf0e10cSrcweir 
262*cdf0e10cSrcweir     DBG_ASSERT( !m_pMouseDownEntry, "OCreationList::MouseButtonDown: I missed some mouse event!" );
263*cdf0e10cSrcweir     m_pMouseDownEntry = GetCurEntry();
264*cdf0e10cSrcweir     if ( m_pMouseDownEntry )
265*cdf0e10cSrcweir     {
266*cdf0e10cSrcweir         InvalidateEntry( m_pMouseDownEntry );
267*cdf0e10cSrcweir         CaptureMouse();
268*cdf0e10cSrcweir     }
269*cdf0e10cSrcweir }
270*cdf0e10cSrcweir // -----------------------------------------------------------------------------
271*cdf0e10cSrcweir void OCreationList::MouseMove( const MouseEvent& rMEvt )
272*cdf0e10cSrcweir {
273*cdf0e10cSrcweir 	if ( rMEvt.IsLeaveWindow() )
274*cdf0e10cSrcweir     {
275*cdf0e10cSrcweir         setCurrentEntryInvalidate( NULL );
276*cdf0e10cSrcweir     }
277*cdf0e10cSrcweir 	else if ( !rMEvt.IsSynthetic() )
278*cdf0e10cSrcweir 	{
279*cdf0e10cSrcweir 		SvLBoxEntry* pEntry = GetEntry( rMEvt.GetPosPixel() );
280*cdf0e10cSrcweir 
281*cdf0e10cSrcweir         if ( m_pMouseDownEntry )
282*cdf0e10cSrcweir         {
283*cdf0e10cSrcweir             // we're currently in a "mouse down" phase
284*cdf0e10cSrcweir             DBG_ASSERT( IsMouseCaptured(), "OCreationList::MouseMove: inconsistence (1)!" );
285*cdf0e10cSrcweir             if ( pEntry == m_pMouseDownEntry )
286*cdf0e10cSrcweir             {
287*cdf0e10cSrcweir                 setCurrentEntryInvalidate( m_pMouseDownEntry );
288*cdf0e10cSrcweir             }
289*cdf0e10cSrcweir             else
290*cdf0e10cSrcweir             {
291*cdf0e10cSrcweir                 DBG_ASSERT( ( GetCurEntry() == m_pMouseDownEntry ) || !GetCurEntry(),
292*cdf0e10cSrcweir                     "OCreationList::MouseMove: inconsistence (2)!" );
293*cdf0e10cSrcweir                 setCurrentEntryInvalidate( NULL );
294*cdf0e10cSrcweir             }
295*cdf0e10cSrcweir         }
296*cdf0e10cSrcweir         else
297*cdf0e10cSrcweir         {
298*cdf0e10cSrcweir             // the user is simply hovering with the mouse
299*cdf0e10cSrcweir             if ( setCurrentEntryInvalidate( pEntry ) )
300*cdf0e10cSrcweir             {
301*cdf0e10cSrcweir                 if ( !m_pMouseDownEntry )
302*cdf0e10cSrcweir                     updateHelpText();
303*cdf0e10cSrcweir 		    }
304*cdf0e10cSrcweir         }
305*cdf0e10cSrcweir 	}
306*cdf0e10cSrcweir 
307*cdf0e10cSrcweir 	SvTreeListBox::MouseMove(rMEvt);
308*cdf0e10cSrcweir }
309*cdf0e10cSrcweir // -----------------------------------------------------------------------------
310*cdf0e10cSrcweir void OCreationList::MouseButtonUp( const MouseEvent& rMEvt )
311*cdf0e10cSrcweir {
312*cdf0e10cSrcweir     SvLBoxEntry* pEntry = GetEntry( rMEvt.GetPosPixel() );
313*cdf0e10cSrcweir     bool bExecute = false;
314*cdf0e10cSrcweir     // Was the mouse released over the active entry?
315*cdf0e10cSrcweir     // (i.e. the entry which was under the mouse when the button went down)
316*cdf0e10cSrcweir     if ( pEntry && ( m_pMouseDownEntry == pEntry ) )
317*cdf0e10cSrcweir     {
318*cdf0e10cSrcweir         if ( !rMEvt.IsShift() && !rMEvt.IsMod1() && !rMEvt.IsMod2() && rMEvt.IsLeft() && rMEvt.GetClicks() == 1 )
319*cdf0e10cSrcweir             bExecute = true;
320*cdf0e10cSrcweir     }
321*cdf0e10cSrcweir 
322*cdf0e10cSrcweir     if ( m_pMouseDownEntry )
323*cdf0e10cSrcweir     {
324*cdf0e10cSrcweir         DBG_ASSERT( IsMouseCaptured(), "OCreationList::MouseButtonUp: hmmm .... no mouse captured, but an active entry?" );
325*cdf0e10cSrcweir         ReleaseMouse();
326*cdf0e10cSrcweir 
327*cdf0e10cSrcweir         InvalidateEntry( m_pMouseDownEntry );
328*cdf0e10cSrcweir         m_pMouseDownEntry = NULL;
329*cdf0e10cSrcweir     }
330*cdf0e10cSrcweir 
331*cdf0e10cSrcweir     SvTreeListBox::MouseButtonUp( rMEvt );
332*cdf0e10cSrcweir 
333*cdf0e10cSrcweir     if ( bExecute )
334*cdf0e10cSrcweir         onSelected( pEntry );
335*cdf0e10cSrcweir }
336*cdf0e10cSrcweir // -----------------------------------------------------------------------------
337*cdf0e10cSrcweir bool OCreationList::setCurrentEntryInvalidate( SvLBoxEntry* _pEntry )
338*cdf0e10cSrcweir {
339*cdf0e10cSrcweir     if ( GetCurEntry() != _pEntry )
340*cdf0e10cSrcweir     {
341*cdf0e10cSrcweir         if ( GetCurEntry() )
342*cdf0e10cSrcweir             InvalidateEntry( GetCurEntry() );
343*cdf0e10cSrcweir         SetCurEntry( _pEntry );
344*cdf0e10cSrcweir         if ( GetCurEntry() )
345*cdf0e10cSrcweir 		{
346*cdf0e10cSrcweir             InvalidateEntry( GetCurEntry() );
347*cdf0e10cSrcweir 			CallEventListeners( VCLEVENT_LISTBOX_SELECT, GetCurEntry() );
348*cdf0e10cSrcweir 		}
349*cdf0e10cSrcweir         updateHelpText();
350*cdf0e10cSrcweir         return true;
351*cdf0e10cSrcweir     }
352*cdf0e10cSrcweir     return false;
353*cdf0e10cSrcweir }
354*cdf0e10cSrcweir // -----------------------------------------------------------------------------
355*cdf0e10cSrcweir void OCreationList::updateHelpText()
356*cdf0e10cSrcweir {
357*cdf0e10cSrcweir     sal_uInt16 nHelpTextId = 0;
358*cdf0e10cSrcweir     if ( GetCurEntry() )
359*cdf0e10cSrcweir         nHelpTextId = reinterpret_cast< TaskEntry* >( GetCurEntry()->GetUserData() )->nHelpID;
360*cdf0e10cSrcweir     m_rTaskWindow.setHelpText( nHelpTextId );
361*cdf0e10cSrcweir }
362*cdf0e10cSrcweir // -----------------------------------------------------------------------------
363*cdf0e10cSrcweir void OCreationList::onSelected( SvLBoxEntry* _pEntry ) const
364*cdf0e10cSrcweir {
365*cdf0e10cSrcweir     DBG_ASSERT( _pEntry, "OCreationList::onSelected: invalid entry!" );
366*cdf0e10cSrcweir 	URL aCommand;
367*cdf0e10cSrcweir 	aCommand.Complete = reinterpret_cast< TaskEntry* >( _pEntry->GetUserData() )->sUNOCommand;
368*cdf0e10cSrcweir     m_rTaskWindow.getDetailView()->getBorderWin().getView()->getAppController().executeChecked( aCommand, Sequence< PropertyValue >() );
369*cdf0e10cSrcweir }
370*cdf0e10cSrcweir // -----------------------------------------------------------------------------
371*cdf0e10cSrcweir void OCreationList::KeyInput( const KeyEvent& rKEvt )
372*cdf0e10cSrcweir {
373*cdf0e10cSrcweir 	const KeyCode& rCode = rKEvt.GetKeyCode();
374*cdf0e10cSrcweir 	if ( !rCode.IsMod1() && !rCode.IsMod2() && !rCode.IsShift() )
375*cdf0e10cSrcweir 	{
376*cdf0e10cSrcweir 		if ( rCode.GetCode() == KEY_RETURN )
377*cdf0e10cSrcweir 		{
378*cdf0e10cSrcweir             SvLBoxEntry* pEntry = GetCurEntry() ? GetCurEntry() : FirstSelected();
379*cdf0e10cSrcweir 		    if ( pEntry )
380*cdf0e10cSrcweir                 onSelected( pEntry );
381*cdf0e10cSrcweir             return;
382*cdf0e10cSrcweir         }
383*cdf0e10cSrcweir     }
384*cdf0e10cSrcweir     SvLBoxEntry* pOldCurrent = GetCurEntry();
385*cdf0e10cSrcweir 	SvTreeListBox::KeyInput(rKEvt);
386*cdf0e10cSrcweir     SvLBoxEntry* pNewCurrent = GetCurEntry();
387*cdf0e10cSrcweir 
388*cdf0e10cSrcweir     if ( pOldCurrent != pNewCurrent )
389*cdf0e10cSrcweir     {
390*cdf0e10cSrcweir         if ( pOldCurrent )
391*cdf0e10cSrcweir             InvalidateEntry( pOldCurrent );
392*cdf0e10cSrcweir         if ( pNewCurrent )
393*cdf0e10cSrcweir 		{
394*cdf0e10cSrcweir             InvalidateEntry( pNewCurrent );
395*cdf0e10cSrcweir 			CallEventListeners( VCLEVENT_LISTBOX_SELECT, pNewCurrent );
396*cdf0e10cSrcweir 		} // if ( pNewCurrent )
397*cdf0e10cSrcweir         updateHelpText();
398*cdf0e10cSrcweir     }
399*cdf0e10cSrcweir }
400*cdf0e10cSrcweir // -----------------------------------------------------------------------------
401*cdf0e10cSrcweir DBG_NAME(OTasksWindow)
402*cdf0e10cSrcweir OTasksWindow::OTasksWindow(Window* _pParent,OApplicationDetailView* _pDetailView)
403*cdf0e10cSrcweir 	: Window(_pParent,WB_DIALOGCONTROL )
404*cdf0e10cSrcweir 	,m_aCreation(*this)
405*cdf0e10cSrcweir 	,m_aDescription(this)
406*cdf0e10cSrcweir 	,m_aHelpText(this,WB_WORDBREAK)
407*cdf0e10cSrcweir 	,m_aFL(this,WB_VERT)
408*cdf0e10cSrcweir 	,m_pDetailView(_pDetailView)
409*cdf0e10cSrcweir {
410*cdf0e10cSrcweir 	DBG_CTOR(OTasksWindow,NULL);
411*cdf0e10cSrcweir 	SetUniqueId(UID_APP_TASKS_WINDOW);
412*cdf0e10cSrcweir 	m_aCreation.SetHelpId(HID_APP_CREATION_LIST);
413*cdf0e10cSrcweir 	m_aCreation.SetSelectHdl(LINK(this, OTasksWindow, OnEntrySelectHdl));
414*cdf0e10cSrcweir 	m_aHelpText.SetHelpId(HID_APP_HELP_TEXT);
415*cdf0e10cSrcweir 	m_aDescription.SetHelpId(HID_APP_DESCRIPTION_TEXT);
416*cdf0e10cSrcweir 	m_aDescription.SetText(ModuleRes(STR_DESCRIPTION));
417*cdf0e10cSrcweir 
418*cdf0e10cSrcweir     ImageProvider aImageProvider;
419*cdf0e10cSrcweir     Image aFolderImage = aImageProvider.getFolderImage( DatabaseObject::FORM, false );
420*cdf0e10cSrcweir     m_aCreation.SetDefaultCollapsedEntryBmp( aFolderImage );
421*cdf0e10cSrcweir     m_aCreation.SetDefaultExpandedEntryBmp( aFolderImage );
422*cdf0e10cSrcweir 
423*cdf0e10cSrcweir 	ImplInitSettings(sal_True,sal_True,sal_True);
424*cdf0e10cSrcweir }
425*cdf0e10cSrcweir // -----------------------------------------------------------------------------
426*cdf0e10cSrcweir OTasksWindow::~OTasksWindow()
427*cdf0e10cSrcweir {
428*cdf0e10cSrcweir 	DBG_DTOR(OTasksWindow,NULL);
429*cdf0e10cSrcweir 	Clear();
430*cdf0e10cSrcweir }
431*cdf0e10cSrcweir // -----------------------------------------------------------------------
432*cdf0e10cSrcweir void OTasksWindow::DataChanged( const DataChangedEvent& rDCEvt )
433*cdf0e10cSrcweir {
434*cdf0e10cSrcweir 	DBG_CHKTHIS(OTasksWindow,NULL);
435*cdf0e10cSrcweir 	Window::DataChanged( rDCEvt );
436*cdf0e10cSrcweir 
437*cdf0e10cSrcweir 	if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) &&
438*cdf0e10cSrcweir 		 (rDCEvt.GetFlags() & SETTINGS_STYLE) )
439*cdf0e10cSrcweir 	{
440*cdf0e10cSrcweir 		ImplInitSettings( sal_True, sal_True, sal_True );
441*cdf0e10cSrcweir 		Invalidate();
442*cdf0e10cSrcweir 	}
443*cdf0e10cSrcweir }
444*cdf0e10cSrcweir //	-----------------------------------------------------------------------------
445*cdf0e10cSrcweir void OTasksWindow::ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground )
446*cdf0e10cSrcweir {
447*cdf0e10cSrcweir 	DBG_CHKTHIS(OTasksWindow,NULL);
448*cdf0e10cSrcweir 	const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
449*cdf0e10cSrcweir 	if( bFont )
450*cdf0e10cSrcweir 	{
451*cdf0e10cSrcweir 		Font aFont;
452*cdf0e10cSrcweir 		aFont = rStyleSettings.GetFieldFont();
453*cdf0e10cSrcweir 		aFont.SetColor( rStyleSettings.GetWindowTextColor() );
454*cdf0e10cSrcweir 		SetPointFont( aFont );
455*cdf0e10cSrcweir 	}
456*cdf0e10cSrcweir 
457*cdf0e10cSrcweir 	if( bForeground || bFont )
458*cdf0e10cSrcweir 	{
459*cdf0e10cSrcweir 		SetTextColor( rStyleSettings.GetFieldTextColor() );
460*cdf0e10cSrcweir 		SetTextFillColor();
461*cdf0e10cSrcweir 		m_aHelpText.SetTextColor( rStyleSettings.GetFieldTextColor() );
462*cdf0e10cSrcweir 		m_aHelpText.SetTextFillColor();
463*cdf0e10cSrcweir 		m_aDescription.SetTextColor( rStyleSettings.GetFieldTextColor() );
464*cdf0e10cSrcweir 		m_aDescription.SetTextFillColor();
465*cdf0e10cSrcweir 		//m_aFL.SetTextColor( rStyleSettings.GetFieldTextColor() );
466*cdf0e10cSrcweir 		//m_aFL.SetTextFillColor();
467*cdf0e10cSrcweir 	}
468*cdf0e10cSrcweir 
469*cdf0e10cSrcweir 	if( bBackground )
470*cdf0e10cSrcweir 	{
471*cdf0e10cSrcweir 		SetBackground( rStyleSettings.GetFieldColor() );
472*cdf0e10cSrcweir 		m_aHelpText.SetBackground( rStyleSettings.GetFieldColor() );
473*cdf0e10cSrcweir 		m_aDescription.SetBackground( rStyleSettings.GetFieldColor() );
474*cdf0e10cSrcweir 		m_aFL.SetBackground( rStyleSettings.GetFieldColor() );
475*cdf0e10cSrcweir 	}
476*cdf0e10cSrcweir 
477*cdf0e10cSrcweir 	Font aFont = m_aDescription.GetControlFont();
478*cdf0e10cSrcweir 	aFont.SetWeight(WEIGHT_BOLD);
479*cdf0e10cSrcweir 	m_aDescription.SetControlFont(aFont);
480*cdf0e10cSrcweir }
481*cdf0e10cSrcweir // -----------------------------------------------------------------------------
482*cdf0e10cSrcweir void OTasksWindow::setHelpText(sal_uInt16 _nId)
483*cdf0e10cSrcweir {
484*cdf0e10cSrcweir 	DBG_CHKTHIS(OTasksWindow,NULL);
485*cdf0e10cSrcweir     if ( _nId )
486*cdf0e10cSrcweir     {
487*cdf0e10cSrcweir         String sText = ModuleRes(_nId);
488*cdf0e10cSrcweir 
489*cdf0e10cSrcweir         // calulate the size of the text field
490*cdf0e10cSrcweir         // Size aHelpTextSize = m_aHelpText.GetSizePixel();
491*cdf0e10cSrcweir         // Size aHelpTextPixelSize = LogicToPixel( aHelpTextSize, MAP_APPFONT );
492*cdf0e10cSrcweir         // Rectangle aPrimaryRect( Point(0,0), aHelpTextSize );
493*cdf0e10cSrcweir         // Rectangle aSuggestedRect( GetTextRect( aPrimaryRect, sText, TEXT_DRAW_MULTILINE | TEXT_DRAW_LEFT | TEXT_DRAW_WORDBREAK ) );
494*cdf0e10cSrcweir 	    m_aHelpText.SetText(sText);
495*cdf0e10cSrcweir     }
496*cdf0e10cSrcweir     else
497*cdf0e10cSrcweir     {
498*cdf0e10cSrcweir         m_aHelpText.SetText(String());
499*cdf0e10cSrcweir }
500*cdf0e10cSrcweir }
501*cdf0e10cSrcweir // -----------------------------------------------------------------------------
502*cdf0e10cSrcweir IMPL_LINK(OTasksWindow, OnEntrySelectHdl, SvTreeListBox*, /*_pTreeBox*/)
503*cdf0e10cSrcweir {
504*cdf0e10cSrcweir 	DBG_CHKTHIS(OTasksWindow,NULL);
505*cdf0e10cSrcweir 	SvLBoxEntry* pEntry = m_aCreation.GetHdlEntry();
506*cdf0e10cSrcweir 	if ( pEntry )
507*cdf0e10cSrcweir 		m_aHelpText.SetText( ModuleRes( reinterpret_cast< TaskEntry* >( pEntry->GetUserData() )->nHelpID ) );
508*cdf0e10cSrcweir 	return 1L;
509*cdf0e10cSrcweir }
510*cdf0e10cSrcweir // -----------------------------------------------------------------------------
511*cdf0e10cSrcweir void OTasksWindow::Resize()
512*cdf0e10cSrcweir {
513*cdf0e10cSrcweir 	DBG_CHKTHIS(OTasksWindow,NULL);
514*cdf0e10cSrcweir 	//////////////////////////////////////////////////////////////////////
515*cdf0e10cSrcweir 	// Abmessungen parent window
516*cdf0e10cSrcweir 	Size aOutputSize( GetOutputSize() );
517*cdf0e10cSrcweir 	long nOutputWidth	= aOutputSize.Width();
518*cdf0e10cSrcweir 	long nOutputHeight	= aOutputSize.Height();
519*cdf0e10cSrcweir 
520*cdf0e10cSrcweir 	Size aFLSize = LogicToPixel( Size( 2, 6 ), MAP_APPFONT );
521*cdf0e10cSrcweir 	sal_Int32 n6PPT = aFLSize.Height();
522*cdf0e10cSrcweir 	long nHalfOutputWidth = static_cast<long>(nOutputWidth * 0.5);
523*cdf0e10cSrcweir 
524*cdf0e10cSrcweir 	m_aCreation.SetPosSizePixel( Point(0, 0), Size(nHalfOutputWidth - n6PPT, nOutputHeight) );
525*cdf0e10cSrcweir     // i77897 make the m_aHelpText a little bit smaller. (-5)
526*cdf0e10cSrcweir 	sal_Int32 nNewWidth = nOutputWidth - nHalfOutputWidth - aFLSize.Width() - 5;
527*cdf0e10cSrcweir 	// m_aHelpText.SetBackground( MAKE_SALCOLOR( 0xe0, 0xe0, 0xe0 ) );
528*cdf0e10cSrcweir     // Wallpaper aLightGray(Color(0xe0, 0xe0, 0xe0));
529*cdf0e10cSrcweir 	// m_aHelpText.SetBackground( aLightGray );
530*cdf0e10cSrcweir 	m_aDescription.SetPosSizePixel( Point(nHalfOutputWidth + n6PPT, 0), Size(nNewWidth, nOutputHeight) );
531*cdf0e10cSrcweir 	Size aDesc = m_aDescription.CalcMinimumSize();
532*cdf0e10cSrcweir 	m_aHelpText.SetPosSizePixel( Point(nHalfOutputWidth + n6PPT, aDesc.Height() ), Size(nNewWidth, nOutputHeight - aDesc.Height() - n6PPT) );
533*cdf0e10cSrcweir 
534*cdf0e10cSrcweir 	m_aFL.SetPosSizePixel( Point(nHalfOutputWidth , 0), Size(aFLSize.Width(), nOutputHeight ) );
535*cdf0e10cSrcweir }
536*cdf0e10cSrcweir // -----------------------------------------------------------------------------
537*cdf0e10cSrcweir void OTasksWindow::fillTaskEntryList( const TaskEntryList& _rList )
538*cdf0e10cSrcweir {
539*cdf0e10cSrcweir 	DBG_CHKTHIS(OTasksWindow,NULL);
540*cdf0e10cSrcweir 	Clear();
541*cdf0e10cSrcweir 
542*cdf0e10cSrcweir 	try
543*cdf0e10cSrcweir 	{
544*cdf0e10cSrcweir 		Reference<XModuleUIConfigurationManagerSupplier> xModuleCfgMgrSupplier(getDetailView()->getBorderWin().getView()->getORB()->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ui.ModuleUIConfigurationManagerSupplier"))),UNO_QUERY);
545*cdf0e10cSrcweir 		Reference<XUIConfigurationManager> xUIConfigMgr = xModuleCfgMgrSupplier->getUIConfigurationManager(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.OfficeDatabaseDocument")));
546*cdf0e10cSrcweir 		Reference<XImageManager> xImageMgr(xUIConfigMgr->getImageManager(),UNO_QUERY);
547*cdf0e10cSrcweir 
548*cdf0e10cSrcweir         // copy the commands so we can use them with the config managers
549*cdf0e10cSrcweir         Sequence< ::rtl::OUString > aCommands( _rList.size() );
550*cdf0e10cSrcweir         ::rtl::OUString* pCommands = aCommands.getArray();
551*cdf0e10cSrcweir 		TaskEntryList::const_iterator aEnd = _rList.end();
552*cdf0e10cSrcweir 		for ( TaskEntryList::const_iterator pCopyTask = _rList.begin(); pCopyTask != aEnd; ++pCopyTask, ++pCommands )
553*cdf0e10cSrcweir 			*pCommands = pCopyTask->sUNOCommand;
554*cdf0e10cSrcweir 
555*cdf0e10cSrcweir 		Sequence< Reference< XGraphic> > aImages = xImageMgr->getImages( ImageType::SIZE_DEFAULT | ImageType::COLOR_NORMAL, aCommands );
556*cdf0e10cSrcweir 		Sequence< Reference< XGraphic> > aHCImages = xImageMgr->getImages( ImageType::SIZE_DEFAULT | ImageType::COLOR_HIGHCONTRAST, aCommands );
557*cdf0e10cSrcweir 
558*cdf0e10cSrcweir         const Reference< XGraphic >* pImages( aImages.getConstArray() );
559*cdf0e10cSrcweir         const Reference< XGraphic >* pHCImages( aHCImages.getConstArray() );
560*cdf0e10cSrcweir 
561*cdf0e10cSrcweir         for ( TaskEntryList::const_iterator pTask = _rList.begin(); pTask != aEnd; ++pTask, ++pImages, ++pHCImages )
562*cdf0e10cSrcweir 		{
563*cdf0e10cSrcweir 			SvLBoxEntry* pEntry = m_aCreation.InsertEntry( pTask->sTitle );
564*cdf0e10cSrcweir             pEntry->SetUserData( reinterpret_cast< void* >( new TaskEntry( *pTask ) ) );
565*cdf0e10cSrcweir 
566*cdf0e10cSrcweir             Image aImage = Image( *pImages );
567*cdf0e10cSrcweir             m_aCreation.SetExpandedEntryBmp( pEntry, aImage, BMP_COLOR_NORMAL );
568*cdf0e10cSrcweir             m_aCreation.SetCollapsedEntryBmp( pEntry, aImage, BMP_COLOR_NORMAL );
569*cdf0e10cSrcweir 
570*cdf0e10cSrcweir             Image aHCImage = Image( *pHCImages );
571*cdf0e10cSrcweir             m_aCreation.SetExpandedEntryBmp( pEntry, aHCImage, BMP_COLOR_HIGHCONTRAST );
572*cdf0e10cSrcweir             m_aCreation.SetCollapsedEntryBmp( pEntry, aHCImage, BMP_COLOR_HIGHCONTRAST );
573*cdf0e10cSrcweir 		}
574*cdf0e10cSrcweir 	}
575*cdf0e10cSrcweir 	catch(Exception&)
576*cdf0e10cSrcweir 	{
577*cdf0e10cSrcweir 	}
578*cdf0e10cSrcweir 
579*cdf0e10cSrcweir 	m_aCreation.Show();
580*cdf0e10cSrcweir 	m_aCreation.SelectAll(sal_False);
581*cdf0e10cSrcweir 	m_aHelpText.Show();
582*cdf0e10cSrcweir 	m_aDescription.Show();
583*cdf0e10cSrcweir 	m_aFL.Show();
584*cdf0e10cSrcweir     m_aCreation.updateHelpText();
585*cdf0e10cSrcweir     Enable(!_rList.empty());
586*cdf0e10cSrcweir }
587*cdf0e10cSrcweir // -----------------------------------------------------------------------------
588*cdf0e10cSrcweir void OTasksWindow::Clear()
589*cdf0e10cSrcweir {
590*cdf0e10cSrcweir 	DBG_CHKTHIS(OTasksWindow,NULL);
591*cdf0e10cSrcweir     m_aCreation.resetLastActive();
592*cdf0e10cSrcweir 	SvLBoxEntry* pEntry = m_aCreation.First();
593*cdf0e10cSrcweir 	while ( pEntry )
594*cdf0e10cSrcweir 	{
595*cdf0e10cSrcweir 		delete reinterpret_cast< TaskEntry* >( pEntry->GetUserData() );
596*cdf0e10cSrcweir 		pEntry = m_aCreation.Next(pEntry);
597*cdf0e10cSrcweir 	}
598*cdf0e10cSrcweir 	m_aCreation.Clear();
599*cdf0e10cSrcweir }
600*cdf0e10cSrcweir //==================================================================
601*cdf0e10cSrcweir // class OApplicationDetailView
602*cdf0e10cSrcweir //==================================================================
603*cdf0e10cSrcweir DBG_NAME(OApplicationDetailView)
604*cdf0e10cSrcweir OApplicationDetailView::OApplicationDetailView(OAppBorderWindow& _rParent,PreviewMode _ePreviewMode) : OSplitterView(&_rParent,sal_False )
605*cdf0e10cSrcweir 	,m_aHorzSplitter(this)
606*cdf0e10cSrcweir 	,m_aTasks(this,STR_TASKS,WB_BORDER | WB_DIALOGCONTROL )
607*cdf0e10cSrcweir 	,m_aContainer(this,0,WB_BORDER | WB_DIALOGCONTROL )
608*cdf0e10cSrcweir 	,m_rBorderWin(_rParent)
609*cdf0e10cSrcweir {
610*cdf0e10cSrcweir 	DBG_CTOR(OApplicationDetailView,NULL);
611*cdf0e10cSrcweir 	SetUniqueId(UID_APP_DETAIL_VIEW);
612*cdf0e10cSrcweir 	ImplInitSettings( sal_True, sal_True, sal_True );
613*cdf0e10cSrcweir 
614*cdf0e10cSrcweir 	m_pControlHelper = new OAppDetailPageHelper(&m_aContainer,m_rBorderWin,_ePreviewMode);
615*cdf0e10cSrcweir 	m_pControlHelper->Show();
616*cdf0e10cSrcweir 	m_aContainer.setChildWindow(m_pControlHelper);
617*cdf0e10cSrcweir 
618*cdf0e10cSrcweir 	OTasksWindow* pTasks = new OTasksWindow(&m_aTasks,this);
619*cdf0e10cSrcweir 	pTasks->Show();
620*cdf0e10cSrcweir 	pTasks->Disable(m_rBorderWin.getView()->getCommandController().isDataSourceReadOnly());
621*cdf0e10cSrcweir 	m_aTasks.setChildWindow(pTasks);
622*cdf0e10cSrcweir 	m_aTasks.SetUniqueId(UID_APP_TASKS_VIEW);
623*cdf0e10cSrcweir 	m_aTasks.Show();
624*cdf0e10cSrcweir 
625*cdf0e10cSrcweir 	m_aContainer.SetUniqueId(UID_APP_CONTAINER_VIEW);
626*cdf0e10cSrcweir 	m_aContainer.Show();
627*cdf0e10cSrcweir 
628*cdf0e10cSrcweir 	const long	nFrameWidth = LogicToPixel( Size( 3, 0 ), MAP_APPFONT ).Width();
629*cdf0e10cSrcweir 	m_aHorzSplitter.SetPosSizePixel( Point(0,50), Size(0,nFrameWidth) );
630*cdf0e10cSrcweir 	// now set the components at the base class
631*cdf0e10cSrcweir 	set(&m_aContainer,&m_aTasks);
632*cdf0e10cSrcweir 
633*cdf0e10cSrcweir 	m_aHorzSplitter.Show();
634*cdf0e10cSrcweir 	m_aHorzSplitter.SetUniqueId(UID_APP_VIEW_HORZ_SPLIT);
635*cdf0e10cSrcweir 	setSplitter(&m_aHorzSplitter);
636*cdf0e10cSrcweir }
637*cdf0e10cSrcweir // -----------------------------------------------------------------------------
638*cdf0e10cSrcweir OApplicationDetailView::~OApplicationDetailView()
639*cdf0e10cSrcweir {
640*cdf0e10cSrcweir 	DBG_DTOR(OApplicationDetailView,NULL);
641*cdf0e10cSrcweir     set(NULL,NULL);
642*cdf0e10cSrcweir     setSplitter(NULL);
643*cdf0e10cSrcweir 	m_pControlHelper = NULL;
644*cdf0e10cSrcweir }
645*cdf0e10cSrcweir //	-----------------------------------------------------------------------------
646*cdf0e10cSrcweir void OApplicationDetailView::ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground )
647*cdf0e10cSrcweir {
648*cdf0e10cSrcweir 	DBG_CHKTHIS(OApplicationDetailView,NULL);
649*cdf0e10cSrcweir 	const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
650*cdf0e10cSrcweir 	if( bFont )
651*cdf0e10cSrcweir 	{
652*cdf0e10cSrcweir 		Font aFont;
653*cdf0e10cSrcweir 		aFont = rStyleSettings.GetFieldFont();
654*cdf0e10cSrcweir 		aFont.SetColor( rStyleSettings.GetWindowTextColor() );
655*cdf0e10cSrcweir 		SetPointFont( aFont );
656*cdf0e10cSrcweir 	}
657*cdf0e10cSrcweir 
658*cdf0e10cSrcweir 	if( bForeground || bFont )
659*cdf0e10cSrcweir 	{
660*cdf0e10cSrcweir 		SetTextColor( rStyleSettings.GetFieldTextColor() );
661*cdf0e10cSrcweir 		SetTextFillColor();
662*cdf0e10cSrcweir 	}
663*cdf0e10cSrcweir 
664*cdf0e10cSrcweir 	if( bBackground )
665*cdf0e10cSrcweir 		SetBackground( rStyleSettings.GetFieldColor() );
666*cdf0e10cSrcweir 
667*cdf0e10cSrcweir 	//SetBackground( Wallpaper( GetSettings().GetStyleSettings().GetDialogColor() ) );
668*cdf0e10cSrcweir 	m_aHorzSplitter.SetBackground( rStyleSettings.GetDialogColor() );
669*cdf0e10cSrcweir 	m_aHorzSplitter.SetFillColor( rStyleSettings.GetDialogColor() );
670*cdf0e10cSrcweir 	m_aHorzSplitter.SetTextFillColor(rStyleSettings.GetDialogColor() );
671*cdf0e10cSrcweir }
672*cdf0e10cSrcweir // -----------------------------------------------------------------------
673*cdf0e10cSrcweir void OApplicationDetailView::DataChanged( const DataChangedEvent& rDCEvt )
674*cdf0e10cSrcweir {
675*cdf0e10cSrcweir 	DBG_CHKTHIS(OApplicationDetailView,NULL);
676*cdf0e10cSrcweir 	OSplitterView::DataChanged( rDCEvt );
677*cdf0e10cSrcweir 
678*cdf0e10cSrcweir 	if ( (rDCEvt.GetType() == DATACHANGED_FONTS) ||
679*cdf0e10cSrcweir 		(rDCEvt.GetType() == DATACHANGED_DISPLAY) ||
680*cdf0e10cSrcweir 		(rDCEvt.GetType() == DATACHANGED_FONTSUBSTITUTION) ||
681*cdf0e10cSrcweir 		((rDCEvt.GetType() == DATACHANGED_SETTINGS) &&
682*cdf0e10cSrcweir 		(rDCEvt.GetFlags() & SETTINGS_STYLE)) )
683*cdf0e10cSrcweir 	{
684*cdf0e10cSrcweir 		ImplInitSettings( sal_True, sal_True, sal_True );
685*cdf0e10cSrcweir 		Invalidate();
686*cdf0e10cSrcweir 	}
687*cdf0e10cSrcweir }
688*cdf0e10cSrcweir // -----------------------------------------------------------------------------
689*cdf0e10cSrcweir void OApplicationDetailView::GetFocus()
690*cdf0e10cSrcweir {
691*cdf0e10cSrcweir 	DBG_CHKTHIS(OApplicationDetailView,NULL);
692*cdf0e10cSrcweir 	OSplitterView::GetFocus();
693*cdf0e10cSrcweir }
694*cdf0e10cSrcweir 
695*cdf0e10cSrcweir // -----------------------------------------------------------------------------
696*cdf0e10cSrcweir void OApplicationDetailView::setTaskExternalMnemonics( MnemonicGenerator& _rMnemonics )
697*cdf0e10cSrcweir {
698*cdf0e10cSrcweir     m_aExternalMnemonics = _rMnemonics;
699*cdf0e10cSrcweir }
700*cdf0e10cSrcweir 
701*cdf0e10cSrcweir // -----------------------------------------------------------------------------
702*cdf0e10cSrcweir bool OApplicationDetailView::interceptKeyInput( const KeyEvent& _rEvent )
703*cdf0e10cSrcweir {
704*cdf0e10cSrcweir     const KeyCode& rKeyCode = _rEvent.GetKeyCode();
705*cdf0e10cSrcweir     if ( rKeyCode.GetModifier() == KEY_MOD2 )
706*cdf0e10cSrcweir         return getTasksWindow().HandleKeyInput( _rEvent );
707*cdf0e10cSrcweir 
708*cdf0e10cSrcweir     // not handled
709*cdf0e10cSrcweir     return false;
710*cdf0e10cSrcweir }
711*cdf0e10cSrcweir 
712*cdf0e10cSrcweir // -----------------------------------------------------------------------------
713*cdf0e10cSrcweir void OApplicationDetailView::createTablesPage(const Reference< XConnection >& _xConnection )
714*cdf0e10cSrcweir {
715*cdf0e10cSrcweir     impl_createPage( E_TABLE, _xConnection, NULL );
716*cdf0e10cSrcweir }
717*cdf0e10cSrcweir 
718*cdf0e10cSrcweir // -----------------------------------------------------------------------------
719*cdf0e10cSrcweir void OApplicationDetailView::createPage( ElementType _eType,const Reference< XNameAccess >& _xContainer )
720*cdf0e10cSrcweir {
721*cdf0e10cSrcweir     impl_createPage( _eType, NULL, _xContainer );
722*cdf0e10cSrcweir }
723*cdf0e10cSrcweir 
724*cdf0e10cSrcweir // -----------------------------------------------------------------------------
725*cdf0e10cSrcweir void OApplicationDetailView::impl_createPage( ElementType _eType, const Reference< XConnection >& _rxConnection,
726*cdf0e10cSrcweir     const Reference< XNameAccess >& _rxNonTableElements )
727*cdf0e10cSrcweir {
728*cdf0e10cSrcweir 	DBG_CHKTHIS(OApplicationDetailView,NULL);
729*cdf0e10cSrcweir 
730*cdf0e10cSrcweir     // get the data for the pane
731*cdf0e10cSrcweir     const TaskPaneData& rData = impl_getTaskPaneData( _eType );
732*cdf0e10cSrcweir 	getTasksWindow().fillTaskEntryList( rData.aTasks );
733*cdf0e10cSrcweir 
734*cdf0e10cSrcweir     // enable the pane as a whole, depending on the availability of the first command
735*cdf0e10cSrcweir     OSL_ENSURE( !rData.aTasks.empty(), "OApplicationDetailView::impl_createPage: no tasks at all!?" );
736*cdf0e10cSrcweir     bool bEnabled = rData.aTasks.empty()
737*cdf0e10cSrcweir                 ?   false
738*cdf0e10cSrcweir                 :   getBorderWin().getView()->getCommandController().isCommandEnabled( rData.aTasks[0].sUNOCommand );
739*cdf0e10cSrcweir 	getTasksWindow().Enable( bEnabled );
740*cdf0e10cSrcweir 	m_aContainer.setTitle( rData.nTitleId );
741*cdf0e10cSrcweir 
742*cdf0e10cSrcweir     // let our helper create the object list
743*cdf0e10cSrcweir     if ( _eType == E_TABLE )
744*cdf0e10cSrcweir         m_pControlHelper->createTablesPage( _rxConnection );
745*cdf0e10cSrcweir     else
746*cdf0e10cSrcweir         m_pControlHelper->createPage( _eType, _rxNonTableElements );
747*cdf0e10cSrcweir 
748*cdf0e10cSrcweir     // resize for proper window arrangements
749*cdf0e10cSrcweir     Resize();
750*cdf0e10cSrcweir }
751*cdf0e10cSrcweir 
752*cdf0e10cSrcweir // -----------------------------------------------------------------------------
753*cdf0e10cSrcweir const TaskPaneData& OApplicationDetailView::impl_getTaskPaneData( ElementType _eType )
754*cdf0e10cSrcweir {
755*cdf0e10cSrcweir     if ( m_aTaskPaneData.empty() )
756*cdf0e10cSrcweir         m_aTaskPaneData.resize( ELEMENT_COUNT );
757*cdf0e10cSrcweir     OSL_ENSURE( ( _eType >= 0 ) && ( _eType < E_ELEMENT_TYPE_COUNT ), "OApplicationDetailView::impl_getTaskPaneData: illegal element type!" );
758*cdf0e10cSrcweir     TaskPaneData& rData = m_aTaskPaneData[ _eType ];
759*cdf0e10cSrcweir 
760*cdf0e10cSrcweir //    if ( rData.aTasks.empty() )
761*cdf0e10cSrcweir     //oj: do not check, otherwise extensions will only be visible after a reload.
762*cdf0e10cSrcweir     impl_fillTaskPaneData( _eType, rData );
763*cdf0e10cSrcweir 
764*cdf0e10cSrcweir     return rData;
765*cdf0e10cSrcweir }
766*cdf0e10cSrcweir 
767*cdf0e10cSrcweir // -----------------------------------------------------------------------------
768*cdf0e10cSrcweir void OApplicationDetailView::impl_fillTaskPaneData( ElementType _eType, TaskPaneData& _rData ) const
769*cdf0e10cSrcweir {
770*cdf0e10cSrcweir     TaskEntryList& rList( _rData.aTasks );
771*cdf0e10cSrcweir     rList.clear(); rList.reserve( 4 );
772*cdf0e10cSrcweir 
773*cdf0e10cSrcweir     switch ( _eType )
774*cdf0e10cSrcweir     {
775*cdf0e10cSrcweir     case E_TABLE:
776*cdf0e10cSrcweir 	    rList.push_back( TaskEntry( ".uno:DBNewTable", RID_STR_TABLES_HELP_TEXT_DESIGN, RID_STR_NEW_TABLE ) );
777*cdf0e10cSrcweir         rList.push_back( TaskEntry( ".uno:DBNewTableAutoPilot", RID_STR_TABLES_HELP_TEXT_WIZARD, RID_STR_NEW_TABLE_AUTO ) );
778*cdf0e10cSrcweir 		rList.push_back( TaskEntry( ".uno:DBNewView", RID_STR_VIEWS_HELP_TEXT_DESIGN, RID_STR_NEW_VIEW, true ) );
779*cdf0e10cSrcweir         _rData.nTitleId = RID_STR_TABLES_CONTAINER;
780*cdf0e10cSrcweir         break;
781*cdf0e10cSrcweir 
782*cdf0e10cSrcweir     case E_FORM:
783*cdf0e10cSrcweir 		rList.push_back( TaskEntry( ".uno:DBNewForm", RID_STR_FORMS_HELP_TEXT, RID_STR_NEW_FORM ) );
784*cdf0e10cSrcweir 		rList.push_back( TaskEntry( ".uno:DBNewFormAutoPilot", RID_STR_FORMS_HELP_TEXT_WIZARD, RID_STR_NEW_FORM_AUTO ) );
785*cdf0e10cSrcweir 		_rData.nTitleId = RID_STR_FORMS_CONTAINER;
786*cdf0e10cSrcweir 		break;
787*cdf0e10cSrcweir 
788*cdf0e10cSrcweir     case E_REPORT:
789*cdf0e10cSrcweir         rList.push_back( TaskEntry( ".uno:DBNewReport", RID_STR_REPORT_HELP_TEXT, RID_STR_NEW_REPORT, true ) );
790*cdf0e10cSrcweir 		rList.push_back( TaskEntry( ".uno:DBNewReportAutoPilot", RID_STR_REPORTS_HELP_TEXT_WIZARD, RID_STR_NEW_REPORT_AUTO ) );
791*cdf0e10cSrcweir 		_rData.nTitleId = RID_STR_REPORTS_CONTAINER;
792*cdf0e10cSrcweir 		break;
793*cdf0e10cSrcweir 
794*cdf0e10cSrcweir 	case E_QUERY:
795*cdf0e10cSrcweir 		rList.push_back( TaskEntry( ".uno:DBNewQuery", RID_STR_QUERIES_HELP_TEXT, RID_STR_NEW_QUERY ) );
796*cdf0e10cSrcweir 		rList.push_back( TaskEntry( ".uno:DBNewQueryAutoPilot", RID_STR_QUERIES_HELP_TEXT_WIZARD, RID_STR_NEW_QUERY_AUTO ) );
797*cdf0e10cSrcweir 		rList.push_back( TaskEntry( ".uno:DBNewQuerySql", RID_STR_QUERIES_HELP_TEXT_SQL, RID_STR_NEW_QUERY_SQL ) );
798*cdf0e10cSrcweir 		_rData.nTitleId = RID_STR_QUERIES_CONTAINER;
799*cdf0e10cSrcweir 		break;
800*cdf0e10cSrcweir 
801*cdf0e10cSrcweir     default:
802*cdf0e10cSrcweir         OSL_ENSURE( false, "OApplicationDetailView::impl_fillTaskPaneData: illegal element type!" );
803*cdf0e10cSrcweir     }
804*cdf0e10cSrcweir 
805*cdf0e10cSrcweir     MnemonicGenerator aAllMnemonics( m_aExternalMnemonics );
806*cdf0e10cSrcweir 
807*cdf0e10cSrcweir     // remove the entries which are not enabled currently
808*cdf0e10cSrcweir     for (   TaskEntryList::iterator pTask = rList.begin();
809*cdf0e10cSrcweir             pTask != rList.end();
810*cdf0e10cSrcweir         )
811*cdf0e10cSrcweir     {
812*cdf0e10cSrcweir         if  (   pTask->bHideWhenDisabled
813*cdf0e10cSrcweir             &&  !getBorderWin().getView()->getCommandController().isCommandEnabled( pTask->sUNOCommand )
814*cdf0e10cSrcweir             )
815*cdf0e10cSrcweir             pTask = rList.erase( pTask );
816*cdf0e10cSrcweir         else
817*cdf0e10cSrcweir         {
818*cdf0e10cSrcweir             aAllMnemonics.RegisterMnemonic( pTask->sTitle );
819*cdf0e10cSrcweir             ++pTask;
820*cdf0e10cSrcweir         }
821*cdf0e10cSrcweir     }
822*cdf0e10cSrcweir 
823*cdf0e10cSrcweir     // for the remaining entries, assign mnemonics
824*cdf0e10cSrcweir     for (   TaskEntryList::iterator pTask = rList.begin();
825*cdf0e10cSrcweir             pTask != rList.end();
826*cdf0e10cSrcweir             ++pTask
827*cdf0e10cSrcweir         )
828*cdf0e10cSrcweir     {
829*cdf0e10cSrcweir         aAllMnemonics.CreateMnemonic( pTask->sTitle );
830*cdf0e10cSrcweir         // don't do this for now, until our task window really supports mnemonics
831*cdf0e10cSrcweir     }
832*cdf0e10cSrcweir }
833*cdf0e10cSrcweir 
834*cdf0e10cSrcweir // -----------------------------------------------------------------------------
835*cdf0e10cSrcweir ::rtl::OUString OApplicationDetailView::getQualifiedName( SvLBoxEntry* _pEntry ) const
836*cdf0e10cSrcweir {
837*cdf0e10cSrcweir 	DBG_CHKTHIS(OApplicationDetailView,NULL);
838*cdf0e10cSrcweir 	return m_pControlHelper->getQualifiedName( _pEntry );
839*cdf0e10cSrcweir }
840*cdf0e10cSrcweir // -----------------------------------------------------------------------------
841*cdf0e10cSrcweir sal_Bool OApplicationDetailView::isLeaf(SvLBoxEntry* _pEntry) const
842*cdf0e10cSrcweir {
843*cdf0e10cSrcweir 	DBG_CHKTHIS(OApplicationDetailView,NULL);
844*cdf0e10cSrcweir 	return m_pControlHelper->isLeaf(_pEntry);
845*cdf0e10cSrcweir }
846*cdf0e10cSrcweir // -----------------------------------------------------------------------------
847*cdf0e10cSrcweir sal_Bool OApplicationDetailView::isALeafSelected() const
848*cdf0e10cSrcweir {
849*cdf0e10cSrcweir 	DBG_CHKTHIS(OApplicationDetailView,NULL);
850*cdf0e10cSrcweir 	return m_pControlHelper->isALeafSelected();
851*cdf0e10cSrcweir }
852*cdf0e10cSrcweir // -----------------------------------------------------------------------------
853*cdf0e10cSrcweir void OApplicationDetailView::selectAll()
854*cdf0e10cSrcweir {
855*cdf0e10cSrcweir 	DBG_CHKTHIS(OApplicationDetailView,NULL);
856*cdf0e10cSrcweir 	m_pControlHelper->selectAll();
857*cdf0e10cSrcweir }
858*cdf0e10cSrcweir // -----------------------------------------------------------------------------
859*cdf0e10cSrcweir void OApplicationDetailView::sortDown()
860*cdf0e10cSrcweir {
861*cdf0e10cSrcweir 	DBG_CHKTHIS(OApplicationDetailView,NULL);
862*cdf0e10cSrcweir 	m_pControlHelper->sortDown();
863*cdf0e10cSrcweir }
864*cdf0e10cSrcweir // -----------------------------------------------------------------------------
865*cdf0e10cSrcweir void OApplicationDetailView::sortUp()
866*cdf0e10cSrcweir {
867*cdf0e10cSrcweir 	DBG_CHKTHIS(OApplicationDetailView,NULL);
868*cdf0e10cSrcweir 	m_pControlHelper->sortUp();
869*cdf0e10cSrcweir }
870*cdf0e10cSrcweir // -----------------------------------------------------------------------------
871*cdf0e10cSrcweir sal_Bool OApplicationDetailView::isFilled() const
872*cdf0e10cSrcweir {
873*cdf0e10cSrcweir 	DBG_CHKTHIS(OApplicationDetailView,NULL);
874*cdf0e10cSrcweir 	return m_pControlHelper->isFilled();
875*cdf0e10cSrcweir }
876*cdf0e10cSrcweir // -----------------------------------------------------------------------------
877*cdf0e10cSrcweir ElementType OApplicationDetailView::getElementType() const
878*cdf0e10cSrcweir {
879*cdf0e10cSrcweir 	DBG_CHKTHIS(OApplicationDetailView,NULL);
880*cdf0e10cSrcweir 	return m_pControlHelper->getElementType();
881*cdf0e10cSrcweir }
882*cdf0e10cSrcweir // -----------------------------------------------------------------------------
883*cdf0e10cSrcweir void OApplicationDetailView::clearPages(sal_Bool _bTaskAlso)
884*cdf0e10cSrcweir {
885*cdf0e10cSrcweir 	DBG_CHKTHIS(OApplicationDetailView,NULL);
886*cdf0e10cSrcweir 	if ( _bTaskAlso )
887*cdf0e10cSrcweir 		getTasksWindow().Clear();
888*cdf0e10cSrcweir 	m_pControlHelper->clearPages();
889*cdf0e10cSrcweir }
890*cdf0e10cSrcweir // -----------------------------------------------------------------------------
891*cdf0e10cSrcweir sal_Int32 OApplicationDetailView::getSelectionCount()
892*cdf0e10cSrcweir {
893*cdf0e10cSrcweir 	DBG_CHKTHIS(OApplicationDetailView,NULL);
894*cdf0e10cSrcweir 	return m_pControlHelper->getSelectionCount();
895*cdf0e10cSrcweir }
896*cdf0e10cSrcweir // -----------------------------------------------------------------------------
897*cdf0e10cSrcweir sal_Int32 OApplicationDetailView::getElementCount()
898*cdf0e10cSrcweir {
899*cdf0e10cSrcweir 	DBG_CHKTHIS(OApplicationDetailView,NULL);
900*cdf0e10cSrcweir 	return m_pControlHelper->getElementCount();
901*cdf0e10cSrcweir }
902*cdf0e10cSrcweir 
903*cdf0e10cSrcweir // -----------------------------------------------------------------------------
904*cdf0e10cSrcweir void OApplicationDetailView::getSelectionElementNames( ::std::vector< ::rtl::OUString>& _rNames ) const
905*cdf0e10cSrcweir {
906*cdf0e10cSrcweir 	DBG_CHKTHIS(OApplicationDetailView,NULL);
907*cdf0e10cSrcweir 	m_pControlHelper->getSelectionElementNames( _rNames );
908*cdf0e10cSrcweir }
909*cdf0e10cSrcweir // -----------------------------------------------------------------------------
910*cdf0e10cSrcweir void OApplicationDetailView::describeCurrentSelectionForControl( const Control& _rControl, Sequence< NamedDatabaseObject >& _out_rSelectedObjects )
911*cdf0e10cSrcweir {
912*cdf0e10cSrcweir 	DBG_CHKTHIS(OApplicationDetailView,NULL);
913*cdf0e10cSrcweir 	m_pControlHelper->describeCurrentSelectionForControl( _rControl, _out_rSelectedObjects );
914*cdf0e10cSrcweir }
915*cdf0e10cSrcweir // -----------------------------------------------------------------------------
916*cdf0e10cSrcweir void OApplicationDetailView::describeCurrentSelectionForType( const ElementType _eType, Sequence< NamedDatabaseObject >& _out_rSelectedObjects )
917*cdf0e10cSrcweir {
918*cdf0e10cSrcweir 	DBG_CHKTHIS(OApplicationDetailView,NULL);
919*cdf0e10cSrcweir 	m_pControlHelper->describeCurrentSelectionForType( _eType, _out_rSelectedObjects );
920*cdf0e10cSrcweir }
921*cdf0e10cSrcweir // -----------------------------------------------------------------------------
922*cdf0e10cSrcweir void OApplicationDetailView::selectElements(const Sequence< ::rtl::OUString>& _aNames)
923*cdf0e10cSrcweir {
924*cdf0e10cSrcweir     DBG_CHKTHIS(OApplicationDetailView,NULL);
925*cdf0e10cSrcweir 	m_pControlHelper->selectElements( _aNames );
926*cdf0e10cSrcweir }
927*cdf0e10cSrcweir // -----------------------------------------------------------------------------
928*cdf0e10cSrcweir SvLBoxEntry* OApplicationDetailView::getEntry( const Point& _aPoint ) const
929*cdf0e10cSrcweir {
930*cdf0e10cSrcweir 	DBG_CHKTHIS(OApplicationDetailView,NULL);
931*cdf0e10cSrcweir 	return m_pControlHelper->getEntry(_aPoint);
932*cdf0e10cSrcweir }
933*cdf0e10cSrcweir // -----------------------------------------------------------------------------
934*cdf0e10cSrcweir sal_Bool OApplicationDetailView::isCutAllowed()
935*cdf0e10cSrcweir {
936*cdf0e10cSrcweir 	DBG_CHKTHIS(OApplicationDetailView,NULL);
937*cdf0e10cSrcweir 	return m_pControlHelper->isCutAllowed();
938*cdf0e10cSrcweir }
939*cdf0e10cSrcweir sal_Bool OApplicationDetailView::isCopyAllowed()
940*cdf0e10cSrcweir {
941*cdf0e10cSrcweir 	DBG_CHKTHIS(OApplicationDetailView,NULL);
942*cdf0e10cSrcweir 	return m_pControlHelper->isCopyAllowed();
943*cdf0e10cSrcweir }
944*cdf0e10cSrcweir sal_Bool OApplicationDetailView::isPasteAllowed()	{ DBG_CHKTHIS(OApplicationDetailView,NULL);return m_pControlHelper->isPasteAllowed(); }
945*cdf0e10cSrcweir void OApplicationDetailView::copy()	{ DBG_CHKTHIS(OApplicationDetailView,NULL);m_pControlHelper->copy(); }
946*cdf0e10cSrcweir void OApplicationDetailView::cut()	{ DBG_CHKTHIS(OApplicationDetailView,NULL);m_pControlHelper->cut(); }
947*cdf0e10cSrcweir void OApplicationDetailView::paste()
948*cdf0e10cSrcweir {
949*cdf0e10cSrcweir 	DBG_CHKTHIS(OApplicationDetailView,NULL);
950*cdf0e10cSrcweir 	m_pControlHelper->paste();
951*cdf0e10cSrcweir }
952*cdf0e10cSrcweir // -----------------------------------------------------------------------------
953*cdf0e10cSrcweir SvLBoxEntry*  OApplicationDetailView::elementAdded(ElementType _eType,const ::rtl::OUString& _rName, const Any& _rObject )
954*cdf0e10cSrcweir {
955*cdf0e10cSrcweir 	DBG_CHKTHIS(OApplicationDetailView,NULL);
956*cdf0e10cSrcweir 	return m_pControlHelper->elementAdded(_eType,_rName, _rObject );
957*cdf0e10cSrcweir }
958*cdf0e10cSrcweir // -----------------------------------------------------------------------------
959*cdf0e10cSrcweir void OApplicationDetailView::elementRemoved(ElementType _eType,const ::rtl::OUString& _rName )
960*cdf0e10cSrcweir {
961*cdf0e10cSrcweir 	DBG_CHKTHIS(OApplicationDetailView,NULL);
962*cdf0e10cSrcweir 	m_pControlHelper->elementRemoved(_eType,_rName );
963*cdf0e10cSrcweir }
964*cdf0e10cSrcweir // -----------------------------------------------------------------------------
965*cdf0e10cSrcweir void OApplicationDetailView::elementReplaced(ElementType _eType
966*cdf0e10cSrcweir 													,const ::rtl::OUString& _rOldName
967*cdf0e10cSrcweir 													,const ::rtl::OUString& _rNewName )
968*cdf0e10cSrcweir {
969*cdf0e10cSrcweir 	DBG_CHKTHIS(OApplicationDetailView,NULL);
970*cdf0e10cSrcweir 	m_pControlHelper->elementReplaced( _eType, _rOldName, _rNewName );
971*cdf0e10cSrcweir }
972*cdf0e10cSrcweir // -----------------------------------------------------------------------------
973*cdf0e10cSrcweir PreviewMode OApplicationDetailView::getPreviewMode()
974*cdf0e10cSrcweir {
975*cdf0e10cSrcweir 	DBG_CHKTHIS(OApplicationDetailView,NULL);
976*cdf0e10cSrcweir 	return m_pControlHelper->getPreviewMode();
977*cdf0e10cSrcweir }
978*cdf0e10cSrcweir // -----------------------------------------------------------------------------
979*cdf0e10cSrcweir sal_Bool OApplicationDetailView::isPreviewEnabled()
980*cdf0e10cSrcweir {
981*cdf0e10cSrcweir 	DBG_CHKTHIS(OApplicationDetailView,NULL);
982*cdf0e10cSrcweir 	return m_pControlHelper->isPreviewEnabled();
983*cdf0e10cSrcweir }
984*cdf0e10cSrcweir // -----------------------------------------------------------------------------
985*cdf0e10cSrcweir void OApplicationDetailView::switchPreview(PreviewMode _eMode)
986*cdf0e10cSrcweir {
987*cdf0e10cSrcweir 	DBG_CHKTHIS(OApplicationDetailView,NULL);
988*cdf0e10cSrcweir 	m_pControlHelper->switchPreview(_eMode);
989*cdf0e10cSrcweir }
990*cdf0e10cSrcweir // -----------------------------------------------------------------------------
991*cdf0e10cSrcweir void OApplicationDetailView::showPreview(const Reference< XContent >& _xContent)
992*cdf0e10cSrcweir {
993*cdf0e10cSrcweir 	DBG_CHKTHIS(OApplicationDetailView,NULL);
994*cdf0e10cSrcweir 	m_pControlHelper->showPreview(_xContent);
995*cdf0e10cSrcweir }
996*cdf0e10cSrcweir // -----------------------------------------------------------------------------
997*cdf0e10cSrcweir void OApplicationDetailView::showPreview(	const ::rtl::OUString& _sDataSourceName,
998*cdf0e10cSrcweir 											const ::rtl::OUString& _sName,
999*cdf0e10cSrcweir 											sal_Bool _bTable)
1000*cdf0e10cSrcweir {
1001*cdf0e10cSrcweir 	DBG_CHKTHIS(OApplicationDetailView,NULL);
1002*cdf0e10cSrcweir 	m_pControlHelper->showPreview(_sDataSourceName,_sName,_bTable);
1003*cdf0e10cSrcweir }
1004*cdf0e10cSrcweir // -----------------------------------------------------------------------------
1005*cdf0e10cSrcweir sal_Bool OApplicationDetailView::isSortUp() const
1006*cdf0e10cSrcweir {
1007*cdf0e10cSrcweir 	DBG_CHKTHIS(OApplicationDetailView,NULL);
1008*cdf0e10cSrcweir 	return m_pControlHelper->isSortUp();
1009*cdf0e10cSrcweir }
1010*cdf0e10cSrcweir // -----------------------------------------------------------------------------
1011*cdf0e10cSrcweir Window* OApplicationDetailView::getTreeWindow() const
1012*cdf0e10cSrcweir {
1013*cdf0e10cSrcweir     return m_pControlHelper->getCurrentView();
1014*cdf0e10cSrcweir }
1015*cdf0e10cSrcweir 
1016