[Libreoffice-commits] .: 2 commits - sw/source
Caolán McNamara
caolan at kemper.freedesktop.org
Sun Dec 5 05:00:55 PST 2010
sw/source/core/sw3io/sw3convert.cxx | 3 +--
sw/source/ui/chrdlg/drpcps.cxx | 10 ++++++++--
2 files changed, 9 insertions(+), 4 deletions(-)
New commits:
commit 9eb8bdfa9feb3ecc1e96c5be1e18e19ee656bb47
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Dec 5 13:00:49 2010 +0000
cppcheck: scope of this variable can be reduced
diff --git a/sw/source/core/sw3io/sw3convert.cxx b/sw/source/core/sw3io/sw3convert.cxx
index 06ad257..908edf3 100644
--- a/sw/source/core/sw3io/sw3convert.cxx
+++ b/sw/source/core/sw3io/sw3convert.cxx
@@ -387,13 +387,12 @@ SW_DLLPUBLIC void sw3io_ConvertToOldField( const SwField* pFld, USHORT& rWhich,
if( pOldFmt && nOldFmt )
{
- USHORT i = 0;
-
SvNumberFormatter *pFormatter = ((SwValueField*)pFld)->GetDoc()->GetNumberFormatter();
const SvNumberformat* pEntry = pFormatter->GetEntry( nOldFmt );
if( pEntry )
{
+ USHORT i = 0;
while( pOldFmt[i].eFormatIdx != NF_NUMERIC_START ||
pOldFmt[i].nOldFormat )
{
commit 7e6074b5a410beca232461a45f04c181acfe3566
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Dec 5 12:47:01 2010 +0000
cppcheck: initialize these variables
diff --git a/sw/source/ui/chrdlg/drpcps.cxx b/sw/source/ui/chrdlg/drpcps.cxx
index 5f47ec0..ac47945 100644
--- a/sw/source/ui/chrdlg/drpcps.cxx
+++ b/sw/source/ui/chrdlg/drpcps.cxx
@@ -119,8 +119,14 @@ class SwDropCapsPict : public Control
void GetFontSettings( const SwDropCapsPage& _rPage, Font& _rFont, USHORT _nWhich );
public:
- SwDropCapsPict(Window *pParent, const ResId &rResId) :
- Control(pParent, rResId), mpPrinter( NULL ), mbDelPrinter( FALSE ) {}
+ SwDropCapsPict(Window *pParent, const ResId &rResId)
+ : Control(pParent, rResId)
+ , mnTotLineH(0)
+ , mnLineH(0)
+ , mnTextH(0)
+ , mpPrinter( NULL )
+ , mbDelPrinter( FALSE )
+ {}
~SwDropCapsPict();
void UpdatePaintSettings( void ); // also invalidates control!
More information about the Libreoffice-commits
mailing list