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

Miklos Vajna vmiklos at collabora.co.uk
Wed May 7 03:09:32 PDT 2014


 sw/source/core/docnode/nodedump.cxx |   14 ++++++++++++++
 sw/source/core/layout/atrfrm.cxx    |    2 +-
 2 files changed, 15 insertions(+), 1 deletion(-)

New commits:
commit 0c5c0cd534b12254d71c874d80ee8d4637ff2d0b
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Wed May 7 11:34:53 2014 +0200

    SwFrmFmts::dumpAsXml: dump which id
    
    Change-Id: I66d7c8444c1a89c21ea2ce5e42fb3cd97fd39b7c

diff --git a/sw/source/core/docnode/nodedump.cxx b/sw/source/core/docnode/nodedump.cxx
index 6a53433..31d9821 100644
--- a/sw/source/core/docnode/nodedump.cxx
+++ b/sw/source/core/docnode/nodedump.cxx
@@ -527,6 +527,20 @@ void SwFrmFmts::dumpAsXml(xmlTextWriterPtr w)
             OString aName = OUStringToOString(pFmt->GetName(), RTL_TEXTENCODING_UTF8);
             writer.writeFormatAttribute("name", "%s", BAD_CAST(aName.getStr()));
 
+            writer.writeFormatAttribute("whichId", TMP_FORMAT, pFmt->Which());
+            const char* pWhich = 0;
+            switch (pFmt->Which())
+            {
+            case RES_FLYFRMFMT:
+                pWhich = "fly frame format";
+                break;
+            case RES_DRAWFRMFMT:
+                pWhich = "draw frame format";
+                break;
+            }
+            if (pWhich)
+                writer.writeFormatAttribute("which", "%s", BAD_CAST(pWhich));
+
             lcl_dumpSfxItemSet(writer, &pFmt->GetAttrSet());
             writer.endElement();
         }
commit 3273d800cd50e6f80b629262198f3508fb5bbc7d
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Wed May 7 10:29:31 2014 +0200

    SwFmtCntnt::operator==: most probably bool was intended here
    
    The code here counted the numerical XOR of the two pointer values, but
    most probably the logical XOR was intended (in case only we or only they
    have a node index, then we are not equal).
    
    Change-Id: I261b8c4b498eb860fa0e0fa72ba5a5e0758064e6

diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx
index 428a906..558ddbd 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -560,7 +560,7 @@ void SwFmtCntnt::SetNewCntntIdx( const SwNodeIndex *pIdx )
 bool SwFmtCntnt::operator==( const SfxPoolItem& rAttr ) const
 {
     OSL_ENSURE( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" );
-    if( (sal_IntPtr)pStartNode ^ (sal_IntPtr)((SwFmtCntnt&)rAttr).pStartNode )
+    if( (bool)pStartNode ^ (bool)((SwFmtCntnt&)rAttr).pStartNode )
         return false;
     if( pStartNode )
         return ( *pStartNode == *((SwFmtCntnt&)rAttr).GetCntntIdx() );


More information about the Libreoffice-commits mailing list