chart2/source/controller/dialogs/tp_AxisPositions.cxx |    4 
 chart2/source/controller/dialogs/tp_AxisPositions.hxx |    2 
 chart2/source/controller/dialogs/tp_Scale.cxx         |    8 -
 chart2/source/controller/dialogs/tp_Scale.hxx         |    2 
 cui/source/dialogs/hltpbase.cxx                       |    4 
 cui/source/dialogs/iconcdlg.cxx                       |   16 +--
 cui/source/inc/align.hxx                              |    2 
 cui/source/inc/autocdlg.hxx                           |    4 
 cui/source/inc/backgrnd.hxx                           |    2 
 cui/source/inc/border.hxx                             |    2 
 cui/source/inc/chardlg.hxx                            |    8 -
 cui/source/inc/cuioptgenrl.hxx                        |    2 
 cui/source/inc/cuitabarea.hxx                         |   14 +--
 cui/source/inc/cuitabline.hxx                         |    6 -
 cui/source/inc/grfpage.hxx                            |    2 
 cui/source/inc/hltpbase.hxx                           |    2 
 cui/source/inc/iconcdlg.hxx                           |   12 --
 cui/source/inc/numfmt.hxx                             |    2 
 cui/source/inc/numpages.hxx                           |   12 +-
 cui/source/inc/page.hxx                               |    2 
 cui/source/inc/paragrph.hxx                           |    6 -
 cui/source/inc/swpossizetabpage.hxx                   |    2 
 cui/source/inc/tabstpge.hxx                           |    2 
 cui/source/inc/transfrm.hxx                           |    6 -
 cui/source/options/optcolor.cxx                       |    4 
 cui/source/options/optcolor.hxx                       |    2 
 cui/source/options/optgdlg.cxx                        |    4 
 cui/source/options/optgdlg.hxx                        |    2 
 cui/source/options/optgenrl.cxx                       |    4 
 cui/source/options/optinet2.cxx                       |    4 
 cui/source/options/optinet2.hxx                       |    2 
 cui/source/options/optmemory.cxx                      |    4 
 cui/source/options/optmemory.hxx                      |    2 
 cui/source/options/treeopt.cxx                        |    8 -
 cui/source/tabpages/align.cxx                         |    4 
 cui/source/tabpages/autocdlg.cxx                      |    8 -
 cui/source/tabpages/backgrnd.cxx                      |    6 -
 cui/source/tabpages/border.cxx                        |    4 
 cui/source/tabpages/chardlg.cxx                       |   16 +--
 cui/source/tabpages/grfpage.cxx                       |    4 
 cui/source/tabpages/numfmt.cxx                        |    4 
 cui/source/tabpages/numpages.cxx                      |   24 ++---
 cui/source/tabpages/page.cxx                          |    6 -
 cui/source/tabpages/paragrph.cxx                      |   12 +-
 cui/source/tabpages/swpossizetabpage.cxx              |    4 
 cui/source/tabpages/tabstpge.cxx                      |    4 
 cui/source/tabpages/tparea.cxx                        |    4 
 cui/source/tabpages/tpbitmap.cxx                      |    6 -
 cui/source/tabpages/tpcolor.cxx                       |    6 -
 cui/source/tabpages/tpgradnt.cxx                      |    6 -
 cui/source/tabpages/tphatch.cxx                       |    6 -
 cui/source/tabpages/tpline.cxx                        |    4 
 cui/source/tabpages/tplnedef.cxx                      |    4 
 cui/source/tabpages/tplneend.cxx                      |    4 
 cui/source/tabpages/tpshadow.cxx                      |    4 
 cui/source/tabpages/tptrans.cxx                       |    4 
 cui/source/tabpages/transfrm.cxx                      |   12 +-
 dbaccess/source/ui/dlg/adminpages.cxx                 |    6 -
 dbaccess/source/ui/dlg/adminpages.hxx                 |    2 
 dbaccess/source/ui/dlg/dbwizsetup.cxx                 |    5 -
 dbaccess/source/ui/dlg/tablespage.cxx                 |    4 
 dbaccess/source/ui/dlg/tablespage.hxx                 |    2 
 include/sfx2/dinfdlg.hxx                              |    4 
 include/sfx2/mgetempl.hxx                             |    2 
 include/sfx2/printopt.hxx                             |    2 
 include/sfx2/tabdlg.hxx                               |   24 +++--
 include/svx/hdft.hxx                                  |    2 
 include/svx/optgrid.hxx                               |    2 
 sc/source/ui/attrdlg/tabpages.cxx                     |    4 
 sc/source/ui/dbgui/tpsort.cxx                         |    8 -
 sc/source/ui/inc/tabpages.hxx                         |    2 
 sc/source/ui/inc/tpcalc.hxx                           |    2 
 sc/source/ui/inc/tpcompatibility.hxx                  |    2 
 sc/source/ui/inc/tpdefaults.hxx                       |    2 
 sc/source/ui/inc/tpformula.hxx                        |    2 
 sc/source/ui/inc/tphf.hxx                             |    2 
 sc/source/ui/inc/tpprint.hxx                          |    2 
 sc/source/ui/inc/tpsort.hxx                           |    4 
 sc/source/ui/inc/tptable.hxx                          |    2 
 sc/source/ui/inc/tpusrlst.hxx                         |    2 
 sc/source/ui/inc/tpview.hxx                           |    4 
 sc/source/ui/optdlg/tpcalc.cxx                        |    8 -
 sc/source/ui/optdlg/tpcompatibility.cxx               |    4 
 sc/source/ui/optdlg/tpdefaults.cxx                    |    4 
 sc/source/ui/optdlg/tpformula.cxx                     |    4 
 sc/source/ui/optdlg/tpprint.cxx                       |    4 
 sc/source/ui/optdlg/tpusrlst.cxx                      |    4 
 sc/source/ui/optdlg/tpview.cxx                        |    8 -
 sc/source/ui/pagedlg/tphf.cxx                         |    6 -
 sc/source/ui/pagedlg/tptable.cxx                      |    4 
 sd/source/ui/dlg/tpaction.cxx                         |    4 
 sd/source/ui/dlg/tpoption.cxx                         |    8 -
 sd/source/ui/inc/tpaction.hxx                         |    2 
 sd/source/ui/inc/tpoption.hxx                         |    2 
 sfx2/source/dialog/basedlgs.cxx                       |    4 
 sfx2/source/dialog/dinfdlg.cxx                        |   10 +-
 sfx2/source/dialog/mgetempl.cxx                       |   12 +-
 sfx2/source/dialog/printopt.cxx                       |    4 
 sfx2/source/dialog/styledlg.cxx                       |    2 
 sfx2/source/dialog/tabdlg.cxx                         |   26 +++---
 svx/source/dialog/hdft.cxx                            |    4 
 svx/source/dialog/optgrid.cxx                         |    4 
 sw/source/ui/chrdlg/drpcps.cxx                        |    4 
 sw/source/ui/chrdlg/swuiccoll.cxx                     |    4 
 sw/source/ui/envelp/envfmt.cxx                        |    4 
 sw/source/ui/envelp/envfmt.hxx                        |    2 
 sw/source/ui/envelp/envlop1.cxx                       |    4 
 sw/source/ui/envelp/envprt.cxx                        |    4 
 sw/source/ui/envelp/envprt.hxx                        |    2 
 sw/source/ui/envelp/label1.cxx                        |   16 +--
 sw/source/ui/envelp/labfmt.cxx                        |    4 
 sw/source/ui/envelp/labfmt.hxx                        |    2 
 sw/source/ui/envelp/labprt.cxx                        |    4 
 sw/source/ui/envelp/labprt.hxx                        |    2 
 sw/source/ui/envelp/swuilabimp.hxx                    |    8 -
 sw/source/ui/frmdlg/column.cxx                        |    4 
 sw/source/ui/frmdlg/frmpage.cxx                       |    8 -
 sw/source/ui/frmdlg/wrap.cxx                          |    4 
 sw/source/ui/index/cnttab.cxx                         |   12 +-
 sw/source/ui/misc/num.cxx                             |    4 
 sw/source/ui/misc/outline.cxx                         |    4 
 sw/source/ui/misc/pgfnote.cxx                         |    4 
 sw/source/ui/misc/pggrid.cxx                          |    4 
 sw/source/ui/table/tabledlg.cxx                       |   10 +-
 sw/source/uibase/inc/column.hxx                       |    2 
 sw/source/uibase/inc/drpcps.hxx                       |    2 
 sw/source/uibase/inc/envlop.hxx                       |    2 
 sw/source/uibase/inc/frmpage.hxx                      |    4 
 sw/source/uibase/inc/num.hxx                          |    2 
 sw/source/uibase/inc/outline.hxx                      |    2 
 sw/source/uibase/inc/pgfnote.hxx                      |    2 
 sw/source/uibase/inc/pggrid.hxx                       |    2 
 sw/source/uibase/inc/swuiccoll.hxx                    |    2 
 sw/source/uibase/inc/swuicnttab.hxx                   |    6 -
 sw/source/uibase/inc/wrap.hxx                         |    2 
 sw/source/uibase/table/tablepg.hxx                    |    4 
 writerfilter/source/rtftok/rtfdispatchflag.cxx        |    8 -
 writerfilter/source/rtftok/rtfdispatchvalue.cxx       |   15 +--
 writerfilter/source/rtftok/rtfdocumentimpl.cxx        |   12 +-
 writerfilter/source/rtftok/rtfdocumentimpl.hxx        |    3 
 xmlhelp/source/cxxhelp/inc/tvread.hxx                 |   10 +-
 xmlhelp/source/cxxhelp/provider/databases.cxx         |   74 +++++++++---------
 xmlhelp/source/cxxhelp/provider/databases.hxx         |   12 +-
 xmlhelp/source/treeview/tvread.cxx                    |   20 ++--
 144 files changed, 418 insertions(+), 419 deletions(-)

New commits:
commit 268a518a1ac1698a769dbce17e52ac99d7737ac4
Author: Noel Grandin <noelgran...@gmail.com>
Date:   Sun Jun 5 18:48:55 2016 +0200

    Convert RunType to scoped enum
    
    Change-Id: I81732f2db5711109e021838da997c0f25b2ea879
    Reviewed-on: https://gerrit.libreoffice.org/25925
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Noel Grandin <noelgran...@gmail.com>

diff --git a/writerfilter/source/rtftok/rtfdispatchflag.cxx 
b/writerfilter/source/rtftok/rtfdispatchflag.cxx
index 8844503..8fa7f8f 100644
--- a/writerfilter/source/rtftok/rtfdispatchflag.cxx
+++ b/writerfilter/source/rtftok/rtfdispatchflag.cxx
@@ -457,7 +457,7 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
         m_aStates.top().aCharacterAttributes = 
getDefaultState().aCharacterAttributes;
         m_aStates.top().nCurrentCharacterStyleIndex = -1;
         m_aStates.top().isRightToLeft = false;
-        m_aStates.top().eRunType = RTFParserState::LOCH;
+        m_aStates.top().eRunType = RTFParserState::RunType::LOCH;
     }
     break;
     case RTF_PARD:
@@ -725,13 +725,13 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword 
nKeyword)
         // These should be mapped to NS_ooxml::LN_EG_SectPrContents_pgNumType, 
but dmapper has no API for that at the moment.
         break;
     case RTF_LOCH:
-        m_aStates.top().eRunType = RTFParserState::LOCH;
+        m_aStates.top().eRunType = RTFParserState::RunType::LOCH;
         break;
     case RTF_HICH:
-        m_aStates.top().eRunType = RTFParserState::HICH;
+        m_aStates.top().eRunType = RTFParserState::RunType::HICH;
         break;
     case RTF_DBCH:
-        m_aStates.top().eRunType = RTFParserState::DBCH;
+        m_aStates.top().eRunType = RTFParserState::RunType::DBCH;
         break;
     case RTF_TITLEPG:
     {
diff --git a/writerfilter/source/rtftok/rtfdispatchvalue.cxx 
b/writerfilter/source/rtftok/rtfdispatchvalue.cxx
index b231ef4..d89cf08 100644
--- a/writerfilter/source/rtftok/rtfdispatchvalue.cxx
+++ b/writerfilter/source/rtftok/rtfdispatchvalue.cxx
@@ -151,7 +151,8 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword 
nKeyword, int nParam)
     {
     case RTF_FS:
     case RTF_AFS:
-        nSprm = (m_aStates.top().isRightToLeft || m_aStates.top().eRunType == 
RTFParserState::HICH) ? NS_ooxml::LN_EG_RPrBase_szCs : 
NS_ooxml::LN_EG_RPrBase_sz;
+        nSprm =  (m_aStates.top().isRightToLeft || m_aStates.top().eRunType == 
RTFParserState::RunType::HICH)
+                ? NS_ooxml::LN_EG_RPrBase_szCs : NS_ooxml::LN_EG_RPrBase_sz;
         break;
     case RTF_ANIMTEXT:
         nSprm = NS_ooxml::LN_EG_RPrBase_effect;
@@ -178,17 +179,17 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword 
nKeyword, int nParam)
     {
     case RTF_LANG:
     case RTF_ALANG:
-        if (m_aStates.top().isRightToLeft || m_aStates.top().eRunType == 
RTFParserState::HICH)
+        if (m_aStates.top().isRightToLeft || m_aStates.top().eRunType == 
RTFParserState::RunType::HICH)
         {
             nSprm = NS_ooxml::LN_CT_Language_bidi;
         }
-        else if (m_aStates.top().eRunType == RTFParserState::DBCH)
+        else if (m_aStates.top().eRunType == RTFParserState::RunType::DBCH)
         {
             nSprm = NS_ooxml::LN_CT_Language_eastAsia;
         }
         else
         {
-            assert(m_aStates.top().eRunType == RTFParserState::LOCH);
+            assert(m_aStates.top().eRunType == RTFParserState::RunType::LOCH);
             nSprm = NS_ooxml::LN_CT_Language_val;
         }
         break;
@@ -313,17 +314,17 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword 
nKeyword, int nParam)
     {
     case RTF_F:
     case RTF_AF:
-        if (m_aStates.top().isRightToLeft || m_aStates.top().eRunType == 
RTFParserState::HICH)
+        if (m_aStates.top().isRightToLeft || m_aStates.top().eRunType == 
RTFParserState::RunType::HICH)
         {
             nSprm = NS_ooxml::LN_CT_Fonts_cs;
         }
-        else if (m_aStates.top().eRunType == RTFParserState::DBCH)
+        else if (m_aStates.top().eRunType == RTFParserState::RunType::DBCH)
         {
             nSprm = NS_ooxml::LN_CT_Fonts_eastAsia;
         }
         else
         {
-            assert(m_aStates.top().eRunType == RTFParserState::LOCH);
+            assert(m_aStates.top().eRunType == RTFParserState::RunType::LOCH);
             nSprm = NS_ooxml::LN_CT_Fonts_ascii;
         }
         if (m_aStates.top().eDestination == Destination::FONTTABLE || 
m_aStates.top().eDestination == Destination::FONTENTRY)
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx 
b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 761cf20..30ace13 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -1099,7 +1099,7 @@ RTFError RTFDocumentImpl::resolveChars(char ch)
                 {
                     // fdo#79384: Word will reject Shift-JIS following \loch
                     // but apparently OOo could read and (worse) write such 
documents
-                    SAL_INFO_IF(m_aStates.top().eRunType != 
RTFParserState::DBCH, "writerfilter.rtf", "invalid Shift-JIS without DBCH");
+                    SAL_INFO_IF(m_aStates.top().eRunType != 
RTFParserState::RunType::DBCH, "writerfilter.rtf", "invalid Shift-JIS without 
DBCH");
                     assert(bUnicodeChecked);
                     aBuf.append(ch);
                 }
@@ -1674,11 +1674,13 @@ RTFError RTFDocumentImpl::dispatchToggle(RTFKeyword 
nKeyword, bool bParam, int n
     {
     case RTF_B:
     case RTF_AB:
-        nSprm = (m_aStates.top().isRightToLeft || m_aStates.top().eRunType == 
RTFParserState::HICH) ? NS_ooxml::LN_EG_RPrBase_bCs : NS_ooxml::LN_EG_RPrBase_b;
+        nSprm =   (m_aStates.top().isRightToLeft || m_aStates.top().eRunType 
== RTFParserState::RunType::HICH)
+                ? NS_ooxml::LN_EG_RPrBase_bCs : NS_ooxml::LN_EG_RPrBase_b;
         break;
     case RTF_I:
     case RTF_AI:
-        nSprm = (m_aStates.top().isRightToLeft || m_aStates.top().eRunType == 
RTFParserState::HICH) ? NS_ooxml::LN_EG_RPrBase_iCs : NS_ooxml::LN_EG_RPrBase_i;
+        nSprm =   (m_aStates.top().isRightToLeft || m_aStates.top().eRunType 
== RTFParserState::RunType::HICH)
+                ? NS_ooxml::LN_EG_RPrBase_iCs : NS_ooxml::LN_EG_RPrBase_i;
         break;
     case RTF_OUTL:
         nSprm = NS_ooxml::LN_EG_RPrBase_outline;
@@ -1762,7 +1764,7 @@ RTFError RTFDocumentImpl::pushState()
     else
     {
         // fdo#85812 group resets run type of _current_ and new state (but not 
RTL)
-        m_aStates.top().eRunType = RTFParserState::LOCH;
+        m_aStates.top().eRunType = RTFParserState::RunType::LOCH;
 
         if (m_aStates.top().eDestination == Destination::MR)
             lcl_DestinationToMath(*m_aStates.top().pDestinationText, 
m_aMathBuffer, m_bMathNor);
@@ -3171,7 +3173,7 @@ RTFParserState::RTFParserState(RTFDocumentImpl* 
pDocumentImpl)
       aShape(),
       aDrawingObject(),
       aFrame(this),
-      eRunType(LOCH),
+      eRunType(RunType::LOCH),
       isRightToLeft(false),
       nYear(0),
       nMonth(0),
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.hxx 
b/writerfilter/source/rtftok/rtfdocumentimpl.hxx
index 132df5a..220da80 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.hxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.hxx
@@ -265,7 +265,8 @@ public:
     RTFFrame aFrame;
 
     /// Maps to OOXML's ascii, cs or eastAsia.
-    enum { LOCH, HICH, DBCH } eRunType;
+    enum class RunType { LOCH, HICH, DBCH };
+    RunType eRunType;
     /// ltrch or rtlch
     bool isRightToLeft;
 
commit bc1e738708c4b343a63c78bf024cc2df5160b207
Author: Noel Grandin <noelgran...@gmail.com>
Date:   Sun Jun 5 15:26:54 2016 +0200

    Convert IteratorState to scoped enum
    
    Change-Id: I71850584a727261e9e7b2115bdfb488ba76b6d21
    Reviewed-on: https://gerrit.libreoffice.org/25919
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Noel Grandin <noelgran...@gmail.com>

diff --git a/xmlhelp/source/cxxhelp/inc/tvread.hxx 
b/xmlhelp/source/cxxhelp/inc/tvread.hxx
index bb5868e..2a1b646 100644
--- a/xmlhelp/source/cxxhelp/inc/tvread.hxx
+++ b/xmlhelp/source/cxxhelp/inc/tvread.hxx
@@ -272,12 +272,12 @@ namespace treeview {
 
     };  // end class TVChildTarget
 
-    enum IteratorState
+    enum class IteratorState
     {
-        USER_EXTENSIONS,
-        SHARED_EXTENSIONS,
-        BUNDLED_EXTENSIONS,
-        END_REACHED
+        UserExtensions,
+        SharedExtensions,
+        BundledExtensions,
+        EndReached
     };
 
     class ExtensionIteratorBase
diff --git a/xmlhelp/source/cxxhelp/provider/databases.cxx 
b/xmlhelp/source/cxxhelp/provider/databases.cxx
index 53e5cb3..ea57855 100644
--- a/xmlhelp/source/cxxhelp/provider/databases.cxx
+++ b/xmlhelp/source/cxxhelp/provider/databases.cxx
@@ -1144,7 +1144,7 @@ ExtensionIteratorBase::ExtensionIteratorBase( Reference< 
XComponentContext > xCo
     Databases& rDatabases, const OUString& aInitialModule, const OUString& 
aLanguage )
         : m_xContext( xContext )
         , m_rDatabases( rDatabases )
-        , m_eState( INITIAL_MODULE )
+        , m_eState( IteratorState::InitialModule )
         , m_aInitialModule( aInitialModule )
         , m_aLanguage( aLanguage )
 {
@@ -1156,7 +1156,7 @@ ExtensionIteratorBase::ExtensionIteratorBase( Databases& 
rDatabases,
     const OUString& aInitialModule, const OUString& aLanguage )
         : m_xContext( comphelper::getProcessComponentContext() )
         , m_rDatabases( rDatabases )
-        , m_eState( INITIAL_MODULE )
+        , m_eState( IteratorState::InitialModule )
         , m_aInitialModule( aInitialModule )
         , m_aLanguage( aLanguage )
 {
@@ -1254,7 +1254,7 @@ Reference< deployment::XPackage > 
ExtensionIteratorBase::implGetNextUserHelpPack
 
     if( m_iUserPackage == m_aUserPackagesSeq.getLength() )
     {
-        m_eState = SHARED_EXTENSIONS;       // Later: SHARED_MODULE
+        m_eState = IteratorState::SharedExtensions;       // Later: 
SHARED_MODULE
     }
     else
     {
@@ -1282,7 +1282,7 @@ Reference< deployment::XPackage > 
ExtensionIteratorBase::implGetNextSharedHelpPa
 
     if( m_iSharedPackage == m_aSharedPackagesSeq.getLength() )
     {
-        m_eState = BUNDLED_EXTENSIONS;
+        m_eState = IteratorState::BundledExtensions;
     }
     else
     {
@@ -1310,7 +1310,7 @@ Reference< deployment::XPackage > 
ExtensionIteratorBase::implGetNextBundledHelpP
 
     if( m_iBundledPackage == m_aBundledPackagesSeq.getLength() )
     {
-        m_eState = END_REACHED;
+        m_eState = IteratorState::EndReached;
     }
     else
     {
@@ -1399,20 +1399,20 @@ helpdatafileproxy::Hdf* DataBaseIterator::nextHdf( 
OUString* o_pExtensionPath, O
 {
     helpdatafileproxy::Hdf* pRetHdf = nullptr;
 
-    while( !pRetHdf && m_eState != END_REACHED )
+    while( !pRetHdf && m_eState != IteratorState::EndReached )
     {
         switch( m_eState )
         {
-            case INITIAL_MODULE:
+            case IteratorState::InitialModule:
                 pRetHdf = m_rDatabases.getHelpDataFile( m_aInitialModule, 
m_aLanguage, m_bHelpText );
-                m_eState = USER_EXTENSIONS;     // Later: SHARED_MODULE
+                m_eState = IteratorState::UserExtensions;     // Later: 
SHARED_MODULE
                 break;
 
             // Later:
             //case SHARED_MODULE
 
 
-            case USER_EXTENSIONS:
+            case IteratorState::UserExtensions:
             {
                 Reference< deployment::XPackage > xParentPackageBundle;
                 Reference< deployment::XPackage > xHelpPackage = 
implGetNextUserHelpPackage( xParentPackageBundle );
@@ -1422,7 +1422,7 @@ helpdatafileproxy::Hdf* DataBaseIterator::nextHdf( 
OUString* o_pExtensionPath, O
                 break;
             }
 
-            case SHARED_EXTENSIONS:
+            case IteratorState::SharedExtensions:
             {
                 Reference< deployment::XPackage > xParentPackageBundle;
                 Reference< deployment::XPackage > xHelpPackage = 
implGetNextSharedHelpPackage( xParentPackageBundle );
@@ -1433,7 +1433,7 @@ helpdatafileproxy::Hdf* DataBaseIterator::nextHdf( 
OUString* o_pExtensionPath, O
                 break;
             }
 
-               case BUNDLED_EXTENSIONS:
+               case IteratorState::BundledExtensions:
             {
                 Reference< deployment::XPackage > xParentPackageBundle;
                 Reference< deployment::XPackage > xHelpPackage = 
implGetNextBundledHelpPackage( xParentPackageBundle );
@@ -1444,8 +1444,8 @@ helpdatafileproxy::Hdf* DataBaseIterator::nextHdf( 
OUString* o_pExtensionPath, O
                 break;
             }
 
-            case END_REACHED:
-                OSL_FAIL( "DataBaseIterator::nextDb(): Invalid case 
END_REACHED" );
+            case IteratorState::EndReached:
+                OSL_FAIL( "DataBaseIterator::nextDb(): Invalid case 
IteratorState::EndReached" );
                 break;
         }
     }
@@ -1509,25 +1509,25 @@ OUString KeyDataBaseFileIterator::nextDbFile( bool& 
o_rbExtension )
 {
     OUString aRetFile;
 
-    while( aRetFile.isEmpty() && m_eState != END_REACHED )
+    while( aRetFile.isEmpty() && m_eState != IteratorState::EndReached )
     {
         switch( m_eState )
         {
-            case INITIAL_MODULE:
+            case IteratorState::InitialModule:
                 aRetFile = OUStringBuffer(m_rDatabases.getInstallPathAsURL()).
                     append(m_rDatabases.processLang(m_aLanguage)).append('/').
                     
append(m_aInitialModule).append(".key").makeStringAndClear();
 
                 o_rbExtension = false;
 
-                m_eState = USER_EXTENSIONS;     // Later: SHARED_MODULE
+                m_eState = IteratorState::UserExtensions;     // Later: 
SHARED_MODULE
                 break;
 
             // Later:
             //case SHARED_MODULE
 
 
-            case USER_EXTENSIONS:
+            case IteratorState::UserExtensions:
             {
                 Reference< deployment::XPackage > xParentPackageBundle;
                 Reference< deployment::XPackage > xHelpPackage = 
implGetNextUserHelpPackage( xParentPackageBundle );
@@ -1539,7 +1539,7 @@ OUString KeyDataBaseFileIterator::nextDbFile( bool& 
o_rbExtension )
                 break;
             }
 
-            case SHARED_EXTENSIONS:
+            case IteratorState::SharedExtensions:
             {
                 Reference< deployment::XPackage > xParentPackageBundle;
                 Reference< deployment::XPackage > xHelpPackage = 
implGetNextSharedHelpPackage( xParentPackageBundle );
@@ -1551,7 +1551,7 @@ OUString KeyDataBaseFileIterator::nextDbFile( bool& 
o_rbExtension )
                 break;
             }
 
-            case BUNDLED_EXTENSIONS:
+            case IteratorState::BundledExtensions:
             {
                 Reference< deployment::XPackage > xParentPackageBundle;
                 Reference< deployment::XPackage > xHelpPackage = 
implGetNextBundledHelpPackage( xParentPackageBundle );
@@ -1563,8 +1563,8 @@ OUString KeyDataBaseFileIterator::nextDbFile( bool& 
o_rbExtension )
                 break;
             }
 
-            case END_REACHED:
-                OSL_FAIL( "DataBaseIterator::nextDbFile(): Invalid case 
END_REACHED" );
+            case IteratorState::EndReached:
+                OSL_FAIL( "DataBaseIterator::nextDbFile(): Invalid case 
IteratorState::EndReached" );
                 break;
         }
     }
@@ -1590,20 +1590,20 @@ Reference< XHierarchicalNameAccess > 
JarFileIterator::nextJarFile
 {
     Reference< XHierarchicalNameAccess > xNA;
 
-    while( !xNA.is() && m_eState != END_REACHED )
+    while( !xNA.is() && m_eState != IteratorState::EndReached )
     {
         switch( m_eState )
         {
-            case INITIAL_MODULE:
+            case IteratorState::InitialModule:
                 xNA = m_rDatabases.jarFile( m_aInitialModule, m_aLanguage );
-                m_eState = USER_EXTENSIONS;     // Later: SHARED_MODULE
+                m_eState = IteratorState::UserExtensions;     // Later: 
SHARED_MODULE
                 break;
 
             // Later:
             //case SHARED_MODULE
 
 
-            case USER_EXTENSIONS:
+            case IteratorState::UserExtensions:
             {
                 Reference< deployment::XPackage > xHelpPackage = 
implGetNextUserHelpPackage( o_xParentPackageBundle );
                 if( !xHelpPackage.is() )
@@ -1613,7 +1613,7 @@ Reference< XHierarchicalNameAccess > 
JarFileIterator::nextJarFile
                 break;
             }
 
-            case SHARED_EXTENSIONS:
+            case IteratorState::SharedExtensions:
             {
                 Reference< deployment::XPackage > xHelpPackage = 
implGetNextSharedHelpPackage( o_xParentPackageBundle );
                 if( !xHelpPackage.is() )
@@ -1623,7 +1623,7 @@ Reference< XHierarchicalNameAccess > 
JarFileIterator::nextJarFile
                 break;
             }
 
-            case BUNDLED_EXTENSIONS:
+            case IteratorState::BundledExtensions:
             {
                 Reference< deployment::XPackage > xHelpPackage = 
implGetNextBundledHelpPackage( o_xParentPackageBundle );
                 if( !xHelpPackage.is() )
@@ -1633,8 +1633,8 @@ Reference< XHierarchicalNameAccess > 
JarFileIterator::nextJarFile
                 break;
             }
 
-            case END_REACHED:
-                OSL_FAIL( "JarFileIterator::nextJarFile(): Invalid case 
END_REACHED" );
+            case IteratorState::EndReached:
+                OSL_FAIL( "JarFileIterator::nextJarFile(): Invalid case 
IteratorState::EndReached" );
                 break;
         }
     }
@@ -1707,11 +1707,11 @@ OUString IndexFolderIterator::nextIndexFolder( bool& 
o_rbExtension, bool& o_rbTe
 {
     OUString aIndexFolder;
 
-    while( aIndexFolder.isEmpty() && m_eState != END_REACHED )
+    while( aIndexFolder.isEmpty() && m_eState != IteratorState::EndReached )
     {
         switch( m_eState )
         {
-            case INITIAL_MODULE:
+            case IteratorState::InitialModule:
                 aIndexFolder = m_rDatabases.getInstallPathAsURL()
                     + m_rDatabases.processLang(m_aLanguage) + "/"
                     + m_aInitialModule + ".idxl";
@@ -1719,14 +1719,14 @@ OUString IndexFolderIterator::nextIndexFolder( bool& 
o_rbExtension, bool& o_rbTe
                 o_rbTemporary = false;
                 o_rbExtension = false;
 
-                m_eState = USER_EXTENSIONS;     // Later: SHARED_MODULE
+                m_eState = IteratorState::UserExtensions;     // Later: 
SHARED_MODULE
                 break;
 
             // Later:
             //case SHARED_MODULE
 
 
-            case USER_EXTENSIONS:
+            case IteratorState::UserExtensions:
             {
                 Reference< deployment::XPackage > xParentPackageBundle;
                 Reference< deployment::XPackage > xHelpPackage = 
implGetNextUserHelpPackage( xParentPackageBundle );
@@ -1738,7 +1738,7 @@ OUString IndexFolderIterator::nextIndexFolder( bool& 
o_rbExtension, bool& o_rbTe
                 break;
             }
 
-            case SHARED_EXTENSIONS:
+            case IteratorState::SharedExtensions:
             {
                 Reference< deployment::XPackage > xParentPackageBundle;
                 Reference< deployment::XPackage > xHelpPackage = 
implGetNextSharedHelpPackage( xParentPackageBundle );
@@ -1750,7 +1750,7 @@ OUString IndexFolderIterator::nextIndexFolder( bool& 
o_rbExtension, bool& o_rbTe
                 break;
             }
 
-            case BUNDLED_EXTENSIONS:
+            case IteratorState::BundledExtensions:
             {
                 Reference< deployment::XPackage > xParentPackageBundle;
                 Reference< deployment::XPackage > xHelpPackage = 
implGetNextBundledHelpPackage( xParentPackageBundle );
@@ -1762,8 +1762,8 @@ OUString IndexFolderIterator::nextIndexFolder( bool& 
o_rbExtension, bool& o_rbTe
                 break;
             }
 
-            case END_REACHED:
-                OSL_FAIL( "IndexFolderIterator::nextIndexFolder(): Invalid 
case END_REACHED" );
+            case IteratorState::EndReached:
+                OSL_FAIL( "IndexFolderIterator::nextIndexFolder(): Invalid 
case IteratorState::EndReached" );
                 break;
         }
     }
diff --git a/xmlhelp/source/cxxhelp/provider/databases.hxx 
b/xmlhelp/source/cxxhelp/provider/databases.hxx
index 7976ccc..15111ea 100644
--- a/xmlhelp/source/cxxhelp/provider/databases.hxx
+++ b/xmlhelp/source/cxxhelp/provider/databases.hxx
@@ -305,14 +305,14 @@ namespace chelp {
 
     }; // end class Databases
 
-    enum IteratorState
+    enum class IteratorState
     {
-        INITIAL_MODULE,
+        InitialModule,
         //SHARED_MODULE,        // Later, avoids redundancies in help compiling
-        USER_EXTENSIONS,
-        SHARED_EXTENSIONS,
-        BUNDLED_EXTENSIONS,
-        END_REACHED
+        UserExtensions,
+        SharedExtensions,
+        BundledExtensions,
+        EndReached
     };
 
     // Hashtable to cache extension help status
diff --git a/xmlhelp/source/treeview/tvread.cxx 
b/xmlhelp/source/treeview/tvread.cxx
index 28dafed..c93e5b9 100644
--- a/xmlhelp/source/treeview/tvread.cxx
+++ b/xmlhelp/source/treeview/tvread.cxx
@@ -865,7 +865,7 @@ void TVChildTarget::subst( OUString& instpath )
 static const char aHelpMediaType[] = "application/vnd.sun.star.help";
 
 ExtensionIteratorBase::ExtensionIteratorBase( const OUString& aLanguage )
-        : m_eState( USER_EXTENSIONS )
+        : m_eState( IteratorState::UserExtensions )
         , m_aLanguage( aLanguage )
 {
     init();
@@ -958,7 +958,7 @@ Reference< deployment::XPackage > 
ExtensionIteratorBase::implGetNextUserHelpPack
 
     if( m_iUserPackage == m_aUserPackagesSeq.getLength() )
     {
-        m_eState = SHARED_EXTENSIONS;       // Later: SHARED_MODULE
+        m_eState = IteratorState::SharedExtensions;       // Later: 
SHARED_MODULE
     }
     else
     {
@@ -988,7 +988,7 @@ Reference< deployment::XPackage > 
ExtensionIteratorBase::implGetNextSharedHelpPa
 
     if( m_iSharedPackage == m_aSharedPackagesSeq.getLength() )
     {
-        m_eState = BUNDLED_EXTENSIONS;
+        m_eState = IteratorState::BundledExtensions;
     }
     else
     {
@@ -1018,7 +1018,7 @@ Reference< deployment::XPackage > 
ExtensionIteratorBase::implGetNextBundledHelpP
 
     if( m_iBundledPackage == m_aBundledPackagesSeq.getLength() )
     {
-        m_eState = END_REACHED;
+        m_eState = IteratorState::EndReached;
     }
     else
     {
@@ -1074,11 +1074,11 @@ OUString TreeFileIterator::nextTreeFile( sal_Int32& 
rnFileSize )
 {
     OUString aRetFile;
 
-    while( aRetFile.isEmpty() && m_eState != END_REACHED )
+    while( aRetFile.isEmpty() && m_eState != IteratorState::EndReached )
     {
         switch( m_eState )
         {
-            case USER_EXTENSIONS:
+            case IteratorState::UserExtensions:
             {
                 Reference< deployment::XPackage > xParentPackageBundle;
                 Reference< deployment::XPackage > xHelpPackage = 
implGetNextUserHelpPackage( xParentPackageBundle );
@@ -1089,7 +1089,7 @@ OUString TreeFileIterator::nextTreeFile( sal_Int32& 
rnFileSize )
                 break;
             }
 
-            case SHARED_EXTENSIONS:
+            case IteratorState::SharedExtensions:
             {
                 Reference< deployment::XPackage > xParentPackageBundle;
                 Reference< deployment::XPackage > xHelpPackage = 
implGetNextSharedHelpPackage( xParentPackageBundle );
@@ -1099,7 +1099,7 @@ OUString TreeFileIterator::nextTreeFile( sal_Int32& 
rnFileSize )
                 aRetFile = implGetTreeFileFromPackage( rnFileSize, 
xHelpPackage );
                 break;
             }
-            case BUNDLED_EXTENSIONS:
+            case IteratorState::BundledExtensions:
             {
                 Reference< deployment::XPackage > xParentPackageBundle;
                 Reference< deployment::XPackage > xHelpPackage = 
implGetNextBundledHelpPackage( xParentPackageBundle );
@@ -1110,8 +1110,8 @@ OUString TreeFileIterator::nextTreeFile( sal_Int32& 
rnFileSize )
                 break;
             }
 
-        case END_REACHED:
-                OSL_FAIL( "DataBaseIterator::nextTreeFile(): Invalid case 
END_REACHED" );
+        case IteratorState::EndReached:
+                OSL_FAIL( "DataBaseIterator::nextTreeFile(): Invalid case 
IteratorState::EndReached" );
                 break;
         }
     }
commit 11b4a6ddce31f173f10b703eb63fde2c88c0bc70
Author: Noel Grandin <noelgran...@gmail.com>
Date:   Sun Jun 5 15:15:56 2016 +0200

    Convert DeactivePage return code to scoped enum
    
    Change-Id: Idd5372ad20fc6676864b31b3796f8b9bc0ad73dd
    Reviewed-on: https://gerrit.libreoffice.org/25918
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Noel Grandin <noelgran...@gmail.com>

diff --git a/chart2/source/controller/dialogs/tp_AxisPositions.cxx 
b/chart2/source/controller/dialogs/tp_AxisPositions.cxx
index b8de891..908fd49 100644
--- a/chart2/source/controller/dialogs/tp_AxisPositions.cxx
+++ b/chart2/source/controller/dialogs/tp_AxisPositions.cxx
@@ -276,12 +276,12 @@ void AxisPositionsTabPage::Reset(const SfxItemSet* 
rInAttrs)
     }
 }
 
-SfxTabPage::sfxpg AxisPositionsTabPage::DeactivatePage(SfxItemSet* pItemSet)
+DeactivateRC AxisPositionsTabPage::DeactivatePage(SfxItemSet* pItemSet)
 {
     if( pItemSet )
         FillItemSet( pItemSet );
 
-    return LEAVE_PAGE;
+    return DeactivateRC::LeavePage;
 }
 
 void AxisPositionsTabPage::SetNumFormatter( SvNumberFormatter* pFormatter )
diff --git a/chart2/source/controller/dialogs/tp_AxisPositions.hxx 
b/chart2/source/controller/dialogs/tp_AxisPositions.hxx
index dae55be..cfd4435b 100644
--- a/chart2/source/controller/dialogs/tp_AxisPositions.hxx
+++ b/chart2/source/controller/dialogs/tp_AxisPositions.hxx
@@ -40,7 +40,7 @@ public:
     virtual bool FillItemSet( SfxItemSet* rOutAttrs ) override;
     virtual void Reset( const SfxItemSet* rInAttrs ) override;
     using TabPage::DeactivatePage;
-    virtual sfxpg DeactivatePage( SfxItemSet* pItemSet = nullptr ) override;
+    virtual DeactivateRC DeactivatePage( SfxItemSet* pItemSet = nullptr ) 
override;
 
     void SetNumFormatter( SvNumberFormatter* pFormatter );
 
diff --git a/chart2/source/controller/dialogs/tp_Scale.cxx 
b/chart2/source/controller/dialogs/tp_Scale.cxx
index 1160f34..d53ba44 100644
--- a/chart2/source/controller/dialogs/tp_Scale.cxx
+++ b/chart2/source/controller/dialogs/tp_Scale.cxx
@@ -416,12 +416,12 @@ void ScaleTabPage::Reset(const SfxItemSet* rInAttrs)
     SetNumFormat();
 }
 
-SfxTabPage::sfxpg ScaleTabPage::DeactivatePage(SfxItemSet* pItemSet)
+DeactivateRC ScaleTabPage::DeactivatePage(SfxItemSet* pItemSet)
 {
     if( !pNumFormatter )
     {
         OSL_FAIL( "No NumberFormatter available" );
-        return LEAVE_PAGE;
+        return DeactivateRC::LeavePage;
     }
 
     bool bDateAxis = chart2::AxisType::DATE == m_nAxisType;
@@ -527,12 +527,12 @@ SfxTabPage::sfxpg 
ScaleTabPage::DeactivatePage(SfxItemSet* pItemSet)
     }
 
     if( ShowWarning( nErrStrId, pControl ) )
-        return KEEP_PAGE;
+        return DeactivateRC::KeepPage;
 
     if( pItemSet )
         FillItemSet( pItemSet );
 
-    return LEAVE_PAGE;
+    return DeactivateRC::LeavePage;
 }
 
 void ScaleTabPage::SetNumFormatter( SvNumberFormatter* pFormatter )
diff --git a/chart2/source/controller/dialogs/tp_Scale.hxx 
b/chart2/source/controller/dialogs/tp_Scale.hxx
index 0798240..0224bf4 100644
--- a/chart2/source/controller/dialogs/tp_Scale.hxx
+++ b/chart2/source/controller/dialogs/tp_Scale.hxx
@@ -40,7 +40,7 @@ public:
     virtual bool FillItemSet( SfxItemSet* rOutAttrs ) override;
     virtual void Reset( const SfxItemSet* rInAttrs ) override;
     using TabPage::DeactivatePage;
-    virtual sfxpg DeactivatePage( SfxItemSet* pItemSet = nullptr ) override;
+    virtual DeactivateRC DeactivatePage( SfxItemSet* pItemSet = nullptr ) 
override;
 
     void SetNumFormatter( SvNumberFormatter* pFormatter );
     void SetNumFormat();
diff --git a/cui/source/dialogs/hltpbase.cxx b/cui/source/dialogs/hltpbase.cxx
index 84f0c50..a16aec2 100644
--- a/cui/source/dialogs/hltpbase.cxx
+++ b/cui/source/dialogs/hltpbase.cxx
@@ -525,7 +525,7 @@ void SvxHyperlinkTabPageBase::ActivatePage( const 
SfxItemSet& rItemSet )
         ShowMarkWnd ();
 }
 
-int SvxHyperlinkTabPageBase::DeactivatePage( SfxItemSet* _pSet)
+DeactivateRC SvxHyperlinkTabPageBase::DeactivatePage( SfxItemSet* _pSet)
 {
     // hide mark-wnd
     SetMarkWndShouldOpen( IsMarkWndVisible () );
@@ -547,7 +547,7 @@ int SvxHyperlinkTabPageBase::DeactivatePage( SfxItemSet* 
_pSet)
         _pSet->Put( aItem );
     }
 
-    return LEAVE_PAGE;
+    return DeactivateRC::LeavePage;
 }
 
 bool SvxHyperlinkTabPageBase::ShouldOpenMarkWnd()
diff --git a/cui/source/dialogs/iconcdlg.cxx b/cui/source/dialogs/iconcdlg.cxx
index 666d825..5f13d48 100644
--- a/cui/source/dialogs/iconcdlg.cxx
+++ b/cui/source/dialogs/iconcdlg.cxx
@@ -75,9 +75,9 @@ void IconChoicePage::ActivatePage( const SfxItemSet& )
 }
 
 
-int IconChoicePage::DeactivatePage( SfxItemSet* )
+DeactivateRC IconChoicePage::DeactivatePage( SfxItemSet* )
 {
-    return LEAVE_PAGE;
+    return DeactivateRC::LeavePage;
 }
 
 bool IconChoicePage::QueryClose()
@@ -484,7 +484,7 @@ void IconChoiceDialog::DeActivatePageImpl ()
 {
     IconChoicePageData *pData = GetPageData ( mnCurrentPageId );
 
-    int nRet = IconChoicePage::LEAVE_PAGE;
+    DeactivateRC nRet = DeactivateRC::LeavePage;
 
     if ( pData )
     {
@@ -500,7 +500,7 @@ void IconChoiceDialog::DeActivatePageImpl ()
             if ( pPage->HasExchangeSupport() )
                 nRet = pPage->DeactivatePage( &aTmp );
 
-            if ( ( IconChoicePage::LEAVE_PAGE & nRet ) == 
IconChoicePage::LEAVE_PAGE &&
+            if ( ( DeactivateRC::LeavePage & nRet ) &&
                  aTmp.Count() )
             {
                 pExampleSet->Put( aTmp );
@@ -523,7 +523,7 @@ void IconChoiceDialog::DeActivatePageImpl ()
                 nRet = pPage->DeactivatePage( nullptr );
         }
 
-        if ( nRet & IconChoicePage::REFRESH_SET )
+        if ( nRet & DeactivateRC::RefreshSet )
         {
             RefreshInputSet();
             // flag all pages to be newly initialized
@@ -720,7 +720,7 @@ bool IconChoiceDialog::OK_Impl()
     bool bEnd = !pPage;
     if ( pPage )
     {
-        int nRet = IconChoicePage::LEAVE_PAGE;
+        DeactivateRC nRet = DeactivateRC::LeavePage;
         if ( pSet )
         {
             SfxItemSet aTmp( *pSet->GetPool(), pSet->GetRanges() );
@@ -728,7 +728,7 @@ bool IconChoiceDialog::OK_Impl()
             if ( pPage->HasExchangeSupport() )
                 nRet = pPage->DeactivatePage( &aTmp );
 
-            if ( ( IconChoicePage::LEAVE_PAGE & nRet ) == 
IconChoicePage::LEAVE_PAGE
+            if ( ( DeactivateRC::LeavePage & nRet )
                  && aTmp.Count() )
             {
                 pExampleSet->Put( aTmp );
@@ -737,7 +737,7 @@ bool IconChoiceDialog::OK_Impl()
         }
         else
             nRet = pPage->DeactivatePage( nullptr );
-        bEnd = nRet;
+        bEnd = nRet != DeactivateRC::KeepPage;
     }
 
     return bEnd;
diff --git a/cui/source/inc/align.hxx b/cui/source/inc/align.hxx
index 5bb412c..b138429 100644
--- a/cui/source/inc/align.hxx
+++ b/cui/source/inc/align.hxx
@@ -65,7 +65,7 @@ public:
 
     virtual bool        FillItemSet( SfxItemSet* rSet ) override;
     virtual void        Reset( const SfxItemSet* rSet ) override;
-    virtual sfxpg       DeactivatePage( SfxItemSet* pSet ) override;
+    virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
     virtual void        DataChanged( const DataChangedEvent& rDCEvt ) override;
 
 private:
diff --git a/cui/source/inc/autocdlg.hxx b/cui/source/inc/autocdlg.hxx
index 1d3fae0..6a7b367 100644
--- a/cui/source/inc/autocdlg.hxx
+++ b/cui/source/inc/autocdlg.hxx
@@ -283,7 +283,7 @@ public:
     virtual bool        FillItemSet( SfxItemSet* rSet ) override;
     virtual void        Reset( const SfxItemSet* rSet ) override;
     virtual void        ActivatePage( const SfxItemSet& ) override;
-    virtual sfxpg       DeactivatePage( SfxItemSet* pSet = nullptr ) override;
+    virtual DeactivateRC DeactivatePage( SfxItemSet* pSet = nullptr ) override;
 
     void    SetLanguage(LanguageType eSet);
     void    DeleteEntry(const OUString& sShort, const OUString& sLong);
@@ -343,7 +343,7 @@ public:
     virtual bool        FillItemSet( SfxItemSet* rSet ) override;
     virtual void        Reset( const SfxItemSet* rSet ) override;
     virtual void        ActivatePage( const SfxItemSet& ) override;
-    virtual sfxpg       DeactivatePage( SfxItemSet* pSet = nullptr ) override;
+    virtual DeactivateRC DeactivatePage( SfxItemSet* pSet = nullptr ) override;
     void                SetLanguage(LanguageType eSet);
 
 };
diff --git a/cui/source/inc/backgrnd.hxx b/cui/source/inc/backgrnd.hxx
index d961504..c6d7f7b 100644
--- a/cui/source/inc/backgrnd.hxx
+++ b/cui/source/inc/backgrnd.hxx
@@ -64,7 +64,7 @@ public:
 
     virtual void        PageCreated(const SfxAllItemSet& aSet) override;
 protected:
-    virtual sfxpg       DeactivatePage( SfxItemSet* pSet = nullptr ) override;
+    virtual DeactivateRC DeactivatePage( SfxItemSet* pSet = nullptr ) override;
 
 private:
     SvxBackgroundTabPage( vcl::Window* pParent, const SfxItemSet& rCoreSet );
diff --git a/cui/source/inc/border.hxx b/cui/source/inc/border.hxx
index e96ab2c..10e4a33 100644
--- a/cui/source/inc/border.hxx
+++ b/cui/source/inc/border.hxx
@@ -60,7 +60,7 @@ public:
     virtual void        PageCreated(const SfxAllItemSet& aSet) override;
     void                SetTableMode();
 protected:
-    virtual sfxpg        DeactivatePage( SfxItemSet* pSet = nullptr ) override;
+    virtual DeactivateRC DeactivatePage( SfxItemSet* pSet = nullptr ) override;
     virtual void        DataChanged( const DataChangedEvent& rDCEvt ) override;
 
 private:
diff --git a/cui/source/inc/chardlg.hxx b/cui/source/inc/chardlg.hxx
index bfa100c..07daa78 100644
--- a/cui/source/inc/chardlg.hxx
+++ b/cui/source/inc/chardlg.hxx
@@ -143,7 +143,7 @@ public:
     using SfxTabPage::DeactivatePage;
 
     virtual void        ActivatePage( const SfxItemSet& rSet ) override;
-    virtual sfxpg       DeactivatePage( SfxItemSet* pSet = nullptr ) override;
+    virtual DeactivateRC DeactivatePage( SfxItemSet* pSet = nullptr ) override;
 
 public:
                         virtual ~SvxCharNamePage();
@@ -230,7 +230,7 @@ public:
     virtual void dispose() override;
 
     using SfxTabPage::DeactivatePage;
-    virtual sfxpg       DeactivatePage( SfxItemSet* pSet = nullptr ) override;
+    virtual DeactivateRC DeactivatePage( SfxItemSet* pSet = nullptr ) override;
 
 public:
     static VclPtr<SfxTabPage>  Create( vcl::Window* pParent, const SfxItemSet* 
rSet );
@@ -310,7 +310,7 @@ public:
 
     using SfxTabPage::DeactivatePage;
 
-    virtual sfxpg       DeactivatePage( SfxItemSet* pSet = nullptr ) override;
+    virtual DeactivateRC DeactivatePage( SfxItemSet* pSet = nullptr ) override;
 
 public:
     static VclPtr<SfxTabPage>  Create( vcl::Window* pParent, const SfxItemSet* 
rSet );
@@ -358,7 +358,7 @@ public:
     using SfxTabPage::DeactivatePage;
 
     virtual void        ActivatePage( const SfxItemSet& rSet ) override;
-    virtual sfxpg       DeactivatePage( SfxItemSet* pSet = nullptr ) override;
+    virtual DeactivateRC DeactivatePage( SfxItemSet* pSet = nullptr ) override;
 
     static VclPtr<SfxTabPage>  Create( vcl::Window* pParent, const SfxItemSet* 
rSet );
     static const sal_uInt16*  GetRanges() { return pTwoLinesRanges; }
diff --git a/cui/source/inc/cuioptgenrl.hxx b/cui/source/inc/cuioptgenrl.hxx
index f7761c9..41c9c32 100644
--- a/cui/source/inc/cuioptgenrl.hxx
+++ b/cui/source/inc/cuioptgenrl.hxx
@@ -59,7 +59,7 @@ private:
     void SetLinks ();
 
 protected:
-    virtual sfxpg       DeactivatePage( SfxItemSet* pSet ) override;
+    virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
 
 public:
     SvxGeneralTabPage( vcl::Window* pParent, const SfxItemSet& rSet );
diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index 22e2651..adba0ba 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -168,7 +168,7 @@ public:
     virtual void Reset(const SfxItemSet*) override;
     virtual void ChangesApplied() override;
     virtual void ActivatePage(const SfxItemSet& rSet) override;
-    virtual sfxpg DeactivatePage(SfxItemSet* pSet) override;
+    virtual DeactivateRC DeactivatePage(SfxItemSet* pSet) override;
     virtual void PointChanged(vcl::Window* pWindow, RECT_POINT eRP) override;
 
     void SetPageType(sal_uInt16 nInType) { nPageType = nInType; }
@@ -290,7 +290,7 @@ public:
     virtual void Reset( const SfxItemSet * ) override;
     virtual void ChangesApplied() override;
     virtual void ActivatePage( const SfxItemSet& rSet ) override;
-    virtual sfxpg DeactivatePage( SfxItemSet* pSet ) override;
+    virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
     virtual void PointChanged( vcl::Window* pWindow, RECT_POINT eRP ) override;
 
     void    SetColorList( XColorListRef pColorList ) { m_pColorList = 
pColorList; }
@@ -358,7 +358,7 @@ public:
     virtual bool FillItemSet( SfxItemSet* ) override;
     virtual void Reset( const SfxItemSet * ) override;
     virtual void ActivatePage( const SfxItemSet& rSet ) override;
-    virtual sfxpg DeactivatePage( SfxItemSet* pSet ) override;
+    virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
     virtual void PointChanged( vcl::Window* pWindow, RECT_POINT eRP ) override;
 
     void    SetColorList( XColorListRef pColorList ) { m_pColorList = 
pColorList; }
@@ -441,7 +441,7 @@ public:
     virtual void Reset( const SfxItemSet * ) override;
 
     virtual void ActivatePage( const SfxItemSet& rSet ) override;
-    virtual sfxpg DeactivatePage( SfxItemSet* pSet ) override;
+    virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
 
     void    SetColorList( XColorListRef pColorList ) { m_pColorList = 
pColorList; }
     void    SetGradientList( XGradientListRef pGrdLst)
@@ -523,7 +523,7 @@ public:
     virtual void Reset( const SfxItemSet * ) override;
 
     virtual void ActivatePage( const SfxItemSet& rSet ) override;
-    virtual sfxpg DeactivatePage( SfxItemSet* pSet ) override;
+    virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
 
     virtual void PointChanged( vcl::Window* pWindow, RECT_POINT eRP ) override;
 
@@ -609,7 +609,7 @@ public:
     virtual void Reset( const SfxItemSet * ) override;
 
     virtual void ActivatePage( const SfxItemSet& rSet ) override;
-    virtual sfxpg DeactivatePage( SfxItemSet* pSet ) override;
+    virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
 
     virtual void PointChanged( vcl::Window* pWindow, RECT_POINT eRP ) override;
 
@@ -743,7 +743,7 @@ public:
     virtual void Reset( const SfxItemSet * ) override;
 
     virtual void ActivatePage( const SfxItemSet& rSet ) override;
-    virtual sfxpg DeactivatePage( SfxItemSet* pSet ) override;
+    virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
 
     void             SetPropertyList( XPropertyListType t, const 
XPropertyListRef &xRef );
 
diff --git a/cui/source/inc/cuitabline.hxx b/cui/source/inc/cuitabline.hxx
index d51780e..19d00eb 100644
--- a/cui/source/inc/cuitabline.hxx
+++ b/cui/source/inc/cuitabline.hxx
@@ -213,7 +213,7 @@ public:
     virtual void Reset( const SfxItemSet* ) override;
 
     virtual void ActivatePage( const SfxItemSet& rSet ) override;
-    virtual sfxpg DeactivatePage( SfxItemSet* pSet ) override;
+    virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
 
     virtual void PointChanged( vcl::Window* pWindow, RECT_POINT eRP ) override;
 
@@ -312,7 +312,7 @@ public:
     virtual void Reset( const SfxItemSet * ) override;
 
     virtual void ActivatePage( const SfxItemSet& rSet ) override;
-    virtual sfxpg DeactivatePage( SfxItemSet* pSet ) override;
+    virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
 
     void    SetDashList( XDashListRef pDshLst ) { pDashList = pDshLst; }
     void    SetObjSelected( bool bHasObj ) { bObjSelected = bHasObj; }
@@ -382,7 +382,7 @@ public:
     virtual void Reset( const SfxItemSet * ) override;
 
     virtual void ActivatePage( const SfxItemSet& rSet ) override;
-    virtual sfxpg DeactivatePage( SfxItemSet* pSet ) override;
+    virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
 
     void    SetLineEndList( XLineEndListRef pInList ) { pLineEndList = 
pInList; }
     void    SetPolyObj( const SdrObject* pObj ) { pPolyObj = pObj; }
diff --git a/cui/source/inc/grfpage.hxx b/cui/source/inc/grfpage.hxx
index d249711..9823237 100644
--- a/cui/source/inc/grfpage.hxx
+++ b/cui/source/inc/grfpage.hxx
@@ -114,7 +114,7 @@ public:
 
     virtual bool FillItemSet( SfxItemSet *rSet ) override;
     virtual void Reset( const SfxItemSet *rSet ) override;
-    virtual sfxpg DeactivatePage( SfxItemSet *pSet ) override;
+    virtual DeactivateRC DeactivatePage( SfxItemSet *pSet ) override;
 };
 
 
diff --git a/cui/source/inc/hltpbase.hxx b/cui/source/inc/hltpbase.hxx
index b3cc61b..942f97f 100644
--- a/cui/source/inc/hltpbase.hxx
+++ b/cui/source/inc/hltpbase.hxx
@@ -130,7 +130,7 @@ public:
     virtual void Reset( const SfxItemSet& ) override;
     virtual bool FillItemSet( SfxItemSet* ) override;
     virtual void ActivatePage( const SfxItemSet& rItemSet ) override;
-    virtual int  DeactivatePage( SfxItemSet* pSet = nullptr ) override;
+    virtual DeactivateRC DeactivatePage( SfxItemSet* pSet = nullptr ) override;
 
     bool IsMarkWndVisible ()      { return 
static_cast<vcl::Window*>(mpMarkWnd)->IsVisible(); }
     Size GetSizeExtraWnd ()       { return ( mpMarkWnd->GetSizePixel() ); }
diff --git a/cui/source/inc/iconcdlg.hxx b/cui/source/inc/iconcdlg.hxx
index dafd1ab..eb58bb2 100644
--- a/cui/source/inc/iconcdlg.hxx
+++ b/cui/source/inc/iconcdlg.hxx
@@ -29,6 +29,7 @@
 #include <vcl/button.hxx>
 #include <vcl/image.hxx>
 #include <vcl/layout.hxx>
+#include <sfx2/tabdlg.hxx>
 #include <vector>
 
 // forward-declarations
@@ -89,17 +90,8 @@ public:
     bool                HasExchangeSupport() const { return 
bHasExchangeSupport; }
     void                SetExchangeSupport()       { bHasExchangeSupport = 
true; }
 
-    enum {
-        KEEP_PAGE = 0x0000, ///< error handling
-        /** 2nd filling of an ItemSet for updating superior examples;
-            this pointer can always be NULL!! */
-        LEAVE_PAGE = 0x0001,
-        /// refresh set and update other pages
-        REFRESH_SET = 0x0002
-    };
-
     virtual void        ActivatePage( const SfxItemSet& );
-    virtual int         DeactivatePage( SfxItemSet* pSet );
+    virtual DeactivateRC DeactivatePage( SfxItemSet* pSet );
     const OUString&     GetUserData() { return aUserString; }
     virtual bool        QueryClose();
 
diff --git a/cui/source/inc/numfmt.hxx b/cui/source/inc/numfmt.hxx
index b94788e..95f5c7c 100644
--- a/cui/source/inc/numfmt.hxx
+++ b/cui/source/inc/numfmt.hxx
@@ -76,7 +76,7 @@ public:
 
     virtual bool            FillItemSet( SfxItemSet* rSet ) override;
     virtual void            Reset( const SfxItemSet* rSet ) override;
-    virtual sfxpg           DeactivatePage  ( SfxItemSet* pSet = nullptr ) 
override;
+    virtual DeactivateRC    DeactivatePage  ( SfxItemSet* pSet = nullptr ) 
override;
 
     void                    SetInfoItem( const SvxNumberInfoItem& rItem );
     void                    SetNumberFormatList( const SvxNumberInfoItem& 
rItem )
diff --git a/cui/source/inc/numpages.hxx b/cui/source/inc/numpages.hxx
index c5243bf..381345f 100644
--- a/cui/source/inc/numpages.hxx
+++ b/cui/source/inc/numpages.hxx
@@ -109,7 +109,7 @@ public:
                                 const SfxItemSet* rAttrSet);
 
     virtual void        ActivatePage(const SfxItemSet& rSet) override;
-    virtual sfxpg       DeactivatePage(SfxItemSet *pSet) override;
+    virtual DeactivateRC   DeactivatePage(SfxItemSet *pSet) override;
     virtual bool        FillItemSet( SfxItemSet* rSet ) override;
     virtual void        Reset( const SfxItemSet* rSet ) override;
 };
@@ -142,7 +142,7 @@ public:
                                 const SfxItemSet* rAttrSet);
 
     virtual void        ActivatePage(const SfxItemSet& rSet) override;
-    virtual sfxpg       DeactivatePage(SfxItemSet *pSet) override;
+    virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override;
     virtual bool        FillItemSet( SfxItemSet* rSet ) override;
     virtual void        Reset( const SfxItemSet* rSet ) override;
 
@@ -186,7 +186,7 @@ public:
                                 const SfxItemSet* rAttrSet);
 
     virtual void        ActivatePage(const SfxItemSet& rSet) override;
-    virtual sfxpg       DeactivatePage(SfxItemSet *pSet) override;
+    virtual DeactivateRC   DeactivatePage(SfxItemSet *pSet) override;
     virtual bool        FillItemSet( SfxItemSet* rSet ) override;
     virtual void        Reset( const SfxItemSet* rSet ) override;
 
@@ -233,7 +233,7 @@ public:
                                 const SfxItemSet* rAttrSet);
 
     virtual void        ActivatePage(const SfxItemSet& rSet) override;
-    virtual sfxpg       DeactivatePage(SfxItemSet *pSet) override;
+    virtual DeactivateRC   DeactivatePage(SfxItemSet *pSet) override;
     virtual bool        FillItemSet( SfxItemSet* rSet ) override;
     virtual void        Reset( const SfxItemSet* rSet ) override;
 };
@@ -344,7 +344,7 @@ public:
                                 const SfxItemSet* rAttrSet);
 
     virtual void        ActivatePage(const SfxItemSet& rSet) override;
-    virtual sfxpg       DeactivatePage(SfxItemSet *pSet) override;
+    virtual DeactivateRC   DeactivatePage(SfxItemSet *pSet) override;
     virtual bool        FillItemSet( SfxItemSet* rSet ) override;
     virtual void        Reset( const SfxItemSet* rSet ) override;
 
@@ -449,7 +449,7 @@ public:
     virtual void dispose() override;
 
     virtual void        ActivatePage(const SfxItemSet& rSet) override;
-    virtual sfxpg       DeactivatePage(SfxItemSet *pSet) override;
+    virtual DeactivateRC   DeactivatePage(SfxItemSet *pSet) override;
     virtual bool        FillItemSet( SfxItemSet* rSet ) override;
     virtual void        Reset( const SfxItemSet* rSet ) override;
 
diff --git a/cui/source/inc/page.hxx b/cui/source/inc/page.hxx
index 67cd991..abb31ee 100644
--- a/cui/source/inc/page.hxx
+++ b/cui/source/inc/page.hxx
@@ -187,7 +187,7 @@ private:
 
 protected:
     virtual void        ActivatePage( const SfxItemSet& rSet ) override;
-    virtual sfxpg       DeactivatePage( SfxItemSet* pSet = nullptr ) override;
+    virtual DeactivateRC   DeactivatePage( SfxItemSet* pSet = nullptr ) 
override;
 
 public:
     static VclPtr<SfxTabPage>  Create( vcl::Window* pParent, const SfxItemSet* 
rSet );
diff --git a/cui/source/inc/paragrph.hxx b/cui/source/inc/paragrph.hxx
index 6397f82..a0e7dd8 100644
--- a/cui/source/inc/paragrph.hxx
+++ b/cui/source/inc/paragrph.hxx
@@ -95,7 +95,7 @@ private:
     DECL_LINK_TYPED( AutoHdl_Impl, Button*, void );
 
 protected:
-    virtual sfxpg           DeactivatePage( SfxItemSet* pSet = nullptr ) 
override;
+    virtual DeactivateRC    DeactivatePage( SfxItemSet* pSet = nullptr ) 
override;
 
 
 public:
@@ -162,7 +162,7 @@ class SvxParaAlignTabPage : public SfxTabPage
                             SvxParaAlignTabPage( vcl::Window* pParent, const 
SfxItemSet& rSet );
 
 protected:
-    virtual sfxpg           DeactivatePage( SfxItemSet* pSet = nullptr ) 
override;
+    virtual DeactivateRC    DeactivatePage( SfxItemSet* pSet = nullptr ) 
override;
 
 public:
     virtual ~SvxParaAlignTabPage();
@@ -214,7 +214,7 @@ public:
     void                DisablePageBreak();
 
 protected:
-    virtual sfxpg       DeactivatePage( SfxItemSet* pSet = nullptr ) override;
+    virtual DeactivateRC DeactivatePage( SfxItemSet* pSet = nullptr ) override;
 
 private:
                         SvxExtParagraphTabPage( vcl::Window* pParent, const 
SfxItemSet& rSet );
diff --git a/cui/source/inc/swpossizetabpage.hxx 
b/cui/source/inc/swpossizetabpage.hxx
index d76725a..611ebc0 100644
--- a/cui/source/inc/swpossizetabpage.hxx
+++ b/cui/source/inc/swpossizetabpage.hxx
@@ -134,7 +134,7 @@ public:
     virtual bool FillItemSet( SfxItemSet* ) override;
     virtual void Reset( const SfxItemSet * ) override;
 
-    virtual sfxpg DeactivatePage( SfxItemSet* pSet ) override;
+    virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
 
     void    EnableAnchorTypes(sal_uInt16 nAnchorEnable);
 
diff --git a/cui/source/inc/tabstpge.hxx b/cui/source/inc/tabstpge.hxx
index ed39b6e..691533d 100644
--- a/cui/source/inc/tabstpge.hxx
+++ b/cui/source/inc/tabstpge.hxx
@@ -61,7 +61,7 @@ public:
     void                DisableControls( const TabulatorDisableFlags nFlag );
 
 protected:
-    virtual sfxpg       DeactivatePage( SfxItemSet* pSet = nullptr ) override;
+    virtual DeactivateRC   DeactivatePage( SfxItemSet* pSet = nullptr ) 
override;
 
 private:
     SvxTabulatorTabPage( vcl::Window* pParent, const SfxItemSet& rSet );
diff --git a/cui/source/inc/transfrm.hxx b/cui/source/inc/transfrm.hxx
index f56ee4e..b2e5157 100644
--- a/cui/source/inc/transfrm.hxx
+++ b/cui/source/inc/transfrm.hxx
@@ -154,7 +154,7 @@ public:
     virtual void Reset( const SfxItemSet * ) override;
 
     virtual void ActivatePage( const SfxItemSet& rSet ) override;
-    virtual sfxpg DeactivatePage( SfxItemSet* pSet ) override;
+    virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
 
     virtual void PointChanged( vcl::Window* pWindow, RECT_POINT eRP ) override;
 
@@ -212,7 +212,7 @@ public:
     virtual void Reset( const SfxItemSet * ) override;
 
     virtual void ActivatePage( const SfxItemSet& rSet ) override;
-    virtual sfxpg DeactivatePage( SfxItemSet* pSet ) override;
+    virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
 
     virtual void PointChanged( vcl::Window* pWindow, RECT_POINT eRP ) override;
 
@@ -265,7 +265,7 @@ public:
     virtual void Reset( const SfxItemSet * ) override;
 
     virtual void ActivatePage( const SfxItemSet& rSet ) override;
-    virtual sfxpg DeactivatePage( SfxItemSet* pSet ) override;
+    virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
 
     virtual void PointChanged( vcl::Window* pWindow, RECT_POINT eRP ) override;
 
diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx
index 3085f6c..8abba4e 100644
--- a/cui/source/options/optcolor.cxx
+++ b/cui/source/options/optcolor.cxx
@@ -1158,11 +1158,11 @@ void SvxColorOptionsTabPage::Reset( const SfxItemSet* )
     UpdateColorConfig();
 }
 
-SfxTabPage::sfxpg SvxColorOptionsTabPage::DeactivatePage( SfxItemSet* pSet_ )
+DeactivateRC SvxColorOptionsTabPage::DeactivatePage( SfxItemSet* pSet_ )
 {
     if ( pSet_ )
         FillItemSet( pSet_ );
-    return LEAVE_PAGE;
+    return DeactivateRC::LeavePage;
 }
 
 void SvxColorOptionsTabPage::UpdateColorConfig()
diff --git a/cui/source/options/optcolor.hxx b/cui/source/options/optcolor.hxx
index f66eab3..0963c14 100644
--- a/cui/source/options/optcolor.hxx
+++ b/cui/source/options/optcolor.hxx
@@ -56,7 +56,7 @@ public:
     virtual bool        FillItemSet( SfxItemSet* rSet ) override;
     virtual void        Reset( const SfxItemSet* rSet ) override;
 
-    virtual sfxpg       DeactivatePage( SfxItemSet* pSet ) override;
+    virtual DeactivateRC   DeactivatePage( SfxItemSet* pSet ) override;
     virtual void        FillUserData() override;
 
 };
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index b05ca35..c8b07af 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -189,11 +189,11 @@ void OpenGLCfg::setForceOpenGL(bool bOpenGL)
 
 // class OfaMiscTabPage --------------------------------------------------
 
-SvxGeneralTabPage::sfxpg OfaMiscTabPage::DeactivatePage( SfxItemSet* pSet_ )
+DeactivateRC OfaMiscTabPage::DeactivatePage( SfxItemSet* pSet_ )
 {
     if ( pSet_ )
         FillItemSet( pSet_ );
-    return LEAVE_PAGE;
+    return DeactivateRC::LeavePage;
 }
 
 namespace
diff --git a/cui/source/options/optgdlg.hxx b/cui/source/options/optgdlg.hxx
index e3274d1..e6d99e6 100644
--- a/cui/source/options/optgdlg.hxx
+++ b/cui/source/options/optgdlg.hxx
@@ -61,7 +61,7 @@ private:
     DECL_LINK_TYPED( TwoFigureConfigHdl, SpinField&, void );
     DECL_LINK_TYPED( TwoFigureConfigFocusHdl, Control&, void );
 protected:
-    virtual sfxpg       DeactivatePage( SfxItemSet* pSet = nullptr ) override;
+    virtual DeactivateRC   DeactivatePage( SfxItemSet* pSet = nullptr ) 
override;
 
 public:
     OfaMiscTabPage( vcl::Window* pParent, const SfxItemSet& rSet );
diff --git a/cui/source/options/optgenrl.cxx b/cui/source/options/optgenrl.cxx
index c2630b2..c6c59f7 100644
--- a/cui/source/options/optgenrl.cxx
+++ b/cui/source/options/optgenrl.cxx
@@ -416,11 +416,11 @@ void SvxGeneralTabPage::SetAddress_Impl()
 }
 
 
-SvxGeneralTabPage::sfxpg SvxGeneralTabPage::DeactivatePage( SfxItemSet* pSet_ )
+DeactivateRC SvxGeneralTabPage::DeactivatePage( SfxItemSet* pSet_ )
 {
     if ( pSet_ )
         FillItemSet( pSet_ );
-    return LEAVE_PAGE;
+    return DeactivateRC::LeavePage;
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx
index 2b9d744..b52418d 100644
--- a/cui/source/options/optinet2.cxx
+++ b/cui/source/options/optinet2.cxx
@@ -867,11 +867,11 @@ void SvxSecurityTabPage::ActivatePage( const SfxItemSet& )
 {
 }
 
-SfxTabPage::sfxpg SvxSecurityTabPage::DeactivatePage( SfxItemSet* _pSet )
+DeactivateRC SvxSecurityTabPage::DeactivatePage( SfxItemSet* _pSet )
 {
     if( _pSet )
         FillItemSet( _pSet );
-    return LEAVE_PAGE;
+    return DeactivateRC::LeavePage;
 }
 
 namespace
diff --git a/cui/source/options/optinet2.hxx b/cui/source/options/optinet2.hxx
index 8f0e747..90a4eb5 100644
--- a/cui/source/options/optinet2.hxx
+++ b/cui/source/options/optinet2.hxx
@@ -150,7 +150,7 @@ private:
 
 protected:
     virtual void        ActivatePage( const SfxItemSet& rSet ) override;
-    virtual sfxpg       DeactivatePage( SfxItemSet* pSet = nullptr ) override;
+    virtual DeactivateRC   DeactivatePage( SfxItemSet* pSet = nullptr ) 
override;
 
 public:
     static VclPtr<SfxTabPage>  Create( vcl::Window* pParent, const SfxItemSet* 
rAttrSet );
diff --git a/cui/source/options/optmemory.cxx b/cui/source/options/optmemory.cxx
index 0ca6699..2f8e2fc 100644
--- a/cui/source/options/optmemory.cxx
+++ b/cui/source/options/optmemory.cxx
@@ -102,11 +102,11 @@ inline void 
OfaMemoryOptionsPage::SetNfGraphicObjectCacheLast( long nSizeInBytes
     m_pNfGraphicObjectCache->SetLast( long( double( nSizeInBytes ) * BYTES2NF 
) );
 }
 
-SfxTabPage::sfxpg OfaMemoryOptionsPage::DeactivatePage( SfxItemSet* _pSet )
+DeactivateRC OfaMemoryOptionsPage::DeactivatePage( SfxItemSet* _pSet )
 {
     if ( _pSet )
         FillItemSet( _pSet );
-    return LEAVE_PAGE;
+    return DeactivateRC::LeavePage;
 }
 
 
diff --git a/cui/source/options/optmemory.hxx b/cui/source/options/optmemory.hxx
index 6415718..07031cb 100644
--- a/cui/source/options/optmemory.hxx
+++ b/cui/source/options/optmemory.hxx
@@ -52,7 +52,7 @@ private:
     inline void         SetNfGraphicObjectCacheMax( long nSizeInBytes );
     inline void         SetNfGraphicObjectCacheLast( long nSizeInBytes );
 protected:
-    virtual sfxpg       DeactivatePage( SfxItemSet* pSet = nullptr ) override;
+    virtual DeactivateRC   DeactivatePage( SfxItemSet* pSet = nullptr ) 
override;
 
 public:
     OfaMemoryOptionsPage( vcl::Window* pParent, const SfxItemSet& rSet );
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index fc03332..ecdb269 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -685,8 +685,8 @@ IMPL_LINK_NOARG_TYPED(OfaTreeOptionsDialog, OKHdl_Impl, 
Button*, void)
             if ( RID_SVXPAGE_COLOR != pPageInfo->m_nPageId
                 && pPageInfo->m_pPage->HasExchangeSupport() )
             {
-                int nLeave = 
pPageInfo->m_pPage->DeactivatePage(pGroupInfo->m_pOutItemSet);
-                if ( nLeave == SfxTabPage::KEEP_PAGE )
+                DeactivateRC nLeave = 
pPageInfo->m_pPage->DeactivatePage(pGroupInfo->m_pOutItemSet);
+                if ( nLeave == DeactivateRC::KeepPage )
                 {
                     // the page mustn't be left
                     pTreeLB->Select(pCurrentPageEntry);
@@ -951,11 +951,11 @@ void OfaTreeOptionsDialog::SelectHdl_Impl()
     {
         pOldPage = pOptPageInfo->m_pPage;
         OptionsGroupInfo* pGroupInfo = 
static_cast<OptionsGroupInfo*>(pTreeLB->GetParent(pCurrentPageEntry)->GetUserData());
-        int nLeave = SfxTabPage::LEAVE_PAGE;
+        DeactivateRC nLeave = DeactivateRC::LeavePage;
         if ( RID_SVXPAGE_COLOR != pOptPageInfo->m_nPageId && 
pOptPageInfo->m_pPage->HasExchangeSupport() )
            nLeave = pOptPageInfo->m_pPage->DeactivatePage( 
pGroupInfo->m_pOutItemSet );
 
-        if ( nLeave == SfxTabPage::KEEP_PAGE )
+        if ( nLeave == DeactivateRC::KeepPage )
         {
             // we cannot leave this page
             pBox->Select( pCurrentPageEntry );
diff --git a/cui/source/tabpages/align.cxx b/cui/source/tabpages/align.cxx
index 8b0e351..71eae6f 100644
--- a/cui/source/tabpages/align.cxx
+++ b/cui/source/tabpages/align.cxx
@@ -316,11 +316,11 @@ void AlignmentTabPage::Reset( const SfxItemSet* 
rCoreAttrs )
     UpdateEnableControls();
 }
 
-SfxTabPage::sfxpg AlignmentTabPage::DeactivatePage( SfxItemSet* _pSet )
+DeactivateRC AlignmentTabPage::DeactivatePage( SfxItemSet* _pSet )
 {
     if( _pSet )
         FillItemSet( _pSet );
-    return LEAVE_PAGE;
+    return DeactivateRC::LeavePage;
 }
 
 void AlignmentTabPage::DataChanged( const DataChangedEvent& rDCEvt )
diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index 2922a9c..9862579 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -945,9 +945,9 @@ void OfaAutocorrReplacePage::ActivatePage( const 
SfxItemSet& )
     static_cast<OfaAutoCorrDlg*>(GetTabDialog())->EnableLanguage(true);
 }
 
-SfxTabPage::sfxpg OfaAutocorrReplacePage::DeactivatePage( SfxItemSet*  )
+DeactivateRC OfaAutocorrReplacePage::DeactivatePage( SfxItemSet*  )
 {
-    return LEAVE_PAGE;
+    return DeactivateRC::LeavePage;
 }
 
 bool OfaAutocorrReplacePage::FillItemSet( SfxItemSet* )
@@ -1464,9 +1464,9 @@ void    OfaAutocorrExceptPage::ActivatePage( const 
SfxItemSet& )
     static_cast<OfaAutoCorrDlg*>(GetTabDialog())->EnableLanguage(true);
 }
 
-SfxTabPage::sfxpg OfaAutocorrExceptPage::DeactivatePage( SfxItemSet* )
+DeactivateRC OfaAutocorrExceptPage::DeactivatePage( SfxItemSet* )
 {
-    return LEAVE_PAGE;
+    return DeactivateRC::LeavePage;
 }
 
 bool OfaAutocorrExceptPage::FillItemSet( SfxItemSet*  )
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx
index aa9c595..e9d69c1 100644
--- a/cui/source/tabpages/backgrnd.cxx
+++ b/cui/source/tabpages/backgrnd.cxx
@@ -919,15 +919,15 @@ bool SvxBackgroundTabPage::FillItemSetWithWallpaperItem( 
SfxItemSet& rCoreSet, s
 }
 
 /** virtual method; is called on deactivation */
-SfxTabPage::sfxpg SvxBackgroundTabPage::DeactivatePage( SfxItemSet* _pSet )
+DeactivateRC SvxBackgroundTabPage::DeactivatePage( SfxItemSet* _pSet )
 {
     if ( pPageImpl->bIsImportDlgInExecute )
-        return KEEP_PAGE;
+        return DeactivateRC::KeepPage;
 
     if ( _pSet )
         FillItemSet( _pSet );
 
-    return LEAVE_PAGE;
+    return DeactivateRC::LeavePage;
 }
 
 void SvxBackgroundTabPage::PointChanged( vcl::Window* , RECT_POINT  )
diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx
index 5ea3bdc..3c7c479 100644
--- a/cui/source/tabpages/border.cxx
+++ b/cui/source/tabpages/border.cxx
@@ -632,12 +632,12 @@ void SvxBorderTabPage::ChangesApplied()
 }
 
 
-SfxTabPage::sfxpg SvxBorderTabPage::DeactivatePage( SfxItemSet* _pSet )
+DeactivateRC SvxBorderTabPage::DeactivatePage( SfxItemSet* _pSet )
 {
     if ( _pSet )
         FillItemSet( _pSet );
 
-    return LEAVE_PAGE;
+    return DeactivateRC::LeavePage;
 }
 
 
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index d8cacd5..1fcff97 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -1202,11 +1202,11 @@ void SvxCharNamePage::ActivatePage( const SfxItemSet& 
rSet )
 }
 
 
-SfxTabPage::sfxpg SvxCharNamePage::DeactivatePage( SfxItemSet* _pSet )
+DeactivateRC SvxCharNamePage::DeactivatePage( SfxItemSet* _pSet )
 {
     if ( _pSet )
         FillItemSet( _pSet );
-    return LEAVE_PAGE;
+    return DeactivateRC::LeavePage;
 }
 
 
@@ -1767,11 +1767,11 @@ IMPL_LINK_TYPED( SvxCharEffectsPage, 
ColorBoxSelectHdl_Impl, ListBox&, rListBox,
 }
 
 
-SfxTabPage::sfxpg SvxCharEffectsPage::DeactivatePage( SfxItemSet* _pSet )
+DeactivateRC SvxCharEffectsPage::DeactivatePage( SfxItemSet* _pSet )
 {
     if ( _pSet )
         FillItemSet( _pSet );
-    return LEAVE_PAGE;
+    return DeactivateRC::LeavePage;
 }
 
 
@@ -2865,11 +2865,11 @@ IMPL_LINK_NOARG_TYPED(SvxCharPositionPage, 
ScaleWidthModifyHdl_Impl, Edit&, void
     m_pPreviewWin->SetFontWidthScale( sal_uInt16( m_pScaleWidthMF->GetValue() 
) );
 }
 
-SfxTabPage::sfxpg SvxCharPositionPage::DeactivatePage( SfxItemSet* _pSet )
+DeactivateRC SvxCharPositionPage::DeactivatePage( SfxItemSet* _pSet )
 {
     if ( _pSet )
         FillItemSet( _pSet );
-    return LEAVE_PAGE;
+    return DeactivateRC::LeavePage;
 }
 
 
@@ -3402,11 +3402,11 @@ void SvxCharTwoLinesPage::ActivatePage( const 
SfxItemSet& rSet )
 }
 
 
-SfxTabPage::sfxpg SvxCharTwoLinesPage::DeactivatePage( SfxItemSet* _pSet )
+DeactivateRC SvxCharTwoLinesPage::DeactivatePage( SfxItemSet* _pSet )
 {
     if ( _pSet )
         FillItemSet( _pSet );
-    return LEAVE_PAGE;
+    return DeactivateRC::LeavePage;
 }
 
 
diff --git a/cui/source/tabpages/grfpage.cxx b/cui/source/tabpages/grfpage.cxx
index e7cd0de..4161199 100644
--- a/cui/source/tabpages/grfpage.cxx
+++ b/cui/source/tabpages/grfpage.cxx
@@ -403,11 +403,11 @@ void SvxGrfCropPage::ActivatePage(const SfxItemSet& rSet)
     CalcZoom();
 }
 
-SfxTabPage::sfxpg SvxGrfCropPage::DeactivatePage(SfxItemSet *_pSet)
+DeactivateRC SvxGrfCropPage::DeactivatePage(SfxItemSet *_pSet)
 {
     if ( _pSet )
         FillItemSet( _pSet );
-    return LEAVE_PAGE;
+    return DeactivateRC::LeavePage;
 }
 
 /*--------------------------------------------------------------------
diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx
index f4aaa90..21d8afe 100644
--- a/cui/source/tabpages/numfmt.cxx
+++ b/cui/source/tabpages/numfmt.cxx
@@ -815,11 +815,11 @@ bool SvxNumberFormatTabPage::FillItemSet( SfxItemSet* 
rCoreAttrs )
 }
 
 
-SfxTabPage::sfxpg SvxNumberFormatTabPage::DeactivatePage( SfxItemSet* _pSet )
+DeactivateRC SvxNumberFormatTabPage::DeactivatePage( SfxItemSet* _pSet )
 {
     if ( _pSet )
         FillItemSet( _pSet );
-    return LEAVE_PAGE;
+    return DeactivateRC::LeavePage;
 }
 
 void SvxNumberFormatTabPage::SetInfoItem( const SvxNumberInfoItem& rItem )
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index d4a7ad4..2463ef3 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -292,11 +292,11 @@ void  SvxSingleNumPickTabPage::ActivatePage(const 
SfxItemSet& rSet)
     bModified = false;
 }
 
-SfxTabPage::sfxpg SvxSingleNumPickTabPage::DeactivatePage(SfxItemSet *_pSet)
+DeactivateRC SvxSingleNumPickTabPage::DeactivatePage(SfxItemSet *_pSet)
 {
     if(_pSet)
         FillItemSet(_pSet);
-    return LEAVE_PAGE;
+    return DeactivateRC::LeavePage;
 }
 
 void  SvxSingleNumPickTabPage::Reset( const SfxItemSet* rSet )
@@ -456,11 +456,11 @@ void  SvxBulletPickTabPage::ActivatePage(const 
SfxItemSet& rSet)
     bModified = false;
 }
 
-SfxTabPage::sfxpg SvxBulletPickTabPage::DeactivatePage(SfxItemSet *_pSet)
+DeactivateRC SvxBulletPickTabPage::DeactivatePage(SfxItemSet *_pSet)
 {
     if(_pSet)
         FillItemSet(_pSet);
-    return LEAVE_PAGE;
+    return DeactivateRC::LeavePage;
 }
 
 void  SvxBulletPickTabPage::Reset( const SfxItemSet* rSet )
@@ -658,11 +658,11 @@ void  SvxNumPickTabPage::ActivatePage(const SfxItemSet& 
rSet)
     bModified = false;
 }
 
-SfxTabPage::sfxpg SvxNumPickTabPage::DeactivatePage(SfxItemSet *_pSet)
+DeactivateRC SvxNumPickTabPage::DeactivatePage(SfxItemSet *_pSet)
 {
     if(_pSet)
         FillItemSet(_pSet);
-    return LEAVE_PAGE;
+    return DeactivateRC::LeavePage;
 }
 
 void  SvxNumPickTabPage::Reset( const SfxItemSet* rSet )
@@ -900,11 +900,11 @@ void  SvxBitmapPickTabPage::ActivatePage(const 
SfxItemSet& rSet)
     bModified = false;
 }
 
-SfxTabPage::sfxpg SvxBitmapPickTabPage::DeactivatePage(SfxItemSet *_pSet)
+DeactivateRC SvxBitmapPickTabPage::DeactivatePage(SfxItemSet *_pSet)
 {
     if(_pSet)
         FillItemSet(_pSet);
-    return LEAVE_PAGE;
+    return DeactivateRC::LeavePage;
 }
 
 bool  SvxBitmapPickTabPage::FillItemSet( SfxItemSet* rSet )
@@ -1362,11 +1362,11 @@ void    SvxNumOptionsTabPage::ActivatePage(const 
SfxItemSet& rSet)
 
 }
 
-SfxTabPage::sfxpg SvxNumOptionsTabPage::DeactivatePage(SfxItemSet * _pSet)
+DeactivateRC SvxNumOptionsTabPage::DeactivatePage(SfxItemSet * _pSet)
 {
     if(_pSet)
         FillItemSet(_pSet);
-    return LEAVE_PAGE;
+    return DeactivateRC::LeavePage;
 }
 
 bool    SvxNumOptionsTabPage::FillItemSet( SfxItemSet* rSet )
@@ -3134,7 +3134,7 @@ void SvxNumPositionTabPage::ActivatePage(const 
SfxItemSet& rSet)
     m_pPreviewWIN->Invalidate();
 }
 
-SfxTabPage::sfxpg SvxNumPositionTabPage::DeactivatePage(SfxItemSet *_pSet)
+DeactivateRC SvxNumPositionTabPage::DeactivatePage(SfxItemSet *_pSet)
 {
     if(_pSet)
     {
@@ -3143,7 +3143,7 @@ SfxTabPage::sfxpg 
SvxNumPositionTabPage::DeactivatePage(SfxItemSet *_pSet)
         DistanceHdl_Impl(*m_pIndentMF);
         FillItemSet(_pSet);
     }
-    return LEAVE_PAGE;
+    return DeactivateRC::LeavePage;
 }
 
 bool SvxNumPositionTabPage::FillItemSet( SfxItemSet* rSet )
diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx
index 9391687..da66d7c 100644
--- a/cui/source/tabpages/page.cxx
+++ b/cui/source/tabpages/page.cxx
@@ -1423,7 +1423,7 @@ void SvxPageDescPage::ActivatePage( const SfxItemSet& 
rSet )
 }
 
 
-SfxTabPage::sfxpg SvxPageDescPage::DeactivatePage( SfxItemSet* _pSet )
+DeactivateRC SvxPageDescPage::DeactivatePage( SfxItemSet* _pSet )
 {
     // Inquiry whether the page margins are beyond the printing area.
     // If not, ask user whether they shall be taken.
@@ -1449,7 +1449,7 @@ SfxTabPage::sfxpg SvxPageDescPage::DeactivatePage( 
SfxItemSet* _pSet )
             if ( pField )
                 pField->GrabFocus();
             UpdateExample_Impl();
-            return KEEP_PAGE;
+            return DeactivateRC::KeepPage;
         }
         else
             CheckMarginEdits( false );
@@ -1471,7 +1471,7 @@ SfxTabPage::sfxpg SvxPageDescPage::DeactivatePage( 
SfxItemSet* _pSet )
             _pSet->Put( SvxSizeItem( nWh, aSize ) );
     }
 
-    return LEAVE_PAGE;
+    return DeactivateRC::LeavePage;
 }
 
 
diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx
index 295a39a..33bda89 100644
--- a/cui/source/tabpages/paragrph.cxx
+++ b/cui/source/tabpages/paragrph.cxx
@@ -611,13 +611,13 @@ void SvxStdParagraphTabPage::EnableRelativeMode()
     bRelativeMode = true;
 }
 
-SfxTabPage::sfxpg SvxStdParagraphTabPage::DeactivatePage( SfxItemSet* _pSet )
+DeactivateRC SvxStdParagraphTabPage::DeactivatePage( SfxItemSet* _pSet )
 {
     ELRLoseFocusHdl( *m_pFLineIndent );
 
     if ( _pSet )
         FillItemSet( _pSet );
-    return LEAVE_PAGE;
+    return DeactivateRC::LeavePage;
 }
 
 SvxStdParagraphTabPage::SvxStdParagraphTabPage( vcl::Window* pParent,  const 
SfxItemSet& rAttr ) :
@@ -1067,11 +1067,11 @@ void SvxParaAlignTabPage::dispose()
     SfxTabPage::dispose();
 }
 
-SfxTabPage::sfxpg SvxParaAlignTabPage::DeactivatePage( SfxItemSet* _pSet )
+DeactivateRC SvxParaAlignTabPage::DeactivatePage( SfxItemSet* _pSet )
 {
     if ( _pSet )
         FillItemSet( _pSet );
-    return LEAVE_PAGE;
+    return DeactivateRC::LeavePage;
 }
 
 VclPtr<SfxTabPage> SvxParaAlignTabPage::Create( vcl::Window* pParent, const 
SfxItemSet* rSet )
@@ -1844,11 +1844,11 @@ void SvxExtParagraphTabPage::ChangesApplied()
     m_pWidowRowNo->SetValue(m_pWidowRowNo->GetValue());
 }
 
-SfxTabPage::sfxpg SvxExtParagraphTabPage::DeactivatePage( SfxItemSet* _pSet )
+DeactivateRC SvxExtParagraphTabPage::DeactivatePage( SfxItemSet* _pSet )
 {
     if ( _pSet )
         FillItemSet( _pSet );
-    return LEAVE_PAGE;
+    return DeactivateRC::LeavePage;
 }
 
 void SvxExtParagraphTabPage::DisablePageBreak()
diff --git a/cui/source/tabpages/swpossizetabpage.cxx 
b/cui/source/tabpages/swpossizetabpage.cxx
index 08cab46..6fcd7cc 100644
--- a/cui/source/tabpages/swpossizetabpage.cxx
+++ b/cui/source/tabpages/swpossizetabpage.cxx
@@ -1089,11 +1089,11 @@ void SvxSwPosSizeTabPage::Reset( const SfxItemSet* rSet)
     }
 }
 
-SfxTabPage::sfxpg SvxSwPosSizeTabPage::DeactivatePage( SfxItemSet* _pSet )
+DeactivateRC SvxSwPosSizeTabPage::DeactivatePage( SfxItemSet* _pSet )
 {
     if( _pSet )
         FillItemSet( _pSet );
-    return LEAVE_PAGE;
+    return DeactivateRC::LeavePage;
 }
 
 void SvxSwPosSizeTabPage::EnableAnchorTypes(sal_uInt16 nAnchorEnable)
diff --git a/cui/source/tabpages/tabstpge.cxx b/cui/source/tabpages/tabstpge.cxx
index 8de91ed..a560129 100644
--- a/cui/source/tabpages/tabstpge.cxx
+++ b/cui/source/tabpages/tabstpge.cxx
@@ -356,11 +356,11 @@ void SvxTabulatorTabPage::DisableControls(const 
TabulatorDisableFlags nFlag)
         m_pFillFrame->Disable();
 }
 
-SfxTabPage::sfxpg SvxTabulatorTabPage::DeactivatePage( SfxItemSet* _pSet )
+DeactivateRC SvxTabulatorTabPage::DeactivatePage( SfxItemSet* _pSet )
 {
     if ( _pSet )
         FillItemSet( _pSet );
-    return LEAVE_PAGE;
+    return DeactivateRC::LeavePage;
 }
 
 void SvxTabulatorTabPage::InitTabPos_Impl( sal_uInt16 nTabPos )
diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx
index df35ae0..87155bc 100644
--- a/cui/source/tabpages/tparea.cxx
+++ b/cui/source/tabpages/tparea.cxx
@@ -419,7 +419,7 @@ void SvxAreaTabPage::ActivatePage( const SfxItemSet& rSet )
 }
 
 
-SfxTabPage::sfxpg SvxAreaTabPage::DeactivatePage( SfxItemSet* _pSet )
+DeactivateRC SvxAreaTabPage::DeactivatePage( SfxItemSet* _pSet )
 {
     if( m_nDlgType == 0 ) // area dialog
     {
@@ -466,7 +466,7 @@ SfxTabPage::sfxpg SvxAreaTabPage::DeactivatePage( 
SfxItemSet* _pSet )
     if( _pSet )
         FillItemSet( _pSet );
 
-    return LEAVE_PAGE;
+    return DeactivateRC::LeavePage;
 }
 
 
diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx
index 093348a..05d9b54 100644
--- a/cui/source/tabpages/tpbitmap.cxx
+++ b/cui/source/tabpages/tpbitmap.cxx
@@ -229,15 +229,15 @@ void SvxBitmapTabPage::ActivatePage( const SfxItemSet&  )
 }
 
 
-SfxTabPage::sfxpg SvxBitmapTabPage::DeactivatePage( SfxItemSet* _pSet)
+DeactivateRC SvxBitmapTabPage::DeactivatePage( SfxItemSet* _pSet)
 {
     if ( CheckChanges_Impl() == -1L )
-        return KEEP_PAGE;
+        return DeactivateRC::KeepPage;
 
     if( _pSet )
         FillItemSet( _pSet );
 
-    return LEAVE_PAGE;
+    return DeactivateRC::LeavePage;
 }
 
 
diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx
index 8384d3e..93fbf9e 100644
--- a/cui/source/tabpages/tpcolor.cxx
+++ b/cui/source/tabpages/tpcolor.cxx
@@ -505,15 +505,15 @@ void SvxColorTabPage::ActivatePage( const SfxItemSet& )
         m_pBoxEmbed->Hide();
 }
 
-SfxTabPage::sfxpg SvxColorTabPage::DeactivatePage( SfxItemSet* _pSet )
+DeactivateRC SvxColorTabPage::DeactivatePage( SfxItemSet* _pSet )
 {
     if ( CheckChanges_Impl() == -1L )
-        return KEEP_PAGE;
+        return DeactivateRC::KeepPage;
 
     if( _pSet )
         FillItemSet( _pSet );
 
-    return LEAVE_PAGE;
+    return DeactivateRC::LeavePage;
 }
 
 
diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx
index f56afab..8d87220 100644
--- a/cui/source/tabpages/tpgradnt.cxx
+++ b/cui/source/tabpages/tpgradnt.cxx
@@ -264,15 +264,15 @@ void SvxGradientTabPage::ActivatePage( const SfxItemSet&  
)
 }
 
 
-SfxTabPage::sfxpg SvxGradientTabPage::DeactivatePage( SfxItemSet* _pSet )
+DeactivateRC SvxGradientTabPage::DeactivatePage( SfxItemSet* _pSet )
 {
     if( CheckChanges_Impl() == -1L )
-        return KEEP_PAGE;
+        return DeactivateRC::KeepPage;
 
     if( _pSet )
         FillItemSet( _pSet );
 
-    return LEAVE_PAGE;
+    return DeactivateRC::LeavePage;
 }
 
 
diff --git a/cui/source/tabpages/tphatch.cxx b/cui/source/tabpages/tphatch.cxx
index 3b0afef..de983a7 100644
--- a/cui/source/tabpages/tphatch.cxx
+++ b/cui/source/tabpages/tphatch.cxx
@@ -254,15 +254,15 @@ void SvxHatchTabPage::ActivatePage( const SfxItemSet& 
rSet )
 }
 
 
-SfxTabPage::sfxpg SvxHatchTabPage::DeactivatePage( SfxItemSet* _pSet )
+DeactivateRC SvxHatchTabPage::DeactivatePage( SfxItemSet* _pSet )
 {
     if ( CheckChanges_Impl() == -1L )
-        return KEEP_PAGE;
+        return DeactivateRC::KeepPage;
 
     if( _pSet )
         FillItemSet( _pSet );
 
-    return LEAVE_PAGE;
+    return DeactivateRC::LeavePage;
 }
 
 
diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx
index 240e9da..4c12af0 100644
--- a/cui/source/tabpages/tpline.cxx
+++ b/cui/source/tabpages/tpline.cxx
@@ -678,7 +678,7 @@ void SvxLineTabPage::ActivatePage( const SfxItemSet& rSet )
 }
 
 
-SfxTabPage::sfxpg SvxLineTabPage::DeactivatePage( SfxItemSet* _pSet )
+DeactivateRC SvxLineTabPage::DeactivatePage( SfxItemSet* _pSet )
 {
     if( m_nDlgType == 0 ) // Line dialog
     {
@@ -693,7 +693,7 @@ SfxTabPage::sfxpg SvxLineTabPage::DeactivatePage( 
SfxItemSet* _pSet )
     if( _pSet )
         FillItemSet( _pSet );
 
-    return LEAVE_PAGE;
+    return DeactivateRC::LeavePage;
 }
 
 
diff --git a/cui/source/tabpages/tplnedef.cxx b/cui/source/tabpages/tplnedef.cxx
index 3eab7de..52ea9dd 100644
--- a/cui/source/tabpages/tplnedef.cxx
+++ b/cui/source/tabpages/tplnedef.cxx
@@ -215,14 +215,14 @@ void SvxLineDefTabPage::ActivatePage( const SfxItemSet& )
 }
 
 
-SfxTabPage::sfxpg SvxLineDefTabPage::DeactivatePage( SfxItemSet* _pSet )
+DeactivateRC SvxLineDefTabPage::DeactivatePage( SfxItemSet* _pSet )
 {
     CheckChanges_Impl();
 
     if( _pSet )
         FillItemSet( _pSet );
 
-    return LEAVE_PAGE;
+    return DeactivateRC::LeavePage;
 }
 
 
diff --git a/cui/source/tabpages/tplneend.cxx b/cui/source/tabpages/tplneend.cxx
index 3364d3e..e2d039e 100644
--- a/cui/source/tabpages/tplneend.cxx
+++ b/cui/source/tabpages/tplneend.cxx
@@ -179,14 +179,14 @@ void SvxLineEndDefTabPage::ActivatePage( const 
SfxItemSet& )
 }
 
 
-SfxTabPage::sfxpg SvxLineEndDefTabPage::DeactivatePage( SfxItemSet* _pSet )
+DeactivateRC SvxLineEndDefTabPage::DeactivatePage( SfxItemSet* _pSet )
 {
     CheckChanges_Impl();
 
     if( _pSet )
         FillItemSet( _pSet );
 
-    return LEAVE_PAGE;
+    return DeactivateRC::LeavePage;
 }
 
 
diff --git a/cui/source/tabpages/tpshadow.cxx b/cui/source/tabpages/tpshadow.cxx
index 1d9eddf..b114f74 100644
--- a/cui/source/tabpages/tpshadow.cxx
+++ b/cui/source/tabpages/tpshadow.cxx
@@ -255,12 +255,12 @@ void SvxShadowTabPage::ActivatePage( const SfxItemSet& 
rSet )
 }
 
 
-SfxTabPage::sfxpg SvxShadowTabPage::DeactivatePage( SfxItemSet* _pSet )
+DeactivateRC SvxShadowTabPage::DeactivatePage( SfxItemSet* _pSet )
 {
     if( _pSet )
         FillItemSet( _pSet );
 
-    return LEAVE_PAGE;
+    return DeactivateRC::LeavePage;
 }
 
 
diff --git a/cui/source/tabpages/tptrans.cxx b/cui/source/tabpages/tptrans.cxx
index e2f20b9..5b936bd 100644
--- a/cui/source/tabpages/tptrans.cxx
+++ b/cui/source/tabpages/tptrans.cxx
@@ -482,11 +482,11 @@ void SvxTransparenceTabPage::ActivatePage(const 
SfxItemSet& rSet)
     InitPreview ( rSet );
 }
 
-SfxTabPage::sfxpg SvxTransparenceTabPage::DeactivatePage(SfxItemSet* _pSet)
+DeactivateRC SvxTransparenceTabPage::DeactivatePage(SfxItemSet* _pSet)
 {
     if( _pSet )
         FillItemSet( _pSet );
-    return LEAVE_PAGE;
+    return DeactivateRC::LeavePage;
 }
 
 void SvxTransparenceTabPage::PointChanged(vcl::Window* , RECT_POINT eRcPt)
diff --git a/cui/source/tabpages/transfrm.cxx b/cui/source/tabpages/transfrm.cxx
index cc7c3bf..b570a60 100644
--- a/cui/source/tabpages/transfrm.cxx
+++ b/cui/source/tabpages/transfrm.cxx
@@ -333,14 +333,14 @@ void SvxAngleTabPage::ActivatePage(const SfxItemSet& 
/*rSet*/)
 }
 
 
-SfxTabPage::sfxpg SvxAngleTabPage::DeactivatePage( SfxItemSet* _pSet )
+DeactivateRC SvxAngleTabPage::DeactivatePage( SfxItemSet* _pSet )
 {
     if(_pSet)
     {
         FillItemSet(_pSet);
     }
 
-    return LEAVE_PAGE;
+    return DeactivateRC::LeavePage;
 }
 
 
@@ -703,14 +703,14 @@ void SvxSlantTabPage::ActivatePage( const SfxItemSet& 
rSet )
 }
 
 
-SfxTabPage::sfxpg SvxSlantTabPage::DeactivatePage( SfxItemSet* _pSet )
+DeactivateRC SvxSlantTabPage::DeactivatePage( SfxItemSet* _pSet )
 {
     if(_pSet)
     {
         FillItemSet(_pSet);
     }
 
-    return LEAVE_PAGE;
+    return DeactivateRC::LeavePage;
 }
 
 
@@ -1158,7 +1158,7 @@ void SvxPositionSizeTabPage::ActivatePage( const 
SfxItemSet& rSet )
 }
 
 
-SfxTabPage::sfxpg SvxPositionSizeTabPage::DeactivatePage( SfxItemSet* _pSet )
+DeactivateRC SvxPositionSizeTabPage::DeactivatePage( SfxItemSet* _pSet )
 {
     if( _pSet )
     {
@@ -1174,7 +1174,7 @@ SfxTabPage::sfxpg SvxPositionSizeTabPage::DeactivatePage( 
SfxItemSet* _pSet )
         FillItemSet(_pSet);
     }
 
-    return LEAVE_PAGE;
+    return DeactivateRC::LeavePage;
 }
 
 
diff --git a/dbaccess/source/ui/dlg/adminpages.cxx 
b/dbaccess/source/ui/dlg/adminpages.cxx
index c8de4ca..3efb3bc 100644
--- a/dbaccess/source/ui/dlg/adminpages.cxx
+++ b/dbaccess/source/ui/dlg/adminpages.cxx
@@ -66,16 +66,16 @@ namespace dbaui
         SetExchangeSupport();
     }
 
-    SfxTabPage::sfxpg OGenericAdministrationPage::DeactivatePage(SfxItemSet* 
_pSet)
+    DeactivateRC OGenericAdministrationPage::DeactivatePage(SfxItemSet* _pSet)
     {
         if (_pSet)
         {
             if (!prepareLeave())
-                return KEEP_PAGE;
+                return DeactivateRC::KeepPage;
             FillItemSet(_pSet);
         }
 
-        return LEAVE_PAGE;
+        return DeactivateRC::LeavePage;
     }
 
     void OGenericAdministrationPage::Reset(const SfxItemSet* _rCoreAttrs)
diff --git a/dbaccess/source/ui/dlg/adminpages.hxx 
b/dbaccess/source/ui/dlg/adminpages.hxx
index a3f0232..f674ffd 100644
--- a/dbaccess/source/ui/dlg/adminpages.hxx
+++ b/dbaccess/source/ui/dlg/adminpages.hxx
@@ -125,7 +125,7 @@ namespace dbaui
 
     protected:
         /// default implementation: call FillItemSet, call prepareLeave,
-        virtual sfxpg DeactivatePage(SfxItemSet* pSet) override;
+        virtual DeactivateRC DeactivatePage(SfxItemSet* pSet) override;
         using SfxTabPage::DeactivatePage;
         /// default implementation: call implInitControls with the given item 
set and _bSaveValue = sal_False
         virtual void Reset(const SfxItemSet* _rCoreAttrs) override;
diff --git a/dbaccess/source/ui/dlg/dbwizsetup.cxx 
b/dbaccess/source/ui/dlg/dbwizsetup.cxx
index d24a01e..7329637 100644
--- a/dbaccess/source/ui/dlg/dbwizsetup.cxx
+++ b/dbaccess/source/ui/dlg/dbwizsetup.cxx
@@ -650,7 +650,7 @@ bool ODbTypeWizDialogSetup::leaveState(WizardState _nState)
         resetPages(m_pImpl->getCurrentDataSource());
     }
     SfxTabPage* pPage = 
static_cast<SfxTabPage*>(WizardDialog::GetPage(_nState));
-    return pPage && pPage->DeactivatePage(m_pOutSet) != 0;
+    return pPage && pPage->DeactivatePage(m_pOutSet) != 
DeactivateRC::LeavePage;
 }
 
 void ODbTypeWizDialogSetup::setTitle(const OUString& /*_sTitle*/)
@@ -659,9 +659,8 @@ void ODbTypeWizDialogSetup::setTitle(const OUString& 
/*_sTitle*/)
         // why?
 }
 
-void ODbTypeWizDialogSetup::enableConfirmSettings( bool _bEnable )
+void ODbTypeWizDialogSetup::enableConfirmSettings( bool /*_bEnable*/ )
 {
-    (void)_bEnable;
 }
 
 namespace
diff --git a/dbaccess/source/ui/dlg/tablespage.cxx 
b/dbaccess/source/ui/dlg/tablespage.cxx
index 127ea3a..9b682a6 100644
--- a/dbaccess/source/ui/dlg/tablespage.cxx
+++ b/dbaccess/source/ui/dlg/tablespage.cxx
@@ -384,9 +384,9 @@ namespace dbaui
             m_pTablesList->checkWildcard(m_pTablesList->getAllObjectsEntry());
     }
 
-    SfxTabPage::sfxpg OTableSubscriptionPage::DeactivatePage(SfxItemSet* _pSet)
+    DeactivateRC OTableSubscriptionPage::DeactivatePage(SfxItemSet* _pSet)
     {
-        sfxpg nResult = OGenericAdministrationPage::DeactivatePage(_pSet);
+        DeactivateRC nResult = 
OGenericAdministrationPage::DeactivatePage(_pSet);
 
         // dispose the connection, we don't need it anymore, so we're not 
wasting resources
         try
diff --git a/dbaccess/source/ui/dlg/tablespage.hxx 
b/dbaccess/source/ui/dlg/tablespage.hxx
index 6e1acc9..1ff3c60 100644
--- a/dbaccess/source/ui/dlg/tablespage.hxx
+++ b/dbaccess/source/ui/dlg/tablespage.hxx
@@ -50,7 +50,7 @@ namespace dbaui
 
     public:
         virtual bool            FillItemSet(SfxItemSet* _rCoreAttrs) override;
-        virtual sfxpg           DeactivatePage(SfxItemSet* _pSet) override;
+        virtual DeactivateRC    DeactivatePage(SfxItemSet* _pSet) override;
         using OGenericAdministrationPage::DeactivatePage;
 
         virtual void            StateChanged( StateChangedType nStateChange ) 
override;
diff --git a/include/sfx2/dinfdlg.hxx b/include/sfx2/dinfdlg.hxx
index f7a202e..6003cd2 100644
--- a/include/sfx2/dinfdlg.hxx
+++ b/include/sfx2/dinfdlg.hxx
@@ -511,7 +511,7 @@ protected:
 
     virtual bool        FillItemSet( SfxItemSet* ) override;
     virtual void        Reset( const SfxItemSet* ) override;
-    virtual sfxpg       DeactivatePage( SfxItemSet* pSet = nullptr ) override;
+    virtual DeactivateRC DeactivatePage( SfxItemSet* pSet = nullptr ) override;
 
 public:
     SfxCustomPropertiesPage( vcl::Window* pParent, const SfxItemSet& );
@@ -630,7 +630,7 @@ private:
 protected:
     virtual bool        FillItemSet( SfxItemSet* ) override;
     virtual void        Reset( const SfxItemSet* ) override;
-    virtual sfxpg       DeactivatePage( SfxItemSet* pSet = nullptr ) override;
+    virtual DeactivateRC DeactivatePage( SfxItemSet* pSet = nullptr ) override;
 
 public:
     SfxCmisPropertiesPage( vcl::Window* pParent, const SfxItemSet& );
diff --git a/include/sfx2/mgetempl.hxx b/include/sfx2/mgetempl.hxx
index 67d0b4e..5cb65ac 100644
--- a/include/sfx2/mgetempl.hxx
+++ b/include/sfx2/mgetempl.hxx
@@ -93,7 +93,7 @@ protected:
     using TabPage::ActivatePage;
         virtual void        ActivatePage(const SfxItemSet &) override;
         using TabPage::DeactivatePage;
-    virtual sfxpg DeactivatePage(SfxItemSet * = nullptr) override;
+    virtual DeactivateRC DeactivatePage(SfxItemSet * = nullptr) override;
 
 public:
     SfxManageStyleSheetPage(vcl::Window *pParent, const SfxItemSet &rAttrSet );
diff --git a/include/sfx2/printopt.hxx b/include/sfx2/printopt.hxx
index 283c369..3d56b66 100644
--- a/include/sfx2/printopt.hxx
+++ b/include/sfx2/printopt.hxx
@@ -86,7 +86,7 @@ private:
 protected:
 
     using TabPage::DeactivatePage;
-    virtual sfxpg       DeactivatePage( SfxItemSet* pSet = nullptr ) override;
+    virtual DeactivateRC DeactivatePage( SfxItemSet* pSet = nullptr ) override;
 
 public:
 
diff --git a/include/sfx2/tabdlg.hxx b/include/sfx2/tabdlg.hxx
index 1b3b63c..8325722 100644
--- a/include/sfx2/tabdlg.hxx
+++ b/include/sfx2/tabdlg.hxx
@@ -30,6 +30,7 @@
 #include <svl/itempool.hxx>
 #include <svl/itemset.hxx>
 #include <com/sun/star/frame/XFrame.hpp>
+#include <o3tl/typed_flags_set.hxx>
 
 class SfxPoolItem;
 class SfxTabDialog;
@@ -201,6 +202,18 @@ public:
 
 namespace sfx { class ItemConnectionBase; }
 
+enum class DeactivateRC {
+    KeepPage   = 0x00,      // Error handling; page does not change
+    // 2. Fill an itemset for update
+    // parent examples, this pointer can be NULL all the time!
+    LeavePage  = 0x01,
+    // Set, refresh and update other Page
+    RefreshSet = 0x02
+};
+namespace o3tl {
+    template<> struct typed_flags<DeactivateRC> : is_typed_flags<DeactivateRC, 
0x03> {};
+}
+
 class SFX2_DLLPUBLIC SfxTabPage: public TabPage
 {
 friend class SfxTabDialog;
@@ -235,19 +248,10 @@ public:
     void                SetExchangeSupport()
                             { bHasExchangeSupport = true; }
 
-    enum sfxpg {
-      KEEP_PAGE = 0x0000,      // Error handling; page does not change
-        // 2. Fill an itemset for update
-        // parent examples, this pointer can be NULL all the time!
-        LEAVE_PAGE = 0x0001,
-        // Set, refresh and update other Page
-        REFRESH_SET = 0x0002
-    };
-
         using TabPage::ActivatePage;
         using TabPage::DeactivatePage;
     virtual void            ActivatePage( const SfxItemSet& );
-    virtual sfxpg           DeactivatePage( SfxItemSet* pSet );
+    virtual DeactivateRC    DeactivatePage( SfxItemSet* pSet );
     void                    SetUserData(const OUString& rString)
                               { aUserString = rString; }
     const OUString&         GetUserData() { return aUserString; }
diff --git a/include/svx/hdft.hxx b/include/svx/hdft.hxx
index 7fa0349..fd09aaa 100644
--- a/include/svx/hdft.hxx
+++ b/include/svx/hdft.hxx
@@ -65,7 +65,7 @@ protected:
     static const sal_uInt16 pRanges[];
 
     virtual void    ActivatePage( const SfxItemSet& rSet ) override;
-    virtual sfxpg   DeactivatePage( SfxItemSet* pSet = nullptr ) override;
+    virtual DeactivateRC   DeactivatePage( SfxItemSet* pSet = nullptr ) 
override;
 
     SvxHFPage( vcl::Window* pParent, const SfxItemSet& rSet, sal_uInt16 nSetId 
);
 
diff --git a/include/svx/optgrid.hxx b/include/svx/optgrid.hxx
index af696ea..64d28a9 100644
--- a/include/svx/optgrid.hxx
+++ b/include/svx/optgrid.hxx
@@ -110,7 +110,7 @@ public:
     virtual void        Reset( const SfxItemSet* rSet ) override;
 
     virtual void        ActivatePage( const SfxItemSet& rSet ) override;
-    virtual sfxpg       DeactivatePage( SfxItemSet* pSet ) override;
+    virtual DeactivateRC   DeactivatePage( SfxItemSet* pSet ) override;
 
 private:
     VclPtr<CheckBox>            pCbxUseGridsnap;
diff --git a/sc/source/ui/attrdlg/tabpages.cxx 
b/sc/source/ui/attrdlg/tabpages.cxx
index d7c0899..1717a61 100644
--- a/sc/source/ui/attrdlg/tabpages.cxx
+++ b/sc/source/ui/attrdlg/tabpages.cxx
@@ -149,12 +149,12 @@ bool ScTabPageProtection::FillItemSet( SfxItemSet* 
rCoreAttrs )
     return bAttrsChanged;
 }
 
-SfxTabPage::sfxpg ScTabPageProtection::DeactivatePage( SfxItemSet* pSetP )
+DeactivateRC ScTabPageProtection::DeactivatePage( SfxItemSet* pSetP )
 {
     if ( pSetP )
         FillItemSet( pSetP );
 
-    return LEAVE_PAGE;
+    return DeactivateRC::LeavePage;
 }
 
 IMPL_LINK_TYPED( ScTabPageProtection, ButtonClickHdl, Button*, pBox, void )
diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx
index cafd3af..02dc4a1 100644
--- a/sc/source/ui/dbgui/tpsort.cxx
+++ b/sc/source/ui/dbgui/tpsort.cxx
@@ -319,7 +319,7 @@ void ScTabPageSortFields::ActivatePage( const SfxItemSet& 
rSet )
     }
 }
 
-SfxTabPage::sfxpg ScTabPageSortFields::DeactivatePage( SfxItemSet* pSetP )
+DeactivateRC ScTabPageSortFields::DeactivatePage( SfxItemSet* pSetP )
 {
     if ( pDlg )
     {
@@ -333,7 +333,7 @@ SfxTabPage::sfxpg ScTabPageSortFields::DeactivatePage( 
SfxItemSet* pSetP )
     if ( pSetP )
         FillItemSet( pSetP );
 
-    return SfxTabPage::LEAVE_PAGE;
+    return DeactivateRC::LeavePage;
 }
 
 void ScTabPageSortFields::FillFieldLists( sal_uInt16 nStartField )
@@ -783,7 +783,7 @@ void ScTabPageSortOptions::ActivatePage( const SfxItemSet& 
rSet )
     }
 }
 
-SfxTabPage::sfxpg ScTabPageSortOptions::DeactivatePage( SfxItemSet* pSetP )
+DeactivateRC ScTabPageSortOptions::DeactivatePage( SfxItemSet* pSetP )
 {
     bool bPosInputOk = true;
 
@@ -830,7 +830,7 @@ SfxTabPage::sfxpg ScTabPageSortOptions::DeactivatePage( 
SfxItemSet* pSetP )
     if ( pSetP && bPosInputOk )
         FillItemSet( pSetP );
 
-    return bPosInputOk ? SfxTabPage::LEAVE_PAGE : SfxTabPage::KEEP_PAGE;
+    return bPosInputOk ? DeactivateRC::LeavePage : DeactivateRC::KeepPage;
 }
 
 void ScTabPageSortOptions::FillUserSortListBox()
diff --git a/sc/source/ui/inc/tabpages.hxx b/sc/source/ui/inc/tabpages.hxx
index d48d632..b44699e 100644
--- a/sc/source/ui/inc/tabpages.hxx
+++ b/sc/source/ui/inc/tabpages.hxx
@@ -40,7 +40,7 @@ public:
 
 protected:
     using SfxTabPage::DeactivatePage;
-    virtual sfxpg       DeactivatePage  ( SfxItemSet* pSet = nullptr ) 
override;
+    virtual DeactivateRC   DeactivatePage  ( SfxItemSet* pSet = nullptr ) 
override;
 
 private:
                 ScTabPageProtection( vcl::Window*            pParent,
diff --git a/sc/source/ui/inc/tpcalc.hxx b/sc/source/ui/inc/tpcalc.hxx
index 806035c..bb35a16 100644
--- a/sc/source/ui/inc/tpcalc.hxx
+++ b/sc/source/ui/inc/tpcalc.hxx
@@ -38,7 +38,7 @@ public:
     virtual bool        FillItemSet     ( SfxItemSet* rCoreSet ) override;
     virtual void        Reset           ( const SfxItemSet* rCoreSet ) 
override;
     using SfxTabPage::DeactivatePage;
-    virtual sfxpg       DeactivatePage  ( SfxItemSet* pSet = nullptr ) 
override;
+    virtual DeactivateRC   DeactivatePage  ( SfxItemSet* pSet = nullptr ) 
override;
 
 private:
                 ScTpCalcOptions( vcl::Window*            pParent,
diff --git a/sc/source/ui/inc/tpcompatibility.hxx 
b/sc/source/ui/inc/tpcompatibility.hxx
index d0842af..4c0c1f1 100644
--- a/sc/source/ui/inc/tpcompatibility.hxx
+++ b/sc/source/ui/inc/tpcompatibility.hxx
@@ -24,7 +24,7 @@ public:
 
     virtual bool FillItemSet(SfxItemSet* rCoreAttrs) override;
     virtual void Reset(const SfxItemSet* rCoreAttrs) override;
-    virtual sfxpg DeactivatePage(SfxItemSet* pSet = nullptr) override;
+    virtual DeactivateRC DeactivatePage(SfxItemSet* pSet = nullptr) override;
 
     virtual ~ScTpCompatOptions();
     virtual void dispose() override;
diff --git a/sc/source/ui/inc/tpdefaults.hxx b/sc/source/ui/inc/tpdefaults.hxx
index 9fd1437..9b52469 100644
--- a/sc/source/ui/inc/tpdefaults.hxx
+++ b/sc/source/ui/inc/tpdefaults.hxx
@@ -24,7 +24,7 @@ public:
 
     virtual bool FillItemSet(SfxItemSet* rCoreSet) override;
     virtual void Reset(const SfxItemSet* rCoreSet) override;
-    virtual sfxpg DeactivatePage(SfxItemSet* pSet = nullptr) override;
+    virtual DeactivateRC DeactivatePage(SfxItemSet* pSet = nullptr) override;
 
 private:
     explicit ScTpDefaultsOptions(vcl::Window* pParent, const SfxItemSet& 
rCoreSet);
diff --git a/sc/source/ui/inc/tpformula.hxx b/sc/source/ui/inc/tpformula.hxx
index 0b0ed6c..1a7e1ac 100644
--- a/sc/source/ui/inc/tpformula.hxx
+++ b/sc/source/ui/inc/tpformula.hxx
@@ -39,7 +39,7 @@ public:
 
     virtual bool FillItemSet(SfxItemSet* rCoreSet) override;
     virtual void Reset( const SfxItemSet* rCoreSet ) override;
-    virtual sfxpg DeactivatePage(SfxItemSet* pSet = nullptr) override;
+    virtual DeactivateRC DeactivatePage(SfxItemSet* pSet = nullptr) override;
 
 private:
     explicit ScTpFormulaOptions(vcl::Window* pParent, const SfxItemSet& 
rCoreSet);
diff --git a/sc/source/ui/inc/tphf.hxx b/sc/source/ui/inc/tphf.hxx
index 49e1b8a..2969236 100644
--- a/sc/source/ui/inc/tphf.hxx
+++ b/sc/source/ui/inc/tphf.hxx
@@ -44,7 +44,7 @@ protected:
     virtual void    ActivatePage() override;
     virtual void    DeactivatePage() override;
     virtual void    ActivatePage( const SfxItemSet& rSet ) override;
-    virtual sfxpg   DeactivatePage( SfxItemSet* pSet = nullptr ) override;
+    virtual DeactivateRC   DeactivatePage( SfxItemSet* pSet = nullptr ) 
override;
 
 private:
     VclPtr<PushButton>   m_pBtnEdit;
diff --git a/sc/source/ui/inc/tpprint.hxx b/sc/source/ui/inc/tpprint.hxx
index 27b1334..16b396a 100644
--- a/sc/source/ui/inc/tpprint.hxx
+++ b/sc/source/ui/inc/tpprint.hxx
@@ -38,7 +38,7 @@ public:
     virtual bool        FillItemSet( SfxItemSet* rCoreSet ) override;
     virtual void        Reset( const SfxItemSet* rCoreSet ) override;
     using SfxTabPage::DeactivatePage;
-    virtual sfxpg       DeactivatePage( SfxItemSet* pSet = nullptr ) override;
+    virtual DeactivateRC   DeactivatePage( SfxItemSet* pSet = nullptr ) 
override;
 };
 
 #endif
diff --git a/sc/source/ui/inc/tpsort.hxx b/sc/source/ui/inc/tpsort.hxx
index f777f74..c579c2b 100644
--- a/sc/source/ui/inc/tpsort.hxx
+++ b/sc/source/ui/inc/tpsort.hxx
@@ -64,7 +64,7 @@ protected:
     virtual void        ActivatePage    ( const SfxItemSet& rSet ) override;
     using SfxTabPage::ActivatePage;
     using SfxTabPage::DeactivatePage;
-    virtual sfxpg       DeactivatePage  ( SfxItemSet* pSet = nullptr) override;
+    virtual DeactivateRC   DeactivatePage  ( SfxItemSet* pSet = nullptr) 
override;
 
 private:
     OUString            aStrUndefined;
@@ -122,7 +122,7 @@ protected:
     virtual void        ActivatePage    ( const SfxItemSet& rSet ) override;
     using SfxTabPage::ActivatePage;
     using SfxTabPage::DeactivatePage;
-    virtual sfxpg       DeactivatePage  ( SfxItemSet* pSet = nullptr) override;
+    virtual DeactivateRC   DeactivatePage  ( SfxItemSet* pSet = nullptr) 
override;
 
 private:
 
diff --git a/sc/source/ui/inc/tptable.hxx b/sc/source/ui/inc/tptable.hxx
index e6d0ba1..c8fc966 100644
--- a/sc/source/ui/inc/tptable.hxx
+++ b/sc/source/ui/inc/tptable.hxx
@@ -36,7 +36,7 @@ public:
     virtual bool        FillItemSet     ( SfxItemSet* rCoreSet ) override;
     virtual void        Reset           ( const SfxItemSet* rCoreSet ) 
override;
     using SfxTabPage::DeactivatePage;
-    virtual sfxpg       DeactivatePage  ( SfxItemSet* pSet = nullptr ) 
override;
+    virtual DeactivateRC   DeactivatePage  ( SfxItemSet* pSet = nullptr ) 
override;
     virtual void        DataChanged     ( const DataChangedEvent& rDCEvt ) 
override;
 
     virtual         ~ScTablePage();
diff --git a/sc/source/ui/inc/tpusrlst.hxx b/sc/source/ui/inc/tpusrlst.hxx
index 93cdd3f..982646b 100644
--- a/sc/source/ui/inc/tpusrlst.hxx
+++ b/sc/source/ui/inc/tpusrlst.hxx
@@ -39,7 +39,7 @@ public:
     virtual bool        FillItemSet     ( SfxItemSet* rCoreAttrs ) override;
     virtual void        Reset           ( const SfxItemSet* rCoreAttrs ) 
override;
     using SfxTabPage::DeactivatePage;
-    virtual sfxpg       DeactivatePage  ( SfxItemSet* pSet = nullptr ) 
override;
+    virtual DeactivateRC   DeactivatePage  ( SfxItemSet* pSet = nullptr ) 
override;
 
 private:
             ScTpUserLists( vcl::Window*              pParent,
diff --git a/sc/source/ui/inc/tpview.hxx b/sc/source/ui/inc/tpview.hxx
index 2af7b8f..e415f11 100644
--- a/sc/source/ui/inc/tpview.hxx
+++ b/sc/source/ui/inc/tpview.hxx
@@ -78,7 +78,7 @@ public:
     using SfxTabPage::ActivatePage;
     using SfxTabPage::DeactivatePage;
     virtual void        ActivatePage( const SfxItemSet& ) override;
-    virtual sfxpg       DeactivatePage( SfxItemSet* pSet = nullptr ) override;
+    virtual DeactivateRC   DeactivatePage( SfxItemSet* pSet = nullptr ) 
override;
 
 };
 
@@ -123,7 +123,7 @@ public:
     using SfxTabPage::ActivatePage;
     using SfxTabPage::DeactivatePage;
     virtual void        ActivatePage( const SfxItemSet& ) override;
-    virtual sfxpg       DeactivatePage( SfxItemSet* pSet = nullptr ) override;
+    virtual DeactivateRC   DeactivatePage( SfxItemSet* pSet = nullptr ) 
override;
 
     void                SetDocument(ScDocument* pPtr){pDoc = pPtr;}
 
diff --git a/sc/source/ui/optdlg/tpcalc.cxx b/sc/source/ui/optdlg/tpcalc.cxx
index 74c1606..9cf30a1 100644
--- a/sc/source/ui/optdlg/tpcalc.cxx
+++ b/sc/source/ui/optdlg/tpcalc.cxx
@@ -190,18 +190,18 @@ bool ScTpCalcOptions::FillItemSet( SfxItemSet* rCoreAttrs 
)
         return false;
 }
 
-SfxTabPage::sfxpg ScTpCalcOptions::DeactivatePage( SfxItemSet* pSetP )
+DeactivateRC ScTpCalcOptions::DeactivatePage( SfxItemSet* pSetP )
 {
-    sfxpg nReturn = KEEP_PAGE;
+    DeactivateRC nReturn = DeactivateRC::KeepPage;
 
     double fEps;
     if( m_pEdEps->GetValue( fEps ) && (fEps > 0.0) )
     {
         pLocalOptions->SetIterEps( fEps );
-        nReturn = LEAVE_PAGE;
+        nReturn = DeactivateRC::LeavePage;
     }
 
-    if ( nReturn == KEEP_PAGE )
+    if ( nReturn == DeactivateRC::KeepPage )
     {
         ScopedVclPtr<MessageDialog>::Create( this,
                   ScGlobal::GetRscString( STR_INVALID_EPS )
diff --git a/sc/source/ui/optdlg/tpcompatibility.cxx 
b/sc/source/ui/optdlg/tpcompatibility.cxx
index 3c83b98..30c16b0 100644
--- a/sc/source/ui/optdlg/tpcompatibility.cxx
+++ b/sc/source/ui/optdlg/tpcompatibility.cxx
@@ -75,9 +75,9 @@ void ScTpCompatOptions::Reset(const SfxItemSet *rCoreAttrs)
     m_pLbKeyBindings->SaveValue();
 }
 
-SfxTabPage::sfxpg ScTpCompatOptions::DeactivatePage(SfxItemSet* /*pSet*/)
+DeactivateRC ScTpCompatOptions::DeactivatePage(SfxItemSet* /*pSet*/)
 {
-    return KEEP_PAGE;
+    return DeactivateRC::KeepPage;
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/optdlg/tpdefaults.cxx 
b/sc/source/ui/optdlg/tpdefaults.cxx
index b854ae1..6236853 100644
--- a/sc/source/ui/optdlg/tpdefaults.cxx
+++ b/sc/source/ui/optdlg/tpdefaults.cxx
@@ -79,9 +79,9 @@ void ScTpDefaultsOptions::Reset(const SfxItemSet* rCoreSet)
     m_pEdSheetPrefix->SaveValue();
 }
 
-SfxTabPage::sfxpg ScTpDefaultsOptions::DeactivatePage(SfxItemSet* /*pSet*/)
+DeactivateRC ScTpDefaultsOptions::DeactivatePage(SfxItemSet* /*pSet*/)
 {
-    return KEEP_PAGE;
+    return DeactivateRC::KeepPage;
 }
 
 void ScTpDefaultsOptions::CheckNumSheets()
diff --git a/sc/source/ui/optdlg/tpformula.cxx 
b/sc/source/ui/optdlg/tpformula.cxx
index afbf421..02fdef5 100644
--- a/sc/source/ui/optdlg/tpformula.cxx
+++ b/sc/source/ui/optdlg/tpformula.cxx
@@ -371,10 +371,10 @@ void ScTpFormulaOptions::Reset(const SfxItemSet* rCoreSet)
     maCurrentDocOptions = maSavedDocOptions;
 }
 
-SfxTabPage::sfxpg ScTpFormulaOptions::DeactivatePage(SfxItemSet* /*pSet*/)
+DeactivateRC ScTpFormulaOptions::DeactivatePage(SfxItemSet* /*pSet*/)
 {
     // What's this method for ?
-    return KEEP_PAGE;
+    return DeactivateRC::KeepPage;
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/optdlg/tpprint.cxx b/sc/source/ui/optdlg/tpprint.cxx
index 6ee0b89..bb0b883 100644
--- a/sc/source/ui/optdlg/tpprint.cxx
+++ b/sc/source/ui/optdlg/tpprint.cxx
@@ -57,12 +57,12 @@ VclPtr<SfxTabPage> ScTpPrintOptions::Create( vcl::Window* 
pParent, const SfxItem
     return VclPtr<ScTpPrintOptions>::Create( pParent, *rAttrSet );
 }
 
-SfxTabPage::sfxpg ScTpPrintOptions::DeactivatePage( SfxItemSet* pSetP )
+DeactivateRC ScTpPrintOptions::DeactivatePage( SfxItemSet* pSetP )
 {
     if ( pSetP )
         FillItemSet( pSetP );
 
-    return LEAVE_PAGE;
+    return DeactivateRC::LeavePage;
 }
 
 void ScTpPrintOptions::Reset( const SfxItemSet* rCoreSet )
diff --git a/sc/source/ui/optdlg/tpusrlst.cxx b/sc/source/ui/optdlg/tpusrlst.cxx
index be45355..aca56c1 100644
--- a/sc/source/ui/optdlg/tpusrlst.cxx
+++ b/sc/source/ui/optdlg/tpusrlst.cxx
@@ -243,12 +243,12 @@ bool ScTpUserLists::FillItemSet( SfxItemSet* rCoreAttrs )
     return bDataModified;
 }
 
-SfxTabPage::sfxpg ScTpUserLists::DeactivatePage( SfxItemSet* pSetP )

... etc. - the rest is truncated
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to