Preface: I am a novice in many things.
To get familiar with the stringclasses I chose the "rtl namespace prefix
removal" because I have seen some patches of this kind on the mailinglist.
My questions:
1) I did not find background info - at least not at
<https://wiki.documentfoundation.org/Development/String_Classes> why the
removing of the "rtl::" namespace prefix is preferable.
Any pointers? - or is it more a cosmetic cleanup?
2) A "make clean; make all" was successfull. Is this enough to think the change
correct?
-- gerhard
From 936d0d4fd4ece311559cf04b8c54e1cab66b9122 Mon Sep 17 00:00:00 2001
From: gerhard oettl <lodev@ogersoft.at>
Date: Sat, 13 Oct 2012 11:31:24 +0200
Subject: [PATCH] rtl::OUString to OUString
Content-Type: text/plain; charset="utf-8"
Change-Id: I75bf4d85103663df2e5a2fb905f39c2024769c5d
---
sw/source/core/text/portxt.cxx | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/sw/source/core/text/portxt.cxx b/sw/source/core/text/portxt.cxx
index a6391f5..e2440f9 100644
--- a/sw/source/core/text/portxt.cxx
+++ b/sw/source/core/text/portxt.cxx
@@ -521,7 +521,7 @@ void SwTxtPortion::FormatEOL( SwTxtFormatInfo &rInf )
if( nHoleLen == GetLen() )
nBlankSize = Width();
else
- nBlankSize = nHoleLen * rInf.GetTxtSize(rtl::OUString(' ')).Width();
+ nBlankSize = nHoleLen * rInf.GetTxtSize(OUString(' ')).Width();
Width( Width() - nBlankSize );
rInf.X( rInf.X() - nBlankSize );
SetLen( GetLen() - nHoleLen );
@@ -559,13 +559,13 @@ void SwTxtPortion::Paint( const SwTxtPaintInfo &rInf ) const
if (rInf.OnWin() && 1==rInf.GetLen() &&
CH_TXT_ATR_FIELDEND==rInf.GetTxt().GetChar(rInf.GetIdx()))
{
rInf.DrawBackBrush( *this );
- const rtl::OUString aTxt(CH_TXT_ATR_SUBST_FIELDEND);
+ const OUString aTxt(CH_TXT_ATR_SUBST_FIELDEND);
rInf.DrawText( aTxt, *this, 0, aTxt.getLength(), false );
}
else if (rInf.OnWin() && 1==rInf.GetLen() &&
CH_TXT_ATR_FIELDSTART==rInf.GetTxt().GetChar(rInf.GetIdx()))
{
rInf.DrawBackBrush( *this );
- const rtl::OUString aTxt(CH_TXT_ATR_SUBST_FIELDSTART);
+ const OUString aTxt(CH_TXT_ATR_SUBST_FIELDSTART);
rInf.DrawText( aTxt, *this, 0, aTxt.getLength(), false );
}
else if( GetLen() )
@@ -728,7 +728,7 @@ void SwHolePortion::Paint( const SwTxtPaintInfo &rInf ) const
// #i16816# tagged pdf support
if( rInf.GetVsh() && rInf.GetVsh()->GetViewOptions()->IsPDFExport() )
{
- const rtl::OUString aTxt( ' ' );
+ const OUString aTxt( ' ' );
rInf.DrawText( aTxt, *this, 0, 1, false );
}
}
@@ -768,19 +768,19 @@ sal_Bool SwFieldMarkPortion::Format( SwTxtFormatInfo & )
namespace {
static sal_Int32 getCurrentListIndex( IFieldmark* pBM,
- ::rtl::OUString* io_pCurrentText = NULL )
+ OUString* io_pCurrentText = NULL )
{
const IFieldmark::parameter_map_t* const pParameters = pBM->GetParameters();
sal_Int32 nCurrentIdx = 0;
- const IFieldmark::parameter_map_t::const_iterator pResult =
pParameters->find(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ODF_FORMDROPDOWN_RESULT)));
+ const IFieldmark::parameter_map_t::const_iterator pResult =
pParameters->find(OUString(RTL_CONSTASCII_USTRINGPARAM(ODF_FORMDROPDOWN_RESULT)));
if(pResult != pParameters->end())
pResult->second >>= nCurrentIdx;
if(io_pCurrentText)
{
- const IFieldmark::parameter_map_t::const_iterator pListEntries =
pParameters->find(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ODF_FORMDROPDOWN_LISTENTRY)));
+ const IFieldmark::parameter_map_t::const_iterator pListEntries =
pParameters->find(OUString(RTL_CONSTASCII_USTRINGPARAM(ODF_FORMDROPDOWN_LISTENTRY)));
if(pListEntries != pParameters->end())
{
- uno::Sequence< ::rtl::OUString > vListEntries;
+ uno::Sequence< OUString > vListEntries;
pListEntries->second >>= vListEntries;
if(nCurrentIdx < vListEntries.getLength())
*io_pCurrentText = vListEntries[nCurrentIdx];
@@ -814,7 +814,7 @@ void SwFieldFormPortion::Paint( const SwTxtPaintInfo& rInf ) const
}
else if ( pBM->GetFieldname( ) == ODF_FORMDROPDOWN )
{ // a list...
- rtl::OUString aTxt;
+ OUString aTxt;
getCurrentListIndex( pBM, &aTxt );
rInf.DrawViewOpt( *this, POR_FLD );
rInf.DrawText( aTxt, *this, 0, aTxt.getLength(), false );
@@ -845,7 +845,7 @@ sal_Bool SwFieldFormPortion::Format( SwTxtFormatInfo & rInf )
}
else if ( pBM->GetFieldname( ) == ODF_FORMDROPDOWN )
{
- ::rtl::OUString aTxt;
+ OUString aTxt;
getCurrentListIndex( pBM, &aTxt );
SwPosSize aPosSize = rInf.GetTxtSize( aTxt );
Width( aPosSize.Width( ) );
--
1.7.2.5
Context
- [PATCH] rtl::OUString to OUString and some questions · oger000
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.