Hi,
I have submitted a patch for review:
https://gerrit.libreoffice.org/4264
To pull it, you can do:
git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/64/4264/1
rtl: add global empty oustring
Change-Id: Ia5c3fcf564243dd90eb816d4ef571b3750a5ef5d
---
M include/rtl/ustring.hxx
M sal/rtl/ustring.cxx
2 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/include/rtl/ustring.hxx b/include/rtl/ustring.hxx
index 112486d..49a9696 100644
--- a/include/rtl/ustring.hxx
+++ b/include/rtl/ustring.hxx
@@ -55,6 +55,13 @@
namespace rtl
{
+class OUString;
+}
+SAL_DLLPUBLIC rtl::OUString& SAL_CALL rtl_ustr_get_empty(void);
+
+namespace rtl
+{
+
#ifdef RTL_STRING_UNITTEST
#undef rtl
#endif
@@ -2232,6 +2239,11 @@
rtl_uString_newFromAscii( &pNew, value );
return OUString( pNew, SAL_NO_ACQUIRE );
}
+
+ static OUString& getEmptyOUString(void)
+ {
+ return rtl_ustr_get_empty();
+ }
};
/* ======================================================================= */
diff --git a/sal/rtl/ustring.cxx b/sal/rtl/ustring.cxx
index bdebd89..0d045c2 100644
--- a/sal/rtl/ustring.cxx
+++ b/sal/rtl/ustring.cxx
@@ -44,6 +44,7 @@
#include "rtl/math.h"
#include "rtl/tencinfo.h"
+#include "rtl/ustring.hxx"
/* ======================================================================= */
@@ -75,6 +76,13 @@
#include "strtmpl.cxx"
+rtl::OUString& SAL_CALL rtl_ustr_get_empty(void)
+{
+ static rtl::OUString aEmpty;
+ return aEmpty;
+}
+
+
sal_Int32 rtl_ustr_indexOfAscii_WithLength(
sal_Unicode const * str, sal_Int32 len,
char const * subStr, sal_Int32 subLen) SAL_THROW_EXTERN_C()
--
To view, visit https://gerrit.libreoffice.org/4264
To unsubscribe, visit https://gerrit.libreoffice.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia5c3fcf564243dd90eb816d4ef571b3750a5ef5d
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Norbert Thiebaud <nthiebaud@gmail.com>
Context
- [PATCH] rtl: add global empty oustring · Norbert Thiebaud (via Code Review)
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.