diff options
author | Michael Brauer <mib@openoffice.org> | 2000-10-26 07:42:28 +0000 |
---|---|---|
committer | Michael Brauer <mib@openoffice.org> | 2000-10-26 07:42:28 +0000 |
commit | af68fffaea649bf8cd936ebd5f996f1397a7a464 (patch) | |
tree | c582b76d6968d472e7010f4596787bc96fd2b0c9 /xmloff | |
parent | b00d5c73d162af0874ba585727b16d5f0db9763e (diff) |
page styles continued
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/text/XMLTextMasterPageContext.cxx | 26 | ||||
-rw-r--r-- | xmloff/source/text/txtprhdl.cxx | 36 |
2 files changed, 23 insertions, 39 deletions
diff --git a/xmloff/source/text/XMLTextMasterPageContext.cxx b/xmloff/source/text/XMLTextMasterPageContext.cxx index b1764a844205..6eff8e1b2178 100644 --- a/xmloff/source/text/XMLTextMasterPageContext.cxx +++ b/xmloff/source/text/XMLTextMasterPageContext.cxx @@ -2,9 +2,9 @@ * * $RCSfile: XMLTextMasterPageContext.cxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: sab $ $Date: 2000-10-23 10:42:25 $ + * last change: $Author: mib $ $Date: 2000-10-26 08:42:28 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -205,16 +205,6 @@ XMLTextMasterPageContext::XMLTextMasterPageContext( SvXMLImport& rImport, if( bOverwrite || bNew ) { - // TODO: Look for page master and insert its attributes here! - if ( sPageMasterName.getLength() ) - { - XMLPropStyleContext* pStyle = GetImport().GetTextImport()->FindPageMaster( sPageMasterName ); - if (pStyle) - { - pStyle->FillPropertySet(xPropSet); - } - } - bInsertHeader = bInsertFooter = sal_True; bInsertHeaderLeft = bInsertFooterLeft = sal_True; } @@ -295,6 +285,17 @@ void XMLTextMasterPageContext::Finish( sal_Bool bOverwrite ) { if( xStyle.is() && (IsNew() || bOverwrite) ) { + Reference < XPropertySet > xPropSet( xStyle, UNO_QUERY ); + if ( sPageMasterName.getLength() ) + { + XMLPropStyleContext* pStyle = + GetImport().GetTextImport()->FindPageMaster( sPageMasterName ); + if (pStyle) + { + pStyle->FillPropertySet(xPropSet); + } + } + Reference < XNameContainer > xPageStyles = GetImport().GetTextImport()->GetPageStyles(); if( !xPageStyles.is() ) @@ -303,7 +304,6 @@ void XMLTextMasterPageContext::Finish( sal_Bool bOverwrite ) if( !sFollow.getLength() || !xPageStyles->hasByName( sFollow ) ) sFollow = xStyle->getName(); - Reference < XPropertySet > xPropSet( xStyle, UNO_QUERY ); Reference< XPropertySetInfo > xPropSetInfo = xPropSet->getPropertySetInfo(); if( xPropSetInfo->hasPropertyByName( sFollowStyle ) ) diff --git a/xmloff/source/text/txtprhdl.cxx b/xmloff/source/text/txtprhdl.cxx index 905b0198da5e..bd8195287400 100644 --- a/xmloff/source/text/txtprhdl.cxx +++ b/xmloff/source/text/txtprhdl.cxx @@ -2,9 +2,9 @@ * * $RCSfile: txtprhdl.cxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: mib $ $Date: 2000-10-24 14:30:38 $ + * last change: $Author: mib $ $Date: 2000-10-26 08:42:28 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -109,6 +109,9 @@ #ifndef _XMLOFF_XMLCLIPPROPERTYHANDLER_HXX #include "XMLClipPropertyHandler.hxx" #endif +#ifndef _XMLOFF_XMLTEXTCOLUMNSPPROPERTYHANDLER_HXX +#include "XMLTextColumnsPropertyHandler.hxx" +#endif #ifndef _XMLOFF_TXTPRHDL_HXX #include "txtprhdl.hxx" #endif @@ -677,31 +680,12 @@ sal_Bool XMLAnchorTypePropHdl::convert( const OUString& rStrImpValue, // --------------------------------------------------------------------------- -class XMLTextColumnsPropHdl_Impl : public XMLPropertyHandler -{ -public: - virtual ~XMLTextColumnsPropHdl_Impl (); - - virtual sal_Bool equals( - const ::com::sun::star::uno::Any& r1, - const ::com::sun::star::uno::Any& r2 ) const; - - /// TabStops will be imported/exported as XML-Elements. So the Import/Export-work must be done at another place. - virtual sal_Bool importXML( - const ::rtl::OUString& rStrImpValue, - ::com::sun::star::uno::Any& rValue, - const SvXMLUnitConverter& rUnitConverter ) const; - virtual sal_Bool exportXML( - ::rtl::OUString& rStrExpValue, - const ::com::sun::star::uno::Any& rValue, - const SvXMLUnitConverter& rUnitConverter ) const; -}; -XMLTextColumnsPropHdl_Impl::~XMLTextColumnsPropHdl_Impl () +XMLTextColumnsPropertyHandler::~XMLTextColumnsPropertyHandler () { } -sal_Bool XMLTextColumnsPropHdl_Impl::equals( +sal_Bool XMLTextColumnsPropertyHandler::equals( const Any& r1, const Any& r2 ) const { @@ -738,7 +722,7 @@ sal_Bool XMLTextColumnsPropHdl_Impl::equals( return sal_True; } -sal_Bool XMLTextColumnsPropHdl_Impl::importXML( +sal_Bool XMLTextColumnsPropertyHandler::importXML( const OUString& rStrImpValue, Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const @@ -747,7 +731,7 @@ sal_Bool XMLTextColumnsPropHdl_Impl::importXML( return sal_False; } -sal_Bool XMLTextColumnsPropHdl_Impl::exportXML( +sal_Bool XMLTextColumnsPropertyHandler::exportXML( OUString& rStrExpValue, const Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const @@ -944,7 +928,7 @@ const XMLPropertyHandler *XMLTextPropertyHandlerFactory_Impl::GetPropertyHandler pHdl = new XMLAnchorTypePropHdl; break; case XML_TYPE_TEXT_COLUMNS: - pHdl = new XMLTextColumnsPropHdl_Impl; + pHdl = new XMLTextColumnsPropertyHandler; break; case XML_TYPE_TEXT_HORIZONTAL_POS: pHdl = new XMLConstantsPropertyHandler( pXML_HoriPos_Enum, 0 ); |