[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0-29' - 4 commits - libreofficekit/qa pyuno/source vcl/unx
Julien Nabet (via logerrit)
logerrit at kemper.freedesktop.org
Fri Sep 6 13:20:52 UTC 2019
libreofficekit/qa/gtktiledviewer/gtv-application-window.cxx | 8 ++
libreofficekit/qa/gtktiledviewer/gtv-helpers.cxx | 2
pyuno/source/module/pyuno_type.cxx | 4 +
vcl/unx/generic/printer/cupsmgr.cxx | 36 ++++++++++++
vcl/unx/gtk/gloactiongroup.cxx | 8 ++
5 files changed, 56 insertions(+), 2 deletions(-)
New commits:
commit 33039f987b5e098f14ae7aa9d4d7f104688ce98f
Author: Julien Nabet <serval2412 at yahoo.fr>
AuthorDate: Wed Nov 28 20:39:43 2018 +0100
Commit: Aron Budea <aron.budea at collabora.com>
CommitDate: Fri Sep 6 15:19:07 2019 +0200
band-aid: deprecated-declarations related to cups
Change-Id: I07438840fc1c3cc8e70559d44954be0c49531525
Reviewed-on: https://gerrit.libreoffice.org/64191
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit e9e49fceac43476d1233ee8106cba5f4831771b9)
(cherry picked from commit ca9aae711332e5affef75b1f11c45761a5a3b4a5)
diff --git a/vcl/unx/generic/printer/cupsmgr.cxx b/vcl/unx/generic/printer/cupsmgr.cxx
index 328e9246e9f5..a9d499035a5a 100644
--- a/vcl/unx/generic/printer/cupsmgr.cxx
+++ b/vcl/unx/generic/printer/cupsmgr.cxx
@@ -81,7 +81,14 @@ struct GetPPDAttribs
{
// This CUPS method is not at all thread-safe we need
// to dup the pointer to a static buffer it returns ASAP
+#ifdef __GNUC__
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
OString aResult = cupsGetPPD(m_aParameter.getStr());
+#ifdef __GNUC__
+#pragma GCC diagnostic pop
+#endif
MutexGuard aGuard( *m_pSyncMutex );
m_aResult = aResult;
m_aCondition.set();
@@ -214,6 +221,10 @@ void CUPSManager::runDests()
// n#722902 - do a fast-failing check for cups working *at all* first
http_t* p_http;
+#ifdef __GNUC__
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
if( (p_http=httpConnectEncrypt(
cupsServer(),
ippPort(),
@@ -230,6 +241,9 @@ void CUPSManager::runDests()
httpClose(p_http);
}
+#ifdef __GNUC__
+#pragma GCC diagnostic pop
+#endif
}
void CUPSManager::initialize()
@@ -438,7 +452,14 @@ const PPDParser* CUPSManager::createCUPSParser( const OUString& rPrinter )
rtl_TextEncoding aEncoding = osl_getThreadTextEncoding();
OUString aFileName( OStringToOUString( aPPDFile, aEncoding ) );
// update the printer info with context information
+#ifdef __GNUC__
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
ppd_file_t* pPPD = ppdOpenFile( aPPDFile.getStr() );
+#ifdef __GNUC__
+#pragma GCC diagnostic pop
+#endif
if( pPPD )
{
// create the new parser
@@ -446,7 +467,14 @@ const PPDParser* CUPSManager::createCUPSParser( const OUString& rPrinter )
pCUPSParser->m_aFile = rPrinter;
pNewParser = pCUPSParser;
+#ifdef __GNUC__
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
/*int nConflicts =*/ cupsMarkOptions( pPPD, pDest->num_options, pDest->options );
+#ifdef __GNUC__
+#pragma GCC diagnostic pop
+#endif
SAL_INFO("vcl.unx.print", "processing the following options for printer " << pDest->name << " (instance " << (pDest->instance == nullptr ? "null" : pDest->instance) << "):");
for( int k = 0; k < pDest->num_options; k++ )
SAL_INFO("vcl.unx.print",
@@ -467,7 +495,15 @@ const PPDParser* CUPSManager::createCUPSParser( const OUString& rPrinter )
rInfo.m_aContext = rContext;
// clean up the mess
+#ifdef __GNUC__
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
ppdClose( pPPD );
+#ifdef __GNUC__
+#pragma GCC diagnostic pop
+#endif
+
}
else
SAL_INFO("vcl.unx.print", "ppdOpenFile failed, falling back to generic driver");
commit 3a3b8ff32c5f937e293b1822cce6a851b0589893
Author: Julien Nabet <serval2412 at yahoo.fr>
AuthorDate: Sat Sep 29 13:18:49 2018 +0200
Commit: Aron Budea <aron.budea at collabora.com>
CommitDate: Fri Sep 6 15:18:51 2019 +0200
band-aid: deprecated-declarations related to gtk
Don't hesitate to revert this one but only if there's a patch to fix it.
Change-Id: Ib15352e1a94d0542120f6710acfe19887494ed51
Reviewed-on: https://gerrit.libreoffice.org/61142
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>
(cherry picked from commit 618d474f059a75c2ac04df16c830d71a88690118)
(cherry picked from commit 986d47dbf57008643d8126e7d71de47f32a15508)
diff --git a/libreofficekit/qa/gtktiledviewer/gtv-application-window.cxx b/libreofficekit/qa/gtktiledviewer/gtv-application-window.cxx
index dee5058f3f54..1de1aa94568d 100644
--- a/libreofficekit/qa/gtktiledviewer/gtv-application-window.cxx
+++ b/libreofficekit/qa/gtktiledviewer/gtv-application-window.cxx
@@ -135,9 +135,17 @@ static void initWindow(GtvApplicationWindow* window)
{
GtvApplicationWindowPrivate* priv = getPrivate(window);
+#ifdef __GNUC__
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
GList *focusChain = nullptr;
focusChain = g_list_append( focusChain, window->lokdocview );
+
gtk_container_set_focus_chain ( GTK_CONTAINER (priv->container), focusChain );
+#ifdef __GNUC__
+#pragma GCC diagnostic pop
+#endif
// TODO: Implement progressbar in statusbar
LibreOfficeKitDocument* pDocument = lok_doc_view_get_document(LOK_DOC_VIEW(window->lokdocview));
diff --git a/vcl/unx/gtk/gloactiongroup.cxx b/vcl/unx/gtk/gloactiongroup.cxx
index fe946f08957f..d8ff5b6a67d3 100644
--- a/vcl/unx/gtk/gloactiongroup.cxx
+++ b/vcl/unx/gtk/gloactiongroup.cxx
@@ -325,8 +325,14 @@ g_lo_action_group_class_init (GLOActionGroupClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->finalize = g_lo_action_group_finalize;
-
+#ifdef __GNUC__
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
g_type_class_add_private (klass, sizeof (GLOActionGroupPrivate));
+#ifdef __GNUC__
+#pragma GCC diagnostic pop
+#endif
}
static void
commit 23c8bfb04b73abd893891ae773a2615289b3fbd7
Author: Julien Nabet <serval2412 at yahoo.fr>
AuthorDate: Sun Sep 23 16:15:13 2018 +0200
Commit: Aron Budea <aron.budea at collabora.com>
CommitDate: Fri Sep 6 15:18:37 2019 +0200
Band-aid fix for deprecate gtk_css_provider_get_default
by gtk_css_provider_new
Don't hesitate to revert this one but only if there's a patch
to fix it.
Change-Id: Id91fefb689326a31e029a788bd3729e670fe3100
Reviewed-on: https://gerrit.libreoffice.org/60915
Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>
Tested-by: Julien Nabet <serval2412 at yahoo.fr>
(cherry picked from commit 003bc12a3c11d67e54c14d1bc48fb8bba56ec49c)
(cherry picked from commit efca78cc5c8274f0272d51a7d88add5366b5cc52)
diff --git a/libreofficekit/qa/gtktiledviewer/gtv-helpers.cxx b/libreofficekit/qa/gtktiledviewer/gtv-helpers.cxx
index 5dca746d5f25..6a0d501f2138 100644
--- a/libreofficekit/qa/gtktiledviewer/gtv-helpers.cxx
+++ b/libreofficekit/qa/gtktiledviewer/gtv-helpers.cxx
@@ -107,7 +107,7 @@ GtkWidget* GtvHelpers::createCommentBox(const boost::property_tree::ptree& aComm
if (aComment.get("parent", -1) > 0)
{
GtkStyleContext* pStyleContext = gtk_widget_get_style_context(pCommentVBox);
- GtkCssProvider* pCssProvider = gtk_css_provider_get_default();
+ GtkCssProvider* pCssProvider = gtk_css_provider_new();
gtk_style_context_add_class(pStyleContext, "commentbox");
gtk_style_context_add_provider(pStyleContext, GTK_STYLE_PROVIDER(pCssProvider), GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
gtk_css_provider_load_from_data(pCssProvider, ".commentbox {background-color: lightgreen;}", -1, nullptr);
commit 1e65d574410e318eaeec4b6dd0f309d579296d7f
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Wed Oct 31 13:31:55 2018 +0200
Commit: Aron Budea <aron.budea at collabora.com>
CommitDate: Fri Sep 6 15:18:11 2019 +0200
fix pyuno compile on Fedora29
'PyUnicode_GetSize' is deprecated [-Werror,-Wdeprecated-declarations]
Change-Id: Id298d6a2b0af9ce418f9124c9addda55fcdc0318
Reviewed-on: https://gerrit.libreoffice.org/62687
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
(cherry picked from commit 485ec8e14306352f44056bcb644bb4cacdb6490a)
(cherry picked from commit decef457728823ee89c1a1ad3afa02c26cebca25)
diff --git a/pyuno/source/module/pyuno_type.cxx b/pyuno/source/module/pyuno_type.cxx
index 3c09e24243b6..fd28d5c2cf9a 100644
--- a/pyuno/source/module/pyuno_type.cxx
+++ b/pyuno/source/module/pyuno_type.cxx
@@ -135,7 +135,11 @@ sal_Unicode PyChar2Unicode( PyObject *obj )
"attribute value of uno.Char is not a unicode string" );
}
+#if PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION >= 3
+ if( PyUnicode_GetLength( value.get() ) < 1 )
+#else
if( PyUnicode_GetSize( value.get() ) < 1 )
+#endif
{
throw RuntimeException(
"uno.Char contains an empty unicode string");
More information about the Libreoffice-commits
mailing list