From 00657aef09d854c74fb426a935a3e8b1fc390bb0 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sun, 11 Jun 2017 20:56:30 +0100 Subject: migrate to boost::gettext * all .ui files go from to e.g. vcl * all .src files go away and the english source strings folded into the .hrc as NC_("context", "source string") * ResMgr is dropped in favour of std::locale imbued by boost::locale::generator pointed at matching MODULE .mo files * UIConfig translations are folded into the module .mo, so e.g. UIConfig_cui goes from l10n target to normal one, so the res/lang.zips of UI files go away * translation via Translation::get(hrc-define-key, imbued-std::locale) * python can now be translated with its inbuilt gettext support (we keep the name strings.hrc there to keep finding the .hrc file uniform) so magic numbers can go away there * java and starbasic components can be translated via the pre-existing css.resource.StringResourceWithLocation mechanism * en-US res files go away, their strings are now the .hrc keys in the source code * remaining .res files are replaced by .mo files * in .res/.ui-lang-zip files, the old scheme missing translations of strings results in inserting the english original so something can be found, now the standard fallback of using the english original from the source key is used, so partial translations shrink dramatically in size * extract .hrc strings with hrcex which backs onto xgettext -C --add-comments --keyword=NC_:1c,2 --from-code=UTF-8 --no-wrap * extract .ui strings with uiex which backs onto xgettext --add-comments --no-wrap * qtz for gettext translations is generated at runtime as ascii-ified crc32 of content + "|" + msgid * [API CHANGE] remove deprecated binary .res resouce loader related uno apis com::sun::star::resource::OfficeResourceLoader com::sun::star::resource::XResourceBundleLoader com::sun::star::resource::XResourceBundle when translating strings via uno apis com.sun.star.resource.StringResourceWithLocation can continue to be used Change-Id: Ia2594a2672b7301d9c3421fdf31b6cfe7f3f8d0a --- sc/qa/unit/ucalc_pivottable.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sc/qa/unit/ucalc_pivottable.cxx') diff --git a/sc/qa/unit/ucalc_pivottable.cxx b/sc/qa/unit/ucalc_pivottable.cxx index e78065c11258..0b80e89f2207 100644 --- a/sc/qa/unit/ucalc_pivottable.cxx +++ b/sc/qa/unit/ucalc_pivottable.cxx @@ -300,8 +300,8 @@ void Test::testPivotTable() // This time clear the cache to refresh the data from the source range. CPPUNIT_ASSERT_MESSAGE("This datapilot should be based on sheet data.", pDPObj2->IsSheetData()); std::set aRefs; - sal_uLong nErrId = pDPs->ReloadCache(pDPObj2, aRefs); - CPPUNIT_ASSERT_EQUAL_MESSAGE("Cache reload failed.", sal_uLong(0), nErrId); + const char* pErrId = pDPs->ReloadCache(pDPObj2, aRefs); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Cache reload failed.", static_cast(nullptr), pErrId); CPPUNIT_ASSERT_EQUAL_MESSAGE("Reloading a cache shouldn't remove any cache.", static_cast(1), pDPs->GetSheetCaches().size()); @@ -1541,8 +1541,8 @@ void Test::testPivotTableEmptyRows() m_pDoc->SetString(1, 2, 0, "B"); std::set aRefs; - sal_uLong nErr = pDPs->ReloadCache(pDPObj, aRefs); - CPPUNIT_ASSERT_MESSAGE("Failed to reload cache.", !nErr); + const char* pErr = pDPs->ReloadCache(pDPObj, aRefs); + CPPUNIT_ASSERT_MESSAGE("Failed to reload cache.", !pErr); CPPUNIT_ASSERT_MESSAGE("There should only be one pivot table linked to this cache.", aRefs.size() == 1 && *aRefs.begin() == pDPObj); -- cgit