[Libreoffice-commits] .: starmath/source sw/source
Julien Nabet
serval2412 at kemper.freedesktop.org
Thu Feb 10 06:44:34 PST 2011
starmath/source/cursor.cxx | 4 ++--
starmath/source/mathtype.hxx | 12 ++++++------
sw/source/core/text/itratr.cxx | 2 +-
sw/source/ui/dbui/dbtree.cxx | 2 +-
sw/source/ui/docvw/edtwin2.cxx | 2 +-
sw/source/ui/table/tablemgr.cxx | 3 +--
sw/source/ui/uno/unotxdoc.cxx | 2 +-
sw/source/ui/vba/vbarange.hxx | 4 ++--
sw/source/ui/vba/vbatable.hxx | 2 +-
9 files changed, 16 insertions(+), 17 deletions(-)
New commits:
commit 185e6ff3c0ab0dcd168116a725d1247179f6d057
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Thu Feb 10 15:39:08 2011 +0100
Some cppcheck cleaning
diff --git a/starmath/source/cursor.cxx b/starmath/source/cursor.cxx
index 33ae549..8685ee5 100644
--- a/starmath/source/cursor.cxx
+++ b/starmath/source/cursor.cxx
@@ -208,11 +208,11 @@ void SmCursor::DeletePrev(OutputDevice* pDev){
SmNodeList *pLineList = NodeToList(pMergeLine);
//Find iterator to patch
SmNodeList::iterator patchPoint = pLineList->end();
- patchPoint--;
+ --patchPoint;
//Convert second line to list
NodeToList(pLine, pLineList);
//Patch the line list
- patchPoint++;
+ ++patchPoint;
SmCaretPos PosAfterDelete = PatchLineList(pLineList, patchPoint);
//Parse the line
pLine = SmNodeListParser().Parse(pLineList);
diff --git a/starmath/source/mathtype.hxx b/starmath/source/mathtype.hxx
index b03d943..ec3aa24 100644
--- a/starmath/source/mathtype.hxx
+++ b/starmath/source/mathtype.hxx
@@ -108,12 +108,12 @@ private:
sal_uInt8 nTag,sal_uInt8 nSelector,sal_uInt8 nVariation,
sal_Bool bSilent);
void HandleNudge();
- int xfLMOVE(sal_uInt8 nTest) {return nTest&0x80;}
- int xfAUTO(sal_uInt8 nTest) {return nTest&0x10;}
- int xfEMBELL(sal_uInt8 nTest) {return nTest&0x20;}
- int xfNULL(sal_uInt8 nTest) {return nTest&0x10;}
- int xfLSPACE(sal_uInt8 nTest) {return nTest&0x40;}
- int xfRULER(sal_uInt8 nTest) {return nTest&0x20;}
+ int xfLMOVE(sal_uInt8 nTest) const {return nTest&0x80;}
+ int xfAUTO(sal_uInt8 nTest) const {return nTest&0x10;}
+ int xfEMBELL(sal_uInt8 nTest) const {return nTest&0x20;}
+ int xfNULL(sal_uInt8 nTest) const {return nTest&0x10;}
+ int xfLSPACE(sal_uInt8 nTest) const {return nTest&0x40;}
+ int xfRULER(sal_uInt8 nTest) const {return nTest&0x20;}
sal_uInt8 HandleNodes(SmNode *pNode,int nLevel=0);
int StartTemplate(sal_uInt16 nSelector,sal_uInt16 nVariation=0);
diff --git a/sw/source/core/text/itratr.cxx b/sw/source/core/text/itratr.cxx
index 717a791..35adb12 100644
--- a/sw/source/core/text/itratr.cxx
+++ b/sw/source/core/text/itratr.cxx
@@ -372,7 +372,7 @@ public:
SwMinMaxArgs( OutputDevice* pOutI, ViewShell* pShI, ULONG& rMinI, ULONG &rMaxI, ULONG &rAbsI )
: pOut( pOutI ), pSh( pShI ), rMin( rMinI ), rMax( rMaxI ), rAbsMin( rAbsI )
{ nRowWidth = nWordWidth = nWordAdd = 0; nNoLineBreak = STRING_LEN; }
- void Minimum( long nNew ) { if( (long)rMin < nNew ) rMin = nNew; }
+ void Minimum( long nNew ) const { if( (long)rMin < nNew ) rMin = nNew; }
void NewWord() { nWordAdd = nWordWidth = 0; }
};
diff --git a/sw/source/ui/dbui/dbtree.cxx b/sw/source/ui/dbui/dbtree.cxx
index ae57a84..710990e 100644
--- a/sw/source/ui/dbui/dbtree.cxx
+++ b/sw/source/ui/dbui/dbtree.cxx
@@ -98,7 +98,7 @@ class SwDBTreeList_Impl : public cppu::WeakImplHelper1 < XContainerListener >
BOOL HasContext();
SwWrtShell* GetWrtShell() { return pWrtSh;}
void SetWrtShell(SwWrtShell& rSh) { pWrtSh = &rSh;}
- Reference< XNameAccess > GetContext() {return xDBContext;}
+ Reference< XNameAccess > GetContext() const {return xDBContext;}
Reference<XConnection> GetConnection(const rtl::OUString& rSourceName);
};
diff --git a/sw/source/ui/docvw/edtwin2.cxx b/sw/source/ui/docvw/edtwin2.cxx
index a6df9a3..54b8638 100644
--- a/sw/source/ui/docvw/edtwin2.cxx
+++ b/sw/source/ui/docvw/edtwin2.cxx
@@ -136,7 +136,6 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
if( bWeiter && bQuickBalloon)
{
SwRect aFldRect;
- USHORT nStyle = 0; // style of quick help
SwContentAtPos aCntntAtPos( SwContentAtPos::SW_FIELD |
SwContentAtPos::SW_INETATTR |
SwContentAtPos::SW_FTN |
@@ -152,6 +151,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
if( rSh.GetContentAtPos( aPos, aCntntAtPos, FALSE, &aFldRect ) )
{
+ USHORT nStyle = 0; // style of quick help
switch( aCntntAtPos.eCntntAtPos )
{
case SwContentAtPos::SW_TABLEBOXFML:
diff --git a/sw/source/ui/table/tablemgr.cxx b/sw/source/ui/table/tablemgr.cxx
index 749b714..1f3998e 100644
--- a/sw/source/ui/table/tablemgr.cxx
+++ b/sw/source/ui/table/tablemgr.cxx
@@ -139,13 +139,12 @@ void SwTableFUNC::SetColWidth(USHORT nNum, SwTwips nNewWidth )
// aktuelle Breite setzen
// alle folgenden Verschieben
BOOL bCurrentOnly = FALSE;
- SwTwips nWidth = 0;
if ( aCols.Count() > 0 )
{
if(aCols.Count() != GetColCount())
bCurrentOnly = TRUE;
- nWidth = GetColWidth(nNum);
+ SwTwips nWidth = GetColWidth(nNum);
int nDiff = (int)(nNewWidth - nWidth);
if( !nNum )
diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx
index ad3cba0..5be2575 100644
--- a/sw/source/ui/uno/unotxdoc.cxx
+++ b/sw/source/ui/uno/unotxdoc.cxx
@@ -3177,11 +3177,11 @@ uno::Sequence< lang::Locale > SAL_CALL SwXTextDocument::getDocumentLanguages(
nMaxCount = static_cast< sal_Int16 >( aAllLangs.size() );
// build return value
- sal_Int32 nCount = 0;
uno::Sequence< lang::Locale > aLanguages( nMaxCount );
lang::Locale* pLanguage = aLanguages.getArray();
if (nMaxCount > 0)
{
+ sal_Int32 nCount = 0;
const SvtLanguageTable aLangTab;
for (std::set< LanguageType >::const_iterator it = aAllLangs.begin(); it != aAllLangs.end(); ++it)
{
diff --git a/sw/source/ui/vba/vbarange.hxx b/sw/source/ui/vba/vbarange.hxx
index fb6f8e0..f29bfeb 100644
--- a/sw/source/ui/vba/vbarange.hxx
+++ b/sw/source/ui/vba/vbarange.hxx
@@ -57,10 +57,10 @@ public:
SwVbaRange( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::text::XTextDocument >& rTextDocument, const css::uno::Reference< css::text::XTextRange >& rStart, const css::uno::Reference< css::text::XTextRange >& rEnd, sal_Bool _bMaySpanEndOfDocument = sal_False ) throw (css::uno::RuntimeException);
SwVbaRange( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::text::XTextDocument >& rTextDocument, const css::uno::Reference< css::text::XTextRange >& rStart, const css::uno::Reference< css::text::XTextRange >& rEnd, const css::uno::Reference< css::text::XText >& rText, sal_Bool _bMaySpanEndOfDocument = sal_False ) throw (css::uno::RuntimeException);
virtual ~SwVbaRange();
- css::uno::Reference< css::text::XTextDocument > getDocument() { return mxTextDocument; }
+ css::uno::Reference< css::text::XTextDocument > getDocument() const { return mxTextDocument; }
virtual css::uno::Reference< css::text::XTextRange > SAL_CALL getXTextRange() throw (css::uno::RuntimeException);
- css::uno::Reference< css::text::XText > getXText() { return mxText; }
+ css::uno::Reference< css::text::XText > getXText() const { return mxText; }
void setXTextCursor( const css::uno::Reference< css::text::XTextCursor >& xTextCursor ) { mxTextCursor = xTextCursor; }
void Move( const css::uno::Any& _unit, const css::uno::Any& _count, const css::uno::Any& _extend, ooo::vba::word::E_DIRECTION eDirection ) throw (css::uno::RuntimeException);
diff --git a/sw/source/ui/vba/vbatable.hxx b/sw/source/ui/vba/vbatable.hxx
index 235e1f1..2e95d0c 100644
--- a/sw/source/ui/vba/vbatable.hxx
+++ b/sw/source/ui/vba/vbatable.hxx
@@ -15,7 +15,7 @@ class SwVbaTable : public SwVbaTable_BASE
css::uno::Reference< css::text::XTextTable > mxTextTable;
public:
SwVbaTable( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::text::XTextDocument >& rDocument, const css::uno::Reference< css::text::XTextTable >& xTextTable) throw ( css::uno::RuntimeException);
- css::uno::Reference< css::text::XTextDocument > getDocument() { return mxTextDocument; };
+ css::uno::Reference< css::text::XTextDocument > getDocument() const { return mxTextDocument; };
virtual css::uno::Reference< ::ooo::vba::word::XRange > SAL_CALL Range( ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
virtual void SAL_CALL Select( ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
virtual void SAL_CALL Delete( ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
More information about the Libreoffice-commits
mailing list