diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2017-11-06 21:36:11 +0900 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2017-11-08 08:25:44 +0100 |
commit | 03033ae8abcb774fa58273eebac93dbfecab641d (patch) | |
tree | 5c7add006c4519e012c6d522254dde92896c0255 /sw | |
parent | a6309a3c4db0f5b409d47b3af094952fd95d4be7 (diff) |
TSCP: Fix crash when no header/footer is present yet
Change-Id: I681920347e01ccbc1e18348d00c1e29dac5a8e64
Reviewed-on: https://gerrit.libreoffice.org/44441
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/edit/edfcol.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
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); |