[Libreoffice-commits] core.git: 5 commits - dbaccess/source filter/source include/sfx2 sc/source sd/source sfx2/source starmath/source sw/inc sw/source
Noel Grandin
noel at peralex.com
Mon Apr 13 00:36:03 PDT 2015
dbaccess/source/ui/dlg/UserAdmin.cxx | 2 -
filter/source/pdf/impdialog.cxx | 2 -
include/sfx2/objsh.hxx | 42 ++++++++++++++++++++-------------
include/sfx2/passwd.hxx | 24 ++++++++++++-------
sc/source/ui/docshell/docsh.cxx | 20 +++++++--------
sc/source/ui/docshell/docsh4.cxx | 2 -
sc/source/ui/inc/docsh.hxx | 2 -
sc/source/ui/view/tabvwsh3.cxx | 2 -
sd/source/ui/docshell/docshel4.cxx | 4 +--
sfx2/source/dialog/passwd.cxx | 18 +++++++-------
sfx2/source/dialog/securitypage.cxx | 2 -
sfx2/source/doc/docinsert.cxx | 2 -
sfx2/source/doc/objcont.cxx | 4 +--
sfx2/source/doc/objmisc.cxx | 30 +++++++++++------------
sfx2/source/doc/objserv.cxx | 14 ++++-------
sfx2/source/doc/objstor.cxx | 44 +++++++++++++++++------------------
sfx2/source/doc/objxtor.cxx | 4 +--
sfx2/source/inc/objshimp.hxx | 16 ++++++------
sfx2/source/view/frame.cxx | 2 -
sfx2/source/view/viewfrm.cxx | 4 +--
sfx2/source/view/viewprn.cxx | 2 -
sfx2/source/view/viewsh.cxx | 4 +--
starmath/source/document.cxx | 4 +--
sw/inc/docsh.hxx | 2 -
sw/source/ui/dialog/uiregionsw.cxx | 4 +--
sw/source/uibase/app/docsh.cxx | 16 ++++++------
sw/source/uibase/uiview/view2.cxx | 2 -
27 files changed, 145 insertions(+), 129 deletions(-)
New commits:
commit b5f5a386504e320b022f8609c9c36652ae2d3d18
Author: Noel Grandin <noel at peralex.com>
Date: Fri Apr 10 15:52:37 2015 +0200
convert SHOWEXTRAS constants to scoped enum
Change-Id: I84bff53e55fc93ad423835ebc3bf129546dfb7c3
diff --git a/dbaccess/source/ui/dlg/UserAdmin.cxx b/dbaccess/source/ui/dlg/UserAdmin.cxx
index 6afe533..66556c6 100644
--- a/dbaccess/source/ui/dlg/UserAdmin.cxx
+++ b/dbaccess/source/ui/dlg/UserAdmin.cxx
@@ -193,7 +193,7 @@ IMPL_LINK( OUserAdmin, UserHdl, PushButton *, pButton )
if(pButton == m_pNEWUSER)
{
SfxPasswordDialog aPwdDlg(this);
- aPwdDlg.ShowExtras(SHOWEXTRAS_ALL);
+ aPwdDlg.ShowExtras(SfxShowExtras::ALL);
if(aPwdDlg.Execute())
{
Reference<XDataDescriptorFactory> xUserFactory(m_xUsers,UNO_QUERY);
diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx
index e8d1e1e..64224bd 100644
--- a/filter/source/pdf/impdialog.cxx
+++ b/filter/source/pdf/impdialog.cxx
@@ -1194,7 +1194,7 @@ IMPL_LINK_NOARG(ImpPDFTabSecurityPage, ClickmaPbSetPwdHdl)
SfxPasswordDialog aPwdDialog( this, &msUserPwdTitle );
aPwdDialog.SetMinLen( 0 );
aPwdDialog.ShowMinLengthText(false);
- aPwdDialog.ShowExtras( SHOWEXTRAS_CONFIRM | SHOWEXTRAS_PASSWORD2 | SHOWEXTRAS_CONFIRM2 );
+ aPwdDialog.ShowExtras( SfxShowExtras::CONFIRM | SfxShowExtras::PASSWORD2 | SfxShowExtras::CONFIRM2 );
aPwdDialog.SetText(msStrSetPwd);
aPwdDialog.SetGroup2Text(msOwnerPwdTitle);
aPwdDialog.AllowAsciiOnly();
diff --git a/include/sfx2/passwd.hxx b/include/sfx2/passwd.hxx
index 363e9b9..4b241d0 100644
--- a/include/sfx2/passwd.hxx
+++ b/include/sfx2/passwd.hxx
@@ -27,15 +27,23 @@
#include <vcl/fixed.hxx>
#include <vcl/layout.hxx>
#include <sfx2/app.hxx>
+#include <o3tl/typed_flags_set.hxx>
// defines ---------------------------------------------------------------
-#define SHOWEXTRAS_NONE ((sal_uInt16)0x0000)
-#define SHOWEXTRAS_USER ((sal_uInt16)0x0001)
-#define SHOWEXTRAS_CONFIRM ((sal_uInt16)0x0002)
-#define SHOWEXTRAS_PASSWORD2 ((sal_uInt16)0x0004)
-#define SHOWEXTRAS_CONFIRM2 ((sal_uInt16)0x0008)
-#define SHOWEXTRAS_ALL ((sal_uInt16)(SHOWEXTRAS_USER | SHOWEXTRAS_CONFIRM))
+enum class SfxShowExtras
+{
+ NONE = 0x0000,
+ USER = 0x0001,
+ CONFIRM = 0x0002,
+ PASSWORD2 = 0x0004,
+ CONFIRM2 = 0x0008,
+ ALL = USER | CONFIRM
+};
+namespace o3tl
+{
+ template<> struct typed_flags<SfxShowExtras> : is_typed_flags<SfxShowExtras, 0x0f> {};
+}
// class SfxPasswordDialog -----------------------------------------------
@@ -65,7 +73,7 @@ private:
OUString maEmptyPwdStr;
OUString maMainPwdStr;
sal_uInt16 mnMinLen;
- sal_uInt16 mnExtras;
+ SfxShowExtras mnExtras;
bool mbAsciiOnly;
DECL_DLLPRIVATE_LINK(EditModifyHdl, Edit*);
@@ -105,7 +113,7 @@ public:
{
mpPassword1ED->SetHelpId( rId );
}
- void ShowExtras(sal_uInt16 nExtras)
+ void ShowExtras(SfxShowExtras nExtras)
{
mnExtras = nExtras;
}
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index d9b7355..a9dd15c 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -1137,7 +1137,7 @@ bool ScDocShell::ExecuteChangeProtectionDialog( vcl::Window* _pParent, bool bJus
pDlg->SetHelpId( GetStaticInterface()->GetSlot(SID_CHG_PROTECT)->GetCommand() );
pDlg->SetEditHelpId( HID_CHG_PROTECT );
if ( !bProtected )
- pDlg->ShowExtras( SHOWEXTRAS_CONFIRM );
+ pDlg->ShowExtras( SfxShowExtras::CONFIRM );
if ( pDlg->Execute() == RET_OK )
aPassword = pDlg->GetPassword();
pDlg.reset();
diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx
index f69cabf..2cfa826 100644
--- a/sc/source/ui/view/tabvwsh3.cxx
+++ b/sc/source/ui/view/tabvwsh3.cxx
@@ -1002,7 +1002,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
pDlg->SetMinLen( 0 );
pDlg->SetHelpId( GetStaticInterface()->GetSlot(FID_PROTECT_DOC)->GetCommand() );
pDlg->SetEditHelpId( HID_PASSWD_DOC );
- pDlg->ShowExtras( SHOWEXTRAS_CONFIRM );
+ pDlg->ShowExtras( SfxShowExtras::CONFIRM );
if (pDlg->Execute() == RET_OK)
{
diff --git a/sfx2/source/dialog/passwd.cxx b/sfx2/source/dialog/passwd.cxx
index ca67649..237f8eb 100644
--- a/sfx2/source/dialog/passwd.cxx
+++ b/sfx2/source/dialog/passwd.cxx
@@ -65,9 +65,9 @@ IMPL_LINK_INLINE_END(SfxPasswordDialog, EditModifyHdl, Edit *, pEdit)
IMPL_LINK_NOARG(SfxPasswordDialog, OKHdl)
{
- bool bConfirmFailed = ( ( mnExtras & SHOWEXTRAS_CONFIRM ) == SHOWEXTRAS_CONFIRM ) &&
- ( GetConfirm() != GetPassword() );
- if( ( mnExtras & SHOWEXTRAS_CONFIRM2 ) == SHOWEXTRAS_CONFIRM2 && ( GetConfirm2() != GetPassword2() ) )
+ bool bConfirmFailed = bool( mnExtras & SfxShowExtras::CONFIRM ) &&
+ ( GetConfirm() != GetPassword() );
+ if( ( mnExtras & SfxShowExtras::CONFIRM2 ) && ( GetConfirm2() != GetPassword2() ) )
bConfirmFailed = true;
if ( bConfirmFailed )
{
@@ -89,7 +89,7 @@ SfxPasswordDialog::SfxPasswordDialog(vcl::Window* pParent, const OUString* pGrou
, maMinLenPwdStr1(SFX2_RESSTR(STR_PASSWD_MIN_LEN1))
, maEmptyPwdStr(SFX2_RESSTR(STR_PASSWD_EMPTY))
, mnMinLen(5)
- , mnExtras(0)
+ , mnExtras(SfxShowExtras::NONE)
, mbAsciiOnly(false)
{
get(mpPassword1Box, "password1frame");
@@ -175,25 +175,25 @@ short SfxPasswordDialog::Execute()
mpConfirm2FT->Hide();
mpConfirm2ED->Hide();
- if (mnExtras != SHOWEXTRAS_NONE)
+ if (mnExtras != SfxShowExtras::NONE)
mpPassword1FT->Show();
- if (mnExtras & SHOWEXTRAS_USER)
+ if (mnExtras & SfxShowExtras::USER)
{
mpUserFT->Show();
mpUserED->Show();
}
- if (mnExtras & SHOWEXTRAS_CONFIRM)
+ if (mnExtras & SfxShowExtras::CONFIRM)
{
mpConfirm1FT->Show();
mpConfirm1ED->Show();
}
- if (mnExtras & SHOWEXTRAS_PASSWORD2)
+ if (mnExtras & SfxShowExtras::PASSWORD2)
{
mpPassword2Box->Show();
mpPassword2FT->Show();
mpPassword2ED->Show();
}
- if (mnExtras & SHOWEXTRAS_CONFIRM2)
+ if (mnExtras & SfxShowExtras::CONFIRM2)
{
mpConfirm2FT->Show();
mpConfirm2ED->Show();
diff --git a/sfx2/source/dialog/securitypage.cxx b/sfx2/source/dialog/securitypage.cxx
index b3fcb3d..7fb1d0c 100644
--- a/sfx2/source/dialog/securitypage.cxx
+++ b/sfx2/source/dialog/securitypage.cxx
@@ -102,7 +102,7 @@ static bool lcl_GetPassword(
SfxPasswordDialog aPasswdDlg( pParent );
aPasswdDlg.SetMinLen( 1 );
if (bProtect)
- aPasswdDlg.ShowExtras( SHOWEXTRAS_CONFIRM );
+ aPasswdDlg.ShowExtras( SfxShowExtras::CONFIRM );
if (RET_OK == aPasswdDlg.Execute() && !aPasswdDlg.GetPassword().isEmpty())
{
rPassword = aPasswdDlg.GetPassword();
diff --git a/sfx2/source/doc/docinsert.cxx b/sfx2/source/doc/docinsert.cxx
index e51854e..d114453 100644
--- a/sfx2/source/doc/docinsert.cxx
+++ b/sfx2/source/doc/docinsert.cxx
@@ -191,7 +191,7 @@ IMPL_LINK_NOARG(DocumentInserter, DialogClosedHdl)
{
// ask for the password
SfxPasswordDialog aPasswordDlg( NULL );
- aPasswordDlg.ShowExtras( SHOWEXTRAS_CONFIRM );
+ aPasswordDlg.ShowExtras( SfxShowExtras::CONFIRM );
short nRet = aPasswordDlg.Execute();
if ( RET_OK == nRet )
{
diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx
index fbe660f..305dc1b 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -1233,7 +1233,7 @@ IMPL_LINK( SwEditRegionDlg, ChangePasswdHdl, Button *, pBox )
if(!pRepr->GetTempPasswd().getLength() || bChange)
{
SfxPasswordDialog aPasswdDlg(this);
- aPasswdDlg.ShowExtras(SHOWEXTRAS_CONFIRM);
+ aPasswdDlg.ShowExtras(SfxShowExtras::CONFIRM);
if(RET_OK == aPasswdDlg.Execute())
{
const OUString sNewPasswd( aPasswdDlg.GetPassword() );
@@ -1671,7 +1671,7 @@ IMPL_LINK( SwInsertSectionTabPage, ChangePasswdHdl, Button *, pButton )
if(!m_aNewPasswd.getLength() || bChange)
{
SfxPasswordDialog aPasswdDlg(this);
- aPasswdDlg.ShowExtras(SHOWEXTRAS_CONFIRM);
+ aPasswdDlg.ShowExtras(SfxShowExtras::CONFIRM);
if(RET_OK == aPasswdDlg.Execute())
{
const OUString sNewPasswd( aPasswdDlg.GetPassword() );
diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx
index ed126fe..2dba59d 100644
--- a/sw/source/uibase/uiview/view2.cxx
+++ b/sw/source/uibase/uiview/view2.cxx
@@ -626,7 +626,7 @@ void SwView::Execute(SfxRequest &rReq)
SfxPasswordDialog aPasswdDlg( pParent );
aPasswdDlg.SetMinLen( 1 );
if(!aPasswd.getLength())
- aPasswdDlg.ShowExtras(SHOWEXTRAS_CONFIRM);
+ aPasswdDlg.ShowExtras(SfxShowExtras::CONFIRM);
if (aPasswdDlg.Execute())
{
sal_uInt16 nOn = nsRedlineMode_t::REDLINE_ON;
commit f2109254942074d07ad52bf9fe6571405fd79618
Author: Noel Grandin <noel at peralex.com>
Date: Fri Apr 10 15:27:43 2015 +0200
remove unused constants
Change-Id: Ib467f1326b224dbf87282174559c7076d834b7b7
diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx
index 49fea82..8b82d76 100644
--- a/include/sfx2/objsh.hxx
+++ b/include/sfx2/objsh.hxx
@@ -504,13 +504,7 @@ public:
GetDialogContainer();
StarBASIC* GetBasic() const;
- // Interface Document content, Organizer
-#define CONTENT_STYLE 0
-#define CONTENT_CONFIG 1
-#define CONTENT_MACRO 2
-
-
- virtual std::set<Color> GetDocColors();
+ virtual std::set<Color> GetDocColors();
virtual void LoadStyles( SfxObjectShell &rSource );
void ReadNote( INote * );
commit 43fbf02984f405864f89fb3e36eff32f9d757b57
Author: Noel Grandin <noel at peralex.com>
Date: Fri Apr 10 15:27:33 2015 +0200
convert HiddenWarningFact to scoped enum
Change-Id: I23579d746a3c612de68345794731f1ff2cbdf605
diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx
index 3da1ad3..49fea82 100644
--- a/include/sfx2/objsh.hxx
+++ b/include/sfx2/objsh.hxx
@@ -159,7 +159,7 @@ namespace o3tl
template<> struct typed_flags<HiddenInformation> : is_typed_flags<HiddenInformation, 0x07> {};
}
-enum HiddenWarningFact
+enum class HiddenWarningFact
{
WhenSaving = 0,
WhenPrinting,
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index 8c4db55..119e52f 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -405,7 +405,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
if( SID_SIGNATURE == nId || SID_MACRO_SIGNATURE == nId )
{
- if ( QueryHiddenInformation( WhenSigning, NULL ) == RET_YES )
+ if ( QueryHiddenInformation( HiddenWarningFact::WhenSigning, NULL ) == RET_YES )
( SID_SIGNATURE == nId ) ? SignDocumentContent() : SignScriptingContent();
return;
}
@@ -653,7 +653,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
SfxStoringHelper aHelper;
- if ( QueryHiddenInformation( bIsPDFExport ? WhenCreatingPDF : WhenSaving, NULL ) == RET_YES )
+ if ( QueryHiddenInformation( bIsPDFExport ? HiddenWarningFact::WhenCreatingPDF : HiddenWarningFact::WhenSaving, NULL ) == RET_YES )
{
aHelper.GUIStoreModel( GetModel(),
OUString::createFromAscii( pSlot->GetUnoName() ),
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 062ac57..b1ed9b3 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -2959,25 +2959,25 @@ sal_Int16 SfxObjectShell::QueryHiddenInformation( HiddenWarningFact eFact, vcl::
switch ( eFact )
{
- case WhenSaving :
+ case HiddenWarningFact::WhenSaving :
{
nResId = STR_HIDDENINFO_CONTINUE_SAVING;
eOption = SvtSecurityOptions::E_DOCWARN_SAVEORSEND;
break;
}
- case WhenPrinting :
+ case HiddenWarningFact::WhenPrinting :
{
nResId = STR_HIDDENINFO_CONTINUE_PRINTING;
eOption = SvtSecurityOptions::E_DOCWARN_PRINT;
break;
}
- case WhenSigning :
+ case HiddenWarningFact::WhenSigning :
{
nResId = STR_HIDDENINFO_CONTINUE_SIGNING;
eOption = SvtSecurityOptions::E_DOCWARN_SIGNING;
break;
}
- case WhenCreatingPDF :
+ case HiddenWarningFact::WhenCreatingPDF :
{
nResId = STR_HIDDENINFO_CONTINUE_CREATEPDF;
eOption = SvtSecurityOptions::E_DOCWARN_CREATEPDF;
@@ -2991,7 +2991,7 @@ sal_Int16 SfxObjectShell::QueryHiddenInformation( HiddenWarningFact eFact, vcl::
{
OUString sMessage( SfxResId(STR_HIDDENINFO_CONTAINS).toString() );
HiddenInformation nWantedStates = HiddenInformation::RECORDEDCHANGES | HiddenInformation::NOTES;
- if ( eFact != WhenPrinting )
+ if ( eFact != HiddenWarningFact::WhenPrinting )
nWantedStates |= HiddenInformation::DOCUMENTVERSIONS;
HiddenInformation nStates = GetHiddenInformationState( nWantedStates );
bool bWarning = false;
diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx
index 34716d6..1644459 100644
--- a/sfx2/source/view/viewprn.cxx
+++ b/sfx2/source/view/viewprn.cxx
@@ -675,7 +675,7 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
return;
}
- if ( !bSilent && pDoc->QueryHiddenInformation( WhenPrinting, NULL ) != RET_YES )
+ if ( !bSilent && pDoc->QueryHiddenInformation( HiddenWarningFact::WhenPrinting, NULL ) != RET_YES )
return;
// should we print only the selection or the whole document
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index abfbbbc..af454dd 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -548,7 +548,7 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
{
SfxObjectShell* pDoc = GetObjectShell();
if ( pDoc && pDoc->QueryHiddenInformation(
- WhenSaving, &GetViewFrame()->GetWindow() ) != RET_YES )
+ HiddenWarningFact::WhenSaving, &GetViewFrame()->GetWindow() ) != RET_YES )
break;
@@ -609,7 +609,7 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
SfxBluetoothModel aModel;
SfxObjectShell* pDoc = GetObjectShell();
if ( pDoc && pDoc->QueryHiddenInformation(
- WhenSaving, &GetViewFrame()->GetWindow() ) != RET_YES )
+ HiddenWarningFact::WhenSaving, &GetViewFrame()->GetWindow() ) != RET_YES )
break;
uno::Reference < frame::XFrame > xFrame( pFrame->GetFrame().GetFrameInterface() );
SfxMailModel::SendMailResult eResult = aModel.SaveAndSend( xFrame, OUString() );
commit 5651f2d9f64c213b4106e2d5a433f4c525d41bbf
Author: Noel Grandin <noel at peralex.com>
Date: Fri Apr 10 14:28:43 2015 +0200
convert HIDDENINFORMATION_ constants into scoped enum
Change-Id: I94136c926fc8fa69ce2ce2b97fa34dc984dbe095
diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx
index 40a18f4..3da1ad3 100644
--- a/include/sfx2/objsh.hxx
+++ b/include/sfx2/objsh.hxx
@@ -147,9 +147,17 @@ namespace o3tl
template<> struct typed_flags<SfxLoadedFlags> : is_typed_flags<SfxLoadedFlags, 0x03> {};
}
-#define HIDDENINFORMATION_RECORDEDCHANGES 0x0001
-#define HIDDENINFORMATION_NOTES 0x0002
-#define HIDDENINFORMATION_DOCUMENTVERSIONS 0x0004
+enum class HiddenInformation
+{
+ NONE = 0x0000,
+ RECORDEDCHANGES = 0x0001,
+ NOTES = 0x0002,
+ DOCUMENTVERSIONS = 0x0004
+};
+namespace o3tl
+{
+ template<> struct typed_flags<HiddenInformation> : is_typed_flags<HiddenInformation, 0x07> {};
+}
enum HiddenWarningFact
{
@@ -419,7 +427,7 @@ public:
virtual bool PrepareClose(bool bUI = true);
virtual bool IsInformationLost();
- virtual sal_uInt16 GetHiddenInformationState( sal_uInt16 nStates );
+ virtual HiddenInformation GetHiddenInformationState( HiddenInformation nStates );
sal_Int16 QueryHiddenInformation( HiddenWarningFact eFact, vcl::Window* pParent );
bool IsSecurityOptOpenReadOnly() const;
void SetSecurityOptOpenReadOnly( bool bOpenReadOnly = true );
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index 0ab97e1..1261dab 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -230,17 +230,17 @@ SCTAB ScDocShell::GetSaveTab()
return nTab;
}
-sal_uInt16 ScDocShell::GetHiddenInformationState( sal_uInt16 nStates )
+HiddenInformation ScDocShell::GetHiddenInformationState( HiddenInformation nStates )
{
- // get global state like HIDDENINFORMATION_DOCUMENTVERSIONS
- sal_uInt16 nState = SfxObjectShell::GetHiddenInformationState( nStates );
+ // get global state like HiddenInformation::DOCUMENTVERSIONS
+ HiddenInformation nState = SfxObjectShell::GetHiddenInformationState( nStates );
- if ( nStates & HIDDENINFORMATION_RECORDEDCHANGES )
+ if ( nStates & HiddenInformation::RECORDEDCHANGES )
{
if ( aDocument.GetChangeTrack() && aDocument.GetChangeTrack()->GetFirst() )
- nState |= HIDDENINFORMATION_RECORDEDCHANGES;
+ nState |= HiddenInformation::RECORDEDCHANGES;
}
- if ( nStates & HIDDENINFORMATION_NOTES )
+ if ( nStates & HiddenInformation::NOTES )
{
SCTAB nTableCount = aDocument.GetTableCount();
bool bFound = false;
@@ -251,7 +251,7 @@ sal_uInt16 ScDocShell::GetHiddenInformationState( sal_uInt16 nStates )
}
if (bFound)
- nState |= HIDDENINFORMATION_NOTES;
+ nState |= HiddenInformation::NOTES;
}
return nState;
diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx
index e0576a5..340508c 100644
--- a/sc/source/ui/inc/docsh.hxx
+++ b/sc/source/ui/inc/docsh.hxx
@@ -413,7 +413,7 @@ public:
void BeforeXMLLoading();
void AfterXMLLoading(bool bRet);
- virtual sal_uInt16 GetHiddenInformationState( sal_uInt16 nStates ) SAL_OVERRIDE;
+ virtual HiddenInformation GetHiddenInformationState( HiddenInformation nStates ) SAL_OVERRIDE;
const ScOptSolverSave* GetSolverSaveData() const { return pSolverSaveData; } // may be null
void SetSolverSaveData( const ScOptSolverSave& rData );
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index cfd7bfc..062ac57 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -2939,13 +2939,13 @@ bool SfxObjectShell::CanReload_Impl()
-sal_uInt16 SfxObjectShell::GetHiddenInformationState( sal_uInt16 nStates )
+HiddenInformation SfxObjectShell::GetHiddenInformationState( HiddenInformation nStates )
{
- sal_uInt16 nState = 0;
- if ( nStates & HIDDENINFORMATION_DOCUMENTVERSIONS )
+ HiddenInformation nState = HiddenInformation::NONE;
+ if ( nStates & HiddenInformation::DOCUMENTVERSIONS )
{
if ( GetMedium()->GetVersionList().getLength() )
- nState |= HIDDENINFORMATION_DOCUMENTVERSIONS;
+ nState |= HiddenInformation::DOCUMENTVERSIONS;
}
return nState;
@@ -2990,25 +2990,25 @@ sal_Int16 SfxObjectShell::QueryHiddenInformation( HiddenWarningFact eFact, vcl::
if ( SvtSecurityOptions().IsOptionSet( eOption ) )
{
OUString sMessage( SfxResId(STR_HIDDENINFO_CONTAINS).toString() );
- sal_uInt16 nWantedStates = HIDDENINFORMATION_RECORDEDCHANGES | HIDDENINFORMATION_NOTES;
+ HiddenInformation nWantedStates = HiddenInformation::RECORDEDCHANGES | HiddenInformation::NOTES;
if ( eFact != WhenPrinting )
- nWantedStates |= HIDDENINFORMATION_DOCUMENTVERSIONS;
- sal_uInt16 nStates = GetHiddenInformationState( nWantedStates );
+ nWantedStates |= HiddenInformation::DOCUMENTVERSIONS;
+ HiddenInformation nStates = GetHiddenInformationState( nWantedStates );
bool bWarning = false;
- if ( ( nStates & HIDDENINFORMATION_RECORDEDCHANGES ) == HIDDENINFORMATION_RECORDEDCHANGES )
+ if ( nStates & HiddenInformation::RECORDEDCHANGES )
{
sMessage += SfxResId(STR_HIDDENINFO_RECORDCHANGES).toString();
sMessage += "\n";
bWarning = true;
}
- if ( ( nStates & HIDDENINFORMATION_NOTES ) == HIDDENINFORMATION_NOTES )
+ if ( nStates & HiddenInformation::NOTES )
{
sMessage += SfxResId(STR_HIDDENINFO_NOTES).toString();
sMessage += "\n";
bWarning = true;
}
- if ( ( nStates & HIDDENINFORMATION_DOCUMENTVERSIONS ) == HIDDENINFORMATION_DOCUMENTVERSIONS )
+ if ( nStates & HiddenInformation::DOCUMENTVERSIONS )
{
sMessage += SfxResId(STR_HIDDENINFO_DOCVERSIONS).toString();
sMessage += "\n";
diff --git a/sw/inc/docsh.hxx b/sw/inc/docsh.hxx
index 9fbb874..fa2f547 100644
--- a/sw/inc/docsh.hxx
+++ b/sw/inc/docsh.hxx
@@ -288,7 +288,7 @@ public:
virtual ::com::sun::star::uno::Sequence< OUString > GetEventNames() SAL_OVERRIDE;
/// #i20883# Digital Signatures and Encryption
- virtual sal_uInt16 GetHiddenInformationState( sal_uInt16 nStates ) SAL_OVERRIDE;
+ virtual HiddenInformation GetHiddenInformationState( HiddenInformation nStates ) SAL_OVERRIDE;
/** #i42634# Overwrites SfxObjectShell::UpdateLinks
This new function is necessary to trigger update of links in docs
diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx
index 4f75597..71e8251 100644
--- a/sw/source/uibase/app/docsh.cxx
+++ b/sw/source/uibase/app/docsh.cxx
@@ -878,17 +878,17 @@ sal_uLong SwDocShell::GetMiscStatus() const
}
// #i20883# Digital Signatures and Encryption
-sal_uInt16 SwDocShell::GetHiddenInformationState( sal_uInt16 nStates )
+HiddenInformation SwDocShell::GetHiddenInformationState( HiddenInformation nStates )
{
- // get global state like HIDDENINFORMATION_DOCUMENTVERSIONS
- sal_uInt16 nState = SfxObjectShell::GetHiddenInformationState( nStates );
+ // get global state like HiddenInformation::DOCUMENTVERSIONS
+ HiddenInformation nState = SfxObjectShell::GetHiddenInformationState( nStates );
- if ( nStates & HIDDENINFORMATION_RECORDEDCHANGES )
+ if ( nStates & HiddenInformation::RECORDEDCHANGES )
{
if ( !GetDoc()->getIDocumentRedlineAccess().GetRedlineTbl().empty() )
- nState |= HIDDENINFORMATION_RECORDEDCHANGES;
+ nState |= HiddenInformation::RECORDEDCHANGES;
}
- if ( nStates & HIDDENINFORMATION_NOTES )
+ if ( nStates & HiddenInformation::NOTES )
{
OSL_ENSURE( GetWrtShell(), "No SwWrtShell, no information" );
if ( GetWrtShell() )
@@ -900,7 +900,7 @@ sal_uInt16 SwDocShell::GetHiddenInformationState( sal_uInt16 nStates )
{
if( pFirst->GetTxtFld() && pFirst->IsFldInDoc() )
{
- nState |= HIDDENINFORMATION_NOTES;
+ nState |= HiddenInformation::NOTES;
break;
}
pFirst = aIter.Next();
commit ccfa9fa13db230cc66207bc42d528b773c4cf4f6
Author: Noel Grandin <noel at peralex.com>
Date: Fri Apr 10 12:17:41 2015 +0200
convert SFX_LOADED_ to scoped enum
Change-Id: I065a07e1bb5f5a7f85429c919830b6b9605206ea
diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx
index b92656e..40a18f4 100644
--- a/include/sfx2/objsh.hxx
+++ b/include/sfx2/objsh.hxx
@@ -135,9 +135,17 @@ namespace o3tl
#define SFX_TITLE_HISTORY 7
#define SFX_TITLE_MAXLEN 10 // this gives the limits on length
-#define SFX_LOADED_MAINDOCUMENT 1
-#define SFX_LOADED_IMAGES 2
-#define SFX_LOADED_ALL 3
+enum class SfxLoadedFlags
+{
+ NONE = 0,
+ MAINDOCUMENT = 1,
+ IMAGES = 2,
+ ALL = MAINDOCUMENT | IMAGES
+};
+namespace o3tl
+{
+ template<> struct typed_flags<SfxLoadedFlags> : is_typed_flags<SfxLoadedFlags, 0x03> {};
+}
#define HIDDENINFORMATION_RECORDEDCHANGES 0x0001
#define HIDDENINFORMATION_NOTES 0x0002
@@ -438,7 +446,7 @@ public:
void AbortImport();
bool IsAbortingImport() const;
bool IsReloading() const;
- void FinishedLoading( sal_uInt16 nWhich = SFX_LOADED_ALL );
+ void FinishedLoading( SfxLoadedFlags nWhich = SfxLoadedFlags::ALL );
void TemplateDisconnectionAfterLoad();
bool IsLoading() const;
bool IsLoadingFinished() const;
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index 2ecbb0c..0ab97e1 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -595,7 +595,7 @@ bool ScDocShell::Load( SfxMedium& rMedium )
aDocument.InvalidateTableArea();
bIsEmpty = false;
- FinishedLoading( SFX_LOADED_MAINDOCUMENT | SFX_LOADED_IMAGES );
+ FinishedLoading( SfxLoadedFlags::ALL );
return bRet;
}
@@ -1503,7 +1503,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium )
aUpdater.update();
}
}
- FinishedLoading( SFX_LOADED_MAINDOCUMENT | SFX_LOADED_IMAGES );
+ FinishedLoading( SfxLoadedFlags::ALL );
// invalidate eventually temporary table areas
if ( bRet )
@@ -1548,7 +1548,7 @@ bool ScDocShell::LoadExternal( SfxMedium& rMed )
return false;
}
- FinishedLoading(SFX_LOADED_MAINDOCUMENT | SFX_LOADED_IMAGES);
+ FinishedLoading(SfxLoadedFlags::ALL);
return true;
}
diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx
index f653189..4232b3f 100644
--- a/sd/source/ui/docshell/docshel4.cxx
+++ b/sd/source/ui/docshell/docshel4.cxx
@@ -309,7 +309,7 @@ bool DrawDocShell::Load( SfxMedium& rMedium )
SetVisArea( Rectangle( pPage->GetAllObjBoundRect() ) );
}
- FinishedLoading( SFX_LOADED_ALL );
+ FinishedLoading( SfxLoadedFlags::ALL );
const INetURLObject aUrl;
SfxObjectShell::SetAutoLoad( aUrl, 0, false );
@@ -486,7 +486,7 @@ bool DrawDocShell::ConvertFrom( SfxMedium& rMedium )
bRet = SdGRFFilter( rMedium, *this ).Import();
}
- FinishedLoading( SFX_LOADED_MAINDOCUMENT | SFX_LOADED_IMAGES );
+ FinishedLoading( SfxLoadedFlags::ALL );
// tell SFX to change viewshell when in preview mode
if( IsPreview() )
diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx
index f9a25a3..95fd6b8 100644
--- a/sfx2/source/doc/objcont.cxx
+++ b/sfx2/source/doc/objcont.cxx
@@ -599,7 +599,7 @@ sal_uInt32 SfxObjectShell::GetModifyPasswordHash() const
bool SfxObjectShell::SetModifyPasswordHash( sal_uInt32 nHash )
{
if ( ( !IsReadOnly() && !IsReadOnlyUI() )
- || !(pImp->nFlagsInProgress & SFX_LOADED_MAINDOCUMENT ) )
+ || !(pImp->nFlagsInProgress & SfxLoadedFlags::MAINDOCUMENT ) )
{
// the hash can be changed only in editable documents,
// or during loading of document
@@ -618,7 +618,7 @@ uno::Sequence< beans::PropertyValue > SfxObjectShell::GetModifyPasswordInfo() co
bool SfxObjectShell::SetModifyPasswordInfo( const uno::Sequence< beans::PropertyValue >& aInfo )
{
if ( ( !IsReadOnly() && !IsReadOnlyUI() )
- || !(pImp->nFlagsInProgress & SFX_LOADED_MAINDOCUMENT ) )
+ || !(pImp->nFlagsInProgress & SfxLoadedFlags::MAINDOCUMENT ) )
{
// the hash can be changed only in editable documents,
// or during loading of document
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index 7d75118..f3ac27c 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -1155,7 +1155,7 @@ void SfxObjectShell::SetAutoLoad(
bool SfxObjectShell::IsLoadingFinished() const
{
- return ( pImp->nLoadedFlags == SFX_LOADED_ALL );
+ return ( pImp->nLoadedFlags == SfxLoadedFlags::ALL );
}
void SfxObjectShell::InitOwnModel_Impl()
@@ -1194,14 +1194,14 @@ void SfxObjectShell::InitOwnModel_Impl()
}
}
-void SfxObjectShell::FinishedLoading( sal_uInt16 nFlags )
+void SfxObjectShell::FinishedLoading( SfxLoadedFlags nFlags )
{
bool bSetModifiedTRUE = false;
SFX_ITEMSET_ARG( pMedium->GetItemSet(), pSalvageItem, SfxStringItem, SID_DOC_SALVAGE, false );
- if( ( nFlags & SFX_LOADED_MAINDOCUMENT ) && !(pImp->nLoadedFlags & SFX_LOADED_MAINDOCUMENT )
- && !(pImp->nFlagsInProgress & SFX_LOADED_MAINDOCUMENT ))
+ if( ( nFlags & SfxLoadedFlags::MAINDOCUMENT ) && !(pImp->nLoadedFlags & SfxLoadedFlags::MAINDOCUMENT )
+ && !(pImp->nFlagsInProgress & SfxLoadedFlags::MAINDOCUMENT ))
{
- pImp->nFlagsInProgress |= SFX_LOADED_MAINDOCUMENT;
+ pImp->nFlagsInProgress |= SfxLoadedFlags::MAINDOCUMENT;
static_cast<SfxHeaderAttributes_Impl*>(GetHeaderAttributes())->SetAttributes();
pImp->bImportDone = true;
if( !IsAbortingImport() )
@@ -1225,13 +1225,13 @@ void SfxObjectShell::FinishedLoading( sal_uInt16 nFlags )
bHasName = true; // the document is loaded, so the name should already available
GetTitle( SFX_TITLE_DETECT );
InitOwnModel_Impl();
- pImp->nFlagsInProgress &= ~SFX_LOADED_MAINDOCUMENT;
+ pImp->nFlagsInProgress &= ~SfxLoadedFlags::MAINDOCUMENT;
}
- if( ( nFlags & SFX_LOADED_IMAGES ) && !(pImp->nLoadedFlags & SFX_LOADED_IMAGES )
- && !(pImp->nFlagsInProgress & SFX_LOADED_IMAGES ))
+ if( ( nFlags & SfxLoadedFlags::IMAGES ) && !(pImp->nLoadedFlags & SfxLoadedFlags::IMAGES )
+ && !(pImp->nFlagsInProgress & SfxLoadedFlags::IMAGES ))
{
- pImp->nFlagsInProgress |= SFX_LOADED_IMAGES;
+ pImp->nFlagsInProgress |= SfxLoadedFlags::IMAGES;
uno::Reference<document::XDocumentProperties> xDocProps(
getDocProperties());
OUString url(xDocProps->getAutoloadURL());
@@ -1241,12 +1241,12 @@ void SfxObjectShell::FinishedLoading( sal_uInt16 nFlags )
if( !bSetModifiedTRUE && IsEnableSetModified() )
SetModified( false );
Invalidate( SID_SAVEASDOC );
- pImp->nFlagsInProgress &= ~SFX_LOADED_IMAGES;
+ pImp->nFlagsInProgress &= ~SfxLoadedFlags::IMAGES;
}
pImp->nLoadedFlags |= nFlags;
- if ( !pImp->nFlagsInProgress )
+ if ( pImp->nFlagsInProgress == SfxLoadedFlags::NONE )
{
// in case of reentrance calls the first called FinishedLoading() call on the stack
// should do the notification, in result the notification is done when all the FinishedLoading() calls are finished
@@ -1256,7 +1256,7 @@ void SfxObjectShell::FinishedLoading( sal_uInt16 nFlags )
else
SetModified( false );
- if ( (pImp->nLoadedFlags & SFX_LOADED_MAINDOCUMENT ) && (pImp->nLoadedFlags & SFX_LOADED_IMAGES ) )
+ if ( (pImp->nLoadedFlags & SfxLoadedFlags::MAINDOCUMENT ) && (pImp->nLoadedFlags & SfxLoadedFlags::IMAGES ) )
{
SFX_ITEMSET_ARG( pMedium->GetItemSet(), pTemplateItem, SfxBoolItem, SID_TEMPLATE, false);
bool bTemplate = pTemplateItem && pTemplateItem->GetValue();
@@ -1402,7 +1402,7 @@ bool SfxObjectShell::IsLoading() const
Has FinishedLoading been called?
*/
{
- return !( pImp->nLoadedFlags & SFX_LOADED_MAINDOCUMENT );
+ return !( pImp->nLoadedFlags & SfxLoadedFlags::MAINDOCUMENT );
}
@@ -1414,11 +1414,11 @@ void SfxObjectShell::CancelTransfers()
by RegisterTransfer.
*/
{
- if( ( pImp->nLoadedFlags & SFX_LOADED_ALL ) != SFX_LOADED_ALL )
+ if( ( pImp->nLoadedFlags & SfxLoadedFlags::ALL ) != SfxLoadedFlags::ALL )
{
AbortImport();
if( IsLoading() )
- FinishedLoading( SFX_LOADED_ALL );
+ FinishedLoading( SfxLoadedFlags::ALL );
}
}
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index 1a10c39..8c4db55 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -1050,7 +1050,7 @@ void SfxObjectShell::GetState_Impl(SfxItemSet &rSet)
case SID_SAVEASDOC:
{
- if( ( pImp->nLoadedFlags & SFX_LOADED_MAINDOCUMENT ) != SFX_LOADED_MAINDOCUMENT )
+ if( !( pImp->nLoadedFlags & SfxLoadedFlags::MAINDOCUMENT ) )
{
rSet.DisableItem( nWhich );
break;
@@ -1064,7 +1064,7 @@ void SfxObjectShell::GetState_Impl(SfxItemSet &rSet)
case SID_SAVEACOPY:
{
- if( ( pImp->nLoadedFlags & SFX_LOADED_MAINDOCUMENT ) != SFX_LOADED_MAINDOCUMENT )
+ if( !( pImp->nLoadedFlags & SfxLoadedFlags::MAINDOCUMENT ) )
{
rSet.DisableItem( nWhich );
break;
@@ -1234,13 +1234,11 @@ void SfxObjectShell::StateProps_Impl(SfxItemSet &rSet)
}
case SID_DOC_LOADING:
- rSet.Put( SfxBoolItem( nSID, SFX_LOADED_MAINDOCUMENT !=
- ( pImp->nLoadedFlags & SFX_LOADED_MAINDOCUMENT ) ) );
+ rSet.Put( SfxBoolItem( nSID, ! ( pImp->nLoadedFlags & SfxLoadedFlags::MAINDOCUMENT ) ) );
break;
case SID_IMG_LOADING:
- rSet.Put( SfxBoolItem( nSID, SFX_LOADED_IMAGES !=
- ( pImp->nLoadedFlags & SFX_LOADED_IMAGES ) ) );
+ rSet.Put( SfxBoolItem( nSID, ! ( pImp->nLoadedFlags & SfxLoadedFlags::IMAGES ) ) );
break;
}
}
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 32dcfef..cfd7bfc 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -657,7 +657,7 @@ bool SfxObjectShell::DoLoad( SfxMedium *pMed )
}
pMed->GetItemSet()->Put( SfxStringItem( SID_DOC_BASEURL, aBaseURL ) );
- pImp->nLoadedFlags = 0;
+ pImp->nLoadedFlags = SfxLoadedFlags::NONE;
pImp->bModelInitialized = false;
//TODO/LATER: make a clear strategy how to handle "UsesStorage" etc.
@@ -718,7 +718,7 @@ bool SfxObjectShell::DoLoad( SfxMedium *pMed )
// Load
if ( !GetError() )
{
- pImp->nLoadedFlags = 0;
+ pImp->nLoadedFlags = SfxLoadedFlags::NONE;
pImp->bModelInitialized = false;
bOk = xStorage.is() && LoadOwnFormat( *pMed );
if ( bOk )
@@ -748,7 +748,7 @@ bool SfxObjectShell::DoLoad( SfxMedium *pMed )
if ( GetError() == ERRCODE_NONE )
{
- pImp->nLoadedFlags = 0;
+ pImp->nLoadedFlags = SfxLoadedFlags::NONE;
pImp->bModelInitialized = false;
if ( pMedium->GetFilter() && ( pMedium->GetFilter()->GetFilterFlags() & SfxFilterFlags::STARONEFILTER ) )
{
@@ -774,7 +774,7 @@ bool SfxObjectShell::DoLoad( SfxMedium *pMed )
{}
}
UpdateLinks();
- FinishedLoading( SFX_LOADED_ALL );
+ FinishedLoading( SfxLoadedFlags::ALL );
}
else
{
@@ -832,10 +832,10 @@ bool SfxObjectShell::DoLoad( SfxMedium *pMed )
}
// If not loaded asynchronously call FinishedLoading
- if ( !( pImp->nLoadedFlags & SFX_LOADED_MAINDOCUMENT ) &&
- ( !pMedium->GetFilter() || pMedium->GetFilter()->UsesStorage() )
+ if ( !( pImp->nLoadedFlags & SfxLoadedFlags::MAINDOCUMENT ) &&
+ ( !pMedium->GetFilter() || pMedium->GetFilter()->UsesStorage() )
)
- FinishedLoading( SFX_LOADED_MAINDOCUMENT );
+ FinishedLoading( SfxLoadedFlags::MAINDOCUMENT );
if( IsOwnStorageFormat_Impl(*pMed) && pMed->GetFilter() )
{
diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx
index 67504bc..6114411 100644
--- a/sfx2/source/doc/objxtor.cxx
+++ b/sfx2/source/doc/objxtor.cxx
@@ -246,8 +246,8 @@ SfxObjectShell_Impl::SfxObjectShell_Impl( SfxObjectShell& _rDocShell )
,nEventId ( 0)
,pReloadTimer ( 0)
,pMarkData( 0 )
- ,nLoadedFlags ( SFX_LOADED_ALL )
- ,nFlagsInProgress( 0 )
+ ,nLoadedFlags ( SfxLoadedFlags::ALL )
+ ,nFlagsInProgress( SfxLoadedFlags::NONE )
,bModalMode( false )
,bRunningMacro( false )
,bReloadAvailable( false )
diff --git a/sfx2/source/inc/objshimp.hxx b/sfx2/source/inc/objshimp.hxx
index ff3f2b3..8867860 100644
--- a/sfx2/source/inc/objshimp.hxx
+++ b/sfx2/source/inc/objshimp.hxx
@@ -95,31 +95,31 @@ struct SfxObjectShell_Impl : public ::sfx2::IMacroDocumentAccess
m_bConfigOptionsChecked:1; // whether or not the user options are checked after the Options dialog is closed.
IndexBitSet aBitSet;
- sal_uInt32 lErr;
+ sal_uInt32 lErr;
sal_uInt16 nEventId; // If Open/Create as to be sent
// before Activate
AutoReloadTimer_Impl *pReloadTimer;
MarkData_Impl* pMarkData;
- sal_uInt16 nLoadedFlags;
- sal_uInt16 nFlagsInProgress;
+ SfxLoadedFlags nLoadedFlags;
+ SfxLoadedFlags nFlagsInProgress;
bool bModalMode;
bool bRunningMacro;
bool bReloadAvailable;
- sal_uInt16 nAutoLoadLocks;
- SfxModule* pModule;
+ sal_uInt16 nAutoLoadLocks;
+ SfxModule* pModule;
SfxObjectShellFlags eFlags;
bool bReadOnlyUI;
tools::SvRef<SvRefBase> xHeaderAttributes;
::rtl::Reference< SfxBaseModel >
pBaseModel;
- sal_uInt16 nStyleFilter;
+ sal_uInt16 nStyleFilter;
bool bDisposing;
bool m_bEnableSetModified;
bool m_bIsModified;
- Rectangle m_aVisArea;
- MapUnit m_nMapUnit;
+ Rectangle m_aVisArea;
+ MapUnit m_nMapUnit;
bool m_bCreateTempStor;
::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > m_xDocStorage;
diff --git a/sfx2/source/view/frame.cxx b/sfx2/source/view/frame.cxx
index 4b36968..82c0381 100644
--- a/sfx2/source/view/frame.cxx
+++ b/sfx2/source/view/frame.cxx
@@ -284,7 +284,7 @@ void SfxFrame::CancelTransfers( bool /*bCancelLoadEnv*/ )
{
pImp->bInCancelTransfers = true;
SfxObjectShell* pObj = GetCurrentDocument();
- if( pObj ) //&& !( pObj->Get_Impl()->nLoadedFlags & SFX_LOADED_ALL ))
+ if( pObj ) //&& !( pObj->Get_Impl()->nLoadedFlags & SfxLoadedFlags::ALL ))
{
SfxViewFrame* pFrm;
for( pFrm = SfxViewFrame::GetFirst( pObj );
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index c2d63d9..509fa7d 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -331,7 +331,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
// Due to Double occupancy in toolboxes (with or without Ctrl),
// it is also possible that the slot is enabled, but Ctrl-click
// despite this is not!
- if( !pSh || !pSh->HasName() || !(pSh->Get_Impl()->nLoadedFlags & SFX_LOADED_MAINDOCUMENT ))
+ if( !pSh || !pSh->HasName() || !(pSh->Get_Impl()->nLoadedFlags & SfxLoadedFlags::MAINDOCUMENT ))
break;
SfxMedium* pMed = pSh->GetMedium();
@@ -862,7 +862,7 @@ void SfxViewFrame::StateReload_Impl( SfxItemSet& rSet )
const SfxShell *pFSh;
if ( !pSh ||
!pSh->HasName() ||
- !( pSh->Get_Impl()->nLoadedFlags & SFX_LOADED_MAINDOCUMENT ) ||
+ !( pSh->Get_Impl()->nLoadedFlags & SfxLoadedFlags::MAINDOCUMENT ) ||
( pSh->GetCreateMode() == SfxObjectCreateMode::EMBEDDED &&
( !(pVSh = pSh->GetViewShell()) ||
!(pFSh = pVSh->GetFormShell()) ||
diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx
index c111245..6252dcd 100644
--- a/starmath/source/document.cxx
+++ b/starmath/source/document.cxx
@@ -740,7 +740,7 @@ bool SmDocShell::ConvertFrom(SfxMedium &rMedium)
Repaint();
}
- FinishedLoading( SFX_LOADED_ALL );
+ FinishedLoading( SfxLoadedFlags::ALL );
return bSuccess;
}
@@ -790,7 +790,7 @@ bool SmDocShell::Load( SfxMedium& rMedium )
Repaint();
}
- FinishedLoading( SFX_LOADED_ALL );
+ FinishedLoading( SfxLoadedFlags::ALL );
return bRet;
}
diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx
index a6d1739..4f75597 100644
--- a/sw/source/uibase/app/docsh.cxx
+++ b/sw/source/uibase/app/docsh.cxx
@@ -1088,7 +1088,7 @@ void SwDocShell::LoadingFinished()
// before <FinishedLoading(..)> is called.
const bool bHasDocToStayModified( m_pDoc->getIDocumentState().IsModified() && m_pDoc->getIDocumentLinksAdministration().LinksUpdated() );
- FinishedLoading( SFX_LOADED_ALL );
+ FinishedLoading( SfxLoadedFlags::ALL );
SfxViewFrame* pVFrame = SfxViewFrame::GetFirst(this);
if(pVFrame)
{
More information about the Libreoffice-commits
mailing list