[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - 3 commits - include/com oox/source sd/source svtools/source
Stephan Bergmann
sbergman at redhat.com
Wed Sep 17 00:43:43 PDT 2014
include/com/sun/star/uno/Reference.h | 4 ++--
oox/source/ppt/timenode.cxx | 2 +-
sd/source/filter/ppt/pptinanimations.cxx | 2 +-
sd/source/ui/unoidl/unosrch.cxx | 2 +-
svtools/source/uno/treecontrolpeer.cxx | 1 -
5 files changed, 5 insertions(+), 6 deletions(-)
New commits:
commit 1131a069b0aa2b2e3f0b7bdd083ebe95d6cec719
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Mon Jun 16 10:22:31 2014 +0200
SAL_WARN_UNUSED_RESULT for static Reference::query function
...which the recent loplugin:staticcall changes showed was occasionally used
apparently under the assumption that it was non-static and changed the object
it was called on.
(cherry picked from commit 7242fe6e3360843f9ef5ce07b447de729323a3c8)
Conflicts:
include/com/sun/star/uno/Reference.h
svtools/source/uno/treecontrolpeer.cxx
Change-Id: I989a2a4ed3886d7f370855c9e8c1867e646c059b
diff --git a/include/com/sun/star/uno/Reference.h b/include/com/sun/star/uno/Reference.h
index b1299fd..636a339 100644
--- a/include/com/sun/star/uno/Reference.h
+++ b/include/com/sun/star/uno/Reference.h
@@ -546,13 +546,13 @@ public:
@param rRef interface reference
@return interface reference of demanded type (may be null)
*/
- inline static Reference< interface_type > SAL_CALL query( const BaseReference & rRef ) SAL_THROW( (RuntimeException) );
+ inline static SAL_WARN_UNUSED_RESULT Reference< interface_type > SAL_CALL query( const BaseReference & rRef ) SAL_THROW( (RuntimeException) );
/** Queries given interface for type interface_type.
@param pInterface interface pointer
@return interface reference of demanded type (may be null)
*/
- inline static Reference< interface_type > SAL_CALL query( XInterface * pInterface ) SAL_THROW( (RuntimeException) );
+ inline static SAL_WARN_UNUSED_RESULT Reference< interface_type > SAL_CALL query( XInterface * pInterface ) SAL_THROW( (RuntimeException) );
};
/// @cond INTERNAL
diff --git a/svtools/source/uno/treecontrolpeer.cxx b/svtools/source/uno/treecontrolpeer.cxx
index 1dc40e8..b4cbb4d 100644
--- a/svtools/source/uno/treecontrolpeer.cxx
+++ b/svtools/source/uno/treecontrolpeer.cxx
@@ -1450,7 +1450,6 @@ bool TreeControlPeer::loadImage( const OUString& rURL, Image& rImage )
{
Reference< XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
Reference< XInterface > x( graphic::GraphicProvider::create(xContext) );
- mxGraphicProvider.query( x );
mxGraphicProvider = Reference< XGraphicProvider >( x, UNO_QUERY );
}
commit 85406fb19b4576d34fe132c8c3ee0b3c4846459f
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Wed Sep 17 09:06:40 2014 +0200
css::uno::Reference::query does not have side effects
partial cherry-pick of c6eb208473109234886600ac299f0cc75ee94e9c "loplugin:staticcall"
Change-Id: Icb2ee78db94ba3a87a5c8ff35d72d191f01d4900
diff --git a/sd/source/filter/ppt/pptinanimations.cxx b/sd/source/filter/ppt/pptinanimations.cxx
index be60d65..813d04f 100644
--- a/sd/source/filter/ppt/pptinanimations.cxx
+++ b/sd/source/filter/ppt/pptinanimations.cxx
@@ -597,7 +597,7 @@ void AnimationImporter::fixMainSequenceTiming( const ::com::sun::star::uno::Refe
// with node
xE2->nextElement() >>= xEA2;
if( xEA2.is() )
- xE2.query( xEA2->createEnumeration() );
+ xE2.set(xEA2->createEnumeration(), css::uno::UNO_QUERY);
else
xE2.clear();
diff --git a/sd/source/ui/unoidl/unosrch.cxx b/sd/source/ui/unoidl/unosrch.cxx
index 65804c2..587a600 100644
--- a/sd/source/ui/unoidl/unosrch.cxx
+++ b/sd/source/ui/unoidl/unosrch.cxx
@@ -498,7 +498,7 @@ uno::Reference< text::XTextRange > SdUnoSearchReplaceShape::Search( uno::Refere
{
uno::Reference< text::XTextContent > xParagraph( xParaEnum->nextElement(), uno::UNO_QUERY );
if( xParagraph.is() )
- xEnumAccess.query( xParagraph );
+ xEnumAccess.set(xParagraph, css::uno::UNO_QUERY);
else
xEnumAccess.clear();
commit d6bb442109319c6d25c132c11338b5b84149918b
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Jun 13 17:50:50 2014 +0200
loplugin:staticcall
Change-Id: I1d428ccd434b7b6f61461ea29447291759c3a7bf
(cherry picked from commit 732e7bdfa2d0e7b0296599517f53d194c02acfee)
diff --git a/oox/source/ppt/timenode.cxx b/oox/source/ppt/timenode.cxx
index ff31be2..0070367 100644
--- a/oox/source/ppt/timenode.cxx
+++ b/oox/source/ppt/timenode.cxx
@@ -138,7 +138,7 @@ namespace oox { namespace ppt {
// with node
xE2->nextElement() >>= xEA2;
if( xEA2.is() )
- xE2.query( xEA2->createEnumeration() );
+ xE2.set(xEA2->createEnumeration(), css::uno::UNO_QUERY);
else
xE2.clear();
More information about the Libreoffice-commits
mailing list