Kaydet (Commit) 6ca6d6ac authored tarafından Caolán McNamara's avatar Caolán McNamara

Related: tdf#71737: allows links in more indexes

tables, objects and user-defined

Change-Id: I081446832ee86453227f4838552c88fd9e5cf75f
Reviewed-on: https://gerrit.libreoffice.org/46326Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 5c331789
......@@ -2103,7 +2103,11 @@ void SwTOXEntryTabPage::ActivatePage( const SfxItemSet& /*rSet*/)
bool bToxIsAuthorities = TOX_AUTHORITIES == aCurType.eType;
bool bToxIsIndex = TOX_INDEX == aCurType.eType;
bool bToxIsContent = TOX_CONTENT == aCurType.eType;
bool bToxIsSequence = TOX_ILLUSTRATIONS == aCurType.eType;
bool bToxSupportsLinks = TOX_CONTENT == aCurType.eType ||
TOX_ILLUSTRATIONS == aCurType.eType ||
TOX_TABLES == aCurType.eType ||
TOX_OBJECTS == aCurType.eType ||
TOX_USER == aCurType.eType;
m_pLevelLB->Clear();
for(sal_uInt16 i = 1; i < m_pCurrentForm->GetFormMax(); i++)
......@@ -2173,7 +2177,7 @@ void SwTOXEntryTabPage::ActivatePage( const SfxItemSet& /*rSet*/)
//show or hide controls
m_pEntryNoPB->Show(bToxIsContent);
m_pHyperLinkPB->Show(bToxIsContent || bToxIsSequence);
m_pHyperLinkPB->Show(bToxSupportsLinks);
m_pRelToStyleCB->Show(!bToxIsAuthorities);
m_pChapterInfoPB->Show(!bToxIsContent && !bToxIsAuthorities);
m_pEntryPB->Show(!bToxIsAuthorities);
......
......@@ -63,7 +63,7 @@ SvXMLImportContextRef XMLIndexIllustrationSourceContext::CreateChildContext(
aLevelNameTableMap,
XML_TOKEN_INVALID, // no outline-level attr
aLevelStylePropNameTableMap,
aIllustrationAllowedTokenTypesTable);
aAllowedTokenTypesTable);
}
else
{
......
......@@ -432,7 +432,7 @@ const SvXMLEnumMapEntry<sal_uInt16>* aLevelNameTableMap = nullptr;
const sal_Char* aLevelStylePropNameTableMap[] =
{ nullptr, "ParaStyleLevel1", nullptr };
const bool aIllustrationAllowedTokenTypesTable[] =
const bool aAllowedTokenTypesTable[] =
{
true, // XML_TOK_INDEX_TYPE_ENTRY_TEXT =
true, // XML_TOK_INDEX_TYPE_TAB_STOP,
......@@ -444,16 +444,4 @@ const bool aIllustrationAllowedTokenTypesTable[] =
false // XML_TOK_INDEX_TYPE_BIBLIOGRAPHY
};
const bool aAllowedTokenTypesTable[] =
{
true, // XML_TOK_INDEX_TYPE_ENTRY_TEXT =
true, // XML_TOK_INDEX_TYPE_TAB_STOP,
true, // XML_TOK_INDEX_TYPE_TEXT,
true, // XML_TOK_INDEX_TYPE_PAGE_NUMBER,
true, // XML_TOK_INDEX_TYPE_CHAPTER,
false, // XML_TOK_INDEX_TYPE_LINK_START,
false, // XML_TOK_INDEX_TYPE_LINK_END,
false // XML_TOK_INDEX_TYPE_BIBLIOGRAPHY
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -56,7 +56,6 @@ extern const bool aAllowedTokenTypesBibliography[];
// table, illustration and object tables:
extern const SvXMLEnumMapEntry<sal_uInt16>* aLevelNameTableMap; // NULL: no outline-level
extern const sal_Char* aLevelStylePropNameTableMap[];
extern const bool aIllustrationAllowedTokenTypesTable[];
extern const bool aAllowedTokenTypesTable[];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment