summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-09-23 07:19:08 +0100
committerCaolán McNamara <caolanm@redhat.com>2013-09-25 19:24:23 +0200
commit98de5b40c8a3fd4e57477b6d994e3b1472207f71 (patch)
tree567fdbbaecbddbfc19f28a08da5d1f6d5207748c /sw
parent0552a91acde9dce28c0d92c552d21fbadfcb9184 (diff)
Related: fdo#38838 remove UniString::EqualsIgnoreCaseAscii
Change-Id: Ib5c3a2daa4a48bc286b14fa2cebb3306ea0012bc
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/acmplwrd.hxx1
-rw-r--r--sw/inc/docsh.hxx1
-rw-r--r--sw/inc/fmtcol.hxx7
-rw-r--r--sw/inc/frmfmt.hxx1
-rw-r--r--sw/inc/paratr.hxx1
-rw-r--r--sw/source/core/bastyp/calc.cxx14
-rw-r--r--sw/source/core/inc/UndoAttribute.hxx1
-rw-r--r--sw/source/core/inc/UndoCore.hxx1
-rw-r--r--sw/source/core/inc/UndoDelete.hxx1
-rw-r--r--sw/source/core/inc/UndoInsert.hxx1
-rw-r--r--sw/source/core/inc/UndoNumbering.hxx1
-rw-r--r--sw/source/core/inc/UndoOverwrite.hxx3
-rw-r--r--sw/source/core/inc/UndoSort.hxx1
-rw-r--r--sw/source/core/inc/UndoTable.hxx1
-rw-r--r--sw/source/filter/html/htmlcss1.cxx5
-rw-r--r--sw/source/filter/html/htmlfld.cxx8
-rw-r--r--sw/source/filter/html/htmlgrin.cxx6
-rw-r--r--sw/source/filter/html/htmlsect.cxx6
-rw-r--r--sw/source/filter/html/swhtml.cxx23
-rw-r--r--sw/source/filter/html/swhtml.hxx4
-rw-r--r--sw/source/filter/ww1/w1filter.cxx59
-rw-r--r--sw/source/filter/ww8/ww8glsy.cxx6
-rw-r--r--sw/source/filter/ww8/ww8glsy.hxx2
-rw-r--r--sw/source/filter/ww8/ww8par.cxx12
-rw-r--r--sw/source/filter/ww8/ww8par4.cxx2
-rw-r--r--sw/source/filter/ww8/ww8par5.cxx61
-rw-r--r--sw/source/filter/ww8/ww8scan.cxx10
-rw-r--r--sw/source/filter/ww8/ww8scan.hxx6
-rw-r--r--sw/source/ui/dbui/dbmgr.cxx20
-rw-r--r--sw/source/ui/dochdl/swdtflvr.cxx4
-rw-r--r--sw/source/ui/fldui/flddb.cxx8
-rw-r--r--sw/source/ui/fldui/flddinf.cxx8
-rw-r--r--sw/source/ui/fldui/flddok.cxx8
-rw-r--r--sw/source/ui/fldui/fldfunc.cxx8
-rw-r--r--sw/source/ui/fldui/fldref.cxx10
-rw-r--r--sw/source/ui/fldui/fldvar.cxx8
-rw-r--r--sw/source/ui/vba/vbafield.cxx14
37 files changed, 172 insertions, 161 deletions
diff --git a/sw/inc/acmplwrd.hxx b/sw/inc/acmplwrd.hxx
index c857727adfdd..4a544ca4d4cc 100644
--- a/sw/inc/acmplwrd.hxx
+++ b/sw/inc/acmplwrd.hxx
@@ -24,6 +24,7 @@
#include <editeng/swafopt.hxx>
#include <editeng/Trie.hxx>
+#include <tools/string.hxx>
class SwDoc;
class SwAutoCompleteWord_Impl;
diff --git a/sw/inc/docsh.hxx b/sw/inc/docsh.hxx
index ccff4f09acf0..25b0808c122c 100644
--- a/sw/inc/docsh.hxx
+++ b/sw/inc/docsh.hxx
@@ -31,6 +31,7 @@
#include <svl/lstner.hxx>
#include <svtools/embedhlp.hxx>
+#include <tools/string.hxx>
class SwDoc;
class SfxDocumentInfoDialog;
diff --git a/sw/inc/fmtcol.hxx b/sw/inc/fmtcol.hxx
index 0d7f5ad83609..0b90a786fb12 100644
--- a/sw/inc/fmtcol.hxx
+++ b/sw/inc/fmtcol.hxx
@@ -23,6 +23,7 @@
#include <frmatr.hxx>
#include <swtypes.hxx> // For MAXLEVEL.
#include <boost/ptr_container/ptr_vector.hpp>
+#include <tools/string.hxx>
class SwDoc; // For friend.
@@ -35,7 +36,7 @@ protected:
: SwFmt( rPool, pFmtName, pWhichRanges, pDerFrom, nFmtWhich )
{ SetAuto( sal_False ); }
- SwFmtColl( SwAttrPool& rPool, const String &rFmtName,
+ SwFmtColl( SwAttrPool& rPool, const OUString &rFmtName,
const sal_uInt16* pWhichRanges, SwFmtColl* pDerFrom,
sal_uInt16 nFmtWhich )
: SwFmt( rPool, rFmtName, pWhichRanges, pDerFrom, nFmtWhich )
@@ -73,7 +74,7 @@ protected:
mbAssignedToOutlineStyle(false)
{ pNextTxtFmtColl = this; }
- SwTxtFmtColl( SwAttrPool& rPool, const String &rFmtCollName,
+ SwTxtFmtColl( SwAttrPool& rPool, const OUString &rFmtCollName,
SwTxtFmtColl* pDerFrom = 0,
sal_uInt16 nFmtWh = RES_TXTFMTCOLL )
: SwFmtColl( rPool, rFmtCollName, aTxtFmtCollSetRange,
@@ -155,7 +156,7 @@ protected:
pDerFrom, RES_GRFFMTCOLL )
{}
- SwGrfFmtColl( SwAttrPool& rPool, const String &rFmtCollName,
+ SwGrfFmtColl( SwAttrPool& rPool, const OUString &rFmtCollName,
SwGrfFmtColl* pDerFrom = 0 )
: SwFmtColl( rPool, rFmtCollName, aGrfFmtCollSetRange,
pDerFrom, RES_GRFFMTCOLL )
diff --git a/sw/inc/frmfmt.hxx b/sw/inc/frmfmt.hxx
index c6e5ebf2ac7e..0d3eba5d2ec1 100644
--- a/sw/inc/frmfmt.hxx
+++ b/sw/inc/frmfmt.hxx
@@ -22,6 +22,7 @@
#include <com/sun/star/text/PositionLayoutDir.hpp>
#include <cppuhelper/weakref.hxx>
#include <tools/gen.hxx>
+#include <tools/string.hxx>
#include <format.hxx>
#include "swdllapi.h"
diff --git a/sw/inc/paratr.hxx b/sw/inc/paratr.hxx
index 02f659c57382..feb01207eaa0 100644
--- a/sw/inc/paratr.hxx
+++ b/sw/inc/paratr.hxx
@@ -27,6 +27,7 @@
#include <format.hxx>
#include <swtypes.hxx>
#include <editeng/adjustitem.hxx>
+#include <tools/string.hxx>
class SwCharFmt;
class IntlWrapper;
diff --git a/sw/source/core/bastyp/calc.cxx b/sw/source/core/bastyp/calc.cxx
index 2d6bebcfce19..bc6f4a6a0c4b 100644
--- a/sw/source/core/bastyp/calc.cxx
+++ b/sw/source/core/bastyp/calc.cxx
@@ -527,10 +527,10 @@ SwCalcExp* SwCalc::VarLook( const String& rStr, sal_uInt16 ins )
if( pMgr && sSourceName.Len() && sTableName.Len() &&
pMgr->OpenDataSource(sSourceName, sTableName, -1, false))
{
- String sColumnName( GetColumnName( sTmpName ));
- OSL_ENSURE(sColumnName.Len(), "Missing DB column name");
+ OUString sColumnName( GetColumnName( sTmpName ));
+ OSL_ENSURE(!sColumnName.isEmpty(), "Missing DB column name");
- String sDBNum( SwFieldType::GetTypeStr(TYP_DBSETNUMBERFLD) );
+ OUString sDBNum( SwFieldType::GetTypeStr(TYP_DBSETNUMBERFLD) );
sDBNum = pCharClass->lowercase(sDBNum);
// Initialize again because this doesn't happen in docfld anymore for
@@ -538,7 +538,7 @@ SwCalcExp* SwCalc::VarLook( const String& rStr, sal_uInt16 ins )
// an DB_Field in a document.
VarChange( sDBNum, pMgr->GetSelectedRecordId(sSourceName, sTableName));
- if( sDBNum.EqualsIgnoreCaseAscii(sColumnName) )
+ if( sDBNum.equalsIgnoreAsciiCase(sColumnName) )
{
aErrExpr.nValue.PutLong(long(pMgr->GetSelectedRecordId(sSourceName, sTableName)));
return &aErrExpr;
@@ -576,9 +576,9 @@ SwCalcExp* SwCalc::VarLook( const String& rStr, sal_uInt16 ins )
pNewExp->pNext = VarTable[ ii ];
VarTable[ ii ] = pNewExp;
- String sColumnName( GetColumnName( sTmpName ));
- OSL_ENSURE( sColumnName.Len(), "Missing DB column name" );
- if( sColumnName.EqualsIgnoreCaseAscii(
+ OUString sColumnName( GetColumnName( sTmpName ));
+ OSL_ENSURE( !sColumnName.isEmpty(), "Missing DB column name" );
+ if( sColumnName.equalsIgnoreAsciiCase(
SwFieldType::GetTypeStr( TYP_DBSETNUMBERFLD ) ))
{
SwNewDBMgr *pMgr = rDoc.GetNewDBMgr();
diff --git a/sw/source/core/inc/UndoAttribute.hxx b/sw/source/core/inc/UndoAttribute.hxx
index bfbd85b346bc..ddc3289bb112 100644
--- a/sw/source/core/inc/UndoAttribute.hxx
+++ b/sw/source/core/inc/UndoAttribute.hxx
@@ -23,6 +23,7 @@
#include <undobj.hxx>
#include <memory>
#include <svl/itemset.hxx>
+#include <tools/string.hxx>
#include <swtypes.hxx>
#include <calbck.hxx>
#include <set>
diff --git a/sw/source/core/inc/UndoCore.hxx b/sw/source/core/inc/UndoCore.hxx
index a31d3f607e43..67d2e78f44fc 100644
--- a/sw/source/core/inc/UndoCore.hxx
+++ b/sw/source/core/inc/UndoCore.hxx
@@ -22,6 +22,7 @@
#include <undobj.hxx>
#include <calbck.hxx>
+#include <tools/string.hxx>
class SfxItemSet;
class SwFmtColl;
diff --git a/sw/source/core/inc/UndoDelete.hxx b/sw/source/core/inc/UndoDelete.hxx
index b28acb6d0abe..3cec55373a8d 100644
--- a/sw/source/core/inc/UndoDelete.hxx
+++ b/sw/source/core/inc/UndoDelete.hxx
@@ -22,6 +22,7 @@
#include <undobj.hxx>
#include <tools/mempool.hxx>
+#include <tools/string.hxx>
class SwRedlineSaveDatas;
class SwTxtNode;
diff --git a/sw/source/core/inc/UndoInsert.hxx b/sw/source/core/inc/UndoInsert.hxx
index 009209f3fbbe..04b594938fcd 100644
--- a/sw/source/core/inc/UndoInsert.hxx
+++ b/sw/source/core/inc/UndoInsert.hxx
@@ -22,6 +22,7 @@
#include <undobj.hxx>
#include <tools/mempool.hxx>
+#include <tools/string.hxx>
#include <swtypes.hxx>
#include <IDocumentContentOperations.hxx>
diff --git a/sw/source/core/inc/UndoNumbering.hxx b/sw/source/core/inc/UndoNumbering.hxx
index 247a14f01bf6..f54996bef69b 100644
--- a/sw/source/core/inc/UndoNumbering.hxx
+++ b/sw/source/core/inc/UndoNumbering.hxx
@@ -23,6 +23,7 @@
#include <vector>
#include <undobj.hxx>
#include <boost/shared_ptr.hpp>
+#include <tools/string.hxx>
#include <numrule.hxx>
//----------- Undo for Numbering -------------------------------------
diff --git a/sw/source/core/inc/UndoOverwrite.hxx b/sw/source/core/inc/UndoOverwrite.hxx
index 6a8e31d38cdf..54365d104e65 100644
--- a/sw/source/core/inc/UndoOverwrite.hxx
+++ b/sw/source/core/inc/UndoOverwrite.hxx
@@ -20,8 +20,9 @@
#ifndef SW_UNDO_OVERWRITE_HXX
#define SW_UNDO_OVERWRITE_HXX
-#include <undobj.hxx>
#include <com/sun/star/uno/Sequence.h>
+#include <tools/string.hxx>
+#include <undobj.hxx>
class SwRedlineSaveDatas;
class SwTxtNode;
diff --git a/sw/source/core/inc/UndoSort.hxx b/sw/source/core/inc/UndoSort.hxx
index 5cc5e7d30b71..501ff59968ae 100644
--- a/sw/source/core/inc/UndoSort.hxx
+++ b/sw/source/core/inc/UndoSort.hxx
@@ -22,6 +22,7 @@
#include <undobj.hxx>
#include <boost/ptr_container/ptr_vector.hpp>
+#include <tools/string.hxx>
struct SwSortOptions;
class SwTableNode;
diff --git a/sw/source/core/inc/UndoTable.hxx b/sw/source/core/inc/UndoTable.hxx
index cd79f20e346f..61a8d271fdb0 100644
--- a/sw/source/core/inc/UndoTable.hxx
+++ b/sw/source/core/inc/UndoTable.hxx
@@ -28,6 +28,7 @@
#include <itabenum.hxx>
#include "boost/noncopyable.hpp"
#include "boost/scoped_ptr.hpp"
+#include <tools/string.hxx>
class SfxItemSet;
diff --git a/sw/source/filter/html/htmlcss1.cxx b/sw/source/filter/html/htmlcss1.cxx
index ebef8fface75..0254957df955 100644
--- a/sw/source/filter/html/htmlcss1.cxx
+++ b/sw/source/filter/html/htmlcss1.cxx
@@ -1778,7 +1778,8 @@ void SwHTMLParser::InsertLink()
}
else
{
- String sRel, sHRef, sType;
+ OUString sRel;
+ String sHRef, sType;
const HTMLOptions& rOptions2 = GetOptions();
for (size_t i = rOptions2.size(); i; )
@@ -1798,7 +1799,7 @@ void SwHTMLParser::InsertLink()
}
}
- if( sHRef.Len() && sRel.EqualsIgnoreCaseAscii( "STYLESHEET" ) &&
+ if( sHRef.Len() && sRel.equalsIgnoreAsciiCase( "STYLESHEET" ) &&
( !sType.Len() ||
sType.GetToken(0,';').EqualsAscii(sCSS_mimetype) ) )
{
diff --git a/sw/source/filter/html/htmlfld.cxx b/sw/source/filter/html/htmlfld.cxx
index 554dda044ab8..8924c24b804c 100644
--- a/sw/source/filter/html/htmlfld.cxx
+++ b/sw/source/filter/html/htmlfld.cxx
@@ -191,12 +191,12 @@ static HTMLOptionEnum aHTMLFileNameFldFmtTable[] =
};
-sal_uInt16 SwHTMLParser::GetNumType( const String& rStr, sal_uInt16 nDfltType )
+sal_uInt16 SwHTMLParser::GetNumType( const OUString& rStr, sal_uInt16 nDfltType )
{
sal_uInt16 nType = nDfltType;
const HTMLOptionEnum *pOptEnums = aHTMLPageNumFldFmtTable;
while( pOptEnums->pName )
- if( !rStr.EqualsIgnoreCaseAscii( pOptEnums->pName ) )
+ if( !rStr.equalsIgnoreAsciiCaseAscii( pOptEnums->pName ) )
pOptEnums++;
else
break;
@@ -352,10 +352,10 @@ void SwHTMLParser::NewField()
SvNumberFormatter *pFormatter = pDoc->GetNumberFormatter();
if( pFmtOption )
{
- const String& rFmt = pFmtOption->GetString();
+ const OUString& rFmt = pFmtOption->GetString();
for( sal_uInt16 k = 0; pFmtTbl[k].pName; k++ )
{
- if( rFmt.EqualsIgnoreCaseAscii( pFmtTbl[k].pName ) )
+ if( rFmt.equalsIgnoreAsciiCaseAscii( pFmtTbl[k].pName ) )
{
nNumFmt = pFormatter->GetFormatIndex(
pFmtTbl[k].eFmt, LANGUAGE_SYSTEM);
diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx
index f30669adc309..fe22a33499ba 100644
--- a/sw/source/filter/html/htmlgrin.cxx
+++ b/sw/source/filter/html/htmlgrin.cxx
@@ -92,18 +92,18 @@ HTMLOptionEnum aHTMLImgVAlignTable[] =
{ 0, 0 }
};
-ImageMap *SwHTMLParser::FindImageMap( const String& rName ) const
+ImageMap *SwHTMLParser::FindImageMap( const OUString& rName ) const
{
ImageMap *pMap = 0;
- OSL_ENSURE( rName.GetChar(0) != '#', "FindImageName: Name beginnt mit #!" );
+ OSL_ENSURE( rName[0] != '#', "FindImageName: Name beginnt mit #!" );
if( pImageMaps )
{
for( sal_uInt16 i=0; i<pImageMaps->size(); i++ )
{
ImageMap *pIMap = &(*pImageMaps)[i];
- if( rName.EqualsIgnoreCaseAscii( pIMap->GetName() ) )
+ if( rName.equalsIgnoreAsciiCase( pIMap->GetName() ) )
{
pMap = pIMap;
break;
diff --git a/sw/source/filter/html/htmlsect.cxx b/sw/source/filter/html/htmlsect.cxx
index 3a6eae63bbeb..bb4cce1d7a42 100644
--- a/sw/source/filter/html/htmlsect.cxx
+++ b/sw/source/filter/html/htmlsect.cxx
@@ -102,10 +102,10 @@ void SwHTMLParser::NewDivision( int nToken )
break;
case HTML_O_TYPE:
{
- const String& rType = rOption.GetString();
- if( rType.EqualsIgnoreCaseAscii( "HEADER" ) )
+ const OUString& rType = rOption.GetString();
+ if( rType.equalsIgnoreAsciiCase( "HEADER" ) )
bHeader = sal_True;
- else if( rType.EqualsIgnoreCaseAscii( "FOOTER" ) )
+ else if( rType.equalsIgnoreAsciiCase( "FOOTER" ) )
bFooter = sal_True;
}
}
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index b27eedaa3f4a..8a1e91e17a3f 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -5097,15 +5097,15 @@ void SwHTMLParser::InsertLineBreak()
{
case HTML_O_CLEAR:
{
- const String &aClear = rOption.GetString();
- if( aClear.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_AL_all ) )
+ const OUString &rClear = rOption.GetString();
+ if( rClear.equalsIgnoreAsciiCase( OOO_STRING_SVTOOLS_HTML_AL_all ) )
{
bClearLeft = sal_True;
bClearRight = sal_True;
}
- else if( aClear.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_AL_left ) )
+ else if( rClear.equalsIgnoreAsciiCase( OOO_STRING_SVTOOLS_HTML_AL_left ) )
bClearLeft = sal_True;
- else if( aClear.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_AL_right ) )
+ else if( rClear.equalsIgnoreAsciiCase( OOO_STRING_SVTOOLS_HTML_AL_right ) )
bClearRight = sal_True;
}
break;
@@ -5386,8 +5386,7 @@ void SwHTMLParser::InsertHorzRule()
void SwHTMLParser::ParseMoreMetaOptions()
{
- String aName;
- OUString aContent;
+ OUString aName, aContent;
sal_Bool bHTTPEquiv = sal_False;
const HTMLOptions& rHTMLOptions = GetOptions();
@@ -5414,22 +5413,22 @@ void SwHTMLParser::ParseMoreMetaOptions()
// nicht geaendert wurde. Deshalb genuegt es, auf Generator und
// auf refresh abzufragen, um noch nicht verarbeitete Token zu finden,
// denn das sind die einzigen, die die Dok-Info nicht modifizieren.
- if( aName.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_META_generator ) ||
- aName.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_META_refresh ) ||
- aName.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_META_content_type ) ||
- aName.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_META_content_script_type ) )
+ if( aName.equalsIgnoreAsciiCase( OOO_STRING_SVTOOLS_HTML_META_generator ) ||
+ aName.equalsIgnoreAsciiCase( OOO_STRING_SVTOOLS_HTML_META_refresh ) ||
+ aName.equalsIgnoreAsciiCase( OOO_STRING_SVTOOLS_HTML_META_content_type ) ||
+ aName.equalsIgnoreAsciiCase( OOO_STRING_SVTOOLS_HTML_META_content_script_type ) )
return;
aContent = comphelper::string::remove(aContent, '\r');
aContent = comphelper::string::remove(aContent, '\n');
- if( aName.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_META_sdendnote ) )
+ if( aName.equalsIgnoreAsciiCase( OOO_STRING_SVTOOLS_HTML_META_sdendnote ) )
{
FillEndNoteInfo( aContent );
return;
}
- if( aName.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_META_sdfootnote ) )
+ if( aName.equalsIgnoreAsciiCase( OOO_STRING_SVTOOLS_HTML_META_sdfootnote ) )
{
FillFootNoteInfo( aContent );
return;
diff --git a/sw/source/filter/html/swhtml.hxx b/sw/source/filter/html/swhtml.hxx
index f2f1147803b9..f345fa6a216b 100644
--- a/sw/source/filter/html/swhtml.hxx
+++ b/sw/source/filter/html/swhtml.hxx
@@ -650,7 +650,7 @@ class SwHTMLParser : public SfxHTMLParser, public SwClient
// <SDFIELD>
public:
- static sal_uInt16 GetNumType( const String& rStr, sal_uInt16 eDfltType );
+ static sal_uInt16 GetNumType( const OUString& rStr, sal_uInt16 eDfltType );
private:
void NewField();
void EndField();
@@ -662,7 +662,7 @@ private:
// Einfuegen von Grafiken, Plugins und Applets
// Image-Maps suchen und mit Grafik-Nodes verbinden
- ImageMap *FindImageMap( const String& rURL ) const;
+ ImageMap *FindImageMap( const OUString& rURL ) const;
void ConnectImageMaps();
// Verankerung eines Fly-Frames bestimmen und entsprechende Attribute
diff --git a/sw/source/filter/ww1/w1filter.cxx b/sw/source/filter/ww1/w1filter.cxx
index 9e5d56dcb32c..00d32aa3e3a3 100644
--- a/sw/source/filter/ww1/w1filter.cxx
+++ b/sw/source/filter/ww1/w1filter.cxx
@@ -316,12 +316,12 @@ void Ww1Bookmarks::Out(Ww1Shell& rOut, Ww1Manager& rMan, sal_uInt16)
return;
}
- const String & rName = GetName();
- if( rName.EqualsAscii( "_Toc", 0, 4 ) ) // "_Toc*" ist ueberfluessig
+ const OUString & rName = GetName();
+ if( rName.startsWith( "_Toc" ) ) // "_Toc*" ist ueberfluessig
return;
if( rOut.IsFlagSet( SwFltControlStack::HYPO )
- && rName.EqualsIgnoreCaseAscii( "FORMULAR" ) )
+ && rName.equalsIgnoreAsciiCase( "FORMULAR" ) )
rOut.SetProtect();
// Fuer UEbersetzung Bookmark -> Variable setzen
@@ -910,15 +910,16 @@ oncemore:
}
if( pDot )
{
- String sExt;
+ OUStringBuffer sBuf;
while( *pDot != '\0' && *pDot != ' ')
- sExt += *pDot++;
-
- if( sExt.EqualsIgnoreCaseAscii( ".tiff" )
- || sExt.EqualsIgnoreCaseAscii( ".bmp" )
- || sExt.EqualsIgnoreCaseAscii( ".gif" )
- || sExt.EqualsIgnoreCaseAscii( ".pcx" )
- || sExt.EqualsIgnoreCaseAscii( ".pic" ))
+ sBuf.append(*pDot++);
+ OUString sExt = sBuf.makeStringAndClear();
+
+ if( sExt.equalsIgnoreAsciiCase( ".tiff" )
+ || sExt.equalsIgnoreAsciiCase( ".bmp" )
+ || sExt.equalsIgnoreAsciiCase( ".gif" )
+ || sExt.equalsIgnoreAsciiCase( ".pcx" )
+ || sExt.equalsIgnoreAsciiCase( ".pic" ))
rOut.AddGraphic( sName );
else
bKnown = false;
@@ -1313,7 +1314,7 @@ SvxFontItem Ww1Fonts::GetFont(sal_uInt16 nFCode)
{
// erzeugen eine fonts im sw-sinne aus den word-strukturen
FontFamily eFamily = FAMILY_DONTKNOW;
- String aName;
+ OUString aName;
FontPitch ePitch = PITCH_DONTKNOW;
rtl_TextEncoding eCharSet = RTL_TEXTENCODING_DONTKNOW;
switch (nFCode)
@@ -1323,18 +1324,18 @@ SvxFontItem Ww1Fonts::GetFont(sal_uInt16 nFCode)
// "Symbol", and "Helv"
case 0:
eFamily = FAMILY_ROMAN;
- aName.AssignAscii( RTL_CONSTASCII_STRINGPARAM( "Tms Rmn" ));
+ aName = "Tms Rmn";
ePitch = PITCH_VARIABLE;
eCharSet = RTL_TEXTENCODING_MS_1252;
break;
case 1:
- aName.AssignAscii( RTL_CONSTASCII_STRINGPARAM( "Symbol" ));
+ aName = "Symbol";
ePitch = PITCH_VARIABLE;
eCharSet = RTL_TEXTENCODING_SYMBOL;
break;
case 2:
eFamily = FAMILY_SWISS;
- aName.AssignAscii( RTL_CONSTASCII_STRINGPARAM( "Helv" ));
+ aName = "Helv";
ePitch = PITCH_VARIABLE;
eCharSet = RTL_TEXTENCODING_MS_1252;
break;
@@ -1354,10 +1355,10 @@ SvxFontItem Ww1Fonts::GetFont(sal_uInt16 nFCode)
ePitch = ePitchA[pF->prgGet()];
// CharSet ...........................................
eCharSet = RTL_TEXTENCODING_MS_1252;
- if (aName.EqualsIgnoreCaseAscii("Symbol")
- || aName.EqualsIgnoreCaseAscii("Symbol Set")
- || aName.EqualsIgnoreCaseAscii("Wingdings")
- || aName.EqualsIgnoreCaseAscii("ITC Zapf Dingbats") )
+ if (aName.equalsIgnoreAsciiCase("Symbol")
+ || aName.equalsIgnoreAsciiCase("Symbol Set")
+ || aName.equalsIgnoreAsciiCase("Wingdings")
+ || aName.equalsIgnoreAsciiCase("ITC Zapf Dingbats") )
eCharSet = RTL_TEXTENCODING_SYMBOL;
// FontFamily ........................................
sal_uInt16 b = pF->ffGet();
@@ -1373,7 +1374,7 @@ SvxFontItem Ww1Fonts::GetFont(sal_uInt16 nFCode)
{
OSL_ENSURE(false, "WW1Fonts::GetFont: Nicht existenter Font !");
eFamily = FAMILY_SWISS;
- aName.AssignAscii( RTL_CONSTASCII_STRINGPARAM( "Helv" ));
+ aName = "Helv";
ePitch = PITCH_VARIABLE;
eCharSet = RTL_TEXTENCODING_MS_1252;
}
@@ -1382,10 +1383,10 @@ SvxFontItem Ww1Fonts::GetFont(sal_uInt16 nFCode)
}
// Extrawurst Hypo
if ( SwFltGetFlag( nFieldFlags, SwFltControlStack::HYPO )
- && ( aName.EqualsIgnoreCaseAscii("Helv")
- || aName.EqualsIgnoreCaseAscii("Helvetica") ) )
+ && ( aName.equalsIgnoreAsciiCase("Helv")
+ || aName.equalsIgnoreAsciiCase("Helvetica") ) )
{
- aName.AssignAscii( RTL_CONSTASCII_STRINGPARAM( "Helvetica Neue" ));
+ aName = "Helvetica Neue";
if (eFamily==FAMILY_DONTKNOW)
eFamily = FAMILY_SWISS;
}
@@ -1397,21 +1398,21 @@ SvxFontItem Ww1Fonts::GetFont(sal_uInt16 nFCode)
// Nach TH sollen diese durch feste Werte ersetzt werden,
// also nicht ueber System::GetStandardFont, damit keine
// Namenslisten auftauchen ( Dieses koennte den User verwirren )
- if( aName.EqualsIgnoreCaseAscii("Helv"))
+ if( aName.equalsIgnoreAsciiCase("Helv"))
{
- aName.AssignAscii( RTL_CONSTASCII_STRINGPARAM( "Helvetica" ));
+ aName = "Helvetica";
if (eFamily==FAMILY_DONTKNOW)
eFamily = FAMILY_SWISS;
}
- else if (aName.EqualsIgnoreCaseAscii("Tms Rmn"))
+ else if (aName.equalsIgnoreAsciiCase("Tms Rmn"))
{
- aName.AssignAscii( RTL_CONSTASCII_STRINGPARAM( "Times New Roman" ));
+ aName = "Times New Roman";
if (eFamily==FAMILY_DONTKNOW)
eFamily = FAMILY_ROMAN;
}
- else if (aName.EqualsIgnoreCaseAscii("System Monospaced") )
+ else if (aName.equalsIgnoreAsciiCase("System Monospaced") )
{
- aName.AssignAscii( RTL_CONSTASCII_STRINGPARAM( "Courier" ));
+ aName = "Courier";
ePitch = PITCH_FIXED;
}
}
diff --git a/sw/source/filter/ww8/ww8glsy.cxx b/sw/source/filter/ww8/ww8glsy.cxx
index 07210dc1829b..f5d523e128ac 100644
--- a/sw/source/filter/ww8/ww8glsy.cxx
+++ b/sw/source/filter/ww8/ww8glsy.cxx
@@ -79,7 +79,7 @@ bool WW8Glossary::HasBareGraphicEnd(SwDoc *pDoc,SwNodeIndex &rIdx)
}
bool WW8Glossary::MakeEntries(SwDoc *pD, SwTextBlocks &rBlocks,
- bool bSaveRelFile, const std::vector<String>& rStrings,
+ bool bSaveRelFile, const std::vector<OUString>& rStrings,
const std::vector<ww::bytes>& rExtra)
{
// this code will be called after reading all text into the
@@ -147,7 +147,7 @@ bool WW8Glossary::MakeEntries(SwDoc *pD, SwTextBlocks &rBlocks,
if(n != 0xFFFF)
{
rBlocks.ClearDoc();
- const String &rLNm = rStrings[nGlosEntry];
+ const OUString &rLNm = rStrings[nGlosEntry];
String sShortcut = rLNm;
@@ -195,7 +195,7 @@ bool WW8Glossary::Load( SwTextBlocks &rBlocks, bool bSaveRelFile )
if (pGlossary && pGlossary->IsGlossaryFib() && rBlocks.StartPutMuchBlockEntries())
{
//read the names of the autotext entries
- std::vector<String> aStrings;
+ std::vector<OUString> aStrings;
std::vector<ww::bytes> aData;
rtl_TextEncoding eStructCharSet =
diff --git a/sw/source/filter/ww8/ww8glsy.hxx b/sw/source/filter/ww8/ww8glsy.hxx
index f6b7cbe37466..1764ce4cd63b 100644
--- a/sw/source/filter/ww8/ww8glsy.hxx
+++ b/sw/source/filter/ww8/ww8glsy.hxx
@@ -70,7 +70,7 @@ private:
sal_uInt16 nStrings;
bool MakeEntries(SwDoc *pD, SwTextBlocks &rBlocks, bool bSaveRelFile,
- const ::std::vector<String>& rStrings,
+ const ::std::vector<OUString>& rStrings,
const ::std::vector<ww::bytes>& rExtra);
bool HasBareGraphicEnd(SwDoc *pD,SwNodeIndex &rIdx);
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 108bbccfe57e..53254a438e30 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -4222,7 +4222,7 @@ void SwWW8ImplReader::StoreMacroCmds()
void SwWW8ImplReader::ReadDocVars()
{
- std::vector<String> aDocVarStrings;
+ std::vector<OUString> aDocVarStrings;
std::vector<ww::bytes> aDocVarStringIds;
std::vector<String> aDocValueStrings;
WW8ReadSTTBF(!bVer67, *pTableStream, pWwFib->fcStwUser,
@@ -4243,11 +4243,11 @@ void SwWW8ImplReader::ReadDocVars()
for(size_t i=0; i<aDocVarStrings.size(); i++)
{
uno::Any aDefaultValue;
- OUString name(aDocVarStrings[i]);
+ const OUString &rName = aDocVarStrings[i];
uno::Any aValue;
aValue <<= OUString(aDocValueStrings[i]);
try {
- xUserDefinedProps->addProperty( name,
+ xUserDefinedProps->addProperty( rName,
beans::PropertyAttribute::REMOVABLE,
aValue );
} catch (const uno::Exception &) {
@@ -4528,8 +4528,8 @@ sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos)
pWwFib->lcbSttbfRMark, rDoc );
}
- // M.M. Initialize our String/ID map for Linked Sections
- std::vector<String> aLinkStrings;
+ // Initialize our String/ID map for Linked Sections
+ std::vector<OUString> aLinkStrings;
std::vector<ww::bytes> aStringIds;
WW8ReadSTTBF(!bVer67, *pTableStream, pWwFib->fcSttbFnm,
@@ -5543,7 +5543,7 @@ int SwWW8ImplReader::GetAnnotationIndex(sal_uInt32 nTag)
if (!mpAtnIndexes.get() && pWwFib->lcbSttbfAtnbkmk)
{
mpAtnIndexes.reset(new std::map<sal_uInt32, int>());
- std::vector<String> aStrings;
+ std::vector<OUString> aStrings;
std::vector<ww::bytes> aEntries;
WW8ReadSTTBF(!bVer67, *pTableStream, pWwFib->fcSttbfAtnbkmk, pWwFib->lcbSttbfAtnbkmk, sizeof(struct WW8_ATNBE), eStructCharSet, aStrings, &aEntries);
for (size_t i = 0; i < aStrings.size() && i < aEntries.size(); ++i)
diff --git a/sw/source/filter/ww8/ww8par4.cxx b/sw/source/filter/ww8/ww8par4.cxx
index 7aa31b67d17d..f92e3e6ca308 100644
--- a/sw/source/filter/ww8/ww8par4.cxx
+++ b/sw/source/filter/ww8/ww8par4.cxx
@@ -449,7 +449,7 @@ SdrObject* SwWW8ImplReader::ImportOleBase( Graphic& rGraph,
void SwWW8ImplReader::ReadRevMarkAuthorStrTabl( SvStream& rStrm,
sal_Int32 nTblPos, sal_Int32 nTblSiz, SwDoc& rDocOut )
{
- ::std::vector<String> aAuthorNames;
+ ::std::vector<OUString> aAuthorNames;
WW8ReadSTTBF( !bVer67, rStrm, nTblPos, nTblSiz, bVer67 ? 2 : 0,
eStructCharSet, aAuthorNames );
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index e736f99b8cb9..885066683274 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -314,10 +314,10 @@ long SwWW8ImplReader::Read_Book(WW8PLCFManResult*)
}
//"_Toc*" and "_Hlt*" are unnecessary
- const String* pName = pB->GetName();
+ const OUString* pName = pB->GetName();
#if !defined(WW_NATIVE_TOC)
- if( !pName || pName->EqualsIgnoreCaseAscii( "_Toc", 0, 4 )
- || pName->EqualsIgnoreCaseAscii( "_Hlt", 0, 4 ) )
+ if( !pName || pName->startsWithIgnoreAsciiCase( "_Toc" )
+ || pName->startsWithIgnoreAsciiCase( "_Hlt" ) )
return 0;
#endif
@@ -504,37 +504,34 @@ String FindPara( const String& rStr, sal_Unicode cToken, sal_Unicode cToken2 )
}
-static SvxExtNumType GetNumTypeFromName(const String& rStr,
+static SvxExtNumType GetNumTypeFromName(const OUString& rStr,
bool bAllowPageDesc = false)
{
SvxExtNumType eTyp = bAllowPageDesc ? SVX_NUM_PAGEDESC : SVX_NUM_ARABIC;
- if( rStr.EqualsIgnoreCaseAscii( "Arabi", 0, 5 ) ) // Arabisch, Arabic
+ if( rStr.startsWithIgnoreAsciiCase( "Arabi" ) ) // Arabisch, Arabic
eTyp = SVX_NUM_ARABIC;
- else if( rStr.EqualsAscii( "misch", 2, 5 ) ) // r"omisch
+ else if( rStr.startsWith( "misch" ) ) // r"omisch
eTyp = SVX_NUM_ROMAN_LOWER;
- else if( rStr.EqualsAscii( "MISCH", 2, 5 ) ) // R"OMISCH
+ else if( rStr.startsWith( "MISCH" ) ) // R"OMISCH
eTyp = SVX_NUM_ROMAN_UPPER;
- else if( rStr.EqualsIgnoreCaseAscii( "alphabeti", 0, 9 ) )// alphabetisch, alphabetic
- eTyp = ( rStr.GetChar( 0 ) == 'A' )
+ else if( rStr.startsWithIgnoreAsciiCase( "alphabeti" ) )// alphabetisch, alphabetic
+ eTyp = ( rStr[0] == 'A' )
? SVX_NUM_CHARS_UPPER_LETTER_N
: SVX_NUM_CHARS_LOWER_LETTER_N;
- else if( rStr.EqualsIgnoreCaseAscii( "roman", 0, 5 ) ) // us
- eTyp = ( rStr.GetChar( 0 ) == 'R' )
+ else if( rStr.startsWithIgnoreAsciiCase( "roman" ) ) // us
+ eTyp = ( rStr[0] == 'R' )
? SVX_NUM_ROMAN_UPPER
: SVX_NUM_ROMAN_LOWER;
return eTyp;
}
-static SvxExtNumType GetNumberPara(OUString& rStr, bool bAllowPageDesc = false)
+static SvxExtNumType GetNumberPara(const OUString& rStr, bool bAllowPageDesc = false)
{
OUString s( FindPara( rStr, '*', '*' ) ); // Ziffernart
SvxExtNumType aType = GetNumTypeFromName( s, bAllowPageDesc );
return aType;
}
-
-
-
bool SwWW8ImplReader::ForceFieldLanguage(SwField &rFld, sal_uInt16 nLang)
{
bool bRet(false);
@@ -2254,10 +2251,10 @@ eF_ResT SwWW8ImplReader::Read_F_PgRef( WW8FieldDesc*, OUString& rStr )
//helper function
//For MS MacroButton field, the symbol in plain text is always "(" (0x28),
//which should be mapped according to the macro type
-bool ConvertMacroSymbol( const String& rName, String& rReference )
+bool ConvertMacroSymbol( const String& rName, OUString& rReference )
{
bool bConverted = false;
- if( rReference.EqualsAscii( "(" ) )
+ if( rReference == "(" )
{
bConverted = true;
sal_Unicode cSymbol = sal_Unicode(); // silence false warning
@@ -2272,7 +2269,7 @@ bool ConvertMacroSymbol( const String& rName, String& rReference )
bConverted = false;
if( bConverted )
- rReference = cSymbol;
+ rReference = OUString(cSymbol);
}
return bConverted;
}
@@ -2282,7 +2279,7 @@ bool ConvertMacroSymbol( const String& rName, String& rReference )
eF_ResT SwWW8ImplReader::Read_F_Macro( WW8FieldDesc*, OUString& rStr)
{
OUString aName;
- String aVText;
+ OUString aVText;
bool bNewVText = true;
bool bBracket = false;
WW8ReadFieldParams aReadParam( rStr );
@@ -2299,20 +2296,20 @@ eF_ResT SwWW8ImplReader::Read_F_Macro( WW8FieldDesc*, OUString& rStr)
case -2:
if( aName.isEmpty() )
aName = aReadParam.GetResult();
- else if( !aVText.Len() || bBracket )
+ else if( aVText.isEmpty() || bBracket )
{
nOffset = aReadParam.GetTokenSttPtr() + 1;
if( bBracket )
- aVText += ' ';
+ aVText += " ";
aVText += aReadParam.GetResult();
if (bNewVText)
{
- bBracket = aVText.EqualsIgnoreCaseAscii(OUString('['), 0, 1)
+ bBracket = (aVText[0] == '[')
? true : false;
bNewVText = false;
}
- else if( aVText.GetChar( aVText.Len()-1 ) == ']' )
+ else if( aVText[aVText.getLength()-1] == ']' )
bBracket = false;
}
break;
@@ -2726,20 +2723,20 @@ void SwWW8ImplReader::Read_SubF_Ruby( WW8ReadFieldParams& rReadParam)
{
case -2:
{
- String sTemp = rReadParam.GetResult();
- if( sTemp.EqualsIgnoreCaseAscii( "jc", 0, 2 ) )
+ OUString sTemp = rReadParam.GetResult();
+ if( sTemp.startsWithIgnoreAsciiCase( "jc" ) )
{
- sTemp.Erase(0,2);
- nJustificationCode = static_cast<sal_uInt16>(sTemp.ToInt32());
+ sTemp = sTemp.copy(2);
+ nJustificationCode = static_cast<sal_uInt16>(sTemp.toInt32());
}
- else if( sTemp.EqualsIgnoreCaseAscii( "hps", 0, 3 ) )
+ else if( sTemp.startsWithIgnoreAsciiCase( "hps" ) )
{
- sTemp.Erase(0,3);
- nFontSize= static_cast<sal_uInt32>(sTemp.ToInt32());
+ sTemp = sTemp.copy(3);
+ nFontSize= static_cast<sal_uInt32>(sTemp.toInt32());
}
- else if( sTemp.EqualsIgnoreCaseAscii( "Font:", 0, 5 ) )
+ else if( sTemp.startsWithIgnoreAsciiCase( "Font:" ) )
{
- sTemp.Erase(0,5);
+ sTemp = sTemp.copy(5);
sFontName = sTemp;
}
}
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index 279608586bc0..19e38bce35a9 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -3787,7 +3787,7 @@ bool WW8PLCFx_FLD::GetPara(long nIdx, WW8FieldDesc& rF)
/* to be optimized like this: */
void WW8ReadSTTBF(bool bVer8, SvStream& rStrm, sal_uInt32 nStart, sal_Int32 nLen,
- sal_uInt16 nExtraLen, rtl_TextEncoding eCS, std::vector<String> &rArray,
+ sal_uInt16 nExtraLen, rtl_TextEncoding eCS, std::vector<OUString> &rArray,
std::vector<ww::bytes>* pExtraArray, ::std::vector<String>* pValueArray)
{
if (nLen==0) // Handle Empty STTBF
@@ -3879,7 +3879,7 @@ void WW8ReadSTTBF(bool bVer8, SvStream& rStrm, sal_uInt32 nStart, sal_Int32 nLen
rArray.push_back(OStringToOUString(aTmp, eCS));
}
else
- rArray.push_back(aEmptyStr);
+ rArray.push_back(OUString());
// Skip the extra data (for bVer67 versions this must come from
// external knowledge)
@@ -4112,7 +4112,7 @@ String WW8PLCFx_Book::GetBookmark(long nStart,long nEnd, sal_uInt16 &nIndex)
}
while (i < pBook[0]->GetIMax());
}
- return bFound ? aBookNames[i] : aEmptyStr;
+ return bFound ? aBookNames[i] : OUString();
}
OUString WW8PLCFx_Book::GetUniqueBookmarkName(const OUString &rSuggestedName)
@@ -4156,9 +4156,9 @@ bool WW8PLCFx_Book::MapName(OUString& rName)
return bFound;
}
-const String* WW8PLCFx_Book::GetName() const
+const OUString* WW8PLCFx_Book::GetName() const
{
- const String *pRet = 0;
+ const OUString *pRet = 0;
if (!nIsEnd && (pBook[0]->GetIdx() < nIMax))
pRet = &(aBookNames[pBook[0]->GetIdx()]);
return pRet;
diff --git a/sw/source/filter/ww8/ww8scan.hxx b/sw/source/filter/ww8/ww8scan.hxx
index c643e4434d32..eccc4831e250 100644
--- a/sw/source/filter/ww8/ww8scan.hxx
+++ b/sw/source/filter/ww8/ww8scan.hxx
@@ -152,7 +152,7 @@ class WW8PLCFx_PCD;
attention: the *extra data* of each string are SKIPPED and ignored
*/
void WW8ReadSTTBF(bool bVer8, SvStream& rStrm, sal_uInt32 nStart, sal_Int32 nLen,
- sal_uInt16 nExtraLen, rtl_TextEncoding eCS, ::std::vector<String> &rArray,
+ sal_uInt16 nExtraLen, rtl_TextEncoding eCS, ::std::vector<OUString> &rArray,
::std::vector<ww::bytes>* pExtraArray = 0, ::std::vector<String>* pValueArray = 0);
struct WW8FieldDesc
@@ -713,7 +713,7 @@ class WW8PLCFx_Book : public WW8PLCFx
{
private:
WW8PLCFspecial* pBook[2]; // Start and End Position
- ::std::vector<String> aBookNames; // Name
+ ::std::vector<OUString> aBookNames; // Name
eBookStatus* pStatus;
long nIMax; // Number of Booknotes
sal_uInt16 nIsEnd;
@@ -735,7 +735,7 @@ public:
virtual WW8_FC Where();
virtual long GetNoSprms( WW8_CP& rStart, WW8_CP& rEnd, sal_Int32& rLen );
virtual void advance();
- const String* GetName() const;
+ const OUString* GetName() const;
WW8_CP GetStartPos() const
{ return ( nIsEnd ) ? WW8_CP_MAX : pBook[0]->Where(); }
long GetLen() const;
diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx
index 9bae960f29f6..c67ef7b131ed 100644
--- a/sw/source/ui/dbui/dbmgr.cxx
+++ b/sw/source/ui/dbui/dbmgr.cxx
@@ -2216,26 +2216,26 @@ String SwNewDBMgr::LoadAndRegisterDataSource()
String sURL = xFP->getFiles().getConstArray()[0];
//data sources have to be registered depending on their extensions
INetURLObject aURL( sURL );
- String sExt( aURL.GetExtension() );
+ OUString sExt( aURL.GetExtension() );
Any aURLAny;
Any aTableFilterAny;
Any aSuppressVersionsAny;
Any aInfoAny;
INetURLObject aTempURL(aURL);
bool bStore = true;
- if(sExt.EqualsAscii("odb"))
+ if(sExt == "odb")
{
bStore = false;
}
- else if(sExt.EqualsIgnoreCaseAscii("sxc")
- || sExt.EqualsIgnoreCaseAscii("ods")
- || sExt.EqualsIgnoreCaseAscii("xls"))
+ else if(sExt.equalsIgnoreAsciiCase("sxc")
+ || sExt.equalsIgnoreAsciiCase("ods")
+ || sExt.equalsIgnoreAsciiCase("xls"))
{
OUString sDBURL("sdbc:calc:");
sDBURL += aTempURL.GetMainURL(INetURLObject::NO_DECODE);
aURLAny <<= sDBURL;
}
- else if(sExt.EqualsIgnoreCaseAscii("dbf"))
+ else if(sExt.equalsIgnoreAsciiCase("dbf"))
{
aTempURL.removeSegment();
aTempURL.removeFinalSlash();
@@ -2247,7 +2247,7 @@ String SwNewDBMgr::LoadAndRegisterDataSource()
aFilters[0] = aURL.getBase();
aTableFilterAny <<= aFilters;
}
- else if(sExt.EqualsIgnoreCaseAscii("csv") || sExt.EqualsIgnoreCaseAscii("txt"))
+ else if(sExt.equalsIgnoreAsciiCase("csv") || sExt.equalsIgnoreAsciiCase("txt"))
{
aTempURL.removeSegment();
aTempURL.removeFinalSlash();
@@ -2263,14 +2263,14 @@ String SwNewDBMgr::LoadAndRegisterDataSource()
aTableFilterAny <<= aFilters;
}
#ifdef WNT
- else if(sExt.EqualsIgnoreCaseAscii("mdb"))
+ else if(sExt.equalsIgnoreAsciiCase("mdb"))
{
OUString sDBURL("sdbc:ado:access:PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=");
sDBURL += aTempURL.PathToFileName();
aURLAny <<= sDBURL;
aSuppressVersionsAny <<= makeAny(true);
}
- else if(sExt.EqualsIgnoreCaseAscii("accdb"))
+ else if(sExt.equalsIgnoreAsciiCase("accdb"))
{
OUString sDBURL("sdbc:ado:PROVIDER=Microsoft.ACE.OLEDB.12.0;DATA SOURCE=");
sDBURL += aTempURL.PathToFileName();
@@ -2331,7 +2331,7 @@ String SwNewDBMgr::LoadAndRegisterDataSource()
::comphelper::copyProperties(
uno::Reference < beans::XPropertySet >( xSettingsDlg, uno::UNO_QUERY_THROW ),
xDSSettings );
- xDSSettings->setPropertyValue( "Extension", uno::makeAny( OUString( sExt )));
+ xDSSettings->setPropertyValue( "Extension", uno::makeAny( sExt ));
}
}
diff --git a/sw/source/ui/dochdl/swdtflvr.cxx b/sw/source/ui/dochdl/swdtflvr.cxx
index 34fc1a39120e..4bcdfd6d6f15 100644
--- a/sw/source/ui/dochdl/swdtflvr.cxx
+++ b/sw/source/ui/dochdl/swdtflvr.cxx
@@ -2706,8 +2706,8 @@ sal_Bool SwTransferable::_CheckForURLOrLNKFile( TransferableDataHelper& rData,
sal_Int32 nLen = rFileName.getLength();
if( 4 < nLen && '.' == rFileName[ nLen - 4 ])
{
- String sExt( rFileName.copy( nLen - 3 ));
- if( sExt.EqualsIgnoreCaseAscii( "url" ))
+ OUString sExt( rFileName.copy( nLen - 3 ));
+ if( sExt.equalsIgnoreAsciiCase( "url" ))
{
OSL_ENSURE( !&rFileName, "how do we read today .URL - Files?" );
}
diff --git a/sw/source/ui/fldui/flddb.cxx b/sw/source/ui/fldui/flddb.cxx
index 5fc1e8255ab0..efd8ab2952e3 100644
--- a/sw/source/ui/fldui/flddb.cxx
+++ b/sw/source/ui/fldui/flddb.cxx
@@ -148,11 +148,11 @@ void SwFldDBPage::Reset(const SfxItemSet&)
if( !IsRefresh() )
{
- String sUserData = GetUserData();
- if(sUserData.GetToken(0, ';').EqualsIgnoreCaseAscii(USER_DATA_VERSION_1))
+ OUString sUserData = GetUserData();
+ if (sUserData.getToken(0, ';').equalsIgnoreAsciiCase(USER_DATA_VERSION_1))
{
- String sVal = sUserData.GetToken(1, ';');
- sal_uInt16 nVal = (sal_uInt16)sVal.ToInt32();
+ OUString sVal = sUserData.getToken(1, ';');
+ sal_uInt16 nVal = (sal_uInt16)sVal.toInt32();
if(nVal != USHRT_MAX)
{
for(i = 0; i < m_pTypeLB->GetEntryCount(); i++)
diff --git a/sw/source/ui/fldui/flddinf.cxx b/sw/source/ui/fldui/flddinf.cxx
index 6536b12975d2..7cf2d5b204ea 100644
--- a/sw/source/ui/fldui/flddinf.cxx
+++ b/sw/source/ui/fldui/flddinf.cxx
@@ -124,11 +124,11 @@ void SwFldDokInfPage::Reset(const SfxItemSet& )
}
sal_uInt16 nSelEntryData = USHRT_MAX;
- String sUserData = GetUserData();
- if(sUserData.GetToken(0, ';').EqualsIgnoreCaseAscii(USER_DATA_VERSION_1))
+ OUString sUserData = GetUserData();
+ if (sUserData.getToken(0, ';').equalsIgnoreAsciiCase(USER_DATA_VERSION_1))
{
- String sVal = sUserData.GetToken(1, ';');
- nSelEntryData = static_cast< sal_uInt16 >(sVal.ToInt32());
+ OUString sVal = sUserData.getToken(1, ';');
+ nSelEntryData = static_cast< sal_uInt16 >(sVal.toInt32());
}
std::vector<OUString> aLst;
diff --git a/sw/source/ui/fldui/flddok.cxx b/sw/source/ui/fldui/flddok.cxx
index 3203e24dd37e..2d55dfeed771 100644
--- a/sw/source/ui/fldui/flddok.cxx
+++ b/sw/source/ui/fldui/flddok.cxx
@@ -153,11 +153,11 @@ void SwFldDokPage::Reset(const SfxItemSet& )
if( !IsRefresh() )
{
- String sUserData = GetUserData();
- if( sUserData.GetToken(0, ';').EqualsIgnoreCaseAscii(USER_DATA_VERSION_1 ))
+ OUString sUserData = GetUserData();
+ if (sUserData.getToken(0, ';').equalsIgnoreAsciiCase(USER_DATA_VERSION_1))
{
- String sVal = sUserData.GetToken(1, ';');
- sal_uInt16 nVal = static_cast< sal_uInt16 >(sVal.ToInt32());
+ OUString sVal = sUserData.getToken(1, ';');
+ sal_uInt16 nVal = static_cast< sal_uInt16 >(sVal.toInt32());
if(nVal != USHRT_MAX)
{
for(sal_uInt16 i = 0; i < m_pTypeLB->GetEntryCount(); i++)
diff --git a/sw/source/ui/fldui/fldfunc.cxx b/sw/source/ui/fldui/fldfunc.cxx
index 6e9ff038ac88..576bc182b145 100644
--- a/sw/source/ui/fldui/fldfunc.cxx
+++ b/sw/source/ui/fldui/fldfunc.cxx
@@ -151,11 +151,11 @@ void SwFldFuncPage::Reset(const SfxItemSet& )
if( !IsRefresh() )
{
- String sUserData = GetUserData();
- if(sUserData.GetToken(0, ';').EqualsIgnoreCaseAscii(USER_DATA_VERSION_1))
+ OUString sUserData = GetUserData();
+ if(sUserData.getToken(0, ';').equalsIgnoreAsciiCase(USER_DATA_VERSION_1))
{
- String sVal = sUserData.GetToken(1, ';');
- sal_uInt16 nVal = static_cast< sal_uInt16 >(sVal.ToInt32());
+ OUString sVal = sUserData.getToken(1, ';');
+ sal_uInt16 nVal = static_cast< sal_uInt16 >(sVal.toInt32());
if(nVal != USHRT_MAX)
{
for(sal_uInt16 i = 0; i < m_pTypeLB->GetEntryCount(); i++)
diff --git a/sw/source/ui/fldui/fldref.cxx b/sw/source/ui/fldui/fldref.cxx
index 7fcabfa456f5..4173ec9c7a2f 100644
--- a/sw/source/ui/fldui/fldref.cxx
+++ b/sw/source/ui/fldui/fldref.cxx
@@ -239,12 +239,12 @@ void SwFldRefPage::Reset(const SfxItemSet& )
if( !IsRefresh() )
{
- String sUserData = GetUserData();
- if(!IsRefresh() && sUserData.GetToken(0, ';').
- EqualsIgnoreCaseAscii(USER_DATA_VERSION_1))
+ OUString sUserData = GetUserData();
+ if(!IsRefresh() && sUserData.getToken(0, ';').
+ equalsIgnoreAsciiCase(USER_DATA_VERSION_1))
{
- String sVal = sUserData.GetToken(1, ';');
- sal_uInt16 nVal = static_cast< sal_uInt16 >(sVal.ToInt32());
+ OUString sVal = sUserData.getToken(1, ';');
+ sal_uInt16 nVal = static_cast< sal_uInt16 >(sVal.toInt32());
if(nVal != USHRT_MAX)
{
for(sal_uInt16 i = 0; i < m_pTypeLB->GetEntryCount(); i++)
diff --git a/sw/source/ui/fldui/fldvar.cxx b/sw/source/ui/fldui/fldvar.cxx
index cbf808fbfbc3..6f2bf7a2e8a7 100644
--- a/sw/source/ui/fldui/fldvar.cxx
+++ b/sw/source/ui/fldui/fldvar.cxx
@@ -147,11 +147,11 @@ void SwFldVarPage::Reset(const SfxItemSet& )
if( !IsRefresh() )
{
- String sUserData = GetUserData();
- if(!IsRefresh() && sUserData.GetToken(0, ';').EqualsIgnoreCaseAscii(USER_DATA_VERSION_1))
+ OUString sUserData = GetUserData();
+ if(!IsRefresh() && sUserData.getToken(0, ';').equalsIgnoreAsciiCase(USER_DATA_VERSION_1))
{
- String sVal = sUserData.GetToken(1, ';');
- sal_uInt16 nVal = (sal_uInt16)sVal.ToInt32();
+ OUString sVal = sUserData.getToken(1, ';');
+ sal_uInt16 nVal = (sal_uInt16)sVal.toInt32();
if( USHRT_MAX != nVal )
{
for(sal_uInt16 i = 0; i < m_pTypeLB->GetEntryCount(); i++)
diff --git a/sw/source/ui/vba/vbafield.cxx b/sw/source/ui/vba/vbafield.cxx
index b1ecddafeecc..33bdebf643f3 100644
--- a/sw/source/ui/vba/vbafield.cxx
+++ b/sw/source/ui/vba/vbafield.cxx
@@ -319,7 +319,7 @@ SwVbaFields::Add( const css::uno::Reference< ::ooo::vba::word::XRange >& Range,
OUString sText;
Text >>= sText;
- String sFieldName;
+ OUString sFieldName;
if( ( nType == word::WdFieldType::wdFieldEmpty ) && !sText.isEmpty() )
{
SwVbaReadFieldParams aReadParam(sText);
@@ -328,11 +328,11 @@ SwVbaFields::Add( const css::uno::Reference< ::ooo::vba::word::XRange >& Range,
}
uno::Reference< text::XTextContent > xTextField;
- if( nType == word::WdFieldType::wdFieldFileName || sFieldName.EqualsIgnoreCaseAscii("FILENAME") )
+ if( nType == word::WdFieldType::wdFieldFileName || sFieldName.equalsIgnoreAsciiCase("FILENAME") )
{
xTextField.set( Create_Field_FileName( sText ), uno::UNO_QUERY_THROW );
}
- else if( nType == word::WdFieldType::wdFieldDocProperty || sFieldName.EqualsIgnoreCaseAscii("DOCPROPERTY") )
+ else if( nType == word::WdFieldType::wdFieldDocProperty || sFieldName.equalsIgnoreAsciiCase("DOCPROPERTY") )
{
xTextField.set( Create_Field_DocProperty( sText ), uno::UNO_QUERY_THROW );
}
@@ -419,7 +419,7 @@ static const DocPropertyTable aDocPropertyTables[] =
uno::Reference< text::XTextField > SwVbaFields::Create_Field_DocProperty( const OUString _text ) throw (uno::RuntimeException)
{
- String aDocProperty;
+ OUString aDocProperty;
SwVbaReadFieldParams aReadParam( _text );
long nRet;
while( -1 != ( nRet = aReadParam.SkipToNextToken() ))
@@ -427,7 +427,7 @@ uno::Reference< text::XTextField > SwVbaFields::Create_Field_DocProperty( const
switch( nRet )
{
case -2:
- if( !aDocProperty.Len() )
+ if( aDocProperty.isEmpty() )
aDocProperty = aReadParam.GetResult();
break;
case '*':
@@ -438,7 +438,7 @@ uno::Reference< text::XTextField > SwVbaFields::Create_Field_DocProperty( const
}
aDocProperty = comphelper::string::remove(aDocProperty, '"');
OSL_TRACE("SwVbaFields::Create_Field_DocProperty, the document property name is %s ",OUStringToOString( aDocProperty, RTL_TEXTENCODING_UTF8 ).getStr() );
- if( aDocProperty.Len() == 0 )
+ if( aDocProperty.isEmpty() )
{
throw uno::RuntimeException();
}
@@ -448,7 +448,7 @@ uno::Reference< text::XTextField > SwVbaFields::Create_Field_DocProperty( const
// find the build in document properties
for( const DocPropertyTable* pTable = aDocPropertyTables; pTable->sDocPropertyName != NULL; pTable++ )
{
- if( aDocProperty.EqualsIgnoreCaseAscii( pTable->sDocPropertyName ) )
+ if( aDocProperty.equalsIgnoreAsciiCaseAscii( pTable->sDocPropertyName ) )
{
if( pTable->sFieldService != NULL )
sFieldService = OUString::createFromAscii(pTable->sFieldService);