summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-12-07 09:35:08 +0000
committerCaolán McNamara <caolanm@redhat.com>2017-12-13 09:09:00 +0100
commit6ca6d6ac912588a8f62d7e6b668ebec333752ebc (patch)
tree25d45bf9fb20092195f6f17a5def078e460f0e60
parent5c3317897b2ddd9f7144917685a4da2242fd1696 (diff)
Related: tdf#71737: allows links in more indexes
tables, objects and user-defined Change-Id: I081446832ee86453227f4838552c88fd9e5cf75f Reviewed-on: https://gerrit.libreoffice.org/46326 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--sw/source/ui/index/cnttab.cxx8
-rw-r--r--xmloff/source/text/XMLIndexIllustrationSourceContext.cxx2
-rw-r--r--xmloff/source/text/XMLIndexTemplateContext.cxx14
-rw-r--r--xmloff/source/text/XMLIndexTemplateContext.hxx1
4 files changed, 8 insertions, 17 deletions
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index ac3b7fc411d0..0fbc5b42f22d 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -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);
diff --git a/xmloff/source/text/XMLIndexIllustrationSourceContext.cxx b/xmloff/source/text/XMLIndexIllustrationSourceContext.cxx
index 4e79914d4856..87fa6219b570 100644
--- a/xmloff/source/text/XMLIndexIllustrationSourceContext.cxx
+++ b/xmloff/source/text/XMLIndexIllustrationSourceContext.cxx
@@ -63,7 +63,7 @@ SvXMLImportContextRef XMLIndexIllustrationSourceContext::CreateChildContext(
aLevelNameTableMap,
XML_TOKEN_INVALID, // no outline-level attr
aLevelStylePropNameTableMap,
- aIllustrationAllowedTokenTypesTable);
+ aAllowedTokenTypesTable);
}
else
{
diff --git a/xmloff/source/text/XMLIndexTemplateContext.cxx b/xmloff/source/text/XMLIndexTemplateContext.cxx
index b538860afeeb..17d718fc6cdf 100644
--- a/xmloff/source/text/XMLIndexTemplateContext.cxx
+++ b/xmloff/source/text/XMLIndexTemplateContext.cxx
@@ -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: */
diff --git a/xmloff/source/text/XMLIndexTemplateContext.hxx b/xmloff/source/text/XMLIndexTemplateContext.hxx
index b2907ef1efb3..03562ee91541 100644
--- a/xmloff/source/text/XMLIndexTemplateContext.hxx
+++ b/xmloff/source/text/XMLIndexTemplateContext.hxx
@@ -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[];