basic/source/sbx/sbxform.cxx | 4 desktop/source/deployment/misc/lockfile.cxx | 2 emfio/source/reader/emfreader.cxx | 2 emfio/source/reader/wmfreader.cxx | 2 extensions/source/scanner/grid.cxx | 4 extensions/source/scanner/sanedlg.cxx | 14 +++ filter/source/t602/t602filter.cxx | 4 hwpfilter/source/hbox.cxx | 22 +++++ hwpfilter/source/hcode.cxx | 4 hwpfilter/source/hwpreader.cxx | 50 ++++++++++++ hwpfilter/source/mzstring.cxx | 4 i18npool/source/calendar/calendar_gregorian.cxx | 26 +++++- lotuswordpro/source/filter/bencont.cxx | 2 lotuswordpro/source/filter/lwpgrfobj.cxx | 4 lotuswordpro/source/filter/xfilter/xfcolor.cxx | 2 sal/qa/rtl/process/rtl_Process.cxx | 4 sc/source/filter/excel/xestream.cxx | 2 sc/source/filter/xcl97/xcl97rec.cxx | 2 sfx2/source/doc/objstor.cxx | 2 shell/source/tools/lngconvex/lngconvex.cxx | 4 solenv/bin/native-code.py | 1 svl/source/misc/lockfilecommon.cxx | 2 svl/source/numbers/zformat.cxx | 2 sw/secmod.db |binary sw/source/core/doc/dbgoutsw.cxx | 8 + sw/source/filter/ww8/WW8TableInfo.cxx | 2 sw/source/ui/vba/vbacontentcontrollistentry.cxx | 10 +- tools/source/inet/inetmsg.cxx | 2 tools/source/misc/json_writer.cxx | 2 tools/source/ref/globname.cxx | 10 ++ tools/source/stream/stream.cxx | 4 vcl/ios/iosinst.cxx | 2 vcl/source/fontsubset/cff.cxx | 97 +++++++++++++++++++++--- xmlsecurity/source/helper/xsecsign.cxx | 2 34 files changed, 287 insertions(+), 17 deletions(-)
New commits: commit 88e1e8fb06180fe070aaf0065d9c3403b477cfd7 Author: Patrick Luby <patrick.l...@collabora.com> AuthorDate: Thu Feb 2 17:21:56 2023 -0500 Commit: Michael Meeks <michael.me...@collabora.com> CommitDate: Thu Feb 9 17:58:53 2023 +0000 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 <jenkinscollaboraoff...@gmail.com> Reviewed-by: Patrick Luby <plub...@neooffice.org> Reviewed-by: Michael Meeks <michael.me...@collabora.com> diff --git a/basic/source/sbx/sbxform.cxx b/basic/source/sbx/sbxform.cxx index 0123dd076d02..93fea94d4c29 100644 --- a/basic/source/sbx/sbxform.cxx +++ b/basic/source/sbx/sbxform.cxx @@ -232,7 +232,9 @@ void SbxBasicFormater::InitScan( double _dNum ) dNum = _dNum; InitExp( get_number_of_digits( dNum ) ); // maximum of 15 positions behind the decimal point, example: -1.234000000000000E-001 + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) /*int nCount =*/ sprintf( sBuffer,"%+22.15lE",dNum ); + SAL_WNODEPRECATED_DECLARATIONS_POP sSciNumStrg = OUString::createFromAscii( sBuffer ); } @@ -241,7 +243,9 @@ void SbxBasicFormater::InitExp( double _dNewExp ) { char sBuffer[ MAX_DOUBLE_BUFFER_LENGTH ]; nNumExp = static_cast<short>(_dNewExp); + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) /*int nCount =*/ sprintf( sBuffer,"%+i",nNumExp ); + SAL_WNODEPRECATED_DECLARATIONS_POP sNumExpStrg = OUString::createFromAscii( sBuffer ); nExpExp = static_cast<short>(get_number_of_digits( static_cast<double>(nNumExp) )); } diff --git a/desktop/source/deployment/misc/lockfile.cxx b/desktop/source/deployment/misc/lockfile.cxx index 206da8286d76..a46eedc62a3a 100644 --- a/desktop/source/deployment/misc/lockfile.cxx +++ b/desktop/source/deployment/misc/lockfile.cxx @@ -91,7 +91,9 @@ namespace desktop { time_t t = time(nullptr); for (int i = 0; i<nIdBytes; i++) { int tmpByte = comphelper::rng::uniform_int_distribution(0, 0xFF); + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) sprintf( tmpId+i*2, "%02X", tmpByte ); + SAL_WNODEPRECATED_DECLARATIONS_POP } tmpId[nIdBytes*2]=0x00; m_aId = OUString::createFromAscii( tmpId ); diff --git a/emfio/source/reader/emfreader.cxx b/emfio/source/reader/emfreader.cxx index f34250f0ba19..63da12dbbb1c 100644 --- a/emfio/source/reader/emfreader.cxx +++ b/emfio/source/reader/emfreader.cxx @@ -306,7 +306,9 @@ record_type_name(sal_uInt32 nRecType) // Yes, return a pointer to a static buffer. This is a very // local debugging output function, so no big deal. static char buffer[11]; + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) sprintf(buffer, "0x%08" SAL_PRIxUINT32, nRecType); + SAL_WNODEPRECATED_DECLARATIONS_POP return buffer; } #endif diff --git a/emfio/source/reader/wmfreader.cxx b/emfio/source/reader/wmfreader.cxx index f17654097ba0..353d346b2e2e 100644 --- a/emfio/source/reader/wmfreader.cxx +++ b/emfio/source/reader/wmfreader.cxx @@ -237,7 +237,9 @@ namespace // Yes, return a pointer to a static buffer. This is a very // local debugging output function, so no big deal. static char buffer[11]; + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) sprintf(buffer, "0x%08" SAL_PRIxUINT32, sal_uInt32(nRecType)); + SAL_WNODEPRECATED_DECLARATIONS_POP return buffer; } #endif 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 ) ) diff --git a/filter/source/t602/t602filter.cxx b/filter/source/t602/t602filter.cxx index d2f44023b590..e8b5aac7f513 100644 --- a/filter/source/t602/t602filter.cxx +++ b/filter/source/t602/t602filter.cxx @@ -211,7 +211,9 @@ void T602ImportFilter::inschr(unsigned char ch) pst.wasfdash = false; } else { char s[20]; + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) sprintf(s,"%i",pst.wasspace); + SAL_WNODEPRECATED_DECLARATIONS_POP if (mpAttrList) mpAttrList->AddAttribute("text:c",OUString::createFromAscii(s)); Start_("text:s"); @@ -250,8 +252,10 @@ bool T602ImportFilter::importImpl( const Sequence< css::beans::PropertyValue >& xImporter->setTargetDocument(mxDoc); char fs[32], fs2[32]; + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) sprintf(fs, "%ipt", inistruct::fontsize); sprintf(fs2,"%ipt", 2*inistruct::fontsize); + SAL_WNODEPRECATED_DECLARATIONS_POP mpAttrList = new SvXMLAttributeList; diff --git a/hwpfilter/source/hbox.cxx b/hwpfilter/source/hbox.cxx index 2715da1c76bf..a75bde4b779d 100644 --- a/hwpfilter/source/hbox.cxx +++ b/hwpfilter/source/hbox.cxx @@ -285,7 +285,11 @@ hchar_string DateCode::GetString() ret.push_back(*fmt); } if (num != -1) + { + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) sprintf(cbuf, form, num); + SAL_WNODEPRECATED_DECLARATIONS_POP + } for (i = 0; 0 != cbuf[i]; i++) { ret.push_back(*(cbuf + i)); @@ -519,7 +523,9 @@ static void getOutlineNumStr(int style, int level, int num, hchar * hstr) *hstr++ = '('; if (fmt & NUM) { + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) sprintf(buf, "%d", num); + SAL_WNODEPRECATED_DECLARATIONS_POP str2hstr(buf, hstr); hstr += strlen(buf); } @@ -583,9 +589,17 @@ hchar_string Outline::GetUnicode() const { levelnum = ((number[i] < 1) ? 1 : number[i]); if (shape == OLSTY_NUMS2 && i && i == level) + { + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) sprintf(cur_num_str, "%d%c", levelnum, 0); + SAL_WNODEPRECATED_DECLARATIONS_POP + } else + { + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) sprintf(cur_num_str, "%d%c", levelnum, '.'); + SAL_WNODEPRECATED_DECLARATIONS_POP + } strcat(buf, cur_num_str); } str2hstr(buf, buffer); @@ -677,9 +691,17 @@ hchar_string Outline::GetUnicode() const { levelnum = ((number[j] < 1) ? 1 : number[j]); if ((j && j == level) || (j == level && deco[i][1])) + { + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) sprintf(cur_num_str, "%d%c", levelnum, 0); + SAL_WNODEPRECATED_DECLARATIONS_POP + } else + { + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) sprintf(cur_num_str, "%d%c", levelnum, '.'); + SAL_WNODEPRECATED_DECLARATIONS_POP + } strcat(buf, cur_num_str); } str2hstr(buf, buffer + l); diff --git a/hwpfilter/source/hcode.cxx b/hwpfilter/source/hcode.cxx index e901fbbb3a58..3529c329e901 100644 --- a/hwpfilter/source/hcode.cxx +++ b/hwpfilter/source/hcode.cxx @@ -1234,7 +1234,9 @@ hchar_string kstr2hstr(uchar const* src) */ char* Int2Str(int value, const char *format, char *buf) { + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) sprintf(buf,format,value); + SAL_WNODEPRECATED_DECLARATIONS_POP return buf; } @@ -1292,7 +1294,9 @@ char *hcolor2str(uchar color, uchar shade, char *buf, bool bIsChar) break; } + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) sprintf(buf,"#%02x%02x%02x", red, green, blue); + SAL_WNODEPRECATED_DECLARATIONS_POP return buf; } diff --git a/hwpfilter/source/hwpreader.cxx b/hwpfilter/source/hwpreader.cxx index d5a73be7e623..98ce08f29c0d 100644 --- a/hwpfilter/source/hwpreader.cxx +++ b/hwpfilter/source/hwpreader.cxx @@ -340,7 +340,9 @@ void HwpReader::makeMeta() else { minute = 0; } + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) sprintf(buf,"%d-%02d-%02dT%02d:%02d:00",year,month,day,hour,minute); + SAL_WNODEPRECATED_DECLARATIONS_POP rstartEl( "meta:creation-date", mxList ); rchars( ascii(buf)); @@ -587,31 +589,43 @@ void HwpReader::makeDrawMiscStyle( HWPDrawingObject *hdo ) { if( prop->center_y == 100 ) { + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) sprintf( buf, "#%02x%02x%02x", prop->tocolor & 0xff, (prop->tocolor >> 8) & 0xff, (prop->tocolor >>16) & 0xff ); + SAL_WNODEPRECATED_DECLARATIONS_POP padd( "draw:start-color", sXML_CDATA, ascii( buf )); + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) sprintf( buf, "#%02x%02x%02x", prop->fromcolor & 0xff, (prop->fromcolor >> 8) & 0xff, (prop->fromcolor >>16) & 0xff ); + SAL_WNODEPRECATED_DECLARATIONS_POP padd( "draw:end-color", sXML_CDATA, ascii( buf )); } else { + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) sprintf( buf, "#%02x%02x%02x", prop->fromcolor & 0xff, (prop->fromcolor >> 8) & 0xff, (prop->fromcolor >>16) & 0xff ); + SAL_WNODEPRECATED_DECLARATIONS_POP padd( "draw:start-color", sXML_CDATA, ascii( buf )); + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) sprintf( buf, "#%02x%02x%02x", prop->tocolor & 0xff, (prop->tocolor >> 8) & 0xff, (prop->tocolor >>16) & 0xff ); + SAL_WNODEPRECATED_DECLARATIONS_POP padd( "draw:end-color", sXML_CDATA, ascii( buf )); } } else { + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) sprintf( buf, "#%02x%02x%02x", prop->tocolor & 0xff, (prop->tocolor >> 8) & 0xff, (prop->tocolor >>16) & 0xff ); + SAL_WNODEPRECATED_DECLARATIONS_POP padd( "draw:start-color", sXML_CDATA,ascii( buf )); + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) sprintf( buf, "#%02x%02x%02x", prop->fromcolor & 0xff, (prop->fromcolor >> 8) & 0xff, (prop->fromcolor >>16) & 0xff ); + SAL_WNODEPRECATED_DECLARATIONS_POP padd( "draw:end-color", sXML_CDATA,ascii( buf )); } if( prop->angle > 0 && ( prop->gstyle == 1 || prop->gstyle == 4)) @@ -634,10 +648,12 @@ void HwpReader::makeDrawMiscStyle( HWPDrawingObject *hdo ) padd( "draw:style", sXML_CDATA, "single" ); else padd( "draw:style", sXML_CDATA, "double" ); + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) sprintf( buf, "#%02x%02x%02x", sal_uInt16(prop->pattern_color & 0xff), sal_uInt16((prop->pattern_color >> 8) & 0xff), sal_uInt16((prop->pattern_color >>16) & 0xff) ); + SAL_WNODEPRECATED_DECLARATIONS_POP padd( "draw:color", sXML_CDATA, ascii( buf )); padd( "draw:distance", sXML_CDATA, "0.12cm"); switch( type ) @@ -1680,8 +1696,10 @@ void HwpReader::makePageStyle() { if( hwpinfo.back_info.color[0] > 0 || hwpinfo.back_info.color[1] > 0 || hwpinfo.back_info.color[2] > 0 ){ + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) sprintf(buf,"#%02x%02x%02x",hwpinfo.back_info.color[0], hwpinfo.back_info.color[1],hwpinfo.back_info.color[2] ); + SAL_WNODEPRECATED_DECLARATIONS_POP padd("fo:background-color", sXML_CDATA, ascii(buf)); } } @@ -1862,7 +1880,9 @@ void HwpReader::makeTableStyle(Table *tbl) // column for (size_t i = 0 ; i < tbl->columns.nCount -1 ; i++) { + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) sprintf(buf,"Table%d.%c",hbox->style.boxnum, static_cast<char>('A'+i)); + SAL_WNODEPRECATED_DECLARATIONS_POP padd("style:name", sXML_CDATA, ascii( buf )); padd("style:family", sXML_CDATA,"table-column"); rstartEl("style:style", mxList); @@ -1878,7 +1898,9 @@ void HwpReader::makeTableStyle(Table *tbl) // row for (size_t i = 0 ; i < tbl->rows.nCount -1 ; i++) { + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) sprintf(buf,"Table%d.row%" SAL_PRI_SIZET "u",hbox->style.boxnum, i + 1); + SAL_WNODEPRECATED_DECLARATIONS_POP padd("style:name", sXML_CDATA, ascii( buf )); padd("style:family", sXML_CDATA,"table-row"); rstartEl("style:style", mxList); @@ -1894,7 +1916,9 @@ void HwpReader::makeTableStyle(Table *tbl) // cell for (auto const& tcell : tbl->cells) { + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) sprintf(buf,"Table%d.%c%d",hbox->style.boxnum, 'A'+ tcell->nColumnIndex, tcell->nRowIndex +1); + SAL_WNODEPRECATED_DECLARATIONS_POP padd("style:name", sXML_CDATA, ascii( buf )); padd("style:family", sXML_CDATA,"table-cell"); rstartEl("style:style", mxList); @@ -2036,10 +2060,12 @@ void HwpReader::makeDrawStyle( HWPDrawingObject * hdo, FBoxStyle * fstyle) padd("svg:stroke-width", sXML_CDATA, Double2Str( WTMM(hdo->property.line_width)) + "mm"); color = hdo->property.line_color; + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) sprintf( buf, "#%02x%02x%02x", sal_uInt16(color & 0xff), sal_uInt16((color >> 8) & 0xff), sal_uInt16((color >>16) & 0xff) ); + SAL_WNODEPRECATED_DECLARATIONS_POP padd("svg:stroke-color", sXML_CDATA, ascii( buf) ); } @@ -2144,10 +2170,12 @@ void HwpReader::makeDrawStyle( HWPDrawingObject * hdo, FBoxStyle * fstyle) ascii(Int2Str(hdo->index, "Hatch%d", buf))); if( color < 0xffffff ) { + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) sprintf( buf, "#%02x%02x%02x", sal_uInt16(color & 0xff), sal_uInt16((color >> 8) & 0xff), sal_uInt16((color >>16) & 0xff) ); + SAL_WNODEPRECATED_DECLARATIONS_POP padd("draw:fill-color", sXML_CDATA, ascii( buf) ); padd("draw:fill-hatch-solid", sXML_CDATA, "true"); } @@ -2155,10 +2183,12 @@ void HwpReader::makeDrawStyle( HWPDrawingObject * hdo, FBoxStyle * fstyle) else if( color <= 0xffffff ) { padd("draw:fill", sXML_CDATA, "solid"); + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) sprintf( buf, "#%02x%02x%02x", sal_uInt16(color & 0xff), sal_uInt16((color >> 8) & 0xff), sal_uInt16((color >>16) & 0xff) ); + SAL_WNODEPRECATED_DECLARATIONS_POP padd("draw:fill-color", sXML_CDATA, ascii( buf) ); } else @@ -3441,7 +3471,9 @@ void HwpReader::makeTable(TxtBox * hbox) // column for (size_t i = 0 ; i < tbl->columns.nCount -1 ; i++) { + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) sprintf(buf,"Table%d.%c",hbox->style.boxnum, static_cast<char>('A'+i)); + SAL_WNODEPRECATED_DECLARATIONS_POP padd("table:style-name", sXML_CDATA, ascii( buf )); rstartEl("table:table-column", mxList); mxList->clear(); @@ -3460,14 +3492,18 @@ void HwpReader::makeTable(TxtBox * hbox) k = j; } // row + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) sprintf(buf,"Table%d.row%d",hbox->style.boxnum, tcell->nRowIndex + 1); + SAL_WNODEPRECATED_DECLARATIONS_POP padd("table:style-name", sXML_CDATA, ascii( buf )); rstartEl("table:table-row", mxList); mxList->clear(); j = tcell->nRowIndex; } + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) sprintf(buf,"Table%d.%c%d",hbox->style.boxnum, 'A'+ tcell->nColumnIndex, tcell->nRowIndex +1); + SAL_WNODEPRECATED_DECLARATIONS_POP padd("table:style-name", sXML_CDATA, ascii( buf )); if( tcell->nColumnSpan > 1 ) padd("table:number-columns-spanned", sXML_CDATA, @@ -4326,7 +4362,9 @@ void HwpReader::makePictureDRAW(HWPDrawingObject *drawobj, Picture * hbox) Double2Str (WTMM( drawobj->extent.w )) + "mm"); padd("svg:height", sXML_CDATA, Double2Str (WTMM( drawobj->extent.h )) + "mm"); + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) sprintf(buf, "0 0 %d %d", WTSM(drawobj->extent.w) , WTSM(drawobj->extent.h) ); + SAL_WNODEPRECATED_DECLARATIONS_POP padd("svg:viewBox", sXML_CDATA, ascii(buf) ); OUStringBuffer oustr; @@ -4373,21 +4411,27 @@ void HwpReader::makePictureDRAW(HWPDrawingObject *drawobj, Picture * hbox) NaturalSpline(n, tarr.get(), yarr.get(), yb, carr, darr); } + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) sprintf(buf, "M%d %dC%d %d", WTSM(xarr[0]), WTSM(yarr[0]), WTSM(xarr[0] + xb[0]/3), WTSM(yarr[0] + yb[0]/3) ); + SAL_WNODEPRECATED_DECLARATIONS_POP oustr.append(ascii(buf)); for( i = 1 ; i < n ; i++ ){ if( i == n -1 ){ + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) sprintf(buf, " %d %d %d %dz", WTSM(xarr[i] - xb[i]/3), WTSM(yarr[i] - yb[i]/3), WTSM(xarr[i]), WTSM(yarr[i]) ); + SAL_WNODEPRECATED_DECLARATIONS_POP } else{ + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) sprintf(buf, " %d %d %d %d %d %d", WTSM(xarr[i] - xb[i]/3), WTSM(yarr[i] - yb[i]/3), WTSM(xarr[i]), WTSM(yarr[i]), WTSM(xarr[i] + xb[i]/3), WTSM(yarr[i] + yb[i]/3) ); + SAL_WNODEPRECATED_DECLARATIONS_POP } oustr.append(ascii(buf)); @@ -4426,21 +4470,27 @@ void HwpReader::makePictureDRAW(HWPDrawingObject *drawobj, Picture * hbox) padd("svg:height", sXML_CDATA, Double2Str (WTMM( drawobj->extent.h )) + "mm"); + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) sprintf(buf, "0 0 %d %d", WTSM(drawobj->extent.w), WTSM(drawobj->extent.h)); + SAL_WNODEPRECATED_DECLARATIONS_POP padd("svg:viewBox", sXML_CDATA, ascii(buf) ); OUStringBuffer oustr; if (drawobj->u.freeform.npt > 0) { + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) sprintf(buf, "%d,%d", WTSM(drawobj->u.freeform.pt[0].x), WTSM(drawobj->u.freeform.pt[0].y)); + SAL_WNODEPRECATED_DECLARATIONS_POP oustr.append(ascii(buf)); int i; for (i = 1; i < drawobj->u.freeform.npt ; i++) { + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) sprintf(buf, " %d,%d", WTSM(drawobj->u.freeform.pt[i].x), WTSM(drawobj->u.freeform.pt[i].y)); + SAL_WNODEPRECATED_DECLARATIONS_POP oustr.append(ascii(buf)); } if( drawobj->u.freeform.pt[0].x == drawobj->u.freeform.pt[i-1].x && diff --git a/hwpfilter/source/mzstring.cxx b/hwpfilter/source/mzstring.cxx index 462ed91ad3fc..984b12b13c85 100644 --- a/hwpfilter/source/mzstring.cxx +++ b/hwpfilter/source/mzstring.cxx @@ -184,7 +184,9 @@ MzString &MzString::operator << (int i) { char str[80]; + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) wsprintfA(str, "%d", i); + SAL_WNODEPRECATED_DECLARATIONS_POP append(str); return *this; } @@ -194,7 +196,9 @@ MzString &MzString::operator << (tools::Long l) { char str[80]; + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) wsprintfA(str, "%ld", l); + SAL_WNODEPRECATED_DECLARATIONS_POP append(str); return *this; } diff --git a/i18npool/source/calendar/calendar_gregorian.cxx b/i18npool/source/calendar/calendar_gregorian.cxx index 53fe9b1c70bd..2134eb0abbde 100644 --- a/i18npool/source/calendar/calendar_gregorian.cxx +++ b/i18npool/source/calendar/calendar_gregorian.cxx @@ -932,17 +932,27 @@ Calendar_gregorian::getDisplayStringImpl( sal_Int32 nCalendarDisplayCode, sal_In value += 1; // month is zero based [[fallthrough]]; case CalendarDisplayCode::SHORT_DAY: + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) sprintf(aStr, "%" SAL_PRIdINT32, value); // #100211# - checked + SAL_WNODEPRECATED_DECLARATIONS_POP break; case CalendarDisplayCode::LONG_YEAR: - if ( aCalendar.Name == "gengou" ) + if ( aCalendar.Name == "gengou" ) { + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) sprintf(aStr, "%02" SAL_PRIdINT32, value); // #100211# - checked - else + SAL_WNODEPRECATED_DECLARATIONS_POP + } + else { + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) sprintf(aStr, "%" SAL_PRIdINT32, value); // #100211# - checked + SAL_WNODEPRECATED_DECLARATIONS_POP + } break; case CalendarDisplayCode::LONG_MONTH: value += 1; // month is zero based + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) sprintf(aStr, "%02" SAL_PRIdINT32, value); // #100211# - checked + SAL_WNODEPRECATED_DECLARATIONS_POP break; case CalendarDisplayCode::SHORT_YEAR: // Take last 2 digits, or only one if value<10, for example, @@ -956,13 +966,21 @@ Calendar_gregorian::getDisplayStringImpl( sal_Int32 nCalendarDisplayCode, sal_In // E for the other calendar and currently (2013-02-28) ROC is // the only calendar using this. // See i#116701 and fdo#60915 - if (value < 100 || bEraMode || (eraArray && (eraArray[0].flags & kDisplayEraForcedLongYear))) + if (value < 100 || bEraMode || (eraArray && (eraArray[0].flags & kDisplayEraForcedLongYear))) { + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) sprintf(aStr, "%" SAL_PRIdINT32, value); // #100211# - checked - else + SAL_WNODEPRECATED_DECLARATIONS_POP + } + else { + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) sprintf(aStr, "%02" SAL_PRIdINT32, value % 100); // #100211# - checked + SAL_WNODEPRECATED_DECLARATIONS_POP + } break; case CalendarDisplayCode::LONG_DAY: + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) sprintf(aStr, "%02" SAL_PRIdINT32, value); // #100211# - checked + SAL_WNODEPRECATED_DECLARATIONS_POP break; case CalendarDisplayCode::SHORT_DAY_NAME: diff --git a/lotuswordpro/source/filter/bencont.cxx b/lotuswordpro/source/filter/bencont.cxx index b5648a64b3ec..9ab7512e4889 100644 --- a/lotuswordpro/source/filter/bencont.cxx +++ b/lotuswordpro/source/filter/bencont.cxx @@ -280,8 +280,10 @@ std::vector<sal_uInt8> LtcBenContainer::GetGraphicData(const char *pObjectName) char sSName[64]=""; char sDName[64]=""; + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) sprintf(sSName, "%s-S", pObjectName); sprintf(sDName, "%s-D", pObjectName); + SAL_WNODEPRECATED_DECLARATIONS_POP /* traverse the found properties and construct the stream vectors */ // get S&D's stream and merge them together diff --git a/lotuswordpro/source/filter/lwpgrfobj.cxx b/lotuswordpro/source/filter/lwpgrfobj.cxx index 986cdff85195..519761f01f0e 100644 --- a/lotuswordpro/source/filter/lwpgrfobj.cxx +++ b/lotuswordpro/source/filter/lwpgrfobj.cxx @@ -314,7 +314,9 @@ void LwpGraphicObject::GetBentoNamebyID(LwpObjectID const & rMyID, std::string& sal_uInt32 nLow = rMyID.GetLow(); char pTempStr[32]; rName = std::string("Gr"); + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) sprintf(pTempStr, "%X,%" SAL_PRIXUINT32, nHigh, nLow); + SAL_WNODEPRECATED_DECLARATIONS_POP rName.append(pTempStr); } @@ -370,7 +372,9 @@ sal_uInt32 LwpGraphicObject::GetGrafData(std::unique_ptr<sal_uInt8[]>& pGrafData GetBentoNamebyID(rMyID, aGrfObjName); char sDName[64]=""; + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) sprintf(sDName, "%s-D", aGrfObjName.c_str()); + SAL_WNODEPRECATED_DECLARATIONS_POP // get bento stream by the name pGrafStream = pBentoContainer->FindValueStreamWithPropertyName(sDName); diff --git a/lotuswordpro/source/filter/xfilter/xfcolor.cxx b/lotuswordpro/source/filter/xfilter/xfcolor.cxx index c30e35341f3e..dbdc2ee58691 100644 --- a/lotuswordpro/source/filter/xfilter/xfcolor.cxx +++ b/lotuswordpro/source/filter/xfilter/xfcolor.cxx @@ -63,7 +63,9 @@ OUString XFColor::ToString() const { char buf[8] = {}; + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) sprintf(buf,"#%2x%2x%2x",m_nRed, m_nGreen, m_nBlue); + SAL_WNODEPRECATED_DECLARATIONS_POP for( int i=1; i<7;i++ ) { if( buf[i] == ' ' ) diff --git a/sal/qa/rtl/process/rtl_Process.cxx b/sal/qa/rtl/process/rtl_Process.cxx index f117c3a2a959..5d4f3e5b52c0 100644 --- a/sal/qa/rtl/process/rtl_Process.cxx +++ b/sal/qa/rtl/process/rtl_Process.cxx @@ -170,10 +170,14 @@ static void printUuidtoBuffer( const sal_uInt8 *pNode, char * pBuffer ) sal_uInt8 nValue = pNode[i1]; if (nValue < 16) { + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) sprintf( pBuffer + nPtr, "0"); + SAL_WNODEPRECATED_DECLARATIONS_POP nPtr++; } + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) sprintf( pBuffer + nPtr, "%02x", nValue ); + SAL_WNODEPRECATED_DECLARATIONS_POP nPtr += 2 ; } } diff --git a/sc/source/filter/excel/xestream.cxx b/sc/source/filter/excel/xestream.cxx index 559808cd2a91..6de4db3b77ab 100644 --- a/sc/source/filter/excel/xestream.cxx +++ b/sc/source/filter/excel/xestream.cxx @@ -707,7 +707,9 @@ OUString XclXmlUtils::GetStreamName( const char* sStreamDir, const char* sStream OString XclXmlUtils::ToOString( const Color& rColor ) { char buf[9]; + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) sprintf( buf, "%.2X%.2X%.2X%.2X", rColor.GetAlpha(), rColor.GetRed(), rColor.GetGreen(), rColor.GetBlue() ); + SAL_WNODEPRECATED_DECLARATIONS_POP buf[8] = '\0'; return OString(buf); } diff --git a/sc/source/filter/xcl97/xcl97rec.cxx b/sc/source/filter/xcl97/xcl97rec.cxx index 5ed6cccde2a2..0d241dba8c45 100644 --- a/sc/source/filter/xcl97/xcl97rec.cxx +++ b/sc/source/filter/xcl97/xcl97rec.cxx @@ -992,7 +992,9 @@ void XclObjOle::WriteSubRecs( XclExpStream& rStrm ) char aBuf[ sizeof(sal_uInt32) * 2 + 1 ]; // FIXME Eeek! Is this just a way to get a unique id? sal_uInt32 nPictureId = sal_uInt32(reinterpret_cast<sal_uIntPtr>(this) >> 2); + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) sprintf( aBuf, "%08X", static_cast< unsigned int >( nPictureId ) ); + SAL_WNODEPRECATED_DECLARATIONS_POP aStorageName += OUString::createFromAscii(aBuf); tools::SvRef<SotStorage> xOleStg = pRootStorage->OpenSotStorage( aStorageName ); if( !xOleStg.is() ) diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index c56efca7cf8f..beedef4b299d 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -2764,9 +2764,11 @@ bool SfxObjectShell::CommonSaveAs_Impl(const INetURLObject& aURL, const OUString if (SfxItemState::SET != rItemSet.GetItemState(SID_UNPACK) && officecfg::Office::Common::Save::Document::Unpacked::get()) rItemSet.Put(SfxBoolItem(SID_UNPACK, false)); +#if HAVE_FEATURE_MULTIUSER_ENVIRONMENT OUString aTempFileURL; if ( IsDocShared() ) aTempFileURL = pMedium->GetURLObject().GetMainURL( INetURLObject::DecodeMechanism::NONE ); +#endif if (PreDoSaveAs_Impl(aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE), aFilterName, rItemSet, rArgs)) diff --git a/shell/source/tools/lngconvex/lngconvex.cxx b/shell/source/tools/lngconvex/lngconvex.cxx index fc81964494f0..95625ca03719 100644 --- a/shell/source/tools/lngconvex/lngconvex.cxx +++ b/shell/source/tools/lngconvex/lngconvex.cxx @@ -410,7 +410,9 @@ void start_language_section( #ifdef _WIN32 _itoa(primLangID, buff, 16); #else + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) sprintf(buff, "%x", primLangID); + SAL_WNODEPRECATED_DECLARATIONS_POP #endif lang_section += std::string("0x") + std::string(buff); @@ -419,7 +421,9 @@ void start_language_section( #ifdef _WIN32 _itoa(subLangID, buff, 16); #else + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) sprintf(buff, "%x", subLangID); + SAL_WNODEPRECATED_DECLARATIONS_POP #endif lang_section += std::string("0x") + std::string(buff); ostream_iter = lang_section; diff --git a/solenv/bin/native-code.py b/solenv/bin/native-code.py index 1e39fb11e843..669bddc7b00d 100755 --- a/solenv/bin/native-code.py +++ b/solenv/bin/native-code.py @@ -855,6 +855,7 @@ print ("""/* * File generated by solenv/bin/native-code.py */ +#include <config_crypto.h> #include <config_features.h> #include <config_fuzzers.h> #include <config_gpgme.h> diff --git a/svl/source/misc/lockfilecommon.cxx b/svl/source/misc/lockfilecommon.cxx index 844b446397c7..98d8e052ac0e 100644 --- a/svl/source/misc/lockfilecommon.cxx +++ b/svl/source/misc/lockfilecommon.cxx @@ -209,7 +209,9 @@ OUString LockFileCommon::GetCurrentLocalTime() { char pDateTime[sizeof("65535.65535.-32768 65535:65535")]; // reserve enough space for hypothetical max length + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) sprintf( pDateTime, "%02" SAL_PRIuUINT32 ".%02" SAL_PRIuUINT32 ".%4" SAL_PRIdINT32 " %02" SAL_PRIuUINT32 ":%02" SAL_PRIuUINT32, sal_uInt32(aDateTime.Day), sal_uInt32(aDateTime.Month), sal_Int32(aDateTime.Year), sal_uInt32(aDateTime.Hours), sal_uInt32(aDateTime.Minutes) ); + SAL_WNODEPRECATED_DECLARATIONS_POP aTime = OUString::createFromAscii( pDateTime ); } } diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx index fb9cbf50493d..d527f075b330 100644 --- a/svl/source/numbers/zformat.cxx +++ b/svl/source/numbers/zformat.cxx @@ -2906,7 +2906,9 @@ bool SvNumberformat::ImpGetFractionOutput(double fNumber, else { char aBuf[100]; + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) sprintf( aBuf, "%.f", fNum ); // simple rounded integer (#100211# - checked) + SAL_WNODEPRECATED_DECLARATIONS_POP sStr.appendAscii( aBuf ); impTransliterate(sStr, NumFor[nIx].GetNatNum()); } diff --git a/sw/secmod.db b/sw/secmod.db new file mode 100644 index 000000000000..a60d58a29597 Binary files /dev/null and b/sw/secmod.db differ diff --git a/sw/source/core/doc/dbgoutsw.cxx b/sw/source/core/doc/dbgoutsw.cxx index 73b0c47462eb..9b038a36de4d 100644 --- a/sw/source/core/doc/dbgoutsw.cxx +++ b/sw/source/core/doc/dbgoutsw.cxx @@ -73,7 +73,9 @@ const char * dbg_out(const void * pVoid) { char sBuffer[1024]; + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) sprintf(sBuffer, "%p", pVoid); + SAL_WNODEPRECATED_DECLARATIONS_POP OUString aTmpStr(sBuffer, strlen(sBuffer), RTL_TEXTENCODING_ASCII_US); @@ -388,7 +390,9 @@ const char * dbg_out(const SwRect & rRect) static OUString lcl_dbg_out(const SwFrameFormat & rFrameFormat) { char sBuffer[256]; + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) sprintf(sBuffer, "%p", &rFrameFormat); + SAL_WNODEPRECATED_DECLARATIONS_POP OUString aResult = "[ " + OUString(sBuffer, strlen(sBuffer), RTL_TEXTENCODING_ASCII_US) + @@ -483,7 +487,9 @@ static OUString lcl_dbg_out_NumType(sal_Int16 nType) static OUString lcl_dbg_out(const SwNode & rNode) { char aBuffer[128]; + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) sprintf(aBuffer, "%p", &rNode); + SAL_WNODEPRECATED_DECLARATIONS_POP OUString aTmpStr = "<node " "index=\"" + @@ -735,7 +741,9 @@ static OUString lcl_dbg_out(const SwNumRuleTable & rTable) aResult.append(rTable[n]->GetName()); char sBuffer[256]; + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) sprintf(sBuffer, "(%p)", rTable[n]); + SAL_WNODEPRECATED_DECLARATIONS_POP aResult.appendAscii(sBuffer); } diff --git a/sw/source/filter/ww8/WW8TableInfo.cxx b/sw/source/filter/ww8/WW8TableInfo.cxx index 907e4131cec0..314a03bf14c2 100644 --- a/sw/source/filter/ww8/WW8TableInfo.cxx +++ b/sw/source/filter/ww8/WW8TableInfo.cxx @@ -1278,7 +1278,9 @@ std::string WW8TableCellGrid::toString() static char sBuffer[1024]; while (aTopsIt != getRowTopsEnd()) { + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) sprintf(sBuffer, "<row y=\"%" SAL_PRIdINT64 "\">", sal_Int64(*aTopsIt)); + SAL_WNODEPRECATED_DECLARATIONS_POP sResult += sBuffer; CellInfoMultiSet::const_iterator aCellIt = getCellsBegin(*aTopsIt); diff --git a/sw/source/ui/vba/vbacontentcontrollistentry.cxx b/sw/source/ui/vba/vbacontentcontrollistentry.cxx index 73f5e9d0a2cf..727092e083f8 100644 --- a/sw/source/ui/vba/vbacontentcontrollistentry.cxx +++ b/sw/source/ui/vba/vbacontentcontrollistentry.cxx @@ -44,7 +44,10 @@ void SwVbaContentControlListEntry::setIndex(sal_Int32 nSet) OUString SwVbaContentControlListEntry::getText() { assert(m_nZIndex < m_pCC->GetListItems().size()); - const SwContentControlListItem& rListItem = m_pCC->GetListItems()[m_nZIndex]; + // Xcode 14.2 is really fussy so create a temporary vector before fetching + // one of the list items + std::vector<SwContentControlListItem> aListItems(m_pCC->GetListItems()); + const SwContentControlListItem& rListItem = aListItems[m_nZIndex]; return rListItem.ToString(); } @@ -77,7 +80,10 @@ void SwVbaContentControlListEntry::setText(const OUString& rSet) OUString SwVbaContentControlListEntry::getValue() { assert(m_nZIndex < m_pCC->GetListItems().size()); - const SwContentControlListItem& rListItem = m_pCC->GetListItems()[m_nZIndex]; + // Xcode 14.2 is really fussy so create a temporary vector before fetching + // one of the list items + std::vector<SwContentControlListItem> aListItems(m_pCC->GetListItems()); + const SwContentControlListItem& rListItem = aListItems[m_nZIndex]; return rListItem.m_aValue; } diff --git a/tools/source/inet/inetmsg.cxx b/tools/source/inet/inetmsg.cxx index bb8a700d16f1..5c669d8cd012 100644 --- a/tools/source/inet/inetmsg.cxx +++ b/tools/source/inet/inetmsg.cxx @@ -263,9 +263,11 @@ void INetMIMEMessage::EnableAttachMultipartFormDataChild() tools::Time aCurTime( tools::Time::SYSTEM ); sal_uInt64 nThis = reinterpret_cast< sal_uIntPtr >( this ); // we can be on a 64bit architecture nThis = ( ( nThis >> 32 ) ^ nThis ) & SAL_MAX_UINT32; + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) sprintf (sTail, "%08X%08X", static_cast< unsigned int >(aCurTime.GetTime()), static_cast< unsigned int >(nThis)); + SAL_WNODEPRECATED_DECLARATIONS_POP m_aBoundary = "------------_4D48"; m_aBoundary += sTail; diff --git a/tools/source/misc/json_writer.cxx b/tools/source/misc/json_writer.cxx index 7730a9a603d5..16b3e52cb703 100644 --- a/tools/source/misc/json_writer.cxx +++ b/tools/source/misc/json_writer.cxx @@ -327,7 +327,9 @@ void JsonWriter::put(const char* pPropName, sal_Int64 nPropVal) memcpy(mPos, "\": ", 3); mPos += 3; + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) mPos += sprintf(mPos, "%" SAL_PRIdINT64, nPropVal); + SAL_WNODEPRECATED_DECLARATIONS_POP validate(); } diff --git a/tools/source/ref/globname.cxx b/tools/source/ref/globname.cxx index fda6fafab53c..8356eeaf04e3 100644 --- a/tools/source/ref/globname.cxx +++ b/tools/source/ref/globname.cxx @@ -229,24 +229,34 @@ OUString SvGlobalName::GetHexName() const OStringBuffer aHexBuffer(36); char buf[ 10 ]; + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) sprintf( buf, "%8.8" SAL_PRIXUINT32, pImp->szData.Data1 ); + SAL_WNODEPRECATED_DECLARATIONS_POP aHexBuffer.append(buf); aHexBuffer.append('-'); + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) sprintf( buf, "%4.4X", pImp->szData.Data2 ); + SAL_WNODEPRECATED_DECLARATIONS_POP aHexBuffer.append(buf); aHexBuffer.append('-'); + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) sprintf( buf, "%4.4X", pImp->szData.Data3 ); + SAL_WNODEPRECATED_DECLARATIONS_POP aHexBuffer.append(buf); aHexBuffer.append('-'); for( int i = 0; i < 2; i++ ) { + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) sprintf( buf, "%2.2x", pImp->szData.Data4[ i ] ); + SAL_WNODEPRECATED_DECLARATIONS_POP aHexBuffer.append(buf); } aHexBuffer.append('-'); for( int i = 2; i < 8; i++ ) { + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) sprintf( buf, "%2.2x", pImp->szData.Data4[ i ] ); + SAL_WNODEPRECATED_DECLARATIONS_POP aHexBuffer.append(buf); } return OStringToOUString(aHexBuffer.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US); diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx index d42cefdf63cf..b31699e835df 100644 --- a/tools/source/stream/stream.cxx +++ b/tools/source/stream/stream.cxx @@ -1347,7 +1347,9 @@ void SvStream::RefreshBuffer() SvStream& SvStream::WriteInt32AsString(sal_Int32 nInt32) { char buffer[12]; + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) std::size_t nLen = sprintf(buffer, "%" SAL_PRIdINT32, nInt32); + SAL_WNODEPRECATED_DECLARATIONS_POP WriteBytes(buffer, nLen); return *this; } @@ -1355,7 +1357,9 @@ SvStream& SvStream::WriteInt32AsString(sal_Int32 nInt32) SvStream& SvStream::WriteUInt32AsString(sal_uInt32 nUInt32) { char buffer[11]; + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) std::size_t nLen = sprintf(buffer, "%" SAL_PRIuUINT32, nUInt32); + SAL_WNODEPRECATED_DECLARATIONS_POP WriteBytes(buffer, nLen); return *this; } diff --git a/vcl/ios/iosinst.cxx b/vcl/ios/iosinst.cxx index 2eff5234de2b..3daf3831320d 100644 --- a/vcl/ios/iosinst.cxx +++ b/vcl/ios/iosinst.cxx @@ -134,7 +134,7 @@ public: SalFrame *IosSalInstance::CreateChildFrame( SystemParentData* pParent, SalFrameStyleFlags nStyle ) { - pParent = NULL; + (void)pParent; return new IosSalFrame( this, NULL, nStyle ); } diff --git a/vcl/source/fontsubset/cff.cxx b/vcl/source/fontsubset/cff.cxx index 7d418ef2694c..605fa4022753 100644 --- a/vcl/source/fontsubset/cff.cxx +++ b/vcl/source/fontsubset/cff.cxx @@ -1435,7 +1435,9 @@ const char* CffSubsetterContext::getString( int nStringID) // TODO: get rid of static char buffer static char aNameBuf[ 2560]; if( nLen < 0) { + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) sprintf( aNameBuf, "name[%d].notfound!", nStringID); + SAL_WNODEPRECATED_DECLARATIONS_POP } else { const int nMaxLen = sizeof(aNameBuf) - 1; if( nLen >= nMaxLen) @@ -1555,10 +1557,16 @@ const char* CffSubsetterContext::getGlyphName( int nGlyphIndex) // get the glyph specific name const int nSID = getGlyphSID( nGlyphIndex); - if( nSID < 0) // default glyph name + if( nSID < 0) { // default glyph name + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) sprintf( aDefaultGlyphName, "gly%03d", nGlyphIndex); - else if( mbCIDFont) // default glyph name in CIDs - sprintf( aDefaultGlyphName, "cid%03d", nSID); + SAL_WNODEPRECATED_DECLARATIONS_POP + } + else if( mbCIDFont) { // default glyph name in CIDs + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) + sprintf( aDefaultGlyphName, "cid%03d", nSID); + SAL_WNODEPRECATED_DECLARATIONS_POP + } else { // glyph name from string table const char* pSidName = getString( nSID); // check validity of glyph name @@ -1569,8 +1577,11 @@ const char* CffSubsetterContext::getGlyphName( int nGlyphIndex) pGlyphName = pSidName; } // if needed invent a fallback name - if( pGlyphName != pSidName) + if( pGlyphName != pSidName) { + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) sprintf( aDefaultGlyphName, "bad%03d", nSID); + SAL_WNODEPRECATED_DECLARATIONS_POP + } } return pGlyphName; @@ -1727,7 +1738,9 @@ void Type1Emitter::emitValVector( const char* pLineHead, const char* pLineTail, return; // emit the line head + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) mpPtr += sprintf( mpPtr, "%s", pLineHead); + SAL_WNODEPRECATED_DECLARATIONS_POP // emit the vector values std::vector<ValType>::value_type aVal = 0; for( std::vector<ValType>::const_iterator it = rVector.begin();;) { @@ -1740,7 +1753,9 @@ void Type1Emitter::emitValVector( const char* pLineHead, const char* pLineTail, // emit the last value mpPtr += dbl2str( mpPtr, aVal); // emit the line tail + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) mpPtr += sprintf( mpPtr, "%s", pLineTail); + SAL_WNODEPRECATED_DECLARATIONS_POP } void CffSubsetterContext::emitAsType1( Type1Emitter& rEmitter, @@ -1787,6 +1802,7 @@ void CffSubsetterContext::emitAsType1( Type1Emitter& rEmitter, rEmitter.emitRawData( aPfbHeader, sizeof(aPfbHeader)-1); } + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) pOut += sprintf( pOut, "%%!FontType1-1.0: %s 001.003\n", rEmitter.maSubsetName); // emit TOPDICT pOut += sprintf( pOut, @@ -1795,17 +1811,25 @@ void CffSubsetterContext::emitAsType1( Type1Emitter& rEmitter, "/PaintType 0 def\n"); pOut += sprintf( pOut, "/FontName /%s def\n", rEmitter.maSubsetName); pOut += sprintf( pOut, "/UniqueID %d def\n", nUniqueId); + SAL_WNODEPRECATED_DECLARATIONS_POP // emit FontMatrix if( maFontMatrix.size() == 6) rEmitter.emitValVector( "/FontMatrix [", "]readonly def\n", maFontMatrix); - else // emit default FontMatrix if needed + else { // emit default FontMatrix if needed + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) pOut += sprintf( pOut, "/FontMatrix [0.001 0 0 0.001 0 0]readonly def\n"); + SAL_WNODEPRECATED_DECLARATIONS_POP + } // emit FontBBox if( maFontBBox.size() == 4) rEmitter.emitValVector( "/FontBBox {", "}readonly def\n", maFontBBox); - else // emit default FontBBox if needed + else { // emit default FontBBox if needed + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) pOut += sprintf( pOut, "/FontBBox {0 0 999 999}readonly def\n"); + SAL_WNODEPRECATED_DECLARATIONS_POP + } // emit FONTINFO into TOPDICT + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) pOut += sprintf( pOut, "/FontInfo 2 dict dup begin\n" // TODO: check fontinfo entry count " /FullName (%s) readonly def\n" @@ -1816,15 +1840,20 @@ void CffSubsetterContext::emitAsType1( Type1Emitter& rEmitter, pOut += sprintf( pOut, "/Encoding 256 array\n" "0 1 255 {1 index exch /.notdef put} for\n"); + SAL_WNODEPRECATED_DECLARATIONS_POP for( int i = 1; (i < nGlyphCount) && (i < 256); ++i) { const char* pGlyphName = getGlyphName( pReqGlyphIds[i]); + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) pOut += sprintf( pOut, "dup %d /%s put\n", pReqEncoding[i], pGlyphName); + SAL_WNODEPRECATED_DECLARATIONS_POP } + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) pOut += sprintf( pOut, "readonly def\n"); pOut += sprintf( pOut, // TODO: more topdict entries "currentdict end\n" "currentfile eexec\n"); + SAL_WNODEPRECATED_DECLARATIONS_POP // emit PFB header rEmitter.emitAllRaw(); @@ -1859,6 +1888,7 @@ void CffSubsetterContext::emitAsType1( Type1Emitter& rEmitter, nPrivEntryCount += int(mpCffLocal->mnLangGroup == 1); nPrivEntryCount += int(mpCffLocal->mbForceBold); // emit the privdict header + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) pOut += sprintf( pOut, "\110\104\125 " "dup\n/Private %d dict dup begin\n" @@ -1868,61 +1898,100 @@ void CffSubsetterContext::emitAsType1( Type1Emitter& rEmitter, "/MinFeature{16 16}ND\n" "/password 5839 def\n", // TODO: mnRDCryptSeed? nPrivEntryCount); + SAL_WNODEPRECATED_DECLARATIONS_POP // emit blue hint related privdict entries if( !mpCffLocal->maBlueValues.empty()) rEmitter.emitValVector( "/BlueValues [", "]ND\n", mpCffLocal->maBlueValues); - else + else { + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) pOut += sprintf( pOut, "/BlueValues []ND\n"); // default to empty BlueValues + SAL_WNODEPRECATED_DECLARATIONS_POP + } rEmitter.emitValVector( "/OtherBlues [", "]ND\n", mpCffLocal->maOtherBlues); rEmitter.emitValVector( "/FamilyBlues [", "]ND\n", mpCffLocal->maFamilyBlues); rEmitter.emitValVector( "/FamilyOtherBlues [", "]ND\n", mpCffLocal->maFamilyOtherBlues); if( mpCffLocal->mfBlueScale) { + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) pOut += sprintf( pOut, "/BlueScale "); + SAL_WNODEPRECATED_DECLARATIONS_POP pOut += dbl2str( pOut, mpCffLocal->mfBlueScale); + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) pOut += sprintf( pOut, " def\n"); + SAL_WNODEPRECATED_DECLARATIONS_POP } if( mpCffLocal->mfBlueShift) { // default BlueShift==7 + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) pOut += sprintf( pOut, "/BlueShift "); + SAL_WNODEPRECATED_DECLARATIONS_POP pOut += dbl2str( pOut, mpCffLocal->mfBlueShift); + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) pOut += sprintf( pOut, " def\n"); + SAL_WNODEPRECATED_DECLARATIONS_POP } if( mpCffLocal->mfBlueFuzz) { // default BlueFuzz==1 + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) pOut += sprintf( pOut, "/BlueFuzz "); + SAL_WNODEPRECATED_DECLARATIONS_POP pOut += dbl2str( pOut, mpCffLocal->mfBlueFuzz); + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) pOut += sprintf( pOut, " def\n"); + SAL_WNODEPRECATED_DECLARATIONS_POP } // emit stem hint related privdict entries if( mpCffLocal->maStemStdHW) { + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) pOut += sprintf( pOut, "/StdHW ["); + SAL_WNODEPRECATED_DECLARATIONS_POP pOut += dbl2str( pOut, mpCffLocal->maStemStdHW); + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) pOut += sprintf( pOut, "] def\n"); + SAL_WNODEPRECATED_DECLARATIONS_POP } if( mpCffLocal->maStemStdVW) { + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) pOut += sprintf( pOut, "/StdVW ["); + SAL_WNODEPRECATED_DECLARATIONS_POP pOut += dbl2str( pOut, mpCffLocal->maStemStdVW); + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) pOut += sprintf( pOut, "] def\n"); + SAL_WNODEPRECATED_DECLARATIONS_POP } rEmitter.emitValVector( "/StemSnapH [", "]ND\n", mpCffLocal->maStemSnapH); rEmitter.emitValVector( "/StemSnapV [", "]ND\n", mpCffLocal->maStemSnapV); // emit other hints - if( mpCffLocal->mbForceBold) + if( mpCffLocal->mbForceBold) { + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) pOut += sprintf( pOut, "/ForceBold true def\n"); - if( mpCffLocal->mnLangGroup != 0) + SAL_WNODEPRECATED_DECLARATIONS_POP + } + if( mpCffLocal->mnLangGroup != 0) { + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) pOut += sprintf( pOut, "/LanguageGroup %d def\n", mpCffLocal->mnLangGroup); - if( mpCffLocal->mnLangGroup == 1) // compatibility with ancient printers + SAL_WNODEPRECATED_DECLARATIONS_POP + } + if( mpCffLocal->mnLangGroup == 1) { // compatibility with ancient printers + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) pOut += sprintf( pOut, "/RndStemUp false def\n"); + SAL_WNODEPRECATED_DECLARATIONS_POP + } if( mpCffLocal->mfExpFactor) { + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) pOut += sprintf( pOut, "/ExpansionFactor "); + SAL_WNODEPRECATED_DECLARATIONS_POP pOut += dbl2str( pOut, mpCffLocal->mfExpFactor); + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) pOut += sprintf( pOut, " def\n"); + SAL_WNODEPRECATED_DECLARATIONS_POP } // emit remaining privdict entries + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) pOut += sprintf( pOut, "/UniqueID %d def\n", nUniqueId); + SAL_WNODEPRECATED_DECLARATIONS_POP // TODO?: more privdict entries? static const char aOtherSubrs[] = @@ -1957,8 +2026,10 @@ void CffSubsetterContext::emitAsType1( Type1Emitter& rEmitter, // TODO: emit used LocalSubr charstrings? // emit the CharStrings for the requested glyphs + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) pOut += sprintf( pOut, "2 index /CharStrings %d dict dup begin\n", nGlyphCount); + SAL_WNODEPRECATED_DECLARATIONS_POP rEmitter.emitAllCrypted(); for( int i = 0; i < nGlyphCount; ++i) { const int nCffGlyphId = pReqGlyphIds[i]; @@ -1976,10 +2047,14 @@ void CffSubsetterContext::emitAsType1( Type1Emitter& rEmitter, // get the glyph name const char* pGlyphName = getGlyphName( nCffGlyphId); // emit the encrypted Type1op charstring + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) pOut += sprintf( pOut, "/%s %d RD ", pGlyphName, nT1Len); + SAL_WNODEPRECATED_DECLARATIONS_POP memcpy( pOut, aType1Ops, nT1Len); pOut += nT1Len; + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) pOut += sprintf( pOut, " ND\n"); + SAL_WNODEPRECATED_DECLARATIONS_POP rEmitter.emitAllCrypted(); // provide individual glyphwidths if requested if( pGlyphWidths ) { @@ -1989,9 +2064,11 @@ void CffSubsetterContext::emitAsType1( Type1Emitter& rEmitter, pGlyphWidths[i] = static_cast<sal_Int32>(aCharWidth); } } + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) pOut += sprintf( pOut, "end end\nreadonly put\nput\n"); pOut += sprintf( pOut, "dup/FontName get exch definefont pop\n"); pOut += sprintf( pOut, "mark currentfile closefile\n"); + SAL_WNODEPRECATED_DECLARATIONS_POP rEmitter.emitAllCrypted(); // mark stop of eexec encryption diff --git a/xmlsecurity/source/helper/xsecsign.cxx b/xmlsecurity/source/helper/xsecsign.cxx index fdbd0f614cfb..896e6319ef18 100644 --- a/xmlsecurity/source/helper/xsecsign.cxx +++ b/xmlsecurity/source/helper/xsecsign.cxx @@ -44,7 +44,9 @@ OUString XSecController::createId() int length = 3; for (sal_uInt8 i : aSeq) { + SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK) length += sprintf(str+length, "%04x", i); + SAL_WNODEPRECATED_DECLARATIONS_POP } return OUString::createFromAscii(str);