1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: optpath.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _SVX_OPTPATH_HXX
31 #define _SVX_OPTPATH_HXX
33 // include ---------------------------------------------------------------
35 #include <sfx2/tabdlg.hxx>
36 #ifndef _FIXED_HXX //autogen
37 #include <vcl/fixed.hxx>
39 #ifndef _GROUP_HXX //autogen
40 #include <vcl/group.hxx>
43 #ifdef _SVX_OPTPATH_CXX
44 #include <svtools/headbar.hxx>
48 #include "ControlFocusHelper.hxx"
50 #ifndef _COM_SUN_STAR_UI_XFOLDERPICKER_HPP_
51 #include <com/sun/star/ui/dialogs/XFolderPicker.hpp>
53 #include <svtools/dialogclosedlistener.hxx>
55 // forward ---------------------------------------------------------------
60 class OptHeaderTabListBox
;
65 // define ----------------------------------------------------------------
67 #define SfxPathTabPage SvxPathTabPage
69 // class SvxPathTabPage --------------------------------------------------
71 class SvxPathTabPage
: public SfxTabPage
76 SvxControlFocusHelper aPathCtrl
;
77 PushButton aStandardBtn
;
81 HeaderBar
* pHeaderBar
;
82 ::svx::OptHeaderTabListBox
* pPathBox
;
85 ::com::sun::star::uno::Reference
< ::svt::DialogClosedListener
> xDialogListener
;
86 ::com::sun::star::uno::Reference
< ::com::sun::star::ui::dialogs::XFolderPicker
> xFolderPicker
;
88 #ifdef _SVX_OPTPATH_CXX
89 void ChangeCurrentEntry( const String
& _rFolder
);
91 DECL_LINK( PathHdl_Impl
, PushButton
* );
92 DECL_LINK( StandardHdl_Impl
, PushButton
* );
94 DECL_LINK( PathSelect_Impl
, OptHeaderTabListBox
* );
95 DECL_LINK( HeaderSelect_Impl
, HeaderBar
* );
96 DECL_LINK( HeaderEndDrag_Impl
, HeaderBar
* );
98 DECL_LINK( DialogClosedHdl
, ::com::sun::star::ui::dialogs::DialogClosedEvent
* );
100 void GetPathList( USHORT _nPathHandle
, String
& _rInternalPath
,
101 String
& _rUserPath
, String
& _rWritablePath
, sal_Bool
& _rReadOnly
);
102 void SetPathList( USHORT _nPathHandle
,
103 const String
& _rUserPath
, const String
& _rWritablePath
);
107 SvxPathTabPage( Window
* pParent
, const SfxItemSet
& rSet
);
110 static SfxTabPage
* Create( Window
* pParent
, const SfxItemSet
& rSet
);
111 static USHORT
* GetRanges();
113 virtual BOOL
FillItemSet( SfxItemSet
& rSet
);
114 virtual void Reset( const SfxItemSet
& rSet
);
115 virtual void FillUserData();