[Libreoffice-commits] core.git: writerfilter/source
Mike Kaganski (via logerrit)
logerrit at kemper.freedesktop.org
Tue Dec 17 11:37:52 UTC 2019
writerfilter/source/dmapper/DomainMapper_Impl.cxx | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
New commits:
commit 0ba9d65c8e9d79d13ec534678d5a2131429c48b9
Author: Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Tue Dec 17 09:58:57 2019 +0100
Commit: Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Tue Dec 17 12:36:48 2019 +0100
Convert some defines to constexpr
Change-Id: I78d119857b80d223d6fa8228cee4c0be829627c4
Reviewed-on: https://gerrit.libreoffice.org/85267
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 3efd32d45ad5..c1c5c12b4d8d 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -1049,9 +1049,9 @@ static void lcl_AddRangeAndStyle(
//define some default frame width - 0cm ATM: this allow the frame to be wrapped around the text
-#define DEFAULT_FRAME_MIN_WIDTH 0
-#define DEFAULT_FRAME_MIN_HEIGHT 0
-#define DEFAULT_VALUE 0
+static constexpr sal_Int32 DEFAULT_FRAME_MIN_WIDTH = 0;
+static constexpr sal_Int32 DEFAULT_FRAME_MIN_HEIGHT = 0;
+static constexpr sal_Int32 DEFAULT_VALUE = 0;
void DomainMapper_Impl::CheckUnregisteredFrameConversion( )
{
@@ -4006,8 +4006,8 @@ void DomainMapper_Impl::handleAuthor
if (rFirstParam.isEmpty())
return;
- #define SET_ARABIC 0x01
- #define SET_DATE 0x04
+ constexpr sal_uInt8 SET_ARABIC = 0x01;
+ constexpr sal_uInt8 SET_DATE = 0x04;
struct DocPropertyMap
{
const sal_Char* pDocPropertyName;
@@ -4089,10 +4089,6 @@ void DomainMapper_Impl::handleAuthor
SetNumberFormat( pContext->GetCommand(), xFieldProperties );
}
}
-
-
-#undef SET_ARABIC
-#undef SET_DATE
}
static uno::Sequence< beans::PropertyValues > lcl_createTOXLevelHyperlinks( bool bHyperlinks, const OUString& sChapterNoSeparator,
More information about the Libreoffice-commits
mailing list