i18npool/CustomTarget_localedata.mk       |    6 ++----
 i18npool/source/localedata/filewriter.cxx |   24 ++++++++++++------------
 2 files changed, 14 insertions(+), 16 deletions(-)

New commits:
commit c9fc7f25a35a518360e6009edb2e03382122c836
Author:     Noel Grandin <noelgran...@collabora.co.uk>
AuthorDate: Tue Feb 20 13:37:36 2024 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Tue Feb 20 16:45:20 2024 +0100

    SAL_CALL is not necessary here
    
    these symbols are only used internally
    
    Change-Id: Ib4dff4c8724649608a3d328e47127cd2e1f1cc21
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163649
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/i18npool/source/localedata/filewriter.cxx 
b/i18npool/source/localedata/filewriter.cxx
index f1c76db7da9a..e6bafdee5e7c 100644
--- a/i18npool/source/localedata/filewriter.cxx
+++ b/i18npool/source/localedata/filewriter.cxx
@@ -65,8 +65,8 @@ 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);
", func, locale);
-    fprintf(m_f, "SAL_DLLPUBLIC_EXPORT const OUString *  SAL_CALL 
%s%s(sal_Int16& count)
{
", func, theLocale.c_str());
+    fprintf(m_f, "extern const OUString *  %s%s(sal_Int16& count);
", func, locale);
+    fprintf(m_f, "SAL_DLLPUBLIC_EXPORT const OUString *  %s%s(sal_Int16& count)
{
", func, theLocale.c_str());
     fprintf(m_f, "     return %s%s(count);
}
", func, locale);
 }
 
@@ -74,8 +74,8 @@ 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);
", func, locale);
-    fprintf(m_f, "SAL_DLLPUBLIC_EXPORT OUString const * SAL_CALL 
%s%s(sal_Int16& count, const sal_Unicode*& from, const sal_Unicode*& to)
{
", func, theLocale.c_str());
+    fprintf(m_f, "extern OUString const * %s%s(sal_Int16& count, const 
sal_Unicode*& from, const sal_Unicode*& to);
", func, locale);
+    fprintf(m_f, "SAL_DLLPUBLIC_EXPORT OUString const * %s%s(sal_Int16& count, 
const sal_Unicode*& from, const sal_Unicode*& to)
{
", func, theLocale.c_str());
     fprintf(m_f, "     to = %s;
", to);
     fprintf(m_f, "     const sal_Unicode* tmp;
");
     fprintf(m_f, "     return %s%s(count, from, tmp);
}
", 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, "SAL_DLLPUBLIC_EXPORT OUString const *  SAL_CALL 
%s%s(sal_Int16& count)
{
", func, theLocale.c_str());
+    fprintf(m_f, "SAL_DLLPUBLIC_EXPORT OUString const *  %s%s(sal_Int16& count)
{
", func, theLocale.c_str());
     fprintf(m_f, "     count = %s;
", count);
     fprintf(m_f, "     return (OUString const *)%s;
}
", array);
 }
 
 void OFileWriter::writeOUStringFunction(const char *func, const char *count, 
const char *array, const char *from, const char *to) const
 {
-    fprintf(m_f, "SAL_DLLPUBLIC_EXPORT OUString const * SAL_CALL 
%s%s(sal_Int16& count, const sal_Unicode*& from, const sal_Unicode*& to)
{
", func, theLocale.c_str());
+    fprintf(m_f, "SAL_DLLPUBLIC_EXPORT OUString const * %s%s(sal_Int16& count, 
const sal_Unicode*& from, const sal_Unicode*& to)
{
", func, theLocale.c_str());
     fprintf(m_f, "     count = %s;
", count);
     fprintf(m_f, "     from = %s;
", from);
     fprintf(m_f, "     to = %s;
", 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, "SAL_DLLPUBLIC_EXPORT const OUString **  SAL_CALL %s%s( 
sal_Int16& nStyles, sal_Int16& nAttributes )
{
", func, theLocale.c_str());
+    fprintf(m_f, "SAL_DLLPUBLIC_EXPORT const OUString **  %s%s( sal_Int16& 
nStyles, sal_Int16& nAttributes )
{
", func, theLocale.c_str());
     fprintf(m_f, "     nStyles     = %s;
", style);
     fprintf(m_f, "     nAttributes = %s;
", attr);
     fprintf(m_f, "     return (const OUString **)%s;
}
", array);
@@ -109,14 +109,14 @@ 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);
", func, locale);
-    fprintf(m_f, "SAL_DLLPUBLIC_EXPORT const OUString **  SAL_CALL 
%s%s(sal_Int16& nStyles, sal_Int16& nAttributes)
{
", func, theLocale.c_str());
+    fprintf(m_f, "extern const OUString **  %s%s(sal_Int16& nStyles, 
sal_Int16& nAttributes);
", func, locale);
+    fprintf(m_f, "SAL_DLLPUBLIC_EXPORT const OUString **  %s%s(sal_Int16& 
nStyles, sal_Int16& nAttributes)
{
", func, theLocale.c_str());
     fprintf(m_f, "     return %s%s(nStyles, nAttributes);
}
", func, locale);
 }
 
 void OFileWriter::writeOUStringFunction3(const char *func, const char *style, 
const char* levels, const char* attr, const char *array) const
 {
-    fprintf(m_f, "SAL_DLLPUBLIC_EXPORT const OUString ***  SAL_CALL %s%s( 
sal_Int16& nStyles, sal_Int16& nLevels, sal_Int16& nAttributes )
{
", func, theLocale.c_str());
+    fprintf(m_f, "SAL_DLLPUBLIC_EXPORT const OUString ***  %s%s( sal_Int16& 
nStyles, sal_Int16& nLevels, sal_Int16& nAttributes )
{
", func, theLocale.c_str());
     fprintf(m_f, "     nStyles     = %s;
", style);
     fprintf(m_f, "     nLevels     = %s;
", levels);
     fprintf(m_f, "     nAttributes = %s;
", attr);
@@ -127,8 +127,8 @@ 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);
", func, locale);
-    fprintf(m_f, "SAL_DLLPUBLIC_EXPORT const OUString ***  SAL_CALL 
%s%s(sal_Int16& nStyles, sal_Int16& nLevels, sal_Int16& nAttributes)
{
", func, theLocale.c_str());
+    fprintf(m_f, "extern const OUString ***  %s%s(sal_Int16& nStyles, 
sal_Int16& nLevels, sal_Int16& nAttributes);
", func, locale);
+    fprintf(m_f, "SAL_DLLPUBLIC_EXPORT const OUString ***  %s%s(sal_Int16& 
nStyles, sal_Int16& nLevels, sal_Int16& nAttributes)
{
", func, theLocale.c_str());
     fprintf(m_f, "     return %s%s(nStyles, nLevels, nAttributes);
}
", func, locale);
 }
 
commit 0426cb5bcc0b6d5132fc941514c59723ed327887
Author:     Noel Grandin <noelgran...@collabora.co.uk>
AuthorDate: Tue Feb 20 13:31:33 2024 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Tue Feb 20 16:45:09 2024 +0100

    fix Windows build
    
    after
        commit 191e3f8d891c6d2b5e0f63823a1f9afb7d54418f
        Author: Noel Grandin <noelgran...@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.gran...@collabora.co.uk>

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 /' $@.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);
", func, locale);
-    fprintf(m_f, "const OUString *  SAL_CALL %s%s(sal_Int16& count)
{
", func, theLocale.c_str());
+    fprintf(m_f, "SAL_DLLPUBLIC_EXPORT const OUString *  SAL_CALL 
%s%s(sal_Int16& count)
{
", func, theLocale.c_str());
     fprintf(m_f, "     return %s%s(count);
}
", 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);
", func, locale);
-    fprintf(m_f, "OUString const * SAL_CALL %s%s(sal_Int16& count, const 
sal_Unicode*& from, const sal_Unicode*& to)
{
", 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)
{
", func, theLocale.c_str());
     fprintf(m_f, "     to = %s;
", to);
     fprintf(m_f, "     const sal_Unicode* tmp;
");
     fprintf(m_f, "     return %s%s(count, from, tmp);
}
", 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)
{
", func, theLocale.c_str());
+    fprintf(m_f, "SAL_DLLPUBLIC_EXPORT OUString const *  SAL_CALL 
%s%s(sal_Int16& count)
{
", func, theLocale.c_str());
     fprintf(m_f, "     count = %s;
", count);
     fprintf(m_f, "     return (OUString const *)%s;
}
", 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)
{
", 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)
{
", func, theLocale.c_str());
     fprintf(m_f, "     count = %s;
", count);
     fprintf(m_f, "     from = %s;
", from);
     fprintf(m_f, "     to = %s;
", 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 )
{
", func, theLocale.c_str());
+    fprintf(m_f, "SAL_DLLPUBLIC_EXPORT const OUString **  SAL_CALL %s%s( 
sal_Int16& nStyles, sal_Int16& nAttributes )
{
", func, theLocale.c_str());
     fprintf(m_f, "     nStyles     = %s;
", style);
     fprintf(m_f, "     nAttributes = %s;
", attr);
     fprintf(m_f, "     return (const OUString **)%s;
}
", 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);
", func, locale);
-    fprintf(m_f, "const OUString **  SAL_CALL %s%s(sal_Int16& nStyles, 
sal_Int16& nAttributes)
{
", func, theLocale.c_str());
+    fprintf(m_f, "SAL_DLLPUBLIC_EXPORT const OUString **  SAL_CALL 
%s%s(sal_Int16& nStyles, sal_Int16& nAttributes)
{
", func, theLocale.c_str());
     fprintf(m_f, "     return %s%s(nStyles, nAttributes);
}
", 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 )
{
", 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 )
{
", func, theLocale.c_str());
     fprintf(m_f, "     nStyles     = %s;
", style);
     fprintf(m_f, "     nLevels     = %s;
", levels);
     fprintf(m_f, "     nAttributes = %s;
", 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);
", func, locale);
-    fprintf(m_f, "const OUString ***  SAL_CALL %s%s(sal_Int16& nStyles, 
sal_Int16& nLevels, sal_Int16& nAttributes)
{
", 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)
{
", func, theLocale.c_str());
     fprintf(m_f, "     return %s%s(nStyles, nLevels, nAttributes);
}
", func, locale);
 }
 

Reply via email to