This is an automated email from the ASF dual-hosted git repository. mseidel pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/openoffice.git
The following commit(s) were added to refs/heads/trunk by this push: new cf03d99b3b Corrected typo (Graphyic -> Graphic) cf03d99b3b is described below commit cf03d99b3bbaa545b2249a4d2825d0a19b29d30a Author: mseidel <msei...@apache.org> AuthorDate: Sun May 21 19:50:32 2023 +0200 Corrected typo (Graphyic -> Graphic) --- main/svx/inc/svx/nbdtmg.hxx | 97 ++++++++++++++-------------- main/svx/source/sidebar/nbdtmg.cxx | 111 +++++++++++++++++---------------- main/svx/source/sidebar/nbdtmgfact.cxx | 7 ++- 3 files changed, 112 insertions(+), 103 deletions(-) diff --git a/main/svx/inc/svx/nbdtmg.hxx b/main/svx/inc/svx/nbdtmg.hxx index 26ec061bdc..1fd4a0c1ff 100755 --- a/main/svx/inc/svx/nbdtmg.hxx +++ b/main/svx/inc/svx/nbdtmg.hxx @@ -1,5 +1,5 @@ /************************************************************** - * + * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -7,18 +7,20 @@ * to you under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. - * + * *************************************************************/ + + #ifndef _NBDTMG_HXX #define _NBDTMG_HXX #include "svx/svxdllapi.h" @@ -40,25 +42,25 @@ namespace svx { namespace sidebar { #define DEFAULT_BULLET_TYPES 8 #define DEFAULT_NONE 10 -#define DEFAULT_NUM_TYPE_MEMBER 5 +#define DEFAULT_NUM_TYPE_MEMBER 5 #define DEFAULT_NUM_VALUSET_COUNT 8 #define DEFAULT_NUMBERING_CACHE_FORMAT_VERSION 0x10 typedef sal_uInt16 NBOType; namespace eNBOType { - const NBOType BULLETS = 0x01; - const NBOType GRAPHICBULLETS = 0x02; - const NBOType NUMBERING = 0x03; - const NBOType OUTLINE = 0x04; - const NBOType MIXBULLETS = 0x05; + const NBOType BULLETS = 0x01; + const NBOType GRAPHICBULLETS = 0x02; + const NBOType NUMBERING = 0x03; + const NBOType OUTLINE = 0x04; + const NBOType MIXBULLETS = 0x05; } typedef sal_uInt16 NBType; namespace eNBType { - const NBOType BULLETS = 0x01; - const NBOType GRAPHICBULLETS = 0x02; + const NBOType BULLETS = 0x01; + const NBOType GRAPHICBULLETS = 0x02; } class SVX_DLLPUBLIC NumSettings_Impl @@ -99,10 +101,10 @@ class SVX_DLLPUBLIC BulletsSettings public: sal_Bool bIsCustomized; rtl::OUString sDescription; - NBType eType; + NBType eType; public: BulletsSettings(NBType eTy) : - bIsCustomized(sal_False), + bIsCustomized(sal_False), eType(eTy) {} virtual ~BulletsSettings(){} @@ -110,14 +112,14 @@ class SVX_DLLPUBLIC BulletsSettings class SVX_DLLPUBLIC BulletsSettings_Impl:public BulletsSettings { - public: + public: sal_Unicode cBulletChar; //rtl::OUString sBulletFont; Font aFont; - + public: BulletsSettings_Impl(NBType eTy) : - BulletsSettings(eTy) + BulletsSettings(eTy) {} virtual ~BulletsSettings_Impl(){} }; @@ -146,9 +148,9 @@ class SVX_DLLPUBLIC MixBulletsSettings_Impl NBType eType; sal_uInt16 nIndex; //index in the tab page display sal_uInt16 nIndexDefault; - BulletsSettings* pBullets; + BulletsSettings* pBullets; public: - MixBulletsSettings_Impl(NBType eTy) : + MixBulletsSettings_Impl(NBType eTy) : eType(eTy), nIndex((sal_uInt16)0xFFFF), nIndexDefault((sal_uInt16)0xFFFF), @@ -208,7 +210,7 @@ class SVX_DLLPUBLIC NBOTypeMgrBase NBOTypeMgrBase(const NBOType aType):eType(aType),pSet(0),eCoreUnit(SFX_MAPUNIT_TWIP),aNumCharFmtName(String()){} NBOTypeMgrBase(const NBOType aType,const SfxItemSet* pArg):eType(aType),pSet(pArg),eCoreUnit(SFX_MAPUNIT_TWIP),aNumCharFmtName(String()){} NBOTypeMgrBase(const NBOTypeMgrBase& aTypeMgr){eType = aTypeMgr.eType;pSet = aTypeMgr.pSet;eCoreUnit = aTypeMgr.eCoreUnit;aNumCharFmtName = aTypeMgr.aNumCharFmtName; } - virtual ~NBOTypeMgrBase() {} + virtual ~NBOTypeMgrBase() {} virtual void Init()=0; virtual sal_uInt16 GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 mLevel,sal_uInt16 nFromIndex=0)=0; virtual sal_Bool RelplaceNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_uInt16 mLevel=(sal_uInt16)0xFFFF)=0; @@ -226,7 +228,7 @@ class SVX_DLLPUBLIC NBOTypeMgrBase sal_Bool bIsLoading; void ImplLoad(String filename); void ImplStore(String filename); - + }; @@ -239,15 +241,15 @@ class SVX_DLLPUBLIC BulletsTypeMgr: public NBOTypeMgrBase static sal_Unicode aDynamicRTLBulletTypes[DEFAULT_BULLET_TYPES]; static BulletsSettings_Impl* pActualBullets[DEFAULT_BULLET_TYPES]; static BulletsTypeMgr* _instance; - public: + public: BulletsTypeMgr(const NBOType aType); BulletsTypeMgr(const NBOType aType,const SfxItemSet* pArg); BulletsTypeMgr(const BulletsTypeMgr& aTypeMgr); virtual ~BulletsTypeMgr() {} - virtual void Init(); + virtual void Init(); virtual sal_uInt16 GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 mLevel,sal_uInt16 nFromIndex=0); virtual sal_Bool RelplaceNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_uInt16 mLevel=(sal_uInt16)0xFFFF); - virtual sal_Bool ApplyNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_uInt16 mLevel=(sal_uInt16)0xFFFF,sal_Bool isDefault=false,sal_Bool isResetSize=false); + virtual sal_Bool ApplyNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_uInt16 mLevel=(sal_uInt16)0xFFFF,sal_Bool isDefault=false,sal_Bool isResetSize=false); virtual String GetDescription(sal_uInt16 nIndex,sal_Bool isDefault=false); virtual sal_Bool IsCustomized(sal_uInt16 nIndex); sal_Unicode GetBulChar(sal_uInt16 nIndex); @@ -261,59 +263,59 @@ class SVX_DLLPUBLIC BulletsTypeMgr: public NBOTypeMgrBase return _instance; } - + }; -class SVX_DLLPUBLIC GraphyicBulletsTypeMgr: public NBOTypeMgrBase +class SVX_DLLPUBLIC GraphicBulletsTypeMgr: public NBOTypeMgrBase { friend class OutlineTypeMgr; friend class NumberingTypeMgr; public: List aGrfDataLst; - static GraphyicBulletsTypeMgr* _instance; - public: - GraphyicBulletsTypeMgr(const NBOType aType); - GraphyicBulletsTypeMgr(const NBOType aType,const SfxItemSet* pArg); - GraphyicBulletsTypeMgr(const GraphyicBulletsTypeMgr& aTypeMgr); - virtual ~GraphyicBulletsTypeMgr() {} - virtual void Init(); + static GraphicBulletsTypeMgr* _instance; + public: + GraphicBulletsTypeMgr(const NBOType aType); + GraphicBulletsTypeMgr(const NBOType aType,const SfxItemSet* pArg); + GraphicBulletsTypeMgr(const GraphicBulletsTypeMgr& aTypeMgr); + virtual ~GraphicBulletsTypeMgr() {} + virtual void Init(); virtual sal_uInt16 GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 mLevel,sal_uInt16 nFromIndex=0); virtual sal_Bool RelplaceNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_uInt16 mLevel=(sal_uInt16)0xFFFF); - virtual sal_Bool ApplyNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_uInt16 mLevel=(sal_uInt16)0xFFFF,sal_Bool isDefault=false,sal_Bool isResetSize=false); + virtual sal_Bool ApplyNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_uInt16 mLevel=(sal_uInt16)0xFFFF,sal_Bool isDefault=false,sal_Bool isResetSize=false); virtual String GetDescription(sal_uInt16 nIndex,sal_Bool isDefault=false); virtual sal_Bool IsCustomized(sal_uInt16 nIndex); String GetGrfName(sal_uInt16 nIndex); - static GraphyicBulletsTypeMgr* GetInstance() + static GraphicBulletsTypeMgr* GetInstance() { if ( _instance == 0 ) { - _instance = new GraphyicBulletsTypeMgr(eNBOType::BULLETS); + _instance = new GraphicBulletsTypeMgr(eNBOType::BULLETS); } return _instance; } - + }; class SVX_DLLPUBLIC MixBulletsTypeMgr: public NBOTypeMgrBase { friend class OutlineTypeMgr; friend class NumberingTypeMgr; - public: + public: static MixBulletsSettings_Impl* pActualBullets[DEFAULT_BULLET_TYPES]; static MixBulletsSettings_Impl* pDefaultActualBullets[DEFAULT_BULLET_TYPES]; static MixBulletsTypeMgr* _instance; - public: + public: MixBulletsTypeMgr(const NBOType aType); MixBulletsTypeMgr(const NBOType aType,const SfxItemSet* pArg); MixBulletsTypeMgr(const MixBulletsTypeMgr& aTypeMgr); virtual ~MixBulletsTypeMgr() {} - virtual void Init(); + virtual void Init(); virtual sal_uInt16 GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 mLevel,sal_uInt16 nFromIndex=0); virtual sal_Bool RelplaceNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_uInt16 mLevel=(sal_uInt16)0xFFFF); - virtual sal_Bool ApplyNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_uInt16 mLevel=(sal_uInt16)0xFFFF,sal_Bool isDefault=false,sal_Bool isResetSize=false); + virtual sal_Bool ApplyNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_uInt16 mLevel=(sal_uInt16)0xFFFF,sal_Bool isDefault=false,sal_Bool isResetSize=false); virtual String GetDescription(sal_uInt16 nIndex,sal_Bool isDefault=false); - virtual sal_Bool IsCustomized(sal_uInt16 nIndex); + virtual sal_Bool IsCustomized(sal_uInt16 nIndex); static MixBulletsTypeMgr* GetInstance() { if ( _instance == 0 ) @@ -323,7 +325,7 @@ class SVX_DLLPUBLIC MixBulletsTypeMgr: public NBOTypeMgrBase return _instance; } - + }; class SVX_DLLPUBLIC NumberingTypeMgr: public NBOTypeMgrBase @@ -333,7 +335,7 @@ class SVX_DLLPUBLIC NumberingTypeMgr: public NBOTypeMgrBase NumberSettingsArr_Impl* pNumberSettingsArr; NumberSettingsArr_Impl* pDefaultNumberSettingsArr; static NumberingTypeMgr* _instance; - public: + public: NumberingTypeMgr(const NBOType aType); NumberingTypeMgr(const NBOType aType,const SfxItemSet* pArg); NumberingTypeMgr(const NumberingTypeMgr& aTypeMgr); @@ -341,7 +343,7 @@ class SVX_DLLPUBLIC NumberingTypeMgr: public NBOTypeMgrBase virtual void Init(); virtual sal_uInt16 GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 mLevel,sal_uInt16 nFromIndex=0); virtual sal_Bool RelplaceNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_uInt16 mLevel=(sal_uInt16)0xFFFF); - virtual sal_Bool ApplyNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_uInt16 mLevel=(sal_uInt16)0xFFFF,sal_Bool isDefault=false,sal_Bool isResetSize=false); + virtual sal_Bool ApplyNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_uInt16 mLevel=(sal_uInt16)0xFFFF,sal_Bool isDefault=false,sal_Bool isResetSize=false); virtual String GetDescription(sal_uInt16 nIndex,sal_Bool isDefault=false); virtual sal_Bool IsCustomized(sal_uInt16 nIndex); sal_uInt16 GetNumCount() const; @@ -364,7 +366,7 @@ class SVX_DLLPUBLIC OutlineTypeMgr: public NBOTypeMgrBase OutlineSettings_Impl* pOutlineSettingsArrs[DEFAULT_NUM_VALUSET_COUNT]; OutlineSettings_Impl* pDefaultOutlineSettingsArrs[DEFAULT_NUM_VALUSET_COUNT]; static OutlineTypeMgr* _instance; - public: + public: OutlineTypeMgr(const NBOType aType); OutlineTypeMgr(const NBOType aType,const SfxItemSet* pArg); OutlineTypeMgr(const OutlineTypeMgr& aTypeMgr); @@ -372,7 +374,7 @@ class SVX_DLLPUBLIC OutlineTypeMgr: public NBOTypeMgrBase virtual void Init(); virtual sal_uInt16 GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 mLevel,sal_uInt16 nFromIndex=0); virtual sal_Bool RelplaceNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_uInt16 mLevel=(sal_uInt16)0xFFFF); - virtual sal_Bool ApplyNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_uInt16 mLevel=(sal_uInt16)0xFFFF,sal_Bool isDefault=false,sal_Bool isResetSize=false); + virtual sal_Bool ApplyNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_uInt16 mLevel=(sal_uInt16)0xFFFF,sal_Bool isDefault=false,sal_Bool isResetSize=false); virtual String GetDescription(sal_uInt16 nIndex,sal_Bool isDefault=false); virtual sal_Bool IsCustomized(sal_uInt16 nIndex); static OutlineTypeMgr* GetInstance() @@ -387,4 +389,3 @@ class SVX_DLLPUBLIC OutlineTypeMgr: public NBOTypeMgrBase }; }} #endif - diff --git a/main/svx/source/sidebar/nbdtmg.cxx b/main/svx/source/sidebar/nbdtmg.cxx index f2a03c6909..12f1a080bc 100755 --- a/main/svx/source/sidebar/nbdtmg.cxx +++ b/main/svx/source/sidebar/nbdtmg.cxx @@ -1,5 +1,5 @@ /************************************************************** - * + * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -7,17 +7,20 @@ * to you under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. - * + * *************************************************************/ + + + #include "precompiled_svx.hxx" #ifndef _NBDTMG_HXX #include <svx/nbdtmg.hxx> @@ -116,7 +119,7 @@ Font& lcl_GetDefaultBulletFont() String(), Size( 0, 14 ) ); if(!bInit) { - aDefBulletFont.SetCharSet( RTL_TEXTENCODING_SYMBOL ); + aDefBulletFont.SetCharSet( RTL_TEXTENCODING_SYMBOL ); aDefBulletFont.SetFamily( FAMILY_DONTKNOW ); aDefBulletFont.SetPitch( PITCH_DONTKNOW ); aDefBulletFont.SetWeight( WEIGHT_DONTKNOW ); @@ -177,8 +180,8 @@ NumSettings_ImplPtr lcl_CreateNumberingSettingsPtr(const Sequence<PropertyValue> else if(pValues[j].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sBulletFontName))) pValues[j].Value >>= pNew->sBulletFont; } - const sal_Unicode cLocalPrefix = pNew->sPrefix.getLength() ? pNew->sPrefix.getStr()[0] : 0; - const sal_Unicode cLocalSuffix = pNew->sSuffix.getLength() ? pNew->sSuffix.getStr()[0] : 0; + const sal_Unicode cLocalPrefix = pNew->sPrefix.getLength() ? pNew->sPrefix.getStr()[0] : 0; + const sal_Unicode cLocalSuffix = pNew->sSuffix.getLength() ? pNew->sSuffix.getStr()[0] : 0; String aEmptyStr; if( cLocalPrefix == ' ') pNew->sPrefix=aEmptyStr; if( cLocalSuffix == ' ') pNew->sSuffix=aEmptyStr; @@ -214,7 +217,7 @@ void NBOTypeMgrBase::StoreBulCharFmtName_impl() { if ( pBulletCharFmt ) { - aNumCharFmtName = String(pBulletCharFmt->GetValue()); + aNumCharFmtName = String(pBulletCharFmt->GetValue()); } } } @@ -234,13 +237,13 @@ void NBOTypeMgrBase::ImplLoad(String filename) sal_uInt32 nVersion; sal_Int32 nNumIndex; *pIStm >> nVersion; - if (nVersion==DEFAULT_NUMBERING_CACHE_FORMAT_VERSION) //first version + if (nVersion==DEFAULT_NUMBERING_CACHE_FORMAT_VERSION) // first version { *pIStm >> nNumIndex; sal_uInt16 mLevel = 0x1; while (nNumIndex>=0 && nNumIndex<DEFAULT_NUM_VALUSET_COUNT) { SvxNumRule aNum(*pIStm); - //bullet color in font properties is not stored correctly. Need set tranparency bits manually + // bullet color in font properties is not stored correctly. Need set transparency bits manually for(sal_uInt16 i = 0; i < aNum.GetLevelCount(); i++) { SvxNumberFormat aFmt(aNum.GetLevel(i)); @@ -249,7 +252,7 @@ void NBOTypeMgrBase::ImplLoad(String filename) Color c=aFont.GetColor(); c.SetTransparency(0xFF); aFont.SetColor(c); - aFmt.SetBulletFont(&aFont); + aFmt.SetBulletFont(&aFont); aNum.SetLevel(i, aFmt); } } @@ -286,7 +289,7 @@ void NBOTypeMgrBase::ImplStore(String filename) } } nNumIndex = -1; - *pOStm << nNumIndex; //write end flag + *pOStm << nNumIndex; // write end flag delete pOStm; } eCoreUnit = eOldCoreUnit; @@ -301,7 +304,7 @@ void NBOTypeMgrBase::StoreMapUnit_impl() { { eCoreUnit = pSet->GetPool()->GetMetric(pSet->GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE)); } else { - //sd use different sid for numbering rule + // sd use different sid for numbering rule eState = pSet->GetItemState(EE_PARA_NUMBULLET, sal_False, &pItem); if(eState == SFX_ITEM_SET) { @@ -519,8 +522,8 @@ sal_Bool BulletsTypeMgr::ApplyNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_uIn aFmt.SetNumberingType( SVX_NUM_CHAR_SPECIAL ); aFmt.SetBulletFont(&rActBulletFont); aFmt.SetBulletChar(cChar ); - aFmt.SetCharFmtName(sBulletCharFmtName); - if (isResetSize) aFmt.SetBulletRelSize(45); + aFmt.SetCharFmtName(sBulletCharFmtName); + if (isResetSize) aFmt.SetBulletRelSize(45); aNum.SetLevel(i, aFmt); } nMask <<= 1; @@ -600,19 +603,19 @@ Font BulletsTypeMgr::GetBulCharFont(sal_uInt16 nIndex) /*************************************************************************************************** **********************Graphic Bullet Type lib*********************************************************** ****************************************************************************************************/ -GraphyicBulletsTypeMgr* GraphyicBulletsTypeMgr::_instance = 0; -GraphyicBulletsTypeMgr::GraphyicBulletsTypeMgr(const NBOType aType): +GraphicBulletsTypeMgr* GraphicBulletsTypeMgr::_instance = 0; +GraphicBulletsTypeMgr::GraphicBulletsTypeMgr(const NBOType aType): NBOTypeMgrBase(aType) { Init(); } -GraphyicBulletsTypeMgr::GraphyicBulletsTypeMgr(const NBOType aType,const SfxItemSet* pArg): +GraphicBulletsTypeMgr::GraphicBulletsTypeMgr(const NBOType aType,const SfxItemSet* pArg): NBOTypeMgrBase(aType,pArg) { Init(); } -GraphyicBulletsTypeMgr::GraphyicBulletsTypeMgr(const GraphyicBulletsTypeMgr& aTypeMgr): +GraphicBulletsTypeMgr::GraphicBulletsTypeMgr(const GraphicBulletsTypeMgr& aTypeMgr): NBOTypeMgrBase(aTypeMgr) { for (sal_uInt16 i=0;i< aTypeMgr.aGrfDataLst.Count();i++) @@ -632,15 +635,15 @@ GraphyicBulletsTypeMgr::GraphyicBulletsTypeMgr(const GraphyicBulletsTypeMgr& aTy delete pEntry; } } -void GraphyicBulletsTypeMgr::Init() +void GraphicBulletsTypeMgr::Init() { List aGrfNames; GalleryExplorer::FillObjList(GALLERY_THEME_BULLETS, aGrfNames); for(sal_uInt16 i = 0; i < aGrfNames.Count(); i++) { String* pGrfNm = (String*) aGrfNames.GetObject(i); - INetURLObject aObj(*pGrfNm); - if(aObj.GetProtocol() == INET_PROT_FILE) + INetURLObject aObj(*pGrfNm); + if(aObj.GetProtocol() == INET_PROT_FILE) *pGrfNm = aObj.PathToFileName(); GrfBulDataRelation* pEntry = new GrfBulDataRelation(eNBType::GRAPHICBULLETS); @@ -659,7 +662,7 @@ void GraphyicBulletsTypeMgr::Init() aGrfDataLst.Insert( pEntry, LIST_APPEND ); } } -sal_uInt16 GraphyicBulletsTypeMgr::GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 mLevel,sal_uInt16 /* nFromIndex */) +sal_uInt16 GraphicBulletsTypeMgr::GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 mLevel,sal_uInt16 /* nFromIndex */) { if ( mLevel == (sal_uInt16)0xFFFF || mLevel == 0) return (sal_uInt16)0xFFFF; @@ -696,7 +699,7 @@ sal_uInt16 GraphyicBulletsTypeMgr::GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uI return (sal_uInt16)0xFFFF; } -sal_Bool GraphyicBulletsTypeMgr::RelplaceNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_uInt16 mLevel) +sal_Bool GraphicBulletsTypeMgr::RelplaceNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_uInt16 mLevel) { if ( mLevel == (sal_uInt16)0xFFFF || mLevel > aNum.GetLevelCount() || mLevel == 0) return sal_False; @@ -743,7 +746,7 @@ sal_Bool GraphyicBulletsTypeMgr::RelplaceNumRule(SvxNumRule& aNum,sal_uInt16 nIn return sal_True; } -sal_Bool GraphyicBulletsTypeMgr::ApplyNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_uInt16 mLevel,sal_Bool /* isDefault */,sal_Bool /* isResetSize */) +sal_Bool GraphicBulletsTypeMgr::ApplyNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_uInt16 mLevel,sal_Bool /* isDefault */,sal_Bool /* isResetSize */) { //if ( mLevel == (sal_uInt16)0xFFFF ) // return sal_False; @@ -788,7 +791,7 @@ sal_Bool GraphyicBulletsTypeMgr::ApplyNumRule(SvxNumRule& aNum,sal_uInt16 nIndex return sal_True; } -String GraphyicBulletsTypeMgr::GetDescription(sal_uInt16 nIndex,sal_Bool /* isDefault */) +String GraphicBulletsTypeMgr::GetDescription(sal_uInt16 nIndex,sal_Bool /* isDefault */) { String sRet; sal_uInt16 nLength = 0; @@ -798,7 +801,7 @@ String GraphyicBulletsTypeMgr::GetDescription(sal_uInt16 nIndex,sal_Bool /* isDe return sRet; else { - GrfBulDataRelation* pEntry = (GrfBulDataRelation*) aGrfDataLst.GetObject(nIndex); + GrfBulDataRelation* pEntry = (GrfBulDataRelation*) aGrfDataLst.GetObject(nIndex); if ( pEntry ) { sRet = pEntry->sDescription; @@ -806,7 +809,7 @@ String GraphyicBulletsTypeMgr::GetDescription(sal_uInt16 nIndex,sal_Bool /* isDe } return sRet; } -sal_Bool GraphyicBulletsTypeMgr::IsCustomized(sal_uInt16 nIndex) +sal_Bool GraphicBulletsTypeMgr::IsCustomized(sal_uInt16 nIndex) { sal_Bool bRet = sal_False; @@ -817,7 +820,7 @@ sal_Bool GraphyicBulletsTypeMgr::IsCustomized(sal_uInt16 nIndex) return bRet; else { - GrfBulDataRelation* pEntry = (GrfBulDataRelation*) aGrfDataLst.GetObject(nIndex); + GrfBulDataRelation* pEntry = (GrfBulDataRelation*) aGrfDataLst.GetObject(nIndex); if ( pEntry ) { bRet = pEntry->bIsCustomized; @@ -826,7 +829,7 @@ sal_Bool GraphyicBulletsTypeMgr::IsCustomized(sal_uInt16 nIndex) return bRet; } -String GraphyicBulletsTypeMgr::GetGrfName(sal_uInt16 nIndex) +String GraphicBulletsTypeMgr::GetGrfName(sal_uInt16 nIndex) { String sRet; if ( nIndex < aGrfDataLst.Count() ) @@ -855,7 +858,7 @@ MixBulletsTypeMgr::MixBulletsTypeMgr(const NBOType aType): { pDefaultActualBullets[nItem] = pActualBullets[nItem]; } - //Initial the first time to store the default value. Then do it again for customized value + // Initial the first time to store the default value. Then do it again for customized value Init(); ImplLoad(String::CreateFromAscii("standard.sya")); } @@ -868,7 +871,7 @@ MixBulletsTypeMgr::MixBulletsTypeMgr(const NBOType aType,const SfxItemSet* pArg) { pDefaultActualBullets[nItem] = pActualBullets[nItem]; } - //Initial the first time to store the default value. Then do it again for customized value + // Initial the first time to store the default value. Then do it again for customized value Init(); ImplLoad(String::CreateFromAscii("standard.sya")); } @@ -881,7 +884,7 @@ MixBulletsTypeMgr::MixBulletsTypeMgr(const MixBulletsTypeMgr& aTypeMgr): if ( aTypeMgr.pActualBullets[i]->eType == eNBType::BULLETS ) { pActualBullets[i]->eType = aTypeMgr.pActualBullets[i]->eType; - pActualBullets[i]->nIndex = aTypeMgr.pActualBullets[i]->nIndex; //index in the tab page display + pActualBullets[i]->nIndex = aTypeMgr.pActualBullets[i]->nIndex; // index in the tab page display pActualBullets[i]->nIndexDefault = aTypeMgr.pActualBullets[i]->nIndexDefault; pActualBullets[i]->pBullets = new BulletsSettings_Impl(eNBType::BULLETS) ; ((BulletsSettings_Impl*)(pActualBullets[i]->pBullets))->cBulletChar = ((BulletsSettings_Impl*)(aTypeMgr.pActualBullets[i]->pBullets))->cBulletChar; @@ -892,7 +895,7 @@ MixBulletsTypeMgr::MixBulletsTypeMgr(const MixBulletsTypeMgr& aTypeMgr): }else if ( aTypeMgr.pActualBullets[i]->eType == eNBType::GRAPHICBULLETS ) { pActualBullets[i]->eType = aTypeMgr.pActualBullets[i]->eType; - pActualBullets[i]->nIndex = aTypeMgr.pActualBullets[i]->nIndex; //index in the tab page display + pActualBullets[i]->nIndex = aTypeMgr.pActualBullets[i]->nIndex; // index in the tab page display pActualBullets[i]->nIndexDefault = aTypeMgr.pActualBullets[i]->nIndexDefault; pActualBullets[i]->pBullets = new GrfBulDataRelation(eNBType::GRAPHICBULLETS) ; ((GrfBulDataRelation*)(pActualBullets[i]->pBullets))->sGrfName = ((GrfBulDataRelation*)(aTypeMgr.pActualBullets[i]->pBullets))->sGrfName; @@ -985,7 +988,7 @@ void MixBulletsTypeMgr::Init() ((BulletsSettings_Impl*)(pActualBullets[5]->pBullets))->eType = eNBType::BULLETS; } - GraphyicBulletsTypeMgr* mGrfTMgr = GraphyicBulletsTypeMgr::GetInstance(); + GraphicBulletsTypeMgr* mGrfTMgr = GraphicBulletsTypeMgr::GetInstance(); if ( mGrfTMgr ) { //Index 7 @@ -1060,7 +1063,7 @@ sal_uInt16 MixBulletsTypeMgr::GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 { GrfBulDataRelation* pEntry = (GrfBulDataRelation*) (pActualBullets[i]->pBullets); //sal_Bool bExist = sal_False; - if ( pEntry && pActualBullets[i]->nIndexDefault == (sal_uInt16)0xFFFF && pEntry->pGrfObj) + if ( pEntry && pActualBullets[i]->nIndexDefault == (sal_uInt16)0xFFFF && pEntry->pGrfObj) { if ( pEntry->pGrfObj->GetBitmap().IsEqual(pGrf->GetBitmap())) { @@ -1130,7 +1133,7 @@ sal_Bool MixBulletsTypeMgr::RelplaceNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,s GrfBulDataRelation* pEntry = (GrfBulDataRelation*) (pActualBullets[nIndex]->pBullets); if ( pGrfName ) pEntry->sGrfName = *pGrfName; - GraphyicBulletsTypeMgr* mGrfTMgr = GraphyicBulletsTypeMgr::GetInstance(); + GraphicBulletsTypeMgr* mGrfTMgr = GraphicBulletsTypeMgr::GetInstance(); if ( mGrfTMgr ) { //sal_uInt16 nDIndex = mGrfTMgr->GetNBOIndexForNumRule(aNum,mLevel); @@ -1140,7 +1143,7 @@ sal_Bool MixBulletsTypeMgr::RelplaceNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,s // sEmpty = mGrfTMgr->GetDescription( nDIndex -1); //}else { - pActualBullets[nIndex]->nIndexDefault = (sal_uInt16)0xFFFF; + pActualBullets[nIndex]->nIndexDefault = (sal_uInt16)0xFFFF; sEmpty = String(SVX_RESSTR( RID_SVXSTR_NUMBULLET_CUSTOM_BULLET_DESCRIPTION)); String aReplace = String::CreateFromAscii("%LIST_NUM"); String sNUM = String::CreateFromInt32( nIndex + 1 ); @@ -1184,7 +1187,7 @@ sal_Bool MixBulletsTypeMgr::RelplaceNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,s // ((BulletsSettings_Impl*)(pActualBullets[nIndex]->pBullets))->sDescription = pBTMgr->GetDescription(nDIndex - 1); //}else { - pActualBullets[nIndex]->nIndexDefault = (sal_uInt16)0xFFFF; + pActualBullets[nIndex]->nIndexDefault = (sal_uInt16)0xFFFF; String aStrFromRES = String(SVX_RESSTR( RID_SVXSTR_NUMBULLET_CUSTOM_BULLET_DESCRIPTION)); String aReplace = String::CreateFromAscii("%LIST_NUM"); String sNUM = String::CreateFromInt32( nIndex + 1 ); @@ -1214,7 +1217,7 @@ sal_Bool MixBulletsTypeMgr::RelplaceNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,s ((GrfBulDataRelation*)(pActualBullets[nIndex]->pBullets))->sGrfName = *pGrfName; ((GrfBulDataRelation*)(pActualBullets[nIndex]->pBullets))->bIsCustomized = sal_True; ((GrfBulDataRelation*)(pActualBullets[nIndex]->pBullets))->eType = eNBType::GRAPHICBULLETS; - GraphyicBulletsTypeMgr* mGrfTMgr = GraphyicBulletsTypeMgr::GetInstance(); + GraphicBulletsTypeMgr* mGrfTMgr = GraphicBulletsTypeMgr::GetInstance(); if ( mGrfTMgr ) { //sal_uInt16 nDIndex = mGrfTMgr->GetNBOIndexForNumRule(aNum,mLevel); @@ -1224,7 +1227,7 @@ sal_Bool MixBulletsTypeMgr::RelplaceNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,s // ((GrfBulDataRelation*)(pActualBullets[nIndex]->pBullets))->sDescription = mGrfTMgr->GetDescription(nDIndex - 1); //}else { - pActualBullets[nIndex]->nIndexDefault = (sal_uInt16)0xFFFF; + pActualBullets[nIndex]->nIndexDefault = (sal_uInt16)0xFFFF; String aStrFromRES = String(SVX_RESSTR( RID_SVXSTR_NUMBULLET_CUSTOM_BULLET_DESCRIPTION)); String aReplace = String::CreateFromAscii("%LIST_NUM"); String sNUM = String::CreateFromInt32( nIndex + 1 ); @@ -1292,12 +1295,12 @@ sal_Bool MixBulletsTypeMgr::ApplyNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_ String aEmptyStr; aFmt.SetPrefix( aEmptyStr ); aFmt.SetSuffix( aEmptyStr ); - if (isResetSize) aFmt.SetBulletRelSize(45); + if (isResetSize) aFmt.SetBulletRelSize(45); aNum.SetLevel(i, aFmt); } nMask <<= 1; } - }else if ( pCurrentBullets->eType == eNBType::GRAPHICBULLETS ) + }else if ( pCurrentBullets->eType == eNBType::GRAPHICBULLETS ) { String sGrfName; GrfBulDataRelation* pEntry = (GrfBulDataRelation*) (pCurrentBullets->pBullets); @@ -1320,8 +1323,8 @@ sal_Bool MixBulletsTypeMgr::ApplyNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_ if ( pCurrentBullets->nIndexDefault == (sal_uInt16)0xFFFF && pEntry->pGrfObj ) { Size aSize = pEntry->aSize; - sal_Int16 eOrient = text::VertOrientation::LINE_CENTER; - if (!isResetSize && aFmt.GetGraphicSize()!=Size(0,0)) aSize=aFmt.GetGraphicSize(); + sal_Int16 eOrient = text::VertOrientation::LINE_CENTER; + if (!isResetSize && aFmt.GetGraphicSize()!=Size(0,0)) aSize=aFmt.GetGraphicSize(); else { if (aSize.Width()==0 && aSize.Height()==0) { aSize = SvxNumberFormat::GetGraphicSizeMM100( pEntry->pGrfObj ); @@ -1337,7 +1340,7 @@ sal_Bool MixBulletsTypeMgr::ApplyNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_ { Size aSize = pEntry->aSize; sal_Int16 eOrient = text::VertOrientation::LINE_CENTER; - if (!isResetSize && aFmt.GetGraphicSize()!=Size(0,0)) aSize=aFmt.GetGraphicSize(); + if (!isResetSize && aFmt.GetGraphicSize()!=Size(0,0)) aSize=aFmt.GetGraphicSize(); else { if (aSize.Width()==0 && aSize.Height()==0) { aSize = SvxNumberFormat::GetGraphicSizeMM100(&aGraphic); @@ -1462,7 +1465,7 @@ void NumberingTypeMgr::Init() if(xDefNum.is()) { Sequence< Sequence< PropertyValue > > aNumberings; - LanguageType eLang = Application::GetSettings().GetLanguage(); + LanguageType eLang = Application::GetSettings().GetLanguage(); Locale aLocale = SvxCreateLocale(eLang); try { @@ -1512,7 +1515,7 @@ void NumberingTypeMgr::Init() aStrFromRES.SearchAndReplace(aReplace,sText); pNumEntry->sDescription = aStrFromRES; } - //End modification + // End modification //pNumEntry->sDescription = SVX_RESSTR( RID_SVXSTR_SINGLENUM_DESCRIPTION_0 + i ); pNumberSettingsArr->Insert(pNumEntry, pNumberSettingsArr->Count()); @@ -1538,8 +1541,8 @@ sal_uInt16 NumberingTypeMgr::GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 m String sPreFix = aFmt.GetPrefix(); String sSuffix = aFmt.GetSuffix(); String sEmpty; - sal_Int16 eNumType = aFmt.GetNumberingType(); - + sal_Int16 eNumType = aFmt.GetNumberingType(); + sal_uInt16 nCount = pNumberSettingsArr->Count(); for(sal_uInt16 i = nFromIndex; i < nCount; i++) { @@ -2010,13 +2013,13 @@ sal_Bool OutlineTypeMgr::ApplyNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_uIn aFmt.SetBulletChar(cChar); aFmt.SetCharFmtName( sBulletCharFmtName ); - if (isResetSize) aFmt.SetBulletRelSize(45); + if (isResetSize) aFmt.SetBulletRelSize(45); }else if ((aFmt.GetNumberingType()&(~LINK_TOKEN)) == SVX_NUM_BITMAP ) { if (pLevelSettings->pBrushItem) { const Graphic* pGrf = pLevelSettings->pBrushItem->GetGraphic();; Size aSize = pLevelSettings->aSize; sal_Int16 eOrient = text::VertOrientation::LINE_CENTER; - if (!isResetSize && aFmt.GetGraphicSize()!=Size(0,0)) aSize=aFmt.GetGraphicSize(); + if (!isResetSize && aFmt.GetGraphicSize()!=Size(0,0)) aSize=aFmt.GetGraphicSize(); else { if (aSize.Width()==0 && aSize.Height()==0 && pGrf) { aSize = SvxNumberFormat::GetGraphicSizeMM100( pGrf ); @@ -2030,7 +2033,7 @@ sal_Bool OutlineTypeMgr::ApplyNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_uIn aFmt.SetIncludeUpperLevels(sal::static_int_cast< sal_uInt8 >(0 != nUpperLevelOrChar ? aNum.GetLevelCount() : 0)); aFmt.SetCharFmtName(sBulletCharFmtName); if (isResetSize) aFmt.SetBulletRelSize(100); - } + } if(pNumSettingsArr->Count() > i) { aFmt.SetLabelFollowedBy(pLevelSettings->eLabelFollowedBy); aFmt.SetListtabPos(pLevelSettings->nTabValue); @@ -2087,3 +2090,5 @@ sal_Bool OutlineTypeMgr::IsCustomized(sal_uInt16 nIndex) }} + +/* vim: set noet sw=4 ts=4: */ diff --git a/main/svx/source/sidebar/nbdtmgfact.cxx b/main/svx/source/sidebar/nbdtmgfact.cxx index c332cae906..c8941c190b 100755 --- a/main/svx/source/sidebar/nbdtmgfact.cxx +++ b/main/svx/source/sidebar/nbdtmgfact.cxx @@ -16,9 +16,11 @@ * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. - * + * *************************************************************/ + + #ifndef _NBDTMGFACT_HXX #include <svx/nbdtmgfact.hxx> #endif @@ -35,7 +37,7 @@ NBOTypeMgrBase* NBOutlineTypeMgrFact::CreateInstance(const NBOType aType) return BulletsTypeMgr::GetInstance(); }else if ( aType == eNBOType::GRAPHICBULLETS ) { - return GraphyicBulletsTypeMgr::GetInstance(); + return GraphicBulletsTypeMgr::GetInstance(); }else if ( aType == eNBOType::MIXBULLETS ) { return MixBulletsTypeMgr::GetInstance(); @@ -51,3 +53,4 @@ NBOTypeMgrBase* NBOutlineTypeMgrFact::CreateInstance(const NBOType aType) } }} +/* vim: set noet sw=4 ts=4: */