[Libreoffice-commits] core.git: 4 commits - cui/source dbaccess/source include/formula include/svtools include/svx include/toolkit reportdesign/source svtools/source sw/source unusedcode.easy

Caolán McNamara caolanm at redhat.com
Tue Feb 17 03:45:41 PST 2015


 cui/source/options/optgdlg.cxx             |   14 ++++++++++
 dbaccess/source/core/api/RowSet.cxx        |    5 ---
 dbaccess/source/core/api/RowSet.hxx        |    6 +---
 include/formula/FormulaCompiler.hxx        |   13 +++++----
 include/svtools/ctrlbox.hxx                |    5 ---
 include/svx/langbox.hxx                    |    7 ++---
 include/svx/sdr/overlay/overlaymanager.hxx |    8 +++--
 include/svx/sdr/overlay/overlayobject.hxx  |    5 ++-
 include/toolkit/awt/animatedimagespeer.hxx |    5 ++-
 reportdesign/source/core/api/Groups.cxx    |   12 --------
 reportdesign/source/core/inc/Groups.hxx    |    2 -
 svtools/source/control/ctrlbox.cxx         |   39 -----------------------------
 sw/source/core/text/guess.cxx              |    2 -
 unusedcode.easy                            |    7 +----
 14 files changed, 42 insertions(+), 88 deletions(-)

New commits:
commit a96acacb91197a04e8fd9114d8c4bcda24372f54
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Feb 17 11:44:29 2015 +0000

    Resolves: tdf#89417 disable hardware accel checkbox if property is readonly
    
    Change-Id: Ie99643ba29a3b47dd47d2fb1359d573a52f4c64a

diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 207addc..a447474 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -78,6 +78,7 @@
 #include <com/sun/star/lang/XComponent.hpp>
 #include <com/sun/star/lang/XInitialization.hpp>
 #include <com/sun/star/beans/NamedValue.hpp>
+#include <com/sun/star/beans/PropertyAttribute.hpp>
 #include <com/sun/star/beans/XPropertySet.hpp>
 #include <com/sun/star/util/XChangesBatch.hpp>
 #include <com/sun/star/uno/Any.hxx>
@@ -456,6 +457,7 @@ public:
 
     bool    IsHardwareAccelerationEnabled() const;
     bool    IsHardwareAccelerationAvailable() const;
+    bool    IsHardwareAccelerationRO() const;
     void    EnabledHardwareAcceleration( bool _bEnabled ) const;
 
 private:
@@ -583,6 +585,17 @@ bool CanvasSettings::IsHardwareAccelerationEnabled() const
     return !bForceLastEntry;
 }
 
+bool CanvasSettings::IsHardwareAccelerationRO() const
+{
+    Reference< XPropertySet > xSet(mxForceFlagNameAccess, UNO_QUERY);
+    if (!xSet.is())
+        return true;
+
+    Reference< XPropertySetInfo > xInfo = xSet->getPropertySetInfo();
+    Property aProp = xInfo->getPropertyByName("ForceSafeServiceImpl");
+    return ((aProp.Attributes & css::beans::PropertyAttribute::READONLY ) == css::beans::PropertyAttribute::READONLY);
+}
+
 void CanvasSettings::EnabledHardwareAcceleration( bool _bEnabled ) const
 {
     Reference< XNameReplace > xNameReplace(
@@ -949,6 +962,7 @@ void OfaViewTabPage::Reset( const SfxItemSet* )
         if(pCanvasSettings->IsHardwareAccelerationAvailable())
         {
             m_pUseHardwareAccell->Check(pCanvasSettings->IsHardwareAccelerationEnabled());
+            m_pUseHardwareAccell->Enable(!pCanvasSettings->IsHardwareAccelerationRO());
         }
         else
         {
commit ef966b007deca9e76c24bc2afb74ba94a3173771
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Feb 17 10:02:24 2015 +0000

    assert on laying out fdo#82018-3.docx
    
    Change-Id: I325cd7ff03468009d06c886f800bd12e3acce976

diff --git a/sw/source/core/text/guess.cxx b/sw/source/core/text/guess.cxx
index b4eea87..f3c0bb0 100644
--- a/sw/source/core/text/guess.cxx
+++ b/sw/source/core/text/guess.cxx
@@ -207,7 +207,7 @@ bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
 
     sal_Int32 nPorLen = 0;
     // do not call the break iterator nCutPos is a blank
-    sal_Unicode cCutChar = rInf.GetTxt()[ nCutPos ];
+    sal_Unicode cCutChar = nCutPos < rInf.GetTxt().getLength() ? rInf.GetTxt()[nCutPos] : 0;
     if( CH_BLANK == cCutChar || CH_FULL_BLANK == cCutChar )
     {
         nBreakPos = nCutPos;
commit 8de63ad5bb2a60f7306a9bfe15384cd0164109df
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Feb 17 09:31:38 2015 +0000

    some more de-boostification
    
    Change-Id: I8ee8fd7b99598e484430d91e17e468951288d72d

diff --git a/include/formula/FormulaCompiler.hxx b/include/formula/FormulaCompiler.hxx
index ace9f3b..0758dda 100644
--- a/include/formula/FormulaCompiler.hxx
+++ b/include/formula/FormulaCompiler.hxx
@@ -25,9 +25,6 @@
 #include <rtl/ustring.hxx>
 #include <tools/debug.hxx>
 
-#include <boost/shared_ptr.hpp>
-#include <boost/noncopyable.hpp>
-
 #include <com/sun/star/uno/Sequence.hxx>
 
 #include <formula/opcode.hxx>
@@ -35,6 +32,7 @@
 #include <formula/token.hxx>
 #include <formula/ExternalReferenceHelper.hxx>
 
+#include <memory>
 #include <unordered_map>
 
 #define FORMULA_MAXJUMPCOUNT    32  /* maximum number of jumps (ocChoose) */
@@ -64,8 +62,11 @@ struct FormulaArrayStack
 typedef std::unordered_map< OUString, OpCode, OUStringHash, ::std::equal_to< OUString > > OpCodeHashMap;
 typedef std::unordered_map< OUString, OUString, OUStringHash, ::std::equal_to< OUString > > ExternalHashMap;
 
-class FORMULA_DLLPUBLIC FormulaCompiler : boost::noncopyable
+class FORMULA_DLLPUBLIC FormulaCompiler
 {
+private:
+    FormulaCompiler(const FormulaCompiler&) SAL_DELETED_FUNCTION;
+    FormulaCompiler& operator=(const FormulaCompiler&) SAL_DELETED_FUNCTION;
 public:
     FormulaCompiler();
     FormulaCompiler(FormulaTokenArray& _rArr);
@@ -191,8 +192,8 @@ public:
     };
 
 public:
-    typedef ::boost::shared_ptr< const OpCodeMap >  OpCodeMapPtr;
-    typedef ::boost::shared_ptr< OpCodeMap >        NonConstOpCodeMapPtr;
+    typedef std::shared_ptr< const OpCodeMap >  OpCodeMapPtr;
+    typedef std::shared_ptr< OpCodeMap >        NonConstOpCodeMapPtr;
 
     /** Get OpCodeMap for formula language.
         @param nLanguage
diff --git a/include/svx/langbox.hxx b/include/svx/langbox.hxx
index da82e90..f804f32 100644
--- a/include/svx/langbox.hxx
+++ b/include/svx/langbox.hxx
@@ -24,7 +24,6 @@
 #include <vcl/image.hxx>
 #include <vcl/lstbox.hxx>
 #include <vcl/combobox.hxx>
-#include <boost/noncopyable.hpp>
 
 
 #define LANG_LIST_EMPTY             0x0000
@@ -45,12 +44,14 @@
                                             // locale, such as Arabic as
                                             // opposed to Arabic-Egypt.
 
-
 // load language strings from resource
 SVX_DLLPUBLIC OUString    GetDicInfoStr( const OUString& rName, const sal_uInt16 nLang, bool bNeg );
 
-class SVX_DLLPUBLIC SvxLanguageBoxBase : boost::noncopyable
+class SVX_DLLPUBLIC SvxLanguageBoxBase
 {
+private:
+    SvxLanguageBoxBase(const SvxLanguageBoxBase&) SAL_DELETED_FUNCTION;
+    SvxLanguageBoxBase& operator=(const SvxLanguageBoxBase&) SAL_DELETED_FUNCTION;
 public:
     explicit SvxLanguageBoxBase( bool bCheck );
     virtual ~SvxLanguageBoxBase();
diff --git a/include/svx/sdr/overlay/overlaymanager.hxx b/include/svx/sdr/overlay/overlaymanager.hxx
index c0a03c4..24e77e8 100644
--- a/include/svx/sdr/overlay/overlaymanager.hxx
+++ b/include/svx/sdr/overlay/overlaymanager.hxx
@@ -20,7 +20,6 @@
 #ifndef INCLUDED_SVX_SDR_OVERLAY_OVERLAYMANAGER_HXX
 #define INCLUDED_SVX_SDR_OVERLAY_OVERLAYMANAGER_HXX
 
-#include <boost/utility.hpp>
 #include <rtl/ref.hxx>
 #include <svx/sdr/animation/scheduler.hxx>
 #include <svx/sdr/overlay/overlayobject.hxx>
@@ -54,10 +53,13 @@ namespace sdr
     namespace overlay
     {
         class SVX_DLLPUBLIC OverlayManager
-            : private boost::noncopyable
-            , protected ::sdr::animation::Scheduler
+            : protected ::sdr::animation::Scheduler
             , public salhelper::SimpleReferenceObject
         {
+        private:
+            OverlayManager(const OverlayManager&) SAL_DELETED_FUNCTION;
+            OverlayManager& operator=(const OverlayManager&) SAL_DELETED_FUNCTION;
+
         protected:
             // the OutputDevice to work on, set on construction and not to be changed
             OutputDevice&                               rmOutputDevice;
diff --git a/include/svx/sdr/overlay/overlayobject.hxx b/include/svx/sdr/overlay/overlayobject.hxx
index 857b7f9..7d803a2 100644
--- a/include/svx/sdr/overlay/overlayobject.hxx
+++ b/include/svx/sdr/overlay/overlayobject.hxx
@@ -56,9 +56,12 @@ namespace sdr
 {
     namespace overlay
     {
-        class SVX_DLLPUBLIC OverlayObject : private ::boost::noncopyable, public ::sdr::animation::Event
+        class SVX_DLLPUBLIC OverlayObject : public ::sdr::animation::Event
         {
         private:
+            OverlayObject(const OverlayObject&) SAL_DELETED_FUNCTION;
+            OverlayObject& operator=(const OverlayObject&) SAL_DELETED_FUNCTION;
+
             // Manager is allowed access to private Member mpOverlayManager
             friend class                                    OverlayManager;
 
diff --git a/include/toolkit/awt/animatedimagespeer.hxx b/include/toolkit/awt/animatedimagespeer.hxx
index 15dcac2..b0e366d 100644
--- a/include/toolkit/awt/animatedimagespeer.hxx
+++ b/include/toolkit/awt/animatedimagespeer.hxx
@@ -27,7 +27,6 @@
 
 #include <cppuhelper/implbase3.hxx>
 
-#include <boost/noncopyable.hpp>
 #include <memory>
 
 namespace toolkit
@@ -45,7 +44,6 @@ namespace toolkit
                                             >   AnimatedImagesPeer_Base;
 
     class AnimatedImagesPeer    :public AnimatedImagesPeer_Base
-                                ,public ::boost::noncopyable
     {
     public:
         AnimatedImagesPeer();
@@ -86,6 +84,9 @@ namespace toolkit
         void    impl_updateImages_nolck( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& i_animatedImages );
 
     private:
+        AnimatedImagesPeer(const AnimatedImagesPeer&) SAL_DELETED_FUNCTION;
+        AnimatedImagesPeer& operator=(const AnimatedImagesPeer&) SAL_DELETED_FUNCTION;
+
         std::unique_ptr< AnimatedImagesPeer_Data >   m_xData;
     };
 
commit 0f46d90621eb5af6548ec6e9933b3a041728bd4e
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Feb 17 09:24:47 2015 +0000

    callcatcher: update unused code
    
    Change-Id: I08e99a019fd2ec16e2c995035e4bcc09678ef92b

diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx
index a1918d5..90c4f53 100644
--- a/dbaccess/source/core/api/RowSet.cxx
+++ b/dbaccess/source/core/api/RowSet.cxx
@@ -513,11 +513,6 @@ Sequence< OUString > SAL_CALL ORowSet::getSupportedServiceNames(  ) throw(Runtim
     return getSupportedServiceNames_static();
 }
 
-Reference< XInterface > ORowSet::Create(const Reference< XComponentContext >& _rxContext)
-{
-    return *(new ORowSet( _rxContext ));
-}
-
 // OComponentHelper
 void SAL_CALL ORowSet::disposing()
 {
diff --git a/dbaccess/source/core/api/RowSet.hxx b/dbaccess/source/core/api/RowSet.hxx
index 35baaf9..581d42b 100644
--- a/dbaccess/source/core/api/RowSet.hxx
+++ b/dbaccess/source/core/api/RowSet.hxx
@@ -268,10 +268,8 @@ namespace dbaccess
         virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
 
     // ::com::sun::star::lang::XServiceInfo - static methods
-        static ::com::sun::star::uno::Sequence< OUString > getSupportedServiceNames_static(void) throw( ::com::sun::star::uno::RuntimeException );
-        static OUString getImplementationName_static(void) throw( ::com::sun::star::uno::RuntimeException );
-        static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
-                SAL_CALL Create(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >&);
+    static ::com::sun::star::uno::Sequence< OUString > getSupportedServiceNames_static(void) throw( ::com::sun::star::uno::RuntimeException );
+    static OUString getImplementationName_static(void) throw( ::com::sun::star::uno::RuntimeException );
 
     // OComponentHelper
         virtual void SAL_CALL disposing(void) SAL_OVERRIDE;
diff --git a/include/svtools/ctrlbox.hxx b/include/svtools/ctrlbox.hxx
index 886650b..6f78ee3 100644
--- a/include/svtools/ctrlbox.hxx
+++ b/include/svtools/ctrlbox.hxx
@@ -310,7 +310,6 @@ public:
     void            SetNone( const OUString& sNone );
 
     using ListBox::InsertEntry;
-    sal_Int32   InsertEntry( const OUString& rStr, sal_Int32  nPos = LISTBOX_APPEND );
     /** Insert a listbox entry with all widths in Twips. */
     void            InsertEntry( BorderWidthImpl aWidthImpl,
                         sal_uInt16 nStyle, long nMinWidth = 0,
@@ -318,10 +317,6 @@ public:
                         ColorFunc pColor2Fn = &sameColor,
                         ColorDistFunc pColorDistFn = &sameDistColor );
 
-    using ListBox::RemoveEntry;
-    void    RemoveEntry( sal_Int32  nPos );
-    void    Clear();
-
     using ListBox::GetEntryPos;
     sal_Int32  GetEntryPos( sal_uInt16 nStyle = com::sun::star::table::BorderLineStyle::SOLID ) const;
     sal_uInt16          GetEntryStyle( sal_Int32  nPos ) const;
diff --git a/reportdesign/source/core/api/Groups.cxx b/reportdesign/source/core/api/Groups.cxx
index e7cd7b7..a50e5e6 100644
--- a/reportdesign/source/core/api/Groups.cxx
+++ b/reportdesign/source/core/api/Groups.cxx
@@ -43,18 +43,6 @@ OGroups::~OGroups()
 {
 }
 
-void OGroups::copyGroups(const uno::Reference< report::XGroups >& _xSource)
-{
-    sal_Int32 nCount = _xSource->getCount();
-    for (sal_Int32 i = 0; i != nCount; ++i)
-    {
-        OGroup* pGroup = new OGroup(this,m_xContext);
-        m_aGroups.push_back(pGroup);
-        uno::Reference<report::XGroup> xGroup(_xSource->getByIndex(i),uno::UNO_QUERY);
-        pGroup->copyGroup(xGroup);
-    }
-}
-
 void SAL_CALL OGroups::dispose() throw(uno::RuntimeException, std::exception)
 {
     cppu::WeakComponentImplHelperBase::dispose();
diff --git a/reportdesign/source/core/inc/Groups.hxx b/reportdesign/source/core/inc/Groups.hxx
index 126f407..c2cf03a 100644
--- a/reportdesign/source/core/inc/Groups.hxx
+++ b/reportdesign/source/core/inc/Groups.hxx
@@ -59,8 +59,6 @@ namespace reportdesign
         OGroups( const ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportDefinition >& _xParent
                 ,const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& context);
 
-        void copyGroups(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XGroups >& _xSource);
-
     // XGroups
         // Attributes
         virtual ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportDefinition > SAL_CALL getReportDefinition() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx
index 903d18a..8337101 100644
--- a/svtools/source/control/ctrlbox.cxx
+++ b/svtools/source/control/ctrlbox.cxx
@@ -779,21 +779,6 @@ void LineListBox::SelectEntry( sal_uInt16 nStyle, bool bSelect )
         ListBox::SelectEntryPos( nPos, bSelect );
 }
 
-sal_Int32 LineListBox::InsertEntry( const OUString& rStr, sal_Int32 nPos )
-{
-    nPos = ListBox::InsertEntry( rStr, nPos );
-    if ( nPos != LISTBOX_ERROR ) {
-        if ( static_cast<size_t>(nPos) < pLineList->size() ) {
-            ImpLineList::iterator it = pLineList->begin();
-            ::std::advance( it, nPos );
-            pLineList->insert( it, reinterpret_cast<ImpLineListData *>(NULL) );
-        } else {
-            pLineList->push_back( NULL );
-        }
-    }
-    return nPos;
-}
-
 void LineListBox::InsertEntry(
     BorderWidthImpl aWidthImpl, sal_uInt16 nStyle, long nMinWidth,
     ColorFunc pColor1Fn, ColorFunc pColor2Fn, ColorDistFunc pColorDistFn )
@@ -803,30 +788,6 @@ void LineListBox::InsertEntry(
     pLineList->push_back( pData );
 }
 
-void LineListBox::RemoveEntry( sal_Int32 nPos )
-{
-    ListBox::RemoveEntry( nPos );
-
-    if ( 0 <= nPos && static_cast<size_t>(nPos) < pLineList->size() ) {
-        ImpLineList::iterator it = pLineList->begin();
-        ::std::advance( it, nPos );
-        if ( *it ) delete *it;
-        pLineList->erase( it );
-    }
-}
-
-void LineListBox::Clear()
-{
-    for ( size_t i = 0, n = pLineList->size(); i < n; ++i ) {
-        if ( (*pLineList)[ i ] ) {
-            delete (*pLineList)[ i ];
-        }
-    }
-    pLineList->clear();
-
-    ListBox::Clear();
-}
-
 sal_Int32 LineListBox::GetEntryPos( sal_uInt16 nStyle ) const
 {
     for ( size_t i = 0, n = pLineList->size(); i < n; ++i ) {
diff --git a/unusedcode.easy b/unusedcode.easy
index 7a6932e..9eec7a1 100644
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -1,8 +1,5 @@
 BigInt::BigInt(unsigned int)
 FontCharMap::GetDefaultMap(bool)
-LineListBox::Clear()
-LineListBox::InsertEntry(rtl::OUString const&, int)
-LineListBox::RemoveEntry(int)
 OpenGLContext::init(_XDisplay*, unsigned long, unsigned int, unsigned int, int)
 OpenGLContext::renderToFile()
 OpenGLContext::requestSingleBufferedRendering()
@@ -178,9 +175,9 @@ basegfx::tools::containsOnlyHorizontalAndVerticalEdges(basegfx::B2DPolyPolygon c
 canvas::createSurfaceProxyManager(boost::shared_ptr<canvas::IRenderModule> const&)
 chart::ShapeToolbarController::create(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&)
 comphelper::OAccessibleImplementationAccess::setStateBit(short, bool)
-comphelper::detail::ConfigurationWrapper::getGroupReadWrite(boost::shared_ptr<comphelper::ConfigurationChanges> const&, rtl::OUString const&) const
+comphelper::detail::ConfigurationWrapper::getGroupReadWrite(std::shared_ptr<comphelper::ConfigurationChanges> const&, rtl::OUString const&) const
 comphelper::detail::ConfigurationWrapper::getLocalizedPropertyValue(rtl::OUString const&) const
-comphelper::detail::ConfigurationWrapper::setLocalizedPropertyValue(boost::shared_ptr<comphelper::ConfigurationChanges> const&, rtl::OUString const&, com::sun::star::uno::Any const&) const
+comphelper::detail::ConfigurationWrapper::setLocalizedPropertyValue(std::shared_ptr<comphelper::ConfigurationChanges> const&, rtl::OUString const&, com::sun::star::uno::Any const&) const
 connectivity::dbase::ODbaseResultSet::createAnalyzer()
 connectivity::firebird::release(int&, cppu::OBroadcastHelperVar<cppu::OMultiTypeInterfaceContainerHelper, com::sun::star::uno::Type>&, com::sun::star::uno::Reference<com::sun::star::uno::XInterface>&, com::sun::star::lang::XComponent*)
 connectivity::odbc::appendSQLWCHARs(rtl::OUStringBuffer&, wchar_t const*, int)


More information about the Libreoffice-commits mailing list