filter/source/msfilter/msdffimp.cxx | 11 - include/oox/drawingml/table/tableproperties.hxx | 2 oox/source/drawingml/table/tableproperties.cxx | 146 +++++++++++++++++++++- sw/source/core/unocore/unotext.cxx | 12 + writerfilter/source/dmapper/DomainMapper.cxx | 21 +-- writerfilter/source/dmapper/DomainMapper_Impl.cxx | 4 writerfilter/source/dmapper/DomainMapper_Impl.hxx | 4 7 files changed, 177 insertions(+), 23 deletions(-)
New commits: commit 43f2bd4c785174a58decebf259cd66cf78440e8b Author: Jian Fang Zhang <zhan...@apache.org> Date: Tue Sep 4 07:11:49 2012 +0000 Related: #i119607#, text font spacing in comments doesn't expand/condense... by the expected value Found by: xiao ting xiao, tingxi...@gmail.com Patch by: bjcheny, compan...@gmail.com Review by: zhangjf (cherry picked from commit 11fda1bd134b07c5bcaca6186d63107ec9f47b98) Conflicts: writerfilter/source/dmapper/DomainMapper.cxx writerfilter/source/dmapper/DomainMapper_Impl.cxx writerfilter/source/dmapper/DomainMapper_Impl.hxx Change-Id: Iecdaee97e49395df59719d724e1544e1802d947d (cherry picked from commit 5f0c969f43538e8a92ed37c27fab228d97b1bebe) diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index 86387e9..91d5d94 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -2217,10 +2217,17 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType case 71 : //"sprmCDxaSpace" case 96 : //"sprmCDxaSpace" case NS_sprm::LN_CDxaSpace: // sprmCDxaSpace - //Kerning half point values - //TODO: there are two kerning values - - // in ww8par6.cxx NS_sprm::LN_CHpsKern is used as boolean AutoKerning - rContext->Insert(PROP_CHAR_CHAR_KERNING, true, uno::makeAny( sal_Int16(ConversionHelper::convertTwipToMM100(sal_Int16(nIntValue))) ) ); + { + //Kerning half point values + //TODO: there are two kerning values - + // in ww8par6.cxx NS_sprm::LN_CHpsKern is used as boolean AutoKerning + sal_Int16 nResult = static_cast<sal_Int16>(ConversionHelper::convertTwipToMM100(nIntValue)); + if (m_pImpl->IsInComments()) + { + nResult = static_cast<sal_Int16>(nIntValue); + } + rContext->Insert(PROP_CHAR_CHAR_KERNING, true, uno::makeAny(nResult)); + } break; case NS_sprm::LN_CHpsKern: // sprmCHpsKern auto kerning is bound to a minimum font size in Word - but not in Writer :-( rContext->Insert(PROP_CHAR_AUTO_KERNING, true, uno::makeAny( sal_Bool(nIntValue) ) ); diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index adf5870..fbc633d 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -182,6 +182,7 @@ DomainMapper_Impl::DomainMapper_Impl( m_bParaChanged( false ), m_bIsFirstParaInSection( true ), m_bIsLastParaInSection( false ), + m_bIsInComments( false ), m_bParaSectpr( false ), m_bUsingEnhancedFields( false ), m_bSdt(false), @@ -189,6 +190,7 @@ DomainMapper_Impl::DomainMapper_Impl( m_bIsNewDoc(bIsNewDoc), m_bInTableStyleRunProps(false), m_pSdtHelper(0) + { appendTableManager( ); GetBodyText(); @@ -1571,6 +1573,7 @@ void DomainMapper_Impl::PushAnnotation() try { PropertyMapPtr pTopContext = GetTopContext(); + m_bIsInComments = true; if (!GetTextFactory().is()) return; m_xAnnotationField = uno::Reference< beans::XPropertySet >( GetTextFactory()->createInstance( @@ -1600,6 +1603,7 @@ void DomainMapper_Impl::PopAnnotation() { RemoveLastParagraph(); + m_bIsInComments = false; m_aTextAppendStack.pop(); try diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx b/writerfilter/source/dmapper/DomainMapper_Impl.hxx index 6864c7b..f88f494 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx @@ -363,6 +363,7 @@ private: bool m_bParaChanged; bool m_bIsFirstParaInSection; bool m_bIsLastParaInSection; + bool m_bIsInComments; /// If the current paragraph contains section property definitions. bool m_bParaSectpr; bool m_bUsingEnhancedFields; @@ -634,7 +635,10 @@ public: void SetCustomFtnMark(bool bSet) { m_bIsCustomFtnMark = bSet; } bool IsCustomFtnMark() const { return m_bIsCustomFtnMark; } + bool IsInComments() const { return m_bIsInComments; }; + void CheckUnregisteredFrameConversion( ); + void RegisterFrameConversion( ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > xFrameStartRange, ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > xFrameEndRange, commit 231b393b14012959f3271e522c2829c177068bc5 Author: Xisco Fauli <aniste...@gmail.com> Date: Sun Jun 2 23:58:27 2013 +0200 Don't merge this file Change-Id: I5efca8bf4969252198e06ac3309064e8d69c0e55 (cherry picked from commit 355329a3cdbd8e4f2b7c6032ba0538a9a2a13d86) diff --git a/oox/inc/oox/drawingml/table/tableproperties.hxx b/oox/inc/oox/drawingml/table/tableproperties.hxx deleted file mode 100644 index 2928966..0000000 --- a/oox/inc/oox/drawingml/table/tableproperties.hxx +++ /dev/null @@ -1,83 +0,0 @@ -/************************************************************** - * - * 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 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - *************************************************************/ - - - -#ifndef OOX_DRAWINGML_TABLEPROPERTIES_HXX -#define OOX_DRAWINGML_TABLEPROPERTIES_HXX - -#include "oox/drawingml/table/tablerow.hxx" -#include "oox/drawingml/table/tablestyle.hxx" -#include "oox/helper/propertymap.hxx" -#include "oox/drawingml/color.hxx" - -#include <boost/shared_ptr.hpp> -#include <boost/optional.hpp> -#include <vector> -#include <map> - -namespace oox { namespace drawingml { namespace table { - -class TableProperties -{ -public: - - TableProperties(); - ~TableProperties(); - - std::vector< sal_Int32 >& getTableGrid() { return mvTableGrid; }; - std::vector< TableRow >& getTableRows() { return mvTableRows; }; - - rtl::OUString& getStyleId(){ return maStyleId; }; - boost::shared_ptr< TableStyle >& getTableStyle(){ return mpTableStyle; }; - sal_Bool& isRtl(){ return mbRtl; }; - sal_Bool& isFirstRow(){ return mbFirstRow; }; - sal_Bool& isFirstCol(){ return mbFirstCol; }; - sal_Bool& isLastRow(){ return mbLastRow; }; - sal_Bool& isLastCol(){ return mbLastCol; }; - sal_Bool& isBandRow(){ return mbBandRow; }; - sal_Bool& isBandCol(){ return mbBandCol; }; - - void apply( const TablePropertiesPtr& ); - void pushToPropSet( const ::oox::core::XmlFilterBase& rFilterBase, - const ::com::sun::star::uno::Reference < ::com::sun::star::beans::XPropertySet > & xPropSet, ::oox::drawingml::TextListStylePtr pMasterTextListStyle ); - -private: - - const TableStyle& getUsedTableStyle( const ::oox::core::XmlFilterBase& rFilterBase, sal_Bool &isCreateTabStyle); - - rtl::OUString maStyleId; // either StyleId is available - boost::shared_ptr< TableStyle > mpTableStyle; // or the complete TableStyle - std::vector< sal_Int32 > mvTableGrid; - std::vector< TableRow > mvTableRows; - - sal_Bool mbRtl; - sal_Bool mbFirstRow; - sal_Bool mbFirstCol; - sal_Bool mbLastRow; - sal_Bool mbLastCol; - sal_Bool mbBandRow; - sal_Bool mbBandCol; -}; - -} } } - -#endif // OOX_DRAWINGML_TABLEPROPERTIES_HXX commit 9e0c008771efcb93a84c66bd27b369636472d468 Author: Zhe Wang <wangz...@apache.org> Date: Fri Sep 7 03:49:09 2012 +0000 Fix issue #i120723#: Table style is lost when import PPTX by AOO * subversion/main/oox/inc/oox/drawingml/table/tableproperties.hxx * subversion/main/oox/source/drawingml/table/tableproperties.cxx []if the imported table in pptx just have tableStyleId, should fill the tablestyle's content. Patch by: Ma Bingbing <jiaz...@gmail.com> Suggested by: Wang Zhe <kingwise...@gmail.com> Found by:Ma Bingbing <jiaz...@gmail.com> Review by: Wang Zhe <kingwise...@gmail.com>(cherry picked from commit 74b1435a4d39eac71e36fb1c387b24af4b353fa0) Conflicts: oox/inc/oox/drawingml/table/tableproperties.hxx oox/source/drawingml/table/tableproperties.cxx Change-Id: I554169522a95343662781c3f169c6485c38a6800 (cherry picked from commit f39f7ba614749d99362a2059919521eee6bdb6fc) diff --git a/include/oox/drawingml/table/tableproperties.hxx b/include/oox/drawingml/table/tableproperties.hxx index 8c584b1..da5462b 100644 --- a/include/oox/drawingml/table/tableproperties.hxx +++ b/include/oox/drawingml/table/tableproperties.hxx @@ -57,7 +57,7 @@ public: private: - const TableStyle& getUsedTableStyle( const ::oox::core::XmlFilterBase& rFilterBase ); + const TableStyle& getUsedTableStyle( const ::oox::core::XmlFilterBase& rFilterBase, sal_Bool &isCreateTabStyle); OUString maStyleId; // either StyleId is available boost::shared_ptr< TableStyle > mpTableStyle; // or the complete TableStyle diff --git a/oox/inc/oox/drawingml/table/tableproperties.hxx b/oox/inc/oox/drawingml/table/tableproperties.hxx new file mode 100644 index 0000000..2928966 --- /dev/null +++ b/oox/inc/oox/drawingml/table/tableproperties.hxx @@ -0,0 +1,83 @@ +/************************************************************** + * + * 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 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + *************************************************************/ + + + +#ifndef OOX_DRAWINGML_TABLEPROPERTIES_HXX +#define OOX_DRAWINGML_TABLEPROPERTIES_HXX + +#include "oox/drawingml/table/tablerow.hxx" +#include "oox/drawingml/table/tablestyle.hxx" +#include "oox/helper/propertymap.hxx" +#include "oox/drawingml/color.hxx" + +#include <boost/shared_ptr.hpp> +#include <boost/optional.hpp> +#include <vector> +#include <map> + +namespace oox { namespace drawingml { namespace table { + +class TableProperties +{ +public: + + TableProperties(); + ~TableProperties(); + + std::vector< sal_Int32 >& getTableGrid() { return mvTableGrid; }; + std::vector< TableRow >& getTableRows() { return mvTableRows; }; + + rtl::OUString& getStyleId(){ return maStyleId; }; + boost::shared_ptr< TableStyle >& getTableStyle(){ return mpTableStyle; }; + sal_Bool& isRtl(){ return mbRtl; }; + sal_Bool& isFirstRow(){ return mbFirstRow; }; + sal_Bool& isFirstCol(){ return mbFirstCol; }; + sal_Bool& isLastRow(){ return mbLastRow; }; + sal_Bool& isLastCol(){ return mbLastCol; }; + sal_Bool& isBandRow(){ return mbBandRow; }; + sal_Bool& isBandCol(){ return mbBandCol; }; + + void apply( const TablePropertiesPtr& ); + void pushToPropSet( const ::oox::core::XmlFilterBase& rFilterBase, + const ::com::sun::star::uno::Reference < ::com::sun::star::beans::XPropertySet > & xPropSet, ::oox::drawingml::TextListStylePtr pMasterTextListStyle ); + +private: + + const TableStyle& getUsedTableStyle( const ::oox::core::XmlFilterBase& rFilterBase, sal_Bool &isCreateTabStyle); + + rtl::OUString maStyleId; // either StyleId is available + boost::shared_ptr< TableStyle > mpTableStyle; // or the complete TableStyle + std::vector< sal_Int32 > mvTableGrid; + std::vector< TableRow > mvTableRows; + + sal_Bool mbRtl; + sal_Bool mbFirstRow; + sal_Bool mbFirstCol; + sal_Bool mbLastRow; + sal_Bool mbLastCol; + sal_Bool mbBandRow; + sal_Bool mbBandCol; +}; + +} } } + +#endif // OOX_DRAWINGML_TABLEPROPERTIES_HXX diff --git a/oox/source/drawingml/table/tableproperties.cxx b/oox/source/drawingml/table/tableproperties.cxx index 440a0a5..b617ac9 100644 --- a/oox/source/drawingml/table/tableproperties.cxx +++ b/oox/source/drawingml/table/tableproperties.cxx @@ -99,7 +99,132 @@ namespace struct theDefaultTableStyle : public ::rtl::Static< TableStyle, theDefaultTableStyle > {}; } -const TableStyle& TableProperties::getUsedTableStyle( const ::oox::core::XmlFilterBase& rFilterBase ) +//for pptx just has table style id +static void SetTableStyleProperties(TableStyle* &pTableStyle , const sal_Int32& tblFillClr,const sal_Int32& tblTextClr, const sal_Int32& lineBdrClr) +{ + //whole table fill style and color + oox::drawingml::FillPropertiesPtr pWholeTabFillProperties( new oox::drawingml::FillProperties ); + pWholeTabFillProperties->moFillType.set(XML_solidFill); + pWholeTabFillProperties->maFillColor.setSchemeClr(tblFillClr); + pWholeTabFillProperties->maFillColor.addTransformation(XML_tint,20000); + pTableStyle->getWholeTbl().getFillProperties() = pWholeTabFillProperties; + //whole table text color + ::oox::drawingml::Color tableTextColor; + tableTextColor.setSchemeClr(tblTextClr); + pTableStyle->getWholeTbl().getTextColor() = tableTextColor; + //whole table line border + oox::drawingml::LinePropertiesPtr pLeftBorder( new oox::drawingml::LineProperties); + pLeftBorder->moLineWidth = 12700; + pLeftBorder->moPresetDash = XML_sng; + pLeftBorder->maLineFill.moFillType.set(XML_solidFill); + pLeftBorder->maLineFill.maFillColor.setSchemeClr(lineBdrClr); + pTableStyle->getWholeTbl().getLineBorders().insert(std::pair<sal_Int32, ::oox::drawingml::LinePropertiesPtr>(XML_left,pLeftBorder)); + pTableStyle->getWholeTbl().getLineBorders().insert(std::pair<sal_Int32, ::oox::drawingml::LinePropertiesPtr>(XML_right,pLeftBorder)); + pTableStyle->getWholeTbl().getLineBorders().insert(std::pair<sal_Int32, ::oox::drawingml::LinePropertiesPtr>(XML_top,pLeftBorder)); + pTableStyle->getWholeTbl().getLineBorders().insert(std::pair<sal_Int32, ::oox::drawingml::LinePropertiesPtr>(XML_bottom,pLeftBorder)); + pTableStyle->getWholeTbl().getLineBorders().insert(std::pair<sal_Int32, ::oox::drawingml::LinePropertiesPtr>(XML_insideH,pLeftBorder)); + pTableStyle->getWholeTbl().getLineBorders().insert(std::pair<sal_Int32, ::oox::drawingml::LinePropertiesPtr>(XML_insideV,pLeftBorder)); + + //Band1H style + oox::drawingml::FillPropertiesPtr pBand1HFillProperties( new oox::drawingml::FillProperties ); + pBand1HFillProperties->moFillType.set(XML_solidFill); + pBand1HFillProperties->maFillColor.setSchemeClr(tblFillClr); + pBand1HFillProperties->maFillColor.addTransformation(XML_tint,40000); + pTableStyle->getBand1H().getFillProperties() = pBand1HFillProperties; + + //Band1V style + pTableStyle->getBand1V().getFillProperties() = pBand1HFillProperties; + + //tet bold for 1st row/last row/column + ::boost::optional< sal_Bool > textBoldStyle(sal_True); + pTableStyle->getFirstRow().getTextBoldStyle() = textBoldStyle; + pTableStyle->getLastRow().getTextBoldStyle() = textBoldStyle; + pTableStyle->getFirstCol().getTextBoldStyle() = textBoldStyle; + pTableStyle->getLastCol().getTextBoldStyle() = textBoldStyle; +} + + sal_Bool CreateTableStyle(TableStyle* &pTableStyle , const OUString& styleId) +{ + sal_Bool createdTblStyle = sal_False; + if(!styleId.compareToAscii("{5C22544A-7EE6-4342-B048-85BDC9FD1C3A}")){ //Medium Style 2 Accenat 1 + pTableStyle = new TableStyle(); + createdTblStyle = sal_True; + //first row style + //fill color and type + oox::drawingml::FillPropertiesPtr pFstRowFillProperties( new oox::drawingml::FillProperties ); + pFstRowFillProperties->moFillType.set(XML_solidFill); + pFstRowFillProperties->maFillColor.setSchemeClr(XML_accent1); + pTableStyle->getFirstRow().getFillProperties() = pFstRowFillProperties; + //text color + ::oox::drawingml::Color fstRowTextColor; + fstRowTextColor.setSchemeClr(XML_lt1); + pTableStyle->getFirstRow().getTextColor() = fstRowTextColor; + //bottom line border + oox::drawingml::LinePropertiesPtr pFstBottomBorder( new oox::drawingml::LineProperties); + pFstBottomBorder->moLineWidth = 38100; + pFstBottomBorder->moPresetDash = XML_sng; + pFstBottomBorder->maLineFill.moFillType.set(XML_solidFill); + pFstBottomBorder->maLineFill.maFillColor.setSchemeClr(XML_lt1); + pTableStyle->getFirstRow().getLineBorders().insert(std::pair<sal_Int32, ::oox::drawingml::LinePropertiesPtr>(XML_bottom,pFstBottomBorder)); + + //last row style + pTableStyle->getLastRow().getFillProperties() = pFstRowFillProperties; + pTableStyle->getLastRow().getTextColor() = fstRowTextColor; + pTableStyle->getLastRow().getLineBorders().insert(std::pair<sal_Int32, ::oox::drawingml::LinePropertiesPtr>(XML_top,pFstBottomBorder)); + + //first column style + pTableStyle->getFirstRow().getFillProperties() = pFstRowFillProperties; + pTableStyle->getFirstRow().getTextColor() = fstRowTextColor; + + //last column style + pTableStyle->getLastCol().getFillProperties() = pFstRowFillProperties; + pTableStyle->getLastCol().getTextColor() = fstRowTextColor; + + SetTableStyleProperties(pTableStyle, XML_accent1, XML_dk1, XML_lt1); + } + else if (!styleId.compareToAscii("{21E4AEA4-8DFA-4A89-87EB-49C32662AFE0}")) //Medium Style 2 Accent 2 + { + pTableStyle = new TableStyle(); + createdTblStyle = sal_True; + oox::drawingml::FillPropertiesPtr pFstRowFillProperties( new oox::drawingml::FillProperties ); + pFstRowFillProperties->moFillType.set(XML_solidFill); + pFstRowFillProperties->maFillColor.setSchemeClr(XML_accent2); + pTableStyle->getFirstRow().getFillProperties() = pFstRowFillProperties; + + ::oox::drawingml::Color fstRowTextColor; + fstRowTextColor.setSchemeClr(XML_lt1); + pTableStyle->getFirstRow().getTextColor() = fstRowTextColor; + + oox::drawingml::LinePropertiesPtr pFstBottomBorder( new oox::drawingml::LineProperties); + pFstBottomBorder->moLineWidth = 38100; + pFstBottomBorder->moPresetDash = XML_sng; + pFstBottomBorder->maLineFill.moFillType.set(XML_solidFill); + pFstBottomBorder->maLineFill.maFillColor.setSchemeClr(XML_lt1); + pTableStyle->getFirstRow().getLineBorders().insert(std::pair<sal_Int32, ::oox::drawingml::LinePropertiesPtr>(XML_bottom,pFstBottomBorder)); + + pTableStyle->getLastRow().getFillProperties() = pFstRowFillProperties; + pTableStyle->getLastRow().getTextColor() = fstRowTextColor; + pTableStyle->getLastRow().getLineBorders().insert(std::pair<sal_Int32, ::oox::drawingml::LinePropertiesPtr>(XML_top,pFstBottomBorder)); + + pTableStyle->getFirstCol().getFillProperties() = pFstRowFillProperties; + pTableStyle->getFirstCol().getTextColor() = fstRowTextColor; + + pTableStyle->getLastCol().getFillProperties() = pFstRowFillProperties; + pTableStyle->getLastCol().getTextColor() = fstRowTextColor; + + SetTableStyleProperties(pTableStyle, XML_accent2, XML_dk1, XML_lt1); + } + else if (!styleId.compareToAscii("{C4B1156A-380E-4F78-BDF5-A606A8083BF9}")) //Medium Style 4 Accent 4 + { + pTableStyle = new TableStyle(); + createdTblStyle = sal_True; + SetTableStyleProperties(pTableStyle, XML_accent4, XML_dk1, XML_accent4); + } + + return createdTblStyle; +} + +const TableStyle& TableProperties::getUsedTableStyle( const ::oox::core::XmlFilterBase& rFilterBase, sal_Bool &isCreateTabStyle ) { ::oox::core::XmlFilterBase& rBase( const_cast< ::oox::core::XmlFilterBase& >( rFilterBase ) ); @@ -120,6 +245,11 @@ const TableStyle& TableProperties::getUsedTableStyle( const ::oox::core::XmlFilt } ++aIter; } + //if the pptx just has table style id, but no table style content, we will create the table style ourselves + if ( !pTableStyle ) + { + isCreateTabStyle = CreateTableStyle(pTableStyle , aStyleId); + } } if ( !pTableStyle ) @@ -137,7 +267,8 @@ void TableProperties::pushToPropSet( const ::oox::core::XmlFilterBase& rFilterBa CreateTableColumns( xColumnRowRange->getColumns(), mvTableGrid ); CreateTableRows( xColumnRowRange->getRows(), mvTableRows ); - const TableStyle& rTableStyle( getUsedTableStyle( rFilterBase ) ); + sal_Bool mbOwnTblStyle = sal_False; + const TableStyle& rTableStyle( getUsedTableStyle( rFilterBase, mbOwnTblStyle ) ); sal_Int32 nRow = 0; const std::vector< TableRow >::const_iterator aTableRowEnd( mvTableRows.end() ); for (std::vector< TableRow >::iterator aTableRowIter( mvTableRows.begin() ); @@ -161,6 +292,17 @@ void TableProperties::pushToPropSet( const ::oox::core::XmlFilterBase& rFilterBa } } } + + if(mbOwnTblStyle == sal_True) + { + TableStyle* pTableStyle = (TableStyle*)&rTableStyle; + if(pTableStyle != NULL) + { + delete pTableStyle; + pTableStyle = NULL; + } + mbOwnTblStyle = sal_False; + } } } } } commit a110d6e4e28820cae9885a6b169c151dfffa7253 Author: Jianyuan Li <liji...@apache.org> Date: Mon Sep 10 07:16:37 2012 +0000 Related: #i119628# Arrow shape changed is save doc file by AOO Reported by: Yan Ji Review by: sunying Patch by: Jianyuan Li (cherry picked from commit 43ff744cb9411b13860c3c57f7a052a6ab56001e) Conflicts: filter/source/msfilter/msdffimp.cxx Change-Id: I88ab49daa7b82b573eaf6a22eb4a2ce97b871027 Signed-off-by: Xisco Fauli <aniste...@gmail.com> (cherry picked from commit 60790b3f0ccc1779bcff2ddcc278a9027aedabee) diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index 25942ee..b02d599 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -768,8 +768,11 @@ static basegfx::B2DPolyPolygon GetLineArrow( const sal_Int32 nLineWidth, const M OUString& rsArrowName, sal_Bool bScaleArrow ) { basegfx::B2DPolyPolygon aRetPolyPoly; + // 70 100mm = 2pt = 40 twip. In MS, line width less than 2pt has the same size arrow as 2pt + //If the unit is twip. Make all use this unit especailly the critical value 70/40. + sal_Int32 nLineWidthCritical = bScaleArrow ? 40 : 70; + double fLineWidth = nLineWidth < nLineWidthCritical ? nLineWidthCritical : nLineWidth;; - double fLineWidth = nLineWidth < 70 ? 70.0 : nLineWidth; double fLenghtMul, fWidthMul; sal_Int32 nLineNumber; switch( eLineLenght ) @@ -787,12 +790,6 @@ static basegfx::B2DPolyPolygon GetLineArrow( const sal_Int32 nLineWidth, const M case mso_lineWideArrow : fWidthMul = 5.0; nLineNumber += 6; break; } - if ( bScaleArrow ) // #i33630 arrows imported from Word are too big - { - fWidthMul /= 1.75; - fLenghtMul/= 1.75; - } - rbArrowCenter = sal_False; OUStringBuffer aArrowName; switch ( eLineEnd ) commit 2b9b50e1f45540fa34ef24951e68dcdfcdffeb31 Author: Xisco Fauli <aniste...@gmail.com> Date: Thu May 23 01:38:54 2013 +0200 oups, I shouldn't have commited it Change-Id: I0b7433431c2da50c17f46549cde30b2b0131c61f (cherry picked from commit 6e2ff4edb2aae441142280ef31286f4627347fb8) diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx index c33eec1..0d9a638 100644 --- a/sw/source/filter/ww8/ww8par6.cxx +++ b/sw/source/filter/ww8/ww8par6.cxx @@ -1396,8 +1396,8 @@ bool SwWW8ImplReader::SetShadow(SvxShadowItem& rShadow, const short *pSizeArray, : (pbrc[WW8_RIGHT].aBits2[ 1 ] & 0x20 ) ) && (pSizeArray && pSizeArray[WW8_RIGHT]) ); - //if (bRet) - //{ + if (bRet) + { rShadow.SetColor(Color(COL_BLACK)); short nVal = pSizeArray[WW8_RIGHT]; if (nVal < 0x10) @@ -1405,7 +1405,7 @@ bool SwWW8ImplReader::SetShadow(SvxShadowItem& rShadow, const short *pSizeArray, rShadow.SetWidth(nVal); rShadow.SetLocation(SVX_SHADOW_BOTTOMRIGHT); bRet = true; - //} + } return bRet; } commit 2dde2beff09b1e5ca25ddc4367c0508c4307aac7 Author: Jian Fang Zhang <zhan...@apache.org> Date: Tue Sep 11 11:44:52 2012 +0000 Related #i120832#, the style and color set on table text by user... should have higher priority than that from table style Found by: Jinlong Wu,wujinl...@gmail.com Patch by: bjcheny,compan...@gmail.com Review by: zhangjf (cherry picked from commit fe7e723a727f6def90ee80ef2964a40546b37a90) Conflicts: writerfilter/source/dmapper/DomainMapper.cxx Change-Id: I3f4c96d49de40b21cc3da9bcb5e588a270434cd8 (cherry picked from commit 8943478b8d34216d3f2d64dfccd48d181d1a0f91) diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index 14c11e4..2817842 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -2169,9 +2169,15 @@ lcl_ApplyCellProperties( xCellText->createTextCursor(); xCellCurs->gotoStart( sal_False ); xCellCurs->gotoEnd( sal_True ); - const uno::Reference< beans::XPropertySet > xCellTextProps( - xCellCurs, uno::UNO_QUERY); - xCellTextProps->setPropertyValue(rName, rValue); + const uno::Reference< beans::XPropertyState > + xCellTextPropState(xCellCurs, uno::UNO_QUERY); + const beans::PropertyState state = xCellTextPropState->getPropertyState(rName); + if (state == beans::PropertyState_DEFAULT_VALUE) + { + const uno::Reference< beans::XPropertySet > + xCellTextProps(xCellCurs, uno::UNO_QUERY); + xCellTextProps->setPropertyValue(rName, rValue); + } } } } diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx index 0d9a638..c33eec1 100644 --- a/sw/source/filter/ww8/ww8par6.cxx +++ b/sw/source/filter/ww8/ww8par6.cxx @@ -1396,8 +1396,8 @@ bool SwWW8ImplReader::SetShadow(SvxShadowItem& rShadow, const short *pSizeArray, : (pbrc[WW8_RIGHT].aBits2[ 1 ] & 0x20 ) ) && (pSizeArray && pSizeArray[WW8_RIGHT]) ); - if (bRet) - { + //if (bRet) + //{ rShadow.SetColor(Color(COL_BLACK)); short nVal = pSizeArray[WW8_RIGHT]; if (nVal < 0x10) @@ -1405,7 +1405,7 @@ bool SwWW8ImplReader::SetShadow(SvxShadowItem& rShadow, const short *pSizeArray, rShadow.SetWidth(nVal); rShadow.SetLocation(SVX_SHADOW_BOTTOMRIGHT); bRet = true; - } + //} return bRet; } diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index c39b97a..86387e9 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -3552,12 +3552,6 @@ void DomainMapper::PopListProperties() void DomainMapper::lcl_startCharacterGroup() { m_pImpl->PushProperties(CONTEXT_CHARACTER); - DomainMapperTableManager& rTableManager = m_pImpl->getTableManager(); - if( !rTableManager.getTableStyleName().isEmpty() ) - { - PropertyMapPtr pTopContext = m_pImpl->GetTopContext(); - rTableManager.CopyTextProperties(pTopContext, m_pImpl->GetStyleSheetTable()); - } } void DomainMapper::lcl_endCharacterGroup() _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits