2000-10-23 09:17:48 +00:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
|
|
|
* $RCSfile: PageMasterImportPropMapper.cxx,v $
|
|
|
|
*
|
2003-12-01 15:23:02 +00:00
|
|
|
* $Revision: 1.11 $
|
2000-10-23 09:17:48 +00:00
|
|
|
*
|
2003-12-01 15:23:02 +00:00
|
|
|
* last change: $Author: rt $ $Date: 2003-12-01 16:23:02 $
|
2000-10-23 09:17:48 +00:00
|
|
|
*
|
|
|
|
* The Contents of this file are made available subject to the terms of
|
|
|
|
* either of the following licenses
|
|
|
|
*
|
|
|
|
* - GNU Lesser General Public License Version 2.1
|
|
|
|
* - Sun Industry Standards Source License Version 1.1
|
|
|
|
*
|
|
|
|
* Sun Microsystems Inc., October, 2000
|
|
|
|
*
|
|
|
|
* GNU Lesser General Public License Version 2.1
|
|
|
|
* =============================================
|
|
|
|
* Copyright 2000 by Sun Microsystems, Inc.
|
|
|
|
* 901 San Antonio Road, Palo Alto, CA 94303, USA
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License version 2.1, as published by the Free Software Foundation.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
|
|
|
* MA 02111-1307 USA
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* Sun Industry Standards Source License Version 1.1
|
|
|
|
* =================================================
|
|
|
|
* The contents of this file are subject to the Sun Industry Standards
|
|
|
|
* Source License Version 1.1 (the "License"); You may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of the
|
|
|
|
* License at http://www.openoffice.org/license.html.
|
|
|
|
*
|
|
|
|
* Software provided under this License is provided on an "AS IS" basis,
|
|
|
|
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
|
|
|
|
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
|
|
|
|
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
|
|
|
|
* See the License for the specific provisions governing your rights and
|
|
|
|
* obligations concerning the Software.
|
|
|
|
*
|
|
|
|
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
|
|
|
|
*
|
|
|
|
* Copyright: 2000 by Sun Microsystems, Inc.
|
|
|
|
*
|
|
|
|
* All Rights Reserved.
|
|
|
|
*
|
|
|
|
* Contributor(s): _______________________________________
|
|
|
|
*
|
|
|
|
*
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
#pragma hdrstop
|
|
|
|
|
|
|
|
#ifndef _XMLOFF_PAGEMASTERIMPORTPROPMAPPER_HXX
|
|
|
|
#include "PageMasterImportPropMapper.hxx"
|
|
|
|
#endif
|
|
|
|
#ifndef _XMLOFF_PAGEMASTERPROPMAPPER_HXX
|
|
|
|
#include "PageMasterPropMapper.hxx"
|
|
|
|
#endif
|
|
|
|
#ifndef _XMLOFF_PAGEMASTERSTYLEMAP_HXX
|
|
|
|
#include "PageMasterStyleMap.hxx"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef _XMLOFF_PROPMAPPINGTYPES_HXX
|
2000-10-27 02:56:15 +00:00
|
|
|
#include "maptype.hxx"
|
2000-10-23 09:17:48 +00:00
|
|
|
#endif
|
2000-10-27 02:56:15 +00:00
|
|
|
#ifndef _COM_SUN_STAR_TABLE_BORDERLINE_HPP_
|
|
|
|
#include <com/sun/star/table/BorderLine.hpp>
|
|
|
|
#endif
|
2000-11-15 13:01:55 +00:00
|
|
|
#ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_
|
|
|
|
#include <com/sun/star/container/XNameContainer.hpp>
|
|
|
|
#endif
|
|
|
|
#ifndef _XMLOFF_XMLIMP_HXX
|
|
|
|
#include "xmlimp.hxx"
|
|
|
|
#endif
|
2000-10-27 02:56:15 +00:00
|
|
|
|
|
|
|
#define XML_LINE_LEFT 0
|
2000-11-03 10:00:39 +00:00
|
|
|
#define XML_LINE_RIGHT 1
|
|
|
|
#define XML_LINE_TOP 2
|
|
|
|
#define XML_LINE_BOTTOM 3
|
2000-10-23 09:17:48 +00:00
|
|
|
|
|
|
|
using namespace ::com::sun::star;
|
2000-11-15 13:01:55 +00:00
|
|
|
using namespace ::com::sun::star::uno;
|
|
|
|
using namespace ::com::sun::star::container;
|
2000-10-23 09:17:48 +00:00
|
|
|
|
|
|
|
PageMasterImportPropertyMapper::PageMasterImportPropertyMapper(
|
2000-11-15 13:01:55 +00:00
|
|
|
const UniReference< XMLPropertySetMapper >& rMapper,
|
|
|
|
SvXMLImport& rImp ) :
|
2001-09-21 15:27:53 +00:00
|
|
|
SvXMLImportPropertyMapper( rMapper, rImp ),
|
2000-11-15 13:01:55 +00:00
|
|
|
rImport( rImp )
|
2000-10-23 09:17:48 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
PageMasterImportPropertyMapper::~PageMasterImportPropertyMapper()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2000-11-15 13:01:55 +00:00
|
|
|
sal_Bool PageMasterImportPropertyMapper::handleSpecialItem(
|
2000-10-23 09:17:48 +00:00
|
|
|
XMLPropertyState& rProperty,
|
|
|
|
::std::vector< XMLPropertyState >& rProperties,
|
|
|
|
const ::rtl::OUString& rValue,
|
|
|
|
const SvXMLUnitConverter& rUnitConverter,
|
|
|
|
const SvXMLNamespaceMap& rNamespaceMap ) const
|
|
|
|
{
|
2000-11-15 13:01:55 +00:00
|
|
|
sal_Bool bRet = sal_False;
|
|
|
|
sal_Int16 nContextID =
|
|
|
|
getPropertySetMapper()->GetEntryContextId(rProperty.mnIndex);
|
|
|
|
|
|
|
|
if( CTF_PM_REGISTER_STYLE==nContextID )
|
|
|
|
{
|
|
|
|
Reference < XNameContainer > xParaStyles =
|
|
|
|
rImport.GetTextImport()->GetParaStyles();
|
|
|
|
if( xParaStyles.is() && xParaStyles->hasByName( rValue ) )
|
|
|
|
{
|
|
|
|
rProperty.maValue <<= rValue;
|
|
|
|
bRet = sal_True;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
bRet = SvXMLImportPropertyMapper::handleSpecialItem(
|
|
|
|
rProperty, rProperties, rValue,
|
|
|
|
rUnitConverter, rNamespaceMap );
|
|
|
|
}
|
|
|
|
|
|
|
|
return bRet;
|
|
|
|
}
|
|
|
|
|
2000-10-23 09:17:48 +00:00
|
|
|
|
2000-10-26 09:41:37 +00:00
|
|
|
void PageMasterImportPropertyMapper::finished(::std::vector< XMLPropertyState >& rProperties, sal_Int32 nStartIndex, sal_Int32 nEndIndex ) const
|
2000-10-23 09:17:48 +00:00
|
|
|
{
|
2000-10-26 09:41:37 +00:00
|
|
|
SvXMLImportPropertyMapper::finished(rProperties, nStartIndex, nEndIndex);
|
2000-10-23 09:17:48 +00:00
|
|
|
XMLPropertyState* pAllPaddingProperty = NULL;
|
2000-10-27 02:56:15 +00:00
|
|
|
XMLPropertyState* pPadding[4] = { NULL, NULL, NULL, NULL };
|
|
|
|
XMLPropertyState* pNewPadding[4] = { NULL, NULL, NULL, NULL };
|
2000-10-23 09:17:48 +00:00
|
|
|
XMLPropertyState* pAllBorderProperty = NULL;
|
2000-10-27 02:56:15 +00:00
|
|
|
XMLPropertyState* pBorders[4] = { NULL, NULL, NULL, NULL };
|
|
|
|
XMLPropertyState* pNewBorders[4] = { NULL, NULL, NULL, NULL };
|
2000-10-23 09:17:48 +00:00
|
|
|
XMLPropertyState* pAllBorderWidthProperty = NULL;
|
2000-10-27 02:56:15 +00:00
|
|
|
XMLPropertyState* pBorderWidths[4] = { NULL, NULL, NULL, NULL };
|
2000-10-25 14:00:52 +00:00
|
|
|
XMLPropertyState* pAllHeaderPaddingProperty = NULL;
|
2000-10-27 02:56:15 +00:00
|
|
|
XMLPropertyState* pHeaderPadding[4] = { NULL, NULL, NULL, NULL };
|
|
|
|
XMLPropertyState* pHeaderNewPadding[4] = { NULL, NULL, NULL, NULL };
|
2000-10-25 14:00:52 +00:00
|
|
|
XMLPropertyState* pAllHeaderBorderProperty = NULL;
|
2000-10-27 02:56:15 +00:00
|
|
|
XMLPropertyState* pHeaderBorders[4] = { NULL, NULL, NULL, NULL };
|
|
|
|
XMLPropertyState* pHeaderNewBorders[4] = { NULL, NULL, NULL, NULL };
|
2000-10-25 14:00:52 +00:00
|
|
|
XMLPropertyState* pAllHeaderBorderWidthProperty = NULL;
|
2000-10-27 02:56:15 +00:00
|
|
|
XMLPropertyState* pHeaderBorderWidths[4] = { NULL, NULL, NULL, NULL };
|
2000-10-25 14:00:52 +00:00
|
|
|
XMLPropertyState* pAllFooterPaddingProperty = NULL;
|
2000-10-27 02:56:15 +00:00
|
|
|
XMLPropertyState* pFooterPadding[4] = { NULL, NULL, NULL, NULL };
|
|
|
|
XMLPropertyState* pFooterNewPadding[4] = { NULL, NULL, NULL, NULL };
|
2000-10-25 14:00:52 +00:00
|
|
|
XMLPropertyState* pAllFooterBorderProperty = NULL;
|
2000-10-27 02:56:15 +00:00
|
|
|
XMLPropertyState* pFooterBorders[4] = { NULL, NULL, NULL, NULL };
|
|
|
|
XMLPropertyState* pFooterNewBorders[4] = { NULL, NULL, NULL, NULL };
|
2000-10-25 14:00:52 +00:00
|
|
|
XMLPropertyState* pAllFooterBorderWidthProperty = NULL;
|
2000-10-27 02:56:15 +00:00
|
|
|
XMLPropertyState* pFooterBorderWidths[4] = { NULL, NULL, NULL, NULL };
|
2000-10-26 06:17:20 +00:00
|
|
|
XMLPropertyState* pHeaderHeight = NULL;
|
|
|
|
XMLPropertyState* pHeaderMinHeight = NULL;
|
2000-10-27 02:56:15 +00:00
|
|
|
XMLPropertyState* pHeaderDynamic = NULL;
|
2000-10-26 06:17:20 +00:00
|
|
|
XMLPropertyState* pFooterHeight = NULL;
|
|
|
|
XMLPropertyState* pFooterMinHeight = NULL;
|
2000-10-27 02:56:15 +00:00
|
|
|
XMLPropertyState* pFooterDynamic = NULL;
|
2003-12-01 15:23:02 +00:00
|
|
|
sal_uInt16 i; // for the "for" loop
|
|
|
|
|
2000-10-27 02:56:15 +00:00
|
|
|
::std::vector< XMLPropertyState >::iterator property = rProperties.begin();
|
|
|
|
for (property; property != rProperties.end(); property++)
|
2000-10-23 09:17:48 +00:00
|
|
|
{
|
2000-10-27 02:56:15 +00:00
|
|
|
sal_Int16 nContextID = getPropertySetMapper()->GetEntryContextId(property->mnIndex);
|
|
|
|
if (property->mnIndex >= nStartIndex && property->mnIndex < nEndIndex)
|
2000-10-23 09:17:48 +00:00
|
|
|
{
|
2000-10-27 02:56:15 +00:00
|
|
|
switch (nContextID)
|
2000-10-26 06:17:20 +00:00
|
|
|
{
|
2000-10-27 02:56:15 +00:00
|
|
|
case CTF_PM_PADDINGALL : pAllPaddingProperty = property; break;
|
|
|
|
case CTF_PM_PADDINGLEFT : pPadding[XML_LINE_LEFT] = property; break;
|
|
|
|
case CTF_PM_PADDINGRIGHT : pPadding[XML_LINE_RIGHT] = property; break;
|
|
|
|
case CTF_PM_PADDINGTOP : pPadding[XML_LINE_TOP] = property; break;
|
|
|
|
case CTF_PM_PADDINGBOTTOM : pPadding[XML_LINE_BOTTOM] = property; break;
|
|
|
|
case CTF_PM_BORDERALL : pAllBorderProperty = property; break;
|
|
|
|
case CTF_PM_BORDERLEFT : pBorders[XML_LINE_LEFT] = property; break;
|
|
|
|
case CTF_PM_BORDERRIGHT : pBorders[XML_LINE_RIGHT] = property; break;
|
|
|
|
case CTF_PM_BORDERTOP : pBorders[XML_LINE_TOP] = property; break;
|
|
|
|
case CTF_PM_BORDERBOTTOM : pBorders[XML_LINE_BOTTOM] = property; break;
|
|
|
|
case CTF_PM_BORDERWIDTHALL : pAllBorderWidthProperty = property; break;
|
|
|
|
case CTF_PM_BORDERWIDTHLEFT : pBorderWidths[XML_LINE_LEFT] = property; break;
|
|
|
|
case CTF_PM_BORDERWIDTHRIGHT : pBorderWidths[XML_LINE_RIGHT] = property; break;
|
|
|
|
case CTF_PM_BORDERWIDTHTOP : pBorderWidths[XML_LINE_TOP] = property; break;
|
|
|
|
case CTF_PM_BORDERWIDTHBOTTOM : pBorderWidths[XML_LINE_BOTTOM] = property; break;
|
|
|
|
case CTF_PM_HEADERPADDINGALL : pAllHeaderPaddingProperty = property; break;
|
|
|
|
case CTF_PM_HEADERPADDINGLEFT : pHeaderPadding[XML_LINE_LEFT] = property; break;
|
|
|
|
case CTF_PM_HEADERPADDINGRIGHT : pHeaderPadding[XML_LINE_RIGHT] = property; break;
|
|
|
|
case CTF_PM_HEADERPADDINGTOP : pHeaderPadding[XML_LINE_TOP] = property; break;
|
|
|
|
case CTF_PM_HEADERPADDINGBOTTOM : pHeaderPadding[XML_LINE_BOTTOM] = property; break;
|
|
|
|
case CTF_PM_HEADERBORDERALL : pAllHeaderBorderProperty = property; break;
|
|
|
|
case CTF_PM_HEADERBORDERLEFT : pHeaderBorders[XML_LINE_LEFT] = property; break;
|
|
|
|
case CTF_PM_HEADERBORDERRIGHT : pHeaderBorders[XML_LINE_RIGHT] = property; break;
|
|
|
|
case CTF_PM_HEADERBORDERTOP : pHeaderBorders[XML_LINE_TOP] = property; break;
|
|
|
|
case CTF_PM_HEADERBORDERBOTTOM : pHeaderBorders[XML_LINE_BOTTOM] = property; break;
|
|
|
|
case CTF_PM_HEADERBORDERWIDTHALL : pAllHeaderBorderWidthProperty = property; break;
|
|
|
|
case CTF_PM_HEADERBORDERWIDTHLEFT : pHeaderBorderWidths[XML_LINE_LEFT] = property; break;
|
|
|
|
case CTF_PM_HEADERBORDERWIDTHRIGHT : pHeaderBorderWidths[XML_LINE_RIGHT] = property; break;
|
|
|
|
case CTF_PM_HEADERBORDERWIDTHTOP : pHeaderBorderWidths[XML_LINE_TOP] = property; break;
|
|
|
|
case CTF_PM_HEADERBORDERWIDTHBOTTOM : pHeaderBorderWidths[XML_LINE_BOTTOM] = property; break;
|
|
|
|
case CTF_PM_FOOTERPADDINGALL : pAllFooterPaddingProperty = property; break;
|
|
|
|
case CTF_PM_FOOTERPADDINGLEFT : pFooterPadding[XML_LINE_LEFT] = property; break;
|
|
|
|
case CTF_PM_FOOTERPADDINGRIGHT : pFooterPadding[XML_LINE_RIGHT] = property; break;
|
|
|
|
case CTF_PM_FOOTERPADDINGTOP : pFooterPadding[XML_LINE_TOP] = property; break;
|
|
|
|
case CTF_PM_FOOTERPADDINGBOTTOM : pFooterPadding[XML_LINE_BOTTOM] = property; break;
|
|
|
|
case CTF_PM_FOOTERBORDERALL : pAllFooterBorderProperty = property; break;
|
|
|
|
case CTF_PM_FOOTERBORDERLEFT : pFooterBorders[XML_LINE_LEFT] = property; break;
|
|
|
|
case CTF_PM_FOOTERBORDERRIGHT : pFooterBorders[XML_LINE_RIGHT] = property; break;
|
|
|
|
case CTF_PM_FOOTERBORDERTOP : pFooterBorders[XML_LINE_TOP] = property; break;
|
|
|
|
case CTF_PM_FOOTERBORDERBOTTOM : pFooterBorders[XML_LINE_BOTTOM] = property; break;
|
|
|
|
case CTF_PM_FOOTERBORDERWIDTHALL : pAllFooterBorderWidthProperty = property; break;
|
|
|
|
case CTF_PM_FOOTERBORDERWIDTHLEFT : pFooterBorderWidths[XML_LINE_LEFT] = property; break;
|
|
|
|
case CTF_PM_FOOTERBORDERWIDTHRIGHT : pFooterBorderWidths[XML_LINE_RIGHT] = property; break;
|
|
|
|
case CTF_PM_FOOTERBORDERWIDTHTOP : pFooterBorderWidths[XML_LINE_TOP] = property; break;
|
|
|
|
case CTF_PM_FOOTERBORDERWIDTHBOTTOM : pFooterBorderWidths[XML_LINE_BOTTOM] = property; break;
|
|
|
|
case CTF_PM_HEADERHEIGHT : pHeaderHeight = property; break;
|
|
|
|
case CTF_PM_HEADERMINHEIGHT : pHeaderMinHeight = property; break;
|
|
|
|
case CTF_PM_FOOTERHEIGHT : pFooterHeight = property; break;
|
|
|
|
case CTF_PM_FOOTERMINHEIGHT : pFooterMinHeight = property; break;
|
2000-10-26 06:17:20 +00:00
|
|
|
}
|
2000-10-23 09:17:48 +00:00
|
|
|
}
|
|
|
|
}
|
2000-10-27 02:56:15 +00:00
|
|
|
|
2003-12-01 15:23:02 +00:00
|
|
|
for ( i = 0; i < 4; i++)
|
2000-10-23 09:17:48 +00:00
|
|
|
{
|
2000-10-27 02:56:15 +00:00
|
|
|
if (pAllPaddingProperty && !pPadding[i])
|
|
|
|
pNewPadding[i] = new XMLPropertyState(pAllPaddingProperty->mnIndex + 1 + i, pAllPaddingProperty->maValue);
|
|
|
|
if (pAllBorderProperty && !pBorders[i])
|
2000-10-23 09:17:48 +00:00
|
|
|
{
|
2000-10-27 02:56:15 +00:00
|
|
|
pNewBorders[i] = new XMLPropertyState(pAllBorderProperty->mnIndex + 1 + i, pAllBorderProperty->maValue);
|
|
|
|
pBorders[i] = pNewBorders[i];
|
2000-10-23 09:17:48 +00:00
|
|
|
}
|
2000-10-27 02:56:15 +00:00
|
|
|
if( !pBorderWidths[i] )
|
|
|
|
pBorderWidths[i] = pAllBorderWidthProperty;
|
|
|
|
else
|
|
|
|
pBorderWidths[i]->mnIndex = -1;
|
|
|
|
if( pBorders[i] )
|
2000-10-23 09:17:48 +00:00
|
|
|
{
|
2000-10-27 02:56:15 +00:00
|
|
|
table::BorderLine aBorderLine;
|
|
|
|
pBorders[i]->maValue >>= aBorderLine;
|
|
|
|
if( pBorderWidths[i] )
|
|
|
|
{
|
|
|
|
table::BorderLine aBorderLineWidth;
|
|
|
|
pBorderWidths[i]->maValue >>= aBorderLineWidth;
|
|
|
|
aBorderLine.OuterLineWidth = aBorderLineWidth.OuterLineWidth;
|
|
|
|
aBorderLine.InnerLineWidth = aBorderLineWidth.InnerLineWidth;
|
|
|
|
aBorderLine.LineDistance = aBorderLineWidth.LineDistance;
|
|
|
|
pBorders[i]->maValue <<= aBorderLine;
|
|
|
|
}
|
2000-10-23 09:17:48 +00:00
|
|
|
}
|
2000-10-27 02:56:15 +00:00
|
|
|
if (pAllHeaderPaddingProperty && !pHeaderPadding[i])
|
|
|
|
pHeaderNewPadding[i] = new XMLPropertyState(pAllHeaderPaddingProperty->mnIndex + 1 + i, pAllHeaderPaddingProperty->maValue);
|
|
|
|
if (pAllHeaderBorderProperty && !pHeaderBorders[i])
|
|
|
|
pHeaderNewBorders[i] = new XMLPropertyState(pAllHeaderBorderProperty->mnIndex + 1 + i, pAllHeaderBorderProperty->maValue);
|
|
|
|
if( !pHeaderBorderWidths[i] )
|
|
|
|
pHeaderBorderWidths[i] = pAllHeaderBorderWidthProperty;
|
|
|
|
else
|
|
|
|
pHeaderBorderWidths[i]->mnIndex = -1;
|
|
|
|
if( pHeaderBorders[i] )
|
2000-10-23 09:17:48 +00:00
|
|
|
{
|
2000-10-27 02:56:15 +00:00
|
|
|
table::BorderLine aBorderLine;
|
|
|
|
pHeaderBorders[i]->maValue >>= aBorderLine;
|
|
|
|
if( pHeaderBorderWidths[i] )
|
|
|
|
{
|
|
|
|
table::BorderLine aBorderLineWidth;
|
|
|
|
pHeaderBorderWidths[i]->maValue >>= aBorderLineWidth;
|
|
|
|
aBorderLine.OuterLineWidth = aBorderLineWidth.OuterLineWidth;
|
|
|
|
aBorderLine.InnerLineWidth = aBorderLineWidth.InnerLineWidth;
|
|
|
|
aBorderLine.LineDistance = aBorderLineWidth.LineDistance;
|
|
|
|
pHeaderBorders[i]->maValue <<= aBorderLine;
|
|
|
|
}
|
2000-10-23 09:17:48 +00:00
|
|
|
}
|
2000-10-27 02:56:15 +00:00
|
|
|
if (pAllFooterPaddingProperty && !pFooterPadding[i])
|
|
|
|
pFooterNewPadding[i] = new XMLPropertyState(pAllFooterPaddingProperty->mnIndex + 1 + i, pAllFooterPaddingProperty->maValue);
|
|
|
|
if (pAllFooterBorderProperty && !pFooterBorders[i])
|
|
|
|
pFooterNewBorders[i] = new XMLPropertyState(pAllFooterBorderProperty->mnIndex + 1 + i, pAllFooterBorderProperty->maValue);
|
|
|
|
if( !pFooterBorderWidths[i] )
|
|
|
|
pFooterBorderWidths[i] = pAllFooterBorderWidthProperty;
|
|
|
|
else
|
|
|
|
pFooterBorderWidths[i]->mnIndex = -1;
|
|
|
|
if( pFooterBorders[i] )
|
2000-10-23 09:17:48 +00:00
|
|
|
{
|
2000-10-27 02:56:15 +00:00
|
|
|
table::BorderLine aBorderLine;
|
|
|
|
pFooterBorders[i]->maValue >>= aBorderLine;
|
|
|
|
if( pFooterBorderWidths[i] )
|
|
|
|
{
|
|
|
|
table::BorderLine aBorderLineWidth;
|
|
|
|
pFooterBorderWidths[i]->maValue >>= aBorderLineWidth;
|
|
|
|
aBorderLine.OuterLineWidth = aBorderLineWidth.OuterLineWidth;
|
|
|
|
aBorderLine.InnerLineWidth = aBorderLineWidth.InnerLineWidth;
|
|
|
|
aBorderLine.LineDistance = aBorderLineWidth.LineDistance;
|
|
|
|
pFooterBorders[i]->maValue <<= aBorderLine;
|
|
|
|
}
|
2000-10-23 09:17:48 +00:00
|
|
|
}
|
|
|
|
}
|
2000-10-27 02:56:15 +00:00
|
|
|
|
2000-10-26 06:17:20 +00:00
|
|
|
if (pHeaderHeight)
|
|
|
|
{
|
|
|
|
sal_Bool bValue(sal_False);
|
|
|
|
uno::Any aAny;
|
|
|
|
aAny.setValue( &bValue, ::getBooleanCppuType() );
|
2000-10-27 02:56:15 +00:00
|
|
|
pHeaderDynamic = new XMLPropertyState(pHeaderHeight->mnIndex + 2, aAny);
|
2000-10-26 06:17:20 +00:00
|
|
|
}
|
|
|
|
if (pHeaderMinHeight)
|
|
|
|
{
|
|
|
|
sal_Bool bValue(sal_True);
|
|
|
|
uno::Any aAny;
|
|
|
|
aAny.setValue( &bValue, ::getBooleanCppuType() );
|
2000-10-27 02:56:15 +00:00
|
|
|
pHeaderDynamic = new XMLPropertyState(pHeaderMinHeight->mnIndex + 1, aAny);
|
2000-10-26 06:17:20 +00:00
|
|
|
}
|
|
|
|
if (pFooterHeight)
|
|
|
|
{
|
|
|
|
sal_Bool bValue(sal_False);
|
|
|
|
uno::Any aAny;
|
|
|
|
aAny.setValue( &bValue, ::getBooleanCppuType() );
|
2000-10-27 02:56:15 +00:00
|
|
|
pFooterDynamic = new XMLPropertyState(pFooterHeight->mnIndex + 2, aAny);
|
2000-10-26 06:17:20 +00:00
|
|
|
}
|
|
|
|
if (pFooterMinHeight)
|
|
|
|
{
|
|
|
|
sal_Bool bValue(sal_True);
|
|
|
|
uno::Any aAny;
|
|
|
|
aAny.setValue( &bValue, ::getBooleanCppuType() );
|
2000-10-27 02:56:15 +00:00
|
|
|
pFooterDynamic = new XMLPropertyState(pFooterMinHeight->mnIndex + 1, aAny);
|
|
|
|
}
|
|
|
|
for (i = 0; i < 4; i++)
|
|
|
|
{
|
|
|
|
if (pNewPadding[i])
|
|
|
|
{
|
|
|
|
rProperties.push_back(*pNewPadding[i]);
|
|
|
|
delete pNewPadding[i];
|
|
|
|
}
|
|
|
|
if (pNewBorders[i])
|
|
|
|
{
|
|
|
|
rProperties.push_back(*pNewBorders[i]);
|
|
|
|
delete pNewBorders[i];
|
|
|
|
}
|
|
|
|
if (pHeaderNewPadding[i])
|
|
|
|
{
|
|
|
|
rProperties.push_back(*pHeaderNewPadding[i]);
|
|
|
|
delete pHeaderNewPadding[i];
|
|
|
|
}
|
|
|
|
if (pHeaderNewBorders[i])
|
|
|
|
{
|
|
|
|
rProperties.push_back(*pHeaderNewBorders[i]);
|
|
|
|
delete pHeaderNewBorders[i];
|
|
|
|
}
|
|
|
|
if (pFooterNewPadding[i])
|
|
|
|
{
|
|
|
|
rProperties.push_back(*pFooterNewPadding[i]);
|
|
|
|
delete pFooterNewPadding[i];
|
|
|
|
}
|
|
|
|
if (pFooterNewBorders[i])
|
|
|
|
{
|
|
|
|
rProperties.push_back(*pFooterNewBorders[i]);
|
|
|
|
delete pFooterNewBorders[i];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(pHeaderDynamic)
|
|
|
|
{
|
|
|
|
rProperties.push_back(*pHeaderDynamic);
|
|
|
|
delete pHeaderDynamic;
|
|
|
|
}
|
|
|
|
if(pFooterDynamic)
|
|
|
|
{
|
|
|
|
rProperties.push_back(*pFooterDynamic);
|
|
|
|
delete pFooterDynamic;
|
2000-10-26 06:17:20 +00:00
|
|
|
}
|
2000-10-23 09:17:48 +00:00
|
|
|
}
|
|
|
|
|