[Libreoffice-commits] .: 2 commits - sw/inc sw/source
Christian Lohmaier
cloph at kemper.freedesktop.org
Mon May 16 15:13:59 PDT 2011
sw/inc/ndole.hxx | 1 -
sw/source/core/doc/doclay.cxx.rej | 7 +++++++
sw/source/core/layout/paintfrm.cxx | 8 ++++----
sw/source/core/text/txtfrm.cxx | 1 -
sw/source/core/undo/unbkmk.cxx | 1 -
sw/source/core/undo/unoutl.cxx | 1 -
sw/source/core/undo/unredln.cxx | 1 -
sw/source/core/undo/unsort.cxx | 1 -
sw/source/ui/config/cfgitems.cxx | 1 -
sw/source/ui/dialog/macassgn.cxx | 1 -
sw/source/ui/dialog/swdlgfact.hxx | 1 -
sw/source/ui/frmdlg/column.cxx | 8 ++++----
sw/source/ui/misc/pgfnote.cxx | 12 ++++++------
sw/source/ui/vba/vbacell.cxx | 2 +-
sw/source/ui/vba/vbatablehelper.cxx | 2 +-
15 files changed, 23 insertions(+), 25 deletions(-)
New commits:
commit ca5e6a72313c4dfcd2142852ae747f9a33bbeaec
Author: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
Date: Tue May 17 00:15:59 2011 +0200
WaE - add explicit casting (decimal-types â integer types)
diff --git a/sw/source/core/doc/doclay.cxx.rej b/sw/source/core/doc/doclay.cxx.rej
new file mode 100644
index 0000000..a425d2a
--- /dev/null
+++ b/sw/source/core/doc/doclay.cxx.rej
@@ -0,0 +1,7 @@
+--- sw/source/core/doc/doclay.cxx
++++ sw/source/core/doc/doclay.cxx
+@@ -2357,4 +2357,4 @@
+ return aAllLayouts;
+ }//swmod 070825
+
+-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index 0c50e28..6f2b8ff 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -774,9 +774,9 @@ void lcl_DrawDashedRect( OutputDevice * pOut, SwLineRect & rLRect )
}
long startX = rLRect.Left( );
- long startY = rLRect.Top( ) + nHalfLWidth;
+ long startY = rLRect.Top( ) + static_cast<long>(nHalfLWidth);
long endX = rLRect.Left( ) + rLRect.Width( );
- long endY = rLRect.Top( ) + nHalfLWidth;
+ long endY = rLRect.Top( ) + static_cast<long>(nHalfLWidth);
if ( rLRect.Height( ) > rLRect.Width( ) )
{
@@ -789,9 +789,9 @@ void lcl_DrawDashedRect( OutputDevice * pOut, SwLineRect & rLRect )
{
nHalfLWidth = 1;
}
- startX = rLRect.Left( ) + nHalfLWidth;
+ startX = rLRect.Left( ) + static_cast<long>(nHalfLWidth);
startY = rLRect.Top( );
- endX = rLRect.Left( ) + nHalfLWidth;
+ endX = rLRect.Left( ) + static_cast<long>(nHalfLWidth);
endY = rLRect.Top( ) + rLRect.Height( );
}
diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx
index 058a622..4ea1d07 100644
--- a/sw/source/ui/frmdlg/column.cxx
+++ b/sw/source/ui/frmdlg/column.cxx
@@ -540,10 +540,10 @@ SwColumnPage::SwColumnPage(Window *pParent, const SfxItemSet &rSet)
aLineTypeDLB.InsertEntry( ::editeng::SvxBorderLine::getWidthImpl( ::editeng::DOTTED ), ::editeng::DOTTED );
aLineTypeDLB.InsertEntry( ::editeng::SvxBorderLine::getWidthImpl( ::editeng::DASHED ), ::editeng::DASHED );
- long nLineWidth = MetricField::ConvertDoubleValue(
+ long nLineWidth = static_cast<long>(MetricField::ConvertDoubleValue(
aLineWidthEdit.GetValue( ),
aLineWidthEdit.GetDecimalDigits( ),
- aLineWidthEdit.GetUnit(), MAP_TWIP );
+ aLineWidthEdit.GetUnit(), MAP_TWIP ));
aLineTypeDLB.SetWidth( nLineWidth );
// Fill the color listbox
@@ -731,10 +731,10 @@ IMPL_LINK( SwColumnPage, UpdateColMgr, void *, /*pField*/ )
sal_Bool bEnable = 0 != nPos;
aLineHeightEdit.Enable( bEnable );
aLineHeightLbl.Enable( bEnable );
- long nLineWidth = MetricField::ConvertDoubleValue(
+ long nLineWidth = static_cast<long>(MetricField::ConvertDoubleValue(
aLineWidthEdit.GetValue( ),
aLineWidthEdit.GetDecimalDigits( ),
- aLineWidthEdit.GetUnit(), MAP_TWIP );
+ aLineWidthEdit.GetUnit(), MAP_TWIP ));
if( !bEnable )
pColMgr->SetNoLine();
else if( LISTBOX_ENTRY_NOTFOUND != nPos )
diff --git a/sw/source/ui/misc/pgfnote.cxx b/sw/source/ui/misc/pgfnote.cxx
index 231a7c0..2e899cf 100644
--- a/sw/source/ui/misc/pgfnote.cxx
+++ b/sw/source/ui/misc/pgfnote.cxx
@@ -113,10 +113,10 @@ IMPL_LINK( SwFootNotePage, HeightModify, MetricField *, EMPTYARG )
IMPL_LINK( SwFootNotePage, LineWidthChanged_Impl, void *, EMPTYARG )
{
- sal_Int64 nVal = MetricField::ConvertDoubleValue(
+ sal_Int64 nVal = static_cast<sal_Int64>(MetricField::ConvertDoubleValue(
aLineWidthEdit.GetValue( ),
aLineWidthEdit.GetDecimalDigits( ),
- aLineWidthEdit.GetUnit(), MAP_TWIP );
+ aLineWidthEdit.GetUnit(), MAP_TWIP ));
aLineTypeBox.SetWidth( nVal );
return 0;
@@ -216,9 +216,9 @@ void SwFootNotePage::Reset(const SfxItemSet &rSet)
// Separator width
aLineWidthEdit.SetModifyHdl( LINK( this, SwFootNotePage, LineWidthChanged_Impl ) );
- sal_Int64 nWidthPt = MetricField::ConvertDoubleValue(
+ sal_Int64 nWidthPt = static_cast<sal_Int64>(MetricField::ConvertDoubleValue(
sal_Int64( pFtnInfo->GetLineWidth() ), aLineWidthEdit.GetDecimalDigits(),
- MAP_TWIP, aLineWidthEdit.GetUnit( ) );
+ MAP_TWIP, aLineWidthEdit.GetUnit( ) ));
aLineWidthEdit.SetValue( nWidthPt );
// Separator style
@@ -313,10 +313,10 @@ sal_Bool SwFootNotePage::FillItemSet(SfxItemSet &rSet)
rFtnInfo.SetLineStyle( ::editeng::SvxBorderStyle( aLineTypeBox.GetSelectEntryStyle() ) );
// Separator width
- long nWidth = MetricField::ConvertDoubleValue(
+ long nWidth = static_cast<long>(MetricField::ConvertDoubleValue(
aLineWidthEdit.GetValue( ),
aLineWidthEdit.GetDecimalDigits( ),
- aLineWidthEdit.GetUnit(), MAP_TWIP );
+ aLineWidthEdit.GetUnit(), MAP_TWIP ));
rFtnInfo.SetLineWidth( nWidth );
// Separator color
diff --git a/sw/source/ui/vba/vbacell.cxx b/sw/source/ui/vba/vbacell.cxx
index cbba50d..2aada34 100644
--- a/sw/source/ui/vba/vbacell.cxx
+++ b/sw/source/ui/vba/vbacell.cxx
@@ -87,7 +87,7 @@ void SAL_CALL SwVbaCell::setHeightRule( ::sal_Int32 _heightrule ) throw (css::un
void SAL_CALL SwVbaCell::SetWidth( float width, sal_Int32 /*rulestyle*/ ) throw (css::uno::RuntimeException)
{
// FIXME: handle the argument: rulestyle
- setWidth( width );
+ setWidth( static_cast<sal_Int32>(width) );
}
void SAL_CALL SwVbaCell::SetHeight( float height, sal_Int32 heightrule ) throw (css::uno::RuntimeException)
diff --git a/sw/source/ui/vba/vbatablehelper.cxx b/sw/source/ui/vba/vbatablehelper.cxx
index 072c394..de37466 100644
--- a/sw/source/ui/vba/vbatablehelper.cxx
+++ b/sw/source/ui/vba/vbatablehelper.cxx
@@ -221,7 +221,7 @@ sal_Int32 SwVbaTableHelper::GetColWidth( sal_Int32 nCol, sal_Int32 nRow, sal_Boo
sal_Int32 nTableWidth = getTableWidth( );
double dAbsWidth = ( (double)nWidth / UNO_TABLE_COLUMN_SUM ) * (double) nTableWidth;
- return ( sal_Int32 )Millimeter::getInPoints( dAbsWidth );
+ return ( sal_Int32 )Millimeter::getInPoints( static_cast<int>(dAbsWidth) );
}
sal_Int32 SwVbaTableHelper::GetColWidth( SwTabCols& rCols, sal_Int32 nNum ) throw (uno::RuntimeException)
commit 582c736c21a138f563f03a807ee4954c08fd3497
Author: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
Date: Tue May 17 00:14:20 2011 +0200
WaE (picky) - noeol
diff --git a/sw/inc/ndole.hxx b/sw/inc/ndole.hxx
index 2ba6015..f5ef248 100644
--- a/sw/inc/ndole.hxx
+++ b/sw/inc/ndole.hxx
@@ -168,4 +168,4 @@ inline const SwOLENode *SwNode::GetOLENode() const
#endif // _NDOLE_HXX
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index 46c1a76..cf6b0c1 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -2790,4 +2790,4 @@ void SwTxtFrm::repaintTextFrames( const SwTxtNode& rNode )
}
}
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/undo/unbkmk.cxx b/sw/source/core/undo/unbkmk.cxx
index 2da6446..ad9ce2f 100644
--- a/sw/source/core/undo/unbkmk.cxx
+++ b/sw/source/core/undo/unbkmk.cxx
@@ -104,4 +104,4 @@ void SwUndoInsBookmark::RedoImpl(::sw::UndoRedoContext & rContext)
}
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/undo/unoutl.cxx b/sw/source/core/undo/unoutl.cxx
index 11106dd..ae035fb 100644
--- a/sw/source/core/undo/unoutl.cxx
+++ b/sw/source/core/undo/unoutl.cxx
@@ -61,4 +61,4 @@ void SwUndoOutlineLeftRight::RepeatImpl(::sw::RepeatContext & rContext)
}
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/undo/unredln.cxx b/sw/source/core/undo/unredln.cxx
index f3521c3..58e10d4 100644
--- a/sw/source/core/undo/unredln.cxx
+++ b/sw/source/core/undo/unredln.cxx
@@ -538,4 +538,4 @@ void SwUndoCompDoc::RedoImpl(::sw::UndoRedoContext & rContext)
}
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/undo/unsort.cxx b/sw/source/core/undo/unsort.cxx
index 6f0f59b..a39dd1d 100644
--- a/sw/source/core/undo/unsort.cxx
+++ b/sw/source/core/undo/unsort.cxx
@@ -275,4 +275,4 @@ void SwUndoSort::Insert( sal_uLong nOrgPos, sal_uLong nNewPos)
}
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/config/cfgitems.cxx b/sw/source/ui/config/cfgitems.cxx
index abf7bba..451bccd 100644
--- a/sw/source/ui/config/cfgitems.cxx
+++ b/sw/source/ui/config/cfgitems.cxx
@@ -382,4 +382,4 @@ int SwTestItem::operator==( const SfxPoolItem& rAttr ) const
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dialog/macassgn.cxx b/sw/source/ui/dialog/macassgn.cxx
index 69b8d43..8b31f40 100644
--- a/sw/source/ui/dialog/macassgn.cxx
+++ b/sw/source/ui/dialog/macassgn.cxx
@@ -158,4 +158,4 @@ sal_Bool SwMacroAssignDlg::INetFmtDlg( Window* pParent, SwWrtShell& rSh,
return bRet;
}
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx
index 1f18e01..0d43184 100644
--- a/sw/source/ui/dialog/swdlgfact.hxx
+++ b/sw/source/ui/dialog/swdlgfact.hxx
@@ -584,4 +584,4 @@ struct SwDialogsResMgr
#endif
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
More information about the Libreoffice-commits
mailing list