summaryrefslogtreecommitdiff
path: root/xmloff/source/text/txtimppr.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'xmloff/source/text/txtimppr.cxx')
-rw-r--r--xmloff/source/text/txtimppr.cxx75
1 files changed, 10 insertions, 65 deletions
diff --git a/xmloff/source/text/txtimppr.cxx b/xmloff/source/text/txtimppr.cxx
index 93e8750b8fb2..dcd8c9f559e1 100644
--- a/xmloff/source/text/txtimppr.cxx
+++ b/xmloff/source/text/txtimppr.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,7 +31,7 @@
#include <tools/debug.hxx>
#include <com/sun/star/awt/FontFamily.hpp>
#include <com/sun/star/awt/FontPitch.hpp>
-#include <com/sun/star/table/BorderLine.hpp>
+#include <com/sun/star/table/BorderLine2.hpp>
#include <com/sun/star/text/VertOrientation.hpp>
#include <com/sun/star/text/SizeType.hpp>
#include <tools/string.hxx>
@@ -52,7 +53,7 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::table;
using namespace ::com::sun::star::text;
-sal_Bool XMLTextImportPropertyMapper::handleSpecialItem(
+bool XMLTextImportPropertyMapper::handleSpecialItem(
XMLPropertyState& rProperty,
::std::vector< XMLPropertyState >& rProperties,
const ::rtl::OUString& rValue,
@@ -311,7 +312,6 @@ void XMLTextImportPropertyMapper::finished(
XMLPropertyState* pNewBorders[4] = { 0, 0, 0, 0 };
XMLPropertyState* pAllBorderWidth = 0;
XMLPropertyState* pBorderWidths[4] = { 0, 0, 0, 0 };
- XMLPropertyState* pAnchorType = 0;
XMLPropertyState* pVertOrient = 0;
XMLPropertyState* pVertOrientRelAsChar = 0;
XMLPropertyState* pBackTransparency = NULL; // transparency in %
@@ -367,7 +367,7 @@ void XMLTextImportPropertyMapper::finished(
case CTF_RIGHTBORDERWIDTH: pBorderWidths[XML_LINE_RIGHT] = property; break;
case CTF_TOPBORDERWIDTH: pBorderWidths[XML_LINE_TOP] = property; break;
case CTF_BOTTOMBORDERWIDTH: pBorderWidths[XML_LINE_BOTTOM] = property; break;
- case CTF_ANCHORTYPE: pAnchorType = property; break;
+ case CTF_ANCHORTYPE: break;
case CTF_VERTICALPOS: pVertOrient = property; break;
case CTF_VERTICALREL_ASCHAR: pVertOrientRelAsChar = property; break;
@@ -434,7 +434,7 @@ void XMLTextImportPropertyMapper::finished(
{
if (pAllParaMargin && !pParaMargins[i])
{
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 0
sal_Int16 nTmp = getPropertySetMapper()->GetEntryContextId(
pAllParaMargin->mnIndex + (2*i) + 2 );
OSL_ENSURE( nTmp >= CTF_PARALEFTMARGIN &&
@@ -446,7 +446,7 @@ void XMLTextImportPropertyMapper::finished(
}
if (pAllMargin && !pMargins[i])
{
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 0
sal_Int16 nTmp = getPropertySetMapper()->GetEntryContextId(
pAllMargin->mnIndex + i + 1 );
OSL_ENSURE( nTmp >= CTF_MARGINLEFT && nTmp <= CTF_MARGINBOTTOM,
@@ -486,77 +486,21 @@ void XMLTextImportPropertyMapper::finished(
else
pBorderWidths[i]->mnIndex = -1;
-#ifdef XML_CHECK_UI_CONSTRAINS
- sal_Bool bHasBorder = sal_False;
- if( pBorders[i] )
- {
- table::BorderLine aBorderLine;
- pBorders[i]->maValue >>= aBorderLine;
-
- if( pBorderWidths[i] )
- {
- table::BorderLine 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::BorderLine aBorderLine;
+ table::BorderLine2 aBorderLine;
pBorders[i]->maValue >>= aBorderLine;
- table::BorderLine aBorderLineWidth;
+ table::BorderLine2 aBorderLineWidth;
pBorderWidths[i]->maValue >>= aBorderLineWidth;
aBorderLine.OuterLineWidth = aBorderLineWidth.OuterLineWidth;
aBorderLine.InnerLineWidth = aBorderLineWidth.InnerLineWidth;
aBorderLine.LineDistance = aBorderLineWidth.LineDistance;
+ aBorderLine.LineWidth = aBorderLineWidth.LineWidth;
pBorders[i]->maValue <<= aBorderLine;
}
-#endif
}
if (pAllParaMargin)
@@ -796,3 +740,4 @@ void XMLTextImportPropertyMapper::finished(
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */