[Libreoffice-commits] core.git: 4 commits - sw/source writerfilter/source
sw/source/filter/ww8/docxattributeoutput.cxx | 27 - sw/source/filter/ww8/rtfexport.cxx | 11 ++ sw/source/filter/ww8/rtfsdrexport.cxx |4 +-- writerfilter/source/rtftok/rtfdocumentimpl.cxx |6 +++-- 4 files changed, 22 insertions(+), 26 deletions(-) New commits: commit 1eb67b0d7ea8e428a576184156b8be3ad0f2b752 Author: Miklos Vajna vmik...@collabora.co.uk Date: Sat Feb 7 17:06:42 2015 +0100 ww8 export: indentation fixes Change-Id: I0416b782ff04e060a03b4e0494513f16bda14d6b diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 6b191ea..16770ae 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -4285,19 +4285,19 @@ bool DocxAttributeOutput::WriteOLEChart( const SdrObject* pSdrObj, const Size r */ void DocxAttributeOutput::WritePostponedChart() { - if(m_postponedChart == NULL) -return; - uno::Reference chart2::XChartDocument xChartDoc; - uno::Reference drawing::XShape xShape( const_castSdrObject*(m_postponedChart)-getUnoShape(), uno::UNO_QUERY ); - if( xShape.is() ) - { -uno::Reference beans::XPropertySet xPropSet( xShape, uno::UNO_QUERY ); -if( xPropSet.is() ) -xChartDoc.set( xPropSet-getPropertyValue( Model ), uno::UNO_QUERY ); - } +if(m_postponedChart == NULL) +return; +uno::Reference chart2::XChartDocument xChartDoc; +uno::Reference drawing::XShape xShape( const_castSdrObject*(m_postponedChart)-getUnoShape(), uno::UNO_QUERY ); +if( xShape.is() ) +{ +uno::Reference beans::XPropertySet xPropSet( xShape, uno::UNO_QUERY ); +if( xPropSet.is() ) +xChartDoc.set( xPropSet-getPropertyValue( Model ), uno::UNO_QUERY ); +} - if( xChartDoc.is() ) - { +if( xChartDoc.is() ) +{ OSL_TRACE(DocxAttributeOutput::WriteOLE2Obj: export chart ); m_pSerializer-startElementNS( XML_w, XML_drawing, FSEND ); @@ -4360,8 +4360,7 @@ void DocxAttributeOutput::WritePostponedChart() m_pSerializer-endElementNS( XML_w, XML_drawing ); } -m_postponedChart = NULL; -return; +m_postponedChart = NULL; } bool DocxAttributeOutput::WriteOLEMath( const SdrObject*, const SwOLENode rOLENode, const Size ) diff --git a/sw/source/filter/ww8/rtfsdrexport.cxx b/sw/source/filter/ww8/rtfsdrexport.cxx index 574215e..49fb111 100644 --- a/sw/source/filter/ww8/rtfsdrexport.cxx +++ b/sw/source/filter/ww8/rtfsdrexport.cxx @@ -259,8 +259,8 @@ void RtfSdrExport::Commit(EscherPropertyContainer rProps, const Rectangle rRec EscherPropSortStruct aSegments; if (rProps.GetOpt(ESCHER_Prop_pVertices, aVertices) -rProps.GetOpt(ESCHER_Prop_pSegmentInfo, aSegments) -aVertices.nPropSize = 6 aSegments.nPropSize = 6) +rProps.GetOpt(ESCHER_Prop_pSegmentInfo, aSegments) +aVertices.nPropSize = 6 aSegments.nPropSize = 6) { const sal_uInt8* pVerticesIt = aVertices.pBuf + 6; sal_Size nVerticesPos = 6; commit 105ebb9c0adcf421b0b89600216aa18041c179e3 Author: Miklos Vajna vmik...@collabora.co.uk Date: Sat Feb 7 16:15:34 2015 +0100 Use std::initializer_list ctor Change-Id: Ib04460fe7bd33cb9b6c4fef4fc285e93c71e57c3 diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index b937b5d..73287ce 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -4628,8 +4628,10 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam) rDrawingObject.nPolyLineCount--; if (rDrawingObject.nPolyLineCount == 0) { -uno::Sequence uno::Sequenceawt::Point aPointSequenceSequence(1); -aPointSequenceSequence[0] = comphelper::containerToSequence(rDrawingObject.aPolyLinePoints); +uno::Sequence uno::Sequenceawt::Point aPointSequenceSequence = +{ + comphelper::containerToSequence(rDrawingObject.aPolyLinePoints) +}; rDrawingObject.xPropertySet-setPropertyValue(PolyPolygon, uno::Any(aPointSequenceSequence)); } } commit 6158c9a899db83e04c78a1c949418434a89d4fdc Author: Miklos Vajna vmik...@collabora.co.uk Date: Sat Feb 7 16:07:03 2015 +0100 Unused 'using namespace ::comphelper' Change-Id: I5605c26fe0abd4c064b20562bf52b5e400bc7f33 diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx index 01931bc..068e59d 100644 --- a/sw/source/filter/ww8/rtfexport.cxx +++ b/sw/source/filter/ww8/rtfexport.cxx @@ -46,12 +46,8 @@ #endif #include svx/xflclit.hxx
[Libreoffice-commits] core.git: 4 commits - sw/source writerfilter/source
sw/source/core/docnode/nodedump.cxx | 23 +++ writerfilter/source/dmapper/DomainMapper.cxx | 43 + writerfilter/source/ooxml/model.xml | 194 ++- 3 files changed, 102 insertions(+), 158 deletions(-) New commits: commit 3820a1611b399a318c86a41c3355d6887a4dd1b4 Author: Miklos Vajna vmik...@collabora.co.uk Date: Fri Aug 8 15:18:01 2014 +0200 DOCX import: handle date SDT in headers/footers Turns out form controls are not allowed in headers/footers (see the comment in the patch), so if that happens, then just fall back to what we already do for other SDT types. Change-Id: Icc79c2a825e9eb2a85980489812a4178fde37576 diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index 40c3afa..0da5178 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -944,7 +944,10 @@ void DomainMapper::lcl_attribute(Id nName, Value val) m_pImpl-m_pSdtHelper-getDropDownItems().push_back(sStringValue); break; case NS_ooxml::LN_CT_SdtDate_fullDate: -m_pImpl-m_pSdtHelper-getDate().append(sStringValue); +if (!IsInHeaderFooter()) +m_pImpl-m_pSdtHelper-getDate().append(sStringValue); +else +m_pImpl-appendGrabBag(m_pImpl-m_aInteropGrabBag, ooxml:CT_SdtDate_fullDate, sStringValue); break; case NS_ooxml::LN_CT_Background_color: m_pImpl-m_oBackgroundColor.reset(nIntValue); @@ -2351,19 +2354,44 @@ void DomainMapper::sprmWithProps( Sprm rSprm, PropertyMapPtr rContext ) break; case NS_ooxml::LN_CT_SdtPr_date: { -writerfilter::ReferenceProperties::Pointer_t pProperties = rSprm.getProps(); -if (pProperties.get() != NULL) -pProperties-resolve(*this); +if (!IsInHeaderFooter()) +resourcemodel::resolveSprmProps(*this, rSprm); +else +{ +OUString sName = ooxml::CT_SdtPr_date; +enableInteropGrabBag(sName); +resourcemodel::resolveSprmProps(*this, rSprm); +m_pImpl-m_pSdtHelper-appendToInteropGrabBag(getInteropGrabBag()); +m_pImpl-disableInteropGrabBag(); +} } break; case NS_ooxml::LN_CT_SdtDate_dateFormat: { -m_pImpl-m_pSdtHelper-getDateFormat().append(sStringValue); +if (!IsInHeaderFooter()) +m_pImpl-m_pSdtHelper-getDateFormat().append(sStringValue); +else +m_pImpl-appendGrabBag(m_pImpl-m_aInteropGrabBag, ooxml:CT_SdtDate_dateFormat, sStringValue); +} +break; +case NS_ooxml::LN_CT_SdtDate_storeMappedDataAs: +{ +if (IsInHeaderFooter()) +m_pImpl-appendGrabBag(m_pImpl-m_aInteropGrabBag, ooxml:CT_SdtDate_storeMappedDataAs, sStringValue); +} +break; +case NS_ooxml::LN_CT_SdtDate_calendar: +{ +if (IsInHeaderFooter()) +m_pImpl-appendGrabBag(m_pImpl-m_aInteropGrabBag, ooxml:CT_SdtDate_calendar, sStringValue); } break; case NS_ooxml::LN_CT_SdtDate_lid: { -m_pImpl-m_pSdtHelper-getLocale().append(sStringValue); +if (!IsInHeaderFooter()) +m_pImpl-m_pSdtHelper-getLocale().append(sStringValue); +else +m_pImpl-appendGrabBag(m_pImpl-m_aInteropGrabBag, ooxml:CT_SdtDate_lid, sStringValue); } break; case NS_ooxml::LN_CT_SdtPr_dataBinding: @@ -2914,7 +2942,8 @@ void DomainMapper::lcl_utext(const sal_uInt8 * data_, size_t len) m_pImpl-m_pSdtHelper-getSdtTexts().append(sText); return; } -else if (!m_pImpl-m_pSdtHelper-getDateFormat().isEmpty()) +// Form controls are not allowed in headers / footers; see sw::DocumentContentOperationsManager::InsertDrawObj() +else if (!m_pImpl-m_pSdtHelper-getDateFormat().isEmpty() !IsInHeaderFooter()) { /* * Here we assume w:sdt only contains a single text token. We need to commit d1ebad2077d2b2b9edbaec090f38468393874a07 Author: Miklos Vajna vmik...@collabora.co.uk Date: Fri Aug 8 14:55:35 2014 +0200 DOCX import: tokenize CT_SdtDate / storeMappedDataAs and calendar Change-Id: I7d47e7db08637488975b834f7cc72fe1251a14d3 diff --git a/writerfilter/source/ooxml/model.xml b/writerfilter/source/ooxml/model.xml index 0c84d0f..9083de0 100644 --- a/writerfilter/source/ooxml/model.xml +++ b/writerfilter/source/ooxml/model.xml @@ -22866,6 +22866,8 @@ attribute name=fullDate tokenid=ooxml:CT_SdtDate_fullDate/ element name=dateFormat tokenid=ooxml:CT_SdtDate_dateFormat/ element name=lid tokenid=ooxml:CT_SdtDate_lid/ + element name=storeMappedDataAs tokenid=ooxml:CT_SdtDate_storeMappedDataAs/ + element name=calendar tokenid=ooxml:CT_SdtDate_calendar/ /resource resource name=CT_SdtDocPart resource=Properties element name=docPartGallery
[Libreoffice-commits] core.git: 4 commits - sw/source writerfilter/source
sw/source/core/doc/docbm.cxx |6 ++- writerfilter/source/ooxml/effort.xsl | 63 --- writerfilter/source/ooxml/rngtocxx | 50 --- 3 files changed, 4 insertions(+), 115 deletions(-) New commits: commit 309a2dabab52dc1498ddbf69b19232e3ad9e88c4 Author: Miklos Vajna vmik...@collabora.co.uk Date: Sun May 25 20:11:36 2014 +0200 coverity#1158083 Unchecked dynamic_cast Change-Id: I8213e0c8e6228320c6efcba5e42e58e87e0379b9 diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx index e396bc2..dc54734 100644 --- a/sw/source/core/doc/docbm.cxx +++ b/sw/source/core/doc/docbm.cxx @@ -1736,8 +1736,8 @@ void _RestoreCntntIdx(SwDoc* pDoc, switch( aSave.GetType() ) { case 0x8000: +if (MarkBase* pMark = dynamic_castMarkBase*(pMarkAccess-getAllMarksBegin()[aSave.GetCount()].get())) { -MarkBase* pMark = dynamic_castMarkBase*(pMarkAccess-getAllMarksBegin()[aSave.GetCount()].get()); SwPosition aNewPos(pMark-GetMarkPos()); aNewPos.nNode = *pCNd; aNewPos.nContent.Assign(pCNd, aSave.GetContent() + nOffset); @@ -1745,8 +1745,8 @@ void _RestoreCntntIdx(SwDoc* pDoc, } break; case 0x8001: +if (MarkBase* pMark = dynamic_castMarkBase*(pMarkAccess-getAllMarksBegin()[aSave.GetCount()].get())) { -MarkBase* pMark = dynamic_castMarkBase*(pMarkAccess-getAllMarksBegin()[aSave.GetCount()].get()); SwPosition aNewPos(pMark-GetOtherMarkPos()); aNewPos.nNode = *pCNd; aNewPos.nContent.Assign(pCNd, aSave.GetContent() + nOffset); commit eedae0444722923e85766d4b2843ac4e2171c3de Author: Miklos Vajna vmik...@collabora.co.uk Date: Sun May 25 20:05:01 2014 +0200 coverity#1158082 Unchecked dynamic_cast Change-Id: Ia70d73d64af020c546a0218b996334959ca6b624 diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx index 21de483..e396bc2 100644 --- a/sw/source/core/doc/docbm.cxx +++ b/sw/source/core/doc/docbm.cxx @@ -616,6 +616,8 @@ namespace sw { namespace mark // is on position ?? bool bChangedPos = false, bChangedOPos = false; ::sw::mark::MarkBase* const pMark = dynamic_cast ::sw::mark::MarkBase* (ppMark-get()); +if (!pMark) +continue; if(pMark-GetMarkPos().nNode.GetNode() == pOldNode) { SwPosition aNewPosRel(aNewPos); commit 8282656f851ceec7b50d4a8352bb76d7e7219ff0 Author: Miklos Vajna vmik...@collabora.co.uk Date: Sun May 25 19:58:18 2014 +0200 writerfilter: remove unused rngtocxx Change-Id: I780aff48f55bdc4f903404472f22f3fb4bb6968c diff --git a/writerfilter/source/ooxml/rngtocxx b/writerfilter/source/ooxml/rngtocxx deleted file mode 100755 index bb91c2a..000 --- a/writerfilter/source/ooxml/rngtocxx +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/sh -# -# 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 . -# - -xalan -xsl modelpreprocess.xsl -in model.xml model_processed.xml -xalan -xsl resourcestokens.xsl -in model_processed.xml OOXMLtokens.hxx -xalan -xsl resources.xsl -in model_processed.xml OOXMLresources.hxx -xalan -xsl resourcesimpl.xsl -in model_processed.xml OOXMLresources.cxx -xalan -xsl resourcesimpl_dml-baseStylesheet.xsl -in model_processed.xml OOXMLresources_dml-baseStylesheet.cxx -xalan -xsl resourcesimpl_dml-baseTypes.xsl -in model_processed.xml OOXMLresources_dml-baseTypes.cxx -xalan -xsl resourcesimpl_dml-chartDrawing.xsl -in model_processed.xml OOXMLresources_dml-chartDrawing.cxx -xalan -xsl resourcesimpl_dml-documentProperties.xsl -in model_processed.xml OOXMLresources_dml-documentProperties.cxx -xalan -xsl resourcesimpl_dml-graphicalObject.xsl -in model_processed.xml OOXMLresources_dml-graphicalObject.cxx -xalan -xsl resourcesimpl_dml-shape3DCamera.xsl -in model_processed.xml OOXMLresources_dml-shape3DCamera.cxx -xalan -xsl resourcesimpl_dml-shape3DLighting.xsl -in model_processed.xml OOXMLresources_dml-shape3DLighting.cxx -xalan -xsl