[Libreoffice-commits] core.git: 2 commits - dbaccess/source filter/source forms/source sw/source
Caolán McNamara
caolanm at redhat.com
Mon Oct 5 12:31:24 PDT 2015
dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx | 6 -
dbaccess/source/ui/misc/dsmeta.cxx | 8 -
filter/source/config/cache/configflush.hxx | 2
filter/source/config/cache/contenthandlerfactory.hxx | 2
filter/source/config/cache/filterfactory.hxx | 2
filter/source/config/cache/frameloaderfactory.hxx | 2
filter/source/config/cache/querytokenizer.hxx | 2
filter/source/config/cache/typedetection.cxx | 2
filter/source/config/cache/typedetection.hxx | 2
filter/source/flash/swfdialog.hxx | 2
filter/source/flash/swffilter.cxx | 6 -
filter/source/flash/swfwriter.hxx | 6 -
filter/source/graphicfilter/egif/egif.cxx | 2
filter/source/graphicfilter/epbm/epbm.cxx | 2
filter/source/graphicfilter/epgm/epgm.cxx | 2
filter/source/graphicfilter/eppm/eppm.cxx | 4
filter/source/graphicfilter/eras/eras.cxx | 2
filter/source/graphicfilter/etiff/etiff.cxx | 2
filter/source/graphicfilter/expm/expm.cxx | 2
filter/source/graphicfilter/icgm/bitmap.hxx | 22 +--
filter/source/graphicfilter/icgm/elements.hxx | 4
filter/source/graphicfilter/icgm/outact.hxx | 2
filter/source/graphicfilter/idxf/dxfgrprd.hxx | 4
filter/source/graphicfilter/ipbm/ipbm.cxx | 4
filter/source/graphicfilter/ipcd/ipcd.cxx | 2
filter/source/graphicfilter/ipcx/ipcx.cxx | 4
filter/source/graphicfilter/ipsd/ipsd.cxx | 2
filter/source/graphicfilter/iras/iras.cxx | 4
filter/source/graphicfilter/itga/itga.cxx | 4
filter/source/msfilter/eschesdo.hxx | 103 ++++++++----------
filter/source/msfilter/viscache.hxx | 30 ++---
filter/source/odfflatxml/OdfFlatXml.cxx | 2
filter/source/pdf/impdialog.hxx | 4
filter/source/pdf/pdfdialog.hxx | 2
filter/source/pdf/pdfexport.cxx | 2
filter/source/pdf/pdffilter.hxx | 2
filter/source/placeware/exporter.hxx | 2
filter/source/placeware/filter.cxx | 2
filter/source/placeware/tempfile.hxx | 2
filter/source/placeware/zip.hxx | 2
filter/source/storagefilterdetect/filterdetect.hxx | 2
filter/source/svg/parserfragments.cxx | 2
filter/source/svg/svgdialog.hxx | 2
filter/source/svg/svgwriter.hxx | 2
filter/source/t602/t602filter.hxx | 6 -
filter/source/textfilterdetect/filterdetect.hxx | 2
filter/source/xmlfilteradaptor/XmlFilterAdaptor.hxx | 2
filter/source/xmlfilteradaptor/streamwrap.hxx | 2
filter/source/xmlfilterdetect/filterdetect.hxx | 2
filter/source/xsltdialog/typedetectionexport.hxx | 2
filter/source/xsltdialog/xmlfilterdialogcomponent.cxx | 2
filter/source/xsltdialog/xmlfilterjar.hxx | 2
filter/source/xsltdialog/xmlfiltersettingsdialog.hxx | 2
filter/source/xsltdialog/xmlfiltertabpagebasic.hxx | 2
filter/source/xsltdialog/xmlfiltertabpagexslt.hxx | 2
filter/source/xsltdialog/xmlfiltertestdialog.cxx | 2
filter/source/xsltfilter/XSLTFilter.cxx | 2
forms/source/component/Button.hxx | 2
sw/source/core/inc/flowfrm.hxx | 33 -----
sw/source/core/inc/frame.hxx | 26 ++++
sw/source/core/layout/calcmove.cxx | 7 -
sw/source/core/layout/flowfrm.cxx | 8 -
sw/source/core/layout/fly.cxx | 12 --
sw/source/core/layout/layact.cxx | 11 -
64 files changed, 192 insertions(+), 208 deletions(-)
New commits:
commit 56a5734b06e0f252722153d2e6af680fd9e6e429
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Oct 5 17:10:47 2015 +0100
cppcheck: noExplicitConstructor
Change-Id: I80950aaf1385bd76b012eab7866fd16848751f45
diff --git a/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx b/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
index bf48cda..343b840 100644
--- a/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
+++ b/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
@@ -89,7 +89,7 @@ namespace dbaui
{
}
- DataSourceHolder( const Reference< XDataSource >& _rxDataSource )
+ explicit DataSourceHolder(const Reference< XDataSource >& _rxDataSource)
{
m_xDataSource = _rxDataSource;
Reference< XDocumentDataSource > xDocDS( m_xDataSource, UNO_QUERY );
@@ -143,7 +143,7 @@ namespace dbaui
bool m_bModified; // is the data modified
bool m_bNotAttached;
- DBSubComponentController_Impl( ::osl::Mutex& i_rMutex )
+ explicit DBSubComponentController_Impl(osl::Mutex& i_rMutex)
:m_aDocScriptSupport()
,m_aModifyListeners( i_rMutex )
,m_nDocStartNumber(0)
@@ -261,7 +261,7 @@ namespace dbaui
xDS = Reference< XDataSource >( xConnAsChild->getParent(), UNO_QUERY );
// (take the indirection through XDataSource to ensure we have a correct object ....)
- m_pImpl->m_aDataSource = xDS;
+ m_pImpl->m_aDataSource = DataSourceHolder(xDS);
}
SAL_WARN_IF( !m_pImpl->m_aDataSource.is(), "dbaccess.ui", "DBSubComponentController::initializeConnection: unable to obtain the data source object!" );
diff --git a/dbaccess/source/ui/misc/dsmeta.cxx b/dbaccess/source/ui/misc/dsmeta.cxx
index c6837b9..3e9645f 100644
--- a/dbaccess/source/ui/misc/dsmeta.cxx
+++ b/dbaccess/source/ui/misc/dsmeta.cxx
@@ -41,7 +41,7 @@ namespace dbaui
{
}
- FeatureSupport( AuthenticationMode _Auth )
+ explicit FeatureSupport(AuthenticationMode _Auth)
:eAuthentication( _Auth )
{
}
@@ -134,9 +134,9 @@ namespace dbaui
OUString sAuth;
aMetaData.get("Authentication") >>= sAuth;
if ( sAuth == "UserPassword" )
- aInit = AuthUserPwd;
+ aInit = FeatureSupport(AuthUserPwd);
else if ( sAuth == "Password" )
- aInit = AuthPwd;
+ aInit = FeatureSupport(AuthPwd);
}
s_aSupport.insert(std::make_pair(*pIter,aInit));
}
@@ -149,7 +149,7 @@ namespace dbaui
class DataSourceMetaData_Impl
{
public:
- DataSourceMetaData_Impl( const OUString& _sURL );
+ explicit DataSourceMetaData_Impl(const OUString& rURL);
OUString getType() const { return m_sURL; }
diff --git a/filter/source/config/cache/configflush.hxx b/filter/source/config/cache/configflush.hxx
index 730671d..3d58adc 100644
--- a/filter/source/config/cache/configflush.hxx
+++ b/filter/source/config/cache/configflush.hxx
@@ -67,7 +67,7 @@ class ConfigFlush : public BaseLock
/** @short standard ctor.
*/
- ConfigFlush(const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR);
+ explicit ConfigFlush(const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR);
diff --git a/filter/source/config/cache/contenthandlerfactory.hxx b/filter/source/config/cache/contenthandlerfactory.hxx
index 2bb1eb5..5b45faf 100644
--- a/filter/source/config/cache/contenthandlerfactory.hxx
+++ b/filter/source/config/cache/contenthandlerfactory.hxx
@@ -53,7 +53,7 @@ class ContentHandlerFactory : public ::cppu::ImplInheritanceHelper< BaseContaine
@param rxContext
reference to the uno service manager, which created this service instance.
*/
- ContentHandlerFactory(const css::uno::Reference< css::uno::XComponentContext >& rxContext);
+ explicit ContentHandlerFactory(const css::uno::Reference< css::uno::XComponentContext >& rxContext);
diff --git a/filter/source/config/cache/filterfactory.hxx b/filter/source/config/cache/filterfactory.hxx
index 9adeb63..0144bf5 100644
--- a/filter/source/config/cache/filterfactory.hxx
+++ b/filter/source/config/cache/filterfactory.hxx
@@ -54,7 +54,7 @@ class FilterFactory : public ::cppu::ImplInheritanceHelper< BaseContainer
@param rxContext
reference to the uno service manager, which created this service instance.
*/
- FilterFactory(const css::uno::Reference< css::uno::XComponentContext >& rxContext);
+ explicit FilterFactory(const css::uno::Reference< css::uno::XComponentContext >& rxContext);
diff --git a/filter/source/config/cache/frameloaderfactory.hxx b/filter/source/config/cache/frameloaderfactory.hxx
index c93fe1a..bd477e2 100644
--- a/filter/source/config/cache/frameloaderfactory.hxx
+++ b/filter/source/config/cache/frameloaderfactory.hxx
@@ -53,7 +53,7 @@ class FrameLoaderFactory : public ::cppu::ImplInheritanceHelper< BaseContainer
@param rxContext
reference to the uno service manager, which created this service instance.
*/
- FrameLoaderFactory(const css::uno::Reference< css::uno::XComponentContext >& rxContext);
+ explicit FrameLoaderFactory(const css::uno::Reference< css::uno::XComponentContext >& rxContext);
diff --git a/filter/source/config/cache/querytokenizer.hxx b/filter/source/config/cache/querytokenizer.hxx
index 823836f..6ddf8dd 100644
--- a/filter/source/config/cache/querytokenizer.hxx
+++ b/filter/source/config/cache/querytokenizer.hxx
@@ -78,7 +78,7 @@ class QueryTokenizer : public std::unordered_map< OUString ,
@param sQuery
the query string.
*/
- QueryTokenizer(const OUString& sQuery);
+ explicit QueryTokenizer(const OUString& sQuery);
diff --git a/filter/source/config/cache/typedetection.cxx b/filter/source/config/cache/typedetection.cxx
index 4d8cc6d..0449a48 100644
--- a/filter/source/config/cache/typedetection.cxx
+++ b/filter/source/config/cache/typedetection.cxx
@@ -343,7 +343,7 @@ class FindByType : std::unary_function<FlatDetectionInfo, bool>
{
OUString maType;
public:
- FindByType(const OUString& rType) : maType(rType) {}
+ explicit FindByType(const OUString& rType) : maType(rType) {}
bool operator() (const FlatDetectionInfo& rInfo) const
{
return rInfo.sType == maType;
diff --git a/filter/source/config/cache/typedetection.hxx b/filter/source/config/cache/typedetection.hxx
index 08a17bc..194aadf 100644
--- a/filter/source/config/cache/typedetection.hxx
+++ b/filter/source/config/cache/typedetection.hxx
@@ -53,7 +53,7 @@ public:
@param rxContext
reference to the uno service manager, which created this service instance.
*/
- TypeDetection(const css::uno::Reference< css::uno::XComponentContext >& rxContext);
+ explicit TypeDetection(const css::uno::Reference< css::uno::XComponentContext >& rxContext);
diff --git a/filter/source/flash/swfdialog.hxx b/filter/source/flash/swfdialog.hxx
index e004c15..66792bd 100644
--- a/filter/source/flash/swfdialog.hxx
+++ b/filter/source/flash/swfdialog.hxx
@@ -71,7 +71,7 @@ protected:
public:
- SWFDialog( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
+ explicit SWFDialog( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
virtual ~SWFDialog();
};
diff --git a/filter/source/flash/swffilter.cxx b/filter/source/flash/swffilter.cxx
index b51a4bc..5fd0e6e 100644
--- a/filter/source/flash/swffilter.cxx
+++ b/filter/source/flash/swffilter.cxx
@@ -67,9 +67,9 @@ class OslOutputStreamWrapper : public ::cppu::WeakImplHelper<css::io::XOutputStr
osl::File mrFile;
public:
- OslOutputStreamWrapper(const OUString& sFileName) : mrFile(sFileName)
+ explicit OslOutputStreamWrapper(const OUString& rFileName) : mrFile(rFileName)
{
- osl_removeFile(sFileName.pData);
+ osl_removeFile(rFileName.pData);
mrFile.open( osl_File_OpenFlag_Create|osl_File_OpenFlag_Write );
}
@@ -155,7 +155,7 @@ class FlashExportFilter : public cppu::WeakImplHelper
bool mbExportSelection;
public:
- FlashExportFilter( const Reference< XComponentContext > &rxContext);
+ explicit FlashExportFilter( const Reference< XComponentContext > &rxContext);
// XFilter
virtual sal_Bool SAL_CALL filter( const Sequence< PropertyValue >& aDescriptor ) throw(RuntimeException, std::exception) SAL_OVERRIDE;
diff --git a/filter/source/flash/swfwriter.hxx b/filter/source/flash/swfwriter.hxx
index 64a3dac..b649035 100644
--- a/filter/source/flash/swfwriter.hxx
+++ b/filter/source/flash/swfwriter.hxx
@@ -176,7 +176,7 @@ typedef std::vector<FlashFont*> FontMap;
class Tag : public SvMemoryStream
{
public:
- Tag( sal_uInt8 nTagId );
+ explicit Tag( sal_uInt8 nTagId );
sal_uInt8 getTagId() const { return mnTagId; }
@@ -207,7 +207,7 @@ private:
class Sprite
{
public:
- Sprite( sal_uInt16 nId );
+ explicit Sprite( sal_uInt16 nId );
~Sprite();
void write( SvStream& out );
@@ -228,7 +228,7 @@ public:
enum FillStyleType { solid = 0x00, linear_gradient = 0x10, radial_gradient = 0x12, tiled_bitmap = 0x40, clipped_bitmap = 0x41 };
/** this c'tor creates a solid fill style */
- FillStyle( const Color& rSolidColor );
+ explicit FillStyle( const Color& rSolidColor );
/** this c'tor creates a linear or radial gradient fill style */
FillStyle( const Rectangle& rBoundRect, const Gradient& rGradient );
diff --git a/filter/source/graphicfilter/egif/egif.cxx b/filter/source/graphicfilter/egif/egif.cxx
index 2ac0c0f..0101329 100644
--- a/filter/source/graphicfilter/egif/egif.cxx
+++ b/filter/source/graphicfilter/egif/egif.cxx
@@ -67,7 +67,7 @@ class GIFWriter
public:
- GIFWriter(SvStream &rStream);
+ explicit GIFWriter(SvStream &rStream);
~GIFWriter() {}
bool WriteGIF( const Graphic& rGraphic, FilterConfigItem* pConfigItem );
diff --git a/filter/source/graphicfilter/epbm/epbm.cxx b/filter/source/graphicfilter/epbm/epbm.cxx
index f848c80..b6e64d9 100644
--- a/filter/source/graphicfilter/epbm/epbm.cxx
+++ b/filter/source/graphicfilter/epbm/epbm.cxx
@@ -46,7 +46,7 @@ private:
css::uno::Reference< css::task::XStatusIndicator > xStatusIndicator;
public:
- PBMWriter(SvStream &rPBM);
+ explicit PBMWriter(SvStream &rPBM);
~PBMWriter();
bool WritePBM( const Graphic& rGraphic, FilterConfigItem* pFilterConfigItem );
diff --git a/filter/source/graphicfilter/epgm/epgm.cxx b/filter/source/graphicfilter/epgm/epgm.cxx
index d27e7c1..85a1376 100644
--- a/filter/source/graphicfilter/epgm/epgm.cxx
+++ b/filter/source/graphicfilter/epgm/epgm.cxx
@@ -46,7 +46,7 @@ private:
css::uno::Reference< css::task::XStatusIndicator > xStatusIndicator;
public:
- PGMWriter(SvStream &rStream);
+ explicit PGMWriter(SvStream &rStream);
~PGMWriter();
bool WritePGM( const Graphic& rGraphic, FilterConfigItem* pFilterConfigItem );
diff --git a/filter/source/graphicfilter/eppm/eppm.cxx b/filter/source/graphicfilter/eppm/eppm.cxx
index 8210edf..24e72fa 100644
--- a/filter/source/graphicfilter/eppm/eppm.cxx
+++ b/filter/source/graphicfilter/eppm/eppm.cxx
@@ -46,8 +46,8 @@ private:
css::uno::Reference< css::task::XStatusIndicator > xStatusIndicator;
public:
- PPMWriter(SvStream &rStrm);
- ~PPMWriter();
+ explicit PPMWriter(SvStream &rStrm);
+ ~PPMWriter();
bool WritePPM( const Graphic& rGraphic, FilterConfigItem* pFilterConfigItem );
};
diff --git a/filter/source/graphicfilter/eras/eras.cxx b/filter/source/graphicfilter/eras/eras.cxx
index 1f23212..32a8994 100644
--- a/filter/source/graphicfilter/eras/eras.cxx
+++ b/filter/source/graphicfilter/eras/eras.cxx
@@ -49,7 +49,7 @@ private:
void ImplPutByte( sal_uInt8 ); // RLE decoding
public:
- RASWriter(SvStream &rStream);
+ explicit RASWriter(SvStream &rStream);
~RASWriter();
bool WriteRAS( const Graphic& rGraphic, FilterConfigItem* pFilterConfigItem );
diff --git a/filter/source/graphicfilter/etiff/etiff.cxx b/filter/source/graphicfilter/etiff/etiff.cxx
index afc51cd..408f454 100644
--- a/filter/source/graphicfilter/etiff/etiff.cxx
+++ b/filter/source/graphicfilter/etiff/etiff.cxx
@@ -107,7 +107,7 @@ private:
public:
- TIFFWriter(SvStream &rStream);
+ explicit TIFFWriter(SvStream &rStream);
~TIFFWriter();
bool WriteTIFF( const Graphic& rGraphic, FilterConfigItem* pFilterConfigItem );
diff --git a/filter/source/graphicfilter/expm/expm.cxx b/filter/source/graphicfilter/expm/expm.cxx
index ade4279..7dee417 100644
--- a/filter/source/graphicfilter/expm/expm.cxx
+++ b/filter/source/graphicfilter/expm/expm.cxx
@@ -47,7 +47,7 @@ private:
void ImplWritePixel( sal_uLong ) const;
public:
- XPMWriter(SvStream& rOStm);
+ explicit XPMWriter(SvStream& rOStm);
~XPMWriter();
bool WriteXPM( const Graphic& rGraphic, FilterConfigItem* pFilterConfigItem );
diff --git a/filter/source/graphicfilter/icgm/bitmap.hxx b/filter/source/graphicfilter/icgm/bitmap.hxx
index 732a3d4..d60a7d8 100644
--- a/filter/source/graphicfilter/icgm/bitmap.hxx
+++ b/filter/source/graphicfilter/icgm/bitmap.hxx
@@ -73,17 +73,17 @@ class CGMBitmapDescriptor
class CGMBitmap
{
- CGM* mpCGM;
- CGMBitmapDescriptor* pCGMBitmapDescriptor;
- bool ImplGetDimensions( CGMBitmapDescriptor& );
- void ImplSetCurrentPalette( CGMBitmapDescriptor& );
- void ImplGetBitmap( CGMBitmapDescriptor& );
- void ImplInsert( CGMBitmapDescriptor& rSource, CGMBitmapDescriptor& rDest );
- public:
- CGMBitmap( CGM& rCGM );
- ~CGMBitmap();
- CGMBitmapDescriptor* GetBitmap() { return pCGMBitmapDescriptor;}
- CGMBitmap* GetNext();
+ CGM* mpCGM;
+ CGMBitmapDescriptor* pCGMBitmapDescriptor;
+ bool ImplGetDimensions( CGMBitmapDescriptor& );
+ void ImplSetCurrentPalette( CGMBitmapDescriptor& );
+ void ImplGetBitmap( CGMBitmapDescriptor& );
+ void ImplInsert( CGMBitmapDescriptor& rSource, CGMBitmapDescriptor& rDest );
+public:
+ explicit CGMBitmap( CGM& rCGM );
+ ~CGMBitmap();
+ CGMBitmapDescriptor* GetBitmap() { return pCGMBitmapDescriptor;}
+ CGMBitmap* GetNext();
};
#endif
diff --git a/filter/source/graphicfilter/icgm/elements.hxx b/filter/source/graphicfilter/icgm/elements.hxx
index 6c66bd5..fc7acac 100644
--- a/filter/source/graphicfilter/icgm/elements.hxx
+++ b/filter/source/graphicfilter/icgm/elements.hxx
@@ -126,8 +126,8 @@ class CGMElements
// Delimiter Counts -> which will be increased by each 'begin' operation
// and decreased by each 'end' operation
bool bSegmentCount;
- CGMElements( CGM& rCGM );
- ~CGMElements();
+ explicit CGMElements( CGM& rCGM );
+ ~CGMElements();
CGMElements& operator=( CGMElements& );
void Init();
static Bundle* GetBundleIndex( long nIndex, BundleList&, Bundle& );
diff --git a/filter/source/graphicfilter/icgm/outact.hxx b/filter/source/graphicfilter/icgm/outact.hxx
index ecd6179..a7e24e7 100644
--- a/filter/source/graphicfilter/icgm/outact.hxx
+++ b/filter/source/graphicfilter/icgm/outact.hxx
@@ -61,7 +61,7 @@ protected:
CGM* mpCGM;
public:
- CGMOutAct( CGM& rCGM );
+ explicit CGMOutAct( CGM& rCGM );
virtual ~CGMOutAct();
void FirstOutPut() { mpCGM->mbFirstOutPut = false; } ;
virtual void InsertPage() { mnCurrentPage++; } ;
diff --git a/filter/source/graphicfilter/idxf/dxfgrprd.hxx b/filter/source/graphicfilter/idxf/dxfgrprd.hxx
index e8429b5..de7e1c7 100644
--- a/filter/source/graphicfilter/idxf/dxfgrprd.hxx
+++ b/filter/source/graphicfilter/idxf/dxfgrprd.hxx
@@ -27,10 +27,8 @@
class DXFGroupReader
{
-
public:
-
- DXFGroupReader( SvStream & rIStream );
+ explicit DXFGroupReader( SvStream & rIStream );
bool GetStatus() const;
diff --git a/filter/source/graphicfilter/ipbm/ipbm.cxx b/filter/source/graphicfilter/ipbm/ipbm.cxx
index d7cf941..adc61dc 100644
--- a/filter/source/graphicfilter/ipbm/ipbm.cxx
+++ b/filter/source/graphicfilter/ipbm/ipbm.cxx
@@ -44,8 +44,8 @@ private:
bool ImplReadHeader();
public:
- PBMReader(SvStream & rPBM);
- ~PBMReader();
+ explicit PBMReader(SvStream & rPBM);
+ ~PBMReader();
bool ReadPBM(Graphic & rGraphic );
};
diff --git a/filter/source/graphicfilter/ipcd/ipcd.cxx b/filter/source/graphicfilter/ipcd/ipcd.cxx
index a5f9ad5..1d3a89d 100644
--- a/filter/source/graphicfilter/ipcd/ipcd.cxx
+++ b/filter/source/graphicfilter/ipcd/ipcd.cxx
@@ -76,7 +76,7 @@ private:
public:
- PCDReader(SvStream &rStream)
+ explicit PCDReader(SvStream &rStream)
: bStatus(false)
, nLastPercent(0)
, m_rPCD(rStream)
diff --git a/filter/source/graphicfilter/ipcx/ipcx.cxx b/filter/source/graphicfilter/ipcx/ipcx.cxx
index a14e85b..ce12b64 100644
--- a/filter/source/graphicfilter/ipcx/ipcx.cxx
+++ b/filter/source/graphicfilter/ipcx/ipcx.cxx
@@ -51,8 +51,8 @@ private:
void ImplReadHeader();
public:
- PCXReader(SvStream &rStream);
- ~PCXReader();
+ explicit PCXReader(SvStream &rStream);
+ ~PCXReader();
bool ReadPCX(Graphic & rGraphic );
// Reads a PCX file from the stream and fills the GDIMetaFile
};
diff --git a/filter/source/graphicfilter/ipsd/ipsd.cxx b/filter/source/graphicfilter/ipsd/ipsd.cxx
index 9d92ab5..953c966 100644
--- a/filter/source/graphicfilter/ipsd/ipsd.cxx
+++ b/filter/source/graphicfilter/ipsd/ipsd.cxx
@@ -77,7 +77,7 @@ private:
bool ImplReadHeader();
public:
- PSDReader(SvStream &rStream);
+ explicit PSDReader(SvStream &rStream);
~PSDReader();
bool ReadPSD(Graphic & rGraphic);
};
diff --git a/filter/source/graphicfilter/iras/iras.cxx b/filter/source/graphicfilter/iras/iras.cxx
index e3209bd..b569d5b 100644
--- a/filter/source/graphicfilter/iras/iras.cxx
+++ b/filter/source/graphicfilter/iras/iras.cxx
@@ -57,8 +57,8 @@ private:
sal_uInt8 ImplGetByte();
public:
- RASReader(SvStream &rRAS);
- ~RASReader();
+ explicit RASReader(SvStream &rRAS);
+ ~RASReader();
bool ReadRAS(Graphic & rGraphic);
};
diff --git a/filter/source/graphicfilter/itga/itga.cxx b/filter/source/graphicfilter/itga/itga.cxx
index 1fd3df8..c6abd01 100644
--- a/filter/source/graphicfilter/itga/itga.cxx
+++ b/filter/source/graphicfilter/itga/itga.cxx
@@ -100,8 +100,8 @@ private:
bool ImplReadBody();
public:
- TGAReader(SvStream &rTGA);
- ~TGAReader();
+ explicit TGAReader(SvStream &rTGA);
+ ~TGAReader();
bool ReadTGA(Graphic &rGraphic);
};
diff --git a/filter/source/msfilter/eschesdo.hxx b/filter/source/msfilter/eschesdo.hxx
index e048677..4e97311 100644
--- a/filter/source/msfilter/eschesdo.hxx
+++ b/filter/source/msfilter/eschesdo.hxx
@@ -108,90 +108,87 @@ class EscherExHostAppData;
class ImplEESdrWriter
{
protected:
- EscherEx* mpEscherEx;
- MapMode maMapModeSrc;
- MapMode maMapModeDest;
+ EscherEx* mpEscherEx;
+ MapMode maMapModeSrc;
+ MapMode maMapModeDest;
- css::uno::Reference< css::task::XStatusIndicator > mXStatusIndicator;
- css::uno::Reference< css::drawing::XDrawPage > mXDrawPage;
- css::uno::Reference< css::drawing::XShapes > mXShapes;
+ css::uno::Reference< css::task::XStatusIndicator > mXStatusIndicator;
+ css::uno::Reference< css::drawing::XDrawPage > mXDrawPage;
+ css::uno::Reference< css::drawing::XShapes > mXShapes;
- SvStream* mpPicStrm;
+ SvStream* mpPicStrm;
- // own extensions
+ // own extensions
- EscherExHostAppData* mpHostAppData;
+ EscherExHostAppData* mpHostAppData;
- sal_uInt32 mnPagesWritten;
+ sal_uInt32 mnPagesWritten;
- sal_uInt32 mnShapeMasterTitle;
- sal_uInt32 mnShapeMasterBody;
+ sal_uInt32 mnShapeMasterTitle;
+ sal_uInt32 mnShapeMasterBody;
- // per page values
- sal_uInt32 mnIndices;
- sal_uInt32 mnOutlinerCount;
- sal_uInt32 mnPrevTextStyle;
- sal_uInt32 mnStatMaxValue;
+ // per page values
+ sal_uInt32 mnIndices;
+ sal_uInt32 mnOutlinerCount;
+ sal_uInt32 mnPrevTextStyle;
+ sal_uInt32 mnStatMaxValue;
- sal_uInt16 mnEffectCount;
+ sal_uInt16 mnEffectCount;
- bool mbIsTitlePossible;
- bool mbStatusIndicator;
- bool mbStatus;
+ bool mbIsTitlePossible;
+ bool mbStatusIndicator;
+ bool mbStatus;
- ImplEESdrWriter( EscherEx& rEx );
+ explicit ImplEESdrWriter( EscherEx& rEx );
- bool ImplInitPageValues();
+ bool ImplInitPageValues();
- void ImplWritePage(
- EscherSolverContainer& rSolver,
- ImplEESdrPageType ePageType,
- bool bBackGround = false );
+ void ImplWritePage(
+ EscherSolverContainer& rSolver,
+ ImplEESdrPageType ePageType,
+ bool bBackGround = false );
- sal_uInt32 ImplWriteShape( ImplEESdrObject& rObj,
- EscherSolverContainer& rSolver,
- ImplEESdrPageType ePageType, const bool bOOxmlExport = false ); // returns ShapeID
+ sal_uInt32 ImplWriteShape( ImplEESdrObject& rObj,
+ EscherSolverContainer& rSolver,
+ ImplEESdrPageType ePageType, const bool bOOxmlExport = false ); // returns ShapeID
- static void ImplFlipBoundingBox( ImplEESdrObject& rObj, EscherPropertyContainer& rPropOpt );
- void ImplWriteAdditionalText(
- ImplEESdrObject& rObj,
- const Point& rTextRefPoint );
- sal_uInt32 ImplEnterAdditionalTextGroup(
- const css::uno::Reference< css::drawing::XShape >& rShape,
- const Rectangle* pBoundRect = NULL );
+ static void ImplFlipBoundingBox( ImplEESdrObject& rObj, EscherPropertyContainer& rPropOpt );
+ void ImplWriteAdditionalText(
+ ImplEESdrObject& rObj,
+ const Point& rTextRefPoint );
+ sal_uInt32 ImplEnterAdditionalTextGroup(
+ const css::uno::Reference< css::drawing::XShape >& rShape,
+ const Rectangle* pBoundRect = NULL );
public:
- Point ImplMapPoint( const Point& rPoint );
- Size ImplMapSize( const Size& rSize );
- EscherExHostAppData* ImplGetHostData() { return mpHostAppData; }
+ Point ImplMapPoint( const Point& rPoint );
+ Size ImplMapSize( const Size& rSize );
+ EscherExHostAppData* ImplGetHostData() { return mpHostAppData; }
};
-
-
-
class SdrObject;
class SdrPage;
class ImplEscherExSdr : public ImplEESdrWriter
{
private:
- const SdrPage* mpSdrPage;
- EscherSolverContainer* mpSolverContainer;
+ const SdrPage* mpSdrPage;
+ EscherSolverContainer* mpSolverContainer;
public:
- ImplEscherExSdr( EscherEx& rEx );
- virtual ~ImplEscherExSdr();
+ explicit ImplEscherExSdr( EscherEx& rEx );
+ virtual ~ImplEscherExSdr();
- bool ImplInitPage( const SdrPage& rPage );
- bool ImplInitUnoShapes( const css::uno::Reference< css::drawing::XShapes >& rxShapes );
- void ImplWriteCurrentPage();
+ bool ImplInitPage( const SdrPage& rPage );
+ bool ImplInitUnoShapes( const css::uno::Reference< css::drawing::XShapes >& rxShapes );
+ void ImplWriteCurrentPage();
- sal_uInt32 ImplWriteTheShape( ImplEESdrObject& rObj, bool ooxmlExport = false );
+ sal_uInt32 ImplWriteTheShape( ImplEESdrObject& rObj, bool ooxmlExport = false );
- void ImplExitPage();
- void ImplFlushSolverContainer();
+ void ImplExitPage();
+ void ImplFlushSolverContainer();
};
diff --git a/filter/source/msfilter/viscache.hxx b/filter/source/msfilter/viscache.hxx
index e409e05..0e44b23 100644
--- a/filter/source/msfilter/viscache.hxx
+++ b/filter/source/msfilter/viscache.hxx
@@ -36,21 +36,21 @@ class Impl_OlePres
sal_uInt8* pJob;
Size aSize; // Groesse in 100TH_MM
public:
- Impl_OlePres( SotClipboardFormatId nF )
- : nFormat( nF )
- , nAspect( ASPECT_CONTENT )
- , pBmp( NULL )
- , pMtf( NULL )
- , nAdvFlags( 0x2 ) // in Dokument gefunden
- , nJobLen( 0 )
- , pJob( NULL )
- {}
- ~Impl_OlePres()
- {
- delete pJob;
- delete pBmp;
- delete pMtf;
- }
+ explicit Impl_OlePres( SotClipboardFormatId nF )
+ : nFormat( nF )
+ , nAspect( ASPECT_CONTENT )
+ , pBmp( NULL )
+ , pMtf( NULL )
+ , nAdvFlags( 0x2 ) // in Dokument gefunden
+ , nJobLen( 0 )
+ , pJob( NULL )
+ {}
+ ~Impl_OlePres()
+ {
+ delete pJob;
+ delete pBmp;
+ delete pMtf;
+ }
void SetMtf( const GDIMetaFile & rMtf )
{
if( pMtf )
diff --git a/filter/source/odfflatxml/OdfFlatXml.cxx b/filter/source/odfflatxml/OdfFlatXml.cxx
index 62f419c..813dd2a 100644
--- a/filter/source/odfflatxml/OdfFlatXml.cxx
+++ b/filter/source/odfflatxml/OdfFlatXml.cxx
@@ -62,7 +62,7 @@ namespace filter {
public:
- OdfFlatXml(const Reference<XComponentContext> &r) :
+ explicit OdfFlatXml(const Reference<XComponentContext> &r) :
m_xContext(r)
{
}
diff --git a/filter/source/pdf/impdialog.hxx b/filter/source/pdf/impdialog.hxx
index 2eeaf75..39633df 100644
--- a/filter/source/pdf/impdialog.hxx
+++ b/filter/source/pdf/impdialog.hxx
@@ -51,7 +51,7 @@ class ImpPDFTabLinksPage;
class PDFFilterResId : public ResId
{
public:
- PDFFilterResId( sal_uInt32 nId );
+ explicit PDFFilterResId( sal_uInt32 nId );
};
class ImplErrorDialog : public MessageDialog
@@ -61,7 +61,7 @@ class ImplErrorDialog : public MessageDialog
DECL_LINK(SelectHdl, void *);
public:
- ImplErrorDialog( const std::set< vcl::PDFWriter::ErrorCode >& );
+ explicit ImplErrorDialog( const std::set< vcl::PDFWriter::ErrorCode >& );
virtual ~ImplErrorDialog();
virtual void dispose() SAL_OVERRIDE;
};
diff --git a/filter/source/pdf/pdfdialog.hxx b/filter/source/pdf/pdfdialog.hxx
index 9ec8d6e..c587a0c 100644
--- a/filter/source/pdf/pdfdialog.hxx
+++ b/filter/source/pdf/pdfdialog.hxx
@@ -67,7 +67,7 @@ protected:
public:
- PDFDialog( const Reference< XComponentContext >& rxContext );
+ explicit PDFDialog( const Reference< XComponentContext >& rxContext );
virtual ~PDFDialog();
};
diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx
index eff86c9..0881c738 100644
--- a/filter/source/pdf/pdfexport.cxx
+++ b/filter/source/pdf/pdfexport.cxx
@@ -969,7 +969,7 @@ class PDFErrorRequest : private cppu::BaseMutex,
{
task::PDFExportException maExc;
public:
- PDFErrorRequest( const task::PDFExportException& i_rExc );
+ explicit PDFErrorRequest( const task::PDFExportException& i_rExc );
// XInteractionRequest
virtual uno::Any SAL_CALL getRequest() throw (uno::RuntimeException, std::exception) SAL_OVERRIDE;
diff --git a/filter/source/pdf/pdffilter.hxx b/filter/source/pdf/pdffilter.hxx
index 0884d5b..99348b3 100644
--- a/filter/source/pdf/pdffilter.hxx
+++ b/filter/source/pdf/pdffilter.hxx
@@ -83,7 +83,7 @@ protected:
public:
- PDFFilter( const Reference< XComponentContext >& rxContext );
+ explicit PDFFilter( const Reference< XComponentContext >& rxContext );
virtual ~PDFFilter();
};
diff --git a/filter/source/placeware/exporter.hxx b/filter/source/placeware/exporter.hxx
index 4c7f2a7..de723ed 100644
--- a/filter/source/placeware/exporter.hxx
+++ b/filter/source/placeware/exporter.hxx
@@ -32,7 +32,7 @@ class PageEntry;
class PlaceWareExporter
{
public:
- PlaceWareExporter( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
+ explicit PlaceWareExporter( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
~PlaceWareExporter();
bool doExport( css::uno::Reference< css::lang::XComponent > xDoc,
diff --git a/filter/source/placeware/filter.cxx b/filter/source/placeware/filter.cxx
index b56d403..9b9fec8 100644
--- a/filter/source/placeware/filter.cxx
+++ b/filter/source/placeware/filter.cxx
@@ -53,7 +53,7 @@ class PlaceWareExportFilter : public cppu::WeakImplHelper
Reference< XComponentContext > mxContext;
public:
- PlaceWareExportFilter( const Reference< XComponentContext > &rxContext);
+ explicit PlaceWareExportFilter( const Reference< XComponentContext > &rxContext);
// XFilter
virtual sal_Bool SAL_CALL filter( const Sequence< PropertyValue >& aDescriptor ) throw(RuntimeException, std::exception) SAL_OVERRIDE;
diff --git a/filter/source/placeware/tempfile.hxx b/filter/source/placeware/tempfile.hxx
index 38b03f0..c8595ae 100644
--- a/filter/source/placeware/tempfile.hxx
+++ b/filter/source/placeware/tempfile.hxx
@@ -26,7 +26,7 @@
class PlaceWareTempFile : public osl::File
{
public:
- PlaceWareTempFile( const OUString& aURL );
+ explicit PlaceWareTempFile( const OUString& aURL );
~PlaceWareTempFile();
static OUString createTempFileURL();
diff --git a/filter/source/placeware/zip.hxx b/filter/source/placeware/zip.hxx
index 9271145..99dc576 100644
--- a/filter/source/placeware/zip.hxx
+++ b/filter/source/placeware/zip.hxx
@@ -31,7 +31,7 @@ struct ZipEntry;
class PlacewareZipFile
{
public:
- PlacewareZipFile( osl::File& rFile );
+ explicit PlacewareZipFile( osl::File& rFile );
~PlacewareZipFile();
bool addFile( osl::File& rFile, const OString& rName );
diff --git a/filter/source/storagefilterdetect/filterdetect.hxx b/filter/source/storagefilterdetect/filterdetect.hxx
index 73d0f9c..85c2a9e 100644
--- a/filter/source/storagefilterdetect/filterdetect.hxx
+++ b/filter/source/storagefilterdetect/filterdetect.hxx
@@ -36,7 +36,7 @@ class StorageFilterDetect : public cppu::WeakImplHelper<
public:
- StorageFilterDetect (const css::uno::Reference<css::uno::XComponentContext>& xCxt);
+ explicit StorageFilterDetect (const css::uno::Reference<css::uno::XComponentContext>& xCxt);
virtual ~StorageFilterDetect();
// XExtendedFilterDetection
diff --git a/filter/source/svg/parserfragments.cxx b/filter/source/svg/parserfragments.cxx
index 9310db8..953c033 100644
--- a/filter/source/svg/parserfragments.cxx
+++ b/filter/source/svg/parserfragments.cxx
@@ -127,7 +127,7 @@ namespace
struct definition
{
::boost::spirit::classic::rule< ScannerT > colorExpression;
- definition( const ColorGrammar& self )
+ explicit definition( const ColorGrammar& self )
{
using namespace ::boost::spirit::classic;
diff --git a/filter/source/svg/svgdialog.hxx b/filter/source/svg/svgdialog.hxx
index 7d17095..a3aeed3 100644
--- a/filter/source/svg/svgdialog.hxx
+++ b/filter/source/svg/svgdialog.hxx
@@ -73,7 +73,7 @@ protected:
public:
- SVGDialog( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
+ explicit SVGDialog( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
virtual ~SVGDialog();
};
diff --git a/filter/source/svg/svgwriter.hxx b/filter/source/svg/svgwriter.hxx
index 8f46efd..46730a2 100644
--- a/filter/source/svg/svgwriter.hxx
+++ b/filter/source/svg/svgwriter.hxx
@@ -210,7 +210,7 @@ class SVGTextWriter
vcl::Font maParentFont;
public:
- SVGTextWriter( SVGExport& rExport );
+ explicit SVGTextWriter( SVGExport& rExport );
virtual ~SVGTextWriter();
sal_Int32 setTextPosition( const GDIMetaFile& rMtf, sal_uLong& nCurAction );
diff --git a/filter/source/t602/t602filter.hxx b/filter/source/t602/t602filter.hxx
index 4ab091b..e9a9095 100644
--- a/filter/source/t602/t602filter.hxx
+++ b/filter/source/t602/t602filter.hxx
@@ -138,7 +138,7 @@ class T602ImportFilterDialog : public cppu::WeakImplHelper <
css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
public:
- T602ImportFilterDialog(const css::uno::Reference<css::lang::XMultiServiceFactory > &r );
+ explicit T602ImportFilterDialog(const css::uno::Reference<css::lang::XMultiServiceFactory > &r );
};
@@ -254,8 +254,8 @@ private:
throw (css::uno::RuntimeException);
public:
- T602ImportFilter(const css::uno::Reference<css::lang::XMultiServiceFactory > &r );
- T602ImportFilter(css::uno::Reference<css::io::XInputStream> xInputStream);
+ explicit T602ImportFilter(const css::uno::Reference<css::lang::XMultiServiceFactory > &r );
+ explicit T602ImportFilter(css::uno::Reference<css::io::XInputStream> xInputStream);
virtual ~T602ImportFilter();
// XFilter
diff --git a/filter/source/textfilterdetect/filterdetect.hxx b/filter/source/textfilterdetect/filterdetect.hxx
index 61d80de..3b2983b 100644
--- a/filter/source/textfilterdetect/filterdetect.hxx
+++ b/filter/source/textfilterdetect/filterdetect.hxx
@@ -36,7 +36,7 @@ class PlainTextFilterDetect : public cppu::WeakImplHelper<
public:
- PlainTextFilterDetect (const css::uno::Reference<css::uno::XComponentContext>& xCxt);
+ explicit PlainTextFilterDetect (const css::uno::Reference<css::uno::XComponentContext>& xCxt);
virtual ~PlainTextFilterDetect();
// XExtendedFilterDetection
diff --git a/filter/source/xmlfilteradaptor/XmlFilterAdaptor.hxx b/filter/source/xmlfilteradaptor/XmlFilterAdaptor.hxx
index 67cabf5..aee1cc2 100644
--- a/filter/source/xmlfilteradaptor/XmlFilterAdaptor.hxx
+++ b/filter/source/xmlfilteradaptor/XmlFilterAdaptor.hxx
@@ -71,7 +71,7 @@ protected:
public:
- XmlFilterAdaptor( const css::uno::Reference< css::uno::XComponentContext > & rxContext)
+ explicit XmlFilterAdaptor( const css::uno::Reference< css::uno::XComponentContext > & rxContext)
: mxContext(rxContext)
, meType(FILTER_IMPORT)
{
diff --git a/filter/source/xmlfilteradaptor/streamwrap.hxx b/filter/source/xmlfilteradaptor/streamwrap.hxx
index efc2703..d1ea5ad 100644
--- a/filter/source/xmlfilteradaptor/streamwrap.hxx
+++ b/filter/source/xmlfilteradaptor/streamwrap.hxx
@@ -42,7 +42,7 @@ class OOutputStreamWrapper : public OutputStreamWrapper_Base
::osl::File& rStream;
public:
- OOutputStreamWrapper(::osl::File& _rStream) :rStream(_rStream) { }
+ explicit OOutputStreamWrapper(osl::File& _rStream) :rStream(_rStream) { }
// css::io::XOutputStream
virtual void SAL_CALL writeBytes(const css::uno::Sequence< sal_Int8 >& aData) throw(css::io::NotConnectedException, css::io::BufferSizeExceededException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
diff --git a/filter/source/xmlfilterdetect/filterdetect.hxx b/filter/source/xmlfilterdetect/filterdetect.hxx
index 301684e..de55eaa 100644
--- a/filter/source/xmlfilterdetect/filterdetect.hxx
+++ b/filter/source/xmlfilterdetect/filterdetect.hxx
@@ -40,7 +40,7 @@ protected:
css::uno::Reference< css::uno::XComponentContext > mxCtx;
public:
- FilterDetect( const css::uno::Reference< css::uno::XComponentContext > &rxCtx)
+ explicit FilterDetect( const css::uno::Reference< css::uno::XComponentContext > &rxCtx)
: mxCtx( rxCtx ) {}
virtual ~FilterDetect() {}
diff --git a/filter/source/xsltdialog/typedetectionexport.hxx b/filter/source/xsltdialog/typedetectionexport.hxx
index a77af76..dcb0ca0 100644
--- a/filter/source/xsltdialog/typedetectionexport.hxx
+++ b/filter/source/xsltdialog/typedetectionexport.hxx
@@ -28,7 +28,7 @@
class TypeDetectionExporter
{
public:
- TypeDetectionExporter( css::uno::Reference< css::uno::XComponentContext >& mxContext );
+ explicit TypeDetectionExporter( css::uno::Reference< css::uno::XComponentContext >& mxContext );
void doExport(css::uno::Reference < css::io::XOutputStream > xOS, const XMLFilterVector& rFilters );
diff --git a/filter/source/xsltdialog/xmlfilterdialogcomponent.cxx b/filter/source/xsltdialog/xmlfilterdialogcomponent.cxx
index 52da685..44aa2b8 100644
--- a/filter/source/xsltdialog/xmlfilterdialogcomponent.cxx
+++ b/filter/source/xsltdialog/xmlfilterdialogcomponent.cxx
@@ -68,7 +68,7 @@ class XMLFilterDialogComponent : public XMLFilterDialogComponentBase,
public XTerminateListener
{
public:
- XMLFilterDialogComponent( const Reference< XComponentContext >& rxContext );
+ explicit XMLFilterDialogComponent( const Reference< XComponentContext >& rxContext );
virtual ~XMLFilterDialogComponent();
protected:
diff --git a/filter/source/xsltdialog/xmlfilterjar.hxx b/filter/source/xsltdialog/xmlfilterjar.hxx
index eed841e..9372940 100644
--- a/filter/source/xsltdialog/xmlfilterjar.hxx
+++ b/filter/source/xsltdialog/xmlfilterjar.hxx
@@ -32,7 +32,7 @@ typedef std::vector< filter_info_impl* > XMLFilterVector;
class XMLFilterJarHelper
{
public:
- XMLFilterJarHelper( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
+ explicit XMLFilterJarHelper( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
bool savePackage( const OUString& rPackageURL, const XMLFilterVector& rFilters );
void openPackage( const OUString& rPackageURL, XMLFilterVector& rFilters );
diff --git a/filter/source/xsltdialog/xmlfiltersettingsdialog.hxx b/filter/source/xsltdialog/xmlfiltersettingsdialog.hxx
index bb83350..1eebb9c 100644
--- a/filter/source/xsltdialog/xmlfiltersettingsdialog.hxx
+++ b/filter/source/xsltdialog/xmlfiltersettingsdialog.hxx
@@ -46,7 +46,7 @@ protected:
virtual void Resize() SAL_OVERRIDE;
virtual Size GetOptimalSize() const SAL_OVERRIDE;
public:
- SvxPathControl(vcl::Window* pParent);
+ explicit SvxPathControl(vcl::Window* pParent);
HeaderBar* getHeaderBar() { return m_pHeaderBar; }
XMLFilterListBox* getListBox() { return m_pFocusCtrl; }
virtual ~SvxPathControl();
diff --git a/filter/source/xsltdialog/xmlfiltertabpagebasic.hxx b/filter/source/xsltdialog/xmlfiltertabpagebasic.hxx
index 439ad6f..6bd2b91 100644
--- a/filter/source/xsltdialog/xmlfiltertabpagebasic.hxx
+++ b/filter/source/xsltdialog/xmlfiltertabpagebasic.hxx
@@ -32,7 +32,7 @@ class filter_info_impl;
class XMLFilterTabPageBasic : public TabPage
{
public:
- XMLFilterTabPageBasic(vcl::Window* pParent);
+ explicit XMLFilterTabPageBasic(vcl::Window* pParent);
virtual ~XMLFilterTabPageBasic();
virtual void dispose() SAL_OVERRIDE;
diff --git a/filter/source/xsltdialog/xmlfiltertabpagexslt.hxx b/filter/source/xsltdialog/xmlfiltertabpagexslt.hxx
index 6ec26de..5a1f29a 100644
--- a/filter/source/xsltdialog/xmlfiltertabpagexslt.hxx
+++ b/filter/source/xsltdialog/xmlfiltertabpagexslt.hxx
@@ -33,7 +33,7 @@ class filter_info_impl;
class XMLFilterTabPageXSLT : public TabPage
{
public:
- XMLFilterTabPageXSLT( vcl::Window* pParent);
+ explicit XMLFilterTabPageXSLT(vcl::Window* pParent);
virtual ~XMLFilterTabPageXSLT();
virtual void dispose() SAL_OVERRIDE;
diff --git a/filter/source/xsltdialog/xmlfiltertestdialog.cxx b/filter/source/xsltdialog/xmlfiltertestdialog.cxx
index c619fe0..e6f149b 100644
--- a/filter/source/xsltdialog/xmlfiltertestdialog.cxx
+++ b/filter/source/xsltdialog/xmlfiltertestdialog.cxx
@@ -71,7 +71,7 @@ using namespace com::sun::star::xml::sax;
class GlobalEventListenerImpl : public ::cppu::WeakImplHelper< css::document::XDocumentEventListener >
{
public:
- GlobalEventListenerImpl( XMLFilterTestDialog* pDialog );
+ explicit GlobalEventListenerImpl( XMLFilterTestDialog* pDialog );
// XDocumentEventListener
virtual void SAL_CALL documentEventOccured( const css::document::DocumentEvent& Event ) throw (RuntimeException, std::exception) SAL_OVERRIDE;
diff --git a/filter/source/xsltfilter/XSLTFilter.cxx b/filter/source/xsltfilter/XSLTFilter.cxx
index b2eca68..71442c7 100644
--- a/filter/source/xsltfilter/XSLTFilter.cxx
+++ b/filter/source/xsltfilter/XSLTFilter.cxx
@@ -126,7 +126,7 @@ namespace XSLT
public:
// ctor...
- XSLTFilter(const css::uno::Reference<XComponentContext> &r);
+ explicit XSLTFilter(const css::uno::Reference<XComponentContext> &r);
// XStreamListener
virtual void SAL_CALL
diff --git a/forms/source/component/Button.hxx b/forms/source/component/Button.hxx
index 1e6c43e..dd22e0a 100644
--- a/forms/source/component/Button.hxx
+++ b/forms/source/component/Button.hxx
@@ -130,7 +130,7 @@ protected:
virtual css::uno::Sequence< css::uno::Type> _getTypes() SAL_OVERRIDE;
public:
- OButtonControl(const css::uno::Reference< css::uno::XComponentContext>& _rxFactory);
+ explicit OButtonControl(const css::uno::Reference< css::uno::XComponentContext>& _rxFactory);
virtual ~OButtonControl();
// XServiceInfo
commit 91ff5501892f8c3b11d4d5381e2f3efb5f289da6
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Oct 5 13:32:06 2015 +0100
replace remaining FlowFrmJoinLockGuard with SwFrmDeleteGuard
Given both tdf#91695 and the remaining crash on novell622972-2.html
it seems now safer to replace the remaining FlowFrmJoinLockGuard with
SwFrmDeleteGuard and rely on IsDeleteForbidden instead of IsJoinLocked
for the crashing layout edge-cases
and bundle the IsDeleteForbidden other IsDeleteForbidden users together
under SwFrmDeleteGuard
Change-Id: I017b6155daa3a6e49c5bee5b21ca4eddcfd5b5c0
diff --git a/sw/source/core/inc/flowfrm.hxx b/sw/source/core/inc/flowfrm.hxx
index 6421a9e..7c0e9b8 100644
--- a/sw/source/core/inc/flowfrm.hxx
+++ b/sw/source/core/inc/flowfrm.hxx
@@ -62,7 +62,6 @@ class SwFlowFrm
friend inline void TableSplitRecalcUnlock( SwFlowFrm * );
// #i44049#
friend class SwObjectFormatterTextFrm;
- friend class FlowFrmJoinLockGuard;
// TableSel is allowed to reset the follow-bit
friend inline void UnsetFollow( SwFlowFrm *pFlow );
@@ -236,38 +235,6 @@ inline bool SwFlowFrm::IsFwdMoveAllowed()
return m_rThis.GetIndPrev() != 0;
}
-//use this to protect a SwLayoutFrm for a given scope from getting merged with
-//its neighbour and thus deleted
-class FlowFrmJoinLockGuard
-{
-private:
- SwFlowFrm *m_pFlow;
- bool m_bOldJoinLocked;
-public:
- //JoinLock pParent for the lifetime of the Cut/Paste call, etc. to avoid
- //SwSectionFrm::MergeNext removing the pParent we're trying to reparent
- //into
- FlowFrmJoinLockGuard(SwLayoutFrm* pFrm)
- {
- m_pFlow = SwFlowFrm::CastFlowFrm(pFrm);
- if (m_pFlow)
- {
- m_bOldJoinLocked = m_pFlow->IsJoinLocked();
- m_pFlow->LockJoin();
- }
- else
- {
- m_bOldJoinLocked = false;
- }
- }
-
- ~FlowFrmJoinLockGuard()
- {
- if (m_pFlow && !m_bOldJoinLocked)
- m_pFlow->UnlockJoin();
- }
-};
-
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx
index 714ba6e..3e14805 100644
--- a/sw/source/core/inc/frame.hxx
+++ b/sw/source/core/inc/frame.hxx
@@ -1150,6 +1150,32 @@ inline bool SwFrm::IsAccessibleFrm() const
{
return (GetType() & FRM_ACCESSIBLE) != 0;
}
+
+//use this to protect a SwFrm for a given scope from getting deleted
+class SwFrmDeleteGuard
+{
+private:
+ SwFrm *m_pFrm;
+ bool m_bOldDeleteAllowed;
+public:
+ //Flag pFrm for SwFrmDeleteGuard lifetime that we shouldn't delete
+ //it in e.g. SwSectionFrm::MergeNext etc because we will need it
+ //again after the SwFrmDeleteGuard dtor
+ SwFrmDeleteGuard(SwFrm* pFrm)
+ : m_pFrm(pFrm)
+ {
+ m_bOldDeleteAllowed = m_pFrm && !m_pFrm->IsDeleteForbidden();
+ if (m_bOldDeleteAllowed)
+ m_pFrm->ForbidDelete();
+ }
+
+ ~SwFrmDeleteGuard()
+ {
+ if (m_bOldDeleteAllowed)
+ m_pFrm->AllowDelete();
+ }
+};
+
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/layout/calcmove.cxx b/sw/source/core/layout/calcmove.cxx
index 2e92532..0d9bbd2 100644
--- a/sw/source/core/layout/calcmove.cxx
+++ b/sw/source/core/layout/calcmove.cxx
@@ -346,9 +346,10 @@ void SwFrm::OptPrepareMake()
if ( GetUpper() && !GetUpper()->IsFooterFrm() &&
!GetUpper()->IsFlyFrm() )
{
- ForbidDelete();
- GetUpper()->Calc(getRootFrm()->GetCurrShell() ? getRootFrm()->GetCurrShell()->GetOut() : 0);
- AllowDelete();
+ {
+ SwFrmDeleteGuard aDeleteGuard(this);
+ GetUpper()->Calc(getRootFrm()->GetCurrShell() ? getRootFrm()->GetCurrShell()->GetOut() : 0);
+ }
OSL_ENSURE( GetUpper(), ":-( Layout unstable (Upper gone)." );
if ( !GetUpper() )
return;
diff --git a/sw/source/core/layout/flowfrm.cxx b/sw/source/core/layout/flowfrm.cxx
index c78bc28..2c00917 100644
--- a/sw/source/core/layout/flowfrm.cxx
+++ b/sw/source/core/layout/flowfrm.cxx
@@ -577,10 +577,10 @@ void SwFlowFrm::MoveSubTree( SwLayoutFrm* pParent, SwFrm* pSibling )
bool bInvaLay;
{
- //JoinLock pParent for the lifetime of the Cut/Paste call to avoid
- //SwSectionFrm::MergeNext removing the pParent we're trying to reparent
- //into
- FlowFrmJoinLockGuard aJoinGuard(pParent);
+ //Ensure pParent persists for the lifetime of the Cut/Paste call to
+ //avoid SwSectionFrm::MergeNext removing the pParent we're trying to
+ //reparent into
+ SwFrmDeleteGuard aDeleteGuard(pParent);
pOldParent = CutTree( &m_rThis );
bInvaLay = PasteTree( &m_rThis, pParent, pSibling, pOldParent );
}
diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx
index ff51d37..877e618 100644
--- a/sw/source/core/layout/fly.cxx
+++ b/sw/source/core/layout/fly.cxx
@@ -1463,14 +1463,10 @@ void CalcContent( SwLayoutFrm *pLay,
if ( bNoCalcFollow && pFrm->IsTextFrm() )
static_cast<SwTextFrm*>(pFrm)->ForbidFollowFormat();
- const bool bDeleteForbidden(pSect && pSect->IsDeleteForbidden());
- if (pSect && !bDeleteForbidden)
- pSect->ForbidDelete();
-
- pFrm->Calc(pRenderContext);
-
- if (pSect && !bDeleteForbidden)
- pSect->AllowDelete();
+ {
+ SwFrmDeleteGuard aDeleteGuard(pSect);
+ pFrm->Calc(pRenderContext);
+ }
// OD 14.03.2003 #i11760# - reset control flag for follow format.
if ( pFrm->IsTextFrm() )
diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx
index 230769f..8dfbcbc 100644
--- a/sw/source/core/layout/layact.cxx
+++ b/sw/source/core/layout/layact.cxx
@@ -1223,11 +1223,10 @@ bool SwLayAction::FormatLayout( OutputDevice *pRenderContext, SwLayoutFrm *pLay,
aOldRect = static_cast<SwPageFrm*>(pLay)->GetBoundRect(pRenderContext);
}
- bool const bDeleteForbidden(pLay->IsDeleteForbidden());
- pLay->ForbidDelete();
- pLay->Calc(pRenderContext);
- if (!bDeleteForbidden)
- pLay->AllowDelete();
+ {
+ SwFrmDeleteGuard aDeleteGuard(pLay);
+ pLay->Calc(pRenderContext);
+ }
if ( aOldFrame != pLay->Frm() )
bChanged = true;
@@ -1375,7 +1374,7 @@ bool SwLayAction::FormatLayout( OutputDevice *pRenderContext, SwLayoutFrm *pLay,
if ( pLay->IsFootnoteFrm() ) // no LayFrms as Lower
return bChanged;
- FlowFrmJoinLockGuard aJoinGuard(pLay);
+ SwFrmDeleteGuard aDeleteGuard(pLay);
SwFrm *pLow = pLay->Lower();
bool bTabChanged = false;
while ( pLow && pLow->GetUpper() == pLay )
More information about the Libreoffice-commits
mailing list