sw/source/core/fields/docufld.cxx                 |   12 ++----------
 sw/source/filter/ww8/docxattributeoutput.cxx      |    2 +-
 sw/source/filter/ww8/docxattributeoutput.hxx      |    1 +
 writerfilter/inc/dmapper/CommentProperties.hxx    |    4 ++--
 writerfilter/source/dmapper/DomainMapper_Impl.cxx |    6 +++---
 5 files changed, 9 insertions(+), 16 deletions(-)

New commits:
commit ce3d8f7e082afbc4a3139c723cb4533579523fe2
Author:     Paris Oplopoios <paris.oplopo...@collabora.com>
AuthorDate: Thu Jan 19 18:52:41 2023 +0200
Commit:     Miklos Vajna <vmik...@collabora.com>
CommitDate: Mon Feb 13 07:58:38 2023 +0000

    Fix typo, improve code readability, fix comment
    
    Change-Id: I7221222e8c84ee40e4edaec5325565dae4193aff
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145825
    Tested-by: Jenkins
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>

diff --git a/sw/source/core/fields/docufld.cxx 
b/sw/source/core/fields/docufld.cxx
index d9e998ad41f4..09ffdc4437e3 100644
--- a/sw/source/core/fields/docufld.cxx
+++ b/sw/source/core/fields/docufld.cxx
@@ -1913,20 +1913,12 @@ bool SwPostItField::QueryValue( uno::Any& rAny, 
sal_uInt16 nWhichId ) const
         break;
     case FIELD_PROP_PAR5:
         {
-            OUString sTemp;
-            std::stringstream ss;
-            ss << std::uppercase << std::hex << m_nParentId;
-            sTemp = OUString::createFromAscii(ss.str().c_str());
-            rAny <<= sTemp;
+            rAny <<= OUString(OUString::number(m_nParentId, 
16).toAsciiUpperCase());
         }
         break;
     case FIELD_PROP_PAR6:
         {
-            OUString sTemp;
-            std::stringstream ss;
-            ss << std::uppercase << std::hex << m_nPostItId;
-            sTemp = OUString::createFromAscii(ss.str().c_str());
-            rAny <<= sTemp;
+            rAny <<= OUString(OUString::number(m_nPostItId, 
16).toAsciiUpperCase());
         }
         break;
     default:
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index 528033e7b3b7..e40d6c0b3db3 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -8892,7 +8892,7 @@ void DocxAttributeOutput::WritePostItFieldsResolved()
             if (data.parentStatus == ParentStatus::HasParent)
             {
                 // Since parent fields have been resolved first, they should 
already have an id
-                auto& aParentFieldData = 
m_postitFields[data.parentIndex].second;
+                const PostItDOCXData& aParentFieldData = 
m_postitFields[data.parentIndex].second;
                 sParentId = NumberToHexBinary(aParentFieldData.lastParaId);
             }
             else
diff --git a/sw/source/filter/ww8/docxattributeoutput.hxx 
b/sw/source/filter/ww8/docxattributeoutput.hxx
index f61765d62832..29abf6badce8 100644
--- a/sw/source/filter/ww8/docxattributeoutput.hxx
+++ b/sw/source/filter/ww8/docxattributeoutput.hxx
@@ -982,6 +982,7 @@ private:
     std::vector<PostponedDrawing> m_aPostponedActiveXControls;
     const SwField* m_PendingPlaceholder;
 
+    /// Used to store the parent status of a PostIt (parent/child/neither)
     enum class ParentStatus
     {
         None,
diff --git a/writerfilter/inc/dmapper/CommentProperties.hxx 
b/writerfilter/inc/dmapper/CommentProperties.hxx
index fe66cceed3f8..c554418108c4 100644
--- a/writerfilter/inc/dmapper/CommentProperties.hxx
+++ b/writerfilter/inc/dmapper/CommentProperties.hxx
@@ -16,8 +16,8 @@ namespace writerfilter
 /**
  A container for the extended comment properties linked to the last paragraph 
of a comment
 
- Corresponds to the data available in w5:commentEx elements from 
commentsExtended stream
- ([MS-DOCX]): resolved state and parent (referring to comment that this one 
answers to; TODO).
+ Corresponds to the data available in w15:commentEx elements from 
commentsExtended stream
+ ([MS-DOCX]): resolved state and parent (referring to comment that this one 
answers to).
 
  @since 7.2
 */
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 7f4c800b1002..46260200d7a1 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -3838,10 +3838,10 @@ void DomainMapper_Impl::PopAnnotation()
     try
     {
         if (m_bAnnotationResolved)
-            m_xAnnotationField->setPropertyValue("Resolved", 
css::uno::Any(true));
+            m_xAnnotationField->setPropertyValue("Resolved", uno::Any(true));
 
-        m_xAnnotationField->setPropertyValue("ParaIdParent", 
css::uno::Any(m_sAnnotationParent));
-        m_xAnnotationField->setPropertyValue("ParaId", 
css::uno::Any(m_sAnnotationImportedParaId));
+        m_xAnnotationField->setPropertyValue("ParaIdParent", 
uno::Any(m_sAnnotationParent));
+        m_xAnnotationField->setPropertyValue("ParaId", 
uno::Any(m_sAnnotationImportedParaId));
 
         // See if the annotation will be a single position or a range.
         if (m_nAnnotationId == -1 || 
!m_aAnnotationPositions[m_nAnnotationId].m_xStart.is() || 
!m_aAnnotationPositions[m_nAnnotationId].m_xEnd.is())

Reply via email to