diff options
author | Thomas Arnhold <thomas@arnhold.org> | 2013-03-19 11:39:07 +0100 |
---|---|---|
committer | Thomas Arnhold <thomas@arnhold.org> | 2013-03-19 10:48:30 +0000 |
commit | 39d45390f4fab1e9e85f211d74ed2c08fda5b652 (patch) | |
tree | ac4b224a66a18429cd4722a61ee3d401f8e9951c /sw/source/filter | |
parent | 5c908d0431ee975c1ee7aa245af83b9eb7f95da6 (diff) |
removal of RTL_CONSTASCII_USTRINGPARAM for quoted OUStrings declarations
s/(OUString\s+[a-zA-Z_][A-Za-z0-9_]*\s*)\(\s*RTL_CONSTASCII_USTRINGPARAM\s*\((\s*"[^")]*?"\s*)\)\s*\)/$1\($2\)/gms
Change-Id: Iad20f242c80c4bdc69df17e2d7a69d58ea53654b
Reviewed-on: https://gerrit.libreoffice.org/2835
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
Diffstat (limited to 'sw/source/filter')
-rw-r--r-- | sw/source/filter/html/htmlforw.cxx | 12 | ||||
-rw-r--r-- | sw/source/filter/xml/swxml.cxx | 35 | ||||
-rw-r--r-- | sw/source/filter/xml/wrtxml.cxx | 30 | ||||
-rw-r--r-- | sw/source/filter/xml/xmlexp.cxx | 9 | ||||
-rw-r--r-- | sw/source/filter/xml/xmlfmt.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/xml/xmlimp.cxx | 33 | ||||
-rw-r--r-- | sw/source/filter/xml/xmltble.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/xml/xmltbli.cxx | 5 | ||||
-rw-r--r-- | sw/source/filter/xml/xmltexti.cxx | 10 |
9 files changed, 64 insertions, 78 deletions
diff --git a/sw/source/filter/html/htmlforw.cxx b/sw/source/filter/html/htmlforw.cxx index 42e925a754e6..f224bf837bb1 100644 --- a/sw/source/filter/html/htmlforw.cxx +++ b/sw/source/filter/html/htmlforw.cxx @@ -425,7 +425,7 @@ void SwHTMLWriter::OutHiddenForm( const uno::Reference< form::XForm > & rForm ) if( bHiddenOnly ) { uno::Reference< beans::XPropertySet > xPropSet( xFormComp, uno::UNO_QUERY ); - OUString sPropName(RTL_CONSTASCII_USTRINGPARAM("ClassId")); + OUString sPropName("ClassId"); if( xPropSet->getPropertySetInfo()->hasPropertyByName( sPropName ) ) { uno::Any aAny2 = xPropSet->getPropertyValue( sPropName ); @@ -674,7 +674,7 @@ const SdrObject *SwHTMLWriter::GetHTMLControl( const SwDrawFrmFmt& rFmt ) uno::Reference< beans::XPropertySet > xPropSet( xControlModel, uno::UNO_QUERY ); - OUString sPropName(RTL_CONSTASCII_USTRINGPARAM("ClassId")); + OUString sPropName("ClassId"); if( !xPropSet->getPropertySetInfo()->hasPropertyByName( sPropName ) ) return 0; @@ -850,7 +850,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt, GetControlSize( rSdrObject, aSz, rWrt.pDoc ); sal_Bool bMultiLine = sal_False; - OUString sMultiLine(RTL_CONSTASCII_USTRINGPARAM("MultiLine")); + OUString sMultiLine("MultiLine"); if( xPropSetInfo->hasPropertyByName( sMultiLine ) ) { aTmp = xPropSet->getPropertyValue( sMultiLine ); @@ -897,7 +897,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt, else { eType = TYPE_TEXT; - OUString sEchoChar(RTL_CONSTASCII_USTRINGPARAM("EchoChar")); + OUString sEchoChar("EchoChar"); if( xPropSetInfo->hasPropertyByName( sEchoChar ) ) { aTmp = xPropSet->getPropertyValue( sEchoChar ); @@ -923,7 +923,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt, *(sal_Int16*) aTmp.getValue())); } - OUString sDefaultText(RTL_CONSTASCII_USTRINGPARAM("DefaultText")); + OUString sDefaultText("DefaultText"); if( xPropSetInfo->hasPropertyByName( sDefaultText ) ) { aTmp = xPropSet->getPropertyValue( sDefaultText ); @@ -1087,7 +1087,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt, SfxItemSet aItemSet( rHTMLWrt.pDoc->GetAttrPool(), RES_CHRATR_BEGIN, RES_CHRATR_END ); - OUString sPropName(RTL_CONSTASCII_USTRINGPARAM("BackgroundColor")); + OUString sPropName("BackgroundColor"); if( xPropSetInfo->hasPropertyByName( sPropName ) ) { aTmp = xPropSet->getPropertyValue( sPropName ); diff --git a/sw/source/filter/xml/swxml.cxx b/sw/source/filter/xml/swxml.cxx index d5d46ac144f6..9474dd1772c3 100644 --- a/sw/source/filter/xml/swxml.cxx +++ b/sw/source/filter/xml/swxml.cxx @@ -350,7 +350,7 @@ sal_Int32 ReadThroughComponent( OSL_ENSURE( xInfoSet.is(), "missing property set" ); if( xInfoSet.is() ) { - OUString sPropName( RTL_CONSTASCII_USTRINGPARAM("StreamName") ); + OUString sPropName("StreamName"); xInfoSet->setPropertyValue( sPropName, makeAny( sStreamName ) ); } @@ -660,7 +660,7 @@ sal_uLong XMLReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPaM, con if( xParentSet.is() ) { uno::Reference< beans::XPropertySetInfo > xPropSetInfo( xParentSet->getPropertySetInfo() ); - OUString sPropName( RTL_CONSTASCII_USTRINGPARAM("BuildId" ) ); + OUString sPropName("BuildId" ); if( xPropSetInfo.is() && xPropSetInfo->hasPropertyByName(sPropName) ) { xInfoSet->setPropertyValue( sPropName, xParentSet->getPropertyValue(sPropName) ); @@ -694,7 +694,7 @@ sal_uLong XMLReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPaM, con } uno::Any aProgRange; aProgRange <<= nProgressRange; - OUString sProgressRange(RTL_CONSTASCII_USTRINGPARAM("ProgressRange")); + OUString sProgressRange("ProgressRange"); xInfoSet->setPropertyValue(sProgressRange, aProgRange); Reference< container::XNameAccess > xLateInitSettings( document::NamedPropertyValues::create(xContext), UNO_QUERY_THROW ); @@ -746,13 +746,11 @@ sal_uLong XMLReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPaM, con // SFX_STYLE_FAMILY_PSEUDO; *pSeq++ = OUString("NumberingStyles"); - OUString sStyleInsertModeFamilies( - RTL_CONSTASCII_USTRINGPARAM("StyleInsertModeFamilies")); + OUString sStyleInsertModeFamilies("StyleInsertModeFamilies"); xInfoSet->setPropertyValue( sStyleInsertModeFamilies, makeAny(aFamiliesSeq) ); - OUString sStyleInsertModeOverwrite( - RTL_CONSTASCII_USTRINGPARAM("StyleInsertModeOverwrite")); + OUString sStyleInsertModeOverwrite("StyleInsertModeOverwrite"); sal_Bool bTmp = !aOpt.IsMerge(); Any aAny; aAny.setValue( &bTmp, ::getBooleanCppuType() ); @@ -762,8 +760,7 @@ sal_uLong XMLReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPaM, con { const uno::Reference<text::XTextRange> xInsertTextRange = SwXTextRange::CreateXTextRange(rDoc, *rPaM.GetPoint(), 0); - OUString sTextInsertModeRange( - RTL_CONSTASCII_USTRINGPARAM("TextInsertModeRange")); + OUString sTextInsertModeRange("TextInsertModeRange"); xInfoSet->setPropertyValue( sTextInsertModeRange, makeAny(xInsertTextRange) ); } @@ -775,8 +772,7 @@ sal_uLong XMLReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPaM, con if( IsBlockMode() ) { - OUString sAutoTextMode( - RTL_CONSTASCII_USTRINGPARAM("AutoTextMode")); + OUString sAutoTextMode("AutoTextMode"); sal_Bool bTmp = sal_True; Any aAny; aAny.setValue( &bTmp, ::getBooleanCppuType() ); @@ -784,8 +780,7 @@ sal_uLong XMLReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPaM, con } if( IsOrganizerMode() ) { - OUString sOrganizerMode( - RTL_CONSTASCII_USTRINGPARAM("OrganizerMode")); + OUString sOrganizerMode("OrganizerMode"); sal_Bool bTmp = sal_True; Any aAny; aAny.setValue( &bTmp, ::getBooleanCppuType() ); @@ -799,7 +794,7 @@ sal_uLong XMLReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPaM, con OSL_ENSURE( pMedDescrMedium, "There is no medium to get MediaDescriptor from!\n" ); ::rtl::OUString aBaseURL( rBaseURL ); - OUString sPropName( RTL_CONSTASCII_USTRINGPARAM("BaseURI") ); + OUString sPropName("BaseURI"); xInfoSet->setPropertyValue( sPropName, makeAny( aBaseURL ) ); // TODO/LATER: separate links from usual embedded objects @@ -831,15 +826,15 @@ sal_uLong XMLReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPaM, con // save redline mode into import info property set Any aAny; sal_Bool bTmp; - OUString sShowChanges( RTL_CONSTASCII_USTRINGPARAM("ShowChanges") ); + OUString sShowChanges("ShowChanges"); bTmp = IDocumentRedlineAccess::IsShowChanges( rDoc.GetRedlineMode() ); aAny.setValue( &bTmp, ::getBooleanCppuType() ); xInfoSet->setPropertyValue( sShowChanges, aAny ); - OUString sRecordChanges( RTL_CONSTASCII_USTRINGPARAM("RecordChanges") ); + OUString sRecordChanges("RecordChanges"); bTmp = IDocumentRedlineAccess::IsRedlineOn(rDoc.GetRedlineMode()); aAny.setValue( &bTmp, ::getBooleanCppuType() ); xInfoSet->setPropertyValue( sRecordChanges, aAny ); - OUString sRedlineProtectionKey( RTL_CONSTASCII_USTRINGPARAM("RedlineProtectionKey") ); + OUString sRedlineProtectionKey("RedlineProtectionKey"); aAny <<= rDoc.GetRedlinePassword(); xInfoSet->setPropertyValue( sRedlineProtectionKey, aAny ); @@ -933,7 +928,7 @@ sal_uLong XMLReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPaM, con if( !(IsOrganizerMode() || IsBlockMode() || bInsertMode || aOpt.IsFmtsOnly() ) ) { - OUString sStreamName( RTL_CONSTASCII_USTRINGPARAM("layout-cache") ); + OUString sStreamName("layout-cache"); try { uno::Reference < io::XStream > xStm = xStorage->openStreamElement( sStreamName, embed::ElementModes::READ ); @@ -1029,7 +1024,7 @@ sal_uLong XMLReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPaM, con if( xModelSet.is() ) { uno::Reference< beans::XPropertySetInfo > xModelSetInfo( xModelSet->getPropertySetInfo() ); - OUString sName( RTL_CONSTASCII_USTRINGPARAM("BuildId" ) ); + OUString sName("BuildId" ); if( xModelSetInfo.is() && xModelSetInfo->hasPropertyByName(sName) ) { xModelSet->setPropertyValue( sName, xInfoSet->getPropertyValue(sName) ); @@ -1060,7 +1055,7 @@ size_t XMLReader::GetSectionList( SfxMedium& rMedium, { xml::sax::InputSource aParserInput; - OUString sDocName( RTL_CONSTASCII_USTRINGPARAM( "content.xml" ) ); + OUString sDocName( "content.xml" ); aParserInput.sSystemId = sDocName; uno::Reference < io::XStream > xStm = xStg2->openStreamElement( sDocName, embed::ElementModes::READ ); diff --git a/sw/source/filter/xml/wrtxml.cxx b/sw/source/filter/xml/wrtxml.cxx index adb314ea82ed..6cf84811940d 100644 --- a/sw/source/filter/xml/wrtxml.cxx +++ b/sw/source/filter/xml/wrtxml.cxx @@ -172,7 +172,7 @@ pGraphicHelper = SvXMLGraphicHelper::Create( xStg, comphelper::GenericPropertySet_CreateInstance( new comphelper::PropertySetInfo( aInfoMap ) ) ); - const OUString sTargetStorage( RTL_CONSTASCII_USTRINGPARAM("TargetStorage") ); + const OUString sTargetStorage("TargetStorage"); xInfoSet->setPropertyValue( sTargetStorage, Any( xStg ) ); uno::Any aAny; @@ -186,22 +186,22 @@ pGraphicHelper = SvXMLGraphicHelper::Create( xStg, nProgressRange); } aAny <<= nProgressRange; - OUString sProgressRange(RTL_CONSTASCII_USTRINGPARAM("ProgressRange")); + OUString sProgressRange("ProgressRange"); xInfoSet->setPropertyValue(sProgressRange, aAny); aAny <<= static_cast < sal_Int32 >( -1 ); - OUString sProgressMax(RTL_CONSTASCII_USTRINGPARAM("ProgressMax")); + OUString sProgressMax("ProgressMax"); xInfoSet->setPropertyValue(sProgressMax, aAny); } SvtSaveOptions aSaveOpt; - OUString sUsePrettyPrinting(RTL_CONSTASCII_USTRINGPARAM("UsePrettyPrinting")); + OUString sUsePrettyPrinting("UsePrettyPrinting"); sal_Bool bUsePrettyPrinting( aSaveOpt.IsPrettyPrinting() ); aAny.setValue( &bUsePrettyPrinting, ::getBooleanCppuType() ); xInfoSet->setPropertyValue( sUsePrettyPrinting, aAny ); // save show redline mode ... - OUString sShowChanges(RTL_CONSTASCII_USTRINGPARAM("ShowChanges")); + OUString sShowChanges("ShowChanges"); sal_uInt16 nRedlineMode = pDoc->GetRedlineMode(); sal_Bool bShowChanges( IDocumentRedlineAccess::IsShowChanges( nRedlineMode ) ); aAny.setValue( &bShowChanges, ::getBooleanCppuType() ); @@ -212,7 +212,7 @@ pGraphicHelper = SvXMLGraphicHelper::Create( xStg, pDoc->SetRedlineMode((RedlineMode_t)( nRedlineMode )); // Set base URI - OUString sPropName( RTL_CONSTASCII_USTRINGPARAM("BaseURI") ); + OUString sPropName("BaseURI"); xInfoSet->setPropertyValue( sPropName, makeAny( ::rtl::OUString( GetBaseURL() ) ) ); if( SFX_CREATE_MODE_EMBEDDED == pDoc->GetDocShell()->GetCreateMode() ) @@ -229,8 +229,7 @@ pGraphicHelper = SvXMLGraphicHelper::Create( xStg, if( bBlock ) { - OUString sAutoTextMode( - RTL_CONSTASCII_USTRINGPARAM("AutoTextMode")); + OUString sAutoTextMode("AutoTextMode"); sal_Bool bTmp = sal_True; Any aAny2; aAny2.setValue( &bTmp, ::getBooleanCppuType() ); @@ -242,8 +241,7 @@ pGraphicHelper = SvXMLGraphicHelper::Create( xStg, if ( bOASIS && docfunc::HasOutlineStyleToBeWrittenAsNormalListStyle( *pDoc ) ) { - OUString sOutlineStyleAsNormalListStyle( - RTL_CONSTASCII_USTRINGPARAM("OutlineStyleAsNormalListStyle") ); + OUString sOutlineStyleAsNormalListStyle("OutlineStyleAsNormalListStyle"); xInfoSet->setPropertyValue( sOutlineStyleAsNormalListStyle, makeAny( sal_True ) ); } @@ -306,7 +304,7 @@ pGraphicHelper = SvXMLGraphicHelper::Create( xStg, { const uno::Reference<beans::XPropertySet> xPropSet(xStg, uno::UNO_QUERY_THROW); - const ::rtl::OUString VersionProp(RTL_CONSTASCII_USTRINGPARAM("Version")); + const ::rtl::OUString VersionProp("Version"); try { ::rtl::OUString Version; @@ -407,7 +405,7 @@ pGraphicHelper = SvXMLGraphicHelper::Create( xStg, if( pDoc->GetCurrentViewShell() && pDoc->GetDocStat().nPage > 1 && //swmod 071108//swmod 071225 !(bOrganizerMode || bBlock || bErr) ) { - OUString sStreamName( RTL_CONSTASCII_USTRINGPARAM("layout-cache") ); + OUString sStreamName("layout-cache"); try { uno::Reference < io::XStream > xStm = xStg->openStreamElement( sStreamName, embed::ElementModes::READWRITE | embed::ElementModes::TRUNCATE ); @@ -415,7 +413,7 @@ pGraphicHelper = SvXMLGraphicHelper::Create( xStg, if( !pStream->GetError() ) { uno::Reference < beans::XPropertySet > xSet( xStm, UNO_QUERY ); - OUString aMime( RTL_CONSTASCII_USTRINGPARAM("application/binary") ); + OUString aMime("application/binary"); uno::Any aAny2; aAny2 <<= aMime; xSet->setPropertyValue( rtl::OUString("MediaType"), aAny2 ); @@ -529,12 +527,12 @@ bool SwXMLWriter::WriteThroughComponent( if( !xSet.is() ) return false; - OUString aMime( RTL_CONSTASCII_USTRINGPARAM("text/xml") ); + OUString aMime("text/xml"); uno::Any aAny; aAny <<= aMime; xSet->setPropertyValue( rtl::OUString("MediaType"), aAny ); - OUString aUseCommonPassPropName( RTL_CONSTASCII_USTRINGPARAM("UseCommonStoragePasswordEncryption") ); + OUString aUseCommonPassPropName("UseCommonStoragePasswordEncryption"); // even plain stream should be encrypted in encrypted documents sal_Bool bTrue = sal_True; @@ -551,7 +549,7 @@ bool SwXMLWriter::WriteThroughComponent( OSL_ENSURE( xInfoSet.is(), "missing property set" ); if( xInfoSet.is() ) { - OUString sPropName( RTL_CONSTASCII_USTRINGPARAM("StreamName") ); + OUString sPropName("StreamName"); xInfoSet->setPropertyValue( sPropName, makeAny( sStreamName ) ); } diff --git a/sw/source/filter/xml/xmlexp.cxx b/sw/source/filter/xml/xmlexp.cxx index 3cb4fb7e0a80..ea2bbec578ce 100644 --- a/sw/source/filter/xml/xmlexp.cxx +++ b/sw/source/filter/xml/xmlexp.cxx @@ -116,8 +116,7 @@ sal_uInt32 SwXMLExport::exportDoc( enum XMLTokenEnum eClass ) Reference<XPropertySet> rInfoSet = getExportInfo(); if( rInfoSet.is() ) { - OUString sAutoTextMode( - RTL_CONSTASCII_USTRINGPARAM("AutoTextMode")); + OUString sAutoTextMode("AutoTextMode"); if( rInfoSet->getPropertySetInfo()->hasPropertyByName( sAutoTextMode ) ) { @@ -288,7 +287,7 @@ sal_uInt32 SwXMLExport::exportDoc( enum XMLTokenEnum eClass ) Reference<XPropertySet> rInfoSet = getExportInfo(); if( rInfoSet.is() ) { - OUString sShowChanges( RTL_CONSTASCII_USTRINGPARAM("ShowChanges")); + OUString sShowChanges("ShowChanges"); bSaveRedline = ! rInfoSet->getPropertySetInfo()->hasPropertyByName( sShowChanges ); } @@ -391,7 +390,7 @@ void SwXMLExport::GetViewSettings(Sequence<PropertyValue>& aProps) Reference<XPropertySet> xInfoSet( getExportInfo() ); if ( xInfoSet.is() ) { - OUString sShowChanges( RTL_CONSTASCII_USTRINGPARAM( "ShowChanges" )); + OUString sShowChanges( "ShowChanges" ); if( xInfoSet->getPropertySetInfo()->hasPropertyByName( sShowChanges ) ) { bShowRedlineChanges = *(sal_Bool*) xInfoSet-> @@ -486,7 +485,7 @@ void SwXMLExport::_ExportContent() Reference<XPropertySet> xPropSet(GetModel(), UNO_QUERY); if (xPropSet.is()) { - OUString sTwoDigitYear(RTL_CONSTASCII_USTRINGPARAM("TwoDigitYear")); + OUString sTwoDigitYear("TwoDigitYear"); Any aAny = xPropSet->getPropertyValue( sTwoDigitYear ); aAny <<= (sal_Int16)1930; diff --git a/sw/source/filter/xml/xmlfmt.cxx b/sw/source/filter/xml/xmlfmt.cxx index 07d81cf9b336..8eae79fb2586 100644 --- a/sw/source/filter/xml/xmlfmt.cxx +++ b/sw/source/filter/xml/xmlfmt.cxx @@ -304,8 +304,8 @@ uno::Reference < style::XStyle > SwXMLTextStyleContext_Impl::Create() uno::UNO_QUERY ); if( xFactory.is() ) { - OUString sServiceName( RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.style.ConditionalParagraphStyle" ) ); + OUString sServiceName( + "com.sun.star.style.ConditionalParagraphStyle" ); uno::Reference < uno::XInterface > xIfc = xFactory->createInstance( sServiceName ); if( xIfc.is() ) diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx index 3adac9ab2faa..8b79d6bd2327 100644 --- a/sw/source/filter/xml/xmlimp.cxx +++ b/sw/source/filter/xml/xmlimp.cxx @@ -526,19 +526,18 @@ void SwXMLImport::startDocument( void ) { Any aAny; // insert style mode? - OUString sStyleInsertModeFamilies( - RTL_CONSTASCII_USTRINGPARAM("StyleInsertModeFamilies")); + OUString sStyleInsertModeFamilies("StyleInsertModeFamilies"); if( xPropertySetInfo->hasPropertyByName(sStyleInsertModeFamilies) ) { aAny = xImportInfo->getPropertyValue(sStyleInsertModeFamilies); Sequence< OUString> aFamiliesSeq; if( aAny >>= aFamiliesSeq ) { - OUString sFrameStyles( RTL_CONSTASCII_USTRINGPARAM ( "FrameStyles" ) ); - OUString sPageStyles( RTL_CONSTASCII_USTRINGPARAM ( "PageStyles" ) ); - OUString sCharacterStyles( RTL_CONSTASCII_USTRINGPARAM ( "CharacterStyles" ) ); - OUString sParagraphStyles( RTL_CONSTASCII_USTRINGPARAM ( "ParagraphStyles" ) ); - OUString sNumberingStyles( RTL_CONSTASCII_USTRINGPARAM ( "NumberingStyles" ) ); + OUString sFrameStyles( "FrameStyles" ); + OUString sPageStyles( "PageStyles" ); + OUString sCharacterStyles( "CharacterStyles" ); + OUString sParagraphStyles( "ParagraphStyles" ); + OUString sNumberingStyles( "NumberingStyles" ); sal_uInt16 nFamilyMask = 0U; sal_Int32 nCount = aFamiliesSeq.getLength(); const OUString *pSeq = aFamiliesSeq.getConstArray(); @@ -558,8 +557,7 @@ void SwXMLImport::startDocument( void ) } sal_Bool bOverwrite = sal_False; - OUString sStyleInsertModeOverwrite( - RTL_CONSTASCII_USTRINGPARAM("StyleInsertModeOverwrite")); + OUString sStyleInsertModeOverwrite("StyleInsertModeOverwrite"); if( xPropertySetInfo->hasPropertyByName(sStyleInsertModeOverwrite) ) { aAny = xImportInfo->getPropertyValue(sStyleInsertModeOverwrite); @@ -573,8 +571,7 @@ void SwXMLImport::startDocument( void ) } // text insert mode? - OUString sTextInsertModeRange( - RTL_CONSTASCII_USTRINGPARAM("TextInsertModeRange")); + OUString sTextInsertModeRange("TextInsertModeRange"); if( xPropertySetInfo->hasPropertyByName(sTextInsertModeRange) ) { aAny = xImportInfo->getPropertyValue(sTextInsertModeRange); @@ -584,8 +581,7 @@ void SwXMLImport::startDocument( void ) } // auto text mode - OUString sAutoTextMode( - RTL_CONSTASCII_USTRINGPARAM("AutoTextMode")); + OUString sAutoTextMode("AutoTextMode"); if( xPropertySetInfo->hasPropertyByName(sAutoTextMode) ) { aAny = xImportInfo->getPropertyValue(sAutoTextMode); @@ -595,8 +591,7 @@ void SwXMLImport::startDocument( void ) } // organizer mode - OUString sOrganizerMode( - RTL_CONSTASCII_USTRINGPARAM("OrganizerMode")); + OUString sOrganizerMode("OrganizerMode"); if( xPropertySetInfo->hasPropertyByName(sOrganizerMode) ) { aAny = xImportInfo->getPropertyValue(sOrganizerMode); @@ -1169,14 +1164,14 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC bool bBackgroundParaOverDrawings = false; bool bTabOverMargin = false; - OUString sRedlineProtectionKey( RTL_CONSTASCII_USTRINGPARAM( "RedlineProtectionKey" ) ); + OUString sRedlineProtectionKey( "RedlineProtectionKey" ); const PropertyValue* currentDatabaseDataSource = NULL; const PropertyValue* currentDatabaseCommand = NULL; const PropertyValue* currentDatabaseCommandType = NULL; - OUString currentDatabaseDataSourceKey( RTL_CONSTASCII_USTRINGPARAM( "CurrentDatabaseDataSource" )); - OUString currentDatabaseCommandKey( RTL_CONSTASCII_USTRINGPARAM( "CurrentDatabaseCommand" )); - OUString currentDatabaseCommandTypeKey( RTL_CONSTASCII_USTRINGPARAM( "CurrentDatabaseCommandType" )); + OUString currentDatabaseDataSourceKey( "CurrentDatabaseDataSource" ); + OUString currentDatabaseCommandKey( "CurrentDatabaseCommand" ); + OUString currentDatabaseCommandTypeKey( "CurrentDatabaseCommandType" ); while( nCount-- ) { diff --git a/sw/source/filter/xml/xmltble.cxx b/sw/source/filter/xml/xmltble.cxx index 26d2d60eb506..d33edb61ccee 100644 --- a/sw/source/filter/xml/xmltble.cxx +++ b/sw/source/filter/xml/xmltble.cxx @@ -697,7 +697,7 @@ void SwXMLExport::ExportTableLinesAutoStyles( const SwTableLines& rLines, { Reference<XPropertySet> xCellPropertySet( xCell, UNO_QUERY ); - OUString sTextSection( RTL_CONSTASCII_USTRINGPARAM("TextSection") ); + OUString sTextSection("TextSection"); Any aAny = xCellPropertySet->getPropertyValue(sTextSection); Reference < XTextSection > xTextSection; aAny >>= xTextSection; @@ -872,7 +872,7 @@ void SwXMLExport::ExportTableBox( const SwTableBox& rBox, if( !rTblInfo.IsBaseSectionValid() ) { - OUString sTextSection( RTL_CONSTASCII_USTRINGPARAM("TextSection") ); + OUString sTextSection("TextSection"); aAny = xCellPropertySet->getPropertyValue(sTextSection); Reference < XTextSection > xTextSection; aAny >>= xTextSection; diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx index 17c82d3a3992..cc273a7eea7a 100644 --- a/sw/source/filter/xml/xmltbli.cxx +++ b/sw/source/filter/xml/xmltbli.cxx @@ -1388,8 +1388,7 @@ SwXMLTableContext::SwXMLTableContext( SwXMLImport& rImport, OSL_ENSURE( xFactory.is(), "factory missing" ); if( xFactory.is() ) { - OUString sService( - RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.text.TextTable" ) ); + OUString sService( "com.sun.star.text.TextTable" ); Reference<XInterface> xIfc = xFactory->createInstance( sService ); OSL_ENSURE( xIfc.is(), "Couldn't create a table" ); @@ -2904,7 +2903,7 @@ const SwStartNode *SwXMLTableContext::InsertTableSection( // The Cursor already is in the first section pStNd = pTxtCrsr->GetPaM()->GetNode()->FindTableBoxStartNode(); bFirstSection = false; - OUString sStyleName( RTL_CONSTASCII_USTRINGPARAM("Standard") ); + OUString sStyleName("Standard"); GetImport().GetTextImport()->SetStyleAndAttrs( GetImport(), GetImport().GetTextImport()->GetCursor(), sStyleName, sal_True ); } diff --git a/sw/source/filter/xml/xmltexti.cxx b/sw/source/filter/xml/xmltexti.cxx index e2f5b0d0e74c..62665b2c43a0 100644 --- a/sw/source/filter/xml/xmltexti.cxx +++ b/sw/source/filter/xml/xmltexti.cxx @@ -278,7 +278,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertOLEObject( { // create object with desired ClassId sal_Int64 nAspect = embed::Aspects::MSOLE_CONTENT; - ::rtl::OUString aName(RTL_CONSTASCII_USTRINGPARAM("DummyName")); + ::rtl::OUString aName("DummyName"); uno::Sequence < sal_Int8 > aClass( aClassName.GetByteSequence() ); uno::Reference < embed::XEmbeddedObjectCreator > xFactory = embed::EmbeddedObjectCreator::create( ::comphelper::getProcessComponentContext() ); uno::Reference < embed::XEmbeddedObject > xObj = @@ -567,7 +567,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertOOoLink( try { // create object with desired ClassId - ::rtl::OUString aName(RTL_CONSTASCII_USTRINGPARAM("DummyName")); + ::rtl::OUString aName("DummyName"); uno::Reference < embed::XEmbeddedObjectCreator > xFactory = embed::OOoEmbeddedObjectFactory::create(::comphelper::getProcessComponentContext()); @@ -698,7 +698,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertPlugin( try { // create object with desired ClassId - ::rtl::OUString aName(RTL_CONSTASCII_USTRINGPARAM("DummyName")); + ::rtl::OUString aName("DummyName"); uno::Sequence < sal_Int8 > aClass( SvGlobalName( SO3_PLUGIN_CLASSID ).GetByteSequence() ); uno::Reference < embed::XEmbeddedObjectCreator > xFactory = embed::EmbeddedObjectCreator::create( ::comphelper::getProcessComponentContext() ); uno::Reference < embed::XEmbeddedObject > xObj = @@ -829,7 +829,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertFloatingFra try { // create object with desired ClassId - ::rtl::OUString aName(RTL_CONSTASCII_USTRINGPARAM("DummyName")); + ::rtl::OUString aName("DummyName"); uno::Sequence < sal_Int8 > aClass( SvGlobalName( SO3_IFRAME_CLASSID ).GetByteSequence() ); uno::Reference < embed::XEmbeddedObjectCreator > xFactory = embed::EmbeddedObjectCreator::create( ::comphelper::getProcessComponentContext() ); uno::Reference < embed::XEmbeddedObject > xObj = @@ -935,7 +935,7 @@ void SwXMLTextImportHelper::endAppletOrPlugin( } // unfortunately the names of the properties are depending on the object - ::rtl::OUString aParaName(RTL_CONSTASCII_USTRINGPARAM("AppletCommands")); + ::rtl::OUString aParaName("AppletCommands"); try { xSet->setPropertyValue( aParaName, makeAny( aCommandSequence ) ); |