include/svx/nbdtmg.hxx | 32 ++++----- include/xmloff/xmlimp.hxx | 3 sc/qa/unit/ucalc_sharedformula.cxx | 5 - shell/source/unix/misc/senddoc.sh | 10 ++- svx/source/sidebar/nbdtmg.cxx | 121 ++++--------------------------------- svx/source/sidebar/nbdtmgfact.cxx | 2 xmloff/source/core/xmlimp.cxx | 11 +-- 7 files changed, 48 insertions(+), 136 deletions(-)
New commits: commit 5f58670b43e5284d9460b561e774175c7a2dd7ab Author: Caolán McNamara <caol...@redhat.com> Date: Tue Sep 13 10:42:16 2016 +0100 add xdg-email as the default email route because xdg-email is apparently the only route that knows how to support adding an attachment to thunderbird Change-Id: Ife1b56ccfe2434eb31ad67bef00f55197e96151e diff --git a/shell/source/unix/misc/senddoc.sh b/shell/source/unix/misc/senddoc.sh index 169af25..4519e01 100755 --- a/shell/source/unix/misc/senddoc.sh +++ b/shell/source/unix/misc/senddoc.sh @@ -384,7 +384,9 @@ case `basename "$MAILER" | sed 's/-.*$//'` in # Try to be smart, and send the mail anyway, if we have the # possibility to do so. - if [ -n "$DESKTOP_LAUNCH" ]; then + if [ -x /usr/bin/xdg-email ] ; then + MAILER=/usr/bin/xdg-email + elif [ -n "$DESKTOP_LAUNCH" ]; then # http://lists.freedesktop.org/pipermail/xdg/2004-August/002873.html MAILER=${DESKTOP_LAUNCH} elif [ -n "$KDE_FULL_SESSION" -a -x /usr/bin/kde-open ] ; then @@ -423,7 +425,11 @@ case `basename "$MAILER" | sed 's/-.*$//'` in shift ;; --attach) - MAILTO="${MAILTO:-}${MAILTO:+&}attachment="`echo "file://$2" | "${URI_ENCODE}"` + if [ "$MAILER" = "/usr/bin/xdg-email" ]; then + MAILTO="${MAILTO:-}${MAILTO:+&}attach="`echo "file://$2" | "${URI_ENCODE}"` + else + MAILTO="${MAILTO:-}${MAILTO:+&}attachment="`echo "file://$2" | "${URI_ENCODE}"` + fi shift ;; *) commit 187e2dbd6ece29c27c851a71bb02b2b52bb8d13f Author: Caolán McNamara <caol...@redhat.com> Date: Tue Sep 13 10:00:52 2016 +0100 coverity#1372877 I'm guessing this is what might have been the intent warning is 'Constant' variable guards dead code Change-Id: I06e65f576180d7ff62417828c26f969982788b55 diff --git a/include/xmloff/xmlimp.hxx b/include/xmloff/xmlimp.hxx index 55b7169..ba63b84 100644 --- a/include/xmloff/xmlimp.hxx +++ b/include/xmloff/xmlimp.hxx @@ -200,8 +200,7 @@ class XMLOFF_DLLPUBLIC SvXMLImport : public ::cppu::WeakImplHelper8< const OUString getNamespacePrefixFromToken( sal_Int32 nToken ); void registerNamespaces(); void registerNSHelper(sal_Int32 nToken, sal_Int32 nPrefix, sal_Int32 nNamespace ); - void processNSAttributes( const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList, - SvXMLNamespaceMap *pRewindMap ); + SvXMLNamespaceMap* processNSAttributes(const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList); void Characters(const OUString& aChars); protected: diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx index 9ac8b59..87adeec 100644 --- a/xmloff/source/core/xmlimp.cxx +++ b/xmloff/source/core/xmlimp.cxx @@ -659,9 +659,9 @@ void SAL_CALL SvXMLImport::endDocument() } } -void SvXMLImport::processNSAttributes( const uno::Reference< xml::sax::XAttributeList >& xAttrList, - SvXMLNamespaceMap *pRewindMap ) +SvXMLNamespaceMap* SvXMLImport::processNSAttributes(const uno::Reference< xml::sax::XAttributeList >& xAttrList) { + SvXMLNamespaceMap *pRewindMap = nullptr; sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; for( sal_Int16 i=0; i < nAttrCount; i++ ) { @@ -709,17 +709,17 @@ void SvXMLImport::processNSAttributes( const uno::Reference< xml::sax::XAttribut } } + return pRewindMap; } void SAL_CALL SvXMLImport::startElement( const OUString& rName, const uno::Reference< xml::sax::XAttributeList >& xAttrList ) throw(xml::sax::SAXException, uno::RuntimeException, std::exception) { - SvXMLNamespaceMap *pRewindMap = nullptr; // SAL_INFO("svg", "startElement " << rName); // Process namespace attributes. This must happen before creating the // context, because namespace decaration apply to the element name itself. - processNSAttributes( xAttrList, pRewindMap ); + SvXMLNamespaceMap *pRewindMap = processNSAttributes(xAttrList); // Get element's namespace and local name. OUString aLocalName; @@ -873,8 +873,7 @@ void SAL_CALL SvXMLImport::startFastElement (sal_Int32 Element, { rtl::Reference < comphelper::AttributeList > rAttrList = new comphelper::AttributeList; maNamespaceHandler->addNSDeclAttributes( rAttrList ); - SvXMLNamespaceMap *pRewindMap = nullptr; - processNSAttributes( rAttrList.get(), pRewindMap ); + SvXMLNamespaceMap *pRewindMap = processNSAttributes(rAttrList.get()); SvXMLImportContext *pContext = dynamic_cast<SvXMLImportContext*>( xContext.get() ); if( pContext && pRewindMap ) pContext->PutRewindMap( pRewindMap ); commit 3a10baaf8faad1a615a53400a9a168144c6d6599 Author: Caolán McNamara <caol...@redhat.com> Date: Tue Sep 13 09:44:24 2016 +0100 coverity#1372442 Unchecked return value Change-Id: I2ff6c844e62ced35477f96a710a31cdd902f3505 diff --git a/sc/qa/unit/ucalc_sharedformula.cxx b/sc/qa/unit/ucalc_sharedformula.cxx index d319717..f75a7a1 100644 --- a/sc/qa/unit/ucalc_sharedformula.cxx +++ b/sc/qa/unit/ucalc_sharedformula.cxx @@ -1426,7 +1426,8 @@ void Test::testSharedFormulaMoveBlock() // Move A1:A3 to D1:D3. ScDocFunc& rFunc = getDocShell().GetDocFunc(); - rFunc.MoveBlock(ScRange(0,0,0,0,2,0), ScAddress(3,0,0), true, true, false, true); + bool bMoved = rFunc.MoveBlock(ScRange(0,0,0,0,2,0), ScAddress(3,0,0), true, true, false, true); + CPPUNIT_ASSERT(bMoved); // The result should stay the same. CPPUNIT_ASSERT_EQUAL(1.0, m_pDoc->GetValue(ScAddress(1,0,0))); @@ -1479,7 +1480,7 @@ void Test::testSharedFormulaMoveBlock() CPPUNIT_ASSERT_EQUAL(5.0, m_pDoc->GetValue(ScAddress(1,4,0))); // Move A1:A2 to D2:D3. - bool bMoved = rFunc.MoveBlock(ScRange(0,0,0,0,1,0), ScAddress(3,1,0), true, true, false, true); + bMoved = rFunc.MoveBlock(ScRange(0,0,0,0,1,0), ScAddress(3,1,0), true, true, false, true); CPPUNIT_ASSERT(bMoved); // Check the formula values again. They should not change. commit 780ac20278600e32fffd2d89a15fbeed86321179 Author: Caolán McNamara <caol...@redhat.com> Date: Tue Sep 13 09:38:59 2016 +0100 Graphyic->Graphic Change-Id: Id405e6a41d8c8ed56471ec058633a21ee4346737 diff --git a/include/svx/nbdtmg.hxx b/include/svx/nbdtmg.hxx index b098532..a2b44f2 100644 --- a/include/svx/nbdtmg.hxx +++ b/include/svx/nbdtmg.hxx @@ -245,18 +245,18 @@ class SVX_DLLPUBLIC BulletsTypeMgr: public NBOTypeMgrBase static BulletsTypeMgr& GetInstance(); }; -class SVX_DLLPUBLIC GraphyicBulletsTypeMgr: public NBOTypeMgrBase +class SVX_DLLPUBLIC GraphicBulletsTypeMgr: public NBOTypeMgrBase { friend class OutlineTypeMgr; friend class NumberingTypeMgr; private: - GraphyicBulletsTypeMgr(const GraphyicBulletsTypeMgr&) = delete; + GraphicBulletsTypeMgr(const GraphicBulletsTypeMgr&) = delete; public: typedef std::vector<GrfBulDataRelation*> ListType; ListType aGrfDataLst; public: - GraphyicBulletsTypeMgr(); - virtual ~GraphyicBulletsTypeMgr(); + GraphicBulletsTypeMgr(); + virtual ~GraphicBulletsTypeMgr(); virtual void Init() override; virtual sal_uInt16 GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 mLevel,sal_uInt16 nFromIndex=0) override; virtual void RelplaceNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt16 mLevel) override; @@ -264,7 +264,7 @@ class SVX_DLLPUBLIC GraphyicBulletsTypeMgr: public NBOTypeMgrBase virtual OUString GetDescription(sal_uInt16 nIndex,bool isDefault=false) override; virtual bool IsCustomized(sal_uInt16 nIndex) override; OUString GetGrfName(sal_uInt16 nIndex); - static GraphyicBulletsTypeMgr& GetInstance(); + static GraphicBulletsTypeMgr& GetInstance(); }; class SVX_DLLPUBLIC MixBulletsTypeMgr: public NBOTypeMgrBase diff --git a/svx/source/sidebar/nbdtmg.cxx b/svx/source/sidebar/nbdtmg.cxx index bae4499..f0be420 100644 --- a/svx/source/sidebar/nbdtmg.cxx +++ b/svx/source/sidebar/nbdtmg.cxx @@ -494,26 +494,26 @@ vcl::Font BulletsTypeMgr::GetBulCharFont(sal_uInt16 nIndex) return aRet; } // Graphic Bullet Type lib -GraphyicBulletsTypeMgr::GraphyicBulletsTypeMgr() +GraphicBulletsTypeMgr::GraphicBulletsTypeMgr() : NBOTypeMgrBase(eNBOType::BULLETS) { Init(); } -GraphyicBulletsTypeMgr::~GraphyicBulletsTypeMgr() +GraphicBulletsTypeMgr::~GraphicBulletsTypeMgr() { for (const GrfBulDataRelation* p : aGrfDataLst) delete p; } -class theGraphyicBulletsTypeMgr : public rtl::Static<GraphyicBulletsTypeMgr, theGraphyicBulletsTypeMgr> {}; +class theGraphicBulletsTypeMgr : public rtl::Static<GraphicBulletsTypeMgr, theGraphicBulletsTypeMgr> {}; -GraphyicBulletsTypeMgr& GraphyicBulletsTypeMgr::GetInstance() +GraphicBulletsTypeMgr& GraphicBulletsTypeMgr::GetInstance() { - return theGraphyicBulletsTypeMgr::get(); + return theGraphicBulletsTypeMgr::get(); } -void GraphyicBulletsTypeMgr::Init() +void GraphicBulletsTypeMgr::Init() { std::vector<OUString> aGrfNames; GalleryExplorer::FillObjList(GALLERY_THEME_BULLETS, aGrfNames); @@ -540,7 +540,7 @@ void GraphyicBulletsTypeMgr::Init() aGrfDataLst.push_back(pEntry); } } -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; @@ -576,7 +576,7 @@ sal_uInt16 GraphyicBulletsTypeMgr::GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uI return (sal_uInt16)0xFFFF; } -void GraphyicBulletsTypeMgr::RelplaceNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt16 mLevel) +void GraphicBulletsTypeMgr::RelplaceNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt16 mLevel) { if ( mLevel == (sal_uInt16)0xFFFF || mLevel > aNum.GetLevelCount() || mLevel == 0) return; @@ -616,7 +616,7 @@ void GraphyicBulletsTypeMgr::RelplaceNumRule(SvxNumRule& aNum, sal_uInt16 nIndex } } -void GraphyicBulletsTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt16 mLevel, bool /*isDefault*/, bool /*isResetSize*/) +void GraphicBulletsTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt16 mLevel, bool /*isDefault*/, bool /*isResetSize*/) { //if ( mLevel == (sal_uInt16)0xFFFF ) // return sal_False; @@ -659,7 +659,7 @@ void GraphyicBulletsTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, s } } -OUString GraphyicBulletsTypeMgr::GetDescription(sal_uInt16 nIndex, bool /*isDefault*/) +OUString GraphicBulletsTypeMgr::GetDescription(sal_uInt16 nIndex, bool /*isDefault*/) { OUString sRet; sal_uInt16 nLength = 0; @@ -678,7 +678,7 @@ OUString GraphyicBulletsTypeMgr::GetDescription(sal_uInt16 nIndex, bool /*isDefa return sRet; } -bool GraphyicBulletsTypeMgr::IsCustomized(sal_uInt16 nIndex) +bool GraphicBulletsTypeMgr::IsCustomized(sal_uInt16 nIndex) { bool bRet = false; @@ -698,7 +698,7 @@ bool GraphyicBulletsTypeMgr::IsCustomized(sal_uInt16 nIndex) return bRet; } -OUString GraphyicBulletsTypeMgr::GetGrfName(sal_uInt16 nIndex) +OUString GraphicBulletsTypeMgr::GetGrfName(sal_uInt16 nIndex) { OUString sRet; if ( nIndex < aGrfDataLst.size() ) @@ -813,7 +813,7 @@ void MixBulletsTypeMgr::Init() static_cast<BulletsSettings_Impl*>(pActualBullets[5]->pBullets)->eType = eNBType::BULLETS; } - GraphyicBulletsTypeMgr& rGrfTMgr = GraphyicBulletsTypeMgr::GetInstance(); + GraphicBulletsTypeMgr& rGrfTMgr = GraphicBulletsTypeMgr::GetInstance(); { //Index 7 pActualBullets[6] = new MixBulletsSettings_Impl(eNBType::GRAPHICBULLETS); @@ -952,7 +952,7 @@ void MixBulletsTypeMgr::RelplaceNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_u GrfBulDataRelation* pEntry = static_cast<GrfBulDataRelation*>(pActualBullets[nIndex]->pBullets); if ( !aGrfName.isEmpty() ) pEntry->sGrfName = aGrfName; - GraphyicBulletsTypeMgr& rGrfTMgr = GraphyicBulletsTypeMgr::GetInstance(); + GraphicBulletsTypeMgr& rGrfTMgr = GraphicBulletsTypeMgr::GetInstance(); { pActualBullets[nIndex]->nIndexDefault = (sal_uInt16)0xFFFF; sEmpty = SVX_RESSTR( RID_SVXSTR_NUMBULLET_CUSTOM_BULLET_DESCRIPTION); @@ -1012,7 +1012,7 @@ void MixBulletsTypeMgr::RelplaceNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_u static_cast<GrfBulDataRelation*>(pActualBullets[nIndex]->pBullets)->sGrfName = aGrfName; static_cast<GrfBulDataRelation*>(pActualBullets[nIndex]->pBullets)->bIsCustomized = true; static_cast<GrfBulDataRelation*>(pActualBullets[nIndex]->pBullets)->eType = eNBType::GRAPHICBULLETS; - GraphyicBulletsTypeMgr& rGrfTMgr = GraphyicBulletsTypeMgr::GetInstance(); + GraphicBulletsTypeMgr& rGrfTMgr = GraphicBulletsTypeMgr::GetInstance(); { pActualBullets[nIndex]->nIndexDefault = (sal_uInt16)0xFFFF; OUString aStrFromRES = SVX_RESSTR( RID_SVXSTR_NUMBULLET_CUSTOM_BULLET_DESCRIPTION); diff --git a/svx/source/sidebar/nbdtmgfact.cxx b/svx/source/sidebar/nbdtmgfact.cxx index 06a6995..ba57105 100644 --- a/svx/source/sidebar/nbdtmgfact.cxx +++ b/svx/source/sidebar/nbdtmgfact.cxx @@ -30,7 +30,7 @@ NBOTypeMgrBase* CreateInstance(const NBOType aType) } else if ( aType == eNBOType::GRAPHICBULLETS ) { - return &GraphyicBulletsTypeMgr::GetInstance(); + return &GraphicBulletsTypeMgr::GetInstance(); } else if ( aType == eNBOType::MIXBULLETS ) { commit 441f0434714a98b64b7956ce6cf44723eadc0883 Author: Caolán McNamara <caol...@redhat.com> Date: Tue Sep 13 09:37:46 2016 +0100 coverity#1371335 Self assignment these copy ctors are seriously confused Change-Id: I07b2d8cc16ba983cd74782207260b3057f8e7d7d diff --git a/include/svx/nbdtmg.hxx b/include/svx/nbdtmg.hxx index 7667332..b098532 100644 --- a/include/svx/nbdtmg.hxx +++ b/include/svx/nbdtmg.hxx @@ -190,6 +190,7 @@ class SVX_DLLPUBLIC NBOTypeMgrBase OUString aNumCharFmtName; void StoreBulCharFmtName_impl(); void StoreMapUnit_impl(); + NBOTypeMgrBase(const NBOTypeMgrBase&) = delete; public: NBOTypeMgrBase(const NBOType aType) @@ -199,14 +200,6 @@ class SVX_DLLPUBLIC NBOTypeMgrBase , aNumCharFmtName(OUString()) , bIsLoading(false) {} - NBOTypeMgrBase(const NBOTypeMgrBase& aTypeMgr) - { - eType = aTypeMgr.eType; - pSet = aTypeMgr.pSet; - eCoreUnit = aTypeMgr.eCoreUnit; - aNumCharFmtName = aTypeMgr.aNumCharFmtName; - bIsLoading = false; - } virtual ~NBOTypeMgrBase() {} virtual void Init()=0; virtual sal_uInt16 GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 mLevel,sal_uInt16 nFromIndex=0) = 0; @@ -232,13 +225,14 @@ class SVX_DLLPUBLIC BulletsTypeMgr: public NBOTypeMgrBase { friend class OutlineTypeMgr; friend class NumberingTypeMgr; + private: + BulletsTypeMgr(const BulletsTypeMgr&) = delete; public: static sal_Unicode aDynamicBulletTypes[DEFAULT_BULLET_TYPES]; static sal_Unicode aDynamicRTLBulletTypes[DEFAULT_BULLET_TYPES]; static BulletsSettings_Impl* pActualBullets[DEFAULT_BULLET_TYPES]; public: BulletsTypeMgr(); - BulletsTypeMgr(const BulletsTypeMgr& aTypeMgr); virtual ~BulletsTypeMgr() {} virtual void Init() override; virtual sal_uInt16 GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 mLevel,sal_uInt16 nFromIndex=0) override; @@ -255,12 +249,13 @@ class SVX_DLLPUBLIC GraphyicBulletsTypeMgr: public NBOTypeMgrBase { friend class OutlineTypeMgr; friend class NumberingTypeMgr; + private: + GraphyicBulletsTypeMgr(const GraphyicBulletsTypeMgr&) = delete; public: typedef std::vector<GrfBulDataRelation*> ListType; ListType aGrfDataLst; public: GraphyicBulletsTypeMgr(); - GraphyicBulletsTypeMgr(const GraphyicBulletsTypeMgr& aTypeMgr); virtual ~GraphyicBulletsTypeMgr(); virtual void Init() override; virtual sal_uInt16 GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 mLevel,sal_uInt16 nFromIndex=0) override; @@ -276,12 +271,13 @@ class SVX_DLLPUBLIC MixBulletsTypeMgr: public NBOTypeMgrBase { friend class OutlineTypeMgr; friend class NumberingTypeMgr; + private: + MixBulletsTypeMgr(const MixBulletsTypeMgr&) = delete; public: static MixBulletsSettings_Impl* pActualBullets[DEFAULT_BULLET_TYPES]; static MixBulletsSettings_Impl* pDefaultActualBullets[DEFAULT_BULLET_TYPES]; public: MixBulletsTypeMgr(); - MixBulletsTypeMgr(const MixBulletsTypeMgr& aTypeMgr); virtual ~MixBulletsTypeMgr() {} virtual void Init() override; virtual sal_uInt16 GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 mLevel,sal_uInt16 nFromIndex=0) override; @@ -294,12 +290,13 @@ class SVX_DLLPUBLIC MixBulletsTypeMgr: public NBOTypeMgrBase class SVX_DLLPUBLIC NumberingTypeMgr: public NBOTypeMgrBase { + private: + NumberingTypeMgr(const NumberingTypeMgr&) = delete; public: NumberSettingsArr_Impl* pNumberSettingsArr; NumberSettingsArr_Impl* pDefaultNumberSettingsArr; public: NumberingTypeMgr(); - NumberingTypeMgr(const NumberingTypeMgr& aTypeMgr); virtual ~NumberingTypeMgr(); virtual void Init() override; virtual sal_uInt16 GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 mLevel,sal_uInt16 nFromIndex=0) override; @@ -312,12 +309,13 @@ class SVX_DLLPUBLIC NumberingTypeMgr: public NBOTypeMgrBase class SVX_DLLPUBLIC OutlineTypeMgr: public NBOTypeMgrBase { + private: + OutlineTypeMgr(const OutlineTypeMgr&) = delete; public: OutlineSettings_Impl* pOutlineSettingsArrs[DEFAULT_NUM_VALUSET_COUNT]; OutlineSettings_Impl* pDefaultOutlineSettingsArrs[DEFAULT_NUM_VALUSET_COUNT]; public: OutlineTypeMgr(); - OutlineTypeMgr(const OutlineTypeMgr& aTypeMgr); virtual ~OutlineTypeMgr() {} virtual void Init() override; virtual sal_uInt16 GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 mLevel,sal_uInt16 nFromIndex=0) override; diff --git a/svx/source/sidebar/nbdtmg.cxx b/svx/source/sidebar/nbdtmg.cxx index 217febe..bae4499 100644 --- a/svx/source/sidebar/nbdtmg.cxx +++ b/svx/source/sidebar/nbdtmg.cxx @@ -250,21 +250,6 @@ BulletsTypeMgr::BulletsTypeMgr() Init(); } -BulletsTypeMgr::BulletsTypeMgr(const BulletsTypeMgr& aTypeMgr): - NBOTypeMgrBase(aTypeMgr) -{ - for (sal_uInt16 i=0; i < DEFAULT_BULLET_TYPES; ++i) - { - const BulletsSettings_Impl* pSrcBullet = BulletsTypeMgr::pActualBullets[i]; - BulletsSettings_Impl* pTargetBullet = pActualBullets[i]; - pTargetBullet->bIsCustomized = pSrcBullet->bIsCustomized; - pTargetBullet->cBulletChar = pSrcBullet->cBulletChar; - pTargetBullet->aFont = pSrcBullet->aFont; - pTargetBullet->sDescription = pSrcBullet->sDescription; - pTargetBullet->eType = pSrcBullet->eType; - } -} - class theBulletsTypeMgr : public rtl::Static<BulletsTypeMgr, theBulletsTypeMgr> {}; BulletsTypeMgr& BulletsTypeMgr::GetInstance() @@ -515,26 +500,6 @@ GraphyicBulletsTypeMgr::GraphyicBulletsTypeMgr() Init(); } -GraphyicBulletsTypeMgr::GraphyicBulletsTypeMgr(const GraphyicBulletsTypeMgr& aTypeMgr): - NBOTypeMgrBase(aTypeMgr) -{ - for (const GrfBulDataRelation* pSrcEntry : aTypeMgr.aGrfDataLst) - { - GrfBulDataRelation* pEntry = new GrfBulDataRelation(eNBType::GRAPHICBULLETS); - if (pSrcEntry) - { - pEntry->bIsCustomized = pSrcEntry->bIsCustomized; - pEntry->nTabIndex = pSrcEntry->nTabIndex; - pEntry->nGallaryIndex = pSrcEntry->nGallaryIndex; - pEntry->sGrfName = pSrcEntry->sGrfName; - pEntry->sDescription = pSrcEntry->sDescription; - aGrfDataLst.push_back(pEntry); - } - else - delete pEntry; - } -} - GraphyicBulletsTypeMgr::~GraphyicBulletsTypeMgr() { for (const GrfBulDataRelation* p : aGrfDataLst) @@ -771,41 +736,6 @@ MixBulletsTypeMgr& MixBulletsTypeMgr::GetInstance() return theMixBulletsTypeMgr::get(); } -MixBulletsTypeMgr::MixBulletsTypeMgr(const MixBulletsTypeMgr& aTypeMgr): - NBOTypeMgrBase(aTypeMgr) -{ - for (sal_uInt16 i=0;i<DEFAULT_BULLET_TYPES;i++) - { - if ( MixBulletsTypeMgr::pActualBullets[i]->eType == eNBType::BULLETS ) - { - pActualBullets[i]->eType = MixBulletsTypeMgr::pActualBullets[i]->eType; - pActualBullets[i]->nIndex = MixBulletsTypeMgr::pActualBullets[i]->nIndex; //index in the tab page display - pActualBullets[i]->nIndexDefault = MixBulletsTypeMgr::pActualBullets[i]->nIndexDefault; - pActualBullets[i]->pBullets = new BulletsSettings_Impl(eNBType::BULLETS) ; - static_cast<BulletsSettings_Impl*>(pActualBullets[i]->pBullets)->cBulletChar = static_cast<BulletsSettings_Impl*>(MixBulletsTypeMgr::pActualBullets[i]->pBullets)->cBulletChar; - static_cast<BulletsSettings_Impl*>(pActualBullets[i]->pBullets)->aFont = static_cast<BulletsSettings_Impl*>(MixBulletsTypeMgr::pActualBullets[i]->pBullets)->aFont; - static_cast<BulletsSettings_Impl*>(pActualBullets[i]->pBullets)->sDescription = static_cast<BulletsSettings_Impl*>(MixBulletsTypeMgr::pActualBullets[i]->pBullets)->sDescription; - static_cast<BulletsSettings_Impl*>(pActualBullets[i]->pBullets)->bIsCustomized = static_cast<BulletsSettings_Impl*>(MixBulletsTypeMgr::pActualBullets[i]->pBullets)->bIsCustomized; - static_cast<BulletsSettings_Impl*>(pActualBullets[i]->pBullets)->eType = static_cast<BulletsSettings_Impl*>(MixBulletsTypeMgr::pActualBullets[i]->pBullets)->eType; - } - else if ( MixBulletsTypeMgr::pActualBullets[i]->eType == eNBType::GRAPHICBULLETS ) - { - pActualBullets[i]->eType = MixBulletsTypeMgr::pActualBullets[i]->eType; - pActualBullets[i]->nIndex = MixBulletsTypeMgr::pActualBullets[i]->nIndex; //index in the tab page display - pActualBullets[i]->nIndexDefault = MixBulletsTypeMgr::pActualBullets[i]->nIndexDefault; - pActualBullets[i]->pBullets = new GrfBulDataRelation(eNBType::GRAPHICBULLETS) ; - static_cast<GrfBulDataRelation*>(pActualBullets[i]->pBullets)->sGrfName = static_cast<GrfBulDataRelation*>(MixBulletsTypeMgr::pActualBullets[i]->pBullets)->sGrfName; - static_cast<GrfBulDataRelation*>(pActualBullets[i]->pBullets)->sDescription = static_cast<GrfBulDataRelation*>(MixBulletsTypeMgr::pActualBullets[i]->pBullets)->sDescription; - static_cast<GrfBulDataRelation*>(pActualBullets[i]->pBullets)->bIsCustomized = static_cast<GrfBulDataRelation*>(MixBulletsTypeMgr::pActualBullets[i]->pBullets)->bIsCustomized; - static_cast<GrfBulDataRelation*>(pActualBullets[i]->pBullets)->eType = static_cast<GrfBulDataRelation*>(MixBulletsTypeMgr::pActualBullets[i]->pBullets)->eType; - if ( static_cast<GrfBulDataRelation*>(MixBulletsTypeMgr::pActualBullets[i]->pBullets)->bIsCustomized && static_cast<GrfBulDataRelation*>(MixBulletsTypeMgr::pActualBullets[i]->pBullets)->pGrfObj != nullptr) - { - static_cast<GrfBulDataRelation*>(pActualBullets[i]->pBullets)->pGrfObj = static_cast<GrfBulDataRelation*>(MixBulletsTypeMgr::pActualBullets[i]->pBullets)->pGrfObj; - } - } - } - ImplLoad("standard.sya"); -} void MixBulletsTypeMgr::Init() { BulletsTypeMgr &rBTMgr = BulletsTypeMgr::GetInstance(); @@ -1251,14 +1181,6 @@ NumberingTypeMgr::NumberingTypeMgr() ImplLoad("standard.syb"); } -NumberingTypeMgr::NumberingTypeMgr(const NumberingTypeMgr& rTypeMgr) - : NBOTypeMgrBase(rTypeMgr) - , pNumberSettingsArr (new NumberSettingsArr_Impl) - , pDefaultNumberSettingsArr(nullptr) -{ - ImplLoad("standard.syb"); -} - NumberingTypeMgr::~NumberingTypeMgr() { delete pNumberSettingsArr; @@ -1447,19 +1369,6 @@ OutlineTypeMgr::OutlineTypeMgr() ImplLoad("standard.syc"); } -OutlineTypeMgr::OutlineTypeMgr(const OutlineTypeMgr& aTypeMgr) - : NBOTypeMgrBase(aTypeMgr) -{ - Init(); - for(sal_Int32 nItem = 0; nItem < DEFAULT_NUM_VALUSET_COUNT; nItem++ ) - { - pDefaultOutlineSettingsArrs[nItem] = pOutlineSettingsArrs[nItem]; - } - //Initial the first time to store the default value. Then do it again for customized value - Init(); - ImplLoad("standard.syc"); -} - class theOutlineTypeMgr : public rtl::Static<OutlineTypeMgr, theOutlineTypeMgr> {}; OutlineTypeMgr& OutlineTypeMgr::GetInstance()
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits