diff options
author | Christian Lippka <cl@openoffice.org> | 2001-06-22 10:23:57 +0000 |
---|---|---|
committer | Christian Lippka <cl@openoffice.org> | 2001-06-22 10:23:57 +0000 |
commit | 91db75815d12aedb674a51a0359c3effd4927a72 (patch) | |
tree | da136ca348fa852d90558bbffd6535c402461ea2 /xmloff/source/draw | |
parent | 779018ba2579e135ef26393ffe126f28d6d84103 (diff) |
#88614# since setting the masterpage could reset properties at the page do it before page properties are set
Diffstat (limited to 'xmloff/source/draw')
-rw-r--r-- | xmloff/source/draw/ximpbody.cxx | 82 |
1 files changed, 41 insertions, 41 deletions
diff --git a/xmloff/source/draw/ximpbody.cxx b/xmloff/source/draw/ximpbody.cxx index 5e2ffd9166bc..ac0fcef1d563 100644 --- a/xmloff/source/draw/ximpbody.cxx +++ b/xmloff/source/draw/ximpbody.cxx @@ -2,9 +2,9 @@ * * $RCSfile: ximpbody.cxx,v $ * - * $Revision: 1.14 $ + * $Revision: 1.15 $ * - * last change: $Author: cl $ $Date: 2001-06-19 14:53:22 $ + * last change: $Author: cl $ $Date: 2001-06-22 11:23:57 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -194,6 +194,45 @@ SdXMLDrawPageContext::SdXMLDrawPageContext( SdXMLImport& rImport, } } + // set MasterPage? + if(maMasterPageName.getLength()) + { + // #85906# Code for setting masterpage needs complete rework + // since GetSdImport().GetMasterStylesContext() gives always ZERO + // because of content/style file split. Now the nechanism is to + // compare the wanted masterpage-name with the existing masterpages + // which were loaded and created in the styles section loading. + uno::Reference< drawing::XDrawPages > xMasterPages(GetSdImport().GetLocalMasterPages(), uno::UNO_QUERY); + uno::Reference < drawing::XMasterPageTarget > xDrawPage(rShapes, uno::UNO_QUERY); + uno::Reference< drawing::XDrawPage > xMasterPage; + + if(xDrawPage.is()) + { + sal_Bool bDone(FALSE); + + for(sal_Int32 a = 0; !bDone && a < xMasterPages->getCount(); a++) + { + uno::Any aAny(xMasterPages->getByIndex(a)); + aAny >>= xMasterPage; + + if(xMasterPage.is()) + { + uno::Reference < container::XNamed > xMasterNamed(xMasterPage, uno::UNO_QUERY); + if(xMasterNamed.is()) + { + OUString sMasterPageName = xMasterNamed->getName(); + + if(sMasterPageName.getLength() && sMasterPageName.equals(maMasterPageName)) + { + xDrawPage->setMasterPage(xMasterPage); + bDone = TRUE; + } + } + } + } + } + } + // set PageProperties? if(maStyleName.getLength()) { @@ -259,45 +298,6 @@ SdXMLDrawPageContext::SdXMLDrawPageContext( SdXMLImport& rImport, } } - // set MasterPage? - if(maMasterPageName.getLength()) - { - // #85906# Code for setting masterpage needs complete rework - // since GetSdImport().GetMasterStylesContext() gives always ZERO - // because of content/style file split. Now the nechanism is to - // compare the wanted masterpage-name with the existing masterpages - // which were loaded and created in the styles section loading. - uno::Reference< drawing::XDrawPages > xMasterPages(GetSdImport().GetLocalMasterPages(), uno::UNO_QUERY); - uno::Reference < drawing::XMasterPageTarget > xDrawPage(rShapes, uno::UNO_QUERY); - uno::Reference< drawing::XDrawPage > xMasterPage; - - if(xDrawPage.is()) - { - sal_Bool bDone(FALSE); - - for(sal_Int32 a = 0; !bDone && a < xMasterPages->getCount(); a++) - { - uno::Any aAny(xMasterPages->getByIndex(a)); - aAny >>= xMasterPage; - - if(xMasterPage.is()) - { - uno::Reference < container::XNamed > xMasterNamed(xMasterPage, uno::UNO_QUERY); - if(xMasterNamed.is()) - { - OUString sMasterPageName = xMasterNamed->getName(); - - if(sMasterPageName.getLength() && sMasterPageName.equals(maMasterPageName)) - { - xDrawPage->setMasterPage(xMasterPage); - bDone = TRUE; - } - } - } - } - } - } - SetLayout(); DeleteAllShapes(); |