diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-12-31 13:15:10 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-12-31 18:10:51 +0000 |
commit | d21d606236d7d9d93cfba0a16c3d9ec4473ef8f0 (patch) | |
tree | a8831239f96c1fea71f4a1dc421a65ff500a07a5 | |
parent | caa92788885c6bfca326b11237e17cd981da1b7f (diff) |
drop timeformatter resource loading
Change-Id: I11de468ab65aa4dec761fbcc1e9416528c332dd5
-rw-r--r-- | include/tools/rc.h | 8 | ||||
-rw-r--r-- | include/vcl/field.hxx | 1 | ||||
-rw-r--r-- | rsc/inc/rscdb.hxx | 3 | ||||
-rw-r--r-- | rsc/source/parser/rscicpx.cxx | 63 | ||||
-rw-r--r-- | rsc/source/parser/rscinit.cxx | 12 | ||||
-rw-r--r-- | vcl/source/control/field2.cxx | 42 |
6 files changed, 0 insertions, 129 deletions
diff --git a/include/tools/rc.h b/include/tools/rc.h index 14ad10de4ef9..8c123acdd675 100644 --- a/include/tools/rc.h +++ b/include/tools/rc.h @@ -99,14 +99,6 @@ typedef short RSWND_STYLE; //#define DATEFORMATTER_I12 0x10 // removed (2005-06-17) #define DATEFORMATTER_VALUE 0x20 -#define TIMEFORMATTER_MIN 0x01 -#define TIMEFORMATTER_MAX 0x02 -#define TIMEFORMATTER_TIMEFIELDFORMAT 0x04 -#define TIMEFORMATTER_DURATION 0x08 -#define TIMEFORMATTER_STRICTFORMAT 0x10 -//#define TIMEFORMATTER_I12 0x20 // removed (2005-06-17) -#define TIMEFORMATTER_VALUE 0x40 - #define NUMERICFIELD_FIRST 0x01 #define NUMERICFIELD_LAST 0x02 #define NUMERICFIELD_SPINSIZE 0x04 diff --git a/include/vcl/field.hxx b/include/vcl/field.hxx index 0065e1a2e476..02da97b59ab7 100644 --- a/include/vcl/field.hxx +++ b/include/vcl/field.hxx @@ -421,7 +421,6 @@ protected: TimeFormatter(); - SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId ); SAL_DLLPRIVATE bool ImplTimeReformat( const OUString& rStr, OUString& rOutStr ); SAL_DLLPRIVATE void ImplNewFieldValue( const tools::Time& rTime ); SAL_DLLPRIVATE void ImplSetUserTime( const tools::Time& rNewTime, Selection* pNewSelection = NULL ); diff --git a/rsc/inc/rscdb.hxx b/rsc/inc/rscdb.hxx index 5834ead61eed..e53c902475c8 100644 --- a/rsc/inc/rscdb.hxx +++ b/rsc/inc/rscdb.hxx @@ -205,15 +205,12 @@ class RscTypCont RscTop * pClassKeyCode ); RscTop * InitClassMenu( RscTop * pSuper, RscTop * pMenuItem ); RscTop * InitClassSplitWindow( RscTop * pSuper ); - RscTop * InitClassTime( RscTop * pSuper ); RscTop * InitClassDate( RscTop * pSuper ); RscTop * InitClassNumericFormatter( RscTop * pSuper ); RscTop * InitClassMetricFormatter( RscTop * pSuper, RscEnum * pFieldUnits ); RscTop * InitClassDateFormatter( RscTop * pSuper, RscTop * pClassDate ); - RscTop * InitClassTimeFormatter( RscTop * pSuper, RscTop * pClassTime, - RscEnum * pTimeFieldFormat ); RscTop * InitClassSpinField( RscTop * pSuper ); RscTop * InitClassNumericField( RscTop * pSuper ); diff --git a/rsc/source/parser/rscicpx.cxx b/rsc/source/parser/rscicpx.cxx index 13c9e59b286a..19c61647cea0 100644 --- a/rsc/source/parser/rscicpx.cxx +++ b/rsc/source/parser/rscicpx.cxx @@ -929,34 +929,6 @@ RscTop * RscTypCont::InitClassSplitWindow( RscTop * pSuper ) return pClassSplitWindow; } -RscTop * RscTypCont::InitClassTime( RscTop * pSuper ) -{ - Atom nId; - RscTop * pClassTime; - - // Klasse anlegen - nId = pHS->getID( "Time" ); - pClassTime = new RscClass( nId, RSC_TIME, pSuper ); - pClassTime->SetCallPar( *pStdPar1, *pStdPar2, *pStdParType ); - - aNmTb.Put( nId, CLASSNAME, pClassTime ); - - // Variablen anlegen - nId = aNmTb.Put( "Hour", VARNAME ); - pClassTime->SetVariable( nId, &a0to23Short, NULL, 0, TIME_HOUR ); - - nId = aNmTb.Put( "Minute", VARNAME ); - pClassTime->SetVariable( nId, &a0to59Short, NULL, 0, TIME_MINUTE ); - - nId = aNmTb.Put( "Second", VARNAME ); - pClassTime->SetVariable( nId, &a0to59Short, NULL, 0, TIME_SECOND ); - - nId = aNmTb.Put( "Sec100", VARNAME ); // weiss noch nich - pClassTime->SetVariable( nId, &a0to99Short, NULL, 0, TIME_SEC100 ); - - return pClassTime; -} - RscTop * RscTypCont::InitClassDate( RscTop * pSuper ) { Atom nId; @@ -1068,41 +1040,6 @@ RscTop * RscTypCont::InitClassDateFormatter( RscTop * pSuper, return pClassDateF; } -RscTop * RscTypCont::InitClassTimeFormatter( RscTop * pSuper, - RscTop * pClassTime, - RscEnum * pTimeFieldFormat ) -{ - Atom nId; - RscTop * pClassTimeF; - - // Klasse anlegen - nId = pHS->getID( "TimeFormatter" ); - pClassTimeF = new RscClass( nId, RSC_NOTYPE, pSuper ); - pClassTimeF->SetCallPar( *pStdPar1, *pStdPar2, *pStdParType ); - - // Variablen anlegen - nId = aNmTb.Put( "Minimum", VARNAME ); - pClassTimeF->SetVariable( nId, pClassTime, NULL, - 0, TIMEFORMATTER_MIN ); - nId = aNmTb.Put( "Maximum", VARNAME ); - pClassTimeF->SetVariable( nId, pClassTime, NULL, - 0, TIMEFORMATTER_MAX ); - nId = aNmTb.Put( "Format", VARNAME ); - pClassTimeF->SetVariable( nId, pTimeFieldFormat, NULL, - 0, TIMEFORMATTER_TIMEFIELDFORMAT ); - nId = aNmTb.Put( "Duration", VARNAME ); - pClassTimeF->SetVariable( nId, &aBool, NULL, - 0, TIMEFORMATTER_DURATION ); - nId = aNmTb.Put( "StrictFormat", VARNAME ); - pClassTimeF->SetVariable( nId, &aBool, NULL, - 0, TIMEFORMATTER_STRICTFORMAT ); - nId = aNmTb.Put( "Value", VARNAME ); - pClassTimeF->SetVariable( nId, pClassTime, NULL, - 0, TIMEFORMATTER_VALUE ); - - return pClassTimeF; -} - RscTop * RscTypCont::InitClassSpinField( RscTop * pSuper ) { Atom nId; diff --git a/rsc/source/parser/rscinit.cxx b/rsc/source/parser/rscinit.cxx index 2a6801c7be9a..1ffc64f83fa5 100644 --- a/rsc/source/parser/rscinit.cxx +++ b/rsc/source/parser/rscinit.cxx @@ -44,7 +44,6 @@ void RscTypCont::Init() { RscEnum * pFieldUnits; - RscEnum * pTimeFieldFormat; RscEnum * pColor; RscEnum * pMapUnit; RscEnum * pKey; @@ -88,7 +87,6 @@ void RscTypCont::Init() RscTop * pClassMenu; RscTop * pClassSplitWindow; RscTop * pClassSpinButton; - RscTop * pClassTime; RscTop * pClassDate; RscTop * pClassSpinField; RscTop * pClassNumericField; @@ -273,7 +271,6 @@ void RscTypCont::Init() { InitLangType(); aBaseLst.push_back( pFieldUnits = InitFieldUnitsType() ); - aBaseLst.push_back( pTimeFieldFormat = InitTimeFieldFormat() ); aBaseLst.push_back( pColor = InitColor() ); aBaseLst.push_back( pMapUnit = InitMapUnit() ); aBaseLst.push_back( pKey = InitKey() ); @@ -441,9 +438,6 @@ void RscTypCont::Init() pRoot->Insert( pClassSpinButton ); } { - pClassTime = InitClassTime( pClassMgr ); - pRoot->Insert( pClassTime ); - pClassDate = InitClassDate( pClassMgr ); pRoot->Insert( pClassDate ); } @@ -475,12 +469,6 @@ void RscTypCont::Init() pClassDateField = InitClassDateField( pClassTmp, pClassDate ); pRoot->Insert( pClassDateField ); } - { // Mehrfachvererbung von Hand - RscTop * pClassTmp = InitClassTimeFormatter( pClassSpinField, pClassTime, - pTimeFieldFormat ); - aBaseLst.push_back( pClassTmp ); - - } } { pClassDockingWindow = InitClassDockingWindow( pClassWindow, pMapUnit ); diff --git a/vcl/source/control/field2.cxx b/vcl/source/control/field2.cxx index 89b6884a4b45..7192b22faa63 100644 --- a/vcl/source/control/field2.cxx +++ b/vcl/source/control/field2.cxx @@ -2412,48 +2412,6 @@ TimeFormatter::TimeFormatter() : ImplInit(); } -void TimeFormatter::ImplLoadRes( const ResId& rResId ) -{ - ResMgr* pMgr = rResId.GetResMgr(); - if( pMgr ) - { - sal_uLong nMask = pMgr->ReadLong(); - - if ( TIMEFORMATTER_MIN & nMask ) - { - SetMin( tools::Time( ResId( (RSHEADER_TYPE *)pMgr->GetClass(), *pMgr ) ) ); - pMgr->Increment( ResMgr::GetObjSize( (RSHEADER_TYPE *)pMgr->GetClass() ) ); - } - - if ( TIMEFORMATTER_MAX & nMask ) - { - SetMax( tools::Time( ResId( (RSHEADER_TYPE *)pMgr->GetClass(), *pMgr ) ) ); - pMgr->Increment( ResMgr::GetObjSize( (RSHEADER_TYPE *)pMgr->GetClass() ) ); - } - - if ( TIMEFORMATTER_TIMEFIELDFORMAT & nMask ) - meFormat = (TimeFieldFormat)pMgr->ReadLong(); - - if ( TIMEFORMATTER_DURATION & nMask ) - mbDuration = pMgr->ReadShort() != 0; - - if ( TIMEFORMATTER_STRICTFORMAT & nMask ) - SetStrictFormat( pMgr->ReadShort() != 0 ); - - if ( TIMEFORMATTER_VALUE & nMask ) - { - maFieldTime = tools::Time( ResId( (RSHEADER_TYPE *)pMgr->GetClass(), *pMgr ) ); - if ( maFieldTime > GetMax() ) - maFieldTime = GetMax(); - if ( maFieldTime < GetMin() ) - maFieldTime = GetMin(); - maLastTime = maFieldTime; - - pMgr->Increment( ResMgr::GetObjSize( (RSHEADER_TYPE *)pMgr->GetClass() ) ); - } - } -} - TimeFormatter::~TimeFormatter() { } |