summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--extensions/source/propctrlr/standardcontrol.cxx2
-rw-r--r--include/rsc/rsc-vcl-shared-types.hxx2
-rw-r--r--rsc/inc/rscdb.hxx5
-rw-r--r--rsc/source/parser/rscibas.cxx6
-rw-r--r--sd/source/filter/html/pubdlg.cxx2
-rw-r--r--sd/source/ui/dlg/animobjs.cxx2
-rw-r--r--sd/source/ui/dlg/dlgass.cxx4
-rw-r--r--sd/source/ui/dlg/present.cxx2
-rw-r--r--vcl/source/control/field2.cxx38
9 files changed, 33 insertions, 30 deletions
diff --git a/extensions/source/propctrlr/standardcontrol.cxx b/extensions/source/propctrlr/standardcontrol.cxx
index 126f24bf011e..60d64a91e43a 100644
--- a/extensions/source/propctrlr/standardcontrol.cxx
+++ b/extensions/source/propctrlr/standardcontrol.cxx
@@ -72,7 +72,7 @@ namespace pcr
:OTimeControl_Base( PropertyControlType::TimeField, pParent, nWinStyle )
{
getTypedControlWindow()->SetStrictFormat( true );
- getTypedControlWindow()->SetFormat( TIMEF_SEC );
+ getTypedControlWindow()->SetFormat( TimeFieldFormat::F_SEC );
getTypedControlWindow()->EnableEmptyFieldValue( true );
}
diff --git a/include/rsc/rsc-vcl-shared-types.hxx b/include/rsc/rsc-vcl-shared-types.hxx
index 203fa7318696..b93864f2d737 100644
--- a/include/rsc/rsc-vcl-shared-types.hxx
+++ b/include/rsc/rsc-vcl-shared-types.hxx
@@ -23,7 +23,7 @@
#include <sal/types.h>
#include <o3tl/typed_flags_set.hxx>
-enum TimeFieldFormat {TIMEF_NONE, TIMEF_SEC, TIMEF_100TH_SEC, TIMEF_SEC_CS, TimeFieldFormat_FORCE_EQUAL_SIZE=SAL_MAX_ENUM };
+enum class TimeFieldFormat : sal_Int32 { F_NONE, F_SEC, F_100TH_SEC, F_SEC_CS };
enum class KeyFuncType : sal_Int32 { DONTKNOW, NEW, OPEN, SAVE,
SAVEAS, PRINT, CLOSE, QUIT,
diff --git a/rsc/inc/rscdb.hxx b/rsc/inc/rscdb.hxx
index 6dad375a9cad..1212fad8e533 100644
--- a/rsc/inc/rscdb.hxx
+++ b/rsc/inc/rscdb.hxx
@@ -39,6 +39,7 @@ class RscCmdLine;
enum class SymbolType : sal_uInt16;
enum class ToolBoxItemBits;
enum class WindowBorderStyle : sal_uInt16;
+enum class TimeFieldFormat : sal_Int32;
enum class KeyFuncType : sal_Int32;
struct WriteRcContext
@@ -142,11 +143,13 @@ class RscTypCont
void Init(); // Initialisiert Klassen und Tabelle
void SETCONST( RscConst *, const char *, sal_uInt32 );
+ void SETCONST( RscConst *, Atom, sal_uInt32 );
inline void SETCONST( RscConst *p1, const char * p2, SymbolType p3 ) { SETCONST(p1, p2, static_cast<sal_uInt32>(p3)); }
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)); }
- void SETCONST( RscConst *, Atom, sal_uInt32 );
+ 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)); }
RscEnum * InitLangType();
RscEnum * InitFieldUnitsType();
RscEnum * InitTimeFieldFormat();
diff --git a/rsc/source/parser/rscibas.cxx b/rsc/source/parser/rscibas.cxx
index a7c5c2dfb068..da5d688cb7f2 100644
--- a/rsc/source/parser/rscibas.cxx
+++ b/rsc/source/parser/rscibas.cxx
@@ -209,9 +209,9 @@ RscEnum * RscTypCont::InitTimeFieldFormat()
pTimeFieldFormat = new RscEnum( pHS->getID( "EnumTimeFieldFormat" ),
RSC_NOTYPE );
- SETCONST( pTimeFieldFormat, "TIMEF_NONE", TIMEF_NONE );
- SETCONST( pTimeFieldFormat, "TIMEF_SEC", TIMEF_SEC );
- SETCONST( pTimeFieldFormat, "TIMEF_100TH_SEC", TIMEF_100TH_SEC );
+ 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;
}
diff --git a/sd/source/filter/html/pubdlg.cxx b/sd/source/filter/html/pubdlg.cxx
index 5ddeb2ffe412..9070b7586817 100644
--- a/sd/source/filter/html/pubdlg.cxx
+++ b/sd/source/filter/html/pubdlg.cxx
@@ -446,7 +446,7 @@ SdPublishingDlg::SdPublishingDlg(vcl::Window* pWindow, DocumentType eDocType)
pPage2_ChgDefault->SetClickHdl(LINK(this,SdPublishingDlg, SlideChgHdl));
pPage2_ChgAuto->SetClickHdl(LINK(this,SdPublishingDlg, SlideChgHdl));
- pPage2_Duration->SetFormat( TIMEF_SEC );
+ pPage2_Duration->SetFormat( TimeFieldFormat::F_SEC );
pPage5_Buttons->SetSelectHdl(LINK(this,SdPublishingDlg, ButtonsHdl ));
pPage5_Buttons->SetStyle( pPage5_Buttons->GetStyle() | WB_VSCROLL );
diff --git a/sd/source/ui/dlg/animobjs.cxx b/sd/source/ui/dlg/animobjs.cxx
index 407bdda8a84e..df22072aef92 100644
--- a/sd/source/ui/dlg/animobjs.cxx
+++ b/sd/source/ui/dlg/animobjs.cxx
@@ -170,7 +170,7 @@ AnimationWindow::AnimationWindow( SfxBindings* pInBindings,
pControllerItem = new AnimationControllerItem( SID_ANIMATOR_STATE, this, pBindings );
// as long as not in the resource
- aTimeField.SetFormat( TIMEF_SEC_CS );
+ aTimeField.SetFormat( TimeFieldFormat::F_SEC_CS );
aBtnFirst.SetClickHdl( LINK( this, AnimationWindow, ClickFirstHdl ) );
aBtnReverse.SetClickHdl( LINK( this, AnimationWindow, ClickPlayHdl ) );
diff --git a/sd/source/ui/dlg/dlgass.cxx b/sd/source/ui/dlg/dlgass.cxx
index 08eb6f324d3c..9338dc40d6b4 100644
--- a/sd/source/ui/dlg/dlgass.cxx
+++ b/sd/source/ui/dlg/dlgass.cxx
@@ -520,9 +520,9 @@ AssistentDlgImpl::AssistentDlgImpl( vcl::Window* pWindow, const Link& rFinishLin
mpPage3PresTypeLiveRB->Check();
mpPage3PresTypeLiveRB->SetClickHdl( LINK(this,AssistentDlgImpl, PresTypeHdl ));
mpPage3PresTypeKioskRB->SetClickHdl( LINK(this,AssistentDlgImpl, PresTypeHdl ));
- mpPage3PresTimeTMF->SetFormat( TIMEF_SEC );
+ mpPage3PresTimeTMF->SetFormat( TimeFieldFormat::F_SEC );
mpPage3PresTimeTMF->SetTime( ::tools::Time( 0, 0, 10 ) );
- mpPage3BreakTMF->SetFormat( TIMEF_SEC );
+ mpPage3BreakTMF->SetFormat( TimeFieldFormat::F_SEC );
mpPage3BreakTMF->SetTime( ::tools::Time( 0, 0, 10 ) );
mpPage3LogoCB->Check();
diff --git a/sd/source/ui/dlg/present.cxx b/sd/source/ui/dlg/present.cxx
index 21e1fedf2689..c8196434f594 100644
--- a/sd/source/ui/dlg/present.cxx
+++ b/sd/source/ui/dlg/present.cxx
@@ -84,7 +84,7 @@ SdStartPresentationDlg::SdStartPresentationDlg( vcl::Window* pWindow,
aRbtAuto->SetClickHdl( aLink );
aTmfPause->SetModifyHdl( LINK( this, SdStartPresentationDlg, ChangePauseHdl ) );
- aTmfPause->SetFormat( TIMEF_SEC );
+ aTmfPause->SetFormat( TimeFieldFormat::F_SEC );
// fill Listbox with page names
for (std::vector<OUString>::const_iterator pIter = rPageNames.begin(); pIter != rPageNames.end(); ++pIter)
diff --git a/vcl/source/control/field2.cxx b/vcl/source/control/field2.cxx
index fbc74e3bfb39..326b94673b5f 100644
--- a/vcl/source/control/field2.cxx
+++ b/vcl/source/control/field2.cxx
@@ -2011,8 +2011,8 @@ static bool ImplTimeProcessKeyInput( Edit*, const KeyEvent& rKEvt,
(rLocaleDataWrapper.getTimePM().indexOf(cChar) != -1) ||
// Accept AM/PM:
(cChar == 'a') || (cChar == 'A') || (cChar == 'm') || (cChar == 'M') || (cChar == 'p') || (cChar == 'P') ||
- ((eFormat == TIMEF_100TH_SEC) && string::equals(rLocaleDataWrapper.getTime100SecSep(), cChar)) ||
- ((eFormat == TIMEF_SEC_CS) && string::equals(rLocaleDataWrapper.getTime100SecSep(), cChar)) ||
+ ((eFormat == TimeFieldFormat::F_100TH_SEC) && string::equals(rLocaleDataWrapper.getTime100SecSep(), cChar)) ||
+ ((eFormat == TimeFieldFormat::F_SEC_CS) && string::equals(rLocaleDataWrapper.getTime100SecSep(), cChar)) ||
(bDuration && (cChar == '-')) )
return false;
else
@@ -2091,7 +2091,7 @@ static bool ImplTimeGetValue( const OUString& rStr, tools::Time& rTime,
sal_Int32 nSepPos = aStr.indexOf( rLocaleDataWrapper.getTimeSep() );
if ( aStr[0] == '-' )
bNegative = true;
- if ( eFormat != TIMEF_SEC_CS )
+ if ( eFormat != TimeFieldFormat::F_SEC_CS )
{
if ( nSepPos < 0 )
nSepPos = aStr.getLength();
@@ -2197,9 +2197,9 @@ static bool ImplTimeGetValue( const OUString& rStr, tools::Time& rTime,
if ( (nMinute > 59) || (nSecond > 59) || (nNanoSec > 1000000000) )
return false;
- if ( eFormat == TIMEF_NONE )
+ if ( eFormat == TimeFieldFormat::F_NONE )
nSecond = nNanoSec = 0;
- else if ( eFormat == TIMEF_SEC )
+ else if ( eFormat == TimeFieldFormat::F_SEC )
nNanoSec = 0;
if ( !bDuration )
@@ -2275,12 +2275,12 @@ bool TimeFormatter::ImplTimeReformat( const OUString& rStr, OUString& rOutStr )
bool bSecond = false;
bool b100Sec = false;
- if ( meFormat != TIMEF_NONE )
+ if ( meFormat != TimeFieldFormat::F_NONE )
bSecond = true;
- if ( meFormat == TIMEF_100TH_SEC )
+ if ( meFormat == TimeFieldFormat::F_100TH_SEC )
b100Sec = true;
- if ( meFormat == TIMEF_SEC_CS )
+ if ( meFormat == TimeFieldFormat::F_SEC_CS )
{
sal_uLong n = aTempTime.GetHour() * 3600L;
n += aTempTime.GetMin() * 60L;
@@ -2331,7 +2331,7 @@ void TimeField::ImplTimeSpinArea( bool bUp )
Selection aSelection( GetField()->GetSelection() );
// Area search
- if ( GetFormat() != TIMEF_SEC_CS )
+ if ( GetFormat() != TimeFieldFormat::F_SEC_CS )
{
//Which area is the cursor in of HH:MM:SS.TT
for ( sal_Int32 i = 1, nPos = 0; i <= 4; i++ )
@@ -2396,7 +2396,7 @@ void TimeField::ImplTimeSpinArea( bool bUp )
void TimeFormatter::ImplInit()
{
- meFormat = TIMEF_NONE;
+ meFormat = TimeFieldFormat::F_NONE;
mbDuration = false;
mnTimeFormat = HOUR_24; // Should become a ExtTimeFieldFormat in next implementation, merge with mbDuration and meFormat
}
@@ -2545,11 +2545,11 @@ void TimeFormatter::ImplSetUserTime( const tools::Time& rNewTime, Selection* pNe
OUString aStr;
bool bSec = false;
bool b100Sec = false;
- if ( meFormat != TIMEF_NONE )
+ if ( meFormat != TimeFieldFormat::F_NONE )
bSec = true;
- if ( meFormat == TIMEF_100TH_SEC || meFormat == TIMEF_SEC_CS )
+ if ( meFormat == TimeFieldFormat::F_100TH_SEC || meFormat == TimeFieldFormat::F_SEC_CS )
b100Sec = true;
- if ( meFormat == TIMEF_SEC_CS )
+ if ( meFormat == TimeFieldFormat::F_SEC_CS )
{
sal_uLong n = aNewTime.GetHour() * 3600L;
n += aNewTime.GetMin() * 60L;
@@ -2782,40 +2782,40 @@ void TimeField::SetExtFormat( ExtTimeFieldFormat eFormat )
{
SetTimeFormat( HOUR_24 );
SetDuration( false );
- SetFormat( TIMEF_NONE );
+ SetFormat( TimeFieldFormat::F_NONE );
}
break;
case EXTTIMEF_24H_LONG:
{
SetTimeFormat( HOUR_24 );
SetDuration( false );
- SetFormat( TIMEF_SEC );
+ SetFormat( TimeFieldFormat::F_SEC );
}
break;
case EXTTIMEF_12H_SHORT:
{
SetTimeFormat( HOUR_12 );
SetDuration( false );
- SetFormat( TIMEF_NONE );
+ SetFormat( TimeFieldFormat::F_NONE );
}
break;
case EXTTIMEF_12H_LONG:
{
SetTimeFormat( HOUR_12 );
SetDuration( false );
- SetFormat( TIMEF_SEC );
+ SetFormat( TimeFieldFormat::F_SEC );
}
break;
case EXTTIMEF_DURATION_SHORT:
{
SetDuration( true );
- SetFormat( TIMEF_NONE );
+ SetFormat( TimeFieldFormat::F_NONE );
}
break;
case EXTTIMEF_DURATION_LONG:
{
SetDuration( true );
- SetFormat( TIMEF_SEC );
+ SetFormat( TimeFieldFormat::F_SEC );
}
break;
default: OSL_FAIL( "ExtTimeFieldFormat unknown!" );