[Libreoffice-commits] core.git: basic/source cui/source framework/source include/sfx2 include/svx include/tools include/vcl rsc/Executable_rsc.mk rsc/inc rsc/source sc/source svx/source tools/source vcl/inc vcl/source writerfilter/source

Caolán McNamara caolanm at redhat.com
Wed Apr 19 11:42:33 UTC 2017


 basic/source/sbx/sbxscan.cxx                   |    1 
 cui/source/dialogs/iconcdlg.cxx                |    1 
 cui/source/factory/cuiresmgr.cxx               |    1 
 framework/source/fwe/classes/fwkresid.cxx      |    1 
 framework/source/uiconfiguration/ImageList.cxx |    1 
 include/sfx2/styfitem.hxx                      |    1 
 include/svx/svdetc.hxx                         |    1 
 include/svx/ucsubset.hxx                       |    1 
 include/tools/rc.h                             |   55 ---
 include/tools/rc.hxx                           |   28 --
 include/tools/rcid.h                           |    2 
 include/tools/resmgr.hxx                       |   14 -
 include/vcl/dibtools.hxx                       |    1 
 include/vcl/menu.hxx                           |    9 
 include/vcl/outdev.hxx                         |    1 
 rsc/Executable_rsc.mk                          |    1 
 rsc/inc/rscall.h                               |    7 
 rsc/inc/rscarray.hxx                           |    2 
 rsc/inc/rscclass.hxx                           |    3 
 rsc/inc/rscconst.hxx                           |    1 
 rsc/inc/rsccont.hxx                            |    1 
 rsc/inc/rscdb.hxx                              |    8 
 rsc/inc/rscflag.hxx                            |  104 -------
 rsc/inc/rscrange.hxx                           |   97 ------
 rsc/inc/rscstr.hxx                             |    1 
 rsc/inc/rsctop.hxx                             |    4 
 rsc/source/parser/rscdb.cxx                    |   11 
 rsc/source/parser/rscibas.cxx                  |    1 
 rsc/source/parser/rscicpx.cxx                  |  128 ---------
 rsc/source/parser/rscinit.cxx                  |   21 -
 rsc/source/parser/rscyacc.y                    |    1 
 rsc/source/res/rscarray.cxx                    |   14 -
 rsc/source/res/rscclass.cxx                    |   18 -
 rsc/source/res/rscconst.cxx                    |    5 
 rsc/source/res/rsccont.cxx                     |    5 
 rsc/source/res/rscflag.cxx                     |  347 -------------------------
 rsc/source/res/rscrange.cxx                    |  276 -------------------
 rsc/source/res/rscstr.cxx                      |    5 
 rsc/source/res/rsctop.cxx                      |    6 
 sc/source/core/data/funcdesc.cxx               |    1 
 svx/source/dialog/dialmgr.cxx                  |    1 
 svx/source/gallery2/galobj.cxx                 |    1 
 svx/source/svdraw/svdetc.cxx                   |    1 
 tools/source/rc/rc.cxx                         |    9 
 tools/source/rc/resmgr.cxx                     |   89 ------
 vcl/inc/pch/precompiled_vcl.hxx                |    1 
 vcl/source/bitmap/BitmapTools.cxx              |    2 
 vcl/source/control/button.cxx                  |    1 
 vcl/source/control/combobox.cxx                |    1 
 vcl/source/control/ctrl.cxx                    |    1 
 vcl/source/control/edit.cxx                    |    1 
 vcl/source/control/field.cxx                   |    2 
 vcl/source/control/field2.cxx                  |    1 
 vcl/source/control/fixed.cxx                   |    2 
 vcl/source/control/group.cxx                   |    2 
 vcl/source/control/listbox.cxx                 |    1 
 vcl/source/control/longcurr.cxx                |    2 
 vcl/source/control/menubtn.cxx                 |    1 
 vcl/source/control/morebtn.cxx                 |    1 
 vcl/source/control/scrbar.cxx                  |    1 
 vcl/source/control/slider.cxx                  |    1 
 vcl/source/control/spinfld.cxx                 |    2 
 vcl/source/control/tabctrl.cxx                 |    1 
 vcl/source/edit/vclmedit.cxx                   |    1 
 vcl/source/filter/graphicfilter.cxx            |    1 
 vcl/source/gdi/bitmap.cxx                      |    1 
 vcl/source/gdi/bitmapex.cxx                    |    5 
 vcl/source/image/Image.cxx                     |    1 
 vcl/source/window/accel.cxx                    |    1 
 vcl/source/window/accessibility.cxx            |    1 
 vcl/source/window/btndlg.cxx                   |    2 
 vcl/source/window/dialog.cxx                   |    1 
 vcl/source/window/dockmgr.cxx                  |    1 
 vcl/source/window/dockwin.cxx                  |    1 
 vcl/source/window/floatwin.cxx                 |    1 
 vcl/source/window/keycod.cxx                   |    2 
 vcl/source/window/menu.cxx                     |  125 ---------
 vcl/source/window/menuitemlist.cxx             |    7 
 vcl/source/window/menuitemlist.hxx             |    3 
 vcl/source/window/msgbox.cxx                   |    2 
 vcl/source/window/split.cxx                    |    1 
 vcl/source/window/status.cxx                   |    1 
 vcl/source/window/syschild.cxx                 |    2 
 vcl/source/window/tabdlg.cxx                   |    1 
 vcl/source/window/tabpage.cxx                  |    2 
 vcl/source/window/toolbox.cxx                  |    1 
 vcl/source/window/toolbox2.cxx                 |    1 
 vcl/source/window/window.cxx                   |    1 
 vcl/source/window/wrkwin.cxx                   |    1 
 writerfilter/source/rtftok/rtftokenizer.cxx    |    3 
 90 files changed, 20 insertions(+), 1461 deletions(-)

New commits:
commit 2b83e73fd7b059c4ad224e3163f9d57c6cc6e1c7
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Apr 18 17:13:03 2017 +0100

    remove freshly unused menu support from src files
    
    Change-Id: I038711a0c4d440d452d5b2ae1bfcba5c9305815b
    Reviewed-on: https://gerrit.libreoffice.org/36646
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/basic/source/sbx/sbxscan.cxx b/basic/source/sbx/sbxscan.cxx
index bee6af2a88b9..b23c63f933d2 100644
--- a/basic/source/sbx/sbxscan.cxx
+++ b/basic/source/sbx/sbxscan.cxx
@@ -20,6 +20,7 @@
 #include <config_features.h>
 
 #include <tools/errcode.hxx>
+#include <tools/resmgr.hxx>
 #include <basic/sbx.hxx>
 #include "sbxconv.hxx"
 
diff --git a/cui/source/dialogs/iconcdlg.cxx b/cui/source/dialogs/iconcdlg.cxx
index acb3fdee475e..94c6ddc9f45e 100644
--- a/cui/source/dialogs/iconcdlg.cxx
+++ b/cui/source/dialogs/iconcdlg.cxx
@@ -18,7 +18,6 @@
  */
 
 #include <sfx2/app.hxx>
-#include <tools/rc.h>
 
 #include <dialmgr.hxx>
 
diff --git a/cui/source/factory/cuiresmgr.cxx b/cui/source/factory/cuiresmgr.cxx
index e872f9dd9836..376d4962483a 100644
--- a/cui/source/factory/cuiresmgr.cxx
+++ b/cui/source/factory/cuiresmgr.cxx
@@ -19,6 +19,7 @@
 
 #include <dialmgr.hxx>
 #include <svl/solar.hrc>
+#include <tools/resmgr.hxx>
 #include <vcl/svapp.hxx>
 #include <vcl/settings.hxx>
 
diff --git a/framework/source/fwe/classes/fwkresid.cxx b/framework/source/fwe/classes/fwkresid.cxx
index 53a7fc7dfc6a..c2e7f7ae4ebd 100644
--- a/framework/source/fwe/classes/fwkresid.cxx
+++ b/framework/source/fwe/classes/fwkresid.cxx
@@ -19,6 +19,7 @@
 
 #include "classes/fwkresid.hxx"
 #include <osl/mutex.hxx>
+#include <tools/resmgr.hxx>
 #include <vcl/svapp.hxx>
 #include <vcl/settings.hxx>
 
diff --git a/framework/source/uiconfiguration/ImageList.cxx b/framework/source/uiconfiguration/ImageList.cxx
index 800330907ebb..58ef22c53ff8 100644
--- a/framework/source/uiconfiguration/ImageList.cxx
+++ b/framework/source/uiconfiguration/ImageList.cxx
@@ -20,7 +20,6 @@
 #include <osl/file.hxx>
 #include <tools/debug.hxx>
 #include <tools/stream.hxx>
-#include <tools/rc.h>
 #include <tools/rc.hxx>
 #include <tools/resmgr.hxx>
 #include <vcl/settings.hxx>
diff --git a/include/sfx2/styfitem.hxx b/include/sfx2/styfitem.hxx
index c0fd3cb1527f..5c96960f428b 100644
--- a/include/sfx2/styfitem.hxx
+++ b/include/sfx2/styfitem.hxx
@@ -24,7 +24,6 @@
 #include <sfx2/dllapi.h>
 #include <vcl/bitmap.hxx>
 #include <vcl/image.hxx>
-#include <tools/rc.hxx>
 #include <tools/resary.hxx>
 #include <rsc/rscsfx.hxx>
 #include <vector>
diff --git a/include/svx/svdetc.hxx b/include/svx/svdetc.hxx
index 021d61077dc2..19ebf31f3468 100644
--- a/include/svx/svdetc.hxx
+++ b/include/svx/svdetc.hxx
@@ -39,6 +39,7 @@
  * is set.
  */
 
+class ResMgr;
 class SdrOutliner;
 class SdrModel;
 class SvtSysLocale;
diff --git a/include/svx/ucsubset.hxx b/include/svx/ucsubset.hxx
index 6442615b1dd2..f71a454fa469 100644
--- a/include/svx/ucsubset.hxx
+++ b/include/svx/ucsubset.hxx
@@ -24,7 +24,6 @@
 
 #include <svx/ucsubset.hrc>
 #include <vcl/metric.hxx>
-#include "tools/rc.hxx"
 
 #include <list>
 
diff --git a/include/tools/rc.h b/include/tools/rc.h
deleted file mode 100644
index 84bb8e255972..000000000000
--- a/include/tools/rc.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef INCLUDED_TOOLS_RC_H
-#define INCLUDED_TOOLS_RC_H
-
-#include <tools/rcid.h>
-#include <o3tl/typed_flags_set.hxx>
-
-// Attributes in *.src files
-
-// For all menu resources:
-enum class RscMenu {
-    Items                  = 0x01,
-    Text                   = 0x02,
-};
-namespace o3tl {
-    template<> struct typed_flags<RscMenu> : is_typed_flags<RscMenu, 0x03> {};
-}
-
-// "MenuItem" resource options:
-enum class RscMenuItem {
-    Separator          = 0x001,
-    Id                 = 0x002,
-    Status             = 0x004,
-    Text               = 0x008,
-    HelpText           = 0x020,
-    HelpId             = 0x040,
-    Menu               = 0x100,
-    Disable            = 0x400,
-    Command            = 0x800
-};
-namespace o3tl {
-    template<> struct typed_flags<RscMenuItem> : is_typed_flags<RscMenuItem, 0xd6f> {};
-}
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/tools/rc.hxx b/include/tools/rc.hxx
index 20df1fe9b1de..2338f7ed593f 100644
--- a/include/tools/rc.hxx
+++ b/include/tools/rc.hxx
@@ -27,39 +27,11 @@ class SAL_WARN_UNUSED TOOLS_DLLPUBLIC Resource
 protected:
     ResMgr* m_pResMgr;
 
-    // Load a Resource
-    void                GetRes( const ResId& rResId );
-
     // check Resource state
 #ifdef DBG_UTIL
     void                TestRes();
 #endif
 
-    // Get a pointer to the Resource's data
-    void* GetClassRes()
-    { return m_pResMgr->GetClass(); }
-
-    // increase the memory pointer gotten by GetClassRes()
-    void IncrementRes( sal_uInt32 nBytes )
-    { m_pResMgr->Increment( nBytes ); }
-
-    // return the memory size of a Resource data block
-    static sal_uInt32   GetObjSizeRes( RSHEADER_TYPE * pHT )
-    { return ResMgr::GetObjSize( pHT ); }
-
-    // read a 32bit value from resource data and increment pointer
-    sal_Int32 ReadLongRes()
-    { return m_pResMgr->ReadLong(); }
-    // read a 16bit value from resource data and increment pointer
-    sal_Int16 ReadShortRes()
-    { return m_pResMgr->ReadShort(); }
-    // read a string from resource data and increment pointer
-    OUString ReadStringRes()
-    { return m_pResMgr->ReadString(); }
-    // read a byte string from resource data and increment pointer
-    OString ReadByteStringRes()
-    { return m_pResMgr->ReadByteString(); }
-
     // constructors
     Resource() : m_pResMgr( nullptr ) {}
 
diff --git a/include/tools/rcid.h b/include/tools/rcid.h
index 6c6cbf4fe663..0c095e8109c4 100644
--- a/include/tools/rcid.h
+++ b/include/tools/rcid.h
@@ -35,8 +35,6 @@
 #define RSC_RESOURCE            (RSC_NOTYPE + RESOURCE_TYPE(0x10))
 #define RSC_STRING              (RSC_NOTYPE + RESOURCE_TYPE(0x11))
 #define RSC_BITMAP              (RSC_NOTYPE + RESOURCE_TYPE(0x13))
-#define RSC_MENU                (RSC_NOTYPE + RESOURCE_TYPE(0x1c))
-#define RSC_MENUITEM            (RSC_NOTYPE + RESOURCE_TYPE(0x1d)) // only used internally
 
 #define RSC_STRINGARRAY         (RSC_NOTYPE + RESOURCE_TYPE(0x79))
 
diff --git a/include/tools/resmgr.hxx b/include/tools/resmgr.hxx
index 97126298818e..5a6cd3272aae 100644
--- a/include/tools/resmgr.hxx
+++ b/include/tools/resmgr.hxx
@@ -155,14 +155,8 @@ public:
     /// Increment resource pointer
     void*               Increment( sal_uInt32 nSize );
 
-    /// Size of an object within the resource
-    static sal_uInt32   GetObjSize( RSHEADER_TYPE* pHT )
-                            { return( pHT->GetGlobOff() ); }
-
     /// Return a string and its length out of the resource
     static sal_uInt32   GetString( OUString& rStr, const sal_uInt8* pStr );
-    /// Return a byte string and its length out of the resource
-    static sal_uInt32   GetByteString( OString& rStr, const sal_uInt8* pStr );
 
     /// Return the size of a string in the resource
     static sal_uInt32   GetStringSize( sal_uInt32 nLen )
@@ -173,22 +167,14 @@ public:
     static sal_uInt64   GetUInt64( void const * pDatum );
     /// Return a long
     static sal_Int32    GetLong( void const * pLong );
-    /// Return a short
-    static sal_Int16    GetShort( void const * pShort );
 
     /// Return a pointer to the resource
     void *              GetClass();
 
-    RSHEADER_TYPE *     CreateBlock( const ResId & rId );
-
-    sal_uInt32          GetRemainSize();
-
     const OUString& GetFileName() const;
 
-    sal_Int16           ReadShort();
     sal_Int32           ReadLong();
     OUString            ReadString();
-    OString             ReadByteString();
 
     static void         SetReadStringHook( ResHookProc pProc );
     static ResHookProc  GetReadStringHook();
diff --git a/include/vcl/dibtools.hxx b/include/vcl/dibtools.hxx
index 765cdc9e2dec..6f6752efc08b 100644
--- a/include/vcl/dibtools.hxx
+++ b/include/vcl/dibtools.hxx
@@ -21,7 +21,6 @@
 
 #include <vcl/dllapi.h>
 #include <vcl/mapmod.hxx>
-#include <tools/rc.hxx>
 #include <vcl/region.hxx>
 #include <vcl/alpha.hxx>
 
diff --git a/include/vcl/menu.hxx b/include/vcl/menu.hxx
index 28e982990ab1..f5da72b5c109 100644
--- a/include/vcl/menu.hxx
+++ b/include/vcl/menu.hxx
@@ -22,8 +22,6 @@
 
 #include <rsc/rsc-vcl-shared-types.hxx>
 #include <tools/color.hxx>
-#include <tools/rc.hxx>
-#include <tools/resid.hxx>
 #include <tools/solar.h>
 #include <vcl/dllapi.h>
 #include <vcl/bitmapex.hxx>
@@ -122,7 +120,7 @@ struct MenuLogo
 
 typedef void (*MenuUserDataReleaseFunction)(sal_uLong);
 
-class VCL_DLLPUBLIC Menu : public Resource, public VclReferenceBase
+class VCL_DLLPUBLIC Menu : public VclReferenceBase
 {
     friend class MenuBar;
     friend class MenuBarWindow;
@@ -248,7 +246,6 @@ public:
                     MenuItemBits nItemBits = MenuItemBits::NONE,
                     const OString &rIdent = OString(),
                     sal_uInt16 nPos = MENU_APPEND);
-    void InsertItem(const ResId& rResId);
     void InsertItem(const OUString& rCommand,
                     const css::uno::Reference<css::frame::XFrame>& rFrame);
     void InsertSeparator(const OString &rIdent = OString(), sal_uInt16 nPos = MENU_APPEND);
@@ -491,8 +488,6 @@ class VCL_DLLPUBLIC PopupMenu : public Menu
     friend struct MenuItemData;
 
 private:
-    VclPtr<Menu>* pRefAutoSubMenu; // keeps track if a pointer to this Menu is stored in the MenuItemData
-
     SAL_DLLPRIVATE MenuFloatingWindow * ImplGetFloatingWindow() const;
 
 protected:
@@ -504,9 +499,7 @@ protected:
 public:
     PopupMenu();
     PopupMenu( const PopupMenu& rMenu );
-    explicit PopupMenu( const ResId& );
     virtual ~PopupMenu() override;
-    virtual void dispose() override;
 
     virtual bool IsMenuBar() const override { return false; }
 
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index 2c8017c97b54..d0586a7a7868 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -22,7 +22,6 @@
 
 #include <tools/gen.hxx>
 #include <tools/solar.h>
-#include <tools/rc.hxx>
 #include <tools/color.hxx>
 #include <tools/poly.hxx>
 #include <o3tl/typed_flags_set.hxx>
diff --git a/rsc/Executable_rsc.mk b/rsc/Executable_rsc.mk
index 18030f5302c4..970550ed2f1e 100644
--- a/rsc/Executable_rsc.mk
+++ b/rsc/Executable_rsc.mk
@@ -57,7 +57,6 @@ $(eval $(call gb_Executable_add_exception_objects,rsc,\
 	rsc/source/res/rscclobj \
 	rsc/source/res/rscconst \
 	rsc/source/res/rsccont \
-	rsc/source/res/rscflag \
 	rsc/source/res/rscmgr \
 	rsc/source/res/rscrange \
 	rsc/source/res/rscstr \
diff --git a/rsc/inc/rscall.h b/rsc/inc/rscall.h
index 1591d1f114e3..d8222b7c1d31 100644
--- a/rsc/inc/rscall.h
+++ b/rsc/inc/rscall.h
@@ -62,13 +62,6 @@ namespace o3tl {
     template<> struct typed_flags<CommandFlags> : is_typed_flags<CommandFlags, 0x327f> {};
 }
 
-
-/******************* T y p e s *******************************************/
-enum RSCCLASS_TYPE  { RSCCLASS_BOOL, RSCCLASS_STRING, RSCCLASS_NUMBER,
-                      RSCCLASS_CONST, RSCCLASS_COMPLEX, RSCCLASS_ENUMARRAY };
-
-typedef void (* VarEnumCallbackProc)( void * pData, RSCCLASS_TYPE, Atom );
-
 /******************* S t r u c t s ***************************************/
 struct RSCINST
 {
diff --git a/rsc/inc/rscarray.hxx b/rsc/inc/rscarray.hxx
index 32d138675fe0..01a5ddf8795e 100644
--- a/rsc/inc/rscarray.hxx
+++ b/rsc/inc/rscarray.hxx
@@ -62,7 +62,6 @@ public:
                     RscArray( Atom nId, RESOURCE_TYPE nTypId,
                               RscTop * pSuper, RscEnum * pTypeClass );
                     virtual ~RscArray() override;
-    virtual RSCCLASS_TYPE   GetClassType() const override;
 
     virtual RscTop *    GetTypeClass() const override;
     RSCINST         Create( RSCINST * pInst, const RSCINST & rDflt, bool bOwnClass = false ) override;
@@ -96,7 +95,6 @@ class RscLangArray : public RscArray
 public:
                     RscLangArray( Atom nId, RESOURCE_TYPE nTypId,
                                   RscTop * pSuper, RscEnum * pTypeClass );
-    virtual RSCCLASS_TYPE   GetClassType() const override;
 };
 
 #endif // INCLUDED_RSC_INC_RSCARRAY_HXX
diff --git a/rsc/inc/rscclass.hxx b/rsc/inc/rscclass.hxx
index 59b3980c33e5..2e81aa24ac6a 100644
--- a/rsc/inc/rscclass.hxx
+++ b/rsc/inc/rscclass.hxx
@@ -57,14 +57,11 @@ public:
                     RscClass( Atom nId, RESOURCE_TYPE nTypId, RscTop * pSuperCl );
                     virtual ~RscClass() override;
 
-    virtual RSCCLASS_TYPE   GetClassType() const override;
-
     void            Pre_dtor() override;
     ERRTYPE         SetVariable( Atom nVarName, RscTop * pClass,
                                  RSCINST * pDflt = nullptr,
                                  RSCVAR nVarType = RSCVAR::NONE, sal_uInt32 nMask = 0,
                                  Atom nDataBaseName = InvalidAtom ) override;
-    virtual void    EnumVariables( void * pData, VarEnumCallbackProc ) override;
     RSCINST         GetVariable( const RSCINST & rInst, Atom nVarName,
                                  const RSCINST & rInitInst,
                                  bool bInitDflt = false,
diff --git a/rsc/inc/rscconst.hxx b/rsc/inc/rscconst.hxx
index 1b65f60e509a..b9678751e452 100644
--- a/rsc/inc/rscconst.hxx
+++ b/rsc/inc/rscconst.hxx
@@ -38,7 +38,6 @@ protected:
 public:
                     RscConst( Atom nId, RESOURCE_TYPE nTypId );
                     virtual ~RscConst() override;
-    virtual RSCCLASS_TYPE   GetClassType() const override;
                     // sets the allowed values
     void            SetConstant( Atom nVarName, sal_Int32 lValue );
     bool            GetConstValue( Atom nConstId, sal_Int32 * pVal ) const;
diff --git a/rsc/inc/rsccont.hxx b/rsc/inc/rsccont.hxx
index 005daa44856f..c1cf83700a11 100644
--- a/rsc/inc/rsccont.hxx
+++ b/rsc/inc/rsccont.hxx
@@ -56,7 +56,6 @@ public:
                     RscBaseCont( Atom nId, RESOURCE_TYPE nTypId,
                                  bool bNoId );
                     virtual ~RscBaseCont() override;
-    virtual RSCCLASS_TYPE   GetClassType() const override;
     void            SetTypeClass( RscTop * pClass )
                         {
                             pTypeClass = pClass;
diff --git a/rsc/inc/rscdb.hxx b/rsc/inc/rscdb.hxx
index 0da0a6dbaac2..f56ba91f122f 100644
--- a/rsc/inc/rscdb.hxx
+++ b/rsc/inc/rscdb.hxx
@@ -23,7 +23,6 @@
 #include <rscall.h>
 #include <rsckey.hxx>
 #include <rscconst.hxx>
-#include <rscflag.hxx>
 #include <rscrange.hxx>
 #include <rscstr.hxx>
 #include <rscarray.hxx>
@@ -89,17 +88,10 @@ class RscTypCont
     RscTop *    InitClassMgr();
     RscTop *    InitClassString( RscTop * pSuper );
     RscTop *    InitClassBitmap( RscTop * pSuper );
-    RscTop *    InitClassMenuItem( RscTop * pSuper );
-    RscTop *    InitClassMenu( RscTop * pSuper, RscTop * pMenuItem );
 
 public:
-    RscBool             aBool;
-    RscRange            aShort;
-    RscRange            aUShort;
     RscLongEnumRange    aEnumLong;
-    RscIdRange          aIdNoZeroUShort;
     RscString           aString;
-    RscString           aStringLiteral;
     RscLangEnum         aLangType;
     RscLangArray        aLangString;
 
diff --git a/rsc/inc/rscflag.hxx b/rsc/inc/rscflag.hxx
deleted file mode 100644
index de006bf2dee2..000000000000
--- a/rsc/inc/rscflag.hxx
+++ /dev/null
@@ -1,104 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#ifndef INCLUDED_RSC_INC_RSCFLAG_HXX
-#define INCLUDED_RSC_INC_RSCFLAG_HXX
-
-#include <rscall.h>
-#include <rscerror.h>
-#include <rschash.hxx>
-#include <rscconst.hxx>
-
-/******************* R s c F l a g ***************************************/
-class RscFlag : public RscConst
-{
-    struct RscFlagInst
-    {
-        sal_uInt32  nFlags;
-        sal_uInt32  nDfltFlags;
-    };
-    RSCINST         CreateBasic( RSCINST * pInst );
-public:
-                    RscFlag( Atom nId, RESOURCE_TYPE nTypId );
-    RSCINST         Create( RSCINST * pInst, const RSCINST & rDflt, bool bOwnClass = false ) override;
-    RSCINST         CreateClient( RSCINST * pInst, const RSCINST & rDflt,
-                                  bool bOwnClass, Atom nConsId );
-    sal_uInt32      Size() const override;
-
-    virtual void    SetToDefault( const RSCINST & rInst ) override;
-    bool            IsDefault( const RSCINST & rInst ) override;
-    bool            IsDefault( const RSCINST & rInst, Atom nConstId );
-
-                    // whether the flag is set
-    bool            IsSet( const RSCINST & rInst, Atom nConstId );
-
-                    // sets as default
-    bool            IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef ) override;
-    bool            IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef,
-                                    Atom nConstId );
-
-    ERRTYPE         SetConst( const RSCINST & rInst, Atom nValueId,
-                              sal_Int32 nValue ) override;
-    ERRTYPE         SetNotConst( const RSCINST & rInst, Atom nConstId ) override;
-    void            WriteSrc( const RSCINST & rInst, FILE * fOutput,
-                              RscTypCont * pTC, sal_uInt32 nTab, const char * ) override;
-    ERRTYPE         WriteRc( const RSCINST & rInst, RscWriteRc & aMem,
-                             RscTypCont * pTC, sal_uInt32 ) override;
-};
-
-/******************* R s c C l i e n t ***********************************/
-class RscClient : public RscTop
-{
-    RscFlag *       pRefClass;  // class which is used as server
-    Atom            nConstId;   // id of the value to set
-public:
-                    RscClient( Atom nId, RESOURCE_TYPE nTypId, RscFlag * pClass,
-                               Atom nConstantId );
-    virtual RSCCLASS_TYPE   GetClassType() const override;
-    RSCINST         Create( RSCINST * pInst, const RSCINST & rDflt, bool bOwnClass = false ) override;
-    sal_uInt32      Size() const override { return pRefClass->Size(); }
-
-                    // an assignment to a variable
-    bool            IsDefault( const RSCINST & rInst ) override {
-                        return pRefClass->IsDefault( rInst, nConstId );
-                    };
-                    // sets as default
-    bool            IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef ) override
-                        {
-                            return pRefClass->IsValueDefault( rInst,
-                                                              pDef, nConstId );
-                        }
-    ERRTYPE         SetBool( const RSCINST & rInst, bool bValue ) override
-                        {
-                            if( bValue )
-                                return pRefClass->SetConst( rInst, nConstId, sal_Int32(bValue) );
-                            else
-                                return pRefClass->SetNotConst( rInst, nConstId );
-                        }
-    ERRTYPE         GetBool( const RSCINST & rInst, bool * pB ) override
-                        {
-                            *pB = pRefClass->IsSet( rInst, nConstId );
-                            return ERR_OK;
-                        }
-    void            WriteSrc( const RSCINST & rInst, FILE * fOutput,
-                              RscTypCont * pTC, sal_uInt32 nTab, const char * ) override;
-};
-
-#endif // INCLUDED_RSC_INC_RSCFLAG_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/rsc/inc/rscrange.hxx b/rsc/inc/rscrange.hxx
index bed213f8c80f..202b86f98e08 100644
--- a/rsc/inc/rscrange.hxx
+++ b/rsc/inc/rscrange.hxx
@@ -24,43 +24,6 @@
 #include <rschash.hxx>
 #include <rsctop.hxx>
 
-class RscRange : public RscTop
-{
-protected:
-    struct RscRangeInst
-    {
-        sal_uInt16  nValue; // nValue = output value - nMin
-        bool        bDflt;  // is default
-    };
-    sal_Int32       nMin;   // range minimum value
-    sal_Int32       nMax;   // range maximum value
-public:
-                    RscRange( Atom nId, RESOURCE_TYPE nTypId );
-    virtual RSCCLASS_TYPE   GetClassType() const override;
-    RSCINST         Create( RSCINST * pInst, const RSCINST & rDfltInst, bool bOwnClass = false ) override;
-                    // sets the allowed range
-    void            SetRange( sal_Int32 nMinimum, sal_Int32 nMaximum );
-                    // returns the class size in bytes
-    sal_uInt32      Size() const override { return ALIGNED_SIZE(sizeof(RscRangeInst)); }
-                    // an assignment to a variable
-    virtual void    SetToDefault( const RSCINST & rInst ) override
-                        {
-                            reinterpret_cast<RscRangeInst*>(rInst.pData)->bDflt = true;
-                        }
-    bool            IsDefault( const RSCINST & rInst) override
-                        {
-                            return reinterpret_cast<RscRangeInst*>(rInst.pData)->bDflt;
-                        };
-                    // sets as default
-    bool            IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef ) override;
-    ERRTYPE         SetNumber( const RSCINST &, sal_Int32 ) override;
-    ERRTYPE         GetNumber( const RSCINST &, sal_Int32 * ) override;
-    void            WriteSrc( const RSCINST &, FILE * fOutput,
-                              RscTypCont * pTC, sal_uInt32 nTab, const char * ) override;
-    ERRTYPE         WriteRc( const RSCINST &, RscWriteRc & aMem,
-                             RscTypCont * pTC, sal_uInt32 ) override;
-};
-
 class RscLongRange : public RscTop
 {
 protected:
@@ -73,7 +36,6 @@ protected:
     sal_Int32    nMax;   // range maximum value
 public:
                     RscLongRange( Atom nId, RESOURCE_TYPE nTypId );
-    virtual RSCCLASS_TYPE   GetClassType() const override;
     RSCINST         Create( RSCINST * pInst, const RSCINST & rDfltInst, bool bOwnClass = false ) override;
                     // sets the allowed range
     void            SetRange( sal_Int32 nMinimum, sal_Int32 nMaximum );
@@ -108,65 +70,6 @@ public:
                               sal_Int32 nValue ) override;
 };
 
-class RscIdRange : public RscTop
-{
-protected:
-    sal_Int32    nMin;   // range minimum value
-    sal_Int32    nMax;   // range maximum value
-public:
-                    RscIdRange( Atom nId, RESOURCE_TYPE nTypId );
-    virtual RSCCLASS_TYPE   GetClassType() const override;
-                    // sets the allowed range
-    void            SetRange( sal_Int32 nMinimum, sal_Int32 nMaximum )
-                        {
-                            nMin = nMinimum;
-                            nMax = nMaximum;
-                        }
-    RSCINST         Create( RSCINST * pInst, const RSCINST & rDfltInst, bool bOwnClass = false ) override;
-    void            Destroy( const RSCINST & rInst ) override;
-    sal_uInt32      Size() const override { return ALIGNED_SIZE(sizeof(RscId)); }
-    virtual void    SetToDefault( const RSCINST & rInst ) override
-                        {
-                            reinterpret_cast<RscId*>(rInst.pData)->aExp.cUnused = true;
-                        }
-    bool            IsDefault( const RSCINST & rInst) override
-                        {
-                            //cUnused is used as default identifier
-                            return reinterpret_cast<RscId*>(rInst.pData)->aExp.cUnused;
-                        }
-                    // sets as default
-    bool            IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef ) override;
-    ERRTYPE         SetNumber( const RSCINST &, sal_Int32 ) override;
-    ERRTYPE         GetNumber( const RSCINST &, sal_Int32 * ) override;
-    ERRTYPE         SetRef( const RSCINST &, const RscId & rRscId ) override;
-    ERRTYPE         GetRef( const RSCINST & rInst, RscId * ) override;
-    void            WriteSrc( const RSCINST &, FILE * fOutput,
-                              RscTypCont * pTC, sal_uInt32 nTab, const char * ) override;
-    ERRTYPE         WriteRc( const RSCINST &, RscWriteRc & aMem,
-                             RscTypCont * pTC, sal_uInt32 ) override;
-    bool            IsConsistent( const RSCINST & rInst ) override;
-};
-
-class RscBool : public RscRange
-{
-public:
-                    RscBool( Atom nId, RESOURCE_TYPE nTypId );
-    virtual RSCCLASS_TYPE   GetClassType() const override;
-    ERRTYPE         SetBool( const RSCINST & rInst, bool b ) override
-                        {
-                            return SetNumber( rInst, (sal_Int32)b );
-                        };
-    ERRTYPE         GetBool( const RSCINST & rInst, bool * pB) override
-                        {
-                            sal_Int32 l;
-                            GetNumber( rInst, &l );
-                            *pB = (0 != l);
-                            return ERR_OK;
-                        };
-    void            WriteSrc( const RSCINST &, FILE * fOutput,
-                              RscTypCont * pTC, sal_uInt32 nTab, const char * ) override;
-};
-
 #endif // INCLUDED_RSC_INC_RSCRANGE_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/rsc/inc/rscstr.hxx b/rsc/inc/rscstr.hxx
index 322eedb3be8f..5ae1d17aa92d 100644
--- a/rsc/inc/rscstr.hxx
+++ b/rsc/inc/rscstr.hxx
@@ -35,7 +35,6 @@ class RscString : public RscTop
     };
 public:
                     RscString( Atom nId, RESOURCE_TYPE nTypId );
-    virtual RSCCLASS_TYPE   GetClassType() const override;
 
     void            SetRefClass( RscTop * pClass ) { pRefClass = pClass; }
     RSCINST         Create( RSCINST * pInst, const RSCINST & rDfltInst, bool bOwnClass = false ) override;
diff --git a/rsc/inc/rsctop.hxx b/rsc/inc/rsctop.hxx
index 43f118ed98d5..e9dab39dbf1c 100644
--- a/rsc/inc/rsctop.hxx
+++ b/rsc/inc/rsctop.hxx
@@ -66,7 +66,6 @@ public:
             void    SetCallPar( const OString& rPar1, const OString& rPar2,
                                 const OString& rParType );
             RscTop* GetRefClass() const { return pRefClass; }
-    virtual RSCCLASS_TYPE GetClassType() const = 0;
             RSCINST const & GetDefault();
 
                     // preparation fro the destructor call
@@ -92,9 +91,6 @@ public:
                                  RSCVAR nVarType = RSCVAR::NONE, sal_uInt32 nMask = 0,
                                  Atom nDataBaseName = InvalidAtom );
 
-                    // enumerate all variables
-    virtual void    EnumVariables( void * pData, VarEnumCallbackProc );
-
                     // returns variable instance
                     // returned pData, pClass may be NULL
     virtual RSCINST GetVariable( const RSCINST & rInst, Atom nVarName,
diff --git a/rsc/source/parser/rscdb.cxx b/rsc/source/parser/rscdb.cxx
index 1b76102351e2..e61532613769 100644
--- a/rsc/source/parser/rscdb.cxx
+++ b/rsc/source/parser/rscdb.cxx
@@ -21,11 +21,11 @@
 #include <stdio.h>
 #include <string.h>
 
-#include <tools/rc.h>
 #include <i18nlangtag/languagetag.hxx>
 #include <rtl/strbuf.hxx>
 #include <sal/log.hxx>
 #include <sal/macros.h>
+#include <tools/rcid.h>
 
 #include <rsctree.hxx>
 #include <rsctop.hxx>
@@ -44,13 +44,8 @@ RscTypCont::RscTypCont( RscError * pErrHdl,
     , nUniqueId(256)
     , nFilePos( 0 )
     , nPMId(RSC_VERSIONCONTROL + RESOURCE_TYPE(1)) // at least one more
-    , aBool( pHS->getID( "sal_Bool" ), RSC_NOTYPE )
-    , aShort( pHS->getID( "short" ), RSC_NOTYPE )
-    , aUShort( pHS->getID( "sal_uInt16" ), RSC_NOTYPE )
     , aEnumLong( pHS->getID( "enum_long" ), RSC_NOTYPE )
-    , aIdNoZeroUShort( pHS->getID( "IDUSHORT" ), RSC_NOTYPE )
     , aString( pHS->getID( "Chars" ), RSC_NOTYPE )
-    , aStringLiteral( pHS->getID( "Chars" ), RSC_NOTYPE )
     , aLangType()
     , aLangString( pHS->getID( "Lang_Chars" ), RSC_NOTYPE, &aString, &aLangType )
     , pEH(pErrHdl)
@@ -171,10 +166,6 @@ RscTypCont::~RscTypCont()
     for (RscTop* pItem : aBaseLst)
         pItem->Pre_dtor();
 
-    aBool.Pre_dtor();
-    aShort.Pre_dtor();
-    aUShort.Pre_dtor();
-    aIdNoZeroUShort.Pre_dtor();
     aString.Pre_dtor();
     aVersion.pClass->Pre_dtor();
     // sub-types
diff --git a/rsc/source/parser/rscibas.cxx b/rsc/source/parser/rscibas.cxx
index 7b58d6885d77..8aea89f93937 100644
--- a/rsc/source/parser/rscibas.cxx
+++ b/rsc/source/parser/rscibas.cxx
@@ -29,7 +29,6 @@
 #include <tools/fldunit.hxx>
 #include <tools/gen.hxx>
 #include <tools/mapunit.hxx>
-#include <tools/rc.h>
 #include <tools/wintypes.hxx>
 #include <rsc/rsc-vcl-shared-types.hxx>
 
diff --git a/rsc/source/parser/rscicpx.cxx b/rsc/source/parser/rscicpx.cxx
index 69651c7cdd49..929ed89be284 100644
--- a/rsc/source/parser/rscicpx.cxx
+++ b/rsc/source/parser/rscicpx.cxx
@@ -21,7 +21,7 @@
 #include <stdlib.h>
 #include <stdio.h>
 
-#include <tools/rc.h>
+#include <tools/rcid.h>
 #include <tools/wintypes.hxx>
 #include <rsc/rsc-vcl-shared-types.hxx>
 
@@ -88,130 +88,4 @@ RscTop * RscTypCont::InitClassBitmap( RscTop * pSuper )
     return pClassBitmap;
 }
 
-RscTop * RscTypCont::InitClassMenuItem( RscTop * pSuper )
-{
-    Atom        nId;
-    RscTop *    pClassMenuItem;
-
-    // initialize class
-    nId = pHS->getID( "MenuItem" );
-    pClassMenuItem = new RscClass( nId, RSC_MENUITEM, pSuper );
-    aNmTb.Put( nId, CLASSNAME, pClassMenuItem );
-
-    // initialize variables
-    nId = aNmTb.Put( "Separator", VARNAME );
-    pClassMenuItem->SetVariable( nId, &aBool, nullptr, RSCVAR::NONE,
-                                 (sal_uInt32)RscMenuItem::Separator );
-    nId = aNmTb.Put( "Identifier", VARNAME );
-    pClassMenuItem->SetVariable( nId, &aIdNoZeroUShort, nullptr, RSCVAR::NONE,
-                                 (sal_uInt32)RscMenuItem::Id );
-    {
-        RscFlag *   pFlag;
-        RscClient * pClient;
-        Atom        nVarId, nAutoCheckId, nRadioCheckId;
-        Atom        nCheckableId, nAboutId, nHelpId;
-
-        aBaseLst.push_back( pFlag = new RscFlag( pHS->getID( "FlagMenuState" ), RSC_NOTYPE ) );
-
-        // set constants in table
-        nCheckableId = pHS->getID( "MIB_CHECKABLE" );
-        SETCONST( pFlag, nCheckableId, MenuItemBits::CHECKABLE );
-        nAutoCheckId = pHS->getID( "MIB_AUTOCHECK" );
-        SETCONST( pFlag, nAutoCheckId, MenuItemBits::AUTOCHECK );
-        nRadioCheckId = pHS->getID( "MIB_RADIOCHECK" );
-        SETCONST( pFlag, nRadioCheckId, MenuItemBits::RADIOCHECK );
-        nAboutId = pHS->getID( "MIB_ABOUT" );
-        SETCONST( pFlag, nAboutId, MenuItemBits::ABOUT );
-        nHelpId = pHS->getID( "MIB_HELP" );
-        SETCONST( pFlag, nHelpId, MenuItemBits::HELP );
-
-        // add variable
-        nVarId = aNmTb.Put( "_MenuItemFlags", VARNAME );
-        pClassMenuItem->SetVariable( nVarId, pFlag, nullptr,
-                                     RSCVAR::Hidden | RSCVAR::NoEnum,
-                                     (sal_uInt32)RscMenuItem::Status );
-
-        // add client variables
-        aBaseLst.push_back(
-            pClient = new RscClient( pHS->getID( "sal_Bool" ), RSC_NOTYPE, pFlag, nCheckableId )
-        );
-        nId = aNmTb.Put( "Checkable", VARNAME );
-        pClassMenuItem->SetVariable( nId, pClient, nullptr,
-                                     RSCVAR::NoDataInst, 0, nVarId );
-
-        aBaseLst.push_back(
-            pClient = new RscClient( pHS->getID( "sal_Bool" ), RSC_NOTYPE, pFlag, nAutoCheckId )
-        );
-        nId = aNmTb.Put( "AutoCheck", VARNAME );
-        pClassMenuItem->SetVariable( nId, pClient, nullptr,
-                                     RSCVAR::NoDataInst, 0, nVarId );
-
-        aBaseLst.push_back(
-            pClient = new RscClient( pHS->getID( "sal_Bool" ), RSC_NOTYPE, pFlag, nRadioCheckId )
-        );
-        nId = aNmTb.Put( "RadioCheck", VARNAME );
-        pClassMenuItem->SetVariable( nId, pClient, nullptr,
-                                     RSCVAR::NoDataInst, 0, nVarId );
-
-        aBaseLst.push_back(
-            pClient = new RscClient( pHS->getID( "sal_Bool" ), RSC_NOTYPE, pFlag, nAboutId )
-        );
-        nId = aNmTb.Put( "About", VARNAME );
-        pClassMenuItem->SetVariable( nId, pClient, nullptr,
-                                     RSCVAR::NoDataInst, 0, nVarId );
-
-        aBaseLst.push_back(
-            pClient = new RscClient( pHS->getID( "sal_Bool" ), RSC_NOTYPE, pFlag, nHelpId )
-        );
-        nId = aNmTb.Put( "Help", VARNAME );
-        pClassMenuItem->SetVariable( nId, pClient, nullptr,
-                                     RSCVAR::NoDataInst, 0, nVarId );
-
-    }
-    nId = aNmTb.Put( "Text", VARNAME );
-    pClassMenuItem->SetVariable( nId, &aLangString, nullptr, RSCVAR::NONE,
-                                 (sal_uInt32)RscMenuItem::Text );
-    nId = aNmTb.Put( "HelpText", VARNAME );
-    pClassMenuItem->SetVariable( nId, &aLangString, nullptr, RSCVAR::NONE,
-                                 (sal_uInt32)RscMenuItem::HelpText );
-    nId = aNmTb.Put( "HelpID", VARNAME );
-    pClassMenuItem->SetVariable( nId, &aStringLiteral, nullptr, RSCVAR::NONE,
-                                 (sal_uInt32)RscMenuItem::HelpId );
-    nId = aNmTb.Put( "Disable", VARNAME );
-    pClassMenuItem->SetVariable( nId, &aBool, nullptr, RSCVAR::NONE,
-                                 (sal_uInt32)RscMenuItem::Disable );
-    nId = aNmTb.Put( "Command", VARNAME );
-    pClassMenuItem->SetVariable( nId, &aString, nullptr, RSCVAR::NONE,
-                                    (sal_uInt32)RscMenuItem::Command );
-
-    return pClassMenuItem;
-}
-
-RscTop * RscTypCont::InitClassMenu( RscTop * pSuper,
-                                    RscTop * pClassMenuItem )
-{
-    Atom        nId;
-    RscTop *    pClassMenu;
-
-    // initialize class
-    nId = pHS->getID( "Menu" );
-    pClassMenu = new RscClass( nId, RSC_MENU, pSuper );
-    pClassMenu->SetCallPar( *pStdPar1, *pStdPar2, *pStdParType );
-    aNmTb.Put( nId, CLASSNAME, pClassMenu );
-
-    // initialize variables
-    {
-        RscCont * pCont;
-
-        aBaseLst.push_back( pCont = new RscCont( pHS->getID( "ContMenuItem" ), RSC_NOTYPE ) );
-        pCont->SetTypeClass( pClassMenuItem );
-        nId = aNmTb.Put( "ItemList", VARNAME );
-        pClassMenu->SetVariable( nId, pCont, nullptr, RSCVAR::NONE, (sal_uInt32)RscMenu::Items );
-    }
-    nId = aNmTb.Put( "Text", VARNAME );
-    pClassMenu->SetVariable( nId, &aLangString, nullptr, RSCVAR::NONE, (sal_uInt32)RscMenu::Text );
-
-    return pClassMenu;
-}
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/rsc/source/parser/rscinit.cxx b/rsc/source/parser/rscinit.cxx
index 4ecf9f657fdd..a330f739fe2d 100644
--- a/rsc/source/parser/rscinit.cxx
+++ b/rsc/source/parser/rscinit.cxx
@@ -21,14 +21,13 @@
 #include <stdlib.h>
 #include <stdio.h>
 
-#include <tools/rc.h>
+#include <tools/rcid.h>
 #include <tools/wintypes.hxx>
 
 #include <rsctree.hxx>
 #include <rsctop.hxx>
 #include <rscrange.hxx>
 #include <rscconst.hxx>
-#include <rscflag.hxx>
 #include <rscstr.hxx>
 #include <rsccont.hxx>
 #include <rscmgr.hxx>
@@ -67,13 +66,7 @@ void RscTypCont::Init()
     aNmTb.Put( "FALSE",              BOOLEAN,        (sal_IntPtr)false );
 }
 {
-    aShort.SetRange( -32768, 32767 );
-
-    aUShort.SetRange( 0, 0xFFFF );
-
     aEnumLong.SetRange( SAL_MIN_INT32, SAL_MAX_INT32 );
-
-    aIdNoZeroUShort.SetRange( 1, 0xFFFF );
 }
 {
     aLangType.Init( aNmTb );
@@ -111,18 +104,6 @@ void RscTypCont::Init()
     pRoot->Insert( pClassBitmap );
 
 }
-{
-    RscTop* pClassMenuItem = InitClassMenuItem(pClassMgr);
-    pRoot->Insert( pClassMenuItem );
-
-    RscTop* pClassMenu = InitClassMenu( pClassMgr, pClassMenuItem );
-    pRoot->Insert( pClassMenu );
-
-    // pClassMenu is only completely defined here
-    nId = aNmTb.Put( "SubMenu", VARNAME );
-    pClassMenuItem->SetVariable( nId, pClassMenu, nullptr, RSCVAR::SvDynamic,
-                                 (sal_uInt32)RscMenuItem::Menu );
-}
 
     aNmTb.SetSort();
 }
diff --git a/rsc/source/parser/rscyacc.y b/rsc/source/parser/rscyacc.y
index d4cad7f1103c..6fd4eda414ef 100644
--- a/rsc/source/parser/rscyacc.y
+++ b/rsc/source/parser/rscyacc.y
@@ -25,7 +25,6 @@
 #include <string.h>
 
 #include <rtl/strbuf.hxx>
-#include <tools/rc.h>
 #include <rscerror.h>
 #include <rsctools.hxx>
 #include <rscclass.hxx>
diff --git a/rsc/source/res/rscarray.cxx b/rsc/source/res/rscarray.cxx
index 0b86f75a73b3..3efd01a3dad0 100644
--- a/rsc/source/res/rscarray.cxx
+++ b/rsc/source/res/rscarray.cxx
@@ -56,11 +56,6 @@ RscArray::~RscArray()
 {
 }
 
-RSCCLASS_TYPE RscArray::GetClassType() const
-{
-    return RSCCLASS_ENUMARRAY;
-}
-
 RscTop * RscArray::GetTypeClass() const
 {
     return pTypeClass;
@@ -428,13 +423,4 @@ RscLangArray::RscLangArray( Atom nId, RESOURCE_TYPE nTypeId, RscTop * pSuper,
 {
 }
 
-RSCCLASS_TYPE RscLangArray::GetClassType() const
-{
-    if( GetSuperClass() )
-        return GetSuperClass()->GetClassType();
-    else
-        return RscArray::GetClassType();
-
-}
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/rsc/source/res/rscclass.cxx b/rsc/source/res/rscclass.cxx
index 1bbac234094c..a6922310308f 100644
--- a/rsc/source/res/rscclass.cxx
+++ b/rsc/source/res/rscclass.cxx
@@ -26,7 +26,6 @@
 #include <rscclass.hxx>
 
 #include <tools/rcid.h>
-#include <tools/rc.h>
 
 RscClass::RscClass( Atom nId, RESOURCE_TYPE nTypeId, RscTop * pSuperCl )
     : RscTop( nId, nTypeId, pSuperCl )
@@ -61,11 +60,6 @@ RscClass::~RscClass()
         rtl_freeMemory( static_cast<void *>(pVarTypeList) );
 }
 
-RSCCLASS_TYPE RscClass::GetClassType() const
-{
-    return RSCCLASS_COMPLEX;
-}
-
 RSCINST RscClass::GetInstData
 (
     CLASS_DATA pData,
@@ -262,18 +256,6 @@ ERRTYPE RscClass::SetVariable( Atom nVarName,
     return ERR_OK;
 }
 
-void RscClass::EnumVariables( void * pData, VarEnumCallbackProc pProc )
-{
-    sal_uInt32 i;
-
-    RscTop::EnumVariables( pData, pProc );
-    for( i = 0; i < nEntries; i ++ )
-    {
-        if( !(pVarTypeList[ i ].nVarType & RSCVAR::NoEnum) )
-            (*pProc)( pData, pVarTypeList[ i ].pClass->GetClassType(), pVarTypeList[ i ].nVarName );
-    }
-}
-
 RSCINST RscClass::GetVariable( const RSCINST & rInst,
                                Atom nVarName,
                                const RSCINST & rInitInst,
diff --git a/rsc/source/res/rscconst.cxx b/rsc/source/res/rscconst.cxx
index 81c9010572df..281c8b02ad3b 100644
--- a/rsc/source/res/rscconst.cxx
+++ b/rsc/source/res/rscconst.cxx
@@ -38,11 +38,6 @@ RscConst::~RscConst()
         rtl_freeMemory( static_cast<void *>(pVarArray) );
 }
 
-RSCCLASS_TYPE RscConst::GetClassType() const
-{
-    return RSCCLASS_CONST;
-}
-
 void RscConst::SetConstant( Atom nVarName, sal_Int32 lValue )
 {
     if( pVarArray )
diff --git a/rsc/source/res/rsccont.cxx b/rsc/source/res/rsccont.cxx
index 636cbe4e4feb..dad3aa9db830 100644
--- a/rsc/source/res/rsccont.cxx
+++ b/rsc/source/res/rsccont.cxx
@@ -49,11 +49,6 @@ RscBaseCont::~RscBaseCont()
 {
 }
 
-RSCCLASS_TYPE RscBaseCont::GetClassType() const
-{
-    return RSCCLASS_COMPLEX;
-}
-
 void RscBaseCont::DestroyElements( RscBaseContInst * pClassData )
 {
     if( pClassData->nEntries )
diff --git a/rsc/source/res/rscflag.cxx b/rsc/source/res/rscflag.cxx
deleted file mode 100644
index 10661816092f..000000000000
--- a/rsc/source/res/rscflag.cxx
+++ /dev/null
@@ -1,347 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-
-#include <rscflag.hxx>
-
-RscFlag::RscFlag( Atom nId, RESOURCE_TYPE nTypeId )
-    : RscConst( nId, nTypeId )
-{
-}
-
-sal_uInt32 RscFlag::Size() const
-{
-    return ALIGNED_SIZE( sizeof( RscFlagInst ) *
-            ( 1 + (nEntries -1) / (sizeof( sal_uInt32 ) * 8) ) );
-}
-
-ERRTYPE RscFlag::SetNotConst( const RSCINST & rInst, Atom nConst )
-{
-    sal_uInt32 i = 0;
-
-    if( nEntries != (i = GetConstPos( nConst )) )
-    {
-        sal_uInt32 nFlag = 1 << (i % (sizeof( sal_uInt32 ) * 8) );
-
-        i = i / (sizeof( sal_uInt32 ) * 8);
-        reinterpret_cast<RscFlagInst *>(rInst.pData)[ i ].nFlags     &= ~nFlag;
-        reinterpret_cast<RscFlagInst *>(rInst.pData)[ i ].nDfltFlags &= ~nFlag;
-        return ERR_OK;
-    }
-
-    return ERR_RSCFLAG;
-}
-
-ERRTYPE RscFlag::SetConst( const RSCINST & rInst, Atom nConst, sal_Int32 /*nVal*/ )
-{
-    sal_uInt32 i = 0;
-
-    if( nEntries != (i = GetConstPos( nConst )) )
-    {
-        sal_uInt32 nFlag = 1 << (i % (sizeof( sal_uInt32 ) * 8) );
-
-        i = i / (sizeof( sal_uInt32 ) * 8);
-        reinterpret_cast<RscFlagInst *>(rInst.pData)[ i ].nFlags     |= nFlag;
-        reinterpret_cast<RscFlagInst *>(rInst.pData)[ i ].nDfltFlags &= ~nFlag;
-        return ERR_OK;
-    }
-
-    return ERR_RSCFLAG;
-}
-
-RSCINST RscFlag::CreateBasic( RSCINST * pInst )
-{
-    RSCINST aInst;
-
-    if( !pInst )
-    {
-        aInst.pClass = this;
-        aInst.pData = static_cast<CLASS_DATA>(rtl_allocateMemory( Size() ));
-    }
-    else
-        aInst = *pInst;
-
-    return aInst;
-}
-
-RSCINST RscFlag::Create( RSCINST * pInst, const RSCINST & rDflt, bool bOwnClass )
-{
-    RSCINST aInst = CreateBasic( pInst );
-
-    if( !bOwnClass && rDflt.IsInst() )
-        bOwnClass = rDflt.pClass->InHierarchy( this );
-
-    if( bOwnClass )
-        memmove( aInst.pData, rDflt.pData, Size() );
-    else
-    {
-        for( sal_uInt32 i = 0; i < Size() / sizeof( RscFlagInst ); i++ )
-        {
-            reinterpret_cast<RscFlagInst *>(aInst.pData)[ i ].nFlags = 0;
-            reinterpret_cast<RscFlagInst *>(aInst.pData)[ i ].nDfltFlags = 0xFFFFFFFF;
-        }
-    }
-
-    return aInst;
-}
-
-RSCINST RscFlag::CreateClient( RSCINST * pInst, const RSCINST & rDfltI,
-                               bool bOwnClass, Atom nConstId )
-{
-    RSCINST aInst = CreateBasic( pInst );
-    sal_uInt32 i = 0;
-
-    if( !bOwnClass && rDfltI.IsInst() )
-        bOwnClass = rDfltI.pClass->InHierarchy( this );
-
-    if( nEntries != (i = GetConstPos( nConstId )) )
-    {
-        sal_uInt32 nFlag = 1 << (i % (sizeof( sal_uInt32 ) * 8) );
-        i = i / (sizeof( sal_uInt32 ) * 8);
-        if( bOwnClass )
-        {
-            reinterpret_cast<RscFlagInst *>(aInst.pData)[ i ].nFlags &=
-                ~nFlag | reinterpret_cast<RscFlagInst *>(rDfltI.pData)[ i ].nFlags;
-            reinterpret_cast<RscFlagInst *>(aInst.pData)[ i ].nDfltFlags &=
-                ~nFlag | reinterpret_cast<RscFlagInst *>(rDfltI.pData)[ i ].nDfltFlags;
-        }
-        else
-        {
-            reinterpret_cast<RscFlagInst *>(aInst.pData)[ i ].nFlags &= ~nFlag;
-            reinterpret_cast<RscFlagInst *>(aInst.pData)[ i ].nDfltFlags |= nFlag;
-        }
-    }
-
-    return aInst;
-}
-
-void RscFlag::SetToDefault( const RSCINST & rInst )
-{
-    sal_uInt32 i = 0;
-
-    for( i = 0; i < Size() / sizeof( RscFlagInst ); i++ )
-        reinterpret_cast<RscFlagInst *>(rInst.pData)[ i ].nDfltFlags = 0xFFFFFFFF;
-}
-
-bool RscFlag::IsDefault( const RSCINST & rInst )
-{
-    sal_uInt32 i = 0;
-
-    for( i = 0; i < Size() / sizeof( RscFlagInst ); i++ )
-    {
-        if( reinterpret_cast<RscFlagInst *>(rInst.pData)[ i ].nDfltFlags != 0xFFFFFFFF )
-            return false;
-    }
-    return true;
-}
-
-bool RscFlag::IsDefault( const RSCINST & rInst, Atom nConstId )
-{
-    sal_uInt32 i = 0, nFlag = 0;
-
-    if( nEntries != (i = GetConstPos( nConstId )) )
-    {
-        nFlag = 1 << (i % (sizeof( sal_uInt32 ) * 8) );
-        i = i / (sizeof( sal_uInt32 ) * 8);
-
-        if( reinterpret_cast<RscFlagInst *>(rInst.pData)[ i ].nDfltFlags & nFlag )
-            return true ;
-        else
-            return false;
-    }
-    return true;
-}
-
-bool RscFlag::IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef,
-                              Atom nConstId )
-{
-    sal_uInt32 i = 0, nFlag = 0;
-
-    if( nEntries != (i = GetConstPos( nConstId )) )
-    {
-        nFlag = 1 << (i % (sizeof( sal_uInt32 ) * 8) );
-        i = i / (sizeof( sal_uInt32 ) * 8);
-
-        if( pDef )
-        {
-            if( (reinterpret_cast<RscFlagInst *>(rInst.pData)[ i ].nFlags & nFlag) ==
-                (reinterpret_cast<RscFlagInst *>(pDef)[ i ].nFlags & nFlag) )
-            {
-                return true;
-            }
-        }
-    }
-
-    return false;
-}
-
-bool RscFlag::IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef )
-{
-    if( pDef )
-    {
-        sal_uInt32  Flag = 0, nIndex = 0;
-
-        Flag = 1;
-        for( sal_uInt32 i = 0; i < nEntries; i++ )
-        {
-            nIndex = i / (sizeof( sal_uInt32 ) * 8);
-
-            if( (reinterpret_cast<RscFlagInst *>(rInst.pData)[ nIndex ].nFlags & Flag) !=
-                (reinterpret_cast<RscFlagInst *>(pDef)[ nIndex ].nFlags & Flag)  )
-            {
-                return false;
-            }
-            Flag <<= 1;
-            if( !Flag )
-                Flag = 1;
-        }
-    }
-    else
-        return false;
-
-    return true;
-}
-
-bool RscFlag::IsSet( const RSCINST & rInst, Atom nConstId )
-{
-    sal_uInt32 i = 0, nFlag = 0;
-
-    if( nEntries != (i = GetConstPos( nConstId )) )
-    {
-        nFlag = 1 << (i % (sizeof( sal_uInt32 ) * 8) );
-        i = i / (sizeof( sal_uInt32 ) * 8);
-
-        if( reinterpret_cast<RscFlagInst *>(rInst.pData)[ i ].nFlags & nFlag )
-            return true;
-        else
-            return false;
-    }
-    return true;
-}
-
-void RscFlag::WriteSrc( const RSCINST & rInst, FILE * fOutput,
-                        RscTypCont *, sal_uInt32, const char * )
-{
-    sal_uInt32  i = 0, Flag = 0, nIndex = 0;
-    bool    bComma = false;
-
-    Flag = 1;
-    for( i = 0; i < nEntries; i++ )
-    {
-        nIndex = i / (sizeof( sal_uInt32 ) * 8);
-        if( !( reinterpret_cast<RscFlagInst *>(rInst.pData)[ nIndex ].nDfltFlags & Flag) )
-        {
-            if( bComma )
-                fprintf( fOutput, ", " );
-
-            if( reinterpret_cast<RscFlagInst *>(rInst.pData)[ nIndex ].nFlags & Flag )
-                fprintf( fOutput, "%s", pHS->getString( pVarArray[ i ].nId ).getStr() );
-            else
-            {
-                fprintf( fOutput, "not " );
-                fprintf( fOutput, "%s", pHS->getString( pVarArray[ i ].nId ).getStr() );
-            }
-            bComma = true;
-        }
-        Flag <<= 1;
-        if( !Flag )
-            Flag = 1;
-    }
-}
-
-ERRTYPE RscFlag::WriteRc( const RSCINST & rInst, RscWriteRc & aMem,
-                          RscTypCont *, sal_uInt32 )
-{
-    sal_Int32   lVal = 0;
-    sal_uInt32  i = 0, Flag = 0, nIndex = 0;
-
-    Flag = 1;
-    for( i = 0; i < nEntries; i++ )
-    {
-        nIndex = i / (sizeof( sal_uInt32 ) * 8);
-
-        if( reinterpret_cast<RscFlagInst *>(rInst.pData)[ nIndex ].nFlags & Flag )
-            lVal |= pVarArray[ i ].lValue;
-
-        Flag <<= 1;
-        if( !Flag )
-            Flag = 1;
-    }
-
-    aMem.Put( lVal );
-    return ERR_OK;
-}
-
-RscClient::RscClient( Atom nId, RESOURCE_TYPE nTypeId, RscFlag * pClass,
-                      Atom nConstantId )
-    : RscTop(nId, nTypeId), pRefClass(pClass), nConstId(nConstantId)
-{
-}
-
-RSCCLASS_TYPE RscClient::GetClassType() const
-{
-    return RSCCLASS_BOOL;
-}
-
-void RscClient::WriteSrc( const RSCINST & rInst, FILE * fOutput,
-                          RscTypCont *, sal_uInt32, const char * )
-{
-    if( pRefClass->IsSet( rInst, nConstId ) )
-        fprintf( fOutput, "TRUE" );
-    else
-        fprintf( fOutput, "FALSE" );
-}
-
-RSCINST RscClient::Create( RSCINST * pInst, const RSCINST & rDflt,
-                           bool bOwnClass )
-{
-    RSCINST aTmpI, aDfltI;
-
-    if( pInst )
-    {
-        aTmpI.pClass = pRefClass;
-        aTmpI.pData  = pInst->pData;
-    }
-
-    if( !bOwnClass && rDflt.IsInst() )
-    {
-        bOwnClass = rDflt.pClass->InHierarchy( this );
-        if( bOwnClass )
-        {
-            aDfltI.pClass = pRefClass;
-            aDfltI.pData = rDflt.pData;
-        }
-    }
-
-    if( pInst )
-        aTmpI = pRefClass->CreateClient( &aTmpI, aDfltI,
-                                         bOwnClass, nConstId );
-    else
-        aTmpI = pRefClass->CreateClient( nullptr, aDfltI,
-                                         bOwnClass, nConstId );
-    aTmpI.pClass = this;
-
-    return aTmpI;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/rsc/source/res/rscrange.cxx b/rsc/source/res/rscrange.cxx
index a5ef683b7ee0..db7957d07644 100644
--- a/rsc/source/res/rscrange.cxx
+++ b/rsc/source/res/rscrange.cxx
@@ -24,128 +24,12 @@
 
 #include <rscrange.hxx>
 
-RscRange::RscRange( Atom nId, RESOURCE_TYPE nTypeId )
-    : RscTop( nId, nTypeId )
-    , nMin(0), nMax(0)
-{
-}
-
-RSCCLASS_TYPE RscRange::GetClassType() const
-{
-    return RSCCLASS_NUMBER;
-}
-
-void RscRange::SetRange( sal_Int32 nMinimum, sal_Int32 nMaximum )
-{
-    if( nMinimum > nMaximum )
-    {
-        nMin = nMaximum;
-        nMax = nMinimum;
-    }
-    else
-    {
-        nMax = nMaximum;
-        nMin = nMinimum;
-    }
-}
-
-bool RscRange::IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef )
-{
-    if( pDef )
-    {
-        if( reinterpret_cast<RscRangeInst*>(rInst.pData)->nValue ==
-            reinterpret_cast<RscRangeInst*>(pDef)->nValue )
-        {
-            return true;
-        }
-    }
-
-    return false;
-}
-
-ERRTYPE RscRange::SetNumber( const RSCINST & rInst, sal_Int32 nValue )
-{
-    if( nMax < nValue || nMin > nValue )
-        return ERR_RSCRANGE_OUTDEFSET;
-
-    reinterpret_cast<RscRangeInst *>(rInst.pData)->nValue = (sal_uInt16)( nValue - nMin );
-    reinterpret_cast<RscRangeInst *>(rInst.pData)->bDflt = false;
-    return ERR_OK;
-}
-
-ERRTYPE RscRange::GetNumber( const RSCINST & rInst, sal_Int32 * pN )
-{
-    *pN = reinterpret_cast<RscRangeInst *>(rInst.pData)->nValue + nMin;
-    return ERR_OK;
-}
-
-RSCINST RscRange::Create( RSCINST * pInst, const RSCINST & rDflt,
-                          bool bOwnClass )
-{
-    RSCINST aInst;
-
-    if( !pInst )
-    {
-        aInst.pClass = this;
-        aInst.pData = static_cast<CLASS_DATA>(rtl_allocateMemory( sizeof( RscRangeInst ) ));
-    }
-    else
-        aInst = *pInst;
-
-    if( !bOwnClass && rDflt.IsInst() )
-        bOwnClass = rDflt.pClass->InHierarchy( this );
-
-    if( bOwnClass )
-        memmove( aInst.pData, rDflt.pData, sizeof( RscRangeInst ) );
-    else
-    {
-        if( 0 >= nMin && 0 <= nMax )
-            reinterpret_cast<RscRangeInst *>(aInst.pData)->nValue = (sal_uInt16)(0 - nMin);
-        else
-            reinterpret_cast<RscRangeInst *>(aInst.pData)->nValue = 0;
-
-        reinterpret_cast<RscRangeInst *>(aInst.pData)->bDflt = true;
-    }
-
-    return aInst;
-}
-
-void RscRange::WriteSrc( const RSCINST & rInst, FILE * fOutput,
-                         RscTypCont *, sal_uInt32, const char * )
-{
-    fprintf( fOutput, "%ld", long( reinterpret_cast<RscRangeInst *>(rInst.pData)->nValue + nMin ) );
-}
-
-ERRTYPE RscRange::WriteRc( const RSCINST & rInst, RscWriteRc & aMem,
-                           RscTypCont *, sal_uInt32 )
-{
-    if( nMin >= 0 )
-    {
-        sal_uInt16 n;
-        n = (sal_uInt16)(reinterpret_cast<RscRangeInst *>(rInst.pData)->nValue + nMin);
-        aMem.Put( n );
-    }
-    else
-    {
-        sal_Int16 n;
-        n = (sal_Int16)(reinterpret_cast<RscRangeInst *>(rInst.pData)->nValue + nMin);
-        aMem.Put( n );
-    }
-
-    return ERR_OK;
-}
-
 RscLongRange::RscLongRange( Atom nId, RESOURCE_TYPE nTypeId )
     : RscTop( nId, nTypeId )
     , nMin(0), nMax(0)
 {
 }
 
-RSCCLASS_TYPE RscLongRange::GetClassType() const
-{
-    return RSCCLASS_NUMBER;
-}
-
 void RscLongRange::SetRange( sal_Int32 nMinimum, sal_Int32 nMaximum )
 {
     if( nMinimum > nMaximum )
@@ -252,164 +136,4 @@ ERRTYPE RscLongEnumRange::SetConst( const RSCINST & rInst, Atom /*nConst*/,
     return SetNumber( rInst, nValue );
 }
 
-RscIdRange::RscIdRange( Atom nId, RESOURCE_TYPE nTypeId )
-    : RscTop( nId, nTypeId )
-    , nMin(0), nMax(0)
-{
-}
-
-RSCCLASS_TYPE RscIdRange::GetClassType() const
-{
-    return RSCCLASS_NUMBER;
-}
-
-RSCINST RscIdRange::Create( RSCINST * pInst, const RSCINST & rDflt, bool bOwnClass )
-{
-    RSCINST aInst;
-    RscId * pClassData;
-
-    if( !pInst )
-    {
-        aInst.pClass = this;
-        aInst.pData = static_cast<CLASS_DATA>(rtl_allocateMemory( sizeof( RscId ) ));
-    }
-    else
-        aInst = *pInst;
-
-
-    if( !bOwnClass && rDflt.IsInst() )
-        bOwnClass = rDflt.pClass->InHierarchy( this );
-
-    pClassData = reinterpret_cast<RscId *>(aInst.pData);
-
-    pClassData->Create();
-
-    if( bOwnClass )
-        *pClassData = *reinterpret_cast<RscId *>(rDflt.pData);
-    else
-    {
-        *pClassData = RscId();
-        if( 0 >= nMin && 0 <= nMax )
-            *pClassData = RscId( (sal_Int32)0 );
-        else
-            *pClassData = RscId( nMin );
-
-        //cUnusedi is used as default identifier
-        reinterpret_cast<RscId *>(aInst.pData)->aExp.cUnused = true;
-    }
-
-    return aInst;
-}
-
-void RscIdRange::Destroy( const RSCINST & rInst )
-{
-    reinterpret_cast<RscId *>(rInst.pData)->Destroy();
-}
-
-bool RscIdRange::IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef )
-{
-    if( pDef )
-    {
-        if( reinterpret_cast<RscId*>(rInst.pData)->aExp.IsNumber() &&
-            reinterpret_cast<RscId*>(pDef)->aExp.IsNumber() )
-        {
-            if( reinterpret_cast<RscId*>(rInst.pData)->GetNumber() ==
-                reinterpret_cast<RscId*>(pDef)->GetNumber() )
-            {
-                return true;
-            }
-        }
-    }
-
-    return false;
-}
-
-ERRTYPE RscIdRange::SetNumber( const RSCINST & rInst, sal_Int32 nValue )
-{
-    if( nMax < nValue || nMin > nValue )
-        return ERR_RSCRANGE_OUTDEFSET;
-
-    *reinterpret_cast<RscId *>(rInst.pData) = RscId( nValue );
-    reinterpret_cast<RscId *>(rInst.pData)->aExp.cUnused = false;
-    return ERR_OK;
-}
-
-ERRTYPE RscIdRange::GetNumber( const RSCINST & rInst, sal_Int32 * plValue )
-{
-    *plValue = reinterpret_cast<RscId *>(rInst.pData)->GetNumber();
-    return ERR_OK;
-}
-
-ERRTYPE RscIdRange::SetRef( const RSCINST & rInst, const RscId & rRscId )
-{
-    ERRTYPE aError;
-    if( rRscId.IsId() )
-    {
-        aError = SetNumber( rInst, rRscId.GetNumber() );
-        if( aError.IsOk() )
-        {
-            *reinterpret_cast<RscId *>(rInst.pData) = rRscId;
-            reinterpret_cast<RscId *>(rInst.pData)->aExp.cUnused = false;
-        }
-    }
-    else
-        aError = ERR_RSCRANGE_OUTDEFSET;
-
-    return aError;
-}
-
-ERRTYPE RscIdRange::GetRef( const RSCINST & rInst, RscId * pRscId )
-{
-    *pRscId = *reinterpret_cast<RscId *>(rInst.pData);
-
-    return ERR_OK;
-}
-
-void RscIdRange::WriteSrc( const RSCINST & rInst, FILE * fOutput,
-                           RscTypCont *, sal_uInt32, const char * )
-{
-    fprintf( fOutput, "%s", reinterpret_cast<RscId *>(rInst.pData)->GetName().getStr() );
-}
-
-ERRTYPE RscIdRange::WriteRc( const RSCINST & rInst, RscWriteRc & aMem,
-                             RscTypCont *, sal_uInt32 )
-{
-    sal_Int32 lVal = reinterpret_cast<RscId*>(rInst.pData)->GetNumber();
-
-    aMem.Put( lVal );
-
-    return ERR_OK;
-}
-
-bool RscIdRange::IsConsistent( const RSCINST & rInst )
-{
-    long nValue = reinterpret_cast<RscId *>(rInst.pData)->GetNumber();
-
-    return (nMax >= nValue) && (nMin <= nValue);
-
-}
-
-RscBool::RscBool( Atom nId, RESOURCE_TYPE nTypeId )
-    : RscRange( nId, nTypeId )
-{
-    RscRange::SetRange( 0, 1 );
-}
-
-RSCCLASS_TYPE  RscBool::GetClassType() const
-{
-    return RSCCLASS_BOOL;
-}
-
-void RscBool::WriteSrc( const RSCINST & rInst, FILE * fOutput,
-                        RscTypCont *, sal_uInt32, const char * )
-{
-    sal_Int32 l;
-
-    GetNumber( rInst, &l );
-    if( l )
-        fprintf( fOutput, "TRUE" );
-    else
-        fprintf( fOutput, "FALSE" );
-}
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/rsc/source/res/rscstr.cxx b/rsc/source/res/rscstr.cxx
index 90213085743a..918fb5ab1afb 100644
--- a/rsc/source/res/rscstr.cxx
+++ b/rsc/source/res/rscstr.cxx
@@ -34,11 +34,6 @@ RscString::RscString( Atom nId, RESOURCE_TYPE nTypeId )
 {
 }
 
-RSCCLASS_TYPE RscString::GetClassType() const
-{
-    return RSCCLASS_STRING;
-}
-
 ERRTYPE RscString::SetString( const RSCINST & rInst, const char * pStr )
 {
     char    * pTmp;
diff --git a/rsc/source/res/rsctop.cxx b/rsc/source/res/rsctop.cxx
index 3d447796b89d..adc61de5a086 100644
--- a/rsc/source/res/rsctop.cxx
+++ b/rsc/source/res/rsctop.cxx
@@ -102,12 +102,6 @@ ERRTYPE RscTop::SetVariable( Atom nVarName, RscTop * pClass,
         return ERR_UNKNOWN_METHOD;
 }
 
-void RscTop::EnumVariables( void * pData, VarEnumCallbackProc pProc )
-{
-    if( pSuperClass )
-        pSuperClass->EnumVariables( pData, pProc );
-}
-
 RSCINST RscTop::GetVariable( const RSCINST & rInst,
                              Atom nVarName,
                              const RSCINST & rInitInst,
diff --git a/sc/source/core/data/funcdesc.cxx b/sc/source/core/data/funcdesc.cxx
index 9767265331dd..6db1bb73bf26 100644
--- a/sc/source/core/data/funcdesc.cxx
+++ b/sc/source/core/data/funcdesc.cxx
@@ -32,6 +32,7 @@
 #include <rtl/ustrbuf.hxx>
 #include <tools/rcid.h>
 #include <tools/resid.hxx>
+#include <tools/resmgr.hxx>
 #include <unotools/collatorwrapper.hxx>
 
 #include <memory>
diff --git a/svx/source/dialog/dialmgr.cxx b/svx/source/dialog/dialmgr.cxx
index e683a72fab3c..05d9de4fc3e9 100644
--- a/svx/source/dialog/dialmgr.cxx
+++ b/svx/source/dialog/dialmgr.cxx
@@ -17,6 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <tools/resmgr.hxx>
 #include <svx/dialmgr.hxx>
 #include <svl/solar.hrc>
 #include <vcl/svapp.hxx>
diff --git a/svx/source/gallery2/galobj.cxx b/svx/source/gallery2/galobj.cxx
index 10bc1b9e21cd..a8e1596122fd 100644
--- a/svx/source/gallery2/galobj.cxx
+++ b/svx/source/gallery2/galobj.cxx
@@ -25,6 +25,7 @@
 #include <comphelper/string.hxx>
 #include <unotools/pathoptions.hxx>
 #include <tools/rcid.h>
+#include <tools/resmgr.hxx>
 #include <tools/vcompat.hxx>
 #include <tools/helpers.hxx>
 #include <vcl/virdev.hxx>
diff --git a/svx/source/svdraw/svdetc.cxx b/svx/source/svdraw/svdetc.cxx
index 61d2576e4e53..eeb7af14dd55 100644
--- a/svx/source/svdraw/svdetc.cxx
+++ b/svx/source/svdraw/svdetc.cxx
@@ -21,6 +21,7 @@
 
 #include "editeng/forbiddencharacterstable.hxx"
 #include "officecfg/Office/Common.hxx"
+#include <tools/resmgr.hxx>
 #include <svx/svdetc.hxx>
 #include <svx/svdmodel.hxx>
 #include <svx/svdtrans.hxx>
diff --git a/tools/source/rc/rc.cxx b/tools/source/rc/rc.cxx
index 2f0ea96a9986..2fb97564a298 100644
--- a/tools/source/rc/rc.cxx
+++ b/tools/source/rc/rc.cxx
@@ -24,15 +24,6 @@
 #include <tools/rc.hxx>
 #include <tools/rcid.h>
 
-void Resource::GetRes( const ResId& rResId )
-{
-    if( rResId.GetResMgr() )
-        m_pResMgr = rResId.GetResMgr();
-    assert(m_pResMgr);
-    m_pResMgr->GetResource( rResId, this );
-    IncrementRes( sizeof( RSHEADER_TYPE ) );
-}
-
 OUString ResId::toString() const
 {
     SetRT( RSC_STRING );
diff --git a/tools/source/rc/resmgr.cxx b/tools/source/rc/resmgr.cxx
index 646d12723976..db8f9c10e362 100644
--- a/tools/source/rc/resmgr.cxx
+++ b/tools/source/rc/resmgr.cxx
@@ -1083,40 +1083,6 @@ void ResMgr::PopContext( const Resource* pResObj )
     }
 }
 
-RSHEADER_TYPE* ResMgr::CreateBlock( const ResId& rId )
-{
-    osl::Guard<osl::Mutex> aGuard( getResMgrMutex() );
-
-    if( pFallbackResMgr )
-    {
-        ResId aId( rId );
-        aId.ClearResMgr();
-        return pFallbackResMgr->CreateBlock( aId );
-    }
-
-    RSHEADER_TYPE* pHeader = nullptr;
-    if ( GetResource( rId ) )
-    {
-        // Pointer is at the beginning of the resource, thus
-        // class pointer points to the header, and the remaining size
-        // equals to total size of allocated memory
-        pHeader = static_cast<RSHEADER_TYPE*>(rtl_allocateMemory( GetRemainSize() ));
-        memcpy( pHeader, GetClass(), GetRemainSize() );
-        Increment( pHeader->GetLocalOff() ); //ans Ende setzen
-        if ( pHeader->GetLocalOff() != pHeader->GetGlobOff() )
-            // Has sub-resources, thus release them as well
-            PopContext();
-    }
-
-    return pHeader;
-}
-
-sal_Int16 ResMgr::GetShort( void const * pShort )
-{
-    return ((*(static_cast<const sal_uInt8*>(pShort) + 0) << 8) |
-            (*(static_cast<const sal_uInt8*>(pShort) + 1) << 0)   );
-}
-
 sal_Int32 ResMgr::GetLong( void const * pLong )
 {
     return ((*(static_cast<const sal_uInt8*>(pLong) + 0) << 24) |
@@ -1160,33 +1126,12 @@ sal_uInt32 ResMgr::GetString( OUString& rStr, const sal_uInt8* pStr )
     return nRet;
 }
 
-sal_uInt32 ResMgr::GetByteString( OString& rStr, const sal_uInt8* pStr )
-{
-    sal_uInt32 nLen=0;
-    sal_uInt32 nRet = GetStringSize( pStr, nLen );
-    rStr = OString( reinterpret_cast<const char*>(pStr), nLen );
-    return nRet;
-}
-
 sal_uInt32 ResMgr::GetStringSize( const sal_uInt8* pStr, sal_uInt32& nLen )
 {
     nLen = static_cast< sal_uInt32 >( strlen( reinterpret_cast<const char*>(pStr) ) );
     return GetStringSize( nLen );
 }
 
-sal_uInt32 ResMgr::GetRemainSize()
-{
-    osl::Guard<osl::Mutex> aGuard( getResMgrMutex() );
-
-    if( pFallbackResMgr )
-        return pFallbackResMgr->GetRemainSize();
-
-    const ImpRCStack& rTop = aStack[nCurStack];
-    return (sal_uInt32)(reinterpret_cast<sal_IntPtr>(rTop.pResource) +
-                        rTop.pResource->GetLocalOff() -
-                        reinterpret_cast<sal_IntPtr>(rTop.pClassRes));
-}
-
 void* ResMgr::Increment( sal_uInt32 nSize )
 {
     osl::Guard<osl::Mutex> aGuard( getResMgrMutex() );
@@ -1306,18 +1251,6 @@ ResMgr* ResMgr::SearchCreateResMgr(
     return pImp ? new ResMgr( pImp ) : nullptr;
 }
 
-sal_Int16 ResMgr::ReadShort()
-{
-    osl::Guard<osl::Mutex> aGuard( getResMgrMutex() );
-
-    if( pFallbackResMgr )
-        return pFallbackResMgr->ReadShort();
-
-    sal_Int16 n = GetShort( GetClass() );
-    Increment( sizeof( sal_Int16 ) );
-    return n;
-}
-
 sal_Int32 ResMgr::ReadLong()
 {
     osl::Guard<osl::Mutex> aGuard( getResMgrMutex() );
@@ -1360,28 +1293,6 @@ OUString ResMgr::ReadString()
     return aRet;
 }
 
-OString ResMgr::ReadByteString()
-{
-    osl::Guard<osl::Mutex> aGuard( getResMgrMutex() );
-
-    if( pFallbackResMgr )
-        return pFallbackResMgr->ReadByteString();
-
-    OString aRet;
-
-    const ImpRCStack& rTop = aStack[nCurStack];
-    if( (rTop.Flags & RCFlags::NOTFOUND) )
-    {
-        #if OSL_DEBUG_LEVEL > 0
-        aRet = OString( "<resource not found>" );
-        #endif
-    }
-    else
-        Increment( GetByteString( aRet, static_cast<const sal_uInt8*>(GetClass()) ) );
-
-    return aRet;
-}
-
 void ResMgr::SetReadStringHook( ResHookProc pProc )
 {
     osl::Guard<osl::Mutex> aGuard( getResMgrMutex() );
diff --git a/vcl/inc/pch/precompiled_vcl.hxx b/vcl/inc/pch/precompiled_vcl.hxx
index b5d4fd1a64c3..f51afc873b91 100644
--- a/vcl/inc/pch/precompiled_vcl.hxx
+++ b/vcl/inc/pch/precompiled_vcl.hxx
@@ -282,7 +282,6 @@
 #include <tools/link.hxx>
 #include <tools/mapunit.hxx>
 #include <tools/poly.hxx>
-#include <tools/rc.h>
 #include <tools/resid.hxx>
 #include <tools/solar.h>
 #include <tools/stream.hxx>
diff --git a/vcl/source/bitmap/BitmapTools.cxx b/vcl/source/bitmap/BitmapTools.cxx
index 34b45cf5b3be..193f436d4061 100644
--- a/vcl/source/bitmap/BitmapTools.cxx
+++ b/vcl/source/bitmap/BitmapTools.cxx
@@ -21,8 +21,8 @@
 
 #include <com/sun/star/rendering/XIntegerReadOnlyBitmap.hpp>
 
+#include <tools/rcid.h>
 #include <tools/resmgr.hxx>
-#include <tools/rc.h>
 #include <vcl/svapp.hxx>
 
 using namespace css;
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 64c078e070fa..122a71ef55be 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -20,7 +20,6 @@
 #include <tools/debug.hxx>
 #include <tools/lineend.hxx>
 #include <tools/poly.hxx>
-#include <tools/rc.h>
 
 #include <vcl/image.hxx>
 #include <vcl/bitmap.hxx>
diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx
index 01eac4eb3d07..a0218d8ada95 100644
--- a/vcl/source/control/combobox.cxx
+++ b/vcl/source/control/combobox.cxx
@@ -23,7 +23,6 @@
 
 #include <comphelper/string.hxx>
 #include <tools/debug.hxx>
-#include <tools/rc.h>
 #include <vcl/decoview.hxx>
 #include <vcl/lstbox.hxx>
 #include <vcl/button.hxx>
diff --git a/vcl/source/control/ctrl.cxx b/vcl/source/control/ctrl.cxx
index 229051b58ae6..8d94ebc26fce 100644
--- a/vcl/source/control/ctrl.cxx
+++ b/vcl/source/control/ctrl.cxx
@@ -19,7 +19,6 @@
 
 #include <comphelper/processfactory.hxx>
 
-#include <tools/rc.h>
 #include <vcl/svapp.hxx>
 #include <vcl/event.hxx>
 #include <vcl/ctrl.hxx>
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index c20ef78cf3fa..70cebbbc77f3 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -17,7 +17,6 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include <tools/rc.h>
 #include <vcl/decoview.hxx>
 #include <vcl/event.hxx>
 #include <vcl/cursor.hxx>
diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx
index 68baa147006a..a1c1ea8897b9 100644
--- a/vcl/source/control/field.cxx
+++ b/vcl/source/control/field.cxx
@@ -24,8 +24,6 @@
 
 #include "tools/debug.hxx"
 
-#include "tools/rc.h"
-
 #include <vcl/dialog.hxx>
 #include <vcl/field.hxx>
 #include <vcl/event.hxx>
diff --git a/vcl/source/control/field2.cxx b/vcl/source/control/field2.cxx
index ff5897737313..51fc1f6607e7 100644
--- a/vcl/source/control/field2.cxx
+++ b/vcl/source/control/field2.cxx
@@ -24,7 +24,6 @@
 #include <tools/diagnose_ex.h>
 #include <comphelper/processfactory.hxx>
 #include <comphelper/string.hxx>
-#include <tools/rc.h>
 #include <vcl/svapp.hxx>
 #include <vcl/event.hxx>
 #include <vcl/field.hxx>
diff --git a/vcl/source/control/fixed.cxx b/vcl/source/control/fixed.cxx
index 42b6cc1ef1ab..fa95ee3d2404 100644
--- a/vcl/source/control/fixed.cxx
+++ b/vcl/source/control/fixed.cxx
@@ -17,8 +17,6 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include "tools/rc.h"
-
 #include <vcl/decoview.hxx>
 #include <vcl/dialog.hxx>
 #include <vcl/event.hxx>
diff --git a/vcl/source/control/group.cxx b/vcl/source/control/group.cxx
index 9d8070cc9b01..dfcf58f75905 100644
--- a/vcl/source/control/group.cxx
+++ b/vcl/source/control/group.cxx
@@ -17,8 +17,6 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include <tools/rc.h>
-
 #include <vcl/event.hxx>
 #include <vcl/group.hxx>
 #include <vcl/settings.hxx>
diff --git a/vcl/source/control/listbox.cxx b/vcl/source/control/listbox.cxx
index 4e3d9dc454b1..2e3334efea81 100644
--- a/vcl/source/control/listbox.cxx
+++ b/vcl/source/control/listbox.cxx
@@ -17,7 +17,6 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include "tools/rc.h"
 #include "tools/debug.hxx"
 
 #include <vcl/decoview.hxx>
diff --git a/vcl/source/control/longcurr.cxx b/vcl/source/control/longcurr.cxx
index ce04daf4eb41..f2409df06848 100644
--- a/vcl/source/control/longcurr.cxx
+++ b/vcl/source/control/longcurr.cxx
@@ -21,8 +21,6 @@
 #include <tools/debug.hxx>
 #include <tools/bigint.hxx>
 
-#include <tools/rc.h>
-
 #include <vcl/event.hxx>
 #include <vcl/svapp.hxx>
 #include <vcl/longcurr.hxx>
diff --git a/vcl/source/control/menubtn.cxx b/vcl/source/control/menubtn.cxx
index 79d09a6687f9..92a3b96719e0 100644
--- a/vcl/source/control/menubtn.cxx
+++ b/vcl/source/control/menubtn.cxx
@@ -17,7 +17,6 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include <tools/rc.h>
 #include <vcl/decoview.hxx>
 #include <vcl/event.hxx>
 #include <vcl/floatwin.hxx>
diff --git a/vcl/source/control/morebtn.cxx b/vcl/source/control/morebtn.cxx
index cb66fcd005c1..acff4e0be2f2 100644
--- a/vcl/source/control/morebtn.cxx
+++ b/vcl/source/control/morebtn.cxx
@@ -19,7 +19,6 @@
 
 #include <vcl/morebtn.hxx>
 
-#include <tools/rc.h>
 #include <vector>
 
 struct ImplMoreButtonData
diff --git a/vcl/source/control/scrbar.cxx b/vcl/source/control/scrbar.cxx
index 40dfd14aa0f8..7ecb6702e353 100644
--- a/vcl/source/control/scrbar.cxx
+++ b/vcl/source/control/scrbar.cxx
@@ -26,7 +26,6 @@
 #include "svdata.hxx"
 
 #include "rtl/string.hxx"
-#include "tools/rc.h"
 
 /*  #i77549#
     HACK: for scrollbars in case of thumb rect, page up and page down rect we
diff --git a/vcl/source/control/slider.cxx b/vcl/source/control/slider.cxx
index 51e894b280c7..f1a71c9af7c4 100644
--- a/vcl/source/control/slider.cxx
+++ b/vcl/source/control/slider.cxx
@@ -17,7 +17,6 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include <tools/rc.h>
 #include <vcl/event.hxx>
 #include <vcl/decoview.hxx>
 #include <vcl/slider.hxx>
diff --git a/vcl/source/control/spinfld.cxx b/vcl/source/control/spinfld.cxx
index 84fb780d50f6..985656aa603a 100644
--- a/vcl/source/control/spinfld.cxx
+++ b/vcl/source/control/spinfld.cxx
@@ -17,8 +17,6 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include "tools/rc.h"
-
 #include <vcl/event.hxx>
 #include <vcl/decoview.hxx>
 #include <vcl/spinfld.hxx>
diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx
index 6e21f9511f78..4f87c097f88d 100644
--- a/vcl/source/control/tabctrl.cxx
+++ b/vcl/source/control/tabctrl.cxx
@@ -18,7 +18,6 @@
  */
 
 #include "tools/debug.hxx"
-#include "tools/rc.h"
 
 #include <vcl/svapp.hxx>
 #include <vcl/help.hxx>
diff --git a/vcl/source/edit/vclmedit.cxx b/vcl/source/edit/vclmedit.cxx
index f9eeca9f767d..ff0c32dfa60f 100644
--- a/vcl/source/edit/vclmedit.cxx
+++ b/vcl/source/edit/vclmedit.cxx
@@ -17,7 +17,6 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include <tools/rc.h>
 #include <vcl/builder.hxx>
 #include <vcl/decoview.hxx>
 #include <vcl/svapp.hxx>
diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx
index 55952b77943d..274126dd920a 100644
--- a/vcl/source/filter/graphicfilter.cxx
+++ b/vcl/source/filter/graphicfilter.cxx
@@ -26,6 +26,7 @@
 #include <ucbhelper/content.hxx>
 #include <cppuhelper/implbase.hxx>
 #include <tools/fract.hxx>
+#include <tools/resmgr.hxx>
 #include <tools/stream.hxx>
 #include <tools/urlobj.hxx>
 #include <tools/zcodec.hxx>
diff --git a/vcl/source/gdi/bitmap.cxx b/vcl/source/gdi/bitmap.cxx
index 6af9bcd37730..e496ecd76800 100644
--- a/vcl/source/gdi/bitmap.cxx
+++ b/vcl/source/gdi/bitmap.cxx
@@ -21,7 +21,6 @@
 #include <rtl/crc.h>
 #include <tools/stream.hxx>
 #include <tools/poly.hxx>
-#include <tools/rc.h>
 #include <vcl/salbtype.hxx>
 #include <vcl/bitmapaccess.hxx>
 #include <vcl/outdev.hxx>
diff --git a/vcl/source/gdi/bitmapex.cxx b/vcl/source/gdi/bitmapex.cxx
index 1231ab165367..0f709c2b03f5 100644
--- a/vcl/source/gdi/bitmapex.cxx
+++ b/vcl/source/gdi/bitmapex.cxx
@@ -21,9 +21,10 @@
 #include <rtl/strbuf.hxx>
 
 #include <o3tl/any.hxx>
-#include <tools/stream.hxx>
 #include <tools/debug.hxx>
-#include <tools/rc.h>
+#include <tools/rcid.h>
+#include <tools/resmgr.hxx>
+#include <tools/stream.hxx>
 #include <vcl/ImageTree.hxx>
 #include <vcl/salbtype.hxx>
 #include <vcl/outdev.hxx>
diff --git a/vcl/source/image/Image.cxx b/vcl/source/image/Image.cxx
index 649bf1551cf3..fc4e9fa80401 100644
--- a/vcl/source/image/Image.cxx
+++ b/vcl/source/image/Image.cxx
@@ -20,7 +20,6 @@
 #include <osl/file.hxx>
 #include <tools/debug.hxx>
 #include <tools/stream.hxx>
-#include <tools/rc.h>
 #include <tools/rc.hxx>
 #include <tools/resmgr.hxx>
 #include <vcl/settings.hxx>
diff --git a/vcl/source/window/accel.cxx b/vcl/source/window/accel.cxx
index 78514bfb7083..8810bdba04c1 100644
--- a/vcl/source/window/accel.cxx
+++ b/vcl/source/window/accel.cxx
@@ -18,7 +18,6 @@
  */
 
 #include <tools/debug.hxx>
-#include <tools/rc.h>
 
 #include <vcl/window.hxx>
 #include <vcl/svapp.hxx>
diff --git a/vcl/source/window/accessibility.cxx b/vcl/source/window/accessibility.cxx
index fa155db1df0c..cb82b6916205 100644
--- a/vcl/source/window/accessibility.cxx
+++ b/vcl/source/window/accessibility.cxx
@@ -23,7 +23,6 @@
 
 #include "tools/time.hxx"
 #include "tools/debug.hxx"
-#include "tools/rc.h"
 
 #include "unotools/fontcfg.hxx"
 #include "unotools/confignode.hxx"
diff --git a/vcl/source/window/btndlg.cxx b/vcl/source/window/btndlg.cxx
index 5ff1f358baa1..7f2423ffd3bd 100644
--- a/vcl/source/window/btndlg.cxx
+++ b/vcl/source/window/btndlg.cxx
@@ -17,8 +17,6 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include <tools/rc.h>
-
 #include <svdata.hxx>
 
 #include <vcl/button.hxx>
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index 45713fd85333..879526dcaa7f 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -27,7 +27,6 @@
 
 #include <tools/debug.hxx>
 
-#include <tools/rc.h>
 #include <svdata.hxx>
 #include <window.h>
 #include <brdwin.hxx>
diff --git a/vcl/source/window/dockmgr.cxx b/vcl/source/window/dockmgr.cxx
index a68d5b1fbd6d..70f45b59a434 100644
--- a/vcl/source/window/dockmgr.cxx
+++ b/vcl/source/window/dockmgr.cxx
@@ -18,7 +18,6 @@
  */
 
 #include <tools/time.hxx>
-#include <tools/rc.h>
 
 #include <brdwin.hxx>
 #include <svdata.hxx>
diff --git a/vcl/source/window/dockwin.cxx b/vcl/source/window/dockwin.cxx
index 4f61ff8aed92..a6e828fe2d3c 100644
--- a/vcl/source/window/dockwin.cxx
+++ b/vcl/source/window/dockwin.cxx
@@ -18,7 +18,6 @@
  */
 
 #include <tools/time.hxx>
-#include <tools/rc.h>
 #include <vcl/event.hxx>
 #include <vcl/floatwin.hxx>
 #include <vcl/dockwin.hxx>
diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx
index 9b27d56b6617..f0336c8f8a27 100644
--- a/vcl/source/window/floatwin.cxx
+++ b/vcl/source/window/floatwin.cxx
@@ -30,7 +30,6 @@
 #include <vcl/floatwin.hxx>
 #include <vcl/settings.hxx>
 
-#include <tools/rc.h>
 #include <tools/debug.hxx>
 
 class FloatingWindow::ImplData
diff --git a/vcl/source/window/keycod.cxx b/vcl/source/window/keycod.cxx
index 7f7661ee1ad6..93e16339df06 100644
--- a/vcl/source/window/keycod.cxx
+++ b/vcl/source/window/keycod.cxx
@@ -24,8 +24,6 @@
 #include <vcl/window.hxx>
 #include <vcl/keycod.hxx>
 
-#include <tools/rc.h>
-
 static const sal_uInt16 aImplKeyFuncTab[(static_cast<int>(KeyFuncType::FRONT)+1)*4] =
 {
     0, 0, 0, 0,                                                    // KeyFuncType::DONTKNOW
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 668ed11b9067..5991f123530d 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -19,7 +19,6 @@
 
 #include <tools/debug.hxx>
 #include <tools/diagnose_ex.h>
-#include <tools/rc.h>
 #include <tools/stream.hxx>
 
 #include <vcl/svapp.hxx>
@@ -438,88 +437,6 @@ void Menu::InsertItem(sal_uInt16 nItemId, const OUString& rStr,
     SetItemImage( nItemId, rImage );
 }
 
-void Menu::InsertItem( const ResId& rResId )
-{
-    ResMgr* pMgr = rResId.GetResMgr();
-    if( ! pMgr )
-        return;
-
-    RscMenuItem              nObjMask;
-
-    GetRes( rResId.SetRT( RSC_MENUITEM ) );
-    nObjMask    = (RscMenuItem)ReadLongRes();
-
-    bool bSep = false;
-    if ( nObjMask & RscMenuItem::Separator )
-        bSep = ReadShortRes() != 0;
-
-    sal_uInt16 nItemId = 1;
-    if ( nObjMask & RscMenuItem::Id )
-        nItemId = sal::static_int_cast<sal_uInt16>(ReadLongRes());
-
-    MenuItemBits nStatus = MenuItemBits::NONE;
-    if ( nObjMask & RscMenuItem::Status )
-        nStatus = sal::static_int_cast<MenuItemBits>(ReadLongRes());
-
-    OUString aText;
-    if ( nObjMask & RscMenuItem::Text )
-        aText = ReadStringRes();
-
-    // create item
-    if (!bSep)
-        InsertItem(nItemId, aText, nStatus);
-    else
-        InsertSeparator();
-
-    OUString aHelpText;
-    if ( nObjMask & RscMenuItem::HelpText )
-    {
-        aHelpText = ReadStringRes();
-        if( !bSep )
-            SetHelpText( nItemId, aHelpText );
-    }
-
-    if ( nObjMask & RscMenuItem::HelpId )
-    {
-        OString aHelpId( ReadByteStringRes() );
-        if ( !bSep )
-            SetHelpId( nItemId, aHelpId );
-    }
-
-    if( !bSep )
-        SetHelpText( nItemId, aHelpText );
-
-    if ( nObjMask & RscMenuItem::Disable )
-    {
-        if ( !bSep )
-            EnableItem( nItemId, ReadShortRes() == 0 );
-    }
-    if ( nObjMask & RscMenuItem::Command )
-    {
-        OUString aCommandStr = ReadStringRes();
-        if ( !bSep )
-            SetItemCommand( nItemId, aCommandStr );
-    }
-    if ( nObjMask & RscMenuItem::Menu )
-    {
-        if ( !bSep )
-        {
-            MenuItemData* pData = GetItemList()->GetData( nItemId );
-            if ( pData )
-            {
-                VclPtr<PopupMenu> pSubMenu = VclPtr<PopupMenu>::Create( ResId( static_cast<RSHEADER_TYPE*>(GetClassRes()), *pMgr ) );
-                pData->pAutoSubMenu = pSubMenu;
-                // #111060# keep track of this pointer, may be it will be deleted from outside
-                pSubMenu->pRefAutoSubMenu = &pData->pAutoSubMenu;
-                SetPopupMenu( nItemId, pSubMenu );
-            }
-        }
-        IncrementRes( GetObjSizeRes( static_cast<RSHEADER_TYPE*>(GetClassRes()) ) );
-    }
-    delete mpLayoutData;
-    mpLayoutData = nullptr;
-}
-
 void Menu::InsertItem(const OUString& rCommand, const css::uno::Reference<css::frame::XFrame>& rFrame)
 {
     sal_uInt16 nItemId = GetItemCount() + 1;
@@ -2728,45 +2645,12 @@ MenuFloatingWindow * PopupMenu::ImplGetFloatingWindow() const {
 }
 
 PopupMenu::PopupMenu()
-    : pRefAutoSubMenu(nullptr)
 {
     mpSalMenu = ImplGetSVData()->mpDefInst->CreateMenu(false, this);
 }
 
-PopupMenu::PopupMenu( const ResId& rResId )
-    : pRefAutoSubMenu(nullptr)
-{
-    mpSalMenu = ImplGetSVData()->mpDefInst->CreateMenu(false, this);
-
-    ResMgr* pMgr = rResId.GetResMgr();
-    if( ! pMgr )
-        return;
-
-    rResId.SetRT( RSC_MENU );
-    GetRes( rResId );
-
-    RscMenu nObjMask = (RscMenu)ReadLongRes();
-
-    if( nObjMask & RscMenu::Items )
-    {
-        sal_uLong nObjFollows = ReadLongRes();
-        // insert menu items
-        for( sal_uLong i = 0; i < nObjFollows; i++ )
-        {
-            InsertItem( ResId( static_cast<RSHEADER_TYPE*>(GetClassRes()), *pMgr ) );
-            IncrementRes( GetObjSizeRes( static_cast<RSHEADER_TYPE*>(GetClassRes()) ) );
-        }
-    }
-
-    if( nObjMask & RscMenu::Text )
-    {
-        aTitleText = ReadStringRes();
-    }
-}
-
 PopupMenu::PopupMenu( const PopupMenu& rMenu )
-    : Menu(),
-      pRefAutoSubMenu(nullptr)
+    : Menu()
 {
     mpSalMenu = ImplGetSVData()->mpDefInst->CreateMenu(false, this);
     *this = rMenu;
@@ -2777,13 +2661,6 @@ PopupMenu::~PopupMenu()
     disposeOnce();
 }
 
-void PopupMenu::dispose()
-{
-    if( pRefAutoSubMenu && *pRefAutoSubMenu == this )
-        *pRefAutoSubMenu = nullptr;    // #111060# avoid second delete in ~MenuItemData
-    Menu::dispose();
-}
-
 void PopupMenu::ClosePopup(Menu* pMenu)
 {
     MenuFloatingWindow* p = dynamic_cast<MenuFloatingWindow*>(ImplGetWindow());
diff --git a/vcl/source/window/menuitemlist.cxx b/vcl/source/window/menuitemlist.cxx
index 67cdb6af2cce..f2a9e41a08f8 100644
--- a/vcl/source/window/menuitemlist.cxx
+++ b/vcl/source/window/menuitemlist.cxx
@@ -34,11 +34,6 @@ MenuItemData::~MenuItemData()
 {
     if (aUserValueReleaseFunc)
         aUserValueReleaseFunc(nUserValue);
-    if( pAutoSubMenu )
-    {
-        static_cast<PopupMenu*>(pAutoSubMenu.get())->pRefAutoSubMenu = nullptr;
-        pAutoSubMenu.disposeAndClear();
-    }
     if( pSalMenuItem )
         ImplGetSVData()->mpDefInst->DestroyMenuItem( pSalMenuItem );
     pSubMenu.disposeAndClear();
@@ -67,7 +62,6 @@ MenuItemData* MenuItemList::Insert(
     pData->eType            = eType;
     pData->nBits            = nBits;
     pData->pSubMenu         = nullptr;
-    pData->pAutoSubMenu     = nullptr;
     pData->nUserValue       = 0;
     pData->bChecked         = false;
     pData->bEnabled         = true;
@@ -101,7 +95,6 @@ void MenuItemList::InsertSeparator(const OString &rIdent, size_t nPos)
     pData->eType            = MenuItemType::SEPARATOR;
     pData->nBits            = MenuItemBits::NONE;
     pData->pSubMenu         = nullptr;
-    pData->pAutoSubMenu     = nullptr;
     pData->nUserValue       = 0;
     pData->bChecked         = false;
     pData->bEnabled         = true;
diff --git a/vcl/source/window/menuitemlist.hxx b/vcl/source/window/menuitemlist.hxx
index dbcc4c805dfb..e8b970fbe550 100644
--- a/vcl/source/window/menuitemlist.hxx
+++ b/vcl/source/window/menuitemlist.hxx
@@ -34,7 +34,6 @@ struct MenuItemData
     MenuItemType    eType;                  // MenuItem-Type
     MenuItemBits    nBits;                  // MenuItem-Bits
     VclPtr<Menu>    pSubMenu;               // Pointer to SubMenu
-    VclPtr<Menu>    pAutoSubMenu;           // Pointer to SubMenu from Resource
     OUString        aText;                  // Menu-Text
     OUString        aHelpText;              // Help-String
     OUString        aTipHelpText;           // TipHelp-String (eg, expanded filenames)
@@ -60,7 +59,6 @@ struct MenuItemData
         , eType(MenuItemType::DONTKNOW)
         , nBits(MenuItemBits::NONE)
         , pSubMenu(nullptr)
-        , pAutoSubMenu(nullptr)
         , nUserValue(0)
         , aUserValueReleaseFunc(nullptr)
         , bChecked(false)
@@ -75,7 +73,6 @@ struct MenuItemData
         , eType(MenuItemType::DONTKNOW)
         , nBits(MenuItemBits::NONE)
         , pSubMenu(nullptr)
-        , pAutoSubMenu(nullptr)
         , aText(rStr)
         , nUserValue(0)
         , aUserValueReleaseFunc(nullptr)
diff --git a/vcl/source/window/msgbox.cxx b/vcl/source/window/msgbox.cxx
index 1686a9378fda..ef98a62246d1 100644
--- a/vcl/source/window/msgbox.cxx
+++ b/vcl/source/window/msgbox.cxx
@@ -17,8 +17,6 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include <tools/rc.h>
-
 #include <svids.hrc>
 #include <svdata.hxx>
 #include <brdwin.hxx>
diff --git a/vcl/source/window/split.cxx b/vcl/source/window/split.cxx
index 0243de205deb..ad991269c258 100644
--- a/vcl/source/window/split.cxx
+++ b/vcl/source/window/split.cxx
@@ -17,7 +17,6 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include <tools/rc.h>
 #include <tools/poly.hxx>
 
 #include <vcl/event.hxx>
diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx
index be5f53e311ea..e32c4df8b81f 100644
--- a/vcl/source/window/status.cxx
+++ b/vcl/source/window/status.cxx
@@ -18,7 +18,6 @@
  */
 
 #include <tools/debug.hxx>
-#include <tools/rc.h>
 
 #include <vcl/event.hxx>
 #include <vcl/decoview.hxx>
diff --git a/vcl/source/window/syschild.cxx b/vcl/source/window/syschild.cxx
index 3b8c90a390b4..9c24cf3c3358 100644
--- a/vcl/source/window/syschild.cxx
+++ b/vcl/source/window/syschild.cxx
@@ -22,8 +22,6 @@
 #include <rtl/process.h>
 #include <rtl/ref.hxx>
 
-#include <tools/rc.h>
-
 #include <vcl/window.hxx>
 #include <vcl/sysdata.hxx>
 #include <vcl/svapp.hxx>
diff --git a/vcl/source/window/tabdlg.cxx b/vcl/source/window/tabdlg.cxx
index 5fb80a3b09f9..f25324a34d73 100644
--- a/vcl/source/window/tabdlg.cxx
+++ b/vcl/source/window/tabdlg.cxx
@@ -22,7 +22,6 @@
 #include <vcl/tabctrl.hxx>
 #include <vcl/tabdlg.hxx>
 #include <vcl/tabpage.hxx>
-#include <tools/rc.h>
 
 void TabDialog::ImplInitTabDialogData()
 {
diff --git a/vcl/source/window/tabpage.cxx b/vcl/source/window/tabpage.cxx
index 59c5a653681c..3e095a4d566a 100644
--- a/vcl/source/window/tabpage.cxx
+++ b/vcl/source/window/tabpage.cxx
@@ -17,8 +17,6 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include <tools/rc.h>
-
 #include <vcl/event.hxx>
 #include <vcl/layout.hxx>
 #include <vcl/svapp.hxx>
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 8589a9b01a0a..ae8382beeab4 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -33,7 +33,6 @@
 #include <vcl/vclstatuslistener.hxx>
 
 #include <tools/debug.hxx>
-#include <tools/rc.h>
 #include <tools/poly.hxx>
 #include <svl/imageitm.hxx>
 
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx
index 19cc5a029648..a8fd640005f1 100644
--- a/vcl/source/window/toolbox2.cxx
+++ b/vcl/source/window/toolbox2.cxx
@@ -21,7 +21,6 @@
 
 #include <comphelper/processfactory.hxx>
 #include <tools/debug.hxx>
-#include <tools/rc.h>
 
 #include <vcl/svapp.hxx>
 #include <vcl/idle.hxx>
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index c15ba9c3861e..a867ab5a6453 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -19,7 +19,6 @@
 
 #include <config_features.h>
 #include <rtl/strbuf.hxx>
-#include <tools/rc.h>
 
 #include <sal/types.h>
 #include <vcl/salgtype.hxx>
diff --git a/vcl/source/window/wrkwin.cxx b/vcl/source/window/wrkwin.cxx
index 1c75de766cb8..448ed9c0c79b 100644
--- a/vcl/source/window/wrkwin.cxx
+++ b/vcl/source/window/wrkwin.cxx
@@ -18,7 +18,6 @@
  */
 
 #include <tools/debug.hxx>
-#include <tools/rc.h>
 
 #include <vcl/svapp.hxx>
 #include <vcl/wrkwin.hxx>
diff --git a/writerfilter/source/rtftok/rtftokenizer.cxx b/writerfilter/source/rtftok/rtftokenizer.cxx
index 91b41eb5242e..361928e468b0 100644
--- a/writerfilter/source/rtftok/rtftokenizer.cxx
+++ b/writerfilter/source/rtftok/rtftokenizer.cxx
@@ -8,8 +8,9 @@
  */
 
 #include <rtftokenizer.hxx>
-#include <svx/dialogs.hrc>
+#include <tools/resmgr.hxx>
 #include <vcl/svapp.hxx>
+#include <svx/dialogs.hrc>
 #include <rtl/strbuf.hxx>
 #include <rtfskipdestination.hxx>
 #include <rtl/character.hxx>


More information about the Libreoffice-commits mailing list