summaryrefslogtreecommitdiff
path: root/sw/inc
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-05-04 11:31:33 +0200
committerNoel Grandin <noel@peralex.com>2016-05-09 10:17:13 +0200
commitbcb41235deaf4b7ca90522bda3ba21a686819e6e (patch)
tree29f397deeb5c776b290b782847a4f9ec8487adb2 /sw/inc
parentb55b7a057f19521ad88fc6a274fcf071b798eb3e (diff)
convert SfxStyleFamily to scoped enum
and update the RSC compiler to accept such In the process fix some confusion in SD where it was confusing SfxStyleFamily and the index of the relevant family (which other parts of the code in SVL use) Change-Id: I1efc9f85fbed8ab76eafe8f6e1ada411753ae5f9
Diffstat (limited to 'sw/inc')
-rw-r--r--sw/inc/docsh.hxx20
-rw-r--r--sw/inc/swabstdlg.hxx7
-rw-r--r--sw/inc/view.hxx4
3 files changed, 16 insertions, 15 deletions
diff --git a/sw/inc/docsh.hxx b/sw/inc/docsh.hxx
index 0b564e02004c..cce1600ae5b0 100644
--- a/sw/inc/docsh.hxx
+++ b/sw/inc/docsh.hxx
@@ -116,28 +116,28 @@ class SW_DLLPUBLIC SwDocShell
/// Methods for StyleSheets
/// @param nSlot
- /// Only used for nFamily == SFX_STYLE_FAMILY_PAGE. Identifies optional Slot by which the edit is triggered.
+ /// Only used for nFamily == SfxStyleFamily::Page. Identifies optional Slot by which the edit is triggered.
/// Used to activate certain dialog pane
SAL_DLLPRIVATE sal_uInt16 Edit(
const OUString &rName,
const OUString& rParent,
- const sal_uInt16 nFamily,
+ const SfxStyleFamily nFamily,
sal_uInt16 nMask,
const bool bNew,
const OString& sPageId = OString(),
SwWrtShell* pActShell = nullptr,
const bool bBasic = false );
- SAL_DLLPRIVATE bool Delete(const OUString &rName, sal_uInt16 nFamily);
- SAL_DLLPRIVATE bool Hide(const OUString &rName, sal_uInt16 nFamily, bool bHidden);
- SAL_DLLPRIVATE sal_uInt16 ApplyStyles(const OUString &rName,
- const sal_uInt16 nFamily,
+ SAL_DLLPRIVATE bool Delete(const OUString &rName, SfxStyleFamily nFamily);
+ SAL_DLLPRIVATE bool Hide(const OUString &rName, SfxStyleFamily nFamily, bool bHidden);
+ SAL_DLLPRIVATE SfxStyleFamily ApplyStyles(const OUString &rName,
+ const SfxStyleFamily nFamily,
SwWrtShell* pShell = nullptr,
sal_uInt16 nMode = 0);
- SAL_DLLPRIVATE sal_uInt16 DoWaterCan( const OUString &rName, sal_uInt16 nFamily);
- SAL_DLLPRIVATE sal_uInt16 UpdateStyle(const OUString &rName, sal_uInt16 nFamily, SwWrtShell* pShell = nullptr);
- SAL_DLLPRIVATE sal_uInt16 MakeByExample(const OUString &rName,
- sal_uInt16 nFamily, sal_uInt16 nMask, SwWrtShell* pShell = nullptr);
+ SAL_DLLPRIVATE SfxStyleFamily DoWaterCan( const OUString &rName, SfxStyleFamily nFamily);
+ SAL_DLLPRIVATE SfxStyleFamily UpdateStyle(const OUString &rName, SfxStyleFamily nFamily, SwWrtShell* pShell = nullptr);
+ SAL_DLLPRIVATE SfxStyleFamily MakeByExample(const OUString &rName,
+ SfxStyleFamily nFamily, sal_uInt16 nMask, SwWrtShell* pShell = nullptr);
SAL_DLLPRIVATE void SubInitNew(); ///< for InitNew and HtmlSourceMode.
diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx
index 5de822c98b10..a46e2acec5b0 100644
--- a/sw/inc/swabstdlg.hxx
+++ b/sw/inc/swabstdlg.hxx
@@ -36,6 +36,7 @@
#include "itabenum.hxx"
#include <boost/optional.hpp>
#include "dbmgr.hxx"
+#include <cnttab.hxx>
class SfxViewFrame;
class SfxBindings;
@@ -74,7 +75,7 @@ class SwTOXMark;
struct SwDocStat;
enum class SwBorderModes;
enum class SwCharDlgMode;
-#include <cnttab.hxx>
+enum class SfxStyleFamily;
namespace com{namespace sun{namespace star{
namespace frame{
@@ -394,10 +395,10 @@ public:
const OUString* pFormatStr = nullptr) = 0;
/// @param nSlot
/// Identifies optional Slot by which the creation of the Template (Style) dialog is triggered.
- /// Currently used, if nRegion == SFX_STYLE_FAMILY_PAGE in order to activate certain dialog pane
+ /// Currently used, if nRegion == SfxStyleFamily::Page in order to activate certain dialog pane
virtual SfxAbstractApplyTabDialog* CreateTemplateDialog(
SfxStyleSheetBase& rBase,
- sal_uInt16 nRegion,
+ SfxStyleFamily nRegion,
const OString& sPage = OString(),
SwWrtShell* pActShell = nullptr,
bool bNew = false) = 0;
diff --git a/sw/inc/view.hxx b/sw/inc/view.hxx
index 5fcf51b90f29..b569b561b6a2 100644
--- a/sw/inc/view.hxx
+++ b/sw/inc/view.hxx
@@ -131,13 +131,13 @@ struct SwApplyTemplate
SwNumRule* pNumRule;
} aColl;
- int eType;
+ SfxStyleFamily eType;
sal_uInt16 nColor;
SwFormatClipboard* m_pFormatClipboard;
size_t nUndo; //< The initial undo stack depth.
SwApplyTemplate() :
- eType(0),
+ eType(SfxStyleFamily::None),
nColor(0),
m_pFormatClipboard(nullptr),
nUndo(0)