[Libreoffice-commits] core.git: 7 commits - include/sfx2 include/tools include/vcl rsc/inc rsc/source sfx2/source tools/source vcl/source

Caolán McNamara caolanm at redhat.com
Wed Dec 31 10:11:27 PST 2014


 include/sfx2/dinfdlg.hxx       |   48 +++++++-----
 include/tools/date.hxx         |    3 
 include/tools/rc.h             |   28 -------
 include/tools/rcid.h           |   11 --
 include/tools/time.hxx         |    3 
 include/vcl/field.hxx          |    6 -
 rsc/inc/rscdb.hxx              |   17 ----
 rsc/source/parser/rscdb.cxx    |   12 ---
 rsc/source/parser/rscibas.cxx  |   13 ---
 rsc/source/parser/rscicpx.cxx  |  161 ----------------------------------------
 rsc/source/parser/rscinit.cxx  |   35 --------
 sfx2/source/dialog/dinfdlg.cxx |   31 ++++---
 sfx2/source/dialog/dinfdlg.src |   42 ----------
 sfx2/source/inc/sfxlocal.hrc   |    8 --
 tools/source/rc/rc.cxx         |   44 -----------
 tools/source/rc/resmgr.cxx     |    2 
 vcl/source/control/field2.cxx  |  162 -----------------------------------------
 17 files changed, 52 insertions(+), 574 deletions(-)

New commits:
commit 53f51e32ea541dc99b264934dd255fc2fafe924f
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Dec 31 15:20:45 2014 +0000

    drop unused defines
    
    Change-Id: Ib3966118e5dde496f294c7ee224f4651a6192388

diff --git a/include/tools/rcid.h b/include/tools/rcid.h
index 3bcbf44..ec37ea3 100644
--- a/include/tools/rcid.h
+++ b/include/tools/rcid.h
@@ -83,10 +83,6 @@
 
 // (RSC_NOTYPE + 0x200) - (RSC_NOTYPE + 0x300) reserved for Sfx
 
-#define RT_SYS_BITMAP           (RSC_NOTYPE + 0xf2)
-#define RT_SYS_STRING           (RSC_NOTYPE + 0xf3) // special case
-#define RT_SYS_FILE             (RSC_NOTYPE + 0xf4) // not implemented
-
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 190196b98fc630d8aa3889e93797cb6268008447
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Dec 31 15:19:09 2014 +0000

    Date/Time no longer loaded from rsc files
    
    Change-Id: Ia9ed86b0d96cac76c2e1639065a4ac594c2966b1

diff --git a/include/tools/date.hxx b/include/tools/date.hxx
index e750573..b0f1612 100644
--- a/include/tools/date.hxx
+++ b/include/tools/date.hxx
@@ -23,8 +23,6 @@
 #include <com/sun/star/util/Date.hpp>
 #include <sal/log.hxx>
 
-class ResId;
-
 enum DayOfWeek { MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY,
                  SATURDAY, SUNDAY };
 
@@ -53,7 +51,6 @@ public:
                     Date( DateInitEmpty)
                         { nDate = 0; }
                     Date( DateInitSystem );
-                    Date( const ResId & rResId );
                     Date( sal_uInt32 _nDate ) { Date::nDate = _nDate; }
                     Date( const Date& rDate )
                         { nDate = rDate.nDate; }
diff --git a/include/tools/rcid.h b/include/tools/rcid.h
index b78a420..3bcbf44 100644
--- a/include/tools/rcid.h
+++ b/include/tools/rcid.h
@@ -41,9 +41,6 @@
 #define RSC_MENU                (RSC_NOTYPE + 0x1c)
 #define RSC_MENUITEM            (RSC_NOTYPE + 0x1d) // only used internally
 #define RSC_KEYCODE             (RSC_NOTYPE + 0x1f)
-#define RSC_TIME                (RSC_NOTYPE + 0x20)
-#define RSC_DATE                (RSC_NOTYPE + 0x21)
-//#define RSC_INTERNATIONAL     (RSC_NOTYPE + 0x22) // removed (2005-06-17)
 #define RSC_IMAGE               (RSC_NOTYPE + 0x23)
 #define RSC_IMAGELIST           (RSC_NOTYPE + 0x24)
 
diff --git a/include/tools/time.hxx b/include/tools/time.hxx
index cac4117..140b69f 100644
--- a/include/tools/time.hxx
+++ b/include/tools/time.hxx
@@ -23,8 +23,6 @@
 #include <tools/solar.h>
 #include <com/sun/star/util/Time.hpp>
 
-class ResId;
-
 /**
  @WARNING: This class can serve both as wall clock time and time duration, and
            the mixing of these concepts leads to problems such as there being
@@ -68,7 +66,6 @@ public:
                     Time( TimeInitEmpty )
                         { nTime = 0; }
                     Time( TimeInitSystem );
-                    Time( const ResId & rResId );
                     Time( sal_Int64 _nTime ) { Time::nTime = _nTime; }
                     Time( const tools::Time& rTime );
                     Time( const ::com::sun::star::util::Time& rTime );
diff --git a/tools/source/rc/rc.cxx b/tools/source/rc/rc.cxx
index a4bd8f2..cefccad 100644
--- a/tools/source/rc/rc.cxx
+++ b/tools/source/rc/rc.cxx
@@ -39,50 +39,6 @@ void Resource::GetRes( const ResId& rResId )
     IncrementRes( sizeof( RSHEADER_TYPE ) );
 }
 
-namespace tools {
-
-Time::Time( const ResId& rResId )
-{
-    nTime = 0;
-    rResId.SetRT( RSC_TIME );
-    ResMgr* pResMgr = NULL;
-
-    ResMgr::GetResourceSkipHeader( rResId, &pResMgr );
-
-    sal_uIntPtr nObjMask = (sal_uInt16)pResMgr->ReadLong();
-
-    if ( 0x01 & nObjMask )
-        SetHour( (sal_uInt16)pResMgr->ReadShort() );
-    if ( 0x02 & nObjMask )
-        SetMin( (sal_uInt16)pResMgr->ReadShort() );
-    if ( 0x04 & nObjMask )
-        SetSec( (sal_uInt16)pResMgr->ReadShort() );
-    if ( 0x08 & nObjMask )
-        // TODO: when we change the place that writes this binary resource format to match:
-        // SetNanoSec( pResMgr->ReadLong() );
-        // In the meantime:
-        SetNanoSec( pResMgr->ReadShort() * ::tools::Time::nanoPerCenti );
-}
-
-} /* namespace tools */
-
-Date::Date( const ResId& rResId ) : nDate(0)
-{
-    rResId.SetRT( RSC_DATE );
-    ResMgr* pResMgr = NULL;
-
-    ResMgr::GetResourceSkipHeader( rResId, &pResMgr );
-
-    sal_uIntPtr nObjMask = (sal_uInt16)pResMgr->ReadLong();
-
-    if ( 0x01 & nObjMask )
-        SetYear( (sal_uInt16)pResMgr->ReadShort() );
-    if ( 0x02 & nObjMask )
-        SetMonth( (sal_uInt16)pResMgr->ReadShort() );
-    if ( 0x04 & nObjMask )
-        SetDay( (sal_uInt16)pResMgr->ReadShort() );
-}
-
 OUString ResId::toString() const
 {
     SetRT( RSC_STRING );
commit 959bcd564bca2e33036e0947a293ef2009341cf7
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Dec 31 15:13:21 2014 +0000

    various other apparently unnecessary rsc stuff
    
    Change-Id: I745695a92023e7a14ee547ca6bef5981dd329d19

diff --git a/include/tools/rc.h b/include/tools/rc.h
index 8c123ac..8747be4 100644
--- a/include/tools/rc.h
+++ b/include/tools/rc.h
@@ -92,13 +92,6 @@ typedef short RSWND_STYLE;
 #define METRICFORMATTER_UNIT            0x01
 #define METRICFORMATTER_CUSTOMUNITTEXT  0x02
 
-#define DATEFORMATTER_MIN               0x01
-#define DATEFORMATTER_MAX               0x02
-#define DATEFORMATTER_LONGFORMAT        0x04
-#define DATEFORMATTER_STRICTFORMAT      0x08
-//#define DATEFORMATTER_I12             0x10 // removed (2005-06-17)
-#define DATEFORMATTER_VALUE             0x20
-
 #define NUMERICFIELD_FIRST              0x01
 #define NUMERICFIELD_LAST               0x02
 #define NUMERICFIELD_SPINSIZE           0x04
@@ -107,9 +100,6 @@ typedef short RSWND_STYLE;
 #define METRICFIELD_LAST                0x02
 #define METRICFIELD_SPINSIZE            0x04
 
-#define DATEFIELD_FIRST                 0x01
-#define DATEFIELD_LAST                  0x02
-
 // For "ToolBoxItem" resources:
 #define RSC_TOOLBOXITEM_ID              0x0001
 #define RSC_TOOLBOXITEM_TYPE            0x0002
@@ -160,13 +150,6 @@ typedef short RSWND_STYLE;
 
 // FIXME obsolete, should be removed by MM
 #define RSC_COLOR                       (RSC_NOTYPE + 0x16)
-#define TIME_HOUR                       0x01
-#define TIME_MINUTE                     0x02
-#define TIME_SECOND                     0x04
-#define TIME_SEC100                     0x08
-#define DATE_YEAR                       0x01
-#define DATE_MONTH                      0x02
-#define DATE_DAY                        0x04
 
 #endif
 
diff --git a/rsc/inc/rscdb.hxx b/rsc/inc/rscdb.hxx
index ce37ba5..9a8aa72 100644
--- a/rsc/inc/rscdb.hxx
+++ b/rsc/inc/rscdb.hxx
@@ -39,7 +39,6 @@ class RscCmdLine;
 enum class SymbolType : sal_uInt16;
 enum class ToolBoxItemBits;
 enum class WindowBorderStyle : sal_Int16;
-enum class TimeFieldFormat : sal_Int32;
 enum class KeyFuncType : sal_Int32;
 enum class MenuItemBits : sal_Int16;
 enum class ToolBoxItemType;
@@ -150,14 +149,11 @@ class RscTypCont
     inline void SETCONST( RscConst *p1, Atom p2, ToolBoxItemBits p3 ) { SETCONST(p1, p2, static_cast<sal_uInt32>(p3)); }
     inline void SETCONST( RscConst *p1, Atom p2, WindowBorderStyle p3 ) { SETCONST(p1, p2, static_cast<sal_uInt32>(p3)); }
     inline void SETCONST( RscConst *p1, const char * p2, KeyFuncType p3 ) { SETCONST(p1, p2, static_cast<sal_uInt32>(p3)); }
-    inline void SETCONST( RscConst *p1, Atom p2, TimeFieldFormat p3 ) { SETCONST(p1, p2, static_cast<sal_uInt32>(p3)); }
-    inline void SETCONST( RscConst *p1, const char * p2, TimeFieldFormat p3 ) { SETCONST(p1, p2, static_cast<sal_uInt32>(p3)); }
     inline void SETCONST( RscConst *p1, const char * p2, MenuItemBits p3 ) { SETCONST(p1, p2, static_cast<sal_uInt32>(p3)); }
     inline void SETCONST( RscConst *p1, Atom p2, MenuItemBits p3 ) { SETCONST(p1, p2, static_cast<sal_uInt32>(p3)); }
     inline void SETCONST( RscConst *p1, const char * p2, ToolBoxItemType p3 ) { SETCONST(p1, p2, static_cast<sal_uInt32>(p3)); }
     RscEnum *   InitLangType();
     RscEnum *   InitFieldUnitsType();
-    RscEnum *   InitTimeFieldFormat();
     RscEnum *   InitColor();
     RscEnum *   InitMapUnit();
     RscEnum *   InitKey();
@@ -242,12 +238,6 @@ public:
     RscIdRange          aIdUShort;
     RscIdRange          aIdNoZeroUShort;
     RscBreakRange       aNoZeroShort;
-    RscRange            a1to12Short;
-    RscRange            a0to23Short;
-    RscRange            a1to31Short;
-    RscRange            a0to59Short;
-    RscRange            a0to99Short;
-    RscRange            a0to9999Short;
     RscIdRange          aIdLong;
     RscString           aString;
     RscString           aStringLiteral;
diff --git a/rsc/source/parser/rscdb.cxx b/rsc/source/parser/rscdb.cxx
index 6af2194..75aa7ec 100644
--- a/rsc/source/parser/rscdb.cxx
+++ b/rsc/source/parser/rscdb.cxx
@@ -50,12 +50,6 @@ RscTypCont :: RscTypCont( RscError * pErrHdl,
     , aIdUShort( pHS->getID( "IDUSHORT" ), RSC_NOTYPE )
     , aIdNoZeroUShort( pHS->getID( "IDUSHORT" ), RSC_NOTYPE )
     , aNoZeroShort( pHS->getID( "NoZeroShort" ), RSC_NOTYPE )
-    , a1to12Short( pHS->getID( "MonthShort" ), RSC_NOTYPE )
-    , a0to23Short( pHS->getID( "HourShort" ), RSC_NOTYPE )
-    , a1to31Short( pHS->getID( "DayShort" ), RSC_NOTYPE )
-    , a0to59Short( pHS->getID( "MinuteShort" ), RSC_NOTYPE )
-    , a0to99Short( pHS->getID( "_0to59Short" ), RSC_NOTYPE )
-    , a0to9999Short( pHS->getID( "YearShort" ), RSC_NOTYPE )
     , aIdLong( pHS->getID( "IDLONG" ), RSC_NOTYPE )
     , aString( pHS->getID( "Chars" ), RSC_NOTYPE )
     , aStringLiteral( pHS->getID( "Chars" ), RSC_NOTYPE )
@@ -242,12 +236,6 @@ RscTop * RscTypCont::SearchType( Atom nId )
     ELSE_IF( aIdUShort )
     ELSE_IF( aIdNoZeroUShort )
     ELSE_IF( aNoZeroShort )
-    ELSE_IF( a1to12Short )
-    ELSE_IF( a0to23Short )
-    ELSE_IF( a1to31Short )
-    ELSE_IF( a0to59Short )
-    ELSE_IF( a0to99Short )
-    ELSE_IF( a0to9999Short )
     ELSE_IF( aIdLong )
     ELSE_IF( aString )
     ELSE_IF( aWinBits )
diff --git a/rsc/source/parser/rscibas.cxx b/rsc/source/parser/rscibas.cxx
index da5d688..b5f7236 100644
--- a/rsc/source/parser/rscibas.cxx
+++ b/rsc/source/parser/rscibas.cxx
@@ -203,19 +203,6 @@ RscEnum * RscTypCont::InitFieldUnitsType()
     return pFieldUnits;
 }
 
-RscEnum * RscTypCont::InitTimeFieldFormat()
-{
-    RscEnum * pTimeFieldFormat;
-    pTimeFieldFormat = new RscEnum( pHS->getID( "EnumTimeFieldFormat" ),
-                                    RSC_NOTYPE );
-
-    SETCONST( pTimeFieldFormat, "TIMEF_NONE", TimeFieldFormat::F_NONE );
-    SETCONST( pTimeFieldFormat, "TIMEF_SEC", TimeFieldFormat::F_SEC );
-    SETCONST( pTimeFieldFormat, "TIMEF_100TH_SEC", TimeFieldFormat::F_100TH_SEC );
-
-    return pTimeFieldFormat;
-}
-
 RscEnum * RscTypCont::InitColor()
 {
     RscEnum * pColor;
diff --git a/rsc/source/parser/rscinit.cxx b/rsc/source/parser/rscinit.cxx
index 94eb890..e09c4c6 100644
--- a/rsc/source/parser/rscinit.cxx
+++ b/rsc/source/parser/rscinit.cxx
@@ -139,13 +139,6 @@ void RscTypCont::Init()
     aNoZeroShort.SetRange( -32768, 32767 );
     aNoZeroShort.SetOutRange( 0 );
 
-        a1to12Short.SetRange( 1, 12 );
-        a0to23Short.SetRange( 0, 23 );
-        a1to31Short.SetRange( 1, 31 );
-        a0to59Short.SetRange( 0, 59 );
-        a0to99Short.SetRange( 0, 99 );
-        a0to9999Short.SetRange( 0, 9999 );
-
     aIdLong.SetRange( SAL_MIN_INT32, SAL_MAX_INT32 );
 }
 {
commit 756fe1b298762ed145784a09c512d793d9c6fa92
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Dec 31 15:04:30 2014 +0000

    drop dateformatter resource loading
    
    Change-Id: Ie94c7502b0a82ca406b8d76e18def7bab8233a00

diff --git a/include/tools/rcid.h b/include/tools/rcid.h
index fb20430..b78a420 100644
--- a/include/tools/rcid.h
+++ b/include/tools/rcid.h
@@ -78,9 +78,6 @@
 #define RSC_NUMERICFIELD        (RSC_NOTYPE + 0x63)
 #define RSC_METRICFIELD         (RSC_NOTYPE + 0x64)
 
-#define RSC_DATEFIELD           (RSC_NOTYPE + 0x66)
-
-
 #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 02da97b..179c16a 100644
--- a/include/vcl/field.hxx
+++ b/include/vcl/field.hxx
@@ -325,7 +325,6 @@ private:
 protected:
                             DateFormatter();
 
-    SAL_DLLPRIVATE void     ImplLoadRes( const ResId& rResId );
     SAL_DLLPRIVATE const Date& ImplGetFieldDate() const    { return maFieldDate; }
     SAL_DLLPRIVATE bool     ImplDateReformat( const OUString& rStr, OUString& rOutStr,
                                               const AllSettings& rSettings );
@@ -630,11 +629,9 @@ private:
 
 protected:
     SAL_DLLPRIVATE void     ImplDateSpinArea( bool bUp );
-    SAL_DLLPRIVATE void     ImplLoadRes( const ResId& rResId );
 
 public:
     explicit                DateField( vcl::Window* pParent, WinBits nWinStyle );
-    explicit                DateField( vcl::Window* pParent, const ResId& );
     virtual                 ~DateField();
 
     virtual bool            PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
diff --git a/rsc/inc/rscdb.hxx b/rsc/inc/rscdb.hxx
index e53c902..ce37ba5 100644
--- a/rsc/inc/rscdb.hxx
+++ b/rsc/inc/rscdb.hxx
@@ -205,17 +205,14 @@ class RscTypCont
                                    RscTop * pClassKeyCode );
     RscTop *    InitClassMenu( RscTop * pSuper, RscTop * pMenuItem );
     RscTop *    InitClassSplitWindow( RscTop * pSuper );
-    RscTop *    InitClassDate( RscTop * pSuper );
 
     RscTop *    InitClassNumericFormatter( RscTop * pSuper );
     RscTop *    InitClassMetricFormatter( RscTop * pSuper,
                                           RscEnum * pFieldUnits );
-    RscTop *    InitClassDateFormatter( RscTop * pSuper, RscTop * pClassDate );
 
     RscTop *    InitClassSpinField( RscTop * pSuper );
     RscTop *    InitClassNumericField( RscTop * pSuper );
     RscTop *    InitClassMetricField( RscTop * pSuper );
-    RscTop *    InitClassDateField( RscTop * pSuper, RscTop * pClassDate );
 
     RscTop *    InitClassDockingWindow( RscTop * pSuper,
                                         RscEnum * pMapUnit );
diff --git a/rsc/source/parser/rscicpx.cxx b/rsc/source/parser/rscicpx.cxx
index 19c6164..f62ff3e 100644
--- a/rsc/source/parser/rscicpx.cxx
+++ b/rsc/source/parser/rscicpx.cxx
@@ -929,31 +929,6 @@ RscTop * RscTypCont::InitClassSplitWindow( RscTop * pSuper )
     return pClassSplitWindow;
 }
 
-RscTop * RscTypCont::InitClassDate( RscTop * pSuper )
-{
-    Atom        nId;
-    RscTop *    pClassDate;
-
-    // Klasse anlegen
-    nId = pHS->getID( "Date" );
-    pClassDate = new RscClass( nId, RSC_DATE, pSuper );
-    pClassDate->SetCallPar( *pStdPar1, *pStdPar2, *pStdParType );
-
-    aNmTb.Put( nId, CLASSNAME, pClassDate );
-
-    // Variablen anlegen
-    nId = aNmTb.Put( "Year", VARNAME );
-    pClassDate->SetVariable( nId, &a0to9999Short, NULL, 0, DATE_YEAR  );
-
-    nId = aNmTb.Put( "Month", VARNAME );
-    pClassDate->SetVariable( nId, &a1to12Short, NULL, 0, DATE_MONTH  );
-
-    nId = aNmTb.Put( "Day", VARNAME );
-    pClassDate->SetVariable( nId, &a1to31Short, NULL, 0, DATE_DAY  );
-
-    return pClassDate;
-}
-
 RscTop * RscTypCont::InitClassNumericFormatter( RscTop * pSuper )
 {
     Atom        nId;
@@ -1009,37 +984,6 @@ RscTop * RscTypCont::InitClassMetricFormatter( RscTop * pSuper,
     return pClassMetric;
 }
 
-RscTop * RscTypCont::InitClassDateFormatter( RscTop * pSuper,
-                        RscTop * pClassDate )
-{
-    Atom        nId;
-    RscTop *    pClassDateF;
-
-    // Klasse anlegen
-    nId = pHS->getID( "DateFormatter" );
-    pClassDateF = new RscClass( nId, RSC_NOTYPE, pSuper );
-    pClassDateF->SetCallPar( *pStdPar1, *pStdPar2, *pStdParType );
-
-    // Variablen anlegen
-    nId = aNmTb.Put( "Minimum", VARNAME );
-    pClassDateF->SetVariable( nId, pClassDate, NULL,
-                                                                        0, DATEFORMATTER_MIN );
-    nId = aNmTb.Put( "Maximum", VARNAME );
-    pClassDateF->SetVariable( nId, pClassDate, NULL,
-                                                                        0, DATEFORMATTER_MAX );
-    nId = aNmTb.Put( "LongFormat", VARNAME );
-    pClassDateF->SetVariable( nId, &aBool, NULL,
-                                                                        0, DATEFORMATTER_LONGFORMAT );
-    nId = aNmTb.Put( "StrictFormat", VARNAME );
-    pClassDateF->SetVariable( nId, &aBool, NULL,
-                                                                        0, DATEFORMATTER_STRICTFORMAT );
-    nId = aNmTb.Put( "Value", VARNAME );
-    pClassDateF->SetVariable( nId, pClassDate, NULL,
-                                                                        0, DATEFORMATTER_VALUE );
-
-        return pClassDateF;
-}
-
 RscTop * RscTypCont::InitClassSpinField( RscTop * pSuper )
 {
     Atom        nId;
@@ -1109,27 +1053,6 @@ RscTop * RscTypCont::InitClassMetricField( RscTop * pSuper )
     return pClassMetricField;
 }
 
-RscTop * RscTypCont::InitClassDateField( RscTop * pSuper, RscTop * pClassDate )
-{
-    Atom        nId;
-    RscTop *    pClassDateField;
-
-    // Klasse anlegen
-    nId = pHS->getID( "DateField" );
-    pClassDateField = new RscClass( nId, RSC_DATEFIELD, pSuper );
-    pClassDateField->SetCallPar( *pWinPar1, *pWinPar2, *pWinParType );
-
-    aNmTb.Put( nId, CLASSNAME, pClassDateField );
-
-    // Variablen anlegen
-    nId = aNmTb.Put( "First", VARNAME );
-    pClassDateField->SetVariable( nId, pClassDate, NULL, 0, DATEFIELD_FIRST );
-    nId = aNmTb.Put( "Last", VARNAME );
-    pClassDateField->SetVariable( nId, pClassDate, NULL, 0, DATEFIELD_LAST );
-
-    return pClassDateField;
-}
-
 RscTop * RscTypCont::InitClassDockingWindow( RscTop * pSuper,
                                              RscEnum * pMapUnit )
 {
diff --git a/rsc/source/parser/rscinit.cxx b/rsc/source/parser/rscinit.cxx
index 1ffc64f..94eb890 100644
--- a/rsc/source/parser/rscinit.cxx
+++ b/rsc/source/parser/rscinit.cxx
@@ -87,11 +87,9 @@ void RscTypCont::Init()
     RscTop   *  pClassMenu;
     RscTop   *  pClassSplitWindow;
     RscTop   *  pClassSpinButton;
-    RscTop   *  pClassDate;
     RscTop   *  pClassSpinField;
     RscTop   *  pClassNumericField;
     RscTop   *  pClassMetricField;
-    RscTop   *  pClassDateField;
     RscTop   *  pClassDockingWindow;
     RscTop   *  pClassToolBoxItem;
     RscTop   *  pClassToolBox;
@@ -438,10 +436,6 @@ void RscTypCont::Init()
     pRoot->Insert( pClassSpinButton );
 }
 {
-    pClassDate = InitClassDate( pClassMgr );
-    pRoot->Insert( pClassDate );
-}
-{
     pClassSpinField = InitClassSpinField( pClassEdit );
     pRoot->Insert( pClassSpinField );
 }
@@ -462,13 +456,6 @@ void RscTypCont::Init()
     pClassMetricField = InitClassMetricField( pClassTmp );
     pRoot->Insert( pClassMetricField );
     }
-    { // Mehrfachvererbung von Hand
-    RscTop * pClassTmp = InitClassDateFormatter( pClassSpinField, pClassDate );
-    aBaseLst.push_back( pClassTmp );
-
-    pClassDateField = InitClassDateField( pClassTmp, pClassDate );
-    pRoot->Insert( pClassDateField );
-    }
 }
 {
     pClassDockingWindow = InitClassDockingWindow( pClassWindow, pMapUnit );
diff --git a/tools/source/rc/resmgr.cxx b/tools/source/rc/resmgr.cxx
index 592bf9b..39daa7d 100644
--- a/tools/source/rc/resmgr.cxx
+++ b/tools/source/rc/resmgr.cxx
@@ -1482,7 +1482,6 @@ OString ResMgr::GetAutoHelpId()
                     case RSC_SPINFIELD:         aHID.append( "SpinField" );        break;
                     case RSC_NUMERICFIELD:      aHID.append( "NumericField" );     break;
                     case RSC_METRICFIELD:       aHID.append( "MetricField" );      break;
-                    case RSC_DATEFIELD:         aHID.append( "DateField" );        break;
                     case RSC_IMAGEBUTTON:       aHID.append( "ImageButton" );      break;
                     default:
                         // no type, no auto HID
diff --git a/vcl/source/control/field2.cxx b/vcl/source/control/field2.cxx
index 7192b22..185ba22 100644
--- a/vcl/source/control/field2.cxx
+++ b/vcl/source/control/field2.cxx
@@ -1431,42 +1431,6 @@ DateFormatter::DateFormatter() :
     ImplInit();
 }
 
-void DateFormatter::ImplLoadRes( const ResId& rResId )
-{
-    ResMgr*     pMgr = rResId.GetResMgr();
-    if( pMgr )
-    {
-        sal_uLong       nMask = pMgr->ReadLong();
-
-        if ( DATEFORMATTER_MIN & nMask )
-        {
-            maMin = Date( ResId( (RSHEADER_TYPE *)pMgr->GetClass(), *pMgr ) );
-            pMgr->Increment( ResMgr::GetObjSize( (RSHEADER_TYPE*)pMgr->GetClass() ) );
-        }
-        if ( DATEFORMATTER_MAX & nMask )
-        {
-            maMax = Date( ResId( (RSHEADER_TYPE *)pMgr->GetClass(), *pMgr ) );
-            pMgr->Increment( ResMgr::GetObjSize( (RSHEADER_TYPE*)pMgr->GetClass() ) );
-        }
-        if ( DATEFORMATTER_LONGFORMAT & nMask )
-            mbLongFormat = pMgr->ReadShort() != 0;
-
-        if ( DATEFORMATTER_STRICTFORMAT & nMask )
-            SetStrictFormat( pMgr->ReadShort() != 0 );
-
-        if ( DATEFORMATTER_VALUE & nMask )
-        {
-            maFieldDate = Date( ResId( (RSHEADER_TYPE *)pMgr->GetClass(), *pMgr ) );
-            pMgr->Increment( ResMgr::GetObjSize( (RSHEADER_TYPE*)pMgr->GetClass() ) );
-            if ( maFieldDate > maMax )
-                maFieldDate = maMax;
-            if ( maFieldDate < maMin )
-                maFieldDate = maMin;
-            maLastDate = maFieldDate;
-        }
-    }
-}
-
 DateFormatter::~DateFormatter()
 {
     delete mpCalendarWrapper;
@@ -1773,49 +1737,6 @@ DateField::DateField( vcl::Window* pParent, WinBits nWinStyle ) :
     ResetLastDate();
 }
 
-DateField::DateField( vcl::Window* pParent, const ResId& rResId ) :
-    SpinField( WINDOW_DATEFIELD ),
-    maFirst( GetMin() ),
-    maLast( GetMax() )
-{
-    rResId.SetRT( RSC_DATEFIELD );
-    WinBits nStyle = ImplInitRes( rResId );
-    SpinField::ImplInit( pParent, nStyle );
-    SetField( this );
-    SetText( ImplGetLocaleDataWrapper().getDate( ImplGetFieldDate() ) );
-    ImplLoadRes( rResId );
-
-    if ( !(nStyle & WB_HIDE ) )
-        Show();
-
-    ResetLastDate();
-}
-
-void DateField::ImplLoadRes( const ResId& rResId )
-{
-    SpinField::ImplLoadRes( rResId );
-
-    ResMgr* pMgr = rResId.GetResMgr();
-    if( pMgr )
-    {
-        DateFormatter::ImplLoadRes( ResId( (RSHEADER_TYPE *)GetClassRes(), *pMgr ) );
-
-        sal_uLong  nMask = ReadLongRes();
-        if ( DATEFIELD_FIRST & nMask )
-        {
-            maFirst = Date( ResId( (RSHEADER_TYPE *)GetClassRes(), *pMgr ) );
-            IncrementRes( GetObjSizeRes( (RSHEADER_TYPE *)GetClassRes() ) );
-        }
-        if ( DATEFIELD_LAST & nMask )
-        {
-            maLast = Date( ResId( (RSHEADER_TYPE *)GetClassRes(), *pMgr ) );
-            IncrementRes( GetObjSizeRes( (RSHEADER_TYPE *)GetClassRes() ) );
-        }
-    }
-
-    Reformat();
-}
-
 DateField::~DateField()
 {
 }
commit d21d606236d7d9d93cfba0a16c3d9ec4473ef8f0
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Dec 31 13:15:10 2014 +0000

    drop timeformatter resource loading
    
    Change-Id: I11de468ab65aa4dec761fbcc1e9416528c332dd5

diff --git a/include/tools/rc.h b/include/tools/rc.h
index 14ad10d..8c123ac 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 0065e1a..02da97b 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 5834ead..e53c902 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 13c9e59..19c6164 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 2a6801c..1ffc64f 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 89b6884..7192b22 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()
 {
 }
commit caa92788885c6bfca326b11237e17cd981da1b7f
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Dec 31 13:06:38 2014 +0000

    TimeFields not loaded from resource files anymore
    
    Change-Id: Idf69d375eff4bfff7115e59530b37200ee79f086

diff --git a/include/tools/rc.h b/include/tools/rc.h
index 64f397d..14ad10d 100644
--- a/include/tools/rc.h
+++ b/include/tools/rc.h
@@ -118,9 +118,6 @@ typedef short RSWND_STYLE;
 #define DATEFIELD_FIRST                 0x01
 #define DATEFIELD_LAST                  0x02
 
-#define TIMEFIELD_FIRST                 0x01
-#define TIMEFIELD_LAST                  0x02
-
 // For "ToolBoxItem" resources:
 #define RSC_TOOLBOXITEM_ID              0x0001
 #define RSC_TOOLBOXITEM_TYPE            0x0002
diff --git a/include/tools/rcid.h b/include/tools/rcid.h
index 260626e..fb20430 100644
--- a/include/tools/rcid.h
+++ b/include/tools/rcid.h
@@ -79,7 +79,6 @@
 #define RSC_METRICFIELD         (RSC_NOTYPE + 0x64)
 
 #define RSC_DATEFIELD           (RSC_NOTYPE + 0x66)
-#define RSC_TIMEFIELD           (RSC_NOTYPE + 0x67)
 
 
 #define RSC_TOOLBOXITEM         (RSC_NOTYPE + 0x70)
diff --git a/include/vcl/field.hxx b/include/vcl/field.hxx
index f3d6c82..0065e1a 100644
--- a/include/vcl/field.hxx
+++ b/include/vcl/field.hxx
@@ -667,11 +667,9 @@ private:
 
 protected:
     SAL_DLLPRIVATE void     ImplTimeSpinArea( bool bUp );
-    SAL_DLLPRIVATE void     ImplLoadRes( const ResId& rResId );
 
 public:
     explicit                TimeField( vcl::Window* pParent, WinBits nWinStyle );
-    explicit                TimeField( vcl::Window* pParent, const ResId& );
     virtual                 ~TimeField();
 
     virtual bool            PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
diff --git a/rsc/inc/rscdb.hxx b/rsc/inc/rscdb.hxx
index b490566..5834ead 100644
--- a/rsc/inc/rscdb.hxx
+++ b/rsc/inc/rscdb.hxx
@@ -219,7 +219,6 @@ class RscTypCont
     RscTop *    InitClassNumericField( RscTop * pSuper );
     RscTop *    InitClassMetricField( RscTop * pSuper );
     RscTop *    InitClassDateField( RscTop * pSuper, RscTop * pClassDate );
-    RscTop *    InitClassTimeField( RscTop * pSuper, RscTop * pClassTime );
 
     RscTop *    InitClassDockingWindow( RscTop * pSuper,
                                         RscEnum * pMapUnit );
diff --git a/rsc/source/parser/rscicpx.cxx b/rsc/source/parser/rscicpx.cxx
index 24f65dd..13c9e59 100644
--- a/rsc/source/parser/rscicpx.cxx
+++ b/rsc/source/parser/rscicpx.cxx
@@ -1193,27 +1193,6 @@ RscTop * RscTypCont::InitClassDateField( RscTop * pSuper, RscTop * pClassDate )
     return pClassDateField;
 }
 
-RscTop * RscTypCont::InitClassTimeField( RscTop * pSuper, RscTop * pClassTime )
-{
-    Atom        nId;
-    RscTop *    pClassTimeField;
-
-    // Klasse anlegen
-    nId = pHS->getID( "TimeField" );
-    pClassTimeField = new RscClass( nId, RSC_TIMEFIELD, pSuper );
-    pClassTimeField->SetCallPar( *pWinPar1, *pWinPar2, *pWinParType );
-
-    aNmTb.Put( nId, CLASSNAME, pClassTimeField );
-
-    // Variablen anlegen
-    nId = aNmTb.Put( "First", VARNAME );
-    pClassTimeField->SetVariable( nId, pClassTime, NULL, 0, TIMEFIELD_FIRST );
-    nId = aNmTb.Put( "Last", VARNAME );
-    pClassTimeField->SetVariable( nId, pClassTime, NULL, 0, TIMEFIELD_LAST );
-
-    return pClassTimeField;
-}
-
 RscTop * RscTypCont::InitClassDockingWindow( RscTop * pSuper,
                                              RscEnum * pMapUnit )
 {
diff --git a/rsc/source/parser/rscinit.cxx b/rsc/source/parser/rscinit.cxx
index de4f0aa..2a6801c 100644
--- a/rsc/source/parser/rscinit.cxx
+++ b/rsc/source/parser/rscinit.cxx
@@ -94,7 +94,6 @@ void RscTypCont::Init()
     RscTop   *  pClassNumericField;
     RscTop   *  pClassMetricField;
     RscTop   *  pClassDateField;
-    RscTop   *  pClassTimeField;
     RscTop   *  pClassDockingWindow;
     RscTop   *  pClassToolBoxItem;
     RscTop   *  pClassToolBox;
@@ -481,8 +480,6 @@ void RscTypCont::Init()
                                                  pTimeFieldFormat );
     aBaseLst.push_back( pClassTmp );
 
-    pClassTimeField = InitClassTimeField( pClassTmp, pClassTime );
-    pRoot->Insert( pClassTimeField );
     }
 }
 {
diff --git a/tools/source/rc/resmgr.cxx b/tools/source/rc/resmgr.cxx
index 652f420..592bf9b 100644
--- a/tools/source/rc/resmgr.cxx
+++ b/tools/source/rc/resmgr.cxx
@@ -1483,7 +1483,6 @@ OString ResMgr::GetAutoHelpId()
                     case RSC_NUMERICFIELD:      aHID.append( "NumericField" );     break;
                     case RSC_METRICFIELD:       aHID.append( "MetricField" );      break;
                     case RSC_DATEFIELD:         aHID.append( "DateField" );        break;
-                    case RSC_TIMEFIELD:         aHID.append( "TimeField" );        break;
                     case RSC_IMAGEBUTTON:       aHID.append( "ImageButton" );      break;
                     default:
                         // no type, no auto HID
diff --git a/vcl/source/control/field2.cxx b/vcl/source/control/field2.cxx
index 0a651c7..89b6884 100644
--- a/vcl/source/control/field2.cxx
+++ b/vcl/source/control/field2.cxx
@@ -2652,47 +2652,6 @@ TimeField::TimeField( vcl::Window* pParent, WinBits nWinStyle ) :
     Reformat();
 }
 
-TimeField::TimeField( vcl::Window* pParent, const ResId& rResId ) :
-    SpinField( WINDOW_TIMEFIELD ),
-    maFirst( GetMin() ),
-    maLast( GetMax() )
-{
-    rResId.SetRT( RSC_TIMEFIELD );
-    WinBits nStyle = ImplInitRes( rResId );
-    SpinField::ImplInit( pParent, nStyle );
-    SetField( this );
-    SetText( ImplGetLocaleDataWrapper().getTime( maFieldTime, false, false ) );
-    ImplLoadRes( rResId );
-
-    if ( !(nStyle & WB_HIDE ) )
-        Show();
-}
-
-void TimeField::ImplLoadRes( const ResId& rResId )
-{
-    SpinField::ImplLoadRes( rResId );
-    ResMgr* pMgr = rResId.GetResMgr();
-    if( pMgr )
-    {
-        TimeFormatter::ImplLoadRes( ResId( (RSHEADER_TYPE *)GetClassRes(), *pMgr ) );
-
-        sal_uLong      nMask = ReadLongRes();
-
-        if ( TIMEFIELD_FIRST & nMask )
-        {
-            maFirst = tools::Time( ResId( (RSHEADER_TYPE *)GetClassRes(), *pMgr ) );
-            IncrementRes( GetObjSizeRes( (RSHEADER_TYPE *)GetClassRes() ) );
-        }
-        if ( TIMEFIELD_LAST & nMask )
-        {
-            maLast = tools::Time( ResId( (RSHEADER_TYPE *)GetClassRes(), *pMgr ) );
-            IncrementRes( GetObjSizeRes( (RSHEADER_TYPE *)GetClassRes() ) );
-        }
-    }
-
-    Reformat();
-}
-
 TimeField::~TimeField()
 {
 }
commit c05984305b29606bd9cbc821a483206446d4c33e
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Dec 31 12:05:21 2014 +0000

    de-resource custom properties widgets
    
    Change-Id: Id0579d323016d760ec89185026a3c0803345695b

diff --git a/include/sfx2/dinfdlg.hxx b/include/sfx2/dinfdlg.hxx
index e345bb8..83c3b80 100644
--- a/include/sfx2/dinfdlg.hxx
+++ b/include/sfx2/dinfdlg.hxx
@@ -262,7 +262,6 @@ public:
 };
 
 // class CustomPropertiesRemoveButton ------------------------------------
-
 struct CustomPropertyLine;
 
 class CustomPropertiesEdit : public Edit
@@ -271,11 +270,13 @@ private:
     CustomPropertyLine*             m_pLine;
 
 public:
-    inline CustomPropertiesEdit(
-        vcl::Window* pParent, const ResId& rResId, CustomPropertyLine* pLine ) :
-            Edit( pParent, rResId ), m_pLine( pLine ) {}
+    CustomPropertiesEdit(vcl::Window* pParent, WinBits nStyle, CustomPropertyLine* pLine)
+        : Edit(pParent, nStyle)
+        , m_pLine(pLine)
+    {
+    }
 
-    inline CustomPropertyLine*      GetLine() const { return m_pLine; }
+    CustomPropertyLine*      GetLine() const { return m_pLine; }
 };
 
 class CustomPropertiesTypeBox : public ListBox
@@ -294,17 +295,20 @@ public:
 class CustomPropertiesDateField : public DateField
 {
 private:
-    CustomPropertyLine*             m_pLine;
+    CustomPropertyLine* m_pLine;
 
 public:
     ::boost::optional<sal_Int16> m_TZ;
 
-    inline CustomPropertiesDateField(
-        vcl::Window* pParent, const ResId& rResId, CustomPropertyLine* pLine ) :
-            DateField( pParent, rResId ), m_pLine( pLine ) {}
+    CustomPropertiesDateField(vcl::Window* pParent, WinBits nStyle, CustomPropertyLine* pLine)
+        : DateField(pParent, nStyle)
+        , m_pLine(pLine)
+    {
+    }
 
-    inline CustomPropertyLine*      GetLine() const { return m_pLine; }
+    CustomPropertyLine*      GetLine() const { return m_pLine; }
 };
+
 class CustomPropertiesTimeField : public TimeField
 {
 private:
@@ -313,12 +317,16 @@ private:
 public:
     bool m_isUTC;
 
-    inline CustomPropertiesTimeField(
-        vcl::Window* pParent, const ResId& rResId, CustomPropertyLine* pLine ) :
-            TimeField( pParent, rResId ), m_pLine( pLine ), m_isUTC(false) {}
+    CustomPropertiesTimeField(vcl::Window* pParent, WinBits nStyle, CustomPropertyLine* pLine)
+        : TimeField(pParent, nStyle)
+        , m_pLine(pLine)
+        , m_isUTC(false)
+    {
+    }
 
-    inline CustomPropertyLine*      GetLine() const { return m_pLine; }
+    CustomPropertyLine*      GetLine() const { return m_pLine; }
 };
+
 class CustomPropertiesDurationField : public Edit
 {
     CustomPropertyLine*             m_pLine;
@@ -326,7 +334,7 @@ class CustomPropertiesDurationField : public Edit
 protected:
     virtual void    RequestHelp(const HelpEvent& rEvt) SAL_OVERRIDE;
 public:
-    CustomPropertiesDurationField( vcl::Window* pParent, const ResId& rResId, CustomPropertyLine* pLine );
+    CustomPropertiesDurationField(vcl::Window* pParent, WinBits nStyle, CustomPropertyLine* pLine);
     virtual ~CustomPropertiesDurationField();
 
     void SetDuration( const com::sun::star::util::Duration& rDuration );
@@ -350,11 +358,13 @@ private:
     CustomPropertyLine*             m_pLine;
 
 public:
-    inline CustomPropertiesRemoveButton(
-        vcl::Window* pParent, const ResId& rResId, CustomPropertyLine* pLine ) :
-            ImageButton( pParent, rResId ), m_pLine( pLine ) {}
+    CustomPropertiesRemoveButton(vcl::Window* pParent, WinBits nStyle, CustomPropertyLine* pLine)
+        : ImageButton(pParent, nStyle)
+        , m_pLine(pLine)
+    {
+    }
 
-    inline CustomPropertyLine*      GetLine() const { return m_pLine; }
+    CustomPropertyLine*      GetLine() const { return m_pLine; }
 };
 
 class CustomPropertiesYesNoButton : public Control
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index ff0b5b5..470816d 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -1294,8 +1294,10 @@ util::Duration  DurationDialog_Impl::GetDuration() const
     return aRet;
 }
 
-CustomPropertiesDurationField::CustomPropertiesDurationField( vcl::Window* pParent, const ResId& rResId, CustomPropertyLine* pLine ) :
-        Edit( pParent, rResId ), m_pLine( pLine )
+CustomPropertiesDurationField::CustomPropertiesDurationField(vcl::Window* pParent, WinBits nStyle,
+                                                             CustomPropertyLine* pLine)
+    : Edit(pParent, nStyle)
+    , m_pLine(pLine)
 
 {
     SetDuration( util::Duration(false, 0, 0, 0, 0, 0, 0, 0) );
@@ -1369,14 +1371,14 @@ void CustomPropertiesYesNoButton::Resize()
 CustomPropertyLine::CustomPropertyLine( vcl::Window* pParent ) :
     m_aNameBox      ( pParent, SfxResId( SFX_CB_PROPERTY_NAME ) ),
     m_aTypeBox      ( pParent, SfxResId( SFX_LB_PROPERTY_TYPE ), this ),
-    m_aValueEdit    ( pParent, SfxResId( SFX_ED_PROPERTY_VALUE ), this ),
-    m_aDateField    ( pParent, SfxResId( SFX_FLD_DATE), this),
-    m_aTimeField    ( pParent, SfxResId( SFX_FLD_TIME), this),
+    m_aValueEdit    ( pParent, WB_BORDER|WB_TABSTOP|WB_LEFT, this ),
+    m_aDateField    ( pParent, WB_BORDER|WB_TABSTOP|WB_SPIN|WB_LEFT, this ),
+    m_aTimeField    ( pParent, WB_BORDER|WB_TABSTOP|WB_SPIN|WB_LEFT, this ),
     m_sDurationFormat( SfxResId( SFX_ST_DURATION_FORMAT ).toString() ),
-    m_aDurationField( pParent, SfxResId( SFX_FLD_DURATION), this),
+    m_aDurationField( pParent, WB_BORDER|WB_TABSTOP|WB_READONLY, this ),
     m_aEditButton(    pParent, SfxResId( SFX_PB_EDIT ), this),
     m_aYesNoButton  ( pParent, SfxResId( SFX_WIN_PROPERTY_YESNO ) ),
-    m_aRemoveButton ( pParent, SfxResId( SFX_PB_PROPERTY_REMOVE ), this ),
+    m_aRemoveButton ( pParent, 0, this ),
     m_bIsDate       ( false ),
     m_bIsRemoved    ( false ),
     m_bTypeLostFocus( false )
@@ -1386,6 +1388,7 @@ CustomPropertyLine::CustomPropertyLine( vcl::Window* pParent ) :
     m_aDateField.SetExtDateFormat( XTDATEF_SYSTEM_SHORT_YYYY );
 
     m_aRemoveButton.SetModeImage(Image(SfxResId(SFX_IMG_PROPERTY_REMOVE)));
+    m_aRemoveButton.SetQuickHelpText(SfxResId(STR_SFX_REMOVE_PROPERTY).toString());
 }
 
 void CustomPropertyLine::SetRemoved()
@@ -1413,19 +1416,23 @@ CustomPropertiesWindow::CustomPropertiesWindow(vcl::Window* pParent,
     m_pHeaderAccValue(pHeaderAccValue),
     m_aNameBox      ( this, SfxResId( SFX_CB_PROPERTY_NAME ) ),
     m_aTypeBox      ( this, SfxResId( SFX_LB_PROPERTY_TYPE ) ),
-    m_aValueEdit    ( this, SfxResId( SFX_ED_PROPERTY_VALUE ) ),
-    m_aDateField    ( this, SfxResId( SFX_FLD_DATE) ),
-    m_aTimeField    ( this, SfxResId( SFX_FLD_TIME) ),
-    m_aDurationField( this, SfxResId( SFX_FLD_DURATION) ),
+    m_aValueEdit    ( this, WB_BORDER|WB_TABSTOP|WB_LEFT ),
+    m_aDateField    ( this, WB_BORDER|WB_TABSTOP|WB_SPIN|WB_LEFT ),
+    m_aTimeField    ( this, WB_BORDER|WB_TABSTOP|WB_SPIN|WB_LEFT ),
+    m_aDurationField( this, WB_BORDER|WB_TABSTOP|WB_READONLY ),
     m_aEditButton(    this, SfxResId( SFX_PB_EDIT )),
     m_aYesNoButton  ( this, SfxResId( SFX_WIN_PROPERTY_YESNO ) ),
-    m_aRemoveButton ( this, SfxResId( SFX_PB_PROPERTY_REMOVE ) ),
+    m_aRemoveButton ( this, 0 ),
     m_nScrollPos (0),
     m_pCurrentLine (NULL),
     m_aNumberFormatter( ::comphelper::getProcessComponentContext(),
                         Application::GetSettings().GetLanguageTag().getLanguageType() )
 
 {
+    m_aRemoveButton.SetSizePixel(LogicToPixel(Size(RSC_CD_PUSHBUTTON_HEIGHT, RSC_CD_PUSHBUTTON_HEIGHT), MAP_APPFONT));
+
+    m_aValueEdit.SetSizePixel(LogicToPixel(Size(61, RSC_CD_TEXTBOX_HEIGHT), MAP_APPFONT));
+
     m_aEditLoseFocusIdle.SetPriority( VCL_IDLE_PRIORITY_LOWEST );
     m_aEditLoseFocusIdle.SetIdleHdl( LINK( this, CustomPropertiesWindow, EditTimeoutHdl ) );
     m_aBoxLoseFocusIdle.SetPriority( VCL_IDLE_PRIORITY_LOWEST );
diff --git a/sfx2/source/dialog/dinfdlg.src b/sfx2/source/dialog/dinfdlg.src
index ac379b1..f923d1f 100644
--- a/sfx2/source/dialog/dinfdlg.src
+++ b/sfx2/source/dialog/dinfdlg.src
@@ -90,41 +90,6 @@ ListBox SFX_LB_PROPERTY_TYPE
     };
 };
 
-Edit SFX_ED_PROPERTY_VALUE
-{
-    Border = TRUE ;
-    Pos = MAP_APPFONT ( 127 , 2 ) ;
-    Size = MAP_APPFONT ( 61 , RSC_CD_TEXTBOX_HEIGHT ) ;
-    TabStop = TRUE ;
-    Left = TRUE ;
-};
-DateField SFX_FLD_DATE
-{
-    Border = TRUE ;
-    Pos = MAP_APPFONT ( 127 , 2 ) ;
-    Size = MAP_APPFONT ( 29 , RSC_CD_TEXTBOX_HEIGHT ) ;
-    TabStop = TRUE ;
-    Left = TRUE ;
-    Spin = TRUE;
-};
-TimeField SFX_FLD_TIME
-{
-    Border = TRUE ;
-    Pos = MAP_APPFONT ( 159 , 2 ) ;
-    Size = MAP_APPFONT ( 29 , RSC_CD_TEXTBOX_HEIGHT ) ;
-    TabStop = TRUE ;
-    Left = TRUE ;
-    Spin = TRUE;
-};
-
-Edit SFX_FLD_DURATION
-{
-    Readonly = TRUE;
-    Border = TRUE ;
-    Pos = MAP_APPFONT ( 159 , 2 ) ;
-    Size = MAP_APPFONT ( 61 - RSC_CD_TEXTBOX_HEIGHT - 2, RSC_CD_TEXTBOX_HEIGHT ) ;
-    TabStop = TRUE ;
-};
 PushButton SFX_PB_EDIT
 {
     Pos = MAP_APPFONT ( 159 , 2 ) ;
@@ -160,12 +125,11 @@ Control SFX_WIN_PROPERTY_YESNO
     };
 };
 
-ImageButton SFX_PB_PROPERTY_REMOVE
+String STR_SFX_REMOVE_PROPERTY
 {
-    Pos = MAP_APPFONT( 190 , 1 );
-    Size = MAP_APPFONT( RSC_CD_PUSHBUTTON_HEIGHT, RSC_CD_PUSHBUTTON_HEIGHT );
-    QuickHelpText [ en-US ] = "Remove Property" ;
+    Text [ en-US ] = "Remove Property" ;
 };
+
 Image SFX_IMG_PROPERTY_REMOVE
 {
     ImageBitmap = Bitmap { File = "deleterow.bmp" ; };
diff --git a/sfx2/source/inc/sfxlocal.hrc b/sfx2/source/inc/sfxlocal.hrc
index 4a57060..4b6d132 100644
--- a/sfx2/source/inc/sfxlocal.hrc
+++ b/sfx2/source/inc/sfxlocal.hrc
@@ -25,8 +25,8 @@
 #include <sfx2/sfx.hrc>
 
 // Strings ---------------------------------------------------------------
-
 #define STR_SFX_NEWOFFICEDOC                (RID_SFX_SFXLOCAL_START +  0)
+#define STR_SFX_REMOVE_PROPERTY             (RID_SFX_SFXLOCAL_START +  1)
 #define STR_SFX_FILEDLG_ACTUALVERSION       (RID_SFX_SFXLOCAL_START +  2)
 #define STR_SFX_EXPLORERFILE_INSERT         (RID_SFX_SFXLOCAL_START +  3)
 #define STR_SFX_EXPLORERFILE_BUTTONINSERT   (RID_SFX_SFXLOCAL_START +  4)
@@ -39,15 +39,9 @@
 #define STR_SFX_QUERY_WRONG_TYPE            (RID_SFX_SFXLOCAL_START + 11)
 
 // Controls --------------------------------------------------------------
-
 #define SFX_CB_PROPERTY_NAME                (RID_SFX_SFXLOCAL_START +  0)
-#define SFX_ED_PROPERTY_VALUE               (RID_SFX_SFXLOCAL_START +  1)
 #define SFX_LB_PROPERTY_TYPE                (RID_SFX_SFXLOCAL_START +  4)
-#define SFX_PB_PROPERTY_REMOVE              (RID_SFX_SFXLOCAL_START +  5)
 #define SFX_WIN_PROPERTY_YESNO              (RID_SFX_SFXLOCAL_START +  6)
-#define SFX_FLD_DATE                        (RID_SFX_SFXLOCAL_START +  10)
-#define SFX_FLD_TIME                        (RID_SFX_SFXLOCAL_START +  11)
-#define SFX_FLD_DURATION                    (RID_SFX_SFXLOCAL_START +  12)
 #define SFX_ST_DURATION_FORMAT              (RID_SFX_SFXLOCAL_START +  13)
 
 #define SFX_CMIS_PROPERTY_NAME              (RID_SFX_SFXLOCAL_START +  14)


More information about the Libreoffice-commits mailing list