summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/source/filter/html/htmlbas.cxx6
-rw-r--r--sw/source/filter/html/htmlcss1.cxx4
-rw-r--r--sw/source/filter/html/htmlctxt.cxx4
-rw-r--r--sw/source/filter/html/htmldrawreader.cxx10
-rw-r--r--sw/source/filter/html/htmlfld.cxx18
-rw-r--r--sw/source/filter/html/htmlform.cxx16
-rw-r--r--sw/source/filter/html/htmlftn.cxx10
-rw-r--r--sw/source/filter/html/htmlgrin.cxx34
-rw-r--r--sw/source/filter/html/htmlnumreader.cxx18
-rw-r--r--sw/source/filter/html/htmlplug.cxx32
-rw-r--r--sw/source/filter/html/htmlsect.cxx44
-rw-r--r--sw/source/filter/html/htmltab.cxx42
-rw-r--r--sw/source/filter/html/swhtml.cxx249
-rw-r--r--sw/source/filter/html/swhtml.hxx3
14 files changed, 243 insertions, 247 deletions
diff --git a/sw/source/filter/html/htmlbas.cxx b/sw/source/filter/html/htmlbas.cxx
index 424f0d38f31f..c12203d18c49 100644
--- a/sw/source/filter/html/htmlbas.cxx
+++ b/sw/source/filter/html/htmlbas.cxx
@@ -93,7 +93,7 @@ void SwHTMLParser::EndScript()
if( bInsSrcIntoField && !m_bIgnoreHTMLComments )
{
SwScriptFieldType *pType =
- static_cast<SwScriptFieldType*>(m_pDoc->getIDocumentFieldsAccess().GetSysFieldType( RES_SCRIPTFLD ));
+ static_cast<SwScriptFieldType*>(m_xDoc->getIDocumentFieldsAccess().GetSysFieldType( RES_SCRIPTFLD ));
SwScriptField aField( pType, m_aScriptType,
!m_aScriptURL.isEmpty() ? m_aScriptURL : m_aScriptSource,
@@ -101,7 +101,7 @@ void SwHTMLParser::EndScript()
InsertAttr( SwFormatField( aField ), false );
}
- SwDocShell *pDocSh = m_pDoc->GetDocShell();
+ SwDocShell *pDocSh = m_xDoc->GetDocShell();
if( !m_aScriptSource.isEmpty() && pDocSh &&
bInsIntoBasic && IsNewDoc() )
{
@@ -240,7 +240,7 @@ void SwHTMLParser::InsertBasicDocEvent( const OUString& aEvent, const OUString&
if( rName.isEmpty() )
return;
- SwDocShell *pDocSh = m_pDoc->GetDocShell();
+ SwDocShell *pDocSh = m_xDoc->GetDocShell();
OSL_ENSURE( pDocSh, "Wo ist die DocShell?" );
if( !pDocSh )
return;
diff --git a/sw/source/filter/html/htmlcss1.cxx b/sw/source/filter/html/htmlcss1.cxx
index c5d958538ebe..bc3dece541ca 100644
--- a/sw/source/filter/html/htmlcss1.cxx
+++ b/sw/source/filter/html/htmlcss1.cxx
@@ -1711,8 +1711,8 @@ bool SwHTMLParser::FileDownload( const OUString& rURL,
}
// wurde abgebrochen?
- if( ( m_pDoc->GetDocShell() && m_pDoc->GetDocShell()->IsAbortingImport() )
- || 1 == m_pDoc->getReferenceCount() )
+ if( ( m_xDoc->GetDocShell() && m_xDoc->GetDocShell()->IsAbortingImport() )
+ || 1 == m_xDoc->getReferenceCount() )
{
// wurde der Import vom SFX abgebrochen?
eState = SVPAR_ERROR;
diff --git a/sw/source/filter/html/htmlctxt.cxx b/sw/source/filter/html/htmlctxt.cxx
index afdf468bec81..11ae0fe7f63f 100644
--- a/sw/source/filter/html/htmlctxt.cxx
+++ b/sw/source/filter/html/htmlctxt.cxx
@@ -423,7 +423,7 @@ bool SwHTMLParser::DoPositioning( SfxItemSet &rItemSet,
// - es wurde eine Breite angegeben (in beiden Faellen noetig)
if( SwCSS1Parser::MayBePositioned( rPropInfo ) )
{
- SfxItemSet aFrameItemSet( m_pDoc->GetAttrPool(),
+ SfxItemSet aFrameItemSet( m_xDoc->GetAttrPool(),
RES_FRMATR_BEGIN, RES_FRMATR_END-1 );
if( !IsNewDoc() )
Reader::ResetFrameFormatAttrs(aFrameItemSet );
@@ -462,7 +462,7 @@ bool SwHTMLParser::CreateContainer( const OUString& rClass,
SwCSS1Parser::MayBePositioned( rPropInfo ) )
{
// Container-Klasse
- SfxItemSet *pFrameItemSet = pContext->GetFrameItemSet( m_pDoc );
+ SfxItemSet *pFrameItemSet = pContext->GetFrameItemSet( m_xDoc.get() );
if( !IsNewDoc() )
Reader::ResetFrameFormatAttrs( *pFrameItemSet );
diff --git a/sw/source/filter/html/htmldrawreader.cxx b/sw/source/filter/html/htmldrawreader.cxx
index 7a25f7a44fa7..a98ebf101369 100644
--- a/sw/source/filter/html/htmldrawreader.cxx
+++ b/sw/source/filter/html/htmldrawreader.cxx
@@ -80,9 +80,9 @@ void SwHTMLParser::InsertDrawObject( SdrObject* pNewDrawObj,
// always on top of text.
// but in invisible layer. <ConnectToLayout> will move the object
// to the visible layer.
- pNewDrawObj->SetLayer( m_pDoc->getIDocumentDrawModelAccess().GetInvisibleHeavenId() );
+ pNewDrawObj->SetLayer( m_xDoc->getIDocumentDrawModelAccess().GetInvisibleHeavenId() );
- SfxItemSet aFrameSet( m_pDoc->GetAttrPool(),
+ SfxItemSet aFrameSet( m_xDoc->GetAttrPool(),
RES_FRMATR_BEGIN, RES_FRMATR_END-1 );
if( !IsNewDoc() )
Reader::ResetFrameFormatAttrs( aFrameSet );
@@ -198,7 +198,7 @@ void SwHTMLParser::InsertDrawObject( SdrObject* pNewDrawObj,
}
aFrameSet.Put( aAnchor );
- m_pDoc->getIDocumentContentOperations().InsertDrawObj( *m_pPam, *pNewDrawObj, aFrameSet );
+ m_xDoc->getIDocumentContentOperations().InsertDrawObj( *m_pPam, *pNewDrawObj, aFrameSet );
}
static void PutEEPoolItem( SfxItemSet &rEEItemSet,
@@ -356,7 +356,7 @@ void SwHTMLParser::NewMarquee( HTMLTable *pCurTable )
// Ein DrawTextobj anlegen
// #i52858# - method name changed
- SwDrawModel* pModel = m_pDoc->getIDocumentDrawModelAccess().GetOrCreateDrawModel();
+ SwDrawModel* pModel = m_xDoc->getIDocumentDrawModelAccess().GetOrCreateDrawModel();
SdrPage* pPg = pModel->GetPage( 0 );
m_pMarquee = SdrObjFactory::MakeNewObject( SdrInventor::Default,
OBJ_TEXT, pPg, pModel );
@@ -444,7 +444,7 @@ void SwHTMLParser::NewMarquee( HTMLTable *pCurTable )
// Styles parsen (funktioniert hier nur fuer Attribute, die auch
// am Zeichen-Objekt gesetzt werden koennen)
- SfxItemSet aStyleItemSet( m_pDoc->GetAttrPool(),
+ SfxItemSet aStyleItemSet( m_xDoc->GetAttrPool(),
m_pCSS1Parser->GetWhichMap() );
SvxCSS1PropertyInfo aPropInfo;
if( HasStyleOptions( aStyle, aId, aClass ) &&
diff --git a/sw/source/filter/html/htmlfld.cxx b/sw/source/filter/html/htmlfld.cxx
index 15e3d4b3f273..089a307663df 100644
--- a/sw/source/filter/html/htmlfld.cxx
+++ b/sw/source/filter/html/htmlfld.cxx
@@ -264,7 +264,7 @@ void SwHTMLParser::NewField()
{
SvtUserOptions aOpt;
const OUString& rUser = aOpt.GetFullName();
- SwDocShell *pDocShell(m_pDoc->GetDocShell());
+ SwDocShell *pDocShell(m_xDoc->GetDocShell());
OSL_ENSURE(pDocShell, "no SwDocShell");
if (pDocShell) {
uno::Reference<document::XDocumentPropertiesSupplier> xDPS(
@@ -284,7 +284,7 @@ void SwHTMLParser::NewField()
if( RES_DATEFLD==nType || RES_TIMEFLD==nType )
nWhich = RES_DATETIMEFLD;
- SwFieldType* pType = m_pDoc->getIDocumentFieldsAccess().GetSysFieldType( nWhich );
+ SwFieldType* pType = m_xDoc->getIDocumentFieldsAccess().GetSysFieldType( nWhich );
SwField *pNewField = nullptr;
bool bInsOnEndTag = false;
@@ -347,7 +347,7 @@ void SwHTMLParser::NewField()
if( !aValue.isEmpty() )
nSub |= FIXEDFLD;
- SvNumberFormatter *pFormatter = m_pDoc->GetNumberFormatter();
+ SvNumberFormatter *pFormatter = m_xDoc->GetNumberFormatter();
if( pFormatOption )
{
const OUString& rFormat = pFormatOption->GetString();
@@ -378,12 +378,12 @@ void SwHTMLParser::NewField()
{
sal_uInt16 nSub = 0;
- SvNumberFormatter *pFormatter = m_pDoc->GetNumberFormatter();
+ SvNumberFormatter *pFormatter = m_xDoc->GetNumberFormatter();
sal_uInt32 nNumFormat;
LanguageType eLang;
double dValue = GetTableDataOptionsValNum(
nNumFormat, eLang, aNumValue, aNumFormat,
- *m_pDoc->GetNumberFormatter() );
+ *m_xDoc->GetNumberFormatter() );
short nFormatType = pFormatter->GetType( nNumFormat );
switch( nFormatType )
{
@@ -456,7 +456,7 @@ void SwHTMLParser::NewField()
LanguageType eLang;
dValue = GetTableDataOptionsValNum(
nNumFormat, eLang, aNumValue, aNumFormat,
- *m_pDoc->GetNumberFormatter() );
+ *m_xDoc->GetNumberFormatter() );
bFixed &= bHasNumValue;
}
else
@@ -524,7 +524,7 @@ void SwHTMLParser::NewField()
}
else
{
- m_pDoc->getIDocumentContentOperations().InsertPoolItem(*m_pPam, SwFormatField(*pNewField));
+ m_xDoc->getIDocumentContentOperations().InsertPoolItem(*m_pPam, SwFormatField(*pNewField));
delete pNewField;
}
m_bInField = true;
@@ -562,7 +562,7 @@ void SwHTMLParser::EndField()
break;
}
- m_pDoc->getIDocumentContentOperations().InsertPoolItem( *m_pPam, SwFormatField(*m_pField) );
+ m_xDoc->getIDocumentContentOperations().InsertPoolItem( *m_pPam, SwFormatField(*m_pField) );
delete m_pField;
m_pField = nullptr;
}
@@ -636,7 +636,7 @@ void SwHTMLParser::InsertComment( const OUString& rComment, const sal_Char *pTag
}
SwPostItField aPostItField(
- static_cast<SwPostItFieldType*>(m_pDoc->getIDocumentFieldsAccess().GetSysFieldType( RES_POSTITFLD )),
+ static_cast<SwPostItFieldType*>(m_xDoc->getIDocumentFieldsAccess().GetSysFieldType( RES_POSTITFLD )),
aEmptyOUStr, aComment, aEmptyOUStr, aEmptyOUStr, DateTime( DateTime::SYSTEM ) );
InsertAttr( SwFormatField( aPostItField ), false );
diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx
index 9160240dd896..f5d425bb4afb 100644
--- a/sw/source/filter/html/htmlform.cxx
+++ b/sw/source/filter/html/htmlform.cxx
@@ -641,13 +641,13 @@ void SwHTMLParser::SetControlSize( const uno::Reference< drawing::XShape >& rSha
// das auch vom SwXShape implementiert wird.
uno::Reference< beans::XPropertySet > xPropSet( rShape, UNO_QUERY );
- SwViewShell *pVSh = m_pDoc->getIDocumentLayoutAccess().GetCurrentViewShell();
+ SwViewShell *pVSh = m_xDoc->getIDocumentLayoutAccess().GetCurrentViewShell();
if( !pVSh && !m_nEventId )
{
// If there is no view shell by now and the doc shell is an internal
// one, no view shell will be created. That for, we have to do that of
// our own. This happens if a linked section is inserted or refreshed.
- SwDocShell *pDocSh = m_pDoc->GetDocShell();
+ SwDocShell *pDocSh = m_xDoc->GetDocShell();
if( pDocSh )
{
if ( pDocSh->GetMedium() )
@@ -659,9 +659,9 @@ void SwHTMLParser::SetControlSize( const uno::Reference< drawing::XShape >& rSha
m_pTempViewFrame = SfxViewFrame::LoadHiddenDocument( *pDocSh, 0 );
CallStartAction();
- pVSh = m_pDoc->getIDocumentLayoutAccess().GetCurrentViewShell();
+ pVSh = m_xDoc->getIDocumentLayoutAccess().GetCurrentViewShell();
// this ridiculous hack also enables Undo, so turn it off again
- m_pDoc->GetIDocumentUndoRedo().DoUndo(false);
+ m_xDoc->GetIDocumentUndoRedo().DoUndo(false);
}
}
@@ -1236,7 +1236,7 @@ void SwHTMLParser::NewForm( bool bAppend )
}
if( !m_pFormImpl )
- m_pFormImpl = new SwHTMLForm_Impl( m_pDoc->GetDocShell() );
+ m_pFormImpl = new SwHTMLForm_Impl( m_xDoc->GetDocShell() );
OUString aAction( m_sBaseURL );
OUString sName, sTarget;
@@ -1784,7 +1784,7 @@ void SwHTMLParser::InsertInput()
}
}
- SfxItemSet aCSS1ItemSet( m_pDoc->GetAttrPool(), m_pCSS1Parser->GetWhichMap() );
+ SfxItemSet aCSS1ItemSet( m_xDoc->GetAttrPool(), m_pCSS1Parser->GetWhichMap() );
SvxCSS1PropertyInfo aCSS1PropInfo;
if( HasStyleOptions( aStyle, aId, aClass ) )
{
@@ -2047,7 +2047,7 @@ void SwHTMLParser::NewTextArea()
Size aTextSz( nCols, nRows );
- SfxItemSet aCSS1ItemSet( m_pDoc->GetAttrPool(), m_pCSS1Parser->GetWhichMap() );
+ SfxItemSet aCSS1ItemSet( m_xDoc->GetAttrPool(), m_pCSS1Parser->GetWhichMap() );
SvxCSS1PropertyInfo aCSS1PropInfo;
if( HasStyleOptions( aStyle, aId, aClass ) )
{
@@ -2315,7 +2315,7 @@ void SwHTMLParser::NewSelect()
bMinHeight = false;
}
- SfxItemSet aCSS1ItemSet( m_pDoc->GetAttrPool(), m_pCSS1Parser->GetWhichMap() );
+ SfxItemSet aCSS1ItemSet( m_xDoc->GetAttrPool(), m_pCSS1Parser->GetWhichMap() );
SvxCSS1PropertyInfo aCSS1PropInfo;
if( HasStyleOptions( aStyle, aId, aClass ) )
{
diff --git a/sw/source/filter/html/htmlftn.cxx b/sw/source/filter/html/htmlftn.cxx
index f6a8d0251050..ce51c08dfb3a 100644
--- a/sw/source/filter/html/htmlftn.cxx
+++ b/sw/source/filter/html/htmlftn.cxx
@@ -123,14 +123,14 @@ sal_Int32 lcl_html_getEndNoteInfo( SwEndNoteInfo& rInfo,
void SwHTMLParser::FillEndNoteInfo( const OUString& rContent )
{
- SwEndNoteInfo aInfo( m_pDoc->GetEndNoteInfo() );
+ SwEndNoteInfo aInfo( m_xDoc->GetEndNoteInfo() );
lcl_html_getEndNoteInfo( aInfo, rContent, true );
- m_pDoc->SetEndNoteInfo( aInfo );
+ m_xDoc->SetEndNoteInfo( aInfo );
}
void SwHTMLParser::FillFootNoteInfo( const OUString& rContent )
{
- SwFootnoteInfo aInfo( m_pDoc->GetFootnoteInfo() );
+ SwFootnoteInfo aInfo( m_xDoc->GetFootnoteInfo() );
sal_Int32 nStrPos = lcl_html_getEndNoteInfo( aInfo, rContent, false );
@@ -177,7 +177,7 @@ void SwHTMLParser::FillFootNoteInfo( const OUString& rContent )
}
}
- m_pDoc->SetFootnoteInfo( aInfo );
+ m_xDoc->SetFootnoteInfo( aInfo );
}
void SwHTMLParser::InsertFootEndNote( const OUString& rName, bool bEndNote,
@@ -204,7 +204,7 @@ void SwHTMLParser::FinishFootEndNote()
if( m_pFootEndNoteImpl->bFixed )
aFootnote.SetNumStr( m_pFootEndNoteImpl->sContent );
- m_pDoc->getIDocumentContentOperations().InsertPoolItem( *m_pPam, aFootnote );
+ m_xDoc->getIDocumentContentOperations().InsertPoolItem( *m_pPam, aFootnote );
SwTextFootnote * const pTextFootnote = static_cast<SwTextFootnote *>(
m_pPam->GetNode().GetTextNode()->GetTextAttrForCharAt(
m_pPam->GetPoint()->nContent.GetIndex() - 1, RES_TXTATR_FTN ) );
diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx
index 72078ba85754..c470b691cab7 100644
--- a/sw/source/filter/html/htmlgrin.cxx
+++ b/sw/source/filter/html/htmlgrin.cxx
@@ -110,7 +110,7 @@ ImageMap *SwHTMLParser::FindImageMap( const OUString& rName ) const
void SwHTMLParser::ConnectImageMaps()
{
- SwNodes& rNds = m_pDoc->GetNodes();
+ SwNodes& rNds = m_xDoc->GetNodes();
// auf den Start-Node der 1. Section
sal_uLong nIdx = rNds.GetEndOfAutotext().StartOfSectionIndex() + 1;
sal_uLong nEndIdx = rNds.GetEndOfAutotext().GetIndex();
@@ -291,7 +291,7 @@ void SwHTMLParser::RegisterFlyFrame( SwFrameFormat *pFlyFormat )
void SwHTMLParser::GetDefaultScriptType( ScriptType& rType,
OUString& rTypeStr ) const
{
- SwDocShell *pDocSh = m_pDoc->GetDocShell();
+ SwDocShell *pDocSh = m_xDoc->GetDocShell();
SvKeyValueIterator* pHeaderAttrs = pDocSh ? pDocSh->GetHeaderAttributes()
: nullptr;
rType = GetScriptType( pHeaderAttrs );
@@ -489,12 +489,12 @@ IMAGE_SETEVENT:
nHeight = aPixelSize.Height();
}
- SfxItemSet aItemSet( m_pDoc->GetAttrPool(), m_pCSS1Parser->GetWhichMap() );
+ SfxItemSet aItemSet( m_xDoc->GetAttrPool(), m_pCSS1Parser->GetWhichMap() );
SvxCSS1PropertyInfo aPropInfo;
if( HasStyleOptions( aStyle, aId, aClass ) )
ParseStyleOptions( aStyle, aId, aClass, aItemSet, aPropInfo );
- SfxItemSet aFrameSet( m_pDoc->GetAttrPool(),
+ SfxItemSet aFrameSet( m_xDoc->GetAttrPool(),
RES_FRMATR_BEGIN, RES_FRMATR_END-1 );
if( !IsNewDoc() )
Reader::ResetFrameFormatAttrs( aFrameSet );
@@ -516,7 +516,7 @@ IMAGE_SETEVENT:
static_cast<const SwFormatINetFormat&>(m_aAttrTab.pINetFormat->GetItem()).GetValue();
m_pCSS1Parser->SetATagStyles();
- sal_uInt16 nPoolId = static_cast< sal_uInt16 >(m_pDoc->IsVisitedURL( rURL )
+ sal_uInt16 nPoolId = static_cast< sal_uInt16 >(m_xDoc->IsVisitedURL( rURL )
? RES_POOLCHR_INET_VISIT
: RES_POOLCHR_INET_NORMAL);
const SwCharFormat *pCharFormat = m_pCSS1Parser->GetCharFormatFromPool( nPoolId );
@@ -527,7 +527,7 @@ IMAGE_SETEVENT:
{
const SvxColorItem& rColorItem = m_aAttrTab.pFontColor ?
static_cast<const SvxColorItem &>(m_aAttrTab.pFontColor->GetItem()) :
- static_cast<const SvxColorItem &>(m_pDoc->GetDefault(RES_CHRATR_COLOR));
+ static_cast<const SvxColorItem &>(m_xDoc->GetDefault(RES_CHRATR_COLOR));
aHBorderLine.SetColor( rColorItem.GetValue() );
aVBorderLine.SetColor( aHBorderLine.GetColor() );
}
@@ -723,9 +723,9 @@ IMAGE_SETEVENT:
aFrameSet.Put( aFrameSize );
// passing empty sGrfNm here, means we don't want the graphic to be linked
- SwFrameFormat *pFlyFormat = m_pDoc->getIDocumentContentOperations().Insert( *m_pPam, sGrfNm, aEmptyOUStr, &aGraphic,
+ SwFrameFormat *pFlyFormat = m_xDoc->getIDocumentContentOperations().Insert( *m_pPam, sGrfNm, aEmptyOUStr, &aGraphic,
&aFrameSet, nullptr, nullptr );
- SwGrfNode *pGrfNd = m_pDoc->GetNodes()[ pFlyFormat->GetContent().GetContentIdx()
+ SwGrfNode *pGrfNd = m_xDoc->GetNodes()[ pFlyFormat->GetContent().GetContentIdx()
->GetIndex()+1 ]->GetGrfNode();
if( !sHTMLGrfName.isEmpty() )
@@ -827,7 +827,7 @@ IMAGE_SETEVENT:
void SwHTMLParser::InsertBodyOptions()
{
- m_pDoc->SetTextFormatColl( *m_pPam,
+ m_xDoc->SetTextFormatColl( *m_pPam,
m_pCSS1Parser->GetTextCollFromPool( RES_POOLCOLL_TEXT ) );
OUString aBackGround, aId, aStyle, aLang, aDir;
@@ -971,7 +971,7 @@ void SwHTMLParser::InsertBodyOptions()
if( !aStyle.isEmpty() || !aDir.isEmpty() )
{
- SfxItemSet aItemSet( m_pDoc->GetAttrPool(), m_pCSS1Parser->GetWhichMap() );
+ SfxItemSet aItemSet( m_xDoc->GetAttrPool(), m_pCSS1Parser->GetWhichMap() );
SvxCSS1PropertyInfo aPropInfo;
OUString aDummy;
ParseStyleOptions( aStyle, aDummy, aDummy, aItemSet, aPropInfo, nullptr, &aDir );
@@ -1046,7 +1046,7 @@ void SwHTMLParser::InsertBodyOptions()
{
SvxLanguageItem aLanguage( eLang, nWhich );
aLanguage.SetWhich( nWhich );
- m_pDoc->SetDefault( aLanguage );
+ m_xDoc->SetDefault( aLanguage );
}
}
}
@@ -1209,7 +1209,7 @@ ANCHOR_SETEVENT:
// Styles parsen
if( HasStyleOptions( aStyle, aId, aStrippedClass, &aLang, &aDir ) )
{
- SfxItemSet aItemSet( m_pDoc->GetAttrPool(), m_pCSS1Parser->GetWhichMap() );
+ SfxItemSet aItemSet( m_xDoc->GetAttrPool(), m_pCSS1Parser->GetWhichMap() );
SvxCSS1PropertyInfo aPropInfo;
if( ParseStyleOptions( aStyle, aId, aClass, aItemSet, aPropInfo, &aLang, &aDir ) )
@@ -1310,7 +1310,7 @@ bool SwHTMLParser::HasCurrentParaBookmarks( bool bIgnoreStack ) const
if( !bHasMarks )
{
// second step: when we didn't find a bookmark, check if there is one set already
- IDocumentMarkAccess* const pMarkAccess = m_pDoc->getIDocumentMarkAccess();
+ IDocumentMarkAccess* const pMarkAccess = m_xDoc->getIDocumentMarkAccess();
for(IDocumentMarkAccess::const_iterator_t ppMark = pMarkAccess->getAllMarksBegin();
ppMark != pMarkAccess->getAllMarksEnd();
++ppMark)
@@ -1345,7 +1345,7 @@ void SwHTMLParser::StripTrailingPara()
{
sal_uLong nNodeIdx = m_pPam->GetPoint()->nNode.GetIndex();
- const SwFrameFormats& rFrameFormatTable = *m_pDoc->GetSpzFrameFormats();
+ const SwFrameFormats& rFrameFormatTable = *m_xDoc->GetSpzFrameFormats();
for( auto pFormat : rFrameFormatTable )
{
@@ -1368,7 +1368,7 @@ void SwHTMLParser::StripTrailingPara()
{
// es wurden Felder in den Node eingefuegt, die muessen
// wir jetzt verschieben
- SwTextNode *pPrvNd = m_pDoc->GetNodes()[nNodeIdx-1]->GetTextNode();
+ SwTextNode *pPrvNd = m_xDoc->GetNodes()[nNodeIdx-1]->GetTextNode();
if( pPrvNd )
{
SwIndex aSrc( pCNd, 0 );
@@ -1377,7 +1377,7 @@ void SwHTMLParser::StripTrailingPara()
}
// jetz muessen wir noch eventuell vorhandene Bookmarks verschieben
- IDocumentMarkAccess* const pMarkAccess = m_pDoc->getIDocumentMarkAccess();
+ IDocumentMarkAccess* const pMarkAccess = m_xDoc->getIDocumentMarkAccess();
for(IDocumentMarkAccess::const_iterator_t ppMark = pMarkAccess->getAllMarksBegin();
ppMark != pMarkAccess->getAllMarksEnd();
++ppMark)
@@ -1410,7 +1410,7 @@ void SwHTMLParser::StripTrailingPara()
m_pPam->GetPoint()->nContent.Assign( nullptr, 0 );
m_pPam->SetMark();
m_pPam->DeleteMark();
- m_pDoc->GetNodes().Delete( m_pPam->GetPoint()->nNode );
+ m_xDoc->GetNodes().Delete( m_pPam->GetPoint()->nNode );
m_pPam->Move( fnMoveBackward, GoInNode );
}
else if( pCNd && pCNd->IsTextNode() && m_pTable )
diff --git a/sw/source/filter/html/htmlnumreader.cxx b/sw/source/filter/html/htmlnumreader.cxx
index 5140ac2d8097..1b2eb290bb65 100644
--- a/sw/source/filter/html/htmlnumreader.cxx
+++ b/sw/source/filter/html/htmlnumreader.cxx
@@ -71,8 +71,8 @@ void SwHTMLParser::NewNumBulList( int nToken )
// ggf. ein Regelwerk anlegen
if( !rInfo.GetNumRule() )
{
- sal_uInt16 nPos = m_pDoc->MakeNumRule( m_pDoc->GetUniqueNumRuleName() );
- rInfo.SetNumRule( m_pDoc->GetNumRuleTable()[nPos] );
+ sal_uInt16 nPos = m_xDoc->MakeNumRule( m_xDoc->GetUniqueNumRuleName() );
+ rInfo.SetNumRule( m_xDoc->GetNumRuleTable()[nPos] );
}
// das Format anpassen, falls es fuer den Level noch nicht
@@ -261,7 +261,7 @@ void SwHTMLParser::NewNumBulList( int nToken )
// Styles parsen
if( HasStyleOptions( aStyle, aId, aClass, &aLang, &aDir ) )
{
- SfxItemSet aItemSet( m_pDoc->GetAttrPool(), m_pCSS1Parser->GetWhichMap() );
+ SfxItemSet aItemSet( m_xDoc->GetAttrPool(), m_pCSS1Parser->GetWhichMap() );
SvxCSS1PropertyInfo aPropInfo;
if( ParseStyleOptions( aStyle, aId, aClass, aItemSet, aPropInfo, &aLang, &aDir ) )
@@ -305,7 +305,7 @@ void SwHTMLParser::NewNumBulList( int nToken )
if( bChangeNumFormat )
{
rInfo.GetNumRule()->Set( nLevel, aNumFormat );
- m_pDoc->ChgNumRuleFormats( *rInfo.GetNumRule() );
+ m_xDoc->ChgNumRuleFormats( *rInfo.GetNumRule() );
bChangeNumFormat = false;
}
@@ -318,7 +318,7 @@ void SwHTMLParser::NewNumBulList( int nToken )
if( bChangeNumFormat )
{
rInfo.GetNumRule()->Set( nLevel, aNumFormat );
- m_pDoc->ChgNumRuleFormats( *rInfo.GetNumRule() );
+ m_xDoc->ChgNumRuleFormats( *rInfo.GetNumRule() );
}
PushContext( pCntxt );
@@ -394,7 +394,7 @@ void SwHTMLParser::EndNumBulList( int nToken )
}
}
if( bChanged )
- m_pDoc->ChgNumRuleFormats( *rInfo.GetNumRule() );
+ m_xDoc->ChgNumRuleFormats( *rInfo.GetNumRule() );
// Beim letzen Append wurde das NumRule-Item und das
// NodeNum-Objekt mit kopiert. Beides muessen wir noch
@@ -480,7 +480,7 @@ void SwHTMLParser::NewNumBulListItem( int nToken )
}
else
{
- aNumRuleName = m_pDoc->GetUniqueNumRuleName();
+ aNumRuleName = m_xDoc->GetUniqueNumRuleName();
SwNumRule aNumRule( aNumRuleName,
SvxNumberFormat::LABEL_WIDTH_AND_POSITION );
SwNumFormat aNumFormat( aNumRule.Get( 0 ) );
@@ -495,7 +495,7 @@ void SwHTMLParser::NewNumBulListItem( int nToken )
aNumFormat.SetFirstLineOffset( HTML_NUMBUL_INDENT );
aNumRule.Set( 0, aNumFormat );
- m_pDoc->MakeNumRule( aNumRuleName, &aNumRule );
+ m_xDoc->MakeNumRule( aNumRuleName, &aNumRule );
OSL_ENSURE( !m_nOpenParaToken,
"Jetzt geht ein offenes Absatz-Element verloren" );
@@ -531,7 +531,7 @@ void SwHTMLParser::NewNumBulListItem( int nToken )
// Styles parsen
if( HasStyleOptions( aStyle, aId, aClass, &aLang, &aDir ) )
{
- SfxItemSet aItemSet( m_pDoc->GetAttrPool(), m_pCSS1Parser->GetWhichMap() );
+ SfxItemSet aItemSet( m_xDoc->GetAttrPool(), m_pCSS1Parser->GetWhichMap() );
SvxCSS1PropertyInfo aPropInfo;
if( ParseStyleOptions( aStyle, aId, aClass, aItemSet, aPropInfo, &aLang, &aDir ) )
diff --git a/sw/source/filter/html/htmlplug.cxx b/sw/source/filter/html/htmlplug.cxx
index ef67ba07632b..cfd6ec670349 100644
--- a/sw/source/filter/html/htmlplug.cxx
+++ b/sw/source/filter/html/htmlplug.cxx
@@ -373,7 +373,7 @@ void SwHTMLParser::InsertEmbed()
aCmdLst.Append( rOption.GetTokenString(), rOption.GetString() );
}
- SfxItemSet aItemSet( m_pDoc->GetAttrPool(), m_pCSS1Parser->GetWhichMap() );
+ SfxItemSet aItemSet( m_xDoc->GetAttrPool(), m_pCSS1Parser->GetWhichMap() );
SvxCSS1PropertyInfo aPropInfo;
if( HasStyleOptions( aStyle, aId, aClass ) )
ParseStyleOptions( aStyle, aId, aClass, aItemSet, aPropInfo );
@@ -430,7 +430,7 @@ void SwHTMLParser::InsertEmbed()
}
}
- SfxItemSet aFrameSet( m_pDoc->GetAttrPool(),
+ SfxItemSet aFrameSet( m_xDoc->GetAttrPool(),
RES_FRMATR_BEGIN, RES_FRMATR_END-1 );
if( !IsNewDoc() )
Reader::ResetFrameFormatAttrs( aFrameSet );
@@ -458,7 +458,7 @@ void SwHTMLParser::InsertEmbed()
// und in das Dok einfuegen
SwFrameFormat* pFlyFormat =
- m_pDoc->getIDocumentContentOperations().Insert( *m_pPam, ::svt::EmbeddedObjectRef( xObj, embed::Aspects::MSOLE_CONTENT ), &aFrameSet );
+ m_xDoc->getIDocumentContentOperations().Insert( *m_pPam, ::svt::EmbeddedObjectRef( xObj, embed::Aspects::MSOLE_CONTENT ), &aFrameSet );
// Namen am FrameFormat setzen
if( !aName.isEmpty() )
@@ -466,7 +466,7 @@ void SwHTMLParser::InsertEmbed()
// den alternativen Text setzen
SwNoTextNode *pNoTextNd =
- m_pDoc->GetNodes()[ pFlyFormat->GetContent().GetContentIdx()
+ m_xDoc->GetNodes()[ pFlyFormat->GetContent().GetContentIdx()
->GetIndex()+1 ]->GetNoTextNode();
pNoTextNd->SetTitle( aAlt );
@@ -494,7 +494,7 @@ void SwHTMLParser::NewObject()
bDeclare = false;
// Eine neue Command-List anlegen
delete m_pAppletImpl;
- m_pAppletImpl = new SwApplet_Impl( m_pDoc->GetAttrPool() );
+ m_pAppletImpl = new SwApplet_Impl( m_xDoc->GetAttrPool() );
const HTMLOptions& rHTMLOptions = GetOptions();
for (size_t i = rHTMLOptions.size(); i; )
@@ -598,7 +598,7 @@ void SwHTMLParser::NewObject()
m_pAppletImpl->SetAltText( aStandBy );
- SfxItemSet aItemSet( m_pDoc->GetAttrPool(), m_pCSS1Parser->GetWhichMap() );
+ SfxItemSet aItemSet( m_xDoc->GetAttrPool(), m_pCSS1Parser->GetWhichMap() );
SvxCSS1PropertyInfo aPropInfo;
if( HasStyleOptions( aStyle, aId, aClass ) )
ParseStyleOptions( aStyle, aId, aClass, aItemSet, aPropInfo );
@@ -629,13 +629,13 @@ void SwHTMLParser::EndObject()
// und in das Dok einfuegen
SwFrameFormat* pFlyFormat =
- m_pDoc->getIDocumentContentOperations().Insert( *m_pPam,
+ m_xDoc->getIDocumentContentOperations().Insert( *m_pPam,
::svt::EmbeddedObjectRef( m_pAppletImpl->GetApplet(), embed::Aspects::MSOLE_CONTENT ),
&m_pAppletImpl->GetItemSet() );
// den alternativen Namen setzen
SwNoTextNode *pNoTextNd =
- m_pDoc->GetNodes()[ pFlyFormat->GetContent().GetContentIdx()
+ m_xDoc->GetNodes()[ pFlyFormat->GetContent().GetContentIdx()
->GetIndex()+1 ]->GetNoTextNode();
pNoTextNd->SetTitle( m_pAppletImpl->GetAltText() );
@@ -662,7 +662,7 @@ void SwHTMLParser::InsertApplet()
// Eine neue Command-List anlegen
delete m_pAppletImpl;
- m_pAppletImpl = new SwApplet_Impl( m_pDoc->GetAttrPool() );
+ m_pAppletImpl = new SwApplet_Impl( m_xDoc->GetAttrPool() );
const HTMLOptions& rHTMLOptions = GetOptions();
for (size_t i = rHTMLOptions.size(); i; )
@@ -731,7 +731,7 @@ void SwHTMLParser::InsertApplet()
m_pAppletImpl->CreateApplet( aCode, aName, bMayScript, aCodeBase, m_sBaseURL );//, aAlt );
m_pAppletImpl->SetAltText( aAlt );
- SfxItemSet aItemSet( m_pDoc->GetAttrPool(), m_pCSS1Parser->GetWhichMap() );
+ SfxItemSet aItemSet( m_xDoc->GetAttrPool(), m_pCSS1Parser->GetWhichMap() );
SvxCSS1PropertyInfo aPropInfo;
if( HasStyleOptions( aStyle, aId, aClass ) )
ParseStyleOptions( aStyle, aId, aClass, aItemSet, aPropInfo );
@@ -761,13 +761,13 @@ void SwHTMLParser::EndApplet()
// und in das Dok einfuegen
SwFrameFormat* pFlyFormat =
- m_pDoc->getIDocumentContentOperations().Insert( *m_pPam,
+ m_xDoc->getIDocumentContentOperations().Insert( *m_pPam,
::svt::EmbeddedObjectRef( m_pAppletImpl->GetApplet(), embed::Aspects::MSOLE_CONTENT ),
&m_pAppletImpl->GetItemSet());
// den alternativen Namen setzen
SwNoTextNode *pNoTextNd =
- m_pDoc->GetNodes()[ pFlyFormat->GetContent().GetContentIdx()
+ m_xDoc->GetNodes()[ pFlyFormat->GetContent().GetContentIdx()
->GetIndex()+1 ]->GetNoTextNode();
pNoTextNd->SetTitle( m_pAppletImpl->GetAltText() );
@@ -910,13 +910,13 @@ void SwHTMLParser::InsertFloatingFrame()
{
}
- SfxItemSet aItemSet( m_pDoc->GetAttrPool(), m_pCSS1Parser->GetWhichMap() );
+ SfxItemSet aItemSet( m_xDoc->GetAttrPool(), m_pCSS1Parser->GetWhichMap() );
SvxCSS1PropertyInfo aPropInfo;
if( HasStyleOptions( aStyle, aId, aClass ) )
ParseStyleOptions( aStyle, aId, aClass, aItemSet, aPropInfo );
// den Itemset holen
- SfxItemSet aFrameSet( m_pDoc->GetAttrPool(),
+ SfxItemSet aFrameSet( m_xDoc->GetAttrPool(),
RES_FRMATR_BEGIN, RES_FRMATR_END-1 );
if( !IsNewDoc() )
Reader::ResetFrameFormatAttrs( aFrameSet );
@@ -932,11 +932,11 @@ void SwHTMLParser::InsertFloatingFrame()
// und in das Dok einfuegen
SwFrameFormat* pFlyFormat =
- m_pDoc->getIDocumentContentOperations().Insert( *m_pPam, ::svt::EmbeddedObjectRef( xObj, embed::Aspects::MSOLE_CONTENT ), &aFrameSet );
+ m_xDoc->getIDocumentContentOperations().Insert( *m_pPam, ::svt::EmbeddedObjectRef( xObj, embed::Aspects::MSOLE_CONTENT ), &aFrameSet );
// den alternativen Namen setzen
SwNoTextNode *pNoTextNd =
- m_pDoc->GetNodes()[ pFlyFormat->GetContent().GetContentIdx()
+ m_xDoc->GetNodes()[ pFlyFormat->GetContent().GetContentIdx()
->GetIndex()+1 ]->GetNoTextNode();
pNoTextNd->SetTitle( aAlt );
diff --git a/sw/source/filter/html/htmlsect.cxx b/sw/source/filter/html/htmlsect.cxx
index cbcfce1458ca..04dbd80995c1 100644
--- a/sw/source/filter/html/htmlsect.cxx
+++ b/sw/source/filter/html/htmlsect.cxx
@@ -115,7 +115,7 @@ void SwHTMLParser::NewDivision( int nToken )
HTMLAttrContext *pCntxt = new HTMLAttrContext( static_cast< sal_uInt16 >(nToken) );
bool bStyleParsed = false, bPositioned = false;
- SfxItemSet aItemSet( m_pDoc->GetAttrPool(), m_pCSS1Parser->GetWhichMap() );
+ SfxItemSet aItemSet( m_xDoc->GetAttrPool(), m_pCSS1Parser->GetWhichMap() );
SvxCSS1PropertyInfo aPropInfo;
if( HasStyleOptions( aStyle, aId, aClass, &aLang, &aDir ) )
{
@@ -176,14 +176,14 @@ void SwHTMLParser::NewDivision( int nToken )
if( bNew )
{
- pCNd = m_pDoc->GetNodes()[rContentStIdx.GetIndex()+1]
+ pCNd = m_xDoc->GetNodes()[rContentStIdx.GetIndex()+1]
->GetContentNode();
}
else
{
// Einen neuen Node zu Beginn der Section anlegen
SwNodeIndex aSttIdx( rContentStIdx, 1 );
- pCNd = m_pDoc->GetNodes().MakeTextNode( aSttIdx,
+ pCNd = m_xDoc->GetNodes().MakeTextNode( aSttIdx,
m_pCSS1Parser->GetTextCollFromPool(RES_POOLCOLL_TEXT));
// Den bisherigen Inhalt der Section loeschen
@@ -194,14 +194,14 @@ void SwHTMLParser::NewDivision( int nToken )
static_cast<const SwStartNode *>( &rContentStIdx.GetNode() );
aDelPam.GetPoint()->nNode = pStNd->EndOfSectionIndex() - 1;
- m_pDoc->getIDocumentContentOperations().DelFullPara( aDelPam );
+ m_xDoc->getIDocumentContentOperations().DelFullPara( aDelPam );
// Die Seitenvorlage aktualisieren
- for( size_t i=0; i < m_pDoc->GetPageDescCnt(); i++ )
+ for( size_t i=0; i < m_xDoc->GetPageDescCnt(); i++ )
{
- if( RES_POOLPAGE_HTML == m_pDoc->GetPageDesc(i).GetPoolFormatId() )
+ if( RES_POOLPAGE_HTML == m_xDoc->GetPageDesc(i).GetPoolFormatId() )
{
- m_pDoc->ChgPageDesc( i, *pPageDesc );
+ m_xDoc->ChgPageDesc( i, *pPageDesc );
break;
}
}
@@ -225,7 +225,7 @@ void SwHTMLParser::NewDivision( int nToken )
if( pStartNdIdx )
{
SwContentNode *pCNd =
- m_pDoc->GetNodes()[pStartNdIdx->GetIndex()+1]->GetContentNode();
+ m_xDoc->GetNodes()[pStartNdIdx->GetIndex()+1]->GetContentNode();
SwNodeIndex aTmpSwNodeIndex = SwNodeIndex(*pCNd);
SwPosition aNewPos( aTmpSwNodeIndex, SwIndex( pCNd, 0 ) );
SaveDocContext( pCntxt, HtmlContextFlags::MultiColMask, &aNewPos );
@@ -258,7 +258,7 @@ void SwHTMLParser::NewDivision( int nToken )
SetAttr( true, true, pPostIts );
// Namen der Section eindeutig machen
- const OUString aName( m_pDoc->GetUniqueSectionName( !aId.isEmpty() ? &aId : nullptr ) );
+ const OUString aName( m_xDoc->GetUniqueSectionName( !aId.isEmpty() ? &aId : nullptr ) );
if( !aHRef.isEmpty() )
{
@@ -308,7 +308,7 @@ void SwHTMLParser::NewDivision( int nToken )
aSection.SetProtectFlag(true);
}
- SfxItemSet aFrameItemSet( m_pDoc->GetAttrPool(),
+ SfxItemSet aFrameItemSet( m_xDoc->GetAttrPool(),
RES_FRMATR_BEGIN, RES_FRMATR_END-1 );
if( !IsNewDoc() )
Reader::ResetFrameFormatAttrs(aFrameItemSet );
@@ -327,7 +327,7 @@ void SwHTMLParser::NewDivision( int nToken )
aItemSet.ClearItem( RES_FRAMEDIR );
}
- m_pDoc->InsertSwSection( *m_pPam, aSection, nullptr, &aFrameItemSet, false );
+ m_xDoc->InsertSwSection( *m_pPam, aSection, nullptr, &aFrameItemSet, false );
// ggfs. einen Bereich anspringen
if( JUMPTO_REGION == m_eJumpTo && aName == m_sJmpMark )
@@ -432,7 +432,7 @@ void SwHTMLParser::FixHeaderFooterDistance( bool bHeader,
}
sal_uInt16 nSpace = 0;
- SwTextNode *pTextNode = m_pDoc->GetNodes()[nPrvNxtIdx]->GetTextNode();
+ SwTextNode *pTextNode = m_xDoc->GetNodes()[nPrvNxtIdx]->GetTextNode();
if( pTextNode )
{
const SvxULSpaceItem& rULSpace =
@@ -464,7 +464,7 @@ void SwHTMLParser::FixHeaderFooterDistance( bool bHeader,
nPrvNxtIdx = rContentStIdx.GetIndex() + 1;
}
- pTextNode = m_pDoc->GetNodes()[nPrvNxtIdx]
+ pTextNode = m_xDoc->GetNodes()[nPrvNxtIdx]
->GetTextNode();
if( pTextNode )
{
@@ -500,7 +500,7 @@ void SwHTMLParser::FixHeaderFooterDistance( bool bHeader,
bool SwHTMLParser::EndSection( bool bLFStripped )
{
- SwEndNode *pEndNd = m_pDoc->GetNodes()[m_pPam->GetPoint()->nNode.GetIndex()+1]
+ SwEndNode *pEndNd = m_xDoc->GetNodes()[m_pPam->GetPoint()->nNode.GetIndex()+1]
->GetEndNode();
if( pEndNd && pEndNd->StartOfSectionNode()->IsSectionNode() )
{
@@ -590,7 +590,7 @@ void SwHTMLParser::NewMultiCol( sal_uInt16 columnsFromCss )
// Parse style sheets, but don't position anything by now.
bool bStyleParsed = false;
- SfxItemSet aItemSet( m_pDoc->GetAttrPool(), m_pCSS1Parser->GetWhichMap() );
+ SfxItemSet aItemSet( m_xDoc->GetAttrPool(), m_pCSS1Parser->GetWhichMap() );
SvxCSS1PropertyInfo aPropInfo;
if( HasStyleOptions( aStyle, aId, aClass, &aLang, &aDir ) )
bStyleParsed = ParseStyleOptions( aStyle, aId, aClass,
@@ -613,7 +613,7 @@ void SwHTMLParser::NewMultiCol( sal_uInt16 columnsFromCss )
bool bPositioned = false;
if( bInCntnr || SwCSS1Parser::MayBePositioned( aPropInfo, true ) )
{
- SfxItemSet aFrameItemSet( m_pDoc->GetAttrPool(),
+ SfxItemSet aFrameItemSet( m_xDoc->GetAttrPool(),
RES_FRMATR_BEGIN, RES_FRMATR_END-1 );
if( !IsNewDoc() )
Reader::ResetFrameFormatAttrs(aFrameItemSet );
@@ -682,10 +682,10 @@ void SwHTMLParser::NewMultiCol( sal_uInt16 columnsFromCss )
SetAttr( true, true, pPostIts );
// Make section name unique.
- OUString aName( m_pDoc->GetUniqueSectionName( !aId.isEmpty() ? &aId : nullptr ) );
+ OUString aName( m_xDoc->GetUniqueSectionName( !aId.isEmpty() ? &aId : nullptr ) );
SwSectionData aSection( CONTENT_SECTION, aName );
- SfxItemSet aFrameItemSet( m_pDoc->GetAttrPool(),
+ SfxItemSet aFrameItemSet( m_xDoc->GetAttrPool(),
RES_FRMATR_BEGIN, RES_FRMATR_END-1 );
if( !IsNewDoc() )
Reader::ResetFrameFormatAttrs(aFrameItemSet );
@@ -715,7 +715,7 @@ void SwHTMLParser::NewMultiCol( sal_uInt16 columnsFromCss )
aFrameItemSet.Put( *pItem );
aItemSet.ClearItem( RES_FRAMEDIR );
}
- m_pDoc->InsertSwSection( *m_pPam, aSection, nullptr, &aFrameItemSet, false );
+ m_xDoc->InsertSwSection( *m_pPam, aSection, nullptr, &aFrameItemSet, false );
// Jump to section, if this is requested.
if( JUMPTO_REGION == m_eJumpTo && aName == m_sJmpMark )
@@ -765,7 +765,7 @@ void SwHTMLParser::InsertFlyFrame( const SfxItemSet& rItemSet,
static_cast<const SwFormatAnchor&>(rItemSet.Get( RES_ANCHOR )).GetAnchorId();
// Den Rahmen anlegen
- SwFlyFrameFormat* pFlyFormat = m_pDoc->MakeFlySection( eAnchorId, m_pPam->GetPoint(),
+ SwFlyFrameFormat* pFlyFormat = m_xDoc->MakeFlySection( eAnchorId, m_pPam->GetPoint(),
&rItemSet );
// Ggf. den Namen setzen
if( !rName.isEmpty() )
@@ -775,7 +775,7 @@ void SwHTMLParser::InsertFlyFrame( const SfxItemSet& rItemSet,
const SwFormatContent& rFlyContent = pFlyFormat->GetContent();
const SwNodeIndex& rFlyCntIdx = *rFlyContent.GetContentIdx();
- SwContentNode *pCNd = m_pDoc->GetNodes()[rFlyCntIdx.GetIndex()+1]
+ SwContentNode *pCNd = m_xDoc->GetNodes()[rFlyCntIdx.GetIndex()+1]
->GetContentNode();
SwPosition aNewPos( SwNodeIndex( rFlyCntIdx, 1 ), SwIndex( pCNd, 0 ) );
@@ -788,7 +788,7 @@ void SwHTMLParser::MovePageDescAttrs( SwNode *pSrcNd,
bool bFormatBreak )
{
SwContentNode* pDestContentNd =
- m_pDoc->GetNodes()[nDestIdx]->GetContentNode();
+ m_xDoc->GetNodes()[nDestIdx]->GetContentNode();
OSL_ENSURE( pDestContentNd, "Wieso ist das Ziel kein Content-Node?" );
diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx
index 3b3faa062f6f..712e74103e12 100644
--- a/sw/source/filter/html/htmltab.cxx
+++ b/sw/source/filter/html/htmltab.cxx
@@ -2763,13 +2763,13 @@ const SwStartNode *SwHTMLParser::InsertTableSection
else
pNd = pPrevStNd->EndOfSectionNode();
SwNodeIndex nIdx( *pNd, 1 );
- pStNd = m_pDoc->GetNodes().MakeTextSection( nIdx, SwTableBoxStartNode,
+ pStNd = m_xDoc->GetNodes().MakeTextSection( nIdx, SwTableBoxStartNode,
pColl );
m_pTable->IncBoxCount();
}
//Added defaults to CJK and CTL
- SwContentNode *pCNd = m_pDoc->GetNodes()[pStNd->GetIndex()+1] ->GetContentNode();
+ SwContentNode *pCNd = m_xDoc->GetNodes()[pStNd->GetIndex()+1] ->GetContentNode();
SvxFontHeightItem aFontHeight( 40, 100, RES_CHRATR_FONTSIZE );
pCNd->SetAttr( aFontHeight );
SvxFontHeightItem aFontHeightCJK( 40, 100, RES_CHRATR_CJK_FONTSIZE );
@@ -2815,7 +2815,7 @@ const SwStartNode *SwHTMLParser::InsertTableSection( sal_uInt16 nPoolId )
} while( pOutTable && pTableNd->GetTable().GetHTMLTableLayout() );
}
SwNodeIndex aIdx( *pTableNd->EndOfSectionNode() );
- pStNd = m_pDoc->GetNodes().MakeTextSection( aIdx, SwTableBoxStartNode,
+ pStNd = m_xDoc->GetNodes().MakeTextSection( aIdx, SwTableBoxStartNode,
pColl );
m_pPam->GetPoint()->nNode = pStNd->GetIndex() + 1;
@@ -2831,8 +2831,8 @@ SwStartNode *SwHTMLParser::InsertTempTableCaptionSection()
{
SwTextFormatColl *pColl = m_pCSS1Parser->GetTextCollFromPool( RES_POOLCOLL_TEXT );
SwNodeIndex& rIdx = m_pPam->GetPoint()->nNode;
- rIdx = m_pDoc->GetNodes().GetEndOfExtras();
- SwStartNode *pStNd = m_pDoc->GetNodes().MakeTextSection( rIdx,
+ rIdx = m_xDoc->GetNodes().GetEndOfExtras();
+ SwStartNode *pStNd = m_xDoc->GetNodes().MakeTextSection( rIdx,
SwNormalStartNode, pColl );
rIdx = pStNd->GetIndex() + 1;
@@ -2894,7 +2894,7 @@ SvxBrushItem* SwHTMLParser::CreateBrushItem( const Color *pColor,
if( !rStyle.isEmpty() || !rId.isEmpty() || !rClass.isEmpty() )
{
- SfxItemSet aItemSet( m_pDoc->GetAttrPool(), RES_BACKGROUND,
+ SfxItemSet aItemSet( m_xDoc->GetAttrPool(), RES_BACKGROUND,
RES_BACKGROUND );
SvxCSS1PropertyInfo aPropInfo;
@@ -3173,7 +3173,7 @@ CellSaveStruct::CellSaveStruct( SwHTMLParser& rParser, HTMLTable *pCurTable,
LanguageType eLang;
m_nValue = SfxHTMLParser::GetTableDataOptionsValNum(
m_nNumFormat, eLang, aValue, aNumFormat,
- *rParser.m_pDoc->GetNumberFormatter() );
+ *rParser.m_xDoc->GetNumberFormatter() );
}
// einen neuen Kontext anlegen, aber das drawing::Alignment-Attribut
@@ -3197,7 +3197,7 @@ CellSaveStruct::CellSaveStruct( SwHTMLParser& rParser, HTMLTable *pCurTable,
if( SwHTMLParser::HasStyleOptions( m_aStyle, m_aId, m_aClass, &m_aLang, &m_aDir ) )
{
- SfxItemSet aItemSet( rParser.m_pDoc->GetAttrPool(),
+ SfxItemSet aItemSet( rParser.m_xDoc->GetAttrPool(),
rParser.m_pCSS1Parser->GetWhichMap() );
SvxCSS1PropertyInfo aPropInfo;
@@ -3429,7 +3429,7 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, bool bReadOptions,
0
};
- SfxItemSet aItemSet( m_pDoc->GetAttrPool(), aWhichIds );
+ SfxItemSet aItemSet( m_xDoc->GetAttrPool(), aWhichIds );
SvxCSS1PropertyInfo aPropInfo;
bool bStyleParsed = ParseStyleOptions( pCurTable->GetStyle(),
@@ -3507,7 +3507,7 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, bool bReadOptions,
if( !m_pPam->GetPoint()->nContent.GetIndex() )
{
//Set default to CJK and CTL
- m_pDoc->SetTextFormatColl( *m_pPam,
+ m_xDoc->SetTextFormatColl( *m_pPam,
m_pCSS1Parser->GetTextCollFromPool(RES_POOLCOLL_STANDARD) );
SvxFontHeightItem aFontHeight( 40, 100, RES_CHRATR_FONTSIZE );
@@ -3610,7 +3610,7 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, bool bReadOptions,
{
// Die Tabelle soll in einen Rahmen geschaufelt werden.
- SfxItemSet aFrameSet( m_pDoc->GetAttrPool(),
+ SfxItemSet aFrameSet( m_xDoc->GetAttrPool(),
RES_FRMATR_BEGIN, RES_FRMATR_END-1 );
if( !pCurTable->IsNewDoc() )
Reader::ResetFrameFormatAttrs( aFrameSet );
@@ -3652,14 +3652,14 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, bool bReadOptions,
RndStdIds eAnchorId = static_cast<const SwFormatAnchor&>(aFrameSet.
Get( RES_ANCHOR )).
GetAnchorId();
- SwFrameFormat *pFrameFormat = m_pDoc->MakeFlySection(
+ SwFrameFormat *pFrameFormat = m_xDoc->MakeFlySection(
eAnchorId, m_pPam->GetPoint(), &aFrameSet );
pTCntxt->SetFrameFormat( pFrameFormat );
const SwFormatContent& rFlyContent = pFrameFormat->GetContent();
m_pPam->GetPoint()->nNode = *rFlyContent.GetContentIdx();
SwContentNode *pCNd =
- m_pDoc->GetNodes().GoNext( &(m_pPam->GetPoint()->nNode) );
+ m_xDoc->GetNodes().GoNext( &(m_pPam->GetPoint()->nNode) );
m_pPam->GetPoint()->nContent.Assign( pCNd, 0 );
}
@@ -3670,7 +3670,7 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, bool bReadOptions,
// gesetzt)
OSL_ENSURE( !m_pPam->GetPoint()->nContent.GetIndex(),
"Der Absatz hinter der Tabelle ist nicht leer!" );
- const SwTable* pSwTable = m_pDoc->InsertTable(
+ const SwTable* pSwTable = m_xDoc->InsertTable(
SwInsertTableOptions( tabopts::HEADLINE_NO_BORDER, 1 ),
*m_pPam->GetPoint(), 1, 1, text::HoriOrientation::LEFT );
@@ -3678,7 +3678,7 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, bool bReadOptions,
{
SwNodeIndex aDstIdx( m_pPam->GetPoint()->nNode );
m_pPam->Move( fnMoveBackward );
- m_pDoc->GetNodes().Delete( aDstIdx );
+ m_xDoc->GetNodes().Delete( aDstIdx );
}
else
{
@@ -4025,7 +4025,7 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, bool bReadOptions,
? RES_POOLCOLL_TABLE_HDLN
: RES_POOLCOLL_TABLE ));
const SwEndNode *pEndNd = pStNd->EndOfSectionNode();
- SwContentNode *pCNd = m_pDoc->GetNodes()[pEndNd->GetIndex()-1] ->GetContentNode();
+ SwContentNode *pCNd = m_xDoc->GetNodes()[pEndNd->GetIndex()-1] ->GetContentNode();
//Added defaults to CJK and CTL
SvxFontHeightItem aFontHeight( 40, 100, RES_CHRATR_FONTSIZE );
pCNd->SetAttr( aFontHeight );
@@ -4040,7 +4040,7 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, bool bReadOptions,
if( pSaveStruct->IsInSection() )
{
- pSaveStruct->CheckNoBreak( *m_pPam->GetPoint(), m_pDoc );
+ pSaveStruct->CheckNoBreak( *m_pPam->GetPoint(), m_xDoc.get() );
// Alle noch offenen Kontexte beenden. Wir nehmen hier
// AttrMin, weil nContxtStMin evtl. veraendert wurde.
@@ -5290,7 +5290,7 @@ HTMLTable *SwHTMLParser::BuildTable( SvxAdjust eParentAdjust,
pNd = pTableStNd->EndOfSectionNode();
SwNodeIndex aDstIdx( *pNd, bTop ? 0 : 1 );
- m_pDoc->getIDocumentContentOperations().MoveNodeRange( aSrcRg, aDstIdx,
+ m_xDoc->getIDocumentContentOperations().MoveNodeRange( aSrcRg, aDstIdx,
SwMoveFlags::DEFAULT );
// Wenn die Caption vor der Tabelle eingefuegt wurde muss
@@ -5308,13 +5308,13 @@ HTMLTable *SwHTMLParser::BuildTable( SvxAdjust eParentAdjust,
// Die Section wird jetzt nicht mehr gebraucht.
m_pPam->SetMark();
m_pPam->DeleteMark();
- m_pDoc->getIDocumentContentOperations().DeleteSection( const_cast<SwStartNode *>(pCapStNd) );
+ m_xDoc->getIDocumentContentOperations().DeleteSection( const_cast<SwStartNode *>(pCapStNd) );
m_pTable->SetCaption( nullptr, false );
}
// SwTable aufbereiten
sal_uInt16 nBrowseWidth = (sal_uInt16)GetCurrentBrowseWidth();
- pSaveStruct->MakeTable( nBrowseWidth, *m_pPam->GetPoint(), m_pDoc );
+ pSaveStruct->MakeTable( nBrowseWidth, *m_pPam->GetPoint(), m_xDoc.get() );
}
GetNumInfo().Set( pTCntxt->GetNumInfo() );
@@ -5358,7 +5358,7 @@ HTMLTable *SwHTMLParser::BuildTable( SvxAdjust eParentAdjust,
{
m_pPam->SetMark();
m_pPam->DeleteMark();
- m_pDoc->getIDocumentContentOperations().DeleteSection( const_cast<SwStartNode *>(pCapStNd) );
+ m_xDoc->getIDocumentContentOperations().DeleteSection( const_cast<SwStartNode *>(pCapStNd) );
pCurTable->SetCaption( nullptr, false );
}
}
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index 6c927f430fd3..b990071ed6c1 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -247,7 +247,7 @@ SwHTMLParser::SwHTMLParser( SwDoc* pD, SwPaM& rCursor, SvStream& rIn,
m_pCSS1Parser( nullptr ),
m_pNumRuleInfo( new SwHTMLNumRuleInfo ),
m_pPendStack( nullptr ),
- m_pDoc( pD ),
+ m_xDoc( pD ),
m_pActionViewShell( nullptr ),
m_pSttNdIdx( nullptr ),
m_pTable(nullptr),
@@ -324,23 +324,23 @@ SwHTMLParser::SwHTMLParser( SwDoc* pD, SwPaM& rCursor, SvStream& rIn,
//CJK has different defaults, so a different object should be used for this
//RES_CHARTR_CJK_FONTSIZE is a valid value
SvxFontHeightItem aFontHeight(m_aFontHeights[2], 100, RES_CHRATR_FONTSIZE);
- m_pDoc->SetDefault( aFontHeight );
+ m_xDoc->SetDefault( aFontHeight );
SvxFontHeightItem aFontHeightCJK(m_aFontHeights[2], 100, RES_CHRATR_CJK_FONTSIZE);
- m_pDoc->SetDefault( aFontHeightCJK );
+ m_xDoc->SetDefault( aFontHeightCJK );
SvxFontHeightItem aFontHeightCTL(m_aFontHeights[2], 100, RES_CHRATR_CTL_FONTSIZE);
- m_pDoc->SetDefault( aFontHeightCTL );
+ m_xDoc->SetDefault( aFontHeightCTL );
// #i18732# - adjust default of option 'FollowTextFlow'
// TODO: not sure what the appropriate default for HTML should be?
- m_pDoc->SetDefault( SwFormatFollowTextFlow(true) );
+ m_xDoc->SetDefault( SwFormatFollowTextFlow(true) );
}
// Waehrend des Imports in den HTML-Modus schalten, damit die
// richrigen Vorlagen angelegt werden
- m_bOldIsHTMLMode = m_pDoc->getIDocumentSettingAccess().get(DocumentSettingId::HTML_MODE);
- m_pDoc->getIDocumentSettingAccess().set(DocumentSettingId::HTML_MODE, true);
+ m_bOldIsHTMLMode = m_xDoc->getIDocumentSettingAccess().get(DocumentSettingId::HTML_MODE);
+ m_xDoc->getIDocumentSettingAccess().set(DocumentSettingId::HTML_MODE, true);
- m_pCSS1Parser = new SwCSS1Parser( m_pDoc, m_aFontHeights, m_sBaseURL, IsNewDoc() );
+ m_pCSS1Parser = new SwCSS1Parser( m_xDoc.get(), m_aFontHeights, m_sBaseURL, IsNewDoc() );
m_pCSS1Parser->SetIgnoreFontFamily( rHtmlOptions.IsIgnoreFontFamily() );
if( bReadUTF8 )
@@ -349,7 +349,7 @@ SwHTMLParser::SwHTMLParser( SwDoc* pD, SwPaM& rCursor, SvStream& rIn,
}
else
{
- SwDocShell *pDocSh = m_pDoc->GetDocShell();
+ SwDocShell *pDocSh = m_xDoc->GetDocShell();
SvKeyValueIterator *pHeaderAttrs =
pDocSh->GetHeaderAttributes();
if( pHeaderAttrs )
@@ -358,7 +358,7 @@ SwHTMLParser::SwHTMLParser( SwDoc* pD, SwPaM& rCursor, SvStream& rIn,
m_pCSS1Parser->SetDfltEncoding( osl_getThreadTextEncoding() );
// Timer nur bei ganz normalen Dokumenten aufsetzen!
- SwDocShell* pDocSh = m_pDoc->GetDocShell();
+ SwDocShell* pDocSh = m_xDoc->GetDocShell();
if( pDocSh )
{
m_bViewCreated = true; // nicht, synchron laden
@@ -414,27 +414,27 @@ SwHTMLParser::~SwHTMLParser()
#ifdef DBG_UTIL
OSL_ENSURE( !m_nContinue, "DTOR im Continue!" );
#endif
- bool bAsync = m_pDoc->IsInLoadAsynchron();
- m_pDoc->SetInLoadAsynchron( false );
- m_pDoc->getIDocumentSettingAccess().set(DocumentSettingId::HTML_MODE, m_bOldIsHTMLMode);
+ bool bAsync = m_xDoc->IsInLoadAsynchron();
+ m_xDoc->SetInLoadAsynchron( false );
+ m_xDoc->getIDocumentSettingAccess().set(DocumentSettingId::HTML_MODE, m_bOldIsHTMLMode);
- if( m_pDoc->GetDocShell() && m_nEventId )
+ if( m_xDoc->GetDocShell() && m_nEventId )
Application::RemoveUserEvent( m_nEventId );
// das DocumentDetected kann ggfs. die DocShells loeschen, darum nochmals
// abfragen
- if( m_pDoc->GetDocShell() )
+ if( m_xDoc->GetDocShell() )
{
// Gelinkte Bereiche updaten
- sal_uInt16 nLinkMode = m_pDoc->getIDocumentSettingAccess().getLinkUpdateMode( true );
+ sal_uInt16 nLinkMode = m_xDoc->getIDocumentSettingAccess().getLinkUpdateMode( true );
if( nLinkMode != NEVER && bAsync &&
- SfxObjectCreateMode::INTERNAL!=m_pDoc->GetDocShell()->GetCreateMode() )
- m_pDoc->getIDocumentLinksAdministration().GetLinkManager().UpdateAllLinks( nLinkMode == MANUAL );
+ SfxObjectCreateMode::INTERNAL!=m_xDoc->GetDocShell()->GetCreateMode() )
+ m_xDoc->getIDocumentLinksAdministration().GetLinkManager().UpdateAllLinks( nLinkMode == MANUAL );
- if ( m_pDoc->GetDocShell()->IsLoading() )
+ if ( m_xDoc->GetDocShell()->IsLoading() )
{
// #i59688#
- m_pDoc->GetDocShell()->LoadingFinished();
+ m_xDoc->GetDocShell()->LoadingFinished();
}
}
@@ -467,20 +467,15 @@ SwHTMLParser::~SwHTMLParser()
delete pTmp;
}
- if( !m_pDoc->release() )
- {
- // keiner will mehr das Doc haben, also weg damit
- delete m_pDoc;
- m_pDoc = nullptr;
- }
+ m_xDoc.clear();
if ( m_pTempViewFrame )
{
m_pTempViewFrame->DoClose();
// the temporary view frame is hidden, so the hidden flag might need to be removed
- if ( m_bRemoveHidden && m_pDoc && m_pDoc->GetDocShell() && m_pDoc->GetDocShell()->GetMedium() )
- m_pDoc->GetDocShell()->GetMedium()->GetItemSet()->ClearItem( SID_HIDDEN );
+ if ( m_bRemoveHidden && m_xDoc.is() && m_xDoc->GetDocShell() && m_xDoc->GetDocShell()->GetMedium() )
+ m_xDoc->GetDocShell()->GetMedium()->GetItemSet()->ClearItem( SID_HIDDEN );
}
}
@@ -490,8 +485,8 @@ IMPL_LINK_NOARG( SwHTMLParser, AsyncCallback, void*, void )
// #i47907# - If the document has already been destructed,
// the parser should be aware of this:
- if( ( m_pDoc->GetDocShell() && m_pDoc->GetDocShell()->IsAbortingImport() )
- || 1 == m_pDoc->getReferenceCount() )
+ if( ( m_xDoc->GetDocShell() && m_xDoc->GetDocShell()->IsAbortingImport() )
+ || 1 == m_xDoc->getReferenceCount() )
{
// wurde der Import vom SFX abgebrochen?
eState = SVPAR_ERROR;
@@ -503,15 +498,15 @@ IMPL_LINK_NOARG( SwHTMLParser, AsyncCallback, void*, void )
SvParserState SwHTMLParser::CallParser()
{
// einen temporaeren Index anlegen, auf Pos 0 so wird er nicht bewegt!
- m_pSttNdIdx = new SwNodeIndex( m_pDoc->GetNodes() );
+ m_pSttNdIdx = new SwNodeIndex( m_xDoc->GetNodes() );
if( !IsNewDoc() ) // in ein Dokument einfuegen ?
{
const SwPosition* pPos = m_pPam->GetPoint();
- m_pDoc->getIDocumentContentOperations().SplitNode( *pPos, false );
+ m_xDoc->getIDocumentContentOperations().SplitNode( *pPos, false );
*m_pSttNdIdx = pPos->nNode.GetIndex()-1;
- m_pDoc->getIDocumentContentOperations().SplitNode( *pPos, false );
+ m_xDoc->getIDocumentContentOperations().SplitNode( *pPos, false );
SwPaM aInsertionRangePam( *pPos );
@@ -521,9 +516,9 @@ SvParserState SwHTMLParser::CallParser()
aInsertionRangePam.SetMark();
*aInsertionRangePam.GetPoint() = *m_pPam->GetPoint();
aInsertionRangePam.Move( fnMoveBackward );
- m_pDoc->getIDocumentRedlineAccess().SplitRedline( aInsertionRangePam );
+ m_xDoc->getIDocumentRedlineAccess().SplitRedline( aInsertionRangePam );
- m_pDoc->SetTextFormatColl( *m_pPam,
+ m_xDoc->SetTextFormatColl( *m_pPam,
m_pCSS1Parser->GetTextCollFromPool( RES_POOLCOLL_STANDARD ));
}
@@ -546,12 +541,12 @@ SvParserState SwHTMLParser::CallParser()
rInput.Seek(STREAM_SEEK_TO_END);
rInput.ResetError();
::StartProgress( STR_STATSTR_W4WREAD, 0, rInput.Tell(),
- m_pDoc->GetDocShell() );
+ m_xDoc->GetDocShell() );
rInput.Seek(STREAM_SEEK_TO_BEGIN);
rInput.ResetError();
}
- m_pDoc->GetPageDesc( 0 ).Add( this );
+ m_xDoc->GetPageDesc( 0 ).Add( this );
SvParserState eRet = HTMLParser::CallParser();
return eRet;
@@ -569,7 +564,7 @@ void SwHTMLParser::Continue( int nToken )
// aufgeraeumt wird.
OSL_ENSURE( SVPAR_ERROR!=eState,
"SwHTMLParser::Continue: bereits ein Fehler gesetzt" );
- if( m_pDoc->GetDocShell() && m_pDoc->GetDocShell()->IsAbortingImport() )
+ if( m_xDoc->GetDocShell() && m_xDoc->GetDocShell()->IsAbortingImport() )
eState = SVPAR_ERROR;
// Die SwViewShell vom Dokument holen, merken und als aktuelle setzen.
@@ -583,7 +578,7 @@ void SwHTMLParser::Continue( int nToken )
// gelesen und ein SaveState(0) gerufen.
eState = SVPAR_PENDING;
m_bViewCreated = true;
- m_pDoc->SetInLoadAsynchron( true );
+ m_xDoc->SetInLoadAsynchron( true );
#ifdef DBG_UTIL
m_nContinue--;
@@ -593,22 +588,22 @@ void SwHTMLParser::Continue( int nToken )
}
m_bSetModEnabled = false;
- if( m_pDoc->GetDocShell() )
+ if( m_xDoc->GetDocShell() )
{
- m_bSetModEnabled = m_pDoc->GetDocShell()->IsEnableSetModified();
+ m_bSetModEnabled = m_xDoc->GetDocShell()->IsEnableSetModified();
if( m_bSetModEnabled )
{
- m_pDoc->GetDocShell()->EnableSetModified( false );
+ m_xDoc->GetDocShell()->EnableSetModified( false );
}
}
// waehrend des einlesens kein OLE-Modified rufen
- Link<bool,void> aOLELink( m_pDoc->GetOle2Link() );
- m_pDoc->SetOle2Link( Link<bool,void>() );
+ Link<bool,void> aOLELink( m_xDoc->GetOle2Link() );
+ m_xDoc->SetOle2Link( Link<bool,void>() );
- bool bModified = m_pDoc->getIDocumentState().IsModified();
- bool const bWasUndo = m_pDoc->GetIDocumentUndoRedo().DoesUndo();
- m_pDoc->GetIDocumentUndoRedo().DoUndo(false);
+ bool bModified = m_xDoc->getIDocumentState().IsModified();
+ bool const bWasUndo = m_xDoc->GetIDocumentUndoRedo().DoesUndo();
+ m_xDoc->GetIDocumentUndoRedo().DoUndo(false);
// Wenn der Import abgebrochen wird, kein Continue mehr rufen.
// Falls ein Pending-Stack existiert aber durch einen Aufruf
@@ -629,7 +624,7 @@ void SwHTMLParser::Continue( int nToken )
}
// Laufbalken wieder abschalten
- EndProgress( m_pDoc->GetDocShell() );
+ EndProgress( m_xDoc->GetDocShell() );
bool bLFStripped = false;
if( SVPAR_PENDING != GetStatus() )
@@ -639,7 +634,7 @@ void SwHTMLParser::Continue( int nToken )
if( !m_aScriptSource.isEmpty() )
{
SwScriptFieldType *pType =
- static_cast<SwScriptFieldType*>(m_pDoc->getIDocumentFieldsAccess().GetSysFieldType( RES_SCRIPTFLD ));
+ static_cast<SwScriptFieldType*>(m_xDoc->getIDocumentFieldsAccess().GetSysFieldType( RES_SCRIPTFLD ));
SwScriptField aField( pType, m_aScriptType, m_aScriptSource,
false );
@@ -750,7 +745,7 @@ if( m_pSttNdIdx->GetIndex()+1 == m_pPam->GetBound( false ).nNode.GetIndex() )
if( IsNewDoc() )
{
- const SwNode *pPrev = m_pDoc->GetNodes()[nNodeIdx -1];
+ const SwNode *pPrev = m_xDoc->GetNodes()[nNodeIdx -1];
if( !m_pPam->GetPoint()->nContent.GetIndex() &&
( pPrev->IsContentNode() ||
(pPrev->IsEndNode() &&
@@ -774,11 +769,11 @@ if( m_pSttNdIdx->GetIndex()+1 == m_pPam->GetBound( false ).nNode.GetIndex() )
}
m_pPam->GetBound().nContent.Assign( nullptr, 0 );
m_pPam->GetBound(false).nContent.Assign( nullptr, 0 );
- m_pDoc->GetNodes().Delete( m_pPam->GetPoint()->nNode );
+ m_xDoc->GetNodes().Delete( m_pPam->GetPoint()->nNode );
}
}
}
- else if( nullptr != ( pAktNd = m_pDoc->GetNodes()[ nNodeIdx ]->GetTextNode()) && !bHasFlysOrMarks )
+ else if( nullptr != ( pAktNd = m_xDoc->GetNodes()[ nNodeIdx ]->GetTextNode()) && !bHasFlysOrMarks )
{
if( pAktNd->CanJoinNext( &pPos->nNode ))
{
@@ -791,7 +786,7 @@ if( m_pSttNdIdx->GetIndex()+1 == m_pPam->GetBound( false ).nNode.GetIndex() )
{
pPos->nContent.Assign( nullptr, 0 );
m_pPam->SetMark(); m_pPam->DeleteMark();
- m_pDoc->GetNodes().Delete( pPos->nNode );
+ m_xDoc->GetNodes().Delete( pPos->nNode );
m_pPam->Move( fnMoveBackward );
}
}
@@ -833,7 +828,7 @@ if( m_pSttNdIdx->GetIndex()+1 == m_pPam->GetBound( false ).nNode.GetIndex() )
// adjust AutoLoad in DocumentProperties
if( IsNewDoc() )
{
- SwDocShell *pDocShell(m_pDoc->GetDocShell());
+ SwDocShell *pDocShell(m_xDoc->GetDocShell());
OSL_ENSURE(pDocShell, "no SwDocShell");
if (pDocShell) {
uno::Reference<document::XDocumentPropertiesSupplier> xDPS(
@@ -851,7 +846,7 @@ if( m_pSttNdIdx->GetIndex()+1 == m_pPam->GetBound( false ).nNode.GetIndex() )
if( m_bUpdateDocStat )
{
- m_pDoc->getIDocumentStatistics().UpdateDocStat( false, true );
+ m_xDoc->getIDocumentStatistics().UpdateDocStat( false, true );
}
}
@@ -863,12 +858,12 @@ if( m_pSttNdIdx->GetIndex()+1 == m_pPam->GetBound( false ).nNode.GetIndex() )
// sollte der Parser der Letzte sein, der das Doc haelt, dann braucht
// man hier auch nichts mehr tun, Doc wird gleich zerstoert!
- if( 1 < m_pDoc->getReferenceCount() )
+ if( 1 < m_xDoc->getReferenceCount() )
{
if( bWasUndo )
{
- m_pDoc->GetIDocumentUndoRedo().DelAllUndoObj();
- m_pDoc->GetIDocumentUndoRedo().DoUndo(true);
+ m_xDoc->GetIDocumentUndoRedo().DelAllUndoObj();
+ m_xDoc->GetIDocumentUndoRedo().DoUndo(true);
}
else if( !pInitVSh )
{
@@ -879,16 +874,16 @@ if( m_pSttNdIdx->GetIndex()+1 == m_pPam->GetBound( false ).nNode.GetIndex() )
SwViewShell *pTmpVSh = CheckActionViewShell();
if( pTmpVSh )
{
- m_pDoc->GetIDocumentUndoRedo().DoUndo(true);
+ m_xDoc->GetIDocumentUndoRedo().DoUndo(true);
}
}
- m_pDoc->SetOle2Link( aOLELink );
+ m_xDoc->SetOle2Link( aOLELink );
if( !bModified )
- m_pDoc->getIDocumentState().ResetModified();
- if( m_bSetModEnabled && m_pDoc->GetDocShell() )
+ m_xDoc->getIDocumentState().ResetModified();
+ if( m_bSetModEnabled && m_xDoc->GetDocShell() )
{
- m_pDoc->GetDocShell()->EnableSetModified();
+ m_xDoc->GetDocShell()->EnableSetModified();
m_bSetModEnabled = false; // this is unnecessary here
}
}
@@ -930,7 +925,7 @@ void SwHTMLParser::DocumentDetected()
CallEndAction( true );
- m_pDoc->GetIDocumentUndoRedo().DoUndo(false);
+ m_xDoc->GetIDocumentUndoRedo().DoUndo(false);
// Durch das DocumentDetected wurde im allgemeinen eine
// SwViewShell angelegt. Es kann aber auch sein, dass sie
// erst spaeter angelegt wird, naemlich dann, wenn die UI
@@ -942,15 +937,15 @@ void SwHTMLParser::DocumentDetected()
// is called for every token that is recognised in CallParser
void SwHTMLParser::NextToken( int nToken )
{
- if( ( m_pDoc->GetDocShell() && m_pDoc->GetDocShell()->IsAbortingImport() )
- || 1 == m_pDoc->getReferenceCount() )
+ if( ( m_xDoc->GetDocShell() && m_xDoc->GetDocShell()->IsAbortingImport() )
+ || 1 == m_xDoc->getReferenceCount() )
{
// Was the import cancelled by SFX? If a pending stack
// exists, clean it.
eState = SVPAR_ERROR;
OSL_ENSURE( !m_pPendStack || m_pPendStack->nToken,
"SwHTMLParser::NextToken: Pending-Stack without token" );
- if( 1 == m_pDoc->getReferenceCount() || !m_pPendStack )
+ if( 1 == m_xDoc->getReferenceCount() || !m_pPendStack )
return ;
}
@@ -989,9 +984,9 @@ void SwHTMLParser::NextToken( int nToken )
case HTML_TITLE_OFF:
if( IsNewDoc() && !m_sTitle.isEmpty() )
{
- if( m_pDoc->GetDocShell() ) {
+ if( m_xDoc->GetDocShell() ) {
uno::Reference<document::XDocumentPropertiesSupplier>
- xDPS(m_pDoc->GetDocShell()->GetModel(),
+ xDPS(m_xDoc->GetDocShell()->GetModel(),
uno::UNO_QUERY_THROW);
uno::Reference<document::XDocumentProperties> xDocProps(
xDPS->getDocumentProperties());
@@ -1000,7 +995,7 @@ void SwHTMLParser::NextToken( int nToken )
xDocProps->setTitle(m_sTitle);
}
- m_pDoc->GetDocShell()->SetTitle( m_sTitle );
+ m_xDoc->GetDocShell()->SetTitle( m_sTitle );
}
}
m_bInTitle = false;
@@ -1219,7 +1214,7 @@ void SwHTMLParser::NextToken( int nToken )
{
if( !m_bDocInitalized )
DocumentDetected();
- m_pDoc->getIDocumentContentOperations().InsertString( *m_pPam, aToken );
+ m_xDoc->getIDocumentContentOperations().InsertString( *m_pPam, aToken );
// if there are temporary paragraph attributes and the
// paragraph isn't empty then the paragraph attributes
@@ -1274,7 +1269,7 @@ void SwHTMLParser::NextToken( int nToken )
if( pPageDesc )
{
- m_pDoc->getIDocumentContentOperations().InsertPoolItem( *m_pPam, SwFormatPageDesc( pPageDesc ) );
+ m_xDoc->getIDocumentContentOperations().InsertPoolItem( *m_pPam, SwFormatPageDesc( pPageDesc ) );
}
}
break;
@@ -1297,7 +1292,7 @@ void SwHTMLParser::NextToken( int nToken )
case HTML_O_TARGET:
if( IsNewDoc() )
{
- SwDocShell *pDocShell(m_pDoc->GetDocShell());
+ SwDocShell *pDocShell(m_xDoc->GetDocShell());
OSL_ENSURE(pDocShell, "no SwDocShell");
if (pDocShell) {
uno::Reference<document::XDocumentPropertiesSupplier> xDPS(
@@ -1322,11 +1317,11 @@ void SwHTMLParser::NextToken( int nToken )
SvKeyValueIterator *pHTTPHeader = nullptr;
if( IsNewDoc() )
{
- SwDocShell *pDocSh = m_pDoc->GetDocShell();
+ SwDocShell *pDocSh = m_xDoc->GetDocShell();
if( pDocSh )
pHTTPHeader = pDocSh->GetHeaderAttributes();
}
- SwDocShell *pDocShell(m_pDoc->GetDocShell());
+ SwDocShell *pDocShell(m_xDoc->GetDocShell());
OSL_ENSURE(pDocShell, "no SwDocShell");
if (pDocShell)
{
@@ -1426,22 +1421,22 @@ void SwHTMLParser::NextToken( int nToken )
}
// progress bar
if( !GetMedium() || !GetMedium()->IsRemote() )
- ::SetProgressState( rInput.Tell(), m_pDoc->GetDocShell() );
+ ::SetProgressState( rInput.Tell(), m_xDoc->GetDocShell() );
}
break;
case HTML_NONBREAKSPACE:
- m_pDoc->getIDocumentContentOperations().InsertString( *m_pPam, OUString(CHAR_HARDBLANK) );
+ m_xDoc->getIDocumentContentOperations().InsertString( *m_pPam, OUString(CHAR_HARDBLANK) );
break;
case HTML_SOFTHYPH:
- m_pDoc->getIDocumentContentOperations().InsertString( *m_pPam, OUString(CHAR_SOFTHYPHEN) );
+ m_xDoc->getIDocumentContentOperations().InsertString( *m_pPam, OUString(CHAR_SOFTHYPHEN) );
break;
case HTML_LINEFEEDCHAR:
if( m_pPam->GetPoint()->nContent.GetIndex() )
AppendTextNode();
- if( !m_pTable && !m_pDoc->IsInHeaderFooter( m_pPam->GetPoint()->nNode ) )
+ if( !m_pTable && !m_xDoc->IsInHeaderFooter( m_pPam->GetPoint()->nNode ) )
{
NewAttr( &m_aAttrTab.pBreak, SvxFormatBreakItem(SvxBreak::PageBefore, RES_BREAK) );
EndAttr( m_aAttrTab.pBreak, false );
@@ -1475,7 +1470,7 @@ void SwHTMLParser::NextToken( int nToken )
{
if( !m_bDocInitalized )
DocumentDetected();
- m_pDoc->getIDocumentContentOperations().InsertString( *m_pPam, aToken );
+ m_xDoc->getIDocumentContentOperations().InsertString( *m_pPam, aToken );
// if there are temporary paragraph attributes and the
// paragraph isn't empty then the paragraph attributes
@@ -1495,7 +1490,7 @@ void SwHTMLParser::NextToken( int nToken )
InsertImage();
// if only the parser references the doc, we can break and set
// an error code
- if( 1 == m_pDoc->getReferenceCount() )
+ if( 1 == m_xDoc->getReferenceCount() )
{
eState = SVPAR_ERROR;
}
@@ -1682,7 +1677,7 @@ void SwHTMLParser::NextToken( int nToken )
OSL_ENSURE( !m_pTable, "table in table not allowed here" );
if( !m_pTable && (IsNewDoc() || !m_pPam->GetNode().FindTableNode()) &&
(m_pPam->GetPoint()->nNode.GetIndex() >
- m_pDoc->GetNodes().GetEndOfExtras().GetIndex() ||
+ m_xDoc->GetNodes().GetEndOfExtras().GetIndex() ||
!m_pPam->GetNode().FindFootnoteStartNode() ) )
{
if ( m_nParaCnt < 5 )
@@ -1905,7 +1900,7 @@ void SwHTMLParser::NextToken( int nToken )
if( HTML_O_DIR == rOption.GetToken() )
{
const OUString& rDir = rOption.GetString();
- SfxItemSet aItemSet( m_pDoc->GetAttrPool(),
+ SfxItemSet aItemSet( m_xDoc->GetAttrPool(),
m_pCSS1Parser->GetWhichMap() );
SvxCSS1PropertyInfo aPropInfo;
OUString aDummy;
@@ -2134,7 +2129,7 @@ bool SwHTMLParser::AppendTextNode( SwHTMLAppendMode eMode, bool bUpdateNum )
SwPosition aOldPos( *m_pPam->GetPoint() );
- bool bRet = m_pDoc->getIDocumentContentOperations().AppendTextNode( *m_pPam->GetPoint() );
+ bool bRet = m_xDoc->getIDocumentContentOperations().AppendTextNode( *m_pPam->GetPoint() );
// Zeichen-Attribute aufspalten und ggf keine setzen, die ueber den
// ganzen Absatz gesetzt sind
@@ -2402,7 +2397,7 @@ void SwHTMLParser::AddParSpace()
sal_uLong nNdIdx = m_pPam->GetPoint()->nNode.GetIndex() - 1;
- SwTextNode *pTextNode = m_pDoc->GetNodes()[nNdIdx]->GetTextNode();
+ SwTextNode *pTextNode = m_xDoc->GetNodes()[nNdIdx]->GetTextNode();
if( !pTextNode )
return;
@@ -2483,8 +2478,8 @@ void SwHTMLParser::Show()
Application::Reschedule();
- if( ( m_pDoc->GetDocShell() && m_pDoc->GetDocShell()->IsAbortingImport() )
- || 1 == m_pDoc->getReferenceCount() )
+ if( ( m_xDoc->GetDocShell() && m_xDoc->GetDocShell()->IsAbortingImport() )
+ || 1 == m_xDoc->getReferenceCount() )
{
// wurde der Import vom SFX abgebrochen?
eState = SVPAR_ERROR;
@@ -2515,15 +2510,15 @@ void SwHTMLParser::ShowStatline()
// Laufbalkenanzeige
if( !GetMedium() || !GetMedium()->IsRemote() )
{
- ::SetProgressState( rInput.Tell(), m_pDoc->GetDocShell() );
+ ::SetProgressState( rInput.Tell(), m_xDoc->GetDocShell() );
CheckActionViewShell();
}
else
{
Application::Reschedule();
- if( ( m_pDoc->GetDocShell() && m_pDoc->GetDocShell()->IsAbortingImport() )
- || 1 == m_pDoc->getReferenceCount() )
+ if( ( m_xDoc->GetDocShell() && m_xDoc->GetDocShell()->IsAbortingImport() )
+ || 1 == m_xDoc->getReferenceCount() )
// wurde der Import vom SFX abgebrochen?
eState = SVPAR_ERROR;
@@ -2545,7 +2540,7 @@ SwViewShell *SwHTMLParser::CallStartAction( SwViewShell *pVSh, bool bChkPtr )
#if OSL_DEBUG_LEVEL > 0
SwViewShell *pOldVSh = pVSh;
#endif
- pVSh = m_pDoc->getIDocumentLayoutAccess().GetCurrentViewShell();
+ pVSh = m_xDoc->getIDocumentLayoutAccess().GetCurrentViewShell();
#if OSL_DEBUG_LEVEL > 0
OSL_ENSURE( !pVSh || !pOldVSh || pOldVSh == pVSh, "CallStartAction: Wer hat die SwViewShell ausgetauscht?" );
if( pOldVSh && !pVSh )
@@ -2569,7 +2564,7 @@ SwViewShell *SwHTMLParser::CallEndAction( bool bChkAction, bool bChkPtr )
{
if( bChkPtr )
{
- SwViewShell *pVSh = m_pDoc->getIDocumentLayoutAccess().GetCurrentViewShell();
+ SwViewShell *pVSh = m_xDoc->getIDocumentLayoutAccess().GetCurrentViewShell();
OSL_ENSURE( !pVSh || m_pActionViewShell == pVSh,
"CallEndAction: Wer hat die SwViewShell ausgetauscht?" );
#if OSL_DEBUG_LEVEL > 0
@@ -2609,7 +2604,7 @@ SwViewShell *SwHTMLParser::CallEndAction( bool bChkAction, bool bChkPtr )
// sollte der Parser der Letzte sein, der das Doc haelt, dann kann
// man hier abbrechen und einen Fehler setzen.
- if( 1 == m_pDoc->getReferenceCount() )
+ if( 1 == m_xDoc->getReferenceCount() )
{
eState = SVPAR_ERROR;
}
@@ -2622,7 +2617,7 @@ SwViewShell *SwHTMLParser::CallEndAction( bool bChkAction, bool bChkPtr )
SwViewShell *SwHTMLParser::CheckActionViewShell()
{
- SwViewShell *pVSh = m_pDoc->getIDocumentLayoutAccess().GetCurrentViewShell();
+ SwViewShell *pVSh = m_xDoc->getIDocumentLayoutAccess().GetCurrentViewShell();
OSL_ENSURE( !pVSh || m_pActionViewShell == pVSh,
"CheckActionViewShell: Wer hat die SwViewShell ausgetauscht?" );
#if OSL_DEBUG_LEVEL > 0
@@ -2678,7 +2673,7 @@ void SwHTMLParser::SetAttr_( bool bChkEnd, bool bBeforeTable,
// Attribute im Content-Bereich duerfen nicht gesetzt
// werden, wenn wir in einem Sonderbereich stehen, aber
// umgekekehrt schon.
- sal_uLong nEndOfIcons = m_pDoc->GetNodes().GetEndOfExtras().GetIndex();
+ sal_uLong nEndOfIcons = m_xDoc->GetNodes().GetEndOfExtras().GetIndex();
bSetAttr = nEndParaIdx < rEndIdx.GetIndex() ||
rEndIdx.GetIndex() > nEndOfIcons ||
nEndParaIdx <= nEndOfIcons;
@@ -2724,7 +2719,7 @@ void SwHTMLParser::SetAttr_( bool bChkEnd, bool bBeforeTable,
pAttr = pPrev;
continue;
}
- pCNd = m_pDoc->GetNodes().GoNext( &(pAttr->nSttPara) );
+ pCNd = m_xDoc->GetNodes().GoNext( &(pAttr->nSttPara) );
if( pCNd )
pAttr->nSttContent = 0;
else
@@ -2809,7 +2804,7 @@ void SwHTMLParser::SetAttr_( bool bChkEnd, bool bBeforeTable,
case RES_FLTR_BOOKMARK: // insert bookmark
{
const OUString sName( static_cast<SfxStringItem*>(pAttr->pItem.get())->GetValue() );
- IDocumentMarkAccess* const pMarkAccess = m_pDoc->getIDocumentMarkAccess();
+ IDocumentMarkAccess* const pMarkAccess = m_xDoc->getIDocumentMarkAccess();
IDocumentMarkAccess::const_iterator_t ppBkmk = pMarkAccess->findMark( sName );
if( ppBkmk != pMarkAccess->getAllMarksEnd() &&
ppBkmk->get()->GetMarkStart() == *pAttrPam->GetPoint() )
@@ -2871,10 +2866,10 @@ void SwHTMLParser::SetAttr_( bool bChkEnd, bool bBeforeTable,
case RES_BACKGROUND:
{
const SvxBrushItem& rBrush = static_cast< SvxBrushItem& >(*pAttr->pItem);
- SfxItemSet aNewSet(m_pDoc->GetAttrPool(), XATTR_FILL_FIRST, XATTR_FILL_LAST);
+ SfxItemSet aNewSet(m_xDoc->GetAttrPool(), XATTR_FILL_FIRST, XATTR_FILL_LAST);
setSvxBrushItemAsFillAttributesToTargetSet(rBrush, aNewSet);
- m_pDoc->getIDocumentContentOperations().InsertItemSet(*pAttrPam, aNewSet, SetAttrMode::DONTREPLACE);
+ m_xDoc->getIDocumentContentOperations().InsertItemSet(*pAttrPam, aNewSet, SetAttrMode::DONTREPLACE);
break;
}
default:
@@ -2888,7 +2883,7 @@ void SwHTMLParser::SetAttr_( bool bChkEnd, bool bBeforeTable,
m_eJumpTo = JUMPTO_NONE;
}
- m_pDoc->getIDocumentContentOperations().InsertPoolItem( *pAttrPam, *pAttr->pItem, SetAttrMode::DONTREPLACE );
+ m_xDoc->getIDocumentContentOperations().InsertPoolItem( *pAttrPam, *pAttr->pItem, SetAttrMode::DONTREPLACE );
}
pAttrPam->DeleteMark();
@@ -2916,7 +2911,7 @@ void SwHTMLParser::SetAttr_( bool bChkEnd, bool bBeforeTable,
}
else
{
- sal_uLong nEndOfIcons = m_pDoc->GetNodes().GetEndOfExtras().GetIndex();
+ sal_uLong nEndOfIcons = m_xDoc->GetNodes().GetEndOfExtras().GetIndex();
bMoveFly = nFlyParaIdx < rEndIdx.GetIndex() ||
rEndIdx.GetIndex() > nEndOfIcons ||
nFlyParaIdx <= nEndOfIcons;
@@ -2970,7 +2965,7 @@ void SwHTMLParser::SetAttr_( bool bChkEnd, bool bBeforeTable,
pAttrPam->Move( fnMoveBackward );
}
- m_pDoc->getIDocumentContentOperations().InsertPoolItem( *pAttrPam, *pAttr->pItem );
+ m_xDoc->getIDocumentContentOperations().InsertPoolItem( *pAttrPam, *pAttr->pItem );
aFields.pop_front();
delete pAttr;
@@ -3272,10 +3267,10 @@ void SwHTMLParser::SplitAttrTab( HTMLAttrTable& rNewAttrTab,
{
sal_uLong nOldEnd = nEndIdx.GetIndex();
sal_uLong nTmpIdx;
- if( ( nTmpIdx = m_pDoc->GetNodes().GetEndOfExtras().GetIndex()) >= nOldEnd ||
- ( nTmpIdx = m_pDoc->GetNodes().GetEndOfAutotext().GetIndex()) >= nOldEnd )
+ if( ( nTmpIdx = m_xDoc->GetNodes().GetEndOfExtras().GetIndex()) >= nOldEnd ||
+ ( nTmpIdx = m_xDoc->GetNodes().GetEndOfAutotext().GetIndex()) >= nOldEnd )
{
- nTmpIdx = m_pDoc->GetNodes().GetEndOfInserts().GetIndex();
+ nTmpIdx = m_xDoc->GetNodes().GetEndOfInserts().GetIndex();
}
SwContentNode* pCNd = SwNodes::GoPrevious(&nEndIdx);
@@ -3440,7 +3435,7 @@ void SwHTMLParser::NewStdAttr( int nToken )
// Styles parsen
if( HasStyleOptions( aStyle, aId, aClass, &aLang, &aDir ) )
{
- SfxItemSet aItemSet( m_pDoc->GetAttrPool(), m_pCSS1Parser->GetWhichMap() );
+ SfxItemSet aItemSet( m_xDoc->GetAttrPool(), m_pCSS1Parser->GetWhichMap() );
SvxCSS1PropertyInfo aPropInfo;
if( ParseStyleOptions( aStyle, aId, aClass, aItemSet, aPropInfo, &aLang, &aDir ) )
@@ -3493,7 +3488,7 @@ void SwHTMLParser::NewStdAttr( int nToken,
// Styles parsen
if( HasStyleOptions( aStyle, aId, aClass, &aLang, &aDir ) )
{
- SfxItemSet aItemSet( m_pDoc->GetAttrPool(), m_pCSS1Parser->GetWhichMap() );
+ SfxItemSet aItemSet( m_xDoc->GetAttrPool(), m_pCSS1Parser->GetWhichMap() );
SvxCSS1PropertyInfo aPropInfo;
aItemSet.Put( rItem );
@@ -3582,7 +3577,7 @@ void SwHTMLParser::NewBasefontAttr()
// Styles parsen
if( HasStyleOptions( aStyle, aId, aClass, &aLang, &aDir ) )
{
- SfxItemSet aItemSet( m_pDoc->GetAttrPool(), m_pCSS1Parser->GetWhichMap() );
+ SfxItemSet aItemSet( m_xDoc->GetAttrPool(), m_pCSS1Parser->GetWhichMap() );
SvxCSS1PropertyInfo aPropInfo;
//CJK has different defaults
@@ -3741,7 +3736,7 @@ void SwHTMLParser::NewFontAttr( int nToken )
if( !aFace.isEmpty() && !m_pCSS1Parser->IsIgnoreFontFamily() )
{
const FontList *pFList = nullptr;
- SwDocShell *pDocSh = m_pDoc->GetDocShell();
+ SwDocShell *pDocSh = m_xDoc->GetDocShell();
if( pDocSh )
{
const SvxFontListItem *pFListItem =
@@ -3785,7 +3780,7 @@ void SwHTMLParser::NewFontAttr( int nToken )
// Styles parsen
if( HasStyleOptions( aStyle, aId, aClass, &aLang, &aDir ) )
{
- SfxItemSet aItemSet( m_pDoc->GetAttrPool(), m_pCSS1Parser->GetWhichMap() );
+ SfxItemSet aItemSet( m_xDoc->GetAttrPool(), m_pCSS1Parser->GetWhichMap() );
SvxCSS1PropertyInfo aPropInfo;
if( nFontHeight )
@@ -3900,7 +3895,7 @@ void SwHTMLParser::NewPara()
// keine der CSS1-Properties der Klasse hart formatiert werden muss!!!)
if( HasStyleOptions( aStyle, aId, aEmptyOUStr, &aLang, &aDir ) )
{
- SfxItemSet aItemSet( m_pDoc->GetAttrPool(), m_pCSS1Parser->GetWhichMap() );
+ SfxItemSet aItemSet( m_xDoc->GetAttrPool(), m_pCSS1Parser->GetWhichMap() );
SvxCSS1PropertyInfo aPropInfo;
if( ParseStyleOptions( aStyle, aId, aEmptyOUStr, aItemSet, aPropInfo, &aLang, &aDir ) )
@@ -4034,7 +4029,7 @@ void SwHTMLParser::NewHeading( int nToken )
// Styles parsen (zu Class siehe auch NewPara)
if( HasStyleOptions( aStyle, aId, aEmptyOUStr, &aLang, &aDir ) )
{
- SfxItemSet aItemSet( m_pDoc->GetAttrPool(), m_pCSS1Parser->GetWhichMap() );
+ SfxItemSet aItemSet( m_xDoc->GetAttrPool(), m_pCSS1Parser->GetWhichMap() );
SvxCSS1PropertyInfo aPropInfo;
if( ParseStyleOptions( aStyle, aId, aEmptyOUStr, aItemSet, aPropInfo, &aLang, &aDir ) )
@@ -4168,7 +4163,7 @@ void SwHTMLParser::NewTextFormatColl( int nToken, sal_uInt16 nColl )
// Styles parsen (zu Class siehe auch NewPara)
if( HasStyleOptions( aStyle, aId, aEmptyOUStr, &aLang, &aDir ) )
{
- SfxItemSet aItemSet( m_pDoc->GetAttrPool(), m_pCSS1Parser->GetWhichMap() );
+ SfxItemSet aItemSet( m_xDoc->GetAttrPool(), m_pCSS1Parser->GetWhichMap() );
SvxCSS1PropertyInfo aPropInfo;
if( ParseStyleOptions( aStyle, aId, aEmptyOUStr, aItemSet, aPropInfo, &aLang, &aDir ) )
@@ -4315,7 +4310,7 @@ void SwHTMLParser::NewDefList()
// Styles parsen
if( HasStyleOptions( aStyle, aId, aClass, &aLang, &aDir ) )
{
- SfxItemSet aItemSet( m_pDoc->GetAttrPool(), m_pCSS1Parser->GetWhichMap() );
+ SfxItemSet aItemSet( m_xDoc->GetAttrPool(), m_pCSS1Parser->GetWhichMap() );
SvxCSS1PropertyInfo aPropInfo;
if( ParseStyleOptions( aStyle, aId, aClass, aItemSet, aPropInfo, &aLang, &aDir ) )
@@ -4448,7 +4443,7 @@ bool SwHTMLParser::HasCurrentParaFlys( bool bNoSurroundOnly,
// sonst: Der Absatz enthaelt irgendeinen Rahmen
SwNodeIndex& rNodeIdx = m_pPam->GetPoint()->nNode;
- const SwFrameFormats& rFrameFormatTable = *m_pDoc->GetSpzFrameFormats();
+ const SwFrameFormats& rFrameFormatTable = *m_xDoc->GetSpzFrameFormats();
bool bFound = false;
for ( size_t i=0; i<rFrameFormatTable.size(); i++ )
@@ -4703,7 +4698,7 @@ void SwHTMLParser::SetTextCollAttrs( HTMLAttrContext *pContext )
}
// Die Vorlage setzen
- m_pDoc->SetTextFormatColl( *m_pPam, pCollToSet );
+ m_xDoc->SetTextFormatColl( *m_pPam, pCollToSet );
// ggf. noch den Absatz-Einzug korrigieren
const SvxLRSpaceItem& rLRItem = pCollToSet->GetLRSpace();
@@ -4777,7 +4772,7 @@ void SwHTMLParser::NewCharFormat( int nToken )
// Styles parsen (zu Class siehe auch NewPara)
if( HasStyleOptions( aStyle, aId, aEmptyOUStr, &aLang, &aDir ) )
{
- SfxItemSet aItemSet( m_pDoc->GetAttrPool(), m_pCSS1Parser->GetWhichMap() );
+ SfxItemSet aItemSet( m_xDoc->GetAttrPool(), m_pCSS1Parser->GetWhichMap() );
SvxCSS1PropertyInfo aPropInfo;
if( ParseStyleOptions( aStyle, aId, aEmptyOUStr, aItemSet, aPropInfo, &aLang, &aDir ) )
@@ -4855,7 +4850,7 @@ void SwHTMLParser::InsertSpacer()
// einen leeren Textrahmen anlegen
// den Itemset holen
- SfxItemSet aFrameSet( m_pDoc->GetAttrPool(),
+ SfxItemSet aFrameSet( m_xDoc->GetAttrPool(),
RES_FRMATR_BEGIN, RES_FRMATR_END-1 );
if( !IsNewDoc() )
Reader::ResetFrameFormatAttrs( aFrameSet );
@@ -4866,7 +4861,7 @@ void SwHTMLParser::InsertSpacer()
// und noch die Groesse des Rahmens
Size aDfltSz( MINFLY, MINFLY );
Size aSpace( 0, 0 );
- SfxItemSet aDummyItemSet( m_pDoc->GetAttrPool(),
+ SfxItemSet aDummyItemSet( m_xDoc->GetAttrPool(),
m_pCSS1Parser->GetWhichMap() );
SvxCSS1PropertyInfo aDummyPropInfo;
@@ -4882,7 +4877,7 @@ void SwHTMLParser::InsertSpacer()
// der Rahmen anlegen
RndStdIds eAnchorId =
static_cast<const SwFormatAnchor &>(aFrameSet.Get(RES_ANCHOR)).GetAnchorId();
- SwFrameFormat *pFlyFormat = m_pDoc->MakeFlySection( eAnchorId,
+ SwFrameFormat *pFlyFormat = m_xDoc->MakeFlySection( eAnchorId,
m_pPam->GetPoint(), &aFrameSet );
// Ggf Frames anlegen und auto-geb. Rahmen registrieren
RegisterFlyFrame( pFlyFormat );
@@ -4907,7 +4902,7 @@ void SwHTMLParser::InsertSpacer()
SetAttr(); // noch offene Absatz-Attribute setzen
- pTextNode = m_pDoc->GetNodes()[m_pPam->GetPoint()->nNode.GetIndex()-1]
+ pTextNode = m_xDoc->GetNodes()[m_pPam->GetPoint()->nNode.GetIndex()-1]
->GetTextNode();
// Wenn der Abstz davor kein Textenode ist, dann wird jetzt
@@ -4966,7 +4961,7 @@ void SwHTMLParser::InsertSpacer()
{
NewAttr( &m_aAttrTab.pKerning, SvxKerningItem( (short)nSize, RES_CHRATR_KERNING ) );
OUString aTmp( ' ' );
- m_pDoc->getIDocumentContentOperations().InsertString( *m_pPam, aTmp );
+ m_xDoc->getIDocumentContentOperations().InsertString( *m_pPam, aTmp );
EndAttr( m_aAttrTab.pKerning );
}
}
@@ -4987,7 +4982,7 @@ sal_uInt16 SwHTMLParser::ToTwips( sal_uInt16 nPixel )
SwTwips SwHTMLParser::GetCurrentBrowseWidth()
{
- const SwTwips nWidth = SwHTMLTableLayout::GetBrowseWidth( *m_pDoc );
+ const SwTwips nWidth = SwHTMLTableLayout::GetBrowseWidth( *m_xDoc );
if( nWidth )
return nWidth;
@@ -5090,7 +5085,7 @@ void SwHTMLParser::InsertLineBreak()
SwTextNode* pTextNd = rNodeIdx.GetNode().GetTextNode();
if( pTextNd )
{
- const SwFrameFormats& rFrameFormatTable = *m_pDoc->GetSpzFrameFormats();
+ const SwFrameFormats& rFrameFormatTable = *m_xDoc->GetSpzFrameFormats();
for( size_t i=0; i<rFrameFormatTable.size(); i++ )
{
@@ -5139,7 +5134,7 @@ void SwHTMLParser::InsertLineBreak()
bool bBreakItem = false;
if( HasStyleOptions( aStyle, aId, aClass ) )
{
- SfxItemSet aItemSet( m_pDoc->GetAttrPool(), m_pCSS1Parser->GetWhichMap() );
+ SfxItemSet aItemSet( m_xDoc->GetAttrPool(), m_pCSS1Parser->GetWhichMap() );
SvxCSS1PropertyInfo aPropInfo;
if( ParseStyleOptions( aStyle, aId, aClass, aItemSet, aPropInfo ) )
@@ -5165,7 +5160,7 @@ void SwHTMLParser::InsertLineBreak()
// wenn kein CLEAR ausgefuehrt werden sollte oder konnte, wird
// ein Zeilenumbruch eingef?gt
OUString sTmp( (sal_Unicode)0x0a ); // make the Mac happy :-)
- m_pDoc->getIDocumentContentOperations().InsertString( *m_pPam, sTmp );
+ m_xDoc->getIDocumentContentOperations().InsertString( *m_pPam, sTmp );
}
else if( m_pPam->GetPoint()->nContent.GetIndex() )
{
@@ -5412,7 +5407,7 @@ void SwHTMLParser::ParseMoreMetaOptions()
sText.append("\">");
SwPostItField aPostItField(
- static_cast<SwPostItFieldType*>(m_pDoc->getIDocumentFieldsAccess().GetSysFieldType( RES_POSTITFLD )),
+ static_cast<SwPostItFieldType*>(m_xDoc->getIDocumentFieldsAccess().GetSysFieldType( RES_POSTITFLD )),
aEmptyOUStr, sText.makeStringAndClear(), aEmptyOUStr, aEmptyOUStr, DateTime( DateTime::SYSTEM ) );
SwFormatField aFormatField( aPostItField );
InsertAttr( aFormatField, false );
diff --git a/sw/source/filter/html/swhtml.hxx b/sw/source/filter/html/swhtml.hxx
index 7b57351e6f47..6492f283bf69 100644
--- a/sw/source/filter/html/swhtml.hxx
+++ b/sw/source/filter/html/swhtml.hxx
@@ -24,6 +24,7 @@
#include <sfx2/sfxhtml.hxx>
#include <svl/macitem.hxx>
#include <editeng/svxenum.hxx>
+#include <rtl/ref.hxx>
#include <fmtornt.hxx>
#include <com/sun/star/drawing/XShape.hpp>
#include <com/sun/star/form/XFormComponent.hpp>
@@ -397,7 +398,7 @@ class SwHTMLParser : public SfxHTMLParser, public SwClient
SwHTMLNumRuleInfo *m_pNumRuleInfo;
SwPendingStack *m_pPendStack;
- SwDoc *m_pDoc;
+ rtl::Reference<SwDoc> m_xDoc;
SwPaM *m_pPam; // SwPosition duerfte doch reichen, oder ??
SwViewShell *m_pActionViewShell; // SwViewShell, an der das StartAction
// gerufen wurde.