[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - sw/qa sw/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Thu Dec 6 06:31:19 UTC 2018
dev/null |binary
sw/qa/extras/ww8export/ww8export2.cxx | 27 ---------------------------
sw/source/filter/ww8/ww8par6.cxx | 27 ---------------------------
3 files changed, 54 deletions(-)
New commits:
commit 931cb1caf26a09d7152360407e1f163fc3fab1c2
Author: Justin Luth <justin_luth at sil.org>
AuthorDate: Tue Dec 4 11:37:29 2018 +0300
Commit: Justin Luth <justin_luth at sil.org>
CommitDate: Thu Dec 6 07:30:55 2018 +0100
Revert "tdf#106174 ww8import: bidi - prev adjust? prev bidi?"
This reverts commit 85818da3307a28b2d9c6fa5c1c97ca7833dfe24c which
caused bug 121110. Only reverting from 6.2 because I hope to fix
this for the current master 6.3, but I won't backport the fix
because it isn't trivial.
Change-Id: Ie91b707fbb05fbc5c6806aef7d1760ab69abb277
Reviewed-on: https://gerrit.libreoffice.org/64660
Tested-by: Jenkins
Reviewed-by: Justin Luth <justin_luth at sil.org>
diff --git a/sw/qa/extras/ww8export/data/tdf106174_rtlParaAlign.docx b/sw/qa/extras/ww8export/data/tdf106174_rtlParaAlign.docx
deleted file mode 100644
index a222f5881461..000000000000
Binary files a/sw/qa/extras/ww8export/data/tdf106174_rtlParaAlign.docx and /dev/null differ
diff --git a/sw/qa/extras/ww8export/data/tdf98620_rtlJustify.doc b/sw/qa/extras/ww8export/data/tdf98620_rtlJustify.doc
deleted file mode 100644
index c643b96a4d3d..000000000000
Binary files a/sw/qa/extras/ww8export/data/tdf98620_rtlJustify.doc and /dev/null differ
diff --git a/sw/qa/extras/ww8export/ww8export2.cxx b/sw/qa/extras/ww8export/ww8export2.cxx
index e1597f634a0c..97895233e5d6 100644
--- a/sw/qa/extras/ww8export/ww8export2.cxx
+++ b/sw/qa/extras/ww8export/ww8export2.cxx
@@ -12,7 +12,6 @@
#include <com/sun/star/graphic/XGraphic.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/container/XIndexAccess.hpp>
-#include <com/sun/star/style/ParagraphAdjust.hpp>
#include <com/sun/star/text/HoriOrientation.hpp>
#include <com/sun/star/text/WritingMode2.hpp>
#include <com/sun/star/text/XDependentTextField.hpp>
@@ -254,32 +253,6 @@ DECLARE_WW8EXPORT_TEST(testTdf112074_RTLtableJustification, "tdf112074_RTLtableJ
CPPUNIT_ASSERT_EQUAL_MESSAGE("Horizontal Orientation", text::HoriOrientation::LEFT_AND_WIDTH, getProperty<sal_Int16>(xTable, "HoriOrient"));
CPPUNIT_ASSERT_MESSAGE("Table Indent", getProperty<long>(xTable, "LeftMargin") > 3000);
CPPUNIT_ASSERT_MESSAGE("Table Indent is 3750", getProperty<long>(xTable, "LeftMargin") < 4000 );
- CPPUNIT_ASSERT_EQUAL( style::ParagraphAdjust_RIGHT, static_cast<style::ParagraphAdjust>(getProperty<sal_Int16>(getParagraphOrTable(2), "ParaAdjust")) );
-}
-
-DECLARE_WW8EXPORT_TEST(testTdf98620_rtlJustify, "tdf98620_rtlJustify.doc")
-{
- CPPUNIT_ASSERT_EQUAL( style::ParagraphAdjust_RIGHT, static_cast<style::ParagraphAdjust>(getProperty<sal_Int16>(getParagraph(1), "ParaAdjust")) );
-}
-
-DECLARE_WW8EXPORT_TEST(testTdf106174_rtlParaAlign, "tdf106174_rtlParaAlign.docx")
-{
- CPPUNIT_ASSERT_EQUAL(sal_Int16(style::ParagraphAdjust_CENTER), getProperty<sal_Int16>(getParagraph(1), "ParaAdjust"));
- CPPUNIT_ASSERT_EQUAL(sal_Int16(style::ParagraphAdjust_CENTER), getProperty<sal_Int16>(getParagraph(2), "ParaAdjust"));
- uno::Reference<beans::XPropertySet> xPropertySet(getStyles("ParagraphStyles")->getByName("Another paragraph aligned to right"), uno::UNO_QUERY);
- CPPUNIT_ASSERT_EQUAL(sal_Int16(style::ParagraphAdjust_RIGHT), getProperty<sal_Int16>(xPropertySet, "ParaAdjust"));
- CPPUNIT_ASSERT_EQUAL(sal_Int16(style::ParagraphAdjust_RIGHT), getProperty<sal_Int16>(getParagraph(3), "ParaAdjust"));
- CPPUNIT_ASSERT_EQUAL(sal_Int16(style::ParagraphAdjust_RIGHT), getProperty<sal_Int16>(getParagraph(4), "ParaAdjust"));
- CPPUNIT_ASSERT_EQUAL(sal_Int16(style::ParagraphAdjust_RIGHT), getProperty<sal_Int16>(getParagraph(5), "ParaAdjust"));
- CPPUNIT_ASSERT_EQUAL(sal_Int16(style::ParagraphAdjust_LEFT), getProperty<sal_Int16>(getParagraph(6), "ParaAdjust"));
- CPPUNIT_ASSERT_EQUAL(sal_Int16(style::ParagraphAdjust_RIGHT), getProperty<sal_Int16>(getParagraph(7), "ParaAdjust"));
- CPPUNIT_ASSERT_EQUAL(sal_Int16(style::ParagraphAdjust_RIGHT), getProperty<sal_Int16>(getParagraph(8), "ParaAdjust"));
- CPPUNIT_ASSERT_EQUAL(sal_Int16(style::ParagraphAdjust_LEFT), getProperty<sal_Int16>(getParagraph(9), "ParaAdjust"));
- CPPUNIT_ASSERT_EQUAL(sal_Int16(style::ParagraphAdjust_LEFT), getProperty<sal_Int16>(getParagraph(10), "ParaAdjust"));
- CPPUNIT_ASSERT_EQUAL(sal_Int16(style::ParagraphAdjust_RIGHT), getProperty<sal_Int16>(getParagraph(11), "ParaAdjust"));
- CPPUNIT_ASSERT_EQUAL(sal_Int16(style::ParagraphAdjust_LEFT), getProperty<sal_Int16>(getParagraph(12), "ParaAdjust"));
- CPPUNIT_ASSERT_EQUAL(sal_Int16(style::ParagraphAdjust_LEFT), getProperty<sal_Int16>(getParagraph(13), "ParaAdjust"));
- CPPUNIT_ASSERT_EQUAL(sal_Int16(style::ParagraphAdjust_RIGHT), getProperty<sal_Int16>(getParagraph(14), "ParaAdjust"));
}
DECLARE_WW8EXPORT_TEST(testTdf119232_startEvenPage, "tdf119232_startEvenPage.doc")
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index 671bbb944786..7d927c968868 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -318,33 +318,6 @@ void SwWW8ImplReader::Read_ParaBiDi(sal_uInt16, const sal_uInt8* pData, short nL
{
SvxFrameDirection eDir =
*pData ? SvxFrameDirection::Horizontal_RL_TB : SvxFrameDirection::Horizontal_LR_TB;
-
- // Previous adjust or bidi values require changing paraAdjust.
- // Only change if ParaBiDi doesn't match previous setting.
- const bool bParentRTL = IsRightToLeft();
- if ( (eDir == SvxFrameDirection::Horizontal_RL_TB && !bParentRTL) ||
- (eDir == SvxFrameDirection::Horizontal_LR_TB && bParentRTL) )
- {
- const SvxAdjustItem* pItem = static_cast<const SvxAdjustItem*>(GetFormatAttr(RES_PARATR_ADJUST));
- if ( !pItem )
- {
- // no previous adjust: set appropriate default
- if ( eDir == SvxFrameDirection::Horizontal_LR_TB )
- NewAttr( SvxAdjustItem( SvxAdjust::Left, RES_PARATR_ADJUST ) );
- else
- NewAttr( SvxAdjustItem( SvxAdjust::Right, RES_PARATR_ADJUST ) );
- }
- else
- {
- // previous adjust and bidi has changed: swap Left/Right
- const SvxAdjust eJustify = pItem->GetAdjust();
- if ( eJustify == SvxAdjust::Left )
- NewAttr( SvxAdjustItem( SvxAdjust::Right, RES_PARATR_ADJUST ) );
- else if ( eJustify == SvxAdjust::Right )
- NewAttr( SvxAdjustItem( SvxAdjust::Left, RES_PARATR_ADJUST ) );
- }
- }
-
NewAttr(SvxFrameDirectionItem(eDir, RES_FRAMEDIR));
}
}
More information about the Libreoffice-commits
mailing list