loplugin:constantparam

Change-Id: I1996319e5b664dff95f7a9b2346aea6092d333ec
Reviewed-on: https://gerrit.libreoffice.org/36070
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin 2017-04-04 11:57:23 +02:00
parent cedbc4031f
commit 3d6c84f2d9
73 changed files with 181 additions and 224 deletions

View File

@ -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 );

View File

@ -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

View File

@ -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);

View File

@ -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;

View File

@ -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 );

View File

@ -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();

View File

@ -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;

View File

@ -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;

View File

@ -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; }

View File

@ -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

View File

@ -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);

View File

@ -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;

View File

@ -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() );

View File

@ -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),

View File

@ -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

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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);

View File

@ -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 );

View File

@ -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 )
{
}

View File

@ -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 )
{
}

View File

@ -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 )
{
}

View File

@ -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 )
{
}

View File

@ -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 );

View File

@ -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.

View File

@ -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();

View File

@ -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:

View File

@ -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& )
{

View File

@ -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 )

View File

@ -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 );
}

View File

@ -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 );

View File

@ -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 )

View File

@ -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;
}

View File

@ -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 )

View File

@ -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;
}

View File

@ -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);

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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() ) );

View File

@ -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())

View File

@ -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)
{

View File

@ -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 );
}

View File

@ -24,8 +24,7 @@
using namespace sd;
UndoManager::UndoManager()
: SdrUndoManager( 20/*nMaxUndoActionCount*/ )
, mpLinkedUndoManager(nullptr)
: mpLinkedUndoManager(nullptr)
, mpViewShell(nullptr)
{
}

View File

@ -69,7 +69,7 @@ void CategoryListBox::UserDraw( const UserDrawEvent& rUDEvt )
}
else
{
DrawEntry( rUDEvt, true, false );
DrawEntry( rUDEvt );
}
}

View File

@ -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 ) );

View File

@ -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;

View File

@ -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;

View File

@ -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 ),

View File

@ -39,7 +39,7 @@ protected:
public:
SvxContourDlgItem( sal_uInt16 nId, SvxSuperContourDlg& rDlg, SfxBindings& rBindings );
SvxContourDlgItem( SvxSuperContourDlg& rDlg, SfxBindings& rBindings );
};
class SvxSuperContourDlg : public SvxContourDlg

View File

@ -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 )

View File

@ -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;

View File

@ -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)

View File

@ -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

View File

@ -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);
}
}
}

View File

@ -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 )

View File

@ -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)

View File

@ -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.
*/

View File

@ -37,7 +37,7 @@ protected:
SwPosition GetPosition();
public:
SwUndoField(const SwPosition & rPos, SwUndoId nId = SwUndoId::FIELD );
SwUndoField(const SwPosition & rPos );
virtual ~SwUndoField() override;
};

View File

@ -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 )

View File

@ -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 )

View File

@ -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;

View File

@ -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)

View File

@ -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;

View File

@ -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 )

View File

@ -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 )

View File

@ -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();

View File

@ -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()

View File

@ -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)
{

View File

@ -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

View File

@ -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;
}