sd/source/console/PresenterAccessibility.cxx | 28 +++++----- sd/source/console/PresenterBitmapContainer.cxx | 30 +++++----- sd/source/console/PresenterButton.cxx | 22 +++---- sd/source/console/PresenterController.cxx | 32 +++++------ sd/source/console/PresenterFrameworkObserver.cxx | 2 sd/source/console/PresenterHelpView.cxx | 12 ++-- sd/source/console/PresenterNotesView.cxx | 10 +-- sd/source/console/PresenterPane.cxx | 2 sd/source/console/PresenterPaneBase.cxx | 18 +++--- sd/source/console/PresenterPaneBorderPainter.cxx | 26 ++++----- sd/source/console/PresenterPaneContainer.cxx | 2 sd/source/console/PresenterPaneFactory.cxx | 4 - sd/source/console/PresenterProtocolHandler.cxx | 8 +- sd/source/console/PresenterScreen.cxx | 58 ++++++++++---------- sd/source/console/PresenterScrollBar.cxx | 18 +++--- sd/source/console/PresenterSlidePreview.cxx | 10 +-- sd/source/console/PresenterSlideShowView.cxx | 12 ++-- sd/source/console/PresenterSlideSorter.cxx | 52 +++++++++--------- sd/source/console/PresenterSpritePane.cxx | 2 sd/source/console/PresenterTextView.cxx | 4 - sd/source/console/PresenterTheme.cxx | 64 +++++++++++------------ sd/source/console/PresenterTimer.cxx | 2 sd/source/console/PresenterToolBar.cxx | 32 +++++------ sd/source/console/PresenterViewFactory.cxx | 2 sd/source/console/PresenterWindowManager.cxx | 14 ++--- sd/source/core/CustomAnimationEffect.cxx | 14 ++--- sd/source/core/CustomAnimationPreset.cxx | 26 ++++----- sd/source/core/EffectMigration.cxx | 14 ++--- sd/source/core/ThemeColorChanger.cxx | 2 sd/source/core/TransitionPreset.cxx | 12 ++-- sd/source/core/annotations/Annotation.cxx | 12 ++-- sd/source/core/drawdoc.cxx | 4 - sd/source/core/drawdoc3.cxx | 8 +- sd/source/core/drawdoc4.cxx | 14 ++--- sd/source/core/sdpage.cxx | 28 +++++----- sd/source/core/sdpage2.cxx | 4 - sd/source/core/sdpage_animations.cxx | 2 sd/source/core/stlfamily.cxx | 4 - sd/source/core/stlpool.cxx | 8 +- sd/source/core/stlsheet.cxx | 32 +++++------ 40 files changed, 325 insertions(+), 325 deletions(-)
New commits: commit 57ed936badf1e8bb1931fd8c4eb27b13a7c7171d Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Thu May 16 15:37:32 2024 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Thu May 16 18:17:41 2024 +0200 loplugin:ostr in sd/../console Change-Id: I93a0373087f93d2ca754c95e5eba283b6cfb8ebe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167745 Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> Tested-by: Jenkins diff --git a/sd/source/console/PresenterAccessibility.cxx b/sd/source/console/PresenterAccessibility.cxx index 08576be6940d..da3af5563fd3 100644 --- a/sd/source/console/PresenterAccessibility.cxx +++ b/sd/source/console/PresenterAccessibility.cxx @@ -324,12 +324,12 @@ public: const css::uno::Reference<css::uno::XComponentContext>& rxContext, const lang::Locale& rLocale) { - OUString sName ("Presenter Console"); + OUString sName (u"Presenter Console"_ustr); PresenterConfigurationAccess aConfiguration ( rxContext, - "/org.openoffice.Office.PresenterScreen/", + u"/org.openoffice.Office.PresenterScreen/"_ustr, PresenterConfigurationAccess::READ_ONLY); - aConfiguration.GetConfigurationNode("Presenter/Accessibility/Console/String") + aConfiguration.GetConfigurationNode(u"Presenter/Accessibility/Console/String"_ustr) >>= sName; rtl::Reference<PresenterAccessible::AccessibleObject> pObject ( @@ -353,13 +353,13 @@ public: const Reference<awt::XWindow>& rxContentWindow, const Reference<awt::XWindow>& rxBorderWindow) { - OUString sName ("Presenter Notes Window"); + OUString sName (u"Presenter Notes Window"_ustr); { PresenterConfigurationAccess aConfiguration ( rxContext, - "/org.openoffice.Office.PresenterScreen/", + u"/org.openoffice.Office.PresenterScreen/"_ustr, PresenterConfigurationAccess::READ_ONLY); - aConfiguration.GetConfigurationNode("Presenter/Accessibility/Preview/String") + aConfiguration.GetConfigurationNode(u"Presenter/Accessibility/Preview/String"_ustr) >>= sName; } @@ -763,7 +763,7 @@ Reference<XAccessible> SAL_CALL ThrowIfDisposed(); if (nIndex<0 || o3tl::make_unsigned(nIndex)>=maChildren.size()) - throw lang::IndexOutOfBoundsException("invalid child index", static_cast<uno::XWeak*>(this)); + throw lang::IndexOutOfBoundsException(u"invalid child index"_ustr, static_cast<uno::XWeak*>(this)); return maChildren[nIndex]; } @@ -1181,7 +1181,7 @@ awt::Point PresenterAccessible::AccessibleObject::GetAbsoluteParentLocation() void PresenterAccessible::AccessibleObject::ThrowIfDisposed() const { if (rBHelper.bDisposed || rBHelper.bInDispose) - throw lang::DisposedException("object has already been disposed", uno::Reference<uno::XInterface>(const_cast<uno::XWeak*>(static_cast<uno::XWeak const *>(this)))); + throw lang::DisposedException(u"object has already been disposed"_ustr, uno::Reference<uno::XInterface>(const_cast<uno::XWeak*>(static_cast<uno::XWeak const *>(this)))); } @@ -1304,7 +1304,7 @@ sal_Unicode SAL_CALL PresenterAccessible::AccessibleParagraph::getCharacter (sal ThrowIfDisposed(); if (!mpParagraph) - throw lang::IndexOutOfBoundsException("no text support in current mode", static_cast<uno::XWeak*>(this)); + throw lang::IndexOutOfBoundsException(u"no text support in current mode"_ustr, static_cast<uno::XWeak*>(this)); return mpParagraph->GetCharacter(nIndex); } @@ -1341,7 +1341,7 @@ awt::Rectangle SAL_CALL PresenterAccessible::AccessibleParagraph::getCharacterBo awt::Rectangle aCharacterBox; if (nIndex < 0) { - throw lang::IndexOutOfBoundsException("invalid text index", static_cast<uno::XWeak*>(this)); + throw lang::IndexOutOfBoundsException(u"invalid text index"_ustr, static_cast<uno::XWeak*>(this)); } else if (mpParagraph) { @@ -1354,7 +1354,7 @@ awt::Rectangle SAL_CALL PresenterAccessible::AccessibleParagraph::getCharacterBo } else { - throw lang::IndexOutOfBoundsException("no text support in current mode", static_cast<uno::XWeak*>(this)); + throw lang::IndexOutOfBoundsException(u"no text support in current mode"_ustr, static_cast<uno::XWeak*>(this)); } return aCharacterBox; @@ -1567,13 +1567,13 @@ rtl::Reference<PresenterAccessible::AccessibleObject> AccessibleNotes::Create ( const Reference<awt::XWindow>& rxBorderWindow, const std::shared_ptr<PresenterTextView>& rpTextView) { - OUString sName ("Presenter Notes Text"); + OUString sName (u"Presenter Notes Text"_ustr); { PresenterConfigurationAccess aConfiguration ( rxContext, - "/org.openoffice.Office.PresenterScreen/", + u"/org.openoffice.Office.PresenterScreen/"_ustr, PresenterConfigurationAccess::READ_ONLY); - aConfiguration.GetConfigurationNode("Presenter/Accessibility/Notes/String") + aConfiguration.GetConfigurationNode(u"Presenter/Accessibility/Notes/String"_ustr) >>= sName; } diff --git a/sd/source/console/PresenterBitmapContainer.cxx b/sd/source/console/PresenterBitmapContainer.cxx index b25dacdf1101..da2aa2e2072f 100644 --- a/sd/source/console/PresenterBitmapContainer.cxx +++ b/sd/source/console/PresenterBitmapContainer.cxx @@ -47,7 +47,7 @@ PresenterBitmapContainer::PresenterBitmapContainer ( // Get access to the configuration. PresenterConfigurationAccess aConfiguration ( rxComponentContext, - "org.openoffice.Office.PresenterScreen", + u"org.openoffice.Office.PresenterScreen"_ustr, PresenterConfigurationAccess::READ_ONLY); Reference<container::XNameAccess> xBitmapList ( aConfiguration.GetConfigurationNode(rsConfigurationBase), @@ -85,7 +85,7 @@ void PresenterBitmapContainer::Initialize ( return; mxPresenterHelper.set( xFactory->createInstanceWithContext( - "com.sun.star.drawing.PresenterHelper", + u"com.sun.star.drawing.PresenterHelper"_ustr, rxComponentContext), UNO_QUERY_THROW); } @@ -172,7 +172,7 @@ void PresenterBitmapContainer::ProcessBitmap ( const Reference<beans::XPropertySet>& rxProperties) { OUString sName; - if ( ! (PresenterConfigurationAccess::GetProperty(rxProperties, "Name") >>= sName)) + if ( ! (PresenterConfigurationAccess::GetProperty(rxProperties, u"Name"_ustr) >>= sName)) sName = rsKey; maIconContainer[sName] = LoadBitmap( @@ -199,7 +199,7 @@ std::shared_ptr<PresenterBitmapContainer::BitmapDescriptor> PresenterBitmapConta OUString sFileName; // Load bitmaps. - if (PresenterConfigurationAccess::GetProperty(rxProperties, "NormalFileName") >>= sFileName) + if (PresenterConfigurationAccess::GetProperty(rxProperties, u"NormalFileName"_ustr) >>= sFileName) try { pBitmap->SetBitmap( @@ -208,7 +208,7 @@ std::shared_ptr<PresenterBitmapContainer::BitmapDescriptor> PresenterBitmapConta } catch (Exception&) {} - if (PresenterConfigurationAccess::GetProperty(rxProperties, "MouseOverFileName") >>= sFileName) + if (PresenterConfigurationAccess::GetProperty(rxProperties, u"MouseOverFileName"_ustr) >>= sFileName) try { pBitmap->SetBitmap( @@ -217,7 +217,7 @@ std::shared_ptr<PresenterBitmapContainer::BitmapDescriptor> PresenterBitmapConta } catch (Exception&) {} - if (PresenterConfigurationAccess::GetProperty(rxProperties, "ButtonDownFileName") >>= sFileName) + if (PresenterConfigurationAccess::GetProperty(rxProperties, u"ButtonDownFileName"_ustr) >>= sFileName) try { pBitmap->SetBitmap( @@ -226,7 +226,7 @@ std::shared_ptr<PresenterBitmapContainer::BitmapDescriptor> PresenterBitmapConta } catch (Exception&) {} - if (PresenterConfigurationAccess::GetProperty(rxProperties, "DisabledFileName") >>= sFileName) + if (PresenterConfigurationAccess::GetProperty(rxProperties, u"DisabledFileName"_ustr) >>= sFileName) try { pBitmap->SetBitmap( @@ -235,7 +235,7 @@ std::shared_ptr<PresenterBitmapContainer::BitmapDescriptor> PresenterBitmapConta } catch (Exception&) {} - if (PresenterConfigurationAccess::GetProperty(rxProperties, "MaskFileName") >>= sFileName) + if (PresenterConfigurationAccess::GetProperty(rxProperties, u"MaskFileName"_ustr) >>= sFileName) try { pBitmap->SetBitmap( @@ -245,18 +245,18 @@ std::shared_ptr<PresenterBitmapContainer::BitmapDescriptor> PresenterBitmapConta catch (Exception&) {} - PresenterConfigurationAccess::GetProperty(rxProperties, "XOffset") >>= pBitmap->mnXOffset; - PresenterConfigurationAccess::GetProperty(rxProperties, "YOffset") >>= pBitmap->mnYOffset; + PresenterConfigurationAccess::GetProperty(rxProperties, u"XOffset"_ustr) >>= pBitmap->mnXOffset; + PresenterConfigurationAccess::GetProperty(rxProperties, u"YOffset"_ustr) >>= pBitmap->mnYOffset; - PresenterConfigurationAccess::GetProperty(rxProperties, "XHotSpot") >>= pBitmap->mnXHotSpot; - PresenterConfigurationAccess::GetProperty(rxProperties, "YHotSpot") >>= pBitmap->mnYHotSpot; + PresenterConfigurationAccess::GetProperty(rxProperties, u"XHotSpot"_ustr) >>= pBitmap->mnXHotSpot; + PresenterConfigurationAccess::GetProperty(rxProperties, u"YHotSpot"_ustr) >>= pBitmap->mnYHotSpot; - PresenterConfigurationAccess::GetProperty(rxProperties, "ReplacementColor") >>= pBitmap->maReplacementColor; + PresenterConfigurationAccess::GetProperty(rxProperties, u"ReplacementColor"_ustr) >>= pBitmap->maReplacementColor; OUString sTexturingMode; - if (PresenterConfigurationAccess::GetProperty(rxProperties, "HorizontalTexturingMode") >>= sTexturingMode) + if (PresenterConfigurationAccess::GetProperty(rxProperties, u"HorizontalTexturingMode"_ustr) >>= sTexturingMode) pBitmap->meHorizontalTexturingMode = StringToTexturingMode(sTexturingMode); - if (PresenterConfigurationAccess::GetProperty(rxProperties, "VerticalTexturingMode") >>= sTexturingMode) + if (PresenterConfigurationAccess::GetProperty(rxProperties, u"VerticalTexturingMode"_ustr) >>= sTexturingMode) pBitmap->meVerticalTexturingMode = StringToTexturingMode(sTexturingMode); return pBitmap; diff --git a/sd/source/console/PresenterButton.cxx b/sd/source/console/PresenterButton.cxx index d0fa61a09c94..ca259a98aa28 100644 --- a/sd/source/console/PresenterButton.cxx +++ b/sd/source/console/PresenterButton.cxx @@ -53,16 +53,16 @@ const double gnVerticalBorder (5); { OUString sText; OUString sAction; - PresenterConfigurationAccess::GetProperty(xProperties, "Text") >>= sText; - PresenterConfigurationAccess::GetProperty(xProperties, "Action") >>= sAction; + PresenterConfigurationAccess::GetProperty(xProperties, u"Text"_ustr) >>= sText; + PresenterConfigurationAccess::GetProperty(xProperties, u"Action"_ustr) >>= sAction; PresenterTheme::SharedFontDescriptor pFont; if (rpTheme != nullptr) - pFont = rpTheme->GetFont("ButtonFont"); + pFont = rpTheme->GetFont(u"ButtonFont"_ustr); PresenterTheme::SharedFontDescriptor pMouseOverFont; if (rpTheme != nullptr) - pMouseOverFont = rpTheme->GetFont("ButtonMouseOverFont"); + pMouseOverFont = rpTheme->GetFont(u"ButtonMouseOverFont"_ustr); rtl::Reference<PresenterButton> pButton ( new PresenterButton( @@ -108,7 +108,7 @@ PresenterButton::PresenterButton ( mxPresenterHelper.set( xFactory->createInstanceWithContext( - "com.sun.star.comp.Draw.PresenterHelper", + u"com.sun.star.comp.Draw.PresenterHelper"_ustr, rxComponentContext), UNO_QUERY_THROW); @@ -376,9 +376,9 @@ void PresenterButton::SetupButtonBitmaps() return; // Get the bitmaps for the button border. - SharedBitmapDescriptor pLeftBitmap (mpTheme->GetBitmap("ButtonFrameLeft")); - SharedBitmapDescriptor pCenterBitmap(mpTheme->GetBitmap("ButtonFrameCenter")); - SharedBitmapDescriptor pRightBitmap(mpTheme->GetBitmap("ButtonFrameRight")); + SharedBitmapDescriptor pLeftBitmap (mpTheme->GetBitmap(u"ButtonFrameLeft"_ustr)); + SharedBitmapDescriptor pCenterBitmap(mpTheme->GetBitmap(u"ButtonFrameCenter"_ustr)); + SharedBitmapDescriptor pRightBitmap(mpTheme->GetBitmap(u"ButtonFrameRight"_ustr)); maButtonSize = CalculateButtonSize(); @@ -423,12 +423,12 @@ Reference<beans::XPropertySet> PresenterButton::GetConfigurationProperties ( return Reference<beans::XPropertySet>( PresenterConfigurationAccess::Find ( Reference<container::XNameAccess>( - aConfiguration.GetConfigurationNode("PresenterScreenSettings/Buttons"), + aConfiguration.GetConfigurationNode(u"PresenterScreenSettings/Buttons"_ustr), UNO_QUERY), [&rsConfigurationName](OUString const&, uno::Reference<beans::XPropertySet> const& xProps) -> bool { return PresenterConfigurationAccess::IsStringPropertyEqual( - rsConfigurationName, "Name", xProps); + rsConfigurationName, u"Name"_ustr, xProps); }), UNO_QUERY); } @@ -438,7 +438,7 @@ void PresenterButton::ThrowIfDisposed() const if (rBHelper.bDisposed || rBHelper.bInDispose) { throw lang::DisposedException ( - "PresenterButton object has already been disposed", + u"PresenterButton object has already been disposed"_ustr, const_cast<uno::XWeak*>(static_cast<const uno::XWeak*>(this))); } } diff --git a/sd/source/console/PresenterController.cxx b/sd/source/console/PresenterController.cxx index e5874c8e7fab..0fb92196c760 100644 --- a/sd/source/console/PresenterController.cxx +++ b/sd/source/console/PresenterController.cxx @@ -107,7 +107,7 @@ PresenterController::PresenterController ( if ( ! mxSlideShowController.is()) throw lang::IllegalArgumentException( - "missing slide show controller", + u"missing slide show controller"_ustr, static_cast<XWeak*>(this), 2); @@ -119,15 +119,15 @@ PresenterController::PresenterController ( { mxConfigurationController->addConfigurationChangeListener( this, - "ResourceActivation", + u"ResourceActivation"_ustr, Any(ResourceActivationEventType)); mxConfigurationController->addConfigurationChangeListener( this, - "ResourceDeactivation", + u"ResourceDeactivation"_ustr, Any(ResourceDeactivationEventType)); mxConfigurationController->addConfigurationChangeListener( this, - "ConfigurationUpdateEnd", + u"ConfigurationUpdateEnd"_ustr, Any(ConfigurationUpdateEndEventType)); } @@ -148,7 +148,7 @@ PresenterController::PresenterController ( return; mxPresenterHelper.set( xFactory->createInstanceWithContext( - "com.sun.star.drawing.PresenterHelper", + u"com.sun.star.drawing.PresenterHelper"_ustr, rxContext), UNO_QUERY_THROW); @@ -159,7 +159,7 @@ PresenterController::PresenterController ( if (xProperties.is()) { Reference<awt::XWindow> xWindow ( - xProperties->getPropertyValue("ParentWindow"), UNO_QUERY); + xProperties->getPropertyValue(u"ParentWindow"_ustr), UNO_QUERY); if (xWindow.is()) xWindow->addKeyListener(this); } @@ -309,7 +309,7 @@ void PresenterController::UpdatePaneTitles() static constexpr OUStringLiteral sSlideCountPlaceholder (u"SLIDE_COUNT"); // Get string for slide count. - OUString sSlideCount ("---"); + OUString sSlideCount (u"---"_ustr); Reference<container::XIndexAccess> xIndexAccess(mxSlideShowController, UNO_QUERY); if (xIndexAccess.is()) sSlideCount = OUString::number(xIndexAccess->getCount()); @@ -328,7 +328,7 @@ void PresenterController::UpdatePaneTitles() try { OUString sName; - if (xSlideProperties->getPropertyValue("LinkDisplayName") >>= sName) + if (xSlideProperties->getPropertyValue(u"LinkDisplayName"_ustr) >>= sName) { // Find out whether the name of the current slide has been // automatically created or has been set by the user. @@ -419,7 +419,7 @@ SharedBitmapDescriptor if (mpTheme != nullptr) { const OUString sStyleName (mpTheme->GetStyleName(rsViewURL)); - return mpTheme->GetBitmap(sStyleName, "Background"); + return mpTheme->GetBitmap(sStyleName, u"Background"_ustr); } return SharedBitmapDescriptor(); } @@ -573,7 +573,7 @@ bool PresenterController::HasTransition (Reference<drawing::XDrawPage> const & r try { sal_uInt16 aTransitionType = 0; - xSlidePropertySet->getPropertyValue("TransitionType") >>= aTransitionType; + xSlidePropertySet->getPropertyValue(u"TransitionType"_ustr) >>= aTransitionType; if (aTransitionType > 0) { bTransition = true; @@ -600,8 +600,8 @@ bool PresenterController::HasCustomAnimation (Reference<drawing::XDrawPage> cons presentation::AnimationEffect aTextEffect = presentation::AnimationEffect_NONE; try { - xShapePropertySet->getPropertyValue("Effect") >>= aEffect; - xShapePropertySet->getPropertyValue("TextEffect") >>= aTextEffect; + xShapePropertySet->getPropertyValue(u"Effect"_ustr) >>= aEffect; + xShapePropertySet->getPropertyValue(u"TextEffect"_ustr) >>= aTextEffect; } catch (const beans::UnknownPropertyException&) { @@ -707,7 +707,7 @@ void SAL_CALL PresenterController::notifyConfigurationChange ( if (rBHelper.bDisposed || rBHelper.bInDispose) { throw lang::DisposedException ( - "PresenterController object has already been disposed", + u"PresenterController object has already been disposed"_ustr, static_cast<uno::XWeak*>(this)); } @@ -1122,8 +1122,8 @@ double PresenterController::GetSlideAspectRatio() const Reference<beans::XPropertySet> xProperties(xSlides->getByIndex(0),UNO_QUERY_THROW); sal_Int32 nWidth (28000); sal_Int32 nHeight (21000); - if ((xProperties->getPropertyValue("Width") >>= nWidth) - && (xProperties->getPropertyValue("Height") >>= nHeight) + if ((xProperties->getPropertyValue(u"Width"_ustr) >>= nWidth) + && (xProperties->getPropertyValue(u"Height"_ustr) >>= nHeight) && nHeight > 0) { nSlideAspectRatio = double(nWidth) / double(nHeight); @@ -1150,7 +1150,7 @@ void PresenterController::UpdatePendingSlideNumber (const sal_Int32 nPendingSlid return; PresenterTheme::SharedFontDescriptor pFont ( - mpTheme->GetFont("PendingSlideNumberFont")); + mpTheme->GetFont(u"PendingSlideNumberFont"_ustr)); if (!pFont) return; diff --git a/sd/source/console/PresenterFrameworkObserver.cxx b/sd/source/console/PresenterFrameworkObserver.cxx index 3ca06a913775..d2d18682e756 100644 --- a/sd/source/console/PresenterFrameworkObserver.cxx +++ b/sd/source/console/PresenterFrameworkObserver.cxx @@ -42,7 +42,7 @@ PresenterFrameworkObserver::PresenterFrameworkObserver ( { mxConfigurationController->addConfigurationChangeListener( this, - "ConfigurationUpdateEnd", + u"ConfigurationUpdateEnd"_ustr, Any()); } else diff --git a/sd/source/console/PresenterHelpView.cxx b/sd/source/console/PresenterHelpView.cxx index b4f3477e33be..d2bb2998dd94 100644 --- a/sd/source/console/PresenterHelpView.cxx +++ b/sd/source/console/PresenterHelpView.cxx @@ -163,7 +163,7 @@ PresenterHelpView::PresenterHelpView ( mpPresenterController->GetTheme(), mxWindow, mxCanvas, - "HelpViewCloser"); + u"HelpViewCloser"_ustr); ReadHelpStrings(); Resize(); @@ -339,10 +339,10 @@ void PresenterHelpView::ReadHelpStrings() mpTextContainer.reset(new TextContainer); PresenterConfigurationAccess aConfiguration ( mxComponentContext, - "/org.openoffice.Office.PresenterScreen/", + u"/org.openoffice.Office.PresenterScreen/"_ustr, PresenterConfigurationAccess::READ_ONLY); Reference<container::XNameAccess> xStrings ( - aConfiguration.GetConfigurationNode("PresenterScreenSettings/HelpView/HelpStrings"), + aConfiguration.GetConfigurationNode(u"PresenterScreenSettings/HelpView/HelpStrings"_ustr), UNO_QUERY); PresenterConfigurationAccess::ForAll( xStrings, @@ -359,9 +359,9 @@ void PresenterHelpView::ProcessString ( return; OUString sLeftText; - PresenterConfigurationAccess::GetProperty(rsProperties, "Left") >>= sLeftText; + PresenterConfigurationAccess::GetProperty(rsProperties, u"Left"_ustr) >>= sLeftText; OUString sRightText; - PresenterConfigurationAccess::GetProperty(rsProperties, "Right") >>= sRightText; + PresenterConfigurationAccess::GetProperty(rsProperties, u"Right"_ustr) >>= sRightText; mpTextContainer->push_back( std::make_shared<Block>( sLeftText, sRightText, mpFont->mxFont, mnMaximalWidth)); @@ -480,7 +480,7 @@ void PresenterHelpView::ThrowIfDisposed() if (rBHelper.bDisposed || rBHelper.bInDispose) { throw lang::DisposedException ( - "PresenterHelpView has been already disposed", + u"PresenterHelpView has been already disposed"_ustr, static_cast<uno::XWeak*>(this)); } } diff --git a/sd/source/console/PresenterNotesView.cxx b/sd/source/console/PresenterNotesView.cxx index 5c959b78a03c..6fcbc29c7190 100644 --- a/sd/source/console/PresenterNotesView.cxx +++ b/sd/source/console/PresenterNotesView.cxx @@ -88,7 +88,7 @@ PresenterNotesView::PresenterNotesView ( mpPresenterController->GetTheme(), mxParentWindow, mxCanvas, - "NotesViewCloser"); + u"NotesViewCloser"_ustr); if (mxParentWindow.is()) { @@ -200,7 +200,7 @@ void PresenterNotesView::CreateToolBar ( rpPresenterController, PresenterToolBar::Left); mpToolBar->Initialize( - "PresenterScreenSettings/ToolBars/NotesToolBar"); + u"PresenterScreenSettings/ToolBars/NotesToolBar"_ustr); } void PresenterNotesView::SetSlide (const Reference<drawing::XDrawPage>& rxNotesPage) @@ -283,7 +283,7 @@ void SAL_CALL PresenterNotesView::windowPaint (const awt::PaintEvent& rEvent) if (rBHelper.bDisposed || rBHelper.bInDispose) { throw lang::DisposedException ( - "PresenterNotesView object has already been disposed", + u"PresenterNotesView object has already been disposed"_ustr, static_cast<uno::XWeak*>(this)); } @@ -608,8 +608,8 @@ void PresenterNotesView::ChangeFontSize (const sal_Int32 nSizeChange) if (pConfiguration == nullptr || !pConfiguration->IsValid()) return; - pConfiguration->GoToChild("Font"); - pConfiguration->SetProperty("Size", Any(static_cast<sal_Int32>(nNewSize+0.5))); + pConfiguration->GoToChild(u"Font"_ustr); + pConfiguration->SetProperty(u"Size"_ustr, Any(static_cast<sal_Int32>(nNewSize+0.5))); pConfiguration->CommitChanges(); } catch (Exception&) diff --git a/sd/source/console/PresenterPane.cxx b/sd/source/console/PresenterPane.cxx index 41420843971f..997c610fee59 100644 --- a/sd/source/console/PresenterPane.cxx +++ b/sd/source/console/PresenterPane.cxx @@ -38,7 +38,7 @@ PresenterPane::PresenterPane ( mxComponentContext->getServiceManager(), UNO_SET_THROW); mxPresenterHelper.set( xFactory->createInstanceWithContext( - "com.sun.star.comp.Draw.PresenterHelper", + u"com.sun.star.comp.Draw.PresenterHelper"_ustr, mxComponentContext), UNO_QUERY_THROW); } diff --git a/sd/source/console/PresenterPaneBase.cxx b/sd/source/console/PresenterPaneBase.cxx index 33dc38a1ac12..5b44f9215b79 100644 --- a/sd/source/console/PresenterPaneBase.cxx +++ b/sd/source/console/PresenterPaneBase.cxx @@ -116,14 +116,14 @@ void SAL_CALL PresenterPaneBase::initialize (const Sequence<Any>& rArguments) if ( ! mxComponentContext.is()) { throw RuntimeException( - "PresenterSpritePane: missing component context", + u"PresenterSpritePane: missing component context"_ustr, static_cast<XWeak*>(this)); } if (rArguments.getLength() != 5 && rArguments.getLength() != 6) { throw RuntimeException( - "PresenterSpritePane: invalid number of arguments", + u"PresenterSpritePane: invalid number of arguments"_ustr, static_cast<XWeak*>(this)); } @@ -133,7 +133,7 @@ void SAL_CALL PresenterPaneBase::initialize (const Sequence<Any>& rArguments) if ( ! (rArguments[0] >>= mxPaneId)) { throw lang::IllegalArgumentException( - "PresenterPane: invalid pane id", + u"PresenterPane: invalid pane id"_ustr, static_cast<XWeak*>(this), 0); } @@ -141,7 +141,7 @@ void SAL_CALL PresenterPaneBase::initialize (const Sequence<Any>& rArguments) if ( ! (rArguments[1] >>= mxParentWindow)) { throw lang::IllegalArgumentException( - "PresenterPane: invalid parent window", + u"PresenterPane: invalid parent window"_ustr, static_cast<XWeak*>(this), 1); } @@ -150,7 +150,7 @@ void SAL_CALL PresenterPaneBase::initialize (const Sequence<Any>& rArguments) if ( ! (rArguments[2] >>= xParentCanvas)) { throw lang::IllegalArgumentException( - "PresenterPane: invalid parent canvas", + u"PresenterPane: invalid parent canvas"_ustr, static_cast<XWeak*>(this), 2); } @@ -158,7 +158,7 @@ void SAL_CALL PresenterPaneBase::initialize (const Sequence<Any>& rArguments) if ( ! (rArguments[3] >>= msTitle)) { throw lang::IllegalArgumentException( - "PresenterPane: invalid title", + u"PresenterPane: invalid title"_ustr, static_cast<XWeak*>(this), 3); } @@ -166,7 +166,7 @@ void SAL_CALL PresenterPaneBase::initialize (const Sequence<Any>& rArguments) if ( ! (rArguments[4] >>= mxBorderPainter)) { throw lang::IllegalArgumentException( - "PresenterPane: invalid border painter", + u"PresenterPane: invalid border painter"_ustr, static_cast<XWeak*>(this), 4); } @@ -175,7 +175,7 @@ void SAL_CALL PresenterPaneBase::initialize (const Sequence<Any>& rArguments) if (rArguments.getLength()>5 && ! (rArguments[5] >>= bIsWindowVisibleOnCreation)) { throw lang::IllegalArgumentException( - "PresenterPane: invalid window visibility flag", + u"PresenterPane: invalid window visibility flag"_ustr, static_cast<XWeak*>(this), 5); } @@ -333,7 +333,7 @@ void PresenterPaneBase::ThrowIfDisposed() if (rBHelper.bDisposed || rBHelper.bInDispose) { throw lang::DisposedException ( - "PresenterPane object has already been disposed", + u"PresenterPane object has already been disposed"_ustr, static_cast<uno::XWeak*>(this)); } } diff --git a/sd/source/console/PresenterPaneBorderPainter.cxx b/sd/source/console/PresenterPaneBorderPainter.cxx index fac17dd9d64f..4d32f7942a40 100644 --- a/sd/source/console/PresenterPaneBorderPainter.cxx +++ b/sd/source/console/PresenterPaneBorderPainter.cxx @@ -356,7 +356,7 @@ void PresenterPaneBorderPainter::ThrowIfDisposed() const if (rBHelper.bDisposed || rBHelper.bInDispose) { throw lang::DisposedException ( - "PresenterPaneBorderPainter object has already been disposed", + u"PresenterPaneBorderPainter object has already been disposed"_ustr, const_cast<uno::XWeak*>(static_cast<const uno::XWeak*>(this))); } } @@ -375,7 +375,7 @@ PresenterPaneBorderPainter::Renderer::Renderer ( { mxPresenterHelper.set( xFactory->createInstanceWithContext( - "com.sun.star.comp.Draw.PresenterHelper", + u"com.sun.star.comp.Draw.PresenterHelper"_ustr, rxContext), UNO_QUERY_THROW); } @@ -549,7 +549,7 @@ std::shared_ptr<RendererPaneStyle> RendererPaneStyleContainer::const_iterator iStyle (maRendererPaneStyles.find(rsResourceURL)); if (iStyle == maRendererPaneStyles.end()) { - OUString sPaneStyleName ("DefaultRendererPaneStyle"); + OUString sPaneStyleName (u"DefaultRendererPaneStyle"_ustr); // Get pane layout name for resource URL. const OUString sStyleName (mpTheme->GetStyleName(rsResourceURL)); @@ -740,20 +740,20 @@ RendererPaneStyle::RendererPaneStyle ( if (rpTheme == nullptr) return; - mpTopLeft = GetBitmap(rpTheme, rsStyleName, "TopLeft"); - mpTop = GetBitmap(rpTheme, rsStyleName, "Top"); - mpTopRight = GetBitmap(rpTheme, rsStyleName, "TopRight"); - mpLeft = GetBitmap(rpTheme, rsStyleName,"Left"); - mpRight = GetBitmap(rpTheme, rsStyleName, "Right"); - mpBottomLeft = GetBitmap(rpTheme, rsStyleName, "BottomLeft"); - mpBottom = GetBitmap(rpTheme, rsStyleName, "Bottom"); - mpBottomRight = GetBitmap(rpTheme, rsStyleName, "BottomRight"); - mpBottomCallout = GetBitmap(rpTheme, rsStyleName, "BottomCallout"); + mpTopLeft = GetBitmap(rpTheme, rsStyleName, u"TopLeft"_ustr); + mpTop = GetBitmap(rpTheme, rsStyleName, u"Top"_ustr); + mpTopRight = GetBitmap(rpTheme, rsStyleName, u"TopRight"_ustr); + mpLeft = GetBitmap(rpTheme, rsStyleName,u"Left"_ustr); + mpRight = GetBitmap(rpTheme, rsStyleName, u"Right"_ustr); + mpBottomLeft = GetBitmap(rpTheme, rsStyleName, u"BottomLeft"_ustr); + mpBottom = GetBitmap(rpTheme, rsStyleName, u"Bottom"_ustr); + mpBottomRight = GetBitmap(rpTheme, rsStyleName, u"BottomRight"_ustr); + mpBottomCallout = GetBitmap(rpTheme, rsStyleName, u"BottomCallout"_ustr); // Get font description. mpFont = rpTheme->GetFont(rsStyleName); - OUString sAnchor ("Left"); + OUString sAnchor (u"Left"_ustr); if (mpFont) { sAnchor = mpFont->msAnchor; diff --git a/sd/source/console/PresenterPaneContainer.cxx b/sd/source/console/PresenterPaneContainer.cxx index b28f36a399a7..c844fb010430 100644 --- a/sd/source/console/PresenterPaneContainer.cxx +++ b/sd/source/console/PresenterPaneContainer.cxx @@ -35,7 +35,7 @@ PresenterPaneContainer::PresenterPaneContainer ( { mxPresenterHelper.set( xFactory->createInstanceWithContext( - "com.sun.star.comp.Draw.PresenterHelper", + u"com.sun.star.comp.Draw.PresenterHelper"_ustr, rxContext), UNO_QUERY_THROW); } diff --git a/sd/source/console/PresenterPaneFactory.cxx b/sd/source/console/PresenterPaneFactory.cxx index 822055b8ed8d..5001bdec3ca3 100644 --- a/sd/source/console/PresenterPaneFactory.cxx +++ b/sd/source/console/PresenterPaneFactory.cxx @@ -69,7 +69,7 @@ void PresenterPaneFactory::Register (const rtl::Reference<::sd::DrawController>& throw RuntimeException(); } xCC->addResourceFactory( - "private:resource/pane/Presenter/*", + u"private:resource/pane/Presenter/*"_ustr, this); } catch (RuntimeException&) @@ -273,7 +273,7 @@ void PresenterPaneFactory::ThrowIfDisposed() const if (rBHelper.bDisposed || rBHelper.bInDispose) { throw lang::DisposedException ( - "PresenterPaneFactory object has already been disposed", + u"PresenterPaneFactory object has already been disposed"_ustr, const_cast<uno::XWeak*>(static_cast<const uno::XWeak*>(this))); } } diff --git a/sd/source/console/PresenterProtocolHandler.cxx b/sd/source/console/PresenterProtocolHandler.cxx index ddfb4340c09b..2e44f9e252c4 100644 --- a/sd/source/console/PresenterProtocolHandler.cxx +++ b/sd/source/console/PresenterProtocolHandler.cxx @@ -275,7 +275,7 @@ void SAL_CALL PresenterProtocolHandler::initialize (const Sequence<Any>& aArgume OUString PresenterProtocolHandler::getImplementationName() { - return "org.libreoffice.comp.PresenterScreenProtocolHandler"; + return u"org.libreoffice.comp.PresenterScreenProtocolHandler"_ustr; } sal_Bool PresenterProtocolHandler::supportsService(OUString const & ServiceName) @@ -286,7 +286,7 @@ sal_Bool PresenterProtocolHandler::supportsService(OUString const & ServiceName) css::uno::Sequence<OUString> PresenterProtocolHandler::getSupportedServiceNames() { - return { "com.sun.star.frame.ProtocolHandler" }; + return { u"com.sun.star.frame.ProtocolHandler"_ustr }; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* @@ -331,7 +331,7 @@ void PresenterProtocolHandler::ThrowIfDisposed() const if (rBHelper.bDisposed || rBHelper.bInDispose) { throw lang::DisposedException ( - "PresenterProtocolHandler object has already been disposed", + u"PresenterProtocolHandler object has already been disposed"_ustr, const_cast<uno::XWeak*>(static_cast<const uno::XWeak*>(this))); } } @@ -432,7 +432,7 @@ void SAL_CALL PresenterProtocolHandler::Dispatch::dispatch( if (rBHelper.bDisposed || rBHelper.bInDispose) { throw lang::DisposedException ( - "PresenterProtocolHandler::Dispatch object has already been disposed", + u"PresenterProtocolHandler::Dispatch object has already been disposed"_ustr, static_cast<uno::XWeak*>(this)); } diff --git a/sd/source/console/PresenterScreen.cxx b/sd/source/console/PresenterScreen.cxx index 7e3f9f0722c5..8a4c0a2cfc77 100644 --- a/sd/source/console/PresenterScreen.cxx +++ b/sd/source/console/PresenterScreen.cxx @@ -96,7 +96,7 @@ Sequence< OUString > SAL_CALL PresenterScreenJob::getSupportedServiceNames() OUString SAL_CALL PresenterScreenJob::getImplementationName() { - return "org.libreoffice.comp.PresenterScreenJob"; + return u"org.libreoffice.comp.PresenterScreenJob"_ustr; } sal_Bool SAL_CALL PresenterScreenJob::supportsService(const OUString& aServiceName) @@ -148,7 +148,7 @@ Any SAL_CALL PresenterScreenJob::execute( pProp->Value >>= xModel; Reference< XServiceInfo > xInfo( xModel, UNO_QUERY ); - if( xInfo.is() && xInfo->supportsService("com.sun.star.presentation.PresentationDocument") ) + if( xInfo.is() && xInfo->supportsService(u"com.sun.star.presentation.PresentationDocument"_ustr) ) { // Create a new listener that waits for the full screen presentation // to start and to end. It takes care of its own lifetime. @@ -202,7 +202,7 @@ void SAL_CALL PresenterScreenListener::notifyEvent( const css::document::EventOb if (rBHelper.bDisposed || rBHelper.bInDispose) { throw lang::DisposedException ( - "PresenterScreenListener object has already been disposed", + u"PresenterScreenListener object has already been disposed"_ustr, static_cast<uno::XWeak*>(this)); } @@ -277,9 +277,9 @@ bool PresenterScreen::isPresenterScreenEnabled(const css::uno::Reference<css::un bool dEnablePresenterScreen=true; PresenterConfigurationAccess aConfiguration ( rxContext, - "/org.openoffice.Office.Impress/", + u"/org.openoffice.Office.Impress/"_ustr, PresenterConfigurationAccess::READ_ONLY); - aConfiguration.GetConfigurationNode("Misc/Start/EnablePresenterScreen") + aConfiguration.GetConfigurationNode(u"Misc/Start/EnablePresenterScreen"_ustr) >>= dEnablePresenterScreen; return dEnablePresenterScreen; } @@ -289,9 +289,9 @@ bool PresenterScreen::isPresenterScreenFullScreen(const css::uno::Reference<css: bool dPresenterScreenFullScreen = true; PresenterConfigurationAccess aConfiguration ( rxContext, - "/org.openoffice.Office.Impress/", + u"/org.openoffice.Office.Impress/"_ustr, PresenterConfigurationAccess::READ_ONLY); - aConfiguration.GetConfigurationNode("Misc/Start/PresenterScreenFullScreen") + aConfiguration.GetConfigurationNode(u"Misc/Start/PresenterScreenFullScreen"_ustr) >>= dPresenterScreenFullScreen; return dPresenterScreenFullScreen; } @@ -441,7 +441,7 @@ void PresenterScreen::SwitchMonitors() // Set the new presentation display Reference<beans::XPropertySet> xProperties (xPresentation, UNO_QUERY_THROW); - xProperties->setPropertyValue("Display", Any(nNewScreen)); + xProperties->setPropertyValue(u"Display"_ustr, Any(nNewScreen)); } catch (const uno::Exception &) { } } @@ -471,7 +471,7 @@ sal_Int32 PresenterScreen::GetPresenterScreenNumber ( // Determine the screen on which the full screen presentation is being // displayed. sal_Int32 nDisplayNumber (-1); - if ( ! (rxPresentation->getPropertyValue("Display") >>= nDisplayNumber)) + if ( ! (rxPresentation->getPropertyValue(u"Display"_ustr) >>= nDisplayNumber)) return -1; if (nDisplayNumber == -1) { @@ -508,12 +508,12 @@ sal_Int32 PresenterScreen::GetPresenterScreenNumber ( Reference<XComponentContext> xContext (mxContextWeak); PresenterConfigurationAccess aConfiguration ( xContext, - "/org.openoffice.Office.PresenterScreen/", + u"/org.openoffice.Office.PresenterScreen/"_ustr, PresenterConfigurationAccess::READ_ONLY); bool bStartAlways (false); bool bPresenterScreenFullScreen = isPresenterScreenFullScreen(xContext); if (aConfiguration.GetConfigurationNode( - "Presenter/StartAlways") >>= bStartAlways) + u"Presenter/StartAlways"_ustr) >>= bStartAlways) { if (bStartAlways || !bPresenterScreenFullScreen) return GetPresenterScreenFromScreen(nScreenNumber); @@ -569,8 +569,8 @@ Reference<drawing::framework::XResourceId> PresenterScreen::GetMainPaneId ( return nullptr; auto fullScreenStr = isPresenterScreenFullScreen(xContext) - ? OUString("true") - : OUString("false"); + ? u"true"_ustr + : u"false"_ustr; return ResourceId::create( Reference<XComponentContext>(mxContextWeak), @@ -674,13 +674,13 @@ void PresenterScreen::SetupConfiguration ( { PresenterConfigurationAccess aConfiguration ( rxContext, - "org.openoffice.Office.PresenterScreen", + u"org.openoffice.Office.PresenterScreen"_ustr, PresenterConfigurationAccess::READ_ONLY); maViewDescriptors.clear(); ProcessViewDescriptions(aConfiguration); - OUString sLayoutName ("DefaultLayout"); + OUString sLayoutName (u"DefaultLayout"_ustr); aConfiguration.GetConfigurationNode( - "Presenter/CurrentLayout") >>= sLayoutName; + u"Presenter/CurrentLayout"_ustr) >>= sLayoutName; ProcessLayout(aConfiguration, sLayoutName, rxContext, rxAnchorId); } catch (const RuntimeException&) @@ -705,7 +705,7 @@ void PresenterScreen::ProcessLayout ( OUString sParentLayout; PresenterConfigurationAccess::GetConfigurationNode( xLayoutNode, - "ParentLayout") >>= sParentLayout; + u"ParentLayout"_ustr) >>= sParentLayout; if (!sParentLayout.isEmpty()) { // Prevent infinite recursion. @@ -717,17 +717,17 @@ void PresenterScreen::ProcessLayout ( Reference<container::XNameAccess> xList ( PresenterConfigurationAccess::GetConfigurationNode( xLayoutNode, - "Layout"), + u"Layout"_ustr), UNO_QUERY_THROW); ::std::vector<OUString> aProperties { - "PaneURL", - "ViewURL", - "RelativeX", - "RelativeY", - "RelativeWidth", - "RelativeHeight" + u"PaneURL"_ustr, + u"ViewURL"_ustr, + u"RelativeX"_ustr, + u"RelativeY"_ustr, + u"RelativeWidth"_ustr, + u"RelativeHeight"_ustr }; PresenterConfigurationAccess::ForAll( xList, @@ -748,15 +748,15 @@ void PresenterScreen::ProcessViewDescriptions ( try { Reference<container::XNameAccess> xViewDescriptionsNode ( - rConfiguration.GetConfigurationNode("Presenter/Views"), + rConfiguration.GetConfigurationNode(u"Presenter/Views"_ustr), UNO_QUERY_THROW); ::std::vector<OUString> aProperties { - "ViewURL", - "Title", - "AccessibleTitle", - "IsOpaque" + u"ViewURL"_ustr, + u"Title"_ustr, + u"AccessibleTitle"_ustr, + u"IsOpaque"_ustr }; PresenterConfigurationAccess::ForAll( xViewDescriptionsNode, diff --git a/sd/source/console/PresenterScrollBar.cxx b/sd/source/console/PresenterScrollBar.cxx index 687c1b66c008..0464ab2beddd 100644 --- a/sd/source/console/PresenterScrollBar.cxx +++ b/sd/source/console/PresenterScrollBar.cxx @@ -94,7 +94,7 @@ PresenterScrollBar::PresenterScrollBar ( mxPresenterHelper.set( xFactory->createInstanceWithContext( - "com.sun.star.comp.Draw.PresenterHelper", + u"com.sun.star.comp.Draw.PresenterHelper"_ustr, rxComponentContext), UNO_QUERY_THROW); @@ -674,14 +674,14 @@ void PresenterVerticalScrollBar::UpdateBitmaps() if (mpBitmaps == nullptr) return; - mpPrevButtonDescriptor = mpBitmaps->GetBitmap("Up"); - mpNextButtonDescriptor = mpBitmaps->GetBitmap("Down"); - mpPagerStartDescriptor = mpBitmaps->GetBitmap("PagerTop"); - mpPagerCenterDescriptor = mpBitmaps->GetBitmap("PagerVertical"); - mpPagerEndDescriptor = mpBitmaps->GetBitmap("PagerBottom"); - mpThumbStartDescriptor = mpBitmaps->GetBitmap("ThumbTop"); - mpThumbCenterDescriptor = mpBitmaps->GetBitmap("ThumbVertical"); - mpThumbEndDescriptor = mpBitmaps->GetBitmap("ThumbBottom"); + mpPrevButtonDescriptor = mpBitmaps->GetBitmap(u"Up"_ustr); + mpNextButtonDescriptor = mpBitmaps->GetBitmap(u"Down"_ustr); + mpPagerStartDescriptor = mpBitmaps->GetBitmap(u"PagerTop"_ustr); + mpPagerCenterDescriptor = mpBitmaps->GetBitmap(u"PagerVertical"_ustr); + mpPagerEndDescriptor = mpBitmaps->GetBitmap(u"PagerBottom"_ustr); + mpThumbStartDescriptor = mpBitmaps->GetBitmap(u"ThumbTop"_ustr); + mpThumbCenterDescriptor = mpBitmaps->GetBitmap(u"ThumbVertical"_ustr); + mpThumbEndDescriptor = mpBitmaps->GetBitmap(u"ThumbBottom"_ustr); mnScrollBarWidth = 0; UpdateWidthOrHeight(mnScrollBarWidth, mpPrevButtonDescriptor); diff --git a/sd/source/console/PresenterSlidePreview.cxx b/sd/source/console/PresenterSlidePreview.cxx index 9de4c8820b8c..8e06d0a72fa5 100644 --- a/sd/source/console/PresenterSlidePreview.cxx +++ b/sd/source/console/PresenterSlidePreview.cxx @@ -56,7 +56,7 @@ PresenterSlidePreview::PresenterSlidePreview ( || ! rpPresenterController.is()) { throw RuntimeException( - "PresenterSlidePreview can not be constructed due to empty argument", + u"PresenterSlidePreview can not be constructed due to empty argument"_ustr, static_cast<XWeak*>(this)); } @@ -82,7 +82,7 @@ PresenterSlidePreview::PresenterSlidePreview ( if (xFactory.is()) mxPreviewRenderer.set( xFactory->createInstanceWithContext( - "com.sun.star.drawing.SlideRenderer", + u"com.sun.star.drawing.SlideRenderer"_ustr, rxContext), UNO_QUERY); mpBitmaps = std::make_shared<PresenterBitmapContainer>( @@ -278,7 +278,7 @@ void PresenterSlidePreview::Paint (const awt::Rectangle& rBoundingBox) if( bTransition ) { const awt::Rectangle aTransitionPreviewBox(5, aWindowBox.Height-20, 0, 0); - SharedBitmapDescriptor aTransitionDescriptor = mpBitmaps->GetBitmap("Transition"); + SharedBitmapDescriptor aTransitionDescriptor = mpBitmaps->GetBitmap(u"Transition"_ustr); Reference<rendering::XBitmap> xTransitionIcon (aTransitionDescriptor->GetNormalBitmap()); rendering::RenderState aTransitionRenderState ( geometry::AffineMatrix2D(1, 0, aTransitionPreviewBox.X, 0, 1, aTransitionPreviewBox.Y), @@ -290,7 +290,7 @@ void PresenterSlidePreview::Paint (const awt::Rectangle& rBoundingBox) if( bCustomAnimation ) { const awt::Rectangle aAnimationPreviewBox(5, aWindowBox.Height-40, 0, 0); - SharedBitmapDescriptor aAnimationDescriptor = mpBitmaps->GetBitmap("Animation"); + SharedBitmapDescriptor aAnimationDescriptor = mpBitmaps->GetBitmap(u"Animation"_ustr); Reference<rendering::XBitmap> xAnimationIcon (aAnimationDescriptor->GetNormalBitmap()); rendering::RenderState aAnimationRenderState ( geometry::AffineMatrix2D(1, 0, aAnimationPreviewBox.X, 0, 1, aAnimationPreviewBox.Y), @@ -342,7 +342,7 @@ void PresenterSlidePreview::ThrowIfDisposed() if (PresenterSlidePreviewInterfaceBase::rBHelper.bDisposed || PresenterSlidePreviewInterfaceBase::rBHelper.bInDispose) { throw lang::DisposedException ( - "PresenterSlidePreview object has already been disposed", + u"PresenterSlidePreview object has already been disposed"_ustr, static_cast<uno::XWeak*>(this)); } } diff --git a/sd/source/console/PresenterSlideShowView.cxx b/sd/source/console/PresenterSlideShowView.cxx index 32693f116410..956aabb3745a 100644 --- a/sd/source/console/PresenterSlideShowView.cxx +++ b/sd/source/console/PresenterSlideShowView.cxx @@ -81,7 +81,7 @@ void PresenterSlideShowView::LateInit() Reference<lang::XMultiComponentFactory> xFactory ( mxComponentContext->getServiceManager(), UNO_SET_THROW); mxPresenterHelper.set (xFactory->createInstanceWithContext( - "com.sun.star.comp.Draw.PresenterHelper", + u"com.sun.star.comp.Draw.PresenterHelper"_ustr, mxComponentContext), UNO_QUERY_THROW); @@ -144,12 +144,12 @@ void PresenterSlideShowView::LateInit() PresenterConfigurationAccess::msPresenterScreenRootName, PresenterConfigurationAccess::READ_ONLY); aConfiguration.GetConfigurationNode( - "Presenter/Views/CurrentSlidePreview/" - "Strings/ClickToExitPresentationText/String") + u"Presenter/Views/CurrentSlidePreview/" + "Strings/ClickToExitPresentationText/String"_ustr) >>= msClickToExitPresentationText; aConfiguration.GetConfigurationNode( - "Presenter/Views/CurrentSlidePreview/" - "Strings/ClickToExitPresentationTitle/String") + u"Presenter/Views/CurrentSlidePreview/" + "Strings/ClickToExitPresentationTitle/String"_ustr) >>= msClickToExitPresentationTitle; } @@ -930,7 +930,7 @@ void PresenterSlideShowView::ThrowIfDisposed() if (rBHelper.bDisposed || rBHelper.bInDispose) { throw lang::DisposedException ( - "PresenterSlideShowView object has already been disposed", + u"PresenterSlideShowView object has already been disposed"_ustr, static_cast<uno::XWeak*>(this)); } } diff --git a/sd/source/console/PresenterSlideSorter.cxx b/sd/source/console/PresenterSlideSorter.cxx index 85d7831b165d..f2d921e03df8 100644 --- a/sd/source/console/PresenterSlideSorter.cxx +++ b/sd/source/console/PresenterSlideSorter.cxx @@ -287,12 +287,12 @@ PresenterSlideSorter::PresenterSlideSorter ( mpPresenterController->GetTheme(), mxWindow, mxCanvas, - "SlideSorterCloser"); + u"SlideSorterCloser"_ustr); if (mpPresenterController->GetTheme() != nullptr) { PresenterTheme::SharedFontDescriptor pFont ( - mpPresenterController->GetTheme()->GetFont("ButtonFont")); + mpPresenterController->GetTheme()->GetFont(u"ButtonFont"_ustr)); if (pFont) maSeparatorColor = pFont->mnColor; } @@ -303,7 +303,7 @@ PresenterSlideSorter::PresenterSlideSorter ( // Create the preview cache. mxPreviewCache.set( xFactory->createInstanceWithContext( - "com.sun.star.drawing.PresenterPreviewCache", + u"com.sun.star.drawing.PresenterPreviewCache"_ustr, mxComponentContext), UNO_QUERY_THROW); Reference<container::XIndexAccess> xSlides (mxSlideShowController, UNO_QUERY); @@ -323,7 +323,7 @@ PresenterSlideSorter::PresenterSlideSorter ( // Listen for changes of the current slide. rxController->addPropertyChangeListener( - "CurrentPage", + u"CurrentPage"_ustr, this); // Move the current slide in the center of the window. @@ -778,8 +778,8 @@ double PresenterSlideSorter::GetSlideAspectRatio() const Reference<beans::XPropertySet> xProperties(xSlides->getByIndex(0),UNO_QUERY_THROW); sal_Int32 nWidth (28000); sal_Int32 nHeight (21000); - if ((xProperties->getPropertyValue("Width") >>= nWidth) - && (xProperties->getPropertyValue("Height") >>= nHeight) + if ((xProperties->getPropertyValue(u"Width"_ustr) >>= nWidth) + && (xProperties->getPropertyValue(u"Height"_ustr) >>= nHeight) && nHeight > 0) { nSlideAspectRatio = double(nWidth) / double(nHeight); @@ -828,7 +828,7 @@ void PresenterSlideSorter::PaintPreview ( mpLayout->GetPoint(nSlideIndex, isRTL?1:-1, -1))); PresenterBitmapContainer aContainer ( - "PresenterScreenSettings/ScrollBar/Bitmaps", + u"PresenterScreenSettings/ScrollBar/Bitmaps"_ustr, std::shared_ptr<PresenterBitmapContainer>(), mxComponentContext, rxCanvas); @@ -887,7 +887,7 @@ void PresenterSlideSorter::PaintPreview ( if( bCustomAnimation ) { const awt::Rectangle aAnimationPreviewBox(aTopLeft.X+3, aTopLeft.Y+aSize.Height-40, 0, 0); - SharedBitmapDescriptor aAnimationDescriptor = aContainer.GetBitmap("Animation"); + SharedBitmapDescriptor aAnimationDescriptor = aContainer.GetBitmap(u"Animation"_ustr); Reference<rendering::XBitmap> xAnimationIcon (aAnimationDescriptor->GetNormalBitmap()); rendering::RenderState aAnimationRenderState ( geometry::AffineMatrix2D( @@ -901,7 +901,7 @@ void PresenterSlideSorter::PaintPreview ( if( bTransition ) { const awt::Rectangle aTransitionPreviewBox(aTopLeft.X+3, aTopLeft.Y+aSize.Height-20, 0, 0); - SharedBitmapDescriptor aTransitionDescriptor = aContainer.GetBitmap("Transition"); + SharedBitmapDescriptor aTransitionDescriptor = aContainer.GetBitmap(u"Transition"_ustr); Reference<rendering::XBitmap> xTransitionIcon (aTransitionDescriptor->GetNormalBitmap()); rendering::RenderState aTransitionRenderState ( geometry::AffineMatrix2D( @@ -1040,7 +1040,7 @@ void PresenterSlideSorter::ThrowIfDisposed() if (rBHelper.bDisposed || rBHelper.bInDispose) { throw lang::DisposedException ( - "PresenterSlideSorter has been already disposed", + u"PresenterSlideSorter has been already disposed"_ustr, static_cast<uno::XWeak*>(this)); } } @@ -1413,12 +1413,12 @@ PresenterSlideSorter::MouseOverManager::MouseOverManager ( std::shared_ptr<PresenterBitmapContainer> pBitmaps (rpTheme->GetBitmapContainer()); if (pBitmaps != nullptr) { - mpLeftLabelBitmap = pBitmaps->GetBitmap("LabelLeft"); - mpCenterLabelBitmap = pBitmaps->GetBitmap("LabelCenter"); - mpRightLabelBitmap = pBitmaps->GetBitmap("LabelRight"); + mpLeftLabelBitmap = pBitmaps->GetBitmap(u"LabelLeft"_ustr); + mpCenterLabelBitmap = pBitmaps->GetBitmap(u"LabelCenter"_ustr); + mpRightLabelBitmap = pBitmaps->GetBitmap(u"LabelRight"_ustr); } - mpFont = rpTheme->GetFont("SlideSorterLabelFont"); + mpFont = rpTheme->GetFont(u"SlideSorterLabelFont"_ustr); } } @@ -1486,7 +1486,7 @@ void PresenterSlideSorter::MouseOverManager::SetSlide ( Reference<beans::XPropertySet> xSlideProperties(mxSlides->getByIndex(nSlideIndex), UNO_QUERY); if (xSlideProperties.is()) - xSlideProperties->getPropertyValue("LinkDisplayName") >>= msText; + xSlideProperties->getPropertyValue(u"LinkDisplayName"_ustr) >>= msText; if (msText.isEmpty()) msText = "Slide " + OUString::number(nSlideIndex + 1); @@ -1690,29 +1690,29 @@ PresenterSlideSorter::CurrentSlideFrameRenderer::CurrentSlideFrameRenderer ( { PresenterConfigurationAccess aConfiguration ( rxContext, - "/org.openoffice.Office.PresenterScreen/", + u"/org.openoffice.Office.PresenterScreen/"_ustr, PresenterConfigurationAccess::READ_ONLY); Reference<container::XHierarchicalNameAccess> xBitmaps ( aConfiguration.GetConfigurationNode( - "PresenterScreenSettings/SlideSorter/CurrentSlideBorderBitmaps"), + u"PresenterScreenSettings/SlideSorter/CurrentSlideBorderBitmaps"_ustr), UNO_QUERY); if ( ! xBitmaps.is()) return; PresenterBitmapContainer aContainer ( - "PresenterScreenSettings/SlideSorter/CurrentSlideBorderBitmaps", + u"PresenterScreenSettings/SlideSorter/CurrentSlideBorderBitmaps"_ustr, std::shared_ptr<PresenterBitmapContainer>(), rxContext, rxCanvas); - mpTopLeft = aContainer.GetBitmap("TopLeft"); - mpTop = aContainer.GetBitmap("Top"); - mpTopRight = aContainer.GetBitmap("TopRight"); - mpLeft = aContainer.GetBitmap("Left"); - mpRight = aContainer.GetBitmap("Right"); - mpBottomLeft = aContainer.GetBitmap("BottomLeft"); - mpBottom = aContainer.GetBitmap("Bottom"); - mpBottomRight = aContainer.GetBitmap("BottomRight"); + mpTopLeft = aContainer.GetBitmap(u"TopLeft"_ustr); + mpTop = aContainer.GetBitmap(u"Top"_ustr); + mpTopRight = aContainer.GetBitmap(u"TopRight"_ustr); + mpLeft = aContainer.GetBitmap(u"Left"_ustr); + mpRight = aContainer.GetBitmap(u"Right"_ustr); + mpBottomLeft = aContainer.GetBitmap(u"BottomLeft"_ustr); + mpBottom = aContainer.GetBitmap(u"Bottom"_ustr); + mpBottomRight = aContainer.GetBitmap(u"BottomRight"_ustr); // Determine size of frame. if (mpTop) diff --git a/sd/source/console/PresenterSpritePane.cxx b/sd/source/console/PresenterSpritePane.cxx index a1a2f7148168..594addcd4309 100644 --- a/sd/source/console/PresenterSpritePane.cxx +++ b/sd/source/console/PresenterSpritePane.cxx @@ -37,7 +37,7 @@ PresenterSpritePane::PresenterSpritePane (const Reference<XComponentContext>& rx mxComponentContext->getServiceManager(), UNO_SET_THROW); mxPresenterHelper.set( xFactory->createInstanceWithContext( - "com.sun.star.comp.Draw.PresenterHelper", + u"com.sun.star.comp.Draw.PresenterHelper"_ustr, mxComponentContext), UNO_QUERY_THROW); } diff --git a/sd/source/console/PresenterTextView.cxx b/sd/source/console/PresenterTextView.cxx index 08d981fe6ac1..bf88685744c7 100644 --- a/sd/source/console/PresenterTextView.cxx +++ b/sd/source/console/PresenterTextView.cxx @@ -91,7 +91,7 @@ PresenterTextView::PresenterTextView ( // portions of the same text direction. mxScriptTypeDetector.set( xFactory->createInstanceWithContext( - "com.sun.star.i18n.ScriptTypeDetector", + u"com.sun.star.i18n.ScriptTypeDetector"_ustr, rxContext), UNO_QUERY_THROW); } @@ -454,7 +454,7 @@ PresenterTextParagraph::PresenterTextParagraph ( Reference<beans::XPropertySet> xProperties (rxTextRange, UNO_QUERY); try { - xProperties->getPropertyValue("WritingMode") >>= mnWritingMode; + xProperties->getPropertyValue(u"WritingMode"_ustr) >>= mnWritingMode; } catch(beans::UnknownPropertyException&) { diff --git a/sd/source/console/PresenterTheme.cxx b/sd/source/console/PresenterTheme.cxx index 4ea59a5fa8cd..f877d20b1c3b 100644 --- a/sd/source/console/PresenterTheme.cxx +++ b/sd/source/console/PresenterTheme.cxx @@ -259,7 +259,7 @@ std::shared_ptr<PresenterTheme::Theme> PresenterTheme::ReadTheme() PresenterConfigurationAccess aConfiguration ( mxContext, - "/org.openoffice.Office.PresenterScreen/", + u"/org.openoffice.Office.PresenterScreen/"_ustr, PresenterConfigurationAccess::READ_ONLY); return aReadContext.ReadTheme(aConfiguration, OUString()); @@ -352,7 +352,7 @@ std::shared_ptr<PresenterConfigurationAccess> PresenterTheme::GetNodeForViewStyl [&rsStyleName] (OUString const&, uno::Reference<beans::XPropertySet> const& xProps) { return PresenterConfigurationAccess::IsStringPropertyEqual( - rsStyleName, "StyleName", xProps); + rsStyleName, u"StyleName"_ustr, xProps); }); } return pConfiguration; @@ -466,7 +466,7 @@ PresenterTheme::FontDescriptor::FontDescriptor ( const std::shared_ptr<FontDescriptor>& rpDescriptor) : mnSize(12), mnColor(0x00000000), - msAnchor(OUString("Left")), + msAnchor(u"Left"_ustr), mnXOffset(0), mnYOffset(0) { @@ -538,7 +538,7 @@ double PresenterTheme::FontDescriptor::GetCellSizeForDesignSize ( if ( ! xFont.is()) return nDesignSize; - geometry::RealRectangle2D aBox (PresenterCanvasHelper::GetTextBoundingBox (xFont, "X")); + geometry::RealRectangle2D aBox (PresenterCanvasHelper::GetTextBoundingBox (xFont, u"X"_ustr)); const double nAscent (-aBox.Y1); //tdf#112408 @@ -568,7 +568,7 @@ void PresenterTheme::Theme::Read ( { // Parent theme name. OUString sParentThemeName; - if ((PresenterConfigurationAccess::GetConfigurationNode(mxThemeRoot, "ParentTheme") + if ((PresenterConfigurationAccess::GetConfigurationNode(mxThemeRoot, u"ParentTheme"_ustr) >>= sParentThemeName) && !sParentThemeName.isEmpty()) { @@ -578,7 +578,7 @@ void PresenterTheme::Theme::Read ( // Background. mpBackground = PresenterBitmapContainer::LoadBitmap( mxThemeRoot, - "Background", + u"Background"_ustr, rReadContext.mxPresenterHelper, rReadContext.mxCanvas, SharedBitmapDescriptor()); @@ -595,14 +595,14 @@ void PresenterTheme::Theme::Read ( // Read bitmaps. mpIconContainer = std::make_shared<PresenterBitmapContainer>( Reference<container::XNameAccess>( - PresenterConfigurationAccess::GetConfigurationNode(mxThemeRoot, "Bitmaps"), UNO_QUERY), + PresenterConfigurationAccess::GetConfigurationNode(mxThemeRoot, u"Bitmaps"_ustr), UNO_QUERY), mpParentTheme != nullptr ? mpParentTheme->mpIconContainer : std::shared_ptr<PresenterBitmapContainer>(), rReadContext.mxComponentContext, rReadContext.mxCanvas); // Read fonts. Reference<container::XNameAccess> xFontNode( - PresenterConfigurationAccess::GetConfigurationNode(mxThemeRoot, "Fonts"), + PresenterConfigurationAccess::GetConfigurationNode(mxThemeRoot, u"Fonts"_ustr), UNO_QUERY); PresenterConfigurationAccess::ForAll( xFontNode, @@ -656,7 +656,7 @@ ReadContext::ReadContext ( { mxPresenterHelper.set( xFactory->createInstanceWithContext( - "com.sun.star.comp.Draw.PresenterHelper", + u"com.sun.star.comp.Draw.PresenterHelper"_ustr, rxContext), UNO_QUERY_THROW); } @@ -674,7 +674,7 @@ PresenterTheme::SharedFontDescriptor ReadContext::ReadFont ( Reference<container::XHierarchicalNameAccess> xFont ( PresenterConfigurationAccess::GetConfigurationNode( rxNode, - /*rsFontPath*/""), + /*rsFontPath*/u""_ustr), UNO_QUERY_THROW); Reference<beans::XPropertySet> xProperties (xFont, UNO_QUERY_THROW); @@ -694,15 +694,15 @@ PresenterTheme::SharedFontDescriptor ReadContext::ReadFont ( { auto pDescriptor = std::make_shared<PresenterTheme::FontDescriptor>(rpDefault); - PresenterConfigurationAccess::GetProperty(rxProperties, "FamilyName") >>= pDescriptor->msFamilyName; - PresenterConfigurationAccess::GetProperty(rxProperties, "Style") >>= pDescriptor->msStyleName; - PresenterConfigurationAccess::GetProperty(rxProperties, "Size") >>= pDescriptor->mnSize; + PresenterConfigurationAccess::GetProperty(rxProperties, u"FamilyName"_ustr) >>= pDescriptor->msFamilyName; + PresenterConfigurationAccess::GetProperty(rxProperties, u"Style"_ustr) >>= pDescriptor->msStyleName; + PresenterConfigurationAccess::GetProperty(rxProperties, u"Size"_ustr) >>= pDescriptor->mnSize; PresenterTheme::ConvertToColor( - PresenterConfigurationAccess::GetProperty(rxProperties, "Color"), + PresenterConfigurationAccess::GetProperty(rxProperties, u"Color"_ustr), pDescriptor->mnColor); - PresenterConfigurationAccess::GetProperty(rxProperties, "Anchor") >>= pDescriptor->msAnchor; - PresenterConfigurationAccess::GetProperty(rxProperties, "XOffset") >>= pDescriptor->mnXOffset; - PresenterConfigurationAccess::GetProperty(rxProperties, "YOffset") >>= pDescriptor->mnYOffset; + PresenterConfigurationAccess::GetProperty(rxProperties, u"Anchor"_ustr) >>= pDescriptor->msAnchor; + PresenterConfigurationAccess::GetProperty(rxProperties, u"XOffset"_ustr) >>= pDescriptor->mnXOffset; + PresenterConfigurationAccess::GetProperty(rxProperties, u"YOffset"_ustr) >>= pDescriptor->mnYOffset; return pDescriptor; } @@ -728,7 +728,7 @@ std::shared_ptr<PresenterTheme::Theme> ReadContext::ReadTheme ( if (sCurrentThemeName.isEmpty()) { // No theme name given. Look up the CurrentTheme property. - rConfiguration.GetConfigurationNode("Presenter/CurrentTheme") >>= sCurrentThemeName; + rConfiguration.GetConfigurationNode(u"Presenter/CurrentTheme"_ustr) >>= sCurrentThemeName; if (sCurrentThemeName.isEmpty()) { // Still no name. Use "DefaultTheme". @@ -737,7 +737,7 @@ std::shared_ptr<PresenterTheme::Theme> ReadContext::ReadTheme ( } Reference<container::XNameAccess> xThemes ( - rConfiguration.GetConfigurationNode("Presenter/Themes"), + rConfiguration.GetConfigurationNode(u"Presenter/Themes"_ustr), UNO_QUERY); if (xThemes.is()) { @@ -750,7 +750,7 @@ std::shared_ptr<PresenterTheme::Theme> ReadContext::ReadTheme ( if (xTheme.is()) { OUString sThemeName; - PresenterConfigurationAccess::GetConfigurationNode(xTheme, "ThemeName") + PresenterConfigurationAccess::GetConfigurationNode(xTheme, u"ThemeName"_ustr) >>= sThemeName; if (sThemeName == sCurrentThemeName) { @@ -775,10 +775,10 @@ BorderSize ReadContext::ReadBorderSize (const Reference<container::XNameAccess>& if (rxNode.is()) { - GetByName(rxNode, "Left") >>= aBorderSize.mnLeft; - GetByName(rxNode, "Top") >>= aBorderSize.mnTop; - GetByName(rxNode, "Right") >>= aBorderSize.mnRight; - GetByName(rxNode, "Bottom") >>= aBorderSize.mnBottom; + GetByName(rxNode, u"Left"_ustr) >>= aBorderSize.mnLeft; + GetByName(rxNode, u"Top"_ustr) >>= aBorderSize.mnTop; + GetByName(rxNode, u"Right"_ustr) >>= aBorderSize.mnRight; + GetByName(rxNode, u"Bottom"_ustr) >>= aBorderSize.mnBottom; } return aBorderSize; @@ -793,7 +793,7 @@ void PaneStyleContainer::Read ( Reference<container::XNameAccess> xPaneStyleList ( PresenterConfigurationAccess::GetConfigurationNode( rxThemeRoot, - "PaneStyles"), + u"PaneStyles"_ustr), UNO_QUERY); if (!xPaneStyleList.is()) return; @@ -914,7 +914,7 @@ void ViewStyleContainer::Read ( Reference<container::XNameAccess> xViewStyleList ( PresenterConfigurationAccess::GetConfigurationNode( rxThemeRoot, - "ViewStyles"), + u"ViewStyles"_ustr), UNO_QUERY); if (xViewStyleList.is()) { @@ -933,11 +933,11 @@ void ViewStyleContainer::ProcessViewStyle( { auto pStyle = std::make_shared<ViewStyle>(); - PresenterConfigurationAccess::GetProperty(rxProperties, "StyleName") + PresenterConfigurationAccess::GetProperty(rxProperties, u"StyleName"_ustr) >>= pStyle->msStyleName; OUString sParentStyleName; - if (PresenterConfigurationAccess::GetProperty(rxProperties, "ParentStyle") + if (PresenterConfigurationAccess::GetProperty(rxProperties, u"ParentStyle"_ustr) >>= sParentStyleName) { // Find parent style. @@ -952,14 +952,14 @@ void ViewStyleContainer::ProcessViewStyle( } Reference<container::XHierarchicalNameAccess> xFontNode ( - PresenterConfigurationAccess::GetProperty(rxProperties, "Font"), UNO_QUERY); + PresenterConfigurationAccess::GetProperty(rxProperties, u"Font"_ustr), UNO_QUERY); PresenterTheme::SharedFontDescriptor pFont ( ReadContext::ReadFont(xFontNode, PresenterTheme::SharedFontDescriptor())); if (pFont) pStyle->mpFont = pFont; Reference<container::XHierarchicalNameAccess> xBackgroundNode ( - PresenterConfigurationAccess::GetProperty(rxProperties, "Background"), + PresenterConfigurationAccess::GetProperty(rxProperties, u"Background"_ustr), UNO_QUERY); SharedBitmapDescriptor pBackground (PresenterBitmapContainer::LoadBitmap( xBackgroundNode, @@ -1014,12 +1014,12 @@ void StyleAssociationContainer::Read ( Reference<container::XNameAccess> xStyleAssociationList ( PresenterConfigurationAccess::GetConfigurationNode( rxThemeRoot, - "StyleAssociations"), + u"StyleAssociations"_ustr), UNO_QUERY); if (!xStyleAssociationList.is()) return; - ::std::vector<OUString> aProperties { "ResourceURL", "StyleName" }; + ::std::vector<OUString> aProperties { u"ResourceURL"_ustr, u"StyleName"_ustr }; PresenterConfigurationAccess::ForAll( xStyleAssociationList, aProperties, diff --git a/sd/source/console/PresenterTimer.cxx b/sd/source/console/PresenterTimer.cxx index ed7be4cbc9c1..232c82bafa27 100644 --- a/sd/source/console/PresenterTimer.cxx +++ b/sd/source/console/PresenterTimer.cxx @@ -447,7 +447,7 @@ PresenterClockTimer::PresenterClockTimer (const Reference<XComponentContext>& rx if (xFactory.is()) mxRequestCallback.set( xFactory->createInstanceWithContext( - "com.sun.star.awt.AsyncCallback", + u"com.sun.star.awt.AsyncCallback"_ustr, rxContext), UNO_QUERY_THROW); } diff --git a/sd/source/console/PresenterToolBar.cxx b/sd/source/console/PresenterToolBar.cxx index 04a37a92cf0c..825bfbe31224 100644 --- a/sd/source/console/PresenterToolBar.cxx +++ b/sd/source/console/PresenterToolBar.cxx @@ -584,7 +584,7 @@ void PresenterToolBar::CreateControls ( // Expand the macro in the bitmap file names. PresenterConfigurationAccess aConfiguration ( mxComponentContext, - "/org.openoffice.Office.PresenterScreen/", + u"/org.openoffice.Office.PresenterScreen/"_ustr, PresenterConfigurationAccess::READ_ONLY); mpCurrentContainerPart = std::make_shared<ElementContainerPart>(); @@ -598,7 +598,7 @@ void PresenterToolBar::CreateControls ( return; Reference<container::XNameAccess> xEntries ( - PresenterConfigurationAccess::GetConfigurationNode(xToolBarNode, "Entries"), + PresenterConfigurationAccess::GetConfigurationNode(xToolBarNode, u"Entries"_ustr), UNO_QUERY); Context aContext; aContext.mxPresenterHelper = mpPresenterController->GetPresenterHelper(); @@ -625,7 +625,7 @@ void PresenterToolBar::ProcessEntry ( // Type has to be present. OUString sType; - if ( ! (PresenterConfigurationAccess::GetProperty(rxProperties, "Type") >>= sType)) + if ( ! (PresenterConfigurationAccess::GetProperty(rxProperties, u"Type"_ustr) >>= sType)) return; // Read mode specific values. @@ -634,11 +634,11 @@ void PresenterToolBar::ProcessEntry ( SharedElementMode pSelectedMode = std::make_shared<ElementMode>(); SharedElementMode pDisabledMode = std::make_shared<ElementMode>(); SharedElementMode pMouseOverSelectedMode = std::make_shared<ElementMode>(); - pNormalMode->ReadElementMode(rxProperties, "Normal", pNormalMode, rContext); - pMouseOverMode->ReadElementMode(rxProperties, "MouseOver", pNormalMode, rContext); - pSelectedMode->ReadElementMode(rxProperties, "Selected", pNormalMode, rContext); - pDisabledMode->ReadElementMode(rxProperties, "Disabled", pNormalMode, rContext); - pMouseOverSelectedMode->ReadElementMode(rxProperties, "MouseOverSelected", pSelectedMode, rContext); + pNormalMode->ReadElementMode(rxProperties, u"Normal"_ustr, pNormalMode, rContext); + pMouseOverMode->ReadElementMode(rxProperties, u"MouseOver"_ustr, pNormalMode, rContext); + pSelectedMode->ReadElementMode(rxProperties, u"Selected"_ustr, pNormalMode, rContext); + pDisabledMode->ReadElementMode(rxProperties, u"Disabled"_ustr, pNormalMode, rContext); + pMouseOverSelectedMode->ReadElementMode(rxProperties, u"MouseOverSelected"_ustr, pSelectedMode, rContext); // Create new element. ::rtl::Reference<Element> pElement; @@ -997,7 +997,7 @@ void PresenterToolBar::ThrowIfDisposed() const if (rBHelper.bDisposed || rBHelper.bInDispose) { throw lang::DisposedException ( - "PresenterToolBar has already been disposed", + u"PresenterToolBar has already been disposed"_ustr, const_cast<uno::XWeak*>(static_cast<const uno::XWeak*>(this))); } } @@ -1027,7 +1027,7 @@ PresenterToolBarView::PresenterToolBarView ( mxCanvas, rpPresenterController, PresenterToolBar::Center); - mpToolBar->Initialize("PresenterScreenSettings/ToolBars/ToolBar"); + mpToolBar->Initialize(u"PresenterScreenSettings/ToolBars/ToolBar"_ustr); if (mxWindow.is()) { @@ -1344,16 +1344,16 @@ void ElementMode::ReadElementMode ( } // Read action. - if ( ! (PresenterConfigurationAccess::GetProperty(xProperties, "Action") >>= msAction)) + if ( ! (PresenterConfigurationAccess::GetProperty(xProperties, u"Action"_ustr) >>= msAction)) if (rpDefaultMode != nullptr) msAction = rpDefaultMode->msAction; // Read text and font { OUString sText(rpDefaultMode != nullptr ? rpDefaultMode->maText.GetText() : OUString()); - PresenterConfigurationAccess::GetProperty(xProperties, "Text") >>= sText; + PresenterConfigurationAccess::GetProperty(xProperties, u"Text"_ustr) >>= sText; Reference<container::XHierarchicalNameAccess> xFontNode ( - PresenterConfigurationAccess::GetProperty(xProperties, "Font"), UNO_QUERY); + PresenterConfigurationAccess::GetProperty(xProperties, u"Font"_ustr), UNO_QUERY); PresenterTheme::SharedFontDescriptor pFont(PresenterTheme::ReadFont( xFontNode, rpDefaultMode != nullptr ? rpDefaultMode->maText.GetFont() : PresenterTheme::SharedFontDescriptor())); @@ -1362,9 +1362,9 @@ void ElementMode::ReadElementMode ( // Read bitmaps to display as icons. Reference<container::XHierarchicalNameAccess> xIconNode ( - PresenterConfigurationAccess::GetProperty(xProperties, "Icon"), UNO_QUERY); + PresenterConfigurationAccess::GetProperty(xProperties, u"Icon"_ustr), UNO_QUERY); mpIcon = PresenterBitmapContainer::LoadBitmap( - xIconNode, "", rContext.mxPresenterHelper, rContext.mxCanvas, + xIconNode, u""_ustr, rContext.mxPresenterHelper, rContext.mxCanvas, rpDefaultMode != nullptr ? rpDefaultMode->mpIcon : SharedBitmapDescriptor()); } catch(Exception&) @@ -1942,7 +1942,7 @@ void VerticalSeparator::Paint ( PresenterCanvasHelper::SetDeviceColor(aRenderState, pFont->mnColor); } - Reference<rendering::XBitmap> xBitmap(mpToolBar->GetPresenterController()->GetPresenterHelper()->loadBitmap("bitmaps/Separator.png", rxCanvas)); + Reference<rendering::XBitmap> xBitmap(mpToolBar->GetPresenterController()->GetPresenterHelper()->loadBitmap(u"bitmaps/Separator.png"_ustr, rxCanvas)); if (!xBitmap.is()) return; diff --git a/sd/source/console/PresenterViewFactory.cxx b/sd/source/console/PresenterViewFactory.cxx index 8948b3fffa2a..9f11a13bdfb9 100644 --- a/sd/source/console/PresenterViewFactory.cxx +++ b/sd/source/console/PresenterViewFactory.cxx @@ -472,7 +472,7 @@ void PresenterViewFactory::ThrowIfDisposed() const if (rBHelper.bDisposed || rBHelper.bInDispose) { throw lang::DisposedException ( - "PresenterViewFactory object has already been disposed", + u"PresenterViewFactory object has already been disposed"_ustr, const_cast<uno::XWeak*>(static_cast<const uno::XWeak*>(this))); } } diff --git a/sd/source/console/PresenterWindowManager.cxx b/sd/source/console/PresenterWindowManager.cxx index 11db88ce52b6..11457552e728 100644 --- a/sd/source/console/PresenterWindowManager.cxx +++ b/sd/source/console/PresenterWindowManager.cxx @@ -137,7 +137,7 @@ void PresenterWindowManager::SetTheme (const std::shared_ptr<PresenterTheme>& rp if (mpTheme != nullptr) { - mpBackgroundBitmap = mpTheme->GetBitmap(OUString(), "Background"); + mpBackgroundBitmap = mpTheme->GetBitmap(OUString(), u"Background"_ustr); } } @@ -462,9 +462,9 @@ void PresenterWindowManager::RestoreViewMode() sal_Int32 nMode (0); PresenterConfigurationAccess aConfiguration ( mxComponentContext, - "/org.openoffice.Office.PresenterScreen/", + u"/org.openoffice.Office.PresenterScreen/"_ustr, PresenterConfigurationAccess::READ_ONLY); - aConfiguration.GetConfigurationNode("Presenter/InitialViewMode") >>= nMode; + aConfiguration.GetConfigurationNode(u"Presenter/InitialViewMode"_ustr) >>= nMode; switch (nMode) { default: @@ -488,9 +488,9 @@ void PresenterWindowManager::StoreViewMode (const ViewMode eViewMode) { PresenterConfigurationAccess aConfiguration ( mxComponentContext, - "/org.openoffice.Office.PresenterScreen/", + u"/org.openoffice.Office.PresenterScreen/"_ustr, PresenterConfigurationAccess::READ_WRITE); - aConfiguration.GoToChild("Presenter"); + aConfiguration.GoToChild(u"Presenter"_ustr); Any aValue; switch (eViewMode) { @@ -508,7 +508,7 @@ void PresenterWindowManager::StoreViewMode (const ViewMode eViewMode) break; } - aConfiguration.SetProperty ("InitialViewMode", aValue); + aConfiguration.SetProperty (u"InitialViewMode"_ustr, aValue); aConfiguration.CommitChanges(); } catch (Exception&) @@ -1034,7 +1034,7 @@ void PresenterWindowManager::ThrowIfDisposed() const if (rBHelper.bDisposed || rBHelper.bInDispose) { throw lang::DisposedException ( - "PresenterWindowManager has already been disposed", + u"PresenterWindowManager has already been disposed"_ustr, const_cast<uno::XWeak*>(static_cast<const uno::XWeak*>(this))); } } commit bb4f17adcd6fb25aeab78dc0754c591968e40d76 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Thu May 16 15:37:51 2024 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Thu May 16 18:17:29 2024 +0200 loplugin:ostr in sd/../core Change-Id: I3f69635be67215a3b351fa54f6024651a4e85a19 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167746 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sd/source/core/CustomAnimationEffect.cxx b/sd/source/core/CustomAnimationEffect.cxx index f041d0e1e45b..80082a3a5dfe 100644 --- a/sd/source/core/CustomAnimationEffect.cxx +++ b/sd/source/core/CustomAnimationEffect.cxx @@ -580,7 +580,7 @@ bool CustomAnimationEffect::checkForText( const std::vector<sal_Int32>* paragrap xEnumeration->nextElement() >>= xParaSet; if( xParaSet.is() ) { - xParaSet->getPropertyValue( "NumberingLevel" ) >>= nParaDepth; + xParaSet->getPropertyValue( u"NumberingLevel"_ustr ) >>= nParaDepth; } } } @@ -1678,7 +1678,7 @@ CustomAnimationEffectPtr EffectSequenceHelper::append( const CustomAnimationPres if( pPreset ) { - Reference< XAnimationNode > xNode( pPreset->create( "" ) ); + Reference< XAnimationNode > xNode( pPreset->create( u""_ustr ) ); if( xNode.is() ) { // first, filter all only ui relevant user data @@ -1803,7 +1803,7 @@ void EffectSequenceHelper::replace( const CustomAnimationEffectPtr& pEffect, con void EffectSequenceHelper::replace( const CustomAnimationEffectPtr& pEffect, const CustomAnimationPresetPtr& pPreset, double fDuration /* = -1.0 */ ) { - replace( pEffect, pPreset, "", fDuration ); + replace( pEffect, pPreset, u""_ustr, fDuration ); } void EffectSequenceHelper::remove( const CustomAnimationEffectPtr& pEffect ) @@ -2190,7 +2190,7 @@ bool EffectSequenceHelper::getParagraphNumberingLevels( const Reference< XShape sal_Int32 nParaDepth = 0; if( xParaSet.is() ) { - xParaSet->getPropertyValue( "NumberingLevel" ) >>= nParaDepth; + xParaSet->getPropertyValue( u"NumberingLevel"_ustr ) >>= nParaDepth; } rParagraphNumberingLevel.push_back( nParaDepth ); @@ -3062,7 +3062,7 @@ MainSequence::MainSequence() if( mxTimingRootNode.is() ) { Sequence< css::beans::NamedValue > aUserData - { { "node-type", css::uno::Any(css::presentation::EffectNodeType::MAIN_SEQUENCE) } }; + { { u"node-type"_ustr, css::uno::Any(css::presentation::EffectNodeType::MAIN_SEQUENCE) } }; mxTimingRootNode->setUserData( aUserData ); } init(); @@ -3150,7 +3150,7 @@ void MainSequence::createMainSequence() mxSequenceRoot = SequenceTimeContainer::create( ::comphelper::getProcessComponentContext() ); uno::Sequence< css::beans::NamedValue > aUserData - { { "node-type", css::uno::Any(css::presentation::EffectNodeType::MAIN_SEQUENCE) } }; + { { u"node-type"_ustr, css::uno::Any(css::presentation::EffectNodeType::MAIN_SEQUENCE) } }; mxSequenceRoot->setUserData( aUserData ); // empty sequence until now, set duration to 0.0 @@ -3207,7 +3207,7 @@ InteractiveSequencePtr MainSequence::createInteractiveSequence( const css::uno:: Reference< XTimeContainer > xISRoot = SequenceTimeContainer::create( ::comphelper::getProcessComponentContext() ); uno::Sequence< css::beans::NamedValue > aUserData - { { "node-type", css::uno::Any(css::presentation::EffectNodeType::INTERACTIVE_SEQUENCE) } }; + { { u"node-type"_ustr, css::uno::Any(css::presentation::EffectNodeType::INTERACTIVE_SEQUENCE) } }; xISRoot->setUserData( aUserData ); xISRoot->setRestart( css::animations::AnimationRestart::WHEN_NOT_ACTIVE ); diff --git a/sd/source/core/CustomAnimationPreset.cxx b/sd/source/core/CustomAnimationPreset.cxx index b366e689c350..9e20f1f79c66 100644 --- a/sd/source/core/CustomAnimationPreset.cxx +++ b/sd/source/core/CustomAnimationPreset.cxx @@ -70,7 +70,7 @@ static Reference< XNameAccess > getNodeAccess( const Reference< XMultiServiceFac })); xConfigAccess.set( - xConfigProvider->createInstanceWithArguments( "com.sun.star.configuration.ConfigurationAccess", aArgs ), + xConfigProvider->createInstanceWithArguments( u"com.sun.star.configuration.ConfigurationAccess"_ustr, aArgs ), UNO_QUERY); } catch (const Exception&) @@ -96,7 +96,7 @@ void implImportLabels( const Reference< XMultiServiceFactory >& xConfigProvider, if( xNameAccess.is() ) { OUString aUIName; - xNameAccess->getByName( "Label" ) >>= aUIName; + xNameAccess->getByName( u"Label"_ustr ) >>= aUIName; if( !aUIName.isEmpty() ) { rStringMap[ rName ] = aUIName; @@ -224,7 +224,7 @@ Reference< XAnimationNode > implImportEffects( const Reference< XMultiServiceFac aParserInput.aInputStream.set(new utl::OInputStreamWrapper(std::move(pIStm))); // get filter - Reference< xml::sax::XFastParser > xFilter( xServiceFactory->createInstance("com.sun.star.comp.Xmloff.AnimationsImport" ), UNO_QUERY_THROW ); + Reference< xml::sax::XFastParser > xFilter( xServiceFactory->createInstance(u"com.sun.star.comp.Xmloff.AnimationsImport"_ustr ), UNO_QUERY_THROW ); xFilter->parseStream( aParserInput ); @@ -304,21 +304,21 @@ void CustomAnimationPresets::importResources() Reference< XMultiServiceFactory > xConfigProvider = configuration::theDefaultProvider::get( xContext ); - implImportLabels( xConfigProvider, "/org.openoffice.Office.UI.Effects/UserInterface/Properties", maPropertyNameMap ); + implImportLabels( xConfigProvider, u"/org.openoffice.Office.UI.Effects/UserInterface/Properties"_ustr, maPropertyNameMap ); - implImportLabels( xConfigProvider, "/org.openoffice.Office.UI.Effects/UserInterface/Effects", maEffectNameMap ); + implImportLabels( xConfigProvider, u"/org.openoffice.Office.UI.Effects/UserInterface/Effects"_ustr, maEffectNameMap ); importEffects(); - importPresets( xConfigProvider, "/org.openoffice.Office.UI.Effects/Presets/Entrance", maEntrancePresets ); + importPresets( xConfigProvider, u"/org.openoffice.Office.UI.Effects/Presets/Entrance"_ustr, maEntrancePresets ); - importPresets( xConfigProvider, "/org.openoffice.Office.UI.Effects/Presets/Emphasis", maEmphasisPresets ); + importPresets( xConfigProvider, u"/org.openoffice.Office.UI.Effects/Presets/Emphasis"_ustr, maEmphasisPresets ); - importPresets( xConfigProvider, "/org.openoffice.Office.UI.Effects/Presets/Exit", maExitPresets ); + importPresets( xConfigProvider, u"/org.openoffice.Office.UI.Effects/Presets/Exit"_ustr, maExitPresets ); - importPresets( xConfigProvider, "/org.openoffice.Office.UI.Effects/Presets/MotionPaths", maMotionPathsPresets ); + importPresets( xConfigProvider, u"/org.openoffice.Office.UI.Effects/Presets/MotionPaths"_ustr, maMotionPathsPresets ); - importPresets( xConfigProvider, "/org.openoffice.Office.UI.Effects/Presets/Misc", maMiscPresets ); + importPresets( xConfigProvider, u"/org.openoffice.Office.UI.Effects/Presets/Misc"_ustr, maMiscPresets ); } catch (const Exception&) { @@ -344,13 +344,13 @@ void CustomAnimationPresets::importPresets( const Reference< XMultiServiceFactor { xTypeAccess->getByName( rName ) >>= xCategoryAccess; - if( xCategoryAccess.is() && xCategoryAccess->hasByName( "Label" ) && xCategoryAccess->hasByName( "Effects" ) ) + if( xCategoryAccess.is() && xCategoryAccess->hasByName( u"Label"_ustr ) && xCategoryAccess->hasByName( u"Effects"_ustr ) ) { OUString aLabel; - xCategoryAccess->getByName( "Label" ) >>= aLabel; + xCategoryAccess->getByName( u"Label"_ustr ) >>= aLabel; Sequence< OUString > aEffects; - xCategoryAccess->getByName( "Effects" ) >>= aEffects; + xCategoryAccess->getByName( u"Effects"_ustr ) >>= aEffects; EffectDescriptorList aEffectsList; diff --git a/sd/source/core/EffectMigration.cxx b/sd/source/core/EffectMigration.cxx index 873e825cf4c5..8acdd0681dd9 100644 --- a/sd/source/core/EffectMigration.cxx +++ b/sd/source/core/EffectMigration.cxx @@ -657,7 +657,7 @@ void EffectMigration::SetTextAnimationEffect( SvxShape* pShape, AnimationEffect } else { - Reference< XAnimationNode > xNode( pPreset->create( "" ) ); + Reference< XAnimationNode > xNode( pPreset->create( u""_ustr ) ); DBG_ASSERT( xNode.is(), "EffectMigration::SetTextAnimationEffect(), could not create preset!" ); if( xNode.is() ) { @@ -1280,7 +1280,7 @@ void EffectMigration::SetAnimationPath( SvxShape* pShape, SdrPathObj const * pPa { std::shared_ptr< sd::MainSequence > pMainSequence( pPage->getMainSequence() ); if( pMainSequence ) - pMainSequence->append( *pPathObj, Any( xShape ), -1.0, "" ); + pMainSequence->append( *pPathObj, Any( xShape ), -1.0, u""_ustr ); } } } @@ -1291,7 +1291,7 @@ static void createVisibilityOnOffNode(Reference< XTimeContainer > const & rxPare Reference< XMultiServiceFactory > xMsf(::comphelper::getProcessServiceFactory()); // create par container node - Reference< XAnimationNode > xOuterSeqTimeContainer(xMsf->createInstance("com.sun.star.animations.ParallelTimeContainer"), UNO_QUERY_THROW); + Reference< XAnimationNode > xOuterSeqTimeContainer(xMsf->createInstance(u"com.sun.star.animations.ParallelTimeContainer"_ustr), UNO_QUERY_THROW); // set begin xOuterSeqTimeContainer->setBegin(Any(0.0)); @@ -1301,14 +1301,14 @@ static void createVisibilityOnOffNode(Reference< XTimeContainer > const & rxPare // set named values Sequence< NamedValue > aUserDataSequence{ - { /* Name */ "node-type", + { /* Name */ u"node-type"_ustr, /* Value */ Any(bOnClick ? EffectNodeType::ON_CLICK : EffectNodeType::AFTER_PREVIOUS) } }; xOuterSeqTimeContainer->setUserData(aUserDataSequence); // create animate set to change visibility for rCandidate - Reference< XAnimationNode > xAnimateSetForLast(xMsf->createInstance("com.sun.star.animations.AnimateSet"), UNO_QUERY_THROW); + Reference< XAnimationNode > xAnimateSetForLast(xMsf->createInstance(u"com.sun.star.animations.AnimateSet"_ustr), UNO_QUERY_THROW); // set begin xAnimateSetForLast->setBegin(Any(0.0)); @@ -1325,7 +1325,7 @@ static void createVisibilityOnOffNode(Reference< XTimeContainer > const & rxPare xAnimate->setTarget(Any(xTargetShape)); // set AttributeName - xAnimate->setAttributeName("Visibility"); + xAnimate->setAttributeName(u"Visibility"_ustr); // set attribute value xAnimate->setTo(Any(bVisible)); @@ -1370,7 +1370,7 @@ void EffectMigration::CreateAnimatedGroup(SdrObjGroup const & rGroupObj, SdPage& // create main node Reference< XMultiServiceFactory > xMsf(::comphelper::getProcessServiceFactory()); - Reference< XAnimationNode > xOuterSeqTimeContainer(xMsf->createInstance("com.sun.star.animations.ParallelTimeContainer"), UNO_QUERY_THROW); + Reference< XAnimationNode > xOuterSeqTimeContainer(xMsf->createInstance(u"com.sun.star.animations.ParallelTimeContainer"_ustr), UNO_QUERY_THROW); // set begin xOuterSeqTimeContainer->setBegin(Any(0.0)); diff --git a/sd/source/core/ThemeColorChanger.cxx b/sd/source/core/ThemeColorChanger.cxx index b941407881ed..769cb47aedc5 100644 --- a/sd/source/core/ThemeColorChanger.cxx +++ b/sd/source/core/ThemeColorChanger.cxx @@ -145,7 +145,7 @@ void ThemeColorChanger::doApply(std::shared_ptr<model::ColorSet> const& pColorSe return; ViewShellId nViewShellId = pViewShell->GetViewShellBase().GetViewShellId(); - pUndoManager->EnterListAction(SvxResId(RID_SVXSTR_UNDO_THEME_COLOR_CHANGE), "", 0, + pUndoManager->EnterListAction(SvxResId(RID_SVXSTR_UNDO_THEME_COLOR_CHANGE), u""_ustr, 0, nViewShellId); changeStyles(mpDocShell, pColorSet); diff --git a/sd/source/core/TransitionPreset.cxx b/sd/source/core/TransitionPreset.cxx index b92f9ce5ca18..b4ceb3b66380 100644 --- a/sd/source/core/TransitionPreset.cxx +++ b/sd/source/core/TransitionPreset.cxx @@ -250,8 +250,8 @@ bool TransitionPreset::importTransitionsFile( TransitionPresetList& rList, OUString sSet; OUString sVariant; - xTransitionNode->getByName( "Set" ) >>= sSet; - xTransitionNode->getByName( "Variant" ) >>= sVariant; + xTransitionNode->getByName( u"Set"_ustr ) >>= sSet; + xTransitionNode->getByName( u"Variant"_ustr ) >>= sVariant; Reference< container::XNameAccess > xSetNode; @@ -259,26 +259,26 @@ bool TransitionPreset::importTransitionsFile( TransitionPresetList& rList, if( xSetNode.is() ) { pPreset->maSetId = sSet; - xSetNode->getByName( "Label" ) >>= sSet; + xSetNode->getByName( u"Label"_ustr ) >>= sSet; pPreset->maSetLabel = sSet; OUString sGroup; - xSetNode->getByName( "Group" ) >>= sGroup; + xSetNode->getByName( u"Group"_ustr ) >>= sGroup; Reference< container::XNameAccess > xGroupNode; xTransitionGroups->getByName( sGroup ) >>= xGroupNode; if( xGroupNode.is() ) { - xGroupNode->getByName( "Label" ) >>= sGroup; + xGroupNode->getByName( u"Label"_ustr ) >>= sGroup; if( !sVariant.isEmpty() ) { Reference< container::XNameAccess > xVariantNode; xTransitionVariants->getByName( sVariant ) >>= xVariantNode; if( xVariantNode.is() ) { - xVariantNode->getByName( "Label" ) >>= sVariant; + xVariantNode->getByName( u"Label"_ustr ) >>= sVariant; pPreset->maVariantLabel = sVariant; } } diff --git a/sd/source/core/annotations/Annotation.cxx b/sd/source/core/annotations/Annotation.cxx index 2843333f29b4..44fe5397e456 100644 --- a/sd/source/core/annotations/Annotation.cxx +++ b/sd/source/core/annotations/Annotation.cxx @@ -133,7 +133,7 @@ geometry::RealPoint2D SAL_CALL Annotation::getPosition() void SAL_CALL Annotation::setPosition(const geometry::RealPoint2D & the_value) { - prepareSet("Position", uno::Any(), uno::Any(), nullptr); + prepareSet(u"Position"_ustr, uno::Any(), uno::Any(), nullptr); { std::unique_lock g(m_aMutex); createChangeUndoImpl(g); @@ -150,7 +150,7 @@ geometry::RealSize2D SAL_CALL Annotation::getSize() void SAL_CALL Annotation::setSize(const geometry::RealSize2D & the_value) { - prepareSet("Size", uno::Any(), uno::Any(), nullptr); + prepareSet(u"Size"_ustr, uno::Any(), uno::Any(), nullptr); { std::unique_lock g(m_aMutex); createChangeUndoImpl(g); @@ -166,7 +166,7 @@ OUString SAL_CALL Annotation::getAuthor() void SAL_CALL Annotation::setAuthor(const OUString & the_value) { - prepareSet("Author", uno::Any(), uno::Any(), nullptr); + prepareSet(u"Author"_ustr, uno::Any(), uno::Any(), nullptr); { std::unique_lock g(m_aMutex); createChangeUndoImpl(g); @@ -182,7 +182,7 @@ OUString SAL_CALL Annotation::getInitials() void SAL_CALL Annotation::setInitials(const OUString & the_value) { - prepareSet("Initials", uno::Any(), uno::Any(), nullptr); + prepareSet(u"Initials"_ustr, uno::Any(), uno::Any(), nullptr); { std::unique_lock g(m_aMutex); createChangeUndoImpl(g); @@ -198,7 +198,7 @@ util::DateTime SAL_CALL Annotation::getDateTime() void SAL_CALL Annotation::setDateTime(const util::DateTime & the_value) { - prepareSet("DateTime", uno::Any(), uno::Any(), nullptr); + prepareSet(u"DateTime"_ustr, uno::Any(), uno::Any(), nullptr); { std::unique_lock g(m_aMutex); createChangeUndoImpl(g); @@ -228,7 +228,7 @@ void Annotation::createChangeUndoImpl(std::unique_lock<std::mutex>& g) uno::Reference< XInterface > xSource( static_cast<uno::XWeak*>( this ) ); NotifyDocumentEvent( static_cast< SdDrawDocument& >( *pModel ), - "OnAnnotationChanged" , + u"OnAnnotationChanged"_ustr , xSource ); } } diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx index 237deadabd30..7029b55edbc6 100644 --- a/sd/source/core/drawdoc.cxx +++ b/sd/source/core/drawdoc.cxx @@ -1144,7 +1144,7 @@ void SdDrawDocument::InitLayoutVector() { // loop over every layout entry in current file const Reference<XDocument> xDoc = xDocBuilder->parseURI( sFilename ); - const Reference<XNodeList> layoutlist = xDoc->getElementsByTagName("layout"); + const Reference<XNodeList> layoutlist = xDoc->getElementsByTagName(u"layout"_ustr); const int nElements = layoutlist->getLength(); for(int index=0; index < nElements; index++) maLayoutInfo.push_back( layoutlist->item(index) ); @@ -1181,7 +1181,7 @@ void SdDrawDocument::InitObjectVector() { // loop over every object entry in current file const Reference<XDocument> xDoc = xDocBuilder->parseURI( sFilename ); - const Reference<XNodeList> objectlist = xDoc->getElementsByTagName("object"); + const Reference<XNodeList> objectlist = xDoc->getElementsByTagName(u"object"_ustr); const int nElements = objectlist->getLength(); for(int index=0; index < nElements; index++) maPresObjectInfo.push_back( objectlist->item(index) ); diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx index 5310789d2988..bb857701481e 100644 --- a/sd/source/core/drawdoc3.cxx +++ b/sd/source/core/drawdoc3.cxx @@ -349,7 +349,7 @@ void lcl_removeUnusedTableStyles(SdStyleSheetPool* const pStyleSheetPool, XStyleVector const & rStyles) { css::uno::Reference<css::container::XNameContainer> xTableFamily( - pStyleSheetPool->getByName("table"), css::uno::UNO_QUERY); + pStyleSheetPool->getByName(u"table"_ustr), css::uno::UNO_QUERY); if (!xTableFamily) return; @@ -494,7 +494,7 @@ bool SdDrawDocument::InsertBookmarkAsPage( ViewShellId nViewShellId(-1); if (sd::ViewShell* pViewShell = mpDocSh->GetViewShell()) nViewShellId = pViewShell->GetViewShellBase().GetViewShellId(); - pUndoMgr->EnterListAction(SdResId(STR_UNDO_INSERTPAGES), "", 0, nViewShellId); + pUndoMgr->EnterListAction(SdResId(STR_UNDO_INSERTPAGES), u""_ustr, 0, nViewShellId); } // Refactored copy'n'pasted layout name collection into IterateBookmarkPages @@ -542,7 +542,7 @@ bool SdDrawDocument::InsertBookmarkAsPage( uno::Reference<beans::XPropertySet> xPropSet(xOldPage, uno::UNO_QUERY_THROW); if (xPropSet.is()) { - uno::Any aLayoutID = xPropSet->getPropertyValue("SlideLayout"); + uno::Any aLayoutID = xPropSet->getPropertyValue(u"SlideLayout"_ustr); if (aLayoutID.hasValue()) { aLayoutID >>= nLayout; } @@ -947,7 +947,7 @@ bool SdDrawDocument::InsertBookmarkAsPage( { nLayout = it->second; } - xNewPropSet->setPropertyValue("SlideLayout", uno::Any(nLayout)); + xNewPropSet->setPropertyValue(u"SlideLayout"_ustr, uno::Any(nLayout)); } } else // Can only be notes diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx index 06129576da24..d8344df2ce29 100644 --- a/sd/source/core/drawdoc4.cxx +++ b/sd/source/core/drawdoc4.cxx @@ -299,7 +299,7 @@ void SdDrawDocument::CreateLayoutTemplates() pSheet = &(pSSPool->Make(aTextName, SfxStyleFamily::Para, nMask)); pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_TEXT ); pISet = &pSheet->GetItemSet(); - aSvxFontItem.SetFamilyName("Noto Sans"); + aSvxFontItem.SetFamilyName(u"Noto Sans"_ustr); pISet->Put( aSvxFontItem ); // Noto Sans -e ... etc. - the rest is truncated