summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@suse.cz>2012-06-06 18:17:50 +0200
committerAndras Timar <atimar@suse.com>2013-01-13 22:00:32 +0100
commite41a40dd821c21e726415a66400e74750fa76996 (patch)
tree4af0fc61b4b2e90e0a7c20c3b7704a8a12cc73bc
parent0134e6723c9b100a8d56f9b079192a8609dd5ba0 (diff)
fix incorrect OSL_ENSURE -> SAL_WARN_IF conversion (condition not inverted)
Change-Id: I57dfa64c55e046ed51797b2abeb7ba3242e637da (cherry picked from commit dfc4832049c140b7442c085062599aef1953e8fd) Signed-off-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r--sw/source/core/unocore/unodraw.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx
index 7f7a7af2cbf8..6cf0c6d2c140 100644
--- a/sw/source/core/unocore/unodraw.cxx
+++ b/sw/source/core/unocore/unodraw.cxx
@@ -1174,7 +1174,7 @@ void SwXShape::setPropertyValue(const rtl::OUString& rPropertyName, const uno::A
else if(RES_OPAQUE == pEntry->nWID)
{
SvxShape* pSvxShape = GetSvxShape();
- SAL_WARN_IF(pSvxShape, "sw.uno", "No SvxShape found!");
+ SAL_WARN_IF(!pSvxShape, "sw.uno", "No SvxShape found!");
if(pSvxShape)
{
SdrObject* pObj = pSvxShape->GetSdrObject();
@@ -1220,14 +1220,14 @@ void SwXShape::setPropertyValue(const rtl::OUString& rPropertyName, const uno::A
//To prevent this the connection between format and attribute has to be broken before.
const SwPosition *pPos = aAnchor.GetCntntAnchor();
SwTxtNode *pTxtNode = pPos->nNode.GetNode().GetTxtNode();
- SAL_WARN_IF( pTxtNode->HasHints(), "sw.uno", "Missing FlyInCnt-Hint." );
+ SAL_WARN_IF( !pTxtNode->HasHints(), "sw.uno", "Missing FlyInCnt-Hint." );
const xub_StrLen nIdx = pPos->nContent.GetIndex();
SwTxtAttr * const pHnt =
pTxtNode->GetTxtAttrForCharAt(
nIdx, RES_TXTATR_FLYCNT );
- SAL_WARN_IF( pHnt && pHnt->Which() == RES_TXTATR_FLYCNT,
+ SAL_WARN_IF( !pHnt || pHnt->Which() != RES_TXTATR_FLYCNT,
"sw.uno", "Missing FlyInCnt-Hint." );
- SAL_WARN_IF( pHnt && pHnt->GetFlyCnt().GetFrmFmt() == pFmt,
+ SAL_WARN_IF( !pHnt || pHnt->GetFlyCnt().GetFrmFmt() != pFmt,
"sw.uno", "Wrong TxtFlyCnt-Hint." );
const_cast<SwFmtFlyCnt&>(pHnt->GetFlyCnt())
.SetFlyFmt();
@@ -1237,7 +1237,7 @@ void SwXShape::setPropertyValue(const rtl::OUString& rPropertyName, const uno::A
RES_TXTATR_FLYCNT, nIdx );
//create a new one
SwTxtNode *pNd = pInternalPam->GetNode()->GetTxtNode();
- SAL_WARN_IF( pNd, "sw.uno", "Cursor not at TxtNode." );
+ SAL_WARN_IF( !pNd, "sw.uno", "Cursor not at TxtNode." );
SwFmtFlyCnt aFmt( pFmt );
pNd->InsertItem(aFmt, pInternalPam->GetPoint()
->nContent.GetIndex(), 0 );
@@ -1322,14 +1322,14 @@ void SwXShape::setPropertyValue(const rtl::OUString& rPropertyName, const uno::A
//To prevent this the connection between format and attribute has to be broken before.
const SwPosition *pPos = rOldAnchor.GetCntntAnchor();
SwTxtNode *pTxtNode = pPos->nNode.GetNode().GetTxtNode();
- SAL_WARN_IF( pTxtNode->HasHints(), "sw.uno", "Missing FlyInCnt-Hint." );
+ SAL_WARN_IF( !pTxtNode->HasHints(), "sw.uno", "Missing FlyInCnt-Hint." );
const xub_StrLen nIdx = pPos->nContent.GetIndex();
SwTxtAttr * const pHnt =
pTxtNode->GetTxtAttrForCharAt(
nIdx, RES_TXTATR_FLYCNT );
- SAL_WARN_IF( pHnt && pHnt->Which() == RES_TXTATR_FLYCNT,
+ SAL_WARN_IF( !pHnt || pHnt->Which() != RES_TXTATR_FLYCNT,
"sw.uno", "Missing FlyInCnt-Hint." );
- SAL_WARN_IF( pHnt && pHnt->GetFlyCnt().GetFrmFmt() == pFlyFmt,
+ SAL_WARN_IF( !pHnt || pHnt->GetFlyCnt().GetFrmFmt() != pFlyFmt,
"sw.uno", "Wrong TxtFlyCnt-Hint." );
const_cast<SwFmtFlyCnt&>(pHnt->GetFlyCnt())
.SetFlyFmt();
@@ -1365,7 +1365,7 @@ void SwXShape::setPropertyValue(const rtl::OUString& rPropertyName, const uno::A
{
//the RES_TXTATR_FLYCNT needs to be added now
SwTxtNode *pNd = aPam.GetNode()->GetTxtNode();
- SAL_WARN_IF( pNd, "sw.uno", "Crsr is not in a TxtNode." );
+ SAL_WARN_IF( !pNd, "sw.uno", "Crsr is not in a TxtNode." );
SwFmtFlyCnt aFmt( pFlyFmt );
pNd->InsertItem(aFmt,
aPam.GetPoint()->nContent.GetIndex(), 0 );