summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorNoel <noelgrandin@gmail.com>2020-10-21 15:30:37 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-10-22 08:08:05 +0200
commite25fd7782ad04dc363b4265e1bd08d6e092b50c5 (patch)
tree1dd202549adbc1ed7dbe17e5a81abbe408086e85 /oox
parent180dd91c189de0bf03d5062e33c20da94c5d35d9 (diff)
long->tools::Long in hwpfilter..oox
Change-Id: I9ab8876aac7b2f8b488db6dfa9c6fd0cecd2238b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104626 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'oox')
-rw-r--r--oox/source/drawingml/fillproperties.cxx2
-rw-r--r--oox/source/drawingml/textparagraph.cxx2
-rw-r--r--oox/source/export/drawingml.cxx6
-rw-r--r--oox/source/export/vmlexport.cxx2
-rw-r--r--oox/source/helper/propertymap.cxx1
-rw-r--r--oox/source/shape/WpsContext.cxx4
6 files changed, 9 insertions, 8 deletions
diff --git a/oox/source/drawingml/fillproperties.cxx b/oox/source/drawingml/fillproperties.cxx
index 5b68eb3e60ea..74a5d39fe1df 100644
--- a/oox/source/drawingml/fillproperties.cxx
+++ b/oox/source/drawingml/fillproperties.cxx
@@ -770,7 +770,7 @@ void GraphicProperties::pushToPropMap( PropertyMap& rPropMap, const GraphicHelpe
// When custom shape is rotated, bitmap have to be rotated too.
if(rPropMap.hasProperty(PROP_RotateAngle))
{
- long nAngle = rPropMap.getProperty(PROP_RotateAngle).get<long>();
+ tools::Long nAngle = rPropMap.getProperty(PROP_RotateAngle).get<long>();
xGraphic = lclRotateGraphic(xGraphic, Degree10(nAngle/10) );
}
diff --git a/oox/source/drawingml/textparagraph.cxx b/oox/source/drawingml/textparagraph.cxx
index ea00199a15fc..21c8d44c0079 100644
--- a/oox/source/drawingml/textparagraph.cxx
+++ b/oox/source/drawingml/textparagraph.cxx
@@ -142,7 +142,7 @@ void TextParagraph::insertAt(
if( !aioBulletList.hasProperty( PROP_GraphicSize ) && !maRuns.empty()
&& aParaProp.getBulletList().maGraphic.hasValue())
{
- long nFirstCharHeightMm = TransformMetric(nCharHeightFirst > 0 ? nCharHeightFirst : 1200, FieldUnit::POINT, FieldUnit::MM);
+ tools::Long nFirstCharHeightMm = TransformMetric(nCharHeightFirst > 0 ? nCharHeightFirst : 1200, FieldUnit::POINT, FieldUnit::MM);
float fBulletSizeRel = 1.f;
if( aParaProp.getBulletList().mnSize.hasValue() )
fBulletSizeRel = aParaProp.getBulletList().mnSize.get<sal_Int16>() / 100.f;
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 8b7c4add1f78..8b69d23ab499 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -2453,7 +2453,7 @@ void DrawingML::WriteParagraphNumbering(const Reference< XPropertySet >& rXPropS
Graphic aGraphic(xGraphic);
if (xGraphic.is() && aGraphic.GetType() != GraphicType::NONE)
{
- long nFirstCharHeightMm = TransformMetric(fFirstCharHeight * 100.f, FieldUnit::POINT, FieldUnit::MM);
+ tools::Long nFirstCharHeightMm = TransformMetric(fFirstCharHeight * 100.f, FieldUnit::POINT, FieldUnit::MM);
float fBulletSizeRel = aGraphicSize.Height / static_cast<float>(nFirstCharHeightMm) / OOX_BULLET_LIST_SCALE_FACTOR;
OUString sRelationId;
@@ -2463,8 +2463,8 @@ void DrawingML::WriteParagraphNumbering(const Reference< XPropertySet >& rXPropS
// Add padding to get the bullet point centered in PPT
Size aDestSize(64, 64);
float fBulletSizeRelX = fBulletSizeRel / aGraphicSize.Height * aGraphicSize.Width;
- long nPaddingX = std::max<long>(0, std::lround((aDestSize.Width() - fBulletSizeRelX * aDestSize.Width()) / 2.f));
- long nPaddingY = std::lround((aDestSize.Height() - fBulletSizeRel * aDestSize.Height()) / 2.f);
+ tools::Long nPaddingX = std::max<long>(0, std::lround((aDestSize.Width() - fBulletSizeRelX * aDestSize.Width()) / 2.f));
+ tools::Long nPaddingY = std::lround((aDestSize.Height() - fBulletSizeRel * aDestSize.Height()) / 2.f);
tools::Rectangle aDestRect(nPaddingX, nPaddingY, aDestSize.Width() - nPaddingX, aDestSize.Height() - nPaddingY);
AlphaMask aMask(aDestSize);
diff --git a/oox/source/export/vmlexport.cxx b/oox/source/export/vmlexport.cxx
index b5cc2152acda..e3ed8547aaed 100644
--- a/oox/source/export/vmlexport.cxx
+++ b/oox/source/export/vmlexport.cxx
@@ -388,7 +388,7 @@ void VMLExport::Commit( EscherPropertyContainer& rProps, const tools::Rectangle&
if ( IsWaterMarkShape( m_pSdrObject->GetName() ) )
{
// Watermark need some padding to be compatible with MSO
- long nPaddingY = 0;
+ tools::Long nPaddingY = 0;
const SfxItemSet& rSet = m_pSdrObject->GetMergedItemSet();
if ( const SdrMetricItem* pItem = rSet.GetItem( SDRATTR_TEXT_UPPERDIST ) )
nPaddingY += pItem->GetValue();
diff --git a/oox/source/helper/propertymap.cxx b/oox/source/helper/propertymap.cxx
index 3bc994aabc19..cadb439e0a1a 100644
--- a/oox/source/helper/propertymap.cxx
+++ b/oox/source/helper/propertymap.cxx
@@ -47,6 +47,7 @@ using ::com::sun::star::text::WritingMode;
#include <osl/diagnose.h>
#include <osl/mutex.hxx>
#include <sal/log.hxx>
+#include <tools/long.hxx>
#include <oox/token/properties.hxx>
#include <oox/token/propertynames.hxx>
using ::com::sun::star::uno::Any;
diff --git a/oox/source/shape/WpsContext.cxx b/oox/source/shape/WpsContext.cxx
index cb47692d4c95..5a4210572e51 100644
--- a/oox/source/shape/WpsContext.cxx
+++ b/oox/source/shape/WpsContext.cxx
@@ -84,8 +84,8 @@ oox::core::ContextHandlerRef WpsContext::onCreateContext(sal_Int32 nElementToken
// If the text is not rotated the way the shape wants it already, set the angle.
const sal_Int32 nRotation = nVert == XML_vert270 ? -270 : -90;
- if (static_cast<long>(basegfx::rad2deg(fRotate))
- != NormAngle36000(static_cast<long>(nRotation) * 100) / 100)
+ if (static_cast<tools::Long>(basegfx::rad2deg(fRotate))
+ != NormAngle36000(static_cast<tools::Long>(nRotation) * 100) / 100)
{
comphelper::SequenceAsHashMap aCustomShapeGeometry(
xPropertySet->getPropertyValue("CustomShapeGeometry"));