summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorNoel <noelgrandin@gmail.com>2020-10-12 09:52:12 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-10-26 07:35:36 +0100
commit4fbd63860500b2db76df4d5aedbe5e3aa31fac69 (patch)
tree5fa96dc262ba651e82244b0f9e508f79e88ea2df /writerfilter
parent62fa5bb8c1299469eacc21cb35ee670b65120713 (diff)
switching long to a 64-bit type on 64-bit windows
(*) create a rewriting plugin to do most of the work, heavily based on the fakebool plugin (*) but there are still a number of "long"s in the codebase that will need to be done by hand (*) the plugin needs lots of handholding, due to needing to add #include and update macros Change-Id: I8184d7000ca482c0469514bb73178c3a1123b1e9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104203 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/PropertyMap.cxx2
-rw-r--r--writerfilter/source/dmapper/WrapPolygonHandler.cxx6
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.cxx6
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.hxx3
-rw-r--r--writerfilter/source/rtftok/rtfsdrimport.cxx2
5 files changed, 10 insertions, 9 deletions
diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx
index 21a8593178a1..5877e676917b 100644
--- a/writerfilter/source/dmapper/PropertyMap.cxx
+++ b/writerfilter/source/dmapper/PropertyMap.cxx
@@ -1725,7 +1725,7 @@ void SectionPropertyMap::CloseSectionGroup( DomainMapper_Impl& rDM_Impl )
{
double fHeight = 0;
if ( pPropHeight->second >>= fHeight )
- nCharWidth = ConversionHelper::convertTwipToMM100( static_cast<long>(fHeight * 20.0 + 0.5) );
+ nCharWidth = ConversionHelper::convertTwipToMM100( static_cast<tools::Long>(fHeight * 20.0 + 0.5) );
}
}
diff --git a/writerfilter/source/dmapper/WrapPolygonHandler.cxx b/writerfilter/source/dmapper/WrapPolygonHandler.cxx
index c67ed2ab7020..3f693b45f389 100644
--- a/writerfilter/source/dmapper/WrapPolygonHandler.cxx
+++ b/writerfilter/source/dmapper/WrapPolygonHandler.cxx
@@ -84,7 +84,7 @@ WrapPolygon::Pointer_t WrapPolygon::scale(const Fraction & rFractionX, const Fra
while (aIt != aItEnd)
{
- awt::Point aPoint((Fraction(long(aIt->X)) * rFractionX).operator long(), (Fraction(long(aIt->Y)) * rFractionY).operator long());
+ awt::Point aPoint((Fraction(tools::Long(aIt->X)) * rFractionX).operator long(), (Fraction(tools::Long(aIt->Y)) * rFractionY).operator long());
pResult->addPoint(aPoint);
++aIt;
}
@@ -96,7 +96,7 @@ WrapPolygon::Pointer_t WrapPolygon::correctWordWrapPolygon(const awt::Size & rSr
{
WrapPolygon::Pointer_t pResult;
- const long nWrap100Percent = 21600;
+ const tools::Long nWrap100Percent = 21600;
Fraction aMove(nWrap100Percent, rSrcSize.Width);
aMove = aMove * Fraction(convertTwipToMm100(15), 1);
@@ -128,7 +128,7 @@ WrapPolygon::Pointer_t WrapPolygon::correctWordWrapPolygonPixel(const awt::Size
* polygon units to fit the size of the image. The 21600 value is a legacy
* artifact from the drawing layer of early versions of Microsoft Office.
*/
- const long nWrap100Percent = 21600;
+ const tools::Long nWrap100Percent = 21600;
Fraction aScaleX(rSrcSize.Width, nWrap100Percent);
Fraction aScaleY(rSrcSize.Height, nWrap100Percent);
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 02aa834c38ef..9977306b90f0 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -187,7 +187,7 @@ void putBorderProperty(RTFStack& aStates, Id nId, const RTFValue::Pointer_t& pVa
pAttributes->set(nId, pValue);
}
-OString DTTM22OString(long nDTTM)
+OString DTTM22OString(tools::Long nDTTM)
{
return DateTimeToOString(msfilter::util::DTTM2DateTime(nDTTM));
}
@@ -1019,12 +1019,12 @@ void RTFDocumentImpl::resolvePict(bool const bInline, uno::Reference<drawing::XS
int nYExt = (m_aStates.top().getPicture().nGoalHeight ? m_aStates.top().getPicture().nGoalHeight
: m_aStates.top().getPicture().nHeight);
if (m_aStates.top().getPicture().nScaleX != 100)
- nXExt = (static_cast<long>(m_aStates.top().getPicture().nScaleX)
+ nXExt = (static_cast<tools::Long>(m_aStates.top().getPicture().nScaleX)
* (nXExt
- (m_aStates.top().getPicture().nCropL + m_aStates.top().getPicture().nCropR)))
/ 100L;
if (m_aStates.top().getPicture().nScaleY != 100)
- nYExt = (static_cast<long>(m_aStates.top().getPicture().nScaleY)
+ nYExt = (static_cast<tools::Long>(m_aStates.top().getPicture().nScaleY)
* (nYExt
- (m_aStates.top().getPicture().nCropT + m_aStates.top().getPicture().nCropB)))
/ 100L;
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.hxx b/writerfilter/source/rtftok/rtfdocumentimpl.hxx
index 6d4a608e5eee..693cdb80d6a9 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.hxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.hxx
@@ -21,6 +21,7 @@
#include <rtl/strbuf.hxx>
#include <rtl/ustrbuf.hxx>
#include <tools/color.hxx>
+#include <tools/long.hxx>
#include <rtftok/RTFDocument.hxx>
#include "rtfreferencetable.hxx"
@@ -664,7 +665,7 @@ RTFValue::Pointer_t getNestedSprm(RTFSprms& rSprms, Id nParent, Id nId);
bool findPropertyName(const std::vector<css::beans::PropertyValue>& rProperties,
const OUString& rName);
RTFSprms& getLastAttributes(RTFSprms& rSprms, Id nId);
-OString DTTM22OString(long nDTTM);
+OString DTTM22OString(tools::Long nDTTM);
/// Implementation of the RTFDocument interface.
class RTFDocumentImpl : public RTFDocument, public RTFListener
diff --git a/writerfilter/source/rtftok/rtfsdrimport.cxx b/writerfilter/source/rtftok/rtfsdrimport.cxx
index 64177ee88f91..b98723e5aee3 100644
--- a/writerfilter/source/rtftok/rtfsdrimport.cxx
+++ b/writerfilter/source/rtftok/rtfsdrimport.cxx
@@ -251,7 +251,7 @@ void RTFSdrImport::applyProperty(uno::Reference<drawing::XShape> const& xShape,
if (!xServiceInfo->supportsService("com.sun.star.text.TextFrame"))
xPropertySet->setPropertyValue(
"RotateAngle",
- uno::makeAny(sal_Int32(NormAngle36000(static_cast<long>(nRotation) * -1))));
+ uno::makeAny(sal_Int32(NormAngle36000(static_cast<tools::Long>(nRotation) * -1))));
}
if (nHoriOrient != 0 && xPropertySet.is())