summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/doc/DocumentDrawModelManager.cxx2
-rw-r--r--sw/source/core/doc/textboxhelper.cxx4
-rw-r--r--sw/source/core/draw/drawdoc.cxx20
-rw-r--r--sw/source/ui/dialog/swdlgfact.cxx4
-rw-r--r--sw/source/ui/dialog/swdlgfact.hxx2
-rw-r--r--sw/source/ui/fldui/DateFormFieldDialog.cxx4
-rw-r--r--sw/source/uibase/inc/DateFormFieldDialog.hxx2
-rw-r--r--sw/source/uibase/shells/textsh1.cxx2
8 files changed, 19 insertions, 21 deletions
diff --git a/sw/source/core/doc/DocumentDrawModelManager.cxx b/sw/source/core/doc/DocumentDrawModelManager.cxx
index 57ecf006d278..947a7825ea27 100644
--- a/sw/source/core/doc/DocumentDrawModelManager.cxx
+++ b/sw/source/core/doc/DocumentDrawModelManager.cxx
@@ -77,7 +77,7 @@ void DocumentDrawModelManager::InitDrawModel()
SAL_INFO( "sw.doc", "before create DrawDocument" );
// The document owns the SwDrawModel. We always have two layers and one page.
- mpDrawModel.reset( new SwDrawModel( &m_rDoc ) );
+ mpDrawModel.reset(new SwDrawModel(m_rDoc));
mpDrawModel->EnableUndo( m_rDoc.GetIDocumentUndoRedo().DoesUndo() );
diff --git a/sw/source/core/doc/textboxhelper.cxx b/sw/source/core/doc/textboxhelper.cxx
index b7543049efac..0f095c7ab71c 100644
--- a/sw/source/core/doc/textboxhelper.cxx
+++ b/sw/source/core/doc/textboxhelper.cxx
@@ -223,10 +223,10 @@ sal_Int32 SwTextBoxHelper::getCount(SdrPage const* pPage)
return nRet;
}
-sal_Int32 SwTextBoxHelper::getCount(const SwDoc* pDoc)
+sal_Int32 SwTextBoxHelper::getCount(const SwDoc& rDoc)
{
sal_Int32 nRet = 0;
- const SwFrameFormats& rSpzFrameFormats = *pDoc->GetSpzFrameFormats();
+ const SwFrameFormats& rSpzFrameFormats = *rDoc.GetSpzFrameFormats();
for (const auto pFormat : rSpzFrameFormats)
{
if (isTextBox(pFormat, RES_FLYFRMFMT))
diff --git a/sw/source/core/draw/drawdoc.cxx b/sw/source/core/draw/drawdoc.cxx
index 7fa2bd715970..401c9cf9c980 100644
--- a/sw/source/core/draw/drawdoc.cxx
+++ b/sw/source/core/draw/drawdoc.cxx
@@ -31,21 +31,19 @@
using namespace com::sun::star;
// Constructor
-SwDrawModel::SwDrawModel(SwDoc *const pDoc)
-: FmFormModel(
- &pDoc->GetAttrPool(),
- pDoc->GetDocShell())
- , m_pDoc( pDoc )
+SwDrawModel::SwDrawModel(SwDoc& rDoc)
+ : FmFormModel(&rDoc.GetAttrPool(), rDoc.GetDocShell())
+ , m_rDoc(rDoc)
{
SetScaleUnit( MapUnit::MapTwip );
SetSwapGraphics();
// use common InitDrawModelAndDocShell which will set the associations as needed,
// including SvxColorTableItem with WhichID SID_COLOR_TABLE
- InitDrawModelAndDocShell(m_pDoc->GetDocShell(), this);
+ InitDrawModelAndDocShell(m_rDoc.GetDocShell(), this);
// copy all the default values to the SdrModel
- SfxItemPool* pSdrPool = m_pDoc->GetAttrPool().GetSecondaryPool();
+ SfxItemPool* pSdrPool = m_rDoc.GetAttrPool().GetSecondaryPool();
if( pSdrPool )
{
const sal_uInt16 aWhichRanges[] =
@@ -55,7 +53,7 @@ SwDrawModel::SwDrawModel(SwDoc *const pDoc)
0
};
- SfxItemPool& rDocPool = m_pDoc->GetAttrPool();
+ SfxItemPool& rDocPool = m_rDoc.GetAttrPool();
sal_uInt16 nEdtWhich, nSlotId;
const SfxPoolItem* pItem;
for( const sal_uInt16* pRangeArr = aWhichRanges;
@@ -74,9 +72,9 @@ SwDrawModel::SwDrawModel(SwDoc *const pDoc)
}
}
- SetForbiddenCharsTable(m_pDoc->GetDocumentSettingManager().getForbiddenCharacterTable());
+ SetForbiddenCharsTable(m_rDoc.GetDocumentSettingManager().getForbiddenCharacterTable());
// Implementation for asian compression
- SetCharCompressType( m_pDoc->GetDocumentSettingManager().getCharacterCompressionType() );
+ SetCharCompressType( m_rDoc.GetDocumentSettingManager().getCharacterCompressionType() );
}
// Destructor
@@ -104,7 +102,7 @@ SdrPage* SwDrawModel::AllocPage(bool bMasterPage)
uno::Reference<embed::XStorage> SwDrawModel::GetDocumentStorage() const
{
- return m_pDoc->GetDocStorage();
+ return m_rDoc.GetDocStorage();
}
uno::Reference< uno::XInterface > SwDrawModel::createUnoModel()
diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx
index bd767d220019..4f1b7e3316d0 100644
--- a/sw/source/ui/dialog/swdlgfact.cxx
+++ b/sw/source/ui/dialog/swdlgfact.cxx
@@ -887,9 +887,9 @@ VclPtr<VclAbstractDialog> SwAbstractDialogFactory_Impl::CreateDropDownFormFieldD
return VclPtr<AbstractDropDownFormFieldDialog_Impl>::Create(std::make_unique<sw::DropDownFormFieldDialog>(pParent, pDropDownField));
}
-VclPtr<VclAbstractDialog> SwAbstractDialogFactory_Impl::CreateDateFormFieldDialog(weld::Widget *pParent, sw::mark::IDateFieldmark* pDateField, SwDoc* pDoc)
+VclPtr<VclAbstractDialog> SwAbstractDialogFactory_Impl::CreateDateFormFieldDialog(weld::Widget *pParent, sw::mark::IDateFieldmark* pDateField, SwDoc& rDoc)
{
- return VclPtr<AbstractDateFormFieldDialog_Impl>::Create(std::make_unique<sw::DateFormFieldDialog>(pParent, pDateField, pDoc));
+ return VclPtr<AbstractDateFormFieldDialog_Impl>::Create(std::make_unique<sw::DateFormFieldDialog>(pParent, pDateField, rDoc));
}
VclPtr<SfxAbstractTabDialog> SwAbstractDialogFactory_Impl::CreateSwEnvDlg(weld::Window* pParent, const SfxItemSet& rSet,
diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx
index bd285ff22fa7..4d334f9d61cf 100644
--- a/sw/source/ui/dialog/swdlgfact.hxx
+++ b/sw/source/ui/dialog/swdlgfact.hxx
@@ -674,7 +674,7 @@ public:
virtual VclPtr<AbstractDropDownFieldDialog> CreateDropDownFieldDialog(weld::Widget* pParent, SwWrtShell &rSh,
SwField* pField, bool bPrevButton, bool bNextButton) override;
virtual VclPtr<VclAbstractDialog> CreateDropDownFormFieldDialog(weld::Widget* pParent, sw::mark::IFieldmark* pDropDownField) override;
- virtual VclPtr<VclAbstractDialog> CreateDateFormFieldDialog(weld::Widget* pParent, sw::mark::IDateFieldmark* pDateField, SwDoc* pDoc) override;
+ virtual VclPtr<VclAbstractDialog> CreateDateFormFieldDialog(weld::Widget* pParent, sw::mark::IDateFieldmark* pDateField, SwDoc& rDoc) override;
virtual VclPtr<SfxAbstractTabDialog> CreateSwEnvDlg(weld::Window* pParent, const SfxItemSet& rSet, SwWrtShell* pWrtSh, Printer* pPrt, bool bInsert) override;
virtual VclPtr<AbstractSwLabDlg> CreateSwLabDlg(weld::Window* pParent, const SfxItemSet& rSet,
diff --git a/sw/source/ui/fldui/DateFormFieldDialog.cxx b/sw/source/ui/fldui/DateFormFieldDialog.cxx
index 3739e17ef5b3..25197845fef2 100644
--- a/sw/source/ui/fldui/DateFormFieldDialog.cxx
+++ b/sw/source/ui/fldui/DateFormFieldDialog.cxx
@@ -17,11 +17,11 @@
namespace sw
{
DateFormFieldDialog::DateFormFieldDialog(weld::Widget* pParent,
- sw::mark::IDateFieldmark* pDateField, SwDoc* pDoc)
+ sw::mark::IDateFieldmark* pDateField, SwDoc& rDoc)
: GenericDialogController(pParent, "modules/swriter/ui/dateformfielddialog.ui",
"DateFormFieldDialog")
, m_pDateField(pDateField)
- , m_pNumberFormatter(pDoc->GetNumberFormatter())
+ , m_pNumberFormatter(rDoc.GetNumberFormatter())
, m_xFormatLB(new SwNumFormatTreeView(m_xBuilder->weld_tree_view("date_formats_treeview")))
{
m_xFormatLB->SetFormatType(SvNumFormatType::DATE);
diff --git a/sw/source/uibase/inc/DateFormFieldDialog.hxx b/sw/source/uibase/inc/DateFormFieldDialog.hxx
index fd157af9be34..f56626aac2a9 100644
--- a/sw/source/uibase/inc/DateFormFieldDialog.hxx
+++ b/sw/source/uibase/inc/DateFormFieldDialog.hxx
@@ -35,7 +35,7 @@ private:
void InitControls();
public:
- DateFormFieldDialog(weld::Widget* pParent, sw::mark::IDateFieldmark* pDateField, SwDoc* pDoc);
+ DateFormFieldDialog(weld::Widget* pParent, sw::mark::IDateFieldmark* pDateField, SwDoc& rDoc);
virtual ~DateFormFieldDialog() override;
virtual short run() override
diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx
index 09a0017e3ec3..8944d9c8e5bc 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -1430,7 +1430,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
sw::mark::DateFieldmark& rDateField = dynamic_cast<sw::mark::DateFieldmark&>(*pFieldBM);
- ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateDateFormFieldDialog(rWrtSh.GetView().GetFrameWeld(), &rDateField, GetView().GetDocShell()->GetDoc()));
+ ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateDateFormFieldDialog(rWrtSh.GetView().GetFrameWeld(), &rDateField, *GetView().GetDocShell()->GetDoc()));
if (pDlg->Execute() == RET_OK)
{
rDateField.Invalidate();