diff options
author | Alexander Wilms <f.alexander.wilms@gmail.com> | 2014-02-22 21:20:15 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-02-23 03:38:49 +0000 |
commit | 0ce0c369aa8880dff9fe874ba85ec6f52ee37ddf (patch) | |
tree | 5024cba9f9ea5e3b23ea26025323f6aef39488d0 /fpicker | |
parent | b81ac16e65b311d6e43c05c22c65d2040c9d7e04 (diff) |
Remove unneccessary comments
Change-Id: I939160ae72fecbe3d4a60ce755730bd4c38497fb
Reviewed-on: https://gerrit.libreoffice.org/8182
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'fpicker')
39 files changed, 1249 insertions, 1249 deletions
diff --git a/fpicker/source/office/OfficeControlAccess.cxx b/fpicker/source/office/OfficeControlAccess.cxx index 3a5cb879bb67..d7518de9a46b 100644 --- a/fpicker/source/office/OfficeControlAccess.cxx +++ b/fpicker/source/office/OfficeControlAccess.cxx @@ -45,10 +45,10 @@ namespace svt using namespace CommonFilePickerElementIds; using namespace InternalFilePickerElementIds; - // -------------------------------------------------------------------- + namespace { - // ---------------------------------------------------------------- + #define PROPERTY_FLAG_TEXT 0x00000001 #define PROPERTY_FLAG_ENDBALED 0x00000002 #define PROPERTY_FLAG_VISIBLE 0x00000004 @@ -58,7 +58,7 @@ namespace svt #define PROPERTY_FLAG_SELECTEDITEMINDEX 0x00000040 #define PROPERTY_FLAG_CHECKED 0x00000080 - // ---------------------------------------------------------------- + // ................................................................ struct ControlDescription { @@ -121,7 +121,7 @@ namespace svt } }; - // ---------------------------------------------------------------- + // ................................................................ struct ControlProperty { @@ -161,7 +161,7 @@ namespace svt } }; - //----------------------------------------------------------------- + void lcl_throwIllegalArgumentException( ) SAL_THROW( (IllegalArgumentException) ) { throw IllegalArgumentException(); @@ -169,7 +169,7 @@ namespace svt } } - //--------------------------------------------------------------------- + OControlAccess::OControlAccess( IFilePickerController* _pController, SvtFileView* _pFileView ) :m_pFilePickerController( _pController ) ,m_pFileView( _pFileView ) @@ -177,7 +177,7 @@ namespace svt DBG_ASSERT( m_pFilePickerController, "OControlAccess::OControlAccess: invalid control locator!" ); } - //--------------------------------------------------------------------- + void OControlAccess::setHelpURL( Window* _pControl, const OUString& sHelpURL, sal_Bool _bFileView ) { OUString sHelpID( sHelpURL ); @@ -194,7 +194,7 @@ namespace svt _pControl->SetHelpId( sID ); } - //--------------------------------------------------------------------- + OUString OControlAccess::getHelpURL( Window* _pControl, sal_Bool _bFileView ) { OString aHelpId = _pControl->GetHelpId(); @@ -211,7 +211,7 @@ namespace svt return sHelpURL; } - // -------------------------------------------------------------------------- + Any OControlAccess::getControlProperty( const OUString& _rControlName, const OUString& _rControlProperty ) { // look up the control @@ -233,7 +233,7 @@ namespace svt return implGetControlProperty( pControl, aPropDesc->nPropertyId ); } - //--------------------------------------------------------------------- + Control* OControlAccess::implGetControl( const OUString& _rControlName, sal_Int16* _pId, sal_Int32* _pPropertyMask ) const SAL_THROW( (IllegalArgumentException) ) { Control* pControl = NULL; @@ -261,7 +261,7 @@ namespace svt return pControl; } - //--------------------------------------------------------------------- + void OControlAccess::setControlProperty( const OUString& _rControlName, const OUString& _rControlProperty, const ::com::sun::star::uno::Any& _rValue ) { // look up the control @@ -278,7 +278,7 @@ namespace svt implSetControlProperty( nControlId, pControl, aPropDesc->nPropertyId, _rValue, sal_False ); } - // -------------------------------------------------------------------------- + Sequence< OUString > OControlAccess::getSupportedControls( ) { Sequence< OUString > aControls( s_nControlCount ); @@ -295,7 +295,7 @@ namespace svt return aControls; } - // -------------------------------------------------------------------------- + Sequence< OUString > OControlAccess::getSupportedControlProperties( const OUString& _rControlName ) { sal_Int16 nControlId = -1; @@ -315,7 +315,7 @@ namespace svt return aProps; } - // -------------------------------------------------------------------------- + sal_Bool OControlAccess::isControlSupported( const OUString& _rControlName ) { ControlDescription tmpDesc; @@ -323,7 +323,7 @@ namespace svt return ::std::binary_search( s_pControls, s_pControlsEnd, tmpDesc, ControlDescriptionLookup() ); } - // -------------------------------------------------------------------------- + sal_Bool OControlAccess::isControlPropertySupported( const OUString& _rControlName, const OUString& _rControlProperty ) { // look up the control @@ -341,7 +341,7 @@ namespace svt return 0 != ( aPropDesc->nPropertyId & nPropertyMask ); } - //----------------------------------------------------------------------------- + void OControlAccess::setValue( sal_Int16 _nControlId, sal_Int16 _nControlAction, const Any& _rValue ) { Control* pControl = m_pFilePickerController->getControl( _nControlId ); @@ -392,7 +392,7 @@ namespace svt } } - //----------------------------------------------------------------------------- + Any OControlAccess::getValue( sal_Int16 _nControlId, sal_Int16 _nControlAction ) const { Any aRet; @@ -460,7 +460,7 @@ namespace svt return aRet; } - //----------------------------------------------------------------------------- + void OControlAccess::setLabel( sal_Int16 nId, const OUString &rLabel ) { Control* pControl = m_pFilePickerController->getControl( nId, sal_True ); @@ -469,7 +469,7 @@ namespace svt pControl->SetText( rLabel ); } - //----------------------------------------------------------------------------- + OUString OControlAccess::getLabel( sal_Int16 nId ) const { OUString sLabel; @@ -482,13 +482,13 @@ namespace svt return sLabel; } - //----------------------------------------------------------------------------- + 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 ) @@ -532,7 +532,7 @@ namespace svt } } - //----------------------------------------------------------------------------- + void OControlAccess::implSetControlProperty( sal_Int16 _nControlId, Control* _pControl, sal_Int16 _nProperty, const Any& _rValue, sal_Bool _bIgnoreIllegalArgument ) { if ( !_pControl ) @@ -688,7 +688,7 @@ namespace svt } } - //----------------------------------------------------------------------------- + Any OControlAccess::implGetControlProperty( Control* _pControl, sal_Int16 _nProperty ) const { DBG_ASSERT( _pControl, "OControlAccess::implGetControlProperty: invalid argument, this will crash!" ); diff --git a/fpicker/source/office/OfficeFilePicker.cxx b/fpicker/source/office/OfficeFilePicker.cxx index 524330925954..5c6bbfabfc31 100644 --- a/fpicker/source/office/OfficeFilePicker.cxx +++ b/fpicker/source/office/OfficeFilePicker.cxx @@ -93,20 +93,20 @@ public: //===================================================================== -//--------------------------------------------------------------------- + FilterEntry::FilterEntry( const OUString& _rTitle, const UnoFilterList& _rSubFilters ) :m_sTitle( _rTitle ) ,m_aSubFilters( _rSubFilters ) { } -//--------------------------------------------------------------------- + sal_Bool FilterEntry::hasSubFilters( ) const { return ( 0 < m_aSubFilters.getLength() ); } -//--------------------------------------------------------------------- + sal_Int32 FilterEntry::getSubFilters( UnoFilterList& _rSubFilterList ) { _rSubFilterList = m_aSubFilters; @@ -144,7 +144,7 @@ ElementEntry_Impl::ElementEntry_Impl( sal_Int16 nId ) , m_bHasEnabled( sal_False ) {} -//------------------------------------------------------------------------------------ + void SvtFilePicker::prepareExecute() { // set the default directory @@ -222,7 +222,7 @@ void SvtFilePicker::prepareExecute() } -//----------------------------------------------------------------------------- + IMPL_LINK( SvtFilePicker, DialogClosedHdl, Dialog*, pDlg ) { if ( m_xDlgClosedListener.is() ) @@ -235,11 +235,11 @@ IMPL_LINK( SvtFilePicker, DialogClosedHdl, Dialog*, pDlg ) return 0; } -//------------------------------------------------------------------------------------ + // SvtFilePicker -//------------------------------------------------------------------------------------ -//------------------------------------------------------------------------------------ + + WinBits SvtFilePicker::getWinBits( WinBits& rExtraBits ) { // set the winbits for creating the filedialog @@ -307,7 +307,7 @@ WinBits SvtFilePicker::getWinBits( WinBits& rExtraBits ) return nBits; } -//------------------------------------------------------------------------------------ + void SvtFilePicker::notify( sal_Int16 _nEventId, sal_Int16 _nControlId ) { if ( !m_xListener.is() ) @@ -338,7 +338,7 @@ void SvtFilePicker::notify( sal_Int16 _nEventId, sal_Int16 _nControlId ) } } -//------------------------------------------------------------------------------------ + namespace { //................................................................................ struct FilterTitleMatch : public ::std::unary_function< FilterEntry, bool > @@ -374,7 +374,7 @@ namespace { }; } -//------------------------------------------------------------------------------------ + sal_Bool SvtFilePicker::FilterNameExists( const OUString& rTitle ) { sal_Bool bRet = sal_False; @@ -390,7 +390,7 @@ sal_Bool SvtFilePicker::FilterNameExists( const OUString& rTitle ) return bRet; } -//------------------------------------------------------------------------------------ + sal_Bool SvtFilePicker::FilterNameExists( const UnoFilterList& _rGroupedFilters ) { sal_Bool bRet = sal_False; @@ -409,7 +409,7 @@ sal_Bool SvtFilePicker::FilterNameExists( const UnoFilterList& _rGroupedFilters return bRet; } -//------------------------------------------------------------------------------------ + void SvtFilePicker::ensureFilterList( const OUString& _rInitialCurrentFilter ) { if ( !m_pFilterList ) @@ -422,9 +422,9 @@ void SvtFilePicker::ensureFilterList( const OUString& _rInitialCurrentFilter ) } } -//------------------------------------------------------------------------------------ + // class SvtFilePicker -//------------------------------------------------------------------------------------ + SvtFilePicker::SvtFilePicker( const Reference < XMultiServiceFactory >& xFactory ) :OCommonPicker( xFactory ) ,m_pFilterList ( NULL ) @@ -445,7 +445,7 @@ SvtFilePicker::~SvtFilePicker() delete m_pElemList; } -//------------------------------------------------------------------------------------ + sal_Int16 SvtFilePicker::implExecutePicker( ) { getDialog()->SetFileCallback( this ); @@ -463,7 +463,7 @@ sal_Int16 SvtFilePicker::implExecutePicker( ) return nRet; } -//------------------------------------------------------------------------------------ + SvtFileDialog* SvtFilePicker::implCreateDialog( Window* _pParent ) { WinBits nExtraBits; @@ -482,43 +482,43 @@ SvtFileDialog* SvtFilePicker::implCreateDialog( Window* _pParent ) return dialog; } -//------------------------------------------------------------------------------------ + // disambiguate XInterface -//------------------------------------------------------------------------------------ + IMPLEMENT_FORWARD_XINTERFACE2( SvtFilePicker, OCommonPicker, SvtFilePicker_Base ) -//------------------------------------------------------------------------------------ + // disambiguate XTypeProvider -//------------------------------------------------------------------------------------ + IMPLEMENT_FORWARD_XTYPEPROVIDER2( SvtFilePicker, OCommonPicker, SvtFilePicker_Base ) -//------------------------------------------------------------------------------------ + // XExecutableDialog functions -//------------------------------------------------------------------------------------ -//------------------------------------------------------------------------------------ + + void SAL_CALL SvtFilePicker::setTitle( const OUString& _rTitle ) throw (RuntimeException) { OCommonPicker::setTitle( _rTitle ); } -//------------------------------------------------------------------------------------ + sal_Int16 SAL_CALL SvtFilePicker::execute( ) throw (RuntimeException) { return OCommonPicker::execute(); } -//------------------------------------------------------------------------------------ + // XAsynchronousExecutableDialog functions -//------------------------------------------------------------------------------------ -//------------------------------------------------------------------------------------ + + void SAL_CALL SvtFilePicker::setDialogTitle( const OUString& _rTitle ) throw (RuntimeException) { setTitle( _rTitle ); } -//------------------------------------------------------------------------------------ + void SAL_CALL SvtFilePicker::startExecuteModal( const Reference< ::com::sun::star::ui::dialogs::XDialogClosedListener >& xListener ) throw (RuntimeException, std::exception) @@ -530,9 +530,9 @@ void SAL_CALL SvtFilePicker::startExecuteModal( const Reference< ::com::sun::sta getDialog()->StartExecuteModal( LINK( this, SvtFilePicker, DialogClosedHdl ) ); } -//------------------------------------------------------------------------------------ + // XFilePicker functions -//------------------------------------------------------------------------------------ + void SAL_CALL SvtFilePicker::setMultiSelectionMode( sal_Bool bMode ) throw( RuntimeException ) { @@ -625,9 +625,9 @@ Sequence< OUString > SAL_CALL SvtFilePicker::getFiles() throw( RuntimeException return aPath; } -//------------------------------------------------------------------------------------ + // XFilePickerControlAccess functions -//------------------------------------------------------------------------------------ + void SAL_CALL SvtFilePicker::setValue( sal_Int16 nElementID, sal_Int16 nControlAction, @@ -673,7 +673,7 @@ void SAL_CALL SvtFilePicker::setValue( sal_Int16 nElementID, } } -//------------------------------------------------------------------------------------ + Any SAL_CALL SvtFilePicker::getValue( sal_Int16 nElementID, sal_Int16 nControlAction ) throw( RuntimeException ) @@ -710,7 +710,7 @@ Any SAL_CALL SvtFilePicker::getValue( sal_Int16 nElementID, sal_Int16 nControlAc } -//------------------------------------------------------------------------------------ + void SAL_CALL SvtFilePicker::setLabel( sal_Int16 nLabelID, const OUString& rValue ) throw ( RuntimeException ) { @@ -750,7 +750,7 @@ void SAL_CALL SvtFilePicker::setLabel( sal_Int16 nLabelID, const OUString& rValu } } -//------------------------------------------------------------------------------------ + OUString SAL_CALL SvtFilePicker::getLabel( sal_Int16 nLabelID ) throw ( RuntimeException ) { @@ -783,7 +783,7 @@ OUString SAL_CALL SvtFilePicker::getLabel( sal_Int16 nLabelID ) return aLabel; } -//------------------------------------------------------------------------------------ + void SAL_CALL SvtFilePicker::enableControl( sal_Int16 nElementID, sal_Bool bEnable ) throw( RuntimeException ) { @@ -823,9 +823,9 @@ void SAL_CALL SvtFilePicker::enableControl( sal_Int16 nElementID, sal_Bool bEnab } } -//------------------------------------------------------------------------------------ + // XFilePickerNotifier functions -//------------------------------------------------------------------------------------ + void SAL_CALL SvtFilePicker::addFilePickerListener( const Reference< XFilePickerListener >& xListener ) throw ( RuntimeException ) { @@ -835,7 +835,7 @@ void SAL_CALL SvtFilePicker::addFilePickerListener( const Reference< XFilePicker m_xListener = xListener; } -//------------------------------------------------------------------------------------ + void SAL_CALL SvtFilePicker::removeFilePickerListener( const Reference< XFilePickerListener >& ) throw ( RuntimeException ) { checkAlive(); @@ -844,9 +844,9 @@ void SAL_CALL SvtFilePicker::removeFilePickerListener( const Reference< XFilePic m_xListener.clear(); } -//------------------------------------------------------------------------------------ + // XFilePreview functions -//------------------------------------------------------------------------------------ + Sequence< sal_Int16 > SAL_CALL SvtFilePicker::getSupportedImageFormats() throw ( RuntimeException ) @@ -861,7 +861,7 @@ Sequence< sal_Int16 > SAL_CALL SvtFilePicker::getSupportedImageFormats() return aFormats; } -//------------------------------------------------------------------------------------ + sal_Int32 SAL_CALL SvtFilePicker::getTargetColorDepth() throw ( RuntimeException ) { checkAlive(); @@ -875,7 +875,7 @@ sal_Int32 SAL_CALL SvtFilePicker::getTargetColorDepth() throw ( RuntimeException return nDepth; } -//------------------------------------------------------------------------------------ + sal_Int32 SAL_CALL SvtFilePicker::getAvailableWidth() throw ( RuntimeException ) { checkAlive(); @@ -889,7 +889,7 @@ sal_Int32 SAL_CALL SvtFilePicker::getAvailableWidth() throw ( RuntimeException ) return nWidth; } -//------------------------------------------------------------------------------------ + sal_Int32 SAL_CALL SvtFilePicker::getAvailableHeight() throw ( RuntimeException ) { checkAlive(); @@ -903,7 +903,7 @@ sal_Int32 SAL_CALL SvtFilePicker::getAvailableHeight() throw ( RuntimeException return nHeight; } -//------------------------------------------------------------------------------------ + void SAL_CALL SvtFilePicker::setImage( sal_Int16 aImageFormat, const Any& rImage ) throw ( IllegalArgumentException, RuntimeException ) { @@ -914,7 +914,7 @@ void SAL_CALL SvtFilePicker::setImage( sal_Int16 aImageFormat, const Any& rImage getDialog()->setImage( aImageFormat, rImage ); } -//------------------------------------------------------------------------------------ + sal_Bool SAL_CALL SvtFilePicker::setShowState( sal_Bool bShowState ) throw ( RuntimeException ) { @@ -929,7 +929,7 @@ sal_Bool SAL_CALL SvtFilePicker::setShowState( sal_Bool bShowState ) return bRet; } -//------------------------------------------------------------------------------------ + sal_Bool SAL_CALL SvtFilePicker::getShowState() throw ( RuntimeException ) { checkAlive(); @@ -943,9 +943,9 @@ sal_Bool SAL_CALL SvtFilePicker::getShowState() throw ( RuntimeException ) return bRet; } -//------------------------------------------------------------------------------------ + // XFilterGroupManager functions -//------------------------------------------------------------------------------------ + void SAL_CALL SvtFilePicker::appendFilterGroup( const OUString& sGroupTitle, const Sequence< StringPair >& aFilters ) @@ -971,9 +971,9 @@ void SAL_CALL SvtFilePicker::appendFilterGroup( const OUString& sGroupTitle, m_pFilterList->insert( m_pFilterList->end(), FilterEntry( sGroupTitle, aFilters ) ); } -//------------------------------------------------------------------------------------ + // XFilterManager functions -//------------------------------------------------------------------------------------ + void SAL_CALL SvtFilePicker::appendFilter( const OUString& aTitle, const OUString& aFilter ) @@ -994,7 +994,7 @@ void SAL_CALL SvtFilePicker::appendFilter( const OUString& aTitle, m_pFilterList->insert( m_pFilterList->end(), FilterEntry( aTitle, aFilter ) ); } -//------------------------------------------------------------------------------------ + void SAL_CALL SvtFilePicker::setCurrentFilter( const OUString& aTitle ) throw( IllegalArgumentException, RuntimeException ) { @@ -1010,7 +1010,7 @@ void SAL_CALL SvtFilePicker::setCurrentFilter( const OUString& aTitle ) getDialog()->SetCurFilter( aTitle ); } -//------------------------------------------------------------------------------------ + OUString SAL_CALL SvtFilePicker::getCurrentFilter() throw( RuntimeException ) { @@ -1023,9 +1023,9 @@ OUString SAL_CALL SvtFilePicker::getCurrentFilter() } -//------------------------------------------------------------------------------------ + // XInitialization functions -//------------------------------------------------------------------------------------ + void SAL_CALL SvtFilePicker::initialize( const Sequence< Any >& _rArguments ) throw ( Exception, RuntimeException ) @@ -1081,7 +1081,7 @@ void SAL_CALL SvtFilePicker::initialize( const Sequence< Any >& _rArguments ) OCommonPicker::initialize( aArguments ); } -//------------------------------------------------------------------------- + sal_Bool SvtFilePicker::implHandleInitializationArgument( const OUString& _rName, const Any& _rValue ) SAL_THROW( ( Exception, RuntimeException ) ) { if ( _rName == "TemplateDescription" ) @@ -1107,9 +1107,9 @@ sal_Bool SvtFilePicker::implHandleInitializationArgument( const OUString& _rName return OCommonPicker::implHandleInitializationArgument( _rName, _rValue ); } -//------------------------------------------------------------------------------------ + // XServiceInfo -//------------------------------------------------------------------------------------ + /* XServiceInfo */ OUString SAL_CALL SvtFilePicker::getImplementationName() throw( RuntimeException ) diff --git a/fpicker/source/office/asyncfilepicker.cxx b/fpicker/source/office/asyncfilepicker.cxx index 012bad46a8b3..d2763257d25b 100644 --- a/fpicker/source/office/asyncfilepicker.cxx +++ b/fpicker/source/office/asyncfilepicker.cxx @@ -34,7 +34,7 @@ namespace svt //= AsyncPickerAction //==================================================================== DBG_NAME( AsyncPickerAction ) - //-------------------------------------------------------------------- + AsyncPickerAction::AsyncPickerAction( SvtFileDialog* _pDialog, SvtFileView* _pView, const Action _eAction ) :m_refCount ( 0 ) ,m_eAction ( _eAction ) @@ -47,19 +47,19 @@ namespace svt DBG_ASSERT( m_pView, "AsyncPickerAction::AsyncPickerAction: invalid view!" ); } - //-------------------------------------------------------------------- + AsyncPickerAction::~AsyncPickerAction() { DBG_DTOR( AsyncPickerAction, NULL ); } - //-------------------------------------------------------------------- + oslInterlockedCount SAL_CALL AsyncPickerAction::acquire() { return osl_atomic_increment( &m_refCount ); } - //-------------------------------------------------------------------- + oslInterlockedCount SAL_CALL AsyncPickerAction::release() { if ( 0 == osl_atomic_decrement( &m_refCount ) ) @@ -70,7 +70,7 @@ namespace svt return m_refCount; } - //-------------------------------------------------------------------- + void AsyncPickerAction::cancel() { DBG_TESTSOLARMUTEX(); @@ -81,7 +81,7 @@ namespace svt m_pView->CancelRunningAsyncAction(); } - //-------------------------------------------------------------------- + void AsyncPickerAction::execute( const OUString& _rURL, const OUString& _rFilter, @@ -151,7 +151,7 @@ namespace svt } } - //-------------------------------------------------------------------- + IMPL_LINK( AsyncPickerAction, OnActionDone, void*, pEmptyArg ) { DBG_TESTSOLARMUTEX(); diff --git a/fpicker/source/office/commonpicker.cxx b/fpicker/source/office/commonpicker.cxx index 5f2d8424516d..3602918efc28 100644 --- a/fpicker/source/office/commonpicker.cxx +++ b/fpicker/source/office/commonpicker.cxx @@ -45,7 +45,7 @@ namespace svt using namespace ::com::sun::star::beans; using namespace ::comphelper; - //--------------------------------------------------------------------- + OCommonPicker::OCommonPicker( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory ) :OCommonPicker_Base( m_aMutex ) ,OPropertyContainer( GetBroadcastHelper() ) @@ -68,7 +68,7 @@ namespace svt ); } - //--------------------------------------------------------------------- + OCommonPicker::~OCommonPicker() { if ( !GetBroadcastHelper().bDisposed ) @@ -78,19 +78,19 @@ namespace svt } } - //--------------------------------------------------------------------- + // disambiguate XInterface - //--------------------------------------------------------------------- + IMPLEMENT_FORWARD_XINTERFACE2( OCommonPicker, OCommonPicker_Base, OPropertyContainer ) - //--------------------------------------------------------------------- + // disambiguate XTypeProvider - //--------------------------------------------------------------------- + IMPLEMENT_FORWARD_XTYPEPROVIDER2( OCommonPicker, OCommonPicker_Base, OPropertyContainer ) - //--------------------------------------------------------------------- + // XComponent related methods - //--------------------------------------------------------------------- + void OCommonPicker::checkAlive() const SAL_THROW( (DisposedException) ) { if ( GetBroadcastHelper().bInDispose || GetBroadcastHelper().bDisposed ) @@ -107,7 +107,7 @@ namespace svt getDialog()->SetText( m_aTitle ); } - //--------------------------------------------------------------------- + void SAL_CALL OCommonPicker::disposing() { SolarMutexGuard aGuard; @@ -129,16 +129,16 @@ namespace svt m_xDialogParent = NULL; } - //--------------------------------------------------------------------- + void OCommonPicker::stopWindowListening() { disposeComponent( m_xWindowListenerAdapter ); disposeComponent( m_xParentListenerAdapter ); } - //--------------------------------------------------------------------- + // XEventListener - //--------------------------------------------------------------------- + void SAL_CALL OCommonPicker::disposing( const EventObject& _rSource ) throw (RuntimeException) { SolarMutexGuard aGuard; @@ -162,9 +162,9 @@ namespace svt } } - //--------------------------------------------------------------------- + // property set related methods - //--------------------------------------------------------------------- + ::cppu::IPropertyArrayHelper* OCommonPicker::createArrayHelper( ) const { Sequence< Property > aProps; @@ -172,19 +172,19 @@ namespace svt return new cppu::OPropertyArrayHelper( aProps ); } - //--------------------------------------------------------------------- + ::cppu::IPropertyArrayHelper& SAL_CALL OCommonPicker::getInfoHelper() { return *const_cast< OCommonPicker* >( this )->getArrayHelper(); } - //--------------------------------------------------------------------- + Reference< XPropertySetInfo > SAL_CALL OCommonPicker::getPropertySetInfo( ) throw(RuntimeException) { return ::cppu::OPropertySetHelper::createPropertySetInfo( getInfoHelper() ); } - //--------------------------------------------------------------------- + void SAL_CALL OCommonPicker::setFastPropertyValue_NoBroadcast( sal_Int32 _nHandle, const Any& _rValue ) throw (Exception) { OPropertyContainer::setFastPropertyValue_NoBroadcast( _nHandle, _rValue ); @@ -196,7 +196,7 @@ namespace svt } - //--------------------------------------------------------------------- + sal_Bool OCommonPicker::createPicker() { SolarMutexGuard aGuard; @@ -245,9 +245,9 @@ namespace svt return NULL != m_pDlg; } - //--------------------------------------------------------------------- + // XControlAccess functions - //--------------------------------------------------------------------- + void SAL_CALL OCommonPicker::setControlProperty( const OUString& aControlName, const OUString& aControlProperty, const Any& aValue ) throw (IllegalArgumentException, RuntimeException) { checkAlive(); @@ -260,7 +260,7 @@ namespace svt } } - //--------------------------------------------------------------------- + Any SAL_CALL OCommonPicker::getControlProperty( const OUString& aControlName, const OUString& aControlProperty ) throw (IllegalArgumentException, RuntimeException) { checkAlive(); @@ -275,9 +275,9 @@ namespace svt return Any(); } - //--------------------------------------------------------------------- + // XControlInformation functions - //--------------------------------------------------------------------- + Sequence< OUString > SAL_CALL OCommonPicker::getSupportedControls( ) throw (RuntimeException) { checkAlive(); @@ -292,7 +292,7 @@ namespace svt return Sequence< OUString >(); } - //--------------------------------------------------------------------- + sal_Bool SAL_CALL OCommonPicker::isControlSupported( const OUString& aControlName ) throw (RuntimeException) { checkAlive(); @@ -307,7 +307,7 @@ namespace svt return sal_False; } - //--------------------------------------------------------------------- + Sequence< OUString > SAL_CALL OCommonPicker::getSupportedControlProperties( const OUString& aControlName ) throw (IllegalArgumentException, RuntimeException) { checkAlive(); @@ -322,7 +322,7 @@ namespace svt return Sequence< OUString >(); } - //--------------------------------------------------------------------- + sal_Bool SAL_CALL OCommonPicker::isControlPropertySupported( const OUString& aControlName, const OUString& aControlProperty ) throw (IllegalArgumentException, RuntimeException) { checkAlive(); @@ -337,16 +337,16 @@ namespace svt return sal_False; } - //--------------------------------------------------------------------- + // XExecutableDialog functions - //--------------------------------------------------------------------- + void SAL_CALL OCommonPicker::setTitle( const OUString& _rTitle ) throw( RuntimeException ) { SolarMutexGuard aGuard; m_aTitle = _rTitle; } - //--------------------------------------------------------------------- + sal_Int16 OCommonPicker::execute() throw (RuntimeException) { SolarMutexGuard aGuard; @@ -366,9 +366,9 @@ namespace svt return nResult; } - //--------------------------------------------------------------------- + // XCancellable functions - //--------------------------------------------------------------------- + void SAL_CALL OCommonPicker::cancel( ) throw (RuntimeException) { { @@ -391,7 +391,7 @@ namespace svt m_nCancelEvent = Application::PostUserEvent( LINK( this, OCommonPicker, OnCancelPicker ) ); } - //--------------------------------------------------------------------- + IMPL_LINK_NOARG(OCommonPicker, OnCancelPicker) { // By definition, the solar mutex is locked when we arrive here. Note that this @@ -412,9 +412,9 @@ namespace svt return 0L; } - //------------------------------------------------------------------------------------ + // XInitialization functions - //------------------------------------------------------------------------------------ + void SAL_CALL OCommonPicker::initialize( const Sequence< Any >& _rArguments ) throw ( Exception, RuntimeException ) { @@ -475,7 +475,7 @@ namespace svt } } - //--------------------------------------------------------------------- + sal_Bool OCommonPicker::implHandleInitializationArgument( const OUString& _rName, const Any& _rValue ) SAL_THROW( ( Exception, RuntimeException ) ) { sal_Bool bKnown = sal_True; diff --git a/fpicker/source/office/fpinteraction.cxx b/fpicker/source/office/fpinteraction.cxx index 78a441b65d23..6072f11fbe37 100644 --- a/fpicker/source/office/fpinteraction.cxx +++ b/fpicker/source/office/fpinteraction.cxx @@ -37,7 +37,7 @@ namespace svt //= OFilePickerInteractionHandler //==================================================================== DBG_NAME( OFilePickerInteractionHandler ) - //-------------------------------------------------------------------- + OFilePickerInteractionHandler::OFilePickerInteractionHandler( const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& _rxMaster ) :m_xMaster( _rxMaster ) ,m_bUsed( sal_False ) @@ -47,13 +47,13 @@ namespace svt DBG_ASSERT( m_xMaster.is(), "OFilePickerInteractionHandler::OFilePickerInteractionHandler: invalid master handler!" ); } - //-------------------------------------------------------------------- + OFilePickerInteractionHandler::~OFilePickerInteractionHandler( ) { DBG_DTOR( OFilePickerInteractionHandler, NULL ); } - //-------------------------------------------------------------------- + void SAL_CALL OFilePickerInteractionHandler::handle( const Reference< XInteractionRequest >& _rxRequest ) throw (RuntimeException) { if (!_rxRequest.is()) @@ -115,31 +115,31 @@ namespace svt m_xMaster->handle(_rxRequest); } - //-------------------------------------------------------------------- + void OFilePickerInteractionHandler::enableInterceptions( EInterceptedInteractions eInterceptions ) { m_eInterceptions = eInterceptions; } - //-------------------------------------------------------------------- + sal_Bool OFilePickerInteractionHandler::wasUsed() const { return m_bUsed; } - //-------------------------------------------------------------------- + void OFilePickerInteractionHandler::resetUseState() { m_bUsed = sal_False; } - //-------------------------------------------------------------------- + void OFilePickerInteractionHandler::forgetRequest() { m_aException = Any(); } - //-------------------------------------------------------------------- + sal_Bool OFilePickerInteractionHandler::wasAccessDenied() const { InteractiveIOException aIoException; diff --git a/fpicker/source/office/fpsmartcontent.cxx b/fpicker/source/office/fpsmartcontent.cxx index afd374ba5ca0..e12a4a91ed47 100644 --- a/fpicker/source/office/fpsmartcontent.cxx +++ b/fpicker/source/office/fpsmartcontent.cxx @@ -44,7 +44,7 @@ namespace svt //==================================================================== //= SmartContent //==================================================================== - //-------------------------------------------------------------------- + SmartContent::SmartContent() :m_pContent( NULL ) ,m_eState( NOT_BOUND ) @@ -52,7 +52,7 @@ namespace svt { } - //-------------------------------------------------------------------- + SmartContent::SmartContent( const OUString& _rInitialURL ) :m_pContent( NULL ) ,m_eState( NOT_BOUND ) @@ -61,7 +61,7 @@ namespace svt bindTo( _rInitialURL ); } - //-------------------------------------------------------------------- + SmartContent::~SmartContent() { /* This destructor originally contained the following blurb: "Do @@ -78,7 +78,7 @@ namespace svt delete m_pContent; } - //-------------------------------------------------------------------- + void SmartContent::enableOwnInteractionHandler(::svt::OFilePickerInteractionHandler::EInterceptedInteractions eInterceptions) { Reference< XComponentContext > xContext = ::comphelper::getProcessComponentContext(); @@ -92,7 +92,7 @@ namespace svt m_xCmdEnv = new ::ucbhelper::CommandEnvironment( m_xOwnInteraction, Reference< XProgressHandler >() ); } - //-------------------------------------------------------------------- + void SmartContent::enableDefaultInteractionHandler() { // Don't free the memory here! It will be done by the next @@ -106,7 +106,7 @@ namespace svt m_xCmdEnv = new ucbhelper::CommandEnvironment( xGlobalInteractionHandler, Reference< XProgressHandler >() ); } - //-------------------------------------------------------------------- + ::svt::OFilePickerInteractionHandler* SmartContent::getOwnInteractionHandler() const { if (!m_xOwnInteraction.is()) @@ -114,7 +114,7 @@ namespace svt return m_pOwnInteraction; } - //-------------------------------------------------------------------- + SmartContent::InteractionHandlerType SmartContent::queryCurrentInteractionHandler() const { if (m_xOwnInteraction.is()) @@ -126,7 +126,7 @@ namespace svt return IHT_DEFAULT; } - //-------------------------------------------------------------------- + void SmartContent::disableInteractionHandler() { // Don't free the memory here! It will be done by the next @@ -137,7 +137,7 @@ namespace svt m_xCmdEnv.clear(); } - //-------------------------------------------------------------------- + void SmartContent::bindTo( const OUString& _rURL ) { if ( getURL() == _rURL ) @@ -182,7 +182,7 @@ namespace svt } } - //-------------------------------------------------------------------- + sal_Bool SmartContent::implIs( const OUString& _rURL, Type _eType ) { // bind to this content @@ -215,7 +215,7 @@ namespace svt return bIs; } - //-------------------------------------------------------------------- + void SmartContent::getTitle( OUString& /* [out] */ _rTitle ) { if ( !isBound() || isInvalid() ) @@ -237,7 +237,7 @@ namespace svt } } - //-------------------------------------------------------------------- + sal_Bool SmartContent::hasParentFolder( ) { if ( !isBound() || isInvalid() ) @@ -268,7 +268,7 @@ namespace svt return bRet; } - //-------------------------------------------------------------------- + sal_Bool SmartContent::canCreateFolder( ) { if ( !isBound() || isInvalid() ) diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx index f50209a6c9f6..2a643856db66 100644 --- a/fpicker/source/office/iodlg.cxx +++ b/fpicker/source/office/iodlg.cxx @@ -124,7 +124,7 @@ using namespace InternalFilePickerElementIds; namespace { - //----------------------------------------------------------------------------- + OUString getMostCurrentFilter( SvtExpFileDlg_Impl* pImpl ) { DBG_ASSERT( pImpl, "invalid impl pointer" ); @@ -139,7 +139,7 @@ namespace return pFilter->GetType(); } - //----------------------------------------------------------------------------- + sal_Bool restoreCurrentFilter( SvtExpFileDlg_Impl* _pImpl ) { DBG_ASSERT( _pImpl->GetCurFilter(), "restoreCurrentFilter: no current filter!" ); @@ -156,7 +156,7 @@ namespace return _pImpl->m_bNeedDelayedFilterExecute; } - //----------------------------------------------------------------------------- + OUString GetFsysExtension_Impl( const OUString& rFile, const OUString& rLastFilterExt ) { sal_Int32 nDotPos = rFile.lastIndexOf( '.' ); @@ -173,7 +173,7 @@ namespace return OUString(); } - //----------------------------------------------------------------------------- + void SetFsysExtension_Impl( OUString& rFile, const OUString& rExtension ) { const sal_Unicode* p0 = rFile.getStr(); @@ -189,7 +189,7 @@ namespace rFile += rExtension; } - //----------------------------------------------------------------------------- + // move the control with the given offset void lcl_MoveControl( Control* _pControl, sal_Int32 _nDeltaX, sal_Int32 _nDeltaY, sal_Int32* _pMaxY = NULL ) { @@ -209,7 +209,7 @@ namespace } } - //------------------------------------------------------------------------- + void lcl_autoUpdateFileExtension( SvtFileDialog* _pDialog, const OUString& _rLastFilterExt ) { // if auto extension is enabled .... @@ -264,7 +264,7 @@ namespace } } - //------------------------------------------------------------------------- + sal_Bool lcl_getHomeDirectory( const OUString& _rForURL, OUString& /* [out] */ _rHomeDir ) { _rHomeDir = ""; @@ -300,7 +300,7 @@ namespace return !_rHomeDir.isEmpty(); } - //--------------------------------------------------------------------- + static OUString lcl_ensureFinalSlash( const OUString& _rDir ) { INetURLObject aWorkPathObj( _rDir, INET_PROT_FILE ); @@ -308,7 +308,7 @@ namespace return aWorkPathObj.GetMainURL( INetURLObject::NO_DECODE ); } - // ----------------------------------------------------------------------- + /** retrieves the value of an environment variable @return <TRUE/> if and only if the retrieved string value is not empty */ @@ -802,7 +802,7 @@ IMPL_STATIC_LINK_NOINSTANCE( SvtFileDialog, ViewHdl_Impl, ImageButton*, EMPTYARG return 0; } -//----------------------------------------------------------------------------- + sal_Bool SvtFileDialog::createNewUserFilter( const OUString& _rNewFilter, sal_Bool _bAllowUserDefExt ) { // delete the old user filter and create a new one @@ -845,13 +845,13 @@ sal_Bool SvtFileDialog::createNewUserFilter( const OUString& _rNewFilter, sal_Bo return bIsAllFiles; } -//----------------------------------------------------------------------------- + #define FLT_NONEMPTY 0x0001 #define FLT_CHANGED 0x0002 #define FLT_USERFILTER 0x0004 #define FLT_ALLFILESFILTER 0x0008 -//----------------------------------------------------------------------------- + sal_uInt16 SvtFileDialog::adjustFilter( const OUString& _rFilter ) { sal_uInt16 nReturn = 0; @@ -916,7 +916,7 @@ sal_uInt16 SvtFileDialog::adjustFilter( const OUString& _rFilter ) return nReturn; } -//----------------------------------------------------------------------------- + IMPL_LINK_NOARG(SvtFileDialog, CancelHdl_Impl) { if ( m_pCurrentAsyncAction.is() ) @@ -931,7 +931,7 @@ IMPL_LINK_NOARG(SvtFileDialog, CancelHdl_Impl) return 1L; } -//----------------------------------------------------------------------------- + IMPL_STATIC_LINK( SvtFileDialog, OpenHdl_Impl, void*, pVoid ) { if ( pThis->_pImp->_bMultiSelection && pThis->_pFileView->GetSelectionCount() > 1 ) @@ -1766,7 +1766,7 @@ public: //***************************************************************************** -//--------------------------------------------------------------------- + void SvtFileDialog::updateListboxLabelSizes() { sal_Int16 nLineControlId[5] = { @@ -1816,7 +1816,7 @@ bool implIsInvalid( const OUString & rURL ) } -//--------------------------------------------------------------------- + OUString SvtFileDialog::implGetInitialURL( const OUString& _rPath, const OUString& _rFallback ) { // an URL parser for the fallback @@ -1868,7 +1868,7 @@ OUString SvtFileDialog::implGetInitialURL( const OUString& _rPath, const OUStrin return aURLParser.GetMainURL( INetURLObject::NO_DECODE ); } -//--------------------------------------------------------------------- + short SvtFileDialog::Execute() { if ( !PrepareExecute() ) @@ -1900,7 +1900,7 @@ short SvtFileDialog::Execute() return nResult; } -//--------------------------------------------------------------------- + void SvtFileDialog::StartExecuteModal( const Link& rEndDialogHdl ) { PrepareExecute(); @@ -1909,7 +1909,7 @@ void SvtFileDialog::StartExecuteModal( const Link& rEndDialogHdl ) ModalDialog::StartExecuteModal( rEndDialogHdl ); } -//----------------------------------------------------------------------------- + void SvtFileDialog::onAsyncOperationStarted() { EnableUI( sal_False ); @@ -1918,7 +1918,7 @@ void SvtFileDialog::onAsyncOperationStarted() _pImp->_pBtnCancel->GrabFocus(); } -//----------------------------------------------------------------------------- + void SvtFileDialog::onAsyncOperationFinished() { EnableUI( sal_True ); @@ -1929,13 +1929,13 @@ void SvtFileDialog::onAsyncOperationFinished() // and to the user, the operation appears to be synchronous) } -//----------------------------------------------------------------------------- + void SvtFileDialog::RemovablePlaceSelected(bool enable) { _pImp->_pPlaces->SetDelEnabled( enable ); } -//------------------------------------------------------------------------- + void SvtFileDialog::displayIOException( const OUString& _rURL, IOErrorCode _eCode ) { try @@ -1973,7 +1973,7 @@ void SvtFileDialog::displayIOException( const OUString& _rURL, IOErrorCode _eCod } } -//----------------------------------------------------------------------------- + void SvtFileDialog::EnableUI( sal_Bool _bEnable ) { Enable( _bEnable ); @@ -1990,7 +1990,7 @@ void SvtFileDialog::EnableUI( sal_Bool _bEnable ) } } -//----------------------------------------------------------------------------- + void SvtFileDialog::EnableControl( Control* _pControl, sal_Bool _bEnable ) { if ( !_pControl ) @@ -2011,7 +2011,7 @@ void SvtFileDialog::EnableControl( Control* _pControl, sal_Bool _bEnable ) m_aDisabledControls.insert( _pControl ); } -//---------------------------------------------------------------------------- + short SvtFileDialog::PrepareExecute() { @@ -2196,7 +2196,7 @@ short SvtFileDialog::PrepareExecute() return 1; } -//----------------------------------------------------------------------------- + void SvtFileDialog::executeAsync( ::svt::AsyncPickerAction::Action _eAction, const OUString& _rURL, const OUString& _rFilter ) { @@ -2325,7 +2325,7 @@ void SvtFileDialog::AddFilterGroup( const OUString& _rFilter, const Sequence< St implAddFilter( pSubFilters->First, pSubFilters->Second ); } -//----------------------------------------------------------------------------- + void SvtFileDialog::SetCurFilter( const OUString& rFilter ) { DBG_ASSERT( !IsInExecute(), "SvtFileDialog::SetCurFilter: currently executing!" ); @@ -2554,7 +2554,7 @@ sal_Bool SvtFileDialog::IsolateFilterFromPath_Impl( OUString& rPath, OUString& r return sal_True; } -//----------------------------------------------------------------------------- + void SvtFileDialog::implUpdateImages( ) { m_aImages = ImageList( SvtResId( RID_FILEPICKER_IMAGES ) ); @@ -2567,7 +2567,7 @@ void SvtFileDialog::implUpdateImages( ) _pImp->_pBtnNewFolder->SetModeImage( GetButtonImage( IMG_FILEDLG_CREATEFOLDER ) ); } -//----------------------------------------------------------------------------- + void SvtFileDialog::DataChanged( const DataChangedEvent& _rDCEvt ) { if ( DATACHANGED_SETTINGS == _rDCEvt.GetType() ) @@ -2576,7 +2576,7 @@ void SvtFileDialog::DataChanged( const DataChangedEvent& _rDCEvt ) ModalDialog::DataChanged( _rDCEvt ); } -//----------------------------------------------------------------------------- + void SvtFileDialog::Resize() { if ( IsRollUp() ) @@ -2629,7 +2629,7 @@ void SvtFileDialog::Resize() // This resize was only called to show or hide the indicator. return; - // ------------- + // move controls // controls to move vertically @@ -2672,7 +2672,7 @@ void SvtFileDialog::Resize() lcl_MoveControl( *ppMoveControls, nDeltaX, 0 ); } - // --------------- + // resize controls { Control* aSizeControls[] = @@ -2717,7 +2717,7 @@ void SvtFileDialog::Resize() _pFileNotifier->notify( DIALOG_SIZE_CHANGED, 0 ); } -//----------------------------------------------------------------------------- + Control* SvtFileDialog::getControl( sal_Int16 _nControlId, sal_Bool _bLabelControl ) const { Control* pReturn = NULL; @@ -2842,7 +2842,7 @@ Control* SvtFileDialog::getControl( sal_Int16 _nControlId, sal_Bool _bLabelContr return pReturn; } -// ----------------------------------------------------------------------- + void SvtFileDialog::enableControl( sal_Int16 _nControlId, sal_Bool _bEnable ) { Control* pControl = getControl( _nControlId, sal_False ); @@ -2853,7 +2853,7 @@ void SvtFileDialog::enableControl( sal_Int16 _nControlId, sal_Bool _bEnable ) EnableControl( pLabel, _bEnable ); } -// ----------------------------------------------------------------------- + void SvtFileDialog::AddControls_Impl( ) { // create the "insert as link" checkbox, if needed @@ -2968,7 +2968,7 @@ void SvtFileDialog::AddControls_Impl( ) initDefaultPlaces(); } -// ----------------------------------------------------------------------- + sal_Int32 SvtFileDialog::getTargetColorDepth() { if ( _pPrevBmp ) @@ -2977,7 +2977,7 @@ sal_Int32 SvtFileDialog::getTargetColorDepth() return 0; } -// ----------------------------------------------------------------------- + sal_Int32 SvtFileDialog::getAvailableWidth() { if ( _pPrevBmp ) @@ -2986,7 +2986,7 @@ sal_Int32 SvtFileDialog::getAvailableWidth() return 0; } -// ----------------------------------------------------------------------- + sal_Int32 SvtFileDialog::getAvailableHeight() { if ( _pPrevBmp ) @@ -2995,7 +2995,7 @@ sal_Int32 SvtFileDialog::getAvailableHeight() return 0; } -// ----------------------------------------------------------------------- + void SvtFileDialog::setImage( sal_Int16 /*aImageFormat*/, const Any& rImage ) { if ( ! _pPrevBmp || ! _pPrevBmp->IsVisible() ) @@ -3020,7 +3020,7 @@ void SvtFileDialog::setImage( sal_Int16 /*aImageFormat*/, const Any& rImage ) } } -// ----------------------------------------------------------------------- + sal_Bool SvtFileDialog::setShowState( sal_Bool /*bShowState*/ ) { // #97633 for the system filedialog it's @@ -3038,7 +3038,7 @@ sal_Bool SvtFileDialog::setShowState( sal_Bool /*bShowState*/ ) return sal_False; } -// ----------------------------------------------------------------------- + OUString SvtFileDialog::getCurrentFileText( ) const { OUString sReturn; @@ -3047,7 +3047,7 @@ OUString SvtFileDialog::getCurrentFileText( ) const return sReturn; } -// ----------------------------------------------------------------------- + void SvtFileDialog::setCurrentFileText( const OUString& _rText, bool _bSelectAll ) { if ( _pImp && _pImp->_pEdFileName ) @@ -3058,13 +3058,13 @@ void SvtFileDialog::setCurrentFileText( const OUString& _rText, bool _bSelectAll } } -// ----------------------------------------------------------------------- + sal_Bool SvtFileDialog::isAutoExtensionEnabled() { return _pImp->_pCbAutoExtension && _pImp->_pCbAutoExtension->IsChecked(); } -// ----------------------------------------------------------------------- + sal_Bool SvtFileDialog::getShowState() { if ( _pPrevBmp ) @@ -3073,7 +3073,7 @@ sal_Bool SvtFileDialog::getShowState() return sal_False; } -// ----------------------------------------------------------------------- + void SvtFileDialog::ReleaseOwnership( Window* pUserControl ) /* @@ -3351,7 +3351,7 @@ QueryFolderNameDialog::QueryFolderNameDialog(Window* _pParent, m_pNameLine->set_label( *pGroupName ); }; -// ----------------------------------------------------------------------- + IMPL_LINK_NOARG(QueryFolderNameDialog, OKHdl) { // trim the strings @@ -3360,7 +3360,7 @@ IMPL_LINK_NOARG(QueryFolderNameDialog, OKHdl) return 1; } -// ----------------------------------------------------------------------- + IMPL_LINK_NOARG(QueryFolderNameDialog, NameHdl) { // trim the strings diff --git a/fpicker/source/office/iodlgimp.cxx b/fpicker/source/office/iodlgimp.cxx index d1a9b00b8f99..e8630a196aa4 100644 --- a/fpicker/source/office/iodlgimp.cxx +++ b/fpicker/source/office/iodlgimp.cxx @@ -98,7 +98,7 @@ SvtFileDialogFilter_Impl::~SvtFileDialogFilter_Impl() //= SvtFileDialogURLSelector //============================================================================= -//----------------------------------------------------------------------------- + SvtFileDialogURLSelector::SvtFileDialogURLSelector( SvtFileDialog* _pParent, const ResId& _rResId, sal_uInt16 _nButtonId ) :MenuButton ( _pParent, _rResId ) ,m_pParent ( _pParent ) @@ -110,13 +110,13 @@ SvtFileDialogURLSelector::SvtFileDialogURLSelector( SvtFileDialog* _pParent, con SetDropDown( PUSHBUTTON_DROPDOWN_TOOLBOX ); } -//----------------------------------------------------------------------------- + SvtFileDialogURLSelector::~SvtFileDialogURLSelector() { delete m_pMenu; } -//----------------------------------------------------------------------------- + void SvtFileDialogURLSelector::Activate() { m_pMenu->Clear(); @@ -130,18 +130,18 @@ void SvtFileDialogURLSelector::Activate() //= SvtUpButton_Impl //============================================================================= -//----------------------------------------------------------------------------- + SvtUpButton_Impl::SvtUpButton_Impl( SvtFileDialog* pParent, const ResId& rResId ) :SvtFileDialogURLSelector( pParent, rResId, IMG_FILEDLG_BTN_UP ) { } -//----------------------------------------------------------------------------- + SvtUpButton_Impl::~SvtUpButton_Impl() { } -//----------------------------------------------------------------------------- + void SvtUpButton_Impl::FillURLMenu( PopupMenu* _pMenu ) { SvtFileView* pBox = GetDialogParent()->GetView(); @@ -184,7 +184,7 @@ void SvtUpButton_Impl::FillURLMenu( PopupMenu* _pMenu ) } } -//----------------------------------------------------------------------------- + void SvtUpButton_Impl::Select() { sal_uInt16 nId = GetCurItemId(); @@ -198,7 +198,7 @@ void SvtUpButton_Impl::Select() } } -//----------------------------------------------------------------------------- + void SvtUpButton_Impl::Click() { GetDialogParent()->PrevLevel_Impl(); @@ -287,7 +287,7 @@ void SvtExpFileDlg_Impl::SetStandardDir( const OUString& _rDir ) //***************************************************************************** #if defined DBG_UTIL -//----------------------------------------------------------------------------- + namespace { OUString lcl_DecoratedFilter( const OUString& _rOriginalFilter ) { @@ -299,14 +299,14 @@ namespace { } } #endif -//----------------------------------------------------------------------------- + void SvtExpFileDlg_Impl::ClearFilterList( ) { _pLbFilter->Clear(); } -//----------------------------------------------------------------------------- + void SvtExpFileDlg_Impl::SetCurFilter( SvtFileDialogFilter_Impl* pFilter, const OUString& rDisplayName ) { DBG_ASSERT( pFilter, "SvtExpFileDlg_Impl::SetCurFilter: invalid filter!" ); @@ -318,7 +318,7 @@ void SvtExpFileDlg_Impl::SetCurFilter( SvtFileDialogFilter_Impl* pFilter, const m_sCurrentFilterDisplayName = rDisplayName; } -//----------------------------------------------------------------------------- + void SvtExpFileDlg_Impl::InsertFilterListEntry( const SvtFileDialogFilter_Impl* _pFilterDesc ) { OUString sName = _pFilterDesc->GetName(); @@ -332,7 +332,7 @@ void SvtExpFileDlg_Impl::InsertFilterListEntry( const SvtFileDialogFilter_Impl* _pLbFilter->SetEntryData( nPos, const_cast< void* >( static_cast< const void* >( _pFilterDesc ) ) ); } -//----------------------------------------------------------------------------- + void SvtExpFileDlg_Impl::InitFilterList( ) { @@ -351,7 +351,7 @@ void SvtExpFileDlg_Impl::InitFilterList( ) InsertFilterListEntry( &(*_pFilter)[ nPos-- ] ); } -//----------------------------------------------------------------------------- + void SvtExpFileDlg_Impl::CreateFilterListControl( Window* _pParent, const ResId& _rId ) { diff --git a/fpicker/source/win32/filepicker/FPentry.cxx b/fpicker/source/win32/filepicker/FPentry.cxx index f314a5f19b22..d0ae05d4ae64 100644 --- a/fpicker/source/win32/filepicker/FPentry.cxx +++ b/fpicker/source/win32/filepicker/FPentry.cxx @@ -34,9 +34,9 @@ #include "../folderpicker/FOPServiceInfo.hxx" #include "../folderpicker/WinFOPImpl.hxx" -//----------------------------------------------- + // namespace directives -//----------------------------------------------- + using namespace ::rtl ; using namespace ::com::sun::star::uno ; @@ -47,9 +47,9 @@ using namespace ::cppu ; using ::com::sun::star::ui::dialogs::XFilePicker; using ::com::sun::star::ui::dialogs::XFilePicker2; -//------------------------------------------------ + // -//------------------------------------------------ + static Reference< XInterface > SAL_CALL createInstance( const Reference< XMultiServiceFactory >& rServiceManager ) diff --git a/fpicker/source/win32/filepicker/FileOpenDlg.cxx b/fpicker/source/win32/filepicker/FileOpenDlg.cxx index a9eee26a1f77..0898bfe608bb 100644 --- a/fpicker/source/win32/filepicker/FileOpenDlg.cxx +++ b/fpicker/source/win32/filepicker/FileOpenDlg.cxx @@ -22,9 +22,9 @@ #include "../misc/WinImplHelper.hxx" #include "FileOpenDlg.hxx" -//------------------------------------------------------------------------ + // constants -//------------------------------------------------------------------------ + namespace /* private */ { @@ -44,9 +44,9 @@ namespace /* private */ const LPCTSTR CURRENT_INSTANCE = TEXT("CurrInst"); - //------------------------------------------ + // find an appropriate parent window - //------------------------------------------ + inline bool is_current_process_window(HWND hwnd) { @@ -65,9 +65,9 @@ namespace /* private */ } }; -//------------------------------------------------------------------------ + // -//------------------------------------------------------------------------ + CFileOpenDialog::CFileOpenDialog( bool bFileOpenDialog, @@ -126,17 +126,17 @@ CFileOpenDialog::CFileOpenDialog( m_ofn.lCustData = reinterpret_cast<sal_IntPtr>(this); } -//------------------------------------------------------------------------ + // -//------------------------------------------------------------------------ + CFileOpenDialog::~CFileOpenDialog() { } -//------------------------------------------------------------------------ + // -//------------------------------------------------------------------------ + void SAL_CALL CFileOpenDialog::setTitle(const OUString& aTitle) { @@ -144,9 +144,9 @@ void SAL_CALL CFileOpenDialog::setTitle(const OUString& aTitle) m_ofn.lpstrTitle = reinterpret_cast<LPCTSTR>(m_dialogTitle.getStr()); } -//------------------------------------------------------------------------ + // -//------------------------------------------------------------------------ + void CFileOpenDialog::setFilter(const OUString& aFilter) { @@ -159,9 +159,9 @@ void CFileOpenDialog::setFilter(const OUString& aFilter) m_ofn.lpstrFilter = reinterpret_cast<LPCTSTR>(m_filterBuffer.getStr()); } -//------------------------------------------------------------------------ + // -//------------------------------------------------------------------------ + bool CFileOpenDialog::setFilterIndex(sal_uInt32 aIndex) { @@ -170,18 +170,18 @@ bool CFileOpenDialog::setFilterIndex(sal_uInt32 aIndex) return sal_True; } -//------------------------------------------------------------------------ + // -//------------------------------------------------------------------------ + sal_uInt32 CFileOpenDialog::getSelectedFilterIndex() const { return m_ofn.nFilterIndex; } -//------------------------------------------------------------------------ + // -//------------------------------------------------------------------------ + void SAL_CALL CFileOpenDialog::setDefaultName(const OUString& aName) { @@ -190,9 +190,9 @@ void SAL_CALL CFileOpenDialog::setDefaultName(const OUString& aName) m_ofn.lpstrFile = reinterpret_cast<LPTSTR>(const_cast<sal_Unicode*>(m_fileNameBuffer.getStr())); } -//------------------------------------------------------------------------ + // -//------------------------------------------------------------------------ + void SAL_CALL CFileOpenDialog::setDisplayDirectory(const OUString& aDirectory) { @@ -200,18 +200,18 @@ void SAL_CALL CFileOpenDialog::setDisplayDirectory(const OUString& aDirectory) m_ofn.lpstrInitialDir = reinterpret_cast<LPCTSTR>(m_displayDirectory.getStr()); } -//------------------------------------------------------------------------ + // -//------------------------------------------------------------------------ + OUString SAL_CALL CFileOpenDialog::getLastDisplayDirectory() const { return m_displayDirectory; } -//------------------------------------------------------------------------ + // -//------------------------------------------------------------------------ + OUString SAL_CALL CFileOpenDialog::getFullFileName() const { @@ -219,18 +219,18 @@ OUString SAL_CALL CFileOpenDialog::getFullFileName() const _wcslenex(m_fileNameBuffer.getStr())); } -//------------------------------------------------------------------------ + // -//------------------------------------------------------------------------ + OUString SAL_CALL CFileOpenDialog::getFileName() const { return OUString(m_fileTitleBuffer.getStr()); } -//------------------------------------------------------------------------ + // -//------------------------------------------------------------------------ + OUString CFileOpenDialog::getFileExtension() { @@ -241,9 +241,9 @@ OUString CFileOpenDialog::getFileExtension() return OUString(); } -//------------------------------------------------------------------------ + // -//------------------------------------------------------------------------ + void CFileOpenDialog::setDefaultFileExtension(const OUString& aExtension) { @@ -251,9 +251,9 @@ void CFileOpenDialog::setDefaultFileExtension(const OUString& aExtension) m_ofn.lpstrDefExt = reinterpret_cast<LPCTSTR>(m_defaultExtension.getStr()); } -//------------------------------------------------------------------------ + // -//------------------------------------------------------------------------ + void SAL_CALL CFileOpenDialog::setMultiSelectionMode(bool bMode) { @@ -263,18 +263,18 @@ void SAL_CALL CFileOpenDialog::setMultiSelectionMode(bool bMode) m_ofn.Flags &= ~OFN_ALLOWMULTISELECT; } -//------------------------------------------------------------------------ + // -//------------------------------------------------------------------------ + bool SAL_CALL CFileOpenDialog::getMultiSelectionMode() const { return ((m_ofn.Flags & OFN_ALLOWMULTISELECT) > 0); } -//------------------------------------------------------------------------ + // -//------------------------------------------------------------------------ + sal_Int16 SAL_CALL CFileOpenDialog::doModal() { @@ -304,27 +304,27 @@ sal_Int16 SAL_CALL CFileOpenDialog::doModal() return nRC; } -//------------------------------------------------------------------------ + // -//------------------------------------------------------------------------ + sal_uInt32 SAL_CALL CFileOpenDialog::getLastDialogError() const { return CommDlgExtendedError(); } -//------------------------------------------------------------------------ + // -//------------------------------------------------------------------------ + bool SAL_CALL CFileOpenDialog::preModal() { return sal_True; } -//------------------------------------------------------------------------ + // -//------------------------------------------------------------------------ + void SAL_CALL CFileOpenDialog::postModal(sal_Int16 nDialogResult) { @@ -339,9 +339,9 @@ void SAL_CALL CFileOpenDialog::postModal(sal_Int16 nDialogResult) } } -//------------------------------------------------------------------------ + // -//------------------------------------------------------------------------ + OUString SAL_CALL CFileOpenDialog::getCurrentFilePath() const { @@ -361,9 +361,9 @@ OUString SAL_CALL CFileOpenDialog::getCurrentFilePath() const return OUString(); } -//------------------------------------------------------------------------ + // -//------------------------------------------------------------------------ + OUString SAL_CALL CFileOpenDialog::getCurrentFolderPath() const { @@ -383,9 +383,9 @@ OUString SAL_CALL CFileOpenDialog::getCurrentFolderPath() const return OUString(); } -//------------------------------------------------------------------------ + // -//------------------------------------------------------------------------ + OUString SAL_CALL CFileOpenDialog::getCurrentFileName() const { @@ -405,77 +405,77 @@ OUString SAL_CALL CFileOpenDialog::getCurrentFileName() const return OUString(); } -//------------------------------------------------------------------------ + // -//------------------------------------------------------------------------ + sal_uInt32 SAL_CALL CFileOpenDialog::onShareViolation(const OUString&) { return 0; } -//------------------------------------------------------------------------ + // -//------------------------------------------------------------------------ + sal_uInt32 SAL_CALL CFileOpenDialog::onFileOk() { return 0; } -//------------------------------------------------------------------------ + // -//------------------------------------------------------------------------ + void SAL_CALL CFileOpenDialog::onSelChanged(HWND) { } -//------------------------------------------------------------------------ + // -//------------------------------------------------------------------------ + void SAL_CALL CFileOpenDialog::onHelp() { } -//------------------------------------------------------------------------ + // -//------------------------------------------------------------------------ + void SAL_CALL CFileOpenDialog::onInitDone() { centerPositionToParent(); } -//------------------------------------------------------------------------ + // -//------------------------------------------------------------------------ + void SAL_CALL CFileOpenDialog::onFolderChanged() { } -//------------------------------------------------------------------------ + // -//------------------------------------------------------------------------ + void SAL_CALL CFileOpenDialog::onTypeChanged(sal_uInt32) { } -//------------------------------------------------------------------------ + // -//------------------------------------------------------------------------ + sal_uInt32 SAL_CALL CFileOpenDialog::onCtrlCommand(HWND, sal_uInt16, sal_uInt16) { return 0; } -//------------------------------------------------------------------------ + // -//------------------------------------------------------------------------ + sal_uInt32 SAL_CALL CFileOpenDialog::onWMNotify( HWND, LPOFNOTIFY lpOfNotify ) { @@ -512,9 +512,9 @@ sal_uInt32 SAL_CALL CFileOpenDialog::onWMNotify( HWND, LPOFNOTIFY lpOfNotify ) return 0; } -//------------------------------------------------------------------------ + // -//------------------------------------------------------------------------ + void SAL_CALL CFileOpenDialog::handleInitDialog(HWND hwndDlg, HWND hwndChild) { @@ -528,9 +528,9 @@ void SAL_CALL CFileOpenDialog::handleInitDialog(HWND hwndDlg, HWND hwndChild) onInitDialog(hwndDlg); } -//------------------------------------------------------------------------ + // -//------------------------------------------------------------------------ + UINT_PTR CALLBACK CFileOpenDialog::ofnHookProc( HWND hChildDlg, UINT uiMsg, WPARAM wParam, LPARAM lParam) @@ -579,9 +579,9 @@ UINT_PTR CALLBACK CFileOpenDialog::ofnHookProc( return 0; } -//------------------------------------------------------------------------ + // -//------------------------------------------------------------------------ + LRESULT CALLBACK CFileOpenDialog::BaseDlgProc( HWND hWnd, UINT wMessage, WPARAM wParam, LPARAM lParam) @@ -608,9 +608,9 @@ LRESULT CALLBACK CFileOpenDialog::BaseDlgProc( hWnd,wMessage,wParam,lParam); } -//------------------------------------------------------------------------ + // -//------------------------------------------------------------------------ + CFileOpenDialog* SAL_CALL CFileOpenDialog::getCurrentInstance(HWND hwnd) { @@ -619,9 +619,9 @@ CFileOpenDialog* SAL_CALL CFileOpenDialog::getCurrentInstance(HWND hwnd) GetProp(hwnd, CURRENT_INSTANCE)); } -//------------------------------------------------------------------------ + // -//------------------------------------------------------------------------ + void SAL_CALL CFileOpenDialog::centerPositionToParent() const { diff --git a/fpicker/source/win32/filepicker/FilePicker.cxx b/fpicker/source/win32/filepicker/FilePicker.cxx index b78bacbb774f..105bb81d73e1 100644 --- a/fpicker/source/win32/filepicker/FilePicker.cxx +++ b/fpicker/source/win32/filepicker/FilePicker.cxx @@ -33,9 +33,9 @@ #include <comphelper/sequenceasvector.hxx> -//------------------------------------------------------------------------ + // namespace directives -//------------------------------------------------------------------------ + using namespace com::sun::star; @@ -44,9 +44,9 @@ using namespace ::com::sun::star::ui::dialogs::TemplateDescription; #define FILE_PICKER_DLL_NAME TEXT("fps.dll") -//------------------------------------------------------------------------ + // helper functions -//------------------------------------------------------------------------ + namespace { @@ -63,9 +63,9 @@ namespace } } -//----------------------------------------------------------------------------------------- + // -//----------------------------------------------------------------------------------------- + CFilePicker::CFilePicker( const uno::Reference<lang::XMultiServiceFactory>& xServiceMgr) : CFilePicker_Base(m_rbHelperMtx), @@ -85,9 +85,9 @@ CFilePicker::CFilePicker( const uno::Reference<lang::XMultiServiceFactory>& xSer hInstance ) ); } -//------------------------------------------------------------------------------------ + // XFPEventListenerManager -//------------------------------------------------------------------------------------ + void SAL_CALL CFilePicker::addFilePickerListener(const uno::Reference<XFilePickerListener>& xListener) throw(uno::RuntimeException) @@ -101,9 +101,9 @@ void SAL_CALL CFilePicker::addFilePickerListener(const uno::Reference<XFilePicke rBHelper.aLC.addInterface( getCppuType( &xListener ), xListener ); } -//----------------------------------------------------------------------------------------- + // -//----------------------------------------------------------------------------------------- + void SAL_CALL CFilePicker::removeFilePickerListener(const uno::Reference<XFilePickerListener>& xListener ) throw(uno::RuntimeException) @@ -116,9 +116,9 @@ void SAL_CALL CFilePicker::removeFilePickerListener(const uno::Reference<XFilePi rBHelper.aLC.removeInterface( getCppuType( &xListener ), xListener ); } -// ------------------------------------------------- + // XEventListener -// ------------------------------------------------- + void SAL_CALL CFilePicker::disposing(const lang::EventObject& aEvent) throw(uno::RuntimeException) { @@ -128,9 +128,9 @@ void SAL_CALL CFilePicker::disposing(const lang::EventObject& aEvent) throw(uno: removeFilePickerListener(xFilePickerListener); } -//----------------------------------------------------------------------------------------- + // -//----------------------------------------------------------------------------------------- + void SAL_CALL CFilePicker::fileSelectionChanged(FilePickerEvent aEvent) { @@ -139,9 +139,9 @@ void SAL_CALL CFilePicker::fileSelectionChanged(FilePickerEvent aEvent) new CFilePickerParamEventNotification(&XFilePickerListener::fileSelectionChanged,aEvent)); } -//----------------------------------------------------------------------------------------- + // -//----------------------------------------------------------------------------------------- + void SAL_CALL CFilePicker::directoryChanged(FilePickerEvent aEvent) { @@ -150,9 +150,9 @@ void SAL_CALL CFilePicker::directoryChanged(FilePickerEvent aEvent) new CFilePickerParamEventNotification(&XFilePickerListener::directoryChanged,aEvent)); } -//----------------------------------------------------------------------------------------- + // -//----------------------------------------------------------------------------------------- + void SAL_CALL CFilePicker::controlStateChanged(FilePickerEvent aEvent) { @@ -161,9 +161,9 @@ void SAL_CALL CFilePicker::controlStateChanged(FilePickerEvent aEvent) new CFilePickerParamEventNotification(&XFilePickerListener::controlStateChanged,aEvent)); } -//----------------------------------------------------------------------------------------- + // -//----------------------------------------------------------------------------------------- + void SAL_CALL CFilePicker::dialogSizeChanged() { @@ -171,9 +171,9 @@ void SAL_CALL CFilePicker::dialogSizeChanged() new CFilePickerEventNotification(&XFilePickerListener::dialogSizeChanged)); } -//----------------------------------------------------------------------------------------- + // If there are more then one listener the return value of the last one wins -//----------------------------------------------------------------------------------------- + OUString SAL_CALL CFilePicker::helpRequested(FilePickerEvent aEvent) const { @@ -217,45 +217,45 @@ OUString SAL_CALL CFilePicker::helpRequested(FilePickerEvent aEvent) const return aHelpText; } -//------------------------------------- + // -//------------------------------------- + bool CFilePicker::startupEventNotification(bool bStartupSuspended) { return m_aAsyncEventNotifier.startup(bStartupSuspended); } -//------------------------------------- + // -//------------------------------------- + void CFilePicker::shutdownEventNotification() { m_aAsyncEventNotifier.shutdown(); } -//------------------------------------- + // -//------------------------------------- + void CFilePicker::suspendEventNotification() { m_aAsyncEventNotifier.suspend(); } -//------------------------------------- + // -//------------------------------------- + void CFilePicker::resumeEventNotification() { m_aAsyncEventNotifier.resume(); } -//------------------------------------------------------------------------------------ + // XFilePicker functions -//------------------------------------------------------------------------------------ + void SAL_CALL CFilePicker::setMultiSelectionMode(sal_Bool bMode) throw(uno::RuntimeException) { @@ -264,9 +264,9 @@ void SAL_CALL CFilePicker::setMultiSelectionMode(sal_Bool bMode) throw(uno::Runt m_pImpl->setMultiSelectionMode(bMode); } -//----------------------------------------------------------------------------------------- + // -//----------------------------------------------------------------------------------------- + void SAL_CALL CFilePicker::setTitle(const OUString& aTitle) throw(uno::RuntimeException) { @@ -275,9 +275,9 @@ void SAL_CALL CFilePicker::setTitle(const OUString& aTitle) throw(uno::RuntimeEx m_pImpl->setTitle(aTitle); } -//----------------------------------------------------------------------------------------- + // -//----------------------------------------------------------------------------------------- + void SAL_CALL CFilePicker::appendFilter(const OUString& aTitle, const OUString& aFilter) throw(lang::IllegalArgumentException, uno::RuntimeException) @@ -287,9 +287,9 @@ void SAL_CALL CFilePicker::appendFilter(const OUString& aTitle, const OUString& m_pImpl->appendFilter(aTitle, aFilter); } -//----------------------------------------------------------------------------------------- + // -//----------------------------------------------------------------------------------------- + void SAL_CALL CFilePicker::setCurrentFilter(const OUString& aTitle) throw(lang::IllegalArgumentException, uno::RuntimeException) @@ -299,9 +299,9 @@ void SAL_CALL CFilePicker::setCurrentFilter(const OUString& aTitle) m_pImpl->setCurrentFilter(aTitle); } -//----------------------------------------------------------------------------------------- + // -//----------------------------------------------------------------------------------------- + OUString SAL_CALL CFilePicker::getCurrentFilter() throw(uno::RuntimeException) { @@ -310,9 +310,9 @@ OUString SAL_CALL CFilePicker::getCurrentFilter() throw(uno::RuntimeException) return m_pImpl->getCurrentFilter(); } -//----------------------------------------------------------------------------------------- + // -//----------------------------------------------------------------------------------------- + void SAL_CALL CFilePicker::appendFilterGroup(const OUString& sGroupTitle, const uno::Sequence<beans::StringPair>& aFilters) throw (lang::IllegalArgumentException, uno::RuntimeException) @@ -322,9 +322,9 @@ void SAL_CALL CFilePicker::appendFilterGroup(const OUString& sGroupTitle, const m_pImpl->appendFilterGroup(sGroupTitle, aFilters); } -//----------------------------------------------------------------------------------------- + // -//----------------------------------------------------------------------------------------- + void SAL_CALL CFilePicker::setDefaultName(const OUString& aName) throw(uno::RuntimeException) @@ -334,9 +334,9 @@ void SAL_CALL CFilePicker::setDefaultName(const OUString& aName) m_pImpl->setDefaultName(aName); } -//----------------------------------------------------------------------------------------- + // -//----------------------------------------------------------------------------------------- + void SAL_CALL CFilePicker::setDisplayDirectory(const OUString& aDirectory) throw(lang::IllegalArgumentException, uno::RuntimeException) @@ -346,9 +346,9 @@ void SAL_CALL CFilePicker::setDisplayDirectory(const OUString& aDirectory) m_pImpl->setDisplayDirectory(aDirectory); } -//----------------------------------------------------------------------------------------- + // -//----------------------------------------------------------------------------------------- + OUString SAL_CALL CFilePicker::getDisplayDirectory() throw(uno::RuntimeException) { @@ -357,9 +357,9 @@ OUString SAL_CALL CFilePicker::getDisplayDirectory() throw(uno::RuntimeException return m_pImpl->getDisplayDirectory(); } -//----------------------------------------------------------------------------------------- + // -//----------------------------------------------------------------------------------------- + uno::Sequence<OUString> SAL_CALL CFilePicker::getFiles() throw(uno::RuntimeException) { @@ -368,9 +368,9 @@ uno::Sequence<OUString> SAL_CALL CFilePicker::getFiles() throw(uno::RuntimeExcep return m_pImpl->getFiles(); } -//----------------------------------------------------------------------------------------- + // -//----------------------------------------------------------------------------------------- + uno::Sequence< OUString > SAL_CALL CFilePicker::getSelectedFiles() throw (uno::RuntimeException) { OSL_ASSERT(0 != m_pImpl.get()); @@ -408,9 +408,9 @@ uno::Sequence< OUString > SAL_CALL CFilePicker::getSelectedFiles() throw (uno::R return lTarget.getAsConstList(); } -//----------------------------------------------------------------------------------------- + // -//----------------------------------------------------------------------------------------- + sal_Int16 SAL_CALL CFilePicker::execute() throw(uno::RuntimeException) { @@ -440,9 +440,9 @@ sal_Int16 SAL_CALL CFilePicker::execute() throw(uno::RuntimeException) return ret; } -//------------------------------------------------------------------------------------ + // XFilePicker functions -//------------------------------------------------------------------------------------ + void SAL_CALL CFilePicker::setValue(sal_Int16 aControlId, sal_Int16 aControlAction, const uno::Any& aValue) throw(uno::RuntimeException) @@ -453,9 +453,9 @@ void SAL_CALL CFilePicker::setValue(sal_Int16 aControlId, sal_Int16 aControlActi m_pImpl->setValue(aControlId, aControlAction, aValue); } -//----------------------------------------------------------------------------------------- + // -//----------------------------------------------------------------------------------------- + uno::Any SAL_CALL CFilePicker::getValue(sal_Int16 aControlId, sal_Int16 aControlAction) throw(uno::RuntimeException) @@ -466,9 +466,9 @@ uno::Any SAL_CALL CFilePicker::getValue(sal_Int16 aControlId, sal_Int16 aControl return m_pImpl->getValue(aControlId, aControlAction); } -//----------------------------------------------------------------------------------------- + // -//----------------------------------------------------------------------------------------- + void SAL_CALL CFilePicker::enableControl(sal_Int16 aControlId, sal_Bool bEnable) throw(uno::RuntimeException) @@ -479,9 +479,9 @@ throw(uno::RuntimeException) m_pImpl->enableControl( aControlId, bEnable ); } -//----------------------------------------------------------------------------------------- + // -//----------------------------------------------------------------------------------------- + void SAL_CALL CFilePicker::setLabel(sal_Int16 aControlId, const OUString& aLabel) throw (uno::RuntimeException) @@ -492,9 +492,9 @@ void SAL_CALL CFilePicker::setLabel(sal_Int16 aControlId, const OUString& aLabel m_pImpl->setLabel(aControlId, aLabel); } -//----------------------------------------------------------------------------------------- + // -//----------------------------------------------------------------------------------------- + OUString SAL_CALL CFilePicker::getLabel(sal_Int16 aControlId) throw (uno::RuntimeException) @@ -505,9 +505,9 @@ OUString SAL_CALL CFilePicker::getLabel(sal_Int16 aControlId) return m_pImpl->getLabel(aControlId); } -//------------------------------------------------------------------------------------ + // -//------------------------------------------------------------------------------------ + uno::Sequence<sal_Int16> SAL_CALL CFilePicker::getSupportedImageFormats() throw (uno::RuntimeException) { @@ -517,9 +517,9 @@ uno::Sequence<sal_Int16> SAL_CALL CFilePicker::getSupportedImageFormats() throw return m_pImpl->getSupportedImageFormats(); } -//------------------------------------------------------------------------------------ + // -//------------------------------------------------------------------------------------ + sal_Int32 SAL_CALL CFilePicker::getTargetColorDepth() throw (uno::RuntimeException) { @@ -529,9 +529,9 @@ sal_Int32 SAL_CALL CFilePicker::getTargetColorDepth() throw (uno::RuntimeExcepti return m_pImpl->getTargetColorDepth(); } -//------------------------------------------------------------------------------------ + // -//------------------------------------------------------------------------------------ + sal_Int32 SAL_CALL CFilePicker::getAvailableWidth() throw (uno::RuntimeException) { @@ -541,9 +541,9 @@ sal_Int32 SAL_CALL CFilePicker::getAvailableWidth() throw (uno::RuntimeException return m_pImpl->getAvailableWidth(); } -//------------------------------------------------------------------------------------ + // -//------------------------------------------------------------------------------------ + sal_Int32 SAL_CALL CFilePicker::getAvailableHeight() throw (uno::RuntimeException) { @@ -553,9 +553,9 @@ sal_Int32 SAL_CALL CFilePicker::getAvailableHeight() throw (uno::RuntimeExceptio return m_pImpl->getAvailableHeight(); } -//------------------------------------------------------------------------------------ + // -//------------------------------------------------------------------------------------ + void SAL_CALL CFilePicker::setImage(sal_Int16 aImageFormat, const uno::Any& aImage) throw (lang::IllegalArgumentException, uno::RuntimeException) @@ -566,9 +566,9 @@ void SAL_CALL CFilePicker::setImage(sal_Int16 aImageFormat, const uno::Any& aIma m_pImpl->setImage(aImageFormat, aImage); } -//------------------------------------------------------------------------------------ + // -//------------------------------------------------------------------------------------ + sal_Bool SAL_CALL CFilePicker::setShowState(sal_Bool bShowState) throw (uno::RuntimeException) { @@ -578,9 +578,9 @@ sal_Bool SAL_CALL CFilePicker::setShowState(sal_Bool bShowState) throw (uno::Run return m_pImpl->setShowState(bShowState); } -//------------------------------------------------------------------------------------ + // -//------------------------------------------------------------------------------------ + sal_Bool SAL_CALL CFilePicker::getShowState() throw (uno::RuntimeException) { @@ -590,9 +590,9 @@ sal_Bool SAL_CALL CFilePicker::getShowState() throw (uno::RuntimeException) return m_pImpl->getShowState(); } -//------------------------------------------------------------------------------------ + // -//------------------------------------------------------------------------------------ + void SAL_CALL CFilePicker::initialize(const uno::Sequence<uno::Any>& aArguments) throw( uno::Exception, uno::RuntimeException) @@ -691,9 +691,9 @@ void SAL_CALL CFilePicker::initialize(const uno::Sequence<uno::Any>& aArguments) hInstance ) ); } -//------------------------------------------------------------------------------------ + // -//------------------------------------------------------------------------------------ + void SAL_CALL CFilePicker::cancel() throw(uno::RuntimeException) @@ -704,9 +704,9 @@ void SAL_CALL CFilePicker::cancel() m_pImpl->cancel(); } -// ------------------------------------------------- + // XServiceInfo -// ------------------------------------------------- + OUString SAL_CALL CFilePicker::getImplementationName() throw(uno::RuntimeException) @@ -721,9 +721,9 @@ sal_Bool SAL_CALL CFilePicker::supportsService(const OUString& ServiceName) return cppu::supportsService(this, ServiceName); } -// ------------------------------------------------- + // XServiceInfo -// ------------------------------------------------- + uno::Sequence<OUString> SAL_CALL CFilePicker::getSupportedServiceNames() throw(uno::RuntimeException) diff --git a/fpicker/source/win32/filepicker/FilterContainer.cxx b/fpicker/source/win32/filepicker/FilterContainer.cxx index 53d1e51f2c73..1ca694643b1e 100644 --- a/fpicker/source/win32/filepicker/FilterContainer.cxx +++ b/fpicker/source/win32/filepicker/FilterContainer.cxx @@ -31,14 +31,14 @@ #pragma warning(pop) #endif -//------------------------------------------------------------------- + // namespace directives -//------------------------------------------------------------------- -//------------------------------------------------------------------------------------- + + // ctor -//------------------------------------------------------------------------------------- + CFilterContainer::CFilterContainer( sal_Int32 initSize ) : m_vFilters( initSize ), @@ -46,9 +46,9 @@ CFilterContainer::CFilterContainer( sal_Int32 initSize ) : { } -//----------------------------------------------------------------------------------------- + // add a name/filter pair -//----------------------------------------------------------------------------------------- + sal_Bool SAL_CALL CFilterContainer::addFilter( const OUString& aName, const OUString& aFilter, sal_Bool bAllowDuplicates ) @@ -74,11 +74,11 @@ sal_Bool SAL_CALL CFilterContainer::addFilter( return ( pos < 0 ) ? sal_True : sal_False; } -//----------------------------------------------------------------------------------------- + // delete a filter // Precondition: the container is not empty // there is a filter identified by the given name -//----------------------------------------------------------------------------------------- + sal_Bool SAL_CALL CFilterContainer::delFilter( const OUString& aName ) { @@ -94,29 +94,29 @@ sal_Bool SAL_CALL CFilterContainer::delFilter( const OUString& aName ) return ( pos > -1 ) ? sal_True : sal_False; } -//----------------------------------------------------------------------------------------- + // return the number of filters currently in the container -//----------------------------------------------------------------------------------------- + sal_Int32 SAL_CALL CFilterContainer::numFilter( ) { return m_vFilters.size( ); } -//----------------------------------------------------------------------------------------- + // clear all entries -//----------------------------------------------------------------------------------------- + void SAL_CALL CFilterContainer::empty() { m_vFilters.clear( ); } -//----------------------------------------------------------------------------------------- + // get a filter by name // Precondition: the container is not empty // there is a filter identified by the name -//----------------------------------------------------------------------------------------- + sal_Bool SAL_CALL CFilterContainer::getFilter( const OUString& aName, OUString& theFilter ) const { @@ -138,9 +138,9 @@ sal_Bool SAL_CALL CFilterContainer::getFilter( const OUString& aName, OUString& return (pos > -1 ) ? sal_True : sal_False; } -//----------------------------------------------------------------------------------------- + // -//----------------------------------------------------------------------------------------- + sal_Bool SAL_CALL CFilterContainer::getFilter( sal_Int32 aIndex, OUString& theFilter ) const { @@ -159,18 +159,18 @@ sal_Bool SAL_CALL CFilterContainer::getFilter( sal_Int32 aIndex, OUString& theFi return bRet; } -//----------------------------------------------------------------------------------------- + // -//----------------------------------------------------------------------------------------- + sal_Int32 SAL_CALL CFilterContainer::getFilterPos( const OUString& aName ) const { return getFilterTagPos( aName ); } -//----------------------------------------------------------------------------------------- + // returns the index of the filter identified by name -//----------------------------------------------------------------------------------------- + sal_Int32 SAL_CALL CFilterContainer::getFilterTagPos( const OUString& aName ) const { @@ -188,9 +188,9 @@ sal_Int32 SAL_CALL CFilterContainer::getFilterTagPos( const OUString& aName ) co return -1; } -//----------------------------------------------------------------------------------------- + // starts enumerating the filter in the container -//----------------------------------------------------------------------------------------- + void SAL_CALL CFilterContainer::beginEnumFilter( ) { @@ -198,9 +198,9 @@ void SAL_CALL CFilterContainer::beginEnumFilter( ) m_bIterInitialized = sal_True; } -//----------------------------------------------------------------------------------------- + // returns true if another filter has been retrieved -//----------------------------------------------------------------------------------------- + sal_Bool SAL_CALL CFilterContainer::getNextFilter( FILTER_ENTRY_T& nextFilterEntry ) { @@ -216,13 +216,13 @@ sal_Bool SAL_CALL CFilterContainer::getNextFilter( FILTER_ENTRY_T& nextFilterEnt return bRet; } -//----------------------------------------------------------------------------------------- + void SAL_CALL CFilterContainer::setCurrentFilter( const OUString& aName ) { m_sCurrentFilter = aName; } -//----------------------------------------------------------------------------------------- + OUString SAL_CALL CFilterContainer::getCurrentFilter() const { return m_sCurrentFilter; @@ -231,11 +231,11 @@ OUString SAL_CALL CFilterContainer::getCurrentFilter() const //################################################################### -//------------------------------------------------------------------- + // calculates the length of a '\0' separated filter, that means // length of the name + '\0' + length of the filter string + // a trailing '\0' -//------------------------------------------------------------------- + static sal_uInt32 _getLengthFilter( CFilterContainer::FILTER_ENTRY_T aFilterEntry ) { @@ -244,9 +244,9 @@ static sal_uInt32 _getLengthFilter( CFilterContainer::FILTER_ENTRY_T aFilterEntr aFilterEntry.second.getLength( ) + 1 ); } -//------------------------------------------------------------------- + // calculates the length of all filters currently in the container -//------------------------------------------------------------------- + static sal_uInt32 _getTotalFilterLength( CFilterContainer& aFilterContainer ) { @@ -261,9 +261,9 @@ static sal_uInt32 _getTotalFilterLength( CFilterContainer& aFilterContainer ) return ( totalLength > 0 ) ? totalLength + 1 : totalLength; } -//------------------------------------------------------------------- + // -//------------------------------------------------------------------- + inline void _wcsmemcpy( sal_Unicode* pDest, const sal_Unicode* pSrc, sal_uInt32 nLength ) @@ -271,11 +271,11 @@ void _wcsmemcpy( sal_Unicode* pDest, const sal_Unicode* pSrc, sal_uInt32 nLength memcpy( pDest, pSrc, nLength * sizeof( sal_Unicode ) ); } -//------------------------------------------------------------------- + // a helper trivial helper function to create a filter buffer in the // format the Win32 API requires, // e.g. "Text\0*.txt\0Doc\0*.doc;*xls\0\0" -//------------------------------------------------------------------- + OUString SAL_CALL makeWinFilterBuffer( CFilterContainer& aFilterContainer ) { diff --git a/fpicker/source/win32/filepicker/PreviewCtrl.cxx b/fpicker/source/win32/filepicker/PreviewCtrl.cxx index e061a63f3b3a..55d58e689c08 100644 --- a/fpicker/source/win32/filepicker/PreviewCtrl.cxx +++ b/fpicker/source/win32/filepicker/PreviewCtrl.cxx @@ -41,16 +41,16 @@ // means 3 pixel top and 3 pixel bottom #define VERT_BORDER_SPACE 6 -//--------------------------------------------------- + // static member initialization -//--------------------------------------------------- + CFilePreview* CFilePreview::s_FilePreviewInst = NULL; CFilePreview::FILEPREVIEW_SINGLETON_DESTROYER_T CFilePreview::s_SingletonDestroyer; -//--------------------------------------------------- + // some useful helper functions -//--------------------------------------------------- + namespace // private { @@ -60,9 +60,9 @@ namespace // private // of the preview window failed }; - //------------------------------------------------------------ + // - //------------------------------------------------------------ + inline sal_Int32 SubDiv( sal_Int32 nNumber, sal_Int32 nMinuend, sal_Int32 nDenominator ) @@ -70,9 +70,9 @@ namespace // private return ( static_cast<sal_Int32>( ( nNumber - nMinuend ) / nDenominator ) ); } - //------------------------------------------------------------ + // convert himetric to pixel - //------------------------------------------------------------ + inline sal_Int32 Himetric2Pixel( HDC hDC, sal_Int32 hmSize, sal_Int32 nIndex ) @@ -80,9 +80,9 @@ namespace // private return MulDiv( hmSize, GetDeviceCaps( hDC, nIndex), HIMETRIC_INCH ); } - //------------------------------------------------------------ + // - //------------------------------------------------------------ + inline sal_uInt32 _getWidthRect( const RECT& aRect ) @@ -90,9 +90,9 @@ namespace // private return ( aRect.right - aRect.left ); } - //------------------------------------------------------------ + // - //------------------------------------------------------------ + inline sal_uInt32 _getHeightRect( const RECT& aRect ) @@ -100,10 +100,10 @@ namespace // private return ( aRect.bottom - aRect.top ); } - //------------------------------------------------------------ + // calc the upper left corner so that a given window will be // displayed centered within the given window - //------------------------------------------------------------ + inline POINT _calcULCorner( HWND hwnd, const CDimension& aPicSize ) @@ -121,11 +121,11 @@ namespace // private return ulCorner; } - //------------------------------------------------------------ + // test if a picture with the given dimensions fits into an // arbitrary window // we expect the width and height to be in pixel - //------------------------------------------------------------ + inline sal_Bool _pictureSizeFitsWindowSize( HWND hwnd, const CDimension& aPicSize ) @@ -140,11 +140,11 @@ namespace // private ( ( nHeightWnd - VERT_BORDER_SPACE ) >= aPicSize.m_cy ) ); } - //------------------------------------------------------------ + // calc the dimemsions so that a given picture fits into a // given window, if the picture fits into the given window // the original CDimension will be returned - //------------------------------------------------------------ + inline CDimension _scalePictureSize( HWND hwnd, const CDimension& aPicSize ) @@ -183,9 +183,9 @@ namespace // private } // end namespace -//--------------------------------------------------- + // to ensure only one instance (singleton) -//--------------------------------------------------- + CFilePreview* CFilePreview::createInstance( HWND aParent, @@ -218,9 +218,9 @@ CFilePreview* CFilePreview::createInstance( return s_FilePreviewInst; } -//--------------------------------------------------- + // -//--------------------------------------------------- + CFilePreview::CFilePreview( HWND aParent, @@ -272,9 +272,9 @@ CFilePreview::CFilePreview( throw CPreviewException( ); } -//--------------------------------------------------- + // -//--------------------------------------------------- + CFilePreview::~CFilePreview( ) { @@ -285,9 +285,9 @@ CFilePreview::~CFilePreview( ) OSL_POSTCOND( bRet, "Unregister preview window class failed" ); } -//--------------------------------------------------- + // sets the size of the preview window -//--------------------------------------------------- + sal_Bool SAL_CALL CFilePreview::setSize( const CDimension& aSize ) { @@ -304,9 +304,9 @@ sal_Bool SAL_CALL CFilePreview::setSize( const CDimension& aSize ) SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE ); } -//--------------------------------------------------- + // returns the dimension of the preview -//--------------------------------------------------- + sal_Bool SAL_CALL CFilePreview::getSize( CDimension& theSize ) const { @@ -321,11 +321,11 @@ sal_Bool SAL_CALL CFilePreview::getSize( CDimension& theSize ) const return bRet; } -//--------------------------------------------------- + // sets the position of the upper left corner // of the preview window relative to the // upper left corner of the parent window -//--------------------------------------------------- + sal_Bool SAL_CALL CFilePreview::setPos( POINT ulCorner ) { @@ -342,11 +342,11 @@ sal_Bool SAL_CALL CFilePreview::setPos( POINT ulCorner ) SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE ); } -//--------------------------------------------------- + // returns the current position of the preview // relative to the upper left corner of the // parent window -//--------------------------------------------------- + sal_Bool SAL_CALL CFilePreview::getPos( POINT& ulCorner ) const { @@ -365,9 +365,9 @@ sal_Bool SAL_CALL CFilePreview::getPos( POINT& ulCorner ) const return bRet; } -//--------------------------------------------------- + // -//--------------------------------------------------- + void SAL_CALL CFilePreview::enable( sal_Bool bEnable ) { @@ -378,14 +378,14 @@ void SAL_CALL CFilePreview::enable( sal_Bool bEnable ) UpdateWindow( m_hwnd ); } -//--------------------------------------------------- + // shows the preview window // possible values see SHOW_STATE // SS_SHOW - make the window visible // SS_HIDE - hide the window // SS_ENABLED - enable the window // SS_DISABLED - disable the window -//--------------------------------------------------- + sal_Bool SAL_CALL CFilePreview::show( sal_Bool bShow ) { @@ -395,12 +395,12 @@ sal_Bool SAL_CALL CFilePreview::show( sal_Bool bShow ) return ShowWindow( m_hwnd, showState ); } -//--------------------------------------------------- + // if the preview is shown and enabled // preview of the given file will be shown // returns true on success or false if an error // occurred (the file in not there or not accessible etc.) -//--------------------------------------------------- + sal_Bool SAL_CALL CFilePreview::update( const OUString& aFileName ) { @@ -427,9 +427,9 @@ sal_Bool SAL_CALL CFilePreview::update( const OUString& aFileName ) return sal_True; } -//--------------------------------------------------- + // -//--------------------------------------------------- + void SAL_CALL CFilePreview::onPaint( HWND hWnd, HDC hDC ) { @@ -480,9 +480,9 @@ void SAL_CALL CFilePreview::onPaint( HWND hWnd, HDC hDC ) } } -//--------------------------------------------------- + // -//--------------------------------------------------- + sal_Bool CFilePreview::loadFile( const OUString& aFileName ) { @@ -551,9 +551,9 @@ CLEANUP_AND_EXIT: return ( SUCCEEDED( hr ) ); } -//--------------------------------------------------- + // -//--------------------------------------------------- + LRESULT CALLBACK CFilePreview::WndProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam ) diff --git a/fpicker/source/win32/filepicker/VistaFilePicker.cxx b/fpicker/source/win32/filepicker/VistaFilePicker.cxx index e1a29dcd8cee..d0d22a5319a2 100644 --- a/fpicker/source/win32/filepicker/VistaFilePicker.cxx +++ b/fpicker/source/win32/filepicker/VistaFilePicker.cxx @@ -56,9 +56,9 @@ #pragma warning (pop) #endif -//------------------------------------------------------------------------ + // namespace directives -//------------------------------------------------------------------------ + namespace fpicker{ namespace win32{ @@ -66,9 +66,9 @@ namespace vista{ #define FILE_PICKER_DLL_NAME TEXT("fps.dll") -//------------------------------------------------------------------------ + // helper functions -//------------------------------------------------------------------------ + namespace { @@ -85,7 +85,7 @@ namespace } } -//----------------------------------------------------------------------------------------- + VistaFilePicker::VistaFilePicker(const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR) : TVistaFilePickerBase (m_aMutex ) , m_xSMGR (xSMGR ) @@ -96,12 +96,12 @@ VistaFilePicker::VistaFilePicker(const css::uno::Reference< css::lang::XMultiSer { } -//----------------------------------------------------------------------------------------- + VistaFilePicker::~VistaFilePicker() { } -//------------------------------------------------------------------------------------ + void SAL_CALL VistaFilePicker::addFilePickerListener(const css::uno::Reference< css::ui::dialogs::XFilePickerListener >& xListener) throw(css::uno::RuntimeException) { @@ -112,7 +112,7 @@ void SAL_CALL VistaFilePicker::addFilePickerListener(const css::uno::Reference< m_aAsyncExecute.triggerRequestThreadAware(rRequest, AsyncRequests::NON_BLOCKED); } -//----------------------------------------------------------------------------------------- + void SAL_CALL VistaFilePicker::removeFilePickerListener(const css::uno::Reference< css::ui::dialogs::XFilePickerListener >& xListener ) throw(css::uno::RuntimeException) { @@ -123,13 +123,13 @@ void SAL_CALL VistaFilePicker::removeFilePickerListener(const css::uno::Referenc m_aAsyncExecute.triggerRequestThreadAware(rRequest, AsyncRequests::NON_BLOCKED); } -// ------------------------------------------------- + void SAL_CALL VistaFilePicker::disposing(const css::lang::EventObject& /*aEvent*/) throw(css::uno::RuntimeException) { } -//------------------------------------------------------------------------------------ + void SAL_CALL VistaFilePicker::setMultiSelectionMode(::sal_Bool bMode) throw(css::uno::RuntimeException) { @@ -140,7 +140,7 @@ void SAL_CALL VistaFilePicker::setMultiSelectionMode(::sal_Bool bMode) m_aAsyncExecute.triggerRequestThreadAware(rRequest, AsyncRequests::NON_BLOCKED); } -//----------------------------------------------------------------------------------------- + void SAL_CALL VistaFilePicker::setTitle(const OUString& sTitle) throw(css::uno::RuntimeException) { @@ -151,7 +151,7 @@ void SAL_CALL VistaFilePicker::setTitle(const OUString& sTitle) m_aAsyncExecute.triggerRequestThreadAware(rRequest, AsyncRequests::NON_BLOCKED); } -//----------------------------------------------------------------------------------------- + void SAL_CALL VistaFilePicker::appendFilter(const OUString& sTitle , const OUString& sFilter) throw(css::lang::IllegalArgumentException, @@ -165,7 +165,7 @@ void SAL_CALL VistaFilePicker::appendFilter(const OUString& sTitle , m_aAsyncExecute.triggerRequestThreadAware(rRequest, AsyncRequests::NON_BLOCKED); } -//----------------------------------------------------------------------------------------- + void SAL_CALL VistaFilePicker::setCurrentFilter(const OUString& sTitle) throw(css::lang::IllegalArgumentException, css::uno::RuntimeException ) @@ -177,7 +177,7 @@ void SAL_CALL VistaFilePicker::setCurrentFilter(const OUString& sTitle) m_aAsyncExecute.triggerRequestThreadAware(rRequest, AsyncRequests::NON_BLOCKED); } -//----------------------------------------------------------------------------------------- + OUString SAL_CALL VistaFilePicker::getCurrentFilter() throw(css::uno::RuntimeException) { @@ -190,7 +190,7 @@ OUString SAL_CALL VistaFilePicker::getCurrentFilter() return sTitle; } -//----------------------------------------------------------------------------------------- + void SAL_CALL VistaFilePicker::appendFilterGroup(const OUString& /*sGroupTitle*/, const css::uno::Sequence< css::beans::StringPair >& rFilters ) throw (css::lang::IllegalArgumentException, @@ -203,7 +203,7 @@ void SAL_CALL VistaFilePicker::appendFilterGroup(const OUString& m_aAsyncExecute.triggerRequestThreadAware(rRequest, AsyncRequests::NON_BLOCKED); } -//----------------------------------------------------------------------------------------- + void SAL_CALL VistaFilePicker::setDefaultName(const OUString& sName ) throw(css::uno::RuntimeException) { @@ -214,7 +214,7 @@ void SAL_CALL VistaFilePicker::setDefaultName(const OUString& sName ) m_aAsyncExecute.triggerRequestThreadAware(rRequest, AsyncRequests::NON_BLOCKED); } -//----------------------------------------------------------------------------------------- + void SAL_CALL VistaFilePicker::setDisplayDirectory(const OUString& sDirectory) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException ) @@ -239,7 +239,7 @@ void SAL_CALL VistaFilePicker::setDisplayDirectory(const OUString& sDirectory) m_aAsyncExecute.triggerRequestThreadAware(rRequest, AsyncRequests::NON_BLOCKED); } -//----------------------------------------------------------------------------------------- + OUString SAL_CALL VistaFilePicker::getDisplayDirectory() throw(css::uno::RuntimeException) { @@ -251,7 +251,7 @@ OUString SAL_CALL VistaFilePicker::getDisplayDirectory() return sDirectory; } -//----------------------------------------------------------------------------------------- + // @deprecated cant be supported any longer ... see IDL description for further details css::uno::Sequence< OUString > SAL_CALL VistaFilePicker::getFiles() throw(css::uno::RuntimeException) @@ -266,7 +266,7 @@ css::uno::Sequence< OUString > SAL_CALL VistaFilePicker::getFiles() return lFiles; } -//----------------------------------------------------------------------------------------- + css::uno::Sequence< OUString > SAL_CALL VistaFilePicker::getSelectedFiles() throw(css::uno::RuntimeException) { @@ -280,7 +280,7 @@ css::uno::Sequence< OUString > SAL_CALL VistaFilePicker::getSelectedFiles() return lFiles; } -//----------------------------------------------------------------------------------------- + ::sal_Int16 SAL_CALL VistaFilePicker::execute() throw(css::uno::RuntimeException) { @@ -313,9 +313,9 @@ css::uno::Sequence< OUString > SAL_CALL VistaFilePicker::getSelectedFiles() return nResult; } -//------------------------------------------------------------------------------------ + // XFilePicker functions -//------------------------------------------------------------------------------------ + void SAL_CALL VistaFilePicker::setValue( ::sal_Int16 nControlId , ::sal_Int16 nControlAction, @@ -331,9 +331,9 @@ void SAL_CALL VistaFilePicker::setValue( ::sal_Int16 nControlId , m_aAsyncExecute.triggerRequestThreadAware(rRequest, AsyncRequests::NON_BLOCKED); } -//----------------------------------------------------------------------------------------- + // -//----------------------------------------------------------------------------------------- + css::uno::Any SAL_CALL VistaFilePicker::getValue(::sal_Int16 nControlId , ::sal_Int16 nControlAction) @@ -349,9 +349,9 @@ css::uno::Any SAL_CALL VistaFilePicker::getValue(::sal_Int16 nControlId , return aValue; } -//----------------------------------------------------------------------------------------- + // -//----------------------------------------------------------------------------------------- + void SAL_CALL VistaFilePicker::enableControl(::sal_Int16 nControlId, ::sal_Bool bEnable ) @@ -365,9 +365,9 @@ void SAL_CALL VistaFilePicker::enableControl(::sal_Int16 nControlId, m_aAsyncExecute.triggerRequestThreadAware(rRequest, AsyncRequests::NON_BLOCKED); } -//----------------------------------------------------------------------------------------- + // -//----------------------------------------------------------------------------------------- + void SAL_CALL VistaFilePicker::setLabel( ::sal_Int16 nControlId, const OUString& sLabel ) @@ -381,9 +381,9 @@ void SAL_CALL VistaFilePicker::setLabel( ::sal_Int16 nControlId, m_aAsyncExecute.triggerRequestThreadAware(rRequest, AsyncRequests::NON_BLOCKED); } -//----------------------------------------------------------------------------------------- + // -//----------------------------------------------------------------------------------------- + OUString SAL_CALL VistaFilePicker::getLabel(::sal_Int16 nControlId) throw (css::uno::RuntimeException) @@ -397,9 +397,9 @@ OUString SAL_CALL VistaFilePicker::getLabel(::sal_Int16 nControlId) return sLabel; } -//------------------------------------------------------------------------------------ + // -//------------------------------------------------------------------------------------ + css::uno::Sequence< ::sal_Int16 > SAL_CALL VistaFilePicker::getSupportedImageFormats() throw (css::uno::RuntimeException) @@ -407,9 +407,9 @@ css::uno::Sequence< ::sal_Int16 > SAL_CALL VistaFilePicker::getSupportedImageFor return css::uno::Sequence< sal_Int16 >(); } -//------------------------------------------------------------------------------------ + // -//------------------------------------------------------------------------------------ + sal_Int32 SAL_CALL VistaFilePicker::getTargetColorDepth() throw (css::uno::RuntimeException) @@ -417,9 +417,9 @@ sal_Int32 SAL_CALL VistaFilePicker::getTargetColorDepth() return 0; } -//------------------------------------------------------------------------------------ + // -//------------------------------------------------------------------------------------ + sal_Int32 SAL_CALL VistaFilePicker::getAvailableWidth() throw (css::uno::RuntimeException) @@ -427,9 +427,9 @@ sal_Int32 SAL_CALL VistaFilePicker::getAvailableWidth() return 0; } -//------------------------------------------------------------------------------------ + // -//------------------------------------------------------------------------------------ + sal_Int32 SAL_CALL VistaFilePicker::getAvailableHeight() throw (css::uno::RuntimeException) @@ -437,9 +437,9 @@ sal_Int32 SAL_CALL VistaFilePicker::getAvailableHeight() return 0; } -//------------------------------------------------------------------------------------ + // -//------------------------------------------------------------------------------------ + void SAL_CALL VistaFilePicker::setImage( sal_Int16 /*nImageFormat*/, const css::uno::Any& /*aImage */) @@ -448,9 +448,9 @@ void SAL_CALL VistaFilePicker::setImage( sal_Int16 /*nImageFormat*/, { } -//------------------------------------------------------------------------------------ + // -//------------------------------------------------------------------------------------ + sal_Bool SAL_CALL VistaFilePicker::setShowState(sal_Bool /*bShowState*/) throw (css::uno::RuntimeException) @@ -458,9 +458,9 @@ sal_Bool SAL_CALL VistaFilePicker::setShowState(sal_Bool /*bShowState*/) return sal_False; } -//------------------------------------------------------------------------------------ + // -//------------------------------------------------------------------------------------ + sal_Bool SAL_CALL VistaFilePicker::getShowState() throw (css::uno::RuntimeException) @@ -468,9 +468,9 @@ sal_Bool SAL_CALL VistaFilePicker::getShowState() return sal_False; } -//------------------------------------------------------------------------------------ + // -//------------------------------------------------------------------------------------ + void SAL_CALL VistaFilePicker::initialize(const css::uno::Sequence< css::uno::Any >& lArguments) throw(css::uno::Exception , @@ -592,18 +592,18 @@ void SAL_CALL VistaFilePicker::initialize(const css::uno::Sequence< css::uno::An } } -//------------------------------------------------------------------------------------ + // -//------------------------------------------------------------------------------------ + void SAL_CALL VistaFilePicker::cancel() throw(css::uno::RuntimeException) { } -// ------------------------------------------------- + // XServiceInfo -// ------------------------------------------------- + OUString SAL_CALL VistaFilePicker::getImplementationName() throw(css::uno::RuntimeException) @@ -618,9 +618,9 @@ sal_Bool SAL_CALL VistaFilePicker::supportsService(const OUString& sServiceName) return cppu::supportsService(this, sServiceName); } -// ------------------------------------------------- + // XServiceInfo -// ------------------------------------------------- + css::uno::Sequence< OUString > SAL_CALL VistaFilePicker::getSupportedServiceNames() throw(css::uno::RuntimeException) diff --git a/fpicker/source/win32/filepicker/VistaFilePickerEventHandler.cxx b/fpicker/source/win32/filepicker/VistaFilePickerEventHandler.cxx index 3935ca298bb5..e6cec940e2b8 100644 --- a/fpicker/source/win32/filepicker/VistaFilePickerEventHandler.cxx +++ b/fpicker/source/win32/filepicker/VistaFilePickerEventHandler.cxx @@ -37,15 +37,15 @@ #include <osl/file.hxx> -//------------------------------------------------------------------------ + // namespace directives -//------------------------------------------------------------------------ + namespace fpicker{ namespace win32{ namespace vista{ -//----------------------------------------------------------------------------------------- + VistaFilePickerEventHandler::VistaFilePickerEventHandler(IVistaFilePickerInternalNotify* pInternalNotify) : m_nRefCount (0 ) , m_nListenerHandle (0 ) @@ -55,12 +55,12 @@ VistaFilePickerEventHandler::VistaFilePickerEventHandler(IVistaFilePickerInterna { } -//----------------------------------------------------------------------------------------- + VistaFilePickerEventHandler::~VistaFilePickerEventHandler() { } -//----------------------------------------------------------------------------------------- + HRESULT STDMETHODCALLTYPE VistaFilePickerEventHandler::QueryInterface(REFIID rIID , void** ppObject) { @@ -84,13 +84,13 @@ HRESULT STDMETHODCALLTYPE VistaFilePickerEventHandler::QueryInterface(REFIID rII return E_NOINTERFACE; } -//----------------------------------------------------------------------------------------- + ULONG STDMETHODCALLTYPE VistaFilePickerEventHandler::AddRef() { return osl_atomic_increment(&m_nRefCount); } -//----------------------------------------------------------------------------------------- + ULONG STDMETHODCALLTYPE VistaFilePickerEventHandler::Release() { ULONG nReturn = --m_nRefCount; @@ -100,34 +100,34 @@ ULONG STDMETHODCALLTYPE VistaFilePickerEventHandler::Release() return nReturn; } -//----------------------------------------------------------------------------------------- + STDMETHODIMP VistaFilePickerEventHandler::OnFileOk(IFileDialog* /*pDialog*/) { return E_NOTIMPL; } -//----------------------------------------------------------------------------------------- + STDMETHODIMP VistaFilePickerEventHandler::OnFolderChanging(IFileDialog* /*pDialog*/, IShellItem* /*pFolder*/) { return E_NOTIMPL; } -//----------------------------------------------------------------------------------------- + STDMETHODIMP VistaFilePickerEventHandler::OnFolderChange(IFileDialog* /*pDialog*/) { impl_sendEvent(E_DIRECTORY_CHANGED, 0); return S_OK; } -//----------------------------------------------------------------------------------------- + STDMETHODIMP VistaFilePickerEventHandler::OnSelectionChange(IFileDialog* /*pDialog*/) { impl_sendEvent(E_FILE_SELECTION_CHANGED, 0); return S_OK; } -//----------------------------------------------------------------------------------------- + STDMETHODIMP VistaFilePickerEventHandler::OnShareViolation(IFileDialog* /*pDialog*/ , IShellItem* /*pItem*/ , @@ -138,7 +138,7 @@ STDMETHODIMP VistaFilePickerEventHandler::OnShareViolation(IFileDialog* return S_OK; } -//----------------------------------------------------------------------------------------- + STDMETHODIMP VistaFilePickerEventHandler::OnTypeChange(IFileDialog* pDialog) { UINT nFileTypeIndex; @@ -153,7 +153,7 @@ STDMETHODIMP VistaFilePickerEventHandler::OnTypeChange(IFileDialog* pDialog) return S_OK; } -//----------------------------------------------------------------------------------------- + STDMETHODIMP VistaFilePickerEventHandler::OnOverwrite(IFileDialog* /*pDialog*/ , IShellItem* /*pItem*/ , FDE_OVERWRITE_RESPONSE* /*pResponse*/) @@ -161,7 +161,7 @@ STDMETHODIMP VistaFilePickerEventHandler::OnOverwrite(IFileDialog* /* return E_NOTIMPL; } -//----------------------------------------------------------------------------------------- + STDMETHODIMP VistaFilePickerEventHandler::OnItemSelected(IFileDialogCustomize* /*pCustomize*/, DWORD nIDCtl , @@ -173,7 +173,7 @@ STDMETHODIMP VistaFilePickerEventHandler::OnItemSelected(IFileDialogCustomize* / return S_OK; } -//----------------------------------------------------------------------------------------- + STDMETHODIMP VistaFilePickerEventHandler::OnButtonClicked(IFileDialogCustomize* /*pCustomize*/, DWORD nIDCtl ) { @@ -182,7 +182,7 @@ STDMETHODIMP VistaFilePickerEventHandler::OnButtonClicked(IFileDialogCustomize* return S_OK; } -//----------------------------------------------------------------------------------------- + STDMETHODIMP VistaFilePickerEventHandler::OnCheckButtonToggled(IFileDialogCustomize* /*pCustomize*/, DWORD nIDCtl , BOOL bChecked ) @@ -195,7 +195,7 @@ STDMETHODIMP VistaFilePickerEventHandler::OnCheckButtonToggled(IFileDialogCustom return S_OK; } -//----------------------------------------------------------------------------------------- + STDMETHODIMP VistaFilePickerEventHandler::OnControlActivating(IFileDialogCustomize* /*pCustomize*/, DWORD nIDCtl ) { @@ -203,21 +203,21 @@ STDMETHODIMP VistaFilePickerEventHandler::OnControlActivating(IFileDialogCustomi return S_OK; } -//----------------------------------------------------------------------------------------- + void SAL_CALL VistaFilePickerEventHandler::addFilePickerListener( const css::uno::Reference< css::ui::dialogs::XFilePickerListener >& xListener ) throw( css::uno::RuntimeException ) { m_lListener.addInterface(::getCppuType( (const css::uno::Reference< css::ui::dialogs::XFilePickerListener >*)NULL ), xListener); } -//----------------------------------------------------------------------------------------- + void SAL_CALL VistaFilePickerEventHandler::removeFilePickerListener( const css::uno::Reference< css::ui::dialogs::XFilePickerListener >& xListener ) throw( css::uno::RuntimeException ) { m_lListener.removeInterface(::getCppuType( (const css::uno::Reference< css::ui::dialogs::XFilePickerListener >*)NULL ), xListener); } -//----------------------------------------------------------------------------------------- + void VistaFilePickerEventHandler::startListening( const TFileDialog& pBroadcaster ) { static const sal_Bool STARTUP_SUSPENDED = sal_True; @@ -230,7 +230,7 @@ void VistaFilePickerEventHandler::startListening( const TFileDialog& pBroadcaste m_pDialog->Advise(this, &m_nListenerHandle); } -//----------------------------------------------------------------------------------------- + void VistaFilePickerEventHandler::stopListening() { if (m_pDialog.is()) @@ -243,7 +243,7 @@ void VistaFilePickerEventHandler::stopListening() static const OUString PROP_CONTROL_ID("control_id"); static const OUString PROP_PICKER_LISTENER("picker_listener"); -//----------------------------------------------------------------------------------------- + class AsyncPickerEvents : public RequestHandler { public: @@ -299,7 +299,7 @@ public: {} }; -//----------------------------------------------------------------------------------------- + void VistaFilePickerEventHandler::impl_sendEvent( EEventType eEventType, ::sal_Int16 nControlID) { diff --git a/fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx b/fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx index 64eb6752e79d..e892523a3ec2 100644 --- a/fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx +++ b/fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx @@ -55,9 +55,9 @@ namespace fpicker{ namespace win32{ namespace vista{ -//----------------------------------------------------------------------------- + // types, const etcpp. -//----------------------------------------------------------------------------- + static const ::sal_Int16 INVALID_CONTROL_ID = -1; @@ -75,7 +75,7 @@ static const GUID CLIENTID_FILEOPEN_LINK_TEMPLATE = {0x32237796, 0x1509, 0x49D static const GUID CLIENTID_FILEOPEN_PLAY = {0x32CFB147, 0xF5AE, 0x4F90, 0xA1, 0xF1, 0x81, 0x20, 0x72, 0xBB, 0x2F, 0xC5}; static const GUID CLIENTID_FILEOPEN_LINK = {0x39AC4BAE, 0x7D2D, 0x46BC, 0xBE, 0x2E, 0xF8, 0x8C, 0xB5, 0x65, 0x5E, 0x6A}; -//----------------------------------------------------------------------------- + OUString lcl_getURLFromShellItem (IShellItem* pItem) { LPOLESTR pStr = NULL; @@ -103,7 +103,7 @@ OUString lcl_getURLFromShellItem (IShellItem* pItem) return sURL; } -//----------------------------------------------------------------------------------------- + ::std::vector< COMDLG_FILTERSPEC > lcl_buildFilterList(CFilterContainer& rContainer) { const sal_Int32 c = rContainer.numFilter(); @@ -125,7 +125,7 @@ OUString lcl_getURLFromShellItem (IShellItem* pItem) return lList; } -//----------------------------------------------------------------------------------------- + VistaFilePickerImpl::VistaFilePickerImpl() : m_iDialogOpen () , m_iDialogSave () @@ -141,12 +141,12 @@ VistaFilePickerImpl::VistaFilePickerImpl() m_hParentWindow = choose_parent_window(); } -//------------------------------------------------------------------------------- + VistaFilePickerImpl::~VistaFilePickerImpl() { } -//------------------------------------------------------------------------------- + void VistaFilePickerImpl::before() { // SYNCHRONIZED-> @@ -167,7 +167,7 @@ void VistaFilePickerImpl::before() } } -//------------------------------------------------------------------------------- + void VistaFilePickerImpl::doRequest(const RequestRef& rRequest) { try @@ -265,13 +265,13 @@ void VistaFilePickerImpl::doRequest(const RequestRef& rRequest) {} } -//------------------------------------------------------------------------------- + void VistaFilePickerImpl::after() { CoUninitialize(); } -//------------------------------------------------------------------------------- + void VistaFilePickerImpl::impl_sta_addFilePickerListener(const RequestRef& rRequest) { // SYNCHRONIZED outside ! @@ -290,7 +290,7 @@ void VistaFilePickerImpl::impl_sta_addFilePickerListener(const RequestRef& rRequ pHandlerImpl->addFilePickerListener(xListener); } -//------------------------------------------------------------------------------- + void VistaFilePickerImpl::impl_sta_removeFilePickerListener(const RequestRef& rRequest) { // SYNCHRONIZED outside ! @@ -309,7 +309,7 @@ void VistaFilePickerImpl::impl_sta_removeFilePickerListener(const RequestRef& rR pHandlerImpl->removeFilePickerListener(xListener); } -//------------------------------------------------------------------------------- + void VistaFilePickerImpl::impl_sta_appendFilter(const RequestRef& rRequest) { const OUString sTitle = rRequest->getArgumentOrDefault(PROP_FILTER_TITLE, OUString()); @@ -321,7 +321,7 @@ void VistaFilePickerImpl::impl_sta_appendFilter(const RequestRef& rRequest) m_lFilters.addFilter(sTitle, sFilter); } -//------------------------------------------------------------------------------- + void VistaFilePickerImpl::impl_sta_appendFilterGroup(const RequestRef& rRequest) { const css::uno::Sequence< css::beans::StringPair > aFilterGroup = @@ -343,7 +343,7 @@ void VistaFilePickerImpl::impl_sta_appendFilterGroup(const RequestRef& rRequest) } } -//------------------------------------------------------------------------------- + void VistaFilePickerImpl::impl_sta_setCurrentFilter(const RequestRef& rRequest) { const OUString sTitle = rRequest->getArgumentOrDefault(PROP_FILTER_TITLE, OUString()); @@ -354,7 +354,7 @@ void VistaFilePickerImpl::impl_sta_setCurrentFilter(const RequestRef& rRequest) m_lFilters.setCurrentFilter(sTitle); } -//------------------------------------------------------------------------------- + void VistaFilePickerImpl::impl_sta_getCurrentFilter(const RequestRef& rRequest) { TFileDialog iDialog = impl_getBaseDialogInterface(); @@ -386,7 +386,7 @@ void VistaFilePickerImpl::impl_sta_getCurrentFilter(const RequestRef& rRequest) // <- SYNCHRONIZED } -//------------------------------------------------------------------------------- + void VistaFilePickerImpl::impl_sta_CreateOpenDialog(const RequestRef& rRequest) { // SYNCHRONIZED-> @@ -428,7 +428,7 @@ void VistaFilePickerImpl::impl_sta_CreateOpenDialog(const RequestRef& rRequest) pHandlerImpl->startListening(iDialog); } -//------------------------------------------------------------------------------- + void VistaFilePickerImpl::impl_sta_CreateSaveDialog(const RequestRef& rRequest) { // SYNCHRONIZED-> @@ -469,13 +469,13 @@ void VistaFilePickerImpl::impl_sta_CreateSaveDialog(const RequestRef& rRequest) pHandlerImpl->startListening(iDialog); } -//------------------------------------------------------------------------------- + static const ::sal_Int32 GROUP_VERSION = 1; static const ::sal_Int32 GROUP_TEMPLATE = 2; static const ::sal_Int32 GROUP_IMAGETEMPLATE = 3; static const ::sal_Int32 GROUP_CHECKBOXES = 4; -//------------------------------------------------------------------------------- + static void setLabelToControl(CResourceProvider& rResourceProvider, TFileDialogCustomize iCustom, sal_uInt16 nControlId) { OUString aLabel = rResourceProvider.getResString(nControlId); @@ -483,7 +483,7 @@ static void setLabelToControl(CResourceProvider& rResourceProvider, TFileDialogC iCustom->SetControlLabel(nControlId, reinterpret_cast<LPCWSTR>(aLabel.getStr()) ); } -//------------------------------------------------------------------------------- + void VistaFilePickerImpl::impl_sta_enableFeatures(::sal_Int32 nFeatures, ::sal_Int32 nTemplate) { GUID aGUID = {}; @@ -610,7 +610,7 @@ void VistaFilePickerImpl::impl_sta_enableFeatures(::sal_Int32 nFeatures, ::sal_I } -//------------------------------------------------------------------------------- + void VistaFilePickerImpl::impl_sta_SetMultiSelectionMode(const RequestRef& rRequest) { const ::sal_Bool bMultiSelection = rRequest->getArgumentOrDefault(PROP_MULTISELECTION_MODE, (::sal_Bool)sal_True); @@ -632,7 +632,7 @@ void VistaFilePickerImpl::impl_sta_SetMultiSelectionMode(const RequestRef& rRequ iDialog->SetOptions ( nFlags ); } -//------------------------------------------------------------------------------- + void VistaFilePickerImpl::impl_sta_SetTitle(const RequestRef& rRequest) { OUString sTitle = rRequest->getArgumentOrDefault(PROP_TITLE, OUString()); @@ -646,7 +646,7 @@ void VistaFilePickerImpl::impl_sta_SetTitle(const RequestRef& rRequest) iDialog->SetTitle(reinterpret_cast<LPCTSTR>(sTitle.getStr())); } -//------------------------------------------------------------------------------- + void VistaFilePickerImpl::impl_sta_SetFileName(const RequestRef& rRequest) { OUString sFileName = rRequest->getArgumentOrDefault(PROP_FILENAME, OUString()); @@ -660,7 +660,7 @@ void VistaFilePickerImpl::impl_sta_SetFileName(const RequestRef& rRequest) iDialog->SetFileName(reinterpret_cast<LPCTSTR>(sFileName.getStr())); } -//------------------------------------------------------------------------------- + void VistaFilePickerImpl::impl_sta_SetDirectory(const RequestRef& rRequest) { OUString sDirectory = rRequest->getArgumentOrDefault(PROP_DIRECTORY, OUString()); @@ -712,7 +712,7 @@ void VistaFilePickerImpl::impl_sta_GetDirectory(const RequestRef& rRequest) rRequest->setArgument( PROP_DIRECTORY, sFolder ); } -//------------------------------------------------------------------------------- + void VistaFilePickerImpl::impl_sta_SetDefaultName(const RequestRef& rRequest) { OUString sFilename = rRequest->getArgumentOrDefault(PROP_FILENAME, OUString()); @@ -737,7 +737,7 @@ void VistaFilePickerImpl::impl_sta_SetDefaultName(const RequestRef& rRequest) m_sFilename = sFilename; } -//------------------------------------------------------------------------------- + void VistaFilePickerImpl::impl_sta_setFiltersOnDialog() { // SYNCHRONIZED-> @@ -774,7 +774,7 @@ void VistaFilePickerImpl::impl_sta_setFiltersOnDialog() } -//------------------------------------------------------------------------------- + void VistaFilePickerImpl::impl_sta_getSelectedFiles(const RequestRef& rRequest) { // SYNCHRONIZED-> @@ -848,7 +848,7 @@ void VistaFilePickerImpl::impl_sta_getSelectedFiles(const RequestRef& rRequest) rRequest->setArgument(PROP_SELECTED_FILES, lFiles.getAsConstList()); } -//------------------------------------------------------------------------------- + void VistaFilePickerImpl::impl_sta_ShowDialogModal(const RequestRef& rRequest) { impl_sta_setFiltersOnDialog(); @@ -960,7 +960,7 @@ void VistaFilePickerImpl::impl_sta_ShowDialogModal(const RequestRef& rRequest) rRequest->setArgument(PROP_DIALOG_SHOW_RESULT, sal_True); } -//------------------------------------------------------------------------------- + TFileDialog VistaFilePickerImpl::impl_getBaseDialogInterface() { TFileDialog iDialog; @@ -984,7 +984,7 @@ TFileDialog VistaFilePickerImpl::impl_getBaseDialogInterface() return iDialog; } -//------------------------------------------------------------------------------- + TFileDialogCustomize VistaFilePickerImpl::impl_getCustomizeInterface() { TFileDialogCustomize iCustom; @@ -1009,7 +1009,7 @@ TFileDialogCustomize VistaFilePickerImpl::impl_getCustomizeInterface() return iCustom; } -//------------------------------------------------------------------------------- + void lcl_removeControlItemsWorkaround(const TFileDialogCustomize& iCustom , ::sal_Int16 nControlId) { @@ -1022,7 +1022,7 @@ void lcl_removeControlItemsWorkaround(const TFileDialogCustomize& iCustom , hResult = iCustom->RemoveControlItem(nControlId, i++); } -//------------------------------------------------------------------------------- + void VistaFilePickerImpl::impl_sta_SetControlValue(const RequestRef& rRequest) { ::sal_Int16 nId = rRequest->getArgumentOrDefault(PROP_CONTROL_ID , INVALID_CONTROL_ID ); @@ -1097,7 +1097,7 @@ void VistaFilePickerImpl::impl_sta_SetControlValue(const RequestRef& rRequest) } } -//------------------------------------------------------------------------------- + void VistaFilePickerImpl::impl_sta_GetControlValue(const RequestRef& rRequest) { ::sal_Int16 nId = rRequest->getArgumentOrDefault(PROP_CONTROL_ID , INVALID_CONTROL_ID ); @@ -1133,7 +1133,7 @@ void VistaFilePickerImpl::impl_sta_GetControlValue(const RequestRef& rRequest) rRequest->setArgument(PROP_CONTROL_VALUE, aValue); } -//------------------------------------------------------------------------------- + void VistaFilePickerImpl::impl_sta_SetControlLabel(const RequestRef& rRequest) { ::sal_Int16 nId = rRequest->getArgumentOrDefault(PROP_CONTROL_ID , INVALID_CONTROL_ID ); @@ -1148,12 +1148,12 @@ void VistaFilePickerImpl::impl_sta_SetControlLabel(const RequestRef& rRequest) iCustom->SetControlLabel ( nId, reinterpret_cast<LPCTSTR>(sLabel.getStr())); } -//------------------------------------------------------------------------------- + void VistaFilePickerImpl::impl_sta_GetControlLabel(const RequestRef& /*rRequest*/) { } -//------------------------------------------------------------------------------- + void VistaFilePickerImpl::impl_sta_EnableControl(const RequestRef& rRequest) { ::sal_Int16 nId = rRequest->getArgumentOrDefault(PROP_CONTROL_ID , INVALID_CONTROL_ID ); @@ -1174,7 +1174,7 @@ void VistaFilePickerImpl::impl_sta_EnableControl(const RequestRef& rRequest) iCustom->SetControlState(nId, eState); } -//------------------------------------------------------------------------------- + void VistaFilePickerImpl::impl_SetDefaultExtension( const OUString& currentFilter ) { TFileDialog iDialog = impl_getBaseDialogInterface(); @@ -1217,7 +1217,7 @@ static void impl_refreshFileDialog( TFileDialog iDialog ) } } -//------------------------------------------------------------------------------- + void VistaFilePickerImpl::onAutoExtensionChanged (bool bChecked) { // SYNCHRONIZED-> diff --git a/fpicker/source/win32/filepicker/WinFileOpenImpl.cxx b/fpicker/source/win32/filepicker/WinFileOpenImpl.cxx index ee2760b5c878..a493af6cc4e0 100644 --- a/fpicker/source/win32/filepicker/WinFileOpenImpl.cxx +++ b/fpicker/source/win32/filepicker/WinFileOpenImpl.cxx @@ -36,9 +36,9 @@ #include <osl/thread.hxx> #include "filepickerstate.hxx" -//------------------------------------------------------------------------ + // namespace directives -//------------------------------------------------------------------------ + using namespace com::sun::star; @@ -50,9 +50,9 @@ using namespace ::com::sun::star::ui::dialogs::ExtendedFilePickerElementIds; using namespace ::com::sun::star::ui::dialogs::CommonFilePickerElementIds; using namespace ::com::sun::star::ui::dialogs::ListboxControlActions; -//------------------------------------------------------------------------- + // to distinguish what to do in the enum child window callback function -//------------------------------------------------------------------------- + enum ECW_ACTION_T { @@ -71,9 +71,9 @@ struct EnumParam {} }; -//------------------------------------------------------------------------- + // ctor -//------------------------------------------------------------------------- + CWinFileOpenImpl::CWinFileOpenImpl( CFilePicker* aFilePicker, @@ -95,9 +95,9 @@ CWinFileOpenImpl::CWinFileOpenImpl( m_FilePickerState = m_NonExecuteFilePickerState; } -//------------------------------------------------------------------------ + // dtor -//------------------------------------------------------------------------ + CWinFileOpenImpl::~CWinFileOpenImpl() { @@ -105,9 +105,9 @@ CWinFileOpenImpl::~CWinFileOpenImpl() delete m_NonExecuteFilePickerState; } -//------------------------------------------------------------------------ + // we expect the directory in URL format -//------------------------------------------------------------------------ + void CWinFileOpenImpl::setDisplayDirectory(const OUString& aDirectory) throw( IllegalArgumentException, uno::RuntimeException ) @@ -135,18 +135,18 @@ void CWinFileOpenImpl::setDisplayDirectory(const OUString& aDirectory) CFileOpenDialog::setDisplayDirectory(aSysDirectory); } -//------------------------------------------------------------------------ + // we return the directory in URL format -//------------------------------------------------------------------------ + OUString CWinFileOpenImpl::getDisplayDirectory() throw(uno::RuntimeException) { return m_FilePickerState->getDisplayDirectory(this); } -//----------------------------------------------------------------------------------------- + // -//----------------------------------------------------------------------------------------- + void SAL_CALL CWinFileOpenImpl::setDefaultName(const OUString& aName) throw( IllegalArgumentException, uno::RuntimeException ) @@ -161,13 +161,13 @@ void SAL_CALL CWinFileOpenImpl::setDefaultName(const OUString& aName) m_defaultName = aName; } -//----------------------------------------------------------------------------------------- + // return format: URL // if multiselection is allowed there are two different cases // 1. one file selected: the sequence contains one entry path\filename.ext // 2. multiple files selected: the sequence contains multiple entries // the first entry is the path url, all other entries are file names -//----------------------------------------------------------------------------------------- + uno::Sequence<OUString> SAL_CALL CWinFileOpenImpl::getFiles() throw(uno::RuntimeException) @@ -175,9 +175,9 @@ uno::Sequence<OUString> SAL_CALL CWinFileOpenImpl::getFiles() return m_FilePickerState->getFiles(this); } -//----------------------------------------------------------------------------------------- + // shows the FileOpen/FileSave dialog -//----------------------------------------------------------------------------------------- + sal_Int16 SAL_CALL CWinFileOpenImpl::execute( ) throw(uno::RuntimeException) { @@ -195,11 +195,11 @@ sal_Int16 SAL_CALL CWinFileOpenImpl::execute( ) throw(uno::RuntimeException) return rc; } -//----------------------------------------------------------------------------------------- + // appends a new filter // returns false if the title (aTitle) was already added or the title or the filter are // empty -//----------------------------------------------------------------------------------------- + void SAL_CALL CWinFileOpenImpl::appendFilter(const OUString& aTitle, const OUString& aFilter) throw(IllegalArgumentException, uno::RuntimeException) @@ -222,9 +222,9 @@ void SAL_CALL CWinFileOpenImpl::appendFilter(const OUString& aTitle, const OUStr CFileOpenDialog::setFilterIndex(1); } -//----------------------------------------------------------------------------------------- + // sets a current filter -//----------------------------------------------------------------------------------------- + void SAL_CALL CWinFileOpenImpl::setCurrentFilter(const OUString& aTitle) throw( IllegalArgumentException, uno::RuntimeException) @@ -240,9 +240,9 @@ void SAL_CALL CWinFileOpenImpl::setCurrentFilter(const OUString& aTitle) CFileOpenDialog::setFilterIndex(filterPos + 1); } -//----------------------------------------------------------------------------------------- + // returns the currently selected filter -//----------------------------------------------------------------------------------------- + OUString SAL_CALL CWinFileOpenImpl::getCurrentFilter() throw(uno::RuntimeException) { @@ -260,18 +260,18 @@ OUString SAL_CALL CWinFileOpenImpl::getCurrentFilter() throw(uno::RuntimeExcepti return currentFilter; } -//----------------------------------------------------------------------------------------- + // -//----------------------------------------------------------------------------------------- + inline void SAL_CALL CWinFileOpenImpl::appendFilterGroupSeparator() { m_filterContainer->addFilter(FILTER_SEPARATOR, ALL_FILES_WILDCARD, ALLOW_DUPLICATES); } -//----------------------------------------------------------------------------------------- + // XFilterGroupManager -//----------------------------------------------------------------------------------------- + void SAL_CALL CWinFileOpenImpl::appendFilterGroup(const OUString& sGroupTitle, const uno::Sequence<beans::StringPair>& aFilters) throw (IllegalArgumentException, uno::RuntimeException) @@ -319,10 +319,10 @@ void SAL_CALL CWinFileOpenImpl::setValue(sal_Int16 aControlId, sal_Int16 aContro m_FilePickerState->setValue(aControlId, aControlAction, aValue); } -//----------------------------------------------------------------------------------------- + // returns the value of an custom template element // we assume that there are only checkboxes or comboboxes -//----------------------------------------------------------------------------------------- + uno::Any SAL_CALL CWinFileOpenImpl::getValue(sal_Int16 aControlId, sal_Int16 aControlAction) throw(uno::RuntimeException) @@ -334,9 +334,9 @@ uno::Any SAL_CALL CWinFileOpenImpl::getValue(sal_Int16 aControlId, sal_Int16 aCo return uno::Any(); } -//----------------------------------------------------------------------------------------- + // enables a custom template element -//----------------------------------------------------------------------------------------- + void SAL_CALL CWinFileOpenImpl::enableControl(sal_Int16 ControlID, sal_Bool bEnable) throw(uno::RuntimeException) @@ -346,9 +346,9 @@ void SAL_CALL CWinFileOpenImpl::enableControl(sal_Int16 ControlID, sal_Bool bEna m_FilePickerState->enableControl(ControlID, bEnable); } -//----------------------------------------------------------------------------------------- + // -//----------------------------------------------------------------------------------------- + void SAL_CALL CWinFileOpenImpl::setLabel( sal_Int16 aControlId, const OUString& aLabel ) throw (uno::RuntimeException) @@ -358,9 +358,9 @@ void SAL_CALL CWinFileOpenImpl::setLabel( sal_Int16 aControlId, const OUString& m_FilePickerState->setLabel(aControlId, aLabel); } -//----------------------------------------------------------------------------------------- + // -//----------------------------------------------------------------------------------------- + OUString SAL_CALL CWinFileOpenImpl::getLabel( sal_Int16 aControlId ) throw (uno::RuntimeException) @@ -372,9 +372,9 @@ OUString SAL_CALL CWinFileOpenImpl::getLabel( sal_Int16 aControlId ) return OUString(); } -//----------------------------------------------------------------------------------------- + // -//----------------------------------------------------------------------------------------- + uno::Sequence<sal_Int16> SAL_CALL CWinFileOpenImpl::getSupportedImageFormats() throw (uno::RuntimeException) @@ -382,9 +382,9 @@ uno::Sequence<sal_Int16> SAL_CALL CWinFileOpenImpl::getSupportedImageFormats() return m_Preview->getSupportedImageFormats(); } -//----------------------------------------------------------------------------------------- + // -//----------------------------------------------------------------------------------------- + sal_Int32 SAL_CALL CWinFileOpenImpl::getTargetColorDepth() throw (uno::RuntimeException) @@ -392,9 +392,9 @@ sal_Int32 SAL_CALL CWinFileOpenImpl::getTargetColorDepth() return m_Preview->getTargetColorDepth(); } -//----------------------------------------------------------------------------------------- + // -//----------------------------------------------------------------------------------------- + sal_Int32 SAL_CALL CWinFileOpenImpl::getAvailableWidth() throw (uno::RuntimeException) @@ -402,9 +402,9 @@ sal_Int32 SAL_CALL CWinFileOpenImpl::getAvailableWidth() return m_Preview->getAvailableWidth(); } -//----------------------------------------------------------------------------------------- + // -//----------------------------------------------------------------------------------------- + sal_Int32 SAL_CALL CWinFileOpenImpl::getAvailableHeight() throw (uno::RuntimeException) @@ -412,9 +412,9 @@ sal_Int32 SAL_CALL CWinFileOpenImpl::getAvailableHeight() return m_Preview->getAvailableHeight(); } -//----------------------------------------------------------------------------------------- + // -//----------------------------------------------------------------------------------------- + void SAL_CALL CWinFileOpenImpl::setImage(sal_Int16 aImageFormat, const uno::Any& aImage) throw (IllegalArgumentException, uno::RuntimeException) @@ -422,9 +422,9 @@ void SAL_CALL CWinFileOpenImpl::setImage(sal_Int16 aImageFormat, const uno::Any& m_Preview->setImage(aImageFormat,aImage); } -//----------------------------------------------------------------------------------------- + // -//----------------------------------------------------------------------------------------- + sal_Bool SAL_CALL CWinFileOpenImpl::setShowState(sal_Bool bShowState) throw (uno::RuntimeException) @@ -432,9 +432,9 @@ sal_Bool SAL_CALL CWinFileOpenImpl::setShowState(sal_Bool bShowState) return m_Preview->setShowState(bShowState); } -//----------------------------------------------------------------------------------------- + // -//----------------------------------------------------------------------------------------- + sal_Bool SAL_CALL CWinFileOpenImpl::getShowState() throw (uno::RuntimeException) @@ -442,9 +442,9 @@ sal_Bool SAL_CALL CWinFileOpenImpl::getShowState() return m_Preview->getShowState(); } -//----------------------------------------------------------------------------------------- + // -//----------------------------------------------------------------------------------------- + void SAL_CALL CWinFileOpenImpl::cancel() { @@ -460,9 +460,9 @@ void SAL_CALL CWinFileOpenImpl::cancel() } } -//----------------------------------------------------------------------------------------- + // returns the id of a custom template element -//----------------------------------------------------------------------------------------- + sal_Int16 SAL_CALL CWinFileOpenImpl::getFocused() { @@ -477,20 +477,20 @@ sal_Int16 SAL_CALL CWinFileOpenImpl::getFocused() return sal::static_int_cast< sal_Int16 >(nID); } -//----------------------------------------------------------------------------------------- + // -//----------------------------------------------------------------------------------------- + inline sal_Bool SAL_CALL CWinFileOpenImpl::IsCustomControlHelpRequested(LPHELPINFO lphi) const { return ((lphi->iCtrlId != IDOK) && (lphi->iCtrlId != IDCANCEL) && (lphi->iCtrlId < ctlFirst)); } -//----------------------------------------------------------------------------------------- + // our own DlgProc because we do subclass the dialog // we catch the WM_NCDESTROY message in order to erase an entry in our static map // if one instance dies -//----------------------------------------------------------------------------------------- + LRESULT CALLBACK CWinFileOpenImpl::SubClassFunc( HWND hWnd, UINT wMessage, WPARAM wParam, LPARAM lParam) @@ -559,15 +559,15 @@ LRESULT CALLBACK CWinFileOpenImpl::SubClassFunc( return lResult; } -//----------------------------------------------------------------- + // -//----------------------------------------------------------------- + void SAL_CALL CWinFileOpenImpl::InitControlLabel(HWND hWnd) { - //----------------------------------------- + // set the labels for all extendet controls - //----------------------------------------- + sal_Int16 aCtrlId = sal::static_int_cast< sal_Int16 >(GetDlgCtrlID(hWnd)); OUString aLabel = m_ResProvider.getResString(aCtrlId); @@ -575,7 +575,7 @@ void SAL_CALL CWinFileOpenImpl::InitControlLabel(HWND hWnd) setLabel(aCtrlId, aLabel); } -//----------------------------------------------------------------- + // There may be problems with the layout of our custom controls, // so that they are not aligned with the standard controls of the // FileOpen dialog. @@ -587,7 +587,7 @@ void SAL_CALL CWinFileOpenImpl::InitControlLabel(HWND hWnd) // the standard combobox cmb13 (defined in MS platform sdk dlgs.h) // and all push buttons will be left aligned with the standard // "OK" button -//----------------------------------------------------------------- + void SAL_CALL CWinFileOpenImpl::InitCustomControlContainer(HWND hCustomControl) { @@ -595,9 +595,9 @@ void SAL_CALL CWinFileOpenImpl::InitCustomControlContainer(HWND hCustomControl) m_CustomControlFactory->CreateCustomControl(hCustomControl,m_hwndFileOpenDlg)); } -//----------------------------------------------------------------- + // -//----------------------------------------------------------------- + void SAL_CALL CWinFileOpenImpl::CacheControlState(HWND hWnd) { @@ -605,9 +605,9 @@ void SAL_CALL CWinFileOpenImpl::CacheControlState(HWND hWnd) m_ExecuteFilePickerState->cacheControlState(hWnd, m_NonExecuteFilePickerState); } -//----------------------------------------------------------------- + // -//----------------------------------------------------------------- + BOOL CALLBACK CWinFileOpenImpl::EnumChildWndProc(HWND hWnd, LPARAM lParam) { @@ -637,9 +637,9 @@ BOOL CALLBACK CWinFileOpenImpl::EnumChildWndProc(HWND hWnd, LPARAM lParam) return bRet; } -//----------------------------------------------------------------- + // -//----------------------------------------------------------------- + sal_uInt32 SAL_CALL CWinFileOpenImpl::onFileOk() { @@ -655,9 +655,9 @@ sal_uInt32 SAL_CALL CWinFileOpenImpl::onFileOk() return 0; } -//----------------------------------------------------------------- + // -//----------------------------------------------------------------- + void SAL_CALL CWinFileOpenImpl::onSelChanged(HWND) { @@ -790,9 +790,9 @@ void SAL_CALL CWinFileOpenImpl::onInitDone() CFileOpenDialog::onInitDone(); } -//----------------------------------------------------------------- + // -//----------------------------------------------------------------- + void SAL_CALL CWinFileOpenImpl::onFolderChanged() { @@ -800,9 +800,9 @@ void SAL_CALL CWinFileOpenImpl::onFolderChanged() m_FilePicker->directoryChanged(evt); } -//----------------------------------------------------------------- + // -//----------------------------------------------------------------- + void SAL_CALL CWinFileOpenImpl::onTypeChanged(sal_uInt32) { @@ -813,9 +813,9 @@ void SAL_CALL CWinFileOpenImpl::onTypeChanged(sal_uInt32) m_FilePicker->controlStateChanged(evt); } -//----------------------------------------------------------------------------------------- + // onMessageCommand handler -//----------------------------------------------------------------------------------------- + sal_uInt32 SAL_CALL CWinFileOpenImpl::onCtrlCommand( HWND, sal_uInt16 ctrlId, sal_uInt16) @@ -832,9 +832,9 @@ sal_uInt32 SAL_CALL CWinFileOpenImpl::onCtrlCommand( return 0; } -//----------------------------------------------------------------------------------------- + // -//----------------------------------------------------------------------------------------- + void CWinFileOpenImpl::onWMSize() { @@ -843,27 +843,27 @@ void CWinFileOpenImpl::onWMSize() m_FilePicker->dialogSizeChanged(); } -//----------------------------------------------------------------------------------------- + // -//----------------------------------------------------------------------------------------- + void CWinFileOpenImpl::onWMShow(sal_Bool bShow) { m_Preview->notifyParentShow(bShow); } -//----------------------------------------------------------------------------------------- + // -//----------------------------------------------------------------------------------------- + void CWinFileOpenImpl::onWMWindowPosChanged() { m_Preview->notifyParentWindowPosChanged(); } -//----------------------------------------------------------------------------------------- + // -//----------------------------------------------------------------------------------------- + void CWinFileOpenImpl::onCustomControlHelpRequest(LPHELPINFO lphi) { @@ -881,9 +881,9 @@ void CWinFileOpenImpl::onCustomControlHelpRequest(LPHELPINFO lphi) } } -//----------------------------------------------------------------------------------------- + // -//----------------------------------------------------------------------------------------- + void SAL_CALL CWinFileOpenImpl::onInitDialog(HWND hwndDlg) { @@ -894,9 +894,9 @@ void SAL_CALL CWinFileOpenImpl::onInitDialog(HWND hwndDlg) reinterpret_cast<LONG_PTR>(SubClassFunc))); } -//----------------------------------------------------------------------------------------- + // processing before showing the dialog -//----------------------------------------------------------------------------------------- + bool SAL_CALL CWinFileOpenImpl::preModal() { @@ -906,9 +906,9 @@ bool SAL_CALL CWinFileOpenImpl::preModal() return true; } -//----------------------------------------------------------------------------------------- + // processing after showing the dialog -//----------------------------------------------------------------------------------------- + void CWinFileOpenImpl::postModal(sal_Int16 nDialogResult) { @@ -922,9 +922,9 @@ void CWinFileOpenImpl::postModal(sal_Int16 nDialogResult) m_FilePickerState = m_NonExecuteFilePickerState; } -//----------------------------------------------------------------------------------------- + // -//----------------------------------------------------------------------------------------- + void SAL_CALL CWinFileOpenImpl::SetDefaultExtension() { @@ -972,9 +972,9 @@ void SAL_CALL CWinFileOpenImpl::SetDefaultExtension() // !!! HACK !!! } -//----------------------------------------------------------------------------------------- + // -//----------------------------------------------------------------------------------------- + void SAL_CALL CWinFileOpenImpl::InitialSetDefaultName() { diff --git a/fpicker/source/win32/filepicker/asynceventnotifier.cxx b/fpicker/source/win32/filepicker/asynceventnotifier.cxx index 1d7450c5e5ef..35599c87e0d1 100644 --- a/fpicker/source/win32/filepicker/asynceventnotifier.cxx +++ b/fpicker/source/win32/filepicker/asynceventnotifier.cxx @@ -26,16 +26,16 @@ #include <memory> #include "SolarMutex.hxx" -//------------------------------------------------ + // -//------------------------------------------------ + using namespace com::sun::star; using ::com::sun::star::ui::dialogs::XFilePickerListener; -//------------------------------------------------ + // -//------------------------------------------------ + CAsyncEventNotifier::CAsyncEventNotifier(cppu::OBroadcastHelper& rBroadcastHelper) : m_hThread(0), @@ -58,9 +58,9 @@ CAsyncEventNotifier::CAsyncEventNotifier(cppu::OBroadcastHelper& rBroadcastHelpe 0); /* automatic name */ } -//------------------------------------------------ + // -//------------------------------------------------ + CAsyncEventNotifier::~CAsyncEventNotifier() { @@ -70,9 +70,9 @@ CAsyncEventNotifier::~CAsyncEventNotifier() CloseHandle(m_hEvents[1]); } -//------------------------------------------------ + // -//------------------------------------------------ + void SAL_CALL CAsyncEventNotifier::addListener(const uno::Type& aType , const uno::Reference< uno::XInterface >& xListener) @@ -90,9 +90,9 @@ void SAL_CALL CAsyncEventNotifier::addListener(const uno::Type& m_rBroadcastHelper.aLC.addInterface( aType, xListener ); } -//------------------------------------------------ + // -//------------------------------------------------ + void SAL_CALL CAsyncEventNotifier::removeListener(const uno::Type& aType , const uno::Reference< uno::XInterface >& xListener) @@ -105,9 +105,9 @@ void SAL_CALL CAsyncEventNotifier::removeListener(const uno::Type& m_rBroadcastHelper.aLC.removeInterface( aType, xListener ); } -//------------------------------------------------ + // -//------------------------------------------------ + bool SAL_CALL CAsyncEventNotifier::startup(bool bCreateSuspended) { @@ -137,9 +137,9 @@ bool SAL_CALL CAsyncEventNotifier::startup(bool bCreateSuspended) return m_bRun; } -//------------------------------------------------ + // -//------------------------------------------------ + void SAL_CALL CAsyncEventNotifier::shutdown() { @@ -175,27 +175,27 @@ void SAL_CALL CAsyncEventNotifier::shutdown() m_hThread = 0; } -//------------------------------------------------ + // -//------------------------------------------------ + void CAsyncEventNotifier::suspend() { ResetEvent(m_ResumeNotifying); } -//------------------------------------------------ + // -//------------------------------------------------ + void CAsyncEventNotifier::resume() { SetEvent(m_ResumeNotifying); } -//------------------------------------------------ + // -//------------------------------------------------ + void SAL_CALL CAsyncEventNotifier::notifyEvent(CEventNotification* EventNotification) { @@ -210,9 +210,9 @@ void SAL_CALL CAsyncEventNotifier::notifyEvent(CEventNotification* EventNotifica } } -//------------------------------------------------ + // -//------------------------------------------------ + size_t SAL_CALL CAsyncEventNotifier::getEventListSize() { @@ -220,9 +220,9 @@ size_t SAL_CALL CAsyncEventNotifier::getEventListSize() return m_EventList.size(); } -//------------------------------------------------ + // -//------------------------------------------------ + void SAL_CALL CAsyncEventNotifier::resetNotifyEvent() { @@ -231,9 +231,9 @@ void SAL_CALL CAsyncEventNotifier::resetNotifyEvent() ResetEvent(m_NotifyEvent); } -//------------------------------------------------ + // -//------------------------------------------------ + CEventNotification* SAL_CALL CAsyncEventNotifier::getNextEventRecord() { @@ -241,9 +241,9 @@ CEventNotification* SAL_CALL CAsyncEventNotifier::getNextEventRecord() return m_EventList.front(); } -//------------------------------------------------ + // -//------------------------------------------------ + void SAL_CALL CAsyncEventNotifier::removeNextEventRecord() { @@ -251,9 +251,9 @@ void SAL_CALL CAsyncEventNotifier::removeNextEventRecord() m_EventList.pop_front(); } -//------------------------------------------------ + // -//------------------------------------------------ + void SAL_CALL CAsyncEventNotifier::run() { @@ -297,9 +297,9 @@ void SAL_CALL CAsyncEventNotifier::run() } // while(m_bRun) } -//------------------------------------------------ + // -//------------------------------------------------ + unsigned int WINAPI CAsyncEventNotifier::ThreadProc(LPVOID pParam) { diff --git a/fpicker/source/win32/filepicker/controlaccess.cxx b/fpicker/source/win32/filepicker/controlaccess.cxx index 65345b045b53..6be5e1dc03c2 100644 --- a/fpicker/source/win32/filepicker/controlaccess.cxx +++ b/fpicker/source/win32/filepicker/controlaccess.cxx @@ -23,24 +23,24 @@ #include "controlaccess.hxx" #include "../misc/WinImplHelper.hxx" -//------------------------------------------------------------ + // we are using a table based algorithm to dispatch control // actions there is one table containing one action table for // each control class and one action table per control class // which contains function pointer to control action functions -//------------------------------------------------------------ -//------------------------------------------------------------ + + // namespace directives -//------------------------------------------------------------ + namespace // private { - //------------------------------------------------------------ + // table setup - //------------------------------------------------------------ + CTRL_SETVALUE_FUNCTION_T CheckboxSetValueFunctionTable[] = { @@ -107,9 +107,9 @@ namespace // private { NULL, 0 } }; - //------------------------------------------------------------ + // - //------------------------------------------------------------ + CTRL_SETVALUE_FUNCTION_T SAL_CALL GetCtrlSetValueFunction( CTRL_SETVALUE_FUNCTION_T* aCtrlSetValueFunctionTable, size_t aTableSize, sal_Int16 aCtrlAction ) @@ -122,9 +122,9 @@ namespace // private return aCtrlSetValueFunctionTable[aCtrlAction]; } - //------------------------------------------------------------ + // - //------------------------------------------------------------ + CTRL_GETVALUE_FUNCTION_T SAL_CALL GetCtrlGetValueFunction( CTRL_GETVALUE_FUNCTION_T* aCtrlGetValueFunctionTable, size_t aTableSize, sal_Int16 aCtrlAction ) @@ -137,9 +137,9 @@ namespace // private return aCtrlGetValueFunctionTable[aCtrlAction]; } - //------------------------------------------------------------ + // - //------------------------------------------------------------ + inline _ENTRY SAL_CALL GetCtrlClassSetValueFunctionTable( CTRL_CLASS aCtrlClass ) @@ -147,9 +147,9 @@ namespace // private return CtrlClassSetValueFunctionTable[aCtrlClass]; } - //------------------------------------------------------------ + // - //------------------------------------------------------------ + inline _ENTRY SAL_CALL GetCtrlClassGetValueFunctionTable( CTRL_CLASS aCtrlClass ) @@ -173,9 +173,9 @@ namespace // private }; // end namespace -//------------------------------------------------------------ + // -//------------------------------------------------------------ + CTRL_SETVALUE_FUNCTION_T SAL_CALL GetCtrlSetValueFunction( CTRL_CLASS aCtrlClass, sal_Int16 aCtrlAction ) { @@ -188,9 +188,9 @@ CTRL_SETVALUE_FUNCTION_T SAL_CALL GetCtrlSetValueFunction( CTRL_CLASS aCtrlClass aCtrlAction ); } -//------------------------------------------------------------ + // -//------------------------------------------------------------ + CTRL_GETVALUE_FUNCTION_T SAL_CALL GetCtrlGetValueFunction( CTRL_CLASS aCtrlClass, sal_Int16 aCtrlAction ) { @@ -203,9 +203,9 @@ CTRL_GETVALUE_FUNCTION_T SAL_CALL GetCtrlGetValueFunction( CTRL_CLASS aCtrlClass aCtrlAction ); } -//------------------------------------------------------------ + // -//------------------------------------------------------------ + CTRL_CLASS SAL_CALL GetCtrlClass( HWND hwndCtrl ) { @@ -234,9 +234,9 @@ CTRL_CLASS SAL_CALL GetCtrlClass( HWND hwndCtrl ) return aCtrlClass; } -//------------------------------------------------------------ + // -//------------------------------------------------------------ + int SAL_CALL CommonFilePickerCtrlIdToWinFileOpenCtrlId( sal_Int16 aControlId ) { diff --git a/fpicker/source/win32/filepicker/controlcommand.cxx b/fpicker/source/win32/filepicker/controlcommand.cxx index 222bb1960bc2..6ef55b9e110f 100644 --- a/fpicker/source/win32/filepicker/controlcommand.cxx +++ b/fpicker/source/win32/filepicker/controlcommand.cxx @@ -22,9 +22,9 @@ #include "controlcommandresult.hxx" #include "filepickerstate.hxx" -//--------------------------------------------- + // -//--------------------------------------------- + CControlCommand::CControlCommand( sal_Int16 aControlId ) : m_NextCommand( NULL ), @@ -32,17 +32,17 @@ CControlCommand::CControlCommand( sal_Int16 aControlId ) : { } -//--------------------------------------------- + // -//--------------------------------------------- + CControlCommand::~CControlCommand( ) { } -//--------------------------------------------- + // -//--------------------------------------------- + CControlCommandResult* SAL_CALL CControlCommand::handleRequest( CControlCommandRequest* pRequest ) { @@ -68,27 +68,27 @@ CControlCommandResult* SAL_CALL CControlCommand::handleRequest( CControlCommandR return result; } -//--------------------------------------------- + // -//--------------------------------------------- + CControlCommand* SAL_CALL CControlCommand::getNextCommand( ) const { return m_NextCommand; } -//--------------------------------------------- + // -//--------------------------------------------- + void SAL_CALL CControlCommand::setNextCommand( CControlCommand* nextCommand ) { m_NextCommand = nextCommand; } -//--------------------------------------------- + // -//--------------------------------------------- + sal_Int16 SAL_CALL CControlCommand::getControlId( ) const { @@ -96,9 +96,9 @@ sal_Int16 SAL_CALL CControlCommand::getControlId( ) const } -//--------------------------------------------- + // -//--------------------------------------------- + CValueControlCommand::CValueControlCommand( sal_Int16 aControlId, @@ -110,9 +110,9 @@ CValueControlCommand::CValueControlCommand( { } -//--------------------------------------------- + // -//--------------------------------------------- + void SAL_CALL CValueControlCommand::exec( CFilePickerState* aFilePickerState ) { @@ -124,9 +124,9 @@ void SAL_CALL CValueControlCommand::exec( CFilePickerState* aFilePickerState ) m_aValue ); } -//--------------------------------------------- + // -//--------------------------------------------- + CControlCommandResult* SAL_CALL CValueControlCommand::handleRequest( CControlCommandRequest* aRequest ) { @@ -158,18 +158,18 @@ CControlCommandResult* SAL_CALL CValueControlCommand::handleRequest( CControlCom return result; } -//--------------------------------------------- + // -//--------------------------------------------- + sal_Int16 SAL_CALL CValueControlCommand::getControlAction( ) const { return m_aControlAction; } -//--------------------------------------------- + // -//--------------------------------------------- + ::com::sun::star::uno::Any SAL_CALL CValueControlCommand::getValue( ) const { @@ -177,9 +177,9 @@ sal_Int16 SAL_CALL CValueControlCommand::getControlAction( ) const } -//--------------------------------------------- + // -//--------------------------------------------- + CLabelControlCommand::CLabelControlCommand( sal_Int16 aControlId, @@ -189,9 +189,9 @@ CLabelControlCommand::CLabelControlCommand( { } -//--------------------------------------------- + // -//--------------------------------------------- + void SAL_CALL CLabelControlCommand::exec( CFilePickerState* aFilePickerState ) { @@ -200,9 +200,9 @@ void SAL_CALL CLabelControlCommand::exec( CFilePickerState* aFilePickerState ) aFilePickerState->setLabel( getControlId( ), m_aLabel ); } -//--------------------------------------------- + // -//--------------------------------------------- + CControlCommandResult* SAL_CALL CLabelControlCommand::handleRequest( CControlCommandRequest* aRequest ) { @@ -235,18 +235,18 @@ CControlCommandResult* SAL_CALL CLabelControlCommand::handleRequest( CControlCom return result; } -//--------------------------------------------- + // -//--------------------------------------------- + OUString SAL_CALL CLabelControlCommand::getLabel( ) const { return m_aLabel; } -//--------------------------------------------- + // -//--------------------------------------------- + CEnableControlCommand::CEnableControlCommand( sal_Int16 aControlId, @@ -256,9 +256,9 @@ CEnableControlCommand::CEnableControlCommand( { } -//--------------------------------------------- + // -//--------------------------------------------- + void SAL_CALL CEnableControlCommand::exec( CFilePickerState* aFilePickerState ) { diff --git a/fpicker/source/win32/filepicker/customcontrol.cxx b/fpicker/source/win32/filepicker/customcontrol.cxx index 98400a15a1c0..4e21d3f7e267 100644 --- a/fpicker/source/win32/filepicker/customcontrol.cxx +++ b/fpicker/source/win32/filepicker/customcontrol.cxx @@ -19,35 +19,35 @@ #include "customcontrol.hxx" -//----------------------------------- + // -//----------------------------------- + CCustomControl::~CCustomControl() { } -//----------------------------------- + // -//----------------------------------- + void SAL_CALL CCustomControl::AddControl(CCustomControl*) { // will be implemented by custom control containers } -//----------------------------------- + // -//----------------------------------- + void SAL_CALL CCustomControl::RemoveControl(CCustomControl*) { // will be implemented by custom control containers } -//----------------------------------- + // -//----------------------------------- + void SAL_CALL CCustomControl::RemoveAllControls() { diff --git a/fpicker/source/win32/filepicker/customcontrolcontainer.cxx b/fpicker/source/win32/filepicker/customcontrolcontainer.cxx index 312c59fa5e8e..0d6bcdb2b79a 100644 --- a/fpicker/source/win32/filepicker/customcontrolcontainer.cxx +++ b/fpicker/source/win32/filepicker/customcontrolcontainer.cxx @@ -22,9 +22,9 @@ #include <algorithm> #include <functional> -//----------------------------------- + // -//----------------------------------- + namespace /* private */ { @@ -56,18 +56,18 @@ namespace /* private */ }; } -//----------------------------------- + // -//----------------------------------- + CCustomControlContainer::~CCustomControlContainer() { RemoveAllControls(); } -//----------------------------------- + // -//----------------------------------- + void SAL_CALL CCustomControlContainer::Align() { @@ -77,9 +77,9 @@ void SAL_CALL CCustomControlContainer::Align() AlignCustomControl); } -//----------------------------------- + // -//----------------------------------- + void SAL_CALL CCustomControlContainer::SetFont(HFONT hFont) { @@ -91,18 +91,18 @@ void SAL_CALL CCustomControlContainer::SetFont(HFONT hFont) aSetFontHelper); } -//----------------------------------- + // -//----------------------------------- + void SAL_CALL CCustomControlContainer::AddControl(CCustomControl* aCustomControl) { m_ControlContainer.push_back(aCustomControl); } -//----------------------------------- + // -//----------------------------------- + void SAL_CALL CCustomControlContainer::RemoveControl(CCustomControl* aCustomControl) { @@ -118,9 +118,9 @@ void SAL_CALL CCustomControlContainer::RemoveControl(CCustomControl* aCustomCont } } -//----------------------------------- + // -//----------------------------------- + void SAL_CALL CCustomControlContainer::RemoveAllControls() { diff --git a/fpicker/source/win32/filepicker/customcontrolfactory.cxx b/fpicker/source/win32/filepicker/customcontrolfactory.cxx index b20f557c02f6..9d1fbf357e1a 100644 --- a/fpicker/source/win32/filepicker/customcontrolfactory.cxx +++ b/fpicker/source/win32/filepicker/customcontrolfactory.cxx @@ -24,9 +24,9 @@ #include "dialogcustomcontrols.hxx" #include <osl/diagnose.h> -//----------------------------------- + // -//----------------------------------- + CCustomControl* CCustomControlFactory::CreateCustomControl(HWND aControlHandle, HWND aParentHandle) { @@ -66,9 +66,9 @@ CCustomControl* CCustomControlFactory::CreateCustomControl(HWND aControlHandle, return new CDummyCustomControl(aControlHandle,aParentHandle); } -//----------------------------------- + // -//----------------------------------- + CCustomControl* CCustomControlFactory::CreateCustomControlContainer() { diff --git a/fpicker/source/win32/filepicker/dialogcustomcontrols.cxx b/fpicker/source/win32/filepicker/dialogcustomcontrols.cxx index 5a9f4d4d567b..32a5646faab4 100644 --- a/fpicker/source/win32/filepicker/dialogcustomcontrols.cxx +++ b/fpicker/source/win32/filepicker/dialogcustomcontrols.cxx @@ -20,9 +20,9 @@ #include "dialogcustomcontrols.hxx" #include <osl/diagnose.h> -//----------------------------------- + // -//----------------------------------- + CDialogCustomControlBase::CDialogCustomControlBase(HWND aControlHandle, HWND aParentHandle) : m_CustomControlHandle(aControlHandle), @@ -30,9 +30,9 @@ CDialogCustomControlBase::CDialogCustomControlBase(HWND aControlHandle, HWND aPa { } -//----------------------------------- + // -//----------------------------------- + void SAL_CALL CDialogCustomControlBase::SetFont(HFONT hFont) { @@ -43,9 +43,9 @@ void SAL_CALL CDialogCustomControlBase::SetFont(HFONT hFont) (LPARAM)sal_True); } -//----------------------------------- + // -//----------------------------------- + void SAL_CALL CDialogCustomControlBase::AlignToBuddy(HWND aBuddyHandle) { @@ -79,102 +79,102 @@ void SAL_CALL CDialogCustomControlBase::AlignToBuddy(HWND aBuddyHandle) SWP_NOACTIVATE); } -//----------------------------------- + // -//----------------------------------- + CDummyCustomControl::CDummyCustomControl(HWND, HWND) { } -//----------------------------------- + // -//----------------------------------- + void SAL_CALL CDummyCustomControl::Align() { // do nothing } -//----------------------------------- + // -//----------------------------------- + void SAL_CALL CDummyCustomControl::SetFont(HFONT) { // do nothing } -//----------------------------------- + // -//----------------------------------- + CStaticCustomControl::CStaticCustomControl(HWND aControlHandle, HWND aParentHandle) : CDialogCustomControlBase(aControlHandle,aParentHandle) { } -//----------------------------------- + // Align to the "File name" static // text of the standard FileOpen dlg -//----------------------------------- + void SAL_CALL CStaticCustomControl::Align() { AlignToBuddy(GetDlgItem(m_ParentHandle,stc3)); } -//----------------------------------- + // -//----------------------------------- + CPushButtonCustomControl::CPushButtonCustomControl(HWND aControlHandle, HWND aParentHandle) : CDialogCustomControlBase(aControlHandle,aParentHandle) { } -//----------------------------------- + // Align to the "OK" button of the // standard FileOpen dlg -//----------------------------------- + void SAL_CALL CPushButtonCustomControl::Align() { AlignToBuddy(GetDlgItem(m_ParentHandle,IDCANCEL)); } -//----------------------------------- + // -//----------------------------------- + CComboboxCustomControl::CComboboxCustomControl(HWND aControlHandle, HWND aParentHandle) : CDialogCustomControlBase(aControlHandle,aParentHandle) { } -//----------------------------------- + // Align to the "File name" combobox // of the standard FileOpen dlg -//----------------------------------- + void SAL_CALL CComboboxCustomControl::Align() { AlignToBuddy(GetDlgItem(m_ParentHandle,cmb1)); } -//----------------------------------- + // -//----------------------------------- + CCheckboxCustomControl::CCheckboxCustomControl(HWND aControlHandle, HWND aParentHandle) : CDialogCustomControlBase(aControlHandle,aParentHandle) { } -//----------------------------------- + // Align to the "File name" combobox // of the standard FileOpen dlg -//----------------------------------- + void SAL_CALL CCheckboxCustomControl::Align() { diff --git a/fpicker/source/win32/filepicker/dibpreview.cxx b/fpicker/source/win32/filepicker/dibpreview.cxx index 1bfb21d35d29..66f46efff1e4 100644 --- a/fpicker/source/win32/filepicker/dibpreview.cxx +++ b/fpicker/source/win32/filepicker/dibpreview.cxx @@ -28,18 +28,18 @@ #include <stdexcept> #include <string> -//------------------------------------------------------------------------ + // -//------------------------------------------------------------------------ + using ::com::sun::star::uno::Sequence; using ::com::sun::star::uno::RuntimeException; using ::com::sun::star::uno::Any; using ::com::sun::star::lang::IllegalArgumentException; -//------------------------------------------------------------------------ + // -//------------------------------------------------------------------------ + namespace /* private */ { @@ -48,17 +48,17 @@ namespace /* private */ #define PREVIEWWND_CLASS_NAME TEXT("DIBPreviewWnd###") -//--------------------------------------------------- + // static member initialization -//--------------------------------------------------- + osl::Mutex CDIBPreview::s_Mutex; ATOM CDIBPreview::s_ClassAtom = 0; sal_Int32 CDIBPreview::s_RegisterDibPreviewWndCount = 0; -//--------------------------------------------------- + // -//--------------------------------------------------- + CDIBPreview::CDIBPreview(HINSTANCE instance,HWND parent,sal_Bool bShowWindow) : m_Instance(instance) @@ -95,9 +95,9 @@ CDIBPreview::CDIBPreview(HINSTANCE instance,HWND parent,sal_Bool bShowWindow) : } } -//--------------------------------------------------- + // -//--------------------------------------------------- + CDIBPreview::~CDIBPreview( ) { @@ -109,9 +109,9 @@ CDIBPreview::~CDIBPreview( ) UnregisterDibPreviewWindowClass(); } -//------------------------------- + // -//------------------------------- + sal_Int32 SAL_CALL CDIBPreview::getTargetColorDepth() throw (RuntimeException) { @@ -124,9 +124,9 @@ sal_Int32 SAL_CALL CDIBPreview::getTargetColorDepth() throw (RuntimeException) return clrRes; } -//------------------------------- + // -//------------------------------- + sal_Int32 SAL_CALL CDIBPreview::getAvailableWidth() throw (RuntimeException) { @@ -141,9 +141,9 @@ sal_Int32 SAL_CALL CDIBPreview::getAvailableWidth() throw (RuntimeException) return cx; } -//------------------------------- + // -//------------------------------- + sal_Int32 SAL_CALL CDIBPreview::getAvailableHeight() throw (RuntimeException) { @@ -158,9 +158,9 @@ sal_Int32 SAL_CALL CDIBPreview::getAvailableHeight() throw (RuntimeException) return cy; } -//------------------------------- + // -//------------------------------- + void SAL_CALL CDIBPreview::setImage(sal_Int16 aImageFormat, const Any& aImage) throw (IllegalArgumentException, RuntimeException) @@ -181,9 +181,9 @@ void SAL_CALL CDIBPreview::setImage(sal_Int16 aImageFormat, const Any& aImage) UpdateWindow(m_Hwnd); } -//------------------------------- + // -//------------------------------- + sal_Bool SAL_CALL CDIBPreview::setShowState(sal_Bool bShowState) throw (RuntimeException) { @@ -192,27 +192,27 @@ sal_Bool SAL_CALL CDIBPreview::setShowState(sal_Bool bShowState) throw (RuntimeE return sal_True; } -//------------------------------- + // -//------------------------------- + sal_Bool SAL_CALL CDIBPreview::getShowState() throw (RuntimeException) { return (sal_Bool)IsWindowVisible(m_Hwnd); } -//------------------------------- + // -//------------------------------- + HWND SAL_CALL CDIBPreview::getWindowHandle() const { return m_Hwnd; } -//--------------------------------------------------- + // -//--------------------------------------------------- + void SAL_CALL CDIBPreview::onPaint(HWND hWnd, HDC hDC) { @@ -306,9 +306,9 @@ void SAL_CALL CDIBPreview::onPaint(HWND hWnd, HDC hDC) } } -//--------------------------------------------------- + // -//--------------------------------------------------- + LRESULT CALLBACK CDIBPreview::WndProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) @@ -374,9 +374,9 @@ LRESULT CALLBACK CDIBPreview::WndProc( return lResult; } -//--------------------------------------------------- + // -//--------------------------------------------------- + ATOM SAL_CALL CDIBPreview::RegisterDibPreviewWindowClass() { @@ -417,9 +417,9 @@ ATOM SAL_CALL CDIBPreview::RegisterDibPreviewWindowClass() return s_ClassAtom; } -//--------------------------------------------------- + // -//--------------------------------------------------- + void SAL_CALL CDIBPreview::UnregisterDibPreviewWindowClass() { diff --git a/fpicker/source/win32/filepicker/filepickereventnotification.cxx b/fpicker/source/win32/filepicker/filepickereventnotification.cxx index 97d545bdcf5b..275f4f59920b 100644 --- a/fpicker/source/win32/filepicker/filepickereventnotification.cxx +++ b/fpicker/source/win32/filepicker/filepickereventnotification.cxx @@ -20,26 +20,26 @@ #include "filepickereventnotification.hxx" #include <sal/types.h> -//----------------------------------- + // namespace directives -//----------------------------------- + using namespace com::sun::star::uno; using namespace com::sun::star::ui::dialogs; -//----------------------------------- + // A FilePicker event without // parameter -//----------------------------------- + CFilePickerEventNotification::CFilePickerEventNotification(EventListenerMethod_t EventListenerMethod) : m_EventListenerMethod(EventListenerMethod) { } -//---------------------------------- + // -//---------------------------------- + void SAL_CALL CFilePickerEventNotification::notifyEventListener( Reference< XInterface > xListener ) { @@ -52,9 +52,9 @@ void SAL_CALL CFilePickerEventNotification::notifyEventListener( Reference< XInt //################################################## -//---------------------------------- + // A FilePicker event with parameter -//---------------------------------- + CFilePickerParamEventNotification::CFilePickerParamEventNotification(EventListenerMethod_t EventListenerMethod, const FilePickerEvent& FilePickerEvent) : m_EventListenerMethod(EventListenerMethod), @@ -62,9 +62,9 @@ CFilePickerParamEventNotification::CFilePickerParamEventNotification(EventListen { } -//---------------------------------- + // A FilePicker event with parameter -//---------------------------------- + void SAL_CALL CFilePickerParamEventNotification::notifyEventListener( Reference< XInterface > xListener ) { diff --git a/fpicker/source/win32/filepicker/filepickerstate.cxx b/fpicker/source/win32/filepicker/filepickerstate.cxx index 65e11c542690..971f44c1e7ea 100644 --- a/fpicker/source/win32/filepicker/filepickerstate.cxx +++ b/fpicker/source/win32/filepicker/filepickerstate.cxx @@ -34,9 +34,9 @@ #include "FileOpenDlg.hxx" #include "../misc/WinImplHelper.hxx" -//--------------------------------------------- + // -//--------------------------------------------- + using com::sun::star::uno::Any; using com::sun::star::uno::Sequence; @@ -47,42 +47,42 @@ using namespace ::com::sun::star::ui::dialogs::ExtendedFilePickerElementIds; using namespace ::com::sun::star::ui::dialogs::CommonFilePickerElementIds; using namespace ::com::sun::star::ui::dialogs::ListboxControlActions; -//--------------------------------------------- + // -//--------------------------------------------- + const sal_Int32 MAX_LABEL = 256; const sal_Int16 LISTBOX_LABEL_OFFSET = 100; -//--------------------------------------------- + // declaration -//--------------------------------------------- + CFilePickerState::~CFilePickerState( ) { } -//--------------------------------------------- + // -//--------------------------------------------- + CNonExecuteFilePickerState::CNonExecuteFilePickerState( ) : m_FirstControlCommand( NULL ) { } -//--------------------------------------------- + // -//--------------------------------------------- + CNonExecuteFilePickerState::~CNonExecuteFilePickerState( ) { reset( ); } -//--------------------------------------------- + // -//--------------------------------------------- + void SAL_CALL CNonExecuteFilePickerState::setValue( sal_Int16 aControlId, sal_Int16 aControlAction, const Any& aValue ) { @@ -92,9 +92,9 @@ void SAL_CALL CNonExecuteFilePickerState::setValue( sal_Int16 aControlId, sal_In addControlCommand( value_command ); } -//--------------------------------------------- + // -//--------------------------------------------- + Any SAL_CALL CNonExecuteFilePickerState::getValue( sal_Int16 aControlId, sal_Int16 aControlAction ) { @@ -135,9 +135,9 @@ Any SAL_CALL CNonExecuteFilePickerState::getValue( sal_Int16 aControlId, sal_Int return aAny; } -//--------------------------------------------- + // -//--------------------------------------------- + void SAL_CALL CNonExecuteFilePickerState::enableControl( sal_Int16 aControlId, sal_Bool bEnable ) { @@ -147,9 +147,9 @@ void SAL_CALL CNonExecuteFilePickerState::enableControl( sal_Int16 aControlId, s addControlCommand( enable_command ); } -//--------------------------------------------- + // -//--------------------------------------------- + void SAL_CALL CNonExecuteFilePickerState::setLabel( sal_Int16 aControlId, const OUString& aLabel ) { @@ -159,9 +159,9 @@ void SAL_CALL CNonExecuteFilePickerState::setLabel( sal_Int16 aControlId, const addControlCommand( label_command ); } -//--------------------------------------------- + // -//--------------------------------------------- + OUString SAL_CALL CNonExecuteFilePickerState::getLabel( sal_Int16 aControlId ) { @@ -203,9 +203,9 @@ OUString MatchFixBrokenPath(const OUString& path) return path; } -//----------------------------------------------------------------------------------------- + // -//----------------------------------------------------------------------------------------- + static OUString trimTrailingSpaces(const OUString& rString) { OUString aResult(rString); @@ -281,9 +281,9 @@ Sequence< OUString > SAL_CALL CNonExecuteFilePickerState::getFiles( CFileOpenDia return aFilePathList; } -//--------------------------------------------- + // -//--------------------------------------------- + OUString SAL_CALL CNonExecuteFilePickerState::getDisplayDirectory( CFileOpenDialog* aFileOpenDialog ) { @@ -300,9 +300,9 @@ OUString SAL_CALL CNonExecuteFilePickerState::getDisplayDirectory( CFileOpenDial return pathURL; } -//--------------------------------------------- + // -//--------------------------------------------- + void SAL_CALL CNonExecuteFilePickerState::reset( ) { @@ -319,20 +319,20 @@ void SAL_CALL CNonExecuteFilePickerState::reset( ) m_FirstControlCommand = NULL; } -//--------------------------------------------- + // -//--------------------------------------------- + CControlCommand* SAL_CALL CNonExecuteFilePickerState::getControlCommand( ) const { return m_FirstControlCommand; } -//--------------------------------------------- + // we append new control commands to the end // of the list so that we are sure the commands // will be executed as the client issued it -//--------------------------------------------- + void SAL_CALL CNonExecuteFilePickerState::addControlCommand( CControlCommand* aControlCommand ) { @@ -355,18 +355,18 @@ void SAL_CALL CNonExecuteFilePickerState::addControlCommand( CControlCommand* aC //####################################################################### -//--------------------------------------------- + // -//--------------------------------------------- + CExecuteFilePickerState::CExecuteFilePickerState( HWND hwndDlg ) : m_hwndDlg( hwndDlg ) { } -//--------------------------------------------- + // -//--------------------------------------------- + void SAL_CALL CExecuteFilePickerState::setValue( sal_Int16 aControlId, sal_Int16 aControlAction, const Any& aValue ) { @@ -406,9 +406,9 @@ void SAL_CALL CExecuteFilePickerState::setValue( sal_Int16 aControlId, sal_Int16 lpfnSetValue( hwndCtrl, aValue, Reference< XInterface >( ), 3 ); } -//--------------------------------------------- + // -//--------------------------------------------- + Any SAL_CALL CExecuteFilePickerState::getValue( sal_Int16 aControlId, sal_Int16 aControlAction ) { @@ -445,9 +445,9 @@ Any SAL_CALL CExecuteFilePickerState::getValue( sal_Int16 aControlId, sal_Int16 return lpfnGetValue( hwndCtrl ); } -//--------------------------------------------- + // -//--------------------------------------------- + void SAL_CALL CExecuteFilePickerState::enableControl( sal_Int16 aControlId, sal_Bool bEnable ) { @@ -458,9 +458,9 @@ void SAL_CALL CExecuteFilePickerState::enableControl( sal_Int16 aControlId, sal_ EnableWindow( hwndCtrl, bEnable ); } -//--------------------------------------------- + // -//--------------------------------------------- + void SAL_CALL CExecuteFilePickerState::setLabel( sal_Int16 aControlId, const OUString& aLabel ) { @@ -478,9 +478,9 @@ void SAL_CALL CExecuteFilePickerState::setLabel( sal_Int16 aControlId, const OUS SetWindowText( hwndCtrl, reinterpret_cast<LPCTSTR>(aWinLabel.getStr( )) ); } -//--------------------------------------------- + // -//--------------------------------------------- + OUString SAL_CALL CExecuteFilePickerState::getLabel( sal_Int16 aControlId ) { @@ -503,9 +503,9 @@ OUString SAL_CALL CExecuteFilePickerState::getLabel( sal_Int16 aControlId ) return ctrlLabel; } -//--------------------------------------------- + // -//--------------------------------------------- + Sequence< OUString > SAL_CALL CExecuteFilePickerState::getFiles( CFileOpenDialog* aFileOpenDialog ) { @@ -539,9 +539,9 @@ Sequence< OUString > SAL_CALL CExecuteFilePickerState::getFiles( CFileOpenDialog return aFilePathList; } -//--------------------------------------------- + // -//--------------------------------------------- + OUString SAL_CALL CExecuteFilePickerState::getDisplayDirectory( CFileOpenDialog* aFileOpenDialog ) { @@ -558,9 +558,9 @@ OUString SAL_CALL CExecuteFilePickerState::getDisplayDirectory( CFileOpenDialog* return pathURL; } -//--------------------------------------------- + // -//--------------------------------------------- + void SAL_CALL CExecuteFilePickerState::initFilePickerControls( CControlCommand* firstControlCommand ) { @@ -573,9 +573,9 @@ void SAL_CALL CExecuteFilePickerState::initFilePickerControls( CControlCommand* } } -//--------------------------------------------- + // -//--------------------------------------------- + void SAL_CALL CExecuteFilePickerState::cacheControlState( HWND hwndControl, CFilePickerState* aNonExecFilePickerState ) { @@ -631,18 +631,18 @@ void SAL_CALL CExecuteFilePickerState::cacheControlState( HWND hwndControl, CFil } } -//--------------------------------------------- + // -//--------------------------------------------- + void SAL_CALL CExecuteFilePickerState::setHwnd( HWND hwndDlg ) { m_hwndDlg = hwndDlg; } -//--------------------------------------------- + // -//--------------------------------------------- + inline sal_Bool SAL_CALL CExecuteFilePickerState::IsListboxControl( HWND hwndControl ) const { @@ -652,22 +652,22 @@ inline sal_Bool SAL_CALL CExecuteFilePickerState::IsListboxControl( HWND hwndCon return ( LISTBOX == aCtrlClass ); } -//--------------------------------------------- + // because listboxes (comboboxes) and their labels // are separated we have to translate the listbox // id to their corresponding label id // the convention is that the label id of a listbox // is the id of the listbox + 100 -//--------------------------------------------- + inline sal_Int16 SAL_CALL CExecuteFilePickerState::ListboxIdToListboxLabelId( sal_Int16 aListboxId ) const { return ( aListboxId + LISTBOX_LABEL_OFFSET ); } -//--------------------------------------------- + // -//--------------------------------------------- + inline HWND SAL_CALL CExecuteFilePickerState::GetListboxLabelItem( sal_Int16 aControlId ) const { @@ -679,9 +679,9 @@ inline HWND SAL_CALL CExecuteFilePickerState::GetListboxLabelItem( sal_Int16 aCo return hwndCtrl; } -//--------------------------------------------- + // -//--------------------------------------------- + HWND SAL_CALL CExecuteFilePickerState::GetHwndDlgItem( sal_Int16 aControlId, sal_Bool bIncludeStdCtrls ) const { diff --git a/fpicker/source/win32/filepicker/getfilenamewrapper.cxx b/fpicker/source/win32/filepicker/getfilenamewrapper.cxx index 4a8eb9e8bfca..48ed997c3645 100644 --- a/fpicker/source/win32/filepicker/getfilenamewrapper.cxx +++ b/fpicker/source/win32/filepicker/getfilenamewrapper.cxx @@ -33,10 +33,10 @@ namespace /* private */ { - //----------------------------------------------- + // This class prevents changing of the working // directory. - //----------------------------------------------- + class CurDirGuard { sal_Bool m_bValid; @@ -106,9 +106,9 @@ namespace /* private */ } }; - //----------------------------------------------- + // - //----------------------------------------------- + struct GetFileNameParam { @@ -125,9 +125,9 @@ namespace /* private */ int m_ExtErr; }; - //----------------------------------------------- + // - //----------------------------------------------- + unsigned __stdcall ThreadProc(void* pParam) { @@ -151,10 +151,10 @@ namespace /* private */ return 0; } - //----------------------------------------------- + // exceutes GetOpenFileName/GetSaveFileName in // a separat thread - //----------------------------------------------- + bool ThreadExecGetFileName(LPOPENFILENAME lpofn, bool bOpen, /*out*/ int& ExtErr) { @@ -174,11 +174,11 @@ namespace /* private */ return gfnp.m_bRet; } - //----------------------------------------------- + // This function returns true if the calling // thread belongs to a Multithreaded Appartment // (MTA) - //----------------------------------------------- + bool IsMTA() { @@ -196,18 +196,18 @@ namespace /* private */ } // namespace private -//----------------------------------------------- + // -//----------------------------------------------- + CGetFileNameWrapper::CGetFileNameWrapper() : m_ExtendedDialogError(0) { } -//----------------------------------------------- + // -//----------------------------------------------- + bool CGetFileNameWrapper::getOpenFileName(LPOPENFILENAME lpofn) { @@ -236,9 +236,9 @@ bool CGetFileNameWrapper::getOpenFileName(LPOPENFILENAME lpofn) return bRet; } -//----------------------------------------------- + // -//----------------------------------------------- + bool CGetFileNameWrapper::getSaveFileName(LPOPENFILENAME lpofn) { @@ -262,9 +262,9 @@ bool CGetFileNameWrapper::getSaveFileName(LPOPENFILENAME lpofn) return bRet; } -//----------------------------------------------- + // -//----------------------------------------------- + int CGetFileNameWrapper::commDlgExtendedError( ) { diff --git a/fpicker/source/win32/filepicker/helppopupwindow.cxx b/fpicker/source/win32/filepicker/helppopupwindow.cxx index 63be5564a7f2..3af46a0cc94c 100644 --- a/fpicker/source/win32/filepicker/helppopupwindow.cxx +++ b/fpicker/source/win32/filepicker/helppopupwindow.cxx @@ -21,15 +21,15 @@ #include "helppopupwindow.hxx" #include <osl/diagnose.h> -//------------------------------------------------------------------------ + // -//------------------------------------------------------------------------ + using osl::Mutex; -//------------------------------------------------------------------------ + // -//------------------------------------------------------------------------ + namespace /* private */ { @@ -54,17 +54,17 @@ const sal_Int32 OUTER_FRAME_WIDTH = 1; // pixel const DWORD INNER_FRAME_COLOR = 0xC8D0D4; const sal_Int32 INNER_FRAME_WIDTH = 1; // pixel -//--------------------------------------------------- + // static member initialization -//--------------------------------------------------- + osl::Mutex CHelpPopupWindow::s_Mutex; ATOM CHelpPopupWindow::s_ClassAtom = 0; sal_Int32 CHelpPopupWindow::s_RegisterWndClassCount = 0; -//--------------------------------------------------- + // -//--------------------------------------------------- + CHelpPopupWindow::CHelpPopupWindow( HINSTANCE hInstance, @@ -88,9 +88,9 @@ CHelpPopupWindow::CHelpPopupWindow( m_hBrushShadow = CreatePatternBrush( m_hBitmapShadow ); } -//--------------------------------------------------- + // -//--------------------------------------------------- + CHelpPopupWindow::~CHelpPopupWindow( ) { @@ -105,18 +105,18 @@ CHelpPopupWindow::~CHelpPopupWindow( ) DeleteObject( m_hBrushShadow ); } -//--------------------------------------------------- + // -//--------------------------------------------------- + void SAL_CALL CHelpPopupWindow::setText( const OUString& aHelpText ) { m_HelpText = aHelpText; } -//--------------------------------------------------- + // -//--------------------------------------------------- + void SAL_CALL CHelpPopupWindow::show( sal_Int32 x, sal_Int32 y ) { @@ -153,9 +153,9 @@ void SAL_CALL CHelpPopupWindow::show( sal_Int32 x, sal_Int32 y ) ShowWindow( m_hwnd, SW_SHOW ); } -//--------------------------------------------------- + // -//--------------------------------------------------- + HWND SAL_CALL CHelpPopupWindow::setParent( HWND hwndNewParent ) { @@ -166,10 +166,10 @@ HWND SAL_CALL CHelpPopupWindow::setParent( HWND hwndNewParent ) return oldParent; } -//--------------------------------------------------- + // calculates the necessary dimensions of the popup // window including the margins etc. -//--------------------------------------------------- + void SAL_CALL CHelpPopupWindow::calcWindowRect( LPRECT lprect ) { @@ -215,9 +215,9 @@ void SAL_CALL CHelpPopupWindow::calcWindowRect( LPRECT lprect ) ReleaseDC( m_hwnd, hdc ); } -//--------------------------------------------------- + // -//--------------------------------------------------- + void SAL_CALL CHelpPopupWindow::adjustWindowSize( sal_Int32* cx_new, sal_Int32* cy_new ) { @@ -240,9 +240,9 @@ void SAL_CALL CHelpPopupWindow::adjustWindowSize( sal_Int32* cx_new, sal_Int32* *cy_new = rect.bottom; } -//--------------------------------------------------- + // -//--------------------------------------------------- + void SAL_CALL CHelpPopupWindow::adjustWindowPos( sal_Int32 x, sal_Int32 y, sal_Int32 cx, sal_Int32 cy ) @@ -289,9 +289,9 @@ void SAL_CALL CHelpPopupWindow::adjustWindowPos( ReleaseDC( m_hwnd, hdc ); } -//--------------------------------------------------- + // -//--------------------------------------------------- + void SAL_CALL CHelpPopupWindow::onPaint( HWND hWnd, HDC hdc ) { @@ -409,18 +409,18 @@ void SAL_CALL CHelpPopupWindow::onPaint( HWND hWnd, HDC hdc ) SetBkColor( hdc, oldBkColor ); } -//--------------------------------------------------- + // -//--------------------------------------------------- + void SAL_CALL CHelpPopupWindow::onNcDestroy() { m_hwnd = NULL; } -//--------------------------------------------------- + // -//--------------------------------------------------- + void SAL_CALL CHelpPopupWindow::onCreate( HWND hwnd ) { @@ -448,9 +448,9 @@ void SAL_CALL CHelpPopupWindow::onCreate( HWND hwnd ) ReleaseDC( m_hwnd, hdc ); } -//--------------------------------------------------- + // -//--------------------------------------------------- + LRESULT CALLBACK CHelpPopupWindow::WndProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam ) @@ -522,9 +522,9 @@ LRESULT CALLBACK CHelpPopupWindow::WndProc( return lResult; } -//--------------------------------------------------- + // -//--------------------------------------------------- + ATOM SAL_CALL CHelpPopupWindow::RegisterWindowClass( ) { @@ -562,9 +562,9 @@ ATOM SAL_CALL CHelpPopupWindow::RegisterWindowClass( ) return s_ClassAtom; } -//--------------------------------------------------- + // -//--------------------------------------------------- + void SAL_CALL CHelpPopupWindow::UnregisterWindowClass( ) { diff --git a/fpicker/source/win32/filepicker/previewadapter.cxx b/fpicker/source/win32/filepicker/previewadapter.cxx index 23aab44f834a..c87f3b858479 100644 --- a/fpicker/source/win32/filepicker/previewadapter.cxx +++ b/fpicker/source/win32/filepicker/previewadapter.cxx @@ -28,17 +28,17 @@ #include <memory> #include <stdexcept> -//--------------------------------------------- + // -//--------------------------------------------- + using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; -//--------------------------------------------- + // An impl class to hide implementation details // from clients -//--------------------------------------------- + class CPreviewAdapterImpl { @@ -64,9 +64,9 @@ public: virtual HWND SAL_CALL getParent(); - //------------------------------------- + // parent notification handler - //------------------------------------- + virtual void SAL_CALL notifyParentShow(sal_Bool bShow); @@ -96,9 +96,9 @@ private: CPreviewAdapterImpl& operator=(const CPreviewAdapterImpl&); }; -//----------------------------------------- + // -//----------------------------------------- + CPreviewAdapterImpl::CPreviewAdapterImpl(HINSTANCE instance) : m_Instance(instance), @@ -108,44 +108,44 @@ CPreviewAdapterImpl::CPreviewAdapterImpl(HINSTANCE instance) : { } -//----------------------------------------- + // -//----------------------------------------- + CPreviewAdapterImpl::~CPreviewAdapterImpl() { } -//----------------------------------------- + // -//----------------------------------------- + sal_Int32 SAL_CALL CPreviewAdapterImpl::getTargetColorDepth() { return m_Preview->getTargetColorDepth(); } -//----------------------------------------- + // -//----------------------------------------- + sal_Int32 SAL_CALL CPreviewAdapterImpl::getAvailableWidth() { return m_Preview->getAvailableWidth(); } -//----------------------------------------- + // -//----------------------------------------- + sal_Int32 SAL_CALL CPreviewAdapterImpl::getAvailableHeight() { return m_Preview->getAvailableHeight(); } -//----------------------------------------- + // -//----------------------------------------- + void SAL_CALL CPreviewAdapterImpl::setImage( sal_Int16 aImageFormat, const Any& aImage ) throw (IllegalArgumentException,RuntimeException) @@ -153,9 +153,9 @@ void SAL_CALL CPreviewAdapterImpl::setImage( sal_Int16 aImageFormat, const Any& m_Preview->setImage(aImageFormat,aImage); } -//----------------------------------------- + // -//----------------------------------------- + sal_Bool SAL_CALL CPreviewAdapterImpl::setShowState( sal_Bool bShowState ) { @@ -164,18 +164,18 @@ sal_Bool SAL_CALL CPreviewAdapterImpl::setShowState( sal_Bool bShowState ) return bRet; } -//----------------------------------------- + // -//----------------------------------------- + sal_Bool SAL_CALL CPreviewAdapterImpl::getShowState() { return m_Preview->getShowState(); } -//----------------------------------------- + // -//----------------------------------------- + void SAL_CALL CPreviewAdapterImpl::setParent(HWND parent) { @@ -185,18 +185,18 @@ void SAL_CALL CPreviewAdapterImpl::setParent(HWND parent) calcRightMargin(); } -//----------------------------------------- + // -//----------------------------------------- + HWND SAL_CALL CPreviewAdapterImpl::getParent() { return m_FileDialog; } -//----------------------------------------- + // -//----------------------------------------- + void SAL_CALL CPreviewAdapterImpl::calcRightMargin() { @@ -226,34 +226,34 @@ void SAL_CALL CPreviewAdapterImpl::calcRightMargin() m_RightMargin = rcFileDlg.right - rcFlb.right; } -//----------------------------------------- + // -//----------------------------------------- + void SAL_CALL CPreviewAdapterImpl::notifyParentShow(sal_Bool) { } -//----------------------------------------- + // -//----------------------------------------- + void SAL_CALL CPreviewAdapterImpl::notifyParentSizeChanged() { rearrangeLayout(); } -//----------------------------------------- + // -//----------------------------------------- + void SAL_CALL CPreviewAdapterImpl::notifyParentWindowPosChanged() { } -//----------------------------------------- + // -//----------------------------------------- + void SAL_CALL CPreviewAdapterImpl::rearrangeLayout() { @@ -346,9 +346,9 @@ void SAL_CALL CPreviewAdapterImpl::rearrangeLayout() } } -//----------------------------------------- + // -//----------------------------------------- + void SAL_CALL CPreviewAdapterImpl::initializeActivePreview() throw(std::runtime_error) { @@ -368,9 +368,9 @@ void SAL_CALL CPreviewAdapterImpl::initializeActivePreview() throw(std::runtime_ m_Preview->setImage(aImgFrmt,aImg); } -//----------------------------------------- + // -//----------------------------------------- + HWND SAL_CALL CPreviewAdapterImpl::findFileListbox() const { @@ -392,11 +392,11 @@ HWND SAL_CALL CPreviewAdapterImpl::findFileListbox() const //############################################################## -//-------------------------------------------- + // Implementation for Windows 95/NT/ME/2000/XP // because: // -//-------------------------------------------- + class CWin95NTPreviewAdapterImpl : public CPreviewAdapterImpl { @@ -406,18 +406,18 @@ public: virtual void SAL_CALL notifyParentShow(sal_Bool bShow); }; -//-------------------------------------------- + // -//-------------------------------------------- + CWin95NTPreviewAdapterImpl::CWin95NTPreviewAdapterImpl(HINSTANCE instance) : CPreviewAdapterImpl(instance) { } -//-------------------------------------------- + // -//-------------------------------------------- + void SAL_CALL CWin95NTPreviewAdapterImpl::notifyParentShow(sal_Bool bShow) { @@ -438,26 +438,26 @@ void SAL_CALL CWin95NTPreviewAdapterImpl::notifyParentShow(sal_Bool bShow) //############################################################## -//------------------------------- + // ctor -//------------------------------- + CPreviewAdapter::CPreviewAdapter(HINSTANCE instance) { m_pImpl.reset(new CWin95NTPreviewAdapterImpl(instance)); } -//------------------------------- + // -//------------------------------- + CPreviewAdapter::~CPreviewAdapter() { } -//------------------------------- + // -//------------------------------- + Sequence<sal_Int16> SAL_CALL CPreviewAdapter::getSupportedImageFormats() { @@ -466,36 +466,36 @@ Sequence<sal_Int16> SAL_CALL CPreviewAdapter::getSupportedImageFormats() return imgFormats; } -//------------------------------- + // -//------------------------------- + sal_Int32 SAL_CALL CPreviewAdapter::getTargetColorDepth() { return m_pImpl->getTargetColorDepth(); } -//------------------------------- + // -//------------------------------- + sal_Int32 SAL_CALL CPreviewAdapter::getAvailableWidth() { return m_pImpl->getAvailableWidth(); } -//------------------------------- + // -//------------------------------- + sal_Int32 SAL_CALL CPreviewAdapter::getAvailableHeight() { return m_pImpl->getAvailableHeight(); } -//------------------------------- + // -//------------------------------- + void SAL_CALL CPreviewAdapter::setImage( sal_Int16 aImageFormat, const Any& aImage ) throw (IllegalArgumentException, RuntimeException) @@ -503,54 +503,54 @@ void SAL_CALL CPreviewAdapter::setImage( sal_Int16 aImageFormat, const Any& aIma m_pImpl->setImage(aImageFormat,aImage); } -//------------------------------- + // -//------------------------------- + sal_Bool SAL_CALL CPreviewAdapter::setShowState( sal_Bool bShowState ) { return m_pImpl->setShowState(bShowState); } -//------------------------------- + // -//------------------------------- + sal_Bool SAL_CALL CPreviewAdapter::getShowState() { return m_pImpl->getShowState(); } -//------------------------------- + // -//------------------------------- + void SAL_CALL CPreviewAdapter::setParent(HWND parent) { m_pImpl->setParent(parent); } -//------------------------------- + // -//------------------------------- + void SAL_CALL CPreviewAdapter::notifyParentShow(bool bShow) { m_pImpl->notifyParentShow(bShow); } -//------------------------------- + // -//------------------------------- + void SAL_CALL CPreviewAdapter::notifyParentSizeChanged() { m_pImpl->notifyParentSizeChanged(); } -//------------------------------- + // -//------------------------------- + void SAL_CALL CPreviewAdapter::notifyParentWindowPosChanged() { diff --git a/fpicker/source/win32/filepicker/previewbase.cxx b/fpicker/source/win32/filepicker/previewbase.cxx index e20b7b0c9e6f..97f5b7d4974f 100644 --- a/fpicker/source/win32/filepicker/previewbase.cxx +++ b/fpicker/source/win32/filepicker/previewbase.cxx @@ -25,9 +25,9 @@ using namespace com::sun::star::uno; using namespace com::sun::star::lang; -//------------------------------- + // -//------------------------------- + PreviewBase::PreviewBase() : m_ImageFormat(::com::sun::star::ui::dialogs::FilePreviewImageFormats::BITMAP), @@ -35,44 +35,44 @@ PreviewBase::PreviewBase() : { } -//------------------------------- + // -//------------------------------- + PreviewBase::~PreviewBase() { } -//------------------------------- + // -//------------------------------- + sal_Int32 SAL_CALL PreviewBase::getTargetColorDepth() throw (RuntimeException) { return 0; } -//------------------------------- + // -//------------------------------- + sal_Int32 SAL_CALL PreviewBase::getAvailableWidth() throw (RuntimeException) { return 0; } -//------------------------------- + // -//------------------------------- + sal_Int32 SAL_CALL PreviewBase::getAvailableHeight() throw (RuntimeException) { return 0; } -//------------------------------- + // -//------------------------------- + void SAL_CALL PreviewBase::setImage( sal_Int16 aImageFormat, const ::com::sun::star::uno::Any& aImage ) throw (IllegalArgumentException, RuntimeException) @@ -90,9 +90,9 @@ void SAL_CALL PreviewBase::setImage( sal_Int16 aImageFormat, const ::com::sun::s m_ImageFormat = aImageFormat; } -//------------------------------- + // -//------------------------------- + void SAL_CALL PreviewBase::getImage(sal_Int16& aImageFormat,com::sun::star::uno::Any& aImage) { @@ -100,9 +100,9 @@ void SAL_CALL PreviewBase::getImage(sal_Int16& aImageFormat,com::sun::star::uno: aImage = m_ImageData; } -//------------------------------- + // -//------------------------------- + sal_Bool SAL_CALL PreviewBase::setShowState( sal_Bool bShowState ) throw (RuntimeException) { @@ -110,27 +110,27 @@ sal_Bool SAL_CALL PreviewBase::setShowState( sal_Bool bShowState ) throw (Runtim return sal_True; } -//------------------------------- + // -//------------------------------- + sal_Bool SAL_CALL PreviewBase::getShowState() throw (RuntimeException) { return sal_False; } -//------------------------------- + // -//------------------------------- + sal_Bool SAL_CALL PreviewBase::getImaginaryShowState() const { return m_bShowState; } -//------------------------------- + // -//------------------------------- + HWND SAL_CALL PreviewBase::getWindowHandle() const { diff --git a/fpicker/source/win32/filepicker/workbench/Test_fps.cxx b/fpicker/source/win32/filepicker/workbench/Test_fps.cxx index 9fa5112a8b6d..ed3838b70283 100644 --- a/fpicker/source/win32/filepicker/workbench/Test_fps.cxx +++ b/fpicker/source/win32/filepicker/workbench/Test_fps.cxx @@ -70,17 +70,17 @@ void TestFilterManager( Reference< XFilePicker > xFilePicker ); #define RDB_SYSPATH "D:\\Projects\\gsl\\sysui\\wntmsci7\\bin\\applicat.rdb" -//_________________________________________________________________________________________________________________________ + // global variables -//_________________________________________________________________________________________________________________________ + Reference< XMultiServiceFactory > g_xFactory; const OUString BMP_EXTENSION( "bmp" ); -//------------------------------------------------------------------------------------------------------------------------- + // a test client -//------------------------------------------------------------------------------------------------------------------------- + class FilePickerListener : public WeakImplHelper1< XFilePickerListener > { @@ -230,18 +230,18 @@ void SAL_CALL FilePickerListener::dialogSizeChanged( ) { } -//-------------------------------------------------------- + // main -//-------------------------------------------------------- + int SAL_CALL main(int nArgc, char* Argv[], char* Env[] ) { printf("Starting test of FPS-Service\n"); - //------------------------------------------------- + // get the global service-manager - //------------------------------------------------- + // Get global factory for uno services. OUString rdbName = OUString( RDB_SYSPATH ); @@ -254,9 +254,9 @@ int SAL_CALL main(int nArgc, char* Argv[], char* Env[] ) return(-1); } - //------------------------------------------------- + // try to get an Interface to a XFilePicker Service - //------------------------------------------------- + Sequence< Any > arguments(1); arguments[0] = makeAny( FILEOPEN_READONLY_VERSION ); @@ -331,9 +331,9 @@ int SAL_CALL main(int nArgc, char* Argv[], char* Env[] ) if ( xFPNotifier.is( ) ) xFPNotifier->removeFilePickerListener( xFPListener ); - //-------------------------------------------------- + // shutdown - //-------------------------------------------------- + // Cast factory to XComponent Reference< XComponent > xComponent( g_xFactory, UNO_QUERY ); diff --git a/fpicker/source/win32/folderpicker/FolderPicker.cxx b/fpicker/source/win32/folderpicker/FolderPicker.cxx index 7619e0d99d1b..58adeeed1cc2 100644 --- a/fpicker/source/win32/folderpicker/FolderPicker.cxx +++ b/fpicker/source/win32/folderpicker/FolderPicker.cxx @@ -24,9 +24,9 @@ #include <cppuhelper/supportsservice.hxx> #include "WinFOPImpl.hxx" -//------------------------------------------------------------------------ + // namespace directives -//------------------------------------------------------------------------ + using com::sun::star::uno::Reference; using com::sun::star::uno::RuntimeException; @@ -43,9 +43,9 @@ using namespace com::sun::star::ui::dialogs; #define FOLDERPICKER_IMPL_NAME "com.sun.star.ui.dialogs.Win32FolderPicker" -//------------------------------------------------------------------------ + // helper functions -//------------------------------------------------------------------------ + namespace { @@ -57,9 +57,9 @@ namespace } } -//----------------------------------------------------------------------------------------- + // -//----------------------------------------------------------------------------------------- + CFolderPicker::CFolderPicker( const Reference< XMultiServiceFactory >& xServiceMgr ) : m_xServiceMgr( xServiceMgr ) @@ -67,9 +67,9 @@ CFolderPicker::CFolderPicker( const Reference< XMultiServiceFactory >& xServiceM m_pFolderPickerImpl = std::auto_ptr< CWinFolderPickerImpl > ( new CWinFolderPickerImpl( this ) ); } -//----------------------------------------------------------------------------------------- + // -//----------------------------------------------------------------------------------------- + void SAL_CALL CFolderPicker::setTitle( const OUString& aTitle ) throw( RuntimeException ) { @@ -78,9 +78,9 @@ void SAL_CALL CFolderPicker::setTitle( const OUString& aTitle ) throw( RuntimeEx m_pFolderPickerImpl->setTitle( aTitle ); } -//----------------------------------------------------------------------------------------- + // -//----------------------------------------------------------------------------------------- + void SAL_CALL CFolderPicker::setDisplayDirectory( const OUString& aDirectory ) throw( IllegalArgumentException, RuntimeException ) @@ -90,9 +90,9 @@ void SAL_CALL CFolderPicker::setDisplayDirectory( const OUString& aDirectory ) m_pFolderPickerImpl->setDisplayDirectory( aDirectory ); } -//----------------------------------------------------------------------------------------- + // -//----------------------------------------------------------------------------------------- + OUString SAL_CALL CFolderPicker::getDisplayDirectory( ) throw( RuntimeException ) @@ -102,9 +102,9 @@ OUString SAL_CALL CFolderPicker::getDisplayDirectory( ) return m_pFolderPickerImpl->getDisplayDirectory( ); } -//----------------------------------------------------------------------------------------- + // -//----------------------------------------------------------------------------------------- + OUString SAL_CALL CFolderPicker::getDirectory( ) throw( RuntimeException ) { @@ -113,9 +113,9 @@ OUString SAL_CALL CFolderPicker::getDirectory( ) throw( RuntimeException ) return m_pFolderPickerImpl->getDirectory( ); } -//----------------------------------------------------------------------------------------- + // -//----------------------------------------------------------------------------------------- + void SAL_CALL CFolderPicker::setDescription( const OUString& aDescription ) throw( RuntimeException ) { @@ -124,9 +124,9 @@ void SAL_CALL CFolderPicker::setDescription( const OUString& aDescription ) thro m_pFolderPickerImpl->setDescription( aDescription ); } -//----------------------------------------------------------------------------------------- + // -//----------------------------------------------------------------------------------------- + sal_Int16 SAL_CALL CFolderPicker::execute( ) throw( RuntimeException ) @@ -140,9 +140,9 @@ sal_Int16 SAL_CALL CFolderPicker::execute( ) return m_pFolderPickerImpl->execute( ); } -// ------------------------------------------------- + // XServiceInfo -// ------------------------------------------------- + OUString SAL_CALL CFolderPicker::getImplementationName( ) throw( RuntimeException ) @@ -157,9 +157,9 @@ sal_Bool SAL_CALL CFolderPicker::supportsService( const OUString& ServiceName ) return cppu::supportsService(this, ServiceName); } -// ------------------------------------------------- + // XServiceInfo -// ------------------------------------------------- + Sequence< OUString > SAL_CALL CFolderPicker::getSupportedServiceNames( ) throw( RuntimeException ) @@ -167,9 +167,9 @@ Sequence< OUString > SAL_CALL CFolderPicker::getSupportedServiceNames( ) return FolderPicker_getSupportedServiceNames(); } -// ------------------------------------------------- + // XCancellable -// ------------------------------------------------- + void SAL_CALL CFolderPicker::cancel( ) throw(RuntimeException) @@ -179,10 +179,10 @@ void SAL_CALL CFolderPicker::cancel( ) m_pFolderPickerImpl->cancel( ); } -//------------------------------------------------ + // overwrite base class method, which is called // by base class dispose function -//------------------------------------------------ + void SAL_CALL CFolderPicker::disposing() { diff --git a/fpicker/source/win32/folderpicker/MtaFop.cxx b/fpicker/source/win32/folderpicker/MtaFop.cxx index c45519009e0a..4ceee8c661a3 100644 --- a/fpicker/source/win32/folderpicker/MtaFop.cxx +++ b/fpicker/source/win32/folderpicker/MtaFop.cxx @@ -71,10 +71,10 @@ namespace CloseHandle( aRequestContext->hEvent ); } - //------------------------------- + // Determine if current thread is // an MTA or STA thread - //------------------------------- + bool IsMTA() { HRESULT hr = CoInitialize(NULL); @@ -89,17 +89,17 @@ namespace } } -//---------------------------------------------------------------- + // static member initialization -//---------------------------------------------------------------- + ATOM CMtaFolderPicker::s_ClassAtom = 0; osl::Mutex CMtaFolderPicker::s_Mutex; sal_Int32 CMtaFolderPicker::s_StaRequestWndRegisterCount = 0; -//-------------------------------------------------------------------- + // ctor -//-------------------------------------------------------------------- + CMtaFolderPicker::CMtaFolderPicker( sal_uInt32 Flags ) : m_hStaThread( NULL ), @@ -139,7 +139,7 @@ CMtaFolderPicker::CMtaFolderPicker( sal_uInt32 Flags ) : m_bi.lpfn = CMtaFolderPicker::FolderPickerCallback; m_bi.lParam = reinterpret_cast< LPARAM >( this ); - //--------------------------------------- + // read the default strings for title and // description from a resource file @@ -172,9 +172,9 @@ CMtaFolderPicker::CMtaFolderPicker( sal_uInt32 Flags ) : OSL_ASSERT( m_hEvtThrdReady ); } -//-------------------------------------------------------------------- + // dtor -//-------------------------------------------------------------------- + CMtaFolderPicker::~CMtaFolderPicker( ) { @@ -225,9 +225,9 @@ CMtaFolderPicker::~CMtaFolderPicker( ) } } -//-------------------------------------------------------------------- + // -//-------------------------------------------------------------------- + sal_Bool CMtaFolderPicker::browseForFolder( ) { @@ -309,63 +309,63 @@ sal_Bool CMtaFolderPicker::browseForFolder( ) return bRet; } -//-------------------------------------------------------------------- + // -//-------------------------------------------------------------------- + void SAL_CALL CMtaFolderPicker::setDisplayDirectory( const OUString& aDirectory ) { m_displayDir = aDirectory; } -//-------------------------------------------------------------------- + // -//-------------------------------------------------------------------- + OUString SAL_CALL CMtaFolderPicker::getDisplayDirectory( ) { return m_displayDir; } -//-------------------------------------------------------------------- + // -//-------------------------------------------------------------------- + OUString SAL_CALL CMtaFolderPicker::getDirectory( ) { return m_SelectedDir; } -//-------------------------------------------------------------------- + // -//-------------------------------------------------------------------- + void SAL_CALL CMtaFolderPicker::setDescription( const OUString& aDescription ) { m_Description = aDescription; } -//-------------------------------------------------------------------- + // -//-------------------------------------------------------------------- + void SAL_CALL CMtaFolderPicker::setTitle( const OUString& aTitle ) { m_dialogTitle = aTitle; } -//-------------------------------------------------------------------- + // -//-------------------------------------------------------------------- + OUString SAL_CALL CMtaFolderPicker::getTitle( ) { return m_dialogTitle; } -//----------------------------------------------------- + // XCancellable -//----------------------------------------------------- + void SAL_CALL CMtaFolderPicker::cancel( ) { @@ -381,9 +381,9 @@ void SAL_CALL CMtaFolderPicker::cancel( ) } } -//-------------------------------------------------------------------- + // -//-------------------------------------------------------------------- + sal_Bool SAL_CALL CMtaFolderPicker::onBrowseForFolder( ) { @@ -409,9 +409,9 @@ sal_Bool SAL_CALL CMtaFolderPicker::onBrowseForFolder( ) return bRet; } -//-------------------------------------------------------------------- + // -//-------------------------------------------------------------------- + void SAL_CALL CMtaFolderPicker::releaseItemIdList( LPITEMIDLIST lpItemIdList ) { @@ -424,9 +424,9 @@ void SAL_CALL CMtaFolderPicker::releaseItemIdList( LPITEMIDLIST lpItemIdList ) } } -//-------------------------------------------------------------------- + // -//-------------------------------------------------------------------- + LPITEMIDLIST SAL_CALL CMtaFolderPicker::getItemIdListFromPath( const OUString& aDirectory ) { @@ -453,9 +453,9 @@ LPITEMIDLIST SAL_CALL CMtaFolderPicker::getItemIdListFromPath( const OUString& a return lpItemIdList; } -//-------------------------------------------------------------------- + // -//-------------------------------------------------------------------- + OUString SAL_CALL CMtaFolderPicker::getPathFromItemIdList( LPCITEMIDLIST lpItemIdList ) { @@ -471,9 +471,9 @@ OUString SAL_CALL CMtaFolderPicker::getPathFromItemIdList( LPCITEMIDLIST lpItemI return path; } -//-------------------------------------------------------------------- + // -//-------------------------------------------------------------------- + void SAL_CALL CMtaFolderPicker::enableOk( sal_Bool bEnable ) { @@ -486,9 +486,9 @@ void SAL_CALL CMtaFolderPicker::enableOk( sal_Bool bEnable ) static_cast< LPARAM >( bEnable ) ); } -//-------------------------------------------------------------------- + // -//-------------------------------------------------------------------- + void SAL_CALL CMtaFolderPicker::setSelection( const OUString& aDirectory ) { @@ -501,9 +501,9 @@ void SAL_CALL CMtaFolderPicker::setSelection( const OUString& aDirectory ) reinterpret_cast< LPARAM >( aDirectory.getStr( ) ) ); } -//-------------------------------------------------------------------- + // -//-------------------------------------------------------------------- + void SAL_CALL CMtaFolderPicker::setStatusText( const OUString& aStatusText ) { @@ -516,9 +516,9 @@ void SAL_CALL CMtaFolderPicker::setStatusText( const OUString& aStatusText ) reinterpret_cast< LPARAM >( aStatusText.getStr( ) ) ); } -//-------------------------------------------------------------------- + // -//-------------------------------------------------------------------- + void SAL_CALL CMtaFolderPicker::onInitialized( ) { @@ -536,9 +536,9 @@ void SAL_CALL CMtaFolderPicker::onInitialized( ) } } -//-------------------------------------------------------------------- + // -//-------------------------------------------------------------------- + sal_uInt32 CMtaFolderPicker::onValidateFailed() { @@ -546,9 +546,9 @@ sal_uInt32 CMtaFolderPicker::onValidateFailed() return 1; } -//-------------------------------------------------------------------- + // -//-------------------------------------------------------------------- + int CALLBACK CMtaFolderPicker::FolderPickerCallback( HWND hwnd, UINT uMsg, LPARAM lParam, LPARAM lpData ) { @@ -583,9 +583,9 @@ int CALLBACK CMtaFolderPicker::FolderPickerCallback( HWND hwnd, UINT uMsg, LPARA return nRC; } -//-------------------------------------------------------------------- + // the window proc -//-------------------------------------------------------------------- + LRESULT CALLBACK CMtaFolderPicker::StaWndProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam ) { @@ -657,9 +657,9 @@ LRESULT CALLBACK CMtaFolderPicker::StaWndProc( HWND hWnd, UINT uMsg, WPARAM wPar return lResult; } -//-------------------------------------------------------------------- + // -//-------------------------------------------------------------------- + sal_Bool SAL_CALL CMtaFolderPicker::createStaRequestWindow( ) { @@ -688,9 +688,9 @@ sal_Bool SAL_CALL CMtaFolderPicker::createStaRequestWindow( ) return bIsWnd; } -//-------------------------------------------------------------------- + // -//-------------------------------------------------------------------- + unsigned int CMtaFolderPicker::run( ) { @@ -732,9 +732,9 @@ unsigned int CMtaFolderPicker::run( ) return nRet; } -//-------------------------------------------------------------------- + // -//-------------------------------------------------------------------- + unsigned int WINAPI CMtaFolderPicker::StaThreadProc( LPVOID pParam ) { @@ -753,9 +753,9 @@ unsigned int WINAPI CMtaFolderPicker::StaThreadProc( LPVOID pParam ) return result; } -//--------------------------------------------------- + // -//--------------------------------------------------- + ATOM SAL_CALL CMtaFolderPicker::RegisterStaRequestWindowClass( ) { @@ -793,9 +793,9 @@ ATOM SAL_CALL CMtaFolderPicker::RegisterStaRequestWindowClass( ) return s_ClassAtom; } -//--------------------------------------------------- + // -//--------------------------------------------------- + void SAL_CALL CMtaFolderPicker::UnregisterStaRequestWindowClass( ) { diff --git a/fpicker/source/win32/folderpicker/WinFOPImpl.cxx b/fpicker/source/win32/folderpicker/WinFOPImpl.cxx index 9cf282aa48d7..578cd1de09d8 100644 --- a/fpicker/source/win32/folderpicker/WinFOPImpl.cxx +++ b/fpicker/source/win32/folderpicker/WinFOPImpl.cxx @@ -26,9 +26,9 @@ #include <osl/file.hxx> #include "FolderPicker.hxx" -//------------------------------------------------------------------------ + // namespace directives -//------------------------------------------------------------------------ + using com::sun::star::uno::RuntimeException; using com::sun::star::lang::IllegalArgumentException; @@ -37,15 +37,15 @@ using com::sun::star::lang::EventObject; using namespace com::sun::star::ui::dialogs; using osl::FileBase; -//------------------------------------------------------------------------ + // -//------------------------------------------------------------------------ + const OUString BACKSLASH( "\\" ); -//------------------------------------------------------------------------ + // ctor -//------------------------------------------------------------------------ + CWinFolderPickerImpl::CWinFolderPickerImpl( CFolderPicker* aFolderPicker ) : CMtaFolderPicker( BIF_RETURNONLYFSDIRS | BIF_RETURNFSANCESTORS | BIF_EDITBOX | BIF_VALIDATE ), @@ -54,14 +54,14 @@ CWinFolderPickerImpl::CWinFolderPickerImpl( CFolderPicker* aFolderPicker ) : { } -//------------------------------------------------------------------------ + // get directory in URL format, convert it to system format and set the // member variable // If the given URL for the directory is invalid the function throws an // IllegalArgumentException // If the specified path is well formed but invalid for the underlying // OS the FolderPicker starts in the root of the file system hierarchie -//------------------------------------------------------------------------ + void SAL_CALL CWinFolderPickerImpl::setDisplayDirectory( const OUString& aDirectory ) throw( IllegalArgumentException, RuntimeException ) @@ -95,9 +95,9 @@ void SAL_CALL CWinFolderPickerImpl::setDisplayDirectory( const OUString& aDirect CMtaFolderPicker::setDisplayDirectory( sysDir ); } -//------------------------------------------------------------------------ + // we return the directory in URL format -//------------------------------------------------------------------------ + OUString CWinFolderPickerImpl::getDisplayDirectory( ) throw( RuntimeException ) @@ -112,9 +112,9 @@ OUString CWinFolderPickerImpl::getDisplayDirectory( ) return displayDirectoryURL; } -//------------------------------------------------------------------------ + // -//------------------------------------------------------------------------ + OUString SAL_CALL CWinFolderPickerImpl::getDirectory( ) throw( RuntimeException ) { @@ -127,9 +127,9 @@ OUString SAL_CALL CWinFolderPickerImpl::getDirectory( ) throw( RuntimeException return dirURL; } -//------------------------------------------------------------------------ + // -//------------------------------------------------------------------------ + sal_Int16 SAL_CALL CWinFolderPickerImpl::execute( ) throw( RuntimeException ) { @@ -138,9 +138,9 @@ sal_Int16 SAL_CALL CWinFolderPickerImpl::execute( ) throw( RuntimeException ) ::com::sun::star::ui::dialogs::ExecutableDialogResults::CANCEL; } -//--------------------------------------------------------------------- + // -//--------------------------------------------------------------------- + void CWinFolderPickerImpl::onSelChanged( const OUString& aNewPath ) { diff --git a/fpicker/source/win32/folderpicker/workbench/Test_fops.cxx b/fpicker/source/win32/folderpicker/workbench/Test_fops.cxx index fddb157d4058..6dc141a20157 100644 --- a/fpicker/source/win32/folderpicker/workbench/Test_fops.cxx +++ b/fpicker/source/win32/folderpicker/workbench/Test_fops.cxx @@ -40,9 +40,9 @@ #include <windows.h> -//-------------------------------------------------------------- + // namesapces -//-------------------------------------------------------------- + using namespace ::rtl ; using namespace ::cppu ; @@ -53,15 +53,15 @@ using namespace std ; #define RDB_SYSPATH "D:\\Projects\\gsl\\sysui\\wntmsci7\\bin\\applicat.rdb" -//-------------------------------------------------------------- + // global variables -//-------------------------------------------------------------- + Reference< XMultiServiceFactory > g_xFactory; -//-------------------------------------------------------------- + // main -//-------------------------------------------------------------- + int SAL_CALL main(int /*nArgc*/, char* /*Argv[]*/, char* /*Env[]*/ ) @@ -72,9 +72,9 @@ int SAL_CALL main(int /*nArgc*/, char* /*Argv[]*/, char* /*Env[]*/ ) //CreateDeepDirectory( ); - //------------------------------------------------- + // get the global service-manager - //------------------------------------------------- + // Get global factory for uno services. OUString rdbName = OUString( RDB_SYSPATH ); @@ -89,9 +89,9 @@ int SAL_CALL main(int /*nArgc*/, char* /*Argv[]*/, char* /*Env[]*/ ) printf("Creating RegistryServiceFactory successful\n"); - //------------------------------------------------- + // try to get an Interface to a XFilePicker Service - //------------------------------------------------- + Reference< XFolderPicker2 > xFolderPicker; @@ -124,9 +124,9 @@ int SAL_CALL main(int /*nArgc*/, char* /*Argv[]*/, char* /*Env[]*/ ) MessageBox( NULL, "Exception caught!", "Error", MB_OK ); } - //-------------------------------------------------- + // shutdown - //-------------------------------------------------- + // Cast factory to XComponent Reference< XComponent > xComponent( g_xFactory, UNO_QUERY ); diff --git a/fpicker/source/win32/misc/WinImplHelper.cxx b/fpicker/source/win32/misc/WinImplHelper.cxx index c07a6752efa9..a00f8ff17ce4 100644 --- a/fpicker/source/win32/misc/WinImplHelper.cxx +++ b/fpicker/source/win32/misc/WinImplHelper.cxx @@ -24,9 +24,9 @@ #include <rtl/ustrbuf.hxx> #include <com/sun/star/uno/Sequence.hxx> -//------------------------------------------------------------ + // namespace directives -//------------------------------------------------------------ + using ::com::sun::star::lang::IllegalArgumentException; using ::com::sun::star::uno::Reference; @@ -34,16 +34,16 @@ using ::com::sun::star::uno::XInterface; using ::com::sun::star::uno::Any; using ::com::sun::star::uno::Sequence; -//------------------------------------------------------------ + // -//------------------------------------------------------------ + const OUString TILDE( "~" ); const sal_Unicode TILDE_SIGN = L'~'; const OUString AMPERSAND( "&" ); const sal_Unicode AMPERSAND_SIGN = L'&'; -//------------------------------------------------------------ + // OS NAME Platform Major Minor // // Windows NT 3.51 VER_PLATFORM_WIN32_NT 3 51 @@ -55,11 +55,11 @@ const sal_Unicode AMPERSAND_SIGN = L'&'; // Windows 95 VER_PLATFORM_WIN32_WINDOWS 4 0 // Windows 98 VER_PLATFORM_WIN32_WINDOWS 4 10 // Windows ME VER_PLATFORM_WIN32_WINDOWS 4 90 -//------------------------------------------------------------ -//------------------------------------------------------------ + + // determine if we are running under Vista or newer OS -//------------------------------------------------------------ + bool SAL_CALL IsWindowsVistaOrNewer() { @@ -79,9 +79,9 @@ bool SAL_CALL IsWindowsVistaOrNewer() return bRet; } -//------------------------------------------------------------ + // -//------------------------------------------------------------ + void SAL_CALL ListboxAddString( HWND hwnd, const OUString& aString ) { @@ -91,9 +91,9 @@ void SAL_CALL ListboxAddString( HWND hwnd, const OUString& aString ) OSL_ASSERT( (CB_ERR != rc) && (CB_ERRSPACE != rc) ); } -//------------------------------------------------------------ + // -//------------------------------------------------------------ + OUString SAL_CALL ListboxGetString( HWND hwnd, sal_Int32 aPosition ) { @@ -126,9 +126,9 @@ OUString SAL_CALL ListboxGetString( HWND hwnd, sal_Int32 aPosition ) return aString; } -//------------------------------------------------------------ + // -//------------------------------------------------------------ + void SAL_CALL ListboxAddItem( HWND hwnd, const Any& aItem, const Reference< XInterface >& rXInterface, sal_Int16 aArgPos ) throw( IllegalArgumentException ) @@ -148,9 +148,9 @@ void SAL_CALL ListboxAddItem( HWND hwnd, const Any& aItem, const Reference< XInt ListboxAddString( hwnd, cbItem ); } -//------------------------------------------------------------ + // -//------------------------------------------------------------ + void SAL_CALL ListboxAddItems( HWND hwnd, const Any& aItemList, const Reference< XInterface >& rXInterface, sal_Int16 aArgPos ) throw( IllegalArgumentException ) @@ -174,9 +174,9 @@ void SAL_CALL ListboxAddItems( HWND hwnd, const Any& aItemList, const Reference< } } -//------------------------------------------------------------ + // -//------------------------------------------------------------ + void SAL_CALL ListboxDeleteItem( HWND hwnd, const Any& aPosition, const Reference< XInterface >& rXInterface, sal_Int16 aArgPos ) throw( IllegalArgumentException ) @@ -206,9 +206,9 @@ void SAL_CALL ListboxDeleteItem( HWND hwnd, const Any& aPosition, const Referenc aArgPos ); } -//------------------------------------------------------------ + // -//------------------------------------------------------------ + void SAL_CALL ListboxDeleteItems( HWND hwnd, const Any&, const Reference< XInterface >&, sal_Int16 ) throw( IllegalArgumentException ) @@ -226,9 +226,9 @@ void SAL_CALL ListboxDeleteItems( HWND hwnd, const Any&, const Reference< XInter while ( (lRet != CB_ERR) && (lRet > 0) ); } -//------------------------------------------------------------ + // -//------------------------------------------------------------ + void SAL_CALL ListboxSetSelectedItem( HWND hwnd, const Any& aPosition, const Reference< XInterface >& rXInterface, sal_Int16 aArgPos ) throw( IllegalArgumentException ) @@ -262,9 +262,9 @@ void SAL_CALL ListboxSetSelectedItem( HWND hwnd, const Any& aPosition, const Ref aArgPos ); } -//------------------------------------------------------------ + // -//------------------------------------------------------------ + Any SAL_CALL ListboxGetItems( HWND hwnd ) { @@ -290,9 +290,9 @@ Any SAL_CALL ListboxGetItems( HWND hwnd ) return aAny; } -//------------------------------------------------------------ + // -//------------------------------------------------------------ + Any SAL_CALL ListboxGetSelectedItem( HWND hwnd ) { @@ -306,9 +306,9 @@ Any SAL_CALL ListboxGetSelectedItem( HWND hwnd ) return aAny; } -//------------------------------------------------------------ + // -//------------------------------------------------------------ + Any SAL_CALL ListboxGetSelectedItemIndex( HWND hwnd ) { @@ -322,9 +322,9 @@ Any SAL_CALL ListboxGetSelectedItemIndex( HWND hwnd ) return aAny; } -//------------------------------------------------------------ + // -//------------------------------------------------------------ + Any SAL_CALL CheckboxGetState( HWND hwnd ) { @@ -337,9 +337,9 @@ Any SAL_CALL CheckboxGetState( HWND hwnd ) return aAny; } -//------------------------------------------------------------ + // -//------------------------------------------------------------ + void SAL_CALL CheckboxSetState( HWND hwnd, const ::com::sun::star::uno::Any& aState, const Reference< XInterface >& rXInterface, sal_Int16 aArgPos ) @@ -359,9 +359,9 @@ void SAL_CALL CheckboxSetState( SendMessageW( hwnd, BM_SETCHECK, wParam, 0 ); } -//------------------------------------------------------------ + // -//------------------------------------------------------------ + sal_uInt32 SAL_CALL _wcslenex( const sal_Unicode* pStr ) { @@ -379,9 +379,9 @@ sal_uInt32 SAL_CALL _wcslenex( const sal_Unicode* pStr ) return strLen; } -//------------------------------------------------------------ + // -//------------------------------------------------------------ + void Replace( const OUString& aLabel, sal_Unicode OldChar, sal_Unicode NewChar, OUStringBuffer& aBuffer ) { @@ -437,14 +437,14 @@ void Replace( const OUString& aLabel, sal_Unicode OldChar, sal_Unicode NewChar, } } -//------------------------------------------------------------ + // converts a soffice label to a windows label // the following rules for character replacements // will be done: // '~' -> '&' // '~~' -> '~' // '&' -> '&&' -//------------------------------------------------------------ + OUString SOfficeToWindowsLabel( const OUString& aSOLabel ) { @@ -468,14 +468,14 @@ OUString SOfficeToWindowsLabel( const OUString& aSOLabel ) return aWinLabel; } -//------------------------------------------------------------ + // converts a windows label to a soffice label // the following rules for character replacements // will be done: // '&' -> '~' // '&&' -> '&' // '~' -> '~~' -//------------------------------------------------------------ + OUString WindowsToSOfficeLabel( const OUString& aWinLabel ) { diff --git a/fpicker/source/win32/misc/resourceprovider.cxx b/fpicker/source/win32/misc/resourceprovider.cxx index b700fbd370f8..e5063b5d2e38 100644 --- a/fpicker/source/win32/misc/resourceprovider.cxx +++ b/fpicker/source/win32/misc/resourceprovider.cxx @@ -29,23 +29,23 @@ #include <com/sun/star/ui/dialogs/CommonFilePickerElementIds.hpp> #include <com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp> -//------------------------------------------------------------ + // namespace directives -//------------------------------------------------------------ + using namespace ::com::sun::star::ui::dialogs::ExtendedFilePickerElementIds; using namespace ::com::sun::star::ui::dialogs::CommonFilePickerElementIds; -//------------------------------------------------------------ + // -//------------------------------------------------------------ + #define FOLDERPICKER_TITLE 500 #define FOLDER_PICKER_DEF_DESCRIPTION 501 -//------------------------------------------------------------ + // we have to translate control ids to resource ids -//------------------------------------------------------------ + struct _Entry { @@ -71,9 +71,9 @@ _Entry CtrlIdToResIdTable[] = { const sal_Int32 SIZE_TABLE = SAL_N_ELEMENTS( CtrlIdToResIdTable ); -//------------------------------------------------------------ + // -//------------------------------------------------------------ + sal_Int16 CtrlIdToResId( sal_Int32 aControlId ) { @@ -91,17 +91,17 @@ sal_Int16 CtrlIdToResId( sal_Int32 aControlId ) return aResId; } -//------------------------------------------------------------ + // -//------------------------------------------------------------ + class CResourceProvider_Impl { public: - //------------------------------------- + // - //------------------------------------- + CResourceProvider_Impl( ) { @@ -110,18 +110,18 @@ public: "fps_office", Application::GetSettings().GetUILanguageTag()); } - //------------------------------------- + // - //------------------------------------- + ~CResourceProvider_Impl( ) { delete m_ResMgr; } - //------------------------------------- + // - //------------------------------------- + OUString getResString( sal_Int16 aId ) { @@ -148,27 +148,27 @@ public: SimpleResMgr* m_ResMgr; }; -//------------------------------------------------------------ + // -//------------------------------------------------------------ + CResourceProvider::CResourceProvider( ) : m_pImpl( new CResourceProvider_Impl() ) { } -//------------------------------------------------------------ + // -//------------------------------------------------------------ + CResourceProvider::~CResourceProvider( ) { delete m_pImpl; } -//------------------------------------------------------------ + // -//------------------------------------------------------------ + OUString CResourceProvider::getResString( sal_Int16 aId ) { diff --git a/fpicker/test/svdem.cxx b/fpicker/test/svdem.cxx index aa6538663f04..b4127c212cf6 100644 --- a/fpicker/test/svdem.cxx +++ b/fpicker/test/svdem.cxx @@ -56,14 +56,14 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; -// ----------------------------------------------------------------------- + // Forward declaration void Main(); String aEmptyStr; -// ----------------------------------------------------------------------- + SAL_IMPLEMENT_MAIN() { @@ -85,7 +85,7 @@ SAL_IMPLEMENT_MAIN() return 0; } -// ----------------------------------------------------------------------- + class MyWin : public WorkWindow { @@ -107,7 +107,7 @@ private: }; -// ----------------------------------------------------------------------- + void Main() { @@ -118,7 +118,7 @@ void Main() Application::Execute(); } -// ----------------------------------------------------------------------- + MyWin::MyWin( Window* pParent, WinBits nWinStyle ) :WorkWindow( pParent, nWinStyle ) @@ -129,56 +129,56 @@ MyWin::MyWin( Window* pParent, WinBits nWinStyle ) aOKBtn.Show(); } -// ----------------------------------------------------------------------- + void MyWin::MouseMove( const MouseEvent& rMEvt ) { WorkWindow::MouseMove( rMEvt ); } -// ----------------------------------------------------------------------- + void MyWin::MouseButtonDown( const MouseEvent& rMEvt ) { WorkWindow::MouseButtonDown( rMEvt ); } -// ----------------------------------------------------------------------- + void MyWin::MouseButtonUp( const MouseEvent& rMEvt ) { WorkWindow::MouseButtonUp( rMEvt ); } -// ----------------------------------------------------------------------- + void MyWin::KeyInput( const KeyEvent& rKEvt ) { WorkWindow::KeyInput( rKEvt ); } -// ----------------------------------------------------------------------- + void MyWin::KeyUp( const KeyEvent& rKEvt ) { WorkWindow::KeyUp( rKEvt ); } -// ----------------------------------------------------------------------- + void MyWin::Paint( const Rectangle& rRect ) { WorkWindow::Paint( rRect ); } -// ----------------------------------------------------------------------- + void MyWin::Resize() { WorkWindow::Resize(); } -// ----------------------------------------------------------------------- + IMPL_LINK( MyWin, Test, PushButton*, pBtn ) { |