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

Miklos Vajna vmiklos at collabora.co.uk
Mon Dec 15 00:01:36 PST 2014


 sw/inc/paratr.hxx                             |    2 ++
 sw/source/core/doc/textboxhelper.cxx          |    3 ---
 sw/source/core/docnode/nodedump.cxx           |    4 +++-
 sw/source/core/para/paratr.cxx                |    9 +++++++++
 sw/source/filter/ww8/docxsdrexport.cxx        |    6 ------
 sw/source/filter/ww8/docxtablestyleexport.cxx |    1 -
 sw/source/filter/ww8/rtfattributeoutput.cxx   |   10 ----------
 sw/source/filter/ww8/rtfexport.cxx            |    8 --------
 writerfilter/source/filter/RtfFilter.cxx      |    1 -
 9 files changed, 14 insertions(+), 30 deletions(-)

New commits:
commit 0f18e9de72c9e2ba7507a881bbf279eab420cdbc
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Mon Dec 15 08:55:32 2014 +0100

    Unused includes
    
    Change-Id: I84e475a64cf09e4eeea524b73f8febf7f0a1a46b

diff --git a/sw/source/core/doc/textboxhelper.cxx b/sw/source/core/doc/textboxhelper.cxx
index d0c99df..d447b5b 100644
--- a/sw/source/core/doc/textboxhelper.cxx
+++ b/sw/source/core/doc/textboxhelper.cxx
@@ -26,9 +26,7 @@
 #include <dflyobj.hxx>
 #include <mvsave.hxx>
 #include <sortedobjs.hxx>
-#include <anchoredobject.hxx>
 #include <cntfrm.hxx>
-#include <docary.hxx>
 
 #include <editeng/unoprnms.hxx>
 #include <editeng/charrotateitem.hxx>
@@ -38,7 +36,6 @@
 #include <comphelper/sequenceashashmap.hxx>
 
 #include <com/sun/star/document/XActionLockable.hpp>
-#include <com/sun/star/table/BorderLine2.hpp>
 #include <com/sun/star/text/SizeType.hpp>
 #include <com/sun/star/text/TextContentAnchorType.hpp>
 #include <com/sun/star/text/WrapTextMode.hpp>
diff --git a/sw/source/filter/ww8/docxsdrexport.cxx b/sw/source/filter/ww8/docxsdrexport.cxx
index 3e86967..9b05166 100644
--- a/sw/source/filter/ww8/docxsdrexport.cxx
+++ b/sw/source/filter/ww8/docxsdrexport.cxx
@@ -10,10 +10,6 @@
 #include <com/sun/star/drawing/PointSequenceSequence.hpp>
 #include <com/sun/star/xml/sax/XSAXSerializable.hpp>
 #include <com/sun/star/xml/sax/Writer.hpp>
-#include <editeng/lrspitem.hxx>
-#include <editeng/ulspitem.hxx>
-#include <editeng/opaqitem.hxx>
-#include <editeng/shaditem.hxx>
 #include <editeng/unoprnms.hxx>
 #include <editeng/charrotateitem.hxx>
 #include <svx/svdogrp.hxx>
@@ -21,14 +17,12 @@
 #include <oox/export/utils.hxx>
 #include <oox/export/vmlexport.hxx>
 #include <oox/token/properties.hxx>
-#include <frmfmt.hxx>
 #include <textboxhelper.hxx>
 #include <fmtanchr.hxx>
 #include <fmtsrnd.hxx>
 #include <fmtcntnt.hxx>
 #include <ndtxt.hxx>
 #include <txatbase.hxx>
-#include <fmtautofmt.hxx>
 #include <fmtfsize.hxx>
 #include <drawdoc.hxx>
 #include <docxsdrexport.hxx>
diff --git a/sw/source/filter/ww8/docxtablestyleexport.cxx b/sw/source/filter/ww8/docxtablestyleexport.cxx
index 23757dd..53194d1 100644
--- a/sw/source/filter/ww8/docxtablestyleexport.cxx
+++ b/sw/source/filter/ww8/docxtablestyleexport.cxx
@@ -13,7 +13,6 @@
 #include <docsh.hxx>
 #include <oox/token/tokens.hxx>
 #include <comphelper/sequenceashashmap.hxx>
-#include <boost/optional.hpp>
 
 using namespace com::sun::star;
 using namespace oox;
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index ea0bd99..d6e6115 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -23,15 +23,12 @@
 #include "writerwordglue.hxx"
 #include "ww8par.hxx"
 #include "fmtcntnt.hxx"
-#include "fchrfmt.hxx"
 #include <svtools/rtfkeywd.hxx>
 #include <editeng/fontitem.hxx>
 #include <editeng/tstpitem.hxx>
 #include <editeng/adjustitem.hxx>
 #include <editeng/spltitem.hxx>
 #include <editeng/widwitem.hxx>
-#include <editeng/keepitem.hxx>
-#include <editeng/brushitem.hxx>
 #include <editeng/postitem.hxx>
 #include <editeng/wghtitem.hxx>
 #include <editeng/kernitem.hxx>
@@ -44,8 +41,6 @@
 #include <editeng/fhgtitem.hxx>
 #include <editeng/colritem.hxx>
 #include <editeng/hyphenzoneitem.hxx>
-#include <editeng/ulspitem.hxx>
-#include <editeng/boxitem.hxx>
 #include <editeng/contouritem.hxx>
 #include <editeng/shdditem.hxx>
 #include <editeng/autokernitem.hxx>
@@ -55,11 +50,8 @@
 #include <editeng/charrotateitem.hxx>
 #include <editeng/charreliefitem.hxx>
 #include <editeng/paravertalignitem.hxx>
-#include <editeng/frmdiritem.hxx>
 #include <editeng/blinkitem.hxx>
 #include <editeng/charhiddenitem.hxx>
-#include <editeng/shaditem.hxx>
-#include <editeng/opaqitem.hxx>
 #include <svx/fmglob.hxx>
 #include <svx/svdouno.hxx>
 #include <filter/msfilter/rtfutil.hxx>
@@ -68,8 +60,6 @@
 #include <drawdoc.hxx>
 #include <docufld.hxx>
 #include <fmtclds.hxx>
-#include <fmtinfmt.hxx>
-#include <fmtftn.hxx>
 #include <fmtrowsplt.hxx>
 #include <fmtline.hxx>
 #include <fmtanchr.hxx>
diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx
index fc7acc1..7cdd3da 100644
--- a/sw/source/filter/ww8/rtfexport.cxx
+++ b/sw/source/filter/ww8/rtfexport.cxx
@@ -27,19 +27,12 @@
 #include <viewopt.hxx>
 #include <ndtxt.hxx>
 #include <fmtpdsc.hxx>
-#include <section.hxx>
-#include <pagedesc.hxx>
 #include <ftninfo.hxx>
 #include <fmthdft.hxx>
 #include <editeng/colritem.hxx>
 #include <editeng/udlnitem.hxx>
-#include <editeng/boxitem.hxx>
-#include <editeng/brushitem.hxx>
 #include <editeng/fontitem.hxx>
-#include <editeng/shaditem.hxx>
-#include <editeng/ulspitem.hxx>
 #include <editeng/paperinf.hxx>
-#include <editeng/protitem.hxx>
 #include <numrule.hxx>
 #include <lineinfo.hxx>
 #include <swmodule.hxx>
@@ -49,7 +42,6 @@
 #include <svtools/rtfkeywd.hxx>
 #include <filter/msfilter/rtfutil.hxx>
 #include <unotools/docinfohelper.hxx>
-#include <docary.hxx>
 #if OSL_DEBUG_LEVEL > 1
 #include <iostream>
 #endif
diff --git a/writerfilter/source/filter/RtfFilter.cxx b/writerfilter/source/filter/RtfFilter.cxx
index aaa533c..1eba5b6 100644
--- a/writerfilter/source/filter/RtfFilter.cxx
+++ b/writerfilter/source/filter/RtfFilter.cxx
@@ -26,7 +26,6 @@
 #include <rtftok/RTFDocument.hxx>
 #include <com/sun/star/io/WrongFormatException.hpp>
 #include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
-#include <com/sun/star/text/XTextRange.hpp>
 #include <osl/diagnose.h>
 #include <unotools/localfilehelper.hxx>
 #include <unotools/ucbstreamhelper.hxx>
commit a741f682a74a2b43310edf606d8ed12ea0436151
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Mon Dec 15 08:55:25 2014 +0100

    Factor out SwNumRuleItem::dumpAsXml() from nodedump
    
    Change-Id: I893d358f8a842e19248cfeb151170ed2872c3dae

diff --git a/sw/inc/paratr.hxx b/sw/inc/paratr.hxx
index 53492fa..b94acc8 100644
--- a/sw/inc/paratr.hxx
+++ b/sw/inc/paratr.hxx
@@ -168,6 +168,8 @@ public:
 
     virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId ) const SAL_OVERRIDE;
     virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId ) SAL_OVERRIDE;
+
+    void dumpAsXml(struct _xmlTextWriter* pWriter) const;
 };
 
 class SwParaConnectBorderItem : public SfxBoolItem
diff --git a/sw/source/core/docnode/nodedump.cxx b/sw/source/core/docnode/nodedump.cxx
index 7104951..877a41f 100644
--- a/sw/source/core/docnode/nodedump.cxx
+++ b/sw/source/core/docnode/nodedump.cxx
@@ -410,6 +410,9 @@ void lcl_dumpSfxItemSet(WriterHelper& writer, const SfxItemSet* pSet)
             case RES_PARATR_OUTLINELEVEL:
                 static_cast<const SfxUInt16Item*>(pItem)->dumpAsXml(writer);
                 break;
+            case RES_PARATR_NUMRULE:
+                static_cast<const SwNumRuleItem*>(pItem)->dumpAsXml(writer);
+                break;
             default: bDone = false; break;
         }
         if (bDone)
@@ -424,7 +427,6 @@ void lcl_dumpSfxItemSet(WriterHelper& writer, const SfxItemSet* pSet)
         boost::optional<OString> oValue;
         switch (pItem->Which())
         {
-            case RES_PARATR_NUMRULE: pWhich = "paragraph numbering rule"; oValue = OUStringToOString(static_cast<const SwNumRuleItem*>(pItem)->GetValue(), RTL_TEXTENCODING_UTF8); break;
             case RES_CHRATR_FONT: pWhich = "character font"; oValue = OUStringToOString(static_cast<const SvxFontItem*>(pItem)->GetFamilyName(), RTL_TEXTENCODING_UTF8); break;
             case RES_CHRATR_BACKGROUND: pWhich = "character background"; break;
             case RES_CHRATR_CTL_FONT: pWhich = "character ctl font"; break;
diff --git a/sw/source/core/para/paratr.cxx b/sw/source/core/para/paratr.cxx
index 507784f..9459002 100644
--- a/sw/source/core/para/paratr.cxx
+++ b/sw/source/core/para/paratr.cxx
@@ -39,6 +39,7 @@
 #include "paratr.hxx"
 #include "charfmt.hxx"
 #include "cmdid.h"
+#include <libxml/xmlwriter.h>
 
 using namespace ::com::sun::star;
 
@@ -237,6 +238,14 @@ bool    SwNumRuleItem::PutValue( const uno::Any& rVal, sal_uInt8 )
     return true;
 }
 
+void SwNumRuleItem::dumpAsXml(xmlTextWriterPtr pWriter) const
+{
+    xmlTextWriterStartElement(pWriter, BAD_CAST("swNumRuleItem"));
+    xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"), BAD_CAST(OString::number(Which()).getStr()));
+    xmlTextWriterWriteAttribute(pWriter, BAD_CAST("value"), BAD_CAST(GetValue().toUtf8().getStr()));
+    xmlTextWriterEndElement(pWriter);
+}
+
 SfxPoolItem* SwParaConnectBorderItem::Clone( SfxItemPool * ) const
 {
     return new SwParaConnectBorderItem( *this );


More information about the Libreoffice-commits mailing list