-Werror,-Wdeprecated-declarations (sprintf, macOS 13 SDK): basic
Change-Id: If70c3bf8d7d6c855baf23b02cccb3f3b5ccb9f64 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142321 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
parent
90e1bf18aa
commit
e88cb2d41f
1 changed files with 5 additions and 4 deletions
|
@ -24,7 +24,9 @@
|
|||
#include <rtl/ustrbuf.hxx>
|
||||
|
||||
#include <rtl/character.hxx>
|
||||
#include <o3tl/sprintf.hxx>
|
||||
#include <o3tl/string_view.hxx>
|
||||
#include <string_view>
|
||||
#include <utility>
|
||||
|
||||
/*
|
||||
|
@ -234,17 +236,16 @@ 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
|
||||
/*int nCount =*/ sprintf( sBuffer,"%+22.15lE",dNum );
|
||||
/*int nCount =*/ o3tl::sprintf( sBuffer,"%+22.15lE",dNum );
|
||||
sSciNumStrg = OUString::createFromAscii( sBuffer );
|
||||
}
|
||||
|
||||
|
||||
void SbxBasicFormater::InitExp( double _dNewExp )
|
||||
{
|
||||
char sBuffer[ MAX_DOUBLE_BUFFER_LENGTH ];
|
||||
nNumExp = static_cast<short>(_dNewExp);
|
||||
/*int nCount =*/ sprintf( sBuffer,"%+i",nNumExp );
|
||||
sNumExpStrg = OUString::createFromAscii( sBuffer );
|
||||
sNumExpStrg = (nNumExp >= 0 ? std::u16string_view(u"+") : std::u16string_view(u""))
|
||||
+ OUString::number(nNumExp);
|
||||
nExpExp = static_cast<short>(get_number_of_digits( static_cast<double>(nNumExp) ));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue