summaryrefslogtreecommitdiff
path: root/sw/source/filter/ww1
diff options
context:
space:
mode:
authorValentin Kettner <vakevk+libreoffice@gmail.com>2014-07-24 16:46:12 +0200
committerValentin Kettner <vakevk+libreoffice@gmail.com>2014-08-12 23:26:36 +0200
commit69e5f335abcd838ad6dac04f8e2d14f39856dc43 (patch)
tree19b7e1a929576ec4da8ca981d8aee7a519b119bd /sw/source/filter/ww1
parent274f1811b92b870b8d450423d9b280b0889ca130 (diff)
Refactored IDocumentFieldsAccess out of SwDoc.
Into the new class DocumentFieldsManager. Removed SwDoc::_MakeFldList because it is not defined anywhere. Also moved a few non interface methods that belong to the manager. Change-Id: Icefd7ca7adcbb05a18d6fae0529fc54150b862fd
Diffstat (limited to 'sw/source/filter/ww1')
-rw-r--r--sw/source/filter/ww1/fltshell.cxx11
-rw-r--r--sw/source/filter/ww1/w1filter.cxx9
2 files changed, 11 insertions, 9 deletions
diff --git a/sw/source/filter/ww1/fltshell.cxx b/sw/source/filter/ww1/fltshell.cxx
index 87df0bd8786a..d341ebf71702 100644
--- a/sw/source/filter/ww1/fltshell.cxx
+++ b/sw/source/filter/ww1/fltshell.cxx
@@ -45,6 +45,7 @@
#include <redline.hxx>
#include <pam.hxx>
#include <doc.hxx>
+#include <IDocumentFieldsAccess.hxx>
#include <IDocumentRedlineAccess.hxx>
#include <ndtxt.hxx>
#include <frmatr.hxx>
@@ -557,11 +558,11 @@ void SwFltControlStack::SetAttrInDoc(const SwPosition& rTmpPos,
if (IsFlagSet(BOOK_TO_VAR_REF))
{
- SwFieldType* pFT = pDoc->GetFldType(RES_SETEXPFLD, rName, false);
+ SwFieldType* pFT = pDoc->getIDocumentFieldsAccess().GetFldType(RES_SETEXPFLD, rName, false);
if (!pFT)
{
SwSetExpFieldType aS(pDoc, rName, nsSwGetSetExpType::GSE_STRING);
- pFT = pDoc->InsertFldType(aS);
+ pFT = pDoc->getIDocumentFieldsAccess().InsertFldType(aS);
}
SwSetExpField aFld((SwSetExpFieldType*)pFT, pB->GetValSys());
aFld.SetSubType( nsSwExtendedSubType::SUB_INVISIBLE );
@@ -1153,11 +1154,11 @@ SwFltShell& SwFltShell::operator << ( const sal_Unicode c )
SwFltShell& SwFltShell::AddError( const sal_Char* pErr )
{
OUString aName("ErrorTag");
- SwFieldType* pFT = GetDoc().GetFldType( RES_SETEXPFLD, aName, false );
+ SwFieldType* pFT = GetDoc().getIDocumentFieldsAccess().GetFldType( RES_SETEXPFLD, aName, false );
if( pFT == 0)
{
SwSetExpFieldType aS(&GetDoc(), aName, nsSwGetSetExpType::GSE_STRING);
- pFT = GetDoc().InsertFldType(aS);
+ pFT = GetDoc().getIDocumentFieldsAccess().InsertFldType(aS);
}
SwSetExpField aFld( (SwSetExpFieldType*)pFT,
OUString::createFromAscii( pErr ));
@@ -1335,7 +1336,7 @@ const SfxPoolItem& SwFltShell::GetFlyFrmAttr(sal_uInt16 nWhich)
SwFieldType* SwFltShell::GetSysFldType(sal_uInt16 eWhich)
{
- return GetDoc().GetSysFldType(eWhich);
+ return GetDoc().getIDocumentFieldsAccess().GetSysFldType(eWhich);
}
bool SwFltShell::GetWeightBold()
diff --git a/sw/source/filter/ww1/w1filter.cxx b/sw/source/filter/ww1/w1filter.cxx
index 9bdbe7f0b09a..1ee058754799 100644
--- a/sw/source/filter/ww1/w1filter.cxx
+++ b/sw/source/filter/ww1/w1filter.cxx
@@ -43,6 +43,7 @@
#include <svl/urihelper.hxx>
#include <fmtfsize.hxx>
#include <doc.hxx>
+#include <IDocumentFieldsAccess.hxx>
#include <pam.hxx>
#include <ndtxt.hxx>
#include <pagedesc.hxx>
@@ -628,7 +629,7 @@ oncemore:
if (aName.isEmpty())
break;
aName = rOut.ConvertUStr(aName);
- SwFieldType* pFT = rOut.GetDoc().InsertFldType(
+ SwFieldType* pFT = rOut.GetDoc().getIDocumentFieldsAccess().InsertFldType(
SwSetExpFieldType( &rOut.GetDoc(), aName, nsSwGetSetExpType::GSE_STRING ) );
pField = new SwSetExpField((SwSetExpFieldType*)pFT, aStr);
((SwSetExpField*)pField)->SetSubType( nsSwExtendedSubType::SUB_INVISIBLE );
@@ -817,11 +818,11 @@ oncemore:
{
OUString aName("Ww");
aName += OUString::number( nPlcIndex );
- SwFieldType* pFT = rOut.GetDoc().GetFldType( RES_SETEXPFLD, aName, false);
+ SwFieldType* pFT = rOut.GetDoc().getIDocumentFieldsAccess().GetFldType( RES_SETEXPFLD, aName, false);
if (pFT == 0)
{
SwSetExpFieldType aS(&rOut.GetDoc(), aName, nsSwGetSetExpType::GSE_FORMULA);
- pFT = rOut.GetDoc().InsertFldType(aS);
+ pFT = rOut.GetDoc().getIDocumentFieldsAccess().InsertFldType(aS);
}
SwSetExpField aFld((SwSetExpFieldType*)pFT, sFormula);
aFld.SetSubType(nsSwExtendedSubType::SUB_INVISIBLE);
@@ -883,7 +884,7 @@ oncemore:
if (aName.isEmpty())
break;
- SwFieldType* pFT = rOut.GetDoc().InsertFldType(
+ SwFieldType* pFT = rOut.GetDoc().getIDocumentFieldsAccess().InsertFldType(
SwSetExpFieldType( &rOut.GetDoc(), aName, nsSwGetSetExpType::GSE_STRING ) );
pField = new SwSetExpField((SwSetExpFieldType*)pFT, aStr );
((SwSetExpField*)pField)->SetInputFlag( true );