[Libreoffice-commits] core.git: include/tools rsc/inc rsc/source tools/source

Caolán McNamara caolanm at redhat.com
Thu Oct 6 15:16:56 UTC 2016


 include/tools/color.hxx        |    3 ---
 include/tools/rc.h             |    3 ---
 rsc/inc/rscdb.hxx              |    1 -
 rsc/source/parser/rscicpx.cxx  |   24 ------------------------
 tools/source/generic/color.cxx |   29 -----------------------------
 5 files changed, 60 deletions(-)

New commits:
commit 8e61b0150b9d62d8ffd40089f69f49055187c998
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Oct 6 15:34:05 2016 +0100

    drop loading Colors from src files
    
    Change-Id: I43f2fda133371a1284a53beeeb774552210c7e3f

diff --git a/include/tools/color.hxx b/include/tools/color.hxx
index 659da71..3b7cd38 100644
--- a/include/tools/color.hxx
+++ b/include/tools/color.hxx
@@ -23,7 +23,6 @@
 #include <tools/colordata.hxx>
 
 class SvStream;
-class ResId;
 
 #include <basegfx/color/bcolor.hxx>
 
@@ -47,8 +46,6 @@ public:
     Color(sal_uInt8 nTransparency, sal_uInt8 nRed, sal_uInt8 nGreen, sal_uInt8 nBlue)
         : mnColor(TRGB_COLORDATA(nTransparency, nRed, nGreen, nBlue))
     {}
-    // This ctor is defined in svtools, not tools!
-    Color(const ResId& rResId);
 
     // constructor to create a tools-Color from ::basegfx::BColor
     explicit Color(const basegfx::BColor& rBColor)
diff --git a/include/tools/rc.h b/include/tools/rc.h
index fefaede..e213e6f 100644
--- a/include/tools/rc.h
+++ b/include/tools/rc.h
@@ -153,9 +153,6 @@ namespace o3tl {
     template<> struct typed_flags<RscImageListFlags> : is_typed_flags<RscImageListFlags, 0x18> {};
 }
 
-// FIXME obsolete, should be removed by MM
-#define RSC_COLOR                       (RSC_NOTYPE + 0x16)
-
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/rsc/inc/rscdb.hxx b/rsc/inc/rscdb.hxx
index 3e80b39..4f507f4 100644
--- a/rsc/inc/rscdb.hxx
+++ b/rsc/inc/rscdb.hxx
@@ -176,7 +176,6 @@ class RscTypCont
     RscTop *    InitClassMgr();
     RscTop *    InitClassString( RscTop * pSuper );
     RscTop *    InitClassBitmap( RscTop * pSuper );
-    RscTop *    InitClassColor( RscTop * pSuper, RscEnum * pColor );
     RscTop *    InitClassImage( RscTop * pSuper, RscTop *pClassBitmap );
     RscTop *    InitClassImageList( RscTop * pSuper, RscCont * pStrLst );
     RscTop *    InitClassWindow( RscTop * pSuper, RscEnum * pMapUnit,
diff --git a/rsc/source/parser/rscicpx.cxx b/rsc/source/parser/rscicpx.cxx
index e67747c..e757a7b 100644
--- a/rsc/source/parser/rscicpx.cxx
+++ b/rsc/source/parser/rscicpx.cxx
@@ -114,30 +114,6 @@ RscTop * RscTypCont::InitClassBitmap( RscTop * pSuper )
     return pClassBitmap;
 }
 
-RscTop * RscTypCont::InitClassColor( RscTop * pSuper, RscEnum * pColor )
-{
-    Atom        nId;
-    RscTop *    pClassColor;
-
-    // initialize class
-    nId = pHS->getID( "Color" );
-    pClassColor = new RscClass( nId, RSC_COLOR, pSuper );
-    pClassColor->SetCallPar( *pStdPar1, *pStdPar2, *pStdParType );
-    aNmTb.Put( nId, CLASSNAME, pClassColor );
-
-    // initialize variables
-    nId = aNmTb.Put( "Red", VARNAME );
-    pClassColor->SetVariable( nId, &aUShort );
-    nId = aNmTb.Put( "Green", VARNAME );
-    pClassColor->SetVariable( nId, &aUShort );
-    nId = aNmTb.Put( "Blue", VARNAME );
-    pClassColor->SetVariable( nId, &aUShort );
-    nId = aNmTb.Put( "Predefine", VARNAME );
-    pClassColor->SetVariable( nId, pColor );
-
-    return pClassColor;
-}
-
 RscTop * RscTypCont::InitClassImage( RscTop * pSuper, RscTop * pClassBitmap )
 {
     Atom        nId;
diff --git a/tools/source/generic/color.cxx b/tools/source/generic/color.cxx
index c5a14c5..2c59bc4 100644
--- a/tools/source/generic/color.cxx
+++ b/tools/source/generic/color.cxx
@@ -26,38 +26,9 @@
 #include <tools/color.hxx>
 #include <tools/debug.hxx>
 #include <tools/stream.hxx>
-#include <tools/rc.hxx>
-#include <tools/rcid.h>
-#include <tools/resid.hxx>
-#include <tools/rc.h>
 #include <tools/helpers.hxx>
 #include <basegfx/color/bcolortools.hxx>
 
-Color::Color( const ResId& rResId )
-{
-    rResId.SetRT( RSC_COLOR );
-    ResMgr* pResMgr = rResId.GetResMgr();
-    if ( pResMgr && pResMgr->GetResource( rResId ) )
-    {
-        // Header ueberspringen
-        pResMgr->Increment( sizeof( RSHEADER_TYPE ) );
-
-        // Daten laden
-        sal_uInt16 nRed     = pResMgr->ReadShort();
-        sal_uInt16 nGreen   = pResMgr->ReadShort();
-        sal_uInt16 nBlue    = pResMgr->ReadShort();
-        // one more historical sal_uIntPtr
-        pResMgr->ReadLong();
-
-        // RGB-Farbe
-        mnColor = RGB_COLORDATA( nRed>>8, nGreen>>8, nBlue>>8 );
-    }
-    else
-    {
-        mnColor = RGB_COLORDATA( 0, 0, 0 );
-    }
-}
-
 sal_uInt8 Color::GetColorError( const Color& rCompareColor ) const
 {
     const long nErrAbs = labs( (long) rCompareColor.GetRed() - GetRed() ) +


More information about the Libreoffice-commits mailing list