sw/inc/view.hxx | 693 +++++++++++++++++++++++++ sw/qa/extras/rtfexport/data/tdf84832.docx |binary sw/qa/extras/rtfexport/rtfexport.cxx | 7 sw/source/core/view/viewsh.cxx | 2 sw/source/filter/ww8/rtfattributeoutput.cxx | 6 sw/source/filter/ww8/rtfsdrexport.cxx | 74 +- sw/source/uibase/dbui/dbui.cxx | 8 sw/source/uibase/inc/view.hxx | 693 ------------------------- sysui/productlist.mk | 4 writerfilter/source/rtftok/rtfdocumentimpl.cxx | 5 10 files changed, 747 insertions(+), 745 deletions(-)
New commits: commit c3a8adb2e06888fc237aa6e3d43c32d805a46537 Author: Miklos Vajna <[email protected]> Date: Mon Jun 15 09:12:13 2015 +0200 sw: avoid #include "../../uibase/inc/view.hxx" Change-Id: If5b148e890cd7d165f9d2b533c04b2047ac6caea diff --git a/sw/source/uibase/inc/view.hxx b/sw/inc/view.hxx similarity index 99% rename from sw/source/uibase/inc/view.hxx rename to sw/inc/view.hxx index a468799..22695ee 100644 --- a/sw/source/uibase/inc/view.hxx +++ b/sw/inc/view.hxx @@ -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 . */ -#ifndef INCLUDED_SW_SOURCE_UIBASE_INC_VIEW_HXX -#define INCLUDED_SW_SOURCE_UIBASE_INC_VIEW_HXX +#ifndef INCLUDED_SW_INC_VIEW_HXX +#define INCLUDED_SW_INC_VIEW_HXX #include <vcl/timer.hxx> #include <vcl/field.hxx> diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index 32fe222..ea4fc5d2 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -72,7 +72,7 @@ #include <wrtsh.hxx> #include <DocumentSettingManager.hxx> -#include "../../uibase/inc/view.hxx" +#include <view.hxx> #include <PostItMgr.hxx> #include <vcl/dibtools.hxx> #include <vcl/virdev.hxx> commit 876c9f428a7af80368ee867f398c25e80fc568c7 Author: Miklos Vajna <[email protected]> Date: Mon Jun 15 09:11:20 2015 +0200 sysui: drop dead assignments Change-Id: I95748d5acc523a571c230e23dae3fd0d8ce089fa diff --git a/sysui/productlist.mk b/sysui/productlist.mk index b4a712e..aa6fbd4 100644 --- a/sysui/productlist.mk +++ b/sysui/productlist.mk @@ -7,14 +7,12 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. # -PRODUCTLIST := libreoffice libreofficedev oxygenoffice +PRODUCTLIST := libreoffice libreofficedev PKGVERSION := $(LIBO_VERSION_MAJOR).$(LIBO_VERSION_MINOR).$(LIBO_VERSION_MICRO) PKGVERSIONSHORT := $(LIBO_VERSION_MAJOR).$(LIBO_VERSION_MINOR) PRODUCTNAME.libreoffice := LibreOffice PRODUCTNAME.libreofficeodev := LibreOfficeDev -PRODUCTNAME.oxygenoffice := OxygenOffice UNIXFILENAME.libreoffice := libreoffice$(PKGVERSIONSHORT) UNIXFILENAME.libreofficedev := libreofficedev$(PKGVERSIONSHORT) -UNIXFILENAME.oxygenoffice := oxygenoffice$(PKGVERSIONSHORT) # vim: set noet sw=4 ts=4: commit 5ec3ee2c2d0581e0c946cc3253344f1a69864c92 Author: Miklos Vajna <[email protected]> Date: Mon Jun 15 09:09:11 2015 +0200 sw: indentation fixes Change-Id: I495c8bd4ee24832573cb56b6ffe4533263eb39f0 diff --git a/sw/source/filter/ww8/rtfsdrexport.cxx b/sw/source/filter/ww8/rtfsdrexport.cxx index 5d01fbc..5a28807 100644 --- a/sw/source/filter/ww8/rtfsdrexport.cxx +++ b/sw/source/filter/ww8/rtfsdrexport.cxx @@ -288,51 +288,51 @@ void RtfSdrExport::Commit(EscherPropertyContainer& rProps, const Rectangle& rRec aSegmentInfo.append(';').append((sal_Int32)nSeg); switch (nSegmentType) { - case msopathLineTo: - for (unsigned short i = 0; i < nSegmentCount; ++i) - { - sal_Int32 nX = impl_GetPointComponent(pVerticesIt, nVerticesPos, nPointSize); - sal_Int32 nY = impl_GetPointComponent(pVerticesIt, nVerticesPos, nPointSize); - aVerticies.append(";(").append(nX).append(",").append(nY).append(")"); - nVertices ++; - } - break; - case msopathMoveTo: + case msopathLineTo: + for (unsigned short i = 0; i < nSegmentCount; ++i) { sal_Int32 nX = impl_GetPointComponent(pVerticesIt, nVerticesPos, nPointSize); sal_Int32 nY = impl_GetPointComponent(pVerticesIt, nVerticesPos, nPointSize); aVerticies.append(";(").append(nX).append(",").append(nY).append(")"); - nVertices++; - break; + nVertices ++; } - case msopathCurveTo: - for (unsigned short j = 0; j < nSegmentCount; ++j) + break; + case msopathMoveTo: + { + sal_Int32 nX = impl_GetPointComponent(pVerticesIt, nVerticesPos, nPointSize); + sal_Int32 nY = impl_GetPointComponent(pVerticesIt, nVerticesPos, nPointSize); + aVerticies.append(";(").append(nX).append(",").append(nY).append(")"); + nVertices++; + break; + } + case msopathCurveTo: + for (unsigned short j = 0; j < nSegmentCount; ++j) + { + for (int i = 0; i < 3; i++) { - for (int i = 0; i < 3; i++) - { - sal_Int32 nX = impl_GetPointComponent(pVerticesIt, nVerticesPos, nPointSize); - sal_Int32 nY = impl_GetPointComponent(pVerticesIt, nVerticesPos, nPointSize); - aVerticies.append(";(").append(nX).append(",").append(nY).append(")"); - nVertices ++; - } + sal_Int32 nX = impl_GetPointComponent(pVerticesIt, nVerticesPos, nPointSize); + sal_Int32 nY = impl_GetPointComponent(pVerticesIt, nVerticesPos, nPointSize); + aVerticies.append(";(").append(nX).append(",").append(nY).append(")"); + nVertices ++; } - break; - case msopathEscape: - { - // If the segment type is msopathEscape, the lower 13 bits are - // divided in a 5 bit escape code and 8 bit - // vertex count (not segment count!) - unsigned char nVertexCount = nSegmentCount & 0x00FF; - nVerticesPos += nVertexCount; - break; } - case msopathClientEscape: - case msopathClose: - case msopathEnd: - break; - default: - SAL_WARN("oox", "Totally b0rked\n"); - break; + break; + case msopathEscape: + { + // If the segment type is msopathEscape, the lower 13 bits are + // divided in a 5 bit escape code and 8 bit + // vertex count (not segment count!) + unsigned char nVertexCount = nSegmentCount & 0x00FF; + nVerticesPos += nVertexCount; + break; + } + case msopathClientEscape: + case msopathClose: + case msopathEnd: + break; + default: + SAL_WARN("oox", "Totally b0rked\n"); + break; } } diff --git a/sw/source/uibase/dbui/dbui.cxx b/sw/source/uibase/dbui/dbui.cxx index e410558..fbbdf3b 100644 --- a/sw/source/uibase/dbui/dbui.cxx +++ b/sw/source/uibase/dbui/dbui.cxx @@ -134,10 +134,10 @@ void CancelableDialog::SetCancelHdl( const Link<>& rLink ) void CancelableDialog::Show() { - if (mbModal) - StartExecuteModal( Link<>() ); - else - Dialog::Show(); + if (mbModal) + StartExecuteModal( Link<>() ); + else + Dialog::Show(); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ commit d0bedaf9eface97d17787931457f3ffc89ac4216 Author: Miklos Vajna <[email protected]> Date: Mon Jun 15 09:07:31 2015 +0200 tdf#84832 RTF export: fix handling of custom table cell margins Change-Id: I3ed42ae4dc007c15d4649f57e1691534088549fc diff --git a/sw/qa/extras/rtfexport/data/tdf84832.docx b/sw/qa/extras/rtfexport/data/tdf84832.docx new file mode 100644 index 0000000..0e0da12 Binary files /dev/null and b/sw/qa/extras/rtfexport/data/tdf84832.docx differ diff --git a/sw/qa/extras/rtfexport/rtfexport.cxx b/sw/qa/extras/rtfexport/rtfexport.cxx index 33d6ca4..5127496 100644 --- a/sw/qa/extras/rtfexport/rtfexport.cxx +++ b/sw/qa/extras/rtfexport/rtfexport.cxx @@ -658,6 +658,13 @@ DECLARE_RTFEXPORT_TEST(testFdo74709, "fdo74709.rtf") CPPUNIT_ASSERT_EQUAL(sal_Int32(convertTwipToMm100(360)), getProperty<sal_Int32>(xCell, "RightBorderDistance")); } +DECLARE_RTFEXPORT_TEST(testTdf84832, "tdf84832.docx") +{ + uno::Reference<table::XCell> xCell = getCell(getParagraphOrTable(2), "A1"); + // This was 0, as left padding wasn't exported. + CPPUNIT_ASSERT_EQUAL(sal_Int32(convertTwipToMm100(113)), getProperty<sal_Int32>(xCell, "LeftBorderDistance")); +} + DECLARE_RTFEXPORT_TEST(testRelsize, "relsize.rtf") { uno::Reference<drawing::XShape> xShape = getShape(1); diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx index a9061ab..a09246a 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.cxx +++ b/sw/source/filter/ww8/rtfattributeoutput.cxx @@ -631,9 +631,6 @@ void RtfAttributeOutput::TableDefaultBorders(ww8::WW8TableNodeInfoInner::Pointer * called for each cell. */ - const SwTableBox* pTableBox = pTableTextNodeInfoInner->getTableBox(); - SwFrameFormat* pFormat = pTableBox->GetFrameFormat(); - const SvxBoxItem& rDefault = pFormat->GetBox(); const SwWriteTableRows& aRows = m_pTableWrt->GetRows(); SwWriteTableRow* pRow = aRows[ pTableTextNodeInfoInner->getRow() ]; const SwWriteTableCell* pCell = &pRow->GetCells()[ pTableTextNodeInfoInner->getCell() ]; @@ -664,8 +661,7 @@ void RtfAttributeOutput::TableDefaultBorders(ww8::WW8TableNodeInfoInner::Pointer { if (const editeng::SvxBorderLine* pLn = rBox.GetLine(aBorders[i])) m_aRowDefs.append(OutTBLBorderLine(m_rExport, pLn, aBorderNames[i])); - if (rDefault.GetDistance(aBorders[i]) != - rBox.GetDistance(aBorders[i])) + if (rBox.GetDistance(aBorders[i])) { m_aRowDefs.append(aCellPadUnits[i]); m_aRowDefs.append((sal_Int32)3); diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index e25bb19..31e62ee 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -4673,19 +4673,20 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam) RTFSprms aAttributes; aAttributes.set(NS_ooxml::LN_CT_TblWidth_type, std::make_shared<RTFValue>(NS_ooxml::LN_Value_ST_TblWidth_dxa)); aAttributes.set(NS_ooxml::LN_CT_TblWidth_w, std::make_shared<RTFValue>(nParam)); + // Top and left is swapped, that's what Word does. switch (nKeyword) { case RTF_CLPADB: nSprm = NS_ooxml::LN_CT_TcMar_bottom; break; case RTF_CLPADL: - nSprm = NS_ooxml::LN_CT_TcMar_left; + nSprm = NS_ooxml::LN_CT_TcMar_top; break; case RTF_CLPADR: nSprm = NS_ooxml::LN_CT_TcMar_right; break; case RTF_CLPADT: - nSprm = NS_ooxml::LN_CT_TcMar_top; + nSprm = NS_ooxml::LN_CT_TcMar_left; break; default: break; _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
