summaryrefslogtreecommitdiff
path: root/dtrans/source/win32/dtobj/FmtFilter.cxx
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-08-23 15:17:16 +0200
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-08-23 15:17:16 +0200
commite71dd58cbb6cbcf4d032db73982239badeeabf22 (patch)
treeb21dfedc3f13ef0ba966efd13da05ff38523e698 /dtrans/source/win32/dtobj/FmtFilter.cxx
parent510e316a6f128161e6454fe35053231bd24b5a03 (diff)
recreated tag libreoffice-3.3.0.4 which had these commits:
commit 0fce58acaa20c2e3cd99690e41da991380a0a1a9 (tag: refs/tags/libreoffice-3.3.0.4, refs/remotes/origin/libreoffice-3-3-0) Author: Petr Mladek <pmladek@suse.cz> Date: Tue Jan 18 19:01:20 2011 +0100 Version 3.3.0.4, tag libreoffice-3.3.0.4 (3.3-rc4) commit 6fc21aa74b4d2aba07d854d5d3c2f404905b40ef Author: Tor Lillqvist <tlillqvist@novell.com> Date: Tue Jan 18 16:25:52 2011 +0200 Avoid GetHelpText() call which can be quite heavy GetHelpText() can cause a quite heavy sequence of file and directory lookups. See fdo#33088. As its return value here was just passed on to ShowHelpStatusText() which doesn't do anything at all, it was completely unnecessary. The GetHelpText() calls here caused the noticeable slowdown in highlighting menu items on Windows with lots of localised help files for some bundled extensions. Signed-off-by: Caolan McNamara <caolanm@redhat.com> Signed-off-by: Michael Meeks <michael.meeks@novell.com> Signed-off-by: Thorsten Behrens <thb@documentfoundation.org> Signed-off-by: fstrba@novell.com vcl/source/window/menu.cxx | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-) commit 3c2e3b6efc81c5e34c56f0f11723ed848801be35 Author: Luboš Luňák <l.lunak@suse.cz> Date: Tue Jan 18 13:11:00 2011 +0100 do not mix unrelated X11 Visuals (fdo#33108) Do not assume that there is just one generic Visual, as today's XServers are ARGB-capable and cases of both the default depth and 32bit visuals can happen. Signed-off-by: Thorsten Behrens <tbehrens@novell.com> Signed-off-by: Radek Doulik <rodo@novell.com> Signed-off-by: Michael Meeks <michael.meeks@novell.com> vcl/unx/inc/salgdi.h | 2 +- vcl/unx/source/gdi/salgdi.cxx | 17 ++++++++--------- vcl/unx/source/gdi/salgdi3.cxx | 8 -------- 3 files changed, 9 insertions(+), 18 deletions(-) commit 1c9c9180b4105626e9242e5499b67180abf4a53c Author: Andre Fischer <andre.f.fischer@oracle.com> Date: Tue Jan 18 10:41:22 2011 +0100 calc65: #i116318# Fixed the painting of axial gradients. Signed-off-by: Thorsten Behrens <tbehrens@novell.com> (cherry picked from commit ea29f32bd5bc1a937a747bd5a1f5b37f570ed25f) Signed-off-by: Michael Meeks <michael.meeks@novell.com> Signed-off-by: Petr Mladek <pmladek@suse.cz> Signed-off-by: Radek Doulik <rodo@novell.com> cppcanvas/source/mtfrenderer/implrenderer.cxx | 17 +++++++++++++++-- 1 files changed, 15 insertions(+), 2 deletions(-) commit 94ba0c5b10f8089dc549e9fc4f3085622cff65c4 Author: Luboš Luňák <l.lunak@suse.cz> Date: Wed Nov 3 15:17:33 2010 +0100 use sane scrollbar sizes when drawing bnc#619772 leads to a crash because maximum = minimum = 0, and this strange (but for whatever reason needed) '- mnVisibleSize' hack makes maximum be -1, eventually leading to a crash vcl/unx/kde4/KDESalGraphics.cxx | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 4831d49751fd5aa81901cfc0402311ff2d700056 Author: Petr Mladek <pmladek@suse.cz> Date: Tue Jan 11 22:59:37 2011 +0100 Branch libreoffice-3-3-0 This is 'libreoffice-3-3-0' - the stable branch for the 3.3.0 release. Only very safe changes, reviewed by three people are allowed. If you want to commit more complicated fix for the next 3.3.x release, please use the 'libreoffice-3-3' branch. If you want to build something cool, unstable, and risky, use master.
Notes
split repo tag: libs-gui_libreoffice-3.3.0.4
Diffstat (limited to 'dtrans/source/win32/dtobj/FmtFilter.cxx')
-rw-r--r--dtrans/source/win32/dtobj/FmtFilter.cxx214
1 files changed, 107 insertions, 107 deletions
diff --git a/dtrans/source/win32/dtobj/FmtFilter.cxx b/dtrans/source/win32/dtobj/FmtFilter.cxx
index 235c63e298f9..0702ef4892d0 100644
--- a/dtrans/source/win32/dtobj/FmtFilter.cxx
+++ b/dtrans/source/win32/dtobj/FmtFilter.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -74,24 +74,24 @@ Sequence< sal_Int8 > SAL_CALL WinMFPictToOOMFPict( Sequence< sal_Int8 >& aMetaFi
{
OSL_ASSERT( aMetaFilePict.getLength( ) == sizeof( METAFILEPICT ) );
- Sequence< sal_Int8 > mfpictStream;
+ Sequence< sal_Int8 > mfpictStream;
METAFILEPICT* pMFPict = reinterpret_cast< METAFILEPICT* >( aMetaFilePict.getArray( ) );
HMETAFILE hMf = pMFPict->hMF;
sal_uInt32 nCount = GetMetaFileBitsEx( hMf, 0, NULL );
-
+
if ( nCount > 0 )
{
mfpictStream.realloc( nCount + sizeof( METAFILEHEADER ) );
METAFILEHEADER* pMFHeader = reinterpret_cast< METAFILEHEADER* >( mfpictStream.getArray( ) );
- SMALL_RECT aRect = { 0,
- 0,
- static_cast< short >( pMFPict->xExt ),
+ SMALL_RECT aRect = { 0,
+ 0,
+ static_cast< short >( pMFPict->xExt ),
static_cast< short >( pMFPict->yExt ) };
USHORT nInch;
switch( pMFPict->mm )
- {
+ {
case MM_TEXT:
nInch = 72;
break;
@@ -107,7 +107,7 @@ Sequence< sal_Int8 > SAL_CALL WinMFPictToOOMFPict( Sequence< sal_Int8 >& aMetaFi
case MM_LOENGLISH:
nInch = 254;
break;
-
+
case MM_HIENGLISH:
case MM_ISOTROPIC:
case MM_ANISOTROPIC:
@@ -134,20 +134,20 @@ Sequence< sal_Int8 > SAL_CALL WinMFPictToOOMFPict( Sequence< sal_Int8 >& aMetaFi
nCount = GetMetaFileBitsEx( pMFPict->hMF, nCount, pMFBuff + sizeof( METAFILEHEADER ) );
OSL_ASSERT( nCount > 0 );
}
-
+
return mfpictStream;
}
//-------------------------------------------------------------
-// convert a windows enhanced metafile to a openoffice metafile
+// convert a windows enhanced metafile to a openoffice metafile
//-------------------------------------------------------------
Sequence< sal_Int8 > SAL_CALL WinENHMFPictToOOMFPict( HENHMETAFILE hEnhMetaFile )
{
- Sequence< sal_Int8 > aRet;
- UINT nSize = 0;
+ Sequence< sal_Int8 > aRet;
+ UINT nSize = 0;
- if( hEnhMetaFile &&
+ if( hEnhMetaFile &&
( ( nSize = GetEnhMetaFileBits( hEnhMetaFile, 0, NULL ) ) != 0 ) )
{
aRet.realloc( nSize );
@@ -165,8 +165,8 @@ Sequence< sal_Int8 > SAL_CALL WinENHMFPictToOOMFPict( HENHMETAFILE hEnhMetaFile
HMETAFILEPICT SAL_CALL OOMFPictToWinMFPict( Sequence< sal_Int8 >& aOOMetaFilePict )
{
- HMETAFILEPICT hPict = NULL;
- HMETAFILE hMtf = SetMetaFileBitsEx( aOOMetaFilePict.getLength(), (sal_uChar*) aOOMetaFilePict.getConstArray() );
+ HMETAFILEPICT hPict = NULL;
+ HMETAFILE hMtf = SetMetaFileBitsEx( aOOMetaFilePict.getLength(), (sal_uChar*) aOOMetaFilePict.getConstArray() );
if( hMtf )
{
@@ -201,14 +201,14 @@ HENHMETAFILE SAL_CALL OOMFPictToWinENHMFPict( Sequence< sal_Int8 >& aOOMetaFileP
Sequence< sal_Int8 > SAL_CALL WinDIBToOOBMP( const Sequence< sal_Int8 >& aWinDIB )
{
OSL_ASSERT( aWinDIB.getLength( ) > sizeof( BITMAPINFOHEADER ) );
-
+
Sequence< sal_Int8 > ooBmpStream;
ooBmpStream.realloc( aWinDIB.getLength( ) + sizeof(BITMAPFILEHEADER) );
-
- const BITMAPINFOHEADER *pBmpInfoHdr = (const BITMAPINFOHEADER*)aWinDIB.getConstArray();
- BITMAPFILEHEADER *pBmpFileHdr = reinterpret_cast< BITMAPFILEHEADER* >( ooBmpStream.getArray() );
- DWORD nOffset = sizeof( BITMAPFILEHEADER ) + sizeof( BITMAPINFOHEADER );
+
+ const BITMAPINFOHEADER *pBmpInfoHdr = (const BITMAPINFOHEADER*)aWinDIB.getConstArray();
+ BITMAPFILEHEADER *pBmpFileHdr = reinterpret_cast< BITMAPFILEHEADER* >( ooBmpStream.getArray() );
+ DWORD nOffset = sizeof( BITMAPFILEHEADER ) + sizeof( BITMAPINFOHEADER );
rtl_copyMemory( pBmpFileHdr + 1, pBmpInfoHdr, aWinDIB.getLength( ) );
@@ -216,12 +216,12 @@ Sequence< sal_Int8 > SAL_CALL WinDIBToOOBMP( const Sequence< sal_Int8 >& aWinDIB
nOffset += ( pBmpInfoHdr->biClrUsed ? pBmpInfoHdr->biClrUsed : ( 1 << pBmpInfoHdr->biBitCount ) ) << 2;
else if( ( BI_BITFIELDS == pBmpInfoHdr->biCompression ) && ( ( 16 == pBmpInfoHdr->biBitCount ) || ( 32 == pBmpInfoHdr->biBitCount ) ) )
nOffset += 12;
-
+
pBmpFileHdr->bfType = 'MB';
pBmpFileHdr->bfSize = 0; // maybe: nMemSize + sizeof(BITMAPFILEHEADER)
pBmpFileHdr->bfReserved1 = 0;
pBmpFileHdr->bfReserved2 = 0;
- pBmpFileHdr->bfOffBits = nOffset;
+ pBmpFileHdr->bfOffBits = nOffset;
return ooBmpStream;
}
@@ -232,12 +232,12 @@ Sequence< sal_Int8 > SAL_CALL WinDIBToOOBMP( const Sequence< sal_Int8 >& aWinDIB
Sequence< sal_Int8 > SAL_CALL OOBmpToWinDIB( Sequence< sal_Int8 >& aOOBmp )
{
- OSL_ASSERT( aOOBmp.getLength( ) >
+ OSL_ASSERT( aOOBmp.getLength( ) >
( sizeof( BITMAPFILEHEADER ) + sizeof( BITMAPINFOHEADER ) ) );
Sequence< sal_Int8 > winDIBStream( aOOBmp.getLength( ) - sizeof( BITMAPFILEHEADER ) );
- rtl_copyMemory( winDIBStream.getArray( ),
+ rtl_copyMemory( winDIBStream.getArray( ),
aOOBmp.getArray( ) + sizeof( BITMAPFILEHEADER ),
aOOBmp.getLength( ) - sizeof( BITMAPFILEHEADER ) );
@@ -249,49 +249,49 @@ Sequence< sal_Int8 > SAL_CALL OOBmpToWinDIB( Sequence< sal_Int8 >& aOOBmp )
// well known under MS Windows
// the MS HTML Format has a header before the real html data
//
-// Version:1.0 Version number of the clipboard. Staring is 0.9
-// StartHTML: Byte count from the beginning of the clipboard to the start
-// of the context, or -1 if no context
-// EndHTML: Byte count from the beginning of the clipboard to the end
-// of the context, or -1 if no context
-// StartFragment: Byte count from the beginning of the clipboard to the
-// start of the fragment
-// EndFragment: Byte count from the beginning of the clipboard to the
-// end of the fragment
-// StartSelection: Byte count from the beginning of the clipboard to the
-// start of the selection
-// EndSelection: Byte count from the beginning of the clipboard to the
-// end of the selection
+// Version:1.0 Version number of the clipboard. Staring is 0.9
+// StartHTML: Byte count from the beginning of the clipboard to the start
+// of the context, or -1 if no context
+// EndHTML: Byte count from the beginning of the clipboard to the end
+// of the context, or -1 if no context
+// StartFragment: Byte count from the beginning of the clipboard to the
+// start of the fragment
+// EndFragment: Byte count from the beginning of the clipboard to the
+// end of the fragment
+// StartSelection: Byte count from the beginning of the clipboard to the
+// start of the selection
+// EndSelection: Byte count from the beginning of the clipboard to the
+// end of the selection
//
// StartSelection and EndSelection are optional
// The fragment should be preceded and followed by the HTML comments
-// <!--StartFragment--> and <!--EndFragment--> (no space between !-- and the
+// <!--StartFragment--> and <!--EndFragment--> (no space between !-- and the
// text
//------------------------------------------------------------------------------
/*
Sequence< sal_Int8 > SAL_CALL TextHtmlToHTMLFormat( Sequence< sal_Int8 >& aTextHtml )
{
OSL_ASSERT( aTextHtml.getLength( ) > 0 );
-
+
// check parameter
if ( !(aTextHtml.getLength( ) > 0) )
return Sequence< sal_Int8 >( );
- // we create a buffer with the approximated size of
+ // we create a buffer with the approximated size of
// the HTML Format header
char aHTMLFmtHdr[120];
-
+
rtl_zeroMemory( aHTMLFmtHdr, sizeof( aHTMLFmtHdr ) );
// fill the buffer with dummy values to calc the
// exact length
-
- wsprintf(
- aHTMLFmtHdr,
+
+ wsprintf(
+ aHTMLFmtHdr,
"Version:1.0\nStartHTML:%010d\r\nnEndHTML:%010d\r\nStartFragment:%010\r\nnEndFragment:%010d\r\n", 0, 0, 0, 0 );
sal_uInt32 lHTMLFmtHdr = rtl_str_getLength( aHTMLFmtHdr );
-
+
// the office allways writes the start
// and end html tag in upper cases and
// without spaces
@@ -306,8 +306,8 @@ Sequence< sal_Int8 > SAL_CALL TextHtmlToHTMLFormat( Sequence< sal_Int8 >& aTextH
OString startBodyTag( "<BODY" );
OString endBodyTag( "</BODY" );
- OString textHtml(
- reinterpret_cast< const sal_Char* >( aTextHtml.getConstArray( ) ),
+ OString textHtml(
+ reinterpret_cast< const sal_Char* >( aTextHtml.getConstArray( ) ),
aTextHtml.getLength( ) );
sal_Int32 nStartHtml = textHtml.indexOf( startHtmlTag );
@@ -329,27 +329,27 @@ Sequence< sal_Int8 > SAL_CALL TextHtmlToHTMLFormat( Sequence< sal_Int8 >& aTextH
// fill the html header
rtl_zeroMemory( aHTMLFmtHdr, sizeof( aHTMLFmtHdr ) );
- wsprintf(
- aHTMLFmtHdr,
+ wsprintf(
+ aHTMLFmtHdr,
"Version:1.0\nStartHTML:%010d\r\nEndHTML:%010d\r\nStartFragment:%010d\r\nEndFragment:%010d\r\n",
nStartHtml, nEndHtml, nStartFrgmt, nEndFrgmt );
-
+
// we add space for a trailing \0
aHTMLFmtSequence.realloc( lHTMLFmtHdr + aTextHtml.getLength( ) + 1 );
rtl_zeroMemory( aHTMLFmtSequence.getArray( ), aHTMLFmtSequence.getLength( ) );
-
+
// copy the HTML Format header
- rtl_copyMemory(
+ rtl_copyMemory(
static_cast< LPVOID >( aHTMLFmtSequence.getArray( ) ),
static_cast< LPVOID >( aHTMLFmtHdr ), lHTMLFmtHdr );
-
+
// concat the text/html
rtl_copyMemory(
static_cast< LPVOID >( aHTMLFmtSequence.getArray( ) + lHTMLFmtHdr ),
static_cast< LPVOID >( aTextHtml.getArray( ) ),
- aTextHtml.getLength( ) );
+ aTextHtml.getLength( ) );
}
-
+
return aHTMLFmtSequence;
}
*/
@@ -378,37 +378,37 @@ const std::string TAG_END_BODY = std::string("</BODY");
Sequence<sal_Int8> SAL_CALL TextHtmlToHTMLFormat(Sequence<sal_Int8>& aTextHtml)
{
OSL_ASSERT(aTextHtml.getLength() > 0);
-
+
if (!(aTextHtml.getLength() > 0))
return Sequence<sal_Int8>();
-
+
// fill the buffer with dummy values to calc the exact length
- std::string dummyHtmlHeader = GetHtmlFormatHeader(0, 0, 0, 0);
+ std::string dummyHtmlHeader = GetHtmlFormatHeader(0, 0, 0, 0);
size_t lHtmlFormatHeader = dummyHtmlHeader.length();
-
+
std::string textHtml(
- reinterpret_cast<const sal_Char*>(aTextHtml.getConstArray()),
+ reinterpret_cast<const sal_Char*>(aTextHtml.getConstArray()),
reinterpret_cast<const sal_Char*>(aTextHtml.getConstArray()) + aTextHtml.getLength());
-
+
std::string::size_type nStartHtml = textHtml.find(TAG_HTML) + lHtmlFormatHeader - 1; // we start one before '<HTML>' Word 2000 does also so
std::string::size_type nEndHtml = textHtml.find(TAG_END_HTML) + lHtmlFormatHeader + TAG_END_HTML.length() + 1; // our SOffice 5.2 wants 2 behind </HTML>?
-
+
// The body tag may have parameters so we need to search for the
// closing '>' manually e.g. <BODY param> #92840#
- std::string::size_type nStartFragment = textHtml.find(">", textHtml.find(TAG_BODY)) + lHtmlFormatHeader + 1;
+ std::string::size_type nStartFragment = textHtml.find(">", textHtml.find(TAG_BODY)) + lHtmlFormatHeader + 1;
std::string::size_type nEndFragment = textHtml.find(TAG_END_BODY) + lHtmlFormatHeader;
- std::string htmlFormat = GetHtmlFormatHeader(nStartHtml, nEndHtml, nStartFragment, nEndFragment);
+ std::string htmlFormat = GetHtmlFormatHeader(nStartHtml, nEndHtml, nStartFragment, nEndFragment);
htmlFormat += textHtml;
-
+
Sequence<sal_Int8> byteSequence(htmlFormat.length() + 1); // space the trailing '\0'
- rtl_zeroMemory(byteSequence.getArray(), byteSequence.getLength());
-
+ rtl_zeroMemory(byteSequence.getArray(), byteSequence.getLength());
+
rtl_copyMemory(
static_cast<void*>(byteSequence.getArray()),
static_cast<const void*>(htmlFormat.c_str()),
htmlFormat.length());
-
+
return byteSequence;
}
@@ -418,27 +418,27 @@ std::wstring getFileExtension(const std::wstring& aFilename)
if ((idx != std::wstring::npos))
{
return std::wstring(aFilename, idx);
- }
+ }
return std::wstring();
}
const std::wstring SHELL_LINK_FILE_EXTENSION = L".lnk";
bool isShellLink(const std::wstring& aFilename)
-{
+{
std::wstring ext = getFileExtension(aFilename);
- return (_wcsicmp(ext.c_str(), SHELL_LINK_FILE_EXTENSION.c_str()) == 0);
+ return (_wcsicmp(ext.c_str(), SHELL_LINK_FILE_EXTENSION.c_str()) == 0);
}
-
-/** Resolve a Windows Shell Link (lnk) file. If a resolution
+
+/** Resolve a Windows Shell Link (lnk) file. If a resolution
is not possible simply return the provided name of the
lnk file. */
-std::wstring getShellLinkTarget(const std::wstring& aLnkFile)
+std::wstring getShellLinkTarget(const std::wstring& aLnkFile)
{
OSL_ASSERT(isShellLink(aLnkFile));
-
+
std::wstring target = aLnkFile;
-
+
try
{
sal::systools::COMReference<IShellLinkA> pIShellLink;
@@ -446,34 +446,34 @@ std::wstring getShellLinkTarget(const std::wstring& aLnkFile)
CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, IID_IShellLink, reinterpret_cast<LPVOID*>(&pIShellLink));
if (FAILED(hr))
return target;
-
+
sal::systools::COMReference<IPersistFile> pIPersistFile =
- pIShellLink.QueryInterface<IPersistFile>(IID_IPersistFile);
-
+ pIShellLink.QueryInterface<IPersistFile>(IID_IPersistFile);
+
hr = pIPersistFile->Load(aLnkFile.c_str(), STGM_READ);
if (FAILED(hr))
return target;
-
+
hr = pIShellLink->Resolve(NULL, SLR_UPDATE | SLR_NO_UI);
if (FAILED(hr))
return target;
-
+
char pathA[MAX_PATH];
- WIN32_FIND_DATA wfd;
- hr = pIShellLink->GetPath(pathA, MAX_PATH, &wfd, SLGP_RAWPATH);
+ WIN32_FIND_DATA wfd;
+ hr = pIShellLink->GetPath(pathA, MAX_PATH, &wfd, SLGP_RAWPATH);
if (FAILED(hr))
- return target;
-
+ return target;
+
wchar_t pathW[MAX_PATH];
- MultiByteToWideChar(CP_ACP, 0, pathA, -1, pathW, MAX_PATH);
- target = pathW;
+ MultiByteToWideChar(CP_ACP, 0, pathA, -1, pathW, MAX_PATH);
+ target = pathW;
}
catch(sal::systools::ComError& ex)
{
OSL_ENSURE(false, ex.what());
ex = ex;
- }
- return target;
+ }
+ return target;
}
typedef std::vector<std::wstring> FileList_t;
@@ -484,54 +484,54 @@ typedef Sequence<sal_Int8> ByteSequence_t;
a double '\0' terminated string buffer */
size_t CalcSizeForStringListBuffer(const FileList_t& fileList)
{
- if (fileList.size() == 0)
- return 0;
-
- size_t size = 1; // one for the very final '\0'
+ if (fileList.size() == 0)
+ return 0;
+
+ size_t size = 1; // one for the very final '\0'
FileList_t::const_iterator iter_end = fileList.end();
- for (FileList_t::const_iterator iter = fileList.begin(); iter != iter_end; ++iter)
+ for (FileList_t::const_iterator iter = fileList.begin(); iter != iter_end; ++iter)
{
size += iter->length() + 1; // length including terminating '\0'
- }
+ }
return (size * sizeof(FileList_ValueType_t::value_type));
}
ByteSequence_t FileListToByteSequence(const FileList_t& fileList)
-{
+{
ByteSequence_t bseq;
- size_t size = CalcSizeForStringListBuffer(fileList);
-
+ size_t size = CalcSizeForStringListBuffer(fileList);
+
if (size > 0)
{
bseq.realloc(size);
wchar_t* p = reinterpret_cast<wchar_t*>(bseq.getArray());
ZeroMemory(p, size);
-
+
FileList_t::const_iterator iter;
FileList_t::const_iterator iter_end = fileList.end();
for (iter = fileList.begin(); iter != iter_end; ++iter)
{
wcsncpy(p, iter->c_str(), iter->length());
p += (iter->length() + 1);
- }
+ }
}
return bseq;
}
-
+
ByteSequence_t CF_HDROPToFileList(HGLOBAL hGlobal)
-{
- UINT nFiles = DragQueryFileW((HDROP)hGlobal, 0xFFFFFFFF, NULL, 0);
+{
+ UINT nFiles = DragQueryFileW((HDROP)hGlobal, 0xFFFFFFFF, NULL, 0);
FileList_t files;
-
+
for (UINT i = 0; i < nFiles; i++)
{
wchar_t buff[MAX_PATH];
- /*UINT size =*/ DragQueryFileW((HDROP)hGlobal, i, buff, MAX_PATH);
+ /*UINT size =*/ DragQueryFileW((HDROP)hGlobal, i, buff, MAX_PATH);
std::wstring filename = buff;
if (isShellLink(filename))
filename = getShellLinkTarget(filename);
- files.push_back(filename);
- }
+ files.push_back(filename);
+ }
return FileListToByteSequence(files);
}