Kaydet (Commit) cbca86f0 authored tarafından Sascha Ballach's avatar Sascha Ballach

import of default styles added

üst 3523943f
......@@ -2,9 +2,9 @@
*
* $RCSfile: prstylei.cxx,v $
*
* $Revision: 1.5 $
* $Revision: 1.6 $
*
* last change: $Author: cl $ $Date: 2001-01-16 16:36:55 $
* last change: $Author: sab $ $Date: 2001-02-28 08:24:41 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
......@@ -129,11 +129,10 @@ XMLPropStyleContext::XMLPropStyleContext( SvXMLImport& rImport,
const Reference< XAttributeList > & xAttrList,
SvXMLStylesContext& rStyles, sal_uInt16 nFamily,
sal_Bool bDefault ) :
SvXMLStyleContext( rImport, nPrfx, rLName, xAttrList, nFamily ),
SvXMLStyleContext( rImport, nPrfx, rLName, xAttrList, nFamily, bDefault ),
xStyles( &rStyles ),
sIsPhysical( RTL_CONSTASCII_USTRINGPARAM( "IsPhysical" ) ),
sFollowStyle( RTL_CONSTASCII_USTRINGPARAM( "FollowStyle" ) ),
bDefaultStyle( bDefault )
sFollowStyle( RTL_CONSTASCII_USTRINGPARAM( "FollowStyle" ) )
{
}
......@@ -179,6 +178,10 @@ void XMLPropStyleContext::FillPropertySet(
xImpPrMap->FillPropertySet( aProperties, rPropSet );
}
void XMLPropStyleContext::SetDefaults()
{
}
Reference < XStyle > XMLPropStyleContext::Create()
{
Reference < XStyle > xNewStyle;
......@@ -204,7 +207,7 @@ Reference < XStyle > XMLPropStyleContext::Create()
void XMLPropStyleContext::CreateAndInsert( sal_Bool bOverwrite )
{
const OUString& rName = GetName();
if( 0 == rName.getLength() || bDefaultStyle )
if( 0 == rName.getLength() || IsDefaultStyle() )
return;
Reference < XNameContainer > xFamilies =
......
......@@ -2,9 +2,9 @@
*
* $RCSfile: xmlstyle.cxx,v $
*
* $Revision: 1.19 $
* $Revision: 1.20 $
*
* last change: $Author: fs $ $Date: 2001-02-01 09:49:03 $
* last change: $Author: sab $ $Date: 2001-02-28 08:24:41 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
......@@ -269,12 +269,13 @@ SvXMLStyleContext::SvXMLStyleContext(
SvXMLImport& rImp, sal_uInt16 nPrfx,
const OUString& rLName,
const uno::Reference< xml::sax::XAttributeList >&,
sal_uInt16 nFam ) :
sal_uInt16 nFam, sal_Bool bDefault ) :
SvXMLImportContext( rImp, nPrfx, rLName ),
nHelpId( UCHAR_MAX ),
nFamily( nFam ),
bValid( sal_True ),
bNew( sal_True )
bNew( sal_True ),
bDefaultStyle( bDefault )
{
}
......@@ -303,6 +304,10 @@ void SvXMLStyleContext::StartElement( const uno::Reference< xml::sax::XAttribute
}
}
void SvXMLStyleContext::SetDefaults()
{
}
void SvXMLStyleContext::CreateAndInsert( sal_Bool bOverwrite )
{
}
......@@ -984,7 +989,9 @@ void SvXMLStylesContext::CopyStylesToDoc( sal_Bool bOverwrite,
if( !pStyle )
continue;
if( InsertStyleFamily( pStyle->GetFamily() ) )
if (pStyle->IsDefaultStyle())
pStyle->SetDefaults();
else if( InsertStyleFamily( pStyle->GetFamily() ) )
pStyle->CreateAndInsert( bOverwrite );
}
......@@ -992,7 +999,7 @@ void SvXMLStylesContext::CopyStylesToDoc( sal_Bool bOverwrite,
for( i=0; i<nCount; i++ )
{
SvXMLStyleContext *pStyle = GetStyle( i );
if( !pStyle )
if( !pStyle || pStyle->IsDefaultStyle())
continue;
if( InsertStyleFamily( pStyle->GetFamily() ) )
......@@ -1010,7 +1017,7 @@ void SvXMLStylesContext::FinishStyles( sal_Bool bOverwrite )
for( sal_uInt32 i=0; i<nCount; i++ )
{
SvXMLStyleContext *pStyle = GetStyle( i );
if( !pStyle || !pStyle->IsValid() )
if( !pStyle || !pStyle->IsValid() || pStyle->IsDefaultStyle() )
continue;
if( InsertStyleFamily( pStyle->GetFamily() ) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment