diff options
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/core/stlfamily.cxx | 4 | ||||
-rw-r--r-- | sd/source/core/stlsheet.cxx | 25 | ||||
-rw-r--r-- | sd/source/ui/slideshow/slideshow.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/unoidl/SdUnoDrawView.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/unoidl/SdUnoOutlineView.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/unoidl/SdUnoSlideView.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/unoidl/UnoDocumentSettings.cxx | 14 | ||||
-rw-r--r-- | sd/source/ui/unoidl/randomnode.cxx | 5 | ||||
-rw-r--r-- | sd/source/ui/unoidl/unocpres.cxx | 8 | ||||
-rw-r--r-- | sd/source/ui/unoidl/unodoc.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/unoidl/unolayer.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/unoidl/unomodel.cxx | 32 | ||||
-rw-r--r-- | sd/source/ui/unoidl/unopback.cxx | 8 |
13 files changed, 31 insertions, 91 deletions
diff --git a/sd/source/core/stlfamily.cxx b/sd/source/core/stlfamily.cxx index 47ef8a93af51..bb332e7939ab 100644 --- a/sd/source/core/stlfamily.cxx +++ b/sd/source/core/stlfamily.cxx @@ -175,9 +175,7 @@ sal_Bool SAL_CALL SdStyleFamily::supportsService( const OUString& ServiceName ) Sequence< OUString > SAL_CALL SdStyleFamily::getSupportedServiceNames() { - OUString aServiceName( "com.sun.star.style.StyleFamily" ); - Sequence< OUString > aSeq( &aServiceName, 1 ); - return aSeq; + return { "com.sun.star.style.StyleFamily" }; } // XNamed diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx index 91cb60028dff..020d28a257b7 100644 --- a/sd/source/core/stlsheet.cxx +++ b/sd/source/core/stlsheet.cxx @@ -842,21 +842,16 @@ sal_Bool SAL_CALL SdStyleSheet::supportsService( const OUString& ServiceName ) Sequence< OUString > SAL_CALL SdStyleSheet::getSupportedServiceNames() { - Sequence< OUString > aNameSequence( 10 ); - OUString* pStrings = aNameSequence.getArray(); - - *pStrings++ = "com.sun.star.style.Style"; - *pStrings++ = "com.sun.star.drawing.FillProperties"; - *pStrings++ = "com.sun.star.drawing.LineProperties"; - *pStrings++ = "com.sun.star.drawing.ShadowProperties"; - *pStrings++ = "com.sun.star.drawing.ConnectorProperties"; - *pStrings++ = "com.sun.star.drawing.MeasureProperties"; - *pStrings++ = "com.sun.star.style.ParagraphProperties"; - *pStrings++ = "com.sun.star.style.CharacterProperties"; - *pStrings++ = "com.sun.star.drawing.TextProperties"; - *pStrings++ = "com.sun.star.drawing.Text"; - - return aNameSequence; + return { "com.sun.star.style.Style", + "com.sun.star.drawing.FillProperties", + "com.sun.star.drawing.LineProperties", + "com.sun.star.drawing.ShadowProperties", + "com.sun.star.drawing.ConnectorProperties", + "com.sun.star.drawing.MeasureProperties", + "com.sun.star.style.ParagraphProperties", + "com.sun.star.style.CharacterProperties", + "com.sun.star.drawing.TextProperties", + "com.sun.star.drawing.Text" }; } bool SdStyleSheet::SetName(const OUString& rNewName, bool bReindexNow) diff --git a/sd/source/ui/slideshow/slideshow.cxx b/sd/source/ui/slideshow/slideshow.cxx index 1044e420983e..68011fc1c9ec 100644 --- a/sd/source/ui/slideshow/slideshow.cxx +++ b/sd/source/ui/slideshow/slideshow.cxx @@ -249,9 +249,7 @@ sal_Bool SAL_CALL SlideShow::supportsService( const OUString& ServiceName ) Sequence< OUString > SAL_CALL SlideShow::getSupportedServiceNames( ) { - OUString aService( "com.sun.star.presentation.Presentation" ); - Sequence< OUString > aSeq( &aService, 1 ); - return aSeq; + return { "com.sun.star.presentation.Presentation" }; } // XPropertySet diff --git a/sd/source/ui/unoidl/SdUnoDrawView.cxx b/sd/source/ui/unoidl/SdUnoDrawView.cxx index f5f5ddfc56d8..9877c41ca733 100644 --- a/sd/source/ui/unoidl/SdUnoDrawView.cxx +++ b/sd/source/ui/unoidl/SdUnoDrawView.cxx @@ -544,9 +544,7 @@ sal_Bool SAL_CALL SdUnoDrawView::supportsService( const OUString& ServiceName ) Sequence< OUString > SAL_CALL SdUnoDrawView::getSupportedServiceNames( ) { - OUString aSN("com.sun.star.drawing.DrawingDocumentDrawView"); - uno::Sequence< OUString > aSeq( &aSN, 1 ); - return aSeq; + return { "com.sun.star.drawing.DrawingDocumentDrawView" }; } } // end of namespace sd diff --git a/sd/source/ui/unoidl/SdUnoOutlineView.cxx b/sd/source/ui/unoidl/SdUnoOutlineView.cxx index 0a5da1c00806..5fd7e56000cf 100644 --- a/sd/source/ui/unoidl/SdUnoOutlineView.cxx +++ b/sd/source/ui/unoidl/SdUnoOutlineView.cxx @@ -150,9 +150,7 @@ sal_Bool SAL_CALL SdUnoOutlineView::supportsService( const OUString& ServiceName Sequence< OUString > SAL_CALL SdUnoOutlineView::getSupportedServiceNames( ) { - OUString aSN( "com.sun.star.presentation.OutlineView" ); - uno::Sequence< OUString > aSeq( &aSN, 1 ); - return aSeq; + return { "com.sun.star.presentation.OutlineView" }; } } // end of namespace sd diff --git a/sd/source/ui/unoidl/SdUnoSlideView.cxx b/sd/source/ui/unoidl/SdUnoSlideView.cxx index df6750e38947..1a31540bf68e 100644 --- a/sd/source/ui/unoidl/SdUnoSlideView.cxx +++ b/sd/source/ui/unoidl/SdUnoSlideView.cxx @@ -164,9 +164,7 @@ sal_Bool SAL_CALL SdUnoSlideView::supportsService( const OUString& ServiceName ) Sequence< OUString > SAL_CALL SdUnoSlideView::getSupportedServiceNames( ) { - OUString aSN( "com.sun.star.presentation.SlidesView" ); - uno::Sequence< OUString > aSeq( &aSN, 1 ); - return aSeq; + return { "com.sun.star.presentation.SlidesView" }; } } // end of namespace sd diff --git a/sd/source/ui/unoidl/UnoDocumentSettings.cxx b/sd/source/ui/unoidl/UnoDocumentSettings.cxx index 4b86d263c5b4..f1228da14f18 100644 --- a/sd/source/ui/unoidl/UnoDocumentSettings.cxx +++ b/sd/source/ui/unoidl/UnoDocumentSettings.cxx @@ -1394,18 +1394,8 @@ sal_Bool SAL_CALL DocumentSettings::supportsService( const OUString& ServiceName Sequence< OUString > SAL_CALL DocumentSettings::getSupportedServiceNames( ) { - Sequence< OUString > aSeq( 2 ); - aSeq[0] = "com.sun.star.document.Settings" ; - if( mxModel->IsImpressDocument() ) - { - aSeq[1] = "com.sun.star.presentation.DocumentSettings" ; - } - else - { - aSeq[1] = "com.sun.star.drawing.DocumentSettings" ; - } - - return aSeq; + return { "com.sun.star.document.Settings" , + mxModel->IsImpressDocument()?OUString("com.sun.star.presentation.DocumentSettings"):OUString("com.sun.star.drawing.DocumentSettings") }; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/unoidl/randomnode.cxx b/sd/source/ui/unoidl/randomnode.cxx index d86deecd9b2f..24c0ac99d4cd 100644 --- a/sd/source/ui/unoidl/randomnode.cxx +++ b/sd/source/ui/unoidl/randomnode.cxx @@ -554,10 +554,7 @@ sal_Bool RandomAnimationNode::supportsService(const OUString& ServiceName) // XServiceInfo Sequence< OUString > RandomAnimationNode::getSupportedServiceNames() { - Sequence< OUString > aSeq( 2 ); - aSeq[0] = "com.sun.star.animations.ParallelTimeContainer"; - aSeq[1] = "com.sun.star.comp.sd.RandomAnimationNode"; - return aSeq; + return { "com.sun.star.animations.ParallelTimeContainer", "com.sun.star.comp.sd.RandomAnimationNode" }; } } diff --git a/sd/source/ui/unoidl/unocpres.cxx b/sd/source/ui/unoidl/unocpres.cxx index 6d17695de596..43cceb0dae39 100644 --- a/sd/source/ui/unoidl/unocpres.cxx +++ b/sd/source/ui/unoidl/unocpres.cxx @@ -73,9 +73,7 @@ sal_Bool SAL_CALL SdXCustomPresentation::supportsService( const OUString& Servic uno::Sequence< OUString > SAL_CALL SdXCustomPresentation::getSupportedServiceNames() { - OUString aSN( "com.sun.star.presentation.CustomPresentation" ); - uno::Sequence< OUString > aSeq( &aSN, 1 ); - return aSeq; + return { "com.sun.star.presentation.CustomPresentation" }; } // XIndexContainer @@ -284,9 +282,7 @@ sal_Bool SAL_CALL SdXCustomPresentationAccess::supportsService( const OUString& uno::Sequence< OUString > SAL_CALL SdXCustomPresentationAccess::getSupportedServiceNames() { - const OUString aNS( "com.sun.star.presentation.CustomPresentationAccess" ); - uno::Sequence< OUString > aSeq( &aNS, 1 ); - return aSeq; + return { "com.sun.star.presentation.CustomPresentationAccess" }; } // XSingleServiceFactory diff --git a/sd/source/ui/unoidl/unodoc.cxx b/sd/source/ui/unoidl/unodoc.cxx index f47914246fc0..b5a5d895e081 100644 --- a/sd/source/ui/unoidl/unodoc.cxx +++ b/sd/source/ui/unoidl/unodoc.cxx @@ -39,11 +39,7 @@ OUString SdDrawingDocument_getImplementationName() uno::Sequence< OUString > SdDrawingDocument_getSupportedServiceNames() { - uno::Sequence< OUString > aSeq( 2 ); - aSeq[0] = "com.sun.star.drawing.DrawingDocument"; - aSeq[1] = "com.sun.star.drawing.DrawingDocumentFactory"; - - return aSeq; + return { "com.sun.star.drawing.DrawingDocument", "com.sun.star.drawing.DrawingDocumentFactory" }; } uno::Reference< uno::XInterface > SdDrawingDocument_createInstance( diff --git a/sd/source/ui/unoidl/unolayer.cxx b/sd/source/ui/unoidl/unolayer.cxx index c0749aa8cae9..df4259d6fc5c 100644 --- a/sd/source/ui/unoidl/unolayer.cxx +++ b/sd/source/ui/unoidl/unolayer.cxx @@ -105,9 +105,7 @@ sal_Bool SAL_CALL SdLayer::supportsService( const OUString& ServiceName ) uno::Sequence< OUString > SAL_CALL SdLayer::getSupportedServiceNames() { - OUString aServiceName("com.sun.star.drawing.Layer"); - uno::Sequence< OUString > aSeq( &aServiceName, 1 ); - return aSeq; + return { "com.sun.star.drawing.Layer" }; } // beans::XPropertySet diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index d4a7a150aa1a..20bdfbd110e4 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -1180,19 +1180,10 @@ uno::Sequence< OUString > SAL_CALL SdXImpressDocument::getSupportedServiceNames( { ::SolarMutexGuard aGuard; - uno::Sequence< OUString > aSeq( 4 ); - OUString* pServices = aSeq.getArray(); - - *pServices++ = "com.sun.star.document.OfficeDocument"; - *pServices++ = "com.sun.star.drawing.GenericDrawingDocument"; - *pServices++ = "com.sun.star.drawing.DrawingDocumentFactory"; - - if( mbImpressDoc ) - *pServices++ = "com.sun.star.presentation.PresentationDocument"; - else - *pServices++ = "com.sun.star.drawing.DrawingDocument"; - - return aSeq; + return { "com.sun.star.document.OfficeDocument", + "com.sun.star.drawing.GenericDrawingDocument", + "com.sun.star.drawing.DrawingDocumentFactory", + mbImpressDoc?OUString("com.sun.star.presentation.PresentationDocument"):OUString("com.sun.star.drawing.DrawingDocument") }; } // XPropertySet @@ -3005,9 +2996,7 @@ sal_Bool SAL_CALL SdDrawPagesAccess::supportsService( const OUString& ServiceNam uno::Sequence< OUString > SAL_CALL SdDrawPagesAccess::getSupportedServiceNames( ) { - OUString aService( "com.sun.star.drawing.DrawPages" ); - uno::Sequence< OUString > aSeq( &aService, 1 ); - return aSeq; + return { "com.sun.star.drawing.DrawPages" }; } // XComponent @@ -3262,9 +3251,7 @@ sal_Bool SAL_CALL SdMasterPagesAccess::supportsService( const OUString& ServiceN uno::Sequence< OUString > SAL_CALL SdMasterPagesAccess::getSupportedServiceNames( ) { - OUString aService( "com.sun.star.drawing.MasterPages" ); - uno::Sequence< OUString > aSeq( &aService, 1 ); - return aSeq; + return { "com.sun.star.drawing.MasterPages" }; } // class SdDocLinkTargets @@ -3326,8 +3313,7 @@ uno::Sequence< OUString > SAL_CALL SdDocLinkTargets::getElementNames() SdDrawDocument* pDoc = mpModel->GetDoc(); if( pDoc == nullptr ) { - uno::Sequence< OUString > aSeq; - return aSeq; + return { }; } if( pDoc->GetDocumentType() == DocumentType::Draw ) @@ -3440,9 +3426,7 @@ sal_Bool SAL_CALL SdDocLinkTargets::supportsService( const OUString& ServiceName uno::Sequence< OUString > SAL_CALL SdDocLinkTargets::getSupportedServiceNames() { - const OUString aSN( "com.sun.star.document.LinkTargets" ); - uno::Sequence< OUString > aSeq( &aSN, 1 ); - return aSeq; + return { "com.sun.star.document.LinkTargets" }; } rtl::Reference< SdXImpressDocument > SdXImpressDocument::GetModel( SdDrawDocument const & rDocument ) diff --git a/sd/source/ui/unoidl/unopback.cxx b/sd/source/ui/unoidl/unopback.cxx index 5b5b7b429fea..58ba1631fd6d 100644 --- a/sd/source/ui/unoidl/unopback.cxx +++ b/sd/source/ui/unoidl/unopback.cxx @@ -179,13 +179,7 @@ sal_Bool SAL_CALL SdUnoPageBackground::supportsService( const OUString& ServiceN uno::Sequence< OUString > SAL_CALL SdUnoPageBackground::getSupportedServiceNames() { - uno::Sequence< OUString > aNameSequence( 2 ); - OUString* pStrings = aNameSequence.getArray(); - - *pStrings++ = sUNO_Service_PageBackground; - *pStrings = sUNO_Service_FillProperties; - - return aNameSequence; + return { sUNO_Service_PageBackground, sUNO_Service_FillProperties }; } // XPropertySet |