[Libreoffice-commits] core.git: 2 commits - ucb/source unotest/source unotools/source unoxml/source uui/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Sun Jul 21 06:50:57 UTC 2019
ucb/source/cacher/dynamicresultsetwrapper.cxx | 4 ++--
ucb/source/ucp/hierarchy/hierarchycontent.cxx | 10 ++++------
ucb/source/ucp/package/pkgcontent.cxx | 10 ++++------
ucb/source/ucp/tdoc/tdoc_content.cxx | 17 +++++------------
ucb/source/ucp/tdoc/tdoc_provider.cxx | 11 ++---------
ucb/source/ucp/tdoc/tdoc_stgelems.cxx | 4 ++--
ucb/source/ucp/webdav-neon/webdavcontent.cxx | 10 ++++------
unotest/source/cpp/macros_test.cxx | 4 +---
unotools/source/config/configitem.cxx | 2 +-
unotools/source/misc/mediadescriptor.cxx | 2 +-
unoxml/source/dom/attributesmap.cxx | 16 ++++------------
unoxml/source/dom/document.cxx | 16 ++++++++--------
unoxml/source/dom/element.cxx | 4 ++--
unoxml/source/rdf/librdf_repository.cxx | 25 +++++++------------------
uui/source/iahndl-filter.cxx | 4 +---
uui/source/passwordcontainer.cxx | 16 ++++++----------
16 files changed, 54 insertions(+), 101 deletions(-)
New commits:
commit 7272951c121735a7350fa70840b255b7ef831f1a
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Sat Jul 20 18:26:07 2019 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sun Jul 21 08:49:56 2019 +0200
loplugin:referencecasting in unotools..uui
Change-Id: Ia2c991591e65deb00710ab7a5b73bc42ae6b1b46
Reviewed-on: https://gerrit.libreoffice.org/76031
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/unotest/source/cpp/macros_test.cxx b/unotest/source/cpp/macros_test.cxx
index f8449367876d..ffc2b970393c 100644
--- a/unotest/source/cpp/macros_test.cxx
+++ b/unotest/source/cpp/macros_test.cxx
@@ -25,8 +25,6 @@ namespace unotest {
uno::Reference<css::lang::XComponent> MacrosTest::loadFromDesktop(const OUString& rURL, const OUString& rDocService, const uno::Sequence<beans::PropertyValue>& rExtraArgs)
{
CPPUNIT_ASSERT_MESSAGE("no desktop", mxDesktop.is());
- uno::Reference<frame::XComponentLoader> xLoader(mxDesktop, uno::UNO_QUERY);
- CPPUNIT_ASSERT_MESSAGE("no loader", xLoader.is());
std::vector<beans::PropertyValue> args;
beans::PropertyValue aMacroValue;
aMacroValue.Name = "MacroExecutionMode";
@@ -47,7 +45,7 @@ uno::Reference<css::lang::XComponent> MacrosTest::loadFromDesktop(const OUString
args.insert(args.end(), rExtraArgs.begin(), rExtraArgs.end());
- uno::Reference<lang::XComponent> xComponent = xLoader->loadComponentFromURL(rURL, "_default", 0, comphelper::containerToSequence(args));
+ uno::Reference<lang::XComponent> xComponent = mxDesktop->loadComponentFromURL(rURL, "_default", 0, comphelper::containerToSequence(args));
OUString sMessage = "loading failed: " + rURL;
CPPUNIT_ASSERT_MESSAGE(OUStringToOString( sMessage, RTL_TEXTENCODING_UTF8 ).getStr( ), xComponent.is());
return xComponent;
diff --git a/unotools/source/config/configitem.cxx b/unotools/source/config/configitem.cxx
index 36cc9b68ed6a..29097d32fd56 100644
--- a/unotools/source/config/configitem.cxx
+++ b/unotools/source/config/configitem.cxx
@@ -351,7 +351,7 @@ Sequence< sal_Bool > ConfigItem::GetReadOnlyStates(const css::uno::Sequence< OUS
}
else
{
- xNode.set( xHierarchyAccess, UNO_QUERY );
+ xNode = xHierarchyAccess;
}
xSet.set(xNode, UNO_QUERY);
diff --git a/unotools/source/misc/mediadescriptor.cxx b/unotools/source/misc/mediadescriptor.cxx
index 98f27fc5bc37..18df713e52d2 100644
--- a/unotools/source/misc/mediadescriptor.cxx
+++ b/unotools/source/misc/mediadescriptor.cxx
@@ -365,7 +365,7 @@ bool MediaDescriptor::isStreamReadOnly() const
css::uno::Reference< css::ucb::XContent > xContent = getUnpackedValueOrDefault(MediaDescriptor::PROP_UCBCONTENT(), css::uno::Reference< css::ucb::XContent >());
if (xContent.is())
{
- css::uno::Reference< css::ucb::XContentIdentifier > xId(xContent->getIdentifier(), css::uno::UNO_QUERY);
+ css::uno::Reference< css::ucb::XContentIdentifier > xId = xContent->getIdentifier();
OUString aScheme;
if (xId.is())
aScheme = xId->getContentProviderScheme();
diff --git a/unoxml/source/dom/attributesmap.cxx b/unoxml/source/dom/attributesmap.cxx
index 4c0a86c17074..9ff0298bdc7b 100644
--- a/unoxml/source/dom/attributesmap.cxx
+++ b/unoxml/source/dom/attributesmap.cxx
@@ -164,9 +164,7 @@ namespace DOM
static_cast<OWeakObject*>(this),
DOMExceptionType_NOT_FOUND_ERR);
}
- Reference< XNode > const xRet(
- m_pElement->removeAttributeNode(xAttr), UNO_QUERY);
- return xRet;
+ return m_pElement->removeAttributeNode(xAttr);
}
/**
@@ -185,9 +183,7 @@ namespace DOM
static_cast<OWeakObject*>(this),
DOMExceptionType_NOT_FOUND_ERR);
}
- Reference< XNode > const xRet(
- m_pElement->removeAttributeNode(xAttr), UNO_QUERY);
- return xRet;
+ return m_pElement->removeAttributeNode(xAttr);
}
/**
@@ -204,9 +200,7 @@ namespace DOM
DOMExceptionType_HIERARCHY_REQUEST_ERR);
}
// no MutexGuard needed: m_pElement is const
- Reference< XNode > const xRet(
- m_pElement->setAttributeNode(xAttr), UNO_QUERY);
- return xRet;
+ return m_pElement->setAttributeNode(xAttr);
}
/**
@@ -223,9 +217,7 @@ namespace DOM
DOMExceptionType_HIERARCHY_REQUEST_ERR);
}
// no MutexGuard needed: m_pElement is const
- Reference< XNode > const xRet(
- m_pElement->setAttributeNodeNS(xAttr), UNO_QUERY);
- return xRet;
+ return m_pElement->setAttributeNodeNS(xAttr);
}
}
diff --git a/unoxml/source/dom/document.cxx b/unoxml/source/dom/document.cxx
index fc89b8aa4980..4b7d246e867d 100644
--- a/unoxml/source/dom/document.cxx
+++ b/unoxml/source/dom/document.cxx
@@ -726,7 +726,7 @@ namespace DOM
Reference< XAttr > const xNew =
xDocument->createAttribute(xAttr->getName());
xNew->setValue(xAttr->getValue());
- xNode.set(xNew, UNO_QUERY);
+ xNode = xNew;
break;
}
case NodeType_CDATA_SECTION_NODE:
@@ -735,7 +735,7 @@ namespace DOM
UNO_QUERY_THROW);
Reference< XCDATASection > const xNewCData =
xDocument->createCDATASection(xCData->getData());
- xNode.set(xNewCData, UNO_QUERY);
+ xNode = xNewCData;
break;
}
case NodeType_COMMENT_NODE:
@@ -744,7 +744,7 @@ namespace DOM
UNO_QUERY_THROW);
Reference< XComment > const xNewComment =
xDocument->createComment(xComment->getData());
- xNode.set(xNewComment, UNO_QUERY);
+ xNode = xNewComment;
break;
}
case NodeType_DOCUMENT_FRAGMENT_NODE:
@@ -753,7 +753,7 @@ namespace DOM
UNO_QUERY_THROW);
Reference< XDocumentFragment > const xNewFrag =
xDocument->createDocumentFragment();
- xNode.set(xNewFrag, UNO_QUERY);
+ xNode = xNewFrag;
break;
}
case NodeType_ELEMENT_NODE:
@@ -798,7 +798,7 @@ namespace DOM
}
}
}
- xNode.set(xNewElement, UNO_QUERY);
+ xNode = xNewElement;
break;
}
case NodeType_ENTITY_REFERENCE_NODE:
@@ -807,7 +807,7 @@ namespace DOM
UNO_QUERY_THROW);
Reference< XEntityReference > const xNewRef(
xDocument->createEntityReference(xRef->getNodeName()));
- xNode.set(xNewRef, UNO_QUERY);
+ xNode = xNewRef;
break;
}
case NodeType_PROCESSING_INSTRUCTION_NODE:
@@ -817,7 +817,7 @@ namespace DOM
Reference< XProcessingInstruction > const xNewPi(
xDocument->createProcessingInstruction(
xPi->getTarget(), xPi->getData()));
- xNode.set(xNewPi, UNO_QUERY);
+ xNode = xNewPi;
break;
}
case NodeType_TEXT_NODE:
@@ -825,7 +825,7 @@ namespace DOM
Reference< XText > const xText(xImportedNode, UNO_QUERY_THROW);
Reference< XText > const xNewText(
xDocument->createTextNode(xText->getData()));
- xNode.set(xNewText, UNO_QUERY);
+ xNode = xNewText;
break;
}
case NodeType_ENTITY_NODE:
diff --git a/unoxml/source/dom/element.cxx b/unoxml/source/dom/element.cxx
index 6ed9ba1ebd1e..e5e82b2613cd 100644
--- a/unoxml/source/dom/element.cxx
+++ b/unoxml/source/dom/element.cxx
@@ -632,7 +632,7 @@ namespace DOM
"DOMAttrModified"), UNO_QUERY);
event->initMutationEvent("DOMAttrModified",
true, false,
- Reference< XNode >(getAttributeNode(name), UNO_QUERY),
+ getAttributeNode(name),
oldValue, value, name, aChangeType);
guard.clear(); // release mutex before calling event handlers
@@ -713,7 +713,7 @@ namespace DOM
"DOMAttrModified"), UNO_QUERY);
event->initMutationEvent(
"DOMAttrModified", true, false,
- Reference< XNode >(getAttributeNodeNS(namespaceURI, OUString(reinterpret_cast<char const *>(pLName), strlen(reinterpret_cast<char const *>(pLName)), RTL_TEXTENCODING_UTF8)), UNO_QUERY),
+ getAttributeNodeNS(namespaceURI, OUString(reinterpret_cast<char const *>(pLName), strlen(reinterpret_cast<char const *>(pLName)), RTL_TEXTENCODING_UTF8)),
oldValue, value, qualifiedName, aChangeType);
guard.clear(); // release mutex before calling event handlers
diff --git a/unoxml/source/rdf/librdf_repository.cxx b/unoxml/source/rdf/librdf_repository.cxx
index 6268da4ff4c9..26f4a950518c 100644
--- a/unoxml/source/rdf/librdf_repository.cxx
+++ b/unoxml/source/rdf/librdf_repository.cxx
@@ -2287,10 +2287,8 @@ librdf_TypeConverter::Statement librdf_TypeConverter::extractStatement_NoLock(
{
std::shared_ptr<Resource> const pSubject(
extractResource_NoLock(i_xSubject));
- const uno::Reference<rdf::XResource> xPredicate(i_xPredicate,
- uno::UNO_QUERY);
std::shared_ptr<URI> const pPredicate(
- std::dynamic_pointer_cast<URI>(extractResource_NoLock(xPredicate)));
+ std::dynamic_pointer_cast<URI>(extractResource_NoLock(i_xPredicate)));
std::shared_ptr<Node> const pObject(extractNode_NoLock(i_xObject));
return Statement(pSubject, pPredicate, pObject);
}
@@ -2381,8 +2379,7 @@ librdf_TypeConverter::convertToXResource(librdf_node* i_pNode) const
OString(reinterpret_cast<const sal_Char*>(label)),
RTL_TEXTENCODING_UTF8) );
try {
- return uno::Reference<rdf::XResource>(
- rdf::BlankNode::create(m_xContext, labelU), uno::UNO_QUERY);
+ return rdf::BlankNode::create(m_xContext, labelU);
} catch (const lang::IllegalArgumentException &) {
css::uno::Any anyEx = cppu::getCaughtException();
throw lang::WrappedTargetRuntimeException(
@@ -2390,8 +2387,7 @@ librdf_TypeConverter::convertToXResource(librdf_node* i_pNode) const
"illegal blank node label", m_rRep, anyEx);
}
} else {
- return uno::Reference<rdf::XResource>(convertToXURI(i_pNode),
- uno::UNO_QUERY);
+ return convertToXURI(i_pNode);
}
}
@@ -2400,8 +2396,7 @@ librdf_TypeConverter::convertToXNode(librdf_node* i_pNode) const
{
if (!i_pNode) return nullptr;
if (!librdf_node_is_literal(i_pNode)) {
- return uno::Reference<rdf::XNode>(convertToXResource(i_pNode),
- uno::UNO_QUERY);
+ return convertToXResource(i_pNode);
}
const unsigned char* value( librdf_node_get_literal_value(i_pNode) );
if (!value) {
@@ -2420,19 +2415,13 @@ librdf_TypeConverter::convertToXNode(librdf_node* i_pNode) const
const OUString langU( OStringToOUString(
OString(reinterpret_cast<const sal_Char*>(lang)),
RTL_TEXTENCODING_UTF8) );
- return uno::Reference<rdf::XNode>(
- rdf::Literal::createWithLanguage(m_xContext, valueU, langU),
- uno::UNO_QUERY);
+ return rdf::Literal::createWithLanguage(m_xContext, valueU, langU);
} else if (pType) {
uno::Reference<rdf::XURI> xType(convertToXURI(pType));
OSL_ENSURE(xType.is(), "convertToXNode: null uri");
- return uno::Reference<rdf::XNode>(
- rdf::Literal::createWithType(m_xContext, valueU, xType),
- uno::UNO_QUERY);
+ return rdf::Literal::createWithType(m_xContext, valueU, xType);
} else {
- return uno::Reference<rdf::XNode>(
- rdf::Literal::create(m_xContext, valueU),
- uno::UNO_QUERY);
+ return rdf::Literal::create(m_xContext, valueU);
}
}
diff --git a/uui/source/iahndl-filter.cxx b/uui/source/iahndl-filter.cxx
index a2cdb255a6d9..25a13a84e275 100644
--- a/uui/source/iahndl-filter.cxx
+++ b/uui/source/iahndl-filter.cxx
@@ -244,9 +244,7 @@ handleFilterOptionsRequest_(
document::XImporter > xImporter(
xFilterDialog, uno::UNO_QUERY );
if( xImporter.is() )
- xImporter->setTargetDocument(
- uno::Reference< lang::XComponent >(
- rRequest.rModel, uno::UNO_QUERY ) );
+ xImporter->setTargetDocument( rRequest.rModel );
xFilterProperties->setPropertyValues(
rRequest.rProperties );
diff --git a/uui/source/passwordcontainer.cxx b/uui/source/passwordcontainer.cxx
index 5335930c1199..7b94a87fd14d 100644
--- a/uui/source/passwordcontainer.cxx
+++ b/uui/source/passwordcontainer.cxx
@@ -123,8 +123,6 @@ bool PasswordContainerHelper::handleAuthenticationRequest(
OUString const & rURL,
uno::Reference< task::XInteractionHandler2 > const & xIH )
{
- uno::Reference< task::XInteractionHandler > xIH1(xIH, uno::UNO_QUERY);
-
// Is continuation even a XInteractionSupplyAuthentication2, which
// is derived from XInteractionSupplyAuthentication?
uno::Reference< ucb::XInteractionSupplyAuthentication2 >
@@ -174,12 +172,12 @@ bool PasswordContainerHelper::handleAuthenticationRequest(
{
task::UrlRecord aRec;
if ( !rURL.isEmpty() )
- aRec = m_xPasswordContainer->find(rURL, xIH1);
+ aRec = m_xPasswordContainer->find(rURL, xIH);
if ( !aRec.UserList.hasElements() )
{
// compat: try server name.
- aRec = m_xPasswordContainer->find(rRequest.ServerName, xIH1);
+ aRec = m_xPasswordContainer->find(rRequest.ServerName, xIH);
}
if ( fillContinuation( false,
@@ -198,13 +196,13 @@ bool PasswordContainerHelper::handleAuthenticationRequest(
task::UrlRecord aRec;
if ( !rURL.isEmpty() )
aRec = m_xPasswordContainer->findForName(
- rURL, rRequest.UserName, xIH1);
+ rURL, rRequest.UserName, xIH);
if ( !aRec.UserList.hasElements() )
{
// compat: try server name.
aRec = m_xPasswordContainer->findForName(
- rRequest.ServerName, rRequest.UserName, xIH1);
+ rRequest.ServerName, rRequest.UserName, xIH);
}
if ( fillContinuation( false,
@@ -233,8 +231,6 @@ bool PasswordContainerHelper::addRecord(
uno::Reference< task::XInteractionHandler2 > const & xIH,
bool bPersist )
{
- uno::Reference< task::XInteractionHandler > xIH1(xIH, uno::UNO_QUERY);
-
try
{
if ( !rUsername.isEmpty() )
@@ -254,13 +250,13 @@ bool PasswordContainerHelper::addRecord(
m_xPasswordContainer->addPersistent( rURL,
rUsername,
rPasswords,
- xIH1 );
+ xIH );
}
else
m_xPasswordContainer->add( rURL,
rUsername,
rPasswords,
- xIH1 );
+ xIH );
}
else
{
commit d943b42214321c630147176210733399c57e6f19
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Sat Jul 20 18:25:01 2019 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sun Jul 21 08:49:23 2019 +0200
loplugin:referencecasting in ucb
Change-Id: I2f0959c280a832fb80fd0dda263de5f9ae63a698
Reviewed-on: https://gerrit.libreoffice.org/76030
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/ucb/source/cacher/dynamicresultsetwrapper.cxx b/ucb/source/cacher/dynamicresultsetwrapper.cxx
index 042a63c57c55..e33f710f0724 100644
--- a/ucb/source/cacher/dynamicresultsetwrapper.cxx
+++ b/ucb/source/cacher/dynamicresultsetwrapper.cxx
@@ -135,7 +135,7 @@ void SAL_CALL DynamicResultSetWrapper::dispose()
return;
m_bInDispose = true;
- xSourceComponent.set(m_xSource, UNO_QUERY);
+ xSourceComponent = m_xSource;
if( m_pDisposeEventListeners && m_pDisposeEventListeners->getLength() )
{
@@ -326,7 +326,7 @@ Reference< XResultSet > SAL_CALL DynamicResultSetWrapper::getStaticResultSet()
xSource = m_xSource;
m_bStatic = true;
- xMyListenerImpl.set( css::uno::Reference< css::ucb::XDynamicResultSetListener >(m_xMyListenerImpl.get()), UNO_QUERY );
+ xMyListenerImpl = m_xMyListenerImpl.get();
}
if( xSource.is() )
diff --git a/ucb/source/ucp/hierarchy/hierarchycontent.cxx b/ucb/source/ucp/hierarchy/hierarchycontent.cxx
index 65051e16c193..4b55810aa923 100644
--- a/ucb/source/ucp/hierarchy/hierarchycontent.cxx
+++ b/ucb/source/ucp/hierarchy/hierarchycontent.cxx
@@ -889,10 +889,9 @@ uno::Reference< sdbc::XRow > HierarchyContent::getPropertyValues(
if ( !bTriedToGetAdditionalPropSet && !xAdditionalPropSet.is() )
{
- xAdditionalPropSet.set(
+ xAdditionalPropSet =
pProvider->getAdditionalPropertySet( rContentId,
- false ),
- uno::UNO_QUERY );
+ false );
bTriedToGetAdditionalPropSet = true;
}
@@ -965,9 +964,8 @@ uno::Reference< sdbc::XRow > HierarchyContent::getPropertyValues(
// Append all Additional Core Properties.
- uno::Reference< beans::XPropertySet > xSet(
- pProvider->getAdditionalPropertySet( rContentId, false ),
- uno::UNO_QUERY );
+ uno::Reference< beans::XPropertySet > xSet =
+ pProvider->getAdditionalPropertySet( rContentId, false );
xRow->appendPropertySet( xSet );
}
diff --git a/ucb/source/ucp/package/pkgcontent.cxx b/ucb/source/ucp/package/pkgcontent.cxx
index 85cb0b16d3c8..8399b2298f12 100644
--- a/ucb/source/ucp/package/pkgcontent.cxx
+++ b/ucb/source/ucp/package/pkgcontent.cxx
@@ -811,10 +811,9 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
if ( !bTriedToGetAdditionalPropSet && !xAdditionalPropSet.is() )
{
- xAdditionalPropSet.set(
+ xAdditionalPropSet =
rProvider->getAdditionalPropertySet( rContentId,
- false ),
- uno::UNO_QUERY );
+ false );
bTriedToGetAdditionalPropSet = true;
}
@@ -932,9 +931,8 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
// Append all Additional Core Properties.
- uno::Reference< beans::XPropertySet > xSet(
- rProvider->getAdditionalPropertySet( rContentId, false ),
- uno::UNO_QUERY );
+ uno::Reference< beans::XPropertySet > xSet =
+ rProvider->getAdditionalPropertySet( rContentId, false );
xRow->appendPropertySet( xSet );
}
diff --git a/ucb/source/ucp/tdoc/tdoc_content.cxx b/ucb/source/ucp/tdoc/tdoc_content.cxx
index 8a693fbe133b..9f9377a711e6 100644
--- a/ucb/source/ucp/tdoc/tdoc_content.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_content.cxx
@@ -925,10 +925,9 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
if ( !bTriedToGetAdditionalPropSet && !xAdditionalPropSet.is() )
{
- xAdditionalPropSet.set(
+ xAdditionalPropSet =
pProvider->getAdditionalPropertySet( rContentId,
- false ),
- uno::UNO_QUERY );
+ false );
bTriedToGetAdditionalPropSet = true;
}
@@ -1019,9 +1018,8 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
// Append all Additional Core Properties.
- uno::Reference< beans::XPropertySet > xSet(
- pProvider->getAdditionalPropertySet( rContentId, false ),
- uno::UNO_QUERY );
+ uno::Reference< beans::XPropertySet > xSet =
+ pProvider->getAdditionalPropertySet( rContentId, false );
xRow->appendPropertySet( xSet );
}
@@ -2131,12 +2129,7 @@ bool Content::hasData( ContentProvider const * pProvider, const Uri & rUri )
if ( !xStorage.is() )
return false;
- uno::Reference< container::XNameAccess > xParentNA(
- xStorage, uno::UNO_QUERY );
-
- OSL_ENSURE( xParentNA.is(), "Got no css.container.XNameAccess!" );
-
- return xParentNA->hasByName( rUri.getDecodedName() );
+ return xStorage->hasByName( rUri.getDecodedName() );
}
}
diff --git a/ucb/source/ucp/tdoc/tdoc_provider.cxx b/ucb/source/ucp/tdoc/tdoc_provider.cxx
index fdcfd241502c..9ef2524ae891 100644
--- a/ucb/source/ucp/tdoc/tdoc_provider.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_provider.cxx
@@ -535,15 +535,8 @@ bool ContentProvider::queryNamesOfChildren(
if ( xStorage.is() )
{
- uno::Reference< container::XNameAccess > xNA(
- xStorage, uno::UNO_QUERY );
-
- OSL_ENSURE( xNA.is(), "Got no css.container.XNameAccess!" );
- if ( xNA.is() )
- {
- rNames = xNA->getElementNames();
- return true;
- }
+ rNames = xStorage->getElementNames();
+ return true;
}
}
catch ( embed::InvalidStorageException const & )
diff --git a/ucb/source/ucp/tdoc/tdoc_stgelems.cxx b/ucb/source/ucp/tdoc/tdoc_stgelems.cxx
index 937b33d3a082..b80db98d9554 100644
--- a/ucb/source/ucp/tdoc/tdoc_stgelems.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_stgelems.cxx
@@ -66,7 +66,7 @@ Storage::Storage( const uno::Reference< uno::XComponentContext > & rxContext,
m_xFactory( xFactory ),
m_xWrappedStorage( xStorageToWrap ),
m_xWrappedTransObj( xStorageToWrap, uno::UNO_QUERY ), // optional interface
- m_xWrappedComponent( xStorageToWrap, uno::UNO_QUERY ),
+ m_xWrappedComponent( xStorageToWrap ),
m_xWrappedTypeProv( xStorageToWrap, uno::UNO_QUERY ),
m_bIsDocumentStorage( Uri( rUri ).isDocument() )
{
@@ -620,7 +620,7 @@ Stream::Stream(
m_xWrappedStream( xStreamToWrap ),
m_xWrappedOutputStream( xStreamToWrap->getOutputStream() ), // might be empty
m_xWrappedTruncate( m_xWrappedOutputStream, uno::UNO_QUERY ), // might be empty
- m_xWrappedInputStream( xStreamToWrap->getInputStream(), uno::UNO_QUERY ),
+ m_xWrappedInputStream( xStreamToWrap->getInputStream() ),
m_xWrappedComponent( xStreamToWrap, uno::UNO_QUERY ),
m_xWrappedTypeProv( xStreamToWrap, uno::UNO_QUERY )
{
diff --git a/ucb/source/ucp/webdav-neon/webdavcontent.cxx b/ucb/source/ucp/webdav-neon/webdavcontent.cxx
index 25941bce6c13..cb1e2e02d2fc 100644
--- a/ucb/source/ucp/webdav-neon/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav-neon/webdavcontent.cxx
@@ -1213,10 +1213,9 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
// Process local Additional Properties.
if ( !bTriedToGetAdditionalPropSet && !xAdditionalPropSet.is() )
{
- xAdditionalPropSet.set(
+ xAdditionalPropSet =
rProvider->getAdditionalPropertySet( rContentId,
- false ),
- uno::UNO_QUERY );
+ false );
bTriedToGetAdditionalPropSet = true;
}
@@ -1246,9 +1245,8 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
}
// Append all local Additional Properties.
- uno::Reference< beans::XPropertySet > xSet(
- rProvider->getAdditionalPropertySet( rContentId, false ),
- uno::UNO_QUERY );
+ uno::Reference< beans::XPropertySet > xSet =
+ rProvider->getAdditionalPropertySet( rContentId, false );
xRow->appendPropertySet( xSet );
}
More information about the Libreoffice-commits
mailing list