diff options
author | Noel Grandin <noelgrandin@collabora.co.uk> | 2024-02-20 13:31:33 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-02-20 16:45:09 +0100 |
commit | 0426cb5bcc0b6d5132fc941514c59723ed327887 (patch) | |
tree | df918740aa3f736b2e47a0197da150cde47f8464 /i18npool | |
parent | 01c7eefbb8722e2e5ef835777c2161b8e3d5aad8 (diff) |
fix Windows build
after
commit 191e3f8d891c6d2b5e0f63823a1f9afb7d54418f
Author: Noel Grandin <noelgrandin@gmail.com>
Date: Mon Feb 19 15:48:38 2024 +0200
merge textconv_dict into i18npool
The first build would work, but subsequent builds would fail.
I'm not sure why this patch fixes it, but it does. Somehow the sed
command was affecting other generated files?
Change-Id: I1550709b6555c838c0371e31b5eb2c90f5065e10
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163648
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'i18npool')
-rw-r--r-- | i18npool/CustomTarget_localedata.mk | 6 | ||||
-rw-r--r-- | i18npool/source/localedata/filewriter.cxx | 16 |
2 files changed, 10 insertions, 12 deletions
diff --git a/i18npool/CustomTarget_localedata.mk b/i18npool/CustomTarget_localedata.mk index 3ce723ba2499..47eed3a6c197 100644 --- a/i18npool/CustomTarget_localedata.mk +++ b/i18npool/CustomTarget_localedata.mk @@ -22,11 +22,9 @@ $(call gb_CustomTarget_get_workdir,i18npool/localedata)/localedata_%_new.cxx : \ $(call gb_Trace_StartRange,$(subst $(WORKDIR)/,,$@),SAX) $(call gb_Helper_abbreviate_dirs, \ $(call gb_Helper_print_on_error, \ - $(call gb_Helper_execute,saxparser) $* $< $@.sax \ + $(call gb_Helper_execute,saxparser) $* $< $@ \ -env:LO_LIB_DIR=$(call gb_Helper_make_url,$(INSTROOT_FOR_BUILD)/$(LIBO_LIB_FOLDER)) \ - -env:URE_MORE_SERVICES=$(call gb_Helper_make_url,$(call gb_Rdb_get_target_for_build,saxparser))) && \ - sed 's/\(^.*get[^;]*$$\)/SAL_DLLPUBLIC_EXPORT \1/' $@.sax > $@) - rm $@.sax + -env:URE_MORE_SERVICES=$(call gb_Helper_make_url,$(call gb_Rdb_get_target_for_build,saxparser)))) $(call gb_Trace_EndRange,$(subst $(WORKDIR)/,,$@),SAX) .PRECIOUS: $(call gb_CustomTarget_get_workdir,i18npool/localedata)/localedata_%_new.cxx diff --git a/i18npool/source/localedata/filewriter.cxx b/i18npool/source/localedata/filewriter.cxx index 5f0fabe66ab0..f1c76db7da9a 100644 --- a/i18npool/source/localedata/filewriter.cxx +++ b/i18npool/source/localedata/filewriter.cxx @@ -66,7 +66,7 @@ void OFileWriter::writeOUStringRefFunction(const char *func, std::u16string_view OString aRefLocale( OUStringToOString(useLocale, RTL_TEXTENCODING_ASCII_US) ); const char* locale = aRefLocale.getStr(); fprintf(m_f, "extern const OUString * SAL_CALL %s%s(sal_Int16& count);\n", func, locale); - fprintf(m_f, "const OUString * SAL_CALL %s%s(sal_Int16& count)\n{\n", func, theLocale.c_str()); + fprintf(m_f, "SAL_DLLPUBLIC_EXPORT const OUString * SAL_CALL %s%s(sal_Int16& count)\n{\n", func, theLocale.c_str()); fprintf(m_f, "\treturn %s%s(count);\n}\n", func, locale); } @@ -75,7 +75,7 @@ void OFileWriter::writeOUStringRefFunction(const char *func, std::u16string_view OString aRefLocale( OUStringToOString(useLocale, RTL_TEXTENCODING_ASCII_US) ); const char* locale = aRefLocale.getStr(); fprintf(m_f, "extern OUString const * SAL_CALL %s%s(sal_Int16& count, const sal_Unicode*& from, const sal_Unicode*& to);\n", func, locale); - fprintf(m_f, "OUString const * SAL_CALL %s%s(sal_Int16& count, const sal_Unicode*& from, const sal_Unicode*& to)\n{\n", func, theLocale.c_str()); + fprintf(m_f, "SAL_DLLPUBLIC_EXPORT OUString const * SAL_CALL %s%s(sal_Int16& count, const sal_Unicode*& from, const sal_Unicode*& to)\n{\n", func, theLocale.c_str()); fprintf(m_f, "\tto = %s;\n", to); fprintf(m_f, "\tconst sal_Unicode* tmp;\n"); fprintf(m_f, "\treturn %s%s(count, from, tmp);\n}\n", func, locale); @@ -83,14 +83,14 @@ void OFileWriter::writeOUStringRefFunction(const char *func, std::u16string_view void OFileWriter::writeOUStringFunction(const char *func, const char *count, const char *array) const { - fprintf(m_f, "OUString const * SAL_CALL %s%s(sal_Int16& count)\n{\n", func, theLocale.c_str()); + fprintf(m_f, "SAL_DLLPUBLIC_EXPORT OUString const * SAL_CALL %s%s(sal_Int16& count)\n{\n", func, theLocale.c_str()); fprintf(m_f, "\tcount = %s;\n", count); fprintf(m_f, "\treturn (OUString const *)%s;\n}\n", array); } void OFileWriter::writeOUStringFunction(const char *func, const char *count, const char *array, const char *from, const char *to) const { - fprintf(m_f, "OUString const * SAL_CALL %s%s(sal_Int16& count, const sal_Unicode*& from, const sal_Unicode*& to)\n{\n", func, theLocale.c_str()); + fprintf(m_f, "SAL_DLLPUBLIC_EXPORT OUString const * SAL_CALL %s%s(sal_Int16& count, const sal_Unicode*& from, const sal_Unicode*& to)\n{\n", func, theLocale.c_str()); fprintf(m_f, "\tcount = %s;\n", count); fprintf(m_f, "\tfrom = %s;\n", from); fprintf(m_f, "\tto = %s;\n", to); @@ -99,7 +99,7 @@ void OFileWriter::writeOUStringFunction(const char *func, const char *count, con void OFileWriter::writeOUStringFunction2(const char *func, const char *style, const char* attr, const char *array) const { - fprintf(m_f, "const OUString ** SAL_CALL %s%s( sal_Int16& nStyles, sal_Int16& nAttributes )\n{\n", func, theLocale.c_str()); + fprintf(m_f, "SAL_DLLPUBLIC_EXPORT const OUString ** SAL_CALL %s%s( sal_Int16& nStyles, sal_Int16& nAttributes )\n{\n", func, theLocale.c_str()); fprintf(m_f, "\tnStyles = %s;\n", style); fprintf(m_f, "\tnAttributes = %s;\n", attr); fprintf(m_f, "\treturn (const OUString **)%s;\n}\n", array); @@ -110,13 +110,13 @@ void OFileWriter::writeOUStringRefFunction2(const char *func, std::u16string_vie OString aRefLocale( OUStringToOString(useLocale, RTL_TEXTENCODING_ASCII_US) ); const char* locale = aRefLocale.getStr(); fprintf(m_f, "extern const OUString ** SAL_CALL %s%s(sal_Int16& nStyles, sal_Int16& nAttributes);\n", func, locale); - fprintf(m_f, "const OUString ** SAL_CALL %s%s(sal_Int16& nStyles, sal_Int16& nAttributes)\n{\n", func, theLocale.c_str()); + fprintf(m_f, "SAL_DLLPUBLIC_EXPORT const OUString ** SAL_CALL %s%s(sal_Int16& nStyles, sal_Int16& nAttributes)\n{\n", func, theLocale.c_str()); fprintf(m_f, "\treturn %s%s(nStyles, nAttributes);\n}\n", func, locale); } void OFileWriter::writeOUStringFunction3(const char *func, const char *style, const char* levels, const char* attr, const char *array) const { - fprintf(m_f, "const OUString *** SAL_CALL %s%s( sal_Int16& nStyles, sal_Int16& nLevels, sal_Int16& nAttributes )\n{\n", func, theLocale.c_str()); + fprintf(m_f, "SAL_DLLPUBLIC_EXPORT const OUString *** SAL_CALL %s%s( sal_Int16& nStyles, sal_Int16& nLevels, sal_Int16& nAttributes )\n{\n", func, theLocale.c_str()); fprintf(m_f, "\tnStyles = %s;\n", style); fprintf(m_f, "\tnLevels = %s;\n", levels); fprintf(m_f, "\tnAttributes = %s;\n", attr); @@ -128,7 +128,7 @@ void OFileWriter::writeOUStringRefFunction3(const char *func, std::u16string_vie OString aRefLocale( OUStringToOString(useLocale, RTL_TEXTENCODING_ASCII_US) ); const char* locale = aRefLocale.getStr(); fprintf(m_f, "extern const OUString *** SAL_CALL %s%s(sal_Int16& nStyles, sal_Int16& nLevels, sal_Int16& nAttributes);\n", func, locale); - fprintf(m_f, "const OUString *** SAL_CALL %s%s(sal_Int16& nStyles, sal_Int16& nLevels, sal_Int16& nAttributes)\n{\n", func, theLocale.c_str()); + fprintf(m_f, "SAL_DLLPUBLIC_EXPORT const OUString *** SAL_CALL %s%s(sal_Int16& nStyles, sal_Int16& nLevels, sal_Int16& nAttributes)\n{\n", func, theLocale.c_str()); fprintf(m_f, "\treturn %s%s(nStyles, nLevels, nAttributes);\n}\n", func, locale); } |