diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-08-26 22:59:12 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-08-27 08:00:32 +0200 |
commit | 9c8fd7d1c5553e1e50dba7c7c32ef15fcdb0b49d (patch) | |
tree | 345951559eba7aca1ead5ea9ff37450792a6833e | |
parent | a6050c32f30796743f9ab9b2a5c793ced9b8f747 (diff) |
Clean up sEmpty
Change-Id: If1b2bfe308caa2bce92e73d2c5c86ee273faed93
58 files changed, 108 insertions, 164 deletions
diff --git a/connectivity/source/drivers/evoab2/NTables.cxx b/connectivity/source/drivers/evoab2/NTables.cxx index fe20ab6914f7..dd18ee81670a 100644 --- a/connectivity/source/drivers/evoab2/NTables.cxx +++ b/connectivity/source/drivers/evoab2/NTables.cxx @@ -51,7 +51,6 @@ ObjectType OEvoabTables::createObject(const OUString& aName) Sequence< OUString > aTypes(1); aTypes[0] = "TABLE"; - OUString sEmpty; Reference< XResultSet > xResult = m_xMetaData->getTables(Any(),aSchema,aName,aTypes); @@ -67,7 +66,7 @@ ObjectType OEvoabTables::createObject(const OUString& aName) aName, xRow->getString(4), xRow->getString(5), - sEmpty); + ""); xRet = pRet; } } diff --git a/connectivity/source/drivers/kab/KTables.cxx b/connectivity/source/drivers/kab/KTables.cxx index 7aa95c01f0ff..c74523af506e 100644 --- a/connectivity/source/drivers/kab/KTables.cxx +++ b/connectivity/source/drivers/kab/KTables.cxx @@ -43,7 +43,6 @@ sdbcx::ObjectType KabTables::createObject(const OUString& _rName) Sequence< OUString > aTypes(1); aTypes[0] = "%"; - OUString sEmpty; Reference< XResultSet > xResult = m_xMetaData->getTables(Any(), aSchema, aName, aTypes); @@ -59,7 +58,7 @@ sdbcx::ObjectType KabTables::createObject(const OUString& _rName) aName, xRow->getString(4), xRow->getString(5), - sEmpty); + ""); xRet = pRet; } } diff --git a/connectivity/source/drivers/macab/MacabTables.cxx b/connectivity/source/drivers/macab/MacabTables.cxx index 7a685f86201f..a33400249cea 100644 --- a/connectivity/source/drivers/macab/MacabTables.cxx +++ b/connectivity/source/drivers/macab/MacabTables.cxx @@ -43,7 +43,6 @@ sdbcx::ObjectType MacabTables::createObject(const OUString& _rName) Sequence< OUString > aTypes(1); aTypes[0] = "%"; - OUString sEmpty; Reference< XResultSet > xResult = m_xMetaData->getTables(Any(), aSchema, aName, aTypes); @@ -59,7 +58,7 @@ sdbcx::ObjectType MacabTables::createObject(const OUString& _rName) aName, xRow->getString(4), xRow->getString(5), - sEmpty); + ""); xRet = pRet; } } diff --git a/cui/source/customize/macropg.cxx b/cui/source/customize/macropg.cxx index 6f58102bbdc4..63381478222d 100644 --- a/cui/source/customize/macropg.cxx +++ b/cui/source/customize/macropg.cxx @@ -398,14 +398,13 @@ void _SvxMacroTabPage::Reset( const SfxItemSet* ) try { - OUString sEmpty; if( m_xAppEvents.is() ) { EventsHash::iterator h_itEnd = m_appEventsHash.end(); EventsHash::iterator h_it = m_appEventsHash.begin(); for ( ; h_it != h_itEnd; ++h_it ) { - h_it->second.second = sEmpty; + h_it->second.second.clear(); } } if( m_xDocEvents.is() && bDocModified ) @@ -414,7 +413,7 @@ void _SvxMacroTabPage::Reset( const SfxItemSet* ) EventsHash::iterator h_it = m_docEventsHash.begin(); for ( ; h_it != h_itEnd; ++h_it ) { - h_it->second.second = sEmpty; + h_it->second.second.clear(); } // if we have a valid XModifiable (in the case of doc events) // call setModified(true) diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx index f404fa28fa4c..10cfb0c087fb 100644 --- a/cui/source/options/optlingu.cxx +++ b/cui/source/options/optlingu.cxx @@ -1805,13 +1805,12 @@ SvTreeListEntry* SvxLinguTabPage::CreateEntry( OUString& rTxt, sal_uInt16 nCol ) if( !pCheckButtonData ) pCheckButtonData = new SvLBoxButtonData(m_pLinguOptionsCLB); - OUString sEmpty; if (CBCOL_FIRST == nCol) pEntry->AddItem(std::unique_ptr<SvLBoxButton>(new SvLBoxButton( pEntry, SvLBoxButtonKind_enabledCheckbox, 0, pCheckButtonData))); if (CBCOL_SECOND == nCol) pEntry->AddItem(std::unique_ptr<SvLBoxString>(new SvLBoxString( - pEntry, 0, sEmpty))); // empty column + pEntry, 0, ""))); // empty column pEntry->AddItem(std::unique_ptr<SvLBoxContextBmp>(new SvLBoxContextBmp( pEntry, 0, Image(), Image(), false))); pEntry->AddItem(std::unique_ptr<BrwString_Impl>(new BrwString_Impl( @@ -1940,11 +1939,10 @@ SvTreeListEntry* SvxEditModulesDlg::CreateEntry( OUString& rTxt, sal_uInt16 nCol pCheckButtonData->SetLink( m_pModulesCLB->GetCheckButtonHdl() ); } - OUString sEmpty; if (CBCOL_FIRST == nCol) pEntry->AddItem(std::unique_ptr<SvLBoxButton>(new SvLBoxButton(pEntry, SvLBoxButtonKind_enabledCheckbox, 0, pCheckButtonData))); if (CBCOL_SECOND == nCol) - pEntry->AddItem(std::unique_ptr<SvLBoxString>(new SvLBoxString(pEntry, 0, sEmpty))); // empty column + pEntry->AddItem(std::unique_ptr<SvLBoxString>(new SvLBoxString(pEntry, 0, ""))); // empty column pEntry->AddItem(std::unique_ptr<SvLBoxContextBmp>(new SvLBoxContextBmp( pEntry, 0, Image(), Image(), false))); pEntry->AddItem(std::unique_ptr<BrwStringDic_Impl>(new BrwStringDic_Impl(pEntry, 0, rTxt))); diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx index 7487c6d7523d..b5aa5bdc48de 100644 --- a/cui/source/tabpages/autocdlg.cxx +++ b/cui/source/tabpages/autocdlg.cxx @@ -477,14 +477,13 @@ SvTreeListEntry* OfaSwAutoFmtOptionsPage::CreateEntry(OUString& rTxt, sal_uInt16 pEntry->AddItem(std::unique_ptr<SvLBoxContextBmp>(new SvLBoxContextBmp( pEntry, 0, Image(), Image(), false))); - OUString sEmpty; if (nCol == CBCOL_SECOND) - pEntry->AddItem(std::unique_ptr<SvLBoxString>(new SvLBoxString(pEntry, 0, sEmpty))); + pEntry->AddItem(std::unique_ptr<SvLBoxString>(new SvLBoxString(pEntry, 0, ""))); else pEntry->AddItem(std::unique_ptr<SvLBoxButton>(new SvLBoxButton(pEntry, SvLBoxButtonKind_enabledCheckbox, 0, pCheckButtonData))); if (nCol == CBCOL_FIRST) - pEntry->AddItem(std::unique_ptr<SvLBoxString>(new SvLBoxString(pEntry, 0, sEmpty))); + pEntry->AddItem(std::unique_ptr<SvLBoxString>(new SvLBoxString(pEntry, 0, ""))); else pEntry->AddItem(std::unique_ptr<SvLBoxButton>(new SvLBoxButton(pEntry, SvLBoxButtonKind_enabledCheckbox, 0, pCheckButtonData))); pEntry->AddItem(std::unique_ptr<OfaImpBrwString>(new OfaImpBrwString( pEntry, 0, rTxt))); @@ -1800,14 +1799,13 @@ SvTreeListEntry* OfaQuoteTabPage::CreateEntry(OUString& rTxt, sal_uInt16 nCol) pEntry->AddItem(std::unique_ptr<SvLBoxContextBmp>( new SvLBoxContextBmp(pEntry, 0, Image(), Image(), false))); - OUString sEmpty; if (nCol == CBCOL_SECOND) - pEntry->AddItem(std::unique_ptr<SvLBoxString>(new SvLBoxString(pEntry, 0, sEmpty))); + pEntry->AddItem(std::unique_ptr<SvLBoxString>(new SvLBoxString(pEntry, 0, ""))); else pEntry->AddItem(std::unique_ptr<SvLBoxButton>(new SvLBoxButton(pEntry, SvLBoxButtonKind_enabledCheckbox, 0, pCheckButtonData))); if (nCol == CBCOL_FIRST) - pEntry->AddItem(std::unique_ptr<SvLBoxString>(new SvLBoxString(pEntry, 0, sEmpty))); + pEntry->AddItem(std::unique_ptr<SvLBoxString>(new SvLBoxString(pEntry, 0, ""))); else pEntry->AddItem(std::unique_ptr<SvLBoxButton>(new SvLBoxButton( pEntry, SvLBoxButtonKind_enabledCheckbox, 0, pCheckButtonData))); diff --git a/dbaccess/source/core/api/KeySet.cxx b/dbaccess/source/core/api/KeySet.cxx index 060f028ebd80..429ff3040cdf 100644 --- a/dbaccess/source/core/api/KeySet.cxx +++ b/dbaccess/source/core/api/KeySet.cxx @@ -549,8 +549,7 @@ void SAL_CALL OKeySet::updateRow(const ORowSetRow& _rInsertRow ,const ORowSetRow ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_CONDITION_FOR_PK ), SQL_GENERAL_ERROR, m_xConnection ); // now create end execute the prepared statement - OUString sEmpty; - executeUpdate(_rInsertRow ,_rOriginalRow,aSql.makeStringAndClear(),sEmpty,aIndexColumnPositions); + executeUpdate(_rInsertRow ,_rOriginalRow,aSql.makeStringAndClear(),"",aIndexColumnPositions); } void OKeySet::executeUpdate(const ORowSetRow& _rInsertRow ,const ORowSetRow& _rOriginalRow,const OUString& i_sSQL,const OUString& i_sTableName,const ::std::vector<sal_Int32>& _aIndexColumnPositions) @@ -657,8 +656,7 @@ void SAL_CALL OKeySet::insertRow( const ORowSetRow& _rInsertRow,const connectivi aValues[aValues.getLength() - 1] = ')'; aSql.append(aValues.makeStringAndClear()); // now create,fill and execute the prepared statement - OUString sEmpty; - executeInsert(_rInsertRow,aSql.makeStringAndClear(),sEmpty,bRefetch); + executeInsert(_rInsertRow,aSql.makeStringAndClear(),"",bRefetch); } void OKeySet::executeInsert( const ORowSetRow& _rInsertRow,const OUString& i_sSQL,const OUString& i_sTableName,bool bRefetch ) diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx index e97ebf0cd1aa..c2a18e142569 100644 --- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx +++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx @@ -1617,8 +1617,7 @@ void OSingleSelectQueryComposer::setConditionByColumn( const Reference< XPropert if ( nType != DataType::BOOLEAN && DataType::BIT != nType ) { - OUString sEmpty; - lcl_addFilterCriteria_throw(filterOperator,sEmpty,aSQL); + lcl_addFilterCriteria_throw(filterOperator,"",aSQL); } switch(nType) @@ -1690,8 +1689,7 @@ void OSingleSelectQueryComposer::setConditionByColumn( const Reference< XPropert sal_Int32 nFilterOp = filterOperator; if ( filterOperator != SQLFilterOperator::SQLNULL && filterOperator != SQLFilterOperator::NOT_SQLNULL ) nFilterOp = SQLFilterOperator::SQLNULL; - OUString sEmpty; - lcl_addFilterCriteria_throw(nFilterOp,sEmpty,aSQL); + lcl_addFilterCriteria_throw(nFilterOp,"",aSQL); } // Attach filter diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx index d6f67c3b02ee..e2ac9570173d 100644 --- a/dbaccess/source/ui/app/AppController.cxx +++ b/dbaccess/source/ui/app/AppController.cxx @@ -1064,9 +1064,8 @@ void OApplicationController::Execute(sal_uInt16 _nId, const Sequence< PropertyVa ::std::vector<SotClipboardFormatId> aFormatIds; getSupportedFormats(getContainer()->getElementType(),aFormatIds); const ::std::vector<SotClipboardFormatId>::iterator aEnd = aFormatIds.end(); - OUString sEmpty; for (::std::vector<SotClipboardFormatId>::iterator aIter = aFormatIds.begin();aIter != aEnd; ++aIter) - pDlg->Insert(*aIter,sEmpty); + pDlg->Insert(*aIter,""); const TransferableDataHelper& rClipboard = getViewClipboard(); pasteFormat(pDlg->GetFormat(rClipboard.GetTransferable())); diff --git a/dbaccess/source/ui/browser/formadapter.cxx b/dbaccess/source/ui/browser/formadapter.cxx index 87c8a5af1b21..43e481ed4e7e 100644 --- a/dbaccess/source/ui/browser/formadapter.cxx +++ b/dbaccess/source/ui/browser/formadapter.cxx @@ -142,9 +142,8 @@ void SbaXFormAdapter::StartListening() if (m_aPropertiesChangeListeners.getLength()) { Reference< css::beans::XMultiPropertySet > xBroadcaster(m_xMainForm, UNO_QUERY); - OUString sEmpty; if (xBroadcaster.is()) - xBroadcaster->addPropertiesChangeListener(css::uno::Sequence<OUString>(&sEmpty, 1), &m_aPropertiesChangeListeners); + xBroadcaster->addPropertiesChangeListener(css::uno::Sequence<OUString>{""}, &m_aPropertiesChangeListeners); } // log off ourself @@ -1257,9 +1256,8 @@ void SAL_CALL SbaXFormAdapter::addPropertiesChangeListener(const Sequence< OUStr if (m_aPropertiesChangeListeners.getLength() == 1) { Reference< css::beans::XMultiPropertySet > xBroadcaster(m_xMainForm, UNO_QUERY); - OUString sEmpty; if (xBroadcaster.is()) - xBroadcaster->addPropertiesChangeListener(Sequence< OUString>(&sEmpty, 1), &m_aPropertiesChangeListeners); + xBroadcaster->addPropertiesChangeListener(Sequence< OUString>{""}, &m_aPropertiesChangeListeners); } } diff --git a/dbaccess/source/ui/querydesign/querydlg.cxx b/dbaccess/source/ui/querydesign/querydlg.cxx index cb9dff43fee2..6d4d2ad386bd 100644 --- a/dbaccess/source/ui/querydesign/querydlg.cxx +++ b/dbaccess/source/ui/querydesign/querydlg.cxx @@ -204,8 +204,7 @@ IMPL_LINK( DlgQryJoin, LBChangeHdl, ListBox*, /*pListBox*/ ) m_pTableControl->lateInit(); m_pCBNatural->Check(false); m_pTableControl->enableRelation(false); - OUString sEmpty; - m_pConnData->AppendConnLine(sEmpty,sEmpty); + m_pConnData->AppendConnLine("",""); m_pPB_OK->Enable(true); } break; diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx index d6619adb2c40..0f8715c95bb5 100644 --- a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx +++ b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx @@ -929,14 +929,13 @@ void UpdateDialog::initDescription() void UpdateDialog::clearDescription() { - OUString sEmpty; m_pPublisherLabel->Hide(); m_pPublisherLink->Hide(); - m_pPublisherLink->SetText( sEmpty ); - m_pPublisherLink->SetURL( sEmpty ); + m_pPublisherLink->SetText( "" ); + m_pPublisherLink->SetURL( "" ); m_pReleaseNotesLabel->Hide(); m_pReleaseNotesLink->Hide(); - m_pReleaseNotesLink->SetURL( sEmpty ); + m_pReleaseNotesLink->SetURL( "" ); m_pDescriptions->SetText(""); } diff --git a/framework/source/uielement/langselectionmenucontroller.cxx b/framework/source/uielement/langselectionmenucontroller.cxx index 5d89a000994f..6cb7728976f8 100644 --- a/framework/source/uielement/langselectionmenucontroller.cxx +++ b/framework/source/uielement/langselectionmenucontroller.cxx @@ -200,7 +200,6 @@ void LanguageSelectionMenuController::fillPopupMenu( Reference< css::awt::XPopup sal_Int16 nItemId = 1; // in this control the item id is not important for executing the command const OUString sAsterisk("*"); // multiple languages in current selection - const OUString sEmpty; // 'no language found' from language guessing const OUString sNone( SvtLanguageTable::GetLanguageString( LANGUAGE_NONE )); std::set< OUString >::const_iterator it; for (it = aLangItems.begin(); it != aLangItems.end(); ++it) @@ -208,7 +207,7 @@ void LanguageSelectionMenuController::fillPopupMenu( Reference< css::awt::XPopup const OUString & rStr( *it ); if (rStr != sNone && rStr != sAsterisk && - rStr != sEmpty) + !rStr.isEmpty()) // 'no language found' from language guessing { pPopupMenu->InsertItem( nItemId, rStr ); aCmd = aCmd_Language; diff --git a/framework/source/uielement/langselectionstatusbarcontroller.cxx b/framework/source/uielement/langselectionstatusbarcontroller.cxx index 2f2ab7969604..ea8a10665b5a 100644 --- a/framework/source/uielement/langselectionstatusbarcontroller.cxx +++ b/framework/source/uielement/langselectionstatusbarcontroller.cxx @@ -149,7 +149,6 @@ throw (css::uno::RuntimeException, std::exception) // add first few entries to main menu sal_Int16 nItemId = static_cast< sal_Int16 >(MID_LANG_SEL_1); const OUString sAsterisk("*"); // multiple languages in current selection - const OUString sEmpty; // 'no language found' from language guessing const OUString sNone( SvtLanguageTable::GetLanguageString( LANGUAGE_NONE )); std::map< sal_Int16, OUString > aLangMap; std::set< OUString >::const_iterator it; @@ -158,7 +157,7 @@ throw (css::uno::RuntimeException, std::exception) const OUString & rStr( *it ); if ( rStr != sNone && rStr != sAsterisk && - rStr != sEmpty) + !rStr.isEmpty()) // 'no language found' from language guessing { DBG_ASSERT( MID_LANG_SEL_1 <= nItemId && nItemId <= MID_LANG_SEL_9, "nItemId outside of expected range!" ); @@ -186,7 +185,7 @@ throw (css::uno::RuntimeException, std::exception) const OUString & rStr( *it ); if( rStr != sNone && rStr != sAsterisk && - rStr != sEmpty) + !rStr.isEmpty()) // 'no language found' from language guessing { DBG_ASSERT( MID_LANG_PARA_1 <= nItemId && nItemId <= MID_LANG_PARA_9, "nItemId outside of expected range!" ); diff --git a/include/svtools/unoevent.hxx b/include/svtools/unoevent.hxx index 1a4ce964ece7..5f15a43d5c34 100644 --- a/include/svtools/unoevent.hxx +++ b/include/svtools/unoevent.hxx @@ -73,8 +73,6 @@ class SVT_DLLPUBLIC SvBaseEventDescriptor : public cppu::WeakImplHelper2 const OUString sServiceName; protected: - const OUString sEmpty; - /// last element is 0, 0 const SvEventDescription* mpSupportedMacroItems; sal_Int16 mnMacroItems; diff --git a/include/xmloff/numehelp.hxx b/include/xmloff/numehelp.hxx index 053772dfd3f3..81477e903707 100644 --- a/include/xmloff/numehelp.hxx +++ b/include/xmloff/numehelp.hxx @@ -67,7 +67,6 @@ class XMLOFF_DLLPUBLIC XMLNumberFormatAttributesExportHelper { ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormats > xNumberFormats; SvXMLExport* pExport; - const OUString sEmpty; const OUString sStandardFormat; const OUString sType; const OUString sAttrValue; diff --git a/include/xmloff/txtimp.hxx b/include/xmloff/txtimp.hxx index ca0ce7ab7e5a..923514a2f939 100644 --- a/include/xmloff/txtimp.hxx +++ b/include/xmloff/txtimp.hxx @@ -709,7 +709,7 @@ public: /// get the last open redline ID OUString GetOpenRedlineId(); /// modify the last open redline ID - void SetOpenRedlineId( OUString& rId); + void SetOpenRedlineId( OUString const & rId); /// reset the last open redline ID void ResetOpenRedlineId(); diff --git a/jvmfwk/source/elements.cxx b/jvmfwk/source/elements.cxx index 901a4bdbd3f5..02730683a0b4 100644 --- a/jvmfwk/source/elements.cxx +++ b/jvmfwk/source/elements.cxx @@ -617,10 +617,9 @@ void NodeJava::setJavaInfo(const JavaInfo * pInfo, bool bAutoSelect) else { m_javaInfo->m_bEmptyNode = true; - OUString sEmpty; - m_javaInfo->sVendor = sEmpty; - m_javaInfo->sLocation = sEmpty; - m_javaInfo->sVersion = sEmpty; + m_javaInfo->sVendor.clear(); + m_javaInfo->sLocation.clear(); + m_javaInfo->sVersion.clear(); m_javaInfo->nFeatures = 0; m_javaInfo->nRequirements = 0; m_javaInfo->arVendorData = rtl::ByteSequence(); diff --git a/reportdesign/source/filter/xml/xmlExport.cxx b/reportdesign/source/filter/xml/xmlExport.cxx index 26c25515c06d..42c816cdaf17 100644 --- a/reportdesign/source/filter/xml/xmlExport.cxx +++ b/reportdesign/source/filter/xml/xmlExport.cxx @@ -835,7 +835,6 @@ void ORptExport::exportContainer(const Reference< XSection>& _xSection) sal_Int32 nFormatKey = xFormattedField->getFormatKey(); XMLNumberFormatAttributesExportHelper aHelper(GetNumberFormatsSupplier(),*this); bool bIsStandard = false; - OUString sEmpty; sal_Int16 nCellType = aHelper.GetCellType(nFormatKey,bIsStandard); // "Standard" means "no format set, value could be anything", // so don't set a format attribute in this case. @@ -843,7 +842,7 @@ void ORptExport::exportContainer(const Reference< XSection>& _xSection) if (!bIsStandard) { if ( nCellType == util::NumberFormat::TEXT ) - aHelper.SetNumberFormatAttributes(sEmpty, sEmpty); + aHelper.SetNumberFormatAttributes("", ""); else aHelper.SetNumberFormatAttributes(nFormatKey, 0.0, false); } diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx index 0287e66b924a..0b292e60ec22 100644 --- a/sc/source/core/data/table3.cxx +++ b/sc/source/core/data/table3.cxx @@ -106,7 +106,7 @@ bool SplitString( const OUString &sWhole, i18n::LocaleDataItem aLocaleItem = ScGlobal::pLocaleData->getLocaleItem(); // Get prefix element - OUString sEmpty, sUser = "-"; + OUString sUser = "-"; ParseResult aPRPre = ScGlobal::pCharClass->parsePredefinedToken( KParseType::IDENTNAME, sWhole, 0, KParseTokens::ANY_LETTER, sUser, KParseTokens::ANY_LETTER, sUser ); @@ -120,7 +120,7 @@ bool SplitString( const OUString &sWhole, sUser = aLocaleItem.decimalSeparator; ParseResult aPRNum = ScGlobal::pCharClass->parsePredefinedToken( KParseType::ANY_NUMBER, sWhole, aPRPre.EndPos, - KParseTokens::ANY_NUMBER, sEmpty, KParseTokens::ANY_NUMBER, sUser ); + KParseTokens::ANY_NUMBER, "", KParseTokens::ANY_NUMBER, sUser ); if ( aPRNum.EndPos == aPRPre.EndPos ) return false; diff --git a/sc/source/filter/xml/XMLTableHeaderFooterContext.cxx b/sc/source/filter/xml/XMLTableHeaderFooterContext.cxx index f88bf6e516b2..7606526ceced 100644 --- a/sc/source/filter/xml/XMLTableHeaderFooterContext.cxx +++ b/sc/source/filter/xml/XMLTableHeaderFooterContext.cxx @@ -117,7 +117,7 @@ SvXMLImportContext *XMLTableHeaderFooterContext::CreateChildContext( if( xHeaderFooterContent.is() ) { uno::Reference < text::XText > xText(xHeaderFooterContent->getCenterText()); - xText->setString(sEmpty); + xText->setString(""); xTextCursor.set(xText->createTextCursor()); xOldTextCursor.set(GetImport().GetTextImport()->GetCursor()); GetImport().GetTextImport()->SetCursor( xTextCursor ); @@ -154,7 +154,7 @@ SvXMLImportContext *XMLTableHeaderFooterContext::CreateChildContext( } if (xText.is()) { - xText->setString(sEmpty); + xText->setString(""); //SvXMLImport aSvXMLImport( GetImport() ); uno::Reference < text::XTextCursor > xTempTextCursor(xText->createTextCursor()); pContext = new XMLHeaderFooterRegionContext( GetImport(), nPrefix, rLocalName, xAttrList, xTempTextCursor); @@ -176,7 +176,7 @@ void XMLTableHeaderFooterContext::EndElement() if( GetImport().GetTextImport()->GetCursor()->goLeft( 1, true ) ) { GetImport().GetTextImport()->GetText()->insertString( - GetImport().GetTextImport()->GetCursorAsRange(), sEmpty, + GetImport().GetTextImport()->GetCursorAsRange(), "", true ); } GetImport().GetTextImport()->ResetCursor(); @@ -186,11 +186,11 @@ void XMLTableHeaderFooterContext::EndElement() if (xHeaderFooterContent.is()) { if (!bContainsLeft) - xHeaderFooterContent->getLeftText()->setString(sEmpty); + xHeaderFooterContent->getLeftText()->setString(""); if (!bContainsCenter) - xHeaderFooterContent->getCenterText()->setString(sEmpty); + xHeaderFooterContent->getCenterText()->setString(""); if (!bContainsRight) - xHeaderFooterContent->getRightText()->setString(sEmpty); + xHeaderFooterContent->getRightText()->setString(""); xPropSet->setPropertyValue( sCont, uno::makeAny(xHeaderFooterContent) ); } @@ -243,9 +243,8 @@ void XMLHeaderFooterRegionContext::EndElement() //GetImport().GetTextImport()->GetCursor()->gotoEnd(sal_False); if( GetImport().GetTextImport()->GetCursor()->goLeft( 1, true ) ) { - OUString sEmpty; GetImport().GetTextImport()->GetText()->insertString( - GetImport().GetTextImport()->GetCursorAsRange(), sEmpty, + GetImport().GetTextImport()->GetCursorAsRange(), "", true ); } GetImport().GetTextImport()->ResetCursor(); diff --git a/sc/source/filter/xml/XMLTableHeaderFooterContext.hxx b/sc/source/filter/xml/XMLTableHeaderFooterContext.hxx index abcc4687cecd..3f89046cf2e2 100644 --- a/sc/source/filter/xml/XMLTableHeaderFooterContext.hxx +++ b/sc/source/filter/xml/XMLTableHeaderFooterContext.hxx @@ -43,7 +43,6 @@ class XMLTableHeaderFooterContext: public SvXMLImportContext const OUString sShareContent; const OUString sContent; const OUString sContentLeft; - const OUString sEmpty; OUString sCont; bool bDisplay; diff --git a/sc/source/filter/xml/XMLTrackedChangesContext.cxx b/sc/source/filter/xml/XMLTrackedChangesContext.cxx index 1499f34d7afc..9bed201e5277 100644 --- a/sc/source/filter/xml/XMLTrackedChangesContext.cxx +++ b/sc/source/filter/xml/XMLTrackedChangesContext.cxx @@ -1218,9 +1218,8 @@ void ScXMLChangeCellContext::EndElement() //GetImport().GetTextImport()->GetCursor()->gotoEnd(sal_False); if( GetImport().GetTextImport()->GetCursor()->goLeft( 1, sal_True ) ) { - OUString sEmpty; GetImport().GetTextImport()->GetText()->insertString( - GetImport().GetTextImport()->GetCursorAsRange(), sEmpty, + GetImport().GetTextImport()->GetCursorAsRange(), "", sal_True ); } } diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx index 61953d7388c5..b92e56226288 100644 --- a/sc/source/filter/xml/xmlimprt.cxx +++ b/sc/source/filter/xml/xmlimprt.cxx @@ -2899,7 +2899,7 @@ void ScXMLImport::SetStyleToRange(const ScRange& rRange, const OUString* pStyleN if (pCurrency) sPrevCurrency = *pCurrency; else if (!sPrevCurrency.isEmpty()) - sPrevCurrency = sEmpty; + sPrevCurrency.clear(); } else if ((nCellType != nPrevCellType) || ((pStyleName && !pStyleName->equals(sPrevStyleName)) || @@ -2912,11 +2912,11 @@ void ScXMLImport::SetStyleToRange(const ScRange& rRange, const OUString* pStyleN if (pStyleName) sPrevStyleName = *pStyleName; else if(!sPrevStyleName.isEmpty()) - sPrevStyleName = sEmpty; + sPrevStyleName.clear(); if (pCurrency) sPrevCurrency = *pCurrency; else if(!sPrevCurrency.isEmpty()) - sPrevCurrency = sEmpty; + sPrevCurrency.clear(); } table::CellRangeAddress aCellRange; aCellRange.StartColumn = rRange.aStart.Col(); @@ -2952,7 +2952,7 @@ ScMyStyleNumberFormats* ScXMLImport::GetStyleNumberFormats() void ScXMLImport::SetStylesToRangesFinished() { SetStyleToRanges(); - sPrevStyleName = sEmpty; + sPrevStyleName.clear(); } // XImporter diff --git a/sc/source/filter/xml/xmlimprt.hxx b/sc/source/filter/xml/xmlimprt.hxx index 413b78339038..ae5ffe1747f9 100644 --- a/sc/source/filter/xml/xmlimprt.hxx +++ b/sc/source/filter/xml/xmlimprt.hxx @@ -954,7 +954,6 @@ class ScXMLImport: public SvXMLImport, boost::noncopyable com::sun::star::uno::Reference <com::sun::star::sheet::XSheetCellRangeContainer> xSheetCellRanges; - OUString sEmpty; OUString sPrevStyleName; OUString sPrevCurrency; sal_uInt32 nSolarMutexLocked; diff --git a/sc/source/filter/xml/xmlstyli.cxx b/sc/source/filter/xml/xmlstyli.cxx index 76056e1b3cec..0f9b7f26e7d5 100644 --- a/sc/source/filter/xml/xmlstyli.cxx +++ b/sc/source/filter/xml/xmlstyli.cxx @@ -1034,9 +1034,9 @@ void ScMasterPageContext::ClearContent(const OUString& rContent) uno::Reference < sheet::XHeaderFooterContent > xHeaderFooterContent(xPropSet->getPropertyValue( rContent ), uno::UNO_QUERY); if (xHeaderFooterContent.is()) { - xHeaderFooterContent->getLeftText()->setString(sEmpty); - xHeaderFooterContent->getCenterText()->setString(sEmpty); - xHeaderFooterContent->getRightText()->setString(sEmpty); + xHeaderFooterContent->getLeftText()->setString(""); + xHeaderFooterContent->getCenterText()->setString(""); + xHeaderFooterContent->getRightText()->setString(""); xPropSet->setPropertyValue( rContent, uno::makeAny(xHeaderFooterContent) ); } } diff --git a/sc/source/filter/xml/xmlstyli.hxx b/sc/source/filter/xml/xmlstyli.hxx index 10bf52a3ae6d..ca856bdd6d05 100644 --- a/sc/source/filter/xml/xmlstyli.hxx +++ b/sc/source/filter/xml/xmlstyli.hxx @@ -218,7 +218,6 @@ namespace com { namespace sun { namespace star { class ScMasterPageContext : public XMLTextMasterPageContext { com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet> xPropSet; - const OUString sEmpty; bool bContainsRightHeader; bool bContainsRightFooter; diff --git a/sc/source/filter/xml/xmlwrap.cxx b/sc/source/filter/xml/xmlwrap.cxx index 4f96f25bb65d..77afa8384287 100644 --- a/sc/source/filter/xml/xmlwrap.cxx +++ b/sc/source/filter/xml/xmlwrap.cxx @@ -324,7 +324,6 @@ bool ScXMLImportWrapper::Import( sal_uInt8 nMode, ErrCode& rError ) uno::Reference<xml::sax::XParser> xXMLParser = xml::sax::Parser::create(xContext); // get filter - OUString sEmpty; uno::Reference<frame::XModel> xModel = mrDocShell.GetModel(); /** property map for export info set */ @@ -499,7 +498,7 @@ bool ScXMLImportWrapper::Import( sal_uInt8 nMode, ErrCode& rError ) xContext, xModel, xXMLParser, aParserInput, bOasis ? OUString("com.sun.star.comp.Calc.XMLOasisSettingsImporter") : OUString("com.sun.star.comp.Calc.XMLSettingsImporter"), - "settings.xml", sEmpty, aSettingsArgs, false); + "settings.xml", "", aSettingsArgs, false); SAL_INFO( "sc.filter", "settings import end" ); } @@ -513,7 +512,7 @@ bool ScXMLImportWrapper::Import( sal_uInt8 nMode, ErrCode& rError ) bOasis ? OUString("com.sun.star.comp.Calc.XMLOasisStylesImporter") : OUString("com.sun.star.comp.Calc.XMLStylesImporter"), OUString("styles.xml"), - sEmpty, aStylesArgs, true); + "", aStylesArgs, true); SAL_INFO( "sc.filter", "styles import end" ); } diff --git a/sc/source/ui/miscdlgs/solveroptions.cxx b/sc/source/ui/miscdlgs/solveroptions.cxx index b539260f396a..5593a071a56a 100644 --- a/sc/source/ui/miscdlgs/solveroptions.cxx +++ b/sc/source/ui/miscdlgs/solveroptions.cxx @@ -247,7 +247,6 @@ void ScSolverOptionsDialog::FillListBox() m_pLbSettings->SetUpdateMode(false); m_pLbSettings->Clear(); - OUString sEmpty; if (!mpCheckButtonData) mpCheckButtonData = new SvLBoxButtonData(m_pLbSettings); @@ -281,7 +280,7 @@ void ScSolverOptionsDialog::FillListBox() // value entry pEntry = new SvTreeListEntry; pEntry->AddItem(std::unique_ptr<SvLBoxString>( - new SvLBoxString(pEntry, 0, sEmpty))); // empty column + new SvLBoxString(pEntry, 0, ""))); // empty column pEntry->AddItem(std::unique_ptr<SvLBoxContextBmp>( new SvLBoxContextBmp(pEntry, 0, Image(), Image(), false))); std::unique_ptr<ScSolverOptionsString> pItem( diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx index b0da8b4d1cb4..f2106fc9d2ac 100644 --- a/sfx2/source/appl/newhelp.cxx +++ b/sfx2/source/appl/newhelp.cxx @@ -1194,13 +1194,12 @@ void BookmarksBox_Impl::dispose() // save bookmarks to configuration SvtHistoryOptions aHistOpt; aHistOpt.Clear( eHELPBOOKMARKS ); - OUString sEmpty; sal_uInt16 nCount = GetEntryCount(); for ( sal_uInt16 i = 0; i < nCount; ++i ) { OUString aTitle = GetEntry(i); OUString* pURL = static_cast<OUString*>(GetEntryData(i)); - aHistOpt.AppendItem(eHELPBOOKMARKS, *pURL, sEmpty, aTitle, sEmpty, boost::none); + aHistOpt.AppendItem(eHELPBOOKMARKS, *pURL, "", aTitle, "", boost::none); delete pURL; } ListBox::dispose(); diff --git a/sfx2/source/bastyp/sfxhtml.cxx b/sfx2/source/bastyp/sfxhtml.cxx index 5b40bbab9121..266a23d0b8a9 100644 --- a/sfx2/source/bastyp/sfxhtml.cxx +++ b/sfx2/source/bastyp/sfxhtml.cxx @@ -118,7 +118,7 @@ bool SfxHTMLParser::ParseAreaOptions(ImageMap * pImageMap, const OUString& rBase sal_uInt16 nShape = IMAP_OBJ_RECTANGLE; std::vector<sal_uInt32> aCoords; - OUString aName, aHRef, aAlt, aTarget, sEmpty; + OUString aName, aHRef, aAlt, aTarget; bool bNoHRef = false; SvxMacroTableDtor aMacroTbl; @@ -171,7 +171,7 @@ IMAPOBJ_SETEVENT: if( !sTmp.isEmpty() ) { sTmp = convertLineEnd(sTmp, GetSystemLineEnd()); - aMacroTbl.Insert( nEvent, SvxMacro( sTmp, sEmpty, eScrpType )); + aMacroTbl.Insert( nEvent, SvxMacro( sTmp, "", eScrpType )); } } break; diff --git a/svtools/source/uno/unoevent.cxx b/svtools/source/uno/unoevent.cxx index cb113b11cbc2..842a07331cfd 100644 --- a/svtools/source/uno/unoevent.cxx +++ b/svtools/source/uno/unoevent.cxx @@ -50,7 +50,6 @@ SvBaseEventDescriptor::SvBaseEventDescriptor( const SvEventDescription* pSupport sScript("Script"), sNone("None"), sServiceName(sAPI_ServiceName), - sEmpty(), mpSupportedMacroItems(pSupportedMacroItems), mnMacroItems(0) { @@ -86,7 +85,7 @@ void SvBaseEventDescriptor::replaceByName( rElement >>= aSequence; // perform replace (in subclass) - SvxMacro aMacro(sEmpty,sEmpty); + SvxMacro aMacro("",""); getMacroFromAny(aMacro, rElement); replaceByName(nMacroID, aMacro); } @@ -106,7 +105,7 @@ Any SvBaseEventDescriptor::getByName( // perform get (in subclass) Any aAny; - SvxMacro aMacro( sEmpty, sEmpty ); + SvxMacro aMacro( "", "" ); getByName(aMacro, nMacroID); getAnyFromMacro(aAny, aMacro); return aAny; @@ -338,7 +337,7 @@ void SvBaseEventDescriptor::getMacroFromAny( if (bNone) { // return empty macro - rMacro = SvxMacro( sEmpty, sEmpty ); + rMacro = SvxMacro( "", "" ); } else { @@ -411,7 +410,7 @@ void SvEventDescriptor::getByName( rMacro = rItem.GetMacro(nEvent); else { - SvxMacro aEmptyMacro(sEmpty, sEmpty); + SvxMacro aEmptyMacro("", ""); rMacro = aEmptyMacro; } } @@ -547,7 +546,7 @@ void SvMacroTableEventDescriptor::copyMacrosIntoTable( const sal_uInt16 nEvent = mpSupportedMacroItems[i].mnEvent; if (hasById(nEvent)) { - SvxMacro& rMacro = rMacroTable.Insert(nEvent, SvxMacro(sEmpty, sEmpty)); + SvxMacro& rMacro = rMacroTable.Insert(nEvent, SvxMacro("", "")); getByName(rMacro, nEvent); } } diff --git a/svx/source/sidebar/nbdtmg.cxx b/svx/source/sidebar/nbdtmg.cxx index 13006279d21f..d4d647f08cc8 100644 --- a/svx/source/sidebar/nbdtmg.cxx +++ b/svx/source/sidebar/nbdtmg.cxx @@ -645,7 +645,7 @@ bool GraphyicBulletsTypeMgr::RelplaceNumRule(SvxNumRule& aNum, sal_uInt16 nIndex GrfBulDataRelation* pEntry = aGrfDataLst[nIndex]; if ( !aGrfName.isEmpty() ) pEntry->sGrfName = aGrfName; - //pEntry->sDescription = sEmpty; + //pEntry->sDescription.clear(); pEntry->nGallaryIndex = (sal_uInt16)0xFFFF; pEntry->bIsCustomized = true; OUString aStrFromRES = SVX_RESSTR( RID_SVXSTR_NUMBULLET_CUSTOM_BULLET_DESCRIPTION); diff --git a/sw/source/core/edit/edtox.cxx b/sw/source/core/edit/edtox.cxx index 8d596e8df064..16385174285c 100644 --- a/sw/source/core/edit/edtox.cxx +++ b/sw/source/core/edit/edtox.cxx @@ -314,10 +314,9 @@ void SwEditShell::ApplyAutoMark() sal_Int32 nSrchFlags = SearchFlags::LEV_RELAXED; - OUString sEmpty; SearchOptions aSearchOpt( SearchAlgorithms_ABSOLUTE, nSrchFlags, - sEmpty, sEmpty, + "", "", SvtSysLocale().GetLanguageTag().getLocale(), nLEV_Other, nLEV_Longer, nLEV_Shorter, nTransliterationFlags ); diff --git a/sw/source/core/unocore/unoevent.cxx b/sw/source/core/unocore/unoevent.cxx index aed1588a97d1..791cad3e7556 100644 --- a/sw/source/core/unocore/unoevent.cxx +++ b/sw/source/core/unocore/unoevent.cxx @@ -136,7 +136,7 @@ void SwHyperlinkEventDescriptor::copyMacrosIntoINetFormat( const sal_uInt16 nEvent = mpSupportedMacroItems[i].mnEvent; if (hasById(nEvent)) { - SvxMacro aMacro(sEmpty, sEmpty); + SvxMacro aMacro("", ""); getByName(aMacro, nEvent); aFormat.SetMacro(nEvent, aMacro); } diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx index a85fbf96ac82..a050e583a94d 100644 --- a/sw/source/uibase/uiview/view2.cxx +++ b/sw/source/uibase/uiview/view2.cxx @@ -2073,8 +2073,7 @@ void SwView::ExecuteInsertDoc( SfxRequest& rRequest, const SfxPoolItem* pItem ) if ( !pItem ) { - OUString sEmpty; - InsertDoc( nSlot, sEmpty, sEmpty ); + InsertDoc( nSlot, "", "" ); } else { diff --git a/unotools/source/config/dynamicmenuoptions.cxx b/unotools/source/config/dynamicmenuoptions.cxx index c8ba910f9710..c16b8a291bad 100644 --- a/unotools/source/config/dynamicmenuoptions.cxx +++ b/unotools/source/config/dynamicmenuoptions.cxx @@ -99,7 +99,7 @@ class SvtDynMenu // The while-loop starts with pointer on internal member list lSetupEntries, change to // lUserEntries then and stop after that with NULL! // Separator entries will be packed in another way then normal entries! We define - // special strings "sEmpty" and "sSeparator" to perform too ... + // special string "sSeparator" to perform too ... Sequence< Sequence< PropertyValue > > GetList() const { sal_Int32 nSetupCount = (sal_Int32)lSetupEntries.size(); @@ -108,7 +108,6 @@ class SvtDynMenu Sequence< PropertyValue > lProperties ( PROPERTYCOUNT ); Sequence< Sequence< PropertyValue > > lResult ( nSetupCount+nUserCount ); OUString sSeparator ( "private:separator" ); - OUString sEmpty; const vector< SvtDynMenuEntry >* pList = &lSetupEntries; lProperties[OFFSET_URL ].Name = PROPERTYNAME_URL; @@ -125,9 +124,9 @@ class SvtDynMenu if( pItem->sURL == sSeparator ) { lProperties[OFFSET_URL ].Value <<= sSeparator; - lProperties[OFFSET_TITLE ].Value <<= sEmpty; - lProperties[OFFSET_IMAGEIDENTIFIER ].Value <<= sEmpty; - lProperties[OFFSET_TARGETNAME ].Value <<= sEmpty; + lProperties[OFFSET_TITLE ].Value <<= OUString(); + lProperties[OFFSET_IMAGEIDENTIFIER ].Value <<= OUString(); + lProperties[OFFSET_TARGETNAME ].Value <<= OUString(); } else { diff --git a/vbahelper/source/msforms/vbacontrol.cxx b/vbahelper/source/msforms/vbacontrol.cxx index 84f9852542bd..910829b67f7a 100644 --- a/vbahelper/source/msforms/vbacontrol.cxx +++ b/vbahelper/source/msforms/vbacontrol.cxx @@ -318,7 +318,6 @@ ScVbaControl::getControlSource() throw (uno::RuntimeException, std::exception) void SAL_CALL ScVbaControl::setControlSource( const OUString& _controlsource ) throw (uno::RuntimeException, std::exception) { - OUString sEmpty; // afaik this is only relevant for Excel documents ( and we need to set up a // reference tab in case no Sheet is specified in "_controlsource" // Can't use the active sheet either, code may of course access @@ -352,7 +351,7 @@ ScVbaControl::setControlSource( const OUString& _controlsource ) throw (uno::Run break; } - svt::BindableControlHelper::ApplyListSourceAndBindableData( m_xModel, m_xProps, _controlsource, sEmpty, sal_uInt16( nRefTab ) ); + svt::BindableControlHelper::ApplyListSourceAndBindableData( m_xModel, m_xProps, _controlsource, "", sal_uInt16( nRefTab ) ); } OUString SAL_CALL @@ -383,8 +382,7 @@ ScVbaControl::getRowSource() throw (uno::RuntimeException, std::exception) void SAL_CALL ScVbaControl::setRowSource( const OUString& _rowsource ) throw (uno::RuntimeException, std::exception) { - OUString sEmpty; - svt::BindableControlHelper::ApplyListSourceAndBindableData( m_xModel, m_xProps, sEmpty, _rowsource ); + svt::BindableControlHelper::ApplyListSourceAndBindableData( m_xModel, m_xProps, "", _rowsource ); } OUString SAL_CALL diff --git a/xmloff/inc/txtflde.hxx b/xmloff/inc/txtflde.hxx index 7bbaa791470c..6178b190a165 100644 --- a/xmloff/inc/txtflde.hxx +++ b/xmloff/inc/txtflde.hxx @@ -518,8 +518,6 @@ private: const OUString sPropertyTooltip; const OUString sPropertyTextRange; - const OUString sEmpty; - XMLPropertyState* pCombinedCharactersPropertyState; }; diff --git a/xmloff/source/core/DocumentSettingsContext.cxx b/xmloff/source/core/DocumentSettingsContext.cxx index 8dc14efc0d63..fc71a98efc85 100644 --- a/xmloff/source/core/DocumentSettingsContext.cxx +++ b/xmloff/source/core/DocumentSettingsContext.cxx @@ -405,8 +405,7 @@ void XMLDocumentSettingsContext::EndElement() if ( sProp == "PrinterName" ) { - OUString sEmpty; - aSeqConfigProps[i].Value = uno::makeAny( sEmpty ); + aSeqConfigProps[i].Value = uno::makeAny( OUString() ); nFound++; } else if ( sProp == "PrinterSetup" ) diff --git a/xmloff/source/core/SettingsExportHelper.cxx b/xmloff/source/core/SettingsExportHelper.cxx index 3c4edf5047c2..5bba8272628c 100644 --- a/xmloff/source/core/SettingsExportHelper.cxx +++ b/xmloff/source/core/SettingsExportHelper.cxx @@ -402,7 +402,6 @@ void XMLSettingsExportHelper::exportIndexAccess( DBG_ASSERT(!rName.isEmpty(), "no name"); DBG_ASSERT(rIndexed->getElementType().equals(cppu::UnoType<uno::Sequence<beans::PropertyValue>>::get() ), "wrong IndexAccess" ); - OUString sEmpty; if (rIndexed->hasElements()) { m_rContext.AddAttribute( XML_NAME, rName ); @@ -410,7 +409,7 @@ void XMLSettingsExportHelper::exportIndexAccess( sal_Int32 nCount = rIndexed->getCount(); for (sal_Int32 i = 0; i < nCount; i++) { - exportMapEntry(rIndexed->getByIndex(i), sEmpty, false); + exportMapEntry(rIndexed->getByIndex(i), "", false); } m_rContext.EndElement( true ); } diff --git a/xmloff/source/core/nmspmap.cxx b/xmloff/source/core/nmspmap.cxx index b355f038e9b7..c05fd934d954 100644 --- a/xmloff/source/core/nmspmap.cxx +++ b/xmloff/source/core/nmspmap.cxx @@ -301,7 +301,7 @@ sal_uInt16 SvXMLNamespaceMap::_GetKeyByAttrName( const OUString& rAttrName, if ( pNamespace ) { NameSpaceMap::const_iterator aMapIter = aNameMap.find (nKey); - *pNamespace = aMapIter != aNameMap.end() ? (*aMapIter).second->sName : sEmpty; + *pNamespace = aMapIter != aNameMap.end() ? (*aMapIter).second->sName : OUString(); } } else diff --git a/xmloff/source/core/xmlerror.cxx b/xmloff/source/core/xmlerror.cxx index feb4ac0bdfe7..cd6d9e93205e 100644 --- a/xmloff/source/core/xmlerror.cxx +++ b/xmloff/source/core/xmlerror.cxx @@ -196,9 +196,8 @@ void XMLErrors::AddRecord( } else { - OUString sEmpty; AddRecord( nId, rParams, rExceptionMessage, - -1, -1, sEmpty, sEmpty ); + -1, -1, "", "" ); } } diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx index 61c1c280a9a2..91f73b73e72e 100644 --- a/xmloff/source/core/xmlexp.cxx +++ b/xmloff/source/core/xmlexp.cxx @@ -2390,8 +2390,7 @@ void SvXMLExport::SetError( sal_Int32 nId, const Sequence<OUString>& rMsgParams) { - OUString sEmpty; - SetError( nId, rMsgParams, sEmpty, NULL ); + SetError( nId, rMsgParams, "", NULL ); } void SvXMLExport::DisposingModel() diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx index 272505b0c06c..9108fc760ab0 100644 --- a/xmloff/source/core/xmlimp.cxx +++ b/xmloff/source/core/xmlimp.cxx @@ -1796,8 +1796,7 @@ void SvXMLImport::SetError( sal_Int32 nId, const Sequence<OUString>& rMsgParams) { - OUString sEmpty; - SetError( nId, rMsgParams, sEmpty, NULL ); + SetError( nId, rMsgParams, "", NULL ); } void SvXMLImport::SetError( diff --git a/xmloff/source/style/XMLFontStylesContext.cxx b/xmloff/source/style/XMLFontStylesContext.cxx index 373e116bf9a8..0efac45022cc 100644 --- a/xmloff/source/style/XMLFontStylesContext.cxx +++ b/xmloff/source/style/XMLFontStylesContext.cxx @@ -90,9 +90,8 @@ XMLFontStyleContextFontFace::XMLFontStyleContextFontFace( SvXMLImport& rImport, SvXMLStyleContext( rImport, nPrfx, rLName, xAttrList, XML_STYLE_FAMILY_FONT ), xStyles( &rStyles ) { - OUString sEmpty; - aFamilyName <<= sEmpty; - aStyleName <<= sEmpty; + aFamilyName <<= OUString(); + aStyleName <<= OUString(); aFamily <<= (sal_Int16)awt::FontFamily::DONTKNOW; aPitch <<= (sal_Int16)awt::FontPitch::DONTKNOW; aEnc <<= (sal_Int16)rStyles.GetDfltCharset(); diff --git a/xmloff/source/style/numehelp.cxx b/xmloff/source/style/numehelp.cxx index 4a8de1db6e2d..def5eec8db00 100644 --- a/xmloff/source/style/numehelp.cxx +++ b/xmloff/source/style/numehelp.cxx @@ -78,7 +78,7 @@ XMLNumberFormatAttributesExportHelper::~XMLNumberFormatAttributesExportHelper() sal_Int16 XMLNumberFormatAttributesExportHelper::GetCellType(const sal_Int32 nNumberFormat, OUString& sCurrency, bool& bIsStandard) { - XMLNumberFormat aFormat(sEmpty, nNumberFormat, 0); + XMLNumberFormat aFormat("", nNumberFormat, 0); XMLNumberFormatSet::iterator aItr(aNumberFormats.find(aFormat)); XMLNumberFormatSet::iterator aEndItr(aNumberFormats.end()); if (aItr != aEndItr) diff --git a/xmloff/source/style/xmlaustp.cxx b/xmloff/source/style/xmlaustp.cxx index d1ff59d97934..46d2d47d4af0 100644 --- a/xmloff/source/style/xmlaustp.cxx +++ b/xmloff/source/style/xmlaustp.cxx @@ -335,9 +335,8 @@ void SvXMLAutoStylePoolP::RegisterNames( OUString SvXMLAutoStylePoolP::Add( sal_Int32 nFamily, const vector< XMLPropertyState >& rProperties ) { - OUString sEmpty; OUString sName; - pImpl->Add(sName, nFamily, sEmpty, rProperties ); + pImpl->Add(sName, nFamily, "", rProperties ); return sName; } diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx index 9730adb00076..767c7eb47a06 100644 --- a/xmloff/source/style/xmlnumfe.cxx +++ b/xmloff/source/style/xmlnumfe.cxx @@ -853,8 +853,7 @@ bool SvXMLNumFmtExport::WriteTextWithCurrency_Impl( const OUString& rString, AddToTextElement_Impl( rString.copy( 0, nPos ) ); } // currency symbol (empty string -> default) - OUString sEmpty; - WriteCurrencyElement_Impl( sEmpty, sEmpty ); + WriteCurrencyElement_Impl( "", "" ); bRet = true; // text after currency symbol diff --git a/xmloff/source/text/XMLIndexTOCContext.cxx b/xmloff/source/text/XMLIndexTOCContext.cxx index 899252078adb..bce9924d6946 100644 --- a/xmloff/source/text/XMLIndexTOCContext.cxx +++ b/xmloff/source/text/XMLIndexTOCContext.cxx @@ -262,7 +262,6 @@ void XMLIndexTOCContext::EndElement() if( bValid ) { // preliminaries - OUString sEmpty; rtl::Reference<XMLTextImportHelper> rHelper= GetImport().GetTextImport(); // get rid of last paragraph (unless it's the only paragraph) @@ -272,13 +271,13 @@ void XMLIndexTOCContext::EndElement() { rHelper->GetCursor()->goLeft(1, sal_True); rHelper->GetText()->insertString(rHelper->GetCursorAsRange(), - sEmpty, sal_True); + "", sal_True); } // and delete second marker rHelper->GetCursor()->goRight(1, sal_True); rHelper->GetText()->insertString(rHelper->GetCursorAsRange(), - sEmpty, sal_True); + "", sal_True); // check for Redlines on our end node GetImport().GetTextImport()->RedlineAdjustStartNodeCursor(false); diff --git a/xmloff/source/text/XMLSectionExport.cxx b/xmloff/source/text/XMLSectionExport.cxx index ba6fd6bdd881..0c3201d9af83 100644 --- a/xmloff/source/text/XMLSectionExport.cxx +++ b/xmloff/source/text/XMLSectionExport.cxx @@ -158,7 +158,7 @@ void XMLSectionExport::ExportSectionStart( GetExport().AddAttribute(XML_NAMESPACE_TEXT, XML_STYLE_NAME, GetParaExport().Find( XML_STYLE_FAMILY_TEXT_SECTION, - xPropertySet, sEmpty ) ); + xPropertySet, "" ) ); // xml:id for RDF metadata GetExport().AddAttributeXmlId(rSection); diff --git a/xmloff/source/text/XMLSectionExport.hxx b/xmloff/source/text/XMLSectionExport.hxx index 9163ef2927f8..5a4d47bba2f7 100644 --- a/xmloff/source/text/XMLSectionExport.hxx +++ b/xmloff/source/text/XMLSectionExport.hxx @@ -130,8 +130,6 @@ class XMLSectionExport const OUString sIsCurrentlyVisible; const OUString sHeadingStyleName; - const OUString sEmpty; - SvXMLExport& rExport; XMLTextParagraphExport& rParaExport; diff --git a/xmloff/source/text/XMLSectionImportContext.cxx b/xmloff/source/text/XMLSectionImportContext.cxx index 2574fce93dc5..7bc8c1c33eb5 100644 --- a/xmloff/source/text/XMLSectionImportContext.cxx +++ b/xmloff/source/text/XMLSectionImportContext.cxx @@ -234,7 +234,7 @@ void XMLSectionImportContext::StartElement( // and delete first marker (in section) rHelper->GetText()->insertString( - rHelper->GetCursorAsRange(), sEmpty, sal_True); + rHelper->GetCursorAsRange(), "", sal_True); // finally, check for redlines that should start at // the section start node @@ -339,13 +339,13 @@ void XMLSectionImportContext::EndElement() { rHelper->GetCursor()->goLeft(1, sal_True); rHelper->GetText()->insertString(rHelper->GetCursorAsRange(), - sEmpty, sal_True); + "", sal_True); } // and delete second marker rHelper->GetCursor()->goRight(1, sal_True); rHelper->GetText()->insertString(rHelper->GetCursorAsRange(), - sEmpty, sal_True); + "", sal_True); // check for redlines to our endnode rHelper->RedlineAdjustStartNodeCursor(false); diff --git a/xmloff/source/text/XMLSectionImportContext.hxx b/xmloff/source/text/XMLSectionImportContext.hxx index 7b4ab86042fc..4f14b80c7b69 100644 --- a/xmloff/source/text/XMLSectionImportContext.hxx +++ b/xmloff/source/text/XMLSectionImportContext.hxx @@ -58,7 +58,6 @@ class XMLSectionImportContext : public SvXMLImportContext const OUString sProtectionKey; const OUString sIsProtected; const OUString sIsCurrentlyVisible; - const OUString sEmpty; OUString sXmlId; OUString sStyleName; diff --git a/xmloff/source/text/txtflde.cxx b/xmloff/source/text/txtflde.cxx index c20f22682603..5c7513906b30 100644 --- a/xmloff/source/text/txtflde.cxx +++ b/xmloff/source/text/txtflde.cxx @@ -1127,7 +1127,7 @@ void XMLTextFieldExport::ExportFieldHelper( // show style, unless name will be shown ProcessValueAndType(IsStringField(nToken, rPropSet), GetIntProperty(sPropertyNumberFormat, rPropSet), - sEmpty, sEmpty, 0.0, // values not used + "", "", 0.0, // values not used false, bExportValueType, !bCmd, @@ -1168,7 +1168,7 @@ void XMLTextFieldExport::ExportFieldHelper( bCmd); ProcessValueAndType(IsStringField(nToken, rPropSet), GetIntProperty(sPropertyNumberFormat, rPropSet), - sEmpty, sEmpty, 0.0, // values not used + "", "", 0.0, // values not used false, false, !bCmd, ! GetOptionalBoolProperty( sPropertyIsFixedLanguage, @@ -1251,7 +1251,7 @@ void XMLTextFieldExport::ExportFieldHelper( { ProcessValueAndType(false, GetIntProperty(sPropertyNumberFormat,rPropSet), - sEmpty, sEmpty, 0.0, // not used + "", "", 0.0, // not used false, false, true, ! GetOptionalBoolProperty( sPropertyIsFixedLanguage, @@ -1293,7 +1293,7 @@ void XMLTextFieldExport::ExportFieldHelper( { ProcessValueAndType(false, GetIntProperty(sPropertyNumberFormat,rPropSet), - sEmpty, sEmpty, 0.0, // not used + "", "", 0.0, // not used false, false, true, ! GetOptionalBoolProperty( sPropertyIsFixedLanguage, @@ -1398,7 +1398,7 @@ void XMLTextFieldExport::ExportFieldHelper( ProcessCommandType(GetIntProperty(sPropertyDataCommandType, rPropSet)); ProcessString(XML_CONDITION, XML_NAMESPACE_OOOW, GetStringProperty(sPropertyCondition, rPropSet)); - DBG_ASSERT(sPresentation.equals(sEmpty), + DBG_ASSERT(sPresentation.isEmpty(), "Unexpected presentation for database next field"); ExportDataBaseElement(XML_DATABASE_NEXT, OUString(), rPropSet, xPropSetInfo); @@ -1412,7 +1412,7 @@ void XMLTextFieldExport::ExportFieldHelper( GetStringProperty(sPropertyCondition, rPropSet)); ProcessInteger(XML_ROW_NUMBER, GetIntProperty(sPropertySetNumber, rPropSet)); - DBG_ASSERT(sPresentation.equals(sEmpty), + DBG_ASSERT(sPresentation.isEmpty(), "Unexpected presentation for database select field"); ExportDataBaseElement(XML_DATABASE_ROW_SELECT, OUString(), rPropSet, xPropSetInfo); @@ -1432,7 +1432,7 @@ void XMLTextFieldExport::ExportFieldHelper( { ProcessValueAndType(false, // doesn't happen for text GetIntProperty(sPropertyNumberFormat,rPropSet), - sEmpty, sEmpty, 0.0, // not used + "", "", 0.0, // not used false, false, true, false); } ProcessDisplay(GetBoolProperty(sPropertyIsVisible, rPropSet), @@ -1457,7 +1457,7 @@ void XMLTextFieldExport::ExportFieldHelper( case FIELD_ID_DOCINFO_PRINT_DATE: ProcessValueAndType(false, GetIntProperty(sPropertyNumberFormat, rPropSet), - sEmpty, sEmpty, 0.0, + "", "", 0.0, false, false, true, ! GetOptionalBoolProperty( sPropertyIsFixedLanguage, @@ -1488,7 +1488,7 @@ void XMLTextFieldExport::ExportFieldHelper( { ProcessValueAndType(false, // doesn't happen for text GetIntProperty(sPropertyNumberFormat,rPropSet), - sEmpty, sEmpty, 0.0, // not used + "", "", 0.0, // not used false, false, true, ! GetOptionalBoolProperty( sPropertyIsFixedLanguage, @@ -1549,7 +1549,7 @@ void XMLTextFieldExport::ExportFieldHelper( ProcessBoolean(XML_IS_HIDDEN, GetBoolProperty(sPropertyIsHidden, rPropSet), false); - DBG_ASSERT(sPresentation.equals(sEmpty), + DBG_ASSERT(sPresentation.isEmpty(), "Unexpected presentation for hidden paragraph field"); ExportElement(XML_HIDDEN_PARAGRAPH); break; @@ -1593,7 +1593,7 @@ void XMLTextFieldExport::ExportFieldHelper( GetBoolProperty(sPropertyOn, rPropSet), true); ProcessIntegerDef(XML_PAGE_ADJUST, GetInt16Property(sPropertyOffset, rPropSet), 0); - DBG_ASSERT(sPresentation.equals(sEmpty), + DBG_ASSERT(sPresentation.isEmpty(), "Unexpected presentation page variable field"); ExportElement(XML_PAGE_VARIABLE_SET); break; @@ -1709,7 +1709,7 @@ void XMLTextFieldExport::ExportFieldHelper( ProcessString(XML_LANGUAGE, GetStringProperty(sPropertyScriptType, rPropSet), true, XML_NAMESPACE_SCRIPT); - DBG_ASSERT(sPresentation.equals(sEmpty), + DBG_ASSERT(sPresentation.isEmpty(), "Unexpected presentation for script field"); if (GetBoolProperty(sPropertyURLContent, rPropSet)) { @@ -1728,7 +1728,7 @@ void XMLTextFieldExport::ExportFieldHelper( case FIELD_ID_ANNOTATION: { // check for empty presentation (just in case) - DBG_ASSERT(sPresentation.equals(sEmpty), + DBG_ASSERT(sPresentation.isEmpty(), "Unexpected presentation for annotation field"); // annotation element + content @@ -1818,7 +1818,7 @@ void XMLTextFieldExport::ExportFieldHelper( GetBoolProperty(sPropertyIsShowFormula, rPropSet) ); ProcessValueAndType( false, GetIntProperty(sPropertyNumberFormat, rPropSet), - sEmpty, sEmpty, 0.0f, + "", "", 0.0f, false, false, true, false ); ExportElement( XML_TABLE_FORMULA, sPresentation ); @@ -2026,7 +2026,7 @@ void XMLTextFieldExport::ExportFieldDeclarations( ProcessValueAndType( bIsString, GetIntProperty(sPropertyNumberFormat, xFieldPropSet), - sEmpty, sEmpty, 0.0, + "", "", 0.0, false, true, false, false); } else @@ -2039,7 +2039,7 @@ void XMLTextFieldExport::ExportFieldDeclarations( // from NumberFormats ProcessValueAndType( bIsString, - 0, sEmpty, sEmpty, 0.0, + 0, "", "", 0.0, false, true, false, false); } @@ -2120,7 +2120,7 @@ void XMLTextFieldExport::ExportFieldDeclarations( // expression: ProcessValueAndType( false, - 0, sEmpty, sEmpty, + 0, "", "", GetDoubleProperty(sPropertyValue, xPropSet), true, true, @@ -2343,7 +2343,7 @@ void XMLTextFieldExport::ExportMetaField( // style:data-style-name ProcessValueAndType(false, GetIntProperty(sPropertyNumberFormat, i_xMeta), - sEmpty, sEmpty, 0.0, false, false, true, + "", "", 0.0, false, false, true, false ); // text:meta-field without xml:id is invalid diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx index 88c868ca819b..faa8975cbe7d 100644 --- a/xmloff/source/text/txtimp.cxx +++ b/xmloff/source/text/txtimp.cxx @@ -1181,9 +1181,8 @@ void XMLTextImportHelper::DeleteParagraph() { if (m_xImpl->m_xCursor->goLeft( 1, sal_True )) { - OUString sEmpty; m_xImpl->m_xText->insertString(m_xImpl->m_xCursorAsRange, - sEmpty, sal_True); + "", sal_True); } } } @@ -2779,15 +2778,14 @@ OUString XMLTextImportHelper::GetOpenRedlineId() return m_xImpl->m_sOpenRedlineIdentifier; } -void XMLTextImportHelper::SetOpenRedlineId( OUString& rId) +void XMLTextImportHelper::SetOpenRedlineId( OUString const & rId) { m_xImpl->m_sOpenRedlineIdentifier = rId; } void XMLTextImportHelper::ResetOpenRedlineId() { - OUString sEmpty; - SetOpenRedlineId(sEmpty); + SetOpenRedlineId(""); } void diff --git a/xmloff/source/text/txtimppr.cxx b/xmloff/source/text/txtimppr.cxx index 7e65d799d74b..17804337a0d0 100644 --- a/xmloff/source/text/txtimppr.cxx +++ b/xmloff/source/text/txtimppr.cxx @@ -190,12 +190,11 @@ void XMLTextImportPropertyMapper::FontDefaultsCheck( { if( pFontFamilyName ) { - OUString sEmpty; Any aAny; if( !pFontStyleName ) { - aAny <<= sEmpty; + aAny <<= OUString(); #if OSL_DEBUG_LEVEL > 0 sal_Int16 nTmp = getPropertySetMapper()->GetEntryContextId( pFontFamilyName->mnIndex + 1 ); diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx index 226d7e04a48e..f7f0a8fe6866 100644 --- a/xmloff/source/text/txtparae.cxx +++ b/xmloff/source/text/txtparae.cxx @@ -3675,9 +3675,8 @@ void XMLTextParagraphExport::exportRuby( // ruby style GetExport().CheckAttrList(); - OUString sEmpty; OUString sStyleName(Find( XML_STYLE_FAMILY_TEXT_RUBY, rPropSet, - sEmpty )); + "" )); DBG_ASSERT(!sStyleName.isEmpty(), "I can't find the style!"); GetExport().AddAttribute(XML_NAMESPACE_TEXT, XML_STYLE_NAME, sStyleName); |