diff options
Diffstat (limited to 'sc')
42 files changed, 90 insertions, 90 deletions
diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx index becbd3437af6..b15342ffb1db 100644 --- a/sc/qa/unit/ucalc_formula.cxx +++ b/sc/qa/unit/ucalc_formula.cxx @@ -2270,7 +2270,7 @@ void Test::testFormulaRefUpdateName() // Delete the inserted sheet, which will shift the 'Formula' sheet to the left. m_pDoc->DeleteTab(0); - aName = OUString(); + aName.clear(); m_pDoc->GetName(0, aName); CPPUNIT_ASSERT_EQUAL(OUString("Formula"), aName); diff --git a/sc/source/core/data/attrib.cxx b/sc/source/core/data/attrib.cxx index 6adef02ddcbb..3af6849b9573 100644 --- a/sc/source/core/data/attrib.cxx +++ b/sc/source/core/data/attrib.cxx @@ -412,7 +412,7 @@ bool ScRangeItem::GetPresentation const IntlWrapper* /* pIntl */ ) const { - rText = OUString(); + rText.clear(); switch ( ePres ) { @@ -530,7 +530,7 @@ bool ScTableListItem::GetPresentation return true; case SFX_ITEM_PRESENTATION_COMPLETE: - rText = OUString(); + rText.clear(); return false; default: @@ -847,7 +847,7 @@ bool ScViewObjectModeItem::GetPresentation ) const { OUString aDel(": "); - rText = OUString(); + rText.clear(); switch ( ePres ) { @@ -1019,7 +1019,7 @@ void lclAppendScalePageCount( OUString& rText, sal_uInt16 nPages ) bool ScPageScaleToItem::GetPresentation( SfxItemPresentation ePres, SfxMapUnit, SfxMapUnit, OUString& rText, const IntlWrapper* ) const { - rText = OUString(); + rText.clear(); if( !IsValid()) return false; diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx index 0cfbaa12edc7..794fb5695add 100644 --- a/sc/source/core/data/conditio.cxx +++ b/sc/source/core/data/conditio.cxx @@ -460,7 +460,7 @@ void ScConditionEntry::CompileXML() if ( aNew.Parse( aSrcString, mpDoc ) & SCA_VALID ) aSrcPos = aNew; // if the position is invalid, there isn't much we can do at this time - aSrcString = OUString(); + aSrcString.clear(); } // Convert the text tokens that were created during XML import into real tokens. @@ -667,7 +667,7 @@ void ScConditionEntry::Interpret( const ScAddress& rPos ) { bIsStr1 = false; nVal1 = pEff1->GetValue(); - aStrVal1 = OUString(); + aStrVal1.clear(); } else { @@ -696,7 +696,7 @@ void ScConditionEntry::Interpret( const ScAddress& rPos ) { bIsStr2 = false; nVal2 = pEff2->GetValue(); - aStrVal2 = OUString(); + aStrVal2.clear(); } else { diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx index 5a6af4ba40e2..1693ad7e54d3 100644 --- a/sc/source/core/data/documen2.cxx +++ b/sc/source/core/data/documen2.cxx @@ -1278,7 +1278,7 @@ bool ScDocument::IsCellInChangeTrack(const ScAddress &cell,Color *pColCellBoder) void ScDocument::GetCellChangeTrackNote( const ScAddress &aCellPos, OUString &aTrackText,bool &bLeftEdge) { - aTrackText = OUString(); + aTrackText.clear(); // Change-Tracking ScChangeTrack* pTrack = GetChangeTrack(); ScChangeViewSettings* pSettings = GetChangeViewSettings(); diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx index c5602d99d5df..b0b0d82361fd 100644 --- a/sc/source/core/data/documen3.cxx +++ b/sc/source/core/data/documen3.cxx @@ -1380,7 +1380,7 @@ void ScDocument::GetUpperCellString(SCCOL nCol, SCROW nRow, SCTAB nTab, OUString if ( ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] ) maTabs[nTab]->GetUpperCellString( nCol, nRow, rStr ); else - rStr = OUString(); + rStr.clear(); } bool ScDocument::CreateQueryParam(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, SCTAB nTab, ScQueryParam& rQueryParam) diff --git a/sc/source/core/data/documen5.cxx b/sc/source/core/data/documen5.cxx index d064c0dcf950..b01d9558eb7b 100644 --- a/sc/source/core/data/documen5.cxx +++ b/sc/source/core/data/documen5.cxx @@ -211,7 +211,7 @@ bool ScDocument::HasChartAtPoint( SCTAB nTab, const Point& rPos, OUString& rName } } - rName = OUString(); + rName.clear(); return false; // nothing found } diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx index c8c8af7fc87a..6c37a5a190a9 100644 --- a/sc/source/core/data/document.cxx +++ b/sc/source/core/data/document.cxx @@ -197,7 +197,7 @@ bool ScDocument::GetName( SCTAB nTab, OUString& rName ) const maTabs[nTab]->GetName( rName ); return true; } - rName = OUString(); + rName.clear(); return false; } @@ -231,7 +231,7 @@ bool ScDocument::GetCodeName( SCTAB nTab, OUString& rName ) const maTabs[nTab]->GetCodeName( rName ); return true; } - rName = OUString(); + rName.clear(); return false; } @@ -3256,7 +3256,7 @@ void ScDocument::GetInputString( SCCOL nCol, SCROW nRow, SCTAB nTab, OUString& r if ( ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] ) maTabs[nTab]->GetInputString( nCol, nRow, rString ); else - rString = OUString(); + rString.clear(); } sal_uInt16 ScDocument::GetStringForFormula( const ScAddress& rPos, OUString& rString ) @@ -3429,7 +3429,7 @@ void ScDocument::GetFormula( SCCOL nCol, SCROW nRow, SCTAB nTab, OUString& rForm if ( ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] ) maTabs[nTab]->GetFormula( nCol, nRow, rFormula ); else - rFormula = OUString(); + rFormula.clear(); } const ScFormulaCell* ScDocument::GetFormulaCell( const ScAddress& rPos ) const diff --git a/sc/source/core/data/dpshttab.cxx b/sc/source/core/data/dpshttab.cxx index 679fbae307c5..c5f46df808dc 100644 --- a/sc/source/core/data/dpshttab.cxx +++ b/sc/source/core/data/dpshttab.cxx @@ -214,7 +214,7 @@ ScSheetSourceDesc::ScSheetSourceDesc(ScDocument* pDoc) : void ScSheetSourceDesc::SetSourceRange(const ScRange& rRange) { maSourceRange = rRange; - maRangeName = OUString(); // overwrite existing range name if any. + maRangeName.clear(); // overwrite existing range name if any. } const ScRange& ScSheetSourceDesc::GetSourceRange() const diff --git a/sc/source/core/data/funcdesc.cxx b/sc/source/core/data/funcdesc.cxx index ded0bf590840..14b504e1f64b 100644 --- a/sc/source/core/data/funcdesc.cxx +++ b/sc/source/core/data/funcdesc.cxx @@ -100,7 +100,7 @@ void ScFuncDesc::Clear() nFIndex = 0; nCategory = 0; - sHelpId = OString(); + sHelpId.clear(); bIncomplete = false; bHasSuppressedArgs = false; } diff --git a/sc/source/core/data/sortparam.cxx b/sc/source/core/data/sortparam.cxx index 1e265b3e9a7f..15e423f8ae29 100644 --- a/sc/source/core/data/sortparam.cxx +++ b/sc/source/core/data/sortparam.cxx @@ -54,7 +54,7 @@ void ScSortParam::Clear() bHasHeader=bCaseSens=bUserDef=bNaturalSort = false; bByRow=bIncludePattern=bInplace = true; aCollatorLocale = ::com::sun::star::lang::Locale(); - aCollatorAlgorithm = OUString(); + aCollatorAlgorithm.clear(); aKeyState.bDoSort = false; aKeyState.nField = 0; diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx index f6871f6767e6..97d894f91b1a 100644 --- a/sc/source/core/data/table1.cxx +++ b/sc/source/core/data/table1.cxx @@ -356,7 +356,7 @@ void ScTable::GetName( OUString& rName ) const void ScTable::SetName( const OUString& rNewName ) { aName = rNewName; - aUpperName = OUString(); // invalidated if the name is changed + aUpperName.clear(); // invalidated if the name is changed // SetStreamValid is handled in ScDocument::RenameTab } diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx index 381d32bcfbb5..fd3c045b9f4e 100644 --- a/sc/source/core/data/table2.cxx +++ b/sc/source/core/data/table2.cxx @@ -1448,7 +1448,7 @@ void ScTable::GetString( SCCOL nCol, SCROW nRow, OUString& rString ) const if (ValidColRow(nCol,nRow)) aCol[nCol].GetString( nRow, rString ); else - rString = OUString(); + rString.clear(); } double* ScTable::GetValueCell( SCCOL nCol, SCROW nRow ) @@ -1464,7 +1464,7 @@ void ScTable::GetInputString( SCCOL nCol, SCROW nRow, OUString& rString ) const if (ValidColRow(nCol,nRow)) aCol[nCol].GetInputString( nRow, rString ); else - rString = OUString(); + rString.clear(); } double ScTable::GetValue( SCCOL nCol, SCROW nRow ) const @@ -1495,7 +1495,7 @@ void ScTable::GetFormula( SCCOL nCol, SCROW nRow, OUString& rFormula ) const if (ValidColRow(nCol,nRow)) aCol[nCol].GetFormula( nRow, rFormula ); else - rFormula = OUString(); + rFormula.clear(); } const ScFormulaCell* ScTable::GetFormulaCell( SCCOL nCol, SCROW nRow ) const diff --git a/sc/source/core/data/table6.cxx b/sc/source/core/data/table6.cxx index cf02241ec117..835cbfed8062 100644 --- a/sc/source/core/data/table6.cxx +++ b/sc/source/core/data/table6.cxx @@ -847,7 +847,7 @@ bool lcl_maybeReplaceCellString( !rSearchItem.GetReplaceString().isEmpty()) { rColObj.SetRawString(nRow, rSearchItem.GetReplaceString()); - rUndoStr = OUString(); + rUndoStr.clear(); } return true; } @@ -1003,7 +1003,7 @@ bool ScTable::SearchRangeForAllEmptyCells( pUndoDoc->SetString(ScAddress(nCol, i, nTab), EMPTY_OUSTRING); } } - rUndoStr = OUString(); + rUndoStr.clear(); } } diff --git a/sc/source/core/tool/callform.cxx b/sc/source/core/tool/callform.cxx index 479e0d98ccd9..a17cc88161ce 100644 --- a/sc/source/core/tool/callform.cxx +++ b/sc/source/core/tool/callform.cxx @@ -398,8 +398,8 @@ bool FuncData::getParamDesc( OUString& aName, OUString& aDesc, sal_uInt16 nParam } if ( !bRet ) { - aName = OUString(); - aDesc = OUString(); + aName.clear(); + aDesc.clear(); } return bRet; #endif diff --git a/sc/source/core/tool/chgtrack.cxx b/sc/source/core/tool/chgtrack.cxx index 3f5d5c9b2c11..a2d080cf6e43 100644 --- a/sc/source/core/tool/chgtrack.cxx +++ b/sc/source/core/tool/chgtrack.cxx @@ -1720,7 +1720,7 @@ void ScChangeActionContent::SetValue( OUString& rStr, ScCellValue& rCell, sal_uLong nFormat, const ScCellValue& rOrgCell, const ScDocument* pFromDoc, ScDocument* pToDoc ) { - rStr = OUString(); + rStr.clear(); if (GetContentCellType(rOrgCell)) { @@ -1748,7 +1748,7 @@ void ScChangeActionContent::SetValue( void ScChangeActionContent::SetCell( OUString& rStr, ScCellValue& rCell, sal_uLong nFormat, const ScDocument* pDoc ) { - rStr = OUString(); + rStr.clear(); if (rCell.isEmpty()) return; @@ -1794,7 +1794,7 @@ void ScChangeActionContent::GetValueString( break; case CELLTYPE_NONE: default: - rStr = OUString(); + rStr.clear(); } } @@ -2199,7 +2199,7 @@ void ScChangeTrack::Clear() aGeneratedMap.clear(); aPasteCutMap.clear(); maUserCollection.clear(); - maUser = OUString(); + maUser.clear(); Init(); } diff --git a/sc/source/core/tool/editutil.cxx b/sc/source/core/tool/editutil.cxx index 7cca6e8aa009..26e8d60683e4 100644 --- a/sc/source/core/tool/editutil.cxx +++ b/sc/source/core/tool/editutil.cxx @@ -755,11 +755,11 @@ static OUString lcl_GetNumStr(sal_Int32 nNo, SvxNumType eType) if( nNo < 4000 ) aTmpStr = SvxNumberFormat::CreateRomanString( nNo, ( eType == SVX_ROMAN_UPPER ) ); else - aTmpStr = OUString(); + aTmpStr.clear(); break; case SVX_NUMBER_NONE: - aTmpStr = OUString(); + aTmpStr.clear(); break; // CHAR_SPECIAL: diff --git a/sc/source/core/tool/rangeutl.cxx b/sc/source/core/tool/rangeutl.cxx index 31ea9a2ab6aa..4598bdf5a275 100644 --- a/sc/source/core/tool/rangeutl.cxx +++ b/sc/source/core/tool/rangeutl.cxx @@ -398,7 +398,7 @@ void ScRangeStringConverter::GetTokenByOffset( sal_Int32 nLength = rString.getLength(); if( nOffset == -1 || nOffset >= nLength ) { - rToken = OUString(); + rToken.clear(); nOffset = -1; } else 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; } diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index 1e9a82e88cd7..05a718641997 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -776,7 +776,7 @@ void ScInputHandler::HideTip() nTipVisible = 0; pTipVisibleParent = NULL; } - aManualTip = OUString(); + aManualTip.clear(); } void ScInputHandler::HideTipBelow() { @@ -788,7 +788,7 @@ void ScInputHandler::HideTipBelow() nTipVisibleSec = 0; pTipVisibleSecParent = NULL; } - aManualTip = OUString(); + aManualTip.clear(); } void ScInputHandler::ShowArgumentsTip( const OUString& rParagraph, OUString& rSelText, const ESelection& rSel, @@ -1948,7 +1948,7 @@ bool ScInputHandler::StartTable( sal_Unicode cTyped, bool bFromCommand, bool bIn pEngine->SetText(aCurrentText); aStr = aCurrentText; bTextValid = false; - aCurrentText = OUString(); + aCurrentText.clear(); } else aStr = GetEditText(pEngine); @@ -2717,7 +2717,7 @@ void ScInputHandler::EnterHandler( sal_uInt8 nBlockMode ) HideTipBelow(); nFormSelStart = nFormSelEnd = 0; - aFormText = OUString(); + aFormText.clear(); bInOwnChange = false; bInEnterHandler = false; @@ -2769,7 +2769,7 @@ void ScInputHandler::CancelHandler() NotifyChange( pLastState, true ); nFormSelStart = nFormSelEnd = 0; - aFormText = OUString(); + aFormText.clear(); bInOwnChange = false; } @@ -3435,7 +3435,7 @@ void ScInputHandler::NotifyChange( const ScInputHdlState* pState, aString = GetEditText(pEngine); lcl_RemoveTabs(aString); bTextValid = false; - aCurrentText = OUString(); + aCurrentText.clear(); } else { diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx index abbcb21e0771..c0a9c901e691 100644 --- a/sc/source/ui/app/scmod.cxx +++ b/sc/source/ui/app/scmod.cxx @@ -635,11 +635,11 @@ void ScModule::ResetDragObject() mpDragData->pCellTransfer = NULL; mpDragData->pDrawTransfer = NULL; mpDragData->pJumpLocalDoc = NULL; - mpDragData->aLinkDoc = OUString(); - mpDragData->aLinkTable = OUString(); - mpDragData->aLinkArea = OUString(); - mpDragData->aJumpTarget = OUString(); - mpDragData->aJumpText = OUString(); + (mpDragData->aLinkDoc).clear(); + (mpDragData->aLinkTable).clear(); + (mpDragData->aLinkArea).clear(); + (mpDragData->aJumpTarget).clear(); + (mpDragData->aJumpText).clear(); } void ScModule::SetDragObject( ScTransferObj* pCellObj, ScDrawTransferObj* pDrawObj ) diff --git a/sc/source/ui/dbgui/scuiasciiopt.cxx b/sc/source/ui/dbgui/scuiasciiopt.cxx index 00d4f16deee3..2efceafc93be 100644 --- a/sc/source/ui/dbgui/scuiasciiopt.cxx +++ b/sc/source/ui/dbgui/scuiasciiopt.cxx @@ -725,7 +725,7 @@ IMPL_LINK_NOARG(ScImportAsciiDlg, UpdateTextHdl) break; } for (; i < CSV_PREVIEW_LINES; i++) - maPreviewLine[i] = OUString(); + maPreviewLine[i].clear(); mpTableBox->Execute( CSVCMD_SETLINECOUNT, mnRowPosCount); bool bMergeSep = pCkbAsOnce->IsChecked(); diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx index 47f4682d985e..baf3c69b0ebe 100644 --- a/sc/source/ui/docshell/externalrefmgr.cxx +++ b/sc/source/ui/docshell/externalrefmgr.cxx @@ -2810,13 +2810,13 @@ void ScExternalRefManager::breakLink(sal_uInt16 nFileId) void ScExternalRefManager::switchSrcFile(sal_uInt16 nFileId, const OUString& rNewFile, const OUString& rNewFilter) { maSrcFiles[nFileId].maFileName = rNewFile; - maSrcFiles[nFileId].maRelativeName = OUString(); - maSrcFiles[nFileId].maRealFileName = OUString(); + maSrcFiles[nFileId].maRelativeName.clear(); + maSrcFiles[nFileId].maRealFileName.clear(); if (!maSrcFiles[nFileId].maFilterName.equals(rNewFilter)) { // Filter type has changed. maSrcFiles[nFileId].maFilterName = rNewFilter; - maSrcFiles[nFileId].maFilterOptions = OUString(); + maSrcFiles[nFileId].maFilterOptions.clear(); } refreshSrcDocument(nFileId); } diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx index f136d1a3147b..ca4a6ef912a1 100644 --- a/sc/source/ui/docshell/impex.cxx +++ b/sc/source/ui/docshell/impex.cxx @@ -323,7 +323,7 @@ bool ScImportExport::ExportString( OUString& rText, sal_uLong nFmt ) rText = OUString( (const sal_Unicode*) aStrm.GetData() ); return true; } - rText = OUString(); + rText.clear(); return false; // ExportStream must handle RTL_TEXTENCODING_UNICODE @@ -352,7 +352,7 @@ bool ScImportExport::ExportByteString( OString& rText, rtl_TextEncoding eEnc, sa return true; } } - rText = OString(); + rText.clear(); return false; } diff --git a/sc/source/ui/docshell/tablink.cxx b/sc/source/ui/docshell/tablink.cxx index f8595834abca..765a232b3922 100644 --- a/sc/source/ui/docshell/tablink.cxx +++ b/sc/source/ui/docshell/tablink.cxx @@ -185,7 +185,7 @@ bool ScTableLink::Refresh(const OUString& rNewFile, const OUString& rNewFilter, // wenn neuer Filter ausgewaehlt wurde, Optionen vergessen if (!aFilterName.equals(rNewFilter)) - aOptions = OUString(); + aOptions.clear(); if ( pNewOptions ) // Optionen hart angegeben? aOptions = *pNewOptions; diff --git a/sc/source/ui/pagedlg/tphfedit.cxx b/sc/source/ui/pagedlg/tphfedit.cxx index 33db5b31cde4..5b79c98535d6 100644 --- a/sc/source/ui/pagedlg/tphfedit.cxx +++ b/sc/source/ui/pagedlg/tphfedit.cxx @@ -373,7 +373,7 @@ void ScExtIButton::Click() void ScExtIButton::StartPopup() { nSelected=0; - aSelectedIdent = OString(); + aSelectedIdent.clear(); if(pPopupMenu!=NULL) { diff --git a/sc/source/ui/unoobj/fmtuno.cxx b/sc/source/ui/unoobj/fmtuno.cxx index 3120b284a672..89fcd26aef25 100644 --- a/sc/source/ui/unoobj/fmtuno.cxx +++ b/sc/source/ui/unoobj/fmtuno.cxx @@ -701,10 +701,10 @@ void ScTableValidationObj::ClearData_Impl() maExprNmsp1 = ""; maExprNmsp2 = ""; meGrammar1 = meGrammar2 = FormulaGrammar::GRAM_UNSPECIFIED; // will be overridden when needed - aInputTitle = OUString(); - aInputMessage = OUString(); - aErrorTitle = OUString(); - aErrorMessage = OUString(); + aInputTitle.clear(); + aInputMessage.clear(); + aErrorTitle.clear(); + aErrorMessage.clear(); } ScTableValidationObj::~ScTableValidationObj() diff --git a/sc/source/ui/view/gridwin2.cxx b/sc/source/ui/view/gridwin2.cxx index efd991534abd..3728135d78b9 100644 --- a/sc/source/ui/view/gridwin2.cxx +++ b/sc/source/ui/view/gridwin2.cxx @@ -568,7 +568,7 @@ void ScGridWindow::UpdateDPFromFieldPopupMenu() OUString aName = itr->first; if (aName.equals(ScGlobal::GetRscString(STR_EMPTYDATA))) // Translate the special empty name into an empty string. - aName = OUString(); + aName.clear(); aResult.insert( ScCheckListMenuWindow::ResultType::value_type( diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx index b4666dd9b4ce..f81eb3d7463d 100644 --- a/sc/source/ui/view/output2.cxx +++ b/sc/source/ui/view/output2.cxx @@ -534,7 +534,7 @@ bool ScDrawStringsVars::SetText( ScRefCellValue& rCell ) } else { - aString = OUString(); + aString.clear(); maLastCell.clear(); aTextSize = Size(0,0); nOriginalWidth = 0; diff --git a/sc/source/ui/view/tabcont.cxx b/sc/source/ui/view/tabcont.cxx index ff58bacf53f2..69793e09e4ff 100644 --- a/sc/source/ui/view/tabcont.cxx +++ b/sc/source/ui/view/tabcont.cxx @@ -344,7 +344,7 @@ void ScTabControl::UpdateStatus() } else { - aString = OUString(); + aString.clear(); } if ( !aString.equals(GetPageText(static_cast<sal_uInt16>(i)+1)) || (GetTabBgColor(static_cast<sal_uInt16>(i)+1) != aTabBgColor) ) |