[Libreoffice-commits] core.git: 2 commits - accessibility/source basic/source compilerplugins/clang dbaccess/source editeng/source filter/source include/editeng include/oox include/svtools include/tools oox/source sc/source sd/source svtools/source

Noel Grandin noel.grandin at collabora.co.uk
Thu Mar 30 06:26:35 UTC 2017


 accessibility/source/extended/AccessibleGridControl.cxx     |    9 ++++++---
 basic/source/classes/sbunoobj.cxx                           |    1 -
 compilerplugins/clang/unusedenumconstants.py                |    1 +
 dbaccess/source/ui/app/AppControllerDnD.cxx                 |    2 --
 editeng/source/accessibility/AccessibleEditableTextPara.cxx |    4 ++--
 editeng/source/items/flditem.cxx                            |    8 ++++----
 editeng/source/uno/unofield.cxx                             |    4 ++--
 filter/source/msfilter/svdfppt.cxx                          |    4 ++--
 include/editeng/flditem.hxx                                 |    2 +-
 include/oox/core/binarycodec.hxx                            |    3 +--
 include/svtools/accessibletable.hxx                         |   11 -----------
 include/svtools/fileview.hxx                                |    1 -
 include/tools/errinf.hxx                                    |    1 -
 oox/source/core/binarycodec.cxx                             |    3 +--
 sc/source/core/data/attrib.cxx                              |    2 +-
 sc/source/core/data/stlpool.cxx                             |    2 +-
 sc/source/filter/oox/biffcodec.cxx                          |    2 +-
 sc/source/ui/pagedlg/scuitphfedit.cxx                       |    8 ++++----
 sc/source/ui/unoobj/fielduno.cxx                            |    4 ++--
 sd/source/ui/app/sdpopup.cxx                                |    8 ++++----
 sd/source/ui/dlg/dlgfield.cxx                               |    6 +++---
 sd/source/ui/view/drviews2.cxx                              |    2 +-
 sd/source/ui/view/outlnvs2.cxx                              |    2 +-
 svtools/source/contnr/fileview.cxx                          |    2 +-
 svtools/source/misc/ehdl.cxx                                |    4 ----
 25 files changed, 39 insertions(+), 57 deletions(-)

New commits:
commit 90305526ee48c855f9a2b3b4d730ea0bfb079119
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Wed Mar 29 14:11:30 2017 +0200

    loplugin:unusedenumconstants
    
    Change-Id: I628a0114e56ec25926bd08d159c61cfecb719a1c
    Reviewed-on: https://gerrit.libreoffice.org/35854
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/accessibility/source/extended/AccessibleGridControl.cxx b/accessibility/source/extended/AccessibleGridControl.cxx
index df348e911417..07d108592ff6 100644
--- a/accessibility/source/extended/AccessibleGridControl.cxx
+++ b/accessibility/source/extended/AccessibleGridControl.cxx
@@ -266,13 +266,16 @@ AccessibleGridControl::implGetFixedChild( sal_Int32 nChildIndex )
     css::uno::Reference< css::accessibility::XAccessible > xRet;
     switch( nChildIndex )
     {
-          case TCINDEX_COLUMNHEADERBAR:
+        /** Child index of the column header bar (first row). */
+        case 0:
             xRet = implGetHeaderBar( TCTYPE_COLUMNHEADERBAR );
         break;
-        case TCINDEX_ROWHEADERBAR:
+        /** Child index of the row header bar ("handle column"). */
+        case 1:
             xRet = implGetHeaderBar( TCTYPE_ROWHEADERBAR );
         break;
-        case TCINDEX_TABLE:
+        /** Child index of the data table. */
+        case 2:
             xRet = implGetTable();
         break;
     }
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx
index 971d7b475d0d..ee16722056b0 100644
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -1503,7 +1503,6 @@ void processAutomationParams( SbxArray* pParams, Sequence< Any >& args, bool bOL
 enum class INVOKETYPE
 {
    GetProp = 0,
-   SetProp,
    Func
 };
 Any invokeAutomationMethod( const OUString& Name, Sequence< Any >& args, SbxArray* pParams, sal_uInt32 nParamCount, Reference< XInvocation >& rxInvocation, INVOKETYPE invokeType )
diff --git a/compilerplugins/clang/unusedenumconstants.py b/compilerplugins/clang/unusedenumconstants.py
index 7835287b82ca..5c360e230e72 100755
--- a/compilerplugins/clang/unusedenumconstants.py
+++ b/compilerplugins/clang/unusedenumconstants.py
@@ -118,6 +118,7 @@ def is_ignore(srcLoc):
          "basic/source/inc/opcodes.hxx", #  SbiOpcode
          "sc/source/filter/inc/flttypes.hxx", # BiffTyp
          "sc/inc/optutil.hxx", # ScOptionsUtil::KeyBindingType
+         "include/sfx2/chalign.hxx", # SfxChildAlignment
         # unit test code
          "cppu/source/uno/check.cxx",
         # general weird nonsense going on
diff --git a/dbaccess/source/ui/app/AppControllerDnD.cxx b/dbaccess/source/ui/app/AppControllerDnD.cxx
index 813ac916746f..7467d59623ae 100644
--- a/dbaccess/source/ui/app/AppControllerDnD.cxx
+++ b/dbaccess/source/ui/app/AppControllerDnD.cxx
@@ -220,8 +220,6 @@ void OApplicationController::deleteObjects( ElementType _eType, const std::vecto
                     aDlg->EnableAllButton();
 
                 eResult = aDlg->Execute();
-                if (eResult == svtools::QUERYDELETE_CANCEL)
-                    return;
 
                 sDialogPosition = aDlg->GetWindowState( );
             }
diff --git a/include/oox/core/binarycodec.hxx b/include/oox/core/binarycodec.hxx
index 003455d8405c..911d6d925df3 100644
--- a/include/oox/core/binarycodec.hxx
+++ b/include/oox/core/binarycodec.hxx
@@ -54,8 +54,7 @@ public:
     /** Enumerates codec types supported by this XOR codec implementation. */
     enum CodecType
     {
-        CODEC_WORD,     ///< MS Word XOR codec.
-        CODEC_EXCEL     ///< MS Excel XOR codec.
+        Excel     ///< MS Excel XOR codec.
     };
 
 public:
diff --git a/include/svtools/accessibletable.hxx b/include/svtools/accessibletable.hxx
index 8dd059f9bd88..fd17a67736c8 100644
--- a/include/svtools/accessibletable.hxx
+++ b/include/svtools/accessibletable.hxx
@@ -30,17 +30,6 @@ namespace svt{ namespace table
 
 typedef sal_Int32   RowPos;
 
-
-enum AccessibleTableType
-{
-    /** Child index of the column header bar (first row). */
-    TCINDEX_COLUMNHEADERBAR = 0,
-    /** Child index of the row header bar ("handle column"). */
-    TCINDEX_ROWHEADERBAR    = 1,
-    /** Child index of the data table. */
-    TCINDEX_TABLE           = 2
-};
-
 enum AccessibleTableControlObjType
 {
     TCTYPE_GRIDCONTROL,           /// The GridControl itself.
diff --git a/include/svtools/fileview.hxx b/include/svtools/fileview.hxx
index 89b392ac648c..3cd1e836fab6 100644
--- a/include/svtools/fileview.hxx
+++ b/include/svtools/fileview.hxx
@@ -206,7 +206,6 @@ namespace svtools {
 
 enum QueryDeleteResult_Impl
 {
-    QUERYDELETE_CANCEL = RET_CANCEL,
     QUERYDELETE_YES = RET_YES,
     QUERYDELETE_ALL = -1
 };
diff --git a/include/tools/errinf.hxx b/include/tools/errinf.hxx
index 319dfc08ca80..0cd64efa33f2 100644
--- a/include/tools/errinf.hxx
+++ b/include/tools/errinf.hxx
@@ -55,7 +55,6 @@ enum class ErrorHandlerFlags
     MessageError            = 0x1000,
     MessageWarning          = 0x2000,
     MessageInfo             = 0x3000,
-    MessageQuery            = 0x4000,
 
     MAX                     = USHRT_MAX,
 };
diff --git a/oox/source/core/binarycodec.cxx b/oox/source/core/binarycodec.cxx
index 10c3a2c8941a..545be4e452c4 100644
--- a/oox/source/core/binarycodec.cxx
+++ b/oox/source/core/binarycodec.cxx
@@ -151,8 +151,7 @@ void BinaryCodec_XOR::initKey( const sal_uInt8 pnPassData[ 16 ] )
     size_t nRotateSize = 0;
     switch( meCodecType )
     {
-        case CODEC_WORD:    nRotateSize = 7;    break;
-        case CODEC_EXCEL:   nRotateSize = 2;    break;
+        case CodecType::Excel:   nRotateSize = 2;    break;
         // compiler will warn, if new codec type is introduced and not handled here
     }
 
diff --git a/sc/source/filter/oox/biffcodec.cxx b/sc/source/filter/oox/biffcodec.cxx
index 2f490f2ea2d5..19a8399cd04f 100644
--- a/sc/source/filter/oox/biffcodec.cxx
+++ b/sc/source/filter/oox/biffcodec.cxx
@@ -54,7 +54,7 @@ BiffDecoderBase::~BiffDecoderBase()
 
 BiffDecoder_XOR::BiffDecoder_XOR( const BiffDecoder_XOR& rDecoder ) :
     BiffDecoderBase(),  // must be called to prevent compiler warning
-    maCodec( ::oox::core::BinaryCodec_XOR::CODEC_EXCEL ),
+    maCodec( ::oox::core::BinaryCodec_XOR::CodecType::Excel ),
     maEncryptionData( rDecoder.maEncryptionData ),
     mnKey( rDecoder.mnKey ),
     mnHash( rDecoder.mnHash )
diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx
index bcbf2c775acf..dbca494e3578 100644
--- a/svtools/source/contnr/fileview.cxx
+++ b/svtools/source/contnr/fileview.cxx
@@ -733,7 +733,7 @@ void ViewTabListBox_Impl::DeleteEntries()
     OUString aURL;
 
     OString sDialogPosition;
-    while ( pEntry && ( eResult != svtools::QUERYDELETE_CANCEL ) )
+    while ( pEntry )
     {
         SvTreeListEntry *pCurEntry = pEntry;
         pEntry = NextSelected( pEntry );
diff --git a/svtools/source/misc/ehdl.cxx b/svtools/source/misc/ehdl.cxx
index 829ff50d4e3e..aa2a7faa48c0 100644
--- a/svtools/source/misc/ehdl.cxx
+++ b/svtools/source/misc/ehdl.cxx
@@ -106,10 +106,6 @@ static ErrorHandlerFlags aWndFunc(
             pBox.reset(VclPtr<InfoBox>::Create(pWin, aErr));
             break;
 
-        case ErrorHandlerFlags::MessageQuery:
-            pBox.reset(VclPtr<QueryBox>::Create(pWin, eBits, aErr));
-            break;
-
         default:
         {
             SAL_WARN( "svtools.misc", "no MessBox type");
commit a34b33d2b900d3d1ea1ac806bc584846dc9d3fbe
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Wed Mar 29 14:07:22 2017 +0200

    convert SvxDateType to scoped enum
    
    Change-Id: I5ce04f252642cb3a6c1b08ee22255f6c7b97f0f8
    Reviewed-on: https://gerrit.libreoffice.org/35842
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/editeng/source/accessibility/AccessibleEditableTextPara.cxx b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
index c1b6f30202ef..11a212b02f41 100644
--- a/editeng/source/accessibility/AccessibleEditableTextPara.cxx
+++ b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
@@ -865,9 +865,9 @@ namespace
                 const SvxDateField* pDateField = static_cast< const SvxDateField* >(ree.pFieldItem->GetField());
                 if (pDateField)
                 {
-                    if (pDateField->GetType() == SVXDATETYPE_FIX)
+                    if (pDateField->GetType() == SvxDateType::Fix)
                         strFldType = "date (fixed)";
-                    else if (pDateField->GetType() == SVXDATETYPE_VAR)
+                    else if (pDateField->GetType() == SvxDateType::Var)
                         strFldType = "date (variable)";
                 }
                 break;
diff --git a/editeng/source/items/flditem.cxx b/editeng/source/items/flditem.cxx
index 690425594227..cb2c69f3abb1 100644
--- a/editeng/source/items/flditem.cxx
+++ b/editeng/source/items/flditem.cxx
@@ -68,7 +68,7 @@ SvxFieldData* SvxFieldData::Create(const uno::Reference<text::XTextContent>& xTe
                         bool bIsFixed = false;
                         xPropSet->getPropertyValue(UNO_TC_PROP_IS_FIXED) >>= bIsFixed;
 
-                        SvxDateField* pData = new SvxDateField(aDate, bIsFixed ? SVXDATETYPE_FIX : SVXDATETYPE_VAR);
+                        SvxDateField* pData = new SvxDateField(aDate, bIsFixed ? SvxDateType::Fix : SvxDateType::Var);
                         sal_Int32 nNumFmt = -1;
                         xPropSet->getPropertyValue(UNO_TC_PROP_NUMFORMAT) >>= nNumFmt;
                         if (nNumFmt >= SVXDATEFORMAT_APPDEFAULT && nNumFmt <= SVXDATEFORMAT_F)
@@ -363,7 +363,7 @@ SV_IMPL_PERSIST1( SvxDateField, SvxFieldData );
 SvxDateField::SvxDateField()
 {
     nFixDate = Date( Date::SYSTEM ).GetDate();
-    eType = SVXDATETYPE_VAR;
+    eType = SvxDateType::Var;
     eFormat = SVXDATEFORMAT_STDSMALL;
 }
 
@@ -410,7 +410,7 @@ void SvxDateField::Load( SvPersistStream & rStm )
 void SvxDateField::Save( SvPersistStream & rStm )
 {
     rStm.WriteInt32( nFixDate );
-    rStm.WriteUInt16( eType );
+    rStm.WriteUInt16( (sal_uInt16)eType );
     rStm.WriteUInt16( eFormat );
 }
 
@@ -418,7 +418,7 @@ void SvxDateField::Save( SvPersistStream & rStm )
 OUString SvxDateField::GetFormatted( SvNumberFormatter& rFormatter, LanguageType eLang ) const
 {
     Date aDate( Date::EMPTY );
-    if ( eType == SVXDATETYPE_FIX )
+    if ( eType == SvxDateType::Fix )
         aDate.SetDate( nFixDate );
     else
         aDate = Date( Date::SYSTEM ); // current date
diff --git a/editeng/source/uno/unofield.cxx b/editeng/source/uno/unofield.cxx
index b6d6b626dec4..26aaff95392b 100644
--- a/editeng/source/uno/unofield.cxx
+++ b/editeng/source/uno/unofield.cxx
@@ -316,7 +316,7 @@ SvxUnoTextField::SvxUnoTextField( uno::Reference< text::XTextRange > const & xAn
                     mpImpl->mbBoolean2 = true;
                     // #i35416# for variable date field, don't use invalid "0000-00-00" date,
                     // use current date instead
-                    bool bFixed = static_cast<const SvxDateField*>(pData)->GetType() == SVXDATETYPE_FIX;
+                    bool bFixed = static_cast<const SvxDateField*>(pData)->GetType() == SvxDateType::Fix;
                     mpImpl->maDateTime = getDate( bFixed ?
                                             static_cast<const SvxDateField*>(pData)->GetFixDate() :
                                             Date( Date::SYSTEM ).GetDate() );
@@ -392,7 +392,7 @@ SvxFieldData* SvxUnoTextField::CreateFieldData() const throw()
         if( mpImpl->mbBoolean2 ) // IsDate?
         {
             Date aDate( setDate( mpImpl->maDateTime ) );
-            pData = new SvxDateField( aDate, mpImpl->mbBoolean1?SVXDATETYPE_FIX:SVXDATETYPE_VAR );
+            pData = new SvxDateField( aDate, mpImpl->mbBoolean1?SvxDateType::Fix:SvxDateType::Var );
             if( mpImpl->mnInt32 >= SVXDATEFORMAT_APPDEFAULT && mpImpl->mnInt32 <= SVXDATEFORMAT_F )
                 static_cast<SvxDateField*>(pData)->SetFormat( (SvxDateFormat)mpImpl->mnInt32 );
         }
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 38c27e407a72..e819b6bc6593 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -6466,7 +6466,7 @@ void PPTFieldEntry::SetDateTime( sal_uInt32 nVal )
     SvxTimeFormat eTimeFormat;
     GetDateTime( nVal, eDateFormat, eTimeFormat );
     if ( eDateFormat != SVXDATEFORMAT_APPDEFAULT )
-        xField1.reset(new SvxFieldItem(SvxDateField( Date( Date::SYSTEM ), SVXDATETYPE_VAR, eDateFormat ), EE_FEATURE_FIELD));
+        xField1.reset(new SvxFieldItem(SvxDateField( Date( Date::SYSTEM ), SvxDateType::Var, eDateFormat ), EE_FEATURE_FIELD));
     if ( eTimeFormat != SVXTIMEFORMAT_APPDEFAULT )
     {
         std::unique_ptr<SvxFieldItem> xFieldItem(new SvxFieldItem(SvxExtTimeField( tools::Time( tools::Time::SYSTEM ), SVXTIMETYPE_VAR, eTimeFormat ), EE_FEATURE_FIELD));
@@ -6869,7 +6869,7 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport
                                                     if (!xEntry->xString)
                                                     {
                                                         // Handle as previously
-                                                        xEntry->xField1.reset(new SvxFieldItem( SvxDateField( Date( Date::SYSTEM ), SVXDATETYPE_FIX ), EE_FEATURE_FIELD ));
+                                                        xEntry->xField1.reset(new SvxFieldItem( SvxDateField( Date( Date::SYSTEM ), SvxDateType::Fix ), EE_FEATURE_FIELD ));
                                                     }
                                                 }
                                             }
diff --git a/include/editeng/flditem.hxx b/include/editeng/flditem.hxx
index ef10324bdb63..2ab51cd62b4c 100644
--- a/include/editeng/flditem.hxx
+++ b/include/editeng/flditem.hxx
@@ -89,7 +89,7 @@ public:
 // The following are the derivatives of SvxFieldData ...
 
 
-enum SvxDateType { SVXDATETYPE_FIX, SVXDATETYPE_VAR };
+enum class SvxDateType { Fix, Var };
 enum SvxDateFormat {    SVXDATEFORMAT_APPDEFAULT = 0,   // Set as in App
                         SVXDATEFORMAT_SYSTEM,       // Set as in System
                         SVXDATEFORMAT_STDSMALL,
diff --git a/sc/source/core/data/attrib.cxx b/sc/source/core/data/attrib.cxx
index daa114daea63..8f10dff22980 100644
--- a/sc/source/core/data/attrib.cxx
+++ b/sc/source/core/data/attrib.cxx
@@ -673,7 +673,7 @@ static bool lcl_ConvertFields(EditEngine& rEng, const OUString* pCommands)
         while ((nPos = aStr.indexOf(pCommands[2])) != -1)
         {
             ESelection aSel( nPar,nPos, nPar,nPos+pCommands[2].getLength() );
-            rEng.QuickInsertField( SvxFieldItem(SvxDateField(Date( Date::SYSTEM ),SVXDATETYPE_VAR), EE_FEATURE_FIELD), aSel );
+            rEng.QuickInsertField( SvxFieldItem(SvxDateField(Date( Date::SYSTEM ),SvxDateType::Var), EE_FEATURE_FIELD), aSel );
             lcl_SetSpace(aStr, aSel ); bChange = true;
         }
         while ((nPos = aStr.indexOf(pCommands[3])) != -1)
diff --git a/sc/source/core/data/stlpool.cxx b/sc/source/core/data/stlpool.cxx
index 1ef9c311f615..e41e8f03693d 100644
--- a/sc/source/core/data/stlpool.cxx
+++ b/sc/source/core/data/stlpool.cxx
@@ -360,7 +360,7 @@ void ScStyleSheetPool::CreateStandardStyles()
     aStr = ", ";
     pEdEngine->SetText( aStr );
     pEdEngine->QuickInsertField( SvxFieldItem(SvxTimeField(), EE_FEATURE_FIELD), ESelection(0,2,0,2) );
-    pEdEngine->QuickInsertField( SvxFieldItem(SvxDateField(Date( Date::SYSTEM ),SVXDATETYPE_VAR), EE_FEATURE_FIELD),
+    pEdEngine->QuickInsertField( SvxFieldItem(SvxDateField(Date( Date::SYSTEM ),SvxDateType::Var), EE_FEATURE_FIELD),
                                     ESelection() );
     pTxtObj = pEdEngine->CreateTextObject();
     pHeaderItem->SetRightArea( *pTxtObj );
diff --git a/sc/source/ui/pagedlg/scuitphfedit.cxx b/sc/source/ui/pagedlg/scuitphfedit.cxx
index 67e3b226780d..8bffe1312ce2 100644
--- a/sc/source/ui/pagedlg/scuitphfedit.cxx
+++ b/sc/source/ui/pagedlg/scuitphfedit.cxx
@@ -618,7 +618,7 @@ void ScHFEditPage::ProcessDefinedListSel(ScHFEntryId eSel, bool bTravelling)
             ClearTextAreas();
             OUString aConfidentialEntry(aUserOpt.GetCompany() + " " + m_pFtConfidential->GetText());
             m_pWndLeft->GetEditEngine()->SetText(aConfidentialEntry);
-            m_pWndCenter->InsertField( SvxFieldItem(SvxDateField(Date( Date::SYSTEM ),SVXDATETYPE_VAR), EE_FEATURE_FIELD) );
+            m_pWndCenter->InsertField( SvxFieldItem(SvxDateField(Date( Date::SYSTEM ),SvxDateType::Var), EE_FEATURE_FIELD) );
 
             OUString aPageEntry( m_pFtPage->GetText() + " ");
             m_pWndRight->GetEditEngine()->SetText(aPageEntry);
@@ -717,7 +717,7 @@ void ScHFEditPage::ProcessDefinedListSel(ScHFEntryId eSel, bool bTravelling)
             //aPageEntry += " ";
             m_pWndCenter->GetEditEngine()->SetText(aPageEntry);
             m_pWndCenter->InsertField( SvxFieldItem(SvxPageField(), EE_FEATURE_FIELD) );
-            m_pWndRight->InsertField( SvxFieldItem(SvxDateField(Date( Date::SYSTEM ),SVXDATETYPE_VAR), EE_FEATURE_FIELD) );
+            m_pWndRight->InsertField( SvxFieldItem(SvxDateField(Date( Date::SYSTEM ),SvxDateType::Var), EE_FEATURE_FIELD) );
             if(!bTravelling)
                 m_pWndRight->GrabFocus();
         }
@@ -728,7 +728,7 @@ void ScHFEditPage::ProcessDefinedListSel(ScHFEntryId eSel, bool bTravelling)
             ClearTextAreas();
             OUString aCreatedByEntry( m_pFtCreatedBy->GetText() + " " + aUserOpt.GetFirstName() + " " + aUserOpt.GetLastName());
             m_pWndLeft->GetEditEngine()->SetText(aCreatedByEntry);
-            m_pWndCenter->InsertField( SvxFieldItem(SvxDateField(Date( Date::SYSTEM ),SVXDATETYPE_VAR), EE_FEATURE_FIELD) );
+            m_pWndCenter->InsertField( SvxFieldItem(SvxDateField(Date( Date::SYSTEM ),SvxDateType::Var), EE_FEATURE_FIELD) );
             OUString aPageEntry( m_pFtPage->GetText() );
             aPageEntry += " ";
             m_pWndRight->GetEditEngine()->SetText(aPageEntry);
@@ -791,7 +791,7 @@ IMPL_LINK( ScHFEditPage, ClickHdl, Button*, pBtn, void )
         else if ( pBtn == m_pBtnLastPage )
             m_pEditFocus->InsertField(SvxFieldItem(SvxPagesField(), EE_FEATURE_FIELD));
         else if ( pBtn == m_pBtnDate )
-            m_pEditFocus->InsertField(SvxFieldItem(SvxDateField(Date(Date::SYSTEM),SVXDATETYPE_VAR), EE_FEATURE_FIELD));
+            m_pEditFocus->InsertField(SvxFieldItem(SvxDateField(Date(Date::SYSTEM),SvxDateType::Var), EE_FEATURE_FIELD));
         else if ( pBtn == m_pBtnTime )
             m_pEditFocus->InsertField(SvxFieldItem(SvxTimeField(), EE_FEATURE_FIELD));
         else if ( pBtn == m_pBtnFile )
diff --git a/sc/source/ui/unoobj/fielduno.cxx b/sc/source/ui/unoobj/fielduno.cxx
index a7e5483bb59d..c2ae2cab2454 100644
--- a/sc/source/ui/unoobj/fielduno.cxx
+++ b/sc/source/ui/unoobj/fielduno.cxx
@@ -838,7 +838,7 @@ void ScEditFieldObj::setPropertyValueDateTime(const OUString& rName, const uno::
                 }
                 else if (rName == SC_UNONAME_ISFIXED)
                 {
-                    SvxDateType eType = rVal.get<bool>() ? SVXDATETYPE_FIX : SVXDATETYPE_VAR;
+                    SvxDateType eType = rVal.get<bool>() ? SvxDateType::Fix : SvxDateType::Var;
                     p->SetType(eType);
                 }
                 else if (rName == SC_UNONAME_DATETIME)
@@ -930,7 +930,7 @@ uno::Any ScEditFieldObj::getPropertyValueDateTime(const OUString& rName)
                     return uno::makeAny(true);
 
                 if (rName == SC_UNONAME_ISFIXED)
-                    return uno::makeAny<sal_Bool>(p->GetType() == SVXDATETYPE_FIX);
+                    return uno::makeAny<sal_Bool>(p->GetType() == SvxDateType::Fix);
 
                 if (rName == SC_UNONAME_DATETIME)
                 {
diff --git a/sd/source/ui/app/sdpopup.cxx b/sd/source/ui/app/sdpopup.cxx
index 9cd822ff21b5..02c7ff23c0c6 100644
--- a/sd/source/ui/app/sdpopup.cxx
+++ b/sd/source/ui/app/sdpopup.cxx
@@ -60,7 +60,7 @@ void SdFieldPopup::Fill( LanguageType eLanguage )
         const SvxDateField* pDateField = static_cast<const SvxDateField*>( pField );
         SvxDateField aDateField( *pDateField );
 
-        if( pDateField->GetType() == SVXDATETYPE_FIX )
+        if( pDateField->GetType() == SvxDateType::Fix )
             CheckItem( 1 );
         else
             CheckItem( 2 );
@@ -174,9 +174,9 @@ SvxFieldData* SdFieldPopup::GetField()
         sal_uInt16 i;
 
         if( IsItemChecked( 1 ) )
-            eType = SVXDATETYPE_FIX;
+            eType = SvxDateType::Fix;
         else
-            eType = SVXDATETYPE_VAR;
+            eType = SvxDateType::Var;
 
         for( i = 3; i <= nCount; i++ )
         {
@@ -192,7 +192,7 @@ SvxFieldData* SdFieldPopup::GetField()
             static_cast<SvxDateField*>( pNewField )->SetType( eType );
             static_cast<SvxDateField*>( pNewField )->SetFormat( eFormat );
 
-            if( (pDateField->GetType() == SVXDATETYPE_VAR) && (eType == SVXDATETYPE_FIX) )
+            if( (pDateField->GetType() == SvxDateType::Var) && (eType == SvxDateType::Fix) )
             {
                 Date aDate( Date::SYSTEM );
                 static_cast<SvxDateField*>( pNewField )->SetFixDate( aDate );
diff --git a/sd/source/ui/dlg/dlgfield.cxx b/sd/source/ui/dlg/dlgfield.cxx
index 57ccd00d0f81..0ff1eddb3c82 100644
--- a/sd/source/ui/dlg/dlgfield.cxx
+++ b/sd/source/ui/dlg/dlgfield.cxx
@@ -87,9 +87,9 @@ SvxFieldData* SdModifyFieldDlg::GetField()
             SvxDateFormat eFormat;
 
             if( m_pRbtFix->IsChecked() )
-                eType = SVXDATETYPE_FIX;
+                eType = SvxDateType::Fix;
             else
-                eType = SVXDATETYPE_VAR;
+                eType = SvxDateType::Var;
 
             eFormat = (SvxDateFormat) ( m_pLbFormat->GetSelectEntryPos() + 2 );
 
@@ -264,7 +264,7 @@ void SdModifyFieldDlg::FillControls()
         const SvxDateField* pDateField = static_cast<const SvxDateField*>(pField);
         SvxDateField aDateField( *pDateField );
 
-        if( pDateField->GetType() == SVXDATETYPE_FIX )
+        if( pDateField->GetType() == SvxDateType::Fix )
             m_pRbtFix->Check();
         else
             m_pRbtVar->Check();
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index ea41c4d0aacf..292067501d6b 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -1841,7 +1841,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
             {
                 case SID_INSERT_FLD_DATE_FIX:
                     pFieldItem.reset(new SvxFieldItem(
-                        SvxDateField( Date( Date::SYSTEM ), SVXDATETYPE_FIX ), EE_FEATURE_FIELD ));
+                        SvxDateField( Date( Date::SYSTEM ), SvxDateType::Fix ), EE_FEATURE_FIELD ));
                 break;
 
                 case SID_INSERT_FLD_DATE_VAR:
diff --git a/sd/source/ui/view/outlnvs2.cxx b/sd/source/ui/view/outlnvs2.cxx
index c4adefd0164f..5e7ee9db9493 100644
--- a/sd/source/ui/view/outlnvs2.cxx
+++ b/sd/source/ui/view/outlnvs2.cxx
@@ -490,7 +490,7 @@ void OutlineViewShell::FuTemporaryModify(SfxRequest &rReq)
             {
                 case SID_INSERT_FLD_DATE_FIX:
                     pFieldItem.reset(new SvxFieldItem(
-                        SvxDateField( Date( Date::SYSTEM ), SVXDATETYPE_FIX ), EE_FEATURE_FIELD ));
+                        SvxDateField( Date( Date::SYSTEM ), SvxDateType::Fix ), EE_FEATURE_FIELD ));
                 break;
 
                 case SID_INSERT_FLD_DATE_VAR:


More information about the Libreoffice-commits mailing list