[Libreoffice-commits] core.git: 4 commits - editeng/source include/editeng include/sal sw/source writerfilter/source

Miklos Vajna vmiklos at collabora.co.uk
Sat Jan 17 04:53:24 PST 2015


 editeng/source/items/frmitems.cxx              |   12 ++++++++++++
 include/editeng/ulspitem.hxx                   |    1 +
 include/sal/log-areas.dox                      |    4 ----
 sw/source/core/docnode/nodedump.cxx            |    6 +++---
 sw/source/filter/ww8/rtfexport.hxx             |    5 +++--
 writerfilter/source/rtftok/rtfdocumentimpl.cxx |    8 ++++----
 writerfilter/source/rtftok/rtfdocumentimpl.hxx |   10 +++++-----
 7 files changed, 28 insertions(+), 18 deletions(-)

New commits:
commit 15db0307fe6429238be72612cccd4a1df5e1e97c
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Sat Jan 17 12:55:56 2015 +0100

    Use std::unique_ptr
    
    Change-Id: I4c72576d36621d863de55b0ab9f0b5a22753446a

diff --git a/sw/source/filter/ww8/rtfexport.hxx b/sw/source/filter/ww8/rtfexport.hxx
index 8045147..44c5c37 100644
--- a/sw/source/filter/ww8/rtfexport.hxx
+++ b/sw/source/filter/ww8/rtfexport.hxx
@@ -20,6 +20,7 @@
 #ifndef INCLUDED_SW_SOURCE_FILTER_WW8_RTFEXPORT_HXX
 #define INCLUDED_SW_SOURCE_FILTER_WW8_RTFEXPORT_HXX
 
+#include <memory>
 #include "wrtww8.hxx"
 
 class RtfAttributeOutput;
@@ -41,12 +42,12 @@ class RtfExport : public MSWordExportBase
     Writer* m_pWriter;
 
     /// Attribute output for document.
-    boost::shared_ptr<RtfAttributeOutput> m_pAttrOutput;
+    std::unique_ptr<RtfAttributeOutput> m_pAttrOutput;
 
     /// Sections/headers/footers
     MSWordSections* m_pSections;
 
-    boost::shared_ptr<RtfSdrExport> m_pSdrExport;
+    std::unique_ptr<RtfSdrExport> m_pSdrExport;
     bool m_bOutOutlineOnly;
 
 public:
commit 22f0862ae782c90306d444d2f5aa253b9e97acd2
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Sat Jan 17 12:55:52 2015 +0100

    writerfilter: turn RTFFieldStatus into a C++11 scoped enumeration
    
    Change-Id: Ibd6a9824651b0e8376b06b1d74c409ba6950a66b

diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 800bb8e..3119040 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -5941,14 +5941,14 @@ RTFError RTFDocumentImpl::popState()
         break;
     case DESTINATION_FIELDINSTRUCTION:
         if (!m_aStates.empty())
-            m_aStates.top().nFieldStatus = FIELD_INSTRUCTION;
+            m_aStates.top().eFieldStatus = RTFFieldStatus::INSTRUCTION;
         break;
     case DESTINATION_FIELDRESULT:
         if (!m_aStates.empty())
-            m_aStates.top().nFieldStatus = FIELD_RESULT;
+            m_aStates.top().eFieldStatus = RTFFieldStatus::RESULT;
         break;
     case DESTINATION_FIELD:
-        if (aState.nFieldStatus == FIELD_INSTRUCTION)
+        if (aState.eFieldStatus == RTFFieldStatus::INSTRUCTION)
             singleChar(cFieldEnd);
         break;
     case DESTINATION_SHAPEPROPERTYVALUEPICT:
@@ -6099,7 +6099,7 @@ RTFParserState::RTFParserState(RTFDocumentImpl* pDocumentImpl)
     : m_pDocumentImpl(pDocumentImpl),
       nInternalState(RTFInternalState::NORMAL),
       nDestinationState(DESTINATION_NORMAL),
-      nFieldStatus(FIELD_NONE),
+      eFieldStatus(RTFFieldStatus::NONE),
       nBorderState(BORDER_NONE),
       aTableSprms(),
       aTableAttributes(),
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.hxx b/writerfilter/source/rtftok/rtfdocumentimpl.hxx
index 30a69d1..1340667 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.hxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.hxx
@@ -76,11 +76,11 @@ enum class RTFBmpStyle
     JPEG
 };
 
-enum RTFFieldStatus
+enum class RTFFieldStatus
 {
-    FIELD_NONE,
-    FIELD_INSTRUCTION,
-    FIELD_RESULT
+    NONE,
+    INSTRUCTION,
+    RESULT
 };
 
 struct TableRowBuffer;
@@ -214,7 +214,7 @@ public:
     RTFDocumentImpl* m_pDocumentImpl;
     RTFInternalState nInternalState;
     RTFDestinationState nDestinationState;
-    RTFFieldStatus nFieldStatus;
+    RTFFieldStatus eFieldStatus;
     RTFBorderState nBorderState;
     // font table, stylesheet table
     RTFSprms aTableSprms;
commit 14dec617ff9bb9937a7d36ff5f63d8ae2350ddbf
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Sat Jan 17 12:55:47 2015 +0100

    sal: multiple use of section label 'svl'
    
    Change-Id: Ia6c178dd9390bf75a08c0d53e6505582a7f5ab4f

diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index ca9482f..2cd8546 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -368,10 +368,6 @@ certain functionality.
 
 @li @c stoc.corerefl - CoreReflection
 
- at section svl
-
- at li @c svl.items
-
 @section VCL
 
 @li @c vcl
commit bd7b2a14604eed191625f3e654cd807933ab059b
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Sat Jan 17 12:55:39 2015 +0100

    Factor out SvxULSpaceItem::dumpAsXml() from sw
    
    Change-Id: I52d7a7aaf304b7d698705cda7d3e70e723811fb2

diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx
index 9ac4f10..8b68df0 100644
--- a/editeng/source/items/frmitems.cxx
+++ b/editeng/source/items/frmitems.cxx
@@ -1083,6 +1083,18 @@ bool SvxULSpaceItem::HasMetrics() const
     return true;
 }
 
+void SvxULSpaceItem::dumpAsXml(xmlTextWriterPtr pWriter) const
+{
+    xmlTextWriterStartElement(pWriter, BAD_CAST("svxULSpaceItem"));
+    xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"), BAD_CAST(OString::number(Which()).getStr()));
+    xmlTextWriterWriteAttribute(pWriter, BAD_CAST("nUpper"), BAD_CAST(OString::number(nUpper).getStr()));
+    xmlTextWriterWriteAttribute(pWriter, BAD_CAST("nLower"), BAD_CAST(OString::number(nLower).getStr()));
+    xmlTextWriterWriteAttribute(pWriter, BAD_CAST("bContext"), BAD_CAST(OString::boolean(bContext).getStr()));
+    xmlTextWriterWriteAttribute(pWriter, BAD_CAST("nPropUpper"), BAD_CAST(OString::number(nPropUpper).getStr()));
+    xmlTextWriterWriteAttribute(pWriter, BAD_CAST("nPropLower"), BAD_CAST(OString::number(nPropLower).getStr()));
+    xmlTextWriterEndElement(pWriter);
+}
+
 // class SvxPrintItem ----------------------------------------------------
 
 SfxPoolItem* SvxPrintItem::Clone( SfxItemPool* ) const
diff --git a/include/editeng/ulspitem.hxx b/include/editeng/ulspitem.hxx
index c61cb74..58aade9 100644
--- a/include/editeng/ulspitem.hxx
+++ b/include/editeng/ulspitem.hxx
@@ -78,6 +78,7 @@ public:
     bool GetContext() const { return bContext; }
     sal_uInt16 GetPropUpper() const { return nPropUpper; }
     sal_uInt16 GetPropLower() const { return nPropLower; }
+    void dumpAsXml(struct _xmlTextWriter* pWriter) const;
 };
 
 inline SvxULSpaceItem &SvxULSpaceItem::operator=( const SvxULSpaceItem &rCpy )
diff --git a/sw/source/core/docnode/nodedump.cxx b/sw/source/core/docnode/nodedump.cxx
index d63b82a..5822f89 100644
--- a/sw/source/core/docnode/nodedump.cxx
+++ b/sw/source/core/docnode/nodedump.cxx
@@ -493,6 +493,9 @@ void lcl_dumpSfxItemSet(WriterHelper& writer, const SfxItemSet* pSet)
             case RES_LR_SPACE:
                 static_cast<const SvxLRSpaceItem*>(pItem)->dumpAsXml(writer);
                 break;
+            case RES_UL_SPACE:
+                static_cast<const SvxULSpaceItem*>(pItem)->dumpAsXml(writer);
+                break;
             default: bDone = false; break;
         }
         if (bDone)
@@ -507,9 +510,6 @@ void lcl_dumpSfxItemSet(WriterHelper& writer, const SfxItemSet* pSet)
         boost::optional<OString> oValue;
         switch (pItem->Which())
         {
-            case RES_UL_SPACE:
-                pWhich = "upper-lower space";
-                break;
             case RES_SHADOW:
                 pWhich = "shadow";
                 break;


More information about the Libreoffice-commits mailing list