diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-12-18 13:29:00 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-12-18 14:12:30 +0100 |
commit | 9ba13265e3ea2a204a45c54acbbf8a1bca11a55c (patch) | |
tree | 8d90c9fa4296ad9c3d9a0f1909f1c686c5bb193d /sc | |
parent | f4fbcef061fbd3786a42d98573aa6073d5c684bf (diff) |
sc: Use appropriate OUString functions on string constants
Change-Id: Ifc00b2045de0d356e175733b0f03ab0c90083039
Diffstat (limited to 'sc')
64 files changed, 263 insertions, 263 deletions
diff --git a/sc/qa/extras/htmlexporttest.cxx b/sc/qa/extras/htmlexporttest.cxx index 8e61944d583e..8dd0e8249df0 100644 --- a/sc/qa/extras/htmlexporttest.cxx +++ b/sc/qa/extras/htmlexporttest.cxx @@ -89,7 +89,7 @@ public: assertXPath(pDoc, "/html/body/table/tr/td/img", 1); load("/sc/qa/extras/testdocuments/", "BaseForHTMLExport.ods"); - maFilterOptions = OUString("SkipImages"); + maFilterOptions = "SkipImages"; save("HTML (StarCalc)", aTempFile); pDoc = parseHtml(aTempFile); diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx index a57a652f8098..1727d30c959b 100644 --- a/sc/qa/unit/subsequent_export-test.cxx +++ b/sc/qa/unit/subsequent_export-test.cxx @@ -728,7 +728,7 @@ void ScExportTest::testRichTextExportODS() if (pText->GetParagraphCount() != 6) return false; - if (pText->GetText(0) != "") + if (!pText->GetText(0).isEmpty()) return false; if (pText->GetText(1) != "Two") @@ -737,13 +737,13 @@ void ScExportTest::testRichTextExportODS() if (pText->GetText(2) != "Three") return false; - if (pText->GetText(3) != "") + if (!pText->GetText(3).isEmpty()) return false; if (pText->GetText(4) != "Five") return false; - if (pText->GetText(5) != "") + if (!pText->GetText(5).isEmpty()) return false; return true; @@ -2308,7 +2308,7 @@ void ScExportTest::testSwappedOutImageExport() { OUString sURL; XPropSet->getPropertyValue("GraphicURL") >>= sURL; - CPPUNIT_ASSERT_MESSAGE(sFailedMessage.getStr(), sURL != OUString("vnd.sun.star.GraphicObject:00000000000000000000000000000000")); + CPPUNIT_ASSERT_MESSAGE(sFailedMessage.getStr(), sURL != "vnd.sun.star.GraphicObject:00000000000000000000000000000000"); } // Check size { @@ -2326,7 +2326,7 @@ void ScExportTest::testSwappedOutImageExport() { OUString sURL; XPropSet->getPropertyValue("GraphicURL") >>= sURL; - CPPUNIT_ASSERT_MESSAGE(sFailedMessage.getStr(), sURL != OUString("vnd.sun.star.GraphicObject:00000000000000000000000000000000")); + CPPUNIT_ASSERT_MESSAGE(sFailedMessage.getStr(), sURL != "vnd.sun.star.GraphicObject:00000000000000000000000000000000"); } // Check size { @@ -2458,7 +2458,7 @@ void ScExportTest::testImageWithSpecialID() { OUString sURL; XPropSet->getPropertyValue("GraphicURL") >>= sURL; - CPPUNIT_ASSERT_MESSAGE(sFailedMessage.getStr(), sURL != OUString("vnd.sun.star.GraphicObject:00000000000000000000000000000000")); + CPPUNIT_ASSERT_MESSAGE(sFailedMessage.getStr(), sURL != "vnd.sun.star.GraphicObject:00000000000000000000000000000000"); } // Check size { @@ -2476,7 +2476,7 @@ void ScExportTest::testImageWithSpecialID() { OUString sURL; XPropSet->getPropertyValue("GraphicURL") >>= sURL; - CPPUNIT_ASSERT_MESSAGE(sFailedMessage.getStr(), sURL != OUString("vnd.sun.star.GraphicObject:00000000000000000000000000000000")); + CPPUNIT_ASSERT_MESSAGE(sFailedMessage.getStr(), sURL != "vnd.sun.star.GraphicObject:00000000000000000000000000000000"); } // Check size { diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx index 029db9dfedf8..093ec5304b73 100644 --- a/sc/qa/unit/ucalc.cxx +++ b/sc/qa/unit/ucalc.cxx @@ -3238,7 +3238,7 @@ void Test::testCopyPaste() fValue = m_pDoc->GetValue(ScAddress(1,1,1)); ASSERT_DOUBLES_EQUAL_MESSAGE("after undo formula should return nothing", fValue, 0); aString = m_pDoc->GetString(2, 1, 1); - CPPUNIT_ASSERT_MESSAGE("after undo, string should be removed", aString == ""); + CPPUNIT_ASSERT_MESSAGE("after undo, string should be removed", aString.isEmpty()); CPPUNIT_ASSERT_MESSAGE("after undo, note on A2 should be removed", !m_pDoc->HasNote(ScAddress(0, 1, 1))); CPPUNIT_ASSERT_MESSAGE("after undo, note on B2 should be removed", !m_pDoc->HasNote(ScAddress(1, 1, 1))); CPPUNIT_ASSERT_MESSAGE("after undo, note on C2 should be removed", !m_pDoc->HasNote(ScAddress(2, 1, 1))); @@ -4500,7 +4500,7 @@ void Test::testAutoFill() m_pDoc->Fill(100, 110, 100, 110, NULL, aMarkData, 10, FILL_TO_TOP, FILL_AUTO); for(SCROW nRow = 110; nRow >= 100; --nRow) { - OUString aExpected = OUString("=A") + OUString::number(nRow +1); + OUString aExpected = "=A" + OUString::number(nRow +1); OUString aFormula; m_pDoc->GetFormula(100, nRow, 0, aFormula); CPPUNIT_ASSERT_EQUAL(aExpected, aFormula); diff --git a/sc/source/core/data/docpool.cxx b/sc/source/core/data/docpool.cxx index d8f779e8699d..14e009bed239 100644 --- a/sc/source/core/data/docpool.cxx +++ b/sc/source/core/data/docpool.cxx @@ -717,7 +717,7 @@ static bool lcl_HFPresentation { sal_uInt16 nWhich = pItem->Which(); - aText = ""; + aText.clear(); switch( nWhich ) { diff --git a/sc/source/core/data/dptabsrc.cxx b/sc/source/core/data/dptabsrc.cxx index d45f235d975c..4833be40518b 100644 --- a/sc/source/core/data/dptabsrc.cxx +++ b/sc/source/core/data/dptabsrc.cxx @@ -1554,7 +1554,7 @@ void SAL_CALL ScDPDimension::setPropertyValue( const OUString& aPropertyName, co sal_Int32 nLength = aSeq.getLength(); if ( nLength == 0 ) { - aSelectedPage = ""; + aSelectedPage.clear(); bHasSelectedPage = false; bDone = true; } diff --git a/sc/source/core/inc/interpre.hxx b/sc/source/core/inc/interpre.hxx index ed6c171e3362..04ee48eee7ed 100644 --- a/sc/source/core/inc/interpre.hxx +++ b/sc/source/core/inc/interpre.hxx @@ -973,7 +973,7 @@ inline bool ScInterpreter::CheckStringResultLen( OUString& rResult, const OUStri if ( rResult.getLength() + rAdd.getLength() > SAL_MAX_UINT16 ) { SetError( errStringOverflow ); - rResult = ""; + rResult.clear(); return false; } return true; diff --git a/sc/source/core/tool/address.cxx b/sc/source/core/tool/address.cxx index c6deace9fe2e..39fc9a4dd253 100644 --- a/sc/source/core/tool/address.cxx +++ b/sc/source/core/tool/address.cxx @@ -124,7 +124,7 @@ const sal_Unicode* parseQuotedName( const sal_Unicode* p, OUString& rName ) cPrev = *p; } - rName = ""; + rName.clear(); return pStart; } @@ -437,9 +437,9 @@ const sal_Unicode* ScRange::Parse_XL_Header( sal_uInt16 nSaveFlags = nFlags; // Is this an external reference ? - rStartTabName = ""; - rEndTabName = ""; - rExternDocName = ""; + rStartTabName.clear(); + rEndTabName.clear(); + rExternDocName.clear(); const sal_Unicode* pMsoxlQuoteStop = NULL; if (*p == '[') { @@ -451,7 +451,7 @@ const sal_Unicode* ScRange::Parse_XL_Header( p = parseQuotedName(p, rExternDocName); if (!*p || *p != ']' || rExternDocName.isEmpty()) { - rExternDocName = ""; + rExternDocName.clear(); return start; } } @@ -483,19 +483,19 @@ const sal_Unicode* ScRange::Parse_XL_Header( p = parseQuotedName(p, rExternDocName); if (!*p || *p != '!') { - rExternDocName = ""; + rExternDocName.clear(); return start; } if (!rExternDocName.isEmpty()) { sal_Int32 nOpen = rExternDocName.indexOf( '['); if (nOpen == -1) - rExternDocName = ""; + rExternDocName.clear(); else { sal_Int32 nClose = rExternDocName.indexOf( ']', nOpen+1); if (nClose == -1) - rExternDocName = ""; + rExternDocName.clear(); else { rExternDocName = rExternDocName.copy(0, nClose); @@ -1834,7 +1834,7 @@ static void lcl_Split_DocTab( const ScDocument* pDoc, SCTAB nTab, OUString& rTabName, OUString& rDocName ) { pDoc->GetName(nTab, rTabName); - rDocName = ""; + rDocName.clear(); // External reference, same as in ScCompiler::MakeTabStr() if ( rTabName[0] == '\'' ) { // "'Doc'#Tab" diff --git a/sc/source/core/tool/cellform.cxx b/sc/source/core/tool/cellform.cxx index 9c1e3e4f8424..dfc0ffecc9d3 100644 --- a/sc/source/core/tool/cellform.cxx +++ b/sc/source/core/tool/cellform.cxx @@ -54,7 +54,7 @@ void ScCellFormat::GetString( ScRefCellValue& rCell, sal_uLong nFormat, OUString { double nValue = rCell.mfValue; if (!bNullVals && nValue == 0.0) - rString = ""; + rString.clear(); else { if( eForceTextFmt == ftCheck ) @@ -101,12 +101,12 @@ void ScCellFormat::GetString( ScRefCellValue& rCell, sal_uLong nFormat, OUString if (nErrCode != 0) rString = ScGlobal::GetErrorString(nErrCode); else if ( pFCell->IsEmptyDisplayedAsString() ) - rString = ""; + rString.clear(); else if ( pFCell->IsValue() ) { double fValue = pFCell->GetValue(); if ( !bNullVals && fValue == 0.0 ) - rString = ""; + rString.clear(); else if ( pFCell->IsHybridValueCell() ) rString = pFCell->GetString().getString(); else @@ -122,7 +122,7 @@ void ScCellFormat::GetString( ScRefCellValue& rCell, sal_uLong nFormat, OUString } break; default: - rString = ""; + rString.clear(); break; } } @@ -155,7 +155,7 @@ OUString ScCellFormat::GetString( case CELLTYPE_VALUE: { double nValue = rDoc.GetValue(rPos); - if (!bNullVals && nValue == 0.0) aString = ""; + if (!bNullVals && nValue == 0.0) aString.clear(); else { if (eForceTextFmt == ftCheck) @@ -200,11 +200,11 @@ OUString ScCellFormat::GetString( sal_uInt16 nErrCode = pFCell->GetErrCode(); if (nErrCode != 0) aString = ScGlobal::GetErrorString(nErrCode); - else if (pFCell->IsEmptyDisplayedAsString()) aString = ""; + else if (pFCell->IsEmptyDisplayedAsString()) aString.clear(); else if (pFCell->IsValue()) { double fValue = pFCell->GetValue(); - if (!bNullVals && fValue == 0.0) aString = ""; + if (!bNullVals && fValue == 0.0) aString.clear(); else if (pFCell->IsHybridValueCell()) aString = pFCell->GetString().getString(); else rFormatter.GetOutputString(fValue, nFormat, aString, ppColor, bUseStarFormat); } diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index 685dbefe77eb..fbf8fb99937c 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -3540,7 +3540,7 @@ bool ScCompiler::NextNewToken( bool bInArray ) return true; } - aUpper = ""; + aUpper.clear(); bool bAsciiUpper = false; if (bMayBeFuncName) { @@ -3667,8 +3667,8 @@ ScTokenArray* ScCompiler::CompileString( const OUString& rFormula ) bCorrected = false; if ( bAutoCorrect ) { - aCorrectedFormula = ""; - aCorrectedSymbol = ""; + aCorrectedFormula.clear(); + aCorrectedSymbol.clear(); } sal_uInt8 nForced = 0; // ==formula forces recalc even if cell is not visible if( nSrcPos < aFormula.getLength() && aFormula[nSrcPos] == '=' ) @@ -3731,7 +3731,7 @@ ScTokenArray* ScCompiler::CompileString( const OUString& rFormula ) if ( bAutoCorrect ) { bCorrected = true; - aCorrectedSymbol = ""; + aCorrectedSymbol.clear(); } } else @@ -3773,7 +3773,7 @@ ScTokenArray* ScCompiler::CompileString( const OUString& rFormula ) if ( bAutoCorrect ) { bCorrected = true; - aCorrectedSymbol = ""; + aCorrectedSymbol.clear(); } } if (bUseFunctionStack && nFunction) diff --git a/sc/source/core/tool/consoli.cxx b/sc/source/core/tool/consoli.cxx index d2db66a9ca41..15a0e4dc3b43 100644 --- a/sc/source/core/tool/consoli.cxx +++ b/sc/source/core/tool/consoli.cxx @@ -140,7 +140,7 @@ void ScConsData::DeleteData() if (bRowByName) nRowCount = 0; bCornerUsed = false; - aCornerText = ""; + aCornerText.clear(); } #undef DELETEARR @@ -484,7 +484,7 @@ void ScConsData::AddData( ScDocument* pSrcDoc, SCTAB nTab, if (bCornerUsed) { if (aCornerText != aThisCorner) - aCornerText = ""; + aCornerText.clear(); } else { diff --git a/sc/source/core/tool/stylehelper.cxx b/sc/source/core/tool/stylehelper.cxx index bf49fac15fe8..364c070c3fde 100644 --- a/sc/source/core/tool/stylehelper.cxx +++ b/sc/source/core/tool/stylehelper.cxx @@ -51,19 +51,19 @@ static const ScDisplayNameMap* lcl_GetStyleNameMap( sal_uInt16 nType ) if ( !bCellMapFilled ) { aCellMap[0].aDispName = ScGlobal::GetRscString( STR_STYLENAME_STANDARD ); - aCellMap[0].aProgName = OUString( SC_STYLE_PROG_STANDARD ); + aCellMap[0].aProgName = SC_STYLE_PROG_STANDARD; aCellMap[1].aDispName = ScGlobal::GetRscString( STR_STYLENAME_RESULT ); - aCellMap[1].aProgName = OUString( SC_STYLE_PROG_RESULT ); + aCellMap[1].aProgName = SC_STYLE_PROG_RESULT; aCellMap[2].aDispName = ScGlobal::GetRscString( STR_STYLENAME_RESULT1 ); - aCellMap[2].aProgName = OUString( SC_STYLE_PROG_RESULT1 ); + aCellMap[2].aProgName = SC_STYLE_PROG_RESULT1; aCellMap[3].aDispName = ScGlobal::GetRscString( STR_STYLENAME_HEADLINE ); - aCellMap[3].aProgName = OUString( SC_STYLE_PROG_HEADLINE ); + aCellMap[3].aProgName = SC_STYLE_PROG_HEADLINE; aCellMap[4].aDispName = ScGlobal::GetRscString( STR_STYLENAME_HEADLINE1 ); - aCellMap[4].aProgName = OUString( SC_STYLE_PROG_HEADLINE1 ); + aCellMap[4].aProgName = SC_STYLE_PROG_HEADLINE1; // last entry remains empty @@ -78,10 +78,10 @@ static const ScDisplayNameMap* lcl_GetStyleNameMap( sal_uInt16 nType ) if ( !bPageMapFilled ) { aPageMap[0].aDispName = ScGlobal::GetRscString( STR_STYLENAME_STANDARD ); - aPageMap[0].aProgName = OUString( SC_STYLE_PROG_STANDARD ); + aPageMap[0].aProgName = SC_STYLE_PROG_STANDARD; aPageMap[1].aDispName = ScGlobal::GetRscString( STR_STYLENAME_REPORT ); - aPageMap[1].aProgName = OUString( SC_STYLE_PROG_REPORT ); + aPageMap[1].aProgName = SC_STYLE_PROG_REPORT; // last entry remains empty diff --git a/sc/source/filter/excel/xehelper.cxx b/sc/source/filter/excel/xehelper.cxx index f58d19291866..0109d5eef95c 100644 --- a/sc/source/filter/excel/xehelper.cxx +++ b/sc/source/filter/excel/xehelper.cxx @@ -476,7 +476,7 @@ XclExpStringRef lclCreateFormattedString( else { OSL_FAIL( "lclCreateFormattedString - unknown text field" ); - aXclPortionText = ""; + aXclPortionText.clear(); } } } @@ -667,7 +667,7 @@ void XclExpHFConverter::GenerateString( const EditTextObject* pCenterObj, const EditTextObject* pRightObj ) { - maHFString = ""; + maHFString.clear(); mnTotalHeight = 0; AppendPortion( pLeftObj, 'L' ); AppendPortion( pCenterObj, 'C' ); diff --git a/sc/source/filter/excel/xicontent.cxx b/sc/source/filter/excel/xicontent.cxx index 79c78ead74c9..1baf0e29d450 100644 --- a/sc/source/filter/excel/xicontent.cxx +++ b/sc/source/filter/excel/xicontent.cxx @@ -950,7 +950,7 @@ void XclImpWebQuery::ReadWqtables( XclImpStream& rStrm ) const sal_Unicode cSep = ';'; OUString aQuotedPairs( "\"\"" ); sal_Int32 nTokenCnt = ScStringUtil::GetQuotedTokenCount( aTables, aQuotedPairs, ',' ); - maTables = ""; + maTables.clear(); sal_Int32 nStringIx = 0; for( sal_Int32 nToken = 0; nToken < nTokenCnt; ++nToken ) { diff --git a/sc/source/filter/excel/xihelper.cxx b/sc/source/filter/excel/xihelper.cxx index b83df30905f8..4762e669327a 100644 --- a/sc/source/filter/excel/xihelper.cxx +++ b/sc/source/filter/excel/xihelper.cxx @@ -282,7 +282,7 @@ void XclImpHFConverter::ParseString( const OUString& rHFString ) meCurrObj = EXC_HF_CENTER; // parser temporaries - maCurrText = ""; + maCurrText.clear(); OUString aReadFont; // current font name OUString aReadStyle; // current font style sal_uInt16 nReadHeight = 0; // current font height @@ -382,8 +382,8 @@ void XclImpHFConverter::ParseString( const OUString& rHFString ) break; case '\"': // font name - aReadFont = ""; - aReadStyle = ""; + aReadFont.clear(); + aReadStyle.clear(); eState = xlPSFont; break; default: @@ -544,7 +544,7 @@ void XclImpHFConverter::InsertText() ESelection& rSel = GetCurrSel(); mrEE.QuickInsertText( maCurrText, ESelection( rSel.nEndPara, rSel.nEndPos, rSel.nEndPara, rSel.nEndPos ) ); rSel.nEndPos = rSel.nEndPos + maCurrText.getLength(); - maCurrText = ""; + maCurrText.clear(); UpdateCurrMaxLineHeight(); } } diff --git a/sc/source/filter/excel/xistyle.cxx b/sc/source/filter/excel/xistyle.cxx index 446b283969bf..63f8f57e94b9 100644 --- a/sc/source/filter/excel/xistyle.cxx +++ b/sc/source/filter/excel/xistyle.cxx @@ -212,7 +212,7 @@ void XclImpFont::SetFontData( const XclFontData& rFontData, bool bHasCharSet ) } } } - maData.maStyle = ""; + maData.maStyle.clear(); } GuessScriptType(); SetAllUsedFlags( true ); diff --git a/sc/source/filter/excel/xlpage.cxx b/sc/source/filter/excel/xlpage.cxx index 36232de41425..afbe2ef7d120 100644 --- a/sc/source/filter/excel/xlpage.cxx +++ b/sc/source/filter/excel/xlpage.cxx @@ -174,8 +174,8 @@ void XclPageData::SetDefaults() maHorPageBreaks.clear(); maVerPageBreaks.clear(); mxBrushItem.reset(); - maHeader = ""; - maFooter = ""; + maHeader.clear(); + maFooter.clear(); mfLeftMargin = mfRightMargin = XclTools::GetInchFromHmm( EXC_MARGIN_DEFAULT_LR ); mfTopMargin = mfBottomMargin = XclTools::GetInchFromHmm( EXC_MARGIN_DEFAULT_TB ); mfHeaderMargin = mfFooterMargin = XclTools::GetInchFromHmm( EXC_MARGIN_DEFAULT_HF ); diff --git a/sc/source/filter/excel/xlstyle.cxx b/sc/source/filter/excel/xlstyle.cxx index fef4e2c92836..3a65bf6d2db3 100644 --- a/sc/source/filter/excel/xlstyle.cxx +++ b/sc/source/filter/excel/xlstyle.cxx @@ -184,8 +184,8 @@ XclFontData::XclFontData( const SvxFont& rFont ) void XclFontData::Clear() { - maName = ""; - maStyle = ""; + maName.clear(); + maStyle.clear(); maColor.SetColor( COL_AUTO ); mnHeight = 0; mnWeight = EXC_FONTWGHT_DONTKNOW; @@ -199,7 +199,7 @@ void XclFontData::Clear() void XclFontData::FillFromVclFont( const vcl::Font& rFont ) { maName = XclTools::GetXclFontName( rFont.GetName() ); // substitute with MS fonts - maStyle = ""; + maStyle.clear(); maColor = rFont.GetColor(); SetScUnderline( rFont.GetUnderline() ); mnEscapem = EXC_FONTESC_NONE; diff --git a/sc/source/filter/ftools/ftools.cxx b/sc/source/filter/ftools/ftools.cxx index 21c43c45e089..c1bddcb81070 100644 --- a/sc/source/filter/ftools/ftools.cxx +++ b/sc/source/filter/ftools/ftools.cxx @@ -335,7 +335,7 @@ bool ScfTools::IsHTMLTablesName( const OUString& rSource ) bool ScfTools::GetHTMLNameFromName( const OUString& rSource, OUString& rName ) { - rName = ""; + rName.clear(); if( rSource.startsWithIgnoreAsciiCase( GetHTMLNamePrefix() ) ) { rName = rSource.copy( GetHTMLNamePrefix().getLength() ); diff --git a/sc/source/filter/inc/xlconst.hxx b/sc/source/filter/inc/xlconst.hxx index 183bd1cfd03b..b402f0095237 100644 --- a/sc/source/filter/inc/xlconst.hxx +++ b/sc/source/filter/inc/xlconst.hxx @@ -80,8 +80,8 @@ const SCTAB SCTAB_GLOBAL = SCTAB_MAX; /// A Calc sheet #define EXC_STORAGE_OLE_EMBEDDED OUString( "MBD" ) #define EXC_STORAGE_VBA_PROJECT OUString( "_VBA_PROJECT_CUR" ) -#define EXC_STREAM_BOOK OUString( "Book" ) -#define EXC_STREAM_WORKBOOK OUString( "Workbook" ) +#define EXC_STREAM_BOOK "Book" +#define EXC_STREAM_WORKBOOK "Workbook" #define EXC_STREAM_CTLS OUString( "Ctls" ) // Encoded URLs --------------------------------------------------------------- diff --git a/sc/source/filter/xml/xmldrani.cxx b/sc/source/filter/xml/xmldrani.cxx index 7c36dc21af70..f6108cbe88bc 100644 --- a/sc/source/filter/xml/xmldrani.cxx +++ b/sc/source/filter/xml/xmldrani.cxx @@ -340,7 +340,7 @@ ScDBData* ScXMLDatabaseRangeContext::ConvertToDBData(const OUString& rName) size_t nOldSize = aSortSequence.getLength(); aSortSequence.realloc(nOldSize + 1); beans::PropertyValue aProperty; - aProperty.Name = OUString(SC_UNONAME_ORIENT); + aProperty.Name = SC_UNONAME_ORIENT; table::TableOrientation eOrient = mpQueryParam->bByRow ? table::TableOrientation_ROWS : table::TableOrientation_COLUMNS; aProperty.Value <<= eOrient; diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx index cf6f5c1f0460..22f71c99bcae 100644 --- a/sc/source/filter/xml/xmlexprt.cxx +++ b/sc/source/filter/xml/xmlexprt.cxx @@ -4775,7 +4775,7 @@ void ScXMLExport::WriteConsolidation() ScXMLConverter::GetStringFromFunction( sStrData, pCons->eFunction ); AddAttribute( XML_NAMESPACE_TABLE, XML_FUNCTION, sStrData ); - sStrData = ""; + sStrData.clear(); for( sal_Int32 nIndex = 0; nIndex < pCons->nDataAreaCount; ++nIndex ) ScRangeStringConverter::GetStringFromArea( sStrData, *pCons->ppDataAreas[ nIndex ], pDoc, FormulaGrammar::CONV_OOO, ' ', true ); AddAttribute( XML_NAMESPACE_TABLE, XML_SOURCE_CELL_RANGE_ADDRESSES, sStrData ); diff --git a/sc/source/filter/xml/xmlsorti.cxx b/sc/source/filter/xml/xmlsorti.cxx index 4c9894f50c78..0c6ceabfe93b 100644 --- a/sc/source/filter/xml/xmlsorti.cxx +++ b/sc/source/filter/xml/xmlsorti.cxx @@ -136,28 +136,28 @@ void ScXMLSortContext::EndElement() if (nAlgoLength) ++i; uno::Sequence <beans::PropertyValue> aSortDescriptor(7 + i); - aSortDescriptor[0].Name = OUString(SC_UNONAME_BINDFMT); + aSortDescriptor[0].Name = SC_UNONAME_BINDFMT; aSortDescriptor[0].Value = css::uno::makeAny(bBindFormatsToContent); - aSortDescriptor[1].Name = OUString(SC_UNONAME_COPYOUT); + aSortDescriptor[1].Name = SC_UNONAME_COPYOUT; aSortDescriptor[1].Value = css::uno::makeAny(bCopyOutputData); - aSortDescriptor[2].Name = OUString(SC_UNONAME_ISCASE); + aSortDescriptor[2].Name = SC_UNONAME_ISCASE; aSortDescriptor[2].Value = css::uno::makeAny(bIsCaseSensitive); - aSortDescriptor[3].Name = OUString(SC_UNONAME_ISULIST); + aSortDescriptor[3].Name = SC_UNONAME_ISULIST; aSortDescriptor[3].Value = css::uno::makeAny(bEnabledUserList); - aSortDescriptor[4].Name = OUString(SC_UNONAME_OUTPOS); + aSortDescriptor[4].Name = SC_UNONAME_OUTPOS; aSortDescriptor[4].Value <<= aOutputPosition; - aSortDescriptor[5].Name = OUString(SC_UNONAME_UINDEX); + aSortDescriptor[5].Name = SC_UNONAME_UINDEX; aSortDescriptor[5].Value <<= nUserListIndex; - aSortDescriptor[6].Name = OUString(SC_UNONAME_SORTFLD); + aSortDescriptor[6].Name = SC_UNONAME_SORTFLD; aSortDescriptor[6].Value <<= aSortFields; if (!maLanguageTagODF.isEmpty()) { - aSortDescriptor[7].Name = OUString(SC_UNONAME_COLLLOC); + aSortDescriptor[7].Name = SC_UNONAME_COLLLOC; aSortDescriptor[7].Value <<= maLanguageTagODF.getLanguageTag().getLocale( false); } if (nAlgoLength) { - aSortDescriptor[6 + i].Name = OUString(SC_UNONAME_COLLALG); + aSortDescriptor[6 + i].Name = SC_UNONAME_COLLALG; aSortDescriptor[6 + i].Value <<= sAlgorithm; } pDatabaseRangeContext->SetSortSequence(aSortDescriptor); diff --git a/sc/source/ui/Accessibility/AccessibleText.cxx b/sc/source/ui/Accessibility/AccessibleText.cxx index fb98dc2bce28..48931cf2b70f 100644 --- a/sc/source/ui/Accessibility/AccessibleText.cxx +++ b/sc/source/ui/Accessibility/AccessibleText.cxx @@ -769,7 +769,7 @@ void ScAccessibleCellTextData::GetCellText(const ScAddress& rCellPos, OUString& else if (!aOptions.GetOption( VOPT_NULLVALS )) { if ((aCellType == CELLTYPE_VALUE || aCellType == CELLTYPE_FORMULA) && rDoc.GetValue(rCellPos) == 0.0) - rText = ""; + rText.clear(); } } } diff --git a/sc/source/ui/dbgui/csvruler.cxx b/sc/source/ui/dbgui/csvruler.cxx index 24eb276672c0..ae6edcebd416 100644 --- a/sc/source/ui/dbgui/csvruler.cxx +++ b/sc/source/ui/dbgui/csvruler.cxx @@ -43,7 +43,7 @@ static void load_FixedWidthList(ScCsvSplits &aSplits) OUString* pNames = aNames.getArray(); ScLinkConfigItem aItem( OUString( SEP_PATH ) ); - pNames[0] = OUString( FIXED_WIDTH_LIST ); + pNames[0] = FIXED_WIDTH_LIST; aValues = aItem.GetProperties( aNames ); pProperties = aValues.getConstArray(); @@ -78,7 +78,7 @@ static void save_FixedWidthList(ScCsvSplits aSplits) OUString* pNames = aNames.getArray(); ScLinkConfigItem aItem( OUString( SEP_PATH ) ); - pNames[0] = OUString( FIXED_WIDTH_LIST ); + pNames[0] = FIXED_WIDTH_LIST; aValues = aItem.GetProperties( aNames ); pProperties = aValues.getArray(); pProperties[0] <<= sFixedWidthLists; diff --git a/sc/source/ui/dbgui/scuiasciiopt.cxx b/sc/source/ui/dbgui/scuiasciiopt.cxx index 2efceafc93be..a3b73879b266 100644 --- a/sc/source/ui/dbgui/scuiasciiopt.cxx +++ b/sc/source/ui/dbgui/scuiasciiopt.cxx @@ -125,17 +125,17 @@ static void load_Separators( OUString &sFieldSeparators, OUString &sTextSeparato } ScLinkConfigItem aItem( aSepPath ); - pNames[0] = OUString( MERGE_DELIMITERS ); - pNames[1] = OUString( SEPARATORS ); - pNames[2] = OUString( TEXT_SEPARATORS ); - pNames[3] = OUString( FIXED_WIDTH ); + pNames[0] = MERGE_DELIMITERS; + pNames[1] = SEPARATORS; + pNames[2] = TEXT_SEPARATORS; + pNames[3] = FIXED_WIDTH; if (eCall != SC_TEXTTOCOLUMNS) { - pNames[4] = OUString( FROM_ROW ); - pNames[5] = OUString( CHAR_SET ); - pNames[6] = OUString( QUOTED_AS_TEXT ); - pNames[7] = OUString( DETECT_SPECIAL_NUM ); - pNames[8] = OUString( LANGUAGE ); + pNames[4] = FROM_ROW; + pNames[5] = CHAR_SET; + pNames[6] = QUOTED_AS_TEXT; + pNames[7] = DETECT_SPECIAL_NUM; + pNames[8] = LANGUAGE; } aValues = aItem.GetProperties( aNames ); pProperties = aValues.getConstArray(); @@ -198,17 +198,17 @@ static void save_Separators( } ScLinkConfigItem aItem( aSepPath ); - pNames[0] = OUString( MERGE_DELIMITERS ); - pNames[1] = OUString( SEPARATORS ); - pNames[2] = OUString( TEXT_SEPARATORS ); - pNames[3] = OUString( FIXED_WIDTH ); + pNames[0] = MERGE_DELIMITERS; + pNames[1] = SEPARATORS; + pNames[2] = TEXT_SEPARATORS; + pNames[3] = FIXED_WIDTH; if (eCall != SC_TEXTTOCOLUMNS) { - pNames[4] = OUString( FROM_ROW ); - pNames[5] = OUString( CHAR_SET ); - pNames[6] = OUString( QUOTED_AS_TEXT ); - pNames[7] = OUString( DETECT_SPECIAL_NUM ); - pNames[8] = OUString( LANGUAGE ); + pNames[4] = FROM_ROW; + pNames[5] = CHAR_SET; + pNames[6] = QUOTED_AS_TEXT; + pNames[7] = DETECT_SPECIAL_NUM; + pNames[8] = LANGUAGE; } aValues = aItem.GetProperties( aNames ); pProperties = aValues.getArray(); diff --git a/sc/source/ui/dbgui/validate.cxx b/sc/source/ui/dbgui/validate.cxx index 78f7a0f73b7e..4d78e1262c8a 100644 --- a/sc/source/ui/dbgui/validate.cxx +++ b/sc/source/ui/dbgui/validate.cxx @@ -253,7 +253,7 @@ ScConditionMode lclGetCondModeFromPos( sal_uInt16 nLbPos ) @param rFmlaStr (out-param) The converted formula string. */ void lclGetFormulaFromStringList( OUString& rFmlaStr, const OUString& rStringList, sal_Unicode cFmlaSep ) { - rFmlaStr = ""; + rFmlaStr.clear(); sal_Int32 nTokenCnt = comphelper::string::getTokenCount(rStringList, '\n'); for( sal_Int32 nToken = 0, nStringIx = 0; nToken < (sal_Int32) nTokenCnt; ++nToken ) { @@ -275,7 +275,7 @@ bool lclGetStringListFromFormula( OUString& rStringList, const OUString& rFmlaSt OUString aQuotes( "\"\"" ); sal_Int32 nTokenCnt = ScStringUtil::GetQuotedTokenCount(rFmlaStr, aQuotes, cFmlaSep ); - rStringList=""; + rStringList.clear(); bool bIsStringList = (nTokenCnt > 0); bool bTokenAdded = false; @@ -410,7 +410,7 @@ void ScTPValidationValue::Reset( const SfxItemSet* rArgSet ) aFmlaStr = static_cast< const SfxStringItem* >( pItem )->GetValue(); SetFirstFormula( aFmlaStr ); - aFmlaStr= ""; + aFmlaStr.clear(); if ( rArgSet->GetItemState( FID_VALID_VALUE2, true, &pItem ) == SfxItemState::SET ) aFmlaStr = static_cast< const SfxStringItem* >( pItem )->GetValue(); SetSecondFormula( aFmlaStr ); diff --git a/sc/source/ui/docshell/arealink.cxx b/sc/source/ui/docshell/arealink.cxx index e02e795773e8..134ebb040359 100644 --- a/sc/source/ui/docshell/arealink.cxx +++ b/sc/source/ui/docshell/arealink.cxx @@ -249,7 +249,7 @@ bool ScAreaLink::Refresh( const OUString& rNewFile, const OUString& rNewFilter, // wenn neuer Filter ausgewaehlt wurde, Optionen vergessen if ( rNewFilter != aFilterName ) - aOptions = ""; + aOptions.clear(); SfxMedium* pMed = ScDocumentLoader::CreateMedium( aNewUrl, pFilter, aOptions); diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index 005ac8920d50..96c527df0d4d 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -1944,7 +1944,7 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt switch ( eType ) { case CELLTYPE_NONE: - aString = ""; + aString.clear(); bString = false; break; case CELLTYPE_FORMULA : @@ -2028,7 +2028,7 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt break; default: OSL_FAIL( "ScDocShell::AsciiSave: unknown CellType" ); - aString = ""; + aString.clear(); bString = false; } diff --git a/sc/source/ui/docshell/docsh5.cxx b/sc/source/ui/docshell/docsh5.cxx index dd6d9f23cda7..79167bcaa71d 100644 --- a/sc/source/ui/docshell/docsh5.cxx +++ b/sc/source/ui/docshell/docsh5.cxx @@ -277,7 +277,7 @@ ScDBData* ScDocShell::GetDBData( const ScRange& rMarked, ScGetDBMode eMode, ScGe } else { - aNewName = OUString(STR_DB_LOCAL_NONAME); + aNewName = STR_DB_LOCAL_NONAME; pNoNameData = new ScDBData(aNewName , nTab, nStartCol,nStartRow, nEndCol,nEndRow, true, bHasHeader ); diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx index 7c52d40984cc..e6d7e8b5cc5f 100644 --- a/sc/source/ui/docshell/impex.cxx +++ b/sc/source/ui/docshell/impex.cxx @@ -869,7 +869,7 @@ bool ScImportExport::Text2Doc( SvStream& rStrm ) const sal_Unicode* p = aLine.getStr(); while( *p ) { - aCell = ""; + aCell.clear(); const sal_Unicode* q = p; while (*p && *p != cSep) { @@ -1506,7 +1506,7 @@ const sal_Unicode* ScImportExport::ScanNextFieldFromString( const sal_Unicode* p bool& rbOverflowCell ) { rbIsQuoted = false; - rField = ""; + rField.clear(); const sal_Unicode cBlank = ' '; if (!ScGlobal::UnicodeStrChr( pSeps, cBlank)) { @@ -1773,7 +1773,7 @@ bool ScImportExport::Sylk2Doc( SvStream& rStrm ) if( *p == '"' ) { bText = true; - aText = ""; + aText.clear(); p = lcl_ScanSylkString( p, aText, eVersion); } else @@ -2019,7 +2019,7 @@ bool ScImportExport::Doc2Sylk( SvStream& rStrm ) switch ( pFCell->GetMatrixFlag() ) { case MM_REFERENCE : - aCellStr = ""; + aCellStr.clear(); break; default: OUString aOUCellStr; diff --git a/sc/source/ui/miscdlgs/linkarea.cxx b/sc/source/ui/miscdlgs/linkarea.cxx index 7ecd73885cee..cf09932f6247 100644 --- a/sc/source/ui/miscdlgs/linkarea.cxx +++ b/sc/source/ui/miscdlgs/linkarea.cxx @@ -113,7 +113,7 @@ IMPL_LINK_NOARG(ScLinkedAreaDlg, FileHdl) // #i53241# replace HTML filter with DataQuery filter if (aFilter == FILTERNAME_HTML) - aFilter = OUString(FILTERNAME_QUERY); + aFilter = FILTERNAME_QUERY; LoadDocument( aEntered, aFilter, aOptions ); diff --git a/sc/source/ui/miscdlgs/solveroptions.cxx b/sc/source/ui/miscdlgs/solveroptions.cxx index 25f0330b07e7..307bc6734974 100644 --- a/sc/source/ui/miscdlgs/solveroptions.cxx +++ b/sc/source/ui/miscdlgs/solveroptions.cxx @@ -146,7 +146,7 @@ ScSolverOptionsDialog::ScSolverOptionsDialog( vcl::Window* pParent, nSelect = 0; } else - maEngine = ""; + maEngine.clear(); maProperties.realloc(0); // don't use options from different engine } if ( nSelect >= 0 ) // select in list box diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx index dea7d21e3e9a..194e0922fb0c 100644 --- a/sc/source/ui/navipi/content.cxx +++ b/sc/source/ui/navipi/content.cxx @@ -1521,7 +1521,7 @@ void ScContentTree::ToggleRoot() // nach Selektion void ScContentTree::ResetManualDoc() { - aManualDoc = ""; + aManualDoc.clear(); bHiddenDoc = false; ActiveDocChanged(); @@ -1546,7 +1546,7 @@ void ScContentTree::ActiveDocChanged() { // eingestelltes Dokument existiert nicht mehr - aManualDoc = ""; // wieder automatisch + aManualDoc.clear(); // wieder automatisch Refresh(); pSh = GetManualOrCurrent(); // sollte jetzt aktives sein if (pSh) diff --git a/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx index 221f2b7a8bda..b30420d9619d 100644 --- a/sc/source/ui/navipi/navipi.cxx +++ b/sc/source/ui/navipi/navipi.cxx @@ -217,7 +217,7 @@ SCCOL ColumnEdit::AlphaToNum( OUString& rStr ) } } else - rStr = ""; + rStr.clear(); return nColumn; } @@ -229,7 +229,7 @@ SCCOL ColumnEdit::NumStrToAlpha( OUString& rStr ) if ( CharClass::isAsciiNumeric(rStr) ) nColumn = NumToAlpha( (SCCOL)rStr.toInt32(), rStr ); else - rStr = ""; + rStr.clear(); return nColumn; } diff --git a/sc/source/ui/optdlg/calcoptionsdlg.cxx b/sc/source/ui/optdlg/calcoptionsdlg.cxx index e056980aafdd..3c3e3f73c95c 100644 --- a/sc/source/ui/optdlg/calcoptionsdlg.cxx +++ b/sc/source/ui/optdlg/calcoptionsdlg.cxx @@ -796,7 +796,7 @@ struct OpenCLTester mpDoc->SetString(ScAddress(1,1+mnTestAreas-1,0), rArea.getSummaryFormula(mpDoc, mnTestAreas)); mpDoc->SetString(ScAddress(1,0,0), - OUString("=IF(SUM(") + + "=IF(SUM(" + ScRange(ScAddress(1,1,0), ScAddress(1,1+mnTestAreas-1,0)).Format(SCA_VALID|SCA_VALID_COL|SCA_VALID_ROW) + ")=0,\"PASS\",\"FAIL\")"); @@ -866,7 +866,7 @@ struct UnOp : Op pDoc->SetValue(ScAddress(0,1+nRow,nTab), nArg); pDoc->SetString(ScAddress(1,1+nRow,nTab), - OUString("=") + msOp + "(" + ScAddress(0,1+nRow,nTab).Format(SCA_VALID_COL|SCA_VALID_ROW) + ")"); + "=" + msOp + "(" + ScAddress(0,1+nRow,nTab).Format(SCA_VALID_COL|SCA_VALID_ROW) + ")"); pDoc->SetValue(ScAddress(2,1+nRow,nTab), mpFun(nArg)); @@ -874,7 +874,7 @@ struct UnOp : Op { // relative epsilon pDoc->SetString(ScAddress(3,1+nRow,nTab), - OUString("=IF(ABS((") + ScAddress(1,1+nRow,nTab).Format(SCA_VALID_COL|SCA_VALID_ROW) + + "=IF(ABS((" + ScAddress(1,1+nRow,nTab).Format(SCA_VALID_COL|SCA_VALID_ROW) + "-" + ScAddress(2,1+nRow,nTab).Format(SCA_VALID_COL|SCA_VALID_ROW) + ")/" + ScAddress(2,1+nRow,nTab).Format(SCA_VALID_COL|SCA_VALID_ROW) + ")<=" + OUString::number(-mnEpsilon) + @@ -884,7 +884,7 @@ struct UnOp : Op { // absolute epsilon pDoc->SetString(ScAddress(3,1+nRow,nTab), - OUString("=IF(ABS(") + ScAddress(1,1+nRow,nTab).Format(SCA_VALID_COL|SCA_VALID_ROW) + + "=IF(ABS(" + ScAddress(1,1+nRow,nTab).Format(SCA_VALID_COL|SCA_VALID_ROW) + "-" + ScAddress(2,1+nRow,nTab).Format(SCA_VALID_COL|SCA_VALID_ROW) + ")<=" + OUString::number(mnEpsilon) + ",0,1)"); @@ -893,7 +893,7 @@ struct UnOp : Op virtual OUString getSummaryFormula(ScDocument *pDoc, int nTab) const SAL_OVERRIDE { - return OUString("=SUM(") + + return "=SUM(" + ScRange(ScAddress(3,1,nTab), ScAddress(3,1+mnRows-1,nTab)).Format(SCA_VALID|SCA_TAB_3D|SCA_VALID_COL|SCA_VALID_ROW|SCA_VALID_TAB, pDoc) + ")"; @@ -925,7 +925,7 @@ struct BinOp : Op { pDoc->SetString(ScAddress(0,0,nTab), "lhs"); pDoc->SetString(ScAddress(1,0,nTab), "rhs"); - pDoc->SetString(ScAddress(2,0,nTab), OUString("lhs") + msOp + "rhs"); + pDoc->SetString(ScAddress(2,0,nTab), "lhs" + msOp + "rhs"); pDoc->SetString(ScAddress(3,0,nTab), "expected"); } @@ -942,13 +942,13 @@ struct BinOp : Op pDoc->SetValue(ScAddress(1,1+nRow,nTab), nRhs); pDoc->SetString(ScAddress(2,1+nRow,nTab), - OUString("=") + ScAddress(0,1+nRow,nTab).Format(SCA_VALID_COL|SCA_VALID_ROW) + + "=" + ScAddress(0,1+nRow,nTab).Format(SCA_VALID_COL|SCA_VALID_ROW) + msOp + ScAddress(1,1+nRow,nTab).Format(SCA_VALID_COL|SCA_VALID_ROW)); pDoc->SetValue(ScAddress(3,1+nRow,nTab), mpFun(nLhs, nRhs)); pDoc->SetString(ScAddress(4,1+nRow,nTab), - OUString("=IF(ABS(") + ScAddress(2,1+nRow,nTab).Format(SCA_VALID_COL|SCA_VALID_ROW) + + "=IF(ABS(" + ScAddress(2,1+nRow,nTab).Format(SCA_VALID_COL|SCA_VALID_ROW) + "-" + ScAddress(3,1+nRow,nTab).Format(SCA_VALID_COL|SCA_VALID_ROW) + ")<=" + OUString::number(mnEpsilon) + ",0,1)"); @@ -956,7 +956,7 @@ struct BinOp : Op virtual OUString getSummaryFormula(ScDocument *pDoc, int nTab) const SAL_OVERRIDE { - return OUString("=SUM(") + + return "=SUM(" + ScRange(ScAddress(4,1,nTab), ScAddress(4,1+mnRows-1,nTab)).Format(SCA_VALID|SCA_TAB_3D|SCA_VALID_COL|SCA_VALID_ROW|SCA_VALID_TAB, pDoc) + ")"; @@ -1010,7 +1010,7 @@ struct Reduction : Op if (nRow >= mnNum-1) { pDoc->SetString(ScAddress(1,1+nRow-mnNum+1,nTab), - OUString("=") + msOp + "(" + + "=" + msOp + "(" + ScRange(ScAddress(0,1+nRow-mnNum+1,nTab), ScAddress(0,1+nRow,nTab)).Format(SCA_VALID|SCA_TAB_3D|SCA_VALID_COL|SCA_VALID_ROW) + ")"); @@ -1023,13 +1023,13 @@ struct Reduction : Op if (mnEpsilon != 0) pDoc->SetString(ScAddress(3,1+nRow-mnNum+1,nTab), - OUString("=IF(ABS(") + ScAddress(1,1+nRow-mnNum+1,nTab).Format(SCA_VALID_COL|SCA_VALID_ROW) + + "=IF(ABS(" + ScAddress(1,1+nRow-mnNum+1,nTab).Format(SCA_VALID_COL|SCA_VALID_ROW) + "-" + ScAddress(2,1+nRow-mnNum+1,nTab).Format(SCA_VALID_COL|SCA_VALID_ROW) + ")<=" + OUString::number(mnEpsilon) + ",0,1)"); else pDoc->SetString(ScAddress(3,1+nRow-mnNum+1,nTab), - OUString("=IF(") + ScAddress(1,1+nRow-mnNum+1,nTab).Format(SCA_VALID_COL|SCA_VALID_ROW) + + "=IF(" + ScAddress(1,1+nRow-mnNum+1,nTab).Format(SCA_VALID_COL|SCA_VALID_ROW) + "=" + ScAddress(2,1+nRow-mnNum+1,nTab).Format(SCA_VALID_COL|SCA_VALID_ROW) + ",0,1)"); } @@ -1037,7 +1037,7 @@ struct Reduction : Op virtual OUString getSummaryFormula(ScDocument *pDoc, int nTab) const SAL_OVERRIDE { - return OUString("=SUM(") + + return "=SUM(" + ScRange(ScAddress(3,1+0,nTab), ScAddress(3,1+mnRows-mnNum-1,nTab)).Format(SCA_VALID|SCA_TAB_3D|SCA_VALID_COL|SCA_VALID_ROW|SCA_VALID_TAB, pDoc) + ")"; diff --git a/sc/source/ui/optdlg/tpusrlst.cxx b/sc/source/ui/optdlg/tpusrlst.cxx index d972f94857b8..57fc148b0e2e 100644 --- a/sc/source/ui/optdlg/tpusrlst.cxx +++ b/sc/source/ui/optdlg/tpusrlst.cxx @@ -297,7 +297,7 @@ void ScTpUserLists::MakeListStr( OUString& rListStr ) aStr = comphelper::string::strip(aStr, cDelimiter); sal_Int32 nLen = aStr.getLength(); - rListStr = ""; + rListStr.clear(); // Alle Doppelten cDelimiter entfernen: sal_Int32 c = 0; @@ -377,7 +377,7 @@ void ScTpUserLists::CopyListFromArea( const ScRefAddress& rStartPos, } if ( !aStrList.isEmpty() ) AddNewList( aStrList ); - aStrList = ""; + aStrList.clear(); } } else @@ -401,7 +401,7 @@ void ScTpUserLists::CopyListFromArea( const ScRefAddress& rStartPos, } if ( !aStrList.isEmpty() ) AddNewList( aStrList ); - aStrList = ""; + aStrList.clear(); } } diff --git a/sc/source/ui/pagedlg/areasdlg.cxx b/sc/source/ui/pagedlg/areasdlg.cxx index 637647b9543b..3bfa3e67a92d 100644 --- a/sc/source/ui/pagedlg/areasdlg.cxx +++ b/sc/source/ui/pagedlg/areasdlg.cxx @@ -255,7 +255,7 @@ void ScPrintAreasDlg::Impl_Reset() // Druckbereich - aStrRange = ""; + aStrRange.clear(); OUString aOne; const formula::FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention(); const sal_Unicode sep = ScCompiler::GetNativeSymbolChar(ocSep); @@ -753,7 +753,7 @@ static bool lcl_CheckRepeatString( const OUString& rStr, ScDocument* pDoc, bool } } - aBuf = ""; + aBuf.clear(); bEndPos = true; } else @@ -788,7 +788,7 @@ static bool lcl_CheckRepeatString( const OUString& rStr, ScDocument* pDoc, bool static void lcl_GetRepeatRangeString( const ScRange* pRange, ScDocument* pDoc, bool bIsRow, OUString& rStr ) { - rStr = ""; + rStr.clear(); if (!pRange) return; diff --git a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx index c01add14a97e..29ac19b0c4cd 100644 --- a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx +++ b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx @@ -284,7 +284,7 @@ void NumberFormatPropertyPanel::NotifyItemUpdate( if(cChar == ',') { sFormat[nStrCount] = sTmpStr; - sTmpStr = ""; + sTmpStr.clear(); nStrCount++; } else diff --git a/sc/source/ui/unoobj/afmtuno.cxx b/sc/source/ui/unoobj/afmtuno.cxx index c08a1f424a0f..7dc224f98cbc 100644 --- a/sc/source/ui/unoobj/afmtuno.cxx +++ b/sc/source/ui/unoobj/afmtuno.cxx @@ -191,7 +191,7 @@ uno::Sequence<OUString> ScAutoFormatsObj::getSupportedServiceNames_Static() { uno::Sequence<OUString> aRet(1); OUString* pArray = aRet.getArray(); - pArray[0] = OUString( SCAUTOFORMATSOBJ_SERVICE ); + pArray[0] = SCAUTOFORMATSOBJ_SERVICE; return aRet; } diff --git a/sc/source/ui/unoobj/appluno.cxx b/sc/source/ui/unoobj/appluno.cxx index bd9fadaf2504..fd7edfd739da 100644 --- a/sc/source/ui/unoobj/appluno.cxx +++ b/sc/source/ui/unoobj/appluno.cxx @@ -326,7 +326,7 @@ uno::Sequence<OUString> ScSpreadsheetSettings::getSupportedServiceNames_Static() { uno::Sequence<OUString> aRet(1); OUString* pArray = aRet.getArray(); - pArray[0] = OUString( SCSPREADSHEETSETTINGS_SERVICE ); + pArray[0] = SCSPREADSHEETSETTINGS_SERVICE; return aRet; } @@ -602,7 +602,7 @@ uno::Sequence<OUString> ScRecentFunctionsObj::getSupportedServiceNames_Static() { uno::Sequence<OUString> aRet(1); OUString* pArray = aRet.getArray(); - pArray[0] = OUString( SCRECENTFUNCTIONSOBJ_SERVICE ); + pArray[0] = SCRECENTFUNCTIONSOBJ_SERVICE; return aRet; } @@ -679,7 +679,7 @@ uno::Sequence<OUString> ScFunctionListObj::getSupportedServiceNames_Static() { uno::Sequence<OUString> aRet(1); OUString* pArray = aRet.getArray(); - pArray[0] = OUString( SCFUNCTIONLISTOBJ_SERVICE ); + pArray[0] = SCFUNCTIONLISTOBJ_SERVICE; return aRet; } @@ -691,21 +691,21 @@ static void lcl_FillSequence( uno::Sequence<beans::PropertyValue>& rSequence, co beans::PropertyValue* pArray = rSequence.getArray(); - pArray[0].Name = OUString( SC_UNONAME_ID ); + pArray[0].Name = SC_UNONAME_ID; pArray[0].Value <<= (sal_Int32) rDesc.nFIndex; - pArray[1].Name = OUString( SC_UNONAME_CATEGORY ); + pArray[1].Name = SC_UNONAME_CATEGORY; pArray[1].Value <<= (sal_Int32) rDesc.nCategory; - pArray[2].Name = OUString( SC_UNONAME_NAME ); + pArray[2].Name = SC_UNONAME_NAME; if (rDesc.pFuncName) pArray[2].Value <<= OUString( *rDesc.pFuncName ); - pArray[3].Name = OUString( SC_UNONAME_DESCRIPTION ); + pArray[3].Name = SC_UNONAME_DESCRIPTION; if (rDesc.pFuncDesc) pArray[3].Value <<= OUString( *rDesc.pFuncDesc ); - pArray[4].Name = OUString( SC_UNONAME_ARGUMENTS ); + pArray[4].Name = SC_UNONAME_ARGUMENTS; if (!rDesc.maDefArgNames.empty() && !rDesc.maDefArgDescs.empty() && rDesc.pDefArgFlags ) { sal_uInt16 nCount = rDesc.nArgCount; diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx index a2b58a87904a..d5c1e8306b6a 100644 --- a/sc/source/ui/unoobj/cellsuno.cxx +++ b/sc/source/ui/unoobj/cellsuno.cxx @@ -4743,10 +4743,10 @@ uno::Sequence<OUString> SAL_CALL ScCellRangesObj::getSupportedServiceNames() { uno::Sequence<OUString> aRet(4); OUString* pArray = aRet.getArray(); - pArray[0] = OUString( SCSHEETCELLRANGES_SERVICE ); - pArray[1] = OUString( SCCELLPROPERTIES_SERVICE ); - pArray[2] = OUString( SCCHARPROPERTIES_SERVICE ); - pArray[3] = OUString( SCPARAPROPERTIES_SERVICE ); + pArray[0] = SCSHEETCELLRANGES_SERVICE; + pArray[1] = SCCELLPROPERTIES_SERVICE; + pArray[2] = SCCHARPROPERTIES_SERVICE; + pArray[3] = SCPARAPROPERTIES_SERVICE; return aRet; } @@ -6024,11 +6024,11 @@ uno::Sequence<OUString> SAL_CALL ScCellRangeObj::getSupportedServiceNames() { uno::Sequence<OUString> aRet(5); OUString* pArray = aRet.getArray(); - pArray[0] = OUString( SCSHEETCELLRANGE_SERVICE ); - pArray[1] = OUString( SCCELLRANGE_SERVICE ); - pArray[2] = OUString( SCCELLPROPERTIES_SERVICE ); - pArray[3] = OUString( SCCHARPROPERTIES_SERVICE ); - pArray[4] = OUString( SCPARAPROPERTIES_SERVICE ); + pArray[0] = SCSHEETCELLRANGE_SERVICE; + pArray[1] = SCCELLRANGE_SERVICE; + pArray[2] = SCCELLPROPERTIES_SERVICE; + pArray[3] = SCCHARPROPERTIES_SERVICE; + pArray[4] = SCPARAPROPERTIES_SERVICE; return aRet; } @@ -6716,13 +6716,13 @@ uno::Sequence<OUString> SAL_CALL ScCellObj::getSupportedServiceNames() { uno::Sequence<OUString> aRet(7); OUString* pArray = aRet.getArray(); - pArray[0] = OUString( SCSHEETCELL_SERVICE ); - pArray[1] = OUString( SCCELL_SERVICE ); - pArray[2] = OUString( SCCELLPROPERTIES_SERVICE ); - pArray[3] = OUString( SCCHARPROPERTIES_SERVICE ); - pArray[4] = OUString( SCPARAPROPERTIES_SERVICE ); - pArray[5] = OUString( SCSHEETCELLRANGE_SERVICE ); - pArray[6] = OUString( SCCELLRANGE_SERVICE ); + pArray[0] = SCSHEETCELL_SERVICE; + pArray[1] = SCCELL_SERVICE; + pArray[2] = SCCELLPROPERTIES_SERVICE; + pArray[3] = SCCHARPROPERTIES_SERVICE; + pArray[4] = SCPARAPROPERTIES_SERVICE; + pArray[5] = SCSHEETCELLRANGE_SERVICE; + pArray[6] = SCCELLRANGE_SERVICE; return aRet; } @@ -8611,13 +8611,13 @@ uno::Sequence<OUString> SAL_CALL ScTableSheetObj::getSupportedServiceNames() { uno::Sequence<OUString> aRet(7); OUString* pArray = aRet.getArray(); - pArray[0] = OUString( SCSPREADSHEET_SERVICE ); - pArray[1] = OUString( SCSHEETCELLRANGE_SERVICE ); - pArray[2] = OUString( SCCELLRANGE_SERVICE ); - pArray[3] = OUString( SCCELLPROPERTIES_SERVICE ); - pArray[4] = OUString( SCCHARPROPERTIES_SERVICE ); - pArray[5] = OUString( SCPARAPROPERTIES_SERVICE ); - pArray[6] = OUString( SCLINKTARGET_SERVICE ); + pArray[0] = SCSPREADSHEET_SERVICE; + pArray[1] = SCSHEETCELLRANGE_SERVICE; + pArray[2] = SCCELLRANGE_SERVICE; + pArray[3] = SCCELLPROPERTIES_SERVICE; + pArray[4] = SCCHARPROPERTIES_SERVICE; + pArray[5] = SCPARAPROPERTIES_SERVICE; + pArray[6] = SCLINKTARGET_SERVICE; return aRet; } diff --git a/sc/source/ui/unoobj/cursuno.cxx b/sc/source/ui/unoobj/cursuno.cxx index 3031a13f4136..285042f76ff3 100644 --- a/sc/source/ui/unoobj/cursuno.cxx +++ b/sc/source/ui/unoobj/cursuno.cxx @@ -471,8 +471,8 @@ uno::Sequence<OUString> SAL_CALL ScCellCursorObj::getSupportedServiceNames() // SheetCellCursor should be first (?) uno::Sequence<OUString> aTotalSeq( nParentLen + 2 ); OUString* pTotalArr = aTotalSeq.getArray(); - pTotalArr[0] = OUString( SCSHEETCELLCURSOR_SERVICE ); - pTotalArr[1] = OUString( SCCELLCURSOR_SERVICE ); + pTotalArr[0] = SCSHEETCELLCURSOR_SERVICE; + pTotalArr[1] = SCCELLCURSOR_SERVICE; // append cell range services for (long i=0; i<nParentLen; i++) diff --git a/sc/source/ui/unoobj/dapiuno.cxx b/sc/source/ui/unoobj/dapiuno.cxx index 3ccacbb06b3d..5dba25001b4f 100644 --- a/sc/source/ui/unoobj/dapiuno.cxx +++ b/sc/source/ui/unoobj/dapiuno.cxx @@ -980,13 +980,13 @@ Any SAL_CALL ScDataPilotDescriptorBase::getPropertyValue( const OUString& aPrope { uno::Sequence<beans::PropertyValue> aSeq( 4 ); beans::PropertyValue* pArray = aSeq.getArray(); - pArray[0].Name = OUString( SC_UNO_DP_SOURCENAME ); + pArray[0].Name = SC_UNO_DP_SOURCENAME; pArray[0].Value <<= pServiceDesc->aParSource; - pArray[1].Name = OUString( SC_UNO_DP_OBJECTNAME ); + pArray[1].Name = SC_UNO_DP_OBJECTNAME; pArray[1].Value <<= pServiceDesc->aParName; - pArray[2].Name = OUString( SC_UNO_DP_USERNAME ); + pArray[2].Name = SC_UNO_DP_USERNAME; pArray[2].Value <<= pServiceDesc->aParUser; - pArray[3].Name = OUString( SC_UNO_DP_PASSWORD ); + pArray[3].Name = SC_UNO_DP_PASSWORD; pArray[3].Value <<= pServiceDesc->aParPass; aRet <<= aSeq; } @@ -1824,7 +1824,7 @@ OUString SAL_CALL ScDataPilotFieldObj::getName() if( ScDPSaveDimension* pDim = GetDPDimension() ) { if( pDim->IsDataLayout() ) - aName = OUString( SC_DATALAYOUT_NAME ); + aName = SC_DATALAYOUT_NAME; else { const OUString* pLayoutName = pDim->GetLayoutName(); diff --git a/sc/source/ui/unoobj/datauno.cxx b/sc/source/ui/unoobj/datauno.cxx index d4fb7721dfa2..4eb4dbcf5cb4 100644 --- a/sc/source/ui/unoobj/datauno.cxx +++ b/sc/source/ui/unoobj/datauno.cxx @@ -186,22 +186,22 @@ void ScImportDescriptor::FillProperties( uno::Sequence<beans::PropertyValue>& rS aDescriptor.setDataSource(rParam.aDBName); if (aDescriptor.has( svx::daDataSource )) { - pArray[0].Name = OUString( SC_UNONAME_DBNAME ); + pArray[0].Name = SC_UNONAME_DBNAME; pArray[0].Value <<= rParam.aDBName; } else if (aDescriptor.has( svx::daConnectionResource )) { - pArray[0].Name = OUString( SC_UNONAME_CONRES ); + pArray[0].Name = SC_UNONAME_CONRES; pArray[0].Value <<= rParam.aDBName; } - pArray[1].Name = OUString( SC_UNONAME_SRCTYPE ); + pArray[1].Name = SC_UNONAME_SRCTYPE; pArray[1].Value <<= eMode; - pArray[2].Name = OUString( SC_UNONAME_SRCOBJ ); + pArray[2].Name = SC_UNONAME_SRCOBJ; pArray[2].Value <<= rParam.aStatement; - pArray[3].Name = OUString( SC_UNONAME_ISNATIVE ); + pArray[3].Name = SC_UNONAME_ISNATIVE; ScUnoHelpFunctions::SetBoolInAny( pArray[3].Value, rParam.bNative ); } @@ -307,31 +307,31 @@ void ScSortDescriptor::FillProperties( uno::Sequence<beans::PropertyValue>& rSeq // Sequence fuellen - pArray[0].Name = OUString( SC_UNONAME_ISSORTCOLUMNS ); + pArray[0].Name = SC_UNONAME_ISSORTCOLUMNS; pArray[0].Value <<= !rParam.bByRow; - pArray[1].Name = OUString( SC_UNONAME_CONTHDR ); + pArray[1].Name = SC_UNONAME_CONTHDR; ScUnoHelpFunctions::SetBoolInAny( pArray[1].Value, rParam.bHasHeader ); - pArray[2].Name = OUString( SC_UNONAME_MAXFLD ); + pArray[2].Name = SC_UNONAME_MAXFLD; pArray[2].Value <<= static_cast<sal_Int32>( rParam.GetSortKeyCount() ); - pArray[3].Name = OUString( SC_UNONAME_SORTFLD ); + pArray[3].Name = SC_UNONAME_SORTFLD; pArray[3].Value <<= aFields; - pArray[4].Name = OUString( SC_UNONAME_BINDFMT ); + pArray[4].Name = SC_UNONAME_BINDFMT; ScUnoHelpFunctions::SetBoolInAny( pArray[4].Value, rParam.bIncludePattern ); - pArray[5].Name = OUString( SC_UNONAME_COPYOUT ); + pArray[5].Name = SC_UNONAME_COPYOUT; ScUnoHelpFunctions::SetBoolInAny( pArray[5].Value, !rParam.bInplace ); - pArray[6].Name = OUString( SC_UNONAME_OUTPOS ); + pArray[6].Name = SC_UNONAME_OUTPOS; pArray[6].Value <<= aOutPos; - pArray[7].Name = OUString( SC_UNONAME_ISULIST ); + pArray[7].Name = SC_UNONAME_ISULIST; ScUnoHelpFunctions::SetBoolInAny( pArray[7].Value, rParam.bUserDef ); - pArray[8].Name = OUString( SC_UNONAME_UINDEX ); + pArray[8].Name = SC_UNONAME_UINDEX; pArray[8].Value <<= static_cast<sal_Int32>( rParam.nUserIndex ); } @@ -2202,7 +2202,7 @@ uno::Sequence<OUString> SAL_CALL ScDatabaseRangeObj::getSupportedServiceNames() uno::Sequence<OUString> aRet(2); OUString* pArray = aRet.getArray(); pArray[0] = "com.sun.star.sheet.DatabaseRange"; - pArray[1] = OUString( SCLINKTARGET_SERVICE ); + pArray[1] = SCLINKTARGET_SERVICE; return aRet; } diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index 7a893984067e..6993c0473639 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -966,7 +966,7 @@ bool ScModelObj::FillRenderMarkData( const uno::Any& aSelection, if ( nPrintRange == 1 ) rPagesStr = aPageRange; else - rPagesStr = ""; + rPagesStr.clear(); return bDone; } diff --git a/sc/source/ui/unoobj/fielduno.cxx b/sc/source/ui/unoobj/fielduno.cxx index 4b43f7405a87..73e21d6f15ad 100644 --- a/sc/source/ui/unoobj/fielduno.cxx +++ b/sc/source/ui/unoobj/fielduno.cxx @@ -1340,7 +1340,7 @@ uno::Any SAL_CALL ScEditFieldObj::getPropertyValue( const OUString& aPropertyNam uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; - if (aPropertyName.equals(SC_UNONAME_TEXTFIELD_TYPE)) + if (aPropertyName == SC_UNONAME_TEXTFIELD_TYPE) return uno::makeAny(meType); if (aPropertyName == SC_UNONAME_ANCHOR) diff --git a/sc/source/ui/unoobj/filtuno.cxx b/sc/source/ui/unoobj/filtuno.cxx index a2e6cedc3f33..6ccd62971391 100644 --- a/sc/source/ui/unoobj/filtuno.cxx +++ b/sc/source/ui/unoobj/filtuno.cxx @@ -130,7 +130,7 @@ uno::Sequence<OUString> ScFilterOptionsObj::getSupportedServiceNames_Static() { uno::Sequence<OUString> aRet(1); OUString* pArray = aRet.getArray(); - pArray[0] = OUString( SCFILTEROPTIONSOBJ_SERVICE ); + pArray[0] = SCFILTEROPTIONSOBJ_SERVICE; return aRet; } @@ -141,7 +141,7 @@ uno::Sequence<beans::PropertyValue> SAL_CALL ScFilterOptionsObj::getPropertyValu uno::Sequence<beans::PropertyValue> aRet(1); beans::PropertyValue* pArray = aRet.getArray(); - pArray[0].Name = OUString( SC_UNONAME_FILTEROPTIONS ); + pArray[0].Name = SC_UNONAME_FILTEROPTIONS; pArray[0].Value <<= aFilterOptions; return aRet; diff --git a/sc/source/ui/unoobj/fmtuno.cxx b/sc/source/ui/unoobj/fmtuno.cxx index d710ed7565bc..1c61dbffd0ce 100644 --- a/sc/source/ui/unoobj/fmtuno.cxx +++ b/sc/source/ui/unoobj/fmtuno.cxx @@ -275,7 +275,7 @@ void SAL_CALL ScTableConditionalFormat::addNew( aEntry.maExpr1 = aStrVal; else if ( rProp.Value >>= aTokens ) { - aEntry.maExpr1 = ""; + aEntry.maExpr1.clear(); aEntry.maTokens1 = aTokens; } } @@ -287,7 +287,7 @@ void SAL_CALL ScTableConditionalFormat::addNew( aEntry.maExpr2 = aStrVal; else if ( rProp.Value >>= aTokens ) { - aEntry.maExpr2 = ""; + aEntry.maExpr2.clear(); aEntry.maTokens2 = aTokens; } } @@ -696,10 +696,10 @@ void ScTableValidationObj::ClearData_Impl() bShowError = false; nErrorStyle = SC_VALERR_STOP; aSrcPos.Set(0,0,0); - aExpr1 = ""; - aExpr2 = ""; - maExprNmsp1 = ""; - maExprNmsp2 = ""; + aExpr1.clear(); + aExpr2.clear(); + maExprNmsp1.clear(); + maExprNmsp2.clear(); meGrammar1 = meGrammar2 = FormulaGrammar::GRAM_UNSPECIFIED; // will be overridden when needed aInputTitle.clear(); aInputMessage.clear(); @@ -804,12 +804,12 @@ void SAL_CALL ScTableValidationObj::setTokens( sal_Int32 nIndex, const uno::Sequ if (nIndex == 0) { aTokens1 = aTokens; - aExpr1 = ""; + aExpr1.clear(); } else if (nIndex == 1) { aTokens2 = aTokens; - aExpr2 = ""; + aExpr2.clear(); } } diff --git a/sc/source/ui/unoobj/funcuno.cxx b/sc/source/ui/unoobj/funcuno.cxx index d2d3583653fc..aa13e66e227e 100644 --- a/sc/source/ui/unoobj/funcuno.cxx +++ b/sc/source/ui/unoobj/funcuno.cxx @@ -218,7 +218,7 @@ uno::Sequence<OUString> ScFunctionAccess::getSupportedServiceNames_Static() { uno::Sequence<OUString> aRet(1); OUString* pArray = aRet.getArray(); - pArray[0] = OUString( SCFUNCTIONACCESS_SERVICE ); + pArray[0] = SCFUNCTIONACCESS_SERVICE; return aRet; } @@ -239,8 +239,8 @@ uno::Sequence<OUString> SAL_CALL ScFunctionAccess::getSupportedServiceNames() { uno::Sequence<OUString> aRet(2); OUString* pArray = aRet.getArray(); - pArray[0] = OUString( SCFUNCTIONACCESS_SERVICE ); - pArray[1] = OUString( SCDOCSETTINGS_SERVICE ); + pArray[0] = SCFUNCTIONACCESS_SERVICE; + pArray[1] = SCDOCSETTINGS_SERVICE; return aRet; } diff --git a/sc/source/ui/unoobj/nameuno.cxx b/sc/source/ui/unoobj/nameuno.cxx index 6f8e648f52eb..fee650333085 100644 --- a/sc/source/ui/unoobj/nameuno.cxx +++ b/sc/source/ui/unoobj/nameuno.cxx @@ -438,8 +438,8 @@ uno::Sequence<OUString> SAL_CALL ScNamedRangeObj::getSupportedServiceNames() throw(uno::RuntimeException, std::exception) { uno::Sequence<OUString> aRet(2); - aRet[0] = OUString( SCNAMEDRANGEOBJ_SERVICE ); - aRet[1] = OUString( SCLINKTARGET_SERVICE ); + aRet[0] = SCNAMEDRANGEOBJ_SERVICE; + aRet[1] = SCLINKTARGET_SERVICE; return aRet; } diff --git a/sc/source/ui/unoobj/shapeuno.cxx b/sc/source/ui/unoobj/shapeuno.cxx index 94cdf4fc1565..f5408a0a6fe1 100644 --- a/sc/source/ui/unoobj/shapeuno.cxx +++ b/sc/source/ui/unoobj/shapeuno.cxx @@ -1357,9 +1357,9 @@ SdrObject* ScShapeObj::GetSdrObject() const throw() return NULL; } -#define SC_EVENTACC_ONCLICK OUString( "OnClick" ) -#define SC_EVENTACC_SCRIPT OUString( "Script" ) -#define SC_EVENTACC_EVENTTYPE OUString( "EventType" ) +#define SC_EVENTACC_ONCLICK "OnClick" +#define SC_EVENTACC_SCRIPT "Script" +#define SC_EVENTACC_EVENTTYPE "EventType" typedef ::cppu::WeakImplHelper1< container::XNameReplace > ShapeUnoEventAcess_BASE; class ShapeUnoEventAccessImpl : public ShapeUnoEventAcess_BASE @@ -1393,7 +1393,7 @@ public: bool isEventType = false; for( nIndex = 0; nIndex < nCount; nIndex++, pProperties++ ) { - if ( pProperties->Name.equals( SC_EVENTACC_EVENTTYPE ) ) + if ( pProperties->Name == SC_EVENTACC_EVENTTYPE ) { isEventType = true; continue; @@ -1430,7 +1430,7 @@ public: { aProperties.realloc( 2 ); aProperties[ 0 ].Name = SC_EVENTACC_EVENTTYPE; - aProperties[ 0 ].Value <<= SC_EVENTACC_SCRIPT; + aProperties[ 0 ].Value <<= OUString(SC_EVENTACC_SCRIPT); aProperties[ 1 ].Name = SC_EVENTACC_SCRIPT; aProperties[ 1 ].Value <<= pInfo->GetMacro(); } diff --git a/sc/source/ui/unoobj/srchuno.cxx b/sc/source/ui/unoobj/srchuno.cxx index c98b1bb80f2b..c0ad6a198b47 100644 --- a/sc/source/ui/unoobj/srchuno.cxx +++ b/sc/source/ui/unoobj/srchuno.cxx @@ -202,8 +202,8 @@ uno::Sequence<OUString> SAL_CALL ScCellSearchObj::getSupportedServiceNames() { uno::Sequence<OUString> aRet(2); OUString* pArray = aRet.getArray(); - pArray[0] = OUString( SCSEARCHDESCRIPTOR_SERVICE ); - pArray[1] = OUString( SCREPLACEDESCRIPTOR_SERVICE ); + pArray[0] = SCSEARCHDESCRIPTOR_SERVICE; + pArray[1] = SCREPLACEDESCRIPTOR_SERVICE; return aRet; } diff --git a/sc/source/ui/unoobj/styleuno.cxx b/sc/source/ui/unoobj/styleuno.cxx index 29c9ad616162..421658bb71ef 100644 --- a/sc/source/ui/unoobj/styleuno.cxx +++ b/sc/source/ui/unoobj/styleuno.cxx @@ -510,8 +510,8 @@ uno::Sequence<OUString> SAL_CALL ScStyleFamiliesObj::getElementNames() SolarMutexGuard aGuard; uno::Sequence<OUString> aNames(SC_STYLE_FAMILY_COUNT); OUString* pNames = aNames.getArray(); - pNames[0] = OUString(SC_FAMILYNAME_CELL ); - pNames[1] = OUString(SC_FAMILYNAME_PAGE ); + pNames[0] = SC_FAMILYNAME_CELL; + pNames[1] = SC_FAMILYNAME_PAGE; return aNames; } @@ -549,13 +549,13 @@ uno::Sequence<beans::PropertyValue> SAL_CALL ScStyleFamiliesObj::getStyleLoaderO uno::Sequence<beans::PropertyValue> aSequence(3); beans::PropertyValue* pArray = aSequence.getArray(); - pArray[0].Name = OUString(SC_UNONAME_OVERWSTL ); + pArray[0].Name = SC_UNONAME_OVERWSTL; ScUnoHelpFunctions::SetBoolInAny( pArray[0].Value, true ); - pArray[1].Name = OUString(SC_UNONAME_LOADCELL ); + pArray[1].Name = SC_UNONAME_LOADCELL; ScUnoHelpFunctions::SetBoolInAny( pArray[1].Value, true ); - pArray[2].Name = OUString(SC_UNONAME_LOADPAGE ); + pArray[2].Name = SC_UNONAME_LOADPAGE; ScUnoHelpFunctions::SetBoolInAny( pArray[2].Value, true ); return aSequence; @@ -1936,7 +1936,7 @@ uno::Any SAL_CALL ScStyleObj::getPropertyValue( const OUString& aPropertyName ) sal_uInt8 nValue = static_cast<const SvxPaperBinItem&>(pItemSet->Get(nWhich)).GetValue(); OUString aName; if ( nValue == PAPERBIN_PRINTER_SETTINGS ) - aName = OUString(SC_PAPERBIN_DEFAULTNAME ); + aName = SC_PAPERBIN_DEFAULTNAME; else { Printer* pPrinter = pDocShell->GetPrinter(); @@ -2027,7 +2027,7 @@ uno::Sequence<OUString> SAL_CALL ScStyleObj::getSupportedServiceNames() bool bPage = ( eFamily == SFX_STYLE_FAMILY_PAGE ); uno::Sequence<OUString> aRet(2); OUString* pArray = aRet.getArray(); - pArray[0] = OUString(SCSTYLE_SERVICE ); + pArray[0] = SCSTYLE_SERVICE; pArray[1] = bPage ? OUString(SCPAGESTYLE_SERVICE) : OUString(SCCELLSTYLE_SERVICE); return aRet; diff --git a/sc/source/ui/unoobj/viewuno.cxx b/sc/source/ui/unoobj/viewuno.cxx index df47c4f15ce7..b4c925bf5f51 100644 --- a/sc/source/ui/unoobj/viewuno.cxx +++ b/sc/source/ui/unoobj/viewuno.cxx @@ -2203,8 +2203,8 @@ uno::Sequence<OUString> SAL_CALL ScTabViewObj::getSupportedServiceNames() { uno::Sequence<OUString> aRet(2); OUString* pArray = aRet.getArray(); - pArray[0] = OUString( SCTABVIEWOBJ_SERVICE ); - pArray[1] = OUString( SCVIEWSETTINGS_SERVICE ); + pArray[0] = SCTABVIEWOBJ_SERVICE; + pArray[1] = SCVIEWSETTINGS_SERVICE; return aRet; } diff --git a/sc/source/ui/vba/vbaapplication.cxx b/sc/source/ui/vba/vbaapplication.cxx index 3e2aa7e0f30a..31d2b20a20df 100644 --- a/sc/source/ui/vba/vbaapplication.cxx +++ b/sc/source/ui/vba/vbaapplication.cxx @@ -290,7 +290,7 @@ ScVbaApplication::getSelection() throw (uno::RuntimeException, std::exception) } else { - throw uno::RuntimeException( sImplementationName + OUString(" not supported" ) ); + throw uno::RuntimeException( sImplementationName + " not supported" ); } } diff --git a/sc/source/ui/vba/vbainterior.cxx b/sc/source/ui/vba/vbainterior.cxx index fa839cc57890..1d0d322b6368 100644 --- a/sc/source/ui/vba/vbainterior.cxx +++ b/sc/source/ui/vba/vbainterior.cxx @@ -265,7 +265,7 @@ uno::Any ScVbaInterior::SetAttributeData( sal_Int32 nValue ) { xml::AttributeData aAttributeData; - aAttributeData.Type = OUString( "sal_Int32" ); + aAttributeData.Type = "sal_Int32"; aAttributeData.Value = OUString::number( nValue ); return uno::makeAny( aAttributeData ); } diff --git a/sc/source/ui/vba/vbastyles.cxx b/sc/source/ui/vba/vbastyles.cxx index 99953ee2db47..35eb24852e51 100644 --- a/sc/source/ui/vba/vbastyles.cxx +++ b/sc/source/ui/vba/vbastyles.cxx @@ -151,7 +151,7 @@ ScVbaStyles::Add( const OUString& _sName, const uno::Any& _aBasedOn ) throw (scr { mxNameContainerCellStyles->insertByName(_sName, uno::makeAny( xStyle) ); } - if (!sParentCellStyleName.equals("Default")) + if (sParentCellStyleName != "Default") { xStyle->setParentStyle( sParentCellStyleName ); } diff --git a/sc/source/ui/vba/vbatitle.hxx b/sc/source/ui/vba/vbatitle.hxx index 650540b26db7..06767bb89d88 100644 --- a/sc/source/ui/vba/vbatitle.hxx +++ b/sc/source/ui/vba/vbatitle.hxx @@ -146,7 +146,7 @@ public: if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = OUString("ooo.vba.excel.XTitle" ); + aServiceNames[ 0 ] = "ooo.vba.excel.XTitle"; } return aServiceNames; } diff --git a/sc/source/ui/vba/vbawindow.cxx b/sc/source/ui/vba/vbawindow.cxx index 13226103cdcc..53942a7c5746 100644 --- a/sc/source/ui/vba/vbawindow.cxx +++ b/sc/source/ui/vba/vbawindow.cxx @@ -752,7 +752,7 @@ ScVbaWindow::getZoom() throw (uno::RuntimeException, std::exception) } else if( nZoomType == view::DocumentZoomType::BY_VALUE ) { - sName = OUString( SC_UNO_ZOOMVALUE); + sName = SC_UNO_ZOOMVALUE; sal_Int16 nZoom = 100; xProps->getPropertyValue( sName ) >>= nZoom; return uno::makeAny( nZoom ); diff --git a/sc/source/ui/vba/vbaworkbooks.cxx b/sc/source/ui/vba/vbaworkbooks.cxx index 1446bea2a8d8..ba030a688fab 100644 --- a/sc/source/ui/vba/vbaworkbooks.cxx +++ b/sc/source/ui/vba/vbaworkbooks.cxx @@ -178,7 +178,7 @@ ScVbaWorkbooks::isTextFile( const OUString& sType ) // b) a csv file // c) unknown // returning true basically means treat this like a csv file - return sType.equals( "generic_Text" ) || sType.isEmpty(); + return sType == "generic_Text" || sType.isEmpty(); } bool diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx index 872cc5815ecd..82e6ca0bb4fc 100644 --- a/sc/source/ui/view/formatsh.cxx +++ b/sc/source/ui/view/formatsh.cxx @@ -1145,7 +1145,7 @@ void ScFormatShell::ExecuteNumFormat( SfxRequest& rReq ) if(cChar == ',') { sFormat[nStrCount] = sTmpStr; - sTmpStr = ""; + sTmpStr.clear(); nStrCount++; } else diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx index d9a6f52a2744..462c534d5467 100644 --- a/sc/source/ui/view/prevwsh.cxx +++ b/sc/source/ui/view/prevwsh.cxx @@ -949,12 +949,12 @@ void ScPreviewShell::WriteUserDataSequence(uno::Sequence < beans::PropertyValue if(pSeq) { sal_uInt16 nViewID(GetViewFrame()->GetCurViewId()); - pSeq[0].Name = OUString(SC_VIEWID); + pSeq[0].Name = SC_VIEWID; OUStringBuffer sBuffer(SC_VIEW); ::sax::Converter::convertNumber(sBuffer, static_cast<sal_Int32>(nViewID)); pSeq[0].Value <<= sBuffer.makeStringAndClear(); - pSeq[1].Name = OUString(SC_ZOOMVALUE); + pSeq[1].Name = SC_ZOOMVALUE; pSeq[1].Value <<= sal_Int32 (pPreview->GetZoom()); pSeq[2].Name = "PageNumber"; pSeq[2].Value <<= pPreview->GetPageNo(); diff --git a/sc/source/ui/view/tabvwsh2.cxx b/sc/source/ui/view/tabvwsh2.cxx index 0672e97f21ae..b8645bfd7e5c 100644 --- a/sc/source/ui/view/tabvwsh2.cxx +++ b/sc/source/ui/view/tabvwsh2.cxx @@ -218,7 +218,7 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq) } nDrawSfxId = nNewId; - sDrawCustom = ""; // value is set below for custom shapes + sDrawCustom.clear(); // value is set below for custom shapes if ( nNewId != SID_DRAW_CHART ) // Chart nicht mit DrawShell { diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx index 7eb45c7056cf..b5950a0b8685 100644 --- a/sc/source/ui/view/viewdata.cxx +++ b/sc/source/ui/view/viewdata.cxx @@ -115,45 +115,45 @@ void ScViewDataTable::WriteUserDataSequence(uno::Sequence <beans::PropertyValue> beans::PropertyValue* pSettings = rSettings.getArray(); if (pSettings) { - pSettings[SC_CURSOR_X].Name = OUString(SC_CURSORPOSITIONX); + pSettings[SC_CURSOR_X].Name = SC_CURSORPOSITIONX; pSettings[SC_CURSOR_X].Value <<= sal_Int32(nCurX); - pSettings[SC_CURSOR_Y].Name = OUString(SC_CURSORPOSITIONY); + pSettings[SC_CURSOR_Y].Name = SC_CURSORPOSITIONY; pSettings[SC_CURSOR_Y].Value <<= sal_Int32(nCurY); - pSettings[SC_HORIZONTAL_SPLIT_MODE].Name = OUString(SC_HORIZONTALSPLITMODE); + pSettings[SC_HORIZONTAL_SPLIT_MODE].Name = SC_HORIZONTALSPLITMODE; pSettings[SC_HORIZONTAL_SPLIT_MODE].Value <<= sal_Int16(eHSplitMode); - pSettings[SC_VERTICAL_SPLIT_MODE].Name = OUString(SC_VERTICALSPLITMODE); + pSettings[SC_VERTICAL_SPLIT_MODE].Name = SC_VERTICALSPLITMODE; pSettings[SC_VERTICAL_SPLIT_MODE].Value <<= sal_Int16(eVSplitMode); - pSettings[SC_HORIZONTAL_SPLIT_POSITION].Name = OUString(SC_HORIZONTALSPLITPOSITION); + pSettings[SC_HORIZONTAL_SPLIT_POSITION].Name = SC_HORIZONTALSPLITPOSITION; if (eHSplitMode == SC_SPLIT_FIX) pSettings[SC_HORIZONTAL_SPLIT_POSITION].Value <<= sal_Int32(nFixPosX); else pSettings[SC_HORIZONTAL_SPLIT_POSITION].Value <<= sal_Int32(nHSplitPos); - pSettings[SC_VERTICAL_SPLIT_POSITION].Name = OUString(SC_VERTICALSPLITPOSITION); + pSettings[SC_VERTICAL_SPLIT_POSITION].Name = SC_VERTICALSPLITPOSITION; if (eVSplitMode == SC_SPLIT_FIX) pSettings[SC_VERTICAL_SPLIT_POSITION].Value <<= sal_Int32(nFixPosY); else pSettings[SC_VERTICAL_SPLIT_POSITION].Value <<= sal_Int32(nVSplitPos); - pSettings[SC_ACTIVE_SPLIT_RANGE].Name = OUString(SC_ACTIVESPLITRANGE); + pSettings[SC_ACTIVE_SPLIT_RANGE].Name = SC_ACTIVESPLITRANGE; pSettings[SC_ACTIVE_SPLIT_RANGE].Value <<= sal_Int16(eWhichActive); - pSettings[SC_POSITION_LEFT].Name = OUString(SC_POSITIONLEFT); + pSettings[SC_POSITION_LEFT].Name = SC_POSITIONLEFT; pSettings[SC_POSITION_LEFT].Value <<= sal_Int32(nPosX[SC_SPLIT_LEFT]); - pSettings[SC_POSITION_RIGHT].Name = OUString(SC_POSITIONRIGHT); + pSettings[SC_POSITION_RIGHT].Name = SC_POSITIONRIGHT; pSettings[SC_POSITION_RIGHT].Value <<= sal_Int32(nPosX[SC_SPLIT_RIGHT]); - pSettings[SC_POSITION_TOP].Name = OUString(SC_POSITIONTOP); + pSettings[SC_POSITION_TOP].Name = SC_POSITIONTOP; pSettings[SC_POSITION_TOP].Value <<= sal_Int32(nPosY[SC_SPLIT_TOP]); - pSettings[SC_POSITION_BOTTOM].Name = OUString(SC_POSITIONBOTTOM); + pSettings[SC_POSITION_BOTTOM].Name = SC_POSITIONBOTTOM; pSettings[SC_POSITION_BOTTOM].Value <<= sal_Int32(nPosY[SC_SPLIT_BOTTOM]); sal_Int32 nZoomValue ((aZoomY.GetNumerator() * 100) / aZoomY.GetDenominator()); sal_Int32 nPageZoomValue ((aPageZoomY.GetNumerator() * 100) / aPageZoomY.GetDenominator()); - pSettings[SC_TABLE_ZOOM_TYPE].Name = OUString(SC_ZOOMTYPE); + pSettings[SC_TABLE_ZOOM_TYPE].Name = SC_ZOOMTYPE; pSettings[SC_TABLE_ZOOM_TYPE].Value <<= sal_Int16(eZoomType); - pSettings[SC_TABLE_ZOOM_VALUE].Name = OUString(SC_ZOOMVALUE); + pSettings[SC_TABLE_ZOOM_VALUE].Name = SC_ZOOMVALUE; pSettings[SC_TABLE_ZOOM_VALUE].Value <<= nZoomValue; - pSettings[SC_TABLE_PAGE_VIEW_ZOOM_VALUE].Name = OUString(SC_PAGEVIEWZOOMVALUE); + pSettings[SC_TABLE_PAGE_VIEW_ZOOM_VALUE].Name = SC_PAGEVIEWZOOMVALUE; pSettings[SC_TABLE_PAGE_VIEW_ZOOM_VALUE].Value <<= nPageZoomValue; - pSettings[SC_TABLE_SHOWGRID].Name = OUString(SC_UNO_SHOWGRID); + pSettings[SC_TABLE_SHOWGRID].Name = SC_UNO_SHOWGRID; pSettings[SC_TABLE_SHOWGRID].Value <<= bShowGrid; } } @@ -2629,7 +2629,7 @@ void ScViewData::WriteUserDataSequence(uno::Sequence <beans::PropertyValue>& rSe if (pSettings) { sal_uInt16 nViewID(pViewShell->GetViewFrame()->GetCurViewId()); - pSettings[SC_VIEW_ID].Name = OUString(SC_VIEWID); + pSettings[SC_VIEW_ID].Name = SC_VIEWID; OUStringBuffer sBuffer(SC_VIEW); ::sax::Converter::convertNumber(sBuffer, static_cast<sal_Int32>(nViewID)); @@ -2662,61 +2662,61 @@ void ScViewData::WriteUserDataSequence(uno::Sequence <beans::PropertyValue>& rSe } } } - pSettings[SC_TABLE_VIEWSETTINGS].Name = OUString(SC_TABLES); + pSettings[SC_TABLE_VIEWSETTINGS].Name = SC_TABLES; pSettings[SC_TABLE_VIEWSETTINGS].Value <<= xNameContainer; OUString sName; GetDocument()->GetName( nTabNo, sName ); - pSettings[SC_ACTIVE_TABLE].Name = OUString(SC_ACTIVETABLE); + pSettings[SC_ACTIVE_TABLE].Name = SC_ACTIVETABLE; pSettings[SC_ACTIVE_TABLE].Value <<= sName; - pSettings[SC_HORIZONTAL_SCROLL_BAR_WIDTH].Name = OUString(SC_HORIZONTALSCROLLBARWIDTH); + pSettings[SC_HORIZONTAL_SCROLL_BAR_WIDTH].Name = SC_HORIZONTALSCROLLBARWIDTH; pSettings[SC_HORIZONTAL_SCROLL_BAR_WIDTH].Value <<= sal_Int32(pView->GetTabBarWidth()); sal_Int32 nZoomValue ((pThisTab->aZoomY.GetNumerator() * 100) / pThisTab->aZoomY.GetDenominator()); sal_Int32 nPageZoomValue ((pThisTab->aPageZoomY.GetNumerator() * 100) / pThisTab->aPageZoomY.GetDenominator()); - pSettings[SC_ZOOM_TYPE].Name = OUString(SC_ZOOMTYPE); + pSettings[SC_ZOOM_TYPE].Name = SC_ZOOMTYPE; pSettings[SC_ZOOM_TYPE].Value <<= sal_Int16(pThisTab->eZoomType); - pSettings[SC_ZOOM_VALUE].Name = OUString(SC_ZOOMVALUE); + pSettings[SC_ZOOM_VALUE].Name = SC_ZOOMVALUE; pSettings[SC_ZOOM_VALUE].Value <<= nZoomValue; - pSettings[SC_PAGE_VIEW_ZOOM_VALUE].Name = OUString(SC_PAGEVIEWZOOMVALUE); + pSettings[SC_PAGE_VIEW_ZOOM_VALUE].Name = SC_PAGEVIEWZOOMVALUE; pSettings[SC_PAGE_VIEW_ZOOM_VALUE].Value <<= nPageZoomValue; - pSettings[SC_PAGE_BREAK_PREVIEW].Name = OUString(SC_SHOWPAGEBREAKPREVIEW); + pSettings[SC_PAGE_BREAK_PREVIEW].Name = SC_SHOWPAGEBREAKPREVIEW; ScUnoHelpFunctions::SetBoolInAny( pSettings[SC_PAGE_BREAK_PREVIEW].Value, bPagebreak); if (pOptions) { - pSettings[SC_SHOWZERO].Name = OUString(SC_UNO_SHOWZERO); + pSettings[SC_SHOWZERO].Name = SC_UNO_SHOWZERO; ScUnoHelpFunctions::SetBoolInAny( pSettings[SC_SHOWZERO].Value, pOptions->GetOption( VOPT_NULLVALS ) ); - pSettings[SC_SHOWNOTES].Name = OUString(SC_UNO_SHOWNOTES); + pSettings[SC_SHOWNOTES].Name = SC_UNO_SHOWNOTES; ScUnoHelpFunctions::SetBoolInAny( pSettings[SC_SHOWNOTES].Value, pOptions->GetOption( VOPT_NOTES ) ); - pSettings[SC_SHOWGRID].Name = OUString(SC_UNO_SHOWGRID); + pSettings[SC_SHOWGRID].Name = SC_UNO_SHOWGRID; ScUnoHelpFunctions::SetBoolInAny( pSettings[SC_SHOWGRID].Value, pOptions->GetOption( VOPT_GRID ) ); - pSettings[SC_GRIDCOLOR].Name = OUString(SC_UNO_GRIDCOLOR); + pSettings[SC_GRIDCOLOR].Name = SC_UNO_GRIDCOLOR; OUString aColorName; Color aColor = pOptions->GetGridColor(&aColorName); pSettings[SC_GRIDCOLOR].Value <<= static_cast<sal_Int64>(aColor.GetColor()); - pSettings[SC_SHOWPAGEBR].Name = OUString(SC_UNO_SHOWPAGEBR); + pSettings[SC_SHOWPAGEBR].Name = SC_UNO_SHOWPAGEBR; ScUnoHelpFunctions::SetBoolInAny( pSettings[SC_SHOWPAGEBR].Value, pOptions->GetOption( VOPT_PAGEBREAKS ) ); - pSettings[SC_COLROWHDR].Name = OUString(SC_UNO_COLROWHDR); + pSettings[SC_COLROWHDR].Name = SC_UNO_COLROWHDR; ScUnoHelpFunctions::SetBoolInAny( pSettings[SC_COLROWHDR].Value, pOptions->GetOption( VOPT_HEADER ) ); - pSettings[SC_SHEETTABS].Name = OUString(SC_UNO_SHEETTABS); + pSettings[SC_SHEETTABS].Name = SC_UNO_SHEETTABS; ScUnoHelpFunctions::SetBoolInAny( pSettings[SC_SHEETTABS].Value, pOptions->GetOption( VOPT_TABCONTROLS ) ); - pSettings[SC_OUTLSYMB].Name = OUString(SC_UNO_OUTLSYMB); + pSettings[SC_OUTLSYMB].Name = SC_UNO_OUTLSYMB; ScUnoHelpFunctions::SetBoolInAny( pSettings[SC_OUTLSYMB].Value, pOptions->GetOption( VOPT_OUTLINER ) ); const ScGridOptions& aGridOpt = pOptions->GetGridOptions(); - pSettings[SC_SNAPTORASTER].Name = OUString(SC_UNO_SNAPTORASTER); + pSettings[SC_SNAPTORASTER].Name = SC_UNO_SNAPTORASTER; ScUnoHelpFunctions::SetBoolInAny( pSettings[SC_SNAPTORASTER].Value, aGridOpt.GetUseGridSnap() ); - pSettings[SC_RASTERVIS].Name = OUString(SC_UNO_RASTERVIS); + pSettings[SC_RASTERVIS].Name = SC_UNO_RASTERVIS; ScUnoHelpFunctions::SetBoolInAny( pSettings[SC_RASTERVIS].Value, aGridOpt.GetGridVisible() ); - pSettings[SC_RASTERRESX].Name = OUString(SC_UNO_RASTERRESX); + pSettings[SC_RASTERRESX].Name = SC_UNO_RASTERRESX; pSettings[SC_RASTERRESX].Value <<= static_cast<sal_Int32> ( aGridOpt.GetFldDrawX() ); - pSettings[SC_RASTERRESY].Name = OUString(SC_UNO_RASTERRESY); + pSettings[SC_RASTERRESY].Name = SC_UNO_RASTERRESY; pSettings[SC_RASTERRESY].Value <<= static_cast<sal_Int32> ( aGridOpt.GetFldDrawY() ); - pSettings[SC_RASTERSUBX].Name = OUString(SC_UNO_RASTERSUBX); + pSettings[SC_RASTERSUBX].Name = SC_UNO_RASTERSUBX; pSettings[SC_RASTERSUBX].Value <<= static_cast<sal_Int32> ( aGridOpt.GetFldDivisionX() ); - pSettings[SC_RASTERSUBY].Name = OUString(SC_UNO_RASTERSUBY); + pSettings[SC_RASTERSUBY].Name = SC_UNO_RASTERSUBY; pSettings[SC_RASTERSUBY].Value <<= static_cast<sal_Int32> ( aGridOpt.GetFldDivisionY() ); - pSettings[SC_RASTERSYNC].Name = OUString(SC_UNO_RASTERSYNC); + pSettings[SC_RASTERSYNC].Name = SC_UNO_RASTERSYNC; ScUnoHelpFunctions::SetBoolInAny( pSettings[SC_RASTERSYNC].Value, aGridOpt.GetSynchronize() ); } } |