diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-05-22 12:46:02 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-05-23 08:37:41 +0200 |
commit | dddba389b79647f69f447e576cf7e880be5661c6 (patch) | |
tree | 10d8da4fb55cf603a70229abddc460b0646ed237 | |
parent | b1f4a39a326bcaf06068914c03c3dea6f9aeebd8 (diff) |
loplugin:ostr in sw/../vba
Change-Id: I73491b481fb82785a21f7239fff62f812dd7440c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167953
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
83 files changed, 605 insertions, 603 deletions
diff --git a/sw/source/ui/vba/vbaaddin.cxx b/sw/source/ui/vba/vbaaddin.cxx index 8fdfb0048008..d05e978c2516 100644 --- a/sw/source/ui/vba/vbaaddin.cxx +++ b/sw/source/ui/vba/vbaaddin.cxx @@ -44,7 +44,7 @@ OUString SAL_CALL SwVbaAddin::getName() void SAL_CALL SwVbaAddin::setName( const OUString& ) { - throw uno::RuntimeException(" Fail to set name" ); + throw uno::RuntimeException(u" Fail to set name"_ustr ); } OUString SAL_CALL SwVbaAddin::getPath() @@ -76,7 +76,7 @@ void SAL_CALL SwVbaAddin::setInstalled( sal_Bool _installed ) OUString SwVbaAddin::getServiceImplName() { - return "SwVbaAddin"; + return u"SwVbaAddin"_ustr; } uno::Sequence< OUString > @@ -84,7 +84,7 @@ SwVbaAddin::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.word.Addin" + u"ooo.vba.word.Addin"_ustr }; return aServiceNames; } diff --git a/sw/source/ui/vba/vbaaddins.cxx b/sw/source/ui/vba/vbaaddins.cxx index 6fd6e42f8634..52207b314518 100644 --- a/sw/source/ui/vba/vbaaddins.cxx +++ b/sw/source/ui/vba/vbaaddins.cxx @@ -80,7 +80,7 @@ SwVbaAddins::createCollectionObject( const css::uno::Any& aSource ) OUString SwVbaAddins::getServiceImplName() { - return "SwVbaAddins"; + return u"SwVbaAddins"_ustr; } css::uno::Sequence<OUString> @@ -88,7 +88,7 @@ SwVbaAddins::getServiceNames() { static uno::Sequence< OUString > const sNames { - "ooo.vba.word.Addins" + u"ooo.vba.word.Addins"_ustr }; return sNames; } diff --git a/sw/source/ui/vba/vbaapplication.cxx b/sw/source/ui/vba/vbaapplication.cxx index d3f290db28ab..ac519b9d7afd 100644 --- a/sw/source/ui/vba/vbaapplication.cxx +++ b/sw/source/ui/vba/vbaapplication.cxx @@ -107,7 +107,7 @@ SwVbaApplication::RemoveSink( sal_uInt32 nNumber ) OUString SAL_CALL SwVbaApplication::getName() { - return "Microsoft Word"; + return u"Microsoft Word"_ustr; } uno::Reference< word::XDocument > SAL_CALL @@ -314,7 +314,7 @@ void SAL_CALL SwVbaApplication::setTop( sal_Int32 _top ) OUString SAL_CALL SwVbaApplication::getStatusBar() { - return ""; + return u""_ustr; } uno::Any SAL_CALL SwVbaApplication::getCustomizationContext() @@ -443,7 +443,7 @@ void SAL_CALL SwVbaApplication::Move( sal_Int32 Left, sal_Int32 Top ) OUString SAL_CALL SwVbaApplication::getIID() { - return "{82154421-0FBF-11d4-8313-005004526AB4}"; + return u"{82154421-0FBF-11d4-8313-005004526AB4}"_ustr; } // XConnectable @@ -451,7 +451,7 @@ SwVbaApplication::getIID() OUString SAL_CALL SwVbaApplication::GetIIDForClassItselfNotCoclass() { - return "{82154423-0FBF-11D4-8313-005004526AB4}"; + return u"{82154423-0FBF-11D4-8313-005004526AB4}"_ustr; } TypeAndIID SAL_CALL @@ -459,7 +459,7 @@ SwVbaApplication::GetConnectionPoint() { TypeAndIID aResult = { cppu::UnoType<word::XApplicationOutgoing>::get(), - "{82154422-0FBF-11D4-8313-005004526AB4}" + u"{82154422-0FBF-11D4-8313-005004526AB4}"_ustr }; return aResult; @@ -475,7 +475,7 @@ SwVbaApplication::FindConnectionPoint() OUString SwVbaApplication::getServiceImplName() { - return "SwVbaApplication"; + return u"SwVbaApplication"_ustr; } uno::Sequence< OUString > @@ -483,7 +483,7 @@ SwVbaApplication::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.word.Application" + u"ooo.vba.word.Application"_ustr }; return aServiceNames; } diff --git a/sw/source/ui/vba/vbaautotextentry.cxx b/sw/source/ui/vba/vbaautotextentry.cxx index dd1f17f16ff4..051943cd1f41 100644 --- a/sw/source/ui/vba/vbaautotextentry.cxx +++ b/sw/source/ui/vba/vbaautotextentry.cxx @@ -41,14 +41,14 @@ uno::Reference< word::XRange > SAL_CALL SwVbaAutoTextEntry::Insert( const uno::R if( pWhere ) { uno::Reference< text::XTextRange > xTextRange = pWhere->getXTextRange(); - xTextRange->setString( "x" ); // set marker + xTextRange->setString( u"x"_ustr ); // set marker uno::Reference< text::XTextRange > xEndMarker = xTextRange->getEnd(); - xEndMarker->setString( "x" ); // set marker + xEndMarker->setString( u"x"_ustr ); // set marker uno::Reference< text::XText > xText = pWhere->getXText(); mxEntry->applyTo( xEndMarker->getStart() ); uno::Reference< text::XTextCursor > xTC = xText->createTextCursorByRange( xTextRange->getStart() ); xTC->goRight( 1, true ); - xTC->setString( "" ); // remove marker + xTC->setString( u""_ustr ); // remove marker // remove the blank paragraph if it is a rich text bool bRich = false; _richtext >>= bRich; @@ -63,11 +63,11 @@ uno::Reference< word::XRange > SAL_CALL SwVbaAutoTextEntry::Insert( const uno::R uno::Reference< text::XTextViewCursor > xTVCursor = word::getXTextViewCursor( xModel ); uno::Reference< text::XTextRange > xCurrentRange( xTC->getEnd(), uno::UNO_SET_THROW ); xTVCursor->gotoRange( xCurrentRange, false ); - dispatchRequests( xModel,".uno:Delete" ); + dispatchRequests( xModel,u".uno:Delete"_ustr ); xTVCursor->gotoRange( xEndMarker->getEnd(), false ); } } - xEndMarker->setString( "" ); // remove marker + xEndMarker->setString( u""_ustr ); // remove marker xTC = xText->createTextCursorByRange( xEndMarker->getEnd() ); pWhere->setXTextCursor( xTC ); } @@ -77,7 +77,7 @@ uno::Reference< word::XRange > SAL_CALL SwVbaAutoTextEntry::Insert( const uno::R OUString SwVbaAutoTextEntry::getServiceImplName() { - return "SwVbaAutoTextEntry"; + return u"SwVbaAutoTextEntry"_ustr; } uno::Sequence< OUString > @@ -85,7 +85,7 @@ SwVbaAutoTextEntry::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.word.AutoTextEntry" + u"ooo.vba.word.AutoTextEntry"_ustr }; return aServiceNames; } @@ -103,7 +103,7 @@ SwVbaAutoTextEntries::getElementType() uno::Reference< container::XEnumeration > SwVbaAutoTextEntries::createEnumeration() { - throw uno::RuntimeException("Not implemented" ); + throw uno::RuntimeException(u"Not implemented"_ustr ); } uno::Any @@ -116,7 +116,7 @@ SwVbaAutoTextEntries::createCollectionObject( const css::uno::Any& aSource ) OUString SwVbaAutoTextEntries::getServiceImplName() { - return "SwVbaAutoTextEntries"; + return u"SwVbaAutoTextEntries"_ustr; } css::uno::Sequence<OUString> @@ -124,7 +124,7 @@ SwVbaAutoTextEntries::getServiceNames() { static uno::Sequence< OUString > const sNames { - "ooo.vba.word.AutoTextEntries" + u"ooo.vba.word.AutoTextEntries"_ustr }; return sNames; } diff --git a/sw/source/ui/vba/vbabookmark.cxx b/sw/source/ui/vba/vbabookmark.cxx index aecc0760bc1f..e03050b190f9 100644 --- a/sw/source/ui/vba/vbabookmark.cxx +++ b/sw/source/ui/vba/vbabookmark.cxx @@ -43,7 +43,7 @@ SwVbaBookmark::~SwVbaBookmark() void SwVbaBookmark::checkVality() { if( !mbValid ) - throw uno::RuntimeException("The bookmark is not valid" ); + throw uno::RuntimeException(u"The bookmark is not valid"_ustr ); } void SAL_CALL SwVbaBookmark::Delete() @@ -83,7 +83,7 @@ uno::Any SAL_CALL SwVbaBookmark::Range() OUString SwVbaBookmark::getServiceImplName() { - return "SwVbaBookmark"; + return u"SwVbaBookmark"_ustr; } uno::Sequence< OUString > @@ -91,7 +91,7 @@ SwVbaBookmark::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.word.Bookmark" + u"ooo.vba.word.Bookmark"_ustr }; return aServiceNames; } diff --git a/sw/source/ui/vba/vbabookmarks.cxx b/sw/source/ui/vba/vbabookmarks.cxx index 601ed759dff0..386373cbdb9f 100644 --- a/sw/source/ui/vba/vbabookmarks.cxx +++ b/sw/source/ui/vba/vbabookmarks.cxx @@ -145,7 +145,7 @@ void SwVbaBookmarks::removeBookmarkByName( const OUString& rName ) void SwVbaBookmarks::addBookmarkByName( const uno::Reference< frame::XModel >& xModel, const OUString& rName, const uno::Reference< text::XTextRange >& rTextRange ) { uno::Reference< lang::XMultiServiceFactory > xDocMSF( xModel, uno::UNO_QUERY_THROW ); - uno::Reference< text::XTextContent > xBookmark( xDocMSF->createInstance("com.sun.star.text.Bookmark"), uno::UNO_QUERY_THROW ); + uno::Reference< text::XTextContent > xBookmark( xDocMSF->createInstance(u"com.sun.star.text.Bookmark"_ustr), uno::UNO_QUERY_THROW ); uno::Reference< container::XNamed > xNamed( xBookmark, uno::UNO_QUERY_THROW ); xNamed->setName( rName ); rTextRange->getText()->insertTextContent( rTextRange, xBookmark, false ); @@ -211,7 +211,7 @@ SwVbaBookmarks::Exists( const OUString& rName ) OUString SwVbaBookmarks::getServiceImplName() { - return "SwVbaBookmarks"; + return u"SwVbaBookmarks"_ustr; } css::uno::Sequence<OUString> @@ -219,7 +219,7 @@ SwVbaBookmarks::getServiceNames() { static uno::Sequence< OUString > const sNames { - "ooo.vba.word.Bookmarks" + u"ooo.vba.word.Bookmarks"_ustr }; return sNames; } diff --git a/sw/source/ui/vba/vbaborders.cxx b/sw/source/ui/vba/vbaborders.cxx index 9e780fe2103f..89fc7c011688 100644 --- a/sw/source/ui/vba/vbaborders.cxx +++ b/sw/source/ui/vba/vbaborders.cxx @@ -50,7 +50,7 @@ private: void setBorderLine( table::BorderLine const & rBorderLine ) { table::TableBorder aTableBorder; - m_xProps->getPropertyValue( "TableBorder" ) >>= aTableBorder; + m_xProps->getPropertyValue( u"TableBorder"_ustr ) >>= aTableBorder; switch ( m_LineType ) { @@ -87,13 +87,13 @@ private: default: return; } - m_xProps->setPropertyValue( "TableBorder", uno::Any(aTableBorder) ); + m_xProps->setPropertyValue( u"TableBorder"_ustr, uno::Any(aTableBorder) ); } bool getBorderLine( table::BorderLine& rBorderLine ) { table::TableBorder aTableBorder; - m_xProps->getPropertyValue( "TableBorder" ) >>= aTableBorder; + m_xProps->getPropertyValue( u"TableBorder"_ustr ) >>= aTableBorder; switch ( m_LineType ) { case word::WdBorderType::wdBorderLeft: @@ -135,14 +135,14 @@ private: protected: virtual OUString getServiceImplName() override { - return "SwVbaBorder"; + return u"SwVbaBorder"_ustr; } virtual css::uno::Sequence<OUString> getServiceNames() override { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.word.Border" + u"ooo.vba.word.Border"_ustr }; return aServiceNames; } @@ -178,7 +178,7 @@ public: _linestyle >>= nLineStyle; table::BorderLine aBorderLine; if ( !getBorderLine( aBorderLine ) ) - throw uno::RuntimeException("Method failed" ); + throw uno::RuntimeException(u"Method failed"_ustr ); switch ( nLineStyle ) { @@ -218,7 +218,7 @@ public: break; } default: - throw uno::RuntimeException("Bad param" ); + throw uno::RuntimeException(u"Bad param"_ustr ); } setBorderLine( aBorderLine ); @@ -350,7 +350,7 @@ void SAL_CALL SwVbaBorders::setShadow( sal_Bool /*_shadow*/ ) OUString SwVbaBorders::getServiceImplName() { - return "SwVbaBorders"; + return u"SwVbaBorders"_ustr; } uno::Sequence< OUString > @@ -358,7 +358,7 @@ SwVbaBorders::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.word.Borders" + u"ooo.vba.word.Borders"_ustr }; return aServiceNames; } diff --git a/sw/source/ui/vba/vbacell.cxx b/sw/source/ui/vba/vbacell.cxx index a24dd3dd1c3c..a243264836e6 100644 --- a/sw/source/ui/vba/vbacell.cxx +++ b/sw/source/ui/vba/vbacell.cxx @@ -86,7 +86,7 @@ void SAL_CALL SwVbaCell::SetHeight( float height, sal_Int32 heightrule ) OUString SwVbaCell::getServiceImplName() { - return "SwVbaCell"; + return u"SwVbaCell"_ustr; } uno::Sequence< OUString > @@ -94,7 +94,7 @@ SwVbaCell::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.word.Cell" + u"ooo.vba.word.Cell"_ustr }; return aServiceNames; } diff --git a/sw/source/ui/vba/vbacells.cxx b/sw/source/ui/vba/vbacells.cxx index e30c2ed370ff..a41a154da977 100644 --- a/sw/source/ui/vba/vbacells.cxx +++ b/sw/source/ui/vba/vbacells.cxx @@ -198,7 +198,7 @@ SwVbaCells::createCollectionObject( const uno::Any& aSource ) OUString SwVbaCells::getServiceImplName() { - return "SwVbaCells"; + return u"SwVbaCells"_ustr; } uno::Sequence<OUString> @@ -206,7 +206,7 @@ SwVbaCells::getServiceNames() { static uno::Sequence< OUString > const sNames { - "ooo.vba.word.Cells" + u"ooo.vba.word.Cells"_ustr }; return sNames; } diff --git a/sw/source/ui/vba/vbacolumn.cxx b/sw/source/ui/vba/vbacolumn.cxx index c4411bfab493..fe7837c0f64e 100644 --- a/sw/source/ui/vba/vbacolumn.cxx +++ b/sw/source/ui/vba/vbacolumn.cxx @@ -75,7 +75,7 @@ void SwVbaColumn::SelectColumn( const uno::Reference< frame::XModel >& xModel, c OUString SwVbaColumn::getServiceImplName() { - return "SwVbaColumn"; + return u"SwVbaColumn"_ustr; } uno::Sequence< OUString > @@ -83,7 +83,7 @@ SwVbaColumn::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.word.Column" + u"ooo.vba.word.Column"_ustr }; return aServiceNames; } diff --git a/sw/source/ui/vba/vbacolumns.cxx b/sw/source/ui/vba/vbacolumns.cxx index ffaf662029f0..9622c9068ae2 100644 --- a/sw/source/ui/vba/vbacolumns.cxx +++ b/sw/source/ui/vba/vbacolumns.cxx @@ -105,11 +105,11 @@ uno::Any SAL_CALL SwVbaColumns::Item( const uno::Any& Index1, const uno::Any& /* { if( nIndex <= 0 || nIndex > getCount() ) { - throw lang::IndexOutOfBoundsException("Index out of bounds" ); + throw lang::IndexOutOfBoundsException(u"Index out of bounds"_ustr ); } return uno::Any( uno::Reference< word::XColumn >( new SwVbaColumn( this, mxContext, mxTextTable, nIndex - 1 ) ) ); } - throw uno::RuntimeException("Index out of bounds" ); + throw uno::RuntimeException(u"Index out of bounds"_ustr ); } // XEnumerationAccess @@ -133,7 +133,7 @@ SwVbaColumns::createCollectionObject( const uno::Any& aSource ) OUString SwVbaColumns::getServiceImplName() { - return "SwVbaColumns"; + return u"SwVbaColumns"_ustr; } uno::Sequence<OUString> @@ -141,7 +141,7 @@ SwVbaColumns::getServiceNames() { static uno::Sequence< OUString > const sNames { - "ooo.vba.word.Columns" + u"ooo.vba.word.Columns"_ustr }; return sNames; } diff --git a/sw/source/ui/vba/vbacontentcontrol.cxx b/sw/source/ui/vba/vbacontentcontrol.cxx index 9cbf097090ee..3646804436c7 100644 --- a/sw/source/ui/vba/vbacontentcontrol.cxx +++ b/sw/source/ui/vba/vbacontentcontrol.cxx @@ -241,181 +241,181 @@ void SwVbaContentControl::setColor(sal_Int32 nWdColor) switch (nWdColor) { case word::WdColor::wdColorAqua: - m_pCC->SetColor("wdColorAqua"); + m_pCC->SetColor(u"wdColorAqua"_ustr); break; case word::WdColor::wdColorAutomatic: - m_pCC->SetColor("wdColorAutomatic"); + m_pCC->SetColor(u"wdColorAutomatic"_ustr); break; case word::WdColor::wdColorBlack: - m_pCC->SetColor("wdColorBlack"); + m_pCC->SetColor(u"wdColorBlack"_ustr); break; case word::WdColor::wdColorBlue: - m_pCC->SetColor("wdColorBlue"); + m_pCC->SetColor(u"wdColorBlue"_ustr); break; case word::WdColor::wdColorBlueGray: - m_pCC->SetColor("wdColorBlueGray"); + m_pCC->SetColor(u"wdColorBlueGray"_ustr); break; case word::WdColor::wdColorBrightGreen: - m_pCC->SetColor("wdColorBrightGreen"); + m_pCC->SetColor(u"wdColorBrightGreen"_ustr); break; case word::WdColor::wdColorBrown: - m_pCC->SetColor("wdColorBrown"); + m_pCC->SetColor(u"wdColorBrown"_ustr); break; case word::WdColor::wdColorDarkBlue: - m_pCC->SetColor("wdColorDarkBlue"); + m_pCC->SetColor(u"wdColorDarkBlue"_ustr); break; case word::WdColor::wdColorDarkGreen: - m_pCC->SetColor("wdColorDarkGreen"); + m_pCC->SetColor(u"wdColorDarkGreen"_ustr); break; case word::WdColor::wdColorDarkRed: - m_pCC->SetColor("wdColorDarkRed"); + m_pCC->SetColor(u"wdColorDarkRed"_ustr); break; case word::WdColor::wdColorDarkTeal: - m_pCC->SetColor("wdColorDarkTeal"); + m_pCC->SetColor(u"wdColorDarkTeal"_ustr); break; case word::WdColor::wdColorDarkYellow: - m_pCC->SetColor("wdColorDarkYellow"); + m_pCC->SetColor(u"wdColorDarkYellow"_ustr); break; case word::WdColor::wdColorGold: - m_pCC->SetColor("wdColorGold"); + m_pCC->SetColor(u"wdColorGold"_ustr); break; case word::WdColor::wdColorGray05: - m_pCC->SetColor("wdColorGray05"); + m_pCC->SetColor(u"wdColorGray05"_ustr); break; case word::WdColor::wdColorGray10: - m_pCC->SetColor("wdColorGray10"); + m_pCC->SetColor(u"wdColorGray10"_ustr); break; case word::WdColor::wdColorGray125: - m_pCC->SetColor("wdColorGray125"); + m_pCC->SetColor(u"wdColorGray125"_ustr); break; case word::WdColor::wdColorGray15: - m_pCC->SetColor("wdColorGray15"); + m_pCC->SetColor(u"wdColorGray15"_ustr); break; case word::WdColor::wdColorGray20: - m_pCC->SetColor("wdColorGray20"); + m_pCC->SetColor(u"wdColorGray20"_ustr); break; case word::WdColor::wdColorGray25: - m_pCC->SetColor("wdColorGray25"); + m_pCC->SetColor(u"wdColorGray25"_ustr); break; case word::WdColor::wdColorGray30: - m_pCC->SetColor("wdColorGray30"); + m_pCC->SetColor(u"wdColorGray30"_ustr); break; case word::WdColor::wdColorGray35: - m_pCC->SetColor("wdColorGray35"); + m_pCC->SetColor(u"wdColorGray35"_ustr); break; case word::WdColor::wdColorGray375: - m_pCC->SetColor("wdColorGray375"); + m_pCC->SetColor(u"wdColorGray375"_ustr); break; case word::WdColor::wdColorGray40: - m_pCC->SetColor("wdColorGray40"); + m_pCC->SetColor(u"wdColorGray40"_ustr); break; case word::WdColor::wdColorGray45: - m_pCC->SetColor("wdColorGray45"); + m_pCC->SetColor(u"wdColorGray45"_ustr); break; case word::WdColor::wdColorGray50: - m_pCC->SetColor("wdColorGray50"); + m_pCC->SetColor(u"wdColorGray50"_ustr); break; case word::WdColor::wdColorGray55: - m_pCC->SetColor("wdColorGray55"); + m_pCC->SetColor(u"wdColorGray55"_ustr); break; case word::WdColor::wdColorGray60: - m_pCC->SetColor("wdColorGray60"); + m_pCC->SetColor(u"wdColorGray60"_ustr); break; case word::WdColor::wdColorGray625: - m_pCC->SetColor("wdColorGray625"); + m_pCC->SetColor(u"wdColorGray625"_ustr); break; case word::WdColor::wdColorGray65: - m_pCC->SetColor("wdColorGray65"); + m_pCC->SetColor(u"wdColorGray65"_ustr); break; case word::WdColor::wdColorGray70: - m_pCC->SetColor("wdColorGray70"); + m_pCC->SetColor(u"wdColorGray70"_ustr); break; case word::WdColor::wdColorGray75: - m_pCC->SetColor("wdColorGray75"); + m_pCC->SetColor(u"wdColorGray75"_ustr); break; case word::WdColor::wdColorGray80: - m_pCC->SetColor("wdColorGray80"); + m_pCC->SetColor(u"wdColorGray80"_ustr); break; case word::WdColor::wdColorGray85: - m_pCC->SetColor("wdColorGray85"); + m_pCC->SetColor(u"wdColorGray85"_ustr); break; case word::WdColor::wdColorGray875: - m_pCC->SetColor("wdColorGray875"); + m_pCC->SetColor(u"wdColorGray875"_ustr); break; case word::WdColor::wdColorGray90: - m_pCC->SetColor("wdColorGray90"); + m_pCC->SetColor(u"wdColorGray90"_ustr); break; case word::WdColor::wdColorGray95: - m_pCC->SetColor("wdColorGray95"); + m_pCC->SetColor(u"wdColorGray95"_ustr); break; case word::WdColor::wdColorGreen: - m_pCC->SetColor("wdColorGreen"); + m_pCC->SetColor(u"wdColorGreen"_ustr); break; case word::WdColor::wdColorIndigo: - m_pCC->SetColor("wdColorIndigo"); + m_pCC->SetColor(u"wdColorIndigo"_ustr); break; case word::WdColor::wdColorLavender: - m_pCC->SetColor("wdColorLavender"); + m_pCC->SetColor(u"wdColorLavender"_ustr); break; case word::WdColor::wdColorLightBlue: - m_pCC->SetColor("wdColorLightBlue"); + m_pCC->SetColor(u"wdColorLightBlue"_ustr); break; case word::WdColor::wdColorLightGreen: - m_pCC->SetColor("wdColorLightGreen"); + m_pCC->SetColor(u"wdColorLightGreen"_ustr); break; case word::WdColor::wdColorLightOrange: - m_pCC->SetColor("wdColorLightOrange"); + m_pCC->SetColor(u"wdColorLightOrange"_ustr); break; case word::WdColor::wdColorLightTurquoise: - m_pCC->SetColor("wdColorLightTurquoise"); + m_pCC->SetColor(u"wdColorLightTurquoise"_ustr); break; case word::WdColor::wdColorLightYellow: - m_pCC->SetColor("wdColorLightYellow"); + m_pCC->SetColor(u"wdColorLightYellow"_ustr); break; case word::WdColor::wdColorLime: - m_pCC->SetColor("wdColorLime"); + m_pCC->SetColor(u"wdColorLime"_ustr); break; case word::WdColor::wdColorOliveGreen: - m_pCC->SetColor("wdColorOliveGreen"); + m_pCC->SetColor(u"wdColorOliveGreen"_ustr); break; case word::WdColor::wdColorOrange: - m_pCC->SetColor("wdColorOrange"); + m_pCC->SetColor(u"wdColorOrange"_ustr); break; case word::WdColor::wdColorPaleBlue: - m_pCC->SetColor("wdColorPaleBlue"); + m_pCC->SetColor(u"wdColorPaleBlue"_ustr); break; case word::WdColor::wdColorPink: - m_pCC->SetColor("wdColorPink"); + m_pCC->SetColor(u"wdColorPink"_ustr); break; case word::WdColor::wdColorPlum: - m_pCC->SetColor("wdColorPlum"); + m_pCC->SetColor(u"wdColorPlum"_ustr); break; case word::WdColor::wdColorRed: - m_pCC->SetColor("wdColorRed"); + m_pCC->SetColor(u"wdColorRed"_ustr); break; case word::WdColor::wdColorRose: - m_pCC->SetColor("wdColorRose"); + m_pCC->SetColor(u"wdColorRose"_ustr); break; case word::WdColor::wdColorSeaGreen: - m_pCC->SetColor("wdColorSeaGreen"); + m_pCC->SetColor(u"wdColorSeaGreen"_ustr); break; case word::WdColor::wdColorSkyBlue: - m_pCC->SetColor("wdColorSkyBlue"); + m_pCC->SetColor(u"wdColorSkyBlue"_ustr); break; case word::WdColor::wdColorTan: - m_pCC->SetColor("wdColorTan"); + m_pCC->SetColor(u"wdColorTan"_ustr); break; case word::WdColor::wdColorTeal: - m_pCC->SetColor("wdColorTeal"); + m_pCC->SetColor(u"wdColorTeal"_ustr); break; case word::WdColor::wdColorTurquoise: - m_pCC->SetColor("wdColorTurquoise"); + m_pCC->SetColor(u"wdColorTurquoise"_ustr); break; case word::WdColor::wdColorViolet: - m_pCC->SetColor("wdColorViolet"); + m_pCC->SetColor(u"wdColorViolet"_ustr); break; case word::WdColor::wdColorWhite: - m_pCC->SetColor("wdColorWhite"); + m_pCC->SetColor(u"wdColorWhite"_ustr); break; default:; } @@ -732,7 +732,7 @@ void SwVbaContentControl::SetPlaceholderText(const uno::Any& BuildingBlock, cons else { // Remove placeholder text. - m_pCC->SetPlaceholderDocPart(""); + m_pCC->SetPlaceholderDocPart(u""_ustr); } if (m_pCC->GetShowingPlaceHolder() && !getLockContents() && m_pCC->GetTextAttr()) { @@ -742,11 +742,11 @@ void SwVbaContentControl::SetPlaceholderText(const uno::Any& BuildingBlock, cons void SwVbaContentControl::Ungroup() { SAL_INFO("sw.vba", "SwVbaContentControl::UnGroup stub"); } -OUString SwVbaContentControl::getServiceImplName() { return "SwVbaContentControl"; } +OUString SwVbaContentControl::getServiceImplName() { return u"SwVbaContentControl"_ustr; } uno::Sequence<OUString> SwVbaContentControl::getServiceNames() { - static uno::Sequence<OUString> const aServiceNames{ "ooo.vba.word.ContentControl" }; + static uno::Sequence<OUString> const aServiceNames{ u"ooo.vba.word.ContentControl"_ustr }; return aServiceNames; } diff --git a/sw/source/ui/vba/vbacontentcontrollistentries.cxx b/sw/source/ui/vba/vbacontentcontrollistentries.cxx index c2e6e7e5f91b..8f222fe93bf2 100644 --- a/sw/source/ui/vba/vbacontentcontrollistentries.cxx +++ b/sw/source/ui/vba/vbacontentcontrollistentries.cxx @@ -154,12 +154,12 @@ uno::Any SwVbaContentControlListEntries::createCollectionObject(const uno::Any& OUString SwVbaContentControlListEntries::getServiceImplName() { - return "SwVbaContentControlListEntries"; + return u"SwVbaContentControlListEntries"_ustr; } uno::Sequence<OUString> SwVbaContentControlListEntries::getServiceNames() { - static uno::Sequence<OUString> const sNames{ "ooo.vba.word.ContentControlListEntries" }; + static uno::Sequence<OUString> const sNames{ u"ooo.vba.word.ContentControlListEntries"_ustr }; return sNames; } diff --git a/sw/source/ui/vba/vbacontentcontrollistentry.cxx b/sw/source/ui/vba/vbacontentcontrollistentry.cxx index c3071f0c4b6e..311ab513c2f5 100644 --- a/sw/source/ui/vba/vbacontentcontrollistentry.cxx +++ b/sw/source/ui/vba/vbacontentcontrollistentry.cxx @@ -149,12 +149,14 @@ void SwVbaContentControlListEntry::Select() // XHelperInterface OUString SwVbaContentControlListEntry::getServiceImplName() { - return "SwVbaContentControlListEntry"; + return u"SwVbaContentControlListEntry"_ustr; } uno::Sequence<OUString> SwVbaContentControlListEntry::getServiceNames() { - static uno::Sequence<OUString> const aServiceNames{ "ooo.vba.word.ContentControlListEntry" }; + static uno::Sequence<OUString> const aServiceNames{ + u"ooo.vba.word.ContentControlListEntry"_ustr + }; return aServiceNames; } diff --git a/sw/source/ui/vba/vbacontentcontrols.cxx b/sw/source/ui/vba/vbacontentcontrols.cxx index 37199e2cec2d..5a7dccef17f5 100644 --- a/sw/source/ui/vba/vbacontentcontrols.cxx +++ b/sw/source/ui/vba/vbacontentcontrols.cxx @@ -257,11 +257,11 @@ uno::Reference<container::XEnumeration> SwVbaContentControls::createEnumeration( uno::Any SwVbaContentControls::createCollectionObject(const uno::Any& aSource) { return aSource; } -OUString SwVbaContentControls::getServiceImplName() { return "SwVbaContentControls"; } +OUString SwVbaContentControls::getServiceImplName() { return u"SwVbaContentControls"_ustr; } uno::Sequence<OUString> SwVbaContentControls::getServiceNames() { - static uno::Sequence<OUString> const sNames{ "ooo.vba.word.ContentControls" }; + static uno::Sequence<OUString> const sNames{ u"ooo.vba.word.ContentControls"_ustr }; return sNames; } diff --git a/sw/source/ui/vba/vbadialog.cxx b/sw/source/ui/vba/vbadialog.cxx index f6af8f113e87..5661851e7661 100644 --- a/sw/source/ui/vba/vbadialog.cxx +++ b/sw/source/ui/vba/vbadialog.cxx @@ -57,7 +57,7 @@ SwVbaDialog::mapIndexToName( sal_Int32 nIndex ) OUString SwVbaDialog::getServiceImplName() { - return "SwVbaDialog"; + return u"SwVbaDialog"_ustr; } uno::Sequence< OUString > @@ -65,7 +65,7 @@ SwVbaDialog::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.word.Dialog" + u"ooo.vba.word.Dialog"_ustr }; return aServiceNames; } diff --git a/sw/source/ui/vba/vbadialogs.cxx b/sw/source/ui/vba/vbadialogs.cxx index 2b26a4cfaac4..c77fd0de91cd 100644 --- a/sw/source/ui/vba/vbadialogs.cxx +++ b/sw/source/ui/vba/vbadialogs.cxx @@ -35,7 +35,7 @@ SwVbaDialogs::Item( const uno::Any &aItem ) OUString SwVbaDialogs::getServiceImplName() { - return "SwVbaDialogs"; + return u"SwVbaDialogs"_ustr; } uno::Sequence< OUString > @@ -43,7 +43,7 @@ SwVbaDialogs::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.word.Dialogs" + u"ooo.vba.word.Dialogs"_ustr }; return aServiceNames; } diff --git a/sw/source/ui/vba/vbadocument.cxx b/sw/source/ui/vba/vbadocument.cxx index 49e40dc49f08..2588c153788a 100644 --- a/sw/source/ui/vba/vbadocument.cxx +++ b/sw/source/ui/vba/vbadocument.cxx @@ -223,7 +223,7 @@ SwVbaDocument::Bookmarks( const uno::Any& rIndex ) uno::Any SwVbaDocument::ContentControls(const uno::Any& index) { uno::Reference<XCollection> xContentControls( - new SwVbaContentControls(this, mxContext, mxTextDocument, "", "")); + new SwVbaContentControls(this, mxContext, mxTextDocument, u""_ustr, u""_ustr)); if (index.hasValue()) { try @@ -252,7 +252,7 @@ uno::Any SwVbaDocument::SelectContentControlsByTag(const uno::Any& index) OUString sTag; index >>= sTag; return uno::Any(uno::Reference<XCollection>( - new SwVbaContentControls(this, mxContext, mxTextDocument, sTag, ""))); + new SwVbaContentControls(this, mxContext, mxTextDocument, sTag, u""_ustr))); } uno::Any SwVbaDocument::SelectContentControlsByTitle(const uno::Any& index) @@ -260,7 +260,7 @@ uno::Any SwVbaDocument::SelectContentControlsByTitle(const uno::Any& index) OUString sTitle; index >>= sTitle; return uno::Any(uno::Reference<XCollection>( - new SwVbaContentControls(this, mxContext, mxTextDocument, "", sTitle))); + new SwVbaContentControls(this, mxContext, mxTextDocument, u""_ustr, sTitle))); } uno::Reference<word::XWindow> SwVbaDocument::getActiveWindow() @@ -368,7 +368,7 @@ SwVbaDocument::PageSetup( ) OUString SwVbaDocument::getServiceImplName() { - return "SwVbaDocument"; + return u"SwVbaDocument"_ustr; } uno::Any SAL_CALL @@ -449,7 +449,7 @@ sal_Bool SAL_CALL SwVbaDocument::getAutoHyphenation() // check this property only in default paragraph style bool IsAutoHyphenation = false; uno::Reference< beans::XPropertySet > xParaProps( word::getDefaultParagraphStyle( getModel() ), uno::UNO_QUERY_THROW ); - xParaProps->getPropertyValue("ParaIsHyphenation") >>= IsAutoHyphenation; + xParaProps->getPropertyValue(u"ParaIsHyphenation"_ustr) >>= IsAutoHyphenation; return IsAutoHyphenation; } @@ -457,7 +457,7 @@ void SAL_CALL SwVbaDocument::setAutoHyphenation( sal_Bool _autohyphenation ) { //TODO uno::Reference< beans::XPropertySet > xParaProps( word::getDefaultParagraphStyle( getModel() ), uno::UNO_QUERY_THROW ); - xParaProps->setPropertyValue("ParaIsHyphenation", uno::Any( _autohyphenation ) ); + xParaProps->setPropertyValue(u"ParaIsHyphenation"_ustr, uno::Any( _autohyphenation ) ); } ::sal_Int32 SAL_CALL SwVbaDocument::getHyphenationZone() @@ -476,7 +476,7 @@ void SAL_CALL SwVbaDocument::setHyphenationZone( ::sal_Int32 /*_hyphenationzone* //TODO sal_Int16 nHyphensLimit = 0; uno::Reference< beans::XPropertySet > xParaProps( word::getDefaultParagraphStyle( getModel() ), uno::UNO_QUERY_THROW ); - xParaProps->getPropertyValue("ParaHyphenationMaxHyphens") >>= nHyphensLimit; + xParaProps->getPropertyValue(u"ParaHyphenationMaxHyphens"_ustr) >>= nHyphensLimit; return nHyphensLimit; } @@ -484,7 +484,7 @@ void SAL_CALL SwVbaDocument::setConsecutiveHyphensLimit( ::sal_Int32 _consecutiv { sal_Int16 nHyphensLimit = static_cast< sal_Int16 >( _consecutivehyphenslimit ); uno::Reference< beans::XPropertySet > xParaProps( word::getDefaultParagraphStyle( getModel() ), uno::UNO_QUERY_THROW ); - xParaProps->setPropertyValue("ParaHyphenationMaxHyphens", uno::Any( nHyphensLimit ) ); + xParaProps->setPropertyValue(u"ParaHyphenationMaxHyphens"_ustr, uno::Any( nHyphensLimit ) ); } uno::Reference< ooo::vba::word::XMailMerge > SAL_CALL SwVbaDocument::getMailMerge() @@ -505,12 +505,12 @@ void SAL_CALL SwVbaDocument::PrintOut( const uno::Any& /*Background*/, const uno void SAL_CALL SwVbaDocument::PrintPreview( ) { - dispatchRequests( mxModel,".uno:PrintPreview" ); + dispatchRequests( mxModel,u".uno:PrintPreview"_ustr ); } void SAL_CALL SwVbaDocument::ClosePrintPreview( ) { - dispatchRequests( mxModel,".uno:ClosePreview" ); + dispatchRequests( mxModel,u".uno:ClosePreview"_ustr ); } uno::Any SAL_CALL @@ -560,7 +560,7 @@ SwVbaDocument::SaveAs2000( const uno::Any& FileName, const uno::Any& FileFormat, // Based on SwVbaOptions::getValueEvent() uno::Reference< util::XPathSettings > xPathSettings = util::thePathSettings::get( comphelper::getProcessComponentContext() ); OUString sPathUrl; - xPathSettings->getPropertyValue( "Work" ) >>= sPathUrl; + xPathSettings->getPropertyValue( u"Work"_ustr ) >>= sPathUrl; // Path could be a multipath, Microsoft doesn't support this feature in Word currently. // Only the last path is from interest. sal_Int32 nIndex = sPathUrl.lastIndexOf( ';' ); @@ -583,7 +583,7 @@ SwVbaDocument::SaveAs2000( const uno::Any& FileName, const uno::Any& FileFormat, sal_Int32 nFileFormat = word::WdSaveFormat::wdFormatDocument; FileFormat >>= nFileFormat; - uno::Sequence storeProps{ comphelper::makePropertyValue("FilterName", uno::Any()) }; + uno::Sequence storeProps{ comphelper::makePropertyValue(u"FilterName"_ustr, uno::Any()) }; setFilterPropsFromFormat( nFileFormat, storeProps ); @@ -611,8 +611,8 @@ SwVbaDocument::SavePreviewPngAs( const uno::Any& FileName ) OUString sURL; osl::FileBase::getFileURLFromSystemPath( sFileName, sURL ); - uno::Sequence storeProps{ comphelper::makePropertyValue("FilterName", - OUString("writer_png_Export")) }; + uno::Sequence storeProps{ comphelper::makePropertyValue(u"FilterName"_ustr, + u"writer_png_Export"_ustr) }; uno::Reference< frame::XStorable > xStor( getModel(), uno::UNO_QUERY_THROW ); xStor->storeToURL( sURL, storeProps ); @@ -666,7 +666,7 @@ SwVbaDocument::getValue( const OUString& aPropertyName ) uno::Reference< drawing::XControlShape > xControlShape( getControlShape( aPropertyName ), uno::UNO_QUERY_THROW ); uno::Reference<lang::XMultiComponentFactory > xServiceManager( mxContext->getServiceManager(), uno::UNO_SET_THROW ); - uno::Reference< XControlProvider > xControlProvider( xServiceManager->createInstanceWithContext("ooo.vba.ControlProvider", mxContext ), uno::UNO_QUERY_THROW ); + uno::Reference< XControlProvider > xControlProvider( xServiceManager->createInstanceWithContext(u"ooo.vba.ControlProvider"_ustr, mxContext ), uno::UNO_QUERY_THROW ); uno::Reference< msforms::XControl > xControl( xControlProvider->createControl( xControlShape, getModel() ) ); return uno::Any( xControl ); } @@ -711,7 +711,7 @@ SwVbaDocument::getFormControls() const OUString SAL_CALL SwVbaDocument::getIID() { - return "{82154424-0FBF-11d4-8313-005004526AB4}"; + return u"{82154424-0FBF-11d4-8313-005004526AB4}"_ustr; } // XConnectable @@ -719,7 +719,7 @@ SwVbaDocument::getIID() OUString SAL_CALL SwVbaDocument::GetIIDForClassItselfNotCoclass() { - return "{82154428-0FBF-11D4-8313-005004526AB4}"; + return u"{82154428-0FBF-11D4-8313-005004526AB4}"_ustr; } TypeAndIID SAL_CALL @@ -727,7 +727,7 @@ SwVbaDocument::GetConnectionPoint() { TypeAndIID aResult = { cppu::UnoType<word::XDocumentOutgoing>::get(), - "{82154429-0FBF-11D4-8313-005004526AB4}" + u"{82154429-0FBF-11D4-8313-005004526AB4}"_ustr }; return aResult; @@ -778,7 +778,7 @@ SwVbaDocument::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.word.Document" + u"ooo.vba.word.Document"_ustr }; return aServiceNames; } diff --git a/sw/source/ui/vba/vbadocumentproperties.cxx b/sw/source/ui/vba/vbadocumentproperties.cxx index 6d5f06830f47..3cdeba36e5ac 100644 --- a/sw/source/ui/vba/vbadocumentproperties.cxx +++ b/sw/source/ui/vba/vbadocumentproperties.cxx @@ -463,7 +463,7 @@ public: virtual OUString SAL_CALL getLinkSource( ) override; virtual void SAL_CALL setLinkSource( const OUString& LinkSource ) override; //XDefaultProperty - virtual OUString SAL_CALL getDefaultPropertyName( ) override { return "Value"; } + virtual OUString SAL_CALL getDefaultPropertyName( ) override { return u"Value"_ustr; } // XHelperInterface virtual OUString getServiceImplName() override; virtual uno::Sequence<OUString> getServiceNames() override; @@ -622,7 +622,7 @@ SwVbaBuiltInDocumentProperty::setLinkSource( const OUString& /*LinkSource*/ ) OUString SwVbaBuiltInDocumentProperty::getServiceImplName() { - return "SwVbaBuiltinDocumentProperty"; + return u"SwVbaBuiltinDocumentProperty"_ustr; } uno::Sequence<OUString> @@ -630,7 +630,7 @@ SwVbaBuiltInDocumentProperty::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.word.DocumentProperty" + u"ooo.vba.word.DocumentProperty"_ustr }; return aServiceNames; } @@ -751,7 +751,7 @@ SwVbaBuiltinDocumentProperties::SwVbaBuiltinDocumentProperties( const uno::Refer uno::Reference< XDocumentProperty > SAL_CALL SwVbaBuiltinDocumentProperties::Add( const OUString& /*Name*/, sal_Bool /*LinkToContent*/, ::sal_Int8 /*Type*/, const uno::Any& /*value*/, const uno::Any& /*LinkSource*/ ) { - throw uno::RuntimeException( "not supported for Builtin properties" ); + throw uno::RuntimeException( u"not supported for Builtin properties"_ustr ); } // XEnumerationAccess @@ -780,7 +780,7 @@ SwVbaBuiltinDocumentProperties::createCollectionObject( const uno::Any& aSource OUString SwVbaBuiltinDocumentProperties::getServiceImplName() { - return "SwVbaBuiltinDocumentProperties"; + return u"SwVbaBuiltinDocumentProperties"_ustr; } uno::Sequence<OUString> @@ -788,7 +788,7 @@ SwVbaBuiltinDocumentProperties::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.word.DocumentProperties" + u"ooo.vba.word.DocumentProperties"_ustr }; return aServiceNames; } @@ -915,7 +915,7 @@ SwVbaCustomDocumentProperties::Add( const OUString& Name, sal_Bool LinkToContent OUString SwVbaCustomDocumentProperties::getServiceImplName() { - return "SwVbaCustomDocumentProperties"; + return u"SwVbaCustomDocumentProperties"_ustr; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/vba/vbadocuments.cxx b/sw/source/ui/vba/vbadocuments.cxx index ca5f2985553f..47fdce3cf913 100644 --- a/sw/source/ui/vba/vbadocuments.cxx +++ b/sw/source/ui/vba/vbadocuments.cxx @@ -145,7 +145,7 @@ SwVbaDocuments::OpenOld( const OUString& FileName, const uno::Any& ConfirmConver OUString SwVbaDocuments::getServiceImplName() { - return "SwVbaDocuments"; + return u"SwVbaDocuments"_ustr; } uno::Sequence<OUString> @@ -153,7 +153,7 @@ SwVbaDocuments::getServiceNames() { static uno::Sequence< OUString > const sNames { - "ooo.vba.word.Documents" + u"ooo.vba.word.Documents"_ustr }; return sNames; } diff --git a/sw/source/ui/vba/vbaeventshelper.cxx b/sw/source/ui/vba/vbaeventshelper.cxx index d928eaba16f2..de1ff39c0a93 100644 --- a/sw/source/ui/vba/vbaeventshelper.cxx +++ b/sw/source/ui/vba/vbaeventshelper.cxx @@ -66,13 +66,13 @@ OUString SwVbaEventsHelper::implGetDocumentModuleName( const EventHandlerInfo& / const uno::Sequence< uno::Any >& /*rArgs*/ ) const { // TODO: get actual codename from document - return "ThisDocument"; + return u"ThisDocument"_ustr; } // XServiceInfo OUString SwVbaEventsHelper::getImplementationName() { - return "SwVbaEventsHelper"; + return u"SwVbaEventsHelper"_ustr; } sal_Bool SwVbaEventsHelper::supportsService( const OUString& ServiceName ) { @@ -80,7 +80,7 @@ sal_Bool SwVbaEventsHelper::supportsService( const OUString& ServiceName ) } css::uno::Sequence< OUString > SwVbaEventsHelper::getSupportedServiceNames() { - return { "com.sun.star.script.vba.VBATextEventProcessor" }; + return { u"com.sun.star.script.vba.VBATextEventProcessor"_ustr }; } diff --git a/sw/source/ui/vba/vbafield.cxx b/sw/source/ui/vba/vbafield.cxx index ded84a6d8b21..75e5ee5ce965 100644 --- a/sw/source/ui/vba/vbafield.cxx +++ b/sw/source/ui/vba/vbafield.cxx @@ -54,7 +54,7 @@ sal_Bool SAL_CALL SwVbaField::Update() OUString SwVbaField::getServiceImplName() { - return "SwVbaField"; + return u"SwVbaField"_ustr; } uno::Sequence<OUString> @@ -62,7 +62,7 @@ SwVbaField::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.word.Field" + u"ooo.vba.word.Field"_ustr }; return aServiceNames; } @@ -337,7 +337,7 @@ SwVbaFields::Add( const css::uno::Reference< ::ooo::vba::word::XRange >& Range, } else { - throw uno::RuntimeException("Not implemented" ); + throw uno::RuntimeException(u"Not implemented"_ustr ); } SwVbaRange& rVbaRange = dynamic_cast<SwVbaRange&>(*Range); @@ -349,7 +349,7 @@ SwVbaFields::Add( const css::uno::Reference< ::ooo::vba::word::XRange >& Range, uno::Reference< text::XTextField > SwVbaFields::Create_Field_FileName( const OUString& _text ) { - uno::Reference< text::XTextField > xTextField( mxMSF->createInstance("com.sun.star.text.TextField.FileName"), uno::UNO_QUERY_THROW ); + uno::Reference< text::XTextField > xTextField( mxMSF->createInstance(u"com.sun.star.text.TextField.FileName"_ustr), uno::UNO_QUERY_THROW ); sal_Int16 nFileFormat = text::FilenameDisplayFormat::NAME_AND_EXT; if( !_text.isEmpty() ) { @@ -374,7 +374,7 @@ uno::Reference< text::XTextField > SwVbaFields::Create_Field_FileName( const OUS } uno::Reference< beans::XPropertySet > xProps( xTextField, uno::UNO_QUERY_THROW ); - xProps->setPropertyValue("FileFormat", uno::Any( nFileFormat ) ); + xProps->setPropertyValue(u"FileFormat"_ustr, uno::Any( nFileFormat ) ); return xTextField; } @@ -466,7 +466,7 @@ uno::Reference< text::XTextField > SwVbaFields::Create_Field_DocProperty( const } else if( sFieldService.isEmpty() ) { - throw uno::RuntimeException("Not implemented" ); + throw uno::RuntimeException(u"Not implemented"_ustr ); } uno::Reference< text::XTextField > xTextField( mxMSF->createInstance( sFieldService ), uno::UNO_QUERY_THROW ); @@ -474,7 +474,7 @@ uno::Reference< text::XTextField > SwVbaFields::Create_Field_DocProperty( const if( bCustom ) { uno::Reference< beans::XPropertySet > xProps( xTextField, uno::UNO_QUERY_THROW ); - xProps->setPropertyValue("Name", uno::Any( aDocProperty ) ); + xProps->setPropertyValue(u"Name"_ustr, uno::Any( aDocProperty ) ); } return xTextField; @@ -515,7 +515,7 @@ sal_Int32 SAL_CALL SwVbaFields::Update() OUString SwVbaFields::getServiceImplName() { - return "SwVbaFields"; + return u"SwVbaFields"_ustr; } // XEnumerationAccess @@ -530,7 +530,7 @@ SwVbaFields::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.word.Fields" + u"ooo.vba.word.Fields"_ustr }; return aServiceNames; } diff --git a/sw/source/ui/vba/vbafilterpropsfromformat.hxx b/sw/source/ui/vba/vbafilterpropsfromformat.hxx index cde1da0b4dc0..f6b17dd98698 100644 --- a/sw/source/ui/vba/vbafilterpropsfromformat.hxx +++ b/sw/source/ui/vba/vbafilterpropsfromformat.hxx @@ -40,7 +40,7 @@ inline bool setFilterPropsFromFormat(sal_Int32 nFormat, switch (nFormat) { case ooo::vba::word::WdSaveFormat::wdFormatDocument: - pProp->Value <<= OUString("MS Word 97"); + pProp->Value <<= u"MS Word 97"_ustr; break; // Just save all the text formats as "Text" case ooo::vba::word::WdSaveFormat::wdFormatDOSText: @@ -48,22 +48,22 @@ inline bool setFilterPropsFromFormat(sal_Int32 nFormat, case ooo::vba::word::WdSaveFormat::wdFormatEncodedText: case ooo::vba::word::WdSaveFormat::wdFormatText: case ooo::vba::word::WdSaveFormat::wdFormatTextLineBreaks: - pProp->Value <<= OUString("Text"); + pProp->Value <<= u"Text"_ustr; break; case ooo::vba::word::WdSaveFormat::wdFormatFilteredHTML: case ooo::vba::word::WdSaveFormat::wdFormatHTML: - pProp->Value <<= OUString("HTML"); + pProp->Value <<= u"HTML"_ustr; break; case ooo::vba::word::WdSaveFormat::wdFormatRTF: - pProp->Value <<= OUString("Rich Text Format"); + pProp->Value <<= u"Rich Text Format"_ustr; break; case ooo::vba::word::WdSaveFormat::wdFormatTemplate: - pProp->Value <<= OUString("MS Word 97 Vorlage"); + pProp->Value <<= u"MS Word 97 Vorlage"_ustr; break; // Default to "MS Word 97" default: - pProp->Value <<= OUString("MS Word 97"); + pProp->Value <<= u"MS Word 97"_ustr; break; } return true; diff --git a/sw/source/ui/vba/vbafind.cxx b/sw/source/ui/vba/vbafind.cxx index 892e062f3cdf..bd80d19c4fba 100644 --- a/sw/source/ui/vba/vbafind.cxx +++ b/sw/source/ui/vba/vbafind.cxx @@ -212,20 +212,20 @@ uno::Any SAL_CALL SwVbaFind::getReplacement() void SAL_CALL SwVbaFind::setReplacement( const uno::Any& /*_replacement */ ) { - throw uno::RuntimeException("Not implemented" ); + throw uno::RuntimeException(u"Not implemented"_ustr ); } sal_Bool SAL_CALL SwVbaFind::getForward() { bool bBackward = false; - mxPropertyReplace->getPropertyValue("SearchBackwards") >>= bBackward; + mxPropertyReplace->getPropertyValue(u"SearchBackwards"_ustr) >>= bBackward; return !bBackward; } void SAL_CALL SwVbaFind::setForward( sal_Bool _forward ) { bool bBackward = !_forward; - mxPropertyReplace->setPropertyValue("SearchBackwards", uno::Any( bBackward ) ); + mxPropertyReplace->setPropertyValue(u"SearchBackwards"_ustr, uno::Any( bBackward ) ); } ::sal_Int32 SAL_CALL SwVbaFind::getWrap() @@ -253,76 +253,76 @@ void SAL_CALL SwVbaFind::setFormat( sal_Bool _format ) sal_Bool SAL_CALL SwVbaFind::getMatchCase() { bool value = false; - mxPropertyReplace->getPropertyValue("SearchCaseSensitive") >>= value; + mxPropertyReplace->getPropertyValue(u"SearchCaseSensitive"_ustr) >>= value; return value; } void SAL_CALL SwVbaFind::setMatchCase( sal_Bool _matchcase ) { - mxPropertyReplace->setPropertyValue("SearchCaseSensitive", uno::Any( _matchcase ) ); + mxPropertyReplace->setPropertyValue(u"SearchCaseSensitive"_ustr, uno::Any( _matchcase ) ); } sal_Bool SAL_CALL SwVbaFind::getMatchWholeWord() { bool value = false; - mxPropertyReplace->getPropertyValue("SearchWords") >>= value; + mxPropertyReplace->getPropertyValue(u"SearchWords"_ustr) >>= value; return value; } void SAL_CALL SwVbaFind::setMatchWholeWord( sal_Bool _matchwholeword ) { - mxPropertyReplace->setPropertyValue("SearchWords", uno::Any( _matchwholeword ) ); + mxPropertyReplace->setPropertyValue(u"SearchWords"_ustr, uno::Any( _matchwholeword ) ); } sal_Bool SAL_CALL SwVbaFind::getMatchWildcards() { bool value = false; - mxPropertyReplace->getPropertyValue("SearchRegularExpression") >>= value; + mxPropertyReplace->getPropertyValue(u"SearchRegularExpression"_ustr) >>= value; return value; } void SAL_CALL SwVbaFind::setMatchWildcards( sal_Bool _matchwildcards ) { - mxPropertyReplace->setPropertyValue("SearchRegularExpression", uno::Any( _matchwildcards ) ); + mxPropertyReplace->setPropertyValue(u"SearchRegularExpression"_ustr, uno::Any( _matchwildcards ) ); } sal_Bool SAL_CALL SwVbaFind::getMatchSoundsLike() { bool value = false; - mxPropertyReplace->getPropertyValue("SearchSimilarity") >>= value; + mxPropertyReplace->getPropertyValue(u"SearchSimilarity"_ustr) >>= value; return value; } void SAL_CALL SwVbaFind::setMatchSoundsLike( sal_Bool _matchsoundslike ) { // seems not accurate - mxPropertyReplace->setPropertyValue("SearchSimilarity", uno::Any( _matchsoundslike ) ); + mxPropertyReplace->setPropertyValue(u"SearchSimilarity"_ustr, uno::Any( _matchsoundslike ) ); } sal_Bool SAL_CALL SwVbaFind::getMatchAllWordForms() { bool value = false; - mxPropertyReplace->getPropertyValue("SearchSimilarity") >>= value; + mxPropertyReplace->getPropertyValue(u"SearchSimilarity"_ustr) >>= value; if( value ) - mxPropertyReplace->getPropertyValue("SearchSimilarityRelax") >>= value; + mxPropertyReplace->getPropertyValue(u"SearchSimilarityRelax"_ustr) >>= value; return value; } void SAL_CALL SwVbaFind::setMatchAllWordForms( sal_Bool _matchallwordforms ) { // seems not accurate - mxPropertyReplace->setPropertyValue("SearchSimilarity", uno::Any( _matchallwordforms ) ); - mxPropertyReplace->setPropertyValue("SearchSimilarityRelax", uno::Any( _matchallwordforms ) ); + mxPropertyReplace->setPropertyValue(u"SearchSimilarity"_ustr, uno::Any( _matchallwordforms ) ); + mxPropertyReplace->setPropertyValue(u"SearchSimilarityRelax"_ustr, uno::Any( _matchallwordforms ) ); } uno::Any SAL_CALL SwVbaFind::getStyle() { - throw uno::RuntimeException("Not implemented" ); + throw uno::RuntimeException(u"Not implemented"_ustr ); } void SAL_CALL SwVbaFind::setStyle( const uno::Any& /*_style */ ) { - throw uno::RuntimeException("Not implemented" ); + throw uno::RuntimeException(u"Not implemented"_ustr ); } sal_Bool SAL_CALL @@ -415,7 +415,7 @@ SwVbaFind::ClearFormatting( ) OUString SwVbaFind::getServiceImplName() { - return "SwVbaFind"; + return u"SwVbaFind"_ustr; } uno::Sequence< OUString > @@ -423,7 +423,7 @@ SwVbaFind::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.word.Find" + u"ooo.vba.word.Find"_ustr }; return aServiceNames; } diff --git a/sw/source/ui/vba/vbafont.cxx b/sw/source/ui/vba/vbafont.cxx index 91a31ec66470..2fec9d3b0ba0 100644 --- a/sw/source/ui/vba/vbafont.cxx +++ b/sw/source/ui/vba/vbafont.cxx @@ -82,7 +82,7 @@ private: public: static OUString propName() { - return "CharUnderline"; + return u"CharUnderline"_ustr; } static UnderLineMapper& instance() @@ -139,7 +139,7 @@ SwVbaFont::setUnderline( const uno::Any& _underline ) OUString SwVbaFont::getServiceImplName() { - return "SwVbaFont"; + return u"SwVbaFont"_ustr; } uno::Any SAL_CALL @@ -227,7 +227,7 @@ SwVbaFont::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.word.Font" + u"ooo.vba.word.Font"_ustr }; return aServiceNames; } diff --git a/sw/source/ui/vba/vbaformfield.cxx b/sw/source/ui/vba/vbaformfield.cxx index cb1351fa74b9..faecbd60f9b9 100644 --- a/sw/source/ui/vba/vbaformfield.cxx +++ b/sw/source/ui/vba/vbaformfield.cxx @@ -132,7 +132,7 @@ uno::Reference<word::XRange> SwVbaFormField::Range() return xRet; } -OUString SwVbaFormField::getDefaultPropertyName() { return "Type"; } +OUString SwVbaFormField::getDefaultPropertyName() { return u"Type"_ustr; } sal_Int32 SwVbaFormField::getType() { @@ -169,25 +169,25 @@ void SwVbaFormField::setEnabled(sal_Bool /*bSet*/) OUString SwVbaFormField::getEntryMacro() { OUString sMacro; - (*m_rFormField.GetParameters())["EntryMacro"] >>= sMacro; + (*m_rFormField.GetParameters())[u"EntryMacro"_ustr] >>= sMacro; return sMacro; } void SwVbaFormField::setEntryMacro(const OUString& rSet) { - (*m_rFormField.GetParameters())["EntryMacro"] <<= rSet; + (*m_rFormField.GetParameters())[u"EntryMacro"_ustr] <<= rSet; } OUString SwVbaFormField::getExitMacro() { OUString sMacro; - (*m_rFormField.GetParameters())["ExitMacro"] >>= sMacro; + (*m_rFormField.GetParameters())[u"ExitMacro"_ustr] >>= sMacro; return sMacro; } void SwVbaFormField::setExitMacro(const OUString& rSet) { - (*m_rFormField.GetParameters())["ExitMacro"] <<= rSet; + (*m_rFormField.GetParameters())[u"ExitMacro"_ustr] <<= rSet; } OUString SwVbaFormField::getHelpText() { return m_rFormField.GetFieldHelptext(); } @@ -217,7 +217,7 @@ OUString SwVbaFormField::getResult() { return m_rFormField.GetContent(); } void SwVbaFormField::setResult(const OUString& rSet) { if (dynamic_cast<sw::mark::ICheckboxFieldmark*>(&m_rFormField)) - m_rFormField.ReplaceContent("false"); + m_rFormField.ReplaceContent(u"false"_ustr); else m_rFormField.ReplaceContent(rSet); } @@ -244,11 +244,11 @@ void SwVbaFormField::setOwnStatus(sal_Bool /*bSet*/) SAL_INFO("sw.vba", "SwVbaFormField::setOwnStatus stub"); } -OUString SwVbaFormField::getServiceImplName() { return "SwVbaFormField"; } +OUString SwVbaFormField::getServiceImplName() { return u"SwVbaFormField"_ustr; } uno::Sequence<OUString> SwVbaFormField::getServiceNames() { - static uno::Sequence<OUString> const aServiceNames{ "ooo.vba.word.FormField" }; + static uno::Sequence<OUString> const aServiceNames{ u"ooo.vba.word.FormField"_ustr }; return aServiceNames; } diff --git a/sw/source/ui/vba/vbaformfieldcheckbox.cxx b/sw/source/ui/vba/vbaformfieldcheckbox.cxx index 5a32e7e426a4..caf9d96397e8 100644 --- a/sw/source/ui/vba/vbaformfieldcheckbox.cxx +++ b/sw/source/ui/vba/vbaformfieldcheckbox.cxx @@ -31,7 +31,7 @@ SwVbaFormFieldCheckBox::SwVbaFormFieldCheckBox( SwVbaFormFieldCheckBox::~SwVbaFormFieldCheckBox() {} -OUString SwVbaFormFieldCheckBox::getDefaultPropertyName() { return "Valid"; } +OUString SwVbaFormFieldCheckBox::getDefaultPropertyName() { return u"Valid"_ustr; } sal_Bool SwVbaFormFieldCheckBox::getValid() { @@ -106,11 +106,11 @@ void SwVbaFormFieldCheckBox::setValue(sal_Bool bSet) m_pCheckBox->SetChecked(bSet); } -OUString SwVbaFormFieldCheckBox::getServiceImplName() { return "SwVbaFormFieldCheckBox"; } +OUString SwVbaFormFieldCheckBox::getServiceImplName() { return u"SwVbaFormFieldCheckBox"_ustr; } uno::Sequence<OUString> SwVbaFormFieldCheckBox::getServiceNames() { - static uno::Sequence<OUString> const aServiceNames{ "ooo.vba.word.CheckBox" }; + static uno::Sequence<OUString> const aServiceNames{ u"ooo.vba.word.CheckBox"_ustr }; return aServiceNames; } diff --git a/sw/source/ui/vba/vbaformfielddropdown.cxx b/sw/source/ui/vba/vbaformfielddropdown.cxx index f1edc8140357..08648fb05065 100644 --- a/sw/source/ui/vba/vbaformfielddropdown.cxx +++ b/sw/source/ui/vba/vbaformfielddropdown.cxx @@ -32,7 +32,7 @@ SwVbaFormFieldDropDown::SwVbaFormFieldDropDown( SwVbaFormFieldDropDown::~SwVbaFormFieldDropDown() {} -OUString SwVbaFormFieldDropDown::getDefaultPropertyName() { return "Valid"; } +OUString SwVbaFormFieldDropDown::getDefaultPropertyName() { return u"Valid"_ustr; } sal_Bool SwVbaFormFieldDropDown::getValid() { @@ -88,11 +88,11 @@ uno::Any SwVbaFormFieldDropDown::ListEntries(const uno::Any& rIndex) return uno::Any(xCol); } -OUString SwVbaFormFieldDropDown::getServiceImplName() { return "SwVbaFormFieldDropDown"; } +OUString SwVbaFormFieldDropDown::getServiceImplName() { return u"SwVbaFormFieldDropDown"_ustr; } uno::Sequence<OUString> SwVbaFormFieldDropDown::getServiceNames() { - static uno::Sequence<OUString> const aServiceNames{ "ooo.vba.word.DropDown" }; + static uno::Sequence<OUString> const aServiceNames{ u"ooo.vba.word.DropDown"_ustr }; return aServiceNames; } diff --git a/sw/source/ui/vba/vbaformfielddropdownlistentries.cxx b/sw/source/ui/vba/vbaformfielddropdownlistentries.cxx index aba385aef820..6f77079e1b6d 100644 --- a/sw/source/ui/vba/vbaformfielddropdownlistentries.cxx +++ b/sw/source/ui/vba/vbaformfielddropdownlistentries.cxx @@ -150,12 +150,12 @@ uno::Any SwVbaFormFieldDropDownListEntries::createCollectionObject(const uno::An OUString SwVbaFormFieldDropDownListEntries::getServiceImplName() { - return "SwVbaFormFieldDropDownListEntries"; + return u"SwVbaFormFieldDropDownListEntries"_ustr; } uno::Sequence<OUString> SwVbaFormFieldDropDownListEntries::getServiceNames() { - static uno::Sequence<OUString> const sNames{ "ooo.vba.word.ListEntries" }; + static uno::Sequence<OUString> const sNames{ u"ooo.vba.word.ListEntries"_ustr }; return sNames; } diff --git a/sw/source/ui/vba/vbaformfielddropdownlistentry.cxx b/sw/source/ui/vba/vbaformfielddropdownlistentry.cxx index bc02439ed5fd..10d58e113eb7 100644 --- a/sw/source/ui/vba/vbaformfielddropdownlistentry.cxx +++ b/sw/source/ui/vba/vbaformfielddropdownlistentry.cxx @@ -44,12 +44,12 @@ void SwVbaFormFieldDropDownListEntry::Delete() { m_rDropDown.DelContent(m_nZInde // XHelperInterface OUString SwVbaFormFieldDropDownListEntry::getServiceImplName() { - return "SwVbaFormFieldDropDownListEntry"; + return u"SwVbaFormFieldDropDownListEntry"_ustr; } uno::Sequence<OUString> SwVbaFormFieldDropDownListEntry::getServiceNames() { - static uno::Sequence<OUString> const aServiceNames{ "ooo.vba.word.ListEntry" }; + static uno::Sequence<OUString> const aServiceNames{ u"ooo.vba.word.ListEntry"_ustr }; return aServiceNames; } diff --git a/sw/source/ui/vba/vbaformfields.cxx b/sw/source/ui/vba/vbaformfields.cxx index 9c8af450d345..426bb78a53c8 100644 --- a/sw/source/ui/vba/vbaformfields.cxx +++ b/sw/source/ui/vba/vbaformfields.cxx @@ -224,11 +224,11 @@ uno::Reference<container::XEnumeration> SwVbaFormFields::createEnumeration() uno::Any SwVbaFormFields::createCollectionObject(const uno::Any& aSource) { return aSource; } -OUString SwVbaFormFields::getServiceImplName() { return "SwVbaFormFields"; } +OUString SwVbaFormFields::getServiceImplName() { return u"SwVbaFormFields"_ustr; } uno::Sequence<OUString> SwVbaFormFields::getServiceNames() { - static uno::Sequence<OUString> const sNames{ "ooo.vba.word.FormFields" }; + static uno::Sequence<OUString> const sNames{ u"ooo.vba.word.FormFields"_ustr }; return sNames; } diff --git a/sw/source/ui/vba/vbaformfieldtextinput.cxx b/sw/source/ui/vba/vbaformfieldtextinput.cxx index 4f78761f4eb1..c4188491ca3f 100644 --- a/sw/source/ui/vba/vbaformfieldtextinput.cxx +++ b/sw/source/ui/vba/vbaformfieldtextinput.cxx @@ -33,7 +33,7 @@ SwVbaFormFieldTextInput::SwVbaFormFieldTextInput( SwVbaFormFieldTextInput::~SwVbaFormFieldTextInput() {} -OUString SwVbaFormFieldTextInput::getDefaultPropertyName() { return "Valid"; } +OUString SwVbaFormFieldTextInput::getDefaultPropertyName() { return u"Valid"_ustr; } sal_Bool SwVbaFormFieldTextInput::getValid() { @@ -102,7 +102,7 @@ void SwVbaFormFieldTextInput::Clear() if (!getValid() || m_rTextInput.GetContent().isEmpty()) return; - m_rTextInput.ReplaceContent(""); + m_rTextInput.ReplaceContent(u""_ustr); } void SwVbaFormFieldTextInput::EditType(sal_Int32 nType, const uno::Any& rDefault, @@ -119,11 +119,11 @@ void SwVbaFormFieldTextInput::EditType(sal_Int32 nType, const uno::Any& rDefault << "] bEnabled[" << bEnabled << "] stub"); } -OUString SwVbaFormFieldTextInput::getServiceImplName() { return "SwVbaFormFieldTextInput"; } +OUString SwVbaFormFieldTextInput::getServiceImplName() { return u"SwVbaFormFieldTextInput"_ustr; } uno::Sequence<OUString> SwVbaFormFieldTextInput::getServiceNames() { - static uno::Sequence<OUString> const aServiceNames{ "ooo.vba.word.TextInput" }; + static uno::Sequence<OUString> const aServiceNames{ u"ooo.vba.word.TextInput"_ustr }; return aServiceNames; } diff --git a/sw/source/ui/vba/vbaframe.cxx b/sw/source/ui/vba/vbaframe.cxx index b3a0180fb1d5..009fdec250a7 100644 --- a/sw/source/ui/vba/vbaframe.cxx +++ b/sw/source/ui/vba/vbaframe.cxx @@ -42,7 +42,7 @@ void SAL_CALL SwVbaFrame::Select() OUString SwVbaFrame::getServiceImplName() { - return "SwVbaFrame"; + return u"SwVbaFrame"_ustr; } uno::Sequence< OUString > @@ -50,7 +50,7 @@ SwVbaFrame::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.word.Frame" + u"ooo.vba.word.Frame"_ustr }; return aServiceNames; } diff --git a/sw/source/ui/vba/vbaframes.cxx b/sw/source/ui/vba/vbaframes.cxx index 376082054b18..ff15f17f6827 100644 --- a/sw/source/ui/vba/vbaframes.cxx +++ b/sw/source/ui/vba/vbaframes.cxx @@ -84,7 +84,7 @@ SwVbaFrames::createCollectionObject( const css::uno::Any& aSource ) OUString SwVbaFrames::getServiceImplName() { - return "SwVbaFrames"; + return u"SwVbaFrames"_ustr; } css::uno::Sequence<OUString> @@ -92,7 +92,7 @@ SwVbaFrames::getServiceNames() { static uno::Sequence< OUString > const sNames { - "ooo.vba.word.Frames" + u"ooo.vba.word.Frames"_ustr }; return sNames; } diff --git a/sw/source/ui/vba/vbaglobals.cxx b/sw/source/ui/vba/vbaglobals.cxx index 3e9f7dbefef0..e6c585576345 100644 --- a/sw/source/ui/vba/vbaglobals.cxx +++ b/sw/source/ui/vba/vbaglobals.cxx @@ -193,13 +193,13 @@ float SAL_CALL SwVbaGlobals::PointsToPicas( float Points ) OUString SwVbaGlobals::getServiceImplName() { - return "SwVbaGlobals"; + return u"SwVbaGlobals"_ustr; } uno::Sequence< OUString > SwVbaGlobals::getServiceNames() { - return { "ooo.vba.word.Globals" }; + return { u"ooo.vba.word.Globals"_ustr }; } uno::Sequence< OUString > @@ -207,10 +207,10 @@ SwVbaGlobals::getAvailableServiceNames( ) { static const uno::Sequence<OUString> serviceNames = comphelper::concatSequences( SwVbaGlobals_BASE::getAvailableServiceNames(), - uno::Sequence<OUString>{ "ooo.vba.word.Document", + uno::Sequence<OUString>{ u"ooo.vba.word.Document"_ustr, // "ooo.vba.word.Globals", // "ooo.vba.word.WrapFormat", - "com.sun.star.script.vba.VBATextEventProcessor" }); + u"com.sun.star.script.vba.VBATextEventProcessor"_ustr }); return serviceNames; } diff --git a/sw/source/ui/vba/vbaheaderfooter.cxx b/sw/source/ui/vba/vbaheaderfooter.cxx index a031b0ecdaab..9b25ce7bb52c 100644 --- a/sw/source/ui/vba/vbaheaderfooter.cxx +++ b/sw/source/ui/vba/vbaheaderfooter.cxx @@ -86,7 +86,7 @@ SwVbaHeaderFooter::Shapes( const uno::Any& index ) OUString SwVbaHeaderFooter::getServiceImplName() { - return "SwVbaHeaderFooter"; + return u"SwVbaHeaderFooter"_ustr; } uno::Sequence< OUString > @@ -94,7 +94,7 @@ SwVbaHeaderFooter::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.word.Pane" + u"ooo.vba.word.Pane"_ustr }; return aServiceNames; } diff --git a/sw/source/ui/vba/vbaheaderfooterhelper.cxx b/sw/source/ui/vba/vbaheaderfooterhelper.cxx index 987088b6a5ad..11f93f456b7c 100644 --- a/sw/source/ui/vba/vbaheaderfooterhelper.cxx +++ b/sw/source/ui/vba/vbaheaderfooterhelper.cxx @@ -48,11 +48,11 @@ bool HeaderFooterHelper::isHeader( const uno::Reference< frame::XModel >& xModel if( !isHeaderFooter( xCurrentText ) ) return false; - OUString aPropText = "HeaderText"; + OUString aPropText = u"HeaderText"_ustr; uno::Reference< style::XStyle > xPageStyle = word::getCurrentPageStyle( xModel ); uno::Reference< beans::XPropertySet > xPageProps( xPageStyle, uno::UNO_QUERY_THROW ); bool isShared = true; - xPageProps->getPropertyValue( "HeaderIsShared" ) >>= isShared; + xPageProps->getPropertyValue( u"HeaderIsShared"_ustr ) >>= isShared; if( !isShared ) { uno::Reference< text::XPageCursor > xPageCursor( word::getXTextViewCursor( xModel ), uno::UNO_QUERY_THROW ); @@ -97,7 +97,7 @@ bool HeaderFooterHelper::isEvenPagesHeader( const uno::Reference< frame::XModel { uno::Reference< beans::XPropertySet > xStyleProps( word::getCurrentPageStyle( xModel ), uno::UNO_QUERY_THROW ); bool isShared = false; - xStyleProps->getPropertyValue("HeaderIsShared") >>= isShared; + xStyleProps->getPropertyValue(u"HeaderIsShared"_ustr) >>= isShared; if( !isShared ) { uno::Reference< text::XPageCursor > xPageCursor( word::getXTextViewCursor( xModel ), uno::UNO_QUERY_THROW ); @@ -113,11 +113,11 @@ bool HeaderFooterHelper::isFooter( const uno::Reference< frame::XModel >& xModel if( !isHeaderFooter( xCurrentText ) ) return false; - OUString aPropText = "FooterText"; + OUString aPropText = u"FooterText"_ustr; uno::Reference< style::XStyle > xPageStyle = word::getCurrentPageStyle( xModel ); uno::Reference< beans::XPropertySet > xPageProps( xPageStyle, uno::UNO_QUERY_THROW ); bool isShared = true; - xPageProps->getPropertyValue( "FooterIsShared" ) >>= isShared; + xPageProps->getPropertyValue( u"FooterIsShared"_ustr ) >>= isShared; if( !isShared ) { uno::Reference< text::XPageCursor > xPageCursor( word::getXTextViewCursor( xModel ), uno::UNO_QUERY_THROW ); @@ -161,7 +161,7 @@ bool HeaderFooterHelper::isEvenPagesFooter( const uno::Reference< frame::XModel { uno::Reference< beans::XPropertySet > xStyleProps( word::getCurrentPageStyle( xModel ), uno::UNO_QUERY_THROW ); bool isShared = false; - xStyleProps->getPropertyValue("FooterIsShared") >>= isShared; + xStyleProps->getPropertyValue(u"FooterIsShared"_ustr) >>= isShared; if( !isShared ) { uno::Reference< text::XPageCursor > xPageCursor( word::getXTextViewCursor( xModel ), uno::UNO_QUERY_THROW ); diff --git a/sw/source/ui/vba/vbaheadersfooters.cxx b/sw/source/ui/vba/vbaheadersfooters.cxx index be205d8e13db..a683060a1492 100644 --- a/sw/source/ui/vba/vbaheadersfooters.cxx +++ b/sw/source/ui/vba/vbaheadersfooters.cxx @@ -125,7 +125,7 @@ SwVbaHeadersFooters::createCollectionObject( const uno::Any& aSource ) OUString SwVbaHeadersFooters::getServiceImplName() { - return "SwVbaHeadersFooters"; + return u"SwVbaHeadersFooters"_ustr; } uno::Sequence<OUString> @@ -133,7 +133,7 @@ SwVbaHeadersFooters::getServiceNames() { static uno::Sequence< OUString > const sNames { - "ooo.vba.word.HeadersFooters" + u"ooo.vba.word.HeadersFooters"_ustr }; return sNames; } diff --git a/sw/source/ui/vba/vbainformationhelper.cxx b/sw/source/ui/vba/vbainformationhelper.cxx index 9cda14b7b237..a38d7c058acd 100644 --- a/sw/source/ui/vba/vbainformationhelper.cxx +++ b/sw/source/ui/vba/vbainformationhelper.cxx @@ -48,7 +48,7 @@ double SwVbaInformationHelper::handleWdVerticalPositionRelativeToPage( const css xTVCursor->collapseToStart(); uno::Reference< beans::XPropertySet > xStyleProps( word::getCurrentPageStyle( xModel ), uno::UNO_QUERY_THROW ); sal_Int32 nTopMargin = 0; - xStyleProps->getPropertyValue( "TopMargin" ) >>= nTopMargin; + xStyleProps->getPropertyValue( u"TopMargin"_ustr ) >>= nTopMargin; sal_Int32 nCurrentPos = xTVCursor->getPosition().Y; sal_Int32 nCurrentPage = handleWdActiveEndPageNumber( xTVCursor ); diff --git a/sw/source/ui/vba/vbalistformat.cxx b/sw/source/ui/vba/vbalistformat.cxx index efcbf2dbe874..229c9c459e63 100644 --- a/sw/source/ui/vba/vbalistformat.cxx +++ b/sw/source/ui/vba/vbalistformat.cxx @@ -84,16 +84,16 @@ void SAL_CALL SwVbaListFormat::ApplyListTemplate( const css::uno::Reference< wor if( isFirstElement ) { bool isNumberingRestart = !bContinuePreviousList; - xProps->setPropertyValue("ParaIsNumberingRestart", uno::Any( isNumberingRestart ) ); + xProps->setPropertyValue(u"ParaIsNumberingRestart"_ustr, uno::Any( isNumberingRestart ) ); if( isNumberingRestart ) { - xProps->setPropertyValue("NumberingStartValue", uno::Any( sal_Int16(1) ) ); + xProps->setPropertyValue(u"NumberingStartValue"_ustr, uno::Any( sal_Int16(1) ) ); } isFirstElement = false; } else { - xProps->setPropertyValue("ParaIsNumberingRestart", uno::Any( false ) ); + xProps->setPropertyValue(u"ParaIsNumberingRestart"_ustr, uno::Any( false ) ); } rListTemplate.applyListTemplate( xProps ); } @@ -106,11 +106,11 @@ static void addParagraphsToList(const Ref& a, { if (css::uno::Reference<css::lang::XServiceInfo> xInfo{ a, css::uno::UNO_QUERY }) { - if (xInfo->supportsService("com.sun.star.text.Paragraph")) + if (xInfo->supportsService(u"com.sun.star.text.Paragraph"_ustr)) { rList.emplace_back(xInfo, css::uno::UNO_QUERY_THROW); } - else if (xInfo->supportsService("com.sun.star.text.TextTable")) + else if (xInfo->supportsService(u"com.sun.star.text.TextTable"_ustr)) { css::uno::Reference<css::text::XTextTable> xTable(xInfo, css::uno::UNO_QUERY_THROW); const auto aNames = xTable->getCellNames(); @@ -135,7 +135,7 @@ void SAL_CALL SwVbaListFormat::ConvertNumbersToText( ) css::uno::Reference<css::document::XUndoManagerSupplier> xUndoSupplier( xModel, css::uno::UNO_QUERY_THROW); css::uno::Reference<css::document::XUndoManager> xUndoManager(xUndoSupplier->getUndoManager()); - xUndoManager->enterUndoContext("ConvertNumbersToText"); + xUndoManager->enterUndoContext(u"ConvertNumbersToText"_ustr); xModel->lockControllers(); comphelper::ScopeGuard g([xModel, xUndoManager]() { xModel->unlockControllers(); @@ -149,11 +149,11 @@ void SAL_CALL SwVbaListFormat::ConvertNumbersToText( ) for (auto iter = aParagraphs.rbegin(); iter != aParagraphs.rend(); ++iter) { auto& rPropertySet = *iter; - if (bool bNumber; (rPropertySet->getPropertyValue("NumberingIsNumber") >>= bNumber) && bNumber) + if (bool bNumber; (rPropertySet->getPropertyValue(u"NumberingIsNumber"_ustr) >>= bNumber) && bNumber) { css::uno::Reference<css::text::XTextRange> xRange(rPropertySet, css::uno::UNO_QUERY_THROW); OUString sLabelString; - rPropertySet->getPropertyValue("ListLabelString") >>= sLabelString; + rPropertySet->getPropertyValue(u"ListLabelString"_ustr) >>= sLabelString; // sal_Int16 nAdjust = SAL_MAX_INT16; // TODO? sal_Int16 nNumberingType = SAL_MAX_INT16; // css::style::NumberingType sal_Int16 nPositionAndSpaceMode = SAL_MAX_INT16; @@ -172,31 +172,31 @@ void SAL_CALL SwVbaListFormat::ConvertNumbersToText( ) { sal_uInt16 nLevel = SAL_MAX_UINT16; - rPropertySet->getPropertyValue("NumberingLevel") >>= nLevel; + rPropertySet->getPropertyValue(u"NumberingLevel"_ustr) >>= nLevel; css::uno::Reference<css::container::XIndexAccess> xNumberingRules; - rPropertySet->getPropertyValue("NumberingRules") >>= xNumberingRules; + rPropertySet->getPropertyValue(u"NumberingRules"_ustr) >>= xNumberingRules; comphelper::SequenceAsHashMap aLevelRule(xNumberingRules->getByIndex(nLevel)); // See offapi/com/sun/star/text/NumberingLevel.idl - aLevelRule["CharStyleName"] >>= sCharStyleName; - aLevelRule["NumberingType"] >>= nNumberingType; + aLevelRule[u"CharStyleName"_ustr] >>= sCharStyleName; + aLevelRule[u"NumberingType"_ustr] >>= nNumberingType; // TODO: aLevelRule["Adjust"] >>= nAdjust; // HoriOrientation::LEFT/RIGHT/CENTER - aLevelRule["PositionAndSpaceMode"] >>= nPositionAndSpaceMode; + aLevelRule[u"PositionAndSpaceMode"_ustr] >>= nPositionAndSpaceMode; // for css::text::PositionAndSpaceMode::LABEL_ALIGNMENT - aLevelRule["LabelFollowedBy"] >>= nLabelFollowedBy; - aLevelRule["ListtabStopPosition"] >>= nListtabStopPosition; - aLevelRule["FirstLineIndent"] >>= nFirstLineIndent; - aLevelRule["IndentAt"] >>= nIndentAt; + aLevelRule[u"LabelFollowedBy"_ustr] >>= nLabelFollowedBy; + aLevelRule[u"ListtabStopPosition"_ustr] >>= nListtabStopPosition; + aLevelRule[u"FirstLineIndent"_ustr] >>= nFirstLineIndent; + aLevelRule[u"IndentAt"_ustr] >>= nIndentAt; // for css::text::PositionAndSpaceMode::LABEL_WIDTH_AND_POSITION - aLevelRule["LeftMargin"] >>= nLeftMargin; - aLevelRule["SymbolTextDistance"] >>= nSymbolTextDistance; - aLevelRule["FirstLineOffset"] >>= nFirstLineOffset; + aLevelRule[u"LeftMargin"_ustr] >>= nLeftMargin; + aLevelRule[u"SymbolTextDistance"_ustr] >>= nSymbolTextDistance; + aLevelRule[u"FirstLineOffset"_ustr] >>= nFirstLineOffset; - aLevelRule["BulletChar"] >>= sBulletChar; - bHasFont = (aLevelRule["BulletFont"] >>= aBulletFont); - bHasColor = (aLevelRule["BulletColor"] >>= aBulletColor); + aLevelRule[u"BulletChar"_ustr] >>= sBulletChar; + bHasFont = (aLevelRule[u"BulletFont"_ustr] >>= aBulletFont); + bHasColor = (aLevelRule[u"BulletColor"_ustr] >>= aBulletColor); } if (nNumberingType != css::style::NumberingType::BITMAP) // TODO @@ -228,7 +228,7 @@ void SAL_CALL SwVbaListFormat::ConvertNumbersToText( ) css::uno::Reference<css::beans::XPropertySet> xNumberProps( xNumberText, css::uno::UNO_QUERY_THROW); if (!sCharStyleName.isEmpty()) - xNumberProps->setPropertyValue("CharStyleName", css::uno::Any(sCharStyleName)); + xNumberProps->setPropertyValue(u"CharStyleName"_ustr, css::uno::Any(sCharStyleName)); if (nNumberingType == css::style::NumberingType::CHAR_SPECIAL) { @@ -253,11 +253,11 @@ void SAL_CALL SwVbaListFormat::ConvertNumbersToText( ) std::round(aBulletFont.Orientation * 10))) }, }); if (aBulletFont.Height) - aNameValues["CharHeight"] <<= aBulletFont.Height; + aNameValues[u"CharHeight"_ustr] <<= aBulletFont.Height; } if (bHasColor) { - aNameValues["CharColor"] <<= aBulletColor; + aNameValues[u"CharColor"_ustr] <<= aBulletColor; } if (css::uno::Reference<css::beans::XMultiPropertySet> xBulletMultiProps{ @@ -280,17 +280,17 @@ void SAL_CALL SwVbaListFormat::ConvertNumbersToText( ) // TODO: css::style::NumberingType::BITMAP } - rPropertySet->setPropertyValue("ParaLeftMargin", css::uno::Any(nIndentAt)); - rPropertySet->setPropertyValue("ParaFirstLineIndent", css::uno::Any(nFirstLineIndent)); + rPropertySet->setPropertyValue(u"ParaLeftMargin"_ustr, css::uno::Any(nIndentAt)); + rPropertySet->setPropertyValue(u"ParaFirstLineIndent"_ustr, css::uno::Any(nFirstLineIndent)); if (nLabelFollowedBy == SvxNumberFormat::LabelFollowedBy::LISTTAB) { css::uno::Sequence<css::style::TabStop> stops; - rPropertySet->getPropertyValue("ParaTabStops") >>= stops; + rPropertySet->getPropertyValue(u"ParaTabStops"_ustr) >>= stops; css::style::TabStop tabStop{}; tabStop.Position = nListtabStopPosition; tabStop.Alignment = com::sun::star::style::TabAlign::TabAlign_LEFT; tabStop.FillChar = ' '; - rPropertySet->setPropertyValue("ParaTabStops", + rPropertySet->setPropertyValue(u"ParaTabStops"_ustr, css::uno::Any(comphelper::combineSequences({ tabStop }, stops))); // FIXME: What if added tap stop is greater than already defined ones? } @@ -301,9 +301,9 @@ void SAL_CALL SwVbaListFormat::ConvertNumbersToText( ) } // In case of higher outline levels, each assignment of empty value just sets level 1 - while (rPropertySet->getPropertyValue("NumberingRules") != css::uno::Any()) + while (rPropertySet->getPropertyValue(u"NumberingRules"_ustr) != css::uno::Any()) { - rPropertySet->setPropertyValue("NumberingRules", css::uno::Any()); + rPropertySet->setPropertyValue(u"NumberingRules"_ustr, css::uno::Any()); } } } @@ -312,7 +312,7 @@ void SAL_CALL SwVbaListFormat::ConvertNumbersToText( ) OUString SwVbaListFormat::getServiceImplName() { - return "SwVbaListFormat"; + return u"SwVbaListFormat"_ustr; } uno::Sequence< OUString > @@ -320,7 +320,7 @@ SwVbaListFormat::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.word.ListFormat" + u"ooo.vba.word.ListFormat"_ustr }; return aServiceNames; } diff --git a/sw/source/ui/vba/vbalistgalleries.cxx b/sw/source/ui/vba/vbalistgalleries.cxx index 9c047b1b6490..ecc4fd51b883 100644 --- a/sw/source/ui/vba/vbalistgalleries.cxx +++ b/sw/source/ui/vba/vbalistgalleries.cxx @@ -67,7 +67,7 @@ uno::Any SAL_CALL SwVbaListGalleries::Item( const uno::Any& Index1, const uno::A || nIndex == word::WdListGalleryType::wdOutlineNumberGallery ) return uno::Any( uno::Reference< word::XListGallery >( new SwVbaListGallery( this, mxContext, mxTextDocument, nIndex ) ) ); } - throw uno::RuntimeException("Index out of bounds" ); + throw uno::RuntimeException(u"Index out of bounds"_ustr ); } // XEnumerationAccess @@ -92,7 +92,7 @@ SwVbaListGalleries::createCollectionObject( const css::uno::Any& aSource ) OUString SwVbaListGalleries::getServiceImplName() { - return "SwVbaListGalleries"; + return u"SwVbaListGalleries"_ustr; } css::uno::Sequence<OUString> @@ -100,7 +100,7 @@ SwVbaListGalleries::getServiceNames() { static uno::Sequence< OUString > const sNames { - "ooo.vba.word.ListGalleries" + u"ooo.vba.word.ListGalleries"_ustr }; return sNames; } diff --git a/sw/source/ui/vba/vbalistgallery.cxx b/sw/source/ui/vba/vbalistgallery.cxx index 8eae71df8ec2..8869112ad88d 100644 --- a/sw/source/ui/vba/vbalistgallery.cxx +++ b/sw/source/ui/vba/vbalistgallery.cxx @@ -44,7 +44,7 @@ SwVbaListGallery::ListTemplates( const uno::Any& index ) OUString SwVbaListGallery::getServiceImplName() { - return "SwVbaListGallery"; + return u"SwVbaListGallery"_ustr; } uno::Sequence< OUString > @@ -52,7 +52,7 @@ SwVbaListGallery::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.word.ListGallery" + u"ooo.vba.word.ListGallery"_ustr }; return aServiceNames; } diff --git a/sw/source/ui/vba/vbalisthelper.cxx b/sw/source/ui/vba/vbalisthelper.cxx index 4b3ca1304e16..fc915de4dd9d 100644 --- a/sw/source/ui/vba/vbalisthelper.cxx +++ b/sw/source/ui/vba/vbalisthelper.cxx @@ -82,25 +82,25 @@ void SwVbaListHelper::Init() // get the numbering style uno::Reference< style::XStyleFamiliesSupplier > xStyleSupplier( mxTextDocument, uno::UNO_QUERY_THROW ); - mxStyleFamily.set( xStyleSupplier->getStyleFamilies()->getByName("NumberingStyles"), uno::UNO_QUERY_THROW ); + mxStyleFamily.set( xStyleSupplier->getStyleFamilies()->getByName(u"NumberingStyles"_ustr), uno::UNO_QUERY_THROW ); SAL_INFO("sw.vba", "numbering style name: " << msStyleName ); if( mxStyleFamily->hasByName( msStyleName ) ) { mxStyleProps.set( mxStyleFamily->getByName( msStyleName ), uno::UNO_QUERY_THROW ); - mxNumberingRules.set( mxStyleProps->getPropertyValue("NumberingRules"), uno::UNO_QUERY_THROW ); + mxNumberingRules.set( mxStyleProps->getPropertyValue(u"NumberingRules"_ustr), uno::UNO_QUERY_THROW ); } else { // create new numbering style uno::Reference< lang::XMultiServiceFactory > xDocMSF( mxTextDocument, uno::UNO_QUERY_THROW ); - mxStyleProps.set( xDocMSF->createInstance("com.sun.star.style.NumberingStyle"), uno::UNO_QUERY_THROW ); + mxStyleProps.set( xDocMSF->createInstance(u"com.sun.star.style.NumberingStyle"_ustr), uno::UNO_QUERY_THROW ); // insert this style into style family, or the property NumberingRules doesn't exist. mxStyleFamily->insertByName( msStyleName, uno::Any( mxStyleProps ) ); - mxStyleProps->getPropertyValue("NumberingRules") >>= mxNumberingRules; + mxStyleProps->getPropertyValue(u"NumberingRules"_ustr) >>= mxNumberingRules; CreateListTemplate(); - mxStyleProps->setPropertyValue("NumberingRules", uno::Any( mxNumberingRules ) ); + mxStyleProps->setPropertyValue(u"NumberingRules"_ustr, uno::Any( mxNumberingRules ) ); } } @@ -136,7 +136,7 @@ void SwVbaListHelper::CreateBulletListTemplate() sal_Int32 nLevel = 0; uno::Sequence< beans::PropertyValue > aPropertyValues; mxNumberingRules->getByIndex( nLevel ) >>= aPropertyValues; - setOrAppendPropertyValue( aPropertyValues, UNO_NAME_CHAR_STYLE_NAME, uno::Any( OUString( "Bullet Symbols" ) ) ); + setOrAppendPropertyValue( aPropertyValues, UNO_NAME_CHAR_STYLE_NAME, uno::Any( u"Bullet Symbols"_ustr ) ); setOrAppendPropertyValue( aPropertyValues, UNO_NAME_NUMBERING_TYPE, uno::Any( sal_Int16(style::NumberingType::CHAR_SPECIAL) ) ); OUString aBulletChar; @@ -406,7 +406,7 @@ void SwVbaListHelper::CreateOutlineNumberForType3() { mxNumberingRules->getByIndex( nLevel ) >>= aPropertyValues; setOrAppendPropertyValue( aPropertyValues, UNO_NAME_NUMBERING_TYPE, uno::Any( sal_Int16(style::NumberingType::CHAR_SPECIAL) ) ); - setOrAppendPropertyValue( aPropertyValues, UNO_NAME_CHAR_STYLE_NAME, uno::Any( OUString("Bullet Symbols") ) ); + setOrAppendPropertyValue( aPropertyValues, UNO_NAME_CHAR_STYLE_NAME, uno::Any( u"Bullet Symbols"_ustr ) ); switch( nLevel ) { case 0: @@ -637,7 +637,7 @@ void SwVbaListHelper::CreateOutlineNumberForType7() { mxNumberingRules->getByIndex( nLevel ) >>= aPropertyValues; setOrAppendPropertyValue( aPropertyValues, UNO_NAME_NUMBERING_TYPE, uno::Any( sal_Int16(style::NumberingType::ARABIC) ) ); - setOrAppendPropertyValue( aPropertyValues, UNO_NAME_PREFIX, uno::Any( OUString("Chapter ") ) ); + setOrAppendPropertyValue( aPropertyValues, UNO_NAME_PREFIX, uno::Any( u"Chapter "_ustr ) ); mxNumberingRules->replaceByIndex( nLevel, uno::Any( aPropertyValues ) ); } } @@ -655,7 +655,7 @@ void SwVbaListHelper::setPropertyValueWithNameAndLevel( sal_Int32 nLevel, const mxNumberingRules->getByIndex( nLevel ) >>= aPropertyValues; setOrAppendPropertyValue( aPropertyValues, sName, aValue ); mxNumberingRules->replaceByIndex( nLevel, uno::Any( aPropertyValues ) ); - mxStyleProps->setPropertyValue("NumberingRules", uno::Any( mxNumberingRules ) ); + mxStyleProps->setPropertyValue(u"NumberingRules"_ustr, uno::Any( mxNumberingRules ) ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/vba/vbalistlevel.cxx b/sw/source/ui/vba/vbalistlevel.cxx index 43f16e85243f..d90a94f77148 100644 --- a/sw/source/ui/vba/vbalistlevel.cxx +++ b/sw/source/ui/vba/vbalistlevel.cxx @@ -38,7 +38,7 @@ SwVbaListLevel::~SwVbaListLevel() ::sal_Int32 SAL_CALL SwVbaListLevel::getAlignment() { sal_Int16 nAlignment = 0; - m_pListHelper->getPropertyValueWithNameAndLevel( mnLevel, "Adjust" ) >>= nAlignment; + m_pListHelper->getPropertyValueWithNameAndLevel( mnLevel, u"Adjust"_ustr ) >>= nAlignment; switch( nAlignment ) { case text::HoriOrientation::LEFT: @@ -89,17 +89,17 @@ void SAL_CALL SwVbaListLevel::setAlignment( ::sal_Int32 _alignment ) throw uno::RuntimeException(); } } - m_pListHelper->setPropertyValueWithNameAndLevel( mnLevel, "Adjust", uno::Any( nAlignment ) ); + m_pListHelper->setPropertyValueWithNameAndLevel( mnLevel, u"Adjust"_ustr, uno::Any( nAlignment ) ); } uno::Reference< ::ooo::vba::word::XFont > SAL_CALL SwVbaListLevel::getFont() { - throw uno::RuntimeException("Not implemented" ); + throw uno::RuntimeException(u"Not implemented"_ustr ); } void SAL_CALL SwVbaListLevel::setFont( const uno::Reference< ::ooo::vba::word::XFont >& /*_font*/ ) { - throw uno::RuntimeException("Not implemented" ); + throw uno::RuntimeException(u"Not implemented"_ustr ); } ::sal_Int32 SAL_CALL SwVbaListLevel::getIndex() @@ -134,8 +134,8 @@ float SAL_CALL SwVbaListLevel::getNumberPosition() // indentAt + firstlineindent sal_Int32 nIndentAt = 0; sal_Int32 nFirstLineIndent = 0; - m_pListHelper->getPropertyValueWithNameAndLevel( mnLevel, "IndentAt" ) >>= nIndentAt; - m_pListHelper->getPropertyValueWithNameAndLevel( mnLevel, "FirstLineIndent" ) >>= nFirstLineIndent; + m_pListHelper->getPropertyValueWithNameAndLevel( mnLevel, u"IndentAt"_ustr ) >>= nIndentAt; + m_pListHelper->getPropertyValueWithNameAndLevel( mnLevel, u"FirstLineIndent"_ustr ) >>= nFirstLineIndent; sal_Int32 nResult = nIndentAt + nFirstLineIndent; @@ -147,16 +147,16 @@ void SAL_CALL SwVbaListLevel::setNumberPosition( float _numberposition ) sal_Int32 nNumberPosition = Millimeter::getInHundredthsOfOneMillimeter( _numberposition ); sal_Int32 nIndentAt = 0; - m_pListHelper->getPropertyValueWithNameAndLevel( mnLevel, "IndentAt" ) >>= nIndentAt; + m_pListHelper->getPropertyValueWithNameAndLevel( mnLevel, u"IndentAt"_ustr ) >>= nIndentAt; sal_Int32 nFirstLineIndent = nNumberPosition - nIndentAt; - m_pListHelper->setPropertyValueWithNameAndLevel( mnLevel, "FirstLineIndent", uno::Any( nFirstLineIndent ) ); + m_pListHelper->setPropertyValueWithNameAndLevel( mnLevel, u"FirstLineIndent"_ustr, uno::Any( nFirstLineIndent ) ); } ::sal_Int32 SAL_CALL SwVbaListLevel::getNumberStyle() { sal_Int16 nNumberingType = 0; - m_pListHelper->getPropertyValueWithNameAndLevel( mnLevel, "NumberingType" ) >>= nNumberingType; + m_pListHelper->getPropertyValueWithNameAndLevel( mnLevel, u"NumberingType"_ustr ) >>= nNumberingType; switch( nNumberingType ) { case style::NumberingType::CHAR_SPECIAL: @@ -211,7 +211,7 @@ void SAL_CALL SwVbaListLevel::setNumberPosition( float _numberposition ) } default: { - throw uno::RuntimeException("Not implemented" ); + throw uno::RuntimeException(u"Not implemented"_ustr ); } } return nNumberingType; @@ -284,11 +284,11 @@ void SAL_CALL SwVbaListLevel::setNumberStyle( ::sal_Int32 _numberstyle ) } default: { - throw uno::RuntimeException("Not implemented" ); + throw uno::RuntimeException(u"Not implemented"_ustr ); } } - m_pListHelper->setPropertyValueWithNameAndLevel( mnLevel, "NumberingType", uno::Any( nNumberingType ) ); + m_pListHelper->setPropertyValueWithNameAndLevel( mnLevel, u"NumberingType"_ustr, uno::Any( nNumberingType ) ); } ::sal_Int32 SAL_CALL SwVbaListLevel::getResetOnHigher() @@ -305,20 +305,20 @@ void SAL_CALL SwVbaListLevel::setResetOnHigher( ::sal_Int32 /*_resetonhigher*/ ) ::sal_Int32 SAL_CALL SwVbaListLevel::getStartAt() { sal_Int16 nStartWith = 0; - m_pListHelper->getPropertyValueWithNameAndLevel( mnLevel, "StartWith" ) >>= nStartWith; + m_pListHelper->getPropertyValueWithNameAndLevel( mnLevel, u"StartWith"_ustr ) >>= nStartWith; return nStartWith; } void SAL_CALL SwVbaListLevel::setStartAt( ::sal_Int32 _startat ) { sal_Int16 nStartWith = static_cast<sal_Int16>(_startat); - m_pListHelper->setPropertyValueWithNameAndLevel( mnLevel, "StartWith", uno::Any( nStartWith ) ); + m_pListHelper->setPropertyValueWithNameAndLevel( mnLevel, u"StartWith"_ustr, uno::Any( nStartWith ) ); } float SAL_CALL SwVbaListLevel::getTabPosition() { sal_Int32 nTabPosition = 0; - m_pListHelper->getPropertyValueWithNameAndLevel( mnLevel, "ListtabStopPosition" ) >>= nTabPosition; + m_pListHelper->getPropertyValueWithNameAndLevel( mnLevel, u"ListtabStopPosition"_ustr ) >>= nTabPosition; return static_cast< float >( Millimeter::getInPoints( nTabPosition ) ); } @@ -326,14 +326,14 @@ float SAL_CALL SwVbaListLevel::getTabPosition() void SAL_CALL SwVbaListLevel::setTabPosition( float _tabposition ) { sal_Int32 nTabPosition = Millimeter::getInHundredthsOfOneMillimeter( _tabposition ); - m_pListHelper->setPropertyValueWithNameAndLevel( mnLevel, "ListtabStopPosition", uno::Any( nTabPosition ) ); + m_pListHelper->setPropertyValueWithNameAndLevel( mnLevel, u"ListtabStopPosition"_ustr, uno::Any( nTabPosition ) ); } float SAL_CALL SwVbaListLevel::getTextPosition() { // indentAt sal_Int32 nIndentAt = 0; - m_pListHelper->getPropertyValueWithNameAndLevel( mnLevel, "IndentAt" ) >>= nIndentAt; + m_pListHelper->getPropertyValueWithNameAndLevel( mnLevel, u"IndentAt"_ustr ) >>= nIndentAt; return static_cast< float >( Millimeter::getInPoints( nIndentAt ) ); } @@ -342,21 +342,21 @@ void SAL_CALL SwVbaListLevel::setTextPosition( float _textposition ) { sal_Int32 nIndentAt = 0; sal_Int32 nFirstLineIndent = 0; - m_pListHelper->getPropertyValueWithNameAndLevel( mnLevel, "IndentAt" ) >>= nIndentAt; - m_pListHelper->getPropertyValueWithNameAndLevel( mnLevel, "FirstLineIndent" ) >>= nFirstLineIndent; + m_pListHelper->getPropertyValueWithNameAndLevel( mnLevel, u"IndentAt"_ustr ) >>= nIndentAt; + m_pListHelper->getPropertyValueWithNameAndLevel( mnLevel, u"FirstLineIndent"_ustr ) >>= nFirstLineIndent; sal_Int32 nAlignedAt = nIndentAt + nFirstLineIndent; nIndentAt = Millimeter::getInHundredthsOfOneMillimeter( _textposition ); nFirstLineIndent = nAlignedAt - nIndentAt; - m_pListHelper->setPropertyValueWithNameAndLevel( mnLevel, "IndentAt", uno::Any( nIndentAt ) ); - m_pListHelper->setPropertyValueWithNameAndLevel( mnLevel, "FirstLineIndent", uno::Any( nFirstLineIndent ) ); + m_pListHelper->setPropertyValueWithNameAndLevel( mnLevel, u"IndentAt"_ustr, uno::Any( nIndentAt ) ); + m_pListHelper->setPropertyValueWithNameAndLevel( mnLevel, u"FirstLineIndent"_ustr, uno::Any( nFirstLineIndent ) ); } ::sal_Int32 SAL_CALL SwVbaListLevel::getTrailingCharacter() { sal_Int16 nLabelFollowedBy= 0; - m_pListHelper->getPropertyValueWithNameAndLevel( mnLevel, "LabelFollowedBy" ) >>= nLabelFollowedBy; + m_pListHelper->getPropertyValueWithNameAndLevel( mnLevel, u"LabelFollowedBy"_ustr ) >>= nLabelFollowedBy; return nLabelFollowedBy; } @@ -364,13 +364,13 @@ void SAL_CALL SwVbaListLevel::setTextPosition( float _textposition ) void SAL_CALL SwVbaListLevel::setTrailingCharacter( ::sal_Int32 _trailingcharacter ) { sal_Int16 nLabelFollowedBy = static_cast<sal_Int16>(_trailingcharacter); - m_pListHelper->setPropertyValueWithNameAndLevel( mnLevel, "LabelFollowedBy", uno::Any( nLabelFollowedBy ) ); + m_pListHelper->setPropertyValueWithNameAndLevel( mnLevel, u"LabelFollowedBy"_ustr, uno::Any( nLabelFollowedBy ) ); } OUString SwVbaListLevel::getServiceImplName() { - return "SwVbaListLevel"; + return u"SwVbaListLevel"_ustr; } uno::Sequence< OUString > @@ -378,7 +378,7 @@ SwVbaListLevel::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.word.ListLevel" + u"ooo.vba.word.ListLevel"_ustr }; return aServiceNames; } diff --git a/sw/source/ui/vba/vbalistlevels.cxx b/sw/source/ui/vba/vbalistlevels.cxx index 3f0d83e47896..2d13970fbe65 100644 --- a/sw/source/ui/vba/vbalistlevels.cxx +++ b/sw/source/ui/vba/vbalistlevels.cxx @@ -68,7 +68,7 @@ uno::Any SAL_CALL SwVbaListLevels::Item( const uno::Any& Index1, const uno::Any& if( !( Index1 >>= nIndex ) ) throw uno::RuntimeException(); if( nIndex <=0 || nIndex > getCount() ) - throw uno::RuntimeException("Index out of bounds" ); + throw uno::RuntimeException(u"Index out of bounds"_ustr ); return uno::Any( uno::Reference< word::XListLevel >( new SwVbaListLevel( this, mxContext, m_pListHelper, nIndex - 1 ) ) ); } @@ -95,7 +95,7 @@ SwVbaListLevels::createCollectionObject( const css::uno::Any& aSource ) OUString SwVbaListLevels::getServiceImplName() { - return "SwVbaListLevels"; + return u"SwVbaListLevels"_ustr; } css::uno::Sequence<OUString> @@ -103,7 +103,7 @@ SwVbaListLevels::getServiceNames() { static uno::Sequence< OUString > const sNames { - "ooo.vba.word.ListLevels" + u"ooo.vba.word.ListLevels"_ustr }; return sNames; } diff --git a/sw/source/ui/vba/vbalisttemplate.cxx b/sw/source/ui/vba/vbalisttemplate.cxx index 032bc98162f5..e0c4045a3e5d 100644 --- a/sw/source/ui/vba/vbalisttemplate.cxx +++ b/sw/source/ui/vba/vbalisttemplate.cxx @@ -44,13 +44,13 @@ SwVbaListTemplate::ListLevels( const uno::Any& index ) void SwVbaListTemplate::applyListTemplate( uno::Reference< beans::XPropertySet > const & xProps ) { uno::Reference< container::XIndexReplace > xNumberingRules = m_pListHelper->getNumberingRules(); - xProps->setPropertyValue("NumberingRules", uno::Any( xNumberingRules ) ); + xProps->setPropertyValue(u"NumberingRules"_ustr, uno::Any( xNumberingRules ) ); } OUString SwVbaListTemplate::getServiceImplName() { - return "SwVbaListTemplate"; + return u"SwVbaListTemplate"_ustr; } uno::Sequence< OUString > @@ -58,7 +58,7 @@ SwVbaListTemplate::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.word.ListTemplate" + u"ooo.vba.word.ListTemplate"_ustr }; return aServiceNames; } diff --git a/sw/source/ui/vba/vbalisttemplates.cxx b/sw/source/ui/vba/vbalisttemplates.cxx index a9cc52d4bc9a..1f662dae865e 100644 --- a/sw/source/ui/vba/vbalisttemplates.cxx +++ b/sw/source/ui/vba/vbalisttemplates.cxx @@ -63,7 +63,7 @@ uno::Any SAL_CALL SwVbaListTemplates::Item( const uno::Any& Index1, const uno::A if( !( Index1 >>= nIndex ) ) throw uno::RuntimeException(); if( nIndex <=0 || nIndex > getCount() ) - throw uno::RuntimeException("Index out of bounds" ); + throw uno::RuntimeException(u"Index out of bounds"_ustr ); return uno::Any( uno::Reference< word::XListTemplate >( new SwVbaListTemplate( this, mxContext, mxTextDocument, mnGalleryType, nIndex ) ) ); } @@ -90,7 +90,7 @@ SwVbaListTemplates::createCollectionObject( const css::uno::Any& aSource ) OUString SwVbaListTemplates::getServiceImplName() { - return "SwVbaListTemplates"; + return u"SwVbaListTemplates"_ustr; } css::uno::Sequence<OUString> @@ -98,7 +98,7 @@ SwVbaListTemplates::getServiceNames() { static uno::Sequence< OUString > const sNames { - "ooo.vba.word.ListTemplates" + u"ooo.vba.word.ListTemplates"_ustr }; return sNames; } diff --git a/sw/source/ui/vba/vbamailmerge.cxx b/sw/source/ui/vba/vbamailmerge.cxx index 479f5dfd7d30..d237f3b5a3f0 100644 --- a/sw/source/ui/vba/vbamailmerge.cxx +++ b/sw/source/ui/vba/vbamailmerge.cxx @@ -45,11 +45,11 @@ void SAL_CALL SwVbaMailMerge::OpenDataSource( { } -OUString SwVbaMailMerge::getServiceImplName() { return "SwVbaMailMerge"; } +OUString SwVbaMailMerge::getServiceImplName() { return u"SwVbaMailMerge"_ustr; } css::uno::Sequence<OUString> SwVbaMailMerge::getServiceNames() { - static css::uno::Sequence<OUString> const aServiceNames{ "ooo.vba.word.MailMerge" }; + static css::uno::Sequence<OUString> const aServiceNames{ u"ooo.vba.word.MailMerge"_ustr }; return aServiceNames; } diff --git a/sw/source/ui/vba/vbaoptions.cxx b/sw/source/ui/vba/vbaoptions.cxx index ef74dcd8a6f0..a9f9088ff7c0 100644 --- a/sw/source/ui/vba/vbaoptions.cxx +++ b/sw/source/ui/vba/vbaoptions.cxx @@ -258,7 +258,7 @@ void SAL_CALL SwVbaOptions::setAutoFormatApplyBulletedLists( sal_Bool /*_autofor OUString SwVbaOptions::getServiceImplName() { - return "SwVbaOptions"; + return u"SwVbaOptions"_ustr; } uno::Sequence< OUString > @@ -266,7 +266,7 @@ SwVbaOptions::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.word.Options" + u"ooo.vba.word.Options"_ustr }; return aServiceNames; } diff --git a/sw/source/ui/vba/vbapagesetup.cxx b/sw/source/ui/vba/vbapagesetup.cxx index b22437dbd260..8163ff48239d 100644 --- a/sw/source/ui/vba/vbapagesetup.cxx +++ b/sw/source/ui/vba/vbapagesetup.cxx @@ -57,9 +57,9 @@ void SAL_CALL SwVbaPageSetup::setGutter( double _gutter ) double SAL_CALL SwVbaPageSetup::getHeaderDistance() { bool isHeaderOn = false; - mxPageProps->getPropertyValue("HeaderIsOn") >>= isHeaderOn; + mxPageProps->getPropertyValue(u"HeaderIsOn"_ustr) >>= isHeaderOn; if( !isHeaderOn ) - mxPageProps->setPropertyValue("HeaderIsOn", uno::Any( true ) ); + mxPageProps->setPropertyValue(u"HeaderIsOn"_ustr, uno::Any( true ) ); return VbaPageSetupBase::getHeaderMargin(); } @@ -80,29 +80,29 @@ void SAL_CALL SwVbaPageSetup::setHeaderDistance( double _headerdistance ) sal_Int32 currentSpacing = 0; sal_Int32 currentHeaderHeight = 0; - mxPageProps->getPropertyValue("HeaderIsOn") >>= isHeaderOn; + mxPageProps->getPropertyValue(u"HeaderIsOn"_ustr) >>= isHeaderOn; if( !isHeaderOn ) - mxPageProps->setPropertyValue("HeaderIsOn", uno::Any( true ) ); + mxPageProps->setPropertyValue(u"HeaderIsOn"_ustr, uno::Any( true ) ); - mxPageProps->getPropertyValue("TopMargin") >>= currentTopMargin; - mxPageProps->getPropertyValue("HeaderBodyDistance") >>= currentSpacing; - mxPageProps->getPropertyValue("HeaderHeight") >>= currentHeaderHeight; + mxPageProps->getPropertyValue(u"TopMargin"_ustr) >>= currentTopMargin; + mxPageProps->getPropertyValue(u"HeaderBodyDistance"_ustr) >>= currentSpacing; + mxPageProps->getPropertyValue(u"HeaderHeight"_ustr) >>= currentHeaderHeight; sal_Int32 newSpacing = currentSpacing - ( newHeaderDistance - currentTopMargin ); sal_Int32 height = currentHeaderHeight - currentSpacing; sal_Int32 newHeaderHeight = newSpacing + height; - mxPageProps->setPropertyValue("TopMargin", uno::Any( newHeaderDistance ) ); - mxPageProps->setPropertyValue("HeaderBodyDistance", uno::Any( newSpacing ) ); - mxPageProps->setPropertyValue("HeaderHeight", uno::Any( newHeaderHeight ) ); + mxPageProps->setPropertyValue(u"TopMargin"_ustr, uno::Any( newHeaderDistance ) ); + mxPageProps->setPropertyValue(u"HeaderBodyDistance"_ustr, uno::Any( newSpacing ) ); + mxPageProps->setPropertyValue(u"HeaderHeight"_ustr, uno::Any( newHeaderHeight ) ); } double SAL_CALL SwVbaPageSetup::getFooterDistance() { bool isFooterOn = false; - mxPageProps->getPropertyValue("FooterIsOn") >>= isFooterOn; + mxPageProps->getPropertyValue(u"FooterIsOn"_ustr) >>= isFooterOn; if( !isFooterOn ) - mxPageProps->setPropertyValue("FooterIsOn", uno::Any( true ) ); + mxPageProps->setPropertyValue(u"FooterIsOn"_ustr, uno::Any( true ) ); return VbaPageSetupBase::getFooterMargin(); } @@ -114,21 +114,21 @@ void SAL_CALL SwVbaPageSetup::setFooterDistance( double _footerdistance ) sal_Int32 currentSpacing = 0; sal_Int32 currentFooterHeight = 0; - mxPageProps->getPropertyValue("FooterIsOn") >>= isFooterOn; + mxPageProps->getPropertyValue(u"FooterIsOn"_ustr) >>= isFooterOn; if( !isFooterOn ) - mxPageProps->setPropertyValue("FooterIsOn", uno::Any( true ) ); + mxPageProps->setPropertyValue(u"FooterIsOn"_ustr, uno::Any( true ) ); - mxPageProps->getPropertyValue("BottomMargin") >>= currentBottomMargin; - mxPageProps->getPropertyValue("FooterBodyDistance") >>= currentSpacing; - mxPageProps->getPropertyValue("FooterHeight") >>= currentFooterHeight; + mxPageProps->getPropertyValue(u"BottomMargin"_ustr) >>= currentBottomMargin; + mxPageProps->getPropertyValue(u"FooterBodyDistance"_ustr) >>= currentSpacing; + mxPageProps->getPropertyValue(u"FooterHeight"_ustr) >>= currentFooterHeight; sal_Int32 newSpacing = currentSpacing - ( newFooterDistance - currentBottomMargin ); sal_Int32 height = currentFooterHeight - currentSpacing; sal_Int32 newFooterHeight = newSpacing + height; - mxPageProps->setPropertyValue("BottomMargin", uno::Any( newFooterDistance ) ); - mxPageProps->setPropertyValue("FooterBodyDistance", uno::Any( newSpacing ) ); - mxPageProps->setPropertyValue("FooterHeight", uno::Any( newFooterHeight ) ); + mxPageProps->setPropertyValue(u"BottomMargin"_ustr, uno::Any( newFooterDistance ) ); + mxPageProps->setPropertyValue(u"FooterBodyDistance"_ustr, uno::Any( newSpacing ) ); + mxPageProps->setPropertyValue(u"FooterHeight"_ustr, uno::Any( newFooterHeight ) ); } sal_Bool SAL_CALL SwVbaPageSetup::getDifferentFirstPageHeaderFooter() @@ -153,26 +153,26 @@ void SAL_CALL SwVbaPageSetup::setDifferentFirstPageHeaderFooter( sal_Bool status uno::Reference< beans::XPropertySet > xStyleProps( word::getCurrentPageStyle( mxModel ), uno::UNO_QUERY_THROW ); sal_Int32 nTopMargin = 0; - xStyleProps->getPropertyValue("TopMargin") >>= nTopMargin; + xStyleProps->getPropertyValue(u"TopMargin"_ustr) >>= nTopMargin; sal_Int32 nBottomMargin = 0; - xStyleProps->getPropertyValue("BottomMargin") >>= nBottomMargin; + xStyleProps->getPropertyValue(u"BottomMargin"_ustr) >>= nBottomMargin; sal_Int32 nLeftMargin = 0; - xStyleProps->getPropertyValue("LeftMargin") >>= nLeftMargin; + xStyleProps->getPropertyValue(u"LeftMargin"_ustr) >>= nLeftMargin; sal_Int32 nRightMargin = 0; - xStyleProps->getPropertyValue("RightMargin") >>= nRightMargin; + xStyleProps->getPropertyValue(u"RightMargin"_ustr) >>= nRightMargin; sal_Int32 nHeaderHeight = 0; - xStyleProps->getPropertyValue("HeaderHeight") >>= nHeaderHeight; + xStyleProps->getPropertyValue(u"HeaderHeight"_ustr) >>= nHeaderHeight; sal_Int32 nFooterHeight = 0; - xStyleProps->getPropertyValue("FooterHeight") >>= nFooterHeight; + xStyleProps->getPropertyValue(u"FooterHeight"_ustr) >>= nFooterHeight; bool isHeaderOn = false; - xStyleProps->getPropertyValue("HeaderIsOn") >>= isHeaderOn; + xStyleProps->getPropertyValue(u"HeaderIsOn"_ustr) >>= isHeaderOn; if( isHeaderOn ) { nTopMargin += nHeaderHeight; nBottomMargin += nFooterHeight; - xStyleProps->setPropertyValue("HeaderIsOn", uno::Any( false ) ); - xStyleProps->setPropertyValue("FooterIsOn", uno::Any( false ) ); + xStyleProps->setPropertyValue(u"HeaderIsOn"_ustr, uno::Any( false ) ); + xStyleProps->setPropertyValue(u"FooterIsOn"_ustr, uno::Any( false ) ); } uno::Reference< text::XPageCursor > xPageCursor( word::getXTextViewCursor( mxModel ), uno::UNO_QUERY_THROW ); if( xPageCursor->getPage() != 1 ) @@ -181,21 +181,21 @@ void SAL_CALL SwVbaPageSetup::setDifferentFirstPageHeaderFooter( sal_Bool status } uno::Reference< beans::XPropertySet > xCursorProps( xPageCursor, uno::UNO_QUERY_THROW ); - uno::Reference< beans::XPropertySet > xTableProps( xCursorProps->getPropertyValue("TextTable"), uno::UNO_QUERY ); + uno::Reference< beans::XPropertySet > xTableProps( xCursorProps->getPropertyValue(u"TextTable"_ustr), uno::UNO_QUERY ); if( xTableProps.is() ) { - xTableProps->setPropertyValue("PageDescName", uno::Any( newStyle ) ); + xTableProps->setPropertyValue(u"PageDescName"_ustr, uno::Any( newStyle ) ); } else { - xCursorProps->setPropertyValue("PageDescName", uno::Any( newStyle ) ); + xCursorProps->setPropertyValue(u"PageDescName"_ustr, uno::Any( newStyle ) ); } uno::Reference< beans::XPropertySet > xFirstPageProps( word::getCurrentPageStyle( mxModel ), uno::UNO_QUERY_THROW ); - xFirstPageProps->setPropertyValue("TopMargin", uno::Any( nTopMargin ) ); - xFirstPageProps->setPropertyValue("BottomMargin", uno::Any( nBottomMargin ) ); - xFirstPageProps->setPropertyValue("LeftMargin", uno::Any( nLeftMargin ) ); - xFirstPageProps->setPropertyValue("RightMargin", uno::Any( nRightMargin ) ); + xFirstPageProps->setPropertyValue(u"TopMargin"_ustr, uno::Any( nTopMargin ) ); + xFirstPageProps->setPropertyValue(u"BottomMargin"_ustr, uno::Any( nBottomMargin ) ); + xFirstPageProps->setPropertyValue(u"LeftMargin"_ustr, uno::Any( nLeftMargin ) ); + xFirstPageProps->setPropertyValue(u"RightMargin"_ustr, uno::Any( nRightMargin ) ); } OUString SwVbaPageSetup::getStyleOfFirstPage() const @@ -208,14 +208,14 @@ OUString SwVbaPageSetup::getStyleOfFirstPage() const } uno::Reference< beans::XPropertySet > xCursorProps( xPageCursor, uno::UNO_QUERY_THROW ); - uno::Reference< beans::XPropertySet > xTableProps( xCursorProps->getPropertyValue("TextTable"), uno::UNO_QUERY ); + uno::Reference< beans::XPropertySet > xTableProps( xCursorProps->getPropertyValue(u"TextTable"_ustr), uno::UNO_QUERY ); if( xTableProps.is() ) { - xTableProps->getPropertyValue("PageDescName") >>= styleFirstPage; + xTableProps->getPropertyValue(u"PageDescName"_ustr) >>= styleFirstPage; } else { - xCursorProps->getPropertyValue("PageDescName") >>= styleFirstPage; + xCursorProps->getPropertyValue(u"PageDescName"_ustr) >>= styleFirstPage; } return styleFirstPage; } @@ -244,7 +244,7 @@ void SAL_CALL SwVbaPageSetup::setSectionStart( ::sal_Int32 /*_sectionstart*/ ) OUString SwVbaPageSetup::getServiceImplName() { - return "SwVbaPageSetup"; + return u"SwVbaPageSetup"_ustr; } uno::Sequence< OUString > @@ -252,7 +252,7 @@ SwVbaPageSetup::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.word.PageSetup" + u"ooo.vba.word.PageSetup"_ustr }; return aServiceNames; } diff --git a/sw/source/ui/vba/vbapane.cxx b/sw/source/ui/vba/vbapane.cxx index 64a7c411c77c..26f579ccb5cd 100644 --- a/sw/source/ui/vba/vbapane.cxx +++ b/sw/source/ui/vba/vbapane.cxx @@ -43,13 +43,13 @@ SwVbaPane::View() void SAL_CALL SwVbaPane::Close( ) { - dispatchRequests( mxModel,".uno:CloseWin" ); + dispatchRequests( mxModel,u".uno:CloseWin"_ustr ); } OUString SwVbaPane::getServiceImplName() { - return "SwVbaPane"; + return u"SwVbaPane"_ustr; } uno::Sequence< OUString > @@ -57,7 +57,7 @@ SwVbaPane::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.word.Pane" + u"ooo.vba.word.Pane"_ustr }; return aServiceNames; } diff --git a/sw/source/ui/vba/vbapanes.cxx b/sw/source/ui/vba/vbapanes.cxx index 05b288e29074..d6a28a4d6894 100644 --- a/sw/source/ui/vba/vbapanes.cxx +++ b/sw/source/ui/vba/vbapanes.cxx @@ -103,7 +103,7 @@ SwVbaPanes::createCollectionObject( const css::uno::Any& aSource ) OUString SwVbaPanes::getServiceImplName() { - return "SwVbaPanes"; + return u"SwVbaPanes"_ustr; } css::uno::Sequence<OUString> @@ -111,7 +111,7 @@ SwVbaPanes::getServiceNames() { static uno::Sequence< OUString > const sNames { - "ooo.vba.word.Panes" + u"ooo.vba.word.Panes"_ustr }; return sNames; } diff --git a/sw/source/ui/vba/vbaparagraph.cxx b/sw/source/ui/vba/vbaparagraph.cxx index 19a312795910..51eabcc612fd 100644 --- a/sw/source/ui/vba/vbaparagraph.cxx +++ b/sw/source/ui/vba/vbaparagraph.cxx @@ -57,7 +57,7 @@ SwVbaParagraph::setStyle( const uno::Any& style ) OUString SwVbaParagraph::getServiceImplName() { - return "SwVbaParagraph"; + return u"SwVbaParagraph"_ustr; } uno::Sequence< OUString > @@ -65,7 +65,7 @@ SwVbaParagraph::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.word.Paragraph" + u"ooo.vba.word.Paragraph"_ustr }; return aServiceNames; } @@ -101,7 +101,7 @@ public: while( xParEnum->hasMoreElements() ) { uno::Reference< lang::XServiceInfo > xServiceInfo( xParEnum->nextElement(), uno::UNO_QUERY_THROW ); - if( xServiceInfo->supportsService("com.sun.star.text.Paragraph") ) + if( xServiceInfo->supportsService(u"com.sun.star.text.Paragraph"_ustr) ) { nCount++; } @@ -117,7 +117,7 @@ public: while( xParEnum->hasMoreElements() ) { uno::Reference< lang::XServiceInfo > xServiceInfo( xParEnum->nextElement(), uno::UNO_QUERY_THROW ); - if( xServiceInfo->supportsService("com.sun.star.text.Paragraph") ) + if( xServiceInfo->supportsService(u"com.sun.star.text.Paragraph"_ustr) ) { if( Index == nCount ) return uno::Any( xServiceInfo ); @@ -163,7 +163,7 @@ SwVbaParagraphs::createCollectionObject( const css::uno::Any& aSource ) OUString SwVbaParagraphs::getServiceImplName() { - return "SwVbaParagraphs"; + return u"SwVbaParagraphs"_ustr; } css::uno::Sequence<OUString> @@ -171,7 +171,7 @@ SwVbaParagraphs::getServiceNames() { static uno::Sequence< OUString > const sNames { - "ooo.vba.word.Paragraphs" + u"ooo.vba.word.Paragraphs"_ustr }; return sNames; } diff --git a/sw/source/ui/vba/vbaparagraphformat.cxx b/sw/source/ui/vba/vbaparagraphformat.cxx index 4e5a61fdeb50..1375b88a93e8 100644 --- a/sw/source/ui/vba/vbaparagraphformat.cxx +++ b/sw/source/ui/vba/vbaparagraphformat.cxx @@ -49,33 +49,33 @@ SwVbaParagraphFormat::~SwVbaParagraphFormat() sal_Int32 SAL_CALL SwVbaParagraphFormat::getAlignment() { style::ParagraphAdjust aParaAdjust = style::ParagraphAdjust_LEFT; - mxParaProps->getPropertyValue("ParaAdjust") >>= aParaAdjust; + mxParaProps->getPropertyValue(u"ParaAdjust"_ustr) >>= aParaAdjust; return getMSWordAlignment( aParaAdjust ); } void SAL_CALL SwVbaParagraphFormat::setAlignment( sal_Int32 _alignment ) { style::ParagraphAdjust aParaAdjust = getOOoAlignment( _alignment ); - mxParaProps->setPropertyValue("ParaAdjust", uno::Any( aParaAdjust ) ); + mxParaProps->setPropertyValue(u"ParaAdjust"_ustr, uno::Any( aParaAdjust ) ); } float SAL_CALL SwVbaParagraphFormat::getFirstLineIndent() { sal_Int32 indent = 0; - mxParaProps->getPropertyValue("ParaFirstLineIndent") >>= indent; + mxParaProps->getPropertyValue(u"ParaFirstLineIndent"_ustr) >>= indent; return static_cast<float>( Millimeter::getInPoints( indent ) ); } void SAL_CALL SwVbaParagraphFormat::setFirstLineIndent( float _firstlineindent ) { sal_Int32 indent = Millimeter::getInHundredthsOfOneMillimeter( _firstlineindent ); - mxParaProps->setPropertyValue("ParaFirstLineIndent", uno::Any( indent ) ); + mxParaProps->setPropertyValue(u"ParaFirstLineIndent"_ustr, uno::Any( indent ) ); } uno::Any SAL_CALL SwVbaParagraphFormat::getKeepTogether() { bool bKeep = false; - mxParaProps->getPropertyValue("ParaKeepTogether") >>= bKeep; + mxParaProps->getPropertyValue(u"ParaKeepTogether"_ustr) >>= bKeep; return uno::Any ( bKeep ); } @@ -84,7 +84,7 @@ void SAL_CALL SwVbaParagraphFormat::setKeepTogether( const uno::Any& _keeptogeth bool bKeep = false; if( _keeptogether >>= bKeep ) { - mxParaProps->setPropertyValue("ParaKeepTogether", uno::Any( bKeep ) ); + mxParaProps->setPropertyValue(u"ParaKeepTogether"_ustr, uno::Any( bKeep ) ); } else { @@ -95,7 +95,7 @@ void SAL_CALL SwVbaParagraphFormat::setKeepTogether( const uno::Any& _keeptogeth uno::Any SAL_CALL SwVbaParagraphFormat::getKeepWithNext() { bool bKeep = false; - mxParaProps->getPropertyValue("ParaSplit") >>= bKeep; + mxParaProps->getPropertyValue(u"ParaSplit"_ustr) >>= bKeep; return uno::Any ( bKeep ); } @@ -104,7 +104,7 @@ void SAL_CALL SwVbaParagraphFormat::setKeepWithNext( const uno::Any& _keepwithne bool bKeep = false; if( _keepwithnext >>= bKeep ) { - mxParaProps->setPropertyValue("ParaSplit", uno::Any( bKeep ) ); + mxParaProps->setPropertyValue(u"ParaSplit"_ustr, uno::Any( bKeep ) ); } else { @@ -115,7 +115,7 @@ void SAL_CALL SwVbaParagraphFormat::setKeepWithNext( const uno::Any& _keepwithne uno::Any SAL_CALL SwVbaParagraphFormat::getHyphenation() { bool bHypn = false; - mxParaProps->getPropertyValue("ParaIsHyphenation") >>= bHypn; + mxParaProps->getPropertyValue(u"ParaIsHyphenation"_ustr) >>= bHypn; return uno::Any ( bHypn ); } @@ -124,7 +124,7 @@ void SAL_CALL SwVbaParagraphFormat::setHyphenation( const uno::Any& _hyphenation bool bHypn = false; if( _hyphenation >>= bHypn ) { - mxParaProps->setPropertyValue("ParaIsHyphenation", uno::Any( bHypn ) ); + mxParaProps->setPropertyValue(u"ParaIsHyphenation"_ustr, uno::Any( bHypn ) ); } else { @@ -135,35 +135,35 @@ void SAL_CALL SwVbaParagraphFormat::setHyphenation( const uno::Any& _hyphenation float SAL_CALL SwVbaParagraphFormat::getLineSpacing() { style::LineSpacing aLineSpacing; - mxParaProps->getPropertyValue("ParaLineSpacing") >>= aLineSpacing; + mxParaProps->getPropertyValue(u"ParaLineSpacing"_ustr) >>= aLineSpacing; return getMSWordLineSpacing( aLineSpacing ); } void SAL_CALL SwVbaParagraphFormat::setLineSpacing( float _linespacing ) { style::LineSpacing aLineSpacing; - mxParaProps->getPropertyValue("ParaLineSpacing") >>= aLineSpacing; + mxParaProps->getPropertyValue(u"ParaLineSpacing"_ustr) >>= aLineSpacing; aLineSpacing = getOOoLineSpacing( _linespacing, aLineSpacing.Mode ); - mxParaProps->setPropertyValue("ParaLineSpacing", uno::Any( aLineSpacing ) ); + mxParaProps->setPropertyValue(u"ParaLineSpacing"_ustr, uno::Any( aLineSpacing ) ); } sal_Int32 SAL_CALL SwVbaParagraphFormat::getLineSpacingRule() { style::LineSpacing aLineSpacing; - mxParaProps->getPropertyValue("ParaLineSpacing") >>= aLineSpacing; + mxParaProps->getPropertyValue(u"ParaLineSpacing"_ustr) >>= aLineSpacing; return getMSWordLineSpacingRule( aLineSpacing ); } void SAL_CALL SwVbaParagraphFormat::setLineSpacingRule( sal_Int32 _linespacingrule ) { style::LineSpacing aLineSpacing = getOOoLineSpacingFromRule( _linespacingrule ); - mxParaProps->setPropertyValue("ParaLineSpacing", uno::Any( aLineSpacing ) ); + mxParaProps->setPropertyValue(u"ParaLineSpacing"_ustr, uno::Any( aLineSpacing ) ); } uno::Any SAL_CALL SwVbaParagraphFormat::getNoLineNumber() { bool noLineNum = false; - mxParaProps->getPropertyValue("ParaLineNumberCount") >>= noLineNum; + mxParaProps->getPropertyValue(u"ParaLineNumberCount"_ustr) >>= noLineNum; return uno::Any ( noLineNum ); } @@ -172,7 +172,7 @@ void SAL_CALL SwVbaParagraphFormat::setNoLineNumber( const uno::Any& _nolinenumb bool noLineNum = false; if( _nolinenumber >>= noLineNum ) { - mxParaProps->setPropertyValue("ParaLineNumberCount", uno::Any( noLineNum ) ); + mxParaProps->setPropertyValue(u"ParaLineNumberCount"_ustr, uno::Any( noLineNum ) ); } else { @@ -185,7 +185,7 @@ sal_Int32 SAL_CALL SwVbaParagraphFormat::getOutlineLevel() sal_Int32 nLevel = word::WdOutlineLevel::wdOutlineLevelBodyText; OUString aHeading; static constexpr OUString HEADING = u"Heading"_ustr; - mxParaProps->getPropertyValue("ParaStyleName") >>= aHeading; + mxParaProps->getPropertyValue(u"ParaStyleName"_ustr) >>= aHeading; if( aHeading.startsWith( HEADING ) ) { // get the sub string after "Heading" @@ -205,7 +205,7 @@ void SAL_CALL SwVbaParagraphFormat::setOutlineLevel( sal_Int32 _outlinelevel ) uno::Any SAL_CALL SwVbaParagraphFormat::getPageBreakBefore() { style::BreakType aBreakType; - mxParaProps->getPropertyValue("BreakType") >>= aBreakType; + mxParaProps->getPropertyValue(u"BreakType"_ustr) >>= aBreakType; bool bBreakBefore = ( aBreakType == style::BreakType_PAGE_BEFORE || aBreakType == style::BreakType_PAGE_BOTH ); return uno::Any( bBreakBefore ); } @@ -216,7 +216,7 @@ void SAL_CALL SwVbaParagraphFormat::setPageBreakBefore( const uno::Any& _breakbe if( _breakbefore >>= bBreakBefore ) { style::BreakType aBreakType; - mxParaProps->getPropertyValue("BreakType") >>= aBreakType; + mxParaProps->getPropertyValue(u"BreakType"_ustr) >>= aBreakType; if( bBreakBefore ) { if( aBreakType == style::BreakType_NONE ) @@ -231,7 +231,7 @@ void SAL_CALL SwVbaParagraphFormat::setPageBreakBefore( const uno::Any& _breakbe else if ( aBreakType == style::BreakType_PAGE_BEFORE ) aBreakType = style::BreakType_PAGE_AFTER; } - mxParaProps->setPropertyValue("BreakType", uno::Any( aBreakType ) ); + mxParaProps->setPropertyValue(u"BreakType"_ustr, uno::Any( aBreakType ) ); } else { @@ -242,53 +242,53 @@ void SAL_CALL SwVbaParagraphFormat::setPageBreakBefore( const uno::Any& _breakbe float SAL_CALL SwVbaParagraphFormat::getSpaceBefore() { sal_Int32 nSpace = 0; - mxParaProps->getPropertyValue("ParaTopMargin") >>= nSpace; + mxParaProps->getPropertyValue(u"ParaTopMargin"_ustr) >>= nSpace; return static_cast<float>( Millimeter::getInPoints( nSpace ) ); } void SAL_CALL SwVbaParagraphFormat::setSpaceBefore( float _space ) { sal_Int32 nSpace = Millimeter::getInHundredthsOfOneMillimeter( _space ); - mxParaProps->setPropertyValue("ParaTopMargin", uno::Any( nSpace ) ); + mxParaProps->setPropertyValue(u"ParaTopMargin"_ustr, uno::Any( nSpace ) ); } float SAL_CALL SwVbaParagraphFormat::getSpaceAfter() { sal_Int32 nSpace = 0; - mxParaProps->getPropertyValue("ParaBottomMargin") >>= nSpace; + mxParaProps->getPropertyValue(u"ParaBottomMargin"_ustr) >>= nSpace; return static_cast<float>( Millimeter::getInPoints( nSpace ) ); } void SAL_CALL SwVbaParagraphFormat::setSpaceAfter( float _space ) { sal_Int32 nSpace = Millimeter::getInHundredthsOfOneMillimeter( _space ); - mxParaProps->setPropertyValue("ParaBottomMargin", uno::Any( nSpace ) ); + mxParaProps->setPropertyValue(u"ParaBottomMargin"_ustr, uno::Any( nSpace ) ); } float SAL_CALL SwVbaParagraphFormat::getLeftIndent() { sal_Int32 nIndent = 0; - mxParaProps->getPropertyValue("ParaLeftMargin") >>= nIndent; + mxParaProps->getPropertyValue(u"ParaLeftMargin"_ustr) >>= nIndent; return static_cast<float>( Millimeter::getInPoints( nIndent ) ); } void SAL_CALL SwVbaParagraphFormat::setLeftIndent( float _leftindent ) { sal_Int32 nIndent = Millimeter::getInHundredthsOfOneMillimeter( _leftindent ); - mxParaProps->setPropertyValue("ParaLeftMargin", uno::Any( nIndent ) ); + mxParaProps->setPropertyValue(u"ParaLeftMargin"_ustr, uno::Any( nIndent ) ); } float SAL_CALL SwVbaParagraphFormat::getRightIndent() { sal_Int32 nIndent = 0; - mxParaProps->getPropertyValue("ParaRightMargin") >>= nIndent; + mxParaProps->getPropertyValue(u"ParaRightMargin"_ustr) >>= nIndent; return static_cast<float>( Millimeter::getInPoints( nIndent ) ); } void SAL_CALL SwVbaParagraphFormat::setRightIndent( float _rightindent ) { sal_Int32 nIndent = Millimeter::getInHundredthsOfOneMillimeter( _rightindent ); - mxParaProps->setPropertyValue("ParaRightMargin", uno::Any( nIndent ) ); + mxParaProps->setPropertyValue(u"ParaRightMargin"_ustr, uno::Any( nIndent ) ); } uno::Any SAL_CALL SwVbaParagraphFormat::getTabStops() @@ -298,15 +298,15 @@ uno::Any SAL_CALL SwVbaParagraphFormat::getTabStops() void SAL_CALL SwVbaParagraphFormat::setTabStops( const uno::Any& /*_tabstops*/ ) { - throw uno::RuntimeException("Not implemented" ); + throw uno::RuntimeException(u"Not implemented"_ustr ); } uno::Any SAL_CALL SwVbaParagraphFormat::getWidowControl() { sal_Int8 nWidow = 0; - mxParaProps->getPropertyValue("ParaWidows") >>= nWidow; + mxParaProps->getPropertyValue(u"ParaWidows"_ustr) >>= nWidow; sal_Int8 nOrphan = 0; - mxParaProps->getPropertyValue("ParaOrphans") >>= nOrphan; + mxParaProps->getPropertyValue(u"ParaOrphans"_ustr) >>= nOrphan; // if the amount of single lines on one page > 1 and the same of start and end of the paragraph, // true is returned. bool bWidow = ( nWidow > 1 && nOrphan == nWidow ); @@ -321,8 +321,8 @@ void SAL_CALL SwVbaParagraphFormat::setWidowControl( const uno::Any& _widowcontr if( _widowcontrol >>= bWidow ) { sal_Int8 nControl = bWidow? 2:1; - mxParaProps->setPropertyValue("ParaWidows", uno::Any( nControl ) ); - mxParaProps->setPropertyValue("ParaOrphans", uno::Any( nControl ) ); + mxParaProps->setPropertyValue(u"ParaWidows"_ustr, uno::Any( nControl ) ); + mxParaProps->setPropertyValue(u"ParaOrphans"_ustr, uno::Any( nControl ) ); } else { @@ -478,7 +478,7 @@ sal_Int32 SwVbaParagraphFormat::getMSWordLineSpacingRule( style::LineSpacing con sal_Int16 SwVbaParagraphFormat::getCharHeight() { float fCharHeight = 0.0; - mxParaProps->getPropertyValue("CharHeight") >>= fCharHeight; + mxParaProps->getPropertyValue(u"CharHeight"_ustr) >>= fCharHeight; return static_cast<sal_Int16>( Millimeter::getInHundredthsOfOneMillimeter( fCharHeight ) ); } @@ -551,7 +551,7 @@ sal_Int32 SwVbaParagraphFormat::getMSWordAlignment( style::ParagraphAdjust _alig OUString SwVbaParagraphFormat::getServiceImplName() { - return "SwVbaParagraphFormat"; + return u"SwVbaParagraphFormat"_ustr; } uno::Sequence< OUString > @@ -559,7 +559,7 @@ SwVbaParagraphFormat::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.word.ParagraphFormat" + u"ooo.vba.word.ParagraphFormat"_ustr }; return aServiceNames; } diff --git a/sw/source/ui/vba/vbarange.cxx b/sw/source/ui/vba/vbarange.cxx index c48dd6193c2f..39d369c92144 100644 --- a/sw/source/ui/vba/vbarange.cxx +++ b/sw/source/ui/vba/vbarange.cxx @@ -72,7 +72,7 @@ void SwVbaRange::initialize( const uno::Reference< text::XTextRange >& rStart, c mxTextCursor = SwVbaRangeHelper::initCursor( rStart, mxText ); if( !mxTextCursor.is() ) - throw uno::RuntimeException("Fails to create text cursor" ); + throw uno::RuntimeException(u"Fails to create text cursor"_ustr ); mxTextCursor->collapseToStart(); if( rEnd.is() ) @@ -207,7 +207,7 @@ void SAL_CALL SwVbaRange::InsertBreak(const uno::Any& _breakType) } uno::Reference< beans::XPropertySet > xProp( mxTextCursor, uno::UNO_QUERY_THROW ); - xProp->setPropertyValue("BreakType", uno::Any( eBreakType ) ); + xProp->setPropertyValue(u"BreakType"_ustr, uno::Any( eBreakType ) ); } } @@ -223,7 +223,7 @@ SwVbaRange::Select() void SAL_CALL SwVbaRange::InsertParagraph() { - mxTextCursor->setString( "" ); + mxTextCursor->setString( u""_ustr ); InsertParagraphBefore(); } @@ -252,17 +252,17 @@ SwVbaRange::getParagraphFormat() void SAL_CALL SwVbaRange::setParagraphFormat( const uno::Reference< word::XParagraphFormat >& /*rParagraphFormat*/ ) { - throw uno::RuntimeException("Not implemented" ); + throw uno::RuntimeException(u"Not implemented"_ustr ); } void SwVbaRange::GetStyleInfo(OUString& aStyleName, OUString& aStyleType ) { uno::Reference< beans::XPropertySet > xProp( mxTextCursor, uno::UNO_QUERY_THROW ); - if( ( xProp->getPropertyValue("CharStyleName") >>= aStyleName ) && !aStyleName.isEmpty() ) + if( ( xProp->getPropertyValue(u"CharStyleName"_ustr) >>= aStyleName ) && !aStyleName.isEmpty() ) { aStyleType = "CharacterStyles"; } - else if( ( xProp->getPropertyValue("ParaStyleName") >>= aStyleName ) && !aStyleName.isEmpty() ) + else if( ( xProp->getPropertyValue(u"ParaStyleName"_ustr) >>= aStyleName ) && !aStyleName.isEmpty() ) { aStyleType = "ParagraphStyles"; } @@ -331,10 +331,10 @@ SwVbaRange::PageSetup( ) uno::Reference< beans::XPropertySet > xParaProps( mxTextCursor, uno::UNO_QUERY_THROW ); uno::Reference< frame::XModel > xModel( mxTextDocument, uno::UNO_QUERY_THROW ); OUString aPageStyleName; - xParaProps->getPropertyValue("PageStyleName") >>= aPageStyleName; + xParaProps->getPropertyValue(u"PageStyleName"_ustr) >>= aPageStyleName; uno::Reference< style::XStyleFamiliesSupplier > xSytleFamSupp( xModel, uno::UNO_QUERY_THROW ); uno::Reference< container::XNameAccess > xSytleFamNames( xSytleFamSupp->getStyleFamilies(), uno::UNO_SET_THROW ); - uno::Reference< container::XNameAccess > xPageStyles( xSytleFamNames->getByName("PageStyles"), uno::UNO_QUERY_THROW ); + uno::Reference< container::XNameAccess > xPageStyles( xSytleFamNames->getByName(u"PageStyles"_ustr), uno::UNO_QUERY_THROW ); uno::Reference< beans::XPropertySet > xPageProps( xPageStyles->getByName( aPageStyleName ), uno::UNO_QUERY_THROW ); return uno::Any( uno::Reference< word::XPageSetup >( new SwVbaPageSetup( this, mxContext, xModel, xPageProps ) ) ); } @@ -418,7 +418,7 @@ SwVbaRange::Fields( const uno::Any& index ) OUString SwVbaRange::getServiceImplName() { - return "SwVbaRange"; + return u"SwVbaRange"_ustr; } uno::Sequence< OUString > @@ -426,7 +426,7 @@ SwVbaRange::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.word.Range" + u"ooo.vba.word.Range"_ustr }; return aServiceNames; } diff --git a/sw/source/ui/vba/vbarange.hxx b/sw/source/ui/vba/vbarange.hxx index f0dd1563503b..6ae7af9113c7 100644 --- a/sw/source/ui/vba/vbarange.hxx +++ b/sw/source/ui/vba/vbarange.hxx @@ -72,7 +72,7 @@ public: virtual css::uno::Reference< ooo::vba::word::XListFormat > SAL_CALL getListFormat() override; //XDefaultProperty - virtual OUString SAL_CALL getDefaultPropertyName() override { return "Text"; } + virtual OUString SAL_CALL getDefaultPropertyName() override { return u"Text"_ustr; } // Methods virtual void SAL_CALL InsertBreak(const css::uno::Any& _breakType) override; diff --git a/sw/source/ui/vba/vbareplacement.cxx b/sw/source/ui/vba/vbareplacement.cxx index bed7aee8d7f3..f53166133128 100644 --- a/sw/source/ui/vba/vbareplacement.cxx +++ b/sw/source/ui/vba/vbareplacement.cxx @@ -51,7 +51,7 @@ void SAL_CALL SwVbaReplacement::ClearFormatting( ) OUString SwVbaReplacement::getServiceImplName() { - return "SwVbaReplacement"; + return u"SwVbaReplacement"_ustr; } uno::Sequence< OUString > @@ -59,7 +59,7 @@ SwVbaReplacement::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.word.Replacement" + u"ooo.vba.word.Replacement"_ustr }; return aServiceNames; } diff --git a/sw/source/ui/vba/vbarevision.cxx b/sw/source/ui/vba/vbarevision.cxx index f8b1c5978d5f..79383e1046e7 100644 --- a/sw/source/ui/vba/vbarevision.cxx +++ b/sw/source/ui/vba/vbarevision.cxx @@ -79,7 +79,7 @@ SwVbaRevision::Reject( ) OUString SwVbaRevision::getServiceImplName() { - return "SwVbaRevision"; + return u"SwVbaRevision"_ustr; } uno::Sequence< OUString > @@ -87,7 +87,7 @@ SwVbaRevision::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.word.Revision" + u"ooo.vba.word.Revision"_ustr }; return aServiceNames; } diff --git a/sw/source/ui/vba/vbarevisions.cxx b/sw/source/ui/vba/vbarevisions.cxx index bfd8c68eaecc..d5ec68d07cf7 100644 --- a/sw/source/ui/vba/vbarevisions.cxx +++ b/sw/source/ui/vba/vbarevisions.cxx @@ -169,7 +169,7 @@ void SAL_CALL SwVbaRevisions::RejectAll( ) OUString SwVbaRevisions::getServiceImplName() { - return "SwVbaRevisions"; + return u"SwVbaRevisions"_ustr; } css::uno::Sequence<OUString> @@ -177,7 +177,7 @@ SwVbaRevisions::getServiceNames() { static uno::Sequence< OUString > const sNames { - "ooo.vba.word.Revisions" + u"ooo.vba.word.Revisions"_ustr }; return sNames; } diff --git a/sw/source/ui/vba/vbarow.cxx b/sw/source/ui/vba/vbarow.cxx index aa4f7701fd0c..75b56d06a073 100644 --- a/sw/source/ui/vba/vbarow.cxx +++ b/sw/source/ui/vba/vbarow.cxx @@ -47,7 +47,7 @@ uno::Any SAL_CALL SwVbaRow::getHeight() return uno::Any( sal_Int32( word::WdConstants::wdUndefined ) ); sal_Int32 nHeight = 0; - mxRowProps->getPropertyValue("Height") >>= nHeight; + mxRowProps->getPropertyValue(u"Height"_ustr) >>= nHeight; return uno::Any( static_cast<float>(Millimeter::getInPoints( nHeight )) ); } @@ -57,20 +57,20 @@ void SAL_CALL SwVbaRow::setHeight( const uno::Any& _height ) _height >>= height; sal_Int32 nHeight = Millimeter::getInHundredthsOfOneMillimeter( height ); - mxRowProps->setPropertyValue("Height", uno::Any( nHeight ) ); + mxRowProps->setPropertyValue(u"Height"_ustr, uno::Any( nHeight ) ); } ::sal_Int32 SAL_CALL SwVbaRow::getHeightRule() { bool isAutoHeight = false; - mxRowProps->getPropertyValue("IsAutoHeight") >>= isAutoHeight; + mxRowProps->getPropertyValue(u"IsAutoHeight"_ustr) >>= isAutoHeight; return isAutoHeight ? word::WdRowHeightRule::wdRowHeightAuto : word::WdRowHeightRule::wdRowHeightExactly; } void SAL_CALL SwVbaRow::setHeightRule( ::sal_Int32 _heightrule ) { bool isAutoHeight = ( _heightrule == word::WdRowHeightRule::wdRowHeightAuto ); - mxRowProps->setPropertyValue("IsAutoHeight", uno::Any( isAutoHeight ) ); + mxRowProps->setPropertyValue(u"IsAutoHeight"_ustr, uno::Any( isAutoHeight ) ); } void SAL_CALL @@ -105,7 +105,7 @@ void SAL_CALL SwVbaRow::SetHeight( float height, sal_Int32 heightrule ) OUString SwVbaRow::getServiceImplName() { - return "SwVbaRow"; + return u"SwVbaRow"_ustr; } uno::Sequence< OUString > @@ -113,7 +113,7 @@ SwVbaRow::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.word.Row" + u"ooo.vba.word.Row"_ustr }; return aServiceNames; } diff --git a/sw/source/ui/vba/vbarows.cxx b/sw/source/ui/vba/vbarows.cxx index 2b757ff31fb0..b81c723f6f17 100644 --- a/sw/source/ui/vba/vbarows.cxx +++ b/sw/source/ui/vba/vbarows.cxx @@ -85,7 +85,7 @@ SwVbaRows::SwVbaRows( const uno::Reference< XHelperInterface >& xParent, const u { sal_Int16 nAlignment = text::HoriOrientation::LEFT; uno::Reference< beans::XPropertySet > xTableProps( mxTextTable, uno::UNO_QUERY_THROW ); - xTableProps->getPropertyValue("HoriOrient") >>= nAlignment; + xTableProps->getPropertyValue(u"HoriOrient"_ustr) >>= nAlignment; sal_Int32 nRet = 0; switch( nAlignment ) { @@ -128,7 +128,7 @@ void SAL_CALL SwVbaRows::setAlignment( ::sal_Int32 _alignment ) } } uno::Reference< beans::XPropertySet > xTableProps( mxTextTable, uno::UNO_QUERY_THROW ); - xTableProps->setPropertyValue("HoriOrient", uno::Any( nAlignment ) ); + xTableProps->setPropertyValue(u"HoriOrient"_ustr, uno::Any( nAlignment ) ); } uno::Any SAL_CALL SwVbaRows::getAllowBreakAcrossPages() @@ -139,7 +139,7 @@ uno::Any SAL_CALL SwVbaRows::getAllowBreakAcrossPages() { uno::Reference< beans::XPropertySet > xRowProps( xRowsAccess->getByIndex( index ), uno::UNO_QUERY_THROW ); bool bSplit = false; - xRowProps->getPropertyValue("IsSplitAllowed") >>= bSplit; + xRowProps->getPropertyValue(u"IsSplitAllowed"_ustr) >>= bSplit; if( index == 0 ) { bAllowBreak = bSplit; @@ -160,7 +160,7 @@ void SAL_CALL SwVbaRows::setAllowBreakAcrossPages( const uno::Any& _allowbreakac for( sal_Int32 index = mnStartRowIndex; index <= mnEndRowIndex; ++index ) { uno::Reference< beans::XPropertySet > xRowProps( xRowsAccess->getByIndex( index ), uno::UNO_QUERY_THROW ); - xRowProps->setPropertyValue("IsSplitAllowed", uno::Any( bAllowBreak ) ); + xRowProps->setPropertyValue(u"IsSplitAllowed"_ustr, uno::Any( bAllowBreak ) ); } } @@ -171,8 +171,8 @@ float SAL_CALL SwVbaRows::getSpaceBetweenColumns() uno::Reference< beans::XPropertySet > xCellProps( xCellRange->getCellByPosition( 0, mnStartRowIndex ), uno::UNO_QUERY_THROW ); sal_Int32 nLeftBorderDistance = 0; sal_Int32 nRightBorderDistance = 0; - xCellProps->getPropertyValue("LeftBorderDistance") >>= nLeftBorderDistance; - xCellProps->getPropertyValue("RightBorderDistance") >>= nRightBorderDistance; + xCellProps->getPropertyValue(u"LeftBorderDistance"_ustr) >>= nLeftBorderDistance; + xCellProps->getPropertyValue(u"RightBorderDistance"_ustr) >>= nRightBorderDistance; return static_cast< float >( Millimeter::getInPoints( nLeftBorderDistance + nRightBorderDistance ) ); } @@ -188,8 +188,8 @@ void SAL_CALL SwVbaRows::setSpaceBetweenColumns( float _spacebetweencolumns ) for( sal_Int32 column = 0; column < nColumns; ++column ) { uno::Reference< beans::XPropertySet > xCellProps( xCellRange->getCellByPosition( column, row ), uno::UNO_QUERY_THROW ); - xCellProps->setPropertyValue("LeftBorderDistance", uno::Any( nSpace ) ); - xCellProps->setPropertyValue("RightBorderDistance", uno::Any( nSpace ) ); + xCellProps->setPropertyValue(u"LeftBorderDistance"_ustr, uno::Any( nSpace ) ); + xCellProps->setPropertyValue(u"RightBorderDistance"_ustr, uno::Any( nSpace ) ); } } } @@ -236,9 +236,9 @@ void SwVbaRows::setIndentWithAdjustNone( sal_Int32 indent ) { uno::Reference< beans::XPropertySet > xTableProps( mxTextTable, uno::UNO_QUERY_THROW ); sal_Int32 nMargin = 0; - xTableProps->getPropertyValue("LeftMargin") >>= nMargin; + xTableProps->getPropertyValue(u"LeftMargin"_ustr) >>= nMargin; nMargin += indent; - xTableProps->setPropertyValue("LeftMargin", uno::Any( nMargin ) ); + xTableProps->setPropertyValue(u"LeftMargin"_ustr, uno::Any( nMargin ) ); } void SwVbaRows::setIndentWithAdjustFirstColumn( const uno::Reference< word::XColumns >& xColumns, sal_Int32 indent ) @@ -259,13 +259,13 @@ void SwVbaRows::setIndentWithAdjustNone( sal_Int32 indent ) // calculate the new width and get the proportion between old and new uno::Reference< beans::XPropertySet > xTableProps( mxTextTable, uno::UNO_QUERY_THROW ); sal_Int32 nWidth = 0; - xTableProps->getPropertyValue("Width") >>= nWidth; + xTableProps->getPropertyValue(u"Width"_ustr) >>= nWidth; sal_Int32 nNewWidth = nWidth - indent; if ((nNewWidth <= 0) || (nWidth <= 0)) { throw uno::RuntimeException( - "Pb with width, in SwVbaRows::setIndentWithAdjustProportional " - "(nNewWidth <= 0) || (nWidth <= 0)" + u"Pb with width, in SwVbaRows::setIndentWithAdjustProportional " + "(nNewWidth <= 0) || (nWidth <= 0)"_ustr ); } double propFactor = static_cast<double>(nNewWidth)/static_cast<double>(nWidth); @@ -283,7 +283,7 @@ void SwVbaRows::setIndentWithAdjustNone( sal_Int32 indent ) // set the width and position of the table setIndentWithAdjustNone( indent ); - xTableProps->setPropertyValue("Width", uno::Any( nNewWidth ) ); + xTableProps->setPropertyValue(u"Width"_ustr, uno::Any( nNewWidth ) ); } void SwVbaRows::setIndentWithAdjustSameWidth( const uno::Reference< word::XColumns >& xColumns, sal_Int32 indent ) @@ -291,7 +291,7 @@ void SwVbaRows::setIndentWithAdjustNone( sal_Int32 indent ) // calculate the new width and get the width of all columns uno::Reference< beans::XPropertySet > xTableProps( mxTextTable, uno::UNO_QUERY_THROW ); sal_Int32 nWidth = 0; - xTableProps->getPropertyValue("Width") >>= nWidth; + xTableProps->getPropertyValue(u"Width"_ustr) >>= nWidth; sal_Int32 nNewWidth = nWidth - indent; // get all columns, calculate and set the new width of the columns @@ -306,7 +306,7 @@ void SwVbaRows::setIndentWithAdjustNone( sal_Int32 indent ) // set the width and position of the table setIndentWithAdjustNone( indent ); - xTableProps->setPropertyValue("Width", uno::Any( nNewWidth ) ); + xTableProps->setPropertyValue(u"Width"_ustr, uno::Any( nNewWidth ) ); } void SAL_CALL SwVbaRows::Select( ) @@ -326,11 +326,11 @@ uno::Any SAL_CALL SwVbaRows::Item( const uno::Any& Index1, const uno::Any& /*not { if( nIndex <= 0 || nIndex > getCount() ) { - throw lang::IndexOutOfBoundsException("Index out of bounds" ); + throw lang::IndexOutOfBoundsException(u"Index out of bounds"_ustr ); } return uno::Any( uno::Reference< word::XRow >( new SwVbaRow( this, mxContext, mxTextTable, nIndex - 1 ) ) ); } - throw uno::RuntimeException("Index out of bounds" ); + throw uno::RuntimeException(u"Index out of bounds"_ustr ); } // XEnumerationAccess @@ -354,7 +354,7 @@ SwVbaRows::createCollectionObject( const uno::Any& aSource ) OUString SwVbaRows::getServiceImplName() { - return "SwVbaRows"; + return u"SwVbaRows"_ustr; } uno::Sequence<OUString> @@ -362,7 +362,7 @@ SwVbaRows::getServiceNames() { static uno::Sequence< OUString > const sNames { - "ooo.vba.word.Rows" + u"ooo.vba.word.Rows"_ustr }; return sNames; } diff --git a/sw/source/ui/vba/vbasection.cxx b/sw/source/ui/vba/vbasection.cxx index 40ecdaabd5cb..a63d6f4a50d8 100644 --- a/sw/source/ui/vba/vbasection.cxx +++ b/sw/source/ui/vba/vbasection.cxx @@ -68,7 +68,7 @@ SwVbaSection::PageSetup( ) OUString SwVbaSection::getServiceImplName() { - return "SwVbaSection"; + return u"SwVbaSection"_ustr; } uno::Sequence< OUString > @@ -76,7 +76,7 @@ SwVbaSection::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.word.Section" + u"ooo.vba.word.Section"_ustr }; return aServiceNames; } diff --git a/sw/source/ui/vba/vbasections.cxx b/sw/source/ui/vba/vbasections.cxx index fe9315ebf66d..a9c4442e4e6e 100644 --- a/sw/source/ui/vba/vbasections.cxx +++ b/sw/source/ui/vba/vbasections.cxx @@ -68,7 +68,7 @@ public: { uno::Reference< style::XStyleFamiliesSupplier > xSytleFamSupp( mxModel, uno::UNO_QUERY_THROW ); uno::Reference< container::XNameAccess > xSytleFamNames( xSytleFamSupp->getStyleFamilies(), uno::UNO_SET_THROW ); - uno::Reference< container::XIndexAccess > xPageStyles( xSytleFamNames->getByName("PageStyles"), uno::UNO_QUERY_THROW ); + uno::Reference< container::XIndexAccess > xPageStyles( xSytleFamNames->getByName(u"PageStyles"_ustr), uno::UNO_QUERY_THROW ); sal_Int32 nCount = xPageStyles->getCount(); for( sal_Int32 index = 0; index < nCount; ++index ) { @@ -153,7 +153,7 @@ SwVbaSections::PageSetup( ) uno::Reference< word::XSection > xSection( m_xIndexAccess->getByIndex( 0 ), uno::UNO_QUERY_THROW ); return xSection->PageSetup(); } - throw uno::RuntimeException("There is no section" ); + throw uno::RuntimeException(u"There is no section"_ustr ); } // XEnumerationAccess @@ -179,7 +179,7 @@ SwVbaSections::createCollectionObject( const css::uno::Any& aSource ) OUString SwVbaSections::getServiceImplName() { - return "SwVbaSections"; + return u"SwVbaSections"_ustr; } css::uno::Sequence<OUString> @@ -187,7 +187,7 @@ SwVbaSections::getServiceNames() { static uno::Sequence< OUString > const sNames { - "ooo.vba.word.Sections" + u"ooo.vba.word.Sections"_ustr }; return sNames; } diff --git a/sw/source/ui/vba/vbaselection.cxx b/sw/source/ui/vba/vbaselection.cxx index d983bd2bd2a3..0c2fae7e528e 100644 --- a/sw/source/ui/vba/vbaselection.cxx +++ b/sw/source/ui/vba/vbaselection.cxx @@ -80,9 +80,9 @@ uno::Reference< text::XTextRange > SwVbaSelection::GetSelectedRange() { uno::Reference< text::XTextRange > xTextRange; uno::Reference< lang::XServiceInfo > xServiceInfo( mxModel->getCurrentSelection(), uno::UNO_QUERY_THROW ); - if( !xServiceInfo->supportsService("com.sun.star.text.TextRanges") ) + if( !xServiceInfo->supportsService(u"com.sun.star.text.TextRanges"_ustr) ) { - throw uno::RuntimeException("Not implemented" ); + throw uno::RuntimeException(u"Not implemented"_ustr ); } uno::Reference< container::XIndexAccess > xTextRanges( xServiceInfo, uno::UNO_QUERY_THROW ); @@ -152,7 +152,7 @@ SwVbaSelection::HomeKey( const uno::Any& _unit, const uno::Any& _extend ) } default: { - throw uno::RuntimeException("Not implemented" ); + throw uno::RuntimeException(u"Not implemented"_ustr ); } } } @@ -187,7 +187,7 @@ SwVbaSelection::EndKey( const uno::Any& _unit, const uno::Any& _extend ) } default: { - throw uno::RuntimeException("Not implemented" ); + throw uno::RuntimeException(u"Not implemented"_ustr ); } } } @@ -213,11 +213,11 @@ SwVbaSelection::Delete( const uno::Any& _unit, const uno::Any& _count ) } default: { - throw uno::RuntimeException("Not implemented" ); + throw uno::RuntimeException(u"Not implemented"_ustr ); } } } - dispatchRequests( mxModel,".uno:Delete" ); + dispatchRequests( mxModel,u".uno:Delete"_ustr ); } void @@ -255,7 +255,7 @@ SwVbaSelection::Move( const uno::Any& _unit, const uno::Any& _count, const uno:: { if( eDirection == word::MOVE_LEFT || eDirection == word::MOVE_RIGHT ) { - throw uno::RuntimeException("Not implemented" ); + throw uno::RuntimeException(u"Not implemented"_ustr ); } uno::Reference< view::XViewCursor > xViewCursor( mxTextViewCursor, uno::UNO_QUERY_THROW ); if( eDirection == word::MOVE_UP ) @@ -268,7 +268,7 @@ SwVbaSelection::Move( const uno::Any& _unit, const uno::Any& _count, const uno:: { if( eDirection == word::MOVE_UP || eDirection == word::MOVE_DOWN ) { - throw uno::RuntimeException("Not implemented" ); + throw uno::RuntimeException(u"Not implemented"_ustr ); } if( word::gotoSelectedObjectAnchor( mxModel ) ) { @@ -284,7 +284,7 @@ SwVbaSelection::Move( const uno::Any& _unit, const uno::Any& _count, const uno:: { uno::Reference< beans::XPropertySet > xCursorProps( mxTextViewCursor, uno::UNO_QUERY_THROW ); uno::Reference< text::XTextTable > xTextTable; - xCursorProps->getPropertyValue("TextTable") >>= xTextTable; + xCursorProps->getPropertyValue(u"TextTable"_ustr) >>= xTextTable; if( xTextTable.is() ) { uno::Reference< text::XTextRange > xRange( xTextTable->getCellByName( xTextTableCursor->getRangeName()), uno::UNO_QUERY_THROW ); @@ -308,7 +308,7 @@ SwVbaSelection::Move( const uno::Any& _unit, const uno::Any& _count, const uno:: { if( eDirection == word::MOVE_LEFT || eDirection == word::MOVE_RIGHT ) { - throw uno::RuntimeException("Not implemented" ); + throw uno::RuntimeException(u"Not implemented"_ustr ); } uno::Reference< text::XParagraphCursor > xParagraphCursor( xTextCursor, uno::UNO_QUERY_THROW ); for( sal_Int32 i=0; i<nCount; i++ ) @@ -323,7 +323,7 @@ SwVbaSelection::Move( const uno::Any& _unit, const uno::Any& _count, const uno:: { if( eDirection == word::MOVE_UP || eDirection == word::MOVE_DOWN ) { - throw uno::RuntimeException("Not implemented" ); + throw uno::RuntimeException(u"Not implemented"_ustr ); } uno::Reference< text::XWordCursor > xWordCursor( xTextCursor, uno::UNO_QUERY_THROW ); for( sal_Int32 i=0; i<nCount; i++ ) @@ -340,7 +340,7 @@ SwVbaSelection::Move( const uno::Any& _unit, const uno::Any& _count, const uno:: } default: { - throw uno::RuntimeException("Not implemented" ); + throw uno::RuntimeException(u"Not implemented"_ustr ); } } } @@ -350,8 +350,8 @@ void SwVbaSelection::NextCell(sal_Int32 nCount, word::E_DIRECTION eDirection) uno::Reference< beans::XPropertySet > xCursorProps( mxTextViewCursor, uno::UNO_QUERY_THROW ); uno::Reference< text::XTextTable > xTextTable; uno::Reference< table::XCell > xCell; - xCursorProps->getPropertyValue("TextTable") >>= xTextTable; - xCursorProps->getPropertyValue("Cell") >>= xCell; + xCursorProps->getPropertyValue(u"TextTable"_ustr) >>= xTextTable; + xCursorProps->getPropertyValue(u"Cell"_ustr) >>= xCell; if( !xTextTable.is() || !xCell.is() ) { DebugHelper::basicexception(ERRCODE_BASIC_BAD_ARGUMENT, {}); @@ -359,7 +359,7 @@ void SwVbaSelection::NextCell(sal_Int32 nCount, word::E_DIRECTION eDirection) } uno::Reference< beans::XPropertySet > xCellProps( xCell, uno::UNO_QUERY_THROW ); OUString aCellName; - xCellProps->getPropertyValue("CellName") >>= aCellName; + xCellProps->getPropertyValue(u"CellName"_ustr) >>= aCellName; uno::Reference< text::XTextTableCursor > xTextTableCursor = xTextTable->createCursorByCellName( aCellName ); // move the table cursor switch( eDirection ) @@ -554,7 +554,7 @@ SwVbaSelection::getFont() void SAL_CALL SwVbaSelection::TypeBackspace() { - dispatchRequests( mxModel,".uno:SwBackspace" ); + dispatchRequests( mxModel,u".uno:SwBackspace"_ustr ); } uno::Reference< word::XRange > SAL_CALL SwVbaSelection::GoTo( const uno::Any& _what, const uno::Any& _which, const uno::Any& _count, const uno::Any& _name ) @@ -651,12 +651,12 @@ uno::Reference< word::XRange > SAL_CALL SwVbaSelection::GoTo( const uno::Any& _w } } if( nPage == 0 ) - throw uno::RuntimeException("Not implemented" ); + throw uno::RuntimeException(u"Not implemented"_ustr ); xPageCursor->jumpToPage( static_cast<sal_Int16>(nPage) ); break; } default: - throw uno::RuntimeException("Not implemented" ); + throw uno::RuntimeException(u"Not implemented"_ustr ); } return getRange(); } @@ -695,7 +695,7 @@ uno::Any SAL_CALL SwVbaSelection::Information( sal_Int32 _type ) { uno::Reference< beans::XPropertySet > xCursorProps( mxTextViewCursor, uno::UNO_QUERY_THROW ); uno::Reference< text::XTextTable > xTextTable; - xCursorProps->getPropertyValue("TextTable") >>= xTextTable; + xCursorProps->getPropertyValue(u"TextTable"_ustr) >>= xTextTable; result <<= xTextTable.is(); break; } @@ -736,7 +736,7 @@ uno::Any SAL_CALL SwVbaSelection::Information( sal_Int32 _type ) { uno::Reference< beans::XPropertySet > xCursorProps( mxTextViewCursor, uno::UNO_QUERY_THROW ); OUString aPageStyleName; - xCursorProps->getPropertyValue("PageStyleName") >>= aPageStyleName; + xCursorProps->getPropertyValue(u"PageStyleName"_ustr) >>= aPageStyleName; bool bFirstPage = false; if ( aPageStyleName == "First Page" ) bFirstPage = true; @@ -765,7 +765,7 @@ uno::Any SAL_CALL SwVbaSelection::Information( sal_Int32 _type ) break; } default: - throw uno::RuntimeException("Not implemented" ); + throw uno::RuntimeException(u"Not implemented"_ustr ); } return result; } @@ -793,7 +793,7 @@ SwVbaSelection::Tables( const uno::Any& aIndex ) uno::Reference< beans::XPropertySet > xCursorProps( mxTextViewCursor, uno::UNO_QUERY_THROW ); uno::Reference< text::XTextTable > xTextTable; - xCursorProps->getPropertyValue("TextTable") >>= xTextTable; + xCursorProps->getPropertyValue(u"TextTable"_ustr) >>= xTextTable; if( xTextTable.is() ) { uno::Reference< css::text::XTextDocument > xTextDoc( mxModel, uno::UNO_QUERY_THROW ); @@ -952,7 +952,7 @@ uno::Reference< text::XTextTable > SwVbaSelection::GetXTextTable() const { uno::Reference< beans::XPropertySet > xCursorProps( mxTextViewCursor, uno::UNO_QUERY_THROW ); uno::Reference< text::XTextTable > xTextTable; - xCursorProps->getPropertyValue("TextTable") >>= xTextTable; + xCursorProps->getPropertyValue(u"TextTable"_ustr) >>= xTextTable; return xTextTable; } @@ -974,7 +974,7 @@ void SwVbaSelection::GetSelectedCellRange( OUString& sTLName, OUString& sBRName { uno::Reference< beans::XPropertySet > xCursorProps( mxTextViewCursor, uno::UNO_QUERY_THROW ); uno::Reference< text::XTextTable > xTextTable; - xCursorProps->getPropertyValue("TextTable") >>= xTextTable; + xCursorProps->getPropertyValue(u"TextTable"_ustr) >>= xTextTable; if( !xTextTable.is() ) throw uno::RuntimeException( ); @@ -992,13 +992,13 @@ void SwVbaSelection::GetSelectedCellRange( OUString& sTLName, OUString& sBRName if( sTLName.isEmpty() ) { uno::Reference< table::XCell > xCell; - xCursorProps->getPropertyValue("Cell") >>= xCell; + xCursorProps->getPropertyValue(u"Cell"_ustr) >>= xCell; if( !xCell.is() ) { throw uno::RuntimeException( ); } uno::Reference< beans::XPropertySet > xCellProps( xCell, uno::UNO_QUERY_THROW ); - xCellProps->getPropertyValue("CellName") >>= sTLName; + xCellProps->getPropertyValue(u"CellName"_ustr) >>= sTLName; } } @@ -1035,7 +1035,7 @@ uno::Any SAL_CALL SwVbaSelection::Cells( const uno::Any& index ) void SAL_CALL SwVbaSelection::Copy( ) { - dispatchRequests( mxModel,".uno:Copy" ); + dispatchRequests( mxModel,u".uno:Copy"_ustr ); } void SAL_CALL SwVbaSelection::CopyAsPicture( ) @@ -1046,7 +1046,7 @@ void SAL_CALL SwVbaSelection::CopyAsPicture( ) void SAL_CALL SwVbaSelection::Paste( ) { - dispatchRequests( mxModel,".uno:Paste" ); + dispatchRequests( mxModel,u".uno:Paste"_ustr ); } void SAL_CALL SwVbaSelection::Collapse( const uno::Any& Direction ) @@ -1093,7 +1093,7 @@ void SAL_CALL SwVbaSelection::WholeStory( ) // insert an empty line uno::Reference< text::XTextRange > xFirstCellRange = word::getFirstObjectPosition( xText ); mxTextViewCursor->gotoRange( xFirstCellRange, false ); - dispatchRequests( mxModel,".uno:InsertPara" ); + dispatchRequests( mxModel,u".uno:InsertPara"_ustr ); } } uno::Reference< text::XTextRange > xStart = xText->getStart(); @@ -1153,7 +1153,7 @@ SwVbaSelection::Paragraphs( const uno::Any& aIndex ) OUString SwVbaSelection::getServiceImplName() { - return "SwVbaSelection"; + return u"SwVbaSelection"_ustr; } uno::Sequence< OUString > @@ -1161,7 +1161,7 @@ SwVbaSelection::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.word.Selection" + u"ooo.vba.word.Selection"_ustr }; return aServiceNames; } diff --git a/sw/source/ui/vba/vbastyle.cxx b/sw/source/ui/vba/vbastyle.cxx index 771e03ae3335..ea637a53110b 100644 --- a/sw/source/ui/vba/vbastyle.cxx +++ b/sw/source/ui/vba/vbastyle.cxx @@ -51,14 +51,14 @@ SwVbaStyle::getName() LanguageType SwVbaStyle::getLanguageID( const uno::Reference< beans::XPropertySet >& xTCProps ) { lang::Locale aLocale; - xTCProps->getPropertyValue("CharLocale") >>= aLocale; + xTCProps->getPropertyValue(u"CharLocale"_ustr) >>= aLocale; return LanguageTag::convertToLanguageType( aLocale, false); } void SwVbaStyle::setLanguageID( const uno::Reference< beans::XPropertySet >& xTCProps, LanguageType _languageid ) { lang::Locale aLocale = LanguageTag( _languageid ).getLocale(); - xTCProps->setPropertyValue("CharLocale", uno::Any( aLocale ) ) ; + xTCProps->setPropertyValue(u"CharLocale"_ustr, uno::Any( aLocale ) ) ; } ::sal_Int32 SAL_CALL SwVbaStyle::getLanguageID() @@ -75,9 +75,9 @@ void SAL_CALL SwVbaStyle::setLanguageID( ::sal_Int32 _languageid ) { sal_Int32 nType = word::WdStyleType::wdStyleTypeParagraph; uno::Reference< lang::XServiceInfo > xServiceInfo( mxStyle, uno::UNO_QUERY_THROW ); - if( xServiceInfo->supportsService("com.sun.star.style.ParagraphStyle") ) + if( xServiceInfo->supportsService(u"com.sun.star.style.ParagraphStyle"_ustr) ) nType = word::WdStyleType::wdStyleTypeParagraph; - else if( xServiceInfo->supportsService("com.sun.star.style.CharacterStyle") ) + else if( xServiceInfo->supportsService(u"com.sun.star.style.CharacterStyle"_ustr) ) nType = word::WdStyleType::wdStyleTypeCharacter; else nType = word::WdStyleType::wdStyleTypeList; @@ -106,7 +106,7 @@ void SwVbaStyle::setStyle( const uno::Reference< beans::XPropertySet >& xParaPro if( !sStyle.isEmpty() ) { - xParaProps->setPropertyValue("ParaStyleName", uno::Any( sStyle ) ); + xParaProps->setPropertyValue(u"ParaStyleName"_ustr, uno::Any( sStyle ) ); return; } @@ -116,13 +116,13 @@ void SwVbaStyle::setStyle( const uno::Reference< beans::XPropertySet >& xParaPro OUString SAL_CALL SwVbaStyle::getNameLocal() { OUString sNameLocal; - mxStyleProps->getPropertyValue("DisplayName") >>= sNameLocal; + mxStyleProps->getPropertyValue(u"DisplayName"_ustr) >>= sNameLocal; return sNameLocal; } void SAL_CALL SwVbaStyle::setNameLocal( const OUString& _namelocal ) { - mxStyleProps->setPropertyValue("DisplayName", uno::Any( _namelocal ) ); + mxStyleProps->setPropertyValue(u"DisplayName"_ustr, uno::Any( _namelocal ) ); } uno::Reference< word::XParagraphFormat > SAL_CALL SwVbaStyle::getParagraphFormat() @@ -139,20 +139,20 @@ uno::Reference< word::XParagraphFormat > SAL_CALL SwVbaStyle::getParagraphFormat sal_Bool SAL_CALL SwVbaStyle::getAutomaticallyUpdate() { bool isAutoUpdate = false; - mxStyleProps->getPropertyValue("IsAutoUpdate") >>= isAutoUpdate; + mxStyleProps->getPropertyValue(u"IsAutoUpdate"_ustr) >>= isAutoUpdate; return isAutoUpdate; } void SAL_CALL SwVbaStyle::setAutomaticallyUpdate( sal_Bool _automaticallyupdate ) { - mxStyleProps->setPropertyValue("IsAutoUpdate", uno::Any( _automaticallyupdate ) ); + mxStyleProps->setPropertyValue(u"IsAutoUpdate"_ustr, uno::Any( _automaticallyupdate ) ); } uno::Any SAL_CALL SwVbaStyle::getBaseStyle() { // ParentStyle OUString sBaseStyle; - mxStyleProps->getPropertyValue("ParentStyle") >>= sBaseStyle; + mxStyleProps->getPropertyValue(u"ParentStyle"_ustr) >>= sBaseStyle; if( sBaseStyle.isEmpty() ) { throw uno::RuntimeException(); @@ -172,14 +172,14 @@ void SAL_CALL SwVbaStyle::setBaseStyle( const uno::Any& _basestyle ) } OUString sBaseStyle = xStyle->getName(); - mxStyleProps->setPropertyValue("ParentStyle", uno::Any( sBaseStyle ) ); + mxStyleProps->setPropertyValue(u"ParentStyle"_ustr, uno::Any( sBaseStyle ) ); } uno::Any SAL_CALL SwVbaStyle::getNextParagraphStyle() { //FollowStyle OUString sFollowStyle; - mxStyleProps->getPropertyValue("FollowStyle") >>= sFollowStyle; + mxStyleProps->getPropertyValue(u"FollowStyle"_ustr) >>= sFollowStyle; if( sFollowStyle.isEmpty() ) { throw uno::RuntimeException(); @@ -199,20 +199,20 @@ void SAL_CALL SwVbaStyle::setNextParagraphStyle( const uno::Any& _nextparagraphs } OUString sFollowStyle = xStyle->getName(); - mxStyleProps->setPropertyValue("FollowStyle", uno::Any( sFollowStyle ) ); + mxStyleProps->setPropertyValue(u"FollowStyle"_ustr, uno::Any( sFollowStyle ) ); } ::sal_Int32 SAL_CALL SwVbaStyle::getListLevelNumber() { sal_Int16 nNumberingLevel = 0; - mxStyleProps->getPropertyValue("NumberingLevel") >>= nNumberingLevel; + mxStyleProps->getPropertyValue(u"NumberingLevel"_ustr) >>= nNumberingLevel; return nNumberingLevel; } OUString SwVbaStyle::getServiceImplName() { - return "SwVbaStyle"; + return u"SwVbaStyle"_ustr; } uno::Sequence< OUString > @@ -220,7 +220,7 @@ SwVbaStyle::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.word.XStyle" + u"ooo.vba.word.XStyle"_ustr }; return aServiceNames; } diff --git a/sw/source/ui/vba/vbastyle.hxx b/sw/source/ui/vba/vbastyle.hxx index dc7ae051f1a2..df6de21fa5f9 100644 --- a/sw/source/ui/vba/vbastyle.hxx +++ b/sw/source/ui/vba/vbastyle.hxx @@ -66,7 +66,7 @@ public: virtual ::sal_Int32 SAL_CALL getListLevelNumber() override; //XDefaultProperty - virtual OUString SAL_CALL getDefaultPropertyName( ) override { return "Name"; } + virtual OUString SAL_CALL getDefaultPropertyName( ) override { return u"Name"_ustr; } // XHelperInterface virtual OUString getServiceImplName() override; diff --git a/sw/source/ui/vba/vbastyles.cxx b/sw/source/ui/vba/vbastyles.cxx index 5e9ce270ff9e..5e6dcecb740f 100644 --- a/sw/source/ui/vba/vbastyles.cxx +++ b/sw/source/ui/vba/vbastyles.cxx @@ -181,7 +181,7 @@ public: // we only concern about the Paragraph styles uno::Reference< style::XStyleFamiliesSupplier > xStyleSupplier( _xModel, uno::UNO_QUERY_THROW); uno::Reference< container::XNameAccess > xStyleFamilies = xStyleSupplier->getStyleFamilies(); - mxParaStyles.set( xStyleFamilies->getByName("ParagraphStyles"), uno::UNO_QUERY_THROW ); + mxParaStyles.set( xStyleFamilies->getByName(u"ParagraphStyles"_ustr), uno::UNO_QUERY_THROW ); } // XElementAccess virtual uno::Type SAL_CALL getElementType( ) override { return cppu::UnoType<style::XStyle>::get(); } @@ -251,7 +251,7 @@ public: // XEnumerationAccess virtual uno::Reference< container::XEnumeration > SAL_CALL createEnumeration( ) override { - throw uno::RuntimeException("Not implemented" ); + throw uno::RuntimeException(u"Not implemented"_ustr ); } }; @@ -344,14 +344,14 @@ SwVbaStyles::Item( const uno::Any& Index1, const uno::Any& Index2 ) // set the property "NumberingStyleName" if it is a listbullet if( pTable->wdStyleType == word::WdStyleType::wdStyleTypeList ) { - xStyleProps->setPropertyValue("NumberingStyleName", uno::Any( aStyleName ) ); + xStyleProps->setPropertyValue(u"NumberingStyleName"_ustr, uno::Any( aStyleName ) ); } return uno::Any( uno::Reference< word::XStyle >( new SwVbaStyle( this, mxContext, mxModel, xStyleProps ) ) ); } else { SAL_WARN("sw.vba", "the builtin style type is not implemented"); - throw uno::RuntimeException("Not implemented" ); + throw uno::RuntimeException(u"Not implemented"_ustr ); } } } @@ -362,7 +362,7 @@ SwVbaStyles::Item( const uno::Any& Index1, const uno::Any& Index2 ) OUString SwVbaStyles::getServiceImplName() { - return "SwVbaStyles"; + return u"SwVbaStyles"_ustr; } uno::Sequence< OUString > @@ -370,7 +370,7 @@ SwVbaStyles::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.word.XStyles" + u"ooo.vba.word.XStyles"_ustr }; return aServiceNames; } diff --git a/sw/source/ui/vba/vbasystem.cxx b/sw/source/ui/vba/vbasystem.cxx index e09c89554ec9..1414ad008b6b 100644 --- a/sw/source/ui/vba/vbasystem.cxx +++ b/sw/source/ui/vba/vbasystem.cxx @@ -110,7 +110,7 @@ uno::Any PrivateProfileStringListener::getValueEvent() } } #else - throw uno::RuntimeException("Only support on Windows" ); + throw uno::RuntimeException(u"Only support on Windows"_ustr ); #endif } @@ -152,7 +152,7 @@ void PrivateProfileStringListener::setValueEvent( const css::uno::Any& value ) } return; #else - throw uno::RuntimeException("Not implemented" ); + throw uno::RuntimeException(u"Not implemented"_ustr ); #endif } @@ -222,7 +222,7 @@ SwVbaSystem::setCursor( sal_Int32 _cursor ) break; } default: - throw uno::RuntimeException("Unknown value for Cursor pointer" ); + throw uno::RuntimeException(u"Unknown value for Cursor pointer"_ustr ); // TODO: isn't this a flaw in the API? It should be allowed to throw an // IllegalArgumentException, or so } @@ -259,7 +259,7 @@ SwVbaSystem::PrivateProfileString( const OUString& rFilename, const OUString& rS OUString SwVbaSystem::getServiceImplName() { - return "SwVbaSystem"; + return u"SwVbaSystem"_ustr; } uno::Sequence< OUString > @@ -267,7 +267,7 @@ SwVbaSystem::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.word.System" + u"ooo.vba.word.System"_ustr }; return aServiceNames; } diff --git a/sw/source/ui/vba/vbatable.cxx b/sw/source/ui/vba/vbatable.cxx index 25e370a1c505..0cec73e88975 100644 --- a/sw/source/ui/vba/vbatable.cxx +++ b/sw/source/ui/vba/vbatable.cxx @@ -100,7 +100,7 @@ SwVbaTable::getBottomPadding() { uno::Reference< beans::XPropertySet > xPropertySet( mxTextTable, uno::UNO_QUERY_THROW); table::TableBorderDistances aTableBorderDistances; - xPropertySet->getPropertyValue("TableBorderDistances") >>= aTableBorderDistances; + xPropertySet->getPropertyValue(u"TableBorderDistances"_ustr) >>= aTableBorderDistances; return convertMm100ToPoint(aTableBorderDistances.BottomDistance); } @@ -111,7 +111,7 @@ SwVbaTable::setBottomPadding( double fValue ) table::TableBorderDistances aTableBorderDistances; aTableBorderDistances.IsBottomDistanceValid = true; aTableBorderDistances.BottomDistance = convertPointToMm100(fValue); - xPropertySet->setPropertyValue( "TableBorderDistances", uno::Any( aTableBorderDistances ) ); + xPropertySet->setPropertyValue( u"TableBorderDistances"_ustr, uno::Any( aTableBorderDistances ) ); } double SAL_CALL @@ -119,7 +119,7 @@ SwVbaTable::getLeftPadding() { uno::Reference< beans::XPropertySet > xPropertySet( mxTextTable, uno::UNO_QUERY_THROW); table::TableBorderDistances aTableBorderDistances; - xPropertySet->getPropertyValue("TableBorderDistances") >>= aTableBorderDistances; + xPropertySet->getPropertyValue(u"TableBorderDistances"_ustr) >>= aTableBorderDistances; return convertMm100ToPoint(aTableBorderDistances.LeftDistance); } @@ -130,7 +130,7 @@ SwVbaTable::setLeftPadding( double fValue ) table::TableBorderDistances aTableBorderDistances; aTableBorderDistances.IsLeftDistanceValid = true; aTableBorderDistances.LeftDistance = convertPointToMm100(fValue); - xPropertySet->setPropertyValue( "TableBorderDistances", uno::Any( aTableBorderDistances ) ); + xPropertySet->setPropertyValue( u"TableBorderDistances"_ustr, uno::Any( aTableBorderDistances ) ); } double SAL_CALL @@ -138,7 +138,7 @@ SwVbaTable::getRightPadding() { uno::Reference< beans::XPropertySet > xPropertySet( mxTextTable, uno::UNO_QUERY_THROW); table::TableBorderDistances aTableBorderDistances; - xPropertySet->getPropertyValue("TableBorderDistances") >>= aTableBorderDistances; + xPropertySet->getPropertyValue(u"TableBorderDistances"_ustr) >>= aTableBorderDistances; return convertMm100ToPoint(aTableBorderDistances.RightDistance); } @@ -149,7 +149,7 @@ SwVbaTable::setRightPadding( double fValue ) table::TableBorderDistances aTableBorderDistances; aTableBorderDistances.IsRightDistanceValid = true; aTableBorderDistances.RightDistance = convertPointToMm100(fValue); - xPropertySet->setPropertyValue( "TableBorderDistances", uno::Any( aTableBorderDistances ) ); + xPropertySet->setPropertyValue( u"TableBorderDistances"_ustr, uno::Any( aTableBorderDistances ) ); } double SAL_CALL @@ -157,7 +157,7 @@ SwVbaTable::getTopPadding() { uno::Reference< beans::XPropertySet > xPropertySet( mxTextTable, uno::UNO_QUERY_THROW); table::TableBorderDistances aTableBorderDistances; - xPropertySet->getPropertyValue("TableBorderDistances") >>= aTableBorderDistances; + xPropertySet->getPropertyValue(u"TableBorderDistances"_ustr) >>= aTableBorderDistances; return convertMm100ToPoint(aTableBorderDistances.TopDistance); } @@ -168,7 +168,7 @@ SwVbaTable::setTopPadding( double fValue ) table::TableBorderDistances aTableBorderDistances; aTableBorderDistances.IsTopDistanceValid = true; aTableBorderDistances.TopDistance = convertPointToMm100(fValue); - xPropertySet->setPropertyValue( "TableBorderDistances", uno::Any( aTableBorderDistances ) ); + xPropertySet->setPropertyValue( u"TableBorderDistances"_ustr, uno::Any( aTableBorderDistances ) ); } uno::Any SAL_CALL @@ -195,7 +195,7 @@ SwVbaTable::Columns( const uno::Any& index ) OUString SwVbaTable::getServiceImplName() { - return "SwVbaTable"; + return u"SwVbaTable"_ustr; } uno::Sequence<OUString> @@ -203,7 +203,7 @@ SwVbaTable::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.word.Table" + u"ooo.vba.word.Table"_ustr }; return aServiceNames; } diff --git a/sw/source/ui/vba/vbatablehelper.cxx b/sw/source/ui/vba/vbatablehelper.cxx index 2d7a1b393ef8..a5908635b9f8 100644 --- a/sw/source/ui/vba/vbatablehelper.cxx +++ b/sw/source/ui/vba/vbatablehelper.cxx @@ -122,14 +122,14 @@ sal_Int32 SwVbaTableHelper::getTableWidth( ) const sal_Int32 nWidth = 0; bool isWidthRelatvie = false; uno::Reference< beans::XPropertySet > xTableProps( mxTextTable, uno::UNO_QUERY_THROW ); - xTableProps->getPropertyValue("IsWidthRelative") >>= isWidthRelatvie; + xTableProps->getPropertyValue(u"IsWidthRelative"_ustr) >>= isWidthRelatvie; if( isWidthRelatvie ) { - xTableProps->getPropertyValue("RelativeWidth") >>= nWidth; + xTableProps->getPropertyValue(u"RelativeWidth"_ustr) >>= nWidth; } else { - xTableProps->getPropertyValue("Width") >>= nWidth; + xTableProps->getPropertyValue(u"Width"_ustr) >>= nWidth; } return nWidth; } diff --git a/sw/source/ui/vba/vbatableofcontents.cxx b/sw/source/ui/vba/vbatableofcontents.cxx index e0d80cfb1c83..88f316981206 100644 --- a/sw/source/ui/vba/vbatableofcontents.cxx +++ b/sw/source/ui/vba/vbatableofcontents.cxx @@ -37,13 +37,13 @@ SwVbaTableOfContents::~SwVbaTableOfContents() ::sal_Int32 SAL_CALL SwVbaTableOfContents::getLowerHeadingLevel() { sal_Int16 nLevel = 0; - mxTocProps->getPropertyValue("Level") >>= nLevel; + mxTocProps->getPropertyValue(u"Level"_ustr) >>= nLevel; return nLevel; } void SAL_CALL SwVbaTableOfContents::setLowerHeadingLevel( ::sal_Int32 _lowerheadinglevel ) { - mxTocProps->setPropertyValue("Level", uno::Any( sal_Int8( _lowerheadinglevel ) ) ); + mxTocProps->setPropertyValue(u"Level"_ustr, uno::Any( sal_Int8( _lowerheadinglevel ) ) ); } ::sal_Int32 SAL_CALL SwVbaTableOfContents::getTabLeader() @@ -60,25 +60,25 @@ void SAL_CALL SwVbaTableOfContents::setTabLeader( ::sal_Int32 /*_tableader*/ ) sal_Bool SAL_CALL SwVbaTableOfContents::getUseFields() { bool bUseFields = false; - mxTocProps->getPropertyValue("CreateFromMarks") >>= bUseFields; + mxTocProps->getPropertyValue(u"CreateFromMarks"_ustr) >>= bUseFields; return bUseFields; } void SAL_CALL SwVbaTableOfContents::setUseFields( sal_Bool _useFields ) { - mxTocProps->setPropertyValue("CreateFromMarks", uno::Any( _useFields ) ); + mxTocProps->setPropertyValue(u"CreateFromMarks"_ustr, uno::Any( _useFields ) ); } sal_Bool SAL_CALL SwVbaTableOfContents::getUseOutlineLevels() { bool bUseOutlineLevels = false; - mxTocProps->getPropertyValue("CreateFromOutline") >>= bUseOutlineLevels; + mxTocProps->getPropertyValue(u"CreateFromOutline"_ustr) >>= bUseOutlineLevels; return bUseOutlineLevels; } void SAL_CALL SwVbaTableOfContents::setUseOutlineLevels( sal_Bool _useOutlineLevels ) { - mxTocProps->setPropertyValue("CreateFromOutline", uno::Any( _useOutlineLevels ) ); + mxTocProps->setPropertyValue(u"CreateFromOutline"_ustr, uno::Any( _useOutlineLevels ) ); } void SAL_CALL SwVbaTableOfContents::Delete( ) @@ -95,7 +95,7 @@ void SAL_CALL SwVbaTableOfContents::Update( ) OUString SwVbaTableOfContents::getServiceImplName() { - return "SwVbaTableOfContents"; + return u"SwVbaTableOfContents"_ustr; } uno::Sequence< OUString > @@ -103,7 +103,7 @@ SwVbaTableOfContents::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.word.TableOfContents" + u"ooo.vba.word.TableOfContents"_ustr }; return aServiceNames; } diff --git a/sw/source/ui/vba/vbatables.cxx b/sw/source/ui/vba/vbatables.cxx index b7aa4cadda39..ef07829e0d2e 100644 --- a/sw/source/ui/vba/vbatables.cxx +++ b/sw/source/ui/vba/vbatables.cxx @@ -182,7 +182,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("com.sun.star.text.TextTable"), uno::UNO_QUERY_THROW ); + xTable.set( xMsf->createInstance(u"com.sun.star.text.TextTable"_ustr), uno::UNO_QUERY_THROW ); xTable->initialize( nRows, nCols ); uno::Reference< text::XText > xText = xTextRange->getText(); @@ -216,7 +216,7 @@ SwVbaTables::createCollectionObject( const uno::Any& aSource ) OUString SwVbaTables::getServiceImplName() { - return "SwVbaTables"; + return u"SwVbaTables"_ustr; } // XEnumerationAccess @@ -231,7 +231,7 @@ SwVbaTables::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.word.Tables" + u"ooo.vba.word.Tables"_ustr }; return aServiceNames; } diff --git a/sw/source/ui/vba/vbatablesofcontents.cxx b/sw/source/ui/vba/vbatablesofcontents.cxx index 8df156fecf2d..303b3041257e 100644 --- a/sw/source/ui/vba/vbatablesofcontents.cxx +++ b/sw/source/ui/vba/vbatablesofcontents.cxx @@ -117,10 +117,10 @@ uno::Reference< word::XTableOfContents > SAL_CALL SwVbaTablesOfContents::Add( const uno::Reference< word::XRange >& Range, const uno::Any& /*UseHeadingStyles*/, const uno::Any& /*UpperHeadingLevel*/, const uno::Any& LowerHeadingLevel, const uno::Any& UseFields, const uno::Any& /*TableID*/, const uno::Any& /*RightAlignPageNumbers*/, const uno::Any& /*IncludePageNumbers*/, const uno::Any& /*AddedStyles*/, const uno::Any& /*UseHyperlinks*/, const uno::Any& /*HidePageNumbersInWeb*/, const uno::Any& /*UseOutlineLevels*/ ) { uno::Reference< lang::XMultiServiceFactory > xDocMSF( mxTextDocument, uno::UNO_QUERY_THROW ); - uno::Reference< text::XDocumentIndex > xDocumentIndex( xDocMSF->createInstance("com.sun.star.text.ContentIndex"), uno::UNO_QUERY_THROW ); + uno::Reference< text::XDocumentIndex > xDocumentIndex( xDocMSF->createInstance(u"com.sun.star.text.ContentIndex"_ustr), uno::UNO_QUERY_THROW ); uno::Reference< beans::XPropertySet > xTocProps( xDocumentIndex, uno::UNO_QUERY_THROW ); - xTocProps->setPropertyValue("IsProtected", uno::Any( false ) ); + xTocProps->setPropertyValue(u"IsProtected"_ustr, uno::Any( false ) ); uno::Reference< word::XTableOfContents > xToc( new SwVbaTableOfContents( this, mxContext, mxTextDocument, xDocumentIndex ) ); @@ -170,7 +170,7 @@ SwVbaTablesOfContents::createCollectionObject( const uno::Any& aSource ) OUString SwVbaTablesOfContents::getServiceImplName() { - return "SwVbaTablesOfContents"; + return u"SwVbaTablesOfContents"_ustr; } uno::Sequence<OUString> @@ -178,7 +178,7 @@ SwVbaTablesOfContents::getServiceNames() { static uno::Sequence< OUString > const sNames { - "ooo.vba.word.TablesOfContents" + u"ooo.vba.word.TablesOfContents"_ustr }; return sNames; } diff --git a/sw/source/ui/vba/vbatabstop.cxx b/sw/source/ui/vba/vbatabstop.cxx index 8ebfdfa421a2..73db2259debe 100644 --- a/sw/source/ui/vba/vbatabstop.cxx +++ b/sw/source/ui/vba/vbatabstop.cxx @@ -32,7 +32,7 @@ SwVbaTabStop::~SwVbaTabStop() OUString SwVbaTabStop::getServiceImplName() { - return "SwVbaTabStop"; + return u"SwVbaTabStop"_ustr; } uno::Sequence< OUString > @@ -40,7 +40,7 @@ SwVbaTabStop::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.word.TabStop" + u"ooo.vba.word.TabStop"_ustr }; return aServiceNames; } diff --git a/sw/source/ui/vba/vbatabstops.cxx b/sw/source/ui/vba/vbatabstops.cxx index 7d2d86824a29..39dad2245be5 100644 --- a/sw/source/ui/vba/vbatabstops.cxx +++ b/sw/source/ui/vba/vbatabstops.cxx @@ -34,14 +34,14 @@ using namespace ::com::sun::star; static uno::Sequence< style::TabStop > lcl_getTabStops( const uno::Reference< beans::XPropertySet >& xParaProps ) { uno::Sequence< style::TabStop > aSeq; - xParaProps->getPropertyValue("ParaTabStops") >>= aSeq; + xParaProps->getPropertyValue(u"ParaTabStops"_ustr) >>= aSeq; return aSeq; } /// @throws uno::RuntimeException static void lcl_setTabStops( const uno::Reference< beans::XPropertySet >& xParaProps, const uno::Sequence< style::TabStop >& aSeq ) { - xParaProps->setPropertyValue("ParaTabStops", uno::Any( aSeq ) ); + xParaProps->setPropertyValue(u"ParaTabStops"_ustr, uno::Any( aSeq ) ); } namespace { @@ -254,7 +254,7 @@ SwVbaTabStops::createCollectionObject( const css::uno::Any& aSource ) OUString SwVbaTabStops::getServiceImplName() { - return "SwVbaTabStops"; + return u"SwVbaTabStops"_ustr; } css::uno::Sequence<OUString> @@ -262,7 +262,7 @@ SwVbaTabStops::getServiceNames() { static uno::Sequence< OUString > const sNames { - "ooo.vba.word.TabStops" + u"ooo.vba.word.TabStops"_ustr }; return sNames; } diff --git a/sw/source/ui/vba/vbatemplate.cxx b/sw/source/ui/vba/vbatemplate.cxx index f05b699187c0..10e529ffc1e6 100644 --- a/sw/source/ui/vba/vbatemplate.cxx +++ b/sw/source/ui/vba/vbatemplate.cxx @@ -87,7 +87,7 @@ SwVbaTemplate::AutoTextEntries( const uno::Any& index ) uno::Reference< text::XAutoTextContainer2 > xAutoTextContainer = text::AutoTextContainer::create( xContext ); // the default template is "Normal.dot" in Word. - OUString sGroup("Normal"); + OUString sGroup(u"Normal"_ustr); OUString sName = getName(); sal_Int32 nIndex = sName.lastIndexOf( '.' ); if( nIndex > 0 ) @@ -99,7 +99,7 @@ SwVbaTemplate::AutoTextEntries( const uno::Any& index ) uno::Reference< container::XIndexAccess > xGroup; if( !xAutoTextContainer->hasByName( sNewGroup ) ) { - throw uno::RuntimeException("Auto Text Entry doesn't exist" ); + throw uno::RuntimeException(u"Auto Text Entry doesn't exist"_ustr ); } xGroup.set( xAutoTextContainer->getByName( sNewGroup ), uno::UNO_QUERY_THROW ); @@ -113,7 +113,7 @@ SwVbaTemplate::AutoTextEntries( const uno::Any& index ) OUString SwVbaTemplate::getServiceImplName() { - return "SwVbaTemplate"; + return u"SwVbaTemplate"_ustr; } uno::Sequence< OUString > @@ -121,7 +121,7 @@ SwVbaTemplate::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.word.Template" + u"ooo.vba.word.Template"_ustr }; return aServiceNames; } diff --git a/sw/source/ui/vba/vbavariable.cxx b/sw/source/ui/vba/vbavariable.cxx index dea82686e1b3..5d526338ddaa 100644 --- a/sw/source/ui/vba/vbavariable.cxx +++ b/sw/source/ui/vba/vbavariable.cxx @@ -43,7 +43,7 @@ SwVbaVariable::getName() void SAL_CALL SwVbaVariable::setName( const OUString& ) { - throw uno::RuntimeException(" Fail to set name" ); + throw uno::RuntimeException(u" Fail to set name"_ustr ); } uno::Any SAL_CALL @@ -76,7 +76,7 @@ SwVbaVariable::getIndex() OUString SwVbaVariable::getServiceImplName() { - return "SwVbaVariable"; + return u"SwVbaVariable"_ustr; } uno::Sequence< OUString > @@ -84,7 +84,7 @@ SwVbaVariable::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.word.Variable" + u"ooo.vba.word.Variable"_ustr }; return aServiceNames; } diff --git a/sw/source/ui/vba/vbavariables.cxx b/sw/source/ui/vba/vbavariables.cxx index 6505eb23e049..ec4676bd9003 100644 --- a/sw/source/ui/vba/vbavariables.cxx +++ b/sw/source/ui/vba/vbavariables.cxx @@ -79,7 +79,7 @@ SwVbaVariables::Add( const OUString& rName, const uno::Any& rValue ) OUString SwVbaVariables::getServiceImplName() { - return "SwVbaVariables"; + return u"SwVbaVariables"_ustr; } css::uno::Sequence<OUString> @@ -87,7 +87,7 @@ SwVbaVariables::getServiceNames() { static uno::Sequence< OUString > const sNames { - "ooo.vba.word.Variables" + u"ooo.vba.word.Variables"_ustr }; return sNames; } diff --git a/sw/source/ui/vba/vbaview.cxx b/sw/source/ui/vba/vbaview.cxx index 822c4f93e501..7ce99c27a9fa 100644 --- a/sw/source/ui/vba/vbaview.cxx +++ b/sw/source/ui/vba/vbaview.cxx @@ -64,13 +64,13 @@ SwVbaView::~SwVbaView() sal_Bool SwVbaView::getShowAll() { bool bShowFormattingMarks = false; - mxViewSettings->getPropertyValue("ShowNonprintingCharacters") >>= bShowFormattingMarks; + mxViewSettings->getPropertyValue(u"ShowNonprintingCharacters"_ustr) >>= bShowFormattingMarks; return bShowFormattingMarks; } void SwVbaView::setShowAll(sal_Bool bSet) { - mxViewSettings->setPropertyValue("ShowNonprintingCharacters", uno::Any(bSet)); + mxViewSettings->setPropertyValue(u"ShowNonprintingCharacters"_ustr, uno::Any(bSet)); } ::sal_Int32 SAL_CALL @@ -81,7 +81,7 @@ SwVbaView::getSeekView() uno::Reference< text::XText > xCurrentText = mxViewCursor->getText(); uno::Reference< beans::XPropertySet > xCursorProps( mxViewCursor, uno::UNO_QUERY_THROW ); uno::Reference< text::XTextContent > xTextContent; - while( xCursorProps->getPropertyValue("TextTable") >>= xTextContent ) + while( xCursorProps->getPropertyValue(u"TextTable"_ustr) >>= xTextContent ) { xCurrentText = xTextContent->getAnchor()->getText(); xCursorProps.set( xCurrentText->createTextCursor(), uno::UNO_QUERY_THROW ); @@ -115,7 +115,7 @@ SwVbaView::getSeekView() } else if ( aImplName == "SwXFootnote" ) { - if( xServiceInfo->supportsService("com.sun.star.text.Endnote") ) + if( xServiceInfo->supportsService(u"com.sun.star.text.Endnote"_ustr) ) return word::WdSeekView::wdSeekEndnotes; else return word::WdSeekView::wdSeekFootnotes; @@ -203,14 +203,14 @@ sal_Bool SAL_CALL SwVbaView::getTableGridLines() { bool bShowTableGridLine = false; - mxViewSettings->getPropertyValue("ShowTableBoundaries") >>= bShowTableGridLine; + mxViewSettings->getPropertyValue(u"ShowTableBoundaries"_ustr) >>= bShowTableGridLine; return bShowTableGridLine; } void SAL_CALL SwVbaView::setTableGridLines( sal_Bool _tablegridlines ) { - mxViewSettings->setPropertyValue("ShowTableBoundaries", uno::Any( _tablegridlines ) ); + mxViewSettings->setPropertyValue(u"ShowTableBoundaries"_ustr, uno::Any( _tablegridlines ) ); } ::sal_Int32 SAL_CALL @@ -218,7 +218,7 @@ SwVbaView::getType() { // FIXME: handle wdPrintPreview type bool bOnlineLayout = false; - mxViewSettings->getPropertyValue("ShowOnlineLayout") >>= bOnlineLayout; + mxViewSettings->getPropertyValue(u"ShowOnlineLayout"_ustr) >>= bOnlineLayout; return bOnlineLayout ? word::WdViewType::wdWebView : word::WdViewType::wdPrintView; } @@ -231,12 +231,12 @@ SwVbaView::setType( ::sal_Int32 _type ) case word::WdViewType::wdPrintView: case word::WdViewType::wdNormalView: { - mxViewSettings->setPropertyValue("ShowOnlineLayout", uno::Any( false ) ); + mxViewSettings->setPropertyValue(u"ShowOnlineLayout"_ustr, uno::Any( false ) ); break; } case word::WdViewType::wdWebView: { - mxViewSettings->setPropertyValue("ShowOnlineLayout", uno::Any( true ) ); + mxViewSettings->setPropertyValue(u"ShowOnlineLayout"_ustr, uno::Any( true ) ); break; } case word::WdViewType::wdPrintPreview: @@ -313,7 +313,7 @@ uno::Reference< text::XTextRange > SwVbaView::getHFTextRange( sal_Int32 nType ) // an even page number uno::Reference< beans::XPropertySet > xCursorProps( mxViewCursor, uno::UNO_QUERY_THROW ); OUString aPageStyleName; - xCursorProps->getPropertyValue("PageStyleName") >>= aPageStyleName; + xCursorProps->getPropertyValue(u"PageStyleName"_ustr) >>= aPageStyleName; if ( aPageStyleName == "First Page" ) { // go to the beginning of where the next style is used @@ -383,7 +383,7 @@ uno::Reference< text::XTextRange > SwVbaView::getHFTextRange( sal_Int32 nType ) OUString SwVbaView::getServiceImplName() { - return "SwVbaView"; + return u"SwVbaView"_ustr; } uno::Sequence< OUString > @@ -391,7 +391,7 @@ SwVbaView::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.word.View" + u"ooo.vba.word.View"_ustr }; return aServiceNames; } diff --git a/sw/source/ui/vba/vbawindow.cxx b/sw/source/ui/vba/vbawindow.cxx index 9114f4b8d44d..5597f08b48de 100644 --- a/sw/source/ui/vba/vbawindow.cxx +++ b/sw/source/ui/vba/vbawindow.cxx @@ -118,14 +118,14 @@ SwVbaWindow::getCaption() { SwView* pView = word::getView( m_xModel ); if( !pView ) - return ""; + return u""_ustr; uno::Reference< css::beans::XPropertySet > xFrameProps( pView->GetViewFrame().GetFrame().GetFrameInterface()->getController()->getFrame(), uno::UNO_QUERY ); if( !xFrameProps.is() ) - return ""; + return u""_ustr; OUString sTitle; - xFrameProps->getPropertyValue( "Title" ) >>= sTitle; + xFrameProps->getPropertyValue( u"Title"_ustr ) >>= sTitle; return sTitle; } @@ -141,7 +141,7 @@ SwVbaWindow::setCaption( const OUString& _caption ) if( !xFrameProps.is() ) return; - xFrameProps->setPropertyValue( "Title", uno::Any( _caption ) ); + xFrameProps->setPropertyValue( u"Title"_ustr, uno::Any( _caption ) ); } uno::Any SAL_CALL @@ -163,7 +163,7 @@ SwVbaWindow::ActivePane() OUString SwVbaWindow::getServiceImplName() { - return "SwVbaWindow"; + return u"SwVbaWindow"_ustr; } uno::Sequence< OUString > @@ -171,7 +171,7 @@ SwVbaWindow::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.word.Window" + u"ooo.vba.word.Window"_ustr }; return aServiceNames; } diff --git a/sw/source/ui/vba/vbawordbasic.cxx b/sw/source/ui/vba/vbawordbasic.cxx index f08ed4e0daa8..c6e4d66ea4ff 100644 --- a/sw/source/ui/vba/vbawordbasic.cxx +++ b/sw/source/ui/vba/vbawordbasic.cxx @@ -73,7 +73,7 @@ void SAL_CALL SwWordBasic::FileOpen(const OUString& Name, const uno::Any& Confir void SAL_CALL SwWordBasic::FileSave() { uno::Reference<frame::XModel> xModel(mpApp->getCurrentDocument(), uno::UNO_SET_THROW); - dispatchRequests(xModel, ".uno:Save"); + dispatchRequests(xModel, u".uno:Save"_ustr); } void SAL_CALL SwWordBasic::FileSaveAs( @@ -110,7 +110,7 @@ void SAL_CALL SwWordBasic::FileSaveAs( uno::Reference<util::XPathSettings> xPathSettings = util::thePathSettings::get(comphelper::getProcessComponentContext()); OUString sPathUrl; - xPathSettings->getPropertyValue("Work") >>= sPathUrl; + xPathSettings->getPropertyValue(u"Work"_ustr) >>= sPathUrl; // Path could be a multipath, Microsoft doesn't support this feature in Word currently. // Only the last path is from interest. // No idea if this crack is relevant for WordBasic or not. @@ -132,12 +132,12 @@ void SAL_CALL SwWordBasic::FileSaveAs( sal_Int32 nFileFormat = word::WdSaveFormat::wdFormatDocument; Format >>= nFileFormat; - uno::Sequence aProps{ comphelper::makePropertyValue("FilterName", css::uno::Any()), - comphelper::makePropertyValue("FileName", sURL) }; + uno::Sequence aProps{ comphelper::makePropertyValue(u"FilterName"_ustr, css::uno::Any()), + comphelper::makePropertyValue(u"FileName"_ustr, sURL) }; setFilterPropsFromFormat(nFileFormat, aProps); - dispatchRequests(xModel, ".uno:SaveAs", aProps); + dispatchRequests(xModel, u".uno:SaveAs"_ustr, aProps); } void SAL_CALL SwWordBasic::FileClose(const css::uno::Any& Save) @@ -155,7 +155,7 @@ void SAL_CALL SwWordBasic::FileClose(const css::uno::Any& Save) // FIXME: Error handling. If there is no current document, return some kind of error? But for // now, just ignore errors. This code is written to work for a very specific customer use case // anyway, not for an arbitrary sequence of COM calls to the "VBA" API. - dispatchRequests(xModel, ".uno:CloseDoc"); + dispatchRequests(xModel, u".uno:CloseDoc"_ustr); } void SAL_CALL SwWordBasic::ToolsOptionsView( diff --git a/sw/source/ui/vba/vbawrapformat.cxx b/sw/source/ui/vba/vbawrapformat.cxx index 2aef0523b432..9fab868ff2b4 100644 --- a/sw/source/ui/vba/vbawrapformat.cxx +++ b/sw/source/ui/vba/vbawrapformat.cxx @@ -66,13 +66,13 @@ void SwVbaWrapFormat::makeWrap() case word::WdWrapType::wdWrapSquare: { eTextMode = text::WrapTextMode_PARALLEL; - m_xPropertySet->setPropertyValue("SurroundContour", uno::Any( false ) ); + m_xPropertySet->setPropertyValue(u"SurroundContour"_ustr, uno::Any( false ) ); break; } case word::WdWrapType::wdWrapTight: { eTextMode = text::WrapTextMode_PARALLEL; - m_xPropertySet->setPropertyValue("SurroundContour", uno::Any( true ) ); + m_xPropertySet->setPropertyValue(u"SurroundContour"_ustr, uno::Any( true ) ); break; } default: @@ -81,14 +81,14 @@ void SwVbaWrapFormat::makeWrap() } } } - m_xPropertySet->setPropertyValue("TextWrap", uno::Any( eTextMode ) ); + m_xPropertySet->setPropertyValue(u"TextWrap"_ustr, uno::Any( eTextMode ) ); } ::sal_Int32 SAL_CALL SwVbaWrapFormat::getType() { sal_Int32 nType = word::WdWrapType::wdWrapSquare; text::WrapTextMode eTextMode; - m_xPropertySet->getPropertyValue("TextWrap") >>= eTextMode; + m_xPropertySet->getPropertyValue(u"TextWrap"_ustr) >>= eTextMode; switch( eTextMode ) { case text::WrapTextMode_NONE: @@ -104,7 +104,7 @@ void SwVbaWrapFormat::makeWrap() case text::WrapTextMode_PARALLEL: { bool bContour = false; - m_xPropertySet->getPropertyValue("SurroundContour") >>= bContour; + m_xPropertySet->getPropertyValue(u"SurroundContour"_ustr) >>= bContour; if( bContour ) nType = word::WdWrapType::wdWrapTight; else @@ -136,7 +136,7 @@ void SAL_CALL SwVbaWrapFormat::setType( ::sal_Int32 _type ) { sal_Int32 nSide = word::WdWrapSideType::wdWrapBoth; text::WrapTextMode eTextMode; - m_xPropertySet->getPropertyValue("TextWrap") >>= eTextMode; + m_xPropertySet->getPropertyValue(u"TextWrap"_ustr) >>= eTextMode; switch( eTextMode ) { case text::WrapTextMode_LEFT: @@ -178,48 +178,48 @@ void SwVbaWrapFormat::setDistance( const OUString& sName, float _distance ) float SAL_CALL SwVbaWrapFormat::getDistanceTop() { - return getDistance( "TopMargin" ); + return getDistance( u"TopMargin"_ustr ); } void SAL_CALL SwVbaWrapFormat::setDistanceTop( float _distancetop ) { - setDistance( "TopMargin", _distancetop ); + setDistance( u"TopMargin"_ustr, _distancetop ); } float SAL_CALL SwVbaWrapFormat::getDistanceBottom() { - return getDistance( "BottomMargin" ); + return getDistance( u"BottomMargin"_ustr ); } void SAL_CALL SwVbaWrapFormat::setDistanceBottom( float _distancebottom ) { - setDistance( "BottomMargin", _distancebottom ); + setDistance( u"BottomMargin"_ustr, _distancebottom ); } float SAL_CALL SwVbaWrapFormat::getDistanceLeft() { - return getDistance( "LeftMargin" ); + return getDistance( u"LeftMargin"_ustr ); } void SAL_CALL SwVbaWrapFormat::setDistanceLeft( float _distanceleft ) { - setDistance( "LeftMargin", _distanceleft ); + setDistance( u"LeftMargin"_ustr, _distanceleft ); } float SAL_CALL SwVbaWrapFormat::getDistanceRight() { - return getDistance( "RightMargin" ); + return getDistance( u"RightMargin"_ustr ); } void SAL_CALL SwVbaWrapFormat::setDistanceRight( float _distanceright ) { - setDistance( "RightMargin", _distanceright ); + setDistance( u"RightMargin"_ustr, _distanceright ); } OUString SwVbaWrapFormat::getServiceImplName() { - return "SwVbaWrapFormat"; + return u"SwVbaWrapFormat"_ustr; } uno::Sequence< OUString > @@ -227,7 +227,7 @@ SwVbaWrapFormat::getServiceNames() { static uno::Sequence< OUString > const aServiceNames { - "ooo.vba.word.WrapFormat" + u"ooo.vba.word.WrapFormat"_ustr }; return aServiceNames; } diff --git a/sw/source/ui/vba/wordvbahelper.cxx b/sw/source/ui/vba/wordvbahelper.cxx index 5bf7e26c771b..61abc6dd0c3a 100644 --- a/sw/source/ui/vba/wordvbahelper.cxx +++ b/sw/source/ui/vba/wordvbahelper.cxx @@ -69,10 +69,10 @@ uno::Reference< style::XStyle > getCurrentPageStyle( const uno::Reference< frame uno::Reference< style::XStyle > getCurrentPageStyle( const uno::Reference< frame::XModel >& xModel, const uno::Reference< beans::XPropertySet >& xProps ) { OUString aPageStyleName; - xProps->getPropertyValue("PageStyleName") >>= aPageStyleName; + xProps->getPropertyValue(u"PageStyleName"_ustr) >>= aPageStyleName; uno::Reference< style::XStyleFamiliesSupplier > xSytleFamSupp( xModel, uno::UNO_QUERY_THROW ); uno::Reference< container::XNameAccess > xSytleFamNames( xSytleFamSupp->getStyleFamilies(), uno::UNO_SET_THROW ); - uno::Reference< container::XNameAccess > xPageStyles( xSytleFamNames->getByName("PageStyles"), uno::UNO_QUERY_THROW ); + uno::Reference< container::XNameAccess > xPageStyles( xSytleFamNames->getByName(u"PageStyles"_ustr), uno::UNO_QUERY_THROW ); uno::Reference< style::XStyle > xStyle( xPageStyles->getByName( aPageStyleName ), uno::UNO_QUERY_THROW ); return xStyle; @@ -89,8 +89,8 @@ uno::Reference< style::XStyle > getDefaultParagraphStyle( const uno::Reference< { uno::Reference< style::XStyleFamiliesSupplier > xSytleFamSupp( xModel, uno::UNO_QUERY_THROW ); uno::Reference< container::XNameAccess > xSytleFamNames( xSytleFamSupp->getStyleFamilies(), uno::UNO_SET_THROW ); - uno::Reference< container::XNameAccess > xParaStyles( xSytleFamNames->getByName("ParagraphStyles"), uno::UNO_QUERY_THROW ); - uno::Reference< style::XStyle > xStyle( xParaStyles->getByName("Standard"), uno::UNO_QUERY_THROW ); + uno::Reference< container::XNameAccess > xParaStyles( xSytleFamNames->getByName(u"ParagraphStyles"_ustr), uno::UNO_QUERY_THROW ); + uno::Reference< style::XStyle > xStyle( xParaStyles->getByName(u"Standard"_ustr), uno::UNO_QUERY_THROW ); return xStyle; } @@ -104,7 +104,7 @@ uno::Reference< text::XTextRange > getFirstObjectPosition( const uno::Reference< if( xParaEnum->hasMoreElements() ) { uno::Reference< lang::XServiceInfo > xServiceInfo( xParaEnum->nextElement(), uno::UNO_QUERY_THROW ); - if( xServiceInfo->supportsService("com.sun.star.text.TextTable") ) + if( xServiceInfo->supportsService(u"com.sun.star.text.TextTable"_ustr) ) { uno::Reference< table::XCellRange > xCellRange( xServiceInfo, uno::UNO_QUERY_THROW ); uno::Reference< text::XText> xFirstCellText( xCellRange->getCellByPosition(0, 0), uno::UNO_QUERY_THROW ); @@ -145,14 +145,14 @@ uno::Reference< text::XText > getCurrentXText( const uno::Reference< frame::XMod //catch exception "no text selection" } uno::Reference< beans::XPropertySet > xVCProps( xTextRange, uno::UNO_QUERY_THROW ); - while( xVCProps->getPropertyValue("TextTable") >>= xTextContent ) + while( xVCProps->getPropertyValue(u"TextTable"_ustr) >>= xTextContent ) { xText = xTextContent->getAnchor()->getText(); xVCProps.set( xText->createTextCursor(), uno::UNO_QUERY_THROW ); } if( !xText.is() ) - throw uno::RuntimeException("no text selection" ); + throw uno::RuntimeException(u"no text selection"_ustr ); return xText; } |