[Libreoffice-commits] core.git: 8 commits - desktop/source sw/inc sw/source sysui/desktop writerfilter/inc writerfilter/Library_writerfilter.mk writerfilter/README writerfilter/source
Miklos Vajna
vmiklos at collabora.co.uk
Mon Dec 22 10:34:22 PST 2014
desktop/source/app/cmdlineargs.cxx | 2
desktop/source/app/cmdlinehelp.cxx | 2
sw/inc/fmtanchr.hxx | 2
sw/inc/fmtornt.hxx | 4
sw/inc/fmtsrnd.hxx | 2
sw/source/core/docnode/nodedump.cxx | 86 --
sw/source/core/layout/atrfrm.cxx | 62 ++
sysui/desktop/man/libreoffice.1 | 2
writerfilter/Library_writerfilter.mk | 1
writerfilter/README | 13
writerfilter/inc/dmapper/DomainMapperFactory.hxx | 2
writerfilter/inc/dmapper/resourcemodel.hxx | 414 ++++++++++++++
writerfilter/inc/ooxml/OOXMLDocument.hxx | 2
writerfilter/inc/ooxml/QNameToString.hxx | 2
writerfilter/inc/resourcemodel/ResourceModelHelper.hxx | 33 -
writerfilter/inc/resourcemodel/WW8ResourceModel.hxx | 414 --------------
writerfilter/inc/rtftok/RTFDocument.hxx | 2
writerfilter/source/dmapper/DomainMapper.cxx | 14
writerfilter/source/dmapper/DomainMapperTableManager.cxx | 1
writerfilter/source/dmapper/GraphicImport.cxx | 4
writerfilter/source/dmapper/LoggedResources.hxx | 2
writerfilter/source/dmapper/SettingsTable.cxx | 4
writerfilter/source/dmapper/StyleSheetTable.cxx | 6
writerfilter/source/dmapper/TableData.hxx | 2
writerfilter/source/dmapper/TableManager.hxx | 2
writerfilter/source/dmapper/TablePropertiesHandler.hxx | 2
writerfilter/source/dmapper/TagLogger.hxx | 2
writerfilter/source/dmapper/WrapPolygonHandler.cxx | 3
writerfilter/source/dmapper/domainmapperfactory.cxx | 2
writerfilter/source/dmapper/util.cxx | 7
writerfilter/source/dmapper/util.hxx | 2
writerfilter/source/ooxml/Handler.hxx | 2
writerfilter/source/ooxml/OOXMLBinaryObjectReference.hxx | 2
writerfilter/source/ooxml/OOXMLFactory.hxx | 2
writerfilter/source/ooxml/OOXMLFastDocumentHandler.hxx | 2
writerfilter/source/ooxml/OOXMLPropertySet.hxx | 2
writerfilter/source/ooxml/resourceids.py | 2
writerfilter/source/resourcemodel/ResourceModelHelper.cxx | 34 -
writerfilter/source/rtftok/rtfreferencetable.hxx | 2
writerfilter/source/rtftok/rtfvalue.hxx | 2
40 files changed, 545 insertions(+), 603 deletions(-)
New commits:
commit 44742f9a0db5043e55591745be105896ed115f62
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Mon Dec 22 13:08:06 2014 +0100
Factor out SwFmtSurround::dumpAsXml() from docnode
Change-Id: Ia76bbaa02c0b306d4a5487f440b62d616cc8b29e
diff --git a/sw/inc/fmtsrnd.hxx b/sw/inc/fmtsrnd.hxx
index 123717f..691e775 100644
--- a/sw/inc/fmtsrnd.hxx
+++ b/sw/inc/fmtsrnd.hxx
@@ -58,6 +58,8 @@ public:
void SetAnchorOnly( bool bNew ) { bAnchorOnly = bNew; }
void SetContour( bool bNew ) { bContour = bNew; }
void SetOutside( bool bNew ) { bOutside = bNew; }
+
+ void dumpAsXml(struct _xmlTextWriter* pWriter) const;
};
inline SwFmtSurround &SwFmtSurround::operator=( const SwFmtSurround &rCpy )
diff --git a/sw/source/core/docnode/nodedump.cxx b/sw/source/core/docnode/nodedump.cxx
index 227b3a6..7078fc5 100644
--- a/sw/source/core/docnode/nodedump.cxx
+++ b/sw/source/core/docnode/nodedump.cxx
@@ -438,6 +438,9 @@ void lcl_dumpSfxItemSet(WriterHelper& writer, const SfxItemSet* pSet)
case RES_ANCHOR:
static_cast<const SwFmtAnchor*>(pItem)->dumpAsXml(writer);
break;
+ case RES_SURROUND:
+ static_cast<const SwFmtSurround*>(pItem)->dumpAsXml(writer);
+ break;
default: bDone = false; break;
}
if (bDone)
@@ -452,36 +455,6 @@ void lcl_dumpSfxItemSet(WriterHelper& writer, const SfxItemSet* pSet)
boost::optional<OString> oValue;
switch (pItem->Which())
{
- case RES_SURROUND:
- {
- pWhich = "frame surround";
- const SwFmtSurround* pSurround = static_cast<const SwFmtSurround*>(pItem);
- switch (pSurround->GetSurround())
- {
- case SURROUND_NONE:
- oValue = "none";
- break;
- case SURROUND_THROUGHT:
- oValue = "throught";
- break;
- case SURROUND_PARALLEL:
- oValue = "parallel";
- break;
- case SURROUND_IDEAL:
- oValue = "ideal";
- break;
- case SURROUND_LEFT:
- oValue = "left";
- break;
- case SURROUND_RIGHT:
- oValue = "right";
- break;
- case SURROUND_END:
- oValue = "end";
- break;
- }
- break;
- }
case RES_FOLLOW_TEXT_FLOW:
{
pWhich = "frame follow text flow";
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx
index 3c3b0b9..9da00f2 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -1241,6 +1241,23 @@ bool SwFmtSurround::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
return bRet;
}
+void SwFmtSurround::dumpAsXml(xmlTextWriterPtr pWriter) const
+{
+ xmlTextWriterStartElement(pWriter, BAD_CAST("swFmtSurround"));
+ xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"), BAD_CAST(OString::number(Which()).getStr()));
+ xmlTextWriterWriteAttribute(pWriter, BAD_CAST("value"), BAD_CAST(OString::number(GetValue()).getStr()));
+
+ OUString aPresentation;
+ GetPresentation(SFX_ITEM_PRESENTATION_NAMELESS, SFX_MAPUNIT_100TH_MM, SFX_MAPUNIT_100TH_MM, aPresentation);
+ xmlTextWriterWriteAttribute(pWriter, BAD_CAST("presentation"), BAD_CAST(aPresentation.toUtf8().getStr()));
+
+ xmlTextWriterWriteAttribute(pWriter, BAD_CAST("bAnchorOnly"), BAD_CAST(OString::boolean(bAnchorOnly).getStr()));
+ xmlTextWriterWriteAttribute(pWriter, BAD_CAST("bContour"), BAD_CAST(OString::boolean(bContour).getStr()));
+ xmlTextWriterWriteAttribute(pWriter, BAD_CAST("bOutside"), BAD_CAST(OString::boolean(bOutside).getStr()));
+
+ xmlTextWriterEndElement(pWriter);
+}
+
SvStream& SwFmtVertOrient::Store(SvStream &rStream, sal_uInt16 /*version*/) const
{
#if SAL_TYPES_SIZEOFLONG == 8
commit 3bcbec22b3e76444d7c9431534f330d827d131d3
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Mon Dec 22 12:53:54 2014 +0100
fix indentation
Change-Id: Iebc587c55d83a7dbafd149fc605fcd9b6bab456c
diff --git a/writerfilter/source/dmapper/domainmapperfactory.cxx b/writerfilter/source/dmapper/domainmapperfactory.cxx
index c39ede1..5159cfe 100644
--- a/writerfilter/source/dmapper/domainmapperfactory.cxx
+++ b/writerfilter/source/dmapper/domainmapperfactory.cxx
@@ -24,7 +24,7 @@ Stream::Pointer_t DomainMapperFactory::createMapper(css::uno::Reference<css::uno
utl::MediaDescriptor& rMediaDesc)
{
#ifdef DEBUG_WRITERFILTER
- OUString sURL = rMediaDesc.getUnpackedValueOrDefault( utl::MediaDescriptor::PROP_URL(), OUString() );
+ OUString sURL = rMediaDesc.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_URL(), OUString());
::std::string sURLc = OUStringToOString(sURL, RTL_TEXTENCODING_ASCII_US).getStr();
writerfilter::TagLogger::Pointer_t dmapper_logger(writerfilter::TagLogger::getInstance("DOMAINMAPPER"));
commit fcec34ffcc93f98be005b06c223e25c9c4e77cde
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Mon Dec 22 12:38:57 2014 +0100
writerfilter: fold single remaining header of resourcemodel into dmapper
Change-Id: I54cc8ebda18c8ca7071c39210687f28adbc4790a
diff --git a/writerfilter/README b/writerfilter/README
index 0d492e4..f45f9e8 100644
--- a/writerfilter/README
+++ b/writerfilter/README
@@ -1,21 +1,20 @@
The writerfilter module contains import filters for Writer, using its UNO API.
-Import filter for docx, doc and rtf.
+Import filter for docx and rtf.
== Module contents ==
- * documentation
- * inc: global headers (can be included by other modules)
- * qa: unittests and subsequenttests
+ * documentation: RNG schema for the OOXML tokenizer, etc.
+ * inc: module-global headers (can be included by any files under source)
+ * qa: cppunit tests
* source: the filters themselves
* util: UNO passive registration config
== Source contents ==
* dmapper: the domain mapper, hiding UNO from the tokenizers, used by DOCX and RTF import
* The incoming traffic of dmapper can be dumped into an XML file in /tmp in
- debug builds, start soffice with the
- `SW_DEBUG_WRITERFILTER=1` environment variable if you want that.
+ debug builds, start soffice with the `SW_DEBUG_WRITERFILTER=1`
+ environment variable if you want that.
* filter: the UNO filter service implementations, invoked by UNO and calling
the dmapper + one of the tokenizers
* ooxml: the docx tokenizer
- * resourcemodel
* rtftok: the rtf tokenizer
diff --git a/writerfilter/inc/dmapper/DomainMapperFactory.hxx b/writerfilter/inc/dmapper/DomainMapperFactory.hxx
index 05cb9b5..39a9aa7 100644
--- a/writerfilter/inc/dmapper/DomainMapperFactory.hxx
+++ b/writerfilter/inc/dmapper/DomainMapperFactory.hxx
@@ -9,7 +9,7 @@
#ifndef INCLUDED_WRITERFILTER_INC_DMAPPER_DOMAINMAPPERFACTORY_HXX
#define INCLUDED_WRITERFILTER_INC_DMAPPER_DOMAINMAPPERFACTORY_HXX
-#include <resourcemodel/WW8ResourceModel.hxx>
+#include <dmapper/resourcemodel.hxx>
#include <com/sun/star/io/XInputStream.hpp>
#include <com/sun/star/lang/XComponent.hpp>
#include <com/sun/star/text/XTextRange.hpp>
diff --git a/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx b/writerfilter/inc/dmapper/resourcemodel.hxx
similarity index 97%
rename from writerfilter/inc/resourcemodel/WW8ResourceModel.hxx
rename to writerfilter/inc/dmapper/resourcemodel.hxx
index b6ba40e..0e07757 100644
--- a/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx
+++ b/writerfilter/inc/dmapper/resourcemodel.hxx
@@ -17,8 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_WRITERFILTER_INC_RESOURCEMODEL_WW8RESOURCEMODEL_HXX
-#define INCLUDED_WRITERFILTER_INC_RESOURCEMODEL_WW8RESOURCEMODEL_HXX
+#ifndef INCLUDED_WRITERFILTER_INC_DMAPPER_RESOURCEMODEL_HXX
+#define INCLUDED_WRITERFILTER_INC_DMAPPER_RESOURCEMODEL_HXX
#include <string>
#include <memory>
@@ -27,7 +27,7 @@
#include <com/sun/star/drawing/XShape.hpp>
#include <com/sun/star/uno/Any.hxx>
/**
- @file WW8ResourceModel.hxx
+ @file resourcemodel.hxx
The classes in this file define the interfaces for the resource
model of the DocTokenizer:
@@ -409,6 +409,6 @@ typedef sal_Int32 Token_t;
}
-#endif // INCLUDED_WRITERFILTER_INC_RESOURCEMODEL_WW8RESOURCEMODEL_HXX
+#endif // INCLUDED_WRITERFILTER_INC_DMAPPER_RESOURCEMODEL_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/inc/ooxml/OOXMLDocument.hxx b/writerfilter/inc/ooxml/OOXMLDocument.hxx
index 3b778ba..8882f42 100644
--- a/writerfilter/inc/ooxml/OOXMLDocument.hxx
+++ b/writerfilter/inc/ooxml/OOXMLDocument.hxx
@@ -23,7 +23,7 @@
#include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/io/XInputStream.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
-#include <resourcemodel/WW8ResourceModel.hxx>
+#include <dmapper/resourcemodel.hxx>
#include <com/sun/star/task/XStatusIndicator.hpp>
#include <com/sun/star/xml/sax/XParser.hpp>
#include <com/sun/star/xml/sax/XFastParser.hpp>
diff --git a/writerfilter/inc/ooxml/QNameToString.hxx b/writerfilter/inc/ooxml/QNameToString.hxx
index 89ddcf7..88abc59 100644
--- a/writerfilter/inc/ooxml/QNameToString.hxx
+++ b/writerfilter/inc/ooxml/QNameToString.hxx
@@ -23,7 +23,7 @@
#include <map>
#include <string>
#include <iostream>
-#include <resourcemodel/WW8ResourceModel.hxx>
+#include <dmapper/resourcemodel.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
namespace writerfilter
diff --git a/writerfilter/inc/rtftok/RTFDocument.hxx b/writerfilter/inc/rtftok/RTFDocument.hxx
index 7f5391c..8b68780 100644
--- a/writerfilter/inc/rtftok/RTFDocument.hxx
+++ b/writerfilter/inc/rtftok/RTFDocument.hxx
@@ -9,7 +9,7 @@
#ifndef INCLUDED_WRITERFILTER_INC_RTFTOK_RTFDOCUMENT_HXX
#define INCLUDED_WRITERFILTER_INC_RTFTOK_RTFDOCUMENT_HXX
-#include <resourcemodel/WW8ResourceModel.hxx>
+#include <dmapper/resourcemodel.hxx>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/io/XInputStream.hpp>
#include <com/sun/star/lang/XComponent.hpp>
diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.cxx b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
index 99340ea..3399707 100644
--- a/writerfilter/source/dmapper/DomainMapperTableManager.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
@@ -18,7 +18,6 @@
*/
#include <boost/optional.hpp>
#include <DomainMapperTableManager.hxx>
-#include <resourcemodel/WW8ResourceModel.hxx>
#include <BorderHandler.hxx>
#include <CellColorHandler.hxx>
#include <CellMarginHandler.hxx>
diff --git a/writerfilter/source/dmapper/LoggedResources.hxx b/writerfilter/source/dmapper/LoggedResources.hxx
index 602fea4..4b9c387 100644
--- a/writerfilter/source/dmapper/LoggedResources.hxx
+++ b/writerfilter/source/dmapper/LoggedResources.hxx
@@ -20,7 +20,7 @@
#ifndef INCLUDED_WRITERFILTER_SOURCE_DMAPPER_LOGGEDRESOURCES_HXX
#define INCLUDED_WRITERFILTER_SOURCE_DMAPPER_LOGGEDRESOURCES_HXX
-#include <resourcemodel/WW8ResourceModel.hxx>
+#include <dmapper/resourcemodel.hxx>
#include "TagLogger.hxx"
diff --git a/writerfilter/source/dmapper/TableData.hxx b/writerfilter/source/dmapper/TableData.hxx
index 631a755..9151494 100644
--- a/writerfilter/source/dmapper/TableData.hxx
+++ b/writerfilter/source/dmapper/TableData.hxx
@@ -20,7 +20,7 @@
#ifndef INCLUDED_WRITERFILTER_SOURCE_DMAPPER_TABLEDATA_HXX
#define INCLUDED_WRITERFILTER_SOURCE_DMAPPER_TABLEDATA_HXX
-#include <resourcemodel/WW8ResourceModel.hxx>
+#include <dmapper/resourcemodel.hxx>
#include <vector>
#include <boost/shared_ptr.hpp>
diff --git a/writerfilter/source/dmapper/TableManager.hxx b/writerfilter/source/dmapper/TableManager.hxx
index 018b7d9..07803e0 100644
--- a/writerfilter/source/dmapper/TableManager.hxx
+++ b/writerfilter/source/dmapper/TableManager.hxx
@@ -20,7 +20,7 @@
#ifndef INCLUDED_WRITERFILTER_SOURCE_DMAPPER_TABLEMANAGER_HXX
#define INCLUDED_WRITERFILTER_SOURCE_DMAPPER_TABLEMANAGER_HXX
-#include <resourcemodel/WW8ResourceModel.hxx>
+#include <dmapper/resourcemodel.hxx>
#include <ooxml/resourceids.hxx>
diff --git a/writerfilter/source/dmapper/TablePropertiesHandler.hxx b/writerfilter/source/dmapper/TablePropertiesHandler.hxx
index e9d5c4e..ff3d1bd 100644
--- a/writerfilter/source/dmapper/TablePropertiesHandler.hxx
+++ b/writerfilter/source/dmapper/TablePropertiesHandler.hxx
@@ -23,7 +23,7 @@
#include "PropertyMap.hxx"
#include <TableManager.hxx>
-#include <resourcemodel/WW8ResourceModel.hxx>
+#include <dmapper/resourcemodel.hxx>
#include <boost/shared_ptr.hpp>
diff --git a/writerfilter/source/dmapper/TagLogger.hxx b/writerfilter/source/dmapper/TagLogger.hxx
index e704310..228c690 100644
--- a/writerfilter/source/dmapper/TagLogger.hxx
+++ b/writerfilter/source/dmapper/TagLogger.hxx
@@ -22,7 +22,7 @@
#include <rtl/ustring.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
-#include <resourcemodel/WW8ResourceModel.hxx>
+#include <dmapper/resourcemodel.hxx>
#include <string>
#include <boost/shared_ptr.hpp>
#include <libxml/xmlwriter.h>
diff --git a/writerfilter/source/dmapper/util.hxx b/writerfilter/source/dmapper/util.hxx
index 2f1a248..a57e6eb 100644
--- a/writerfilter/source/dmapper/util.hxx
+++ b/writerfilter/source/dmapper/util.hxx
@@ -22,7 +22,7 @@
#include <com/sun/star/text/XTextRange.hpp>
#include <string>
-#include <resourcemodel/WW8ResourceModel.hxx>
+#include <dmapper/resourcemodel.hxx>
namespace writerfilter
{
diff --git a/writerfilter/source/ooxml/Handler.hxx b/writerfilter/source/ooxml/Handler.hxx
index ba92f640..642de8c 100644
--- a/writerfilter/source/ooxml/Handler.hxx
+++ b/writerfilter/source/ooxml/Handler.hxx
@@ -19,7 +19,7 @@
#ifndef INCLUDED_WRITERFILTER_SOURCE_OOXML_HANDLER_HXX
#define INCLUDED_WRITERFILTER_SOURCE_OOXML_HANDLER_HXX
-#include <resourcemodel/WW8ResourceModel.hxx>
+#include <dmapper/resourcemodel.hxx>
#include "OOXMLFastContextHandler.hxx"
namespace writerfilter {
diff --git a/writerfilter/source/ooxml/OOXMLBinaryObjectReference.hxx b/writerfilter/source/ooxml/OOXMLBinaryObjectReference.hxx
index 929a27f..d259ead 100644
--- a/writerfilter/source/ooxml/OOXMLBinaryObjectReference.hxx
+++ b/writerfilter/source/ooxml/OOXMLBinaryObjectReference.hxx
@@ -19,7 +19,7 @@
#ifndef INCLUDED_WRITERFILTER_SOURCE_OOXML_OOXMLBINARYOBJECTREFERENCE_HXX
#define INCLUDED_WRITERFILTER_SOURCE_OOXML_OOXMLBINARYOBJECTREFERENCE_HXX
-#include <resourcemodel/WW8ResourceModel.hxx>
+#include <dmapper/resourcemodel.hxx>
#include <ooxml/OOXMLDocument.hxx>
namespace writerfilter {
diff --git a/writerfilter/source/ooxml/OOXMLFactory.hxx b/writerfilter/source/ooxml/OOXMLFactory.hxx
index c90f729..e369326 100644
--- a/writerfilter/source/ooxml/OOXMLFactory.hxx
+++ b/writerfilter/source/ooxml/OOXMLFactory.hxx
@@ -22,7 +22,7 @@
#include <boost/shared_ptr.hpp>
-#include <resourcemodel/WW8ResourceModel.hxx>
+#include <dmapper/resourcemodel.hxx>
#include <oox/token/tokens.hxx>
diff --git a/writerfilter/source/ooxml/OOXMLFastDocumentHandler.hxx b/writerfilter/source/ooxml/OOXMLFastDocumentHandler.hxx
index f446d43..e8263ac 100644
--- a/writerfilter/source/ooxml/OOXMLFastDocumentHandler.hxx
+++ b/writerfilter/source/ooxml/OOXMLFastDocumentHandler.hxx
@@ -24,7 +24,7 @@
#include <com/sun/star/uno/XComponentContext.hpp>
#include <cppuhelper/implbase1.hxx>
#include <com/sun/star/xml/sax/XFastDocumentHandler.hpp>
-#include <resourcemodel/WW8ResourceModel.hxx>
+#include <dmapper/resourcemodel.hxx>
#include <ooxml/OOXMLDocument.hxx>
#include "OOXMLParserState.hxx"
diff --git a/writerfilter/source/ooxml/OOXMLPropertySet.hxx b/writerfilter/source/ooxml/OOXMLPropertySet.hxx
index 214781f..25d79eb 100644
--- a/writerfilter/source/ooxml/OOXMLPropertySet.hxx
+++ b/writerfilter/source/ooxml/OOXMLPropertySet.hxx
@@ -19,7 +19,7 @@
#ifndef INCLUDED_WRITERFILTER_SOURCE_OOXML_OOXMLPROPERTYSET_HXX
#define INCLUDED_WRITERFILTER_SOURCE_OOXML_OOXMLPROPERTYSET_HXX
-#include <resourcemodel/WW8ResourceModel.hxx>
+#include <dmapper/resourcemodel.hxx>
namespace writerfilter {
namespace ooxml
diff --git a/writerfilter/source/ooxml/resourceids.py b/writerfilter/source/ooxml/resourceids.py
index c612e77..087f00c 100644
--- a/writerfilter/source/ooxml/resourceids.py
+++ b/writerfilter/source/ooxml/resourceids.py
@@ -29,7 +29,7 @@ class ContentHandler(xml.sax.handler.ContentHandler):
#ifndef INCLUDED_OOXML_RESOURCEIDS_HXX
#define INCLUDED_OOXML_RESOURCEIDS_HXX
-#include <resourcemodel/WW8ResourceModel.hxx>
+#include <dmapper/resourcemodel.hxx>
namespace writerfilter {
diff --git a/writerfilter/source/rtftok/rtfreferencetable.hxx b/writerfilter/source/rtftok/rtfreferencetable.hxx
index 91c3e7b..f392ed9 100644
--- a/writerfilter/source/rtftok/rtfreferencetable.hxx
+++ b/writerfilter/source/rtftok/rtfreferencetable.hxx
@@ -11,7 +11,7 @@
#define INCLUDED_WRITERFILTER_SOURCE_RTFTOK_RTFREFERENCETABLE_HXX
#include <map>
-#include <resourcemodel/WW8ResourceModel.hxx>
+#include <dmapper/resourcemodel.hxx>
namespace writerfilter
{
diff --git a/writerfilter/source/rtftok/rtfvalue.hxx b/writerfilter/source/rtftok/rtfvalue.hxx
index 4af08db..03c7823 100644
--- a/writerfilter/source/rtftok/rtfvalue.hxx
+++ b/writerfilter/source/rtftok/rtfvalue.hxx
@@ -10,7 +10,7 @@
#ifndef INCLUDED_WRITERFILTER_SOURCE_RTFTOK_RTFVALUE_HXX
#define INCLUDED_WRITERFILTER_SOURCE_RTFTOK_RTFVALUE_HXX
-#include <resourcemodel/WW8ResourceModel.hxx>
+#include <dmapper/resourcemodel.hxx>
#include <com/sun/star/io/XInputStream.hpp>
#include <com/sun/star/embed/XEmbeddedObject.hpp>
commit 6023347ab02a059011e9d4dde578e5b2a0b2903b
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Mon Dec 22 12:23:14 2014 +0100
resolveSprmProps() is used only in dmapper
Change-Id: I24227d700830a227ed8aa780b3b9e15c57b46f6e
diff --git a/writerfilter/Library_writerfilter.mk b/writerfilter/Library_writerfilter.mk
index e84bf5b..1bdfa8ee 100644
--- a/writerfilter/Library_writerfilter.mk
+++ b/writerfilter/Library_writerfilter.mk
@@ -126,7 +126,6 @@ $(eval $(call gb_Library_add_exception_objects,writerfilter,\
writerfilter/source/ooxml/OOXMLPropertySetImpl \
writerfilter/source/ooxml/OOXMLStreamImpl \
writerfilter/source/ooxml/qnametostrcore \
- writerfilter/source/resourcemodel/ResourceModelHelper \
))
$(eval $(call gb_Library_add_generated_exception_objects,writerfilter,\
diff --git a/writerfilter/inc/resourcemodel/ResourceModelHelper.hxx b/writerfilter/inc/resourcemodel/ResourceModelHelper.hxx
deleted file mode 100644
index b913cad..0000000
--- a/writerfilter/inc/resourcemodel/ResourceModelHelper.hxx
+++ /dev/null
@@ -1,33 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#ifndef INCLUDED_WRITERFILTER_INC_RESOURCEMODEL_RESOURCEMODELHELPER_HXX
-#define INCLUDED_WRITERFILTER_INC_RESOURCEMODEL_RESOURCEMODELHELPER_HXX
-
-#include <resourcemodel/WW8ResourceModel.hxx>
-
-namespace writerfilter {
-namespace resourcemodel {
-
-void resolveSprmProps(Properties & rHandler, Sprm & rSprm);
-
-}}
-
-#endif // INCLUDED_WRITERFILTER_INC_RESOURCEMODEL_RESOURCEMODELHELPER_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index b85538c..9df50e4 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -18,7 +18,7 @@
*/
#include "PageBordersHandler.hxx"
-#include <resourcemodel/ResourceModelHelper.hxx>
+#include "util.hxx"
#include <SdtHelper.hxx>
#include <TDefTableHandler.hxx>
#include <DomainMapper_Impl.hxx>
@@ -77,8 +77,6 @@ using namespace oox;
namespace writerfilter {
-using resourcemodel::resolveSprmProps;
-
namespace dmapper{
TagLogger::Pointer_t dmapper_logger(TagLogger::getInstance("DOMAINMAPPER"));
@@ -2325,12 +2323,12 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext )
case NS_ooxml::LN_CT_SdtPr_date:
{
if (!IsInHeaderFooter())
- resourcemodel::resolveSprmProps(*this, rSprm);
+ resolveSprmProps(*this, rSprm);
else
{
OUString sName = "ooxml:CT_SdtPr_date";
enableInteropGrabBag(sName);
- resourcemodel::resolveSprmProps(*this, rSprm);
+ resolveSprmProps(*this, rSprm);
m_pImpl->m_pSdtHelper->appendToInteropGrabBag(getInteropGrabBag());
m_pImpl->disableInteropGrabBag();
}
@@ -2505,7 +2503,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext )
case NS_ooxml::LN_CT_TrPrBase_cnfStyle:
{
m_pImpl->enableInteropGrabBag("cnfStyle");
- resourcemodel::resolveSprmProps(*this, rSprm);
+ resolveSprmProps(*this, rSprm);
TablePropertyMapPtr pPropMap(new TablePropertyMap());
pPropMap->Insert(PROP_ROW_CNF_STYLE, uno::makeAny(uno::makeAny(m_pImpl->m_aInteropGrabBag.getAsConstList())), true, ROW_GRAB_BAG);
@@ -2517,7 +2515,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext )
case NS_ooxml::LN_CT_TcPrBase_cnfStyle:
{
m_pImpl->enableInteropGrabBag("cnfStyle");
- resourcemodel::resolveSprmProps(*this, rSprm);
+ resolveSprmProps(*this, rSprm);
TablePropertyMapPtr pPropMap(new TablePropertyMap());
pPropMap->Insert(PROP_CELL_CNF_STYLE, uno::makeAny(uno::makeAny(m_pImpl->m_aInteropGrabBag.getAsConstList())), true, CELL_GRAB_BAG);
@@ -2529,7 +2527,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext )
case NS_ooxml::LN_CT_PPrBase_cnfStyle:
{
m_pImpl->enableInteropGrabBag("cnfStyle");
- resourcemodel::resolveSprmProps(*this, rSprm);
+ resolveSprmProps(*this, rSprm);
rContext->Insert(PROP_PARA_CNF_STYLE, uno::makeAny(m_pImpl->m_aInteropGrabBag.getAsConstList()), true, PARA_GRAB_BAG);
m_pImpl->disableInteropGrabBag();
}
diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx
index 9f91f30..a087156 100644
--- a/writerfilter/source/dmapper/GraphicImport.cxx
+++ b/writerfilter/source/dmapper/GraphicImport.cxx
@@ -55,7 +55,6 @@
#include <DomainMapper.hxx>
#include <dmapper/GraphicZOrderHelper.hxx>
#include <ooxml/resourceids.hxx>
-#include <resourcemodel/ResourceModelHelper.hxx>
#include "ConversionHelper.hxx"
#include "GraphicHelpers.hxx"
@@ -63,11 +62,10 @@
#include "PropertyMap.hxx"
#include "WrapPolygonHandler.hxx"
#include "dmapperLoggers.hxx"
+#include "util.hxx"
namespace writerfilter {
-using resourcemodel::resolveSprmProps;
-
namespace dmapper
{
using namespace std;
diff --git a/writerfilter/source/dmapper/SettingsTable.cxx b/writerfilter/source/dmapper/SettingsTable.cxx
index 76dff4c..28945fb 100644
--- a/writerfilter/source/dmapper/SettingsTable.cxx
+++ b/writerfilter/source/dmapper/SettingsTable.cxx
@@ -19,7 +19,6 @@
#include <stdio.h>
#include <rtl/ustring.hxx>
-#include <resourcemodel/ResourceModelHelper.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/beans/XPropertyState.hpp>
#include <com/sun/star/container/XNameContainer.hpp>
@@ -30,13 +29,12 @@
#include <ConversionHelper.hxx>
#include "dmapperLoggers.hxx"
+#include "util.hxx"
using namespace com::sun::star;
namespace writerfilter {
-using resourcemodel::resolveSprmProps;
-
namespace dmapper
{
diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx
index dcdad73..f0a5372 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.cxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.cxx
@@ -16,8 +16,8 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <resourcemodel/ResourceModelHelper.hxx>
#include <StyleSheetTable.hxx>
+#include "util.hxx"
#include <NumberingManager.hxx>
#include <ConversionHelper.hxx>
#include <TblStylePrHandler.hxx>
@@ -682,14 +682,14 @@ void StyleSheetTable::lcl_sprm(Sprm & rSprm)
case NS_ooxml::LN_CT_PPrDefault_pPr:
case NS_ooxml::LN_CT_DocDefaults_pPrDefault:
m_pImpl->m_rDMapper.PushStyleSheetProperties( m_pImpl->m_pDefaultParaProps );
- resourcemodel::resolveSprmProps( m_pImpl->m_rDMapper, rSprm );
+ resolveSprmProps( m_pImpl->m_rDMapper, rSprm );
m_pImpl->m_rDMapper.PopStyleSheetProperties();
applyDefaults( true );
break;
case NS_ooxml::LN_CT_RPrDefault_rPr:
case NS_ooxml::LN_CT_DocDefaults_rPrDefault:
m_pImpl->m_rDMapper.PushStyleSheetProperties( m_pImpl->m_pDefaultCharProps );
- resourcemodel::resolveSprmProps( m_pImpl->m_rDMapper, rSprm );
+ resolveSprmProps( m_pImpl->m_rDMapper, rSprm );
m_pImpl->m_rDMapper.PopStyleSheetProperties();
applyDefaults( false );
break;
diff --git a/writerfilter/source/dmapper/WrapPolygonHandler.cxx b/writerfilter/source/dmapper/WrapPolygonHandler.cxx
index 6239dc1..8b3d5e0 100644
--- a/writerfilter/source/dmapper/WrapPolygonHandler.cxx
+++ b/writerfilter/source/dmapper/WrapPolygonHandler.cxx
@@ -20,15 +20,14 @@
#include <com/sun/star/drawing/PointSequence.hpp>
#include <ooxml/resourceids.hxx>
-#include <resourcemodel/ResourceModelHelper.hxx>
#include "ConversionHelper.hxx"
#include "WrapPolygonHandler.hxx"
#include "dmapperLoggers.hxx"
+#include "util.hxx"
namespace writerfilter {
-using resourcemodel::resolveSprmProps;
using namespace com::sun::star;
namespace dmapper {
diff --git a/writerfilter/source/dmapper/util.cxx b/writerfilter/source/dmapper/util.cxx
index f0df398..6d9fbf3 100644
--- a/writerfilter/source/dmapper/util.cxx
+++ b/writerfilter/source/dmapper/util.cxx
@@ -51,6 +51,13 @@ string XTextRangeToString(uno::Reference< text::XTextRange > textRange)
return result;
}
+void resolveSprmProps(Properties & rHandler, Sprm & rSprm)
+{
+ writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
+ if( pProperties.get())
+ pProperties->resolve(rHandler);
+}
+
}
}
diff --git a/writerfilter/source/dmapper/util.hxx b/writerfilter/source/dmapper/util.hxx
index 29ef0de..2f1a248 100644
--- a/writerfilter/source/dmapper/util.hxx
+++ b/writerfilter/source/dmapper/util.hxx
@@ -22,12 +22,14 @@
#include <com/sun/star/text/XTextRange.hpp>
#include <string>
+#include <resourcemodel/WW8ResourceModel.hxx>
namespace writerfilter
{
namespace dmapper
{
std::string XTextRangeToString(css::uno::Reference< css::text::XTextRange > textRange);
+ void resolveSprmProps(Properties & rHandler, Sprm & rSprm);
}
}
diff --git a/writerfilter/source/resourcemodel/ResourceModelHelper.cxx b/writerfilter/source/resourcemodel/ResourceModelHelper.cxx
deleted file mode 100644
index f605017..0000000
--- a/writerfilter/source/resourcemodel/ResourceModelHelper.cxx
+++ /dev/null
@@ -1,34 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include "resourcemodel/ResourceModelHelper.hxx"
-
-namespace writerfilter {
-namespace resourcemodel {
-
-void resolveSprmProps(Properties & rHandler, Sprm & rSprm)
-{
- writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
- if( pProperties.get())
- pProperties->resolve(rHandler);
-}
-
-}}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 68a5ae93c68d195d33963c94b5c3ac1eb5dc1ce0
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Mon Dec 22 10:34:04 2014 +0100
Factor out SwFmtAnchor::dumpAsXml() from nodedump
Change-Id: I080fd80cf0a2fd0531edcb21f189aaf4fd922ecc
diff --git a/sw/inc/fmtanchr.hxx b/sw/inc/fmtanchr.hxx
index f7e8062..294e2e2 100644
--- a/sw/inc/fmtanchr.hxx
+++ b/sw/inc/fmtanchr.hxx
@@ -71,6 +71,8 @@ public:
void SetType( RndStdIds nRndId ) { nAnchorId = nRndId; }
void SetPageNum( sal_uInt16 nNew ) { nPageNum = nNew; }
void SetAnchor( const SwPosition *pPos );
+
+ void dumpAsXml(struct _xmlTextWriter* pWriter) const;
};
inline const SwFmtAnchor &SwAttrSet::GetAnchor(bool bInP) const
diff --git a/sw/source/core/docnode/nodedump.cxx b/sw/source/core/docnode/nodedump.cxx
index 971f6b8..227b3a6 100644
--- a/sw/source/core/docnode/nodedump.cxx
+++ b/sw/source/core/docnode/nodedump.cxx
@@ -435,6 +435,9 @@ void lcl_dumpSfxItemSet(WriterHelper& writer, const SfxItemSet* pSet)
case RES_HORI_ORIENT:
static_cast<const SwFmtHoriOrient*>(pItem)->dumpAsXml(writer);
break;
+ case RES_ANCHOR:
+ static_cast<const SwFmtAnchor*>(pItem)->dumpAsXml(writer);
+ break;
default: bDone = false; break;
}
if (bDone)
@@ -449,36 +452,6 @@ void lcl_dumpSfxItemSet(WriterHelper& writer, const SfxItemSet* pSet)
boost::optional<OString> oValue;
switch (pItem->Which())
{
- case RES_ANCHOR:
- {
- pWhich = "frame anchor";
- const SwFmtAnchor* pAnchor = static_cast<const SwFmtAnchor*>(pItem);
- switch (pAnchor->GetAnchorId())
- {
- case FLY_AT_PARA:
- oValue = "anchor type: at-para";
- break;
- case FLY_AS_CHAR:
- oValue = "anchor type: as-char";
- break;
- case FLY_AT_PAGE:
- oValue = "anchor type: at-page";
- break;
- case FLY_AT_FLY:
- oValue = "anchor type: at-fly";
- break;
- case FLY_AT_CHAR:
- oValue = "anchor type: at-char";
- break;
- default:
- oValue = "anchor type: " + OString::number(pAnchor->GetAnchorId());
- break;
- }
- const SwPosition* pPosition = pAnchor->GetCntntAnchor();
- if (pPosition)
- oValue = *oValue + ", node index: " + OString::number(pPosition->nNode.GetNode().GetIndex()) + ", index: " + OString::number(pPosition->nContent.GetIndex());
- break;
- }
case RES_SURROUND:
{
pWhich = "frame surround";
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx
index 070bb4b..3c3b0b9 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -1666,6 +1666,30 @@ bool SwFmtAnchor::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
return bRet;
}
+void SwFmtAnchor::dumpAsXml(xmlTextWriterPtr pWriter) const
+{
+ xmlTextWriterStartElement(pWriter, BAD_CAST("swFmtAnchor"));
+ xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"), BAD_CAST(OString::number(Which()).getStr()));
+
+ if (m_pCntntAnchor)
+ {
+ std::stringstream aCntntAnchor;
+ aCntntAnchor << *m_pCntntAnchor;
+ xmlTextWriterWriteAttribute(pWriter, BAD_CAST("pCntntAnchor"), BAD_CAST(aCntntAnchor.str().c_str()));
+ }
+ else
+ xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("pCntntAnchor"), "%p", m_pCntntAnchor.get());
+ xmlTextWriterWriteAttribute(pWriter, BAD_CAST("nAnchorType"), BAD_CAST(OString::number(nAnchorId).getStr()));
+ xmlTextWriterWriteAttribute(pWriter, BAD_CAST("nPageNum"), BAD_CAST(OString::number(nPageNum).getStr()));
+ xmlTextWriterWriteAttribute(pWriter, BAD_CAST("nOrder"), BAD_CAST(OString::number(mnOrder).getStr()));
+ xmlTextWriterWriteAttribute(pWriter, BAD_CAST("nOrderCounter"), BAD_CAST(OString::number(mnOrderCounter).getStr()));
+ OUString aPresentation;
+ GetPresentation(SFX_ITEM_PRESENTATION_NAMELESS, SFX_MAPUNIT_100TH_MM, SFX_MAPUNIT_100TH_MM, aPresentation);
+ xmlTextWriterWriteAttribute(pWriter, BAD_CAST("presentation"), BAD_CAST(aPresentation.toUtf8().getStr()));
+
+ xmlTextWriterEndElement(pWriter);
+}
+
// Partially implemented inline in hxx
SwFmtURL::SwFmtURL() :
SfxPoolItem( RES_URL ),
commit cc15d898721f90412cf03ff76e4163cc91251d67
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Mon Dec 22 10:33:59 2014 +0100
Factor out SwFmtHoriOrient::dumpAsXml() from nodedump
Change-Id: I63ec35abcd7e69147ff4f98b1989875967c470fe
diff --git a/sw/inc/fmtornt.hxx b/sw/inc/fmtornt.hxx
index 9c72d89..5304931 100644
--- a/sw/inc/fmtornt.hxx
+++ b/sw/inc/fmtornt.hxx
@@ -99,6 +99,8 @@ public:
bool IsPosToggle() const { return bPosToggle; }
void SetPosToggle( bool bNew ) { bPosToggle = bNew; }
+
+ void dumpAsXml(struct _xmlTextWriter* pWriter) const;
};
inline SwFmtVertOrient &SwFmtVertOrient::operator=( const SwFmtVertOrient &rCpy )
diff --git a/sw/source/core/docnode/nodedump.cxx b/sw/source/core/docnode/nodedump.cxx
index 7ada0a0..971f6b8 100644
--- a/sw/source/core/docnode/nodedump.cxx
+++ b/sw/source/core/docnode/nodedump.cxx
@@ -432,6 +432,9 @@ void lcl_dumpSfxItemSet(WriterHelper& writer, const SfxItemSet* pSet)
case RES_VERT_ORIENT:
static_cast<const SwFmtVertOrient*>(pItem)->dumpAsXml(writer);
break;
+ case RES_HORI_ORIENT:
+ static_cast<const SwFmtHoriOrient*>(pItem)->dumpAsXml(writer);
+ break;
default: bDone = false; break;
}
if (bDone)
@@ -446,13 +449,6 @@ void lcl_dumpSfxItemSet(WriterHelper& writer, const SfxItemSet* pSet)
boost::optional<OString> oValue;
switch (pItem->Which())
{
- case RES_HORI_ORIENT:
- {
- pWhich = "frame horizontal orientation";
- const SwFmtHoriOrient* pOrient = static_cast<const SwFmtHoriOrient*>(pItem);
- oValue = "orient: " + OString::number(pOrient->GetHoriOrient()) + ", relation: " + OString::number(pOrient->GetRelationOrient()) + ", position: " + OString::number(pOrient->GetPos());
- break;
- }
case RES_ANCHOR:
{
pWhich = "frame anchor";
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx
index cdd9d25..070bb4b 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -1454,6 +1454,17 @@ bool SwFmtHoriOrient::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
return bRet;
}
+void SwFmtHoriOrient::dumpAsXml(xmlTextWriterPtr pWriter) const
+{
+ xmlTextWriterStartElement(pWriter, BAD_CAST("swFmtHoriOrient"));
+ xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"), BAD_CAST(OString::number(Which()).getStr()));
+ xmlTextWriterWriteAttribute(pWriter, BAD_CAST("nXPos"), BAD_CAST(OString::number(nXPos).getStr()));
+ xmlTextWriterWriteAttribute(pWriter, BAD_CAST("eOrient"), BAD_CAST(OString::number(eOrient).getStr()));
+ xmlTextWriterWriteAttribute(pWriter, BAD_CAST("eRelation"), BAD_CAST(OString::number(eRelation).getStr()));
+ xmlTextWriterWriteAttribute(pWriter, BAD_CAST("bPosToggle"), BAD_CAST(OString::boolean(bPosToggle).getStr()));
+ xmlTextWriterEndElement(pWriter);
+}
+
// Partially implemented inline in hxx
SwFmtAnchor::SwFmtAnchor( RndStdIds nRnd, sal_uInt16 nPage )
: SfxPoolItem( RES_ANCHOR ),
commit f0b4b944c1fc4ae894550fcade9cff1802780960
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Mon Dec 22 10:33:55 2014 +0100
Factor out SwFmtVertOrient::dumpAsXml() from nodedump
Change-Id: Ic1008f0879f121abf3786d7eda282cce189c461a
diff --git a/sw/inc/fmtornt.hxx b/sw/inc/fmtornt.hxx
index 17b08e8..9c72d89 100644
--- a/sw/inc/fmtornt.hxx
+++ b/sw/inc/fmtornt.hxx
@@ -62,6 +62,8 @@ public:
SwTwips GetPos() const { return m_nYPos; }
void SetPos( SwTwips nNew ) { m_nYPos = nNew; }
+
+ void dumpAsXml(struct _xmlTextWriter* pWriter) const;
};
class SW_DLLPUBLIC SwFmtHoriOrient: public SfxPoolItem
diff --git a/sw/source/core/docnode/nodedump.cxx b/sw/source/core/docnode/nodedump.cxx
index 7d18b65..7ada0a0 100644
--- a/sw/source/core/docnode/nodedump.cxx
+++ b/sw/source/core/docnode/nodedump.cxx
@@ -429,6 +429,9 @@ void lcl_dumpSfxItemSet(WriterHelper& writer, const SfxItemSet* pSet)
case RES_FRM_SIZE:
static_cast<const SwFmtFrmSize*>(pItem)->dumpAsXml(writer);
break;
+ case RES_VERT_ORIENT:
+ static_cast<const SwFmtVertOrient*>(pItem)->dumpAsXml(writer);
+ break;
default: bDone = false; break;
}
if (bDone)
@@ -443,13 +446,6 @@ void lcl_dumpSfxItemSet(WriterHelper& writer, const SfxItemSet* pSet)
boost::optional<OString> oValue;
switch (pItem->Which())
{
- case RES_VERT_ORIENT:
- {
- pWhich = "frame vertical orientation";
- const SwFmtVertOrient* pOrient = static_cast<const SwFmtVertOrient*>(pItem);
- oValue = "orient: " + OString::number(pOrient->GetVertOrient()) + ", relation: " + OString::number(pOrient->GetRelationOrient()) + ", position: " + OString::number(pOrient->GetPos());
- break;
- }
case RES_HORI_ORIENT:
{
pWhich = "frame horizontal orientation";
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx
index 79517f2..cdd9d25 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -1353,6 +1353,16 @@ bool SwFmtVertOrient::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
return bRet;
}
+void SwFmtVertOrient::dumpAsXml(xmlTextWriterPtr pWriter) const
+{
+ xmlTextWriterStartElement(pWriter, BAD_CAST("swFmtVertOrient"));
+ xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"), BAD_CAST(OString::number(Which()).getStr()));
+ xmlTextWriterWriteAttribute(pWriter, BAD_CAST("nYPos"), BAD_CAST(OString::number(m_nYPos).getStr()));
+ xmlTextWriterWriteAttribute(pWriter, BAD_CAST("eOrient"), BAD_CAST(OString::number(m_eOrient).getStr()));
+ xmlTextWriterWriteAttribute(pWriter, BAD_CAST("eRelation"), BAD_CAST(OString::number(m_eRelation).getStr()));
+ xmlTextWriterEndElement(pWriter);
+}
+
// Partially implemented inline in hxx
SwFmtHoriOrient::SwFmtHoriOrient( SwTwips nX, sal_Int16 eHori,
sal_Int16 eRel, bool bPos )
commit fe5527f1c6dc259af464a0593e86a2da2983b7ed
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Mon Dec 22 10:33:50 2014 +0100
desktop, sysui: let --convert-to imply --headless
It's easy to forget --headless before --convert-to, and it's hard to
image that would be intentional ever.
Change-Id: I18b85837239d9450743f05d94bb2673c7d13246d
diff --git a/desktop/source/app/cmdlineargs.cxx b/desktop/source/app/cmdlineargs.cxx
index 6f2c1a6..e776ed1 100644
--- a/desktop/source/app/cmdlineargs.cxx
+++ b/desktop/source/app/cmdlineargs.cxx
@@ -465,6 +465,8 @@ void CommandLineArgs::ParseCommandLine_Impl( Supplier& supplier )
bOpenEvent = false;
bConversionEvent = true;
bConversionParamsEvent = true;
+ // It doesn't make sense to use convert-to without headless.
+ setHeadless();
}
else if ( oArg == "print-to-file" )
{
diff --git a/desktop/source/app/cmdlinehelp.cxx b/desktop/source/app/cmdlinehelp.cxx
index 614fa5a..15db117 100644
--- a/desktop/source/app/cmdlinehelp.cxx
+++ b/desktop/source/app/cmdlinehelp.cxx
@@ -79,7 +79,7 @@ namespace desktop
"don't show startup screen.\n"\
"don't check for remote instances using the installation\n"\
"don't start with an empty document\n"\
- "like invisible but no userinteraction at all.\n"\
+ "like invisible but no user interaction at all (implies --headless).\n"\
"show this message and exit.\n"\
"display the version information.\n"\
"create new text document.\n"\
diff --git a/sysui/desktop/man/libreoffice.1 b/sysui/desktop/man/libreoffice.1
index 8847d53..f91101b 100644
--- a/sysui/desktop/man/libreoffice.1
+++ b/sysui/desktop/man/libreoffice.1
@@ -63,7 +63,7 @@ Starts with a new Calc document.
\fB\-\-convert\-to\fR output_file_extension[:output_filter_name] [\-\-outdir output_dir] \fIfile\fR...
Batch converts files.
If \fI\-\-outdir\fR is not specified then the current working directory is used as the output directory
-for the converted files.
+for the converted files. It implies \fI\-\-headless\fR.
Examples:
More information about the Libreoffice-commits
mailing list