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: public:
SvxMetricField( vcl::Window* pParent, SvxMetricField( vcl::Window* pParent,
const css::uno::Reference< css::frame::XFrame >& rFrame, const css::uno::Reference< css::frame::XFrame >& rFrame );
WinBits nBits = WB_BORDER | WB_SPIN | WB_REPEAT );
void Update( const XLineWidthItem* pItem ); void Update( const XLineWidthItem* pItem );
void SetCoreUnit( MapUnit eUnit ); void SetCoreUnit( MapUnit eUnit );

View File

@ -39,7 +39,7 @@ protected:
bool isTextEditActive() const; bool isTextEditActive() const;
public: public:
SdrUndoManager(sal_uInt16 nMaxUndoActionCount = 20); SdrUndoManager();
virtual ~SdrUndoManager() override; virtual ~SdrUndoManager() override;
/// react depending on edit mode and if no more undo is possible /// 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 SetMarkedObjRect(const tools::Rectangle& rRect);
void MoveMarkedObj(const Size& rSiz, bool bCopy=false); void MoveMarkedObj(const Size& rSiz, bool bCopy=false);
void ResizeMarkedObj(const Point& rRef, const Fraction& xFact, const Fraction& yFact, 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; long GetMarkedObjRotate() const;
void RotateMarkedObj(const Point& rRef, long nAngle, bool bCopy=false); void RotateMarkedObj(const Point& rRef, long nAngle, bool bCopy=false);
void MirrorMarkedObj(const Point& rRef1, const Point& rRef2, 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 ); void getCellBounds( const sdr::table::CellPos& rPos, ::tools::Rectangle& rCellRect );
const SfxItemSet& GetActiveCellItemSet() const; 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 ); void setTableStyle( const css::uno::Reference< css::container::XIndexAccess >& xAutoFormatStyle );
const css::uno::Reference< css::container::XIndexAccess >& getTableStyle() const; 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, static bool ImplGetPropertyValue( css::uno::Any& rAny,
const css::uno::Reference< css::beans::XPropertySet >& rXPropSet, const css::uno::Reference< css::beans::XPropertySet >& rXPropSet,
const OUString& rPropName, const OUString& rPropName );
bool bTestPropertyAvailability );
void ImpInitTree( const OUString& rTree ); void ImpInitTree( const OUString& rTree );

View File

@ -61,8 +61,7 @@ public:
bool loadDefaultImage( bool loadDefaultImage(
OUString const & style, OUString const & style,
BitmapEx& bitmap, BitmapEx& bitmap);
const ImageLoadFlags eFlags = ImageLoadFlags::NONE);
VCL_DLLPUBLIC css::uno::Reference<css::container::XNameAccess> getNameAccess(); 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& ReadGDIMetaFile( SvStream& rIStm, GDIMetaFile& rGDIMetaFile );
friend VCL_DLLPUBLIC SvStream& WriteGDIMetaFile( SvStream& rOStm, const 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, bool CreateThumbnail(BitmapEx& rBitmapEx,
sal_uInt32 nMaximumExtent = 256,
BmpConversion nColorConversion = BmpConversion::N24Bit, BmpConversion nColorConversion = BmpConversion::N24Bit,
BmpScaleFlag nScaleFlag = BmpScaleFlag::BestQuality) const; BmpScaleFlag nScaleFlag = BmpScaleFlag::BestQuality) const;

View File

@ -376,7 +376,7 @@ private:
DECL_LINK(SplitHdl, Splitter*, void); DECL_LINK(SplitHdl, Splitter*, void);
void arrange(const Size& rAllocation, long nFirstHeight, long nSecondHeight); void arrange(const Size& rAllocation, long nFirstHeight, long nSecondHeight);
public: public:
VclVPaned(vcl::Window *pParent, WinBits nStyle = WB_HIDE | WB_CLIPCHILDREN); VclVPaned(vcl::Window *pParent);
virtual ~VclVPaned() override { disposeOnce(); } virtual ~VclVPaned() override { disposeOnce(); }
virtual void dispose() override; virtual void dispose() override;
virtual Size calculateRequisition() const override; virtual Size calculateRequisition() const override;

View File

@ -218,7 +218,7 @@ public:
void EnableUserDraw( bool bUserDraw ); 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; } void SetSelectHdl( const Link<ListBox&,void>& rLink ) { maSelectHdl = rLink; }
const Link<ListBox&,void>& GetSelectHdl() const { return maSelectHdl; } const Link<ListBox&,void>& GetSelectHdl() const { return maSelectHdl; }

View File

@ -186,7 +186,7 @@ protected:
SAL_DLLPRIVATE void ImplFillLayoutData() const; SAL_DLLPRIVATE void ImplFillLayoutData() const;
SAL_DLLPRIVATE SalMenu* ImplGetSalMenu() { return mpSalMenu; } SAL_DLLPRIVATE SalMenu* ImplGetSalMenu() { return mpSalMenu; }
SAL_DLLPRIVATE void ImplSetSalMenu( SalMenu *pMenu ); SAL_DLLPRIVATE void ImplClearSalMenu();
SAL_DLLPRIVATE OUString ImplGetHelpText( sal_uInt16 nItemId ) const; SAL_DLLPRIVATE OUString ImplGetHelpText( sal_uInt16 nItemId ) const;
// returns native check and option menu symbol height in rCheckHeight and rRadioHeight // 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 ImplUpdate();
SAL_DLLPRIVATE void ImplSetWindowSize( long nDelta ); SAL_DLLPRIVATE void ImplSetWindowSize( long nDelta );
SAL_DLLPRIVATE void ImplSplitMousePos( Point& rMousePos ); 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 ImplGetFadeInRect( tools::Rectangle& rRect, bool bTest = false ) const;
SAL_DLLPRIVATE void ImplGetFadeOutRect( 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); SAL_DLLPRIVATE void ImplDrawFadeIn(vcl::RenderContext& rRenderContext);

View File

@ -41,7 +41,6 @@ class RscBaseCont : public RscTop
{ {
protected: protected:
RscTop * pTypeClass; // type of entries RscTop * pTypeClass; // type of entries
RscTop * pTypeClass1;// two different types may exist
bool bNoId; // whether there is no identifier bool bNoId; // whether there is no identifier
const sal_uInt32 nOffInstData;// offset of own instance data const sal_uInt32 nOffInstData;// offset of own instance data
const sal_uInt32 nSize; // size of this class and super classes instance data const sal_uInt32 nSize; // size of this class and super classes instance data
@ -58,10 +57,9 @@ public:
bool bNoId ); bool bNoId );
virtual ~RscBaseCont() override; virtual ~RscBaseCont() override;
virtual RSCCLASS_TYPE GetClassType() const override; virtual RSCCLASS_TYPE GetClassType() const override;
void SetTypeClass( RscTop * pClass, RscTop * pClass1 = nullptr ) void SetTypeClass( RscTop * pClass )
{ {
pTypeClass = pClass; pTypeClass = pClass;
pTypeClass1 = pClass1;
} }
RSCINST Create( RSCINST * pInst, const RSCINST & rDflt, bool bOwnClass = false ) override; RSCINST Create( RSCINST * pInst, const RSCINST & rDflt, bool bOwnClass = false ) override;
void Destroy( const RSCINST & rInst ) override; void Destroy( const RSCINST & rInst ) override;

View File

@ -38,7 +38,7 @@ void ENTRY_STRUCT::Destroy()
RscBaseCont::RscBaseCont( Atom nId, RESOURCE_TYPE nTypeId, RscBaseCont::RscBaseCont( Atom nId, RESOURCE_TYPE nTypeId,
bool bNoIdent ) bool bNoIdent )
: RscTop(nId, nTypeId, nullptr) : RscTop(nId, nTypeId, nullptr)
, pTypeClass(nullptr), pTypeClass1(nullptr) , pTypeClass(nullptr)
, bNoId(bNoIdent), nOffInstData(RscTop::Size()) , bNoId(bNoIdent), nOffInstData(RscTop::Size())
, nSize(nOffInstData + ALIGNED_SIZE(sizeof(RscBaseContInst))) , nSize(nOffInstData + ALIGNED_SIZE(sizeof(RscBaseContInst)))
@ -175,20 +175,10 @@ ERRTYPE RscBaseCont::GetElement( const RSCINST & rInst, const RscId & rEleName,
if( pCreateClass ) if( pCreateClass )
{ {
if( !pCreateClass->InHierarchy( pTypeClass ) ) if( !pCreateClass->InHierarchy( pTypeClass ) )
{
if( pTypeClass1 )
{
if( !pCreateClass->InHierarchy( pTypeClass1 ) )
{ {
return ERR_CONT_INVALIDTYPE; return ERR_CONT_INVALIDTYPE;
} }
} }
else
{
return ERR_CONT_INVALIDTYPE;
}
}
}
else else
pCreateClass = pTypeClass; pCreateClass = pTypeClass;
@ -357,7 +347,7 @@ ERRTYPE RscBaseCont::SetString( const RSCINST & rInst, const char * pStr )
{ {
aError.Clear(); aError.Clear();
DeletePos( rInst, pClassData->nEntries -1 ); 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 ); aError = aTmpI.pClass->GetString( aTmpI, &pTmpStr );
if( aError.IsOk() ) if( aError.IsOk() )
aError = aTmpI.pClass->SetString( aTmpI, pStr ); aError = aTmpI.pClass->SetString( aTmpI, pStr );
@ -393,7 +383,7 @@ ERRTYPE RscBaseCont::SetNumber( const RSCINST & rInst, sal_Int32 lValue )
{ {
aError.Clear(); aError.Clear();
DeletePos( rInst, pClassData->nEntries -1 ); 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 ); aError = aTmpI.pClass->GetNumber( aTmpI, &lNumber );
if( aError.IsOk() ) if( aError.IsOk() )
aError = aTmpI.pClass->SetNumber( aTmpI, lValue ); aError = aTmpI.pClass->SetNumber( aTmpI, lValue );
@ -429,7 +419,7 @@ ERRTYPE RscBaseCont::SetBool( const RSCINST & rInst,
{ {
aError.Clear(); aError.Clear();
DeletePos( rInst, pClassData->nEntries -1 ); 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 ); aError = aTmpI.pClass->GetBool( aTmpI, &bBool );
if( aError.IsOk() ) if( aError.IsOk() )
aError = aTmpI.pClass->SetBool( aTmpI, bValue ); aError = aTmpI.pClass->SetBool( aTmpI, bValue );
@ -467,7 +457,7 @@ ERRTYPE RscBaseCont::SetConst( const RSCINST & rInst,
{ {
aError.Clear(); aError.Clear();
DeletePos( rInst, pClassData->nEntries -1 ); 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 ); aError = aTmpI.pClass->GetConst( aTmpI, &nConst );
if( aError.IsOk() ) if( aError.IsOk() )
aError = aTmpI.pClass->SetConst( aTmpI, nValueId, lValue ); aError = aTmpI.pClass->SetConst( aTmpI, nValueId, lValue );
@ -503,7 +493,7 @@ ERRTYPE RscBaseCont::SetRef( const RSCINST & rInst, const RscId & rRefId )
{ {
aError.Clear(); aError.Clear();
DeletePos( rInst, pClassData->nEntries -1 ); 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 ); aError = aTmpI.pClass->GetRef( aTmpI, &aId );
if( aError.IsOk() ) if( aError.IsOk() )
aError = aTmpI.pClass->SetNumber( aTmpI, rRefId.GetNumber() ); aError = aTmpI.pClass->SetNumber( aTmpI, rRefId.GetNumber() );

View File

@ -776,10 +776,9 @@ public:
ScRefAddress() : ScRefAddress() :
bRelCol(false), bRelRow(false), bRelTab(false) bRelCol(false), bRelRow(false), bRelTab(false)
{} {}
ScRefAddress( SCCOL nCol, SCROW nRow, SCTAB nTab, ScRefAddress( SCCOL nCol, SCROW nRow, SCTAB nTab ) :
bool bRelColP, bool bRelRowP, bool bRelTabP ) :
aAdr(nCol, nRow, nTab), aAdr(nCol, nRow, nTab),
bRelCol(bRelColP), bRelRow(bRelRowP), bRelTab(bRelTabP) bRelCol(false), bRelRow(false), bRelTab(false)
{} {}
ScRefAddress( const ScRefAddress& rRef ) : ScRefAddress( const ScRefAddress& rRef ) :
aAdr(rRef.aAdr), bRelCol(rRef.bRelCol), bRelRow(rRef.bRelRow), 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 class ScTableListItem : public SfxPoolItem
{ {
public: public:
inline ScTableListItem( const sal_uInt16 nWhich ); ScTableListItem();
ScTableListItem( const ScTableListItem& rCpy ); ScTableListItem( const ScTableListItem& rCpy );
virtual ~ScTableListItem() override; virtual ~ScTableListItem() override;
@ -212,10 +212,6 @@ public:
std::unique_ptr<SCTAB[]> pTabArr; 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 // page format item: contents of header and footer
#define SC_HF_LEFTAREA 1 #define SC_HF_LEFTAREA 1

View File

@ -44,8 +44,7 @@ public:
class SC_DLLPUBLIC ScTpDefaultsItem : public SfxPoolItem class SC_DLLPUBLIC ScTpDefaultsItem : public SfxPoolItem
{ {
public: public:
ScTpDefaultsItem( sal_uInt16 nWhich, ScTpDefaultsItem( const ScDefaultsOptions& rOpt );
const ScDefaultsOptions& rOpt );
ScTpDefaultsItem( const ScTpDefaultsItem& rItem ); ScTpDefaultsItem( const ScTpDefaultsItem& rItem );
virtual ~ScTpDefaultsItem() override; virtual ~ScTpDefaultsItem() override;

View File

@ -83,8 +83,7 @@ public:
class SC_DLLPUBLIC ScTpFormulaItem : public SfxPoolItem class SC_DLLPUBLIC ScTpFormulaItem : public SfxPoolItem
{ {
public: public:
ScTpFormulaItem( sal_uInt16 nWhich, ScTpFormulaItem( const ScFormulaOptions& rOpt );
const ScFormulaOptions& rOpt );
ScTpFormulaItem( const ScTpFormulaItem& rItem ); ScTpFormulaItem( const ScTpFormulaItem& rItem );
virtual ~ScTpFormulaItem() override; virtual ~ScTpFormulaItem() override;

View File

@ -54,8 +54,7 @@ public:
class SC_DLLPUBLIC ScTpPrintItem : public SfxPoolItem class SC_DLLPUBLIC ScTpPrintItem : public SfxPoolItem
{ {
public: public:
ScTpPrintItem( sal_uInt16 nWhich, ScTpPrintItem( const ScPrintOptions& rOpt );
const ScPrintOptions& rOpt );
ScTpPrintItem( const ScTpPrintItem& rItem ); ScTpPrintItem( const ScTpPrintItem& rItem );
virtual ~ScTpPrintItem() override; virtual ~ScTpPrintItem() override;

View File

@ -110,12 +110,12 @@ private:
ScGridOptions aGridOpt; ScGridOptions aGridOpt;
}; };
// Item for the options dialoge - View // Item for the options dialog - View
class SC_DLLPUBLIC ScTpViewItem : public SfxPoolItem class SC_DLLPUBLIC ScTpViewItem : public SfxPoolItem
{ {
public: public:
ScTpViewItem( sal_uInt16 nWhich, const ScViewOptions& rOpt ); ScTpViewItem( const ScViewOptions& rOpt );
ScTpViewItem( const ScTpViewItem& rItem ); ScTpViewItem( const ScTpViewItem& rItem );
virtual ~ScTpViewItem() override; virtual ~ScTpViewItem() override;

View File

@ -3507,9 +3507,9 @@ void Test::testMultipleOperations()
// Set multiple operations range. // Set multiple operations range.
ScTabOpParam aParam; ScTabOpParam aParam;
aParam.aRefFormulaCell = ScRefAddress(1,0,0,false,false,false); aParam.aRefFormulaCell = ScRefAddress(1,0,0);
aParam.aRefFormulaEnd = aParam.aRefFormulaCell; aParam.aRefFormulaEnd = aParam.aRefFormulaCell;
aParam.aRefColCell = ScRefAddress(0,0,0,false,false,false); aParam.aRefColCell = ScRefAddress(0,0,0);
ScMarkData aMark; ScMarkData aMark;
aMark.SetMarkArea(ScRange(0,2,0,1,4,0)); // Select A3:B5. aMark.SetMarkArea(ScRange(0,2,0,1,4,0)); // Select A3:B5.
m_pDoc->InsertTableOp(aParam, 0, 2, 1, 4, aMark); 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_PRINTAREA - ATTR_STARTINDEX ] = new ScRangeItem( ATTR_PAGE_PRINTAREA );
rPoolDefaults[ ATTR_PAGE_REPEATROW - ATTR_STARTINDEX ] = new ScRangeItem( ATTR_PAGE_REPEATROW ); 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_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_HEADERLEFT - ATTR_STARTINDEX ] = new ScPageHFItem( ATTR_PAGE_HEADERLEFT );
rPoolDefaults[ ATTR_PAGE_FOOTERLEFT - ATTR_STARTINDEX ] = new ScPageHFItem( ATTR_PAGE_FOOTERLEFT ); rPoolDefaults[ ATTR_PAGE_FOOTERLEFT - ATTR_STARTINDEX ] = new ScPageHFItem( ATTR_PAGE_FOOTERLEFT );
rPoolDefaults[ ATTR_PAGE_HEADERRIGHT- ATTR_STARTINDEX ] = new ScPageHFItem( ATTR_PAGE_HEADERRIGHT ); rPoolDefaults[ ATTR_PAGE_HEADERRIGHT- ATTR_STARTINDEX ] = new ScPageHFItem( ATTR_PAGE_HEADERRIGHT );

View File

@ -13,7 +13,10 @@
#include "defaultsoptions.hxx" #include "defaultsoptions.hxx"
#include "miscuno.hxx" #include "miscuno.hxx"
#include "global.hxx" #include "global.hxx"
#include "attrib.hxx"
#include "scitems.hxx"
#include "globstr.hrc" #include "globstr.hrc"
#include "sc.hrc"
using namespace utl; using namespace utl;
using namespace com::sun::star::uno; using namespace com::sun::star::uno;
@ -54,8 +57,12 @@ bool ScDefaultsOptions::operator==( const ScDefaultsOptions& rOpt ) const
&& rOpt.aInitTabPrefix == aInitTabPrefix; && rOpt.aInitTabPrefix == aInitTabPrefix;
} }
ScTpDefaultsItem::ScTpDefaultsItem( sal_uInt16 nWhichP, const ScDefaultsOptions& rOpt ) : ScTableListItem::ScTableListItem()
SfxPoolItem ( nWhichP ), : SfxPoolItem(ATTR_PAGE_PRINTTABLES), nCount(0), pTabArr(nullptr)
{}
ScTpDefaultsItem::ScTpDefaultsItem( const ScDefaultsOptions& rOpt ) :
SfxPoolItem ( SID_SCDEFAULTSOPTIONS ),
theOptions ( rOpt ) theOptions ( rOpt )
{ {
} }

View File

@ -15,6 +15,7 @@
#include "miscuno.hxx" #include "miscuno.hxx"
#include "global.hxx" #include "global.hxx"
#include "formulagroup.hxx" #include "formulagroup.hxx"
#include "sc.hrc"
using namespace utl; using namespace utl;
using namespace com::sun::star::uno; using namespace com::sun::star::uno;
@ -147,8 +148,8 @@ bool ScFormulaOptions::operator!=( const ScFormulaOptions& rOpt ) const
return !(operator==(rOpt)); return !(operator==(rOpt));
} }
ScTpFormulaItem::ScTpFormulaItem( sal_uInt16 nWhichP, const ScFormulaOptions& rOpt ) : ScTpFormulaItem::ScTpFormulaItem( const ScFormulaOptions& rOpt ) :
SfxPoolItem ( nWhichP ), SfxPoolItem ( SID_SCFORMULAOPTIONS ),
theOptions ( rOpt ) theOptions ( rOpt )
{ {
} }

View File

@ -23,6 +23,7 @@
#include "printopt.hxx" #include "printopt.hxx"
#include "miscuno.hxx" #include "miscuno.hxx"
#include "sc.hrc"
using namespace utl; using namespace utl;
using namespace com::sun::star::uno; using namespace com::sun::star::uno;
@ -66,8 +67,8 @@ bool ScPrintOptions::operator==( const ScPrintOptions& rOpt ) const
&& bForceBreaks == rOpt.bForceBreaks; && bForceBreaks == rOpt.bForceBreaks;
} }
ScTpPrintItem::ScTpPrintItem( sal_uInt16 nWhichP, const ScPrintOptions& rOpt ) : ScTpPrintItem::ScTpPrintItem( const ScPrintOptions& rOpt ) :
SfxPoolItem ( nWhichP ), SfxPoolItem ( SID_SCPRINTOPTIONS ),
theOptions ( rOpt ) theOptions ( rOpt )
{ {
} }

View File

@ -193,8 +193,8 @@ SvxGridItem* ScViewOptions::CreateGridItem() const
// ScTpViewItem - data for the ViewOptions TabPage // ScTpViewItem - data for the ViewOptions TabPage
ScTpViewItem::ScTpViewItem( sal_uInt16 nWhichP, const ScViewOptions& rOpt ) ScTpViewItem::ScTpViewItem( const ScViewOptions& rOpt )
: SfxPoolItem ( nWhichP ), : SfxPoolItem ( SID_SCVIEWOPTIONS ),
theOptions ( rOpt ) theOptions ( rOpt )
{ {
} }

View File

@ -93,7 +93,7 @@ struct ConnectionModel
class Connection : public WorkbookHelper class Connection : public WorkbookHelper
{ {
public: public:
explicit Connection( const WorkbookHelper& rHelper, sal_Int32 nConnId = -1 ); explicit Connection( const WorkbookHelper& rHelper );
/** Imports connection settings from the connection element. */ /** Imports connection settings from the connection element. */
void importConnection( const AttributeList& rAttribs ); void importConnection( const AttributeList& rAttribs );

View File

@ -673,6 +673,7 @@ public:
extractReference( const ApiTokenSequence& rTokens ) const; extractReference( const ApiTokenSequence& rTokens ) const;
/** Tries to extract a cell range address from a formula token sequence. /** 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, @param orAddress (output parameter) If the token sequence is valid,
this parameter will contain the extracted cell range address. If 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 one cell range address token. The token sequence may contain
whitespace tokens. 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 @return True, if the token sequence contains a valid cell range
address which has been extracted to orRange, false otherwise. address which has been extracted to orRange, false otherwise.
*/ */
bool extractCellRange( bool extractCellRange(
ScRange& orRange, ScRange& orRange,
const ApiTokenSequence& rTokens, const ApiTokenSequence& rTokens ) const;
bool bAllowRelative ) const;
/** Tries to extract a cell range list from a formula token sequence. /** 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, @param orRanges (output parameter) If the token sequence is valid,
this parameter will contain the extracted cell range list. Deleted this parameter will contain the extracted cell range list. Deleted
@ -708,10 +705,6 @@ public:
standard function parameter separator token. The token sequence may standard function parameter separator token. The token sequence may
contain parentheses and whitespace tokens. 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 @param nFilterBySheet If non-negative, this function returns only cell
ranges located in the specified sheet, otherwise returns all cell ranges located in the specified sheet, otherwise returns all cell
ranges contained in the token sequence. ranges contained in the token sequence.
@ -719,7 +712,6 @@ public:
void extractCellRangeList( void extractCellRangeList(
ScRangeList& orRanges, ScRangeList& orRanges,
const ApiTokenSequence& rTokens, const ApiTokenSequence& rTokens,
bool bAllowRelative,
sal_Int32 nFilterBySheet ) const; sal_Int32 nFilterBySheet ) const;
/** Tries to extract a string from a formula token sequence. /** 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 ); void importPCDSheetSource( SequenceInputStream& rStrm, const ::oox::core::Relations& rRelations );
/** Creates and returns a new pivot cache field. */ /** 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. */ /** Checks validity of source data and creates a dummy data sheet for external sheet sources. */
void finalizeImport(); void finalizeImport();

View File

@ -85,8 +85,7 @@ struct FontPortionModel
sal_Int32 mnFontId; /// Font identifier for the next characters. sal_Int32 mnFontId; /// Font identifier for the next characters.
explicit FontPortionModel() : mnPos( 0 ), mnFontId( -1 ) {} explicit FontPortionModel() : mnPos( 0 ), mnFontId( -1 ) {}
explicit FontPortionModel( sal_Int32 nPos, sal_Int32 nFontId ) : explicit FontPortionModel( sal_Int32 nPos ) : mnPos( nPos ), mnFontId( -1 ) {}
mnPos( nPos ), mnFontId( nFontId ) {}
void read( SequenceInputStream& rStrm ); void read( SequenceInputStream& rStrm );
}; };
@ -232,12 +231,10 @@ public:
OUString& orString, OUString& orString,
const oox::xls::Font* pFirstPortionFont ) const; 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 rxText The XText interface of the target object.
@param bReplaceOld True = replace old contents of the text object. */ */
void convert( void convert( const css::uno::Reference< css::text::XText >& rxText ) const;
const css::uno::Reference< css::text::XText >& rxText,
bool bReplaceOld ) const;
::EditTextObject* convert( ScEditEngineDefaulter& rEE, const oox::xls::Font* pFont ) const; ::EditTextObject* convert( ScEditEngineDefaulter& rEE, const oox::xls::Font* pFont ) const;
private: private:

View File

@ -171,7 +171,7 @@ void Comment::finalizeImport()
// insert text and convert text formatting // insert text and convert text formatting
maModel.mxText->finalizeImport(); maModel.mxText->finalizeImport();
Reference< XText > xAnnoText( xAnnoShape, UNO_QUERY_THROW ); Reference< XText > xAnnoText( xAnnoShape, UNO_QUERY_THROW );
maModel.mxText->convert( xAnnoText, true ); maModel.mxText->convert( xAnnoText );
} }
catch( Exception& ) catch( Exception& )
{ {

View File

@ -104,10 +104,10 @@ WebPrModel& ConnectionModel::createWebPr()
return *mxWebPr; return *mxWebPr;
} }
Connection::Connection( const WorkbookHelper& rHelper, sal_Int32 nConnId ) : Connection::Connection( const WorkbookHelper& rHelper ) :
WorkbookHelper( rHelper ) WorkbookHelper( rHelper )
{ {
maModel.mnId = nConnId; maModel.mnId = -1;
} }
void Connection::importConnection( const AttributeList& rAttribs ) 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 ); Reference< XPrintAreas > xPrintAreas( getSheetFromDoc( mnCalcSheet ), UNO_QUERY );
ScRangeList aPrintRanges; ScRangeList aPrintRanges;
getFormulaParser().extractCellRangeList( aPrintRanges, aFTokenSeq, false, mnCalcSheet ); getFormulaParser().extractCellRangeList( aPrintRanges, aFTokenSeq, mnCalcSheet );
if( xPrintAreas.is() && !aPrintRanges.empty() ) if( xPrintAreas.is() && !aPrintRanges.empty() )
xPrintAreas->setPrintAreas( AddressConverter::toApiSequence(aPrintRanges) ); 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 ); Reference< XPrintAreas > xPrintAreas( getSheetFromDoc( mnCalcSheet ), UNO_QUERY );
ScRangeList aTitleRanges; ScRangeList aTitleRanges;
getFormulaParser().extractCellRangeList( aTitleRanges, aFTokenSeq, false, mnCalcSheet ); getFormulaParser().extractCellRangeList( aTitleRanges, aFTokenSeq, mnCalcSheet );
if( xPrintAreas.is() && !aTitleRanges.empty() ) if( xPrintAreas.is() && !aTitleRanges.empty() )
{ {
bool bHasRowTitles = false; bool bHasRowTitles = false;
@ -408,7 +408,7 @@ bool DefinedName::getAbsoluteRange( ScRange& orRange ) const
ScTokenArray* pTokenArray = mpScRangeData->GetCode(); ScTokenArray* pTokenArray = mpScRangeData->GetCode();
Sequence< FormulaToken > aFTokenSeq; Sequence< FormulaToken > aFTokenSeq;
ScTokenConversion::ConvertToTokenSequence(getScDocument(), aFTokenSeq, *pTokenArray); 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 }; 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; 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 = COLUMN_DELETED | ROW_DELETED | SHEET_DELETED |
const sal_Int32 FORBIDDEN_FLAGS_REL = FORBIDDEN_FLAGS_DEL | COLUMN_RELATIVE | ROW_RELATIVE | SHEET_RELATIVE | RELATIVE_NAME; 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; SingleReference aSingleRef;
if( rData >>= aSingleRef ) if( rData >>= aSingleRef )
{ {
@ -1599,10 +1599,10 @@ Any FormulaProcessorBase::extractReference( const ApiTokenSequence& rTokens ) co
} }
bool FormulaProcessorBase::extractCellRange( ScRange& orRange, bool FormulaProcessorBase::extractCellRange( ScRange& orRange,
const ApiTokenSequence& rTokens, bool bAllowRelative ) const const ApiTokenSequence& rTokens ) const
{ {
ScRangeList aRanges; ScRangeList aRanges;
lclProcessRef( aRanges, extractReference( rTokens ), bAllowRelative, -1 ); lclProcessRef( aRanges, extractReference( rTokens ), -1 );
if( !aRanges.empty() ) if( !aRanges.empty() )
{ {
orRange = *aRanges.front(); orRange = *aRanges.front();
@ -1612,7 +1612,7 @@ bool FormulaProcessorBase::extractCellRange( ScRange& orRange,
} }
void FormulaProcessorBase::extractCellRangeList( ScRangeList& orRanges, void FormulaProcessorBase::extractCellRangeList( ScRangeList& orRanges,
const ApiTokenSequence& rTokens, bool bAllowRelative, sal_Int32 nFilterBySheet ) const const ApiTokenSequence& rTokens, sal_Int32 nFilterBySheet ) const
{ {
orRanges.RemoveAll(); orRanges.RemoveAll();
TokenToRangeListState eState = STATE_OPEN; TokenToRangeListState eState = STATE_OPEN;
@ -1630,7 +1630,7 @@ void FormulaProcessorBase::extractCellRangeList( ScRangeList& orRanges,
else eState = STATE_ERROR; else eState = STATE_ERROR;
break; break;
case STATE_SEP: 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_SEP ) eState = STATE_SEP;
else if( nOpCode == OPCODE_LIST ) eState = STATE_SEP; else if( nOpCode == OPCODE_LIST ) eState = STATE_SEP;
else if( nOpCode == OPCODE_OPEN ) eState = lclProcessOpen( nParenLevel ); else if( nOpCode == OPCODE_OPEN ) eState = lclProcessOpen( nParenLevel );
@ -1638,7 +1638,7 @@ void FormulaProcessorBase::extractCellRangeList( ScRangeList& orRanges,
else eState = STATE_ERROR; else eState = STATE_ERROR;
break; break;
case STATE_OPEN: 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_SEP ) eState = STATE_SEP;
else if( nOpCode == OPCODE_LIST ) eState = STATE_SEP; else if( nOpCode == OPCODE_LIST ) eState = STATE_SEP;
else if( nOpCode == OPCODE_OPEN ) eState = lclProcessOpen( nParenLevel ); else if( nOpCode == OPCODE_OPEN ) eState = lclProcessOpen( nParenLevel );

View File

@ -498,7 +498,7 @@ protected:
bool pushExternalFuncOperand( const FunctionInfo& rFuncInfo ); bool pushExternalFuncOperand( const FunctionInfo& rFuncInfo );
bool pushDdeLinkOperand( const OUString& rDdeServer, const OUString& rDdeTopic, const OUString& rDdeItem ); bool pushDdeLinkOperand( const OUString& rDdeServer, const OUString& rDdeTopic, const OUString& rDdeItem );
bool pushExternalNameOperand( const ExternalNameRef& rxExtName, const ExternalLink& rExtLink ); 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 pushUnaryPreOperator( sal_Int32 nOpCode );
bool pushUnaryPostOperator( sal_Int32 nOpCode ); bool pushUnaryPostOperator( sal_Int32 nOpCode );
@ -1005,10 +1005,10 @@ bool FormulaParserImpl::pushExternalNameOperand( const ExternalNameRef& rxExtNam
return pushBiffErrorOperand( BIFF_ERR_NAME ); 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 ); CellAddress aBaseAddr( maBaseAddr.Tab(), rBaseAddr.mnCol, rBaseAddr.mnRow );
ApiSpecialTokenInfo aTokenInfo( aBaseAddr, bTable ); ApiSpecialTokenInfo aTokenInfo( aBaseAddr, false );
return mbSpecialTokens && (getFormulaSize() == 0) && pushValueOperand( aTokenInfo, OPCODE_BAD ); return mbSpecialTokens && (getFormulaSize() == 0) && pushValueOperand( aTokenInfo, OPCODE_BAD );
} }
@ -1681,7 +1681,7 @@ bool OoxFormulaParserImpl::importExpToken( SequenceInputStream& rStrm )
swapStreamPosition( rStrm ); swapStreamPosition( rStrm );
aBaseAddr.mnCol = rStrm.readInt32(); aBaseAddr.mnCol = rStrm.readInt32();
swapStreamPosition( rStrm ); swapStreamPosition( rStrm );
return pushSpecialTokenOperand( aBaseAddr, false ); return pushSpecialTokenOperand( aBaseAddr );
} }
LinkSheetRange OoxFormulaParserImpl::readSheetRange( SequenceInputStream& rStrm ) LinkSheetRange OoxFormulaParserImpl::readSheetRange( SequenceInputStream& rStrm )

View File

@ -957,10 +957,9 @@ void PivotCache::importPCDSheetSource( SequenceInputStream& rStrm, const Relatio
maTargetUrl = rRelations.getExternalTargetFromRelId( maSheetSrcModel.maRelId ); maTargetUrl = rRelations.getExternalTargetFromRelId( maSheetSrcModel.maRelId );
} }
PivotCacheField& PivotCache::createCacheField( bool bInitDatabaseField ) PivotCacheField& PivotCache::createCacheField()
{ {
bool bIsDatabaseField = !bInitDatabaseField; PivotCacheFieldVector::value_type xCacheField( new PivotCacheField( *this, true/*bIsDatabaseField*/ ) );
PivotCacheFieldVector::value_type xCacheField( new PivotCacheField( *this, bIsDatabaseField ) );
maFields.push_back( xCacheField ); maFields.push_back( xCacheField );
return *xCacheField; return *xCacheField;
} }

View File

@ -370,7 +370,7 @@ bool RichString::extractPlainString( OUString& orString, const oox::xls::Font* p
return false; return false;
} }
void RichString::convert( const Reference< XText >& rxText, bool bReplaceOld ) const void RichString::convert( const Reference< XText >& rxText ) const
{ {
if (maTextPortions.size() == 1) if (maTextPortions.size() == 1)
{ {
@ -382,6 +382,7 @@ void RichString::convert( const Reference< XText >& rxText, bool bReplaceOld ) c
return; return;
} }
bool bReplaceOld = true;
for( PortionVector::const_iterator aIt = maTextPortions.begin(), aEnd = maTextPortions.end(); aIt != aEnd; ++aIt ) for( PortionVector::const_iterator aIt = maTextPortions.begin(), aEnd = maTextPortions.end(); aIt != aEnd; ++aIt )
{ {
(*aIt)->convert( rxText, bReplaceOld ); (*aIt)->convert( rxText, bReplaceOld );
@ -435,9 +436,9 @@ void RichString::createTextPortions( const OUString& rText, FontPortionModelList
sal_Int32 nStrLen = rText.getLength(); sal_Int32 nStrLen = rText.getLength();
// add leading and trailing string position to ease the following loop // add leading and trailing string position to ease the following loop
if( rPortions.empty() || (rPortions.front().mnPos > 0) ) 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 ) 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 // create all string portions according to the font id vector
for( ::std::vector< FontPortionModel >::const_iterator aIt = rPortions.begin(); aIt->mnPos < nStrLen; ++aIt ) 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 ) ); pRet->Put( ScTpCalcItem( SID_SCDOCOPTIONS, aCalcOpt ) );
// TP_VIEW // TP_VIEW
pRet->Put( ScTpViewItem( SID_SCVIEWOPTIONS, aViewOpt ) ); pRet->Put( ScTpViewItem( aViewOpt ) );
pRet->Put( SfxBoolItem( SID_SC_OPT_SYNCZOOM, rAppOpt.GetSynchronizeZoom() ) ); pRet->Put( SfxBoolItem( SID_SC_OPT_SYNCZOOM, rAppOpt.GetSynchronizeZoom() ) );
// TP_INPUT // TP_INPUT
@ -2011,7 +2011,7 @@ SfxItemSet* ScModule::CreateItemSet( sal_uInt16 nId )
rInpOpt.GetLegacyCellSelection() ) ); rInpOpt.GetLegacyCellSelection() ) );
// RID_SC_TP_PRINT // RID_SC_TP_PRINT
pRet->Put( ScTpPrintItem( SID_SCPRINTOPTIONS, GetPrintOptions() ) ); pRet->Put( ScTpPrintItem( GetPrintOptions() ) );
// TP_GRID // TP_GRID
SvxGridItem* pSvxGridItem = aViewOpt.CreateGridItem(); SvxGridItem* pSvxGridItem = aViewOpt.CreateGridItem();
@ -2030,7 +2030,7 @@ SfxItemSet* ScModule::CreateItemSet( sal_uInt16 nId )
rAppOpt.GetKeyBindingType() ) ); rAppOpt.GetKeyBindingType() ) );
// TP_DEFAULTS // TP_DEFAULTS
pRet->Put( ScTpDefaultsItem( SID_SCDEFAULTSOPTIONS, GetDefaultsOptions() ) ); pRet->Put( ScTpDefaultsItem( GetDefaultsOptions() ) );
// TP_FORMULA // TP_FORMULA
ScFormulaOptions aOptions = GetFormulaOptions(); ScFormulaOptions aOptions = GetFormulaOptions();
@ -2040,7 +2040,7 @@ SfxItemSet* ScModule::CreateItemSet( sal_uInt16 nId )
aConfig.MergeDocumentSpecific( pDocSh->GetDocument().GetCalcConfig()); aConfig.MergeDocumentSpecific( pDocSh->GetDocument().GetCalcConfig());
aOptions.SetCalcConfig( aConfig); aOptions.SetCalcConfig( aConfig);
} }
pRet->Put( ScTpFormulaItem( SID_SCFORMULAOPTIONS, aOptions ) ); pRet->Put( ScTpFormulaItem( aOptions ) );
} }
return pRet; return pRet;
} }

View File

@ -119,15 +119,15 @@ protected:
OUString* MakeTypeString(ScChangeActionType eType); OUString* MakeTypeString(ScChangeActionType eType);
SvTreeListEntry* InsertChangeAction( SvTreeListEntry* AppendChangeAction(
const ScChangeAction* pScChangeAction,ScChangeActionState eState, const ScChangeAction* pScChangeAction,ScChangeActionState eState,
SvTreeListEntry* pParent=nullptr,bool bDelMaster = false, 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, const ScChangeAction* pScChangeAction,ScChangeActionState eState,
SvTreeListEntry* pParent = nullptr,bool bDelMaster = false, SvTreeListEntry* pParent = nullptr,bool bDelMaster = false,
bool bDisabled = false, sal_uLong nPos = TREELIST_APPEND); bool bDisabled = false);
SvTreeListEntry* InsertChangeActionContent(const ScChangeActionContent* pScChangeAction, SvTreeListEntry* InsertChangeActionContent(const ScChangeActionContent* pScChangeAction,
SvTreeListEntry* pParent,sal_uLong nSpecial); SvTreeListEntry* pParent,sal_uLong nSpecial);

View File

@ -361,9 +361,9 @@ bool ScAcceptChgDlg::IsValidAction(const ScChangeAction* pScChangeAction)
return bFlag; return bFlag;
} }
SvTreeListEntry* ScAcceptChgDlg::InsertChangeAction( SvTreeListEntry* ScAcceptChgDlg::AppendChangeAction(
const ScChangeAction* pScChangeAction, ScChangeActionState /*eState*/, const ScChangeAction* pScChangeAction, ScChangeActionState /*eState*/,
SvTreeListEntry* pParent, bool bDelMaster,bool bDisabled, sal_uLong nPos) SvTreeListEntry* pParent, bool bDelMaster,bool bDisabled)
{ {
ScChangeTrack* pChanges=pDoc->GetChangeTrack(); ScChangeTrack* pChanges=pDoc->GetChangeTrack();
@ -486,12 +486,12 @@ SvTreeListEntry* ScAcceptChgDlg::InsertChangeAction(
if(!bFlag&& bUseColor&& pParent==nullptr) if(!bFlag&& bUseColor&& pParent==nullptr)
{ {
pEntry = pTheView->InsertEntry( 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) else if(bFlag&& bUseColor&& pParent!=nullptr)
{ {
pEntry = pTheView->InsertEntry( pEntry = pTheView->InsertEntry(
aBuf.makeStringAndClear(), pNewData, Color(COL_GREEN), pParent, nPos); aBuf.makeStringAndClear(), pNewData, Color(COL_GREEN), pParent, TREELIST_APPEND);
SvTreeListEntry* pExpEntry=pParent; SvTreeListEntry* pExpEntry=pParent;
while(pExpEntry!=nullptr && !pTheView->IsExpanded(pExpEntry)) while(pExpEntry!=nullptr && !pTheView->IsExpanded(pExpEntry))
@ -506,14 +506,14 @@ SvTreeListEntry* ScAcceptChgDlg::InsertChangeAction(
else else
{ {
pEntry = pTheView->InsertEntry( pEntry = pTheView->InsertEntry(
aBuf.makeStringAndClear(), pNewData, pParent, nPos); aBuf.makeStringAndClear(), pNewData, pParent, TREELIST_APPEND);
} }
return pEntry; return pEntry;
} }
SvTreeListEntry* ScAcceptChgDlg::InsertFilteredAction( SvTreeListEntry* ScAcceptChgDlg::AppendFilteredAction(
const ScChangeAction* pScChangeAction, ScChangeActionState eState, const ScChangeAction* pScChangeAction, ScChangeActionState eState,
SvTreeListEntry* pParent, bool bDelMaster, bool bDisabled, sal_uLong nPos) SvTreeListEntry* pParent, bool bDelMaster, bool bDisabled)
{ {
ScChangeTrack* pChanges=pDoc->GetChangeTrack(); ScChangeTrack* pChanges=pDoc->GetChangeTrack();
@ -626,7 +626,7 @@ SvTreeListEntry* ScAcceptChgDlg::InsertFilteredAction(
if (pTheView->IsValidComment(aComment)) if (pTheView->IsValidComment(aComment))
{ {
aString+=aComment; aString+=aComment;
pEntry=pTheView->InsertEntry(aString,pNewData,pParent,nPos); pEntry=pTheView->InsertEntry(aString,pNewData,pParent,TREELIST_APPEND);
} }
else else
delete pNewData; delete pNewData;
@ -784,9 +784,9 @@ void ScAcceptChgDlg::UpdateView()
if(pScChangeAction->IsDialogRoot()) if(pScChangeAction->IsDialogRoot())
{ {
if(pScChangeAction->IsDialogParent()) if(pScChangeAction->IsDialogParent())
pParent=InsertChangeAction(pScChangeAction,SC_CAS_VIRGIN); pParent=AppendChangeAction(pScChangeAction,SC_CAS_VIRGIN);
else else
pParent=InsertFilteredAction(pScChangeAction,SC_CAS_VIRGIN); pParent=AppendFilteredAction(pScChangeAction,SC_CAS_VIRGIN);
} }
else else
pParent=nullptr; pParent=nullptr;
@ -1217,7 +1217,7 @@ bool ScAcceptChgDlg::InsertAcceptedORejected(SvTreeListEntry* pParent)
while(pScChangeAction!=nullptr) while(pScChangeAction!=nullptr)
{ {
if(pScChangeAction->GetState()==eState && if(pScChangeAction->GetState()==eState &&
InsertFilteredAction(pScChangeAction,eState,pParent)!=nullptr) AppendFilteredAction(pScChangeAction,eState,pParent)!=nullptr)
bTheTestFlag=false; bTheTestFlag=false;
pScChangeAction=pScChangeAction->GetNext(); pScChangeAction=pScChangeAction->GetNext();
} }
@ -1232,7 +1232,7 @@ bool ScAcceptChgDlg::InsertChildren(ScChangeActionMap* pActionMap,SvTreeListEntr
for( itChangeAction = pActionMap->begin(); itChangeAction != pActionMap->end(); ++itChangeAction ) 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) if(pEntry!=nullptr)
{ {
@ -1262,9 +1262,9 @@ bool ScAcceptChgDlg::InsertDeletedChildren(const ScChangeAction* pScChangeAction
{ {
if( pScChangeAction != itChangeAction->second ) 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 else
pEntry = InsertChangeAction( itChangeAction->second, SC_CAS_VIRGIN, pParent, true, true ); pEntry = AppendChangeAction( itChangeAction->second, SC_CAS_VIRGIN, pParent, true, true );
if(pEntry!=nullptr) if(pEntry!=nullptr)
{ {
@ -1414,9 +1414,9 @@ void ScAcceptChgDlg::AppendChanges(ScChangeTrack* pChanges,sal_uLong nStartActio
if(pScChangeAction->IsDialogRoot()) if(pScChangeAction->IsDialogRoot())
{ {
if(pScChangeAction->IsDialogParent()) if(pScChangeAction->IsDialogParent())
pParent=InsertChangeAction(pScChangeAction,SC_CAS_VIRGIN); pParent=AppendChangeAction(pScChangeAction,SC_CAS_VIRGIN);
else else
pParent=InsertFilteredAction(pScChangeAction,SC_CAS_VIRGIN); pParent=AppendFilteredAction(pScChangeAction,SC_CAS_VIRGIN);
} }
else else
pParent=nullptr; pParent=nullptr;

View File

@ -59,7 +59,7 @@ bool ScTpDefaultsOptions::FillItemSet(SfxItemSet *rCoreSet)
aOpt.SetInitTabCount( nTabCount ); aOpt.SetInitTabCount( nTabCount );
aOpt.SetInitTabPrefix( aSheetPrefix ); aOpt.SetInitTabPrefix( aSheetPrefix );
rCoreSet->Put( ScTpDefaultsItem( SID_SCDEFAULTSOPTIONS, aOpt ) ); rCoreSet->Put( ScTpDefaultsItem( aOpt ) );
bRet = true; bRet = true;
} }
return bRet; return bRet;

View File

@ -292,7 +292,7 @@ bool ScTpFormulaOptions::FillItemSet(SfxItemSet* rCoreSet)
aOpt.SetODFRecalcOptions(eODFRecalc); aOpt.SetODFRecalcOptions(eODFRecalc);
aOpt.SetWriteCalcConfig( maCurrentDocOptions.IsWriteCalcConfig()); aOpt.SetWriteCalcConfig( maCurrentDocOptions.IsWriteCalcConfig());
rCoreSet->Put( ScTpFormulaItem( SID_SCFORMULAOPTIONS, aOpt ) ); rCoreSet->Put( ScTpFormulaItem( aOpt ) );
rCoreSet->Put( ScTpCalcItem( SID_SCDOCOPTIONS, maCurrentDocOptions ) ); rCoreSet->Put( ScTpCalcItem( SID_SCDOCOPTIONS, maCurrentDocOptions ) );
bRet = true; bRet = true;

View File

@ -109,7 +109,7 @@ bool ScTpPrintOptions::FillItemSet( SfxItemSet* rCoreAttrs )
aOpt.SetSkipEmpty( m_pSkipEmptyPagesCB->IsChecked() ); aOpt.SetSkipEmpty( m_pSkipEmptyPagesCB->IsChecked() );
aOpt.SetAllSheets( !m_pSelectedSheetsCB->IsChecked() ); aOpt.SetAllSheets( !m_pSelectedSheetsCB->IsChecked() );
aOpt.SetForceBreaks( m_pForceBreaksCB->IsChecked() ); aOpt.SetForceBreaks( m_pForceBreaksCB->IsChecked() );
rCoreAttrs->Put( ScTpPrintItem( SID_SCPRINTOPTIONS, aOpt ) ); rCoreAttrs->Put( ScTpPrintItem( aOpt ) );
if ( bSelectedSheetsChanged ) if ( bSelectedSheetsChanged )
{ {
rCoreAttrs->Put( SfxBoolItem( SID_PRINT_SELECTEDSHEET, m_pSelectedSheetsCB->IsChecked() ) ); rCoreAttrs->Put( SfxBoolItem( SID_PRINT_SELECTEDSHEET, m_pSelectedSheetsCB->IsChecked() ) );

View File

@ -154,7 +154,7 @@ bool ScTpContentOptions::FillItemSet( SfxItemSet* rCoreSet )
{ {
NamedColor aNamedColor = pColorLB->GetSelectEntry(); NamedColor aNamedColor = pColorLB->GetSelectEntry();
pLocalOptions->SetGridColor(aNamedColor.first, aNamedColor.second); pLocalOptions->SetGridColor(aNamedColor.first, aNamedColor.second);
rCoreSet->Put(ScTpViewItem(SID_SCVIEWOPTIONS, *pLocalOptions)); rCoreSet->Put(ScTpViewItem(*pLocalOptions));
bRet = true; bRet = true;
} }
if(pRangeFindCB->IsValueChangedFromSaved()) if(pRangeFindCB->IsValueChangedFromSaved())

View File

@ -5235,17 +5235,13 @@ void SAL_CALL ScCellRangeObj::setTableOperation( const table::CellRangeAddress&
bool bError = false; bool bError = false;
ScTabOpParam aParam; ScTabOpParam aParam;
aParam.aRefFormulaCell = ScRefAddress( (SCCOL)aFormulaRange.StartColumn, aParam.aRefFormulaCell = ScRefAddress( (SCCOL)aFormulaRange.StartColumn,
(SCROW)aFormulaRange.StartRow, aFormulaRange.Sheet, (SCROW)aFormulaRange.StartRow, aFormulaRange.Sheet );
false, false, false );
aParam.aRefFormulaEnd = ScRefAddress( (SCCOL)aFormulaRange.EndColumn, aParam.aRefFormulaEnd = ScRefAddress( (SCCOL)aFormulaRange.EndColumn,
(SCROW)aFormulaRange.EndRow, aFormulaRange.Sheet, (SCROW)aFormulaRange.EndRow, aFormulaRange.Sheet );
false, false, false );
aParam.aRefRowCell = ScRefAddress( (SCCOL)aRowCell.Column, aParam.aRefRowCell = ScRefAddress( (SCCOL)aRowCell.Column,
(SCROW)aRowCell.Row, aRowCell.Sheet, (SCROW)aRowCell.Row, aRowCell.Sheet );
false, false, false );
aParam.aRefColCell = ScRefAddress( (SCCOL)aColumnCell.Column, aParam.aRefColCell = ScRefAddress( (SCCOL)aColumnCell.Column,
(SCROW)aColumnCell.Row, aColumnCell.Sheet, (SCROW)aColumnCell.Row, aColumnCell.Sheet );
false, false, false );
switch (nMode) switch (nMode)
{ {

View File

@ -308,8 +308,7 @@ VclPtr<SfxModelessDialog> ScTabViewShell::CreateRefDialog(
ScViewData& rViewData = GetViewData(); ScViewData& rViewData = GetViewData();
ScRefAddress aCurPos ( rViewData.GetCurX(), ScRefAddress aCurPos ( rViewData.GetCurX(),
rViewData.GetCurY(), rViewData.GetCurY(),
rViewData.GetTabNo(), rViewData.GetTabNo());
false, false, false );
pResult = VclPtr<ScTabOpDlg>::Create( pB, pCW, pParent, rViewData.GetDocument(), aCurPos ); pResult = VclPtr<ScTabOpDlg>::Create( pB, pCW, pParent, rViewData.GetDocument(), aCurPos );
} }

View File

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

View File

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

View File

@ -40,7 +40,7 @@ SFX_IMPL_TOOLBOX_CONTROL( SdTbxCtlDiaPages, SfxUInt16Item )
// SdPagesField // SdPagesField
SdPagesField::SdPagesField( vcl::Window* pParent, SdPagesField::SdPagesField( vcl::Window* pParent,
const uno::Reference< frame::XFrame >& rFrame ) : const uno::Reference< frame::XFrame >& rFrame ) :
SvxMetricField ( pParent, rFrame, WB_BORDER | WB_SPIN | WB_REPEAT ), SvxMetricField ( pParent, rFrame ),
m_xFrame ( rFrame ) m_xFrame ( rFrame )
{ {
OUString aStr( SD_RESSTR( STR_SLIDE_PLURAL ) ); OUString aStr( SD_RESSTR( STR_SLIDE_PLURAL ) );

View File

@ -189,7 +189,7 @@ bool GraphicHelper::getThumbnailFormatFromGDI_Impl(GDIMetaFile* pMetaFile, const
BitmapEx aResultBitmap; BitmapEx aResultBitmap;
bResult = pMetaFile->CreateThumbnail(aResultBitmap, 256, BmpConversion::N8BitColors, BmpScaleFlag::Default); bResult = pMetaFile->CreateThumbnail(aResultBitmap, BmpConversion::N8BitColors, BmpScaleFlag::Default);
if (!bResult || aResultBitmap.IsEmpty()) if (!bResult || aResultBitmap.IsEmpty())
return false; return false;

View File

@ -29,7 +29,7 @@ enum SdrMeasureKind {SDRMEASURE_STD,SDRMEASURE_RADIUS}; // n.i.
class SdrMeasureKindItem: public SfxEnumItem<SdrMeasureKind> { class SdrMeasureKindItem: public SfxEnumItem<SdrMeasureKind> {
public: public:
SdrMeasureKindItem(SdrMeasureKind eKind=SDRMEASURE_STD): SfxEnumItem(SDRATTR_MEASUREKIND, eKind) {} SdrMeasureKindItem() : SfxEnumItem(SDRATTR_MEASUREKIND, SDRMEASURE_STD) {}
SdrMeasureKindItem(SvStream& rIn) : SfxEnumItem(SDRATTR_MEASUREKIND,rIn) {} SdrMeasureKindItem(SvStream& rIn) : SfxEnumItem(SDRATTR_MEASUREKIND,rIn) {}
virtual SfxPoolItem* Clone(SfxItemPool* pPool=nullptr) const override; virtual SfxPoolItem* Clone(SfxItemPool* pPool=nullptr) const override;
virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nVer) 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 ); SFX_IMPL_FLOATINGWINDOW_WITHID( SvxContourDlgChildWindow, SID_CONTOUR_DLG );
SvxContourDlgItem::SvxContourDlgItem( sal_uInt16 _nId, SvxSuperContourDlg& rContourDlg, SfxBindings& rBindings ) : SvxContourDlgItem::SvxContourDlgItem( SvxSuperContourDlg& rContourDlg, SfxBindings& rBindings ) :
SfxControllerItem ( _nId, rBindings ), SfxControllerItem ( SID_CONTOUR_EXEC, rBindings ),
rDlg ( rContourDlg ) rDlg ( rContourDlg )
{ {
} }
@ -217,7 +217,7 @@ SvxSuperContourDlg::SvxSuperContourDlg(SfxBindings *_pBindings, SfxChildWindow *
aCreateIdle ( "SvxSuperContourDlg CreateIdle" ), aCreateIdle ( "SvxSuperContourDlg CreateIdle" ),
pUpdateEditingObject( nullptr ), pUpdateEditingObject( nullptr ),
pCheckObj ( nullptr ), pCheckObj ( nullptr ),
aContourItem ( SID_CONTOUR_EXEC, *this, *_pBindings ), aContourItem ( *this, *_pBindings ),
nGrfChanged ( 0UL ), nGrfChanged ( 0UL ),
bExecState ( false ), bExecState ( false ),
bUpdateGraphicLinked( false ), bUpdateGraphicLinked( false ),

View File

@ -39,7 +39,7 @@ protected:
public: public:
SvxContourDlgItem( sal_uInt16 nId, SvxSuperContourDlg& rDlg, SfxBindings& rBindings ); SvxContourDlgItem( SvxSuperContourDlg& rDlg, SfxBindings& rBindings );
}; };
class SvxSuperContourDlg : public SvxContourDlg 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(); long nRet = mpThemePropertiesDialog->GetResult();
@ -325,12 +325,12 @@ void GalleryBrowser1::ImplEndGalleryThemeProperties(Dialog* /*pDialog*/, bool bC
IMPL_LINK( GalleryBrowser1, EndNewThemePropertiesDlgHdl, Dialog&, /*rDialog*/, void ) IMPL_LINK( GalleryBrowser1, EndNewThemePropertiesDlgHdl, Dialog&, /*rDialog*/, void )
{ {
ImplEndGalleryThemeProperties(nullptr, true); ImplEndGalleryThemeProperties(true);
} }
IMPL_LINK( GalleryBrowser1, EndThemePropertiesDlgHdl, Dialog&, /*rDialog*/, void ) IMPL_LINK( GalleryBrowser1, EndThemePropertiesDlgHdl, Dialog&, /*rDialog*/, void )
{ {
ImplEndGalleryThemeProperties(nullptr, false); ImplEndGalleryThemeProperties(false);
} }
IMPL_LINK( GalleryBrowser1, DestroyThemePropertiesDlgHdl, void*, /*p*/, void ) IMPL_LINK( GalleryBrowser1, DestroyThemePropertiesDlgHdl, void*, /*p*/, void )

View File

@ -96,7 +96,7 @@ private:
void ImplGetExecuteVector(::std::vector< sal_uInt16 >& o_aExec); void ImplGetExecuteVector(::std::vector< sal_uInt16 >& o_aExec);
void ImplExecute( sal_uInt16 nId ); void ImplExecute( sal_uInt16 nId );
void ImplGalleryThemeProperties( const OUString & rThemeName, bool bCreateNew ); void ImplGalleryThemeProperties( const OUString & rThemeName, bool bCreateNew );
void ImplEndGalleryThemeProperties(Dialog* pDialog, bool bCreateNew); void ImplEndGalleryThemeProperties(bool bCreateNew);
// Control // Control
virtual void Resize() override; virtual void Resize() override;

View File

@ -20,8 +20,8 @@
#include <svx/sdrundomanager.hxx> #include <svx/sdrundomanager.hxx>
SdrUndoManager::SdrUndoManager(sal_uInt16 nMaxUndoActionCount) SdrUndoManager::SdrUndoManager()
: EditUndoManager(nMaxUndoActionCount) : EditUndoManager(20/*nMaxUndoActionCount*/)
, maEndTextEditHdl() , maEndTextEditHdl()
, mpLastUndoActionBeforeTextEdit(nullptr) , mpLastUndoActionBeforeTextEdit(nullptr)
, mbEndTextEditTriggeredFromUndo(false) , mbEndTextEditTriggeredFromUndo(false)

View File

@ -241,7 +241,6 @@ void SdrEditView::ResizeMarkedObj(const Point& rRef, const Fraction& xFact, cons
void SdrEditView::ResizeMultMarkedObj(const Point& rRef, void SdrEditView::ResizeMultMarkedObj(const Point& rRef,
const Fraction& xFact, const Fraction& xFact,
const Fraction& yFact, const Fraction& yFact,
const bool bCopy,
const bool bWdh, const bool bWdh,
const bool bHgt) const bool bHgt)
{ {
@ -250,14 +249,9 @@ void SdrEditView::ResizeMultMarkedObj(const Point& rRef,
{ {
OUString aStr; OUString aStr;
ImpTakeDescriptionStr(STR_EditResize,aStr); ImpTakeDescriptionStr(STR_EditResize,aStr);
if (bCopy)
aStr+=ImpGetResStr(STR_EditWithCopy);
BegUndo(aStr); BegUndo(aStr);
} }
if (bCopy)
CopyMarkedObj();
const size_t nMarkCount=GetMarkedObjectCount(); const size_t nMarkCount=GetMarkedObjectCount();
for (size_t nm=0; nm<nMarkCount; ++nm) for (size_t nm=0; nm<nMarkCount; ++nm)
{ {
@ -1613,7 +1607,7 @@ void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr)
GetSdrPageView()->PagePosToLogic(aRef); GetSdrPageView()->PagePosToLogic(aRef);
} }
ResizeMultMarkedObj(aRef, aWdt, aHgt, false, bChgWdh, bChgHgt); ResizeMultMarkedObj(aRef, aWdt, aHgt, bChgWdh, bChgHgt);
} }
// rotate // rotate

View File

@ -2382,7 +2382,7 @@ void SdrObjEditView::ApplyFormatPaintBrush( SfxItemSet& rFormatSet, bool bNoChar
{ {
auto pTable = static_cast<sdr::table::SdrTableObj*>(pObj); auto pTable = static_cast<sdr::table::SdrTableObj*>(pObj);
if (pTable->getActiveCell().is()) { 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(); 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 ) void SdrTableObj::setTableStyle( const Reference< XIndexAccess >& xTableStyle )

View File

@ -242,8 +242,8 @@ void SvxLineBox::FillControl()
} }
SvxMetricField::SvxMetricField( SvxMetricField::SvxMetricField(
vcl::Window* pParent, const Reference< XFrame >& rFrame, WinBits nBits ) vcl::Window* pParent, const Reference< XFrame >& rFrame )
: MetricField(pParent, nBits) : MetricField(pParent, WB_BORDER | WB_SPIN | WB_REPEAT)
, aCurTxt() , aCurTxt()
, ePoolUnit(MapUnit::MapCM) , ePoolUnit(MapUnit::MapCM)
, mxFrame(rFrame) , mxFrame(rFrame)

View File

@ -137,7 +137,7 @@ public:
/** Move a range. /** Move a range.
*/ */
virtual bool MoveAndJoin(SwPaM&, SwPosition&, SwMoveFlags) = 0; virtual bool MoveAndJoin(SwPaM&, SwPosition&) = 0;
/** Overwrite string in an existing text node. /** Overwrite string in an existing text node.
*/ */

View File

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

View File

@ -2322,14 +2322,14 @@ bool DocumentContentOperationsManager::MoveNodeRange( SwNodeRange& rRange, SwNod
return true; return true;
} }
bool DocumentContentOperationsManager::MoveAndJoin( SwPaM& rPaM, SwPosition& rPos, SwMoveFlags eMvFlags ) bool DocumentContentOperationsManager::MoveAndJoin( SwPaM& rPaM, SwPosition& rPos )
{ {
SwNodeIndex aIdx( rPaM.Start()->nNode ); SwNodeIndex aIdx( rPaM.Start()->nNode );
bool bJoinText = aIdx.GetNode().IsTextNode(); bool bJoinText = aIdx.GetNode().IsTextNode();
bool bOneNode = rPaM.GetPoint()->nNode == rPaM.GetMark()->nNode; bool bOneNode = rPaM.GetPoint()->nNode == rPaM.GetMark()->nNode;
aIdx--; // in front of the move area! aIdx--; // in front of the move area!
bool bRet = MoveRange( rPaM, rPos, eMvFlags ); bool bRet = MoveRange( rPaM, rPos, SwMoveFlags::DEFAULT );
if( bRet && !bOneNode ) if( bRet && !bOneNode )
{ {
if( bJoinText ) if( bJoinText )

View File

@ -1263,7 +1263,7 @@ void SwRangeRedline::MoveToSection()
SwNodeIndex aNdIdx( *pTextNd ); SwNodeIndex aNdIdx( *pTextNd );
SwPosition aPos( aNdIdx, SwIndex( pTextNd )); SwPosition aPos( aNdIdx, SwIndex( pTextNd ));
if( pCSttNd && pCEndNd ) if( pCSttNd && pCEndNd )
pDoc->getIDocumentContentOperations().MoveAndJoin( aPam, aPos, SwMoveFlags::DEFAULT ); pDoc->getIDocumentContentOperations().MoveAndJoin( aPam, aPos );
else else
{ {
if( pCSttNd && !pCEndNd ) if( pCSttNd && !pCEndNd )

View File

@ -54,7 +54,7 @@ public:
bool MoveNodeRange(SwNodeRange&, SwNodeIndex&, SwMoveFlags) override; 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; bool Overwrite(const SwPaM &rRg, const OUString& rStr) override;

View File

@ -32,8 +32,8 @@
using namespace ::com::sun::star::uno; using namespace ::com::sun::star::uno;
SwUndoField::SwUndoField(const SwPosition & rPos, SwUndoId _nId ) SwUndoField::SwUndoField(const SwPosition & rPos )
: SwUndo(_nId, rPos.GetDoc()) : SwUndo(SwUndoId::FIELD, rPos.GetDoc())
{ {
nNodeIndex = rPos.nNode.GetIndex(); nNodeIndex = rPos.nNode.GetIndex();
nOffset = rPos.nContent.GetIndex(); nOffset = rPos.nContent.GetIndex();
@ -58,7 +58,7 @@ SwUndoFieldFromDoc::SwUndoFieldFromDoc(const SwPosition & rPos,
const SwField & rOldField, const SwField & rOldField,
const SwField & rNewField, const SwField & rNewField,
SwMsgPoolItem * _pHint, bool _bUpdate) SwMsgPoolItem * _pHint, bool _bUpdate)
: SwUndoField(rPos,SwUndoId::FIELD) : SwUndoField(rPos)
, pOldField(rOldField.CopyField()) , pOldField(rOldField.CopyField())
, pNewField(rNewField.CopyField()) , pNewField(rNewField.CopyField())
, pHint(_pHint) , pHint(_pHint)

View File

@ -183,13 +183,11 @@ public:
class SwTrnsfrActionAndUndo class SwTrnsfrActionAndUndo
{ {
SwWrtShell *pSh; SwWrtShell *pSh;
SwUndoId eUndoId;
public: public:
SwTrnsfrActionAndUndo( SwWrtShell *pS, SwUndoId nId, SwTrnsfrActionAndUndo( SwWrtShell *pS, bool bDelSel = false)
bool bDelSel = false) : pSh( pS )
: pSh( pS ), eUndoId( nId )
{ {
pSh->StartUndo( eUndoId ); pSh->StartUndo( SwUndoId::PASTE_CLIPBOARD );
if( bDelSel ) if( bDelSel )
pSh->DelRight(); pSh->DelRight();
pSh->StartAllAction(); pSh->StartAllAction();
@ -1250,7 +1248,7 @@ bool SwTransferable::PasteData( TransferableDataHelper& rData,
if( bDelSel ) if( bDelSel )
// #i34830# // #i34830#
pAction.reset(new SwTrnsfrActionAndUndo( &rSh, SwUndoId::PASTE_CLIPBOARD, true )); pAction.reset(new SwTrnsfrActionAndUndo( &rSh, true ));
} }
SwTransferable *pTrans=nullptr, *pTunneledTrans=GetSwTransferable( rData ); SwTransferable *pTrans=nullptr, *pTunneledTrans=GetSwTransferable( rData );
@ -1295,7 +1293,7 @@ bool SwTransferable::PasteData( TransferableDataHelper& rData,
{ {
if( !pAction ) if( !pAction )
{ {
pAction.reset(new SwTrnsfrActionAndUndo( &rSh, SwUndoId::PASTE_CLIPBOARD)); pAction.reset(new SwTrnsfrActionAndUndo( &rSh ));
} }
// in Drag&Drop MessageBoxes must not be showed // in Drag&Drop MessageBoxes must not be showed
@ -3247,7 +3245,7 @@ bool SwTransferable::PrivatePaste( SwWrtShell& rShell )
const int nSelection = rShell.GetSelectionType(); const int nSelection = rShell.GetSelectionType();
SwTrnsfrActionAndUndo aAction( &rShell, SwUndoId::PASTE_CLIPBOARD); SwTrnsfrActionAndUndo aAction( &rShell );
bool bKillPaMs = false; 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()) 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) else if (rEvt.GetWindow() == mpImplWin)
mpImplWin->DrawEntry(*rEvt.GetRenderContext(), bDrawImage, bDrawTextAtImagePos); mpImplWin->DrawEntry(*rEvt.GetRenderContext(), true/*bDrawImage*/, false/*bDrawTextAtImagePos*/);
} }
void ListBox::EnableUserDraw( bool bUserDraw ) void ListBox::EnableUserDraw( bool bUserDraw )

View File

@ -189,13 +189,11 @@ 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; bool bRetValue = true;
if ( rXPropSet.is() ) if ( rXPropSet.is() )
{
if ( bTestPropertyAvailability )
{ {
bRetValue = false; bRetValue = false;
try try
@ -207,8 +205,6 @@ bool FilterConfigItem::ImplGetPropertyValue( Any& rAny, const Reference< XProper
} }
catch( css::uno::Exception& ) catch( css::uno::Exception& )
{ {
}
} }
if ( bRetValue ) if ( bRetValue )
{ {
@ -281,7 +277,7 @@ bool FilterConfigItem::ReadBool( const OUString& rKey, bool bDefault )
{ {
pPropVal->Value >>= bRetValue; pPropVal->Value >>= bRetValue;
} }
else if ( ImplGetPropertyValue( aAny, xPropSet, rKey, true ) ) else if ( ImplGetPropertyValue( aAny, xPropSet, rKey ) )
{ {
aAny >>= bRetValue; aAny >>= bRetValue;
} }
@ -301,7 +297,7 @@ sal_Int32 FilterConfigItem::ReadInt32( const OUString& rKey, sal_Int32 nDefault
{ {
pPropVal->Value >>= nRetValue; pPropVal->Value >>= nRetValue;
} }
else if ( ImplGetPropertyValue( aAny, xPropSet, rKey, true ) ) else if ( ImplGetPropertyValue( aAny, xPropSet, rKey ) )
{ {
aAny >>= nRetValue; aAny >>= nRetValue;
} }
@ -321,7 +317,7 @@ OUString FilterConfigItem::ReadString( const OUString& rKey, const OUString& rDe
{ {
pPropVal->Value >>= aRetValue; pPropVal->Value >>= aRetValue;
} }
else if ( ImplGetPropertyValue( aAny, xPropSet, rKey, true ) ) else if ( ImplGetPropertyValue( aAny, xPropSet, rKey ) )
{ {
aAny >>= aRetValue; aAny >>= aRetValue;
} }
@ -342,7 +338,7 @@ void FilterConfigItem::WriteBool( const OUString& rKey, bool bNewValue )
if ( xPropSet.is() ) if ( xPropSet.is() )
{ {
Any aAny; Any aAny;
if ( ImplGetPropertyValue( aAny, xPropSet, rKey, true ) ) if ( ImplGetPropertyValue( aAny, xPropSet, rKey ) )
{ {
bool bOldValue(true); bool bOldValue(true);
if ( aAny >>= bOldValue ) if ( aAny >>= bOldValue )
@ -375,7 +371,7 @@ void FilterConfigItem::WriteInt32( const OUString& rKey, sal_Int32 nNewValue )
{ {
Any aAny; Any aAny;
if ( ImplGetPropertyValue( aAny, xPropSet, rKey, true ) ) if ( ImplGetPropertyValue( aAny, xPropSet, rKey ) )
{ {
sal_Int32 nOldValue = 0; sal_Int32 nOldValue = 0;
if ( aAny >>= nOldValue ) if ( aAny >>= nOldValue )

View File

@ -2811,7 +2811,7 @@ SvStream& GDIMetaFile::Write( SvStream& rOStm )
return 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 // initialization seems to be complicated but is used to avoid rounding errors
ScopedVclPtrInstance< VirtualDevice > aVDev; 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() ) ); const Point aBRPix( aVDev->LogicToPixel( Point( GetPrefSize().Width() - 1, GetPrefSize().Height() - 1 ), GetPrefMapMode() ) );
Size aDrawSize( aVDev->LogicToPixel( GetPrefSize(), GetPrefMapMode() ) ); Size aDrawSize( aVDev->LogicToPixel( GetPrefSize(), GetPrefMapMode() ) );
Size aSizePix( labs( aBRPix.X() - aTLPix.X() ) + 1, labs( aBRPix.Y() - aTLPix.Y() ) + 1 ); Size aSizePix( labs( aBRPix.X() - aTLPix.X() ) + 1, labs( aBRPix.Y() - aTLPix.Y() ) + 1 );
sal_uInt32 nMaximumExtent = 256;
if (!rBitmapEx.IsEmpty()) if (!rBitmapEx.IsEmpty())
rBitmapEx.SetEmpty(); 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); return mpImplImageTree->loadImage(rName, rStyle, rBitmap, bLocalized, eFlags);
} }
bool ImageTree::loadDefaultImage(OUString const & rStyle, BitmapEx& rBitmap, bool ImageTree::loadDefaultImage(OUString const & rStyle, BitmapEx& rBitmap)
const ImageLoadFlags eFlags)
{ {
return mpImplImageTree->loadDefaultImage(rStyle, rBitmap, eFlags); return mpImplImageTree->loadDefaultImage(rStyle, rBitmap, ImageLoadFlags::NONE);
} }
css::uno::Reference<css::container::XNameAccess> ImageTree::getNameAccess() 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) VclVPaned::VclVPaned(vcl::Window *pParent)
: VclContainer(pParent, nStyle) : VclContainer(pParent, WB_HIDE | WB_CLIPCHILDREN)
, m_pSplitter(VclPtr<Splitter>::Create(this, WB_VSCROLL)) , m_pSplitter(VclPtr<Splitter>::Create(this, WB_VSCROLL))
, m_nPosition(-1) , m_nPosition(-1)
{ {

View File

@ -195,7 +195,7 @@ void Menu::dispose()
mpLayoutData = nullptr; mpLayoutData = nullptr;
// Native-support: destroy SalMenu // Native-support: destroy SalMenu
ImplSetSalMenu( nullptr ); ImplClearSalMenu();
pStartedFrom.clear(); pStartedFrom.clear();
pWindow.clear(); pWindow.clear();
@ -2353,11 +2353,11 @@ OUString Menu::GetAccessibleName( sal_uInt16 nItemId ) const
return OUString(); return OUString();
} }
void Menu::ImplSetSalMenu( SalMenu *pSalMenu ) void Menu::ImplClearSalMenu()
{ {
if( mpSalMenu ) if( mpSalMenu )
ImplGetSVData()->mpDefInst->DestroyMenu( mpSalMenu ); ImplGetSVData()->mpDefInst->DestroyMenu( mpSalMenu );
mpSalMenu = pSalMenu; mpSalMenu = nullptr;
} }
bool Menu::GetSystemMenuData( SystemMenuData* pData ) const 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; long nSplitSize = mpMainSet->mnSplitSize-1;
if (mbFadeOut || mbFadeIn) if (mbFadeOut || mbFadeIn)
@ -1623,6 +1623,7 @@ void SplitWindow::ImplGetButtonRect( tools::Rectangle& rRect, long nEx, bool bTe
nCenterEx += ((mnDX-mnLeftBorder-mnRightBorder)-nButtonSize)/2; nCenterEx += ((mnDX-mnLeftBorder-mnRightBorder)-nButtonSize)/2;
else else
nCenterEx += ((mnDY-mnTopBorder-mnBottomBorder)-nButtonSize)/2; nCenterEx += ((mnDY-mnTopBorder-mnBottomBorder)-nButtonSize)/2;
long nEx = 0;
if ( nCenterEx > 0 ) if ( nCenterEx > 0 )
nEx += nCenterEx; nEx += nCenterEx;
@ -1680,7 +1681,7 @@ void SplitWindow::ImplGetFadeInRect( tools::Rectangle& rRect, bool bTest ) const
tools::Rectangle aRect; tools::Rectangle aRect;
if ( mbFadeIn ) if ( mbFadeIn )
ImplGetButtonRect( aRect, 0, bTest ); ImplGetButtonRect( aRect, bTest );
rRect = aRect; rRect = aRect;
} }
@ -1690,7 +1691,7 @@ void SplitWindow::ImplGetFadeOutRect( tools::Rectangle& rRect, bool ) const
tools::Rectangle aRect; tools::Rectangle aRect;
if ( mbFadeOut ) if ( mbFadeOut )
ImplGetButtonRect( aRect, 0, false ); ImplGetButtonRect( aRect, false );
rRect = aRect; rRect = aRect;
} }