[Libreoffice-commits] core.git: 3 commits - include/svx svx/source sw/inc sw/source writerfilter/qa
Miklos Vajna
vmiklos at collabora.co.uk
Sun Jan 11 04:55:02 PST 2015
include/svx/xflbstit.hxx | 1 +
svx/source/xoutdev/xattr2.cxx | 8 ++++++++
sw/inc/unotextcursor.hxx | 10 ++--------
sw/source/core/docnode/nodedump.cxx | 7 ++++---
writerfilter/qa/cppunittests/rtftok/testrtftok.cxx | 7 ++++---
5 files changed, 19 insertions(+), 14 deletions(-)
New commits:
commit 884c5a247ad65e27f6ea643352934c2b68beed21
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Sun Jan 11 09:55:02 2015 +0100
sw: stop using comphelper/implbase_var.hxx
Change-Id: I1f697ff32f13fea72c04803d56a25d486bcc3cd3
diff --git a/sw/inc/unotextcursor.hxx b/sw/inc/unotextcursor.hxx
index 64ae3e0..8cfc15e 100644
--- a/sw/inc/unotextcursor.hxx
+++ b/sw/inc/unotextcursor.hxx
@@ -36,16 +36,10 @@
#include <com/sun/star/text/XRedline.hpp>
#include <com/sun/star/text/XMarkingAccess.hpp>
-#include <cppuhelper/implbase13.hxx>
+#include <cppuhelper/implbase.hxx>
#include <comphelper/uno3.hxx>
-#ifndef INCLUDED_COMPHELPER_IMPLBASE_VAR_HXX_14
-#define INCLUDED_COMPHELPER_IMPLBASE_VAR_HXX_14
-#define COMPHELPER_IMPLBASE_INTERFACE_NUMBER 14
-#include <comphelper/implbase_var.hxx>
-#endif
-
#include <unobaseclass.hxx>
#include <TextCursorHelper.hxx>
@@ -53,7 +47,7 @@ class SwDoc;
struct SwPosition;
class SwUnoCrsr;
-typedef ::comphelper::WeakImplHelper14
+typedef ::cppu::WeakImplHelper
< ::com::sun::star::lang::XServiceInfo
, ::com::sun::star::beans::XPropertySet
, ::com::sun::star::beans::XPropertyState
commit 1aaa596af060c1427caf20b0d7fddfc955047f82
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Sun Jan 11 09:50:59 2015 +0100
Factor out XFillBmpStretchItem::dumpAsXml() from sw
Change-Id: I7890755f754ee21d2e6db84f169b52bf4737f524
diff --git a/include/svx/xflbstit.hxx b/include/svx/xflbstit.hxx
index b4a79f5..2e8e932 100644
--- a/include/svx/xflbstit.hxx
+++ b/include/svx/xflbstit.hxx
@@ -37,6 +37,7 @@ public:
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
OUString &rText, const IntlWrapper * = 0 ) const SAL_OVERRIDE;
+ void dumpAsXml(struct _xmlTextWriter* pWriter) const;
};
#endif
diff --git a/svx/source/xoutdev/xattr2.cxx b/svx/source/xoutdev/xattr2.cxx
index 29f5ff7..0308d87 100644
--- a/svx/source/xoutdev/xattr2.cxx
+++ b/svx/source/xoutdev/xattr2.cxx
@@ -820,6 +820,14 @@ bool XFillBmpStretchItem::GetPresentation
return true;
}
+void XFillBmpStretchItem::dumpAsXml(xmlTextWriterPtr pWriter) const
+{
+ xmlTextWriterStartElement(pWriter, BAD_CAST("xFillBmpStretchItem"));
+ xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"), BAD_CAST(OString::number(Which()).getStr()));
+ xmlTextWriterWriteAttribute(pWriter, BAD_CAST("value"), BAD_CAST(OString::boolean(GetValue()).getStr()));
+ xmlTextWriterEndElement(pWriter);
+}
+
// class XFillBmpTileOffPosXItem
TYPEINIT1_AUTOFACTORY( XFillBmpPosOffsetXItem, SfxUInt16Item );
diff --git a/sw/source/core/docnode/nodedump.cxx b/sw/source/core/docnode/nodedump.cxx
index dfece35..092bf48 100644
--- a/sw/source/core/docnode/nodedump.cxx
+++ b/sw/source/core/docnode/nodedump.cxx
@@ -58,6 +58,7 @@
#include <svx/xfltrit.hxx>
#include <svx/xflbmtit.hxx>
#include <svx/xflbmpit.hxx>
+#include <svx/xflbstit.hxx>
#include <tools/datetimeutils.hxx>
#include <libxml/encoding.h>
@@ -475,6 +476,9 @@ void lcl_dumpSfxItemSet(WriterHelper& writer, const SfxItemSet* pSet)
case XATTR_FILLBMP_POS:
static_cast<const XFillBmpPosItem*>(pItem)->dumpAsXml(writer);
break;
+ case XATTR_FILLBMP_STRETCH:
+ static_cast<const XFillBmpStretchItem*>(pItem)->dumpAsXml(writer);
+ break;
default: bDone = false; break;
}
if (bDone)
@@ -489,9 +493,6 @@ void lcl_dumpSfxItemSet(WriterHelper& writer, const SfxItemSet* pSet)
boost::optional<OString> oValue;
switch (pItem->Which())
{
- case XATTR_FILLBMP_STRETCH:
- pWhich = "fill bitmap stretch";
- break;
case RES_PROTECT:
pWhich = "protect";
break;
commit 34870f1882c60f94e67555db09519b01706dae41
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Sun Jan 11 09:33:09 2015 +0100
Use std::initializer_list ctor
Change-Id: I0238d8f4ae6b92f92f8bb92df33da5552a158cbe
diff --git a/writerfilter/qa/cppunittests/rtftok/testrtftok.cxx b/writerfilter/qa/cppunittests/rtftok/testrtftok.cxx
index 4fc6b76..81de6f8 100644
--- a/writerfilter/qa/cppunittests/rtftok/testrtftok.cxx
+++ b/writerfilter/qa/cppunittests/rtftok/testrtftok.cxx
@@ -57,9 +57,10 @@ bool RtfTest::load(const OUString&,
const OUString& rURL, const OUString&,
unsigned int, unsigned int, unsigned int)
{
- uno::Sequence< beans::PropertyValue > aDescriptor(1);
- aDescriptor[0].Name = "URL";
- aDescriptor[0].Value <<= rURL;
+ uno::Sequence< beans::PropertyValue > aDescriptor =
+ {
+ beans::PropertyValue("URL", sal_Int32(0), uno::makeAny(rURL), beans::PropertyState_DIRECT_VALUE)
+ };
try
{
return m_xFilter->filter(aDescriptor);
More information about the Libreoffice-commits
mailing list