diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2019-07-30 17:45:37 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2019-07-31 12:52:33 +0200 |
commit | 7680623292f272cf1a8cceb4abb5a67bb5469918 (patch) | |
tree | 9c07a62ce919f9f64d78fc7d60040a3925b5f019 | |
parent | 8b9f2959419a382fec85cdc25b8c49f59b6d85fc (diff) |
Improved loplugin:stringconstant (now that GCC 7 supports it): vcl
Change-Id: I0bd1d26f6fc4052b812fde33ebd1d63111426942
Reviewed-on: https://gerrit.libreoffice.org/76627
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
31 files changed, 177 insertions, 183 deletions
diff --git a/vcl/inc/salinst.hxx b/vcl/inc/salinst.hxx index a9717167c5b7..5ac470b3eb0a 100644 --- a/vcl/inc/salinst.hxx +++ b/vcl/inc/salinst.hxx @@ -203,7 +203,7 @@ public: virtual void updateMainThread() {} /// get information about underlying versions - virtual OUString getOSVersion() { return OUString("-"); } + virtual OUString getOSVersion() { return "-"; } virtual const cairo_font_options_t* GetCairoFontOptions() { return nullptr; } diff --git a/vcl/qt5/Qt5AccessibleWidget.cxx b/vcl/qt5/Qt5AccessibleWidget.cxx index 9757eab27837..6ee5eedb6414 100644 --- a/vcl/qt5/Qt5AccessibleWidget.cxx +++ b/vcl/qt5/Qt5AccessibleWidget.cxx @@ -803,24 +803,24 @@ namespace OUString lcl_convertFontWeight(double fontWeight) { if (fontWeight == awt::FontWeight::THIN || fontWeight == awt::FontWeight::ULTRALIGHT) - return OUString("100"); + return "100"; if (fontWeight == awt::FontWeight::LIGHT) - return OUString("200"); + return "200"; if (fontWeight == awt::FontWeight::SEMILIGHT) - return OUString("300"); + return "300"; if (fontWeight == awt::FontWeight::NORMAL) - return OUString("normal"); + return "normal"; if (fontWeight == awt::FontWeight::SEMIBOLD) - return OUString("500"); + return "500"; if (fontWeight == awt::FontWeight::BOLD) - return OUString("bold"); + return "bold"; if (fontWeight == awt::FontWeight::ULTRABOLD) - return OUString("800"); + return "800"; if (fontWeight == awt::FontWeight::BLACK) - return OUString("900"); + return "900"; // awt::FontWeight::DONTKNOW || fontWeight == awt::FontWeight::NORMAL - return OUString("normal"); + return "normal"; } } diff --git a/vcl/qt5/Qt5Clipboard.cxx b/vcl/qt5/Qt5Clipboard.cxx index 4b948ae3be17..db018c82150f 100644 --- a/vcl/qt5/Qt5Clipboard.cxx +++ b/vcl/qt5/Qt5Clipboard.cxx @@ -150,10 +150,7 @@ void Qt5Clipboard::handleChanged(QClipboard::Mode aMode) listener->changedContents(aEv); } -OUString Qt5Clipboard::getImplementationName() -{ - return OUString("com.sun.star.datatransfer.Qt5Clipboard"); -} +OUString Qt5Clipboard::getImplementationName() { return "com.sun.star.datatransfer.Qt5Clipboard"; } css::uno::Sequence<OUString> Qt5Clipboard::getSupportedServiceNames() { diff --git a/vcl/qt5/Qt5DragAndDrop.cxx b/vcl/qt5/Qt5DragAndDrop.cxx index 118939cdae8f..2b674e5a8e4f 100644 --- a/vcl/qt5/Qt5DragAndDrop.cxx +++ b/vcl/qt5/Qt5DragAndDrop.cxx @@ -110,7 +110,7 @@ void Qt5DragSource::fire_dragEnd(sal_Int8 nAction) OUString SAL_CALL Qt5DragSource::getImplementationName() { - return OUString("com.sun.star.datatransfer.dnd.VclQt5DragSource"); + return "com.sun.star.datatransfer.dnd.VclQt5DragSource"; } sal_Bool SAL_CALL Qt5DragSource::supportsService(OUString const& ServiceName) @@ -134,7 +134,7 @@ Qt5DropTarget::Qt5DropTarget() OUString SAL_CALL Qt5DropTarget::getImplementationName() { - return OUString("com.sun.star.datatransfer.dnd.VclQt5DropTarget"); + return "com.sun.star.datatransfer.dnd.VclQt5DropTarget"; } sal_Bool SAL_CALL Qt5DropTarget::supportsService(OUString const& ServiceName) diff --git a/vcl/qt5/Qt5FilePicker.cxx b/vcl/qt5/Qt5FilePicker.cxx index 63b3ff79a2bc..f499c2db53dd 100644 --- a/vcl/qt5/Qt5FilePicker.cxx +++ b/vcl/qt5/Qt5FilePicker.cxx @@ -826,7 +826,7 @@ void Qt5FilePicker::disposing(const lang::EventObject& rEvent) OUString SAL_CALL Qt5FilePicker::getImplementationName() { - return OUString("com.sun.star.ui.dialogs.Qt5FilePicker"); + return "com.sun.star.ui.dialogs.Qt5FilePicker"; } sal_Bool SAL_CALL Qt5FilePicker::supportsService(const OUString& ServiceName) diff --git a/vcl/source/app/IconThemeSelector.cxx b/vcl/source/app/IconThemeSelector.cxx index bf3953b755ba..6eec4a52b777 100644 --- a/vcl/source/app/IconThemeSelector.cxx +++ b/vcl/source/app/IconThemeSelector.cxx @@ -53,7 +53,7 @@ IconThemeSelector::IconThemeSelector() IconThemeSelector::GetIconThemeForDesktopEnvironment(const OUString& desktopEnvironment) { if (comphelper::LibreOfficeKit::isActive()) - return OUString("colibre"); + return "colibre"; #ifdef _WIN32 (void)desktopEnvironment; @@ -94,7 +94,7 @@ IconThemeSelector::SelectIconThemeForDesktopEnvironment( } //if a dark variant is preferred, and we didn't have an exact match, then try our one and only dark theme if (mPreferDarkIconTheme && icon_theme_is_in_installed_themes("breeze_dark", installedThemes)) { - return OUString("breeze_dark"); + return "breeze_dark"; } } diff --git a/vcl/source/app/session.cxx b/vcl/source/app/session.cxx index c96d179cf90e..faa717702326 100644 --- a/vcl/source/app/session.cxx +++ b/vcl/source/app/session.cxx @@ -389,7 +389,7 @@ OUString vcl_session_getImplementationName() { SAL_INFO("vcl.se", "vcl_session_getImplementationName"); - return OUString( "com.sun.star.frame.VCLSessionManagerClient" ); + return "com.sun.star.frame.VCLSessionManagerClient"; } Sequence< OUString > vcl_session_getSupportedServiceNames() diff --git a/vcl/source/components/dtranscomp.cxx b/vcl/source/components/dtranscomp.cxx index 2b81c889a52c..5a2f146cca6c 100644 --- a/vcl/source/components/dtranscomp.cxx +++ b/vcl/source/components/dtranscomp.cxx @@ -111,7 +111,7 @@ Sequence< OUString > GenericClipboard::getSupportedServiceNames_static() OUString GenericClipboard::getImplementationName() { - return OUString("com.sun.star.datatransfer.VCLGenericClipboard"); + return "com.sun.star.datatransfer.VCLGenericClipboard"; } Sequence< OUString > GenericClipboard::getSupportedServiceNames() @@ -155,7 +155,7 @@ void GenericClipboard::setContents( OUString GenericClipboard::getName() { - return OUString( "CLIPBOARD" ); + return "CLIPBOARD"; } sal_Int8 GenericClipboard::getRenderingCapabilities() @@ -213,7 +213,7 @@ Reference< XInterface > ClipboardFactory::createInstanceWithArguments( const Seq OUString Clipboard_getImplementationName() { - return OUString( + return #if defined MACOSX "com.sun.star.datatransfer.clipboard.AquaClipboard" #elif defined IOS @@ -225,7 +225,7 @@ OUString Clipboard_getImplementationName() #else "com.sun.star.datatransfer.VCLGenericClipboard" #endif - ); + ; } Reference< XSingleServiceFactory > Clipboard_createFactory() @@ -260,7 +260,7 @@ public: virtual void SAL_CALL initialize( const Sequence< Any >& arguments ) override; OUString SAL_CALL getImplementationName() override - { return OUString("com.sun.star.datatransfer.dnd.VclGenericDragSource"); } + { return "com.sun.star.datatransfer.dnd.VclGenericDragSource"; } sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override { return cppu::supportsService(this, ServiceName); } @@ -317,7 +317,7 @@ OUString DragSource_getImplementationName() #if defined MACOSX return OUString("com.sun.star.comp.datatransfer.dnd.OleDragSource_V1"); #elif defined UNX - return OUString("com.sun.star.datatransfer.dnd.XdndSupport"); + return "com.sun.star.datatransfer.dnd.XdndSupport"; #else return OUString("com.sun.star.datatransfer.dnd.VclGenericDragSource"); #endif @@ -357,7 +357,7 @@ public: virtual void SAL_CALL setDefaultActions( sal_Int8 actions ) override; OUString SAL_CALL getImplementationName() override - { return OUString("com.sun.star.datatransfer.dnd.VclGenericDropTarget"); } + { return "com.sun.star.datatransfer.dnd.VclGenericDropTarget"; } sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override { return cppu::supportsService(this, ServiceName); } @@ -415,7 +415,7 @@ Sequence< OUString > DropTarget_getSupportedServiceNames() OUString DropTarget_getImplementationName() { - return OUString( + return #if defined MACOSX "com.sun.star.comp.datatransfer.dnd.OleDropTarget_V1" #elif defined UNX @@ -423,7 +423,7 @@ OUString DropTarget_getImplementationName() #else "com.sun.star.datatransfer.dnd.VclGenericDropTarget" #endif - ); + ; } Reference< XInterface > DropTarget_createInstance( const Reference< XMultiServiceFactory >& ) diff --git a/vcl/source/components/fontident.cxx b/vcl/source/components/fontident.cxx index e6d5202ef80e..2da25d18eb63 100644 --- a/vcl/source/components/fontident.cxx +++ b/vcl/source/components/fontident.cxx @@ -151,7 +151,7 @@ Sequence< OUString > FontIdentificator_getSupportedServiceNames() OUString FontIdentificator_getImplementationName() { - return OUString( "vcl::FontIdentificator" ); + return "vcl::FontIdentificator"; } Reference< XInterface > FontIdentificator_createInstance( const Reference< XMultiServiceFactory >& ) diff --git a/vcl/source/control/field2.cxx b/vcl/source/control/field2.cxx index d35b3c51c727..373be2a0cd34 100644 --- a/vcl/source/control/field2.cxx +++ b/vcl/source/control/field2.cxx @@ -985,7 +985,7 @@ static sal_uInt16 ImplCutMonthFromString( OUString& rStr, const CalendarWrapper& static OUString ImplGetDateSep( const LocaleDataWrapper& rLocaleDataWrapper, ExtDateFieldFormat eFormat ) { if ( ( eFormat == ExtDateFieldFormat::ShortYYMMDD_DIN5008 ) || ( eFormat == ExtDateFieldFormat::ShortYYYYMMDD_DIN5008 ) ) - return OUString("-"); + return "-"; else return rLocaleDataWrapper.getDateSep(); } diff --git a/vcl/source/gdi/mtfxmldump.cxx b/vcl/source/gdi/mtfxmldump.cxx index 604092a2a8a7..c5d2dfaa4c6c 100644 --- a/vcl/source/gdi/mtfxmldump.cxx +++ b/vcl/source/gdi/mtfxmldump.cxx @@ -23,11 +23,11 @@ namespace OUString collectPushFlags(PushFlags nFlags) { if ((nFlags & PushFlags::ALL) == PushFlags::ALL) - return OUString("PushAll"); + return "PushAll"; else if ((nFlags & PUSH_ALLFONT) == PUSH_ALLFONT) - return OUString("PushAllFont"); + return "PushAllFont"; else if ((nFlags & PUSH_ALLTEXT) == PUSH_ALLTEXT) - return OUString("PushAllText"); + return "PushAllText"; std::vector<OUString> aStrings; @@ -116,7 +116,7 @@ OUString convertDrawTextFlagsToString(DrawTextFlags eDrawTextFlags) OUString aString; if (aStrings.empty()) - return OUString("None"); + return "None"; aString = aStrings[0]; for (size_t i = 1; i < aStrings.size(); ++i) @@ -130,11 +130,11 @@ OUString convertRopToString(RasterOp eRop) { switch (eRop) { - case RasterOp::OverPaint: return OUString("overpaint"); - case RasterOp::Xor: return OUString("xor"); - case RasterOp::N0: return OUString("0"); - case RasterOp::N1: return OUString("1"); - case RasterOp::Invert: return OUString("invert"); + case RasterOp::OverPaint: return "overpaint"; + case RasterOp::Xor: return "xor"; + case RasterOp::N0: return "0"; + case RasterOp::N1: return "1"; + case RasterOp::Invert: return "invert"; } return OUString(); } @@ -143,10 +143,10 @@ OUString convertTextAlignToString(TextAlign eAlign) { switch (eAlign) { - case ALIGN_BASELINE: return OUString("baseline"); - case ALIGN_BOTTOM: return OUString("bottom"); - case ALIGN_TOP: return OUString("top"); - case TextAlign_FORCE_EQUAL_SIZE: return OUString("equalsize"); + case ALIGN_BASELINE: return "baseline"; + case ALIGN_BOTTOM: return "bottom"; + case ALIGN_TOP: return "top"; + case TextAlign_FORCE_EQUAL_SIZE: return "equalsize"; } return OUString(); } @@ -161,9 +161,9 @@ OUString convertLineStyleToString(LineStyle eAlign) { switch (eAlign) { - case LineStyle::NONE: return OUString("none"); - case LineStyle::Solid: return OUString("solid"); - case LineStyle::Dash: return OUString("dash"); + case LineStyle::NONE: return "none"; + case LineStyle::Solid: return "solid"; + case LineStyle::Dash: return "dash"; default: break; } return OUString(); @@ -174,10 +174,10 @@ OUString convertLineJoinToString(basegfx::B2DLineJoin eJoin) switch (eJoin) { default: - case basegfx::B2DLineJoin::NONE: return OUString("none"); - case basegfx::B2DLineJoin::Bevel: return OUString("bevel"); - case basegfx::B2DLineJoin::Miter: return OUString("miter"); - case basegfx::B2DLineJoin::Round: return OUString("round"); + case basegfx::B2DLineJoin::NONE: return "none"; + case basegfx::B2DLineJoin::Bevel: return "bevel"; + case basegfx::B2DLineJoin::Miter: return "miter"; + case basegfx::B2DLineJoin::Round: return "round"; } } @@ -186,9 +186,9 @@ OUString convertLineCapToString(css::drawing::LineCap eCap) switch (eCap) { default: - case css::drawing::LineCap_BUTT: return OUString("butt"); - case css::drawing::LineCap_ROUND: return OUString("round"); - case css::drawing::LineCap_SQUARE: return OUString("square"); + case css::drawing::LineCap_BUTT: return "butt"; + case css::drawing::LineCap_ROUND: return "round"; + case css::drawing::LineCap_SQUARE: return "square"; } } @@ -197,10 +197,10 @@ OUString convertPolygonFlags(PolyFlags eFlags) switch (eFlags) { default: - case PolyFlags::Normal: return OUString("normal"); - case PolyFlags::Control: return OUString("control"); - case PolyFlags::Smooth: return OUString("smooth"); - case PolyFlags::Symmetric: return OUString("symmetric"); + case PolyFlags::Normal: return "normal"; + case PolyFlags::Control: return "control"; + case PolyFlags::Smooth: return "smooth"; + case PolyFlags::Symmetric: return "symmetric"; } } @@ -208,18 +208,18 @@ OUString convertFontWeigthToString(FontWeight eFontWeight) { switch (eFontWeight) { - case WEIGHT_DONTKNOW: return OUString("unknown"); - case WEIGHT_THIN: return OUString("thin"); - case WEIGHT_ULTRALIGHT: return OUString("ultralight"); - case WEIGHT_LIGHT: return OUString("light"); - case WEIGHT_SEMILIGHT: return OUString("semilight"); - case WEIGHT_NORMAL: return OUString("normal"); - case WEIGHT_MEDIUM: return OUString("medium"); - case WEIGHT_SEMIBOLD: return OUString("semibold"); - case WEIGHT_BOLD: return OUString("bold"); - case WEIGHT_ULTRABOLD: return OUString("ultrabold"); - case WEIGHT_BLACK: return OUString("black"); - case FontWeight_FORCE_EQUAL_SIZE: return OUString("equalsize"); + case WEIGHT_DONTKNOW: return "unknown"; + case WEIGHT_THIN: return "thin"; + case WEIGHT_ULTRALIGHT: return "ultralight"; + case WEIGHT_LIGHT: return "light"; + case WEIGHT_SEMILIGHT: return "semilight"; + case WEIGHT_NORMAL: return "normal"; + case WEIGHT_MEDIUM: return "medium"; + case WEIGHT_SEMIBOLD: return "semibold"; + case WEIGHT_BOLD: return "bold"; + case WEIGHT_ULTRABOLD: return "ultrabold"; + case WEIGHT_BLACK: return "black"; + case FontWeight_FORCE_EQUAL_SIZE: return "equalsize"; } return OUString(); } @@ -228,14 +228,14 @@ OUString convertFontStrikeoutToString(FontStrikeout eFontStrikeout) { switch (eFontStrikeout) { - case STRIKEOUT_NONE: return OUString("none"); - case STRIKEOUT_SINGLE: return OUString("single"); - case STRIKEOUT_DOUBLE: return OUString("double"); - case STRIKEOUT_DONTKNOW: return OUString("dontknow"); - case STRIKEOUT_BOLD: return OUString("bold"); - case STRIKEOUT_SLASH: return OUString("slash"); - case STRIKEOUT_X: return OUString("x"); - case FontStrikeout_FORCE_EQUAL_SIZE: return OUString("equalsize"); + case STRIKEOUT_NONE: return "none"; + case STRIKEOUT_SINGLE: return "single"; + case STRIKEOUT_DOUBLE: return "double"; + case STRIKEOUT_DONTKNOW: return "dontknow"; + case STRIKEOUT_BOLD: return "bold"; + case STRIKEOUT_SLASH: return "slash"; + case STRIKEOUT_X: return "x"; + case FontStrikeout_FORCE_EQUAL_SIZE: return "equalsize"; } return OUString(); } @@ -244,26 +244,26 @@ OUString convertFontLineStyleToString(FontLineStyle eFontLineStyle) { switch (eFontLineStyle) { - case LINESTYLE_NONE: return OUString("none"); - case LINESTYLE_SINGLE: return OUString("single"); - case LINESTYLE_DOUBLE: return OUString("double"); - case LINESTYLE_DOTTED: return OUString("dotted"); - case LINESTYLE_DONTKNOW: return OUString("dontknow"); - case LINESTYLE_DASH: return OUString("dash"); - case LINESTYLE_LONGDASH: return OUString("longdash"); - case LINESTYLE_DASHDOT: return OUString("dashdot"); - case LINESTYLE_DASHDOTDOT: return OUString("dashdotdot"); - case LINESTYLE_SMALLWAVE: return OUString("smallwave"); - case LINESTYLE_WAVE: return OUString("wave"); - case LINESTYLE_DOUBLEWAVE: return OUString("doublewave"); - case LINESTYLE_BOLD: return OUString("bold"); - case LINESTYLE_BOLDDOTTED: return OUString("bolddotted"); - case LINESTYLE_BOLDDASH: return OUString("bolddash"); - case LINESTYLE_BOLDLONGDASH: return OUString("boldlongdash"); - case LINESTYLE_BOLDDASHDOT: return OUString("bolddashdot"); - case LINESTYLE_BOLDDASHDOTDOT: return OUString("bolddashdotdot"); - case LINESTYLE_BOLDWAVE: return OUString("boldwave"); - case FontLineStyle_FORCE_EQUAL_SIZE: return OUString("equalsize"); + case LINESTYLE_NONE: return "none"; + case LINESTYLE_SINGLE: return "single"; + case LINESTYLE_DOUBLE: return "double"; + case LINESTYLE_DOTTED: return "dotted"; + case LINESTYLE_DONTKNOW: return "dontknow"; + case LINESTYLE_DASH: return "dash"; + case LINESTYLE_LONGDASH: return "longdash"; + case LINESTYLE_DASHDOT: return "dashdot"; + case LINESTYLE_DASHDOTDOT: return "dashdotdot"; + case LINESTYLE_SMALLWAVE: return "smallwave"; + case LINESTYLE_WAVE: return "wave"; + case LINESTYLE_DOUBLEWAVE: return "doublewave"; + case LINESTYLE_BOLD: return "bold"; + case LINESTYLE_BOLDDOTTED: return "bolddotted"; + case LINESTYLE_BOLDDASH: return "bolddash"; + case LINESTYLE_BOLDLONGDASH: return "boldlongdash"; + case LINESTYLE_BOLDDASHDOT: return "bolddashdot"; + case LINESTYLE_BOLDDASHDOTDOT: return "bolddashdotdot"; + case LINESTYLE_BOLDWAVE: return "boldwave"; + case FontLineStyle_FORCE_EQUAL_SIZE: return "equalsize"; } return OUString(); } @@ -335,9 +335,9 @@ OUString convertBitmapExTransparentType(TransparentType eType) switch (eType) { default: - case TransparentType::NONE: return OUString("none"); - case TransparentType::Bitmap: return OUString("bitmap"); - case TransparentType::Color: return OUString("color"); + case TransparentType::NONE: return "none"; + case TransparentType::Bitmap: return "bitmap"; + case TransparentType::Color: return "color"; } } @@ -346,21 +346,21 @@ OUString convertMapUnitToString(MapUnit eUnit) switch (eUnit) { default: - case MapUnit::LASTENUMDUMMY: return OUString("LASTENUMDUMMY"); - case MapUnit::Map1000thInch: return OUString("Map1000thInch"); - case MapUnit::Map100thInch: return OUString("Map100thInch"); - case MapUnit::Map100thMM: return OUString("Map100thMM"); - case MapUnit::Map10thInch: return OUString("Map10thInch"); - case MapUnit::Map10thMM: return OUString("Map10thMM"); - case MapUnit::MapAppFont: return OUString("MapAppFont"); - case MapUnit::MapCM: return OUString("MapCM"); - case MapUnit::MapInch: return OUString("MapInch"); - case MapUnit::MapMM: return OUString("MapMM"); - case MapUnit::MapPixel: return OUString("MapPixel"); - case MapUnit::MapPoint: return OUString("MapPoint"); - case MapUnit::MapRelative: return OUString("MapRelative"); - case MapUnit::MapSysFont: return OUString("MapSysFont"); - case MapUnit::MapTwip: return OUString("MapTwip"); + case MapUnit::LASTENUMDUMMY: return "LASTENUMDUMMY"; + case MapUnit::Map1000thInch: return "Map1000thInch"; + case MapUnit::Map100thInch: return "Map100thInch"; + case MapUnit::Map100thMM: return "Map100thMM"; + case MapUnit::Map10thInch: return "Map10thInch"; + case MapUnit::Map10thMM: return "Map10thMM"; + case MapUnit::MapAppFont: return "MapAppFont"; + case MapUnit::MapCM: return "MapCM"; + case MapUnit::MapInch: return "MapInch"; + case MapUnit::MapMM: return "MapMM"; + case MapUnit::MapPixel: return "MapPixel"; + case MapUnit::MapPoint: return "MapPoint"; + case MapUnit::MapRelative: return "MapRelative"; + case MapUnit::MapSysFont: return "MapSysFont"; + case MapUnit::MapTwip: return "MapTwip"; } } @@ -377,13 +377,13 @@ OUString convertGradientStyle(GradientStyle eStyle) { switch (eStyle) { - case GradientStyle::Linear: return OUString("Linear"); - case GradientStyle::Axial: return OUString("Axial"); - case GradientStyle::Radial: return OUString("Radial"); - case GradientStyle::Elliptical: return OUString("Elliptical"); - case GradientStyle::Square: return OUString("Square"); - case GradientStyle::Rect: return OUString("Rect"); - case GradientStyle::FORCE_EQUAL_SIZE: return OUString("ForceEqualSize"); + case GradientStyle::Linear: return "Linear"; + case GradientStyle::Axial: return "Axial"; + case GradientStyle::Radial: return "Radial"; + case GradientStyle::Elliptical: return "Elliptical"; + case GradientStyle::Square: return "Square"; + case GradientStyle::Rect: return "Rect"; + case GradientStyle::FORCE_EQUAL_SIZE: return "ForceEqualSize"; } return OUString(); } @@ -392,10 +392,10 @@ OUString convertHatchStyle(HatchStyle eStyle) { switch (eStyle) { - case HatchStyle::Single: return OUString("Single"); - case HatchStyle::Double: return OUString("Double"); - case HatchStyle::Triple: return OUString("Triple"); - case HatchStyle::FORCE_EQUAL_SIZE: return OUString("ForceEqualSize"); + case HatchStyle::Single: return "Single"; + case HatchStyle::Double: return "Double"; + case HatchStyle::Triple: return "Triple"; + case HatchStyle::FORCE_EQUAL_SIZE: return "ForceEqualSize"; } return OUString(); } @@ -404,19 +404,19 @@ OUString convertWallpaperStyleToString(WallpaperStyle eWallpaperStyle) { switch (eWallpaperStyle) { - case WallpaperStyle::NONE: return OUString("NONE"); - case WallpaperStyle::Tile: return OUString("Tile"); - case WallpaperStyle::Center: return OUString("Center"); - case WallpaperStyle::Scale: return OUString("Scale"); - case WallpaperStyle::TopLeft: return OUString("TopLeft"); - case WallpaperStyle::Top: return OUString("Top"); - case WallpaperStyle::TopRight: return OUString("TopRight"); - case WallpaperStyle::Left: return OUString("Left"); - case WallpaperStyle::Right: return OUString("Right"); - case WallpaperStyle::BottomLeft: return OUString("BottomLeft"); - case WallpaperStyle::Bottom: return OUString("Bottom"); - case WallpaperStyle::BottomRight: return OUString("BottomRight"); - case WallpaperStyle::ApplicationGradient: return OUString("ApplicationGradient"); + case WallpaperStyle::NONE: return "NONE"; + case WallpaperStyle::Tile: return "Tile"; + case WallpaperStyle::Center: return "Center"; + case WallpaperStyle::Scale: return "Scale"; + case WallpaperStyle::TopLeft: return "TopLeft"; + case WallpaperStyle::Top: return "Top"; + case WallpaperStyle::TopRight: return "TopRight"; + case WallpaperStyle::Left: return "Left"; + case WallpaperStyle::Right: return "Right"; + case WallpaperStyle::BottomLeft: return "BottomLeft"; + case WallpaperStyle::Bottom: return "Bottom"; + case WallpaperStyle::BottomRight: return "BottomRight"; + case WallpaperStyle::ApplicationGradient: return "ApplicationGradient"; } return OUString(); } diff --git a/vcl/source/graphic/UnoGraphic.cxx b/vcl/source/graphic/UnoGraphic.cxx index b13860caa734..f546389663b1 100644 --- a/vcl/source/graphic/UnoGraphic.cxx +++ b/vcl/source/graphic/UnoGraphic.cxx @@ -85,7 +85,7 @@ void SAL_CALL Graphic::release() throw() OUString SAL_CALL Graphic::getImplementationName() { - return OUString( "com.sun.star.comp.graphic.Graphic" ); + return "com.sun.star.comp.graphic.Graphic"; } sal_Bool SAL_CALL Graphic::supportsService( const OUString& rServiceName ) diff --git a/vcl/source/graphic/UnoGraphicDescriptor.cxx b/vcl/source/graphic/UnoGraphicDescriptor.cxx index 331e24167aff..9db06af2a4cb 100644 --- a/vcl/source/graphic/UnoGraphicDescriptor.cxx +++ b/vcl/source/graphic/UnoGraphicDescriptor.cxx @@ -192,7 +192,7 @@ void SAL_CALL GraphicDescriptor::release() OUString SAL_CALL GraphicDescriptor::getImplementationName() { - return OUString( "com.sun.star.comp.graphic.GraphicDescriptor" ); + return "com.sun.star.comp.graphic.GraphicDescriptor"; } sal_Bool SAL_CALL GraphicDescriptor::supportsService( const OUString& ServiceName ) diff --git a/vcl/source/graphic/UnoGraphicObject.cxx b/vcl/source/graphic/UnoGraphicObject.cxx index 86bb100ed3f2..bab6bffe5beb 100644 --- a/vcl/source/graphic/UnoGraphicObject.cxx +++ b/vcl/source/graphic/UnoGraphicObject.cxx @@ -49,7 +49,7 @@ public: virtual OUString SAL_CALL getImplementationName() override { - return OUString("com.sun.star.graphic.GraphicObject"); + return "com.sun.star.graphic.GraphicObject"; } virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override diff --git a/vcl/source/graphic/UnoGraphicProvider.cxx b/vcl/source/graphic/UnoGraphicProvider.cxx index 907b81316050..2ab3b2f38b99 100644 --- a/vcl/source/graphic/UnoGraphicProvider.cxx +++ b/vcl/source/graphic/UnoGraphicProvider.cxx @@ -90,7 +90,7 @@ GraphicProvider::GraphicProvider() OUString SAL_CALL GraphicProvider::getImplementationName() { - return OUString( "com.sun.star.comp.graphic.GraphicProvider" ); + return "com.sun.star.comp.graphic.GraphicProvider"; } sal_Bool SAL_CALL GraphicProvider::supportsService( const OUString& ServiceName ) diff --git a/vcl/source/helper/strhelper.cxx b/vcl/source/helper/strhelper.cxx index bd5db6adb438..1153c6b520cf 100644 --- a/vcl/source/helper/strhelper.cxx +++ b/vcl/source/helper/strhelper.cxx @@ -197,7 +197,7 @@ OString GetCommandLineToken(int nToken, const OString& rLine) *pLeap = 0; - return OString(pBuffer); + return pBuffer; } int GetCommandLineTokenCount(const OUString& rLine) @@ -362,7 +362,7 @@ OString WhitespaceToSpace(const OString& rLine) if( *pLeap == ' ' ) *pLeap = 0; - return OString(*pBuffer == ' ' ? pBuffer+1 : pBuffer); + return *pBuffer == ' ' ? pBuffer+1 : pBuffer; } } // namespace diff --git a/vcl/source/opengl/OpenGLHelper.cxx b/vcl/source/opengl/OpenGLHelper.cxx index 16fb939290b4..89f2c28805c6 100644 --- a/vcl/source/opengl/OpenGLHelper.cxx +++ b/vcl/source/opengl/OpenGLHelper.cxx @@ -79,7 +79,7 @@ OString loadShader(const OUString& rFilename) assert(nSize == nBytesRead); content.get()[nBytesRead] = 0; SAL_INFO("vcl.opengl", "Read " << nBytesRead << " bytes from " << aFileURL); - return OString(content.get()); + return content.get(); } else { diff --git a/vcl/source/treelist/transfer.cxx b/vcl/source/treelist/transfer.cxx index 3f7d7c5a655c..a33c719f86ee 100644 --- a/vcl/source/treelist/transfer.cxx +++ b/vcl/source/treelist/transfer.cxx @@ -257,7 +257,7 @@ void SAL_CALL TransferableHelper::TerminateListener::notifyTermination( const Ev OUString SAL_CALL TransferableHelper::TerminateListener::getImplementationName() { - return OUString("com.sun.star.comp.svt.TransferableHelperTerminateListener"); + return "com.sun.star.comp.svt.TransferableHelperTerminateListener"; } sal_Bool SAL_CALL TransferableHelper::TerminateListener::supportsService(const OUString& /*rServiceName*/) diff --git a/vcl/source/treelist/uiobject.cxx b/vcl/source/treelist/uiobject.cxx index 9b3d62dfcdfc..e5f166e8f1ce 100644 --- a/vcl/source/treelist/uiobject.cxx +++ b/vcl/source/treelist/uiobject.cxx @@ -83,7 +83,7 @@ std::set<OUString> TreeListUIObject::get_children() const OUString TreeListUIObject::get_name() const { - return OUString("TreeListUIObject"); + return "TreeListUIObject"; } std::unique_ptr<UIObject> TreeListUIObject::create(vcl::Window* pWindow) @@ -167,7 +167,7 @@ std::set<OUString> TreeListEntryUIObject::get_children() const OUString TreeListEntryUIObject::get_type() const { - return OUString("TreeListEntry"); + return "TreeListEntry"; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/uitest/logger.cxx b/vcl/source/uitest/logger.cxx index d100d1bbf125..7860364da9d9 100644 --- a/vcl/source/uitest/logger.cxx +++ b/vcl/source/uitest/logger.cxx @@ -223,7 +223,7 @@ namespace { OUString StringMapToOUString(const std::map<OUString, OUString>& rParameters) { if (rParameters.empty()) - return OUString(""); + return ""; OUStringBuffer aParameterString = " {"; diff --git a/vcl/source/uitest/uiobject.cxx b/vcl/source/uitest/uiobject.cxx index b8932913cf53..aa69bd0d60b6 100644 --- a/vcl/source/uitest/uiobject.cxx +++ b/vcl/source/uitest/uiobject.cxx @@ -49,7 +49,7 @@ void UIObject::execute(const OUString& /*rAction*/, OUString UIObject::get_type() const { - return OUString("Generic UIObject"); + return "Generic UIObject"; } std::unique_ptr<UIObject> UIObject::get_child(const OUString&) @@ -450,7 +450,7 @@ std::set<OUString> WindowUIObject::get_children() const OUString WindowUIObject::get_name() const { - return OUString("WindowUIObject"); + return "WindowUIObject"; } namespace { @@ -577,7 +577,7 @@ void ButtonUIObject::execute(const OUString& rAction, OUString ButtonUIObject::get_name() const { - return OUString("ButtonUIObject"); + return "ButtonUIObject"; } OUString ButtonUIObject::get_action(VclEventId nEvent) const @@ -618,7 +618,7 @@ StringMap DialogUIObject::get_state() OUString DialogUIObject::get_name() const { - return OUString("DialogUIObject"); + return "DialogUIObject"; } std::unique_ptr<UIObject> DialogUIObject::create(vcl::Window* pWindow) @@ -720,7 +720,7 @@ OUString EditUIObject::get_action(VclEventId nEvent) const OUString EditUIObject::get_name() const { - return OUString("EditUIObject"); + return "EditUIObject"; } std::unique_ptr<UIObject> EditUIObject::create(vcl::Window* pWindow) @@ -781,7 +781,7 @@ StringMap MultiLineEditUIObject::get_state() OUString MultiLineEditUIObject::get_name() const { - return OUString("MultiLineEditUIObject"); + return "MultiLineEditUIObject"; } std::unique_ptr<UIObject> MultiLineEditUIObject::create(vcl::Window* pWindow) @@ -821,7 +821,7 @@ StringMap CheckBoxUIObject::get_state() OUString CheckBoxUIObject::get_name() const { - return OUString("CheckBoxUIObject"); + return "CheckBoxUIObject"; } OUString CheckBoxUIObject::get_action(VclEventId nEvent) const @@ -871,7 +871,7 @@ StringMap RadioButtonUIObject::get_state() OUString RadioButtonUIObject::get_name() const { - return OUString("RadioButtonUIObject"); + return "RadioButtonUIObject"; } OUString RadioButtonUIObject::get_action(VclEventId nEvent) const @@ -920,7 +920,7 @@ StringMap TabPageUIObject::get_state() OUString TabPageUIObject::get_name() const { - return OUString("TabPageUIObject"); + return "TabPageUIObject"; } ListBoxUIObject::ListBoxUIObject(const VclPtr<ListBox>& xListBox): @@ -976,7 +976,7 @@ StringMap ListBoxUIObject::get_state() OUString ListBoxUIObject::get_name() const { - return OUString("ListBoxUIObject"); + return "ListBoxUIObject"; } OUString ListBoxUIObject::get_action(VclEventId nEvent) const @@ -1052,7 +1052,7 @@ StringMap ComboBoxUIObject::get_state() OUString ComboBoxUIObject::get_name() const { - return OUString("ComboBoxUIObject"); + return "ComboBoxUIObject"; } OUString ComboBoxUIObject::get_action(VclEventId nEvent) const @@ -1128,7 +1128,7 @@ OUString SpinUIObject::get_action(VclEventId nEvent) const OUString SpinUIObject::get_name() const { - return OUString("SpinUIObject"); + return "SpinUIObject"; } SpinFieldUIObject::SpinFieldUIObject(const VclPtr<SpinField>& xSpinField): @@ -1190,7 +1190,7 @@ OUString SpinFieldUIObject::get_action(VclEventId nEvent) const OUString SpinFieldUIObject::get_name() const { - return OUString("SpinFieldUIObject"); + return "SpinFieldUIObject"; } std::unique_ptr<UIObject> SpinFieldUIObject::create(vcl::Window* pWindow) @@ -1254,7 +1254,7 @@ OUString TabControlUIObject::get_action(VclEventId nEvent) const OUString TabControlUIObject::get_name() const { - return OUString("TabControlUIObject"); + return "TabControlUIObject"; } std::unique_ptr<UIObject> TabControlUIObject::create(vcl::Window* pWindow) diff --git a/vcl/source/uitest/uno/uiobject_uno.cxx b/vcl/source/uitest/uno/uiobject_uno.cxx index 283970569a0e..d4a88f7513f6 100644 --- a/vcl/source/uitest/uno/uiobject_uno.cxx +++ b/vcl/source/uitest/uno/uiobject_uno.cxx @@ -187,7 +187,7 @@ OUString SAL_CALL UIObjectUnoObj::getType() OUString SAL_CALL UIObjectUnoObj::getImplementationName() { - return OUString("org.libreoffice.uitest.UIObject"); + return "org.libreoffice.uitest.UIObject"; } sal_Bool UIObjectUnoObj::supportsService(OUString const & ServiceName) diff --git a/vcl/source/uitest/uno/uitest_uno.cxx b/vcl/source/uitest/uno/uitest_uno.cxx index 69d0c717a9bb..354b30585c69 100644 --- a/vcl/source/uitest/uno/uitest_uno.cxx +++ b/vcl/source/uitest/uno/uitest_uno.cxx @@ -97,7 +97,7 @@ css::uno::Reference<css::ui::test::XUIObject> SAL_CALL UITestUnoObj::getFloatWin OUString SAL_CALL UITestUnoObj::getImplementationName() { - return OUString("org.libreoffice.uitest.UITest"); + return "org.libreoffice.uitest.UITest"; } sal_Bool UITestUnoObj::supportsService(OUString const & ServiceName) diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index df3f672d227b..b2eb2c65142c 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -79,13 +79,13 @@ namespace OUString mapStockToImageResource(const OUString& sType) { if (sType == "gtk-index") - return OUString(SV_RESID_BITMAP_INDEX); + return SV_RESID_BITMAP_INDEX; else if (sType == "gtk-refresh") - return OUString(SV_RESID_BITMAP_REFRESH); + return SV_RESID_BITMAP_REFRESH; else if (sType == "gtk-apply") - return OUString(IMG_APPLY); + return IMG_APPLY; else if (sType == "gtk-dialog-error") - return OUString(IMG_ERROR); + return IMG_ERROR; return OUString(); } diff --git a/vcl/unx/generic/dtrans/X11_clipboard.cxx b/vcl/unx/generic/dtrans/X11_clipboard.cxx index 0855ebd117ea..c91f3248dd95 100644 --- a/vcl/unx/generic/dtrans/X11_clipboard.cxx +++ b/vcl/unx/generic/dtrans/X11_clipboard.cxx @@ -215,7 +215,7 @@ Reference< XInterface > X11Clipboard::getReference() throw() OUString SAL_CALL X11Clipboard::getImplementationName( ) { - return OUString(X11_CLIPBOARD_IMPLEMENTATION_NAME); + return X11_CLIPBOARD_IMPLEMENTATION_NAME; } sal_Bool SAL_CALL X11Clipboard::supportsService( const OUString& ServiceName ) diff --git a/vcl/unx/generic/dtrans/X11_droptarget.cxx b/vcl/unx/generic/dtrans/X11_droptarget.cxx index f9d87e18c071..5e1320fe3107 100644 --- a/vcl/unx/generic/dtrans/X11_droptarget.cxx +++ b/vcl/unx/generic/dtrans/X11_droptarget.cxx @@ -161,7 +161,7 @@ void DropTarget::dragOver( const DropTargetDragEvent& dtde ) throw() // XServiceInfo OUString DropTarget::getImplementationName() { - return OUString(XDND_DROPTARGET_IMPLEMENTATION_NAME); + return XDND_DROPTARGET_IMPLEMENTATION_NAME; } sal_Bool DropTarget::supportsService( const OUString& ServiceName ) diff --git a/vcl/unx/generic/dtrans/X11_selection.cxx b/vcl/unx/generic/dtrans/X11_selection.cxx index 3e0900030027..a6ab25389077 100644 --- a/vcl/unx/generic/dtrans/X11_selection.cxx +++ b/vcl/unx/generic/dtrans/X11_selection.cxx @@ -4005,7 +4005,7 @@ void SelectionManagerHolder::startDrag( OUString SelectionManagerHolder::getImplementationName() { - return OUString(XDND_IMPLEMENTATION_NAME); + return XDND_IMPLEMENTATION_NAME; } sal_Bool SelectionManagerHolder::supportsService( const OUString& ServiceName ) diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index 2d35d3dc96bb..7a97b0f65bf5 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -337,7 +337,7 @@ public: OUString VclGtkClipboard::getImplementationName() { - return OUString("com.sun.star.datatransfer.VclGtkClipboard"); + return "com.sun.star.datatransfer.VclGtkClipboard"; } Sequence< OUString > VclGtkClipboard::getSupportedServiceNames() @@ -730,7 +730,7 @@ GtkDropTarget::GtkDropTarget() OUString SAL_CALL GtkDropTarget::getImplementationName() { - return OUString("com.sun.star.datatransfer.dnd.VclGtkDropTarget"); + return "com.sun.star.datatransfer.dnd.VclGtkDropTarget"; } sal_Bool SAL_CALL GtkDropTarget::supportsService(OUString const & ServiceName) @@ -915,7 +915,7 @@ void GtkDragSource::initialize(const css::uno::Sequence<css::uno::Any >& rArgume OUString SAL_CALL GtkDragSource::getImplementationName() { - return OUString("com.sun.star.datatransfer.dnd.VclGtkDragSource"); + return "com.sun.star.datatransfer.dnd.VclGtkDragSource"; } sal_Bool SAL_CALL GtkDragSource::supportsService(OUString const & ServiceName) diff --git a/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker.cxx b/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker.cxx index adf9ea87d455..8fbd2fc5385b 100644 --- a/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker.cxx +++ b/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker.cxx @@ -435,10 +435,7 @@ void Gtk3KDE5FilePicker::disposing(const lang::EventObject& rEvent) } } -OUString SAL_CALL Gtk3KDE5FilePicker::getImplementationName() -{ - return OUString(FILE_PICKER_IMPL_NAME); -} +OUString SAL_CALL Gtk3KDE5FilePicker::getImplementationName() { return FILE_PICKER_IMPL_NAME; } sal_Bool SAL_CALL Gtk3KDE5FilePicker::supportsService(const OUString& ServiceName) { diff --git a/vcl/unx/kf5/KF5FilePicker.cxx b/vcl/unx/kf5/KF5FilePicker.cxx index 9ecbbb7d8feb..451824a12f13 100644 --- a/vcl/unx/kf5/KF5FilePicker.cxx +++ b/vcl/unx/kf5/KF5FilePicker.cxx @@ -175,7 +175,7 @@ void KF5FilePicker::addCustomControl(sal_Int16 controlId) // XServiceInfo OUString SAL_CALL KF5FilePicker::getImplementationName() { - return OUString("com.sun.star.ui.dialogs.KF5FilePicker"); + return "com.sun.star.ui.dialogs.KF5FilePicker"; } sal_Bool SAL_CALL KF5FilePicker::supportsService(const OUString& ServiceName) diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx index 01dc12f24460..f9d0fb965914 100644 --- a/vcl/workben/vcldemo.cxx +++ b/vcl/workben/vcldemo.cxx @@ -116,7 +116,7 @@ class DemoRenderer virtual sal_uInt16 getTestRepeatCount() = 0; #define RENDER_DETAILS(name,key,repeat) \ virtual OUString getName() override \ - { return OUString(SAL_STRINGIFY(name)); } \ + { return SAL_STRINGIFY(name); } \ virtual sal_uInt16 getAccelerator() override \ { return key; } \ virtual sal_uInt16 getTestRepeatCount() override \ |