diff options
73 files changed, 181 insertions, 224 deletions
diff --git a/include/svx/itemwin.hxx b/include/svx/itemwin.hxx index 0dbba2e42aee..e09c811e553b 100644 --- a/include/svx/itemwin.hxx +++ b/include/svx/itemwin.hxx @@ -81,8 +81,7 @@ protected: public: SvxMetricField( vcl::Window* pParent, - const css::uno::Reference< css::frame::XFrame >& rFrame, - WinBits nBits = WB_BORDER | WB_SPIN | WB_REPEAT ); + const css::uno::Reference< css::frame::XFrame >& rFrame ); void Update( const XLineWidthItem* pItem ); void SetCoreUnit( MapUnit eUnit ); diff --git a/include/svx/sdrundomanager.hxx b/include/svx/sdrundomanager.hxx index 2add5cac9553..a42e57e60b36 100644 --- a/include/svx/sdrundomanager.hxx +++ b/include/svx/sdrundomanager.hxx @@ -39,7 +39,7 @@ protected: bool isTextEditActive() const; public: - SdrUndoManager(sal_uInt16 nMaxUndoActionCount = 20); + SdrUndoManager(); virtual ~SdrUndoManager() override; /// react depending on edit mode and if no more undo is possible diff --git a/include/svx/svdedtv.hxx b/include/svx/svdedtv.hxx index 1275adbca56a..6facb412144a 100644 --- a/include/svx/svdedtv.hxx +++ b/include/svx/svdedtv.hxx @@ -209,7 +209,7 @@ public: void SetMarkedObjRect(const tools::Rectangle& rRect); void MoveMarkedObj(const Size& rSiz, bool bCopy=false); void ResizeMarkedObj(const Point& rRef, const Fraction& xFact, const Fraction& yFact, bool bCopy=false); - void ResizeMultMarkedObj(const Point& rRef, const Fraction& xFact, const Fraction& yFact, const bool bCopy, const bool bWdh, const bool bHgt); + void ResizeMultMarkedObj(const Point& rRef, const Fraction& xFact, const Fraction& yFact, const bool bWdh, const bool bHgt); long GetMarkedObjRotate() const; void RotateMarkedObj(const Point& rRef, long nAngle, bool bCopy=false); void MirrorMarkedObj(const Point& rRef1, const Point& rRef2, bool bCopy=false); diff --git a/include/svx/svdotable.hxx b/include/svx/svdotable.hxx index 9cfb42cfa337..1a0d57bcda7f 100644 --- a/include/svx/svdotable.hxx +++ b/include/svx/svdotable.hxx @@ -141,7 +141,7 @@ public: void getCellBounds( const sdr::table::CellPos& rPos, ::tools::Rectangle& rCellRect ); const SfxItemSet& GetActiveCellItemSet() const; - void SetMergedItemSetAndBroadcastOnActiveCell(const SfxItemSet& rSet, bool bClearAllItems); + void SetMergedItemSetAndBroadcastOnActiveCell(const SfxItemSet& rSet); void setTableStyle( const css::uno::Reference< css::container::XIndexAccess >& xAutoFormatStyle ); const css::uno::Reference< css::container::XIndexAccess >& getTableStyle() const; diff --git a/include/vcl/FilterConfigItem.hxx b/include/vcl/FilterConfigItem.hxx index 61bf5e366fd5..654afae901ff 100644 --- a/include/vcl/FilterConfigItem.hxx +++ b/include/vcl/FilterConfigItem.hxx @@ -42,8 +42,7 @@ class VCL_DLLPUBLIC FilterConfigItem static bool ImplGetPropertyValue( css::uno::Any& rAny, const css::uno::Reference< css::beans::XPropertySet >& rXPropSet, - const OUString& rPropName, - bool bTestPropertyAvailability ); + const OUString& rPropName ); void ImpInitTree( const OUString& rTree ); diff --git a/include/vcl/ImageTree.hxx b/include/vcl/ImageTree.hxx index 43df2c9a43d8..ecbd6ff0fdaa 100644 --- a/include/vcl/ImageTree.hxx +++ b/include/vcl/ImageTree.hxx @@ -61,8 +61,7 @@ public: bool loadDefaultImage( OUString const & style, - BitmapEx& bitmap, - const ImageLoadFlags eFlags = ImageLoadFlags::NONE); + BitmapEx& bitmap); VCL_DLLPUBLIC css::uno::Reference<css::container::XNameAccess> getNameAccess(); diff --git a/include/vcl/gdimtf.hxx b/include/vcl/gdimtf.hxx index 5ce2f9514afb..383c7b3de445 100644 --- a/include/vcl/gdimtf.hxx +++ b/include/vcl/gdimtf.hxx @@ -190,9 +190,8 @@ public: friend VCL_DLLPUBLIC SvStream& ReadGDIMetaFile( SvStream& rIStm, GDIMetaFile& rGDIMetaFile ); friend VCL_DLLPUBLIC SvStream& WriteGDIMetaFile( SvStream& rOStm, const GDIMetaFile& rGDIMetaFile ); - /// Creates an antialiased thumbnail, with maximum width or height of nMaximumExtent. + /// Creates an antialiased thumbnail bool CreateThumbnail(BitmapEx& rBitmapEx, - sal_uInt32 nMaximumExtent = 256, BmpConversion nColorConversion = BmpConversion::N24Bit, BmpScaleFlag nScaleFlag = BmpScaleFlag::BestQuality) const; diff --git a/include/vcl/layout.hxx b/include/vcl/layout.hxx index 1673605373eb..f401fcda888c 100644 --- a/include/vcl/layout.hxx +++ b/include/vcl/layout.hxx @@ -376,7 +376,7 @@ private: DECL_LINK(SplitHdl, Splitter*, void); void arrange(const Size& rAllocation, long nFirstHeight, long nSecondHeight); public: - VclVPaned(vcl::Window *pParent, WinBits nStyle = WB_HIDE | WB_CLIPCHILDREN); + VclVPaned(vcl::Window *pParent); virtual ~VclVPaned() override { disposeOnce(); } virtual void dispose() override; virtual Size calculateRequisition() const override; diff --git a/include/vcl/lstbox.hxx b/include/vcl/lstbox.hxx index c5f3bf0c6eb4..16d2f302c481 100644 --- a/include/vcl/lstbox.hxx +++ b/include/vcl/lstbox.hxx @@ -218,7 +218,7 @@ public: void EnableUserDraw( bool bUserDraw ); - void DrawEntry( const UserDrawEvent& rEvt, bool bDrawImage, bool bDrawTextAtImagePos ); + void DrawEntry( const UserDrawEvent& rEvt ); void SetSelectHdl( const Link<ListBox&,void>& rLink ) { maSelectHdl = rLink; } const Link<ListBox&,void>& GetSelectHdl() const { return maSelectHdl; } diff --git a/include/vcl/menu.hxx b/include/vcl/menu.hxx index 4e11b3d2e0da..7b844deba3c0 100644 --- a/include/vcl/menu.hxx +++ b/include/vcl/menu.hxx @@ -186,7 +186,7 @@ protected: SAL_DLLPRIVATE void ImplFillLayoutData() const; SAL_DLLPRIVATE SalMenu* ImplGetSalMenu() { return mpSalMenu; } - SAL_DLLPRIVATE void ImplSetSalMenu( SalMenu *pMenu ); + SAL_DLLPRIVATE void ImplClearSalMenu(); SAL_DLLPRIVATE OUString ImplGetHelpText( sal_uInt16 nItemId ) const; // returns native check and option menu symbol height in rCheckHeight and rRadioHeight diff --git a/include/vcl/splitwin.hxx b/include/vcl/splitwin.hxx index 18d40e6431bc..144ecc7c8a7a 100644 --- a/include/vcl/splitwin.hxx +++ b/include/vcl/splitwin.hxx @@ -89,7 +89,7 @@ private: SAL_DLLPRIVATE void ImplUpdate(); SAL_DLLPRIVATE void ImplSetWindowSize( long nDelta ); SAL_DLLPRIVATE void ImplSplitMousePos( Point& rMousePos ); - SAL_DLLPRIVATE void ImplGetButtonRect( tools::Rectangle& rRect, long nEx, bool bTest ) const; + SAL_DLLPRIVATE void ImplGetButtonRect( tools::Rectangle& rRect, bool bTest ) const; SAL_DLLPRIVATE void ImplGetFadeInRect( tools::Rectangle& rRect, bool bTest = false ) const; SAL_DLLPRIVATE void ImplGetFadeOutRect( tools::Rectangle& rRect, bool bTest = false ) const; SAL_DLLPRIVATE void ImplDrawFadeIn(vcl::RenderContext& rRenderContext); diff --git a/rsc/inc/rsccont.hxx b/rsc/inc/rsccont.hxx index 89d3b7701c63..005daa44856f 100644 --- a/rsc/inc/rsccont.hxx +++ b/rsc/inc/rsccont.hxx @@ -41,7 +41,6 @@ class RscBaseCont : public RscTop { protected: RscTop * pTypeClass; // type of entries - RscTop * pTypeClass1;// two different types may exist bool bNoId; // whether there is no identifier const sal_uInt32 nOffInstData;// offset of own instance data const sal_uInt32 nSize; // size of this class and super classes instance data @@ -58,10 +57,9 @@ public: bool bNoId ); virtual ~RscBaseCont() override; virtual RSCCLASS_TYPE GetClassType() const override; - void SetTypeClass( RscTop * pClass, RscTop * pClass1 = nullptr ) + void SetTypeClass( RscTop * pClass ) { pTypeClass = pClass; - pTypeClass1 = pClass1; } RSCINST Create( RSCINST * pInst, const RSCINST & rDflt, bool bOwnClass = false ) override; void Destroy( const RSCINST & rInst ) override; diff --git a/rsc/source/res/rsccont.cxx b/rsc/source/res/rsccont.cxx index 033ec345f380..636cbe4e4feb 100644 --- a/rsc/source/res/rsccont.cxx +++ b/rsc/source/res/rsccont.cxx @@ -38,7 +38,7 @@ void ENTRY_STRUCT::Destroy() RscBaseCont::RscBaseCont( Atom nId, RESOURCE_TYPE nTypeId, bool bNoIdent ) : RscTop(nId, nTypeId, nullptr) - , pTypeClass(nullptr), pTypeClass1(nullptr) + , pTypeClass(nullptr) , bNoId(bNoIdent), nOffInstData(RscTop::Size()) , nSize(nOffInstData + ALIGNED_SIZE(sizeof(RscBaseContInst))) @@ -176,17 +176,7 @@ ERRTYPE RscBaseCont::GetElement( const RSCINST & rInst, const RscId & rEleName, { if( !pCreateClass->InHierarchy( pTypeClass ) ) { - if( pTypeClass1 ) - { - if( !pCreateClass->InHierarchy( pTypeClass1 ) ) - { - return ERR_CONT_INVALIDTYPE; - } - } - else - { - return ERR_CONT_INVALIDTYPE; - } + return ERR_CONT_INVALIDTYPE; } } else @@ -357,7 +347,7 @@ ERRTYPE RscBaseCont::SetString( const RSCINST & rInst, const char * pStr ) { aError.Clear(); DeletePos( rInst, pClassData->nEntries -1 ); - aError = GetElement( rInst, RscId(), pTypeClass1, RSCINST(), &aTmpI ); + aError = GetElement( rInst, RscId(), nullptr, RSCINST(), &aTmpI ); aError = aTmpI.pClass->GetString( aTmpI, &pTmpStr ); if( aError.IsOk() ) aError = aTmpI.pClass->SetString( aTmpI, pStr ); @@ -393,7 +383,7 @@ ERRTYPE RscBaseCont::SetNumber( const RSCINST & rInst, sal_Int32 lValue ) { aError.Clear(); DeletePos( rInst, pClassData->nEntries -1 ); - aError = GetElement( rInst, RscId(), pTypeClass1, RSCINST(), &aTmpI ); + aError = GetElement( rInst, RscId(), nullptr, RSCINST(), &aTmpI ); aError = aTmpI.pClass->GetNumber( aTmpI, &lNumber ); if( aError.IsOk() ) aError = aTmpI.pClass->SetNumber( aTmpI, lValue ); @@ -429,7 +419,7 @@ ERRTYPE RscBaseCont::SetBool( const RSCINST & rInst, { aError.Clear(); DeletePos( rInst, pClassData->nEntries -1 ); - aError = GetElement( rInst, RscId(), pTypeClass1, RSCINST(), &aTmpI ); + aError = GetElement( rInst, RscId(), nullptr, RSCINST(), &aTmpI ); aError = aTmpI.pClass->GetBool( aTmpI, &bBool ); if( aError.IsOk() ) aError = aTmpI.pClass->SetBool( aTmpI, bValue ); @@ -467,7 +457,7 @@ ERRTYPE RscBaseCont::SetConst( const RSCINST & rInst, { aError.Clear(); DeletePos( rInst, pClassData->nEntries -1 ); - aError = GetElement( rInst, RscId(), pTypeClass1, RSCINST(), &aTmpI ); + aError = GetElement( rInst, RscId(), nullptr, RSCINST(), &aTmpI ); aError = aTmpI.pClass->GetConst( aTmpI, &nConst ); if( aError.IsOk() ) aError = aTmpI.pClass->SetConst( aTmpI, nValueId, lValue ); @@ -503,7 +493,7 @@ ERRTYPE RscBaseCont::SetRef( const RSCINST & rInst, const RscId & rRefId ) { aError.Clear(); DeletePos( rInst, pClassData->nEntries -1 ); - aError = GetElement( rInst, RscId(), pTypeClass1, RSCINST(), &aTmpI ); + aError = GetElement( rInst, RscId(), nullptr, RSCINST(), &aTmpI ); aError = aTmpI.pClass->GetRef( aTmpI, &aId ); if( aError.IsOk() ) aError = aTmpI.pClass->SetNumber( aTmpI, rRefId.GetNumber() ); diff --git a/sc/inc/address.hxx b/sc/inc/address.hxx index 5f394983c016..0a489ae0d44a 100644 --- a/sc/inc/address.hxx +++ b/sc/inc/address.hxx @@ -776,10 +776,9 @@ public: ScRefAddress() : bRelCol(false), bRelRow(false), bRelTab(false) {} - ScRefAddress( SCCOL nCol, SCROW nRow, SCTAB nTab, - bool bRelColP, bool bRelRowP, bool bRelTabP ) : + ScRefAddress( SCCOL nCol, SCROW nRow, SCTAB nTab ) : aAdr(nCol, nRow, nTab), - bRelCol(bRelColP), bRelRow(bRelRowP), bRelTab(bRelTabP) + bRelCol(false), bRelRow(false), bRelTab(false) {} ScRefAddress( const ScRefAddress& rRef ) : aAdr(rRef.aAdr), bRelCol(rRef.bRelCol), bRelRow(rRef.bRelRow), diff --git a/sc/inc/attrib.hxx b/sc/inc/attrib.hxx index fddb8f44cbf8..414fdcdd3987 100644 --- a/sc/inc/attrib.hxx +++ b/sc/inc/attrib.hxx @@ -192,7 +192,7 @@ inline ScRangeItem& ScRangeItem::operator=( const ScRangeItem &rCpy ) class ScTableListItem : public SfxPoolItem { public: - inline ScTableListItem( const sal_uInt16 nWhich ); + ScTableListItem(); ScTableListItem( const ScTableListItem& rCpy ); virtual ~ScTableListItem() override; @@ -212,10 +212,6 @@ public: std::unique_ptr<SCTAB[]> pTabArr; }; -inline ScTableListItem::ScTableListItem( const sal_uInt16 nWhichP ) - : SfxPoolItem(nWhichP), nCount(0), pTabArr(nullptr) -{} - // page format item: contents of header and footer #define SC_HF_LEFTAREA 1 diff --git a/sc/inc/defaultsoptions.hxx b/sc/inc/defaultsoptions.hxx index b0d58ef277a3..be0e8c110a7a 100644 --- a/sc/inc/defaultsoptions.hxx +++ b/sc/inc/defaultsoptions.hxx @@ -44,8 +44,7 @@ public: class SC_DLLPUBLIC ScTpDefaultsItem : public SfxPoolItem { public: - ScTpDefaultsItem( sal_uInt16 nWhich, - const ScDefaultsOptions& rOpt ); + ScTpDefaultsItem( const ScDefaultsOptions& rOpt ); ScTpDefaultsItem( const ScTpDefaultsItem& rItem ); virtual ~ScTpDefaultsItem() override; diff --git a/sc/inc/formulaopt.hxx b/sc/inc/formulaopt.hxx index ea5cca40fefa..d4dd5762f067 100644 --- a/sc/inc/formulaopt.hxx +++ b/sc/inc/formulaopt.hxx @@ -83,8 +83,7 @@ public: class SC_DLLPUBLIC ScTpFormulaItem : public SfxPoolItem { public: - ScTpFormulaItem( sal_uInt16 nWhich, - const ScFormulaOptions& rOpt ); + ScTpFormulaItem( const ScFormulaOptions& rOpt ); ScTpFormulaItem( const ScTpFormulaItem& rItem ); virtual ~ScTpFormulaItem() override; diff --git a/sc/inc/printopt.hxx b/sc/inc/printopt.hxx index 7e6fe5e143b8..5510b68c0b77 100644 --- a/sc/inc/printopt.hxx +++ b/sc/inc/printopt.hxx @@ -54,8 +54,7 @@ public: class SC_DLLPUBLIC ScTpPrintItem : public SfxPoolItem { public: - ScTpPrintItem( sal_uInt16 nWhich, - const ScPrintOptions& rOpt ); + ScTpPrintItem( const ScPrintOptions& rOpt ); ScTpPrintItem( const ScTpPrintItem& rItem ); virtual ~ScTpPrintItem() override; diff --git a/sc/inc/viewopti.hxx b/sc/inc/viewopti.hxx index c5dfd1afa208..0d64499a8901 100644 --- a/sc/inc/viewopti.hxx +++ b/sc/inc/viewopti.hxx @@ -110,12 +110,12 @@ private: ScGridOptions aGridOpt; }; -// Item for the options dialoge - View +// Item for the options dialog - View class SC_DLLPUBLIC ScTpViewItem : public SfxPoolItem { public: - ScTpViewItem( sal_uInt16 nWhich, const ScViewOptions& rOpt ); + ScTpViewItem( const ScViewOptions& rOpt ); ScTpViewItem( const ScTpViewItem& rItem ); virtual ~ScTpViewItem() override; diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx index 81e2f2121185..a3ad3c082289 100644 --- a/sc/qa/unit/ucalc_formula.cxx +++ b/sc/qa/unit/ucalc_formula.cxx @@ -3507,9 +3507,9 @@ void Test::testMultipleOperations() // Set multiple operations range. ScTabOpParam aParam; - aParam.aRefFormulaCell = ScRefAddress(1,0,0,false,false,false); + aParam.aRefFormulaCell = ScRefAddress(1,0,0); aParam.aRefFormulaEnd = aParam.aRefFormulaCell; - aParam.aRefColCell = ScRefAddress(0,0,0,false,false,false); + aParam.aRefColCell = ScRefAddress(0,0,0); ScMarkData aMark; aMark.SetMarkArea(ScRange(0,2,0,1,4,0)); // Select A3:B5. m_pDoc->InsertTableOp(aParam, 0, 2, 1, 4, aMark); diff --git a/sc/source/core/data/docpool.cxx b/sc/source/core/data/docpool.cxx index 49759cf3a778..858e761e01cf 100644 --- a/sc/source/core/data/docpool.cxx +++ b/sc/source/core/data/docpool.cxx @@ -317,7 +317,7 @@ ScDocumentPool::ScDocumentPool() rPoolDefaults[ ATTR_PAGE_PRINTAREA - ATTR_STARTINDEX ] = new ScRangeItem( ATTR_PAGE_PRINTAREA ); rPoolDefaults[ ATTR_PAGE_REPEATROW - ATTR_STARTINDEX ] = new ScRangeItem( ATTR_PAGE_REPEATROW ); rPoolDefaults[ ATTR_PAGE_REPEATCOL - ATTR_STARTINDEX ] = new ScRangeItem( ATTR_PAGE_REPEATCOL ); - rPoolDefaults[ ATTR_PAGE_PRINTTABLES- ATTR_STARTINDEX ] = new ScTableListItem( ATTR_PAGE_PRINTTABLES ); + rPoolDefaults[ ATTR_PAGE_PRINTTABLES- ATTR_STARTINDEX ] = new ScTableListItem; rPoolDefaults[ ATTR_PAGE_HEADERLEFT - ATTR_STARTINDEX ] = new ScPageHFItem( ATTR_PAGE_HEADERLEFT ); rPoolDefaults[ ATTR_PAGE_FOOTERLEFT - ATTR_STARTINDEX ] = new ScPageHFItem( ATTR_PAGE_FOOTERLEFT ); rPoolDefaults[ ATTR_PAGE_HEADERRIGHT- ATTR_STARTINDEX ] = new ScPageHFItem( ATTR_PAGE_HEADERRIGHT ); diff --git a/sc/source/core/tool/defaultsoptions.cxx b/sc/source/core/tool/defaultsoptions.cxx index 2ae74582030d..e49516f65610 100644 --- a/sc/source/core/tool/defaultsoptions.cxx +++ b/sc/source/core/tool/defaultsoptions.cxx @@ -13,7 +13,10 @@ #include "defaultsoptions.hxx" #include "miscuno.hxx" #include "global.hxx" +#include "attrib.hxx" +#include "scitems.hxx" #include "globstr.hrc" +#include "sc.hrc" using namespace utl; using namespace com::sun::star::uno; @@ -54,8 +57,12 @@ bool ScDefaultsOptions::operator==( const ScDefaultsOptions& rOpt ) const && rOpt.aInitTabPrefix == aInitTabPrefix; } -ScTpDefaultsItem::ScTpDefaultsItem( sal_uInt16 nWhichP, const ScDefaultsOptions& rOpt ) : - SfxPoolItem ( nWhichP ), +ScTableListItem::ScTableListItem() + : SfxPoolItem(ATTR_PAGE_PRINTTABLES), nCount(0), pTabArr(nullptr) +{} + +ScTpDefaultsItem::ScTpDefaultsItem( const ScDefaultsOptions& rOpt ) : + SfxPoolItem ( SID_SCDEFAULTSOPTIONS ), theOptions ( rOpt ) { } diff --git a/sc/source/core/tool/formulaopt.cxx b/sc/source/core/tool/formulaopt.cxx index fd1d456fc5e2..62fc4034543d 100644 --- a/sc/source/core/tool/formulaopt.cxx +++ b/sc/source/core/tool/formulaopt.cxx @@ -15,6 +15,7 @@ #include "miscuno.hxx" #include "global.hxx" #include "formulagroup.hxx" +#include "sc.hrc" using namespace utl; using namespace com::sun::star::uno; @@ -147,8 +148,8 @@ bool ScFormulaOptions::operator!=( const ScFormulaOptions& rOpt ) const return !(operator==(rOpt)); } -ScTpFormulaItem::ScTpFormulaItem( sal_uInt16 nWhichP, const ScFormulaOptions& rOpt ) : - SfxPoolItem ( nWhichP ), +ScTpFormulaItem::ScTpFormulaItem( const ScFormulaOptions& rOpt ) : + SfxPoolItem ( SID_SCFORMULAOPTIONS ), theOptions ( rOpt ) { } diff --git a/sc/source/core/tool/printopt.cxx b/sc/source/core/tool/printopt.cxx index a42df78042a2..ade54c635b30 100644 --- a/sc/source/core/tool/printopt.cxx +++ b/sc/source/core/tool/printopt.cxx @@ -23,6 +23,7 @@ #include "printopt.hxx" #include "miscuno.hxx" +#include "sc.hrc" using namespace utl; using namespace com::sun::star::uno; @@ -66,8 +67,8 @@ bool ScPrintOptions::operator==( const ScPrintOptions& rOpt ) const && bForceBreaks == rOpt.bForceBreaks; } -ScTpPrintItem::ScTpPrintItem( sal_uInt16 nWhichP, const ScPrintOptions& rOpt ) : - SfxPoolItem ( nWhichP ), +ScTpPrintItem::ScTpPrintItem( const ScPrintOptions& rOpt ) : + SfxPoolItem ( SID_SCPRINTOPTIONS ), theOptions ( rOpt ) { } diff --git a/sc/source/core/tool/viewopti.cxx b/sc/source/core/tool/viewopti.cxx index b94f6afec640..7da2ef077958 100644 --- a/sc/source/core/tool/viewopti.cxx +++ b/sc/source/core/tool/viewopti.cxx @@ -193,8 +193,8 @@ SvxGridItem* ScViewOptions::CreateGridItem() const // ScTpViewItem - data for the ViewOptions TabPage -ScTpViewItem::ScTpViewItem( sal_uInt16 nWhichP, const ScViewOptions& rOpt ) - : SfxPoolItem ( nWhichP ), +ScTpViewItem::ScTpViewItem( const ScViewOptions& rOpt ) + : SfxPoolItem ( SID_SCVIEWOPTIONS ), theOptions ( rOpt ) { } diff --git a/sc/source/filter/inc/connectionsbuffer.hxx b/sc/source/filter/inc/connectionsbuffer.hxx index 3c29cc33d05d..eaa473551fc2 100644 --- a/sc/source/filter/inc/connectionsbuffer.hxx +++ b/sc/source/filter/inc/connectionsbuffer.hxx @@ -93,7 +93,7 @@ struct ConnectionModel class Connection : public WorkbookHelper { public: - explicit Connection( const WorkbookHelper& rHelper, sal_Int32 nConnId = -1 ); + explicit Connection( const WorkbookHelper& rHelper ); /** Imports connection settings from the connection element. */ void importConnection( const AttributeList& rAttribs ); diff --git a/sc/source/filter/inc/formulabase.hxx b/sc/source/filter/inc/formulabase.hxx index ba5440cc7679..d207559a2d66 100644 --- a/sc/source/filter/inc/formulabase.hxx +++ b/sc/source/filter/inc/formulabase.hxx @@ -673,6 +673,7 @@ public: extractReference( const ApiTokenSequence& rTokens ) const; /** Tries to extract a cell range address from a formula token sequence. + Only real absolute references will be accepted. @param orAddress (output parameter) If the token sequence is valid, this parameter will contain the extracted cell range address. If @@ -683,19 +684,15 @@ public: one cell range address token. The token sequence may contain whitespace tokens. - @param bAllowRelative True = it is allowed that rTokens contains - relative references (based on cell A1 of the current sheet). - False = only real absolute references will be accepted. - @return True, if the token sequence contains a valid cell range address which has been extracted to orRange, false otherwise. */ bool extractCellRange( ScRange& orRange, - const ApiTokenSequence& rTokens, - bool bAllowRelative ) const; + const ApiTokenSequence& rTokens ) const; /** Tries to extract a cell range list from a formula token sequence. + Only real absolute references will be accepted. @param orRanges (output parameter) If the token sequence is valid, this parameter will contain the extracted cell range list. Deleted @@ -708,10 +705,6 @@ public: standard function parameter separator token. The token sequence may contain parentheses and whitespace tokens. - @param bAllowRelative True = it is allowed that rTokens contains - relative references (based on cell A1 of the current sheet). - False = only real absolute references will be accepted. - @param nFilterBySheet If non-negative, this function returns only cell ranges located in the specified sheet, otherwise returns all cell ranges contained in the token sequence. @@ -719,7 +712,6 @@ public: void extractCellRangeList( ScRangeList& orRanges, const ApiTokenSequence& rTokens, - bool bAllowRelative, sal_Int32 nFilterBySheet ) const; /** Tries to extract a string from a formula token sequence. diff --git a/sc/source/filter/inc/pivotcachebuffer.hxx b/sc/source/filter/inc/pivotcachebuffer.hxx index a3012f4c37fb..33317d0c2f05 100644 --- a/sc/source/filter/inc/pivotcachebuffer.hxx +++ b/sc/source/filter/inc/pivotcachebuffer.hxx @@ -361,7 +361,7 @@ public: void importPCDSheetSource( SequenceInputStream& rStrm, const ::oox::core::Relations& rRelations ); /** Creates and returns a new pivot cache field. */ - PivotCacheField& createCacheField( bool bInitDatabaseField = false ); + PivotCacheField& createCacheField(); /** Checks validity of source data and creates a dummy data sheet for external sheet sources. */ void finalizeImport(); diff --git a/sc/source/filter/inc/richstring.hxx b/sc/source/filter/inc/richstring.hxx index bb62d2e40a5c..4be4a1fce142 100644 --- a/sc/source/filter/inc/richstring.hxx +++ b/sc/source/filter/inc/richstring.hxx @@ -85,8 +85,7 @@ struct FontPortionModel sal_Int32 mnFontId; /// Font identifier for the next characters. explicit FontPortionModel() : mnPos( 0 ), mnFontId( -1 ) {} - explicit FontPortionModel( sal_Int32 nPos, sal_Int32 nFontId ) : - mnPos( nPos ), mnFontId( nFontId ) {} + explicit FontPortionModel( sal_Int32 nPos ) : mnPos( nPos ), mnFontId( -1 ) {} void read( SequenceInputStream& rStrm ); }; @@ -232,12 +231,10 @@ public: OUString& orString, const oox::xls::Font* pFirstPortionFont ) const; - /** Converts the string and writes it into the passed XText. + /** Converts the string and writes it into the passed XText, replace old contents of the text object,. @param rxText The XText interface of the target object. - @param bReplaceOld True = replace old contents of the text object. */ - void convert( - const css::uno::Reference< css::text::XText >& rxText, - bool bReplaceOld ) const; + */ + void convert( const css::uno::Reference< css::text::XText >& rxText ) const; ::EditTextObject* convert( ScEditEngineDefaulter& rEE, const oox::xls::Font* pFont ) const; private: diff --git a/sc/source/filter/oox/commentsbuffer.cxx b/sc/source/filter/oox/commentsbuffer.cxx index ae719868b0a9..b76d8e2ddcfa 100644 --- a/sc/source/filter/oox/commentsbuffer.cxx +++ b/sc/source/filter/oox/commentsbuffer.cxx @@ -171,7 +171,7 @@ void Comment::finalizeImport() // insert text and convert text formatting maModel.mxText->finalizeImport(); Reference< XText > xAnnoText( xAnnoShape, UNO_QUERY_THROW ); - maModel.mxText->convert( xAnnoText, true ); + maModel.mxText->convert( xAnnoText ); } catch( Exception& ) { diff --git a/sc/source/filter/oox/connectionsbuffer.cxx b/sc/source/filter/oox/connectionsbuffer.cxx index 81e3497c4b47..c90d9ba408ba 100644 --- a/sc/source/filter/oox/connectionsbuffer.cxx +++ b/sc/source/filter/oox/connectionsbuffer.cxx @@ -104,10 +104,10 @@ WebPrModel& ConnectionModel::createWebPr() return *mxWebPr; } -Connection::Connection( const WorkbookHelper& rHelper, sal_Int32 nConnId ) : +Connection::Connection( const WorkbookHelper& rHelper ) : WorkbookHelper( rHelper ) { - maModel.mnId = nConnId; + maModel.mnId = -1; } void Connection::importConnection( const AttributeList& rAttribs ) diff --git a/sc/source/filter/oox/defnamesbuffer.cxx b/sc/source/filter/oox/defnamesbuffer.cxx index 0004f5a90719..b681921c592d 100644 --- a/sc/source/filter/oox/defnamesbuffer.cxx +++ b/sc/source/filter/oox/defnamesbuffer.cxx @@ -360,7 +360,7 @@ void DefinedName::convertFormula( const css::uno::Sequence<css::sheet::ExternalL { Reference< XPrintAreas > xPrintAreas( getSheetFromDoc( mnCalcSheet ), UNO_QUERY ); ScRangeList aPrintRanges; - getFormulaParser().extractCellRangeList( aPrintRanges, aFTokenSeq, false, mnCalcSheet ); + getFormulaParser().extractCellRangeList( aPrintRanges, aFTokenSeq, mnCalcSheet ); if( xPrintAreas.is() && !aPrintRanges.empty() ) xPrintAreas->setPrintAreas( AddressConverter::toApiSequence(aPrintRanges) ); } @@ -369,7 +369,7 @@ void DefinedName::convertFormula( const css::uno::Sequence<css::sheet::ExternalL { Reference< XPrintAreas > xPrintAreas( getSheetFromDoc( mnCalcSheet ), UNO_QUERY ); ScRangeList aTitleRanges; - getFormulaParser().extractCellRangeList( aTitleRanges, aFTokenSeq, false, mnCalcSheet ); + getFormulaParser().extractCellRangeList( aTitleRanges, aFTokenSeq, mnCalcSheet ); if( xPrintAreas.is() && !aTitleRanges.empty() ) { bool bHasRowTitles = false; @@ -408,7 +408,7 @@ bool DefinedName::getAbsoluteRange( ScRange& orRange ) const ScTokenArray* pTokenArray = mpScRangeData->GetCode(); Sequence< FormulaToken > aFTokenSeq; ScTokenConversion::ConvertToTokenSequence(getScDocument(), aFTokenSeq, *pTokenArray); - return getFormulaParser().extractCellRange( orRange, aFTokenSeq, false ); + return getFormulaParser().extractCellRange( orRange, aFTokenSeq ); } diff --git a/sc/source/filter/oox/formulabase.cxx b/sc/source/filter/oox/formulabase.cxx index 3c675367b77c..4a2821cc1a1c 100644 --- a/sc/source/filter/oox/formulabase.cxx +++ b/sc/source/filter/oox/formulabase.cxx @@ -1481,13 +1481,13 @@ bool lclConvertToCellRange( ScRange& orRange, const ComplexReference& rComplexRe enum TokenToRangeListState { STATE_REF, STATE_SEP, STATE_OPEN, STATE_CLOSE, STATE_ERROR }; -TokenToRangeListState lclProcessRef( ScRangeList& orRanges, const Any& rData, bool bAllowRelative, sal_Int32 nFilterBySheet ) +TokenToRangeListState lclProcessRef( ScRangeList& orRanges, const Any& rData, sal_Int32 nFilterBySheet ) { using namespace ::com::sun::star::sheet::ReferenceFlags; - const sal_Int32 FORBIDDEN_FLAGS_DEL = COLUMN_DELETED | ROW_DELETED | SHEET_DELETED; - const sal_Int32 FORBIDDEN_FLAGS_REL = FORBIDDEN_FLAGS_DEL | COLUMN_RELATIVE | ROW_RELATIVE | SHEET_RELATIVE | RELATIVE_NAME; + const sal_Int32 FORBIDDEN_FLAGS_REL = COLUMN_DELETED | ROW_DELETED | SHEET_DELETED | + COLUMN_RELATIVE | ROW_RELATIVE | SHEET_RELATIVE | RELATIVE_NAME; - sal_Int32 nForbiddenFlags = bAllowRelative ? FORBIDDEN_FLAGS_DEL : FORBIDDEN_FLAGS_REL; + sal_Int32 nForbiddenFlags = FORBIDDEN_FLAGS_REL; SingleReference aSingleRef; if( rData >>= aSingleRef ) { @@ -1599,10 +1599,10 @@ Any FormulaProcessorBase::extractReference( const ApiTokenSequence& rTokens ) co } bool FormulaProcessorBase::extractCellRange( ScRange& orRange, - const ApiTokenSequence& rTokens, bool bAllowRelative ) const + const ApiTokenSequence& rTokens ) const { ScRangeList aRanges; - lclProcessRef( aRanges, extractReference( rTokens ), bAllowRelative, -1 ); + lclProcessRef( aRanges, extractReference( rTokens ), -1 ); if( !aRanges.empty() ) { orRange = *aRanges.front(); @@ -1612,7 +1612,7 @@ bool FormulaProcessorBase::extractCellRange( ScRange& orRange, } void FormulaProcessorBase::extractCellRangeList( ScRangeList& orRanges, - const ApiTokenSequence& rTokens, bool bAllowRelative, sal_Int32 nFilterBySheet ) const + const ApiTokenSequence& rTokens, sal_Int32 nFilterBySheet ) const { orRanges.RemoveAll(); TokenToRangeListState eState = STATE_OPEN; @@ -1630,7 +1630,7 @@ void FormulaProcessorBase::extractCellRangeList( ScRangeList& orRanges, else eState = STATE_ERROR; break; case STATE_SEP: - if( nOpCode == OPCODE_PUSH ) eState = lclProcessRef( orRanges, aIt->Data, bAllowRelative, nFilterBySheet ); + if( nOpCode == OPCODE_PUSH ) eState = lclProcessRef( orRanges, aIt->Data, nFilterBySheet ); else if( nOpCode == OPCODE_SEP ) eState = STATE_SEP; else if( nOpCode == OPCODE_LIST ) eState = STATE_SEP; else if( nOpCode == OPCODE_OPEN ) eState = lclProcessOpen( nParenLevel ); @@ -1638,7 +1638,7 @@ void FormulaProcessorBase::extractCellRangeList( ScRangeList& orRanges, else eState = STATE_ERROR; break; case STATE_OPEN: - if( nOpCode == OPCODE_PUSH ) eState = lclProcessRef( orRanges, aIt->Data, bAllowRelative, nFilterBySheet ); + if( nOpCode == OPCODE_PUSH ) eState = lclProcessRef( orRanges, aIt->Data, nFilterBySheet ); else if( nOpCode == OPCODE_SEP ) eState = STATE_SEP; else if( nOpCode == OPCODE_LIST ) eState = STATE_SEP; else if( nOpCode == OPCODE_OPEN ) eState = lclProcessOpen( nParenLevel ); diff --git a/sc/source/filter/oox/formulaparser.cxx b/sc/source/filter/oox/formulaparser.cxx index b94cd73b0221..c7d163eaba1c 100644 --- a/sc/source/filter/oox/formulaparser.cxx +++ b/sc/source/filter/oox/formulaparser.cxx @@ -498,7 +498,7 @@ protected: bool pushExternalFuncOperand( const FunctionInfo& rFuncInfo ); bool pushDdeLinkOperand( const OUString& rDdeServer, const OUString& rDdeTopic, const OUString& rDdeItem ); bool pushExternalNameOperand( const ExternalNameRef& rxExtName, const ExternalLink& rExtLink ); - bool pushSpecialTokenOperand( const BinAddress& rBaseAddr, bool bTable ); + bool pushSpecialTokenOperand( const BinAddress& rBaseAddr ); bool pushUnaryPreOperator( sal_Int32 nOpCode ); bool pushUnaryPostOperator( sal_Int32 nOpCode ); @@ -1005,10 +1005,10 @@ bool FormulaParserImpl::pushExternalNameOperand( const ExternalNameRef& rxExtNam return pushBiffErrorOperand( BIFF_ERR_NAME ); } -bool FormulaParserImpl::pushSpecialTokenOperand( const BinAddress& rBaseAddr, bool bTable ) +bool FormulaParserImpl::pushSpecialTokenOperand( const BinAddress& rBaseAddr ) { CellAddress aBaseAddr( maBaseAddr.Tab(), rBaseAddr.mnCol, rBaseAddr.mnRow ); - ApiSpecialTokenInfo aTokenInfo( aBaseAddr, bTable ); + ApiSpecialTokenInfo aTokenInfo( aBaseAddr, false ); return mbSpecialTokens && (getFormulaSize() == 0) && pushValueOperand( aTokenInfo, OPCODE_BAD ); } @@ -1681,7 +1681,7 @@ bool OoxFormulaParserImpl::importExpToken( SequenceInputStream& rStrm ) swapStreamPosition( rStrm ); aBaseAddr.mnCol = rStrm.readInt32(); swapStreamPosition( rStrm ); - return pushSpecialTokenOperand( aBaseAddr, false ); + return pushSpecialTokenOperand( aBaseAddr ); } LinkSheetRange OoxFormulaParserImpl::readSheetRange( SequenceInputStream& rStrm ) diff --git a/sc/source/filter/oox/pivotcachebuffer.cxx b/sc/source/filter/oox/pivotcachebuffer.cxx index 088a6a6d1478..93677c03329a 100644 --- a/sc/source/filter/oox/pivotcachebuffer.cxx +++ b/sc/source/filter/oox/pivotcachebuffer.cxx @@ -957,10 +957,9 @@ void PivotCache::importPCDSheetSource( SequenceInputStream& rStrm, const Relatio maTargetUrl = rRelations.getExternalTargetFromRelId( maSheetSrcModel.maRelId ); } -PivotCacheField& PivotCache::createCacheField( bool bInitDatabaseField ) +PivotCacheField& PivotCache::createCacheField() { - bool bIsDatabaseField = !bInitDatabaseField; - PivotCacheFieldVector::value_type xCacheField( new PivotCacheField( *this, bIsDatabaseField ) ); + PivotCacheFieldVector::value_type xCacheField( new PivotCacheField( *this, true/*bIsDatabaseField*/ ) ); maFields.push_back( xCacheField ); return *xCacheField; } diff --git a/sc/source/filter/oox/richstring.cxx b/sc/source/filter/oox/richstring.cxx index f88297f800d5..e4c114b3af26 100644 --- a/sc/source/filter/oox/richstring.cxx +++ b/sc/source/filter/oox/richstring.cxx @@ -370,7 +370,7 @@ bool RichString::extractPlainString( OUString& orString, const oox::xls::Font* p return false; } -void RichString::convert( const Reference< XText >& rxText, bool bReplaceOld ) const +void RichString::convert( const Reference< XText >& rxText ) const { if (maTextPortions.size() == 1) { @@ -382,6 +382,7 @@ void RichString::convert( const Reference< XText >& rxText, bool bReplaceOld ) c return; } + bool bReplaceOld = true; for( PortionVector::const_iterator aIt = maTextPortions.begin(), aEnd = maTextPortions.end(); aIt != aEnd; ++aIt ) { (*aIt)->convert( rxText, bReplaceOld ); @@ -435,9 +436,9 @@ void RichString::createTextPortions( const OUString& rText, FontPortionModelList sal_Int32 nStrLen = rText.getLength(); // add leading and trailing string position to ease the following loop if( rPortions.empty() || (rPortions.front().mnPos > 0) ) - rPortions.insert( rPortions.begin(), FontPortionModel( 0, -1 ) ); + rPortions.insert( rPortions.begin(), FontPortionModel( 0 ) ); if( rPortions.back().mnPos < nStrLen ) - rPortions.push_back( FontPortionModel( nStrLen, -1 ) ); + rPortions.push_back( FontPortionModel( nStrLen ) ); // create all string portions according to the font id vector for( ::std::vector< FontPortionModel >::const_iterator aIt = rPortions.begin(); aIt->mnPos < nStrLen; ++aIt ) diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx index 580c34ac906c..c25910d55dc0 100644 --- a/sc/source/ui/app/scmod.cxx +++ b/sc/source/ui/app/scmod.cxx @@ -1983,7 +1983,7 @@ SfxItemSet* ScModule::CreateItemSet( sal_uInt16 nId ) pRet->Put( ScTpCalcItem( SID_SCDOCOPTIONS, aCalcOpt ) ); // TP_VIEW - pRet->Put( ScTpViewItem( SID_SCVIEWOPTIONS, aViewOpt ) ); + pRet->Put( ScTpViewItem( aViewOpt ) ); pRet->Put( SfxBoolItem( SID_SC_OPT_SYNCZOOM, rAppOpt.GetSynchronizeZoom() ) ); // TP_INPUT @@ -2011,7 +2011,7 @@ SfxItemSet* ScModule::CreateItemSet( sal_uInt16 nId ) rInpOpt.GetLegacyCellSelection() ) ); // RID_SC_TP_PRINT - pRet->Put( ScTpPrintItem( SID_SCPRINTOPTIONS, GetPrintOptions() ) ); + pRet->Put( ScTpPrintItem( GetPrintOptions() ) ); // TP_GRID SvxGridItem* pSvxGridItem = aViewOpt.CreateGridItem(); @@ -2030,7 +2030,7 @@ SfxItemSet* ScModule::CreateItemSet( sal_uInt16 nId ) rAppOpt.GetKeyBindingType() ) ); // TP_DEFAULTS - pRet->Put( ScTpDefaultsItem( SID_SCDEFAULTSOPTIONS, GetDefaultsOptions() ) ); + pRet->Put( ScTpDefaultsItem( GetDefaultsOptions() ) ); // TP_FORMULA ScFormulaOptions aOptions = GetFormulaOptions(); @@ -2040,7 +2040,7 @@ SfxItemSet* ScModule::CreateItemSet( sal_uInt16 nId ) aConfig.MergeDocumentSpecific( pDocSh->GetDocument().GetCalcConfig()); aOptions.SetCalcConfig( aConfig); } - pRet->Put( ScTpFormulaItem( SID_SCFORMULAOPTIONS, aOptions ) ); + pRet->Put( ScTpFormulaItem( aOptions ) ); } return pRet; } diff --git a/sc/source/ui/inc/acredlin.hxx b/sc/source/ui/inc/acredlin.hxx index f4bead09c04b..90525c51f356 100644 --- a/sc/source/ui/inc/acredlin.hxx +++ b/sc/source/ui/inc/acredlin.hxx @@ -119,15 +119,15 @@ protected: OUString* MakeTypeString(ScChangeActionType eType); - SvTreeListEntry* InsertChangeAction( + SvTreeListEntry* AppendChangeAction( const ScChangeAction* pScChangeAction,ScChangeActionState eState, SvTreeListEntry* pParent=nullptr,bool bDelMaster = false, - bool bDisabled = false,sal_uLong nPos = TREELIST_APPEND); + bool bDisabled = false); - SvTreeListEntry* InsertFilteredAction( + SvTreeListEntry* AppendFilteredAction( const ScChangeAction* pScChangeAction,ScChangeActionState eState, SvTreeListEntry* pParent = nullptr,bool bDelMaster = false, - bool bDisabled = false, sal_uLong nPos = TREELIST_APPEND); + bool bDisabled = false); SvTreeListEntry* InsertChangeActionContent(const ScChangeActionContent* pScChangeAction, SvTreeListEntry* pParent,sal_uLong nSpecial); diff --git a/sc/source/ui/miscdlgs/acredlin.cxx b/sc/source/ui/miscdlgs/acredlin.cxx index 36825bfdfb86..307d7527d706 100644 --- a/sc/source/ui/miscdlgs/acredlin.cxx +++ b/sc/source/ui/miscdlgs/acredlin.cxx @@ -361,9 +361,9 @@ bool ScAcceptChgDlg::IsValidAction(const ScChangeAction* pScChangeAction) return bFlag; } -SvTreeListEntry* ScAcceptChgDlg::InsertChangeAction( +SvTreeListEntry* ScAcceptChgDlg::AppendChangeAction( const ScChangeAction* pScChangeAction, ScChangeActionState /*eState*/, - SvTreeListEntry* pParent, bool bDelMaster,bool bDisabled, sal_uLong nPos) + SvTreeListEntry* pParent, bool bDelMaster,bool bDisabled) { ScChangeTrack* pChanges=pDoc->GetChangeTrack(); @@ -486,12 +486,12 @@ SvTreeListEntry* ScAcceptChgDlg::InsertChangeAction( if(!bFlag&& bUseColor&& pParent==nullptr) { pEntry = pTheView->InsertEntry( - aBuf.makeStringAndClear() ,pNewData, Color(COL_LIGHTBLUE), pParent, nPos); + aBuf.makeStringAndClear() ,pNewData, Color(COL_LIGHTBLUE), pParent, TREELIST_APPEND); } else if(bFlag&& bUseColor&& pParent!=nullptr) { pEntry = pTheView->InsertEntry( - aBuf.makeStringAndClear(), pNewData, Color(COL_GREEN), pParent, nPos); + aBuf.makeStringAndClear(), pNewData, Color(COL_GREEN), pParent, TREELIST_APPEND); SvTreeListEntry* pExpEntry=pParent; while(pExpEntry!=nullptr && !pTheView->IsExpanded(pExpEntry)) @@ -506,14 +506,14 @@ SvTreeListEntry* ScAcceptChgDlg::InsertChangeAction( else { pEntry = pTheView->InsertEntry( - aBuf.makeStringAndClear(), pNewData, pParent, nPos); + aBuf.makeStringAndClear(), pNewData, pParent, TREELIST_APPEND); } return pEntry; } -SvTreeListEntry* ScAcceptChgDlg::InsertFilteredAction( +SvTreeListEntry* ScAcceptChgDlg::AppendFilteredAction( const ScChangeAction* pScChangeAction, ScChangeActionState eState, - SvTreeListEntry* pParent, bool bDelMaster, bool bDisabled, sal_uLong nPos) + SvTreeListEntry* pParent, bool bDelMaster, bool bDisabled) { ScChangeTrack* pChanges=pDoc->GetChangeTrack(); @@ -626,7 +626,7 @@ SvTreeListEntry* ScAcceptChgDlg::InsertFilteredAction( if (pTheView->IsValidComment(aComment)) { aString+=aComment; - pEntry=pTheView->InsertEntry(aString,pNewData,pParent,nPos); + pEntry=pTheView->InsertEntry(aString,pNewData,pParent,TREELIST_APPEND); } else delete pNewData; @@ -784,9 +784,9 @@ void ScAcceptChgDlg::UpdateView() if(pScChangeAction->IsDialogRoot()) { if(pScChangeAction->IsDialogParent()) - pParent=InsertChangeAction(pScChangeAction,SC_CAS_VIRGIN); + pParent=AppendChangeAction(pScChangeAction,SC_CAS_VIRGIN); else - pParent=InsertFilteredAction(pScChangeAction,SC_CAS_VIRGIN); + pParent=AppendFilteredAction(pScChangeAction,SC_CAS_VIRGIN); } else pParent=nullptr; @@ -1217,7 +1217,7 @@ bool ScAcceptChgDlg::InsertAcceptedORejected(SvTreeListEntry* pParent) while(pScChangeAction!=nullptr) { if(pScChangeAction->GetState()==eState && - InsertFilteredAction(pScChangeAction,eState,pParent)!=nullptr) + AppendFilteredAction(pScChangeAction,eState,pParent)!=nullptr) bTheTestFlag=false; pScChangeAction=pScChangeAction->GetNext(); } @@ -1232,7 +1232,7 @@ bool ScAcceptChgDlg::InsertChildren(ScChangeActionMap* pActionMap,SvTreeListEntr for( itChangeAction = pActionMap->begin(); itChangeAction != pActionMap->end(); ++itChangeAction ) { - SvTreeListEntry* pEntry=InsertChangeAction( itChangeAction->second, SC_CAS_VIRGIN, pParent, false, true ); + SvTreeListEntry* pEntry=AppendChangeAction( itChangeAction->second, SC_CAS_VIRGIN, pParent, false, true ); if(pEntry!=nullptr) { @@ -1262,9 +1262,9 @@ bool ScAcceptChgDlg::InsertDeletedChildren(const ScChangeAction* pScChangeAction { if( pScChangeAction != itChangeAction->second ) - pEntry = InsertChangeAction( itChangeAction->second, SC_CAS_VIRGIN, pParent, false, true ); + pEntry = AppendChangeAction( itChangeAction->second, SC_CAS_VIRGIN, pParent, false, true ); else - pEntry = InsertChangeAction( itChangeAction->second, SC_CAS_VIRGIN, pParent, true, true ); + pEntry = AppendChangeAction( itChangeAction->second, SC_CAS_VIRGIN, pParent, true, true ); if(pEntry!=nullptr) { @@ -1414,9 +1414,9 @@ void ScAcceptChgDlg::AppendChanges(ScChangeTrack* pChanges,sal_uLong nStartActio if(pScChangeAction->IsDialogRoot()) { if(pScChangeAction->IsDialogParent()) - pParent=InsertChangeAction(pScChangeAction,SC_CAS_VIRGIN); + pParent=AppendChangeAction(pScChangeAction,SC_CAS_VIRGIN); else - pParent=InsertFilteredAction(pScChangeAction,SC_CAS_VIRGIN); + pParent=AppendFilteredAction(pScChangeAction,SC_CAS_VIRGIN); } else pParent=nullptr; diff --git a/sc/source/ui/optdlg/tpdefaults.cxx b/sc/source/ui/optdlg/tpdefaults.cxx index 4f9d10a7f1ad..bcc26d5aa5e9 100644 --- a/sc/source/ui/optdlg/tpdefaults.cxx +++ b/sc/source/ui/optdlg/tpdefaults.cxx @@ -59,7 +59,7 @@ bool ScTpDefaultsOptions::FillItemSet(SfxItemSet *rCoreSet) aOpt.SetInitTabCount( nTabCount ); aOpt.SetInitTabPrefix( aSheetPrefix ); - rCoreSet->Put( ScTpDefaultsItem( SID_SCDEFAULTSOPTIONS, aOpt ) ); + rCoreSet->Put( ScTpDefaultsItem( aOpt ) ); bRet = true; } return bRet; diff --git a/sc/source/ui/optdlg/tpformula.cxx b/sc/source/ui/optdlg/tpformula.cxx index 5d5a7859716e..3cb64e4244b8 100644 --- a/sc/source/ui/optdlg/tpformula.cxx +++ b/sc/source/ui/optdlg/tpformula.cxx @@ -292,7 +292,7 @@ bool ScTpFormulaOptions::FillItemSet(SfxItemSet* rCoreSet) aOpt.SetODFRecalcOptions(eODFRecalc); aOpt.SetWriteCalcConfig( maCurrentDocOptions.IsWriteCalcConfig()); - rCoreSet->Put( ScTpFormulaItem( SID_SCFORMULAOPTIONS, aOpt ) ); + rCoreSet->Put( ScTpFormulaItem( aOpt ) ); rCoreSet->Put( ScTpCalcItem( SID_SCDOCOPTIONS, maCurrentDocOptions ) ); bRet = true; diff --git a/sc/source/ui/optdlg/tpprint.cxx b/sc/source/ui/optdlg/tpprint.cxx index bb0b8830c6d9..0e9e574dcd85 100644 --- a/sc/source/ui/optdlg/tpprint.cxx +++ b/sc/source/ui/optdlg/tpprint.cxx @@ -109,7 +109,7 @@ bool ScTpPrintOptions::FillItemSet( SfxItemSet* rCoreAttrs ) aOpt.SetSkipEmpty( m_pSkipEmptyPagesCB->IsChecked() ); aOpt.SetAllSheets( !m_pSelectedSheetsCB->IsChecked() ); aOpt.SetForceBreaks( m_pForceBreaksCB->IsChecked() ); - rCoreAttrs->Put( ScTpPrintItem( SID_SCPRINTOPTIONS, aOpt ) ); + rCoreAttrs->Put( ScTpPrintItem( aOpt ) ); if ( bSelectedSheetsChanged ) { rCoreAttrs->Put( SfxBoolItem( SID_PRINT_SELECTEDSHEET, m_pSelectedSheetsCB->IsChecked() ) ); diff --git a/sc/source/ui/optdlg/tpview.cxx b/sc/source/ui/optdlg/tpview.cxx index 986f9d2dd06d..07a262c31340 100644 --- a/sc/source/ui/optdlg/tpview.cxx +++ b/sc/source/ui/optdlg/tpview.cxx @@ -154,7 +154,7 @@ bool ScTpContentOptions::FillItemSet( SfxItemSet* rCoreSet ) { NamedColor aNamedColor = pColorLB->GetSelectEntry(); pLocalOptions->SetGridColor(aNamedColor.first, aNamedColor.second); - rCoreSet->Put(ScTpViewItem(SID_SCVIEWOPTIONS, *pLocalOptions)); + rCoreSet->Put(ScTpViewItem(*pLocalOptions)); bRet = true; } if(pRangeFindCB->IsValueChangedFromSaved()) diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx index 6a4f61012ba9..3342deada578 100644 --- a/sc/source/ui/unoobj/cellsuno.cxx +++ b/sc/source/ui/unoobj/cellsuno.cxx @@ -5235,17 +5235,13 @@ void SAL_CALL ScCellRangeObj::setTableOperation( const table::CellRangeAddress& bool bError = false; ScTabOpParam aParam; aParam.aRefFormulaCell = ScRefAddress( (SCCOL)aFormulaRange.StartColumn, - (SCROW)aFormulaRange.StartRow, aFormulaRange.Sheet, - false, false, false ); + (SCROW)aFormulaRange.StartRow, aFormulaRange.Sheet ); aParam.aRefFormulaEnd = ScRefAddress( (SCCOL)aFormulaRange.EndColumn, - (SCROW)aFormulaRange.EndRow, aFormulaRange.Sheet, - false, false, false ); + (SCROW)aFormulaRange.EndRow, aFormulaRange.Sheet ); aParam.aRefRowCell = ScRefAddress( (SCCOL)aRowCell.Column, - (SCROW)aRowCell.Row, aRowCell.Sheet, - false, false, false ); + (SCROW)aRowCell.Row, aRowCell.Sheet ); aParam.aRefColCell = ScRefAddress( (SCCOL)aColumnCell.Column, - (SCROW)aColumnCell.Row, aColumnCell.Sheet, - false, false, false ); + (SCROW)aColumnCell.Row, aColumnCell.Sheet ); switch (nMode) { diff --git a/sc/source/ui/view/tabvwshc.cxx b/sc/source/ui/view/tabvwshc.cxx index b3f4c1a078e9..5ac562612ed3 100644 --- a/sc/source/ui/view/tabvwshc.cxx +++ b/sc/source/ui/view/tabvwshc.cxx @@ -308,8 +308,7 @@ VclPtr<SfxModelessDialog> ScTabViewShell::CreateRefDialog( ScViewData& rViewData = GetViewData(); ScRefAddress aCurPos ( rViewData.GetCurX(), rViewData.GetCurY(), - rViewData.GetTabNo(), - false, false, false ); + rViewData.GetTabNo()); pResult = VclPtr<ScTabOpDlg>::Create( pB, pCW, pParent, rViewData.GetDocument(), aCurPos ); } diff --git a/sd/source/core/undo/undomanager.cxx b/sd/source/core/undo/undomanager.cxx index a8144231cbb7..e4caf4df4cb7 100644 --- a/sd/source/core/undo/undomanager.cxx +++ b/sd/source/core/undo/undomanager.cxx @@ -24,8 +24,7 @@ using namespace sd; UndoManager::UndoManager() - : SdrUndoManager( 20/*nMaxUndoActionCount*/ ) - , mpLinkedUndoManager(nullptr) + : mpLinkedUndoManager(nullptr) , mpViewShell(nullptr) { } diff --git a/sd/source/ui/animations/CategoryListBox.cxx b/sd/source/ui/animations/CategoryListBox.cxx index f81b65ecec49..ca332ea788d5 100644 --- a/sd/source/ui/animations/CategoryListBox.cxx +++ b/sd/source/ui/animations/CategoryListBox.cxx @@ -69,7 +69,7 @@ void CategoryListBox::UserDraw( const UserDrawEvent& rUDEvt ) } else { - DrawEntry( rUDEvt, true, false ); + DrawEntry( rUDEvt ); } } diff --git a/sd/source/ui/dlg/diactrl.cxx b/sd/source/ui/dlg/diactrl.cxx index a0cb60c16a25..e8737c19e6e9 100644 --- a/sd/source/ui/dlg/diactrl.cxx +++ b/sd/source/ui/dlg/diactrl.cxx @@ -40,7 +40,7 @@ SFX_IMPL_TOOLBOX_CONTROL( SdTbxCtlDiaPages, SfxUInt16Item ) // SdPagesField SdPagesField::SdPagesField( vcl::Window* pParent, const uno::Reference< frame::XFrame >& rFrame ) : - SvxMetricField ( pParent, rFrame, WB_BORDER | WB_SPIN | WB_REPEAT ), + SvxMetricField ( pParent, rFrame ), m_xFrame ( rFrame ) { OUString aStr( SD_RESSTR( STR_SLIDE_PLURAL ) ); diff --git a/sfx2/source/doc/graphhelp.cxx b/sfx2/source/doc/graphhelp.cxx index 2f7482b0638b..419dc7865612 100644 --- a/sfx2/source/doc/graphhelp.cxx +++ b/sfx2/source/doc/graphhelp.cxx @@ -189,7 +189,7 @@ bool GraphicHelper::getThumbnailFormatFromGDI_Impl(GDIMetaFile* pMetaFile, const BitmapEx aResultBitmap; - bResult = pMetaFile->CreateThumbnail(aResultBitmap, 256, BmpConversion::N8BitColors, BmpScaleFlag::Default); + bResult = pMetaFile->CreateThumbnail(aResultBitmap, BmpConversion::N8BitColors, BmpScaleFlag::Default); if (!bResult || aResultBitmap.IsEmpty()) return false; diff --git a/svx/inc/sxmkitm.hxx b/svx/inc/sxmkitm.hxx index bf695a4ff83f..cc52193990cc 100644 --- a/svx/inc/sxmkitm.hxx +++ b/svx/inc/sxmkitm.hxx @@ -29,7 +29,7 @@ enum SdrMeasureKind {SDRMEASURE_STD,SDRMEASURE_RADIUS}; // n.i. class SdrMeasureKindItem: public SfxEnumItem<SdrMeasureKind> { public: - SdrMeasureKindItem(SdrMeasureKind eKind=SDRMEASURE_STD): SfxEnumItem(SDRATTR_MEASUREKIND, eKind) {} + SdrMeasureKindItem() : SfxEnumItem(SDRATTR_MEASUREKIND, SDRMEASURE_STD) {} SdrMeasureKindItem(SvStream& rIn) : SfxEnumItem(SDRATTR_MEASUREKIND,rIn) {} virtual SfxPoolItem* Clone(SfxItemPool* pPool=nullptr) const override; virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nVer) const override; diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx index e13d2fe6dc44..98dc5efd828d 100644 --- a/svx/source/dialog/_contdlg.cxx +++ b/svx/source/dialog/_contdlg.cxx @@ -48,8 +48,8 @@ SFX_IMPL_FLOATINGWINDOW_WITHID( SvxContourDlgChildWindow, SID_CONTOUR_DLG ); -SvxContourDlgItem::SvxContourDlgItem( sal_uInt16 _nId, SvxSuperContourDlg& rContourDlg, SfxBindings& rBindings ) : - SfxControllerItem ( _nId, rBindings ), +SvxContourDlgItem::SvxContourDlgItem( SvxSuperContourDlg& rContourDlg, SfxBindings& rBindings ) : + SfxControllerItem ( SID_CONTOUR_EXEC, rBindings ), rDlg ( rContourDlg ) { } @@ -217,7 +217,7 @@ SvxSuperContourDlg::SvxSuperContourDlg(SfxBindings *_pBindings, SfxChildWindow * aCreateIdle ( "SvxSuperContourDlg CreateIdle" ), pUpdateEditingObject( nullptr ), pCheckObj ( nullptr ), - aContourItem ( SID_CONTOUR_EXEC, *this, *_pBindings ), + aContourItem ( *this, *_pBindings ), nGrfChanged ( 0UL ), bExecState ( false ), bUpdateGraphicLinked( false ), diff --git a/svx/source/dialog/contimp.hxx b/svx/source/dialog/contimp.hxx index 77d24bbf7a01..3291d066ec71 100644 --- a/svx/source/dialog/contimp.hxx +++ b/svx/source/dialog/contimp.hxx @@ -39,7 +39,7 @@ protected: public: - SvxContourDlgItem( sal_uInt16 nId, SvxSuperContourDlg& rDlg, SfxBindings& rBindings ); + SvxContourDlgItem( SvxSuperContourDlg& rDlg, SfxBindings& rBindings ); }; class SvxSuperContourDlg : public SvxContourDlg diff --git a/svx/source/gallery2/galbrws1.cxx b/svx/source/gallery2/galbrws1.cxx index 04c76bc2fbbd..41b13b9402a2 100644 --- a/svx/source/gallery2/galbrws1.cxx +++ b/svx/source/gallery2/galbrws1.cxx @@ -281,7 +281,7 @@ void GalleryBrowser1::ImplGalleryThemeProperties( const OUString & rThemeName, b } } -void GalleryBrowser1::ImplEndGalleryThemeProperties(Dialog* /*pDialog*/, bool bCreateNew) +void GalleryBrowser1::ImplEndGalleryThemeProperties(bool bCreateNew) { long nRet = mpThemePropertiesDialog->GetResult(); @@ -325,12 +325,12 @@ void GalleryBrowser1::ImplEndGalleryThemeProperties(Dialog* /*pDialog*/, bool bC IMPL_LINK( GalleryBrowser1, EndNewThemePropertiesDlgHdl, Dialog&, /*rDialog*/, void ) { - ImplEndGalleryThemeProperties(nullptr, true); + ImplEndGalleryThemeProperties(true); } IMPL_LINK( GalleryBrowser1, EndThemePropertiesDlgHdl, Dialog&, /*rDialog*/, void ) { - ImplEndGalleryThemeProperties(nullptr, false); + ImplEndGalleryThemeProperties(false); } IMPL_LINK( GalleryBrowser1, DestroyThemePropertiesDlgHdl, void*, /*p*/, void ) diff --git a/svx/source/gallery2/galbrws1.hxx b/svx/source/gallery2/galbrws1.hxx index 294623ce6e9c..38f1abad83d5 100644 --- a/svx/source/gallery2/galbrws1.hxx +++ b/svx/source/gallery2/galbrws1.hxx @@ -96,7 +96,7 @@ private: void ImplGetExecuteVector(::std::vector< sal_uInt16 >& o_aExec); void ImplExecute( sal_uInt16 nId ); void ImplGalleryThemeProperties( const OUString & rThemeName, bool bCreateNew ); - void ImplEndGalleryThemeProperties(Dialog* pDialog, bool bCreateNew); + void ImplEndGalleryThemeProperties(bool bCreateNew); // Control virtual void Resize() override; diff --git a/svx/source/svdraw/sdrundomanager.cxx b/svx/source/svdraw/sdrundomanager.cxx index 4d020c8f0779..cb5ecdc9bca3 100644 --- a/svx/source/svdraw/sdrundomanager.cxx +++ b/svx/source/svdraw/sdrundomanager.cxx @@ -20,8 +20,8 @@ #include <svx/sdrundomanager.hxx> -SdrUndoManager::SdrUndoManager(sal_uInt16 nMaxUndoActionCount) - : EditUndoManager(nMaxUndoActionCount) +SdrUndoManager::SdrUndoManager() + : EditUndoManager(20/*nMaxUndoActionCount*/) , maEndTextEditHdl() , mpLastUndoActionBeforeTextEdit(nullptr) , mbEndTextEditTriggeredFromUndo(false) diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx index dcef2d237b0a..1819660f982f 100644 --- a/svx/source/svdraw/svdedtv1.cxx +++ b/svx/source/svdraw/svdedtv1.cxx @@ -241,7 +241,6 @@ void SdrEditView::ResizeMarkedObj(const Point& rRef, const Fraction& xFact, cons void SdrEditView::ResizeMultMarkedObj(const Point& rRef, const Fraction& xFact, const Fraction& yFact, - const bool bCopy, const bool bWdh, const bool bHgt) { @@ -250,14 +249,9 @@ void SdrEditView::ResizeMultMarkedObj(const Point& rRef, { OUString aStr; ImpTakeDescriptionStr(STR_EditResize,aStr); - if (bCopy) - aStr+=ImpGetResStr(STR_EditWithCopy); BegUndo(aStr); } - if (bCopy) - CopyMarkedObj(); - const size_t nMarkCount=GetMarkedObjectCount(); for (size_t nm=0; nm<nMarkCount; ++nm) { @@ -1613,7 +1607,7 @@ void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr) GetSdrPageView()->PagePosToLogic(aRef); } - ResizeMultMarkedObj(aRef, aWdt, aHgt, false, bChgWdh, bChgHgt); + ResizeMultMarkedObj(aRef, aWdt, aHgt, bChgWdh, bChgHgt); } // rotate diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx index 436c5740094e..54bfa83f492e 100644 --- a/svx/source/svdraw/svdedxv.cxx +++ b/svx/source/svdraw/svdedxv.cxx @@ -2382,7 +2382,7 @@ void SdrObjEditView::ApplyFormatPaintBrush( SfxItemSet& rFormatSet, bool bNoChar { auto pTable = static_cast<sdr::table::SdrTableObj*>(pObj); if (pTable->getActiveCell().is()) { - pTable->SetMergedItemSetAndBroadcastOnActiveCell(rFormatSet, false/*bClearAllItems*/); + pTable->SetMergedItemSetAndBroadcastOnActiveCell(rFormatSet); } } } diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx index a38d354b0289..7aea17aebfdf 100644 --- a/svx/source/table/svdotable.cxx +++ b/svx/source/table/svdotable.cxx @@ -1171,9 +1171,9 @@ const SfxItemSet& SdrTableObj::GetActiveCellItemSet() const return getActiveCell()->GetItemSet(); } -void SdrTableObj::SetMergedItemSetAndBroadcastOnActiveCell(const SfxItemSet& rSet, bool bClearAllItems) +void SdrTableObj::SetMergedItemSetAndBroadcastOnActiveCell(const SfxItemSet& rSet) { - return getActiveCell()->SetMergedItemSetAndBroadcast(rSet, bClearAllItems); + return getActiveCell()->SetMergedItemSetAndBroadcast(rSet, false/*bClearAllItems*/); } void SdrTableObj::setTableStyle( const Reference< XIndexAccess >& xTableStyle ) diff --git a/svx/source/tbxctrls/itemwin.cxx b/svx/source/tbxctrls/itemwin.cxx index fbbe17014c62..92f845b7ac48 100644 --- a/svx/source/tbxctrls/itemwin.cxx +++ b/svx/source/tbxctrls/itemwin.cxx @@ -242,8 +242,8 @@ void SvxLineBox::FillControl() } SvxMetricField::SvxMetricField( - vcl::Window* pParent, const Reference< XFrame >& rFrame, WinBits nBits ) - : MetricField(pParent, nBits) + vcl::Window* pParent, const Reference< XFrame >& rFrame ) + : MetricField(pParent, WB_BORDER | WB_SPIN | WB_REPEAT) , aCurTxt() , ePoolUnit(MapUnit::MapCM) , mxFrame(rFrame) diff --git a/sw/inc/IDocumentContentOperations.hxx b/sw/inc/IDocumentContentOperations.hxx index 51699a014c25..be4c084e78f9 100644 --- a/sw/inc/IDocumentContentOperations.hxx +++ b/sw/inc/IDocumentContentOperations.hxx @@ -137,7 +137,7 @@ public: /** Move a range. */ - virtual bool MoveAndJoin(SwPaM&, SwPosition&, SwMoveFlags) = 0; + virtual bool MoveAndJoin(SwPaM&, SwPosition&) = 0; /** Overwrite string in an existing text node. */ diff --git a/sw/inc/SwUndoField.hxx b/sw/inc/SwUndoField.hxx index 50825408dd67..d652e748416c 100644 --- a/sw/inc/SwUndoField.hxx +++ b/sw/inc/SwUndoField.hxx @@ -37,7 +37,7 @@ protected: SwPosition GetPosition(); public: - SwUndoField(const SwPosition & rPos, SwUndoId nId = SwUndoId::FIELD ); + SwUndoField(const SwPosition & rPos ); virtual ~SwUndoField() override; }; diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx index 2e4fe3c54cac..a434ad938b0a 100644 --- a/sw/source/core/doc/DocumentContentOperationsManager.cxx +++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx @@ -2322,14 +2322,14 @@ bool DocumentContentOperationsManager::MoveNodeRange( SwNodeRange& rRange, SwNod return true; } -bool DocumentContentOperationsManager::MoveAndJoin( SwPaM& rPaM, SwPosition& rPos, SwMoveFlags eMvFlags ) +bool DocumentContentOperationsManager::MoveAndJoin( SwPaM& rPaM, SwPosition& rPos ) { SwNodeIndex aIdx( rPaM.Start()->nNode ); bool bJoinText = aIdx.GetNode().IsTextNode(); bool bOneNode = rPaM.GetPoint()->nNode == rPaM.GetMark()->nNode; aIdx--; // in front of the move area! - bool bRet = MoveRange( rPaM, rPos, eMvFlags ); + bool bRet = MoveRange( rPaM, rPos, SwMoveFlags::DEFAULT ); if( bRet && !bOneNode ) { if( bJoinText ) diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx index a8fc41eda758..314e4c84ef27 100644 --- a/sw/source/core/doc/docredln.cxx +++ b/sw/source/core/doc/docredln.cxx @@ -1263,7 +1263,7 @@ void SwRangeRedline::MoveToSection() SwNodeIndex aNdIdx( *pTextNd ); SwPosition aPos( aNdIdx, SwIndex( pTextNd )); if( pCSttNd && pCEndNd ) - pDoc->getIDocumentContentOperations().MoveAndJoin( aPam, aPos, SwMoveFlags::DEFAULT ); + pDoc->getIDocumentContentOperations().MoveAndJoin( aPam, aPos ); else { if( pCSttNd && !pCEndNd ) diff --git a/sw/source/core/inc/DocumentContentOperationsManager.hxx b/sw/source/core/inc/DocumentContentOperationsManager.hxx index 1319bf4ac214..c1ac6dffffe3 100644 --- a/sw/source/core/inc/DocumentContentOperationsManager.hxx +++ b/sw/source/core/inc/DocumentContentOperationsManager.hxx @@ -54,7 +54,7 @@ public: bool MoveNodeRange(SwNodeRange&, SwNodeIndex&, SwMoveFlags) override; - bool MoveAndJoin(SwPaM&, SwPosition&, SwMoveFlags) override; + bool MoveAndJoin(SwPaM&, SwPosition&) override; bool Overwrite(const SwPaM &rRg, const OUString& rStr) override; diff --git a/sw/source/core/undo/SwUndoField.cxx b/sw/source/core/undo/SwUndoField.cxx index 929c467d48f4..3b8e50d86dea 100644 --- a/sw/source/core/undo/SwUndoField.cxx +++ b/sw/source/core/undo/SwUndoField.cxx @@ -32,8 +32,8 @@ using namespace ::com::sun::star::uno; -SwUndoField::SwUndoField(const SwPosition & rPos, SwUndoId _nId ) - : SwUndo(_nId, rPos.GetDoc()) +SwUndoField::SwUndoField(const SwPosition & rPos ) + : SwUndo(SwUndoId::FIELD, rPos.GetDoc()) { nNodeIndex = rPos.nNode.GetIndex(); nOffset = rPos.nContent.GetIndex(); @@ -58,7 +58,7 @@ SwUndoFieldFromDoc::SwUndoFieldFromDoc(const SwPosition & rPos, const SwField & rOldField, const SwField & rNewField, SwMsgPoolItem * _pHint, bool _bUpdate) - : SwUndoField(rPos,SwUndoId::FIELD) + : SwUndoField(rPos) , pOldField(rOldField.CopyField()) , pNewField(rNewField.CopyField()) , pHint(_pHint) diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx index 83bfd70f4e43..10d900654212 100644 --- a/sw/source/uibase/dochdl/swdtflvr.cxx +++ b/sw/source/uibase/dochdl/swdtflvr.cxx @@ -183,13 +183,11 @@ public: class SwTrnsfrActionAndUndo { SwWrtShell *pSh; - SwUndoId eUndoId; public: - SwTrnsfrActionAndUndo( SwWrtShell *pS, SwUndoId nId, - bool bDelSel = false) - : pSh( pS ), eUndoId( nId ) + SwTrnsfrActionAndUndo( SwWrtShell *pS, bool bDelSel = false) + : pSh( pS ) { - pSh->StartUndo( eUndoId ); + pSh->StartUndo( SwUndoId::PASTE_CLIPBOARD ); if( bDelSel ) pSh->DelRight(); pSh->StartAllAction(); @@ -1250,7 +1248,7 @@ bool SwTransferable::PasteData( TransferableDataHelper& rData, if( bDelSel ) // #i34830# - pAction.reset(new SwTrnsfrActionAndUndo( &rSh, SwUndoId::PASTE_CLIPBOARD, true )); + pAction.reset(new SwTrnsfrActionAndUndo( &rSh, true )); } SwTransferable *pTrans=nullptr, *pTunneledTrans=GetSwTransferable( rData ); @@ -1295,7 +1293,7 @@ bool SwTransferable::PasteData( TransferableDataHelper& rData, { if( !pAction ) { - pAction.reset(new SwTrnsfrActionAndUndo( &rSh, SwUndoId::PASTE_CLIPBOARD)); + pAction.reset(new SwTrnsfrActionAndUndo( &rSh )); } // in Drag&Drop MessageBoxes must not be showed @@ -3247,7 +3245,7 @@ bool SwTransferable::PrivatePaste( SwWrtShell& rShell ) const int nSelection = rShell.GetSelectionType(); - SwTrnsfrActionAndUndo aAction( &rShell, SwUndoId::PASTE_CLIPBOARD); + SwTrnsfrActionAndUndo aAction( &rShell ); bool bKillPaMs = false; diff --git a/vcl/source/control/listbox.cxx b/vcl/source/control/listbox.cxx index c05c63b8dea2..4e3d9dc454b1 100644 --- a/vcl/source/control/listbox.cxx +++ b/vcl/source/control/listbox.cxx @@ -1339,12 +1339,12 @@ void ListBox::UserDraw( const UserDrawEvent& ) { } -void ListBox::DrawEntry(const UserDrawEvent& rEvt, bool bDrawImage, bool bDrawTextAtImagePos) +void ListBox::DrawEntry(const UserDrawEvent& rEvt) { if (rEvt.GetWindow() == mpImplLB->GetMainWindow()) - mpImplLB->GetMainWindow()->DrawEntry(*rEvt.GetRenderContext(), rEvt.GetItemId(), bDrawImage, true/*bDrawText*/, bDrawTextAtImagePos ); + mpImplLB->GetMainWindow()->DrawEntry(*rEvt.GetRenderContext(), rEvt.GetItemId(), true/*bDrawImage*/, true/*bDrawText*/, false/*bDrawTextAtImagePos*/ ); else if (rEvt.GetWindow() == mpImplWin) - mpImplWin->DrawEntry(*rEvt.GetRenderContext(), bDrawImage, bDrawTextAtImagePos); + mpImplWin->DrawEntry(*rEvt.GetRenderContext(), true/*bDrawImage*/, false/*bDrawTextAtImagePos*/); } void ListBox::EnableUserDraw( bool bUserDraw ) diff --git a/vcl/source/filter/FilterConfigItem.cxx b/vcl/source/filter/FilterConfigItem.cxx index fd66345dfb1f..fc8ed69d9bae 100644 --- a/vcl/source/filter/FilterConfigItem.cxx +++ b/vcl/source/filter/FilterConfigItem.cxx @@ -189,26 +189,22 @@ void FilterConfigItem::WriteModifiedConfig() } } -bool FilterConfigItem::ImplGetPropertyValue( Any& rAny, const Reference< XPropertySet >& rXPropSet, const OUString& rString, bool bTestPropertyAvailability ) +bool FilterConfigItem::ImplGetPropertyValue( Any& rAny, const Reference< XPropertySet >& rXPropSet, const OUString& rString ) { bool bRetValue = true; if ( rXPropSet.is() ) { - if ( bTestPropertyAvailability ) + bRetValue = false; + try + { + Reference< XPropertySetInfo > + aXPropSetInfo( rXPropSet->getPropertySetInfo() ); + if ( aXPropSetInfo.is() ) + bRetValue = aXPropSetInfo->hasPropertyByName( rString ); + } + catch( css::uno::Exception& ) { - bRetValue = false; - try - { - Reference< XPropertySetInfo > - aXPropSetInfo( rXPropSet->getPropertySetInfo() ); - if ( aXPropSetInfo.is() ) - bRetValue = aXPropSetInfo->hasPropertyByName( rString ); - } - catch( css::uno::Exception& ) - { - - } } if ( bRetValue ) { @@ -281,7 +277,7 @@ bool FilterConfigItem::ReadBool( const OUString& rKey, bool bDefault ) { pPropVal->Value >>= bRetValue; } - else if ( ImplGetPropertyValue( aAny, xPropSet, rKey, true ) ) + else if ( ImplGetPropertyValue( aAny, xPropSet, rKey ) ) { aAny >>= bRetValue; } @@ -301,7 +297,7 @@ sal_Int32 FilterConfigItem::ReadInt32( const OUString& rKey, sal_Int32 nDefault { pPropVal->Value >>= nRetValue; } - else if ( ImplGetPropertyValue( aAny, xPropSet, rKey, true ) ) + else if ( ImplGetPropertyValue( aAny, xPropSet, rKey ) ) { aAny >>= nRetValue; } @@ -321,7 +317,7 @@ OUString FilterConfigItem::ReadString( const OUString& rKey, const OUString& rDe { pPropVal->Value >>= aRetValue; } - else if ( ImplGetPropertyValue( aAny, xPropSet, rKey, true ) ) + else if ( ImplGetPropertyValue( aAny, xPropSet, rKey ) ) { aAny >>= aRetValue; } @@ -342,7 +338,7 @@ void FilterConfigItem::WriteBool( const OUString& rKey, bool bNewValue ) if ( xPropSet.is() ) { Any aAny; - if ( ImplGetPropertyValue( aAny, xPropSet, rKey, true ) ) + if ( ImplGetPropertyValue( aAny, xPropSet, rKey ) ) { bool bOldValue(true); if ( aAny >>= bOldValue ) @@ -375,7 +371,7 @@ void FilterConfigItem::WriteInt32( const OUString& rKey, sal_Int32 nNewValue ) { Any aAny; - if ( ImplGetPropertyValue( aAny, xPropSet, rKey, true ) ) + if ( ImplGetPropertyValue( aAny, xPropSet, rKey ) ) { sal_Int32 nOldValue = 0; if ( aAny >>= nOldValue ) diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx index 3c673b91e7c5..e8d86b8b018e 100644 --- a/vcl/source/gdi/gdimtf.cxx +++ b/vcl/source/gdi/gdimtf.cxx @@ -2811,7 +2811,7 @@ SvStream& GDIMetaFile::Write( SvStream& rOStm ) return rOStm; } -bool GDIMetaFile::CreateThumbnail(BitmapEx& rBitmapEx, sal_uInt32 nMaximumExtent, BmpConversion eColorConversion, BmpScaleFlag nScaleFlag) const +bool GDIMetaFile::CreateThumbnail(BitmapEx& rBitmapEx, BmpConversion eColorConversion, BmpScaleFlag nScaleFlag) const { // initialization seems to be complicated but is used to avoid rounding errors ScopedVclPtrInstance< VirtualDevice > aVDev; @@ -2820,6 +2820,7 @@ bool GDIMetaFile::CreateThumbnail(BitmapEx& rBitmapEx, sal_uInt32 nMaximumExtent const Point aBRPix( aVDev->LogicToPixel( Point( GetPrefSize().Width() - 1, GetPrefSize().Height() - 1 ), GetPrefMapMode() ) ); Size aDrawSize( aVDev->LogicToPixel( GetPrefSize(), GetPrefMapMode() ) ); Size aSizePix( labs( aBRPix.X() - aTLPix.X() ) + 1, labs( aBRPix.Y() - aTLPix.Y() ) + 1 ); + sal_uInt32 nMaximumExtent = 256; if (!rBitmapEx.IsEmpty()) rBitmapEx.SetEmpty(); diff --git a/vcl/source/image/ImageTree.cxx b/vcl/source/image/ImageTree.cxx index 0c9dcac957a6..109a955922f3 100644 --- a/vcl/source/image/ImageTree.cxx +++ b/vcl/source/image/ImageTree.cxx @@ -37,10 +37,9 @@ bool ImageTree::loadImage(OUString const & rName, OUString const & rStyle, return mpImplImageTree->loadImage(rName, rStyle, rBitmap, bLocalized, eFlags); } -bool ImageTree::loadDefaultImage(OUString const & rStyle, BitmapEx& rBitmap, - const ImageLoadFlags eFlags) +bool ImageTree::loadDefaultImage(OUString const & rStyle, BitmapEx& rBitmap) { - return mpImplImageTree->loadDefaultImage(rStyle, rBitmap, eFlags); + return mpImplImageTree->loadDefaultImage(rStyle, rBitmap, ImageLoadFlags::NONE); } css::uno::Reference<css::container::XNameAccess> ImageTree::getNameAccess() diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx index d5a61d4e42f0..54cbb04dcb7b 100644 --- a/vcl/source/window/layout.cxx +++ b/vcl/source/window/layout.cxx @@ -2527,8 +2527,8 @@ void MessageDialog::set_secondary_text(const OUString &rSecondaryString) } } -VclVPaned::VclVPaned(vcl::Window *pParent, WinBits nStyle) - : VclContainer(pParent, nStyle) +VclVPaned::VclVPaned(vcl::Window *pParent) + : VclContainer(pParent, WB_HIDE | WB_CLIPCHILDREN) , m_pSplitter(VclPtr<Splitter>::Create(this, WB_VSCROLL)) , m_nPosition(-1) { diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx index 866c0f03ca6c..6f24bfb72229 100644 --- a/vcl/source/window/menu.cxx +++ b/vcl/source/window/menu.cxx @@ -195,7 +195,7 @@ void Menu::dispose() mpLayoutData = nullptr; // Native-support: destroy SalMenu - ImplSetSalMenu( nullptr ); + ImplClearSalMenu(); pStartedFrom.clear(); pWindow.clear(); @@ -2353,11 +2353,11 @@ OUString Menu::GetAccessibleName( sal_uInt16 nItemId ) const return OUString(); } -void Menu::ImplSetSalMenu( SalMenu *pSalMenu ) +void Menu::ImplClearSalMenu() { if( mpSalMenu ) ImplGetSVData()->mpDefInst->DestroyMenu( mpSalMenu ); - mpSalMenu = pSalMenu; + mpSalMenu = nullptr; } bool Menu::GetSystemMenuData( SystemMenuData* pData ) const diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx index 883fa98c3c61..867a81529ec4 100644 --- a/vcl/source/window/splitwin.cxx +++ b/vcl/source/window/splitwin.cxx @@ -1607,7 +1607,7 @@ void SplitWindow::ImplSplitMousePos( Point& rMousePos ) } } -void SplitWindow::ImplGetButtonRect( tools::Rectangle& rRect, long nEx, bool bTest ) const +void SplitWindow::ImplGetButtonRect( tools::Rectangle& rRect, bool bTest ) const { long nSplitSize = mpMainSet->mnSplitSize-1; if (mbFadeOut || mbFadeIn) @@ -1623,6 +1623,7 @@ void SplitWindow::ImplGetButtonRect( tools::Rectangle& rRect, long nEx, bool bTe nCenterEx += ((mnDX-mnLeftBorder-mnRightBorder)-nButtonSize)/2; else nCenterEx += ((mnDY-mnTopBorder-mnBottomBorder)-nButtonSize)/2; + long nEx = 0; if ( nCenterEx > 0 ) nEx += nCenterEx; @@ -1680,7 +1681,7 @@ void SplitWindow::ImplGetFadeInRect( tools::Rectangle& rRect, bool bTest ) const tools::Rectangle aRect; if ( mbFadeIn ) - ImplGetButtonRect( aRect, 0, bTest ); + ImplGetButtonRect( aRect, bTest ); rRect = aRect; } @@ -1690,7 +1691,7 @@ void SplitWindow::ImplGetFadeOutRect( tools::Rectangle& rRect, bool ) const tools::Rectangle aRect; if ( mbFadeOut ) - ImplGetButtonRect( aRect, 0, false ); + ImplGetButtonRect( aRect, false ); rRect = aRect; } |