You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by ar...@apache.org on 2011/12/29 05:34:22 UTC

svn commit: r1225428 - /incubator/ooo/trunk/main/sc/source/ui/unoobj/cellsuno.cxx

Author: arielch
Date: Thu Dec 29 04:34:21 2011
New Revision: 1225428

URL: http://svn.apache.org/viewvc?rev=1225428&view=rev
Log:
i118696 - i118697 - Fix some Sheet Tab Color API issues

Modified:
    incubator/ooo/trunk/main/sc/source/ui/unoobj/cellsuno.cxx

Modified: incubator/ooo/trunk/main/sc/source/ui/unoobj/cellsuno.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sc/source/ui/unoobj/cellsuno.cxx?rev=1225428&r1=1225427&r2=1225428&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sc/source/ui/unoobj/cellsuno.cxx (original)
+++ incubator/ooo/trunk/main/sc/source/ui/unoobj/cellsuno.cxx Thu Dec 29 04:34:21 2011
@@ -8543,11 +8543,12 @@ void ScTableSheetObj::SetOnePropertyValu
         }
         else if ( pEntry->nWID == SC_WID_UNO_TABCOLOR )
         {
-            sal_Int32 nColor = COL_AUTO;
-            if (aValue >>= nColor)
+            sal_Int32 nColor;
+            if ( aValue >>= nColor )
             {
-                if (static_cast<ColorData>(nColor) != COL_AUTO)
-                    pDoc->SetTabBgColor(nTab, Color(static_cast<ColorData>(nColor)));
+                const Color aColor( static_cast< ColorData >( nColor ) );
+                if ( pDoc->GetTabBgColor( nTab ) != aColor )
+                    aFunc.SetTabBgColor( nTab, aColor, sal_True, sal_True );
             }
         }
         else if ( pEntry->nWID == SC_WID_UNO_CODENAME )



Re: svn commit: r1225428 - /incubator/ooo/trunk/main/sc/source/ui/unoobj/cellsuno.cxx

Posted by Pavel Janík <Pa...@Janik.cz>.
>> sc/source/ui/unoobj/cellsuno.cxx:8546: warning: ‘nColor’ may be used uninitialized in this function
> 
> thanks for pointing this out.

Thanks for fixing.
-- 
Pavel Janík




Re: svn commit: r1225428 - /incubator/ooo/trunk/main/sc/source/ui/unoobj/cellsuno.cxx

Posted by Ariel Constenla-Haile <ar...@apache.org>.
Hi Pavel,

On Fri, Dec 30, 2011 at 05:36:31PM +0100, Pavel Janík wrote:
> 
> On Dec 29, 2011, at 5:34 AM, arielch@apache.org wrote:
> 
> > Author: arielch
> > Date: Thu Dec 29 04:34:21 2011
> > New Revision: 1225428
> > 
> > URL: http://svn.apache.org/viewvc?rev=1225428&view=rev
> > Log:
> > i118696 - i118697 - Fix some Sheet Tab Color API issues
> > 
> > Modified:
> >    incubator/ooo/trunk/main/sc/source/ui/unoobj/cellsuno.cxx
> > 
> > Modified: incubator/ooo/trunk/main/sc/source/ui/unoobj/cellsuno.cxx
> > URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sc/source/ui/unoobj/cellsuno.cxx?rev=1225428&r1=1225427&r2=1225428&view=diff
> > ==============================================================================
> > --- incubator/ooo/trunk/main/sc/source/ui/unoobj/cellsuno.cxx (original)
> > +++ incubator/ooo/trunk/main/sc/source/ui/unoobj/cellsuno.cxx Thu Dec 29 04:34:21 2011
> > @@ -8543,11 +8543,12 @@ void ScTableSheetObj::SetOnePropertyValu
> >         }
> >         else if ( pEntry->nWID == SC_WID_UNO_TABCOLOR )
> >         {
> > -            sal_Int32 nColor = COL_AUTO;

I have no idea why I changed that line...

> > -            if (aValue >>= nColor)
> > +            sal_Int32 nColor;
> > +            if ( aValue >>= nColor )
> 
> this changes is not WaE free on some compilers:
> 
> sc/source/ui/unoobj/cellsuno.cxx:8546: warning: ‘nColor’ may be used uninitialized in this function
 

thanks for pointing this out.


Regards
-- 
Ariel Constenla-Haile
La Plata, Argentina

Re: svn commit: r1225428 - /incubator/ooo/trunk/main/sc/source/ui/unoobj/cellsuno.cxx

Posted by Pavel Janík <Pa...@Janik.cz>.
On Dec 29, 2011, at 5:34 AM, arielch@apache.org wrote:

> Author: arielch
> Date: Thu Dec 29 04:34:21 2011
> New Revision: 1225428
> 
> URL: http://svn.apache.org/viewvc?rev=1225428&view=rev
> Log:
> i118696 - i118697 - Fix some Sheet Tab Color API issues
> 
> Modified:
>    incubator/ooo/trunk/main/sc/source/ui/unoobj/cellsuno.cxx
> 
> Modified: incubator/ooo/trunk/main/sc/source/ui/unoobj/cellsuno.cxx
> URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sc/source/ui/unoobj/cellsuno.cxx?rev=1225428&r1=1225427&r2=1225428&view=diff
> ==============================================================================
> --- incubator/ooo/trunk/main/sc/source/ui/unoobj/cellsuno.cxx (original)
> +++ incubator/ooo/trunk/main/sc/source/ui/unoobj/cellsuno.cxx Thu Dec 29 04:34:21 2011
> @@ -8543,11 +8543,12 @@ void ScTableSheetObj::SetOnePropertyValu
>         }
>         else if ( pEntry->nWID == SC_WID_UNO_TABCOLOR )
>         {
> -            sal_Int32 nColor = COL_AUTO;
> -            if (aValue >>= nColor)
> +            sal_Int32 nColor;
> +            if ( aValue >>= nColor )

this changes is not WaE free on some compilers:

sc/source/ui/unoobj/cellsuno.cxx:8546: warning: ‘nColor’ may be used uninitialized in this function

= 0 or something initializes it properly.
-- 
Pavel Janík