tdf#158773 reduce size of IndexedStyleSheets

we don't need to store SfxStyleFamily::All in the mStyleSheetsByFamily
array, the call sites just iterate over the main vector for that
case.

Change-Id: I17fca2aa59e786d6dee13c884dedb9fde847b979
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164579
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
diff --git a/include/svl/IndexedStyleSheets.hxx b/include/svl/IndexedStyleSheets.hxx
index 1a76604..1734c72 100644
--- a/include/svl/IndexedStyleSheets.hxx
+++ b/include/svl/IndexedStyleSheets.hxx
@@ -173,7 +173,7 @@ private:
    /** A map which stores the positions of style sheets by their name */
    MapType mPositionsByName;

    static constexpr size_t NUMBER_OF_FAMILIES = 7;
    static constexpr size_t NUMBER_OF_FAMILIES = 6;

    std::array<std::vector<SfxStyleSheetBase*>, NUMBER_OF_FAMILIES> mStyleSheetsByFamily;
};
diff --git a/svl/qa/unit/items/test_IndexedStyleSheets.cxx b/svl/qa/unit/items/test_IndexedStyleSheets.cxx
index a94572d..314ce26 100644
--- a/svl/qa/unit/items/test_IndexedStyleSheets.cxx
+++ b/svl/qa/unit/items/test_IndexedStyleSheets.cxx
@@ -179,8 +179,8 @@ void IndexedStyleSheetsTest::PositionCanBeQueriedByFamily()
    const std::vector<SfxStyleSheetBase*>& v = iss.GetStyleSheetsByFamily(SfxStyleFamily::Char);
    CPPUNIT_ASSERT_EQUAL_MESSAGE("Separation by family works.", static_cast<size_t>(2), v.size());

    const std::vector<SfxStyleSheetBase*>& w = iss.GetStyleSheetsByFamily(SfxStyleFamily::All);
    CPPUNIT_ASSERT_EQUAL_MESSAGE("Wildcard works for family queries.", static_cast<size_t>(3), w.size());
    const std::vector<SfxStyleSheetBase*>& w = iss.GetStyleSheetsByFamily(SfxStyleFamily::Para);
    CPPUNIT_ASSERT_EQUAL_MESSAGE("Wildcard works for family queries.", static_cast<size_t>(1), w.size());
}

void IndexedStyleSheetsTest::OnlyOneStyleSheetIsReturnedWhenReturnFirstIsUsed()
diff --git a/svl/source/items/IndexedStyleSheets.cxx b/svl/source/items/IndexedStyleSheets.cxx
index 0c5f0f7..351e564 100644
--- a/svl/source/items/IndexedStyleSheets.cxx
+++ b/svl/source/items/IndexedStyleSheets.cxx
@@ -32,8 +32,6 @@ size_t family_to_index(SfxStyleFamily family)
        return 4;
    case SfxStyleFamily::Table:
        return 5;
    case SfxStyleFamily::All:
        return 6;
    default: break;
    }
    assert(false); // only for compiler warning. all cases are handled in the switch
@@ -52,8 +50,6 @@ void IndexedStyleSheets::Register(SfxStyleSheetBase& style, sal_Int32 pos)
    mPositionsByName.insert(std::make_pair(style.GetName(), pos));
    size_t position = family_to_index(style.GetFamily());
    mStyleSheetsByFamily.at(position).push_back(&style);
    size_t positionForFamilyAll = family_to_index(SfxStyleFamily::All);
    mStyleSheetsByFamily.at(positionForFamilyAll).push_back(&style);
}

void