include/rsc/rscsfx.hxx | 8 -- rsc/inc/rscclass.hxx | 4 - rsc/inc/rscdb.hxx | 2 rsc/inc/rsctop.hxx | 5 - rsc/source/parser/rscicpx.cxx | 20 ------- rsc/source/parser/rscinit.cxx | 4 - rsc/source/res/rscclass.cxx | 10 --- rsc/source/res/rsctop.cxx | 11 --- sc/inc/markdata.hxx | 2 sc/source/core/data/markdata.cxx | 5 + sc/source/ui/docshell/docfunc.cxx | 54 ++++++++++++++++--- sc/source/ui/inc/docfunc.hxx | 5 + sc/source/ui/inc/undoblk.hxx | 9 ++- sc/source/ui/undo/undoblk.cxx | 105 +++++++++++++++++++++++--------------- sc/source/ui/unoobj/cellsuno.cxx | 2 sc/source/ui/view/viewfun2.cxx | 2 sc/source/ui/view/viewfun3.cxx | 4 - 17 files changed, 130 insertions(+), 122 deletions(-)
New commits: commit 647e860435c781fbb111ae59bc70dc8e6776fed5 Author: Eike Rathke <er...@redhat.com> Date: Wed Oct 26 14:50:43 2016 +0200 Resolves: tdf#92117 create only one Undo for all UnmergeCells() calls ... during DeleteCells() and InsertCells(), instead of one Undo per UnmergeCells() call. And actually create Undo only if bRecord requested. Change-Id: I4f1747c3f42f36e16be81f989f0af5d048ba9d9f diff --git a/sc/inc/markdata.hxx b/sc/inc/markdata.hxx index 0392971..60c04d0 100644 --- a/sc/inc/markdata.hxx +++ b/sc/inc/markdata.hxx @@ -143,10 +143,12 @@ public: // iterators for table access typedef std::set<SCTAB>::iterator iterator; typedef std::set<SCTAB>::const_iterator const_iterator; + typedef std::set<SCTAB>::const_reverse_iterator const_reverse_iterator; iterator begin(); iterator end(); const_iterator begin() const; const_iterator end() const; + const_reverse_iterator rbegin() const; }; #endif diff --git a/sc/source/core/data/markdata.cxx b/sc/source/core/data/markdata.cxx index 39a5728..70ec2c1 100644 --- a/sc/source/core/data/markdata.cxx +++ b/sc/source/core/data/markdata.cxx @@ -814,4 +814,9 @@ ScMarkData::const_iterator ScMarkData::end() const return maTabMarked.end(); } +ScMarkData::const_reverse_iterator ScMarkData::rbegin() const +{ + return maTabMarked.rbegin(); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx index ce381de..77c029f 100644 --- a/sc/source/ui/docshell/docfunc.cxx +++ b/sc/source/ui/docshell/docfunc.cxx @@ -1795,6 +1795,7 @@ bool ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark, nViewShellId = pViewSh->GetViewShellId(); rDocShell.GetUndoManager()->EnterListAction( aUndo, aUndo, 0, nViewShellId ); } + std::unique_ptr<ScUndoRemoveMerge> pUndoRemoveMerge; itr = aMark.begin(); for (; itr != itrEnd && nTabCount; ++itr) @@ -1902,12 +1903,19 @@ bool ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark, if( !qIncreaseRange.empty() ) { + if (bRecord && !pUndoRemoveMerge) + { + ScDocument* pUndoDoc = new ScDocument( SCDOCMODE_UNDO ); + pUndoDoc->InitUndo( &rDoc, *aMark.begin(), *aMark.rbegin()); + pUndoRemoveMerge.reset( new ScUndoRemoveMerge( &rDocShell, pUndoDoc )); + } + for( ::std::vector<ScRange>::const_iterator iIter( qIncreaseRange.begin()); iIter != qIncreaseRange.end(); ++iIter ) { ScRange aRange( *iIter ); if( rDoc.HasAttrib( aRange, HasAttrFlags::Overlapped | HasAttrFlags::Merged ) ) { - UnmergeCells( aRange, true ); + UnmergeCells( aRange, bRecord, pUndoRemoveMerge.get() ); } } } @@ -1923,6 +1931,11 @@ bool ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark, } } + if (bRecord && pUndoRemoveMerge) + { + rDocShell.GetUndoManager()->AddUndoAction( pUndoRemoveMerge.release()); + } + switch (eCmd) { case INS_CELLSDOWN: @@ -2228,6 +2241,7 @@ bool ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark, nViewShellId = pViewSh->GetViewShellId(); rDocShell.GetUndoManager()->EnterListAction( aUndo, aUndo, 0, nViewShellId ); } + std::unique_ptr<ScUndoRemoveMerge> pUndoRemoveMerge; itr = aMark.begin(); for (; itr != itrEnd && *itr < nTabCount; ++itr) @@ -2337,12 +2351,19 @@ bool ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark, if( !qDecreaseRange.empty() ) { + if (bRecord && !pUndoRemoveMerge) + { + ScDocument* pUndoDoc = new ScDocument( SCDOCMODE_UNDO ); + pUndoDoc->InitUndo( &rDoc, *aMark.begin(), *aMark.rbegin()); + pUndoRemoveMerge.reset( new ScUndoRemoveMerge( &rDocShell, pUndoDoc )); + } + for( ::std::vector<ScRange>::const_iterator iIter( qDecreaseRange.begin()); iIter != qDecreaseRange.end(); ++iIter ) { ScRange aRange( *iIter ); if( rDoc.HasAttrib( aRange, HasAttrFlags::Overlapped | HasAttrFlags::Merged ) ) { - UnmergeCells( aRange, true ); + UnmergeCells( aRange, bRecord, pUndoRemoveMerge.get() ); } } } @@ -2357,6 +2378,11 @@ bool ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark, } } + if (bRecord && pUndoRemoveMerge) + { + rDocShell.GetUndoManager()->AddUndoAction( pUndoRemoveMerge.release()); + } + // ausfuehren WaitObject aWait( ScDocShell::GetActiveDialogParent() ); // wichtig wegen TrackFormulas bei UpdateReference @@ -2804,7 +2830,7 @@ bool ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos, // skipped rows and merged cells don't mix if ( !bIncludeFiltered && pClipDoc->HasClipFilteredRows() ) - UnmergeCells( aPasteDest, false ); + UnmergeCells( aPasteDest, false, nullptr ); bool bDestHeight = AdjustRowHeight( ScRange( 0,nDestRow,nDestTab, MAXCOL,nDestEndRow,nDestEndTab ), @@ -4792,17 +4818,17 @@ bool ScDocFunc::MergeCells( const ScCellMergeOption& rOption, bool bContents, bo return true; } -bool ScDocFunc::UnmergeCells( const ScRange& rRange, bool bRecord ) +bool ScDocFunc::UnmergeCells( const ScRange& rRange, bool bRecord, ScUndoRemoveMerge* pUndoRemoveMerge ) { ScCellMergeOption aOption(rRange.aStart.Col(), rRange.aStart.Row(), rRange.aEnd.Col(), rRange.aEnd.Row()); SCTAB nTab1 = rRange.aStart.Tab(), nTab2 = rRange.aEnd.Tab(); for (SCTAB i = nTab1; i <= nTab2; ++i) aOption.maTabs.insert(i); - return UnmergeCells(aOption, bRecord); + return UnmergeCells(aOption, bRecord, pUndoRemoveMerge); } -bool ScDocFunc::UnmergeCells( const ScCellMergeOption& rOption, bool bRecord ) +bool ScDocFunc::UnmergeCells( const ScCellMergeOption& rOption, bool bRecord, ScUndoRemoveMerge* pUndoRemoveMerge ) { using ::std::set; @@ -4816,7 +4842,8 @@ bool ScDocFunc::UnmergeCells( const ScCellMergeOption& rOption, bool bRecord ) if (bRecord && !rDoc.IsUndoEnabled()) bRecord = false; - ScDocument* pUndoDoc = nullptr; + ScDocument* pUndoDoc = (pUndoRemoveMerge ? pUndoRemoveMerge->GetUndoDoc() : nullptr); + assert( pUndoDoc || !pUndoRemoveMerge ); for (set<SCTAB>::const_iterator itr = rOption.maTabs.begin(), itrEnd = rOption.maTabs.end(); itr != itrEnd; ++itr) { @@ -4859,8 +4886,17 @@ bool ScDocFunc::UnmergeCells( const ScCellMergeOption& rOption, bool bRecord ) if (bRecord) { - rDocShell.GetUndoManager()->AddUndoAction( - new ScUndoRemoveMerge( &rDocShell, rOption, pUndoDoc ) ); + if (pUndoRemoveMerge) + { + // If pUndoRemoveMerge was passed, the caller is responsible for + // adding it to Undo. Just add the current option. + pUndoRemoveMerge->AddCellMergeOption( rOption); + } + else + { + rDocShell.GetUndoManager()->AddUndoAction( + new ScUndoRemoveMerge( &rDocShell, rOption, pUndoDoc ) ); + } } aModificator.SetDocumentModified(); diff --git a/sc/source/ui/inc/docfunc.hxx b/sc/source/ui/inc/docfunc.hxx index f54893e..e6757a7 100644 --- a/sc/source/ui/inc/docfunc.hxx +++ b/sc/source/ui/inc/docfunc.hxx @@ -45,6 +45,7 @@ class ScTableProtection; struct ScCellMergeOption; class ScConditionalFormat; class ScConditionalFormatList; +class ScUndoRemoveMerge; namespace sc { @@ -189,8 +190,8 @@ public: bool MergeCells( const ScCellMergeOption& rOption, bool bContents, bool bRecord, bool bApi, bool bEmptyMergedCells = false ); - bool UnmergeCells( const ScRange& rRange, bool bRecord ); - bool UnmergeCells( const ScCellMergeOption& rOption, bool bRecord ); + bool UnmergeCells( const ScRange& rRange, bool bRecord, ScUndoRemoveMerge* pUndoRemoveMerge ); + bool UnmergeCells( const ScCellMergeOption& rOption, bool bRecord, ScUndoRemoveMerge* pUndoRemoveMerge ); void SetNewRangeNames( ScRangeName* pNewRanges, bool bModifyDoc, SCTAB nTab = -1 ); // takes ownership of pNewRanges //nTab = -1 for local range names void ModifyRangeNames( const ScRangeName& rNewRanges, SCTAB nTab = -1 ); diff --git a/sc/source/ui/inc/undoblk.hxx b/sc/source/ui/inc/undoblk.hxx index 9e09292..01af186 100644 --- a/sc/source/ui/inc/undoblk.hxx +++ b/sc/source/ui/inc/undoblk.hxx @@ -901,6 +901,8 @@ public: ScUndoRemoveMerge( ScDocShell* pNewDocShell, const ScCellMergeOption& rOption, ScDocument* pNewUndoDoc ); + ScUndoRemoveMerge( ScDocShell* pNewDocShell, + ScDocument* pNewUndoDoc ); virtual ~ScUndoRemoveMerge() override; virtual void Undo() override; @@ -910,11 +912,14 @@ public: virtual OUString GetComment() const override; + ScDocument* GetUndoDoc(); + void AddCellMergeOption( const ScCellMergeOption& rOption ); + private: void SetCurTab(); - ScCellMergeOption maOption; - ScDocument* pUndoDoc; + std::vector<ScCellMergeOption> maOptions; + ScDocument* pUndoDoc; }; class ScUndoBorder: public ScBlockUndo diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx index fab2d03..ba29368 100644 --- a/sc/source/ui/undo/undoblk.cxx +++ b/sc/source/ui/undo/undoblk.cxx @@ -1398,7 +1398,7 @@ void ScUndoDragDrop::Redo() // skipped rows and merged cells don't mix if ( !bIncludeFiltered && pClipDoc->HasClipFilteredRows() ) - pDocShell->GetDocFunc().UnmergeCells( aDestRange, false ); + pDocShell->GetDocFunc().UnmergeCells( aDestRange, false, nullptr ); for (nTab=aDestRange.aStart.Tab(); nTab<=aDestRange.aEnd.Tab(); nTab++) { @@ -2108,7 +2108,14 @@ bool ScUndoRemoveBreaks::CanRepeat(SfxRepeatTarget& rTarget) const ScUndoRemoveMerge::ScUndoRemoveMerge( ScDocShell* pNewDocShell, const ScCellMergeOption& rOption, ScDocument* pNewUndoDoc ) : ScBlockUndo( pNewDocShell, rOption.getFirstSingleRange(), SC_UNDO_SIMPLE ), - maOption(rOption), + pUndoDoc( pNewUndoDoc ) +{ + maOptions.push_back( rOption); +} + +ScUndoRemoveMerge::ScUndoRemoveMerge( ScDocShell* pNewDocShell, + ScDocument* pNewUndoDoc ) : + ScBlockUndo( pNewDocShell, ScRange(), SC_UNDO_SIMPLE ), pUndoDoc( pNewUndoDoc ) { } @@ -2123,6 +2130,16 @@ OUString ScUndoRemoveMerge::GetComment() const return ScGlobal::GetRscString( STR_UNDO_REMERGE ); // "remove merge" } +ScDocument* ScUndoRemoveMerge::GetUndoDoc() +{ + return pUndoDoc; +} + +void ScUndoRemoveMerge::AddCellMergeOption( const ScCellMergeOption& rOption ) +{ + maOptions.push_back( rOption); +} + void ScUndoRemoveMerge::Undo() { using ::std::set; @@ -2133,25 +2150,28 @@ void ScUndoRemoveMerge::Undo() ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell(); ScDocument& rDoc = pDocShell->GetDocument(); - for (set<SCTAB>::const_iterator itr = maOption.maTabs.begin(), itrEnd = maOption.maTabs.end(); - itr != itrEnd; ++itr) + for (const auto & rOption : maOptions) { - OSL_ENSURE(pUndoDoc, "NULL pUndoDoc!"); - if (!pUndoDoc) - continue; - // There is no need to extend merge area because it's already been extended. - ScRange aRange = maOption.getSingleRange(*itr); - rDoc.DeleteAreaTab(aRange, InsertDeleteFlags::ATTRIB); - pUndoDoc->CopyToDocument(aRange, InsertDeleteFlags::ATTRIB, false, rDoc); - - bool bDidPaint = false; - if ( pViewShell ) + for (set<SCTAB>::const_iterator itr = rOption.maTabs.begin(), itrEnd = rOption.maTabs.end(); + itr != itrEnd; ++itr) { - pViewShell->SetTabNo(*itr); - bDidPaint = pViewShell->AdjustRowHeight(maOption.mnStartRow, maOption.mnEndRow); + OSL_ENSURE(pUndoDoc, "NULL pUndoDoc!"); + if (!pUndoDoc) + continue; + // There is no need to extend merge area because it's already been extended. + ScRange aRange = rOption.getSingleRange(*itr); + rDoc.DeleteAreaTab(aRange, InsertDeleteFlags::ATTRIB); + pUndoDoc->CopyToDocument(aRange, InsertDeleteFlags::ATTRIB, false, rDoc); + + bool bDidPaint = false; + if ( pViewShell ) + { + pViewShell->SetTabNo(*itr); + bDidPaint = pViewShell->AdjustRowHeight(rOption.mnStartRow, rOption.mnEndRow); + } + if (!bDidPaint) + ScUndoUtil::PaintMore(pDocShell, aRange); } - if (!bDidPaint) - ScUndoUtil::PaintMore(pDocShell, aRange); } EndUndo(); @@ -2167,36 +2187,39 @@ void ScUndoRemoveMerge::Redo() ScDocument& rDoc = pDocShell->GetDocument(); ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell(); - for (set<SCTAB>::const_iterator itr = maOption.maTabs.begin(), itrEnd = maOption.maTabs.end(); - itr != itrEnd; ++itr) + for (const auto & rOption : maOptions) { - SCTAB nTab = *itr; - // There is no need to extend merge area because it's already been extended. - ScRange aRange = maOption.getSingleRange(nTab); + for (set<SCTAB>::const_iterator itr = rOption.maTabs.begin(), itrEnd = rOption.maTabs.end(); + itr != itrEnd; ++itr) + { + SCTAB nTab = *itr; + // There is no need to extend merge area because it's already been extended. + ScRange aRange = rOption.getSingleRange(nTab); - const SfxPoolItem& rDefAttr = rDoc.GetPool()->GetDefaultItem( ATTR_MERGE ); - ScPatternAttr aPattern( rDoc.GetPool() ); - aPattern.GetItemSet().Put( rDefAttr ); - rDoc.ApplyPatternAreaTab( maOption.mnStartCol, maOption.mnStartRow, - maOption.mnEndCol, maOption.mnEndRow, nTab, - aPattern ); + const SfxPoolItem& rDefAttr = rDoc.GetPool()->GetDefaultItem( ATTR_MERGE ); + ScPatternAttr aPattern( rDoc.GetPool() ); + aPattern.GetItemSet().Put( rDefAttr ); + rDoc.ApplyPatternAreaTab( rOption.mnStartCol, rOption.mnStartRow, + rOption.mnEndCol, rOption.mnEndRow, nTab, + aPattern ); - rDoc.RemoveFlagsTab( maOption.mnStartCol, maOption.mnStartRow, - maOption.mnEndCol, maOption.mnEndRow, nTab, - ScMF::Hor | ScMF::Ver ); + rDoc.RemoveFlagsTab( rOption.mnStartCol, rOption.mnStartRow, + rOption.mnEndCol, rOption.mnEndRow, nTab, + ScMF::Hor | ScMF::Ver ); - rDoc.ExtendMerge(aRange, true); + rDoc.ExtendMerge(aRange, true); - // Paint + // Paint - bool bDidPaint = false; - if ( pViewShell ) - { - pViewShell->SetTabNo(nTab); - bDidPaint = pViewShell->AdjustRowHeight(maOption.mnStartRow, maOption.mnEndRow); + bool bDidPaint = false; + if ( pViewShell ) + { + pViewShell->SetTabNo(nTab); + bDidPaint = pViewShell->AdjustRowHeight(rOption.mnStartRow, rOption.mnEndRow); + } + if (!bDidPaint) + ScUndoUtil::PaintMore(pDocShell, aRange); } - if (!bDidPaint) - ScUndoUtil::PaintMore(pDocShell, aRange); } EndRedo(); diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx index 96ab146..7268c1f 100644 --- a/sc/source/ui/unoobj/cellsuno.cxx +++ b/sc/source/ui/unoobj/cellsuno.cxx @@ -5379,7 +5379,7 @@ void SAL_CALL ScCellRangeObj::merge( sal_Bool bMerge ) throw(uno::RuntimeExcepti if ( bMerge ) pDocSh->GetDocFunc().MergeCells( aMergeOption, false, true, true ); else - pDocSh->GetDocFunc().UnmergeCells( aMergeOption, true ); + pDocSh->GetDocFunc().UnmergeCells( aMergeOption, true, nullptr ); //! Fehler abfangen? } diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx index 15291d1..76d600a 100644 --- a/sc/source/ui/view/viewfun2.cxx +++ b/sc/source/ui/view/viewfun2.cxx @@ -1208,7 +1208,7 @@ bool ScViewFunc::RemoveMerge() } while (bExtended); - bool bOk = pDocSh->GetDocFunc().UnmergeCells(aOption, true/*bRecord*/ ); + bool bOk = pDocSh->GetDocFunc().UnmergeCells(aOption, true/*bRecord*/, nullptr); aExtended = aOption.getFirstSingleRange(); MarkRange( aExtended ); diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx index 389ed24..780633f 100644 --- a/sc/source/ui/view/viewfun3.cxx +++ b/sc/source/ui/view/viewfun3.cxx @@ -1201,7 +1201,7 @@ bool ScViewFunc::PasteFromClip( InsertDeleteFlags nFlags, ScDocument* pClipDoc, ScRange aRange(nCol, nRow1, nStartTab); pDoc->ExtendOverlapped(aRange); pDoc->ExtendMerge(aRange, true); - rDocFunc.UnmergeCells(aRange, bRecord); + rDocFunc.UnmergeCells(aRange, bRecord, nullptr /*TODO: should pass combined UndoDoc if bRecord*/); } } } @@ -1302,7 +1302,7 @@ bool ScViewFunc::PasteFromClip( InsertDeleteFlags nFlags, ScDocument* pClipDoc, // skipped rows and merged cells don't mix if ( !bIncludeFiltered && pClipDoc->HasClipFilteredRows() ) - rDocFunc.UnmergeCells( aUserRange, false ); + rDocFunc.UnmergeCells( aUserRange, false, nullptr ); pDoc->ExtendMergeSel( nStartCol, nStartRow, nEndCol, nEndRow, aFilteredMark, true ); // refresh // new range commit 0d3e45608a5771b58ad2f7bea0989d635f25c47c Author: Caolán McNamara <caol...@redhat.com> Date: Wed Oct 26 12:08:20 2016 +0100 SfxSlotInfo is unused Change-Id: I8d5438ca338868c77dcf489609a4e007cfe925fd Reviewed-on: https://gerrit.libreoffice.org/30290 Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/include/rsc/rscsfx.hxx b/include/rsc/rscsfx.hxx index 1a4cea5..dad816a 100644 --- a/include/rsc/rscsfx.hxx +++ b/include/rsc/rscsfx.hxx @@ -19,8 +19,6 @@ #ifndef INCLUDED_RSC_RSCSFX_HXX #define INCLUDED_RSC_RSCSFX_HXX -#define RSC_SFX_SLOT_INFO (0x100 + 0x203) - //========== S F X ======================================= // This is used as a flags enum in sw/, but only there, // so I don't pull in o3tl::typed_flags here @@ -36,12 +34,6 @@ enum class SfxStyleFamily { All = 0x7fff }; -// SfxSlotInfo -enum class SfxSlotInfo { - SlotName = 0x1, - HelpText = 0x2 -}; - #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/rsc/inc/rscclass.hxx b/rsc/inc/rscclass.hxx index c34ac7f..c38dfd6 100644 --- a/rsc/inc/rscclass.hxx +++ b/rsc/inc/rscclass.hxx @@ -63,10 +63,6 @@ public: void Pre_dtor() override; ERRTYPE SetVariable( Atom nVarName, RscTop * pClass, - RSCINST * pDflt, - RSCVAR nVarType, SfxSlotInfo nMask, - Atom nDataBaseName = InvalidAtom ) override; - ERRTYPE SetVariable( Atom nVarName, RscTop * pClass, RSCINST * pDflt = nullptr, RSCVAR nVarType = 0, sal_uInt32 nMask = 0, Atom nDataBaseName = InvalidAtom ) override; diff --git a/rsc/inc/rscdb.hxx b/rsc/inc/rscdb.hxx index cc5ad46..e452f4d 100644 --- a/rsc/inc/rscdb.hxx +++ b/rsc/inc/rscdb.hxx @@ -109,8 +109,6 @@ class RscTypCont RscTop * InitClassMenuItem( RscTop * pSuper ); RscTop * InitClassMenu( RscTop * pSuper, RscTop * pMenuItem ); - RscTop * InitClassSfxSlotInfo( RscTop * pSuper ); - public: RscBool aBool; RscRange aShort; diff --git a/rsc/inc/rsctop.hxx b/rsc/inc/rsctop.hxx index 7fc035b..b4feec0 100644 --- a/rsc/inc/rsctop.hxx +++ b/rsc/inc/rsctop.hxx @@ -82,11 +82,6 @@ public: // sets the variable virtual ERRTYPE SetVariable( Atom nVarName, RscTop * pClass, - RSCINST * pDflt, - RSCVAR nVarType, SfxSlotInfo nMask, - Atom nDataBaseName = InvalidAtom ); - - virtual ERRTYPE SetVariable( Atom nVarName, RscTop * pClass, RSCINST * pDflt = nullptr, RSCVAR nVarType = 0, sal_uInt32 nMask = 0, Atom nDataBaseName = InvalidAtom ); diff --git a/rsc/source/parser/rscicpx.cxx b/rsc/source/parser/rscicpx.cxx index 9cf0bea..857d4aa 100644 --- a/rsc/source/parser/rscicpx.cxx +++ b/rsc/source/parser/rscicpx.cxx @@ -364,24 +364,4 @@ RscTop * RscTypCont::InitClassMenu( RscTop * pSuper, return pClassMenu; } -RscTop * RscTypCont::InitClassSfxSlotInfo( RscTop * pSuper ) -{ - Atom nId; - RscTop * pClassSfxSlotInfo; - - // initialize class - nId = pHS->getID( "SfxSlotInfo" ); - pClassSfxSlotInfo = new RscClass( nId, RSC_SFX_SLOT_INFO, pSuper ); - aNmTb.Put( nId, CLASSNAME, pClassSfxSlotInfo ); - - nId = aNmTb.Put( "SlotName", VARNAME ); - pClassSfxSlotInfo->SetVariable( nId, &aLangString, nullptr, 0, - SfxSlotInfo::SlotName ); - nId = aNmTb.Put( "HelpText", VARNAME ); - pClassSfxSlotInfo->SetVariable( nId, &aLangString, nullptr, 0, - SfxSlotInfo::HelpText ); - return pClassSfxSlotInfo; -} - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/rsc/source/parser/rscinit.cxx b/rsc/source/parser/rscinit.cxx index 699cd5e0..ee82163 100644 --- a/rsc/source/parser/rscinit.cxx +++ b/rsc/source/parser/rscinit.cxx @@ -167,10 +167,6 @@ void RscTypCont::Init() pClassMenuItem->SetVariable( nId, pClassMenu, nullptr, VAR_SVDYNAMIC, (sal_uInt32)RscMenuItem::Menu ); } -{ - RscTop* pClassSfxSlotInfo = InitClassSfxSlotInfo( pClassMgr ); - pRoot->Insert( pClassSfxSlotInfo ); -} aNmTb.SetSort(); } diff --git a/rsc/source/res/rscclass.cxx b/rsc/source/res/rscclass.cxx index e1faf7e..3b3d36b 100644 --- a/rsc/source/res/rscclass.cxx +++ b/rsc/source/res/rscclass.cxx @@ -277,16 +277,6 @@ ERRTYPE RscClass::SetVariable( Atom nVarName, return ERR_OK; } -ERRTYPE RscClass::SetVariable( Atom nVarName, - RscTop * pClass, - RSCINST * pDflt, - RSCVAR nVarType, - SfxSlotInfo nMask, - Atom nDataBaseName) -{ - return SetVariable(nVarName, pClass, pDflt, nVarType, (sal_uInt32)nMask, nDataBaseName); -} - void RscClass::EnumVariables( void * pData, VarEnumCallbackProc pProc ) { sal_uInt32 i; diff --git a/rsc/source/res/rsctop.cxx b/rsc/source/res/rsctop.cxx index 763e6ff..6117bf9 100644 --- a/rsc/source/res/rsctop.cxx +++ b/rsc/source/res/rsctop.cxx @@ -102,17 +102,6 @@ ERRTYPE RscTop::SetVariable( Atom nVarName, RscTop * pClass, return ERR_UNKNOWN_METHOD; } -ERRTYPE RscTop::SetVariable( Atom nVarName, RscTop * pClass, - RSCINST * pDflt, RSCVAR nVarType, SfxSlotInfo nMask, - Atom nDataBaseName ) -{ - if( pSuperClass ) - return pSuperClass->SetVariable( nVarName, pClass, pDflt, - nVarType, nMask, nDataBaseName ); - else - return ERR_UNKNOWN_METHOD; -} - void RscTop::EnumVariables( void * pData, VarEnumCallbackProc pProc ) { if( pSuperClass )
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits