[Libreoffice-commits] core.git: sw/source

Noel Grandin noel at peralex.com
Mon Jun 27 05:22:36 UTC 2016


 sw/source/ui/config/optpage.cxx                |    8 ----
 sw/source/ui/frmdlg/frmpage.cxx                |    4 --
 sw/source/uibase/cctrl/swlbox.cxx              |   19 ++--------
 sw/source/uibase/docvw/AnchorOverlayObject.cxx |   45 -------------------------
 sw/source/uibase/docvw/srcedtw.cxx             |    3 -
 sw/source/uibase/inc/bmpwin.hxx                |    1 
 sw/source/uibase/inc/content.hxx               |    3 -
 sw/source/uibase/inc/optpage.hxx               |    1 
 sw/source/uibase/inc/redlndlg.hxx              |    1 
 sw/source/uibase/inc/srcedtw.hxx               |    1 
 sw/source/uibase/inc/swlbox.hxx                |    1 
 sw/source/uibase/inc/tablemgr.hxx              |    1 
 sw/source/uibase/inc/unomod.hxx                |    2 -
 sw/source/uibase/misc/redlndlg.cxx             |    8 +---
 sw/source/uibase/table/tablemgr.cxx            |    8 ----
 sw/source/uibase/uno/unomod.cxx                |   16 +++-----
 sw/source/uibase/utlui/content.cxx             |   24 ++-----------
 17 files changed, 23 insertions(+), 123 deletions(-)

New commits:
commit 1bf97d99e7529f1a69688522ac271636059a3391
Author: Noel Grandin <noel at peralex.com>
Date:   Sat Jun 25 23:03:53 2016 +0200

    loplugin:singlevalfields in sw(part1)
    
    Change-Id: I0c6f545a8818da1f226c3958580abeeff0dc87b7
    Reviewed-on: https://gerrit.libreoffice.org/26664
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noelgrandin at gmail.com>

diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index 84c3cf2..2369aa0 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -549,7 +549,6 @@ SwStdFontTabPage::SwStdFontTabPage( vcl::Window* pParent,
     m_bSetLabelDefault(true),
     m_bIdxDefault(false),
     m_bSetIdxDefault(true),
-    m_bDeletePrinter(false),
 
     m_bListHeightDefault    (false),
     m_bSetListHeightDefault (false),
@@ -611,8 +610,6 @@ SwStdFontTabPage::~SwStdFontTabPage()
 void SwStdFontTabPage::dispose()
 {
     delete m_pFontList;
-    if (m_bDeletePrinter)
-        m_pPrt.disposeAndClear();
     m_pLabelFT.clear();
     m_pStandardBox.clear();
     m_pStandardHeightLB.clear();
@@ -802,11 +799,6 @@ void SwStdFontTabPage::Reset( const SfxItemSet* rSet)
 
     const SfxPoolItem* pItem;
 
-    if (m_bDeletePrinter)
-    {
-        m_pPrt.disposeAndClear();
-    }
-
     if(SfxItemState::SET == rSet->GetItemState(FN_PARAM_PRINTER, false, &pItem))
     {
         m_pPrt = static_cast<SfxPrinter*>(static_cast<const SwPtrItem*>(pItem)->GetValue());
diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index df4760d..7f90f17 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -2627,7 +2627,6 @@ BmpWindow::BmpWindow(vcl::Window* pPar, WinBits nStyle)
     , bHorz(false)
     , bVert(false)
     , bGraphic(false)
-    , bLeftAlign(false)
 {
 }
 
@@ -2675,8 +2674,7 @@ void BmpWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle&)
         else
             aPntSz.Width() = aPntSz.Height() * nRelGrf /100;
 
-        if (!bLeftAlign)
-            aPntPos.X() += nWidth - aPntSz.Width() ;
+        aPntPos.X() += nWidth - aPntSz.Width() ;
     }
 
     // #i119307# clear window background, the graphic might have transparency
diff --git a/sw/source/uibase/cctrl/swlbox.cxx b/sw/source/uibase/cctrl/swlbox.cxx
index 9b42902..9ee1e32 100644
--- a/sw/source/uibase/cctrl/swlbox.cxx
+++ b/sw/source/uibase/cctrl/swlbox.cxx
@@ -23,19 +23,16 @@
 #include <swlbox.hxx>
 
 //     Description: ListboxElement
-SwBoxEntry::SwBoxEntry() :
-    bNew(false)
+SwBoxEntry::SwBoxEntry()
 {
 }
 
 SwBoxEntry::SwBoxEntry(const OUString& aNam) :
-    bNew(false),
     aName(aNam)
 {
 }
 
 SwBoxEntry::SwBoxEntry(const SwBoxEntry& rOld) :
-    bNew(rOld.bNew),
     aName(rOld.aName)
 {
 }
@@ -78,20 +75,12 @@ void SwComboBox::RemoveEntryAt(sal_Int32 const nPos)
         return;
 
     // Remove old element
-    SwBoxEntry const& rEntry = m_EntryList[nPos];
     ComboBox::RemoveEntryAt(nPos);
 
     // Don't add new entries to the list
-    if (rEntry.bNew)
-    {
-        m_EntryList.erase(m_EntryList.begin() + nPos);
-    }
-    else
-    {
-        // add to DelEntryLst
-        m_DelEntryList.push_back(m_EntryList[nPos]);
-        m_EntryList.erase(m_EntryList.begin() + nPos);
-    }
+    // add to DelEntryLst
+    m_DelEntryList.push_back(m_EntryList[nPos]);
+    m_EntryList.erase(m_EntryList.begin() + nPos);
 }
 
 const SwBoxEntry& SwComboBox::GetSwEntry(sal_Int32 const nPos) const
diff --git a/sw/source/uibase/docvw/AnchorOverlayObject.cxx b/sw/source/uibase/docvw/AnchorOverlayObject.cxx
index 4f8d0e1..850228e 100644
--- a/sw/source/uibase/docvw/AnchorOverlayObject.cxx
+++ b/sw/source/uibase/docvw/AnchorOverlayObject.cxx
@@ -48,7 +48,6 @@ private:
     double                          mfDiscreteLineWidth;
 
     // bitfield
-    bool                            mbShadow : 1;
     bool                            mbLineSolid : 1;
 
 protected:
@@ -70,7 +69,6 @@ public:
         maAnchorState(aAnchorState),
         maColor(rColor),
         mfDiscreteLineWidth(fDiscreteLineWidth),
-        mbShadow(false),
         mbLineSolid(bLineSolid)
     {}
 
@@ -81,7 +79,6 @@ public:
     AnchorState getAnchorState() const { return maAnchorState; }
     const basegfx::BColor& getColor() const { return maColor; }
     double getDiscreteLineWidth() const { return mfDiscreteLineWidth; }
-    bool getShadow() const { return mbShadow; }
     bool getLineSolid() const { return mbLineSolid; }
 
     virtual bool operator==( const drawinglayer::primitive2d::BasePrimitive2D& rPrimitive ) const override;
@@ -148,47 +145,6 @@ drawinglayer::primitive2d::Primitive2DContainer AnchorPrimitive::create2DDecompo
         }
     }
 
-    if(!aRetval.empty() && getShadow())
-    {
-        // shadow is only for triangle and line start, and in upper left
-        // and lower right direction, in different colors
-        const double fColorChange(20.0 / 255.0);
-        const basegfx::B3DTuple aColorChange(fColorChange, fColorChange, fColorChange);
-        basegfx::BColor aLighterColor(getColor() + aColorChange);
-        basegfx::BColor aDarkerColor(getColor() - aColorChange);
-
-        aLighterColor.clamp();
-        aDarkerColor.clamp();
-
-        // create shadow sequence
-        drawinglayer::primitive2d::Primitive2DContainer aShadows(2);
-        basegfx::B2DHomMatrix aTransform;
-
-        aTransform.set(0, 2, -getDiscreteUnit());
-        aTransform.set(1, 2, -getDiscreteUnit());
-
-        aShadows[0] = drawinglayer::primitive2d::Primitive2DReference(
-            new drawinglayer::primitive2d::ShadowPrimitive2D(
-                aTransform,
-                aLighterColor,
-                aRetval));
-
-        aTransform.set(0, 2, getDiscreteUnit());
-        aTransform.set(1, 2, getDiscreteUnit());
-
-        aShadows[1] = drawinglayer::primitive2d::Primitive2DReference(
-            new drawinglayer::primitive2d::ShadowPrimitive2D(
-                aTransform,
-                aDarkerColor,
-                aRetval));
-
-        // add shadow before geometry to make it be proccessed first
-        const drawinglayer::primitive2d::Primitive2DContainer aTemporary(aRetval);
-
-        aRetval = aShadows;
-        aRetval.append(aTemporary);
-    }
-
     if ( AS_ALL == maAnchorState ||
          AS_END == maAnchorState )
     {
@@ -217,7 +173,6 @@ bool AnchorPrimitive::operator==( const drawinglayer::primitive2d::BasePrimitive
             && getAnchorState() == rCompare.getAnchorState()
             && getColor() == rCompare.getColor()
             && getDiscreteLineWidth() == rCompare.getDiscreteLineWidth()
-            && getShadow() == rCompare.getShadow()
             && getLineSolid() == rCompare.getLineSolid());
     }
 
diff --git a/sw/source/uibase/docvw/srcedtw.cxx b/sw/source/uibase/docvw/srcedtw.cxx
index 4bce8bc..54f03f9 100644
--- a/sw/source/uibase/docvw/srcedtw.cxx
+++ b/sw/source/uibase/docvw/srcedtw.cxx
@@ -249,7 +249,6 @@ SwSrcEditWindow::SwSrcEditWindow( vcl::Window* pParent, SwSrcView* pParentView )
     nCurTextWidth(0),
     nStartLine(USHRT_MAX),
     eSourceEncoding(osl_getThreadTextEncoding()),
-    bDoSyntaxHighlight(true),
     bHighlighting(false),
     aSyntaxIdle("sw uibase SwSrcEditWindow Syntax")
 {
@@ -674,7 +673,7 @@ void SwSrcEditWindow::DoSyntaxHighlight( sal_uInt16 nPara )
 
 void SwSrcEditWindow::DoDelayedSyntaxHighlight( sal_uInt16 nPara )
 {
-    if ( !bHighlighting && bDoSyntaxHighlight )
+    if ( !bHighlighting )
     {
         aSyntaxLineTable.insert( nPara );
         aSyntaxIdle.Start();
diff --git a/sw/source/uibase/inc/bmpwin.hxx b/sw/source/uibase/inc/bmpwin.hxx
index 442147a..6ea8d06 100644
--- a/sw/source/uibase/inc/bmpwin.hxx
+++ b/sw/source/uibase/inc/bmpwin.hxx
@@ -34,7 +34,6 @@ private:
     bool        bHorz : 1;
     bool        bVert : 1;
     bool        bGraphic : 1;
-    bool        bLeftAlign : 1;
 
     virtual void Paint(vcl::RenderContext& /*rRenderContext*/, const Rectangle& rRect) override;
 
diff --git a/sw/source/uibase/inc/content.hxx b/sw/source/uibase/inc/content.hxx
index 27cd9bc..feafa87 100644
--- a/sw/source/uibase/inc/content.hxx
+++ b/sw/source/uibase/inc/content.hxx
@@ -91,7 +91,6 @@ class SwPostItContent : public SwContent
 {
     const SwFormatField*     pField;
     SwRangeRedline*     pRedline;
-    bool                mbPostIt;
 public:
     SwPostItContent( const SwContentType* pCnt,
                             const OUString& rName,
@@ -100,13 +99,11 @@ public:
         : SwContent(pCnt, rName, nYPos)
         , pField(pFormatField)
         , pRedline(nullptr)
-        , mbPostIt(true)
     {}
 
     const SwFormatField* GetPostIt() const  { return pField; }
     SwRangeRedline* GetRedline() { return pRedline; }
     virtual bool    IsProtect()     const override;
-    bool            IsPostIt()   const {return mbPostIt; }
 };
 
 class SwGraphicContent : public SwContent
diff --git a/sw/source/uibase/inc/optpage.hxx b/sw/source/uibase/inc/optpage.hxx
index 03d65cd..51d1f46 100644
--- a/sw/source/uibase/inc/optpage.hxx
+++ b/sw/source/uibase/inc/optpage.hxx
@@ -158,7 +158,6 @@ class SwStdFontTabPage : public SfxTabPage
     bool    m_bSetLabelDefault :1;
     bool    m_bIdxDefault     :1;
     bool    m_bSetIdxDefault  :1;
-    bool    m_bDeletePrinter :1;
 
     bool    m_bListHeightDefault    :1;
     bool    m_bSetListHeightDefault :1;
diff --git a/sw/source/uibase/inc/redlndlg.hxx b/sw/source/uibase/inc/redlndlg.hxx
index c661ae2..f97ba04 100644
--- a/sw/source/uibase/inc/redlndlg.hxx
+++ b/sw/source/uibase/inc/redlndlg.hxx
@@ -81,7 +81,6 @@ class SW_DLLPUBLIC SwRedlineAcceptDlg
     Link<SvTreeListBox*,void> m_aOldSelectHdl;
     Link<SvTreeListBox*,void> m_aOldDeselectHdl;
     bool                    m_bOnlyFormatedRedlines;
-    bool                    m_bHasReadonlySel;
     bool                    m_bRedlnAutoFormat;
 
     // prevent update dialog data during longer operations (cf #102657#)
diff --git a/sw/source/uibase/inc/srcedtw.hxx b/sw/source/uibase/inc/srcedtw.hxx
index d7b57db..5810865 100644
--- a/sw/source/uibase/inc/srcedtw.hxx
+++ b/sw/source/uibase/inc/srcedtw.hxx
@@ -82,7 +82,6 @@ private:
     sal_uInt16          nStartLine;
     rtl_TextEncoding eSourceEncoding;
     bool            bReadonly;
-    bool            bDoSyntaxHighlight;
     bool            bHighlighting;
 
     Idle            aSyntaxIdle;
diff --git a/sw/source/uibase/inc/swlbox.hxx b/sw/source/uibase/inc/swlbox.hxx
index 1d2d34a..94997a3 100644
--- a/sw/source/uibase/inc/swlbox.hxx
+++ b/sw/source/uibase/inc/swlbox.hxx
@@ -34,7 +34,6 @@ class SW_DLLPUBLIC SwBoxEntry
 {
     friend class SwComboBox;
 
-    bool    bNew : 1;
     OUString    aName;
 
 public:
diff --git a/sw/source/uibase/inc/tablemgr.hxx b/sw/source/uibase/inc/tablemgr.hxx
index 7c92756..ce7632d 100644
--- a/sw/source/uibase/inc/tablemgr.hxx
+++ b/sw/source/uibase/inc/tablemgr.hxx
@@ -43,7 +43,6 @@ class SW_DLLPUBLIC SwTableFUNC
 {
     SwFrameFormat    *pFormat;
     SwWrtShell  *pSh;
-    bool        bCopy;
     SwTabCols   aCols;
 
 private:
diff --git a/sw/source/uibase/inc/unomod.hxx b/sw/source/uibase/inc/unomod.hxx
index e41af12..352ed23 100644
--- a/sw/source/uibase/inc/unomod.hxx
+++ b/sw/source/uibase/inc/unomod.hxx
@@ -133,7 +133,7 @@ protected:
     SwView*                     pView;
     SwViewOption*       mpViewOption;
     const SwViewOption*         mpConstViewOption;
-    bool                    bObjectValid:1, bWeb:1, mbApplyZoom;
+    bool                    bObjectValid:1, mbApplyZoom;
 
     FieldUnit   eHRulerUnit;
     bool    mbApplyHRulerMetric;
diff --git a/sw/source/uibase/misc/redlndlg.cxx b/sw/source/uibase/misc/redlndlg.cxx
index eca8ac5..670e3b3 100644
--- a/sw/source/uibase/misc/redlndlg.cxx
+++ b/sw/source/uibase/misc/redlndlg.cxx
@@ -159,7 +159,6 @@ SwRedlineAcceptDlg::SwRedlineAcceptDlg(vcl::Window *pParent, VclBuilderContainer
     m_sFormatCollSet     (SW_RES(STR_REDLINE_FMTCOLLSET)),
     m_sAutoFormat     (SW_RES(STR_REDLINE_AUTOFMT)),
     m_bOnlyFormatedRedlines( false ),
-    m_bHasReadonlySel ( false ),
     m_bRedlnAutoFormat   (bAutoFormat),
     m_bInhibitActivate( false ),
     m_aInserted       (SW_RES(IMG_REDLINE_INSERTED)),
@@ -273,7 +272,6 @@ void SwRedlineAcceptDlg::InitAuthors()
     sal_uInt16 nCount = pSh->GetRedlineCount();
 
     m_bOnlyFormatedRedlines = true;
-    m_bHasReadonlySel = false;
     bool bIsNotFormated = false;
     sal_uInt16 i;
 
@@ -322,8 +320,8 @@ void SwRedlineAcceptDlg::InitAuthors()
 
     m_pTPView->EnableAccept( bEnable && bSel );
     m_pTPView->EnableReject( bEnable && bIsNotFormated && bSel );
-    m_pTPView->EnableAcceptAll( bEnable && !m_bHasReadonlySel );
-    m_pTPView->EnableRejectAll( bEnable && !m_bHasReadonlySel &&
+    m_pTPView->EnableAcceptAll( bEnable );
+    m_pTPView->EnableRejectAll( bEnable &&
                                 !m_bOnlyFormatedRedlines );
 }
 
@@ -1008,7 +1006,7 @@ IMPL_LINK_NOARG_TYPED(SwRedlineAcceptDlg, GotoHdl, Timer *, void)
     bool bEnable = !pSh->getIDocumentRedlineAccess().GetRedlinePassword().getLength();
     m_pTPView->EnableAccept( bEnable && bSel /*&& !bReadonlySel*/ );
     m_pTPView->EnableReject( bEnable && bSel && bIsNotFormated /*&& !bReadonlySel*/ );
-    m_pTPView->EnableRejectAll( bEnable && !m_bOnlyFormatedRedlines && !m_bHasReadonlySel );
+    m_pTPView->EnableRejectAll( bEnable && !m_bOnlyFormatedRedlines );
 }
 
 IMPL_LINK_NOARG_TYPED(SwRedlineAcceptDlg, CommandHdl, SvSimpleTable*, void)
diff --git a/sw/source/uibase/table/tablemgr.cxx b/sw/source/uibase/table/tablemgr.cxx
index a82738d..e9fb41e 100644
--- a/sw/source/uibase/table/tablemgr.cxx
+++ b/sw/source/uibase/table/tablemgr.cxx
@@ -168,18 +168,12 @@ void SwTableFUNC::InitTabCols()
 
 SwTableFUNC::SwTableFUNC(SwWrtShell *pShell)
     : pFormat(pShell->GetTableFormat()),
-      pSh(pShell),
-      bCopy(false)
+      pSh(pShell)
 {
-    // if applicable copy the format for edit
-    if( pFormat && bCopy )
-        pFormat = new SwFrameFormat( *pFormat );
 }
 
 SwTableFUNC::~SwTableFUNC()
 {
-    if(bCopy)
-        delete pFormat;
 }
 
 void SwTableFUNC::UpdateChart()
diff --git a/sw/source/uibase/uno/unomod.cxx b/sw/source/uibase/uno/unomod.cxx
index c648685..0248099 100644
--- a/sw/source/uibase/uno/unomod.cxx
+++ b/sw/source/uibase/uno/unomod.cxx
@@ -541,7 +541,6 @@ SwXViewSettings::SwXViewSettings(SwView* pVw)
     , mpViewOption(nullptr)
     , mpConstViewOption(nullptr)
     , bObjectValid(true)
-    , bWeb(false)
     , mbApplyZoom(false)
     , eHRulerUnit(FUNIT_CM)
     , mbApplyHRulerMetric(false)
@@ -573,7 +572,7 @@ void SwXViewSettings::_preSetValues ()
         pVOpt = pView->GetWrtShell().GetViewOptions();
     }
     else
-        pVOpt = SW_MOD()->GetViewOption(bWeb);
+        pVOpt = SW_MOD()->GetViewOption(false);
 
     mpViewOption = new SwViewOption (*pVOpt);
     mbApplyZoom = false;
@@ -804,14 +803,13 @@ void SwXViewSettings::_postSetValues()
     else
     {
         if(mbApplyHRulerMetric)
-            SW_MOD()->ApplyRulerMetric( (FieldUnit)eHRulerUnit, true, bWeb );
+            SW_MOD()->ApplyRulerMetric( (FieldUnit)eHRulerUnit, true, false );
         if(mbApplyVRulerMetric)
-            SW_MOD()->ApplyRulerMetric( (FieldUnit)eVRulerUnit, false, bWeb );
+            SW_MOD()->ApplyRulerMetric( (FieldUnit)eVRulerUnit, false, false );
     }
 
     SW_MOD()->ApplyUsrPref( *mpViewOption, pView, pView ? SvViewOpt::DestViewOnly
-                                                  : bWeb ? SvViewOpt::DestWeb
-                                                          : SvViewOpt::DestText );
+                                                  : SvViewOpt::DestText );
 
     delete mpViewOption;
     mpViewOption = nullptr;
@@ -829,7 +827,7 @@ void SwXViewSettings::_preGetValues ()
         mpConstViewOption = pView->GetWrtShell().GetViewOptions();
     }
     else
-        mpConstViewOption = SW_MOD()->GetViewOption(bWeb);
+        mpConstViewOption = SW_MOD()->GetViewOption(false);
 }
 
 void SwXViewSettings::_getSingleValue( const comphelper::PropertyInfo & rInfo, uno::Any & rValue )
@@ -948,7 +946,7 @@ void SwXViewSettings::_getSingleValue( const comphelper::PropertyInfo & rInfo, u
             }
             else
             {
-                const SwMasterUsrPref* pUsrPref = SW_MOD()->GetUsrPref( bWeb );
+                const SwMasterUsrPref* pUsrPref = SW_MOD()->GetUsrPref( false );
                 rValue <<= (sal_Int32)pUsrPref->GetHScrollMetric();
             }
             bBool = false;
@@ -964,7 +962,7 @@ void SwXViewSettings::_getSingleValue( const comphelper::PropertyInfo & rInfo, u
             }
             else
             {
-                const SwMasterUsrPref* pUsrPref = SW_MOD()->GetUsrPref( bWeb );
+                const SwMasterUsrPref* pUsrPref = SW_MOD()->GetUsrPref( false );
                 rValue <<= (sal_Int32)pUsrPref->GetVScrollMetric();
             }
             bBool = false;
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx
index fa3c723..abe568f 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -197,10 +197,7 @@ bool SwContent::IsProtect() const
 
 bool SwPostItContent::IsProtect() const
 {
-    if (mbPostIt)
-        return pField->IsProtect();
-    else
-        return false;
+    return pField->IsProtect();
 }
 
 bool SwURLFieldContent::IsProtect() const
@@ -3159,18 +3156,12 @@ void SwContentTree::EditEntry(SvTreeListEntry* pEntry, EditEntryMode nMode)
             m_pActiveShell->GetView().GetPostItMgr()->AssureStdModeAtShell();
             if(nMode == EditEntryMode::DELETE)
             {
-                if (static_cast<SwPostItContent*>(pCnt)->IsPostIt())
-                {
-                    m_pActiveShell->GetView().GetPostItMgr()->SetActiveSidebarWin(nullptr);
-                    m_pActiveShell->DelRight();
-                }
+                m_pActiveShell->GetView().GetPostItMgr()->SetActiveSidebarWin(nullptr);
+                m_pActiveShell->DelRight();
             }
             else
             {
-                if (static_cast<SwPostItContent*>(pCnt)->IsPostIt())
-                    nSlot = FN_POSTIT;
-                else
-                    nSlot = FN_REDLINE_COMMENT;
+                nSlot = FN_POSTIT;
             }
         break;
         case ContentTypeId::INDEX:
@@ -3314,12 +3305,7 @@ void SwContentTree::GotoContent(SwContent* pCnt)
         break;
         case ContentTypeId::POSTIT:
             m_pActiveShell->GetView().GetPostItMgr()->AssureStdModeAtShell();
-            if (static_cast<SwPostItContent*>(pCnt)->IsPostIt())
-                m_pActiveShell->GotoFormatField(*static_cast<SwPostItContent*>(pCnt)->GetPostIt());
-            else
-                m_pActiveShell->GetView().GetDocShell()->GetWrtShell()->GotoRedline(
-                        m_pActiveShell->GetView().GetDocShell()->GetWrtShell()->FindRedlineOfData(static_cast<SwPostItContent*>(pCnt)->GetRedline()->GetRedlineData()));
-
+            m_pActiveShell->GotoFormatField(*static_cast<SwPostItContent*>(pCnt)->GetPostIt());
         break;
         case ContentTypeId::DRAWOBJECT:
         {


More information about the Libreoffice-commits mailing list