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

Miklos Vajna vmiklos at collabora.co.uk
Thu Nov 28 08:08:06 PST 2013


 sw/source/core/docnode/nodedump.cxx          |    2 +
 sw/source/filter/ww8/docxattributeoutput.cxx |   29 +++++++++++++++++++--------
 2 files changed, 23 insertions(+), 8 deletions(-)

New commits:
commit 6c992a54b662d39c860784aff7357b163db63dfb
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Thu Nov 28 16:16:22 2013 +0100

    fdo#69636 DOCX export: fix VML export of vert=vert270 drawingML textframes
    
    Change-Id: I2fc01c1f22dcd55c2fc4d4791c5571ff2861d0cc

diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 2a8205c..419d745 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -330,17 +330,30 @@ bool lcl_checkFrameBtlr(SwNode* pStartNode, sax_fastparser::FastAttributeList* p
         return false;
 
     SwTxtNode* pTxtNode = static_cast<SwTxtNode*>(pStartNode);
-    if (!pTxtNode->HasHints())
-        return false;
 
-    SwTxtAttr* pTxtAttr = pTxtNode->GetTxtAttrAt(0, RES_TXTATR_AUTOFMT);
+    const SfxPoolItem* pItem;
+    bool bItemSet = false;
+    if (pTxtNode->HasSwAttrSet())
+    {
+        const SwAttrSet& rAttrSet = pTxtNode->GetSwAttrSet();
+        bItemSet = rAttrSet.GetItemState(RES_CHRATR_ROTATE, true, &pItem) == SFX_ITEM_SET;
+    }
 
-    if (!pTxtAttr || pTxtAttr->Which() != RES_TXTATR_AUTOFMT)
-        return false;
+    if (!bItemSet)
+    {
+        if (!pTxtNode->HasHints())
+            return false;
 
-    boost::shared_ptr<SfxItemSet> pItemSet = pTxtAttr->GetAutoFmt().GetStyleHandle();
-    const SfxPoolItem* pItem;
-    if (pItemSet->GetItemState(RES_CHRATR_ROTATE, true, &pItem) == SFX_ITEM_SET)
+        SwTxtAttr* pTxtAttr = pTxtNode->GetTxtAttrAt(0, RES_TXTATR_AUTOFMT);
+
+        if (!pTxtAttr || pTxtAttr->Which() != RES_TXTATR_AUTOFMT)
+            return false;
+
+        boost::shared_ptr<SfxItemSet> pItemSet = pTxtAttr->GetAutoFmt().GetStyleHandle();
+        bItemSet = pItemSet->GetItemState(RES_CHRATR_ROTATE, true, &pItem) == SFX_ITEM_SET;
+    }
+
+    if (bItemSet)
     {
         const SvxCharRotateItem& rCharRotate = static_cast<const SvxCharRotateItem&>(*pItem);
         if (rCharRotate.GetValue() == 900)
commit 95034bafdaecc9aaad556e6c3e47e74b9b2add5f
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Thu Nov 28 15:51:19 2013 +0100

    sw doc model dump: handle SvxCharRotateItem
    
    Change-Id: I981867bcf4ec5fa6be866b19f82805ab4ff9623f

diff --git a/sw/source/core/docnode/nodedump.cxx b/sw/source/core/docnode/nodedump.cxx
index cd0bb5e2..a57e885 100644
--- a/sw/source/core/docnode/nodedump.cxx
+++ b/sw/source/core/docnode/nodedump.cxx
@@ -22,6 +22,7 @@
 #include <swmodule.hxx>
 #include <svl/itemiter.hxx>
 #include <svl/intitem.hxx>
+#include <editeng/charrotateitem.hxx>
 #include <tools/datetimeutils.hxx>
 
 #include <libxml/encoding.h>
@@ -305,6 +306,7 @@ void lcl_dumpSfxItemSet(WriterHelper& writer, const SfxItemSet* pSet)
             case RES_CHRATR_CTL_POSTURE: pWhich = "character ctl posture"; break;
             case RES_CHRATR_CTL_WEIGHT: pWhich = "character ctl weight"; break;
             case RES_CHRATR_RSID: pWhich = "character rsid"; break;
+            case RES_CHRATR_ROTATE: pWhich = "character rotation"; oValue = OString::number(static_cast<const SvxCharRotateItem*>(pItem)->GetValue()); break;
             case RES_PARATR_OUTLINELEVEL: pWhich = "paragraph outline level"; oValue = OString::number(static_cast<const SfxUInt16Item*>(pItem)->GetValue()); break;
             case RES_PARATR_NUMRULE: pWhich = "paragraph numbering rule"; oValue = OUStringToOString(static_cast<const SwNumRuleItem*>(pItem)->GetValue(), RTL_TEXTENCODING_UTF8); break;
         }


More information about the Libreoffice-commits mailing list