diff options
author | Michael Brauer <mib@openoffice.org> | 2000-11-15 13:04:24 +0000 |
---|---|---|
committer | Michael Brauer <mib@openoffice.org> | 2000-11-15 13:04:24 +0000 |
commit | 881f16095afee5394f5f287f64be437387b35fdd (patch) | |
tree | bb75442ecb3c219ed419795071da5849110ea103 /sw/source/core | |
parent | d0cabe726de55f6e7e8286d83c50f086e90cb7e8 (diff) |
removed RegisterTruth for page styles, added RegisterStyleName
Diffstat (limited to 'sw/source/core')
-rw-r--r-- | sw/source/core/unocore/unomap.cxx | 8 | ||||
-rw-r--r-- | sw/source/core/unocore/unostyle.cxx | 38 |
2 files changed, 39 insertions, 7 deletions
diff --git a/sw/source/core/unocore/unomap.cxx b/sw/source/core/unocore/unomap.cxx index 3839c371d039..bb85b77e9c3a 100644 --- a/sw/source/core/unocore/unomap.cxx +++ b/sw/source/core/unocore/unomap.cxx @@ -2,9 +2,9 @@ * * $RCSfile: unomap.cxx,v $ * - * $Revision: 1.17 $ + * $Revision: 1.18 $ * - * last change: $Author: os $ $Date: 2000-11-09 14:13:20 $ + * last change: $Author: mib $ $Date: 2000-11-15 14:04:24 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -898,8 +898,8 @@ const SfxItemPropertyMap* SwUnoPropertyMapProvider::GetPropertyMap(sal_uInt16 { SW_PROP_NAME(UNO_NAME_NUMBERING_TYPE), SID_ATTR_PAGE, &::getCppuType((const sal_Int16*)0), PROPERTY_NONE , MID_PAGE_NUMTYPE }, { SW_PROP_NAME(UNO_NAME_PAGE_STYLE_LAYOUT), SID_ATTR_PAGE, &::getCppuType((const style::PageStyleLayout*)0), PROPERTY_NONE ,MID_PAGE_LAYOUT }, { SW_PROP_NAME(UNO_NAME_PRINTER_PAPER_TRAY), RES_PAPER_BIN, &::getCppuType((const sal_Int8*)0), PROPERTY_NONE , 0 }, - { SW_PROP_NAME(UNO_NAME_REGISTER_MODE_ACTIVE), SID_SWREGISTER_MODE, &::getBooleanCppuType(), PROPERTY_NONE , 0 }, - { SW_PROP_NAME(UNO_NAME_REGISTER_PARAGRAPH_STYLE),SID_ATTR_PAGE_EXT1, &::getCppuType((const OUString*)0), PROPERTY_NONE , 0 }, +// { SW_PROP_NAME(UNO_NAME_REGISTER_MODE_ACTIVE), SID_SWREGISTER_MODE, &::getBooleanCppuType(), PROPERTY_NONE , 0 }, + { SW_PROP_NAME(UNO_NAME_REGISTER_PARAGRAPH_STYLE),SID_SWREGISTER_COLLECTION, &::getCppuType((const OUString*)0), PROPERTY_NONE , 0 }, { SW_PROP_NAME(UNO_NAME_SIZE), SID_ATTR_PAGE_SIZE, &::getCppuType((const awt::Size*)0), PROPERTY_NONE, MID_SIZE_SIZE|CONVERT_TWIPS}, { SW_PROP_NAME(UNO_NAME_WIDTH), SID_ATTR_PAGE_SIZE, &::getCppuType((const sal_Int32*)0) , PROPERTY_NONE, MID_SIZE_WIDTH|CONVERT_TWIPS}, { SW_PROP_NAME(UNO_NAME_HEIGHT), SID_ATTR_PAGE_SIZE, &::getCppuType((const sal_Int32*)0) , PROPERTY_NONE, MID_SIZE_HEIGHT|CONVERT_TWIPS }, diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index 8ed8f6286919..8c93c482ec93 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -2,9 +2,9 @@ * * $RCSfile: unostyle.cxx,v $ * - * $Revision: 1.9 $ + * $Revision: 1.10 $ * - * last change: $Author: os $ $Date: 2000-11-07 09:58:56 $ + * last change: $Author: mib $ $Date: 2000-11-15 14:04:24 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -662,7 +662,7 @@ void SwXStyleFamilies::loadStylesFromURL(const OUString& rURL, aOpt.SetNumRules( bLoadStyleNumbering ); aOpt.SetMerge( !bLoadStyleOverwrite ); - ULONG nErr = pDocShell->LoadStylesFromFile( rURL, aOpt, TRUE ); + ULONG nErr = 0; //pDocShell->LoadStylesFromFile( rURL, aOpt, TRUE ); if( nErr ) throw io::IOException(); } @@ -1717,6 +1717,25 @@ void SwXStyle::setPropertyValue(const OUString& rPropertyName, const Any& aValue aBase.GetCollection()->SetPoolFmtId( nId ); } break; + case SID_SWREGISTER_COLLECTION: + { + SfxItemSet& rStyleSet = aBase.GetItemSet(); + SfxItemSet aSet(*rStyleSet.GetPool(), + SID_SWREGISTER_MODE, + SID_SWREGISTER_COLLECTION); + aSet.Put(rStyleSet); + OUString sName; + aValue >>= sName; + SwRegisterItem aReg( sName.getLength() != 0); + aReg.SetWhich(SID_SWREGISTER_MODE); + aSet.Put(aReg); + + aSet.Put(SfxStringItem(SID_SWREGISTER_COLLECTION, + SwXStyleFamilies::GetUIName(sName, + SFX_STYLE_FAMILY_PARA) )); + aBase.SetItemSet(aSet); + } + break; case RES_PARATR_DROP: { if( MID_DROPCAP_CHAR_STYLE_NAME == pMap->nMemberId) @@ -1892,6 +1911,19 @@ Any SwXStyle::getPropertyValue(const OUString& rPropertyName) aRet <<= nRet; } break; + case SID_SWREGISTER_COLLECTION: + { + const SwPageDesc *pPageDesc = aStyle.GetPageDesc(); + const SwTxtFmtColl* pCol = 0; + OUString sName; + if( pPageDesc ) + pCol = pPageDesc->GetRegisterFmtColl(); + if( pCol ) + sName = SwXStyleFamilies::GetProgrammaticName( + pCol->GetName(), SFX_STYLE_FAMILY_PARA ); + aRet <<= sName; + } + break; default: query_itemset: { |