[Libreoffice-commits] core.git: 3 commits - sd/source svx/source sw/source

Tor Lillqvist tml at collabora.com
Sun Mar 1 12:22:03 PST 2015


 sd/source/filter/eppt/epptso.cxx        |    4 ++--
 sd/source/filter/eppt/pptx-epptbase.cxx |    2 +-
 sd/source/filter/eppt/pptx-text.cxx     |   14 +++++++-------
 svx/source/tbxctrls/Palette.cxx         |    2 +-
 sw/source/core/docnode/nodedump.cxx     |    1 -
 5 files changed, 11 insertions(+), 12 deletions(-)

New commits:
commit 5594a09339f9468e9f57b3c1ac5f0134bfac3fe5
Author: Tor Lillqvist <tml at collabora.com>
Date:   Sun Mar 1 22:06:20 2015 +0200

    WaE: implicit conversion (IntegralToBoolean) of literal of type 'sal_Bool' ...
    
    ... (aka 'unsigned char') to 'bool'.
    
    Change-Id: I7b6ed29c750ad26925f4875c0a38cb800a9f693f

diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx
index ad85bc0..f4fae77 100644
--- a/sd/source/filter/eppt/epptso.cxx
+++ b/sd/source/filter/eppt/epptso.cxx
@@ -990,7 +990,7 @@ bool PPTWriter::ImplGetText()
     {
         mnTextSize = mXText->getString().getLength();
         ::com::sun::star::uno::Any aAny;
-        if ( GetPropertyValue( aAny, mXPropSet, OUString( "FontIndependentLineSpacing" ), sal_True ) )
+        if ( GetPropertyValue( aAny, mXPropSet, OUString( "FontIndependentLineSpacing" ), true ) )
             aAny >>= mbFontIndependentLineSpacing;
     }
     return ( mnTextSize != 0 );
@@ -3674,7 +3674,7 @@ void PPTWriter::ImplCreateTable( uno::Reference< drawing::XShape >& rXShape, Esc
                             mnTextSize = mXText->getString().getLength();
 
                             ::com::sun::star::uno::Any aAny;
-                            if ( GetPropertyValue( aAny, mXPropSet, OUString( "FontIndependentLineSpacing" ), sal_True ) )
+                            if ( GetPropertyValue( aAny, mXPropSet, OUString( "FontIndependentLineSpacing" ), true ) )
                                 aAny >>= mbFontIndependentLineSpacing;
 
                             EscherPropertyContainer aPropOptSp;
diff --git a/sd/source/filter/eppt/pptx-epptbase.cxx b/sd/source/filter/eppt/pptx-epptbase.cxx
index d97930d..a01f5c1 100644
--- a/sd/source/filter/eppt/pptx-epptbase.cxx
+++ b/sd/source/filter/eppt/pptx-epptbase.cxx
@@ -439,7 +439,7 @@ sal_Int32 PPTWriterBase::GetLayoutOffset( const ::com::sun::star::uno::Reference
 {
     ::com::sun::star::uno::Any aAny;
     sal_Int32 nLayout = 20;
-    if ( GetPropertyValue( aAny, rXPropSet, OUString( "Layout" ), sal_True ) )
+    if ( GetPropertyValue( aAny, rXPropSet, OUString( "Layout" ), true ) )
         aAny >>= nLayout;
 
     DBG(printf("GetLayoutOffset %" SAL_PRIdINT32 "\n", nLayout));
diff --git a/sd/source/filter/eppt/pptx-text.cxx b/sd/source/filter/eppt/pptx-text.cxx
index d906f81..361ee37 100644
--- a/sd/source/filter/eppt/pptx-text.cxx
+++ b/sd/source/filter/eppt/pptx-text.cxx
@@ -515,13 +515,13 @@ sal_uInt32 PortionObj::ImplGetTextField( ::com::sun::star::uno::Reference< ::com
                             OUString aFieldKind( aXTextField->getPresentation( sal_True ) );
                             if ( aFieldKind == "Date" )
                             {
-                                if ( GetPropertyValue( aAny, xFieldPropSet, OUString( "IsFix" ), sal_True ) )
+                                if ( GetPropertyValue( aAny, xFieldPropSet, OUString( "IsFix" ), true ) )
                                 {
                                     bool bBool = false;
                                     aAny >>= bBool;
                                     if ( !bBool )  // Fixed DateFields does not exist in PPT
                                     {
-                                        if ( GetPropertyValue( aAny, xFieldPropSet, OUString( "Format" ), sal_True ) )
+                                        if ( GetPropertyValue( aAny, xFieldPropSet, OUString( "Format" ), true ) )
                                         {
                                             nFormat = *(sal_Int32*)aAny.getValue();
                                             switch ( nFormat )
@@ -543,7 +543,7 @@ sal_uInt32 PortionObj::ImplGetTextField( ::com::sun::star::uno::Reference< ::com
                             }
                             else if ( aFieldKind == "URL" )
                             {
-                                if ( GetPropertyValue( aAny, xFieldPropSet, OUString( "URL" ), sal_True ) )
+                                if ( GetPropertyValue( aAny, xFieldPropSet, OUString( "URL" ), true ) )
                                     rURL = *(OUString*)aAny.getValue();
                                 nRetValue = 4 << 28;
                             }
@@ -557,13 +557,13 @@ sal_uInt32 PortionObj::ImplGetTextField( ::com::sun::star::uno::Reference< ::com
                             }
                             else if ( aFieldKind == "Time" )
                             {
-                                if ( GetPropertyValue( aAny, xFieldPropSet, OUString( "IsFix" ), sal_True ) )
+                                if ( GetPropertyValue( aAny, xFieldPropSet, OUString( "IsFix" ), true ) )
                                 {
                                     bool bBool = false;
                                     aAny >>= bBool;
                                     if ( !bBool )
                                     {
-                                        if ( GetPropertyValue( aAny, xFieldPropSet, OUString( "IsFix" ), sal_True ) )
+                                        if ( GetPropertyValue( aAny, xFieldPropSet, OUString( "IsFix" ), true ) )
                                         {
                                             nFormat = *(sal_Int32*)aAny.getValue();
                                             nRetValue |= ( ( ( 2 << 4 ) | nFormat ) << 24 ) | 0x800000;
@@ -581,13 +581,13 @@ sal_uInt32 PortionObj::ImplGetTextField( ::com::sun::star::uno::Reference< ::com
                             }
                             else if ( aFieldKind == "ExtTime" )
                             {
-                                if ( GetPropertyValue( aAny, xFieldPropSet, OUString( "IsFix" ), sal_True ) )
+                                if ( GetPropertyValue( aAny, xFieldPropSet, OUString( "IsFix" ), true ) )
                                 {
                                     bool bBool = false;
                                     aAny >>= bBool;
                                     if ( !bBool )
                                     {
-                                        if ( GetPropertyValue( aAny, xFieldPropSet, OUString( "Format" ), sal_True ) )
+                                        if ( GetPropertyValue( aAny, xFieldPropSet, OUString( "Format" ), true ) )
                                         {
                                             nFormat = *(sal_Int32*)aAny.getValue();
                                             switch ( nFormat )
commit 59b83de4ee0c1ba0a842ca36e3fa253fcf3cdf22
Author: Tor Lillqvist <tml at collabora.com>
Date:   Sun Mar 1 21:37:51 2015 +0200

    WaE: Unreferenced function definition
    
    Change-Id: I027e901ebdd21a96228f30c766792338f4ca385e

diff --git a/sw/source/core/docnode/nodedump.cxx b/sw/source/core/docnode/nodedump.cxx
index fa66e90..01d76ca 100644
--- a/sw/source/core/docnode/nodedump.cxx
+++ b/sw/source/core/docnode/nodedump.cxx
@@ -39,7 +39,6 @@ class WriterHelper
 public:
     WriterHelper( xmlTextWriterPtr );
     ~WriterHelper();
-    operator xmlTextWriterPtr() { return writer;}
     void startElement( const char* element );
     void endElement();
     void writeFormatAttribute( const char* attribute, const char* format, ... )
commit 31d322aa8a57c828dcd339ec6b7b6b63138984a4
Author: Tor Lillqvist <tml at collabora.com>
Date:   Sun Mar 1 21:12:29 2015 +0200

    WaE: rewrite call of rtl::OUString::operator= with empty string constant ...
    
    ... argument as call of rtl::OUString::clear.
    
    Change-Id: I3877a7034edc2cff0509c8a57170228fa1c68685

diff --git a/svx/source/tbxctrls/Palette.cxx b/svx/source/tbxctrls/Palette.cxx
index e960fbd..b968dc5 100644
--- a/svx/source/tbxctrls/Palette.cxx
+++ b/svx/source/tbxctrls/Palette.cxx
@@ -114,7 +114,7 @@ void PaletteASE::LoadPalette()
             maName = aName;
             // Is there color data? (shouldn't happen in a start block, but check anyway)
             if (nChunkSize > ((nChars * 2) + 2))
-                aName = "";
+                aName.clear();
             else
                 continue;
         }


More information about the Libreoffice-commits mailing list