[Libreoffice-commits] core.git: sw/source

Pranav Kant pranavk at collabora.co.uk
Fri Jan 27 15:15:15 UTC 2017


 sw/source/uibase/docvw/PostItMgr.cxx |    4 ++--
 sw/source/uibase/uno/unotxdoc.cxx    |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 1eef075ad555046d840f1e867ce8a259a5ffc01b
Author: Pranav Kant <pranavk at collabora.co.uk>
Date:   Fri Jan 27 19:43:23 2017 +0530

    Fix android build
    
    Change-Id: I3a39b7adc44a61f1bd4379c2a46e559ad12e7184

diff --git a/sw/source/uibase/docvw/PostItMgr.cxx b/sw/source/uibase/docvw/PostItMgr.cxx
index 450f14c1f..9c4f7d7 100644
--- a/sw/source/uibase/docvw/PostItMgr.cxx
+++ b/sw/source/uibase/docvw/PostItMgr.cxx
@@ -152,7 +152,7 @@ namespace {
             sw::annotation::SwAnnotationWin* pWin = static_cast<sw::annotation::SwAnnotationWin*>((pItem)->pPostIt.get());
 
             const SwPostItField* pField = pWin->GetPostItField();
-            const std::string aAnchorPos = std::to_string(pWin->GetAnchorPos().X()) + ", " + std::to_string(pWin->GetAnchorPos().Y());
+            const OString aAnchorPos = OString::number(pWin->GetAnchorPos().X()) + ", " + OString::number(pWin->GetAnchorPos().Y());
             std::vector<OString> aRects;
             for (const basegfx::B2DRange& aRange : pWin->GetAnnotationTextRanges())
             {
@@ -166,7 +166,7 @@ namespace {
             aAnnotation.put("author", pField->GetPar1().toUtf8().getStr());
             aAnnotation.put("text", pField->GetPar2().toUtf8().getStr());
             aAnnotation.put("dateTime", utl::toISO8601(pField->GetDateTime().GetUNODateTime()));
-            aAnnotation.put("anchorPos", aAnchorPos.c_str());
+            aAnnotation.put("anchorPos", aAnchorPos.getStr());
             aAnnotation.put("textRange", sRects.getStr());
         }
 
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx
index 549b150..133fc69 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -3194,7 +3194,7 @@ OUString SwXTextDocument::getPostIts()
         sw::annotation::SwAnnotationWin* pWin = static_cast<sw::annotation::SwAnnotationWin*>((*i)->pPostIt.get());
 
         const SwPostItField* pField = pWin->GetPostItField();
-        const std::string aAnchorPos = std::to_string(pWin->GetAnchorPos().X()) + ", " + std::to_string(pWin->GetAnchorPos().Y());
+        const OString aAnchorPos = OString::number(pWin->GetAnchorPos().X()) + ", " + OString::number(pWin->GetAnchorPos().Y());
         std::vector<OString> aRects;
         for (const basegfx::B2DRange& aRange : pWin->GetAnnotationTextRanges())
         {
@@ -3209,7 +3209,7 @@ OUString SwXTextDocument::getPostIts()
         aAnnotation.put("author", pField->GetPar1().toUtf8().getStr());
         aAnnotation.put("text", pField->GetPar2().toUtf8().getStr());
         aAnnotation.put("dateTime", utl::toISO8601(pField->GetDateTime().GetUNODateTime()));
-        aAnnotation.put("anchorPos", aAnchorPos.c_str());
+        aAnnotation.put("anchorPos", aAnchorPos.getStr());
         aAnnotation.put("textRange", sRects.getStr());
 
         aAnnotations.push_back(std::make_pair("", aAnnotation));


More information about the Libreoffice-commits mailing list