[Libreoffice-commits] core.git: 2 commits - writerfilter/Library_writerfilter.mk writerfilter/source
writerfilter/Library_writerfilter.mk|1 writerfilter/source/resourcemodel/analyzerfooter|4 - writerfilter/source/resourcemodel/analyzerheader| 23 writerfilter/source/resourcemodel/resourcemodel.cxx | 57 writerfilter/source/resourcemodel/resourcemodel.hxx | 39 - 5 files changed, 124 deletions(-) New commits: commit be85be8c2a7c4d3bc34cbda365d2dcaacfe09241 Author: Miklos Vajna vmik...@collabora.co.uk Date: Sat Mar 15 21:04:37 2014 +0100 writerfilter: remove unused analyzer* Change-Id: I89ecd56b237feae000438915a0235eb58648805e diff --git a/writerfilter/source/resourcemodel/analyzerfooter b/writerfilter/source/resourcemodel/analyzerfooter deleted file mode 100644 index b24a236..000 --- a/writerfilter/source/resourcemodel/analyzerfooter +++ /dev/null @@ -1,4 +0,0 @@ -out /ids endl; -} - -} diff --git a/writerfilter/source/resourcemodel/analyzerheader b/writerfilter/source/resourcemodel/analyzerheader deleted file mode 100644 index ed14f50..000 --- a/writerfilter/source/resourcemodel/analyzerheader +++ /dev/null @@ -1,23 +0,0 @@ -/* - * 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 ooxml/resourceids.hxx -#include resourcemodel/QNameToString.hxx - -namespace writerfilter -{ commit 9ab8c3b3b74070f5e094f98dc8fa2963b1aad208 Author: Miklos Vajna vmik...@collabora.co.uk Date: Sat Mar 15 20:59:47 2014 +0100 unused WW8BinaryObjHandler Change-Id: Ief8c158a25393cc4e6259ebf9557e76b70554a63 diff --git a/writerfilter/Library_writerfilter.mk b/writerfilter/Library_writerfilter.mk index 9ba4aff..7003132 100644 --- a/writerfilter/Library_writerfilter.mk +++ b/writerfilter/Library_writerfilter.mk @@ -147,7 +147,6 @@ $(eval $(call gb_Library_add_exception_objects,writerfilter,\ writerfilter/source/resourcemodel/TagLogger \ writerfilter/source/resourcemodel/XPathLogger \ writerfilter/source/resourcemodel/qnametostrcore \ -writerfilter/source/resourcemodel/resourcemodel \ writerfilter/source/resourcemodel/util \ )) diff --git a/writerfilter/source/resourcemodel/resourcemodel.cxx b/writerfilter/source/resourcemodel/resourcemodel.cxx deleted file mode 100644 index c6779db..000 --- a/writerfilter/source/resourcemodel/resourcemodel.cxx +++ /dev/null @@ -1,57 +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 stdio.h -#include resourcemodel/WW8ResourceModel.hxx -#include resourcemodel/TableManager.hxx -#include resourcemodel/QNameToString.hxx -#include resourcemodel/exceptions.hxx -#include resourcemodel/SubSequence.hxx -#include resourcemodel/util.hxx -#include resourcemodel.hxx - -namespace writerfilter { - -class ResourceModelOutputWithDepth : public OutputWithDepthstring -{ -public: -ResourceModelOutputWithDepth() -: OutputWithDepthstring(tablegroup, /tablegroup) {} - -~ResourceModelOutputWithDepth() {outputGroup();} - -void output(const string str) const { cout str endl; } -}; - -ResourceModelOutputWithDepth output; - -// - WW8TableDataManager --- - -void WW8BinaryObjHandler::data -(const sal_uInt8 * buf, size_t length, - writerfilter::ReferenceProperties::Pointer_t /*pRef*/) -{ -SubSequencesal_uInt8 aSeq(buf, length); - -aSeq.dump(output); -} - -} - -/* vim:set
[Libreoffice-commits] core.git: 2 commits - writerfilter/Library_writerfilter.mk writerfilter/source
writerfilter/Library_writerfilter.mk |1 + writerfilter/source/dmapper/GraphicImport.cxx | 24 2 files changed, 25 insertions(+) New commits: commit 3dda94c22f83aa7133f5439d356f505c1831ec84 Author: Miklos Vajna vmik...@collabora.co.uk Date: Tue Jan 28 14:28:08 2014 +0100 DOCX import: initial support for wp14:sizeRelH/V relativeFrom For now just warn on unexpected values, and ignore margin, what is the only value supported by Writer. Change-Id: Ia4fc7293839610c1bbe2dceda2320a5ba2d3a15b diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx index 29300cd..7f2079a 100644 --- a/writerfilter/source/dmapper/GraphicImport.cxx +++ b/writerfilter/source/dmapper/GraphicImport.cxx @@ -733,6 +733,30 @@ void GraphicImport::lcl_attribute(Id nName, Value val) val.getString(); //TODO: does it need to be handled? break; +case NS_ooxml::LN_CT_SizeRelH_relativeFrom: +{ +switch (nIntValue) +{ +case NS_ooxml::LN_ST_SizeRelFromH_margin: +break; +default: +SAL_WARN(writerfilter, GraphicImport::lcl_attribute: unhandled NS_ooxml::LN_CT_SizeRelH_relativeFrom value: nIntValue); +break; +} +} +break; +case NS_ooxml::LN_CT_SizeRelV_relativeFrom: +{ +switch (nIntValue) +{ +case NS_ooxml::LN_ST_SizeRelFromV_margin: +break; +default: +SAL_WARN(writerfilter, GraphicImport::lcl_attribute: unhandled NS_ooxml::LN_CT_SizeRelV_relativeFrom value: nIntValue); +break; +} +} +break; default: #ifdef DEBUG_DMAPPER_GRAPHIC_IMPORT dmapper_logger-element(unhandled); commit 1eb516f5a5b1a7360e304f6015570d5c81e65cfd Author: Miklos Vajna vmik...@collabora.co.uk Date: Tue Jan 28 14:21:56 2014 +0100 writerfiler: define DEBUG_DMAPPER_GRAPHIC_IMPORT when dbglevel == 2 Change-Id: I8cfdb020d2b3e8ad886c0a9507e4eb8d0a29f87d diff --git a/writerfilter/Library_writerfilter.mk b/writerfilter/Library_writerfilter.mk index 9c88b38..71d798e 100644 --- a/writerfilter/Library_writerfilter.mk +++ b/writerfilter/Library_writerfilter.mk @@ -48,6 +48,7 @@ $(eval $(call gb_Library_add_defs,writerfilter,\ -DDEBUG_TABLE \ -DDEBUG_DMAPPER_SETTINGS_TABLE \ -DDEBUG_FACTORY \ + -DDEBUG_DMAPPER_GRAPHIC_IMPORT \ ) \ )) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 2 commits - writerfilter/Library_writerfilter.mk writerfilter/source
writerfilter/Library_writerfilter.mk |2 writerfilter/source/doctok/DffImpl.cxx | 264 --- writerfilter/source/doctok/WW8Annotation.cxx | 31 --- writerfilter/source/doctok/resources.xmi |3 4 files changed, 300 deletions(-) New commits: commit dc03d0defa0d3f17ff10df51f4a59e8f624e7f9f Author: Miklos Vajna vmik...@collabora.co.uk Date: Thu Nov 28 21:22:44 2013 +0100 writerfilter: remove unused WW8Annotation in doctok Change-Id: I30ae3416d795069246cb165c96342448c5b22011 diff --git a/writerfilter/Library_writerfilter.mk b/writerfilter/Library_writerfilter.mk index 1e1279e..05701cf 100644 --- a/writerfilter/Library_writerfilter.mk +++ b/writerfilter/Library_writerfilter.mk @@ -122,7 +122,6 @@ $(eval $(call gb_Library_add_exception_objects,writerfilter,\ writerfilter/source/dmapper/TblStylePrHandler \ writerfilter/source/dmapper/ThemeTable \ writerfilter/source/dmapper/WrapPolygonHandler \ -writerfilter/source/doctok/WW8Annotation \ writerfilter/source/doctok/WW8CpAndFc \ writerfilter/source/doctok/WW8FKPImpl \ writerfilter/source/doctok/WW8Picture \ diff --git a/writerfilter/source/doctok/WW8Annotation.cxx b/writerfilter/source/doctok/WW8Annotation.cxx deleted file mode 100644 index e616e28..000 --- a/writerfilter/source/doctok/WW8Annotation.cxx +++ /dev/null @@ -1,31 +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 doctok/resources.hxx - -namespace writerfilter { -namespace doctok -{ -OUString WW8ATRD::get_xstUsrInitl() -{ -return getString(0x0); -} -}} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/writerfilter/source/doctok/resources.xmi b/writerfilter/source/doctok/resources.xmi index 9706d75..409accf 100644 --- a/writerfilter/source/doctok/resources.xmi +++ b/writerfilter/source/doctok/resources.xmi @@ -28127,9 +28127,6 @@ !--Class FRD-- !--Class ATRD-- UML:Class xmi.id=ATRD name=ATRD - UML:ModelElement.stereotype -UML:Stereotype xmi.idref=ww8resource/ - /UML:ModelElement.stereotype UML:ModelElement.taggedValue UML:TaggedValue UML:TaggedValue.dataValue28/UML:TaggedValue.dataValue commit e8e293de1052543431d8196e6bfd19265a79f89b Author: Miklos Vajna vmik...@collabora.co.uk Date: Thu Nov 28 21:21:29 2013 +0100 writerfilter: remove unused DffImpl in doctok Change-Id: Ife6a9962b5aa6d2189e31924845df655a9ba41f2 diff --git a/writerfilter/Library_writerfilter.mk b/writerfilter/Library_writerfilter.mk index ff16aac..1e1279e 100644 --- a/writerfilter/Library_writerfilter.mk +++ b/writerfilter/Library_writerfilter.mk @@ -122,7 +122,6 @@ $(eval $(call gb_Library_add_exception_objects,writerfilter,\ writerfilter/source/dmapper/TblStylePrHandler \ writerfilter/source/dmapper/ThemeTable \ writerfilter/source/dmapper/WrapPolygonHandler \ -writerfilter/source/doctok/DffImpl \ writerfilter/source/doctok/WW8Annotation \ writerfilter/source/doctok/WW8CpAndFc \ writerfilter/source/doctok/WW8FKPImpl \ diff --git a/writerfilter/source/doctok/DffImpl.cxx b/writerfilter/source/doctok/DffImpl.cxx deleted file mode 100644 index 2c14d3e..000 --- a/writerfilter/source/doctok/DffImpl.cxx +++ /dev/null @@ -1,264 +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 -
[Libreoffice-commits] core.git: 2 commits - writerfilter/Library_writerfilter.mk writerfilter/source
writerfilter/Library_writerfilter.mk |1 writerfilter/source/rtftok/rtfdocumentimpl.cxx |9 + writerfilter/source/rtftok/rtflookahead.cxx| 130 + writerfilter/source/rtftok/rtflookahead.hxx| 56 ++ writerfilter/source/rtftok/rtftokenizer.cxx|9 + writerfilter/source/rtftok/rtftokenizer.hxx|2 6 files changed, 204 insertions(+), 3 deletions(-) New commits: commit 05f0859afba779ce28d24e3195d8266d616259d1 Author: Miklos Vajna vmik...@suse.cz Date: Fri Jul 5 17:38:12 2013 +0200 writerfilter: add RTFLookahead to be able to look ahead during import Change-Id: I1da765373c352c8a2aa486fe6210b16bf492728c diff --git a/writerfilter/Library_writerfilter.mk b/writerfilter/Library_writerfilter.mk index 1993590..4fab4aa 100644 --- a/writerfilter/Library_writerfilter.mk +++ b/writerfilter/Library_writerfilter.mk @@ -79,6 +79,7 @@ $(eval $(call gb_Library_add_exception_objects,writerfilter,\ writerfilter/source/rtftok/rtfcontrolwords \ writerfilter/source/rtftok/rtfdocumentfactory \ writerfilter/source/rtftok/rtfdocumentimpl \ + writerfilter/source/rtftok/rtflookahead \ writerfilter/source/rtftok/rtfreferenceproperties \ writerfilter/source/rtftok/rtfreferencetable \ writerfilter/source/rtftok/rtfsdrimport \ diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index 56d8a1b..73d06c4 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -49,6 +49,7 @@ #include rtfsdrimport.hxx #include rtftokenizer.hxx +#include rtflookahead.hxx #include rtfcharsets.hxx #include rtfreferenceproperties.hxx #include rtfskipdestination.hxx @@ -1679,8 +1680,12 @@ int RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword) m_aStates.top().bInBackground = true; break; case RTF_SHPGRP: -m_aStates.top().nDestinationState = DESTINATION_SHAPEGROUP; -m_aStates.top().bInShapeGroup = true; +{ +RTFLookahead aLookahead(Strm(), m_pTokenizer-getGroupStart()); +SAL_WARN_IF(!aLookahead.hasTable(), writerfilter, no table in groupshape, should create it!); +m_aStates.top().nDestinationState = DESTINATION_SHAPEGROUP; +m_aStates.top().bInShapeGroup = true; +} break; default: SAL_INFO(writerfilter, TODO handle destination ' lcl_RtfToString(nKeyword) '); diff --git a/writerfilter/source/rtftok/rtflookahead.cxx b/writerfilter/source/rtftok/rtflookahead.cxx new file mode 100644 index 000..0338efd --- /dev/null +++ b/writerfilter/source/rtftok/rtflookahead.cxx @@ -0,0 +1,130 @@ +/* -*- 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/. + */ + +#include boost/shared_ptr.hpp + +#include com/sun/star/task/XStatusIndicator.hpp +#include tools/stream.hxx + +#include rtflookahead.hxx + +using namespace com::sun::star; + +namespace writerfilter { +namespace rtftok { + +RTFLookahead::RTFLookahead(SvStream rStream, sal_Size nGroupStart) +: m_rStream(rStream), +m_bHasTable(false) +{ +sal_Size nPos = m_rStream.Tell(); +m_rStream.Seek(nGroupStart); +uno::Referencetask::XStatusIndicator xStatusIndicator; +m_pTokenizer.reset(new RTFTokenizer(*this, m_rStream, xStatusIndicator)); +m_pTokenizer-resolveParse(); +m_rStream.Seek(nPos); +} + +RTFLookahead::~RTFLookahead() +{ +} + +int RTFLookahead::dispatchDestination(RTFKeyword /*nKeyword*/) +{ +return 0; +} + +int RTFLookahead::dispatchFlag(RTFKeyword nKeyword) +{ +if (nKeyword == RTF_INTBL) +m_bHasTable = true; +return 0; +} + +int RTFLookahead::dispatchSymbol(RTFKeyword /*nKeyword*/) +{ +return 0; +} + +int RTFLookahead::dispatchToggle(RTFKeyword /*nKeyword*/, bool /*bParam*/, int /*nParam*/) +{ +return 0; +} + +int RTFLookahead::dispatchValue(RTFKeyword /*nKeyword*/, int /*nParam*/) +{ +return 0; +} + +int RTFLookahead::resolveChars(char ch) +{ +while(!m_rStream.IsEof() (ch != '{' ch != '}' ch != '\\')) +m_rStream ch; +if (!m_rStream.IsEof()) +m_rStream.SeekRel(-1); +return 0; +} + +int RTFLookahead::pushState() +{ +m_pTokenizer-pushGroup(); +return 0; +} + +int RTFLookahead::popState() +{ +m_pTokenizer-popGroup(); +return 0; +} + +RTFDestinationState RTFLookahead::getDestinationState() +{ +return DESTINATION_NORMAL; +} + +void RTFLookahead::setDestinationState(RTFDestinationState /*nDestinationState*/) +{ +} + +RTFInternalState RTFLookahead::getInternalState() +{ +