Hi,
I have submitted a patch for review:
https://gerrit.libreoffice.org/1833
To pull it, you can do:
git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/33/1833/1
OUString: remove namespace and chained appends
Change-Id: I1eb7e61f3151c0469db26c69439e16be0f7063df
---
M sw/inc/hhcwrp.hxx
M sw/source/ui/lingu/hhcwrp.cxx
2 files changed, 8 insertions(+), 12 deletions(-)
diff --git a/sw/inc/hhcwrp.hxx b/sw/inc/hhcwrp.hxx
index 18fcd65..be20aa2 100644
--- a/sw/inc/hhcwrp.hxx
+++ b/sw/inc/hhcwrp.hxx
@@ -66,7 +66,7 @@
void SelectNewUnit_impl( const sal_Int32 nUnitStart,
const sal_Int32 nUnitEnd );
void ChangeText( const String &rNewText,
- const ::rtl::OUString& rOrigText,
+ const OUString& rOrigText,
const ::com::sun::star::uno::Sequence< sal_Int32 > *pOffsets,
SwPaM *pCrsr );
void ChangeText_impl( const String &rNewText, sal_Bool bKeepAttributes );
@@ -75,15 +75,15 @@
inline void SetDrawObj( sal_Bool bNew ) { m_bIsDrawObj = bNew; }
protected:
- virtual void GetNextPortion( ::rtl::OUString& rNextPortion,
+ virtual void GetNextPortion( OUString& rNextPortion,
LanguageType& rLangOfPortion,
sal_Bool bAllowImplicitChangesForNotConvertibleText );
virtual void HandleNewUnit( const sal_Int32 nUnitStart,
const sal_Int32 nUnitEnd );
virtual void ReplaceUnit(
const sal_Int32 nUnitStart, const sal_Int32 nUnitEnd,
- const ::rtl::OUString& rOrigText,
- const ::rtl::OUString& rReplaceWith,
+ const OUString& rOrigText,
+ const OUString& rReplaceWith,
const ::com::sun::star::uno::Sequence< sal_Int32 > &rOffsets,
ReplacementAction eAction,
LanguageType *pNewUnitLanguage );
diff --git a/sw/source/ui/lingu/hhcwrp.cxx b/sw/source/ui/lingu/hhcwrp.cxx
index 260afda..fb0615c 100644
--- a/sw/source/ui/lingu/hhcwrp.cxx
+++ b/sw/source/ui/lingu/hhcwrp.cxx
@@ -49,7 +49,6 @@
#include <unomid.h>
-using ::rtl::OUString;
using namespace ::com::sun::star;
using namespace ::com::sun::star::text;
using namespace ::com::sun::star::uno;
@@ -169,7 +168,7 @@
void SwHHCWrapper::GetNextPortion(
- ::rtl::OUString& rNextPortion,
+ OUString& rNextPortion,
LanguageType& rLangOfPortion,
sal_Bool bAllowChanges )
{
@@ -380,15 +379,12 @@
void SwHHCWrapper::ReplaceUnit(
const sal_Int32 nUnitStart, const sal_Int32 nUnitEnd,
- const ::rtl::OUString& rOrigText,
+ const OUString& rOrigText,
const OUString& rReplaceWith,
const uno::Sequence< sal_Int32 > &rOffsets,
ReplacementAction eAction,
LanguageType *pNewUnitLanguage )
{
- static OUString aBracketedStart( "(" );
- static OUString aBracketedEnd( ")" );
-
OSL_ENSURE( nUnitStart >= 0 && nUnitEnd >= nUnitStart, "wrong arguments" );
if (!(nUnitStart >= 0 && nUnitEnd >= nUnitStart))
return;
@@ -413,12 +409,12 @@
break;
case eReplacementBracketed :
{
- (((aNewTxt = aOrigTxt) += aBracketedStart) += rReplaceWith) += aBracketedEnd;
+ aNewTxt = aOrigTxt + "(" + rReplaceWith + ")";
}
break;
case eOriginalBracketed :
{
- (((aNewTxt = rReplaceWith) += aBracketedStart) += aOrigTxt) += aBracketedEnd;
+ aNewTxt = rReplaceWith + "(" + aOrigTxt + ")";
}
break;
case eReplacementAbove :
--
To view, visit https://gerrit.libreoffice.org/1833
To unsubscribe, visit https://gerrit.libreoffice.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1eb7e61f3151c0469db26c69439e16be0f7063df
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Matteo Casalin <matteo.casalin@gmx.com>
Context
- [PATCH] OUString: remove namespace and chained appends · Matteo Casalin (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.