diff --git a/0001-negative-after-text-indents-ignored-by-msword-for-ap.patch b/0001-negative-after-text-indents-ignored-by-msword-for-ap.patch new file mode 100644 index 0000000..a93db65 --- /dev/null +++ b/0001-negative-after-text-indents-ignored-by-msword-for-ap.patch @@ -0,0 +1,87 @@ +From b5ce50d1d07394f6b59b028373120369c83d5d66 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= +Date: Tue, 7 Apr 2015 09:56:43 +0100 +Subject: [PATCH] negative after-text indents ignored by msword for apos + +Change-Id: I33e178f23bc4b1372c4c329954b301ae68902154 +--- + sw/source/filter/ww8/ww8graf.cxx | 3 +++ + sw/source/filter/ww8/ww8par.hxx | 2 ++ + sw/source/filter/ww8/ww8par6.cxx | 26 ++++++++++++++++++++++++++ + 3 files changed, 31 insertions(+) + +diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx +index 456ce25..3a11d1e 100644 +--- a/sw/source/filter/ww8/ww8graf.cxx ++++ b/sw/source/filter/ww8/ww8graf.cxx +@@ -2905,7 +2905,10 @@ SwFlyFrmFmt* SwWW8ImplReader::ConvertDrawTextToFly(SdrObject* &rpObject, + MoveOutsideFly(pRetFrmFmt, aSave.GetStartPos(),!bJoined); + + aSave.Restore( this ); ++ ++ StripNegativeAfterIndent(pRetFrmFmt); + } ++ + } + return pRetFrmFmt; + } +diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx +index a7fdff5..0a34059 100644 +--- a/sw/source/filter/ww8/ww8par.hxx ++++ b/sw/source/filter/ww8/ww8par.hxx +@@ -1488,6 +1488,7 @@ private: + bool IsDropCap(); + bool IsListOrDropcap() { return (!pAktItemSet || bDropCap); }; + ++ //Apo == Absolutely Positioned Object, MSWord's old-style frames + WW8FlyPara *ConstructApo(const ApoTestResults &rApo, + const WW8_TablePos *pTabPos); + bool StartApo(const ApoTestResults &rApo, const WW8_TablePos *pTabPos, SvxULSpaceItem* pULSpaceItem = 0); +@@ -1495,6 +1496,7 @@ private: + bool TestSameApo(const ApoTestResults &rApo, const WW8_TablePos *pTabPos); + ApoTestResults TestApo(int nCellLevel, bool bTableRowEnd, + const WW8_TablePos *pTabPos); ++ void StripNegativeAfterIndent(SwFrmFmt *pFlyFmt) const; + + void EndSpecial(); + bool ProcessSpecial(bool &rbReSync, WW8_CP nStartCp); +diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx +index 418e130..b63e639 100644 +--- a/sw/source/filter/ww8/ww8par6.cxx ++++ b/sw/source/filter/ww8/ww8par6.cxx +@@ -2430,6 +2430,32 @@ bool SwWW8ImplReader::JoinNode(SwPaM &rPam, bool bStealAttr) + return bRet; + } + ++//In auto-width word frames negative after-indent values are ignored ++void SwWW8ImplReader::StripNegativeAfterIndent(SwFrmFmt *pFlyFmt) const ++{ ++ const SwNodeIndex* pSttNd = pFlyFmt->GetCntnt().GetCntntIdx(); ++ if (!pSttNd) ++ return; ++ ++ SwNodeIndex aIdx(*pSttNd, 1); ++ SwNodeIndex aEnd(*pSttNd->GetNode().EndOfSectionNode()); ++ while (aIdx < aEnd) ++ { ++ SwTxtNode *pNd = aIdx.GetNode().GetTxtNode(); ++ if (pNd) ++ { ++ const SvxLRSpaceItem& rLR = ItemGet(*pNd, RES_LR_SPACE); ++ if (rLR.GetRight() < 0) ++ { ++ SvxLRSpaceItem aLR(rLR); ++ aLR.SetRight(0); ++ pNd->SetAttr(aLR); ++ } ++ } ++ ++aIdx; ++ } ++} ++ + void SwWW8ImplReader::StopApo() + { + OSL_ENSURE(pWFlyPara, "no pWFlyPara to close"); +-- +1.9.3 + diff --git a/libreoffice.spec b/libreoffice.spec index 5bd1b5e..f2daacf 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -324,6 +324,7 @@ Patch24: 0001-gdk-pixbuf-xlib-2.0-gdk-pixbuf-2.0.patch Patch25: 0001-Resolves-rhbz-1204244-group-sdb-windows-together-as-.patch Patch26: 0001-Resolves-tdf-90256-repair-invalid-docking-positions.patch Patch27: 0001-gnome-745909-grab-ungrab-keyboard-for-menus.patch +Patch28: 0001-negative-after-text-indents-ignored-by-msword-for-ap.patch %define instdir %{_libdir} %define baseinstdir %{instdir}/libreoffice