[PATCH] fdo#38838 Some removal/replacement of the String/UniString w...
Jean-Noël Rouvignac (via_Code_Review)
gerrit at gerrit.libreoffice.org
Fri Feb 1 22:11:26 PST 2013
Hi,
I have submitted a patch for review:
https://gerrit.libreoffice.org/1962
To pull it, you can do:
git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/62/1962/1
fdo#38838 Some removal/replacement of the String/UniString with OUString
Change-Id: I6daea312198fae3a9717bd8d4fea6371aa4cd275
---
M cui/source/dialogs/cuigaldlg.cxx
M cui/source/inc/cuigaldlg.hxx
M sc/source/ui/unoobj/chart2uno.cxx
M sfx2/source/dialog/mgetempl.cxx
M sfx2/source/dialog/styledlg.cxx
M sfx2/source/doc/objcont.cxx
M svtools/source/dialogs/filedlg2.cxx
M svtools/source/dialogs/filedlg2.hxx
M svx/inc/svx/fmview.hxx
M svx/source/form/filtnav.cxx
M svx/source/form/fmpage.cxx
M svx/source/form/fmshimp.cxx
M svx/source/form/fmsrcimp.cxx
M svx/source/form/fmview.cxx
M svx/source/form/tabwin.cxx
M svx/source/inc/filtnav.hxx
M sw/source/core/edit/editsh.cxx
M tools/inc/tools/resmgr.hxx
M tools/source/inet/inetstrm.cxx
M tools/source/rc/resmgr.cxx
M tools/source/string/strascii.cxx
M tools/source/string/strucvt.cxx
M tools/source/string/tustring.cxx
M ucb/workben/ucb/ucbdemo.cxx
M vcl/inc/salwtype.hxx
M vcl/inc/vcl/graph.hxx
M vcl/inc/win/saldata.hxx
M vcl/inc/window.h
M vcl/source/filter/wmf/winwmf.cxx
M vcl/source/gdi/cvtsvm.cxx
M vcl/source/gdi/graph.cxx
M vcl/source/gdi/jobset.cxx
M vcl/source/window/winproc.cxx
M vcl/unx/gtk/window/gtkframe.cxx
M vcl/win/source/app/saldata.cxx
M vcl/win/source/gdi/salgdi3.cxx
36 files changed, 221 insertions(+), 231 deletions(-)
diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx
index a683467..8530aa1 100644
--- a/cui/source/dialogs/cuigaldlg.cxx
+++ b/cui/source/dialogs/cuigaldlg.cxx
@@ -179,7 +179,7 @@
SolarMutexGuard aGuard;
mpBrowser->aFoundList.push_back(
- new String( aFoundURL.GetMainURL( INetURLObject::NO_DECODE ) )
+ new OUString( aFoundURL.GetMainURL( INetURLObject::NO_DECODE ) )
);
mpBrowser->aLbxFound.InsertEntry(
GetReducedString( aFoundURL, 50 ),
@@ -397,7 +397,7 @@
mpBrowser->aFoundList.clear();
for( i = 0, nCount = aRemainingVector.size(); i < nCount; ++i )
- mpBrowser->aFoundList.push_back( new String( aRemainingVector[ i ] ) );
+ mpBrowser->aFoundList.push_back( new OUString( aRemainingVector[ i ] ) );
aRemainingVector.clear();
diff --git a/cui/source/inc/cuigaldlg.hxx b/cui/source/inc/cuigaldlg.hxx
index 6c7e489..6b8c01e 100644
--- a/cui/source/inc/cuigaldlg.hxx
+++ b/cui/source/inc/cuigaldlg.hxx
@@ -51,7 +51,7 @@
class TakeProgress;
class TPGalleryThemeProperties;
-typedef ::std::vector< UniString* > StringList;
+typedef ::std::vector< OUString* > StringList;
typedef ::std::vector< sal_uLong > TokenList_impl;
// ---------------
diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx
index 3ace857..5840837 100644
--- a/sc/source/ui/unoobj/chart2uno.cxx
+++ b/sc/source/ui/unoobj/chart2uno.cxx
@@ -295,13 +295,14 @@
bool bFoundValues = false;
bool bFoundAnything = false;
FormulaTokenMapMap::const_iterator it1 = rCols.begin();
- for (SCCOL nCol = 0; !bFoundValues && nCol < nAllColCount; ++nCol)
+ for (SCCOL nCol = 0; nCol < nAllColCount; ++nCol)
{
if (it1 != rCols.end() && nCol>=nHeaderColCount)
{
+ bool bFoundValuesInRow = false;
FormulaTokenMap* pCol = it1->second;
FormulaTokenMap::const_iterator it2 = pCol->begin();
- for (SCROW nRow = 0; !bFoundValues && nRow < nSmallestValueRowIndex && it2 != pCol->end(); ++nRow)
+ for (SCROW nRow = 0; !bFoundValuesInRow && nRow < nSmallestValueRowIndex && it2 != pCol->end(); ++nRow)
{
FormulaToken* pToken = it2->second;
if (pToken && nRow>=nHeaderRowCount)
@@ -319,7 +320,7 @@
aRange.GetVars( nCol1, nRow1, nTab1, nCol2, nRow2, nTab2 );
if (pDoc && pDoc->HasValueData( nCol1, nRow1, nTab1 ))
{
- bFoundValues = bFoundAnything = true;
+ bFoundValuesInRow = bFoundValues = bFoundAnything = true;
nSmallestValueRowIndex = std::min( nSmallestValueRowIndex, nRow );
}
if( !bFoundAnything )
diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx
index f077258..b289720 100644
--- a/sfx2/source/dialog/mgetempl.cxx
+++ b/sfx2/source/dialog/mgetempl.cxx
@@ -584,7 +584,7 @@
if ( pStyle->HasFollowSupport() && aFollowLb.IsEnabled() )
{
- const String aFollowEntry( aFollowLb.GetSelectEntry() );
+ const OUString aFollowEntry( aFollowLb.GetSelectEntry() );
if ( pStyle->GetFollow() != aFollowEntry )
{
@@ -601,10 +601,10 @@
if ( aBaseLb.IsEnabled() )
{
- String aParentEntry( aBaseLb.GetSelectEntry() );
+ OUString aParentEntry( aBaseLb.GetSelectEntry() );
if ( SfxResId(STR_NONE).toString().equals(aParentEntry) || aParentEntry == pStyle->GetName() )
- aParentEntry.Erase();
+ aParentEntry = OUString();
if ( pStyle->GetParent() != aParentEntry )
{
diff --git a/sfx2/source/dialog/styledlg.cxx b/sfx2/source/dialog/styledlg.cxx
index 5598b08..bf60f44 100644
--- a/sfx2/source/dialog/styledlg.cxx
+++ b/sfx2/source/dialog/styledlg.cxx
@@ -64,9 +64,7 @@
SetCurPageId( ID_TABPAGE_MANAGESTYLES );
else
{
- String sTxt( GetText() );
- sTxt += DEFINE_CONST_UNICODE(": ") ;
- sTxt += rStyle.GetName();
+ OUString sTxt = OUString(GetText()) + ": " + rStyle.GetName();
SetText( sTxt );
}
delete pExampleSet; // in SfxTabDialog::Ctor() already created
diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx
index 6f816aa..cafd127 100644
--- a/sfx2/source/doc/objcont.cxx
+++ b/sfx2/source/doc/objcont.cxx
@@ -487,7 +487,7 @@
}
// if such a template already exists: delete!
- String aOldName(pHisSheet->GetName());
+ OUString aOldName(pHisSheet->GetName());
SfxStyleFamily eOldFamily = pHisSheet->GetFamily();
SfxStyleSheetBase* pExist = pMyPool->Find(aOldName, eOldFamily);
@@ -600,8 +600,8 @@
SetOrganizerSearchMask(pMyPool);
SfxStyleSheetBase* pMySheet = (*pMyPool)[nIdx2];
- String aName(pMySheet->GetName());
- String aEmpty;
+ OUString aName(pMySheet->GetName());
+ OUString aEmpty;
SfxStyleFamily eFamily = pMySheet->GetFamily();
pMyPool->Remove(pMySheet);
bRet = sal_True;
diff --git a/svtools/source/dialogs/filedlg2.cxx b/svtools/source/dialogs/filedlg2.cxx
index fb698ea..c3da5d2 100644
--- a/svtools/source/dialogs/filedlg2.cxx
+++ b/svtools/source/dialogs/filedlg2.cxx
@@ -37,7 +37,7 @@
using namespace com::sun::star;
using namespace com::sun::star::uno;
-typedef ::std::vector< UniString* > UniStringList;
+typedef ::std::vector< OUString* > OUStringList;
#define INITCONTROL( p, ControlClass, nBits, aPos, aSize, aTitel, rHelpId ) \
p = new ControlClass( GetPathDialog(), WinBits( nBits ) ); \
@@ -413,14 +413,14 @@
sal_uInt16 nEntries = aDir.Count();
if( nEntries )
{
- UniStringList aSortDirList;
+ OUStringList aSortDirList;
const comphelper::string::NaturalStringSorter& rSorter =
::vcl::unohelper::getNaturalStringSorterForAppLocale();
for ( sal_uInt16 n = 0; n < nEntries; n++ )
{
DirEntry& rEntry = aDir[n];
- UniString aName( rEntry.GetName() );
- if( aName.Len() && ( aName.GetChar(0) != '.' ) && rEntry.Exists() )
+ OUString aName( rEntry.GetName() );
+ if( aName.getLength() && ( aName[0] != '.' ) && rEntry.Exists() )
{
if( FileStat( rEntry ).GetKind() & FSYS_KIND_DIR )
{
@@ -429,11 +429,11 @@
if( rSorter.compare( *aSortDirList[ l ], aName ) > 0 )
break;
if ( l < aSortDirList.size() ) {
- UniStringList::iterator it = aSortDirList.begin();
+ OUStringList::iterator it = aSortDirList.begin();
::std::advance( it, l );
- aSortDirList.insert( it, new UniString( aName ) );
+ aSortDirList.insert( it, new OUString( aName ) );
} else {
- aSortDirList.push_back( new UniString( aName ) );
+ aSortDirList.push_back( new OUString( aName ) );
}
}
}
@@ -441,8 +441,7 @@
for( size_t l = 0; l < aSortDirList.size(); l++ )
{
- UniString aEntryStr( aTabString );
- aEntryStr += *aSortDirList[ l ];
+ OUString aEntryStr = aTabString + *aSortDirList[ l ];
pDirList->InsertEntry( aEntryStr );
delete aSortDirList[ l ];
}
@@ -624,7 +623,7 @@
{
}
-void ImpPathDialog::SetPath( UniString const & rPath )
+void ImpPathDialog::SetPath( OUString const & rPath )
{
aPath = DirEntry( rPath );
@@ -644,7 +643,7 @@
pSvPathDialog->LeaveWait();
}
-UniString ImpPathDialog::GetPath() const
+OUString ImpPathDialog::GetPath() const
{
DirEntry aFile( pEdit->GetText() );
aFile.ToAbs();
diff --git a/svtools/source/dialogs/filedlg2.hxx b/svtools/source/dialogs/filedlg2.hxx
index abb5d79..8f6652d 100644
--- a/svtools/source/dialogs/filedlg2.hxx
+++ b/svtools/source/dialogs/filedlg2.hxx
@@ -99,8 +99,8 @@
ImpPathDialog( PathDialog* pDlg, RESOURCE_TYPE nType, sal_Bool bCreateDir );
virtual ~ImpPathDialog();
- virtual void SetPath( const String& rPath );
- virtual String GetPath() const;
+ virtual void SetPath( const OUString& rPath );
+ virtual OUString GetPath() const;
virtual void PreExecute();
virtual void PostExecute();
diff --git a/svx/inc/svx/fmview.hxx b/svx/inc/svx/fmview.hxx
index c46bbdb..d31c225 100644
--- a/svx/inc/svx/fmview.hxx
+++ b/svx/inc/svx/fmview.hxx
@@ -72,7 +72,7 @@
@deprecated
This method is deprecated. Use the version with a ODataAccessDescriptor instead.
*/
- SdrObject* CreateFieldControl(const UniString& rFieldDesc) const;
+ SdrObject* CreateFieldControl(const OUString& rFieldDesc) const;
/** create a control pair (label/bound control) for the database field description given.
*/
diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx
index 8fec3cf..00bc72d 100644
--- a/svx/source/form/filtnav.cxx
+++ b/svx/source/form/filtnav.cxx
@@ -877,7 +877,7 @@
}
//------------------------------------------------------------------------
-sal_Bool FmFilterModel::ValidateText(FmFilterItem* pItem, UniString& rText, UniString& rErrorMsg) const
+sal_Bool FmFilterModel::ValidateText(FmFilterItem* pItem, OUString& rText, OUString& rErrorMsg) const
{
FmFormItem* pFormItem = PTR_CAST( FmFormItem, pItem->GetParent()->GetParent() );
try
@@ -1092,14 +1092,14 @@
//========================================================================
class FmFilterString : public SvLBoxString
{
- UniString m_aName;
+ OUString m_aName;
public:
- FmFilterString( SvTreeListEntry* pEntry, sal_uInt16 nFlags, const XubString& rStr, const UniString& aName)
+ FmFilterString( SvTreeListEntry* pEntry, sal_uInt16 nFlags, const XubString& rStr, const OUString& aName)
:SvLBoxString(pEntry,nFlags,rStr)
,m_aName(aName)
{
- m_aName.AppendAscii(": ");
+ m_aName += ": ";
}
virtual void Paint(const Point& rPos, SvTreeListBox& rDev, const SvViewDataEntry* pView, const SvTreeListEntry* pEntry);
@@ -1231,8 +1231,8 @@
DBG_ASSERT(((FmFilterData*)pEntry->GetUserData())->ISA(FmFilterItem),
"FmFilterNavigator::EditedEntry() wrong entry");
- UniString aText(comphelper::string::strip(rNewText, ' '));
- if (aText.Len() == 0)
+ OUString aText(comphelper::string::strip(rNewText, ' '));
+ if (aText.getLength() == 0)
{
// deleting the entry asynchron
sal_uLong nEvent;
@@ -1240,7 +1240,7 @@
}
else
{
- UniString aErrorMsg;
+ OUString aErrorMsg;
if (m_pModel->ValidateText((FmFilterItem*)pEntry->GetUserData(), aText, aErrorMsg))
{
@@ -1732,12 +1732,12 @@
case SID_FM_FILTER_IS_NULL:
case SID_FM_FILTER_IS_NOT_NULL:
{
- UniString aErrorMsg;
- UniString aText;
+ OUString aErrorMsg;
+ OUString aText;
if (nSlotId == SID_FM_FILTER_IS_NULL)
- aText.AssignAscii("IS NULL");
+ aText = "IS NULL";
else
- aText.AssignAscii("IS NOT NULL");
+ aText = "IS NOT NULL";
m_pModel->ValidateText((FmFilterItem*)pClicked->GetUserData(),
aText, aErrorMsg);
diff --git a/svx/source/form/fmpage.cxx b/svx/source/form/fmpage.cxx
index 8059fcd..bcf3147 100644
--- a/svx/source/form/fmpage.cxx
+++ b/svx/source/form/fmpage.cxx
@@ -173,16 +173,16 @@
if ( !pFormObject )
return sal_False;
- UniString aHelpText;
+ OUString aHelpText;
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xSet( pFormObject->GetUnoControlModel(), ::com::sun::star::uno::UNO_QUERY );
if (xSet.is())
{
if (::comphelper::hasProperty(FM_PROP_HELPTEXT, xSet))
aHelpText = ::comphelper::getString(xSet->getPropertyValue(FM_PROP_HELPTEXT)).getStr();
- if (!aHelpText.Len() && ::comphelper::hasProperty(FM_PROP_TARGET_URL, xSet))
+ if (!aHelpText.getLength() && ::comphelper::hasProperty(FM_PROP_TARGET_URL, xSet))
{
- ::rtl::OUString aText = ::comphelper::getString(xSet->getPropertyValue(FM_PROP_TARGET_URL));
+ OUString aText = ::comphelper::getString(xSet->getPropertyValue(FM_PROP_TARGET_URL));
INetURLObject aUrl(aText);
// testen, ob es ein Protokoll-Typ ist, den ich anzeigen will
@@ -200,7 +200,7 @@
}
}
}
- if ( aHelpText.Len() != 0 )
+ if ( aHelpText.getLength() != 0 )
{
// Hilfe anzeigen
Rectangle aItemRect = pObj->GetCurrentBoundRect();
diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx
index 31304ac..b71785a 100644
--- a/svx/source/form/fmshimp.cxx
+++ b/svx/source/form/fmshimp.cxx
@@ -1565,8 +1565,8 @@
// wenn der Dialog initial den Text des aktiven Controls anbieten soll, muss dieses ein XTextComponent-Interface habe,
// ausserdem macht das nur Sinn, wenn das aktuelle Feld auch an ein Tabellen- (oder was-auch-immer-)Feld gebunden ist
- UniString strActiveField;
- UniString strInitialText;
+ OUString strActiveField;
+ OUString strInitialText;
// ... das bekomme ich von meinem FormController
DBG_ASSERT(m_xActiveController.is(), "FmXFormShell::ExecuteSearch : no active controller !");
Reference< XControl> xActiveControl( m_xActiveController->getCurrentControl());
@@ -2393,7 +2393,7 @@
// --------------------------------------------------------------------------------------------
// assemble the list of fields to involve (that is, the ControlSources of all fields that have such a property)
- UniString strFieldList, sFieldDisplayNames;
+ OUString strFieldList, sFieldDisplayNames;
m_arrSearchedControls.clear();
m_arrRelativeGridColumn.clear();
@@ -2497,11 +2497,11 @@
// the cursor has a field matching the control source ?
if (xValidFormFields->hasByName(aName))
{
- strFieldList += aName.getStr();
- strFieldList += ';';
+ strFieldList = strFieldList + OUString(aName.getStr()) + ";";
- sFieldDisplayNames += ::comphelper::getString(xCurrentColModel->getPropertyValue(FM_PROP_LABEL)).getStr();
- sFieldDisplayNames += ';';
+ sFieldDisplayNames = sFieldDisplayNames +
+ OUString(::comphelper::getString(xCurrentColModel->getPropertyValue(FM_PROP_LABEL)).getStr()) +
+ ";";
pfmscContextInfo->arrFields.push_back(xCurrentColumn);
@@ -2527,12 +2527,12 @@
if (IsSearchableControl(xControl))
{
// all tests passed -> take along in the list
- strFieldList += sControlSource.getStr();
- strFieldList += ';';
+ strFieldList = strFieldList + OUString(sControlSource.getStr()) + ";";
// the label which should appear for the control :
- sFieldDisplayNames += getLabelName(Reference< XPropertySet>(xControlModel, UNO_QUERY)).getStr();
- sFieldDisplayNames += ';';
+ sFieldDisplayNames = sFieldDisplayNames +
+ OUString(getLabelName(Reference< XPropertySet>(xControlModel, UNO_QUERY)).getStr()) +
+ ";";
// mark the SdrObject (accelerates the treatment in OnFoundData)
m_arrSearchedControls.push_back(pCurrent);
diff --git a/svx/source/form/fmsrcimp.cxx b/svx/source/form/fmsrcimp.cxx
index d52ce82..2e5edd8 100644
--- a/svx/source/form/fmsrcimp.cxx
+++ b/svx/source/form/fmsrcimp.cxx
@@ -989,24 +989,23 @@
if (!m_bWildcard)
{ // da natuerlich in allen anderen Faellen auch * und ? im Suchstring erlaubt sind, aber nicht als WildCards zaehlen
// sollen, muss ich normieren
- UniString aTmp(strSearchExpression);
- const rtl::OUString s_sStar("\\*");
- const rtl::OUString s_sQuotation("\\?");
- aTmp.SearchAndReplaceAll(rtl::OUString('*'), s_sStar);
- aTmp.SearchAndReplaceAll(rtl::OUString('?'), s_sQuotation);
+ OUString aTmp(strSearchExpression);
+ const OUString s_sStar("\\*");
+ const OUString s_sQuotation("\\?");
+ aTmp = aTmp.replaceAll("*", s_sStar);
+ aTmp = aTmp.replaceAll("?", s_sQuotation);
strSearchExpression = aTmp;
switch (m_nPosition)
{
case MATCHING_ANYWHERE :
- strSearchExpression = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("*")) + strSearchExpression
- + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("*"));
+ strSearchExpression = "*" + strSearchExpression + "*";
break;
case MATCHING_BEGINNING :
- strSearchExpression = strSearchExpression + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("*"));
+ strSearchExpression = strSearchExpression + "*";
break;
case MATCHING_END :
- strSearchExpression = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("*")) + strSearchExpression;
+ strSearchExpression = "*" + strSearchExpression;
break;
case MATCHING_WHOLETEXT :
break;
diff --git a/svx/source/form/fmview.cxx b/svx/source/form/fmview.cxx
index 047e9ab..abd632b 100644
--- a/svx/source/form/fmview.cxx
+++ b/svx/source/form/fmview.cxx
@@ -424,12 +424,12 @@
}
//------------------------------------------------------------------------
-SdrObject* FmFormView::CreateFieldControl(const UniString& rFieldDesc) const
+SdrObject* FmFormView::CreateFieldControl(const OUString& rFieldDesc) const
{
- ::rtl::OUString sDataSource = rFieldDesc.GetToken(0,sal_Unicode(11));
- ::rtl::OUString sObjectName = rFieldDesc.GetToken(1,sal_Unicode(11));
- sal_uInt16 nObjectType = (sal_uInt16)rFieldDesc.GetToken(2,sal_Unicode(11)).ToInt32();
- ::rtl::OUString sFieldName = rFieldDesc.GetToken(3,sal_Unicode(11));
+ OUString sDataSource = rFieldDesc.getToken(0,sal_Unicode(11));
+ OUString sObjectName = rFieldDesc.getToken(1,sal_Unicode(11));
+ sal_uInt16 nObjectType = (sal_uInt16)rFieldDesc.getToken(2,sal_Unicode(11)).toInt32();
+ OUString sFieldName = rFieldDesc.getToken(3,sal_Unicode(11));
if (sFieldName.isEmpty() || sObjectName.isEmpty() || sDataSource.isEmpty())
return NULL;
diff --git a/svx/source/form/tabwin.cxx b/svx/source/form/tabwin.cxx
index 7be58df..a7d96f6 100644
--- a/svx/source/form/tabwin.cxx
+++ b/svx/source/form/tabwin.cxx
@@ -336,7 +336,7 @@
{
// ListBox loeschen
pListBox->Clear();
- UniString aTitle(SVX_RES(RID_STR_FIELDSELECTION));
+ OUString aTitle(SVX_RES(RID_STR_FIELDSELECTION));
SetText(aTitle);
if (!xForm.is())
@@ -370,7 +370,7 @@
}
// Prefix setzen
- UniString aPrefix;
+ OUString aPrefix;
StringListResource aPrefixes( SVX_RES( RID_RSC_TABWIN_PREFIX ) );
switch (m_nObjectType)
@@ -399,10 +399,7 @@
m_pChangeListener->addProperty(FM_PROP_COMMANDTYPE);
// Titel setzen
- aTitle.AppendAscii(" ");
- aTitle += aPrefix;
- aTitle.AppendAscii(" ");
- aTitle += m_aObjectName.getStr();
+ aTitle = aTitle + " " + aPrefix + " " + OUString(m_aObjectName.getStr());
SetText( aTitle );
}
catch( const Exception& )
diff --git a/svx/source/inc/filtnav.hxx b/svx/source/inc/filtnav.hxx
index c23630a..aeaee74 100644
--- a/svx/source/inc/filtnav.hxx
+++ b/svx/source/inc/filtnav.hxx
@@ -176,7 +176,7 @@
void Update(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > & xControllers, const ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormController > & xCurrent);
void Clear();
- sal_Bool ValidateText(FmFilterItem* pItem, UniString& rText, UniString& rErrorMsg) const;
+ sal_Bool ValidateText(FmFilterItem* pItem, OUString& rText, OUString& rErrorMsg) const;
void Append(FmFilterItems* pItems, FmFilterItem* pFilterItem);
void SetTextForItem(FmFilterItem* pItem, const ::rtl::OUString& rText);
diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx
index 6cc3b83..31327d0 100644
--- a/sw/source/core/edit/editsh.cxx
+++ b/sw/source/core/edit/editsh.cxx
@@ -472,7 +472,7 @@
{
const SwPaM& rPaM = *GetCrsr();
const SwTxtNode* pNd = rPaM.GetNode()->GetTxtNode();
- String aString = pNd ?
+ OUString aString = pNd ?
pNd->GetCurWord(rPaM.GetPoint()->nContent.GetIndex()) :
aEmptyStr;
return aString;
diff --git a/tools/inc/tools/resmgr.hxx b/tools/inc/tools/resmgr.hxx
index 8a6e44c..37aac4b 100644
--- a/tools/inc/tools/resmgr.hxx
+++ b/tools/inc/tools/resmgr.hxx
@@ -117,10 +117,10 @@
// the next two methods are needed to prevent the string hook called
// with the res mgr mutex locked
// like GetString, but doesn't call the string hook
- TOOLS_DLLPRIVATE static sal_uInt32 GetStringWithoutHook( UniString& rStr,
+ TOOLS_DLLPRIVATE static sal_uInt32 GetStringWithoutHook( OUString& rStr,
const sal_uInt8* pStr );
// like ReadString but doesn't call the string hook
- TOOLS_DLLPRIVATE UniString ReadStringWithoutHook();
+ TOOLS_DLLPRIVATE OUString ReadStringWithoutHook();
static ResMgr* ImplCreateResMgr( InternalResMgr* pImpl ) { return new ResMgr( pImpl ); }
@@ -163,7 +163,7 @@
{ return( pHT->GetGlobOff() ); }
/// Return a string and its length out of the resource
- static sal_uInt32 GetString( UniString& rStr, const sal_uInt8* pStr );
+ static sal_uInt32 GetString( OUString& rStr, const sal_uInt8* pStr );
/// Return a byte string and its length out of the resource
static sal_uInt32 GetByteString( rtl::OString& rStr, const sal_uInt8* pStr );
@@ -190,7 +190,7 @@
sal_Int16 ReadShort();
sal_Int32 ReadLong();
- UniString ReadString();
+ OUString ReadString();
rtl::OString ReadByteString();
/// Generate auto help ID for current resource stack
diff --git a/tools/source/inet/inetstrm.cxx b/tools/source/inet/inetstrm.cxx
index fb1c462..2f02f9c 100644
--- a/tools/source/inet/inetstrm.cxx
+++ b/tools/source/inet/inetstrm.cxx
@@ -1188,9 +1188,9 @@
if (aContentType.Len())
{
// Determine default Content-Type.
- UniString aDefaultType = pMsg->GetDefaultContentType();
+ OUString aDefaultType = pMsg->GetDefaultContentType();
- if (aDefaultType.CompareIgnoreCaseToAscii (
+ if (aDefaultType.compareTo(
aContentType, aContentType.Len()) == 0)
{
// No need to specify default.
diff --git a/tools/source/rc/resmgr.cxx b/tools/source/rc/resmgr.cxx
index 4d578f3..a7888fe 100644
--- a/tools/source/rc/resmgr.cxx
+++ b/tools/source/rc/resmgr.cxx
@@ -488,7 +488,7 @@
const sal_Char* pLogFile = getenv( "STAR_RESOURCE_LOGGING" );
if ( pLogFile )
{
- SvFileStream aStm( UniString( pLogFile, RTL_TEXTENCODING_ASCII_US ), STREAM_WRITE );
+ SvFileStream aStm( OUString( pLogFile, RTL_TEXTENCODING_ASCII_US ), STREAM_WRITE );
aStm.Seek( STREAM_SEEK_TO_END );
rtl::OStringBuffer aLine(RTL_CONSTASCII_STRINGPARAM("FileName: "));
aLine.append(rtl::OUStringToOString(aFileName,
@@ -665,7 +665,7 @@
#ifdef DBG_UTIL
-UniString GetTypeRes_Impl( const ResId& rTypeId )
+OUString GetTypeRes_Impl( const ResId& rTypeId )
{
// Return on resource errors
static int bInUse = sal_False;
@@ -1236,11 +1236,11 @@
(sal_uInt64(*((sal_uInt8*)pDatum + 7)) << 0) );
}
-sal_uInt32 ResMgr::GetStringWithoutHook( UniString& rStr, const sal_uInt8* pStr )
+sal_uInt32 ResMgr::GetStringWithoutHook( OUString& rStr, const sal_uInt8* pStr )
{
sal_uInt32 nLen=0;
sal_uInt32 nRet = GetStringSize( pStr, nLen );
- UniString aString( (sal_Char*)pStr, RTL_TEXTENCODING_UTF8,
+ OUString aString( (sal_Char*)pStr, RTL_TEXTENCODING_UTF8,
RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_MAPTOPRIVATE |
RTL_TEXTTOUNICODE_FLAGS_MBUNDEFINED_DEFAULT |
RTL_TEXTTOUNICODE_FLAGS_INVALID_DEFAULT );
@@ -1248,9 +1248,9 @@
return nRet;
}
-sal_uInt32 ResMgr::GetString( UniString& rStr, const sal_uInt8* pStr )
+sal_uInt32 ResMgr::GetString( OUString& rStr, const sal_uInt8* pStr )
{
- UniString aString;
+ OUString aString;
sal_uInt32 nRet = GetStringWithoutHook( aString, pStr );
if ( pImplResHookProc )
aString = pImplResHookProc( aString );
@@ -1613,20 +1613,20 @@
return n;
}
-UniString ResMgr::ReadStringWithoutHook()
+OUString ResMgr::ReadStringWithoutHook()
{
osl::Guard<osl::Mutex> aGuard( getResMgrMutex() );
if( pFallbackResMgr )
return pFallbackResMgr->ReadStringWithoutHook();
- UniString aRet;
+ OUString aRet;
const ImpRCStack& rTop = aStack[nCurStack];
if( (rTop.Flags & RC_NOTFOUND) )
{
#if OSL_DEBUG_LEVEL > 0
- aRet = OUString( RTL_CONSTASCII_USTRINGPARAM( "<resource not found>" ) );
+ aRet = OUString("<resource not found>");
#endif
}
else
@@ -1635,9 +1635,9 @@
return aRet;
}
-UniString ResMgr::ReadString()
+OUString ResMgr::ReadString()
{
- UniString aRet = ReadStringWithoutHook();
+ OUString aRet = ReadStringWithoutHook();
if ( pImplResHookProc )
aRet = pImplResHookProc( aRet );
return aRet;
@@ -1827,7 +1827,7 @@
DBG_ASSERT( m_pResImpl, "SimpleResMgr::ReadString : have no impl class !" );
// perhaps constructed with an invalid filename ?
- UniString sReturn;
+ OUString sReturn;
if ( !m_pResImpl )
return sReturn;
diff --git a/tools/source/string/strascii.cxx b/tools/source/string/strascii.cxx
index e057c03..571d942 100644
--- a/tools/source/string/strascii.cxx
+++ b/tools/source/string/strascii.cxx
@@ -36,7 +36,7 @@
sal_Int32 nLen )
{
DBG_ASSERT( ImplDbgCheckAsciiStr( pSrc, nLen ),
- "UniString::CopyAsciiStr() - pAsciiStr include characters > 127" );
+ "String::CopyAsciiStr() - pAsciiStr include characters > 127" );
while ( nLen )
{
@@ -148,10 +148,10 @@
return nRet;
}
-UniString& UniString::AssignAscii( const sal_Char* pAsciiStr )
+String& String::AssignAscii( const sal_Char* pAsciiStr )
{
- DBG_CHKTHIS( UniString, DbgCheckUniString );
- DBG_ASSERT( pAsciiStr, "UniString::AssignAscii() - pAsciiStr is NULL" );
+ DBG_CHKTHIS( String, DbgCheckUniString );
+ DBG_ASSERT( pAsciiStr, "String::AssignAscii() - pAsciiStr is NULL" );
// Determine string length
xub_StrLen nLen = ImplStringLen( pAsciiStr );
@@ -179,10 +179,10 @@
return *this;
}
-UniString& UniString::AssignAscii( const sal_Char* pAsciiStr, xub_StrLen nLen )
+String& String::AssignAscii( const sal_Char* pAsciiStr, xub_StrLen nLen )
{
- DBG_CHKTHIS( UniString, DbgCheckUniString );
- DBG_ASSERT( pAsciiStr, "UniString::AssignAscii() - pAsciiStr is NULL" );
+ DBG_CHKTHIS( String, DbgCheckUniString );
+ DBG_ASSERT( pAsciiStr, "String::AssignAscii() - pAsciiStr is NULL" );
if ( nLen == STRING_LEN )
nLen = ImplStringLen( pAsciiStr );
@@ -194,7 +194,7 @@
{
if ( !pAsciiStr[i] )
{
- OSL_FAIL( "UniString::AssignAscii() : nLen is wrong" );
+ OSL_FAIL( "String::AssignAscii() : nLen is wrong" );
}
}
}
@@ -223,10 +223,10 @@
return *this;
}
-UniString& UniString::AppendAscii( const sal_Char* pAsciiStr )
+String& String::AppendAscii( const sal_Char* pAsciiStr )
{
- DBG_CHKTHIS( UniString, DbgCheckUniString );
- DBG_ASSERT( pAsciiStr, "UniString::AppendAscii() - pAsciiStr is NULL" );
+ DBG_CHKTHIS( String, DbgCheckUniString );
+ DBG_ASSERT( pAsciiStr, "String::AppendAscii() - pAsciiStr is NULL" );
// determine string length
sal_Int32 nCopyLen = ImplStringLen( pAsciiStr );
@@ -252,10 +252,10 @@
return *this;
}
-UniString& UniString::AppendAscii( const sal_Char* pAsciiStr, xub_StrLen nLen )
+String& String::AppendAscii( const sal_Char* pAsciiStr, xub_StrLen nLen )
{
- DBG_CHKTHIS( UniString, DbgCheckUniString );
- DBG_ASSERT( pAsciiStr, "UniString::AppendAscii() - pAsciiStr is NULL" );
+ DBG_CHKTHIS( String, DbgCheckUniString );
+ DBG_ASSERT( pAsciiStr, "String::AppendAscii() - pAsciiStr is NULL" );
if ( nLen == STRING_LEN )
nLen = ImplStringLen( pAsciiStr );
@@ -267,7 +267,7 @@
{
if ( !pAsciiStr[i] )
{
- OSL_FAIL( "UniString::AppendAscii() : nLen is wrong" );
+ OSL_FAIL( "String::AppendAscii() : nLen is wrong" );
}
}
}
@@ -294,10 +294,10 @@
return *this;
}
-UniString& UniString::InsertAscii( const char* pAsciiStr, xub_StrLen nIndex )
+String& String::InsertAscii( const char* pAsciiStr, xub_StrLen nIndex )
{
- DBG_CHKTHIS( UniString, DbgCheckUniString );
- DBG_ASSERT( pAsciiStr, "UniString::InsertAscii() - pAsciiStr is NULL" );
+ DBG_CHKTHIS( String, DbgCheckUniString );
+ DBG_ASSERT( pAsciiStr, "String::InsertAscii() - pAsciiStr is NULL" );
// Determine string length
sal_Int32 nCopyLen = ImplStringLen( pAsciiStr );
@@ -329,11 +329,11 @@
return *this;
}
-UniString& UniString::ReplaceAscii( xub_StrLen nIndex, xub_StrLen nCount,
+String& String::ReplaceAscii( xub_StrLen nIndex, xub_StrLen nCount,
const sal_Char* pAsciiStr, xub_StrLen nStrLen )
{
- DBG_CHKTHIS( UniString, DbgCheckUniString );
- DBG_ASSERT( pAsciiStr, "UniString::ReplaceAscii() - pAsciiStr is NULL" );
+ DBG_CHKTHIS( String, DbgCheckUniString );
+ DBG_ASSERT( pAsciiStr, "String::ReplaceAscii() - pAsciiStr is NULL" );
// Use append if index >= length
if ( nIndex >= mpData->mnLen )
@@ -386,12 +386,12 @@
return *this;
}
-StringCompare UniString::CompareToAscii( const sal_Char* pAsciiStr,
+StringCompare String::CompareToAscii( const sal_Char* pAsciiStr,
xub_StrLen nLen ) const
{
- DBG_CHKTHIS( UniString, DbgCheckUniString );
+ DBG_CHKTHIS( String, DbgCheckUniString );
DBG_ASSERT( ImplDbgCheckAsciiStr( pAsciiStr, nLen ),
- "UniString::CompareToAscii() - pAsciiStr include characters > 127" );
+ "String::CompareToAscii() - pAsciiStr include characters > 127" );
// String vergleichen
sal_Int32 nCompare = ImplStringCompareAscii( mpData->maStr, pAsciiStr, nLen );
@@ -405,12 +405,12 @@
return COMPARE_GREATER;
}
-StringCompare UniString::CompareIgnoreCaseToAscii( const sal_Char* pAsciiStr,
+StringCompare String::CompareIgnoreCaseToAscii( const sal_Char* pAsciiStr,
xub_StrLen nLen ) const
{
- DBG_CHKTHIS( UniString, DbgCheckUniString );
+ DBG_CHKTHIS( String, DbgCheckUniString );
DBG_ASSERT( ImplDbgCheckAsciiStr( pAsciiStr, nLen ),
- "UniString::CompareIgnoreCaseToAscii() - pAsciiStr include characters > 127" );
+ "String::CompareIgnoreCaseToAscii() - pAsciiStr include characters > 127" );
// compare strings
sal_Int32 nCompare = ImplStringICompareAscii( mpData->maStr, pAsciiStr, nLen );
@@ -423,30 +423,30 @@
return COMPARE_GREATER;
}
-sal_Bool UniString::EqualsAscii( const sal_Char* pAsciiStr ) const
+sal_Bool String::EqualsAscii( const sal_Char* pAsciiStr ) const
{
- DBG_CHKTHIS( UniString, DbgCheckUniString );
+ DBG_CHKTHIS( String, DbgCheckUniString );
DBG_ASSERT( ImplDbgCheckAsciiStr( pAsciiStr, STRING_LEN ),
- "UniString::EqualsAscii() - pAsciiStr include characters > 127" );
+ "String::EqualsAscii() - pAsciiStr include characters > 127" );
return (ImplStringCompareAscii( mpData->maStr, pAsciiStr ) == 0);
}
-sal_Bool UniString::EqualsIgnoreCaseAscii( const sal_Char* pAsciiStr ) const
+sal_Bool String::EqualsIgnoreCaseAscii( const sal_Char* pAsciiStr ) const
{
- DBG_CHKTHIS( UniString, DbgCheckUniString );
+ DBG_CHKTHIS( String, DbgCheckUniString );
DBG_ASSERT( ImplDbgCheckAsciiStr( pAsciiStr, STRING_LEN ),
- "UniString::EqualsIgnoreCaseAscii() - pAsciiStr include characters > 127" );
+ "String::EqualsIgnoreCaseAscii() - pAsciiStr include characters > 127" );
return (ImplStringICompareAscii( mpData->maStr, pAsciiStr ) == 0);
}
-sal_Bool UniString::EqualsAscii( const sal_Char* pAsciiStr,
+sal_Bool String::EqualsAscii( const sal_Char* pAsciiStr,
xub_StrLen nIndex, xub_StrLen nLen ) const
{
- DBG_CHKTHIS( UniString, DbgCheckUniString );
+ DBG_CHKTHIS( String, DbgCheckUniString );
DBG_ASSERT( ImplDbgCheckAsciiStr( pAsciiStr, nLen ),
- "UniString::EqualsAscii() - pAsciiStr include characters > 127" );
+ "String::EqualsAscii() - pAsciiStr include characters > 127" );
// Are there enough codes for comparing?
if ( nIndex > mpData->mnLen )
@@ -455,12 +455,12 @@
return (ImplStringCompareAscii( mpData->maStr+nIndex, pAsciiStr, nLen ) == 0);
}
-sal_Bool UniString::EqualsIgnoreCaseAscii( const sal_Char* pAsciiStr,
+sal_Bool String::EqualsIgnoreCaseAscii( const sal_Char* pAsciiStr,
xub_StrLen nIndex, xub_StrLen nLen ) const
{
- DBG_CHKTHIS( UniString, DbgCheckUniString );
+ DBG_CHKTHIS( String, DbgCheckUniString );
DBG_ASSERT( ImplDbgCheckAsciiStr( pAsciiStr, nLen ),
- "UniString::EqualsIgnoreCaseAscii() - pAsciiStr include characters > 127" );
+ "String::EqualsIgnoreCaseAscii() - pAsciiStr include characters > 127" );
// Are there enough codes for comparing?
if ( nIndex > mpData->mnLen )
@@ -469,11 +469,11 @@
return (ImplStringICompareAscii( mpData->maStr+nIndex, pAsciiStr, nLen ) == 0);
}
-xub_StrLen UniString::SearchAscii( const sal_Char* pAsciiStr, xub_StrLen nIndex ) const
+xub_StrLen String::SearchAscii( const sal_Char* pAsciiStr, xub_StrLen nIndex ) const
{
- DBG_CHKTHIS( UniString, DbgCheckUniString );
+ DBG_CHKTHIS( String, DbgCheckUniString );
DBG_ASSERT( ImplDbgCheckAsciiStr( pAsciiStr, STRING_LEN ),
- "UniString::SearchAscii() - pAsciiStr include characters > 127" );
+ "String::SearchAscii() - pAsciiStr include characters > 127" );
sal_Int32 nLen = mpData->mnLen;
xub_StrLen nStrLen = ImplStringLen( pAsciiStr );
@@ -512,12 +512,12 @@
return STRING_NOTFOUND;
}
-xub_StrLen UniString::SearchAndReplaceAscii( const sal_Char* pAsciiStr, const UniString& rRepStr,
+xub_StrLen String::SearchAndReplaceAscii( const sal_Char* pAsciiStr, const String& rRepStr,
xub_StrLen nIndex )
{
- DBG_CHKTHIS( UniString, DbgCheckUniString );
+ DBG_CHKTHIS( String, DbgCheckUniString );
DBG_ASSERT( ImplDbgCheckAsciiStr( pAsciiStr, STRING_LEN ),
- "UniString::SearchAndReplaceAscii() - pAsciiStr include characters > 127" );
+ "String::SearchAndReplaceAscii() - pAsciiStr include characters > 127" );
xub_StrLen nSPos = SearchAscii( pAsciiStr, nIndex );
if ( nSPos != STRING_NOTFOUND )
@@ -526,11 +526,11 @@
return nSPos;
}
-void UniString::SearchAndReplaceAllAscii( const sal_Char* pAsciiStr, const UniString& rRepStr )
+void String::SearchAndReplaceAllAscii( const sal_Char* pAsciiStr, const String& rRepStr )
{
- DBG_CHKTHIS( UniString, DbgCheckUniString );
+ DBG_CHKTHIS( String, DbgCheckUniString );
DBG_ASSERT( ImplDbgCheckAsciiStr( pAsciiStr, STRING_LEN ),
- "UniString::SearchAndReplaceAllAscii() - pAsciiStr include characters > 127" );
+ "String::SearchAndReplaceAllAscii() - pAsciiStr include characters > 127" );
xub_StrLen nCharLen = ImplStringLen( pAsciiStr );
xub_StrLen nSPos = SearchAscii( pAsciiStr, 0 );
diff --git a/tools/source/string/strucvt.cxx b/tools/source/string/strucvt.cxx
index b01e3e2..885c066 100644
--- a/tools/source/string/strucvt.cxx
+++ b/tools/source/string/strucvt.cxx
@@ -17,11 +17,11 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-UniString::UniString( const char* pByteStr,
+String::String( const char* pByteStr,
rtl_TextEncoding eTextEncoding, sal_uInt32 nCvtFlags )
{
- DBG_CTOR( UniString, DbgCheckUniString );
- DBG_ASSERT( pByteStr, "UniString::UniString() - pByteStr is NULL" );
+ DBG_CTOR( String, DbgCheckUniString );
+ DBG_ASSERT( pByteStr, "String::String() - pByteStr is NULL" );
mpData = NULL;
rtl_string2UString( (rtl_uString **)(&mpData),
@@ -29,11 +29,11 @@
eTextEncoding, nCvtFlags );
}
-UniString::UniString( const char* pByteStr, xub_StrLen nLen,
+String::String( const char* pByteStr, xub_StrLen nLen,
rtl_TextEncoding eTextEncoding, sal_uInt32 nCvtFlags )
{
- DBG_CTOR( UniString, DbgCheckUniString );
- DBG_ASSERT( pByteStr, "UniString::UniString() - pByteStr is NULL" );
+ DBG_CTOR( String, DbgCheckUniString );
+ DBG_ASSERT( pByteStr, "String::String() - pByteStr is NULL" );
if ( nLen == STRING_LEN )
nLen = ImplStringLen( pByteStr );
@@ -44,13 +44,13 @@
eTextEncoding, nCvtFlags );
}
-UniString::UniString( const rtl::OUString& rStr )
+String::String( const rtl::OUString& rStr )
: mpData(NULL)
{
- DBG_CTOR( UniString, DbgCheckUniString );
+ DBG_CTOR( String, DbgCheckUniString );
OSL_ENSURE(rStr.pData->length < STRING_MAXLEN,
- "Overflowing rtl::OUString -> UniString cut to zero length");
+ "Overflowing rtl::OUString -> String cut to zero length");
if (rStr.pData->length < STRING_MAXLEN)
@@ -64,12 +64,12 @@
}
}
-UniString& UniString::Assign( const rtl::OUString& rStr )
+String& String::Assign( const rtl::OUString& rStr )
{
- DBG_CHKTHIS( UniString, DbgCheckUniString );
+ DBG_CHKTHIS( String, DbgCheckUniString );
OSL_ENSURE(rStr.pData->length < STRING_MAXLEN,
- "Overflowing rtl::OUString -> UniString cut to zero length");
+ "Overflowing rtl::OUString -> String cut to zero length");
if (rStr.pData->length < STRING_MAXLEN)
{
@@ -90,15 +90,15 @@
#include <tools/rc.hxx>
#include <tools/rcid.h>
-UniString::UniString( const ResId& rResId )
+String::String( const ResId& rResId )
: mpData(NULL)
{
rtl::OUString sStr(rResId.toString());
- DBG_CTOR( UniString, DbgCheckUniString );
+ DBG_CTOR( String, DbgCheckUniString );
OSL_ENSURE(sStr.pData->length < STRING_MAXLEN,
- "Overflowing rtl::OUString -> UniString cut to zero length");
+ "Overflowing rtl::OUString -> String cut to zero length");
if (sStr.pData->length < STRING_MAXLEN)
{
diff --git a/tools/source/string/tustring.cxx b/tools/source/string/tustring.cxx
index f8fc18a..bc56ccf 100644
--- a/tools/source/string/tustring.cxx
+++ b/tools/source/string/tustring.cxx
@@ -31,11 +31,11 @@
#include <tools/debug.hxx>
-DBG_NAME( UniString )
+DBG_NAME( String )
#define STRCODE sal_Unicode
#define STRCODEU sal_Unicode
-#define STRING UniString
+#define STRING String
#define STRINGDATA UniStringData
#define DBGCHECKSTRING DbgCheckUniString
#define STRING_TYPE rtl_uString
@@ -47,30 +47,30 @@
#include <strucvt.cxx>
#include <strascii.cxx>
-UniString::UniString(char c): mpData(ImplAllocData(1)) { mpData->maStr[0] = c; }
+String::String(char c): mpData(ImplAllocData(1)) { mpData->maStr[0] = c; }
-UniString UniString::CreateFromInt32( sal_Int32 n, sal_Int16 nRadix )
+String String::CreateFromInt32( sal_Int32 n, sal_Int16 nRadix )
{
return rtl::OUString::valueOf(n, nRadix);
}
-namespace { struct Empty : public rtl::Static< const UniString, Empty> {}; }
+namespace { struct Empty : public rtl::Static< const String, Empty> {}; }
-const UniString& UniString::EmptyString()
+const String& String::EmptyString()
{
return Empty::get();
}
-sal_Int32 UniString::ToInt32() const
+sal_Int32 String::ToInt32() const
{
- DBG_CHKTHIS( UniString, DbgCheckUniString );
+ DBG_CHKTHIS( String, DbgCheckUniString );
return rtl_ustr_toInt32( mpData->maStr, 10 );
}
-sal_Int64 UniString::ToInt64() const
+sal_Int64 String::ToInt64() const
{
- DBG_CHKTHIS( UniString, DbgCheckUniString );
+ DBG_CHKTHIS( String, DbgCheckUniString );
return rtl_ustr_toInt64( mpData->maStr, 10 );
}
diff --git a/ucb/workben/ucb/ucbdemo.cxx b/ucb/workben/ucb/ucbdemo.cxx
index ab06979..72eb0d5 100644
--- a/ucb/workben/ucb/ucbdemo.cxx
+++ b/ucb/workben/ucb/ucbdemo.cxx
@@ -135,7 +135,7 @@
void setOutEdit( MyOutWindow* pOutEdit )
{ m_pOutEdit = pOutEdit; }
void print( const sal_Char* pText );
- void print( const UniString& rText );
+ void print( const OUString& rText );
};
//-------------------------------------------------------------------------
@@ -145,7 +145,7 @@
}
//-------------------------------------------------------------------------
-void MessagePrinter::print( const UniString& rText )
+void MessagePrinter::print( const OUString& rText )
{
SolarMutexGuard aGuard;
@@ -733,11 +733,11 @@
public:
static UcbContent* create(
- Ucb& rUCB, const UniString& rURL, MyOutWindow* pOutEdit );
+ Ucb& rUCB, const OUString& rURL, MyOutWindow* pOutEdit );
void dispose();
- const UniString getURL() const;
- const UniString getType() const;
+ const OUString getURL() const;
+ const OUString getType() const;
uno::Sequence< ucb::CommandInfo > getCommands();
uno::Sequence< beans::Property > getProperties();
@@ -752,7 +752,7 @@
const rtl::OUString& rValue );
void addStringProperty( const rtl::OUString& rName,
const rtl::OUString& rValue );
- void open( const rtl::OUString & rName, const UniString& rInput,
+ void open( const rtl::OUString & rName, const OUString& rInput,
bool bPrint, bool bTiming, bool bSort,
OpenStack * pStack = 0, sal_uInt32 nLevel = 0,
sal_Int32 nFetchSize = 0 );
@@ -809,7 +809,7 @@
//-------------------------------------------------------------------------
// static
UcbContent* UcbContent::create(
- Ucb& rUCB, const UniString& rURL, MyOutWindow* pOutEdit )
+ Ucb& rUCB, const OUString& rURL, MyOutWindow* pOutEdit )
{
if ( !rURL.Len() )
return NULL;
@@ -867,20 +867,20 @@
}
//-------------------------------------------------------------------------
-const UniString UcbContent::getURL() const
+const OUString UcbContent::getURL() const
{
uno::Reference< ucb::XContentIdentifier > xId(
m_xContent->getIdentifier() );
if ( xId.is() )
- return UniString( xId->getContentIdentifier() );
+ return OUString( xId->getContentIdentifier() );
- return UniString();
+ return OUString();
}
//-------------------------------------------------------------------------
-const UniString UcbContent::getType() const
+const OUString UcbContent::getType() const
{
- const UniString aType( m_xContent->getContentType() );
+ const OUString aType( m_xContent->getContentType() );
return aType;
}
@@ -893,7 +893,7 @@
}
//----------------------------------------------------------------------------
-void UcbContent::open( const rtl::OUString & rName, const UniString& rInput,
+void UcbContent::open( const rtl::OUString & rName, const OUString& rInput,
bool bPrint, bool bTiming, bool bSort,
OpenStack * pStack, sal_uInt32 nLevel,
sal_Int32 nFetchSize )
@@ -1704,7 +1704,7 @@
void Resize( void );
DECL_LINK ( ToolBarHandler, ToolBox* );
- void print( const UniString& rText );
+ void print( const OUString& rText );
void print( const sal_Char* pText );
};
@@ -1922,7 +1922,7 @@
}
//-------------------------------------------------------------------------
-void MyWin::print( const UniString& rText )
+void MyWin::print( const OUString& rText )
{
SolarMutexGuard aGuard;
diff --git a/vcl/inc/salwtype.hxx b/vcl/inc/salwtype.hxx
index e9cd489..98651c2 100644
--- a/vcl/inc/salwtype.hxx
+++ b/vcl/inc/salwtype.hxx
@@ -192,7 +192,7 @@
struct SalExtTextInputEvent
{
sal_uLong mnTime; // Time in ms, when event is created
- UniString maText; // Text
+ OUString maText; // Text
const sal_uInt16* mpTextAttr; // Text-Attribute
sal_uLong mnCursorPos; // Cursor-Position
sal_uLong mnDeltaStart; // Start-Position of last change
@@ -228,7 +228,7 @@
// SURROUNDINGTEXTREQUEST
struct SalSurroundingTextRequestEvent
{
- UniString maText; // Text
+ OUString maText; // Text
sal_uLong mnStart; // The beginning index of selected range
sal_uLong mnEnd; // The end index of selected range
};
diff --git a/vcl/inc/vcl/graph.hxx b/vcl/inc/vcl/graph.hxx
index b0b1a2b..4f1faca 100644
--- a/vcl/inc/vcl/graph.hxx
+++ b/vcl/inc/vcl/graph.hxx
@@ -142,7 +142,7 @@
void Draw( OutputDevice* pOutDev,
const Point& rDestPt,
const Size& rDestSize ) const;
- static void DrawEx( OutputDevice* pOutDev, const String& rText,
+ static void DrawEx( OutputDevice* pOutDev, const OUString& rText,
Font& rFont, const BitmapEx& rBitmap,
const Point& rDestPt, const Size& rDestSize );
diff --git a/vcl/inc/win/saldata.hxx b/vcl/inc/win/saldata.hxx
index f7a3f00..1fef0cd 100644
--- a/vcl/inc/win/saldata.hxx
+++ b/vcl/inc/win/saldata.hxx
@@ -232,7 +232,7 @@
// \WIN\SOURCE\APP\SALDATA.CXX
rtl_TextEncoding ImplSalGetSystemEncoding();
-UniString ImplSalGetUniString( const sal_Char* pStr, xub_StrLen nLen = STRING_LEN );
+OUString ImplSalGetUniString( const sal_Char* pStr, xub_StrLen nLen = STRING_LEN );
int ImplSalWICompareAscii( const wchar_t* pStr1, const char* pStr2 );
// -----------
diff --git a/vcl/inc/window.h b/vcl/inc/window.h
index 53c59dc..e6b669d 100644
--- a/vcl/inc/window.h
+++ b/vcl/inc/window.h
@@ -116,7 +116,7 @@
struct ImplWinData
{
- UniString* mpExtOldText;
+ OUString* mpExtOldText;
sal_uInt16* mpExtOldAttrAry;
Rectangle* mpCursorRect;
long mnCursorExtWidth;
diff --git a/vcl/source/filter/wmf/winwmf.cxx b/vcl/source/filter/wmf/winwmf.cxx
index 0d6276a..317140c 100644
--- a/vcl/source/filter/wmf/winwmf.cxx
+++ b/vcl/source/filter/wmf/winwmf.cxx
@@ -805,7 +805,7 @@
eCharSet = osl_getThreadTextEncoding();
if ( eCharSet == RTL_TEXTENCODING_SYMBOL )
eCharSet = RTL_TEXTENCODING_MS_1252;
- aLogFont.alfFaceName = UniString( lfFaceName, eCharSet );
+ aLogFont.alfFaceName = String( lfFaceName, eCharSet );
pOut->CreateObject( GDI_FONT, new WinMtfFontStyle( aLogFont ) );
}
diff --git a/vcl/source/gdi/cvtsvm.cxx b/vcl/source/gdi/cvtsvm.cxx
index ff812a0..2427d99 100644
--- a/vcl/source/gdi/cvtsvm.cxx
+++ b/vcl/source/gdi/cvtsvm.cxx
@@ -306,7 +306,7 @@
// ------------------------------------------------------------------------
-void ImplReadUnicodeComment( sal_uInt32 nStrmPos, SvStream& rIStm, String& rString )
+void ImplReadUnicodeComment( sal_uInt32 nStrmPos, SvStream& rIStm, OUString& rString )
{
sal_uInt32 nOld = rIStm.Tell();
if ( nStrmPos )
@@ -829,7 +829,7 @@
ImplReadColor( rIStm, aActionColor ); aFont.SetColor( aActionColor );
ImplReadColor( rIStm, aActionColor ); aFont.SetFillColor( aActionColor );
rIStm.Read( aName, 32 );
- aFont.SetName( UniString( aName, rIStm.GetStreamCharSet() ) );
+ aFont.SetName( String( aName, rIStm.GetStreamCharSet() ) );
rIStm >> nWidth >> nHeight;
rIStm >> nCharOrient >> nLineOrient;
rIStm >> nCharSet >> nFamily >> nPitch >> nAlign >> nWeight >> nUnderline >> nStrikeout;
@@ -871,12 +871,12 @@
rIStm >> aPt >> nIndex >> nLen >> nTmp;
if ( nTmp && ( static_cast< sal_uInt32 >( nTmp ) < ( SAL_MAX_UINT16 - 1 ) ) )
{
- rtl::OString aByteStr = read_uInt8s_ToOString(rIStm, nTmp);
+ OString aByteStr = read_uInt8s_ToOString(rIStm, nTmp);
sal_uInt8 nTerminator = 0;
rIStm >> nTerminator;
DBG_ASSERT( nTerminator == 0, "expected string to be NULL terminated" );
- UniString aStr(rtl::OStringToOUString(aByteStr, eActualCharSet));
+ OUString aStr(OStringToOUString(aByteStr, eActualCharSet));
if ( nUnicodeCommentActionNumber == i )
ImplReadUnicodeComment( nUnicodeCommentStreamPos, rIStm, aStr );
rMtf.AddAction( new MetaTextAction( aPt, aStr, (sal_uInt16) nIndex, (sal_uInt16) nLen ) );
@@ -898,11 +898,11 @@
rIStm >> nTerminator;
DBG_ASSERT( nTerminator == 0, "expected string to be NULL terminated" );
- UniString aStr(rtl::OStringToOUString(aByteStr, eActualCharSet));
+ OUString aStr(rtl::OStringToOUString(aByteStr, eActualCharSet));
if( nAryLen > 0L )
{
- sal_Int32 nStrLen( aStr.Len() );
+ sal_Int32 nStrLen( aStr.getLength() );
pDXAry = new sal_Int32[ Max( nAryLen, nStrLen ) ];
@@ -961,7 +961,7 @@
rIStm >> nTerminator;
DBG_ASSERT( nTerminator == 0, "expected string to be NULL terminated" );
- UniString aStr(rtl::OStringToOUString(aByteStr, eActualCharSet));
+ OUString aStr(rtl::OStringToOUString(aByteStr, eActualCharSet));
if ( nUnicodeCommentActionNumber == i )
ImplReadUnicodeComment( nUnicodeCommentStreamPos, rIStm, aStr );
rMtf.AddAction( new MetaStretchTextAction( aPt, nWidth, aStr, (sal_uInt16) nIndex, (sal_uInt16) nLen ) );
diff --git a/vcl/source/gdi/graph.cxx b/vcl/source/gdi/graph.cxx
index b622c22..fcfaf61 100644
--- a/vcl/source/gdi/graph.cxx
+++ b/vcl/source/gdi/graph.cxx
@@ -36,7 +36,7 @@
// - Default-Drawmethode -
// -----------------------
-static void ImplDrawDefault( OutputDevice* pOutDev, const UniString* pText,
+static void ImplDrawDefault( OutputDevice* pOutDev, const OUString* pText,
Font* pFont, const Bitmap* pBitmap, const BitmapEx* pBitmapEx,
const Point& rDestPt, const Size& rDestSize )
{
@@ -92,7 +92,7 @@
}
}
- if ( aSize.Width() > 0 && aSize.Height() > 0 && pFont && pText && pText->Len()
+ if ( aSize.Width() > 0 && aSize.Height() > 0 && pFont && pText && pText->getLength()
&& !(!pOutDev->IsOutputEnabled() /*&& pOutDev->GetConnectMetaFile() */) )
{
MapMode aMapMode( MAP_POINT );
@@ -122,25 +122,25 @@
sal_uInt16 nStart = 0;
sal_uInt16 nLen = 0;
- while( nStart < pText->Len() && pText->GetChar( nStart ) == ' ' )
+ while( nStart < pText->getLength() && (*pText)[nStart] == ' ' )
nStart++;
- while( nStart+nLen < pText->Len() && pText->GetChar( nStart+nLen ) != ' ' )
+ while( nStart+nLen < pText->getLength() && (*pText)[nStart+nLen] != ' ' )
nLen++;
- while( nStart < pText->Len() && nLines-- )
+ while( nStart < pText->getLength() && nLines-- )
{
sal_uInt16 nNext = nLen;
do
{
- while ( nStart+nNext < pText->Len() && pText->GetChar( nStart+nNext ) == ' ' )
+ while ( nStart+nNext < pText->getLength() && (*pText)[nStart+nNext] == ' ' )
nNext++;
- while ( nStart+nNext < pText->Len() && pText->GetChar( nStart+nNext ) != ' ' )
+ while ( nStart+nNext < pText->getLength() && (*pText)[nStart+nNext] != ' ' )
nNext++;
nTextWidth = pOutDev->GetTextWidth( *pText, nStart, nNext );
if ( nTextWidth > aSize.Width() )
break;
nLen = nNext;
}
- while ( nStart+nNext < pText->Len() );
+ while ( nStart+nNext < pText->getLength() );
sal_uInt16 n = nLen;
nTextWidth = pOutDev->GetTextWidth( *pText, nStart, n );
@@ -151,7 +151,7 @@
aPoint.Y() += nTextHeight;
nStart = sal::static_int_cast<sal_uInt16>(nStart + nLen);
nLen = nNext-nLen;
- while( nStart < pText->Len() && pText->GetChar( nStart ) == ' ' )
+ while( nStart < pText->getLength() && (*pText)[nStart] == ' ' )
{
nStart++;
nLen--;
@@ -542,7 +542,7 @@
// ------------------------------------------------------------------------
-void Graphic::DrawEx( OutputDevice* pOutDev, const String& rText,
+void Graphic::DrawEx( OutputDevice* pOutDev, const OUString& rText,
Font& rFont, const BitmapEx& rBitmap,
const Point& rDestPt, const Size& rDestSz )
{
diff --git a/vcl/source/gdi/jobset.cxx b/vcl/source/gdi/jobset.cxx
index fc1df45..fdd4f5a 100644
--- a/vcl/source/gdi/jobset.cxx
+++ b/vcl/source/gdi/jobset.cxx
@@ -297,8 +297,8 @@
rJobSetup.mpData = new ImplJobSetup;
ImplJobSetup* pJobData = rJobSetup.mpData;
- pJobData->maPrinterName = UniString(pData->cPrinterName, aStreamEncoding);
- pJobData->maDriver = UniString(pData->cDriverName, aStreamEncoding);
+ pJobData->maPrinterName = OStringToOUString(pData->cPrinterName, aStreamEncoding);
+ pJobData->maDriver = OStringToOUString(pData->cDriverName, aStreamEncoding);
// Sind es unsere neuen JobSetup-Daten?
if ( nSystem == JOBSET_FILE364_SYSTEM ||
diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx
index 56fc9b1..d6d2e1c 100644
--- a/vcl/source/window/winproc.cxx
+++ b/vcl/source/window/winproc.cxx
@@ -1262,10 +1262,7 @@
if ( !pChild->ImplGetWindowImpl()->mbExtTextInput )
{
pChild->ImplGetWindowImpl()->mbExtTextInput = sal_True;
- if ( !pWinData->mpExtOldText )
- pWinData->mpExtOldText = new UniString;
- else
- pWinData->mpExtOldText->Erase();
+ pWinData->mpExtOldText = new OUString;
if ( pWinData->mpExtOldAttrAry )
{
delete [] pWinData->mpExtOldAttrAry;
@@ -1281,11 +1278,11 @@
// Test for changes
sal_Bool bOnlyCursor = sal_False;
- xub_StrLen nMinLen = Min( pWinData->mpExtOldText->Len(), rText.Len() );
+ xub_StrLen nMinLen = Min( pWinData->mpExtOldText->getLength(), sal_Int32(rText.Len()) );
xub_StrLen nDeltaStart = 0;
while ( nDeltaStart < nMinLen )
{
- if ( pWinData->mpExtOldText->GetChar( nDeltaStart ) != rText.GetChar( nDeltaStart ) )
+ if ( (*pWinData->mpExtOldText)[nDeltaStart] != rText.GetChar( nDeltaStart ) )
break;
nDeltaStart++;
}
@@ -1308,13 +1305,13 @@
}
}
if ( (nDeltaStart >= nMinLen) &&
- (pWinData->mpExtOldText->Len() == rText.Len()) )
+ (pWinData->mpExtOldText->getLength() == rText.Len()) )
bOnlyCursor = sal_True;
// Call Event and store the information
CommandExtTextInputData aData( rText, pTextAttr,
(xub_StrLen)nCursorPos, nCursorFlags,
- nDeltaStart, pWinData->mpExtOldText->Len(),
+ nDeltaStart, pWinData->mpExtOldText->getLength(),
bOnlyCursor );
*pWinData->mpExtOldText = rText;
if ( pWinData->mpExtOldAttrAry )
@@ -2279,20 +2276,19 @@
// -----------------------------------------------------------------------
static void ImplHandleSurroundingTextRequest( Window *pWindow,
- XubString& rText,
+ OUString& rText,
Selection &rSelRange )
{
Window* pChild = ImplGetKeyInputWindow( pWindow );
if ( !pChild )
{
- rText = XubString::EmptyString();
+ rText = OUString();
rSelRange.setMin( 0 );
rSelRange.setMax( 0 );
}
else
{
-
rText = pChild->GetSurroundingText();
Selection aSel = pChild->GetSurroundingTextSelection();
rSelRange.setMin( aSel.Min() );
@@ -2312,15 +2308,15 @@
if( aSelRange.Min() < 0 )
pEvt->mnStart = 0;
- else if( aSelRange.Min() > pEvt->maText.Len() )
- pEvt->mnStart = pEvt->maText.Len();
+ else if( aSelRange.Min() > pEvt->maText.getLength() )
+ pEvt->mnStart = pEvt->maText.getLength();
else
pEvt->mnStart = aSelRange.Min();
if( aSelRange.Max() < 0 )
pEvt->mnStart = 0;
- else if( aSelRange.Max() > pEvt->maText.Len() )
- pEvt->mnEnd = pEvt->maText.Len();
+ else if( aSelRange.Max() > pEvt->maText.getLength() )
+ pEvt->mnEnd = pEvt->maText.getLength();
else
pEvt->mnEnd = aSelRange.Max();
}
diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx
index 6343f5b..f8f4906 100644
--- a/vcl/unx/gtk/window/gtkframe.cxx
+++ b/vcl/unx/gtk/window/gtkframe.cxx
@@ -3986,7 +3986,7 @@
pThis->m_aInputEvent.mnTime = 0;
pThis->m_aInputEvent.mpTextAttr = 0;
pThis->m_aInputEvent.maText = String( pText, RTL_TEXTENCODING_UTF8 );
- pThis->m_aInputEvent.mnCursorPos = pThis->m_aInputEvent.maText.Len();
+ pThis->m_aInputEvent.mnCursorPos = pThis->m_aInputEvent.maText.getLength();
pThis->m_aInputEvent.mnCursorFlags = 0;
pThis->m_aInputEvent.mnDeltaStart = 0;
pThis->m_aInputEvent.mbOnlyCursor = False;
@@ -4007,12 +4007,12 @@
*/
bool bSingleCommit = false;
if( ! bWasPreedit
- && pThis->m_aInputEvent.maText.Len() == 1
+ && pThis->m_aInputEvent.maText.getLength() == 1
&& ! pThis->m_aPrevKeyPresses.empty()
)
{
const PreviousKeyPress& rKP = pThis->m_aPrevKeyPresses.back();
- sal_Unicode aOrigCode = pThis->m_aInputEvent.maText.GetChar(0);
+ sal_Unicode aOrigCode = pThis->m_aInputEvent.maText[0];
if( checkSingleKeyCommitHack( rKP.keyval, aOrigCode ) )
{
@@ -4060,7 +4060,7 @@
// change from nothing to nothing -> do not start preedit
// e.g. this will activate input into a calc cell without
// user input
- if( pThis->m_aInputEvent.maText.Len() == 0 )
+ if( pThis->m_aInputEvent.maText.getLength() == 0 )
{
g_free( pText );
pango_attr_list_unref( pAttrs );
@@ -4078,7 +4078,7 @@
pThis->m_aInputEvent.mnDeltaStart = 0;
pThis->m_aInputEvent.mbOnlyCursor = False;
- pThis->m_aInputFlags = std::vector<sal_uInt16>( std::max( 1, (int)pThis->m_aInputEvent.maText.Len() ), 0 );
+ pThis->m_aInputFlags = std::vector<sal_uInt16>( std::max( 1, (int)pThis->m_aInputEvent.maText.getLength() ), 0 );
PangoAttrIterator *iter = pango_attr_list_get_iterator(pAttrs);
do
diff --git a/vcl/win/source/app/saldata.cxx b/vcl/win/source/app/saldata.cxx
index 9d1c0fa..ff5a10f 100644
--- a/vcl/win/source/app/saldata.cxx
+++ b/vcl/win/source/app/saldata.cxx
@@ -44,9 +44,9 @@
// -----------------------------------------------------------------------
-UniString ImplSalGetUniString( const sal_Char* pStr, xub_StrLen nLen )
+OUString ImplSalGetUniString( const sal_Char* pStr, xub_StrLen nLen )
{
- return UniString( pStr, nLen, ImplSalGetSystemEncoding(),
+ return OUString( pStr, nLen, ImplSalGetSystemEncoding(),
RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_DEFAULT |
RTL_TEXTTOUNICODE_FLAGS_MBUNDEFINED_DEFAULT |
RTL_TEXTTOUNICODE_FLAGS_INVALID_DEFAULT );
diff --git a/vcl/win/source/gdi/salgdi3.cxx b/vcl/win/source/gdi/salgdi3.cxx
index a410028..406fa30 100644
--- a/vcl/win/source/gdi/salgdi3.cxx
+++ b/vcl/win/source/gdi/salgdi3.cxx
@@ -1457,7 +1457,7 @@
LOGFONTW& rLogFont,
bool /*bTestVerticalAvail*/ )
{
- UniString aName;
+ OUString aName;
if ( pFont->mpFontData )
aName = pFont->mpFontData->GetFamilyName();
else
--
To view, visit https://gerrit.libreoffice.org/1962
To unsubscribe, visit https://gerrit.libreoffice.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6daea312198fae3a9717bd8d4fea6371aa4cd275
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Jean-Noël Rouvignac <jn.rouvignac at gmail.com>
More information about the LibreOffice
mailing list