summaryrefslogtreecommitdiff
path: root/embeddedobj
diff options
context:
space:
mode:
authorMartyn Russell <martyn@lanedo.com>2012-06-07 18:35:07 +0100
committerMichael Meeks <michael.meeks@suse.com>2012-06-12 12:08:33 +0100
commit4019acf2974b58210ffc1b1975720553e7b5d337 (patch)
treed290a4593c8c369281392f2504974e27b522ac77 /embeddedobj
parentcb0450899ddb2ea75d6a6fcf630f41292af64330 (diff)
cppcheck: avoid unreachable code warnings
Change-Id: I1d126eb10bfebc747d4bb6d153b80abe73a1e81e
Diffstat (limited to 'embeddedobj')
-rw-r--r--embeddedobj/source/msole/xdialogcreator.cxx14
1 files changed, 6 insertions, 8 deletions
diff --git a/embeddedobj/source/msole/xdialogcreator.cxx b/embeddedobj/source/msole/xdialogcreator.cxx
index 935aa29a3fda..c5e8a5f9a9a4 100644
--- a/embeddedobj/source/msole/xdialogcreator.cxx
+++ b/embeddedobj/source/msole/xdialogcreator.cxx
@@ -288,15 +288,14 @@ embed::InsertedObjectInfo SAL_CALL MSOLEDialogObjectCreator::createInstanceByDia
else
throw ucb::CommandAbortedException();
-#else
- throw lang::NoSupportException(); // TODO:
-#endif
-
OSL_ENSURE( aObjectInfo.Object.is(), "No object was created!\n" );
if ( !aObjectInfo.Object.is() )
throw uno::RuntimeException();
return aObjectInfo;
+#else
+ throw lang::NoSupportException(); // TODO:
+#endif
}
//-------------------------------------------------------------------------
@@ -312,7 +311,6 @@ embed::InsertedObjectInfo SAL_CALL MSOLEDialogObjectCreator::createInstanceInitF
embed::InsertedObjectInfo aObjectInfo;
#ifdef WNT
-
if ( !xStorage.is() )
throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No parent storage is provided!\n" )),
uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ),
@@ -341,15 +339,15 @@ embed::InsertedObjectInfo SAL_CALL MSOLEDialogObjectCreator::createInstanceInitF
aObjectInfo.Object = xResult;
// TODO/LATER: in case of iconifie object the icon should be stored in aObjectInfo
-#else
- throw lang::NoSupportException(); // TODO:
-#endif
OSL_ENSURE( aObjectInfo.Object.is(), "No object was created!\n" );
if ( !aObjectInfo.Object.is() )
throw uno::RuntimeException();
return aObjectInfo;
+#else
+ throw lang::NoSupportException(); // TODO:
+#endif
}
//-------------------------------------------------------------------------