[ooo-build-commit] .: 18 commits - starmath/inc starmath/source sw/source

Jan Holesovsky kendy at kemper.freedesktop.org
Wed Oct 6 07:10:58 PDT 2010


 starmath/inc/starmath.hrc          |    2 +-
 starmath/source/smres.src          |    4 ----
 starmath/source/view.cxx           |    2 +-
 sw/source/core/attr/cellatr.cxx    |   11 ++++++++---
 sw/source/core/doc/doc.cxx         |   12 +++++++++---
 sw/source/core/draw/dcontact.cxx   |   33 +++++++++++++++++++++++++++++++--
 sw/source/core/frmedt/feshview.cxx |   12 +++++++++---
 sw/source/core/layout/fly.cxx      |   27 +++++++++++++++++++++++++++
 sw/source/core/unocore/unotbl.cxx  |    9 +++------
 sw/source/filter/xml/xmlexpit.cxx  |   12 +++++++++---
 sw/source/ui/lingu/olmenu.cxx      |    2 +-
 sw/source/ui/uiview/pview.cxx      |    2 +-
 sw/source/ui/uiview/srcview.cxx    |    2 +-
 sw/source/ui/uiview/view0.cxx      |    2 +-
 sw/source/ui/uno/unotxdoc.cxx      |   17 ++++++++++++++++-
 sw/source/ui/web/wview.cxx         |    2 +-
 16 files changed, 119 insertions(+), 32 deletions(-)

New commits:
commit dc0ee08d7146a6dd17556327a8c6b10f308c7c98
Merge: a2e9a07... 3e90c83...
Author: Jan Holesovsky <kendy at suse.cz>
Date:   Wed Oct 6 14:39:31 2010 +0200

    Merge commit 'ooo/OOO330_m9'

diff --cc starmath/source/smres.src
index 5761f1b,7270427..7270427
mode 100644,100755..100644
--- a/starmath/source/smres.src
+++ b/starmath/source/smres.src
diff --cc starmath/source/view.cxx
index 913e5ff,1e6e59a..3045c17
mode 100644,100755..100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
commit 3e90c83c2439b4640131394b4f3999b643ce0c87
Merge: f5f6d49... 4abe190...
Author: Kurt Zenker <kz at openoffice.org>
Date:   Fri Sep 24 14:47:51 2010 +0200

    CWS-TOOLING: integrate CWS sw33bf09

commit f5f6d4982b66dfec6d8364c622235bb60f7cb340
Merge: 5fd7c99... 1b65cc1...
Author: Kurt Zenker <kz at openoffice.org>
Date:   Fri Sep 24 12:44:15 2010 +0200

    CWS-TOOLING: integrate CWS tl85

commit 4abe1904132f0eb34228c41454ef0abcb167f65c
Author: Oliver-Rainer Wittmann <od at openoffice.org>
Date:   Tue Sep 14 16:34:12 2010 +0200

    sw33bf09: #i113730# - Assure that group objects containing control objects are on control layer

diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx
index 2eb597f..ca9e424 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -603,7 +603,7 @@ bool SwFEShell::IsSelContainsControl() const
         // if we have one marked object, get the SdrObject and check
         // whether it contains a control
         const SdrObject* pSdrObject = pMarkList->GetMark( 0 )->GetMarkedSdrObj();
-        bRet = CheckControlLayer( pSdrObject );
+        bRet = ::CheckControlLayer( pSdrObject );
     }
     return bRet;
 }
@@ -998,8 +998,14 @@ void SwFEShell::ChangeOpaque( SdrLayerID nLayerId )
             SdrObject* pObj = rMrkList.GetMark( i )->GetMarkedSdrObj();
             // OD 21.08.2003 #i18447# - no change of layer for controls
             // or group objects containing controls.
-            const bool bControlObj = ::CheckControlLayer( pObj );
-            //if ( pObj->GetLayer() != nLayerId && pObj->GetLayer() != nControls )
+            // --> OD 2010-09-14 #i113730#
+            // consider that a member of a drawing group has been selected.
+            const SwContact* pContact = ::GetUserCall( pObj );
+            ASSERT( pContact && pContact->GetMaster(), "<SwFEShell::ChangeOpaque(..)> - missing contact or missing master object at contact!" );
+            const bool bControlObj = ( pContact && pContact->GetMaster() )
+                                     ? ::CheckControlLayer( pContact->GetMaster() )
+                                     : ::CheckControlLayer( pObj );
+            // <--
             if ( !bControlObj && pObj->GetLayer() != nLayerId )
             {
                 pObj->SetLayer( nLayerId );
diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx
index feee382..7b09b99 100644
--- a/sw/source/core/layout/fly.cxx
+++ b/sw/source/core/layout/fly.cxx
@@ -51,6 +51,9 @@
 #include <layhelp.hxx>
 #include <ndtxt.hxx>
 
+// --> OD 2010-09-14 #i113730#
+#include <svx/svdogrp.hxx>
+// <--
 // OD 16.04.2003 #i13147# - for <SwFlyFrm::GetContour(..)>
 #include <ndgrf.hxx>
 // OD 29.10.2003 #113049#
@@ -2250,6 +2253,30 @@ void SwFrm::AppendDrawObj( SwAnchoredObject& _rNewObj )
         _rNewObj.ChgAnchorFrm( this );
     }
 
+    // --> OD 2010-09-14 #i113730#
+    // Assure the control objects and group objects containing controls are on the control layer
+    if ( ::CheckControlLayer( _rNewObj.DrawObj() ) )
+    {
+        const IDocumentDrawModelAccess* pIDDMA = GetUpper()->GetFmt()->getIDocumentDrawModelAccess();
+        const SdrLayerID aCurrentLayer(_rNewObj.DrawObj()->GetLayer());
+        const SdrLayerID aControlLayerID(pIDDMA->GetControlsId());
+        const SdrLayerID aInvisibleControlLayerID(pIDDMA->GetInvisibleControlsId());
+
+        if(aCurrentLayer != aControlLayerID && aCurrentLayer != aInvisibleControlLayerID)
+        {
+            if ( aCurrentLayer == pIDDMA->GetInvisibleHellId() ||
+                 aCurrentLayer == pIDDMA->GetInvisibleHeavenId() )
+            {
+                _rNewObj.DrawObj()->SetLayer(aInvisibleControlLayerID);
+            }
+            else
+            {        
+                _rNewObj.DrawObj()->SetLayer(aControlLayerID);
+            }
+        }
+    }
+    // <--
+
     // no direct positioning needed, but invalidate the drawing object position
     _rNewObj.InvalidateObjPos();
 
commit 5fd7c99871b452da81233ee979a9f5f8c558d5d9
Merge: 2b5213e... ee261e7...
Author: obo <obo at openoffice.org>
Date:   Tue Sep 14 13:03:44 2010 +0200

    CWS-TOOLING: integrate CWS jl158

commit 2b5213edaeac779555351e9136a896119bde149a
Merge: 919bff4... ca2de07...
Author: obo <obo at openoffice.org>
Date:   Tue Sep 14 09:05:18 2010 +0200

    CWS-TOOLING: integrate CWS dba33i

commit 919bff482001f0cedf598338b34ce475249acb54
Merge: 4937fcb... 7b4f7b0...
Author: obo <obo at openoffice.org>
Date:   Tue Sep 14 08:56:44 2010 +0200

    CWS-TOOLING: integrate CWS dba33h

commit 4f9ba5a4ae34505b87caab78c0c8ee913d924f87
Author: Oliver-Rainer Wittmann <od at openoffice.org>
Date:   Mon Sep 13 14:42:35 2010 +0200

    sw33bf09: #i113730# - method <SwDrawContact::_Changed(..)>: on insert/remove of child assure that group objects containing control objects are on the control layer

diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx
index 6079825..2af7adb 100644
--- a/sw/source/core/draw/dcontact.cxx
+++ b/sw/source/core/draw/dcontact.cxx
@@ -1396,6 +1396,37 @@ void SwDrawContact::_Changed( const SdrObject& rObj,
                 DisconnectFromLayout( false );
                 break;
             }
+        case SDRUSERCALL_CHILD_INSERTED :
+        case SDRUSERCALL_CHILD_REMOVED :
+        {
+            // --> AW, OD 2010-09-13 #i113730#
+            // force layer of controls for group objects containing control objects
+            if(dynamic_cast< SdrObjGroup* >(maAnchoredDrawObj.DrawObj()))
+            {
+                if(::CheckControlLayer(maAnchoredDrawObj.DrawObj()))
+                {
+                    const IDocumentDrawModelAccess* pIDDMA = static_cast<SwFrmFmt*>(pRegisteredIn)->getIDocumentDrawModelAccess();
+                    const SdrLayerID aCurrentLayer(maAnchoredDrawObj.DrawObj()->GetLayer());
+                    const SdrLayerID aControlLayerID(pIDDMA->GetControlsId());
+                    const SdrLayerID aInvisibleControlLayerID(pIDDMA->GetInvisibleControlsId());
+
+                    if(aCurrentLayer != aControlLayerID && aCurrentLayer != aInvisibleControlLayerID)
+                    {
+                        if ( aCurrentLayer == pIDDMA->GetInvisibleHellId() ||
+                             aCurrentLayer == pIDDMA->GetInvisibleHeavenId() )
+                        {
+                            maAnchoredDrawObj.DrawObj()->SetLayer(aInvisibleControlLayerID);
+                        }
+                        else
+                        {        
+                            maAnchoredDrawObj.DrawObj()->SetLayer(aControlLayerID);
+                        }
+                    }
+                }
+            }
+            // fallthrough intended here
+            // <--
+        }
         case SDRUSERCALL_MOVEONLY:
         case SDRUSERCALL_RESIZE:
         case SDRUSERCALL_CHILD_MOVEONLY :
@@ -1403,8 +1434,6 @@ void SwDrawContact::_Changed( const SdrObject& rObj,
         case SDRUSERCALL_CHILD_CHGATTR :
         case SDRUSERCALL_CHILD_DELETE :
         case SDRUSERCALL_CHILD_COPY :
-        case SDRUSERCALL_CHILD_INSERTED :
-        case SDRUSERCALL_CHILD_REMOVED :
         {
             // --> OD 2004-08-04 #i31698# - improvement:
             // get instance <SwAnchoredDrawObject> only once
commit ee261e71c49c9622b0f17d808a2916dcb9f138e0
Author: Joachim Lingner <jl at openoffice.org>
Date:   Fri Sep 10 17:05:00 2010 +0200

    jl158 #i114008#  sed problem on solaris fixed

diff --git a/sw/source/ui/lingu/olmenu.cxx b/sw/source/ui/lingu/olmenu.cxx
index 87d5c00..b5639ca 100644
--- a/sw/source/ui/lingu/olmenu.cxx
+++ b/sw/source/ui/lingu/olmenu.cxx
@@ -823,7 +823,7 @@ void SwSpellPopup::Execute( USHORT nId )
     else if (MN_DICTIONARIES_START <= nId && nId <= MN_DICTIONARIES_END)
     {
             OUString aWord( xSpellAlt->getWord() );
-            DBG_ASSERT( nDicIdx < aDics.getLength(), "dictionary index out of range" );
+//            DBG_ASSERT( nDicIdx < aDics.getLength(), "dictionary index out of range" );
             
             PopupMenu *pMenu = GetPopupMenu(MN_ADD_TO_DIC);
             String aDicName ( pMenu->GetItemText(nId) );
commit baaab1de7c8511b77d7bef687663054c2190d290
Author: Michael Stahl <mst at openoffice.org>
Date:   Thu Sep 9 16:37:04 2010 +0200

    sw33bf09: #i114163#: SvXMLExportItemMapper::QueryXMLValue():
     write proper value "auto" instead of "0" for style:page-number.

diff --git a/sw/source/filter/xml/xmlexpit.cxx b/sw/source/filter/xml/xmlexpit.cxx
index e0a73ca..7277d7a 100644
--- a/sw/source/filter/xml/xmlexpit.cxx
+++ b/sw/source/filter/xml/xmlexpit.cxx
@@ -926,9 +926,15 @@ sal_Bool SvXMLExportItemMapper::QueryXMLValue(
 
             if( MID_PAGEDESC_PAGENUMOFFSET==nMemberId )
             {
-
-                rUnitConverter.convertNumber(
-                    aOut, (sal_Int32)pPageDesc->GetNumOffset() );
+                sal_Int32 const number(pPageDesc->GetNumOffset());
+                if (0 >= number)
+                {
+                    aOut.append(GetXMLToken(XML_AUTO));
+                }
+                else // #i114163# positiveInteger only!
+                {
+                    rUnitConverter.convertNumber(aOut, number);
+                }
                 bOk = sal_True;
             }
         }
commit 1b65cc1e16be2a48f20ee24e91ceb7f1e3590202
Merge: ff2fb1d... 4937fcb...
Author: os <os at openoffice.org>
Date:   Wed Sep 8 10:18:05 2010 +0200

    OOO330 m7 merged

commit 82bc76b1e81cd9e4655e6ac86c46d5fe9449475c
Author: Oliver-Rainer Wittmann <od at openoffice.org>
Date:   Tue Sep 7 15:23:10 2010 +0200

    sw33bf09: #i114210# method <SwXTextDocument::getRenderer(..)> - correct determination of page number from renderer index

diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index a414c8f..a470440 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -1714,16 +1714,22 @@ sal_uInt16 SwDoc::GetPageCount() const
 const Size SwDoc::GetPageSize( sal_uInt16 nPageNum, bool bSkipEmptyPages ) const
 {
     Size aSize;
-    if( GetRootFrm() && nPageNum )
+    if ( GetRootFrm() && nPageNum )
     {
         const SwPageFrm* pPage = static_cast<const SwPageFrm*>
                                  (GetRootFrm()->Lower());
 
-        while( --nPageNum && pPage->GetNext() )
+        while ( --nPageNum && pPage->GetNext() )
+        {        
             pPage = static_cast<const SwPageFrm*>( pPage->GetNext() );
+        }
 
-        if( !bSkipEmptyPages && pPage->IsEmptyPage() && pPage->GetNext() )
+        // switch to next page for an empty page, if empty pages are not skipped
+        // in order to get a sensible page size for an empty page - e.g. for printing.
+        if ( !bSkipEmptyPages && pPage->IsEmptyPage() && pPage->GetNext() )
+        {        
             pPage = static_cast<const SwPageFrm*>( pPage->GetNext() );
+        }
 
         aSize = pPage->Frm().SSize();
     }
diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx
index e3f1322..12135db 100644
--- a/sw/source/ui/uno/unotxdoc.cxx
+++ b/sw/source/ui/uno/unotxdoc.cxx
@@ -2844,7 +2844,10 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwXTextDocument::getRenderer(
     uno::Sequence< beans::PropertyValue > aRenderer;
     if (m_pRenderData)
     {
-        const USHORT nPage = nRenderer + 1;
+        // --> TL, OD 2010-09-07 #i114210#
+        // determine the correct page number from the renderer index
+        const USHORT nPage = m_pRenderData->GetPagesToPrint()[ nRenderer ];
+        // <--
         
         // get paper tray to use ... 
         sal_Int32 nPrinterPaperTray = -1;
commit ff2fb1deb0c3b699d470ec22f10f8c280aa8767e
Author: os <os at openoffice.org>
Date:   Mon Sep 6 16:54:27 2010 +0200

    #i112518# prevent document modification while printing

diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx
index e3f1322..862c2b3 100644
--- a/sw/source/ui/uno/unotxdoc.cxx
+++ b/sw/source/ui/uno/unotxdoc.cxx
@@ -82,6 +82,7 @@
 #include <svx/xmleohlp.hxx>
 #include <globals.hrc>
 #include <unomid.h>
+#include <unotools/printwarningoptions.hxx>
 
 #include <com/sun/star/util/SearchOptions.hpp>
 #include <com/sun/star/lang/ServiceNotRegisteredException.hpp>
@@ -2732,10 +2733,21 @@ sal_Int32 SAL_CALL SwXTextDocument::getRendererCount(
             // since printing now also use the API for PDF export this option
             // should be set for printing as well ...
             pWrtShell->SetPDFExportOption( sal_True );
+            bool bOrigStatus = pRenderDocShell->IsEnableSetModified();
+            // check configuration: shall update of printing information in DocInfo set the document to "modified"?
+            bool bStateChanged = false;
+            if ( bOrigStatus && !SvtPrintWarningOptions().IsModifyDocumentOnPrintingAllowed() )
+            {
+                pRenderDocShell->EnableSetModified( sal_False );                
+                bStateChanged = true;
+            }
+            
 
             // --> FME 2005-05-23 #122919# Force field update before PDF export:
             pWrtShell->ViewShell::UpdateFlds(TRUE);
             // <--
+            if( bStateChanged )
+                pRenderDocShell->EnableSetModified( sal_True );
 
             // there is some redundancy between those two function calls, but right now
             // there is no time to sort this out.
commit ca2de07b2dc0c756973e311b3870bb426ddf9ca1
Author: Frank Schoenheit [fs] <frank.schoenheit at sun.com>
Date:   Wed Sep 1 14:59:07 2010 +0200

    dba33i: #i111146# migrated all SFX-based applications to use named views

diff --git a/starmath/inc/starmath.hrc b/starmath/inc/starmath.hrc
index 7d11b64..3483868 100644
--- a/starmath/inc/starmath.hrc
+++ b/starmath/inc/starmath.hrc
@@ -107,7 +107,7 @@
 #define RID_READSYMBOLERROR 		(RID_APP_START + 203)
 #define RID_NOMATHTYPEFACEWARNING	(RID_APP_START + 204)
 #define RID_OBJECTNAME				(RID_APP_START + 501)
-#define RID_VIEWNAME				(RID_APP_START + 502)
+    // free
 #define RID_UNDOEDITNAME			(RID_APP_START + 503)
 #define RID_UNDOFORMATNAME			(RID_APP_START + 504)
 #define RID_APPICO					(RID_APP_START + 601)
diff --git a/starmath/source/smres.src b/starmath/source/smres.src
index 5761f1b..7270427 100755
--- a/starmath/source/smres.src
+++ b/starmath/source/smres.src
@@ -1379,10 +1379,6 @@ String RID_OBJECTNAME
 {
     Text = "SMath3" ;
 };
-String RID_VIEWNAME
-{
-    Text = "StarMath" ;
-};
 String RID_UNDOEDITNAME
 {
     Text = "Edit" ;
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index 0d9ea58..1e6e59a 100755
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -749,7 +749,7 @@ SFX_IMPL_INTERFACE(SmViewShell, SfxViewShell, SmResId(0))
 }
 
 
-SFX_IMPL_VIEWFACTORY(SmViewShell, SmResId(RID_VIEWNAME))
+SFX_IMPL_NAMED_VIEWFACTORY(SmViewShell, "Default")
 {
     SFX_VIEW_REGISTRATION(SmDocShell);
 }
diff --git a/sw/source/ui/uiview/pview.cxx b/sw/source/ui/uiview/pview.cxx
index 6f10283..4aaa2fd 100644
--- a/sw/source/ui/uiview/pview.cxx
+++ b/sw/source/ui/uiview/pview.cxx
@@ -108,7 +108,7 @@
 using namespace ::com::sun::star;
 
 
-SFX_IMPL_VIEWFACTORY(SwPagePreView, SW_RES(STR_NONAME))
+SFX_IMPL_NAMED_VIEWFACTORY(SwPagePreView, "PrintPreview")
 {
     SFX_VIEW_REGISTRATION(SwDocShell);
     SFX_VIEW_REGISTRATION(SwWebDocShell);
diff --git a/sw/source/ui/uiview/srcview.cxx b/sw/source/ui/uiview/srcview.cxx
index d418216..4706738 100644
--- a/sw/source/ui/uiview/srcview.cxx
+++ b/sw/source/ui/uiview/srcview.cxx
@@ -125,7 +125,7 @@ using ::com::sun::star::util::SearchOptions;
 
 
 
-SFX_IMPL_VIEWFACTORY(SwSrcView, SW_RES(STR_NONAME))
+SFX_IMPL_NAMED_VIEWFACTORY(SwSrcView, "SourceView")
 {
     SFX_VIEW_REGISTRATION(SwWebDocShell);
 }
diff --git a/sw/source/ui/uiview/view0.cxx b/sw/source/ui/uiview/view0.cxx
index f3e1253..98b9589 100644
--- a/sw/source/ui/uiview/view0.cxx
+++ b/sw/source/ui/uiview/view0.cxx
@@ -105,7 +105,7 @@ using ::rtl::OUString;
 #include <unomid.h>
 
 
-SFX_IMPL_VIEWFACTORY(SwView, SW_RES(STR_NONAME))
+SFX_IMPL_NAMED_VIEWFACTORY(SwView, "Default")
 {
     if ( SvtModuleOptions().IsWriter() )
     {
diff --git a/sw/source/ui/web/wview.cxx b/sw/source/ui/web/wview.cxx
index 6899f6d..8fa1fc0 100644
--- a/sw/source/ui/web/wview.cxx
+++ b/sw/source/ui/web/wview.cxx
@@ -93,7 +93,7 @@
 #include <swslots.hxx>
 
 
-SFX_IMPL_VIEWFACTORY(SwWebView, SW_RES(STR_NONAME))
+SFX_IMPL_NAMED_VIEWFACTORY(SwWebView, "Default")
 {
     SFX_VIEW_REGISTRATION(SwWebDocShell);
 }
commit 7b4f7b087c867af6a075d334107ca919a730c27a
Merge: 28e9e96... 17b62cb...
Author: Frank Schoenheit [fs] <frank.schoenheit at oracle.com>
Date:   Mon Aug 30 14:10:40 2010 +0200

    dba33h: merge after pulling OOO330.m6

commit 28e9e96f76fc97db8dc8ee237ab8e3d7955f016a
Merge: d53deda... 3274d37...
Author: Frank Schoenheit [fs] <frank.schoenheit at oracle.com>
Date:   Fri Aug 27 15:35:58 2010 +0200

    dba33h: merge after pulling in fs33a

commit d53deda0ec570a5b2e8ecab80841c60eed773df4
Author: Michael Stahl <mst at openoffice.org>
Date:   Fri Aug 27 12:26:50 2010 +0200

    dba33h: #i112652#: SwXCell::getValue(): do not filter out NaN

diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx
index 9dd21a4..a9658fc 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -1009,12 +1009,9 @@ void SwXCell::setFormula(const OUString& rFormula) throw( uno::RuntimeException
 double SwXCell::getValue(void) throw( uno::RuntimeException )
 {
     vos::OGuard aGuard(Application::GetSolarMutex());
-    double fRet = lcl_getValue( *this );
-    //lcl_getValue was changed thus it can return nan values,
-    //so I make this additional nan check here to not change the behaviour
-    //but maybe it would even be more correct to just return nan here? ... todo?
-    if( ::rtl::math::isNan( fRet ) )
-        fRet = 0.0;
+
+    double const fRet = lcl_getValue( *this );
+    // #i112652# a table cell may contain NaN as a value, do not filter that
     return fRet;
 }
 /*-- 11.12.98 10:56:26---------------------------------------------------
commit df3f69c1e8e003cde4fc59b1067bfa52b2e07883
Author: Michael Stahl <mst at openoffice.org>
Date:   Fri Aug 27 12:25:34 2010 +0200

    dba33h: #i112652#: SwTblBoxValue: items with NaN should compare equal

diff --git a/sw/source/core/attr/cellatr.cxx b/sw/source/core/attr/cellatr.cxx
index 7285d15..0cf721f 100644
--- a/sw/source/core/attr/cellatr.cxx
+++ b/sw/source/core/attr/cellatr.cxx
@@ -28,9 +28,10 @@
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_sw.hxx"
 
+#include <float.h>
 
+#include <rtl/math.hxx>
 
-#include <float.h>
 #include <hintids.hxx> 			// fuer RES_..
 #include <cellatr.hxx>
 #include <calc.hxx>
@@ -249,8 +250,12 @@ SwTblBoxValue::SwTblBoxValue( const double nVal )
 
 int SwTblBoxValue::operator==( const SfxPoolItem& rAttr ) const
 {
-    ASSERT( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" );
-    return nValue == ((SwTblBoxValue&)rAttr).nValue;
+    ASSERT(SfxPoolItem::operator==(rAttr), "SwTblBoxValue: item not equal");
+    SwTblBoxValue const& rOther( static_cast<SwTblBoxValue const&>(rAttr) );
+    // items with NaN should be equal to enable pooling
+    return ::rtl::math::isNan(nValue)
+        ?   ::rtl::math::isNan(rOther.nValue)
+        :   (nValue == rOther.nValue);
 }
 
 


More information about the ooo-build-commit mailing list