summaryrefslogtreecommitdiff
path: root/vcl/win/source
diff options
context:
space:
mode:
authorFridrich Štrba <fridrich.strba@bluewin.ch>2013-07-30 18:43:53 +0200
committerFridrich Štrba <fridrich.strba@bluewin.ch>2013-07-30 18:46:01 +0200
commit918ddde5be4fde7bf8679bdf19805c618deabbf5 (patch)
tree2a61ea58d5aef707e63d1640ab9e8ee7aafec5b8 /vcl/win/source
parenteb4a3e95cd02f940c9c794aea89e1e1a12588981 (diff)
Fix MinGW32 and MinGW64 build
SHARDAPPIDINFO is Windows 7+ only. MinGW32/64 headers don't have it. So, just declare a struct with the same members since the SHAddToRecentDocs expect LPVOID anyway. Change-Id: I27e2c8cd6cd7f033cdcf053cc60a1c71038b189a
Diffstat (limited to 'vcl/win/source')
-rw-r--r--vcl/win/source/app/salinst.cxx15
1 files changed, 10 insertions, 5 deletions
diff --git a/vcl/win/source/app/salinst.cxx b/vcl/win/source/app/salinst.cxx
index 4401bb703a42..22917e81800c 100644
--- a/vcl/win/source/app/salinst.cxx
+++ b/vcl/win/source/app/salinst.cxx
@@ -1055,7 +1055,7 @@ void WinSalInstance::AddToRecentDocumentList(const OUString& rFileUrl, const OUS
{
IShellItem* pShellItem = NULL;
- HRESULT hr = pSHCreateItemFromParsingName ( system_path.getStr(), NULL, IID_PPV_ARGS(&pShellItem) );
+ HRESULT hr = pSHCreateItemFromParsingName ( (PCWSTR) system_path.getStr(), NULL, IID_PPV_ARGS(&pShellItem) );
if ( SUCCEEDED(hr) && pShellItem )
{
@@ -1088,9 +1088,14 @@ void WinSalInstance::AddToRecentDocumentList(const OUString& rFileUrl, const OUS
OUString sApplicationID("TheDocumentFoundation.LibreOffice.");
sApplicationID += sApplicationName;
- SHARDAPPIDINFO info;
+ typedef struct {
+ IShellItem *psi;
+ PCWSTR pszAppID;
+ } DummyShardAppIDInfo;
+
+ DummyShardAppIDInfo info;
info.psi = pShellItem;
- info.pszAppID = sApplicationID.getStr();
+ info.pszAppID = (PCWSTR) sApplicationID.getStr();
SHAddToRecentDocs ( SHARD_APPIDINFO, &info );
return;
@@ -1098,8 +1103,8 @@ void WinSalInstance::AddToRecentDocumentList(const OUString& rFileUrl, const OUS
}
}
}
- // For whatever reason, we could not use the SHARD_APPIDNFO semantics
- SHAddToRecentDocs(SHARD_PATHW, system_path.getStr());
+ // For whatever reason, we could not use the SHARD_APPIDINFO semantics
+ SHAddToRecentDocs(SHARD_PATHW, (PCWSTR) system_path.getStr());
}
}