diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2008-06-06 15:30:09 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2008-06-06 15:30:09 +0000 |
commit | 6ab9136e04486755b9fc4fc2d760aaa51b7a37a8 (patch) | |
tree | 17157472f8feed420ee9f40f554aa50b19b59d0a /fpicker | |
parent | e49c1096e69954440772760c56167da5892d6cd3 (diff) |
INTEGRATION: CWS mingwport13 (1.3.6); FILE MERGED
2008/05/07 09:56:14 vg 1.3.6.1: #i88772# MinGW fixes for DEV300
Diffstat (limited to 'fpicker')
6 files changed, 57 insertions, 22 deletions
diff --git a/fpicker/source/win32/filepicker/VistaFilePicker.cxx b/fpicker/source/win32/filepicker/VistaFilePicker.cxx index c17392d0618d..a05ceef25747 100644 --- a/fpicker/source/win32/filepicker/VistaFilePicker.cxx +++ b/fpicker/source/win32/filepicker/VistaFilePicker.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: VistaFilePicker.cxx,v $ - * $Revision: 1.3 $ + * $Revision: 1.4 $ * * This file is part of OpenOffice.org. * @@ -35,7 +35,9 @@ // includes //------------------------------------------------------------------------ +#ifdef _MSC_VER #pragma warning (disable:4917) +#endif #include "VistaFilePicker.hxx" #include "WinFileOpenImpl.hxx" @@ -277,8 +279,7 @@ void SAL_CALL VistaFilePicker::appendFilterGroup(const ::rtl::OUString& //----------------------------------------------------------------------------------------- void SAL_CALL VistaFilePicker::setDefaultName(const ::rtl::OUString& /*sName*/) - throw (css::lang::IllegalArgumentException, - css::uno::RuntimeException ) + throw(css::uno::RuntimeException) { } @@ -634,6 +635,7 @@ void SAL_CALL VistaFilePicker::initialize(const css::uno::Sequence< css::uno::An //------------------------------------------------------------------------------------ void SAL_CALL VistaFilePicker::cancel() + throw(css::uno::RuntimeException) { } @@ -667,7 +669,7 @@ sal_Bool SAL_CALL VistaFilePicker::supportsService(const ::rtl::OUString& sServi // XServiceInfo // ------------------------------------------------- -css::uno::Sequence<::rtl::OUString> SAL_CALL VistaFilePicker::getSupportedServiceNames() +css::uno::Sequence< ::rtl::OUString > SAL_CALL VistaFilePicker::getSupportedServiceNames() throw(css::uno::RuntimeException) { return VistaFilePicker_getSupportedServiceNames(); diff --git a/fpicker/source/win32/filepicker/VistaFilePicker.hxx b/fpicker/source/win32/filepicker/VistaFilePicker.hxx index 5df95de37207..825444cd52f9 100644 --- a/fpicker/source/win32/filepicker/VistaFilePicker.hxx +++ b/fpicker/source/win32/filepicker/VistaFilePicker.hxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: VistaFilePicker.hxx,v $ - * $Revision: 1.3 $ + * $Revision: 1.4 $ * * This file is part of OpenOffice.org. * @@ -133,8 +133,7 @@ public: throw( css::uno::RuntimeException ); virtual void SAL_CALL setDefaultName( const ::rtl::OUString& sName ) - throw (css::lang::IllegalArgumentException, - css::uno::RuntimeException ); + throw( css::uno::RuntimeException ); virtual void SAL_CALL setDisplayDirectory( const ::rtl::OUString& sDirectory ) throw (css::lang::IllegalArgumentException, @@ -240,7 +239,8 @@ public: // XCancellable //------------------------------------------------ - virtual void SAL_CALL cancel( ); + virtual void SAL_CALL cancel( ) + throw(css::uno::RuntimeException); //------------------------------------------------ // XEventListener diff --git a/fpicker/source/win32/filepicker/VistaFilePickerEventHandler.cxx b/fpicker/source/win32/filepicker/VistaFilePickerEventHandler.cxx index 480ee56ebab1..e82d21e2e6e1 100644 --- a/fpicker/source/win32/filepicker/VistaFilePickerEventHandler.cxx +++ b/fpicker/source/win32/filepicker/VistaFilePickerEventHandler.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: VistaFilePickerEventHandler.cxx,v $ - * $Revision: 1.3 $ + * $Revision: 1.4 $ * * This file is part of OpenOffice.org. * @@ -148,7 +148,7 @@ STDMETHODIMP VistaFilePickerEventHandler::OnFolderChange(IFileDialog* pDialog) if ( FAILED(hr) ) return ::rtl::OUString(); - ::rtl::OUString sURL = ::rtl::OUString(pStr); + ::rtl::OUString sURL = ::rtl::OUString(reinterpret_cast<sal_Unicode*>(pStr)); CoTaskMemFree (pStr); return sURL; } @@ -163,8 +163,13 @@ void lcl_updateVersionListDirectly(IFileDialog* pDialog) TFileOpenDialog iOpen ; TFileDialogCustomize iCustomize; +#ifdef __MINGW32__ + iDialog->QueryInterface(IID_IFileOpenDialog, (void**)(&iOpen)); + iDialog->QueryInterface(IID_IFileDialogCustomize, (void**)(&iCustomize)); +#else iDialog.query(&iOpen ); iDialog.query(&iCustomize); +#endif // make sure version list match to the current selection always ... // at least an empty version list will be better then the wrong one .-) @@ -223,7 +228,7 @@ void lcl_updateVersionListDirectly(IFileDialog* pDialog) for (::sal_Int32 i=0; i<lVersions.getLength(); ++i) { const css::util::RevisionTag& aTag = lVersions[i]; - iCustomize->AddControlItem(CONTROL_VERSIONLIST, i, aTag.Identifier); + iCustomize->AddControlItem(CONTROL_VERSIONLIST, i, reinterpret_cast<LPCTSTR>(aTag.Identifier.getStr())); } iCustomize->SetSelectedControlItem(CONTROL_VERSIONLIST, 0); } diff --git a/fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx b/fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx index 045e951d6cf6..dd07abb1a320 100644 --- a/fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx +++ b/fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: VistaFilePickerImpl.cxx,v $ - * $Revision: 1.3 $ + * $Revision: 1.4 $ * * This file is part of OpenOffice.org. * @@ -72,7 +72,7 @@ typedef ::comphelper::SequenceAsVector< ::rtl::OUString > TStringList; if ( FAILED(hr) ) return ::rtl::OUString(); - ::rtl::OUString sURL = ::rtl::OUString(pStr); + ::rtl::OUString sURL = ::rtl::OUString(reinterpret_cast<sal_Unicode*>(pStr)); CoTaskMemFree (pStr); return sURL; } @@ -90,8 +90,8 @@ typedef ::comphelper::SequenceAsVector< ::rtl::OUString > TStringList; { COMDLG_FILTERSPEC aSpec; - aSpec.pszName = aFilter.first ; - aSpec.pszSpec = aFilter.second; + aSpec.pszName = reinterpret_cast<LPCTSTR>(aFilter.first.getStr()) ; + aSpec.pszSpec = reinterpret_cast<LPCTSTR>(aFilter.second.getStr()); lList.push_back(aSpec); } @@ -324,7 +324,11 @@ void VistaFilePickerImpl::impl_sta_CreateOpenDialog(const RequestRef& rRequest) return; TFileDialog iDialog; +#ifdef __MINGW32__ + m_iDialogOpen->QueryInterface(IID_IFileDialog, (void **)(&iDialog)); +#else m_iDialogOpen.query(&iDialog); +#endif TFileDialogEvents iHandler = m_iEventHandler; @@ -363,7 +367,11 @@ void VistaFilePickerImpl::impl_sta_CreateSaveDialog(const RequestRef& rRequest) TFileDialogEvents iHandler = m_iEventHandler; TFileDialog iDialog; +#ifdef __MINGW32__ + m_iDialogSave->QueryInterface(IID_IFileDialog, (void **)(&iDialog)); +#else m_iDialogSave.query(&iDialog); +#endif aLock.clear(); // <- SYNCHRONIZED @@ -486,7 +494,7 @@ void VistaFilePickerImpl::impl_sta_SetTitle(const RequestRef& rRequest) aLock.clear(); // <- SYNCHRONIZED - iDialog->SetTitle(sTitle); + iDialog->SetTitle(reinterpret_cast<LPCTSTR>(sTitle.getStr())); } //------------------------------------------------------------------------------- @@ -501,7 +509,11 @@ void VistaFilePickerImpl::impl_sta_SetDirectory(const RequestRef& rRequest) // <- SYNCHRONIZED ComPtr< IShellItem > pFolder; +#ifdef __MINGW32__ + HRESULT hResult = SHCreateItemFromParsingName ( reinterpret_cast<LPCTSTR>(sDirectory.getStr()), NULL, IID_IShellItem, (void**)(&pFolder) ); +#else HRESULT hResult = SHCreateItemFromParsingName ( sDirectory, NULL, IID_PPV_ARGS(&pFolder) ); +#endif if ( FAILED(hResult) ) return; @@ -655,10 +667,18 @@ TFileDialog VistaFilePickerImpl::impl_getBaseDialogInterface() ::osl::ResettableMutexGuard aLock(m_aMutex); if (m_iDialogOpen.is()) +#ifdef __MINGW32__ + m_iDialogOpen->QueryInterface(IID_IFileDialog, (void**)(&iDialog)); +#else m_iDialogOpen.query(&iDialog); +#endif else if (m_iDialogSave.is()) +#ifdef __MINGW32__ + m_iDialogSave->QueryInterface(IID_IFileDialog, (void**)(&iDialog)); +#else m_iDialogSave.query(&iDialog); +#endif return iDialog; } @@ -672,10 +692,18 @@ TFileDialogCustomize VistaFilePickerImpl::impl_getCustomizeInterface() ::osl::ResettableMutexGuard aLock(m_aMutex); if (m_iDialogOpen.is()) +#ifdef __MINGW32__ + m_iDialogOpen->QueryInterface(IID_IFileDialogCustomize, (void**)(&iCustom)); +#else m_iDialogOpen.query(&iCustom); +#endif else if (m_iDialogSave.is()) +#ifdef __MINGW32__ + m_iDialogSave->QueryInterface(IID_IFileDialogCustomize, (void**)(&iCustom)); +#else m_iDialogSave.query(&iCustom); +#endif return iCustom; } @@ -744,7 +772,7 @@ void VistaFilePickerImpl::impl_sta_SetControlValue(const RequestRef& rRequest) for (::sal_Int32 i=0; i<lItems.getLength(); ++i) { const ::rtl::OUString& sItem = lItems[i]; - hResult = iCustom->AddControlItem(nId, i, sItem); + hResult = iCustom->AddControlItem(nId, i, reinterpret_cast<LPCTSTR>(sItem.getStr())); } } break; diff --git a/fpicker/source/win32/filepicker/comptr.hxx b/fpicker/source/win32/filepicker/comptr.hxx index 27fa7cf1e2f8..28847e706b39 100644 --- a/fpicker/source/win32/filepicker/comptr.hxx +++ b/fpicker/source/win32/filepicker/comptr.hxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: comptr.hxx,v $ - * $Revision: 1.3 $ + * $Revision: 1.4 $ * * This file is part of OpenOffice.org. * @@ -136,7 +136,7 @@ class ComPtr //--------------------------------------------------------------------- T_INTERFACE* operator=(IUnknown* pIUnknown) { - if (pIUknown) + if (pIUnknown) pIUnknown->QueryInterface(P_IID, (void**)&m_pInterface); return m_pInterface; } @@ -185,12 +185,14 @@ class ComPtr } } +#ifndef __MINGW32__ //--------------------------------------------------------------------- template< class T_QUERYINTERFACE > HRESULT query(T_QUERYINTERFACE** pQuery) { return m_pInterface->QueryInterface(__uuidof(T_QUERYINTERFACE), (void**)pQuery); } +#endif //--------------------------------------------------------------------- ::sal_Bool equals(IUnknown* pCheck) diff --git a/fpicker/source/win32/filepicker/platform_vista.h b/fpicker/source/win32/filepicker/platform_vista.h index eabf5b16a0cb..ec2e3a049dcd 100644 --- a/fpicker/source/win32/filepicker/platform_vista.h +++ b/fpicker/source/win32/filepicker/platform_vista.h @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: platform_vista.h,v $ - * $Revision: 1.3 $ + * $Revision: 1.4 $ * * This file is part of OpenOffice.org. * @@ -46,9 +46,7 @@ #if defined _MSC_VER #pragma warning(push, 1) -#endif #include <comip.h> -#if defined _MSC_VER #pragma warning(pop) #endif |