loplugin:constantparam part2

Change-Id: I7ec4c946be52a6b56aee908426f95ecacc7b0746
Reviewed-on: https://gerrit.libreoffice.org/36072
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 14:13:00 +02:00
parent 3d6c84f2d9
commit ff339c89b5
60 changed files with 118 additions and 191 deletions

View File

@ -103,10 +103,9 @@ DocumentEntry::~DocumentEntry()
LibEntry::LibEntry (
ScriptDocument const& rDocument,
LibraryLocation eLocation,
OUString const& rLibName,
EntryType eType
OUString const& rLibName
) :
DocumentEntry(rDocument, eLocation, eType),
DocumentEntry(rDocument, eLocation, OBJ_TYPE_LIBRARY),
m_aLibName(rLibName)
{ }

View File

@ -107,8 +107,7 @@ public:
LibEntry (
ScriptDocument const& rDocument,
LibraryLocation eLocation,
OUString const& rLibName,
EntryType eType = OBJ_TYPE_LIBRARY
OUString const& rLibName
);
virtual ~LibEntry () override;

View File

@ -1777,14 +1777,10 @@ bool SbModule::HasExeCode()
}
// Store only image, no source
void SbModule::StoreBinaryData( SvStream& rStrm, sal_uInt16 nVer )
void SbModule::StoreBinaryData( SvStream& rStrm )
{
if (!Compile())
return;
bool bFixup = ( !nVer && !pImage->ExceedsLegacyLimits() );// save in old image format, fix up method starts
if ( bFixup ) // save in old image format, fix up method starts
fixUpMethodStart( true );
if (!SbxObject::StoreData(rStrm))
return;
@ -1794,12 +1790,7 @@ void SbModule::StoreBinaryData( SvStream& rStrm, sal_uInt16 nVer )
pImage->aName = GetName();
rStrm.WriteUChar(1);
if (nVer)
pImage->Save(rStrm);
else
pImage->Save(rStrm, B_LEGACYVERSION);
if (bFixup)
fixUpMethodStart(false); // restore method starts
pImage->Save(rStrm);
pImage->aOUSource = aOUSource;
}

View File

@ -627,7 +627,7 @@ bool SfxScriptLibraryContainer::implStorePasswordLibrary( SfxLibrary* pLib, cons
throw uno::RuntimeException("null returned from openStreamElement");
}
SvMemoryStream aMemStream;
/*sal_Bool bStore = */pMod->StoreBinaryData( aMemStream, B_CURVERSION );
/*sal_Bool bStore = */pMod->StoreBinaryData( aMemStream );
sal_Int32 const nSize = aMemStream.Tell();
if (nSize < 0) { abort(); }
@ -765,7 +765,7 @@ bool SfxScriptLibraryContainer::implStorePasswordLibrary( SfxLibrary* pLib, cons
embed::ElementModes::WRITE | embed::ElementModes::TRUNCATE );
SvMemoryStream aMemStream;
/*sal_Bool bStore = */pMod->StoreBinaryData( aMemStream, B_CURVERSION );
/*sal_Bool bStore = */pMod->StoreBinaryData( aMemStream );
sal_Int32 const nSize = aMemStream.Tell();
if (nSize < 0) { abort(); }

View File

@ -76,10 +76,10 @@ private:
};
SimplePasswordRequest::SimplePasswordRequest( PasswordRequestMode eMode )
SimplePasswordRequest::SimplePasswordRequest()
{
PasswordRequest aRequest( OUString(), Reference< XInterface >(),
InteractionClassification_QUERY, eMode );
InteractionClassification_QUERY, css::task::PasswordRequestMode_PASSWORD_CREATE );
maRequest <<= aRequest;
mxAbort = new AbortContinuation;

View File

@ -268,7 +268,7 @@ IMPL_LINK_NOARG(WebConnectionInfoDialog, ChangePasswordHdl, Button*, void)
OUString aUserName = SvTabListBox::GetEntryText( pEntry, 1 );
::comphelper::SimplePasswordRequest* pPasswordRequest
= new ::comphelper::SimplePasswordRequest( task::PasswordRequestMode_PASSWORD_CREATE );
= new ::comphelper::SimplePasswordRequest;
uno::Reference< task::XInteractionRequest > rRequest( pPasswordRequest );
uno::Reference< task::XInteractionHandler > xInteractionHandler(

View File

@ -79,7 +79,7 @@ namespace dbaui
get(m_pTables, "TablesFilterPage");
get(m_pTablesList, "treeview");
m_pTablesList->init(true);
m_pTablesList->init();
m_pTablesList->set_width_request(56 * m_pTablesList->approximate_char_width());
m_pTablesList->set_height_request(12 * m_pTablesList->GetTextHeight());

View File

@ -139,8 +139,6 @@ namespace dbaui
const SharedConnection& _rxConnection,
const css::uno::Reference< css::util::XNumberFormatter >& _rxNumberF,
const css::uno::Reference< css::uno::XComponentContext >& _rxContext,
const TColumnVector* rList,
const OTypeInfoMap* _pInfoMap,
SvStream& _rInputStream
);

View File

@ -72,7 +72,7 @@ namespace dbaui
void setSlotEnabled(sal_Int32 _nSlotId, bool _bEnable);
void setNoneVisbleRow(sal_Int32 _nRows);
void SaveUIConfig();
bool reset( ::dbtools::SQLExceptionInfo* _pErrorInfo );
bool reset();
void GrabFocus();
// returns the add table dialog from the design view

View File

@ -84,7 +84,7 @@ namespace dbaui
void initialize() override { m_pViewSwitch->initialize(); }
void SaveUIConfig() { m_pViewSwitch->SaveUIConfig(); }
void reset() { m_pViewSwitch->reset( nullptr ); }
void reset() { m_pViewSwitch->reset(); }
bool switchView( ::dbtools::SQLExceptionInfo* _pErrorInfo );
void forceInitialView();

View File

@ -48,7 +48,7 @@ protected:
public:
OTableTreeListBox(vcl::Window* pParent, WinBits nWinStyle);
void init(bool bVirtualRoot) { m_bVirtualRoot = bVirtualRoot; }
void init() { m_bVirtualRoot = true; }
typedef std::pair< OUString, bool > TTableViewName;
typedef std::vector< TTableViewName > TNames;

View File

@ -139,8 +139,6 @@ ODatabaseExport::ODatabaseExport(sal_Int32 nRows,
ODatabaseExport::ODatabaseExport(const SharedConnection& _rxConnection,
const Reference< XNumberFormatter >& _rxNumberF,
const Reference< css::uno::XComponentContext >& _rxContext,
const TColumnVector* pList,
const OTypeInfoMap* _pInfoMap,
SvStream& _rInputStream)
:m_aDestColumns(_rxConnection->getMetaData().is() && _rxConnection->getMetaData()->supportsMixedCaseQuotedIdentifiers())
,m_xConnection(_rxConnection)
@ -279,7 +277,6 @@ ODatabaseExport::ODatabaseExport(const SharedConnection& _rxConnection,
}
if ( !m_pTypeInfo )
m_pTypeInfo = std::make_shared<OTypeInfo>();
SetColumnTypes(pList,_pInfoMap);
}
ODatabaseExport::~ODatabaseExport()

View File

@ -71,7 +71,7 @@ OHTMLReader::OHTMLReader(SvStream& rIn,const SharedConnection& _rxConnection,
const Reference< css::util::XNumberFormatter >& _rxNumberF,
const css::uno::Reference< css::uno::XComponentContext >& _rxContext)
: HTMLParser(rIn)
, ODatabaseExport( _rxConnection, _rxNumberF, _rxContext, nullptr, nullptr, rIn )
, ODatabaseExport( _rxConnection, _rxNumberF, _rxContext, rIn )
, m_nTableCount(0)
, m_nWidth(0)
, m_nColumnWidth(87)

View File

@ -63,7 +63,7 @@ ORTFReader::ORTFReader( SvStream& rIn,
const Reference< css::util::XNumberFormatter >& _rxNumberF,
const css::uno::Reference< css::uno::XComponentContext >& _rxContext)
:SvRTFParser(rIn)
,ODatabaseExport( _rxConnection, _rxNumberF, _rxContext, nullptr, nullptr, rIn )
,ODatabaseExport( _rxConnection, _rxNumberF, _rxContext, rIn )
{
m_bAppendFirstLine = false;
}

View File

@ -277,13 +277,13 @@ Reference< XComponentContext > OQueryViewSwitch::getORB() const
return m_pDesignView->getORB();
}
bool OQueryViewSwitch::reset( ::dbtools::SQLExceptionInfo* _pErrorInfo )
bool OQueryViewSwitch::reset()
{
m_pDesignView->reset();
if ( !m_pDesignView->initByParseIterator( _pErrorInfo ) )
if ( !m_pDesignView->initByParseIterator( nullptr ) )
return false;
if ( switchView( _pErrorInfo ) )
if ( switchView( nullptr ) )
return false;
return true;

View File

@ -147,8 +147,7 @@ OUString SvxNumberType::GetNumStr( sal_uLong nNo, const css::lang::Locale& rLoca
return OUString();
}
SvxNumberFormat::SvxNumberFormat( SvxNumType eType,
SvxNumPositionAndSpaceMode ePositionAndSpaceMode )
SvxNumberFormat::SvxNumberFormat( SvxNumType eType )
: SvxNumberType(eType),
eNumAdjust(SvxAdjust::Left),
nInclUpperLevels(0),
@ -156,7 +155,7 @@ SvxNumberFormat::SvxNumberFormat( SvxNumType eType,
cBullet(SVX_DEF_BULLET),
nBulletRelSize(100),
nBulletColor(COL_BLACK),
mePositionAndSpaceMode( ePositionAndSpaceMode ),
mePositionAndSpaceMode( LABEL_WIDTH_AND_POSITION ),
nFirstLineOffset(0),
nAbsLSpace(0),
nCharTextDistance(0),

View File

@ -4113,11 +4113,11 @@ sal_uInt32 EscherGraphicProvider::GetBlibStoreContainerSize( SvStream* pMergePic
}
void EscherGraphicProvider::WriteBlibStoreEntry(SvStream& rSt,
sal_uInt32 nBlipId, bool bWritePictureOffSet, sal_uInt32 nResize)
sal_uInt32 nBlipId, sal_uInt32 nResize)
{
if (nBlipId > mnBlibEntrys || nBlipId == 0)
return;
mpBlibEntrys[nBlipId-1]->WriteBlibEntry(rSt, bWritePictureOffSet, nResize);
mpBlibEntrys[nBlipId-1]->WriteBlibEntry(rSt, true/*bWritePictureOffSet*/, nResize);
}
void EscherGraphicProvider::WriteBlibStoreContainer( SvStream& rSt, SvStream* pMergePicStreamBSE )
@ -4794,8 +4794,8 @@ void EscherSolverContainer::WriteSolver( SvStream& rStrm )
}
}
EscherExGlobal::EscherExGlobal( EscherGraphicProviderFlags nGraphicProvFlags ) :
EscherGraphicProvider( nGraphicProvFlags ),
EscherExGlobal::EscherExGlobal() :
EscherGraphicProvider( EscherGraphicProviderFlags::NONE ),
mpPicStrm( nullptr ),
mbHasDggCont( false ),
mbPicStrmQueried( false )

View File

@ -5512,8 +5512,7 @@ SdrObject* SvxMSDffManager::FinalizeObj(DffObjData& /* rObjData */, SdrObject* p
void SvxMSDffManager::StoreShapeOrder(sal_uLong nId,
sal_uLong nTxBx,
SdrObject* pObject,
SwFlyFrameFormat* pFly,
short nHdFtSection) const
SwFlyFrameFormat* pFly) const
{
sal_uInt16 nShpCnt = m_pShapeOrders->size();
for (sal_uInt16 nShapeNum=0; nShapeNum < nShpCnt; nShapeNum++)
@ -5525,7 +5524,7 @@ void SvxMSDffManager::StoreShapeOrder(sal_uLong nId,
rOrder.nTxBxComp = nTxBx;
rOrder.pObj = pObject;
rOrder.pFly = pFly;
rOrder.nHdFtSection = nHdFtSection;
rOrder.nHdFtSection = 0;
}
}
}
@ -6578,7 +6577,7 @@ bool SvxMSDffManager::MakeContentStream( SotStorage * pStor, const GDIMetaFile &
sal_uInt16 nAspect = ASPECT_CONTENT;
sal_uLong nAdviseModes = 2;
Impl_OlePres aEle( SotClipboardFormatId::GDIMETAFILE );
Impl_OlePres aEle;
// Convert the size in 1/100 mm
// If a not applicable MapUnit (device dependent) is used,
// SV tries to guess a best match for the right value
@ -7290,7 +7289,7 @@ SvxMSDffImportRec::SvxMSDffImportRec()
nCropFromBottom( 0 ),
nCropFromLeft( 0 ),
nCropFromRight( 0 ),
aTextId( 0, 0 ),
aTextId(),
nNextShapeId( 0 ),
nShapeId( 0 ),
eShapeType( mso_sptNil ),

View File

@ -159,9 +159,9 @@ using namespace drawing ;
using namespace container ;
using namespace table ;
PowerPointImportParam::PowerPointImportParam( SvStream& rDocStrm, sal_uInt32 nFlags ) :
PowerPointImportParam::PowerPointImportParam( SvStream& rDocStrm ) :
rDocStream ( rDocStrm ),
nImportFlags ( nFlags )
nImportFlags ( 0 )
{
}

View File

@ -35,8 +35,8 @@ class Impl_OlePres
sal_uInt32 nAdvFlags;
Size aSize; // size in 100TH_MM
public:
explicit Impl_OlePres( SotClipboardFormatId nF )
: nFormat( nF )
explicit Impl_OlePres()
: nFormat( SotClipboardFormatId::GDIMETAFILE )
, nAspect( ASPECT_CONTENT )
, pMtf( nullptr )
, nAdvFlags( 0x2 ) // found in document

View File

@ -917,7 +917,7 @@ IMPL_LINK ( RemoteFilesDialog, EditServiceMenuHdl, MenuButton *, pButton, void )
OUString sUserName = aURLEntries.UserList[0].UserName;
::comphelper::SimplePasswordRequest* pPasswordRequest
= new ::comphelper::SimplePasswordRequest( PasswordRequestMode_PASSWORD_CREATE );
= new ::comphelper::SimplePasswordRequest;
Reference< XInteractionRequest > rRequest( pPasswordRequest );
xInteractionHandler->handle( rRequest );

View File

@ -115,7 +115,7 @@ public:
void ClearAllBP();
// Store only image, no source (needed for new password protection)
void StoreBinaryData( SvStream&, sal_uInt16 nVer );
void StoreBinaryData( SvStream& );
void LoadBinaryData( SvStream& );
bool ExceedsLegacyModuleSize();
void fixUpMethodStart( bool bCvtToLegacy, SbiImage* pImg = nullptr ) const;

View File

@ -44,7 +44,7 @@ class COMPHELPER_DLLPUBLIC SimplePasswordRequest :
public cppu::WeakImplHelper<css::task::XInteractionRequest>
{
public:
explicit SimplePasswordRequest( css::task::PasswordRequestMode eMode );
explicit SimplePasswordRequest();
virtual ~SimplePasswordRequest() override;
bool isPassword() const;

View File

@ -142,8 +142,7 @@ private:
OUString sCharStyleName; // Character Style
public:
explicit SvxNumberFormat( SvxNumType nNumberingType,
SvxNumPositionAndSpaceMode ePositionAndSpaceMode = LABEL_WIDTH_AND_POSITION );
explicit SvxNumberFormat( SvxNumType nNumberingType );
SvxNumberFormat(const SvxNumberFormat& rFormat);
SvxNumberFormat( SvStream & rStream );

View File

@ -572,8 +572,7 @@ public:
sal_uInt32 GetBlibStoreContainerSize( SvStream* pMergePicStreamBSE = nullptr ) const;
void WriteBlibStoreContainer( SvStream& rStrm, SvStream* pMergePicStreamBSE = nullptr );
void WriteBlibStoreEntry(SvStream& rStrm, sal_uInt32 nBlipId,
bool bWritePictureOffset, sal_uInt32 nResize);
void WriteBlibStoreEntry(SvStream& rStrm, sal_uInt32 nBlipId, sal_uInt32 nResize);
sal_uInt32 GetBlibID(
SvStream& rPicOutStream,
const OString& rGraphicId,
@ -945,7 +944,7 @@ public:
class MSFILTER_DLLPUBLIC EscherExGlobal : public EscherGraphicProvider
{
public:
explicit EscherExGlobal( EscherGraphicProviderFlags nGraphicProvFlags = EscherGraphicProviderFlags::NONE );
explicit EscherExGlobal();
virtual ~EscherExGlobal() override;
/** Returns a new drawing ID for a new drawing container (DGCONTAINER). */

View File

@ -202,10 +202,10 @@ struct MSDffTxId
{
sal_uInt16 nTxBxS;
sal_uInt16 nSequence;
MSDffTxId( sal_uInt16 nTxBxS_, sal_uInt16 nSequence_ )
: nTxBxS( nTxBxS_ ), nSequence( nSequence_ ){}
MSDffTxId()
: nTxBxS( 0 ), nSequence( 0 ) {}
MSDffTxId( const MSDffTxId& rCopy )
: nTxBxS( rCopy.nTxBxS ), nSequence( rCopy.nSequence ){}
: nTxBxS( rCopy.nTxBxS ), nSequence( rCopy.nSequence ) {}
};
struct MSFILTER_DLLPUBLIC SvxMSDffImportRec
@ -690,8 +690,7 @@ public:
void StoreShapeOrder(sal_uLong nId,
sal_uLong nTxBx,
SdrObject* pObject,
SwFlyFrameFormat* pFly = nullptr,
short nHdFtSection = 0) const;
SwFlyFrameFormat* pFly = nullptr) const;
void ExchangeInShapeOrder(SdrObject* pOldObject,
sal_uLong nTxBx,

View File

@ -99,7 +99,7 @@ struct MSFILTER_DLLPUBLIC PowerPointImportParam
sal_uInt32 nImportFlags;
PptCurrentUserAtom aCurrentUserAtom;
PowerPointImportParam( SvStream& rDocStream, sal_uInt32 nImportFlags );
PowerPointImportParam( SvStream& rDocStream );
};
struct SdHyperlinkEntry

View File

@ -67,7 +67,7 @@ class SpellAlternatives
public:
LNG_DLLPUBLIC SpellAlternatives();
SpellAlternatives(const OUString &rWord, sal_Int16 nLang, sal_Int16 nFailureType,
SpellAlternatives(const OUString &rWord, sal_Int16 nLang,
const css::uno::Sequence< OUString > &rAlternatives );
virtual ~SpellAlternatives() override;
SpellAlternatives(const SpellAlternatives&) = delete;

View File

@ -45,18 +45,11 @@ namespace CodecHelper
/** Encodes and decodes data from/to protected MS Office documents.
Implements a simple XOR encoding/decoding algorithm used in MS Office
Implements a simple XOR encoding/decoding algorithm used in MS Excel Office
versions up to MSO 95.
*/
class OOX_DLLPUBLIC BinaryCodec_XOR
{
public:
/** Enumerates codec types supported by this XOR codec implementation. */
enum CodecType
{
Excel ///< MS Excel XOR codec.
};
public:
/** Default constructor.
@ -64,7 +57,7 @@ public:
functions allows to try to initialize with different passwords (e.g.
built-in default password used for Excel workbook protection).
*/
explicit BinaryCodec_XOR( CodecType eCodecType );
explicit BinaryCodec_XOR();
~BinaryCodec_XOR();
@ -126,7 +119,6 @@ public:
bool skip( sal_Int32 nBytes );
private:
CodecType meCodecType; ///< Codec type.
sal_uInt8 mpnKey[ 16 ]; ///< Encryption key.
sal_Int32 mnOffset; ///< Key offset.
sal_uInt16 mnBaseKey; ///< Base key from password.

View File

@ -144,29 +144,23 @@ public:
OUString readNulUnicodeArray();
/** Reads a byte character array and returns the string.
NUL characters are replaced by question marks.
@param nChars
Number of characters (bytes) to read from the stream.
@param bAllowNulChars
True = NUL characters are inserted into the imported string.
False = NUL characters are replaced by question marks (default).
*/
OString readCharArray( sal_Int32 nChars, bool bAllowNulChars );
OString readCharArray( sal_Int32 nChars );
/** Reads a byte character array and returns a Unicode string.
NUL characters are replaced by question marks.
@param nChars
Number of characters (bytes) to read from the stream.
@param eTextEnc
The text encoding used to create the Unicode string.
@param bAllowNulChars
True = NUL characters are inserted into the imported string.
False = NUL characters are replaced by question marks (default).
*/
OUString readCharArrayUC( sal_Int32 nChars, rtl_TextEncoding eTextEnc, bool bAllowNulChars = false );
OUString readCharArrayUC( sal_Int32 nChars, rtl_TextEncoding eTextEnc );
/** Reads a Unicode character array and returns the string.

View File

@ -398,8 +398,7 @@ class ComCtlModelBase : public ControlModelBase
{
public:
explicit ComCtlModelBase(
sal_uInt32 nDataPartId5, sal_uInt32 nDataPartId6, sal_uInt16 nVersion,
bool bCommonPart, bool bComplexPart );
sal_uInt32 nDataPartId5, sal_uInt32 nDataPartId6, sal_uInt16 nVersion );
virtual bool importBinaryModel( BinaryInputStream& rInStrm ) override;
virtual void convertProperties( PropertyMap& rPropMap, const ControlConverter& rConv ) const override;

View File

@ -77,10 +77,7 @@ struct StdFontInfo
explicit StdFontInfo();
explicit StdFontInfo(
const OUString& rName,
sal_uInt32 nHeight,
sal_uInt16 nWeight = OLE_STDFONT_NORMAL,
sal_uInt16 nCharSet = WINDOWS_CHARSET_ANSI,
sal_uInt8 nFlags = 0 );
sal_uInt32 nHeight );
};

View File

@ -134,7 +134,7 @@ public:
void readVbaModules( StorageBase& rVbaPrjStrg );
/** Imports (and creates) vba modules and user forms from the vba project records previously read.
Note: ( expects that readVbaModules was already called ) */
void importModulesAndForms( StorageBase& rVbaPrjStrg, const GraphicHelper& rGraphicHelper, bool bDefaultColorBgr = true );
void importModulesAndForms( StorageBase& rVbaPrjStrg, const GraphicHelper& rGraphicHelper );
/** Registers a macro attacher object. For details, see description of the
VbaMacroAttacherBase class. */
void registerMacroAttacher( const VbaMacroAttacherRef& rxAttacher );
@ -159,9 +159,9 @@ private:
/** Returns the Basic or dialog library container. */
css::uno::Reference< css::script::XLibraryContainer >
getLibraryContainer( sal_Int32 nPropId );
/** Opens a Basic or dialog library (creates missing if specified). */
/** Opens a Basic or dialog library, creates missing if not found. */
css::uno::Reference< css::container::XNameContainer >
openLibrary( sal_Int32 nPropId, bool bCreateMissing );
openLibrary( sal_Int32 nPropId );
/** Creates and returns the Basic library of the document used for import. */
css::uno::Reference< css::container::XNameContainer > const &
createBasicLibrary();

View File

@ -173,8 +173,7 @@ public:
*/
VclPtr<SfxInfoBarWindow> AppendInfoBar(const OUString& sId,
const OUString& sMessage,
InfoBarType aInfoBarType,
WinBits nMessageStyle = WB_LEFT|WB_VCENTER);
InfoBarType aInfoBarType);
void RemoveInfoBar(const OUString& sId);
SAL_DLLPRIVATE void GetDocNumber_Impl();

View File

@ -80,7 +80,7 @@ public:
const sal_uInt16* GetFrozenIdRanges() const;
protected:
static inline void SetRefCount(SfxPoolItem& rItem, sal_uInt32 n);
static inline void ClearRefCount(SfxPoolItem& rItem);
static inline void AddRef(const SfxPoolItem& rItem, sal_uInt32 n = 1);
static inline sal_uInt32 ReleaseRef(const SfxPoolItem& rItem, sal_uInt32 n = 1);
static inline void SetKind( SfxPoolItem& rItem, SfxItemKind nRef );
@ -217,9 +217,9 @@ private:
};
// only the pool may manipulate the reference counts
inline void SfxItemPool::SetRefCount(SfxPoolItem& rItem, sal_uInt32 n)
inline void SfxItemPool::ClearRefCount(SfxPoolItem& rItem)
{
rItem.SetRefCount(n);
rItem.SetRefCount(0);
}
// only the pool may manipulate the reference counts

View File

@ -308,12 +308,12 @@ public:
{ return pStyleSh; }
};
class SVL_DLLPUBLIC SfxStyleSheetHintExtended: public SfxStyleSheetHint
class SVL_DLLPUBLIC SfxStyleSheetModifiedHint: public SfxStyleSheetHint
{
OUString aName;
public:
SfxStyleSheetHintExtended( SfxHintId, const OUString& rOld,
SfxStyleSheetModifiedHint( const OUString& rOld,
SfxStyleSheetBase& );
const OUString& GetOldName() const { return aName; }
};

View File

@ -148,7 +148,7 @@ public:
class SVL_DLLPUBLIC DdeHotLink : public DdeLink
{
public:
DdeHotLink( DdeConnection&, const OUString&, long = 0 );
DdeHotLink( DdeConnection&, const OUString& );
};

View File

@ -22,25 +22,10 @@
#include <svtools/svtdllapi.h>
#include <vcl/scrbar.hxx>
#include <o3tl/typed_flags_set.hxx>
#include <vcl/vclptr.hxx>
class DataChangedEvent;
enum class ScrollableWindowFlags
{
THUMBDRAGGING = 1,
VCENTER = 2,
HCENTER = 4,
DEFAULT = THUMBDRAGGING | VCENTER | HCENTER,
};
namespace o3tl
{
template<> struct typed_flags<ScrollableWindowFlags> : is_typed_flags<ScrollableWindowFlags, 0x07> {};
}
class SVT_DLLPUBLIC ScrollableWindow: public vcl::Window
{
private:
@ -57,7 +42,6 @@ private:
bHCenter:1,
bVCenter:1;
SVT_DLLPRIVATE void ImpInitialize( ScrollableWindowFlags nFlags );
DECL_DLLPRIVATE_LINK( ScrollHdl, ScrollBar *, void );
DECL_DLLPRIVATE_LINK( EndScrollHdl, ScrollBar *, void );

View File

@ -734,7 +734,7 @@ Reference< XSpellAlternatives > SpellCheckerDispatcher::spell_Impl(
// no xRes but Proposals found from the user-dictionaries.
// Thus we need to create an xRes...
xRes = new linguistic::SpellAlternatives( rWord, nLanguage,
SpellFailure::IS_NEGATIVE_WORD, comphelper::containerToSequence(aProposals) );
comphelper::containerToSequence(aProposals) );
}
}
}

View File

@ -179,11 +179,11 @@ SpellAlternatives::SpellAlternatives()
SpellAlternatives::SpellAlternatives(
const OUString &rWord, sal_Int16 nLang, sal_Int16 nFailureType,
const OUString &rWord, sal_Int16 nLang,
const Sequence< OUString > &rAlternatives ) :
aAlt (rAlternatives),
aWord (rWord),
nType (nFailureType),
nType (SpellFailure::IS_NEGATIVE_WORD),
nLanguage (nLang)
{
}

View File

@ -112,8 +112,7 @@ sal_uInt16 CodecHelper::getPasswordHash( const AttributeList& rAttribs, sal_Int3
return static_cast< sal_uInt16 >( ((0 <= nPasswordHash) && (nPasswordHash <= SAL_MAX_UINT16)) ? nPasswordHash : 0 );
}
BinaryCodec_XOR::BinaryCodec_XOR( CodecType eCodecType ) :
meCodecType( eCodecType ),
BinaryCodec_XOR::BinaryCodec_XOR() :
mnOffset( 0 ),
mnBaseKey( 0 ),
mnHash( 0 )
@ -147,13 +146,7 @@ void BinaryCodec_XOR::initKey( const sal_uInt8 pnPassData[ 16 ] )
for (sal_Int32 nIndex = nLen; nIndex < static_cast<sal_Int32>(sizeof(mpnKey)); ++nIndex, ++pnFillChar )
mpnKey[ nIndex ] = *pnFillChar;
// rotation of key values is application dependent
size_t nRotateSize = 0;
switch( meCodecType )
{
case CodecType::Excel: nRotateSize = 2; break;
// compiler will warn, if new codec type is introduced and not handled here
}
size_t nRotateSize = 2;
// use little-endian base key to create key array
sal_uInt8 pnBaseKeyLE[ 2 ];

View File

@ -52,7 +52,7 @@ OUString BinaryInputStream::readNulUnicodeArray()
return aBuffer.makeStringAndClear();
}
OString BinaryInputStream::readCharArray( sal_Int32 nChars, bool bAllowNulChars )
OString BinaryInputStream::readCharArray( sal_Int32 nChars )
{
if( nChars <= 0 )
return OString();
@ -63,15 +63,15 @@ OString BinaryInputStream::readCharArray( sal_Int32 nChars, bool bAllowNulChars
return OString();
aBuffer.resize( static_cast< size_t >( nCharsRead ) );
if( !bAllowNulChars )
::std::replace( aBuffer.begin(), aBuffer.end(), '\0', '?' );
// NUL characters are replaced by question marks.
::std::replace( aBuffer.begin(), aBuffer.end(), '\0', '?' );
return OString(reinterpret_cast<sal_Char*>(aBuffer.data()), nCharsRead);
}
OUString BinaryInputStream::readCharArrayUC( sal_Int32 nChars, rtl_TextEncoding eTextEnc, bool bAllowNulChars )
OUString BinaryInputStream::readCharArrayUC( sal_Int32 nChars, rtl_TextEncoding eTextEnc )
{
return OStringToOUString( readCharArray( nChars, bAllowNulChars ), eTextEnc );
return OStringToOUString( readCharArray( nChars ), eTextEnc );
}
OUString BinaryInputStream::readUnicodeArray( sal_Int32 nChars, bool bAllowNulChars )

View File

@ -647,14 +647,14 @@ void ControlModelBase::convertSize( PropertyMap& rPropMap, const ControlConverte
}
ComCtlModelBase::ComCtlModelBase( sal_uInt32 nDataPartId5, sal_uInt32 nDataPartId6,
sal_uInt16 nVersion, bool bCommonPart, bool bComplexPart ) :
sal_uInt16 nVersion ) :
maFontData( "Tahoma", 82500 ),
mnFlags( 0 ),
mnVersion( nVersion ),
mnDataPartId5( nDataPartId5 ),
mnDataPartId6( nDataPartId6 ),
mbCommonPart( bCommonPart ),
mbComplexPart( bComplexPart )
mbCommonPart( true ),
mbComplexPart( true )
{
}
@ -749,7 +749,7 @@ bool ComCtlModelBase::importComplexPart( BinaryInputStream& rInStrm )
}
ComCtlScrollBarModel::ComCtlScrollBarModel( sal_uInt16 nVersion ) :
ComCtlModelBase( SAL_MAX_UINT32, COMCTL_ID_SCROLLBAR_60, nVersion, true, true ),
ComCtlModelBase( SAL_MAX_UINT32, COMCTL_ID_SCROLLBAR_60, nVersion ),
mnScrollBarFlags( 0x00000011 ),
mnLargeChange( 1 ),
mnSmallChange( 1 ),
@ -783,7 +783,7 @@ void ComCtlScrollBarModel::importControlData( BinaryInputStream& rInStrm )
}
ComCtlProgressBarModel::ComCtlProgressBarModel( sal_uInt16 nVersion ) :
ComCtlModelBase( COMCTL_ID_PROGRESSBAR_50, COMCTL_ID_PROGRESSBAR_60, nVersion, true, true ),
ComCtlModelBase( COMCTL_ID_PROGRESSBAR_50, COMCTL_ID_PROGRESSBAR_60, nVersion ),
mfMin( 0.0 ),
mfMax( 100.0 ),
mnVertical( 0 ),

View File

@ -204,13 +204,12 @@ StdFontInfo::StdFontInfo() :
{
}
StdFontInfo::StdFontInfo( const OUString& rName, sal_uInt32 nHeight,
sal_uInt16 nWeight, sal_uInt16 nCharSet, sal_uInt8 nFlags ) :
StdFontInfo::StdFontInfo( const OUString& rName, sal_uInt32 nHeight ) :
maName( rName ),
mnHeight( nHeight ),
mnWeight( nWeight ),
mnCharSet( nCharSet ),
mnFlags( nFlags )
mnWeight( OLE_STDFONT_NORMAL ),
mnCharSet( WINDOWS_CHARSET_ANSI ),
mnFlags( 0 )
{
}

View File

@ -209,34 +209,34 @@ Reference< XLibraryContainer > VbaProject::getLibraryContainer( sal_Int32 nPropI
return xLibContainer;
}
Reference< XNameContainer > VbaProject::openLibrary( sal_Int32 nPropId, bool bCreateMissing )
Reference< XNameContainer > VbaProject::openLibrary( sal_Int32 nPropId )
{
Reference< XNameContainer > xLibrary;
try
{
Reference< XLibraryContainer > xLibContainer( getLibraryContainer( nPropId ), UNO_SET_THROW );
if( bCreateMissing && !xLibContainer->hasByName( maPrjName ) )
if( !xLibContainer->hasByName( maPrjName ) )
xLibContainer->createLibrary( maPrjName );
xLibrary.set( xLibContainer->getByName( maPrjName ), UNO_QUERY_THROW );
}
catch(const Exception& )
{
}
OSL_ENSURE( !bCreateMissing || xLibrary.is(), "VbaProject::openLibrary - cannot create library" );
OSL_ENSURE( xLibrary.is(), "VbaProject::openLibrary - cannot create library" );
return xLibrary;
}
Reference< XNameContainer > const & VbaProject::createBasicLibrary()
{
if( !mxBasicLib.is() )
mxBasicLib = openLibrary( PROP_BasicLibraries, true );
mxBasicLib = openLibrary( PROP_BasicLibraries );
return mxBasicLib;
}
Reference< XNameContainer > const & VbaProject::createDialogLibrary()
{
if( !mxDialogLib.is() )
mxDialogLib = openLibrary( PROP_DialogLibraries, true );
mxDialogLib = openLibrary( PROP_DialogLibraries );
return mxDialogLib;
}
@ -406,7 +406,7 @@ void VbaProject::readVbaModules( StorageBase& rVbaPrjStrg )
}
}
void VbaProject::importModulesAndForms( StorageBase& rVbaPrjStrg, const GraphicHelper& rGraphicHelper, bool bDefaultColorBgr )
void VbaProject::importModulesAndForms( StorageBase& rVbaPrjStrg, const GraphicHelper& rGraphicHelper )
{
StorageRef xVbaStrg = rVbaPrjStrg.openSubStorage( "VBA", false );
OSL_ENSURE( xVbaStrg.get(), "VbaProject::importModulesAndForms - cannot open 'VBA' substorage" );
@ -487,7 +487,7 @@ void VbaProject::importModulesAndForms( StorageBase& rVbaPrjStrg, const GraphicH
// create and import the form
Reference< XNameContainer > xDialogLib( createDialogLibrary(), UNO_SET_THROW );
VbaUserForm aForm( mxContext, mxDocModel, rGraphicHelper, bDefaultColorBgr );
VbaUserForm aForm( mxContext, mxDocModel, rGraphicHelper, true/*bDefaultColorBgr*/ );
aForm.importForm( xDialogLib, *xSubStrg, aModuleName, eTextEnc );
}
catch(const Exception& )

View File

@ -376,7 +376,7 @@ ScDocumentPool::~ScDocumentPool()
for ( sal_uInt16 i=0; i < ATTR_ENDINDEX-ATTR_STARTINDEX+1; i++ )
{
SetRefCount( *(*mpPoolDefaults)[i], 0 );
ClearRefCount( *(*mpPoolDefaults)[i] );
delete (*mpPoolDefaults)[i];
}

View File

@ -54,7 +54,7 @@ BiffDecoderBase::~BiffDecoderBase()
BiffDecoder_XOR::BiffDecoder_XOR( const BiffDecoder_XOR& rDecoder ) :
BiffDecoderBase(), // must be called to prevent compiler warning
maCodec( ::oox::core::BinaryCodec_XOR::CodecType::Excel ),
maCodec(),
maEncryptionData( rDecoder.maEncryptionData ),
mnKey( rDecoder.mnKey ),
mnHash( rDecoder.mnHash )

View File

@ -84,7 +84,7 @@ ScMessagePool::~ScMessagePool()
SetSecondaryPool( nullptr ); // before deleting defaults (accesses defaults)
for ( sal_uInt16 i=0; i <= MSGPOOL_END-MSGPOOL_START; i++ )
SetRefCount( *(*mpPoolDefaults)[i], 0 );
ClearRefCount( *(*mpPoolDefaults)[i] );
delete mpPoolDefaults;

View File

@ -1324,7 +1324,7 @@ void ScDocShell::NotifyStyle( const SfxStyleSheetHint& rHint )
OUString aNewName = pStyle->GetName();
OUString aOldName = aNewName;
const SfxStyleSheetHintExtended* pExtendedHint = dynamic_cast<const SfxStyleSheetHintExtended*>(&rHint); // Name geaendert?
const SfxStyleSheetModifiedHint* pExtendedHint = dynamic_cast<const SfxStyleSheetModifiedHint*>(&rHint); // Name geaendert?
if (pExtendedHint)
aOldName = pExtendedHint->GetOldName();
@ -1362,7 +1362,7 @@ void ScDocShell::NotifyStyle( const SfxStyleSheetHint& rHint )
{
OUString aNewName = pStyle->GetName();
OUString aOldName = aNewName;
const SfxStyleSheetHintExtended* pExtendedHint = dynamic_cast<const SfxStyleSheetHintExtended*>(&rHint);
const SfxStyleSheetModifiedHint* pExtendedHint = dynamic_cast<const SfxStyleSheetModifiedHint*>(&rHint);
if (pExtendedHint)
aOldName = pExtendedHint->GetOldName();
if ( aNewName != aOldName )

View File

@ -102,7 +102,7 @@
using namespace ::com::sun::star;
SdPPTImport::SdPPTImport( SdDrawDocument* pDocument, SvStream& rDocStream, SotStorage& rStorage, SfxMedium& rMedium )
: maParam(rDocStream, 0)
: maParam(rDocStream)
{
#ifdef DBG_UTIL
PropRead* pSummaryInformation = new PropRead( rStorage, "\005SummaryInformation" );

View File

@ -1481,7 +1481,7 @@ void SfxCommonTemplateDialog_Impl::Notify(SfxBroadcaster& /*rBC*/, const SfxHint
if(!bDontUpdate && nId != SfxHintId::Dying &&
(dynamic_cast<const SfxStyleSheetPoolHint*>(&rHint) ||
dynamic_cast<const SfxStyleSheetHint*>(&rHint) ||
dynamic_cast<const SfxStyleSheetHintExtended*>(&rHint)))
dynamic_cast<const SfxStyleSheetModifiedHint*>(&rHint)))
{
if(!pIdle)
{

View File

@ -3028,15 +3028,14 @@ void SfxViewFrame::SetViewFrame( SfxViewFrame* pFrame )
VclPtr<SfxInfoBarWindow> SfxViewFrame::AppendInfoBar(const OUString& sId,
const OUString& sMessage,
InfoBarType aInfoBarType,
WinBits nMessageStyle)
InfoBarType aInfoBarType)
{
SfxChildWindow* pChild = GetChildWindow(SfxInfoBarContainerChild::GetChildWindowId());
if (!pChild)
return nullptr;
SfxInfoBarContainerWindow* pInfoBarContainer = static_cast<SfxInfoBarContainerWindow*>(pChild->GetWindow());
auto pInfoBar = pInfoBarContainer->appendInfoBar(sId, sMessage, aInfoBarType, nMessageStyle);
auto pInfoBar = pInfoBarContainer->appendInfoBar(sId, sMessage, aInfoBarType, WB_LEFT | WB_VCENTER);
ShowChildWindow(SfxInfoBarContainerChild::GetChildWindowId());
return pInfoBar;
}

View File

@ -523,7 +523,7 @@ void SfxItemPool::Delete()
if (rItemPtr)
{
#ifdef DBG_UTIL
SetRefCount(*rItemPtr, 0);
ClearRefCount(*rItemPtr);
#endif
delete rItemPtr;
rItemPtr = nullptr;
@ -553,7 +553,7 @@ void SfxItemPool::Delete()
if (rItemPtr)
{
#ifdef DBG_UTIL
SetRefCount(*rItemPtr, 0);
ClearRefCount(*rItemPtr);
#endif
delete rItemPtr;
rItemPtr = nullptr;

View File

@ -457,7 +457,7 @@ void SfxItemPool_Impl::readTheItems (
{
// Reuse
SfxItemPool::AddRef( *pOldItem, rpNewItem->GetRefCount() );
SfxItemPool::SetRefCount( *rpNewItem, 0 );
SfxItemPool::ClearRefCount( *rpNewItem );
delete rpNewItem;
rpNewItem = pOldItem;
bFound = true;

View File

@ -60,13 +60,12 @@ static DbgStyleSheetReferences aDbgStyleSheetReferences;
#endif
SfxStyleSheetHintExtended::SfxStyleSheetHintExtended
SfxStyleSheetModifiedHint::SfxStyleSheetModifiedHint
(
SfxHintId nAction,
const OUString& rOldName,
SfxStyleSheetBase& rStyleSheet // Remains with the caller
)
: SfxStyleSheetHint( nAction, rStyleSheet ),
: SfxStyleSheetHint( SfxHintId::StyleSheetModified, rStyleSheet ),
aName( rOldName )
{}
@ -185,8 +184,7 @@ bool SfxStyleSheetBase::SetName(const OUString& rName, bool bReIndexNow)
if (bReIndexNow)
pPool->Reindex();
pPool->SetSearchMask(eTmpFam, nTmpMask);
pPool->Broadcast( SfxStyleSheetHintExtended(
SfxHintId::StyleSheetModified, aOldName, *this ) );
pPool->Broadcast( SfxStyleSheetModifiedHint( aOldName, *this ) );
}
return true;
}

View File

@ -367,8 +367,8 @@ DdeRequest::DdeRequest( DdeConnection& d, const OUString& i, long n )
nType = XTYP_REQUEST;
}
DdeHotLink::DdeHotLink( DdeConnection& d, const OUString& i, long n )
: DdeLink( d, i, n )
DdeHotLink::DdeHotLink( DdeConnection& d, const OUString& i )
: DdeLink( d, i, 0 )
{
nType = XTYP_ADVSTART;
}

View File

@ -317,8 +317,8 @@ void DdeLink::Notify()
{
}
DdeHotLink::DdeHotLink( DdeConnection& rConnection, const OUString& rString, long l )
: DdeLink( rConnection, rString, l )
DdeHotLink::DdeHotLink( DdeConnection& rConnection, const OUString& rString )
: DdeLink( rConnection, rString, 0 )
{
}

View File

@ -21,11 +21,15 @@
#include <vcl/settings.hxx>
void ScrollableWindow::ImpInitialize( ScrollableWindowFlags nFlags )
ScrollableWindow::ScrollableWindow( vcl::Window* pParent ) :
Window( pParent, WB_CLIPCHILDREN ),
aVScroll( VclPtr<ScrollBar>::Create(this, WinBits(WB_VSCROLL | WB_DRAG)) ),
aHScroll( VclPtr<ScrollBar>::Create(this, WinBits(WB_HSCROLL | WB_DRAG)) ),
aCornerWin( VclPtr<ScrollBarBox>::Create(this) )
{
bHandleDragging = bool( nFlags & ScrollableWindowFlags::THUMBDRAGGING );
bVCenter = bool(nFlags & ScrollableWindowFlags::VCENTER);
bHCenter = bool(nFlags & ScrollableWindowFlags::HCENTER);
bHandleDragging = true;
bVCenter = true;
bHCenter = true;
bScrolling = false;
// set the handlers for the scrollbars
@ -38,16 +42,6 @@ void ScrollableWindow::ImpInitialize( ScrollableWindowFlags nFlags )
}
ScrollableWindow::ScrollableWindow( vcl::Window* pParent ) :
Window( pParent, WB_CLIPCHILDREN ),
aVScroll( VclPtr<ScrollBar>::Create(this, WinBits(WB_VSCROLL | WB_DRAG)) ),
aHScroll( VclPtr<ScrollBar>::Create(this, WinBits(WB_HSCROLL | WB_DRAG)) ),
aCornerWin( VclPtr<ScrollBarBox>::Create(this) )
{
ImpInitialize( ScrollableWindowFlags::DEFAULT );
}
ScrollableWindow::~ScrollableWindow()
{
disposeOnce();

View File

@ -594,7 +594,7 @@ namespace sdr
}
else if(dynamic_cast<const SfxStyleSheetBasePool *>(&rBC) != nullptr)
{
const SfxStyleSheetHintExtended* pExtendedHint = dynamic_cast<const SfxStyleSheetHintExtended*>(&rHint);
const SfxStyleSheetModifiedHint* pExtendedHint = dynamic_cast<const SfxStyleSheetModifiedHint*>(&rHint);
if(pExtendedHint
&& SfxHintId::StyleSheetModified == pExtendedHint->GetId())

View File

@ -2274,7 +2274,7 @@ void SwBasicEscherEx::WritePictures()
{
// set the blip - entries to the correct stream pos
sal_Int32 nEndPos = pPicStrm->Tell();
mxGlobal->WriteBlibStoreEntry(*pEscherStrm, 1, true, nEndPos);
mxGlobal->WriteBlibStoreEntry(*pEscherStrm, 1, nEndPos);
pPicStrm->Seek(0);
pEscherStrm->WriteStream( *pPicStrm );