[Libreoffice-commits] core.git: 9 commits - basctl/source include/toolkit include/tools include/vcl rsc/inc rsc/source toolkit/source vcl/source

Caolán McNamara caolanm at redhat.com
Thu Nov 24 14:56:51 UTC 2016


 basctl/source/basicide/basidesh.src |    2 
 include/toolkit/awt/vclxmenu.hxx    |    1 
 include/tools/rc.h                  |    3 
 include/vcl/menu.hxx                |    4 -
 rsc/inc/rscdb.hxx                   |   13 ---
 rsc/inc/rscdef.hxx                  |   17 ++--
 rsc/inc/rscrange.hxx                |   10 --
 rsc/source/parser/rscdb.cxx         |    5 -
 rsc/source/parser/rscibas.cxx       |  130 ------------------------------------
 rsc/source/parser/rscicpx.cxx       |    3 
 rsc/source/parser/rscinit.cxx       |   30 --------
 rsc/source/res/rscrange.cxx         |   28 -------
 toolkit/source/awt/vclxmenu.cxx     |    9 +-
 vcl/source/window/menu.cxx          |    4 -
 14 files changed, 16 insertions(+), 243 deletions(-)

New commits:
commit d04a05a7d4692dcb3083d1089a3f4e78fb07bcbf
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Nov 24 13:35:44 2016 +0000

    ditch a pile of other unused rsc stuff
    
    Change-Id: Id982a8898241b20db11b43c18ae2c062c92c61fc

diff --git a/rsc/inc/rscdb.hxx b/rsc/inc/rscdb.hxx
index ad9da6c..11e369b 100644
--- a/rsc/inc/rscdb.hxx
+++ b/rsc/inc/rscdb.hxx
@@ -85,15 +85,8 @@ class RscTypCont
     inline void SETCONST( RscConst *p1, Atom p2, MenuItemBits p3 ) { SETCONST(p1, p2, static_cast<sal_uInt32>(p3)); }
     inline void SETCONST( RscConst *p1, const char * p2, MapUnit p3 ) { SETCONST(p1, p2, static_cast<sal_uInt16>(p3)); }
     RscEnum *   InitFieldUnitsType();
-    RscEnum *   InitColor();
-    RscEnum *   InitMapUnit();
     RscEnum *   InitKey();
-    RscEnum *   InitTriState();
-    RscCont  *  InitStringList();
-    RscArray *  InitLangStringList( RscCont * pStrLst );
-    RscTupel *  InitStringTupel();
     RscTupel *  InitStringLongTupel();
-    static RscCont  *  InitStringTupelList( RscTupel * pStringTupel );
     static RscCont  *  InitStringLongTupelList( RscTupel * pStringLongTupel );
     RscArray *  InitLangStringLongTupelList( RscCont * pStrLongTupelLst );
 
diff --git a/rsc/source/parser/rscibas.cxx b/rsc/source/parser/rscibas.cxx
index 1d344a6..c21b852 100644
--- a/rsc/source/parser/rscibas.cxx
+++ b/rsc/source/parser/rscibas.cxx
@@ -193,52 +193,6 @@ RscEnum * RscTypCont::InitFieldUnitsType()
     return pFieldUnits;
 }
 
-RscEnum * RscTypCont::InitColor()
-{
-    RscEnum * pColor;
-    pColor = new RscEnum( pHS->getID( "EnumColor" ), RSC_NOTYPE );
-
-    SETCONST( pColor, "COL_BLACK",                  COL_BLACK );
-    SETCONST( pColor, "COL_BLUE",                   COL_BLUE );
-    SETCONST( pColor, "COL_GREEN",                  COL_GREEN );
-    SETCONST( pColor, "COL_CYAN",                   COL_CYAN );
-    SETCONST( pColor, "COL_RED",                    COL_RED );
-    SETCONST( pColor, "COL_MAGENTA",                COL_MAGENTA );
-    SETCONST( pColor, "COL_BROWN",                  COL_BROWN );
-    SETCONST( pColor, "COL_GRAY",                   COL_GRAY );
-    SETCONST( pColor, "COL_LIGHTGRAY",              COL_LIGHTGRAY );
-    SETCONST( pColor, "COL_LIGHTBLUE",              COL_LIGHTBLUE );
-    SETCONST( pColor, "COL_LIGHTGREEN",             COL_LIGHTGREEN );
-    SETCONST( pColor, "COL_LIGHTCYAN",              COL_LIGHTCYAN );
-    SETCONST( pColor, "COL_LIGHTRED",               COL_LIGHTRED );
-    SETCONST( pColor, "COL_LIGHTMAGENTA",           COL_LIGHTMAGENTA );
-    SETCONST( pColor, "COL_YELLOW",                 COL_YELLOW );
-    SETCONST( pColor, "COL_WHITE",                  COL_WHITE );
-
-    return pColor;
-}
-
-RscEnum * RscTypCont::InitMapUnit()
-{
-    RscEnum * pMapUnit;
-    pMapUnit = new RscEnum( pHS->getID( "EnumMapUnit" ), RSC_NOTYPE );
-
-    SETCONST( pMapUnit, "MAP_PIXEL",                  MapUnit::MapPixel );
-    SETCONST( pMapUnit, "MAP_SYSFONT",                MapUnit::MapSysFont );
-    SETCONST( pMapUnit, "MAP_100TH_MM",               MapUnit::Map100thMM );
-    SETCONST( pMapUnit, "MAP_10TH_MM",                MapUnit::Map10thMM );
-    SETCONST( pMapUnit, "MAP_MM",                     MapUnit::MapMM );
-    SETCONST( pMapUnit, "MAP_CM",                     MapUnit::MapCM );
-    SETCONST( pMapUnit, "MAP_1000TH_INCH",            MapUnit::Map1000thInch );
-    SETCONST( pMapUnit, "MAP_100TH_INCH",             MapUnit::Map100thInch );
-    SETCONST( pMapUnit, "MAP_10TH_INCH",              MapUnit::Map10thInch );
-    SETCONST( pMapUnit, "MAP_INCH",                   MapUnit::MapInch );
-    SETCONST( pMapUnit, "MAP_POINT",                  MapUnit::MapPoint );
-    SETCONST( pMapUnit, "MAP_TWIP",                   MapUnit::MapTwip );
-    SETCONST( pMapUnit, "MAP_APPFONT",                MapUnit::MapAppFont );
-    return pMapUnit;
-}
-
 RscEnum * RscTypCont::InitKey()
 {
     RscEnum * pKey;
@@ -355,49 +309,6 @@ RscEnum * RscTypCont::InitKey()
     return pKey;
 }
 
-RscEnum * RscTypCont::InitTriState()
-{
-    RscEnum * pTriState;
-    pTriState = new RscEnum( pHS->getID( "EnumTriState" ), RSC_NOTYPE );
-
-    SETCONST( pTriState, "STATE_NOCHECK",      TRISTATE_FALSE  );
-    SETCONST( pTriState, "STATE_CHECK",        TRISTATE_TRUE    );
-    SETCONST( pTriState, "STATE_DONTKNOW",     TRISTATE_INDET );
-
-    return pTriState;
-}
-
-RscCont * RscTypCont::InitStringList()
-{
-    RscCont * pCont;
-
-    pCont = new RscCont( pHS->getID( "Chars[]" ), RSC_NOTYPE );
-    pCont->SetTypeClass( &aString );
-
-    return pCont;
-}
-
-RscArray * RscTypCont::InitLangStringList( RscCont * pStrLst )
-{
-    return new RscArray( pHS->getID( "Lang_CharsList" ),
-                         RSC_NOTYPE, pStrLst, &aLangType );
-}
-
-RscTupel * RscTypCont::InitStringTupel()
-{
-    RscTop *    pTupel;
-    Atom        nId;
-
-    // Clientvariablen einfuegen
-    pTupel = new RscTupel( pHS->getID( "CharsTupel" ), RSC_NOTYPE );
-    nId = aNmTb.Put( "FILTER", VARNAME );
-    pTupel->SetVariable( nId, &aString );
-    nId = aNmTb.Put( "MASK", VARNAME );
-    pTupel->SetVariable( nId, &aString );
-
-    return static_cast<RscTupel *>(pTupel);
-}
-
 RscTupel * RscTypCont::InitStringLongTupel()
 {
     RscTop *    pTupel;
@@ -413,16 +324,6 @@ RscTupel * RscTypCont::InitStringLongTupel()
     return static_cast<RscTupel *>(pTupel);
 }
 
-RscCont * RscTypCont::InitStringTupelList( RscTupel * pTupelString )
-{
-    RscCont * pCont;
-
-    pCont = new RscCont( pHS->getID( "CharsCharsTupel[]" ), RSC_NOTYPE );
-    pCont->SetTypeClass( pTupelString );
-
-    return pCont;
-}
-
 RscCont * RscTypCont::InitStringLongTupelList( RscTupel * pStringLong )
 {
     RscCont * pCont;
diff --git a/rsc/source/parser/rscinit.cxx b/rsc/source/parser/rscinit.cxx
index c4cb369..13b8859 100644
--- a/rsc/source/parser/rscinit.cxx
+++ b/rsc/source/parser/rscinit.cxx
@@ -40,16 +40,8 @@
 
 void RscTypCont::Init()
 {
-    RscEnum *   pFieldUnits;
-    RscEnum *   pColor;
-    RscEnum *   pMapUnit;
     RscEnum *   pKey;
-    RscEnum *   pTriState;
-    RscCont  *  pStringList;
-    RscArray *  pLangStringList;
-    RscTupel *  pStringTupel;
     RscTupel *  pStringLongTupel;
-    RscCont  *  pStringTupelList;
     RscCont  *  pStringLongTupelList;
     RscArray *  pLangStringLongTupelList;
 
@@ -91,16 +83,9 @@ void RscTypCont::Init()
 }
 {
     aLangType.Init( aNmTb );
-    aBaseLst.push_back( pFieldUnits      = InitFieldUnitsType() );
-    aBaseLst.push_back( pColor           = InitColor() );
-    aBaseLst.push_back( pMapUnit         = InitMapUnit() );
+    aBaseLst.push_back( InitFieldUnitsType() );
     aBaseLst.push_back( pKey             = InitKey() );
-    aBaseLst.push_back( pTriState        = InitTriState() );
 
-    aBaseLst.push_back( pStringList      = InitStringList() );
-    aBaseLst.push_back( pLangStringList  = InitLangStringList( pStringList ) );
-    aBaseLst.push_back( pStringTupel     = InitStringTupel() );
-    aBaseLst.push_back( pStringTupelList = InitStringTupelList( pStringTupel ) );
     aBaseLst.push_back( pStringLongTupel = InitStringLongTupel() );
     aBaseLst.push_back( pStringLongTupelList = InitStringLongTupelList( pStringLongTupel ) );
     aBaseLst.push_back( pLangStringLongTupelList = InitLangStringLongTupelList( pStringLongTupelList ) );
commit 427e6996bd042af61fd04aae6381c2958d2fda70
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Nov 24 13:27:07 2016 +0000

    can drop InitLangStringTupelList
    
    Change-Id: I2469392a5874b55a071c5f31d467c6f33b03887b

diff --git a/rsc/inc/rscdb.hxx b/rsc/inc/rscdb.hxx
index b6effc2..ad9da6c 100644
--- a/rsc/inc/rscdb.hxx
+++ b/rsc/inc/rscdb.hxx
@@ -95,7 +95,6 @@ class RscTypCont
     RscTupel *  InitStringLongTupel();
     static RscCont  *  InitStringTupelList( RscTupel * pStringTupel );
     static RscCont  *  InitStringLongTupelList( RscTupel * pStringLongTupel );
-    RscArray *  InitLangStringTupelList( RscCont * pStrTupelLst );
     RscArray *  InitLangStringLongTupelList( RscCont * pStrLongTupelLst );
 
     RscTop *    InitClassMgr();
diff --git a/rsc/source/parser/rscibas.cxx b/rsc/source/parser/rscibas.cxx
index 4860da4..1d344a6 100644
--- a/rsc/source/parser/rscibas.cxx
+++ b/rsc/source/parser/rscibas.cxx
@@ -433,12 +433,6 @@ RscCont * RscTypCont::InitStringLongTupelList( RscTupel * pStringLong )
     return pCont;
 }
 
-RscArray * RscTypCont::InitLangStringTupelList( RscCont * pStrTupelLst )
-{
-    return new RscArray( pHS->getID( "Lang_CharsCharsTupel" ),
-                         RSC_NOTYPE, pStrTupelLst, &aLangType );
-}
-
 RscArray * RscTypCont::InitLangStringLongTupelList( RscCont * pStrLongTupelLst )
 {
     return new RscArray( pHS->getID( "Lang_CharsLongTupelList" ),
diff --git a/rsc/source/parser/rscinit.cxx b/rsc/source/parser/rscinit.cxx
index 71a07aa..c4cb369 100644
--- a/rsc/source/parser/rscinit.cxx
+++ b/rsc/source/parser/rscinit.cxx
@@ -101,7 +101,6 @@ void RscTypCont::Init()
     aBaseLst.push_back( pLangStringList  = InitLangStringList( pStringList ) );
     aBaseLst.push_back( pStringTupel     = InitStringTupel() );
     aBaseLst.push_back( pStringTupelList = InitStringTupelList( pStringTupel ) );
-    aBaseLst.push_back( InitLangStringTupelList( pStringTupelList ) );
     aBaseLst.push_back( pStringLongTupel = InitStringLongTupel() );
     aBaseLst.push_back( pStringLongTupelList = InitStringLongTupelList( pStringLongTupel ) );
     aBaseLst.push_back( pLangStringLongTupelList = InitLangStringLongTupelList( pStringLongTupelList ) );
commit 936ed583e648a762b7e485c15d08aa380505c4e5
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Nov 24 13:24:34 2016 +0000

    these geometry things go nowhere now
    
    Change-Id: If98ca8acccececeff2b335f90d3ef6082f2053d0

diff --git a/rsc/inc/rscdb.hxx b/rsc/inc/rscdb.hxx
index 580aaca..b6effc2 100644
--- a/rsc/inc/rscdb.hxx
+++ b/rsc/inc/rscdb.hxx
@@ -89,8 +89,6 @@ class RscTypCont
     RscEnum *   InitMapUnit();
     RscEnum *   InitKey();
     RscEnum *   InitTriState();
-    RscTupel *  InitGeometry();
-    RscArray *  InitLangGeometry( RscTupel * pGeo );
     RscCont  *  InitStringList();
     RscArray *  InitLangStringList( RscCont * pStrLst );
     RscTupel *  InitStringTupel();
diff --git a/rsc/source/parser/rscibas.cxx b/rsc/source/parser/rscibas.cxx
index d632ebd..4860da4 100644
--- a/rsc/source/parser/rscibas.cxx
+++ b/rsc/source/parser/rscibas.cxx
@@ -367,31 +367,6 @@ RscEnum * RscTypCont::InitTriState()
     return pTriState;
 }
 
-RscTupel * RscTypCont::InitGeometry()
-{
-    RscTop *    pTupel;
-    Atom        nId;
-
-    // Clientvariablen einfuegen
-    pTupel = new RscTupel( pHS->getID( "TupelDeltaSystem" ),
-                                RSC_NOTYPE );
-    nId = aNmTb.Put( "X", VARNAME );
-    pTupel->SetVariable( nId, &aShort );
-    nId = aNmTb.Put( "Y", VARNAME );
-    pTupel->SetVariable( nId, &aShort );
-    nId = aNmTb.Put( "WIDTH", VARNAME );
-    pTupel->SetVariable( nId, &aShort );
-    nId = aNmTb.Put( "HEIGHT", VARNAME );
-    pTupel->SetVariable( nId, &aShort );
-
-    return static_cast<RscTupel *>(pTupel);
-}
-
-RscArray * RscTypCont::InitLangGeometry( RscTupel * pGeo )
-{
-    return new RscArray( pHS->getID( "Lang_TupelGeometry" ), RSC_NOTYPE, pGeo, &aLangType );
-}
-
 RscCont * RscTypCont::InitStringList()
 {
     RscCont * pCont;
diff --git a/rsc/source/parser/rscinit.cxx b/rsc/source/parser/rscinit.cxx
index fedf028..71a07aa 100644
--- a/rsc/source/parser/rscinit.cxx
+++ b/rsc/source/parser/rscinit.cxx
@@ -45,8 +45,6 @@ void RscTypCont::Init()
     RscEnum *   pMapUnit;
     RscEnum *   pKey;
     RscEnum *   pTriState;
-    RscTupel *  pGeometry;
-    RscArray *  pLangGeometry;
     RscCont  *  pStringList;
     RscArray *  pLangStringList;
     RscTupel *  pStringTupel;
@@ -99,8 +97,6 @@ void RscTypCont::Init()
     aBaseLst.push_back( pKey             = InitKey() );
     aBaseLst.push_back( pTriState        = InitTriState() );
 
-    aBaseLst.push_back( pGeometry        = InitGeometry() );
-    aBaseLst.push_back( pLangGeometry    = InitLangGeometry( pGeometry ) );
     aBaseLst.push_back( pStringList      = InitStringList() );
     aBaseLst.push_back( pLangStringList  = InitLangStringList( pStringList ) );
     aBaseLst.push_back( pStringTupel     = InitStringTupel() );
commit 5dc62f7129af6f1517448cd26c507c09efe5f026
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Nov 24 13:21:03 2016 +0000

    aLong unused
    
    Change-Id: I46a714d06df5ac6496e13834a1c9641dc2bf599b

diff --git a/rsc/inc/rscdb.hxx b/rsc/inc/rscdb.hxx
index 91dc17e..580aaca 100644
--- a/rsc/inc/rscdb.hxx
+++ b/rsc/inc/rscdb.hxx
@@ -113,7 +113,6 @@ public:
     RscBool             aBool;
     RscRange            aShort;
     RscRange            aUShort;
-    RscLongRange        aLong;
     RscLongEnumRange    aEnumLong;
     RscIdRange          aIdUShort;
     RscIdRange          aIdNoZeroUShort;
diff --git a/rsc/source/parser/rscdb.cxx b/rsc/source/parser/rscdb.cxx
index ce566cc..e7da28e 100644
--- a/rsc/source/parser/rscdb.cxx
+++ b/rsc/source/parser/rscdb.cxx
@@ -48,7 +48,6 @@ RscTypCont::RscTypCont( RscError * pErrHdl,
     , aBool( pHS->getID( "sal_Bool" ), RSC_NOTYPE )
     , aShort( pHS->getID( "short" ), RSC_NOTYPE )
     , aUShort( pHS->getID( "sal_uInt16" ), RSC_NOTYPE )
-    , aLong( pHS->getID( "long" ), RSC_NOTYPE )
     , aEnumLong( pHS->getID( "enum_long" ), RSC_NOTYPE )
     , aIdUShort( pHS->getID( "IDUSHORT" ), RSC_NOTYPE )
     , aIdNoZeroUShort( pHS->getID( "IDUSHORT" ), RSC_NOTYPE )
diff --git a/rsc/source/parser/rscinit.cxx b/rsc/source/parser/rscinit.cxx
index 8af3505..fedf028 100644
--- a/rsc/source/parser/rscinit.cxx
+++ b/rsc/source/parser/rscinit.cxx
@@ -85,7 +85,6 @@ void RscTypCont::Init()
 
     aUShort.SetRange( 0, 0xFFFF );
 
-    aLong.SetRange( SAL_MIN_INT32, SAL_MAX_INT32 );
     aEnumLong.SetRange( SAL_MIN_INT32, SAL_MAX_INT32 );
 
     aIdUShort.SetRange( 0, 0xFFFF );
commit b870c1c4d7f3598265ab50b70665b858fc73defc
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Nov 24 13:20:13 2016 +0000

    fix indent
    
    Change-Id: Ia3a7d5873815b5b7480b22fb4b3d7f41634c6257

diff --git a/rsc/inc/rscdef.hxx b/rsc/inc/rscdef.hxx
index a4f7708..2a21818 100644
--- a/rsc/inc/rscdef.hxx
+++ b/rsc/inc/rscdef.hxx
@@ -58,16 +58,15 @@ public:
     bool IsDefinition()const { return( RSCEXP_DEF      == cType ); }
     bool IsNothing()   const { return( RSCEXP_NOTHING  == cType ); }
     void SetLong( sal_Int32 lValue )
-             {
-                 aExp.aLong.nHi = (short)(lValue >> 16);
-                 aExp.aLong.nLo = (unsigned short)lValue;
-                 cType = RSCEXP_LONG;
-             }
+    {
+        aExp.aLong.nHi = (short)(lValue >> 16);
+        aExp.aLong.nLo = (unsigned short)lValue;
+        cType = RSCEXP_LONG;
+    }
     sal_Int32 GetLong() const
-                  {
-                      return aExp.aLong.nLo |
-                          ((sal_uInt32)aExp.aLong.nHi << 16);
-                  }
+    {
+        return aExp.aLong.nLo | ((sal_uInt32)aExp.aLong.nHi << 16);
+    }
     bool Evaluate( sal_Int32 * pValue ) const;
     void AppendMacro( OStringBuffer & ) const;
 };
commit 1cb07ff1c6c1fe7e81f2edcab1f4a1cd515c24b4
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Nov 24 13:18:38 2016 +0000

    aIdLong is unused
    
    Change-Id: If9aaadadc144d40cdc43e51e1f44edb5f8574524

diff --git a/rsc/inc/rscdb.hxx b/rsc/inc/rscdb.hxx
index 633f9fb..91dc17e 100644
--- a/rsc/inc/rscdb.hxx
+++ b/rsc/inc/rscdb.hxx
@@ -117,7 +117,6 @@ public:
     RscLongEnumRange    aEnumLong;
     RscIdRange          aIdUShort;
     RscIdRange          aIdNoZeroUShort;
-    RscIdRange          aIdLong;
     RscString           aString;
     RscString           aStringLiteral;
     RscLangEnum         aLangType;
diff --git a/rsc/source/parser/rscdb.cxx b/rsc/source/parser/rscdb.cxx
index 94a5bc1..ce566cc 100644
--- a/rsc/source/parser/rscdb.cxx
+++ b/rsc/source/parser/rscdb.cxx
@@ -52,7 +52,6 @@ RscTypCont::RscTypCont( RscError * pErrHdl,
     , aEnumLong( pHS->getID( "enum_long" ), RSC_NOTYPE )
     , aIdUShort( pHS->getID( "IDUSHORT" ), RSC_NOTYPE )
     , aIdNoZeroUShort( pHS->getID( "IDUSHORT" ), RSC_NOTYPE )
-    , aIdLong( pHS->getID( "IDLONG" ), RSC_NOTYPE )
     , aString( pHS->getID( "Chars" ), RSC_NOTYPE )
     , aStringLiteral( pHS->getID( "Chars" ), RSC_NOTYPE )
     , aLangType()
@@ -180,7 +179,6 @@ RscTypCont::~RscTypCont()
     aUShort.Pre_dtor();
     aIdUShort.Pre_dtor();
     aIdNoZeroUShort.Pre_dtor();
-    aIdLong.Pre_dtor();
     aString.Pre_dtor();
     aVersion.pClass->Pre_dtor();
     // sub-types
diff --git a/rsc/source/parser/rscinit.cxx b/rsc/source/parser/rscinit.cxx
index 029cb4d..8af3505 100644
--- a/rsc/source/parser/rscinit.cxx
+++ b/rsc/source/parser/rscinit.cxx
@@ -91,8 +91,6 @@ void RscTypCont::Init()
     aIdUShort.SetRange( 0, 0xFFFF );
 
     aIdNoZeroUShort.SetRange( 1, 0xFFFF );
-
-    aIdLong.SetRange( SAL_MIN_INT32, SAL_MAX_INT32 );
 }
 {
     aLangType.Init( aNmTb );
commit f599904124518ebcfe6671b0b2961eb290d96c94
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Nov 24 13:16:09 2016 +0000

    RscBreakRange is unused
    
    Change-Id: I80c779f99f530b8ea0f9fd5e255241f0a565eec4

diff --git a/rsc/inc/rscrange.hxx b/rsc/inc/rscrange.hxx
index aee604b..f1fc92a 100644
--- a/rsc/inc/rscrange.hxx
+++ b/rsc/inc/rscrange.hxx
@@ -167,16 +167,6 @@ public:
                               RscTypCont * pTC, sal_uInt32 nTab, const char * ) override;
 };
 
-class RscBreakRange : public RscRange
-{
-    sal_Int32        nOutRange;
-public:
-                    RscBreakRange( Atom nId, sal_uInt32 nTypId );
-    void            SetOutRange( sal_Int32 nNumber ) { nOutRange = nNumber; }
-    RSCINST         Create( RSCINST * pInst, const RSCINST & rDfltInst, bool bOwnClass = false ) override;
-    ERRTYPE         SetNumber( const RSCINST &, sal_Int32 ) override;
-};
-
 #endif // INCLUDED_RSC_INC_RSCRANGE_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/rsc/source/res/rscrange.cxx b/rsc/source/res/rscrange.cxx
index 1f99bed..6273eab 100644
--- a/rsc/source/res/rscrange.cxx
+++ b/rsc/source/res/rscrange.cxx
@@ -412,32 +412,4 @@ void RscBool::WriteSrc( const RSCINST & rInst, FILE * fOutput,
         fprintf( fOutput, "FALSE" );
 }
 
-RscBreakRange::RscBreakRange( Atom nId, sal_uInt32 nTypeId )
-    : RscRange(nId, nTypeId), nOutRange(0xFFFFFFFF)
-{
-}
-
-ERRTYPE RscBreakRange::SetNumber( const RSCINST & rInst, sal_Int32 nValue )
-{
-    if( nValue == nOutRange )
-        return ERR_RSCRANGE_OUTDEFSET;
-    else
-        return RscRange::SetNumber( rInst, nValue );
-}
-
-RSCINST RscBreakRange::Create( RSCINST * pInst, const RSCINST & rDflt,
-                               bool bOwnClass )
-{
-    RSCINST aInst;
-    sal_Int32   l;
-
-    aInst = RscRange::Create( pInst, rDflt, bOwnClass );
-
-    GetNumber( aInst, &l );
-    if( l == nOutRange )
-        reinterpret_cast<RscRangeInst *>(aInst.pData)->nValue++;
-
-    return aInst;
-}
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit c74b62ca6e1790020b0e19cdf2f3ee3d022affbf
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Nov 24 13:15:20 2016 +0000

    aNoZeroShort appears unused
    
    Change-Id: Iae1c921c4f57130fe5657ed023f5087ad5e9a82d

diff --git a/rsc/inc/rscdb.hxx b/rsc/inc/rscdb.hxx
index 8e6024d..633f9fb 100644
--- a/rsc/inc/rscdb.hxx
+++ b/rsc/inc/rscdb.hxx
@@ -117,7 +117,6 @@ public:
     RscLongEnumRange    aEnumLong;
     RscIdRange          aIdUShort;
     RscIdRange          aIdNoZeroUShort;
-    RscBreakRange       aNoZeroShort;
     RscIdRange          aIdLong;
     RscString           aString;
     RscString           aStringLiteral;
diff --git a/rsc/source/parser/rscdb.cxx b/rsc/source/parser/rscdb.cxx
index 3fdf4dc..94a5bc1 100644
--- a/rsc/source/parser/rscdb.cxx
+++ b/rsc/source/parser/rscdb.cxx
@@ -52,7 +52,6 @@ RscTypCont::RscTypCont( RscError * pErrHdl,
     , aEnumLong( pHS->getID( "enum_long" ), RSC_NOTYPE )
     , aIdUShort( pHS->getID( "IDUSHORT" ), RSC_NOTYPE )
     , aIdNoZeroUShort( pHS->getID( "IDUSHORT" ), RSC_NOTYPE )
-    , aNoZeroShort( pHS->getID( "NoZeroShort" ), RSC_NOTYPE )
     , aIdLong( pHS->getID( "IDLONG" ), RSC_NOTYPE )
     , aString( pHS->getID( "Chars" ), RSC_NOTYPE )
     , aStringLiteral( pHS->getID( "Chars" ), RSC_NOTYPE )
@@ -181,7 +180,6 @@ RscTypCont::~RscTypCont()
     aUShort.Pre_dtor();
     aIdUShort.Pre_dtor();
     aIdNoZeroUShort.Pre_dtor();
-    aNoZeroShort.Pre_dtor();
     aIdLong.Pre_dtor();
     aString.Pre_dtor();
     aVersion.pClass->Pre_dtor();
diff --git a/rsc/source/parser/rscinit.cxx b/rsc/source/parser/rscinit.cxx
index ee82163..029cb4d 100644
--- a/rsc/source/parser/rscinit.cxx
+++ b/rsc/source/parser/rscinit.cxx
@@ -92,9 +92,6 @@ void RscTypCont::Init()
 
     aIdNoZeroUShort.SetRange( 1, 0xFFFF );
 
-    aNoZeroShort.SetRange( -32768, 32767 );
-    aNoZeroShort.SetOutRange( 0 );
-
     aIdLong.SetRange( SAL_MIN_INT32, SAL_MAX_INT32 );
 }
 {
commit 6f71fa11c0b1c5a9683c43bc98acec57a4d53610
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Nov 24 13:09:10 2016 +0000

    vcl makes no use of menu Get/Set DefaultItem
    
    this is exposed through uno however, so move it into VCLXMenu to continue to
    support it doing nothing of great value there
    
    Change-Id: I6888e61cbec85faa2d1fcca8731ab42023e594c6

diff --git a/basctl/source/basicide/basidesh.src b/basctl/source/basicide/basidesh.src
index 8a21b54..133f699 100644
--- a/basctl/source/basicide/basidesh.src
+++ b/basctl/source/basicide/basidesh.src
@@ -329,7 +329,6 @@ String RID_STR_SHAREMACROSDIALOGS
 Menu RID_POPUP_BRKPROPS
 {
     Text [ en-US ] = "Properties" ;
-    DefaultItemId = RID_BRKPROPS ;
     ItemList =
     {
         MenuItem
@@ -367,7 +366,6 @@ Menu RID_POPUP_BRKDLG
 
 Menu RID_POPUP_TABBAR
 {
-    DefaultItemId = SID_BASICIDE_HIDECURPAGE ;
     ItemList =
     {
         MenuItem
diff --git a/include/toolkit/awt/vclxmenu.hxx b/include/toolkit/awt/vclxmenu.hxx
index 77dc709..91d088a 100644
--- a/include/toolkit/awt/vclxmenu.hxx
+++ b/include/toolkit/awt/vclxmenu.hxx
@@ -63,6 +63,7 @@ private:
     VclPtr<Menu>            mpMenu;
     MenuListenerMultiplexer maMenuListeners;
     PopupMenuRefList        maPopupMenuRefs;
+    sal_Int16               mnDefaultItem;
 
 protected:
     ::osl::Mutex&           GetMutex() { return maMutex; }
diff --git a/include/tools/rc.h b/include/tools/rc.h
index aa9f24a..c1da806 100644
--- a/include/tools/rc.h
+++ b/include/tools/rc.h
@@ -29,10 +29,9 @@
 enum class RscMenu {
     Items                  = 0x01,
     Text                   = 0x02,
-    DefaultItemId          = 0x04
 };
 namespace o3tl {
-    template<> struct typed_flags<RscMenu> : is_typed_flags<RscMenu, 0x07> {};
+    template<> struct typed_flags<RscMenu> : is_typed_flags<RscMenu, 0x03> {};
 }
 
 // "MenuItem" resource options:
diff --git a/include/vcl/menu.hxx b/include/vcl/menu.hxx
index 959d54d..313ae53 100644
--- a/include/vcl/menu.hxx
+++ b/include/vcl/menu.hxx
@@ -150,7 +150,6 @@ private:
     ImplSVEvent* nEventId;
     sal_uInt16 mnHighlightedItemPos; // for native menus: keeps track of the highlighted item
     MenuFlags nMenuFlags;
-    sal_uInt16 nDefaultItem;       // Id of default item
     sal_uInt16 nSelectedId;
 
     // for output:
@@ -271,9 +270,6 @@ public:
     sal_uInt16 GetCurItemId() const { return nSelectedId;}
     OString GetCurItemIdent() const;
 
-    void SetDefaultItem( sal_uInt16 nItemId )    { nDefaultItem = nItemId; }
-    sal_uInt16 GetDefaultItem() const              { return nDefaultItem; }
-
     void SetItemBits( sal_uInt16 nItemId, MenuItemBits nBits );
     MenuItemBits GetItemBits( sal_uInt16 nItemId ) const;
 
diff --git a/rsc/source/parser/rscicpx.cxx b/rsc/source/parser/rscicpx.cxx
index 9927113..e03ce1e 100644
--- a/rsc/source/parser/rscicpx.cxx
+++ b/rsc/source/parser/rscicpx.cxx
@@ -357,9 +357,6 @@ RscTop * RscTypCont::InitClassMenu( RscTop * pSuper,
     }
     nId = aNmTb.Put( "Text", VARNAME );
     pClassMenu->SetVariable( nId, &aLangString, nullptr, 0, (sal_uInt32)RscMenu::Text );
-    nId = aNmTb.Put( "DefaultItemId", VARNAME );
-    pClassMenu->SetVariable( nId, &aIdUShort, nullptr, 0,
-                                 (sal_uInt32)RscMenu::DefaultItemId );
 
     return pClassMenu;
 }
diff --git a/toolkit/source/awt/vclxmenu.cxx b/toolkit/source/awt/vclxmenu.cxx
index 2b98cc7..45252bc 100644
--- a/toolkit/source/awt/vclxmenu.cxx
+++ b/toolkit/source/awt/vclxmenu.cxx
@@ -40,12 +40,14 @@
 
 VCLXMenu::VCLXMenu()
     : maMenuListeners( *this )
+    , mnDefaultItem(0)
 {
     mpMenu = nullptr;
 }
 
 VCLXMenu::VCLXMenu( Menu* pMenu )
     : maMenuListeners( *this )
+    , mnDefaultItem(0)
 {
     mpMenu = pMenu;
 }
@@ -476,20 +478,17 @@ void VCLXMenu::setDefaultItem(
     sal_Int16 nItemId )
 throw(css::uno::RuntimeException, std::exception)
 {
-    SolarMutexGuard aSolarGuard;
     ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
 
-    if ( mpMenu )
-        mpMenu->SetDefaultItem( nItemId );
+    mnDefaultItem = nItemId;
 }
 
 sal_Int16 VCLXMenu::getDefaultItem(  )
 throw(css::uno::RuntimeException, std::exception)
 {
-    SolarMutexGuard aSolarGuard;
     ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
 
-    return mpMenu ? mpMenu->GetDefaultItem() : 0;
+    return mnDefaultItem;
 }
 
 void VCLXMenu::checkItem(
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 934fdb0..74d529c 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -123,7 +123,6 @@ Menu::Menu()
       nEventId(nullptr),
       mnHighlightedItemPos(ITEMPOS_INVALID),
       nMenuFlags(MenuFlags::NONE),
-      nDefaultItem(0),
       nSelectedId(0),
       nImgOrChkPos(0),
       nTextPos(0),
@@ -1204,7 +1203,6 @@ Menu& Menu::operator=( const Menu& rMenu )
     for ( sal_uInt16 i = 0; i < nCount; i++ )
         ImplCopyItem( this, rMenu, i, MENU_APPEND );
 
-    nDefaultItem = rMenu.nDefaultItem;
     aActivateHdl = rMenu.aActivateHdl;
     aDeactivateHdl = rMenu.aDeactivateHdl;
     aSelectHdl = rMenu.aSelectHdl;
@@ -2742,8 +2740,6 @@ PopupMenu::PopupMenu( const ResId& rResId )
     {
         aTitleText = ReadStringRes();
     }
-    if( nObjMask & RscMenu::DefaultItemId )
-        SetDefaultItem( sal::static_int_cast<sal_uInt16>(ReadLongRes()) );
 }
 
 PopupMenu::PopupMenu( const PopupMenu& rMenu )


More information about the Libreoffice-commits mailing list