1*2ee96f1cSAndrew Rist /**************************************************************
2cdf0e10cSrcweir *
3*2ee96f1cSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
4*2ee96f1cSAndrew Rist * or more contributor license agreements. See the NOTICE file
5*2ee96f1cSAndrew Rist * distributed with this work for additional information
6*2ee96f1cSAndrew Rist * regarding copyright ownership. The ASF licenses this file
7*2ee96f1cSAndrew Rist * to you under the Apache License, Version 2.0 (the
8*2ee96f1cSAndrew Rist * "License"); you may not use this file except in compliance
9*2ee96f1cSAndrew Rist * with the License. You may obtain a copy of the License at
10*2ee96f1cSAndrew Rist *
11*2ee96f1cSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0
12*2ee96f1cSAndrew Rist *
13*2ee96f1cSAndrew Rist * Unless required by applicable law or agreed to in writing,
14*2ee96f1cSAndrew Rist * software distributed under the License is distributed on an
15*2ee96f1cSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*2ee96f1cSAndrew Rist * KIND, either express or implied. See the License for the
17*2ee96f1cSAndrew Rist * specific language governing permissions and limitations
18*2ee96f1cSAndrew Rist * under the License.
19*2ee96f1cSAndrew Rist *
20*2ee96f1cSAndrew Rist *************************************************************/
21*2ee96f1cSAndrew Rist
22*2ee96f1cSAndrew Rist
23cdf0e10cSrcweir
24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
25cdf0e10cSrcweir #include "precompiled_cui.hxx"
26cdf0e10cSrcweir
27cdf0e10cSrcweir // include ---------------------------------------------------------------
28cdf0e10cSrcweir #include <tools/debug.hxx>
29cdf0e10cSrcweir #include <tools/urlobj.hxx>
30cdf0e10cSrcweir #include <vcl/msgbox.hxx>
31cdf0e10cSrcweir #include <sfx2/filedlghelper.hxx>
32cdf0e10cSrcweir
33cdf0e10cSrcweir #include "multipat.hxx"
34cdf0e10cSrcweir #include <dialmgr.hxx>
35cdf0e10cSrcweir
36cdf0e10cSrcweir #include "multipat.hrc"
37cdf0e10cSrcweir #include <cuires.hrc>
38cdf0e10cSrcweir #include <comphelper/processfactory.hxx>
39cdf0e10cSrcweir #include <com/sun/star/lang/XMultiServiceFactory.hpp>
40cdf0e10cSrcweir #include <com/sun/star/ui/dialogs/XFolderPicker.hpp>
41cdf0e10cSrcweir #include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp>
42cdf0e10cSrcweir
43cdf0e10cSrcweir #include <unotools/localfilehelper.hxx>
44cdf0e10cSrcweir #include <unotools/pathoptions.hxx>
45cdf0e10cSrcweir
46cdf0e10cSrcweir using namespace ::com::sun::star::lang;
47cdf0e10cSrcweir using namespace ::com::sun::star::ui::dialogs;
48cdf0e10cSrcweir using namespace ::com::sun::star::uno;
49cdf0e10cSrcweir
50cdf0e10cSrcweir // struct MultiPath_Impl -------------------------------------------------
51cdf0e10cSrcweir
52cdf0e10cSrcweir struct MultiPath_Impl
53cdf0e10cSrcweir {
54cdf0e10cSrcweir sal_Bool bEmptyAllowed;
55cdf0e10cSrcweir sal_Bool bIsClassPathMode;
56cdf0e10cSrcweir bool bIsRadioButtonMode;
57cdf0e10cSrcweir
MultiPath_ImplMultiPath_Impl58cdf0e10cSrcweir MultiPath_Impl( sal_Bool bAllowed ) :
59cdf0e10cSrcweir bEmptyAllowed( bAllowed ), bIsClassPathMode( sal_False ), bIsRadioButtonMode( false ) {}
60cdf0e10cSrcweir };
61cdf0e10cSrcweir
62cdf0e10cSrcweir // class SvxMultiPathDialog ----------------------------------------------
63cdf0e10cSrcweir
IMPL_LINK(SvxMultiPathDialog,SelectHdl_Impl,void *,EMPTYARG)64cdf0e10cSrcweir IMPL_LINK( SvxMultiPathDialog, SelectHdl_Impl, void *, EMPTYARG )
65cdf0e10cSrcweir {
66cdf0e10cSrcweir sal_uLong nCount = pImpl->bIsRadioButtonMode ? aRadioLB.GetEntryCount() : aPathLB.GetEntryCount();
67cdf0e10cSrcweir bool bIsSelected = pImpl->bIsRadioButtonMode
68cdf0e10cSrcweir ? aRadioLB.FirstSelected() != NULL
69cdf0e10cSrcweir : aPathLB.GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND;
70cdf0e10cSrcweir sal_Bool bEnable = ( pImpl->bEmptyAllowed || nCount > 1 );
71cdf0e10cSrcweir aDelBtn.Enable( bEnable && bIsSelected );
72cdf0e10cSrcweir return 0;
73cdf0e10cSrcweir }
74cdf0e10cSrcweir
75cdf0e10cSrcweir // -----------------------------------------------------------------------
76cdf0e10cSrcweir
IMPL_LINK(SvxMultiPathDialog,CheckHdl_Impl,svx::SvxRadioButtonListBox *,pBox)77cdf0e10cSrcweir IMPL_LINK( SvxMultiPathDialog, CheckHdl_Impl, svx::SvxRadioButtonListBox *, pBox )
78cdf0e10cSrcweir {
79cdf0e10cSrcweir SvLBoxEntry* pEntry =
80cdf0e10cSrcweir pBox ? pBox->GetEntry( pBox->GetCurMousePoint() ) : aRadioLB.FirstSelected();
81cdf0e10cSrcweir if ( pEntry )
82cdf0e10cSrcweir aRadioLB.HandleEntryChecked( pEntry );
83cdf0e10cSrcweir return 0;
84cdf0e10cSrcweir }
85cdf0e10cSrcweir
86cdf0e10cSrcweir // -----------------------------------------------------------------------
87cdf0e10cSrcweir
IMPL_LINK(SvxMultiPathDialog,AddHdl_Impl,PushButton *,EMPTYARG)88cdf0e10cSrcweir IMPL_LINK( SvxMultiPathDialog, AddHdl_Impl, PushButton *, EMPTYARG )
89cdf0e10cSrcweir {
90cdf0e10cSrcweir rtl::OUString aService( RTL_CONSTASCII_USTRINGPARAM( FOLDER_PICKER_SERVICE_NAME ) );
91cdf0e10cSrcweir Reference < XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory() );
92cdf0e10cSrcweir Reference < XFolderPicker > xFolderPicker( xFactory->createInstance( aService ), UNO_QUERY );
93cdf0e10cSrcweir
94cdf0e10cSrcweir if ( xFolderPicker->execute() == ExecutableDialogResults::OK )
95cdf0e10cSrcweir {
96cdf0e10cSrcweir INetURLObject aPath( xFolderPicker->getDirectory() );
97cdf0e10cSrcweir aPath.removeFinalSlash();
98cdf0e10cSrcweir String aURL = aPath.GetMainURL( INetURLObject::NO_DECODE );
99cdf0e10cSrcweir String sInsPath;
100cdf0e10cSrcweir ::utl::LocalFileHelper::ConvertURLToSystemPath( aURL, sInsPath );
101cdf0e10cSrcweir
102cdf0e10cSrcweir if ( pImpl->bIsRadioButtonMode )
103cdf0e10cSrcweir {
104cdf0e10cSrcweir sal_uLong nPos = aRadioLB.GetEntryPos( sInsPath, 1 );
105cdf0e10cSrcweir if ( 0xffffffff == nPos ) //See svtools/source/contnr/svtabbx.cxx SvTabListBox::GetEntryPos
106cdf0e10cSrcweir {
107cdf0e10cSrcweir String sNewEntry( '\t' );
108cdf0e10cSrcweir sNewEntry += sInsPath;
109cdf0e10cSrcweir SvLBoxEntry* pEntry = aRadioLB.InsertEntry( sNewEntry );
110cdf0e10cSrcweir String* pData = new String( aURL );
111cdf0e10cSrcweir pEntry->SetUserData( pData );
112cdf0e10cSrcweir }
113cdf0e10cSrcweir else
114cdf0e10cSrcweir {
115cdf0e10cSrcweir String sMsg( CUI_RES( RID_MULTIPATH_DBL_ERR ) );
116cdf0e10cSrcweir sMsg.SearchAndReplaceAscii( "%1", sInsPath );
117cdf0e10cSrcweir InfoBox( this, sMsg ).Execute();
118cdf0e10cSrcweir }
119cdf0e10cSrcweir }
120cdf0e10cSrcweir else
121cdf0e10cSrcweir {
122cdf0e10cSrcweir if ( LISTBOX_ENTRY_NOTFOUND != aPathLB.GetEntryPos( sInsPath ) )
123cdf0e10cSrcweir {
124cdf0e10cSrcweir String sMsg( CUI_RES( RID_MULTIPATH_DBL_ERR ) );
125cdf0e10cSrcweir sMsg.SearchAndReplaceAscii( "%1", sInsPath );
126cdf0e10cSrcweir InfoBox( this, sMsg ).Execute();
127cdf0e10cSrcweir }
128cdf0e10cSrcweir else
129cdf0e10cSrcweir {
130cdf0e10cSrcweir sal_uInt16 nPos = aPathLB.InsertEntry( sInsPath, LISTBOX_APPEND );
131cdf0e10cSrcweir aPathLB.SetEntryData( nPos, (void*)new String( aURL ) );
132cdf0e10cSrcweir }
133cdf0e10cSrcweir }
134cdf0e10cSrcweir SelectHdl_Impl( NULL );
135cdf0e10cSrcweir }
136cdf0e10cSrcweir return 0;
137cdf0e10cSrcweir }
138cdf0e10cSrcweir
139cdf0e10cSrcweir // -----------------------------------------------------------------------
140cdf0e10cSrcweir
IMPL_LINK(SvxMultiPathDialog,DelHdl_Impl,PushButton *,EMPTYARG)141cdf0e10cSrcweir IMPL_LINK( SvxMultiPathDialog, DelHdl_Impl, PushButton *, EMPTYARG )
142cdf0e10cSrcweir {
143cdf0e10cSrcweir if ( pImpl->bIsRadioButtonMode )
144cdf0e10cSrcweir {
145cdf0e10cSrcweir SvLBoxEntry* pEntry = aRadioLB.FirstSelected();
146cdf0e10cSrcweir delete (String*)pEntry->GetUserData();
147cdf0e10cSrcweir bool bChecked = aRadioLB.GetCheckButtonState( pEntry ) == SV_BUTTON_CHECKED;
148cdf0e10cSrcweir sal_uLong nPos = aRadioLB.GetEntryPos( pEntry );
149cdf0e10cSrcweir aRadioLB.RemoveEntry( pEntry );
150cdf0e10cSrcweir sal_uLong nCnt = aRadioLB.GetEntryCount();
151cdf0e10cSrcweir if ( nCnt )
152cdf0e10cSrcweir {
153cdf0e10cSrcweir nCnt--;
154cdf0e10cSrcweir if ( nPos > nCnt )
155cdf0e10cSrcweir nPos = nCnt;
156cdf0e10cSrcweir pEntry = aRadioLB.GetEntry( nPos );
157cdf0e10cSrcweir if ( bChecked )
158cdf0e10cSrcweir {
159cdf0e10cSrcweir aRadioLB.SetCheckButtonState( pEntry, SV_BUTTON_CHECKED );
160cdf0e10cSrcweir aRadioLB.HandleEntryChecked( pEntry );
161cdf0e10cSrcweir }
162cdf0e10cSrcweir else
163cdf0e10cSrcweir aRadioLB.Select( pEntry );
164cdf0e10cSrcweir }
165cdf0e10cSrcweir }
166cdf0e10cSrcweir else
167cdf0e10cSrcweir {
168cdf0e10cSrcweir sal_uInt16 nPos = aPathLB.GetSelectEntryPos();
169cdf0e10cSrcweir aPathLB.RemoveEntry( nPos );
170cdf0e10cSrcweir sal_uInt16 nCnt = aPathLB.GetEntryCount();
171cdf0e10cSrcweir
172cdf0e10cSrcweir if ( nCnt )
173cdf0e10cSrcweir {
174cdf0e10cSrcweir nCnt--;
175cdf0e10cSrcweir
176cdf0e10cSrcweir if ( nPos > nCnt )
177cdf0e10cSrcweir nPos = nCnt;
178cdf0e10cSrcweir aPathLB.SelectEntryPos( nPos );
179cdf0e10cSrcweir }
180cdf0e10cSrcweir }
181cdf0e10cSrcweir SelectHdl_Impl( NULL );
182cdf0e10cSrcweir return 0;
183cdf0e10cSrcweir }
184cdf0e10cSrcweir
185cdf0e10cSrcweir // -----------------------------------------------------------------------
186cdf0e10cSrcweir
SvxMultiPathDialog(Window * pParent,sal_Bool bEmptyAllowed)187cdf0e10cSrcweir SvxMultiPathDialog::SvxMultiPathDialog( Window* pParent, sal_Bool bEmptyAllowed ) :
188cdf0e10cSrcweir
189cdf0e10cSrcweir ModalDialog( pParent, CUI_RES( RID_SVXDLG_MULTIPATH ) ),
190cdf0e10cSrcweir
191cdf0e10cSrcweir aPathFL ( this, CUI_RES( FL_MULTIPATH) ),
192cdf0e10cSrcweir aPathLB ( this, CUI_RES( LB_MULTIPATH ) ),
193cdf0e10cSrcweir aRadioLB ( this, CUI_RES( LB_RADIOBUTTON ) ),
194cdf0e10cSrcweir aRadioFT ( this, CUI_RES( FT_RADIOBUTTON ) ),
195cdf0e10cSrcweir aAddBtn ( this, CUI_RES( BTN_ADD_MULTIPATH ) ),
196cdf0e10cSrcweir aDelBtn ( this, CUI_RES( BTN_DEL_MULTIPATH ) ),
197cdf0e10cSrcweir aOKBtn ( this, CUI_RES( BTN_MULTIPATH_OK ) ),
198cdf0e10cSrcweir aCancelBtn ( this, CUI_RES( BTN_MULTIPATH_CANCEL ) ),
199cdf0e10cSrcweir aHelpButton ( this, CUI_RES( BTN_MULTIPATH_HELP ) ),
200cdf0e10cSrcweir pImpl ( new MultiPath_Impl( bEmptyAllowed ) )
201cdf0e10cSrcweir
202cdf0e10cSrcweir {
203cdf0e10cSrcweir static long aStaticTabs[]= { 2, 0, 12 };
204cdf0e10cSrcweir aRadioLB.SvxSimpleTable::SetTabs( aStaticTabs );
205cdf0e10cSrcweir String sHeader( CUI_RES( STR_HEADER_PATHS ) );
206cdf0e10cSrcweir aRadioLB.SetQuickHelpText( sHeader );
207cdf0e10cSrcweir sHeader.Insert( '\t', 0 );
208cdf0e10cSrcweir aRadioLB.InsertHeaderEntry( sHeader, HEADERBAR_APPEND, HIB_LEFT );
209cdf0e10cSrcweir
210cdf0e10cSrcweir FreeResource();
211cdf0e10cSrcweir
212cdf0e10cSrcweir aPathLB.SetSelectHdl( LINK( this, SvxMultiPathDialog, SelectHdl_Impl ) );
213cdf0e10cSrcweir aRadioLB.SetSelectHdl( LINK( this, SvxMultiPathDialog, SelectHdl_Impl ) );
214cdf0e10cSrcweir aRadioLB.SetCheckButtonHdl( LINK( this, SvxMultiPathDialog, CheckHdl_Impl ) );
215cdf0e10cSrcweir aAddBtn.SetClickHdl( LINK( this, SvxMultiPathDialog, AddHdl_Impl ) );
216cdf0e10cSrcweir aDelBtn.SetClickHdl( LINK( this, SvxMultiPathDialog, DelHdl_Impl ) );
217cdf0e10cSrcweir
218cdf0e10cSrcweir SelectHdl_Impl( NULL );
219cdf0e10cSrcweir
220cdf0e10cSrcweir aAddBtn.SetAccessibleRelationMemberOf(&aPathLB);
221cdf0e10cSrcweir aDelBtn.SetAccessibleRelationMemberOf(&aPathLB);
222cdf0e10cSrcweir }
223cdf0e10cSrcweir
224cdf0e10cSrcweir // -----------------------------------------------------------------------
225cdf0e10cSrcweir
~SvxMultiPathDialog()226cdf0e10cSrcweir SvxMultiPathDialog::~SvxMultiPathDialog()
227cdf0e10cSrcweir {
228cdf0e10cSrcweir sal_uInt16 nPos = aPathLB.GetEntryCount();
229cdf0e10cSrcweir while ( nPos-- )
230cdf0e10cSrcweir delete (String*)aPathLB.GetEntryData(nPos);
231cdf0e10cSrcweir nPos = (sal_uInt16)aRadioLB.GetEntryCount();
232cdf0e10cSrcweir while ( nPos-- )
233cdf0e10cSrcweir {
234cdf0e10cSrcweir SvLBoxEntry* pEntry = aRadioLB.GetEntry( nPos );
235cdf0e10cSrcweir delete (String*)pEntry->GetUserData();
236cdf0e10cSrcweir }
237cdf0e10cSrcweir delete pImpl;
238cdf0e10cSrcweir }
239cdf0e10cSrcweir
240cdf0e10cSrcweir // -----------------------------------------------------------------------
241cdf0e10cSrcweir
GetPath() const242cdf0e10cSrcweir String SvxMultiPathDialog::GetPath() const
243cdf0e10cSrcweir {
244cdf0e10cSrcweir String sNewPath;
245cdf0e10cSrcweir sal_Unicode cDelim = pImpl->bIsClassPathMode ? CLASSPATH_DELIMITER : SVT_SEARCHPATH_DELIMITER;
246cdf0e10cSrcweir
247cdf0e10cSrcweir if ( pImpl->bIsRadioButtonMode )
248cdf0e10cSrcweir {
249cdf0e10cSrcweir String sWritable;
250cdf0e10cSrcweir for ( sal_uInt16 i = 0; i < aRadioLB.GetEntryCount(); ++i )
251cdf0e10cSrcweir {
252cdf0e10cSrcweir SvLBoxEntry* pEntry = aRadioLB.GetEntry(i);
253cdf0e10cSrcweir if ( aRadioLB.GetCheckButtonState( pEntry ) == SV_BUTTON_CHECKED )
254cdf0e10cSrcweir sWritable = *(String*)pEntry->GetUserData();
255cdf0e10cSrcweir else
256cdf0e10cSrcweir {
257cdf0e10cSrcweir if ( sNewPath.Len() > 0 )
258cdf0e10cSrcweir sNewPath += cDelim;
259cdf0e10cSrcweir sNewPath += *(String*)pEntry->GetUserData();
260cdf0e10cSrcweir }
261cdf0e10cSrcweir }
262cdf0e10cSrcweir if ( sNewPath.Len() > 0 )
263cdf0e10cSrcweir sNewPath += cDelim;
264cdf0e10cSrcweir sNewPath += sWritable;
265cdf0e10cSrcweir }
266cdf0e10cSrcweir else
267cdf0e10cSrcweir {
268cdf0e10cSrcweir for ( sal_uInt16 i = 0; i < aPathLB.GetEntryCount(); ++i )
269cdf0e10cSrcweir {
270cdf0e10cSrcweir if ( sNewPath.Len() > 0 )
271cdf0e10cSrcweir sNewPath += cDelim;
272cdf0e10cSrcweir sNewPath += *(String*)aPathLB.GetEntryData(i);
273cdf0e10cSrcweir }
274cdf0e10cSrcweir }
275cdf0e10cSrcweir return sNewPath;
276cdf0e10cSrcweir }
277cdf0e10cSrcweir
278cdf0e10cSrcweir // -----------------------------------------------------------------------
279cdf0e10cSrcweir
SetPath(const String & rPath)280cdf0e10cSrcweir void SvxMultiPathDialog::SetPath( const String& rPath )
281cdf0e10cSrcweir {
282cdf0e10cSrcweir sal_Unicode cDelim = pImpl->bIsClassPathMode ? CLASSPATH_DELIMITER : SVT_SEARCHPATH_DELIMITER;
283cdf0e10cSrcweir sal_uInt16 nPos, nCount = rPath.GetTokenCount( cDelim );
284cdf0e10cSrcweir
285cdf0e10cSrcweir for ( sal_uInt16 i = 0; i < nCount; ++i )
286cdf0e10cSrcweir {
287cdf0e10cSrcweir String sPath = rPath.GetToken( i, cDelim );
288cdf0e10cSrcweir String sSystemPath;
289cdf0e10cSrcweir sal_Bool bIsSystemPath =
290cdf0e10cSrcweir ::utl::LocalFileHelper::ConvertURLToSystemPath( sPath, sSystemPath );
291cdf0e10cSrcweir
292cdf0e10cSrcweir if ( pImpl->bIsRadioButtonMode )
293cdf0e10cSrcweir {
294cdf0e10cSrcweir String sEntry( '\t' );
295cdf0e10cSrcweir sEntry += bIsSystemPath ? sSystemPath : sPath;
296cdf0e10cSrcweir SvLBoxEntry* pEntry = aRadioLB.InsertEntry( sEntry );
297cdf0e10cSrcweir String* pURL = new String( sPath );
298cdf0e10cSrcweir pEntry->SetUserData( pURL );
299cdf0e10cSrcweir }
300cdf0e10cSrcweir else
301cdf0e10cSrcweir {
302cdf0e10cSrcweir if ( bIsSystemPath )
303cdf0e10cSrcweir nPos = aPathLB.InsertEntry( sSystemPath, LISTBOX_APPEND );
304cdf0e10cSrcweir else
305cdf0e10cSrcweir nPos = aPathLB.InsertEntry( sPath, LISTBOX_APPEND );
306cdf0e10cSrcweir aPathLB.SetEntryData( nPos, (void*)new String( sPath ) );
307cdf0e10cSrcweir }
308cdf0e10cSrcweir }
309cdf0e10cSrcweir
310cdf0e10cSrcweir if ( pImpl->bIsRadioButtonMode && nCount > 0 )
311cdf0e10cSrcweir {
312cdf0e10cSrcweir SvLBoxEntry* pEntry = aRadioLB.GetEntry( nCount - 1 );
313cdf0e10cSrcweir if ( pEntry )
314cdf0e10cSrcweir {
315cdf0e10cSrcweir aRadioLB.SetCheckButtonState( pEntry, SV_BUTTON_CHECKED );
316cdf0e10cSrcweir aRadioLB.HandleEntryChecked( pEntry );
317cdf0e10cSrcweir }
318cdf0e10cSrcweir }
319cdf0e10cSrcweir
320cdf0e10cSrcweir SelectHdl_Impl( NULL );
321cdf0e10cSrcweir }
322cdf0e10cSrcweir
323cdf0e10cSrcweir // -----------------------------------------------------------------------
324cdf0e10cSrcweir
SetClassPathMode()325cdf0e10cSrcweir void SvxMultiPathDialog::SetClassPathMode()
326cdf0e10cSrcweir {
327cdf0e10cSrcweir pImpl->bIsClassPathMode = sal_True;
328cdf0e10cSrcweir SetText( CUI_RES( RID_SVXSTR_ARCHIVE_TITLE ));
329cdf0e10cSrcweir aPathFL.SetText( CUI_RES( RID_SVXSTR_ARCHIVE_HEADLINE ) );
330cdf0e10cSrcweir }
331cdf0e10cSrcweir
332cdf0e10cSrcweir // -----------------------------------------------------------------------
333cdf0e10cSrcweir
IsClassPathMode() const334cdf0e10cSrcweir sal_Bool SvxMultiPathDialog::IsClassPathMode() const
335cdf0e10cSrcweir {
336cdf0e10cSrcweir return pImpl->bIsClassPathMode;
337cdf0e10cSrcweir }
338cdf0e10cSrcweir
339cdf0e10cSrcweir // -----------------------------------------------------------------------
340cdf0e10cSrcweir
EnableRadioButtonMode()341cdf0e10cSrcweir void SvxMultiPathDialog::EnableRadioButtonMode()
342cdf0e10cSrcweir {
343cdf0e10cSrcweir pImpl->bIsRadioButtonMode = true;
344cdf0e10cSrcweir
345cdf0e10cSrcweir aPathFL.Hide();
346cdf0e10cSrcweir aPathLB.Hide();
347cdf0e10cSrcweir
348cdf0e10cSrcweir aRadioLB.ShowTable();
349cdf0e10cSrcweir aRadioFT.Show();
350cdf0e10cSrcweir
351cdf0e10cSrcweir Point aNewPos = aAddBtn.GetPosPixel();
352cdf0e10cSrcweir long nDelta = aNewPos.Y() - aRadioLB.GetPosPixel().Y();
353cdf0e10cSrcweir aNewPos.Y() -= nDelta;
354cdf0e10cSrcweir aAddBtn.SetPosPixel( aNewPos );
355cdf0e10cSrcweir aNewPos = aDelBtn.GetPosPixel();
356cdf0e10cSrcweir aNewPos.Y() -= nDelta;
357cdf0e10cSrcweir aDelBtn.SetPosPixel( aNewPos );
358cdf0e10cSrcweir }
359cdf0e10cSrcweir
360