[Libreoffice-commits] core.git: 12 commits - editeng/source include/sfx2 registry/source sd/source sfx2/source svtools/source svx/source sw/source
Caolán McNamara
caolanm at redhat.com
Wed Jun 18 03:12:48 PDT 2014
editeng/source/misc/svxacorr.cxx | 15 +++++++++++----
include/sfx2/sidebar/Theme.hxx | 4 +++-
registry/source/reflread.cxx | 4 ++--
sd/source/ui/view/Outliner.cxx | 9 ++-------
sfx2/source/sidebar/Theme.cxx | 10 +++-------
svtools/source/control/valueset.cxx | 2 +-
svx/source/dialog/dlgctrl.cxx | 4 ++--
svx/source/dialog/svxbmpnumvalueset.cxx | 2 +-
sw/source/core/doc/docsort.cxx | 10 ++++++----
sw/source/core/txtnode/fntcap.cxx | 2 +-
sw/source/uibase/app/applab.cxx | 8 ++++----
11 files changed, 36 insertions(+), 34 deletions(-)
New commits:
commit f53e88d14d182fb3af3787e8dac2126ac39551fa
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jun 18 10:58:53 2014 +0100
Resolves: fdo#80140 inverted spell-check continue logic
regression from 57779aa0195d77239b339c6dbe17209b3f0cc4ee
"editeng: sal_Bool->bool"
Change-Id: I6042830f5ba1822b1ba59326895080f3375cd701
diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx
index a576cf8..f7149a4 100644
--- a/sd/source/ui/view/Outliner.cxx
+++ b/sd/source/ui/view/Outliner.cxx
@@ -370,10 +370,7 @@ void Outliner::EndSpelling (void)
mnStartPageIndex = (sal_uInt16) -1;
}
-
-
-
-bool Outliner::SpellNextDocument (void)
+bool Outliner::SpellNextDocument()
{
::boost::shared_ptr<ViewShell> pViewShell (mpWeakViewShell.lock());
if (pViewShell->ISA(OutlineViewShell))
@@ -401,11 +398,9 @@ bool Outliner::SpellNextDocument (void)
ClearModifyFlag();
}
- return mbEndOfSearch;
-
+ return !mbEndOfSearch;
}
-
/**
* check next text object
*/
commit ffa9a802ead3ba0c0b958d604037c7f29c806c95
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jun 18 10:03:26 2014 +0100
coverity#1028261 Uncaught exception
Change-Id: I7dd08c182657084ffa635e1960f4d0def6d7a6bb
diff --git a/include/sfx2/sidebar/Theme.hxx b/include/sfx2/sidebar/Theme.hxx
index b0dc72d..8d1a991 100644
--- a/include/sfx2/sidebar/Theme.hxx
+++ b/include/sfx2/sidebar/Theme.hxx
@@ -167,7 +167,9 @@ public:
virtual void SAL_CALL setPropertyValue (
const ::rtl::OUString& rsPropertyName,
const cssu::Any& rValue)
- throw(cssu::RuntimeException, std::exception) SAL_OVERRIDE;
+ throw (css::beans::UnknownPropertyException,
+ css::uno::RuntimeException,
+ std::exception) SAL_OVERRIDE;
virtual cssu::Any SAL_CALL getPropertyValue (
const ::rtl::OUString& rsPropertyName)
throw(css::beans::UnknownPropertyException,
diff --git a/sfx2/source/sidebar/Theme.cxx b/sfx2/source/sidebar/Theme.cxx
index 94a2fe9..e38d3bd 100644
--- a/sfx2/source/sidebar/Theme.cxx
+++ b/sfx2/source/sidebar/Theme.cxx
@@ -473,13 +473,12 @@ Reference<beans::XPropertySetInfo> SAL_CALL Theme::getPropertySetInfo (void)
return Reference<beans::XPropertySetInfo>(this);
}
-
-
-
void SAL_CALL Theme::setPropertyValue (
const ::rtl::OUString& rsPropertyName,
const cssu::Any& rValue)
- throw(cssu::RuntimeException, std::exception)
+ throw (css::beans::UnknownPropertyException,
+ css::uno::RuntimeException,
+ std::exception)
{
PropertyNameToIdMap::const_iterator iId (maPropertyNameToIdMap.find(rsPropertyName));
if (iId == maPropertyNameToIdMap.end())
@@ -520,9 +519,6 @@ void SAL_CALL Theme::setPropertyValue (
BroadcastPropertyChange(GetChangeListeners(eItem, false), aEvent);
}
-
-
-
Any SAL_CALL Theme::getPropertyValue (
const ::rtl::OUString& rsPropertyName)
throw(css::beans::UnknownPropertyException,
commit 3f0011fbc5a2b6df2e8e402077ccdb18b87690c3
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jun 18 09:52:46 2014 +0100
coverity#1210038 Uncaught exception
and hopefully a bunch more
Change-Id: I2acdf069555873303835324a877cd7c38d617ca7
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index c9d2834..8291492 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -2244,10 +2244,17 @@ void SvxAutoCorrectLanguageLists::SetCplSttExceptList( SvStringsISortDtor* pList
SvStringsISortDtor* SvxAutoCorrectLanguageLists::LoadWrdSttExceptList()
{
- SotStorageRef xStg = new SotStorage( sShareAutoCorrFile, STREAM_READ | STREAM_SHARE_DENYNONE, sal_True );
- OUString sTemp ( pXMLImplWrdStt_ExcptLstStr );
- if( xStg.Is() && xStg->IsContained( sTemp ) )
- LoadXMLExceptList_Imp( pWrdStt_ExcptLst, pXMLImplWrdStt_ExcptLstStr, xStg );
+ try
+ {
+ SotStorageRef xStg = new SotStorage( sShareAutoCorrFile, STREAM_READ | STREAM_SHARE_DENYNONE, sal_True );
+ OUString sTemp ( pXMLImplWrdStt_ExcptLstStr );
+ if( xStg.Is() && xStg->IsContained( sTemp ) )
+ LoadXMLExceptList_Imp( pWrdStt_ExcptLst, pXMLImplWrdStt_ExcptLstStr, xStg );
+ }
+ catch (const css::ucb::ContentCreationException e)
+ {
+ SAL_WARN("editeng", "SvxAutoCorrectLanguageLists::LoadWrdSttExceptList: Caught exception: " << e.Message);
+ }
return pWrdStt_ExcptLst;
}
commit 5887aca6d1b3b078b49186f39fd3971a432669e8
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jun 18 09:42:00 2014 +0100
coverity#706034 Unintended sign extension
also
coverity#706033
coverity#706032
coverity#706031
coverity#706030
coverity#706029
coverity#706028
coverity#706027
coverity#706026
coverity#706025
coverity#706024
coverity#706023
coverity#706022
coverity#706021
coverity#706020
coverity#706019
coverity#706018
coverity#706017
coverity#706016
coverity#706015
coverity#706014
coverity#706013
coverity#706012
coverity#706011
coverity#706010
coverity#706009
Change-Id: I7b85e85c21cf57c9a95d3373af97593d4c3bee8f
diff --git a/registry/source/reflread.cxx b/registry/source/reflread.cxx
index f405645..76718ea 100644
--- a/registry/source/reflread.cxx
+++ b/registry/source/reflread.cxx
@@ -578,7 +578,7 @@ public:
sal_uInt16 m_numOfEntries;
sal_uInt16 m_numOfFieldEntries;
- sal_uInt16 m_FIELD_ENTRY_SIZE;
+ size_t m_FIELD_ENTRY_SIZE;
ConstantPool* m_pCP;
FieldList(const sal_uInt8* buffer, sal_uInt16 numEntries, ConstantPool* pCP)
@@ -832,7 +832,7 @@ public:
sal_uInt16 m_numOfEntries;
sal_uInt16 m_numOfMethodEntries;
sal_uInt16 m_numOfParamEntries;
- sal_uInt16 m_PARAM_ENTRY_SIZE;
+ size_t m_PARAM_ENTRY_SIZE;
sal_uInt32* m_pIndex;
ConstantPool* m_pCP;
commit 640365974f84f4cc02d262bb6fb923bb278eeb69
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jun 18 09:39:37 2014 +0100
coverity#706090 Unintended sign extension
Change-Id: Ibeb413fb6494434185efc13a10b61e84917545e7
diff --git a/svx/source/dialog/svxbmpnumvalueset.cxx b/svx/source/dialog/svxbmpnumvalueset.cxx
index 75cd2c6..42ccac0 100644
--- a/svx/source/dialog/svxbmpnumvalueset.cxx
+++ b/svx/source/dialog/svxbmpnumvalueset.cxx
@@ -502,7 +502,7 @@ void SvxBmpNumValueSet::UserDraw( const UserDrawEvent& rUDEvt )
sal_uInt16 nItemId = rUDEvt.GetItemId();
Point aBLPos = aRect.TopLeft();
- int nRectHeight = aRect.GetHeight();
+ long nRectHeight = aRect.GetHeight();
Size aSize(nRectHeight/8, nRectHeight/8);
Graphic aGraphic;
commit e457db4f9d2cfc14f71a5bb2260ee5a4c057d282
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jun 18 09:38:30 2014 +0100
coverity#706098 Unintended sign extension
Change-Id: Iccc81722785a269dc490270dab6ec42eebf9144d
diff --git a/sw/source/core/doc/docsort.cxx b/sw/source/core/doc/docsort.cxx
index 376171c..41c6bb0 100644
--- a/sw/source/core/doc/docsort.cxx
+++ b/sw/source/core/doc/docsort.cxx
@@ -758,9 +758,10 @@ FlatFndBox::FlatFndBox(SwDoc* pDocPtr, const _FndBox& rBox) :
nRows = GetRowCount(rBoxRef);
// Create linear array
- pArr = new const _FndBox*[ nRows * nCols ];
+ size_t nCount = static_cast<size_t>(nRows) * nCols;
+ pArr = new const _FndBox*[nCount];
_FndBox** ppTmp = (_FndBox**)pArr;
- memset( ppTmp, 0, sizeof(const _FndBox*) * nRows * nCols );
+ memset(ppTmp, 0, sizeof(const _FndBox*) * nCount);
FillFlat( rBoxRef );
}
commit 358c1fa7faebd20a6fb9aa3c55503fa411a7bc44
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jun 18 09:36:24 2014 +0100
coverity#736899 Unintended sign extension
Change-Id: I4fcd7df318cec8dccd1516c6d52b7d0c67885a6c
diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx
index d99f1d7..9f1c72c 100644
--- a/svtools/source/control/valueset.cxx
+++ b/svtools/source/control/valueset.cxx
@@ -1037,7 +1037,7 @@ size_t ValueSet::ImplGetItem( const Point& rPos, bool bMove ) const
if (x < mnItemWidth && y < mnItemHeight)
{
// the point is inside item rect and not inside spacing
- const size_t item = (mnFirstLine + row) * mnCols + col;
+ const size_t item = (mnFirstLine + row) * static_cast<size_t>(mnCols) + col;
if (item < mItemList.size())
{
return item;
commit ba9e5da2e73366a143a651e37a34098509da08b2
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jun 18 09:35:27 2014 +0100
coverity#736901 Unintended sign extension
Change-Id: I655578db78ee8db6f4aa83aec944c074eab92ff3
diff --git a/sw/source/core/txtnode/fntcap.cxx b/sw/source/core/txtnode/fntcap.cxx
index 47fe0bd..1930478 100644
--- a/sw/source/core/txtnode/fntcap.cxx
+++ b/sw/source/core/txtnode/fntcap.cxx
@@ -537,7 +537,7 @@ void SwSubFont::DoOnCapitals( SwDoCapitals &rDo )
// do not matter for Writer (and if they did it'd be pretty ugly to propagate
// the option there).
int smallCapsPercentage = smallCapsPercentage66 ? 66 : SMALL_CAPS_PERCENTAGE;
- aFont.SetProportion( (aFont.GetPropr() * smallCapsPercentage ) / 100L );
+ aFont.SetProportion( (aFont.GetPropr() * smallCapsPercentage ) / 100 );
pMagic2 = NULL;
nIndex2 = 0;
SwFntAccess *pSmallFontAccess = new SwFntAccess( pMagic2, nIndex2, &aFont,
commit be5b361a00484dd9f963230eb699e5f3ed6a1c02
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jun 18 09:32:50 2014 +0100
coverity#736903 Unintended sign extension
Change-Id: I66c8953bb482126f0862ea4351c3c0348a3cfd5e
diff --git a/sw/source/uibase/app/applab.cxx b/sw/source/uibase/app/applab.cxx
index 5e7ba14..59015ae 100644
--- a/sw/source/uibase/app/applab.cxx
+++ b/sw/source/uibase/app/applab.cxx
@@ -94,9 +94,9 @@ static const SwFrmFmt *lcl_InsertBCText( SwWrtShell& rSh, const SwLabItem& rItem
//anchor frame to page
aSet.Put( SwFmtAnchor( FLY_AT_PAGE, nPhyPageNum ) );
- aSet.Put( SwFmtHoriOrient( rItem.lLeft + nCol * rItem.lHDist,
+ aSet.Put( SwFmtHoriOrient( rItem.lLeft + static_cast<SwTwips>(nCol) * rItem.lHDist,
text::HoriOrientation::NONE, text::RelOrientation::PAGE_FRAME ) );
- aSet.Put( SwFmtVertOrient( rItem.lUpper + nRow * rItem.lVDist,
+ aSet.Put( SwFmtVertOrient( rItem.lUpper + static_cast<SwTwips>(nRow) * rItem.lVDist,
text::VertOrientation::NONE, text::RelOrientation::PAGE_FRAME ) );
const SwFrmFmt *pFmt = rSh.NewFlyFrm(aSet, true, &rFmt ); // Insert Fly
OSL_ENSURE( pFmt, "Fly not inserted" );
commit c183ef03193811bded3fc34b202c896ead2227de
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jun 18 09:31:39 2014 +0100
coverity#983448 Unintended sign extension
Change-Id: I8526d2e6ebee0c1400dd37a4949544db6c7bffe9
diff --git a/sw/source/core/doc/docsort.cxx b/sw/source/core/doc/docsort.cxx
index 68e46c9..376171c 100644
--- a/sw/source/core/doc/docsort.cxx
+++ b/sw/source/core/doc/docsort.cxx
@@ -902,8 +902,9 @@ void FlatFndBox::FillFlat(const _FndBox& rBox, bool bLastBox)
pSet->Put( pFmt->GetAttrSet() );
if( !ppItemSets )
{
- ppItemSets = new SfxItemSet*[ nRows * nCols ];
- memset( ppItemSets, 0, sizeof(SfxItemSet*) * nRows * nCols );
+ size_t nCount = static_cast<size_t>(nRows) * nCols
+ ppItemSets = new SfxItemSet*[nCount];
+ memset(ppItemSets, 0, sizeof(SfxItemSet*) * nCount);
}
*(ppItemSets + nOff ) = pSet;
}
commit 2f9bd27f641f5a8d570bdd4a07758f6f879e5f7c
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jun 18 09:26:53 2014 +0100
coverity#1132707 Unintended sign extension
Change-Id: I54bcaf13efca35b009bf0e07a50872b2cdc52722
diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx
index ddc9e0c..637ca5a 100644
--- a/svx/source/dialog/dlgctrl.cxx
+++ b/svx/source/dialog/dlgctrl.cxx
@@ -757,8 +757,8 @@ void SvxRectCtl::SetCS(CTL_STYLE eNew)
//Logic Pixel
long SvxPixelCtl::PointToIndex(const Point &aPt) const
{
- sal_Int32 nX = aPt.X() * nLines / aRectSize.Width();
- sal_Int32 nY = aPt.Y() * nLines / aRectSize.Height();
+ long nX = aPt.X() * nLines / aRectSize.Width();
+ long nY = aPt.Y() * nLines / aRectSize.Height();
return nX + nY * nLines ;
}
commit cd29db561357295f0e6e719088053e39fb404469
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jun 18 09:24:08 2014 +0100
coverity#1213345 Unintended sign extension
Change-Id: I1a47bb6583c4e853e5482009bfa659d33f865490
diff --git a/sw/source/uibase/app/applab.cxx b/sw/source/uibase/app/applab.cxx
index 9d9436d..5e7ba14 100644
--- a/sw/source/uibase/app/applab.cxx
+++ b/sw/source/uibase/app/applab.cxx
@@ -131,9 +131,9 @@ static const SwFrmFmt *lcl_InsertLabText( SwWrtShell& rSh, const SwLabItem& rIte
//anchor frame to page
aSet.Put( SwFmtAnchor( FLY_AT_PAGE, nPhyPageNum ) );
- aSet.Put( SwFmtHoriOrient( rItem.lLeft + nCol * rItem.lHDist,
+ aSet.Put( SwFmtHoriOrient( rItem.lLeft + static_cast<SwTwips>(nCol) * rItem.lHDist,
text::HoriOrientation::NONE, text::RelOrientation::PAGE_FRAME ) );
- aSet.Put( SwFmtVertOrient( rItem.lUpper + nRow * rItem.lVDist,
+ aSet.Put( SwFmtVertOrient( rItem.lUpper + static_cast<SwTwips>(nRow) * rItem.lVDist,
text::VertOrientation::NONE, text::RelOrientation::PAGE_FRAME ) );
const SwFrmFmt *pFmt = rSh.NewFlyFrm(aSet, true, &rFmt ); // Insert Fly
OSL_ENSURE( pFmt, "Fly not inserted" );
More information about the Libreoffice-commits
mailing list