From 889d495cbf51e32db8e7d9e47a245235ada1590b Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Tue, 3 Aug 2010 11:29:55 +0200 Subject: cws tl82: #i74049# math symbols should be able to handle 20 bit Unicode characters (surrogates) --- starmath/source/symbol.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'starmath/source/symbol.cxx') diff --git a/starmath/source/symbol.cxx b/starmath/source/symbol.cxx index e248f9726629..4e0580f40d2f 100644 --- a/starmath/source/symbol.cxx +++ b/starmath/source/symbol.cxx @@ -78,7 +78,7 @@ SmSym::SmSym(const SmSym& rSymbol) } -SmSym::SmSym(const String& rName, const Font& rFont, sal_Unicode cChar, +SmSym::SmSym(const String& rName, const Font& rFont, sal_UCS4 cChar, const String& rSet, BOOL bIsPredefined) { m_aName = m_aExportName = rName; -- cgit From 9a1374b54144b15cfef1a0d8eeba861a69fec875 Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Wed, 13 Oct 2010 11:39:15 +0200 Subject: cws tl84: #i114767# Math: added option to save only used symbols --- starmath/source/symbol.cxx | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'starmath/source/symbol.cxx') diff --git a/starmath/source/symbol.cxx b/starmath/source/symbol.cxx index 5208ce3644ce..5692b6f0ad69 100644 --- a/starmath/source/symbol.cxx +++ b/starmath/source/symbol.cxx @@ -218,14 +218,19 @@ bool SmSymbolManager::AddOrReplaceSymbol( const SmSym &rSymbol, bool bForceChang } else if (pFound && !bForceChange && bSymbolConflict) { - // TODO: but what ... - DBG_ASSERT( 0, "symbol conflict, different symbol with same name found!" ); + // TODO: to solve this a document owned symbol manager would be required ... + // But for now we have a global one to easily support availability of all + // symbols in all formulas. A copy of the global one would be needed here + // and then the new symbol has to be forcefully applied. This would keep + // the current formula intact but will leave the set of symbols in the + // global symbol manager somewhat to chance. + DBG_ASSERT( 0, "symbol conflict, different symbol with same name found!" ); } - } - DBG_ASSERT( bAdded, "failed to add symbol" ); - if (bAdded) - m_bModified = true; + if (bAdded) + m_bModified = true; + DBG_ASSERT( bAdded || (pFound && !bSymbolConflict), "AddOrReplaceSymbol: unresolved symbol conflict" ); + } return bAdded; } -- cgit From 80731dbfcb48a2ffec30a4b2abe1ba8ada8f0169 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Fri, 14 Jan 2011 17:19:25 +0100 Subject: removetooltypes01: #i112600# Remove tool types from binfilter, starmath, svx, toolkit and xmloff --- starmath/source/symbol.cxx | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'starmath/source/symbol.cxx') diff --git a/starmath/source/symbol.cxx b/starmath/source/symbol.cxx index 52d0520ae61b..0369eb74db51 100644 --- a/starmath/source/symbol.cxx +++ b/starmath/source/symbol.cxx @@ -63,11 +63,11 @@ SmSym::SmSym() : m_aName(C2S("unknown")), m_aSetName(C2S("unknown")), m_cChar('\0'), - m_bPredefined(FALSE), - m_bDocSymbol(FALSE) + m_bPredefined(sal_False), + m_bDocSymbol(sal_False) { m_aExportName = m_aName; - m_aFace.SetTransparent(TRUE); + m_aFace.SetTransparent(sal_True); m_aFace.SetAlign(ALIGN_BASELINE); } @@ -79,12 +79,12 @@ SmSym::SmSym(const SmSym& rSymbol) SmSym::SmSym(const String& rName, const Font& rFont, sal_UCS4 cChar, - const String& rSet, BOOL bIsPredefined) + const String& rSet, sal_Bool bIsPredefined) { m_aName = m_aExportName = rName; m_aFace = rFont; - m_aFace.SetTransparent(TRUE); + m_aFace.SetTransparent(sal_True); m_aFace.SetAlign(ALIGN_BASELINE); m_cChar = cChar; @@ -101,7 +101,7 @@ SmSym::SmSym(const String& rName, const Font& rFont, sal_UCS4 cChar, // Character |= 0xF000; m_aSetName = rSet; m_bPredefined = bIsPredefined; - m_bDocSymbol = FALSE; + m_bDocSymbol = sal_False; } @@ -308,7 +308,7 @@ void SmSymbolManager::Load() String aSymbolName( (sal_Unicode)'i' ); aSymbolName += rSym.GetName(); SmSym aSymbol( aSymbolName, aFont, rSym.GetCharacter(), - aSymbolSetName, TRUE /*bIsPredefined*/ ); + aSymbolSetName, sal_True /*bIsPredefined*/ ); AddOrReplaceSymbol( aSymbol ); } @@ -321,11 +321,11 @@ void SmSymbolManager::Save() SmMathConfig &rCfg = *SM_MOD()->GetConfig(); #if 0 - USHORT nSymbolCount = GetSymbolCount(); - USHORT nSaveSymbolCnt = 0; + sal_uInt16 nSymbolCount = GetSymbolCount(); + sal_uInt16 nSaveSymbolCnt = 0; const SmSym **pSymbols = new const SmSym* [ nSymbolCount ]; const SmSym **pSym = pSymbols; - for (USHORT j = 0; j < nSymbolCount; ++j) + for (sal_uInt16 j = 0; j < nSymbolCount; ++j) { const SmSym &rSym = *pSymSet->GetSymbol( j ); if (!rSym.IsDocSymbol()) -- cgit