summaryrefslogtreecommitdiff
path: root/sc/source/ui
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-12-11 11:57:14 +0000
committerCaolán McNamara <caolanm@redhat.com>2019-12-11 17:09:23 +0100
commit1219650c9676e9914c610d96908e6813c4a07ee5 (patch)
tree7960788d3f10e3775e24d50a279b7330433ec4d0 /sc/source/ui
parentcfbac86a0423c552a042ae7b9702c0904d4e232a (diff)
Related: tdf#129300 add ScIndentItem to provide a description
Change-Id: Ieb1a12f35cf8974c557c6e52eac0cd9fb7f80914 Reviewed-on: https://gerrit.libreoffice.org/84945 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc/source/ui')
-rw-r--r--sc/source/ui/Accessibility/AccessibleText.cxx2
-rw-r--r--sc/source/ui/unoobj/cellsuno.cxx6
-rw-r--r--sc/source/ui/unoobj/styleuno.cxx7
-rw-r--r--sc/source/ui/view/output2.cxx2
-rw-r--r--sc/source/ui/view/viewfunc.cxx2
5 files changed, 9 insertions, 10 deletions
diff --git a/sc/source/ui/Accessibility/AccessibleText.cxx b/sc/source/ui/Accessibility/AccessibleText.cxx
index e0a7b72a0cc1..60c4928ef5e1 100644
--- a/sc/source/ui/Accessibility/AccessibleText.cxx
+++ b/sc/source/ui/Accessibility/AccessibleText.cxx
@@ -500,7 +500,7 @@ SvxTextForwarder* ScAccessibleCellTextData::GetTextForwarder()
SvxCellHorJustify eHorJust = pHorJustifyItem ? pHorJustifyItem->GetValue() : SvxCellHorJustify::Standard;
if ( eHorJust == SvxCellHorJustify::Left )
{
- const SfxUInt16Item* pIndentItem = rDoc.GetAttr( aCellPos, ATTR_INDENT );
+ const ScIndentItem* pIndentItem = rDoc.GetAttr( aCellPos, ATTR_INDENT );
if ( pIndentItem )
{
nIndent = static_cast< long >( pIndentItem->GetValue() );
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index a5ffd152b5e0..f65b7fcf6032 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -1959,7 +1959,7 @@ uno::Any SAL_CALL ScCellRangesBase::getPropertyDefault( const OUString& aPropert
aAny <<= static_cast<sal_Int32>( static_cast<const SfxUInt32Item&>(rSet.Get(pEntry->nWID)).GetValue() );
break;
case ATTR_INDENT:
- aAny <<= static_cast<sal_Int16>( TwipsToHMM(static_cast<const SfxUInt16Item&>(
+ aAny <<= static_cast<sal_Int16>( TwipsToHMM(static_cast<const ScIndentItem&>(
rSet.Get(pEntry->nWID)).GetValue()) );
break;
default:
@@ -2097,7 +2097,7 @@ static void lcl_SetCellProperty( const SfxItemPropertySimpleEntry& rEntry, const
if ( !(rValue >>= nIntVal) )
throw lang::IllegalArgumentException();
- rSet.Put( SfxUInt16Item( rEntry.nWID, static_cast<sal_uInt16>(HMMToTwips(nIntVal)) ) );
+ rSet.Put( ScIndentItem( static_cast<sal_uInt16>(HMMToTwips(nIntVal)) ) );
}
break;
@@ -2409,7 +2409,7 @@ void ScCellRangesBase::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pE
}
break;
case ATTR_INDENT:
- rAny <<= static_cast<sal_Int16>( TwipsToHMM(static_cast<const SfxUInt16Item&>(
+ rAny <<= static_cast<sal_Int16>( TwipsToHMM(static_cast<const ScIndentItem&>(
pDataSet->Get(pEntry->nWID)).GetValue()) );
break;
case ATTR_STACKED:
diff --git a/sc/source/ui/unoobj/styleuno.cxx b/sc/source/ui/unoobj/styleuno.cxx
index 37af7b737f8b..aed15b31427e 100644
--- a/sc/source/ui/unoobj/styleuno.cxx
+++ b/sc/source/ui/unoobj/styleuno.cxx
@@ -1238,7 +1238,7 @@ uno::Any ScStyleObj::getPropertyDefault_Impl( const OUString& aPropertyName )
aAny <<= sal_Int32( static_cast<const SfxUInt32Item&>(pItemSet->Get(nWhich)).GetValue() );
break;
case ATTR_INDENT:
- aAny <<= sal_Int16( TwipsToHMM(static_cast<const SfxUInt16Item&>(
+ aAny <<= sal_Int16( TwipsToHMM(static_cast<const ScIndentItem&>(
pItemSet->Get(nWhich)).GetValue()) );
break;
case ATTR_PAGE_SCALE:
@@ -1520,8 +1520,7 @@ void ScStyleObj::setPropertyValue_Impl( const OUString& rPropertyName, const Sfx
{
sal_Int16 nVal = 0;
*pValue >>= nVal;
- rSet.Put(SfxUInt16Item(pEntry->nWID,
- static_cast<sal_uInt16>(HMMToTwips(nVal))));
+ rSet.Put(ScIndentItem(static_cast<sal_uInt16>(HMMToTwips(nVal))));
}
break;
case ATTR_ROTATE_VALUE:
@@ -1789,7 +1788,7 @@ uno::Any ScStyleObj::getPropertyValue_Impl( const OUString& aPropertyName )
}
break;
case ATTR_INDENT:
- aAny <<= sal_Int16( TwipsToHMM(static_cast<const SfxUInt16Item&>(
+ aAny <<= sal_Int16( TwipsToHMM(static_cast<const ScIndentItem&>(
pItemSet->Get(nWhich)).GetValue()) );
break;
case ATTR_STACKED:
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index 8a057dcfd5f1..947bda3d1875 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -2447,7 +2447,7 @@ void ScOutputData::DrawEditParam::calcMargins(long& rTopM, long& rLeftM, long& r
sal_uInt16 nIndent = 0;
if (meHorJustAttr == SvxCellHorJustify::Left || meHorJustAttr == SvxCellHorJustify::Right)
- nIndent = lcl_GetValue<SfxUInt16Item, sal_uInt16>(*mpPattern, ATTR_INDENT, mpCondSet);
+ nIndent = lcl_GetValue<ScIndentItem, sal_uInt16>(*mpPattern, ATTR_INDENT, mpCondSet);
rLeftM = static_cast<long>(((rMargin.GetLeftMargin() + nIndent) * nPPTX));
rTopM = static_cast<long>((rMargin.GetTopMargin() * nPPTY));
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index 344a43a644a9..1dbb1c17221e 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -1015,7 +1015,7 @@ void ScViewFunc::ApplyAttr( const SfxPoolItem& rAttrItem, bool bAdjustBlockHeigh
aNewAttrs.GetItemSet().Put( rAttrItem );
// if justify is set (with Buttons), always indentation 0
if ( rAttrItem.Which() == ATTR_HOR_JUSTIFY )
- aNewAttrs.GetItemSet().Put( SfxUInt16Item( ATTR_INDENT, 0 ) );
+ aNewAttrs.GetItemSet().Put( ScIndentItem( 0 ) );
ApplySelectionPattern( aNewAttrs );
// Prevent useless compute