sw/source/core/attr/swatrset.cxx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
New commits: commit 537c60b9e5f2c72013d213159f16777f5e8a8803 Author: Mike Kaganski <[email protected]> AuthorDate: Tue Feb 16 09:03:09 2021 +0100 Commit: Mike Kaganski <[email protected]> CommitDate: Tue Feb 16 12:11:46 2021 +0100 Use some more o3tl::convert Change-Id: I811a00592c3ac5d8cc551090b847f80fc6673032 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110918 Tested-by: Jenkins Reviewed-by: Mike Kaganski <[email protected]> diff --git a/sw/source/core/attr/swatrset.cxx b/sw/source/core/attr/swatrset.cxx index aae6df77112b..24138b51f6bb 100644 --- a/sw/source/core/attr/swatrset.cxx +++ b/sw/source/core/attr/swatrset.cxx @@ -34,6 +34,7 @@ #include <numrule.hxx> #include <pagedesc.hxx> #include <paratr.hxx> +#include <o3tl/unit_conversion.hxx> #include <osl/diagnose.h> #include <svl/whiter.hxx> @@ -74,8 +75,8 @@ void SwAttrPool::createAndAddSecondaryPools() // #75371# change DefaultItems for the SdrEdgeObj distance items // to TWIPS. - // 1/100th mm in twips - const tools::Long nDefEdgeDist = (500 * 72) / 127; + constexpr tools::Long nDefEdgeDist + = o3tl::convert(500, o3tl::Length::mm100, o3tl::Length::twip); pSdrPool->SetPoolDefaultItem(SdrEdgeNode1HorzDistItem(nDefEdgeDist)); pSdrPool->SetPoolDefaultItem(SdrEdgeNode1VertDistItem(nDefEdgeDist)); @@ -83,8 +84,10 @@ void SwAttrPool::createAndAddSecondaryPools() pSdrPool->SetPoolDefaultItem(SdrEdgeNode2VertDistItem(nDefEdgeDist)); // #i33700# // Set shadow distance defaults as PoolDefaultItems - pSdrPool->SetPoolDefaultItem(makeSdrShadowXDistItem((300 * 72) / 127)); - pSdrPool->SetPoolDefaultItem(makeSdrShadowYDistItem((300 * 72) / 127)); + constexpr tools::Long nDefShadowDist + = o3tl::convert(300, o3tl::Length::mm100, o3tl::Length::twip); + pSdrPool->SetPoolDefaultItem(makeSdrShadowXDistItem(nDefShadowDist)); + pSdrPool->SetPoolDefaultItem(makeSdrShadowYDistItem(nDefShadowDist)); SfxItemPool *pEEgPool = EditEngine::CreatePool(); _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
