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 e98ed10..d301808 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -48,7 +48,7 @@ Summary: Free Software Productivity Suite Name: libreoffice Epoch: 1 Version: %{libo_version}.2 -Release: 7%{?libo_prerelease}%{?dist} +Release: 8%{?libo_prerelease}%{?dist} License: (MPLv1.1 or LGPLv3+) and LGPLv3 and LGPLv2+ and BSD and (MPLv1.1 or GPLv2 or LGPLv2 or Netscape) and Public Domain and ASL 2.0 and Artistic and MPLv2.0 and CC0 Group: Applications/Productivity URL: http://www.libreoffice.org/ @@ -378,6 +378,7 @@ Patch78: 0001-fdo-69036-do-not-try-to-create-a-sfxApplication-when.patch Patch79: 0001-Resolves-rhbz-1204244-group-sdb-windows-together-as-.patch Patch80: 0001-Resolves-tdf-90256-repair-invalid-docking-positions.patch Patch81: 0001-Related-fdo-88455-crash-using-delete-in-available-fi.patch +Patch82: negative after-text indents ignored by msword for apos %define instdir %{_libdir} %define baseinstdir %{instdir}/libreoffice @@ -2358,6 +2359,9 @@ update-desktop-database %{_datadir}/applications &> /dev/null || : %endif %changelog +* Tue Apr 07 2015 Caolán McNamara - 1:4.3.6.2-8 +- negative after-text indents ignored by msword for apos + * Fri Mar 27 2015 Caolán McNamara - 1:4.3.6.2-7 - Resolves: rhbz#1183806 crash on pressing delete in empty pivot table lists