[Libreoffice-commits] core.git: xmloff/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon Oct 8 08:54:11 UTC 2018


 xmloff/source/text/txtimppr.cxx |   16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

New commits:
commit b5d5032ce9b40cdca233f6f8951fa056262ec041
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Mon Oct 8 09:24:44 2018 +0200
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Mon Oct 8 10:53:47 2018 +0200

    Fix for --enable-debug --disable-assert-always-abort
    
    ...found by <https://ci.libreoffice.org//job/lo_tb_random_config_linux/1522/>
    
    Change-Id: I9087d54f783e1ab51029704aa34eed16dc14605d
    Reviewed-on: https://gerrit.libreoffice.org/61513
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/xmloff/source/text/txtimppr.cxx b/xmloff/source/text/txtimppr.cxx
index 25fa8ffb03f7..700af7aa44fc 100644
--- a/xmloff/source/text/txtimppr.cxx
+++ b/xmloff/source/text/txtimppr.cxx
@@ -199,7 +199,7 @@ void XMLTextImportPropertyMapper::FontDefaultsCheck(
         if( !pFontStyleName )
         {
             aAny <<= OUString();
-    #if OSL_DEBUG_LEVEL > 0
+    #if OSL_DEBUG_LEVEL > 0 && !defined NDEBUG
                 sal_Int16 nTmp = getPropertySetMapper()->GetEntryContextId(
                                                 pFontFamilyName->mnIndex + 1 );
                 assert(nTmp == CTF_FONTSTYLENAME || nTmp == CTF_FONTSTYLENAME_CJK || nTmp == CTF_FONTSTYLENAME_CTL);
@@ -212,7 +212,7 @@ void XMLTextImportPropertyMapper::FontDefaultsCheck(
         {
             aAny <<= sal_Int16(css::awt::FontFamily::DONTKNOW);
 
-    #if OSL_DEBUG_LEVEL > 0
+    #if OSL_DEBUG_LEVEL > 0 && !defined NDEBUG
                 sal_Int16 nTmp = getPropertySetMapper()->GetEntryContextId(
                                                 pFontFamilyName->mnIndex + 2 );
                 assert(nTmp == CTF_FONTFAMILY || nTmp == CTF_FONTFAMILY_CJK || nTmp == CTF_FONTFAMILY_CTL);
@@ -224,7 +224,7 @@ void XMLTextImportPropertyMapper::FontDefaultsCheck(
         if( !pFontPitch )
         {
             aAny <<= sal_Int16(css::awt::FontPitch::DONTKNOW);
-    #if OSL_DEBUG_LEVEL > 0
+    #if OSL_DEBUG_LEVEL > 0 && !defined NDEBUG
                 sal_Int16 nTmp = getPropertySetMapper()->GetEntryContextId(
                                                 pFontFamilyName->mnIndex + 3 );
                 assert(nTmp == CTF_FONTPITCH || nTmp == CTF_FONTPITCH_CJK || nTmp == CTF_FONTPITCH_CTL);
@@ -236,7 +236,7 @@ void XMLTextImportPropertyMapper::FontDefaultsCheck(
         if( !pFontCharSet )
         {
             aAny <<= static_cast<sal_Int16>(osl_getThreadTextEncoding());
-    #if OSL_DEBUG_LEVEL > 0
+    #if OSL_DEBUG_LEVEL > 0 && !defined NDEBUG
                 sal_Int16 nTmp = getPropertySetMapper()->GetEntryContextId(
                                                 pFontFamilyName->mnIndex + 4 );
                 assert(nTmp == CTF_FONTCHARSET || nTmp == CTF_FONTCHARSET_CJK || nTmp == CTF_FONTCHARSET_CTL);
@@ -289,7 +289,7 @@ void lcl_SeparateBorder(
 {
     if( pAllBorderDistance && !pBorderDistances[nIndex] )
     {
-#if OSL_DEBUG_LEVEL > 0
+#if OSL_DEBUG_LEVEL > 0 && !defined NDEBUG
         sal_Int16 nTmp = rMapper->GetEntryContextId(
                                     pAllBorderDistance->mnIndex + nIndex + 1 );
         if (CTF_CHARALLBORDERDISTANCE ==
@@ -311,7 +311,7 @@ void lcl_SeparateBorder(
     }
     if( pAllBorder && !pBorders[nIndex] )
     {
-#if OSL_DEBUG_LEVEL > 0
+#if OSL_DEBUG_LEVEL > 0 && !defined NDEBUG
         sal_Int16 nTmp = rMapper->GetEntryContextId(
                                         pAllBorder->mnIndex + nIndex + 1 );
         if (CTF_CHARALLBORDER ==
@@ -545,7 +545,7 @@ void XMLTextImportPropertyMapper::finished(
         if (pAllParaMargin && !pParaMargins[i]
             && isNotDefaultRelSize(pAllParaMargin, getPropertySetMapper()))
         {
-#if OSL_DEBUG_LEVEL > 0
+#if OSL_DEBUG_LEVEL > 0 && !defined NDEBUG
             sal_Int16 nTmp = getPropertySetMapper()->GetEntryContextId(
                                         pAllParaMargin->mnIndex + (2*i) + 2 );
             assert(nTmp >= CTF_PARALEFTMARGIN &&
@@ -556,7 +556,7 @@ void XMLTextImportPropertyMapper::finished(
         }
         if (pAllMargin && !pMargins[i])
         {
-#if OSL_DEBUG_LEVEL > 0
+#if OSL_DEBUG_LEVEL > 0 && !defined NDEBUG
             sal_Int16 nTmp = getPropertySetMapper()->GetEntryContextId(
                                         pAllMargin->mnIndex + i + 1 );
             assert(nTmp >= CTF_MARGINLEFT && nTmp <= CTF_MARGINBOTTOM);


More information about the Libreoffice-commits mailing list