diff options
author | Tor Lillqvist <tlillqvist@suse.com> | 2011-10-07 15:50:15 +0300 |
---|---|---|
committer | Tor Lillqvist <tlillqvist@suse.com> | 2011-10-07 15:56:08 +0300 |
commit | e2f3e17c9a5028eaa6a9305012ea2110f1f86bf9 (patch) | |
tree | 83c83b02e5351871e8a6cbd388103572c43830ef /sw | |
parent | ff86d3ac43e5f3150cd8e4c5e5aed583ff2fcc76 (diff) |
WaE: unreachable code
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/core/swdoc-test.cxx | 7 | ||||
-rw-r--r-- | sw/source/ui/vba/vbalistlevel.cxx | 1 | ||||
-rw-r--r-- | sw/source/ui/vba/vbastyle.cxx | 3 | ||||
-rw-r--r-- | sw/source/ui/vba/vbasystem.cxx | 6 |
4 files changed, 10 insertions, 7 deletions
diff --git a/sw/qa/core/swdoc-test.cxx b/sw/qa/core/swdoc-test.cxx index c3ec40d5998e..3d27fa071d39 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 b35f7b52f590..2a4f8f226e49 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 fe701565f146..e2ff34edb7d2 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 b397c11ca3c2..f09ba92fad6b 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 } } |