diff options
author | Xisco Fauli <anistenis@gmail.com> | 2016-05-29 20:42:46 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-05-30 07:25:10 +0000 |
commit | 5251a7c39c7c2ee6bc16965484913002d662d44d (patch) | |
tree | 719d07d981e51c6ac5e67dd335707224d4884d33 /unotools | |
parent | 04068eb6f9c153950e4fda75733728fc8922f668 (diff) |
tdf#89329: use unique_ptr for pImpl in fltrcfg
Change-Id: Icbb7d122d7f553215de562a98b0127764b30faa1
Reviewed-on: https://gerrit.libreoffice.org/25628
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'unotools')
-rw-r--r-- | unotools/source/config/fltrcfg.cxx | 93 |
1 files changed, 46 insertions, 47 deletions
diff --git a/unotools/source/config/fltrcfg.cxx b/unotools/source/config/fltrcfg.cxx index 95fd797f58e1..6033578a095a 100644 --- a/unotools/source/config/fltrcfg.cxx +++ b/unotools/source/config/fltrcfg.cxx @@ -293,7 +293,7 @@ bool SvtFilterOptions_Impl::IsFlag( sal_uLong nFlag ) const SvtFilterOptions::SvtFilterOptions() : ConfigItem( "Office.Common/Filter/Microsoft" ), - pImp(new SvtFilterOptions_Impl) + pImpl(new SvtFilterOptions_Impl) { EnableNotification(GetPropertyNames()); Load(); @@ -301,7 +301,6 @@ SvtFilterOptions::SvtFilterOptions() : SvtFilterOptions::~SvtFilterOptions() { - delete pImp; } const Sequence<OUString>& SvtFilterOptions::GetPropertyNames() @@ -374,7 +373,7 @@ void SvtFilterOptions::ImplCommit() for(int nProp = 0; nProp < aNames.getLength(); nProp++) { sal_uLong nFlag = lcl_GetFlag(nProp); - pValues[nProp] <<= pImp->IsFlag(nFlag); + pValues[nProp] <<= pImpl->IsFlag(nFlag); } PutProperties(aNames, aValues); @@ -382,7 +381,7 @@ void SvtFilterOptions::ImplCommit() void SvtFilterOptions::Load() { - pImp->Load(); + pImpl->Load(); const Sequence<OUString>& rNames = GetPropertyNames(); Sequence<Any> aValues = GetProperties(rNames); const Any* pValues = aValues.getConstArray(); @@ -395,7 +394,7 @@ void SvtFilterOptions::Load() { bool bVal = *static_cast<sal_Bool const *>(pValues[nProp].getValue()); sal_uLong nFlag = lcl_GetFlag(nProp); - pImp->SetFlag( nFlag, bVal); + pImpl->SetFlag( nFlag, bVal); } } } @@ -403,193 +402,193 @@ void SvtFilterOptions::Load() void SvtFilterOptions::SetLoadWordBasicCode( bool bFlag ) { - pImp->SetFlag( FILTERCFG_WORD_CODE, bFlag ); + pImpl->SetFlag( FILTERCFG_WORD_CODE, bFlag ); SetModified(); } bool SvtFilterOptions::IsLoadWordBasicCode() const { - return pImp->IsFlag( FILTERCFG_WORD_CODE ); + return pImpl->IsFlag( FILTERCFG_WORD_CODE ); } void SvtFilterOptions::SetLoadWordBasicExecutable( bool bFlag ) { - pImp->SetFlag( FILTERCFG_WORD_WBCTBL, bFlag ); + pImpl->SetFlag( FILTERCFG_WORD_WBCTBL, bFlag ); SetModified(); } bool SvtFilterOptions::IsLoadWordBasicExecutable() const { - return pImp->IsFlag( FILTERCFG_WORD_WBCTBL ); + return pImpl->IsFlag( FILTERCFG_WORD_WBCTBL ); } void SvtFilterOptions::SetLoadWordBasicStorage( bool bFlag ) { - pImp->SetFlag( FILTERCFG_WORD_STORAGE, bFlag ); + pImpl->SetFlag( FILTERCFG_WORD_STORAGE, bFlag ); SetModified(); } bool SvtFilterOptions::IsLoadWordBasicStorage() const { - return pImp->IsFlag( FILTERCFG_WORD_STORAGE ); + return pImpl->IsFlag( FILTERCFG_WORD_STORAGE ); } void SvtFilterOptions::SetLoadExcelBasicCode( bool bFlag ) { - pImp->SetFlag( FILTERCFG_EXCEL_CODE, bFlag ); + pImpl->SetFlag( FILTERCFG_EXCEL_CODE, bFlag ); SetModified(); } bool SvtFilterOptions::IsLoadExcelBasicCode() const { - return pImp->IsFlag( FILTERCFG_EXCEL_CODE ); + return pImpl->IsFlag( FILTERCFG_EXCEL_CODE ); } void SvtFilterOptions::SetLoadExcelBasicExecutable( bool bFlag ) { - pImp->SetFlag( FILTERCFG_EXCEL_EXECTBL, bFlag ); + pImpl->SetFlag( FILTERCFG_EXCEL_EXECTBL, bFlag ); SetModified(); } bool SvtFilterOptions::IsLoadExcelBasicExecutable() const { - return pImp->IsFlag( FILTERCFG_EXCEL_EXECTBL ); + return pImpl->IsFlag( FILTERCFG_EXCEL_EXECTBL ); } void SvtFilterOptions::SetLoadExcelBasicStorage( bool bFlag ) { - pImp->SetFlag( FILTERCFG_EXCEL_STORAGE, bFlag ); + pImpl->SetFlag( FILTERCFG_EXCEL_STORAGE, bFlag ); SetModified(); } bool SvtFilterOptions::IsLoadExcelBasicStorage() const { - return pImp->IsFlag( FILTERCFG_EXCEL_STORAGE ); + return pImpl->IsFlag( FILTERCFG_EXCEL_STORAGE ); } void SvtFilterOptions::SetLoadPPointBasicCode( bool bFlag ) { - pImp->SetFlag( FILTERCFG_PPOINT_CODE, bFlag ); + pImpl->SetFlag( FILTERCFG_PPOINT_CODE, bFlag ); SetModified(); } bool SvtFilterOptions::IsLoadPPointBasicCode() const { - return pImp->IsFlag( FILTERCFG_PPOINT_CODE ); + return pImpl->IsFlag( FILTERCFG_PPOINT_CODE ); } void SvtFilterOptions::SetLoadPPointBasicStorage( bool bFlag ) { - pImp->SetFlag( FILTERCFG_PPOINT_STORAGE, bFlag ); + pImpl->SetFlag( FILTERCFG_PPOINT_STORAGE, bFlag ); SetModified(); } bool SvtFilterOptions::IsLoadPPointBasicStorage() const { - return pImp->IsFlag( FILTERCFG_PPOINT_STORAGE ); + return pImpl->IsFlag( FILTERCFG_PPOINT_STORAGE ); } bool SvtFilterOptions::IsMathType2Math() const { - return pImp->IsFlag( FILTERCFG_MATH_LOAD ); + return pImpl->IsFlag( FILTERCFG_MATH_LOAD ); } void SvtFilterOptions::SetMathType2Math( bool bFlag ) { - pImp->SetFlag( FILTERCFG_MATH_LOAD, bFlag ); + pImpl->SetFlag( FILTERCFG_MATH_LOAD, bFlag ); SetModified(); } bool SvtFilterOptions::IsMath2MathType() const { - return pImp->IsFlag( FILTERCFG_MATH_SAVE ); + return pImpl->IsFlag( FILTERCFG_MATH_SAVE ); } void SvtFilterOptions::SetMath2MathType( bool bFlag ) { - pImp->SetFlag( FILTERCFG_MATH_SAVE, bFlag ); + pImpl->SetFlag( FILTERCFG_MATH_SAVE, bFlag ); SetModified(); } bool SvtFilterOptions::IsWinWord2Writer() const { - return pImp->IsFlag( FILTERCFG_WRITER_LOAD ); + return pImpl->IsFlag( FILTERCFG_WRITER_LOAD ); } void SvtFilterOptions::SetWinWord2Writer( bool bFlag ) { - pImp->SetFlag( FILTERCFG_WRITER_LOAD, bFlag ); + pImpl->SetFlag( FILTERCFG_WRITER_LOAD, bFlag ); SetModified(); } bool SvtFilterOptions::IsWriter2WinWord() const { - return pImp->IsFlag( FILTERCFG_WRITER_SAVE ); + return pImpl->IsFlag( FILTERCFG_WRITER_SAVE ); } void SvtFilterOptions::SetWriter2WinWord( bool bFlag ) { - pImp->SetFlag( FILTERCFG_WRITER_SAVE, bFlag ); + pImpl->SetFlag( FILTERCFG_WRITER_SAVE, bFlag ); SetModified(); } bool SvtFilterOptions::IsUseEnhancedFields() const { - return pImp->IsFlag( FILTERCFG_USE_ENHANCED_FIELDS ); + return pImpl->IsFlag( FILTERCFG_USE_ENHANCED_FIELDS ); } bool SvtFilterOptions::IsExcel2Calc() const { - return pImp->IsFlag( FILTERCFG_CALC_LOAD ); + return pImpl->IsFlag( FILTERCFG_CALC_LOAD ); } void SvtFilterOptions::SetExcel2Calc( bool bFlag ) { - pImp->SetFlag( FILTERCFG_CALC_LOAD, bFlag ); + pImpl->SetFlag( FILTERCFG_CALC_LOAD, bFlag ); SetModified(); } bool SvtFilterOptions::IsCalc2Excel() const { - return pImp->IsFlag( FILTERCFG_CALC_SAVE ); + return pImpl->IsFlag( FILTERCFG_CALC_SAVE ); } void SvtFilterOptions::SetCalc2Excel( bool bFlag ) { - pImp->SetFlag( FILTERCFG_CALC_SAVE, bFlag ); + pImpl->SetFlag( FILTERCFG_CALC_SAVE, bFlag ); SetModified(); } bool SvtFilterOptions::IsPowerPoint2Impress() const { - return pImp->IsFlag( FILTERCFG_IMPRESS_LOAD ); + return pImpl->IsFlag( FILTERCFG_IMPRESS_LOAD ); } void SvtFilterOptions::SetPowerPoint2Impress( bool bFlag ) { - pImp->SetFlag( FILTERCFG_IMPRESS_LOAD, bFlag ); + pImpl->SetFlag( FILTERCFG_IMPRESS_LOAD, bFlag ); SetModified(); } bool SvtFilterOptions::IsImpress2PowerPoint() const { - return pImp->IsFlag( FILTERCFG_IMPRESS_SAVE ); + return pImpl->IsFlag( FILTERCFG_IMPRESS_SAVE ); } void SvtFilterOptions::SetImpress2PowerPoint( bool bFlag ) { - pImp->SetFlag( FILTERCFG_IMPRESS_SAVE, bFlag ); + pImpl->SetFlag( FILTERCFG_IMPRESS_SAVE, bFlag ); SetModified(); } bool SvtFilterOptions::IsSmartArt2Shape() const { - return pImp->IsFlag( FILTERCFG_SMARTART_SHAPE_LOAD ); + return pImpl->IsFlag( FILTERCFG_SMARTART_SHAPE_LOAD ); } void SvtFilterOptions::SetSmartArt2Shape( bool bFlag ) { - pImp->SetFlag( FILTERCFG_SMARTART_SHAPE_LOAD, bFlag ); + pImpl->SetFlag( FILTERCFG_SMARTART_SHAPE_LOAD, bFlag ); SetModified(); } @@ -608,39 +607,39 @@ SvtFilterOptions& SvtFilterOptions::Get() bool SvtFilterOptions::IsEnablePPTPreview() const { - return pImp->IsFlag( FILTERCFG_ENABLE_PPT_PREVIEW ); + return pImpl->IsFlag( FILTERCFG_ENABLE_PPT_PREVIEW ); } bool SvtFilterOptions::IsEnableCalcPreview() const { - return pImp->IsFlag( FILTERCFG_ENABLE_EXCEL_PREVIEW ); + return pImpl->IsFlag( FILTERCFG_ENABLE_EXCEL_PREVIEW ); } bool SvtFilterOptions::IsEnableWordPreview() const { - return pImp->IsFlag( FILTERCFG_ENABLE_WORD_PREVIEW ); + return pImpl->IsFlag( FILTERCFG_ENABLE_WORD_PREVIEW ); } bool SvtFilterOptions::IsCharBackground2Highlighting() const { - return pImp->IsFlag( FILTERCFG_CHAR_BACKGROUND_TO_HIGHLIGHTING ); + return pImpl->IsFlag( FILTERCFG_CHAR_BACKGROUND_TO_HIGHLIGHTING ); } bool SvtFilterOptions::IsCharBackground2Shading() const { - return !pImp->IsFlag( FILTERCFG_CHAR_BACKGROUND_TO_HIGHLIGHTING ); + return !pImpl->IsFlag( FILTERCFG_CHAR_BACKGROUND_TO_HIGHLIGHTING ); } void SvtFilterOptions::SetCharBackground2Highlighting() { - pImp->SetFlag( FILTERCFG_CHAR_BACKGROUND_TO_HIGHLIGHTING, true ); + pImpl->SetFlag( FILTERCFG_CHAR_BACKGROUND_TO_HIGHLIGHTING, true ); SetModified(); } void SvtFilterOptions::SetCharBackground2Shading() { - pImp->SetFlag( FILTERCFG_CHAR_BACKGROUND_TO_HIGHLIGHTING, false ); + pImpl->SetFlag( FILTERCFG_CHAR_BACKGROUND_TO_HIGHLIGHTING, false ); SetModified(); } |