[Libreoffice-commits] .: 5 commits - sc/source sfx2/inc sfx2/source sot/inc svtools/inc svtools/source sw/source tools/inc unusedcode.easy

Caolán McNamara caolan at kemper.freedesktop.org
Fri Mar 23 07:58:31 PDT 2012


 sc/source/ui/app/inputhdl.cxx                  |    1 
 sc/source/ui/view/output.cxx                   |    4 --
 sc/source/ui/view/output2.cxx                  |    3 -
 sfx2/inc/sfx2/docfile.hxx                      |    3 -
 sfx2/source/doc/docfile.cxx                    |   11 +-----
 sot/inc/sot/object.hxx                         |    4 --
 svtools/inc/svtools/accessibilityoptions.hxx   |    5 +--
 svtools/source/config/accessibilityoptions.cxx |    9 +----
 sw/source/ui/table/tautofmt.cxx                |    3 -
 tools/inc/tools/ref.hxx                        |   41 +------------------------
 unusedcode.easy                                |    1 
 11 files changed, 10 insertions(+), 75 deletions(-)

New commits:
commit a09d551182d61d67313a7d97a25ab251c88f92e9
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Mar 23 13:23:32 2012 +0000

    we dont' need any SvCompatWeakBase use in SfxMedium AKAICS

diff --git a/sfx2/inc/sfx2/docfile.hxx b/sfx2/inc/sfx2/docfile.hxx
index 55cd3a2..53846f3 100644
--- a/sfx2/inc/sfx2/docfile.hxx
+++ b/sfx2/inc/sfx2/docfile.hxx
@@ -110,8 +110,6 @@ class SFX2_DLLPUBLIC SfxMedium : public SvRefBase
 
 public:
 
-    SvCompatWeakHdl*    GetHdl();
-
                         SfxMedium();
                         SfxMedium( const String &rName,
                                    StreamMode nOpenMode,
@@ -299,7 +297,6 @@ public:
 };
 
 SV_DECL_IMPL_REF( SfxMedium )
-SV_DECL_COMPAT_WEAK( SfxMedium )
 
 typedef ::std::vector< SfxMedium* > SfxMediumList;
 
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index c7e60da..ba7ffb8 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -253,7 +253,7 @@ void SAL_CALL SfxMediumHandler_Impl::handle( const com::sun::star::uno::Referenc
 }
 
 //----------------------------------------------------------------
-class SfxMedium_Impl : public SvCompatWeakBase
+class SfxMedium_Impl
 {
 public:
     ::ucbhelper::Content aContent;
@@ -323,8 +323,7 @@ public:
 
 //------------------------------------------------------------------
 SfxMedium_Impl::SfxMedium_Impl( SfxMedium* pAntiImplP )
- :  SvCompatWeakBase( pAntiImplP ),
-    bUpdatePickList(sal_True),
+ :  bUpdatePickList(sal_True),
     bIsTemp( sal_False ),
     bForceSynchron( sal_False ),
     bDownloadDone( sal_True ),
@@ -3039,12 +3038,6 @@ SvKeyValueIterator* SfxMedium::GetHeaderAttributes_Impl()
 
     return pImp->xAttributes;
 }
-//----------------------------------------------------------------
-
-SvCompatWeakHdl* SfxMedium::GetHdl()
-{
-    return pImp->GetHdl();
-}
 
 ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >  SfxMedium::GetInputStream()
 {
diff --git a/unusedcode.easy b/unusedcode.easy
index 08c0f96..b8d6b87 100755
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -125,7 +125,6 @@ SfxFoundCacheArr_Impl::Insert(SfxFoundCache_Impl const*&, unsigned short&)
 SfxFoundCacheArr_Impl::Insert(SfxFoundCache_Impl const**, unsigned short)
 SfxFoundCacheArr_Impl::Remove(SfxFoundCache_Impl const*&, unsigned short)
 SfxFoundCacheArr_Impl::Remove(unsigned short, unsigned short)
-SfxMedium::GetHdl()
 SfxModuleArr_Impl::DeleteAndDestroy(unsigned short, unsigned short)
 SfxNavigatorWrapper::GetChildWindowId()
 SfxPartChildWnd_Impl::GetChildWindowId()
commit 4a893297a8f755851477f07145f726aa3e6f9c9e
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Mar 23 12:45:46 2012 +0000

    weird use of volatile

diff --git a/svtools/inc/svtools/accessibilityoptions.hxx b/svtools/inc/svtools/accessibilityoptions.hxx
index 7783eb7..766af7c 100644
--- a/svtools/inc/svtools/accessibilityoptions.hxx
+++ b/svtools/inc/svtools/accessibilityoptions.hxx
@@ -40,8 +40,8 @@ class SVT_DLLPUBLIC SvtAccessibilityOptions:
     public utl::detail::Options, private SfxListener
 {
 private:
-    static SvtAccessibilityOptions_Impl* volatile sm_pSingleImplConfig;
-    static sal_Int32                     volatile sm_nAccessibilityRefCount;
+    static SvtAccessibilityOptions_Impl* sm_pSingleImplConfig;
+    static sal_Int32                     sm_nAccessibilityRefCount;
 
 public:
     SvtAccessibilityOptions();
diff --git a/svtools/source/config/accessibilityoptions.cxx b/svtools/source/config/accessibilityoptions.cxx
index 44ab3e4..44a9646 100644
--- a/svtools/source/config/accessibilityoptions.cxx
+++ b/svtools/source/config/accessibilityoptions.cxx
@@ -94,8 +94,8 @@ public:
 
 // initialization of static members --------------------------------------
 
-SvtAccessibilityOptions_Impl* volatile  SvtAccessibilityOptions::sm_pSingleImplConfig =NULL;
-sal_Int32                     volatile  SvtAccessibilityOptions::sm_nAccessibilityRefCount(0);
+SvtAccessibilityOptions_Impl* SvtAccessibilityOptions::sm_pSingleImplConfig =NULL;
+sal_Int32                     SvtAccessibilityOptions::sm_nAccessibilityRefCount(0);
 
 namespace
 {
commit 8b3bfa53c9ed62ea4d744ae0d874241b8fb27a81
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Mar 23 12:39:16 2012 +0000

    SvtAccessibilityOptions::GetIsForBorders is no longer used

diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 7232ad3..9fdaf2c 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -2029,7 +2029,6 @@ bool ScInputHandler::StartTable( sal_Unicode cTyped, bool bFromCommand, bool bIn
                 Color aBackCol = ((const SvxBrushItem&)
                                 pPattern->GetItem( ATTR_BACKGROUND )).GetColor();
                 ScModule* pScMod = SC_MOD();
-                //  SvtAccessibilityOptions::GetIsForBorders is no longer used (always assumed TRUE)
                 if ( aBackCol.GetTransparency() > 0 ||
                         Application::GetSettings().GetStyleSettings().GetHighContrastMode() )
                     aBackCol.SetColor( pScMod->GetColorConfig().GetColorValue(svtools::DOCCOLOR).nColor );
diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index c9233c5..b892c51 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -797,7 +797,6 @@ void ScOutputData::DrawBackground()
     sal_Bool bShowProt = bSyntaxMode && pDoc->IsTabProtected(nTab);
     sal_Bool bDoAll = bShowProt || bPagebreakMode || bSolidBackground;
 
-    //  SvtAccessibilityOptions::GetIsForBorders is no longer used (always assumed TRUE)
     sal_Bool bCellContrast = bUseStyleColor &&
             Application::GetSettings().GetStyleSettings().GetHighContrastMode();
 
@@ -915,7 +914,6 @@ void ScOutputData::DrawExtraShadow(sal_Bool bLeft, sal_Bool bTop, sal_Bool bRigh
     pDev->SetLineColor();
 
     const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
-    //  SvtAccessibilityOptions::GetIsForBorders is no longer used (always assumed TRUE)
     sal_Bool bCellContrast = bUseStyleColor && rStyleSettings.GetHighContrastMode();
     Color aAutoTextColor;
     if ( bCellContrast )
@@ -1126,7 +1124,6 @@ void ScOutputData::DrawFrame()
     Color aSingleColor;
     sal_Bool bUseSingleColor = false;
     const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
-    //  SvtAccessibilityOptions::GetIsForBorders is no longer used (always assumed TRUE)
     sal_Bool bCellContrast = bUseStyleColor && rStyleSettings.GetHighContrastMode();
 
     //  if a Calc OLE object is embedded in Draw/Impress, the VCL DrawMode is used
@@ -1325,7 +1322,6 @@ void ScOutputData::DrawRotatedFrame( const Color* pForceColor )
     const SfxItemSet*    pCondSet;
 
     const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
-    //  SvtAccessibilityOptions::GetIsForBorders is no longer used (always assumed TRUE)
     sal_Bool bCellContrast = bUseStyleColor && rStyleSettings.GetHighContrastMode();
 
     //  color (pForceColor) is determined externally, including DrawMode changes
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index ab9783e..7913a09 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -205,7 +205,6 @@ ScDrawStringsVars::ScDrawStringsVars(ScOutputData* pData, sal_Bool bPTL) :
     bPixelToLogic( bPTL )
 {
     ScModule* pScMod = SC_MOD();
-    //  SvtAccessibilityOptions::GetIsForBorders is no longer used (always assumed TRUE)
     bCellContrast = pOutput->bUseStyleColor &&
             Application::GetSettings().GetStyleSettings().GetHighContrastMode();
 
@@ -2231,7 +2230,6 @@ void ScOutputData::DrawEditParam::setPatternToEngine(bool bUseStyleColor)
         return;
 
     sal_Int32 nConfBackColor = SC_MOD()->GetColorConfig().GetColorValue(svtools::DOCCOLOR).nColor;
-    //  SvtAccessibilityOptions::GetIsForBorders is no longer used (always assumed TRUE)
     bool bCellContrast = bUseStyleColor &&
             Application::GetSettings().GetStyleSettings().GetHighContrastMode();
 
@@ -4668,7 +4666,6 @@ void ScOutputData::DrawRotated(sal_Bool bPixelToLogic)
 
     ScModule* pScMod = SC_MOD();
     sal_Int32 nConfBackColor = pScMod->GetColorConfig().GetColorValue(svtools::DOCCOLOR).nColor;
-    //  SvtAccessibilityOptions::GetIsForBorders is no longer used (always assumed TRUE)
     sal_Bool bCellContrast = bUseStyleColor &&
             Application::GetSettings().GetStyleSettings().GetHighContrastMode();
 
diff --git a/svtools/inc/svtools/accessibilityoptions.hxx b/svtools/inc/svtools/accessibilityoptions.hxx
index 7038bac..7783eb7 100644
--- a/svtools/inc/svtools/accessibilityoptions.hxx
+++ b/svtools/inc/svtools/accessibilityoptions.hxx
@@ -48,7 +48,6 @@ public:
     virtual ~SvtAccessibilityOptions();
 
     // get & set config entries
-    sal_Bool    GetIsForBorders() const;        // obsolete!
     sal_Bool    GetIsForPagePreviews() const;
     sal_Bool    GetIsHelpTipsDisappear() const;
     sal_Bool    GetIsAllowAnimatedGraphics() const;
diff --git a/svtools/source/config/accessibilityoptions.cxx b/svtools/source/config/accessibilityoptions.cxx
index f643f52..44ab3e4 100644
--- a/svtools/source/config/accessibilityoptions.cxx
+++ b/svtools/source/config/accessibilityoptions.cxx
@@ -545,11 +545,6 @@ void SvtAccessibilityOptions::Commit()
 
 // -----------------------------------------------------------------------
 
-sal_Bool SvtAccessibilityOptions::GetIsForBorders() const
-{
-    OSL_FAIL( "SvtAccessibilityOptions::GetIsForBorders: is obsolete!" );
-    return sal_False;
-}
 sal_Bool SvtAccessibilityOptions::GetAutoDetectSystemHC() const
 {
     return sm_pSingleImplConfig->GetAutoDetectSystemHC();
diff --git a/sw/source/ui/table/tautofmt.cxx b/sw/source/ui/table/tautofmt.cxx
index ad9acbd..efe3c91 100644
--- a/sw/source/ui/table/tautofmt.cxx
+++ b/sw/source/ui/table/tautofmt.cxx
@@ -968,8 +968,7 @@ void AutoFmtPreview::NotifyChange( const SwTableAutoFmt& rNewData )
 void AutoFmtPreview::DoPaint( const Rectangle& /*rRect*/ )
 {
     sal_uInt32 nOldDrawMode = aVD.GetDrawMode();
-    if( GetSettings().GetStyleSettings().GetHighContrastMode() &&
-            SW_MOD()->GetAccessibilityOptions().GetIsForBorders() )
+    if( GetSettings().GetStyleSettings().GetHighContrastMode() )
         aVD.SetDrawMode( DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL | DRAWMODE_SETTINGSTEXT | DRAWMODE_SETTINGSGRADIENT );
 
     Bitmap  thePreview;
commit 8ac384a5ca391693773478210b6334862967ae30
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Mar 23 11:42:45 2012 +0000

    only SV_DECL_COMPAT_WEAK is still in use

diff --git a/tools/inc/tools/ref.hxx b/tools/inc/tools/ref.hxx
index c30fe39..6b62027 100644
--- a/tools/inc/tools/ref.hxx
+++ b/tools/inc/tools/ref.hxx
@@ -388,21 +388,6 @@ SV_DECL_IMPL_REF(SvRefBase)
 
 SV_DECL_REF_LIST(SvRefBase,SvRefBase*)
 
-class SvWeakBase;
-class SvWeakHdl : public SvRefBase
-{
-    friend class SvWeakBase;
-    SvWeakBase* _pObj;
-public:
-    void ResetWeakBase( ) { _pObj = 0; }
-private:
-    SvWeakHdl( SvWeakBase* pObj ) : _pObj( pObj ) {}
-public:
-    SvWeakBase* GetObj() { return _pObj; }
-};
-
-SV_DECL_IMPL_REF( SvWeakHdl )
-
 class SvCompatWeakHdl : public SvRefBase
 {
     friend class SvCompatWeakBase;
@@ -415,17 +400,6 @@ public:
 
 SV_DECL_IMPL_REF( SvCompatWeakHdl )
 
-class SvWeakBase
-{
-    SvWeakHdlRef _xHdl;
-public:
-    SvWeakHdl* GetHdl() { return _xHdl; }
-
-    // Wg CompilerWarnung nicht ueber Initializer
-    SvWeakBase() { _xHdl = new SvWeakHdl( this ); }
-    ~SvWeakBase() { _xHdl->ResetWeakBase(); }
-};
-
 class SvCompatWeakBase
 {
     SvCompatWeakHdlRef _xHdl;
@@ -437,10 +411,10 @@ public:
     ~SvCompatWeakBase() { _xHdl->ResetWeakBase(); }
 };
 
-#define SV_DECL_WEAK_IMPL( ClassName, HdlName )                     \
+#define SV_DECL_COMPAT_WEAK( ClassName )                            \
 class ClassName##Weak                                               \
 {                                                                   \
-    HdlName _xHdl;                                                  \
+    SvCompatWeakHdlRef _xHdl;                                       \
 public:                                                             \
     inline               ClassName##Weak( ) {}                      \
     inline               ClassName##Weak( ClassName* pObj ) {       \
@@ -448,7 +422,7 @@ public:                                                             \
     inline void          Clear() { _xHdl.Clear(); }                 \
     inline ClassName##Weak& operator = ( ClassName * pObj ) {       \
         _xHdl = pObj ? pObj->GetHdl() : 0; return *this; }          \
-    inline sal_Bool            Is() const {                             \
+    inline sal_Bool            Is() const {                         \
         return _xHdl.Is() && _xHdl->GetObj(); }                     \
     inline ClassName *     operator &  () const {                   \
         return (ClassName*) ( _xHdl.Is() ? _xHdl->GetObj() : 0 ); } \
@@ -460,11 +434,6 @@ public:                                                             \
         return (ClassName*) (_xHdl.Is() ? _xHdl->GetObj() : 0 ); }  \
 };
 
-#define SV_DECL_WEAK( ClassName ) SV_DECL_WEAK_IMPL( ClassName, SvWeakHdlRef )
-#define SV_DECL_COMPAT_WEAK( ClassName ) SV_DECL_WEAK_IMPL( ClassName, SvCompatWeakHdlRef )
-
-SV_DECL_WEAK( SvWeakBase )
-
 #endif // _Weak_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit d3e42606765cb4c44c8f876a61def608fa24a757
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Mar 23 11:12:10 2012 +0000

    ditch archaic ifdefs for gcc 2.8.1, 2.9.0 and 2.9.1

diff --git a/sot/inc/sot/object.hxx b/sot/inc/sot/object.hxx
index 326d651..239a4cd 100644
--- a/sot/inc/sot/object.hxx
+++ b/sot/inc/sot/object.hxx
@@ -289,11 +289,7 @@ friend class SvObject;
                 bSVObject:1,        // Ist Proxy, dann TRUE wenn andere Seite SV ist
                 bInClose:1;         // TRUE, im DoClose
 
-#if defined (GCC) && (defined (C281) || defined (C290) || defined (C291))
-public:
-#else
 protected:
-#endif
     virtual             ~SotObject();
     void                SetExtern() { bOwner = sal_False; }
     virtual sal_Bool        Close();
diff --git a/tools/inc/tools/ref.hxx b/tools/inc/tools/ref.hxx
index 24fb962..c30fe39 100644
--- a/tools/inc/tools/ref.hxx
+++ b/tools/inc/tools/ref.hxx
@@ -343,11 +343,7 @@ public:\
 class TOOLS_DLLPUBLIC SvRefBase
 {
     sal_uIntPtr nRefCount;
-#if defined (GCC) && (defined (C281) || defined (C290) || defined (C291))
-public:
-#else
 protected:
-#endif
     virtual         ~SvRefBase();
     virtual void    QueryDelete();
 public:


More information about the Libreoffice-commits mailing list