summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/inc/SwStyleNameMapper.hxx26
-rw-r--r--sw/source/core/doc/SwStyleNameMapper.cxx55
-rw-r--r--sw/source/core/docnode/ndnotxt.cxx2
-rw-r--r--sw/source/core/docnode/node.cxx2
-rw-r--r--sw/source/core/fields/reffld.cxx4
-rw-r--r--sw/source/core/layout/atrfrm.cxx4
-rw-r--r--sw/source/core/text/EnhancedPDFExportHelper.cxx28
-rw-r--r--sw/source/core/txtnode/fmtatr2.cxx38
-rw-r--r--sw/source/core/txtnode/ndtxt.cxx2
-rw-r--r--sw/source/core/unocore/SwXTextDefaults.cxx2
-rw-r--r--sw/source/core/unocore/unocrsrhelper.cxx11
-rw-r--r--sw/source/core/unocore/unoframe.cxx5
-rw-r--r--sw/source/core/unocore/unoidx.cxx34
-rw-r--r--sw/source/core/unocore/unoobj.cxx14
-rw-r--r--sw/source/core/unocore/unosett.cxx59
-rw-r--r--sw/source/core/unocore/unostyle.cxx69
-rw-r--r--sw/source/core/unocore/unotbl.cxx14
-rw-r--r--sw/source/filter/ww8/ww8par5.cxx2
-rw-r--r--sw/source/filter/xml/xmlfmt.cxx8
-rw-r--r--sw/source/filter/xml/xmlfmte.cxx2
-rw-r--r--sw/source/filter/xml/xmltexte.cxx2
-rw-r--r--sw/source/ui/app/appenv.cxx2
-rw-r--r--sw/source/ui/app/docstyle.cxx2
-rw-r--r--sw/source/ui/chrdlg/chardlg.cxx6
-rw-r--r--sw/source/ui/config/optload.cxx13
-rw-r--r--sw/source/ui/dbui/dbinsdlg.cxx12
-rw-r--r--sw/source/ui/fmtui/tmpdlg.cxx4
-rw-r--r--sw/source/ui/index/cnttab.cxx4
-rw-r--r--sw/source/ui/misc/docfnote.cxx2
-rw-r--r--sw/source/ui/misc/num.cxx2
-rw-r--r--sw/source/ui/misc/outline.cxx4
-rw-r--r--sw/source/ui/uno/unotxvw.cxx11
-rw-r--r--sw/source/ui/utlui/uitool.cxx2
33 files changed, 240 insertions, 207 deletions
diff --git a/sw/inc/SwStyleNameMapper.hxx b/sw/inc/SwStyleNameMapper.hxx
index 1c3d512fa2d4..60efad6536cf 100644
--- a/sw/inc/SwStyleNameMapper.hxx
+++ b/sw/inc/SwStyleNameMapper.hxx
@@ -121,26 +121,32 @@ protected:
*pFrameProgMap,
*pNumRuleProgMap;
- static void fillNameFromId ( sal_uInt16 nId, String &rName, bool bProgName );
- static const String& getNameFromId ( sal_uInt16 nId, const String &rName, bool bProgName );
+ static void fillNameFromId(sal_uInt16 nId, OUString &rName, bool bProgName);
+ static const OUString& getNameFromId(sal_uInt16 nId, const OUString &rName,
+ bool bProgName);
static const NameToIdHash& getHashTable ( SwGetPoolIdFromName, bool bProgName );
public:
// This gets the UI Name from the programmatic name
- static const String& GetUIName ( const String& rName, SwGetPoolIdFromName );
- static void FillUIName ( const String& rName, String& rFillName, SwGetPoolIdFromName, bool bDisambiguate = false );
+ static const OUString& GetUIName(const OUString& rName, SwGetPoolIdFromName);
+ static void FillUIName(const OUString& rName, OUString& rFillName,
+ SwGetPoolIdFromName, bool bDisambiguate = false);
// Get the programmatic Name from the UI name
- static const String& GetProgName ( const String& rName, SwGetPoolIdFromName );
- static void FillProgName ( const String& rName, String& rFillName, SwGetPoolIdFromName, bool bDisambiguate = false );
+ static const OUString& GetProgName(const OUString& rName,
+ SwGetPoolIdFromName);
+ static void FillProgName(const OUString& rName, OUString& rFillName,
+ SwGetPoolIdFromName, bool bDisambiguate = false);
// This gets the UI Name from the Pool ID
- SW_DLLPUBLIC static void FillUIName ( sal_uInt16 nId, String& rFillName );
- SW_DLLPUBLIC static const String& GetUIName ( sal_uInt16 nId, const String& rName );
+ SW_DLLPUBLIC static void FillUIName(sal_uInt16 nId, OUString& rFillName);
+ SW_DLLPUBLIC static const OUString& GetUIName(sal_uInt16 nId,
+ const OUString& rName);
// This gets the programmatic Name from the Pool ID
- static void FillProgName( sal_uInt16 nId, String& rFillName );
- SW_DLLPUBLIC static const String& GetProgName ( sal_uInt16 nId, const String& rName );
+ static void FillProgName(sal_uInt16 nId, OUString& rFillName);
+ SW_DLLPUBLIC static const OUString& GetProgName(sal_uInt16 nId,
+ const OUString& rName);
// This gets the PoolId from the UI Name
SW_DLLPUBLIC static sal_uInt16 GetPoolIdFromUIName( const String& rName, SwGetPoolIdFromName );
diff --git a/sw/source/core/doc/SwStyleNameMapper.cxx b/sw/source/core/doc/SwStyleNameMapper.cxx
index 486094b30bcf..adaf2daf5eb0 100644
--- a/sw/source/core/doc/SwStyleNameMapper.cxx
+++ b/sw/source/core/doc/SwStyleNameMapper.cxx
@@ -376,11 +376,11 @@ bool lcl_SuffixIsUser ( const String & rString )
return bRet;
}
-void lcl_CheckSuffixAndDelete ( String & rString )
+static void lcl_CheckSuffixAndDelete(OUString & rString)
{
if (lcl_SuffixIsUser(rString))
{
- rString.Erase ( rString.Len() - 7, 7 );
+ rString = rString.copy(0, rString.getLength() - 7);
}
}
@@ -659,7 +659,8 @@ const NameToIdHash & SwStyleNameMapper::getHashTable ( SwGetPoolIdFromName eFlag
return *pHash;
}
// This gets the UI Name from the programmatic name
-const String& SwStyleNameMapper::GetUIName ( const String& rName, SwGetPoolIdFromName eFlags )
+const OUString& SwStyleNameMapper::GetUIName(const OUString& rName,
+ SwGetPoolIdFromName const eFlags)
{
sal_uInt16 nId = GetPoolIdFromProgName ( rName, eFlags );
return nId != USHRT_MAX ? GetUIName( nId, rName ) : rName;
@@ -667,14 +668,17 @@ const String& SwStyleNameMapper::GetUIName ( const String& rName, SwGetPoolIdFro
// Get the programmatic Name from the UI name
-const String& SwStyleNameMapper::GetProgName( const String& rName, SwGetPoolIdFromName eFlags )
+const OUString& SwStyleNameMapper::GetProgName(
+ const OUString& rName, SwGetPoolIdFromName const eFlags)
{
sal_uInt16 nId = GetPoolIdFromUIName ( rName, eFlags );
return nId != USHRT_MAX ? GetProgName( nId, rName ) : rName;
}
// Get the programmatic name from the UI name in rName and put it into rFillName
-void SwStyleNameMapper::FillProgName ( const String& rName, String& rFillName, SwGetPoolIdFromName eFlags, bool bDisambiguate )
+void SwStyleNameMapper::FillProgName(
+ const OUString& rName, OUString& rFillName,
+ SwGetPoolIdFromName const eFlags, bool const bDisambiguate)
{
sal_uInt16 nId = GetPoolIdFromUIName ( rName, eFlags );
if ( bDisambiguate && nId == USHRT_MAX )
@@ -687,23 +691,25 @@ void SwStyleNameMapper::FillProgName ( const String& rName, String& rFillName, S
{
// It isn't ...make sure the suffix isn't already " (user)"...if it is,
// we need to add another one
- if ( lcl_SuffixIsUser ( rFillName ) )
- rFillName.AppendAscii ( RTL_CONSTASCII_STRINGPARAM ( " (user)" ) );
+ if (lcl_SuffixIsUser(rFillName))
+ rFillName += " (user)";
}
else
{
// It's in the programmatic name table...append suffix
- rFillName.AppendAscii ( RTL_CONSTASCII_STRINGPARAM ( " (user)" ) );
+ rFillName += " (user)";
}
}
else
{
// If we aren't trying to disambiguate, then just do a normal fill
- fillNameFromId ( nId, rFillName, true);
+ fillNameFromId(nId, rFillName, true);
}
}
// Get the UI name from the programmatic name in rName and put it into rFillName
-void SwStyleNameMapper::FillUIName ( const String& rName, String& rFillName, SwGetPoolIdFromName eFlags, bool bDisambiguate )
+void SwStyleNameMapper::FillUIName(
+ const OUString& rName, OUString& rFillName,
+ SwGetPoolIdFromName const eFlags, bool const bDisambiguate)
{
sal_uInt16 nId = GetPoolIdFromProgName ( rName, eFlags );
if ( bDisambiguate && nId == USHRT_MAX )
@@ -715,11 +721,12 @@ void SwStyleNameMapper::FillUIName ( const String& rName, String& rFillName, SwG
else
{
// If we aren't trying to disambiguate, then just do a normal fill
- fillNameFromId ( nId, rFillName, false);
+ fillNameFromId(nId, rFillName, false);
}
}
-const String& SwStyleNameMapper::getNameFromId( sal_uInt16 nId, const String& rFillName, bool bProgName )
+const OUString& SwStyleNameMapper::getNameFromId(
+ sal_uInt16 const nId, const OUString& rFillName, bool const bProgName)
{
sal_uInt16 nStt = 0;
const boost::ptr_vector<String>* pStrArr = 0;
@@ -802,34 +809,38 @@ const String& SwStyleNameMapper::getNameFromId( sal_uInt16 nId, const String& rF
}
break;
}
- return pStrArr ? (pStrArr->operator[] ( nId - nStt ) ) : rFillName;
+ //FIXME
+ return pStrArr ? reinterpret_cast<OUString const&>(pStrArr->operator[](nId - nStt)) : rFillName;
}
-void SwStyleNameMapper::fillNameFromId( sal_uInt16 nId, String& rFillName, bool bProgName )
+void SwStyleNameMapper::fillNameFromId(
+ sal_uInt16 const nId, OUString& rFillName, bool bProgName)
{
rFillName = getNameFromId(nId, rFillName, bProgName);
}
// Get the UI Name from the pool ID
-void SwStyleNameMapper::FillUIName ( sal_uInt16 nId, String& rFillName )
+void SwStyleNameMapper::FillUIName(sal_uInt16 const nId, OUString& rFillName)
{
- fillNameFromId ( nId, rFillName, false );
+ fillNameFromId(nId, rFillName, false);
}
// Get the UI Name from the pool ID
-const String& SwStyleNameMapper::GetUIName ( sal_uInt16 nId, const String& rName )
+const OUString& SwStyleNameMapper::GetUIName(
+ sal_uInt16 const nId, const OUString& rName)
{
- return getNameFromId ( nId, rName, false );
+ return getNameFromId(nId, rName, false);
}
// Get the programmatic Name from the pool ID
-void SwStyleNameMapper::FillProgName ( sal_uInt16 nId, String& rFillName )
+void SwStyleNameMapper::FillProgName(sal_uInt16 nId, OUString& rFillName)
{
- fillNameFromId ( nId, rFillName, true );
+ fillNameFromId(nId, rFillName, true);
}
// Get the programmatic Name from the pool ID
-const String& SwStyleNameMapper::GetProgName ( sal_uInt16 nId, const String& rName )
+const OUString&
+SwStyleNameMapper::GetProgName(sal_uInt16 const nId, const OUString& rName)
{
- return getNameFromId ( nId, rName, true );
+ return getNameFromId(nId, rName, true);
}
// This gets the PoolId from the UI Name
sal_uInt16 SwStyleNameMapper::GetPoolIdFromUIName( const String& rName, SwGetPoolIdFromName eFlags )
diff --git a/sw/source/core/docnode/ndnotxt.cxx b/sw/source/core/docnode/ndnotxt.cxx
index 916a70fb1831..2d9559d3d8c3 100644
--- a/sw/source/core/docnode/ndnotxt.cxx
+++ b/sw/source/core/docnode/ndnotxt.cxx
@@ -64,7 +64,7 @@ void SwNoTxtNode::NewAttrSet( SwAttrPool& rPool )
// put names of parent style and conditional style:
const SwFmtColl* pFmtColl = GetFmtColl();
- String sVal;
+ OUString sVal;
SwStyleNameMapper::FillProgName( pFmtColl->GetName(), sVal, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, true );
SfxStringItem aFmtColl( RES_FRMATR_STYLE_NAME, sVal );
aNewAttrSet.Put( aFmtColl );
diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx
index 90f371cdf831..7bb6f71a21de 100644
--- a/sw/source/core/docnode/node.cxx
+++ b/sw/source/core/docnode/node.cxx
@@ -111,7 +111,7 @@ void SetParent( boost::shared_ptr<const SfxItemSet>& mrpAttrSet,
aNewSet.SetParent( pParentSet );
aNewSet.ClearItem( RES_FRMATR_STYLE_NAME );
aNewSet.ClearItem( RES_FRMATR_CONDITIONAL_STYLE_NAME );
- String sVal;
+ OUString sVal;
if ( pParentFmt )
{
diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx
index 486f965ba04a..daa05e1b2ae5 100644
--- a/sw/source/core/fields/reffld.cxx
+++ b/sw/source/core/fields/reffld.cxx
@@ -637,7 +637,7 @@ bool SwGetRefField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
break;
case FIELD_PROP_PAR1:
{
- String sTmp(GetPar1());
+ OUString sTmp(GetPar1());
if(REF_SEQUENCEFLD == nSubType)
{
sal_uInt16 nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( sTmp, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL );
@@ -651,7 +651,7 @@ bool SwGetRefField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
break;
}
}
- rAny <<= OUString(sTmp);
+ rAny <<= sTmp;
}
break;
case FIELD_PROP_PAR3:
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx
index 7677accdfa81..cd72779070d9 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -676,9 +676,9 @@ bool SwFmtPageDesc::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
const SwPageDesc* pDesc = GetPageDesc();
if( pDesc )
{
- String aString;
+ OUString aString;
SwStyleNameMapper::FillProgName(pDesc->GetName(), aString, nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC, true );
- rVal <<= OUString( aString );
+ rVal <<= aString;
}
else
rVal.clear();
diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx
index cdc25e9aa81b..be620458f355 100644
--- a/sw/source/core/text/EnhancedPDFExportHelper.cxx
+++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx
@@ -172,9 +172,9 @@ bool lcl_IsHeadlineCell( const SwCellFrm& rCellFrm )
const SwTxtNode* pTxtNode = static_cast<const SwTxtFrm*>(pCnt)->GetTxtNode();
const SwFmt* pTxtFmt = pTxtNode->GetFmtColl();
- String sStyleName;
+ OUString sStyleName;
SwStyleNameMapper::FillProgName( pTxtFmt->GetName(), sStyleName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, true );
- bRet = sStyleName.EqualsAscii(aTableHeadingName);
+ bRet = sStyleName.equalsAscii(aTableHeadingName);
}
return bRet;
@@ -1096,8 +1096,8 @@ void SwTaggedPDFHelper::BeginBlockStructureElements()
const SwFmt* pTxtFmt = pTxtNd->GetFmtColl();
const SwFmt* pParentTxtFmt = pTxtFmt ? pTxtFmt->DerivedFrom() : NULL;
- String sStyleName;
- String sParentStyleName;
+ OUString sStyleName;
+ OUString sParentStyleName;
if ( pTxtFmt)
SwStyleNameMapper::FillProgName( pTxtFmt->GetName(), sStyleName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, true );
@@ -1113,7 +1113,7 @@ void SwTaggedPDFHelper::BeginBlockStructureElements()
//
// Quotations: BlockQuote
//
- if ( sStyleName.EqualsAscii(aQuotations) )
+ if (sStyleName.equalsAscii(aQuotations))
{
nPDFType = static_cast<sal_uInt16>(vcl::PDFWriter::BlockQuote);
aPDFType = OUString(aBlockQuoteString);
@@ -1122,7 +1122,7 @@ void SwTaggedPDFHelper::BeginBlockStructureElements()
//
// Caption: Caption
//
- else if ( sStyleName.EqualsAscii(aCaption) )
+ else if (sStyleName.equalsAscii(aCaption))
{
nPDFType = static_cast<sal_uInt16>(vcl::PDFWriter::Caption);
aPDFType = OUString(aCaptionString);
@@ -1131,16 +1131,16 @@ void SwTaggedPDFHelper::BeginBlockStructureElements()
//
// Caption: Caption
//
- else if ( sParentStyleName.EqualsAscii(aCaption) )
+ else if (sParentStyleName.equalsAscii(aCaption))
{
nPDFType = static_cast<sal_uInt16>(vcl::PDFWriter::Caption);
- aPDFType = sStyleName.Append(OUString(aCaptionString));
+ aPDFType = sStyleName + aCaptionString;
}
//
// Heading: H
//
- else if ( sStyleName.EqualsAscii(aHeading) )
+ else if (sStyleName.equalsAscii(aHeading))
{
nPDFType = static_cast<sal_uInt16>(vcl::PDFWriter::Heading);
aPDFType = OUString(aHString);
@@ -1388,7 +1388,7 @@ void SwTaggedPDFHelper::BeginInlineStructureElements()
SwTxtAttr const*const pInetFmtAttr =
pNd->GetTxtAttrAt(rInf.GetIdx(), RES_TXTATR_INETFMT);
- String sStyleName;
+ OUString sStyleName;
if ( !pInetFmtAttr )
{
::std::vector<SwTxtAttr *> const charAttrs(
@@ -1407,12 +1407,12 @@ void SwTaggedPDFHelper::BeginInlineStructureElements()
aPDFType = OUString(aLinkString);
}
// Check for Quote/Code character style:
- else if ( sStyleName.EqualsAscii(aQuotation) )
+ else if (sStyleName.equalsAscii(aQuotation))
{
nPDFType = vcl::PDFWriter::Quote;
aPDFType = OUString(aQuoteString);
}
- else if ( sStyleName.EqualsAscii(aSourceText) )
+ else if (sStyleName.equalsAscii(aSourceText))
{
nPDFType = vcl::PDFWriter::Code;
aPDFType = OUString(aCodeString);
@@ -1430,10 +1430,10 @@ void SwTaggedPDFHelper::BeginInlineStructureElements()
0 != rInf.GetFont()->GetEscapement() ||
SW_LATIN != nFont ||
nCurrentLanguage != nDefaultLang ||
- sStyleName.Len() > 0 )
+ !sStyleName.isEmpty())
{
nPDFType = vcl::PDFWriter::Span;
- if ( sStyleName.Len() > 0 )
+ if (!sStyleName.isEmpty())
aPDFType = sStyleName;
else
aPDFType = OUString(aSpanString);
diff --git a/sw/source/core/txtnode/fmtatr2.cxx b/sw/source/core/txtnode/fmtatr2.cxx
index b977bd611aa2..b2fa6d1be065 100644
--- a/sw/source/core/txtnode/fmtatr2.cxx
+++ b/sw/source/core/txtnode/fmtatr2.cxx
@@ -115,10 +115,10 @@ bool SwFmtCharFmt::GetInfo( SfxPoolItem& rInfo ) const
}
bool SwFmtCharFmt::QueryValue( uno::Any& rVal, sal_uInt8 ) const
{
- String sCharFmtName;
+ OUString sCharFmtName;
if(GetCharFmt())
SwStyleNameMapper::FillProgName(GetCharFmt()->GetName(), sCharFmtName, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, true );
- rVal <<= OUString( sCharFmtName );
+ rVal <<= sCharFmtName;
return true;
}
bool SwFmtCharFmt::PutValue( const uno::Any& , sal_uInt8 )
@@ -306,22 +306,24 @@ bool SwFmtINetFmt::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
break;
case MID_URL_VISITED_FMT:
{
- String sVal = aVisitedFmt;
- if( !sVal.Len() && nVisitedId != 0 )
- SwStyleNameMapper::FillUIName( nVisitedId, sVal );
- if( sVal.Len() )
- SwStyleNameMapper::FillProgName( sVal, sVal, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, true );
- rVal <<= OUString(sVal);
+ OUString sVal = aVisitedFmt;
+ if (sVal.isEmpty() && nVisitedId != 0)
+ SwStyleNameMapper::FillUIName(nVisitedId, sVal);
+ if (!sVal.isEmpty())
+ SwStyleNameMapper::FillProgName(sVal, sVal,
+ nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, true);
+ rVal <<= sVal;
}
break;
case MID_URL_UNVISITED_FMT:
{
- String sVal = aINetFmt;
- if( !sVal.Len() && nINetId != 0 )
- SwStyleNameMapper::FillUIName( nINetId, sVal );
- if( sVal.Len() )
- SwStyleNameMapper::FillProgName( sVal, sVal, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, true );
- rVal <<= OUString(sVal);
+ OUString sVal = aINetFmt;
+ if (sVal.isEmpty() && nINetId != 0)
+ SwStyleNameMapper::FillUIName(nINetId, sVal);
+ if (!sVal.isEmpty())
+ SwStyleNameMapper::FillProgName(sVal, sVal,
+ nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, true);
+ rVal <<= sVal;
}
break;
case MID_URL_HYPERLINKEVENTS:
@@ -390,7 +392,7 @@ bool SwFmtINetFmt::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
OUString sVal;
rVal >>= sVal;
- String aString;
+ OUString aString;
SwStyleNameMapper::FillUIName( sVal, aString, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, true );
aVisitedFmt = aString;
nVisitedId = SwStyleNameMapper::GetPoolIdFromUIName( aVisitedFmt,
@@ -401,7 +403,7 @@ bool SwFmtINetFmt::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
OUString sVal;
rVal >>= sVal;
- String aString;
+ OUString aString;
SwStyleNameMapper::FillUIName( sVal, aString, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, true );
aINetFmt = aString;
nINetId = SwStyleNameMapper::GetPoolIdFromUIName( aINetFmt, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT );
@@ -481,9 +483,9 @@ bool SwFmtRuby::QueryValue( uno::Any& rVal,
case MID_RUBY_ADJUST: rVal <<= (sal_Int16)nAdjustment; break;
case MID_RUBY_CHARSTYLE:
{
- String aString;
+ OUString aString;
SwStyleNameMapper::FillProgName(sCharFmtName, aString, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, true );
- rVal <<= OUString ( aString );
+ rVal <<= aString;
}
break;
case MID_RUBY_ABOVE:
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index caaaecb0689e..294bc5aaa8f9 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -822,7 +822,7 @@ void SwTxtNode::NewAttrSet( SwAttrPool& rPool )
// put names of parent style and conditional style:
const SwFmtColl* pAnyFmtColl = &GetAnyFmtColl();
const SwFmtColl* pFmtColl = GetFmtColl();
- String sVal;
+ OUString sVal;
SwStyleNameMapper::FillProgName( pAnyFmtColl->GetName(), sVal, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, true );
SfxStringItem aAnyFmtColl( RES_FRMATR_STYLE_NAME, sVal );
if ( pFmtColl != pAnyFmtColl )
diff --git a/sw/source/core/unocore/SwXTextDefaults.cxx b/sw/source/core/unocore/SwXTextDefaults.cxx
index 25293cc4b227..217359458cc9 100644
--- a/sw/source/core/unocore/SwXTextDefaults.cxx
+++ b/sw/source/core/unocore/SwXTextDefaults.cxx
@@ -91,7 +91,7 @@ void SAL_CALL SwXTextDefaults::setPropertyValue( const OUString& rPropertyName,
OUString uStyle;
if(aValue >>= uStyle)
{
- String sStyle;
+ OUString sStyle;
SwStyleNameMapper::FillUIName(uStyle, sStyle, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, true );
SwDocStyleSheet* pStyle =
(SwDocStyleSheet*)m_pDoc->GetDocShell()->GetStyleSheetPool()->Find(sStyle, SFX_STYLE_FAMILY_CHAR);
diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx
index 66202c0aa0cb..1f1e79ae90d0 100644
--- a/sw/source/core/unocore/unocrsrhelper.cxx
+++ b/sw/source/core/unocore/unocrsrhelper.cxx
@@ -378,9 +378,9 @@ bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
{
if( pAny )
{
- String sVal;
+ OUString sVal;
SwStyleNameMapper::FillProgName(pFmt->GetName(), sVal, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, true );
- *pAny <<= OUString(sVal);
+ *pAny <<= sVal;
}
}
else
@@ -902,7 +902,12 @@ void GetCurPageStyle(SwPaM& rPaM, String &rString)
return; // TODO: is there an easy way to get it for tables/sections?
const SwPageFrm* pPage = rPaM.GetCntntNode()->getLayoutFrm(rPaM.GetDoc()->GetCurrentLayout())->FindPageFrm();
if(pPage)
- SwStyleNameMapper::FillProgName( pPage->GetPageDesc()->GetName(), rString, nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC, true );
+ {
+ OUString tmp;
+ SwStyleNameMapper::FillProgName(pPage->GetPageDesc()->GetName(),
+ tmp, nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC, true);
+ rString = tmp;
+ }
}
/* --------------------------------------------------
diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx
index d0ec1efb18e2..9e231fef3b06 100644
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
@@ -997,8 +997,9 @@ static SwFrmFmt *lcl_GetFrmFmt( const :: uno::Any& rValue, SwDoc *pDoc )
{
OUString uTemp;
rValue >>= uTemp;
- String sStyle;
- SwStyleNameMapper::FillUIName(String (uTemp), sStyle, nsSwGetPoolIdFromName::GET_POOLID_FRMFMT, true);
+ OUString sStyle;
+ SwStyleNameMapper::FillUIName(uTemp, sStyle,
+ nsSwGetPoolIdFromName::GET_POOLID_FRMFMT, true);
SwDocStyleSheet* pStyle =
(SwDocStyleSheet*)pDocSh->GetStyleSheetPool()->Find(sStyle,
SFX_STYLE_FAMILY_FRAME);
diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx
index 411f5cc32947..b237a7ec865b 100644
--- a/sw/source/core/unocore/unoidx.cxx
+++ b/sw/source/core/unocore/unoidx.cxx
@@ -745,7 +745,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
break;
case WID_MAIN_ENTRY_CHARACTER_STYLE_NAME:
{
- String aString;
+ OUString aString;
SwStyleNameMapper::FillUIName(lcl_AnyToString(rValue),
aString, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, true);
rTOXBase.SetMainEntryCharStyle( aString );
@@ -781,7 +781,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
break;
case WID_PARA_HEAD:
{
- String aString;
+ OUString aString;
SwStyleNameMapper::FillUIName( lcl_AnyToString(rValue),
aString, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, true);
bForm = true;
@@ -795,7 +795,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
break;
case WID_PARA_SEP:
{
- String aString;
+ OUString aString;
bForm = true;
SwStyleNameMapper::FillUIName( lcl_AnyToString(rValue),
aString, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, true);
@@ -820,7 +820,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
bForm = true;
// in sdbcx::Index Label 1 begins at Pos 2 otherwise at Pos 1
const sal_uInt16 nLPos = rTOXBase.GetType() == TOX_INDEX ? 2 : 1;
- String aString;
+ OUString aString;
SwStyleNameMapper::FillUIName( lcl_AnyToString(rValue),
aString, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, true);
aForm.SetTemplate(nLPos + pEntry->nWID - WID_PARA_LEV1, aString );
@@ -1079,13 +1079,13 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
break;
case WID_MAIN_ENTRY_CHARACTER_STYLE_NAME:
{
- String aString;
+ OUString aString;
SwStyleNameMapper::FillProgName(
pTOXBase->GetMainEntryCharStyle(),
aString,
nsSwGetPoolIdFromName::GET_POOLID_CHRFMT,
true);
- aRet <<= OUString( aString );
+ aRet <<= aString;
}
break;
case WID_CREATE_FROM_TABLES:
@@ -1122,21 +1122,21 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
case WID_PARA_HEAD:
{
//Header steht an Pos 0
- String aString;
+ OUString aString;
SwStyleNameMapper::FillProgName(rForm.GetTemplate( 0 ), aString,
nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, true );
- aRet <<= OUString( aString );
+ aRet <<= aString;
}
break;
case WID_PARA_SEP:
{
- String aString;
+ OUString aString;
SwStyleNameMapper::FillProgName(
rForm.GetTemplate( 1 ),
aString,
nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL,
true);
- aRet <<= OUString( aString );
+ aRet <<= aString;
}
break;
case WID_PARA_LEV1:
@@ -1152,13 +1152,13 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
{
// in sdbcx::Index Label 1 begins at Pos 2 otherwise at Pos 1
sal_uInt16 nLPos = pTOXBase->GetType() == TOX_INDEX ? 2 : 1;
- String aString;
+ OUString aString;
SwStyleNameMapper::FillProgName(
rForm.GetTemplate(nLPos + pEntry->nWID - WID_PARA_LEV1),
aString,
nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL,
true);
- aRet <<= OUString( aString );
+ aRet <<= aString;
}
break;
case WID_IS_RELATIVE_TABSTOPS:
@@ -2619,7 +2619,7 @@ throw (lang::IllegalArgumentException, lang::IndexOutOfBoundsException,
const sal_Int32 nStyles = aSeq.getLength();
const OUString* pStyles = aSeq.getConstArray();
String sSetStyles;
- String aString;
+ OUString aString;
for(sal_Int32 i = 0; i < nStyles; i++)
{
if(i)
@@ -2658,7 +2658,7 @@ throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException,
const sal_uInt16 nStyles = comphelper::string::getTokenCount(rStyles, TOX_STYLE_DELIMITER);
uno::Sequence<OUString> aStyles(nStyles);
OUString* pStyles = aStyles.getArray();
- String aString;
+ OUString aString;
for(sal_uInt16 i = 0; i < nStyles; i++)
{
SwStyleNameMapper::FillProgName(
@@ -2666,7 +2666,7 @@ throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException,
aString,
nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL,
true);
- pStyles[i] = OUString( aString );
+ pStyles[i] = aString;
}
uno::Any aRet(&aStyles, ::getCppuType((uno::Sequence<OUString>*)0));
return aRet;
@@ -2796,7 +2796,7 @@ throw (lang::IllegalArgumentException, lang::IndexOutOfBoundsException,
}
else if ( pProperties[j].Name == "CharacterStyleName" )
{
- String sCharStyleName;
+ OUString sCharStyleName;
SwStyleNameMapper::FillUIName(
lcl_AnyToString(pProperties[j].Value),
sCharStyleName,
@@ -2961,7 +2961,7 @@ throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException,
sal_uInt16 nTokenCount = 0;
uno::Sequence< beans::PropertyValues > aRetSeq;
- String aString;
+ OUString aString;
while(aIt != aPattern.end()) // #i21237#
{
nTokenCount++;
diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx
index 65c7cb1b9460..013f0ed8d45f 100644
--- a/sw/source/core/unocore/unoobj.cxx
+++ b/sw/source/core/unocore/unoobj.cxx
@@ -221,7 +221,7 @@ throw (lang::IllegalArgumentException)
{
throw lang::IllegalArgumentException();
}
- String sStyle;
+ OUString sStyle;
SwStyleNameMapper::FillUIName(uStyle, sStyle,
nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, true);
SwDocStyleSheet *const pStyle = static_cast<SwDocStyleSheet*>(
@@ -272,7 +272,7 @@ throw (lang::IllegalArgumentException)
return;
OUString uStyle;
rAny >>= uStyle;
- String sStyle;
+ OUString sStyle;
SwStyleNameMapper::FillUIName(uStyle, sStyle,
nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, true );
SwDocStyleSheet *const pStyle = static_cast<SwDocStyleSheet*>(
@@ -315,14 +315,14 @@ SwUnoCursorHelper::SetPageDesc(
{
pNewDesc.reset(new SwFmtPageDesc());
}
- String sDescName;
+ OUString sDescName;
SwStyleNameMapper::FillUIName(uDescName, sDescName,
nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC, true);
if (!pNewDesc->GetPageDesc() ||
(pNewDesc->GetPageDesc()->GetName() != sDescName))
{
bool bPut = false;
- if(sDescName.Len())
+ if (!sDescName.isEmpty())
{
SwPageDesc *const pPageDesc =
::GetPageDescByName_Impl(rDoc, sDescName);
@@ -412,7 +412,7 @@ lcl_setDropcapCharStyle(SwPaM & rPam, SfxItemSet & rItemSet,
{
throw lang::IllegalArgumentException();
}
- String sStyle;
+ OUString sStyle;
SwStyleNameMapper::FillUIName(uStyle, sStyle,
nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, true);
SwDoc *const pDoc = rPam.GetDoc();
@@ -466,12 +466,12 @@ lcl_setRubyCharstyle(SfxItemSet & rItemSet, uno::Any const& rValue)
{
pRuby.reset(new SwFmtRuby(aEmptyStr));
}
- String sStyle;
+ OUString sStyle;
SwStyleNameMapper::FillUIName(sTmp, sStyle,
nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, true );
pRuby->SetCharFmtName(sStyle);
pRuby->SetCharFmtId(0);
- if (sStyle.Len() > 0)
+ if (!sStyle.isEmpty())
{
const sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(
sStyle, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT);
diff --git a/sw/source/core/unocore/unosett.cxx b/sw/source/core/unocore/unosett.cxx
index a8732766d21d..389165c3433f 100644
--- a/sw/source/core/unocore/unosett.cxx
+++ b/sw/source/core/unocore/unosett.cxx
@@ -204,7 +204,7 @@ static SwCharFmt* lcl_getCharFmt(SwDoc* pDoc, const uno::Any& aValue)
String sStandard(SW_RES(STR_POOLCOLL_STANDARD));
OUString uTmp;
aValue >>= uTmp;
- String sCharFmt;
+ OUString sCharFmt;
SwStyleNameMapper::FillUIName(uTmp, sCharFmt, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, true);
if(sStandard != sCharFmt)
{
@@ -223,7 +223,7 @@ static SwTxtFmtColl* lcl_GetParaStyle(SwDoc* pDoc, const uno::Any& aValue)
{
OUString uTmp;
aValue >>= uTmp;
- String sParaStyle;
+ OUString sParaStyle;
SwStyleNameMapper::FillUIName(uTmp, sParaStyle, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, true );
SwTxtFmtColl* pRet = pDoc->FindTxtFmtCollByName( sParaStyle );
if( !pRet )
@@ -241,7 +241,7 @@ static SwPageDesc* lcl_GetPageDesc(SwDoc* pDoc, const uno::Any& aValue)
sal_uInt16 nCount = pDoc->GetPageDescCnt();
OUString uTmp;
aValue >>= uTmp;
- String sPageDesc;
+ OUString sPageDesc;
SwStyleNameMapper::FillUIName(uTmp, sPageDesc, nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC, true );
for( sal_uInt16 i = 0; i < nCount; i++)
{
@@ -495,16 +495,16 @@ uno::Any SwXFootnoteProperties::getPropertyValue(const OUString& rPropertyName)
case WID_PARAGRAPH_STYLE :
{
SwTxtFmtColl* pColl = rFtnInfo.GetFtnTxtColl();
- String aString;
+ OUString aString;
if(pColl)
aString = String ( pColl->GetName() );
SwStyleNameMapper::FillProgName(aString, aString, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, true);
- aRet <<= OUString ( aString );
+ aRet <<= aString;
}
break;
case WID_PAGE_STYLE :
{
- String aString;
+ OUString aString;
if( rFtnInfo.KnowsPageDesc() )
{
SwStyleNameMapper::FillProgName(
@@ -513,13 +513,13 @@ uno::Any SwXFootnoteProperties::getPropertyValue(const OUString& rPropertyName)
nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC,
true);
}
- aRet <<= OUString ( aString );
+ aRet <<= aString;
}
break;
case WID_ANCHOR_CHARACTER_STYLE:
case WID_CHARACTER_STYLE:
{
- String aString;
+ OUString aString;
const SwCharFmt* pCharFmt = 0;
if( pEntry->nWID == WID_ANCHOR_CHARACTER_STYLE )
{
@@ -539,7 +539,7 @@ uno::Any SwXFootnoteProperties::getPropertyValue(const OUString& rPropertyName)
nsSwGetPoolIdFromName::GET_POOLID_CHRFMT,
true);
}
- aRet <<= OUString ( aString );
+ aRet <<= aString;
}
break;
case WID_POSITION_END_OF_DOC:
@@ -737,7 +737,7 @@ uno::Any SwXEndnoteProperties::getPropertyValue(const OUString& rPropertyName)
case WID_PARAGRAPH_STYLE :
{
SwTxtFmtColl* pColl = rEndInfo.GetFtnTxtColl();
- String aString;
+ OUString aString;
if(pColl)
aString = pColl->GetName();
SwStyleNameMapper::FillProgName(
@@ -745,13 +745,13 @@ uno::Any SwXEndnoteProperties::getPropertyValue(const OUString& rPropertyName)
aString,
nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL,
true);
- aRet <<= OUString ( aString );
+ aRet <<= aString;
}
break;
case WID_PAGE_STYLE :
{
- String aString;
+ OUString aString;
if( rEndInfo.KnowsPageDesc() )
{
SwStyleNameMapper::FillProgName(
@@ -760,13 +760,13 @@ uno::Any SwXEndnoteProperties::getPropertyValue(const OUString& rPropertyName)
nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC,
true );
}
- aRet <<= OUString ( aString );
+ aRet <<= aString;
}
break;
case WID_ANCHOR_CHARACTER_STYLE:
case WID_CHARACTER_STYLE:
{
- String aString;
+ OUString aString;
const SwCharFmt* pCharFmt = 0;
if( pEntry->nWID == WID_ANCHOR_CHARACTER_STYLE )
{
@@ -786,7 +786,7 @@ uno::Any SwXEndnoteProperties::getPropertyValue(const OUString& rPropertyName)
nsSwGetPoolIdFromName::GET_POOLID_CHRFMT,
true );
}
- aRet <<= OUString ( aString );
+ aRet <<= aString;
}
break;
}
@@ -1003,7 +1003,7 @@ Any SwXLineNumberingProperties::getPropertyValue(const OUString& rPropertyName)
break;
case WID_CHARACTER_STYLE :
{
- String aString;
+ OUString aString;
// return empty string if no char format is set
// otherwise it would be created here
if(rInfo.HasCharFormat())
@@ -1014,7 +1014,7 @@ Any SwXLineNumberingProperties::getPropertyValue(const OUString& rPropertyName)
nsSwGetPoolIdFromName::GET_POOLID_CHRFMT,
true);
}
- aRet <<= OUString ( aString );
+ aRet <<= aString;
}
break;
case WID_NUMBERING_TYPE :
@@ -1388,7 +1388,7 @@ uno::Sequence<beans::PropertyValue> SwXNumberingRules::GetNumberingRuleByIndex(
!SwXNumberingRules::isInvalidStyle(sNewCharStyleNames[(sal_uInt16)nIndex]))
CharStyleName = sNewCharStyleNames[(sal_uInt16)nIndex];
- String aString;
+ OUString aString;
SwStyleNameMapper::FillProgName( CharStyleName, aString, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, true );
aUString = aString;
pData = new PropValData((void*)&aUString, "CharStyleName", ::getCppuType((const OUString*)0));
@@ -1576,7 +1576,7 @@ uno::Sequence<beans::PropertyValue> SwXNumberingRules::GetNumberingRuleByIndex(
sValue.Erase();
}
}
- String aName;
+ OUString aName;
SwStyleNameMapper::FillProgName(sValue, aName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, true);
aUString = aName;
@@ -1740,9 +1740,10 @@ void SwXNumberingRules::SetNumberingRuleByIndex(
bCharStyleNameSet = true;
OUString uTmp;
pData->aVal >>= uTmp;
- String sCharFmtName;
+ OUString sCharFmtName;
SwStyleNameMapper::FillUIName( uTmp, sCharFmtName, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, true );
- if(sCharFmtName.EqualsAscii(SW_PROP_NAME_STR(UNO_NAME_CHARACTER_FORMAT_NONE)))
+ if (sCharFmtName.equalsAscii(
+ SW_PROP_NAME_STR(UNO_NAME_CHARACTER_FORMAT_NONE)))
{
sNewCharStyleNames[(sal_uInt16)nIndex] = OUString(aInvalidStyle);
aFmt.SetCharFmt(0);
@@ -1754,7 +1755,7 @@ void SwXNumberingRules::SetNumberingRuleByIndex(
sal_uInt16 nChCount = pFmts->size();
SwCharFmt* pCharFmt = 0;
- if(sCharFmtName.Len())
+ if (!sCharFmtName.isEmpty())
{
for(sal_uInt16 j = 0; j< nChCount; j++)
{
@@ -1907,7 +1908,7 @@ void SwXNumberingRules::SetNumberingRuleByIndex(
{
OUString uTmp;
pData->aVal >>= uTmp;
- String sStyleName;
+ OUString sStyleName;
SwStyleNameMapper::FillUIName(uTmp, sStyleName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, true );
const SwTxtFmtColls* pColls = pDoc->GetTxtFmtColls();
const sal_uInt16 nCount = pColls->size();
@@ -2069,7 +2070,7 @@ void SwXNumberingRules::SetNumberingRuleByIndex(
assert( pDocShell );
OUString uTmp;
pData->aVal >>= uTmp;
- String sStyleName;
+ OUString sStyleName;
SwStyleNameMapper::FillUIName(uTmp, sStyleName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, true );
const SwTxtFmtColls* pColls = pDocShell->GetDoc()->GetTxtFmtColls();
const sal_uInt16 nCount = pColls->size();
@@ -2126,7 +2127,9 @@ void SwXNumberingRules::SetNumberingRuleByIndex(
aFmt.GetNumberingType() == NumberingType::BITMAP && !aFmt.GetCharFmt()
&& !SwXNumberingRules::isInvalidStyle(sNewCharStyleNames[(sal_uInt16)nIndex]))
{
- SwStyleNameMapper::FillProgName ( RES_POOLCHR_BUL_LEVEL, sNewCharStyleNames[(sal_uInt16)nIndex] );
+ OUString tmp;
+ SwStyleNameMapper::FillProgName(RES_POOLCHR_BUL_LEVEL, tmp);
+ sNewCharStyleNames[static_cast<sal_uInt16>(nIndex)] = tmp;
}
delete pSetBrush;
delete pSetSize;
@@ -2293,18 +2296,18 @@ void SwXNumberingRules::removeVetoableChangeListener(
OUString SwXNumberingRules::getName() throw( RuntimeException )
{
- String aString;
+ OUString aString;
if(pNumRule)
{
SwStyleNameMapper::FillProgName(pNumRule->GetName(), aString, nsSwGetPoolIdFromName::GET_POOLID_NUMRULE, true );
- return OUString ( aString );
+ return aString;
}
// consider chapter numbering <SwXNumberingRules>
else if ( pDocShell )
{
SwStyleNameMapper::FillProgName( pDocShell->GetDoc()->GetOutlineNumRule()->GetName(),
aString, nsSwGetPoolIdFromName::GET_POOLID_NUMRULE, true );
- return OUString ( aString );
+ return aString;
}
else
return sCreatedNumRuleName;
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index 1eaa460e8597..f03bc5b751a7 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -466,7 +466,8 @@ SwXStyleFamily::~SwXStyleFamily()
}
-static sal_Int32 lcl_GetCountOrName ( const SwDoc &rDoc, SfxStyleFamily eFamily, String *pString, sal_uInt16 nIndex = USHRT_MAX )
+static sal_Int32 lcl_GetCountOrName(const SwDoc &rDoc,
+ SfxStyleFamily eFamily, OUString *pString, sal_uInt16 nIndex = USHRT_MAX)
{
sal_Int32 nCount = 0;
switch( eFamily )
@@ -619,7 +620,7 @@ uno::Any SwXStyleFamily::getByIndex(sal_Int32 nTempIndex)
sal_uInt16 nIndex = static_cast < sal_uInt16 > ( nTempIndex );
if(pBasePool)
{
- String sStyleName;
+ OUString sStyleName;
switch( eFamily )
{
case SFX_STYLE_FAMILY_CHAR:
@@ -712,10 +713,10 @@ uno::Any SwXStyleFamily::getByIndex(sal_Int32 nTempIndex)
default:
;
}
- if ( !sStyleName.Len() )
+ if (sStyleName.isEmpty())
lcl_GetCountOrName ( *pDocShell->GetDoc(), eFamily, &sStyleName, nIndex );
- if ( sStyleName.Len() )
+ if (!sStyleName.isEmpty())
{
SfxStyleSheetBase* pBase = pBasePool->Find( sStyleName, eFamily );
if(pBase)
@@ -751,7 +752,7 @@ uno::Any SwXStyleFamily::getByName(const OUString& rName)
{
SolarMutexGuard aGuard;
uno::Any aRet;
- String sStyleName;
+ OUString sStyleName;
SwStyleNameMapper::FillUIName(rName, sStyleName, lcl_GetSwEnumFromSfxEnum ( eFamily ), true );
if(pBasePool)
{
@@ -789,11 +790,11 @@ uno::Sequence< OUString > SwXStyleFamily::getElementNames(void) throw( uno::Runt
sal_uInt16 nCount = pIterator->Count();
aRet.realloc(nCount);
OUString* pArray = aRet.getArray();
- String aString;
+ OUString aString;
for(sal_uInt16 i = 0; i < nCount; i++)
{
SwStyleNameMapper::FillProgName((*pIterator)[i]->GetName(), aString, lcl_GetSwEnumFromSfxEnum ( eFamily ), true );
- pArray[i] = OUString ( aString );
+ pArray[i] = aString;
}
}
else
@@ -807,7 +808,7 @@ sal_Bool SwXStyleFamily::hasByName(const OUString& rName) throw( uno::RuntimeExc
sal_Bool bRet = sal_False;
if(pBasePool)
{
- String sStyleName;
+ OUString sStyleName;
SwStyleNameMapper::FillUIName(rName, sStyleName, lcl_GetSwEnumFromSfxEnum ( eFamily ), true );
pBasePool->SetSearchMask(eFamily, SFXSTYLEBIT_ALL );
SfxStyleSheetBase* pBase = pBasePool->Find(sStyleName);
@@ -838,7 +839,7 @@ void SwXStyleFamily::insertByName(const OUString& rName, const uno::Any& rElemen
SolarMutexGuard aGuard;
if(pBasePool)
{
- String sStyleName;
+ OUString sStyleName;
SwStyleNameMapper::FillUIName(rName, sStyleName, lcl_GetSwEnumFromSfxEnum ( eFamily ), true);
pBasePool->SetSearchMask(eFamily, SFXSTYLEBIT_ALL );
SfxStyleSheetBase* pBase = pBasePool->Find(sStyleName);
@@ -941,7 +942,7 @@ void SwXStyleFamily::removeByName(const OUString& rName) throw( container::NoSuc
if(pBasePool)
{
pBasePool->SetSearchMask(eFamily, SFXSTYLEBIT_ALL );
- String aString;
+ OUString aString;
SwStyleNameMapper::FillUIName(rName, aString, lcl_GetSwEnumFromSfxEnum ( eFamily ), true );
SfxStyleSheetBase* pBase = pBasePool->Find( aString );
@@ -1351,7 +1352,7 @@ void SwXStyle::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew)
OUString SwXStyle::getName(void) throw( uno::RuntimeException )
{
SolarMutexGuard aGuard;
- String aString;
+ OUString aString;
if(pBasePool)
{
pBasePool->SetSearchMask(eFamily, SFXSTYLEBIT_ALL );
@@ -1363,7 +1364,7 @@ OUString SwXStyle::getName(void) throw( uno::RuntimeException )
}
else
aString = sStyleName;
- return OUString (aString);
+ return aString;
}
void SwXStyle::setName(const OUString& rName) throw( uno::RuntimeException )
@@ -1425,7 +1426,7 @@ sal_Bool SwXStyle::isInUse(void) throw( uno::RuntimeException )
OUString SwXStyle::getParentStyle(void) throw( uno::RuntimeException )
{
SolarMutexGuard aGuard;
- String aString;
+ OUString aString;
if(pBasePool)
{
pBasePool->SetSearchMask(eFamily, SFXSTYLEBIT_ALL);
@@ -1438,14 +1439,14 @@ OUString SwXStyle::getParentStyle(void) throw( uno::RuntimeException )
else
throw uno::RuntimeException();
SwStyleNameMapper::FillProgName(aString, aString, lcl_GetSwEnumFromSfxEnum ( eFamily ), true );
- return OUString ( aString );
+ return aString;
}
void SwXStyle::setParentStyle(const OUString& rParentStyle)
throw( container::NoSuchElementException, uno::RuntimeException )
{
SolarMutexGuard aGuard;
- String sParentStyle;
+ OUString sParentStyle;
SwStyleNameMapper::FillUIName(rParentStyle, sParentStyle, lcl_GetSwEnumFromSfxEnum ( eFamily ), true );
if(pBasePool)
{
@@ -1469,7 +1470,7 @@ void SwXStyle::setParentStyle(const OUString& rParentStyle)
}
else if(bIsDescriptor)
{
- sParentStyleName = String(sParentStyle);
+ sParentStyleName = sParentStyle;
try
{
uno::Any aAny = mxStyleFamily->getByName ( sParentStyle );
@@ -1811,7 +1812,7 @@ static void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
{
OUString sTmp;
rValue >>= sTmp;
- String aString;
+ OUString aString;
SwStyleNameMapper::FillUIName(sTmp, aString, lcl_GetSwEnumFromSfxEnum ( eFamily ), true ) ;
rBase.mxNewBase->SetFollow( aString );
}
@@ -1835,12 +1836,12 @@ static void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
pNewDesc = new SwFmtPageDesc();
OUString uDescName;
rValue >>= uDescName;
- String sDescName;
+ OUString sDescName;
SwStyleNameMapper::FillUIName(uDescName, sDescName, nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC, true );
if(!pNewDesc->GetPageDesc() || pNewDesc->GetPageDesc()->GetName() != sDescName)
{
sal_Bool bPut = sal_False;
- if(sDescName.Len())
+ if (!sDescName.isEmpty())
{
SwPageDesc* pPageDesc = ::GetPageDescByName_Impl(*pDoc, sDescName);
if(pPageDesc)
@@ -1892,8 +1893,9 @@ static void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
if ((pSeq[i].Value >>= aTmp))
{
// get UI style name from programmatic style name
- String aStyleName;
- SwStyleNameMapper::FillUIName( aTmp, aStyleName, lcl_GetSwEnumFromSfxEnum ( eFamily ), true );
+ OUString aStyleName;
+ SwStyleNameMapper::FillUIName(aTmp, aStyleName,
+ lcl_GetSwEnumFromSfxEnum(eFamily), true);
//
// check for correct context and style name
@@ -1916,7 +1918,8 @@ static void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
break;
}
- aCondItem.SetStyle( &aStyleName, nIdx);
+ String tmp(aStyleName); //FIXME
+ aCondItem.SetStyle( &tmp, nIdx);
}
else
bFailed = sal_True;
@@ -1966,7 +1969,7 @@ static void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
SwRegisterItem aReg( !sName.isEmpty() );
aReg.SetWhich(SID_SWREGISTER_MODE);
rBase.GetItemSet().Put(aReg);
- String aString;
+ OUString aString;
SwStyleNameMapper::FillUIName(sName, aString, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, true);
rBase.GetItemSet().Put(SfxStringItem(SID_SWREGISTER_COLLECTION, aString ) );
@@ -1985,7 +1988,7 @@ static void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
pRuby = new SwFmtRuby(*((SwFmtRuby*)pItem));
if(!pRuby)
pRuby = new SwFmtRuby(aEmptyStr);
- String sStyle;
+ OUString sStyle;
SwStyleNameMapper::FillUIName(sTmp, sStyle, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, true );
pRuby->SetCharFmtName( sTmp );
pRuby->SetCharFmtId( 0 );
@@ -2017,7 +2020,7 @@ static void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
pDrop = new SwFmtDrop();
OUString uStyle;
rValue >>= uStyle;
- String sStyle;
+ OUString sStyle;
SwStyleNameMapper::FillUIName(uStyle, sStyle, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, true );
SwDocStyleSheet* pStyle =
(SwDocStyleSheet*)pDoc->GetDocShell()->GetStyleSheetPool()->Find(sStyle, SFX_STYLE_FAMILY_CHAR);
@@ -2225,9 +2228,9 @@ static uno::Any lcl_GetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
break;
case FN_UNO_FOLLOW_STYLE:
{
- String aString;
+ OUString aString;
SwStyleNameMapper::FillProgName(rBase.mxNewBase->GetFollow(), aString, lcl_GetSwEnumFromSfxEnum ( eFamily ), true);
- aRet <<= OUString( aString );
+ aRet <<= aString;
}
break;
case RES_PAGEDESC :
@@ -2241,9 +2244,9 @@ static uno::Any lcl_GetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
const SwPageDesc* pDesc = ((const SwFmtPageDesc*)pItem)->GetPageDesc();
if(pDesc)
{
- String aString;
+ OUString aString;
SwStyleNameMapper::FillProgName(pDesc->GetName(), aString, nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC, true );
- aRet <<= OUString( aString );
+ aRet <<= aString;
}
}
}
@@ -2275,7 +2278,7 @@ static uno::Any lcl_GetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
const CommandStruct *pCmds = SwCondCollItem::GetCmds();
for (sal_uInt16 n = 0; n < COND_COMMAND_COUNT; ++n)
{
- String aStyleName;
+ OUString aStyleName;
const SwCollCondition* pCond = 0;
if( pFmt && RES_CONDTXTFMTCOLL == pFmt->Which() &&
@@ -2289,7 +2292,7 @@ static uno::Any lcl_GetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
}
pSeq[n].Name = GetCommandContextByIndex(n);
- pSeq[n].Value <<= OUString( aStyleName );
+ pSeq[n].Value <<= aStyleName;
}
aRet <<= aSeq;
}
@@ -2326,13 +2329,13 @@ static uno::Any lcl_GetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
{
const SwPageDesc *pPageDesc = rBase.mxNewBase->GetPageDesc();
const SwTxtFmtColl* pCol = 0;
- String aString;
+ OUString aString;
if( pPageDesc )
pCol = pPageDesc->GetRegisterFmtColl();
if( pCol )
SwStyleNameMapper::FillProgName(
pCol->GetName(), aString, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, true );
- aRet <<= OUString ( aString );
+ aRet <<= aString;
}
break;
default:
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx
index a4ff25536de1..6a9efa46b0f5 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -210,11 +210,10 @@ static void lcl_SetSpecialProperty(SwFrmFmt* pFmt, const SfxItemPropertySimpleEn
break;
case RES_PAGEDESC:
{
- OUString uTemp;
- aValue >>= uTemp;
- String sPageStyle = uTemp;
+ OUString sPageStyle;
+ aValue >>= sPageStyle;
const SwPageDesc* pDesc = 0;
- if(sPageStyle.Len())
+ if (!sPageStyle.isEmpty())
{
SwStyleNameMapper::FillUIName(sPageStyle, sPageStyle, nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC, true );
pDesc = ::GetPageDescByName_Impl(*pFmt->GetDoc(), sPageStyle);
@@ -2001,10 +2000,9 @@ void SwTableProperties_Impl::ApplyTblAttr(const SwTable& rTbl, SwDoc& rDoc)
const uno::Any* pPage;
if(GetProperty(FN_UNO_PAGE_STYLE, 0, pPage) || GetProperty(RES_PAGEDESC, 0xff, pPage))
{
- OUString uTmp;
- (*pPage) >>= uTmp;
- String sPageStyle = uTmp;
- if(sPageStyle.Len())
+ OUString sPageStyle;
+ (*pPage) >>= sPageStyle;
+ if (!sPageStyle.isEmpty())
{
SwStyleNameMapper::FillUIName(sPageStyle, sPageStyle, nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC, true );
const SwPageDesc* pDesc = ::GetPageDescByName_Impl(rDoc, sPageStyle);
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index 041cac9d8cb8..a36556a0b405 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -2783,7 +2783,7 @@ void SwWW8ImplReader::Read_SubF_Ruby( WW8ReadFieldParams& rReadParam)
if (!pCharFmt)
{
SwCharFmt *pFmt=0;
- String aNm;
+ OUString aNm;
//Take this as the base name
SwStyleNameMapper::FillUIName(RES_POOLCHR_RUBYTEXT,aNm);
aNm+=OUString::number(aRubyCharFmts.size()+1);
diff --git a/sw/source/filter/xml/xmlfmt.cxx b/sw/source/filter/xml/xmlfmt.cxx
index 452271c6e75f..174bc3a0f4ce 100644
--- a/sw/source/filter/xml/xmlfmt.cxx
+++ b/sw/source/filter/xml/xmlfmt.cxx
@@ -400,7 +400,6 @@ void SwXMLTextStyleContext_Impl::Finish( sal_Bool bOverwrite )
return;
sal_uInt16 nCount = pConditions->size();
- String aString;
OUString sName;
for( sal_uInt16 i = 0; i < nCount; i++ )
{
@@ -408,11 +407,10 @@ void SwXMLTextStyleContext_Impl::Finish( sal_Bool bOverwrite )
OUString aDisplayName(
GetImport().GetStyleDisplayName( XML_STYLE_FAMILY_TEXT_PARAGRAPH,
pCond->GetApplyStyle() ) );
- SwStyleNameMapper::FillUIName( aDisplayName,
- aString,
+ SwStyleNameMapper::FillUIName(aDisplayName,
+ sName,
nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL,
true);
- sName = aString;
SwTxtFmtColl* pCondColl = pDoc->FindTxtFmtCollByName( sName );
OSL_ENSURE( pCondColl,
"SwXMLItemSetStyleContext_Impl::ConnectConditions: cond coll missing" );
@@ -638,7 +636,7 @@ void SwXMLItemSetStyleContext_Impl::ConnectPageDesc()
SwDoc *pDoc = SwImport::GetDocFromXMLImport( GetSwImport() );
- String sName;
+ OUString sName;
// #i40788# - first determine the display name of the page style,
// then map this name to the corresponding user interface name.
sName = GetImport().GetStyleDisplayName( XML_STYLE_FAMILY_MASTER_PAGE,
diff --git a/sw/source/filter/xml/xmlfmte.cxx b/sw/source/filter/xml/xmlfmte.cxx
index fec9a9f4984e..978092273313 100644
--- a/sw/source/filter/xml/xmlfmte.cxx
+++ b/sw/source/filter/xml/xmlfmte.cxx
@@ -87,7 +87,7 @@ void SwXMLExport::ExportFmt( const SwFmt& rFmt, enum XMLTokenEnum eFamily )
if( SFX_ITEM_SET == rFmt.GetAttrSet().GetItemState( RES_PAGEDESC,
sal_False, &pItem ) )
{
- String sName;
+ OUString sName;
const SwPageDesc *pPageDesc =
((const SwFmtPageDesc *)pItem)->GetPageDesc();
if( pPageDesc )
diff --git a/sw/source/filter/xml/xmltexte.cxx b/sw/source/filter/xml/xmltexte.cxx
index 3e7703538952..21feeab42d4b 100644
--- a/sw/source/filter/xml/xmltexte.cxx
+++ b/sw/source/filter/xml/xmltexte.cxx
@@ -160,7 +160,7 @@ void SwXMLTextParagraphExport::exportStyleContent(
GetExport().AddAttribute( XML_NAMESPACE_STYLE,
XML_CONDITION,
sBuffer.makeStringAndClear() );
- String aString;
+ OUString aString;
SwStyleNameMapper::FillProgName(
rCond.GetTxtFmtColl()->GetName(),
aString,
diff --git a/sw/source/ui/app/appenv.cxx b/sw/source/ui/app/appenv.cxx
index 6d6eab0fe291..235f34d3fcfd 100644
--- a/sw/source/ui/app/appenv.cxx
+++ b/sw/source/ui/app/appenv.cxx
@@ -185,7 +185,7 @@ void SwModule::InsertEnv( SfxRequest& rReq )
if(pOldSh )
{
const SwPageDesc& rCurPageDesc = pOldSh->GetPageDesc(pOldSh->GetCurPageDesc());
- String sJacket;
+ OUString sJacket;
SwStyleNameMapper::FillUIName( RES_POOLPAGE_JAKET, sJacket );
bEnvChange = rCurPageDesc.GetName() == sJacket;
diff --git a/sw/source/ui/app/docstyle.cxx b/sw/source/ui/app/docstyle.cxx
index dc78296ca79e..d7cea9fe30a0 100644
--- a/sw/source/ui/app/docstyle.cxx
+++ b/sw/source/ui/app/docstyle.cxx
@@ -554,7 +554,7 @@ const OUString& SwDocStyleSheet::GetParent() const
return aEmptyOUStr; // there's no parent
}
- String sTmp;
+ OUString sTmp;
if( !pFmt ) // not yet there, so default Parent
{
sal_uInt16 i = SwStyleNameMapper::GetPoolIdFromUIName( aName, eGetType );
diff --git a/sw/source/ui/chrdlg/chardlg.cxx b/sw/source/ui/chrdlg/chardlg.cxx
index 510cbec7788e..db5ffc3f1b23 100644
--- a/sw/source/ui/chrdlg/chardlg.cxx
+++ b/sw/source/ui/chrdlg/chardlg.cxx
@@ -212,12 +212,12 @@ void SwCharURLPage::Reset(const SfxItemSet& rSet)
RTL_TEXTENCODING_UTF8 ));
m_pURLED->SaveValue();
m_pNameED->SetText(pINetFmt->GetName());
- String sEntry = pINetFmt->GetVisitedFmt();
- if( !sEntry.Len() )
+ OUString sEntry = pINetFmt->GetVisitedFmt();
+ if (sEntry.isEmpty())
SwStyleNameMapper::FillUIName( RES_POOLCHR_INET_VISIT, sEntry );
m_pVisitedLB->SelectEntry(sEntry);
sEntry = pINetFmt->GetINetFmt();
- if(!sEntry.Len())
+ if (sEntry.isEmpty())
SwStyleNameMapper::FillUIName( RES_POOLCHR_INET_NORMAL, sEntry );
m_pNotVisitedLB->SelectEntry(sEntry);
diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx
index 500438c9968a..312e56f924c1 100644
--- a/sw/source/ui/config/optload.cxx
+++ b/sw/source/ui/config/optload.cxx
@@ -415,10 +415,15 @@ SwCaptionOptPage::SwCaptionOptPage( Window* pParent, const SfxItemSet& rSet )
Wallpaper aBack( GetSettings().GetStyleSettings().GetWindowColor() );
aPreview.SetBackground( aBack );
- SwStyleNameMapper::FillUIName( RES_POOLCOLL_LABEL_ABB, sIllustration );
- SwStyleNameMapper::FillUIName( RES_POOLCOLL_LABEL_TABLE, sTable );
- SwStyleNameMapper::FillUIName( RES_POOLCOLL_LABEL_FRAME, sText );
- SwStyleNameMapper::FillUIName( RES_POOLCOLL_LABEL_DRAWING, sDrawing );
+ OUString tmp1, tmp2, tmp3, tmp4; //FIXME
+ SwStyleNameMapper::FillUIName(RES_POOLCOLL_LABEL_ABB, tmp1);
+ SwStyleNameMapper::FillUIName(RES_POOLCOLL_LABEL_TABLE, tmp2);
+ SwStyleNameMapper::FillUIName(RES_POOLCOLL_LABEL_FRAME, tmp3);
+ SwStyleNameMapper::FillUIName(RES_POOLCOLL_LABEL_DRAWING, tmp4);
+ sIllustration = tmp1;
+ sTable = tmp2;
+ sText = tmp3;
+ sDrawing = tmp4;
sal_uInt16 i, nCount;
SwWrtShell *pSh = ::GetActiveWrtShell();
diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx
index 8fc1c6ce6d4e..b59a1994c258 100644
--- a/sw/source/ui/dbui/dbinsdlg.cxx
+++ b/sw/source/ui/dbui/dbinsdlg.cxx
@@ -1569,15 +1569,15 @@ void SwInsertDBColAutoPilot::Commit()
pValues[2].Value <<= aDBData.nCommandType;
pValues[3].Value <<= OUString(aEdDbText.GetText());
- String sTmp;
+ OUString sTmp;
for( sal_uInt16 n = 0, nCnt = aLbTableCol.GetEntryCount(); n < nCnt; ++n )
- ( sTmp += aLbTableCol.GetEntry( n ) ) += '\x0a';
+ (sTmp += aLbTableCol.GetEntry(n)) += "\x0a";
- if( sTmp.Len() )
- pValues[4].Value <<= OUString(sTmp);
+ if (!sTmp.isEmpty())
+ pValues[4].Value <<= sTmp;
if( sNoTmpl != (sTmp = aLbDbParaColl.GetSelectEntry()) )
- pValues[5].Value <<= OUString(sTmp);
+ pValues[5].Value <<= sTmp;
if( pTAutoFmt )
pValues[6].Value <<= OUString(pTAutoFmt->GetName());
@@ -1642,7 +1642,7 @@ void SwInsertDBColAutoPilot::Commit()
}
else
{
- pSubValues[4].Value <<= OUString(sTmp);
+ pSubValues[4].Value <<= sTmp;
eLang = GetAppLanguage();
}
diff --git a/sw/source/ui/fmtui/tmpdlg.cxx b/sw/source/ui/fmtui/tmpdlg.cxx
index af1c631843e9..7ad860ec76c9 100644
--- a/sw/source/ui/fmtui/tmpdlg.cxx
+++ b/sw/source/ui/fmtui/tmpdlg.cxx
@@ -346,7 +346,7 @@ const SfxItemSet* SwTemplateDlg::GetRefreshedSet()
void SwTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
{
// set style's and metric's names
- String sNumCharFmt, sBulletCharFmt;
+ OUString sNumCharFmt, sBulletCharFmt;
SwStyleNameMapper::FillUIName( RES_POOLCHR_NUM_LEVEL, sNumCharFmt);
SwStyleNameMapper::FillUIName( RES_POOLCHR_BUL_LEVEL, sBulletCharFmt);
SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
@@ -481,7 +481,7 @@ void SwTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
if(0 == (nHtmlMode & HTMLMODE_ON ))
{
std::vector<OUString> aList;
- String aNew;
+ OUString aNew;
SwStyleNameMapper::FillUIName( RES_POOLCOLL_TEXT, aNew );
aList.push_back( aNew );
if( pWrtShell )
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index 619e4987f5c9..95e9d8f01b30 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -2778,7 +2778,7 @@ void SwTOXEntryTabPage::SetWrtShell(SwWrtShell& rSh)
String SwTOXEntryTabPage::GetLevelHelp(sal_uInt16 nLevel) const
{
- String sRet;
+ OUString sRet;
SwMultiTOXTabDialog* pTOXDlg = (SwMultiTOXTabDialog*)GetTabDialog();
const CurTOXType aCurType = pTOXDlg->GetCurrentTOXType();
if( TOX_INDEX == aCurType.eType )
@@ -2788,7 +2788,7 @@ String SwTOXEntryTabPage::GetLevelHelp(sal_uInt16 nLevel) const
else if( TOX_AUTHORITIES == aCurType.eType )
{
//wildcard -> show entry text
- sRet = '*';
+ sRet = "*";
}
return sRet;
}
diff --git a/sw/source/ui/misc/docfnote.cxx b/sw/source/ui/misc/docfnote.cxx
index e515491ad19b..843729041e9a 100644
--- a/sw/source/ui/misc/docfnote.cxx
+++ b/sw/source/ui/misc/docfnote.cxx
@@ -180,7 +180,7 @@ void SwEndNoteOptionPage::Reset( const SfxItemSet& )
pStyle = pStyleSheetPool->Next();
}
- String sStr;
+ OUString sStr;
SwStyleNameMapper::FillUIName( static_cast< sal_uInt16 >(bEndNote ? RES_POOLCOLL_ENDNOTE
: RES_POOLCOLL_FOOTNOTE), sStr );
if(LISTBOX_ENTRY_NOTFOUND == m_pParaTemplBox->GetEntryPos( sStr ) )
diff --git a/sw/source/ui/misc/num.cxx b/sw/source/ui/misc/num.cxx
index b7eb336788c9..cbee960678f7 100644
--- a/sw/source/ui/misc/num.cxx
+++ b/sw/source/ui/misc/num.cxx
@@ -938,7 +938,7 @@ SwSvxNumBulletTabDialog::~SwSvxNumBulletTabDialog()
void SwSvxNumBulletTabDialog::PageCreated(sal_uInt16 nPageId, SfxTabPage& rPage)
{
// set styles' names and metric
- String sNumCharFmt, sBulletCharFmt;
+ OUString sNumCharFmt, sBulletCharFmt;
SwStyleNameMapper::FillUIName( RES_POOLCHR_NUM_LEVEL, sNumCharFmt );
SwStyleNameMapper::FillUIName( RES_POOLCHR_BUL_LEVEL, sBulletCharFmt );
diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx
index f80d0b99721c..de19bd221248 100644
--- a/sw/source/ui/misc/outline.cxx
+++ b/sw/source/ui/misc/outline.cxx
@@ -169,7 +169,7 @@ SwOutlineTabDialog::SwOutlineTabDialog(Window* pParent, const SfxItemSet* pSwIte
m_nNumPosId = AddTabPage("position", &SwNumPositionTabPage::Create, 0);
m_nOutlineId = AddTabPage("numbering", &SwOutlineSettingsTabPage::Create, 0);
- String sHeadline;
+ OUString sHeadline;
sal_uInt16 i;
for( i = 0; i < MAXLEVEL; ++i )
@@ -377,7 +377,7 @@ short SwOutlineTabDialog::Ok()
for(i = 0; i < MAXLEVEL; ++i )
{
- String sHeadline;
+ OUString sHeadline;
::SwStyleNameMapper::FillUIName( static_cast< sal_uInt16 >(RES_POOLCOLL_HEADLINE1 + i),
sHeadline );
SwTxtFmtColl* pColl = rWrtSh.FindTxtFmtCollByName( sHeadline );
diff --git a/sw/source/ui/uno/unotxvw.cxx b/sw/source/ui/uno/unotxvw.cxx
index f1f6dea9bdc1..6d5fedae79d9 100644
--- a/sw/source/ui/uno/unotxvw.cxx
+++ b/sw/source/ui/uno/unotxvw.cxx
@@ -551,7 +551,7 @@ Sequence< Sequence< PropertyValue > > SwXTextView::getRubyList( sal_Bool /*bAuto
sal_uInt16 nCount = pDoc->FillRubyList( *rSh.GetCrsr(), aList, 0 );
Sequence< Sequence< PropertyValue > > aRet(nCount);
Sequence< PropertyValue >* pRet = aRet.getArray();
- String aString;
+ OUString aString;
for(sal_uInt16 n = 0; n < nCount; n++)
{
const SwRubyListEntry* pEntry = &aList[n];
@@ -567,7 +567,7 @@ Sequence< Sequence< PropertyValue > > SwXTextView::getRubyList( sal_Bool /*bAuto
pValues[1].Value <<= OUString(rAttr.GetText());
pValues[2].Name = OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_RUBY_CHAR_STYLE_NAME));
SwStyleNameMapper::FillProgName(rAttr.GetCharFmtName(), aString, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, true );
- pValues[2].Value <<= OUString( aString );
+ pValues[2].Value <<= aString;
pValues[3].Name = OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_RUBY_ADJUST));
pValues[3].Value <<= (sal_Int16)rAttr.GetAdjustment();
pValues[4].Name = OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_RUBY_IS_ABOVE));
@@ -620,10 +620,11 @@ void SAL_CALL SwXTextView::setRubyList(
{
if((pProperties[nProp].Value >>= sTmp))
{
- String sName;
+ OUString sName;
SwStyleNameMapper::FillUIName(sTmp, sName, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, true );
- sal_uInt16 nPoolId = sName.Len() ?
- SwStyleNameMapper::GetPoolIdFromUIName( sName, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT ) : 0;
+ sal_uInt16 nPoolId = sName.isEmpty() ? 0
+ : SwStyleNameMapper::GetPoolIdFromUIName(sName,
+ nsSwGetPoolIdFromName::GET_POOLID_CHRFMT );
pEntry->GetRubyAttr().SetCharFmtName( sName );
pEntry->GetRubyAttr().SetCharFmtId( nPoolId );
diff --git a/sw/source/ui/utlui/uitool.cxx b/sw/source/ui/utlui/uitool.cxx
index 70e5e2234b36..13375449c590 100644
--- a/sw/source/ui/utlui/uitool.cxx
+++ b/sw/source/ui/utlui/uitool.cxx
@@ -601,7 +601,7 @@ void FillCharStyleListBox(ListBox& rToFill, SwDocShell* pDocSh, bool bSorted, bo
pPool->SetSearchMask(SFX_STYLE_FAMILY_CHAR, SFXSTYLEBIT_ALL);
SwDoc* pDoc = pDocSh->GetDoc();
const SfxStyleSheetBase* pBase = pPool->First();
- String sStandard;
+ OUString sStandard;
SwStyleNameMapper::FillUIName( RES_POOLCOLL_STANDARD, sStandard );
while(pBase)
{