[Libreoffice-commits] core.git: sw/source
Tomaž Vajngerl
tomaz.vajngerl at collabora.co.uk
Wed Nov 8 07:26:14 UTC 2017
sw/source/core/edit/edfcol.cxx | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
New commits:
commit 03033ae8abcb774fa58273eebac93dbfecab641d
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
Date: Mon Nov 6 21:36:11 2017 +0900
TSCP: Fix crash when no header/footer is present yet
Change-Id: I681920347e01ccbc1e18348d00c1e29dac5a8e64
Reviewed-on: https://gerrit.libreoffice.org/44441
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>
diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx
index a6dc65b2607b..ec84aec191a9 100644
--- a/sw/source/core/edit/edfcol.cxx
+++ b/sw/source/core/edit/edfcol.cxx
@@ -777,7 +777,6 @@ void SwEditShell::ApplyAdvancedClassification(std::vector<svx::ClassificationRes
if (xHeaderText.is())
removeAllClassificationFields(sPolicy, xHeaderText);
- equaliseNumberOfParagraph(rResults, xHeaderText);
// FOOTER
bool bFooterIsOn = false;
@@ -787,8 +786,6 @@ void SwEditShell::ApplyAdvancedClassification(std::vector<svx::ClassificationRes
xPageStyle->getPropertyValue(UNO_NAME_FOOTER_TEXT) >>= xFooterText;
if (xFooterText.is())
removeAllClassificationFields(sPolicy, xFooterText);
-
- equaliseNumberOfParagraph(rResults, xFooterText);
}
// Clear properties
@@ -822,6 +819,7 @@ void SwEditShell::ApplyAdvancedClassification(std::vector<svx::ClassificationRes
xPageStyle->setPropertyValue(UNO_NAME_HEADER_IS_ON, uno::makeAny(true));
uno::Reference<text::XText> xHeaderText;
xPageStyle->getPropertyValue(UNO_NAME_HEADER_TEXT) >>= xHeaderText;
+ equaliseNumberOfParagraph(rResults, xHeaderText);
// FOOTER
bool bFooterIsOn = false;
@@ -830,6 +828,7 @@ void SwEditShell::ApplyAdvancedClassification(std::vector<svx::ClassificationRes
xPageStyle->setPropertyValue(UNO_NAME_FOOTER_IS_ON, uno::makeAny(true));
uno::Reference<text::XText> xFooterText;
xPageStyle->getPropertyValue(UNO_NAME_FOOTER_TEXT) >>= xFooterText;
+ equaliseNumberOfParagraph(rResults, xFooterText);
uno::Reference<text::XParagraphCursor> xHeaderParagraphCursor(xHeaderText->createTextCursor(), uno::UNO_QUERY);
uno::Reference<text::XParagraphCursor> xFooterParagraphCursor(xFooterText->createTextCursor(), uno::UNO_QUERY);
More information about the Libreoffice-commits
mailing list