diff options
author | Caolán McNamara <caolanm@redhat.com> | 2010-10-27 11:38:46 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2010-10-27 16:05:02 +0100 |
commit | babbd10f8616781e340abb6202d75f17ef577b42 (patch) | |
tree | 2ce328ddf75d94b40e96feb8258ed1bc102bab0c | |
parent | ce3579e1cfbd3b4494e717e44e42db03a71bd88d (diff) |
micro optimizations
99 files changed, 411 insertions, 421 deletions
diff --git a/sw/inc/PostItMgr.hxx b/sw/inc/PostItMgr.hxx index d439f97579..2823b10ec0 100644 --- a/sw/inc/PostItMgr.hxx +++ b/sw/inc/PostItMgr.hxx @@ -112,7 +112,7 @@ class SwNoteProps: public utl::ConfigItem bool bIsShowAnchor; public: SwNoteProps() - : ConfigItem(::rtl::OUString::createFromAscii("Office.Writer/Notes")) + : ConfigItem(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Office.Writer/Notes"))) , bIsShowAnchor(false) { const ::com::sun::star::uno::Sequence< ::rtl::OUString >& rNames = GetPropertyNames(); @@ -127,23 +127,17 @@ class SwNoteProps: public utl::ConfigItem { return bIsShowAnchor; } - ::com::sun::star::uno::Sequence< ::rtl::OUString >& GetPropertyNames() - { + ::com::sun::star::uno::Sequence< ::rtl::OUString >& GetPropertyNames() + { static ::com::sun::star::uno::Sequence< ::rtl::OUString > aNames; - if(!aNames.getLength()) - { - static const char* aPropNames[] = - { - "ShowAnkor" - }; - const int nCount = sizeof(aPropNames)/sizeof(const char*); - aNames.realloc(nCount); - ::rtl::OUString* pNames = aNames.getArray(); - for(int i = 0; i < nCount; i++) - pNames[i] = ::rtl::OUString::createFromAscii(aPropNames[i]); - } - return aNames; + if(!aNames.getLength()) + { + aNames.realloc(1); + ::rtl::OUString* pNames = aNames.getArray(); + pNames[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ShowAnkor")); } + return aNames; + } virtual void Commit(); virtual void Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames ); diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx index f774805b12..1da057ee7b 100644 --- a/sw/source/core/access/accpara.cxx +++ b/sw/source/core/access/accpara.cxx @@ -1471,7 +1471,7 @@ uno::Sequence< PropertyValue > SwAccessibleParagraph::getDefaultAttributes( _getDefaultAttributesImpl( aRequestedAttributes, aDefAttrSeq ); // --> OD 2010-03-08 #i92233# - static rtl::OUString sMMToPixelRatio( rtl::OUString::createFromAscii( "MMToPixelRatio" ) ); + static rtl::OUString sMMToPixelRatio(RTL_CONSTASCII_USTRINGPARAM("MMToPixelRatio")); bool bProvideMMToPixelRatio( false ); { if ( aRequestedAttributes.getLength() == 0 ) diff --git a/sw/source/core/bastyp/SwSmartTagMgr.cxx b/sw/source/core/bastyp/SwSmartTagMgr.cxx index f4d4c776d7..68e6308ba3 100644 --- a/sw/source/core/bastyp/SwSmartTagMgr.cxx +++ b/sw/source/core/bastyp/SwSmartTagMgr.cxx @@ -46,7 +46,7 @@ SwSmartTagMgr& SwSmartTagMgr::Get() if ( !mpTheSwSmartTagMgr ) { mpTheSwSmartTagMgr = new SwSmartTagMgr( SwDocShell::Factory().GetModuleName() ); - mpTheSwSmartTagMgr->Init( rtl::OUString::createFromAscii("Writer") ); + mpTheSwSmartTagMgr->Init(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Writer"))); } return *mpTheSwSmartTagMgr; } diff --git a/sw/source/core/bastyp/breakit.cxx b/sw/source/core/bastyp/breakit.cxx index fc56b9d3fa..b670b13058 100644 --- a/sw/source/core/bastyp/breakit.cxx +++ b/sw/source/core/bastyp/breakit.cxx @@ -72,12 +72,12 @@ SwBreakIt::SwBreakIt( //{ // xBreak = uno::Reference< i18n::XBreakIterator >( // m_xMSF->createInstance( - // rtl::OUString::createFromAscii( "com.sun.star.i18n.BreakIterator" ) ), + // rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.i18n.BreakIterator")) ), // uno::UNO_QUERY); // xCTLDetect = uno::Reference< i18n::XScriptTypeDetector >( // m_xMSF->createInstance( - // rtl::OUString::createFromAscii( "com.sun.star.i18n.ScriptTypeDetector" ) ), + // rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.i18n.ScriptTypeDetector")) ), // uno::UNO_QUERY); // } } diff --git a/sw/source/core/bastyp/checkit.cxx b/sw/source/core/bastyp/checkit.cxx index 49edc209dc..148e0b6fff 100644 --- a/sw/source/core/bastyp/checkit.cxx +++ b/sw/source/core/bastyp/checkit.cxx @@ -42,7 +42,7 @@ SwCheckIt::SwCheckIt() { Reference< XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory(); Reference < XInterface > xI = xMSF->createInstance( - ::rtl::OUString::createFromAscii( "com.sun.star.i18n.InputSequenceChecker" ) ); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.i18n.InputSequenceChecker")) ); if ( xI.is() ) { Any x = xI->queryInterface( ::getCppuType((const Reference< XExtendedInputSequenceChecker >*)0) ); diff --git a/sw/source/core/crsr/bookmrk.cxx b/sw/source/core/crsr/bookmrk.cxx index 4991c60578..3b8f8bccea 100644 --- a/sw/source/core/crsr/bookmrk.cxx +++ b/sw/source/core/crsr/bookmrk.cxx @@ -181,13 +181,13 @@ namespace sw { namespace mark : MarkBase(rPaM, our_sNamePrefix) { } - const ::rtl::OUString NavigatorReminder::our_sNamePrefix = ::rtl::OUString::createFromAscii("__NavigatorReminder__"); + const ::rtl::OUString NavigatorReminder::our_sNamePrefix(RTL_CONSTASCII_USTRINGPARAM("__NavigatorReminder__")); UnoMark::UnoMark(const SwPaM& aPaM) : MarkBase(aPaM, MarkBase::GenerateNewName(our_sNamePrefix)) { } - const ::rtl::OUString UnoMark::our_sNamePrefix = ::rtl::OUString::createFromAscii("__UnoMark__"); + const ::rtl::OUString UnoMark::our_sNamePrefix(RTL_CONSTASCII_USTRINGPARAM("__UnoMark__")); DdeBookmark::DdeBookmark(const SwPaM& aPaM) : MarkBase(aPaM, MarkBase::GenerateNewName(our_sNamePrefix)) @@ -199,7 +199,7 @@ namespace sw { namespace mark m_aRefObj = pObj; } - const ::rtl::OUString DdeBookmark::our_sNamePrefix = ::rtl::OUString::createFromAscii("__DdeLink__"); + const ::rtl::OUString DdeBookmark::our_sNamePrefix(RTL_CONSTASCII_USTRINGPARAM("__DdeLink__")); void DdeBookmark::DeregisterFromDoc(SwDoc* const pDoc) { @@ -309,7 +309,7 @@ namespace sw { namespace mark aPaM.InvalidatePaM(); } - const ::rtl::OUString Fieldmark::our_sNamePrefix = ::rtl::OUString::createFromAscii("__Fieldmark__"); + const ::rtl::OUString Fieldmark::our_sNamePrefix(RTL_CONSTASCII_USTRINGPARAM("__Fieldmark__")); TextFieldmark::TextFieldmark(const SwPaM& rPaM) : Fieldmark(rPaM) diff --git a/sw/source/core/crsr/crossrefbookmark.cxx b/sw/source/core/crsr/crossrefbookmark.cxx index 953594da1b..97e093b369 100644 --- a/sw/source/core/crsr/crossrefbookmark.cxx +++ b/sw/source/core/crsr/crossrefbookmark.cxx @@ -80,7 +80,7 @@ namespace sw { namespace mark : CrossRefBookmark(rPaM, rCode, rName, rShortName, our_sNamePrefix) { } - const ::rtl::OUString CrossRefHeadingBookmark::our_sNamePrefix = ::rtl::OUString::createFromAscii("__RefHeading__"); + const ::rtl::OUString CrossRefHeadingBookmark::our_sNamePrefix(RTL_CONSTASCII_USTRINGPARAM("__RefHeading__")); bool CrossRefHeadingBookmark::IsLegalName(const ::rtl::OUString& rName) { @@ -94,7 +94,7 @@ namespace sw { namespace mark : CrossRefBookmark(rPaM, rCode, rName, rShortName, our_sNamePrefix) { } - const ::rtl::OUString CrossRefNumItemBookmark::our_sNamePrefix = ::rtl::OUString::createFromAscii("__RefNumPara__"); + const ::rtl::OUString CrossRefNumItemBookmark::our_sNamePrefix(RTL_CONSTASCII_USTRINGPARAM("__RefNumPara__")); bool CrossRefNumItemBookmark::IsLegalName(const ::rtl::OUString& rName) { diff --git a/sw/source/core/crsr/findtxt.cxx b/sw/source/core/crsr/findtxt.cxx index 013324acdc..4a2d18f0a5 100644 --- a/sw/source/core/crsr/findtxt.cxx +++ b/sw/source/core/crsr/findtxt.cxx @@ -433,7 +433,7 @@ bool SwPaM::DoSearch( const SearchOptions& rSearchOpt, utl::TextSearch& rSTxt, bool bRemoveSoftHyphens = true; if ( bRegSearch ) { - const rtl::OUString a00AD( rtl::OUString::createFromAscii( "\\x00AD" ) ); + const rtl::OUString a00AD(RTL_CONSTASCII_USTRINGPARAM("\\x00AD")); if ( -1 != rSearchOpt.searchString.indexOf( a00AD ) ) bRemoveSoftHyphens = false; } diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index d2d0d7d692..ba62d33317 100644 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -1785,22 +1785,22 @@ void SwDoc::UpdateDocStat( SwDocStat& rStat ) com::sun::star::uno::Sequence < com::sun::star::beans::NamedValue > aStat( rStat.nPage ? 7 : 6); sal_Int32 n=0; - aStat[n].Name = ::rtl::OUString::createFromAscii("TableCount"); + aStat[n].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TableCount")); aStat[n++].Value <<= (sal_Int32)rStat.nTbl; - aStat[n].Name = ::rtl::OUString::createFromAscii("ImageCount"); + aStat[n].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ImageCount")); aStat[n++].Value <<= (sal_Int32)rStat.nGrf; - aStat[n].Name = ::rtl::OUString::createFromAscii("ObjectCount"); + aStat[n].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ObjectCount")); aStat[n++].Value <<= (sal_Int32)rStat.nOLE; if ( rStat.nPage ) { - aStat[n].Name = ::rtl::OUString::createFromAscii("PageCount"); + aStat[n].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PageCount")); aStat[n++].Value <<= (sal_Int32)rStat.nPage; } - aStat[n].Name = ::rtl::OUString::createFromAscii("ParagraphCount"); + aStat[n].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ParagraphCount")); aStat[n++].Value <<= (sal_Int32)rStat.nPara; - aStat[n].Name = ::rtl::OUString::createFromAscii("WordCount"); + aStat[n].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("WordCount")); aStat[n++].Value <<= (sal_Int32)rStat.nWord; - aStat[n].Name = ::rtl::OUString::createFromAscii("CharacterCount"); + aStat[n].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CharacterCount")); aStat[n++].Value <<= (sal_Int32)rStat.nChar; // For e.g. autotext documents there is no pSwgInfo (#i79945) diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx index db90e87326..a8d2138615 100644 --- a/sw/source/core/doc/doclay.cxx +++ b/sw/source/core/doc/doclay.cxx @@ -569,7 +569,7 @@ SdrObject* SwDoc::CloneSdrObj( const SdrObject& rObj, sal_Bool bMoveWithinDoc, uno::Reference< awt::XControlModel > xModel = ((SdrUnoObj*)pObj)->GetUnoControlModel(); uno::Any aVal; uno::Reference< beans::XPropertySet > xSet(xModel, uno::UNO_QUERY); - OUString sName( rtl::OUString::createFromAscii("Name") ); + OUString sName(RTL_CONSTASCII_USTRINGPARAM("Name")); if( xSet.is() ) aVal = xSet->getPropertyValue( sName ); if( bInsInPage ) diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx index aff5ceb883..01f353d6ba 100644 --- a/sw/source/core/doc/docnew.cxx +++ b/sw/source/core/doc/docnew.cxx @@ -149,7 +149,7 @@ SV_IMPL_PTRARR( SwGrfFmtColls, SwGrfFmtCollPtr) { try { - rtl::OUString aServiceName( rtl::OUString::createFromAscii("com.sun.star.linguistic2.ProofreadingIterator") ); + rtl::OUString aServiceName(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.linguistic2.ProofreadingIterator")); m_xGCIterator = uno::Reference< linguistic2::XProofreadingIterator > ( xMgr->createInstance( aServiceName ), uno::UNO_QUERY_THROW ); } @@ -1007,13 +1007,13 @@ void SwDoc::SetApplyWorkaroundForB6375613( bool p_bApplyWorkaroundForB6375613 ) if ( mbApplyWorkaroundForB6375613 ) { xDocInfo->addProperty( - rtl::OUString::createFromAscii("WorkaroundForB6375613Applied"), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("WorkaroundForB6375613Applied")), beans::PropertyAttribute::TRANSIENT | beans::PropertyAttribute::REMOVABLE, uno::makeAny( false ) ); } else { - xDocInfo->removeProperty( rtl::OUString::createFromAscii("WorkaroundForB6375613Applied") ); + xDocInfo->removeProperty( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("WorkaroundForB6375613Applied")) ); } } catch( uno::Exception& ) diff --git a/sw/source/core/doc/number.cxx b/sw/source/core/doc/number.cxx index afa70c9b81..6c3256e6fd 100644 --- a/sw/source/core/doc/number.cxx +++ b/sw/source/core/doc/number.cxx @@ -1269,7 +1269,7 @@ namespace numfunc SwDefBulletConfig* SwDefBulletConfig::mpInstance = 0; SwDefBulletConfig::SwDefBulletConfig() - : ConfigItem( rtl::OUString::createFromAscii("Office.Writer/Numbering/DefaultBulletList") ), + : ConfigItem( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Office.Writer/Numbering/DefaultBulletList")) ), // default bullet font is now OpenSymbol msFontname( String::CreateFromAscii("OpenSymbol") ), mbUserDefinedFontname( false ), @@ -1322,19 +1322,19 @@ namespace numfunc { uno::Sequence<rtl::OUString> aPropNames(13); rtl::OUString* pNames = aPropNames.getArray(); - pNames[0] = rtl::OUString::createFromAscii("BulletFont/FontFamilyname"); - pNames[1] = rtl::OUString::createFromAscii("BulletFont/FontWeight"); - pNames[2] = rtl::OUString::createFromAscii("BulletFont/FontItalic"); - pNames[3] = rtl::OUString::createFromAscii("BulletCharLvl1"); - pNames[4] = rtl::OUString::createFromAscii("BulletCharLvl2"); - pNames[5] = rtl::OUString::createFromAscii("BulletCharLvl3"); - pNames[6] = rtl::OUString::createFromAscii("BulletCharLvl4"); - pNames[7] = rtl::OUString::createFromAscii("BulletCharLvl5"); - pNames[8] = rtl::OUString::createFromAscii("BulletCharLvl6"); - pNames[9] = rtl::OUString::createFromAscii("BulletCharLvl7"); - pNames[10] = rtl::OUString::createFromAscii("BulletCharLvl8"); - pNames[11] = rtl::OUString::createFromAscii("BulletCharLvl9"); - pNames[12] = rtl::OUString::createFromAscii("BulletCharLvl10"); + pNames[0] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("BulletFont/FontFamilyname")); + pNames[1] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("BulletFont/FontWeight")); + pNames[2] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("BulletFont/FontItalic")); + pNames[3] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("BulletCharLvl1")); + pNames[4] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("BulletCharLvl2")); + pNames[5] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("BulletCharLvl3")); + pNames[6] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("BulletCharLvl4")); + pNames[7] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("BulletCharLvl5")); + pNames[8] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("BulletCharLvl6")); + pNames[9] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("BulletCharLvl7")); + pNames[10] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("BulletCharLvl8")); + pNames[11] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("BulletCharLvl9")); + pNames[12] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("BulletCharLvl10")); return aPropNames; } @@ -1501,7 +1501,7 @@ namespace numfunc SwNumberingUIBehaviorConfig* SwNumberingUIBehaviorConfig::mpInstance = 0; SwNumberingUIBehaviorConfig::SwNumberingUIBehaviorConfig() - : ConfigItem( rtl::OUString::createFromAscii("Office.Writer/Numbering/UserInterfaceBehavior") ), + : ConfigItem( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Office.Writer/Numbering/UserInterfaceBehavior")) ), mbChangeIndentOnTabAtFirstPosOfFirstListItem( sal_True ) { SetToDefault(); @@ -1520,7 +1520,7 @@ namespace numfunc { com::sun::star::uno::Sequence<rtl::OUString> aPropNames(1); rtl::OUString* pNames = aPropNames.getArray(); - pNames[0] = rtl::OUString::createFromAscii("ChangeIndentOnTabAtFirstPosOfFirstListItem"); + pNames[0] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ChangeIndentOnTabAtFirstPosOfFirstListItem")); return aPropNames; } diff --git a/sw/source/core/docnode/retrieveinputstream.cxx b/sw/source/core/docnode/retrieveinputstream.cxx index eeb65c6ab8..cddae56040 100644 --- a/sw/source/core/docnode/retrieveinputstream.cxx +++ b/sw/source/core/docnode/retrieveinputstream.cxx @@ -61,7 +61,7 @@ SwAsyncRetrieveInputStreamThread::~SwAsyncRetrieveInputStreamThread() void SwAsyncRetrieveInputStreamThread::threadFunction() { com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue > xProps( 1 ); - xProps[0].Name = ::rtl::OUString::createFromAscii( "URL" ); + xProps[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("URL")); xProps[0].Value <<= ::rtl::OUString( mrLinkedURL ); comphelper::MediaDescriptor aMedium( xProps ); diff --git a/sw/source/core/docnode/swthreadjoiner.cxx b/sw/source/core/docnode/swthreadjoiner.cxx index 36a0c81940..15df350547 100644 --- a/sw/source/core/docnode/swthreadjoiner.cxx +++ b/sw/source/core/docnode/swthreadjoiner.cxx @@ -49,7 +49,7 @@ uno::Reference< util::XJobManager >& SwThreadJoiner::GetThreadJoiner() mpThreadJoiner = uno::Reference< util::XJobManager >( ::comphelper::getProcessServiceFactory()->createInstance( - ::rtl::OUString::createFromAscii("com.sun.star.util.JobManager" ) ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.util.JobManager")) ), uno::UNO_QUERY ); } diff --git a/sw/source/core/edit/edfldexp.cxx b/sw/source/core/edit/edfldexp.cxx index 3afb03f717..74f3b60375 100644 --- a/sw/source/core/edit/edfldexp.cxx +++ b/sw/source/core/edit/edfldexp.cxx @@ -55,7 +55,7 @@ BOOL SwEditShell::IsFieldDataSourceAvailable(String& rUsedDataSource) const uno::Reference< lang::XMultiServiceFactory > xMgr( ::comphelper::getProcessServiceFactory() ); if( !xMgr.is() ) return FALSE; - uno::Reference<uno::XInterface> xInstance = xMgr->createInstance( OUString::createFromAscii( "com.sun.star.sdb.DatabaseContext" )); + uno::Reference<uno::XInterface> xInstance = xMgr->createInstance(OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.DatabaseContext"))); uno::Reference<container::XNameAccess> xDBContext(xInstance, uno::UNO_QUERY) ; if(!xDBContext.is()) return FALSE; diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx index cc0156f4bc..fdf368bc2d 100644 --- a/sw/source/core/fields/docufld.cxx +++ b/sw/source/core/fields/docufld.cxx @@ -994,7 +994,7 @@ String SwDocInfoFieldType::Expand( sal_uInt16 nSub, sal_uInt32 nFormat, aAny = xSet->getPropertyValue( rName ); uno::Reference < script::XTypeConverter > xConverter( comphelper::getProcessServiceFactory() - ->createInstance(::rtl::OUString::createFromAscii("com.sun.star.script.Converter")), uno::UNO_QUERY ); + ->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.script.Converter"))), uno::UNO_QUERY ); uno::Any aNew; aNew = xConverter->convertToSimpleType( aAny, uno::TypeClass_STRING ); aNew >>= sVal; @@ -1150,7 +1150,7 @@ String SwDocInfoField::Expand() const // if the field is "fixed" we don't update it from the property ::rtl::OUString sVal; uno::Reference < script::XTypeConverter > xConverter( comphelper::getProcessServiceFactory() - ->createInstance(::rtl::OUString::createFromAscii("com.sun.star.script.Converter")), uno::UNO_QUERY ); + ->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.script.Converter"))), uno::UNO_QUERY ); util::Date aDate; util::DateTime aDateTime; util::Duration aDuration; diff --git a/sw/source/core/fields/macrofld.cxx b/sw/source/core/fields/macrofld.cxx index 8e301348b0..998aeae045 100644 --- a/sw/source/core/fields/macrofld.cxx +++ b/sw/source/core/fields/macrofld.cxx @@ -248,8 +248,8 @@ BOOL SwMacroField::isScriptURL( const String& str ) uno::Reference< uri::XUriReferenceFactory > xFactory( xSMgr->createInstance( - OUString::createFromAscii( - "com.sun.star.uri.UriReferenceFactory" ) ), uno::UNO_QUERY ); + OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.uri.UriReferenceFactory")) ), uno::UNO_QUERY ); if ( xFactory.is() ) { diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx index 1536398362..15e44bc226 100644 --- a/sw/source/core/frmedt/fefly1.cxx +++ b/sw/source/core/frmedt/fefly1.cxx @@ -1776,7 +1776,7 @@ ObjCntType SwFEShell::GetObjCntType( const SdrObject& rObj ) const if( xModel.is() ) { uno::Any aVal; - OUString sName = OUString::createFromAscii("ButtonType"); + OUString sName(RTL_CONSTASCII_USTRINGPARAM("ButtonType")); uno::Reference< beans::XPropertySet > xSet(xModel, uno::UNO_QUERY); uno::Reference< beans::XPropertySetInfo > xInfo = xSet->getPropertySetInfo(); diff --git a/sw/source/core/layout/laycache.cxx b/sw/source/core/layout/laycache.cxx index 3525f2a6da..bd0c29353d 100644 --- a/sw/source/core/layout/laycache.cxx +++ b/sw/source/core/layout/laycache.cxx @@ -736,7 +736,7 @@ void lcl_ApplyWorkaroundForB6375613( SwFrm* p_pFirstFrmOnNewPage ) uno::UNO_QUERY ); try { - xDocInfo->setPropertyValue( rtl::OUString::createFromAscii("WorkaroundForB6375613Applied"), uno::makeAny( true ) ); + xDocInfo->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("WorkaroundForB6375613Applied")), uno::makeAny( true ) ); } catch( uno::Exception& ) { diff --git a/sw/source/core/ole/ndole.cxx b/sw/source/core/ole/ndole.cxx index 15edad1d0b..2458dbc0ba 100644 --- a/sw/source/core/ole/ndole.cxx +++ b/sw/source/core/ole/ndole.cxx @@ -918,7 +918,7 @@ String SwOLEObj::GetDescription() SwOLELRUCache::SwOLELRUCache() : SvPtrarr( 64, 16 ), - utl::ConfigItem( OUString::createFromAscii( "Office.Common/Cache" )), + utl::ConfigItem(OUString(RTL_CONSTASCII_USTRINGPARAM("Office.Common/Cache"))), nLRU_InitSize( 20 ), bInUnload( sal_False ) { @@ -930,7 +930,7 @@ uno::Sequence< rtl::OUString > SwOLELRUCache::GetPropertyNames() { Sequence< OUString > aNames( 1 ); OUString* pNames = aNames.getArray(); - pNames[0] = OUString::createFromAscii( "Writer/OLE_Objects" ); + pNames[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("Writer/OLE_Objects")); return aNames; } diff --git a/sw/source/core/swg/SwXMLTextBlocks1.cxx b/sw/source/core/swg/SwXMLTextBlocks1.cxx index bb454a1e20..5cea68119e 100644 --- a/sw/source/core/swg/SwXMLTextBlocks1.cxx +++ b/sw/source/core/swg/SwXMLTextBlocks1.cxx @@ -123,7 +123,7 @@ ULONG SwXMLTextBlocks::GetDoc( USHORT nIdx ) // get parser uno::Reference< XInterface > xXMLParser = xServiceFactory->createInstance( - OUString::createFromAscii("com.sun.star.xml.sax.Parser") ); + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Parser"))); ASSERT( xXMLParser.is(), "XMLReader::Read: com.sun.star.xml.sax.Parser service missing" ); if( !xXMLParser.is() ) @@ -205,7 +205,7 @@ ULONG SwXMLTextBlocks::GetMacroTable( USHORT nIdx, long nTmp = SOT_FORMATSTR_ID_STARWRITER_60; sal_Bool bOasis = ( SotStorage::GetVersion( xRoot ) > nTmp ); - OUString sStreamName = OUString::createFromAscii("atevent.xml"); + OUString sStreamName(RTL_CONSTASCII_USTRINGPARAM("atevent.xml")); uno::Reference < io::XStream > xDocStream = xRoot->openStreamElement( sStreamName, embed::ElementModes::READ ); DBG_ASSERT(xDocStream.is(), "Can't create stream"); @@ -348,7 +348,7 @@ ULONG SwXMLTextBlocks::GetBlockText( const String& rShort, String& rText ) // get parser uno::Reference< XInterface > xXMLParser = xServiceFactory->createInstance( - OUString::createFromAscii("com.sun.star.xml.sax.Parser") ); + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Parser")) ); ASSERT( xXMLParser.is(), "XMLReader::Read: com.sun.star.xml.sax.Parser service missing" ); if( !xXMLParser.is() ) @@ -504,7 +504,7 @@ void SwXMLTextBlocks::ReadInfo( void ) // get parser uno::Reference< XInterface > xXMLParser = xServiceFactory->createInstance( - OUString::createFromAscii("com.sun.star.xml.sax.Parser") ); + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Parser"))); ASSERT( xXMLParser.is(), "XMLReader::Read: com.sun.star.xml.sax.Parser service missing" ); if( !xXMLParser.is() ) @@ -663,7 +663,7 @@ ULONG SwXMLTextBlocks::SetMacroTable( // get XML writer uno::Reference< io::XActiveDataSource > xSaxWriter( xServiceFactory->createInstance( - OUString::createFromAscii("com.sun.star.xml.sax.Writer") ), + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Writer")) ), UNO_QUERY ); ASSERT( xSaxWriter.is(), "can't instantiate XML writer" ); if( xSaxWriter.is() ) diff --git a/sw/source/core/tox/toxhlp.cxx b/sw/source/core/tox/toxhlp.cxx index e562f04ab9..2733a19ef3 100644 --- a/sw/source/core/tox/toxhlp.cxx +++ b/sw/source/core/tox/toxhlp.cxx @@ -48,8 +48,8 @@ IndexEntrySupplierWrapper::IndexEntrySupplierWrapper() try { STAR_REFERENCE( uno::XInterface ) xI = - rxMSF->createInstance( ::rtl::OUString::createFromAscii( - "com.sun.star.i18n.IndexEntrySupplier" ) ); + rxMSF->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.i18n.IndexEntrySupplier")) ); if( xI.is() ) { UNO_NMSPC::Any x = xI->queryInterface( ::getCppuType( diff --git a/sw/source/core/unocore/swunohelper.cxx b/sw/source/core/unocore/swunohelper.cxx index d024112663..12481508f0 100644 --- a/sw/source/core/unocore/swunohelper.cxx +++ b/sw/source/core/unocore/swunohelper.cxx @@ -80,7 +80,7 @@ BOOL UCB_DeleteFile( const String& rURL ) ucbhelper::Content aTempContent( rURL, STAR_REFERENCE( ucb::XCommandEnvironment )()); aTempContent.executeCommand( - rtl::OUString::createFromAscii( "delete" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("delete")), UNO_NMSPC::makeAny( sal_Bool( sal_True ) ) ); bRemoved = TRUE; } @@ -113,7 +113,7 @@ BOOL UCB_CopyFile( const String& rURL, const String& rNewURL, BOOL bCopyIsMove ) aInfo.MoveData = bCopyIsMove; aAny <<= aInfo; aTempContent.executeCommand( - rtl::OUString::createFromAscii( "transfer" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("transfer")), aAny ); } catch( UNO_NMSPC::Exception& ) @@ -164,7 +164,7 @@ BOOL UCB_IsReadOnlyFileName( const String& rURL ) { ucbhelper::Content aCnt( rURL, STAR_REFERENCE( ucb::XCommandEnvironment )()); UNO_NMSPC::Any aAny = aCnt.getPropertyValue( - rtl::OUString::createFromAscii( "IsReadOnly" )); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsReadOnly"))); if(aAny.hasValue()) bIsReadOnly = *(sal_Bool*)aAny.getValue(); } @@ -221,9 +221,9 @@ BOOL UCB_GetFileListOfFolder( const String& rURL, SvStrings& rList, USHORT nSeqSize = pDateTimeList ? 2 : 1; UNO_NMSPC::Sequence < rtl::OUString > aProps( nSeqSize ); rtl::OUString* pProps = aProps.getArray(); - pProps[ 0 ] = rtl::OUString::createFromAscii( "Title" ); + pProps[ 0 ] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")); if( pDateTimeList ) - pProps[ 1 ] = rtl::OUString::createFromAscii( "DateModified" ); + pProps[ 1 ] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DateModified")); try { diff --git a/sw/source/core/unocore/unobkm.cxx b/sw/source/core/unocore/unobkm.cxx index 27b39c1a8d..99a3ee8ab8 100644 --- a/sw/source/core/unocore/unobkm.cxx +++ b/sw/source/core/unocore/unobkm.cxx @@ -242,7 +242,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException) UnoActionContext aCont(m_pImpl->m_pDoc); if (!m_pImpl->m_sMarkName.getLength()) { - m_pImpl->m_sMarkName = OUString::createFromAscii("Bookmark"); + m_pImpl->m_sMarkName = OUString(RTL_CONSTASCII_USTRINGPARAM("Bookmark")); } if ((eType == IDocumentMarkAccess::BOOKMARK) && ::sw::mark::CrossRefNumItemBookmark::IsLegalName(m_pImpl->m_sMarkName)) @@ -388,7 +388,7 @@ throw (uno::RuntimeException) OUString SAL_CALL SwXBookmark::getImplementationName() throw (uno::RuntimeException) { - return OUString::createFromAscii("SwXBookmark"); + return OUString(RTL_CONSTASCII_USTRINGPARAM("SwXBookmark")); } static char const*const g_ServicesBookmark[] = diff --git a/sw/source/core/unocore/unocoll.cxx b/sw/source/core/unocore/unocoll.cxx index 67073a9abf..373ed9c8b4 100644 --- a/sw/source/core/unocore/unocoll.cxx +++ b/sw/source/core/unocore/unocoll.cxx @@ -603,7 +603,7 @@ uno::Reference< uno::XInterface > SwXServiceProvider::MakeInstance(sal_uInt16 { uno::Sequence< uno::Any > aArgs(1); aArgs[ 0 ] <<= pDoc->GetDocShell()->GetModel(); - aGlobs <<= ::comphelper::getProcessServiceFactory()->createInstanceWithArguments( ::rtl::OUString::createFromAscii( "ooo.vba.word.Globals"), aArgs ); + aGlobs <<= ::comphelper::getProcessServiceFactory()->createInstanceWithArguments( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Globals")), aArgs ); pDoc->GetDocShell()->GetBasicManager()->SetGlobalUNOConstant( "VBAGlobals", aGlobs ); } aGlobs >>= xRet; @@ -1605,18 +1605,18 @@ uno::Reference< XTextSection > SwXTextSections::GetObject( SwSectionFmt& rFmt ) OUString SwXBookmarks::getImplementationName(void) throw( RuntimeException ) { - return OUString::createFromAscii("SwXBookmarks"); + return OUString(RTL_CONSTASCII_USTRINGPARAM("SwXBookmarks")); } BOOL SwXBookmarks::supportsService(const OUString& rServiceName) throw( RuntimeException ) { - return OUString::createFromAscii("com.sun.star.text.Bookmarks") == rServiceName; + return OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.Bookmarks")) == rServiceName; } Sequence< OUString > SwXBookmarks::getSupportedServiceNames(void) throw( RuntimeException ) { Sequence< OUString > aRet(1); - aRet[0] = OUString::createFromAscii("com.sun.star.text.Bookmarks"); + aRet[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.Bookmarks")); return aRet; } diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx index b69ace215c..360b8cc5b3 100644 --- a/sw/source/core/unocore/unocrsrhelper.cxx +++ b/sw/source/core/unocore/unocrsrhelper.cxx @@ -1052,7 +1052,7 @@ void makeRedline( SwPaM& rPaM, //todo: what about REDLINE_FMTCOLL? comphelper::SequenceAsHashMap aPropMap( rRedlineProperties ); uno::Any aAuthorValue; - aAuthorValue = aPropMap.getUnpackedValueOrDefault( ::rtl::OUString::createFromAscii("RedlineAuthor"), aAuthorValue); + aAuthorValue = aPropMap.getUnpackedValueOrDefault( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RedlineAuthor")), aAuthorValue); USHORT nAuthor = 0; ::rtl::OUString sAuthor; if( aAuthorValue >>= sAuthor ) @@ -1060,7 +1060,7 @@ void makeRedline( SwPaM& rPaM, ::rtl::OUString sComment; uno::Any aCommentValue; - aCommentValue = aPropMap.getUnpackedValueOrDefault( ::rtl::OUString::createFromAscii("RedlineComment"), aCommentValue); + aCommentValue = aPropMap.getUnpackedValueOrDefault( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RedlineComment")), aCommentValue); SwRedlineData aRedlineData( eType, nAuthor ); if( aCommentValue >>= sComment ) @@ -1068,7 +1068,7 @@ void makeRedline( SwPaM& rPaM, ::util::DateTime aStamp; uno::Any aDateTimeValue; - aDateTimeValue = aPropMap.getUnpackedValueOrDefault( ::rtl::OUString::createFromAscii("RedlineDateTime"), aDateTimeValue); + aDateTimeValue = aPropMap.getUnpackedValueOrDefault( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RedlineDateTime")), aDateTimeValue); if( aDateTimeValue >>= aStamp ) { aRedlineData.SetTimeStamp( diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx index 9cdbda4f7a..c1a7d83806 100644 --- a/sw/source/core/unocore/unofield.cxx +++ b/sw/source/core/unocore/unofield.cxx @@ -2301,10 +2301,10 @@ OUString SwXTextField::getImplementationName(void) throw( uno::RuntimeException static OUString OldNameToNewName_Impl( const OUString &rOld ) { - static OUString aOldNamePart1( OUString::createFromAscii(".TextField.DocInfo.") ); - static OUString aOldNamePart2( OUString::createFromAscii(".TextField.") ); - static OUString aNewNamePart1( OUString::createFromAscii(".textfield.docinfo.") ); - static OUString aNewNamePart2( OUString::createFromAscii(".textfield.") ); + static OUString aOldNamePart1(RTL_CONSTASCII_USTRINGPARAM(".TextField.DocInfo.")); + static OUString aOldNamePart2(RTL_CONSTASCII_USTRINGPARAM(".TextField.")); + static OUString aNewNamePart1(RTL_CONSTASCII_USTRINGPARAM(".textfield.docinfo.")); + static OUString aNewNamePart2(RTL_CONSTASCII_USTRINGPARAM(".textfield.")); OUString sServiceNameCC( rOld ); sal_Int32 nIdx = sServiceNameCC.indexOf( aOldNamePart1 ); if (nIdx >= 0) diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx index a2abf2de35..ec5e26aebc 100644 --- a/sw/source/core/unocore/unoframe.cxx +++ b/sw/source/core/unocore/unoframe.cxx @@ -2206,7 +2206,7 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan if( !aClassName.MakeId( aCLSID ) ) { lang::IllegalArgumentException aExcept; - aExcept.Message = OUString::createFromAscii("CLSID invalid"); + aExcept.Message = OUString(RTL_CONSTASCII_USTRINGPARAM("CLSID invalid")); throw aExcept; } diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx index 3ecc8bf560..aca14a1fe0 100644 --- a/sw/source/core/unocore/unoidx.cxx +++ b/sw/source/core/unocore/unoidx.cxx @@ -3042,7 +3042,7 @@ throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, pArr[nCurrentElement].Name = C2U("TokenType"); pArr[nCurrentElement++].Value <<= - OUString::createFromAscii("TokenEntryNumber"); + OUString(RTL_CONSTASCII_USTRINGPARAM("TokenEntryNumber")); pArr[nCurrentElement].Name = C2U("CharacterStyleName"); pArr[nCurrentElement++].Value <<= aProgCharStyle; @@ -3082,7 +3082,7 @@ throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, beans::PropertyValue* pArr = rCurTokenSeq.getArray(); pArr[0].Name = C2U("TokenType"); - pArr[0].Value <<= OUString::createFromAscii("TokenEntryText"); + pArr[0].Value <<= OUString(RTL_CONSTASCII_USTRINGPARAM("TokenEntryText")); pArr[1].Name = C2U("CharacterStyleName"); pArr[1].Value <<= aProgCharStyle; @@ -3094,7 +3094,7 @@ throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, beans::PropertyValue* pArr = rCurTokenSeq.getArray(); pArr[0].Name = C2U("TokenType"); - pArr[0].Value <<= OUString::createFromAscii("TokenTabStop"); + pArr[0].Value <<= OUString(RTL_CONSTASCII_USTRINGPARAM("TokenTabStop")); if(SVX_TAB_ADJUST_END == aToken.eTabAlign) { @@ -3125,7 +3125,7 @@ throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, beans::PropertyValue* pArr = rCurTokenSeq.getArray(); pArr[0].Name = C2U("TokenType"); - pArr[0].Value <<= OUString::createFromAscii("TokenText"); + pArr[0].Value <<= OUString(RTL_CONSTASCII_USTRINGPARAM("TokenText")); pArr[1].Name = C2U("CharacterStyleName"); pArr[1].Value <<= aProgCharStyle; @@ -3140,7 +3140,7 @@ throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, beans::PropertyValue* pArr = rCurTokenSeq.getArray(); pArr[0].Name = C2U("TokenType"); - pArr[0].Value <<= OUString::createFromAscii("TokenPageNumber"); + pArr[0].Value <<= OUString(RTL_CONSTASCII_USTRINGPARAM("TokenPageNumber")); pArr[1].Name = C2U("CharacterStyleName"); pArr[1].Value <<= aProgCharStyle; @@ -3152,7 +3152,7 @@ throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, beans::PropertyValue* pArr = rCurTokenSeq.getArray(); pArr[0].Name = C2U("TokenType"); - pArr[0].Value <<= OUString::createFromAscii("TokenChapterInfo"); + pArr[0].Value <<= OUString(RTL_CONSTASCII_USTRINGPARAM("TokenChapterInfo")); pArr[1].Name = C2U("CharacterStyleName"); pArr[1].Value <<= aProgCharStyle; @@ -3192,7 +3192,7 @@ throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, pArr[0].Name = C2U("TokenType"); pArr[0].Value <<= - OUString::createFromAscii("TokenHyperlinkStart"); + OUString(RTL_CONSTASCII_USTRINGPARAM("TokenHyperlinkStart")); pArr[1].Name = C2U("CharacterStyleName"); pArr[1].Value <<= aProgCharStyle; } @@ -3204,7 +3204,7 @@ throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, pArr[0].Name = C2U("TokenType"); pArr[0].Value <<= - OUString::createFromAscii("TokenHyperlinkEnd"); + OUString(RTL_CONSTASCII_USTRINGPARAM("TokenHyperlinkEnd")); } break; case TOKEN_AUTHORITY: @@ -3214,7 +3214,7 @@ throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, pArr[0].Name = C2U("TokenType"); pArr[0].Value <<= - OUString::createFromAscii("TokenBibliographyDataField"); + OUString(RTL_CONSTASCII_USTRINGPARAM("TokenBibliographyDataField")); pArr[1].Name = C2U("CharacterStyleName"); pArr[1].Value <<= aProgCharStyle; diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx index 16d4a81c6e..d7d821cc89 100644 --- a/sw/source/core/unocore/unoobj.cxx +++ b/sw/source/core/unocore/unoobj.cxx @@ -2972,7 +2972,7 @@ SwXTextCursor::getAvailableServiceNames() throw (uno::RuntimeException) { uno::Sequence< OUString > aRet(1); OUString* pArray = aRet.getArray(); - pArray[0] = OUString::createFromAscii("com.sun.star.text.TextContent"); + pArray[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextContent")); return aRet; } diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx index 23019ef731..fcaf6e3569 100644 --- a/sw/source/core/unocore/unoobj2.cxx +++ b/sw/source/core/unocore/unoobj2.cxx @@ -917,7 +917,7 @@ throw (uno::RuntimeException) OUString SAL_CALL SwXTextRange::getImplementationName() throw (uno::RuntimeException) { - return OUString::createFromAscii("SwXTextRange"); + return OUString(RTL_CONSTASCII_USTRINGPARAM("SwXTextRange")); } static char const*const g_ServicesTextRange[] = @@ -1373,7 +1373,7 @@ SwXTextRange::getAvailableServiceNames() throw (uno::RuntimeException) { uno::Sequence< OUString > aRet(1); OUString* pArray = aRet.getArray(); - pArray[0] = OUString::createFromAscii("com.sun.star.text.TextContent"); + pArray[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextContent")); return aRet; } diff --git a/sw/source/core/unocore/unorefmk.cxx b/sw/source/core/unocore/unorefmk.cxx index 8c2566447a..4e8f763c75 100644 --- a/sw/source/core/unocore/unorefmk.cxx +++ b/sw/source/core/unocore/unorefmk.cxx @@ -1598,7 +1598,7 @@ getPrefixAndSuffix( throw; } catch (uno::Exception & e) { throw lang::WrappedTargetRuntimeException( - ::rtl::OUString::createFromAscii("getPrefixAndSuffix: exception"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("getPrefixAndSuffix: exception")), 0, uno::makeAny(e)); } } diff --git a/sw/source/filter/basflt/iodetect.cxx b/sw/source/filter/basflt/iodetect.cxx index e12b09a445..4b83d53ad2 100644 --- a/sw/source/filter/basflt/iodetect.cxx +++ b/sw/source/filter/basflt/iodetect.cxx @@ -149,7 +149,7 @@ BOOL SwIoSystem::IsValidStgFilter( const com::sun::star::uno::Reference < com::s try { ULONG nStgFmtId = SotStorage::GetFormatID( rStg ); - bRet = rStg->isStreamElement( ::rtl::OUString::createFromAscii("content.xml") ); + bRet = rStg->isStreamElement( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("content.xml")) ); if ( bRet ) bRet = ( nStgFmtId && ( rFilter.GetFormat() == nStgFmtId ) ); } diff --git a/sw/source/filter/html/SwAppletImpl.cxx b/sw/source/filter/html/SwAppletImpl.cxx index 4bf9ee5e17..238524a6bb 100644 --- a/sw/source/filter/html/SwAppletImpl.cxx +++ b/sw/source/filter/html/SwAppletImpl.cxx @@ -148,14 +148,14 @@ void SwApplet_Impl::CreateApplet( const String& rCode, const String& rName, uno::Reference < beans::XPropertySet > xSet( xApplet->getComponent(), uno::UNO_QUERY ); if ( xSet.is() ) { - xSet->setPropertyValue( ::rtl::OUString::createFromAscii("AppletCode"), uno::makeAny( ::rtl::OUString( rCode ) ) ); - xSet->setPropertyValue( ::rtl::OUString::createFromAscii("AppletName"), uno::makeAny( ::rtl::OUString( rName ) ) ); - xSet->setPropertyValue( ::rtl::OUString::createFromAscii("AppletIsScript"), uno::makeAny( sal_Bool(bMayScript) ) ); - xSet->setPropertyValue( ::rtl::OUString::createFromAscii("AppletDocBase"), uno::makeAny( ::rtl::OUString(sDocBase) ) ); + xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AppletCode")), uno::makeAny( ::rtl::OUString( rCode ) ) ); + xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AppletName")), uno::makeAny( ::rtl::OUString( rName ) ) ); + xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AppletIsScript")), uno::makeAny( sal_Bool(bMayScript) ) ); + xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AppletDocBase")), uno::makeAny( ::rtl::OUString(sDocBase) ) ); if ( rCodeBase.Len() ) - xSet->setPropertyValue( ::rtl::OUString::createFromAscii("AppletCodeBase"), uno::makeAny( ::rtl::OUString( rCodeBase ) ) ); + xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AppletCodeBase")), uno::makeAny( ::rtl::OUString( rCodeBase ) ) ); else - xSet->setPropertyValue( ::rtl::OUString::createFromAscii("AppletCodeBase"), uno::makeAny( ::rtl::OUString( sDocBase ) ) ); + xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AppletCodeBase")), uno::makeAny( ::rtl::OUString( sDocBase ) ) ); } } #ifdef SOLAR_JAVA @@ -197,7 +197,7 @@ void SwApplet_Impl::FinishApplet() { uno::Sequence < beans::PropertyValue > aProps; aCommandList.FillSequence( aProps ); - xSet->setPropertyValue( ::rtl::OUString::createFromAscii("AppletCommands"), uno::makeAny( aProps ) ); + xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AppletCommands")), uno::makeAny( aProps ) ); } } diff --git a/sw/source/filter/html/htmlbas.cxx b/sw/source/filter/html/htmlbas.cxx index 90d4cfc49e..422031db2f 100644 --- a/sw/source/filter/html/htmlbas.cxx +++ b/sw/source/filter/html/htmlbas.cxx @@ -133,7 +133,7 @@ void SwHTMLParser::EndScript() if( aBasicLib.Len() ) aLibName = aBasicLib; else - aLibName = ::rtl::OUString::createFromAscii( "Standard" ); + aLibName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Standard")); // get module library container Reference< script::XLibraryContainer > xModLibContainer( pDocSh->GetBasicContainer(), UNO_QUERY ); diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx index 4140c603ed..fbd61c0042 100644 --- a/sw/source/filter/html/htmlform.cxx +++ b/sw/source/filter/html/htmlform.cxx @@ -637,25 +637,25 @@ static void lcl_html_setFixedFontProperty( DEFAULTFONT_FLAGS_ONLYONE ) ); Any aTmp; aTmp <<= OUString( aFixedFont.GetName() ); - rPropSet->setPropertyValue( OUString::createFromAscii("FontName"), aTmp ); + rPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("FontName")), aTmp ); aTmp <<= OUString( aFixedFont.GetStyleName() ); - rPropSet->setPropertyValue( OUString::createFromAscii("FontStyleName"), + rPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("FontStyleName")), aTmp ); aTmp <<= (sal_Int16) aFixedFont.GetFamily(); - rPropSet->setPropertyValue( OUString::createFromAscii("FontFamily"), aTmp ); + rPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("FontFamily")), aTmp ); aTmp <<= (sal_Int16) aFixedFont.GetCharSet(); - rPropSet->setPropertyValue( OUString::createFromAscii("FontCharset"), + rPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("FontCharset")), aTmp ); aTmp <<= (sal_Int16) aFixedFont.GetPitch(); - rPropSet->setPropertyValue( OUString::createFromAscii("FontPitch"), aTmp ); + rPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("FontPitch")), aTmp ); float fVal(10.); aTmp.setValue( &fVal, ::getCppuType(&fVal )); - rPropSet->setPropertyValue( OUString::createFromAscii("FontHeight"), aTmp ); + rPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("FontHeight")), aTmp ); } class SwHTMLFormPendingStackData_Impl: public SwPendingStackData @@ -969,7 +969,7 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl( uno::Reference< XInterface > xCreate = rServiceFactory ->createInstance( - OUString::createFromAscii("com.sun.star.drawing.ControlShape")); + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.ControlShape"))); if( !xCreate.is() ) return xShape; @@ -1009,11 +1009,11 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl( Any aAny2; aAny2 <<= (sal_Int32)nLeftSpace; xShapePropSet->setPropertyValue( - OUString::createFromAscii( "LeftMargin" ), aAny2 ); + OUString(RTL_CONSTASCII_USTRINGPARAM("LeftMargin")), aAny2 ); aAny2 <<= (sal_Int32)nRightSpace; xShapePropSet->setPropertyValue( - OUString::createFromAscii( "RightMargin" ), aAny2 ); + OUString(RTL_CONSTASCII_USTRINGPARAM("RightMargin")), aAny2 ); } // oberen/unteren Rand setzen @@ -1040,16 +1040,16 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl( uno::Any aAny2; aAny2 <<= (sal_Int32)nUpperSpace; xShapePropSet->setPropertyValue( - OUString::createFromAscii( "TopMargin" ), aAny2 ); + OUString(RTL_CONSTASCII_USTRINGPARAM("TopMargin")), aAny2 ); aAny2 <<= (sal_Int32)nLowerSpace; xShapePropSet->setPropertyValue( - OUString::createFromAscii( "BottomMargin" ), aAny2 ); + OUString(RTL_CONSTASCII_USTRINGPARAM("BottomMargin")), aAny2 ); } uno::Reference< beans::XPropertySetInfo > xPropSetInfo = rFCompPropSet->getPropertySetInfo(); - OUString sPropName = OUString::createFromAscii( "BackgroundColor" ); + OUString sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("BackgroundColor")); if( SFX_ITEM_SET==rCSS1ItemSet.GetItemState( RES_BACKGROUND, sal_True, &pItem ) && xPropSetInfo->hasPropertyByName( sPropName ) ) @@ -1067,7 +1067,7 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl( } - sPropName = OUString::createFromAscii( "TextColor" ); + sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("TextColor")); if( SFX_ITEM_SET==rCSS1ItemSet.GetItemState( RES_CHRATR_COLOR, sal_True, &pItem ) && xPropSetInfo->hasPropertyByName( sPropName ) ) @@ -1077,7 +1077,7 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl( rFCompPropSet->setPropertyValue( sPropName, aTmp ); } - sPropName = OUString::createFromAscii( "FontHeight" ); + sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("FontHeight")); if( SFX_ITEM_SET==rCSS1ItemSet.GetItemState( RES_CHRATR_FONTSIZE, sal_True, &pItem ) && xPropSetInfo->hasPropertyByName( sPropName ) ) @@ -1092,31 +1092,31 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl( &pItem ) ) { const SvxFontItem *pFontItem = (SvxFontItem *)pItem; - sPropName = OUString::createFromAscii( "FontName" ); + sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("FontName")); if( xPropSetInfo->hasPropertyByName( sPropName ) ) { aTmp <<= OUString( pFontItem->GetFamilyName() ); rFCompPropSet->setPropertyValue( sPropName, aTmp ); } - sPropName = OUString::createFromAscii( "FontStyleName" ); + sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("FontStyleName")); if( xPropSetInfo->hasPropertyByName( sPropName ) ) { aTmp <<= OUString( pFontItem->GetStyleName() ); rFCompPropSet->setPropertyValue( sPropName, aTmp ); } - sPropName = OUString::createFromAscii( "FontFamily" ); + sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("FontFamily")); if( xPropSetInfo->hasPropertyByName( sPropName ) ) { aTmp <<= (sal_Int16)pFontItem->GetFamily() ; rFCompPropSet->setPropertyValue( sPropName, aTmp ); } - sPropName = OUString::createFromAscii( "FontCharset" ); + sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("FontCharset")); if( xPropSetInfo->hasPropertyByName( sPropName ) ) { aTmp <<= (sal_Int16)pFontItem->GetCharSet() ; rFCompPropSet->setPropertyValue( sPropName, aTmp ); } - sPropName = OUString::createFromAscii( "FontPitch" ); + sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("FontPitch")); if( xPropSetInfo->hasPropertyByName( sPropName ) ) { aTmp <<= (sal_Int16)pFontItem->GetPitch() ; @@ -1124,7 +1124,7 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl( } } - sPropName = OUString::createFromAscii( "FontWeight" ); + sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("FontWeight")); if( SFX_ITEM_SET==rCSS1ItemSet.GetItemState( RES_CHRATR_WEIGHT, sal_True, &pItem ) && xPropSetInfo->hasPropertyByName( sPropName ) ) @@ -1135,7 +1135,7 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl( rFCompPropSet->setPropertyValue( sPropName, aTmp ); } - sPropName = OUString::createFromAscii( "FontSlant" ); + sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("FontSlant")); if( SFX_ITEM_SET==rCSS1ItemSet.GetItemState( RES_CHRATR_POSTURE, sal_True, &pItem ) && xPropSetInfo->hasPropertyByName( sPropName ) ) @@ -1144,7 +1144,7 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl( rFCompPropSet->setPropertyValue( sPropName, aTmp ); } - sPropName = OUString::createFromAscii( "FontUnderline" ); + sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("FontUnderline")); if( SFX_ITEM_SET==rCSS1ItemSet.GetItemState( RES_CHRATR_UNDERLINE, sal_True, &pItem ) && xPropSetInfo->hasPropertyByName( sPropName ) ) @@ -1153,7 +1153,7 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl( rFCompPropSet->setPropertyValue( sPropName, aTmp ); } - sPropName = OUString::createFromAscii( "FontStrikeout" ); + sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("FontStrikeout")); if( SFX_ITEM_SET==rCSS1ItemSet.GetItemState( RES_CHRATR_CROSSEDOUT, sal_True, &pItem ) && xPropSetInfo->hasPropertyByName( sPropName ) ) @@ -1241,18 +1241,18 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl( } aTmp <<= (sal_Int16)nVertOri ; xShapePropSet->setPropertyValue( - OUString::createFromAscii( "VertOrient" ), aTmp ); + OUString(RTL_CONSTASCII_USTRINGPARAM("VertOrient")), aTmp ); } aTmp <<= (sal_Int16)nAnchorType ; xShapePropSet->setPropertyValue( - OUString::createFromAscii( "AnchorType" ), aTmp ); + OUString(RTL_CONSTASCII_USTRINGPARAM("AnchorType")), aTmp ); if( text::TextContentAnchorType_AT_PAGE == nAnchorType ) { aTmp <<= (sal_Int16) 1 ; xShapePropSet->setPropertyValue( - OUString::createFromAscii( "AnchorPageNo" ), aTmp ); + OUString(RTL_CONSTASCII_USTRINGPARAM("AnchorPageNo")), aTmp ); } else { @@ -1265,30 +1265,30 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl( aTmp.setValue( &xTxtRg, ::getCppuType((uno::Reference< text::XTextRange>*)0)); xShapePropSet->setPropertyValue( - OUString::createFromAscii( "TextRange" ), aTmp ); + OUString(RTL_CONSTASCII_USTRINGPARAM("TextRange")), aTmp ); } if( bSetPos ) { aTmp <<= (sal_Int16)text::HoriOrientation::NONE; xShapePropSet->setPropertyValue( - OUString::createFromAscii( "HoriOrient" ), aTmp ); + OUString(RTL_CONSTASCII_USTRINGPARAM("HoriOrient")), aTmp ); aTmp <<= (sal_Int32)nXPos ; xShapePropSet->setPropertyValue( - OUString::createFromAscii( "HoriOrientPosition" ), aTmp ); + OUString(RTL_CONSTASCII_USTRINGPARAM("HoriOrientPosition")), aTmp ); aTmp <<= (sal_Int16)text::VertOrientation::NONE; xShapePropSet->setPropertyValue( - OUString::createFromAscii( "VertOrient" ), aTmp ); + OUString(RTL_CONSTASCII_USTRINGPARAM("VertOrient")), aTmp ); aTmp <<= (sal_Int32)nYPos ; xShapePropSet->setPropertyValue( - OUString::createFromAscii( "VertOrientPosition" ), aTmp ); + OUString(RTL_CONSTASCII_USTRINGPARAM("VertOrientPosition")), aTmp ); } if( bSetSurround ) { aTmp <<= (sal_Int16)nSurround ; xShapePropSet->setPropertyValue( - OUString::createFromAscii( "Surround" ), aTmp ); + OUString(RTL_CONSTASCII_USTRINGPARAM("Surround")), aTmp ); } pFormImpl->GetShapes()->add(xShape); @@ -1415,7 +1415,7 @@ void SwHTMLParser::NewForm( sal_Bool bAppend ) return; uno::Reference< XInterface > xInt = rSrvcMgr->createInstance( - OUString::createFromAscii( "com.sun.star.form.component.Form" ) ); + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.form.component.Form")) ); if( !xInt.is() ) return; @@ -1429,7 +1429,7 @@ void SwHTMLParser::NewForm( sal_Bool bAppend ) Any aTmp; aTmp <<= OUString(sName); - xFormPropSet->setPropertyValue( OUString::createFromAscii( "Name" ), aTmp ); + xFormPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("Name")), aTmp ); if( aAction.Len() ) { @@ -1442,24 +1442,24 @@ void SwHTMLParser::NewForm( sal_Bool bAppend ) aAction = aURLObj.GetPartBeforeLastName(); } aTmp <<= OUString(aAction); - xFormPropSet->setPropertyValue( OUString::createFromAscii( "TargetURL" ), + xFormPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("TargetURL")), aTmp ); FormSubmitMethod eMethod = (FormSubmitMethod)nMethod; aTmp.setValue( &eMethod, ::getCppuType((const FormSubmitMethod*)0) ); - xFormPropSet->setPropertyValue( OUString::createFromAscii( "SubmitMethod" ), + xFormPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("SubmitMethod")), aTmp ); FormSubmitEncoding eEncType = (FormSubmitEncoding)nEncType; aTmp.setValue( &eEncType, ::getCppuType((const FormSubmitEncoding*)0) ); xFormPropSet->setPropertyValue( - OUString::createFromAscii( "SubmitEncoding" ), aTmp ); + OUString(RTL_CONSTASCII_USTRINGPARAM("SubmitEncoding")), aTmp ); if( sTarget.Len() ) { aTmp <<= OUString(sTarget); xFormPropSet->setPropertyValue( - OUString::createFromAscii( "TargetFrame" ), aTmp ); + OUString(RTL_CONSTASCII_USTRINGPARAM("TargetFrame")), aTmp ); } const uno::Reference< container::XIndexContainer > & rForms = @@ -1713,7 +1713,7 @@ void SwHTMLParser::InsertInput() return; String sServiceName( - OUString::createFromAscii("com.sun.star.form.component.") ); + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.form.component.")) ); sServiceName.AppendAscii( pType ); uno::Reference< XInterface > xInt = rServiceFactory->createInstance( sServiceName ); @@ -1728,21 +1728,21 @@ void SwHTMLParser::InsertInput() Any aTmp; aTmp <<= OUString(sName); - xPropSet->setPropertyValue( OUString::createFromAscii( "Name" ), aTmp ); + xPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("Name")), aTmp ); if( HTML_IT_HIDDEN != eType ) { if( nTabIndex >= TABINDEX_MIN && nTabIndex <= TABINDEX_MAX ) { aTmp <<= (sal_Int16) (sal_Int16)nTabIndex ; - xPropSet->setPropertyValue( OUString::createFromAscii( "TabIndex" ), aTmp ); + xPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("TabIndex")), aTmp ); } if( bDisabled ) { BOOL bFalse = sal_False; aTmp.setValue(&bFalse, ::getBooleanCppuType() ); - xPropSet->setPropertyValue( OUString::createFromAscii( "Enabled" ), aTmp ); + xPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("Enabled")), aTmp ); } } @@ -1759,10 +1759,10 @@ void SwHTMLParser::InsertInput() { if( !bValue ) aTmp <<= OUString::createFromAscii( OOO_STRING_SVTOOLS_HTML_on ); - xPropSet->setPropertyValue( OUString::createFromAscii( "RefValue" ), + xPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("RefValue")), aTmp ); aTmp <<= OUString(); - xPropSet->setPropertyValue( OUString::createFromAscii( "Label" ), + xPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("Label")), aTmp ); // #53559#: Beim RadioButton darf die DefaultChecked-Property // erst gesetzt werden, wenn das Control angelegt und ein @@ -1772,7 +1772,7 @@ void SwHTMLParser::InsertInput() { aTmp <<= (sal_Int16) nChecked ; xPropSet->setPropertyValue( - OUString::createFromAscii( "DefaultState" ), aTmp ); + OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultState")), aTmp ); } SvxMacro *pMacro = aMacroTbl.Get( HTML_ET_ONCLICK ); @@ -1801,10 +1801,10 @@ void SwHTMLParser::InsertInput() aTmp.setValue( &eButtonType, ::getCppuType((const FormButtonType*)0)); xPropSet->setPropertyValue( - OUString::createFromAscii( "ButtonType" ), aTmp ); + OUString(RTL_CONSTASCII_USTRINGPARAM("ButtonType")), aTmp ); aTmp <<= (sal_Int16) 0 ; - xPropSet->setPropertyValue( OUString::createFromAscii( "Border" ), + xPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("Border")), aTmp ); } break; @@ -1833,13 +1833,13 @@ void SwHTMLParser::InsertInput() ; } aTmp <<= OUString(sText); - xPropSet->setPropertyValue( OUString::createFromAscii( "Label" ), + xPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("Label")), aTmp ); aTmp.setValue( &eButtonType, ::getCppuType((const FormButtonType*)0)); xPropSet->setPropertyValue( - OUString::createFromAscii( "ButtonType" ), aTmp ); + OUString(RTL_CONSTASCII_USTRINGPARAM("ButtonType")), aTmp ); bMinWidth = bMinHeight = sal_True; bUseSize = sal_True; @@ -1853,19 +1853,19 @@ void SwHTMLParser::InsertInput() { // Beim File-Control wird der VALUE aus Sicherheitsgruenden ignoriert. xPropSet->setPropertyValue( - OUString::createFromAscii( "DefaultText" ), aTmp ); + OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultText")), aTmp ); if( nMaxLen != 0 ) { aTmp <<= (sal_Int16) nMaxLen ; xPropSet->setPropertyValue( - OUString::createFromAscii( "MaxTextLen" ), aTmp ); + OUString(RTL_CONSTASCII_USTRINGPARAM("MaxTextLen")), aTmp ); } } if( HTML_IT_PASSWORD == eType ) { aTmp <<= (sal_Int16)'*' ; - xPropSet->setPropertyValue( OUString::createFromAscii( "EchoChar" ), + xPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("EchoChar")), aTmp ); } @@ -1878,7 +1878,7 @@ void SwHTMLParser::InsertInput() break; case HTML_IT_HIDDEN: - xPropSet->setPropertyValue( OUString::createFromAscii( "HiddenValue" ), + xPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("HiddenValue")), aTmp ); bHidden = sal_True; break; @@ -1959,7 +1959,7 @@ void SwHTMLParser::InsertInput() if( HTML_IT_RADIO == eType ) { aTmp <<= (sal_Int16) nChecked ; - xPropSet->setPropertyValue( OUString::createFromAscii( "DefaultState" ), aTmp ); + xPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultState")), aTmp ); } if( HTML_IT_IMAGE == eType ) @@ -1968,7 +1968,7 @@ void SwHTMLParser::InsertInput() // Download der Grafik erst dann am XModel anmelden kann, // wenn das Control eingefuegt ist. aTmp <<= OUString( URIHelper::SmartRel2Abs(INetURLObject(sBaseURL), sImgSrc, Link(), false)); - xPropSet->setPropertyValue( OUString::createFromAscii( "ImageURL" ), + xPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("ImageURL")), aTmp ); } @@ -2117,7 +2117,7 @@ void SwHTMLParser::NewTextArea() return; } uno::Reference< uno::XInterface > xInt = rSrvcMgr->createInstance( - OUString::createFromAscii( "com.sun.star.form.component.TextField" ) ); + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.form.component.TextField")) ); if( !xInt.is() ) { FinishTextArea(); @@ -2131,24 +2131,24 @@ void SwHTMLParser::NewTextArea() Any aTmp; aTmp <<= OUString(sName); - xPropSet->setPropertyValue( OUString::createFromAscii( "Name" ), aTmp ); + xPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("Name")), aTmp ); BOOL bTrue = sal_True; aTmp.setValue( &bTrue, ::getBooleanCppuType() ); - xPropSet->setPropertyValue( OUString::createFromAscii( "MultiLine" ), + xPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("MultiLine")), aTmp ); - xPropSet->setPropertyValue( OUString::createFromAscii( "VScroll" ), aTmp ); + xPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("VScroll")), aTmp ); if( HTML_WM_OFF == nWrap ) - xPropSet->setPropertyValue( OUString::createFromAscii( "HScroll" ), + xPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("HScroll")), aTmp ); if( HTML_WM_HARD == nWrap ) xPropSet->setPropertyValue( - OUString::createFromAscii( "HardLineBreaks" ), aTmp ); + OUString(RTL_CONSTASCII_USTRINGPARAM("HardLineBreaks")), aTmp ); if( nTabIndex >= TABINDEX_MIN && nTabIndex <= TABINDEX_MAX ) { aTmp <<= (sal_Int16)nTabIndex ; - xPropSet->setPropertyValue( OUString::createFromAscii( "TabIndex" ), + xPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("TabIndex")), aTmp ); } @@ -2158,7 +2158,7 @@ void SwHTMLParser::NewTextArea() { BOOL bFalse = sal_False; aTmp.setValue( &bFalse, ::getBooleanCppuType() ); - xPropSet->setPropertyValue( OUString::createFromAscii( "Enabled" ), + xPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("Enabled")), aTmp ); } @@ -2227,7 +2227,7 @@ void SwHTMLParser::EndTextArea() Any aTmp; aTmp <<= OUString(pFormImpl->GetText()); - rPropSet->setPropertyValue( OUString::createFromAscii( "DefaultText" ), + rPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultText")), aTmp ); pFormImpl->EraseText(); @@ -2397,7 +2397,7 @@ void SwHTMLParser::NewSelect() return; } uno::Reference< uno::XInterface > xInt = rSrvcMgr->createInstance( - OUString::createFromAscii( "com.sun.star.form.component.ListBox" ) ); + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.form.component.ListBox")) ); if( !xInt.is() ) { FinishTextArea(); @@ -2411,12 +2411,12 @@ void SwHTMLParser::NewSelect() Any aTmp; aTmp <<= OUString(sName); - xPropSet->setPropertyValue( OUString::createFromAscii( "Name" ), aTmp ); + xPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("Name")), aTmp ); if( nTabIndex >= TABINDEX_MIN && nTabIndex <= TABINDEX_MAX ) { aTmp <<= (sal_Int16)nTabIndex ; - xPropSet->setPropertyValue( OUString::createFromAscii( "TabIndex" ), + xPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("TabIndex")), aTmp ); } @@ -2424,7 +2424,7 @@ void SwHTMLParser::NewSelect() { BOOL bFalse = sal_False; aTmp.setValue( &bFalse, ::getBooleanCppuType() ); - xPropSet->setPropertyValue( OUString::createFromAscii( "Enabled" ), + xPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("Enabled")), aTmp ); } @@ -2434,7 +2434,7 @@ void SwHTMLParser::NewSelect() { BOOL bTrue = sal_True; aTmp.setValue( &bTrue, ::getBooleanCppuType() ); - xPropSet->setPropertyValue( OUString::createFromAscii( "Dropdown" ), + xPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("Dropdown")), aTmp ); } else @@ -2447,7 +2447,7 @@ void SwHTMLParser::NewSelect() BOOL bTrue = sal_True; aTmp.setValue( &bTrue, ::getBooleanCppuType() ); xPropSet->setPropertyValue( - OUString::createFromAscii( "MultiSelection" ), aTmp ); + OUString(RTL_CONSTASCII_USTRINGPARAM("MultiSelection")), aTmp ); } aTextSz.Height() = nSelectEntryCnt; bMinHeight = sal_False; @@ -2542,15 +2542,15 @@ void SwHTMLParser::EndSelect() Any aAny( &aList, ::getCppuType((uno::Sequence<OUString>*)0) ); rPropSet->setPropertyValue( - OUString::createFromAscii( "StringItemList" ), aAny ); + OUString(RTL_CONSTASCII_USTRINGPARAM("StringItemList")), aAny ); aAny <<= ListSourceType_VALUELIST; rPropSet->setPropertyValue( - OUString::createFromAscii( "ListSourceType" ), aAny ); + OUString(RTL_CONSTASCII_USTRINGPARAM("ListSourceType")), aAny ); aAny.setValue( &aValueList, ::getCppuType((uno::Sequence<OUString>*)0) ); - rPropSet->setPropertyValue( OUString::createFromAscii( "ListSource" ), + rPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("ListSource")), aAny ); sal_uInt16 nSelCnt = pFormImpl->GetSelectedList().Count(); @@ -2571,7 +2571,7 @@ void SwHTMLParser::EndSelect() ::getCppuType((uno::Sequence<sal_Int16>*)0) ); rPropSet->setPropertyValue( - OUString::createFromAscii( "DefaultSelection" ), aAny ); + OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultSelection")), aAny ); pFormImpl->EraseStringList(); pFormImpl->EraseValueList(); diff --git a/sw/source/filter/html/htmlforw.cxx b/sw/source/filter/html/htmlforw.cxx index fbf7943fe0..734f7f4e0e 100644 --- a/sw/source/filter/html/htmlforw.cxx +++ b/sw/source/filter/html/htmlforw.cxx @@ -457,7 +457,7 @@ void SwHTMLWriter::OutHiddenForm( const uno::Reference< form::XForm > & rForm ) if( bHiddenOnly ) { uno::Reference< beans::XPropertySet > xPropSet( xFormComp, uno::UNO_QUERY ); - OUString sPropName = OUString::createFromAscii( "ClassId" ); + OUString sPropName(RTL_CONSTASCII_USTRINGPARAM("ClassId")); if( xPropSet->getPropertySetInfo()->hasPropertyByName( sPropName ) ) { uno::Any aAny2 = xPropSet->getPropertyValue( sPropName ); @@ -508,7 +508,7 @@ void SwHTMLWriter::OutForm( sal_Bool bOn, uno::Reference< beans::XPropertySet > xFormPropSet( rFormComps, uno::UNO_QUERY ); uno::Any aTmp = xFormPropSet->getPropertyValue( - OUString::createFromAscii( "Name" ) ); + OUString(RTL_CONSTASCII_USTRINGPARAM("Name")) ); if( aTmp.getValueType() == ::getCppuType((const OUString*)0) && ((OUString*)aTmp.getValue())->getLength() ) { @@ -520,7 +520,7 @@ void SwHTMLWriter::OutForm( sal_Bool bOn, } aTmp = xFormPropSet->getPropertyValue( - OUString::createFromAscii( "TargetURL" ) ); + OUString(RTL_CONSTASCII_USTRINGPARAM("TargetURL")) ); if( aTmp.getValueType() == ::getCppuType((const OUString*)0) && ((OUString*)aTmp.getValue())->getLength() ) { @@ -533,7 +533,7 @@ void SwHTMLWriter::OutForm( sal_Bool bOn, } aTmp = xFormPropSet->getPropertyValue( - OUString::createFromAscii( "SubmitMethod" ) ); + OUString(RTL_CONSTASCII_USTRINGPARAM("SubmitMethod")) ); if( aTmp.getValueType() == ::getCppuType((const form::FormSubmitMethod*)0) ) { form::FormSubmitMethod eMethod = @@ -546,7 +546,7 @@ void SwHTMLWriter::OutForm( sal_Bool bOn, } } aTmp = xFormPropSet->getPropertyValue( - OUString::createFromAscii( "SubmitEncoding" ) ); + OUString(RTL_CONSTASCII_USTRINGPARAM("SubmitEncoding")) ); if( aTmp.getValueType()==::getCppuType((const form::FormSubmitEncoding*)0) ) { form::FormSubmitEncoding eEncType = @@ -573,7 +573,7 @@ void SwHTMLWriter::OutForm( sal_Bool bOn, } aTmp = xFormPropSet->getPropertyValue( - OUString::createFromAscii( "TargetFrame" ) ); + OUString(RTL_CONSTASCII_USTRINGPARAM("TargetFrame")) ); if( aTmp.getValueType() == ::getCppuType((const OUString*)0)&& ((OUString*)aTmp.getValue())->getLength() ) { @@ -629,7 +629,7 @@ void SwHTMLWriter::OutHiddenControls( *(uno::Reference< form::XFormComponent > *)aTmp.getValue(); uno::Reference< beans::XPropertySet > xPropSet( xFC, uno::UNO_QUERY ); - OUString sPropName = OUString::createFromAscii( "ClassId" ); + OUString sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("ClassId")); if( !xPropSet->getPropertySetInfo()->hasPropertyByName( sPropName ) ) continue; @@ -647,7 +647,7 @@ void SwHTMLWriter::OutHiddenControls( OOO_STRING_SVTOOLS_HTML_O_type) += '=') += OOO_STRING_SVTOOLS_HTML_IT_hidden; aTmp = xPropSet->getPropertyValue( - OUString::createFromAscii( "Name" ) ); + OUString(RTL_CONSTASCII_USTRINGPARAM("Name")) ); if( aTmp.getValueType() == ::getCppuType((const OUString*)0) && ((OUString*)aTmp.getValue())->getLength() ) { @@ -658,7 +658,7 @@ void SwHTMLWriter::OutHiddenControls( sOut = '\"'; } aTmp = xPropSet->getPropertyValue( - OUString::createFromAscii( "HiddenValue" ) ); + OUString(RTL_CONSTASCII_USTRINGPARAM("HiddenValue")) ); if( aTmp.getValueType() == ::getCppuType((const OUString*)0) && ((OUString*)aTmp.getValue())->getLength() ) { @@ -705,7 +705,7 @@ const SdrObject *SwHTMLWriter::GetHTMLControl( const SwDrawFrmFmt& rFmt ) uno::Reference< beans::XPropertySet > xPropSet( xControlModel, uno::UNO_QUERY ); - OUString sPropName = OUString::createFromAscii( "ClassId" ); + OUString sPropName(RTL_CONSTASCII_USTRINGPARAM("ClassId")); if( !xPropSet->getPropertySetInfo()->hasPropertyByName( sPropName ) ) return 0; @@ -786,7 +786,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt, ByteString sOptions; sal_Bool bEmptyValue = sal_False; uno::Any aTmp = xPropSet->getPropertyValue( - OUString::createFromAscii( "ClassId" ) ); + OUString(RTL_CONSTASCII_USTRINGPARAM("ClassId")) ); sal_Int16 nClassId = *(sal_Int16*) aTmp.getValue(); sal_uInt32 nFrmOpts = HTML_FRMOPTS_CONTROL; switch( nClassId ) @@ -796,7 +796,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt, eType = (form::FormComponentType::CHECKBOX == nClassId ? TYPE_CHECKBOX : TYPE_RADIO); aTmp = xPropSet->getPropertyValue( - OUString::createFromAscii( "DefaultState" ) ); + OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultState")) ); if( aTmp.getValueType() == ::getCppuType((const sal_Int16*)0) && STATE_NOCHECK != *(sal_Int16*) aTmp.getValue() ) { @@ -804,7 +804,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt, } aTmp = xPropSet->getPropertyValue( - OUString::createFromAscii( "RefValue" ) ); + OUString(RTL_CONSTASCII_USTRINGPARAM("RefValue")) ); if( aTmp.getValueType() == ::getCppuType((const OUString*)0) ) { @@ -820,7 +820,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt, { form::FormButtonType eButtonType = form::FormButtonType_PUSH; aTmp = xPropSet->getPropertyValue( - OUString::createFromAscii( "ButtonType" ) ); + OUString(RTL_CONSTASCII_USTRINGPARAM("ButtonType")) ); if( aTmp.getValueType() == ::getCppuType((const form::FormButtonType*)0) ) eButtonType = *( form::FormButtonType*)aTmp.getValue(); @@ -839,7 +839,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt, } aTmp = xPropSet->getPropertyValue( - OUString::createFromAscii( "Label" ) ); + OUString(RTL_CONSTASCII_USTRINGPARAM("Label")) ); if( aTmp.getValueType() == ::getCppuType((const OUString*)0) && ((OUString*)aTmp.getValue())->getLength() ) { @@ -853,7 +853,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt, rHTMLWrt.OutNewLine( sal_True ); eTag = TAG_SELECT; aTmp = xPropSet->getPropertyValue( - OUString::createFromAscii( "Dropdown" ) ); + OUString(RTL_CONSTASCII_USTRINGPARAM("Dropdown")) ); if( aTmp.getValueType() == ::getBooleanCppuType() && !*(sal_Bool*)aTmp.getValue() ) { @@ -866,7 +866,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt, += ByteString::CreateFromInt32( aSz.Height() ); aTmp = xPropSet->getPropertyValue( - OUString::createFromAscii( "MultiSelection" ) ); + OUString(RTL_CONSTASCII_USTRINGPARAM("MultiSelection")) ); if( aTmp.getValueType() == ::getBooleanCppuType() && *(sal_Bool*)aTmp.getValue() ) { @@ -881,7 +881,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt, GetControlSize( rSdrObject, aSz, rWrt.pDoc ); sal_Bool bMultiLine = sal_False; - OUString sMultiLine( OUString::createFromAscii( "MultiLine" ) ); + OUString sMultiLine(RTL_CONSTASCII_USTRINGPARAM("MultiLine")); if( xPropSetInfo->hasPropertyByName( sMultiLine ) ) { aTmp = xPropSet->getPropertyValue( sMultiLine ); @@ -903,14 +903,14 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt, += ByteString::CreateFromInt32( aSz.Width() ); aTmp = xPropSet->getPropertyValue( - OUString::createFromAscii( "HScroll" ) ); + OUString(RTL_CONSTASCII_USTRINGPARAM("HScroll")) ); if( aTmp.getValueType() == ::getVoidCppuType() || (aTmp.getValueType() == ::getBooleanCppuType() && !*(sal_Bool*)aTmp.getValue()) ) { const sal_Char *pWrapStr = 0; aTmp = xPropSet->getPropertyValue( - OUString::createFromAscii( "HardLineBreaks" ) ); + OUString(RTL_CONSTASCII_USTRINGPARAM("HardLineBreaks")) ); pWrapStr = (aTmp.getValueType() == ::getBooleanCppuType() && *(sal_Bool*)aTmp.getValue()) ? OOO_STRING_SVTOOLS_HTML_WW_hard @@ -921,7 +921,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt, else { eType = TYPE_TEXT; - OUString sEchoChar( OUString::createFromAscii( "EchoChar" ) ); + OUString sEchoChar(RTL_CONSTASCII_USTRINGPARAM("EchoChar")); if( xPropSetInfo->hasPropertyByName( sEchoChar ) ) { aTmp = xPropSet->getPropertyValue( sEchoChar ); @@ -935,7 +935,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt, += ByteString::CreateFromInt32( aSz.Width() ); aTmp = xPropSet->getPropertyValue( - OUString::createFromAscii( "MaxTextLen" ) ); + OUString(RTL_CONSTASCII_USTRINGPARAM("MaxTextLen")) ); if( aTmp.getValueType() == ::getCppuType((const sal_Int16*)0) && *(sal_Int16*) aTmp.getValue() != 0 ) { @@ -944,7 +944,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt, *(sal_Int16*) aTmp.getValue() ); } - OUString sDefaultText( OUString::createFromAscii( "DefaultText" ) ); + OUString sDefaultText(RTL_CONSTASCII_USTRINGPARAM("DefaultText")); if( xPropSetInfo->hasPropertyByName( sDefaultText ) ) { aTmp = xPropSet->getPropertyValue( sDefaultText ); @@ -992,7 +992,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt, (((sOut += ' ') += OOO_STRING_SVTOOLS_HTML_O_type) += '=') += TypeNames[eType]; - aTmp = xPropSet->getPropertyValue( OUString::createFromAscii( "Name" ) ); + aTmp = xPropSet->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("Name")) ); if( aTmp.getValueType() == ::getCppuType((const OUString*)0) && ((OUString*)aTmp.getValue())->getLength() ) { @@ -1003,7 +1003,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt, sOut = '\"'; } - aTmp = xPropSet->getPropertyValue( OUString::createFromAscii( "Enabled" ) ); + aTmp = xPropSet->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("Enabled")) ); if( aTmp.getValueType() == ::getBooleanCppuType() && !*(sal_Bool*)aTmp.getValue() ) { @@ -1023,7 +1023,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt, if( TYPE_IMAGE == eType ) { aTmp = xPropSet->getPropertyValue( - OUString::createFromAscii( "ImageURL" ) ); + OUString(RTL_CONSTASCII_USTRINGPARAM("ImageURL")) ); if( aTmp.getValueType() == ::getCppuType((const OUString*)0) && ((OUString*)aTmp.getValue())->getLength() ) { @@ -1060,7 +1060,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt, } aTmp = xPropSet->getPropertyValue( - OUString::createFromAscii( "TabIndex" ) ); + OUString(RTL_CONSTASCII_USTRINGPARAM("TabIndex")) ); if( aTmp.getValueType() == ::getCppuType((const sal_Int16*)0) ) { sal_Int16 nTabIndex = *(sal_Int16*) aTmp.getValue(); @@ -1100,7 +1100,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt, SfxItemSet aItemSet( rHTMLWrt.pDoc->GetAttrPool(), RES_CHRATR_BEGIN, RES_CHRATR_END ); - OUString sPropName = OUString::createFromAscii( "BackgroundColor" ); + OUString sPropName(RTL_CONSTASCII_USTRINGPARAM("BackgroundColor")); if( xPropSetInfo->hasPropertyByName( sPropName ) ) { aTmp = xPropSet->getPropertyValue( sPropName ); @@ -1110,7 +1110,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt, aItemSet.Put( SvxBrushItem( aCol, RES_CHRATR_BACKGROUND ) ); } } - sPropName = OUString::createFromAscii( "TextColor" ); + sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("TextColor")); if( xPropSetInfo->hasPropertyByName( sPropName ) ) { aTmp = xPropSet->getPropertyValue( sPropName ); @@ -1120,7 +1120,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt, aItemSet.Put( SvxColorItem( aColor, RES_CHRATR_COLOR ) ); } } - sPropName = OUString::createFromAscii( "FontHeight" ); + sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("FontHeight")); if( xPropSetInfo->hasPropertyByName( sPropName ) ) { aTmp = xPropSet->getPropertyValue( sPropName ); @@ -1132,7 +1132,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt, aItemSet.Put( SvxFontHeightItem( sal_Int16(nHeight * 20.), 100, RES_CHRATR_FONTSIZE ) ); } } - sPropName = OUString::createFromAscii( "FontName" ); + sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("FontName")); if( xPropSetInfo->hasPropertyByName( sPropName ) ) { aTmp = xPropSet->getPropertyValue( sPropName ); @@ -1146,7 +1146,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt, if( !bEdit || aFName != aFixedFont.GetName() ) { FontFamily eFamily = FAMILY_DONTKNOW; - sPropName = OUString::createFromAscii( "FontFamily" ); + sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("FontFamily")); if( xPropSetInfo->hasPropertyByName( sPropName ) ) { aTmp = xPropSet->getPropertyValue( sPropName ); @@ -1158,7 +1158,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt, } } } - sPropName = OUString::createFromAscii( "FontWeight" ); + sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("FontWeight")); if( xPropSetInfo->hasPropertyByName( sPropName ) ) { aTmp = xPropSet->getPropertyValue( sPropName ); @@ -1170,7 +1170,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt, aItemSet.Put( SvxWeightItem( eWeight, RES_CHRATR_WEIGHT ) ); } } - sPropName = OUString::createFromAscii( "FontSlant" ); + sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("FontSlant")); if( xPropSetInfo->hasPropertyByName( sPropName ) ) { aTmp = xPropSet->getPropertyValue( sPropName ); @@ -1181,7 +1181,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt, aItemSet.Put( SvxPostureItem( eItalic, RES_CHRATR_POSTURE ) ); } } - sPropName = OUString::createFromAscii( "FontUnderline" ); + sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("FontUnderline")); if( xPropSetInfo->hasPropertyByName( sPropName ) ) { aTmp = xPropSet->getPropertyValue( sPropName ); @@ -1194,7 +1194,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt, aItemSet.Put( SvxUnderlineItem( eUnderline, RES_CHRATR_UNDERLINE ) ); } } - sPropName = OUString::createFromAscii( "FontStrikeout" ); + sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("FontStrikeout")); if( xPropSetInfo->hasPropertyByName( sPropName ) ) { aTmp = xPropSet->getPropertyValue( sPropName ); @@ -1221,7 +1221,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt, if( TAG_SELECT == eTag ) { aTmp = xPropSet->getPropertyValue( - OUString::createFromAscii( "StringItemList" ) ); + OUString(RTL_CONSTASCII_USTRINGPARAM("StringItemList")) ); if( aTmp.getValueType() == ::getCppuType((uno::Sequence<OUString>*)0) ) { rHTMLWrt.IncIndentLevel(); // der Inhalt von Select darf @@ -1233,7 +1233,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt, const OUString *pValues = 0; sal_Int32 nValCnt = 0; aTmp = xPropSet->getPropertyValue( - OUString::createFromAscii( "ListSource" ) ); + OUString(RTL_CONSTASCII_USTRINGPARAM("ListSource")) ); uno::Sequence<OUString> aValList; if( aTmp.getValueType() == ::getCppuType((uno::Sequence<OUString>*)0) ) { @@ -1243,7 +1243,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt, } uno::Any aSelTmp = xPropSet->getPropertyValue( - OUString::createFromAscii( "DefaultSelection" ) ); + OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultSelection")) ); const sal_Int16 *pSels = 0; sal_Int32 nSel = 0; sal_Int32 nSelCnt = 0; @@ -1304,7 +1304,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt, // werden! String sVal; aTmp = xPropSet->getPropertyValue( - OUString::createFromAscii( "DefaultText" ) ); + OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultText")) ); if( aTmp.getValueType() == ::getCppuType((const OUString*)0)&& ((OUString*)aTmp.getValue())->getLength() ) { @@ -1327,7 +1327,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt, } else if( TYPE_CHECKBOX == eType || TYPE_RADIO == eType ) { - aTmp = xPropSet->getPropertyValue( OUString::createFromAscii("Label") ); + aTmp = xPropSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("Label"))); if( aTmp.getValueType() == ::getCppuType((const OUString*)0) && ((OUString*)aTmp.getValue())->getLength() ) { diff --git a/sw/source/filter/html/htmlplug.cxx b/sw/source/filter/html/htmlplug.cxx index 0183a12948..89ce188ee0 100644 --- a/sw/source/filter/html/htmlplug.cxx +++ b/sw/source/filter/html/htmlplug.cxx @@ -432,15 +432,15 @@ void SwHTMLParser::InsertEmbed() if ( xSet.is() ) { if( bHasURL ) - xSet->setPropertyValue( ::rtl::OUString::createFromAscii("PluginURL"), + xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PluginURL")), uno::makeAny( ::rtl::OUString( aURL ) ) ); if( bHasType ) - xSet->setPropertyValue( ::rtl::OUString::createFromAscii("PluginMimeType"), + xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PluginMimeType")), uno::makeAny( ::rtl::OUString( aType ) ) ); uno::Sequence < beans::PropertyValue > aProps; aCmdLst.FillSequence( aProps ); - xSet->setPropertyValue( ::rtl::OUString::createFromAscii("PluginCommands"), uno::makeAny( aProps ) ); + xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PluginCommands")), uno::makeAny( aProps ) ); // TODO/LATER: EnableSetModified?! //pPlugin->EnableSetModified( TRUE ); @@ -910,27 +910,27 @@ void SwHTMLParser::InsertFloatingFrame() sal_Bool bHasBorder = aFrameDesc.HasFrameBorder(); Size aMargin = aFrameDesc.GetMargin(); - xSet->setPropertyValue( ::rtl::OUString::createFromAscii("FrameURL"), uno::makeAny( ::rtl::OUString( aFrameDesc.GetURL().GetMainURL( INetURLObject::NO_DECODE ) ) ) ); - xSet->setPropertyValue( ::rtl::OUString::createFromAscii("FrameName"), uno::makeAny( aName ) ); + xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameURL")), uno::makeAny( ::rtl::OUString( aFrameDesc.GetURL().GetMainURL( INetURLObject::NO_DECODE ) ) ) ); + xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameName")), uno::makeAny( aName ) ); if ( eScroll == ScrollingAuto ) - xSet->setPropertyValue( ::rtl::OUString::createFromAscii("FrameIsAutoScroll"), + xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameIsAutoScroll")), uno::makeAny( sal_True ) ); else - xSet->setPropertyValue( ::rtl::OUString::createFromAscii("FrameIsScrollingMode"), + xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameIsScrollingMode")), uno::makeAny( (sal_Bool) ( eScroll == ScrollingYes) ) ); //if ( aFrmDescr.IsFrameBorderSet() ) - xSet->setPropertyValue( ::rtl::OUString::createFromAscii("FrameIsBorder"), + xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameIsBorder")), uno::makeAny( bHasBorder ) ); /*else - xSet->setPropertyValue( ::rtl::OUString::createFromAscii("FrameIsAutoBorder"), + xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameIsAutoBorder")), uno::makeAny( sal_True ) );*/ - xSet->setPropertyValue( ::rtl::OUString::createFromAscii("FrameMarginWidth"), + xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameMarginWidth")), uno::makeAny( sal_Int32( aMargin.Width() ) ) ); - xSet->setPropertyValue( ::rtl::OUString::createFromAscii("FrameMarginHeight"), + xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameMarginHeight")), uno::makeAny( sal_Int32( aMargin.Height() ) ) ); } } @@ -1136,7 +1136,7 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt, ::rtl::OUString aStr; String aURL; - aAny = xSet->getPropertyValue( ::rtl::OUString::createFromAscii("PluginURL" ) ); + aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PluginURL")) ); if( (aAny >>= aStr) && aStr.getLength() ) { aURL = URIHelper::simpleNormalizedMakeRelative( rWrt.GetBaseURL(), @@ -1152,7 +1152,7 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt, } ::rtl::OUString aType; - aAny = xSet->getPropertyValue( ::rtl::OUString::createFromAscii("PluginMimeType" ) ); + aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PluginMimeType")) ); if( (aAny >>= aType) && aType.getLength() ) { ((sOut += ' ') += OOO_STRING_SVTOOLS_HTML_O_type) += "=\""; @@ -1183,7 +1183,7 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt, // CODEBASE ::rtl::OUString aCd; - aAny = xSet->getPropertyValue( ::rtl::OUString::createFromAscii("AppletCodeBase" ) ); + aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AppletCodeBase")) ); if( (aAny >>= aCd) && aCd.getLength() ) { String sCodeBase( URIHelper::simpleNormalizedMakeRelative(rWrt.GetBaseURL(), aCd) ); @@ -1198,7 +1198,7 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt, // CODE ::rtl::OUString aClass; - aAny = xSet->getPropertyValue( ::rtl::OUString::createFromAscii("AppletCode" ) ); + aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AppletCode")) ); aAny >>= aClass; ((sOut += ' ') += OOO_STRING_SVTOOLS_HTML_O_code) += "=\""; rWrt.Strm() << sOut.GetBuffer(); @@ -1207,7 +1207,7 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt, // NAME ::rtl::OUString aAppletName; - aAny = xSet->getPropertyValue( ::rtl::OUString::createFromAscii("AppletName" ) ); + aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AppletName")) ); aAny >>= aAppletName; if( aAppletName.getLength() ) { @@ -1218,7 +1218,7 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt, } sal_Bool bScript = sal_False; - aAny = xSet->getPropertyValue( ::rtl::OUString::createFromAscii("AppletIsScript" ) ); + aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AppletIsScript")) ); aAny >>= bScript; if( bScript ) (sOut += ' ') += OOO_STRING_SVTOOLS_HTML_O_mayscript; @@ -1259,7 +1259,7 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt, // und ein </APPLET> schreiben uno::Sequence < beans::PropertyValue > aProps; - aAny = xSet->getPropertyValue( ::rtl::OUString::createFromAscii("AppletCommands" ) ); + aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AppletCommands")) ); aAny >>= aProps; SvCommandList aCommands; @@ -1316,7 +1316,7 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt, // fuer Plugins die Paramater als Optionen schreiben uno::Sequence < beans::PropertyValue > aProps; - aAny = xSet->getPropertyValue( ::rtl::OUString::createFromAscii("PluginCommands" ) ); + aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PluginCommands")) ); aAny >>= aProps; SvCommandList aCommands; diff --git a/sw/source/filter/ww8/docxexportfilter.cxx b/sw/source/filter/ww8/docxexportfilter.cxx index bf67dd9be9..0bd0e16015 100644 --- a/sw/source/filter/ww8/docxexportfilter.cxx +++ b/sw/source/filter/ww8/docxexportfilter.cxx @@ -140,7 +140,7 @@ SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( void* /* pServiceMan { uno::Reference< registry::XRegistryKey > xNewKey1( static_cast< registry::XRegistryKey* >( pRegistryKey )->createKey( - OUString::createFromAscii( IMPL_NAME "/UNO/SERVICES/" ) ) ); + OUString(RTL_CONSTASCII_USTRINGPARAM(IMPL_NAME "/UNO/SERVICES/" ))) ); xNewKey1->createKey( DocxExport_getSupportedServiceNames().getConstArray()[0] ); bRet = sal_True; @@ -194,7 +194,7 @@ SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplN if ( rtl_str_compare( pImplName, IMPL_NAME ) == 0 ) { - const OUString aServiceName( OUString::createFromAscii( IMPL_NAME ) ); + const OUString aServiceName( OUString(RTL_CONSTASCII_USTRINGPARAM(IMPL_NAME)) ); xFactory = uno::Reference< lang::XSingleServiceFactory >( ::cppu::createSingleFactory( reinterpret_cast< lang::XMultiServiceFactory* >( pServiceManager ), diff --git a/sw/source/filter/ww8/dump/ww8scan.cxx b/sw/source/filter/ww8/dump/ww8scan.cxx index 25971b3ea2..0184ba5431 100644 --- a/sw/source/filter/ww8/dump/ww8scan.cxx +++ b/sw/source/filter/ww8/dump/ww8scan.cxx @@ -121,10 +121,10 @@ public: { if (!bBroken) { - sError = rtl::OUString::createFromAscii( + sError = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "WW8: Duplicate in list, almost certainly don't want that!\n" "(You will not see this message again unless you restart)\n" - "Extra entries are...\n"); + "Extra entries are...\n")); bBroken=true; } diff --git a/sw/source/filter/ww8/hash_wrap.hxx b/sw/source/filter/ww8/hash_wrap.hxx index 1c99d7fc23..84844c8b60 100644 --- a/sw/source/filter/ww8/hash_wrap.hxx +++ b/sw/source/filter/ww8/hash_wrap.hxx @@ -87,12 +87,12 @@ namespace ww { if (!bBroken) { - sError = rtl::OUString::createFromAscii( + sError = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "WW8: Duplicate in list, almost certainly don't " "want that!\n" "(You will not see this message again unless you " "restart)\n" - "Extra entries are...\n"); + "Extra entries are...\n")); bBroken=true; } diff --git a/sw/source/filter/ww8/sortedarray.hxx b/sw/source/filter/ww8/sortedarray.hxx index ec2653a7d3..af1ede300e 100644 --- a/sw/source/filter/ww8/sortedarray.hxx +++ b/sw/source/filter/ww8/sortedarray.hxx @@ -84,12 +84,12 @@ namespace ww { if (!bBroken) { - sError = rtl::OUString::createFromAscii( + sError = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "WW8: Duplicate in list, almost certainly don't " "want that!\n" "(You will not see this message again unless you " "restart)\n" - "Extra entries are...\n"); + "Extra entries are...\n")); bBroken=true; } diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index c21f43f6a0..365e99cee2 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -3532,7 +3532,7 @@ void WW8Export::WriteFormData( const ::sw::mark::IFieldmark& rFieldmark ) if ( rFieldmark.GetFieldname().equalsAscii( ODF_FORMDROPDOWN ) ) type=2; - ::sw::mark::IFieldmark::parameter_map_t::const_iterator pNameParameter = rFieldmark.GetParameters()->find(::rtl::OUString::createFromAscii("name")); + ::sw::mark::IFieldmark::parameter_map_t::const_iterator pNameParameter = rFieldmark.GetParameters()->find(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("name"))); ::rtl::OUString ffname; if(pNameParameter != rFieldmark.GetParameters()->end()) pNameParameter->second >>= ffname; diff --git a/sw/source/filter/ww8/wrtww8gr.cxx b/sw/source/filter/ww8/wrtww8gr.cxx index ecb4d51931..abd78437e0 100644 --- a/sw/source/filter/ww8/wrtww8gr.cxx +++ b/sw/source/filter/ww8/wrtww8gr.cxx @@ -374,7 +374,7 @@ void WW8Export::OutputLinkedOLE( const rtl::OUString& rOleId ) { uno::Reference< embed::XStorage > xDocStg = pDoc->GetDocStorage(); uno::Reference< embed::XStorage > xOleStg = xDocStg->openStorageElement( - rtl::OUString::createFromAscii( "OLELinks" ), embed::ElementModes::READ ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("OLELinks")), embed::ElementModes::READ ); SotStorageRef xObjSrc = SotStorage::OpenOLEStorage( xOleStg, rOleId, STREAM_READ ); SotStorageRef xObjStg = GetWriter().GetStorage().OpenSotStorage( diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 8169aa23e5..a603f2278b 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -4002,7 +4002,7 @@ bool SwWW8ImplReader::ReadGlobalTemplateSettings( const rtl::OUString& sCreatedF uno::Sequence< rtl::OUString > sGlobalTemplates; // first get the autoload addins in the directory STARTUP - uno::Reference< ucb::XSimpleFileAccess > xSFA( ::comphelper::getProcessServiceFactory()->createInstance( rtl::OUString::createFromAscii( "com.sun.star.ucb.SimpleFileAccess" ) ), uno::UNO_QUERY_THROW ); + uno::Reference< ucb::XSimpleFileAccess > xSFA( ::comphelper::getProcessServiceFactory()->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.SimpleFileAccess")) ), uno::UNO_QUERY_THROW ); if( xSFA->isFolder( aAddinPath ) ) sGlobalTemplates = xSFA->getFolderContents( aAddinPath, sal_False ); @@ -4359,7 +4359,7 @@ ULONG SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos) uno::Any aGlobs; uno::Sequence< uno::Any > aArgs(1); aArgs[ 0 ] <<= mpDocShell->GetModel(); - aGlobs <<= ::comphelper::getProcessServiceFactory()->createInstanceWithArguments( ::rtl::OUString::createFromAscii( "ooo.vba.word.Globals"), aArgs ); + aGlobs <<= ::comphelper::getProcessServiceFactory()->createInstanceWithArguments( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Globals")), aArgs ); mpDocShell->GetBasicManager()->SetGlobalUNOConstant( "VBAGlobals", aGlobs ); SvxImportMSVBasic aVBasic(*mpDocShell, *pStg, diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx index 57ab172736..b9bdc3f43d 100644 --- a/sw/source/filter/ww8/ww8par3.cxx +++ b/sw/source/filter/ww8/ww8par3.cxx @@ -176,8 +176,8 @@ eF_ResT SwWW8ImplReader::Read_F_FormTextBox( WW8FieldDesc* pF, String& rStr ) if (aBookmarkName.Len()>0) { maFieldStack.back().SetBookmarkName(aBookmarkName); maFieldStack.back().SetBookmarkType(::rtl::OUString::createFromAscii(ODF_FORMTEXT)); - maFieldStack.back().getParameters()[::rtl::OUString::createFromAscii("Description")] = uno::makeAny(::rtl::OUString(aFormula.sToolTip)); - maFieldStack.back().getParameters()[::rtl::OUString::createFromAscii("Name")] = uno::makeAny(::rtl::OUString(aFormula.sTitle)); + maFieldStack.back().getParameters()[::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Description"))] = uno::makeAny(::rtl::OUString(aFormula.sToolTip)); + maFieldStack.back().getParameters()[::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Name"))] = uno::makeAny(::rtl::OUString(aFormula.sTitle)); } return FLD_TEXT; } diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx index b271a5f5b5..6f1bc14641 100644 --- a/sw/source/filter/ww8/ww8par5.cxx +++ b/sw/source/filter/ww8/ww8par5.cxx @@ -784,7 +784,7 @@ sal_uInt16 SwWW8ImplReader::End_Field() // Store it now! uno::Reference< embed::XStorage > xDocStg = GetDoc().GetDocStorage(); uno::Reference< embed::XStorage > xOleStg = xDocStg->openStorageElement( - rtl::OUString::createFromAscii( "OLELinks" ), embed::ElementModes::WRITE ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("OLELinks")), embed::ElementModes::WRITE ); SotStorageRef xObjDst = SotStorage::OpenOLEStorage( xOleStg, sOleId ); if ( xObjDst.Is() ) @@ -2255,7 +2255,7 @@ eF_ResT SwWW8ImplReader::Read_F_PgRef( WW8FieldDesc*, String& rStr ) #if defined(WW_NATIVE_TOC) if (1) { - ::rtl::OUString aBookmarkName=::rtl::OUString::createFromAscii("_REF"); + ::rtl::OUString aBookmarkName=(RTL_CONSTASCII_USTRINGPARAM("_REF")); maFieldStack.back().SetBookmarkName(aBookmarkName); maFieldStack.back().SetBookmarkType(::rtl::OUString::createFromAscii(ODF_PAGEREF)); maFieldStack.back().AddParam(rtl::OUString(), sName); @@ -2353,7 +2353,7 @@ bool CanUseRemoteLink(const String &rGrfName) ucb::XCommandEnvironment >() ); rtl::OUString aTitle; - aCnt.getPropertyValue(rtl::OUString::createFromAscii("Title" )) + aCnt.getPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title"))) >>= aTitle; bUseRemote = (aTitle.getLength() > 0); } @@ -2966,10 +2966,10 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr ) { #if defined(WW_NATIVE_TOC) if (1) { - ::rtl::OUString aBookmarkName=::rtl::OUString::createFromAscii("_TOC"); + ::rtl::OUString aBookmarkName=(RTL_CONSTASCII_USTRINGPARAM("_TOC")); maFieldStack.back().SetBookmarkName(aBookmarkName); maFieldStack.back().SetBookmarkType(::rtl::OUString::createFromAscii(ODF_TOC)); -// maFieldStack.back().AddParam(::rtl::OUString::createFromAscii("Description"), aFormula.sToolTip); +// maFieldStack.back().AddParam(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Description")), aFormula.sToolTip); return FLD_TEXT; } #endif @@ -3494,10 +3494,10 @@ eF_ResT SwWW8ImplReader::Read_F_Hyperlink( WW8FieldDesc* /*pF*/, String& rStr ) { #if defined(WW_NATIVE_TOC) if (1) { - ::rtl::OUString aBookmarkName=::rtl::OUString::createFromAscii("_HYPERLINK"); + ::rtl::OUString aBookmarkName=(RTL_CONSTASCII_USTRINGPARAM("_HYPERLINK")); maFieldStack.back().SetBookmarkName(aBookmarkName); maFieldStack.back().SetBookmarkType(::rtl::OUString::createFromAscii(ODF_HYPERLINK)); -// maFieldStack.back().AddParam(::rtl::OUString::createFromAscii("Description"), aFormula.sToolTip); +// maFieldStack.back().AddParam(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Description")), aFormula.sToolTip); return FLD_TEXT; } #endif diff --git a/sw/source/filter/xml/swxml.cxx b/sw/source/filter/xml/swxml.cxx index dcdc047ef1..e390c352b6 100644 --- a/sw/source/filter/xml/swxml.cxx +++ b/sw/source/filter/xml/swxml.cxx @@ -175,7 +175,7 @@ sal_Int32 ReadThroughComponent( // get parser uno::Reference< xml::sax::XParser > xParser( rFactory->createInstance( - OUString::createFromAscii("com.sun.star.xml.sax.Parser") ), + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Parser"))), UNO_QUERY ); DBG_ASSERT( xParser.is(), "Can't create parser" ); if( !xParser.is() ) @@ -758,19 +758,19 @@ ULONG XMLReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPaM, const S OUString *pSeq = aFamiliesSeq.getArray(); if( aOpt.IsFrmFmts() ) // SFX_STYLE_FAMILY_FRAME; - *pSeq++ = OUString::createFromAscii("FrameStyles"); + *pSeq++ = OUString(RTL_CONSTASCII_USTRINGPARAM("FrameStyles")); if( aOpt.IsPageDescs() ) // SFX_STYLE_FAMILY_PAGE; - *pSeq++ = OUString::createFromAscii("PageStyles"); + *pSeq++ = OUString(RTL_CONSTASCII_USTRINGPARAM("PageStyles")); if( aOpt.IsTxtFmts() ) { // (SFX_STYLE_FAMILY_CHAR|SFX_STYLE_FAMILY_PARA); - *pSeq++ = OUString::createFromAscii("CharacterStyles"); - *pSeq++ = OUString::createFromAscii("ParagraphStyles"); + *pSeq++ = OUString(RTL_CONSTASCII_USTRINGPARAM("CharacterStyles")); + *pSeq++ = OUString(RTL_CONSTASCII_USTRINGPARAM("ParagraphStyles")); } if( aOpt.IsNumRules() ) // SFX_STYLE_FAMILY_PSEUDO; - *pSeq++ = OUString::createFromAscii("NumberingStyles"); + *pSeq++ = OUString(RTL_CONSTASCII_USTRINGPARAM("NumberingStyles")); OUString sStyleInsertModeFamilies( RTL_CONSTASCII_USTRINGPARAM("StyleInsertModeFamilies")); @@ -841,7 +841,7 @@ ULONG XMLReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPaM, const S } else { - StreamPath = ::rtl::OUString::createFromAscii( "dummyObjectName" ); + StreamPath = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("dummyObjectName")); } if( StreamPath.getLength() ) @@ -1104,7 +1104,7 @@ USHORT XMLReader::GetSectionList( SfxMedium& rMedium, // get parser uno::Reference< XInterface > xXMLParser = xServiceFactory->createInstance( - OUString::createFromAscii("com.sun.star.xml.sax.Parser") ); + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Parser")) ); ASSERT( xXMLParser.is(), "XMLReader::Read: com.sun.star.xml.sax.Parser service missing" ); if( xXMLParser.is() ) diff --git a/sw/source/filter/xml/wrtxml.cxx b/sw/source/filter/xml/wrtxml.cxx index 912aa2fcba..cf9f67855f 100644 --- a/sw/source/filter/xml/wrtxml.cxx +++ b/sw/source/filter/xml/wrtxml.cxx @@ -369,8 +369,7 @@ pGraphicHelper = SvXMLGraphicHelper::Create( xStg, { const uno::Reference<beans::XPropertySet> xPropSet(xStg, uno::UNO_QUERY_THROW); - const ::rtl::OUString VersionProp( - ::rtl::OUString::createFromAscii("Version")); + const ::rtl::OUString VersionProp(RTL_CONSTASCII_USTRINGPARAM("Version")); try { ::rtl::OUString Version; diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx index ae53a81fb0..7876719026 100644 --- a/sw/source/filter/xml/xmlimp.cxx +++ b/sw/source/filter/xml/xmlimp.cxx @@ -423,8 +423,8 @@ SvXMLImportContext *SwXMLImport::CreateContext( IsXMLToken( rLocalName, XML_DOCUMENT ) ) { uno::Reference<xml::sax::XDocumentHandler> xDocBuilder( - mxServiceFactory->createInstance(::rtl::OUString::createFromAscii( - "com.sun.star.xml.dom.SAXDocumentBuilder")), + mxServiceFactory->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.xml.dom.SAXDocumentBuilder"))), uno::UNO_QUERY_THROW); uno::Reference<document::XDocumentPropertiesSupplier> xDPS( GetModel(), UNO_QUERY_THROW); diff --git a/sw/source/filter/xml/xmlmeta.cxx b/sw/source/filter/xml/xmlmeta.cxx index 102d5e1d59..a0f23c4d46 100644 --- a/sw/source/filter/xml/xmlmeta.cxx +++ b/sw/source/filter/xml/xmlmeta.cxx @@ -66,8 +66,8 @@ SvXMLImportContext *SwXMLImport::CreateMetaContext( if( !(IsStylesOnlyMode() || IsInsertMode()) ) { uno::Reference<xml::sax::XDocumentHandler> xDocBuilder( - mxServiceFactory->createInstance(::rtl::OUString::createFromAscii( - "com.sun.star.xml.dom.SAXDocumentBuilder")), + mxServiceFactory->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.xml.dom.SAXDocumentBuilder"))), uno::UNO_QUERY_THROW); uno::Reference<document::XDocumentPropertiesSupplier> xDPS( GetModel(), UNO_QUERY_THROW); diff --git a/sw/source/filter/xml/xmltexte.cxx b/sw/source/filter/xml/xmltexte.cxx index 4d043066b9..604bd8d631 100644 --- a/sw/source/filter/xml/xmltexte.cxx +++ b/sw/source/filter/xml/xmltexte.cxx @@ -328,35 +328,35 @@ void lcl_addFrameProperties( return; ::rtl::OUString aURL; - Any aAny = xSet->getPropertyValue( ::rtl::OUString::createFromAscii("FrameURL") ); + Any aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameURL")) ); aAny >>= aURL; ::rtl::OUString aName; - aAny = xSet->getPropertyValue( ::rtl::OUString::createFromAscii("FrameName") ); + aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameName"))); aAny >>= aName; sal_Bool bIsAutoScroll = sal_False, bIsScrollingMode; - aAny = xSet->getPropertyValue( ::rtl::OUString::createFromAscii("FrameIsAutoScroll") ); + aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameIsAutoScroll"))); aAny >>= bIsAutoScroll; if ( !bIsAutoScroll ) { - aAny = xSet->getPropertyValue( ::rtl::OUString::createFromAscii("FrameIsScrollingMode") ); + aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameIsScrollingMode")) ); aAny >>= bIsScrollingMode; } sal_Bool bIsBorderSet, bIsAutoBorder = sal_False; - aAny = xSet->getPropertyValue( ::rtl::OUString::createFromAscii("FrameIsAutoBorder") ); + aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameIsAutoBorder")) ); aAny >>= bIsAutoBorder; if ( !bIsAutoBorder ) { - aAny = xSet->getPropertyValue( ::rtl::OUString::createFromAscii("FrameIsBorder") ); + aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameIsBorder")) ); aAny >>= bIsBorderSet; } sal_Int32 nWidth, nHeight; - aAny = xSet->getPropertyValue( ::rtl::OUString::createFromAscii("FrameMarginWidth") ); + aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameMarginWidth")) ); aAny >>= nWidth; - aAny = xSet->getPropertyValue( ::rtl::OUString::createFromAscii("FrameMarginHeight") ); + aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameMarginHeight")) ); aAny >>= nHeight; if( !bIsAutoScroll ) @@ -578,27 +578,27 @@ void SwXMLTextParagraphExport::_exportTextEmbedded( { uno::Reference < beans::XPropertySet > xSet( rObjRef->getComponent(), uno::UNO_QUERY ); ::rtl::OUString aStr; - Any aAny2 = xSet->getPropertyValue( ::rtl::OUString::createFromAscii("AppletCodeBase") ); + Any aAny2 = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AppletCodeBase")) ); aAny2 >>= aStr; if (aStr.getLength() ) lcl_addURL(rXMLExport, aStr); - aAny2 = xSet->getPropertyValue( ::rtl::OUString::createFromAscii("AppletName") ); + aAny2 = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AppletName")) ); aAny2 >>= aStr; if (aStr.getLength()) rXMLExport.AddAttribute( XML_NAMESPACE_DRAW, XML_APPLET_NAME, aStr ); - aAny2 = xSet->getPropertyValue( ::rtl::OUString::createFromAscii("AppletCode") ); + aAny2 = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AppletCode")) ); aAny2 >>= aStr; rXMLExport.AddAttribute( XML_NAMESPACE_DRAW, XML_CODE, aStr ); sal_Bool bScript = sal_False; - aAny2 = xSet->getPropertyValue( ::rtl::OUString::createFromAscii("AppletIsScript") ); + aAny2 = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AppletIsScript")) ); aAny2 >>= bScript; rXMLExport.AddAttribute( XML_NAMESPACE_DRAW, XML_MAY_SCRIPT, bScript ? XML_TRUE : XML_FALSE ); uno::Sequence < beans::PropertyValue > aProps; - aAny2 = xSet->getPropertyValue( ::rtl::OUString::createFromAscii("AppletCommands") ); + aAny2 = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AppletCommands")) ); aAny2 >>= aProps; sal_Int32 i = aProps.getLength(); @@ -625,11 +625,11 @@ void SwXMLTextParagraphExport::_exportTextEmbedded( { uno::Reference < beans::XPropertySet > xSet( rObjRef->getComponent(), uno::UNO_QUERY ); ::rtl::OUString aStr; - Any aAny2 = xSet->getPropertyValue( ::rtl::OUString::createFromAscii("PluginURL") ); + Any aAny2 = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PluginURL")) ); aAny2 >>= aStr; lcl_addURL( rXMLExport, aStr ); - aAny2 = xSet->getPropertyValue( ::rtl::OUString::createFromAscii("PluginMimeType") ); + aAny2 = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PluginMimeType")) ); aAny2 >>= aStr; if (aStr.getLength()) rXMLExport.AddAttribute( XML_NAMESPACE_DRAW, XML_MIME_TYPE, aStr ); @@ -644,12 +644,12 @@ void SwXMLTextParagraphExport::_exportTextEmbedded( { uno::Reference < beans::XPropertySet > xSet( rObjRef->getComponent(), uno::UNO_QUERY ); ::rtl::OUString aStr; - Any aAny2 = xSet->getPropertyValue( ::rtl::OUString::createFromAscii("FrameURL") ); + Any aAny2 = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameURL")) ); aAny2 >>= aStr; lcl_addURL( rXMLExport, aStr ); - aAny2 = xSet->getPropertyValue( ::rtl::OUString::createFromAscii("FrameName") ); + aAny2 = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameName")) ); aAny2 >>= aStr; if (aStr.getLength()) @@ -694,7 +694,7 @@ void SwXMLTextParagraphExport::_exportTextEmbedded( { uno::Reference < beans::XPropertySet > xSet( rObjRef->getComponent(), uno::UNO_QUERY ); uno::Sequence < beans::PropertyValue > aProps; - aAny = xSet->getPropertyValue( ::rtl::OUString::createFromAscii("AppletCommands") ); + aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AppletCommands")) ); aAny >>= aProps; sal_Int32 i = aProps.getLength(); @@ -720,7 +720,7 @@ void SwXMLTextParagraphExport::_exportTextEmbedded( { uno::Reference < beans::XPropertySet > xSet( rObjRef->getComponent(), uno::UNO_QUERY ); uno::Sequence < beans::PropertyValue > aProps; - aAny = xSet->getPropertyValue( ::rtl::OUString::createFromAscii("PluginCommands") ); + aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PluginCommands")) ); aAny >>= aProps; sal_Int32 i = aProps.getLength(); diff --git a/sw/source/filter/xml/xmltexti.cxx b/sw/source/filter/xml/xmltexti.cxx index 654a26c2c3..e01c1fb0ae 100644 --- a/sw/source/filter/xml/xmltexti.cxx +++ b/sw/source/filter/xml/xmltexti.cxx @@ -289,7 +289,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertOLEObject( { // create object with desired ClassId sal_Int64 nAspect = embed::Aspects::MSOLE_CONTENT; - ::rtl::OUString aName = ::rtl::OUString::createFromAscii( "DummyName" ); + ::rtl::OUString aName(RTL_CONSTASCII_USTRINGPARAM("DummyName")); uno::Sequence < sal_Int8 > aClass( aClassName.GetByteSequence() ); uno::Reference < embed::XEmbedObjectCreator > xFactory( ::comphelper::getProcessServiceFactory()->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.embed.EmbeddedObjectCreator")) ), uno::UNO_QUERY ); @@ -581,13 +581,13 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertOOoLink( try { // create object with desired ClassId - ::rtl::OUString aName = ::rtl::OUString::createFromAscii( "DummyName" ); + ::rtl::OUString aName(RTL_CONSTASCII_USTRINGPARAM("DummyName")); uno::Reference < embed::XLinkCreator > xFactory( ::comphelper::getProcessServiceFactory()->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.embed.OOoEmbeddedObjectFactory")) ), uno::UNO_QUERY_THROW ); uno::Sequence< beans::PropertyValue > aMediaDescriptor( 1 ); - aMediaDescriptor[0].Name = ::rtl::OUString::createFromAscii( "URL" ); + aMediaDescriptor[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("URL")); aMediaDescriptor[0].Value <<= ::rtl::OUString( aURLObj.GetMainURL( INetURLObject::NO_DECODE ) ); if ( pDoc && pDoc->GetDocShell() && pDoc->GetDocShell()->GetMedium() ) { @@ -713,7 +713,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertPlugin( try { // create object with desired ClassId - ::rtl::OUString aName = ::rtl::OUString::createFromAscii( "DummyName" ); + ::rtl::OUString aName(RTL_CONSTASCII_USTRINGPARAM("DummyName")); uno::Sequence < sal_Int8 > aClass( SvGlobalName( SO3_PLUGIN_CLASSID ).GetByteSequence() ); uno::Reference < embed::XEmbedObjectCreator > xFactory( ::comphelper::getProcessServiceFactory()->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.embed.EmbeddedObjectCreator")) ), uno::UNO_QUERY ); @@ -734,10 +734,10 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertPlugin( if ( xSet.is() ) { if( bValidURL ) - xSet->setPropertyValue( ::rtl::OUString::createFromAscii("PluginURL"), + xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PluginURL")), makeAny( ::rtl::OUString( aURLObj.GetMainURL( INetURLObject::NO_DECODE ) ) ) ); if( bValidMimeType ) - xSet->setPropertyValue( ::rtl::OUString::createFromAscii("PluginMimeType"), + xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PluginMimeType")), makeAny( ::rtl::OUString( rMimeType ) ) ); } @@ -845,7 +845,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertFloatingFra try { // create object with desired ClassId - ::rtl::OUString aName = ::rtl::OUString::createFromAscii( "DummyName" ); + ::rtl::OUString aName(RTL_CONSTASCII_USTRINGPARAM("DummyName")); uno::Sequence < sal_Int8 > aClass( SvGlobalName( SO3_IFRAME_CLASSID ).GetByteSequence() ); uno::Reference < embed::XEmbedObjectCreator > xFactory( ::comphelper::getProcessServiceFactory()->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.embed.EmbeddedObjectCreator")) ), uno::UNO_QUERY ); @@ -865,31 +865,31 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertFloatingFra uno::Reference < beans::XPropertySet > xSet( xObj->getComponent(), uno::UNO_QUERY ); if ( xSet.is() ) { - xSet->setPropertyValue( ::rtl::OUString::createFromAscii("FrameURL"), + xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameURL")), makeAny( ::rtl::OUString( URIHelper::SmartRel2Abs( INetURLObject( GetXMLImport().GetBaseURL() ), rHRef ) ) ) ); - xSet->setPropertyValue( ::rtl::OUString::createFromAscii("FrameName"), + xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameName")), makeAny( ::rtl::OUString( rName ) ) ); if ( eScrollMode == ScrollingAuto ) - xSet->setPropertyValue( ::rtl::OUString::createFromAscii("FrameIsAutoScroll"), + xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameIsAutoScroll")), makeAny( sal_True ) ); else - xSet->setPropertyValue( ::rtl::OUString::createFromAscii("FrameIsScrollingMode"), + xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameIsScrollingMode")), makeAny( (sal_Bool) (eScrollMode == ScrollingYes) ) ); if ( bIsBorderSet ) - xSet->setPropertyValue( ::rtl::OUString::createFromAscii("FrameIsBorder"), + xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameIsBorder")), makeAny( bHasBorder ) ); else - xSet->setPropertyValue( ::rtl::OUString::createFromAscii("FrameIsAutoBorder"), + xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameIsAutoBorder")), makeAny( sal_True ) ); - xSet->setPropertyValue( ::rtl::OUString::createFromAscii("FrameMarginWidth"), + xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameMarginWidth")), makeAny( sal_Int32( aMargin.Width() ) ) ); - xSet->setPropertyValue( ::rtl::OUString::createFromAscii("FrameMarginHeight"), + xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameMarginHeight")), makeAny( sal_Int32( aMargin.Height() ) ) ); } @@ -952,14 +952,14 @@ void SwXMLTextImportHelper::endAppletOrPlugin( } // unfortunately the names of the properties are depending on the object - ::rtl::OUString aParaName = ::rtl::OUString::createFromAscii("AppletCommands"); + ::rtl::OUString aParaName(RTL_CONSTASCII_USTRINGPARAM("AppletCommands")); try { xSet->setPropertyValue( aParaName, makeAny( aCommandSequence ) ); } catch ( uno::Exception& ) { - aParaName = ::rtl::OUString::createFromAscii("PluginCommands"); + aParaName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PluginCommands")); try { xSet->setPropertyValue( aParaName, makeAny( aCommandSequence ) ); diff --git a/sw/source/ui/app/docsh.cxx b/sw/source/ui/app/docsh.cxx index 68172fdc0e..5bfd6ea179 100644 --- a/sw/source/ui/app/docsh.cxx +++ b/sw/source/ui/app/docsh.cxx @@ -683,7 +683,7 @@ BOOL SwDocShell::ConvertTo( SfxMedium& rMedium ) // TODO/MBA: testing uno::Reference < beans::XPropertySet > xSet( rMedium.GetStorage(), uno::UNO_QUERY ); if ( xSet.is() ) - xSet->setPropertyValue( ::rtl::OUString::createFromAscii("MediaType"), uno::makeAny( ::rtl::OUString( SotExchange::GetFormatMimeType( nSaveClipId ) ) ) ); + xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MediaType")), uno::makeAny( ::rtl::OUString( SotExchange::GetFormatMimeType( nSaveClipId ) ) ) ); } catch ( uno::Exception& ) { diff --git a/sw/source/ui/app/docsh2.cxx b/sw/source/ui/app/docsh2.cxx index 02a8639d03..3047c3dea7 100644 --- a/sw/source/ui/app/docsh2.cxx +++ b/sw/source/ui/app/docsh2.cxx @@ -981,12 +981,12 @@ void SwDocShell::Execute(SfxRequest& rReq) { uno::Reference< lang::XMultiServiceFactory > xORB = ::comphelper::getProcessServiceFactory(); uno::Reference< frame::XDispatchProvider > xProv( - xORB->createInstance( ::rtl::OUString::createFromAscii("com.sun.star.drawing.ModuleDispatcher")), UNO_QUERY ); + xORB->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.ModuleDispatcher"))), UNO_QUERY ); if ( xProv.is() ) { - ::rtl::OUString aCmd = ::rtl::OUString::createFromAscii( "SendOutlineToImpress" ); + ::rtl::OUString aCmd(RTL_CONSTASCII_USTRINGPARAM("SendOutlineToImpress")); uno::Reference< frame::XDispatchHelper > xHelper( - xORB->createInstance( ::rtl::OUString::createFromAscii("com.sun.star.frame.DispatchHelper")), UNO_QUERY ); + xORB->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.DispatchHelper"))), UNO_QUERY ); if ( xHelper.is() ) { pStrm->Seek( STREAM_SEEK_TO_END ); @@ -1004,7 +1004,7 @@ void SwDocShell::Execute(SfxRequest& rReq) aLockBytes.ReadAt( 0, aSeq.getArray(), nLen, &nRead ); uno::Sequence< beans::PropertyValue > aArgs(1); - aArgs[0].Name = ::rtl::OUString::createFromAscii("RtfOutline"); + aArgs[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RtfOutline")); aArgs[0].Value <<= aSeq; xHelper->executeDispatch( xProv, aCmd, ::rtl::OUString(), 0, aArgs ); } @@ -1052,12 +1052,12 @@ void SwDocShell::Execute(SfxRequest& rReq) { uno::Reference< lang::XMultiServiceFactory > xORB = ::comphelper::getProcessServiceFactory(); uno::Reference< frame::XDispatchProvider > xProv( - xORB->createInstance( ::rtl::OUString::createFromAscii("com.sun.star.drawing.ModuleDispatcher")), UNO_QUERY ); + xORB->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.ModuleDispatcher"))), UNO_QUERY ); if ( xProv.is() ) { - ::rtl::OUString aCmd = ::rtl::OUString::createFromAscii( "SendOutlineToImpress" ); + ::rtl::OUString aCmd(RTL_CONSTASCII_USTRINGPARAM("SendOutlineToImpress")); uno::Reference< frame::XDispatchHelper > xHelper( - xORB->createInstance( ::rtl::OUString::createFromAscii("com.sun.star.frame.DispatchHelper")), UNO_QUERY ); + xORB->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.DispatchHelper"))), UNO_QUERY ); if ( xHelper.is() ) { pStrm->Seek( STREAM_SEEK_TO_END ); @@ -1075,7 +1075,7 @@ void SwDocShell::Execute(SfxRequest& rReq) aLockBytes.ReadAt( 0, aSeq.getArray(), nLen, &nRead ); uno::Sequence< beans::PropertyValue > aArgs(1); - aArgs[0].Name = ::rtl::OUString::createFromAscii("RtfOutline"); + aArgs[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RtfOutline")); aArgs[0].Value <<= aSeq; xHelper->executeDispatch( xProv, aCmd, ::rtl::OUString(), 0, aArgs ); } diff --git a/sw/source/ui/app/docst.cxx b/sw/source/ui/app/docst.cxx index 2fbb55b1f6..4f0f7c25ff 100644 --- a/sw/source/ui/app/docst.cxx +++ b/sw/source/ui/app/docst.cxx @@ -325,7 +325,7 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq ) uno::Reference< beans::XPropertySet > xInfo; xStyles->getByName( pNameItem->GetValue() ) >>= xInfo; ::rtl::OUString aUIName; - xInfo->getPropertyValue( ::rtl::OUString::createFromAscii("DisplayName") ) >>= aUIName; + xInfo->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DisplayName")) ) >>= aUIName; if ( aUIName.getLength() ) rReq.AppendItem( SfxStringItem( SID_STYLE_APPLY, aUIName ) ); } diff --git a/sw/source/ui/app/swmodul1.cxx b/sw/source/ui/app/swmodul1.cxx index cbcef9af97..7cb6513f3f 100644 --- a/sw/source/ui/app/swmodul1.cxx +++ b/sw/source/ui/app/swmodul1.cxx @@ -388,7 +388,7 @@ void SwModule::ShowDBObj(SwView& rView, const SwDBData& rData, BOOL /*bOnlyIfAva Reference<XDispatchProvider> xDP(xFrame, uno::UNO_QUERY); uno::Reference<frame::XFrame> xBeamerFrame = xFrame->findFrame( - rtl::OUString::createFromAscii("_beamer"), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_beamer")), FrameSearchFlag::CHILDREN); if (xBeamerFrame.is()) { // the beamer has been opened by the SfxViewFrame diff --git a/sw/source/ui/app/swmodule.cxx b/sw/source/ui/app/swmodule.cxx index deba842000..5ba0b1ba01 100644 --- a/sw/source/ui/app/swmodule.cxx +++ b/sw/source/ui/app/swmodule.cxx @@ -228,8 +228,8 @@ SwModule::GetScannerManager() m_xScannerManager = uno::Reference< scanner::XScannerManager >( xMgr->createInstance( - rtl::OUString::createFromAscii( - "com.sun.star.scanner.ScannerManager" ) ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.scanner.ScannerManager")) ), uno::UNO_QUERY ); } } @@ -245,7 +245,7 @@ uno::Reference< linguistic2::XLanguageGuessing > SwModule::GetLanguageGuesser() { m_xLanguageGuesser = uno::Reference< linguistic2::XLanguageGuessing >( xMgr->createInstance( - rtl::OUString::createFromAscii( "com.sun.star.linguistic2.LanguageGuessing" ) ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.linguistic2.LanguageGuessing"))), uno::UNO_QUERY ); } } diff --git a/sw/source/ui/chrdlg/drpcps.cxx b/sw/source/ui/chrdlg/drpcps.cxx index 3fca1d450f..5f47ec0f87 100644 --- a/sw/source/ui/chrdlg/drpcps.cxx +++ b/sw/source/ui/chrdlg/drpcps.cxx @@ -399,7 +399,7 @@ void SwDropCapsPict::CheckScript( void ) { Reference< XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory(); xBreak = Reference< I18N::XBreakIterator >(xMSF->createInstance( - ::rtl::OUString::createFromAscii( "com.sun.star.i18n.BreakIterator" ) ),UNO_QUERY); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.i18n.BreakIterator")) ),UNO_QUERY); } if( xBreak.is() ) { diff --git a/sw/source/ui/config/caption.cxx b/sw/source/ui/config/caption.cxx index d1c5c52de2..ed5353015f 100644 --- a/sw/source/ui/config/caption.cxx +++ b/sw/source/ui/config/caption.cxx @@ -42,7 +42,7 @@ InsCaptionOpt::InsCaptionOpt(const SwCapObjType eType, const SvGlobalName* pOleI bUseCaption(FALSE), eObjType(eType), nNumType(SVX_NUM_ARABIC), - sNumberSeparator( ::rtl::OUString::createFromAscii(". ") ), + sNumberSeparator(RTL_CONSTASCII_USTRINGPARAM((". "))), nPos(1), nLevel(0), sSeparator( String::CreateFromAscii( ": " ) ), diff --git a/sw/source/ui/config/mailconfigpage.cxx b/sw/source/ui/config/mailconfigpage.cxx index adb312f1d3..0fbcfff534 100644 --- a/sw/source/ui/config/mailconfigpage.cxx +++ b/sw/source/ui/config/mailconfigpage.cxx @@ -374,7 +374,7 @@ void SwTestAccountSettingsDialog::Test() new SwConnectionContext( m_pParent->m_pConfigItem->GetInServerName(), m_pParent->m_pConfigItem->GetInServerPort(), - ::rtl::OUString::createFromAscii( "Insecure" )); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Insecure"))); xInMailService->connect(xConnectionContext, xAuthenticator); } if(m_bStop) diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx index 465e139304..e28ae1dd5f 100644 --- a/sw/source/ui/dbui/dbmgr.cxx +++ b/sw/source/ui/dbui/dbmgr.cxx @@ -842,7 +842,7 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell, xMailDispatcher.set( new MailDispatcher(rMergeDescriptor.xSmtpServer)); if(!rMergeDescriptor.bSendAsAttachment && rMergeDescriptor.bSendAsHTML) { - sBodyMimeType = ::rtl::OUString::createFromAscii("text/html; charset="); + sBodyMimeType = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("text/html; charset=")); sBodyMimeType += ::rtl::OUString::createFromAscii( rtl_getBestMimeCharsetFromTextEncoding( eEncoding )); SvxHtmlOptions* pHtmlOptions = SvxHtmlOptions::Get(); @@ -850,7 +850,7 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell, } else sBodyMimeType = - ::rtl::OUString::createFromAscii("text/plain; charset=UTF-8; format=flowed"); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("text/plain; charset=UTF-8; format=flowed")); } uno::Reference< XPropertySet > xColumnProp; @@ -1286,7 +1286,7 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell, uno::Sequence< beans::PropertyValue > aOptions( rMergeDescriptor.aPrintOptions ); const sal_Int32 nOpts = aOptions.getLength(); aOptions.realloc( nOpts + 1 ); - aOptions[ nOpts ].Name = rtl::OUString::createFromAscii( "Wait" ); + aOptions[ nOpts ].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Wait")); aOptions[ nOpts ].Value <<= sal_True ; // aPrintArgs.Put(SfxBoolItem(FN_QRY_MERGE, TRUE) ); // // #i52629# aynchronous printing should only be done in silent mode - otherwise diff --git a/sw/source/ui/dbui/mailmergechildwindow.cxx b/sw/source/ui/dbui/mailmergechildwindow.cxx index 48177d9c18..c384c51956 100644 --- a/sw/source/ui/dbui/mailmergechildwindow.cxx +++ b/sw/source/ui/dbui/mailmergechildwindow.cxx @@ -243,7 +243,7 @@ void SwMailDispatcherListener_Impl::DeleteAttachments( uno::Reference< mail::XMa if( xTransferableProperties.is() ) { ::rtl::OUString sURL; - xTransferableProperties->getPropertyValue( ::rtl::OUString::createFromAscii("URL") ) >>= sURL; + xTransferableProperties->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("URL")) ) >>= sURL; if(sURL.getLength()) SWUnoHelper::UCB_DeleteFile( sURL ); } diff --git a/sw/source/ui/dbui/mailmergehelper.cxx b/sw/source/ui/dbui/mailmergehelper.cxx index 4b3f48e924..6aa9f1241c 100644 --- a/sw/source/ui/dbui/mailmergehelper.cxx +++ b/sw/source/ui/dbui/mailmergehelper.cxx @@ -142,7 +142,7 @@ uno::Reference< mail::XSmtpService > ConnectToSmtpServer( new SwConnectionContext( rConfigItem.GetInServerName(), rConfigItem.GetInServerPort(), - ::rtl::OUString::createFromAscii( "Insecure" )); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Insecure"))); xInMailService->connect(xConnectionContext, xAuthenticator); rxInMailService = xInMailService; } @@ -681,7 +681,7 @@ uno::Reference< uno::XComponentContext> getCurrentCmpCtx( { uno::Reference< beans::XPropertySet > xPropSet = uno::Reference< beans::XPropertySet>(rSrvMgr, uno::UNO_QUERY); - Any aAny = xPropSet->getPropertyValue( ::rtl::OUString::createFromAscii("DefaultContext")); + Any aAny = xPropSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultContext"))); uno::Reference< uno::XComponentContext> rCmpCtx; aAny >>= rCmpCtx; return rCmpCtx; diff --git a/sw/source/ui/dbui/mmoutputpage.cxx b/sw/source/ui/dbui/mmoutputpage.cxx index 2559912b9a..fd473ab502 100644 --- a/sw/source/ui/dbui/mmoutputpage.cxx +++ b/sw/source/ui/dbui/mmoutputpage.cxx @@ -916,7 +916,7 @@ IMPL_LINK(SwMailMergeOutputPage, PrintHdl_Impl, PushButton*, EMPTYARG) SwDocMergeInfo& rEndInfo = rConfigItem.GetDocumentMergeInfo(nEnd - 1); rtl::OUString sPages(rtl::OUString::valueOf( rStartInfo.nStartPageInTarget )); - sPages += rtl::OUString::createFromAscii( " - "); + sPages += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" - ")); sPages += rtl::OUString::valueOf( rEndInfo.nEndPageInTarget ); SwWrtShell& rSh = pTargetView->GetWrtShell(); @@ -935,9 +935,9 @@ IMPL_LINK(SwMailMergeOutputPage, PrintHdl_Impl, PushButton*, EMPTYARG) m_pWizard->enableButtons(WZB_CANCEL, sal_False); uno::Sequence < beans::PropertyValue > aProps( 2 ); - aProps[0]. Name = rtl::OUString::createFromAscii("MonitorVisible"); + aProps[0]. Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MonitorVisible")); aProps[0].Value <<= sal_True; - aProps[1]. Name = rtl::OUString::createFromAscii("Pages"); + aProps[1]. Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Pages")); aProps[1]. Value <<= sPages; pTargetView->ExecPrint( aProps, false, true ); @@ -1305,13 +1305,13 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton) aDesc.sBodyContent = sBody; if(MM_DOCTYPE_HTML == nDocType) { - aDesc.sBodyMimeType = ::rtl::OUString::createFromAscii("text/html; charset="); + aDesc.sBodyMimeType = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("text/html; charset=")); aDesc.sBodyMimeType += ::rtl::OUString::createFromAscii( rtl_getBestMimeCharsetFromTextEncoding( eEncoding )); } else aDesc.sBodyMimeType = - ::rtl::OUString::createFromAscii("text/plain; charset=UTF-8; format=flowed"); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("text/plain; charset=UTF-8; format=flowed")); aDesc.sSubject = m_aSubjectED.GetText(); aDesc.sCC = m_sCC; diff --git a/sw/source/ui/dbui/swdbtoolsclient.cxx b/sw/source/ui/dbui/swdbtoolsclient.cxx index 185453128c..c27dfe3205 100644 --- a/sw/source/ui/dbui/swdbtoolsclient.cxx +++ b/sw/source/ui/dbui/swdbtoolsclient.cxx @@ -106,9 +106,7 @@ void SwDbtoolsClient::registerClient() OSL_ENSURE(NULL == getDbToolsClientModule(), "SwDbtoolsClient::registerClient: inconsistence: already have a module!"); OSL_ENSURE(NULL == getDbToolsClientFactoryFunction(), "SwDbtoolsClient::registerClient: inconsistence: already have a factory function!"); - const ::rtl::OUString sModuleName = ::rtl::OUString::createFromAscii( - SVLIBRARY( "dbtools" ) - ); + const ::rtl::OUString sModuleName(RTL_CONSTASCII_USTRINGPARAM(SVLIBRARY("dbtools"))); // load the dbtools library getDbToolsClientModule() = osl_loadModuleRelative( @@ -117,7 +115,7 @@ void SwDbtoolsClient::registerClient() if (NULL != getDbToolsClientModule()) { // get the symbol for the method creating the factory - const ::rtl::OUString sFactoryCreationFunc = ::rtl::OUString::createFromAscii("createDataAccessToolsFactory"); + const ::rtl::OUString sFactoryCreationFunc(RTL_CONSTASCII_USTRINGPARAM("createDataAccessToolsFactory")); // reinterpret_cast<createDataAccessToolsFactoryFunction> removed for gcc permissive getDbToolsClientFactoryFunction() = reinterpret_cast< createDataAccessToolsFactoryFunction >( osl_getFunctionSymbol(getDbToolsClientModule(), sFactoryCreationFunc.pData)); diff --git a/sw/source/ui/dialog/swabstdlg.cxx b/sw/source/ui/dialog/swabstdlg.cxx index 92794574b0..f6f9756a85 100644 --- a/sw/source/ui/dialog/swabstdlg.cxx +++ b/sw/source/ui/dialog/swabstdlg.cxx @@ -45,7 +45,7 @@ SwAbstractDialogFactory* SwAbstractDialogFactory::Create() static ::osl::Module aDialogLibrary; if ( aDialogLibrary.is() || aDialogLibrary.loadRelative( &thisModule, String( RTL_CONSTASCII_USTRINGPARAM( DLL_NAME ) ) ) ) fp = ( SwAbstractDialogFactory* (__LOADONCALLAPI*)() ) - aDialogLibrary.getFunctionSymbol( ::rtl::OUString::createFromAscii("CreateDialogFactory") ); + aDialogLibrary.getFunctionSymbol( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CreateDialogFactory"))); if ( fp ) return fp(); return 0; diff --git a/sw/source/ui/docvw/AnnotationMenuButton.cxx b/sw/source/ui/docvw/AnnotationMenuButton.cxx index a21a8f9e5d..c83ef2d20f 100644 --- a/sw/source/ui/docvw/AnnotationMenuButton.cxx +++ b/sw/source/ui/docvw/AnnotationMenuButton.cxx @@ -179,7 +179,7 @@ void AnnotationMenuButton::Paint( const Rectangle& /*rRect*/ ) aFont.SetWeight(WEIGHT_MEDIUM); SetFont( aFont ); DrawText( aRect , - rtl::OUString::createFromAscii("Edit Note"), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Edit Note")), TEXT_DRAW_CENTER ); SetFont( aOldFont ); } diff --git a/sw/source/ui/docvw/AnnotationWin.cxx b/sw/source/ui/docvw/AnnotationWin.cxx index 26ffa20334..9b8957a866 100644 --- a/sw/source/ui/docvw/AnnotationWin.cxx +++ b/sw/source/ui/docvw/AnnotationWin.cxx @@ -215,9 +215,9 @@ void SwAnnotationWin::InitAnswer(OutlinerParaObject* pText) SwRewriter aRewriter; aRewriter.AddRule(UNDO_ARG1, pWin->GetAuthor()); aText = aRewriter.Apply(aText); - aText.Append(String(rtl::OUString::createFromAscii(" (") + - String(rLocalData.getDate( pWin->GetDate())) + rtl::OUString::createFromAscii(", ") + - String(rLocalData.getTime( pWin->GetTime(),false)) + rtl::OUString::createFromAscii("): \""))); + aText.Append(String(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" (")) + + String(rLocalData.getDate( pWin->GetDate())) + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(", ")) + + String(rLocalData.getTime( pWin->GetTime(),false)) + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("): \"")))); GetOutlinerView()->InsertText(aText,false); // insert old, selected text or "..." @@ -225,8 +225,8 @@ void SwAnnotationWin::InitAnswer(OutlinerParaObject* pText) if (pText->GetTextObject().GetText(0) != String(rtl::OUString::createFromAscii(""))) GetOutlinerView()->GetEditView().InsertText(pText->GetTextObject()); else - GetOutlinerView()->InsertText(rtl::OUString::createFromAscii("..."),false); - GetOutlinerView()->InsertText(rtl::OUString::createFromAscii("\"\n"),false); + GetOutlinerView()->InsertText(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("...")),false); + GetOutlinerView()->InsertText(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\"\n")),false); GetOutlinerView()->SetSelection(ESelection(0x0,0x0,0xFFFF,0xFFFF)); SfxItemSet aAnswerSet( DocView().GetDocShell()->GetPool() ); diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx index 197c4d5474..0fbd5b2084 100644 --- a/sw/source/ui/docvw/edtwin.cxx +++ b/sw/source/ui/docvw/edtwin.cxx @@ -4841,8 +4841,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) aEvent.ExecutePosition.X = aPixPos.X(); aEvent.ExecutePosition.Y = aPixPos.Y(); Menu* pMenu = 0; - ::rtl::OUString sMenuName = - ::rtl::OUString::createFromAscii( "private:resource/ReadonlyContextMenu"); + ::rtl::OUString sMenuName(RTL_CONSTASCII_USTRINGPARAM("private:resource/ReadonlyContextMenu")); if( GetView().TryContextMenuInterception( *pROPopup, sMenuName, pMenu, aEvent ) ) { if ( pMenu ) diff --git a/sw/source/ui/envelp/mailmrge.cxx b/sw/source/ui/envelp/mailmrge.cxx index 9087994c14..517b0a326d 100644 --- a/sw/source/ui/envelp/mailmrge.cxx +++ b/sw/source/ui/envelp/mailmrge.cxx @@ -431,9 +431,9 @@ SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell, sCommand += String::CreateFromInt32(SFX_FILTER_NOTINFILEDLG); sCommand += C2U(":default_first"); uno::Reference< container::XEnumeration > xList = xQuery->createSubSetEnumerationByQuery(sCommand); - const ::rtl::OUString sName = OUString::createFromAscii("Name"); - const ::rtl::OUString sFlags = OUString::createFromAscii("Flags"); - const ::rtl::OUString sUIName = OUString::createFromAscii("UIName"); + const ::rtl::OUString sName(RTL_CONSTASCII_USTRINGPARAM("Name")); + const ::rtl::OUString sFlags(RTL_CONSTASCII_USTRINGPARAM("Flags")); + const ::rtl::OUString sUIName(RTL_CONSTASCII_USTRINGPARAM("UIName")); USHORT nODT = USHRT_MAX; while(xList->hasMoreElements()) { diff --git a/sw/source/ui/lingu/olmenu.cxx b/sw/source/ui/lingu/olmenu.cxx index 6aa2341522..52d469bd37 100644 --- a/sw/source/ui/lingu/olmenu.cxx +++ b/sw/source/ui/lingu/olmenu.cxx @@ -355,7 +355,7 @@ OUString RetrieveLabelFromCommand( const OUString& aCmdURL ) { try { - uno::Reference< container::XNameAccess > xNameAccess( ::comphelper::getProcessServiceFactory()->createInstance( OUString::createFromAscii("com.sun.star.frame.UICommandDescription") ), uno::UNO_QUERY ); + uno::Reference< container::XNameAccess > xNameAccess( ::comphelper::getProcessServiceFactory()->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.UICommandDescription")) ), uno::UNO_QUERY ); if ( xNameAccess.is() ) { uno::Reference< container::XNameAccess > xUICommandLabels; @@ -570,7 +570,7 @@ bGrammarResults(false) */ uno::Reference< frame::XFrame > xFrame = pWrtSh->GetView().GetViewFrame()->GetFrame().GetFrameInterface(); Image rImg = ::GetImage( xFrame, - OUString::createFromAscii(".uno:SpellingAndGrammarDialog"), sal_False, + OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:SpellingAndGrammarDialog")), sal_False, Application::GetSettings().GetStyleSettings().GetHighContrastMode() ); SetItemImage( MN_SPELLING_DLG, rImg ); @@ -703,7 +703,7 @@ aInfo16( SW_RES(IMG_INFO_16) ) */ uno::Reference< frame::XFrame > xFrame = pWrtSh->GetView().GetViewFrame()->GetFrame().GetFrameInterface(); Image rImg = ::GetImage( xFrame, - OUString::createFromAscii(".uno:SpellingAndGrammarDialog"), sal_False, + OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:SpellingAndGrammarDialog")), sal_False, Application::GetSettings().GetStyleSettings().GetHighContrastMode() ); SetItemImage( MN_SPELLING_DLG, rImg ); diff --git a/sw/source/ui/misc/numberingtypelistbox.cxx b/sw/source/ui/misc/numberingtypelistbox.cxx index 7ccb7eb041..223be3177c 100644 --- a/sw/source/ui/misc/numberingtypelistbox.cxx +++ b/sw/source/ui/misc/numberingtypelistbox.cxx @@ -53,7 +53,7 @@ SwNumberingTypeListBox::SwNumberingTypeListBox( Window* pWin, const ResId& rResI { uno::Reference< lang::XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory(); uno::Reference < uno::XInterface > xI = xMSF->createInstance( - ::rtl::OUString::createFromAscii( "com.sun.star.text.DefaultNumberingProvider" ) ); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.DefaultNumberingProvider")) ); uno::Reference<text::XDefaultNumberingProvider> xDefNum(xI, uno::UNO_QUERY); OSL_ENSURE(xDefNum.is(), "service missing: \"com.sun.star.text.DefaultNumberingProvider\""); diff --git a/sw/source/ui/shells/annotsh.cxx b/sw/source/ui/shells/annotsh.cxx index 4731302753..bcd0dcd5fa 100644 --- a/sw/source/ui/shells/annotsh.cxx +++ b/sw/source/ui/shells/annotsh.cxx @@ -398,7 +398,7 @@ void SwAnnotationShell::Exec( SfxRequest &rReq ) { try { - uno::Reference < ui::dialogs::XExecutableDialog > xDialog(::comphelper::getProcessServiceFactory()->createInstance(rtl::OUString::createFromAscii("com.sun.star.comp.ui.XSLTFilterDialog")), uno::UNO_QUERY); + uno::Reference < ui::dialogs::XExecutableDialog > xDialog(::comphelper::getProcessServiceFactory()->createInstance(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.ui.XSLTFilterDialog"))), uno::UNO_QUERY); if( xDialog.is() ) { xDialog->execute(); @@ -1173,7 +1173,7 @@ void SwAnnotationShell::ExecLingu(SfxRequest &rReq) { Reference< ui::dialogs::XExecutableDialog > xDialog( xMCF->createInstanceWithContext( - rtl::OUString::createFromAscii("com.sun.star.linguistic2.ChineseTranslationDialog") + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.linguistic2.ChineseTranslationDialog")) , xContext), UNO_QUERY); Reference< lang::XInitialization > xInit( xDialog, UNO_QUERY ); if( xInit.is() ) @@ -1183,7 +1183,7 @@ void SwAnnotationShell::ExecLingu(SfxRequest &rReq) Sequence<Any> aSeq(1); Any* pArray = aSeq.getArray(); PropertyValue aParam; - aParam.Name = rtl::OUString::createFromAscii("ParentWindow"); + aParam.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ParentWindow")); aParam.Value <<= makeAny(xDialogParentWindow); pArray[0] <<= makeAny(aParam); xInit->initialize( aSeq ); diff --git a/sw/source/ui/shells/drawsh.cxx b/sw/source/ui/shells/drawsh.cxx index 9a1e083c7b..9744c07df7 100644 --- a/sw/source/ui/shells/drawsh.cxx +++ b/sw/source/ui/shells/drawsh.cxx @@ -218,7 +218,7 @@ void SwDrawShell::Execute(SfxRequest &rReq) { try { - uno::Reference < ui::dialogs::XExecutableDialog > xDialog(::comphelper::getProcessServiceFactory()->createInstance(rtl::OUString::createFromAscii("com.sun.star.comp.ui.XSLTFilterDialog")), uno::UNO_QUERY); + uno::Reference < ui::dialogs::XExecutableDialog > xDialog(::comphelper::getProcessServiceFactory()->createInstance(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.ui.XSLTFilterDialog"))), uno::UNO_QUERY); if( xDialog.is() ) { xDialog->execute(); diff --git a/sw/source/ui/shells/drwtxtex.cxx b/sw/source/ui/shells/drwtxtex.cxx index 47e3c70c59..a3598f9780 100644 --- a/sw/source/ui/shells/drwtxtex.cxx +++ b/sw/source/ui/shells/drwtxtex.cxx @@ -360,7 +360,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq ) { try { - uno::Reference < ui::dialogs::XExecutableDialog > xDialog(::comphelper::getProcessServiceFactory()->createInstance(rtl::OUString::createFromAscii("com.sun.star.comp.ui.XSLTFilterDialog")), uno::UNO_QUERY); + uno::Reference < ui::dialogs::XExecutableDialog > xDialog(::comphelper::getProcessServiceFactory()->createInstance(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.ui.XSLTFilterDialog"))), uno::UNO_QUERY); if( xDialog.is() ) { xDialog->execute(); diff --git a/sw/source/ui/shells/drwtxtsh.cxx b/sw/source/ui/shells/drwtxtsh.cxx index c04f3eb29d..2fcab44ec4 100644 --- a/sw/source/ui/shells/drwtxtsh.cxx +++ b/sw/source/ui/shells/drwtxtsh.cxx @@ -354,7 +354,7 @@ void SwDrawTextShell::ExecDrawLingu(SfxRequest &rReq) { Reference< ui::dialogs::XExecutableDialog > xDialog( xMCF->createInstanceWithContext( - rtl::OUString::createFromAscii("com.sun.star.linguistic2.ChineseTranslationDialog") + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.linguistic2.ChineseTranslationDialog")) , xContext), UNO_QUERY); Reference< lang::XInitialization > xInit( xDialog, UNO_QUERY ); if( xInit.is() ) @@ -364,7 +364,7 @@ void SwDrawTextShell::ExecDrawLingu(SfxRequest &rReq) Sequence<Any> aSeq(1); Any* pArray = aSeq.getArray(); PropertyValue aParam; - aParam.Name = rtl::OUString::createFromAscii("ParentWindow"); + aParam.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ParentWindow")); aParam.Value <<= makeAny(xDialogParentWindow); pArray[0] <<= makeAny(aParam); xInit->initialize( aSeq ); diff --git a/sw/source/ui/shells/frmsh.cxx b/sw/source/ui/shells/frmsh.cxx index a77e760822..0c5bea7a0f 100644 --- a/sw/source/ui/shells/frmsh.cxx +++ b/sw/source/ui/shells/frmsh.cxx @@ -263,7 +263,7 @@ void SwFrameShell::Execute(SfxRequest &rReq) { try { - uno::Reference < ui::dialogs::XExecutableDialog > xDialog(::comphelper::getProcessServiceFactory()->createInstance(rtl::OUString::createFromAscii("com.sun.star.comp.ui.XSLTFilterDialog")), uno::UNO_QUERY); + uno::Reference < ui::dialogs::XExecutableDialog > xDialog(::comphelper::getProcessServiceFactory()->createInstance(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.ui.XSLTFilterDialog"))), uno::UNO_QUERY); if( xDialog.is() ) { xDialog->execute(); diff --git a/sw/source/ui/shells/textsh.cxx b/sw/source/ui/shells/textsh.cxx index 47bdcab953..92e8103623 100644 --- a/sw/source/ui/shells/textsh.cxx +++ b/sw/source/ui/shells/textsh.cxx @@ -253,7 +253,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) uno::Reference < beans::XPropertySet > xSet( xObj->getComponent(), uno::UNO_QUERY ); if ( xSet.is() ) { - xSet->setPropertyValue( ::rtl::OUString::createFromAscii("PluginURL"), + xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PluginURL")), uno::makeAny( ::rtl::OUString( pURL->GetMainURL( INetURLObject::NO_DECODE ) ) ) ); } } @@ -319,7 +319,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) aCommandList.FillSequence( aSeq ); try { - xSet->setPropertyValue( ::rtl::OUString::createFromAscii("AppletCommands"), uno::makeAny( aSeq ) ); + xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AppletCommands")), uno::makeAny( aSeq ) ); } catch ( uno::Exception& ) { @@ -340,7 +340,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) try { if ( sClassLocation.Len() ) - xSet->setPropertyValue( ::rtl::OUString::createFromAscii("PluginURL"), + xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PluginURL")), uno::makeAny( ::rtl::OUString( URIHelper::SmartRel2Abs( @@ -350,7 +350,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) if ( aCommandList.Count() ) { aCommandList.FillSequence( aSeq ); - xSet->setPropertyValue( ::rtl::OUString::createFromAscii("PluginCommands"), uno::makeAny( aSeq ) ); + xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PluginCommands")), uno::makeAny( aSeq ) ); } } catch ( uno::Exception& ) @@ -400,31 +400,31 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) aMargin = pMarginItem->GetSize(); if ( pURLItem ) - xSet->setPropertyValue( ::rtl::OUString::createFromAscii("FrameURL"), uno::makeAny( ::rtl::OUString( pURLItem->GetValue() ) ) ); + xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameURL")), uno::makeAny( ::rtl::OUString( pURLItem->GetValue() ) ) ); if ( pNameItem ) - xSet->setPropertyValue( ::rtl::OUString::createFromAscii("FrameName"), uno::makeAny( ::rtl::OUString( pNameItem->GetValue() ) ) ); + xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameName")), uno::makeAny( ::rtl::OUString( pNameItem->GetValue() ) ) ); if ( eScroll == ScrollingAuto ) - xSet->setPropertyValue( ::rtl::OUString::createFromAscii("FrameIsAutoScroll"), + xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameIsAutoScroll")), uno::makeAny( sal_True ) ); else - xSet->setPropertyValue( ::rtl::OUString::createFromAscii("FrameIsScrollingMode"), + xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameIsScrollingMode")), uno::makeAny( (sal_Bool) ( eScroll == ScrollingYes) ) ); //if ( aFrmDescr.IsFrameBorderSet() ) if ( pBorderItem ) - xSet->setPropertyValue( ::rtl::OUString::createFromAscii("FrameIsBorder"), + xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameIsBorder")), uno::makeAny( (sal_Bool) pBorderItem->GetValue() ) ); /*else - xSet->setPropertyValue( ::rtl::OUString::createFromAscii("FrameIsAutoBorder"), + xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameIsAutoBorder")), makeAny( sal_True ) );*/ if ( pMarginItem ) { - xSet->setPropertyValue( ::rtl::OUString::createFromAscii("FrameMarginWidth"), + xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameMarginWidth")), uno::makeAny( sal_Int32( aMargin.Width() ) ) ); - xSet->setPropertyValue( ::rtl::OUString::createFromAscii("FrameMarginHeight"), + xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameMarginHeight")), uno::makeAny( sal_Int32( aMargin.Height() ) ) ); } } diff --git a/sw/source/ui/shells/textsh1.cxx b/sw/source/ui/shells/textsh1.cxx index 4cff3a29ed..9455945738 100644 --- a/sw/source/ui/shells/textsh1.cxx +++ b/sw/source/ui/shells/textsh1.cxx @@ -1286,7 +1286,7 @@ void SwTextShell::Execute(SfxRequest &rReq) { try { - uno::Reference < ui::dialogs::XExecutableDialog > xDialog(::comphelper::getProcessServiceFactory()->createInstance(rtl::OUString::createFromAscii("com.sun.star.comp.ui.XSLTFilterDialog")), uno::UNO_QUERY); + uno::Reference < ui::dialogs::XExecutableDialog > xDialog(::comphelper::getProcessServiceFactory()->createInstance(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.ui.XSLTFilterDialog"))), uno::UNO_QUERY); if( xDialog.is() ) { xDialog->execute(); diff --git a/sw/source/ui/table/chartins.cxx b/sw/source/ui/table/chartins.cxx index d3e4929084..dbbae724af 100644 --- a/sw/source/ui/table/chartins.cxx +++ b/sw/source/ui/table/chartins.cxx @@ -231,7 +231,7 @@ void SwInsertChart(Window* pParent, SfxBindings* pBindings ) { //get dialog size: awt::Size aDialogAWTSize; - if( xDialogProps->getPropertyValue( ::rtl::OUString::createFromAscii("Size") ) + if( xDialogProps->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Size")) ) >>= aDialogAWTSize ) { Size aDialogSize( aDialogAWTSize.Width, aDialogAWTSize.Height ); @@ -243,7 +243,7 @@ void SwInsertChart(Window* pParent, SfxBindings* pBindings ) aSwRect = pFlyFrmFmt->GetAnchoredObj()->GetObjRectWithSpaces(); Rectangle aRect( aSwRect.SVRect() ); Point aDialogPos = SwGetChartDialogPos( &rWrtShell.GetView().GetEditWin(), aDialogSize, aRect ); - xDialogProps->setPropertyValue( ::rtl::OUString::createFromAscii("Position"), + xDialogProps->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Position")), uno::makeAny( awt::Point(aDialogPos.getX(),aDialogPos.getY()) ) ); } } diff --git a/sw/source/ui/table/tablemgr.cxx b/sw/source/ui/table/tablemgr.cxx index d011d1c5ad..749b714cf0 100644 --- a/sw/source/ui/table/tablemgr.cxx +++ b/sw/source/ui/table/tablemgr.cxx @@ -321,16 +321,16 @@ uno::Reference< frame::XModel > SwTableFUNC::InsertChart( uno::Sequence< beans::PropertyValue > aArgs( 4 ); aArgs[0] = beans::PropertyValue( - ::rtl::OUString::createFromAscii("CellRangeRepresentation"), -1, + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CellRangeRepresentation")), -1, uno::makeAny( rCellRange ), beans::PropertyState_DIRECT_VALUE ); aArgs[1] = beans::PropertyValue( - ::rtl::OUString::createFromAscii("HasCategories"), -1, + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HasCategories")), -1, uno::makeAny( bHasCategories ), beans::PropertyState_DIRECT_VALUE ); aArgs[2] = beans::PropertyValue( - ::rtl::OUString::createFromAscii("FirstCellAsLabel"), -1, + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FirstCellAsLabel")), -1, uno::makeAny( bFirstCellAsLabel ), beans::PropertyState_DIRECT_VALUE ); aArgs[3] = beans::PropertyValue( - ::rtl::OUString::createFromAscii("DataRowSource"), -1, + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DataRowSource")), -1, uno::makeAny( eDataRowSource ), beans::PropertyState_DIRECT_VALUE ); xDataReceiver->setArguments( aArgs ); } diff --git a/sw/source/ui/table/tautofmt.cxx b/sw/source/ui/table/tautofmt.cxx index ebf1850288..b55aa85225 100644 --- a/sw/source/ui/table/tautofmt.cxx +++ b/sw/source/ui/table/tautofmt.cxx @@ -604,7 +604,7 @@ AutoFmtPreview::AutoFmtPreview( Window* pParent, const ResId& rRes, SwWrtShell* { m_xBreak = uno::Reference< i18n::XBreakIterator >( m_xMSF->createInstance ( - rtl::OUString::createFromAscii( "com.sun.star.i18n.BreakIterator" ) ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.i18n.BreakIterator")) ), uno::UNO_QUERY); } pNumFmt = new SvNumberFormatter( m_xMSF, LANGUAGE_SYSTEM ); diff --git a/sw/source/ui/uiview/view.cxx b/sw/source/ui/uiview/view.cxx index 4bff4259a7..b129da7c4a 100644 --- a/sw/source/ui/uiview/view.cxx +++ b/sw/source/ui/uiview/view.cxx @@ -1070,7 +1070,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh ) uno::Reference< frame::XFrame > xFrame = pVFrame->GetFrame().GetFrameInterface(); uno::Reference< frame::XFrame > xBeamerFrame = xFrame->findFrame( - OUString::createFromAscii("_beamer"), frame::FrameSearchFlag::CHILDREN); + OUString(RTL_CONSTASCII_USTRINGPARAM("_beamer")), frame::FrameSearchFlag::CHILDREN); if(xBeamerFrame.is()) { SwDBData aData = pWrtShell->GetDBData(); diff --git a/sw/source/ui/uiview/view2.cxx b/sw/source/ui/uiview/view2.cxx index 70c5412312..172192f631 100644 --- a/sw/source/ui/uiview/view2.cxx +++ b/sw/source/ui/uiview/view2.cxx @@ -2257,7 +2257,7 @@ void SwView::GenerateFormLetter(BOOL bUseCurrentDocument) if( xMgr.is() ) { uno::Reference<XInterface> xInstance = xMgr->createInstance( - OUString::createFromAscii( "com.sun.star.sdb.DatabaseContext" )); + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.DatabaseContext"))); xDBContext = uno::Reference<XNameAccess>(xInstance, UNO_QUERY) ; } if(!xDBContext.is()) diff --git a/sw/source/ui/uiview/viewling.cxx b/sw/source/ui/uiview/viewling.cxx index 3448d72d14..bcbcfa1a1c 100644 --- a/sw/source/ui/uiview/viewling.cxx +++ b/sw/source/ui/uiview/viewling.cxx @@ -139,7 +139,7 @@ void SwView::ExecLingu(SfxRequest &rReq) { Reference< ui::dialogs::XExecutableDialog > xDialog( xMCF->createInstanceWithContext( - rtl::OUString::createFromAscii("com.sun.star.linguistic2.ChineseTranslationDialog") + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.linguistic2.ChineseTranslationDialog")) , xContext), UNO_QUERY); Reference< lang::XInitialization > xInit( xDialog, UNO_QUERY ); if( xInit.is() ) @@ -149,7 +149,7 @@ void SwView::ExecLingu(SfxRequest &rReq) Sequence<Any> aSeq(1); Any* pArray = aSeq.getArray(); PropertyValue aParam; - aParam.Name = rtl::OUString::createFromAscii("ParentWindow"); + aParam.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ParentWindow")); aParam.Value <<= makeAny(xDialogParentWindow); pArray[0] <<= makeAny(aParam); xInit->initialize( aSeq ); @@ -848,7 +848,7 @@ class SwFieldPopup : public PopupMenu { public: SwFieldPopup() { - InsertItem(1, ::rtl::OUString::createFromAscii("Hello")); + InsertItem(1, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Hello"))); } }; @@ -909,7 +909,7 @@ public: aListBox.SetSizePixel(lbSize); aListBox.SetSelectHdl( LINK( this, SwFieldDialog, MyListBoxHandler ) ); aListBox.Show(); - aText.SetText(rtl::OUString::createFromAscii("Cancel")); + aText.SetText(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Cancel"))); Size tSize=aText.GetOptimalSize(WINDOWSIZE_PREFERRED); aText.SetSizePixel(Size(lbSize.Width(), tSize.Height())); aText.SetPosPixel(Point(0, lbSize.Height())); diff --git a/sw/source/ui/uno/swdetect.cxx b/sw/source/ui/uno/swdetect.cxx index e32c96e6e4..befb88315e 100644 --- a/sw/source/ui/uno/swdetect.cxx +++ b/sw/source/ui/uno/swdetect.cxx @@ -364,7 +364,7 @@ SwFilterDetect::~SwFilterDetect() { // if input stream wasn't part of the descriptor, now it should be, otherwise the content would be opend twice lDescriptor.realloc( nPropertyCount + 1 ); - lDescriptor[nPropertyCount].Name = ::rtl::OUString::createFromAscii("InputStream"); + lDescriptor[nPropertyCount].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("InputStream")); lDescriptor[nPropertyCount].Value <<= xStream; nPropertyCount++; } @@ -373,7 +373,7 @@ SwFilterDetect::~SwFilterDetect() { // if input stream wasn't part of the descriptor, now it should be, otherwise the content would be opend twice lDescriptor.realloc( nPropertyCount + 1 ); - lDescriptor[nPropertyCount].Name = ::rtl::OUString::createFromAscii("UCBContent"); + lDescriptor[nPropertyCount].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UCBContent")); lDescriptor[nPropertyCount].Value <<= xContent; nPropertyCount++; } @@ -383,7 +383,7 @@ SwFilterDetect::~SwFilterDetect() if ( nIndexOfReadOnlyFlag == -1 ) { lDescriptor.realloc( nPropertyCount + 1 ); - lDescriptor[nPropertyCount].Name = ::rtl::OUString::createFromAscii("ReadOnly"); + lDescriptor[nPropertyCount].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReadOnly")); lDescriptor[nPropertyCount].Value <<= bReadOnly; nPropertyCount++; } @@ -394,7 +394,7 @@ SwFilterDetect::~SwFilterDetect() if ( !bRepairPackage && bRepairAllowed ) { lDescriptor.realloc( nPropertyCount + 1 ); - lDescriptor[nPropertyCount].Name = ::rtl::OUString::createFromAscii("RepairPackage"); + lDescriptor[nPropertyCount].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RepairPackage")); lDescriptor[nPropertyCount].Value <<= bRepairAllowed; nPropertyCount++; bOpenAsTemplate = sal_True; @@ -406,7 +406,7 @@ SwFilterDetect::~SwFilterDetect() if ( nIndexOfTemplateFlag == -1 ) { lDescriptor.realloc( nPropertyCount + 1 ); - lDescriptor[nPropertyCount].Name = ::rtl::OUString::createFromAscii("AsTemplate"); + lDescriptor[nPropertyCount].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AsTemplate")); lDescriptor[nPropertyCount].Value <<= bOpenAsTemplate; nPropertyCount++; } @@ -420,7 +420,7 @@ SwFilterDetect::~SwFilterDetect() if ( nIndexOfDocumentTitle == -1 ) { lDescriptor.realloc( nPropertyCount + 1 ); - lDescriptor[nPropertyCount].Name = ::rtl::OUString::createFromAscii("DocumentTitle"); + lDescriptor[nPropertyCount].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DocumentTitle")); lDescriptor[nPropertyCount].Value <<= aDocumentTitle; nPropertyCount++; } diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx index 095dd54f79..3a95748729 100644 --- a/sw/source/ui/uno/unotxdoc.cxx +++ b/sw/source/ui/uno/unotxdoc.cxx @@ -1710,7 +1710,7 @@ Reference< XInterface > SwXTextDocument::createInstance(const OUString& rServic if ( bShape && rServiceName.compareToAscii( "com.sun.star.drawing.temporaryForXMLImportOLE2Shape" ) == 0 ) { - aTmpServiceName = OUString::createFromAscii( "com.sun.star.drawing.OLE2Shape" ); + aTmpServiceName = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.OLE2Shape")); } //hier den Draw - Service suchen Reference< XInterface > xTmp = SvxFmMSFactory::createInstance(aTmpServiceName); @@ -3043,7 +3043,7 @@ uno::Sequence< lang::Locale > SAL_CALL SwXTextDocument::getDocumentLanguages( const bool bComplex = 0 != (nScriptTypes & nComplex); if (nScriptTypes < nLatin || nScriptTypes > (nLatin | nAsian | nComplex)) - throw IllegalArgumentException(::rtl::OUString::createFromAscii("nScriptTypes ranges from 1 to 7!"), Reference< XInterface >(), 1); + throw IllegalArgumentException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("nScriptTypes ranges from 1 to 7!")), Reference< XInterface >(), 1); if (!pDocShell) throw DisposedException(); SwDoc* pDoc = pDocShell->GetDoc(); diff --git a/sw/source/ui/utlui/uitool.cxx b/sw/source/ui/utlui/uitool.cxx index 55214b9957..cc76310409 100644 --- a/sw/source/ui/utlui/uitool.cxx +++ b/sw/source/ui/utlui/uitool.cxx @@ -744,7 +744,7 @@ bool ExecuteMenuCommand( PopupMenu& rMenu, SfxViewFrame& rViewFrame, USHORT nId uno::Reference < frame::XDispatchProvider > xProv( xFrame, uno::UNO_QUERY ); util::URL aURL; aURL.Complete = sCommand; - uno::Reference < util::XURLTransformer > xTrans( ::comphelper::getProcessServiceFactory()->createInstance( rtl::OUString::createFromAscii("com.sun.star.util.URLTransformer" )), uno::UNO_QUERY ); + uno::Reference < util::XURLTransformer > xTrans( ::comphelper::getProcessServiceFactory()->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.util.URLTransformer"))), uno::UNO_QUERY ); xTrans->parseStrict( aURL ); uno::Reference< frame::XDispatch > xDisp = xProv->queryDispatch( aURL, ::rtl::OUString(), 0 ); if( xDisp.is() ) diff --git a/sw/source/ui/vba/vbaaddins.cxx b/sw/source/ui/vba/vbaaddins.cxx index 3c690867ed..e454ad1cb6 100644 --- a/sw/source/ui/vba/vbaaddins.cxx +++ b/sw/source/ui/vba/vbaaddins.cxx @@ -41,7 +41,7 @@ uno::Reference< container::XIndexAccess > lcl_getAddinCollection( const uno::Ref // first get the autoload addins in the directory STARTUP uno::Reference< lang::XMultiComponentFactory > xMCF( xContext->getServiceManager(), uno::UNO_QUERY_THROW ); - uno::Reference< ucb::XSimpleFileAccess > xSFA( xMCF->createInstanceWithContext( rtl::OUString::createFromAscii( "com.sun.star.ucb.SimpleFileAccess" ), xContext), uno::UNO_QUERY_THROW ); + uno::Reference< ucb::XSimpleFileAccess > xSFA( xMCF->createInstanceWithContext( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.SimpleFileAccess")), xContext), uno::UNO_QUERY_THROW ); SvtPathOptions aPathOpt; // FIXME: temporary the STARTUP path is located in $OO/basic3.1/program/addin String aAddinPath = aPathOpt.GetAddinPath(); diff --git a/sw/source/ui/vba/vbadocumentproperties.cxx b/sw/source/ui/vba/vbadocumentproperties.cxx index c2387befbd..805d64b32f 100644 --- a/sw/source/ui/vba/vbadocumentproperties.cxx +++ b/sw/source/ui/vba/vbadocumentproperties.cxx @@ -306,7 +306,7 @@ public: virtual rtl::OUString SAL_CALL getLinkSource( ) throw (script::BasicErrorException, uno::RuntimeException); virtual void SAL_CALL setLinkSource( const rtl::OUString& LinkSource ) throw (script::BasicErrorException, uno::RuntimeException); //XDefaultProperty - virtual ::rtl::OUString SAL_CALL getDefaultPropertyName( ) throw (uno::RuntimeException) { return rtl::OUString::createFromAscii("Value"); } + virtual ::rtl::OUString SAL_CALL getDefaultPropertyName( ) throw (uno::RuntimeException) { return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Value")); } // XHelperInterface virtual rtl::OUString& getServiceImplName(); virtual uno::Sequence<rtl::OUString> getServiceNames(); diff --git a/sw/source/ui/vba/vbafield.cxx b/sw/source/ui/vba/vbafield.cxx index df8f4dbe61..ebd01c6f04 100644 --- a/sw/source/ui/vba/vbafield.cxx +++ b/sw/source/ui/vba/vbafield.cxx @@ -407,7 +407,7 @@ SwVbaFields::Add( const css::uno::Reference< ::ooo::vba::word::XRange >& Range, uno::Reference< text::XTextField > SwVbaFields::Create_Field_FileName( const rtl::OUString _text ) throw (uno::RuntimeException) { - uno::Reference< text::XTextField > xTextField( mxMSF->createInstance( rtl::OUString::createFromAscii("com.sun.star.text.TextField.FileName") ), uno::UNO_QUERY_THROW ); + uno::Reference< text::XTextField > xTextField( mxMSF->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextField.FileName")) ), uno::UNO_QUERY_THROW ); sal_Int16 nFileFormat = text::FilenameDisplayFormat::NAME_AND_EXT; if( _text.getLength() > 0 ) { diff --git a/sw/source/ui/vba/vbaglobals.cxx b/sw/source/ui/vba/vbaglobals.cxx index efc42e09cf..d7d975549e 100644 --- a/sw/source/ui/vba/vbaglobals.cxx +++ b/sw/source/ui/vba/vbaglobals.cxx @@ -50,7 +50,7 @@ SwVbaGlobals::SwVbaGlobals( uno::Sequence< uno::Any > const& aArgs, uno::Refere { OSL_TRACE("SwVbaGlobals::SwVbaGlobals()"); uno::Sequence< beans::PropertyValue > aInitArgs( 2 ); - aInitArgs[ 0 ].Name = rtl::OUString::createFromAscii("Application"); + aInitArgs[ 0 ].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Application")); aInitArgs[ 0 ].Value = uno::makeAny( getApplication() ); aInitArgs[ 1 ].Name = sDocCtxName; aInitArgs[ 1 ].Value = uno::makeAny( getXSomethingFromArgs< frame::XModel >( aArgs, 0 ) ); diff --git a/sw/source/ui/vba/vbalisthelper.cxx b/sw/source/ui/vba/vbalisthelper.cxx index 5b247e4e6e..68c4bf2a6e 100644 --- a/sw/source/ui/vba/vbalisthelper.cxx +++ b/sw/source/ui/vba/vbalisthelper.cxx @@ -679,7 +679,7 @@ void SwVbaListHelper::CreateOutlineNumberForType7() throw( css::uno::RuntimeExce { sal_Int16 nNumberingType = style::NumberingType::ARABIC; uno::Sequence< beans::PropertyValue > aPropertyValues; - rtl::OUString sPrefix = rtl::OUString::createFromAscii("Chapter "); + rtl::OUString sPrefix(RTL_CONSTASCII_USTRINGPARAM("Chapter ")); for( sal_Int32 nLevel = 0; nLevel < LIST_LEVEL_COUNT; nLevel++ ) { diff --git a/sw/source/ui/vba/vbaoptions.cxx b/sw/source/ui/vba/vbaoptions.cxx index 692d5954ce..f2dca6b947 100644 --- a/sw/source/ui/vba/vbaoptions.cxx +++ b/sw/source/ui/vba/vbaoptions.cxx @@ -104,7 +104,7 @@ void SwVbaOptions::setValueEvent( const uno::Any& value ) value >>= sNewPath; rtl::OUString sNewPathUrl; ::osl::File::getFileURLFromSystemPath( sNewPath, sNewPathUrl ); - uno::Reference< beans::XPropertySet > xPathSettings( mxFactory->createInstance( rtl::OUString::createFromAscii("com.sun.star.util.PathSettings") ), uno::UNO_QUERY_THROW ); + uno::Reference< beans::XPropertySet > xPathSettings( mxFactory->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.util.PathSettings")) ), uno::UNO_QUERY_THROW ); rtl::OUString sOldPathUrl; xPathSettings->getPropertyValue( msDefaultFilePath ) >>= sOldPathUrl; // path could be a multipath, Microsoft doesn't support this feature in Word currently @@ -119,7 +119,7 @@ void SwVbaOptions::setValueEvent( const uno::Any& value ) uno::Any SwVbaOptions::getValueEvent() { - uno::Reference< beans::XPropertySet > xPathSettings( mxFactory->createInstance( rtl::OUString::createFromAscii("com.sun.star.util.PathSettings") ), uno::UNO_QUERY_THROW ); + uno::Reference< beans::XPropertySet > xPathSettings( mxFactory->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.util.PathSettings")) ), uno::UNO_QUERY_THROW ); rtl::OUString sPathUrl; xPathSettings->getPropertyValue( msDefaultFilePath ) >>= sPathUrl; // path could be a multipath, Microsoft doesn't support this feature in Word currently diff --git a/sw/source/ui/vba/vbaselection.cxx b/sw/source/ui/vba/vbaselection.cxx index e5166c7e2d..04f7e3fdaf 100644 --- a/sw/source/ui/vba/vbaselection.cxx +++ b/sw/source/ui/vba/vbaselection.cxx @@ -877,7 +877,7 @@ SwVbaSelection::ShapeRange( ) throw (uno::RuntimeException) { uno::Reference< drawing::XShape > xShape( mxModel->getCurrentSelection(), uno::UNO_QUERY_THROW ); uno::Reference< lang::XMultiServiceFactory > xMSF( mxContext->getServiceManager(), uno::UNO_QUERY_THROW ); - xShapes.set( xMSF->createInstance( rtl::OUString::createFromAscii( "com.sun.star.drawing.ShapeCollection" ) ), uno::UNO_QUERY_THROW ); + xShapes.set( xMSF->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.ShapeCollection")) ), uno::UNO_QUERY_THROW ); xShapes->add( xShape ); } diff --git a/sw/source/ui/vba/vbastyle.hxx b/sw/source/ui/vba/vbastyle.hxx index dd1dbcaa52..0af922d174 100644 --- a/sw/source/ui/vba/vbastyle.hxx +++ b/sw/source/ui/vba/vbastyle.hxx @@ -74,7 +74,7 @@ public: virtual ::sal_Int32 SAL_CALL getListLevelNumber() throw (css::uno::RuntimeException); //XDefaultProperty - virtual ::rtl::OUString SAL_CALL getDefaultPropertyName( ) throw (css::uno::RuntimeException) { return rtl::OUString::createFromAscii("Name"); } + virtual ::rtl::OUString SAL_CALL getDefaultPropertyName( ) throw (css::uno::RuntimeException) { return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Name")); } // XHelperInterface virtual rtl::OUString& getServiceImplName(); diff --git a/sw/source/ui/vba/vbatables.cxx b/sw/source/ui/vba/vbatables.cxx index 9815c17e6a..ab7ab7c677 100644 --- a/sw/source/ui/vba/vbatables.cxx +++ b/sw/source/ui/vba/vbatables.cxx @@ -160,7 +160,7 @@ SwVbaTables::Add( const uno::Reference< word::XRange >& Range, const uno::Any& N uno::Reference< text::XTextRange > xTextRange = pVbaRange->getXTextRange(); uno::Reference< text::XTextTable > xTable; - xTable.set( xMsf->createInstance( rtl::OUString::createFromAscii("com.sun.star.text.TextTable") ), uno::UNO_QUERY_THROW ); + xTable.set( xMsf->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextTable")) ), uno::UNO_QUERY_THROW ); /* comphelper::ComponentContext aCtx( xMsf ); if ( !aCtx.createComponent( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextTable") ), xTable ) ); diff --git a/sw/source/ui/wrtsh/wrtsh1.cxx b/sw/source/ui/wrtsh/wrtsh1.cxx index b98ba832b3..aee940f40d 100644 --- a/sw/source/ui/wrtsh/wrtsh1.cxx +++ b/sw/source/ui/wrtsh/wrtsh1.cxx @@ -563,7 +563,7 @@ BOOL SwWrtShell::InsertOleObject( const svt::EmbeddedObjectRef& xRef, SwFlyFrmFm { try { - xSet->setPropertyValue( ::rtl::OUString::createFromAscii("Formula"), uno::makeAny( ::rtl::OUString( aMathData ) ) ); + xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Formula")), uno::makeAny( ::rtl::OUString( aMathData ) ) ); bActivate = FALSE; } catch ( uno::Exception& ) |