summaryrefslogtreecommitdiff
path: root/lotuswordpro
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2022-11-05 16:00:48 +0100
committerStephan Bergmann <sbergman@redhat.com>2022-11-06 01:14:44 +0100
commit34cecc1f9c5dd41473a84be051d56b37118698aa (patch)
treea2f6300a26264e12b60a087c5b4888ffa9d133ad /lotuswordpro
parentb6fbcac6f6933858db53a54e7505ff3a83465960 (diff)
-Werror,-Wdeprecated-declarations (sprintf, macOS 13 SDK): lotuswordpro
Change-Id: I6b9707c1f416eb1ab890ff0d783151066cf695d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142329 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'lotuswordpro')
-rw-r--r--lotuswordpro/source/filter/bencont.cxx13
-rw-r--r--lotuswordpro/source/filter/lwpgrfobj.cxx12
-rw-r--r--lotuswordpro/source/filter/xfilter/xfcolor.cxx4
3 files changed, 13 insertions, 16 deletions
diff --git a/lotuswordpro/source/filter/bencont.cxx b/lotuswordpro/source/filter/bencont.cxx
index b5648a64b3ec..60e644ce212d 100644
--- a/lotuswordpro/source/filter/bencont.cxx
+++ b/lotuswordpro/source/filter/bencont.cxx
@@ -55,9 +55,9 @@
************************************************************************/
#include "first.hxx"
#include "tocread.hxx"
-#include <stdio.h>
#include <algorithm>
#include <osl/diagnose.h>
+#include <rtl/string.hxx>
namespace OpenStormBento
{
@@ -277,16 +277,13 @@ std::vector<sal_uInt8> LtcBenContainer::GetGraphicData(const char *pObjectName)
return aData;
}
// construct the string of property name
- char sSName[64]="";
- char sDName[64]="";
-
- sprintf(sSName, "%s-S", pObjectName);
- sprintf(sDName, "%s-D", pObjectName);
+ OString sSName=OString::Concat(pObjectName) + "-S";
+ OString sDName=OString::Concat(pObjectName) + "-D";
/* traverse the found properties and construct the stream vectors */
// get S&D's stream and merge them together
- std::unique_ptr<SvStream> xS(FindValueStreamWithPropertyName(sSName));
- std::unique_ptr<SvStream> xD(FindValueStreamWithPropertyName(sDName));
+ std::unique_ptr<SvStream> xS(FindValueStreamWithPropertyName(sSName.getStr()));
+ std::unique_ptr<SvStream> xD(FindValueStreamWithPropertyName(sDName.getStr()));
sal_uInt64 nDLen = 0;
if (xD)
diff --git a/lotuswordpro/source/filter/lwpgrfobj.cxx b/lotuswordpro/source/filter/lwpgrfobj.cxx
index 76c8aa76c52a..3c8f3d03a381 100644
--- a/lotuswordpro/source/filter/lwpgrfobj.cxx
+++ b/lotuswordpro/source/filter/lwpgrfobj.cxx
@@ -58,9 +58,8 @@
* @file
* For LWP filter architecture prototype
*/
-#include <stdio.h>
-
#include <memory>
+#include <string_view>
#include <lwpfilehdr.hxx>
#include "lwpgrfobj.hxx"
@@ -69,6 +68,8 @@
#include <lwpglobalmgr.hxx>
#include <o3tl/numeric.hxx>
+#include <o3tl/sprintf.hxx>
+#include <rtl/string.hxx>
#include "lwpframelayout.hxx"
#include <xfilter/xfframe.hxx>
@@ -314,7 +315,7 @@ void LwpGraphicObject::GetBentoNamebyID(LwpObjectID const & rMyID, std::string&
sal_uInt32 nLow = rMyID.GetLow();
char pTempStr[32];
rName = std::string("Gr");
- sprintf(pTempStr, "%X,%" SAL_PRIXUINT32, nHigh, nLow);
+ o3tl::sprintf(pTempStr, "%X,%" SAL_PRIXUINT32, nHigh, nLow);
rName.append(pTempStr);
}
@@ -369,11 +370,10 @@ sal_uInt32 LwpGraphicObject::GetGrafData(std::unique_ptr<sal_uInt8[]>& pGrafData
std::string aGrfObjName;
GetBentoNamebyID(rMyID, aGrfObjName);
- char sDName[64]="";
- sprintf(sDName, "%s-D", aGrfObjName.c_str());
+ OString sDName=OString::Concat(std::string_view(aGrfObjName)) + "-D";
// get bento stream by the name
- pGrafStream = pBentoContainer->FindValueStreamWithPropertyName(sDName);
+ pGrafStream = pBentoContainer->FindValueStreamWithPropertyName(sDName.getStr());
std::unique_ptr<SvMemoryStream> pMemGrafStream(static_cast<SvMemoryStream*>(pGrafStream));
diff --git a/lotuswordpro/source/filter/xfilter/xfcolor.cxx b/lotuswordpro/source/filter/xfilter/xfcolor.cxx
index c30e35341f3e..7b5fd8655361 100644
--- a/lotuswordpro/source/filter/xfilter/xfcolor.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfcolor.cxx
@@ -57,13 +57,13 @@
* @file
* Color object to serial to xml filter.
************************************************************************/
-#include <stdio.h>
+#include <o3tl/sprintf.hxx>
#include <xfilter/xfcolor.hxx>
OUString XFColor::ToString() const
{
char buf[8] = {};
- sprintf(buf,"#%2x%2x%2x",m_nRed, m_nGreen, m_nBlue);
+ o3tl::sprintf(buf,"#%2x%2x%2x",m_nRed, m_nGreen, m_nBlue);
for( int i=1; i<7;i++ )
{
if( buf[i] == ' ' )