1. mst
  2. ooo340

Commits

kso  committed dac2aed

#i115372# - removed standard dir file dialog button (replaced by Places now).

  • Participants
  • Parent commits fc3d6d2
  • Branches default

Comments (0)

Files changed (8)

File fpicker/source/office/OfficeControlAccess.cxx

View file
  • Ignore whitespace
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
 {
 //.........................................................................
 
-	// helper -------------------------------------------------------------
+    // helper -------------------------------------------------------------
 
-	using namespace ::com::sun::star::uno;
-	using namespace ::com::sun::star::lang;
-	using namespace ::com::sun::star::ui::dialogs;
+    using namespace ::com::sun::star::uno;
+    using namespace ::com::sun::star::lang;
+    using namespace ::com::sun::star::ui::dialogs;
 
-	using namespace ExtendedFilePickerElementIds;
-	using namespace CommonFilePickerElementIds;
-	using namespace InternalFilePickerElementIds;
+    using namespace ExtendedFilePickerElementIds;
+    using namespace CommonFilePickerElementIds;
+    using namespace InternalFilePickerElementIds;
 
-	// --------------------------------------------------------------------
-	namespace
-	{
-		// ----------------------------------------------------------------
-		#define PROPERTY_FLAG_TEXT					0x00000001
-		#define PROPERTY_FLAG_ENDBALED				0x00000002
-		#define PROPERTY_FLAG_VISIBLE				0x00000004
-		#define PROPERTY_FLAG_HELPURL				0x00000008
-		#define PROPERTY_FLAG_LISTITEMS				0x00000010
-		#define PROPERTY_FLAG_SELECTEDITEM			0x00000020
-		#define PROPERTY_FLAG_SELECTEDITEMINDEX		0x00000040
-		#define PROPERTY_FLAG_CHECKED				0x00000080
+    // --------------------------------------------------------------------
+    namespace
+    {
+        // ----------------------------------------------------------------
+        #define PROPERTY_FLAG_TEXT                  0x00000001
+        #define PROPERTY_FLAG_ENDBALED              0x00000002
+        #define PROPERTY_FLAG_VISIBLE               0x00000004
+        #define PROPERTY_FLAG_HELPURL               0x00000008
+        #define PROPERTY_FLAG_LISTITEMS             0x00000010
+        #define PROPERTY_FLAG_SELECTEDITEM          0x00000020
+        #define PROPERTY_FLAG_SELECTEDITEMINDEX     0x00000040
+        #define PROPERTY_FLAG_CHECKED               0x00000080
 
-		// ----------------------------------------------------------------
-		// ................................................................
-		struct ControlDescription
-		{
-			const sal_Char*	pControlName;
-			sal_Int16		nControlId;
-			sal_Int32		nPropertyFlags;
-		};
+        // ----------------------------------------------------------------
+        // ................................................................
+        struct ControlDescription
+        {
+            const sal_Char* pControlName;
+            sal_Int16       nControlId;
+            sal_Int32       nPropertyFlags;
+        };
 
-		// ................................................................
-		typedef const ControlDescription* ControlDescIterator;
-		typedef ::std::pair< ControlDescIterator, ControlDescIterator >	ControlDescRange;
+        // ................................................................
+        typedef const ControlDescription* ControlDescIterator;
+        typedef ::std::pair< ControlDescIterator, ControlDescIterator > ControlDescRange;
 
-		// ......................................................................
-		#define PROPERTY_FLAGS_COMMON		( PROPERTY_FLAG_ENDBALED | PROPERTY_FLAG_VISIBLE | PROPERTY_FLAG_HELPURL )
-		#define PROPERTY_FLAGS_LISTBOX		( PROPERTY_FLAG_LISTITEMS | PROPERTY_FLAG_SELECTEDITEM | PROPERTY_FLAG_SELECTEDITEMINDEX )
-		#define PROPERTY_FLAGS_CHECKBOX		( PROPERTY_FLAG_CHECKED | PROPERTY_FLAG_TEXT )
+        // ......................................................................
+        #define PROPERTY_FLAGS_COMMON   ( PROPERTY_FLAG_ENDBALED | PROPERTY_FLAG_VISIBLE | PROPERTY_FLAG_HELPURL )
+        #define PROPERTY_FLAGS_LISTBOX  ( PROPERTY_FLAG_LISTITEMS | PROPERTY_FLAG_SELECTEDITEM | PROPERTY_FLAG_SELECTEDITEMINDEX )
+        #define PROPERTY_FLAGS_CHECKBOX ( PROPERTY_FLAG_CHECKED | PROPERTY_FLAG_TEXT )
 
-		// Note: this array MUST be sorted by name!
-		static const ControlDescription aDescriptions[] =  {
-			{ "AutoExtensionBox",		CHECKBOX_AUTOEXTENSION,			PROPERTY_FLAGS_COMMON | PROPERTY_FLAGS_CHECKBOX		},
-			{ "CancelButton",			PUSHBUTTON_CANCEL,				PROPERTY_FLAGS_COMMON | PROPERTY_FLAG_TEXT			},
-			{ "CurrentFolderText",		FIXEDTEXT_CURRENTFOLDER,		PROPERTY_FLAGS_COMMON | PROPERTY_FLAG_TEXT			},
-			{ "DefaultLocationButton",	TOOLBOXBUTOON_DEFAULT_LOCATION,	PROPERTY_FLAGS_COMMON								},
-			{ "FileURLEdit",			EDIT_FILEURL,					PROPERTY_FLAGS_COMMON | PROPERTY_FLAG_TEXT			},
-			{ "FileURLEditLabel",		EDIT_FILEURL_LABEL,				PROPERTY_FLAGS_COMMON | PROPERTY_FLAG_TEXT			},
-			{ "FileView",				CONTROL_FILEVIEW,				PROPERTY_FLAGS_COMMON								},
-			{ "FilterList",				LISTBOX_FILTER,					PROPERTY_FLAGS_COMMON								},
-			{ "FilterListLabel",		LISTBOX_FILTER_LABEL,			PROPERTY_FLAGS_COMMON | PROPERTY_FLAG_TEXT			},
-			{ "FilterOptionsBox",		CHECKBOX_FILTEROPTIONS,			PROPERTY_FLAGS_COMMON | PROPERTY_FLAGS_CHECKBOX		},
-			{ "HelpButton",				PUSHBUTTON_HELP,				PROPERTY_FLAGS_COMMON | PROPERTY_FLAG_TEXT			},
-			{ "ImageTemplateList",		LISTBOX_IMAGE_TEMPLATE,			PROPERTY_FLAGS_COMMON | PROPERTY_FLAGS_LISTBOX		},
-			{ "ImageTemplateListLabel",	LISTBOX_IMAGE_TEMPLATE_LABEL,	PROPERTY_FLAGS_COMMON | PROPERTY_FLAG_TEXT			},
-			{ "LevelUpButton",			TOOLBOXBUTOON_LEVEL_UP,			PROPERTY_FLAGS_COMMON								},
-			{ "LinkBox",				CHECKBOX_LINK,					PROPERTY_FLAGS_COMMON | PROPERTY_FLAGS_CHECKBOX		},
-			{ "NewFolderButton",		TOOLBOXBUTOON_NEW_FOLDER,		PROPERTY_FLAGS_COMMON								},
-			{ "OkButton",				PUSHBUTTON_OK ,					PROPERTY_FLAGS_COMMON | PROPERTY_FLAG_TEXT			},
-			{ "PasswordBox",			CHECKBOX_PASSWORD,				PROPERTY_FLAGS_COMMON | PROPERTY_FLAGS_CHECKBOX		},
-			{ "PlayButton",				PUSHBUTTON_PLAY,				PROPERTY_FLAGS_COMMON | PROPERTY_FLAG_TEXT			},
-			{ "PreviewBox",				CHECKBOX_PREVIEW,				PROPERTY_FLAGS_COMMON | PROPERTY_FLAGS_CHECKBOX		},
-			{ "ReadOnlyBox",			CHECKBOX_READONLY,				PROPERTY_FLAGS_COMMON | PROPERTY_FLAGS_CHECKBOX		},
-			{ "SelectionBox",			CHECKBOX_SELECTION,				PROPERTY_FLAGS_COMMON | PROPERTY_FLAGS_CHECKBOX		},
-			{ "TemplateList",			LISTBOX_TEMPLATE,				PROPERTY_FLAGS_COMMON | PROPERTY_FLAGS_LISTBOX		},
-			{ "TemplateListLabel",		LISTBOX_TEMPLATE_LABEL,			PROPERTY_FLAGS_COMMON | PROPERTY_FLAG_TEXT			},
-			{ "VersionList",			LISTBOX_VERSION,				PROPERTY_FLAGS_COMMON | PROPERTY_FLAGS_LISTBOX		},
-			{ "VersionListLabel",		LISTBOX_VERSION_LABEL,			PROPERTY_FLAGS_COMMON | PROPERTY_FLAG_TEXT			}
-		};
+        // Note: this array MUST be sorted by name!
+        static const ControlDescription aDescriptions[] =  {
+            { "AutoExtensionBox",       CHECKBOX_AUTOEXTENSION,        PROPERTY_FLAGS_COMMON | PROPERTY_FLAGS_CHECKBOX		},
+            { "CancelButton",           PUSHBUTTON_CANCEL,             PROPERTY_FLAGS_COMMON | PROPERTY_FLAG_TEXT			},
+            { "CurrentFolderText",      FIXEDTEXT_CURRENTFOLDER,       PROPERTY_FLAGS_COMMON | PROPERTY_FLAG_TEXT			},
+            { "FileURLEdit",            EDIT_FILEURL,                  PROPERTY_FLAGS_COMMON | PROPERTY_FLAG_TEXT			},
+            { "FileURLEditLabel",       EDIT_FILEURL_LABEL,            PROPERTY_FLAGS_COMMON | PROPERTY_FLAG_TEXT			},
+            { "FileView",               CONTROL_FILEVIEW,              PROPERTY_FLAGS_COMMON								},
+            { "FilterList",             LISTBOX_FILTER,                PROPERTY_FLAGS_COMMON								},
+            { "FilterListLabel",        LISTBOX_FILTER_LABEL,          PROPERTY_FLAGS_COMMON | PROPERTY_FLAG_TEXT			},
+            { "FilterOptionsBox",       CHECKBOX_FILTEROPTIONS,        PROPERTY_FLAGS_COMMON | PROPERTY_FLAGS_CHECKBOX		},
+            { "HelpButton",             PUSHBUTTON_HELP,               PROPERTY_FLAGS_COMMON | PROPERTY_FLAG_TEXT			},
+            { "HistoryBackButton",      TOOLBOXBUTTON_HISTORY_BACK,    PROPERTY_FLAGS_COMMON								},
+            { "HistoryForwardButton",   TOOLBOXBUTTON_HISTORY_FORWARD, PROPERTY_FLAGS_COMMON								},
+            { "ImageTemplateList",      LISTBOX_IMAGE_TEMPLATE,        PROPERTY_FLAGS_COMMON | PROPERTY_FLAGS_LISTBOX		},
+            { "ImageTemplateListLabel", LISTBOX_IMAGE_TEMPLATE_LABEL,  PROPERTY_FLAGS_COMMON | PROPERTY_FLAG_TEXT			},
+            { "LevelUpButton",          TOOLBOXBUTTON_LEVEL_UP,        PROPERTY_FLAGS_COMMON								},
+            { "LinkBox",                CHECKBOX_LINK,                 PROPERTY_FLAGS_COMMON | PROPERTY_FLAGS_CHECKBOX		},
+            { "NewFolderButton",        TOOLBOXBUTTON_NEW_FOLDER,      PROPERTY_FLAGS_COMMON								},
+            { "OkButton",               PUSHBUTTON_OK,                 PROPERTY_FLAGS_COMMON | PROPERTY_FLAG_TEXT			},
+            { "PasswordBox",            CHECKBOX_PASSWORD,             PROPERTY_FLAGS_COMMON | PROPERTY_FLAGS_CHECKBOX		},
+            { "PlayButton",             PUSHBUTTON_PLAY,               PROPERTY_FLAGS_COMMON | PROPERTY_FLAG_TEXT			},
+            { "PreviewBox",             CHECKBOX_PREVIEW,              PROPERTY_FLAGS_COMMON | PROPERTY_FLAGS_CHECKBOX		},
+            { "ReadOnlyBox",            CHECKBOX_READONLY,             PROPERTY_FLAGS_COMMON | PROPERTY_FLAGS_CHECKBOX		},
+            { "SelectionBox",           CHECKBOX_SELECTION,            PROPERTY_FLAGS_COMMON | PROPERTY_FLAGS_CHECKBOX		},
+            { "TemplateList",           LISTBOX_TEMPLATE,              PROPERTY_FLAGS_COMMON | PROPERTY_FLAGS_LISTBOX		},
+            { "TemplateListLabel",      LISTBOX_TEMPLATE_LABEL,        PROPERTY_FLAGS_COMMON | PROPERTY_FLAG_TEXT			},
+            { "VersionList",            LISTBOX_VERSION,               PROPERTY_FLAGS_COMMON | PROPERTY_FLAGS_LISTBOX		},
+            { "VersionListLabel",       LISTBOX_VERSION_LABEL,         PROPERTY_FLAGS_COMMON | PROPERTY_FLAG_TEXT			}
+        };
 
-		// ................................................................
-		static const sal_Int32 s_nControlCount = sizeof( aDescriptions ) / sizeof( aDescriptions[0] );
+        // ................................................................
+        static const sal_Int32 s_nControlCount = sizeof( aDescriptions ) / sizeof( aDescriptions[0] );
 
-		static ControlDescIterator s_pControls = aDescriptions;
-		static ControlDescIterator s_pControlsEnd = aDescriptions + s_nControlCount;
+        static ControlDescIterator s_pControls = aDescriptions;
+        static ControlDescIterator s_pControlsEnd = aDescriptions + s_nControlCount;
 
-		// ................................................................
-		struct ControlDescriptionLookup
-		{
-			bool operator()( const ::rtl::OUString& _rLookup, const ControlDescription& _rDesc )
-			{
-				return _rLookup.compareToAscii( _rDesc.pControlName ) < 0;
-			}
-			bool operator()( const ControlDescription& _rDesc, const ::rtl::OUString& _rLookup )
-			{
-				return _rLookup.compareToAscii( _rDesc.pControlName ) > 0;
-			}
-		};
+        // ................................................................
+        struct ControlDescriptionLookup
+        {
+            bool operator()( const ::rtl::OUString& _rLookup, const ControlDescription& _rDesc )
+            {
+                return _rLookup.compareToAscii( _rDesc.pControlName ) < 0;
+            }
+            bool operator()( const ControlDescription& _rDesc, const ::rtl::OUString& _rLookup )
+            {
+                return _rLookup.compareToAscii( _rDesc.pControlName ) > 0;
+            }
+        };
 
-		// ................................................................
-		struct ExtractControlName : public ::std::unary_function< ControlDescription, ::rtl::OUString >
-		{
-			::rtl::OUString operator()( const ControlDescription& _rDesc )
-			{
-				return ::rtl::OUString::createFromAscii( _rDesc.pControlName );
-			}
-		};
+        // ................................................................
+        struct ExtractControlName : public ::std::unary_function< ControlDescription, ::rtl::OUString >
+        {
+            ::rtl::OUString operator()( const ControlDescription& _rDesc )
+            {
+                return ::rtl::OUString::createFromAscii( _rDesc.pControlName );
+            }
+        };
 
-		// ----------------------------------------------------------------
-		// ................................................................
-		struct ControlProperty
-		{
-			const sal_Char* pPropertyName;
-			sal_Int16		nPropertyId;
-		};
+        // ----------------------------------------------------------------
+        // ................................................................
+        struct ControlProperty
+        {
+            const sal_Char* pPropertyName;
+            sal_Int16       nPropertyId;
+        };
 
-		typedef const ControlProperty* ControlPropertyIterator;
+        typedef const ControlProperty* ControlPropertyIterator;
 
-		// ................................................................
-		static const ControlProperty aProperties[] =  {
-			{ "Text",				PROPERTY_FLAG_TEXT				},
-			{ "Enabled",			PROPERTY_FLAG_ENDBALED			},
-			{ "Visible",			PROPERTY_FLAG_VISIBLE			},
-			{ "HelpURL",			PROPERTY_FLAG_HELPURL			},
-			{ "ListItems",			PROPERTY_FLAG_LISTITEMS			},
-			{ "SelectedItem",		PROPERTY_FLAG_SELECTEDITEM		},
-			{ "SelectedItemIndex",	PROPERTY_FLAG_SELECTEDITEMINDEX	},
-			{ "Checked",			PROPERTY_FLAG_CHECKED			}
-		};
+        // ................................................................
+        static const ControlProperty aProperties[] =  {
+            { "Text",               PROPERTY_FLAG_TEXT              },
+            { "Enabled",            PROPERTY_FLAG_ENDBALED          },
+            { "Visible",            PROPERTY_FLAG_VISIBLE           },
+            { "HelpURL",            PROPERTY_FLAG_HELPURL           },
+            { "ListItems",          PROPERTY_FLAG_LISTITEMS         },
+            { "SelectedItem",       PROPERTY_FLAG_SELECTEDITEM      },
+            { "SelectedItemIndex",  PROPERTY_FLAG_SELECTEDITEMINDEX },
+            { "Checked",            PROPERTY_FLAG_CHECKED           }
+        };
 
-		// ................................................................
-		static const int s_nPropertyCount = sizeof( aProperties ) / sizeof( aProperties[0] );
+        // ................................................................
+        static const int s_nPropertyCount = sizeof( aProperties ) / sizeof( aProperties[0] );
 
-		static ControlPropertyIterator s_pProperties = aProperties;
-		static ControlPropertyIterator s_pPropertiesEnd = aProperties + s_nPropertyCount;
+        static ControlPropertyIterator s_pProperties = aProperties;
+        static ControlPropertyIterator s_pPropertiesEnd = aProperties + s_nPropertyCount;
 
-		// ................................................................
-		struct ControlPropertyLookup
-		{
-			::rtl::OUString	m_sLookup;
-			ControlPropertyLookup( const ::rtl::OUString& _rLookup ) : m_sLookup( _rLookup ) { }
+        // ................................................................
+        struct ControlPropertyLookup
+        {
+            ::rtl::OUString m_sLookup;
+            ControlPropertyLookup( const ::rtl::OUString& _rLookup ) : m_sLookup( _rLookup ) { }
 
-			sal_Bool operator()( const ControlProperty& _rProp )
-			{
-				return m_sLookup.equalsAscii( _rProp.pPropertyName );
-			}
-		};
+            sal_Bool operator()( const ControlProperty& _rProp )
+            {
+                return m_sLookup.equalsAscii( _rProp.pPropertyName );
+            }
+        };
 
-		//-----------------------------------------------------------------
-		void lcl_throwIllegalArgumentException( ) SAL_THROW( (IllegalArgumentException) )
-		{
-			throw IllegalArgumentException();
-			// TODO: error message in the exception
-		}
-	}
+        //-----------------------------------------------------------------
+        void lcl_throwIllegalArgumentException( ) SAL_THROW( (IllegalArgumentException) )
+        {
+            throw IllegalArgumentException();
+            // TODO: error message in the exception
+        }
+    }
 
-	//---------------------------------------------------------------------
-	OControlAccess::OControlAccess( IFilePickerController* _pController, SvtFileView* _pFileView )
-		:m_pFilePickerController( _pController )
-		,m_pFileView( _pFileView )
-	{
-		DBG_ASSERT( m_pFilePickerController, "OControlAccess::OControlAccess: invalid control locator!" );
-	}
+    //---------------------------------------------------------------------
+    OControlAccess::OControlAccess( IFilePickerController* _pController, SvtFileView* _pFileView )
+        :m_pFilePickerController( _pController )
+        ,m_pFileView( _pFileView )
+    {
+        DBG_ASSERT( m_pFilePickerController, "OControlAccess::OControlAccess: invalid control locator!" );
+    }
 
-	//---------------------------------------------------------------------
-	void OControlAccess::setHelpURL( Window* _pControl, const ::rtl::OUString& sHelpURL, sal_Bool _bFileView )
-	{
+    //---------------------------------------------------------------------
+    void OControlAccess::setHelpURL( Window* _pControl, const ::rtl::OUString& sHelpURL, sal_Bool _bFileView )
+    {
         rtl::OUString sHelpID( sHelpURL );
         INetURLObject aHID( sHelpURL );
         if ( aHID.GetProtocol() == INET_PROT_HID )
-      	    sHelpID = aHID.GetURLPath();
+            sHelpID = aHID.GetURLPath();
 
         // URLs should always be UTF8 encoded and escaped
-	    rtl::OString sID( rtl::OUStringToOString( sHelpID, RTL_TEXTENCODING_UTF8 ) );
-		if ( _bFileView )
-			// the file view "overloaded" the SetHelpId
-			static_cast< SvtFileView* >( _pControl )->SetHelpId( sID );
-		else
-			_pControl->SetHelpId( sID );
-	}
+        rtl::OString sID( rtl::OUStringToOString( sHelpID, RTL_TEXTENCODING_UTF8 ) );
+        if ( _bFileView )
+            // the file view "overloaded" the SetHelpId
+            static_cast< SvtFileView* >( _pControl )->SetHelpId( sID );
+        else
+            _pControl->SetHelpId( sID );
+    }
 
-	//---------------------------------------------------------------------
-	::rtl::OUString	OControlAccess::getHelpURL( Window* _pControl, sal_Bool _bFileView )
-	{
-	    rtl::OString aHelpId = _pControl->GetHelpId();
-		if ( _bFileView )
-			// the file view "overloaded" the SetHelpId
-			aHelpId = static_cast< SvtFileView* >( _pControl )->GetHelpId( );
+    //---------------------------------------------------------------------
+    ::rtl::OUString OControlAccess::getHelpURL( Window* _pControl, sal_Bool _bFileView )
+    {
+        rtl::OString aHelpId = _pControl->GetHelpId();
+        if ( _bFileView )
+            // the file view "overloaded" the SetHelpId
+            aHelpId = static_cast< SvtFileView* >( _pControl )->GetHelpId( );
 
         ::rtl::OUString sHelpURL;
         ::rtl::OUString aTmp( rtl::OStringToOUString( aHelpId, RTL_TEXTENCODING_UTF8 ) );
         INetURLObject aHID( aTmp );
         if ( aHID.GetProtocol() == INET_PROT_NOT_VALID )
             sHelpURL = rtl::OUString::createFromAscii( INET_HID_SCHEME );
-		sHelpURL += aTmp;
-		return sHelpURL;
-	}
+        sHelpURL += aTmp;
+        return sHelpURL;
+    }
 
-	// --------------------------------------------------------------------------
-	Any	OControlAccess::getControlProperty( const ::rtl::OUString& _rControlName, const ::rtl::OUString& _rControlProperty )
-	{
-		// look up the control
-		sal_Int16 nControlId = -1;
-		sal_Int32 nPropertyMask = 0;
-		Control* pControl = implGetControl( _rControlName, &nControlId, &nPropertyMask );
-			// will throw an IllegalArgumentException if the name is not valid
+    // --------------------------------------------------------------------------
+    Any OControlAccess::getControlProperty( const ::rtl::OUString& _rControlName, const ::rtl::OUString& _rControlProperty )
+    {
+        // look up the control
+        sal_Int16 nControlId = -1;
+        sal_Int32 nPropertyMask = 0;
+        Control* pControl = implGetControl( _rControlName, &nControlId, &nPropertyMask );
+            // will throw an IllegalArgumentException if the name is not valid
 
-		// look up the property
-		ControlPropertyIterator aPropDesc = ::std::find_if( s_pProperties, s_pPropertiesEnd, ControlPropertyLookup( _rControlProperty ) );
-		if ( aPropDesc == s_pPropertiesEnd )
-			// it's a completely unknown property
-			lcl_throwIllegalArgumentException();
+        // look up the property
+        ControlPropertyIterator aPropDesc = ::std::find_if( s_pProperties, s_pPropertiesEnd, ControlPropertyLookup( _rControlProperty ) );
+        if ( aPropDesc == s_pPropertiesEnd )
+            // it's a completely unknown property
+            lcl_throwIllegalArgumentException();
 
-		if ( 0 == ( nPropertyMask & aPropDesc->nPropertyId ) )
-			// it's a property which is known, but not allowed for this control
-			lcl_throwIllegalArgumentException();
+        if ( 0 == ( nPropertyMask & aPropDesc->nPropertyId ) )
+            // it's a property which is known, but not allowed for this control
+            lcl_throwIllegalArgumentException();
 
-		return implGetControlProperty( pControl, aPropDesc->nPropertyId );
-	}
+        return implGetControlProperty( pControl, aPropDesc->nPropertyId );
+    }
 
-	//---------------------------------------------------------------------
-	Control* OControlAccess::implGetControl( const ::rtl::OUString& _rControlName, sal_Int16* _pId, sal_Int32* _pPropertyMask ) const SAL_THROW( (IllegalArgumentException) )
-	{
-		Control* pControl = NULL;
+    //---------------------------------------------------------------------
+    Control* OControlAccess::implGetControl( const ::rtl::OUString& _rControlName, sal_Int16* _pId, sal_Int32* _pPropertyMask ) const SAL_THROW( (IllegalArgumentException) )
+    {
+        Control* pControl = NULL;
 
-		// translate the name into an id
-		ControlDescRange aFoundRange = ::std::equal_range( s_pControls, s_pControlsEnd, _rControlName, ControlDescriptionLookup() );
-		if ( aFoundRange.first != aFoundRange.second )
-		{
-			// get the VCL control determined by this id
-			pControl = m_pFilePickerController->getControl( aFoundRange.first->nControlId );
-		}
+        // translate the name into an id
+        ControlDescRange aFoundRange = ::std::equal_range( s_pControls, s_pControlsEnd, _rControlName, ControlDescriptionLookup() );
+        if ( aFoundRange.first != aFoundRange.second )
+        {
+            // get the VCL control determined by this id
+            pControl = m_pFilePickerController->getControl( aFoundRange.first->nControlId );
+        }
 
-		// if not found 'til here, the name is invalid, or we do not have the control in the current mode
-		if ( !pControl )
-			lcl_throwIllegalArgumentException();
+        // if not found 'til here, the name is invalid, or we do not have the control in the current mode
+        if ( !pControl )
+            lcl_throwIllegalArgumentException();
 
-		// out parameters and outta here
-		if ( _pId )
-			*_pId = aFoundRange.first->nControlId;
-		if ( _pPropertyMask )
-			*_pPropertyMask = aFoundRange.first->nPropertyFlags;
+        // out parameters and outta here
+        if ( _pId )
+            *_pId = aFoundRange.first->nControlId;
+        if ( _pPropertyMask )
+            *_pPropertyMask = aFoundRange.first->nPropertyFlags;
 
-		return pControl;
-	}
+        return pControl;
+    }
 
-	//---------------------------------------------------------------------
-	void OControlAccess::setControlProperty( const ::rtl::OUString& _rControlName, const ::rtl::OUString& _rControlProperty, const ::com::sun::star::uno::Any& _rValue )
-	{
-		// look up the control
+    //---------------------------------------------------------------------
+    void OControlAccess::setControlProperty( const ::rtl::OUString& _rControlName, const ::rtl::OUString& _rControlProperty, const ::com::sun::star::uno::Any& _rValue )
+    {
+        // look up the control
         sal_Int16 nControlId = -1;
-		Control* pControl = implGetControl( _rControlName, &nControlId );
-			// will throw an IllegalArgumentException if the name is not valid
+        Control* pControl = implGetControl( _rControlName, &nControlId );
+            // will throw an IllegalArgumentException if the name is not valid
 
-		// look up the property
-		ControlPropertyIterator aPropDesc = ::std::find_if( s_pProperties, s_pPropertiesEnd, ControlPropertyLookup( _rControlProperty ) );
-		if ( aPropDesc == s_pPropertiesEnd )
-			lcl_throwIllegalArgumentException();
+        // look up the property
+        ControlPropertyIterator aPropDesc = ::std::find_if( s_pProperties, s_pPropertiesEnd, ControlPropertyLookup( _rControlProperty ) );
+        if ( aPropDesc == s_pPropertiesEnd )
+            lcl_throwIllegalArgumentException();
 
-		// set the property
-		implSetControlProperty( nControlId, pControl, aPropDesc->nPropertyId, _rValue, sal_False );
-	}
+        // set the property
+        implSetControlProperty( nControlId, pControl, aPropDesc->nPropertyId, _rValue, sal_False );
+    }
 
-	// --------------------------------------------------------------------------
-	Sequence< ::rtl::OUString > OControlAccess::getSupportedControls(  )
-	{
-		Sequence< ::rtl::OUString > aControls( s_nControlCount );
-		::rtl::OUString* pControls = aControls.getArray();
+    // --------------------------------------------------------------------------
+    Sequence< ::rtl::OUString > OControlAccess::getSupportedControls(  )
+    {
+        Sequence< ::rtl::OUString > aControls( s_nControlCount );
+        ::rtl::OUString* pControls = aControls.getArray();
 
-		// collect the names of all _actually_existent_ controls
-		for ( ControlDescIterator aControl = s_pControls; aControl != s_pControlsEnd; ++aControl )
-		{
-			if ( m_pFilePickerController->getControl( aControl->nControlId ) )
-				*pControls++ = ::rtl::OUString::createFromAscii( aControl->pControlName );
-		}
+        // collect the names of all _actually_existent_ controls
+        for ( ControlDescIterator aControl = s_pControls; aControl != s_pControlsEnd; ++aControl )
+        {
+            if ( m_pFilePickerController->getControl( aControl->nControlId ) )
+                *pControls++ = ::rtl::OUString::createFromAscii( aControl->pControlName );
+        }
 
-		aControls.realloc( pControls - aControls.getArray() );
-		return aControls;
-	}
+        aControls.realloc( pControls - aControls.getArray() );
+        return aControls;
+    }
 
-	// --------------------------------------------------------------------------
-	Sequence< ::rtl::OUString > OControlAccess::getSupportedControlProperties( const ::rtl::OUString& _rControlName )
-	{
-		sal_Int16 nControlId = -1;
-		sal_Int32 nPropertyMask = 0;
-		implGetControl( _rControlName, &nControlId, &nPropertyMask );
-			// will throw an IllegalArgumentException if the name is not valid
+    // --------------------------------------------------------------------------
+    Sequence< ::rtl::OUString > OControlAccess::getSupportedControlProperties( const ::rtl::OUString& _rControlName )
+    {
+        sal_Int16 nControlId = -1;
+        sal_Int32 nPropertyMask = 0;
+        implGetControl( _rControlName, &nControlId, &nPropertyMask );
+            // will throw an IllegalArgumentException if the name is not valid
 
-		// fill in the property names
-		Sequence< ::rtl::OUString > aProps( s_nPropertyCount );
-		::rtl::OUString* pProperty = aProps.getArray();
+        // fill in the property names
+        Sequence< ::rtl::OUString > aProps( s_nPropertyCount );
+        ::rtl::OUString* pProperty = aProps.getArray();
 
-		for ( ControlPropertyIterator aProp = s_pProperties; aProp != s_pPropertiesEnd; ++aProp )
-			if ( 0 != ( nPropertyMask & aProp->nPropertyId ) )
-				*pProperty++ = ::rtl::OUString::createFromAscii( aProp->pPropertyName );
+        for ( ControlPropertyIterator aProp = s_pProperties; aProp != s_pPropertiesEnd; ++aProp )
+            if ( 0 != ( nPropertyMask & aProp->nPropertyId ) )
+                *pProperty++ = ::rtl::OUString::createFromAscii( aProp->pPropertyName );
 
-		aProps.realloc( pProperty - aProps.getArray() );
-		return aProps;
-	}
+        aProps.realloc( pProperty - aProps.getArray() );
+        return aProps;
+    }
 
-	// --------------------------------------------------------------------------
-	sal_Bool OControlAccess::isControlSupported( const ::rtl::OUString& _rControlName )
-	{
-		return ::std::binary_search( s_pControls, s_pControlsEnd, _rControlName, ControlDescriptionLookup() );
-	}
+    // --------------------------------------------------------------------------
+    sal_Bool OControlAccess::isControlSupported( const ::rtl::OUString& _rControlName )
+    {
+        return ::std::binary_search( s_pControls, s_pControlsEnd, _rControlName, ControlDescriptionLookup() );
+    }
 
-	// --------------------------------------------------------------------------
-	sal_Bool OControlAccess::isControlPropertySupported( const ::rtl::OUString& _rControlName, const ::rtl::OUString& _rControlProperty )
-	{
-		// look up the control
-		sal_Int16 nControlId = -1;
-		sal_Int32 nPropertyMask = 0;
-		implGetControl( _rControlName, &nControlId, &nPropertyMask );
-			// will throw an IllegalArgumentException if the name is not valid
+    // --------------------------------------------------------------------------
+    sal_Bool OControlAccess::isControlPropertySupported( const ::rtl::OUString& _rControlName, const ::rtl::OUString& _rControlProperty )
+    {
+        // look up the control
+        sal_Int16 nControlId = -1;
+        sal_Int32 nPropertyMask = 0;
+        implGetControl( _rControlName, &nControlId, &nPropertyMask );
+            // will throw an IllegalArgumentException if the name is not valid
 
-		// look up the property
-		ControlPropertyIterator aPropDesc = ::std::find_if( s_pProperties, s_pPropertiesEnd, ControlPropertyLookup( _rControlProperty ) );
-		if ( aPropDesc == s_pPropertiesEnd )
-			// it's a property which is completely unknown
-			return sal_False;
+        // look up the property
+        ControlPropertyIterator aPropDesc = ::std::find_if( s_pProperties, s_pPropertiesEnd, ControlPropertyLookup( _rControlProperty ) );
+        if ( aPropDesc == s_pPropertiesEnd )
+            // it's a property which is completely unknown
+            return sal_False;
 
-		return 0 != ( aPropDesc->nPropertyId & nPropertyMask );
-	}
+        return 0 != ( aPropDesc->nPropertyId & nPropertyMask );
+    }
 
-	//-----------------------------------------------------------------------------
-	void OControlAccess::setValue( sal_Int16 _nControlId, sal_Int16 _nControlAction, const Any& _rValue )
-	{
-		Control* pControl = m_pFilePickerController->getControl( _nControlId );
-		DBG_ASSERT( pControl, "OControlAccess::SetValue: don't have this control in the current mode!" );
-		if ( pControl )
-		{
-			sal_Int16 nPropertyId = -1;
-			if ( ControlActions::SET_HELP_URL == _nControlAction )
-			{
-				nPropertyId = PROPERTY_FLAG_HELPURL;
-			}
-			else
-			{
-				switch ( _nControlId )
-				{
-					case CHECKBOX_AUTOEXTENSION:
-					case CHECKBOX_PASSWORD:
-					case CHECKBOX_FILTEROPTIONS:
-					case CHECKBOX_READONLY:
-					case CHECKBOX_LINK:
-					case CHECKBOX_PREVIEW:
-					case CHECKBOX_SELECTION:
-						nPropertyId = PROPERTY_FLAG_CHECKED;
-						break;
+    //-----------------------------------------------------------------------------
+    void OControlAccess::setValue( sal_Int16 _nControlId, sal_Int16 _nControlAction, const Any& _rValue )
+    {
+        Control* pControl = m_pFilePickerController->getControl( _nControlId );
+        DBG_ASSERT( pControl, "OControlAccess::SetValue: don't have this control in the current mode!" );
+        if ( pControl )
+        {
+            sal_Int16 nPropertyId = -1;
+            if ( ControlActions::SET_HELP_URL == _nControlAction )
+            {
+                nPropertyId = PROPERTY_FLAG_HELPURL;
+            }
+            else
+            {
+                switch ( _nControlId )
+                {
+                    case CHECKBOX_AUTOEXTENSION:
+                    case CHECKBOX_PASSWORD:
+                    case CHECKBOX_FILTEROPTIONS:
+                    case CHECKBOX_READONLY:
+                    case CHECKBOX_LINK:
+                    case CHECKBOX_PREVIEW:
+                    case CHECKBOX_SELECTION:
+                        nPropertyId = PROPERTY_FLAG_CHECKED;
+                        break;
 
-					case LISTBOX_FILTER:
-						DBG_ERRORFILE( "Use the XFilterManager to access the filter listbox" );
-						break;
+                    case LISTBOX_FILTER:
+                        DBG_ERRORFILE( "Use the XFilterManager to access the filter listbox" );
+                        break;
 
-					case LISTBOX_VERSION:
-					case LISTBOX_TEMPLATE:
-					case LISTBOX_IMAGE_TEMPLATE:
-						if ( ControlActions::SET_SELECT_ITEM == _nControlAction )
-						{
-							nPropertyId = PROPERTY_FLAG_SELECTEDITEMINDEX;
-						}
-						else
-						{
-							DBG_ASSERT( WINDOW_LISTBOX == pControl->GetType(), "OControlAccess::SetValue: implGetControl returned nonsense!" );
-							implDoListboxAction( static_cast< ListBox* >( pControl ), _nControlAction, _rValue );
-						}
-						break;
-				}
-			}
+                    case LISTBOX_VERSION:
+                    case LISTBOX_TEMPLATE:
+                    case LISTBOX_IMAGE_TEMPLATE:
+                        if ( ControlActions::SET_SELECT_ITEM == _nControlAction )
+                        {
+                            nPropertyId = PROPERTY_FLAG_SELECTEDITEMINDEX;
+                        }
+                        else
+                        {
+                            DBG_ASSERT( WINDOW_LISTBOX == pControl->GetType(), "OControlAccess::SetValue: implGetControl returned nonsense!" );
+                            implDoListboxAction( static_cast< ListBox* >( pControl ), _nControlAction, _rValue );
+                        }
+                        break;
+                }
+            }
 
-			if ( -1 != nPropertyId )
-				implSetControlProperty( _nControlId, pControl, nPropertyId, _rValue );
-		}
-	}
+            if ( -1 != nPropertyId )
+                implSetControlProperty( _nControlId, pControl, nPropertyId, _rValue );
+        }
+    }
 
-	//-----------------------------------------------------------------------------
-	Any OControlAccess::getValue( sal_Int16 _nControlId, sal_Int16 _nControlAction ) const
-	{
-		Any aRet;
+    //-----------------------------------------------------------------------------
+    Any OControlAccess::getValue( sal_Int16 _nControlId, sal_Int16 _nControlAction ) const
+    {
+        Any aRet;
 
-		Control* pControl = m_pFilePickerController->getControl( _nControlId, sal_False );
-		DBG_ASSERT( pControl, "OControlAccess::GetValue: don't have this control in the current mode!" );
-		if ( pControl )
-		{
-			sal_Int16 nPropertyId = -1;
-			if ( ControlActions::SET_HELP_URL == _nControlAction )
-			{
-				nPropertyId = PROPERTY_FLAG_HELPURL;
-			}
-			else
-			{
-				switch ( _nControlId )
-				{
-					case CHECKBOX_AUTOEXTENSION:
-					case CHECKBOX_PASSWORD:
-					case CHECKBOX_FILTEROPTIONS:
-					case CHECKBOX_READONLY:
-					case CHECKBOX_LINK:
-					case CHECKBOX_PREVIEW:
-					case CHECKBOX_SELECTION:
-						nPropertyId = PROPERTY_FLAG_CHECKED;
-						break;
+        Control* pControl = m_pFilePickerController->getControl( _nControlId, sal_False );
+        DBG_ASSERT( pControl, "OControlAccess::GetValue: don't have this control in the current mode!" );
+        if ( pControl )
+        {
+            sal_Int16 nPropertyId = -1;
+            if ( ControlActions::SET_HELP_URL == _nControlAction )
+            {
+                nPropertyId = PROPERTY_FLAG_HELPURL;
+            }
+            else
+            {
+                switch ( _nControlId )
+                {
+                    case CHECKBOX_AUTOEXTENSION:
+                    case CHECKBOX_PASSWORD:
+                    case CHECKBOX_FILTEROPTIONS:
+                    case CHECKBOX_READONLY:
+                    case CHECKBOX_LINK:
+                    case CHECKBOX_PREVIEW:
+                    case CHECKBOX_SELECTION:
+                        nPropertyId = PROPERTY_FLAG_CHECKED;
+                        break;
 
-					case LISTBOX_FILTER:
-						if ( ControlActions::GET_SELECTED_ITEM == _nControlAction )
-						{
-							aRet <<= ::rtl::OUString( m_pFilePickerController->getCurFilter() );;
-						}
-						else
-						{
-							DBG_ERRORFILE( "Use the XFilterManager to access the filter listbox" );
+                    case LISTBOX_FILTER:
+                        if ( ControlActions::GET_SELECTED_ITEM == _nControlAction )
+                        {
+                            aRet <<= ::rtl::OUString( m_pFilePickerController->getCurFilter() );;
                         }
-						break;
+                        else
+                        {
+                            DBG_ERRORFILE( "Use the XFilterManager to access the filter listbox" );
+                        }
+                        break;
 
-					case LISTBOX_VERSION:
-					case LISTBOX_TEMPLATE:
-					case LISTBOX_IMAGE_TEMPLATE:
-						switch ( _nControlAction )
-						{
-							case ControlActions::GET_SELECTED_ITEM:
-								nPropertyId = PROPERTY_FLAG_SELECTEDITEM;
-								break;
-							case ControlActions::GET_SELECTED_ITEM_INDEX:
-								nPropertyId = PROPERTY_FLAG_SELECTEDITEMINDEX;
-								break;
-							case ControlActions::GET_ITEMS:
-								nPropertyId = PROPERTY_FLAG_LISTITEMS;
-								break;
-							default:
-								DBG_ERRORFILE( "OControlAccess::GetValue: invalid control action for the listbox!" );
-								break;
-						}
-						break;
-				}
-			}
+                    case LISTBOX_VERSION:
+                    case LISTBOX_TEMPLATE:
+                    case LISTBOX_IMAGE_TEMPLATE:
+                        switch ( _nControlAction )
+                        {
+                            case ControlActions::GET_SELECTED_ITEM:
+                                nPropertyId = PROPERTY_FLAG_SELECTEDITEM;
+                                break;
+                            case ControlActions::GET_SELECTED_ITEM_INDEX:
+                                nPropertyId = PROPERTY_FLAG_SELECTEDITEMINDEX;
+                                break;
+                            case ControlActions::GET_ITEMS:
+                                nPropertyId = PROPERTY_FLAG_LISTITEMS;
+                                break;
+                            default:
+                                DBG_ERRORFILE( "OControlAccess::GetValue: invalid control action for the listbox!" );
+                                break;
+                        }
+                        break;
+                }
+            }
 
-			if ( -1 != nPropertyId )
-				aRet = implGetControlProperty( pControl, nPropertyId );
-		}
+            if ( -1 != nPropertyId )
+                aRet = implGetControlProperty( pControl, nPropertyId );
+        }
 
-		return aRet;
-	}
+        return aRet;
+    }
 
-	//-----------------------------------------------------------------------------
-	void OControlAccess::setLabel( sal_Int16 nId, const ::rtl::OUString &rLabel )
-	{
-		Control* pControl = m_pFilePickerController->getControl( nId, sal_True );
-		DBG_ASSERT( pControl, "OControlAccess::GetValue: don't have this control in the current mode!" );
-		if ( pControl )
-			pControl->SetText( rLabel );
-	}
+    //-----------------------------------------------------------------------------
+    void OControlAccess::setLabel( sal_Int16 nId, const ::rtl::OUString &rLabel )
+    {
+        Control* pControl = m_pFilePickerController->getControl( nId, sal_True );
+        DBG_ASSERT( pControl, "OControlAccess::GetValue: don't have this control in the current mode!" );
+        if ( pControl )
+            pControl->SetText( rLabel );
+    }
 
-	//-----------------------------------------------------------------------------
-	::rtl::OUString OControlAccess::getLabel( sal_Int16 nId ) const
-	{
-		::rtl::OUString sLabel;
+    //-----------------------------------------------------------------------------
+    ::rtl::OUString OControlAccess::getLabel( sal_Int16 nId ) const
+    {
+        ::rtl::OUString sLabel;
 
-		Control* pControl = m_pFilePickerController->getControl( nId, sal_True );
-		DBG_ASSERT( pControl, "OControlAccess::GetValue: don't have this control in the current mode!" );
-		if ( pControl )
-			sLabel = pControl->GetText();
+        Control* pControl = m_pFilePickerController->getControl( nId, sal_True );
+        DBG_ASSERT( pControl, "OControlAccess::GetValue: don't have this control in the current mode!" );
+        if ( pControl )
+            sLabel = pControl->GetText();
 
-		return sLabel;
-	}
+        return sLabel;
+    }
 
-	//-----------------------------------------------------------------------------
-	void OControlAccess::enableControl( sal_Int16 _nId, sal_Bool _bEnable )
-	{
+    //-----------------------------------------------------------------------------
+    void OControlAccess::enableControl( sal_Int16 _nId, sal_Bool _bEnable )
+    {
         m_pFilePickerController->enableControl( _nId, _bEnable );
-	}
+    }
 
-	// -----------------------------------------------------------------------
-	void OControlAccess::implDoListboxAction( ListBox* _pListbox, sal_Int16 _nControlAction, const Any& _rValue )
-	{
-		switch ( _nControlAction )
-		{
-			case ControlActions::ADD_ITEM:
-			{
-				::rtl::OUString aEntry;
-				_rValue >>= aEntry;
-				if ( aEntry.getLength() )
-					_pListbox->InsertEntry( aEntry );
-			}
-			break;
+    // -----------------------------------------------------------------------
+    void OControlAccess::implDoListboxAction( ListBox* _pListbox, sal_Int16 _nControlAction, const Any& _rValue )
+    {
+        switch ( _nControlAction )
+        {
+            case ControlActions::ADD_ITEM:
+            {
+                ::rtl::OUString aEntry;
+                _rValue >>= aEntry;
+                if ( aEntry.getLength() )
+                    _pListbox->InsertEntry( aEntry );
+            }
+            break;
 
-			case ControlActions::ADD_ITEMS:
-			{
-				Sequence < ::rtl::OUString > aTemplateList;
-				_rValue >>= aTemplateList;
+            case ControlActions::ADD_ITEMS:
+            {
+                Sequence < ::rtl::OUString > aTemplateList;
+                _rValue >>= aTemplateList;
 
-				if ( aTemplateList.getLength() )
-				{
-					for ( long i=0; i < aTemplateList.getLength(); i++ )
-						_pListbox->InsertEntry( aTemplateList[i] );
-				}
-			}
-			break;
+                if ( aTemplateList.getLength() )
+                {
+                    for ( long i=0; i < aTemplateList.getLength(); i++ )
+                        _pListbox->InsertEntry( aTemplateList[i] );
+                }
+            }
+            break;
 
-			case ControlActions::DELETE_ITEM:
-			{
-				sal_Int32 nPos = 0;
-				if ( _rValue >>= nPos )
-					_pListbox->RemoveEntry( (sal_uInt16) nPos );
-			}
-			break;
+            case ControlActions::DELETE_ITEM:
+            {
+                sal_Int32 nPos = 0;
+                if ( _rValue >>= nPos )
+                    _pListbox->RemoveEntry( (sal_uInt16) nPos );
+            }
+            break;
 
-			case ControlActions::DELETE_ITEMS:
-				_pListbox->Clear();
-				break;
+            case ControlActions::DELETE_ITEMS:
+                _pListbox->Clear();
+                break;
 
-			default:
-				DBG_ERRORFILE( "Wrong ControlAction for implDoListboxAction()" );
-		}
-	}
+            default:
+                DBG_ERRORFILE( "Wrong ControlAction for implDoListboxAction()" );
+        }
+    }
 
-	//-----------------------------------------------------------------------------
-	void OControlAccess::implSetControlProperty( sal_Int16 _nControlId, Control* _pControl, sal_Int16 _nProperty, const Any& _rValue, sal_Bool _bIgnoreIllegalArgument )
-	{
+    //-----------------------------------------------------------------------------
+    void OControlAccess::implSetControlProperty( sal_Int16 _nControlId, Control* _pControl, sal_Int16 _nProperty, const Any& _rValue, sal_Bool _bIgnoreIllegalArgument )
+    {
         if ( !_pControl )
             _pControl = m_pFilePickerController->getControl( _nControlId );
-		DBG_ASSERT( _pControl, "OControlAccess::implSetControlProperty: invalid argument, this will crash!" );
+        DBG_ASSERT( _pControl, "OControlAccess::implSetControlProperty: invalid argument, this will crash!" );
         if ( !_pControl )
             return;
 
         DBG_ASSERT( _pControl == m_pFilePickerController->getControl( _nControlId ),
             "OControlAccess::implSetControlProperty: inconsistent parameters!" );
 
-		switch ( _nProperty )
-		{
-			case PROPERTY_FLAG_TEXT:
-			{
-				::rtl::OUString sText;
-				if ( _rValue >>= sText )
-				{
-					_pControl->SetText( sText );
-				}
-				else if ( !_bIgnoreIllegalArgument )
-				{
-					lcl_throwIllegalArgumentException();
-				}
-			}
-			break;
+        switch ( _nProperty )
+        {
+            case PROPERTY_FLAG_TEXT:
+            {
+                ::rtl::OUString sText;
+                if ( _rValue >>= sText )
+                {
+                    _pControl->SetText( sText );
+                }
+                else if ( !_bIgnoreIllegalArgument )
+                {
+                    lcl_throwIllegalArgumentException();
+                }
+            }
+            break;
 
-			case PROPERTY_FLAG_ENDBALED:
-			{
-				sal_Bool bEnabled = sal_False;
-				if ( _rValue >>= bEnabled )
-				{
+            case PROPERTY_FLAG_ENDBALED:
+            {
+                sal_Bool bEnabled = sal_False;
+                if ( _rValue >>= bEnabled )
+                {
                     m_pFilePickerController->enableControl( _nControlId, bEnabled );
-				}
-				else if ( !_bIgnoreIllegalArgument )
-				{
-					lcl_throwIllegalArgumentException();
-				}
-			}
-			break;
+                }
+                else if ( !_bIgnoreIllegalArgument )
+                {
+                    lcl_throwIllegalArgumentException();
+                }
+            }
+            break;
 
-			case PROPERTY_FLAG_VISIBLE:
-			{
-				sal_Bool bVisible = sal_False;
-				if ( _rValue >>= bVisible )
-				{
-					_pControl->Show( bVisible );
-				}
-				else if ( !_bIgnoreIllegalArgument )
-				{
-					lcl_throwIllegalArgumentException();
-				}
-			}
-			break;
+            case PROPERTY_FLAG_VISIBLE:
+            {
+                sal_Bool bVisible = sal_False;
+                if ( _rValue >>= bVisible )
+                {
+                    _pControl->Show( bVisible );
+                }
+                else if ( !_bIgnoreIllegalArgument )
+                {
+                    lcl_throwIllegalArgumentException();
+                }
+            }
+            break;
 
-			case PROPERTY_FLAG_HELPURL:
-			{
-				::rtl::OUString sHelpURL;
-				if ( _rValue >>= sHelpURL )
-				{
-					setHelpURL( _pControl, sHelpURL, m_pFileView == _pControl );
-				}
-				else if ( !_bIgnoreIllegalArgument )
-				{
-					lcl_throwIllegalArgumentException();
-				}
-			}
-			break;
+            case PROPERTY_FLAG_HELPURL:
+            {
+                ::rtl::OUString sHelpURL;
+                if ( _rValue >>= sHelpURL )
+                {
+                    setHelpURL( _pControl, sHelpURL, m_pFileView == _pControl );
+                }
+                else if ( !_bIgnoreIllegalArgument )
+                {
+                    lcl_throwIllegalArgumentException();
+                }
+            }
+            break;
 
-			case PROPERTY_FLAG_LISTITEMS:
-			{
-				DBG_ASSERT( WINDOW_LISTBOX == _pControl->GetType(),
-					"OControlAccess::implSetControlProperty: invalid control/property combination!" );
+            case PROPERTY_FLAG_LISTITEMS:
+            {
+                DBG_ASSERT( WINDOW_LISTBOX == _pControl->GetType(),
+                    "OControlAccess::implSetControlProperty: invalid control/property combination!" );
 
-				Sequence< ::rtl::OUString > aItems;
-				if ( _rValue >>= aItems )
-				{
-					// remove all previous items
-					static_cast< ListBox* >( _pControl )->Clear();
+                Sequence< ::rtl::OUString > aItems;
+                if ( _rValue >>= aItems )
+                {
+                    // remove all previous items
+                    static_cast< ListBox* >( _pControl )->Clear();
 
-					// add the new ones
-					const ::rtl::OUString* pItems		= aItems.getConstArray();
-					const ::rtl::OUString* pItemsEnd	= aItems.getConstArray() + aItems.getLength();
-					for	(	const ::rtl::OUString* pItem = pItems;
-							pItem != pItemsEnd;
-							++pItem
-						)
-					{
-						static_cast< ListBox* >( _pControl )->InsertEntry( *pItem );
-					}
-							
-				}
-				else if ( !_bIgnoreIllegalArgument )
-				{
-					lcl_throwIllegalArgumentException();
-				}
-			}
-			break;
+                    // add the new ones
+                    const ::rtl::OUString* pItems    = aItems.getConstArray();
+                    const ::rtl::OUString* pItemsEnd = aItems.getConstArray() + aItems.getLength();
+                    for ( const ::rtl::OUString* pItem = pItems;
+                            pItem != pItemsEnd;
+                            ++pItem
+                        )
+                    {
+                        static_cast< ListBox* >( _pControl )->InsertEntry( *pItem );
+                    }
 
-			case PROPERTY_FLAG_SELECTEDITEM:
-			{
-				DBG_ASSERT( WINDOW_LISTBOX == _pControl->GetType(),
-					"OControlAccess::implSetControlProperty: invalid control/property combination!" );
+                }
+                else if ( !_bIgnoreIllegalArgument )
+                {
+                    lcl_throwIllegalArgumentException();
+                }
+            }
+            break;
 
-				::rtl::OUString sSelected;
-				if ( _rValue >>= sSelected )
-				{
-					static_cast< ListBox* >( _pControl )->SelectEntry( sSelected );
-				}
-				else if ( !_bIgnoreIllegalArgument )
-				{
-					lcl_throwIllegalArgumentException();
-				}
-			}
-			break;
+            case PROPERTY_FLAG_SELECTEDITEM:
+            {
+                DBG_ASSERT( WINDOW_LISTBOX == _pControl->GetType(),
+                    "OControlAccess::implSetControlProperty: invalid control/property combination!" );
 
-			case PROPERTY_FLAG_SELECTEDITEMINDEX:
-			{
-				DBG_ASSERT( WINDOW_LISTBOX == _pControl->GetType(),
-					"OControlAccess::implSetControlProperty: invalid control/property combination!" );
+                ::rtl::OUString sSelected;
+                if ( _rValue >>= sSelected )
+                {
+                    static_cast< ListBox* >( _pControl )->SelectEntry( sSelected );
+                }
+                else if ( !_bIgnoreIllegalArgument )
+                {
+                    lcl_throwIllegalArgumentException();
+                }
+            }
+            break;
 
-				sal_Int32 nPos = 0;
-				if ( _rValue >>= nPos )
-				{
-					static_cast< ListBox* >( _pControl )->SelectEntryPos( (sal_uInt16) nPos );
-				}
-				else if ( !_bIgnoreIllegalArgument )
-				{
-					lcl_throwIllegalArgumentException();
-				}
-			}
-			break;
+            case PROPERTY_FLAG_SELECTEDITEMINDEX:
+            {
+                DBG_ASSERT( WINDOW_LISTBOX == _pControl->GetType(),
+                    "OControlAccess::implSetControlProperty: invalid control/property combination!" );
 
-			case PROPERTY_FLAG_CHECKED:
-			{
-				DBG_ASSERT( WINDOW_CHECKBOX == _pControl->GetType(),
-					"OControlAccess::implSetControlProperty: invalid control/property combination!" );
+                sal_Int32 nPos = 0;
+                if ( _rValue >>= nPos )
+                {
+                    static_cast< ListBox* >( _pControl )->SelectEntryPos( (sal_uInt16) nPos );
+                }
+                else if ( !_bIgnoreIllegalArgument )
+                {
+                    lcl_throwIllegalArgumentException();
+                }
+            }
+            break;
 
-				sal_Bool bChecked = sal_False;
-				if ( _rValue >>= bChecked )
-				{
-					static_cast< CheckBox* >( _pControl )->Check( bChecked );
-				}
-				else if ( !_bIgnoreIllegalArgument )
-				{
-					lcl_throwIllegalArgumentException();
-				}
-			}
-			break;
+            case PROPERTY_FLAG_CHECKED:
+            {
+                DBG_ASSERT( WINDOW_CHECKBOX == _pControl->GetType(),
+                    "OControlAccess::implSetControlProperty: invalid control/property combination!" );
 
-			default:
-				DBG_ERROR( "OControlAccess::implSetControlProperty: invalid property id!" );
-		}
-	}
+                sal_Bool bChecked = sal_False;
+                if ( _rValue >>= bChecked )
+                {
+                    static_cast< CheckBox* >( _pControl )->Check( bChecked );
+                }
+                else if ( !_bIgnoreIllegalArgument )
+                {
+                    lcl_throwIllegalArgumentException();
+                }
+            }
+            break;
 
-	//-----------------------------------------------------------------------------
-	Any	OControlAccess::implGetControlProperty( Control* _pControl, sal_Int16 _nProperty ) const
-	{
-		DBG_ASSERT( _pControl, "OControlAccess::implGetControlProperty: invalid argument, this will crash!" );
+            default:
+                DBG_ERROR( "OControlAccess::implSetControlProperty: invalid property id!" );
+        }
+    }
 
-		Any aReturn;
-		switch ( _nProperty )
-		{
-			case PROPERTY_FLAG_TEXT:
-				aReturn <<= ::rtl::OUString( _pControl->GetText() );
-				break;
+    //-----------------------------------------------------------------------------
+    Any OControlAccess::implGetControlProperty( Control* _pControl, sal_Int16 _nProperty ) const
+    {
+        DBG_ASSERT( _pControl, "OControlAccess::implGetControlProperty: invalid argument, this will crash!" );
 
-			case PROPERTY_FLAG_ENDBALED:
-				aReturn <<= (sal_Bool)_pControl->IsEnabled();
-				break;
+        Any aReturn;
+        switch ( _nProperty )
+        {
+            case PROPERTY_FLAG_TEXT:
+                aReturn <<= ::rtl::OUString( _pControl->GetText() );
+                break;
 
-			case PROPERTY_FLAG_VISIBLE:
-				aReturn <<= (sal_Bool)_pControl->IsVisible();
-				break;
+            case PROPERTY_FLAG_ENDBALED:
+                aReturn <<= (sal_Bool)_pControl->IsEnabled();
+                break;
 
-			case PROPERTY_FLAG_HELPURL:
-				aReturn <<= getHelpURL( _pControl, m_pFileView == _pControl );
-				break;
+            case PROPERTY_FLAG_VISIBLE:
+                aReturn <<= (sal_Bool)_pControl->IsVisible();
+                break;
 
-			case PROPERTY_FLAG_LISTITEMS:
-			{
-				DBG_ASSERT( WINDOW_LISTBOX == _pControl->GetType(),
-					"OControlAccess::implGetControlProperty: invalid control/property combination!" );
+            case PROPERTY_FLAG_HELPURL:
+                aReturn <<= getHelpURL( _pControl, m_pFileView == _pControl );
+                break;
 
-				Sequence< ::rtl::OUString > aItems( static_cast< ListBox* >( _pControl )->GetEntryCount() );
-				::rtl::OUString* pItems = aItems.getArray();
-				for ( sal_uInt16 i=0; i<static_cast< ListBox* >( _pControl )->GetEntryCount(); ++i )
-					*pItems++ = static_cast< ListBox* >( _pControl )->GetEntry( i );
+            case PROPERTY_FLAG_LISTITEMS:
+            {
+                DBG_ASSERT( WINDOW_LISTBOX == _pControl->GetType(),
+                    "OControlAccess::implGetControlProperty: invalid control/property combination!" );
 
-				aReturn <<= aItems;
-			}
-			break;
+                Sequence< ::rtl::OUString > aItems( static_cast< ListBox* >( _pControl )->GetEntryCount() );
+                ::rtl::OUString* pItems = aItems.getArray();
+                for ( sal_uInt16 i=0; i<static_cast< ListBox* >( _pControl )->GetEntryCount(); ++i )
+                    *pItems++ = static_cast< ListBox* >( _pControl )->GetEntry( i );
 
-			case PROPERTY_FLAG_SELECTEDITEM:
-			{
-				DBG_ASSERT( WINDOW_LISTBOX == _pControl->GetType(),
-					"OControlAccess::implGetControlProperty: invalid control/property combination!" );
+                aReturn <<= aItems;
+            }
+            break;
 
-				sal_uInt16 nSelected = static_cast< ListBox* >( _pControl )->GetSelectEntryPos();
-				::rtl::OUString sSelected;
-				if ( LISTBOX_ENTRY_NOTFOUND != nSelected )
-					sSelected = static_cast< ListBox* >( _pControl )->GetSelectEntry();
-				aReturn <<= sSelected;
-			}
-			break;
+            case PROPERTY_FLAG_SELECTEDITEM:
+            {
+                DBG_ASSERT( WINDOW_LISTBOX == _pControl->GetType(),
+                    "OControlAccess::implGetControlProperty: invalid control/property combination!" );
 
-			case PROPERTY_FLAG_SELECTEDITEMINDEX:
-			{
-				DBG_ASSERT( WINDOW_LISTBOX == _pControl->GetType(),
-					"OControlAccess::implGetControlProperty: invalid control/property combination!" );
+                sal_uInt16 nSelected = static_cast< ListBox* >( _pControl )->GetSelectEntryPos();
+                ::rtl::OUString sSelected;
+                if ( LISTBOX_ENTRY_NOTFOUND != nSelected )
+                    sSelected = static_cast< ListBox* >( _pControl )->GetSelectEntry();
+                aReturn <<= sSelected;
+            }
+            break;
 
-				sal_uInt16 nSelected = static_cast< ListBox* >( _pControl )->GetSelectEntryPos();
-				if ( LISTBOX_ENTRY_NOTFOUND != nSelected )
-					aReturn <<= (sal_Int32)static_cast< ListBox* >( _pControl )->GetSelectEntryPos();
-				else
-					aReturn <<= (sal_Int32)-1;
-			}
-			break;
+            case PROPERTY_FLAG_SELECTEDITEMINDEX:
+            {
+                DBG_ASSERT( WINDOW_LISTBOX == _pControl->GetType(),
+                    "OControlAccess::implGetControlProperty: invalid control/property combination!" );
 
-			case PROPERTY_FLAG_CHECKED:
-				DBG_ASSERT( WINDOW_CHECKBOX == _pControl->GetType(),
-					"OControlAccess::implGetControlProperty: invalid control/property combination!" );
+                sal_uInt16 nSelected = static_cast< ListBox* >( _pControl )->GetSelectEntryPos();
+                if ( LISTBOX_ENTRY_NOTFOUND != nSelected )
+                    aReturn <<= (sal_Int32)static_cast< ListBox* >( _pControl )->GetSelectEntryPos();
+                else
+                    aReturn <<= (sal_Int32)-1;
+            }
+            break;
 
-				aReturn <<= (sal_Bool)static_cast< CheckBox* >( _pControl )->IsChecked( );
-				break;
+            case PROPERTY_FLAG_CHECKED:
+                DBG_ASSERT( WINDOW_CHECKBOX == _pControl->GetType(),
+                    "OControlAccess::implGetControlProperty: invalid control/property combination!" );
 
-			default:
-				DBG_ERROR( "OControlAccess::implGetControlProperty: invalid property id!" );
-		}
-		return aReturn;
-	}
+                aReturn <<= (sal_Bool)static_cast< CheckBox* >( _pControl )->IsChecked( );
+                break;
+
+            default:
+                DBG_ERROR( "OControlAccess::implGetControlProperty: invalid property id!" );
+        }
+        return aReturn;
+    }
 
 //.........................................................................
-}	// namespace svt
+} // namespace svt
 //.........................................................................
 

File fpicker/source/office/OfficeControlAccess.hxx

View file
  • Ignore whitespace
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
 {
 //.........................................................................
 
-	// --------------------------------------------------------------------
-	namespace InternalFilePickerElementIds
-	{
-		static const sal_Int16 PUSHBUTTON_HELP = (sal_Int16)0x1000;
-		static const sal_Int16 TOOLBOXBUTOON_DEFAULT_LOCATION = (sal_Int16)0x1001;
-		static const sal_Int16 TOOLBOXBUTOON_LEVEL_UP = (sal_Int16)0x1002;
-		static const sal_Int16 TOOLBOXBUTOON_NEW_FOLDER = (sal_Int16)0x1003;
-		static const sal_Int16 FIXEDTEXT_CURRENTFOLDER = (sal_Int16)0x1004;
-	}
+    // --------------------------------------------------------------------
+    namespace InternalFilePickerElementIds
+    {
+        static const sal_Int16 PUSHBUTTON_HELP = (sal_Int16)0x1000;
+        static const sal_Int16 TOOLBOXBUTTON_LEVEL_UP = (sal_Int16)0x1002;
+        static const sal_Int16 TOOLBOXBUTTON_NEW_FOLDER = (sal_Int16)0x1003;
+        static const sal_Int16 FIXEDTEXT_CURRENTFOLDER = (sal_Int16)0x1004;
+        static const sal_Int16 TOOLBOXBUTTON_HISTORY_BACK = (sal_Int16)0x1005;
+        static const sal_Int16 TOOLBOXBUTTON_HISTORY_FORWARD = (sal_Int16)0x1006;
+    }
 
-	// --------------------------------------------------------------------
-	/**	implements the XControlAccess, XControlInformation and XFilePickerControlAccess for the file picker
-	*/
-	class OControlAccess
-	{
-		IFilePickerController*	m_pFilePickerController;
-		SvtFileView*			m_pFileView;
+    // --------------------------------------------------------------------
+    /** implements the XControlAccess, XControlInformation and XFilePickerControlAccess for the file picker
+    */
+    class OControlAccess
+    {
+        IFilePickerController*  m_pFilePickerController;
+        SvtFileView*            m_pFileView;
 
-	public:
-		OControlAccess( IFilePickerController* _pController, SvtFileView* _pFileView );
+    public:
+        OControlAccess( IFilePickerController* _pController, SvtFileView* _pFileView );
 
-		// XControlAccess implementation
-		void setControlProperty( const ::rtl::OUString& _rControlName, const ::rtl::OUString& _rControlProperty, const ::com::sun::star::uno::Any& _rValue );
-		::com::sun::star::uno::Any	getControlProperty( const ::rtl::OUString& _rControlName, const ::rtl::OUString& _rControlProperty );
+        // XControlAccess implementation
+        void setControlProperty( const ::rtl::OUString& _rControlName, const ::rtl::OUString& _rControlProperty, const ::com::sun::star::uno::Any& _rValue );
+        ::com::sun::star::uno::Any  getControlProperty( const ::rtl::OUString& _rControlName, const ::rtl::OUString& _rControlProperty );
 
-		// XControlInformation implementation
-		::com::sun::star::uno::Sequence< ::rtl::OUString >	getSupportedControls(  );
-		::com::sun::star::uno::Sequence< ::rtl::OUString >	getSupportedControlProperties( const ::rtl::OUString& _rControlName );
-		sal_Bool											isControlSupported( const ::rtl::OUString& _rControlName );
-		sal_Bool											isControlPropertySupported( const ::rtl::OUString& _rControlName, const ::rtl::OUString& _rControlProperty );
+        // XControlInformation implementation
+        ::com::sun::star::uno::Sequence< ::rtl::OUString >  getSupportedControls(  );
+        ::com::sun::star::uno::Sequence< ::rtl::OUString >  getSupportedControlProperties( const ::rtl::OUString& _rControlName );
+        sal_Bool                                            isControlSupported( const ::rtl::OUString& _rControlName );
+        sal_Bool                                            isControlPropertySupported( const ::rtl::OUString& _rControlName, const ::rtl::OUString& _rControlProperty );
 
-		// XFilePickerControlAccess
-		void						setValue( sal_Int16 _nId, sal_Int16 _nCtrlAction, const ::com::sun::star::uno::Any& _rValue );
-		::com::sun::star::uno::Any  getValue( sal_Int16 _nId, sal_Int16 _nCtrlAction ) const;
-		void						setLabel( sal_Int16 _nId, const ::rtl::OUString& _rValue );
-		::rtl::OUString             getLabel( sal_Int16 _nId ) const;
-		void                        enableControl( sal_Int16 _nId, sal_Bool _bEnable );
+        // XFilePickerControlAccess
+        void                        setValue( sal_Int16 _nId, sal_Int16 _nCtrlAction, const ::com::sun::star::uno::Any& _rValue );
+        ::com::sun::star::uno::Any  getValue( sal_Int16 _nId, sal_Int16 _nCtrlAction ) const;
+        void                        setLabel( sal_Int16 _nId, const ::rtl::OUString& _rValue );
+        ::rtl::OUString             getLabel( sal_Int16 _nId ) const;
+        void                        enableControl( sal_Int16 _nId, sal_Bool _bEnable );
 
-		static void				setHelpURL( Window* _pControl, const ::rtl::OUString& _rURL, sal_Bool _bFileView );
-		static ::rtl::OUString	getHelpURL( Window* _pControl, sal_Bool _bFileView );
+        static void                 setHelpURL( Window* _pControl, const ::rtl::OUString& _rURL, sal_Bool _bFileView );
+        static ::rtl::OUString      getHelpURL( Window* _pControl, sal_Bool _bFileView );
 
-	private:
-		/** implements the various methods for setting properties on controls
+    private:
+        /** implements the various methods for setting properties on controls
 
             @param _nControlId
                 the id of the control
-			@param _pControl
-				the affected control. Must be the same as referred by <arg>_nControlId</arg>, or NULL.
-			@param _nProperty
-				the property to set
-				See PROPERTY_FLAG_*
-			@param _rValue
-				the value to set
-			@param _bIgnoreIllegalArgument
-				if <FALSE/>, an exception will be thrown if the given value is of improper type
-		*/
-		void						implSetControlProperty(
+            @param _pControl
+                the affected control. Must be the same as referred by <arg>_nControlId</arg>, or NULL.
+            @param _nProperty
+                the property to set
+                See PROPERTY_FLAG_*
+            @param _rValue
+                the value to set
+            @param _bIgnoreIllegalArgument
+                if <FALSE/>, an exception will be thrown if the given value is of improper type
+        */
+        void                        implSetControlProperty(
                                         sal_Int16 _nControlId,
-										Control* _pControl, sal_Int16 _nProperty, const ::com::sun::star::uno::Any& _rValue,
-										sal_Bool _bIgnoreIllegalArgument = sal_True );
+                                        Control* _pControl, sal_Int16 _nProperty, const ::com::sun::star::uno::Any& _rValue,
+                                        sal_Bool _bIgnoreIllegalArgument = sal_True );
 
-		Control* implGetControl( const ::rtl::OUString& _rControlName, sal_Int16* _pId = NULL, sal_Int32* _pPropertyMask = NULL ) const SAL_THROW( (::com::sun::star::lang::IllegalArgumentException) );
+        Control* implGetControl( const ::rtl::OUString& _rControlName, sal_Int16* _pId = NULL, sal_Int32* _pPropertyMask = NULL ) const SAL_THROW( (::com::sun::star::lang::IllegalArgumentException) );
 
-		/** implements the various methods for retrieving properties from controls
+        /** implements the various methods for retrieving properties from controls
 
-			@param _pControl
-				the affected control
-				@PRECOND not <NULL/>
-			@param _nProperty
-				the property to retrieve
-				See PROPERTY_FLAG_*
-			@return
-		*/
-		::com::sun::star::uno::Any	implGetControlProperty( Control* _pControl, sal_Int16 _nProperty ) const;
+            @param _pControl
+                the affected control
+                @PRECOND not <NULL/>
+            @param _nProperty
+                the property to retrieve
+                See PROPERTY_FLAG_*
+            @return
+        */
+        ::com::sun::star::uno::Any implGetControlProperty( Control* _pControl, sal_Int16 _nProperty ) const;
 
-		void implDoListboxAction( ListBox* _pListbox, sal_Int16 _nCtrlAction, const ::com::sun::star::uno::Any& _rValue );
+        void implDoListboxAction( ListBox* _pListbox, sal_Int16 _nCtrlAction, const ::com::sun::star::uno::Any& _rValue );
 
-	};
+    };
 
 //.........................................................................
-}	// namespace svt
+} // namespace svt
 //.........................................................................
 
 #endif // SVTOOLS_CONTROLACCESS_HXX

File fpicker/source/office/iodlg.cxx

View file
  • Ignore whitespace
     _pImp->_pBtnUp = new SvtUpButton_Impl( this, SvtResId( BTN_EXPLORERFILE_UP ) );
     _pImp->_pBtnNewFolder = new ImageButton( this, SvtResId( BTN_EXPLORERFILE_NEWFOLDER ) );
     _pImp->_pBtnNewFolder->SetStyle( _pImp->_pBtnNewFolder->GetStyle() | WB_NOPOINTERFOCUS );
-    _pImp->_pBtnStandard = new SvtTravelButton_Impl( this, SvtResId( BTN_EXPLORERFILE_STANDARD ), IMG_FILEDLG_BTN_STD );
     _pImp->_pBtnBack = new SvtBackButton_Impl( this, SvtResId( BTN_EXPLORERFILE_BACK ), IMG_FILEDLG_BTN_BACK );
     _pImp->_pBtnForward = new SvtForwardButton_Impl( this, SvtResId( BTN_EXPLORERFILE_FORWARD ), IMG_FILEDLG_BTN_FORWARD );
 
     _pImp->_pBtnUp->SetAccessibleName( _pImp->_pBtnUp->GetQuickHelpText() );
     _pImp->_pBtnNewFolder->SetAccessibleName( _pImp->_pBtnNewFolder->GetQuickHelpText() );
-    _pImp->_pBtnStandard->SetAccessibleName( _pImp->_pBtnStandard->GetQuickHelpText() );
     _pImp->_pBtnBack->SetAccessibleName( _pImp->_pBtnBack->GetQuickHelpText() );
     _pImp->_pBtnForward->SetAccessibleName( _pImp->_pBtnForward->GetQuickHelpText() );
 
     aSize.Height() += FILEDIALOG_DEF_IMAGEBORDER;
     _pImp->_pBtnNewFolder->SetSizePixel( aSize );
     _pImp->_pBtnUp->SetSizePixel( aSize );
-    _pImp->_pBtnStandard->SetSizePixel( aSize );
     _pImp->_pBtnBack->SetSizePixel( aSize );
     _pImp->_pBtnForward->SetSizePixel( aSize );
 
             LogicToPixel( Size( 3, 0 ), MAP_APPFONT ).Width();
 
     // calculate the length of all buttons
-    const sal_uInt16 nBtnCount = 5; // "previous level", "new folder", "standard dir", "back", "forward"
+    const sal_uInt16 nBtnCount = 4; // "previous level", "new folder", "back", "forward"
     long nDelta = n6AppFontInPixel; // right border
     nDelta += ( nBtnCount * aSize.Width() ); // button count * button width
     nDelta += ( nBtnCount * n3AppFontInPixel );
     aPos.X() += aSize.Width();
     aPos.X() += n3AppFontInPixel;
     _pImp->_pBtnNewFolder->SetPosPixel( aPos );
-    aPos.X() += aSize.Width();
-    aPos.X() += n3AppFontInPixel;
-    _pImp->_pBtnStandard->SetPosPixel( aPos );
 
     nDelta = aSize.Height();
     nDelta -= aCurPathSize.Height();
         _pImp->_pEdFileName->SetHelpId( HID_FILESAVE_FILEURL );
         _pImp->_pBtnFileOpen->SetHelpId( HID_FILESAVE_DOSAVE );
         _pImp->_pBtnNewFolder->SetHelpId( HID_FILESAVE_CREATEDIRECTORY );
-        _pImp->_pBtnStandard->SetHelpId( HID_FILESAVE_DEFAULTDIRECTORY );
         _pImp->_pBtnBack->SetHelpId( HID_FILESAVE_BACK );
         _pImp->_pBtnForward->SetHelpId( HID_FILESAVE_FORWARD );
         _pImp->_pBtnUp->SetHelpId( HID_FILESAVE_LEVELUP );
     Control* pControls[] =
     {
         _pImp->_pFtCurrentPath,
-        _pImp->_pBtnBack, _pImp->_pBtnForward, _pImp->_pBtnUp, _pImp->_pBtnNewFolder, _pImp->_pBtnStandard,        // image buttons
+        _pImp->_pBtnBack, _pImp->_pBtnForward, _pImp->_pBtnUp, _pImp->_pBtnNewFolder,        // image buttons
         _pFileView,                                                         // the file view
         _pImp->_pFtFileName, _pImp->_pEdFileName,
         _pImp->_pFtFileVersion, _pImp->_pLbFileVersion,
     if ( _pImp->_pBtnUp )
         _pImp->_pBtnUp->SetModeImage( GetButtonImage( IMG_FILEDLG_BTN_UP ) );
 
-    if ( _pImp->_pBtnStandard )
-        _pImp->_pBtnStandard->SetModeImage( GetButtonImage( IMG_FILEDLG_BTN_STD ) );
-
     if ( _pImp->_pBtnBack )
         _pImp->_pBtnBack->SetModeImage( GetButtonImage( IMG_FILEDLG_BTN_BACK ) );
 
     {
         Control* aMoveControlsHor[] =
         {
-            _pImp->_pBtnBack, _pImp->_pBtnForward, _pImp->_pBtnUp, _pImp->_pBtnNewFolder, _pImp->_pBtnStandard
+            _pImp->_pBtnBack, _pImp->_pBtnForward, _pImp->_pBtnUp, _pImp->_pBtnNewFolder
         };
         Control** ppMoveControls = aMoveControlsHor;
         Control** ppMoveControlsEnd = ppMoveControls + sizeof( aMoveControlsHor ) / sizeof( aMoveControlsHor[0] );
             pReturn = _pImp->_pBtnHelp;
             break;
 
-        case TOOLBOXBUTOON_DEFAULT_LOCATION:
-            pReturn = _pImp->_pBtnStandard;
-            break;
-
-        case TOOLBOXBUTOON_LEVEL_UP:
+        case TOOLBOXBUTTON_LEVEL_UP:
             pReturn = _pImp->_pBtnUp;
             break;
 
-        case TOOLBOXBUTOON_NEW_FOLDER:
+        case TOOLBOXBUTTON_NEW_FOLDER:
             pReturn = _pImp->_pBtnNewFolder;
             break;
 
             // only exists on SalGtkFilePicker
             break;
 
+        case TOOLBOXBUTTON_HISTORY_BACK:
+            pReturn = _pImp->_pBtnBack;
+            break;
+
+        case TOOLBOXBUTTON_HISTORY_FORWARD:
+            pReturn = _pImp->_pBtnForward;
+            break;
+
         default:
             DBG_ERRORFILE( "SvtFileDialog::getControl: invalid id!" );
     }

File fpicker/source/office/iodlg.hrc

View file
  • Ignore whitespace
 
 // ModalDialog DLG_SVT_EXPLORERFILE
 
-#define FT_EXPLORERFILE_CURRENTPATH		10
-#define BTN_EXPLORERFILE_NEWFOLDER			11
-#define BTN_EXPLORERFILE_BACK				12
-#define BTN_EXPLORERFILE_FORWARD			13
-#define BTN_EXPLORERFILE_UP				14
-#define BTN_EXPLORERFILE_STANDARD			15
-#define BTN_EXPLORERFILE_OPEN				16
-#define BTN_EXPLORERFILE_CANCEL			17
-#define BTN_EXPLORERFILE_HELP				18
+#define FT_EXPLORERFILE_CURRENTPATH         10
+#define BTN_EXPLORERFILE_NEWFOLDER          11
+#define BTN_EXPLORERFILE_BACK               12
+#define BTN_EXPLORERFILE_FORWARD            13
+#define BTN_EXPLORERFILE_UP                 14
+#define BTN_EXPLORERFILE_OPEN               16
+#define BTN_EXPLORERFILE_CANCEL             17
+#define BTN_EXPLORERFILE_HELP               18
 
-#define IMG_FILEDLG_BTN_UP					10
-#define IMG_FILEDLG_BTN_STD				11
-#define IMG_FILEDLG_BTN_BACK				12
-#define IMG_FILEDLG_BTN_FORWARD			13
+#define IMG_FILEDLG_BTN_UP                  10
+#define IMG_FILEDLG_BTN_BACK                12
+#define IMG_FILEDLG_BTN_FORWARD             13
 #define IMG_FILEDLG_CREATEFOLDER            14
-#define IMG_FILEDLG_PLACES_FOLDER			15
-#define IMG_FILEDLG_PLACES_LINK			16
+#define IMG_FILEDLG_PLACES_FOLDER           15
+#define IMG_FILEDLG_PLACES_LINK             16
 
-#define CTL_EXPLORERFILE_FILELIST			20
+#define CTL_EXPLORERFILE_FILELIST           20
 
-#define FT_EXPLORERFILE_FILENAME			30
-#define ED_EXPLORERFILE_FILENAME			31
-#define FT_EXPLORERFILE_SHARED_LISTBOX		32
-#define LB_EXPLORERFILE_SHARED_LISTBOX		33
-#define FT_EXPLORERFILE_FILETYPE			34
-#define LB_EXPLORERFILE_FILETYPE			35
+#define FT_EXPLORERFILE_FILENAME            30
+#define ED_EXPLORERFILE_FILENAME            31
+#define FT_EXPLORERFILE_SHARED_LISTBOX      32
+#define LB_EXPLORERFILE_SHARED_LISTBOX      33
+#define FT_EXPLORERFILE_FILETYPE            34
+#define LB_EXPLORERFILE_FILETYPE            35
 
-#define CB_EXPLORERFILE_READONLY			40
-#define CB_EXPLORERFILE_PASSWORD			41
-#define CB_AUTO_EXTENSION					42
-#define CB_OPTIONS							43
+#define CB_EXPLORERFILE_READONLY            40
+#define CB_EXPLORERFILE_PASSWORD            41
+#define CB_AUTO_EXTENSION                   42
+#define CB_OPTIONS                          43
 
 // -----------------------------------------------
 
 #define STR_EXPLORERFILE_OPEN               1
 #define STR_EXPLORERFILE_SAVE               2
 #define STR_EXPLORERFILE_BUTTONSAVE         3
-#define STR_PATHNAME						4
-#define STR_PATHSELECT						5
-#define STR_BUTTONSELECT					6
-#define STR_ACTUALVERSION					7
-#define STR_PREVIEW						8
+#define STR_PATHNAME                        4
+#define STR_PATHSELECT                      5
+#define STR_BUTTONSELECT                    6
+#define STR_ACTUALVERSION                   7
+#define STR_PREVIEW                         8
 
 // DLG_SVT_QUERYFOLDERNAME -----------------------
 
 #define BT_SVT_QUERYFOLDERNAME_DLG_CANCEL   14
 #define BT_SVT_QUERYFOLDERNAME_DLG_HELP     15
 
-// -----------------------------------------------
-
-#define SID_SFX_START                       5000
-#define SID_OPENURL                     (SID_SFX_START + 596)
-
 #endif
 

File fpicker/source/office/iodlg.src

View file
  • Ignore whitespace
     IdList = \
     { \
         IMG_FILEDLG_BTN_UP; \
-        IMG_FILEDLG_BTN_STD; \
         IMG_FILEDLG_BTN_BACK; \
         IMG_FILEDLG_BTN_FORWARD; \
         IMG_FILEDLG_CREATEFOLDER; \
         Pos = MAP_APPFONT ( 109 , 6 ) ;
         QuickHelpText [ en-US ] = "Up One Level" ;
     };
-    MenuButton BTN_EXPLORERFILE_STANDARD
-    {
-        HelpID = "fpicker:MenuButton:DLG_SVT_EXPLORERFILE:BTN_EXPLORERFILE_STANDARD";
-        TabStop = FALSE ;
-        Pos = MAP_APPFONT ( 59 , 6 ) ;
-        QuickHelpText [ en-US ] = "Default Directory" ;
-    };
     MenuButton BTN_EXPLORERFILE_BACK
     {
         HelpID = "fpicker:MenuButton:DLG_SVT_EXPLORERFILE:BTN_EXPLORERFILE_BACK";

File fpicker/source/office/iodlgimp.cxx

View file
  • Ignore whitespace
 }
 
 //-----------------------------------------------------------------------------
-void SvtFileDialogURLSelector::OpenURL( const String& rURL )
-{
-    INetURLObject aObj( rURL );
-    DBG_ASSERT( aObj.GetProtocol() != INET_PROT_NOT_VALID, "SvtFileDialogURLSelector::OpenURL: Invalid URL!" );
-    m_pParent->OpenURL_Impl( aObj.GetMainURL( INetURLObject::NO_DECODE ) );
-}
-
-//-----------------------------------------------------------------------------
 void SvtFileDialogURLSelector::Activate()
 {
     m_pMenu->Clear();
-
     FillURLMenu( m_pMenu );
-
     SetPopupMenu( m_pMenu );
 }
 
 }
 
 //=============================================================================
-//= SvtTravelButton_Impl
-//=============================================================================
-
-//-----------------------------------------------------------------------------
-SvtTravelButton_Impl::SvtTravelButton_Impl( SvtFileDialog* pParent, const ResId& rResId, sal_uInt16 nButtonId )
-    :SvtFileDialogURLSelector   ( pParent, rResId, nButtonId )
-{
-    SetDropDown( 0 );   // by default, don't drop down, as we don't have favourites
-}
-
-//-----------------------------------------------------------------------------
-void SvtTravelButton_Impl::SetFavouriteLocations( const ::std::vector< String >& _rLocations )
-{
-    m_aFavourites = _rLocations;
-    // enable the drop down if and only if we have favourites
-    SetDropDown( m_aFavourites.empty() ? 0 : PUSHBUTTON_DROPDOWN_TOOLBOX );
-}
-
-//-----------------------------------------------------------------------------
-void SvtTravelButton_Impl::FillURLMenu( PopupMenu* _pMenu )
-{
-    if ( m_aFavourites.empty() )
-        // though we claimed that we do not want to have a drop down button
-        // in this case, VCL nevertheless behaves as if we had one .... :(
-        return;
-
-    _pMenu->Clear();
-
-    sal_Bool bIsHighContrast = GetDialogParent()->GetView()->GetSettings().GetStyleSettings().GetHighContrastMode();
-
-    sal_uInt16 nItemId = 1;
-    String sDisplayName;
-
-    ::std::vector< String >::const_iterator aLoop;
-    for ( aLoop = m_aFavourites.begin(); aLoop != m_aFavourites.end(); ++aLoop, ++nItemId )
-    {
-        if ( GetDialogParent()->isUrlAllowed( *aLoop ) )
-        {
-            Image aImage = SvFileInformationManager::GetImage(
-                INetURLObject(*aLoop), bIsHighContrast );
-            if ( LocalFileHelper::ConvertURLToSystemPath(*aLoop, sDisplayName) )
-                _pMenu->InsertItem( nItemId, sDisplayName, aImage );
-            else
-                _pMenu->InsertItem( nItemId, *aLoop, aImage );
-        }
-    }
-}
-
-//-----------------------------------------------------------------------------
-void SvtTravelButton_Impl::Select()
-{
-    sal_uInt16 nId = GetCurItemId();
-    if ( nId )
-    {
-        --nId;
-        DBG_ASSERT( nId < m_aFavourites.size(), "SvtTravelButton_Impl::Select: invalid index!" );
-        if ( nId < m_aFavourites.size() )
-            OpenURL( m_aFavourites[ nId ] );
-    }
-}
-
-//-----------------------------------------------------------------------------
-void SvtTravelButton_Impl::Click()
-{
-    OpenURL( GetDialogParent()->GetStandardDir() );
-}
-
-//=============================================================================
 //= SvtHistoryButton_Impl
 //=============================================================================
 
     _pBtnHelp           ( NULL ),
     _pBtnUp             ( NULL ),
     _pBtnNewFolder      ( NULL ),
-    _pBtnStandard       ( NULL ),
     _pBtnBack           ( NULL ),
     _pBtnForward        ( NULL ),
     _pCbPassword        ( NULL ),
     delete _pCbPassword;
     delete _pCbAutoExtension;
     delete _pCbOptions;
-    delete _pBtnStandard;
     delete _pBtnBack;
     delete _pBtnForward;
     delete _pBtnNewFolder;

File fpicker/source/office/iodlgimp.hxx

View file
  • Ignore whitespace
 class SvtFileDialogURLSelector : public MenuButton
 {
 private:
-    SvtFileDialog*  m_pParent;
-    PopupMenu*      m_pMenu;
+    SvtFileDialog* m_pParent;
+    PopupMenu*     m_pMenu;
 
 protected:
-    inline          SvtFileDialog*  GetDialogParent() const { return m_pParent; }
+    inline SvtFileDialog*  GetDialogParent() const { return m_pParent; }
 
-protected:
-            void    OpenURL( const String& rURL );
-
-    virtual void    FillURLMenu( PopupMenu* _pMenu ) = 0;
-
-protected:
     SvtFileDialogURLSelector( SvtFileDialog* _pParent, const ResId& _rResId, sal_uInt16 _nButtonId );
     virtual ~SvtFileDialogURLSelector();
 
-    virtual void    Activate();
+    virtual void Activate();
+    virtual void FillURLMenu( PopupMenu* _pMenu ) = 0;
 };
 
 //*****************************************************************************
 };