diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-01-12 20:14:18 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-01-12 20:14:18 +0100 |
commit | 43b137e1404acbd16649813e9d493ba97b8f509c (patch) | |
tree | 2e5827c0d60185c56603e66b1ea74a72230b9476 /include | |
parent | c049c76fc521f2b55b39a6e9eb0f0092bcf6ef77 (diff) |
More loplugin:cstylecast: svtools
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable
loplugin:cstylecast for some more cases" plus
solenv/clang-format/reformat-formatted-files
Change-Id: Ide9e7c53b554f0a36e2078a8823f5ef6fb5cc8fa
Diffstat (limited to 'include')
-rw-r--r-- | include/svtools/accessibletableprovider.hxx | 4 | ||||
-rw-r--r-- | include/svtools/editbrowsebox.hxx | 2 | ||||
-rw-r--r-- | include/svtools/headbar.hxx | 10 | ||||
-rw-r--r-- | include/svtools/imapobj.hxx | 10 | ||||
-rw-r--r-- | include/svtools/ruler.hxx | 24 | ||||
-rw-r--r-- | include/svtools/tabbar.hxx | 8 | ||||
-rw-r--r-- | include/svtools/table/tabletypes.hxx | 8 | ||||
-rw-r--r-- | include/svtools/valueset.hxx | 20 | ||||
-rw-r--r-- | include/svtools/wizardmachine.hxx | 2 |
9 files changed, 44 insertions, 44 deletions
diff --git a/include/svtools/accessibletableprovider.hxx b/include/svtools/accessibletableprovider.hxx index d3ca495b3b9a..094c4a16fb27 100644 --- a/include/svtools/accessibletableprovider.hxx +++ b/include/svtools/accessibletableprovider.hxx @@ -29,8 +29,8 @@ namespace svt { -#define OFFSET_DEFAULT ((sal_Int32)-1) -#define OFFSET_NONE ((sal_Int32)0) +#define OFFSET_DEFAULT (sal_Int32(-1)) +#define OFFSET_NONE (sal_Int32(0)) enum AccessibleTableChildIndex { diff --git a/include/svtools/editbrowsebox.hxx b/include/svtools/editbrowsebox.hxx index 1f5ab12dc3cc..5d76e28e46f6 100644 --- a/include/svtools/editbrowsebox.hxx +++ b/include/svtools/editbrowsebox.hxx @@ -570,7 +570,7 @@ namespace svt // inserting columns // if you don't set a width, this will be calculated automatically // if the id isn't set the smallest unused will do it ... - virtual sal_uInt16 AppendColumn(const OUString& rName, sal_uInt16 nWidth, sal_uInt16 nPos = HEADERBAR_APPEND, sal_uInt16 nId = (sal_uInt16)-1); + virtual sal_uInt16 AppendColumn(const OUString& rName, sal_uInt16 nWidth, sal_uInt16 nPos = HEADERBAR_APPEND, sal_uInt16 nId = sal_uInt16(-1)); // called whenever (Shift)Tab or Enter is pressed. If true is returned, these keys // result in traveling to the next or to th previous cell diff --git a/include/svtools/headbar.hxx b/include/svtools/headbar.hxx index a575bd7c3fb5..08203a2c611a 100644 --- a/include/svtools/headbar.hxx +++ b/include/svtools/headbar.hxx @@ -174,8 +174,8 @@ HeaderBarItemBits::CLICKABLE, but HeaderBarItemBits::FIXEDPOS. class Accelerator; class ImplHeadItem; -#define WB_BOTTOMBORDER ((WinBits)0x0400) -#define WB_BUTTONSTYLE ((WinBits)0x0800) +#define WB_BOTTOMBORDER (WinBits(0x0400)) +#define WB_BUTTONSTYLE (WinBits(0x0800)) #define WB_STDHEADERBAR (WB_BUTTONSTYLE | WB_BOTTOMBORDER) enum class HeaderBarItemBits @@ -203,9 +203,9 @@ namespace o3tl template<> struct typed_flags<HeaderBarItemBits> : is_typed_flags<HeaderBarItemBits, 0x3fff> {}; } -#define HEADERBAR_APPEND ((sal_uInt16)0xFFFF) -#define HEADERBAR_ITEM_NOTFOUND ((sal_uInt16)0xFFFF) -#define HEADERBAR_FULLSIZE ((long)1000000000) +#define HEADERBAR_APPEND (sal_uInt16(0xFFFF)) +#define HEADERBAR_ITEM_NOTFOUND (sal_uInt16(0xFFFF)) +#define HEADERBAR_FULLSIZE (long(1000000000)) #define HEADERBAR_TEXTOFF 2 diff --git a/include/svtools/imapobj.hxx b/include/svtools/imapobj.hxx index 9c79dbc0152c..04da290dda0d 100644 --- a/include/svtools/imapobj.hxx +++ b/include/svtools/imapobj.hxx @@ -29,12 +29,12 @@ namespace tools { class Rectangle; } class SvStream; #define IMAP_OBJ_NONE ((sal_uInt16)0x0000) -#define IMAP_OBJ_RECTANGLE ((sal_uInt16)0x0001) -#define IMAP_OBJ_CIRCLE ((sal_uInt16)0x0002) -#define IMAP_OBJ_POLYGON ((sal_uInt16)0x0003) -#define IMAP_OBJ_VERSION ((sal_uInt16)0x0005) +#define IMAP_OBJ_RECTANGLE (sal_uInt16(0x0001)) +#define IMAP_OBJ_CIRCLE (sal_uInt16(0x0002)) +#define IMAP_OBJ_POLYGON (sal_uInt16(0x0003)) +#define IMAP_OBJ_VERSION (sal_uInt16(0x0005)) -#define IMAGE_MAP_VERSION ((sal_uInt16)0x0001) +#define IMAGE_MAP_VERSION (sal_uInt16(0x0001)) #define IMAPMAGIC "SDIMAP" diff --git a/include/svtools/ruler.hxx b/include/svtools/ruler.hxx index 23aac6fc2fcc..2da312a6b244 100644 --- a/include/svtools/ruler.hxx +++ b/include/svtools/ruler.hxx @@ -459,8 +459,8 @@ Tips for the use of the ruler: *************************************************************************/ -#define WB_EXTRAFIELD ((WinBits)0x00004000) -#define WB_RIGHT_ALIGNED ((WinBits)0x00008000) +#define WB_EXTRAFIELD (WinBits(0x00004000)) +#define WB_RIGHT_ALIGNED (WinBits(0x00008000)) #define WB_STDRULER WB_HORZ @@ -470,9 +470,9 @@ enum class RulerType { DontKnow, Outside, enum class RulerExtra { DontKnow, NullOffset, Tab }; -#define RULER_STYLE_HIGHLIGHT ((sal_uInt16)0x8000) -#define RULER_STYLE_DONTKNOW ((sal_uInt16)0x4000) -#define RULER_STYLE_INVISIBLE ((sal_uInt16)0x2000) +#define RULER_STYLE_HIGHLIGHT (sal_uInt16(0x8000)) +#define RULER_STYLE_DONTKNOW (sal_uInt16(0x4000)) +#define RULER_STYLE_INVISIBLE (sal_uInt16(0x2000)) enum class RulerDragSize { Move, @@ -529,13 +529,13 @@ struct RulerIndent }; -#define RULER_TAB_LEFT ((sal_uInt16)0x0000) -#define RULER_TAB_RIGHT ((sal_uInt16)0x0001) -#define RULER_TAB_CENTER ((sal_uInt16)0x0002) -#define RULER_TAB_DECIMAL ((sal_uInt16)0x0003) -#define RULER_TAB_DEFAULT ((sal_uInt16)0x0004) -#define RULER_TAB_STYLE ((sal_uInt16)0x000F) -#define RULER_TAB_RTL ((sal_uInt16)0x0010) +#define RULER_TAB_LEFT (sal_uInt16(0x0000)) +#define RULER_TAB_RIGHT (sal_uInt16(0x0001)) +#define RULER_TAB_CENTER (sal_uInt16(0x0002)) +#define RULER_TAB_DECIMAL (sal_uInt16(0x0003)) +#define RULER_TAB_DEFAULT (sal_uInt16(0x0004)) +#define RULER_TAB_STYLE (sal_uInt16(0x000F)) +#define RULER_TAB_RTL (sal_uInt16(0x0010)) struct RulerTab { diff --git a/include/svtools/tabbar.hxx b/include/svtools/tabbar.hxx index 8996cb0f60bf..0e5b93a5e861 100644 --- a/include/svtools/tabbar.hxx +++ b/include/svtools/tabbar.hxx @@ -268,10 +268,10 @@ been carried out. class Button; -#define WB_RANGESELECT ((WinBits)0x00200000) -#define WB_MULTISELECT ((WinBits)0x00400000) -#define WB_MINSCROLL ((WinBits)0x20000000) -#define WB_INSERTTAB ((WinBits)0x40000000) +#define WB_RANGESELECT (WinBits(0x00200000)) +#define WB_MULTISELECT (WinBits(0x00400000)) +#define WB_MINSCROLL (WinBits(0x20000000)) +#define WB_INSERTTAB (WinBits(0x40000000)) #define WB_STDTABBAR WB_BORDER // Page bits diff --git a/include/svtools/table/tabletypes.hxx b/include/svtools/table/tabletypes.hxx index b10d1a411d0b..36765757a921 100644 --- a/include/svtools/table/tabletypes.hxx +++ b/include/svtools/table/tabletypes.hxx @@ -37,14 +37,14 @@ namespace svt { namespace table typedef sal_Int32 TableMetrics; /// denotes the column containing the row headers -#define COL_ROW_HEADERS ((::svt::table::ColPos)-1) +#define COL_ROW_HEADERS (::svt::table::ColPos(-1)) /// denotes the row containing the column headers -#define ROW_COL_HEADERS ((::svt::table::RowPos)-1) +#define ROW_COL_HEADERS (::svt::table::RowPos(-1)) /// denotes an invalid column index -#define COL_INVALID ((::svt::table::ColPos)-2) +#define COL_INVALID (::svt::table::ColPos(-2)) /// denotes an invalid row index -#define ROW_INVALID ((::svt::table::RowPos)-2) +#define ROW_INVALID (::svt::table::RowPos(-2)) } } // namespace svt::table diff --git a/include/svtools/valueset.hxx b/include/svtools/valueset.hxx index 0f70c177ee1b..83f5e7d075f8 100644 --- a/include/svtools/valueset.hxx +++ b/include/svtools/valueset.hxx @@ -179,16 +179,16 @@ to be set (before Show) with SetStyle(). typedef std::vector<ValueSetItem*> ValueItemList; -#define WB_ITEMBORDER ((WinBits)0x00010000) -#define WB_DOUBLEBORDER ((WinBits)0x00020000) -#define WB_NAMEFIELD ((WinBits)0x00040000) -#define WB_NONEFIELD ((WinBits)0x00080000) -#define WB_FLATVALUESET ((WinBits)0x02000000) -#define WB_NO_DIRECTSELECT ((WinBits)0x04000000) -#define WB_MENUSTYLEVALUESET ((WinBits)0x08000000) - -#define VALUESET_APPEND ((size_t)-1) -#define VALUESET_ITEM_NOTFOUND ((size_t)-1) +#define WB_ITEMBORDER (WinBits(0x00010000)) +#define WB_DOUBLEBORDER (WinBits(0x00020000)) +#define WB_NAMEFIELD (WinBits(0x00040000)) +#define WB_NONEFIELD (WinBits(0x00080000)) +#define WB_FLATVALUESET (WinBits(0x02000000)) +#define WB_NO_DIRECTSELECT (WinBits(0x04000000)) +#define WB_MENUSTYLEVALUESET (WinBits(0x08000000)) + +#define VALUESET_APPEND (size_t(-1)) +#define VALUESET_ITEM_NOTFOUND (size_t(-1)) class SVT_DLLPUBLIC ValueSet : public Control diff --git a/include/svtools/wizardmachine.hxx b/include/svtools/wizardmachine.hxx index 6a354a39fe80..2bb25bba8a13 100644 --- a/include/svtools/wizardmachine.hxx +++ b/include/svtools/wizardmachine.hxx @@ -47,7 +47,7 @@ namespace svt // wizard states -#define WZS_INVALID_STATE ((WizardState)-1) +#define WZS_INVALID_STATE (WizardState(-1)) //= WizardTypes |