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 /xmloff/source/text | |
parent | a6050c32f30796743f9ab9b2a5c793ced9b8f747 (diff) |
Clean up sEmpty
Change-Id: If1b2bfe308caa2bce92e73d2c5c86ee273faed93
Diffstat (limited to 'xmloff/source/text')
-rw-r--r-- | xmloff/source/text/XMLIndexTOCContext.cxx | 5 | ||||
-rw-r--r-- | xmloff/source/text/XMLSectionExport.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/text/XMLSectionExport.hxx | 2 | ||||
-rw-r--r-- | xmloff/source/text/XMLSectionImportContext.cxx | 6 | ||||
-rw-r--r-- | xmloff/source/text/XMLSectionImportContext.hxx | 1 | ||||
-rw-r--r-- | xmloff/source/text/txtflde.cxx | 36 | ||||
-rw-r--r-- | xmloff/source/text/txtimp.cxx | 8 | ||||
-rw-r--r-- | xmloff/source/text/txtimppr.cxx | 3 | ||||
-rw-r--r-- | xmloff/source/text/txtparae.cxx | 3 |
9 files changed, 29 insertions, 37 deletions
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); |