summaryrefslogtreecommitdiff
path: root/sw/source/uibase/app/docsh.cxx
diff options
context:
space:
mode:
authorValentin Kettner <vakevk+libreoffice@gmail.com>2014-08-01 17:09:54 +0200
committerValentin Kettner <vakevk+libreoffice@gmail.com>2014-08-12 23:26:38 +0200
commit64e13a1456c44ef3461c2941bb3be15c3eaf478e (patch)
treeb08e8a7b41e6c7b51a7145b9f7502765090f74b1 /sw/source/uibase/app/docsh.cxx
parent9cc617afcde381dfe0164570771ee8c255bdbfbe (diff)
Refactored IDocumentState out of SwDoc.
Into the new class DocumentStateManager. Change-Id: I91c9097b091ff6118d58fd15fff2a4cefe0171fd
Diffstat (limited to 'sw/source/uibase/app/docsh.cxx')
-rw-r--r--sw/source/uibase/app/docsh.cxx15
1 files changed, 8 insertions, 7 deletions
diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx
index 6c87f8cc63e5..e93add0ed6e8 100644
--- a/sw/source/uibase/app/docsh.cxx
+++ b/sw/source/uibase/app/docsh.cxx
@@ -75,6 +75,7 @@
#include <IDocumentDrawModelAccess.hxx>
#include <IDocumentRedlineAccess.hxx>
#include <IDocumentStatistics.hxx>
+#include <IDocumentState.hxx>
#include <docstat.hxx>
#include <pagedesc.hxx>
#include <pview.hxx>
@@ -476,7 +477,7 @@ bool SwDocShell::SaveAs( SfxMedium& rMedium )
// Remember and preserve Modified-Flag without calling the Link
// (for OLE; after Statement from MM)
- bool bIsModified = mpDoc->IsModified();
+ bool bIsModified = mpDoc->getIDocumentState().IsModified();
mpDoc->GetIDocumentUndoRedo().LockUndoNoModifiedPosition();
Link aOldOLELnk( mpDoc->GetOle2Link() );
mpDoc->SetOle2Link( Link() );
@@ -503,7 +504,7 @@ bool SwDocShell::SaveAs( SfxMedium& rMedium )
if( bIsModified )
{
- mpDoc->SetModified();
+ mpDoc->getIDocumentState().SetModified();
mpDoc->GetIDocumentUndoRedo().UnLockUndoNoModifiedPosition();
}
mpDoc->SetOle2Link( aOldOLELnk );
@@ -767,9 +768,9 @@ bool SwDocShell::SaveCompleted( const uno::Reference < embed::XStorage >& xStor
{
// Do not decide until here, whether Saving was successful or not
if( IsModified() )
- mpDoc->SetModified();
+ mpDoc->getIDocumentState().SetModified();
else
- mpDoc->ResetModified();
+ mpDoc->getIDocumentState().ResetModified();
}
if (mpOLEChildList)
@@ -1106,7 +1107,7 @@ void SwDocShell::LoadingFinished()
// enables the document modification again.
// Thus, manuell modify the document, if its modified and its links are updated
// before <FinishedLoading(..)> is called.
- const bool bHasDocToStayModified( mpDoc->IsModified() && mpDoc->getIDocumentLinksAdministration().LinksUpdated() );
+ const bool bHasDocToStayModified( mpDoc->getIDocumentState().IsModified() && mpDoc->getIDocumentLinksAdministration().LinksUpdated() );
FinishedLoading( SFX_LOADED_ALL );
SfxViewFrame* pVFrame = SfxViewFrame::GetFirst(this);
@@ -1118,9 +1119,9 @@ void SwDocShell::LoadingFinished()
}
// #i38810#
- if ( bHasDocToStayModified && !mpDoc->IsModified() )
+ if ( bHasDocToStayModified && !mpDoc->getIDocumentState().IsModified() )
{
- mpDoc->SetModified();
+ mpDoc->getIDocumentState().SetModified();
}
}