summaryrefslogtreecommitdiff
path: root/embeddedobj
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2018-11-26 10:36:52 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2018-12-01 18:20:24 +0100
commitfff501a3393b459c512ec155e2d2cd935e7885a2 (patch)
tree625ea119195475e2680ba7f1be1c73b2a31a0684 /embeddedobj
parentaf843af4c816ef25246c815e187729ec25b2f000 (diff)
tdf#120703 PVS: V560 A part of conditional expression is always true/false
Change-Id: I38f3e3243f8cb891c9a0fe2f4c68bc76acd1ef44 Reviewed-on: https://gerrit.libreoffice.org/64020 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'embeddedobj')
-rw-r--r--embeddedobj/source/commonembedding/persistence.cxx10
1 files changed, 1 insertions, 9 deletions
diff --git a/embeddedobj/source/commonembedding/persistence.cxx b/embeddedobj/source/commonembedding/persistence.cxx
index 06562ac39682..aae1180f8d8b 100644
--- a/embeddedobj/source/commonembedding/persistence.cxx
+++ b/embeddedobj/source/commonembedding/persistence.cxx
@@ -1771,7 +1771,7 @@ void SAL_CALL OCommonEmbeddedObject::breakLink( const uno::Reference< embed::XSt
if ( m_bDisposed )
throw lang::DisposedException(); // TODO
- if ( !m_bIsLink )
+ if (!m_bIsLink || m_nObjectState == -1)
{
// it must be a linked initialized object
throw embed::WrongStateException(
@@ -1791,14 +1791,6 @@ void SAL_CALL OCommonEmbeddedObject::breakLink( const uno::Reference< embed::XSt
static_cast< ::cppu::OWeakObject* >(this),
2 );
- if ( !m_bIsLink || m_nObjectState == -1 )
- {
- // it must be a linked initialized object
- throw embed::WrongStateException(
- "The object is not a valid linked object!",
- static_cast< ::cppu::OWeakObject* >(this) );
- }
-
if ( m_bWaitSaveCompleted )
throw embed::WrongStateException(
"The object waits for saveCompleted() call!",