summaryrefslogtreecommitdiff
path: root/sw/inc
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-01-12 20:13:41 +0100
committerStephan Bergmann <sbergman@redhat.com>2018-01-12 20:13:41 +0100
commit0ae2d98d1f6d29c80bd1ee830db4c333e4ee1e1d (patch)
treed9b77eece17b7b144a4ea50592b639b9f7c87095 /sw/inc
parent506856ca50e676520bcc80a8b498355663d0388f (diff)
More loplugin:cstylecast: sw
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: I0f49d21dfdf82742f11b27709f74294feb1e419e
Diffstat (limited to 'sw/inc')
-rw-r--r--sw/inc/htmltbl.hxx2
-rw-r--r--sw/inc/redline.hxx6
-rw-r--r--sw/inc/swtable.hxx2
-rw-r--r--sw/inc/viewsh.hxx4
4 files changed, 7 insertions, 7 deletions
diff --git a/sw/inc/htmltbl.hxx b/sw/inc/htmltbl.hxx
index b344eed5d4c9..d2cdb61fec9c 100644
--- a/sw/inc/htmltbl.hxx
+++ b/sw/inc/htmltbl.hxx
@@ -432,7 +432,7 @@ inline void SwHTMLTableLayout::SetCell( std::unique_ptr<SwHTMLTableLayoutCell> p
inline long SwHTMLTableLayout::GetBrowseWidthMin() const
{
- return (long)( (!m_nWidthOption || m_bPrcWidthOption) ? m_nMin : m_nRelTabWidth );
+ return static_cast<long>( (!m_nWidthOption || m_bPrcWidthOption) ? m_nMin : m_nRelTabWidth );
}
void SwHTMLTableLayout::SetInhBorderWidths( sal_uInt16 nLeft, sal_uInt16 nRight )
diff --git a/sw/inc/redline.hxx b/sw/inc/redline.hxx
index 0ea5412a6592..2aefe871f750 100644
--- a/sw/inc/redline.hxx
+++ b/sw/inc/redline.hxx
@@ -140,7 +140,7 @@ public:
{ return !operator==( rCmp ); }
RedlineType_t GetType() const
- { return ((RedlineType_t)(eType & nsRedlineType_t::REDLINE_NO_FLAG_MASK)); }
+ { return static_cast<RedlineType_t>(eType & nsRedlineType_t::REDLINE_NO_FLAG_MASK); }
std::size_t GetAuthor() const { return nAuthor; }
const OUString& GetComment() const { return sComment; }
@@ -151,7 +151,7 @@ public:
void SetTimeStamp( const DateTime& rDT ) { aStamp = rDT; }
void SetAutoFormatFlag()
- { eType = (RedlineType_t)(eType | nsRedlineType_t::REDLINE_FORM_AUTOFMT); }
+ { eType = static_cast<RedlineType_t>(eType | nsRedlineType_t::REDLINE_FORM_AUTOFMT); }
bool CanCombine( const SwRedlineData& rCmp ) const;
// ExtraData gets copied, the pointer is therefore not taken over by
@@ -221,7 +221,7 @@ public:
const DateTime& GetTimeStamp( sal_uInt16 nPos = 0) const;
RedlineType_t GetRealType( sal_uInt16 nPos = 0 ) const;
RedlineType_t GetType( sal_uInt16 nPos = 0) const
- { return ( (RedlineType_t)(GetRealType( nPos ) & nsRedlineType_t::REDLINE_NO_FLAG_MASK)); }
+ { return static_cast<RedlineType_t>(GetRealType( nPos ) & nsRedlineType_t::REDLINE_NO_FLAG_MASK); }
const OUString& GetComment( sal_uInt16 nPos = 0 ) const;
void SetComment( const OUString& rS ) { pRedlineData->SetComment( rS ); }
diff --git a/sw/inc/swtable.hxx b/sw/inc/swtable.hxx
index bc9e2f219cc3..1d240de469ba 100644
--- a/sw/inc/swtable.hxx
+++ b/sw/inc/swtable.hxx
@@ -194,7 +194,7 @@ public:
/// Set the new table style name for this table.
void SetTableStyleName(const OUString& rName) { maTableStyleName = rName; }
- sal_uInt16 GetRowsToRepeat() const { return std::min( (sal_uInt16)GetTabLines().size(), m_nRowsToRepeat ); }
+ sal_uInt16 GetRowsToRepeat() const { return std::min( static_cast<sal_uInt16>(GetTabLines().size()), m_nRowsToRepeat ); }
void SetRowsToRepeat( sal_uInt16 nNumOfRows ) { m_nRowsToRepeat = nNumOfRows; }
bool IsHeadline( const SwTableLine& rLine ) const;
diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx
index 566653342451..e3329b4c931d 100644
--- a/sw/inc/viewsh.hxx
+++ b/sw/inc/viewsh.hxx
@@ -87,8 +87,8 @@ namespace vcl
// Define for flags needed in ctor or layers below.
// Currently the Preview flag is needed for DrawPage.
-#define VSHELLFLAG_ISPREVIEW ((long)0x1)
-#define VSHELLFLAG_SHARELAYOUT ((long)0x2)
+#define VSHELLFLAG_ISPREVIEW (long(0x1))
+#define VSHELLFLAG_SHARELAYOUT (long(0x2))
typedef std::shared_ptr<SwRootFrame> SwRootFramePtr;
class SW_DLLPUBLIC SwViewShell : public sw::Ring<SwViewShell>