1*c4eee24dSAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*c4eee24dSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*c4eee24dSAndrew Rist * or more contributor license agreements. See the NOTICE file 5*c4eee24dSAndrew Rist * distributed with this work for additional information 6*c4eee24dSAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*c4eee24dSAndrew Rist * to you under the Apache License, Version 2.0 (the 8*c4eee24dSAndrew Rist * "License"); you may not use this file except in compliance 9*c4eee24dSAndrew Rist * with the License. You may obtain a copy of the License at 10cdf0e10cSrcweir * 11*c4eee24dSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12cdf0e10cSrcweir * 13*c4eee24dSAndrew Rist * Unless required by applicable law or agreed to in writing, 14*c4eee24dSAndrew Rist * software distributed under the License is distributed on an 15*c4eee24dSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*c4eee24dSAndrew Rist * KIND, either express or implied. See the License for the 17*c4eee24dSAndrew Rist * specific language governing permissions and limitations 18*c4eee24dSAndrew Rist * under the License. 19cdf0e10cSrcweir * 20*c4eee24dSAndrew Rist *************************************************************/ 21*c4eee24dSAndrew Rist 22*c4eee24dSAndrew Rist 23cdf0e10cSrcweir #ifndef _SVX_OPTPATH_HXX 24cdf0e10cSrcweir #define _SVX_OPTPATH_HXX 25cdf0e10cSrcweir 26cdf0e10cSrcweir // include --------------------------------------------------------------- 27cdf0e10cSrcweir 28cdf0e10cSrcweir #include <sfx2/tabdlg.hxx> 29cdf0e10cSrcweir #ifndef _FIXED_HXX //autogen 30cdf0e10cSrcweir #include <vcl/fixed.hxx> 31cdf0e10cSrcweir #endif 32cdf0e10cSrcweir #ifndef _GROUP_HXX //autogen 33cdf0e10cSrcweir #include <vcl/group.hxx> 34cdf0e10cSrcweir #endif 35cdf0e10cSrcweir 36cdf0e10cSrcweir #ifdef _SVX_OPTPATH_CXX 37cdf0e10cSrcweir #include <svtools/headbar.hxx> 38cdf0e10cSrcweir #else 39cdf0e10cSrcweir class HeaderBar; 40cdf0e10cSrcweir #endif 41cdf0e10cSrcweir #include "ControlFocusHelper.hxx" 42cdf0e10cSrcweir 43cdf0e10cSrcweir #ifndef _COM_SUN_STAR_UI_XFOLDERPICKER_HPP_ 44cdf0e10cSrcweir #include <com/sun/star/ui/dialogs/XFolderPicker.hpp> 45cdf0e10cSrcweir #endif 46cdf0e10cSrcweir #include <svtools/dialogclosedlistener.hxx> 47cdf0e10cSrcweir 48cdf0e10cSrcweir // forward --------------------------------------------------------------- 49cdf0e10cSrcweir 50cdf0e10cSrcweir class SvTabListBox; 51cdf0e10cSrcweir namespace svx 52cdf0e10cSrcweir { 53cdf0e10cSrcweir class OptHeaderTabListBox; 54cdf0e10cSrcweir } 55cdf0e10cSrcweir struct OptPath_Impl; 56cdf0e10cSrcweir class SvxPathTabPage; 57cdf0e10cSrcweir 58cdf0e10cSrcweir // define ---------------------------------------------------------------- 59cdf0e10cSrcweir 60cdf0e10cSrcweir #define SfxPathTabPage SvxPathTabPage 61cdf0e10cSrcweir 62cdf0e10cSrcweir // class SvxPathTabPage -------------------------------------------------- 63cdf0e10cSrcweir 64cdf0e10cSrcweir class SvxPathTabPage : public SfxTabPage 65cdf0e10cSrcweir { 66cdf0e10cSrcweir private: 67cdf0e10cSrcweir FixedLine aStdBox; 68cdf0e10cSrcweir FixedText aTypeText; 69cdf0e10cSrcweir FixedText aPathText; 70cdf0e10cSrcweir SvxControlFocusHelper aPathCtrl; 71cdf0e10cSrcweir PushButton aStandardBtn; 72cdf0e10cSrcweir PushButton aPathBtn; 73cdf0e10cSrcweir 74cdf0e10cSrcweir HeaderBar* pHeaderBar; 75cdf0e10cSrcweir ::svx::OptHeaderTabListBox* pPathBox; 76cdf0e10cSrcweir OptPath_Impl* pImpl; 77cdf0e10cSrcweir 78cdf0e10cSrcweir ::com::sun::star::uno::Reference< ::svt::DialogClosedListener > xDialogListener; 79cdf0e10cSrcweir ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XFolderPicker > xFolderPicker; 80cdf0e10cSrcweir 81cdf0e10cSrcweir #ifdef _SVX_OPTPATH_CXX 82cdf0e10cSrcweir void ChangeCurrentEntry( const String& _rFolder ); 83cdf0e10cSrcweir 84cdf0e10cSrcweir DECL_LINK( PathHdl_Impl, PushButton * ); 85cdf0e10cSrcweir DECL_LINK( StandardHdl_Impl, PushButton * ); 86cdf0e10cSrcweir 87cdf0e10cSrcweir DECL_LINK( PathSelect_Impl, svx::OptHeaderTabListBox * ); 88cdf0e10cSrcweir DECL_LINK( HeaderSelect_Impl, HeaderBar * ); 89cdf0e10cSrcweir DECL_LINK( HeaderEndDrag_Impl, HeaderBar * ); 90cdf0e10cSrcweir 91cdf0e10cSrcweir DECL_LINK( DialogClosedHdl, ::com::sun::star::ui::dialogs::DialogClosedEvent* ); 92cdf0e10cSrcweir 93cdf0e10cSrcweir void GetPathList( sal_uInt16 _nPathHandle, String& _rInternalPath, 94cdf0e10cSrcweir String& _rUserPath, String& _rWritablePath, sal_Bool& _rReadOnly ); 95cdf0e10cSrcweir void SetPathList( sal_uInt16 _nPathHandle, 96cdf0e10cSrcweir const String& _rUserPath, const String& _rWritablePath ); 97cdf0e10cSrcweir #endif 98cdf0e10cSrcweir 99cdf0e10cSrcweir public: 100cdf0e10cSrcweir SvxPathTabPage( Window* pParent, const SfxItemSet& rSet ); 101cdf0e10cSrcweir ~SvxPathTabPage(); 102cdf0e10cSrcweir 103cdf0e10cSrcweir static SfxTabPage* Create( Window* pParent, const SfxItemSet& rSet ); 104cdf0e10cSrcweir static sal_uInt16* GetRanges(); 105cdf0e10cSrcweir 106cdf0e10cSrcweir virtual sal_Bool FillItemSet( SfxItemSet& rSet ); 107cdf0e10cSrcweir virtual void Reset( const SfxItemSet& rSet ); 108cdf0e10cSrcweir virtual void FillUserData(); 109cdf0e10cSrcweir }; 110cdf0e10cSrcweir 111cdf0e10cSrcweir #endif 112cdf0e10cSrcweir 113