Kaydet (Commit) a4e9a5c6 authored tarafından Julien Nabet's avatar Julien Nabet

Some cppcheck cleaning

üst 7a1ed126
......@@ -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);
......
......@@ -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);
......
......@@ -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; }
};
......
......@@ -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);
};
......
......@@ -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:
......
......@@ -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 )
......
......@@ -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)
{
......
......@@ -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);
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment