summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-11-19 11:54:51 +0100
committerStephan Bergmann <sbergman@redhat.com>2020-11-19 18:24:48 +0100
commitf54b1d1e0937cf43d74e34bfd5ae921923527a09 (patch)
tree59d720cec9ff02bc3f7e55c4770edf57c7f88b17 /include
parentf39f21d92ec83c3a5062f29dd26214fc83012c06 (diff)
Clarify DdeData::GetExternalFormat return type
The implementation (in svl/source/svdde/ddedata.cxx) returns any of: * {CF_TEXT=1, CF_BITMAP=2, CF_METFILEPICT=3} from the Windows API; * the return value of Windows API's RegisterClipboardFormatW, which is UINT from the Windows API (i.e., 32-bit unsigned int); * a enum SotClipboardFormatId value, whose underlying type is sal_uInt32. So the natural choice is sal_uInt32 here. (Windows API's UINT would also do, but cannot be used in include/svl/svdde.hxx, which is used on all platforms.) That in turn shows that DdeService's aFormats and HasCbFormat should also use sal_uInt32. (And then, simplify some of the std algorithms use in svl/source/svdde/ddesvr.cxx.) Change-Id: I593d0a7df78bfdd08ce2de04c3da2078d973e262 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106151 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/svl/svdde.hxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/svl/svdde.hxx b/include/svl/svdde.hxx
index beea2ef5e53d..e8b808ea1159 100644
--- a/include/svl/svdde.hxx
+++ b/include/svl/svdde.hxx
@@ -71,7 +71,7 @@ public:
DdeData& operator=(const DdeData&);
DdeData& operator=(DdeData&&) noexcept;
- static sal_uLong GetExternalFormat(SotClipboardFormatId nFmt);
+ static sal_uInt32 GetExternalFormat(SotClipboardFormatId nFmt);
static SotClipboardFormatId GetInternalFormat(sal_uLong nFmt);
};
@@ -286,14 +286,14 @@ protected:
const DdeTopic* GetSysTopic() const { return pSysTopic; }
private:
std::vector<DdeTopic*> aTopics;
- std::vector< tools::Long > aFormats;
+ std::vector< sal_uInt32 > aFormats;
DdeTopic* pSysTopic;
DdeString* pName;
std::vector<std::unique_ptr<Conversation>>
m_vConv;
short nStatus;
- SVL_DLLPRIVATE bool HasCbFormat( sal_uInt16 );
+ SVL_DLLPRIVATE bool HasCbFormat( sal_uInt32 );
public:
DdeService( SAL_UNUSED_PARAMETER const OUString& );