summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cui/source/tabpages/align.cxx10
-rw-r--r--sc/inc/attrib.hxx13
-rw-r--r--sc/inc/globstr.hrc1
-rw-r--r--sc/inc/scitems.hxx3
-rw-r--r--sc/source/core/data/attarray.cxx2
-rw-r--r--sc/source/core/data/attrib.cxx21
-rw-r--r--sc/source/core/data/column2.cxx2
-rw-r--r--sc/source/core/data/docpool.cxx3
-rw-r--r--sc/source/core/data/document.cxx2
-rw-r--r--sc/source/core/data/patattr.cxx1
-rw-r--r--sc/source/core/tool/autoform.cxx5
-rw-r--r--sc/source/filter/excel/xistyle.cxx2
-rw-r--r--sc/source/filter/oox/stylesbuffer.cxx2
-rw-r--r--sc/source/ui/Accessibility/AccessibleCell.cxx2
-rw-r--r--sc/source/ui/Accessibility/AccessibleText.cxx3
-rw-r--r--sc/source/ui/sidebar/AlignmentPropertyPanel.cxx6
-rw-r--r--sc/source/ui/unoobj/afmtuno.cxx7
-rw-r--r--sc/source/ui/unoobj/cellsuno.cxx6
-rw-r--r--sc/source/ui/unoobj/styleuno.cxx6
-rw-r--r--sc/source/ui/view/output2.cxx4
20 files changed, 75 insertions, 26 deletions
diff --git a/cui/source/tabpages/align.cxx b/cui/source/tabpages/align.cxx
index c39c0b4bef2e..940f64a1aca3 100644
--- a/cui/source/tabpages/align.cxx
+++ b/cui/source/tabpages/align.cxx
@@ -25,6 +25,7 @@
#include <svx/dialmgr.hxx>
#include <bitmaps.hlst>
#include <svx/rotmodit.hxx>
+#include <svx/sdangitm.hxx>
#include <editeng/frmdiritem.hxx>
#include <editeng/justifyitem.hxx>
@@ -233,7 +234,12 @@ bool AlignmentTabPage::FillItemSet( SfxItemSet* rSet )
if (m_xNfRotate->get_value_changed_from_saved())
{
- rSet->Put(SfxInt32Item(GetWhich(SID_ATTR_ALIGN_DEGREES), m_aCtrlDial.GetRotation()));
+ const SdrAngleItem* pAngleItem = static_cast<const SdrAngleItem*>(GetOldItem(
+ *rSet, SID_ATTR_ALIGN_DEGREES));
+ assert(pAngleItem);
+ std::unique_ptr<SdrAngleItem> pNewAngletem(static_cast<SdrAngleItem*>(pAngleItem->Clone()));
+ pNewAngletem->SetValue(m_aCtrlDial.GetRotation());
+ rSet->Put(*pNewAngletem);
bChanged = true;
}
@@ -483,7 +489,7 @@ void AlignmentTabPage::Reset(const SfxItemSet* pCoreAttrs)
case SfxItemState::DEFAULT:
case SfxItemState::SET:
{
- const SfxInt32Item& rAlignItem = static_cast<const SfxInt32Item&>(pCoreAttrs->Get(nWhich));
+ const SdrAngleItem& rAlignItem = static_cast<const SdrAngleItem&>(pCoreAttrs->Get(nWhich));
m_aCtrlDial.SetRotation(rAlignItem.GetValue());
break;
}
diff --git a/sc/inc/attrib.hxx b/sc/inc/attrib.hxx
index 7b9944094d04..4865e1594250 100644
--- a/sc/inc/attrib.hxx
+++ b/sc/inc/attrib.hxx
@@ -24,6 +24,7 @@
#include <svl/poolitem.hxx>
#include <svl/intitem.hxx>
#include <svl/eitem.hxx>
+#include <svx/sdangitm.hxx>
#include <o3tl/sorted_vector.hxx>
#include <o3tl/typed_flags_set.hxx>
#include "scdllapi.h"
@@ -284,6 +285,18 @@ private:
ScCondFormatIndexes maIndex;
};
+class SC_DLLPUBLIC ScRotateValueItem final : public SdrAngleItem
+{
+public:
+ ScRotateValueItem(sal_Int32 nAngle);
+ virtual ScRotateValueItem* Clone(SfxItemPool* pPool=nullptr) const override;
+
+ virtual bool GetPresentation( SfxItemPresentation ePresentation,
+ MapUnit, MapUnit,
+ OUString& rText,
+ const IntlWrapper& ) const override;
+};
+
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/globstr.hrc b/sc/inc/globstr.hrc
index 1273baf40238..d9b92b5c7b6d 100644
--- a/sc/inc/globstr.hrc
+++ b/sc/inc/globstr.hrc
@@ -514,6 +514,7 @@
#define STR_QUERY_PIVOTTABLE_DELTAB NC_("STR_QUERY_PIVOTTABLE_DELTAB", "The selected sheet(s) contain source data of related pivot tables that will be lost. Are you sure you want to delete the selected sheet(s)?")
#define STR_ERR_NAME_INVALID_CELL_REF NC_("STR_ERR_NAME_INVALID_CELL_REF", "Invalid name. Reference to a cell, or a range of cells not allowed.")
#define STR_ERR_LONG_LINK_FORMULA_NEEDING_CHECK NC_("STR_ERR_LONG_LINK_FORMULA_NEEDING_CHECK", "External content disabled.")
+#define STR_TEXTORIENTANGLE NC_("STR_TEXTORIENTANGLE", "Text orientation angle")
#endif
diff --git a/sc/inc/scitems.hxx b/sc/inc/scitems.hxx
index 0606b39de634..9093d54039c5 100644
--- a/sc/inc/scitems.hxx
+++ b/sc/inc/scitems.hxx
@@ -50,6 +50,7 @@ class SvxVerJustifyItem;
class SvxBrushItem;
class SvxBoxItem;
class ScCondFormatItem;
+class ScRotateValueItem;
class SvxLineItem;
class SvxRotateModeItem;
class SfxStringItem;
@@ -118,7 +119,7 @@ class SvxSizeItem;
#define ATTR_VER_JUSTIFY TypedWhichId<SvxVerJustifyItem>(132)
#define ATTR_VER_JUSTIFY_METHOD TypedWhichId<SvxJustifyMethodItem>(133)
#define ATTR_STACKED TypedWhichId<SfxBoolItem>(134)
-#define ATTR_ROTATE_VALUE TypedWhichId<SfxInt32Item>(135)
+#define ATTR_ROTATE_VALUE TypedWhichId<ScRotateValueItem>(135)
#define ATTR_ROTATE_MODE TypedWhichId<SvxRotateModeItem>(136)
#define ATTR_VERTICAL_ASIAN TypedWhichId<SfxBoolItem>(137)
#define ATTR_WRITINGDIR TypedWhichId<SvxFrameDirectionItem>(138)
diff --git a/sc/source/core/data/attarray.cxx b/sc/source/core/data/attarray.cxx
index 8636d6b6e951..42a0e9fd464a 100644
--- a/sc/source/core/data/attarray.cxx
+++ b/sc/source/core/data/attarray.cxx
@@ -1359,7 +1359,7 @@ bool ScAttrArray::HasAttrib_Impl(const ScPatternAttr* pPattern, HasAttrFlags nMa
}
if ( nMask & HasAttrFlags::Rotate )
{
- const SfxInt32Item* pRotate = &pPattern->GetItem( ATTR_ROTATE_VALUE );
+ const ScRotateValueItem* pRotate = &pPattern->GetItem( ATTR_ROTATE_VALUE );
// 90 or 270 degrees is former SvxOrientationItem - only look for other values
// (see ScPatternAttr::GetCellOrientation)
sal_Int32 nAngle = pRotate->GetValue();
diff --git a/sc/source/core/data/attrib.cxx b/sc/source/core/data/attrib.cxx
index 94a8922e334e..bc2271fb56e6 100644
--- a/sc/source/core/data/attrib.cxx
+++ b/sc/source/core/data/attrib.cxx
@@ -727,4 +727,25 @@ void ScCondFormatItem::dumpAsXml(xmlTextWriterPtr pWriter) const
xmlTextWriterEndElement(pWriter);
}
+ScRotateValueItem::ScRotateValueItem(sal_Int32 nAngle)
+ : SdrAngleItem(ATTR_ROTATE_VALUE, nAngle)
+{
+}
+
+ScRotateValueItem* ScRotateValueItem::Clone(SfxItemPool*) const
+{
+ return new ScRotateValueItem(GetValue());
+}
+
+bool ScRotateValueItem::GetPresentation(SfxItemPresentation ePresentation,
+ MapUnit eCoreMetric, MapUnit ePresMetric,
+ OUString& rText,
+ const IntlWrapper& rWrapper) const
+{
+ bool bRet = SdrAngleItem::GetPresentation(SfxItemPresentation::Nameless, eCoreMetric, ePresMetric, rText, rWrapper);
+ if (bRet && ePresentation == SfxItemPresentation::Complete)
+ rText = ScResId(STR_TEXTORIENTANGLE) + " " + rText;
+ return bRet;
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
index d196a7c0e5a1..00d978fddc8f 100644
--- a/sc/source/core/data/column2.cxx
+++ b/sc/source/core/data/column2.cxx
@@ -207,7 +207,7 @@ long ScColumn::GetNeededSize(
{
if (pCondSet &&
pCondSet->GetItemState(ATTR_ROTATE_VALUE, true, &pCondItem) == SfxItemState::SET)
- nRotate = static_cast<const SfxInt32Item*>(pCondItem)->GetValue();
+ nRotate = static_cast<const ScRotateValueItem*>(pCondItem)->GetValue();
else
nRotate = pPattern->GetItem(ATTR_ROTATE_VALUE).GetValue();
if ( nRotate )
diff --git a/sc/source/core/data/docpool.cxx b/sc/source/core/data/docpool.cxx
index 6dfccb71d1ea..db067aabb26c 100644
--- a/sc/source/core/data/docpool.cxx
+++ b/sc/source/core/data/docpool.cxx
@@ -31,6 +31,7 @@
#include <svl/itemiter.hxx>
#include <svl/stritem.hxx>
#include <svx/algitem.hxx>
+#include <svx/sdangitm.hxx>
#include <editeng/boxitem.hxx>
#include <editeng/lineitem.hxx>
#include <editeng/brushitem.hxx>
@@ -249,7 +250,7 @@ ScDocumentPool::ScDocumentPool()
mvPoolDefaults[ ATTR_VER_JUSTIFY - ATTR_STARTINDEX ] = new SvxVerJustifyItem( SvxCellVerJustify::Standard, ATTR_VER_JUSTIFY);
mvPoolDefaults[ ATTR_VER_JUSTIFY_METHOD - ATTR_STARTINDEX ] = new SvxJustifyMethodItem( SvxCellJustifyMethod::Auto, ATTR_VER_JUSTIFY_METHOD);
mvPoolDefaults[ ATTR_STACKED - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_STACKED, false );
- mvPoolDefaults[ ATTR_ROTATE_VALUE - ATTR_STARTINDEX ] = new SfxInt32Item( ATTR_ROTATE_VALUE, 0 );
+ mvPoolDefaults[ ATTR_ROTATE_VALUE - ATTR_STARTINDEX ] = new ScRotateValueItem( 0 );
mvPoolDefaults[ ATTR_ROTATE_MODE - ATTR_STARTINDEX ] = new SvxRotateModeItem( SVX_ROTATE_MODE_BOTTOM, ATTR_ROTATE_MODE );
mvPoolDefaults[ ATTR_VERTICAL_ASIAN - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_VERTICAL_ASIAN );
// The default for the ATTR_WRITINGDIR cell attribute must by SvxFrameDirection::Environment,
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 47f3eebfb1d3..3c34473359f2 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -5173,7 +5173,7 @@ bool ScDocument::HasAttrib( SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
{
// 90 or 270 degrees is former SvxOrientationItem - only look for other values
// (see ScPatternAttr::GetCellOrientation)
- sal_Int32 nAngle = static_cast<const SfxInt32Item*>(pItem)->GetValue();
+ sal_Int32 nAngle = static_cast<const ScRotateValueItem*>(pItem)->GetValue();
if ( nAngle != 0 && nAngle != 9000 && nAngle != 27000 )
{
bAnyItem = true;
diff --git a/sc/source/core/data/patattr.cxx b/sc/source/core/data/patattr.cxx
index f7e4010d5518..996afb8e5f38 100644
--- a/sc/source/core/data/patattr.cxx
+++ b/sc/source/core/data/patattr.cxx
@@ -50,6 +50,7 @@
#include <vcl/outdev.hxx>
#include <tools/fract.hxx>
+#include <attrib.hxx>
#include <patattr.hxx>
#include <docpool.hxx>
#include <stlsheet.hxx>
diff --git a/sc/source/core/tool/autoform.cxx b/sc/source/core/tool/autoform.cxx
index 254db1f14d6b..63ae9fd8e956 100644
--- a/sc/source/core/tool/autoform.cxx
+++ b/sc/source/core/tool/autoform.cxx
@@ -56,6 +56,7 @@
#include <tools/tenccvt.hxx>
#include <osl/diagnose.h>
+#include <attrib.hxx>
#include <globstr.hrc>
#include <scitems.hxx>
#include <scresid.hxx>
@@ -195,7 +196,7 @@ ScAutoFormatDataField::ScAutoFormatDataField()
m_aStacked = std::make_unique<SfxBoolItem>();
m_aMargin = std::make_unique<SvxMarginItem>(ATTR_MARGIN);
m_aLinebreak = std::make_unique<SfxBoolItem>(ATTR_LINEBREAK);
- m_aRotateAngle = std::make_unique<SfxInt32Item>(ATTR_ROTATE_VALUE);
+ m_aRotateAngle = std::make_unique<ScRotateValueItem>(0);
m_aRotateMode = std::make_unique<SvxRotateModeItem>(SVX_ROTATE_MODE_STANDARD, ATTR_ROTATE_MODE);
}
@@ -371,7 +372,7 @@ void ScAutoFormatData::PutItem( sal_uInt16 nIndex, const SfxPoolItem& rItem )
case ATTR_STACKED: rField.SetStacked( static_cast<const SfxBoolItem&>(rItem) ); break;
case ATTR_MARGIN: rField.SetMargin( static_cast<const SvxMarginItem&>(rItem) ); break;
case ATTR_LINEBREAK: rField.SetLinebreak( static_cast<const SfxBoolItem&>(rItem) ); break;
- case ATTR_ROTATE_VALUE: rField.SetRotateAngle( static_cast<const SfxInt32Item&>(rItem) ); break;
+ case ATTR_ROTATE_VALUE: rField.SetRotateAngle( static_cast<const ScRotateValueItem&>(rItem) ); break;
case ATTR_ROTATE_MODE: rField.SetRotateMode( static_cast<const SvxRotateModeItem&>(rItem) ); break;
}
}
diff --git a/sc/source/filter/excel/xistyle.cxx b/sc/source/filter/excel/xistyle.cxx
index 66d7429b6c6a..014eb81ad699 100644
--- a/sc/source/filter/excel/xistyle.cxx
+++ b/sc/source/filter/excel/xistyle.cxx
@@ -833,7 +833,7 @@ void XclImpCellAlign::FillToItemSet( SfxItemSet& rItemSet, const XclImpFont* pFo
ScfTools::PutItem( rItemSet, SfxBoolItem( ATTR_STACKED, bStacked ), bSkipPoolDefs );
// set an angle in the range from -90 to 90 degrees
sal_Int32 nAngle = XclTools::GetScRotation( nXclRot, 0 );
- ScfTools::PutItem( rItemSet, SfxInt32Item( ATTR_ROTATE_VALUE, nAngle ), bSkipPoolDefs );
+ ScfTools::PutItem( rItemSet, ScRotateValueItem( nAngle ), bSkipPoolDefs );
// set "Use asian vertical layout", if cell is stacked and font contains CKJ characters
bool bAsianVert = bStacked && pFont && pFont->HasAsianChars();
ScfTools::PutItem( rItemSet, SfxBoolItem( ATTR_VERTICAL_ASIAN, bAsianVert ), bSkipPoolDefs );
diff --git a/sc/source/filter/oox/stylesbuffer.cxx b/sc/source/filter/oox/stylesbuffer.cxx
index a6887b7bd103..48df2d7bccb4 100644
--- a/sc/source/filter/oox/stylesbuffer.cxx
+++ b/sc/source/filter/oox/stylesbuffer.cxx
@@ -1295,7 +1295,7 @@ void Alignment::fillToItemSet( SfxItemSet& rItemSet, bool bSkipPoolDefs ) const
// CTL text direction
ScfTools::PutItem( rItemSet, SvxFrameDirectionItem( GetScFrameDir(), ATTR_WRITINGDIR ), bSkipPoolDefs );
// set an angle in the range from -90 to 90 degrees
- ScfTools::PutItem( rItemSet, SfxInt32Item( ATTR_ROTATE_VALUE, maApiData.mnRotation ), bSkipPoolDefs );
+ ScfTools::PutItem( rItemSet, ScRotateValueItem( maApiData.mnRotation ), bSkipPoolDefs );
// Orientation
ScfTools::PutItem( rItemSet, SfxBoolItem( ATTR_STACKED, maApiData.meOrientation == css::table::CellOrientation_STACKED ), bSkipPoolDefs );
// indent
diff --git a/sc/source/ui/Accessibility/AccessibleCell.cxx b/sc/source/ui/Accessibility/AccessibleCell.cxx
index 5e1d077a4de3..008a3ea6d04a 100644
--- a/sc/source/ui/Accessibility/AccessibleCell.cxx
+++ b/sc/source/ui/Accessibility/AccessibleCell.cxx
@@ -187,7 +187,7 @@ tools::Rectangle ScAccessibleCell::GetBoundingBox() const
simply expand the cell size to the width of the unrotated text. */
if (mpDoc)
{
- const SfxInt32Item* pItem = mpDoc->GetAttr( maCellAddress, ATTR_ROTATE_VALUE );
+ const ScRotateValueItem* pItem = mpDoc->GetAttr( maCellAddress, ATTR_ROTATE_VALUE );
if( pItem && (pItem->GetValue() != 0) )
{
tools::Rectangle aParaRect = GetParagraphBoundingBox();
diff --git a/sc/source/ui/Accessibility/AccessibleText.cxx b/sc/source/ui/Accessibility/AccessibleText.cxx
index 8cfc3a297979..540e9ac39a5d 100644
--- a/sc/source/ui/Accessibility/AccessibleText.cxx
+++ b/sc/source/ui/Accessibility/AccessibleText.cxx
@@ -23,6 +23,7 @@
#include <memory>
#include <AccessibleText.hxx>
#include <AccessibleCell.hxx>
+#include <attrib.hxx>
#include <tabvwsh.hxx>
#include <editutil.hxx>
#include <document.hxx>
@@ -534,7 +535,7 @@ SvxTextForwarder* ScAccessibleCellTextData::GetTextForwarder()
return the size of the complete text then, which is used to expand
the cell bounding box in ScAccessibleCell::GetBoundingBox()
(see sc/source/ui/Accessibility/AccessibleCell.cxx). */
- const SfxInt32Item* pItem = rDoc.GetAttr( aCellPos, ATTR_ROTATE_VALUE );
+ const ScRotateValueItem* pItem = rDoc.GetAttr( aCellPos, ATTR_ROTATE_VALUE );
if( pItem && (pItem->GetValue() != 0) )
{
pEditEngine->SetPaperSize( Size( LONG_MAX, aSize.getHeight() ) );
diff --git a/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx b/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx
index e92edd6943ca..a50c529cef9f 100644
--- a/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx
+++ b/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx
@@ -20,11 +20,13 @@
#include "AlignmentPropertyPanel.hxx"
#include <editeng/justifyitem.hxx>
#include <sc.hrc>
+#include <attrib.hxx>
#include <scitems.hxx>
#include <sfx2/bindings.hxx>
#include <sfx2/dispatch.hxx>
#include <svl/intitem.hxx>
#include <svx/rotmodit.hxx>
+#include <svx/sdangitm.hxx>
#include <svtools/unitconv.hxx>
#include <unotools/localedatawrapper.hxx>
#include <com/sun/star/lang/IllegalArgumentException.hpp>
@@ -177,7 +179,7 @@ IMPL_LINK_NOARG( AlignmentPropertyPanel, AngleModifiedHdl, Edit&, void )
FormatDegrees(fTmp);
sal_Int64 nTmp = static_cast<sal_Int64>(fTmp)*100;
- SfxInt32Item aAngleItem( SID_ATTR_ALIGN_DEGREES,static_cast<sal_uInt32>(nTmp));
+ ScRotateValueItem aAngleItem(static_cast<sal_uInt32>(nTmp));
GetBindings()->GetDispatcher()->ExecuteList(
SID_ATTR_ALIGN_DEGREES, SfxCallMode::RECORD, { &aAngleItem });
@@ -380,7 +382,7 @@ void AlignmentPropertyPanel::NotifyItemUpdate(
case SID_ATTR_ALIGN_DEGREES:
if (eState >= SfxItemState::DEFAULT)
{
- long nTmp = static_cast<const SfxInt32Item*>(pState)->GetValue();
+ long nTmp = static_cast<const ScRotateValueItem*>(pState)->GetValue();
mpMtrAngle->SetValue( nTmp / 100); //wj
switch(nTmp)
{
diff --git a/sc/source/ui/unoobj/afmtuno.cxx b/sc/source/ui/unoobj/afmtuno.cxx
index 81ad9b333cc2..0bd7b7baf669 100644
--- a/sc/source/ui/unoobj/afmtuno.cxx
+++ b/sc/source/ui/unoobj/afmtuno.cxx
@@ -36,6 +36,7 @@
#include <com/sun/star/table/TableBorder2.hpp>
#include <com/sun/star/awt/FontSlant.hpp>
+#include <attrib.hxx>
#include <afmtuno.hxx>
#include <miscuno.hxx>
#include <autoform.hxx>
@@ -595,11 +596,11 @@ void SAL_CALL ScAutoFormatFieldObj::setPropertyValue(
break;
case table::CellOrientation_TOPBOTTOM:
pData->PutItem( nFieldIndex, SfxBoolItem( ATTR_STACKED, false ) );
- pData->PutItem( nFieldIndex, SfxInt32Item( ATTR_ROTATE_VALUE, 27000 ) );
+ pData->PutItem( nFieldIndex, ScRotateValueItem( 27000 ) );
break;
case table::CellOrientation_BOTTOMTOP:
pData->PutItem( nFieldIndex, SfxBoolItem( ATTR_STACKED, false ) );
- pData->PutItem( nFieldIndex, SfxInt32Item( ATTR_ROTATE_VALUE, 9000 ) );
+ pData->PutItem( nFieldIndex, ScRotateValueItem( 9000 ) );
break;
case table::CellOrientation_STACKED:
pData->PutItem( nFieldIndex, SfxBoolItem( ATTR_STACKED, true ) );
@@ -685,7 +686,7 @@ uno::Any SAL_CALL ScAutoFormatFieldObj::getPropertyValue( const OUString& aPrope
{
case ATTR_STACKED:
{
- const SfxInt32Item* pRotItem = pData->GetItem( nFieldIndex, ATTR_ROTATE_VALUE );
+ const ScRotateValueItem* pRotItem = pData->GetItem( nFieldIndex, ATTR_ROTATE_VALUE );
sal_Int32 nRot = pRotItem ? pRotItem->GetValue() : 0;
bool bStacked = static_cast<const SfxBoolItem*>(pItem)->GetValue();
SvxOrientationItem( nRot, bStacked, 0 ).QueryValue( aVal );
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index d8a12d386390..676ab2bd4fe6 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -2112,7 +2112,7 @@ static void lcl_SetCellProperty( const SfxItemPropertySimpleEntry& rEntry, const
if ( nRotVal < 0 )
nRotVal += 36000;
- rSet.Put( SfxInt32Item( ATTR_ROTATE_VALUE, nRotVal ) );
+ rSet.Put( ScRotateValueItem( nRotVal ) );
}
break;
@@ -2128,12 +2128,12 @@ static void lcl_SetCellProperty( const SfxItemPropertySimpleEntry& rEntry, const
break;
case table::CellOrientation_TOPBOTTOM:
rSet.Put( SfxBoolItem( ATTR_STACKED, false ) );
- rSet.Put( SfxInt32Item( ATTR_ROTATE_VALUE, 27000 ) );
+ rSet.Put( ScRotateValueItem( 27000 ) );
rSecondItemId = ATTR_ROTATE_VALUE;
break;
case table::CellOrientation_BOTTOMTOP:
rSet.Put( SfxBoolItem( ATTR_STACKED, false ) );
- rSet.Put( SfxInt32Item( ATTR_ROTATE_VALUE, 9000 ) );
+ rSet.Put( ScRotateValueItem( 9000 ) );
rSecondItemId = ATTR_ROTATE_VALUE;
break;
case table::CellOrientation_STACKED:
diff --git a/sc/source/ui/unoobj/styleuno.cxx b/sc/source/ui/unoobj/styleuno.cxx
index 3d61f1a29925..493c77c84781 100644
--- a/sc/source/ui/unoobj/styleuno.cxx
+++ b/sc/source/ui/unoobj/styleuno.cxx
@@ -1533,7 +1533,7 @@ void ScStyleObj::setPropertyValue_Impl( const OUString& rPropertyName, const Sfx
nRotVal %= 36000;
if (nRotVal < 0)
nRotVal += 36000;
- rSet.Put(SfxInt32Item(ATTR_ROTATE_VALUE, nRotVal));
+ rSet.Put(ScRotateValueItem(nRotVal));
}
}
break;
@@ -1549,11 +1549,11 @@ void ScStyleObj::setPropertyValue_Impl( const OUString& rPropertyName, const Sfx
break;
case table::CellOrientation_TOPBOTTOM:
rSet.Put(SfxBoolItem(ATTR_STACKED, false));
- rSet.Put(SfxInt32Item(ATTR_ROTATE_VALUE, 27000));
+ rSet.Put(ScRotateValueItem(27000));
break;
case table::CellOrientation_BOTTOMTOP:
rSet.Put(SfxBoolItem(ATTR_STACKED, false));
- rSet.Put(SfxInt32Item(ATTR_ROTATE_VALUE, 9000));
+ rSet.Put(ScRotateValueItem(9000));
break;
case table::CellOrientation_STACKED:
rSet.Put(SfxBoolItem(ATTR_STACKED, true));
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index b46c3d1ff642..8f5b72329277 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -2807,7 +2807,7 @@ void ScOutputData::DrawEditStandard(DrawEditParam& rParam)
bool bRepeat = (rParam.meHorJustAttr == SvxCellHorJustify::Repeat && !rParam.mbBreak);
bool bShrink = !rParam.mbBreak && !bRepeat && lcl_GetBoolValue(*rParam.mpPattern, ATTR_SHRINKTOFIT, rParam.mpCondSet);
- long nAttrRotate = lcl_GetValue<SfxInt32Item, long>(*rParam.mpPattern, ATTR_ROTATE_VALUE, rParam.mpCondSet);
+ long nAttrRotate = lcl_GetValue<ScRotateValueItem, long>(*rParam.mpPattern, ATTR_ROTATE_VALUE, rParam.mpCondSet);
if ( rParam.meHorJustAttr == SvxCellHorJustify::Repeat )
{
@@ -3982,7 +3982,7 @@ void ScOutputData::DrawEditAsianVertical(DrawEditParam& rParam)
bool bHidden = false;
bool bShrink = !rParam.mbBreak && lcl_GetBoolValue(*rParam.mpPattern, ATTR_SHRINKTOFIT, rParam.mpCondSet);
- long nAttrRotate = lcl_GetValue<SfxInt32Item, long>(*rParam.mpPattern, ATTR_ROTATE_VALUE, rParam.mpCondSet);
+ long nAttrRotate = lcl_GetValue<ScRotateValueItem, long>(*rParam.mpPattern, ATTR_ROTATE_VALUE, rParam.mpCondSet);
if (nAttrRotate)
{