[Libreoffice-commits] .: 11 commits - sw/qa sw/source uui/source vbahelper/source writerfilter/source
Tor Lillqvist
tml at kemper.freedesktop.org
Fri Oct 7 05:57:06 PDT 2011
sw/qa/core/swdoc-test.cxx | 7 ++-
sw/source/ui/index/cnttab.cxx | 10 ++--
sw/source/ui/vba/vbalistlevel.cxx | 1
sw/source/ui/vba/vbastyle.cxx | 3 -
sw/source/ui/vba/vbasystem.cxx | 6 +-
sw/source/ui/vba/vbatabstops.cxx | 4 -
uui/source/interactionhandler.cxx | 1
vbahelper/source/msforms/vbalistcontrolhelper.cxx | 1
vbahelper/source/vbahelper/vbashaperange.cxx | 26 +++++------
writerfilter/source/dmapper/DomainMapperTableHandler.cxx | 2
writerfilter/source/dmapper/DomainMapper_Impl.cxx | 6 +-
writerfilter/source/dmapper/FormControlHelper.cxx | 2
writerfilter/source/dmapper/GraphicImport.hxx | 2
writerfilter/source/dmapper/NumberingManager.cxx | 2
writerfilter/source/dmapper/PropertyMap.cxx | 2
writerfilter/source/ooxml/factoryimpl_ns.xsl | 4 +
writerfilter/source/rtftok/rtftokenizer.cxx | 34 ++++++++++-----
17 files changed, 69 insertions(+), 44 deletions(-)
New commits:
commit 8aeeb8eb06640ed454ba8aa660964368b977568e
Author: Tor Lillqvist <tlillqvist at suse.com>
Date: Fri Oct 7 15:54:40 2011 +0300
WaE: class has virtual functions, but destructor is not virtual
diff --git a/vbahelper/source/msforms/vbalistcontrolhelper.cxx b/vbahelper/source/msforms/vbalistcontrolhelper.cxx
index 696b52b..828c766 100644
--- a/vbahelper/source/msforms/vbalistcontrolhelper.cxx
+++ b/vbahelper/source/msforms/vbalistcontrolhelper.cxx
@@ -17,6 +17,7 @@ private:
public:
ListPropListener( const uno::Reference< beans::XPropertySet >& xProps, const uno::Any& pvargIndex, const uno::Any& pvarColumn );
+ virtual ~ListPropListener() { };
virtual void setValueEvent( const css::uno::Any& value );
virtual css::uno::Any getValueEvent();
};
commit fd5a9a65f0cadd046d2f67924ba9e3d0a380208f
Author: Tor Lillqvist <tlillqvist at suse.com>
Date: Fri Oct 7 15:52:44 2011 +0300
WaE: unreachable code
Interesting use of for loops with the body of the loop returning
unconditionally.
diff --git a/vbahelper/source/vbahelper/vbashaperange.cxx b/vbahelper/source/vbahelper/vbashaperange.cxx
index 44f2845..417cb1f 100644
--- a/vbahelper/source/vbahelper/vbashaperange.cxx
+++ b/vbahelper/source/vbahelper/vbashaperange.cxx
@@ -129,7 +129,7 @@ ScVbaShapeRange::IncrementTop( double Increment ) throw (uno::RuntimeException)
rtl::OUString SAL_CALL ScVbaShapeRange::getName() throw (uno::RuntimeException)
{
sal_Int32 nLen = getCount();
- for ( sal_Int32 index = 1; index <= nLen; ++index )
+ for ( sal_Int32 index = 1; index <= nLen; /* ++index unreachable */ )
{
uno::Reference< msforms::XShape > xShape( Item( uno::makeAny( index ), uno::Any() ), uno::UNO_QUERY_THROW );
return xShape->getName( );
@@ -150,7 +150,7 @@ void SAL_CALL ScVbaShapeRange::setName( const rtl::OUString& _name ) throw (uno:
double SAL_CALL ScVbaShapeRange::getHeight() throw (uno::RuntimeException)
{
sal_Int32 nLen = getCount();
- for ( sal_Int32 index = 1; index <= nLen; ++index )
+ for ( sal_Int32 index = 1; index <= nLen; /* ++index unreachable */ )
{
uno::Reference< msforms::XShape > xShape( Item( uno::makeAny( index ), uno::Any() ), uno::UNO_QUERY_THROW );
return xShape->getHeight( );
@@ -171,7 +171,7 @@ void SAL_CALL ScVbaShapeRange::setHeight( double _height ) throw (uno::RuntimeEx
double SAL_CALL ScVbaShapeRange::getWidth() throw (uno::RuntimeException)
{
sal_Int32 nLen = getCount();
- for ( sal_Int32 index = 1; index <= nLen; ++index )
+ for ( sal_Int32 index = 1; index <= nLen; /* ++index unreachable */ )
{
uno::Reference< msforms::XShape > xShape( Item( uno::makeAny( index ), uno::Any() ), uno::UNO_QUERY_THROW );
return xShape->getWidth( );
@@ -192,7 +192,7 @@ void SAL_CALL ScVbaShapeRange::setWidth( double _width ) throw (uno::RuntimeExce
double SAL_CALL ScVbaShapeRange::getLeft() throw (uno::RuntimeException)
{
sal_Int32 nLen = getCount();
- for ( sal_Int32 index = 1; index <= nLen; ++index )
+ for ( sal_Int32 index = 1; index <= nLen; /* ++index unreachable */ )
{
uno::Reference< msforms::XShape > xShape( Item( uno::makeAny( index ), uno::Any() ), uno::UNO_QUERY_THROW );
return xShape->getLeft();
@@ -213,7 +213,7 @@ void SAL_CALL ScVbaShapeRange::setLeft( double _left ) throw (uno::RuntimeExcept
double SAL_CALL ScVbaShapeRange::getTop() throw (uno::RuntimeException)
{
sal_Int32 nLen = getCount();
- for ( sal_Int32 index = 1; index <= nLen; ++index )
+ for ( sal_Int32 index = 1; index <= nLen; /* ++index unreachable */ )
{
uno::Reference< msforms::XShape > xShape( Item( uno::makeAny( index ), uno::Any() ), uno::UNO_QUERY_THROW );
return xShape->getTop();
@@ -234,7 +234,7 @@ void SAL_CALL ScVbaShapeRange::setTop( double _top ) throw (uno::RuntimeExceptio
uno::Reference< ov::msforms::XLineFormat > SAL_CALL ScVbaShapeRange::getLine() throw (css::uno::RuntimeException)
{
sal_Int32 nLen = getCount();
- for ( sal_Int32 index = 1; index <= nLen; ++index )
+ for ( sal_Int32 index = 1; index <= nLen; /* ++index unreachable */ )
{
uno::Reference< msforms::XShape > xShape( Item( uno::makeAny( index ), uno::Any() ), uno::UNO_QUERY_THROW );
return xShape->getLine();
@@ -245,7 +245,7 @@ uno::Reference< ov::msforms::XLineFormat > SAL_CALL ScVbaShapeRange::getLine() t
uno::Reference< ov::msforms::XFillFormat > SAL_CALL ScVbaShapeRange::getFill() throw (css::uno::RuntimeException)
{
sal_Int32 nLen = getCount();
- for ( sal_Int32 index = 1; index <= nLen; ++index )
+ for ( sal_Int32 index = 1; index <= nLen; /* ++index unreachable */ )
{
uno::Reference< msforms::XShape > xShape( Item( uno::makeAny( index ), uno::Any() ), uno::UNO_QUERY_THROW );
return xShape->getFill();
@@ -256,7 +256,7 @@ uno::Reference< ov::msforms::XFillFormat > SAL_CALL ScVbaShapeRange::getFill() t
::sal_Bool SAL_CALL ScVbaShapeRange::getLockAspectRatio() throw (uno::RuntimeException)
{
sal_Int32 nLen = getCount();
- for ( sal_Int32 index = 1; index <= nLen; ++index )
+ for ( sal_Int32 index = 1; index <= nLen; /* ++index unreachable */ )
{
uno::Reference< msforms::XShape > xShape( Item( uno::makeAny( index ), uno::Any() ), uno::UNO_QUERY_THROW );
return xShape->getLockAspectRatio();
@@ -277,7 +277,7 @@ void SAL_CALL ScVbaShapeRange::setLockAspectRatio( ::sal_Bool _lockaspectratio )
::sal_Bool SAL_CALL ScVbaShapeRange::getLockAnchor() throw (uno::RuntimeException)
{
sal_Int32 nLen = getCount();
- for ( sal_Int32 index = 1; index <= nLen; ++index )
+ for ( sal_Int32 index = 1; index <= nLen; /* ++index unreachable */ )
{
uno::Reference< msforms::XShape > xShape( Item( uno::makeAny( index ), uno::Any() ), uno::UNO_QUERY_THROW );
return xShape->getLockAnchor();
@@ -298,7 +298,7 @@ void SAL_CALL ScVbaShapeRange::setLockAnchor( ::sal_Bool _lockanchor ) throw (un
::sal_Int32 SAL_CALL ScVbaShapeRange::getRelativeHorizontalPosition() throw (uno::RuntimeException)
{
sal_Int32 nLen = getCount();
- for ( sal_Int32 index = 1; index <= nLen; ++index )
+ for ( sal_Int32 index = 1; index <= nLen; /* ++index unreachable */ )
{
uno::Reference< msforms::XShape > xShape( Item( uno::makeAny( index ), uno::Any() ), uno::UNO_QUERY_THROW );
return xShape->getRelativeHorizontalPosition();
@@ -319,7 +319,7 @@ void SAL_CALL ScVbaShapeRange::setRelativeHorizontalPosition( ::sal_Int32 _relat
::sal_Int32 SAL_CALL ScVbaShapeRange::getRelativeVerticalPosition() throw (uno::RuntimeException)
{
sal_Int32 nLen = getCount();
- for ( sal_Int32 index = 1; index <= nLen; ++index )
+ for ( sal_Int32 index = 1; index <= nLen; /* ++index unreachable */ )
{
uno::Reference< msforms::XShape > xShape( Item( uno::makeAny( index ), uno::Any() ), uno::UNO_QUERY_THROW );
return xShape->getRelativeVerticalPosition();
@@ -340,7 +340,7 @@ void SAL_CALL ScVbaShapeRange::setRelativeVerticalPosition( ::sal_Int32 _relativ
uno::Any SAL_CALL ScVbaShapeRange::TextFrame( ) throw (css::uno::RuntimeException)
{
sal_Int32 nLen = getCount();
- for ( sal_Int32 index = 1; index <= nLen; ++index )
+ for ( sal_Int32 index = 1; index <= nLen; /* ++index unreachable */ )
{
uno::Reference< msforms::XShape > xShape( Item( uno::makeAny( index ), uno::Any() ), uno::UNO_QUERY_THROW );
return xShape->TextFrame();
@@ -351,7 +351,7 @@ uno::Any SAL_CALL ScVbaShapeRange::TextFrame( ) throw (css::uno::RuntimeExcepti
uno::Any SAL_CALL ScVbaShapeRange::WrapFormat( ) throw (css::uno::RuntimeException)
{
sal_Int32 nLen = getCount();
- for ( sal_Int32 index = 1; index <= nLen; ++index )
+ for ( sal_Int32 index = 1; index <= nLen; /* ++index unreachable */ )
{
uno::Reference< msforms::XShape > xShape( Item( uno::makeAny( index ), uno::Any() ), uno::UNO_QUERY_THROW );
return xShape->WrapFormat();
commit b693eba2739361f343dd373b80945542cc6703c1
Author: Tor Lillqvist <tlillqvist at suse.com>
Date: Fri Oct 7 15:51:04 2011 +0300
WaE: truncation of constant value
Just use sal_Unicode as type for cLeader as it is being assigned to a
sal_Unicode field anyway.
diff --git a/sw/source/ui/vba/vbatabstops.cxx b/sw/source/ui/vba/vbatabstops.cxx
index a8b0abd..bdc68a2 100644
--- a/sw/source/ui/vba/vbatabstops.cxx
+++ b/sw/source/ui/vba/vbatabstops.cxx
@@ -163,7 +163,7 @@ uno::Reference< word::XTabStop > SAL_CALL SwVbaTabStops::Add( float Position, co
}
}
- sal_Char cLeader = ' '; // default is space
+ sal_Unicode cLeader = ' '; // default is space
if( Leader.hasValue() )
{
sal_Int32 wdLeader = word::WdTabLeader::wdTabLeaderSpaces;
@@ -177,7 +177,7 @@ uno::Reference< word::XTabStop > SAL_CALL SwVbaTabStops::Add( float Position, co
}
case word::WdTabLeader::wdTabLeaderMiddleDot:
{
- cLeader = 183;
+ cLeader = 183; // U+00B7 MIDDLE DOT
break;
}
case word::WdTabLeader::wdTabLeaderDots:
commit e2f3e17c9a5028eaa6a9305012ea2110f1f86bf9
Author: Tor Lillqvist <tlillqvist at suse.com>
Date: Fri Oct 7 15:50:15 2011 +0300
WaE: unreachable code
diff --git a/sw/qa/core/swdoc-test.cxx b/sw/qa/core/swdoc-test.cxx
index c3ec40d..3d27fa0 100644
--- a/sw/qa/core/swdoc-test.cxx
+++ b/sw/qa/core/swdoc-test.cxx
@@ -328,7 +328,12 @@ void SwDocTest::randomTest()
"Jim", "Bob", "JimBobina", "Helga", "Gertrude", "Spagna", "Hurtleweed"
};
- for( sal_uInt16 rlm = 0; rlm < SAL_N_ELEMENTS(modes); rlm++)
+ for( sal_uInt16 rlm = 0;
+ rlm < SAL_N_ELEMENTS(modes);
+#ifdef COMPLEX // otherwise it returns at end of loop, so avoid "unreachable code" warning
+ rlm++
+#endif
+ )
{
#ifdef COMPLEX
m_pDoc->ClearDoc();
diff --git a/sw/source/ui/vba/vbalistlevel.cxx b/sw/source/ui/vba/vbalistlevel.cxx
index b35f7b5..2a4f8f2 100644
--- a/sw/source/ui/vba/vbalistlevel.cxx
+++ b/sw/source/ui/vba/vbalistlevel.cxx
@@ -105,7 +105,6 @@ void SAL_CALL SwVbaListLevel::setAlignment( ::sal_Int32 _alignment ) throw (uno:
uno::Reference< ::ooo::vba::word::XFont > SAL_CALL SwVbaListLevel::getFont() throw (uno::RuntimeException)
{
throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() );
- return uno::Reference< word::XFont >();
}
void SAL_CALL SwVbaListLevel::setFont( const uno::Reference< ::ooo::vba::word::XFont >& /*_font*/ ) throw (uno::RuntimeException)
diff --git a/sw/source/ui/vba/vbastyle.cxx b/sw/source/ui/vba/vbastyle.cxx
index fe70156..e2ff34e 100644
--- a/sw/source/ui/vba/vbastyle.cxx
+++ b/sw/source/ui/vba/vbastyle.cxx
@@ -177,7 +177,6 @@ uno::Reference< word::XParagraphFormat > SAL_CALL SwVbaStyle::getParagraphFormat
{
throw uno::RuntimeException();
}
- return uno::Reference< word::XParagraphFormat >();
}
::sal_Bool SAL_CALL SwVbaStyle::getAutomaticallyUpdate() throw (uno::RuntimeException)
@@ -206,7 +205,6 @@ uno::Any SAL_CALL SwVbaStyle::getBaseStyle() throw (uno::RuntimeException)
{
throw uno::RuntimeException();
}
- return uno::Any();
}
void SAL_CALL SwVbaStyle::setBaseStyle( const uno::Any& _basestyle ) throw (uno::RuntimeException)
@@ -238,7 +236,6 @@ uno::Any SAL_CALL SwVbaStyle::getNextParagraphStyle() throw (uno::RuntimeExcepti
{
throw uno::RuntimeException();
}
- return uno::Any();
}
void SAL_CALL SwVbaStyle::setNextParagraphStyle( const uno::Any& _nextparagraphstyle ) throw (uno::RuntimeException)
diff --git a/sw/source/ui/vba/vbasystem.cxx b/sw/source/ui/vba/vbasystem.cxx
index b397c11..f09ba92 100644
--- a/sw/source/ui/vba/vbasystem.cxx
+++ b/sw/source/ui/vba/vbasystem.cxx
@@ -121,9 +121,10 @@ uno::Any PrivateProfileStringListener::getValueEvent()
}
return uno::makeAny( sValue );
-#endif
+#else
throw uno::RuntimeException( rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM("Only support on Windows")), uno::Reference< uno::XInterface >() );
+#endif
}
return uno::makeAny( sValue );
@@ -165,9 +166,10 @@ void PrivateProfileStringListener::setValueEvent( const css::uno::Any& value )
}
}
return;
-#endif
+#else
throw uno::RuntimeException( rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM("Not implemented")), uno::Reference< uno::XInterface >() );
+#endif
}
}
commit ff86d3ac43e5f3150cd8e4c5e5aed583ff2fcc76
Author: Tor Lillqvist <tlillqvist at suse.com>
Date: Fri Oct 7 15:48:41 2011 +0300
WaE: reinterpret_cast used between related classes
static_cast is what we should need here, say the C++ experts.
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index 9f0f60f..fa75af6 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -3606,7 +3606,7 @@ IMPL_LINK(SwTokenWindow, NextItemHdl, SwTOXEdit*, pEdit)
Control *pCtrlFocus = *iterFocus;
pCtrlFocus->GrabFocus();
- reinterpret_cast<SwTOXButton*>(pCtrlFocus)->Check();
+ static_cast<SwTOXButton*>(pCtrlFocus)->Check();
AdjustScrolling();
}
@@ -3621,7 +3621,7 @@ IMPL_LINK(SwTokenWindow, TbxFocusHdl, SwTOXEdit*, pEdit)
Control *pCtrl = *it;
if (pCtrl && pCtrl->GetType() != WINDOW_EDIT)
- reinterpret_cast<SwTOXButton*>(pCtrl)->Check(false);
+ static_cast<SwTOXButton*>(pCtrl)->Check(false);
}
SetActiveControl(pEdit);
@@ -3652,13 +3652,13 @@ IMPL_LINK(SwTokenWindow, NextItemBtnHdl, SwTOXButton*, pBtn )
if (!isNext)
{
- sal_uInt16 nLen = reinterpret_cast<SwTOXEdit*>(pCtrlFocus)->GetText().Len();
+ sal_uInt16 nLen = static_cast<SwTOXEdit*>(pCtrlFocus)->GetText().Len();
aSel.A() = nLen;
aSel.B() = nLen;
}
- reinterpret_cast<SwTOXEdit*>(pCtrlFocus)->SetSelection(aSel);
+ static_cast<SwTOXEdit*>(pCtrlFocus)->SetSelection(aSel);
pBtn->Check(false);
@@ -3675,7 +3675,7 @@ IMPL_LINK(SwTokenWindow, TbxFocusBtnHdl, SwTOXButton*, pBtn )
Control *pControl = *it;
if (pControl && WINDOW_EDIT != pControl->GetType())
- reinterpret_cast<SwTOXButton*>(pControl)->Check(pBtn == pControl);
+ static_cast<SwTOXButton*>(pControl)->Check(pBtn == pControl);
}
SetActiveControl(pBtn);
commit 86cbc1dd99e79fd0ac325635f02827198298d9aa
Author: Tor Lillqvist <tlillqvist at suse.com>
Date: Fri Oct 7 15:47:08 2011 +0300
WaE: switch statement contains 'default' but no 'case' labels
diff --git a/writerfilter/source/ooxml/factoryimpl_ns.xsl b/writerfilter/source/ooxml/factoryimpl_ns.xsl
index b96f24f..584ca83 100644
--- a/writerfilter/source/ooxml/factoryimpl_ns.xsl
+++ b/writerfilter/source/ooxml/factoryimpl_ns.xsl
@@ -925,6 +925,10 @@ string </xsl:text>
<xsl:text>.hxx"
#include "OOXMLFastHelper.hxx"
+#ifdef _MSC_VER
+#pragma warning(disable:4065) // switch statement contains 'default' but no 'case' labels
+#endif
+
namespace writerfilter {
namespace ooxml {
commit d0aaada2821aee4501e7c16e32843b6d251755c6
Author: Tor Lillqvist <tlillqvist at suse.com>
Date: Fri Oct 7 15:34:20 2011 +0300
WaE: unreferenced local variable
diff --git a/writerfilter/source/dmapper/FormControlHelper.cxx b/writerfilter/source/dmapper/FormControlHelper.cxx
index 9998a2d..9852a39 100644
--- a/writerfilter/source/dmapper/FormControlHelper.cxx
+++ b/writerfilter/source/dmapper/FormControlHelper.cxx
@@ -193,7 +193,7 @@ bool FormControlHelper::createCheckbox(uno::Reference<text::XTextRange> xTextRan
xTextRangeProps->getPropertyValue(sCharHeight) >>= fCheckBoxHeight;
nCheckBoxHeight = static_cast<sal_uInt32>(floor(fCheckBoxHeight * 35.3));
}
- catch (beans::UnknownPropertyException & rException)
+ catch (beans::UnknownPropertyException &)
{
}
}
diff --git a/writerfilter/source/dmapper/NumberingManager.cxx b/writerfilter/source/dmapper/NumberingManager.cxx
index 029e45d..831db8c 100644
--- a/writerfilter/source/dmapper/NumberingManager.cxx
+++ b/writerfilter/source/dmapper/NumberingManager.cxx
@@ -609,7 +609,7 @@ void ListDef::CreateNumberingRules( DomainMapper& rDMapper,
OUString sNumRulesName = aPropNameSupplier.GetName( PROP_NUMBERING_RULES );
xStyle->setPropertyValue( sNumRulesName, uno::makeAny( m_xNumRules ) );
}
- catch( const uno::Exception& rEx)
+ catch( const uno::Exception& )
{
OSL_FAIL( "ListTable::CreateNumberingRules");
}
diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx
index 310bcba..700581a 100644
--- a/writerfilter/source/dmapper/PropertyMap.cxx
+++ b/writerfilter/source/dmapper/PropertyMap.cxx
@@ -714,6 +714,8 @@ void SectionPropertyMap::CopyLastHeaderFooter( bool bFirstPage, DomainMapper_Imp
#if DEBUG
clog << "An exception occurred in SectionPropertyMap::CopyLastHeaderFooter( ) - ";
clog << rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_UTF8 ).getStr( ) << endl;
+#else
+ (void) e;
#endif
}
}
commit 11b64d662d2413ffeab57e625e3e12a402e2b536
Author: Tor Lillqvist <tlillqvist at suse.com>
Date: Fri Oct 7 15:26:29 2011 +0300
WaE: assignment within conditional expression
A whole bunch of them.
diff --git a/writerfilter/source/rtftok/rtftokenizer.cxx b/writerfilter/source/rtftok/rtftokenizer.cxx
index 7ddf0fc..9037fe3 100644
--- a/writerfilter/source/rtftok/rtftokenizer.cxx
+++ b/writerfilter/source/rtftok/rtftokenizer.cxx
@@ -76,11 +76,13 @@ int RTFTokenizer::resolveParse()
switch (ch)
{
case '{':
- if ((ret = m_rImport.pushState()))
+ ret = m_rImport.pushState();
+ if (ret)
return ret;
break;
case '}':
- if ((ret = m_rImport.popState()))
+ ret = m_rImport.popState();
+ if (ret)
return ret;
if (m_rImport.isSubstream() && m_rImport.getGroup() == 0)
{
@@ -89,7 +91,8 @@ int RTFTokenizer::resolveParse()
}
break;
case '\\':
- if ((ret = resolveKeyword()))
+ ret = resolveKeyword();
+ if (ret)
return ret;
break;
case 0x0d:
@@ -100,7 +103,8 @@ int RTFTokenizer::resolveParse()
return ERROR_CHAR_OVER;
if (m_rImport.getState().nInternalState == INTERNAL_NORMAL)
{
- if ((ret = m_rImport.resolveChars(ch)))
+ ret = m_rImport.resolveChars(ch);
+ if (ret)
return ret;
}
else
@@ -114,7 +118,8 @@ int RTFTokenizer::resolveParse()
count--;
if (!count)
{
- if ((ret = m_rImport.resolveChars(b)))
+ ret = m_rImport.resolveChars(b);
+ if (ret)
return ret;
count = 2;
b = 0;
@@ -240,27 +245,34 @@ int RTFTokenizer::dispatchKeyword(OString& rKeyword, bool bParam, int nParam)
{
case CONTROL_FLAG:
// flags ignore any parameter by definition
- if ((ret = m_rImport.dispatchFlag(aRTFControlWords[i].nIndex)))
+ ret = m_rImport.dispatchFlag(aRTFControlWords[i].nIndex);
+ if (ret)
return ret;
break;
case CONTROL_DESTINATION:
// same for destinations
- if ((ret = m_rImport.dispatchDestination(aRTFControlWords[i].nIndex)))
+ ret = m_rImport.dispatchDestination(aRTFControlWords[i].nIndex);
+ if (ret)
return ret;
break;
case CONTROL_SYMBOL:
// and symbols
- if ((ret = m_rImport.dispatchSymbol(aRTFControlWords[i].nIndex)))
+ ret = m_rImport.dispatchSymbol(aRTFControlWords[i].nIndex);
+ if (ret)
return ret;
break;
case CONTROL_TOGGLE:
- if ((ret = m_rImport.dispatchToggle(aRTFControlWords[i].nIndex, bParam, nParam)))
+ ret = m_rImport.dispatchToggle(aRTFControlWords[i].nIndex, bParam, nParam);
+ if (ret)
return ret;
break;
case CONTROL_VALUE:
// values require a parameter by definition
- if (bParam && (ret = m_rImport.dispatchValue(aRTFControlWords[i].nIndex, nParam)))
- return ret;
+ if (bParam) {
+ ret = m_rImport.dispatchValue(aRTFControlWords[i].nIndex, nParam);
+ if (ret)
+ return ret;
+ }
break;
}
commit e76df814a59cf19cf052f9a4c82f005ff0bf60f6
Author: Tor Lillqvist <tlillqvist at suse.com>
Date: Fri Oct 7 15:24:38 2011 +0300
WaE: type name first seen using 'struct' now seen using 'class'
diff --git a/writerfilter/source/dmapper/GraphicImport.hxx b/writerfilter/source/dmapper/GraphicImport.hxx
index cc609a7..36c0d6b 100644
--- a/writerfilter/source/dmapper/GraphicImport.hxx
+++ b/writerfilter/source/dmapper/GraphicImport.hxx
@@ -48,7 +48,7 @@ namespace com{ namespace sun { namespace star {
}
namespace beans
{
- class PropertyValue;
+ struct PropertyValue;
typedef ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > PropertyValues;
}
}}}
commit 535cd4acc2d03786669d17c8eb66c353e26331ad
Author: Tor Lillqvist <tlillqvist at suse.com>
Date: Fri Oct 7 15:21:51 2011 +0300
WaE: unreferenced local variable
diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
index 810950e..31f8c20 100644
--- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
@@ -731,6 +731,8 @@ void DomainMapperTableHandler::endTable()
dmapper_logger->startElement("exception");
dmapper_logger->chars(rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_UTF8 ).getStr( ));
dmapper_logger->endElement();
+#else
+ (void) e;
#endif
}
}
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index c9cfd55..d2eaeec 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -108,7 +108,7 @@ sal_Bool lcl_IsUsingEnhancedFields( const uno::Reference< lang::XMultiServiceFac
::comphelper::ConfigurationHelper::readRelativeKey( xCfgAccess, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Filter/Microsoft/Import" ) ), rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ImportWWFieldsAsEnhancedFields" ) ) ) >>= bResult;
}
- catch( uno::Exception& e)
+ catch( uno::Exception& )
{
}
return bResult;
@@ -601,7 +601,7 @@ bool lcl_removeShape( const uno::Reference< text::XTextDocument >& rDoc, const
rTextAppendStack.pop();
bRet = true;
}
- catch( uno::Exception& e )
+ catch( uno::Exception& )
{
}
}
@@ -1408,6 +1408,8 @@ void DomainMapper_Impl::PushShapeContext( const uno::Reference< drawing::XShape
clog << "Exception when adding shape: ";
clog << rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_UTF8 ).getStr( );
clog << endl;
+#else
+ (void) e;
#endif
}
}
commit 2026c163b0f1205b7ad3e7ff65e8a7ea28b64ac4
Author: Tor Lillqvist <tlillqvist at suse.com>
Date: Fri Oct 7 15:19:45 2011 +0300
WaE: unreachable code
diff --git a/uui/source/interactionhandler.cxx b/uui/source/interactionhandler.cxx
index c790d86..992d7aa 100644
--- a/uui/source/interactionhandler.cxx
+++ b/uui/source/interactionhandler.cxx
@@ -105,7 +105,6 @@ UUIInteractionHandler::handle(
{
throw uno::RuntimeException( ex.Message, *this );
}
- return sal_False;
}
char const UUIInteractionHandler::m_aImplementationName[]
More information about the Libreoffice-commits
mailing list