diff options
Diffstat (limited to 'fpicker/source/win32/filepicker')
24 files changed, 857 insertions, 857 deletions
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 ); |