summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenning Brinkmann <hbrinkm@openoffice.org>2010-09-20 17:13:53 +0200
committerHenning Brinkmann <hbrinkm@openoffice.org>2010-09-20 17:13:53 +0200
commitc8e6549558e3b9fc3908e1a238b235f9a454c80f (patch)
treef7ec722d08abe86c1843ba3e86fbff54074a6911
parent#b6986082# InsBoxen: Do not insert a new cell beyond the end (diff)
parentCWS-TOOLING: integrate CWS jl158 (diff)
downloadcore-c8e6549558e3b9fc3908e1a238b235f9a454c80f.tar.gz
core-c8e6549558e3b9fc3908e1a238b235f9a454c80f.zip
merged OOO330_m8
-rw-r--r--starmath/inc/starmath.hrc2
-rwxr-xr-xstarmath/source/smres.src4
-rwxr-xr-xstarmath/source/view.cxx2
-rw-r--r--sw/source/core/attr/cellatr.cxx11
-rw-r--r--sw/source/core/unocore/unotbl.cxx9
-rw-r--r--sw/source/ui/lingu/olmenu.cxx2
-rw-r--r--sw/source/ui/uiview/pview.cxx2
-rw-r--r--sw/source/ui/uiview/srcview.cxx2
-rw-r--r--sw/source/ui/uiview/view0.cxx2
-rw-r--r--sw/source/ui/web/wview.cxx2
10 files changed, 18 insertions, 20 deletions
diff --git a/starmath/inc/starmath.hrc b/starmath/inc/starmath.hrc
index d73ea27a0d45..8d156792e1d3 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 7d3525bd2a29..c35d77c9afcf 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 0087595703ca..3920c65e941c 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/core/attr/cellatr.cxx b/sw/source/core/attr/cellatr.cxx
index 8032d3506a27..f492696ef8ac 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);
}
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx
index b7098710802b..fdc382ad99d9 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---------------------------------------------------
diff --git a/sw/source/ui/lingu/olmenu.cxx b/sw/source/ui/lingu/olmenu.cxx
index a4805a168c1c..281e3ce3fabb 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) );
diff --git a/sw/source/ui/uiview/pview.cxx b/sw/source/ui/uiview/pview.cxx
index d499add5ad53..27fe1a65641f 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 801ecba22c73..667beb8ab4ca 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 9d905a4c3443..93a29f699f5a 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 9a55aaf94a28..1822ab2de4e8 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);
}