[Libreoffice-commits] core.git: starmath/source
Thomas Arnhold
thomas at arnhold.org
Sun Sep 8 23:53:39 PDT 2013
starmath/source/accessibility.cxx | 2
starmath/source/cfgitem.cxx | 2
starmath/source/cursor.cxx | 6 +-
starmath/source/dialog.cxx | 6 --
starmath/source/document.cxx | 76 ++++++++++++++++++-------------------
starmath/source/format.cxx | 2
starmath/source/mathmlexport.cxx | 10 ++--
starmath/source/mathmlimport.cxx | 6 +-
starmath/source/mathtype.cxx | 2
starmath/source/node.cxx | 12 ++---
starmath/source/ooxmlexport.cxx | 6 +-
starmath/source/parse.cxx | 16 ++-----
starmath/source/rect.cxx | 19 ++-------
starmath/source/symbol.cxx | 4 -
starmath/source/view.cxx | 54 +++++++++++++-------------
starmath/source/visitors.cxx | 2
starmath/source/wordexportbase.cxx | 2
17 files changed, 106 insertions(+), 121 deletions(-)
New commits:
commit 6031d34ec26b988853c4b317945b3b4256813cbc
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Mon Sep 9 08:52:34 2013 +0200
Math: OSL_FAIL -> SAL_WARN
And some cleanup.
Change-Id: I2e5239a6f7d0dca5855b80752deae6be27c21af6
diff --git a/starmath/source/accessibility.cxx b/starmath/source/accessibility.cxx
index 98a2ece..c0c9213 100644
--- a/starmath/source/accessibility.cxx
+++ b/starmath/source/accessibility.cxx
@@ -1016,7 +1016,7 @@ SfxItemSet SmTextForwarder::GetAttribs( const ESelection& rSel, sal_Bool bOnlyHa
nFlags = GETATTRIBS_CHARATTRIBS;
break;
default:
- OSL_FAIL("unknown flags for SmTextForwarder::GetAttribs");
+ SAL_WARN("starmath", "unknown flags for SmTextForwarder::GetAttribs");
}
return pEditEngine->GetAttribs( rSel.nStartPara, rSel.nStartPos, rSel.nEndPos, nFlags );
diff --git a/starmath/source/cfgitem.cxx b/starmath/source/cfgitem.cxx
index 53ba5de..df339af 100644
--- a/starmath/source/cfgitem.cxx
+++ b/starmath/source/cfgitem.cxx
@@ -521,7 +521,7 @@ void SmMathConfig::ReadSymbol( SmSym &rSymbol,
}
else
{
- OSL_FAIL( "symbol read error" );
+ SAL_WARN("starmath", "symbol read error");
}
}
}
diff --git a/starmath/source/cursor.cxx b/starmath/source/cursor.cxx
index 002e5fe..ce86a32 100644
--- a/starmath/source/cursor.cxx
+++ b/starmath/source/cursor.cxx
@@ -64,7 +64,7 @@ void SmCursor::Move(OutputDevice* pDev, SmMovementDirection direction, bool bMov
}
}break;
default:
- OSL_FAIL("Movement direction not supported!");
+ SAL_WARN("starmath", "Movement direction not supported!");
}
if(NewPos){
position = NewPos;
@@ -900,7 +900,7 @@ bool SmCursor::InsertRow() {
}
pMatrix->SetRowCol(rows + 1, cols);
} else
- OSL_FAIL("We must be either the context of a table or matrix!");
+ SAL_WARN("starmath", "We must be either the context of a table or matrix!");
//Finish editing
FinishEdit(pLineList, pLineParent, nParentIndex, PosAfterInsert);
@@ -1077,7 +1077,7 @@ void SmCursor::InsertElement(SmFormulaElement element){
pNewNode = new SmMathSymbolNode(token);
}break;
default:
- OSL_FAIL("Element unknown!");
+ SAL_WARN("starmath", "Element unknown!");
}
OSL_ENSURE(pNewNode != NULL, "No new node was created!");
if(!pNewNode)
diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx
index b75c25d..6c3d474 100644
--- a/starmath/source/dialog.cxx
+++ b/starmath/source/dialog.cxx
@@ -1749,11 +1749,7 @@ IMPL_LINK( SmSymDefineDialog, ModifyHdl, ComboBox *, pComboBox )
// allow only names from the list (that's the case here anyway)
SelectStyle(aStyles.GetText(), true);
else
- {
-#if OSL_DEBUG_LEVEL > 1
- OSL_FAIL("Sm : wrong combobox argument");
-#endif
- }
+ SAL_WARN("starmath", "wrong combobox argument");
pComboBox->SetSelection(aSelection);
diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx
index 5923fe4..2c63fc0 100644
--- a/starmath/source/document.cxx
+++ b/starmath/source/document.cxx
@@ -132,7 +132,7 @@ void SmDocShell::SFX_NOTIFY(SfxBroadcaster&, const TypeId&,
void SmDocShell::LoadSymbols()
{
- SAL_INFO( "starmath", "starmath: SmDocShell::LoadSymbols" );
+ SAL_INFO( "starmath", "SmDocShell::LoadSymbols" );
SmModule *pp = SM_MOD();
pp->GetSymbolManager().Load();
@@ -141,7 +141,7 @@ void SmDocShell::LoadSymbols()
const OUString SmDocShell::GetComment() const
{
- SAL_INFO( "starmath", "starmath: SmDocShell::GetComment" );
+ SAL_INFO( "starmath", "SmDocShell::GetComment" );
uno::Reference<document::XDocumentPropertiesSupplier> xDPS(
const_cast<SmDocShell*>(this)->GetModel(), uno::UNO_QUERY_THROW);
uno::Reference<document::XDocumentProperties> xDocProps(
@@ -152,7 +152,7 @@ const OUString SmDocShell::GetComment() const
void SmDocShell::SetText(const OUString& rBuffer)
{
- SAL_INFO( "starmath", "starmath: SmDocShell::SetText" );
+ SAL_INFO( "starmath", "SmDocShell::SetText" );
if (rBuffer != aText)
{
@@ -205,7 +205,7 @@ void SmDocShell::SetText(const OUString& rBuffer)
void SmDocShell::SetFormat(SmFormat& rFormat)
{
- SAL_INFO( "starmath", "starmath: SmDocShell::SetFormat" );
+ SAL_INFO( "starmath", "SmDocShell::SetFormat" );
aFormat = rFormat;
SetFormulaArranged( false );
@@ -225,7 +225,7 @@ void SmDocShell::SetFormat(SmFormat& rFormat)
OUString SmDocShell::GetAccessibleText()
{
- SAL_INFO( "starmath", "starmath: SmDocShell::GetAccessibleText" );
+ SAL_INFO( "starmath", "SmDocShell::GetAccessibleText" );
if (!IsFormulaArranged())
ArrangeFormula();
@@ -244,7 +244,7 @@ OUString SmDocShell::GetAccessibleText()
void SmDocShell::Parse()
{
- SAL_INFO( "starmath", "starmath: SmDocShell::Parse" );
+ SAL_INFO( "starmath", "SmDocShell::Parse" );
if (pTree)
delete pTree;
@@ -259,7 +259,7 @@ void SmDocShell::Parse()
void SmDocShell::ArrangeFormula()
{
- SAL_INFO( "starmath", "starmath: SmDocShell::ArrangeFormula" );
+ SAL_INFO( "starmath", "SmDocShell::ArrangeFormula" );
if (IsFormulaArranged())
return;
@@ -370,7 +370,7 @@ void SetEditEngineDefaultFonts(SfxItemPool &rEditEngineItemPool)
EditEngine& SmDocShell::GetEditEngine()
{
- SAL_INFO( "starmath", "starmath: SmDocShell::GetEditEngine" );
+ SAL_INFO( "starmath", "SmDocShell::GetEditEngine" );
if (!pEditEngine)
{
@@ -415,7 +415,7 @@ EditEngine& SmDocShell::GetEditEngine()
SfxItemPool& SmDocShell::GetEditEngineItemPool()
{
- SAL_INFO( "starmath", "starmath: SmDocShell::GetEditEngineItemPool" );
+ SAL_INFO( "starmath", "SmDocShell::GetEditEngineItemPool" );
if (!pEditEngineItemPool)
GetEditEngine();
@@ -425,7 +425,7 @@ SfxItemPool& SmDocShell::GetEditEngineItemPool()
void SmDocShell::DrawFormula(OutputDevice &rDev, Point &rPosition, bool bDrawSelection)
{
- SAL_INFO( "starmath", "starmath: SmDocShell::Draw" );
+ SAL_INFO( "starmath", "SmDocShell::Draw" );
if (!pTree)
Parse();
@@ -482,7 +482,7 @@ void SmDocShell::DrawFormula(OutputDevice &rDev, Point &rPosition, bool bDrawSel
Size SmDocShell::GetSize()
{
- SAL_INFO( "starmath", "starmath: SmDocShell::GetSize" );
+ SAL_INFO( "starmath", "SmDocShell::GetSize" );
Size aRet;
@@ -589,7 +589,7 @@ SmPrinterAccess::~SmPrinterAccess()
Printer* SmDocShell::GetPrt()
{
- SAL_INFO( "starmath", "starmath: SmDocShell::GetPrt" );
+ SAL_INFO( "starmath", "SmDocShell::GetPrt" );
if ( SFX_CREATE_MODE_EMBEDDED == GetCreateMode() )
{
@@ -624,7 +624,7 @@ Printer* SmDocShell::GetPrt()
OutputDevice* SmDocShell::GetRefDev()
{
- SAL_INFO( "starmath", "starmath: SmDocShell::GetRefDev" );
+ SAL_INFO( "starmath", "SmDocShell::GetRefDev" );
if ( SFX_CREATE_MODE_EMBEDDED == GetCreateMode() )
{
@@ -639,7 +639,7 @@ OutputDevice* SmDocShell::GetRefDev()
void SmDocShell::SetPrinter( SfxPrinter *pNew )
{
- SAL_INFO( "starmath", "starmath: SmDocShell::SetPrinter" );
+ SAL_INFO( "starmath", "SmDocShell::SetPrinter" );
delete pPrinter;
pPrinter = pNew; //Transfer ownership
@@ -650,7 +650,7 @@ void SmDocShell::SetPrinter( SfxPrinter *pNew )
void SmDocShell::OnDocumentPrinterChanged( Printer *pPrt )
{
- SAL_INFO( "starmath", "starmath: SmDocShell::OnDocumentPrinterChanged" );
+ SAL_INFO( "starmath", "SmDocShell::OnDocumentPrinterChanged" );
pTmpPrinter = pPrt;
SetFormulaArranged(false);
@@ -663,7 +663,7 @@ void SmDocShell::OnDocumentPrinterChanged( Printer *pPrt )
void SmDocShell::Repaint()
{
- SAL_INFO( "starmath", "starmath: SmDocShell::Repaint" );
+ SAL_INFO( "starmath", "SmDocShell::Repaint" );
bool bIsEnabled = IsEnableSetModified();
if ( bIsEnabled )
@@ -693,7 +693,7 @@ SmDocShell::SmDocShell( const sal_uInt64 i_nSfxCreationFlags ) :
bIsFormulaArranged ( false )
{
pCursor = NULL;
- SAL_INFO( "starmath", "starmath: SmDocShell::SmDocShell" );
+ SAL_INFO( "starmath", "SmDocShell::SmDocShell" );
SetPool(&SFX_APP()->GetPool());
@@ -710,7 +710,7 @@ SmDocShell::SmDocShell( const sal_uInt64 i_nSfxCreationFlags ) :
SmDocShell::~SmDocShell()
{
- SAL_INFO( "starmath", "starmath: SmDocShell::~SmDocShell" );
+ SAL_INFO( "starmath", "SmDocShell::~SmDocShell" );
SmModule *pp = SM_MOD();
@@ -731,7 +731,7 @@ SmDocShell::~SmDocShell()
sal_Bool SmDocShell::SetData( const OUString& rData )
{
- SAL_INFO( "starmath", "starmath: SmDocShell::SetData" );
+ SAL_INFO( "starmath", "SmDocShell::SetData" );
SetText( rData );
return true;
@@ -740,7 +740,7 @@ sal_Bool SmDocShell::SetData( const OUString& rData )
sal_Bool SmDocShell::ConvertFrom(SfxMedium &rMedium)
{
- SAL_INFO( "starmath", "starmath: SmDocShell::ConvertFrom" );
+ SAL_INFO( "starmath", "SmDocShell::ConvertFrom" );
bool bSuccess = false;
const OUString& rFltName = rMedium.GetFilter()->GetFilterName();
@@ -791,7 +791,7 @@ sal_Bool SmDocShell::ConvertFrom(SfxMedium &rMedium)
sal_Bool SmDocShell::InitNew( const uno::Reference < embed::XStorage >& xStorage )
{
- SAL_INFO( "starmath", "starmath: SmDocShell::InitNew" );
+ SAL_INFO( "starmath", "SmDocShell::InitNew" );
bool bRet = false;
if ( SfxObjectShell::InitNew( xStorage ) )
@@ -805,7 +805,7 @@ sal_Bool SmDocShell::InitNew( const uno::Reference < embed::XStorage >& xStorage
sal_Bool SmDocShell::Load( SfxMedium& rMedium )
{
- SAL_INFO( "starmath", "starmath: SmDocShell::Load" );
+ SAL_INFO( "starmath", "SmDocShell::Load" );
bool bRet = false;
if( SfxObjectShell::Load( rMedium ))
@@ -846,7 +846,7 @@ sal_Bool SmDocShell::Load( SfxMedium& rMedium )
sal_Bool SmDocShell::Save()
{
- SAL_INFO( "starmath", "starmath: SmDocShell::Save" );
+ SAL_INFO( "starmath", "SmDocShell::Save" );
//! apply latest changes if necessary
UpdateText();
@@ -897,7 +897,7 @@ sal_Bool SmDocShell::ReplaceBadChars()
void SmDocShell::UpdateText()
{
- SAL_INFO( "starmath", "starmath: SmDocShell::UpdateText" );
+ SAL_INFO( "starmath", "SmDocShell::UpdateText" );
if (pEditEngine && pEditEngine->IsModified())
{
@@ -910,7 +910,7 @@ void SmDocShell::UpdateText()
sal_Bool SmDocShell::SaveAs( SfxMedium& rMedium )
{
- SAL_INFO( "starmath", "starmath: SmDocShell::SaveAs" );
+ SAL_INFO( "starmath", "SmDocShell::SaveAs" );
bool bRet = false;
@@ -934,7 +934,7 @@ sal_Bool SmDocShell::SaveAs( SfxMedium& rMedium )
sal_Bool SmDocShell::ConvertTo( SfxMedium &rMedium )
{
- SAL_INFO( "starmath", "starmath: SmDocShell::ConvertTo" );
+ SAL_INFO( "starmath", "SmDocShell::ConvertTo" );
bool bRet = false;
const SfxFilter* pFlt = rMedium.GetFilter();
@@ -968,7 +968,7 @@ sal_Bool SmDocShell::ConvertTo( SfxMedium &rMedium )
bool SmDocShell::writeFormulaOoxml( ::sax_fastparser::FSHelperPtr pSerializer, oox::core::OoxmlVersion version )
{
- SAL_INFO( "starmath", "starmath: SmDocShell::writeFormulaOoxml" );
+ SAL_INFO( "starmath", "SmDocShell::writeFormulaOoxml" );
if( !pTree )
Parse();
@@ -990,7 +990,7 @@ void SmDocShell::writeFormulaRtf(OStringBuffer& rBuffer, rtl_TextEncoding nEncod
void SmDocShell::readFormulaOoxml( oox::formulaimport::XmlStream& stream )
{
- SAL_INFO( "starmath", "starmath: SmDocShell::readFormulaOoxml" );
+ SAL_INFO( "starmath", "SmDocShell::readFormulaOoxml" );
SmOoxmlImport aEquation( stream );
SetText( aEquation.ConvertToStarMath());
@@ -998,7 +998,7 @@ void SmDocShell::readFormulaOoxml( oox::formulaimport::XmlStream& stream )
sal_Bool SmDocShell::SaveCompleted( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage )
{
- SAL_INFO( "starmath", "starmath: SmDocShell::SaveCompleted" );
+ SAL_INFO( "starmath", "SmDocShell::SaveCompleted" );
if( SfxObjectShell::SaveCompleted( xStorage ))
return true;
@@ -1009,7 +1009,7 @@ sal_Bool SmDocShell::SaveCompleted( const ::com::sun::star::uno::Reference< ::co
void SmDocShell::Execute(SfxRequest& rReq)
{
- SAL_INFO( "starmath", "starmath: SmDocShell::Execute" );
+ SAL_INFO( "starmath", "SmDocShell::Execute" );
switch (rReq.GetSlot())
{
@@ -1217,7 +1217,7 @@ void SmDocShell::Execute(SfxRequest& rReq)
void SmDocShell::GetState(SfxItemSet &rSet)
{
- SAL_INFO( "starmath", "starmath: SmDocShell::GetState" );
+ SAL_INFO( "starmath", "SmDocShell::GetState" );
SfxWhichIter aIter(rSet);
@@ -1315,7 +1315,7 @@ void SmDocShell::GetState(SfxItemSet &rSet)
::svl::IUndoManager *SmDocShell::GetUndoManager()
{
- SAL_INFO( "starmath", "starmath: SmDocShell::GetUndoManager" );
+ SAL_INFO( "starmath", "SmDocShell::GetUndoManager" );
if (!pEditEngine)
GetEditEngine();
@@ -1325,7 +1325,7 @@ void SmDocShell::GetState(SfxItemSet &rSet)
void SmDocShell::SaveSymbols()
{
- SAL_INFO( "starmath", "starmath: SmDocShell::SaveSymbols" );
+ SAL_INFO( "starmath", "SmDocShell::SaveSymbols" );
SmModule *pp = SM_MOD();
pp->GetSymbolManager().Save();
@@ -1336,7 +1336,7 @@ void SmDocShell::Draw(OutputDevice *pDevice,
const JobSetup &,
sal_uInt16 /*nAspect*/)
{
- SAL_INFO( "starmath", "starmath: SmDocShell::Draw" );
+ SAL_INFO( "starmath", "SmDocShell::Draw" );
pDevice->IntersectClipRegion(GetVisArea());
Point atmppoint;
@@ -1350,7 +1350,7 @@ SfxItemPool& SmDocShell::GetPool() const
void SmDocShell::SetVisArea(const Rectangle & rVisArea)
{
- SAL_INFO( "starmath", "starmath: SmDocShell::SetVisArea" );
+ SAL_INFO( "starmath", "SmDocShell::SetVisArea" );
Rectangle aNewRect(rVisArea);
@@ -1393,7 +1393,7 @@ void SmDocShell::FillClass(SvGlobalName* pClassName,
sal_Int32 nFileFormat,
sal_Bool bTemplate /* = sal_False */) const
{
- SAL_INFO( "starmath", "starmath: SmDocShell::FillClass" );
+ SAL_INFO( "starmath", "SmDocShell::FillClass" );
if (nFileFormat == SOFFICE_FILEFORMAT_60 )
{
@@ -1419,7 +1419,7 @@ sal_uLong SmDocShell::GetMiscStatus() const
void SmDocShell::SetModified(sal_Bool bModified)
{
- SAL_INFO( "starmath", "starmath: SmDocShell::SetModified" );
+ SAL_INFO( "starmath", "SmDocShell::SetModified" );
if( IsEnableSetModified() )
{
@@ -1430,7 +1430,7 @@ void SmDocShell::SetModified(sal_Bool bModified)
bool SmDocShell::WriteAsMathType3( SfxMedium& rMedium )
{
- SAL_INFO( "starmath", "starmath: SmDocShell::WriteAsMathType3" );
+ SAL_INFO( "starmath", "SmDocShell::WriteAsMathType3" );
MathType aEquation( aText, pTree );
diff --git a/starmath/source/format.cxx b/starmath/source/format.cxx
index 5d75ef9..448ee51 100644
--- a/starmath/source/format.cxx
+++ b/starmath/source/format.cxx
@@ -84,7 +84,7 @@ OUString GetDefaultFontName( LanguageType nLang, sal_uInt16 nIdent )
case SCRIPTTYPE_COMPLEX : pTable = aCTLDefFnts; break;
default :
pTable = aLatinDefFnts;
- OSL_FAIL( "unknown script-type" );
+ SAL_WARN("starmath", "unknown script-type");
}
return Application::GetDefaultDevice()->GetDefaultFont(
diff --git a/starmath/source/mathmlexport.cxx b/starmath/source/mathmlexport.cxx
index c53c7d8..4e9e4ec 100644
--- a/starmath/source/mathmlexport.cxx
+++ b/starmath/source/mathmlexport.cxx
@@ -325,9 +325,9 @@ sal_Bool SmXMLExportWrapper::WriteThroughComponent(
xStream = xStorage->openStreamElement( sStreamName,
embed::ElementModes::READWRITE | embed::ElementModes::TRUNCATE );
}
- catch ( uno::Exception& )
+ catch ( uno::Exception& rEx )
{
- OSL_FAIL( "Can't create output stream in package!" );
+ SAL_WARN("starmath", "Can't create output stream in package: " << rEx.Message );
return sal_False;
}
@@ -1320,7 +1320,7 @@ void SmXMLExport::ExportFont(const SmNode *pNode, int nLevel)
case TSERIF : nSansSerifFixed = 1; break;
case TFIXED : nSansSerifFixed = 2; break;
default:
- OSL_FAIL( "unexpected case" );
+ SAL_WARN("starmath", "unexpected case");
}
// According to the parser every node that is to be evaluated heres
// has a single non-zero subnode at index 1!! Thus we only need to check
@@ -1452,7 +1452,7 @@ void SmXMLExport::ExportFont(const SmNode *pNode, int nLevel)
pText = "monospace"; // no modifiers allowed for monospace ...
else
{
- OSL_FAIL( "unexpected case" );
+ SAL_WARN("starmath", "unexpected case");
}
AddAttribute(XML_NAMESPACE_MATH, XML_MATHVARIANT, OUString::createFromAscii( pText ));
}
@@ -1645,7 +1645,7 @@ void SmXMLExport::ExportNodes(const SmNode *pNode, int nLevel)
ExportBlank(pNode, nLevel);
break;
default:
- OSL_FAIL( "Warning: failed to export a node?" );
+ SAL_WARN("starmath", "Warning: failed to export a node?");
break;
}
diff --git a/starmath/source/mathmlimport.cxx b/starmath/source/mathmlimport.cxx
index 59aadee..073d96c 100644
--- a/starmath/source/mathmlimport.cxx
+++ b/starmath/source/mathmlimport.cxx
@@ -1820,7 +1820,7 @@ SvXMLImportContext *SmXMLOfficeContext_Impl::CreateChildContext(sal_uInt16 nPref
if ( XML_NAMESPACE_OFFICE == nPrefix &&
rLocalName == GetXMLToken(XML_META) )
{
- OSL_FAIL("XML_TOK_DOC_META: should not have come here, maybe document is invalid?");
+ SAL_WARN("starmath", "XML_TOK_DOC_META: should not have come here, maybe document is invalid?");
}
else if ( XML_NAMESPACE_OFFICE == nPrefix &&
rLocalName == GetXMLToken(XML_SETTINGS) )
@@ -2973,9 +2973,9 @@ void SmXMLImport::SetConfigurationSettings(const Sequence<PropertyValue>& aConfP
{
// dealing with read-only properties here. Nothing to do...
}
- catch( Exception& )
+ catch( Exception& rEx)
{
- OSL_FAIL( "SmXMLImport::SetConfigurationSettings: Exception!" );
+ SAL_WARN("starmath", "SmXMLImport::SetConfigurationSettings: Exception: " << rEx.Message );
}
}
diff --git a/starmath/source/mathtype.cxx b/starmath/source/mathtype.cxx
index 42f118d..a95c870 100644
--- a/starmath/source/mathtype.cxx
+++ b/starmath/source/mathtype.cxx
@@ -1725,7 +1725,7 @@ int MathType::HandleRecords(int nLevel,sal_uInt8 nSelector,
*pS >> nTabType;
*pS >> nTabOffset;
}
- OSL_FAIL("Not seen in the wild Equation Ruler Field");
+ SAL_WARN("starmath", "Not seen in the wild Equation Ruler Field");
break;
case FONT:
{
diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx
index c540c68..2e631e2 100644
--- a/starmath/source/node.cxx
+++ b/starmath/source/node.cxx
@@ -82,7 +82,7 @@ SmTmpDevice::SmTmpDevice(OutputDevice &rTheDev, bool bUseMap100th_mm) :
PUSH_LINECOLOR | PUSH_FILLCOLOR | PUSH_TEXTCOLOR );
if (bUseMap100th_mm && MAP_100TH_MM != rOutDev.GetMapMode().GetMapUnit())
{
- OSL_FAIL( "incorrect MapMode?" );
+ SAL_WARN("starmath", "incorrect MapMode?");
rOutDev.SetMapMode( MAP_100TH_MM ); //Immer fuer 100% fomatieren
}
}
@@ -516,7 +516,7 @@ const SmNode * SmNode::FindRectClosestTo(const Point &rPoint) const
void SmNode::GetAccessibleText( OUStringBuffer &/*rText*/ ) const
{
- OSL_FAIL( "SmNode: GetAccessibleText not overloaded" );
+ SAL_WARN("starmath", "SmNode: GetAccessibleText not overloaded");
}
const SmNode * SmNode::FindNodeWithAccessibleIndex(sal_Int32 nAccIdx) const
@@ -646,7 +646,7 @@ void SmNode::DumpAsDot(std::ostream &out, OUString* label, int number, int& id,
long SmNode::GetFormulaBaseline() const
{
- OSL_FAIL( "This dummy implementation should not have been called." );
+ SAL_WARN("starmath", "This dummy implementation should not have been called.");
return 0;
}
@@ -1587,7 +1587,7 @@ void SmSubSupNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
aPos.Y() -= nDist;
break;
default :
- OSL_FAIL("Sm: unknown case");
+ SAL_WARN("starmath", "unknown case");
break;
}
@@ -2199,7 +2199,7 @@ void SmFontNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
case TYELLOW : SetColor(Color(COL_YELLOW)); break;
default:
- OSL_FAIL("Sm: unknown case");
+ SAL_WARN("starmath", "unknown case");
}
pNode->Arrange(rDev, rFormat);
@@ -3090,7 +3090,7 @@ void SmNode::Accept(SmVisitor*){
//obscure copy constructor is used... I can't find it's implementation, and
//don't want to figure out how to fix it... If you want to, just delete this
//method, making SmNode abstract, and see where you can an problem with that.
- OSL_FAIL("SmNode should not be visitable!");
+ SAL_WARN("starmath", "SmNode should not be visitable!");
}
void SmTableNode::Accept(SmVisitor* pVisitor) {
diff --git a/starmath/source/ooxmlexport.cxx b/starmath/source/ooxmlexport.cxx
index c7ab7ff..8d1c808 100644
--- a/starmath/source/ooxmlexport.cxx
+++ b/starmath/source/ooxmlexport.cxx
@@ -315,7 +315,7 @@ void SmOoxmlExport::HandleOperator( const SmOperNode* pNode, int nLevel )
m_pSerializer->endElementNS( XML_m, XML_func );
break;
default:
- OSL_FAIL( "Unhandled operation" );
+ SAL_WARN("starmath.ooxml", "Unhandled operation");
HandleAllSubNodes( pNode, nLevel );
break;
}
@@ -425,7 +425,7 @@ void SmOoxmlExport::HandleSubSupScriptInternal( const SmSubSupNode* pNode, int n
}
else
{
- OSL_FAIL( "Unhandled sub/sup combination" );
+ SAL_WARN("starmath.ooxml", "Unhandled sub/sup combination");
// TODO do not do anything, this should be probably an assert()
// HandleAllSubNodes( pNode, nLevel );
}
@@ -523,7 +523,7 @@ void SmOoxmlExport::HandleVerticalBrace( const SmVerticalBraceNode* pNode, int n
break;
}
default:
- OSL_FAIL( "Unhandled vertical brace" );
+ SAL_WARN("starmath.ooxml", "Unhandled vertical brace");
HandleAllSubNodes( pNode, nLevel );
break;
}
diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx
index 99f658d..9cb24fc 100644
--- a/starmath/source/parse.cxx
+++ b/starmath/source/parse.cxx
@@ -481,9 +481,7 @@ void SmParser::NextToken()
#if OSL_DEBUG_LEVEL > 1
if (!IsDelimiter( m_aBufferString, aRes.EndPos ))
- {
- OSL_FAIL( "identifier really finished? (compatibility!)" );
- }
+ SAL_WARN( "starmath", "identifier really finished? (compatibility!)" );
#endif
}
else if (aRes.TokenType & KParseType::DOUBLE_QUOTE_STRING)
@@ -521,9 +519,7 @@ void SmParser::NextToken()
#if OSL_DEBUG_LEVEL > 1
if (!IsDelimiter( m_aBufferString, aRes.EndPos ))
- {
- OSL_FAIL( "identifier really finished? (compatibility!)" );
- }
+ SAL_WARN( "starmath", "identifier really finished? (compatibility!)" );
#endif
}
}
@@ -1251,7 +1247,7 @@ void SmParser::SubSup(sal_uLong nActiveGroup)
case TLSUB : nIndex = (int) LSUB; break;
case TLSUP : nIndex = (int) LSUP; break;
default :
- OSL_FAIL("Sm: unknown case");
+ SAL_WARN( "starmath", "unknown case");
}
nIndex++;
OSL_ENSURE(1 <= nIndex && nIndex <= 1 + SUBSUP_NUM_ENTRIES,
@@ -1670,7 +1666,7 @@ void SmParser::Oper()
break;
default :
- OSL_FAIL("Sm: unknown case");
+ SAL_WARN("starmath", "unknown case");
}
m_aNodeStack.push(pNode);
@@ -1831,7 +1827,7 @@ void SmParser::FontAttribut()
break;
default :
- OSL_FAIL("Sm: unknown case");
+ SAL_WARN("starmath", "unknown case");
}
}
@@ -2035,7 +2031,7 @@ void SmParser::Brace()
case TLFLOOR : eExpectedType = TRFLOOR; break;
case TLCEIL : eExpectedType = TRCEIL; break;
default :
- OSL_FAIL("Sm: unknown case");
+ SAL_WARN("starmath", "unknown case");
}
if (m_aCurToken.eType == eExpectedType)
diff --git a/starmath/source/rect.cxx b/starmath/source/rect.cxx
index 33bf421..ba7313a 100644
--- a/starmath/source/rect.cxx
+++ b/starmath/source/rect.cxx
@@ -172,16 +172,9 @@ void SmRect::BuildRect(const OutputDevice &rDev, const SmFormat *pFormat,
// get GlyphBoundRect
Rectangle aGlyphRect;
-#if OSL_DEBUG_LEVEL > 1
- bool bSuccess =
-#endif
- SmGetGlyphBoundRect(rDev, rText, aGlyphRect);
-#if OSL_DEBUG_LEVEL > 1
+ bool bSuccess = SmGetGlyphBoundRect(rDev, rText, aGlyphRect);
if (!bSuccess)
- {
- OSL_FAIL( "Sm : Ooops... (fehlt evtl. der Font?)");
- }
-#endif
+ SAL_WARN("starmath", "Ooops... (Font missing?)");
nItalicLeftSpace = GetLeft() - aGlyphRect.Left() + nBorderWidth;
nItalicRightSpace = aGlyphRect.Right() - GetRight() + nBorderWidth;
@@ -335,7 +328,7 @@ const Point SmRect::AlignTo(const SmRect &rRect, RectPos ePos,
+ GetItalicLeftSpace();
break;
default :
- OSL_FAIL("Sm: unknown case");
+ SAL_WARN("starmath", "unknown case");
}
// check if horizontal position is already set
@@ -372,7 +365,7 @@ const Point SmRect::AlignTo(const SmRect &rRect, RectPos ePos,
aPos.Y() += rRect.GetLoAttrFence() - GetTop();
break;
default :
- OSL_FAIL("Sm: unknown case");
+ SAL_WARN("starmath", "unknown case");
}
// check if vertical position is already set
@@ -389,7 +382,7 @@ const Point SmRect::AlignTo(const SmRect &rRect, RectPos ePos,
aPos.X() += rRect.GetItalicRight() - GetItalicRight();
break;
default :
- OSL_FAIL("Sm: unknown case");
+ SAL_WARN("starmath", "unknown case");
}
return aPos;
@@ -480,7 +473,7 @@ SmRect & SmRect::ExtendBy(const SmRect &rRect, RectCopyMBL eCopyMode)
CopyMBL(rRect);
break;
default :
- OSL_FAIL("Sm: unknown case");
+ SAL_WARN("starmath", "unknown case");
}
}
diff --git a/starmath/source/symbol.cxx b/starmath/source/symbol.cxx
index 54e30e4..098deb8 100644
--- a/starmath/source/symbol.cxx
+++ b/starmath/source/symbol.cxx
@@ -181,7 +181,7 @@ bool SmSymbolManager::AddOrReplaceSymbol( const SmSym &rSymbol, bool bForceChang
else if (pFound && !bForceChange && bSymbolConflict)
{
// TODO: to solve this a document owned symbol manager would be required ...
- OSL_FAIL( "symbol conflict, different symbol with same name found!" );
+ SAL_WARN("starmath", "symbol conflict, different symbol with same name found!");
// 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
@@ -254,7 +254,7 @@ void SmSymbolManager::Load()
if (0 == nSymbolCount)
{
- OSL_FAIL( "no symbol set found" );
+ SAL_WARN("starmath", "no symbol set found");
m_bModified = false;
}
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index 7b4685f..cef2397 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -946,7 +946,7 @@ SFX_IMPL_NAMED_VIEWFACTORY(SmViewShell, "Default")
void SmViewShell::AdjustPosSizePixel(const Point &rPos, const Size &rSize)
{
- SAL_INFO( "starmath", "starmath: SmViewShell::AdjustPosSizePixel" );
+ SAL_INFO( "starmath", "SmViewShell::AdjustPosSizePixel" );
aGraphic.SetPosSizePixel(rPos, rSize);
}
@@ -954,7 +954,7 @@ void SmViewShell::AdjustPosSizePixel(const Point &rPos, const Size &rSize)
void SmViewShell::InnerResizePixel(const Point &rOfs, const Size &rSize)
{
- SAL_INFO( "starmath", "starmath: SmViewShell::InnerResizePixel" );
+ SAL_INFO( "starmath", "SmViewShell::InnerResizePixel" );
Size aObjSize = GetObjectShell()->GetVisArea().GetSize();
if ( aObjSize.Width() > 0 && aObjSize.Height() > 0 )
@@ -972,7 +972,7 @@ void SmViewShell::InnerResizePixel(const Point &rOfs, const Size &rSize)
void SmViewShell::OuterResizePixel(const Point &rOfs, const Size &rSize)
{
- SAL_INFO( "starmath", "starmath: SmViewShell::OuterResizePixel" );
+ SAL_INFO( "starmath", "SmViewShell::OuterResizePixel" );
SmGraphicWindow &rWin = GetGraphicWindow();
rWin.SetPosSizePixel(rOfs, rSize);
@@ -984,7 +984,7 @@ void SmViewShell::OuterResizePixel(const Point &rOfs, const Size &rSize)
void SmViewShell::QueryObjAreaPixel( Rectangle& rRect ) const
{
- SAL_INFO( "starmath", "starmath: SmViewShell::QueryObjAreaPixel" );
+ SAL_INFO( "starmath", "SmViewShell::QueryObjAreaPixel" );
rRect.SetSize( GetGraphicWindow().GetSizePixel() );
}
@@ -992,7 +992,7 @@ void SmViewShell::QueryObjAreaPixel( Rectangle& rRect ) const
void SmViewShell::SetZoomFactor( const Fraction &rX, const Fraction &rY )
{
- SAL_INFO( "starmath", "starmath: SmViewShell::SetZoomFactor" );
+ SAL_INFO( "starmath", "SmViewShell::SetZoomFactor" );
const Fraction &rFrac = rX < rY ? rX : rY;
GetGraphicWindow().SetZoom( (sal_uInt16) long(rFrac * Fraction( 100, 1 )) );
@@ -1005,7 +1005,7 @@ void SmViewShell::SetZoomFactor( const Fraction &rX, const Fraction &rY )
Size SmViewShell::GetTextLineSize(OutputDevice& rDevice, const OUString& rLine)
{
- SAL_INFO( "starmath", "starmath: SmViewShell::GetTextLineSize" );
+ SAL_INFO( "starmath", "SmViewShell::GetTextLineSize" );
Size aSize(rDevice.GetTextWidth(rLine), rDevice.GetTextHeight());
sal_uInt16 nTabs = comphelper::string::getTokenCount(rLine, '\t');
@@ -1034,7 +1034,7 @@ Size SmViewShell::GetTextLineSize(OutputDevice& rDevice, const OUString& rLine)
Size SmViewShell::GetTextSize(OutputDevice& rDevice, const OUString& rText, long MaxWidth)
{
- SAL_INFO( "starmath", "starmath: SmViewShell::GetTextSize" );
+ SAL_INFO( "starmath", "SmViewShell::GetTextSize" );
Size aSize;
Size TextSize;
@@ -1095,7 +1095,7 @@ Size SmViewShell::GetTextSize(OutputDevice& rDevice, const OUString& rText, long
void SmViewShell::DrawTextLine(OutputDevice& rDevice, const Point& rPosition, const OUString& rLine)
{
- SAL_INFO( "starmath", "starmath: SmViewShell::DrawTextLine" );
+ SAL_INFO( "starmath", "SmViewShell::DrawTextLine" );
Point aPoint (rPosition);
sal_uInt16 nTabs = comphelper::string::getTokenCount(rLine, '\t');
@@ -1123,7 +1123,7 @@ void SmViewShell::DrawTextLine(OutputDevice& rDevice, const Point& rPosition, co
void SmViewShell::DrawText(OutputDevice& rDevice, const Point& rPosition, const OUString& rText, sal_uInt16 MaxWidth)
{
- SAL_INFO( "starmath", "starmath: SmViewShell::DrawText" );
+ SAL_INFO( "starmath", "SmViewShell::DrawText" );
sal_uInt16 nLines = comphelper::string::getTokenCount(rText, '\n');
Point aPoint (rPosition);
@@ -1188,7 +1188,7 @@ void SmViewShell::Impl_Print(
const SmPrintUIOptions &rPrintUIOptions,
Rectangle aOutRect, Point aZeroPoint )
{
- SAL_INFO( "starmath", "starmath: SmViewShell::Impl_Print" );
+ SAL_INFO( "starmath", "SmViewShell::Impl_Print" );
const bool bIsPrintTitle = rPrintUIOptions.getBoolValue( PRTUIOPT_TITLE_ROW, sal_True );
const bool bIsPrintFrame = rPrintUIOptions.getBoolValue( PRTUIOPT_BORDER, sal_True );
@@ -1337,7 +1337,7 @@ void SmViewShell::Impl_Print(
sal_uInt16 SmViewShell::Print(SfxProgress & /*rProgress*/, sal_Bool /*bIsAPI*/)
{
- SAL_INFO( "starmath", "starmath: SmViewShell::Print" );
+ SAL_INFO( "starmath", "SmViewShell::Print" );
SAL_WARN( "starmath", "SmViewShell::Print: no longer used with new UI print dialog. Should be removed!!" );
return 0;
}
@@ -1345,7 +1345,7 @@ sal_uInt16 SmViewShell::Print(SfxProgress & /*rProgress*/, sal_Bool /*bIsAPI*/)
SfxPrinter* SmViewShell::GetPrinter(sal_Bool bCreate)
{
- SAL_INFO( "starmath", "starmath: SmViewShell::GetPrinter" );
+ SAL_INFO( "starmath", "SmViewShell::GetPrinter" );
SmDocShell *pDoc = GetDoc();
if ( pDoc->HasPrinter() || bCreate )
@@ -1356,7 +1356,7 @@ SfxPrinter* SmViewShell::GetPrinter(sal_Bool bCreate)
sal_uInt16 SmViewShell::SetPrinter(SfxPrinter *pNewPrinter, sal_uInt16 nDiffFlags, bool )
{
- SAL_INFO( "starmath", "starmath: SmViewShell::SetPrinter" );
+ SAL_INFO( "starmath", "SmViewShell::SetPrinter" );
SfxPrinter *pOld = GetDoc()->GetPrinter();
if ( pOld && pOld->IsPrinting() )
return SFX_PRINTERROR_BUSY;
@@ -1380,7 +1380,7 @@ bool SmViewShell::HasPrintOptionsPage() const
SfxTabPage* SmViewShell::CreatePrintOptionsPage(Window *pParent,
const SfxItemSet &rOptions)
{
- SAL_INFO( "starmath", "starmath: SmViewShell::CreatePrintOptionsPage" );
+ SAL_INFO( "starmath", "SmViewShell::CreatePrintOptionsPage" );
return SmPrintOptionsTabPage::Create(pParent, rOptions);
}
@@ -1388,7 +1388,7 @@ SfxTabPage* SmViewShell::CreatePrintOptionsPage(Window *pParent,
SmEditWindow *SmViewShell::GetEditWindow()
{
- SAL_INFO( "starmath", "starmath: SmViewShell::GetEditWindow" );
+ SAL_INFO( "starmath", "SmViewShell::GetEditWindow" );
SmCmdBoxWrapper *pWrapper = (SmCmdBoxWrapper *) GetViewFrame()->
GetChildWindow( SmCmdBoxWrapper::GetChildWindowId() );
@@ -1406,7 +1406,7 @@ SmEditWindow *SmViewShell::GetEditWindow()
void SmViewShell::SetStatusText(const OUString& rText)
{
- SAL_INFO( "starmath", "starmath: SmViewShell::SetStatusText" );
+ SAL_INFO( "starmath", "SmViewShell::SetStatusText" );
aStatusText = rText;
GetViewFrame()->GetBindings().Invalidate(SID_TEXTSTATUS);
@@ -1415,7 +1415,7 @@ void SmViewShell::SetStatusText(const OUString& rText)
void SmViewShell::ShowError( const SmErrorDesc *pErrorDesc )
{
- SAL_INFO( "starmath", "starmath: SmViewShell::ShowError" );
+ SAL_INFO( "starmath", "SmViewShell::ShowError" );
OSL_ENSURE(GetDoc(), "Sm : Document missing");
if (pErrorDesc || 0 != (pErrorDesc = GetDoc()->GetParser().GetError(0)) )
@@ -1429,7 +1429,7 @@ void SmViewShell::ShowError( const SmErrorDesc *pErrorDesc )
void SmViewShell::NextError()
{
- SAL_INFO( "starmath", "starmath: SmViewShell::NextError" );
+ SAL_INFO( "starmath", "SmViewShell::NextError" );
OSL_ENSURE(GetDoc(), "Sm : Document missing");
const SmErrorDesc *pErrorDesc = GetDoc()->GetParser().NextError();
@@ -1441,7 +1441,7 @@ void SmViewShell::NextError()
void SmViewShell::PrevError()
{
- SAL_INFO( "starmath", "starmath: SmViewShell::PrevError" );
+ SAL_INFO( "starmath", "SmViewShell::PrevError" );
OSL_ENSURE(GetDoc(), "Sm : Document missing");
const SmErrorDesc *pErrorDesc = GetDoc()->GetParser().PrevError();
@@ -1453,7 +1453,7 @@ void SmViewShell::PrevError()
void SmViewShell::Insert( SfxMedium& rMedium )
{
- SAL_INFO( "starmath", "starmath: SmViewShell::Insert" );
+ SAL_INFO( "starmath", "SmViewShell::Insert" );
SmDocShell *pDoc = GetDoc();
bool bRet = false;
@@ -1493,7 +1493,7 @@ void SmViewShell::Insert( SfxMedium& rMedium )
void SmViewShell::InsertFrom(SfxMedium &rMedium)
{
- SAL_INFO( "starmath", "starmath: SmViewShell::InsertFrom" );
+ SAL_INFO( "starmath", "SmViewShell::InsertFrom" );
bool bSuccess = false;
SmDocShell *pDoc = GetDoc();
@@ -1530,7 +1530,7 @@ void SmViewShell::InsertFrom(SfxMedium &rMedium)
void SmViewShell::Execute(SfxRequest& rReq)
{
- SAL_INFO( "starmath", "starmath: SmViewShell::Execute" );
+ SAL_INFO( "starmath", "SmViewShell::Execute" );
SmEditWindow *pWin = GetEditWindow();
@@ -1885,7 +1885,7 @@ void SmViewShell::Execute(SfxRequest& rReq)
void SmViewShell::GetState(SfxItemSet &rSet)
{
- SAL_INFO( "starmath", "starmath: SmViewShell::GetState" );
+ SAL_INFO( "starmath", "SmViewShell::GetState" );
SfxWhichIter aIter(rSet);
@@ -1992,7 +1992,7 @@ SmViewShell::SmViewShell(SfxViewFrame *pFrame_, SfxViewShell *):
aGraphicController(aGraphic, SID_GAPHIC_SM, pFrame_->GetBindings())
, bInsertIntoEditWindow(false)
{
- SAL_INFO( "starmath", "starmath: SmViewShell::SmViewShell" );
+ SAL_INFO( "starmath", "SmViewShell::SmViewShell" );
SetStatusText(OUString());
SetWindow(&aGraphic);
@@ -2004,7 +2004,7 @@ SmViewShell::SmViewShell(SfxViewFrame *pFrame_, SfxViewShell *):
SmViewShell::~SmViewShell()
{
- SAL_INFO( "starmath", "starmath: SmViewShell::~SmViewShell" );
+ SAL_INFO( "starmath", "SmViewShell::~SmViewShell" );
//!! this view shell is not active anymore !!
// Thus 'SmGetActiveView' will give a 0 pointer.
@@ -2017,7 +2017,7 @@ SmViewShell::~SmViewShell()
void SmViewShell::Deactivate( sal_Bool bIsMDIActivate )
{
- SAL_INFO( "starmath", "starmath: SmViewShell::Deactivate" );
+ SAL_INFO( "starmath", "SmViewShell::Deactivate" );
SmEditWindow *pEdit = GetEditWindow();
if ( pEdit )
@@ -2029,7 +2029,7 @@ void SmViewShell::Deactivate( sal_Bool bIsMDIActivate )
void SmViewShell::Activate( sal_Bool bIsMDIActivate )
{
- SAL_INFO( "starmath", "starmath: SmViewShell::Activate" );
+ SAL_INFO( "starmath", "SmViewShell::Activate" );
SfxViewShell::Activate( bIsMDIActivate );
diff --git a/starmath/source/visitors.cxx b/starmath/source/visitors.cxx
index 91032b2..9305f73 100644
--- a/starmath/source/visitors.cxx
+++ b/starmath/source/visitors.cxx
@@ -477,7 +477,7 @@ SmTmpDevice2::SmTmpDevice2( OutputDevice &rTheDev, bool bUseMap100th_mm ) :
PUSH_LINECOLOR | PUSH_FILLCOLOR | PUSH_TEXTCOLOR );
if ( bUseMap100th_mm && MAP_100TH_MM != rOutDev.GetMapMode( ).GetMapUnit( ) )
{
- OSL_FAIL( "incorrect MapMode?" );
+ SAL_WARN("starmath", "incorrect MapMode?");
rOutDev.SetMapMode( MAP_100TH_MM ); //format for 100% always
}
}
diff --git a/starmath/source/wordexportbase.cxx b/starmath/source/wordexportbase.cxx
index f0df05c..228b5e6 100644
--- a/starmath/source/wordexportbase.cxx
+++ b/starmath/source/wordexportbase.cxx
@@ -129,7 +129,7 @@ void SmWordExportBase::HandleAllSubNodes( const SmNode* pNode, int nLevel )
// TODO remove when all types of nodes are handled properly
if( pNode->GetSubNode( i ) == NULL )
{
- OSL_FAIL( "Subnode is NULL, parent node not handled properly" );
+ SAL_WARN("starmath.wordbase", "Subnode is NULL, parent node not handled properly");
continue;
}
HandleNode( pNode->GetSubNode( i ), nLevel + 1 );
More information about the Libreoffice-commits
mailing list