summaryrefslogtreecommitdiff
path: root/sw/source/core/unocore/unodraw.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2012-03-21 09:45:25 +0100
committerMiklos Vajna <vmiklos@suse.cz>2012-03-21 09:45:25 +0100
commit28253b4d826a8a008349fa66c902028e3f5a907b (patch)
tree70426a585828db5c7485c01539db9e349ae9b5c3 /sw/source/core/unocore/unodraw.cxx
parentf7d571d2eefea079be3d89f3253ed90cbd9fa07f (diff)
SwXShape::setPropertyValue: OSL_ENSURE -> SAL_WARN_IF
Diffstat (limited to 'sw/source/core/unocore/unodraw.cxx')
-rw-r--r--sw/source/core/unocore/unodraw.cxx26
1 files changed, 13 insertions, 13 deletions
diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx
index 834d14d628ad..ea498424276a 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();
- OSL_ENSURE(pSvxShape, "No SvxShape found!");
+ SAL_WARN_IF(pSvxShape, "sw.uno", "No SvxShape found!");
if(pSvxShape)
{
SdrObject* pObj = pSvxShape->GetSdrObject();
@@ -1220,15 +1220,15 @@ 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();
- OSL_ENSURE( pTxtNode->HasHints(), "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 );
- OSL_ENSURE( pHnt && pHnt->Which() == RES_TXTATR_FLYCNT,
- "Missing FlyInCnt-Hint." );
- OSL_ENSURE( pHnt && pHnt->GetFlyCnt().GetFrmFmt() == pFmt,
- "Wrong TxtFlyCnt-Hint." );
+ SAL_WARN_IF( pHnt && pHnt->Which() == RES_TXTATR_FLYCNT,
+ "sw.uno", "Missing FlyInCnt-Hint." );
+ 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();
- OSL_ENSURE( pNd, "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 );
@@ -1306,15 +1306,15 @@ 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();
- OSL_ENSURE( pTxtNode->HasHints(), "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 );
- OSL_ENSURE( pHnt && pHnt->Which() == RES_TXTATR_FLYCNT,
- "Missing FlyInCnt-Hint." );
- OSL_ENSURE( pHnt && pHnt->GetFlyCnt().GetFrmFmt() == pFlyFmt,
- "Wrong TxtFlyCnt-Hint." );
+ SAL_WARN_IF( pHnt && pHnt->Which() == RES_TXTATR_FLYCNT,
+ "sw.uno", "Missing FlyInCnt-Hint." );
+ SAL_WARN_IF( pHnt && pHnt->GetFlyCnt().GetFrmFmt() == pFlyFmt,
+ "sw.uno", "Wrong TxtFlyCnt-Hint." );
const_cast<SwFmtFlyCnt&>(pHnt->GetFlyCnt())
.SetFlyFmt();
@@ -1349,7 +1349,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();
- OSL_ENSURE( pNd, "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 );