sd/source/filter/eppt/eppt.cxx | 76 ++++++------- sd/source/filter/eppt/epptso.cxx | 88 ++++++++-------- sd/source/filter/eppt/pptexanimations.cxx | 2 sd/source/filter/eppt/pptexsoundcollection.cxx | 2 sd/source/filter/eppt/pptx-animations-nodectx.cxx | 4 sd/source/filter/eppt/pptx-animations.cxx | 7 - sd/source/filter/eppt/pptx-epptbase.cxx | 34 +++--- sd/source/filter/eppt/pptx-epptooxml.cxx | 120 +++++++++++----------- sd/source/filter/eppt/pptx-stylesheet.cxx | 6 - sd/source/filter/eppt/pptx-text.cxx | 80 +++++++------- sd/source/filter/html/htmlex.cxx | 4 sd/source/filter/ppt/pptin.cxx | 16 +- sd/source/filter/sdpptwrp.cxx | 18 +-- sd/source/filter/xml/sdxmlwrp.cxx | 104 +++++++++---------- 14 files changed, 281 insertions(+), 280 deletions(-)
New commits: commit f2c46e9630567848e5aac3e88d98c4bfa1a4750f Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Fri May 17 08:50:28 2024 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Fri May 17 12:14:54 2024 +0200 loplugin:ostr in sd/../filter Change-Id: I0a48a71fd1386fd5baf091e041bfa82255144779 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167760 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sd/source/filter/eppt/eppt.cxx b/sd/source/filter/eppt/eppt.cxx index e6a71eb3f56c..32af30aecd97 100644 --- a/sd/source/filter/eppt/eppt.cxx +++ b/sd/source/filter/eppt/eppt.cxx @@ -99,21 +99,21 @@ void PPTWriter::exportPPTPre( const std::vector< css::beans::PropertyValue >& rM { mbStatusIndicator = true; mnStatMaxValue = ( mnPages + mnMasterPages ) * 5; - mXStatusIndicator->start( "PowerPoint Export", mnStatMaxValue + ( mnStatMaxValue >> 3 ) ); + mXStatusIndicator->start( u"PowerPoint Export"_ustr, mnStatMaxValue + ( mnStatMaxValue >> 3 ) ); } SvGlobalName aGName(MSO_PPT8_CLASSID); - mrStg->SetClass( aGName, SotClipboardFormatId::NONE, "MS PowerPoint 97" ); + mrStg->SetClass( aGName, SotClipboardFormatId::NONE, u"MS PowerPoint 97"_ustr ); if ( !ImplCreateCurrentUserStream() ) return; - mpStrm = mrStg->OpenSotStream( "PowerPoint Document" ); + mpStrm = mrStg->OpenSotStream( u"PowerPoint Document"_ustr ); if ( !mpStrm ) return; if ( !mpPicStrm ) - mpPicStrm = mrStg->OpenSotStream( "Pictures" ); + mpPicStrm = mrStg->OpenSotStream( u"Pictures"_ustr ); auto aIter = std::find_if(rMediaData.begin(), rMediaData.end(), [](const css::beans::PropertyValue& rProp) { return rProp.Name == "BaseURI"; }); @@ -129,7 +129,7 @@ void PPTWriter::exportPPTPost( ) if ( mbStatusIndicator ) { - mXStatusIndicator->setText( "PowerPoint Export" ); + mXStatusIndicator->setText( u"PowerPoint Export"_ustr ); sal_uInt32 nValue = mnStatMaxValue + ( mnStatMaxValue >> 3 ); if ( nValue > mnLatestStatValue ) { @@ -171,9 +171,9 @@ void PPTWriter::ImplWriteSlide( sal_uInt32 nPageNum, sal_uInt32 nMasterNum, sal_ bool bVisible = true; css::presentation::FadeEffect eFe = css::presentation::FadeEffect_NONE; - if ( GetPropertyValue( aAny, mXPagePropSet, "Visible" ) ) + if ( GetPropertyValue( aAny, mXPagePropSet, u"Visible"_ustr ) ) aAny >>= bVisible; - if ( GetPropertyValue( aAny, mXPagePropSet, "Change" ) ) + if ( GetPropertyValue( aAny, mXPagePropSet, u"Change"_ustr ) ) { switch ( *o3tl::doAccess<sal_Int32>(aAny) ) { @@ -188,7 +188,7 @@ void PPTWriter::ImplWriteSlide( sal_uInt32 nPageNum, sal_uInt32 nMasterNum, sal_ break; } } - if ( GetPropertyValue( aAny, mXPagePropSet, "Effect" ) ) + if ( GetPropertyValue( aAny, mXPagePropSet, u"Effect"_ustr ) ) aAny >>= eFe; sal_uInt32 nSoundRef = 0; @@ -196,7 +196,7 @@ void PPTWriter::ImplWriteSlide( sal_uInt32 nPageNum, sal_uInt32 nMasterNum, sal_ bool bStopSound = false; bool bLoopSound = false; - if ( GetPropertyValue( aAny, mXPagePropSet, "Sound" ) ) + if ( GetPropertyValue( aAny, mXPagePropSet, u"Sound"_ustr ) ) { OUString aSoundURL; if ( aAny >>= aSoundURL ) @@ -207,7 +207,7 @@ void PPTWriter::ImplWriteSlide( sal_uInt32 nPageNum, sal_uInt32 nMasterNum, sal_ else aAny >>= bStopSound; } - if ( GetPropertyValue( aAny, mXPagePropSet, "LoopSound" ) ) + if ( GetPropertyValue( aAny, mXPagePropSet, u"LoopSound"_ustr ) ) aAny >>= bLoopSound; bool bNeedsSSSlideInfoAtom = !bVisible @@ -223,7 +223,7 @@ void PPTWriter::ImplWriteSlide( sal_uInt32 nPageNum, sal_uInt32 nMasterNum, sal_ sal_Int32 nSlideTime = 0; // still has to !!! sal_uInt8 nSpeed = 1; - if ( GetPropertyValue( aAny, mXPagePropSet, "TransitionDuration" ) ) + if ( GetPropertyValue( aAny, mXPagePropSet, u"TransitionDuration"_ustr ) ) { css::presentation::AnimationSpeed aAs; double fTransitionDuration = -1.0; @@ -250,11 +250,11 @@ void PPTWriter::ImplWriteSlide( sal_uInt32 nPageNum, sal_uInt32 nMasterNum, sal_ nSpeed = static_cast<sal_uInt8>(aAs); } sal_Int16 nTT = 0; - if ( GetPropertyValue( aAny, mXPagePropSet, "TransitionType" ) + if ( GetPropertyValue( aAny, mXPagePropSet, u"TransitionType"_ustr ) && ( aAny >>= nTT ) ) { sal_Int16 nTST = 0; - if ( GetPropertyValue( aAny, mXPagePropSet, "TransitionSubtype" ) + if ( GetPropertyValue( aAny, mXPagePropSet, u"TransitionSubtype"_ustr ) && ( aAny >>= nTST ) ) nTransitionType = GetTransition( nTT, nTST, eFe, 0, nDirection ); @@ -272,7 +272,7 @@ void PPTWriter::ImplWriteSlide( sal_uInt32 nPageNum, sal_uInt32 nMasterNum, sal_ if ( bStopSound ) nBuildFlags |= 256; - if ( GetPropertyValue( aAny, mXPagePropSet, "Duration" ) )// duration of this slide + if ( GetPropertyValue( aAny, mXPagePropSet, u"Duration"_ustr ) )// duration of this slide nSlideTime = *o3tl::doAccess<sal_Int32>(aAny) << 10; // in ticks mpPptEscherEx->AddAtom( 16, EPP_SSSlideInfoAtom ); @@ -461,7 +461,7 @@ PPTWriter::~PPTWriter() bool PPTWriter::ImplCreateCurrentUserStream() { - mpCurUserStrm = mrStg->OpenSotStream( "Current User" ); + mpCurUserStrm = mrStg->OpenSotStream( u"Current User"_ustr ); if ( !mpCurUserStrm ) return false; char pUserName[] = "Current User"; @@ -522,7 +522,7 @@ void PPTWriter::ImplCreateDocumentSummaryInformation() if ( mnCnvrtFlags & 0x8000 ) { uno::Sequence<sal_Int8> aThumbSeq; - if ( GetPageByIndex( 0, NORMAL ) && ImplGetPropertyValue( mXPagePropSet, "PreviewBitmap" ) ) + if ( GetPageByIndex( 0, NORMAL ) && ImplGetPropertyValue( mXPagePropSet, u"PreviewBitmap"_ustr ) ) { aThumbSeq = *o3tl::doAccess<uno::Sequence<sal_Int8>>(mAny); } @@ -556,17 +556,17 @@ void PPTWriter::ImplCreateHeaderFooterStrings( SvStream& rStrm, css::uno::Refere OUString aString; css::uno::Any aAny; - if ( PropValue::GetPropertyValue( aAny, rXPagePropSet, "HeaderText", true ) ) + if ( PropValue::GetPropertyValue( aAny, rXPagePropSet, u"HeaderText"_ustr, true ) ) { if ( aAny >>= aString ) PPTWriter::WriteCString( rStrm, aString, 1 ); } - if ( PropValue::GetPropertyValue( aAny, rXPagePropSet, "FooterText", true ) ) + if ( PropValue::GetPropertyValue( aAny, rXPagePropSet, u"FooterText"_ustr, true ) ) { if ( aAny >>= aString ) PPTWriter::WriteCString( rStrm, aString, 2 ); } - if ( PropValue::GetPropertyValue( aAny, rXPagePropSet, "DateTimeText", true ) ) + if ( PropValue::GetPropertyValue( aAny, rXPagePropSet, u"DateTimeText"_ustr, true ) ) { if ( aAny >>= aString ) PPTWriter::WriteCString( rStrm, aString ); @@ -581,34 +581,34 @@ void PPTWriter::ImplCreateHeaderFooters( css::uno::Reference< css::beans::XPrope bool bVal = false; sal_uInt32 nVal = 0; css::uno::Any aAny; - if ( PropValue::GetPropertyValue( aAny, rXPagePropSet, "IsHeaderVisible", true ) ) + if ( PropValue::GetPropertyValue( aAny, rXPagePropSet, u"IsHeaderVisible"_ustr, true ) ) { if ( ( aAny >>= bVal ) && bVal ) nVal |= 0x100000; } - if ( PropValue::GetPropertyValue( aAny, rXPagePropSet, "IsFooterVisible", true ) ) + if ( PropValue::GetPropertyValue( aAny, rXPagePropSet, u"IsFooterVisible"_ustr, true ) ) { if ( ( aAny >>= bVal ) && bVal ) nVal |= 0x200000; } - if ( PropValue::GetPropertyValue( aAny, rXPagePropSet, "IsDateTimeVisible", true ) ) + if ( PropValue::GetPropertyValue( aAny, rXPagePropSet, u"IsDateTimeVisible"_ustr, true ) ) { if ( ( aAny >>= bVal ) && bVal ) nVal |= 0x010000; } - if ( PropValue::GetPropertyValue( aAny, rXPagePropSet, "IsPageNumberVisible", true ) ) + if ( PropValue::GetPropertyValue( aAny, rXPagePropSet, u"IsPageNumberVisible"_ustr, true ) ) { if ( ( aAny >>= bVal ) && bVal ) nVal |= 0x080000; } - if ( PropValue::GetPropertyValue( aAny, rXPagePropSet, "IsDateTimeFixed", true ) ) + if ( PropValue::GetPropertyValue( aAny, rXPagePropSet, u"IsDateTimeFixed"_ustr, true ) ) { if ( ( aAny >>= bVal ) && !bVal ) nVal |= 0x20000; else nVal |= 0x40000; } - if ( PropValue::GetPropertyValue( aAny, rXPagePropSet, "DateTimeFormat", true ) ) + if ( PropValue::GetPropertyValue( aAny, rXPagePropSet, u"DateTimeFormat"_ustr, true ) ) { sal_Int32 nFormat = *o3tl::doAccess<sal_Int32>(aAny); SvxDateFormat eDateFormat = static_cast<SvxDateFormat>( nFormat & 0xf ); @@ -769,7 +769,7 @@ bool PPTWriter::ImplCreateDocument() // Bit 7 loop continuously // Bit 8 show scrollbar - if ( ImplGetPropertyValue( "CustomShow" ) ) + if ( ImplGetPropertyValue( u"CustomShow"_ustr ) ) { aCustomShow = *o3tl::doAccess<OUString>(mAny); if ( !aCustomShow.isEmpty() ) @@ -779,7 +779,7 @@ bool PPTWriter::ImplCreateDocument() } if ( ( nFlags & 8 ) == 0 ) { - if ( ImplGetPropertyValue( "FirstPage" ) ) + if ( ImplGetPropertyValue( u"FirstPage"_ustr ) ) { auto aSlideName = o3tl::doAccess<OUString>(mAny); @@ -795,7 +795,7 @@ bool PPTWriter::ImplCreateDocument() } } - if ( ImplGetPropertyValue( "IsAutomatic" ) ) + if ( ImplGetPropertyValue( u"IsAutomatic"_ustr ) ) { bool bBool = false; mAny >>= bBool; @@ -803,14 +803,14 @@ bool PPTWriter::ImplCreateDocument() nFlags |= 1; } - if ( ImplGetPropertyValue( "IsEndless" ) ) + if ( ImplGetPropertyValue( u"IsEndless"_ustr ) ) { bool bBool = false; mAny >>= bBool; if ( bBool ) nFlags |= 0x80; } - if ( ImplGetPropertyValue( "IsFullScreen" ) ) + if ( ImplGetPropertyValue( u"IsFullScreen"_ustr ) ) { bool bBool = false; mAny >>= bBool; @@ -1168,7 +1168,7 @@ void PPTWriter::ImplWriteBackground( css::uno::Reference< css::beans::XPropertyS EscherPropertyContainer aPropOpt( mpPptEscherEx->GetGraphicProvider(), mpPicStrm.get(), aRect ); aPropOpt.AddOpt( ESCHER_Prop_fillType, ESCHER_FillSolid ); css::drawing::FillStyle aFS( css::drawing::FillStyle_NONE ); - if ( ImplGetPropertyValue( rXPropSet, "FillStyle" ) ) + if ( ImplGetPropertyValue( rXPropSet, u"FillStyle"_ustr ) ) mAny >>= aFS; switch( aFS ) @@ -1183,16 +1183,16 @@ void PPTWriter::ImplWriteBackground( css::uno::Reference< css::beans::XPropertyS break; case css::drawing::FillStyle_BITMAP : - aPropOpt.CreateGraphicProperties( rXPropSet, "FillBitmap", true ); + aPropOpt.CreateGraphicProperties( rXPropSet, u"FillBitmap"_ustr, true ); break; case css::drawing::FillStyle_HATCH : - aPropOpt.CreateGraphicProperties( rXPropSet, "FillHatch", true ); + aPropOpt.CreateGraphicProperties( rXPropSet, u"FillHatch"_ustr, true ); break; case css::drawing::FillStyle_SOLID : { - if ( ImplGetPropertyValue( rXPropSet, "FillColor" ) ) + if ( ImplGetPropertyValue( rXPropSet, u"FillColor"_ustr ) ) { nFillColor = EscherEx::GetColor( *o3tl::doAccess<sal_uInt32>(mAny) ); nFillBackColor = nFillColor ^ 0xffffff; @@ -1435,15 +1435,15 @@ SAL_DLLPUBLIC_EXPORT bool SaveVBA( SfxObjectShell& rDocShell, SvMemoryStream*& p { rtl::Reference<SotStorage> xDest(new SotStorage(new SvMemoryStream(), true)); SvxImportMSVBasic aMSVBas( rDocShell, *xDest ); - aMSVBas.SaveOrDelMSVBAStorage( true, "_MS_VBA_Overhead" ); + aMSVBas.SaveOrDelMSVBAStorage( true, u"_MS_VBA_Overhead"_ustr ); - rtl::Reference<SotStorage> xOverhead = xDest->OpenSotStorage("_MS_VBA_Overhead"); + rtl::Reference<SotStorage> xOverhead = xDest->OpenSotStorage(u"_MS_VBA_Overhead"_ustr); if ( xOverhead.is() && ( xOverhead->GetError() == ERRCODE_NONE ) ) { - rtl::Reference<SotStorage> xOverhead2 = xOverhead->OpenSotStorage("_MS_VBA_Overhead"); + rtl::Reference<SotStorage> xOverhead2 = xOverhead->OpenSotStorage(u"_MS_VBA_Overhead"_ustr); if ( xOverhead2.is() && ( xOverhead2->GetError() == ERRCODE_NONE ) ) { - rtl::Reference<SotStorageStream> xTemp = xOverhead2->OpenSotStream("_MS_VBA_Overhead2"); + rtl::Reference<SotStorageStream> xTemp = xOverhead2->OpenSotStream(u"_MS_VBA_Overhead2"_ustr); if ( xTemp.is() && ( xTemp->GetError() == ERRCODE_NONE ) ) { sal_uInt32 nLen = xTemp->GetSize(); diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx index b8d7f8fdf6e3..87510606c43b 100644 --- a/sd/source/filter/eppt/epptso.cxx +++ b/sd/source/filter/eppt/epptso.cxx @@ -726,7 +726,7 @@ void PPTWriter::ImplWriteParagraphs( SvStream& rOut, TextObj& rTextObj ) { bool bIsDark = false; css::uno::Any aAny; - if ( PropValue::GetPropertyValue( aAny, mXPagePropSet, "IsBackgroundDark", true ) ) + if ( PropValue::GetPropertyValue( aAny, mXPagePropSet, u"IsBackgroundDark"_ustr, true ) ) aAny >>= bIsDark; nBulletColor = bIsDark ? 0xffffff : 0x000000; } @@ -779,7 +779,7 @@ void PPTWriter::ImplWritePortions( SvStream& rOut, TextObj& rTextObj ) { bool bIsDark = false; css::uno::Any aAny; - if ( PropValue::GetPropertyValue( aAny, mXPagePropSet, "IsBackgroundDark", true ) ) + if ( PropValue::GetPropertyValue( aAny, mXPagePropSet, u"IsBackgroundDark"_ustr, true ) ) aAny >>= bIsDark; nCharColor = bIsDark ? 0xffffff : 0x000000; } @@ -797,7 +797,7 @@ void PPTWriter::ImplWritePortions( SvStream& rOut, TextObj& rTextObj ) css::uno::Any aAny; css::drawing::FillStyle aFS( css::drawing::FillStyle_NONE ); - if ( PropValue::GetPropertyValue( aAny, mXPropSet, "FillStyle" ) ) + if ( PropValue::GetPropertyValue( aAny, mXPropSet, u"FillStyle"_ustr ) ) aAny >>= aFS; switch( aFS ) { @@ -811,7 +811,7 @@ void PPTWriter::ImplWritePortions( SvStream& rOut, TextObj& rTextObj ) break; case css::drawing::FillStyle_SOLID : { - if ( PropValue::GetPropertyValue( aAny, mXPropSet, "FillColor" ) ) + if ( PropValue::GetPropertyValue( aAny, mXPropSet, u"FillColor"_ustr ) ) nBackgroundColor = EscherEx::GetColor( *o3tl::doAccess<sal_uInt32>(aAny) ); } break; @@ -819,7 +819,7 @@ void PPTWriter::ImplWritePortions( SvStream& rOut, TextObj& rTextObj ) { css::uno::Any aBackAny; css::drawing::FillStyle aBackFS( css::drawing::FillStyle_NONE ); - if ( PropValue::GetPropertyValue( aBackAny, mXBackgroundPropSet, "FillStyle" ) ) + if ( PropValue::GetPropertyValue( aBackAny, mXBackgroundPropSet, u"FillStyle"_ustr ) ) aBackAny >>= aBackFS; switch( aBackFS ) { @@ -833,7 +833,7 @@ void PPTWriter::ImplWritePortions( SvStream& rOut, TextObj& rTextObj ) break; case css::drawing::FillStyle_SOLID : { - if ( PropValue::GetPropertyValue( aAny, mXBackgroundPropSet, "FillColor" ) ) + if ( PropValue::GetPropertyValue( aAny, mXBackgroundPropSet, u"FillColor"_ustr ) ) nBackgroundColor = EscherEx::GetColor( *o3tl::doAccess<sal_uInt32>(aAny) ); } break; @@ -867,7 +867,7 @@ void PPTWriter::ImplWritePortions( SvStream& rOut, TextObj& rTextObj ) if ( aPropSetOfNextShape.is() ) { if ( PropValue::GetPropertyValue( aAny, aPropSetOfNextShape, - "FillColor", true ) ) + u"FillColor"_ustr, true ) ) { if ( nCharColor == EscherEx::GetColor( *o3tl::doAccess<sal_uInt32>(aAny) ) ) { @@ -950,7 +950,7 @@ bool PPTWriter::ImplGetText() { mnTextSize = mXText->getString().getLength(); css::uno::Any aAny; - if ( GetPropertyValue( aAny, mXPropSet, "FontIndependentLineSpacing", true ) ) + if ( GetPropertyValue( aAny, mXPropSet, u"FontIndependentLineSpacing"_ustr, true ) ) aAny >>= mbFontIndependentLineSpacing; } return ( mnTextSize != 0 ); @@ -1199,7 +1199,7 @@ void PPTWriter::ImplWriteTextStyleAtom( SvStream& rOut, int nTextInstance, sal_u const uno::Reference< beans::XPropertySet > xPropSet( mXModel, uno::UNO_QUERY ); if ( xPropSet.is() ) { - if(ImplGetPropertyValue( xPropSet, "TabStop" )) + if(ImplGetPropertyValue( xPropSet, u"TabStop"_ustr )) { sal_Int32 nTabStop( 0 ); if ( mAny >>= nTabStop ) @@ -1399,13 +1399,13 @@ void PPTWriter::ImplWriteClickAction( SvStream& rSt, css::presentation::ClickAct break; case css::presentation::ClickAction_SOUND : { - if ( ImplGetPropertyValue( "Bookmark" ) ) + if ( ImplGetPropertyValue( u"Bookmark"_ustr ) ) nSoundRef = maSoundCollection.GetId( *o3tl::doAccess<OUString>(mAny) ); } break; case css::presentation::ClickAction_PROGRAM : { - if ( ImplGetPropertyValue( "Bookmark" ) ) + if ( ImplGetPropertyValue( u"Bookmark"_ustr ) ) { INetURLObject aUrl( *o3tl::doAccess<OUString>(mAny) ); if ( INetProtocol::File == aUrl.GetProtocol() ) @@ -1419,7 +1419,7 @@ void PPTWriter::ImplWriteClickAction( SvStream& rSt, css::presentation::ClickAct case css::presentation::ClickAction_BOOKMARK : { - if ( ImplGetPropertyValue( "Bookmark" ) ) + if ( ImplGetPropertyValue( u"Bookmark"_ustr ) ) { OUString aBookmark( *o3tl::doAccess<OUString>(mAny) ); sal_uInt32 nIndex = 0; @@ -1446,7 +1446,7 @@ void PPTWriter::ImplWriteClickAction( SvStream& rSt, css::presentation::ClickAct case css::presentation::ClickAction_DOCUMENT : { - if ( ImplGetPropertyValue( "Bookmark" ) ) + if ( ImplGetPropertyValue( u"Bookmark"_ustr ) ) { OUString aBookmark( *o3tl::doAccess<OUString>(mAny) ); if ( !aBookmark.isEmpty() ) @@ -1504,16 +1504,16 @@ bool PPTWriter::ImplGetEffect( const css::uno::Reference< css::beans::XPropertyS bool& bIsSound ) { css::uno::Any aAny; - if ( GetPropertyValue( aAny, rPropSet, "Effect" ) ) + if ( GetPropertyValue( aAny, rPropSet, u"Effect"_ustr ) ) aAny >>= eEffect; else eEffect = css::presentation::AnimationEffect_NONE; - if ( GetPropertyValue( aAny, rPropSet, "TextEffect" ) ) + if ( GetPropertyValue( aAny, rPropSet, u"TextEffect"_ustr ) ) aAny >>= eTextEffect; else eTextEffect = css::presentation::AnimationEffect_NONE; - if ( GetPropertyValue( aAny, rPropSet, "SoundOn" ) ) + if ( GetPropertyValue( aAny, rPropSet, u"SoundOn"_ustr ) ) aAny >>= bIsSound; else bIsSound = false; @@ -1658,7 +1658,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a bool bEffect = ImplGetEffect( mXPropSet, eAe, eTe, bIsSound ); css::presentation::ClickAction eCa = css::presentation::ClickAction_NONE; - if ( ImplGetPropertyValue( "OnClick" ) ) + if ( ImplGetPropertyValue( u"OnClick"_ustr ) ) mAny >>= eCa; bool bGroup = mType == "drawing.Group"; @@ -1666,7 +1666,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a bool bClosedBezier = mType == "drawing.ClosedBezier"; bool bPolyPolygon = mType == "drawing.PolyPolygon"; bool bPolyLine = mType == "drawing.PolyLine"; - OUString aGraphicPropertyName("Graphic"); + OUString aGraphicPropertyName(u"Graphic"_ustr); const css::awt::Size aSize100thmm( mXShape->getSize() ); const css::awt::Point aPoint100thmm( mXShape->getPosition() ); @@ -1694,9 +1694,9 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a bool bIsFontwork = false; bool bIsHatching = false; css::uno::Any aAny; - if ( GetPropertyValue( aAny, mXPropSet, "IsFontwork", true ) ) + if ( GetPropertyValue( aAny, mXPropSet, u"IsFontwork"_ustr, true ) ) aAny >>= bIsFontwork; - if ( GetPropertyValue( aAny, mXPropSet, "FillStyle", true ) ) + if ( GetPropertyValue( aAny, mXPropSet, u"FillStyle"_ustr, true ) ) { css::drawing::FillStyle eFS; aAny >>= eFS; @@ -1718,7 +1718,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a } if ( bIsHatching || bIsFontwork || ( mType == "drawing.Measure" ) || ( mType == "drawing.Caption" ) ) { - if ( ImplGetPropertyValue( "BoundRect" ) ) + if ( ImplGetPropertyValue( u"BoundRect"_ustr ) ) { auto aRect = o3tl::doAccess<css::awt::Rectangle>(mAny); maPosition = MapPoint( css::awt::Point( aRect->X, aRect->Y ) ); @@ -1744,7 +1744,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a ImplCreateShape( ESCHER_ShpInst_PictureFrame, ShapeFlag::HaveAnchor | ShapeFlag::HaveShapeProperty, aSolverContainer ); - if ( aPropOpt.CreateGraphicProperties( mXPropSet, "MetaFile", false ) ) + if ( aPropOpt.CreateGraphicProperties( mXPropSet, u"MetaFile"_ustr, false ) ) { aPropOpt.AddOpt( ESCHER_Prop_LockAgainstGrouping, 0x800080 ); SdrObject* pObj = SdrObject::getSdrObjectFromXShape(mXShape); @@ -1779,7 +1779,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a { sal_Int32 nRadius = 0; mpPptEscherEx->OpenContainer( ESCHER_SpContainer ); - if ( ImplGetPropertyValue( "CornerRadius" ) ) + if ( ImplGetPropertyValue( u"CornerRadius"_ustr ) ) { mAny >>= nRadius; nRadius = MapSize( css::awt::Size( nRadius, 0 ) ).Width; @@ -1821,7 +1821,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a { css::drawing::CircleKind eCircleKind( css::drawing::CircleKind_FULL ); PolyStyle ePolyKind = PolyStyle::Chord; - if ( ImplGetPropertyValue( "CircleKind" ) ) + if ( ImplGetPropertyValue( u"CircleKind"_ustr ) ) { mAny >>= eCircleKind; switch ( eCircleKind ) @@ -1863,10 +1863,10 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a else { sal_Int32 nStartAngle, nEndAngle; - if ( !ImplGetPropertyValue( "CircleStartAngle" ) ) + if ( !ImplGetPropertyValue( u"CircleStartAngle"_ustr ) ) continue; nStartAngle = *o3tl::doAccess<sal_Int32>(mAny); - if( !ImplGetPropertyValue( "CircleEndAngle" ) ) + if( !ImplGetPropertyValue( u"CircleEndAngle"_ustr ) ) continue; nEndAngle = *o3tl::doAccess<sal_Int32>(mAny); css::awt::Point aPoint( mXShape->getPosition() ); @@ -1945,7 +1945,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a { // try to get the aspect when available css::uno::Reference< css::beans::XPropertySet > xShapeProps( mXShape, css::uno::UNO_QUERY_THROW ); - xShapeProps->getPropertyValue("Aspect") >>= nAspect; + xShapeProps->getPropertyValue(u"Aspect"_ustr) >>= nAspect; } catch( css::uno::Exception& ) {} @@ -1989,7 +1989,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a if ( !aUserName.isEmpty() ) { rtl::Reference<SotStorageStream> xCompObj = xTemp->OpenSotStream( - "CompObj", + u"CompObj"_ustr, StreamMode::READ | StreamMode::NOCREATE | StreamMode::SHARE_DENYALL ); sal_uInt32 const nStreamLen = xCompObj->remainingSize(); sal_Int16 nVersion, nByteOrder; @@ -2030,7 +2030,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a mpPptEscherEx->OpenContainer( ESCHER_SpContainer ); ShapeFlag const nSpFlags = ShapeFlag::HaveShapeProperty | ShapeFlag::HaveAnchor | ShapeFlag::OLEShape; ImplCreateShape( ESCHER_ShpInst_HostControl, nSpFlags, aSolverContainer ); - if ( aPropOpt.CreateGraphicProperties( mXPropSet, "MetaFile", false ) ) + if ( aPropOpt.CreateGraphicProperties( mXPropSet, u"MetaFile"_ustr, false ) ) aPropOpt.AddOpt( ESCHER_Prop_LockAgainstGrouping, 0x800080 ); //export form control graphic else if ( aPropOpt.CreateBlipPropertiesforOLEControl(mXPropSet,mXShape)) @@ -2211,7 +2211,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a ImplCreateShape( ESCHER_ShpInst_Rectangle, ShapeFlag::HaveAnchor | ShapeFlag::HaveShapeProperty, aSolverContainer ); - if ( aPropOpt.CreateGraphicProperties( mXPropSet, "Graphic", true, true, false ) ) + if ( aPropOpt.CreateGraphicProperties( mXPropSet, u"Graphic"_ustr, true, true, false ) ) { aPropOpt.AddOpt( ESCHER_Prop_WrapText, ESCHER_WrapNone ); aPropOpt.AddOpt( ESCHER_Prop_AnchorText, ESCHER_AnchorMiddle ); @@ -2528,7 +2528,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a { // try to get the aspect when available css::uno::Reference< css::beans::XPropertySet > xShapeProps( mXShape, css::uno::UNO_QUERY_THROW ); - xShapeProps->getPropertyValue("Aspect") >>= nAspect; + xShapeProps->getPropertyValue(u"Aspect"_ustr) >>= nAspect; } catch( css::uno::Exception& ) {} @@ -2605,7 +2605,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a else if ( (mType.getLength() > 9) && (mType[8] == '3') && (mType[9] == 'D') ) // drawing.3D { // SceneObject, CubeObject, SphereObject, LatheObject, ExtrudeObject, PolygonObject - if ( !ImplGetPropertyValue( "Bitmap" ) ) + if ( !ImplGetPropertyValue( u"Bitmap"_ustr ) ) continue; mpPptEscherEx->OpenContainer( ESCHER_SpContainer ); @@ -2613,7 +2613,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a ShapeFlag::HaveAnchor | ShapeFlag::HaveShapeProperty, aSolverContainer ); - if ( aPropOpt.CreateGraphicProperties( mXPropSet, "Bitmap", false ) ) + if ( aPropOpt.CreateGraphicProperties( mXPropSet, u"Bitmap"_ustr, false ) ) aPropOpt.AddOpt( ESCHER_Prop_LockAgainstGrouping, 0x800080 ); } else if ( mType == "drawing.Media" ) @@ -2626,7 +2626,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a if ( aPropOpt.CreateMediaGraphicProperties( mXShape ) ) aPropOpt.AddOpt( ESCHER_Prop_LockAgainstGrouping, 0x800080 ); css::uno::Any aAny; - if ( PropValue::GetPropertyValue( aAny, mXPropSet, "MediaURL", true ) ) + if ( PropValue::GetPropertyValue( aAny, mXPropSet, u"MediaURL"_ustr, true ) ) { OUString aMediaURL; if ( (aAny >>= aMediaURL ) && !aMediaURL.isEmpty() ) @@ -2706,7 +2706,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a ImplCreateShape( ESCHER_ShpInst_PictureFrame, ShapeFlag::HaveAnchor | ShapeFlag::HaveShapeProperty, aSolverContainer ); - if ( aPropOpt.CreateGraphicProperties( mXPropSet, "MetaFile", false ) ) + if ( aPropOpt.CreateGraphicProperties( mXPropSet, u"MetaFile"_ustr, false ) ) aPropOpt.AddOpt( ESCHER_Prop_LockAgainstGrouping, 0x800080 ); } else @@ -2884,7 +2884,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a css::uno::Any aAny; EscherPropertyContainer aPropOpt; mnAngle = ( PropValue::GetPropertyValue( aAny, - mXPropSet, "RotateAngle", true ) ) + mXPropSet, u"RotateAngle"_ustr, true ) ) ? *o3tl::doAccess<sal_Int32>(aAny) : 0; @@ -3068,7 +3068,7 @@ void PPTWriter::ImplCreateTable( uno::Reference< drawing::XShape > const & rXSha try { uno::Reference< table::XTable > xTable; - if ( mXPropSet->getPropertyValue( "Model" ) >>= xTable ) + if ( mXPropSet->getPropertyValue( u"Model"_ustr ) >>= xTable ) { uno::Reference< table::XColumnRowRange > xColumnRowRange( xTable, uno::UNO_QUERY_THROW ); uno::Reference< container::XIndexAccess > xColumns( xColumnRowRange->getColumns(), uno::UNO_QUERY_THROW ); @@ -3085,7 +3085,7 @@ void PPTWriter::ImplCreateTable( uno::Reference< drawing::XShape > const & rXSha { uno::Reference< beans::XPropertySet > xPropSet( xColumns->getByIndex( x ), uno::UNO_QUERY_THROW ); awt::Size aS( 0, 0 ); - xPropSet->getPropertyValue( "Width" ) >>= aS.Width; + xPropSet->getPropertyValue( u"Width"_ustr ) >>= aS.Width; awt::Size aM( MapSize( aS ) ); aColumns.emplace_back( nPosition, aM.Width ); nPosition += aM.Width; @@ -3098,7 +3098,7 @@ void PPTWriter::ImplCreateTable( uno::Reference< drawing::XShape > const & rXSha { uno::Reference< beans::XPropertySet > xPropSet( xRows->getByIndex( y ), uno::UNO_QUERY_THROW ); awt::Size aS( 0, 0 ); - xPropSet->getPropertyValue( "Height" ) >>= aS.Height; + xPropSet->getPropertyValue( u"Height"_ustr ) >>= aS.Height; awt::Size aM( MapSize( aS ) ); aRows.emplace_back( nPosition, aM.Height ); nPosition += aM.Height; @@ -3158,7 +3158,7 @@ void PPTWriter::ImplCreateTable( uno::Reference< drawing::XShape > const & rXSha mnTextSize = mXText->getString().getLength(); css::uno::Any aAny; - if ( GetPropertyValue( aAny, mXPropSet, "FontIndependentLineSpacing", true ) ) + if ( GetPropertyValue( aAny, mXPropSet, u"FontIndependentLineSpacing"_ustr, true ) ) aAny >>= mbFontIndependentLineSpacing; EscherPropertyContainer aPropOptSp; @@ -3220,7 +3220,7 @@ void PPTWriter::ImplCreateTable( uno::Reference< drawing::XShape > const & rXSha { uno::Reference< beans::XPropertySet > xPropSet2( xCell, uno::UNO_QUERY_THROW ); table::BorderLine aBorderLine; - if ( xPropSet2->getPropertyValue( "TopBorder" ) >>= aBorderLine ) + if ( xPropSet2->getPropertyValue( u"TopBorder"_ustr ) >>= aBorderLine ) aCellBorder.maCellBorder = aBorderLine; sal_Int32 nRight = GetCellRight( nColumn, maRect,aColumns,xCell ); bTop = ImplCreateCellBorder( &aCellBorder, aCellBorder.mnPos, @@ -3246,7 +3246,7 @@ void PPTWriter::ImplCreateTable( uno::Reference< drawing::XShape > const & rXSha uno::Reference< table::XMergeableCell > xCellOwn( xCellRange->getCellByPosition( nColumn, nRow - 1 ), uno::UNO_QUERY_THROW ); uno::Reference< beans::XPropertySet > xPropSet2( xCellOwn, uno::UNO_QUERY_THROW ); table::BorderLine aBorderLine; - if ( xPropSet2->getPropertyValue( "BottomBorder" ) >>= aBorderLine ) + if ( xPropSet2->getPropertyValue( u"BottomBorder"_ustr ) >>= aBorderLine ) aCellBorder.maCellBorder = aBorderLine; ImplCreateCellBorder( &aCellBorder, aCellBorder.mnPos, nBottom, nRight, nBottom); @@ -3276,7 +3276,7 @@ void PPTWriter::ImplCreateTable( uno::Reference< drawing::XShape > const & rXSha { uno::Reference< beans::XPropertySet > xCellSet( xCell, uno::UNO_QUERY_THROW ); table::BorderLine aBorderLine; - if ( xCellSet->getPropertyValue( "LeftBorder" ) >>= aBorderLine ) + if ( xCellSet->getPropertyValue( u"LeftBorder"_ustr ) >>= aBorderLine ) aCellBorder.maCellBorder = aBorderLine; sal_Int32 nBottom = GetCellBottom( nRow, maRect, aRows,xCell ); bLeft = ImplCreateCellBorder( &aCellBorder, aColumns[nLine].first, aCellBorder.mnPos, @@ -3298,7 +3298,7 @@ void PPTWriter::ImplCreateTable( uno::Reference< drawing::XShape > const & rXSha uno::Reference< table::XMergeableCell > xCellOwn( xCellRange->getCellByPosition( nColumn - 1, nRow ), uno::UNO_QUERY_THROW ); uno::Reference< beans::XPropertySet > xCellSet( xCellOwn, uno::UNO_QUERY_THROW ); table::BorderLine aBorderLine; - if ( xCellSet->getPropertyValue( "RightBorder" ) >>= aBorderLine ) + if ( xCellSet->getPropertyValue( u"RightBorder"_ustr ) >>= aBorderLine ) aCellBorder.maCellBorder = aBorderLine; ImplCreateCellBorder( &aCellBorder, nRight, aCellBorder.mnPos, nRight, nBottom ); diff --git a/sd/source/filter/eppt/pptexanimations.cxx b/sd/source/filter/eppt/pptexanimations.cxx index cbc65ceff792..353a20b9c520 100644 --- a/sd/source/filter/eppt/pptexanimations.cxx +++ b/sd/source/filter/eppt/pptexanimations.cxx @@ -1389,7 +1389,7 @@ Any AnimationExporter::convertAnimateValue( const Any& rSourceValue, std::u16str { sal_Int32 nColor = 0; Sequence< double > aHSL( 3 ); - OUString aP( "," ); + OUString aP( u","_ustr ); if ( rSourceValue >>= aHSL ) { aDest += "hsl(" diff --git a/sd/source/filter/eppt/pptexsoundcollection.cxx b/sd/source/filter/eppt/pptexsoundcollection.cxx index 65c537a6f469..720728580a99 100644 --- a/sd/source/filter/eppt/pptexsoundcollection.cxx +++ b/sd/source/filter/eppt/pptexsoundcollection.cxx @@ -40,7 +40,7 @@ ExSoundEntry::ExSoundEntry(OUString aString) css::uno::Reference< css::ucb::XCommandEnvironment >(), comphelper::getProcessComponentContext() ); sal_Int64 nVal = 0; - aCnt.getPropertyValue("Size") >>= nVal; + aCnt.getPropertyValue(u"Size"_ustr) >>= nVal; nFileSize = static_cast<sal_uInt32>(nVal); } catch( css::uno::Exception& ) diff --git a/sd/source/filter/eppt/pptx-animations-nodectx.cxx b/sd/source/filter/eppt/pptx-animations-nodectx.cxx index 0e00b680a8d3..149e9a266c9e 100644 --- a/sd/source/filter/eppt/pptx-animations-nodectx.cxx +++ b/sd/source/filter/eppt/pptx-animations-nodectx.cxx @@ -177,8 +177,8 @@ void NodeContext::initValid(bool bHasValidChild, bool bIsIterateChild) { Reference<XPropertySet> xShapeProps(xShape, UNO_QUERY); bool bHasMediaURL - = xShapeProps->getPropertySetInfo()->hasPropertyByName("MediaURL"); - if (bHasMediaURL && (xShapeProps->getPropertyValue("MediaURL") >>= sURL)) + = xShapeProps->getPropertySetInfo()->hasPropertyByName(u"MediaURL"_ustr); + if (bHasMediaURL && (xShapeProps->getPropertyValue(u"MediaURL"_ustr) >>= sURL)) { mbValid = IsAudioURL(sURL) || IsVideoURL(sURL); } diff --git a/sd/source/filter/eppt/pptx-animations.cxx b/sd/source/filter/eppt/pptx-animations.cxx index 1dfdc29d6a08..4120b3d7a73a 100644 --- a/sd/source/filter/eppt/pptx-animations.cxx +++ b/sd/source/filter/eppt/pptx-animations.cxx @@ -1025,7 +1025,7 @@ void PPTXAnimationExport::WriteAnimationNodeCommand() uno::Sequence<beans::NamedValue> aParamSeq; xCommand->getParameter() >>= aParamSeq; comphelper::SequenceAsHashMap aMap(aParamSeq); - auto it = aMap.find("MediaTime"); + auto it = aMap.find(u"MediaTime"_ustr); if (it != aMap.end()) { double fMediaTime = 0; @@ -1086,8 +1086,9 @@ void PPTXAnimationExport::WriteAnimationNodeMedia() if (xAudio->getSource() >>= xShape) { uno::Reference<beans::XPropertySet> xShapeProps(xShape, uno::UNO_QUERY); - bool bHasMediaURL = xShapeProps->getPropertySetInfo()->hasPropertyByName("MediaURL"); - if (bHasMediaURL && (xShapeProps->getPropertyValue("MediaURL") >>= sUrl)) + bool bHasMediaURL + = xShapeProps->getPropertySetInfo()->hasPropertyByName(u"MediaURL"_ustr); + if (bHasMediaURL && (xShapeProps->getPropertyValue(u"MediaURL"_ustr) >>= sUrl)) { bVideo = IsVideoURL(sUrl); bValid = IsAudioURL(sUrl) || bVideo; diff --git a/sd/source/filter/eppt/pptx-epptbase.cxx b/sd/source/filter/eppt/pptx-epptbase.cxx index 6907389968d7..1e2137cb8057 100644 --- a/sd/source/filter/eppt/pptx-epptbase.cxx +++ b/sd/source/filter/eppt/pptx-epptbase.cxx @@ -149,7 +149,7 @@ void PPTWriterBase::exportPPT( const std::vector< css::beans::PropertyValue >& r if ( !InitSOIface() ) return; - FontCollectionEntry aDefaultFontDesc( "Times New Roman", + FontCollectionEntry aDefaultFontDesc( u"Times New Roman"_ustr, ROMAN, awt::FontPitch::VARIABLE, RTL_TEXTENCODING_MS_1252 ); @@ -159,10 +159,10 @@ void PPTWriterBase::exportPPT( const std::vector< css::beans::PropertyValue >& r return; sal_Int32 nWidth = 21000; - if ( ImplGetPropertyValue( mXPagePropSet, "Width" ) ) + if ( ImplGetPropertyValue( mXPagePropSet, u"Width"_ustr ) ) mAny >>= nWidth; sal_Int32 nHeight = 29700; - if ( ImplGetPropertyValue( mXPagePropSet, "Height" ) ) + if ( ImplGetPropertyValue( mXPagePropSet, u"Height"_ustr ) ) mAny >>= nHeight; maNotesPageSize = MapSize( awt::Size( nWidth, nHeight ) ); @@ -171,10 +171,10 @@ void PPTWriterBase::exportPPT( const std::vector< css::beans::PropertyValue >& r return; nWidth = 28000; - if ( ImplGetPropertyValue( mXPagePropSet, "Width" ) ) + if ( ImplGetPropertyValue( mXPagePropSet, u"Width"_ustr ) ) mAny >>= nWidth; nHeight = 21000; - if ( ImplGetPropertyValue( mXPagePropSet, "Height" ) ) + if ( ImplGetPropertyValue( mXPagePropSet, u"Height"_ustr ) ) mAny >>= nHeight; maDestPageSize = MapSize( awt::Size( nWidth, nHeight ) ); maPageSize = awt::Size(nWidth, nHeight); @@ -288,7 +288,7 @@ bool PPTWriterBase::GetPageByIndex( sal_uInt32 nIndex, PageType ePageType ) if ( !mXPagePropSet.is() ) break; - if (GetPropertyValue( aAny, mXPagePropSet, "IsBackgroundDark" ) ) + if (GetPropertyValue( aAny, mXPagePropSet, u"IsBackgroundDark"_ustr ) ) aAny >>= mbIsBackgroundDark; mXShapes = mXDrawPage; @@ -297,7 +297,7 @@ bool PPTWriterBase::GetPageByIndex( sal_uInt32 nIndex, PageType ePageType ) /* try to get the "real" background PropertySet. If the normal page is not supporting this property, it is taken the property from the master */ - bool bHasBackground = GetPropertyValue( aAny, mXPagePropSet, "Background", true ); + bool bHasBackground = GetPropertyValue( aAny, mXPagePropSet, u"Background"_ustr, true ); if ( bHasBackground ) bHasBackground = ( aAny >>= mXBackgroundPropSet ); if ( !bHasBackground ) @@ -312,7 +312,7 @@ bool PPTWriterBase::GetPageByIndex( sal_uInt32 nIndex, PageType ePageType ) aXMasterPagePropSet.set( aXMasterDrawPage, UNO_QUERY ); if ( aXMasterPagePropSet.is() ) { - bool bBackground = GetPropertyValue( aAny, aXMasterPagePropSet, "Background" ); + bool bBackground = GetPropertyValue( aAny, aXMasterPagePropSet, u"Background"_ustr ); if ( bBackground ) { aAny >>= mXBackgroundPropSet; @@ -337,7 +337,7 @@ bool PPTWriterBase::CreateSlide( sal_uInt32 nPageNum ) SetCurrentStyleSheet( nMasterNum ); Reference< XPropertySet > aXBackgroundPropSet; - bool bHasBackground = GetPropertyValue( aAny, mXPagePropSet, "Background" ); + bool bHasBackground = GetPropertyValue( aAny, mXPagePropSet, u"Background"_ustr ); if ( bHasBackground ) bHasBackground = ( aAny >>= aXBackgroundPropSet ); @@ -356,7 +356,7 @@ bool PPTWriterBase::CreateSlide( sal_uInt32 nPageNum ) } } */ - if ( GetPropertyValue( aAny, mXPagePropSet, "IsBackgroundObjectsVisible" ) ) + if ( GetPropertyValue( aAny, mXPagePropSet, u"IsBackgroundObjectsVisible"_ustr ) ) { bool bBackgroundObjectsVisible = false; if ( aAny >>= bBackgroundObjectsVisible ) @@ -389,7 +389,7 @@ bool PPTWriterBase::CreateSlideMaster( sal_uInt32 nPageNum ) SetCurrentStyleSheet( nPageNum ); css::uno::Reference< css::beans::XPropertySet > aXBackgroundPropSet; - if (ImplGetPropertyValue(mXPagePropSet, "Background")) // load background shape + if (ImplGetPropertyValue(mXPagePropSet, u"Background"_ustr)) // load background shape mAny >>= aXBackgroundPropSet; ImplWriteSlideMaster( nPageNum, aXBackgroundPropSet ); @@ -401,7 +401,7 @@ sal_Int32 PPTWriterBase::GetLayoutOffset( const css::uno::Reference< css::beans: { css::uno::Any aAny; sal_Int32 nLayout = 20; - if ( GetPropertyValue( aAny, rXPropSet, "Layout", true ) ) + if ( GetPropertyValue( aAny, rXPropSet, u"Layout"_ustr, true ) ) aAny >>= nLayout; SAL_INFO("sd.eppt", "GetLayoutOffset " << nLayout); @@ -451,7 +451,7 @@ sal_uInt32 PPTWriterBase::GetMasterIndex( PageType ePageType ) css::uno::Reference< css::beans::XPropertySet > aXPropertySet( aXDrawPage, css::uno::UNO_QUERY ); if ( aXPropertySet.is() ) { - if ( ImplGetPropertyValue( aXPropertySet, "Number" ) ) + if ( ImplGetPropertyValue( aXPropertySet, u"Number"_ustr ) ) nRetValue |= *o3tl::doAccess<sal_Int16>(mAny); if ( nRetValue & 0xffff ) // avoid overflow nRetValue--; @@ -490,7 +490,7 @@ bool PPTWriterBase::GetStyleSheets() Reference< XPropertySet > aXPropSet( mXModel, UNO_QUERY ); - sal_uInt16 nDefaultTab = ( aXPropSet.is() && ImplGetPropertyValue( aXPropSet, "TabStop" ) ) + sal_uInt16 nDefaultTab = ( aXPropSet.is() && ImplGetPropertyValue( aXPropSet, u"TabStop"_ustr ) ) ? static_cast<sal_uInt16>( convertMm100ToMasterUnit(*o3tl::doAccess<sal_Int32>(mAny)) ) : 1250; @@ -694,14 +694,14 @@ bool PPTWriterBase::GetShapeByIndex( sal_uInt32 nIndex, bool bGroup ) mType = aTypeBuffer.makeStringAndClear(); mbPresObj = mbEmptyPresObj = false; - if ( ImplGetPropertyValue( "IsPresentationObject" ) ) + if ( ImplGetPropertyValue( u"IsPresentationObject"_ustr ) ) mAny >>= mbPresObj; - if ( mbPresObj && ImplGetPropertyValue( "IsEmptyPresentationObject" ) ) + if ( mbPresObj && ImplGetPropertyValue( u"IsEmptyPresentationObject"_ustr ) ) mAny >>= mbEmptyPresObj; mnAngle = ( PropValue::GetPropertyValue( aAny, - mXPropSet, "RotateAngle", true ) ) + mXPropSet, u"RotateAngle"_ustr, true ) ) ? *o3tl::doAccess<sal_Int32>(aAny) : 0; diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx index e4e0b617d198..b8e552b3ad0d 100644 --- a/sd/source/filter/eppt/pptx-epptooxml.cxx +++ b/sd/source/filter/eppt/pptx-epptooxml.cxx @@ -351,8 +351,8 @@ PowerPointExport::PowerPointExport(const Reference< XComponentContext >& rContex , mnPlaceholderIndexMax(1) { comphelper::SequenceAsHashMap aArgumentsMap(rArguments); - mbPptm = aArgumentsMap.getUnpackedValueOrDefault("IsPPTM", false); - mbExportTemplate = aArgumentsMap.getUnpackedValueOrDefault("IsTemplate", false); + mbPptm = aArgumentsMap.getUnpackedValueOrDefault(u"IsPPTM"_ustr, false); + mbExportTemplate = aArgumentsMap.getUnpackedValueOrDefault(u"IsTemplate"_ustr, false); } PowerPointExport::~PowerPointExport() @@ -368,10 +368,10 @@ void PowerPointExport::writeDocumentProperties() { bool bSecurityOptOpenReadOnly = false; uno::Reference< lang::XMultiServiceFactory > xFactory(mXModel, uno::UNO_QUERY); - uno::Reference< beans::XPropertySet > xSettings(xFactory->createInstance("com.sun.star.document.Settings"), uno::UNO_QUERY); + uno::Reference< beans::XPropertySet > xSettings(xFactory->createInstance(u"com.sun.star.document.Settings"_ustr), uno::UNO_QUERY); try { - xSettings->getPropertyValue("LoadReadonly") >>= bSecurityOptOpenReadOnly; + xSettings->getPropertyValue(u"LoadReadonly"_ustr) >>= bSecurityOptOpenReadOnly; } catch( Exception& ) { @@ -427,7 +427,7 @@ bool PowerPointExport::exportDocument() } } - mPresentationFS = openFragmentStreamWithSerializer("ppt/presentation.xml", aMediaType); + mPresentationFS = openFragmentStreamWithSerializer(u"ppt/presentation.xml"_ustr, aMediaType); addRelation(mPresentationFS->getOutputStream(), oox::getRelationship(Relationship::THEME), @@ -552,7 +552,7 @@ void PowerPointExport::WriteCustomSlideShow() void PowerPointExport::ImplWriteBackground(const FSHelperPtr& pFS, const Reference< XPropertySet >& rXPropSet) { FillStyle aFillStyle(FillStyle_NONE); - if (ImplGetPropertyValue(rXPropSet, "FillStyle")) + if (ImplGetPropertyValue(rXPropSet, u"FillStyle"_ustr)) mAny >>= aFillStyle; if (aFillStyle == FillStyle_NONE || @@ -644,7 +644,7 @@ const char* PowerPointExport::Get8Direction(sal_uInt8 nDirection) void PowerPointExport::WriteTransition(const FSHelperPtr& pFS) { FadeEffect eFadeEffect = FadeEffect_NONE; - if (ImplGetPropertyValue(mXPagePropSet, "Effect")) + if (ImplGetPropertyValue(mXPagePropSet, u"Effect"_ustr)) mAny >>= eFadeEffect; sal_Int16 nTransitionType = 0, nTransitionSubtype = 0; @@ -655,12 +655,12 @@ void PowerPointExport::WriteTransition(const FSHelperPtr& pFS) OUString sSoundRelId; OUString sSoundName; - if (ImplGetPropertyValue(mXPagePropSet, "TransitionType") && (mAny >>= nTransitionType) && - ImplGetPropertyValue(mXPagePropSet, "TransitionSubtype") && (mAny >>= nTransitionSubtype)) + if (ImplGetPropertyValue(mXPagePropSet, u"TransitionType"_ustr) && (mAny >>= nTransitionType) && + ImplGetPropertyValue(mXPagePropSet, u"TransitionSubtype"_ustr) && (mAny >>= nTransitionSubtype)) { // FADEOVERCOLOR with black -> fade, with white -> flash sal_Int32 nTransitionFadeColor = 0; - if( ImplGetPropertyValue(mXPagePropSet, "TransitionFadeColor")) + if( ImplGetPropertyValue(mXPagePropSet, u"TransitionFadeColor"_ustr)) mAny >>= nTransitionFadeColor; nPPTTransitionType = GetTransition(nTransitionType, nTransitionSubtype, eFadeEffect, nTransitionFadeColor, nDirection); } @@ -668,7 +668,7 @@ void PowerPointExport::WriteTransition(const FSHelperPtr& pFS) if (!nPPTTransitionType && eFadeEffect != FadeEffect_NONE) nPPTTransitionType = GetTransition(eFadeEffect, nDirection); - if (ImplGetPropertyValue(mXPagePropSet, "Sound") && (mAny >>= sSoundUrl)) + if (ImplGetPropertyValue(mXPagePropSet, u"Sound"_ustr) && (mAny >>= sSoundUrl)) embedEffectAudio(pFS, sSoundUrl, sSoundRelId, sSoundName); bool bOOXmlSpecificTransition = false; @@ -770,7 +770,7 @@ void PowerPointExport::WriteTransition(const FSHelperPtr& pFS) bool isTransitionDurationSet = false; // try to use TransitionDuration instead of old Speed property - if (ImplGetPropertyValue(mXPagePropSet, "TransitionDuration")) + if (ImplGetPropertyValue(mXPagePropSet, u"TransitionDuration"_ustr)) { double fTransitionDuration = -1.0; mAny >>= fTransitionDuration; @@ -801,7 +801,7 @@ void PowerPointExport::WriteTransition(const FSHelperPtr& pFS) isTransitionDurationSet = true; } } - else if (ImplGetPropertyValue(mXPagePropSet, "Speed")) + else if (ImplGetPropertyValue(mXPagePropSet, u"Speed"_ustr)) { mAny >>= animationSpeed; @@ -823,11 +823,11 @@ void PowerPointExport::WriteTransition(const FSHelperPtr& pFS) if (!nPPTTransitionType && !bOOXmlSpecificTransition && !isTransitionDurationSet) return; - if (ImplGetPropertyValue(mXPagePropSet, "Change")) + if (ImplGetPropertyValue(mXPagePropSet, u"Change"_ustr)) mAny >>= changeType; // 1 means automatic, 2 half automatic - not sure what it means - at least I don't see it in UI - if (changeType == 1 && ImplGetPropertyValue(mXPagePropSet, "Duration")) + if (changeType == 1 && ImplGetPropertyValue(mXPagePropSet, u"Duration"_ustr)) mAny >>= advanceTiming; if (!bOOXmlSpecificTransition) @@ -1040,8 +1040,8 @@ void PowerPointExport::WriteAuthors() if (maAuthors.empty()) return; - FSHelperPtr pFS = openFragmentStreamWithSerializer("ppt/commentAuthors.xml", - "application/vnd.openxmlformats-officedocument.presentationml.commentAuthors+xml"); + FSHelperPtr pFS = openFragmentStreamWithSerializer(u"ppt/commentAuthors.xml"_ustr, + u"application/vnd.openxmlformats-officedocument.presentationml.commentAuthors+xml"_ustr); addRelation(mPresentationFS->getOutputStream(), oox::getRelationship(Relationship::COMMENTAUTHORS), u"commentAuthors.xml"); @@ -1089,14 +1089,14 @@ void PowerPointExport::WritePresentationProps() Reference<beans::XPropertySet> xPresentationProps(xPresentationSupplier->getPresentation(), uno::UNO_QUERY); - bool bEndlessVal = xPresentationProps->getPropertyValue("IsEndless").get<bool>(); - bool bChangeManually = xPresentationProps->getPropertyValue("IsAutomatic").get<bool>(); - OUString sFirstPage = xPresentationProps->getPropertyValue("FirstPage").get<OUString>(); - OUString sCustomShow = xPresentationProps->getPropertyValue("CustomShow").get<OUString>(); + bool bEndlessVal = xPresentationProps->getPropertyValue(u"IsEndless"_ustr).get<bool>(); + bool bChangeManually = xPresentationProps->getPropertyValue(u"IsAutomatic"_ustr).get<bool>(); + OUString sFirstPage = xPresentationProps->getPropertyValue(u"FirstPage"_ustr).get<OUString>(); + OUString sCustomShow = xPresentationProps->getPropertyValue(u"CustomShow"_ustr).get<OUString>(); FSHelperPtr pFS = openFragmentStreamWithSerializer( - "ppt/presProps.xml", - "application/vnd.openxmlformats-officedocument.presentationml.presProps+xml"); + u"ppt/presProps.xml"_ustr, + u"application/vnd.openxmlformats-officedocument.presentationml.presProps+xml"_ustr); addRelation(mPresentationFS->getOutputStream(), oox::getRelationship(Relationship::PRESPROPS), u"presProps.xml"); @@ -1168,7 +1168,7 @@ bool PowerPointExport::WriteComments(sal_uInt32 nPageNum) { FSHelperPtr pFS = openFragmentStreamWithSerializer( "ppt/comments/comment" + OUString::number(nPageNum + 1) + ".xml", - "application/vnd.openxmlformats-officedocument.presentationml.comments+xml"); + u"application/vnd.openxmlformats-officedocument.presentationml.comments+xml"_ustr); pFS->startElementNS(XML_p, XML_cmLst, FSNS(XML_xmlns, XML_p), this->getNamespaceURL(OOX_NS(ppt))); @@ -1225,7 +1225,7 @@ void PowerPointExport::WriteVBA() return; uno::Reference<embed::XStorage> xDocumentStorage = xStorageBasedDocument->getDocumentStorage(); - OUString aMacrosName("_MS_VBA_Macros"); + OUString aMacrosName(u"_MS_VBA_Macros"_ustr); if (!xDocumentStorage.is() || !xDocumentStorage->hasByName(aMacrosName)) return; @@ -1234,7 +1234,7 @@ void PowerPointExport::WriteVBA() if (!xMacrosStream.is()) return; - uno::Reference<io::XOutputStream> xOutputStream = openFragmentStream("ppt/vbaProject.bin", "application/vnd.ms-office.vbaProject"); + uno::Reference<io::XOutputStream> xOutputStream = openFragmentStream(u"ppt/vbaProject.bin"_ustr, u"application/vnd.ms-office.vbaProject"_ustr); comphelper::OStorageHelper::CopyInputToOutput(xMacrosStream, xOutputStream); // Write the relationship. @@ -1249,8 +1249,8 @@ void PowerPointExport::WriteModifyVerifier() { Reference<lang::XMultiServiceFactory> xFactory(mXModel, UNO_QUERY); Reference<XPropertySet> xDocSettings( - xFactory->createInstance("com.sun.star.document.Settings"), UNO_QUERY); - xDocSettings->getPropertyValue("ModifyPasswordInfo") >>= aInfo; + xFactory->createInstance(u"com.sun.star.document.Settings"_ustr), UNO_QUERY); + xDocSettings->getPropertyValue(u"ModifyPasswordInfo"_ustr) >>= aInfo; } catch (const Exception&) { @@ -1335,7 +1335,7 @@ void PowerPointExport::ImplWriteSlide(sal_uInt32 nPageNum, sal_uInt32 nMasterNum FSHelperPtr pFS = openFragmentStreamWithSerializer( "ppt/slides/slide" + OUString::number(nPageNum + 1) + ".xml", - "application/vnd.openxmlformats-officedocument.presentationml.slide+xml"); + u"application/vnd.openxmlformats-officedocument.presentationml.slide+xml"_ustr); if (mpSlidesFSArray.size() < mnPages) mpSlidesFSArray.resize(mnPages); @@ -1344,14 +1344,14 @@ void PowerPointExport::ImplWriteSlide(sal_uInt32 nPageNum, sal_uInt32 nMasterNum const char* pShow = nullptr; const char* pShowMasterShape = nullptr; - if (ImplGetPropertyValue(mXPagePropSet, "Visible")) + if (ImplGetPropertyValue(mXPagePropSet, u"Visible"_ustr)) { bool bShow(false); if ((mAny >>= bShow) && !bShow) pShow = "0"; } - if (ImplGetPropertyValue(mXPagePropSet, "IsBackgroundObjectsVisible")) + if (ImplGetPropertyValue(mXPagePropSet, u"IsBackgroundObjectsVisible"_ustr)) { bool bShowMasterShape(false); if ((mAny >>= bShowMasterShape) && !bShowMasterShape) @@ -1404,7 +1404,7 @@ void PowerPointExport::ImplWriteNotes(sal_uInt32 nPageNum) "ppt/notesSlides/notesSlide" + OUString::number(nPageNum + 1) + ".xml", - "application/vnd.openxmlformats-officedocument.presentationml.notesSlide+xml"); + u"application/vnd.openxmlformats-officedocument.presentationml.notesSlide+xml"_ustr); pFS->startElementNS(XML_p, XML_notes, PNMSS); @@ -1471,7 +1471,7 @@ void PowerPointExport::ImplWriteSlideMaster(sal_uInt32 nPageNum, Reference< XPro FSHelperPtr pFS = openFragmentStreamWithSerializer("ppt/slideMasters/slideMaster" + OUString::number(nPageNum + 1) + ".xml", - "application/vnd.openxmlformats-officedocument.presentationml.slideMaster+xml"); + u"application/vnd.openxmlformats-officedocument.presentationml.slideMaster+xml"_ustr); SdrPage* pMasterPage = SdPage::getImplementation(mXDrawPage); model::Theme* pTheme = nullptr; @@ -1544,7 +1544,7 @@ void PowerPointExport::ImplWriteSlideMaster(sal_uInt32 nPageNum, Reference< XPro if (xPagePropSet.is()) { uno::Any aAny; - if (GetPropertyValue(aAny, xPagePropSet, "SlideLayout")) + if (GetPropertyValue(aAny, xPagePropSet, u"SlideLayout"_ustr)) aLayouts.insert(aAny.get<sal_Int32>()); } @@ -1591,7 +1591,7 @@ void PowerPointExport::ImplWritePPTXLayout(sal_Int32 nOffset, sal_uInt32 nMaster #endif Reference< beans::XPropertySet > xPropSet(xSlide, uno::UNO_QUERY); - xPropSet->setPropertyValue("Layout", Any(short(aLayoutInfo[ nOffset ].nType))); + xPropSet->setPropertyValue(u"Layout"_ustr, Any(short(aLayoutInfo[ nOffset ].nType))); #if OSL_DEBUG_LEVEL > 1 dump_pset(xPropSet); #endif @@ -1609,7 +1609,7 @@ void PowerPointExport::ImplWritePPTXLayout(sal_Int32 nOffset, sal_uInt32 nMaster FSHelperPtr pFS = openFragmentStreamWithSerializer("ppt/slideLayouts/slideLayout" + OUString::number(mnLayoutFileIdMax) + ".xml", - "application/vnd.openxmlformats-officedocument.presentationml.slideLayout+xml"); + u"application/vnd.openxmlformats-officedocument.presentationml.slideLayout+xml"_ustr); // add implicit relation of slide layout to slide master addRelation(pFS->getOutputStream(), @@ -1702,7 +1702,7 @@ bool PowerPointShapeExport::WritePlaceholder(const Reference< XShape >& xShape, try { Reference<XPropertySet> xShapeProps(xShape, UNO_QUERY); - if (xShapeProps->getPropertyValue("IsPresentationObject").get<bool>()) + if (xShapeProps->getPropertyValue(u"IsPresentationObject"_ustr).get<bool>()) { WritePlaceholderShape(xShape, ePlaceholder); @@ -1720,8 +1720,8 @@ ShapeExport& PowerPointShapeExport::WritePlaceholderShape(const Reference< XShap { Reference<XPropertySet> xProps(xShape, UNO_QUERY); bool bUseBackground(false); - if (xProps.is() && xProps->getPropertySetInfo()->hasPropertyByName("FillUseSlideBackground")) - xProps->getPropertyValue("FillUseSlideBackground") >>= bUseBackground; + if (xProps.is() && xProps->getPropertySetInfo()->hasPropertyByName(u"FillUseSlideBackground"_ustr)) + xProps->getPropertyValue(u"FillUseSlideBackground"_ustr) >>= bUseBackground; if (bUseBackground) mpFS->startElementNS(XML_p, XML_sp, XML_useBgFill, "1"); @@ -1766,7 +1766,7 @@ ShapeExport& PowerPointShapeExport::WritePlaceholderShape(const Reference< XShap WritePresetShape("rect"_ostr); if (xProps.is()) { - WriteBlipFill(xProps, "Graphic"); + WriteBlipFill(xProps, u"Graphic"_ustr); // Do not forget to export the visible properties. WriteFill( xProps, xShape->getSize()); WriteOutline( xProps ); @@ -1774,8 +1774,8 @@ ShapeExport& PowerPointShapeExport::WritePlaceholderShape(const Reference< XShap bool bHas3DEffectinShape = false; uno::Sequence<beans::PropertyValue> grabBag; - if (xProps->getPropertySetInfo()->hasPropertyByName("InteropGrabBag")) - xProps->getPropertyValue("InteropGrabBag") >>= grabBag; + if (xProps->getPropertySetInfo()->hasPropertyByName(u"InteropGrabBag"_ustr)) + xProps->getPropertyValue(u"InteropGrabBag"_ustr) >>= grabBag; for (auto const& it : grabBag) if (it.Name == "3DEffectProperties") @@ -1847,7 +1847,7 @@ ShapeExport& PowerPointShapeExport::WritePlaceholderReferenceTextBody( } else { - xPagePropSet->getPropertyValue("FooterText") >>= aFooterText; + xPagePropSet->getPropertyValue(u"FooterText"_ustr) >>= aFooterText; } mpFS->startElementNS(XML_a, XML_r); mpFS->startElementNS(XML_a, XML_t); @@ -1866,7 +1866,7 @@ ShapeExport& PowerPointShapeExport::WritePlaceholderReferenceTextBody( } else { - xPagePropSet->getPropertyValue("Number") >>= nSlideNum; + xPagePropSet->getPropertyValue(u"Number"_ustr) >>= nSlideNum; aSlideNum = OUString::number(nSlideNum); } OString aUUID(comphelper::xml::generateGUIDString()); @@ -1879,17 +1879,17 @@ ShapeExport& PowerPointShapeExport::WritePlaceholderReferenceTextBody( } case DateAndTime: { - OUString aDateTimeType = "datetime1"; + OUString aDateTimeType = u"datetime1"_ustr; bool bIsDateTimeFixed = false; - xPagePropSet->getPropertyValue("IsDateTimeFixed") >>= bIsDateTimeFixed; + xPagePropSet->getPropertyValue(u"IsDateTimeFixed"_ustr) >>= bIsDateTimeFixed; - OUString aDateTimeText = "Date"; + OUString aDateTimeText = u"Date"_ustr; const LanguageTag& rLanguageTag = Application::GetSettings().GetLanguageTag(); if(ePageType != LAYOUT && !bIsDateTimeFixed) { sal_Int32 nDateTimeFormat = 0; - xPagePropSet->getPropertyValue("DateTimeFormat") >>= nDateTimeFormat; + xPagePropSet->getPropertyValue(u"DateTimeFormat"_ustr) >>= nDateTimeFormat; // 4 LSBs represent the date SvxDateFormat eDate = static_cast<SvxDateFormat>(nDateTimeFormat & 0x0f); @@ -1915,7 +1915,7 @@ ShapeExport& PowerPointShapeExport::WritePlaceholderReferenceTextBody( } else { - xPagePropSet->getPropertyValue("DateTimeText") >>= aDateTimeText; + xPagePropSet->getPropertyValue(u"DateTimeText"_ustr) >>= aDateTimeText; mpFS->startElementNS(XML_a, XML_r); } @@ -2036,8 +2036,8 @@ void PowerPointExport::WriteNotesMaster() mPresentationFS->endElementNS(XML_p, XML_notesMasterIdLst); FSHelperPtr pFS = - openFragmentStreamWithSerializer("ppt/notesMasters/notesMaster1.xml", - "application/vnd.openxmlformats-officedocument.presentationml.notesMaster+xml"); + openFragmentStreamWithSerializer(u"ppt/notesMasters/notesMaster1.xml"_ustr, + u"application/vnd.openxmlformats-officedocument.presentationml.notesMaster+xml"_ustr); // write theme per master // TODO: Need to implement theme support for note master, so the @@ -2063,7 +2063,7 @@ void PowerPointExport::WriteNotesMaster() pFS->startElementNS(XML_p, XML_cSld); Reference< XPropertySet > aXBackgroundPropSet; - if (ImplGetPropertyValue(mXPagePropSet, "Background") && + if (ImplGetPropertyValue(mXPagePropSet, u"Background"_ustr) && (mAny >>= aXBackgroundPropSet)) ImplWriteBackground(pFS, aXBackgroundPropSet); @@ -2138,7 +2138,7 @@ void PowerPointExport::embedEffectAudio(const FSHelperPtr& pFS, const OUString& oox::getRelationship(Relationship::AUDIO), sPath); uno::Reference<io::XOutputStream> xOutputStream = openFragmentStream(sPath.replaceAt(0, 2, u"/ppt"), - "audio/x-wav"); + u"audio/x-wav"_ustr); comphelper::OStorageHelper::CopyInputToOutput(xAudioStream, xOutputStream); } @@ -2163,7 +2163,7 @@ bool PowerPointExport::ImplCreateMainNotes() OUString PowerPointExport::getImplementationName() { - return "com.sun.star.comp.Impress.oox.PowerPointExport"; + return u"com.sun.star.comp.Impress.oox.PowerPointExport"_ustr; } void PowerPointExport::WriteDiagram(const FSHelperPtr& pFS, PowerPointShapeExport& rDML, const css::uno::Reference<css::drawing::XShape>& rXShape, int nDiagramId) @@ -2181,8 +2181,8 @@ void PowerPointExport::WritePlaceholderReferenceShapes(PowerPointShapeExport& rD Any aAny; OUString aText; if (ePageType == LAYOUT - || (bCheckProps && PropValue::GetPropertyValue(aAny, mXPagePropSet, "IsFooterVisible", true) - && aAny == true && GetPropertyValue(aAny, mXPagePropSet, "FooterText", true) + || (bCheckProps && PropValue::GetPropertyValue(aAny, mXPagePropSet, u"IsFooterVisible"_ustr, true) + && aAny == true && GetPropertyValue(aAny, mXPagePropSet, u"FooterText"_ustr, true) && (aAny >>= aText) && !aText.isEmpty())) { if ((xShape = GetReferencedPlaceholderXShape(Footer, ePageType))) @@ -2197,7 +2197,7 @@ void PowerPointExport::WritePlaceholderReferenceShapes(PowerPointShapeExport& rD if (ePageType == LAYOUT || (bCheckProps - && PropValue::GetPropertyValue(aAny, mXPagePropSet, "IsPageNumberVisible", true) + && PropValue::GetPropertyValue(aAny, mXPagePropSet, u"IsPageNumberVisible"_ustr, true) && aAny == true)) { if ((xShape = GetReferencedPlaceholderXShape(SlideNumber, ePageType))) @@ -2212,11 +2212,11 @@ void PowerPointExport::WritePlaceholderReferenceShapes(PowerPointShapeExport& rD if (ePageType == LAYOUT || (bCheckProps - && PropValue::GetPropertyValue(aAny, mXPagePropSet, "IsDateTimeVisible", true) + && PropValue::GetPropertyValue(aAny, mXPagePropSet, u"IsDateTimeVisible"_ustr, true) && aAny == true - && ((GetPropertyValue(aAny, mXPagePropSet, "DateTimeText", true) && (aAny >>= aText) + && ((GetPropertyValue(aAny, mXPagePropSet, u"DateTimeText"_ustr, true) && (aAny >>= aText) && !aText.isEmpty()) - || mXPagePropSet->getPropertyValue("IsDateTimeFixed") == false))) + || mXPagePropSet->getPropertyValue(u"IsDateTimeFixed"_ustr) == false))) { if ((xShape = GetReferencedPlaceholderXShape(DateAndTime, ePageType))) { diff --git a/sd/source/filter/eppt/pptx-stylesheet.cxx b/sd/source/filter/eppt/pptx-stylesheet.cxx index fff1b5d06f2d..6e266a2dd551 100644 --- a/sd/source/filter/eppt/pptx-stylesheet.cxx +++ b/sd/source/filter/eppt/pptx-stylesheet.cxx @@ -109,7 +109,7 @@ void PPTExCharSheet::Write( SvStream& rSt, sal_uInt16 nLev, bool bSimpleText, { bool bIsDark = false; css::uno::Any aAny; - if ( PropValue::GetPropertyValue( aAny, rPagePropSet, "IsBackgroundDark", true ) ) + if ( PropValue::GetPropertyValue( aAny, rPagePropSet, u"IsBackgroundDark"_ustr, true ) ) aAny >>= bIsDark; nFontColor = Color(ColorTransparency, bIsDark ? 0xffffff : 0x000000); } @@ -239,7 +239,7 @@ void PPTExParaSheet::SetStyleSheet( const css::uno::Reference< css::beans::XProp if ( nLineSpacing > 0 ) // if nLinespacing is < 0 the linespacing is an absolute spacing { bool bFixedLineSpacing = false; - uno::Any aAny = rXPropSet->getPropertyValue("FontIndependentLineSpacing"); + uno::Any aAny = rXPropSet->getPropertyValue(u"FontIndependentLineSpacing"_ustr); if( !(aAny >>= bFixedLineSpacing) || !bFixedLineSpacing ) { const FontCollectionEntry* pDesc = rFontCollection.GetById( rCharLevel.mnFont ); @@ -351,7 +351,7 @@ void PPTExParaSheet::Write( SvStream& rSt, sal_uInt16 nLev, bool bSimpleText, { bool bIsDark = false; css::uno::Any aAny; - if ( PropValue::GetPropertyValue( aAny, rPagePropSet, "IsBackgroundDark", true ) ) + if ( PropValue::GetPropertyValue( aAny, rPagePropSet, u"IsBackgroundDark"_ustr, true ) ) aAny >>= bIsDark; nBulletColor = bIsDark ? 0xffffff : 0x000000; } diff --git a/sd/source/filter/eppt/pptx-text.cxx b/sd/source/filter/eppt/pptx-text.cxx index d42d80590984..745abc3ad477 100644 --- a/sd/source/filter/eppt/pptx-text.cxx +++ b/sd/source/filter/eppt/pptx-text.cxx @@ -127,7 +127,7 @@ PortionObj::PortionObj(css::uno::Reference< css::text::XTextRange > & rXTextRang } bool bSymbol = false; - if ( bPropSetsValid && ImplGetPropertyValue( "CharFontCharSet", false ) ) + if ( bPropSetsValid && ImplGetPropertyValue( u"CharFontCharSet"_ustr, false ) ) { sal_Int16 nCharset = 0; mAny >>= nCharset; @@ -236,7 +236,7 @@ void PortionObj::Write( SvStream* pStrm, bool bLast ) void PortionObj::ImplGetPortionValues( FontCollection& rFontCollection, bool bGetPropStateValue ) { - bool bOk = ImplGetPropertyValue( "CharFontName", bGetPropStateValue ); + bool bOk = ImplGetPropertyValue( u"CharFontName"_ustr, bGetPropStateValue ); meFontName = ePropState; if ( bOk ) { @@ -246,11 +246,11 @@ void PortionObj::ImplGetPortionValues( FontCollection& rFontCollection, bool bGe if ( mnFont == nCount ) { FontCollectionEntry& rFontDesc = rFontCollection.GetLast(); - if ( ImplGetPropertyValue( "CharFontCharSet", false ) ) + if ( ImplGetPropertyValue( u"CharFontCharSet"_ustr, false ) ) mAny >>= rFontDesc.CharSet; - if ( ImplGetPropertyValue( "CharFontFamily", false ) ) + if ( ImplGetPropertyValue( u"CharFontFamily"_ustr, false ) ) mAny >>= rFontDesc.Family; - if ( ImplGetPropertyValue( "CharFontPitch", false ) ) + if ( ImplGetPropertyValue( u"CharFontPitch"_ustr, false ) ) mAny >>= rFontDesc.Pitch; } } @@ -263,7 +263,7 @@ void PortionObj::ImplGetPortionValues( FontCollection& rFontCollection, bool bGe } if ( nScriptType != css::i18n::ScriptType::COMPLEX ) { - bOk = ImplGetPropertyValue( "CharFontNameAsian", bGetPropStateValue ); + bOk = ImplGetPropertyValue( u"CharFontNameAsian"_ustr, bGetPropStateValue ); meAsianOrComplexFont = ePropState; if ( bOk ) { @@ -273,18 +273,18 @@ void PortionObj::ImplGetPortionValues( FontCollection& rFontCollection, bool bGe if ( mnAsianOrComplexFont == nCount ) { FontCollectionEntry& rFontDesc = rFontCollection.GetLast(); - if ( ImplGetPropertyValue( "CharFontCharSetAsian", false ) ) + if ( ImplGetPropertyValue( u"CharFontCharSetAsian"_ustr, false ) ) mAny >>= rFontDesc.CharSet; - if ( ImplGetPropertyValue( "CharFontFamilyAsian", false ) ) + if ( ImplGetPropertyValue( u"CharFontFamilyAsian"_ustr, false ) ) mAny >>= rFontDesc.Family; - if ( ImplGetPropertyValue( "CharFontPitchAsian", false ) ) + if ( ImplGetPropertyValue( u"CharFontPitchAsian"_ustr, false ) ) mAny >>= rFontDesc.Pitch; } } } else { - bOk = ImplGetPropertyValue( "CharFontNameComplex", bGetPropStateValue ); + bOk = ImplGetPropertyValue( u"CharFontNameComplex"_ustr, bGetPropStateValue ); meAsianOrComplexFont = ePropState; if ( bOk ) { @@ -294,11 +294,11 @@ void PortionObj::ImplGetPortionValues( FontCollection& rFontCollection, bool bGe if ( mnAsianOrComplexFont == nCount ) { FontCollectionEntry& rFontDesc = rFontCollection.GetLast(); - if ( ImplGetPropertyValue( "CharFontCharSetComplex", false ) ) + if ( ImplGetPropertyValue( u"CharFontCharSetComplex"_ustr, false ) ) mAny >>= rFontDesc.CharSet; - if ( ImplGetPropertyValue( "CharFontFamilyComplex", false ) ) + if ( ImplGetPropertyValue( u"CharFontFamilyComplex"_ustr, false ) ) mAny >>= rFontDesc.Family; - if ( ImplGetPropertyValue( "CharFontPitchComplex", false ) ) + if ( ImplGetPropertyValue( u"CharFontPitchComplex"_ustr, false ) ) mAny >>= rFontDesc.Pitch; } } @@ -379,7 +379,7 @@ void PortionObj::ImplGetPortionValues( FontCollection& rFontCollection, bool bGe } } - if ( ImplGetPropertyValue( "CharUnderline", bGetPropStateValue ) ) + if ( ImplGetPropertyValue( u"CharUnderline"_ustr, bGetPropStateValue ) ) { sal_Int16 nVal(0); mAny >>= nVal; @@ -394,7 +394,7 @@ void PortionObj::ImplGetPortionValues( FontCollection& rFontCollection, bool bGe if ( ePropState == css::beans::PropertyState_DIRECT_VALUE ) mnCharAttrHard |= 4; - if ( ImplGetPropertyValue( "CharShadowed", bGetPropStateValue ) ) + if ( ImplGetPropertyValue( u"CharShadowed"_ustr, bGetPropStateValue ) ) { bool bBool(false); mAny >>= bBool; @@ -404,7 +404,7 @@ void PortionObj::ImplGetPortionValues( FontCollection& rFontCollection, bool bGe if ( ePropState == css::beans::PropertyState_DIRECT_VALUE ) mnCharAttrHard |= 16; - if ( ImplGetPropertyValue( "CharRelief", bGetPropStateValue ) ) + if ( ImplGetPropertyValue( u"CharRelief"_ustr, bGetPropStateValue ) ) { sal_Int16 nVal(0); mAny >>= nVal; @@ -414,7 +414,7 @@ void PortionObj::ImplGetPortionValues( FontCollection& rFontCollection, bool bGe if ( ePropState == css::beans::PropertyState_DIRECT_VALUE ) mnCharAttrHard |= 512; - if ( ImplGetPropertyValue( "CharColor", bGetPropStateValue ) ) + if ( ImplGetPropertyValue( u"CharColor"_ustr, bGetPropStateValue ) ) { sal_uInt32 nSOColor = *( o3tl::doAccess<sal_uInt32>(mAny) ); mnCharColor = nSOColor & 0xff00ff00; // green and hibyte @@ -424,7 +424,7 @@ void PortionObj::ImplGetPortionValues( FontCollection& rFontCollection, bool bGe meCharColor = ePropState; mnCharEscapement = 0; - if ( ImplGetPropertyValue( "CharEscapement", bGetPropStateValue ) ) + if ( ImplGetPropertyValue( u"CharEscapement"_ustr, bGetPropStateValue ) ) { mAny >>= mnCharEscapement; if ( mnCharEscapement > 100 ) @@ -498,7 +498,7 @@ sal_uInt32 PortionObj::ImplGetTextField( css::uno::Reference< css::text::XTextRa sal_uInt32 nRetValue = 0; sal_Int32 nFormat; css::uno::Any aAny; - if ( GetPropertyValue( aAny, rXPropSet, "TextPortionType", true ) ) + if ( GetPropertyValue( aAny, rXPropSet, u"TextPortionType"_ustr, true ) ) { auto aTextFieldType = o3tl::doAccess<OUString>(aAny); if ( *aTextFieldType == "TextField" ) @@ -516,13 +516,13 @@ sal_uInt32 PortionObj::ImplGetTextField( css::uno::Reference< css::text::XTextRa OUString aFieldKind( aXTextField->getPresentation( true ) ); if ( aFieldKind == "Date" ) { - if ( GetPropertyValue( aAny, xFieldPropSet, "IsFix", true ) ) + if ( GetPropertyValue( aAny, xFieldPropSet, u"IsFix"_ustr, true ) ) { bool bBool = false; aAny >>= bBool; if ( !bBool ) // Fixed DateFields does not exist in PPT { - if ( GetPropertyValue( aAny, xFieldPropSet, "Format", true ) ) + if ( GetPropertyValue( aAny, xFieldPropSet, u"Format"_ustr, true ) ) { nFormat = *o3tl::doAccess<sal_Int32>(aAny); switch ( nFormat ) @@ -544,7 +544,7 @@ sal_uInt32 PortionObj::ImplGetTextField( css::uno::Reference< css::text::XTextRa } else if ( aFieldKind == "URL" ) { - if ( GetPropertyValue( aAny, xFieldPropSet, "URL", true ) ) + if ( GetPropertyValue( aAny, xFieldPropSet, u"URL"_ustr, true ) ) rURL = *o3tl::doAccess<OUString>(aAny); nRetValue = 4 << 28; } @@ -558,13 +558,13 @@ sal_uInt32 PortionObj::ImplGetTextField( css::uno::Reference< css::text::XTextRa } else if ( aFieldKind == "Time" ) { - if ( GetPropertyValue( aAny, xFieldPropSet, "IsFix", true ) ) + if ( GetPropertyValue( aAny, xFieldPropSet, u"IsFix"_ustr, true ) ) { bool bBool = false; aAny >>= bBool; if ( !bBool ) { - if ( GetPropertyValue( aAny, xFieldPropSet, "IsFix", true ) ) + if ( GetPropertyValue( aAny, xFieldPropSet, u"IsFix"_ustr, true ) ) { nFormat = *o3tl::doAccess<sal_Int32>(aAny); nRetValue |= ( ( ( 2 << 4 ) | nFormat ) << 24 ) | 0x800000; @@ -582,13 +582,13 @@ sal_uInt32 PortionObj::ImplGetTextField( css::uno::Reference< css::text::XTextRa } else if ( aFieldKind == "ExtTime" ) { - if ( GetPropertyValue( aAny, xFieldPropSet, "IsFix", true ) ) + if ( GetPropertyValue( aAny, xFieldPropSet, u"IsFix"_ustr, true ) ) { bool bBool = false; aAny >>= bBool; if ( !bBool ) { - if ( GetPropertyValue( aAny, xFieldPropSet, "Format", true ) ) + if ( GetPropertyValue( aAny, xFieldPropSet, u"Format"_ustr, true ) ) { nFormat = *o3tl::doAccess<sal_Int32>(aAny); switch ( nFormat ) @@ -768,23 +768,23 @@ void ParagraphObj::CalculateGraphicBulletSize( sal_uInt16 nFontHeight ) void ParagraphObj::ImplGetNumberingLevel( PPTExBulletProvider* pBuProv, sal_Int16 nNumberingDepth, bool bIsBullet, bool bGetPropStateValue ) { css::uno::Any aAny; - if ( GetPropertyValue( aAny, mXPropSet, "ParaLeftMargin" ) ) + if ( GetPropertyValue( aAny, mXPropSet, u"ParaLeftMargin"_ustr ) ) { sal_Int32 nVal(0); if ( aAny >>= nVal ) nTextOfs = convertMm100ToMasterUnit(nVal); } - if ( GetPropertyValue( aAny, mXPropSet, "ParaFirstLineIndent" ) ) + if ( GetPropertyValue( aAny, mXPropSet, u"ParaFirstLineIndent"_ustr ) ) { if ( aAny >>= nBulletOfs ) nBulletOfs = convertMm100ToMasterUnit(nBulletOfs); } - if ( GetPropertyValue( aAny, mXPropSet, "NumberingIsNumber" ) ) + if ( GetPropertyValue( aAny, mXPropSet, u"NumberingIsNumber"_ustr ) ) aAny >>= bNumberingIsNumber; css::uno::Reference< css::container::XIndexReplace > aXIndexReplace; - if ( bIsBullet && ImplGetPropertyValue( "NumberingRules", bGetPropStateValue ) ) + if ( bIsBullet && ImplGetPropertyValue( u"NumberingRules"_ustr, bGetPropStateValue ) ) { if ( ( mAny >>= aXIndexReplace ) && nNumberingDepth < aXIndexReplace->getCount() ) { @@ -1066,10 +1066,10 @@ void ParagraphObj::ImplGetNumberingLevel( PPTExBulletProvider* pBuProv, sal_Int1 void ParagraphObj::ImplGetParagraphValues( PPTExBulletProvider* pBuProv, bool bGetPropStateValue ) { css::uno::Any aAny; - if ( GetPropertyValue( aAny, mXPropSet, "NumberingLevel", true ) ) + if ( GetPropertyValue( aAny, mXPropSet, u"NumberingLevel"_ustr, true ) ) { if ( bGetPropStateValue ) - meBullet = GetPropertyState( mXPropSet, "NumberingLevel" ); + meBullet = GetPropertyState( mXPropSet, u"NumberingLevel"_ustr ); nDepth = *o3tl::doAccess<sal_Int16>(aAny); if ( nDepth < 0 ) @@ -1091,10 +1091,10 @@ void ParagraphObj::ImplGetParagraphValues( PPTExBulletProvider* pBuProv, bool bG } ImplGetNumberingLevel( pBuProv, nDepth, mbIsBullet, bGetPropStateValue ); - if ( ImplGetPropertyValue( "ParaTabStops", bGetPropStateValue ) ) + if ( ImplGetPropertyValue( u"ParaTabStops"_ustr, bGetPropStateValue ) ) maTabStop = *o3tl::doAccess<css::uno::Sequence<css::style::TabStop>>(mAny); sal_Int16 eTextAdjust = sal_Int16(css::style::ParagraphAdjust_LEFT); - if ( GetPropertyValue( aAny, mXPropSet, "ParaAdjust", bGetPropStateValue ) ) + if ( GetPropertyValue( aAny, mXPropSet, u"ParaAdjust"_ustr, bGetPropStateValue ) ) aAny >>= eTextAdjust; switch ( static_cast<css::style::ParagraphAdjust>(eTextAdjust) ) { @@ -1114,7 +1114,7 @@ void ParagraphObj::ImplGetParagraphValues( PPTExBulletProvider* pBuProv, bool bG } meTextAdjust = ePropState; - if ( ImplGetPropertyValue( "ParaLineSpacing", bGetPropStateValue ) ) + if ( ImplGetPropertyValue( u"ParaLineSpacing"_ustr, bGetPropStateValue ) ) { css::style::LineSpacing aLineSpacing = *o3tl::doAccess<css::style::LineSpacing>(mAny); @@ -1138,30 +1138,30 @@ void ParagraphObj::ImplGetParagraphValues( PPTExBulletProvider* pBuProv, bool bG } meLineSpacing = ePropState; - if ( ImplGetPropertyValue( "ParaBottomMargin", bGetPropStateValue ) ) + if ( ImplGetPropertyValue( u"ParaBottomMargin"_ustr, bGetPropStateValue ) ) { double fSpacing = *o3tl::doAccess<sal_uInt32>(mAny) + convertMasterUnitToMm100(1.0) - 1; mnLineSpacingBottom = std::round(-convertMm100ToMasterUnit(fSpacing)); } meLineSpacingBottom = ePropState; - if ( ImplGetPropertyValue( "ParaTopMargin", bGetPropStateValue ) ) + if ( ImplGetPropertyValue( u"ParaTopMargin"_ustr, bGetPropStateValue ) ) { double fSpacing = *o3tl::doAccess<sal_uInt32>(mAny) + convertMasterUnitToMm100(1.0) - 1; mnLineSpacingTop = std::round(-convertMm100ToMasterUnit(fSpacing)); } meLineSpacingTop = ePropState; - if ( ImplGetPropertyValue( "ParaIsForbiddenRules", bGetPropStateValue ) ) + if ( ImplGetPropertyValue( u"ParaIsForbiddenRules"_ustr, bGetPropStateValue ) ) mAny >>= mbForbiddenRules; meForbiddenRules = ePropState; - if ( ImplGetPropertyValue( "ParaIsHangingPunctuation", bGetPropStateValue ) ) + if ( ImplGetPropertyValue( u"ParaIsHangingPunctuation"_ustr, bGetPropStateValue ) ) mAny >>= mbParagraphPunctation; meParagraphPunctation = ePropState; mnBiDi = 0; - if ( ImplGetPropertyValue( "WritingMode", bGetPropStateValue ) ) + if ( ImplGetPropertyValue( u"WritingMode"_ustr, bGetPropStateValue ) ) { sal_Int16 nWritingMode = 0; mAny >>= nWritingMode; diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx index ba592d75e32c..36e14aef4005 100644 --- a/sd/source/filter/html/htmlex.cxx +++ b/sd/source/filter/html/htmlex.cxx @@ -135,7 +135,7 @@ OUString HtmlState::Flush() + SetUnderline(false) + SetStrikeout(false) + SetColor(maDefColor) - + SetLink("",""); + + SetLink(u""_ustr,u""_ustr); return aStr; } @@ -444,7 +444,7 @@ void WriteOutlinerParagraph(OUStringBuffer& aStr, SdrOutliner* pOutliner, if (nDepth < 0) { - OUString aTag = bHeadLine ? OUString("h2") : OUString("p"); + OUString aTag = bHeadLine ? u"h2"_ustr : u"p"_ustr; lclAppendStyle(aStr, aTag, getParagraphStyle(pOutliner, nIndex)); aStr.append(aParaText); diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx index 5f5c4e87bcb4..3b3b545e503d 100644 --- a/sd/source/filter/ppt/pptin.cxx +++ b/sd/source/filter/ppt/pptin.cxx @@ -101,7 +101,7 @@ SdPPTImport::SdPPTImport( SdDrawDocument* pDocument, SvStream& rDocStream, SotSt : maParam(rDocStream) { #ifdef DBG_UTIL - std::unique_ptr<PropRead> pSummaryInformation(new PropRead( rStorage, "SummaryInformation" )); + std::unique_ptr<PropRead> pSummaryInformation(new PropRead( rStorage, u"SummaryInformation"_ustr )); if ( pSummaryInformation->IsValid() ) { pSummaryInformation->Read(); @@ -127,7 +127,7 @@ SdPPTImport::SdPPTImport( SdDrawDocument* pDocument, SvStream& rDocStream, SotSt pSummaryInformation.reset(); #endif - rtl::Reference<SotStorageStream> pCurrentUserStream(rStorage.OpenSotStream("Current User", StreamMode::STD_READ)); + rtl::Reference<SotStorageStream> pCurrentUserStream(rStorage.OpenSotStream(u"Current User"_ustr, StreamMode::STD_READ)); if (pCurrentUserStream) { ReadPptCurrentUserAtom(*pCurrentUserStream, maParam.aCurrentUserAtom); @@ -184,7 +184,7 @@ ImplSdPPTImport::ImplSdPPTImport( SdDrawDocument* pDocument, SotStorage& rStorag { sal_uInt64 nOldPos = rStCtrl.Tell(); - mxPicturesStream = rStorage_.OpenSotStream( "Pictures", StreamMode::STD_READ ); + mxPicturesStream = rStorage_.OpenSotStream( u"Pictures"_ustr, StreamMode::STD_READ ); pStData = mxPicturesStream.get(); rStCtrl.Seek( maDocHd.GetRecBegFilePos() + 8 ); @@ -248,7 +248,7 @@ bool ImplSdPPTImport::Import() SeekOle( pDocShell, mnFilterOptions ); // hyperlinks - std::unique_ptr<PropRead> pDInfoSec2(new PropRead( mrStorage, "DocumentSummaryInformation" )); + std::unique_ptr<PropRead> pDInfoSec2(new PropRead( mrStorage, u"DocumentSummaryInformation"_ustr )); if ( pDInfoSec2->IsValid() ) { PropItem aPropItem; @@ -366,7 +366,7 @@ bool ImplSdPPTImport::Import() pSection->GetDictionary(aDict); if (!aDict.empty()) { - auto iter = aDict.find( OUString("_PID_HLINKS") ); + auto iter = aDict.find( u"_PID_HLINKS"_ustr ); if ( iter != aDict.end() ) { @@ -2715,7 +2715,7 @@ rtl::Reference<SdrObject> ImplSdPPTImport::ProcessObj( SvStream& rSt, DffObjData } pObj = pMediaObj; // SJ: hoping that pObj is not inserted in any list - pMediaObj->setURL( aMediaURL, ""/*TODO?*/ ); + pMediaObj->setURL( aMediaURL, u""_ustr/*TODO?*/ ); } } } @@ -2775,13 +2775,13 @@ extern "C" SAL_DLLPUBLIC_EXPORT bool TestImportPPT(SvStream &rStream) if (xStorage->GetError()) return false; - rtl::Reference<SotStorageStream> xDocStream(xStorage->OpenSotStream( "PowerPoint Document", StreamMode::STD_READ)); + rtl::Reference<SotStorageStream> xDocStream(xStorage->OpenSotStream( u"PowerPoint Document"_ustr, StreamMode::STD_READ)); if ( !xDocStream.is() ) return false; SdDLL::Init(); - SfxMedium aSrcMed("", StreamMode::STD_READ); + SfxMedium aSrcMed(u""_ustr, StreamMode::STD_READ); xDocStream->SetVersion(xStorage->GetVersion()); xDocStream->SetCryptMaskKey(xStorage->GetKey()); diff --git a/sd/source/filter/sdpptwrp.cxx b/sd/source/filter/sdpptwrp.cxx index 20ae1cba18c2..4f7013824592 100644 --- a/sd/source/filter/sdpptwrp.cxx +++ b/sd/source/filter/sdpptwrp.cxx @@ -90,7 +90,7 @@ static rtl::Reference<SotStorage> lcl_DRMDecrypt(const SfxMedium& rMedium, const Reference<XComponentContext> xComponentContext(comphelper::getProcessComponentContext()); Reference< css::packages::XPackageEncryption > xPackageEncryption( xComponentContext->getServiceManager()->createInstanceWithArgumentsAndContext( - "com.sun.star.comp.oox.crypto.DRMDataSpace", aArguments, xComponentContext), UNO_QUERY); + u"com.sun.star.comp.oox.crypto.DRMDataSpace"_ustr, aArguments, xComponentContext), UNO_QUERY); if (!xPackageEncryption.is()) { @@ -109,7 +109,7 @@ static rtl::Reference<SotStorage> lcl_DRMDecrypt(const SfxMedium& rMedium, const return aNewStorage; } - rtl::Reference<SotStorageStream> rContentStream = rStorage->OpenSotStream(" DRMContent", StreamMode::READ | StreamMode::SHARE_DENYALL); + rtl::Reference<SotStorageStream> rContentStream = rStorage->OpenSotStream(u" DRMContent"_ustr, StreamMode::READ | StreamMode::SHARE_DENYALL); if (!rContentStream.is()) { return aNewStorage; @@ -132,7 +132,7 @@ static rtl::Reference<SotStorage> lcl_DRMDecrypt(const SfxMedium& rMedium, const aNewStorage = new SotStorage(*rNewStorageStrm); // Set the media descriptor data - Sequence<NamedValue> aEncryptionData = xPackageEncryption->createEncryptionData(""); + Sequence<NamedValue> aEncryptionData = xPackageEncryption->createEncryptionData(u""_ustr); rMedium.GetItemSet().Put(SfxUnoAnyItem(SID_ENCRYPTIONDATA, Any(aEncryptionData))); } catch (const std::exception&) @@ -153,24 +153,24 @@ bool SdPPTFilter::Import() /* check if there is a dualstorage, then the document is probably a PPT95 containing PPT97 */ rtl::Reference<SotStorage> xDualStorage; - OUString sDualStorage( "PP97_DUALSTORAGE" ); + OUString sDualStorage( u"PP97_DUALSTORAGE"_ustr ); if ( pStorage->IsContained( sDualStorage ) ) { xDualStorage = pStorage->OpenSotStorage( sDualStorage, StreamMode::STD_READ ); pStorage = xDualStorage; } - if (pStorage->IsContained(" DRMContent")) + if (pStorage->IsContained(u" DRMContent"_ustr)) { // Document is DRM encrypted pStorage = lcl_DRMDecrypt(mrMedium, pStorage, aDecryptedStorageStrm); } - rtl::Reference<SotStorageStream> pDocStream(pStorage->OpenSotStream( "PowerPoint Document" , StreamMode::STD_READ )); + rtl::Reference<SotStorageStream> pDocStream(pStorage->OpenSotStream( u"PowerPoint Document"_ustr , StreamMode::STD_READ )); if( pDocStream ) { pDocStream->SetVersion( pStorage->GetVersion() ); pDocStream->SetCryptMaskKey(pStorage->GetKey()); - if ( pStorage->IsStream( "EncryptedSummary" ) ) + if ( pStorage->IsStream( u"EncryptedSummary"_ustr ) ) mrMedium.SetError(ERRCODE_SVX_READ_FILTER_PPOINT); else { @@ -221,13 +221,13 @@ bool SdPPTFilter::Export() if (pEncryptionDataItem && (pEncryptionDataItem->GetValue() >>= aEncryptionData)) { ::comphelper::SequenceAsHashMap aHashData(aEncryptionData); - OUString sCryptoType = aHashData.getUnpackedValueOrDefault("CryptoType", OUString()); + OUString sCryptoType = aHashData.getUnpackedValueOrDefault(u"CryptoType"_ustr, OUString()); if (sCryptoType.getLength()) { Reference<XComponentContext> xComponentContext(comphelper::getProcessComponentContext()); Sequence<Any> aArguments{ - Any(NamedValue("Binary", Any(true))) }; + Any(NamedValue(u"Binary"_ustr, Any(true))) }; xPackageEncryption.set( xComponentContext->getServiceManager()->createInstanceWithArgumentsAndContext( "com.sun.star.comp.oox.crypto." + sCryptoType, aArguments, xComponentContext), UNO_QUERY); diff --git a/sd/source/filter/xml/sdxmlwrp.cxx b/sd/source/filter/xml/sdxmlwrp.cxx index e102ce27e333..32d8cbe49fb0 100644 --- a/sd/source/filter/xml/sdxmlwrp.cxx +++ b/sd/source/filter/xml/sdxmlwrp.cxx @@ -342,7 +342,7 @@ ErrCodeMsg ReadThroughComponent( DBG_ASSERT( xInfoSet.is(), "missing property set" ); if( xInfoSet.is() ) { - xInfoSet->setPropertyValue( "StreamName", Any( sStreamName ) ); + xInfoSet->setPropertyValue( u"StreamName"_ustr, Any( sStreamName ) ); } try @@ -354,7 +354,7 @@ ErrCodeMsg ReadThroughComponent( if ( !xStream.is() || ! xProps.is() ) return SD_XML_READERROR; - Any aAny = xProps->getPropertyValue( "Encrypted" ); + Any aAny = xProps->getPropertyValue( u"Encrypted"_ustr ); bool bEncrypted = false; aAny >>= bEncrypted; @@ -461,22 +461,22 @@ bool SdXMLFilter::Import( ErrCode& nError ) static PropertyMapEntry const aImportInfoMap[] = { // necessary properties for XML progress bar at load time - { OUString("ProgressRange"), 0, cppu::UnoType<sal_Int32>::get(), css::beans::PropertyAttribute::MAYBEVOID, 0}, - { OUString("ProgressMax"), 0, cppu::UnoType<sal_Int32>::get(), css::beans::PropertyAttribute::MAYBEVOID, 0}, - { OUString("ProgressCurrent"), 0, cppu::UnoType<sal_Int32>::get(), css::beans::PropertyAttribute::MAYBEVOID, 0}, - { OUString("Preview"), 0, cppu::UnoType<sal_Bool>::get(), css::beans::PropertyAttribute::MAYBEVOID, 0}, - { OUString("PageLayouts"), 0, cppu::UnoType<container::XNameAccess>::get(), css::beans::PropertyAttribute::MAYBEVOID, 0}, - { OUString("PrivateData"), 0, cppu::UnoType<XInterface>::get(), css::beans::PropertyAttribute::MAYBEVOID, 0 }, - { OUString("BaseURI"), 0, cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::MAYBEVOID, 0 }, - { OUString("StreamRelPath"), 0, cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::MAYBEVOID, 0 }, - { OUString("StreamName"), 0, cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::MAYBEVOID, 0 }, - { OUString("BuildId"), 0, cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::MAYBEVOID, 0 }, - { OUString("OrganizerMode"), 0, cppu::UnoType<bool>::get(), css::beans::PropertyAttribute::MAYBEVOID, 0 }, - { OUString("SourceStorage"), 0, cppu::UnoType<embed::XStorage>::get(), css::beans::PropertyAttribute::MAYBEVOID, 0 }, + { u"ProgressRange"_ustr, 0, cppu::UnoType<sal_Int32>::get(), css::beans::PropertyAttribute::MAYBEVOID, 0}, + { u"ProgressMax"_ustr, 0, cppu::UnoType<sal_Int32>::get(), css::beans::PropertyAttribute::MAYBEVOID, 0}, + { u"ProgressCurrent"_ustr, 0, cppu::UnoType<sal_Int32>::get(), css::beans::PropertyAttribute::MAYBEVOID, 0}, + { u"Preview"_ustr, 0, cppu::UnoType<sal_Bool>::get(), css::beans::PropertyAttribute::MAYBEVOID, 0}, + { u"PageLayouts"_ustr, 0, cppu::UnoType<container::XNameAccess>::get(), css::beans::PropertyAttribute::MAYBEVOID, 0}, + { u"PrivateData"_ustr, 0, cppu::UnoType<XInterface>::get(), css::beans::PropertyAttribute::MAYBEVOID, 0 }, + { u"BaseURI"_ustr, 0, cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::MAYBEVOID, 0 }, -e ... etc. - the rest is truncated