[Libreoffice-commits] core.git: 2 commits - unotools/source uui/source
Noel Grandin
noel.grandin at collabora.co.uk
Fri Nov 25 11:48:11 UTC 2016
unotools/source/config/fltrcfg.cxx | 249 +++++++++++++++++------------------
uui/source/iahndl-authentication.cxx | 14 -
uui/source/logindlg.cxx | 24 +--
uui/source/logindlg.hxx | 29 ++--
4 files changed, 165 insertions(+), 151 deletions(-)
New commits:
commit f32a75c25b0450eba9cdd9b343e1263c600c0151
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Fri Nov 25 13:46:51 2016 +0200
convert LF constants to o3tl::typed_flags
Change-Id: I4fa3a62e53eb02fe60c9ca0675709b76e56a7912
diff --git a/uui/source/iahndl-authentication.cxx b/uui/source/iahndl-authentication.cxx
index fa7d63f..93a1ddc 100644
--- a/uui/source/iahndl-authentication.cxx
+++ b/uui/source/iahndl-authentication.cxx
@@ -72,21 +72,21 @@ executeLoginDialog(
bool bSavePassword = rInfo.GetCanRememberPassword();
bool bCanUseSysCreds = rInfo.GetCanUseSystemCredentials();
- sal_uInt16 nFlags = 0;
+ LoginFlags nFlags = LoginFlags::NONE;
if (rInfo.GetPath().isEmpty())
- nFlags |= LF_NO_PATH;
+ nFlags |= LoginFlags::NoPath;
if (rInfo.GetErrorText().isEmpty())
- nFlags |= LF_NO_ERRORTEXT;
+ nFlags |= LoginFlags::NoErrorText;
if (!bAccount)
- nFlags |= LF_NO_ACCOUNT;
+ nFlags |= LoginFlags::NoAccount;
if (!(rInfo.GetFlags() & LOGINERROR_FLAG_MODIFY_USER_NAME))
- nFlags |= LF_USERNAME_READONLY;
+ nFlags |= LoginFlags::UsernameReadonly;
if (!bSavePassword)
- nFlags |= LF_NO_SAVEPASSWORD;
+ nFlags |= LoginFlags::NoSavePassword;
if (!bCanUseSysCreds)
- nFlags |= LF_NO_USESYSCREDS;
+ nFlags |= LoginFlags::NoUseSysCreds;
ScopedVclPtrInstance< LoginDialog > xDialog(pParent, nFlags, rInfo.GetServer(), rRealm);
if (!rInfo.GetErrorText().isEmpty())
diff --git a/uui/source/logindlg.cxx b/uui/source/logindlg.cxx
index 1bdb85f..76465d9 100644
--- a/uui/source/logindlg.cxx
+++ b/uui/source/logindlg.cxx
@@ -67,52 +67,52 @@ void LoginDialog::SetPassword( const OUString& rNew )
SetRequest();
}
-void LoginDialog::HideControls_Impl( sal_uInt16 nFlags )
+void LoginDialog::HideControls_Impl( LoginFlags nFlags )
{
- if ( ( nFlags & LF_NO_PATH ) == LF_NO_PATH )
+ if ( nFlags & LoginFlags::NoPath )
{
m_pPathFT->Hide();
m_pPathED->Hide();
m_pPathBtn->Hide();
}
- else if ( ( nFlags & LF_PATH_READONLY ) == LF_PATH_READONLY )
+ else if ( nFlags & LoginFlags::PathReadonly )
{
m_pPathED->Enable( false );
m_pPathBtn->Enable( false );
}
- if ( ( nFlags & LF_NO_USERNAME ) == LF_NO_USERNAME )
+ if ( nFlags & LoginFlags::NoUsername )
{
m_pNameFT->Hide();
m_pNameED->Hide();
}
- else if ( ( nFlags & LF_USERNAME_READONLY ) == LF_USERNAME_READONLY )
+ else if ( nFlags & LoginFlags::UsernameReadonly )
{
m_pNameED->Enable( false );
}
- if ( ( nFlags & LF_NO_PASSWORD ) == LF_NO_PASSWORD )
+ if ( nFlags & LoginFlags::NoPassword )
{
m_pPasswordFT->Hide();
m_pPasswordED->Hide();
}
- if ( ( nFlags & LF_NO_SAVEPASSWORD ) == LF_NO_SAVEPASSWORD )
+ if ( nFlags & LoginFlags::NoSavePassword )
m_pSavePasswdBtn->Hide();
- if ( ( nFlags & LF_NO_ERRORTEXT ) == LF_NO_ERRORTEXT )
+ if ( nFlags & LoginFlags::NoErrorText )
{
m_pErrorInfo->Hide();
m_pErrorFT->Hide();
}
- if ( ( nFlags & LF_NO_ACCOUNT ) == LF_NO_ACCOUNT )
+ if ( nFlags & LoginFlags::NoAccount )
{
m_pAccountFT->Hide();
m_pAccountED->Hide();
}
- if ( ( nFlags & LF_NO_USESYSCREDS ) == LF_NO_USESYSCREDS )
+ if ( nFlags & LoginFlags::NoUseSysCreds )
{
m_pUseSysCredsCB->Hide();
}
@@ -186,7 +186,7 @@ IMPL_LINK_NOARG(LoginDialog, UseSysCredsHdl_Impl, Button*, void)
EnableUseSysCredsControls_Impl( m_pUseSysCredsCB->IsChecked() );
}
-LoginDialog::LoginDialog(vcl::Window* pParent, sal_uInt16 nFlags,
+LoginDialog::LoginDialog(vcl::Window* pParent, LoginFlags nFlags,
const OUString& rServer, const OUString& rRealm)
: ModalDialog(pParent, "LoginDialog", "uui/ui/logindialog.ui"),
m_server(rServer), m_realm(rRealm)
@@ -207,7 +207,7 @@ LoginDialog::LoginDialog(vcl::Window* pParent, sal_uInt16 nFlags,
get(m_pUseSysCredsCB, "syscreds");
get(m_pOKBtn, "ok");
- if ( !( ( nFlags & LF_NO_USESYSCREDS ) == LF_NO_USESYSCREDS ) )
+ if ( !( nFlags & LoginFlags::NoUseSysCreds ) )
EnableUseSysCredsControls_Impl( m_pUseSysCredsCB->IsChecked() );
SetRequest();
diff --git a/uui/source/logindlg.hxx b/uui/source/logindlg.hxx
index 01bd2d8..8b6e773 100644
--- a/uui/source/logindlg.hxx
+++ b/uui/source/logindlg.hxx
@@ -24,17 +24,24 @@
#include <vcl/dialog.hxx>
#include <vcl/edit.hxx>
#include <vcl/fixed.hxx>
+#include <o3tl/typed_flags_set.hxx>
-#define LF_NO_PATH 0x0001 // hide "path"
-#define LF_NO_USERNAME 0x0002 // hide "name"
-#define LF_NO_PASSWORD 0x0004 // hide "password"
-#define LF_NO_SAVEPASSWORD 0x0008 // hide "save password"
-#define LF_NO_ERRORTEXT 0x0010 // hide message
-#define LF_PATH_READONLY 0x0020 // "path" readonly
-#define LF_USERNAME_READONLY 0x0040 // "name" readonly
-#define LF_NO_ACCOUNT 0x0080 // hide "account"
-#define LF_NO_USESYSCREDS 0x0100 // hide "use system credentials"
+enum class LoginFlags {
+ NONE = 0x0000,
+ NoPath = 0x0001, // hide "path"
+ NoUsername = 0x0002, // hide "name"
+ NoPassword = 0x0004, // hide "password"
+ NoSavePassword = 0x0008, // hide "save password"
+ NoErrorText = 0x0010, // hide message
+ PathReadonly = 0x0020, // "path" readonly
+ UsernameReadonly = 0x0040, // "name" readonly
+ NoAccount = 0x0080, // hide "account"
+ NoUseSysCreds = 0x0100, // hide "use system credentials"
+};
+namespace o3tl {
+ template<> struct typed_flags<LoginFlags> : is_typed_flags<LoginFlags, 0x01ff> {};
+}
class LoginDialog : public ModalDialog
@@ -57,7 +64,7 @@ class LoginDialog : public ModalDialog
OUString m_server;
OUString m_realm;
- void HideControls_Impl( sal_uInt16 nFlags );
+ void HideControls_Impl( LoginFlags nFlags );
void EnableUseSysCredsControls_Impl( bool bUseSysCredsEnabled );
void SetRequest();
@@ -66,7 +73,7 @@ class LoginDialog : public ModalDialog
DECL_LINK(UseSysCredsHdl_Impl, Button*, void);
public:
- LoginDialog(vcl::Window* pParent, sal_uInt16 nFlags,
+ LoginDialog(vcl::Window* pParent, LoginFlags nFlags,
const OUString& rServer, const OUString &rRealm);
virtual ~LoginDialog() override;
virtual void dispose() override;
commit 413e63c301a4a9ca8a4a85d03549fbe240142148
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Fri Nov 25 13:40:16 2016 +0200
convert FILTERCFG constants to o3tl::typed_flags
Change-Id: I01a4df6bb9b90177ce72c61fd0d611a63559166e
diff --git a/unotools/source/config/fltrcfg.cxx b/unotools/source/config/fltrcfg.cxx
index c26e4d5..32a61fd 100644
--- a/unotools/source/config/fltrcfg.cxx
+++ b/unotools/source/config/fltrcfg.cxx
@@ -20,6 +20,7 @@
#include <config_features.h>
#include <o3tl/any.hxx>
+#include <o3tl/typed_flags_set.hxx>
#include <unotools/fltrcfg.hxx>
#include <tools/debug.hxx>
#include <tools/solar.h>
@@ -30,28 +31,34 @@
using namespace utl;
using namespace com::sun::star::uno;
-#define FILTERCFG_WORD_CODE 0x0001
-#define FILTERCFG_WORD_STORAGE 0x0002
-#define FILTERCFG_EXCEL_CODE 0x0004
-#define FILTERCFG_EXCEL_STORAGE 0x0008
-#define FILTERCFG_PPOINT_CODE 0x0010
-#define FILTERCFG_PPOINT_STORAGE 0x0020
-#define FILTERCFG_MATH_LOAD 0x0100
-#define FILTERCFG_MATH_SAVE 0x0200
-#define FILTERCFG_WRITER_LOAD 0x0400
-#define FILTERCFG_WRITER_SAVE 0x0800
-#define FILTERCFG_CALC_LOAD 0x1000
-#define FILTERCFG_CALC_SAVE 0x2000
-#define FILTERCFG_IMPRESS_LOAD 0x4000
-#define FILTERCFG_IMPRESS_SAVE 0x8000
-#define FILTERCFG_EXCEL_EXECTBL 0x10000
-#define FILTERCFG_ENABLE_PPT_PREVIEW 0x20000
-#define FILTERCFG_ENABLE_EXCEL_PREVIEW 0x40000
-#define FILTERCFG_ENABLE_WORD_PREVIEW 0x80000
-#define FILTERCFG_USE_ENHANCED_FIELDS 0x100000
-#define FILTERCFG_WORD_WBCTBL 0x200000
-#define FILTERCFG_SMARTART_SHAPE_LOAD 0x400000
-#define FILTERCFG_CHAR_BACKGROUND_TO_HIGHLIGHTING 0x8000000
+enum class ConfigFlags {
+ NONE = 0x0000000,
+ WordCode = 0x0000001,
+ WordStorage = 0x0000002,
+ ExcelCode = 0x0000004,
+ ExcelStorage = 0x0000008,
+ PowerPointCode = 0x0000010,
+ PowerPointStorage = 0x0000020,
+ MathLoad = 0x0000100,
+ MathSave = 0x0000200,
+ WriterLoad = 0x0000400,
+ WriterSave = 0x0000800,
+ CalcLoad = 0x0001000,
+ CalcSave = 0x0002000,
+ ImpressLoad = 0x0004000,
+ ImpressSave = 0x0008000,
+ ExcelExecTbl = 0x0010000,
+ EnablePowerPointPreview = 0x0020000,
+ EnableExcelPreview = 0x0040000,
+ EnableWordPreview = 0x0080000,
+ UseEnhancedFields = 0x0100000,
+ WordWbctbl = 0x0200000,
+ SmartArtShapeLoad = 0x0400000,
+ CharBackgroundToHighlighting = 0x8000000
+};
+namespace o3tl {
+ template<> struct typed_flags<ConfigFlags> : is_typed_flags<ConfigFlags, 0x87fff3f> {};
+}
class SvtAppFilterOptions_Impl : public utl::ConfigItem
{
@@ -213,7 +220,7 @@ void SvtCalcFilterOptions_Impl::Load()
struct SvtFilterOptions_Impl
{
- sal_uLong nFlags;
+ ConfigFlags nFlags;
SvtWriterFilterOptions_Impl aWriterCfg;
SvtCalcFilterOptions_Impl aCalcCfg;
SvtAppFilterOptions_Impl aImpressCfg;
@@ -223,28 +230,28 @@ struct SvtFilterOptions_Impl
aCalcCfg("Office.Calc/Filter/Import/VBA"),
aImpressCfg("Office.Impress/Filter/Import/VBA")
{
- nFlags = FILTERCFG_WORD_CODE |
- FILTERCFG_WORD_STORAGE |
- FILTERCFG_EXCEL_CODE |
- FILTERCFG_EXCEL_STORAGE |
- FILTERCFG_PPOINT_CODE |
- FILTERCFG_PPOINT_STORAGE |
- FILTERCFG_MATH_LOAD |
- FILTERCFG_MATH_SAVE |
- FILTERCFG_WRITER_LOAD |
- FILTERCFG_WRITER_SAVE |
- FILTERCFG_CALC_LOAD |
- FILTERCFG_CALC_SAVE |
- FILTERCFG_IMPRESS_LOAD |
- FILTERCFG_IMPRESS_SAVE |
- FILTERCFG_USE_ENHANCED_FIELDS |
- FILTERCFG_SMARTART_SHAPE_LOAD |
- FILTERCFG_CHAR_BACKGROUND_TO_HIGHLIGHTING;
+ nFlags = ConfigFlags::WordCode |
+ ConfigFlags::WordStorage |
+ ConfigFlags::ExcelCode |
+ ConfigFlags::ExcelStorage |
+ ConfigFlags::PowerPointCode |
+ ConfigFlags::PowerPointStorage |
+ ConfigFlags::MathLoad |
+ ConfigFlags::MathSave |
+ ConfigFlags::WriterLoad |
+ ConfigFlags::WriterSave |
+ ConfigFlags::CalcLoad |
+ ConfigFlags::CalcSave |
+ ConfigFlags::ImpressLoad |
+ ConfigFlags::ImpressSave |
+ ConfigFlags::UseEnhancedFields |
+ ConfigFlags::SmartArtShapeLoad |
+ ConfigFlags::CharBackgroundToHighlighting;
Load();
}
- void SetFlag( sal_uLong nFlag, bool bSet );
- bool IsFlag( sal_uLong nFlag ) const;
+ void SetFlag( ConfigFlags nFlag, bool bSet );
+ bool IsFlag( ConfigFlags nFlag ) const;
void Load()
{
aWriterCfg.Load();
@@ -253,18 +260,18 @@ struct SvtFilterOptions_Impl
}
};
-void SvtFilterOptions_Impl::SetFlag( sal_uLong nFlag, bool bSet )
+void SvtFilterOptions_Impl::SetFlag( ConfigFlags nFlag, bool bSet )
{
switch(nFlag)
{
- case FILTERCFG_WORD_CODE: aWriterCfg.SetLoad(bSet);break;
- case FILTERCFG_WORD_STORAGE: aWriterCfg.SetSave(bSet);break;
- case FILTERCFG_WORD_WBCTBL: aWriterCfg.SetLoadExecutable(bSet);break;
- case FILTERCFG_EXCEL_CODE: aCalcCfg.SetLoad(bSet);break;
- case FILTERCFG_EXCEL_STORAGE: aCalcCfg.SetSave(bSet);break;
- case FILTERCFG_EXCEL_EXECTBL: aCalcCfg.SetLoadExecutable(bSet);break;
- case FILTERCFG_PPOINT_CODE: aImpressCfg.SetLoad(bSet);break;
- case FILTERCFG_PPOINT_STORAGE: aImpressCfg.SetSave(bSet);break;
+ case ConfigFlags::WordCode: aWriterCfg.SetLoad(bSet);break;
+ case ConfigFlags::WordStorage: aWriterCfg.SetSave(bSet);break;
+ case ConfigFlags::WordWbctbl: aWriterCfg.SetLoadExecutable(bSet);break;
+ case ConfigFlags::ExcelCode: aCalcCfg.SetLoad(bSet);break;
+ case ConfigFlags::ExcelStorage: aCalcCfg.SetSave(bSet);break;
+ case ConfigFlags::ExcelExecTbl: aCalcCfg.SetLoadExecutable(bSet);break;
+ case ConfigFlags::PowerPointCode: aImpressCfg.SetLoad(bSet);break;
+ case ConfigFlags::PowerPointStorage: aImpressCfg.SetSave(bSet);break;
default:
if( bSet )
nFlags |= nFlag;
@@ -273,21 +280,21 @@ void SvtFilterOptions_Impl::SetFlag( sal_uLong nFlag, bool bSet )
}
}
-bool SvtFilterOptions_Impl::IsFlag( sal_uLong nFlag ) const
+bool SvtFilterOptions_Impl::IsFlag( ConfigFlags nFlag ) const
{
bool bRet;
switch(nFlag)
{
- case FILTERCFG_WORD_CODE : bRet = aWriterCfg.IsLoad();break;
- case FILTERCFG_WORD_STORAGE : bRet = aWriterCfg.IsSave();break;
- case FILTERCFG_WORD_WBCTBL : bRet = aWriterCfg.IsLoadExecutable();break;
- case FILTERCFG_EXCEL_CODE : bRet = aCalcCfg.IsLoad();break;
- case FILTERCFG_EXCEL_STORAGE : bRet = aCalcCfg.IsSave();break;
- case FILTERCFG_EXCEL_EXECTBL : bRet = aCalcCfg.IsLoadExecutable();break;
- case FILTERCFG_PPOINT_CODE : bRet = aImpressCfg.IsLoad();break;
- case FILTERCFG_PPOINT_STORAGE : bRet = aImpressCfg.IsSave();break;
+ case ConfigFlags::WordCode : bRet = aWriterCfg.IsLoad();break;
+ case ConfigFlags::WordStorage : bRet = aWriterCfg.IsSave();break;
+ case ConfigFlags::WordWbctbl : bRet = aWriterCfg.IsLoadExecutable();break;
+ case ConfigFlags::ExcelCode : bRet = aCalcCfg.IsLoad();break;
+ case ConfigFlags::ExcelStorage : bRet = aCalcCfg.IsSave();break;
+ case ConfigFlags::ExcelExecTbl : bRet = aCalcCfg.IsLoadExecutable();break;
+ case ConfigFlags::PowerPointCode : bRet = aImpressCfg.IsLoad();break;
+ case ConfigFlags::PowerPointStorage : bRet = aImpressCfg.IsSave();break;
default:
- bRet = 0 != (nFlags & nFlag );
+ bRet = bool(nFlags & nFlag );
}
return bRet;
}
@@ -339,25 +346,25 @@ SvtFilterOptions::~SvtFilterOptions()
{
}
-static sal_uLong lcl_GetFlag(sal_Int32 nProp)
+static ConfigFlags lcl_GetFlag(sal_Int32 nProp)
{
- sal_uLong nFlag = 0;
+ ConfigFlags nFlag = ConfigFlags::NONE;
switch(nProp)
{
- case 0: nFlag = FILTERCFG_MATH_LOAD; break;
- case 1: nFlag = FILTERCFG_WRITER_LOAD; break;
- case 2: nFlag = FILTERCFG_IMPRESS_LOAD; break;
- case 3: nFlag = FILTERCFG_CALC_LOAD; break;
- case 4: nFlag = FILTERCFG_MATH_SAVE; break;
- case 5: nFlag = FILTERCFG_WRITER_SAVE; break;
- case 6: nFlag = FILTERCFG_IMPRESS_SAVE; break;
- case 7: nFlag = FILTERCFG_CALC_SAVE; break;
- case 8: nFlag = FILTERCFG_ENABLE_PPT_PREVIEW; break;
- case 9: nFlag = FILTERCFG_ENABLE_EXCEL_PREVIEW; break;
- case 10: nFlag = FILTERCFG_ENABLE_WORD_PREVIEW; break;
- case 11: nFlag = FILTERCFG_USE_ENHANCED_FIELDS; break;
- case 12: nFlag = FILTERCFG_SMARTART_SHAPE_LOAD; break;
- case 13: nFlag = FILTERCFG_CHAR_BACKGROUND_TO_HIGHLIGHTING; break;
+ case 0: nFlag = ConfigFlags::MathLoad; break;
+ case 1: nFlag = ConfigFlags::WriterLoad; break;
+ case 2: nFlag = ConfigFlags::ImpressLoad; break;
+ case 3: nFlag = ConfigFlags::CalcLoad; break;
+ case 4: nFlag = ConfigFlags::MathSave; break;
+ case 5: nFlag = ConfigFlags::WriterSave; break;
+ case 6: nFlag = ConfigFlags::ImpressSave; break;
+ case 7: nFlag = ConfigFlags::CalcSave; break;
+ case 8: nFlag = ConfigFlags::EnablePowerPointPreview; break;
+ case 9: nFlag = ConfigFlags::EnableExcelPreview; break;
+ case 10: nFlag = ConfigFlags::EnableWordPreview; break;
+ case 11: nFlag = ConfigFlags::UseEnhancedFields; break;
+ case 12: nFlag = ConfigFlags::SmartArtShapeLoad; break;
+ case 13: nFlag = ConfigFlags::CharBackgroundToHighlighting; break;
default: OSL_FAIL("illegal value");
}
@@ -377,7 +384,7 @@ void SvtFilterOptions::ImplCommit()
for(int nProp = 0; nProp < aNames.getLength(); nProp++)
{
- sal_uLong nFlag = lcl_GetFlag(nProp);
+ ConfigFlags nFlag = lcl_GetFlag(nProp);
pValues[nProp] <<= pImpl->IsFlag(nFlag);
}
@@ -398,7 +405,7 @@ void SvtFilterOptions::Load()
if(pValues[nProp].hasValue())
{
bool bVal = *o3tl::doAccess<bool>(pValues[nProp]);
- sal_uLong nFlag = lcl_GetFlag(nProp);
+ ConfigFlags nFlag = lcl_GetFlag(nProp);
pImpl->SetFlag( nFlag, bVal);
}
}
@@ -407,193 +414,193 @@ void SvtFilterOptions::Load()
void SvtFilterOptions::SetLoadWordBasicCode( bool bFlag )
{
- pImpl->SetFlag( FILTERCFG_WORD_CODE, bFlag );
+ pImpl->SetFlag( ConfigFlags::WordCode, bFlag );
SetModified();
}
bool SvtFilterOptions::IsLoadWordBasicCode() const
{
- return pImpl->IsFlag( FILTERCFG_WORD_CODE );
+ return pImpl->IsFlag( ConfigFlags::WordCode );
}
void SvtFilterOptions::SetLoadWordBasicExecutable( bool bFlag )
{
- pImpl->SetFlag( FILTERCFG_WORD_WBCTBL, bFlag );
+ pImpl->SetFlag( ConfigFlags::WordWbctbl, bFlag );
SetModified();
}
bool SvtFilterOptions::IsLoadWordBasicExecutable() const
{
- return pImpl->IsFlag( FILTERCFG_WORD_WBCTBL );
+ return pImpl->IsFlag( ConfigFlags::WordWbctbl );
}
void SvtFilterOptions::SetLoadWordBasicStorage( bool bFlag )
{
- pImpl->SetFlag( FILTERCFG_WORD_STORAGE, bFlag );
+ pImpl->SetFlag( ConfigFlags::WordStorage, bFlag );
SetModified();
}
bool SvtFilterOptions::IsLoadWordBasicStorage() const
{
- return pImpl->IsFlag( FILTERCFG_WORD_STORAGE );
+ return pImpl->IsFlag( ConfigFlags::WordStorage );
}
void SvtFilterOptions::SetLoadExcelBasicCode( bool bFlag )
{
- pImpl->SetFlag( FILTERCFG_EXCEL_CODE, bFlag );
+ pImpl->SetFlag( ConfigFlags::ExcelCode, bFlag );
SetModified();
}
bool SvtFilterOptions::IsLoadExcelBasicCode() const
{
- return pImpl->IsFlag( FILTERCFG_EXCEL_CODE );
+ return pImpl->IsFlag( ConfigFlags::ExcelCode );
}
void SvtFilterOptions::SetLoadExcelBasicExecutable( bool bFlag )
{
- pImpl->SetFlag( FILTERCFG_EXCEL_EXECTBL, bFlag );
+ pImpl->SetFlag( ConfigFlags::ExcelExecTbl, bFlag );
SetModified();
}
bool SvtFilterOptions::IsLoadExcelBasicExecutable() const
{
- return pImpl->IsFlag( FILTERCFG_EXCEL_EXECTBL );
+ return pImpl->IsFlag( ConfigFlags::ExcelExecTbl );
}
void SvtFilterOptions::SetLoadExcelBasicStorage( bool bFlag )
{
- pImpl->SetFlag( FILTERCFG_EXCEL_STORAGE, bFlag );
+ pImpl->SetFlag( ConfigFlags::ExcelStorage, bFlag );
SetModified();
}
bool SvtFilterOptions::IsLoadExcelBasicStorage() const
{
- return pImpl->IsFlag( FILTERCFG_EXCEL_STORAGE );
+ return pImpl->IsFlag( ConfigFlags::ExcelStorage );
}
void SvtFilterOptions::SetLoadPPointBasicCode( bool bFlag )
{
- pImpl->SetFlag( FILTERCFG_PPOINT_CODE, bFlag );
+ pImpl->SetFlag( ConfigFlags::PowerPointCode, bFlag );
SetModified();
}
bool SvtFilterOptions::IsLoadPPointBasicCode() const
{
- return pImpl->IsFlag( FILTERCFG_PPOINT_CODE );
+ return pImpl->IsFlag( ConfigFlags::PowerPointCode );
}
void SvtFilterOptions::SetLoadPPointBasicStorage( bool bFlag )
{
- pImpl->SetFlag( FILTERCFG_PPOINT_STORAGE, bFlag );
+ pImpl->SetFlag( ConfigFlags::PowerPointStorage, bFlag );
SetModified();
}
bool SvtFilterOptions::IsLoadPPointBasicStorage() const
{
- return pImpl->IsFlag( FILTERCFG_PPOINT_STORAGE );
+ return pImpl->IsFlag( ConfigFlags::PowerPointStorage );
}
bool SvtFilterOptions::IsMathType2Math() const
{
- return pImpl->IsFlag( FILTERCFG_MATH_LOAD );
+ return pImpl->IsFlag( ConfigFlags::MathLoad );
}
void SvtFilterOptions::SetMathType2Math( bool bFlag )
{
- pImpl->SetFlag( FILTERCFG_MATH_LOAD, bFlag );
+ pImpl->SetFlag( ConfigFlags::MathLoad, bFlag );
SetModified();
}
bool SvtFilterOptions::IsMath2MathType() const
{
- return pImpl->IsFlag( FILTERCFG_MATH_SAVE );
+ return pImpl->IsFlag( ConfigFlags::MathSave );
}
void SvtFilterOptions::SetMath2MathType( bool bFlag )
{
- pImpl->SetFlag( FILTERCFG_MATH_SAVE, bFlag );
+ pImpl->SetFlag( ConfigFlags::MathSave, bFlag );
SetModified();
}
bool SvtFilterOptions::IsWinWord2Writer() const
{
- return pImpl->IsFlag( FILTERCFG_WRITER_LOAD );
+ return pImpl->IsFlag( ConfigFlags::WriterLoad );
}
void SvtFilterOptions::SetWinWord2Writer( bool bFlag )
{
- pImpl->SetFlag( FILTERCFG_WRITER_LOAD, bFlag );
+ pImpl->SetFlag( ConfigFlags::WriterLoad, bFlag );
SetModified();
}
bool SvtFilterOptions::IsWriter2WinWord() const
{
- return pImpl->IsFlag( FILTERCFG_WRITER_SAVE );
+ return pImpl->IsFlag( ConfigFlags::WriterSave );
}
void SvtFilterOptions::SetWriter2WinWord( bool bFlag )
{
- pImpl->SetFlag( FILTERCFG_WRITER_SAVE, bFlag );
+ pImpl->SetFlag( ConfigFlags::WriterSave, bFlag );
SetModified();
}
bool SvtFilterOptions::IsUseEnhancedFields() const
{
- return pImpl->IsFlag( FILTERCFG_USE_ENHANCED_FIELDS );
+ return pImpl->IsFlag( ConfigFlags::UseEnhancedFields );
}
bool SvtFilterOptions::IsExcel2Calc() const
{
- return pImpl->IsFlag( FILTERCFG_CALC_LOAD );
+ return pImpl->IsFlag( ConfigFlags::CalcLoad );
}
void SvtFilterOptions::SetExcel2Calc( bool bFlag )
{
- pImpl->SetFlag( FILTERCFG_CALC_LOAD, bFlag );
+ pImpl->SetFlag( ConfigFlags::CalcLoad, bFlag );
SetModified();
}
bool SvtFilterOptions::IsCalc2Excel() const
{
- return pImpl->IsFlag( FILTERCFG_CALC_SAVE );
+ return pImpl->IsFlag( ConfigFlags::CalcSave );
}
void SvtFilterOptions::SetCalc2Excel( bool bFlag )
{
- pImpl->SetFlag( FILTERCFG_CALC_SAVE, bFlag );
+ pImpl->SetFlag( ConfigFlags::CalcSave, bFlag );
SetModified();
}
bool SvtFilterOptions::IsPowerPoint2Impress() const
{
- return pImpl->IsFlag( FILTERCFG_IMPRESS_LOAD );
+ return pImpl->IsFlag( ConfigFlags::ImpressLoad );
}
void SvtFilterOptions::SetPowerPoint2Impress( bool bFlag )
{
- pImpl->SetFlag( FILTERCFG_IMPRESS_LOAD, bFlag );
+ pImpl->SetFlag( ConfigFlags::ImpressLoad, bFlag );
SetModified();
}
bool SvtFilterOptions::IsImpress2PowerPoint() const
{
- return pImpl->IsFlag( FILTERCFG_IMPRESS_SAVE );
+ return pImpl->IsFlag( ConfigFlags::ImpressSave );
}
void SvtFilterOptions::SetImpress2PowerPoint( bool bFlag )
{
- pImpl->SetFlag( FILTERCFG_IMPRESS_SAVE, bFlag );
+ pImpl->SetFlag( ConfigFlags::ImpressSave, bFlag );
SetModified();
}
bool SvtFilterOptions::IsSmartArt2Shape() const
{
- return pImpl->IsFlag( FILTERCFG_SMARTART_SHAPE_LOAD );
+ return pImpl->IsFlag( ConfigFlags::SmartArtShapeLoad );
}
void SvtFilterOptions::SetSmartArt2Shape( bool bFlag )
{
- pImpl->SetFlag( FILTERCFG_SMARTART_SHAPE_LOAD, bFlag );
+ pImpl->SetFlag( ConfigFlags::SmartArtShapeLoad, bFlag );
SetModified();
}
@@ -612,39 +619,39 @@ SvtFilterOptions& SvtFilterOptions::Get()
bool SvtFilterOptions::IsEnablePPTPreview() const
{
- return pImpl->IsFlag( FILTERCFG_ENABLE_PPT_PREVIEW );
+ return pImpl->IsFlag( ConfigFlags::EnablePowerPointPreview );
}
bool SvtFilterOptions::IsEnableCalcPreview() const
{
- return pImpl->IsFlag( FILTERCFG_ENABLE_EXCEL_PREVIEW );
+ return pImpl->IsFlag( ConfigFlags::EnableExcelPreview );
}
bool SvtFilterOptions::IsEnableWordPreview() const
{
- return pImpl->IsFlag( FILTERCFG_ENABLE_WORD_PREVIEW );
+ return pImpl->IsFlag( ConfigFlags::EnableWordPreview );
}
bool SvtFilterOptions::IsCharBackground2Highlighting() const
{
- return pImpl->IsFlag( FILTERCFG_CHAR_BACKGROUND_TO_HIGHLIGHTING );
+ return pImpl->IsFlag( ConfigFlags::CharBackgroundToHighlighting );
}
bool SvtFilterOptions::IsCharBackground2Shading() const
{
- return !pImpl->IsFlag( FILTERCFG_CHAR_BACKGROUND_TO_HIGHLIGHTING );
+ return !pImpl->IsFlag( ConfigFlags::CharBackgroundToHighlighting );
}
void SvtFilterOptions::SetCharBackground2Highlighting()
{
- pImpl->SetFlag( FILTERCFG_CHAR_BACKGROUND_TO_HIGHLIGHTING, true );
+ pImpl->SetFlag( ConfigFlags::CharBackgroundToHighlighting, true );
SetModified();
}
void SvtFilterOptions::SetCharBackground2Shading()
{
- pImpl->SetFlag( FILTERCFG_CHAR_BACKGROUND_TO_HIGHLIGHTING, false );
+ pImpl->SetFlag( ConfigFlags::CharBackgroundToHighlighting, false );
SetModified();
}
More information about the Libreoffice-commits
mailing list