summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2022-08-07 20:48:34 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-08-09 08:36:36 +0200
commit029e607ef095be49d0d2e843cc183a99c587deab (patch)
treef92434db7a6f6225147b7b99d181ff8332f9e265 /sw
parent815851d1cbc427bbd85da1638f3b121b253d0926 (diff)
no need to allocate this separately in SwHTMLPosFlyFrame
Change-Id: Icf85acd3d96889248c62925993b06ca7ec7a52a3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137996 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/filter/html/htmlfly.cxx8
-rw-r--r--sw/source/filter/html/htmlfly.hxx6
2 files changed, 7 insertions, 7 deletions
diff --git a/sw/source/filter/html/htmlfly.cxx b/sw/source/filter/html/htmlfly.cxx
index 891ddf1a398b..573fd865d0fa 100644
--- a/sw/source/filter/html/htmlfly.cxx
+++ b/sw/source/filter/html/htmlfly.cxx
@@ -35,7 +35,7 @@ SwHTMLPosFlyFrame::SwHTMLPosFlyFrame( const SwPosFlyFrame& rPosFly,
AllHtmlFlags nFlags ) :
m_pFrameFormat( &rPosFly.GetFormat() ),
m_pSdrObject( pSdrObj ),
- m_pNodeIdex( new SwNodeIndex( rPosFly.GetNdIndex() ) ),
+ m_aNodeIndex( rPosFly.GetNdIndex() ),
m_nOrdNum( rPosFly.GetOrdNum() ),
m_nContentIndex( 0 ),
m_nAllFlags( nFlags )
@@ -56,7 +56,7 @@ SwHTMLPosFlyFrame::SwHTMLPosFlyFrame( const SwPosFlyFrame& rPosFly,
GetRelationOrient();
if( text::RelOrientation::FRAME == eHoriRel || text::RelOrientation::PRINT_AREA == eHoriRel )
{
- const SwContentNode *pCNd = m_pNodeIdex->GetNode().GetContentNode();
+ const SwContentNode *pCNd = m_aNodeIndex.GetNode().GetContentNode();
OSL_ENSURE( pCNd, "No Content-Node at PaM position" );
if( pCNd && m_nContentIndex < pCNd->Len() )
m_nContentIndex++;
@@ -65,7 +65,7 @@ SwHTMLPosFlyFrame::SwHTMLPosFlyFrame( const SwPosFlyFrame& rPosFly,
bool SwHTMLPosFlyFrame::operator<( const SwHTMLPosFlyFrame& rFrame ) const
{
- if( m_pNodeIdex->GetIndex() == rFrame.m_pNodeIdex->GetIndex() )
+ if( m_aNodeIndex.GetIndex() == rFrame.m_aNodeIndex.GetIndex() )
{
if( m_nContentIndex == rFrame.m_nContentIndex )
{
@@ -78,7 +78,7 @@ bool SwHTMLPosFlyFrame::operator<( const SwHTMLPosFlyFrame& rFrame ) const
return m_nContentIndex < rFrame.m_nContentIndex;
}
else
- return m_pNodeIdex->GetIndex() < rFrame.m_pNodeIdex->GetIndex();
+ return m_aNodeIndex.GetIndex() < rFrame.m_aNodeIndex.GetIndex();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/html/htmlfly.hxx b/sw/source/filter/html/htmlfly.hxx
index e19f786ac0a6..58865d361640 100644
--- a/sw/source/filter/html/htmlfly.hxx
+++ b/sw/source/filter/html/htmlfly.hxx
@@ -25,11 +25,11 @@
#include <o3tl/sorted_vector.hxx>
#include <o3tl/typed_flags_set.hxx>
#include <sal/types.h>
+#include <ndindex.hxx>
#include <memory>
class SdrObject;
class SwFrameFormat;
-class SwNodeIndex;
class SwPosFlyFrame;
// ATTENTION: The values of this enum are used directly in the output table!!!
@@ -100,7 +100,7 @@ class SwHTMLPosFlyFrame
{
const SwFrameFormat *m_pFrameFormat; // the frame
const SdrObject *m_pSdrObject; // maybe Sdr-Object
- std::unique_ptr<SwNodeIndex> m_pNodeIdex; // Node-Index
+ SwNodeIndex m_aNodeIndex; // Node-Index
sal_uInt32 m_nOrdNum; // from SwPosFlyFrame
sal_Int32 m_nContentIndex; // its position in content
AllHtmlFlags m_nAllFlags;
@@ -117,7 +117,7 @@ public:
const SwFrameFormat& GetFormat() const { return *m_pFrameFormat; }
const SdrObject* GetSdrObject() const { return m_pSdrObject; }
- const SwNodeIndex& GetNdIndex() const { return *m_pNodeIdex; }
+ const SwNodeIndex& GetNdIndex() const { return m_aNodeIndex; }
sal_Int32 GetContentIndex() const { return m_nContentIndex; }
AllHtmlFlags const & GetOutMode() const { return m_nAllFlags; }
HtmlOut GetOutFn() const { return m_nAllFlags.nOut; }