diff options
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/components/dtranscomp.cxx | 34 | ||||
-rw-r--r-- | vcl/source/components/fontident.cxx | 4 | ||||
-rw-r--r-- | vcl/source/control/field2.cxx | 10 |
3 files changed, 17 insertions, 31 deletions
diff --git a/vcl/source/components/dtranscomp.cxx b/vcl/source/components/dtranscomp.cxx index bbe623aee352..6dc83ff295d0 100644 --- a/vcl/source/components/dtranscomp.cxx +++ b/vcl/source/components/dtranscomp.cxx @@ -346,18 +346,13 @@ void GenericDragSource::initialize( const Sequence< Any >& ) throw( Exception, s Sequence< OUString > SAL_CALL DragSource_getSupportedServiceNames() { - #if defined UNX - OUString aServiceName( - #if ! defined MACOSX - "com.sun.star.datatransfer.dnd.X11DragSource" - #else - "com.sun.star.datatransfer.dnd.OleDragSource" - #endif - ); - return Sequence< OUString >(&aServiceName, 1); - #else +#if defined MACOSX + return Sequence< OUString > { "com.sun.star.datatransfer.dnd.OleDragSource" }; +#elif defined UNX + return Sequence< OUString > { "com.sun.star.datatransfer.dnd.X11DragSource" }; +#else return GenericDragSource::getSupportedServiceNames_static(); - #endif +#endif } OUString SAL_CALL DragSource_getImplementationName() @@ -470,18 +465,13 @@ void GenericDropTarget::setDefaultActions( sal_Int8) throw(std::exception) Sequence< OUString > SAL_CALL DropTarget_getSupportedServiceNames() { - #if defined UNX - OUString aServiceName( - #if ! defined MACOSX - "com.sun.star.datatransfer.dnd.X11DropTarget" - #else - "com.sun.star.datatransfer.dnd.OleDropTarget" - #endif - ); - return Sequence< OUString >(&aServiceName, 1); - #else +#if defined MACOSX + return Sequence< OUString > { "com.sun.star.datatransfer.dnd.OleDropTarget" }; +#elif defined UNX + return Sequence< OUString > { "com.sun.star.datatransfer.dnd.X11DropTarget" }; +#else return GenericDropTarget::getSupportedServiceNames_static(); - #endif +#endif } OUString SAL_CALL DropTarget_getImplementationName() diff --git a/vcl/source/components/fontident.cxx b/vcl/source/components/fontident.cxx index d80dd74f59fa..11066c63ae9e 100644 --- a/vcl/source/components/fontident.cxx +++ b/vcl/source/components/fontident.cxx @@ -154,9 +154,7 @@ Any SAL_CALL FontIdentificator::getMaterial() throw(RuntimeException, std::excep Sequence< OUString > FontIdentificator_getSupportedServiceNames() { - OUString aServiceName( "com.sun.star.awt.FontIdentificator" ); - Sequence< OUString > aServiceNames( &aServiceName, 1 ); - return aServiceNames; + return Sequence< OUString >{ "com.sun.star.awt.FontIdentificator" }; } OUString FontIdentificator_getImplementationName() diff --git a/vcl/source/control/field2.cxx b/vcl/source/control/field2.cxx index ddcd40c8f5ef..0c2644994e93 100644 --- a/vcl/source/control/field2.cxx +++ b/vcl/source/control/field2.cxx @@ -2125,15 +2125,13 @@ static bool ImplTimeGetValue( const OUString& rStr, tools::Time& rTime, return false; OUString aUpperCaseStr = aStr.toString().toAsciiUpperCase(); - OUString aAM(rLocaleDataWrapper.getTimeAM().toAsciiUpperCase()); - OUString aPM(rLocaleDataWrapper.getTimePM().toAsciiUpperCase()); - OUString aAM2("AM"); // aAM is localized - OUString aPM2("PM"); // aPM is localized + OUString aAMlocalised(rLocaleDataWrapper.getTimeAM().toAsciiUpperCase()); + OUString aPMlocalised(rLocaleDataWrapper.getTimePM().toAsciiUpperCase()); - if ( (nHour < 12) && ( ( aUpperCaseStr.indexOf( aPM ) >= 0 ) || ( aUpperCaseStr.indexOf( aPM2 ) >= 0 ) ) ) + if ( (nHour < 12) && ( ( aUpperCaseStr.indexOf( "PM" ) >= 0 ) || ( aUpperCaseStr.indexOf( aPMlocalised ) >= 0 ) ) ) nHour += 12; - if ( (nHour == 12) && ( ( aUpperCaseStr.indexOf( aAM ) >= 0 ) || ( aUpperCaseStr.indexOf( aAM2 ) >= 0 ) ) ) + if ( (nHour == 12) && ( ( aUpperCaseStr.indexOf( "AM" ) >= 0 ) || ( aUpperCaseStr.indexOf( aAMlocalised ) >= 0 ) ) ) nHour = 0; aTime = tools::Time( (sal_uInt16)nHour, (sal_uInt16)nMinute, (sal_uInt16)nSecond, |