summaryrefslogtreecommitdiff
path: root/extensions
diff options
context:
space:
mode:
authorPatrick Luby <patrick.luby@collabora.com>2023-02-02 17:21:56 -0500
committerMichael Meeks <michael.meeks@collabora.com>2023-02-09 17:58:53 +0000
commit88e1e8fb06180fe070aaf0065d9c3403b477cfd7 (patch)
tree36a879ce7699d9a49b13b007be2148e81bbd698c /extensions
parent57a50adb0100c64834c1eec0b83fee5c59ce512a (diff)
Fix build errors by suppressing warnings when building with Xcode 14.2
Apple started marking sprintf as deprecated in Xcode 14 so we need to suppress the deprecated warnings in order to build on iOS and macOS with Xcode 14 and higher. This also fixes the inability to open documents in the iOS app. Loading a document would fail to load the following symbols: com_sun_star_xml_crypto_SEInitializer_get_implementation com_sun_star_security_DocumentDigitalSignatures_get_implementation The problem was that these symbols are within an #if HAVE_FEATURE_NSS block in the generated workdir/CustomTarget/ios/native-code.h so we need to add an #include <config_crypto.h> in solenv/bin/native-code.py like was added in commit fa5db38ae5bbe9abfd41b6765074ca1200b8def2. Change-Id: I541279eb307e5a9d589e3b39c684a49bf8cca14d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146536 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Patrick Luby <plubius@neooffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'extensions')
-rw-r--r--extensions/source/scanner/grid.cxx4
-rw-r--r--extensions/source/scanner/sanedlg.cxx14
2 files changed, 18 insertions, 0 deletions
diff --git a/extensions/source/scanner/grid.cxx b/extensions/source/scanner/grid.cxx
index 85f22fb017e7..42f0ff8d18ab 100644
--- a/extensions/source/scanner/grid.cxx
+++ b/extensions/source/scanner/grid.cxx
@@ -446,7 +446,9 @@ void GridWindow::drawGrid(vcl::RenderContext& rRenderContext)
drawLine(rRenderContext, fX, m_fMinY, fX, m_fMaxY);
// draw tickmarks
Point aPt = transform(fX, m_fMinY);
+ SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK)
std::sprintf(pBuf, "%g", fX);
+ SAL_WNODEPRECATED_DECLARATIONS_POP
OUString aMark(pBuf, strlen(pBuf), osl_getThreadTextEncoding());
Size aTextSize(rRenderContext.GetTextWidth(aMark), rRenderContext.GetTextHeight());
aPt.AdjustX( -(aTextSize.Width() / 2) );
@@ -459,7 +461,9 @@ void GridWindow::drawGrid(vcl::RenderContext& rRenderContext)
drawLine(rRenderContext, m_fMinX, fY, m_fMaxX, fY);
// draw tickmarks
Point aPt = transform(m_fMinX, fY);
+ SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK)
std::sprintf(pBuf, "%g", fY);
+ SAL_WNODEPRECATED_DECLARATIONS_POP
OUString aMark(pBuf, strlen(pBuf), osl_getThreadTextEncoding());
Size aTextSize(rRenderContext.GetTextWidth(aMark), rRenderContext.GetTextHeight());
aPt.AdjustX( -(aTextSize.Width() + 2) );
diff --git a/extensions/source/scanner/sanedlg.cxx b/extensions/source/scanner/sanedlg.cxx
index e76575cd9bc9..902e4bdb76f5 100644
--- a/extensions/source/scanner/sanedlg.cxx
+++ b/extensions/source/scanner/sanedlg.cxx
@@ -745,7 +745,9 @@ IMPL_LINK(SaneDlg, ModifyHdl, weld::Entry&, rEdit, void)
fValue = mfMin;
else if( fValue > mfMax )
fValue = mfMax;
+ SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK)
sprintf( pBuf, "%g", fValue );
+ SAL_WNODEPRECATED_DECLARATIONS_POP
mxNumericEdit->set_text( OUString( pBuf, strlen(pBuf), osl_getThreadTextEncoding() ) );
}
mrSane.SetOptionValue( mnCurrentOption, fValue, mnCurrentElement );
@@ -757,7 +759,9 @@ IMPL_LINK(SaneDlg, ModifyHdl, weld::Entry&, rEdit, void)
if( mrSane.GetOptionValue( mnCurrentOption, fValue, mnCurrentElement ))
{
char pBuf[256];
+ SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK)
sprintf( pBuf, "%g", fValue );
+ SAL_WNODEPRECATED_DECLARATIONS_POP
OUString aValue( pBuf, strlen(pBuf), osl_getThreadTextEncoding() );
mxNumericEdit->set_text( aValue );
mxQuantumRangeBox->set_active_text( aValue );
@@ -1002,13 +1006,17 @@ void SaneDlg::EstablishQuantumRange()
mfMax = mpRange[ nValues-1 ];
for( int i = 0; i < nValues; i++ )
{
+ SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK)
sprintf( pBuf, "%g", mpRange[ i ] );
+ SAL_WNODEPRECATED_DECLARATIONS_POP
mxQuantumRangeBox->append_text( OUString( pBuf, strlen(pBuf), osl_getThreadTextEncoding() ) );
}
double fValue;
if( mrSane.GetOptionValue( mnCurrentOption, fValue, mnCurrentElement ) )
{
+ SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK)
sprintf( pBuf, "%g", fValue );
+ SAL_WNODEPRECATED_DECLARATIONS_POP
mxQuantumRangeBox->set_active_text( OUString( pBuf, strlen(pBuf), osl_getThreadTextEncoding() ) );
}
mxQuantumRangeBox->show();
@@ -1033,12 +1041,16 @@ void SaneDlg::EstablishNumericOption()
aText += mrSane.GetOptionUnitName( mnCurrentOption );
if( mfMin != mfMax )
{
+ SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK)
sprintf( pBuf, " < %g ; %g >", mfMin, mfMax );
+ SAL_WNODEPRECATED_DECLARATIONS_POP
aText += OUString( pBuf, strlen(pBuf), osl_getThreadTextEncoding() );
}
mxOptionDescTxt->set_label( aText );
mxOptionDescTxt->show();
+ SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK)
sprintf( pBuf, "%g", fValue );
+ SAL_WNODEPRECATED_DECLARATIONS_POP
mxNumericEdit->set_text( OUString( pBuf, strlen(pBuf), osl_getThreadTextEncoding() ) );
mxNumericEdit->show();
}
@@ -1398,7 +1410,9 @@ void SaneDlg::SaveState()
break;
if( n > 0 )
aString.append(':');
+ SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK)
sprintf( buf, "%lg", fValue );
+ SAL_WNODEPRECATED_DECLARATIONS_POP
aString.append(buf);
}
if( n >= mrSane.GetOptionElements( nOption ) )