diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2012-12-22 08:27:57 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2012-12-22 08:27:57 +0100 |
commit | 8e25844811ebcf313f4ae9d0caae1f97fd230a7d (patch) | |
tree | 80d87e6d5ee4fcf5f444dc9cc88b607d4253f332 /editeng | |
parent | bb51791ae49ecded0f618b4534893adb8fcf917e (diff) |
Some cppcheck cleaning in editeng
Change-Id: I94bf89867cec9cc24f8b96635c515d9477b561a9
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/editeng/editview.cxx | 2 | ||||
-rw-r--r-- | editeng/source/items/borderline.cxx | 40 | ||||
-rw-r--r-- | editeng/source/items/frmitems.cxx | 1 |
3 files changed, 1 insertions, 42 deletions
diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx index 461a1f77260d..7d07aea2bb22 100644 --- a/editeng/source/editeng/editview.cxx +++ b/editeng/source/editeng/editview.cxx @@ -998,9 +998,9 @@ void EditView::ExecuteSpellPopup( const Point& rPosPixel, Link* pCallBack ) Reference< XDictionaryList > xDicList( SvxGetDictionaryList() ); Sequence< Reference< XDictionary > > aDics; - const Reference< XDictionary > *pDic = NULL; if (xDicList.is()) { + const Reference< XDictionary > *pDic = NULL; // add the default positive dictionary to dic-list (if not already done). // This is to ensure that there is at least one dictionary to which // words could be added. diff --git a/editeng/source/items/borderline.cxx b/editeng/source/items/borderline.cxx index 646a3480724c..9e1d8f6186d8 100644 --- a/editeng/source/items/borderline.cxx +++ b/editeng/source/items/borderline.cxx @@ -123,62 +123,45 @@ ConvertBorderStyleFromWord(int const nWordLineStyle) case 9: case 20: return SOLID; - break; case 6: return DOTTED; - break; case 7: return DASHED; - break; case 22: return FINE_DASHED; - break; // then the shading beams which we represent by a double line case 23: return DOUBLE; - break; // then the double lines, for which we have good matches case 3: case 10: // Don't have triple so use double case 21: // Don't have double wave: use double instead return DOUBLE; - break; case 11: return THINTHICK_SMALLGAP; - break; case 12: case 13: // Don't have thin thick thin, so use thick thin return THICKTHIN_SMALLGAP; - break; case 14: return THINTHICK_MEDIUMGAP; - break; case 15: case 16: // Don't have thin thick thin, so use thick thin return THICKTHIN_MEDIUMGAP; - break; case 17: return THINTHICK_LARGEGAP; - break; case 18: case 19: // Don't have thin thick thin, so use thick thin return THICKTHIN_LARGEGAP; - break; case 24: return EMBOSSED; - break; case 25: return ENGRAVED; - break; case 26: return OUTSET; - break; case 27: return INSET; - break; default: return NONE; - break; } } @@ -205,13 +188,10 @@ ConvertBorderWidthFromWord(SvxBorderStyle const eStyle, double const fWidth, { case 2: return (fWidth * 2.0); // thick - break; case 5: // fdo#55526: map 0 hairline width to > 0 return (fWidth > 1.0) ? fWidth : 1.0; - break; default: return fWidth; - break; } break; @@ -222,48 +202,38 @@ ConvertBorderWidthFromWord(SvxBorderStyle const eStyle, double const fWidth, // Display a minimum effective border width of 1pt case FINE_DASHED: return (fWidth > 0 && fWidth < 20) ? 20 : fWidth; - break; // Double lines case DOUBLE: return fWidth * 3.0; - break; case THINTHICK_MEDIUMGAP: case THICKTHIN_MEDIUMGAP: case EMBOSSED: case ENGRAVED: return fWidth * 2.0; - break; case THINTHICK_SMALLGAP: return fWidth + THINTHICK_SMALLGAP_line2 + THINTHICK_SMALLGAP_gap; - break; case THINTHICK_LARGEGAP: return fWidth + THINTHICK_LARGEGAP_line1 + THINTHICK_LARGEGAP_line2; - break; case THICKTHIN_SMALLGAP: return fWidth + THICKTHIN_SMALLGAP_line1 + THICKTHIN_SMALLGAP_gap; - break; case THICKTHIN_LARGEGAP: return fWidth + THICKTHIN_LARGEGAP_line1 + THICKTHIN_LARGEGAP_line2; - break; case OUTSET: return (fWidth * 2.0) + OUTSET_line1; - break; case INSET: return (fWidth * 2.0) + INSET_line2; - break; default: assert(false); // should only be called for known border style return 0; - break; } } @@ -278,48 +248,38 @@ ConvertBorderWidthToWord(SvxBorderStyle const eStyle, double const fWidth) case DASHED: case FINE_DASHED: return fWidth; - break; // Double lines case DOUBLE: return fWidth / 3.0; - break; case THINTHICK_MEDIUMGAP: case THICKTHIN_MEDIUMGAP: case EMBOSSED: case ENGRAVED: return fWidth / 2.0; - break; case THINTHICK_SMALLGAP: return fWidth - THINTHICK_SMALLGAP_line2 - THINTHICK_SMALLGAP_gap; - break; case THINTHICK_LARGEGAP: return fWidth - THINTHICK_LARGEGAP_line1 - THINTHICK_LARGEGAP_line2; - break; case THICKTHIN_SMALLGAP: return fWidth - THICKTHIN_SMALLGAP_line1 - THICKTHIN_SMALLGAP_gap; - break; case THICKTHIN_LARGEGAP: return fWidth - THICKTHIN_LARGEGAP_line1 - THICKTHIN_LARGEGAP_line2; - break; case OUTSET: return (fWidth - OUTSET_line1) / 2.0; - break; case INSET: return (fWidth - INSET_line2) / 2.0; - break; default: assert(false); // should only be called for known border style return 0; - break; } } diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx index 5ee12a8b6139..8360c7a82cf3 100644 --- a/editeng/source/items/frmitems.cxx +++ b/editeng/source/items/frmitems.cxx @@ -1970,7 +1970,6 @@ bool SvxBoxItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) } } return sal_True; - break; } if( bDistMember || nMemberId == BORDER_DISTANCE ) |