diff options
author | RĂ¼diger Timm <rt@openoffice.org> | 2007-07-06 08:45:08 +0000 |
---|---|---|
committer | RĂ¼diger Timm <rt@openoffice.org> | 2007-07-06 08:45:08 +0000 |
commit | 664af7b8c3882e56d936d34a9c26f273ef516bea (patch) | |
tree | dde74a12a2d9cb24c36e4782b6c0ce70c05a2e39 /xmloff | |
parent | a426f7fcc6a3d3de89d4890a55b779a4d405a3e4 (diff) |
INTEGRATION: CWS oj14 (1.41.4); FILE MERGED
2007/02/20 14:40:32 ama 1.41.4.2: Fix #i71935#: Para/Text-properties set by cell style
2006/12/19 14:05:57 oj 1.41.4.1: some clean up
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/style/xmlstyle.cxx | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/xmloff/source/style/xmlstyle.cxx b/xmloff/source/style/xmlstyle.cxx index a0b712c5234d..3be42b3e9135 100644 --- a/xmloff/source/style/xmlstyle.cxx +++ b/xmloff/source/style/xmlstyle.cxx @@ -4,9 +4,9 @@ * * $RCSfile: xmlstyle.cxx,v $ * - * $Revision: 1.42 $ + * $Revision: 1.43 $ * - * last change: $Author: hr $ $Date: 2007-06-27 15:49:16 $ + * last change: $Author: rt $ $Date: 2007-07-06 09:45:08 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -880,21 +880,23 @@ Reference < XNameContainer > SvXMLStylesContext::GetStylesContainer( { Reference< XStyleFamiliesSupplier > xFamiliesSupp( GetImport().GetModel(), UNO_QUERY ); - Reference< XNameAccess > xFamilies = xFamiliesSupp->getStyleFamilies(); - if (xFamilies->hasByName(sName)) + if ( xFamiliesSupp.is() ) { - Any aAny = xFamilies->getByName( sName ); - - xStyles = *(Reference<XNameContainer>*)aAny.getValue(); - switch( nFamily ) + Reference< XNameAccess > xFamilies = xFamiliesSupp->getStyleFamilies(); + if (xFamilies->hasByName(sName)) { - case XML_STYLE_FAMILY_TEXT_PARAGRAPH: - ((SvXMLStylesContext *)this)->mxParaStyles = xStyles; - break; + xStyles.set(xFamilies->getByName( sName ),uno::UNO_QUERY); - case XML_STYLE_FAMILY_TEXT_TEXT: - ((SvXMLStylesContext *)this)->mxTextStyles = xStyles; - break; + switch( nFamily ) + { + case XML_STYLE_FAMILY_TEXT_PARAGRAPH: + ((SvXMLStylesContext *)this)->mxParaStyles = xStyles; + break; + + case XML_STYLE_FAMILY_TEXT_TEXT: + ((SvXMLStylesContext *)this)->mxTextStyles = xStyles; + break; + } } } } @@ -983,7 +985,8 @@ void SvXMLStylesContext::CopyAutoStylesToDoc() { SvXMLStyleContext *pStyle = GetStyle( i ); if( !pStyle || ( pStyle->GetFamily() != XML_STYLE_FAMILY_TEXT_TEXT && - pStyle->GetFamily() != XML_STYLE_FAMILY_TEXT_PARAGRAPH ) ) + pStyle->GetFamily() != XML_STYLE_FAMILY_TEXT_PARAGRAPH && + pStyle->GetFamily() != XML_STYLE_FAMILY_TABLE_CELL ) ) continue; pStyle->CreateAndInsert( sal_False ); } |