From 0b1a0cf3c87d90d0c86ef4173706ff4558f24e84 Mon Sep 17 00:00:00 2001 From: Olivier Hallot Date: Fri, 13 Apr 2012 14:40:10 -0300 Subject: More RTL_CONSTASCII_USTRINGPARAM removals --- sd/source/ui/presenter/PresenterCanvas.cxx | 25 +++++++------------- sd/source/ui/presenter/PresenterHelper.cxx | 10 ++++---- sd/source/ui/presenter/PresenterPreviewCache.cxx | 9 +++---- sd/source/ui/presenter/PresenterTextView.cxx | 30 ++++++++++-------------- sd/source/ui/presenter/SlideRenderer.cxx | 18 +++++--------- sd/source/ui/slideshow/slideshowimpl.cxx | 6 ++--- 6 files changed, 37 insertions(+), 61 deletions(-) diff --git a/sd/source/ui/presenter/PresenterCanvas.cxx b/sd/source/ui/presenter/PresenterCanvas.cxx index e8044e6d5f50..8a8672778161 100644 --- a/sd/source/ui/presenter/PresenterCanvas.cxx +++ b/sd/source/ui/presenter/PresenterCanvas.cxx @@ -63,7 +63,7 @@ Reference SAL_CALL PresenterCanvas_createInstance ( ::rtl::OUString PresenterCanvas_getImplementationName (void) throw(RuntimeException) { - return OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.Draw.PresenterCanvasFactory")); + return OUString("com.sun.star.comp.Draw.PresenterCanvasFactory"); } @@ -72,8 +72,7 @@ Reference SAL_CALL PresenterCanvas_createInstance ( Sequence SAL_CALL PresenterCanvas_getSupportedServiceNames (void) throw (RuntimeException) { - static const ::rtl::OUString sServiceName( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.rendering.Canvas"))); + static const ::rtl::OUString sServiceName("com.sun.star.rendering.Canvas"); return Sequence(&sServiceName, 1); } @@ -231,24 +230,21 @@ void SAL_CALL PresenterCanvas::initialize ( if ( ! (rArguments[2] >>= mxSharedWindow)) { - throw lang::IllegalArgumentException( - OUString(RTL_CONSTASCII_USTRINGPARAM("PresenterCanvas: invalid shared window")), + throw lang::IllegalArgumentException("PresenterCanvas: invalid shared window", static_cast(this), 1); } if ( ! (rArguments[3] >>= mxSharedCanvas)) { - throw lang::IllegalArgumentException( - OUString(RTL_CONSTASCII_USTRINGPARAM("PresenterCanvas: invalid shared canvas")), + throw lang::IllegalArgumentException("PresenterCanvas: invalid shared canvas", static_cast(this), 2); } if ( ! (rArguments[4] >>= mxWindow)) { - throw lang::IllegalArgumentException( - OUString(RTL_CONSTASCII_USTRINGPARAM("PresenterCanvas: invalid window")), + throw lang::IllegalArgumentException("PresenterCanvas: invalid window", static_cast(this), 3); } @@ -268,8 +264,7 @@ void SAL_CALL PresenterCanvas::initialize ( } else { - throw RuntimeException( - OUString(RTL_CONSTASCII_USTRINGPARAM("PresenterCanvas: invalid number of arguments")), + throw RuntimeException("PresenterCanvas: invalid number of arguments", static_cast(this)); } } @@ -1060,9 +1055,7 @@ void PresenterCanvas::ThrowIfDisposed (void) { if (rBHelper.bDisposed || rBHelper.bInDispose || ! mxSharedCanvas.is()) { - throw lang::DisposedException ( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "PresenterCanvas object has already been disposed")), + throw lang::DisposedException ("PresenterCanvas object has already been disposed", static_cast(this)); } } @@ -1215,9 +1208,7 @@ void PresenterCustomSprite::ThrowIfDisposed (void) { if (rBHelper.bDisposed || rBHelper.bInDispose || ! mxSprite.is()) { - throw lang::DisposedException ( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "PresenterCustomSprite object has already been disposed")), + throw lang::DisposedException ("PresenterCustomSprite object has already been disposed", static_cast(this)); } } diff --git a/sd/source/ui/presenter/PresenterHelper.cxx b/sd/source/ui/presenter/PresenterHelper.cxx index b73487453935..157eb949a863 100644 --- a/sd/source/ui/presenter/PresenterHelper.cxx +++ b/sd/source/ui/presenter/PresenterHelper.cxx @@ -60,7 +60,7 @@ Reference SAL_CALL PresenterHelperService_createInstance ( ::rtl::OUString PresenterHelperService_getImplementationName (void) throw(RuntimeException) { - return OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.Draw.PresenterHelper")); + return OUString("com.sun.star.comp.Draw.PresenterHelper"); } @@ -69,8 +69,7 @@ Reference SAL_CALL PresenterHelperService_createInstance ( Sequence SAL_CALL PresenterHelperService_getSupportedServiceNames (void) throw (RuntimeException) { - static const ::rtl::OUString sServiceName( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.PresenterHelper"))); + static const ::rtl::OUString sServiceName("com.sun.star.drawing.PresenterHelper"); return Sequence(&sServiceName, 1); } @@ -175,8 +174,7 @@ Reference SAL_CALL PresenterHelper::createSharedCanvas ( || ! rxSharedWindow.is() || ! rxWindow.is()) { - throw RuntimeException( - OUString(RTL_CONSTASCII_USTRINGPARAM("illegal argument")), + throw RuntimeException("illegal argument", Reference(static_cast(this))); } @@ -222,7 +220,7 @@ Reference SAL_CALL PresenterHelper::createCanvas ( xFactory->createInstanceWithArguments( !rsOptionalCanvasServiceName.isEmpty() ? rsOptionalCanvasServiceName - : OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.rendering.VCLCanvas")), + : OUString("com.sun.star.rendering.VCLCanvas"), aArg), UNO_QUERY); } diff --git a/sd/source/ui/presenter/PresenterPreviewCache.cxx b/sd/source/ui/presenter/PresenterPreviewCache.cxx index fcc2e925c64a..de60d96e9745 100644 --- a/sd/source/ui/presenter/PresenterPreviewCache.cxx +++ b/sd/source/ui/presenter/PresenterPreviewCache.cxx @@ -98,7 +98,7 @@ Reference SAL_CALL PresenterPreviewCache_createInstance ( ::rtl::OUString PresenterPreviewCache_getImplementationName (void) throw(RuntimeException) { - return OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.Draw.PresenterPreviewCache")); + return OUString("com.sun.star.comp.Draw.PresenterPreviewCache"); } @@ -107,8 +107,7 @@ Reference SAL_CALL PresenterPreviewCache_createInstance ( Sequence SAL_CALL PresenterPreviewCache_getSupportedServiceNames (void) throw (RuntimeException) { - static const ::rtl::OUString sServiceName( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.PresenterPreviewCache"))); + static const ::rtl::OUString sServiceName("com.sun.star.drawing.PresenterPreviewCache"); return Sequence(&sServiceName, 1); } @@ -273,9 +272,7 @@ void PresenterPreviewCache::ThrowIfDisposed (void) { if (rBHelper.bDisposed || rBHelper.bInDispose) { - throw lang::DisposedException ( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "PresenterPreviewCache object has already been disposed")), + throw lang::DisposedException ("PresenterPreviewCache object has already been disposed", static_cast(this)); } } diff --git a/sd/source/ui/presenter/PresenterTextView.cxx b/sd/source/ui/presenter/PresenterTextView.cxx index 8c6729facac2..db086671bd30 100644 --- a/sd/source/ui/presenter/PresenterTextView.cxx +++ b/sd/source/ui/presenter/PresenterTextView.cxx @@ -72,7 +72,7 @@ Reference SAL_CALL PresenterTextViewService_createInstance ( ::rtl::OUString PresenterTextViewService_getImplementationName (void) throw(RuntimeException) { - return OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.Draw.PresenterTextView")); + return OUString("com.sun.star.comp.Draw.PresenterTextView"); } @@ -81,8 +81,7 @@ Reference SAL_CALL PresenterTextViewService_createInstance ( Sequence SAL_CALL PresenterTextViewService_getSupportedServiceNames (void) throw (RuntimeException) { - static const ::rtl::OUString sServiceName( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.PresenterTextView"))); + static const ::rtl::OUString sServiceName("com.sun.star.drawing.PresenterTextView"); return Sequence(&sServiceName, 1); } @@ -191,8 +190,7 @@ void SAL_CALL PresenterTextView::initialize (const Sequence& rArguments) } else { - throw RuntimeException( - OUString(RTL_CONSTASCII_USTRINGPARAM("PresenterTextView: invalid number of arguments")), + throw RuntimeException("PresenterTextView: invalid number of arguments", static_cast(this)); } } @@ -289,9 +287,7 @@ void PresenterTextView::ThrowIfDisposed (void) || PresenterTextViewInterfaceBase::rBHelper.bInDispose || mpImplementation.get()==NULL) { - throw lang::DisposedException ( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "PresenterTextView object has already been disposed")), + throw lang::DisposedException ("PresenterTextView object has already been disposed", static_cast(this)); } } @@ -302,15 +298,15 @@ void PresenterTextView::ThrowIfDisposed (void) //===== PresenterTextView::Implementation ===================================== PresenterTextView::Implementation::Implementation (void) - : msTextPropertyName(OUString(RTL_CONSTASCII_USTRINGPARAM("Text"))), - msBitmapPropertyName(OUString(RTL_CONSTASCII_USTRINGPARAM("Bitmap"))), - msSizePropertyName(OUString(RTL_CONSTASCII_USTRINGPARAM("Size"))), - msBackgroundColorPropertyName(OUString(RTL_CONSTASCII_USTRINGPARAM("BackgroundColor"))), - msTextColorPropertyName(OUString(RTL_CONSTASCII_USTRINGPARAM("TextColor"))), - msFontDescriptorPropertyName(OUString(RTL_CONSTASCII_USTRINGPARAM("FontDescriptor"))), - msTopPropertyName(OUString(RTL_CONSTASCII_USTRINGPARAM("Top"))), - msTopRelativePropertyName(OUString(RTL_CONSTASCII_USTRINGPARAM("RelativeTop"))), - msTotalHeightPropertyName(OUString(RTL_CONSTASCII_USTRINGPARAM("TotalHeight"))), + : msTextPropertyName("Text"), + msBitmapPropertyName("Bitmap"), + msSizePropertyName("Size"), + msBackgroundColorPropertyName("BackgroundColor"), + msTextColorPropertyName("TextColor"), + msFontDescriptorPropertyName("FontDescriptor"), + msTopPropertyName("Top"), + msTopRelativePropertyName("RelativeTop"), + msTotalHeightPropertyName("TotalHeight"), mxBitmap(), mpCanvas(), mpOutputDevice(new VirtualDevice(*Application::GetDefaultDevice(), 0, 0)), diff --git a/sd/source/ui/presenter/SlideRenderer.cxx b/sd/source/ui/presenter/SlideRenderer.cxx index 4a8ee2b6d550..b7ce08095e06 100644 --- a/sd/source/ui/presenter/SlideRenderer.cxx +++ b/sd/source/ui/presenter/SlideRenderer.cxx @@ -53,7 +53,7 @@ Reference SAL_CALL SlideRenderer_createInstance ( ::rtl::OUString SlideRenderer_getImplementationName (void) throw(RuntimeException) { - return OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.Draw.SlideRenderer")); + return OUString("com.sun.star.comp.Draw.SlideRenderer"); } @@ -62,8 +62,7 @@ Reference SAL_CALL SlideRenderer_createInstance ( Sequence SAL_CALL SlideRenderer_getSupportedServiceNames (void) throw (RuntimeException) { - static const ::rtl::OUString sServiceName( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.SlideRenderer"))); + static const ::rtl::OUString sServiceName("com.sun.star.drawing.SlideRenderer"); return Sequence(&sServiceName, 1); } @@ -105,8 +104,7 @@ void SAL_CALL SlideRenderer::initialize (const Sequence& rArguments) if (rArguments.getLength() != 0) { - throw RuntimeException( - OUString(RTL_CONSTASCII_USTRINGPARAM("SlideRenderer: invalid number of arguments")), + throw RuntimeException("SlideRenderer: invalid number of arguments", static_cast(this)); } } @@ -191,16 +189,14 @@ BitmapEx SlideRenderer::CreatePreview ( { const SdPage* pPage = SdPage::getImplementation(rxSlide); if (pPage == NULL) - throw lang::IllegalArgumentException( - OUString(RTL_CONSTASCII_USTRINGPARAM("SlideRenderer::createPreview() called with invalid slide")), + throw lang::IllegalArgumentException("SlideRenderer::createPreview() called with invalid slide", static_cast(this), 0); // Determine the size of the current slide and its aspect ratio. Size aPageSize = pPage->GetSize(); if (aPageSize.Height() <= 0) - throw lang::IllegalArgumentException( - OUString(RTL_CONSTASCII_USTRINGPARAM("SlideRenderer::createPreview() called with invalid size")), + throw lang::IllegalArgumentException("SlideRenderer::createPreview() called with invalid size", static_cast(this), 1); @@ -250,9 +246,7 @@ void SlideRenderer::ThrowIfDisposed (void) { if (SlideRendererInterfaceBase::rBHelper.bDisposed || SlideRendererInterfaceBase::rBHelper.bInDispose) { - throw lang::DisposedException ( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "SlideRenderer object has already been disposed")), + throw lang::DisposedException ("SlideRenderer object has already been disposed", static_cast(this)); } } diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx index 4e70f478a4a8..da4a646238ca 100644 --- a/sd/source/ui/slideshow/slideshowimpl.cxx +++ b/sd/source/ui/slideshow/slideshowimpl.cxx @@ -551,9 +551,9 @@ SlideshowImpl::SlideshowImpl( const Reference< XPresentation2 >& xPresentation, #endif , mnEntryCounter(0) , mnLastSlideNumber(-1) -, msOnClick( "OnClick") -, msBookmark( "Bookmark") -, msVerb( "Verb") +, msOnClick( "OnClick" ) +, msBookmark( "Bookmark" ) +, msVerb( "Verb" ) , mnEndShowEvent(0) , mnContextMenuEvent(0) , mnUpdateEvent(0) -- cgit