diff options
-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)); |