[Libreoffice-commits] core.git: 9 commits - sal/rtl svtools/source svx/source sw/source vcl/source xmloff/source
Caolán McNamara
caolanm at redhat.com
Thu Jul 3 06:53:08 PDT 2014
sal/rtl/string.cxx | 2 +-
svtools/source/contnr/svimpbox.cxx | 2 +-
svtools/source/control/valueset.cxx | 4 ++--
svx/source/tbxctrls/colrctrl.cxx | 4 ++--
sw/source/ui/misc/pgfnote.cxx | 3 ++-
sw/source/uibase/utlui/navipi.cxx | 4 ++--
vcl/source/gdi/octree.cxx | 6 +++---
xmloff/source/draw/ximpshap.cxx | 18 ++++++++++--------
8 files changed, 23 insertions(+), 20 deletions(-)
New commits:
commit da0c0f2a846947c56866a3637a6952b3d47f2068
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Jul 3 14:49:01 2014 +0100
this string is in svx
we shouldn't be in this condition, but seeing as we are fix the
string source.
Change-Id: Ia746a24db3daae7952f4b5dbd94a315a4e79cf12
diff --git a/sw/source/ui/misc/pgfnote.cxx b/sw/source/ui/misc/pgfnote.cxx
index a4b32cb..ac5b3ee 100644
--- a/sw/source/ui/misc/pgfnote.cxx
+++ b/sw/source/ui/misc/pgfnote.cxx
@@ -19,6 +19,7 @@
#include <cmdid.h>
#include <hintids.hxx>
+#include <svx/dialmgr.hxx>
#include <svx/dialogs.hrc>
#include <svx/drawitem.hxx>
#include <svx/xtable.hxx>
@@ -232,7 +233,7 @@ void SwFootNotePage::Reset(const SfxItemSet *rSet)
sal_Int32 nSelPos = m_pLineColorBox->GetEntryPos( pFtnInfo->GetLineColor() );
if( nSelPos == LISTBOX_ENTRY_NOTFOUND )
nSelPos = m_pLineColorBox->InsertEntry( pFtnInfo->GetLineColor(),
- OUString( SW_RES( RID_SVXSTR_COLOR_USER ) ) );
+ SVX_RESSTR(RID_SVXSTR_COLOR_USER) );
m_pLineColorBox->SetSelectHdl( LINK( this, SwFootNotePage, LineColorSelected_Impl ) );
m_pLineColorBox->SelectEntryPos( nSelPos );
commit 19100e5e9a0bf5f6829b52e8459f176b5fe7bc51
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Jul 3 13:39:37 2014 +0100
coverity#704112 Unchecked return value
Change-Id: Ic1147662012426126c1cfcf7cb496a3d03cab794
diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx
index dc2d886..1f224a1 100644
--- a/xmloff/source/draw/ximpshap.cxx
+++ b/xmloff/source/draw/ximpshap.cxx
@@ -3865,16 +3865,18 @@ void SdXMLCustomShapeContext::EndElement()
OSL_FAIL( "could not set enhanced customshape geometry" );
}
- sal_Int32 nUPD( 0 );
- sal_Int32 nBuild( 0 );
- GetImport().getBuildIds( nUPD, nBuild );
- if( ((nUPD >= 640 && nUPD <= 645) || (nUPD == 680)) && (nBuild <= 9221) )
+ sal_Int32 nUPD;
+ sal_Int32 nBuild;
+ if (GetImport().getBuildIds(nUPD, nBuild))
{
- Reference< drawing::XEnhancedCustomShapeDefaulter > xDefaulter( mxShape, UNO_QUERY );
- if( xDefaulter.is() )
+ if( ((nUPD >= 640 && nUPD <= 645) || (nUPD == 680)) && (nBuild <= 9221) )
{
- OUString aEmptyType;
- xDefaulter->createCustomShapeDefaults( aEmptyType );
+ Reference< drawing::XEnhancedCustomShapeDefaulter > xDefaulter( mxShape, UNO_QUERY );
+ if( xDefaulter.is() )
+ {
+ OUString aEmptyType;
+ xDefaulter->createCustomShapeDefaults( aEmptyType );
+ }
}
}
}
commit 29e353bdf7990a9d3db36e3210136893bf75fe94
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Jul 3 13:37:04 2014 +0100
coverity#704075 Unchecked return value
Change-Id: Iacb7ccb17106bd3439c56756eb6d6a4b5969465d
diff --git a/sw/source/uibase/utlui/navipi.cxx b/sw/source/uibase/utlui/navipi.cxx
index f20fc03..d73e23f 100644
--- a/sw/source/uibase/utlui/navipi.cxx
+++ b/sw/source/uibase/utlui/navipi.cxx
@@ -1163,8 +1163,8 @@ OUString SwNavigationPI::CreateDropFileName( TransferableDataHelper& rData )
rData.HasFormat( nFmt = SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR ))
{
INetBookmark aBkmk( aEmptyOUStr, aEmptyOUStr );
- rData.GetINetBookmark( nFmt, aBkmk );
- sFileName = aBkmk.GetURL();
+ if (rData.GetINetBookmark(nFmt, aBkmk))
+ sFileName = aBkmk.GetURL();
}
if( !sFileName.isEmpty() )
{
commit d1f9507ff88b6e1934fbfee597182c7c1393e888
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Jul 3 13:32:01 2014 +0100
coverity#706077 Unintended sign extension
Change-Id: I3a5d8a946b5134b4cd58694283bea0fac59a043a
diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx
index 32c694a..a04856c 100644
--- a/svtools/source/contnr/svimpbox.cxx
+++ b/svtools/source/contnr/svimpbox.cxx
@@ -424,7 +424,7 @@ void SvImpLBox::PageDown( sal_uInt16 nDelta )
long nScroll = nRealDelta * (-1);
pView->NotifyScrolling( nScroll );
Rectangle aArea( GetVisibleArea() );
- nScroll = pView->GetEntryHeight()*nRealDelta;
+ nScroll = pView->GetEntryHeight() * static_cast<long>(nRealDelta);
nScroll = -nScroll;
pView->Update();
pView->Scroll( 0, nScroll, aArea, SCROLL_NOCHILDREN );
commit cfdf9a6c5a15a47e44b216ba372ee0b80cfe83b2
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Jul 3 13:30:21 2014 +0100
coverity#706081 Unintended sign extension
and
coverity#706080 Unintended sign extension
Change-Id: Ieb5bd639567767b4c6b2957a9e628eb841713198
diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx
index 0f40053..87a868b 100644
--- a/svtools/source/control/valueset.cxx
+++ b/svtools/source/control/valueset.cxx
@@ -585,7 +585,7 @@ void ValueSet::Format()
}
// draw items
- sal_uLong nFirstItem = mnFirstLine * mnCols;
+ sal_uLong nFirstItem = static_cast<sal_uLong>(mnFirstLine) * mnCols;
sal_uLong nLastItem = nFirstItem + (mnVisLines * mnCols);
maItemListRect.Left() = x;
commit d167d34b9001b59e1b6ebde74f972b972128783a
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Jul 3 13:27:39 2014 +0100
coverity#706094 Unintended sign extension
and
coverity#706093 Unintended sign extension
coverity#706092 Unintended sign extension
coverity#706091 Unintended sign extension
Change-Id: I64ec74ad8eecdb47a6245086ea6e01716a02cd32
diff --git a/svx/source/tbxctrls/colrctrl.cxx b/svx/source/tbxctrls/colrctrl.cxx
index 5209fa9..56ac8a6 100644
--- a/svx/source/tbxctrls/colrctrl.cxx
+++ b/svx/source/tbxctrls/colrctrl.cxx
@@ -365,7 +365,7 @@ void SvxColorDockingWindow::SetSize()
// Scrollbar setzen/entfernen
WinBits nBits = aColorSet.GetStyle();
- if ( nLines * nCols >= nCount )
+ if ( static_cast<long>(nLines) * nCols >= nCount )
nBits &= ~WB_VSCROLL;
else
nBits |= WB_VSCROLL;
@@ -528,7 +528,7 @@ void SvxColorDockingWindow::Resizing( Size& rNewSize )
// Scrollbar setzen/entfernen
WinBits nBits = aColorSet.GetStyle();
- if ( nLines * nCols >= nCount )
+ if ( static_cast<long>(nLines) * nCols >= nCount )
nBits &= ~WB_VSCROLL;
else
nBits |= WB_VSCROLL;
commit 9c3615fa1a8bd3fe5eabd2f4a6a5548bf723cc61
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Jul 3 13:25:00 2014 +0100
coverity#706115 Unintended sign extension
and
coverity#706114 Unintended sign extension
coverity#706113 Unintended sign extension
Change-Id: Ib9ab82082fb353ecfc98a4130fdf2bb136ac1350
diff --git a/vcl/source/gdi/octree.cxx b/vcl/source/gdi/octree.cxx
index 21c0a42..4517b9d 100644
--- a/vcl/source/gdi/octree.cxx
+++ b/vcl/source/gdi/octree.cxx
@@ -260,9 +260,9 @@ InverseColorMap::InverseColorMap( const BitmapPalette& rPal ) :
for( sal_uLong nIndex = 0; nIndex < nColors; nIndex++ )
{
const BitmapColor& rColor = rPal[ (sal_uInt16) nIndex ];
- const sal_uInt8 cRed = rColor.GetRed();
- const sal_uInt8 cGreen = rColor.GetGreen();
- const sal_uInt8 cBlue = rColor.GetBlue();
+ const long cRed = rColor.GetRed();
+ const long cGreen = rColor.GetGreen();
+ const long cBlue = rColor.GetBlue();
rdist = cRed - x2;
gdist = cGreen - x2;
commit bca68c4a34cfea8fce2318c95286fc23ceec920d
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Jul 3 13:20:46 2014 +0100
coverity#736898 Unintended sign extension
Change-Id: Ie09d25b2f9993435ebffc52c7257cd9396672c8f
diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx
index 9f1c72c..0f40053 100644
--- a/svtools/source/control/valueset.cxx
+++ b/svtools/source/control/valueset.cxx
@@ -463,7 +463,7 @@ void ValueSet::Format()
}
// calculate item size
- const long nColSpace = (mnCols - 1) * mnSpacing;
+ const long nColSpace = (mnCols - 1) * static_cast<long>(mnSpacing);
const long nLineSpace = ((mnVisLines - 1) * mnSpacing) + nNoneSpace;
if ( mnUserItemWidth && !mnUserCols )
{
commit 6da22e414892b49146a411ee322ac58e4fbffad1
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Jul 3 13:19:07 2014 +0100
coverity#1187696 Unintended sign extension
Change-Id: I8e56137ad4422381adbf13b179e2ae6f04edea6e
diff --git a/sal/rtl/string.cxx b/sal/rtl/string.cxx
index 2803972..07e3e94 100644
--- a/sal/rtl/string.cxx
+++ b/sal/rtl/string.cxx
@@ -240,7 +240,7 @@ bool SAL_CALL rtl_impl_convertUStringToString(rtl_String ** pTarget,
aTextEncInfo.MaximumCharSize = 8;
}
- nNewLen = nLength*aTextEncInfo.AverageCharSize;
+ nNewLen = nLength * static_cast<sal_Size>(aTextEncInfo.AverageCharSize);
nMaxCharLen = aTextEncInfo.MaximumCharSize;
}
More information about the Libreoffice-commits
mailing list