diff options
author | Sascha Ballach <sab@openoffice.org> | 2001-01-17 09:25:58 +0000 |
---|---|---|
committer | Sascha Ballach <sab@openoffice.org> | 2001-01-17 09:25:58 +0000 |
commit | f1114a287cc44ec6c7f5cb8de9a62e1dabe9d1e6 (patch) | |
tree | a740701946b3345c1a37e03206dd0ea2d2b5c71f /sc/source/filter/xml/xmlfonte.cxx | |
parent | edae2673b7963c95805f54e0ea1eab3655367d1c (diff) |
test whether the areas in headers and footers exists
Diffstat (limited to 'sc/source/filter/xml/xmlfonte.cxx')
-rw-r--r-- | sc/source/filter/xml/xmlfonte.cxx | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/sc/source/filter/xml/xmlfonte.cxx b/sc/source/filter/xml/xmlfonte.cxx index 66e0faef722e..063e3ca3f024 100644 --- a/sc/source/filter/xml/xmlfonte.cxx +++ b/sc/source/filter/xml/xmlfonte.cxx @@ -2,9 +2,9 @@ * * $RCSfile: xmlfonte.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: sab $ $Date: 2001-01-04 11:41:46 $ + * last change: $Author: sab $ $Date: 2001-01-17 10:25:58 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -161,12 +161,24 @@ ScXMLFontAutoStylePool_Impl::ScXMLFontAutoStylePool_Impl( { if (0 != (pPageItem = static_cast<const ScPageHFItem*>(rPagePool.GetItem(nPageWhichId, k)))) { - aEditEngine.SetText(*pPageItem->GetLeftArea()); - AddFontItems(aEditWhichIds, 3, pPageEditPool); - aEditEngine.SetText(*pPageItem->GetCenterArea()); - AddFontItems(aEditWhichIds, 3, pPageEditPool); - aEditEngine.SetText(*pPageItem->GetRightArea()); - AddFontItems(aEditWhichIds, 3, pPageEditPool); + const EditTextObject* pLeftArea = pPageItem->GetLeftArea(); + if (pLeftArea) + { + aEditEngine.SetText(*pLeftArea); + AddFontItems(aEditWhichIds, 3, pPageEditPool); + } + const EditTextObject* pCenterArea = pPageItem->GetCenterArea(); + if (pCenterArea) + { + aEditEngine.SetText(*pCenterArea); + AddFontItems(aEditWhichIds, 3, pPageEditPool); + } + const EditTextObject* pRightArea = pPageItem->GetRightArea(); + if (pRightArea) + { + aEditEngine.SetText(*pRightArea); + AddFontItems(aEditWhichIds, 3, pPageEditPool); + } } } } |