Change data type from tools::Long to appropriate data types in md import
Change-Id: I36185a0d423ffb1ce18d8a0b7139b2c55197b54e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201590 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit 2a9e17b75acc53e2ddd9b54bf1de0f991be968ca) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204595 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
This commit is contained in:
committed by
Xisco Fauli
parent
85baadc11d
commit
02fddd1105
@@ -22,8 +22,8 @@
|
||||
#include <swtypes.hxx>
|
||||
#include <string.h>
|
||||
|
||||
constexpr tools::Long MD_NUMBER_BULLET_MARGINLEFT = o3tl::toTwips(125, o3tl::Length::mm10);
|
||||
constexpr tools::Long MD_NUMBER_BULLET_INDENT = -o3tl::toTwips(5, o3tl::Length::mm);
|
||||
constexpr sal_Int32 MD_NUMBER_BULLET_MARGINLEFT = o3tl::toTwips(125, o3tl::Length::mm10);
|
||||
constexpr sal_Int32 MD_NUMBER_BULLET_INDENT = -o3tl::toTwips(5, o3tl::Length::mm);
|
||||
|
||||
class SwTextNode;
|
||||
class SwNumRule;
|
||||
|
||||
@@ -701,8 +701,8 @@ void SwMarkdownParser::InsertImage(const MDImage& rImg)
|
||||
aGrfSz = o3tl::convert(aGraphic.GetSizePixel(), o3tl::Length::px, o3tl::Length::twip);
|
||||
}
|
||||
|
||||
tools::Long nWidth = 0;
|
||||
tools::Long nHeight = 0;
|
||||
sal_Int64 nWidth = 0;
|
||||
sal_Int64 nHeight = 0;
|
||||
if (!aGrfSz.IsEmpty())
|
||||
{
|
||||
nWidth = aGrfSz.getWidth();
|
||||
@@ -712,8 +712,8 @@ void SwMarkdownParser::InsertImage(const MDImage& rImg)
|
||||
double fScaleX = static_cast<double>(MD_MAX_IMAGE_WIDTH_IN_TWIPS) / nWidth;
|
||||
double fScaleY = static_cast<double>(MD_MAX_IMAGE_HEIGHT_IN_TWIPS) / nHeight;
|
||||
double fScale = std::min(fScaleX, fScaleY);
|
||||
nWidth = static_cast<tools::Long>(nWidth * fScale);
|
||||
nHeight = static_cast<tools::Long>(nHeight * fScale);
|
||||
nWidth = static_cast<sal_Int64>(nWidth * fScale);
|
||||
nHeight = static_cast<sal_Int64>(nHeight * fScale);
|
||||
}
|
||||
if (nWidth < MD_MIN_IMAGE_WIDTH_IN_TWIPS && nWidth < MD_MIN_IMAGE_HEIGHT_IN_TWIPS)
|
||||
{
|
||||
|
||||
@@ -50,11 +50,11 @@ struct MDImage
|
||||
}
|
||||
};
|
||||
|
||||
constexpr tools::Long MD_PARSPACE = o3tl::toTwips(5, o3tl::Length::mm);
|
||||
constexpr tools::Long MD_MAX_IMAGE_WIDTH_IN_TWIPS = 5000;
|
||||
constexpr tools::Long MD_MAX_IMAGE_HEIGHT_IN_TWIPS = 5000;
|
||||
constexpr tools::Long MD_MIN_IMAGE_WIDTH_IN_TWIPS = 500;
|
||||
constexpr tools::Long MD_MIN_IMAGE_HEIGHT_IN_TWIPS = 500;
|
||||
constexpr sal_uInt16 MD_PARSPACE = o3tl::toTwips(5, o3tl::Length::mm);
|
||||
constexpr sal_Int64 MD_MAX_IMAGE_WIDTH_IN_TWIPS = 5000;
|
||||
constexpr sal_Int64 MD_MAX_IMAGE_HEIGHT_IN_TWIPS = 5000;
|
||||
constexpr sal_Int64 MD_MIN_IMAGE_WIDTH_IN_TWIPS = 500;
|
||||
constexpr sal_Int64 MD_MIN_IMAGE_HEIGHT_IN_TWIPS = 500;
|
||||
|
||||
constexpr frozen::unordered_map<MD_ALIGN, SvxAdjust, 4> adjustMap
|
||||
= { { MD_ALIGN_DEFAULT, SvxAdjust::Left },
|
||||
@@ -90,7 +90,7 @@ class SwMarkdownParser
|
||||
OUString m_sBaseURL;
|
||||
|
||||
sal_Int32 m_nBlockQuoteDepth = -1;
|
||||
tools::Long m_nProgress = 0;
|
||||
sal_uInt64 m_nProgress = 0;
|
||||
|
||||
bool m_bNewDoc;
|
||||
bool m_bNoParSpace = true;
|
||||
|
||||
Reference in New Issue
Block a user