[Libreoffice-commits] core.git: vcl/win
Fridrich Å trba
fridrich.strba at bluewin.ch
Tue Jul 30 09:46:22 PDT 2013
vcl/win/source/app/salinst.cxx | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
New commits:
commit 918ddde5be4fde7bf8679bdf19805c618deabbf5
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date: Tue Jul 30 18:43:53 2013 +0200
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
diff --git a/vcl/win/source/app/salinst.cxx b/vcl/win/source/app/salinst.cxx
index 4401bb7..22917e8 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());
}
}
More information about the Libreoffice-commits
mailing list