diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-10-10 14:22:56 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-10-10 14:56:58 +0100 |
commit | 9f7f5b5f911c4e76c88258f6ee3e7d51484f195b (patch) | |
tree | 813fa04c2c1292de6dff20f1b134406b1c1335e6 | |
parent | 666787c4bcee7fc9a5de459eb18a1dcc1a4e350c (diff) |
no numericfield, spinfield or spinbutton loaded from .src now
Change-Id: I90e4390d1fadcbb18036861dc9b9d39fa8a73551
-rw-r--r-- | include/tools/rcid.h | 7 | ||||
-rw-r--r-- | include/vcl/field.hxx | 5 | ||||
-rw-r--r-- | rsc/inc/rscdb.hxx | 5 | ||||
-rw-r--r-- | rsc/source/parser/rscicpx.cxx | 73 | ||||
-rw-r--r-- | rsc/source/parser/rscinit.cxx | 34 | ||||
-rw-r--r-- | tools/source/rc/resmgr.cxx | 2 | ||||
-rw-r--r-- | vcl/source/control/field.cxx | 59 |
7 files changed, 0 insertions, 185 deletions
diff --git a/include/tools/rcid.h b/include/tools/rcid.h index d47b0e1495b3..356c7b24473c 100644 --- a/include/tools/rcid.h +++ b/include/tools/rcid.h @@ -51,8 +51,6 @@ #define RSC_IMAGEBUTTON (RSC_NOTYPE + 0x4a) -#define RSC_SPINBUTTON (RSC_NOTYPE + 0x4d) - #define RSC_EDIT (RSC_NOTYPE + 0x52) #define RSC_LISTBOX (RSC_NOTYPE + 0x55) @@ -61,11 +59,6 @@ #define RSC_FIXEDIMAGE (RSC_NOTYPE + 0x5a) -#define RSC_SPINFIELD (RSC_NOTYPE + 0x61) - -#define RSC_NUMERICFIELD (RSC_NOTYPE + 0x63) - - #define RSC_TOOLBOXITEM (RSC_NOTYPE + 0x70) #define RSC_TOOLBOX (RSC_NOTYPE + 0x71) #define RSC_DOCKINGWINDOW (RSC_NOTYPE + 0x72) diff --git a/include/vcl/field.hxx b/include/vcl/field.hxx index 96873ff2f0ec..d6612fd16c05 100644 --- a/include/vcl/field.hxx +++ b/include/vcl/field.hxx @@ -150,7 +150,6 @@ protected: void FieldFirst(); void FieldLast(); - SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId ); SAL_DLLPRIVATE bool ImplNumericReformat( const OUString& rStr, sal_Int64& rValue, OUString& rOutStr ); SAL_DLLPRIVATE void ImplNewFieldValue( sal_Int64 nNewValue ); SAL_DLLPRIVATE void ImplSetUserValue( sal_Int64 nNewValue, Selection* pNewSelection = nullptr ); @@ -448,12 +447,8 @@ public: class VCL_DLLPUBLIC NumericField : public SpinField, public NumericFormatter { -protected: - SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId ); - public: explicit NumericField( vcl::Window* pParent, WinBits nWinStyle ); - explicit NumericField( vcl::Window* pParent, const ResId& ); virtual bool PreNotify( NotifyEvent& rNEvt ) override; virtual bool Notify( NotifyEvent& rNEvt ) override; diff --git a/rsc/inc/rscdb.hxx b/rsc/inc/rscdb.hxx index 7bd694926a66..30117dca03fb 100644 --- a/rsc/inc/rscdb.hxx +++ b/rsc/inc/rscdb.hxx @@ -191,11 +191,6 @@ class RscTypCont RscTop * InitClassMenuItem( RscTop * pSuper ); RscTop * InitClassMenu( RscTop * pSuper, RscTop * pMenuItem ); - RscTop * InitClassNumericFormatter( RscTop * pSuper ); - - RscTop * InitClassSpinField( RscTop * pSuper ); - RscTop * InitClassNumericField( RscTop * pSuper ); - RscTop * InitClassDockingWindow( RscTop * pSuper, RscEnum * pMapUnit ); RscTop * InitClassToolBoxItem(RscTop * pSuper); diff --git a/rsc/source/parser/rscicpx.cxx b/rsc/source/parser/rscicpx.cxx index 714c1ac16224..beba5ad2daef 100644 --- a/rsc/source/parser/rscicpx.cxx +++ b/rsc/source/parser/rscicpx.cxx @@ -664,79 +664,6 @@ RscTop * RscTypCont::InitClassMenu( RscTop * pSuper, return pClassMenu; } -RscTop * RscTypCont::InitClassNumericFormatter( RscTop * pSuper ) -{ - Atom nId; - RscTop * pClassNumeric; - - // initialize class - nId = pHS->getID( "NumericFormatter" ); - pClassNumeric = new RscClass( nId, RSC_NOTYPE, pSuper ); - pClassNumeric->SetCallPar( *pStdPar1, *pStdPar2, *pStdParType ); - - // initialize variables - nId = aNmTb.Put( "Minimum", VARNAME ); - pClassNumeric->SetVariable( nId, &aIdLong, nullptr, - 0, (sal_uInt32)RscNumFormatterFlags::Min ); - nId = aNmTb.Put( "Maximum", VARNAME ); - pClassNumeric->SetVariable( nId, &aIdLong, nullptr, - 0, (sal_uInt32)RscNumFormatterFlags::Max ); - nId = aNmTb.Put( "StrictFormat", VARNAME ); - pClassNumeric->SetVariable( nId, &aBool, nullptr, - 0, (sal_uInt32)RscNumFormatterFlags::StrictFormat ); - nId = aNmTb.Put( "DecimalDigits", VARNAME ); - pClassNumeric->SetVariable( nId, &aUShort, nullptr, - 0, (sal_uInt32)RscNumFormatterFlags::DecimalDigits ); - nId = aNmTb.Put( "Value", VARNAME ); - pClassNumeric->SetVariable( nId, &aIdLong, nullptr, - 0, (sal_uInt32)RscNumFormatterFlags::Value ); - - return pClassNumeric; -} - -RscTop * RscTypCont::InitClassSpinField( RscTop * pSuper ) -{ - Atom nId; - RscTop * pClassSpinField; - - // initialize class - nId = pHS->getID( "SpinField" ); - pClassSpinField = new RscClass( nId, RSC_SPINFIELD, pSuper ); - pClassSpinField->SetCallPar( *pWinPar1, *pWinPar2, *pWinParType ); - - aNmTb.Put( nId, CLASSNAME, pClassSpinField ); - - INS_WINBIT(pClassSpinField,Repeat) - INS_WINBIT(pClassSpinField,Spin) - - return pClassSpinField; -} - -RscTop * RscTypCont::InitClassNumericField( RscTop * pSuper ) -{ - Atom nId; - RscTop * pClassNumericField; - - // initialize class - nId = pHS->getID( "NumericField" ); - pClassNumericField = new RscClass( nId, RSC_NUMERICFIELD, pSuper ); - pClassNumericField->SetCallPar( *pWinPar1, *pWinPar2, *pWinParType ); - - aNmTb.Put( nId, CLASSNAME, pClassNumericField ); - - // initialize variables - nId = aNmTb.Put( "First", VARNAME ); - pClassNumericField->SetVariable( nId, &aIdLong, nullptr, - 0, NUMERICFIELD_FIRST ); - nId = aNmTb.Put( "Last", VARNAME ); - pClassNumericField->SetVariable( nId, &aIdLong, nullptr, - 0, NUMERICFIELD_LAST ); - nId = aNmTb.Put( "SpinSize", VARNAME ); - pClassNumericField->SetVariable( nId, &aIdLong, nullptr, - 0, NUMERICFIELD_SPINSIZE ); - return pClassNumericField; -} - RscTop * RscTypCont::InitClassDockingWindow( RscTop * pSuper, RscEnum * pMapUnit ) { diff --git a/rsc/source/parser/rscinit.cxx b/rsc/source/parser/rscinit.cxx index f1363113852e..5761dd5a27d4 100644 --- a/rsc/source/parser/rscinit.cxx +++ b/rsc/source/parser/rscinit.cxx @@ -72,7 +72,6 @@ void RscTypCont::Init() RscTop * pClassFixedImage; RscTop * pClassKeyCode; RscTop * pLangClassKeyCode; - RscTop * pClassSpinField; Atom nId; @@ -346,39 +345,6 @@ void RscTypCont::Init() (sal_uInt32)RscMenuItem::Menu ); } { - // initialize class - nId = pHS->getID( "SpinButton" ); - RscTop* pClassSpinButton = new RscClass( nId, RSC_SPINBUTTON, pClassControl ); - pClassSpinButton->SetCallPar( *pWinPar1, *pWinPar2, *pWinParType ); - aNmTb.Put( nId, CLASSNAME, pClassSpinButton ); - { - RscClient * pClient; - - // add client variables - // Sysmodal - aBaseLst.push_back( - pClient = new RscClient( pHS->getID( "sal_Bool" ), RSC_NOTYPE, &aWinBits, nRepeatId ) - ); - nId = aNmTb.Put( "Repeat", VARNAME ); - pClassSpinButton->SetVariable( nId, pClient, nullptr, - VAR_NODATAINST, 0, nWinBitVarId ); - } - pRoot->Insert( pClassSpinButton ); -} -{ - pClassSpinField = InitClassSpinField( pClassEdit ); - pRoot->Insert( pClassSpinField ); -} -{ - { // hand-made multiple inheritance - RscTop* pClassTmp = InitClassNumericFormatter( pClassSpinField ); - aBaseLst.push_back( pClassTmp ); - - RscTop* pClassNumericField = InitClassNumericField( pClassTmp ); - pRoot->Insert( pClassNumericField ); - } -} -{ RscTop* pClassDockingWindow = InitClassDockingWindow( pClassWindow, pMapUnit ); pRoot->Insert( pClassDockingWindow ); diff --git a/tools/source/rc/resmgr.cxx b/tools/source/rc/resmgr.cxx index 18d4a59515c4..bdf71abc6a01 100644 --- a/tools/source/rc/resmgr.cxx +++ b/tools/source/rc/resmgr.cxx @@ -1426,8 +1426,6 @@ OString ResMgr::GetAutoHelpId() case RSC_EDIT: aHID.append( "Edit" ); break; case RSC_LISTBOX: aHID.append( "ListBox" ); break; case RSC_PUSHBUTTON: aHID.append( "PushButton" ); break; - case RSC_SPINFIELD: aHID.append( "SpinField" ); break; - case RSC_NUMERICFIELD: aHID.append( "NumericField" ); break; case RSC_IMAGEBUTTON: aHID.append( "ImageButton" ); break; default: // no type, no auto HID diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx index 4ea339ced88a..6e44a9d5ea41 100644 --- a/vcl/source/control/field.cxx +++ b/vcl/source/control/field.cxx @@ -524,34 +524,6 @@ NumericFormatter::NumericFormatter() ImplInit(); } -void NumericFormatter::ImplLoadRes( const ResId& rResId ) -{ - ResMgr* pMgr = rResId.GetResMgr(); - - if( pMgr ) - { - RscNumFormatterFlags nMask = (RscNumFormatterFlags)pMgr->ReadLong(); - - if ( RscNumFormatterFlags::Min & nMask ) - mnMin = pMgr->ReadLong(); - - if ( RscNumFormatterFlags::Max & nMask ) - mnMax = pMgr->ReadLong(); - - if ( RscNumFormatterFlags::StrictFormat & nMask ) - SetStrictFormat( pMgr->ReadShort() != 0 ); - - if ( RscNumFormatterFlags::DecimalDigits & nMask ) - SetDecimalDigits( pMgr->ReadShort() ); - - if ( RscNumFormatterFlags::Value & nMask ) - { - mnFieldValue = ClipAgainstMinMax(pMgr->ReadLong()); - mnLastValue = mnFieldValue; - } - } -} - NumericFormatter::~NumericFormatter() { } @@ -781,20 +753,6 @@ NumericField::NumericField( vcl::Window* pParent, WinBits nWinStyle ) : Reformat(); } -NumericField::NumericField( vcl::Window* pParent, const ResId& rResId ) : - SpinField( WINDOW_NUMERICFIELD ) -{ - rResId.SetRT( RSC_NUMERICFIELD ); - WinBits nStyle = ImplInitRes( rResId ) ; - SpinField::ImplInit( pParent, nStyle ); - SetField( this ); - ImplLoadRes( rResId ); - Reformat(); - - if ( !(nStyle & WB_HIDE ) ) - Show(); -} - void NumericField::dispose() { NumericFormatter::SetField( nullptr ); @@ -814,23 +772,6 @@ bool NumericField::set_property(const OString &rKey, const OString &rValue) return true; } -void NumericField::ImplLoadRes( const ResId& rResId ) -{ - SpinField::ImplLoadRes( rResId ); - NumericFormatter::ImplLoadRes( ResId( static_cast<RSHEADER_TYPE *>(GetClassRes()), *rResId.GetResMgr() ) ); - - sal_uLong nMask = ReadLongRes(); - - if ( NUMERICFIELD_FIRST & nMask ) - mnFirst = ReadLongRes(); - - if ( NUMERICFIELD_LAST & nMask ) - mnLast = ReadLongRes(); - - if ( NUMERICFIELD_SPINSIZE & nMask ) - mnSpinSize = ReadLongRes(); -} - bool NumericField::PreNotify( NotifyEvent& rNEvt ) { if ( (rNEvt.GetType() == MouseNotifyEvent::KEYINPUT) && !rNEvt.GetKeyEvent()->GetKeyCode().IsMod2() ) |