[Libreoffice-commits] core.git: 12 commits - basctl/source bridges/inc comphelper/source include/comphelper sd/source svx/source vcl/source

Caolán McNamara caolanm at redhat.com
Fri Apr 25 12:44:22 PDT 2014


 basctl/source/basicide/basobj2.cxx                               |    2 -
 basctl/source/basicide/basobj3.cxx                               |    2 -
 basctl/source/dlged/dlgedobj.cxx                                 |    2 -
 basctl/source/inc/basobj.hxx                                     |    4 +-
 basctl/source/inc/dlgedobj.hxx                                   |    2 -
 bridges/inc/bridges/cpp_uno/shared/vtablefactory.hxx             |    5 ++
 comphelper/source/property/MasterPropertySet.cxx                 |    4 +-
 include/comphelper/MasterPropertySet.hxx                         |    4 +-
 sd/source/filter/eppt/epptooxml.hxx                              |    2 -
 sd/source/filter/eppt/pptx-epptooxml.cxx                         |    2 -
 sd/source/ui/accessibility/AccessiblePageShape.cxx               |    2 -
 sd/source/ui/framework/configuration/ConfigurationController.cxx |   12 +-----
 sd/source/ui/inc/AccessiblePageShape.hxx                         |    2 -
 sd/source/ui/inc/framework/ConfigurationController.hxx           |    4 +-
 sd/source/ui/inc/slideshow.hxx                                   |    5 ++
 sd/source/ui/slideshow/SlideShowRestarter.cxx                    |    3 +
 sd/source/ui/slideshow/slideshow.cxx                             |   20 +++++++---
 svx/source/dialog/txenctab.src                                   |    2 -
 vcl/source/control/lstbox.cxx                                    |    2 -
 19 files changed, 47 insertions(+), 34 deletions(-)

New commits:
commit b7197cfe5d207b171412760c6d72353f31947e93
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Apr 25 19:27:57 2014 +0100

    Related: rhbz#1032774 slide restarter should disable auto-exit
    
    The scenario is a pps that exits the app when the presentation
    is complete. But using "switch screens" in the presenter
    console will stop and restart the presentation. So protect
    that "stop" against existing by disabling the autoexit
    and restoring it afterwards
    
    Change-Id: Id986ad7e3cfafb8068540fb90d05443f329b554c

diff --git a/sd/source/ui/inc/slideshow.hxx b/sd/source/ui/inc/slideshow.hxx
index 74ebfa6..0b87eba 100644
--- a/sd/source/ui/inc/slideshow.hxx
+++ b/sd/source/ui/inc/slideshow.hxx
@@ -181,6 +181,9 @@ public:
 
     static sal_Int32 GetDisplay();
 
+    bool IsExitAfterPresenting() const;
+    void SetExitAfterPresenting(bool bExit);
+
 private:
     SlideShow( SdDrawDocument* pDoc );
 
@@ -190,7 +193,7 @@ private:
     void StartInPlacePresentation();
     void StartFullscreenPresentation();
 
-    void ThrowIfDisposed() throw (::com::sun::star::uno::RuntimeException);
+    void ThrowIfDisposed() const throw (css::uno::RuntimeException);
 
     void CreateController( ViewShell* pViewSh, ::sd::View* pView, ::Window* pParentWindow );
     WorkWindow *GetWorkWindow();
diff --git a/sd/source/ui/slideshow/SlideShowRestarter.cxx b/sd/source/ui/slideshow/SlideShowRestarter.cxx
index 822e8be..63fae11 100644
--- a/sd/source/ui/slideshow/SlideShowRestarter.cxx
+++ b/sd/source/ui/slideshow/SlideShowRestarter.cxx
@@ -83,7 +83,10 @@ IMPL_LINK_NOARG(SlideShowRestarter, EndPresentation)
     {
         if (mnDisplayCount != (sal_Int32)Application::GetScreenCount())
         {
+            bool bIsExitAfterPresenting = mpSlideShow->IsExitAfterPresenting();
+            mpSlideShow->SetExitAfterPresenting(false);
             mpSlideShow->end();
+            mpSlideShow->SetExitAfterPresenting(bIsExitAfterPresenting);
 
             // The following piece of code should not be here because the
             // slide show should be aware of the existence of the presenter
diff --git a/sd/source/ui/slideshow/slideshow.cxx b/sd/source/ui/slideshow/slideshow.cxx
index 594aaa2..279bd8b 100644
--- a/sd/source/ui/slideshow/slideshow.cxx
+++ b/sd/source/ui/slideshow/slideshow.cxx
@@ -147,16 +147,12 @@ SlideShow::SlideShow( SdDrawDocument* pDoc )
 {
 }
 
-
-
-void SlideShow::ThrowIfDisposed() throw (RuntimeException)
+void SlideShow::ThrowIfDisposed() const throw (RuntimeException)
 {
     if( mpDoc == 0 )
         throw DisposedException();
 }
 
-
-
 /// used by the model to create a slideshow for it
 rtl::Reference< SlideShow > SlideShow::Create( SdDrawDocument* pDoc )
 {
@@ -679,6 +675,20 @@ WorkWindow *SlideShow::GetWorkWindow()
     return dynamic_cast<WorkWindow*>(pShell->GetViewFrame()->GetTopFrame().GetWindow().GetParent());
 }
 
+bool SlideShow::IsExitAfterPresenting() const
+{
+    SolarMutexGuard aGuard;
+    ThrowIfDisposed();
+    return mpDoc->IsExitAfterPresenting();
+}
+
+void SlideShow::SetExitAfterPresenting(bool bExit)
+{
+    SolarMutexGuard aGuard;
+    ThrowIfDisposed();
+    mpDoc->SetExitAfterPresenting(bExit);
+}
+
 void SAL_CALL SlideShow::end()
     throw (RuntimeException, std::exception)
 {
commit e56ff47c65c6924e2c58d365c83c4db50eb87bb2
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Apr 25 15:04:22 2014 +0100

    coverity#707667 Uninitialized pointer field
    
    Change-Id: Ia8024e1bff86d6b9e18dc60f81bd28e4b8a590af

diff --git a/bridges/inc/bridges/cpp_uno/shared/vtablefactory.hxx b/bridges/inc/bridges/cpp_uno/shared/vtablefactory.hxx
index 362fb89..38f8b7e 100644
--- a/bridges/inc/bridges/cpp_uno/shared/vtablefactory.hxx
+++ b/bridges/inc/bridges/cpp_uno/shared/vtablefactory.hxx
@@ -93,6 +93,11 @@ public:
             snippets, after the vtable itself.</p>
          */
         Block * blocks;
+        Vtables()
+            : count(0)
+            , blocks(NULL)
+        {
+        }
     };
 
     VtableFactory();
commit dc21c527c54dbbb9996d16791bec5d2aff6504d8
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Apr 25 13:52:12 2014 +0100

    coverity#706281 Uncaught exception
    
    Change-Id: I6bc7ea330834054a20f89bdb0ac7cc9ccd9ca4aa

diff --git a/comphelper/source/property/MasterPropertySet.cxx b/comphelper/source/property/MasterPropertySet.cxx
index ad8d0a2..a9c79da 100644
--- a/comphelper/source/property/MasterPropertySet.cxx
+++ b/comphelper/source/property/MasterPropertySet.cxx
@@ -263,7 +263,7 @@ void SAL_CALL MasterPropertySet::setPropertyValues( const Sequence< OUString >&
 }
 
 Sequence< Any > SAL_CALL MasterPropertySet::getPropertyValues( const Sequence< OUString >& aPropertyNames )
-    throw(RuntimeException, std::exception)
+    throw (UnknownPropertyException, RuntimeException, std::exception)
 {
     // acquire mutex in c-tor and releases it in the d-tor (exception safe!).
     boost::scoped_ptr< osl::Guard< comphelper::SolarMutex > > pMutexGuard;
diff --git a/include/comphelper/MasterPropertySet.hxx b/include/comphelper/MasterPropertySet.hxx
index ff3170b..865ed36 100644
--- a/include/comphelper/MasterPropertySet.hxx
+++ b/include/comphelper/MasterPropertySet.hxx
@@ -122,7 +122,7 @@ namespace comphelper
         virtual void SAL_CALL setPropertyValues( const ::com::sun::star::uno::Sequence< OUString >& aPropertyNames, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aValues )
             throw (css::beans::UnknownPropertyException, css::beans::PropertyVetoException, css::lang::IllegalArgumentException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
         virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL getPropertyValues( const ::com::sun::star::uno::Sequence< OUString >& aPropertyNames )
-            throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
+            throw (css::beans::UnknownPropertyException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
         virtual void SAL_CALL addPropertiesChangeListener( const ::com::sun::star::uno::Sequence< OUString >& aPropertyNames, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener )
             throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
         virtual void SAL_CALL removePropertiesChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener )
commit 69c8acdcb4805c2c0217633e0b0b874c88d11433
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Apr 25 13:50:59 2014 +0100

    coverity#706282 Uncaught exception
    
    Change-Id: I495c558ed7692a0d2b669d9bc9cb62ed9ddc6665

diff --git a/comphelper/source/property/MasterPropertySet.cxx b/comphelper/source/property/MasterPropertySet.cxx
index ab80a03..ad8d0a2 100644
--- a/comphelper/source/property/MasterPropertySet.cxx
+++ b/comphelper/source/property/MasterPropertySet.cxx
@@ -197,7 +197,7 @@ void SAL_CALL MasterPropertySet::removeVetoableChangeListener( const OUString&,
 
 // XMultiPropertySet
 void SAL_CALL MasterPropertySet::setPropertyValues( const Sequence< OUString >& aPropertyNames, const Sequence< Any >& aValues )
-    throw(PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException, std::exception)
+    throw (UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException, std::exception)
 {
     // acquire mutex in c-tor and releases it in the d-tor (exception safe!).
     boost::scoped_ptr< osl::Guard< comphelper::SolarMutex > > pMutexGuard;
diff --git a/include/comphelper/MasterPropertySet.hxx b/include/comphelper/MasterPropertySet.hxx
index f0d8e0c..ff3170b 100644
--- a/include/comphelper/MasterPropertySet.hxx
+++ b/include/comphelper/MasterPropertySet.hxx
@@ -120,7 +120,7 @@ namespace comphelper
 
         // XMultiPropertySet
         virtual void SAL_CALL setPropertyValues( const ::com::sun::star::uno::Sequence< OUString >& aPropertyNames, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aValues )
-            throw(::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
+            throw (css::beans::UnknownPropertyException, css::beans::PropertyVetoException, css::lang::IllegalArgumentException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
         virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL getPropertyValues( const ::com::sun::star::uno::Sequence< OUString >& aPropertyNames )
             throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
         virtual void SAL_CALL addPropertiesChangeListener( const ::com::sun::star::uno::Sequence< OUString >& aPropertyNames, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener )
commit 0eb160ef1316f99b5d6e894bfe8938f7b0927f66
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Apr 25 13:45:49 2014 +0100

    coverity#736993 Uncaught exception
    
    Change-Id: Ib8e5d13da0e26f67da16edf0eb55341208ec2337

diff --git a/basctl/source/dlged/dlgedobj.cxx b/basctl/source/dlged/dlgedobj.cxx
index 48522b7..fab4e7f 100644
--- a/basctl/source/dlged/dlgedobj.cxx
+++ b/basctl/source/dlged/dlgedobj.cxx
@@ -450,7 +450,7 @@ void DlgEdObj::PositionAndSizeChange( const beans::PropertyChangeEvent& evt )
     SetRectFromProps();
 }
 
-void SAL_CALL DlgEdObj::NameChange( const  ::com::sun::star::beans::PropertyChangeEvent& evt ) throw( ::com::sun::star::uno::RuntimeException)
+void SAL_CALL DlgEdObj::NameChange( const  ::com::sun::star::beans::PropertyChangeEvent& evt ) throw (css::container::NoSuchElementException, css::uno::RuntimeException)
 {
     // get old name
     OUString aOldName;
diff --git a/basctl/source/inc/dlgedobj.hxx b/basctl/source/inc/dlgedobj.hxx
index e360584..525a551 100644
--- a/basctl/source/inc/dlgedobj.hxx
+++ b/basctl/source/inc/dlgedobj.hxx
@@ -117,7 +117,7 @@ public:
     ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl > GetControl() const;
 
     virtual void PositionAndSizeChange( const ::com::sun::star::beans::PropertyChangeEvent& evt );
-    virtual void SAL_CALL NameChange( const  ::com::sun::star::beans::PropertyChangeEvent& evt ) throw( ::com::sun::star::uno::RuntimeException);
+    virtual void SAL_CALL NameChange( const  ::com::sun::star::beans::PropertyChangeEvent& evt ) throw(css::container::NoSuchElementException, css::uno::RuntimeException);
     virtual void SAL_CALL TabIndexChange( const  ::com::sun::star::beans::PropertyChangeEvent& evt ) throw( ::com::sun::star::uno::RuntimeException);
 
     // PropertyChangeListener
commit 7f49f4227bc5ebc211f91fca1f430774775d44c1
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Apr 25 13:37:25 2014 +0100

    coverity#736992 Uncaught exception
    
    Change-Id: Ia074dc867cc068fccb2d4eb613d04b945b8711e7

diff --git a/basctl/source/basicide/basobj3.cxx b/basctl/source/basicide/basobj3.cxx
index a735a4b..ccc1e23 100644
--- a/basctl/source/basicide/basobj3.cxx
+++ b/basctl/source/basicide/basobj3.cxx
@@ -162,7 +162,7 @@ bool RenameDialog (
     OUString const& rOldName,
     OUString const& rNewName
 )
-    throw(ElementExistException, NoSuchElementException)
+    throw (ElementExistException, NoSuchElementException, RuntimeException)
 {
     if ( !rDocument.hasDialog( rLibName, rOldName ) )
     {
diff --git a/basctl/source/inc/basobj.hxx b/basctl/source/inc/basobj.hxx
index ad65561..576078a 100644
--- a/basctl/source/inc/basobj.hxx
+++ b/basctl/source/inc/basobj.hxx
@@ -92,7 +92,7 @@ namespace basctl
     */
     bool            RenameDialog(
         Window* pErrorParent, const ScriptDocument& rDocument, const OUString& rLibName, const OUString& rOldName, const OUString& rNewName )
-        throw( ::com::sun::star::container::ElementExistException, ::com::sun::star::container::NoSuchElementException );
+        throw (css::container::ElementExistException, css::container::NoSuchElementException, css::uno::RuntimeException);
 
     bool            RemoveDialog( const ScriptDocument& rDocument, const OUString& rLibName, const OUString& rDlgName );
 
commit 2d4c90e82eb8d67a2f94f40a219723b08cf4c347
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Apr 25 13:13:11 2014 +0100

    coverity#736990 Uncaught exception
    
    Change-Id: I3b7f4c732a5a3369c05c75ede1580b32837be671

diff --git a/basctl/source/basicide/basobj2.cxx b/basctl/source/basicide/basobj2.cxx
index 63c1db4..9fc771c 100644
--- a/basctl/source/basicide/basobj2.cxx
+++ b/basctl/source/basicide/basobj2.cxx
@@ -378,7 +378,7 @@ OUString ChooseMacro( const uno::Reference< frame::XModel >& rxLimitToDocument,
 }
 
 Sequence< OUString > GetMethodNames( const ScriptDocument& rDocument, const OUString& rLibName, const OUString& rModName )
-    throw(NoSuchElementException )
+    throw (NoSuchElementException, RuntimeException)
 {
     Sequence< OUString > aSeqMethods;
 
diff --git a/basctl/source/inc/basobj.hxx b/basctl/source/inc/basobj.hxx
index aab5cd5..ad65561 100644
--- a/basctl/source/inc/basobj.hxx
+++ b/basctl/source/inc/basobj.hxx
@@ -79,7 +79,7 @@ namespace basctl
 
     ::com::sun::star::uno::Sequence< OUString > GetMethodNames(
         const ScriptDocument& rDocument, const OUString& rLibName, const OUString& rModName )
-        throw( ::com::sun::star::container::NoSuchElementException );
+        throw (css::container::NoSuchElementException, css::uno::RuntimeException);
 
     bool            HasMethod(
         const ScriptDocument& rDocument, const OUString& rLibName, const OUString& rModName, const OUString& rMethName );
commit 1a88414f52e0f16aad1f992c7e6d6590cffdc462
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Apr 25 13:03:52 2014 +0100

    coverity#707098 Uncaught exception
    
    Change-Id: I88e0ddd6de87bf8264e06ee34d6c144f16a7aa60

diff --git a/sd/source/ui/framework/configuration/ConfigurationController.cxx b/sd/source/ui/framework/configuration/ConfigurationController.cxx
index 957f7ef..39ec23e 100644
--- a/sd/source/ui/framework/configuration/ConfigurationController.cxx
+++ b/sd/source/ui/framework/configuration/ConfigurationController.cxx
@@ -625,13 +625,8 @@ void SAL_CALL ConfigurationController::initialize (const Sequence<Any>& aArgumen
     }
 }
 
-
-
-
-
-
-void ConfigurationController::ThrowIfDisposed (void) const
-    throw (::com::sun::star::lang::DisposedException)
+void ConfigurationController::ThrowIfDisposed () const
+    throw (css::lang::DisposedException, css::uno::RuntimeException)
 {
     if (mbIsDisposed)
     {
@@ -647,9 +642,6 @@ void ConfigurationController::ThrowIfDisposed (void) const
     }
 }
 
-
-
-
 //===== ConfigurationController::Implementation ===============================
 
 ConfigurationController::Implementation::Implementation (
diff --git a/sd/source/ui/inc/framework/ConfigurationController.hxx b/sd/source/ui/inc/framework/ConfigurationController.hxx
index 1175631..941047e 100644
--- a/sd/source/ui/inc/framework/ConfigurationController.hxx
+++ b/sd/source/ui/inc/framework/ConfigurationController.hxx
@@ -208,8 +208,8 @@ private:
     /** When the called object has already been disposed this method throws
         an exception and does not return.
     */
-    void ThrowIfDisposed (void) const
-        throw (css::lang::DisposedException);
+    void ThrowIfDisposed () const
+        throw (css::lang::DisposedException, css::uno::RuntimeException);
 };
 
 } } // end of namespace sd::framework
commit d92829044bdae286fdf26c46bbc28e88574768de
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Apr 25 13:00:54 2014 +0100

    coverity#707088 Uncaught exception
    
    Change-Id: Icfc2765f6482082959b4a0b666ec823de686bffe

diff --git a/sd/source/ui/accessibility/AccessiblePageShape.cxx b/sd/source/ui/accessibility/AccessiblePageShape.cxx
index 49d4930..27555f1 100644
--- a/sd/source/ui/accessibility/AccessiblePageShape.cxx
+++ b/sd/source/ui/accessibility/AccessiblePageShape.cxx
@@ -87,7 +87,7 @@ sal_Int32 SAL_CALL
 */
 uno::Reference<XAccessible> SAL_CALL
     AccessiblePageShape::getAccessibleChild( sal_Int32 )
-    throw (::com::sun::star::uno::RuntimeException, std::exception)
+    throw (lang::IndexOutOfBoundsException, uno::RuntimeException, std::exception)
 {
     throw lang::IndexOutOfBoundsException ("page shape has no children",
         static_cast<uno::XWeak*>(this));
diff --git a/sd/source/ui/inc/AccessiblePageShape.hxx b/sd/source/ui/inc/AccessiblePageShape.hxx
index 96e41f3..2c34c32 100644
--- a/sd/source/ui/inc/AccessiblePageShape.hxx
+++ b/sd/source/ui/inc/AccessiblePageShape.hxx
@@ -94,7 +94,7 @@ public:
     virtual ::com::sun::star::uno::Reference<
             ::com::sun::star::accessibility::XAccessible> SAL_CALL
         getAccessibleChild (sal_Int32 nIndex)
-        throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
+        throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
 
 
     //=====  XAccessibleComponent  ============================================
commit dde3c84d4492f0bea8e5509bedc1313d6e1fd70b
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Apr 25 12:58:18 2014 +0100

    coverity#737762 Uncaught exception
    
    Change-Id: Iaa34147326ebcb3a29b922c29c0a1fd6b4a5f515

diff --git a/sd/source/filter/eppt/epptooxml.hxx b/sd/source/filter/eppt/epptooxml.hxx
index 23e5b8e..05359fc 100644
--- a/sd/source/filter/eppt/epptooxml.hxx
+++ b/sd/source/filter/eppt/epptooxml.hxx
@@ -71,7 +71,7 @@ public:
 
     // from FilterBase
     virtual bool importDocument() throw() SAL_OVERRIDE;
-    virtual bool exportDocument() throw (std::exception) SAL_OVERRIDE;
+    virtual bool exportDocument() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
 
     // only needed for import, leave them empty, refactor later XmlFilterBase to export and import base?
     virtual sal_Int32 getSchemeClr( sal_Int32 /* nColorSchemeToken */ ) const { return 0; }
diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx
index 886cb94..980befa2 100644
--- a/sd/source/filter/eppt/pptx-epptooxml.cxx
+++ b/sd/source/filter/eppt/pptx-epptooxml.cxx
@@ -330,7 +330,7 @@ bool PowerPointExport::importDocument() throw()
     return false;
 }
 
-bool PowerPointExport::exportDocument() throw (std::exception)
+bool PowerPointExport::exportDocument() throw (css::uno::RuntimeException, std::exception)
 {
     DrawingML::ResetCounters();
     maShapeMap.clear ();
commit e95b80d9916b8eaf012c23b7f1abbc40e99e64fb
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Apr 25 12:47:50 2014 +0100

    coverity#735656 Division or modulo by zero
    
    Change-Id: I846f5f10649e2f12bac763c87e88cd55135f3d00

diff --git a/vcl/source/control/lstbox.cxx b/vcl/source/control/lstbox.cxx
index a166de6..27e5d5e 100644
--- a/vcl/source/control/lstbox.cxx
+++ b/vcl/source/control/lstbox.cxx
@@ -1347,7 +1347,7 @@ Size ListBox::CalcBlockSize( sal_uInt16 nColumns, sal_uInt16 nLines ) const
 
 void ListBox::GetMaxVisColumnsAndLines( sal_uInt16& rnCols, sal_uInt16& rnLines ) const
 {
-    long nCharWidth = GetTextWidth( OUString(static_cast<sal_Unicode>('x')) );
+    float nCharWidth = approximate_char_width();
     if ( !IsDropDownBox() )
     {
         Size aOutSz = mpImplLB->GetMainWindow()->GetOutputSizePixel();
commit 13ae10691d1362cc9a7b3438b1fa392f6e5517eb
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Apr 24 18:34:46 2014 +0100

    make 'Unicode' less-attractive to pick vs UTF-8
    
    for people guessing the encoding of a .csv
    
    Change-Id: Ie1b0a51bd2beb60351c244f97583a48ce596fbcc

diff --git a/svx/source/dialog/txenctab.src b/svx/source/dialog/txenctab.src
index d80374e..965f1a4 100644
--- a/svx/source/dialog/txenctab.src
+++ b/svx/source/dialog/txenctab.src
@@ -100,7 +100,7 @@ StringArray RID_SVXSTR_TEXTENCODING_TABLE
         < "Korean (EUC-KR)"                             ; RTL_TEXTENCODING_EUC_KR           ; > ;
         < "Korean (ISO-2022-KR)"                        ; RTL_TEXTENCODING_ISO_2022_KR      ; > ;
         < "Korean (Windows-Johab-1361)"                 ; RTL_TEXTENCODING_MS_1361          ; > ;
-        < "Unicode"                                         ; RTL_TEXTENCODING_UCS2             ; > ;
+        < "Unicode (UTF-16)"                            ; RTL_TEXTENCODING_UCS2             ; > ;
         < "Thai (ISO-8859-11/TIS-620)"                                  ; RTL_TEXTENCODING_TIS_620          ; > ;
         < "Thai (Windows-874)"                              ; RTL_TEXTENCODING_MS_874           ; > ;
         < "Cyrillic (KOI8-U)"                             ; RTL_TEXTENCODING_KOI8_U           ; > ;


More information about the Libreoffice-commits mailing list