summaryrefslogtreecommitdiff
path: root/fpicker
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2008-06-06 15:30:09 +0000
committerVladimir Glazounov <vg@openoffice.org>2008-06-06 15:30:09 +0000
commit4710990cdcf1dd8e150cdf8dd62b6a132e486b22 (patch)
tree1e74eabf3c257b0702861c4f123680434a4c0df6 /fpicker
parentb3e8d330becfcf427f6c4ed9ab6f24cb21fdcb38 (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')
-rw-r--r--fpicker/source/win32/filepicker/VistaFilePicker.cxx10
-rw-r--r--fpicker/source/win32/filepicker/VistaFilePicker.hxx8
-rw-r--r--fpicker/source/win32/filepicker/VistaFilePickerEventHandler.cxx11
-rw-r--r--fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx40
-rw-r--r--fpicker/source/win32/filepicker/comptr.hxx6
-rw-r--r--fpicker/source/win32/filepicker/platform_vista.h4
6 files changed, 57 insertions, 22 deletions
diff --git a/fpicker/source/win32/filepicker/VistaFilePicker.cxx b/fpicker/source/win32/filepicker/VistaFilePicker.cxx
index c1f7558278..99a6641eac 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 412ace903f..b398fd17ef 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 341ba98810..26c7ee5d47 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 5c790bdd27..d6ee27eda1 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 67ff6a7fc0..8c6d87e414 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 801f2bc6a0..fe4492d87e 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