summaryrefslogtreecommitdiff
path: root/sc/source/filter
diff options
context:
space:
mode:
authorBrij Mohan Lal Srivastava <contactbrijmohan@gmail.com>2014-11-12 14:24:10 +0530
committerStephan Bergmann <sbergman@redhat.com>2014-11-14 09:20:38 +0100
commitd32be3ace8c8fd430bbecdf69f88a116b0ee91d1 (patch)
treeb373c084cb124434e0498867b24bc7bb333155dd /sc/source/filter
parentf5e86ebc097f0f8bc5b282511149cb026710ecde (diff)
fdo#86023 - O[U]String needs a 'clear' method
Added clear() method to OString and OUString class, Updated appropriate call-sites. Change-Id: I0ba97fa6dc7af3e31b605953089a4e8e9c3e61ac Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sc/source/filter')
-rw-r--r--sc/source/filter/dif/difimp.cxx4
-rw-r--r--sc/source/filter/excel/xiescher.cxx10
-rw-r--r--sc/source/filter/excel/xipivot.cxx2
-rw-r--r--sc/source/filter/excel/xlchart.cxx2
-rw-r--r--sc/source/filter/excel/xlpivot.cxx14
-rw-r--r--sc/source/filter/html/htmlpars.cxx4
-rw-r--r--sc/source/filter/oox/numberformatsbuffer.cxx2
-rw-r--r--sc/source/filter/oox/richstring.cxx2
-rw-r--r--sc/source/filter/oox/sheetdatacontext.cxx4
-rw-r--r--sc/source/filter/xml/XMLExportDataPilot.cxx2
-rw-r--r--sc/source/filter/xml/XMLStylesExportHelper.cxx2
-rw-r--r--sc/source/filter/xml/celltextparacontext.cxx4
-rw-r--r--sc/source/filter/xml/xmlcelli.cxx2
-rw-r--r--sc/source/filter/xml/xmlimprt.cxx8
14 files changed, 31 insertions, 31 deletions
diff --git a/sc/source/filter/dif/difimp.cxx b/sc/source/filter/dif/difimp.cxx
index 8b009f48da96..52ea17d77f20 100644
--- a/sc/source/filter/dif/difimp.cxx
+++ b/sc/source/filter/dif/difimp.cxx
@@ -373,7 +373,7 @@ TOPIC DifParser::GetNextTopic( void )
if( aLine.getLength() > 2 )
aData = aLine.copy( 1, aLine.getLength() - 2 );
else
- aData = OUString();
+ aData.clear();
eS = S_END;
break;
case S_END:
@@ -444,7 +444,7 @@ bool DifParser::ReadNextLine( OUString& rStr )
else
{
rStr = aLookAheadLine;
- aLookAheadLine = OUString();
+ aLookAheadLine.clear();
return true;
}
}
diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx
index 4f136eedc1bd..bf5ca8ac0552 100644
--- a/sc/source/filter/excel/xiescher.cxx
+++ b/sc/source/filter/excel/xiescher.cxx
@@ -550,7 +550,7 @@ void XclImpDrawObjBase::PostProcessSdrObject( XclImpDffConverter& rDffConv, SdrO
void XclImpDrawObjBase::ReadName5( XclImpStream& rStrm, sal_uInt16 nNameLen )
{
- maObjName = OUString();
+ maObjName.clear();
if( nNameLen > 0 )
{
// name length field is repeated before the name
@@ -562,7 +562,7 @@ void XclImpDrawObjBase::ReadName5( XclImpStream& rStrm, sal_uInt16 nNameLen )
void XclImpDrawObjBase::ReadMacro3( XclImpStream& rStrm, sal_uInt16 nMacroSize )
{
- maMacroName = OUString();
+ maMacroName.clear();
rStrm.Ignore( nMacroSize );
// skip padding byte for word boundaries, not contained in nMacroSize
if( rStrm.GetRecPos() & 1 ) rStrm.Ignore( 1 );
@@ -570,19 +570,19 @@ void XclImpDrawObjBase::ReadMacro3( XclImpStream& rStrm, sal_uInt16 nMacroSize )
void XclImpDrawObjBase::ReadMacro4( XclImpStream& rStrm, sal_uInt16 nMacroSize )
{
- maMacroName = OUString();
+ maMacroName.clear();
rStrm.Ignore( nMacroSize );
}
void XclImpDrawObjBase::ReadMacro5( XclImpStream& rStrm, sal_uInt16 nMacroSize )
{
- maMacroName = OUString();
+ maMacroName.clear();
rStrm.Ignore( nMacroSize );
}
void XclImpDrawObjBase::ReadMacro8( XclImpStream& rStrm )
{
- maMacroName = OUString();
+ maMacroName.clear();
if( rStrm.GetRecLeft() > 6 )
{
// macro is stored in a tNameXR token containing a link to a defined name
diff --git a/sc/source/filter/excel/xipivot.cxx b/sc/source/filter/excel/xipivot.cxx
index cce7b0226f98..2b48bcb116b0 100644
--- a/sc/source/filter/excel/xipivot.cxx
+++ b/sc/source/filter/excel/xipivot.cxx
@@ -650,7 +650,7 @@ void XclImpPivotCache::ReadDConName( XclImpStream& rStrm )
if (!mbSelfRef)
// External name is not supported yet.
- maSrcRangeName = OUString();
+ maSrcRangeName.clear();
}
void XclImpPivotCache::ReadPivotCacheStream( XclImpStream& rStrm )
diff --git a/sc/source/filter/excel/xlchart.cxx b/sc/source/filter/excel/xlchart.cxx
index 52307ac5b2f5..63aeb55d7f34 100644
--- a/sc/source/filter/excel/xlchart.cxx
+++ b/sc/source/filter/excel/xlchart.cxx
@@ -607,7 +607,7 @@ OUString XclChObjectTable::InsertObject( const Any& rObj )
catch( Exception& )
{
OSL_FAIL( "XclChObjectTable::InsertObject - cannot insert object" );
- aObjName = OUString();
+ aObjName.clear();
}
}
return aObjName;
diff --git a/sc/source/filter/excel/xlpivot.cxx b/sc/source/filter/excel/xlpivot.cxx
index 4acdf8ae1fa5..1112d62b7c36 100644
--- a/sc/source/filter/excel/xlpivot.cxx
+++ b/sc/source/filter/excel/xlpivot.cxx
@@ -49,7 +49,7 @@ XclPCItem::~XclPCItem()
void XclPCItem::SetEmpty()
{
meType = EXC_PCITEM_EMPTY;
- maText = OUString();
+ maText.clear();
}
void XclPCItem::SetText( const OUString& rText )
@@ -62,7 +62,7 @@ void XclPCItem::SetDouble( double fValue )
{
meType = EXC_PCITEM_DOUBLE;
//! TODO convert double to string
- maText = OUString();
+ maText.clear();
mfValue = fValue;
}
@@ -70,7 +70,7 @@ void XclPCItem::SetDateTime( const DateTime& rDateTime )
{
meType = EXC_PCITEM_DATETIME;
//! TODO convert date to string
- maText = OUString();
+ maText.clear();
maDateTime = rDateTime;
}
@@ -84,7 +84,7 @@ void XclPCItem::SetInteger( sal_Int16 nValue )
void XclPCItem::SetError( sal_uInt16 nError )
{
meType = EXC_PCITEM_ERROR;
- maText = OUString();
+ maText.clear();
mnError = nError;
switch( nError )
{
@@ -103,7 +103,7 @@ void XclPCItem::SetBool( bool bValue )
{
meType = EXC_PCITEM_BOOL;
//! TODO convert boolean to string
- maText = OUString();
+ maText.clear();
mbValue = bValue;
}
@@ -184,7 +184,7 @@ XclImpStream& operator>>( XclImpStream& rStrm, XclPCFieldInfo& rInfo )
if( rStrm.GetRecLeft() >= 3 )
rInfo.maName = rStrm.ReadUniString();
else
- rInfo.maName = OUString();
+ rInfo.maName.clear();
return rStrm;
}
@@ -392,7 +392,7 @@ XclImpStream& operator>>( XclImpStream& rStrm, XclPTCachedName& rCachedName )
rStrm >> nStrLen;
rCachedName.mbUseCache = nStrLen == EXC_PT_NOSTRING;
if( rCachedName.mbUseCache )
- rCachedName.maName = OUString();
+ rCachedName.maName.clear();
else
rCachedName.maName = rStrm.ReadUniString( nStrLen );
return rStrm;
diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx
index 246528afc127..60cda8547d53 100644
--- a/sc/source/filter/html/htmlpars.cxx
+++ b/sc/source/filter/html/htmlpars.cxx
@@ -1399,7 +1399,7 @@ void ScHTMLLayoutParser::Image( ImportInfo* pInfo )
if ( !pActEntry->bHasGraphic )
{ // discard any ALT text in this cell if we have any image
pActEntry->bHasGraphic = true;
- pActEntry->aAltText = OUString();
+ (pActEntry->aAltText).clear();
}
pImage->aFilterName = rFilter.GetImportFormatName( nFormat );
pImage->pGraphic = pGraphic;
@@ -1563,7 +1563,7 @@ void ScHTMLLayoutParser::ProcToken( ImportInfo* pInfo )
case HTML_TITLE_ON:
{
bInTitle = true;
- aString = OUString();
+ aString.clear();
}
break;
case HTML_TITLE_OFF:
diff --git a/sc/source/filter/oox/numberformatsbuffer.cxx b/sc/source/filter/oox/numberformatsbuffer.cxx
index d0d3c37d3106..0464e55c01da 100644
--- a/sc/source/filter/oox/numberformatsbuffer.cxx
+++ b/sc/source/filter/oox/numberformatsbuffer.cxx
@@ -1898,7 +1898,7 @@ void NumberFormat::setFormatCode( const Locale& rLocale, const sal_Char* pcFmtCo
void NumberFormat::setPredefinedId( const Locale& rLocale, sal_Int16 nPredefId )
{
maModel.maLocale = rLocale;
- maModel.maFmtCode = OUString();
+ maModel.maFmtCode.clear();
maModel.mnPredefId = nPredefId;
}
diff --git a/sc/source/filter/oox/richstring.cxx b/sc/source/filter/oox/richstring.cxx
index 7149358bc883..ca8b97706a60 100644
--- a/sc/source/filter/oox/richstring.cxx
+++ b/sc/source/filter/oox/richstring.cxx
@@ -366,7 +366,7 @@ bool RichString::extractPlainString( OUString& orString, const oox::xls::Font* p
return false;
if( maTextPortions.empty() )
{
- orString = OUString();
+ orString.clear();
return true;
}
if( (maTextPortions.size() == 1) && !maTextPortions.front()->hasFont() && !lclNeedsRichTextFormat( pFirstPortionFont ) )
diff --git a/sc/source/filter/oox/sheetdatacontext.cxx b/sc/source/filter/oox/sheetdatacontext.cxx
index 5105d2561f35..cbd7c9dcda88 100644
--- a/sc/source/filter/oox/sheetdatacontext.cxx
+++ b/sc/source/filter/oox/sheetdatacontext.cxx
@@ -335,7 +335,7 @@ bool SheetDataContext::importCell( const AttributeList& rAttribs )
maCellData.mbShowPhonetic = rAttribs.getBool( XML_ph, false );
// reset cell value, formula settings, and inline string
- maCellValue = OUString();
+ maCellValue.clear();
mxInlineStr.reset();
mbHasFormula = false;
@@ -363,7 +363,7 @@ void SheetDataContext::importFormula( const AttributeList& rAttribs )
maTableData.mbRef2Deleted = rAttribs.getBool( XML_del2, false );
}
- maFormulaStr = OUString();
+ maFormulaStr.clear();
}
void SheetDataContext::importRow( SequenceInputStream& rStrm )
diff --git a/sc/source/filter/xml/XMLExportDataPilot.cxx b/sc/source/filter/xml/XMLExportDataPilot.cxx
index 99b086777910..afc66f95d2a4 100644
--- a/sc/source/filter/xml/XMLExportDataPilot.cxx
+++ b/sc/source/filter/xml/XMLExportDataPilot.cxx
@@ -313,7 +313,7 @@ void ScXMLExportDataPilot::WriteFieldReference(ScDPSaveDimension* pDim)
}
else
{
- sValueStr = OUString();
+ sValueStr.clear();
switch(pRef->ReferenceItemType)
{
case sheet::DataPilotFieldReferenceItemType::PREVIOUS :
diff --git a/sc/source/filter/xml/XMLStylesExportHelper.cxx b/sc/source/filter/xml/XMLStylesExportHelper.cxx
index fa3f6e81ce86..de76274c6aa9 100644
--- a/sc/source/filter/xml/XMLStylesExportHelper.cxx
+++ b/sc/source/filter/xml/XMLStylesExportHelper.cxx
@@ -282,7 +282,7 @@ OUString ScMyValidationsContainer::GetCondition(ScXMLExport& rExport, const ScMy
}
else
if (aValidation.aValidationType == sheet::ValidationType_TEXT_LEN)
- sCondition = OUString();
+ sCondition.clear();
}
if (!sCondition.isEmpty())
{
diff --git a/sc/source/filter/xml/celltextparacontext.cxx b/sc/source/filter/xml/celltextparacontext.cxx
index 0120c49bf449..3f6c64b53a18 100644
--- a/sc/source/filter/xml/celltextparacontext.cxx
+++ b/sc/source/filter/xml/celltextparacontext.cxx
@@ -48,7 +48,7 @@ SvXMLImportContext* ScXMLCellTextParaContext::CreateChildContext(
if (!maContent.isEmpty())
{
mrParentCxt.PushParagraphSpan(maContent, OUString());
- maContent = OUString();
+ maContent.clear();
}
const SvXMLTokenMap& rTokenMap = GetScImport().GetCellTextParaElemTokenMap();
@@ -152,7 +152,7 @@ SvXMLImportContext* ScXMLCellTextSpanContext::CreateChildContext(
if (!maContent.isEmpty())
{
mrParentCxt.PushSpan(maContent, maStyleName);
- maContent = OUString();
+ maContent.clear();
}
const SvXMLTokenMap& rTokenMap = GetScImport().GetCellTextSpanElemTokenMap();
diff --git a/sc/source/filter/xml/xmlcelli.cxx b/sc/source/filter/xml/xmlcelli.cxx
index 68fb1fe9e71d..997275a0a288 100644
--- a/sc/source/filter/xml/xmlcelli.cxx
+++ b/sc/source/filter/xml/xmlcelli.cxx
@@ -1382,7 +1382,7 @@ void ScXMLTableRowCellContext::PutFormulaCell( const ScAddress& rCellPos )
OUString aFormulaNmsp = maFormula->second;
if( eGrammar != formula::FormulaGrammar::GRAM_EXTERNAL )
- aFormulaNmsp = OUString();
+ aFormulaNmsp.clear();
pCode->AssignXMLString( aText, aFormulaNmsp );
rDoc.getDoc().IncXMLImportedFormulaCount( aText.getLength() );
diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx
index ba5f1fc99de8..9f154db7feb8 100644
--- a/sc/source/filter/xml/xmlimprt.cxx
+++ b/sc/source/filter/xml/xmlimprt.cxx
@@ -3348,18 +3348,18 @@ void ScXMLImport::ExtractFormulaNamespaceGrammar(
const OUString& rAttrValue, bool bRestrictToExternalNmsp ) const
{
// parse the attribute value, extract namespace ID, literal namespace, and formula string
- rFormulaNmsp = OUString();
+ rFormulaNmsp.clear();
sal_uInt16 nNsId = GetNamespaceMap()._GetKeyByAttrName( rAttrValue, 0, &rFormula, &rFormulaNmsp, false );
// check if we have an ODF formula namespace
if( !bRestrictToExternalNmsp ) switch( nNsId )
{
case XML_NAMESPACE_OOOC:
- rFormulaNmsp = OUString(); // remove namespace string for built-in grammar
+ rFormulaNmsp.clear(); // remove namespace string for built-in grammar
reGrammar = FormulaGrammar::GRAM_PODF;
return;
case XML_NAMESPACE_OF:
- rFormulaNmsp = OUString(); // remove namespace string for built-in grammar
+ rFormulaNmsp.clear(); // remove namespace string for built-in grammar
reGrammar = FormulaGrammar::GRAM_ODFF;
return;
}
@@ -3398,7 +3398,7 @@ void ScXMLImport::ExtractFormulaNamespaceGrammar(
/* All attempts failed (e.g. no namespace and no leading equality sign, or
an invalid namespace prefix), continue with the entire attribute value. */
rFormula = rAttrValue;
- rFormulaNmsp = OUString(); // remove any namespace string
+ rFormulaNmsp.clear(); // remove any namespace string
reGrammar = eDefaultGrammar;
}