summaryrefslogtreecommitdiff
path: root/sw/source/core/unocore/unotbl.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/unocore/unotbl.cxx')
-rw-r--r--sw/source/core/unocore/unotbl.cxx192
1 files changed, 96 insertions, 96 deletions
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx
index 335e1143c907..4792cf1a8a5f 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -115,13 +115,13 @@ table::BorderLine lcl_SvxLineToLine(const SvxBorderLine* pLine)
table::BorderLine2 aLine;
if(pLine)
{
- aLine.Color = pLine->GetColor().GetColor() ;
+ aLine.Color = pLine->GetColor().GetColor() ;
aLine.InnerLineWidth = TWIP_TO_MM100_UNSIGNED( pLine->GetInWidth() );
aLine.OuterLineWidth = TWIP_TO_MM100_UNSIGNED( pLine->GetOutWidth() );
- aLine.LineDistance = TWIP_TO_MM100_UNSIGNED( pLine->GetDistance() );
+ aLine.LineDistance = TWIP_TO_MM100_UNSIGNED( pLine->GetDistance() );
}
else
- aLine.Color = aLine.InnerLineWidth = aLine.OuterLineWidth = aLine.LineDistance = 0;
+ aLine.Color = aLine.InnerLineWidth = aLine.OuterLineWidth = aLine.LineDistance = 0;
return aLine;
}
@@ -130,7 +130,7 @@ sal_Bool lcl_LineToSvxLine(const table::BorderLine& rLine, SvxBorderLine& rSvxLi
rSvxLine.SetColor( Color(rLine.Color));
rSvxLine.SetInWidth( MM100_TO_TWIP( rLine.InnerLineWidth ) );
rSvxLine.SetOutWidth(MM100_TO_TWIP( rLine.OuterLineWidth ) );
- rSvxLine.SetDistance(MM100_TO_TWIP( rLine.LineDistance ) );
+ rSvxLine.SetDistance(MM100_TO_TWIP( rLine.LineDistance ) );
sal_Bool bRet = rLine.InnerLineWidth > 0 || rLine.OuterLineWidth > 0;
return bRet;
}
@@ -363,7 +363,7 @@ void lcl_GetCellPosition( const String &rCellName,
}
rColumn = nColIdx;
- rRow = aRowTxt.ToInt32() - 1; // - 1 because indices ought to be 0 based
+ rRow = aRowTxt.ToInt32() - 1; // - 1 because indices ought to be 0 based
}
}
}
@@ -735,7 +735,7 @@ void lcl_setValue( SwXCell &rCell, double nVal )
// - the current number format is not even a valid number formatter number format, but rather Writer's own 'special' text number format
if(SFX_ITEM_SET != pBoxFmt->GetAttrSet().GetItemState(RES_BOXATR_FORMAT, sal_True, &pItem)
|| pDoc->GetNumberFormatter()->IsTextFormat(((SwTblBoxNumFormat*)pItem)->GetValue())
- || ((SwTblBoxNumFormat*)pItem)->GetValue() == NUMBERFORMAT_TEXT)
+ || ((SwTblBoxNumFormat*)pItem)->GetValue() == NUMBERFORMAT_TEXT)
{
aSet.Put(SwTblBoxNumFormat(0));
}
@@ -958,10 +958,10 @@ table::CellContentType SwXCell::getType(void) throw( uno::RuntimeException )
sal_uInt32 nNdPos = pBox->IsFormulaOrValueBox();
switch (nNdPos)
{
- case 0 : nRes = table::CellContentType_TEXT; break;
- case USHRT_MAX : nRes = table::CellContentType_EMPTY; break;
- case RES_BOXATR_VALUE : nRes = table::CellContentType_VALUE; break;
- case RES_BOXATR_FORMULA : nRes = table::CellContentType_FORMULA; break;
+ case 0 : nRes = table::CellContentType_TEXT; break;
+ case USHRT_MAX : nRes = table::CellContentType_EMPTY; break;
+ case RES_BOXATR_VALUE : nRes = table::CellContentType_VALUE; break;
+ case RES_BOXATR_FORMULA : nRes = table::CellContentType_FORMULA; break;
default :
DBG_ERROR( "unexpected case" );
}
@@ -984,7 +984,7 @@ sal_Int32 SwXCell::getError(void) throw( uno::RuntimeException )
uno::Reference< text::XTextCursor > SwXCell::createTextCursor(void) throw( uno::RuntimeException )
{
SolarMutexGuard aGuard;
- uno::Reference< text::XTextCursor > aRef;
+ uno::Reference< text::XTextCursor > aRef;
if(pStartNode || IsValid())
{
const SwStartNode* pSttNd = pStartNode ? pStartNode : pBox->GetSttNd();
@@ -994,11 +994,11 @@ uno::Reference< text::XTextCursor > SwXCell::createTextCursor(void) throw( uno:
SwUnoCrsr *const pUnoCrsr = pXCursor->GetCursor();
pUnoCrsr->Move(fnMoveForward, fnGoNode);
aRef = static_cast<text::XWordCursor*>(pXCursor);
-// // no Cursor in protected sections
-// SwCrsrSaveState aSave( *pUnoCrsr );
-// if(pUnoCrsr->IsInProtectTable( sal_True ) ||
+// // no Cursor in protected sections
+// SwCrsrSaveState aSave( *pUnoCrsr );
+// if(pUnoCrsr->IsInProtectTable( sal_True ) ||
// pUnoCrsr->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_TOGGLE | nsSwCursorSelOverFlags::SELOVER_CHANGEPOS ))
-// throw( uno::RuntimeException() );
+// throw( uno::RuntimeException() );
}
else
throw uno::RuntimeException();
@@ -1044,7 +1044,7 @@ void SwXCell::setPropertyValue(const OUString& rPropertyName, const uno::Any& aV
SolarMutexGuard aGuard;
if(IsValid())
{
- const SfxItemPropertySimpleEntry* pEntry =
+ const SfxItemPropertySimpleEntry* pEntry =
m_pPropSet->getPropertyMap()->getByName(rPropertyName);
if( !pEntry )
{
@@ -1164,11 +1164,11 @@ uno::Reference< container::XEnumeration > SwXCell::createEnumeration(void) thro
pSttNd, pTable);
aRef = pEnum;
-// // no Cursor in protected sections
-// SwCrsrSaveState aSave( *pUnoCrsr );
-// if(pUnoCrsr->IsInProtectTable( sal_True ) ||
+// // no Cursor in protected sections
+// SwCrsrSaveState aSave( *pUnoCrsr );
+// if(pUnoCrsr->IsInProtectTable( sal_True ) ||
// pUnoCrsr->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_TOGGLE | nsSwCursorSelOverFlags::SELOVER_CHANGEPOS ))
-// throw( uno::RuntimeException() );
+// throw( uno::RuntimeException() );
}
return aRef;
}
@@ -1223,7 +1223,7 @@ SwXCell* SwXCell::CreateXCell(SwFrmFmt* pTblFmt, SwTableBox* pBox, SwTable *pTab
}
/* -----------------12.06.98 07:37-------------------
- * exitstiert die Box in der angegebenen Tabelle?
+ * exitstiert die Box in der angegebenen Tabelle?
* --------------------------------------------------*/
SwTableBox* SwXCell::FindBox(SwTable* pTable, SwTableBox* pBox2)
{
@@ -1313,7 +1313,7 @@ void SwXTextTableRow::setPropertyValue(const OUString& rPropertyName,
SwTableLine* pLn = SwXTextTableRow::FindLine(pTable, pLine);
if(pLn)
{
- const SfxItemPropertySimpleEntry* pEntry =
+ const SfxItemPropertySimpleEntry* pEntry =
m_pPropSet->getPropertyMap()->getByName(rPropertyName);
SwDoc* pDoc = pFmt->GetDoc();
if (!pEntry)
@@ -1373,7 +1373,7 @@ uno::Any SwXTextTableRow::getPropertyValue(const OUString& rPropertyName) throw(
SwTableLine* pLn = SwXTextTableRow::FindLine(pTable, pLine);
if(pLn)
{
- const SfxItemPropertySimpleEntry* pEntry =
+ const SfxItemPropertySimpleEntry* pEntry =
m_pPropSet->getPropertyMap()->getByName(rPropertyName);
if (!pEntry)
throw beans::UnknownPropertyException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
@@ -1461,12 +1461,12 @@ BOOL SwXTextTableCursor::supportsService(const OUString& rServiceName) throw( un
}
IMPLEMENT_FORWARD_XINTERFACE2(SwXTextTableCursor,SwXTextTableCursor_Base,OTextCursorHelper)
-const SwPaM* SwXTextTableCursor::GetPaM() const { return GetCrsr(); }
-SwPaM* SwXTextTableCursor::GetPaM() { return GetCrsr(); }
-const SwDoc* SwXTextTableCursor::GetDoc() const { return GetFrmFmt()->GetDoc(); }
-SwDoc* SwXTextTableCursor::GetDoc() { return GetFrmFmt()->GetDoc(); }
-const SwUnoCrsr* SwXTextTableCursor::GetCrsr() const { return (SwUnoCrsr*)aCrsrDepend.GetRegisteredIn(); }
-SwUnoCrsr* SwXTextTableCursor::GetCrsr() { return (SwUnoCrsr*)aCrsrDepend.GetRegisteredIn(); }
+const SwPaM* SwXTextTableCursor::GetPaM() const { return GetCrsr(); }
+SwPaM* SwXTextTableCursor::GetPaM() { return GetCrsr(); }
+const SwDoc* SwXTextTableCursor::GetDoc() const { return GetFrmFmt()->GetDoc(); }
+SwDoc* SwXTextTableCursor::GetDoc() { return GetFrmFmt()->GetDoc(); }
+const SwUnoCrsr* SwXTextTableCursor::GetCrsr() const { return (SwUnoCrsr*)aCrsrDepend.GetRegisteredIn(); }
+SwUnoCrsr* SwXTextTableCursor::GetCrsr() { return (SwUnoCrsr*)aCrsrDepend.GetRegisteredIn(); }
uno::Sequence< OUString > SwXTextTableCursor::getSupportedServiceNames(void) throw( uno::RuntimeException )
{
@@ -1491,7 +1491,7 @@ SwXTextTableCursor::SwXTextTableCursor(SwFrmFmt* pFmt, SwTableBox* pBox) :
pTblCrsr->MakeBoxSels();
}
-SwXTextTableCursor::SwXTextTableCursor(SwFrmFmt& rTableFmt, const SwTableCursor* pTableSelection) :
+SwXTextTableCursor::SwXTextTableCursor(SwFrmFmt& rTableFmt, const SwTableCursor* pTableSelection) :
SwClient(&rTableFmt),
aCrsrDepend(this, 0),
m_pPropSet(aSwMapProvider.GetPropertySet(PROPERTY_MAP_TEXT_TABLE_CURSOR))
@@ -1569,7 +1569,7 @@ sal_Bool SwXTextTableCursor::gotoCellByName(const OUString& CellName, sal_Bool E
if(pUnoCrsr)
{
SwUnoTableCrsr* pTblCrsr = dynamic_cast<SwUnoTableCrsr*>(pUnoCrsr);
- lcl_CrsrSelect( pTblCrsr, Expand );
+ lcl_CrsrSelect( pTblCrsr, Expand );
String sCellName(CellName);
bRet = pTblCrsr->GotoTblBox(sCellName);
}
@@ -1584,7 +1584,7 @@ sal_Bool SwXTextTableCursor::goLeft(sal_Int16 Count, sal_Bool Expand) throw( uno
if(pUnoCrsr)
{
SwUnoTableCrsr* pTblCrsr = dynamic_cast<SwUnoTableCrsr*>(pUnoCrsr);
- lcl_CrsrSelect( pTblCrsr, Expand );
+ lcl_CrsrSelect( pTblCrsr, Expand );
bRet = pTblCrsr->Left( Count,CRSR_SKIP_CHARS, FALSE, FALSE);
}
return bRet;
@@ -1598,7 +1598,7 @@ sal_Bool SwXTextTableCursor::goRight(sal_Int16 Count, sal_Bool Expand) throw( un
if(pUnoCrsr)
{
SwUnoTableCrsr* pTblCrsr = dynamic_cast<SwUnoTableCrsr*>(pUnoCrsr);
- lcl_CrsrSelect( pTblCrsr, Expand );
+ lcl_CrsrSelect( pTblCrsr, Expand );
bRet = pTblCrsr->Right( Count, CRSR_SKIP_CHARS, FALSE, FALSE);
}
return bRet;
@@ -1612,7 +1612,7 @@ sal_Bool SwXTextTableCursor::goUp(sal_Int16 Count, sal_Bool Expand) throw( uno::
if(pUnoCrsr)
{
SwUnoTableCrsr* pTblCrsr = dynamic_cast<SwUnoTableCrsr*>(pUnoCrsr);
- lcl_CrsrSelect( pTblCrsr, Expand );
+ lcl_CrsrSelect( pTblCrsr, Expand );
bRet = pTblCrsr->UpDown(sal_True, Count, 0, 0);
}
return bRet;
@@ -1626,7 +1626,7 @@ sal_Bool SwXTextTableCursor::goDown(sal_Int16 Count, sal_Bool Expand) throw( uno
if(pUnoCrsr)
{
SwUnoTableCrsr* pTblCrsr = dynamic_cast<SwUnoTableCrsr*>(pUnoCrsr);
- lcl_CrsrSelect( pTblCrsr, Expand );
+ lcl_CrsrSelect( pTblCrsr, Expand );
bRet = pTblCrsr->UpDown(sal_False, Count, 0, 0);
}
return bRet;
@@ -1639,7 +1639,7 @@ void SwXTextTableCursor::gotoStart(sal_Bool Expand) throw( uno::RuntimeException
if(pUnoCrsr)
{
SwUnoTableCrsr* pTblCrsr = dynamic_cast<SwUnoTableCrsr*>(pUnoCrsr);
- lcl_CrsrSelect( pTblCrsr, Expand );
+ lcl_CrsrSelect( pTblCrsr, Expand );
pTblCrsr->MoveTable(fnTableCurr, fnTableStart);
}
}
@@ -1651,7 +1651,7 @@ void SwXTextTableCursor::gotoEnd(sal_Bool Expand) throw( uno::RuntimeException )
if(pUnoCrsr)
{
SwUnoTableCrsr* pTblCrsr = dynamic_cast<SwUnoTableCrsr*>(pUnoCrsr);
- lcl_CrsrSelect( pTblCrsr, Expand );
+ lcl_CrsrSelect( pTblCrsr, Expand );
pTblCrsr->MoveTable(fnTableCurr, fnTableEnd);
}
}
@@ -1731,7 +1731,7 @@ void SwXTextTableCursor::setPropertyValue(const OUString& rPropertyName,
const SwTableNode* pTblNode = pSttNode->FindTableNode();
lcl_FormatTable((SwFrmFmt*)pTblNode->GetTable().GetFrmFmt());
SwUnoTableCrsr* pTblCrsr = dynamic_cast<SwUnoTableCrsr*>(pUnoCrsr);
- const SfxItemPropertySimpleEntry* pEntry =
+ const SfxItemPropertySimpleEntry* pEntry =
m_pPropSet->getPropertyMap()->getByName(rPropertyName);
if(pEntry)
{
@@ -1793,7 +1793,7 @@ uno::Any SwXTextTableCursor::getPropertyValue(const OUString& rPropertyName)
const SwTableNode* pTblNode = pSttNode->FindTableNode();
lcl_FormatTable((SwFrmFmt*)pTblNode->GetTable().GetFrmFmt());
SwUnoTableCrsr* pTblCrsr = dynamic_cast<SwUnoTableCrsr*>(pUnoCrsr);
- const SfxItemPropertySimpleEntry* pEntry =
+ const SfxItemPropertySimpleEntry* pEntry =
m_pPropSet->getPropertyMap()->getByName(rPropertyName);
if(pEntry)
{
@@ -1825,7 +1825,7 @@ uno::Any SwXTextTableCursor::getPropertyValue(const OUString& rPropertyName)
default:
{
SfxItemSet aSet(pTblCrsr->GetDoc()->GetAttrPool(),
- RES_CHRATR_BEGIN, RES_FRMATR_END -1,
+ RES_CHRATR_BEGIN, RES_FRMATR_END -1,
RES_UNKNOWNATR_CONTAINER, RES_UNKNOWNATR_CONTAINER,
0L);
// erstmal die Attribute des Cursors
@@ -1903,17 +1903,17 @@ sal_Bool SwTableProperties_Impl::GetProperty(USHORT nWhichId, USHORT nMemberId,
return aAnyMap.FillValue( nWhichId, nMemberId, rpAny );
}
-void SwTableProperties_Impl::ApplyTblAttr(const SwTable& rTbl, SwDoc& rDoc)
+void SwTableProperties_Impl::ApplyTblAttr(const SwTable& rTbl, SwDoc& rDoc)
{
SfxItemSet aSet(rDoc.GetAttrPool(),
- RES_LAYOUT_SPLIT, RES_LAYOUT_SPLIT,
- RES_BACKGROUND, RES_BACKGROUND,
- RES_FRM_SIZE, RES_UL_SPACE,
- RES_HORI_ORIENT, RES_HORI_ORIENT,
- RES_BREAK, RES_BREAK,
- RES_KEEP, RES_KEEP,
- RES_SHADOW, RES_SHADOW,
- RES_PAGEDESC, RES_PAGEDESC,
+ RES_LAYOUT_SPLIT, RES_LAYOUT_SPLIT,
+ RES_BACKGROUND, RES_BACKGROUND,
+ RES_FRM_SIZE, RES_UL_SPACE,
+ RES_HORI_ORIENT, RES_HORI_ORIENT,
+ RES_BREAK, RES_BREAK,
+ RES_KEEP, RES_KEEP,
+ RES_SHADOW, RES_SHADOW,
+ RES_PAGEDESC, RES_PAGEDESC,
0
);
const uno::Any* pRepHead;
@@ -2072,9 +2072,9 @@ void SwTableProperties_Impl::ApplyTblAttr(const SwTable& rTbl, SwDoc& rDoc)
}
//TODO: folgende Propertiers noch impl.
-// FN_UNO_RANGE_ROW_LABEL
-// FN_UNO_RANGE_COL_LABEL
-// FN_UNO_TABLE_BORDER
+// FN_UNO_RANGE_ROW_LABEL
+// FN_UNO_RANGE_COL_LABEL
+// FN_UNO_TABLE_BORDER
if(aSet.Count())
{
@@ -2259,7 +2259,7 @@ void SwXTextTable::attachToRange(const uno::Reference< text::XTextRange > & xTex
OTextCursorHelper* pCursor = 0;
if(xRangeTunnel.is())
{
- pRange = reinterpret_cast< SwXTextRange * >(
+ pRange = reinterpret_cast< SwXTextRange * >(
sal::static_int_cast< sal_IntPtr >( xRangeTunnel->getSomething( SwXTextRange::getUnoTunnelId()) ));
pCursor = reinterpret_cast< OTextCursorHelper * >(
sal::static_int_cast< sal_IntPtr >( xRangeTunnel->getSomething( OTextCursorHelper::getUnoTunnelId()) ));
@@ -2555,8 +2555,8 @@ uno::Sequence< uno::Sequence< uno::Any > > SAL_CALL SwXTextTable::getDataArray()
//const SfxPoolItem* pItem;
//SwDoc* pDoc = pXCell->GetDoc();
//BOOL bIsText = (SFX_ITEM_SET != pBoxFmt->GetAttrSet().GetItemState(RES_BOXATR_FORMAT, sal_True, &pItem)
- // || pDoc->GetNumberFormatter()->IsTextFormat(((SwTblBoxNumFormat*)pItem)->GetValue())
- // || ((SwTblBoxNumFormat*)pItem)->GetValue() == NUMBERFORMAT_TEXT);
+ // || pDoc->GetNumberFormatter()->IsTextFormat(((SwTblBoxNumFormat*)pItem)->GetValue())
+ // || ((SwTblBoxNumFormat*)pItem)->GetValue() == NUMBERFORMAT_TEXT);
if(!bIsNum/*bIsText*/)
pColArray[nCol] <<= lcl_getString(*pXCell);
@@ -2992,7 +2992,7 @@ void SwXTextTable::setPropertyValue(const OUString& rPropertyName,
SwFrmFmt* pFmt = GetFrmFmt();
if(!aValue.hasValue())
throw lang::IllegalArgumentException();
- const SfxItemPropertySimpleEntry* pEntry =
+ const SfxItemPropertySimpleEntry* pEntry =
m_pPropSet->getPropertyMap()->getByName(rPropertyName);
if( !pEntry )
throw lang::IllegalArgumentException();
@@ -3198,7 +3198,7 @@ uno::Any SwXTextTable::getPropertyValue(const OUString& rPropertyName) throw( be
SolarMutexGuard aGuard;
uno::Any aRet;
SwFrmFmt* pFmt = GetFrmFmt();
- const SfxItemPropertySimpleEntry* pEntry =
+ const SfxItemPropertySimpleEntry* pEntry =
m_pPropSet->getPropertyMap()->getByName(rPropertyName);
if(pFmt)
{
@@ -3261,7 +3261,7 @@ uno::Any SwXTextTable::getPropertyValue(const OUString& rPropertyName) throw( be
pUnoCrsr->SetMark();
const SwStartNode* pLastNd = pBRBox->GetSttNd();
pUnoCrsr->GetPoint()->nNode = *pLastNd;
-
+
pUnoCrsr->Move( fnMoveForward, fnGoNode );
SwUnoTableCrsr* pCrsr = dynamic_cast<SwUnoTableCrsr*>(pUnoCrsr);
pCrsr->MakeBoxSels();
@@ -3276,35 +3276,35 @@ uno::Any SwXTextTable::getPropertyValue(const OUString& rPropertyName) throw( be
const SvxBoxItem& rBox = (const SvxBoxItem&)aSet.Get(RES_BOX);
table::TableBorder aTableBorder;
- aTableBorder.TopLine = lcl_SvxLineToLine(rBox.GetTop());
- aTableBorder.IsTopLineValid = rBoxInfoItem.IsValid(VALID_TOP);
- aTableBorder.BottomLine = lcl_SvxLineToLine(rBox.GetBottom());
- aTableBorder.IsBottomLineValid = rBoxInfoItem.IsValid(VALID_BOTTOM);
- aTableBorder.LeftLine = lcl_SvxLineToLine(rBox.GetLeft());
- aTableBorder.IsLeftLineValid = rBoxInfoItem.IsValid(VALID_LEFT);
- aTableBorder.RightLine = lcl_SvxLineToLine(rBox.GetRight());
- aTableBorder.IsRightLineValid = rBoxInfoItem.IsValid(VALID_RIGHT );
- aTableBorder.HorizontalLine = lcl_SvxLineToLine(rBoxInfoItem.GetHori());
- aTableBorder.IsHorizontalLineValid = rBoxInfoItem.IsValid(VALID_HORI);
- aTableBorder.VerticalLine = lcl_SvxLineToLine(rBoxInfoItem.GetVert());
- aTableBorder.IsVerticalLineValid = rBoxInfoItem.IsValid(VALID_VERT);
- aTableBorder.Distance = TWIP_TO_MM100_UNSIGNED( rBox.GetDistance() );
- aTableBorder.IsDistanceValid = rBoxInfoItem.IsValid(VALID_DISTANCE);
+ aTableBorder.TopLine = lcl_SvxLineToLine(rBox.GetTop());
+ aTableBorder.IsTopLineValid = rBoxInfoItem.IsValid(VALID_TOP);
+ aTableBorder.BottomLine = lcl_SvxLineToLine(rBox.GetBottom());
+ aTableBorder.IsBottomLineValid = rBoxInfoItem.IsValid(VALID_BOTTOM);
+ aTableBorder.LeftLine = lcl_SvxLineToLine(rBox.GetLeft());
+ aTableBorder.IsLeftLineValid = rBoxInfoItem.IsValid(VALID_LEFT);
+ aTableBorder.RightLine = lcl_SvxLineToLine(rBox.GetRight());
+ aTableBorder.IsRightLineValid = rBoxInfoItem.IsValid(VALID_RIGHT );
+ aTableBorder.HorizontalLine = lcl_SvxLineToLine(rBoxInfoItem.GetHori());
+ aTableBorder.IsHorizontalLineValid = rBoxInfoItem.IsValid(VALID_HORI);
+ aTableBorder.VerticalLine = lcl_SvxLineToLine(rBoxInfoItem.GetVert());
+ aTableBorder.IsVerticalLineValid = rBoxInfoItem.IsValid(VALID_VERT);
+ aTableBorder.Distance = TWIP_TO_MM100_UNSIGNED( rBox.GetDistance() );
+ aTableBorder.IsDistanceValid = rBoxInfoItem.IsValid(VALID_DISTANCE);
aRet.setValue(&aTableBorder, ::getCppuType((const table::TableBorder*)0));
delete pUnoCrsr;
}
}
break;
case FN_UNO_TABLE_BORDER_DISTANCES :
- {
+ {
table::TableBorderDistances aTableBorderDistances( 0, sal_True, 0, sal_True, 0, sal_True, 0, sal_True ) ;
SwTable* pTable = SwTable::FindTable( pFmt );
const SwTableLines &rLines = pTable->GetTabLines();
bool bFirst = true;
- USHORT nLeftDistance = 0;
- USHORT nRightDistance = 0;
- USHORT nTopDistance = 0;
- USHORT nBottomDistance = 0;
+ USHORT nLeftDistance = 0;
+ USHORT nRightDistance = 0;
+ USHORT nTopDistance = 0;
+ USHORT nBottomDistance = 0;
for(sal_uInt16 i = 0; i < rLines.Count(); i++)
{
@@ -3325,38 +3325,38 @@ uno::Any SwXTextTable::getPropertyValue(const OUString& rPropertyName) throw( be
}
else
{
- if( aTableBorderDistances.IsLeftDistanceValid &&
+ if( aTableBorderDistances.IsLeftDistanceValid &&
nLeftDistance != TWIP_TO_MM100_UNSIGNED( rBox.GetDistance( BOX_LINE_LEFT )))
aTableBorderDistances.IsLeftDistanceValid = sal_False;
- if( aTableBorderDistances.IsRightDistanceValid &&
+ if( aTableBorderDistances.IsRightDistanceValid &&
nRightDistance != TWIP_TO_MM100_UNSIGNED( rBox.GetDistance( BOX_LINE_RIGHT )))
aTableBorderDistances.IsRightDistanceValid = sal_False;
- if( aTableBorderDistances.IsTopDistanceValid &&
+ if( aTableBorderDistances.IsTopDistanceValid &&
nTopDistance != TWIP_TO_MM100_UNSIGNED( rBox.GetDistance( BOX_LINE_TOP )))
aTableBorderDistances.IsTopDistanceValid = sal_False;
- if( aTableBorderDistances.IsBottomDistanceValid &&
+ if( aTableBorderDistances.IsBottomDistanceValid &&
nBottomDistance != TWIP_TO_MM100_UNSIGNED( rBox.GetDistance( BOX_LINE_BOTTOM )))
aTableBorderDistances.IsBottomDistanceValid = sal_False;
- }
+ }
- }
- if( !aTableBorderDistances.IsLeftDistanceValid &&
- !aTableBorderDistances.IsRightDistanceValid &&
- !aTableBorderDistances.IsTopDistanceValid &&
+ }
+ if( !aTableBorderDistances.IsLeftDistanceValid &&
+ !aTableBorderDistances.IsRightDistanceValid &&
+ !aTableBorderDistances.IsTopDistanceValid &&
!aTableBorderDistances.IsBottomDistanceValid )
break;
}
if( aTableBorderDistances.IsLeftDistanceValid)
- aTableBorderDistances.LeftDistance = nLeftDistance;
+ aTableBorderDistances.LeftDistance = nLeftDistance;
if( aTableBorderDistances.IsRightDistanceValid)
aTableBorderDistances.RightDistance = nRightDistance;
if( aTableBorderDistances.IsTopDistanceValid)
aTableBorderDistances.TopDistance = nTopDistance;
if( aTableBorderDistances.IsBottomDistanceValid)
aTableBorderDistances.BottomDistance = nBottomDistance;
-
+
aRet <<= aTableBorderDistances;
- }
+ }
break;
case FN_UNO_TABLE_COLUMN_SEPARATORS:
{
@@ -3760,7 +3760,7 @@ void SwXCellRange::setPropertyValue(const OUString& rPropertyName,
{
/* ASK OLIVER
lcl_FormatTable(pFmt);*/
- const SfxItemPropertySimpleEntry* pEntry =
+ const SfxItemPropertySimpleEntry* pEntry =
m_pPropSet->getPropertyMap()->getByName(rPropertyName);
if(pEntry)
{
@@ -3877,7 +3877,7 @@ uno::Any SwXCellRange::getPropertyValue(const OUString& rPropertyName) throw( be
{
/* ASK OLIVER
lcl_FormatTable(pFmt);*/
- const SfxItemPropertySimpleEntry* pEntry =
+ const SfxItemPropertySimpleEntry* pEntry =
m_pPropSet->getPropertyMap()->getByName(rPropertyName);
if(pEntry)
{
@@ -3933,7 +3933,7 @@ uno::Any SwXCellRange::getPropertyValue(const OUString& rPropertyName) throw( be
default:
{
SfxItemSet aSet(pTblCrsr->GetDoc()->GetAttrPool(),
- RES_CHRATR_BEGIN, RES_FRMATR_END -1,
+ RES_CHRATR_BEGIN, RES_FRMATR_END -1,
RES_TXTATR_UNKNOWN_CONTAINER, RES_TXTATR_UNKNOWN_CONTAINER,
RES_UNKNOWNATR_CONTAINER, RES_UNKNOWNATR_CONTAINER,
0L);
@@ -4161,8 +4161,8 @@ uno::Sequence< uno::Sequence< uno::Any > > SAL_CALL SwXCellRange::getDataArray()
//const SfxPoolItem* pItem;
//SwDoc* pDoc = pXCell->GetDoc();
//BOOL bIsText = (SFX_ITEM_SET != pBoxFmt->GetAttrSet().GetItemState(RES_BOXATR_FORMAT, sal_True, &pItem)
- // || pDoc->GetNumberFormatter()->IsTextFormat(((SwTblBoxNumFormat*)pItem)->GetValue())
- // || ((SwTblBoxNumFormat*)pItem)->GetValue() == NUMBERFORMAT_TEXT);
+ // || pDoc->GetNumberFormatter()->IsTextFormat(((SwTblBoxNumFormat*)pItem)->GetValue())
+ // || ((SwTblBoxNumFormat*)pItem)->GetValue() == NUMBERFORMAT_TEXT);
if(!bIsNum/*bIsText*/)
pColArray[nCol] <<= lcl_getString(*pXCell);
@@ -4556,7 +4556,7 @@ void SwXCellRange::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
}
/******************************************************************
- * SwXTableRows
+ * SwXTableRows
******************************************************************/
OUString SwXTableRows::getImplementationName(void) throw( uno::RuntimeException )
{