Kaydet (Commit) 3f84462b authored tarafından Lionel Elie Mamane's avatar Lionel Elie Mamane

fdo#31405 CommandType is a LONG, so use a sal_Int32 to retrieve it

Else, operator>>= flat out refuses to extract it, even though the particular value in this particular call would fit.
Also OSL_VERIFY the result of >>= (instead of ignoring it) to facilitate future detection of similar problem

Change-Id: I859c38c3589dc9e9ef5bdd882663aa3386a43237
üst f4b412eb
...@@ -2381,13 +2381,13 @@ void SwNewDBMgr::ExecuteFormLetter( SwWrtShell& rSh, ...@@ -2381,13 +2381,13 @@ void SwNewDBMgr::ExecuteFormLetter( SwWrtShell& rSh,
rtl::OUString sDataSource, sDataTableOrQuery; rtl::OUString sDataSource, sDataTableOrQuery;
Sequence<Any> aSelection; Sequence<Any> aSelection;
sal_Int16 nCmdType = CommandType::TABLE; sal_Int32 nCmdType = CommandType::TABLE;
uno::Reference< XConnection> xConnection; uno::Reference< XConnection> xConnection;
ODataAccessDescriptor aDescriptor(rProperties); ODataAccessDescriptor aDescriptor(rProperties);
sDataSource = aDescriptor.getDataSource(); sDataSource = aDescriptor.getDataSource();
aDescriptor[daCommand] >>= sDataTableOrQuery; OSL_VERIFY(aDescriptor[daCommand] >>= sDataTableOrQuery);
aDescriptor[daCommandType] >>= nCmdType; OSL_VERIFY(aDescriptor[daCommandType] >>= nCmdType);
if ( aDescriptor.has(daSelection) ) if ( aDescriptor.has(daSelection) )
aDescriptor[daSelection] >>= aSelection; aDescriptor[daSelection] >>= aSelection;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment