[Libreoffice-commits] core.git: 2 commits - include/vcl lotuswordpro/inc lotuswordpro/source svx/source sw/source vcl/inc vcl/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Oct 16 11:25:50 UTC 2018


 include/vcl/slider.hxx                               |    1 
 include/vcl/status.hxx                               |    3 
 lotuswordpro/inc/xfilter/xfborders.hxx               |    1 
 lotuswordpro/inc/xfilter/xfcellstyle.hxx             |    2 
 lotuswordpro/inc/xfilter/xfdrawstyle.hxx             |    1 
 lotuswordpro/inc/xfilter/xffont.hxx                  |    8 -
 lotuswordpro/inc/xfilter/xfnumberstyle.hxx           |    3 
 lotuswordpro/inc/xfilter/xfparastyle.hxx             |    6 -
 lotuswordpro/source/filter/xfilter/xfborders.cxx     |    3 
 lotuswordpro/source/filter/xfilter/xfcellstyle.cxx   |   17 ---
 lotuswordpro/source/filter/xfilter/xfdrawstyle.cxx   |   26 ----
 lotuswordpro/source/filter/xfilter/xffont.cxx        |   92 ----------------
 lotuswordpro/source/filter/xfilter/xfnumberstyle.cxx |   29 -----
 lotuswordpro/source/filter/xfilter/xfparastyle.cxx   |   57 ----------
 svx/source/stbctrls/modctrl.cxx                      |    3 
 svx/source/stbctrls/pszctrl.cxx                      |    3 
 svx/source/stbctrls/xmlsecctrl.cxx                   |    3 
 svx/source/stbctrls/zoomsliderctrl.cxx               |    3 
 sw/source/uibase/utlui/viewlayoutctrl.cxx            |    3 
 vcl/inc/listbox.hxx                                  |    1 
 vcl/source/control/imp_listbox.cxx                   |   35 +++---
 vcl/source/control/slider.cxx                        |    8 -
 vcl/source/filter/wmf/wmfwr.cxx                      |    8 -
 vcl/source/filter/wmf/wmfwr.hxx                      |    1 
 vcl/source/window/status.cxx                         |  106 ++++++-------------
 25 files changed, 70 insertions(+), 353 deletions(-)

New commits:
commit 4b1d185de3cdab97805391a41c778cce9c5fce19
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Tue Oct 16 10:14:40 2018 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Tue Oct 16 13:25:17 2018 +0200

    loplugin:singlevalfields in vcl
    
    Change-Id: I159f94fba64acc0e0599b64be02c7864b1ed02c3
    Reviewed-on: https://gerrit.libreoffice.org/61813
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/include/vcl/slider.hxx b/include/vcl/slider.hxx
index cc4919b58fea..6549b4c0ac54 100644
--- a/include/vcl/slider.hxx
+++ b/include/vcl/slider.hxx
@@ -48,7 +48,6 @@ private:
     sal_uInt16      mnStateFlags;
     ScrollType      meScrollType;
     bool            mbCalcSize;
-    bool            mbFullDrag;
     bool            mbScrollTypeSet;
 
     VclPtr<NumericField> mpLinkedField;
diff --git a/include/vcl/status.hxx b/include/vcl/status.hxx
index 1fe0935fc622..bbd270cc4f88 100644
--- a/include/vcl/status.hxx
+++ b/include/vcl/status.hxx
@@ -75,7 +75,6 @@ private:
     sal_uInt16          mnCurItemId;
     sal_uInt16          mnPercent;
     sal_uInt16          mnPercentCount;
-    bool                mbVisibleItems;
     bool                mbFormat;
     bool                mbProgressMode;
     bool                mbInUserDraw;
@@ -129,8 +128,6 @@ public:
     void                HideItem( sal_uInt16 nItemId );
     bool                IsItemVisible( sal_uInt16 nItemId ) const;
 
-    bool                AreItemsVisible() const { return mbVisibleItems; }
-
     void                RedrawItem( sal_uInt16 nItemId );
 
     void                Clear();
diff --git a/svx/source/stbctrls/modctrl.cxx b/svx/source/stbctrls/modctrl.cxx
index b7d92a7063da..81711ff62232 100644
--- a/svx/source/stbctrls/modctrl.cxx
+++ b/svx/source/stbctrls/modctrl.cxx
@@ -111,8 +111,7 @@ IMPL_LINK( SvxModifyControl, OnTimer, Timer *, pTimer, void )
 
 void SvxModifyControl::_repaint()
 {
-    if ( GetStatusBar().AreItemsVisible() )
-        GetStatusBar().SetItemData( GetId(), nullptr );    // force repaint
+    GetStatusBar().SetItemData( GetId(), nullptr );    // force repaint
 }
 
 /**
diff --git a/svx/source/stbctrls/pszctrl.cxx b/svx/source/stbctrls/pszctrl.cxx
index 018f353a6021..98fce9a6bdba 100644
--- a/svx/source/stbctrls/pszctrl.cxx
+++ b/svx/source/stbctrls/pszctrl.cxx
@@ -327,8 +327,7 @@ void SvxPosSizeStatusBarControl::StateChanged( sal_uInt16 nSID, SfxItemState eSt
         pImpl->bTable = false;
     }
 
-    if ( GetStatusBar().AreItemsVisible() )
-        GetStatusBar().SetItemData( GetId(), nullptr );
+    GetStatusBar().SetItemData( GetId(), nullptr );
 
     //  set only strings as text at the statusBar, so that the Help-Tips
     //  can work with the text, when it is too long for the statusBar
diff --git a/svx/source/stbctrls/xmlsecctrl.cxx b/svx/source/stbctrls/xmlsecctrl.cxx
index be0763e6d9a8..4784739c7079 100644
--- a/svx/source/stbctrls/xmlsecctrl.cxx
+++ b/svx/source/stbctrls/xmlsecctrl.cxx
@@ -82,8 +82,7 @@ void XmlSecStatusBarControl::StateChanged( sal_uInt16, SfxItemState eState, cons
         mpImpl->mnState = SignatureState::UNKNOWN;
     }
 
-    if( GetStatusBar().AreItemsVisible() )              // necessary ?
-        GetStatusBar().SetItemData( GetId(), nullptr );
+    GetStatusBar().SetItemData( GetId(), nullptr ); // necessary ?
 
     GetStatusBar().SetItemText( GetId(), "" );    // necessary ?
 
diff --git a/svx/source/stbctrls/zoomsliderctrl.cxx b/svx/source/stbctrls/zoomsliderctrl.cxx
index a8afa60b4cb7..37254da36d50 100644
--- a/svx/source/stbctrls/zoomsliderctrl.cxx
+++ b/svx/source/stbctrls/zoomsliderctrl.cxx
@@ -383,8 +383,7 @@ bool SvxZoomSliderControl::MouseMove( const MouseEvent & rEvt )
 
 void SvxZoomSliderControl::forceRepaint() const
 {
-    if (GetStatusBar().AreItemsVisible())
-        GetStatusBar().SetItemData(GetId(), nullptr);
+    GetStatusBar().SetItemData(GetId(), nullptr);
 }
 
 void SvxZoomSliderControl::repaintAndExecute()
diff --git a/sw/source/uibase/utlui/viewlayoutctrl.cxx b/sw/source/uibase/utlui/viewlayoutctrl.cxx
index caca9733bc7a..eadb17f748f1 100644
--- a/sw/source/uibase/utlui/viewlayoutctrl.cxx
+++ b/sw/source/uibase/utlui/viewlayoutctrl.cxx
@@ -81,8 +81,7 @@ void SwViewLayoutControl::StateChanged( sal_uInt16 /*nSID*/, SfxItemState eState
             mpImpl->mnState = 3;
     }
 
-    if ( GetStatusBar().AreItemsVisible() )
-        GetStatusBar().SetItemData( GetId(), nullptr );    // force repaint
+    GetStatusBar().SetItemData( GetId(), nullptr );    // force repaint
 }
 
 void SwViewLayoutControl::Paint( const UserDrawEvent& rUsrEvt )
diff --git a/vcl/inc/listbox.hxx b/vcl/inc/listbox.hxx
index 5dc4e3098c52..d6f654d4a388 100644
--- a/vcl/inc/listbox.hxx
+++ b/vcl/inc/listbox.hxx
@@ -198,7 +198,6 @@ private:
 
     sal_Int32       mnTop;           ///< output from line on
     long            mnLeft;          ///< output from column on
-    long            mnBorder;        ///< distance border - text
     long            mnTextHeight;    ///< text height
     ProminentEntry  meProminentType; ///< where is the "prominent" entry
 
diff --git a/vcl/source/control/imp_listbox.cxx b/vcl/source/control/imp_listbox.cxx
index 4d3cffb99e1c..6433c49c3bd7 100644
--- a/vcl/source/control/imp_listbox.cxx
+++ b/vcl/source/control/imp_listbox.cxx
@@ -48,6 +48,8 @@
 
 using namespace ::com::sun::star;
 
+static constexpr long gnBorder = 1;
+
 void ImplInitDropDownButton( PushButton* pButton )
 {
     pButton->SetSymbol( SymbolType::SPIN_DOWN );
@@ -479,7 +481,6 @@ ImplListBoxWindow::ImplListBoxWindow( vcl::Window* pParent, WinBits nWinStyle )
 
     mnTop               = 0;
     mnLeft              = 0;
-    mnBorder            = 1;
     mnSelectModifier    = 0;
     mnUserDrawEntry     = LISTBOX_ENTRY_NOTFOUND;
     mbTrack             = false;
@@ -555,7 +556,7 @@ void ImplListBoxWindow::ImplCalcMetrics()
     mnMaxImgHeight  = 0;
 
     mnTextHeight = static_cast<sal_uInt16>(GetTextHeight());
-    mnMaxTxtHeight = mnTextHeight + mnBorder;
+    mnMaxTxtHeight = mnTextHeight + gnBorder;
     mnMaxHeight = mnMaxTxtHeight;
 
     if ( maUserItemSize.Height() > mnMaxHeight )
@@ -666,7 +667,7 @@ void ImplListBoxWindow::ImplUpdateEntryMetrics( ImplEntryType& rEntry )
             if( aMetrics.nTextWidth > mnMaxTxtWidth )
                 mnMaxTxtWidth = aMetrics.nTextWidth;
             aMetrics.nEntryWidth = mnMaxTxtWidth;
-            aMetrics.nEntryHeight = aTextRect.GetHeight() + mnBorder;
+            aMetrics.nEntryHeight = aTextRect.GetHeight() + gnBorder;
         }
         else
         {
@@ -677,7 +678,7 @@ void ImplListBoxWindow::ImplUpdateEntryMetrics( ImplEntryType& rEntry )
             if( aMetrics.nTextWidth > mnMaxTxtWidth )
                 mnMaxTxtWidth = aMetrics.nTextWidth;
             aMetrics.nEntryWidth = mnMaxTxtWidth;
-            aMetrics.nEntryHeight = mnTextHeight + mnBorder;
+            aMetrics.nEntryHeight = mnTextHeight + gnBorder;
         }
     }
     if ( aMetrics.bImage )
@@ -708,7 +709,7 @@ void ImplListBoxWindow::ImplUpdateEntryMetrics( ImplEntryType& rEntry )
     {
         // entries which have no (aka an empty) text, and no image,
         // and are not user-drawn, should be shown nonetheless
-        aMetrics.nEntryHeight = mnTextHeight + mnBorder;
+        aMetrics.nEntryHeight = mnTextHeight + gnBorder;
     }
 
     if ( aMetrics.nEntryWidth > mnMaxWidth )
@@ -811,7 +812,7 @@ void ImplListBoxWindow::ImplHideFocusRect()
 
 sal_Int32 ImplListBoxWindow::GetEntryPosForPoint( const Point& rPoint ) const
 {
-    long nY = mnBorder;
+    long nY = gnBorder;
 
     sal_Int32 nSelect = mnTop;
     const ImplEntryType* pEntry = mpEntryList->GetEntryPtr( nSelect );
@@ -1271,7 +1272,7 @@ void ImplListBoxWindow::Tracking( const TrackingEvent& rTEvt )
             }
             else
             {
-                nSelect = static_cast<sal_Int32>( ( aPt.Y() + mnBorder ) / mnMaxHeight ) + mnTop;
+                nSelect = static_cast<sal_Int32>( ( aPt.Y() + gnBorder ) / mnMaxHeight ) + mnTop;
                 nSelect = std::min( nSelect, GetLastVisibleEntry() );
                 nSelect = std::min( nSelect, static_cast<sal_Int32>( mpEntryList->GetEntryCount() - 1 ) );
             }
@@ -1789,12 +1790,12 @@ void ImplListBoxWindow::DrawEntry(vcl::RenderContext& rRenderContext, sal_Int32
         if (!!aImage)
         {
             aImgSz = aImage.GetSizePixel();
-            Point aPtImg(mnBorder - mnLeft, nY + ((pEntry->mnHeight - aImgSz.Height()) / 2));
+            Point aPtImg(gnBorder - mnLeft, nY + ((pEntry->mnHeight - aImgSz.Height()) / 2));
 
             // pb: #106948# explicit mirroring for calc
             if (mbMirroring)
                 // right aligned
-                aPtImg.setX( mnMaxWidth + mnBorder - aImgSz.Width() - mnLeft );
+                aPtImg.setX( mnMaxWidth + gnBorder - aImgSz.Width() - mnLeft );
 
             if (!IsZoom())
             {
@@ -1830,12 +1831,12 @@ void ImplListBoxWindow::DrawEntry(vcl::RenderContext& rRenderContext, sal_Int32
         OUString aStr(mpEntryList->GetEntryText(nPos));
         if (!aStr.isEmpty())
         {
-            long nMaxWidth = std::max(mnMaxWidth, GetOutputSizePixel().Width() - 2 * mnBorder);
+            long nMaxWidth = std::max(mnMaxWidth, GetOutputSizePixel().Width() - 2 * gnBorder);
             // a multiline entry should only be as wide a the window
             if (pEntry->mnFlags & ListBoxEntryFlags::MultiLine)
-                nMaxWidth = GetOutputSizePixel().Width() - 2 * mnBorder;
+                nMaxWidth = GetOutputSizePixel().Width() - 2 * gnBorder;
 
-            tools::Rectangle aTextRect(Point(mnBorder - mnLeft, nY),
+            tools::Rectangle aTextRect(Point(gnBorder - mnLeft, nY),
                                 Size(nMaxWidth, pEntry->mnHeight));
 
             if (!bDrawTextAtImagePos && (mpEntryList->HasEntryImage(nPos) || IsUserDrawEnabled()))
@@ -1848,7 +1849,7 @@ void ImplListBoxWindow::DrawEntry(vcl::RenderContext& rRenderContext, sal_Int32
             if (mbMirroring)
             {
                 // right aligned
-                aTextRect.SetLeft( nMaxWidth + mnBorder - rRenderContext.GetTextWidth(aStr) - mnLeft );
+                aTextRect.SetLeft( nMaxWidth + gnBorder - rRenderContext.GetTextWidth(aStr) - mnLeft );
                 if (aImgSz.Width() > 0)
                     aTextRect.AdjustLeft( -(aImgSz.Width() + IMG_TXT_DISTANCE) );
             }
@@ -1891,8 +1892,8 @@ void ImplListBoxWindow::ImplDoPaint(vcl::RenderContext& rRenderContext, const to
     if (mbHasFocusRect)
         ImplHideFocusRect();
 
-    long nY = 0; // + mnBorder;
-    long nHeight = GetOutputSizePixel().Height();// - mnMaxHeight + mnBorder;
+    long nY = 0; // + gnBorder;
+    long nHeight = GetOutputSizePixel().Height();// - mnMaxHeight + gnBorder;
 
     for (sal_Int32 i = mnTop; i < nCount && nY < nHeight + mnMaxHeight; i++)
     {
@@ -1923,7 +1924,7 @@ sal_uInt16 ImplListBoxWindow::GetDisplayLineCount() const
     // FIXME: ListBoxEntryFlags::MultiLine
 
     const sal_Int32 nCount = mpEntryList->GetEntryCount()-mnTop;
-    long nHeight = GetOutputSizePixel().Height();// - mnMaxHeight + mnBorder;
+    long nHeight = GetOutputSizePixel().Height();// - mnMaxHeight + gnBorder;
     sal_uInt16 nEntries = static_cast< sal_uInt16 >( ( nHeight + mnMaxHeight - 1 ) / mnMaxHeight );
     if( nEntries > nCount )
         nEntries = static_cast<sal_uInt16>(nCount);
@@ -2077,7 +2078,7 @@ Size ImplListBoxWindow::CalcSize(sal_Int32 nMaxLines) const
 
     Size aSz;
     aSz.setHeight(  nMaxLines * mnMaxHeight );
-    aSz.setWidth( mnMaxWidth + 2*mnBorder );
+    aSz.setWidth( mnMaxWidth + 2*gnBorder );
     return aSz;
 }
 
diff --git a/vcl/source/control/slider.cxx b/vcl/source/control/slider.cxx
index ae98f27cec0b..507657a22aa5 100644
--- a/vcl/source/control/slider.cxx
+++ b/vcl/source/control/slider.cxx
@@ -56,7 +56,6 @@ void Slider::ImplInit( vcl::Window* pParent, WinBits nStyle )
     mnStateFlags        = 0;
     meScrollType        = ScrollType::DontKnow;
     mbCalcSize          = true;
-    mbFullDrag          = true;
     mbScrollTypeSet     = false;
 
     mpLinkedField       = nullptr;
@@ -704,11 +703,6 @@ void Slider::Tracking( const TrackingEvent& rTEvt )
             // after dragging, recalculate to a rounded Thumb position
             ImplCalc();
             Update();
-
-            if ( !mbFullDrag && (mnStartPos != mnThumbPos) )
-            {
-                Slide();
-            }
         }
 
         EndSlide();
@@ -742,7 +736,7 @@ void Slider::Tracking( const TrackingEvent& rTEvt )
                     ImplUpdateRects();
                     Update();
                     ImplUpdateLinkedField();
-                    if ( mbFullDrag && (nOldPos != mnThumbPos) )
+                    if ( nOldPos != mnThumbPos )
                     {
                         Slide();
                     }
diff --git a/vcl/source/filter/wmf/wmfwr.cxx b/vcl/source/filter/wmf/wmfwr.cxx
index b0d40068f412..9ba9c2b91161 100644
--- a/vcl/source/filter/wmf/wmfwr.cxx
+++ b/vcl/source/filter/wmf/wmfwr.cxx
@@ -144,7 +144,6 @@ WMFWriter::WMFWriter()
     , nActRecordPos(0)
     , eSrcRasterOp(RasterOp::OverPaint)
     , eSrcTextAlign(ALIGN_BASELINE)
-    , bSrcIsClipping(false)
     , pAttrStack(nullptr)
     , eSrcHorTextAlign(W_TA_LEFT)
     , eDstROP2(RasterOp::OverPaint)
@@ -928,9 +927,8 @@ void WMFWriter::SetLineAndFillAttr()
         aDstFillColor = aSrcFillColor;
         CreateSelectDeleteBrush( aDstFillColor );
     }
-    if ( bDstIsClipping != bSrcIsClipping ||
-        (bSrcIsClipping && aDstClipRegion!=aSrcClipRegion)) {
-        bDstIsClipping=bSrcIsClipping;
+    if ( bDstIsClipping ) {
+        bDstIsClipping=false;
         aDstClipRegion=aSrcClipRegion;
     }
 }
@@ -1765,7 +1763,7 @@ bool WMFWriter::WriteWMF( const GDIMetaFile& rMTF, SvStream& rTargetStream,
     CreateSelectDeleteBrush( aDstFillColor );
 
     aDstClipRegion = aSrcClipRegion = vcl::Region();
-    bDstIsClipping = bSrcIsClipping = false;
+    bDstIsClipping = false;
 
     vcl::Font aFont;
     aFont.SetCharSet( GetExtendedTextEncoding( RTL_TEXTENCODING_MS_1252 ) );
diff --git a/vcl/source/filter/wmf/wmfwr.hxx b/vcl/source/filter/wmf/wmfwr.hxx
index a3f4885d1706..8ae1f7547ff5 100644
--- a/vcl/source/filter/wmf/wmfwr.hxx
+++ b/vcl/source/filter/wmf/wmfwr.hxx
@@ -75,7 +75,6 @@ private:
     FontAlign eSrcTextAlign;
     vcl::Font aSrcFont;
     MapMode   aSrcMapMode;
-    bool      bSrcIsClipping;
     vcl::Region    aSrcClipRegion;
     WMFWriterAttrStackMember * pAttrStack;
 
diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx
index 0ad3226ed0de..aeaa0e9c86e6 100644
--- a/vcl/source/window/status.cxx
+++ b/vcl/source/window/status.cxx
@@ -50,13 +50,11 @@ public:
 
     VclPtr<VirtualDevice> mpVirDev;
     long                mnItemBorderWidth;
-    bool                mbDrawItemFrames:1;
 };
 
 StatusBar::ImplData::ImplData()
 {
     mpVirDev = nullptr;
-    mbDrawItemFrames = false;
     mnItemBorderWidth = 0;
 }
 
@@ -105,7 +103,7 @@ static Point ImplGetItemTextPos( const Size& rRectSize, const Size& rTextSize,
 
 bool StatusBar::ImplIsItemUpdate()
 {
-    return !mbProgressMode && mbVisibleItems && IsReallyVisible() && IsUpdateMode();
+    return !mbProgressMode && IsReallyVisible() && IsUpdateMode();
 }
 
 void StatusBar::ImplInit( vcl::Window* pParent, WinBits nStyle )
@@ -122,7 +120,6 @@ void StatusBar::ImplInit( vcl::Window* pParent, WinBits nStyle )
     mpImplData->mpVirDev = VclPtr<VirtualDevice>::Create( *this );
     mnCurItemId     = 0;
     mbFormat        = true;
-    mbVisibleItems  = true;
     mbProgressMode  = false;
     mbInUserDraw    = false;
     mbAdjustHiDPI   = false;
@@ -356,7 +353,7 @@ void StatusBar::ImplDrawText(vcl::RenderContext& rRenderContext)
     tools::Rectangle aTextRect;
     aTextRect.SetLeft( STATUSBAR_OFFSET_X + 1 );
     aTextRect.SetTop( mnTextY );
-    if (mbVisibleItems && (GetStyle() & WB_RIGHT))
+    if (GetStyle() & WB_RIGHT)
         aTextRect.SetRight( mnDX - mnItemsWidth - 1 );
     else
         aTextRect.SetRight( mnDX - 1 );
@@ -456,23 +453,7 @@ void StatusBar::ImplDrawItem(vcl::RenderContext& rRenderContext, bool bOffScreen
     else
         rRenderContext.SetClipRegion();
 
-    // show frame
-    if (mpImplData->mbDrawItemFrames)
-    {
-        if (!(pItem->mnBits & StatusBarItemBits::Flat))
-        {
-            DrawFrameStyle nStyle;
-
-            if (pItem->mnBits & StatusBarItemBits::In)
-                nStyle = DrawFrameStyle::In;
-            else
-                nStyle = DrawFrameStyle::Out;
-
-            DecorationView aDecoView(&rRenderContext);
-            aDecoView.DrawFrame(aRect, nStyle);
-        }
-    }
-    else if (nPos != ImplGetFirstVisiblePos())
+    if (nPos != ImplGetFirstVisiblePos())
     {
         // draw separator
         Point aFrom(aRect.TopLeft());
@@ -682,27 +663,24 @@ void StatusBar::MouseButtonDown( const MouseEvent& rMEvt )
     // trigger toolbox only for left mouse button
     if ( rMEvt.IsLeft() )
     {
-        if ( mbVisibleItems )
-        {
-            Point  aMousePos = rMEvt.GetPosPixel();
+        Point  aMousePos = rMEvt.GetPosPixel();
 
-            // search for clicked item
-            for ( size_t i = 0; i < mvItemList.size(); ++i )
+        // search for clicked item
+        for ( size_t i = 0; i < mvItemList.size(); ++i )
+        {
+            ImplStatusItem* pItem = mvItemList[ i ].get();
+            // check item for being clicked
+            if ( ImplGetItemRectPos( sal_uInt16(i) ).IsInside( aMousePos ) )
             {
-                ImplStatusItem* pItem = mvItemList[ i ].get();
-                // check item for being clicked
-                if ( ImplGetItemRectPos( sal_uInt16(i) ).IsInside( aMousePos ) )
-                {
-                    mnCurItemId = pItem->mnId;
-                    if ( rMEvt.GetClicks() == 2 )
-                        DoubleClick();
-                    else
-                        Click();
-                    mnCurItemId = 0;
-
-                    // Item found
-                    return;
-                }
+                mnCurItemId = pItem->mnId;
+                if ( rMEvt.GetClicks() == 2 )
+                    DoubleClick();
+                else
+                    Click();
+                mnCurItemId = 0;
+
+                // Item found
+                return;
             }
         }
 
@@ -739,28 +717,26 @@ void StatusBar::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle
     else
     {
         // draw text
-        if (!mbVisibleItems || (GetStyle() & WB_RIGHT))
+        if (GetStyle() & WB_RIGHT)
             ImplDrawText(rRenderContext);
 
         // draw items
-        if (mbVisibleItems)
-        {
-            // Do offscreen only when we are not recording layout..
-            bool bOffscreen = !rRenderContext.ImplIsRecordLayout();
 
-            // tdf#94213 - un-necessary virtual-device in GL mode
-            // causes context switch & hence flicker during sizing.
+        // Do offscreen only when we are not recording layout..
+        bool bOffscreen = !rRenderContext.ImplIsRecordLayout();
+
+        // tdf#94213 - un-necessary virtual-device in GL mode
+        // causes context switch & hence flicker during sizing.
 #if HAVE_FEATURE_OPENGL
-            if( OpenGLWrapper::isVCLOpenGLEnabled() )
-                bOffscreen = false;
+        if( OpenGLWrapper::isVCLOpenGLEnabled() )
+            bOffscreen = false;
 #endif
 
-            if (!bOffscreen)
-                rRenderContext.Erase(rRect);
+        if (!bOffscreen)
+            rRenderContext.Erase(rRect);
 
-            for (sal_uInt16 i = 0; i < nItemCount; i++)
-                ImplDrawItem(rRenderContext, bOffscreen, i);
-        }
+        for (sal_uInt16 i = 0; i < nItemCount; i++)
+            ImplDrawItem(rRenderContext, bOffscreen, i);
     }
 
     // draw line at the top of the status bar (to visually distinguish it from
@@ -1080,7 +1056,7 @@ sal_uInt16 StatusBar::GetItemPos( sal_uInt16 nItemId ) const
 
 sal_uInt16 StatusBar::GetItemId( const Point& rPos ) const
 {
-    if ( AreItemsVisible() && !mbFormat )
+    if ( !mbFormat )
     {
         sal_uInt16 nItemCount = GetItemCount();
         sal_uInt16 nPos;
@@ -1100,7 +1076,7 @@ tools::Rectangle StatusBar::GetItemRect( sal_uInt16 nItemId ) const
 {
     tools::Rectangle aRect;
 
-    if ( AreItemsVisible() && !mbFormat )
+    if ( !mbFormat )
     {
         sal_uInt16 nPos = GetItemPos( nItemId );
         if ( nPos != STATUSBAR_ITEM_NOTFOUND )
@@ -1425,7 +1401,7 @@ void StatusBar::EndProgressMode()
 
 void StatusBar::SetText(const OUString& rText)
 {
-    if ((!mbVisibleItems || (GetStyle() & WB_RIGHT)) && !mbProgressMode && IsReallyVisible() && IsUpdateMode())
+    if ((GetStyle() & WB_RIGHT) && !mbProgressMode && IsReallyVisible() && IsUpdateMode())
     {
         if (mbFormat)
         {
@@ -1487,20 +1463,6 @@ Size StatusBar::CalcWindowSizePixel() const
         }
     }
 
-    if( mpImplData->mbDrawItemFrames &&
-        IsNativeControlSupported( ControlType::Frame, ControlPart::Border ) )
-    {
-        ImplControlValue aControlValue( static_cast<long>(DrawFrameFlags::NoDraw) );
-        tools::Rectangle aBound, aContent;
-        tools::Rectangle aNatRgn( Point( 0, 0 ), Size( 150, 50 ) );
-        if( GetNativeControlRegion(ControlType::Frame, ControlPart::Border,
-                    aNatRgn, ControlState::NONE, aControlValue, aBound, aContent) )
-        {
-            mpImplData->mnItemBorderWidth =
-                ( aBound.GetHeight() - aContent.GetHeight() ) / 2;
-        }
-    }
-
     nCalcHeight = nMinHeight+nBarTextOffset + 2*mpImplData->mnItemBorderWidth;
     if( nCalcHeight < nProgressHeight+2 )
         nCalcHeight = nProgressHeight+2;
commit ba951a969d76fc5ea863bb19c24140bbf390694b
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Tue Oct 16 10:31:01 2018 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Tue Oct 16 13:25:06 2018 +0200

    loplugin:singlevalfields in lotuswordpro
    
    Change-Id: Iac507cb050c93367a8d5dd4cc33106f54c5d462f
    Reviewed-on: https://gerrit.libreoffice.org/61816
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/lotuswordpro/inc/xfilter/xfborders.hxx b/lotuswordpro/inc/xfilter/xfborders.hxx
index b9da6a4abe9f..ac23bd5f9cbc 100644
--- a/lotuswordpro/inc/xfilter/xfborders.hxx
+++ b/lotuswordpro/inc/xfilter/xfborders.hxx
@@ -116,7 +116,6 @@ private:
     friend class XFBorders;
 
 private:
-    double      m_fOffset;
     XFColor     m_aColor;
     bool    m_bDouble;
     bool    m_bSameWidth;
diff --git a/lotuswordpro/inc/xfilter/xfcellstyle.hxx b/lotuswordpro/inc/xfilter/xfcellstyle.hxx
index 82730ed4005f..8e0fc8c5dd7a 100644
--- a/lotuswordpro/inc/xfilter/xfcellstyle.hxx
+++ b/lotuswordpro/inc/xfilter/xfcellstyle.hxx
@@ -137,7 +137,6 @@ private:
     enumXFAlignType m_eHoriAlign;
     enumXFAlignType m_eVertAlign;
 
-    double      m_fTextIndent;
     XFColor     m_aBackColor;
     std::unique_ptr<XFBGImage> m_xBackImage;
     XFMargins   m_aMargin;
@@ -145,7 +144,6 @@ private:
     rtl::Reference<XFFont> m_pFont;
     XFShadow    m_aShadow;
     std::unique_ptr<XFBorders>  m_pBorders;
-    bool    m_bWrapText;
 };
 
 inline void XFCellStyle::SetAlignType(enumXFAlignType hori, enumXFAlignType vert)
diff --git a/lotuswordpro/inc/xfilter/xfdrawstyle.hxx b/lotuswordpro/inc/xfilter/xfdrawstyle.hxx
index e5a596a201ba..c6747729de1d 100644
--- a/lotuswordpro/inc/xfilter/xfdrawstyle.hxx
+++ b/lotuswordpro/inc/xfilter/xfdrawstyle.hxx
@@ -122,7 +122,6 @@ public:
 
 private:
     std::unique_ptr<XFFontWorkStyle> m_pFontWorkStyle;
-    enumXFWrap  m_eWrap;
     XFDrawLineStyle *m_pLineStyle;
     XFDrawAreaStyle *m_pAreaStyle;
     OUString   m_strArrowStart;
diff --git a/lotuswordpro/inc/xfilter/xffont.hxx b/lotuswordpro/inc/xfilter/xffont.hxx
index 43c6fa21aca9..f9e83eba1eb1 100644
--- a/lotuswordpro/inc/xfilter/xffont.hxx
+++ b/lotuswordpro/inc/xfilter/xffont.hxx
@@ -242,18 +242,10 @@ private:
 
     enumXFUnderline m_eUnderline;
     enumXFCrossout  m_eCrossout;
-    enumXFRelief    m_eRelief;
     enumXFTransform m_eTransform;
-    enumXFEmphasize m_eEmphasize;
     bool    m_bWordByWord;
-    bool    m_bEmphasizeTop;
-    bool    m_bOutline;
-    bool    m_bShadow;
-    bool    m_bBlink;
     sal_Int16   m_nPosition;
     sal_Int16   m_nScale;
-    double      m_fCharSpace;
-    sal_Int16   m_nWidthScale;
     XFColor     m_aColor;
     XFColor     m_aBackColor;
     //The flag defines which variable will be functional
diff --git a/lotuswordpro/inc/xfilter/xfnumberstyle.hxx b/lotuswordpro/inc/xfilter/xfnumberstyle.hxx
index 69d9a7e68280..79f442b5566d 100644
--- a/lotuswordpro/inc/xfilter/xfnumberstyle.hxx
+++ b/lotuswordpro/inc/xfilter/xfnumberstyle.hxx
@@ -100,11 +100,8 @@ private:
 
     enumXFNumberType    m_eType;
     sal_Int32  m_nDecimalDigits;
-    sal_Int32  m_nMinInteger;
-    sal_Int32  m_nMinExponent;
     bool       m_bGroup;
     XFColor    m_aColor;
-    bool       m_bCurrencySymbolPost;
     OUString   m_strCurrencySymbol;
     OUString   m_strPrefix;
     OUString   m_strSuffix;
diff --git a/lotuswordpro/inc/xfilter/xfparastyle.hxx b/lotuswordpro/inc/xfilter/xfparastyle.hxx
index 051901381734..7c066d61c513 100644
--- a/lotuswordpro/inc/xfilter/xfparastyle.hxx
+++ b/lotuswordpro/inc/xfilter/xfparastyle.hxx
@@ -221,9 +221,6 @@ public:
 protected:
     OUString   m_strMasterPage;
     enumXFAlignType m_eAlignType;
-    enumXFAlignType m_eLastLineAlign;
-    bool        m_bJustSingleWord;
-    bool        m_bKeepWithNext;
 
     double      m_fTextIndent;
     XFColor     m_aBackColor;
@@ -237,9 +234,6 @@ protected:
     XFDropcap   m_aDropcap;
     XFLineHeight m_aLineHeight;
     XFBreaks    m_aBreaks;
-    sal_Int32   m_nPageNumber;
-    bool    m_bNumberLines;
-    sal_Int32   m_nLineNumberRestart;
 
     sal_uInt32  m_nFlag;
     bool m_bNumberRight;
diff --git a/lotuswordpro/source/filter/xfilter/xfborders.cxx b/lotuswordpro/source/filter/xfilter/xfborders.cxx
index b8027db02247..e1a5554fdd8a 100644
--- a/lotuswordpro/source/filter/xfilter/xfborders.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfborders.cxx
@@ -61,7 +61,6 @@
 
 XFBorder::XFBorder()
 {
-    m_fOffset = 0;
     m_bDouble = false;
     m_bSameWidth = false;
     m_fWidthInner = 0;
@@ -154,8 +153,6 @@ OUString   XFBorder::ToString()
 
 bool operator==(XFBorder const & b1, XFBorder const & b2)
 {
-    if( b1.m_fOffset != b2.m_fOffset )
-        return false;
     if( b1.m_bDouble != b2.m_bDouble )
         return false;
     if( !b1.m_bDouble )
diff --git a/lotuswordpro/source/filter/xfilter/xfcellstyle.cxx b/lotuswordpro/source/filter/xfilter/xfcellstyle.cxx
index 787bc2cc4496..ebd015a19584 100644
--- a/lotuswordpro/source/filter/xfilter/xfcellstyle.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfcellstyle.cxx
@@ -65,8 +65,6 @@
 XFCellStyle::XFCellStyle()
     : m_eHoriAlign(enumXFAlignNone)
     , m_eVertAlign(enumXFAlignNone)
-    , m_fTextIndent(0)
-    , m_bWrapText(false)
 {}
 
 XFCellStyle::~XFCellStyle()
@@ -124,8 +122,6 @@ bool    XFCellStyle::Equal(IXFStyle *pStyle)
 
     if( m_strParentStyleName != pOther->m_strParentStyleName )
         return false;
-    if( m_fTextIndent != pOther->m_fTextIndent )
-        return false;
 
     //align:
     if( m_eHoriAlign != pOther->m_eHoriAlign )
@@ -145,10 +141,6 @@ bool    XFCellStyle::Equal(IXFStyle *pStyle)
     if( m_aPadding != pOther->m_aPadding )
         return false;
 
-    //wrap:
-    if( m_bWrapText != pOther->m_bWrapText )
-        return false;
-
     //font:
     if( m_pFont.is() )
     {
@@ -210,11 +202,6 @@ void XFCellStyle::ToXml(IXFStream *pStrm)
     //Paragraph properties:
     pAttrList->Clear();
 
-    //text indent:
-    if( m_fTextIndent>FLOAT_MIN )
-    {
-        pAttrList->AddAttribute("fo:text-indent", OUString::number(m_fTextIndent) + "cm" );
-    }
     //padding:
     m_aPadding.ToXml(pStrm);
     //margin:
@@ -229,10 +216,6 @@ void XFCellStyle::ToXml(IXFStream *pStrm)
     if( m_eVertAlign != enumXFAlignNone )
         pAttrList->AddAttribute( "fo:vertical-align", GetAlignName(m_eVertAlign) );
 
-    //wrap text:
-    if( m_bWrapText )
-        pAttrList->AddAttribute( "fo:wrap-option", "wrap" );
-
     //shadow:
     m_aShadow.ToXml(pStrm);
     //borders:
diff --git a/lotuswordpro/source/filter/xfilter/xfdrawstyle.cxx b/lotuswordpro/source/filter/xfilter/xfdrawstyle.cxx
index b4c7b6729892..0228a5d9189f 100644
--- a/lotuswordpro/source/filter/xfilter/xfdrawstyle.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfdrawstyle.cxx
@@ -64,8 +64,7 @@
 #include "xffontworkstyle.hxx"
 #include <lwpglobalmgr.hxx>
 XFDrawStyle::XFDrawStyle()
-    : m_eWrap(enumXFWrapNone)
-    , m_pLineStyle(nullptr)
+    : m_pLineStyle(nullptr)
     , m_pAreaStyle(nullptr)
     , m_fArrowStartSize(0.3)
     , m_fArrowEndSize(0.3)
@@ -165,27 +164,8 @@ void    XFDrawStyle::ToXml(IXFStream *pStrm)
 
     pAttrList->Clear();
 
-    if( m_eWrap == enumXFWrapBackground )
-    {
-        pAttrList->AddAttribute( "style:run-through", "background" );
-    }
-    else
-    {
-        pAttrList->AddAttribute( "style:run-through", "foreground" );
-
-        if( m_eWrap == enumXFWrapNone )
-            pAttrList->AddAttribute( "style:wrap", "none" );
-        else if( m_eWrap == enumXFWrapLeft )
-            pAttrList->AddAttribute( "style:wrap", "left" );
-        else if( m_eWrap == enumXFWrapRight )
-            pAttrList->AddAttribute( "style:wrap", "right" );
-        else if( m_eWrap == enumXFWrapParallel )
-            pAttrList->AddAttribute( "style:wrap", "parallel" );
-        else if( m_eWrap == enumXFWrapRunThrough )
-            pAttrList->AddAttribute( "style:wrap", "run-through" );
-        else if( m_eWrap == enumXFWrapBest )
-            pAttrList->AddAttribute( "style:wrap", "dynamic" );
-    }
+    pAttrList->AddAttribute( "style:run-through", "foreground" );
+    pAttrList->AddAttribute( "style:wrap", "none" );
 
     //line style:
     if( m_pLineStyle )
diff --git a/lotuswordpro/source/filter/xfilter/xffont.cxx b/lotuswordpro/source/filter/xfilter/xffont.cxx
index c25df39b20d7..e7d4f9def7e1 100644
--- a/lotuswordpro/source/filter/xfilter/xffont.cxx
+++ b/lotuswordpro/source/filter/xfilter/xffont.cxx
@@ -71,18 +71,10 @@ XFFont::XFFont()
     , m_bBoldComplex(false)
     , m_eUnderline(enumXFUnderlineNone)
     , m_eCrossout(enumXFCrossoutNone)
-    , m_eRelief(enumXFReliefNone)
     , m_eTransform(enumXFTransformNone)
-    , m_eEmphasize(enumXFEmphasizeNone)
     , m_bWordByWord(false)
-    , m_bEmphasizeTop(true)
-    , m_bOutline(false)
-    , m_bShadow(false)
-    , m_bBlink(false)
     , m_nPosition(33)
     , m_nScale(58)
-    , m_fCharSpace(0)
-    , m_nWidthScale(100)
     , m_nFlag(0)
     , m_bTransparent(false)
 {
@@ -154,47 +146,15 @@ bool operator==(XFFont const & f1, XFFont const & f2)
             return false;
     }
 
-    if( f1.m_nFlag&XFFONT_FLAG_RELIEF )
-    {
-        if( f1.m_eRelief != f2.m_eRelief )
-            return false;
-    }
-
     if( f1.m_nFlag&XFFONT_FLAG_TRANSFORM )
     {
         if( f1.m_eTransform != f2.m_eTransform )
             return false;
     }
 
-    if( f1.m_nFlag&XFFONT_FLAG_EMPHASIZE )
-    {
-        if( f1.m_eEmphasize != f2.m_eEmphasize )
-            return false;
-        if( f1.m_bEmphasizeTop != f2.m_bEmphasizeTop )
-            return false;
-    }
-
     if( f1.m_bWordByWord != f2.m_bWordByWord )
         return false;
 
-    if( f1.m_nFlag&XFFONT_FLAG_OUTLINE )
-    {
-        if( f1.m_bOutline != f2.m_bOutline )
-            return false;
-    }
-
-    if( f1.m_nFlag&XFFONT_FLAG_SHADOW )
-    {
-        if( f1.m_bShadow != f2.m_bShadow )
-            return false;
-    }
-
-    if( f1.m_nFlag&XFFONT_FLAG_BLINK )
-    {
-        if( f1.m_bBlink != f2.m_bBlink )
-            return false;
-    }
-
     if( f1.m_nFlag&XFFONT_FLAG_POSITION )
     {
         if( f1.m_nPosition != f2.m_nPosition )
@@ -207,18 +167,6 @@ bool operator==(XFFont const & f1, XFFont const & f2)
             return false;
     }
 
-    if( f1.m_nFlag&XFFONT_FLAG_CHARSPACE )
-    {
-        if( f1.m_fCharSpace != f2.m_fCharSpace )
-            return false;
-    }
-
-    if( f1.m_nFlag&XFFONT_FLAG_WIDTHSCALE )
-    {
-        if( f1.m_nWidthScale != f2.m_nWidthScale )
-            return false;
-    }
-
     if( f1.m_nFlag&XFFONT_FLAG_COLOR )
     {
         if( f1.m_aColor != f2.m_aColor )
@@ -331,11 +279,6 @@ void XFFont::ToXml(IXFStream *pStrm)
             pAttrList->AddAttribute("fo:score-spaces", "true" );
     }
 
-    if( (m_nFlag & XFFONT_FLAG_RELIEF) && m_eRelief )
-    {
-        pAttrList->AddAttribute("style:font-relief", GetReliefName(m_eRelief) );
-    }
-
     if( (m_nFlag & XFFONT_FLAG_TRANSFORM) && m_eTransform )
     {
         //enumTransformSmallCap is different:
@@ -345,30 +288,6 @@ void XFFont::ToXml(IXFStream *pStrm)
             pAttrList->AddAttribute("fo:text-transform", GetTransformName(m_eTransform) );
     }
 
-    if( (m_nFlag & XFFONT_FLAG_EMPHASIZE) && m_eEmphasize )
-    {
-        OUString empha = GetEmphasizeName(m_eEmphasize);
-        empha += " ";
-        if( m_bEmphasizeTop )
-            empha += "above";
-        pAttrList->AddAttribute("style:text-emphasize", empha );
-    }
-
-    if( (m_nFlag & XFFONT_FLAG_OUTLINE) && m_bOutline )
-    {
-        pAttrList->AddAttribute("style:text-outline", "true" );
-    }
-
-    if( (m_nFlag & XFFONT_FLAG_SHADOW) && m_bShadow )
-    {
-        pAttrList->AddAttribute("fo:text-shadow", "1pt 1pt" );
-    }
-
-    if( (m_nFlag & XFFONT_FLAG_BLINK) && m_bBlink )
-    {
-        pAttrList->AddAttribute("style:text-blinking", "true" );
-    }
-
     //position & scale:
     if( ((m_nFlag & XFFONT_FLAG_SCALE) && m_nScale>0 ) ||
         ((m_nFlag & XFFONT_FLAG_POSITION) && m_nPosition != 0)
@@ -380,17 +299,6 @@ void XFFont::ToXml(IXFStream *pStrm)
         pAttrList->AddAttribute("style:text-position", tmp );
     }
 
-    //char space:
-    if( (m_nFlag & XFFONT_FLAG_CHARSPACE) && m_fCharSpace != 0 )
-    {
-        pAttrList->AddAttribute("fo:letter-spacing", OUString::number(m_fCharSpace)+"cm" );
-    }
-
-    if( (m_nFlag&XFFONT_FLAG_WIDTHSCALE) && m_nWidthScale != 100 )
-    {
-        pAttrList->AddAttribute("style:text-scale", OUString::number(m_nWidthScale)+"%" );
-    }
-
     //Color:
     if( m_nFlag & XFFONT_FLAG_COLOR )
     {
diff --git a/lotuswordpro/source/filter/xfilter/xfnumberstyle.cxx b/lotuswordpro/source/filter/xfilter/xfnumberstyle.cxx
index baf6c5a53d1e..7406e7685387 100644
--- a/lotuswordpro/source/filter/xfilter/xfnumberstyle.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfnumberstyle.cxx
@@ -62,11 +62,8 @@
 XFNumberStyle::XFNumberStyle()
     : m_eType(enumXFNumberNumber)
     , m_nDecimalDigits(0)
-    , m_nMinInteger(1)
-    , m_nMinExponent(2)
     , m_bGroup(false)
     , m_aColor(0,0,0)
-    , m_bCurrencySymbolPost(false)
     , m_bRedIfNegative(false)
     , m_aNegativeColor(255,0,0)
 {}
@@ -88,8 +85,6 @@ bool XFNumberStyle::Equal(IXFStyle *pStyle)
         return false;
     if( m_nDecimalDigits != pOther->m_nDecimalDigits )
         return false;
-    if( m_nMinInteger != pOther->m_nMinInteger )
-        return false;
     if( m_bRedIfNegative != pOther->m_bRedIfNegative )
         return false;
     if( m_bGroup != pOther->m_bGroup )
@@ -101,10 +96,6 @@ bool XFNumberStyle::Equal(IXFStyle *pStyle)
     if( m_strSuffix != pOther->m_strSuffix )
         return false;
 
-    //When category of number format is scientific, the number can not be displayed normally in table.
-    if ( m_nMinExponent != pOther->m_nMinExponent )
-        return false;
-
     if( m_bRedIfNegative )
     {
         if( m_aNegativeColor != pOther->m_aNegativeColor )
@@ -117,8 +108,6 @@ bool XFNumberStyle::Equal(IXFStyle *pStyle)
 
     if( m_eType == enuMXFNumberCurrency )
     {
-        if( m_bCurrencySymbolPost != pOther->m_bCurrencySymbolPost )
-            return false;
         if( m_strCurrencySymbol != pOther->m_strCurrencySymbol )
             return false;
     }
@@ -288,7 +277,7 @@ void XFNumberStyle::ToXml_Content(IXFStream *pStrm, bool nagetive)
         }
     }
 
-    if( m_eType == enuMXFNumberCurrency && !m_bCurrencySymbolPost )
+    if( m_eType == enuMXFNumberCurrency )
     {
         if( !m_strCurrencySymbol.isEmpty() )
         {
@@ -303,8 +292,8 @@ void XFNumberStyle::ToXml_Content(IXFStream *pStrm, bool nagetive)
     {
         pAttrList->Clear();
         pAttrList->AddAttribute("number:decimal-places", OUString::number(m_nDecimalDigits));
-        pAttrList->AddAttribute("number:min-integer-digits", OUString::number(m_nMinInteger));
-        pAttrList->AddAttribute("number:min-exponent-digits", OUString::number(m_nMinExponent));
+        pAttrList->AddAttribute("number:min-integer-digits", OUString::number(1));
+        pAttrList->AddAttribute("number:min-exponent-digits", OUString::number(2));
         pStrm->StartElement( "number:scientific-number" );
         pStrm->EndElement( "number:scientific-number" );
     }
@@ -312,7 +301,7 @@ void XFNumberStyle::ToXml_Content(IXFStream *pStrm, bool nagetive)
     {
         pAttrList->Clear();
         pAttrList->AddAttribute("number:decimal-places", OUString::number(m_nDecimalDigits));
-        pAttrList->AddAttribute("number:min-integer-digits", OUString::number(m_nMinInteger));
+        pAttrList->AddAttribute("number:min-integer-digits", OUString::number(1));
 
         if( m_bGroup )
             pAttrList->AddAttribute("number:grouping","true");
@@ -323,16 +312,6 @@ void XFNumberStyle::ToXml_Content(IXFStream *pStrm, bool nagetive)
         pStrm->EndElement( "number:number" );
     }
 
-    if( m_eType == enuMXFNumberCurrency && m_bCurrencySymbolPost )
-    {
-        if( !m_strCurrencySymbol.isEmpty() )
-        {
-            pStrm->StartElement( "number:currency-symbol" );
-            pStrm->Characters(m_strCurrencySymbol);
-            pStrm->EndElement( "number:currency-symbol" );
-        }
-    }
-
     if( !nagetive )
     {
         if( !m_strSuffix.isEmpty() )
diff --git a/lotuswordpro/source/filter/xfilter/xfparastyle.cxx b/lotuswordpro/source/filter/xfilter/xfparastyle.cxx
index 26dd14099921..0cd6da4499bc 100644
--- a/lotuswordpro/source/filter/xfilter/xfparastyle.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfparastyle.cxx
@@ -67,13 +67,7 @@
 
 XFParaStyle::XFParaStyle()
     : m_eAlignType(enumXFAlignNone)
-    , m_eLastLineAlign(enumXFAlignNone)
-    , m_bJustSingleWord(false)
-    , m_bKeepWithNext(false)
     , m_fTextIndent(0)
-    , m_nPageNumber(0)
-    , m_bNumberLines(true)
-    , m_nLineNumberRestart(0)
     , m_nFlag(0)
     , m_bNumberRight(false)
 {
@@ -83,9 +77,6 @@ XFParaStyle::XFParaStyle()
 XFParaStyle::XFParaStyle(const XFParaStyle& other)
     : XFStyle(other)
     , m_eAlignType(other.m_eAlignType)
-    , m_eLastLineAlign(other.m_eLastLineAlign)
-    , m_bJustSingleWord(other.m_bJustSingleWord)
-    , m_bKeepWithNext(other.m_bKeepWithNext)
     , m_fTextIndent(other.m_fTextIndent)
     , m_aBackColor(other.m_aBackColor)
     , m_aMargin(other.m_aMargin)
@@ -95,9 +86,6 @@ XFParaStyle::XFParaStyle(const XFParaStyle& other)
     , m_aDropcap(other.m_aDropcap)
     , m_aLineHeight(other.m_aLineHeight)
     , m_aBreaks(other.m_aBreaks)
-    , m_nPageNumber(other.m_nPageNumber)
-    , m_bNumberLines(other.m_bNumberLines)
-    , m_nLineNumberRestart(other.m_nLineNumberRestart)
     , m_nFlag(other.m_nFlag)
     , m_bNumberRight(other.m_bNumberRight)
 {
@@ -134,12 +122,7 @@ XFParaStyle& XFParaStyle::operator=(const XFParaStyle& other)
         m_strParentStyleName = other.m_strParentStyleName;
         m_nFlag = other.m_nFlag;
         m_eAlignType = other.m_eAlignType;
-        m_eLastLineAlign = other.m_eLastLineAlign;
-        m_bJustSingleWord = other.m_bJustSingleWord;
-        m_bKeepWithNext = other.m_bKeepWithNext;
         m_fTextIndent = other.m_fTextIndent;
-        m_bNumberLines = other.m_bNumberLines;
-        m_nLineNumberRestart = other.m_nLineNumberRestart;
         m_bNumberRight = other.m_bNumberRight;
 
         m_pFont = other.m_pFont;
@@ -301,21 +284,9 @@ bool    XFParaStyle::Equal(IXFStyle *pStyle)
         return false;
     if( m_fTextIndent != pOther->m_fTextIndent )
         return false;
-    if( m_bJustSingleWord != pOther->m_bJustSingleWord )
-        return false;
-    if( m_bKeepWithNext != pOther->m_bKeepWithNext )
-        return false;
-    //line number:
-    if( m_bNumberLines != pOther->m_bNumberLines )
-        return false;
-    if( m_nLineNumberRestart != pOther->m_nLineNumberRestart )
-        return false;
     //align:
     if( m_eAlignType != pOther->m_eAlignType )
         return false;
-    //last line align:
-    if( m_eLastLineAlign != pOther->m_eLastLineAlign )
-        return false;
 
     //shadow:
     if( m_aShadow != pOther->m_aShadow )
@@ -336,8 +307,6 @@ bool    XFParaStyle::Equal(IXFStyle *pStyle)
     //breaks:
     if( m_aBreaks != pOther->m_aBreaks )
         return false;
-    if( m_nPageNumber != pOther->m_nPageNumber )
-        return false;
     if( m_aTabs != pOther->m_aTabs )
         return false;
 
@@ -414,25 +383,9 @@ void    XFParaStyle::ToXml(IXFStream *pStrm)
     {
         pAttrList->AddAttribute("fo:text-align", GetAlignName(m_eAlignType) );
     }
-    //last line align:
-    if( m_eLastLineAlign != enumXFAlignNone )
-    {
-        pAttrList->AddAttribute("fo:fo:text-align-last", GetAlignName(m_eLastLineAlign) );
-        if( m_bJustSingleWord )
-            pAttrList->AddAttribute("style:justify-single-word", "true" );
-    }
     //line number:
-    if( m_bNumberLines )
-    {
-        pAttrList->AddAttribute( "text:number-lines", "true" );
-        pAttrList->AddAttribute( "text:line-number", OUString::number(m_nLineNumberRestart) );
-    }
-    else
-    {
-        pAttrList->AddAttribute( "text:number-lines", "false" );
-        assert(m_nLineNumberRestart>0);
-        pAttrList->AddAttribute( "text:line-number", "0" );
-    }
+    pAttrList->AddAttribute( "text:number-lines", "true" );
+    pAttrList->AddAttribute( "text:line-number", OUString::number(0) );
 
     //shadow:
     m_aShadow.ToXml(pStrm);
@@ -451,15 +404,9 @@ void    XFParaStyle::ToXml(IXFStream *pStrm)
     if( m_pFont.is() )
         m_pFont->ToXml(pStrm);
 
-    //page number:
-    if( m_nPageNumber )
-        pAttrList->AddAttribute("fo:page-number", OUString::number(m_nPageNumber) );
     //page breaks:
     m_aBreaks.ToXml(pStrm);
 
-    if( m_bKeepWithNext )
-        pAttrList->AddAttribute("fo:fo:keep-with-next", "true" );
-
     pStrm->StartElement("style:properties");
 
     //dropcap:


More information about the Libreoffice-commits mailing list