[Libreoffice-commits] core.git: 17 commits - filter/source include/sfx2 sc/source sd/source sfx2/source sw/source

Caolán McNamara caolanm at redhat.com
Mon Apr 7 05:47:48 PDT 2014


 filter/source/pdf/impdialog.cxx                                      |    4 
 include/sfx2/tabdlg.hxx                                              |   18 +--
 sc/source/ui/attrdlg/scdlgfact.cxx                                   |    6 -
 sd/source/filter/eppt/eppt.hxx                                       |    8 -
 sd/source/filter/eppt/pptx-grouptable.cxx                            |   15 +-
 sd/source/filter/eppt/pptx-text.cxx                                  |   52 ++++++++--
 sd/source/filter/ppt/pptin.cxx                                       |   15 +-
 sd/source/filter/ppt/propread.hxx                                    |   21 ++--
 sd/source/ui/func/fuconuno.cxx                                       |    2 
 sd/source/ui/func/fudraw.cxx                                         |   13 +-
 sd/source/ui/inc/OutlinerIteratorImpl.hxx                            |    4 
 sd/source/ui/inc/navigatr.hxx                                        |    7 +
 sd/source/ui/slidesorter/controller/SlsInsertionIndicatorHandler.cxx |    1 
 sd/source/ui/slidesorter/inc/model/SlsVisualState.hxx                |    4 
 sd/source/ui/slidesorter/model/SlsVisualState.cxx                    |   10 -
 sfx2/source/dialog/styledlg.cxx                                      |   12 +-
 sfx2/source/dialog/tabdlg.cxx                                        |   43 ++------
 sw/source/ui/dialog/uiregionsw.cxx                                   |    2 
 sw/source/ui/envelp/label1.cxx                                       |    2 
 sw/source/ui/misc/num.cxx                                            |    2 
 sw/source/ui/table/tabledlg.cxx                                      |    2 
 21 files changed, 126 insertions(+), 117 deletions(-)

New commits:
commit 2c106c826fbdcd20ceafcb63ee3c3b55c8a730d0
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Apr 7 13:29:41 2014 +0100

    coverity#708141 baseclass mnPageCount is unused
    
    Change-Id: I65be7d072bb8762feaf22158104d58f0c0149f33

diff --git a/sd/source/ui/inc/OutlinerIteratorImpl.hxx b/sd/source/ui/inc/OutlinerIteratorImpl.hxx
index 9e3da37..0ddd4e3 100644
--- a/sd/source/ui/inc/OutlinerIteratorImpl.hxx
+++ b/sd/source/ui/inc/OutlinerIteratorImpl.hxx
@@ -199,9 +199,6 @@ public:
     virtual void Reverse (void) SAL_OVERRIDE;
 
 protected:
-    /// Number of pages in the view that is specified by <member>maPosition</member>.
-    sal_Int32 mnPageCount;
-
     /** Initialize this iterator with respect to the given location.  After
         this call the object looks like newly constructed.
     */
@@ -252,6 +249,7 @@ public:
     virtual IteratorImplBase* Clone (IteratorImplBase* pObject) const SAL_OVERRIDE;
 
 private:
+    /// Number of pages in the view that is specified by <member>maPosition</member>.
     sal_Int32 mnPageCount;
 
     // Don't use this operator.
commit 6ead5e3238a1933ffdd64956e1722266bf9e88bc
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Apr 7 13:26:25 2014 +0100

    coverity#708138 VisualState::SetMouseOverState sets things that noone reads
    
    Change-Id: Ifc78a7c656520b779559362e309f6971ecb1f573

diff --git a/sd/source/ui/slidesorter/inc/model/SlsVisualState.hxx b/sd/source/ui/slidesorter/inc/model/SlsVisualState.hxx
index 729954b..d6712e2 100644
--- a/sd/source/ui/slidesorter/inc/model/SlsVisualState.hxx
+++ b/sd/source/ui/slidesorter/inc/model/SlsVisualState.hxx
@@ -49,8 +49,6 @@ public:
 
     void UpdateVisualState (const PageDescriptor& rDescriptor);
 
-    void SetMouseOverState (const bool bIsMouseOver);
-
     Point GetLocationOffset (void) const;
     bool SetLocationOffset (const Point& rPoint);
 
@@ -60,8 +58,6 @@ private:
     State meCurrentVisualState;
     State meOldVisualState;
     sal_Int32 mnStateAnimationId;
-    bool mbOldMouseOverState;
-    bool mbCurrentMouseOverState;
 
     Point maLocationOffset;
     sal_Int32 mnLocationAnimationId;
diff --git a/sd/source/ui/slidesorter/model/SlsVisualState.cxx b/sd/source/ui/slidesorter/model/SlsVisualState.cxx
index ce54abb..b097eda 100644
--- a/sd/source/ui/slidesorter/model/SlsVisualState.cxx
+++ b/sd/source/ui/slidesorter/model/SlsVisualState.cxx
@@ -62,18 +62,8 @@ void VisualState::UpdateVisualState (const PageDescriptor& rDescriptor)
         SetVisualState(VS_Selected);
     else
         SetVisualState(VS_None);
-
-    SetMouseOverState(rDescriptor.HasState(PageDescriptor::ST_MouseOver));
-}
-
-
-void VisualState::SetMouseOverState (const bool bIsMouseOver)
-{
-    mbOldMouseOverState = mbCurrentMouseOverState;
-    mbCurrentMouseOverState = bIsMouseOver;
 }
 
-
 Point VisualState::GetLocationOffset (void) const
 {
     return maLocationOffset;
commit 867fdeaac288b11bced0e921ad5e443d27f99237
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Apr 7 13:24:10 2014 +0100

    coverity#708137 Uninitialized scalar field
    
    Change-Id: I27966ee56ceac9a82fe901e942540c8e5d9c93dc

diff --git a/sd/source/ui/slidesorter/controller/SlsInsertionIndicatorHandler.cxx b/sd/source/ui/slidesorter/controller/SlsInsertionIndicatorHandler.cxx
index 68514fb..b2c66b2 100644
--- a/sd/source/ui/slidesorter/controller/SlsInsertionIndicatorHandler.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsInsertionIndicatorHandler.cxx
@@ -40,6 +40,7 @@ InsertionIndicatorHandler::InsertionIndicatorHandler (SlideSorter& rSlideSorter)
       mpInsertionIndicatorOverlay(new view::InsertionIndicatorOverlay(rSlideSorter)),
       maInsertPosition(),
       meMode(MoveMode),
+      mbIsInsertionTrivial(false),
       mbIsActive(false),
       mbIsReadOnly(mrSlideSorter.GetModel().IsReadOnly()),
       mbIsOverSourceView(true),
commit 2ae814b4152438571dfcedc42a4c1bcebae785c6
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Apr 7 13:23:05 2014 +0100

    coverity#708134 Uninitialized scalar field
    
    Change-Id: Id00f771bb7ba80c60aae5f94050319b26aa2c861

diff --git a/sd/source/ui/inc/navigatr.hxx b/sd/source/ui/inc/navigatr.hxx
index 858654e..422f36f 100644
--- a/sd/source/ui/inc/navigatr.hxx
+++ b/sd/source/ui/inc/navigatr.hxx
@@ -60,7 +60,12 @@ class SdPageNameControllerItem;
 class NavDocInfo
 {
 public:
-            NavDocInfo() { mpDocShell = NULL; }
+    NavDocInfo()
+        : bName(false)
+        , bActive(false)
+        , mpDocShell(NULL)
+    {
+    }
 
     sal_Bool    HasName() { return( (sal_Bool) bName ); }
     sal_Bool    IsActive() { return( (sal_Bool) bActive ); }
commit a2c1d602a2fada11ba61bf7c68b20609e13bd243
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Apr 7 13:21:50 2014 +0100

    coverity#708132 Uninitialized scalar field
    
    Change-Id: I24496262cc2101e47b83878dc0c7cef963471a5c

diff --git a/sd/source/ui/func/fudraw.cxx b/sd/source/ui/func/fudraw.cxx
index 7b0612a..42f457d 100644
--- a/sd/source/ui/func/fudraw.cxx
+++ b/sd/source/ui/func/fudraw.cxx
@@ -74,21 +74,20 @@ TYPEINIT1( FuDraw, FuPoor );
  * Base-class for all drawmodul-specific functions
  */
 FuDraw::FuDraw(ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView,
-               SdDrawDocument* pDoc, SfxRequest& rReq) :
-    FuPoor(pViewSh, pWin, pView, pDoc, rReq),
-    bMBDown(sal_False),
-    bDragHelpLine(sal_False),
-    bPermanent(sal_False)
+               SdDrawDocument* pDoc, SfxRequest& rReq)
+    : FuPoor(pViewSh, pWin, pView, pDoc, rReq)
+    , bMBDown(sal_False)
+    , bDragHelpLine(sal_False)
+    , nHelpLine(0)
+    , bPermanent(sal_False)
 {
 }
 
-
 FuDraw::~FuDraw()
 {
     mpView->BrkAction();
 }
 
-
 sal_Bool FuDraw::MouseButtonDown(const MouseEvent& rMEvt)
 {
     // remember button state for creation of own MouseEvents
commit f50b76ae8a67ce11275c5de030941edf00ec8223
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Apr 7 13:20:35 2014 +0100

    coverity#708131 Uninitialized scalar field
    
    Change-Id: I95ad784b96a130a7549266ebda883389941cf962

diff --git a/sd/source/ui/func/fuconuno.cxx b/sd/source/ui/func/fuconuno.cxx
index 438e232..a3de537 100644
--- a/sd/source/ui/func/fuconuno.cxx
+++ b/sd/source/ui/func/fuconuno.cxx
@@ -53,6 +53,8 @@ FuConstructUnoControl::FuConstructUnoControl (
     SdDrawDocument* pDoc,
     SfxRequest&     rReq)
     : FuConstruct(pViewSh, pWin, pView, pDoc, rReq)
+    , nInventor(0)
+    , nIdentifier(0)
 {
 }
 
commit dcfa6ba11f23c45fcbe82d15aff3741bbb930569
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Apr 7 13:18:41 2014 +0100

    coverity#708128 Uninitialized scalar field
    
    Change-Id: Ic22b6640ba6b87769bdf00bc630d463de1ba04ad

diff --git a/sd/source/filter/ppt/propread.hxx b/sd/source/filter/ppt/propread.hxx
index c5f6512..5a62355 100644
--- a/sd/source/filter/ppt/propread.hxx
+++ b/sd/source/filter/ppt/propread.hxx
@@ -113,15 +113,18 @@ struct PropEntry
 
 class PropItem : public SvMemoryStream
 {
-        sal_uInt16      mnTextEnc;
-
-    public :
-                        PropItem(){};
-        void            Clear();
-
-        void            SetTextEncoding( sal_uInt16 nTextEnc ){ mnTextEnc = nTextEnc; };
-        sal_Bool        Read( OUString& rString, sal_uInt32 nType = VT_EMPTY, sal_Bool bDwordAlign = sal_True );
-        PropItem&       operator=( PropItem& rPropItem );
+    sal_uInt16      mnTextEnc;
+
+public:
+    PropItem()
+        : mnTextEnc(RTL_TEXTENCODING_DONTKNOW)
+    {
+    }
+    void            Clear();
+
+    void            SetTextEncoding( sal_uInt16 nTextEnc ){ mnTextEnc = nTextEnc; };
+    sal_Bool        Read( OUString& rString, sal_uInt32 nType = VT_EMPTY, sal_Bool bDwordAlign = sal_True );
+    PropItem&       operator=( PropItem& rPropItem );
 
     using SvStream::Read;
 };
commit 7ebd6b5dcff979c992b16fe7d2d3b7125ccd8948
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Apr 7 13:17:12 2014 +0100

    coverity#708126 Uninitialized scalar field
    
    Change-Id: Ib5dfaaf60551ed87c650863388e2e81b899bd253

diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index 1611ddd..2654830 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -165,13 +165,16 @@ SdPPTImport::~SdPPTImport()
 }
 
 ImplSdPPTImport::ImplSdPPTImport( SdDrawDocument* pDocument, SvStorage& rStorage_, SfxMedium& rMedium, PowerPointImportParam& rParam )
-:   SdrPowerPointImport     ( rParam, rMedium.GetBaseURL() )
-,   mrMed                   ( rMedium )
-,   mrStorage               ( rStorage_ )
-,   mbDocumentFound         ( sal_False )
-,   mnFilterOptions         ( 0 )
+    : SdrPowerPointImport(rParam, rMedium.GetBaseURL())
+    , mrMed(rMedium)
+    , mrStorage(rStorage_)
+    , mbDocumentFound(sal_False)
+    , mnFilterOptions(0)
+    , mpDoc(pDocument)
+    , mePresChange(PRESCHANGE_MANUAL)
+    , mnBackgroundLayerID(0)
+    , mnBackgroundObjectsLayerID(0)
 {
-    mpDoc = pDocument;
     if ( bOk )
     {
         mbDocumentFound = SeekToDocument( &maDocHd );                           // maDocHd = the latest DocumentHeader
commit b89813ea4563a33ff2733ea88190c50681d63093
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Apr 7 13:14:50 2014 +0100

    coverity#708124 Uninitialized scalar field
    
    Change-Id: Id5cb00b710a91c63eff40025b6c91a985ea90ad7

diff --git a/sd/source/filter/eppt/pptx-text.cxx b/sd/source/filter/eppt/pptx-text.cxx
index 83448fb..75effa8 100644
--- a/sd/source/filter/eppt/pptx-text.cxx
+++ b/sd/source/filter/eppt/pptx-text.cxx
@@ -681,6 +681,14 @@ ParagraphObj::ParagraphObj(::com::sun::star::uno::Reference< ::com::sun::star::t
     , mbIsBullet(false)
     , mbFirstParagraph( aParaFlags.bFirstParagraph )
     , mbLastParagraph( aParaFlags.bLastParagraph )
+    , meBullet(css::beans::PropertyState_AMBIGUOUS_VALUE)
+    , meTextAdjust(css::beans::PropertyState_AMBIGUOUS_VALUE)
+    , meLineSpacing(css::beans::PropertyState_AMBIGUOUS_VALUE)
+    , meLineSpacingTop(css::beans::PropertyState_AMBIGUOUS_VALUE)
+    , meLineSpacingBottom(css::beans::PropertyState_AMBIGUOUS_VALUE)
+    , meForbiddenRules(css::beans::PropertyState_AMBIGUOUS_VALUE)
+    , meParagraphPunctation(css::beans::PropertyState_AMBIGUOUS_VALUE)
+    , meBiDi(css::beans::PropertyState_AMBIGUOUS_VALUE)
     , mnTextAdjust(0)
     , mnLineSpacing(0)
     , mbFixedLineSpacing(false)
commit bf39758029a34c1ed2fc3cd43be46600b8f8b8cd
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Apr 7 13:12:05 2014 +0100

    coverity#708123 Uninitialized scalar field
    
    Change-Id: I3161342b7033e376ef3fb49ffd63b4577ef18811

diff --git a/sd/source/filter/eppt/pptx-text.cxx b/sd/source/filter/eppt/pptx-text.cxx
index aed6c61..83448fb 100644
--- a/sd/source/filter/eppt/pptx-text.cxx
+++ b/sd/source/filter/eppt/pptx-text.cxx
@@ -1206,6 +1206,16 @@ void ParagraphObj::ImplGetParagraphValues( PPTExBulletProvider& rBuProv, sal_Boo
 
 void ParagraphObj::ImplConstruct( const ParagraphObj& rParagraphObj )
 {
+    mbIsBullet = rParagraphObj.mbIsBullet;
+    meBullet = rParagraphObj.meBullet;
+    meTextAdjust = rParagraphObj.meTextAdjust;
+    meLineSpacing = rParagraphObj.meLineSpacing;
+    meLineSpacingTop = rParagraphObj.meLineSpacingTop;
+    meLineSpacingBottom = rParagraphObj.meLineSpacingBottom;
+    meForbiddenRules = rParagraphObj.meForbiddenRules;
+    meParagraphPunctation = rParagraphObj.meParagraphPunctation;
+    meBiDi =rParagraphObj.meBiDi;
+    mbFixedLineSpacing = rParagraphObj.mbFixedLineSpacing;
     mnTextSize = rParagraphObj.mnTextSize;
     mnTextAdjust = rParagraphObj.mnTextAdjust;
     mnLineSpacing = rParagraphObj.mnLineSpacing;
commit f0efb472b17d1e9dfcbd673b847e6ff65c37d6dc
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Apr 7 13:08:11 2014 +0100

    coverity#708121 Uninitialized scalar field
    
    Change-Id: I73d128c82281f252af62f0318dd1d15e11c0e9a7

diff --git a/sd/source/filter/eppt/pptx-text.cxx b/sd/source/filter/eppt/pptx-text.cxx
index 136bb89..aed6c61 100644
--- a/sd/source/filter/eppt/pptx-text.cxx
+++ b/sd/source/filter/eppt/pptx-text.cxx
@@ -68,15 +68,23 @@ PortionObj::PortionObj( const ::com::sun::star::uno::Reference< ::com::sun::star
     ImplGetPortionValues( rFontCollection, sal_False );
 }
 
-PortionObj::PortionObj( ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & rXTextRange,
-                            sal_Bool bLast, FontCollection& rFontCollection ) :
-    mnCharAttrHard          ( 0 ),
-    mnCharAttr              ( 0 ),
-    mnFont                  ( 0 ),
-    mnAsianOrComplexFont    ( 0xffff ),
-    mbLastPortion           ( bLast ),
-    mpText                  ( NULL ),
-    mpFieldEntry            ( NULL )
+PortionObj::PortionObj(::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & rXTextRange,
+                           sal_Bool bLast, FontCollection& rFontCollection)
+    : meCharColor(css::beans::PropertyState_AMBIGUOUS_VALUE)
+    , meCharHeight(css::beans::PropertyState_AMBIGUOUS_VALUE)
+    , meFontName(css::beans::PropertyState_AMBIGUOUS_VALUE)
+    , meAsianOrComplexFont(css::beans::PropertyState_AMBIGUOUS_VALUE)
+    , meCharEscapement(css::beans::PropertyState_AMBIGUOUS_VALUE)
+    , mnCharAttrHard(0)
+    , mnCharColor(0)
+    , mnCharAttr(0)
+    , mnCharHeight(0)
+    , mnFont(0)
+    , mnAsianOrComplexFont(0xffff)
+    , mnCharEscapement(0)
+    , mbLastPortion(bLast)
+    , mpText(NULL)
+    , mpFieldEntry(NULL)
 {
     OUString aString( rXTextRange->getString() );
     OUString aURL;
commit d666ce1848478aa2d1d441e2c2707c8ccb24c010
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Apr 7 13:00:50 2014 +0100

    WaE: -Werror=uninitialized
    
    Change-Id: I6cda8d722299df581326ad4c7391609a480bd39f

diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx
index 44c56d1..01f85cd 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -259,7 +259,7 @@ void SectRepr::SetFilter( const OUString& rFilter )
 void SectRepr::SetSubRegion(const OUString& rSubRegion)
 {
     OUString sNewFile;
-    sal_Int32 n;
+    sal_Int32 n(0);
     const OUString sLinkFileName(m_SectionData.GetLinkFileName());
     const OUString sOldFileName( sLinkFileName.getToken( 0, sfx2::cTokenSeparator, n ) );
     const OUString sFilter( sLinkFileName.getToken( 0, sfx2::cTokenSeparator, n ) );
commit 61a7ece840d55bdf667421a8058e720c82f447ae
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Apr 7 12:56:33 2014 +0100

    coverity#708120 Uninitialized scalar field
    
    Change-Id: I097d0bc2df695df0e3d170efc0bee39f8b00a954

diff --git a/sd/source/filter/eppt/pptx-text.cxx b/sd/source/filter/eppt/pptx-text.cxx
index 2a2dc41..136bb89 100644
--- a/sd/source/filter/eppt/pptx-text.cxx
+++ b/sd/source/filter/eppt/pptx-text.cxx
@@ -429,6 +429,14 @@ void PortionObj::ImplClear()
 
 void PortionObj::ImplConstruct( const PortionObj& rPortionObj )
 {
+    meCharColor = rPortionObj.meCharColor;
+    meCharHeight = rPortionObj.meCharHeight;
+    meFontName = rPortionObj.meFontName;
+    meAsianOrComplexFont = rPortionObj.meAsianOrComplexFont;
+    meCharEscapement = rPortionObj.meCharEscapement;
+    meCharLocale = rPortionObj.meCharLocale;
+    mnCharAttrHard = rPortionObj.mnCharAttrHard;
+
     mbLastPortion = rPortionObj.mbLastPortion;
     mnTextSize = rPortionObj.mnTextSize;
     mnCharColor = rPortionObj.mnCharColor;
commit 67b3a972836f7b29f24d0615d2758ff4089b8e9c
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Apr 7 12:51:39 2014 +0100

    coverity#708119 Uninitialized scalar field
    
    Change-Id: I746a90d5af339fc0dc7471e1e7fed88e6933b50e

diff --git a/sd/source/filter/eppt/pptx-grouptable.cxx b/sd/source/filter/eppt/pptx-grouptable.cxx
index 60252c2..a6595d9 100644
--- a/sd/source/filter/eppt/pptx-grouptable.cxx
+++ b/sd/source/filter/eppt/pptx-grouptable.cxx
@@ -22,25 +22,22 @@
 using ::com::sun::star::uno::Reference;
 using ::com::sun::star::container::XIndexAccess;
 
-GroupTable::GroupTable() :
-    mnCurrentGroupEntry ( 0 ),
-    mnMaxGroupEntry     ( 0 ),
-    mnGroupsClosed      ( 0 ),
-    mpGroupEntry        ( NULL )
+GroupTable::GroupTable()
+    : mnIndex(0)
+    , mnCurrentGroupEntry(0)
+    , mnMaxGroupEntry(0)
+    , mnGroupsClosed(0)
+    , mpGroupEntry(NULL)
 {
     ImplResizeGroupTable( 32 );
 }
 
-
-
 GroupTable::~GroupTable()
 {
     for ( sal_uInt32 i = 0; i < mnCurrentGroupEntry; delete mpGroupEntry[ i++ ] ) ;
     delete[] mpGroupEntry;
 }
 
-
-
 void GroupTable::ImplResizeGroupTable( sal_uInt32 nEntrys )
 {
     if ( nEntrys > mnMaxGroupEntry )
commit 29532437324ae3ec6de07e612d99a3d1cc2f36c4
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Apr 7 12:50:22 2014 +0100

    coverity#708117 Uninitialized scalar field
    
    Change-Id: I7ef430d48c7a984bc68f89fdcca821ddd2265853

diff --git a/sd/source/filter/eppt/eppt.hxx b/sd/source/filter/eppt/eppt.hxx
index dc9f1d1..9350bda 100644
--- a/sd/source/filter/eppt/eppt.hxx
+++ b/sd/source/filter/eppt/eppt.hxx
@@ -127,9 +127,11 @@ struct PPTExOleObjEntry
     ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >    xControlModel;
     ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >       xShape;
 
-    PPTExOleObjEntry( PPTExOleObjEntryType eT, sal_uInt32 nOfs ) :
-        eType   ( eT ),
-        nOfsA   ( nOfs ) {};
+    PPTExOleObjEntry(PPTExOleObjEntryType eT, sal_uInt32 nOfs)
+        : eType(eT)
+        , nOfsA(nOfs)
+        , nOfsB(0)
+    {}
 };
 
 struct TextRuleEntry
commit d913a5a9dfa44bb8061ff194e990c08cc40d7a69
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Apr 7 10:49:39 2014 +0100

    untangle the bFmt == 2 hack
    
    Firstly, IsFormat is unused so there's no "escape" of
    bFmt back into the outside world.
    
    Then bFmt has two purposes.
    
    Purpose 1 is 'not be a format dialog, be a format dialog, be a format dialog but hide standard button'
    
    so, lets just add an explicit "Hide standard button" method and call
    it in the (apparently) one place where it's necessary.
    
    Purpose 2 is to flag that "BaseFmtHdl" was called from clicking
    the "Standard" button at which point its set to 2.
    
    SfxTabDialog::Init_Impl had...
    
    "
      // bFmt = temporary Flag passed on in the Constructor(),
      // if bFmt == 2, then also sal_True,
      // additional suppression of the standard button,
      // after the Initializing set to sal_True again
      if ( bFmtFlag != 2 )
          m_pBaseFmtBtn->Show();
      else
          bFmtFlag = sal_True;
    "
    
    but the variable acted on is bFmtFlag a copy of bFmt, and is never read again
    after that line, so setting it to sal_True is meaningless. The comment suggests
    that the intent is to reset bFmt to true if it was 2 during initialization,
    which fits with the later use of bFmt == 2 to indicate that the standard button was
    clicked, i.e. reset bFmt back to its standard value.
    
    So make bFmt a simple toggle of dialog as a format dialog or not, add a way
    to remove the standard button and add a second variable to indicate the standard
    button got pressed.
    
    Change-Id: I98a441f5f314845abe243e05b6d92fd71d7b0b04

diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx
index b80d9d5..dbe76bd 100644
--- a/filter/source/pdf/impdialog.cxx
+++ b/filter/source/pdf/impdialog.cxx
@@ -62,9 +62,7 @@ using namespace ::com::sun::star;
 
 ImpPDFTabDialog::ImpPDFTabDialog(Window* pParent, Sequence< PropertyValue >& rFilterData,
     const Reference< XComponent >& rxDoc)
-    : SfxTabDialog(pParent, "PdfOptionsDialog","filter/ui/pdfoptionsdialog.ui",
-        0, false),
-
+    : SfxTabDialog(pParent, "PdfOptionsDialog","filter/ui/pdfoptionsdialog.ui"),
     maConfigItem( "Office.Common/Filter/PDF/Export/", &rFilterData ),
     maConfigI18N( "Office.Common/I18N/CTL/" ),
     mnSigningPageId(0),
diff --git a/include/sfx2/tabdlg.hxx b/include/sfx2/tabdlg.hxx
index 79c7500..80af1c4 100644
--- a/include/sfx2/tabdlg.hxx
+++ b/include/sfx2/tabdlg.hxx
@@ -93,7 +93,7 @@ friend class SfxTabDialogController;
     sal_uInt16*         pRanges;
     sal_uInt16          nAppPageId;
     bool                bItemsReset;
-    sal_Bool            bFmt; // sal_True, sal_False or 2(some kind of hack)
+    bool                bStandardPushed;
 
     DECL_DLLPRIVATE_LINK( ActivatePageHdl, TabControl * );
     DECL_DLLPRIVATE_LINK( DeactivatePageHdl, TabControl * );
@@ -102,7 +102,7 @@ friend class SfxTabDialogController;
     DECL_DLLPRIVATE_LINK(BaseFmtHdl, void *);
     DECL_DLLPRIVATE_LINK(UserHdl, void *);
     DECL_DLLPRIVATE_LINK(CancelHdl, void *);
-    SAL_DLLPRIVATE void Init_Impl( sal_Bool bFmtFlag, const OUString* pUserButtonText, const ResId* pResId );
+    SAL_DLLPRIVATE void Init_Impl(bool bFmtFlag, const OUString* pUserButtonText, const ResId* pResId);
 
 protected:
     virtual short               Ok();
@@ -128,12 +128,12 @@ protected:
     void SavePosAndId();
 
 public:
-    SfxTabDialog( Window* pParent,
-                  const OString& rID, const OUString& rUIXMLDescription,
-                  const SfxItemSet * = 0, sal_Bool bEditFmt = sal_False );
-    SfxTabDialog( SfxViewFrame *pViewFrame, Window* pParent,
-                  const OString& rID, const OUString& rUIXMLDescription,
-                  const SfxItemSet * = 0, sal_Bool bEditFmt = sal_False );
+    SfxTabDialog(Window* pParent,
+                 const OString& rID, const OUString& rUIXMLDescription,
+                 const SfxItemSet * = 0, bool bEditFmt = false);
+    SfxTabDialog(SfxViewFrame *pViewFrame, Window* pParent,
+                 const OString& rID, const OUString& rUIXMLDescription,
+                 const SfxItemSet * = 0, bool bEditFmt = false);
     virtual ~SfxTabDialog();
 
     sal_uInt16          AddTabPage( const OString& rName,           // Name of the label for the page in the notebook .ui
@@ -198,7 +198,6 @@ public:
     const sal_uInt16*       GetInputRanges( const SfxItemPool& );
     void                SetInputSet( const SfxItemSet* pInSet );
     const SfxItemSet*   GetOutputItemSet() const { return pOutSet; }
-    sal_Bool            IsFormat() const { return bFmt; }
 
     const PushButton&   GetOKButton() const { return *m_pOKBtn; }
     PushButton&         GetOKButton() { return *m_pOKBtn; }
@@ -210,6 +209,7 @@ public:
     const PushButton*   GetUserButton() const { return m_pUserBtn; }
     PushButton*         GetUserButton() { return m_pUserBtn; }
     void                RemoveResetButton();
+    void                RemoveStandardButton();
 
     short               Execute() SAL_OVERRIDE;
     void                StartExecuteModal( const Link& rEndDialogHdl ) SAL_OVERRIDE;
diff --git a/sfx2/source/dialog/styledlg.cxx b/sfx2/source/dialog/styledlg.cxx
index 09c84ee..73cd425 100644
--- a/sfx2/source/dialog/styledlg.cxx
+++ b/sfx2/source/dialog/styledlg.cxx
@@ -42,15 +42,15 @@ SfxStyleDialog::SfxStyleDialog
     Constructor: Add Manage TabPage, set ExampleSet from style.
 */
 
-    : SfxTabDialog( pParent, rID, rUIXMLDescription,
-                  rStyle.GetItemSet().Clone(),
-                  // return TRUE also without ParentSupport , but extended
-                  // to suppress the standardButton
-                  rStyle.HasParentSupport() ? sal_True : 2 )
-
+    : SfxTabDialog(pParent, rID, rUIXMLDescription,
+                  rStyle.GetItemSet().Clone(), true)
     , pStyle( &rStyle )
 
 {
+    // without ParentSupport suppress the standardButton
+    if (!rStyle.HasParentSupport())
+        RemoveStandardButton();
+
     m_nOrganizerId = AddTabPage("organizer", SfxManageStyleSheetPage::Create, 0);
 
     // With new template always set the management page as the current page
diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx
index 6666f83..dec86be 100644
--- a/sfx2/source/dialog/tabdlg.cxx
+++ b/sfx2/source/dialog/tabdlg.cxx
@@ -397,8 +397,7 @@ SfxTabDialog::SfxTabDialog
     const OString& rID, const OUString& rUIXMLDescription, //Dialog Name, Dialog .ui path
     const SfxItemSet* pItemSet,   // Itemset with the data;
                                   // can be NULL, when Pages are onDemand
-    sal_Bool bEditFmt             // Flag: templates are processed
-                                  // when yes -> additional Button for standard
+    bool bEditFmt                 // when yes -> additional Button for standard
 )
     : TabDialog(pParent, rID, rUIXMLDescription)
     , pFrame(pViewFrame)
@@ -407,10 +406,10 @@ SfxTabDialog::SfxTabDialog
     , pRanges(0)
     , nAppPageId(USHRT_MAX)
     , bItemsReset(false)
-    , bFmt(bEditFmt)
+    , bStandardPushed(false)
     , pExampleSet(0)
 {
-    Init_Impl( bFmt, NULL, NULL );
+    Init_Impl(bEditFmt, NULL, NULL);
 }
 
 
@@ -427,8 +426,7 @@ SfxTabDialog::SfxTabDialog
     const OString& rID, const OUString& rUIXMLDescription, //Dialog Name, Dialog .ui path
     const SfxItemSet* pItemSet,   // Itemset with the data;
                                   // can be NULL, when Pages are onDemand
-    sal_Bool bEditFmt             // Flag: templates are processed
-                                  // when yes -> additional Button for standard
+    bool bEditFmt                 // when yes -> additional Button for standard
 )
     : TabDialog(pParent, rID, rUIXMLDescription)
     , pFrame(0)
@@ -437,10 +435,10 @@ SfxTabDialog::SfxTabDialog
     , pRanges(0)
     , nAppPageId(USHRT_MAX)
     , bItemsReset(false)
-    , bFmt(bEditFmt)
+    , bStandardPushed(false)
     , pExampleSet(0)
 {
-    Init_Impl(bFmt, NULL, NULL);
+    Init_Impl(bEditFmt, NULL, NULL);
     DBG_WARNING( "Please use the Construtor with the ViewFrame" );
 }
 
@@ -510,7 +508,7 @@ SfxTabDialog::~SfxTabDialog()
 
 
 
-void SfxTabDialog::Init_Impl( sal_Bool bFmtFlag, const OUString* pUserButtonText, const ResId *pResId )
+void SfxTabDialog::Init_Impl(bool bFmtFlag, const OUString* pUserButtonText, const ResId *pResId)
 
 /*  [Description]
 
@@ -607,22 +605,12 @@ void SfxTabDialog::Init_Impl( sal_Bool bFmtFlag, const OUString* pUserButtonText
         m_pUserBtn->Show();
     }
 
-    /* TODO: Check what is up with bFmt/bFmtFlag. Comment below suggests a
-             different behavior than implemented!! */
     if ( bFmtFlag )
     {
         m_pBaseFmtBtn->SetText( SfxResId( STR_STANDARD_SHORTCUT ).toString() );
         m_pBaseFmtBtn->SetClickHdl( LINK( this, SfxTabDialog, BaseFmtHdl ) );
         m_pBaseFmtBtn->SetHelpId( HID_TABDLG_STANDARD_BTN );
-
-        // bFmt = temporary Flag passed on in the Constructor(),
-        // if bFmt == 2, then also sal_True,
-        // additional suppression of the standard button,
-        // after the Initializing set to sal_True again
-        if ( bFmtFlag != 2 )
-            m_pBaseFmtBtn->Show();
-        else
-            bFmtFlag = sal_True;
+        m_pBaseFmtBtn->Show();
     }
 
     if ( pSet )
@@ -632,15 +620,16 @@ void SfxTabDialog::Init_Impl( sal_Bool bFmtFlag, const OUString* pUserButtonText
     }
 }
 
-
-
 void SfxTabDialog::RemoveResetButton()
 {
     m_pResetBtn->Hide();
     pImpl->bHideResetBtn = true;
 }
 
-
+void SfxTabDialog::RemoveStandardButton()
+{
+    m_pBaseFmtBtn->Hide();
+}
 
 short SfxTabDialog::Execute()
 {
@@ -922,7 +911,6 @@ short SfxTabDialog::Ok()
     RET_OK:       if at least one page has returned from FillItemSet,
                   otherwise RET_CANCEL.
 */
-
 {
     SavePosAndId(); //See fdo#38828 "Apply" resetting window position
 
@@ -966,13 +954,11 @@ short SfxTabDialog::Ok()
     if ( pImpl->bModified || ( pOutSet && pOutSet->Count() > 0 ) )
         bModified |= true;
 
-    if ( bFmt == 2 )
+    if (bStandardPushed)
         bModified |= true;
     return bModified ? RET_OK : RET_CANCEL;
 }
 
-
-
 IMPL_LINK_NOARG(SfxTabDialog, CancelHdl)
 {
     EndDialog( RET_USER_CANCEL );
@@ -1145,10 +1131,11 @@ IMPL_LINK_NOARG(SfxTabDialog, BaseFmtHdl)
 */
 
 {
+    bStandardPushed = true;
+
     const sal_uInt16 nId = m_pTabCtrl->GetCurPageId();
     Data_Impl* pDataObject = Find( pImpl->aData, nId );
     DBG_ASSERT( pDataObject, "Id not known" );
-    bFmt = 2;
 
     if ( pDataObject->fnGetRanges )
     {
diff --git a/sw/source/ui/envelp/label1.cxx b/sw/source/ui/envelp/label1.cxx
index a1499d8..bfc509b 100644
--- a/sw/source/ui/envelp/label1.cxx
+++ b/sw/source/ui/envelp/label1.cxx
@@ -94,7 +94,7 @@ void SwLabDlg::PageCreated(sal_uInt16 nId, SfxTabPage &rPage)
 SwLabDlg::SwLabDlg(Window* pParent, const SfxItemSet& rSet,
                                 SwNewDBMgr* pDBMgr, sal_Bool bLabel)
     : SfxTabDialog(pParent, "LabelDialog",
-        "modules/swriter/ui/labeldialog.ui", &rSet, false)
+        "modules/swriter/ui/labeldialog.ui", &rSet)
     , pNewDBMgr(pDBMgr)
     , pPrtPage(0)
     , aTypeIds(50, 10)
diff --git a/sw/source/ui/misc/num.cxx b/sw/source/ui/misc/num.cxx
index 011ac07f..02cf75d6 100644
--- a/sw/source/ui/misc/num.cxx
+++ b/sw/source/ui/misc/num.cxx
@@ -915,7 +915,7 @@ SwSvxNumBulletTabDialog::SwSvxNumBulletTabDialog(Window* pParent,
                     const SfxItemSet* pSwItemSet, SwWrtShell & rSh)
     : SfxTabDialog(pParent, "BulletsAndNumberingDialog",
         "modules/swriter/ui/bulletsandnumbering.ui",
-        pSwItemSet, sal_False)
+        pSwItemSet)
     , rWrtSh(rSh)
 {
     GetUserButton()->SetClickHdl(LINK(this, SwSvxNumBulletTabDialog, RemoveNumberingHdl));
diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx
index 1168d3f..d317eb3 100644
--- a/sw/source/ui/table/tabledlg.cxx
+++ b/sw/source/ui/table/tabledlg.cxx
@@ -1202,7 +1202,7 @@ void SwTableColumnPage::SetVisibleWidth(sal_uInt16 nPos, SwTwips nNewWidth)
 SwTableTabDlg::SwTableTabDlg(Window* pParent, SfxItemPool&,
     const SfxItemSet* pItemSet, SwWrtShell* pSh)
     : SfxTabDialog(0, pParent, "TablePropertiesDialog",
-        "modules/swriter/ui/tableproperties.ui", pItemSet, 0)
+        "modules/swriter/ui/tableproperties.ui", pItemSet)
     , pShell(pSh)
     , m_nHtmlMode(::GetHtmlMode(pSh->GetView().GetDocShell()))
 {
commit c06267b1056fed5dedac443b706d721620e40da9
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Apr 7 10:38:15 2014 +0100

    drop out of date undef SfxTabDialog foo
    
    Change-Id: I01d31d357f503ca32b18f3414305ca5dcf55f9ce

diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx
index bc4928d..8afb4f7 100644
--- a/sc/source/ui/attrdlg/scdlgfact.cxx
+++ b/sc/source/ui/attrdlg/scdlgfact.cxx
@@ -919,9 +919,6 @@ SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScAttrDlg(SfxViewFram
     return new ScAbstractTabDialog_Impl(pDlg);
 }
 
-#undef SfxTabDialog
-#undef ScAbstractTabDialog_Impl
-
 SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScHFEditDlg( SfxViewFrame*       pFrame,
                                                                         Window*         pParent,
                                                                         const SfxItemSet&   rCoreSet,
@@ -1024,9 +1021,6 @@ SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScSortDlg(Window* pPa
     return new ScAbstractTabDialog_Impl( pDlg );
 }
 
-#undef SfxTabDialog
-#undef ScAbstractTabDialog_Impl
-
 //------------------ Factories for TabPages--------------------
 CreateTabPage ScAbstractDialogFactory_Impl::GetTabPageCreatorFunc( sal_uInt16 nId )
 {


More information about the Libreoffice-commits mailing list