summaryrefslogtreecommitdiff
path: root/sw/source/uibase/app/docsh.cxx
diff options
context:
space:
mode:
authorValentin Kettner <vakevk+libreoffice@gmail.com>2014-05-25 14:10:13 +0200
committerValentin Kettner <vakevk+libreoffice@gmail.com>2014-06-03 19:12:02 +0200
commit6f77ce5870101021d6e1056ccddb443f3825c41d (patch)
tree545c6c914257857eb179f7bf8c38152afa343651 /sw/source/uibase/app/docsh.cxx
parent72e71364c68ccbfac3cd880a8d1059c574856163 (diff)
Removed DocumentSettingManager methods from SwDoc.
And moved all calls to those methods to GetDocumentSettingManager(). Change-Id: I9b6cc8c3aa9b57bbc0c39f39499dfb4f5f254ad9
Diffstat (limited to 'sw/source/uibase/app/docsh.cxx')
-rw-r--r--sw/source/uibase/app/docsh.cxx41
1 files changed, 21 insertions, 20 deletions
diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx
index e3ceb11f1044..d8ab4c73a33b 100644
--- a/sw/source/uibase/app/docsh.cxx
+++ b/sw/source/uibase/app/docsh.cxx
@@ -69,6 +69,7 @@
#include <docstyle.hxx>
#include <doc.hxx>
#include <IDocumentUndoRedo.hxx>
+#include <DocumentSettingManager.hxx>
#include <docstat.hxx>
#include <pagedesc.hxx>
#include <pview.hxx>
@@ -259,7 +260,7 @@ bool SwDocShell::ConvertFrom( SfxMedium& rMedium )
SW_MOD()->SetEmbeddedLoadSave(
SFX_CREATE_MODE_EMBEDDED == GetCreateMode() );
- pRdr->GetDoc()->set(IDocumentSettingAccess::HTML_MODE, ISA(SwWebDocShell));
+ pRdr->GetDoc()->GetDocumentSettingManager().set(IDocumentSettingAccess::HTML_MODE, ISA(SwWebDocShell));
/* #106748# Restore the pool default if reading a saved document. */
pDoc->RemoveAllFmtLanguageDependencies();
@@ -310,10 +311,10 @@ bool SwDocShell::Save()
// #i62875#
// reset compatibility flag <DoNotCaptureDrawObjsOnPage>, if possible
if ( pWrtShell && pDoc &&
- pDoc->get(IDocumentSettingAccess::DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE) &&
+ pDoc->GetDocumentSettingManager().get(IDocumentSettingAccess::DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE) &&
docfunc::AllDrawObjsOnPage( *pDoc ) )
{
- pDoc->set(IDocumentSettingAccess::DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE, false);
+ pDoc->GetDocumentSettingManager().set(IDocumentSettingAccess::DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE, false);
}
sal_uLong nErr = ERR_SWG_WRITE_ERROR, nVBWarning = ERRCODE_NONE;
@@ -402,8 +403,8 @@ bool SwDocShell::SaveAs( SfxMedium& rMedium )
pView->GetPostItMgr()->UpdateDataOnActiveSidebarWin();
}
- if( pDoc->get(IDocumentSettingAccess::GLOBAL_DOCUMENT) &&
- !pDoc->get(IDocumentSettingAccess::GLOBAL_DOCUMENT_SAVE_LINKS) )
+ if( pDoc->GetDocumentSettingManager().get(IDocumentSettingAccess::GLOBAL_DOCUMENT) &&
+ !pDoc->GetDocumentSettingManager().get(IDocumentSettingAccess::GLOBAL_DOCUMENT_SAVE_LINKS) )
RemoveOLEObjects();
{
@@ -431,17 +432,17 @@ bool SwDocShell::SaveAs( SfxMedium& rMedium )
// #i62875#
// reset compatibility flag <DoNotCaptureDrawObjsOnPage>, if possible
if ( pWrtShell &&
- pDoc->get(IDocumentSettingAccess::DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE) &&
+ pDoc->GetDocumentSettingManager().get(IDocumentSettingAccess::DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE) &&
docfunc::AllDrawObjsOnPage( *pDoc ) )
{
- pDoc->set(IDocumentSettingAccess::DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE, false);
+ pDoc->GetDocumentSettingManager().set(IDocumentSettingAccess::DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE, false);
}
sal_uLong nErr = ERR_SWG_WRITE_ERROR, nVBWarning = ERRCODE_NONE;
uno::Reference < embed::XStorage > xStor = rMedium.GetOutputStorage();
if( SfxObjectShell::SaveAs( rMedium ) )
{
- if( GetDoc()->get(IDocumentSettingAccess::GLOBAL_DOCUMENT) && !ISA( SwGlobalDocShell ) )
+ if( GetDoc()->GetDocumentSettingManager().get(IDocumentSettingAccess::GLOBAL_DOCUMENT) && !ISA( SwGlobalDocShell ) )
{
// This is to set the correct class id if SaveAs is
// called from SwDoc::SplitDoc to save a normal doc as
@@ -607,10 +608,10 @@ bool SwDocShell::ConvertTo( SfxMedium& rMedium )
// #i62875#
// reset compatibility flag <DoNotCaptureDrawObjsOnPage>, if possible
if ( pWrtShell &&
- pDoc->get(IDocumentSettingAccess::DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE) &&
+ pDoc->GetDocumentSettingManager().get(IDocumentSettingAccess::DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE) &&
docfunc::AllDrawObjsOnPage( *pDoc ) )
{
- pDoc->set(IDocumentSettingAccess::DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE, false);
+ pDoc->GetDocumentSettingManager().set(IDocumentSettingAccess::DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE, false);
}
if( xWriter->IsStgWriter() &&
@@ -640,15 +641,15 @@ bool SwDocShell::ConvertTo( SfxMedium& rMedium )
nSaveType = 2;
// Change Flags of the Document accordingly
- bool bIsHTMLModeSave = GetDoc()->get(IDocumentSettingAccess::HTML_MODE);
- bool bIsGlobalDocSave = GetDoc()->get(IDocumentSettingAccess::GLOBAL_DOCUMENT);
- bool bIsGlblDocSaveLinksSave = GetDoc()->get(IDocumentSettingAccess::GLOBAL_DOCUMENT_SAVE_LINKS);
+ bool bIsHTMLModeSave = GetDoc()->GetDocumentSettingManager().get(IDocumentSettingAccess::HTML_MODE);
+ bool bIsGlobalDocSave = GetDoc()->GetDocumentSettingManager().get(IDocumentSettingAccess::GLOBAL_DOCUMENT);
+ bool bIsGlblDocSaveLinksSave = GetDoc()->GetDocumentSettingManager().get(IDocumentSettingAccess::GLOBAL_DOCUMENT_SAVE_LINKS);
if( nMyType != nSaveType )
{
- GetDoc()->set(IDocumentSettingAccess::HTML_MODE, 1 == nSaveType);
- GetDoc()->set(IDocumentSettingAccess::GLOBAL_DOCUMENT, 2 == nSaveType);
+ GetDoc()->GetDocumentSettingManager().set(IDocumentSettingAccess::HTML_MODE, 1 == nSaveType);
+ GetDoc()->GetDocumentSettingManager().set(IDocumentSettingAccess::GLOBAL_DOCUMENT, 2 == nSaveType);
if( 2 != nSaveType )
- GetDoc()->set(IDocumentSettingAccess::GLOBAL_DOCUMENT_SAVE_LINKS, false);
+ GetDoc()->GetDocumentSettingManager().set(IDocumentSettingAccess::GLOBAL_DOCUMENT_SAVE_LINKS, false);
}
// if the target format is storage based, then the output storage must be already created
@@ -673,9 +674,9 @@ bool SwDocShell::ConvertTo( SfxMedium& rMedium )
if( nMyType != nSaveType )
{
- GetDoc()->set(IDocumentSettingAccess::HTML_MODE, bIsHTMLModeSave );
- GetDoc()->set(IDocumentSettingAccess::GLOBAL_DOCUMENT, bIsGlobalDocSave);
- GetDoc()->set(IDocumentSettingAccess::GLOBAL_DOCUMENT_SAVE_LINKS, bIsGlblDocSaveLinksSave);
+ GetDoc()->GetDocumentSettingManager().set(IDocumentSettingAccess::HTML_MODE, bIsHTMLModeSave );
+ GetDoc()->GetDocumentSettingManager().set(IDocumentSettingAccess::GLOBAL_DOCUMENT, bIsGlobalDocSave);
+ GetDoc()->GetDocumentSettingManager().set(IDocumentSettingAccess::GLOBAL_DOCUMENT_SAVE_LINKS, bIsGlblDocSaveLinksSave);
}
return bRet;
@@ -995,7 +996,7 @@ void SwDocShell::GetState(SfxItemSet& rSet)
case SID_BROWSER_MODE:
case FN_PRINT_LAYOUT:
{
- bool bState = GetDoc()->get(IDocumentSettingAccess::BROWSE_MODE);
+ bool bState = GetDoc()->GetDocumentSettingManager().get(IDocumentSettingAccess::BROWSE_MODE);
if(FN_PRINT_LAYOUT == nWhich)
bState = !bState;
rSet.Put( SfxBoolItem( nWhich, bState));