[Libreoffice-commits] core.git: 2 commits - include/cppuhelper xmloff/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Sat Nov 9 16:12:39 UTC 2019
include/cppuhelper/weakref.hxx | 6 ++++++
xmloff/source/core/nmspmap.cxx | 20 ++++++++------------
2 files changed, 14 insertions(+), 12 deletions(-)
New commits:
commit a0ebc6f898992dbc0da9f252911da867dfdfd741
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Sat Nov 9 08:47:48 2019 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sat Nov 9 17:11:35 2019 +0100
missing move operator=
Change-Id: Id184cbc88f41eda78c58898693285e185298a1e4
Reviewed-on: https://gerrit.libreoffice.org/82343
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/include/cppuhelper/weakref.hxx b/include/cppuhelper/weakref.hxx
index c681284bac77..8a94145998fa 100644
--- a/include/cppuhelper/weakref.hxx
+++ b/include/cppuhelper/weakref.hxx
@@ -172,6 +172,12 @@ public:
const css::uno::Reference< interface_type > & xInt )
{ WeakReferenceHelper::operator=(xInt); return *this; }
+#if defined LIBO_INTERNAL_ONLY
+ WeakReference & SAL_CALL operator = (
+ const css::uno::Reference< interface_type > && xInt )
+ { WeakReferenceHelper::operator=(std::move(xInt)); return *this; }
+#endif
+
/** Gets a hard reference to the object.
@return hard reference or null, if the weakly referenced interface has gone
commit 5ddbfea5f9f2c7fca852e2a25c804ad7050d14fa
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Fri Nov 8 19:09:01 2019 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sat Nov 9 17:11:24 2019 +0100
micro-optimisation
Change-Id: I392b897be4f78bf368149ac47646c3d79790fd96
Reviewed-on: https://gerrit.libreoffice.org/82342
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/xmloff/source/core/nmspmap.cxx b/xmloff/source/core/nmspmap.cxx
index 7aa50542b5e8..c1ee7412f438 100644
--- a/xmloff/source/core/nmspmap.cxx
+++ b/xmloff/source/core/nmspmap.cxx
@@ -173,19 +173,15 @@ const OUString& SvXMLNamespaceMap::GetNameByKey( sal_uInt16 nKey ) const
OUString SvXMLNamespaceMap::GetAttrNameByKey( sal_uInt16 nKey ) const
{
- OUStringBuffer sAttrName;
NameSpaceMap::const_iterator aIter = aNameMap.find ( nKey );
- if (aIter != aNameMap.end())
- {
- sAttrName.append( sXMLNS );
- const OUString & prefix( (*aIter).second->sPrefix );
- if (!prefix.isEmpty()) // not default namespace
- {
- sAttrName.append( ':' );
- sAttrName.append( prefix );
- }
- }
- return sAttrName.makeStringAndClear();
+ if (aIter == aNameMap.end())
+ return OUString();
+
+ const OUString & prefix( (*aIter).second->sPrefix );
+ if (prefix.isEmpty()) // default namespace
+ return sXMLNS;
+
+ return sXMLNS + ":" + prefix;
}
OUString SvXMLNamespaceMap::GetQNameByKey( sal_uInt16 nKey,
More information about the Libreoffice-commits
mailing list