diff options
Diffstat (limited to 'xmloff/source/text')
-rw-r--r-- | xmloff/source/text/XMLCalculationSettingsContext.cxx | 3 | ||||
-rw-r--r-- | xmloff/source/text/XMLIndexTOCContext.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/text/XMLSectionFootnoteConfigImport.cxx | 3 | ||||
-rw-r--r-- | xmloff/source/text/txtflde.cxx | 18 | ||||
-rw-r--r-- | xmloff/source/text/txtfldi.cxx | 8 | ||||
-rw-r--r-- | xmloff/source/text/txtimp.cxx | 12 | ||||
-rw-r--r-- | xmloff/source/text/txtparae.cxx | 22 | ||||
-rw-r--r-- | xmloff/source/text/txtparai.cxx | 6 | ||||
-rw-r--r-- | xmloff/source/text/txtstyle.cxx | 3 | ||||
-rw-r--r-- | xmloff/source/text/txtvfldi.cxx | 3 |
10 files changed, 22 insertions, 60 deletions
diff --git a/xmloff/source/text/XMLCalculationSettingsContext.cxx b/xmloff/source/text/XMLCalculationSettingsContext.cxx index ad4d8463133c..2a22bc8f1ad7 100644 --- a/xmloff/source/text/XMLCalculationSettingsContext.cxx +++ b/xmloff/source/text/XMLCalculationSettingsContext.cxx @@ -75,8 +75,7 @@ void XMLCalculationSettingsContext::EndElement() if (xTextDoc.is()) { Reference < XPropertySet > xPropSet ( xTextDoc, UNO_QUERY ); - OUString sTwoDigitYear ( "TwoDigitYear" ); - xPropSet->setPropertyValue ( sTwoDigitYear, Any(nYear) ); + xPropSet->setPropertyValue ( "TwoDigitYear", Any(nYear) ); } } } diff --git a/xmloff/source/text/XMLIndexTOCContext.cxx b/xmloff/source/text/XMLIndexTOCContext.cxx index 0f741002a713..26621f72aaa1 100644 --- a/xmloff/source/text/XMLIndexTOCContext.cxx +++ b/xmloff/source/text/XMLIndexTOCContext.cxx @@ -189,9 +189,9 @@ void XMLIndexTOCContext::StartElement( // preliminaries #ifndef DBG_UTIL - OUString sMarker(" "); + OUString const sMarker(" "); #else - OUString sMarker("Y"); + OUString const sMarker("Y"); #endif rtl::Reference<XMLTextImportHelper> rImport = GetImport().GetTextImport(); diff --git a/xmloff/source/text/XMLSectionFootnoteConfigImport.cxx b/xmloff/source/text/XMLSectionFootnoteConfigImport.cxx index 78f061cad181..fe697f07f8bb 100644 --- a/xmloff/source/text/XMLSectionFootnoteConfigImport.cxx +++ b/xmloff/source/text/XMLSectionFootnoteConfigImport.cxx @@ -65,7 +65,6 @@ XMLSectionFootnoteConfigImport::~XMLSectionFootnoteConfigImport() void XMLSectionFootnoteConfigImport::StartElement( const Reference<XAttributeList> & xAttrList) { - bool bEnd = true; // we're inside the element, so this is true bool bNumOwn = false; bool bNumRestart = false; bool bEndnote = false; @@ -166,7 +165,7 @@ void XMLSectionFootnoteConfigImport::StartElement( nIndex = rMapper->FindEntryIndex( bEndnote ? CTF_SECTION_ENDNOTE_END : CTF_SECTION_FOOTNOTE_END ); - XMLPropertyState aEndState( nIndex, css::uno::Any(bEnd) ); + XMLPropertyState aEndState( nIndex, css::uno::Any(true) ); // we're inside the element, so this is true rProperties.push_back( aEndState ); } diff --git a/xmloff/source/text/txtflde.cxx b/xmloff/source/text/txtflde.cxx index dcc878248bd1..713b2621a9bc 100644 --- a/xmloff/source/text/txtflde.cxx +++ b/xmloff/source/text/txtflde.cxx @@ -2236,13 +2236,7 @@ void XMLTextFieldExport::ExportMacro( { // some strings we'll need OUString sEventType( "EventType" ); - OUString sStarBasic( "StarBasic" ); OUString sScript( "Script" ); - OUString sLibrary( "Library" ); - OUString sMacroName( "MacroName" ); - OUString sOnClick( "OnClick" ); - OUString sPropertyMacroLibrary( "MacroLibrary" ); - OUString sPropertyMacroName( "MacroName" ); OUString sPropertyScriptURL( "ScriptURL" ); @@ -2278,15 +2272,15 @@ void XMLTextFieldExport::ExportMacro( aSeq = Sequence<PropertyValue> (3); PropertyValue* pArr = aSeq.getArray(); pArr[0].Name = sEventType; - pArr[0].Value <<= sStarBasic; - pArr[1].Name = sLibrary; - pArr[1].Value = rPropSet->getPropertyValue( sPropertyMacroLibrary ); - pArr[2].Name = sMacroName; - pArr[2].Value = rPropSet->getPropertyValue( sPropertyMacroName ); + pArr[0].Value <<= OUString("StarBasic"); + pArr[1].Name = "Library"; + pArr[1].Value = rPropSet->getPropertyValue( "MacroLibrary" ); + pArr[2].Name = "MacroName"; + pArr[2].Value = rPropSet->getPropertyValue( "MacroName" ); } // 2) export the sequence - GetExport().GetEventExport().ExportSingleEvent( aSeq, sOnClick, false ); + GetExport().GetEventExport().ExportSingleEvent( aSeq, "OnClick", false ); // and finally, the field presentation GetExport().Characters(rContent); diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx index 392bfecf34a7..c105ee7b49a4 100644 --- a/xmloff/source/text/txtfldi.cxx +++ b/xmloff/source/text/txtfldi.cxx @@ -2468,10 +2468,6 @@ void XMLMacroFieldImportContext::PrepareField( const Reference<XPropertySet> & xPropertySet) { Any aAny; - - OUString sOnClick("OnClick"); - OUString sPropertyMacroLibrary("MacroLibrary"); - aAny <<= (bDescriptionOK ? sDescription : GetContent()); xPropertySet->setPropertyValue(sAPI_hint, aAny); @@ -2488,7 +2484,7 @@ void XMLMacroFieldImportContext::PrepareField( XMLEventsImportContext* pEvents = static_cast<XMLEventsImportContext*>(xEventContext.get()); Sequence<PropertyValue> aValues; - pEvents->GetEventSequence( sOnClick, aValues ); + pEvents->GetEventSequence( "OnClick", aValues ); sal_Int32 nLength = aValues.getLength(); for( sal_Int32 i = 0; i < nLength; i++ ) @@ -2535,7 +2531,7 @@ void XMLMacroFieldImportContext::PrepareField( xPropertySet->setPropertyValue("ScriptURL", Any(sScriptURL)); xPropertySet->setPropertyValue("MacroName", Any(sMacroName)); - xPropertySet->setPropertyValue(sPropertyMacroLibrary, Any(sLibraryName)); + xPropertySet->setPropertyValue("MacroLibrary", Any(sLibraryName)); } diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx index 53bb6b70bced..dc6b16147c19 100644 --- a/xmloff/source/text/txtimp.cxx +++ b/xmloff/source/text/txtimp.cxx @@ -1329,11 +1329,9 @@ OUString XMLTextImportHelper::ConvertStarFonts( const OUString& rChars, rFlags &= ~(CONV_FROM_STAR_BATS|CONV_FROM_STAR_MATH); OUString sFontName; rProp.maValue >>= sFontName; - OUString sStarBats( "StarBats" ); - OUString sStarMath( "StarMath" ); - if( sFontName.equalsIgnoreAsciiCase( sStarBats ) ) + if( sFontName.equalsIgnoreAsciiCase( "StarBats" ) ) rFlags |= CONV_FROM_STAR_BATS; - else if( sFontName.equalsIgnoreAsciiCase( sStarMath ) ) + else if( sFontName.equalsIgnoreAsciiCase( "StarMath" ) ) rFlags |= CONV_FROM_STAR_MATH; break; } @@ -1660,9 +1658,8 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( // TODO: property missing if (xPropSetInfo->hasPropertyByName(s_ParaIsNumberingRestart)) { - bool bTmp = true; xPropSet->setPropertyValue(s_ParaIsNumberingRestart, - makeAny(bTmp) ); + makeAny(true) ); } pListBlock->ResetRestartNumbering(); } @@ -2177,7 +2174,6 @@ void XMLTextImportHelper::SetRuby( Reference<XPropertySet> xPropSet(rCursor, UNO_QUERY); OUString sRubyText("RubyText"); - OUString sRubyCharStyleName("RubyCharStyleName"); // if we have one Ruby property, we assume all of them are present if (xPropSet.is() && @@ -2208,7 +2204,7 @@ void XMLTextImportHelper::SetRuby( if( (!sDisplayName.isEmpty()) && m_xImpl->m_xTextStyles->hasByName( sDisplayName )) { - xPropSet->setPropertyValue(sRubyCharStyleName, makeAny(sDisplayName)); + xPropSet->setPropertyValue("RubyCharStyleName", makeAny(sDisplayName)); } } } diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx index 867e9dbfe18f..b1f8b60c50dc 100644 --- a/xmloff/source/text/txtparae.cxx +++ b/xmloff/source/text/txtparae.cxx @@ -1653,8 +1653,6 @@ void XMLTextParagraphExport::exportText( if( ! xParaEnum.is() ) return; - bool bExportLevels = true; - if (xPropertySet.is()) { Reference < XPropertySetInfo > xInfo ( xPropertySet->getPropertySetInfo() ); @@ -1665,21 +1663,6 @@ void XMLTextParagraphExport::exportText( { xPropertySet->getPropertyValue(sTextSection) >>= xBaseSection ; } - -/* #i35937# - // for applications that use the outliner we need to check if - // the current text object needs the level information exported - if( !bAutoStyles ) - { - // fixme: move string to class member, couldn't do now because - // of no incompatible build - OUString sHasLevels( "HasLevels" ); - if (xInfo->hasPropertyByName( sHasLevels ) ) - { - xPropertySet->getPropertyValue(sHasLevels) >>= bExportLevels; - } - } -*/ } } @@ -1688,7 +1671,7 @@ void XMLTextParagraphExport::exportText( if( !bAutoStyles && (pRedlineExport != nullptr) ) pRedlineExport->ExportStartOrEndRedline( xPropertySet, true ); exportTextContentEnumeration( xParaEnum, bAutoStyles, xBaseSection, - bIsProgress, bExportParagraph, nullptr, bExportLevels, eExtensionNS ); + bIsProgress, bExportParagraph, nullptr, true/*bExportLevels*/, eExtensionNS ); if( !bAutoStyles && (pRedlineExport != nullptr) ) pRedlineExport->ExportStartOrEndRedline( xPropertySet, false ); } @@ -3153,8 +3136,7 @@ void XMLTextParagraphExport::exportEvents( const Reference < XPropertySet > & rP GetExport().GetEventExport().Export(xEventsSupp); // image map - OUString sImageMap("ImageMap"); - if (rPropSet->getPropertySetInfo()->hasPropertyByName(sImageMap)) + if (rPropSet->getPropertySetInfo()->hasPropertyByName("ImageMap")) GetExport().GetImageMapExport().Export( rPropSet ); } diff --git a/xmloff/source/text/txtparai.cxx b/xmloff/source/text/txtparai.cxx index 61cb1e374153..2bad8ab7f422 100644 --- a/xmloff/source/text/txtparai.cxx +++ b/xmloff/source/text/txtparai.cxx @@ -2101,8 +2101,7 @@ XMLParaContext::~XMLParaContext() TextContentAnchorType eAnchorType = TextContentAnchorType_AT_PARAGRAPH; { - OUString sAnchorType( "AnchorType" ); - Any aAny = xPropSet->getPropertyValue( sAnchorType ); + Any aAny = xPropSet->getPropertyValue( "AnchorType" ); aAny >>= eAnchorType; } if ( TextContentAnchorType_AT_CHARACTER == eAnchorType ) @@ -2130,8 +2129,7 @@ XMLParaContext::~XMLParaContext() Reference < XPropertySet > xPropSet( xShape, UNO_QUERY ); TextContentAnchorType eAnchorType = TextContentAnchorType_AT_PARAGRAPH; { - OUString sAnchorType( "AnchorType" ); - Any aAny = xPropSet->getPropertyValue( sAnchorType ); + Any aAny = xPropSet->getPropertyValue( "AnchorType" ); aAny >>= eAnchorType; } if ( TextContentAnchorType_AT_CHARACTER == eAnchorType ) diff --git a/xmloff/source/text/txtstyle.cxx b/xmloff/source/text/txtstyle.cxx index 0832876e57e8..eefa1d2fca6a 100644 --- a/xmloff/source/text/txtstyle.cxx +++ b/xmloff/source/text/txtstyle.cxx @@ -116,8 +116,7 @@ void XMLTextParagraphExport::exportTextStyles( bool bUsed, bool bProg ) Reference < lang::XMultiServiceFactory > xFactory (GetExport().GetModel(), UNO_QUERY); if (xFactory.is()) { - OUString sTextDefaults ( "com.sun.star.text.Defaults" ); - Reference < XPropertySet > xPropSet (xFactory->createInstance ( sTextDefaults ), UNO_QUERY); + Reference < XPropertySet > xPropSet (xFactory->createInstance ( "com.sun.star.text.Defaults" ), UNO_QUERY); if (xPropSet.is()) { exportDefaultStyle( xPropSet, GetXMLToken(XML_PARAGRAPH), GetParaPropMapper()); diff --git a/xmloff/source/text/txtvfldi.cxx b/xmloff/source/text/txtvfldi.cxx index 7285cf132e33..c150ad5857a6 100644 --- a/xmloff/source/text/txtvfldi.cxx +++ b/xmloff/source/text/txtvfldi.cxx @@ -550,8 +550,7 @@ XMLExpressionFieldImportContext::XMLExpressionFieldImportContext( void XMLExpressionFieldImportContext::PrepareField( const Reference<XPropertySet> & xPropertySet) { - sal_Int16 nSubType = SetVariableType::FORMULA; - xPropertySet->setPropertyValue(sAPI_sub_type, Any(nSubType)); + xPropertySet->setPropertyValue(sAPI_sub_type, Any(sal_Int16(SetVariableType::FORMULA))); // delegate to super class XMLVarFieldImportContext::PrepareField(xPropertySet); |