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

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Wed Jul 7 20:12:17 UTC 2021


 sw/source/filter/ww8/docxattributeoutput.cxx    |    5 +++--
 xmloff/source/transform/ActionMapTypesOASIS.hxx |    2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

New commits:
commit f62d2de95c3553e0615d3485645bf5061b97d520
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Jul 7 17:33:06 2021 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Jul 7 22:11:59 2021 +0200

    WaE: Wodr type 'ActionMapTypesOOo' violates the C++ ODR
    
    Change-Id: If0b83e62e6c9905b1ae391fbed7c43b379dce5db
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118586
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/xmloff/source/transform/ActionMapTypesOASIS.hxx b/xmloff/source/transform/ActionMapTypesOASIS.hxx
index 1be989b340df..eb9753ab4e9d 100644
--- a/xmloff/source/transform/ActionMapTypesOASIS.hxx
+++ b/xmloff/source/transform/ActionMapTypesOASIS.hxx
@@ -19,7 +19,7 @@
 
 #pragma once
 
-enum ActionMapTypesOOo
+enum ActionMapTypesOasis
 {
     PROP_OASIS_GRAPHIC_ATTR_ACTIONS,
     PROP_OASIS_DRAWING_PAGE_ATTR_ACTIONS,
commit ed2d309b5ccdaa1a58f37f70a00ad74452e163cd
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Jul 7 17:12:50 2021 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Jul 7 22:11:44 2021 +0200

    make code a little clearer to indicate that pAnchor isn't leaked
    
    Change-Id: I656a8c8506d7905ece3ff1b0547c82c42b234ab6
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118585
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index bbf4994a1d05..f5978957635c 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -6450,7 +6450,8 @@ void DocxAttributeOutput::WriteTextBox(uno::Reference<drawing::XShape> xShape)
     SwFrameFormat* pTextBox = SwTextBoxHelper::getOtherTextBoxFormat(xShape);
     assert(pTextBox);
     const SwPosition* pAnchor = nullptr;
-    if (pTextBox->GetAnchor().GetAnchorId() == RndStdIds::FLY_AT_PAGE) //tdf135711
+    const bool bFlyAtPage = pTextBox->GetAnchor().GetAnchorId() == RndStdIds::FLY_AT_PAGE;
+    if (bFlyAtPage) //tdf135711
     {
         auto pNdIdx = pTextBox->GetContent().GetContentIdx();
         if (pNdIdx) //Is that possible it is null?
@@ -6465,7 +6466,7 @@ void DocxAttributeOutput::WriteTextBox(uno::Reference<drawing::XShape> xShape)
     {
         ww8::Frame aFrame(*pTextBox, *pAnchor);
         m_rExport.SdrExporter().writeDMLTextFrame(&aFrame, m_anchorId++, /*bTextBoxOnly=*/true);
-        if (pTextBox->GetAnchor().GetAnchorId() == RndStdIds::FLY_AT_PAGE)
+        if (bFlyAtPage)
         {
             delete pAnchor;
         }


More information about the Libreoffice-commits mailing list