Kaydet (Commit) 6343754e authored tarafından Noel Grandin's avatar Noel Grandin

cppcheck:noExplicitConstructor

Change-Id: I2717d3d120df8af5b7e9af8d147a57b9f5b5ecbe
üst dea885f8
......@@ -37,7 +37,7 @@ namespace internal {
class ActivityBase : public AnimationActivity
{
public:
ActivityBase( const ActivityParameters& rParms );
explicit ActivityBase( const ActivityParameters& rParms );
/// From Disposable interface
virtual void dispose() SAL_OVERRIDE;
......
......@@ -36,7 +36,7 @@ namespace slideshow
class ContinuousActivityBase : public SimpleContinuousActivityBase
{
public:
ContinuousActivityBase( const ActivityParameters& rParms );
explicit ContinuousActivityBase( const ActivityParameters& rParms );
using SimpleContinuousActivityBase::perform;
......
......@@ -38,7 +38,7 @@ namespace slideshow
class ContinuousKeyTimeActivityBase : public SimpleContinuousActivityBase
{
public:
ContinuousKeyTimeActivityBase( const ActivityParameters& rParms );
explicit ContinuousKeyTimeActivityBase( const ActivityParameters& rParms );
using SimpleContinuousActivityBase::perform;
......
......@@ -38,7 +38,7 @@ namespace slideshow
class DiscreteActivityBase : public ActivityBase
{
public:
DiscreteActivityBase( const ActivityParameters& rParms );
explicit DiscreteActivityBase( const ActivityParameters& rParms );
/** Hook for derived classes.
......
......@@ -88,7 +88,7 @@ namespace slideshow
/// Specialization for HSLColor, to employ color-specific interpolator
template<> struct Interpolator< HSLColor >
{
Interpolator( bool bCCW ) :
explicit Interpolator( bool bCCW ) :
mbCCW( bCCW )
{
}
......
......@@ -37,7 +37,7 @@ namespace slideshow
class SimpleContinuousActivityBase : public ActivityBase
{
public:
SimpleContinuousActivityBase( const ActivityParameters& rParms );
explicit SimpleContinuousActivityBase( const ActivityParameters& rParms );
virtual double calcTimeLag() const SAL_OVERRIDE;
virtual bool perform() SAL_OVERRIDE;
......
......@@ -619,7 +619,7 @@ namespace slideshow
class Scaler
{
public:
Scaler( double nScale ) :
explicit Scaler( double nScale ) :
mnScale( nScale )
{
}
......
......@@ -45,7 +45,7 @@ class RewinderEventHandler : public EventHandler
{
public:
typedef ::std::function<bool ()> Action;
RewinderEventHandler (const Action& rAction) : maAction(rAction) {}
explicit RewinderEventHandler (const Action& rAction) : maAction(rAction) {}
virtual ~RewinderEventHandler() {}
private:
const Action maAction;
......@@ -58,7 +58,7 @@ class RewinderAnimationEventHandler : public AnimationEventHandler
{
public:
typedef ::std::function<bool (const AnimationNodeSharedPtr& rpNode)> Action;
RewinderAnimationEventHandler (const Action& rAction) : maAction(rAction) {}
explicit RewinderAnimationEventHandler (const Action& rAction) : maAction(rAction) {}
virtual ~RewinderAnimationEventHandler() {}
private:
const Action maAction;
......
......@@ -42,7 +42,7 @@ namespace slideshow
class ConstantValueExpression : public ExpressionNode
{
public:
ConstantValueExpression( double rValue ) :
explicit ConstantValueExpression( double rValue ) :
maValue( rValue )
{
}
......
......@@ -759,7 +759,7 @@ namespace slideshow
class Expander
{
public:
Expander( ::basegfx::B2DSize& rBounds ) :
explicit Expander( ::basegfx::B2DSize& rBounds ) :
mrBounds( rBounds )
{
}
......
......@@ -642,7 +642,7 @@ namespace slideshow
class CountClassFunctor
{
public:
CountClassFunctor( DrawShapeSubsetting::IndexClassificator eClass ) :
explicit CountClassFunctor( DrawShapeSubsetting::IndexClassificator eClass ) :
meClass( eClass ),
mnCurrCount(0)
{
......
......@@ -226,7 +226,7 @@ namespace slideshow
class LayerEndUpdate : private boost::noncopyable
{
public:
LayerEndUpdate( LayerSharedPtr const& rLayer ) :
explicit LayerEndUpdate( LayerSharedPtr const& rLayer ) :
mpLayer( rLayer )
{}
......
......@@ -127,7 +127,7 @@ public:
The preferred duration between the display of two frames in
seconds.
*/
FrameSynchronization (const double nFrameDuration);
explicit FrameSynchronization (const double nFrameDuration);
/** Set the current time as the time at which the current frame is
displayed. From this the target time of the next frame is derived.
......@@ -407,7 +407,7 @@ private:
void releaseWaitSymbol();
class WaitSymbolLock {public:
WaitSymbolLock(SlideShowImpl& rSlideShowImpl) : mrSlideShowImpl(rSlideShowImpl)
explicit WaitSymbolLock(SlideShowImpl& rSlideShowImpl) : mrSlideShowImpl(rSlideShowImpl)
{ mrSlideShowImpl.requestWaitSymbol(); }
~WaitSymbolLock()
{ mrSlideShowImpl.releaseWaitSymbol(); }
......
......@@ -146,7 +146,7 @@ namespace slideshow
class DoubleConstantFunctor
{
public:
DoubleConstantFunctor( const ParserContextSharedPtr& rContext ) :
explicit DoubleConstantFunctor( const ParserContextSharedPtr& rContext ) :
mpContext( rContext )
{
ENSURE_OR_THROW( mpContext,
......@@ -169,7 +169,7 @@ namespace slideshow
class ValueTFunctor
{
public:
ValueTFunctor( const ParserContextSharedPtr& rContext ) :
explicit ValueTFunctor( const ParserContextSharedPtr& rContext ) :
mpContext( rContext )
{
ENSURE_OR_THROW( mpContext,
......@@ -413,7 +413,7 @@ namespace slideshow
@param rParserContext
Contains context info for the parser
*/
ExpressionGrammar( const ParserContextSharedPtr& rParserContext ) :
explicit ExpressionGrammar( const ParserContextSharedPtr& rParserContext ) :
mpParserContext( rParserContext )
{
}
......@@ -422,7 +422,7 @@ namespace slideshow
{
public:
// grammar definition
definition( const ExpressionGrammar& self )
explicit definition( const ExpressionGrammar& self )
{
using ::boost::spirit::str_p;
using ::boost::spirit::real_parser;
......
......@@ -61,7 +61,7 @@ namespace slideshow
class NamedValueComparator
{
public:
NamedValueComparator( const beans::NamedValue& rKey ) :
explicit NamedValueComparator( const beans::NamedValue& rKey ) :
mrKey( rKey )
{
}
......
......@@ -33,7 +33,7 @@ namespace internal {
class BarnDoorWipe : public ParametricPolyPolygon
{
public:
BarnDoorWipe( bool doubled = false )
explicit BarnDoorWipe( bool doubled = false )
: m_unitRect( createUnitRect() ), m_doubled(doubled) {}
virtual ::basegfx::B2DPolyPolygon operator()( double x ) SAL_OVERRIDE;
private:
......
......@@ -31,7 +31,7 @@ namespace internal {
class BarWipePolyPolygon : public ParametricPolyPolygon
{
public:
BarWipePolyPolygon( sal_Int32 nBars = 1 /* nBars > 1: blinds effect */ )
explicit BarWipePolyPolygon( sal_Int32 nBars = 1 /* nBars > 1: blinds effect */ )
: m_nBars(nBars),
m_unitRect( createUnitRect() )
{}
......
......@@ -31,7 +31,7 @@ namespace internal {
class BoxWipe : public ParametricPolyPolygon
{
public:
BoxWipe( bool topCentered ) : m_topCentered(topCentered),
explicit BoxWipe( bool topCentered ) : m_topCentered(topCentered),
m_unitRect( createUnitRect() )
{}
virtual ::basegfx::B2DPolyPolygon operator () ( double t ) SAL_OVERRIDE;
......
......@@ -33,7 +33,7 @@ namespace internal {
class CheckerBoardWipe : public ParametricPolyPolygon
{
public:
CheckerBoardWipe( sal_Int32 unitsPerEdge = 10 )
explicit CheckerBoardWipe( sal_Int32 unitsPerEdge = 10 )
: m_unitsPerEdge(unitsPerEdge),
m_unitRect( createUnitRect() )
{ OSL_ASSERT( (unitsPerEdge % 2) == 0 ); }
......
......@@ -30,7 +30,7 @@ namespace internal {
class EllipseWipe : public ParametricPolyPolygon
{
public:
EllipseWipe( sal_Int32 /*nTransitionSubType xxx todo */ ) {}
explicit EllipseWipe( sal_Int32 /*nTransitionSubType xxx todo */ ) {}
virtual ::basegfx::B2DPolyPolygon operator () ( double x ) SAL_OVERRIDE;
};
......
......@@ -37,7 +37,7 @@ public:
virtual ::basegfx::B2DPolyPolygon operator () ( double t ) SAL_OVERRIDE;
private:
FigureWipe( ::basegfx::B2DPolygon const & figure ) : m_figure(figure) {}
explicit FigureWipe( ::basegfx::B2DPolygon const & figure ) : m_figure(figure) {}
const ::basegfx::B2DPolygon m_figure;
};
......
......@@ -32,7 +32,7 @@ namespace internal {
class FourBoxWipe : public ParametricPolyPolygon
{
public:
FourBoxWipe( bool cornersOut ) : m_cornersOut(cornersOut),
explicit FourBoxWipe( bool cornersOut ) : m_cornersOut(cornersOut),
m_unitRect( createUnitRect() )
{}
virtual ::basegfx::B2DPolyPolygon operator () ( double t ) SAL_OVERRIDE;
......
......@@ -31,7 +31,7 @@ namespace internal {
class PinWheelWipe : public ParametricPolyPolygon
{
public:
PinWheelWipe( sal_Int32 blades ) : m_blades(blades) {}
explicit PinWheelWipe( sal_Int32 blades ) : m_blades(blades) {}
virtual ::basegfx::B2DPolyPolygon operator () ( double t ) SAL_OVERRIDE;
private:
sal_Int32 m_blades;
......
......@@ -31,7 +31,7 @@ namespace internal {
class ZigZagWipe : public ParametricPolyPolygon
{
public:
ZigZagWipe( sal_Int32 nZigs );
explicit ZigZagWipe( sal_Int32 nZigs );
virtual ::basegfx::B2DPolyPolygon operator () ( double t ) SAL_OVERRIDE;
protected:
const double m_zigEdge;
......@@ -42,7 +42,7 @@ protected:
class BarnZigZagWipe : public ZigZagWipe
{
public:
BarnZigZagWipe( sal_Int32 nZigs ) : ZigZagWipe(nZigs) {}
explicit BarnZigZagWipe( sal_Int32 nZigs ) : ZigZagWipe(nZigs) {}
virtual ::basegfx::B2DPolyPolygon operator () ( double t ) SAL_OVERRIDE;
};
......
......@@ -123,7 +123,7 @@ protected:
class AllAnimationEventHandler : public AnimationEventHandler
{
public:
AllAnimationEventHandler( EventQueue& rEventQueue ) :
explicit AllAnimationEventHandler( EventQueue& rEventQueue ) :
mrEventQueue( rEventQueue ),
maAnimationEventMap()
{}
......@@ -182,7 +182,7 @@ class ClickEventHandler : public MouseEventHandler_,
public EventContainer
{
public:
ClickEventHandler( EventQueue& rEventQueue ) :
explicit ClickEventHandler( EventQueue& rEventQueue ) :
EventContainer(),
mrEventQueue( rEventQueue ),
mbAdvanceOnClick( true )
......@@ -293,7 +293,7 @@ private:
class MouseHandlerBase : public MouseEventHandler_
{
public:
MouseHandlerBase( EventQueue& rEventQueue ) :
explicit MouseHandlerBase( EventQueue& rEventQueue ) :
mrEventQueue( rEventQueue ),
maShapeEventMap()
{}
......@@ -422,7 +422,7 @@ private:
class MouseEnterHandler : public MouseHandlerBase
{
public:
MouseEnterHandler( EventQueue& rEventQueue )
explicit MouseEnterHandler( EventQueue& rEventQueue )
: MouseHandlerBase( rEventQueue ),
mpLastShape() {}
......@@ -460,7 +460,7 @@ private:
class MouseLeaveHandler : public MouseHandlerBase
{
public:
MouseLeaveHandler( EventQueue& rEventQueue )
explicit MouseLeaveHandler( EventQueue& rEventQueue )
: MouseHandlerBase( rEventQueue ),
maLastIter() {}
......
......@@ -308,7 +308,7 @@ public:
class ChildWindow : public vcl::Window
{
public:
ChildWindow( vcl::Window* pParent );
explicit ChildWindow( vcl::Window* pParent );
virtual ~ChildWindow();
virtual void Paint( const Rectangle& rRect );
virtual void Resize();
......
......@@ -65,7 +65,7 @@ class Listener:
public cppu::WeakImplHelper1< css::frame::XDispatchResultListener >
{
public:
Listener(Result * result): result_(result) { OSL_ASSERT(result != 0); }
explicit Listener(Result * result): result_(result) { OSL_ASSERT(result != 0); }
private:
virtual void SAL_CALL disposing(css::lang::EventObject const &)
......
......@@ -56,7 +56,7 @@ class StgAvlIterator {
short nCur; // current element
StgAvlNode* Find( short );
public:
StgAvlIterator( StgAvlNode* );
explicit StgAvlIterator( StgAvlNode* );
StgAvlNode* First();
StgAvlNode* Next();
};
......
......@@ -64,7 +64,7 @@ public:
bool bInvalid; // true: invalid entry
StgDirEntry(const void* pBuffer, sal_uInt32 nBufferLen,
sal_uInt64 nUnderlyingStreamSize, bool * pbOk);
StgDirEntry( const StgEntry& );
explicit StgDirEntry( const StgEntry& );
virtual ~StgDirEntry();
void Invalidate( bool=false ); // invalidate all open entries
......@@ -95,7 +95,7 @@ class StgDirStrm : public StgDataStrm
short nEntries; // entries per page
void SetupEntry( sal_Int32, StgDirEntry* );
public:
StgDirStrm( StgIo& );
explicit StgDirStrm( StgIo& );
virtual ~StgDirStrm();
virtual bool SetSize( sal_Int32 ) SAL_OVERRIDE; // change the size
bool Store();
......@@ -108,7 +108,7 @@ public:
class StgIterator : public StgAvlIterator
{
public:
StgIterator( StgDirEntry& rStg ) : StgAvlIterator( rStg.pDown ) {}
explicit StgIterator( StgDirEntry& rStg ) : StgAvlIterator( rStg.pDown ) {}
StgDirEntry* First() { return static_cast<StgDirEntry*>( StgAvlIterator::First() ); }
StgDirEntry* Next() { return static_cast<StgDirEntry*>( StgAvlIterator::Next() ); }
};
......
......@@ -234,8 +234,7 @@ class Validator
sal_uLong MarkAll( StgDirEntry *pEntry );
public:
Validator( StgIo &rIo );
explicit Validator( StgIo &rIo );
bool IsError() { return nError != 0; }
};
......
......@@ -73,7 +73,7 @@ protected:
std::vector<sal_Int32> m_aPagesCache;
void scanBuildPageChainCache(sal_Int32 *pOptionalCalcSize = NULL);
bool Copy( sal_Int32 nFrom, sal_Int32 nBytes );
StgStrm( StgIo& );
explicit StgStrm( StgIo& );
public:
virtual ~StgStrm();
StgIo& GetIo() { return rIo; }
......@@ -99,7 +99,7 @@ class StgFATStrm : public StgStrm { // the master FAT stream
virtual bool Pos2Page( sal_Int32 nBytePos ) SAL_OVERRIDE;
bool SetPage( short, sal_Int32 );
public:
StgFATStrm( StgIo& );
explicit StgFATStrm( StgIo& );
virtual ~StgFATStrm() {}
using StgStrm::GetPage;
sal_Int32 GetPage( short, bool, sal_uInt16 *pnMasterAlloc = 0);
......@@ -151,8 +151,8 @@ class StgTmpStrm : public SvMemoryStream
virtual void FlushData() SAL_OVERRIDE;
public:
StgTmpStrm( sal_uLong=16 );
virtual ~StgTmpStrm();
explicit StgTmpStrm( sal_uLong=16 );
virtual ~StgTmpStrm();
bool Copy( StgTmpStrm& );
virtual void SetSize( sal_uInt64 ) SAL_OVERRIDE;
sal_uLong GetSize() const;
......
......@@ -67,7 +67,7 @@ class OLESimpleStorage : public ::cppu::WeakImplHelper3
public:
OLESimpleStorage( ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xFactory );
explicit OLESimpleStorage( ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xFactory );
virtual ~OLESimpleStorage();
......
......@@ -58,7 +58,7 @@ public:
<br>
@param nCachedElements number of elements to be cached; default param set to 128
*/
inline LRU_Cache( sal_Int32 nCachedElements = 128 );
explicit inline LRU_Cache( sal_Int32 nCachedElements = 128 );
/** Destructor: releases all cached elements and keys.
<br>
*/
......
......@@ -62,7 +62,7 @@ public:
@param size number of elements to be cached; default param set to 128
*/
inline lru_cache( ::std::size_t size );
explicit inline lru_cache( ::std::size_t size );
/** Destructor: releases all cached elements and keys.
*/
......
......@@ -101,7 +101,7 @@ sal_uInt16 ImpSqrt( sal_uLong nRadi )
FixCpx ImpExPI( sal_uInt16 nPhi )
{
short i;
FixCpx aIter(1L); // e**(0*i)
FixCpx aIter(Fix(1L)); // e**(0*i)
FixCpx Mul;
const char Sft=14-FIX_POST;
......
......@@ -69,10 +69,10 @@ public:
public:
Fix() { x=0; }
Fix( int i ) { x=(long(i)<<FIX_POST); }
Fix( short l ) { x=(long(l)<<FIX_POST); }
Fix( sal_uInt16 l ) { x=(long(l)<<FIX_POST); }
Fix( long l ) { x=(l<<FIX_POST); }
explicit Fix( int i ) { x=(long(i)<<FIX_POST); }
explicit Fix( short l ) { x=(long(l)<<FIX_POST); }
explicit Fix( sal_uInt16 l ) { x=(long(l)<<FIX_POST); }
explicit Fix( long l ) { x=(l<<FIX_POST); }
Fix( long Z, long N ) { x=(Z<<FIX_POST)/N; }
enum class Bits { Bits };
......@@ -111,7 +111,7 @@ public:
public:
FixCpx() : r(), i() {}
FixCpx( Fix a ) : r( a ), i() {}
explicit FixCpx( Fix a ) : r( a ), i() {}
FixCpx( Fix a, Fix b ) : r( a ), i( b ) {}
void operator*= ( const FixCpx& ra );
......
......@@ -681,7 +681,7 @@ namespace
public:
find_active_databaseform( const Reference< XFormController > _xActiveController )
explicit find_active_databaseform( const Reference< XFormController > _xActiveController )
: xActiveController(_xActiveController )
{}
......
......@@ -397,7 +397,7 @@ SwPosSize SwTextSizeInfo::GetTextSize( OutputDevice* pOutDev,
aDrawInf.SetFont( m_pFnt );
aDrawInf.SetSnapToGrid( SnapToGrid() );
aDrawInf.SetKanaComp( nComp );
return m_pFnt->_GetTextSize( aDrawInf );
return SwPosSize(m_pFnt->_GetTextSize( aDrawInf ));
}
SwPosSize SwTextSizeInfo::GetTextSize() const
......@@ -418,7 +418,7 @@ SwPosSize SwTextSizeInfo::GetTextSize() const
aDrawInf.SetFont( m_pFnt );
aDrawInf.SetSnapToGrid( SnapToGrid() );
aDrawInf.SetKanaComp( nComp );
return m_pFnt->_GetTextSize( aDrawInf );
return SwPosSize(m_pFnt->_GetTextSize( aDrawInf ));
}
void SwTextSizeInfo::GetTextSize( const SwScriptInfo* pSI, const sal_Int32 nIndex,
......@@ -432,7 +432,7 @@ void SwTextSizeInfo::GetTextSize( const SwScriptInfo* pSI, const sal_Int32 nInde
aDrawInf.SetFont( m_pFnt );
aDrawInf.SetSnapToGrid( SnapToGrid() );
aDrawInf.SetKanaComp( nComp );
SwPosSize aSize = m_pFnt->_GetTextSize( aDrawInf );
SwPosSize aSize( m_pFnt->_GetTextSize( aDrawInf ) );
nMaxSizeDiff = (sal_uInt16)aDrawInf.GetKanaDiff();
nMinSize = aSize.Width();
}
......
......@@ -74,7 +74,7 @@ private:
void _Truncate();
public:
inline SwLinePortion(const SwLinePortion &rPortion);
explicit inline SwLinePortion(const SwLinePortion &rPortion);
virtual ~SwLinePortion();
// Access methods
......
......@@ -30,7 +30,7 @@ class SwPosSize
public:
inline SwPosSize( const sal_uInt16 nW = 0, const sal_uInt16 nH = 0 )
: nWidth(nW), nHeight(nH) { }
inline SwPosSize( const Size &rSize )
explicit inline SwPosSize( const Size &rSize )
: nWidth(sal_uInt16(rSize.Width())), nHeight(sal_uInt16(rSize.Height())){ }
inline sal_uInt16 Height() const { return nHeight; }
inline void Height( const sal_uInt16 nNew ) { nHeight = nNew; }
......
......@@ -275,7 +275,7 @@ class WW8_WrPct
boost::ptr_vector<WW8_WrPc > aPcts;
WW8_FC nOldFc;
public:
WW8_WrPct(WW8_FC nStartFc);
explicit WW8_WrPct(WW8_FC nStartFc);
~WW8_WrPct();
void AppendPc(WW8_FC nStartFc);
void WritePc( WW8Export& rWrt );
......
......@@ -1160,20 +1160,20 @@ void WW8TabBandDesc::ReadDef(bool bVer67, const sal_uInt8* pS)
pAktTC->bFirstMerged = sal_uInt8( ( aBits1 & 0x01 ) != 0 );
pAktTC->bMerged = sal_uInt8( ( aBits1 & 0x02 ) != 0 );
pAktTC->rgbrc[ WW8_TOP ]
= WW8_BRC( pTc->rgbrcVer6[ WW8_TOP ] );
= WW8_BRCVer9(WW8_BRC( pTc->rgbrcVer6[ WW8_TOP ] ));
pAktTC->rgbrc[ WW8_LEFT ]
= WW8_BRC( pTc->rgbrcVer6[ WW8_LEFT ] );
= WW8_BRCVer9(WW8_BRC( pTc->rgbrcVer6[ WW8_LEFT ] ));
pAktTC->rgbrc[ WW8_BOT ]
= WW8_BRC( pTc->rgbrcVer6[ WW8_BOT ] );
= WW8_BRCVer9(WW8_BRC( pTc->rgbrcVer6[ WW8_BOT ] ));
pAktTC->rgbrc[ WW8_RIGHT ]
= WW8_BRC( pTc->rgbrcVer6[ WW8_RIGHT ] );
= WW8_BRCVer9(WW8_BRC( pTc->rgbrcVer6[ WW8_RIGHT ] ));
if( ( pAktTC->bMerged )
&& ( i > 0 ) )
{
// Cell merged -> remember
//bWWMergedVer6[i] = true;
pTCs[i-1].rgbrc[ WW8_RIGHT ]
= WW8_BRC( pTc->rgbrcVer6[ WW8_RIGHT ] );
= WW8_BRCVer9(WW8_BRC( pTc->rgbrcVer6[ WW8_RIGHT ] ));
// apply right border to previous cell
// bExist must not be set to false, because WW
// does not count this cells in text boxes....
......@@ -1198,10 +1198,10 @@ void WW8TabBandDesc::ReadDef(bool bVer67, const sal_uInt8* pS)
// note: in aBits1 there are 7 bits unused,
// followed by another 16 unused bits
pAktTC->rgbrc[ WW8_TOP ] = pTc->rgbrcVer8[ WW8_TOP ];
pAktTC->rgbrc[ WW8_LEFT ] = pTc->rgbrcVer8[ WW8_LEFT ];
pAktTC->rgbrc[ WW8_BOT ] = pTc->rgbrcVer8[ WW8_BOT ];
pAktTC->rgbrc[ WW8_RIGHT ] = pTc->rgbrcVer8[ WW8_RIGHT ];
pAktTC->rgbrc[ WW8_TOP ] = WW8_BRCVer9(pTc->rgbrcVer8[ WW8_TOP ]);
pAktTC->rgbrc[ WW8_LEFT ] = WW8_BRCVer9(pTc->rgbrcVer8[ WW8_LEFT ]);
pAktTC->rgbrc[ WW8_BOT ] = WW8_BRCVer9(pTc->rgbrcVer8[ WW8_BOT ]);
pAktTC->rgbrc[ WW8_RIGHT ] = WW8_BRCVer9(pTc->rgbrcVer8[ WW8_RIGHT ]);
}
}
......@@ -1246,9 +1246,9 @@ void WW8TabBandDesc::ProcessSprmTSetBRC(int nBrcVer, const sal_uInt8* pParamsTSe
WW8_TCell* pAktTC = pTCs + nitcFirst;
WW8_BRCVer9 brcVer9;
if( nBrcVer == 6 )
brcVer9 = WW8_BRC(*reinterpret_cast<WW8_BRCVer6 const *>(pParamsTSetBRC+3));
brcVer9 = WW8_BRCVer9(WW8_BRC(*reinterpret_cast<WW8_BRCVer6 const *>(pParamsTSetBRC+3)));
else if( nBrcVer == 8 )
brcVer9 = *reinterpret_cast<WW8_BRC const *>(pParamsTSetBRC+3);
brcVer9 = WW8_BRCVer9(*reinterpret_cast<WW8_BRC const *>(pParamsTSetBRC+3));
else
brcVer9 = *reinterpret_cast<WW8_BRCVer9 const *>(pParamsTSetBRC+3);
......@@ -1273,13 +1273,13 @@ void WW8TabBandDesc::ProcessSprmTTableBorders(int nBrcVer, const sal_uInt8* pPar
{
WW8_BRCVer6 const *pVer6 = reinterpret_cast<WW8_BRCVer6 const *>(pParams);
for (int i = 0; i < 6; ++i)
aDefBrcs[i] = WW8_BRC(pVer6[i]);
aDefBrcs[i] = WW8_BRCVer9(WW8_BRC(pVer6[i]));
}
else if ( nBrcVer == 8 )
{
static_assert(sizeof (WW8_BRC) == 4, "this has to match the msword size");
for( int i = 0; i < 6; ++i )
aDefBrcs[i] = reinterpret_cast<WW8_BRC const *>(pParams)[i];
aDefBrcs[i] = WW8_BRCVer9(reinterpret_cast<WW8_BRC const *>(pParams)[i]);
}
else
memcpy( aDefBrcs, pParams, sizeof( aDefBrcs ) );
......
......@@ -1226,9 +1226,9 @@ static bool _SetWW8_BRC(int nBrcVer, WW8_BRCVer9& rVar, const sal_uInt8* pS)
if ( nBrcVer == 9 )
rVar = *reinterpret_cast<const WW8_BRCVer9*>(pS);
else if( nBrcVer == 8 )
rVar = *reinterpret_cast<const WW8_BRC*>(pS);
rVar = WW8_BRCVer9(*reinterpret_cast<const WW8_BRC*>(pS));
else // nBrcVer == 6
rVar = WW8_BRC(*reinterpret_cast<const WW8_BRCVer6*>(pS));
rVar = WW8_BRCVer9(WW8_BRC(*reinterpret_cast<const WW8_BRCVer6*>(pS)));
}
return 0 != pS;
......@@ -2083,7 +2083,7 @@ WW8FlySet::WW8FlySet( SwWW8ImplReader& rReader, const SwPaM* pPaM,
*/
WW8_BRCVer9 brcVer9[4];
for (int i = 0; i < 4; i++)
brcVer9[i] = rPic.rgbrc[i];
brcVer9[i] = WW8_BRCVer9(rPic.rgbrc[i]);
if (SwWW8ImplReader::SetFlyBordersShadow( *this, brcVer9, &aSizeArray[0]))
{
Put(SvxLRSpaceItem( aSizeArray[WW8_LEFT], 0, 0, 0, RES_LR_SPACE ) );
......
......@@ -308,7 +308,7 @@ struct WW8_BRC // BoRder Code (WW8 version)
| ((sal_uInt8)_fFrame << 6);
}
// Convert BRC from WW6 to WW8 format
WW8_BRC(const WW8_BRCVer6& brcVer6);
explicit WW8_BRC(const WW8_BRCVer6& brcVer6);
// Returns LO border width in twips=1/20pt, taking into account brcType
short DetermineBorderProperties(short *pSpace=0) const;
......@@ -360,7 +360,7 @@ struct WW8_BRCVer9 // BoRder Code (WW9 version)
aBits2[3] = 0;
}
// Convert BRC from WW8 to WW9 format
WW8_BRCVer9(const WW8_BRC& brcVer8);
explicit WW8_BRCVer9(const WW8_BRC& brcVer8);
// Returns LO border width in twips=1/20pt, taking into account brcType
short DetermineBorderProperties(short *pSpace=0) const;
......
......@@ -41,7 +41,7 @@ private:
com::sun::star::ucb::XContentProvider > resolveProvider() const;
public:
ProviderListEntry_Impl(
explicit ProviderListEntry_Impl(
const com::sun::star::uno::Reference<
com::sun::star::ucb::XContentProvider >& xProvider )
: m_xProvider( xProvider ) {}
...