diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-07-21 08:39:50 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-07-21 10:24:35 +0100 |
commit | f464159fb212a61bdce2c6eb765733abe7ac4f0b (patch) | |
tree | eebd442918f86c9e2ff9e062a63d8dc44f83b97a | |
parent | 0d6cb9f8455844c58ff52f220eebbf04ad18bddc (diff) |
can use the "real" type for RES_SRCTYPES now
Change-Id: Ied1f7a8c4135d3fd6a4581ea5e92f89b2e6b3067
-rw-r--r-- | sw/inc/cnttab.hrc | 22 | ||||
-rw-r--r-- | sw/source/ui/index/cnttab.cxx | 2 |
2 files changed, 9 insertions, 15 deletions
diff --git a/sw/inc/cnttab.hrc b/sw/inc/cnttab.hrc index b25e7a53dcc7..e593e3c3fb13 100644 --- a/sw/inc/cnttab.hrc +++ b/sw/inc/cnttab.hrc @@ -20,23 +20,17 @@ #ifndef INCLUDED_SW_INC_CNTTAB_HRC #define INCLUDED_SW_INC_CNTTAB_HRC +#include <tox.hxx> + #define NC_(Context, String) (Context "\004" u8##String) -const std::pair<const char*, int> RES_SRCTYPES[] = +const std::pair<const char*, SwTOOElements> RES_SRCTYPES[] = { - /* ids from tox.hxx - SwTOOElements::Math = 0x01, - SwTOOElements::Chart = 0x02, - TOO_IMAGE = 0x04, - SwTOOElements::Calc = 0x08, - SwTOOElements::DrawImpress= 0x10, - SwTOOElements::Other = 0x80 - */ - { NC_("RES_SRCTYPES", "%PRODUCTNAME Math") , 1}, - { NC_("RES_SRCTYPES", "%PRODUCTNAME Chart") , 2}, - { NC_("RES_SRCTYPES", "%PRODUCTNAME Calc") , 8}, - { NC_("RES_SRCTYPES", "%PRODUCTNAME Draw/%PRODUCTNAME Impress") , 16}, - { NC_("RES_SRCTYPES", "Other OLE Objects"), 128}, + { NC_("RES_SRCTYPES", "%PRODUCTNAME Math"), SwTOOElements::Math}, + { NC_("RES_SRCTYPES", "%PRODUCTNAME Chart"), SwTOOElements::Chart}, + { NC_("RES_SRCTYPES", "%PRODUCTNAME Calc"), SwTOOElements::Calc}, + { NC_("RES_SRCTYPES", "%PRODUCTNAME Draw/%PRODUCTNAME Impress"), SwTOOElements::DrawImpress}, + { NC_("RES_SRCTYPES", "Other OLE Objects"), SwTOOElements::Other}, }; #endif diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index a1b3eed4545f..5dcb2eb898c7 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -847,7 +847,7 @@ SwTOXSelectTabPage::SwTOXSelectTabPage(vcl::Window* pParent, const SfxItemSet& r sAddStyleContent = m_pAddStylesCB->GetText(); - for (size_t i = 0; i < SAL_N_ELEMENTS(RES_SRCTYPES); i++) + for (size_t i = 0; i < SAL_N_ELEMENTS(RES_SRCTYPES); ++i) { m_pFromObjCLB->InsertEntry(SwResId(RES_SRCTYPES[i].first)); m_pFromObjCLB->SetEntryData(i, reinterpret_cast<void*>(RES_SRCTYPES[i].second)); |