[Libreoffice-commits] core.git: sw/qa sw/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sat Oct 20 05:59:41 UTC 2018


 sw/qa/extras/ooxmlexport/ooxmlexport11.cxx |    2 
 sw/qa/extras/ww8export/ww8export2.cxx      |    2 
 sw/source/filter/html/htmlbas.cxx          |    2 
 sw/source/filter/html/htmldrawreader.cxx   |    4 
 sw/source/filter/html/htmlfld.cxx          |   24 ++---
 sw/source/filter/html/htmlfly.hxx          |   10 +-
 sw/source/filter/html/htmlflyt.cxx         |   10 +-
 sw/source/filter/html/htmlflywriter.cxx    |    4 
 sw/source/filter/html/htmlform.cxx         |    6 -
 sw/source/filter/html/htmlgrin.cxx         |    4 
 sw/source/filter/html/htmlnumreader.cxx    |    2 
 sw/source/filter/html/htmltab.cxx          |    2 
 sw/source/filter/html/svxcss1.cxx          |  118 ++++++++++-------------------
 sw/source/filter/html/swhtml.cxx           |    4 
 sw/source/filter/html/swhtml.hxx           |    6 -
 sw/source/ui/config/optpage.cxx            |    6 -
 sw/source/ui/frmdlg/frmpage.cxx            |   72 ++++++++---------
 sw/source/ui/vba/vbafont.cxx               |    2 
 sw/source/uibase/inc/frmpage.hxx           |    4 
 sw/source/uibase/ribbar/workctrl.cxx       |    2 
 20 files changed, 127 insertions(+), 159 deletions(-)

New commits:
commit 4ba5b003b594f9eb6c9b185208bdb72aef8273d0
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Fri Oct 19 13:57:40 2018 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sat Oct 20 07:59:20 2018 +0200

    loplugin:staticvar in sw
    
    Change-Id: I73b0fb18febfe1d26bb63e1755b0b8c123aa854f
    Reviewed-on: https://gerrit.libreoffice.org/62004
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
index 2f665ad620e5..40e9fb19c3ca 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
@@ -459,7 +459,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf112118_DOCX, "tdf112118.docx")
     // because DOCX import does two conversions between mm/100 and twips on the route, losing one
     // twip on the road and arriving with a value that is 2 mm/100 less. I don't see an obvious way
     // to avoid that.
-    struct {
+    static const struct {
         const char* styleName;
         struct {
             const char* sideName;
diff --git a/sw/qa/extras/ww8export/ww8export2.cxx b/sw/qa/extras/ww8export/ww8export2.cxx
index 078079f969ec..e1597f634a0c 100644
--- a/sw/qa/extras/ww8export/ww8export2.cxx
+++ b/sw/qa/extras/ww8export/ww8export2.cxx
@@ -825,7 +825,7 @@ DECLARE_OOXMLEXPORT_TEST( testObjectCrossReference, "object_cross_reference.odt"
 
 DECLARE_WW8EXPORT_TEST(testTdf112118_DOC, "tdf112118.doc")
 {
-    struct {
+    static const struct {
         const char* styleName;
         struct {
             const char* sideName;
diff --git a/sw/source/filter/html/htmlbas.cxx b/sw/source/filter/html/htmlbas.cxx
index be5daed030d2..4a20f7dd68ca 100644
--- a/sw/source/filter/html/htmlbas.cxx
+++ b/sw/source/filter/html/htmlbas.cxx
@@ -48,7 +48,7 @@ using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::container;
 
-static HTMLOutEvent aBodyEventTable[] =
+static HTMLOutEvent const aBodyEventTable[] =
 {
     { OOO_STRING_SVTOOLS_HTML_O_SDonload,    OOO_STRING_SVTOOLS_HTML_O_onload,    SvMacroItemId::OpenDoc   },
     { OOO_STRING_SVTOOLS_HTML_O_SDonunload,  OOO_STRING_SVTOOLS_HTML_O_onunload,  SvMacroItemId::PrepareCloseDoc   },
diff --git a/sw/source/filter/html/htmldrawreader.cxx b/sw/source/filter/html/htmldrawreader.cxx
index 8b7413ebdef3..d47e01a24acc 100644
--- a/sw/source/filter/html/htmldrawreader.cxx
+++ b/sw/source/filter/html/htmldrawreader.cxx
@@ -55,7 +55,7 @@
 
 using namespace css;
 
-static HTMLOptionEnum<SdrTextAniKind> aHTMLMarqBehaviorTable[] =
+static HTMLOptionEnum<SdrTextAniKind> const aHTMLMarqBehaviorTable[] =
 {
     { OOO_STRING_SVTOOLS_HTML_BEHAV_scroll,    SdrTextAniKind::Scroll       },
     { OOO_STRING_SVTOOLS_HTML_BEHAV_alternate, SdrTextAniKind::Alternate    },
@@ -63,7 +63,7 @@ static HTMLOptionEnum<SdrTextAniKind> aHTMLMarqBehaviorTable[] =
     { nullptr,                                 SdrTextAniKind(0)       }
 };
 
-static HTMLOptionEnum<SdrTextAniDirection> aHTMLMarqDirectionTable[] =
+static HTMLOptionEnum<SdrTextAniDirection> const aHTMLMarqDirectionTable[] =
 {
     { OOO_STRING_SVTOOLS_HTML_AL_left,  SdrTextAniDirection::Left   },
     { OOO_STRING_SVTOOLS_HTML_AL_right, SdrTextAniDirection::Right  },
diff --git a/sw/source/filter/html/htmlfld.cxx b/sw/source/filter/html/htmlfld.cxx
index 513f01650887..2c660150838a 100644
--- a/sw/source/filter/html/htmlfld.cxx
+++ b/sw/source/filter/html/htmlfld.cxx
@@ -43,7 +43,7 @@ struct HTMLNumFormatTableEntry
     NfIndexTableOffset const eFormat;
 };
 
-static HTMLOptionEnum<SwFieldIds> aHTMLFieldTypeTable[] =
+static HTMLOptionEnum<SwFieldIds> const aHTMLFieldTypeTable[] =
 {
     { OOO_STRING_SW_HTML_FT_author,   SwFieldIds::Author      },
     { OOO_STRING_SW_HTML_FT_sender,   SwFieldIds::ExtUser     },
@@ -57,7 +57,7 @@ static HTMLOptionEnum<SwFieldIds> aHTMLFieldTypeTable[] =
     { nullptr,                        SwFieldIds(0)           }
 };
 
-static HTMLNumFormatTableEntry aHTMLDateFieldFormatTable[] =
+static HTMLNumFormatTableEntry const aHTMLDateFieldFormatTable[] =
 {
     { "SSYS",       NF_DATE_SYSTEM_SHORT    },
     { "LSYS",       NF_DATE_SYSTEM_LONG     },
@@ -79,7 +79,7 @@ static HTMLNumFormatTableEntry aHTMLDateFieldFormatTable[] =
     { nullptr,                    NF_NUMERIC_START }
 };
 
-static HTMLNumFormatTableEntry aHTMLTimeFieldFormatTable[] =
+static HTMLNumFormatTableEntry const aHTMLTimeFieldFormatTable[] =
 {
     { "SYS",     NF_TIME_HHMMSS },
     { "SSMM24",      NF_TIME_HHMM },
@@ -87,7 +87,7 @@ static HTMLNumFormatTableEntry aHTMLTimeFieldFormatTable[] =
     { nullptr,                 NF_NUMERIC_START }
 };
 
-static HTMLOptionEnum<SvxNumType> aHTMLPageNumFieldFormatTable[] =
+static HTMLOptionEnum<SvxNumType> const aHTMLPageNumFieldFormatTable[] =
 {
     { OOO_STRING_SW_HTML_FF_uletter,     SVX_NUM_CHARS_UPPER_LETTER },
     { OOO_STRING_SW_HTML_FF_lletter,     SVX_NUM_CHARS_LOWER_LETTER },
@@ -102,7 +102,7 @@ static HTMLOptionEnum<SvxNumType> aHTMLPageNumFieldFormatTable[] =
     { nullptr,                           SvxNumType(0) }
 };
 
-static HTMLOptionEnum<SwExtUserSubType> aHTMLExtUsrFieldSubTable[] =
+static HTMLOptionEnum<SwExtUserSubType> const aHTMLExtUsrFieldSubTable[] =
 {
     { OOO_STRING_SW_HTML_FS_company,     EU_COMPANY },
     { OOO_STRING_SW_HTML_FS_firstname,   EU_FIRSTNAME },
@@ -122,14 +122,14 @@ static HTMLOptionEnum<SwExtUserSubType> aHTMLExtUsrFieldSubTable[] =
     { nullptr,                           SwExtUserSubType(0) }
 };
 
-static HTMLOptionEnum<SwAuthorFormat> aHTMLAuthorFieldFormatTable[] =
+static HTMLOptionEnum<SwAuthorFormat> const aHTMLAuthorFieldFormatTable[] =
 {
     { OOO_STRING_SW_HTML_FF_name,        AF_NAME },
     { OOO_STRING_SW_HTML_FF_shortcut,    AF_SHORTCUT },
     { nullptr,                           SwAuthorFormat(0) }
 };
 
-static HTMLOptionEnum<SwPageNumSubType> aHTMLPageNumFieldSubTable[] =
+static HTMLOptionEnum<SwPageNumSubType> const aHTMLPageNumFieldSubTable[] =
 {
     { OOO_STRING_SW_HTML_FS_random,      PG_RANDOM },
     { OOO_STRING_SW_HTML_FS_next,        PG_NEXT },
@@ -145,7 +145,7 @@ static HTMLOptionEnum<SwPageNumSubType> aHTMLPageNumFieldSubTable[] =
     const SwDocInfoSubType DI_INFO3         =  DI_SUBTYPE_END + 3;
     const SwDocInfoSubType DI_INFO4         =  DI_SUBTYPE_END + 4;
 
-static HTMLOptionEnum<sal_uInt16> aHTMLDocInfoFieldSubTable[] =
+static HTMLOptionEnum<sal_uInt16> const aHTMLDocInfoFieldSubTable[] =
 {
     { OOO_STRING_SW_HTML_FS_title,   DI_TITLE },
     { OOO_STRING_SW_HTML_FS_theme,   DI_THEMA },
@@ -161,7 +161,7 @@ static HTMLOptionEnum<sal_uInt16> aHTMLDocInfoFieldSubTable[] =
     { nullptr,                       0 }
 };
 
-static HTMLOptionEnum<sal_uInt16> aHTMLDocInfoFieldFormatTable[] =
+static HTMLOptionEnum<sal_uInt16> const aHTMLDocInfoFieldFormatTable[] =
 {
     { OOO_STRING_SW_HTML_FF_author,  DI_SUB_AUTHOR },
     { OOO_STRING_SW_HTML_FF_time,    DI_SUB_TIME },
@@ -169,7 +169,7 @@ static HTMLOptionEnum<sal_uInt16> aHTMLDocInfoFieldFormatTable[] =
     { nullptr,                       0 }
 };
 
-static HTMLOptionEnum<SwDocStatSubType> aHTMLDocStatFieldSubTable[] =
+static HTMLOptionEnum<SwDocStatSubType> const aHTMLDocStatFieldSubTable[] =
 {
     { OOO_STRING_SW_HTML_FS_page,    DS_PAGE },
     { OOO_STRING_SW_HTML_FS_para,    DS_PARA },
@@ -181,7 +181,7 @@ static HTMLOptionEnum<SwDocStatSubType> aHTMLDocStatFieldSubTable[] =
     { nullptr,                       SwDocStatSubType(0) }
 };
 
-static HTMLOptionEnum<SwFileNameFormat> aHTMLFileNameFieldFormatTable[] =
+static HTMLOptionEnum<SwFileNameFormat> const aHTMLFileNameFieldFormatTable[] =
 {
     { OOO_STRING_SW_HTML_FF_name,       FF_NAME },
     { OOO_STRING_SW_HTML_FF_pathname,   FF_PATHNAME },
@@ -325,7 +325,7 @@ void SwHTMLParser::NewField()
             sal_Int32 nDate = aDateTime.GetDate();
             sal_uInt16 nSub = 0;
             bool bValidFormat = false;
-            HTMLNumFormatTableEntry * pFormatTable;
+            HTMLNumFormatTableEntry const * pFormatTable;
 
             if( SwFieldIds::Date==nType )
             {
diff --git a/sw/source/filter/html/htmlfly.hxx b/sw/source/filter/html/htmlfly.hxx
index f12ea3b5582b..88e7e3b80c0c 100644
--- a/sw/source/filter/html/htmlfly.hxx
+++ b/sw/source/filter/html/htmlfly.hxx
@@ -87,11 +87,11 @@ struct AllHtmlFlags {
     HtmlPosition       nPosition;
     HtmlContainerFlags nContainer;
 };
-extern AllHtmlFlags aHTMLOutFramePageFlyTable[MAX_FRMTYPES][MAX_BROWSERS];
-extern AllHtmlFlags aHTMLOutFrameParaFrameTable[MAX_FRMTYPES][MAX_BROWSERS];
-extern AllHtmlFlags aHTMLOutFrameParaPrtAreaTable[MAX_FRMTYPES][MAX_BROWSERS];
-extern AllHtmlFlags aHTMLOutFrameParaOtherTable[MAX_FRMTYPES][MAX_BROWSERS];
-extern AllHtmlFlags aHTMLOutFrameAsCharTable[MAX_FRMTYPES][MAX_BROWSERS];
+extern AllHtmlFlags const aHTMLOutFramePageFlyTable[MAX_FRMTYPES][MAX_BROWSERS];
+extern AllHtmlFlags const aHTMLOutFrameParaFrameTable[MAX_FRMTYPES][MAX_BROWSERS];
+extern AllHtmlFlags const aHTMLOutFrameParaPrtAreaTable[MAX_FRMTYPES][MAX_BROWSERS];
+extern AllHtmlFlags const aHTMLOutFrameParaOtherTable[MAX_FRMTYPES][MAX_BROWSERS];
+extern AllHtmlFlags const aHTMLOutFrameAsCharTable[MAX_FRMTYPES][MAX_BROWSERS];
 
 class SwHTMLPosFlyFrame
 {
diff --git a/sw/source/filter/html/htmlflyt.cxx b/sw/source/filter/html/htmlflyt.cxx
index 86fcafa7b1f1..9e4596ebc7bb 100644
--- a/sw/source/filter/html/htmlflyt.cxx
+++ b/sw/source/filter/html/htmlflyt.cxx
@@ -21,7 +21,7 @@
 
 #define TE(t,p,c) { HtmlOut::t, HtmlPosition::p, HtmlContainerFlags::c }
 
-AllHtmlFlags aHTMLOutFramePageFlyTable[MAX_FRMTYPES][MAX_BROWSERS] =
+AllHtmlFlags const aHTMLOutFramePageFlyTable[MAX_FRMTYPES][MAX_BROWSERS] =
 {
     {
         // text frame with table
@@ -117,7 +117,7 @@ AllHtmlFlags aHTMLOutFramePageFlyTable[MAX_FRMTYPES][MAX_BROWSERS] =
     }
 };
 
-AllHtmlFlags aHTMLOutFrameParaFrameTable[MAX_FRMTYPES][MAX_BROWSERS] =
+AllHtmlFlags const aHTMLOutFrameParaFrameTable[MAX_FRMTYPES][MAX_BROWSERS] =
 {
     {
         // text frame with table
@@ -214,7 +214,7 @@ AllHtmlFlags aHTMLOutFrameParaFrameTable[MAX_FRMTYPES][MAX_BROWSERS] =
     }
 };
 
-AllHtmlFlags aHTMLOutFrameParaPrtAreaTable[MAX_FRMTYPES][MAX_BROWSERS] =
+AllHtmlFlags const aHTMLOutFrameParaPrtAreaTable[MAX_FRMTYPES][MAX_BROWSERS] =
 {
     {
         // text frame with table
@@ -310,7 +310,7 @@ AllHtmlFlags aHTMLOutFrameParaPrtAreaTable[MAX_FRMTYPES][MAX_BROWSERS] =
     }
 };
 
-AllHtmlFlags aHTMLOutFrameParaOtherTable[MAX_FRMTYPES][MAX_BROWSERS] =
+AllHtmlFlags const aHTMLOutFrameParaOtherTable[MAX_FRMTYPES][MAX_BROWSERS] =
 {
     {
         // text frame with table
@@ -406,7 +406,7 @@ AllHtmlFlags aHTMLOutFrameParaOtherTable[MAX_FRMTYPES][MAX_BROWSERS] =
     }
 };
 
-AllHtmlFlags aHTMLOutFrameAsCharTable[MAX_FRMTYPES][MAX_BROWSERS] =
+AllHtmlFlags const aHTMLOutFrameAsCharTable[MAX_FRMTYPES][MAX_BROWSERS] =
 {
     {
         // text frame with table
diff --git a/sw/source/filter/html/htmlflywriter.cxx b/sw/source/filter/html/htmlflywriter.cxx
index cfb474f4e48f..efbb9cce6837 100644
--- a/sw/source/filter/html/htmlflywriter.cxx
+++ b/sw/source/filter/html/htmlflywriter.cxx
@@ -143,7 +143,7 @@ static Writer& OutHTML_FrameFormatGrfNode( Writer& rWrt, const SwFrameFormat& rF
 static Writer& OutHTML_FrameFormatAsMarquee( Writer& rWrt, const SwFrameFormat& rFrameFormat,
                                         const SdrObject& rSdrObj    );
 
-static HTMLOutEvent aImageEventTable[] =
+static HTMLOutEvent const aImageEventTable[] =
 {
     { OOO_STRING_SVTOOLS_HTML_O_SDonload,       OOO_STRING_SVTOOLS_HTML_O_onload,   SvMacroItemId::OnImageLoadDone        },
     { OOO_STRING_SVTOOLS_HTML_O_SDonabort,      OOO_STRING_SVTOOLS_HTML_O_onabort,  SvMacroItemId::OnImageLoadCancel       },
@@ -151,7 +151,7 @@ static HTMLOutEvent aImageEventTable[] =
     { nullptr, nullptr, SvMacroItemId::NONE }
 };
 
-static HTMLOutEvent aIMapEventTable[] =
+static HTMLOutEvent const aIMapEventTable[] =
 {
     { OOO_STRING_SVTOOLS_HTML_O_SDonmouseover,  OOO_STRING_SVTOOLS_HTML_O_onmouseover,  SvMacroItemId::OnMouseOver  },
     { OOO_STRING_SVTOOLS_HTML_O_SDonmouseout,   OOO_STRING_SVTOOLS_HTML_O_onmouseout,   SvMacroItemId::OnMouseOut   },
diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx
index bc1f660ff726..d6b641ff8f52 100644
--- a/sw/source/filter/html/htmlform.cxx
+++ b/sw/source/filter/html/htmlform.cxx
@@ -87,14 +87,14 @@ using namespace ::com::sun::star::form;
 const sal_uInt16 TABINDEX_MIN = 0;
 const sal_uInt16 TABINDEX_MAX = 32767;
 
-static HTMLOptionEnum<FormSubmitMethod> aHTMLFormMethodTable[] =
+static HTMLOptionEnum<FormSubmitMethod> const aHTMLFormMethodTable[] =
 {
     { OOO_STRING_SVTOOLS_HTML_METHOD_get,   FormSubmitMethod_GET    },
     { OOO_STRING_SVTOOLS_HTML_METHOD_post,  FormSubmitMethod_POST   },
     { nullptr,                              FormSubmitMethod(0)     }
 };
 
-static HTMLOptionEnum<FormSubmitEncoding> aHTMLFormEncTypeTable[] =
+static HTMLOptionEnum<FormSubmitEncoding> const aHTMLFormEncTypeTable[] =
 {
     { OOO_STRING_SVTOOLS_HTML_ET_url,       FormSubmitEncoding_URL          },
     { OOO_STRING_SVTOOLS_HTML_ET_multipart, FormSubmitEncoding_MULTIPART    },
@@ -104,7 +104,7 @@ static HTMLOptionEnum<FormSubmitEncoding> aHTMLFormEncTypeTable[] =
 
 enum HTMLWordWrapMode { HTML_WM_OFF, HTML_WM_HARD, HTML_WM_SOFT };
 
-static HTMLOptionEnum<HTMLWordWrapMode> aHTMLTextAreaWrapTable[] =
+static HTMLOptionEnum<HTMLWordWrapMode> const aHTMLTextAreaWrapTable[] =
 {
     { OOO_STRING_SVTOOLS_HTML_WW_off,      HTML_WM_OFF     },
     { OOO_STRING_SVTOOLS_HTML_WW_hard,     HTML_WM_HARD    },
diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx
index 5cc87d5bba1c..92e16aa0e80b 100644
--- a/sw/source/filter/html/htmlgrin.cxx
+++ b/sw/source/filter/html/htmlgrin.cxx
@@ -75,14 +75,14 @@
 
 using namespace ::com::sun::star;
 
-HTMLOptionEnum<sal_Int16> aHTMLImgHAlignTable[] =
+HTMLOptionEnum<sal_Int16> const aHTMLImgHAlignTable[] =
 {
     { OOO_STRING_SVTOOLS_HTML_AL_left,    text::HoriOrientation::LEFT       },
     { OOO_STRING_SVTOOLS_HTML_AL_right,   text::HoriOrientation::RIGHT      },
     { nullptr,                            0               }
 };
 
-HTMLOptionEnum<sal_Int16> aHTMLImgVAlignTable[] =
+HTMLOptionEnum<sal_Int16> const aHTMLImgVAlignTable[] =
 {
     { OOO_STRING_SVTOOLS_HTML_VA_top,         text::VertOrientation::LINE_TOP       },
     { OOO_STRING_SVTOOLS_HTML_VA_texttop,     text::VertOrientation::CHAR_TOP       },
diff --git a/sw/source/filter/html/htmlnumreader.cxx b/sw/source/filter/html/htmlnumreader.cxx
index 54c09a7f741d..8584297f2b70 100644
--- a/sw/source/filter/html/htmlnumreader.cxx
+++ b/sw/source/filter/html/htmlnumreader.cxx
@@ -44,7 +44,7 @@
 using namespace css;
 
 // <UL TYPE=...>
-static HTMLOptionEnum<sal_Unicode> aHTMLULTypeTable[] =
+static HTMLOptionEnum<sal_Unicode> const aHTMLULTypeTable[] =
 {
     { OOO_STRING_SVTOOLS_HTML_ULTYPE_disc,    HTML_BULLETCHAR_DISC   },
     { OOO_STRING_SVTOOLS_HTML_ULTYPE_circle,  HTML_BULLETCHAR_CIRCLE },
diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx
index 313e161c4573..cb320b47fc85 100644
--- a/sw/source/filter/html/htmltab.cxx
+++ b/sw/source/filter/html/htmltab.cxx
@@ -73,7 +73,7 @@
 using ::editeng::SvxBorderLine;
 using namespace ::com::sun::star;
 
-static HTMLOptionEnum<sal_Int16> aHTMLTableVAlignTable[] =
+static HTMLOptionEnum<sal_Int16> const aHTMLTableVAlignTable[] =
 {
     { OOO_STRING_SVTOOLS_HTML_VA_top,     text::VertOrientation::NONE       },
     { OOO_STRING_SVTOOLS_HTML_VA_middle,  text::VertOrientation::CENTER     },
diff --git a/sw/source/filter/html/svxcss1.cxx b/sw/source/filter/html/svxcss1.cxx
index 07f1918ff6cd..277cbce73014 100644
--- a/sw/source/filter/html/svxcss1.cxx
+++ b/sw/source/filter/html/svxcss1.cxx
@@ -3078,101 +3078,80 @@ static void ParseCSS1_so_language( const CSS1Expression *pExpr,
 // the assignment of property to parsing function
 struct CSS1PropEntry
 {
-    union
-    {
-        const sal_Char  *sName;
-        OUString          *pName;
-    };
+    const char * pName;
     FnParseCSS1Prop pFunc;
 };
 
 #define CSS1_PROP_ENTRY(p) \
-    {   { sCSS1_P_##p }, ParseCSS1_##p }
+    { sCSS1_P_##p, ParseCSS1_##p }
 
 // the table with assignments
-static CSS1PropEntry aCSS1PropFnTab[] =
+static CSS1PropEntry const aCSS1PropFnTab[] =
 {
     CSS1_PROP_ENTRY(background),
     CSS1_PROP_ENTRY(background_color),
-    CSS1_PROP_ENTRY(border_top_width),
-    CSS1_PROP_ENTRY(border_right_width),
+    CSS1_PROP_ENTRY(border),
+    CSS1_PROP_ENTRY(border_bottom),
     CSS1_PROP_ENTRY(border_bottom_width),
-    CSS1_PROP_ENTRY(border_left_width),
-    CSS1_PROP_ENTRY(border_width),
     CSS1_PROP_ENTRY(border_color),
+    CSS1_PROP_ENTRY(border_left),
+    CSS1_PROP_ENTRY(border_left_width),
+    CSS1_PROP_ENTRY(border_right),
+    CSS1_PROP_ENTRY(border_right_width),
     CSS1_PROP_ENTRY(border_style),
     CSS1_PROP_ENTRY(border_top),
-    CSS1_PROP_ENTRY(border_right),
-    CSS1_PROP_ENTRY(border_bottom),
-    CSS1_PROP_ENTRY(border_left),
-    CSS1_PROP_ENTRY(border),
+    CSS1_PROP_ENTRY(border_top_width),
+    CSS1_PROP_ENTRY(border_width),
     CSS1_PROP_ENTRY(color),
     CSS1_PROP_ENTRY(column_count),
     CSS1_PROP_ENTRY(direction),
     CSS1_PROP_ENTRY(float),
-    CSS1_PROP_ENTRY(font_size),
+    CSS1_PROP_ENTRY(font),
     CSS1_PROP_ENTRY(font_family),
+    CSS1_PROP_ENTRY(font_size),
     CSS1_PROP_ENTRY(font_style),
     CSS1_PROP_ENTRY(font_variant),
     CSS1_PROP_ENTRY(font_weight),
+    CSS1_PROP_ENTRY(height),
+    CSS1_PROP_ENTRY(left),
     CSS1_PROP_ENTRY(letter_spacing),
     CSS1_PROP_ENTRY(line_height),
     CSS1_PROP_ENTRY(list_style_type),
-    CSS1_PROP_ENTRY(font),
-    CSS1_PROP_ENTRY(text_align),
-    CSS1_PROP_ENTRY(text_decoration),
-    CSS1_PROP_ENTRY(text_indent),
-    CSS1_PROP_ENTRY(text_transform),
+    CSS1_PROP_ENTRY(margin),
+    CSS1_PROP_ENTRY(margin_bottom),
     CSS1_PROP_ENTRY(margin_left),
     CSS1_PROP_ENTRY(margin_right),
     CSS1_PROP_ENTRY(margin_top),
-    CSS1_PROP_ENTRY(margin_bottom),
-    CSS1_PROP_ENTRY(margin),
-    CSS1_PROP_ENTRY(padding_top),
+    CSS1_PROP_ENTRY(orphans),
+    CSS1_PROP_ENTRY(padding),
     CSS1_PROP_ENTRY(padding_bottom),
     CSS1_PROP_ENTRY(padding_left),
     CSS1_PROP_ENTRY(padding_right),
-    CSS1_PROP_ENTRY(padding),
-    CSS1_PROP_ENTRY(position),
-    CSS1_PROP_ENTRY(left),
-    CSS1_PROP_ENTRY(top),
-    CSS1_PROP_ENTRY(width),
-    CSS1_PROP_ENTRY(height),
-    CSS1_PROP_ENTRY(size),
-    CSS1_PROP_ENTRY(page_break_before),
+    CSS1_PROP_ENTRY(padding_top),
     CSS1_PROP_ENTRY(page_break_after),
+    CSS1_PROP_ENTRY(page_break_before),
     CSS1_PROP_ENTRY(page_break_inside),
+    CSS1_PROP_ENTRY(position),
+    CSS1_PROP_ENTRY(size),
+    CSS1_PROP_ENTRY(so_language),
+    CSS1_PROP_ENTRY(text_align),
+    CSS1_PROP_ENTRY(text_decoration),
+    CSS1_PROP_ENTRY(text_indent),
+    CSS1_PROP_ENTRY(text_transform),
+    CSS1_PROP_ENTRY(top),
     CSS1_PROP_ENTRY(widows),
-    CSS1_PROP_ENTRY(orphans),
-    CSS1_PROP_ENTRY(so_language)
+    CSS1_PROP_ENTRY(width),
 };
 
-extern "C"
-{
-static int CSS1PropEntryCompare( const void *pFirst, const void *pSecond)
+#ifdef DBG_UTIL
+static bool CSS1PropEntryCompare( const CSS1PropEntry &lhs, const CSS1PropEntry &rhs)
 {
-    int nRet;
-    if( static_cast<const CSS1PropEntry*>(pFirst)->pFunc )
-    {
-        if( static_cast<const CSS1PropEntry*>(pSecond)->pFunc )
-            nRet = strcmp( static_cast<const CSS1PropEntry*>(pFirst)->sName ,
-                    static_cast<const CSS1PropEntry*>(pSecond)->sName );
-        else
-            nRet = -1 * static_cast<const CSS1PropEntry*>(pSecond)->pName->compareToAscii(
-                            static_cast<const CSS1PropEntry*>(pFirst)->sName );
-    }
-    else
-    {
-        if( static_cast<const CSS1PropEntry*>(pSecond)->pFunc )
-            nRet = static_cast<const CSS1PropEntry*>(pFirst)->pName->compareToAscii(
-                        static_cast<const CSS1PropEntry*>(pSecond)->sName );
-        else
-            nRet = static_cast<const CSS1PropEntry*>(pFirst)->pName->compareTo(
-                        *static_cast<const CSS1PropEntry*>(pSecond)->pName );
-    }
-
-    return nRet;
+    return strcmp(lhs.pName, rhs.pName) < 0;
 }
+#endif
+static bool CSS1PropEntryFindCompare(CSS1PropEntry const & lhs, OUString const & s)
+{
+    return s.compareToIgnoreAsciiCaseAscii(lhs.pName) > 0;
 }
 
 void SvxCSS1Parser::ParseProperty( const OUString& rProperty,
@@ -3184,27 +3163,16 @@ void SvxCSS1Parser::ParseProperty( const OUString& rProperty,
 
     if( !bSortedPropFns )
     {
-        qsort( static_cast<void*>(aCSS1PropFnTab),
-                sizeof( aCSS1PropFnTab ) / sizeof( CSS1PropEntry ),
-                sizeof( CSS1PropEntry ),
-                CSS1PropEntryCompare );
+        assert( std::is_sorted( std::begin(aCSS1PropFnTab), std::end(aCSS1PropFnTab),
+                                CSS1PropEntryCompare ) );
         bSortedPropFns = true;
     }
 
-    OUString aTmp( rProperty.toAsciiLowerCase() );
-
-    CSS1PropEntry aSrch;
-    aSrch.pName = &aTmp;
-    aSrch.pFunc = nullptr;
-
-    void* pFound;
-    if( nullptr != ( pFound = bsearch( &aSrch,
-                        static_cast<void*>(aCSS1PropFnTab),
-                        sizeof( aCSS1PropFnTab ) / sizeof( CSS1PropEntry ),
-                        sizeof( CSS1PropEntry ),
-                        CSS1PropEntryCompare )))
+    auto it = std::lower_bound( std::begin(aCSS1PropFnTab), std::end(aCSS1PropFnTab), rProperty,
+                                CSS1PropEntryFindCompare );
+    if( it != std::end(aCSS1PropFnTab) && !CSS1PropEntryFindCompare(*it,rProperty)  )
     {
-        (static_cast<CSS1PropEntry*>(pFound)->pFunc)( pExpr, *pItemSet, *pPropInfo, *this );
+        it->pFunc( pExpr, *pItemSet, *pPropInfo, *this );
     }
 }
 
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index a4f6966ab268..2e11911b7ece 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -137,7 +137,7 @@ using editeng::SvxBorderLine;
 using namespace ::com::sun::star;
 
 // <P ALIGN=xxx>, <Hn ALIGN=xxx>, <TD ALIGN=xxx> etc.
-HTMLOptionEnum<SvxAdjust> aHTMLPAlignTable[] =
+HTMLOptionEnum<SvxAdjust> const aHTMLPAlignTable[] =
 {
     { OOO_STRING_SVTOOLS_HTML_AL_left,    SvxAdjust::Left     },
     { OOO_STRING_SVTOOLS_HTML_AL_center,  SvxAdjust::Center   },
@@ -149,7 +149,7 @@ HTMLOptionEnum<SvxAdjust> aHTMLPAlignTable[] =
 };
 
 // <SPACER TYPE=...>
-static HTMLOptionEnum<sal_uInt16> aHTMLSpacerTypeTable[] =
+static HTMLOptionEnum<sal_uInt16> const aHTMLSpacerTypeTable[] =
 {
     { OOO_STRING_SVTOOLS_HTML_SPTYPE_block,      HTML_SPTYPE_BLOCK       },
     { OOO_STRING_SVTOOLS_HTML_SPTYPE_horizontal, HTML_SPTYPE_HORI        },
diff --git a/sw/source/filter/html/swhtml.hxx b/sw/source/filter/html/swhtml.hxx
index 596b56261fd6..12d4dbe416e9 100644
--- a/sw/source/filter/html/swhtml.hxx
+++ b/sw/source/filter/html/swhtml.hxx
@@ -64,9 +64,9 @@ struct ImplSVEvent;
 #define HTML_DFLT_IMG_HEIGHT (MM50*2)
 
 // some things you often need
-extern HTMLOptionEnum<SvxAdjust> aHTMLPAlignTable[];
-extern HTMLOptionEnum<sal_Int16> aHTMLImgHAlignTable[];
-extern HTMLOptionEnum<sal_Int16> aHTMLImgVAlignTable[];
+extern HTMLOptionEnum<SvxAdjust> const aHTMLPAlignTable[];
+extern HTMLOptionEnum<sal_Int16> const aHTMLImgHAlignTable[];
+extern HTMLOptionEnum<sal_Int16> const aHTMLImgVAlignTable[];
 
 // attribute stack:
 
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index 2d1a08096f70..71d7f831aeb2 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -1515,7 +1515,7 @@ struct CharAttr
 };
 
 // Edit corresponds to Paste-attributes
-static CharAttr aRedlineAttr[] =
+static CharAttr const aRedlineAttr[] =
 {
     { SID_ATTR_CHAR_CASEMAP,        sal_uInt16(SvxCaseMap::NotMapped) },
     { SID_ATTR_CHAR_WEIGHT,         WEIGHT_BOLD },
@@ -1696,8 +1696,8 @@ namespace
     {
         for (size_t i = 0; i != nAttrMapSize; ++i)
         {
-            CharAttr& rAttr(aRedlineAttr[pAttrMap[i]]);
-            rLB.SetEntryData(i, &rAttr);
+            CharAttr const & rAttr(aRedlineAttr[pAttrMap[i]]);
+            rLB.SetEntryData(i, const_cast<CharAttr*>(&rAttr));
             if (rAttr.nItemId == rAttrToSelect.m_nItemId &&
                 rAttr.nAttr == rAttrToSelect.m_nAttr)
                 rLB.SelectEntryPos(i);
diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index 68ceb2a4ea06..b7d41aca0474 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -136,7 +136,7 @@ struct FrameMap
 };
 
 
-static RelationMap aRelationMap[] =
+static RelationMap const aRelationMap[] =
 {
     {SwFPos::FRAME,  SwFPos::FRAME, LB::Frame, text::RelOrientation::FRAME},
     {SwFPos::PRTAREA,           SwFPos::PRTAREA,                LB::PrintArea,             text::RelOrientation::PRINT_AREA},
@@ -162,7 +162,7 @@ static RelationMap aRelationMap[] =
     {SwFPos::REL_LINE,  SwFPos::REL_LINE,   LB::VertLine,   text::RelOrientation::TEXT_LINE}
 };
 
-static RelationMap aAsCharRelationMap[] =
+static RelationMap const aAsCharRelationMap[] =
 {
     {SwFPos::REL_BASE,  SwFPos::REL_BASE,   LB::RelBase,    text::RelOrientation::FRAME},
     {SwFPos::REL_CHAR,   SwFPos::REL_CHAR,   LB::RelChar,   text::RelOrientation::FRAME},
@@ -173,7 +173,7 @@ static RelationMap aAsCharRelationMap[] =
 #define HORI_PAGE_REL   (LB::RelPageFrame|LB::RelPagePrintArea|LB::RelPageLeft| \
                         LB::RelPageRight)
 
-static FrameMap aHPageMap[] =
+static FrameMap const aHPageMap[] =
 {
     {SwFPos::LEFT,          SwFPos::MIR_LEFT,       text::HoriOrientation::LEFT,      HORI_PAGE_REL},
     {SwFPos::RIGHT,         SwFPos::MIR_RIGHT,      text::HoriOrientation::RIGHT,     HORI_PAGE_REL},
@@ -181,14 +181,14 @@ static FrameMap aHPageMap[] =
     {SwFPos::FROMLEFT,      SwFPos::MIR_FROMLEFT,   text::HoriOrientation::NONE,      HORI_PAGE_REL}
 };
 
-static FrameMap aHPageHtmlMap[] =
+static FrameMap const aHPageHtmlMap[] =
 {
     {SwFPos::FROMLEFT,      SwFPos::MIR_FROMLEFT,   text::HoriOrientation::NONE,      LB::RelPageFrame}
 };
 
 #define VERT_PAGE_REL   (LB::RelPageFrame|LB::RelPagePrintArea)
 
-static FrameMap aVPageMap[] =
+static FrameMap const aVPageMap[] =
 {
     {SwFPos::TOP,           SwFPos::TOP,            text::VertOrientation::TOP,       VERT_PAGE_REL},
     {SwFPos::BOTTOM,        SwFPos::BOTTOM,         text::VertOrientation::BOTTOM,    VERT_PAGE_REL},
@@ -196,7 +196,7 @@ static FrameMap aVPageMap[] =
     {SwFPos::FROMTOP,       SwFPos::FROMTOP,        text::VertOrientation::NONE,      VERT_PAGE_REL}
 };
 
-static FrameMap aVPageHtmlMap[] =
+static FrameMap const aVPageHtmlMap[] =
 {
     {SwFPos::FROMTOP,       SwFPos::FROMTOP,        text::VertOrientation::NONE,      LB::RelPageFrame}
 };
@@ -205,7 +205,7 @@ static FrameMap aVPageHtmlMap[] =
 #define HORI_FRAME_REL  (LB::FlyRelPageFrame|LB::FlyRelPagePrintArea| \
                         LB::FlyRelPageLeft|LB::FlyRelPageRight)
 
-static FrameMap aHFrameMap[] =
+static FrameMap const aHFrameMap[] =
 {
     {SwFPos::LEFT,          SwFPos::MIR_LEFT,       text::HoriOrientation::LEFT,  HORI_FRAME_REL},
     {SwFPos::RIGHT,         SwFPos::MIR_RIGHT,      text::HoriOrientation::RIGHT,     HORI_FRAME_REL},
@@ -213,7 +213,7 @@ static FrameMap aHFrameMap[] =
     {SwFPos::FROMLEFT,      SwFPos::MIR_FROMLEFT,   text::HoriOrientation::NONE,      HORI_FRAME_REL}
 };
 
-static FrameMap aHFlyHtmlMap[] =
+static FrameMap const aHFlyHtmlMap[] =
 {
     {SwFPos::LEFT,          SwFPos::MIR_LEFT,       text::HoriOrientation::LEFT,      LB::FlyRelPageFrame},
     {SwFPos::FROMLEFT,      SwFPos::MIR_FROMLEFT,   text::HoriOrientation::NONE,      LB::FlyRelPageFrame}
@@ -222,7 +222,7 @@ static FrameMap aHFlyHtmlMap[] =
 // own vertical alignment map for objects anchored to frame
 #define VERT_FRAME_REL   (LB::FlyVertFrame|LB::FlyVertPrintArea)
 
-static FrameMap aVFrameMap[] =
+static FrameMap const aVFrameMap[] =
 {
     {SwFPos::TOP,           SwFPos::TOP,            text::VertOrientation::TOP,       VERT_FRAME_REL},
     {SwFPos::BOTTOM,        SwFPos::BOTTOM,         text::VertOrientation::BOTTOM,    VERT_FRAME_REL},
@@ -230,7 +230,7 @@ static FrameMap aVFrameMap[] =
     {SwFPos::FROMTOP,       SwFPos::FROMTOP,        text::VertOrientation::NONE,      VERT_FRAME_REL}
 };
 
-static FrameMap aVFlyHtmlMap[] =
+static FrameMap const aVFlyHtmlMap[] =
 {
     {SwFPos::TOP,           SwFPos::TOP,            text::VertOrientation::TOP,       LB::FlyVertFrame},
     {SwFPos::FROMTOP,       SwFPos::FROMTOP,        text::VertOrientation::NONE,      LB::FlyVertFrame}
@@ -241,7 +241,7 @@ static FrameMap aVFlyHtmlMap[] =
                         LB::RelPageFrame|LB::RelPagePrintArea|LB::RelFrameLeft| \
                         LB::RelFrameRight)
 
-static FrameMap aHParaMap[] =
+static FrameMap const aHParaMap[] =
 {
     {SwFPos::LEFT,          SwFPos::MIR_LEFT,       text::HoriOrientation::LEFT,      HORI_PARA_REL},
     {SwFPos::RIGHT,         SwFPos::MIR_RIGHT,      text::HoriOrientation::RIGHT,     HORI_PARA_REL},
@@ -251,13 +251,13 @@ static FrameMap aHParaMap[] =
 
 #define HTML_HORI_PARA_REL  (LB::Frame|LB::PrintArea)
 
-static FrameMap aHParaHtmlMap[] =
+static FrameMap const aHParaHtmlMap[] =
 {
     {SwFPos::LEFT,  SwFPos::LEFT,   text::HoriOrientation::LEFT,      HTML_HORI_PARA_REL},
     {SwFPos::RIGHT, SwFPos::RIGHT,  text::HoriOrientation::RIGHT,     HTML_HORI_PARA_REL}
 };
 
-static FrameMap aHParaHtmlAbsMap[] =
+static FrameMap const aHParaHtmlAbsMap[] =
 {
     {SwFPos::LEFT,          SwFPos::MIR_LEFT,       text::HoriOrientation::LEFT,      HTML_HORI_PARA_REL},
     {SwFPos::RIGHT,         SwFPos::MIR_RIGHT,      text::HoriOrientation::RIGHT,     HTML_HORI_PARA_REL}
@@ -267,7 +267,7 @@ static FrameMap aHParaHtmlAbsMap[] =
 #define VERT_PARA_REL   (LB::VertFrame|LB::VertPrintArea| \
                          LB::RelPageFrame|LB::RelPagePrintArea)
 
-static FrameMap aVParaMap[] =
+static FrameMap const aVParaMap[] =
 {
     {SwFPos::TOP,           SwFPos::TOP,            text::VertOrientation::TOP,       VERT_PARA_REL},
     {SwFPos::BOTTOM,        SwFPos::BOTTOM,         text::VertOrientation::BOTTOM,    VERT_PARA_REL},
@@ -275,7 +275,7 @@ static FrameMap aVParaMap[] =
     {SwFPos::FROMTOP,       SwFPos::FROMTOP,        text::VertOrientation::NONE,      VERT_PARA_REL}
 };
 
-static FrameMap aVParaHtmlMap[] =
+static FrameMap const aVParaHtmlMap[] =
 {
     {SwFPos::TOP,           SwFPos::TOP,            text::VertOrientation::TOP,       LB::VertPrintArea}
 };
@@ -285,7 +285,7 @@ static FrameMap aVParaHtmlMap[] =
                         LB::RelPageFrame|LB::RelPagePrintArea|LB::RelFrameLeft| \
                         LB::RelFrameRight|LB::RelChar)
 
-static FrameMap aHCharMap[] =
+static FrameMap const aHCharMap[] =
 {
     {SwFPos::LEFT,          SwFPos::MIR_LEFT,       text::HoriOrientation::LEFT,      HORI_CHAR_REL},
     {SwFPos::RIGHT,         SwFPos::MIR_RIGHT,      text::HoriOrientation::RIGHT,     HORI_CHAR_REL},
@@ -295,13 +295,13 @@ static FrameMap aHCharMap[] =
 
 #define HTML_HORI_CHAR_REL  (LB::Frame|LB::PrintArea|LB::RelChar)
 
-static FrameMap aHCharHtmlMap[] =
+static FrameMap const aHCharHtmlMap[] =
 {
     {SwFPos::LEFT,          SwFPos::LEFT,           text::HoriOrientation::LEFT,      HTML_HORI_CHAR_REL},
     {SwFPos::RIGHT,         SwFPos::RIGHT,          text::HoriOrientation::RIGHT,     HTML_HORI_CHAR_REL}
 };
 
-static FrameMap aHCharHtmlAbsMap[] =
+static FrameMap const aHCharHtmlAbsMap[] =
 {
     {SwFPos::LEFT,          SwFPos::MIR_LEFT,       text::HoriOrientation::LEFT,      LB::PrintArea|LB::RelChar},
     {SwFPos::RIGHT,         SwFPos::MIR_RIGHT,      text::HoriOrientation::RIGHT,     LB::PrintArea},
@@ -312,7 +312,7 @@ static FrameMap aHCharHtmlAbsMap[] =
 #define VERT_CHAR_REL   (LB::VertFrame|LB::VertPrintArea| \
                          LB::RelPageFrame|LB::RelPagePrintArea)
 
-static FrameMap aVCharMap[] =
+static FrameMap const aVCharMap[] =
 {
     // introduce mappings for new vertical alignment at top of line <LB::VertLine>
     // and correct mapping for vertical alignment at character for position <FROM_BOTTOM>
@@ -331,19 +331,19 @@ static FrameMap aVCharMap[] =
     {SwFPos::CENTER_VERT,   SwFPos::CENTER_VERT,    text::VertOrientation::LINE_CENTER,   LB::VertLine}
 };
 
-static FrameMap aVCharHtmlMap[] =
+static FrameMap const aVCharHtmlMap[] =
 {
     {SwFPos::BELOW,         SwFPos::BELOW,          text::VertOrientation::CHAR_BOTTOM,   LB::RelChar}
 };
 
-static FrameMap aVCharHtmlAbsMap[] =
+static FrameMap const aVCharHtmlAbsMap[] =
 {
     {SwFPos::TOP,           SwFPos::TOP,            text::VertOrientation::TOP,           LB::RelChar},
     {SwFPos::BELOW,             SwFPos::BELOW,          text::VertOrientation::CHAR_BOTTOM,   LB::RelChar}
 };
 
 // anchored as character
-static FrameMap aVAsCharMap[] =
+static FrameMap const aVAsCharMap[] =
 {
     {SwFPos::TOP,               SwFPos::TOP,            text::VertOrientation::TOP,           LB::RelBase},
     {SwFPos::BOTTOM,        SwFPos::BOTTOM,         text::VertOrientation::BOTTOM,        LB::RelBase},
@@ -360,7 +360,7 @@ static FrameMap aVAsCharMap[] =
     {SwFPos::FROMBOTTOM,    SwFPos::FROMBOTTOM,     text::VertOrientation::NONE,          LB::RelBase}
 };
 
-static FrameMap aVAsCharHtmlMap[] =
+static FrameMap const aVAsCharHtmlMap[] =
 {
     {SwFPos::TOP,               SwFPos::TOP,            text::VertOrientation::TOP,           LB::RelBase},
     {SwFPos::CENTER_VERT,   SwFPos::CENTER_VERT,    text::VertOrientation::CENTER,        LB::RelBase},
@@ -561,7 +561,7 @@ static LB lcl_GetLBRelationsForRelations( const sal_Int16 _nRel )
 {
     LB nLBRelations = LB::NONE;
 
-    for (RelationMap & i : aRelationMap)
+    for (RelationMap const & i : aRelationMap)
     {
         if ( i.nRelation == _nRel )
         {
@@ -768,14 +768,14 @@ namespace
 {
     struct FrameMaps
     {
-        FrameMap * const pMap;
-        size_t const nCount;
+        FrameMap const * pMap;
+        size_t nCount;
     };
 }
 
 void SwFramePage::setOptimalFrameWidth()
 {
-    const FrameMaps aMaps[] = {
+    static FrameMaps const aMaps[] = {
         { aHPageMap, SAL_N_ELEMENTS(aHPageMap) },
         { aHPageHtmlMap, SAL_N_ELEMENTS(aHPageHtmlMap) },
         { aVPageMap, SAL_N_ELEMENTS(aVPageMap) },
@@ -828,14 +828,14 @@ namespace
 {
     struct RelationMaps
     {
-        RelationMap * const pMap;
-        size_t const nCount;
+        RelationMap const * pMap;
+        size_t nCount;
     };
 }
 
 void SwFramePage::setOptimalRelWidth()
 {
-    const RelationMaps aMaps[] = {
+    static const RelationMaps aMaps[] = {
         { aRelationMap, SAL_N_ELEMENTS(aRelationMap) },
         { aAsCharRelationMap, SAL_N_ELEMENTS(aAsCharRelationMap) }
     };
@@ -1475,7 +1475,7 @@ void SwFramePage::FillRelLB( const FrameMap* _pMap,
                 if (_pMap[nMapPos].eStrId == eStrId)
                 {
                     nLBRelations = _pMap[nMapPos].nLBRelations;
-                    for (RelationMap & rCharMap : aAsCharRelationMap)
+                    for (RelationMap const & rCharMap : aAsCharRelationMap)
                     {
                         if (nLBRelations & rCharMap.nLBRelation)
                         {
@@ -1489,7 +1489,7 @@ void SwFramePage::FillRelLB( const FrameMap* _pMap,
                                                                 m_bIsInRightToLeft);
                             const OUString sEntry = SvxSwFramePosString::GetString(sStrId1);
                             sal_Int32 nPos = _rLB.InsertEntry(sEntry);
-                            _rLB.SetEntryData(nPos, &rCharMap);
+                            _rLB.SetEntryData(nPos, const_cast<RelationMap*>(&rCharMap));
                             if (_pMap[nMapPos].nAlign == _nAlign)
                                 sSelEntry = sEntry;
                             break;
@@ -1538,7 +1538,7 @@ void SwFramePage::FillRelLB( const FrameMap* _pMap,
             {
                 if (nLBRelations & static_cast<LB>(nBit))
                 {
-                    for (RelationMap & rMap : aRelationMap)
+                    for (RelationMap const & rMap : aRelationMap)
                     {
                         if (rMap.nLBRelation == static_cast<LB>(nBit))
                         {
@@ -1552,7 +1552,7 @@ void SwFramePage::FillRelLB( const FrameMap* _pMap,
                                                                 m_bIsInRightToLeft);
                             const OUString sEntry = SvxSwFramePosString::GetString(eStrId1);
                             sal_Int32 nPos = _rLB.InsertEntry(sEntry);
-                            _rLB.SetEntryData(nPos, &rMap);
+                            _rLB.SetEntryData(nPos, const_cast<RelationMap*>(&rMap));
                             if (sSelEntry.isEmpty() && rMap.nRelation == _nRel)
                                 sSelEntry = sEntry;
                         }
@@ -1954,7 +1954,7 @@ IMPL_LINK( SwFramePage, PosHdl, ListBox&, rLB, void )
     bool bHori = &rLB == m_pHorizontalDLB;
     ListBox *pRelLB = bHori ? m_pHoriRelationLB.get() : m_pVertRelationLB.get();
     FixedText *pRelFT = bHori ? m_pHoriRelationFT.get() : m_pVertRelationFT.get();
-    FrameMap *pMap = bHori ? m_pHMap : m_pVMap;
+    FrameMap const *pMap = bHori ? m_pHMap : m_pVMap;
 
     const sal_Int32 nMapPos = GetMapPos(pMap, rLB);
     const sal_Int16 nAlign = GetAlignment(pMap, nMapPos, *pRelLB);
@@ -2166,7 +2166,7 @@ void SwFramePage::Init(const SfxItemSet& rSet, bool bReset)
             // disable width and height for math objects
             const SvGlobalName& rFactNm( pSh->GetOLEObject()->getClassID() );
 
-            struct GlobalNameId {
+            static struct GlobalNameId {
                 sal_uInt32 const n1;
                 sal_uInt16 n2, n3;
                 sal_uInt8 b8, b9, b10, b11, b12, b13, b14, b15;
diff --git a/sw/source/ui/vba/vbafont.cxx b/sw/source/ui/vba/vbafont.cxx
index 5b27aed01fff..848dbc292f9e 100644
--- a/sw/source/ui/vba/vbafont.cxx
+++ b/sw/source/ui/vba/vbafont.cxx
@@ -38,7 +38,7 @@ struct MapPair
     sal_Int32 nOOOConst;
 };
 
-static MapPair UnderLineTable[] = {
+static MapPair const UnderLineTable[] = {
         { word::WdUnderline::wdUnderlineNone, css::awt::FontUnderline::NONE },
         { word::WdUnderline::wdUnderlineSingle, css::awt::FontUnderline::SINGLE },
         { word::WdUnderline::wdUnderlineWords, css::awt::FontUnderline::SINGLE },
diff --git a/sw/source/uibase/inc/frmpage.hxx b/sw/source/uibase/inc/frmpage.hxx
index 377101b6232b..a01b5eec508d 100644
--- a/sw/source/uibase/inc/frmpage.hxx
+++ b/sw/source/uibase/inc/frmpage.hxx
@@ -119,8 +119,8 @@ class SwFramePage: public SfxTabPage
     sal_Int16 m_nOldV;
     sal_Int16 m_nOldVRel;
 
-    FrameMap* m_pVMap;
-    FrameMap* m_pHMap;
+    FrameMap const * m_pVMap;
+    FrameMap const * m_pHMap;
 
     bool    m_bAllowVertPositioning;
     bool    m_bIsMathOLE;
diff --git a/sw/source/uibase/ribbar/workctrl.cxx b/sw/source/uibase/ribbar/workctrl.cxx
index f95fa36b32f5..36eea8a94e11 100644
--- a/sw/source/uibase/ribbar/workctrl.cxx
+++ b/sw/source/uibase/ribbar/workctrl.cxx
@@ -182,7 +182,7 @@ static sal_uInt16 aNavigationInsertIds[ NAVI_ENTRIES ] =
     NID_NEXT
 };
 
-static OUStringLiteral aNavigationImgIds[ NAVI_ENTRIES ] =
+static OUStringLiteral const aNavigationImgIds[ NAVI_ENTRIES ] =
 {
     // -- first line
     RID_BMP_RIBBAR_TBL,


More information about the Libreoffice-commits mailing list