summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2011-02-15 01:21:49 +0100
committerThomas Arnhold <thomas@arnhold.org>2011-02-15 13:27:12 +0100
commitb3e28f672eb06949090c51398d6f2f24fe591936 (patch)
treea17809b319edfc764d3da2ec7eb56c79876592a5 /xmloff
parent6d3f9a4848fc141eb1a87bc77e16ae851d62fe8e (diff)
Remove XML_CHECK_UI_CON(T)STRAINS
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/style/bordrhdl.cxx39
-rw-r--r--xmloff/source/text/txtimppr.cxx57
2 files changed, 0 insertions, 96 deletions
diff --git a/xmloff/source/style/bordrhdl.cxx b/xmloff/source/style/bordrhdl.cxx
index e9701c24799b..7800f8ee3eb7 100644
--- a/xmloff/source/style/bordrhdl.cxx
+++ b/xmloff/source/style/bordrhdl.cxx
@@ -198,31 +198,6 @@ void lcl_frmitems_setXMLBorderStyle( table::BorderLine2 & rBorderLine, sal_uInt1
void lcl_frmitems_setXMLBorderWidth( table::BorderLine &rBorderLine,
sal_uInt16 nWidth, sal_Bool bDouble )
{
-#ifdef XML_CHECK_UI_CONTSTRAINS
- const sal_uInt16 *aWidths;
- sal_uInt16 nSize;
- if( !bDouble )
- {
- aWidths = aSBorderWidths;
- nSize = sizeof( aSBorderWidths );
- }
- else
- {
- aWidths = aDBorderWidths;
- nSize = sizeof( aDBorderWidths );
- }
-
- sal_uInt16 i = (nSize / sizeof(sal_uInt16)) - 4;
- while( i>0 &&
- nWidth <= ((aWidths[i] + aWidths[i-4]) / 2) )
- {
- i -= 4;
- }
-
- rBorderLine.OuterLineWidth = aWidths[i+1];
- rBorderLine.InnerLineWidth = aWidths[i+2];
- rBorderLine.LineDistance = aWidths[i+3];
-#else
if( bDouble )
{
const sal_uInt16 *aWidths = aDBorderWidths;
@@ -245,7 +220,6 @@ void lcl_frmitems_setXMLBorderWidth( table::BorderLine &rBorderLine,
rBorderLine.LineDistance = 0;
}
-#endif
}
@@ -284,19 +258,6 @@ sal_Bool XMLBorderWidthHdl::importXML( const OUString& rStrImpValue, uno::Any& r
if( !rUnitConverter.convertMeasure( nOutWidth, aToken, 0, 500 ) )
return sal_False;
-#ifdef XML_CHECK_UI_CONSTRAINS
- sal_uInt16 nSize = sizeof( aDBorderWidths );
- for( sal_uInt16 i=0; i < nSize; i += 4 )
- {
- if( aDBorderWidths[i+1] == nOutWidth &&
- aDBorderWidths[i+2] == nInWidth &&
- aDBorderWidths[i+3] == nDistance )
- break;
- }
-
- sal_uInt16 nWidth = i < nSize ? 0 : nOutWidth + nInWidth + nDistance;
-#endif
-
table::BorderLine2 aBorderLine;
if(!(rValue >>= aBorderLine))
aBorderLine.Color = 0;
diff --git a/xmloff/source/text/txtimppr.cxx b/xmloff/source/text/txtimppr.cxx
index 274aac773dd1..b18b6c8a3069 100644
--- a/xmloff/source/text/txtimppr.cxx
+++ b/xmloff/source/text/txtimppr.cxx
@@ -435,62 +435,6 @@ void XMLTextImportPropertyMapper::finished(
else
pBorderWidths[i]->mnIndex = -1;
-#ifdef XML_CHECK_UI_CONSTRAINS
- sal_Bool bHasBorder = sal_False;
- if( pBorders[i] )
- {
- table::BorderLine2 aBorderLine;
- pBorders[i]->maValue >>= aBorderLine;
-
- if( pBorderWidths[i] )
- {
- table::BorderLine2 aBorderLineWidth;
- pBorderWidths[i]->maValue >>= aBorderLineWidth;
- aBorderLine.OuterLineWidth = aBorderLineWidth.OuterLineWidth;
- aBorderLine.InnerLineWidth = aBorderLineWidth.InnerLineWidth;
- aBorderLine.LineDistance = aBorderLineWidth.LineDistance;
-
- pBorders[i]->maValue <<= aBorderLine;
- }
- bHasBorder = (aBorderLine.OuterLineWidth +
- aBorderLine.InnerLineWidth) > 0;
- }
- if( bHasBorder )
- {
- if( !pBorderDistances[i] )
- {
-#ifdef DBG_UTIL
- sal_Int16 nTmp = getPropertySetMapper()->GetEntryContextId(
- pBorders[i]->mnIndex + 5 );
- DBG_ASSERT( nTmp >= CTF_LEFTBORDERDISTANCE &&
- nTmp <= CTF_BOTTOMBORDERDISTANCE,
- "wrong property context id" );
-#endif
-
- pNewBorderDistances[i] =
- new XMLPropertyState( pBorders[i]->mnIndex + 5 );
- pNewBorderDistances[i]->maValue <<= (sal_Int32)MIN_BORDER_DIST;
- pBorderDistances[i] = pNewBorderDistances[i];
- }
- else
- {
- sal_Int32 nDist;
- pBorderDistances[i]->maValue >>= nDist;
- if( nDist < MIN_BORDER_DIST )
- pBorderDistances[i]->maValue <<= (sal_Int32)MIN_BORDER_DIST;
- }
- }
- else
- {
- if( pBorderDistances[i] )
- {
- sal_Int32 nDist;
- pBorderDistances[i]->maValue >>= nDist;
- if( nDist > 0 )
- pBorderDistances[i]->maValue <<= (sal_Int32)0;
- }
- }
-#else
if( pBorders[i] && pBorderWidths[i] )
{
table::BorderLine2 aBorderLine;
@@ -505,7 +449,6 @@ void XMLTextImportPropertyMapper::finished(
pBorders[i]->maValue <<= aBorderLine;
}
-#endif
}
if( pAllBorderDistance )
pAllBorderDistance->mnIndex = -1;