no numericfield, spinfield or spinbutton loaded from .src now

Change-Id: I90e4390d1fadcbb18036861dc9b9d39fa8a73551
This commit is contained in:
Caolán McNamara
2016-10-10 14:22:56 +01:00
parent 666787c4bc
commit 9f7f5b5f91
7 changed files with 0 additions and 185 deletions

View File

@@ -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)

View File

@@ -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;

View File

@@ -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);

View File

@@ -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 )
{

View File

@@ -72,7 +72,6 @@ void RscTypCont::Init()
RscTop * pClassFixedImage;
RscTop * pClassKeyCode;
RscTop * pLangClassKeyCode;
RscTop * pClassSpinField;
Atom nId;
@@ -345,39 +344,6 @@ void RscTypCont::Init()
pClassMenuItem->SetVariable( nId, pClassMenu, nullptr, VAR_SVDYNAMIC,
(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 );

View File

@@ -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

View File

@@ -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() )