summaryrefslogtreecommitdiff
path: root/starmath/source
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2011-03-18 15:59:29 +0100
committerJan Holesovsky <kendy@suse.cz>2011-03-18 15:59:29 +0100
commit5a267de99f19bdab857429a81ffcfbb4d06f5bbd (patch)
tree1425ce2404af0e2542e1be0dca3821600f5b82a8 /starmath/source
parent3bb681a344beb911d92b48469afbd0ccc51db1dd (diff)
parent99ebfb7335c333a77910b1059b7b41fb34ff0899 (diff)
Merge remote-tracking branch 'origin/integration/dev300_m101'
Conflicts: starmath/source/symbol.cxx sw/source/core/doc/docnew.cxx sw/source/core/doc/docnum.cxx sw/source/core/draw/dview.cxx sw/source/core/fields/docufld.cxx sw/source/core/layout/calcmove.cxx sw/source/filter/html/swhtml.cxx sw/source/filter/rtf/rtftbl.cxx sw/source/ui/config/modcfg.cxx sw/source/ui/dialog/docstdlg.cxx sw/source/ui/dialog/docstdlg.src sw/source/ui/fldui/flddb.cxx sw/source/ui/fldui/flddinf.cxx sw/source/ui/fldui/flddok.cxx sw/source/ui/fldui/fldfunc.cxx sw/source/ui/fldui/fldmgr.cxx sw/source/ui/fldui/fldpage.hxx sw/source/ui/fldui/fldref.cxx sw/source/ui/fldui/fldvar.cxx sw/source/ui/fldui/fldvar.hxx sw/source/ui/fldui/fldwrap.cxx sw/source/ui/fldui/xfldui.cxx sw/source/ui/inc/docstdlg.hxx sw/source/ui/shells/langhelper.cxx sw/source/ui/shells/txtattr.cxx sw/source/ui/shells/txtcrsr.cxx sw/source/ui/table/tabledlg.cxx
Diffstat (limited to 'starmath/source')
-rw-r--r--starmath/source/accessibility.cxx102
-rw-r--r--starmath/source/accessibility.hxx60
-rw-r--r--starmath/source/cfgitem.cxx221
-rw-r--r--starmath/source/cfgitem.hxx31
-rwxr-xr-x[-rw-r--r--]starmath/source/config.cxx25
-rw-r--r--starmath/source/cursor.cxx36
-rw-r--r--starmath/source/detreg.cxx23
-rwxr-xr-x[-rw-r--r--]starmath/source/dialog.cxx244
-rwxr-xr-x[-rw-r--r--]starmath/source/dialog.hrc9
-rwxr-xr-x[-rw-r--r--]starmath/source/document.cxx104
-rw-r--r--starmath/source/edit.cxx22
-rw-r--r--starmath/source/format.cxx18
-rwxr-xr-x[-rw-r--r--]starmath/source/makefile.mk20
-rwxr-xr-x[-rw-r--r--]starmath/source/mathmlexport.cxx30
-rwxr-xr-x[-rw-r--r--]starmath/source/mathmlimport.cxx128
-rwxr-xr-x[-rw-r--r--]starmath/source/mathmlimport.hxx14
-rw-r--r--starmath/source/mathtype.cxx46
-rw-r--r--starmath/source/mathtype.hxx4
-rw-r--r--starmath/source/menu_tmpl.src160
-rw-r--r--starmath/source/node.cxx255
-rw-r--r--starmath/source/parse.cxx995
-rw-r--r--starmath/source/rect.cxx6
-rw-r--r--starmath/source/register.cxx86
-rw-r--r--starmath/source/smdetect.cxx28
-rwxr-xr-x[-rw-r--r--]starmath/source/smmod.cxx39
-rw-r--r--starmath/source/smres.src1904
-rw-r--r--starmath/source/symbol.cxx15
-rw-r--r--starmath/source/toolbox.cxx123
-rwxr-xr-x[-rw-r--r--]starmath/source/toolbox.hrc14
-rwxr-xr-xstarmath/source/toolbox.src1777
-rw-r--r--starmath/source/unomodel.cxx79
-rw-r--r--starmath/source/utility.cxx20
-rw-r--r--starmath/source/view.cxx127
-rw-r--r--starmath/source/visitors.cxx14
34 files changed, 3381 insertions, 3398 deletions
diff --git a/starmath/source/accessibility.cxx b/starmath/source/accessibility.cxx
index c53319e2cfe1..590d3fa5eb68 100644
--- a/starmath/source/accessibility.cxx
+++ b/starmath/source/accessibility.cxx
@@ -338,8 +338,8 @@ sal_Int32 SAL_CALL SmGraphicAccessible::getAccessibleIndexInParent()
Window *pAccParent = pWin ? pWin->GetAccessibleParentWindow() : 0;
if (pAccParent)
{
- USHORT nCnt = pAccParent->GetAccessibleChildWindowCount();
- for (USHORT i = 0; i < nCnt && nIdx == -1; ++i)
+ sal_uInt16 nCnt = pAccParent->GetAccessibleChildWindowCount();
+ for (sal_uInt16 i = 0; i < nCnt && nIdx == -1; ++i)
if (pAccParent->GetAccessibleChildWindow( i ) == pWin)
nIdx = i;
}
@@ -487,7 +487,7 @@ Sequence< beans::PropertyValue > SAL_CALL SmGraphicAccessible::getCharacterAttri
throw (IndexOutOfBoundsException, RuntimeException)
{
SolarMutexGuard aGuard;
- INT32 nLen = GetAccessibleText_Impl().Len();
+ sal_Int32 nLen = GetAccessibleText_Impl().Len();
if (!(0 <= nIndex && nIndex < nLen))
throw IndexOutOfBoundsException();
return Sequence< beans::PropertyValue >();
@@ -667,11 +667,11 @@ sal_Bool SAL_CALL SmGraphicAccessible::setSelection(
throw (IndexOutOfBoundsException, RuntimeException)
{
SolarMutexGuard aGuard;
- INT32 nLen = GetAccessibleText_Impl().Len();
+ sal_Int32 nLen = GetAccessibleText_Impl().Len();
if (!(0 <= nStartIndex && nStartIndex < nLen) ||
!(0 <= nEndIndex && nEndIndex < nLen))
throw IndexOutOfBoundsException();
- return FALSE;
+ return sal_False;
}
OUString SAL_CALL SmGraphicAccessible::getText()
@@ -895,7 +895,7 @@ SmViewForwarder::~SmViewForwarder()
{
}
-BOOL SmViewForwarder::IsValid() const
+sal_Bool SmViewForwarder::IsValid() const
{
return rEditAcc.GetEditView() != 0;
}
@@ -992,13 +992,13 @@ IMPL_LINK(SmTextForwarder, NotifyHdl, EENotify*, aNotify)
return 0;
}
-USHORT SmTextForwarder::GetParagraphCount() const
+sal_uInt16 SmTextForwarder::GetParagraphCount() const
{
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
return pEditEngine ? pEditEngine->GetParagraphCount() : 0;
}
-USHORT SmTextForwarder::GetTextLen( USHORT nParagraph ) const
+sal_uInt16 SmTextForwarder::GetTextLen( sal_uInt16 nParagraph ) const
{
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
return pEditEngine ? pEditEngine->GetTextLen( nParagraph ) : 0;
@@ -1014,7 +1014,7 @@ String SmTextForwarder::GetText( const ESelection& rSel ) const
return aRet;
}
-SfxItemSet SmTextForwarder::GetAttribs( const ESelection& rSel, BOOL bOnlyHardAttrib ) const
+SfxItemSet SmTextForwarder::GetAttribs( const ESelection& rSel, sal_Bool bOnlyHardAttrib ) const
{
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
OSL_ENSURE( pEditEngine, "EditEngine missing" );
@@ -1044,17 +1044,17 @@ SfxItemSet SmTextForwarder::GetAttribs( const ESelection& rSel, BOOL bOnlyHardAt
}
}
-SfxItemSet SmTextForwarder::GetParaAttribs( USHORT nPara ) const
+SfxItemSet SmTextForwarder::GetParaAttribs( sal_uInt16 nPara ) const
{
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
OSL_ENSURE( pEditEngine, "EditEngine missing" );
SfxItemSet aSet( pEditEngine->GetParaAttribs( nPara ) );
- USHORT nWhich = EE_PARA_START;
+ sal_uInt16 nWhich = EE_PARA_START;
while( nWhich <= EE_PARA_END )
{
- if( aSet.GetItemState( nWhich, TRUE ) != SFX_ITEM_ON )
+ if( aSet.GetItemState( nWhich, sal_True ) != SFX_ITEM_ON )
{
if( pEditEngine->HasParaAttrib( nPara, nWhich ) )
aSet.Put( pEditEngine->GetParaAttrib( nPara, nWhich ) );
@@ -1065,7 +1065,7 @@ SfxItemSet SmTextForwarder::GetParaAttribs( USHORT nPara ) const
return aSet;
}
-void SmTextForwarder::SetParaAttribs( USHORT nPara, const SfxItemSet& rSet )
+void SmTextForwarder::SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rSet )
{
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
if (pEditEngine)
@@ -1085,7 +1085,7 @@ void SmTextForwarder::RemoveAttribs( const ESelection& rSelection, sal_Bool bRem
pEditEngine->RemoveAttribs( rSelection, bRemoveParaAttribs, nWhich );
}
-void SmTextForwarder::GetPortions( USHORT nPara, SvUShorts& rList ) const
+void SmTextForwarder::GetPortions( sal_uInt16 nPara, SvUShorts& rList ) const
{
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
if (pEditEngine)
@@ -1120,15 +1120,15 @@ void SmTextForwarder::QuickSetAttribs( const SfxItemSet& rSet, const ESelection&
pEditEngine->QuickSetAttribs( rSet, rSel );
}
-BOOL SmTextForwarder::IsValid() const
+sal_Bool SmTextForwarder::IsValid() const
{
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
// cannot reliably query EditEngine state
// while in the middle of an update
- return pEditEngine ? pEditEngine->GetUpdateMode() : FALSE;
+ return pEditEngine ? pEditEngine->GetUpdateMode() : sal_False;
}
-XubString SmTextForwarder::CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, USHORT nPos, Color*& rpTxtColor, Color*& rpFldColor )
+XubString SmTextForwarder::CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos, Color*& rpTxtColor, Color*& rpFldColor )
{
XubString aTxt;
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
@@ -1137,11 +1137,11 @@ XubString SmTextForwarder::CalcFieldValue( const SvxFieldItem& rField, USHORT nP
return aTxt;
}
-void SmTextForwarder::FieldClicked(const SvxFieldItem&, USHORT, USHORT)
+void SmTextForwarder::FieldClicked(const SvxFieldItem&, sal_uInt16, sal_uInt16)
{
}
-USHORT GetSvxEditEngineItemState( EditEngine& rEditEngine, const ESelection& rSel, USHORT nWhich )
+sal_uInt16 GetSvxEditEngineItemState( EditEngine& rEditEngine, const ESelection& rSel, sal_uInt16 nWhich )
{
EECharAttribArray aAttribs;
@@ -1150,16 +1150,16 @@ USHORT GetSvxEditEngineItemState( EditEngine& rEditEngine, const ESelection& rSe
SfxItemState eState = SFX_ITEM_DEFAULT;
// check all paragraphs inside the selection
- for( USHORT nPara = rSel.nStartPara; nPara <= rSel.nEndPara; nPara++ )
+ for( sal_uInt16 nPara = rSel.nStartPara; nPara <= rSel.nEndPara; nPara++ )
{
SfxItemState eParaState = SFX_ITEM_DEFAULT;
// calculate start and endpos for this paragraph
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
if( rSel.nStartPara == nPara )
nPos = rSel.nStartPos;
- USHORT nEndPos = rSel.nEndPos;
+ sal_uInt16 nEndPos = rSel.nEndPos;
if( rSel.nEndPara != nPara )
nEndPos = rEditEngine.GetTextLen( nPara );
@@ -1169,11 +1169,11 @@ USHORT GetSvxEditEngineItemState( EditEngine& rEditEngine, const ESelection& rSe
bool bEmpty = true; // we found no item inside the selektion of this paragraph
bool bGaps = false; // we found items but theire gaps between them
- USHORT nLastEnd = nPos;
+ sal_uInt16 nLastEnd = nPos;
const SfxPoolItem* pParaItem = NULL;
- for( USHORT nAttrib = 0; nAttrib < aAttribs.Count(); nAttrib++ )
+ for( sal_uInt16 nAttrib = 0; nAttrib < aAttribs.Count(); nAttrib++ )
{
struct EECharAttrib aAttrib = aAttribs.GetObject( nAttrib );
OSL_ENSURE( aAttrib.pAttr, "GetCharAttribs gives corrupt data" );
@@ -1234,18 +1234,18 @@ USHORT GetSvxEditEngineItemState( EditEngine& rEditEngine, const ESelection& rSe
return eState;
}
-USHORT SmTextForwarder::GetItemState( const ESelection& rSel, USHORT nWhich ) const
+sal_uInt16 SmTextForwarder::GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const
{
- USHORT nState = SFX_ITEM_DISABLED;
+ sal_uInt16 nState = SFX_ITEM_DISABLED;
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
if (pEditEngine)
nState = GetSvxEditEngineItemState( *pEditEngine, rSel, nWhich );
return nState;
}
-USHORT SmTextForwarder::GetItemState( USHORT nPara, USHORT nWhich ) const
+sal_uInt16 SmTextForwarder::GetItemState( sal_uInt16 nPara, sal_uInt16 nWhich ) const
{
- USHORT nState = SFX_ITEM_DISABLED;
+ sal_uInt16 nState = SFX_ITEM_DISABLED;
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
if (pEditEngine)
{
@@ -1255,30 +1255,30 @@ USHORT SmTextForwarder::GetItemState( USHORT nPara, USHORT nWhich ) const
return nState;
}
-LanguageType SmTextForwarder::GetLanguage( USHORT nPara, USHORT nIndex ) const
+LanguageType SmTextForwarder::GetLanguage( sal_uInt16 nPara, sal_uInt16 nIndex ) const
{
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
return pEditEngine ? pEditEngine->GetLanguage(nPara, nIndex) : LANGUAGE_NONE;
}
-USHORT SmTextForwarder::GetFieldCount( USHORT nPara ) const
+sal_uInt16 SmTextForwarder::GetFieldCount( sal_uInt16 nPara ) const
{
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
return pEditEngine ? pEditEngine->GetFieldCount(nPara) : 0;
}
-EFieldInfo SmTextForwarder::GetFieldInfo( USHORT nPara, USHORT nField ) const
+EFieldInfo SmTextForwarder::GetFieldInfo( sal_uInt16 nPara, sal_uInt16 nField ) const
{
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
return pEditEngine ? pEditEngine->GetFieldInfo( nPara, nField ) : EFieldInfo();
}
-EBulletInfo SmTextForwarder::GetBulletInfo( USHORT /*nPara*/ ) const
+EBulletInfo SmTextForwarder::GetBulletInfo( sal_uInt16 /*nPara*/ ) const
{
return EBulletInfo();
}
-Rectangle SmTextForwarder::GetCharBounds( USHORT nPara, USHORT nIndex ) const
+Rectangle SmTextForwarder::GetCharBounds( sal_uInt16 nPara, sal_uInt16 nIndex ) const
{
Rectangle aRect(0,0,0,0);
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
@@ -1302,7 +1302,7 @@ Rectangle SmTextForwarder::GetCharBounds( USHORT nPara, USHORT nIndex ) const
return aRect;
}
-Rectangle SmTextForwarder::GetParaBounds( USHORT nPara ) const
+Rectangle SmTextForwarder::GetParaBounds( sal_uInt16 nPara ) const
{
Rectangle aRect(0,0,0,0);
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
@@ -1310,8 +1310,8 @@ Rectangle SmTextForwarder::GetParaBounds( USHORT nPara ) const
if (pEditEngine)
{
const Point aPnt = pEditEngine->GetDocPosTopLeft( nPara );
- const ULONG nWidth = pEditEngine->CalcTextWidth();
- const ULONG nHeight = pEditEngine->GetTextHeight( nPara );
+ const sal_uLong nWidth = pEditEngine->CalcTextWidth();
+ const sal_uLong nHeight = pEditEngine->GetTextHeight( nPara );
aRect = Rectangle( aPnt.X(), aPnt.Y(), aPnt.X() + nWidth, aPnt.Y() + nHeight );
}
@@ -1330,7 +1330,7 @@ OutputDevice* SmTextForwarder::GetRefDevice() const
return pEditEngine ? pEditEngine->GetRefDevice() : 0;
}
-sal_Bool SmTextForwarder::GetIndexAtPoint( const Point& rPos, USHORT& nPara, USHORT& nIndex ) const
+sal_Bool SmTextForwarder::GetIndexAtPoint( const Point& rPos, sal_uInt16& nPara, sal_uInt16& nIndex ) const
{
sal_Bool bRes = sal_False;
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
@@ -1344,7 +1344,7 @@ sal_Bool SmTextForwarder::GetIndexAtPoint( const Point& rPos, USHORT& nPara, USH
return bRes;
}
-sal_Bool SmTextForwarder::GetWordIndices( USHORT nPara, USHORT nIndex, USHORT& nStart, USHORT& nEnd ) const
+sal_Bool SmTextForwarder::GetWordIndices( sal_uInt16 nPara, sal_uInt16 nIndex, sal_uInt16& nStart, sal_uInt16& nEnd ) const
{
sal_Bool bRes = sal_False;
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
@@ -1365,7 +1365,7 @@ sal_Bool SmTextForwarder::GetWordIndices( USHORT nPara, USHORT nIndex, USHORT& n
return bRes;
}
-sal_Bool SmTextForwarder::GetAttributeRun( USHORT& nStartIndex, USHORT& nEndIndex, USHORT nPara, USHORT nIndex ) const
+sal_Bool SmTextForwarder::GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_uInt16 nPara, sal_uInt16 nIndex ) const
{
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
return pEditEngine ?
@@ -1373,31 +1373,31 @@ sal_Bool SmTextForwarder::GetAttributeRun( USHORT& nStartIndex, USHORT& nEndInde
: sal_False;
}
-USHORT SmTextForwarder::GetLineCount( USHORT nPara ) const
+sal_uInt16 SmTextForwarder::GetLineCount( sal_uInt16 nPara ) const
{
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
return pEditEngine ? pEditEngine->GetLineCount(nPara) : 0;
}
-USHORT SmTextForwarder::GetLineLen( USHORT nPara, USHORT nLine ) const
+sal_uInt16 SmTextForwarder::GetLineLen( sal_uInt16 nPara, sal_uInt16 nLine ) const
{
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
return pEditEngine ? pEditEngine->GetLineLen(nPara, nLine) : 0;
}
-void SmTextForwarder::GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nPara, USHORT nLine ) const
+void SmTextForwarder::GetLineBoundaries( /*out*/sal_uInt16 &rStart, /*out*/sal_uInt16 &rEnd, sal_uInt16 nPara, sal_uInt16 nLine ) const
{
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
pEditEngine->GetLineBoundaries(rStart, rEnd, nPara, nLine);
}
-USHORT SmTextForwarder::GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const
+sal_uInt16 SmTextForwarder::GetLineNumberAtIndex( sal_uInt16 nPara, sal_uInt16 nIndex ) const
{
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
return pEditEngine ? pEditEngine->GetLineNumberAtIndex(nPara, nIndex) : 0;
}
-sal_Bool SmTextForwarder::QuickFormatDoc( BOOL /*bFull*/ )
+sal_Bool SmTextForwarder::QuickFormatDoc( sal_Bool /*bFull*/ )
{
sal_Bool bRes = sal_False;
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
@@ -1409,13 +1409,13 @@ sal_Bool SmTextForwarder::QuickFormatDoc( BOOL /*bFull*/ )
return bRes;
}
-sal_Int16 SmTextForwarder::GetDepth( USHORT /*nPara*/ ) const
+sal_Int16 SmTextForwarder::GetDepth( sal_uInt16 /*nPara*/ ) const
{
// math has no outliner...
return -1;
}
-sal_Bool SmTextForwarder::SetDepth( USHORT /*nPara*/, sal_Int16 nNewDepth )
+sal_Bool SmTextForwarder::SetDepth( sal_uInt16 /*nPara*/, sal_Int16 nNewDepth )
{
// math has no outliner...
return -1 == nNewDepth; // is it the value from 'GetDepth' ?
@@ -1464,12 +1464,12 @@ void SmTextForwarder::AppendParagraph()
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
if (pEditEngine)
{
- USHORT nParaCount = pEditEngine->GetParagraphCount();
+ sal_uInt16 nParaCount = pEditEngine->GetParagraphCount();
pEditEngine->InsertParagraph( nParaCount, String() );
}
}
-xub_StrLen SmTextForwarder::AppendTextPortion( USHORT nPara, const String &rText, const SfxItemSet &rSet )
+xub_StrLen SmTextForwarder::AppendTextPortion( sal_uInt16 nPara, const String &rText, const SfxItemSet &rSet )
{
xub_StrLen nRes = 0;
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
@@ -1513,7 +1513,7 @@ SmEditViewForwarder::~SmEditViewForwarder()
{
}
-BOOL SmEditViewForwarder::IsValid() const
+sal_Bool SmEditViewForwarder::IsValid() const
{
return rEditAcc.GetEditView() != 0;
}
@@ -1860,8 +1860,8 @@ sal_Int32 SAL_CALL SmEditAccessible::getAccessibleIndexInParent( )
Window *pAccParent = pWin ? pWin->GetAccessibleParentWindow() : 0;
if (pAccParent)
{
- USHORT nCnt = pAccParent->GetAccessibleChildWindowCount();
- for (USHORT i = 0; i < nCnt && nIdx == -1; ++i)
+ sal_uInt16 nCnt = pAccParent->GetAccessibleChildWindowCount();
+ for (sal_uInt16 i = 0; i < nCnt && nIdx == -1; ++i)
if (pAccParent->GetAccessibleChildWindow( i ) == pWin)
nIdx = i;
}
diff --git a/starmath/source/accessibility.hxx b/starmath/source/accessibility.hxx
index a0cb663d0839..a6b682b706fb 100644
--- a/starmath/source/accessibility.hxx
+++ b/starmath/source/accessibility.hxx
@@ -188,7 +188,7 @@ public:
SmViewForwarder( SmEditAccessible &rAcc );
virtual ~SmViewForwarder();
- virtual BOOL IsValid() const;
+ virtual sal_Bool IsValid() const;
virtual Rectangle GetVisArea() const;
virtual Point LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const;
virtual Point PixelToLogic( const Point& rPoint, const MapMode& rMapMode ) const;
@@ -211,17 +211,17 @@ public:
SmTextForwarder( SmEditAccessible& rAcc, SmEditSource & rSource );
virtual ~SmTextForwarder();
- virtual USHORT GetParagraphCount() const;
- virtual USHORT GetTextLen( USHORT nParagraph ) const;
+ virtual sal_uInt16 GetParagraphCount() const;
+ virtual sal_uInt16 GetTextLen( sal_uInt16 nParagraph ) const;
virtual String GetText( const ESelection& rSel ) const;
- virtual SfxItemSet GetAttribs( const ESelection& rSel, BOOL bOnlyHardAttrib = EditEngineAttribs_All ) const;
- virtual SfxItemSet GetParaAttribs( USHORT nPara ) const;
- virtual void SetParaAttribs( USHORT nPara, const SfxItemSet& rSet );
+ virtual SfxItemSet GetAttribs( const ESelection& rSel, sal_Bool bOnlyHardAttrib = EditEngineAttribs_All ) const;
+ virtual SfxItemSet GetParaAttribs( sal_uInt16 nPara ) const;
+ virtual void SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rSet );
virtual void RemoveAttribs( const ESelection& rSelection, sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich );
- virtual void GetPortions( USHORT nPara, SvUShorts& rList ) const;
+ virtual void GetPortions( sal_uInt16 nPara, SvUShorts& rList ) const;
- virtual USHORT GetItemState( const ESelection& rSel, USHORT nWhich ) const;
- virtual USHORT GetItemState( USHORT nPara, USHORT nWhich ) const;
+ virtual sal_uInt16 GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const;
+ virtual sal_uInt16 GetItemState( sal_uInt16 nPara, sal_uInt16 nWhich ) const;
virtual void QuickInsertText( const String& rText, const ESelection& rSel );
virtual void QuickInsertField( const SvxFieldItem& rFld, const ESelection& rSel );
@@ -230,36 +230,36 @@ public:
virtual SfxItemPool* GetPool() const;
- virtual XubString CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, USHORT nPos, Color*& rpTxtColor, Color*& rpFldColor );
- virtual void FieldClicked(const SvxFieldItem&, USHORT, USHORT);
- virtual BOOL IsValid() const;
+ virtual XubString CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos, Color*& rpTxtColor, Color*& rpFldColor );
+ virtual void FieldClicked(const SvxFieldItem&, sal_uInt16, sal_uInt16);
+ virtual sal_Bool IsValid() const;
- virtual LanguageType GetLanguage( USHORT, USHORT ) const;
- virtual USHORT GetFieldCount( USHORT nPara ) const;
- virtual EFieldInfo GetFieldInfo( USHORT nPara, USHORT nField ) const;
- virtual EBulletInfo GetBulletInfo( USHORT nPara ) const;
- virtual Rectangle GetCharBounds( USHORT nPara, USHORT nIndex ) const;
- virtual Rectangle GetParaBounds( USHORT nPara ) const;
+ virtual LanguageType GetLanguage( sal_uInt16, sal_uInt16 ) const;
+ virtual sal_uInt16 GetFieldCount( sal_uInt16 nPara ) const;
+ virtual EFieldInfo GetFieldInfo( sal_uInt16 nPara, sal_uInt16 nField ) const;
+ virtual EBulletInfo GetBulletInfo( sal_uInt16 nPara ) const;
+ virtual Rectangle GetCharBounds( sal_uInt16 nPara, sal_uInt16 nIndex ) const;
+ virtual Rectangle GetParaBounds( sal_uInt16 nPara ) const;
virtual MapMode GetMapMode() const;
virtual OutputDevice* GetRefDevice() const;
- virtual sal_Bool GetIndexAtPoint( const Point&, USHORT& nPara, USHORT& nIndex ) const;
- virtual sal_Bool GetWordIndices( USHORT nPara, USHORT nIndex, USHORT& nStart, USHORT& nEnd ) const;
- virtual sal_Bool GetAttributeRun( USHORT& nStartIndex, USHORT& nEndIndex, USHORT nPara, USHORT nIndex ) const;
- virtual USHORT GetLineCount( USHORT nPara ) const;
- virtual USHORT GetLineLen( USHORT nPara, USHORT nLine ) const;
- virtual void GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nParagraph, USHORT nLine ) const;
- virtual USHORT GetLineNumberAtIndex( USHORT nPara, USHORT nLine ) const;
+ virtual sal_Bool GetIndexAtPoint( const Point&, sal_uInt16& nPara, sal_uInt16& nIndex ) const;
+ virtual sal_Bool GetWordIndices( sal_uInt16 nPara, sal_uInt16 nIndex, sal_uInt16& nStart, sal_uInt16& nEnd ) const;
+ virtual sal_Bool GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_uInt16 nPara, sal_uInt16 nIndex ) const;
+ virtual sal_uInt16 GetLineCount( sal_uInt16 nPara ) const;
+ virtual sal_uInt16 GetLineLen( sal_uInt16 nPara, sal_uInt16 nLine ) const;
+ virtual void GetLineBoundaries( /*out*/sal_uInt16 &rStart, /*out*/sal_uInt16 &rEnd, sal_uInt16 nParagraph, sal_uInt16 nLine ) const;
+ virtual sal_uInt16 GetLineNumberAtIndex( sal_uInt16 nPara, sal_uInt16 nLine ) const;
virtual sal_Bool Delete( const ESelection& );
virtual sal_Bool InsertText( const String&, const ESelection& );
- virtual sal_Bool QuickFormatDoc( BOOL bFull=FALSE );
+ virtual sal_Bool QuickFormatDoc( sal_Bool bFull=sal_False );
- virtual sal_Int16 GetDepth( USHORT nPara ) const;
- virtual sal_Bool SetDepth( USHORT nPara, sal_Int16 nNewDepth );
+ virtual sal_Int16 GetDepth( sal_uInt16 nPara ) const;
+ virtual sal_Bool SetDepth( sal_uInt16 nPara, sal_Int16 nNewDepth );
virtual const SfxItemSet* GetEmptyItemSetPtr();
// implementation functions for XParagraphAppend and XTextPortionAppend
virtual void AppendParagraph();
- virtual xub_StrLen AppendTextPortion( USHORT nPara, const String &rText, const SfxItemSet &rSet );
+ virtual xub_StrLen AppendTextPortion( sal_uInt16 nPara, const String &rText, const SfxItemSet &rSet );
virtual void CopyText(const SvxTextForwarder& rSource);
};
@@ -278,7 +278,7 @@ public:
SmEditViewForwarder( SmEditAccessible& rAcc );
virtual ~SmEditViewForwarder();
- virtual BOOL IsValid() const;
+ virtual sal_Bool IsValid() const;
virtual Rectangle GetVisArea() const;
virtual Point LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const;
diff --git a/starmath/source/cfgitem.cxx b/starmath/source/cfgitem.cxx
index d019a98118e9..89c42aa68731 100644
--- a/starmath/source/cfgitem.cxx
+++ b/starmath/source/cfgitem.cxx
@@ -50,8 +50,6 @@ static const char* aRootName = "Office.Math";
#define SYMBOL_LIST "SymbolList"
#define FONT_FORMAT_LIST "FontFormatList"
-SV_IMPL_OBJARR( SmFntFmtListEntryArr, SmFntFmtListEntry );
-
/////////////////////////////////////////////////////////////////
@@ -72,7 +70,7 @@ static Sequence< OUString > lcl_GetFontPropertyNames()
Sequence< OUString > aNames( 6 );
OUString *pNames = aNames.getArray();
- for( INT32 i = 0; *ppPropName; ++i, ++ppPropName )
+ for( sal_Int32 i = 0; *ppPropName; ++i, ++ppPropName )
{
pNames[i] = A2OU( *ppPropName );
}
@@ -97,7 +95,7 @@ static Sequence< OUString > lcl_GetSymbolPropertyNames()
Sequence< OUString > aNames( 4 );
OUString *pNames = aNames.getArray();
- for( INT32 i = 0; *ppPropName; ++i, ++ppPropName )
+ for( sal_Int32 i = 0; *ppPropName; ++i, ++ppPropName )
{
pNames[i] = A2OU( *ppPropName );
}
@@ -113,6 +111,8 @@ static const char * aMathPropNames[] =
"Print/Frame",
"Print/Size",
"Print/ZoomFactor",
+ "LoadSave/IsSaveOnlyUsedSymbols",
+ //"Misc/NoSymbolsWarning", @deprecated
"Misc/IgnoreSpacesRight",
"View/ToolboxVisible",
"View/AutoRedraw",
@@ -169,14 +169,14 @@ static const char * aFormatPropNames[] =
static Sequence< OUString > lcl_GetPropertyNames(
- const char * aPropNames[], USHORT nCount )
+ const char * aPropNames[], sal_uInt16 nCount )
{
const char** ppPropName = aPropNames;
Sequence< OUString > aNames( nCount );
OUString *pNames = aNames.getArray();
- for (INT32 i = 0; i < nCount; ++i, ++ppPropName)
+ for (sal_Int32 i = 0; i < nCount; ++i, ++ppPropName)
{
pNames[i] = A2OU( *ppPropName );
}
@@ -186,14 +186,14 @@ static Sequence< OUString > lcl_GetPropertyNames(
static Sequence< OUString > GetFormatPropertyNames()
{
- USHORT nCnt = SAL_N_ELEMENTS(aFormatPropNames);
+ sal_uInt16 nCnt = SAL_N_ELEMENTS(aFormatPropNames);
return lcl_GetPropertyNames( aFormatPropNames, nCnt );
}
static Sequence< OUString > GetOtherPropertyNames()
{
- USHORT nCnt = SAL_N_ELEMENTS(aMathPropNames);
+ sal_uInt16 nCnt = SAL_N_ELEMENTS(aMathPropNames);
return lcl_GetPropertyNames( aMathPropNames, nCnt );
}
@@ -202,14 +202,16 @@ static Sequence< OUString > GetOtherPropertyNames()
struct SmCfgOther
{
SmPrintSize ePrintSize;
- USHORT nPrintZoomFactor;
+ sal_uInt16 nPrintZoomFactor;
bool bPrintTitle;
bool bPrintFormulaText;
bool bPrintFrame;
+ bool bIsSaveOnlyUsedSymbols;
bool bIgnoreSpacesRight;
bool bToolboxVisible;
bool bAutoRedraw;
bool bFormulaCursor;
+ //sal_Bool bNoSymbolsWarning;
SmCfgOther();
};
@@ -222,7 +224,7 @@ SmCfgOther::SmCfgOther()
bPrintTitle = bPrintFormulaText =
bPrintFrame = bIgnoreSpacesRight =
bToolboxVisible = bAutoRedraw =
- bFormulaCursor = true;
+ bFormulaCursor = bIsSaveOnlyUsedSymbols = true;
}
/////////////////////////////////////////////////////////////////
@@ -242,11 +244,11 @@ SmFontFormat::SmFontFormat()
SmFontFormat::SmFontFormat( const Font &rFont )
{
aName = rFont.GetName();
- nCharSet = (INT16) rFont.GetCharSet();
- nFamily = (INT16) rFont.GetFamily();
- nPitch = (INT16) rFont.GetPitch();
- nWeight = (INT16) rFont.GetWeight();
- nItalic = (INT16) rFont.GetItalic();
+ nCharSet = (sal_Int16) rFont.GetCharSet();
+ nFamily = (sal_Int16) rFont.GetFamily();
+ nPitch = (sal_Int16) rFont.GetPitch();
+ nWeight = (sal_Int16) rFont.GetWeight();
+ nItalic = (sal_Int16) rFont.GetItalic();
}
@@ -291,10 +293,9 @@ SmFontFormatList::SmFontFormatList()
void SmFontFormatList::Clear()
{
- USHORT nCnt = aEntries.Count();
- if (nCnt)
+ if (!aEntries.empty())
{
- aEntries.Remove( 0, nCnt );
+ aEntries.clear();
SetModified( true );
}
}
@@ -308,7 +309,7 @@ void SmFontFormatList::AddFontFormat( const String &rFntFmtId,
if (!pFntFmt)
{
SmFntFmtListEntry aEntry( rFntFmtId, rFntFmt );
- aEntries.Insert( aEntry, aEntries.Count() );
+ aEntries.push_back( aEntry );
SetModified( true );
}
}
@@ -316,35 +317,32 @@ void SmFontFormatList::AddFontFormat( const String &rFntFmtId,
void SmFontFormatList::RemoveFontFormat( const String &rFntFmtId )
{
- USHORT nPos = 0xFFFF;
// search for entry
- USHORT nCnt = aEntries.Count();
- for (USHORT i = 0; i < nCnt && nPos == 0xFFFF; ++i)
+ for (size_t i = 0; i < aEntries.size(); ++i)
{
if (aEntries[i].aId == rFntFmtId)
- nPos = i;
- }
-
- // remove entry if found
- if (nPos != 0xFFFF)
- {
- aEntries.Remove( nPos );
- SetModified( true );
+ {
+ // remove entry if found
+ aEntries.erase( aEntries.begin() + i );
+ SetModified( true );
+ break;
+ }
}
}
const SmFontFormat * SmFontFormatList::GetFontFormat( const String &rFntFmtId ) const
{
- SmFontFormat *pRes = 0;
+ const SmFontFormat *pRes = 0;
- USHORT nCnt = aEntries.Count();
- USHORT i;
- for (i = 0; i < nCnt && !pRes; ++i)
+ for (size_t i = 0; i < aEntries.size(); ++i)
{
if (aEntries[i].aId == rFntFmtId)
+ {
pRes = &aEntries[i].aFntFmt;
+ break;
+ }
}
return pRes;
@@ -352,11 +350,11 @@ const SmFontFormat * SmFontFormatList::GetFontFormat( const String &rFntFmtId )
-const SmFontFormat * SmFontFormatList::GetFontFormat( USHORT nPos ) const
+const SmFontFormat * SmFontFormatList::GetFontFormat( size_t nPos ) const
{
- SmFontFormat *pRes = 0;
- if (nPos < aEntries.Count())
- pRes = &aEntries[ nPos ].aFntFmt;
+ const SmFontFormat *pRes = 0;
+ if (nPos < aEntries.size())
+ pRes = &aEntries[nPos].aFntFmt;
return pRes;
}
@@ -365,12 +363,13 @@ const String SmFontFormatList::GetFontFormatId( const SmFontFormat &rFntFmt ) co
{
String aRes;
- USHORT nCnt = aEntries.Count();
- USHORT i;
- for (i = 0; i < nCnt && 0 == aRes.Len(); ++i)
+ for (size_t i = 0; i < aEntries.size(); ++i)
{
if (aEntries[i].aFntFmt == rFntFmt)
+ {
aRes = aEntries[i].aId;
+ break;
+ }
}
return aRes;
@@ -389,10 +388,10 @@ const String SmFontFormatList::GetFontFormatId( const SmFontFormat &rFntFmt, boo
}
-const String SmFontFormatList::GetFontFormatId( USHORT nPos ) const
+const String SmFontFormatList::GetFontFormatId( size_t nPos ) const
{
String aRes;
- if (nPos < aEntries.Count())
+ if (nPos < aEntries.size())
aRes = aEntries[nPos].aId;
return aRes;
}
@@ -405,13 +404,16 @@ const String SmFontFormatList::GetNewFontFormatId() const
String aRes;
String aPrefix( RTL_CONSTASCII_USTRINGPARAM( "Id" ) );
- INT32 nCnt = GetCount();
- for (INT32 i = 1; i <= nCnt + 1 && 0 == aRes.Len(); ++i)
+ sal_Int32 nCnt = GetCount();
+ for (sal_Int32 i = 1; i <= nCnt + 1; ++i)
{
String aTmpId( aPrefix );
aTmpId += String::CreateFromInt32( i );
if (!GetFontFormat( aTmpId ))
+ {
aRes = aTmpId;
+ break;
+ }
}
OSL_ENSURE( 0 != aRes.Len(), "failed to create new FontFormatId" );
@@ -466,11 +468,11 @@ void SmMathConfig::ReadSymbol( SmSym &rSymbol,
const rtl::OUString &rBaseNode ) const
{
Sequence< OUString > aNames = lcl_GetSymbolPropertyNames();
- INT32 nProps = aNames.getLength();
+ sal_Int32 nProps = aNames.getLength();
OUString aDelim( OUString::valueOf( (sal_Unicode) '/' ) );
OUString *pName = aNames.getArray();
- for (INT32 i = 0; i < nProps; ++i)
+ for (sal_Int32 i = 0; i < nProps; ++i)
{
OUString &rName = pName[i];
OUString aTmp( rName );
@@ -487,17 +489,17 @@ void SmMathConfig::ReadSymbol( SmSym &rSymbol,
{
const Any * pValue = aValues.getConstArray();
Font aFont;
- sal_Unicode cChar = '\0';
+ sal_UCS4 cChar = '\0';
String aSet;
bool bPredefined = false;
OUString aTmpStr;
- INT32 nTmp32 = 0;
+ sal_Int32 nTmp32 = 0;
bool bTmp = false;
bool bOK = true;
if (pValue->hasValue() && (*pValue >>= nTmp32))
- cChar = (sal_Unicode) nTmp32;
+ cChar = static_cast< sal_UCS4 >( nTmp32 );
else
bOK = false;
++pValue;
@@ -580,7 +582,7 @@ void SmMathConfig::GetSymbols( std::vector< SmSym > &rSymbols ) const
{
Sequence< OUString > aNodes( ((SmMathConfig*) this)->GetNodeNames( A2OU( SYMBOL_LIST ) ) );
const OUString *pNode = aNodes.getConstArray();
- INT32 nNodes = aNodes.getLength();
+ sal_Int32 nNodes = aNodes.getLength();
rSymbols.resize( nNodes );
std::vector< SmSym >::iterator aIt( rSymbols.begin() );
@@ -598,7 +600,7 @@ void SmMathConfig::SetSymbols( const std::vector< SmSym > &rNewSymbols )
Sequence< OUString > aNames = lcl_GetSymbolPropertyNames();
const OUString *pNames = aNames.getConstArray();
- sal_uIntPtr nSymbolProps = sal::static_int_cast< UINT32 >(aNames.getLength());
+ sal_uIntPtr nSymbolProps = sal::static_int_cast< sal_uInt32 >(aNames.getLength());
Sequence< PropertyValue > aValues( nCount * nSymbolProps );
PropertyValue *pValues = aValues.getArray();
@@ -620,7 +622,7 @@ void SmMathConfig::SetSymbols( const std::vector< SmSym > &rNewSymbols )
// Char
pVal->Name = aNodeNameDelim;
pVal->Name += *pName++;
- pVal->Value <<= (INT32) rSymbol.GetCharacter();
+ pVal->Value <<= static_cast< sal_UCS4 >( rSymbol.GetCharacter() );
pVal++;
// Set
pVal->Name = aNodeNameDelim;
@@ -633,7 +635,7 @@ void SmMathConfig::SetSymbols( const std::vector< SmSym > &rNewSymbols )
// Predefined
pVal->Name = aNodeNameDelim;
pVal->Name += *pName++;
- pVal->Value <<= (BOOL) rSymbol.IsPredefined();
+ pVal->Value <<= (sal_Bool) rSymbol.IsPredefined();
pVal++;
// FontFormatId
SmFontFormat aFntFmt( rSymbol.GetFace() );
@@ -671,9 +673,9 @@ void SmMathConfig::LoadFontFormatList()
Sequence< OUString > aNodes( GetNodeNames( A2OU( FONT_FORMAT_LIST ) ) );
const OUString *pNode = aNodes.getConstArray();
- INT32 nNodes = aNodes.getLength();
+ sal_Int32 nNodes = aNodes.getLength();
- for (INT32 i = 0; i < nNodes; ++i)
+ for (sal_Int32 i = 0; i < nNodes; ++i)
{
SmFontFormat aFntFmt;
ReadFontFormat( aFntFmt, pNode[i], A2OU( FONT_FORMAT_LIST ) );
@@ -692,11 +694,11 @@ void SmMathConfig::ReadFontFormat( SmFontFormat &rFontFormat,
const OUString &rSymbolName, const OUString &rBaseNode ) const
{
Sequence< OUString > aNames = lcl_GetFontPropertyNames();
- INT32 nProps = aNames.getLength();
+ sal_Int32 nProps = aNames.getLength();
OUString aDelim( OUString::valueOf( (sal_Unicode) '/' ) );
OUString *pName = aNames.getArray();
- for (INT32 i = 0; i < nProps; ++i)
+ for (sal_Int32 i = 0; i < nProps; ++i)
{
OUString &rName = pName[i];
OUString aTmp( rName );
@@ -714,7 +716,7 @@ void SmMathConfig::ReadFontFormat( SmFontFormat &rFontFormat,
const Any * pValue = aValues.getConstArray();
OUString aTmpStr;
- INT16 nTmp16 = 0;
+ sal_Int16 nTmp16 = 0;
bool bOK = true;
if (pValue->hasValue() && (*pValue >>= aTmpStr))
@@ -762,16 +764,16 @@ void SmMathConfig::SaveFontFormatList()
return;
Sequence< OUString > aNames = lcl_GetFontPropertyNames();
- INT32 nSymbolProps = aNames.getLength();
+ sal_Int32 nSymbolProps = aNames.getLength();
- USHORT nCount = rFntFmtList.GetCount();
+ size_t nCount = rFntFmtList.GetCount();
Sequence< PropertyValue > aValues( nCount * nSymbolProps );
PropertyValue *pValues = aValues.getArray();
PropertyValue *pVal = pValues;
OUString aDelim( OUString::valueOf( (sal_Unicode) '/' ) );
- for (USHORT i = 0; i < nCount; ++i)
+ for (size_t i = 0; i < nCount; ++i)
{
String aFntFmtId( rFntFmtList.GetFontFormatId( i ) );
const SmFontFormat aFntFmt( *rFntFmtList.GetFontFormat( aFntFmtId ) );
@@ -791,27 +793,27 @@ void SmMathConfig::SaveFontFormatList()
// CharSet
pVal->Name = aNodeNameDelim;
pVal->Name += *pName++;
- pVal->Value <<= (INT16) aFntFmt.nCharSet; // 6.0 file-format GetSOStoreTextEncoding not needed
+ pVal->Value <<= (sal_Int16) aFntFmt.nCharSet; // 6.0 file-format GetSOStoreTextEncoding not needed
pVal++;
// Family
pVal->Name = aNodeNameDelim;
pVal->Name += *pName++;
- pVal->Value <<= (INT16) aFntFmt.nFamily;
+ pVal->Value <<= (sal_Int16) aFntFmt.nFamily;
pVal++;
// Pitch
pVal->Name = aNodeNameDelim;
pVal->Name += *pName++;
- pVal->Value <<= (INT16) aFntFmt.nPitch;
+ pVal->Value <<= (sal_Int16) aFntFmt.nPitch;
pVal++;
// Weight
pVal->Name = aNodeNameDelim;
pVal->Name += *pName++;
- pVal->Value <<= (INT16) aFntFmt.nWeight;
+ pVal->Value <<= (sal_Int16) aFntFmt.nWeight;
pVal++;
// Italic
pVal->Name = aNodeNameDelim;
pVal->Name += *pName++;
- pVal->Value <<= (INT16) aFntFmt.nItalic;
+ pVal->Value <<= (sal_Int16) aFntFmt.nItalic;
pVal++;
}
OSL_ENSURE( pVal - pValues == nCount * nSymbolProps, "properties missing" );
@@ -823,13 +825,12 @@ void SmMathConfig::SaveFontFormatList()
void SmMathConfig::StripFontFormatList( const std::vector< SmSym > &rSymbols )
{
- size_t nCount = rSymbols.size();
- USHORT i;
+ size_t i;
// build list of used font-formats only
//!! font-format IDs may be different !!
SmFontFormatList aUsedList;
- for (i = 0; i < nCount; ++i)
+ for (i = 0; i < rSymbols.size(); ++i)
{
OSL_ENSURE( rSymbols[i].GetName().Len() > 0, "non named symbol" );
aUsedList.GetFontFormatId( SmFontFormat( rSymbols[i].GetFace() ) , true );
@@ -842,14 +843,14 @@ void SmMathConfig::StripFontFormatList( const std::vector< SmSym > &rSymbols )
// remove unused font-formats from list
SmFontFormatList &rFntFmtList = GetFontFormatList();
- USHORT nCnt = rFntFmtList.GetCount();
+ size_t nCnt = rFntFmtList.GetCount();
SmFontFormat *pTmpFormat = new SmFontFormat[ nCnt ];
String *pId = new String [ nCnt ];
- INT32 k;
+ size_t k;
for (k = 0; k < nCnt; ++k)
{
- pTmpFormat[k] = *rFntFmtList.GetFontFormat( (USHORT) k );
- pId[k] = rFntFmtList.GetFontFormatId( (USHORT) k );
+ pTmpFormat[k] = *rFntFmtList.GetFontFormat( k );
+ pId[k] = rFntFmtList.GetFontFormatId( k );
}
for (k = 0; k < nCnt; ++k)
{
@@ -869,7 +870,7 @@ void SmMathConfig::LoadOther()
pOther = new SmCfgOther;
Sequence< OUString > aNames( GetOtherPropertyNames() );
- INT32 nProps = aNames.getLength();
+ sal_Int32 nProps = aNames.getLength();
Sequence< Any > aValues( GetProperties( aNames ) );
if (nProps && aValues.getLength() == nProps)
@@ -877,7 +878,7 @@ void SmMathConfig::LoadOther()
const Any *pValues = aValues.getConstArray();
const Any *pVal = pValues;
- INT16 nTmp16 = 0;
+ sal_Int16 nTmp16 = 0;
bool bTmp = false;
// Print/Title
@@ -900,6 +901,10 @@ void SmMathConfig::LoadOther()
if (pVal->hasValue() && (*pVal >>= nTmp16))
pOther->nPrintZoomFactor = nTmp16;
++pVal;
+ // LoadSave/IsSaveOnlyUsedSymbols
+ if (pVal->hasValue() && (*pVal >>= bTmp))
+ pOther->bIsSaveOnlyUsedSymbols = bTmp;
+ ++pVal;
// Misc/IgnoreSpacesRight
if (pVal->hasValue() && (*pVal >>= bTmp))
pOther->bIgnoreSpacesRight = bTmp;
@@ -929,30 +934,32 @@ void SmMathConfig::SaveOther()
return;
const Sequence< OUString > aNames( GetOtherPropertyNames() );
- INT32 nProps = aNames.getLength();
+ sal_Int32 nProps = aNames.getLength();
Sequence< Any > aValues( nProps );
Any *pValues = aValues.getArray();
Any *pValue = pValues;
// Print/Title
- *pValue++ <<= (BOOL) pOther->bPrintTitle;
+ *pValue++ <<= (sal_Bool) pOther->bPrintTitle;
// Print/FormulaText
- *pValue++ <<= (BOOL) pOther->bPrintFormulaText;
+ *pValue++ <<= (sal_Bool) pOther->bPrintFormulaText;
// Print/Frame
- *pValue++ <<= (BOOL) pOther->bPrintFrame;
+ *pValue++ <<= (sal_Bool) pOther->bPrintFrame;
// Print/Size
- *pValue++ <<= (INT16) pOther->ePrintSize;
+ *pValue++ <<= (sal_Int16) pOther->ePrintSize;
// Print/ZoomFactor
- *pValue++ <<= (INT16) pOther->nPrintZoomFactor;
+ *pValue++ <<= (sal_Int16) pOther->nPrintZoomFactor;
+ // LoadSave/IsSaveOnlyUsedSymbols
+ *pValue++ <<= (sal_Bool) pOther->bIsSaveOnlyUsedSymbols;
// Misc/IgnoreSpacesRight
- *pValue++ <<= (BOOL) pOther->bIgnoreSpacesRight;
+ *pValue++ <<= (sal_Bool) pOther->bIgnoreSpacesRight;
// View/ToolboxVisible
- *pValue++ <<= (BOOL) pOther->bToolboxVisible;
+ *pValue++ <<= (sal_Bool) pOther->bToolboxVisible;
// View/AutoRedraw
- *pValue++ <<= (BOOL) pOther->bAutoRedraw;
+ *pValue++ <<= (sal_Bool) pOther->bAutoRedraw;
// View/FormulaCursor
- *pValue++ <<= (BOOL) pOther->bFormulaCursor;
+ *pValue++ <<= (sal_Bool) pOther->bFormulaCursor;
OSL_ENSURE( pValue - pValues == nProps, "property mismatch" );
PutProperties( aNames , aValues );
@@ -967,7 +974,7 @@ void SmMathConfig::LoadFormat()
Sequence< OUString > aNames( GetFormatPropertyNames() );
- INT32 nProps = aNames.getLength();
+ sal_Int32 nProps = aNames.getLength();
Sequence< Any > aValues( GetProperties( aNames ) );
if (nProps && aValues.getLength() == nProps)
@@ -976,7 +983,7 @@ void SmMathConfig::LoadFormat()
const Any *pVal = pValues;
OUString aTmpStr;
- INT16 nTmp16 = 0;
+ sal_Int16 nTmp16 = 0;
bool bTmp = false;
// StandardFormat/Textmode
@@ -1000,7 +1007,7 @@ void SmMathConfig::LoadFormat()
pFormat->SetBaseSize( Size(0, SmPtsTo100th_mm( nTmp16 )) );
++pVal;
- USHORT i;
+ sal_uInt16 i;
for (i = SIZ_BEGIN; i <= SIZ_END; ++i)
{
if (pVal->hasValue() && (*pVal >>= nTmp16))
@@ -1054,30 +1061,30 @@ void SmMathConfig::SaveFormat()
return;
const Sequence< OUString > aNames( GetFormatPropertyNames() );
- INT32 nProps = aNames.getLength();
+ sal_Int32 nProps = aNames.getLength();
Sequence< Any > aValues( nProps );
Any *pValues = aValues.getArray();
Any *pValue = pValues;
// StandardFormat/Textmode
- *pValue++ <<= (BOOL) pFormat->IsTextmode();
+ *pValue++ <<= (sal_Bool) pFormat->IsTextmode();
// StandardFormat/GreekCharStyle
- *pValue++ <<= (INT16) pFormat->GetGreekCharStyle();
+ *pValue++ <<= (sal_Int16) pFormat->GetGreekCharStyle();
// StandardFormat/ScaleNormalBracket
- *pValue++ <<= (BOOL) pFormat->IsScaleNormalBrackets();
+ *pValue++ <<= (sal_Bool) pFormat->IsScaleNormalBrackets();
// StandardFormat/HorizontalAlignment
- *pValue++ <<= (INT16) pFormat->GetHorAlign();
+ *pValue++ <<= (sal_Int16) pFormat->GetHorAlign();
// StandardFormat/BaseSize
- *pValue++ <<= (INT16) SmRoundFraction( Sm100th_mmToPts(
+ *pValue++ <<= (sal_Int16) SmRoundFraction( Sm100th_mmToPts(
pFormat->GetBaseSize().Height() ) );
- USHORT i;
+ sal_uInt16 i;
for (i = SIZ_BEGIN; i <= SIZ_END; ++i)
- *pValue++ <<= (INT16) pFormat->GetRelSize( i );
+ *pValue++ <<= (sal_Int16) pFormat->GetRelSize( i );
for (i = DIS_BEGIN; i <= DIS_END; ++i)
- *pValue++ <<= (INT16) pFormat->GetDistance( i );
+ *pValue++ <<= (sal_Int16) pFormat->GetDistance( i );
for (i = FNT_BEGIN; i < FNT_END; ++i)
{
@@ -1148,7 +1155,7 @@ void SmMathConfig::SetPrintSize( SmPrintSize eSize )
}
-USHORT SmMathConfig::GetPrintZoomFactor() const
+sal_uInt16 SmMathConfig::GetPrintZoomFactor() const
{
if (!pOther)
((SmMathConfig *) this)->LoadOther();
@@ -1156,7 +1163,7 @@ USHORT SmMathConfig::GetPrintZoomFactor() const
}
-void SmMathConfig::SetPrintZoomFactor( USHORT nVal )
+void SmMathConfig::SetPrintZoomFactor( sal_uInt16 nVal )
{
if (!pOther)
LoadOther();
@@ -1209,6 +1216,12 @@ void SmMathConfig::SetPrintFormulaText( bool bVal )
SetOtherIfNotEqual( pOther->bPrintFormulaText, bVal );
}
+bool SmMathConfig::IsSaveOnlyUsedSymbols() const
+{
+ if (!pOther)
+ ((SmMathConfig *) this)->LoadOther();
+ return pOther->bIsSaveOnlyUsedSymbols;
+}
bool SmMathConfig::IsPrintFrame() const
{
@@ -1226,6 +1239,14 @@ void SmMathConfig::SetPrintFrame( bool bVal )
}
+void SmMathConfig::SetSaveOnlyUsedSymbols( bool bVal )
+{
+ if (!pOther)
+ LoadOther();
+ SetOtherIfNotEqual( pOther->bIsSaveOnlyUsedSymbols, bVal );
+}
+
+
bool SmMathConfig::IsIgnoreSpacesRight() const
{
if (!pOther)
diff --git a/starmath/source/cfgitem.hxx b/starmath/source/cfgitem.hxx
index 3762d15fc6bc..e3fb818d4c4c 100644
--- a/starmath/source/cfgitem.hxx
+++ b/starmath/source/cfgitem.hxx
@@ -33,6 +33,7 @@
#ifndef _MATH_CFGITEM_HXX_
#define _MATH_CFGITEM_HXX_
+#include <deque>
#include <vector>
#include <com/sun/star/beans/PropertyValues.hpp>
@@ -42,7 +43,6 @@
#include <tools/solar.h>
#include <rtl/ustring.hxx>
#include <unotools/configitem.hxx>
-#include <svl/svarray.hxx>
#include <vcl/timer.hxx>
#include <symbol.hxx>
@@ -61,11 +61,11 @@ struct SmCfgOther;
struct SmFontFormat
{
String aName;
- INT16 nCharSet;
- INT16 nFamily;
- INT16 nPitch;
- INT16 nWeight;
- INT16 nItalic;
+ sal_Int16 nCharSet;
+ sal_Int16 nFamily;
+ sal_Int16 nPitch;
+ sal_Int16 nWeight;
+ sal_Int16 nItalic;
SmFontFormat();
SmFontFormat( const Font &rFont );
@@ -83,13 +83,9 @@ struct SmFntFmtListEntry
SmFntFmtListEntry( const String &rId, const SmFontFormat &rFntFmt );
};
-
-SV_DECL_OBJARR( SmFntFmtListEntryArr, SmFntFmtListEntry, 8, 8 )
-
-
class SmFontFormatList
{
- SmFntFmtListEntryArr aEntries;
+ std::deque<SmFntFmtListEntry> aEntries;
bool bModified;
// disallow copy-constructor and assignment-operator for now
@@ -104,12 +100,12 @@ public:
void RemoveFontFormat( const String &rFntFmtId );
const SmFontFormat * GetFontFormat( const String &rFntFmtId ) const;
- const SmFontFormat * GetFontFormat( USHORT nPos ) const;
+ const SmFontFormat * GetFontFormat( size_t nPos ) const;
const String GetFontFormatId( const SmFontFormat &rFntFmt ) const;
const String GetFontFormatId( const SmFontFormat &rFntFmt, bool bAdd );
- const String GetFontFormatId( USHORT nPos ) const;
+ const String GetFontFormatId( size_t nPos ) const;
const String GetNewFontFormatId() const;
- USHORT GetCount() const { return aEntries.Count(); }
+ size_t GetCount() const { return aEntries.size(); }
bool IsModified() const { return bModified; }
void SetModified( bool bVal ) { bModified = bVal; }
@@ -190,15 +186,18 @@ public:
void SetPrintFrame( bool bVal );
SmPrintSize GetPrintSize() const;
void SetPrintSize( SmPrintSize eSize );
- USHORT GetPrintZoomFactor() const;
- void SetPrintZoomFactor( USHORT nVal );
+ sal_uInt16 GetPrintZoomFactor() const;
+ void SetPrintZoomFactor( sal_uInt16 nVal );
+ bool IsSaveOnlyUsedSymbols() const;
+ void SetSaveOnlyUsedSymbols( bool bVal );
bool IsIgnoreSpacesRight() const;
void SetIgnoreSpacesRight( bool bVal );
bool IsAutoRedraw() const;
void SetAutoRedraw( bool bVal );
bool IsShowFormulaCursor() const;
void SetShowFormulaCursor( bool bVal );
+ void SetAutoRedraw( sal_Bool bVal );
};
/////////////////////////////////////////////////////////////////
diff --git a/starmath/source/config.cxx b/starmath/source/config.cxx
index c9e36a93b51d..2bcfb43a0d1f 100644..100755
--- a/starmath/source/config.cxx
+++ b/starmath/source/config.cxx
@@ -63,33 +63,33 @@ void SmConfig::ItemSetToConfig(const SfxItemSet &rSet)
{
const SfxPoolItem *pItem = NULL;
- UINT16 nU16;
+ sal_uInt16 nU16;
bool bVal;
- if (rSet.GetItemState(SID_PRINTSIZE, TRUE, &pItem) == SFX_ITEM_SET)
+ if (rSet.GetItemState(SID_PRINTSIZE, sal_True, &pItem) == SFX_ITEM_SET)
{ nU16 = ((const SfxUInt16Item *) pItem)->GetValue();
SetPrintSize( (SmPrintSize) nU16 );
}
- if (rSet.GetItemState(SID_PRINTZOOM, TRUE, &pItem) == SFX_ITEM_SET)
+ if (rSet.GetItemState(SID_PRINTZOOM, sal_True, &pItem) == SFX_ITEM_SET)
{ nU16 = ((const SfxUInt16Item *) pItem)->GetValue();
SetPrintZoomFactor( nU16 );
}
- if (rSet.GetItemState(SID_PRINTTITLE, TRUE, &pItem) == SFX_ITEM_SET)
+ if (rSet.GetItemState(SID_PRINTTITLE, sal_True, &pItem) == SFX_ITEM_SET)
{ bVal = ((const SfxBoolItem *) pItem)->GetValue();
SetPrintTitle( bVal );
}
- if (rSet.GetItemState(SID_PRINTTEXT, TRUE, &pItem) == SFX_ITEM_SET)
+ if (rSet.GetItemState(SID_PRINTTEXT, sal_True, &pItem) == SFX_ITEM_SET)
{ bVal = ((const SfxBoolItem *) pItem)->GetValue();
SetPrintFormulaText( bVal );
}
- if (rSet.GetItemState(SID_PRINTFRAME, TRUE, &pItem) == SFX_ITEM_SET)
+ if (rSet.GetItemState(SID_PRINTFRAME, sal_True, &pItem) == SFX_ITEM_SET)
{ bVal = ((const SfxBoolItem *) pItem)->GetValue();
SetPrintFrame( bVal );
}
- if (rSet.GetItemState(SID_AUTOREDRAW, TRUE, &pItem) == SFX_ITEM_SET)
+ if (rSet.GetItemState(SID_AUTOREDRAW, sal_True, &pItem) == SFX_ITEM_SET)
{ bVal = ((const SfxBoolItem *) pItem)->GetValue();
SetAutoRedraw( bVal );
}
- if (rSet.GetItemState(SID_NO_RIGHT_SPACES, TRUE, &pItem) == SFX_ITEM_SET)
+ if (rSet.GetItemState(SID_NO_RIGHT_SPACES, sal_True, &pItem) == SFX_ITEM_SET)
{ bVal = ((const SfxBoolItem *) pItem)->GetValue();
if (IsIgnoreSpacesRight() != bVal)
{
@@ -100,6 +100,10 @@ void SmConfig::ItemSetToConfig(const SfxItemSet &rSet)
Broadcast(SfxSimpleHint(HINT_FORMATCHANGED));
}
}
+ if (rSet.GetItemState(SID_SAVE_ONLY_USED_SYMBOLS, sal_True, &pItem) == SFX_ITEM_SET)
+ { bVal = ((const SfxBoolItem *) pItem)->GetValue();
+ SetSaveOnlyUsedSymbols( bVal );
+ }
SaveOther();
}
@@ -110,15 +114,16 @@ void SmConfig::ConfigToItemSet(SfxItemSet &rSet) const
const SfxItemPool *pPool = rSet.GetPool();
rSet.Put(SfxUInt16Item(pPool->GetWhich(SID_PRINTSIZE),
- (UINT16) GetPrintSize()));
+ (sal_uInt16) GetPrintSize()));
rSet.Put(SfxUInt16Item(pPool->GetWhich(SID_PRINTZOOM),
- (UINT16) GetPrintZoomFactor()));
+ (sal_uInt16) GetPrintZoomFactor()));
rSet.Put(SfxBoolItem(pPool->GetWhich(SID_PRINTTITLE), IsPrintTitle()));
rSet.Put(SfxBoolItem(pPool->GetWhich(SID_PRINTTEXT), IsPrintFormulaText()));
rSet.Put(SfxBoolItem(pPool->GetWhich(SID_PRINTFRAME), IsPrintFrame()));
rSet.Put(SfxBoolItem(pPool->GetWhich(SID_AUTOREDRAW), IsAutoRedraw()));
rSet.Put(SfxBoolItem(pPool->GetWhich(SID_NO_RIGHT_SPACES), IsIgnoreSpacesRight()));
+ rSet.Put(SfxBoolItem(pPool->GetWhich(SID_SAVE_ONLY_USED_SYMBOLS), IsSaveOnlyUsedSymbols()));
}
diff --git a/starmath/source/cursor.cxx b/starmath/source/cursor.cxx
index e9eb20048869..558d305ab4d4 100644
--- a/starmath/source/cursor.cxx
+++ b/starmath/source/cursor.cxx
@@ -458,7 +458,7 @@ SmNodeList::iterator SmCursor::TakeSelectedNodesFromList(SmNodeList *pLineList,
len2 = start3 - start2,
len3 = aText.Len() - start3;
SmToken aToken = pText->GetToken();
- USHORT eFontDesc = pText->GetFontDesc();
+ sal_uInt16 eFontDesc = pText->GetFontDesc();
//If we need make segment 1
if(len1 > 0) {
int start1 = 0;
@@ -507,9 +507,9 @@ void SmCursor::InsertSubSup(SmSubSup eSubSup) {
if(HasSelection()) {
SmNode *pSNode = FindSelectedNode(pTree);
j_assert(pSNode != NULL, "There must be a selected node when HasSelection is true!");
- pLine = FindTopMostNodeInLine(pSNode, TRUE);
+ pLine = FindTopMostNodeInLine(pSNode, sal_True);
} else
- pLine = FindTopMostNodeInLine(position->CaretPos.pSelectedNode, FALSE);
+ pLine = FindTopMostNodeInLine(position->CaretPos.pSelectedNode, sal_False);
//Find Parent and offset in parent
SmStructureNode *pLineParent = pLine->GetParent();
@@ -610,7 +610,7 @@ bool SmCursor::InsertLimit(SmSubSup eSubSup, bool bMoveCaret) {
pSubject = (SmOperNode*)position->CaretPos.pSelectedNode;
else {
//If not, check if parent of the current line is a SmOperNode
- SmNode *pLineNode = FindTopMostNodeInLine(position->CaretPos.pSelectedNode, FALSE);
+ SmNode *pLineNode = FindTopMostNodeInLine(position->CaretPos.pSelectedNode, sal_False);
if(pLineNode->GetParent() && pLineNode->GetParent()->GetType() == NOPER)
pSubject = (SmOperNode*)pLineNode->GetParent();
}
@@ -678,9 +678,9 @@ void SmCursor::InsertBrackets(SmBracketType eBracketType) {
if(HasSelection()) {
SmNode *pSNode = FindSelectedNode(pTree);
j_assert(pSNode != NULL, "There must be a selected node if HasSelection()");
- pLine = FindTopMostNodeInLine(pSNode, TRUE);
+ pLine = FindTopMostNodeInLine(pSNode, sal_True);
} else
- pLine = FindTopMostNodeInLine(position->CaretPos.pSelectedNode, FALSE);
+ pLine = FindTopMostNodeInLine(position->CaretPos.pSelectedNode, sal_False);
//Find parent and offset in parent
SmStructureNode *pLineParent = pLine->GetParent();
@@ -814,9 +814,9 @@ bool SmCursor::InsertRow() {
if(HasSelection()) {
SmNode *pSNode = FindSelectedNode(pTree);
j_assert(pSNode != NULL, "There must be a selected node if HasSelection()");
- pLine = FindTopMostNodeInLine(pSNode, TRUE);
+ pLine = FindTopMostNodeInLine(pSNode, sal_True);
} else
- pLine = FindTopMostNodeInLine(position->CaretPos.pSelectedNode, FALSE);
+ pLine = FindTopMostNodeInLine(position->CaretPos.pSelectedNode, sal_False);
//Find parent and offset in parent
SmStructureNode *pLineParent = pLine->GetParent();
@@ -841,7 +841,7 @@ bool SmCursor::InsertRow() {
if(pLineParent->GetType() == NMATRIX)
pMatrix = (SmMatrixNode*)pLineParent;
- //If we're not in a context that supports InsertRow, return FALSE
+ //If we're not in a context that supports InsertRow, return sal_False
if(!pTable && !pMatrix)
return false;
@@ -903,8 +903,8 @@ bool SmCursor::InsertRow() {
//Find position after insert and patch the list
PosAfterInsert = PatchLineList(pLineList, it);
//Move other children
- USHORT rows = pMatrix->GetNumRows();
- USHORT cols = pMatrix->GetNumCols();
+ sal_uInt16 rows = pMatrix->GetNumRows();
+ sal_uInt16 cols = pMatrix->GetNumCols();
int nRowStart = (nParentIndex - nParentIndex % cols) + cols;
for( int i = pMatrix->GetNumSubNodes() + cols - 1; i >= nRowStart + cols; i--)
pMatrix->SetSubNode(i, pMatrix->GetSubNode(i - cols));
@@ -916,7 +916,7 @@ bool SmCursor::InsertRow() {
}
pMatrix->SetRowCol(rows + 1, cols);
} else
- j_assert(FALSE, "We must be either the context of a table or matrix!");
+ j_assert(sal_False, "We must be either the context of a table or matrix!");
//Finish editing
FinishEdit(pLineList, pLineParent, nParentIndex, PosAfterInsert);
@@ -934,9 +934,9 @@ void SmCursor::InsertFraction() {
if(HasSelection()) {
SmNode *pSNode = FindSelectedNode(pTree);
j_assert(pSNode != NULL, "There must be a selected node when HasSelection is true!");
- pLine = FindTopMostNodeInLine(pSNode, TRUE);
+ pLine = FindTopMostNodeInLine(pSNode, sal_True);
} else
- pLine = FindTopMostNodeInLine(position->CaretPos.pSelectedNode, FALSE);
+ pLine = FindTopMostNodeInLine(position->CaretPos.pSelectedNode, sal_False);
//Find Parent and offset in parent
SmStructureNode *pLineParent = pLine->GetParent();
@@ -1134,7 +1134,7 @@ void SmCursor::InsertSpecial(XubString aString) {
EndEdit();
}
-void SmCursor::InsertCommand(USHORT nCommand) {
+void SmCursor::InsertCommand(sal_uInt16 nCommand) {
switch(nCommand){
case RID_NEWLINE:
InsertRow();
@@ -1429,13 +1429,13 @@ void SmCursor::BeginEdit(){
bIsEnabledSetModifiedSmDocShell = pDocShell->IsEnableSetModified();
if( bIsEnabledSetModifiedSmDocShell )
- pDocShell->EnableSetModified( FALSE );
+ pDocShell->EnableSetModified( sal_False );
}
void SmCursor::EndEdit(){
if(--nEditSections > 0) return;
- pDocShell->SetFormulaArranged(FALSE);
+ pDocShell->SetFormulaArranged(sal_False);
//Okay, I don't know what this does... :)
//It's used in SmDocShell::SetText and with places where everything is modified.
//I think it does some magic, with sfx, but everything is totally undocumented so
@@ -1443,7 +1443,7 @@ void SmCursor::EndEdit(){
if ( bIsEnabledSetModifiedSmDocShell )
pDocShell->EnableSetModified( bIsEnabledSetModifiedSmDocShell );
//I think this notifies people around us that we've modified this document...
- pDocShell->SetModified(TRUE);
+ pDocShell->SetModified(sal_True);
//I think SmDocShell uses this value when it sends an update graphics event
//Anyway comments elsewhere suggests it need to be updated...
pDocShell->nModifyCount++;
diff --git a/starmath/source/detreg.cxx b/starmath/source/detreg.cxx
index d3800b09e9ac..f5725275e6cf 100644
--- a/starmath/source/detreg.cxx
+++ b/starmath/source/detreg.cxx
@@ -49,29 +49,6 @@ void SAL_CALL component_getImplementationEnvironment(
*ppEnvironmentTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ;
}
-sal_Bool SAL_CALL component_writeInfo( void* /*pServiceManager*/,
- void* pRegistryKey )
-{
- Reference< ::registry::XRegistryKey >
- xKey( reinterpret_cast< ::registry::XRegistryKey* >( pRegistryKey ) ) ;
-
- OUString aDelimiter( RTL_CONSTASCII_USTRINGPARAM("/") );
- OUString aUnoServices( RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES") );
-
- // Eigentliche Implementierung und ihre Services registrieren
- sal_Int32 i;
- Reference< ::registry::XRegistryKey > xNewKey;
-
- xNewKey = xKey->createKey( aDelimiter + SmFilterDetect::impl_getStaticImplementationName() +
- aUnoServices );
-
- Sequence< OUString > aServices = SmFilterDetect::impl_getStaticSupportedServiceNames();
- for(i = 0; i < aServices.getLength(); i++ )
- xNewKey->createKey( aServices.getConstArray()[i] );
-
- return sal_True;
-}
-
void* SAL_CALL component_getFactory( const sal_Char* pImplementationName,
void* pServiceManager,
void* /*pRegistryKey*/ )
diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx
index b167a545dbb8..0daecc2054dd 100644..100755
--- a/starmath/source/dialog.cxx
+++ b/starmath/source/dialog.cxx
@@ -51,15 +51,18 @@
#include <svx/ucsubset.hxx>
-#include "config.hxx"
#include "dialog.hxx"
#include "starmath.hrc"
-
+#include "config.hxx"
#include "dialog.hrc"
#include "smmod.hxx"
#include "symbol.hxx"
#include "view.hxx"
#include "document.hxx"
+#include "unomodel.hxx"
+
+
+using ::rtl::OUString;
////////////////////////////////////////
//
@@ -79,9 +82,9 @@ class SmFontStyles
public:
SmFontStyles();
- USHORT GetCount() const { return 4; }
+ sal_uInt16 GetCount() const { return 4; }
const String & GetStyleName( const Font &rFont ) const;
- const String & GetStyleName( USHORT nIdx ) const;
+ const String & GetStyleName( sal_uInt16 nIdx ) const;
};
@@ -114,7 +117,7 @@ const String & SmFontStyles::GetStyleName( const Font &rFont ) const
}
-const String & SmFontStyles::GetStyleName( USHORT nIdx ) const
+const String & SmFontStyles::GetStyleName( sal_uInt16 nIdx ) const
{
// 0 = "normal", 1 = "italic",
// 2 = "bold", 3 = "bold italic"
@@ -145,10 +148,10 @@ void SetFontStyle(const XubString &rStyleName, Font &rFont)
{
// finden des Index passend zum StyleName fuer den leeren StyleName wird
// 0 (nicht bold nicht italic) angenommen.
- USHORT nIndex = 0;
+ sal_uInt16 nIndex = 0;
if (rStyleName.Len())
{
- USHORT i;
+ sal_uInt16 i;
const SmFontStyles &rStyles = GetFontStyles();
for (i = 0; i < rStyles.GetCount(); i++)
if (rStyleName.CompareTo( rStyles.GetStyleName(i) ) == COMPARE_EQUAL)
@@ -185,8 +188,9 @@ SmPrintOptionsTabPage::SmPrintOptionsTabPage(Window *pParent, const SfxItemSet &
aSizeScaled (this, SmResId( RB_FIT_TO_PAGE )),
aSizeZoomed (this, SmResId( RB_ZOOM )),
aZoom (this, SmResId( MF_ZOOM )),
- aFixedLine3 (this, SmResId( FL_MISC_OPTIONS )),
- aNoRightSpaces (this, SmResId( CB_IGNORE_SPACING ))
+ aFixedLine3 (this, SmResId( FL_MISC_OPTIONS )),
+ aNoRightSpaces (this, SmResId( CB_IGNORE_SPACING )),
+ aSaveOnlyUsedSymbols (this, SmResId( CB_SAVE_ONLY_USED_SYMBOLS ))
{
FreeResource();
@@ -198,9 +202,9 @@ SmPrintOptionsTabPage::SmPrintOptionsTabPage(Window *pParent, const SfxItemSet &
}
-BOOL SmPrintOptionsTabPage::FillItemSet(SfxItemSet& rSet)
+sal_Bool SmPrintOptionsTabPage::FillItemSet(SfxItemSet& rSet)
{
- UINT16 nPrintSize;
+ sal_uInt16 nPrintSize;
if (aSizeNormal.IsChecked())
nPrintSize = PRINT_SIZE_NORMAL;
else if (aSizeScaled.IsChecked())
@@ -208,12 +212,13 @@ BOOL SmPrintOptionsTabPage::FillItemSet(SfxItemSet& rSet)
else
nPrintSize = PRINT_SIZE_ZOOMED;
- rSet.Put(SfxUInt16Item(GetWhich(SID_PRINTSIZE), (UINT16) nPrintSize));
- rSet.Put(SfxUInt16Item(GetWhich(SID_PRINTZOOM), (UINT16) aZoom.GetValue()));
+ rSet.Put(SfxUInt16Item(GetWhich(SID_PRINTSIZE), (sal_uInt16) nPrintSize));
+ rSet.Put(SfxUInt16Item(GetWhich(SID_PRINTZOOM), (sal_uInt16) aZoom.GetValue()));
rSet.Put(SfxBoolItem(GetWhich(SID_PRINTTITLE), aTitle.IsChecked()));
rSet.Put(SfxBoolItem(GetWhich(SID_PRINTTEXT), aText.IsChecked()));
rSet.Put(SfxBoolItem(GetWhich(SID_PRINTFRAME), aFrame.IsChecked()));
rSet.Put(SfxBoolItem(GetWhich(SID_NO_RIGHT_SPACES), aNoRightSpaces.IsChecked()));
+ rSet.Put(SfxBoolItem(GetWhich(SID_SAVE_ONLY_USED_SYMBOLS), aSaveOnlyUsedSymbols.IsChecked()));
return true;
}
@@ -235,6 +240,7 @@ void SmPrintOptionsTabPage::Reset(const SfxItemSet& rSet)
aText.Check(((const SfxBoolItem &)rSet.Get(GetWhich(SID_PRINTTEXT))).GetValue());
aFrame.Check(((const SfxBoolItem &)rSet.Get(GetWhich(SID_PRINTFRAME))).GetValue());
aNoRightSpaces.Check(((const SfxBoolItem &)rSet.Get(GetWhich(SID_NO_RIGHT_SPACES))).GetValue());
+ aSaveOnlyUsedSymbols.Check(((const SfxBoolItem &)rSet.Get(GetWhich(SID_SAVE_ONLY_USED_SYMBOLS))).GetValue());
}
@@ -285,7 +291,7 @@ IMPL_LINK_INLINE_END( SmFontDialog, FontSelectHdl, ComboBox *, pComboBox )
IMPL_LINK( SmFontDialog, FontModifyHdl, ComboBox *, pComboBox )
{
// if font is available in list then use it
- USHORT nPos = pComboBox->GetEntryPos( pComboBox->GetText() );
+ sal_uInt16 nPos = pComboBox->GetEntryPos( pComboBox->GetText() );
if (COMBOBOX_ENTRY_NOTFOUND != nPos)
{
FontSelectHdl( pComboBox );
@@ -343,8 +349,8 @@ SmFontDialog::SmFontDialog(Window * pParent,
FontList aFontList( pFntListDevice );
- USHORT nCount = aFontList.GetFontNameCount();
- for (USHORT i = 0; i < nCount; i++)
+ sal_uInt16 nCount = aFontList.GetFontNameCount();
+ for (sal_uInt16 i = 0; i < nCount; i++)
aFontBox.InsertEntry( aFontList.GetFontName(i).GetName() );
Face.SetSize(Size(0, 24));
@@ -479,14 +485,14 @@ void SmFontSizeDialog::WriteTo(SmFormat &rFormat) const
{
rFormat.SetBaseSize( Size(0, SmPtsTo100th_mm( static_cast< long >(aBaseSize.GetValue()))) );
- rFormat.SetRelSize(SIZ_TEXT, (USHORT) aTextSize .GetValue());
- rFormat.SetRelSize(SIZ_INDEX, (USHORT) aIndexSize .GetValue());
- rFormat.SetRelSize(SIZ_FUNCTION, (USHORT) aFunctionSize.GetValue());
- rFormat.SetRelSize(SIZ_OPERATOR, (USHORT) aOperatorSize.GetValue());
- rFormat.SetRelSize(SIZ_LIMITS, (USHORT) aBorderSize .GetValue());
+ rFormat.SetRelSize(SIZ_TEXT, (sal_uInt16) aTextSize .GetValue());
+ rFormat.SetRelSize(SIZ_INDEX, (sal_uInt16) aIndexSize .GetValue());
+ rFormat.SetRelSize(SIZ_FUNCTION, (sal_uInt16) aFunctionSize.GetValue());
+ rFormat.SetRelSize(SIZ_OPERATOR, (sal_uInt16) aOperatorSize.GetValue());
+ rFormat.SetRelSize(SIZ_LIMITS, (sal_uInt16) aBorderSize .GetValue());
const Size aTmp (rFormat.GetBaseSize());
- for (USHORT i = FNT_BEGIN; i <= FNT_END; i++)
+ for (sal_uInt16 i = FNT_BEGIN; i <= FNT_END; i++)
rFormat.SetFontSize(i, aTmp);
rFormat.RequestApplyChanges();
@@ -624,7 +630,7 @@ void SmFontTypeDialog::WriteTo(SmFormat &rFormat) const
struct FieldMinMax
{
- USHORT nMin, nMax;
+ sal_uInt16 nMin, nMax;
};
// Data for min and max values of the 4 metric fields
@@ -653,7 +659,7 @@ static const FieldMinMax pMinMaxData[10][4] =
{{ 0, 10000 }, { 0, 10000 }, { 0, 10000 }, { 0, 10000 }}
};
-SmCategoryDesc::SmCategoryDesc(const ResId& rResId, USHORT nCategoryIdx) :
+SmCategoryDesc::SmCategoryDesc(const ResId& rResId, sal_uInt16 nCategoryIdx) :
Resource(rResId)
{
if (IsAvailableRes(ResId(1,*rResId.GetResMgr()).SetRT(RSC_STRING)))
@@ -704,7 +710,7 @@ IMPL_LINK( SmDistanceDialog, GetFocusHdl, Control *, pControl )
{
if (Categories[nActiveCategory])
{
- USHORT i;
+ sal_uInt16 i;
if (pControl == &aMetricField1)
i = 0;
@@ -758,7 +764,7 @@ IMPL_LINK( SmDistanceDialog, CheckBoxClickHdl, CheckBox *, pCheckBox )
}
-void SmDistanceDialog::SetHelpId(MetricField &rField, ULONG nHelpId)
+void SmDistanceDialog::SetHelpId(MetricField &rField, const rtl::OString& sHelpId)
{
//! HelpID's die auf diese Weise explizit gesetzt werden, muessen im
//! util Verzeichnis im File "hidother.src" mit Hilfe von "hidspecial"
@@ -769,7 +775,7 @@ void SmDistanceDialog::SetHelpId(MetricField &rField, ULONG nHelpId)
OSL_ENSURE(aEmptyText.Len() == 0, "Sm: Ooops...");
#endif
- rField.SetHelpId(nHelpId);
+ rField.SetHelpId(sHelpId);
rField.SetHelpText(aEmptyText);
// since MetricField inherits from SpinField which has a sub Edit field
@@ -777,13 +783,14 @@ void SmDistanceDialog::SetHelpId(MetricField &rField, ULONG nHelpId)
// for it too.
Edit *pSubEdit = rField.GetSubEdit();
if (pSubEdit)
- { pSubEdit->SetHelpId(nHelpId);
+ {
+ pSubEdit->SetHelpId(sHelpId);
pSubEdit->SetHelpText(aEmptyText);
}
}
-void SmDistanceDialog::SetCategory(USHORT nCategory)
+void SmDistanceDialog::SetCategory(sal_uInt16 nCategory)
{
#if OSL_DEBUG_LEVEL > 1
OSL_ENSURE(/*0 <= nCategory &&*/ nCategory < NOCATEGORIES,
@@ -795,7 +802,7 @@ void SmDistanceDialog::SetCategory(USHORT nCategory)
#if OSL_DEBUG_LEVEL > 1
OSL_ENSURE(NOCATEGORIES == 10, "Sm : array doesn't fit into the number of categories");
#endif
- ULONG const aCatMf2Hid[10][4] =
+ static const char * aCatMf2Hid[10][4] =
{
{ HID_SMA_DEFAULT_DIST, HID_SMA_LINE_DIST, HID_SMA_ROOT_DIST, 0 },
{ HID_SMA_SUP_DIST, HID_SMA_SUB_DIST , 0, 0 },
@@ -825,10 +832,10 @@ void SmDistanceDialog::SetCategory(USHORT nCategory)
if (nActiveCategory != CATEGORY_NONE)
{
pCat = Categories[nActiveCategory];
- pCat->SetValue(0, (USHORT) aMetricField1.GetValue());
- pCat->SetValue(1, (USHORT) aMetricField2.GetValue());
- pCat->SetValue(2, (USHORT) aMetricField3.GetValue());
- pCat->SetValue(3, (USHORT) aMetricField4.GetValue());
+ pCat->SetValue(0, (sal_uInt16) aMetricField1.GetValue());
+ pCat->SetValue(1, (sal_uInt16) aMetricField2.GetValue());
+ pCat->SetValue(2, (sal_uInt16) aMetricField3.GetValue());
+ pCat->SetValue(3, (sal_uInt16) aMetricField4.GetValue());
if (nActiveCategory == 5)
bScaleAllBrackets = aCheckBox1.IsChecked();
@@ -839,7 +846,7 @@ void SmDistanceDialog::SetCategory(USHORT nCategory)
// aktivieren/deaktivieren der zugehoerigen Controls in Abhaengigkeit von der
// gewaehlten Kategorie.
bool bActive;
- for (USHORT i = 0; i < 4; i++)
+ for (sal_uInt16 i = 0; i < 4; i++)
{
FixedText *pFT = (FixedText * const) aWin[i][0];
MetricField *pMF = (MetricField * const) aWin[i][1];
@@ -855,7 +862,7 @@ void SmDistanceDialog::SetCategory(USHORT nCategory)
// setzen von Masseinheit und Anzahl der Nachkommastellen
FieldUnit eUnit;
- USHORT nDigits;
+ sal_uInt16 nDigits;
if (nCategory < 9)
{
eUnit = FUNIT_CUSTOM;
@@ -925,7 +932,7 @@ SmDistanceDialog::SmDistanceDialog(Window *pParent, bool bFreeRes)
aBitmap (this, SmResId(1)),
aFixedLine (this, SmResId(1))
{
- for (USHORT i = 0; i < NOCATEGORIES; i++)
+ for (sal_uInt16 i = 0; i < NOCATEGORIES; i++)
Categories[i] = new SmCategoryDesc(SmResId(i + 1), i);
nActiveCategory = CATEGORY_NONE;
bScaleAllBrackets = false;
@@ -1117,11 +1124,11 @@ void SmShowSymbolSet::Paint(const Rectangle&)
// MapUnit einstellen fuer die 'nLen' berechnet wurde
SetMapMode(MapMode(MAP_PIXEL));
- USHORT v = sal::static_int_cast< USHORT >((aVScrollBar.GetThumbPos() * nColumns));
+ sal_uInt16 v = sal::static_int_cast< sal_uInt16 >((aVScrollBar.GetThumbPos() * nColumns));
size_t nSymbols = aSymbolSet.size();
Color aTxtColor( GetTextColor() );
- for (USHORT i = v; i < nSymbols ; i++)
+ for (sal_uInt16 i = v; i < nSymbols ; i++)
{
SmSym aSymbol (*aSymbolSet[i]);
Font aFont (aSymbol.GetFace());
@@ -1135,11 +1142,13 @@ void SmShowSymbolSet::Paint(const Rectangle&)
SetTextColor( aTxtColor );
int nIV = i - v;
- Size aSize(GetTextWidth(aSymbol.GetCharacter()), GetTextHeight());
+ sal_UCS4 cChar = aSymbol.GetCharacter();
+ String aText( OUString( &cChar, 1 ) );
+ Size aSize( GetTextWidth( aText ), GetTextHeight());
DrawText(Point((nIV % nColumns) * nLen + (nLen - aSize.Width()) / 2,
(nIV / nColumns) * nLen + (nLen - aSize.Height()) / 2),
- aSymbol.GetCharacter());
+ aText);
}
if (nSelectSymbol != SYMBOL_NONE)
@@ -1161,7 +1170,7 @@ void SmShowSymbolSet::MouseButtonDown(const MouseEvent& rMEvt)
{
long nPos = (rMEvt.GetPosPixel().Y() / nLen) * nColumns + (rMEvt.GetPosPixel().X() / nLen) +
aVScrollBar.GetThumbPos() * nColumns;
- SelectSymbol( sal::static_int_cast< USHORT >(nPos) );
+ SelectSymbol( sal::static_int_cast< sal_uInt16 >(nPos) );
aSelectHdlLink.Call(this);
@@ -1173,7 +1182,7 @@ void SmShowSymbolSet::MouseButtonDown(const MouseEvent& rMEvt)
void SmShowSymbolSet::KeyInput(const KeyEvent& rKEvt)
{
- USHORT n = nSelectSymbol;
+ sal_uInt16 n = nSelectSymbol;
if (n != SYMBOL_NONE)
{
@@ -1184,7 +1193,7 @@ void SmShowSymbolSet::KeyInput(const KeyEvent& rKEvt)
case KEY_LEFT: n -= 1; break;
case KEY_RIGHT: n += 1; break;
case KEY_HOME: n = 0; break;
- case KEY_END: n = static_cast< USHORT >(aSymbolSet.size() - 1); break;
+ case KEY_END: n = static_cast< sal_uInt16 >(aSymbolSet.size() - 1); break;
case KEY_PAGEUP: n -= nColumns * nRows; break;
case KEY_PAGEDOWN: n += nColumns * nRows; break;
@@ -1200,8 +1209,8 @@ void SmShowSymbolSet::KeyInput(const KeyEvent& rKEvt)
n = nSelectSymbol;
// adjust scrollbar
- if ((n < (USHORT) (aVScrollBar.GetThumbPos() * nColumns)) ||
- (n >= (USHORT) ((aVScrollBar.GetThumbPos() + nRows) * nColumns)))
+ if ((n < (sal_uInt16) (aVScrollBar.GetThumbPos() * nColumns)) ||
+ (n >= (sal_uInt16) ((aVScrollBar.GetThumbPos() + nRows) * nColumns)))
{
aVScrollBar.SetThumbPos(n / nColumns);
Invalidate();
@@ -1224,12 +1233,12 @@ SmShowSymbolSet::SmShowSymbolSet(Window *pParent, const ResId& rResId) :
nUseableWidth = aOutputSize.Width() - nScrollBarWidth;
// Hoehe von 16pt in Pixeln (passend zu 'aOutputSize')
- nLen = (USHORT) LogicToPixel(Size(0, 16), MapMode(MAP_POINT)).Height();
+ nLen = (sal_uInt16) LogicToPixel(Size(0, 16), MapMode(MAP_POINT)).Height();
- nColumns = sal::static_int_cast< USHORT >(nUseableWidth / nLen);
+ nColumns = sal::static_int_cast< sal_uInt16 >(nUseableWidth / nLen);
if (nColumns > 2 && nColumns % 2 != 0)
nColumns--;
- nRows = sal::static_int_cast< USHORT >(aOutputSize.Height() / nLen);
+ nRows = sal::static_int_cast< sal_uInt16 >(aOutputSize.Height() / nLen);
#if OSL_DEBUG_LEVEL > 1
OSL_ENSURE(nColumns > 0, "Sm : no columns");
OSL_ENSURE(nRows > 0, "Sm : no rows");
@@ -1256,7 +1265,7 @@ void SmShowSymbolSet::SetSymbolSet(const SymbolPtrVec_t& rSymbolSet)
{
aSymbolSet = rSymbolSet;
- if (static_cast< USHORT >(aSymbolSet.size()) > (nColumns * nRows))
+ if (static_cast< sal_uInt16 >(aSymbolSet.size()) > (nColumns * nRows))
{
aVScrollBar.SetRange(Range(0, ((aSymbolSet.size() + (nColumns - 1)) / nColumns) - nRows));
aVScrollBar.Enable(true);
@@ -1271,7 +1280,7 @@ void SmShowSymbolSet::SetSymbolSet(const SymbolPtrVec_t& rSymbolSet)
}
-void SmShowSymbolSet::SelectSymbol(USHORT nSymbol)
+void SmShowSymbolSet::SelectSymbol(sal_uInt16 nSymbol)
{
int v = (int) (aVScrollBar.GetThumbPos() * nColumns);
@@ -1311,7 +1320,7 @@ void SmShowSymbol::Paint(const Rectangle &rRect)
Size aTextSize(GetTextWidth(rText), GetTextHeight());
DrawText(Point((GetOutputSize().Width() - aTextSize.Width()) / 2,
- (GetOutputSize().Height() - aTextSize.Height()) / 2), rText);
+ (GetOutputSize().Height() * 7/10)), rText);
}
@@ -1328,17 +1337,14 @@ void SmShowSymbol::SetSymbol(const SmSym *pSymbol)
{
if (pSymbol)
{
- Color aTxtColor( GetTextColor() );
-
Font aFont (pSymbol->GetFace());
aFont.SetSize(Size(0, GetOutputSize().Height() - GetOutputSize().Height() / 3));
- aFont.SetAlign(ALIGN_TOP);
+ aFont.SetAlign(ALIGN_BASELINE);
SetFont(aFont);
- // keep old text color (font may have different color set)
- SetTextColor(aTxtColor);
-
- SetText(XubString(pSymbol->GetCharacter()));
+ sal_UCS4 cChar = pSymbol->GetCharacter();
+ String aText( OUString( &cChar, 1 ) );
+ SetText( aText );
}
// 'Invalidate' fuellt den background mit der background-Farbe.
@@ -1408,7 +1414,7 @@ IMPL_LINK( SmSymbolDialog, EditClickHdl, Button *, EMPTYARG pButton )
// altes SymbolSet merken
XubString aOldSymbolSet (aSymbolSets.GetSelectEntry());
- USHORT nSymPos = GetSelectedSymbol();
+ sal_uInt16 nSymPos = GetSelectedSymbol();
// Dialog an evtl geaenderte Daten des SymbolSet Manager anpassen
if (pDialog->Execute() == RET_OK && rSymbolMgr.IsModified())
@@ -1430,7 +1436,7 @@ IMPL_LINK( SmSymbolDialog, EditClickHdl, Button *, EMPTYARG pButton )
}
if (nSymPos >= aSymbolSet.size())
- nSymPos = static_cast< USHORT >(aSymbolSet.size()) - 1;
+ nSymPos = static_cast< sal_uInt16 >(aSymbolSet.size()) - 1;
SelectSymbol( nSymPos );
delete pDialog;
@@ -1461,7 +1467,7 @@ IMPL_LINK( SmSymbolDialog, GetClickHdl, Button *, EMPTYARG pButton )
const SmSym *pSym = GetSymbol();
if (pSym)
{
- XubString aText ('%');
+ String aText ('%');
aText += pSym->GetName();
aText += (sal_Unicode)' ';
@@ -1568,7 +1574,7 @@ void SmSymbolDialog::DataChanged( const DataChangedEvent& rDCEvt )
bool SmSymbolDialog::SelectSymbolSet(const XubString &rSymbolSetName)
{
bool bRet = false;
- USHORT nPos = aSymbolSets.GetEntryPos(rSymbolSetName);
+ sal_uInt16 nPos = aSymbolSets.GetEntryPos(rSymbolSetName);
aSymbolSetName = String();
aSymbolSet.clear();
@@ -1595,10 +1601,10 @@ bool SmSymbolDialog::SelectSymbolSet(const XubString &rSymbolSetName)
}
-void SmSymbolDialog::SelectSymbol(USHORT nSymbolNo)
+void SmSymbolDialog::SelectSymbol(sal_uInt16 nSymbolNo)
{
const SmSym *pSym = NULL;
- if (aSymbolSetName.Len() > 0 && nSymbolNo < static_cast< USHORT >(aSymbolSet.size()))
+ if (aSymbolSetName.Len() > 0 && nSymbolNo < static_cast< sal_uInt16 >(aSymbolSet.size()))
pSym = aSymbolSet[ nSymbolNo ];
aSymbolSetDisplay.SelectSymbol(nSymbolNo);
@@ -1609,8 +1615,8 @@ void SmSymbolDialog::SelectSymbol(USHORT nSymbolNo)
const SmSym * SmSymbolDialog::GetSymbol() const
{
- USHORT nSymbolNo = aSymbolSetDisplay.GetSelectSymbol();
- bool bValid = aSymbolSetName.Len() > 0 && nSymbolNo < static_cast< USHORT >(aSymbolSet.size());
+ sal_uInt16 nSymbolNo = aSymbolSetDisplay.GetSelectSymbol();
+ bool bValid = aSymbolSetName.Len() > 0 && nSymbolNo < static_cast< sal_uInt16 >(aSymbolSet.size());
return bValid ? aSymbolSet[ nSymbolNo ] : NULL;
}
@@ -1622,42 +1628,44 @@ void SmShowChar::Paint(const Rectangle &rRect)
{
Control::Paint( rRect );
- XubString Text (GetText ());
- if (Text.Len() > 0)
+ OUString aText( GetText() );
+ if (aText.getLength() > 0)
{
- Size aTextSize(GetTextWidth(Text), GetTextHeight());
+#if OSL_DEBUG_LEVEL > 1
+ sal_Int32 nPos = 0;
+ sal_UCS4 cChar = aText.iterateCodePoints( &nPos );
+ (void) cChar;
+#endif
+ Size aTextSize(GetTextWidth(aText), GetTextHeight());
DrawText(Point((GetOutputSize().Width() - aTextSize.Width()) / 2,
- (GetOutputSize().Height() - aTextSize.Height()) / 2), Text);
+ (GetOutputSize().Height() * 7/10)), aText);
}
}
-void SmShowChar::SetChar(xub_Unicode aChar)
+void SmShowChar::SetSymbol( const SmSym *pSym )
{
- SetText(XubString(aChar));
- Invalidate();
+ if (pSym)
+ SetSymbol( pSym->GetCharacter(), pSym->GetFace() );
}
-void SmShowChar::SetFont(const Font &rFont)
+void SmShowChar::SetSymbol( sal_UCS4 cChar, const Font &rFont )
{
- Color aTxtColor( GetTextColor() );
-
- Font aFont (rFont);
- Size aSize (Size(0, GetOutputSize().Height() - GetOutputSize().Height() / 3));
-
- aFont.SetSize(aSize);
- aFont.SetAlign(ALIGN_TOP);
+ Font aFont( rFont );
+ aFont.SetSize( Size(0, GetOutputSize().Height() - GetOutputSize().Height() / 3) );
+ aFont.SetAlign(ALIGN_BASELINE);
+ SetFont(aFont);
aFont.SetTransparent(true);
- Control::SetFont(aFont);
- // keep text color (new font may have different one)
- SetTextColor( aTxtColor );
+ String aText( OUString( &cChar, 1) );
+ SetText( aText );
Invalidate();
}
+
////////////////////////////////////////////////////////////////////////////////
void SmSymDefineDialog::FillSymbols(ComboBox &rComboBox, bool bDeleteText)
@@ -1707,8 +1715,8 @@ void SmSymDefineDialog::FillFonts(bool bDelete)
// ueber die 'FontStyleBox' gewaehlt und nicht auch noch hier)
if (pFontList)
{
- USHORT nCount = pFontList->GetFontNameCount();
- for (USHORT i = 0; i < nCount; i++)
+ sal_uInt16 nCount = pFontList->GetFontNameCount();
+ for (sal_uInt16 i = 0; i < nCount; i++)
aFonts.InsertEntry( pFontList->GetFontName(i).GetName() );
}
}
@@ -1725,7 +1733,7 @@ void SmSymDefineDialog::FillStyles(bool bDeleteText)
{
// eigene StyleName's verwenden
const SmFontStyles &rStyles = GetFontStyles();
- for (USHORT i = 0; i < rStyles.GetCount(); i++)
+ for (sal_uInt16 i = 0; i < rStyles.GetCount(); i++)
aStyles.InsertEntry( rStyles.GetStyleName(i) );
#if OSL_DEBUG_LEVEL > 1
@@ -1816,7 +1824,7 @@ IMPL_LINK( SmSymDefineDialog, FontChangeHdl, ListBox *, EMPTYARG pListBox )
IMPL_LINK( SmSymDefineDialog, SubsetChangeHdl, ListBox *, EMPTYARG pListBox )
{
(void) pListBox;
- USHORT nPos = aFontsSubsetLB.GetSelectEntryPos();
+ sal_uInt16 nPos = aFontsSubsetLB.GetSelectEntryPos();
if (LISTBOX_ENTRY_NOTFOUND != nPos)
{
const Subset* pSubset = reinterpret_cast<const Subset*> (aFontsSubsetLB.GetEntryData( nPos ));
@@ -1843,7 +1851,7 @@ IMPL_LINK( SmSymDefineDialog, StyleChangeHdl, ComboBox *, EMPTYARG pComboBox )
IMPL_LINK( SmSymDefineDialog, CharHighlightHdl, Control *, EMPTYARG )
{
- sal_UCS4 cChar = aCharsetDisplay.GetSelectCharacter();
+ sal_UCS4 cChar = aCharsetDisplay.GetSelectCharacter();
#if OSL_DEBUG_LEVEL > 1
OSL_ENSURE( pSubsetMap, "SubsetMap missing" );
@@ -1857,9 +1865,18 @@ IMPL_LINK( SmSymDefineDialog, CharHighlightHdl, Control *, EMPTYARG )
aFontsSubsetLB.SetNoSelection();
}
- // TO_DO_UCS4 (#i74049): get rid of cast without loosing UCS4 functionality
- aSymbolDisplay.SetChar( sal::static_int_cast< sal_Unicode >(cChar) );
+ aSymbolDisplay.SetSymbol( cChar, aCharsetDisplay.GetFont() );
+
UpdateButtons();
+
+ // display Unicode position as symbol name while iterating over characters
+ const String aHex( String::CreateFromInt64( cChar, 16 ).ToUpperAscii() );
+ const String aPattern( A2OU( aHex.Len() > 4 ? "Ux000000" : "Ux0000" ) );
+ String aUnicodePos( aPattern.Copy( 0, aPattern.Len() - aHex.Len() ) );
+ aUnicodePos += aHex;
+ aSymbols.SetText( aUnicodePos );
+ aSymbolName.SetText( aUnicodePos );
+
return 0;
}
@@ -1873,16 +1890,13 @@ IMPL_LINK( SmSymDefineDialog, AddClickHdl, Button *, EMPTYARG pButton )
#endif
// add symbol
- // TO_DO_UCS4 (#i74049): get rid of cast without loosing UCS4 functionality
const SmSym aNewSymbol( aSymbols.GetText(), aCharsetDisplay.GetFont(),
- sal::static_int_cast< sal_Unicode >( aCharsetDisplay.GetSelectCharacter() ),
- aSymbolSets.GetText() );
+ aCharsetDisplay.GetSelectCharacter(), aSymbolSets.GetText() );
//OSL_ENSURE( aSymbolMgrCopy.GetSymbolByName(aTmpSymbolName) == NULL, "symbol already exists" );
aSymbolMgrCopy.AddOrReplaceSymbol( aNewSymbol );
// update display of new symbol
- aSymbolDisplay.SetChar( aNewSymbol.GetCharacter() );
- aSymbolDisplay.SetFont( aNewSymbol.GetFace() );
+ aSymbolDisplay.SetSymbol( &aNewSymbol );
aSymbolName.SetText( aNewSymbol.GetName() );
aSymbolSetName.SetText( aNewSymbol.GetSymbolSetName() );
@@ -1909,10 +1923,8 @@ IMPL_LINK( SmSymDefineDialog, ChangeClickHdl, Button *, EMPTYARG pButton )
// get new Sybol to use
//! get font from symbol-disp lay since charset-display does not keep
//! the bold attribut.
- // TO_DO_UCS4 (#i74049): get rid of cast without loosing UCS4 functionality
const SmSym aNewSymbol( aSymbols.GetText(), aCharsetDisplay.GetFont(),
- sal::static_int_cast< sal_Unicode >( aCharsetDisplay.GetSelectCharacter() ),
- aSymbolSets.GetText() );
+ aCharsetDisplay.GetSelectCharacter(), aSymbolSets.GetText() );
// remove old symbol if the name was changed then add new one
const bool bNameChanged = aOldSymbols.GetText() != aSymbols.GetText();
@@ -1925,8 +1937,7 @@ IMPL_LINK( SmSymDefineDialog, ChangeClickHdl, Button *, EMPTYARG pButton )
SetOrigSymbol(NULL, XubString());
// update display of new symbol
- aSymbolDisplay.SetChar( aNewSymbol.GetCharacter() );
- aSymbolDisplay.SetFont( aNewSymbol.GetFace() );
+ aSymbolDisplay.SetSymbol( &aNewSymbol );
aSymbolName.SetText( aNewSymbol.GetName() );
aSymbolSetName.SetText( aNewSymbol.GetSymbolSetName() );
@@ -2182,7 +2193,7 @@ bool SmSymDefineDialog::SelectSymbolSet(ComboBox &rComboBox,
rComboBox.SetText(aNormName);
bool bRet = false;
- USHORT nPos = rComboBox.GetEntryPos(aNormName);
+ sal_uInt16 nPos = rComboBox.GetEntryPos(aNormName);
if (nPos != COMBOBOX_ENTRY_NOTFOUND)
{
@@ -2235,8 +2246,7 @@ void SmSymDefineDialog::SetOrigSymbol(const SmSym *pSymbol,
aSymName = pSymbol->GetName();
aSymSetName = rSymbolSetName;
- aOldSymbolDisplay.SetFont(pSymbol->GetFace());
- aOldSymbolDisplay.SetChar(pSymbol->GetCharacter());
+ aOldSymbolDisplay.SetSymbol( pSymbol );
}
else
{ // loeschen des angezeigten Symbols
@@ -2263,7 +2273,7 @@ bool SmSymDefineDialog::SelectSymbol(ComboBox &rComboBox,
rComboBox.SetText(aNormName);
bool bRet = false;
- USHORT nPos = rComboBox.GetEntryPos(aNormName);
+ sal_uInt16 nPos = rComboBox.GetEntryPos(aNormName);
bool bIsOld = &rComboBox == &aOldSymbols;
@@ -2290,6 +2300,10 @@ bool SmSymDefineDialog::SelectSymbol(ComboBox &rComboBox,
// das zugehoerige Zeichen auswaehlen
SelectChar(pSymbol->GetCharacter());
+
+ // since SelectChar will also set the unicode point as text in the
+ // symbols box, we have to set the symbol name again to get that one displayed
+ aSymbols.SetText( pSymbol->GetName() );
}
}
@@ -2342,11 +2356,11 @@ void SmSymDefineDialog::SetFont(const XubString &rFontName, const XubString &rSt
const Subset* pSubset;
while( NULL != (pSubset = pSubsetMap->GetNextSubset( bFirst )) )
{
- USHORT nPos = aFontsSubsetLB.InsertEntry( pSubset->GetName());
+ sal_uInt16 nPos = aFontsSubsetLB.InsertEntry( pSubset->GetName());
aFontsSubsetLB.SetEntryData( nPos, (void *) pSubset );
// subset must live at least as long as the selected font !!!
if( bFirst )
- aFontsSubsetLB.SelectEntryPos( nPos );
+ aFontsSubsetLB.SelectEntryPos( nPos );
bFirst = false;
}
if( bFirst )
@@ -2358,7 +2372,7 @@ void SmSymDefineDialog::SetFont(const XubString &rFontName, const XubString &rSt
bool SmSymDefineDialog::SelectFont(const XubString &rFontName, bool bApplyFont)
{
bool bRet = false;
- USHORT nPos = aFonts.GetEntryPos(rFontName);
+ sal_uInt16 nPos = aFonts.GetEntryPos(rFontName);
if (nPos != LISTBOX_ENTRY_NOTFOUND)
{
@@ -2366,8 +2380,12 @@ bool SmSymDefineDialog::SelectFont(const XubString &rFontName, bool bApplyFont)
if (aStyles.GetEntryCount() > 0)
SelectStyle(aStyles.GetEntry(0));
if (bApplyFont)
+ {
SetFont(aFonts.GetSelectEntry(), aStyles.GetText());
bRet = true;
+ aSymbolDisplay.SetSymbol( aCharsetDisplay.GetSelectCharacter(), aCharsetDisplay.GetFont() );
+ }
+ bRet = sal_True;
}
else
aFonts.SetNoSelection();
@@ -2382,7 +2400,7 @@ bool SmSymDefineDialog::SelectFont(const XubString &rFontName, bool bApplyFont)
bool SmSymDefineDialog::SelectStyle(const XubString &rStyleName, bool bApplyFont)
{
bool bRet = false;
- USHORT nPos = aStyles.GetEntryPos(rStyleName);
+ sal_uInt16 nPos = aStyles.GetEntryPos(rStyleName);
// falls der Style nicht zur Auswahl steht nehmen wir den erst moeglichen
// (sofern vorhanden)
@@ -2393,8 +2411,12 @@ bool SmSymDefineDialog::SelectStyle(const XubString &rStyleName, bool bApplyFont
{
aStyles.SetText(aStyles.GetEntry(nPos));
if (bApplyFont)
+ {
SetFont(aFonts.GetSelectEntry(), aStyles.GetText());
bRet = true;
+ aSymbolDisplay.SetSymbol( aCharsetDisplay.GetSelectCharacter(), aCharsetDisplay.GetFont() );
+ }
+ bRet = sal_True;
}
else
aStyles.SetText(XubString());
@@ -2408,7 +2430,7 @@ bool SmSymDefineDialog::SelectStyle(const XubString &rStyleName, bool bApplyFont
void SmSymDefineDialog::SelectChar(xub_Unicode cChar)
{
aCharsetDisplay.SelectCharacter( cChar );
- aSymbolDisplay.SetChar( cChar );
+ aSymbolDisplay.SetSymbol( cChar, aCharsetDisplay.GetFont() );
UpdateButtons();
}
diff --git a/starmath/source/dialog.hrc b/starmath/source/dialog.hrc
index 29d87ba1d287..9e3e58493ab3 100644..100755
--- a/starmath/source/dialog.hrc
+++ b/starmath/source/dialog.hrc
@@ -31,17 +31,18 @@
#define FL_PRINTOPTIONS 10
#define CB_TITLEROW 11
-#define CB_EQUATION_TEXT 12
+#define CB_EQUATION_TEXT 12
#define CB_FRAME 13
#define FL_PRINT_FORMAT 20
-#define RB_ORIGINAL_SIZE 21
-#define RB_FIT_TO_PAGE 22
+#define RB_ORIGINAL_SIZE 21
+#define RB_FIT_TO_PAGE 22
#define RB_ZOOM 23
#define MF_ZOOM 24
#define FL_MISC_OPTIONS 30
-#define CB_IGNORE_SPACING 31
+#define CB_IGNORE_SPACING 31
+#define CB_SAVE_ONLY_USED_SYMBOLS 32
#define FT_FONTS_SUBSET 110
#define LB_FONTS_SUBSET 111
diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx
index 1e8e4f9e05e9..337e038df69e 100644..100755
--- a/starmath/source/document.cxx
+++ b/starmath/source/document.cxx
@@ -39,6 +39,8 @@
#include <comphelper/storagehelper.hxx>
#include <rtl/logfile.hxx>
#include <rtl/ustring.hxx>
+#include <unotools/eventcfg.hxx>
+#include <sfx2/event.hxx>
#include <sfx2/app.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/docfile.hxx>
@@ -77,7 +79,7 @@
#include <editeng/unolingu.hxx>
#include <ucbhelper/content.hxx>
#include <vcl/mapmod.hxx>
-#include <vcl/mapunit.hxx>
+#include <tools/mapunit.hxx>
#include <vcl/msgbox.hxx>
#include <sfx2/sfx.hrc>
#include <document.hxx>
@@ -98,6 +100,7 @@
#include <sfx2/sfxsids.hrc>
#include <svx/svxids.hrc>
#include "cursor.hxx"
+#include <tools/diagnose_ex.h>
#include "visitors.hxx"
#include "accessibility.hxx"
@@ -108,7 +111,7 @@ using namespace ::com::sun::star::ucb;
using namespace ::com::sun::star::uno;
-#define DOCUMENT_BUFFER_SIZE (USHORT)32768
+#define DOCUMENT_BUFFER_SIZE (sal_uInt16)32768
static const char pStarMathDoc[] = "StarMathDocument";
@@ -183,7 +186,14 @@ void SmDocShell::SetText(const String& rBuffer)
{
pViewSh->GetViewFrame()->GetBindings().Invalidate(SID_TEXT);
if ( SFX_CREATE_MODE_EMBEDDED == GetCreateMode() )
+ {
+ // have SwOleClient::FormatChanged() to align the modified formula properly
+ // even if the vis area does not change (e.g. when formula text changes from
+ // "{a over b + c} over d" to "d over {a over b + c}"
+ SFX_APP()->NotifyEvent(SfxEventHint( SFX_EVENT_VISAREACHANGED, GlobalEventConfig::GetEventName(STR_EVENT_VISAREACHANGED), this));
+
Repaint();
+ }
else
pViewSh->GetGraphicWindow().Invalidate();
}
@@ -255,6 +265,7 @@ void SmDocShell::Parse()
nModifyCount++; //! see comment for SID_GAPHIC_SM in SmDocShell::GetState
SetFormulaArranged( false );
InvalidateCursor();
+ aUsedSymbols = aInterpreter.GetUsedSymbols();
}
@@ -297,9 +308,9 @@ void SmDocShell::ArrangeFormula()
// format/draw formulas always from left to right,
// and numbers should not be converted
- ULONG nLayoutMode = pOutDev->GetLayoutMode();
+ sal_uLong nLayoutMode = pOutDev->GetLayoutMode();
pOutDev->SetLayoutMode( TEXT_LAYOUT_BIDI_LTR );
- INT16 nDigitLang = pOutDev->GetDigitLanguage();
+ sal_Int16 nDigitLang = pOutDev->GetDigitLanguage();
pOutDev->SetDigitLanguage( LANGUAGE_ENGLISH );
//
pTree->Arrange(*pOutDev, rFormat);
@@ -325,10 +336,10 @@ void SetEditEngineDefaultFonts(
SvtLinguConfig().GetOptions( aOpt );
//
struct FontDta {
- INT16 nFallbackLang;
- INT16 nLang;
- USHORT nFontType;
- USHORT nFontInfoId;
+ sal_Int16 nFallbackLang;
+ sal_Int16 nLang;
+ sal_uInt16 nFontType;
+ sal_uInt16 nFontInfoId;
} aTable[3] =
{
// info to get western font to be used
@@ -388,7 +399,7 @@ EditEngine& SmDocShell::GetEditEngine()
pEditEngine = new EditEngine( pEditEngineItemPool );
pEditEngine->EnableUndo( true );
- pEditEngine->SetDefTab( USHORT(
+ pEditEngine->SetDefTab( sal_uInt16(
Application::GetDefaultDevice()->GetTextWidth( C2S("XXXX") ) ) );
pEditEngine->SetControlWord(
@@ -451,7 +462,7 @@ void SmDocShell::DrawFormula(OutputDevice &rDev, Point &rPosition, bool bDrawSel
//! the draw mode needs to be set to default, because when imbedding
//! Math for example in Calc in "a over b" the fraction bar may not
//! be visible else. More generally: the FillColor may have been changed.
- ULONG nOldDrawMode = DRAWMODE_DEFAULT;
+ sal_uLong nOldDrawMode = DRAWMODE_DEFAULT;
bool bRestoreDrawMode = false;
if (OUTDEV_WINDOW == rDev.GetOutDevType() &&
((Window &) rDev).GetSettings().GetStyleSettings().GetHighContrastMode())
@@ -463,9 +474,9 @@ void SmDocShell::DrawFormula(OutputDevice &rDev, Point &rPosition, bool bDrawSel
// format/draw formulas always from left to right
// and numbers should not be converted
- ULONG nLayoutMode = rDev.GetLayoutMode();
+ sal_uLong nLayoutMode = rDev.GetLayoutMode();
rDev.SetLayoutMode( TEXT_LAYOUT_BIDI_LTR );
- INT16 nDigitLang = rDev.GetDigitLanguage();
+ sal_Int16 nDigitLang = rDev.GetDigitLanguage();
rDev.SetDigitLanguage( LANGUAGE_ENGLISH );
//Set selection if any
@@ -737,7 +748,7 @@ SmDocShell::~SmDocShell()
}
-BOOL SmDocShell::SetData( const String& rData )
+sal_Bool SmDocShell::SetData( const String& rData )
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::SetData" );
@@ -746,7 +757,7 @@ BOOL SmDocShell::SetData( const String& rData )
}
-BOOL SmDocShell::ConvertFrom(SfxMedium &rMedium)
+sal_Bool SmDocShell::ConvertFrom(SfxMedium &rMedium)
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::ConvertFrom" );
@@ -797,7 +808,7 @@ BOOL SmDocShell::ConvertFrom(SfxMedium &rMedium)
}
-BOOL SmDocShell::InitNew( const uno::Reference < embed::XStorage >& xStorage )
+sal_Bool SmDocShell::InitNew( const uno::Reference < embed::XStorage >& xStorage )
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::InitNew" );
@@ -811,7 +822,7 @@ BOOL SmDocShell::InitNew( const uno::Reference < embed::XStorage >& xStorage )
}
-BOOL SmDocShell::Load( SfxMedium& rMedium )
+sal_Bool SmDocShell::Load( SfxMedium& rMedium )
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::Load" );
@@ -834,7 +845,7 @@ BOOL SmDocShell::Load( SfxMedium& rMedium )
// is this a fabulous math package ?
Reference<com::sun::star::frame::XModel> xModel(GetModel());
SmXMLImportWrapper aEquation(xModel);
- ULONG nError = aEquation.Import(rMedium);
+ sal_uLong nError = aEquation.Import(rMedium);
bRet = 0 == nError;
SetError( nError, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
}
@@ -852,7 +863,7 @@ BOOL SmDocShell::Load( SfxMedium& rMedium )
//------------------------------------------------------------------
-BOOL SmDocShell::Save()
+sal_Bool SmDocShell::Save()
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::Save" );
@@ -923,7 +934,7 @@ void SmDocShell::UpdateText()
}
-BOOL SmDocShell::SaveAs( SfxMedium& rMedium )
+sal_Bool SmDocShell::SaveAs( SfxMedium& rMedium )
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::SaveAs" );
@@ -947,7 +958,7 @@ BOOL SmDocShell::SaveAs( SfxMedium& rMedium )
return bRet;
}
-BOOL SmDocShell::ConvertTo( SfxMedium &rMedium )
+sal_Bool SmDocShell::ConvertTo( SfxMedium &rMedium )
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::ConvertTo" );
@@ -981,7 +992,7 @@ BOOL SmDocShell::ConvertTo( SfxMedium &rMedium )
return bRet;
}
-BOOL SmDocShell::SaveCompleted( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage )
+sal_Bool SmDocShell::SaveCompleted( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage )
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::SaveCompleted" );
@@ -1004,7 +1015,7 @@ void SmDocShell::Execute(SfxRequest& rReq)
SmFormat aNewFormat( aOldFormat );
aNewFormat.SetTextmode(!aOldFormat.IsTextmode());
- SfxUndoManager *pTmpUndoMgr = GetUndoManager();
+ ::svl::IUndoManager *pTmpUndoMgr = GetUndoManager();
if (pTmpUndoMgr)
pTmpUndoMgr->AddUndoAction(
new SmFormatAction(this, aOldFormat, aNewFormat));
@@ -1047,7 +1058,7 @@ void SmDocShell::Execute(SfxRequest& rReq)
SmFormat aNewFormat( aOldFormat );
pFontTypeDialog->WriteTo(aNewFormat);
- SfxUndoManager *pTmpUndoMgr = GetUndoManager();
+ ::svl::IUndoManager *pTmpUndoMgr = GetUndoManager();
if (pTmpUndoMgr)
pTmpUndoMgr->AddUndoAction(
new SmFormatAction(this, aOldFormat, aNewFormat));
@@ -1071,7 +1082,7 @@ void SmDocShell::Execute(SfxRequest& rReq)
pFontSizeDialog->WriteTo(aNewFormat);
- SfxUndoManager *pTmpUndoMgr = GetUndoManager();
+ ::svl::IUndoManager *pTmpUndoMgr = GetUndoManager();
if (pTmpUndoMgr)
pTmpUndoMgr->AddUndoAction(
new SmFormatAction(this, aOldFormat, aNewFormat));
@@ -1095,7 +1106,7 @@ void SmDocShell::Execute(SfxRequest& rReq)
pDistanceDialog->WriteTo(aNewFormat);
- SfxUndoManager *pTmpUndoMgr = GetUndoManager();
+ ::svl::IUndoManager *pTmpUndoMgr = GetUndoManager();
if (pTmpUndoMgr)
pTmpUndoMgr->AddUndoAction(
new SmFormatAction(this, aOldFormat, aNewFormat));
@@ -1124,7 +1135,7 @@ void SmDocShell::Execute(SfxRequest& rReq)
pAlignDialog->WriteTo( aFmt );
pp->GetConfig()->SetStandardFormat( aFmt );
- SfxUndoManager *pTmpUndoMgr = GetUndoManager();
+ ::svl::IUndoManager *pTmpUndoMgr = GetUndoManager();
if (pTmpUndoMgr)
pTmpUndoMgr->AddUndoAction(
new SmFormatAction(this, aOldFormat, aNewFormat));
@@ -1147,31 +1158,38 @@ void SmDocShell::Execute(SfxRequest& rReq)
case SID_UNDO:
case SID_REDO:
{
- SfxUndoManager* pTmpUndoMgr = GetUndoManager();
+ ::svl::IUndoManager* pTmpUndoMgr = GetUndoManager();
if( pTmpUndoMgr )
{
- USHORT nId = rReq.GetSlot(), nCnt = 1;
+ sal_uInt16 nId = rReq.GetSlot(), nCnt = 1;
const SfxItemSet* pArgs = rReq.GetArgs();
const SfxPoolItem* pItem;
if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nId, false, &pItem ))
nCnt = ((SfxUInt16Item*)pItem)->GetValue();
- BOOL (SfxUndoManager:: *fnDo)( USHORT );
+ sal_Bool (::svl::IUndoManager:: *fnDo)();
sal_uInt16 nCount;
if( SID_UNDO == rReq.GetSlot() )
{
nCount = pTmpUndoMgr->GetUndoActionCount();
- fnDo = &SfxUndoManager::Undo;
+ fnDo = &::svl::IUndoManager::Undo;
}
else
{
nCount = pTmpUndoMgr->GetRedoActionCount();
- fnDo = &SfxUndoManager::Redo;
+ fnDo = &::svl::IUndoManager::Redo;
}
- for( ; nCnt && nCount; --nCnt, --nCount )
- (pTmpUndoMgr->*fnDo)( 0 );
+ try
+ {
+ for( ; nCnt && nCount; --nCnt, --nCount )
+ (pTmpUndoMgr->*fnDo)();
+ }
+ catch( const Exception& e )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
}
Repaint();
UpdateText();
@@ -1199,7 +1217,7 @@ void SmDocShell::GetState(SfxItemSet &rSet)
SfxWhichIter aIter(rSet);
- for (USHORT nWh = aIter.FirstWhich(); 0 != nWh; nWh = aIter.NextWhich())
+ for (sal_uInt16 nWh = aIter.FirstWhich(); 0 != nWh; nWh = aIter.NextWhich())
{
switch (nWh)
{
@@ -1255,27 +1273,27 @@ void SmDocShell::GetState(SfxItemSet &rSet)
case SID_GETUNDOSTRINGS:
case SID_GETREDOSTRINGS:
{
- SfxUndoManager* pTmpUndoMgr = GetUndoManager();
+ ::svl::IUndoManager* pTmpUndoMgr = GetUndoManager();
if( pTmpUndoMgr )
{
- UniString(SfxUndoManager:: *fnGetComment)( USHORT ) const;
+ UniString(::svl::IUndoManager:: *fnGetComment)( size_t, bool const ) const;
sal_uInt16 nCount;
if( SID_GETUNDOSTRINGS == nWh )
{
nCount = pTmpUndoMgr->GetUndoActionCount();
- fnGetComment = &SfxUndoManager::GetUndoActionComment;
+ fnGetComment = &::svl::IUndoManager::GetUndoActionComment;
}
else
{
nCount = pTmpUndoMgr->GetRedoActionCount();
- fnGetComment = &SfxUndoManager::GetRedoActionComment;
+ fnGetComment = &::svl::IUndoManager::GetRedoActionComment;
}
if( nCount )
{
String sList;
for( sal_uInt16 n = 0; n < nCount; ++n )
- ( sList += (pTmpUndoMgr->*fnGetComment)( n ) )
+ ( sList += (pTmpUndoMgr->*fnGetComment)( n, ::svl::IUndoManager::TopLevel ) )
+= '\n';
SfxStringListItem aItem( nWh );
@@ -1292,7 +1310,7 @@ void SmDocShell::GetState(SfxItemSet &rSet)
}
-SfxUndoManager *SmDocShell::GetUndoManager()
+::svl::IUndoManager *SmDocShell::GetUndoManager()
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::GetUndoManager" );
@@ -1313,7 +1331,7 @@ void SmDocShell::SaveSymbols()
void SmDocShell::Draw(OutputDevice *pDevice,
const JobSetup &,
- USHORT /*nAspect*/)
+ sal_uInt16 /*nAspect*/)
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::Draw" );
@@ -1390,13 +1408,13 @@ void SmDocShell::FillClass(SvGlobalName* pClassName,
}
}
-ULONG SmDocShell::GetMiscStatus() const
+sal_uLong SmDocShell::GetMiscStatus() const
{
return SfxObjectShell::GetMiscStatus() | SVOBJ_MISCSTATUS_NOTRESIZEABLE
| SVOBJ_MISCSTATUS_RESIZEONPRINTERCHANGE;
}
-void SmDocShell::SetModified(BOOL bModified)
+void SmDocShell::SetModified(sal_Bool bModified)
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::SetModified" );
diff --git a/starmath/source/edit.cxx b/starmath/source/edit.cxx
index 5423bb937b0f..bfc0309ebe71 100644
--- a/starmath/source/edit.cxx
+++ b/starmath/source/edit.cxx
@@ -82,7 +82,7 @@ using namespace com::sun::star::uno;
void SmGetLeftSelectionPart(const ESelection &rSel,
- USHORT &nPara, USHORT &nPos)
+ sal_uInt16 &nPara, sal_uInt16 &nPos)
// returns paragraph number and position of the selections left part
{
// compare start and end of selection and use the one that comes first
@@ -248,7 +248,7 @@ void SmEditWindow::DataChanged( const DataChangedEvent& )
//! see also SmDocShell::GetEditEngine() !
//!
- pEditEngine->SetDefTab( USHORT( GetTextWidth( C2S("XXXX") ) ) );
+ pEditEngine->SetDefTab( sal_uInt16( GetTextWidth( C2S("XXXX") ) ) );
SetEditEngineDefaultFonts( *pEditEngine, *pEditEngineItemPool );
@@ -289,7 +289,7 @@ IMPL_LINK(SmEditWindow, CursorMoveTimerHdl, Timer *, EMPTYARG /*pTimer*/)
if (pView)
{
// get row and column to look for
- USHORT nRow, nCol;
+ sal_uInt16 nRow, nCol;
SmGetLeftSelectionPart(aNewSelection, nRow, nCol);
nRow++;
nCol++;
@@ -701,7 +701,7 @@ bool SmEditWindow::IsAllSelected() const
if (pEditEngine && pEditView)
{
ESelection eSelection( pEditView->GetSelection() );
- INT32 nParaCnt = pEditEngine->GetParagraphCount();
+ sal_Int32 nParaCnt = pEditEngine->GetParagraphCount();
if (!(nParaCnt - 1))
{
String Text( pEditEngine->GetText( LINEEND_LF ) );
@@ -725,7 +725,7 @@ void SmEditWindow::SelectAll()
}
}
-void SmEditWindow::InsertCommand(USHORT nCommand)
+void SmEditWindow::InsertCommand(sal_uInt16 nCommand)
{
OSL_ENSURE( pEditView, "EditView missing" );
if (pEditView)
@@ -764,7 +764,7 @@ void SmEditWindow::MarkError(const Point &rPos)
if (pEditView)
{
const xub_StrLen nCol = sal::static_int_cast< xub_StrLen >(rPos.X());
- const USHORT nRow = sal::static_int_cast< USHORT >(rPos.Y() - 1);
+ const sal_uInt16 nRow = sal::static_int_cast< sal_uInt16 >(rPos.Y() - 1);
pEditView->SetSelection(ESelection(nRow, nCol - 1, nRow, nCol));
GrabFocus();
@@ -779,10 +779,10 @@ void SmEditWindow::SelNextMark()
if (pEditEngine && pEditView)
{
ESelection eSelection = pEditView->GetSelection();
- USHORT Pos = eSelection.nEndPos;
+ sal_uInt16 Pos = eSelection.nEndPos;
String aMark (C2S("<?>"));
String aText;
- USHORT nCounts = pEditEngine->GetParagraphCount();
+ sal_uInt16 nCounts = pEditEngine->GetParagraphCount();
while (eSelection.nEndPara < nCounts)
{
@@ -809,15 +809,15 @@ void SmEditWindow::SelPrevMark()
if (pEditEngine && pEditView)
{
ESelection eSelection = pEditView->GetSelection();
- USHORT Pos = STRING_NOTFOUND;
+ sal_uInt16 Pos = STRING_NOTFOUND;
xub_StrLen Max = eSelection.nStartPos;
String Text( pEditEngine->GetText( eSelection.nStartPara ) );
String aMark (C2S("<?>"));
- USHORT nCounts = pEditEngine->GetParagraphCount();
+ sal_uInt16 nCounts = pEditEngine->GetParagraphCount();
do
{
- USHORT Fnd = Text.Search(aMark, 0);
+ sal_uInt16 Fnd = Text.Search(aMark, 0);
while ((Fnd < Max) && (Fnd != STRING_NOTFOUND))
{
diff --git a/starmath/source/format.cxx b/starmath/source/format.cxx
index 77d543d61e76..0e612126b00f 100644
--- a/starmath/source/format.cxx
+++ b/starmath/source/format.cxx
@@ -38,7 +38,7 @@
/////////////////////////////////////////////////////////////////
// Latin default-fonts
-static const USHORT aLatinDefFnts[FNT_END] =
+static const sal_uInt16 aLatinDefFnts[FNT_END] =
{
DEFAULTFONT_SERIF, // FNT_VARIABLE
DEFAULTFONT_SERIF, // FNT_FUNCTION
@@ -54,7 +54,7 @@ static const USHORT aLatinDefFnts[FNT_END] =
//! we use non-asian fonts for variables, functions and numbers since they
//! look better and even in asia only latin letters will be used for those.
//! At least that's what I was told...
-static const USHORT aCJKDefFnts[FNT_END] =
+static const sal_uInt16 aCJKDefFnts[FNT_END] =
{
DEFAULTFONT_SERIF, // FNT_VARIABLE
DEFAULTFONT_SERIF, // FNT_FUNCTION
@@ -67,7 +67,7 @@ static const USHORT aCJKDefFnts[FNT_END] =
};
// CTL default-fonts
-static const USHORT aCTLDefFnts[FNT_END] =
+static const sal_uInt16 aCTLDefFnts[FNT_END] =
{
DEFAULTFONT_CTL_TEXT, // FNT_VARIABLE
DEFAULTFONT_CTL_TEXT, // FNT_FUNCTION
@@ -80,7 +80,7 @@ static const USHORT aCTLDefFnts[FNT_END] =
};
-String GetDefaultFontName( LanguageType nLang, USHORT nIdent )
+String GetDefaultFontName( LanguageType nLang, sal_uInt16 nIdent )
{
OSL_ENSURE( /*FNT_BEGIN <= nIdent &&*/ nIdent <= FNT_END,
"index out opd range" );
@@ -89,7 +89,7 @@ String GetDefaultFontName( LanguageType nLang, USHORT nIdent )
return String::CreateFromAscii( FNTNAME_MATH );
else
{
- const USHORT *pTable;
+ const sal_uInt16 *pTable;
switch ( SvtLanguageOptions::GetScriptTypeOfLanguage( nLang ) )
{
case SCRIPTTYPE_LATIN : pTable = aLatinDefFnts; break;
@@ -167,7 +167,7 @@ SmFormat::SmFormat()
vFont[FNT_SANS] .SetItalic(ITALIC_NONE);
vFont[FNT_FIXED] .SetItalic(ITALIC_NONE);
- for ( USHORT i = FNT_BEGIN; i <= FNT_END; i++ )
+ for ( sal_uInt16 i = FNT_BEGIN; i <= FNT_END; i++ )
{
SmFace &rFace = vFont[i];
rFace.SetTransparent( true );
@@ -178,7 +178,7 @@ SmFormat::SmFormat()
}
-void SmFormat::SetFont(USHORT nIdent, const SmFace &rFont, bool bDefault )
+void SmFormat::SetFont(sal_uInt16 nIdent, const SmFace &rFont, bool bDefault )
{
vFont[nIdent] = rFont;
vFont[nIdent].SetTransparent( true );
@@ -196,7 +196,7 @@ SmFormat & SmFormat::operator = (const SmFormat &rFormat)
SetGreekCharStyle(rFormat.GetGreekCharStyle());
SetScaleNormalBrackets(rFormat.IsScaleNormalBrackets());
- USHORT i;
+ sal_uInt16 i;
for (i = FNT_BEGIN; i <= FNT_END; i++)
{
SetFont(i, rFormat.GetFont(i));
@@ -219,7 +219,7 @@ bool SmFormat::operator == (const SmFormat &rFormat) const
bIsTextmode == rFormat.bIsTextmode &&
bScaleNormalBrackets == rFormat.bScaleNormalBrackets;
- USHORT i;
+ sal_uInt16 i;
for (i = 0; i <= SIZ_END && bRes; ++i)
{
if (vSize[i] != rFormat.vSize[i])
diff --git a/starmath/source/makefile.mk b/starmath/source/makefile.mk
index b91691754ac8..520708b5552d 100644..100755
--- a/starmath/source/makefile.mk
+++ b/starmath/source/makefile.mk
@@ -45,10 +45,13 @@ SMDLL=TRUE
SRS2NAME =smres
SRC2FILES = smres.src \
symbol.src \
+ toolbox.src \
commands.src
SLO1FILES = \
$(SLO)$/accessibility.obj \
+ $(SLO)$/caret.obj \
+ $(SLO)$/cursor.obj \
$(SLO)$/edit.obj \
$(SLO)$/eqnolefilehdr.obj \
$(SLO)$/mathmlexport.obj \
@@ -62,21 +65,19 @@ SLO1FILES = \
$(SLO)$/dialog.obj \
$(SLO)$/document.obj \
$(SLO)$/format.obj \
- $(SLO)$/mathtype.obj \
- $(SLO)$/node.obj \
- $(SLO)$/visitors.obj \
- $(SLO)$/caret.obj \
- $(SLO)$/cursor.obj \
- $(SLO)$/parse.obj \
+ $(SLO)$/mathtype.obj \
+ $(SLO)$/node.obj \
+ $(SLO)$/parse.obj \
$(SLO)$/register.obj \
$(SLO)$/smdll.obj \
$(SLO)$/toolbox.obj \
$(SLO)$/typemap.obj \
$(SLO)$/smmod.obj \
- $(SLO)$/utility.obj \
+ $(SLO)$/utility.obj \
$(SLO)$/rect.obj \
$(SLO)$/unomodel.obj \
- $(SLO)$/view.obj
+ $(SLO)$/view.obj \
+ $(SLO)$/visitors.obj
SLO2FILES = \
$(SLO)$/register.obj \
@@ -95,9 +96,6 @@ LIB1OBJFILES = \
# --- Targets -------------------------------------------------------
-LOCALIZE_ME = menu_tmpl.src
-
-
.INCLUDE : target.mk
$(INCCOM)$/dllname.hxx: makefile.mk
diff --git a/starmath/source/mathmlexport.cxx b/starmath/source/mathmlexport.cxx
index e38b0eb4bc81..d23fef88c7f0 100644..100755
--- a/starmath/source/mathmlexport.cxx
+++ b/starmath/source/mathmlexport.cxx
@@ -80,6 +80,7 @@
#include <unomodel.hxx>
#include <document.hxx>
#include <utility.hxx>
+#include <config.hxx>
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::container;
@@ -726,6 +727,9 @@ void SmXMLExport::GetConfigurationSettings( Sequence < PropertyValue > & rProps)
PropertyValue* pProps = rProps.getArray();
if (pProps)
{
+ SmConfig *pConfig = SM_MOD()->GetConfig();
+ const bool bUsedSymbolsOnly = pConfig ? pConfig->IsSaveOnlyUsedSymbols() : false;
+
const OUString sFormula ( RTL_CONSTASCII_USTRINGPARAM ( "Formula" ) );
const OUString sBasicLibraries ( RTL_CONSTASCII_USTRINGPARAM ( "BasicLibraries" ) );
const OUString sDialogLibraries ( RTL_CONSTASCII_USTRINGPARAM ( "DialogLibraries" ) );
@@ -739,7 +743,14 @@ void SmXMLExport::GetConfigurationSettings( Sequence < PropertyValue > & rProps)
rPropName != sRuntimeUID)
{
pProps->Name = rPropName;
- pProps->Value = xProps->getPropertyValue(rPropName);
+
+ rtl::OUString aActualName( rPropName );
+
+ // handle 'save used symbols only'
+ if (bUsedSymbolsOnly && rPropName.equalsAscii("Symbols"))
+ aActualName = OUString( RTL_CONSTASCII_USTRINGPARAM ( "UserDefinedSymbolsInUse" ) );
+
+ pProps->Value = xProps->getPropertyValue( aActualName );
}
}
}
@@ -766,12 +777,13 @@ void SmXMLExport::ExportUnaryHorizontal(const SmNode *pNode, int nLevel)
void SmXMLExport::ExportExpression(const SmNode *pNode, int nLevel)
{
SvXMLElementExport *pRow=0;
- ULONG nSize = pNode->GetNumSubNodes();
+ sal_uLong nSize = pNode->GetNumSubNodes();
- if (nSize > 1)
+ // #i115443: nodes of type expression always need to be grouped with mrow statement
+ if (nSize > 1 || (pNode && pNode->GetType() == NEXPRESSION))
pRow = new SvXMLElementExport(*this, XML_NAMESPACE_MATH, XML_MROW, sal_True, sal_True);
- for (USHORT i = 0; i < nSize; i++)
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (const SmNode *pTemp = pNode->GetSubNode(i))
ExportNodes(pTemp, nLevel+1);
@@ -790,7 +802,7 @@ void SmXMLExport::ExportTable(const SmNode *pNode, int nLevel)
{
SvXMLElementExport *pTable=0;
- USHORT nSize = pNode->GetNumSubNodes();
+ sal_uInt16 nSize = pNode->GetNumSubNodes();
//If the list ends in newline then the last entry has
//no subnodes, the newline is superfulous so we just drop
@@ -804,7 +816,7 @@ void SmXMLExport::ExportTable(const SmNode *pNode, int nLevel)
if (nLevel || (nSize >1))
pTable = new SvXMLElementExport(*this, XML_NAMESPACE_MATH, XML_MTABLE, sal_True, sal_True);
- for (USHORT i = 0; i < nSize; i++)
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (const SmNode *pTemp = pNode->GetSubNode(i))
{
SvXMLElementExport *pRow=0;
@@ -1370,11 +1382,11 @@ void SmXMLExport::ExportMatrix(const SmNode *pNode, int nLevel)
{
SvXMLElementExport aTable(*this, XML_NAMESPACE_MATH, XML_MTABLE, sal_True, sal_True);
const SmMatrixNode *pMatrix = static_cast<const SmMatrixNode *>(pNode);
- USHORT i=0;
- for (ULONG y = 0; y < pMatrix->GetNumRows(); y++)
+ sal_uInt16 i=0;
+ for (sal_uLong y = 0; y < pMatrix->GetNumRows(); y++)
{
SvXMLElementExport aRow(*this, XML_NAMESPACE_MATH, XML_MTR, sal_True, sal_True);
- for (ULONG x = 0; x < pMatrix->GetNumCols(); x++)
+ for (sal_uLong x = 0; x < pMatrix->GetNumCols(); x++)
if (const SmNode *pTemp = pNode->GetSubNode(i++))
{
SvXMLElementExport aCell(*this, XML_NAMESPACE_MATH, XML_MTD, sal_True, sal_True);
diff --git a/starmath/source/mathmlimport.cxx b/starmath/source/mathmlimport.cxx
index b1b99d75817d..e3308e59cc62 100644..100755
--- a/starmath/source/mathmlimport.cxx
+++ b/starmath/source/mathmlimport.cxx
@@ -94,9 +94,9 @@ using ::rtl::OUStringBuffer;
////////////////////////////////////////////////////////////
-ULONG SmXMLImportWrapper::Import(SfxMedium &rMedium)
+sal_uLong SmXMLImportWrapper::Import(SfxMedium &rMedium)
{
- ULONG nError = ERRCODE_SFX_DOLOADFAILED;
+ sal_uLong nError = ERRCODE_SFX_DOLOADFAILED;
uno::Reference<lang::XMultiServiceFactory> xServiceFactory(
utl::getProcessServiceFactory());
@@ -201,7 +201,7 @@ ULONG SmXMLImportWrapper::Import(SfxMedium &rMedium)
if (xStatusIndicator.is())
xStatusIndicator->setValue(nSteps++);
- ULONG nWarn = ReadThroughComponent(
+ sal_uLong nWarn = ReadThroughComponent(
rMedium.GetStorage(), xModelComp, "meta.xml", "Meta.xml",
xServiceFactory, xInfoSet,
(bOASIS ? "com.sun.star.comp.Math.XMLOasisMetaImporter"
@@ -252,7 +252,7 @@ ULONG SmXMLImportWrapper::Import(SfxMedium &rMedium)
/// read a component (file + filter version)
-ULONG SmXMLImportWrapper::ReadThroughComponent(
+sal_uLong SmXMLImportWrapper::ReadThroughComponent(
Reference<io::XInputStream> xInputStream,
Reference<XComponent> xModelComponent,
Reference<lang::XMultiServiceFactory> & rFactory,
@@ -260,7 +260,7 @@ ULONG SmXMLImportWrapper::ReadThroughComponent(
const sal_Char* pFilterName,
sal_Bool bEncrypted )
{
- ULONG nError = ERRCODE_SFX_DOLOADFAILED;
+ sal_uLong nError = ERRCODE_SFX_DOLOADFAILED;
OSL_ENSURE(xInputStream.is(), "input stream missing");
OSL_ENSURE(xModelComponent.is(), "document missing");
OSL_ENSURE(rFactory.is(), "factory missing");
@@ -356,7 +356,7 @@ ULONG SmXMLImportWrapper::ReadThroughComponent(
}
-ULONG SmXMLImportWrapper::ReadThroughComponent(
+sal_uLong SmXMLImportWrapper::ReadThroughComponent(
const uno::Reference< embed::XStorage >& xStorage,
Reference<XComponent> xModelComponent,
const sal_Char* pStreamName,
@@ -845,7 +845,7 @@ public:
class SmXMLRowContext_Impl : public SmXMLDocContext_Impl
{
protected:
- ULONG nElementCount;
+ sal_uLong nElementCount;
public:
SmXMLRowContext_Impl(SmXMLImport &rImport,sal_uInt16 nPrefix,
@@ -1069,7 +1069,7 @@ void SmXMLFencedContext_Impl::EndElement()
aToken.aText = ',';
aToken.eType = TIDENT;
- ULONG i = rNodeStack.Count() - nElementCount;
+ sal_uLong i = rNodeStack.Count() - nElementCount;
if (rNodeStack.Count() - nElementCount > 1)
i += rNodeStack.Count() - 1 - nElementCount;
aRelationArray.resize(i);
@@ -1461,8 +1461,11 @@ public:
void SmXMLSubContext_Impl::GenericEndElement(SmTokenType eType, SmSubSup eSubSup)
{
/*The <msub> element requires exactly 2 arguments.*/
- OSL_ENSURE(GetSmImport().GetNodeStack().Count() - nElementCount == 2,
- "Sub has not two arguments");
+ const bool bNodeCheck = GetSmImport().GetNodeStack().Count() - nElementCount == 2;
+ OSL_ENSURE( bNodeCheck, "Sub has not two arguments" );
+ if (!bNodeCheck)
+ return;
+
SmToken aToken;
aToken.cMathChar = '\0';
aToken.nGroup = 0;
@@ -1474,7 +1477,7 @@ void SmXMLSubContext_Impl::GenericEndElement(SmTokenType eType, SmSubSup eSubSup
// initialize subnodes array
SmNodeArray aSubNodes;
aSubNodes.resize(1 + SUBSUP_NUM_ENTRIES);
- for (ULONG i = 1; i < aSubNodes.size(); i++)
+ for (sal_uLong i = 1; i < aSubNodes.size(); i++)
aSubNodes[i] = NULL;
aSubNodes[eSubSup+1] = rNodeStack.Pop();
@@ -1520,8 +1523,10 @@ void SmXMLSubSupContext_Impl::GenericEndElement(SmTokenType eType,
SmSubSup aSub,SmSubSup aSup)
{
/*The <msub> element requires exactly 3 arguments.*/
- OSL_ENSURE(GetSmImport().GetNodeStack().Count() - nElementCount == 3,
- "SubSup has not three arguments");
+ const bool bNodeCheck = GetSmImport().GetNodeStack().Count() - nElementCount == 3;
+ OSL_ENSURE( bNodeCheck, "SubSup has not three arguments" );
+ if (!bNodeCheck)
+ return;
SmToken aToken;
aToken.cMathChar = '\0';
@@ -1534,7 +1539,7 @@ void SmXMLSubSupContext_Impl::GenericEndElement(SmTokenType eType,
// initialize subnodes array
SmNodeArray aSubNodes;
aSubNodes.resize(1 + SUBSUP_NUM_ENTRIES);
- for (ULONG i = 1; i < aSubNodes.size(); i++)
+ for (sal_uLong i = 1; i < aSubNodes.size(); i++)
aSubNodes[i] = NULL;
aSubNodes[aSup+1] = rNodeStack.Pop();
@@ -1569,8 +1574,10 @@ void SmXMLUnderContext_Impl::StartElement(const uno::Reference<
void SmXMLUnderContext_Impl::HandleAccent()
{
- OSL_ENSURE(GetSmImport().GetNodeStack().Count() - nElementCount == 2,
- "Sub has not two arguments");
+ const bool bNodeCheck = GetSmImport().GetNodeStack().Count() - nElementCount == 2;
+ OSL_ENSURE( bNodeCheck, "Sub has not two arguments" );
+ if (!bNodeCheck)
+ return;
/*Just one special case for the underline thing*/
SmNodeStack &rNodeStack = GetSmImport().GetNodeStack();
@@ -1645,8 +1652,11 @@ void SmXMLOverContext_Impl::EndElement()
void SmXMLOverContext_Impl::HandleAccent()
{
- OSL_ENSURE(GetSmImport().GetNodeStack().Count() - nElementCount == 2,
- "Sub has not two arguments");
+ const bool bNodeCheck = GetSmImport().GetNodeStack().Count() - nElementCount == 2;
+ OSL_ENSURE (bNodeCheck, "Sub has not two arguments");
+ if (!bNodeCheck)
+ return;
+
SmToken aToken;
aToken.cMathChar = '\0';
aToken.nGroup = 0;
@@ -1853,17 +1863,17 @@ class SmXMLFlatDocContext_Impl
{
public:
SmXMLFlatDocContext_Impl( SmXMLImport& i_rImport,
- USHORT i_nPrefix, const OUString & i_rLName,
+ sal_uInt16 i_nPrefix, const OUString & i_rLName,
const uno::Reference<document::XDocumentProperties>& i_xDocProps,
const uno::Reference<xml::sax::XDocumentHandler>& i_xDocBuilder);
virtual ~SmXMLFlatDocContext_Impl();
- virtual SvXMLImportContext *CreateChildContext(USHORT i_nPrefix, const OUString& i_rLocalName, const uno::Reference<xml::sax::XAttributeList>& i_xAttrList);
+ virtual SvXMLImportContext *CreateChildContext(sal_uInt16 i_nPrefix, const OUString& i_rLocalName, const uno::Reference<xml::sax::XAttributeList>& i_xAttrList);
};
SmXMLFlatDocContext_Impl::SmXMLFlatDocContext_Impl( SmXMLImport& i_rImport,
- USHORT i_nPrefix, const OUString & i_rLName,
+ sal_uInt16 i_nPrefix, const OUString & i_rLName,
const uno::Reference<document::XDocumentProperties>& i_xDocProps,
const uno::Reference<xml::sax::XDocumentHandler>& i_xDocBuilder) :
SvXMLImportContext(i_rImport, i_nPrefix, i_rLName),
@@ -1878,7 +1888,7 @@ SmXMLFlatDocContext_Impl::~SmXMLFlatDocContext_Impl()
}
SvXMLImportContext *SmXMLFlatDocContext_Impl::CreateChildContext(
- USHORT i_nPrefix, const OUString& i_rLocalName,
+ sal_uInt16 i_nPrefix, const OUString& i_rLocalName,
const uno::Reference<xml::sax::XAttributeList>& i_xAttrList)
{
// behave like meta base class iff we encounter office:meta
@@ -2172,7 +2182,7 @@ void SmXMLDocContext_Impl::EndElement()
ContextArray.resize(1);
SmNodeStack &rNodeStack = GetSmImport().GetNodeStack();
- for (ULONG i=0;i< 1;i++)
+ for (sal_uLong i=0;i< 1;i++)
ContextArray[i] = rNodeStack.Pop();
SmToken aDummy;
@@ -2181,9 +2191,9 @@ void SmXMLDocContext_Impl::EndElement()
rNodeStack.Push(pSNode);
SmNodeArray LineArray;
- ULONG n = rNodeStack.Count();
+ sal_uLong n = rNodeStack.Count();
LineArray.resize(n);
- for (ULONG j = 0; j < n; j++)
+ for (sal_uLong j = 0; j < n; j++)
LineArray[n - (j + 1)] = rNodeStack.Pop();
SmStructureNode *pSNode2 = new SmTableNode(aDummy);
pSNode2->SetSubNodes(LineArray);
@@ -2192,6 +2202,12 @@ void SmXMLDocContext_Impl::EndElement()
void SmXMLFracContext_Impl::EndElement()
{
+ SmNodeStack &rNodeStack = GetSmImport().GetNodeStack();
+ const bool bNodeCheck = rNodeStack.Count() - nElementCount == 2;
+ OSL_ENSURE( bNodeCheck, "Fraction (mfrac) tag is missing component" );
+ if (!bNodeCheck)
+ return;
+
SmToken aToken;
aToken.cMathChar = '\0';
aToken.nGroup = 0;
@@ -2199,23 +2215,19 @@ void SmXMLFracContext_Impl::EndElement()
aToken.eType = TOVER;
SmStructureNode *pSNode = new SmBinVerNode(aToken);
SmNode *pOper = new SmRectangleNode(aToken);
- SmNodeStack &rNodeStack = GetSmImport().GetNodeStack();
- OSL_ENSURE(rNodeStack.Count() - nElementCount == 2,
- "Fraction (mfrac) tag is missing component");
- if (rNodeStack.Count() - nElementCount == 2)
- {
- SmNode *pSecond = rNodeStack.Pop();
- SmNode *pFirst = rNodeStack.Pop();
- pSNode->SetSubNodes(pFirst,pOper,pSecond);
- rNodeStack.Push(pSNode);
- }
+ SmNode *pSecond = rNodeStack.Pop();
+ SmNode *pFirst = rNodeStack.Pop();
+ pSNode->SetSubNodes(pFirst,pOper,pSecond);
+ rNodeStack.Push(pSNode);
}
void SmXMLRootContext_Impl::EndElement()
{
/*The <mroot> element requires exactly 2 arguments.*/
- OSL_ENSURE(GetSmImport().GetNodeStack().Count() - nElementCount == 2,
- "Root tag is missing component");
+ const bool bNodeCheck = GetSmImport().GetNodeStack().Count() - nElementCount == 2;
+ OSL_ENSURE( bNodeCheck, "Root tag is missing component");
+ if (!bNodeCheck)
+ return;
SmToken aToken;
aToken.cMathChar = MS_SQRT; //Temporary: alert, based on StarSymbol font
@@ -2257,12 +2269,12 @@ void SmXMLRowContext_Impl::EndElement()
{
SmNodeArray aRelationArray;
SmNodeStack &rNodeStack = GetSmImport().GetNodeStack();
- ULONG nSize = rNodeStack.Count()-nElementCount;
+ sal_uLong nSize = rNodeStack.Count()-nElementCount;
if (nSize > 0)
{
aRelationArray.resize(nSize);
- for (ULONG j=rNodeStack.Count()-nElementCount;j > 0;j--)
+ for (sal_uLong j=rNodeStack.Count()-nElementCount;j > 0;j--)
aRelationArray[j-1] = rNodeStack.Pop();
@@ -2452,8 +2464,9 @@ void SmXMLMultiScriptsContext_Impl::MiddleElement()
{
bHasPrescripts=true;
- OSL_ENSURE(GetSmImport().GetNodeStack().Count() - nElementCount > 0,
- "Sub has no arguments");
+ OSL_ENSURE( GetSmImport().GetNodeStack().Count() - nElementCount > 0,
+ "Sub has no arguments");
+
SmNodeStack &rNodeStack = GetSmImport().GetNodeStack();
if (rNodeStack.Count()-nElementCount > 1)
{
@@ -2462,7 +2475,7 @@ void SmXMLMultiScriptsContext_Impl::MiddleElement()
aToken.nGroup = 0;
aToken.nLevel = 0;
aToken.eType = TRSUB;
- ULONG nFinalCount = rNodeStack.Count()-nElementCount-1;
+ sal_uLong nFinalCount = rNodeStack.Count()-nElementCount-1;
SmNodeStack aReverseStack;
while (rNodeStack.Count()-nElementCount)
@@ -2471,14 +2484,14 @@ void SmXMLMultiScriptsContext_Impl::MiddleElement()
aReverseStack.Push(pThing);
}
- for (ULONG nCount=0;nCount < nFinalCount;nCount+=2)
+ for (sal_uLong nCount=0;nCount < nFinalCount;nCount+=2)
{
SmSubSupNode *pNode = new SmSubSupNode(aToken);
// initialize subnodes array
SmNodeArray aSubNodes;
aSubNodes.resize(1 + SUBSUP_NUM_ENTRIES);
- for (ULONG i = 1; i < aSubNodes.size(); i++)
+ for (sal_uLong i = 1; i < aSubNodes.size(); i++)
aSubNodes[i] = NULL;
/*On each loop the base and its sub sup pair becomes the
@@ -2511,11 +2524,11 @@ void SmXMLTableContext_Impl::EndElement()
SmNodeStack aReverseStack;
aExpressionArray.resize(rNodeStack.Count()-nElementCount);
- ULONG nRows = rNodeStack.Count()-nElementCount;
- USHORT nCols = 0;
+ sal_uLong nRows = rNodeStack.Count()-nElementCount;
+ sal_uInt16 nCols = 0;
SmStructureNode *pArray;
- for (ULONG i=rNodeStack.Count()-nElementCount;i > 0;i--)
+ for (sal_uLong i=rNodeStack.Count()-nElementCount;i > 0;i--)
{
pArray = (SmStructureNode *)rNodeStack.Pop();
if (pArray->GetNumSubNodes() == 0)
@@ -2541,11 +2554,11 @@ void SmXMLTableContext_Impl::EndElement()
aReverseStack.Push(pArray);
}
aExpressionArray.resize(nCols*nRows);
- ULONG j=0;
+ sal_uLong j=0;
while (aReverseStack.Count())
{
pArray = (SmStructureNode *)aReverseStack.Pop();
- for (USHORT i=0;i<pArray->GetNumSubNodes();i++)
+ for (sal_uInt16 i=0;i<pArray->GetNumSubNodes();i++)
aExpressionArray[j++] = pArray->GetSubNode(i);
}
@@ -2556,7 +2569,7 @@ void SmXMLTableContext_Impl::EndElement()
aToken.eType = TMATRIX;
SmMatrixNode *pSNode = new SmMatrixNode(aToken);
pSNode->SetSubNodes(aExpressionArray);
- pSNode->SetRowCol(static_cast<USHORT>(nRows),nCols);
+ pSNode->SetRowCol(static_cast<sal_uInt16>(nRows),nCols);
rNodeStack.Push(pSNode);
}
@@ -2619,19 +2632,19 @@ void SmXMLMultiScriptsContext_Impl::EndElement()
aToken.nGroup = 0;
aToken.nLevel = 0;
aToken.eType = TLSUB;
- ULONG nFinalCount = rNodeStack.Count()-nElementCount-1;
+ sal_uLong nFinalCount = rNodeStack.Count()-nElementCount-1;
SmNodeStack aReverseStack;
while (rNodeStack.Count()-nElementCount)
aReverseStack.Push(rNodeStack.Pop());
- for (ULONG nCount=0;nCount < nFinalCount;nCount+=2)
+ for (sal_uLong nCount=0;nCount < nFinalCount;nCount+=2)
{
SmSubSupNode *pNode = new SmSubSupNode(aToken);
// initialize subnodes array
SmNodeArray aSubNodes;
aSubNodes.resize(1 + SUBSUP_NUM_ENTRIES);
- for (ULONG i = 1; i < aSubNodes.size(); i++)
+ for (sal_uLong i = 1; i < aSubNodes.size(); i++)
aSubNodes[i] = NULL;
/*On each loop the base and its sub sup pair becomes the
@@ -2661,7 +2674,7 @@ void SmXMLActionContext_Impl::EndElement()
first pushed one*/
SmNodeStack &rNodeStack = GetSmImport().GetNodeStack();
- for (ULONG i=rNodeStack.Count()-nElementCount;i > 1;i--)
+ for (sal_uLong i=rNodeStack.Count()-nElementCount;i > 1;i--)
{
delete rNodeStack.Pop();
}
@@ -3005,7 +3018,12 @@ void SmXMLImport::SetConfigurationSettings(const Sequence<PropertyValue>& aConfP
if ( xInfo->hasPropertyByName( pValues->Name ) )
xProps->setPropertyValue( pValues->Name, pValues->Value );
}
- catch( Exception& )
+ catch (beans::PropertyVetoException &e)
+ {
+ (void) e;
+ // dealing with read-only properties here. Nothing to do...
+ }
+ catch( Exception& e)
{
OSL_FAIL( "SmXMLImport::SetConfigurationSettings: Exception!" );
}
diff --git a/starmath/source/mathmlimport.hxx b/starmath/source/mathmlimport.hxx
index 41824f0ee6af..db44e4a336ea 100644..100755
--- a/starmath/source/mathmlimport.hxx
+++ b/starmath/source/mathmlimport.hxx
@@ -55,9 +55,9 @@ public:
SmXMLImportWrapper(com::sun::star::uno::Reference<com::sun::star::frame::XModel> &rRef)
: xModel(rRef) {}
- ULONG Import(SfxMedium &rMedium);
+ sal_uLong Import(SfxMedium &rMedium);
- ULONG ReadThroughComponent(
+ sal_uLong ReadThroughComponent(
::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > xInputStream,
::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > xModelComponent,
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rFactory,
@@ -66,7 +66,7 @@ public:
const sal_Char* pFilterName,
sal_Bool bEncrypted );
- ULONG ReadThroughComponent(
+ sal_uLong ReadThroughComponent(
const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage,
::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > xModelComponent,
const sal_Char* pStreamName,
@@ -251,10 +251,10 @@ public:
const SvXMLTokenMap &GetPresTableElemTokenMap();
const SvXMLTokenMap &GetColorTokenMap();
- SmNodeStack & GetNodeStack() {return aNodeStack;}
- SmNode *GetTree() { return aNodeStack.Pop();}
- sal_Bool GetSuccess() { return bSuccess; }
- String &GetText() { return aText;}
+ SmNodeStack & GetNodeStack() { return aNodeStack; }
+ SmNode *GetTree() { return aNodeStack.Pop(); }
+ sal_Bool GetSuccess() { return bSuccess; }
+ String &GetText() { return aText; }
virtual void SetViewSettings(const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& aViewProps);
virtual void SetConfigurationSettings(const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& aViewProps);
diff --git a/starmath/source/mathtype.cxx b/starmath/source/mathtype.cxx
index 82ba98f72c33..c30f95e369db 100644
--- a/starmath/source/mathtype.cxx
+++ b/starmath/source/mathtype.cxx
@@ -107,8 +107,8 @@ void MathType::Init()
/*ToDo replace with table rather than switch, returns
- TRUE in the case that the char is just a char, and
- FALSE if the character is an operator which must not be
+ sal_True in the case that the char is just a char, and
+ sal_False if the character is an operator which must not be
placed inside the quote sequence designed to protect
against being parsed as a keyword
@@ -615,7 +615,7 @@ int MathType::Parse(SotStorage *pStor)
//sigh, theres no point! MathType (in some bizarre subvarient) pads
//the end of the formula with ENDs (0)'s
- ULONG nEnd = pS->Tell();
+ sal_uLong nEnd = pS->Tell();
OSL_ENSURE(nEnd == pS->Seek(STREAM_SEEK_TO_END),
"Possibly unfully parsed formula");
# endif
@@ -2026,8 +2026,8 @@ sal_uInt8 MathType::HandleNodes(SmNode *pNode,int nLevel)
break;
case NEXPRESSION:
{
- USHORT nSize = pNode->GetNumSubNodes();
- for (USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = pNode->GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (SmNode *pTemp = pNode->GetSubNode(i))
HandleNodes(pTemp,nLevel+1);
}
@@ -2043,8 +2043,8 @@ sal_uInt8 MathType::HandleNodes(SmNode *pNode,int nLevel)
{
*pS << sal_uInt8(0x0a);
*pS << sal_uInt8(LINE);
- USHORT nSize = pNode->GetNumSubNodes();
- for (USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = pNode->GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (SmNode *pTemp = pNode->GetSubNode(i))
HandleNodes(pTemp,nLevel+1);
*pS << sal_uInt8(END);
@@ -2063,8 +2063,8 @@ sal_uInt8 MathType::HandleNodes(SmNode *pNode,int nLevel)
break;
default:
{
- USHORT nSize = pNode->GetNumSubNodes();
- for (USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = pNode->GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (SmNode *pTemp = pNode->GetSubNode(i))
HandleNodes(pTemp,nLevel+1);
}
@@ -2110,15 +2110,15 @@ void MathType::HandleSmMatrix(SmMatrixNode *pMatrix,int nLevel)
int nBytes=(pMatrix->GetNumRows()+1)*2/8;
if (((pMatrix->GetNumRows()+1)*2)%8)
nBytes++;
- for (USHORT j = 0; j < nBytes; j++)
+ for (sal_uInt16 j = 0; j < nBytes; j++)
*pS << sal_uInt8(0x00); //row_parts
nBytes=(pMatrix->GetNumCols()+1)*2/8;
if (((pMatrix->GetNumCols()+1)*2)%8)
nBytes++;
- for (USHORT k = 0; k < nBytes; k++)
+ for (sal_uInt16 k = 0; k < nBytes; k++)
*pS << sal_uInt8(0x00); //col_parts
- USHORT nSize = pMatrix->GetNumSubNodes();
- for (USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = pMatrix->GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (SmNode *pTemp = pMatrix->GetSubNode(i))
{
*pS << sal_uInt8(LINE); //line
@@ -2132,7 +2132,7 @@ void MathType::HandleSmMatrix(SmMatrixNode *pMatrix,int nLevel)
//Root Node, PILE equivalent, i.e. vertical stack
void MathType::HandleTable(SmNode *pNode,int nLevel)
{
- USHORT nSize = pNode->GetNumSubNodes();
+ sal_uInt16 nSize = pNode->GetNumSubNodes();
//The root of the starmath is a table, if
//we convert this them each iteration of
//conversion from starmath to mathtype will
@@ -2150,7 +2150,7 @@ void MathType::HandleTable(SmNode *pNode,int nLevel)
*pS << sal_uInt8(0x01); //hAlign
}
- for (USHORT i = 0; i < nSize; i++)
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (SmNode *pTemp = pNode->GetSubNode(i))
{
*pS << sal_uInt8(LINE);
@@ -2195,7 +2195,7 @@ void MathType::HandleRoot(SmNode *pNode,int nLevel)
}
sal_uInt8 MathType::HandleCScript(SmNode *pNode,SmNode *pContent,int nLevel,
- ULONG *pPos,sal_Bool bTest)
+ sal_uLong *pPos,sal_Bool bTest)
{
sal_uInt8 nVariation2=0xff;
@@ -2385,7 +2385,7 @@ void MathType::HandleBrace(SmNode *pNode,int nLevel)
*pS << sal_uInt8(TMPL); //Template
bIsReInterpBrace=0;
sal_uInt8 nBSpec=0x10;
- ULONG nLoc = pS->Tell();
+ sal_uLong nLoc = pS->Tell();
if (pLeft)
{
switch (pLeft->GetToken().eType)
@@ -2443,7 +2443,7 @@ void MathType::HandleBrace(SmNode *pNode,int nLevel)
HandleNodes(pLeft,nLevel+1);
if (bIsReInterpBrace)
{
- ULONG nLoc2 = pS->Tell();
+ sal_uLong nLoc2 = pS->Tell();
pS->Seek(nLoc);
*pS << sal_uInt8(0x2D);
pS->Seek(nLoc2);
@@ -2491,7 +2491,7 @@ void MathType::HandleOperator(SmNode *pNode,int nLevel)
if (HandleLim(pNode,nLevel))
return;
- ULONG nPos;
+ sal_uLong nPos;
sal_uInt8 nVariation;
switch (pNode->GetToken().eType)
@@ -2513,7 +2513,7 @@ void MathType::HandleOperator(SmNode *pNode,int nLevel)
sal_uInt8 nOldVariation=nVariation;
sal_uInt8 nIntVariation=nVariation;
- ULONG nPos2=0;
+ sal_uLong nPos2=0;
if (nVariation != 0xff)
{
nPos2 = pS->Tell();
@@ -3078,8 +3078,8 @@ void MathType::HandleMAlign(SmNode *pNode,int nLevel)
nHAlign=1;
break;
}
- USHORT nSize = pNode->GetNumSubNodes();
- for (USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = pNode->GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (SmNode *pTemp = pNode->GetSubNode(i))
HandleNodes(pTemp,nLevel+1);
nHAlign=nPushedHAlign;
@@ -3261,7 +3261,7 @@ void MathType::HandleAttributes(SmNode *pNode,int nLevel)
{
if ((nInsertion != 0) && NULL != (pTemp = pNode->GetSubNode(0)))
{
- ULONG nPos = pS->Tell();
+ sal_uLong nPos = pS->Tell();
nInsertion--;
pS->Seek(nInsertion);
switch(pTemp->GetToken().eType)
diff --git a/starmath/source/mathtype.hxx b/starmath/source/mathtype.hxx
index 3dbcdc6c5c2b..cfacad560290 100644
--- a/starmath/source/mathtype.hxx
+++ b/starmath/source/mathtype.hxx
@@ -123,7 +123,7 @@ private:
void HandleRoot(SmNode *pNode,int nLevel);
void HandleSubSupScript(SmNode *pNode,int nLevel);
sal_uInt8 HandleCScript(SmNode *pNode,SmNode *pContent,int nLevel,
- ULONG *pPos=NULL,sal_Bool bTest=TRUE);
+ sal_uLong *pPos=NULL,sal_Bool bTest=sal_True);
void HandleFractions(SmNode *pNode,int nLevel);
void HandleBrace(SmNode *pNode,int nLevel);
void HandleVerticalBrace(SmNode *pNode,int nLevel);
@@ -142,7 +142,7 @@ private:
sal_uInt8 nVAlign;
int nPendingAttributes;
- ULONG nInsertion;
+ sal_uLong nInsertion;
sal_Int16 aSizeTable[7];
sal_Int16 nDefaultSize;
diff --git a/starmath/source/menu_tmpl.src b/starmath/source/menu_tmpl.src
deleted file mode 100644
index c6eeeb60b7cd..000000000000
--- a/starmath/source/menu_tmpl.src
+++ /dev/null
@@ -1,160 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-
-#ifndef _SFX_HRC //autogen
-#include <sfx2/sfx.hrc>
-#endif
-#ifndef _GLOBLMN_HRC //autogen
-#include <svx/globlmn.hrc>
-#endif
-#ifndef _GLOBALACC_SRC //autogen
-#include <svx/globlac.hrc>
-#endif
-#ifndef _SVX_SVXIDS_HRC //autogen
-#include <svx/svxids.hrc>
-#endif
-
-#ifndef _STARMATH_HRC
-#include "starmath.hrc"
-#endif
-
-#ifndef MN_HELP
-#define MN_HELP
-#endif
-
-/////////////////////////////////////////////////////////////////
-
-/*
-
-The application menu bar resource has become obsolete. You can now find the menu bar definition at:
-<project>/smath/menubar/menubar.xml.
-
-*/
-
-/////////////////////////////////////////////////////////////////
-
-Accelerator RID_SMACCEL
-{
- ItemList =
- {
- AI_UNDO
- AI_REDO
- AcceleratorItem
- {
- Identifier = SID_SELECT ;
- Key = KeyCode
- {
- Code = KEY_A ;
- Modifier1 = TRUE ;
- };
- };
- AcceleratorItem
- {
- Identifier = SID_NEXTMARK ;
- Key = KeyCode
- {
- Code = KEY_F4 ;
- };
- };
- AcceleratorItem
- {
- Identifier = SID_PREVMARK ;
- Key = KeyCode
- {
- Code = KEY_F4 ;
- Shift = TRUE ;
- };
- };
- AcceleratorItem
- {
- Identifier = SID_NEXTERR ;
- Key = KeyCode
- {
- Code = KEY_F3 ;
- };
- };
- AcceleratorItem
- {
- Identifier = SID_PREVERR ;
- Key = KeyCode
- {
- Code = KEY_F3 ;
- Shift = TRUE ;
- };
- };
- AcceleratorItem
- {
- Identifier = SID_DRAW ;
- Key = KeyCode
- {
- Code = KEY_F9 ;
- };
- };
- };
-};
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx
index 2affb7012372..07dfa8e26e40 100644
--- a/starmath/source/node.cxx
+++ b/starmath/source/node.cxx
@@ -50,8 +50,13 @@
#include <math.h>
#include <float.h>
+
#define APPEND(str,ascii) str.AppendAscii(RTL_CONSTASCII_STRINGPARAM(ascii))
+
+using ::rtl::OUString;
+
+
////////////////////////////////////////
// SmTmpDevice
// Allows for font and color changes. The original settings will be restored
@@ -157,13 +162,13 @@ bool SmNode::IsVisible() const
}
-USHORT SmNode::GetNumSubNodes() const
+sal_uInt16 SmNode::GetNumSubNodes() const
{
return 0;
}
-SmNode * SmNode::GetSubNode(USHORT /*nIndex*/)
+SmNode * SmNode::GetSubNode(sal_uInt16 /*nIndex*/)
{
return NULL;
}
@@ -187,8 +192,8 @@ void SmNode::SetPhantom(bool bIsPhantomP)
bIsPhantom = bIsPhantomP;
SmNode *pNode;
- USHORT nSize = GetNumSubNodes();
- for (USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (NULL != (pNode = GetSubNode(i)))
pNode->SetPhantom(bIsPhantom);
}
@@ -200,14 +205,14 @@ void SmNode::SetColor(const Color& rColor)
GetFont().SetColor(rColor);
SmNode *pNode;
- USHORT nSize = GetNumSubNodes();
- for (USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (NULL != (pNode = GetSubNode(i)))
pNode->SetColor(rColor);
}
-void SmNode::SetAttribut(USHORT nAttrib)
+void SmNode::SetAttribut(sal_uInt16 nAttrib)
{
if (
(nAttrib == ATTR_BOLD && !(Flags() & FLG_BOLD)) ||
@@ -218,14 +223,14 @@ void SmNode::SetAttribut(USHORT nAttrib)
}
SmNode *pNode;
- USHORT nSize = GetNumSubNodes();
- for (USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (NULL != (pNode = GetSubNode(i)))
pNode->SetAttribut(nAttrib);
}
-void SmNode::ClearAttribut(USHORT nAttrib)
+void SmNode::ClearAttribut(sal_uInt16 nAttrib)
{
if (
(nAttrib == ATTR_BOLD && !(Flags() & FLG_BOLD)) ||
@@ -236,8 +241,8 @@ void SmNode::ClearAttribut(USHORT nAttrib)
}
SmNode *pNode;
- USHORT nSize = GetNumSubNodes();
- for (USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (NULL != (pNode = GetSubNode(i)))
pNode->ClearAttribut(nAttrib);
}
@@ -249,14 +254,14 @@ void SmNode::SetFont(const SmFace &rFace)
GetFont() = rFace;
SmNode *pNode;
- USHORT nSize = GetNumSubNodes();
- for (USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (NULL != (pNode = GetSubNode(i)))
pNode->SetFont(rFace);
}
-void SmNode::SetFontSize(const Fraction &rSize, USHORT nType)
+void SmNode::SetFontSize(const Fraction &rSize, sal_uInt16 nType)
//! 'rSize' is in units of pts
{
Size aFntSize;
@@ -304,8 +309,8 @@ void SmNode::SetFontSize(const Fraction &rSize, USHORT nType)
}
SmNode *pNode;
- USHORT nSize = GetNumSubNodes();
- for (USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (NULL != (pNode = GetSubNode(i)))
pNode->SetFontSize(rSize, nType);
}
@@ -316,8 +321,8 @@ void SmNode::SetSize(const Fraction &rSize)
GetFont() *= rSize;
SmNode *pNode;
- USHORT nSize = GetNumSubNodes();
- for (USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (NULL != (pNode = GetSubNode(i)))
pNode->SetSize(rSize);
}
@@ -331,8 +336,8 @@ void SmNode::SetRectHorAlign(RectHorAlign eHorAlign, bool bApplyToSubTree )
if (bApplyToSubTree)
{
SmNode *pNode;
- USHORT nSize = GetNumSubNodes();
- for (USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (NULL != (pNode = GetSubNode(i)))
pNode->SetRectHorAlign(eHorAlign);
}
@@ -370,8 +375,8 @@ void SmNode::Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell)
GetFont().SetItalic(ITALIC_NONE);
SmNode *pNode;
- USHORT nSize = GetNumSubNodes();
- for (USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (NULL != (pNode = GetSubNode(i)))
pNode->Prepare(rFormat, rDocShell);
}
@@ -386,8 +391,8 @@ void SmNode::ToggleDebug() const
pThis->bIsDebug = bIsDebug ? false : true;
SmNode *pNode;
- USHORT nSize = GetNumSubNodes();
- for (USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (NULL != (pNode = pThis->GetSubNode(i)))
pNode->ToggleDebug();
}
@@ -402,8 +407,8 @@ void SmNode::Move(const Point& rPosition)
SmRect::Move(rPosition);
SmNode *pNode;
- USHORT nSize = GetNumSubNodes();
- for (USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (NULL != (pNode = GetSubNode(i)))
pNode->Move(rPosition);
}
@@ -412,8 +417,8 @@ void SmNode::Move(const Point& rPosition)
void SmNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
{
SmNode *pNode;
- USHORT nSize = GetNumSubNodes();
- for (USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (NULL != (pNode = GetSubNode(i)))
pNode->Arrange(rDev, rFormat);
}
@@ -421,10 +426,10 @@ void SmNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
void SmNode::CreateTextFromNode(String &rText)
{
SmNode *pNode;
- USHORT nSize = GetNumSubNodes();
+ sal_uInt16 nSize = GetNumSubNodes();
if (nSize > 1)
rText.Append('{');
- for (USHORT i = 0; i < nSize; i++)
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (NULL != (pNode = GetSubNode(i)))
pNode->CreateTextFromNode(rText);
if (nSize > 1)
@@ -435,17 +440,17 @@ void SmNode::CreateTextFromNode(String &rText)
}
-void SmNode::AdaptToX(const OutputDevice &/*rDev*/, ULONG /*nWidth*/)
+void SmNode::AdaptToX(const OutputDevice &/*rDev*/, sal_uLong /*nWidth*/)
{
}
-void SmNode::AdaptToY(const OutputDevice &/*rDev*/, ULONG /*nHeight*/)
+void SmNode::AdaptToY(const OutputDevice &/*rDev*/, sal_uLong /*nHeight*/)
{
}
-const SmNode * SmNode::FindTokenAt(USHORT nRow, USHORT nCol) const
+const SmNode * SmNode::FindTokenAt(sal_uInt16 nRow, sal_uInt16 nCol) const
// returns (first) ** visible ** (sub)node with the tokens text at
// position 'nRow', 'nCol'.
//! (there should be exactly one such node if any)
@@ -456,8 +461,8 @@ const SmNode * SmNode::FindTokenAt(USHORT nRow, USHORT nCol) const
return this;
else
{
- USHORT nNumSubNodes = GetNumSubNodes();
- for (USHORT i = 0; i < nNumSubNodes; i++)
+ sal_uInt16 nNumSubNodes = GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nNumSubNodes; i++)
{ const SmNode *pNode = GetSubNode(i);
if (!pNode)
@@ -482,8 +487,8 @@ const SmNode * SmNode::FindRectClosestTo(const Point &rPoint) const
pResult = this;
else
{
- USHORT nNumSubNodes = GetNumSubNodes();
- for (USHORT i = 0; i < nNumSubNodes; i++)
+ sal_uInt16 nNumSubNodes = GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nNumSubNodes; i++)
{ const SmNode *pNode = GetSubNode(i);
if (!pNode)
@@ -529,8 +534,8 @@ const SmNode * SmNode::FindNodeWithAccessibleIndex(xub_StrLen nAccIdx) const
pResult = this;
else
{
- USHORT nNumSubNodes = GetNumSubNodes();
- for (USHORT i = 0; i < nNumSubNodes; i++)
+ sal_uInt16 nNumSubNodes = GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nNumSubNodes; i++)
{
const SmNode *pNode = GetSubNode(i);
if (!pNode)
@@ -639,17 +644,23 @@ void SmNode::DumpAsDot(std::ostream &out, String* label, int number, int& id, in
}
#endif /* DEBUG_ENABLE_DUMPASDOT */
+long SmNode::GetFormulaBaseline() const
+{
+ DBG_ASSERT( 0, "This dummy implementation should not have been called." );
+ return 0;
+}
+
///////////////////////////////////////////////////////////////////////////
SmStructureNode::SmStructureNode( const SmStructureNode &rNode ) :
SmNode( rNode.GetType(), rNode.GetToken() )
{
- ULONG i;
+ sal_uLong i;
for (i = 0; i < aSubNodes.size(); i++)
delete aSubNodes[i];
aSubNodes.resize(0);
- ULONG nSize = rNode.aSubNodes.size();
+ sal_uLong nSize = rNode.aSubNodes.size();
aSubNodes.resize( nSize );
for (i = 0; i < nSize; ++i)
{
@@ -664,7 +675,7 @@ SmStructureNode::~SmStructureNode()
{
SmNode *pNode;
- for (USHORT i = 0; i < GetNumSubNodes(); i++)
+ for (sal_uInt16 i = 0; i < GetNumSubNodes(); i++)
if (NULL != (pNode = GetSubNode(i)))
delete pNode;
}
@@ -674,12 +685,12 @@ SmStructureNode & SmStructureNode::operator = ( const SmStructureNode &rNode )
{
SmNode::operator = ( rNode );
- ULONG i;
+ sal_uLong i;
for (i = 0; i < aSubNodes.size(); i++)
delete aSubNodes[i];
aSubNodes.resize(0);
- ULONG nSize = rNode.aSubNodes.size();
+ sal_uLong nSize = rNode.aSubNodes.size();
aSubNodes.resize( nSize );
for (i = 0; i < nSize; ++i)
{
@@ -721,13 +732,13 @@ bool SmStructureNode::IsVisible() const
}
-USHORT SmStructureNode::GetNumSubNodes() const
+sal_uInt16 SmStructureNode::GetNumSubNodes() const
{
- return (USHORT) aSubNodes.size();
+ return (sal_uInt16) aSubNodes.size();
}
-SmNode * SmStructureNode::GetSubNode(USHORT nIndex)
+SmNode * SmStructureNode::GetSubNode(sal_uInt16 nIndex)
{
return aSubNodes[nIndex];
}
@@ -735,8 +746,8 @@ SmNode * SmStructureNode::GetSubNode(USHORT nIndex)
void SmStructureNode::GetAccessibleText( String &rText ) const
{
- USHORT nNodes = GetNumSubNodes();
- for (USHORT i = 0; i < nNodes; ++i)
+ sal_uInt16 nNodes = GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nNodes; ++i)
{
const SmNode *pNode = ((SmStructureNode *) this)->GetSubNode(i);
if (pNode)
@@ -757,13 +768,13 @@ bool SmVisibleNode::IsVisible() const
}
-USHORT SmVisibleNode::GetNumSubNodes() const
+sal_uInt16 SmVisibleNode::GetNumSubNodes() const
{
return 0;
}
-SmNode * SmVisibleNode::GetSubNode(USHORT /*nIndex*/)
+SmNode * SmVisibleNode::GetSubNode(sal_uInt16 /*nIndex*/)
{
return NULL;
}
@@ -782,10 +793,10 @@ void SmGraphicNode::GetAccessibleText( String &rText ) const
void SmExpressionNode::CreateTextFromNode(String &rText)
{
SmNode *pNode;
- USHORT nSize = GetNumSubNodes();
+ sal_uInt16 nSize = GetNumSubNodes();
if (nSize > 1)
rText.Append('{');
- for (USHORT i = 0; i < nSize; i++)
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (NULL != (pNode = GetSubNode(i)))
{
pNode->CreateTextFromNode(rText);
@@ -812,7 +823,7 @@ void SmTableNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
Point rPosition;
SmNode *pNode;
- USHORT nSize = GetNumSubNodes();
+ sal_uInt16 nSize = GetNumSubNodes();
// make distance depend on font size
long nDist = +(rFormat.GetDistance(DIS_VERTICAL)
@@ -824,7 +835,7 @@ void SmTableNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
// arrange subnodes and get maximum width of them
long nMaxWidth = 0,
nTmp;
- USHORT i;
+ sal_uInt16 i;
for (i = 0; i < nSize; i++)
if (NULL != (pNode = GetSubNode(i)))
{ pNode->Arrange(rDev, rFormat);
@@ -833,7 +844,7 @@ void SmTableNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
}
Point aPos;
- SmRect::operator = (SmRect(nMaxWidth, 0));
+ SmRect::operator = (SmRect(nMaxWidth, 1));
for (i = 0; i < nSize; i++)
{ if (NULL != (pNode = GetSubNode(i)))
{ const SmRect &rNodeRect = pNode->GetRect();
@@ -848,6 +859,22 @@ void SmTableNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
ExtendBy(rNodeRect, nSize > 1 ? RCP_NONE : RCP_ARG);
}
}
+ // --> 4.7.2010 #i972#
+ if (HasBaseline())
+ nFormulaBaseline = GetBaseline();
+ else
+ {
+ SmTmpDevice aTmpDev ((OutputDevice &) rDev, sal_True);
+ aTmpDev.SetFont(GetFont());
+
+ SmRect aRect = (SmRect(aTmpDev, &rFormat, C2S("a"),
+ GetFont().GetBorderWidth()));
+ nFormulaBaseline = GetAlignM();
+ // move from middle position by constant - distance
+ // between middle and baseline for single letter
+ nFormulaBaseline += aRect.GetBaseline() - aRect.GetAlignM();
+ }
+ // <--
}
@@ -857,6 +884,12 @@ SmNode * SmTableNode::GetLeftMost()
}
+long SmTableNode::GetFormulaBaseline() const
+{
+ return nFormulaBaseline;
+}
+
+
/**************************************************************************/
@@ -878,8 +911,8 @@ void SmLineNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
// arranges all subnodes in one row with some extra space between
{
SmNode *pNode;
- USHORT nSize = GetNumSubNodes();
- USHORT i;
+ sal_uInt16 nSize = GetNumSubNodes();
+ sal_uInt16 i;
for (i = 0; i < nSize; i++)
if (NULL != (pNode = GetSubNode(i)))
pNode->Arrange(rDev, rFormat);
@@ -887,20 +920,21 @@ void SmLineNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
SmTmpDevice aTmpDev ((OutputDevice &) rDev, true);
aTmpDev.SetFont(GetFont());
- // provide an empty rectangle with alignment parameters for the "current"
- // font (in order to make "a^1 {}_2^3 a_4" work correct, that is, have the
- // same sub-/supscript positions.)
- //! be sure to use a character that has explicitly defined HiAttribut
- //! line in rect.cxx such as 'a' in order to make 'vec a' look same to
- //! 'vec {a}'.
- SmRect::operator = (SmRect(aTmpDev, &rFormat, C2S("a"),
- GetFont().GetBorderWidth()));
- // make sure that the rectangle occupies (almost) no space
- SetWidth(1);
- SetItalicSpaces(0, 0);
-
if (nSize < 1)
+ {
+ // provide an empty rectangle with alignment parameters for the "current"
+ // font (in order to make "a^1 {}_2^3 a_4" work correct, that is, have the
+ // same sub-/supscript positions.)
+ //! be sure to use a character that has explicitly defined HiAttribut
+ //! line in rect.cxx such as 'a' in order to make 'vec a' look same to
+ //! 'vec {a}'.
+ SmRect::operator = (SmRect(aTmpDev, &rFormat, C2S("a"),
+ GetFont().GetBorderWidth()));
+ // make sure that the rectangle occupies (almost) no space
+ SetWidth(1);
+ SetItalicSpaces(0, 0);
return;
+ }
// make distance depend on font size
long nDist = (rFormat.GetDistance(DIS_HORIZONTAL) * GetFont().GetSize().Height()) / 100L;
@@ -908,14 +942,17 @@ void SmLineNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
nDist = 0;
Point aPos;
- for (i = 0; i < nSize; i++)
+ // copy the first node into LineNode and extend by the others
+ if (NULL != (pNode = GetSubNode(0)))
+ SmRect::operator = (pNode->GetRect());
+
+ for (i = 1; i < nSize; i++)
if (NULL != (pNode = GetSubNode(i)))
{
aPos = pNode->AlignTo(*this, RP_RIGHT, RHA_CENTER, RVA_BASELINE);
- // no horizontal space before first node
- if (i)
- aPos.X() += nDist;
+ // add horizontal space to the left for each but the first sub node
+ aPos.X() += nDist;
pNode->MoveTo(aPos);
ExtendBy( *pNode, RCP_XOR );
@@ -1227,14 +1264,14 @@ bool IsPointInLine(const Point &rPoint1,
}
-USHORT GetLineIntersectionPoint(Point &rResult,
+sal_uInt16 GetLineIntersectionPoint(Point &rResult,
const Point& rPoint1, const Point &rHeading1,
const Point& rPoint2, const Point &rHeading2)
{
OSL_ENSURE(rHeading1 != Point(), "Sm : 0 vector");
OSL_ENSURE(rHeading2 != Point(), "Sm : 0 vector");
- USHORT nRes = 1;
+ sal_uInt16 nRes = 1;
const double eps = 5.0 * DBL_EPSILON;
// sind die Richtumgsvektoren linear abhaengig ?
@@ -1506,7 +1543,7 @@ void SmSubSupNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
// (as would be in "a_{1_{2_{3_4}}}")
if (GetFont().GetSize().Height() > rFormat.GetBaseSize().Height() / 3)
{
- USHORT nIndex = (eSubSup == CSUB || eSubSup == CSUP) ?
+ sal_uInt16 nIndex = (eSubSup == CSUB || eSubSup == CSUP) ?
SIZ_LIMITS : SIZ_INDEX;
Fraction aFraction ( rFormat.GetRelSize(nIndex), 100 );
pSubSup->SetSize(aFraction);
@@ -1688,10 +1725,10 @@ void SmBraceNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
long nFaceHeight = GetFont().GetSize().Height();
// Uebergroesse in % ermitteln
- USHORT nPerc = 0;
+ sal_uInt16 nPerc = 0;
if (!bIsABS && bScale)
{ // im Fall von Klammern mit Uebergroesse...
- USHORT nIndex = GetScaleMode() == SCALE_HEIGHT ?
+ sal_uInt16 nIndex = GetScaleMode() == SCALE_HEIGHT ?
DIS_BRACKETSIZE : DIS_NORMALBRACKETSIZE;
nPerc = rFormat.GetDistance(nIndex);
}
@@ -1762,12 +1799,12 @@ void SmBraceNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
void SmBracebodyNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
{
- USHORT nNumSubNodes = GetNumSubNodes();
+ sal_uInt16 nNumSubNodes = GetNumSubNodes();
if (nNumSubNodes == 0)
return;
// arrange arguments
- USHORT i;
+ sal_uInt16 i;
for (i = 0; i < nNumSubNodes; i += 2)
GetSubNode(i)->Arrange(rDev, rFormat);
@@ -1786,9 +1823,9 @@ void SmBracebodyNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
// scale separators to required height and arrange them
bool bScale = GetScaleMode() == SCALE_HEIGHT || rFormat.IsScaleNormalBrackets();
long nHeight = bScale ? aRefRect.GetHeight() : GetFont().GetSize().Height();
- USHORT nIndex = GetScaleMode() == SCALE_HEIGHT ?
+ sal_uInt16 nIndex = GetScaleMode() == SCALE_HEIGHT ?
DIS_BRACKETSIZE : DIS_NORMALBRACKETSIZE;
- USHORT nPerc = rFormat.GetDistance(nIndex);
+ sal_uInt16 nPerc = rFormat.GetDistance(nIndex);
if (bScale)
nHeight += 2 * (nHeight * nPerc / 100L);
for (i = 1; i < nNumSubNodes; i += 2)
@@ -2130,7 +2167,7 @@ void SmFontNode::Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell)
break;
}
if (nFnt != -1)
- { GetFont() = rFormat.GetFont( sal::static_int_cast< USHORT >(nFnt) );
+ { GetFont() = rFormat.GetFont( sal::static_int_cast< sal_uInt16 >(nFnt) );
SetFont(GetFont());
}
@@ -2181,7 +2218,7 @@ void SmFontNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
}
-void SmFontNode::SetSizeParameter(const Fraction& rValue, USHORT Type)
+void SmFontNode::SetSizeParameter(const Fraction& rValue, sal_uInt16 Type)
{
nSizeType = Type;
aFontSize = rValue;
@@ -2199,13 +2236,13 @@ SmPolyLineNode::SmPolyLineNode(const SmToken &rNodeToken)
}
-void SmPolyLineNode::AdaptToX(const OutputDevice &/*rDev*/, ULONG nNewWidth)
+void SmPolyLineNode::AdaptToX(const OutputDevice &/*rDev*/, sal_uLong nNewWidth)
{
aToSize.Width() = nNewWidth;
}
-void SmPolyLineNode::AdaptToY(const OutputDevice &/*rDev*/, ULONG nNewHeight)
+void SmPolyLineNode::AdaptToY(const OutputDevice &/*rDev*/, sal_uLong nNewHeight)
{
GetFont().FreezeBorderWidth();
aToSize.Height() = nNewHeight;
@@ -2255,13 +2292,13 @@ void SmPolyLineNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
/**************************************************************************/
-void SmRootSymbolNode::AdaptToX(const OutputDevice &/*rDev*/, ULONG nWidth)
+void SmRootSymbolNode::AdaptToX(const OutputDevice &/*rDev*/, sal_uLong nWidth)
{
nBodyWidth = nWidth;
}
-void SmRootSymbolNode::AdaptToY(const OutputDevice &rDev, ULONG nHeight)
+void SmRootSymbolNode::AdaptToY(const OutputDevice &rDev, sal_uLong nHeight)
{
// etwas extra Laenge damit der horizontale Balken spaeter ueber dem
// Argument positioniert ist
@@ -2272,13 +2309,13 @@ void SmRootSymbolNode::AdaptToY(const OutputDevice &rDev, ULONG nHeight)
/**************************************************************************/
-void SmRectangleNode::AdaptToX(const OutputDevice &/*rDev*/, ULONG nWidth)
+void SmRectangleNode::AdaptToX(const OutputDevice &/*rDev*/, sal_uLong nWidth)
{
aToSize.Width() = nWidth;
}
-void SmRectangleNode::AdaptToY(const OutputDevice &/*rDev*/, ULONG nHeight)
+void SmRectangleNode::AdaptToY(const OutputDevice &/*rDev*/, sal_uLong nHeight)
{
GetFont().FreezeBorderWidth();
aToSize.Height() = nHeight;
@@ -2299,7 +2336,7 @@ void SmRectangleNode::Arrange(const OutputDevice &rDev, const SmFormat &/*rForma
aTmpDev.SetFont(GetFont());
// add some borderspace
- ULONG nTmpBorderWidth = GetFont().GetBorderWidth();
+ sal_uLong nTmpBorderWidth = GetFont().GetBorderWidth();
nHeight += 2 * nTmpBorderWidth;
//! use this method in order to have 'SmRect::HasAlignInfo() == true'
@@ -2311,14 +2348,14 @@ void SmRectangleNode::Arrange(const OutputDevice &rDev, const SmFormat &/*rForma
/**************************************************************************/
-SmTextNode::SmTextNode( SmNodeType eNodeType, const SmToken &rNodeToken, USHORT nFontDescP ) :
+SmTextNode::SmTextNode( SmNodeType eNodeType, const SmToken &rNodeToken, sal_uInt16 nFontDescP ) :
SmVisibleNode(eNodeType, rNodeToken)
{
nFontDesc = nFontDescP;
}
-SmTextNode::SmTextNode( const SmToken &rNodeToken, USHORT nFontDescP ) :
+SmTextNode::SmTextNode( const SmToken &rNodeToken, sal_uInt16 nFontDescP ) :
SmVisibleNode(NTEXT, rNodeToken)
{
nFontDesc = nFontDescP;
@@ -2355,7 +2392,7 @@ void SmTextNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
{
PrepareAttributes();
- USHORT nSizeDesc = GetFontDesc() == FNT_FUNCTION ?
+ sal_uInt16 nSizeDesc = GetFontDesc() == FNT_FUNCTION ?
SIZ_FUNCTION : SIZ_TEXT;
GetFont() *= Fraction (rFormat.GetRelSize(nSizeDesc), 100);
@@ -2458,9 +2495,9 @@ void SmTextNode::AdjustFontDesc()
void SmMatrixNode::CreateTextFromNode(String &rText)
{
APPEND(rText,"matrix {");
- for (USHORT i = 0; i < nNumRows; i++)
+ for (sal_uInt16 i = 0; i < nNumRows; i++)
{
- for (USHORT j = 0; j < nNumCols; j++)
+ for (sal_uInt16 j = 0; j < nNumCols; j++)
{
SmNode *pNode = GetSubNode(i * nNumCols + j);
pNode->CreateTextFromNode(rText);
@@ -2480,7 +2517,7 @@ void SmMatrixNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
Point aPosition,
aOffset;
SmNode *pNode;
- USHORT i, j;
+ sal_uInt16 i, j;
// initialize array that is to hold the maximum widhts of all
// elements (subnodes) in that column.
@@ -2489,10 +2526,10 @@ void SmMatrixNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
pColWidth[j] = 0;
// arrange subnodes and calculate the aboves arrays contents
- USHORT nNodes = GetNumSubNodes();
+ sal_uInt16 nNodes = GetNumSubNodes();
for (i = 0; i < nNodes; i++)
{
- USHORT nIdx = nNodes - 1 - i;
+ sal_uInt16 nIdx = nNodes - 1 - i;
if (NULL != (pNode = GetSubNode(nIdx)))
{
pNode->Arrange(rDev, rFormat);
@@ -2576,7 +2613,7 @@ void SmMatrixNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
}
-void SmMatrixNode::SetRowCol(USHORT nMatrixRows, USHORT nMatrixCols)
+void SmMatrixNode::SetRowCol(sal_uInt16 nMatrixRows, sal_uInt16 nMatrixCols)
{
nNumRows = nMatrixRows;
nNumCols = nMatrixCols;
@@ -2600,7 +2637,7 @@ SmMathSymbolNode::SmMathSymbolNode(const SmToken &rNodeToken)
SetText( cChar );
}
-void SmMathSymbolNode::AdaptToX(const OutputDevice &rDev, ULONG nWidth)
+void SmMathSymbolNode::AdaptToX(const OutputDevice &rDev, sal_uLong nWidth)
{
// Since there is no function to do this, we try to approximate it:
Size aFntSize (GetFont().GetSize());
@@ -2623,7 +2660,7 @@ void SmMathSymbolNode::AdaptToX(const OutputDevice &rDev, ULONG nWidth)
GetFont().SetSize(aFntSize);
}
-void SmMathSymbolNode::AdaptToY(const OutputDevice &rDev, ULONG nHeight)
+void SmMathSymbolNode::AdaptToY(const OutputDevice &rDev, sal_uLong nHeight)
{
GetFont().FreezeBorderWidth();
Size aFntSize (GetFont().GetSize());
@@ -2723,7 +2760,7 @@ void SmRectangleNode::CreateTextFromNode(String &rText)
void SmAttributNode::CreateTextFromNode(String &rText)
{
SmNode *pNode;
- USHORT nSize = GetNumSubNodes();
+ sal_uInt16 nSize = GetNumSubNodes();
OSL_ENSURE(nSize == 2, "Node missing members");
rText.Append('{');
sal_Unicode nLast=0;
@@ -2793,7 +2830,7 @@ bool lcl_IsFromGreekSymbolSet( const String &rTokenText )
}
-SmSpecialNode::SmSpecialNode(SmNodeType eNodeType, const SmToken &rNodeToken, USHORT _nFontDesc) :
+SmSpecialNode::SmSpecialNode(SmNodeType eNodeType, const SmToken &rNodeToken, sal_uInt16 _nFontDesc) :
SmTextNode(eNodeType, rNodeToken, _nFontDesc)
{
bIsFromGreekSymbolSet = lcl_IsFromGreekSymbolSet( rNodeToken.aText );
@@ -2817,7 +2854,9 @@ void SmSpecialNode::Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell
String aName( GetToken().aText.Copy(1) );
if (NULL != (pSym = pp->GetSymbolManager().GetSymbolByName( aName )))
{
- SetText( pSym->GetCharacter() );
+ sal_UCS4 cChar = pSym->GetCharacter();
+ String aTmp( OUString( &cChar, 1 ) );
+ SetText( aTmp );
GetFont() = pSym->GetFace();
}
else
@@ -2846,7 +2885,7 @@ void SmSpecialNode::Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell
{
OSL_ENSURE( GetText().Len() == 1, "a symbol should only consist of 1 char!" );
bool bItalic = false;
- INT16 nStyle = rFormat.GetGreekCharStyle();
+ sal_Int16 nStyle = rFormat.GetGreekCharStyle();
OSL_ENSURE( nStyle >= 0 && nStyle <= 2, "unexpected value for GreekCharStyle" );
if (nStyle == 1)
bItalic = true;
diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx
index e72f322c1a98..23c0040a108b 100644
--- a/starmath/source/parse.cxx
+++ b/starmath/source/parse.cxx
@@ -85,8 +85,8 @@ SmToken::SmToken() :
SmToken::SmToken(SmTokenType eTokenType,
sal_Unicode cMath,
const sal_Char* pText,
- ULONG nTokenGroup,
- USHORT nTokenLevel) {
+ sal_uLong nTokenGroup,
+ sal_uInt16 nTokenLevel) {
eType = eTokenType;
cMathChar = cMath;
aText.AssignAscii(pText);
@@ -315,8 +315,8 @@ const SmTokenTableEntry * SmParser::GetTokenTableEntry( const String &rName )
const SmTokenTableEntry * pRes = 0;
if (rName.Len())
{
- INT32 nEntries = SAL_N_ELEMENTS(aTokenTable);
- for (INT32 i = 0; i < nEntries; ++i)
+ sal_Int32 nEntries = SAL_N_ELEMENTS(aTokenTable);
+ for (sal_Int32 i = 0; i < nEntries; ++i)
{
if (rName.EqualsIgnoreCaseAscii( aTokenTable[i].pIdent ))
{
@@ -351,7 +351,7 @@ bool SmParser::IsDelimiter( const String &rTxt, xub_StrLen nPos )
break;
- INT16 nTypJp = SM_MOD()->GetSysLocale().GetCharClass().getType( rTxt, nPos );
+ sal_Int16 nTypJp = SM_MOD()->GetSysLocale().GetCharClass().getType( rTxt, nPos );
bool bIsDelim = (*pDelim != 0 ||
nTypJp == com::sun::star::i18n::UnicodeType::SPACE_SEPARATOR ||
nTypJp == com::sun::star::i18n::UnicodeType::CONTROL);
@@ -361,24 +361,24 @@ bool SmParser::IsDelimiter( const String &rTxt, xub_StrLen nPos )
#endif
-void SmParser::Insert(const String &rText, USHORT nPos)
+void SmParser::Insert(const String &rText, sal_uInt16 nPos)
{
- BufferString.Insert(rText, nPos);
+ m_aBufferString.Insert(rText, nPos);
xub_StrLen nLen = rText.Len();
- BufferIndex = BufferIndex + nLen;
- nTokenIndex = nTokenIndex + nLen;
+ m_nBufferIndex = m_nBufferIndex + nLen;
+ m_nTokenIndex = m_nTokenIndex + nLen;
}
-void SmParser::Replace( USHORT nPos, USHORT nLen, const String &rText )
+void SmParser::Replace( sal_uInt16 nPos, sal_uInt16 nLen, const String &rText )
{
- OSL_ENSURE( nPos + nLen <= BufferString.Len(), "argument mismatch" );
+ OSL_ENSURE( nPos + nLen <= m_aBufferString.Len(), "argument mismatch" );
- BufferString.Replace( nPos, nLen, rText );
- INT16 nChg = rText.Len() - nLen;
- BufferIndex = BufferIndex + nChg;
- nTokenIndex = nTokenIndex + nChg;
+ m_aBufferString.Replace( nPos, nLen, rText );
+ sal_Int16 nChg = rText.Len() - nLen;
+ m_nBufferIndex = m_nBufferIndex + nChg;
+ m_nTokenIndex = m_nTokenIndex + nChg;
}
@@ -405,7 +405,7 @@ void SmParser::NextToken()
{
static const String aEmptyStr;
- xub_StrLen nBufLen = BufferString.Len();
+ xub_StrLen nBufLen = m_aBufferString.Len();
ParseResult aRes;
xub_StrLen nRealStart;
bool bCont;
@@ -415,13 +415,13 @@ void SmParser::NextToken()
{
// skip white spaces
while (UnicodeType::SPACE_SEPARATOR ==
- aCC.getType( BufferString, BufferIndex ))
- ++BufferIndex;
+ aCC.getType( m_aBufferString, m_nBufferIndex ))
+ ++m_nBufferIndex;
sal_Int32 nStartFlags = coStartFlags;
sal_Int32 nContFlags = coContFlags;
- sal_Unicode cFirstChar = BufferString.GetChar( BufferIndex );
- aRes = aCC.parseAnyToken( BufferString, BufferIndex,
+ sal_Unicode cFirstChar = m_aBufferString.GetChar( m_nBufferIndex );
+ aRes = aCC.parseAnyToken( m_aBufferString, m_nBufferIndex,
nStartFlags, aEmptyStr,
nContFlags, aEmptyStr );
@@ -438,7 +438,7 @@ void SmParser::NextToken()
aCC.setLocale( aDotLoc );
aTmpRes = aCC.parsePredefinedToken(
KParseType::ASC_NUMBER,
- BufferString, BufferIndex,
+ m_aBufferString, m_nBufferIndex,
KParseTokens::ASC_DIGIT, aEmptyStr,
KParseTokens::ASC_DIGIT | KParseTokens::ASC_DOT, aEmptyStr );
aCC.setLocale( aOldLoc );
@@ -446,29 +446,29 @@ void SmParser::NextToken()
aRes.TokenType = aTmpRes.TokenType;
}
- nRealStart = BufferIndex + sal::static_int_cast< xub_StrLen >(aRes.LeadingWhiteSpace);
- BufferIndex = nRealStart;
+ nRealStart = m_nBufferIndex + sal::static_int_cast< xub_StrLen >(aRes.LeadingWhiteSpace);
+ m_nBufferIndex = nRealStart;
bCont = false;
if ( aRes.TokenType == 0 &&
nRealStart < nBufLen &&
- '\n' == BufferString.GetChar( nRealStart ) )
+ '\n' == m_aBufferString.GetChar( nRealStart ) )
{
// keep data needed for tokens row and col entry up to date
- ++Row;
- BufferIndex = ColOff = nRealStart + 1;
+ ++m_Row;
+ m_nBufferIndex = m_nColOff = nRealStart + 1;
bCont = true;
}
else if (aRes.TokenType & KParseType::ONE_SINGLE_CHAR)
{
- String aName( BufferString.Copy( nRealStart, 2 ));
+ String aName( m_aBufferString.Copy( nRealStart, 2 ));
if ( aName.EqualsAscii( "%%" ))
{
//SkipComment
- BufferIndex = nRealStart + 2;
- while (BufferIndex < nBufLen &&
- '\n' != BufferString.GetChar( BufferIndex ))
- ++BufferIndex;
+ m_nBufferIndex = nRealStart + 2;
+ while (m_nBufferIndex < nBufLen &&
+ '\n' != m_aBufferString.GetChar( m_nBufferIndex ))
+ ++m_nBufferIndex;
bCont = true;
}
}
@@ -476,33 +476,33 @@ void SmParser::NextToken()
} while (bCont);
// set index of current token
- nTokenIndex = BufferIndex;
+ m_nTokenIndex = m_nBufferIndex;
- CurToken.nRow = Row;
- CurToken.nCol = nRealStart - ColOff + 1;
+ m_aCurToken.nRow = m_Row;
+ m_aCurToken.nCol = nRealStart - m_nColOff + 1;
bool bHandled = true;
if (nRealStart >= nBufLen)
{
- CurToken.eType = TEND;
- CurToken.cMathChar = '\0';
- CurToken.nGroup = 0;
- CurToken.nLevel = 0;
- CurToken.aText.Erase();
+ m_aCurToken.eType = TEND;
+ m_aCurToken.cMathChar = '\0';
+ m_aCurToken.nGroup = 0;
+ m_aCurToken.nLevel = 0;
+ m_aCurToken.aText.Erase();
}
else if ((aRes.TokenType & (KParseType::ASC_NUMBER | KParseType::UNI_NUMBER))
|| (bNumStart && (aRes.TokenType & KParseType::IDENTNAME)))
{
- INT32 n = aRes.EndPos - nRealStart;
+ sal_Int32 n = aRes.EndPos - nRealStart;
OSL_ENSURE( n >= 0, "length < 0" );
- CurToken.eType = TNUMBER;
- CurToken.cMathChar = '\0';
- CurToken.nGroup = 0;
- CurToken.nLevel = 5;
- CurToken.aText = BufferString.Copy( nRealStart, sal::static_int_cast< xub_StrLen >(n) );
+ m_aCurToken.eType = TNUMBER;
+ m_aCurToken.cMathChar = '\0';
+ m_aCurToken.nGroup = 0;
+ m_aCurToken.nLevel = 5;
+ m_aCurToken.aText = m_aBufferString.Copy( nRealStart, sal::static_int_cast< xub_StrLen >(n) );
#if OSL_DEBUG_LEVEL > 1
- if (!IsDelimiter( BufferString, static_cast< xub_StrLen >(aRes.EndPos) ))
+ if (!IsDelimiter( m_aBufferString, static_cast< xub_StrLen >(aRes.EndPos) ))
{
DBG_WARNING( "identifier really finished? (compatibility!)" );
}
@@ -510,59 +510,59 @@ void SmParser::NextToken()
}
else if (aRes.TokenType & KParseType::DOUBLE_QUOTE_STRING)
{
- CurToken.eType = TTEXT;
- CurToken.cMathChar = '\0';
- CurToken.nGroup = 0;
- CurToken.nLevel = 5;
- CurToken.aText = aRes.DequotedNameOrString;
- CurToken.nRow = Row;
- CurToken.nCol = nRealStart - ColOff + 2;
+ m_aCurToken.eType = TTEXT;
+ m_aCurToken.cMathChar = '\0';
+ m_aCurToken.nGroup = 0;
+ m_aCurToken.nLevel = 5;
+ m_aCurToken.aText = aRes.DequotedNameOrString;
+ m_aCurToken.nRow = m_Row;
+ m_aCurToken.nCol = nRealStart - m_nColOff + 2;
}
else if (aRes.TokenType & KParseType::IDENTNAME)
{
- INT32 n = aRes.EndPos - nRealStart;
+ sal_Int32 n = aRes.EndPos - nRealStart;
OSL_ENSURE( n >= 0, "length < 0" );
- String aName( BufferString.Copy( nRealStart, sal::static_int_cast< xub_StrLen >(n) ) );
+ String aName( m_aBufferString.Copy( nRealStart, sal::static_int_cast< xub_StrLen >(n) ) );
const SmTokenTableEntry *pEntry = GetTokenTableEntry( aName );
if (pEntry)
{
- CurToken.eType = pEntry->eType;
- CurToken.cMathChar = pEntry->cMathChar;
- CurToken.nGroup = pEntry->nGroup;
- CurToken.nLevel = pEntry->nLevel;
- CurToken.aText.AssignAscii( pEntry->pIdent );
+ m_aCurToken.eType = pEntry->eType;
+ m_aCurToken.cMathChar = pEntry->cMathChar;
+ m_aCurToken.nGroup = pEntry->nGroup;
+ m_aCurToken.nLevel = pEntry->nLevel;
+ m_aCurToken.aText.AssignAscii( pEntry->pIdent );
}
else
{
- CurToken.eType = TIDENT;
- CurToken.cMathChar = '\0';
- CurToken.nGroup = 0;
- CurToken.nLevel = 5;
- CurToken.aText = aName;
+ m_aCurToken.eType = TIDENT;
+ m_aCurToken.cMathChar = '\0';
+ m_aCurToken.nGroup = 0;
+ m_aCurToken.nLevel = 5;
+ m_aCurToken.aText = aName;
#if OSL_DEBUG_LEVEL > 1
- if (!IsDelimiter( BufferString, static_cast< xub_StrLen >(aRes.EndPos) ))
+ if (!IsDelimiter( m_aBufferString, static_cast< xub_StrLen >(aRes.EndPos) ))
{
DBG_WARNING( "identifier really finished? (compatibility!)" );
}
#endif
}
}
- else if (aRes.TokenType == 0 && '_' == BufferString.GetChar( nRealStart ))
+ else if (aRes.TokenType == 0 && '_' == m_aBufferString.GetChar( nRealStart ))
{
- CurToken.eType = TRSUB;
- CurToken.cMathChar = '\0';
- CurToken.nGroup = TGPOWER;
- CurToken.nLevel = 0;
- CurToken.aText.AssignAscii( "_" );
+ m_aCurToken.eType = TRSUB;
+ m_aCurToken.cMathChar = '\0';
+ m_aCurToken.nGroup = TGPOWER;
+ m_aCurToken.nLevel = 0;
+ m_aCurToken.aText.AssignAscii( "_" );
aRes.EndPos = nRealStart + 1;
}
else if (aRes.TokenType & KParseType::BOOLEAN)
{
sal_Int32 &rnEndPos = aRes.EndPos;
- String aName( BufferString.Copy( nRealStart,
+ String aName( m_aBufferString.Copy( nRealStart,
sal::static_int_cast< xub_StrLen >(rnEndPos - nRealStart) ));
if (2 >= aName.Len())
{
@@ -571,91 +571,91 @@ void SmParser::NextToken()
{
case '<':
{
- if (BufferString.Copy( nRealStart, 2 ).
+ if (m_aBufferString.Copy( nRealStart, 2 ).
EqualsAscii( "<<" ))
{
- CurToken.eType = TLL;
- CurToken.cMathChar = MS_LL;
- CurToken.nGroup = TGRELATION;
- CurToken.nLevel = 0;
- CurToken.aText.AssignAscii( "<<" );
+ m_aCurToken.eType = TLL;
+ m_aCurToken.cMathChar = MS_LL;
+ m_aCurToken.nGroup = TGRELATION;
+ m_aCurToken.nLevel = 0;
+ m_aCurToken.aText.AssignAscii( "<<" );
rnEndPos = nRealStart + 2;
}
- else if (BufferString.Copy( nRealStart, 2 ).
+ else if (m_aBufferString.Copy( nRealStart, 2 ).
EqualsAscii( "<=" ))
{
- CurToken.eType = TLE;
- CurToken.cMathChar = MS_LE;
- CurToken.nGroup = TGRELATION;
- CurToken.nLevel = 0;
- CurToken.aText.AssignAscii( "<=" );
+ m_aCurToken.eType = TLE;
+ m_aCurToken.cMathChar = MS_LE;
+ m_aCurToken.nGroup = TGRELATION;
+ m_aCurToken.nLevel = 0;
+ m_aCurToken.aText.AssignAscii( "<=" );
rnEndPos = nRealStart + 2;
}
- else if (BufferString.Copy( nRealStart, 2 ).
+ else if (m_aBufferString.Copy( nRealStart, 2 ).
EqualsAscii( "<>" ))
{
- CurToken.eType = TNEQ;
- CurToken.cMathChar = MS_NEQ;
- CurToken.nGroup = TGRELATION;
- CurToken.nLevel = 0;
- CurToken.aText.AssignAscii( "<>" );
+ m_aCurToken.eType = TNEQ;
+ m_aCurToken.cMathChar = MS_NEQ;
+ m_aCurToken.nGroup = TGRELATION;
+ m_aCurToken.nLevel = 0;
+ m_aCurToken.aText.AssignAscii( "<>" );
rnEndPos = nRealStart + 2;
}
- else if (BufferString.Copy( nRealStart, 3 ).
+ else if (m_aBufferString.Copy( nRealStart, 3 ).
EqualsAscii( "<?>" ))
{
- CurToken.eType = TPLACE;
- CurToken.cMathChar = MS_PLACE;
- CurToken.nGroup = 0;
- CurToken.nLevel = 5;
- CurToken.aText.AssignAscii( "<?>" );
+ m_aCurToken.eType = TPLACE;
+ m_aCurToken.cMathChar = MS_PLACE;
+ m_aCurToken.nGroup = 0;
+ m_aCurToken.nLevel = 5;
+ m_aCurToken.aText.AssignAscii( "<?>" );
rnEndPos = nRealStart + 3;
}
else
{
- CurToken.eType = TLT;
- CurToken.cMathChar = MS_LT;
- CurToken.nGroup = TGRELATION;
- CurToken.nLevel = 0;
- CurToken.aText.AssignAscii( "<" );
+ m_aCurToken.eType = TLT;
+ m_aCurToken.cMathChar = MS_LT;
+ m_aCurToken.nGroup = TGRELATION;
+ m_aCurToken.nLevel = 0;
+ m_aCurToken.aText.AssignAscii( "<" );
}
}
break;
case '>':
{
- if (BufferString.Copy( nRealStart, 2 ).
+ if (m_aBufferString.Copy( nRealStart, 2 ).
EqualsAscii( ">=" ))
{
- CurToken.eType = TGE;
- CurToken.cMathChar = MS_GE;
- CurToken.nGroup = TGRELATION;
- CurToken.nLevel = 0;
- CurToken.aText.AssignAscii( ">=" );
+ m_aCurToken.eType = TGE;
+ m_aCurToken.cMathChar = MS_GE;
+ m_aCurToken.nGroup = TGRELATION;
+ m_aCurToken.nLevel = 0;
+ m_aCurToken.aText.AssignAscii( ">=" );
rnEndPos = nRealStart + 2;
}
- else if (BufferString.Copy( nRealStart, 2 ).
+ else if (m_aBufferString.Copy( nRealStart, 2 ).
EqualsAscii( ">>" ))
{
- CurToken.eType = TGG;
- CurToken.cMathChar = MS_GG;
- CurToken.nGroup = TGRELATION;
- CurToken.nLevel = 0;
- CurToken.aText.AssignAscii( ">>" );
+ m_aCurToken.eType = TGG;
+ m_aCurToken.cMathChar = MS_GG;
+ m_aCurToken.nGroup = TGRELATION;
+ m_aCurToken.nLevel = 0;
+ m_aCurToken.aText.AssignAscii( ">>" );
rnEndPos = nRealStart + 2;
}
else
{
- CurToken.eType = TGT;
- CurToken.cMathChar = MS_GT;
- CurToken.nGroup = TGRELATION;
- CurToken.nLevel = 0;
- CurToken.aText.AssignAscii( ">" );
+ m_aCurToken.eType = TGT;
+ m_aCurToken.cMathChar = MS_GT;
+ m_aCurToken.nGroup = TGRELATION;
+ m_aCurToken.nLevel = 0;
+ m_aCurToken.aText.AssignAscii( ">" );
}
}
break;
@@ -667,7 +667,7 @@ void SmParser::NextToken()
else if (aRes.TokenType & KParseType::ONE_SINGLE_CHAR)
{
sal_Int32 &rnEndPos = aRes.EndPos;
- String aName( BufferString.Copy( nRealStart,
+ String aName( m_aBufferString.Copy( nRealStart,
sal::static_int_cast< xub_StrLen >(rnEndPos - nRealStart) ) );
if (1 == aName.Len())
@@ -680,12 +680,12 @@ void SmParser::NextToken()
//! modifies aRes.EndPos
OSL_ENSURE( rnEndPos >= nBufLen ||
- '%' != BufferString.GetChar( sal::static_int_cast< xub_StrLen >(rnEndPos) ),
+ '%' != m_aBufferString.GetChar( sal::static_int_cast< xub_StrLen >(rnEndPos) ),
"unexpected comment start" );
// get identifier of user-defined character
ParseResult aTmpRes = aCC.parseAnyToken(
- BufferString, rnEndPos,
+ m_aBufferString, rnEndPos,
KParseTokens::ANY_LETTER,
aEmptyStr,
coContFlags,
@@ -697,20 +697,20 @@ void SmParser::NextToken()
// default setting for the case that no identifier
// i.e. a valid symbol-name is following the '%'
// character
- CurToken.eType = TTEXT;
- CurToken.cMathChar = '\0';
- CurToken.nGroup = 0;
- CurToken.nLevel = 5;
- CurToken.aText = String();
- CurToken.nRow = sal::static_int_cast< xub_StrLen >(Row);
- CurToken.nCol = nTmpStart - ColOff;
+ m_aCurToken.eType = TTEXT;
+ m_aCurToken.cMathChar = '\0';
+ m_aCurToken.nGroup = 0;
+ m_aCurToken.nLevel = 5;
+ m_aCurToken.aText = String();
+ m_aCurToken.nRow = sal::static_int_cast< xub_StrLen >(m_Row);
+ m_aCurToken.nCol = nTmpStart - m_nColOff;
if (aTmpRes.TokenType & KParseType::IDENTNAME)
{
xub_StrLen n = sal::static_int_cast< xub_StrLen >(aTmpRes.EndPos - nTmpStart);
- CurToken.eType = TSPECIAL;
- CurToken.aText = BufferString.Copy( sal::static_int_cast< xub_StrLen >(nTmpStart-1), n+1 );
+ m_aCurToken.eType = TSPECIAL;
+ m_aCurToken.aText = m_aBufferString.Copy( sal::static_int_cast< xub_StrLen >(nTmpStart-1), n+1 );
OSL_ENSURE( aTmpRes.EndPos > rnEndPos,
"empty identifier" );
@@ -727,187 +727,187 @@ void SmParser::NextToken()
break;
case '[':
{
- CurToken.eType = TLBRACKET;
- CurToken.cMathChar = MS_LBRACKET;
- CurToken.nGroup = TGLBRACES;
- CurToken.nLevel = 5;
- CurToken.aText.AssignAscii( "[" );
+ m_aCurToken.eType = TLBRACKET;
+ m_aCurToken.cMathChar = MS_LBRACKET;
+ m_aCurToken.nGroup = TGLBRACES;
+ m_aCurToken.nLevel = 5;
+ m_aCurToken.aText.AssignAscii( "[" );
}
break;
case '\\':
{
- CurToken.eType = TESCAPE;
- CurToken.cMathChar = '\0';
- CurToken.nGroup = 0;
- CurToken.nLevel = 5;
- CurToken.aText.AssignAscii( "\\" );
+ m_aCurToken.eType = TESCAPE;
+ m_aCurToken.cMathChar = '\0';
+ m_aCurToken.nGroup = 0;
+ m_aCurToken.nLevel = 5;
+ m_aCurToken.aText.AssignAscii( "\\" );
}
break;
case ']':
{
- CurToken.eType = TRBRACKET;
- CurToken.cMathChar = MS_RBRACKET;
- CurToken.nGroup = TGRBRACES;
- CurToken.nLevel = 0;
- CurToken.aText.AssignAscii( "]" );
+ m_aCurToken.eType = TRBRACKET;
+ m_aCurToken.cMathChar = MS_RBRACKET;
+ m_aCurToken.nGroup = TGRBRACES;
+ m_aCurToken.nLevel = 0;
+ m_aCurToken.aText.AssignAscii( "]" );
}
break;
case '^':
{
- CurToken.eType = TRSUP;
- CurToken.cMathChar = '\0';
- CurToken.nGroup = TGPOWER;
- CurToken.nLevel = 0;
- CurToken.aText.AssignAscii( "^" );
+ m_aCurToken.eType = TRSUP;
+ m_aCurToken.cMathChar = '\0';
+ m_aCurToken.nGroup = TGPOWER;
+ m_aCurToken.nLevel = 0;
+ m_aCurToken.aText.AssignAscii( "^" );
}
break;
case '`':
{
- CurToken.eType = TSBLANK;
- CurToken.cMathChar = '\0';
- CurToken.nGroup = TGBLANK;
- CurToken.nLevel = 5;
- CurToken.aText.AssignAscii( "`" );
+ m_aCurToken.eType = TSBLANK;
+ m_aCurToken.cMathChar = '\0';
+ m_aCurToken.nGroup = TGBLANK;
+ m_aCurToken.nLevel = 5;
+ m_aCurToken.aText.AssignAscii( "`" );
}
break;
case '{':
{
- CurToken.eType = TLGROUP;
- CurToken.cMathChar = MS_LBRACE;
- CurToken.nGroup = 0;
- CurToken.nLevel = 5;
- CurToken.aText.AssignAscii( "{" );
+ m_aCurToken.eType = TLGROUP;
+ m_aCurToken.cMathChar = MS_LBRACE;
+ m_aCurToken.nGroup = 0;
+ m_aCurToken.nLevel = 5;
+ m_aCurToken.aText.AssignAscii( "{" );
}
break;
case '|':
{
- CurToken.eType = TOR;
- CurToken.cMathChar = MS_OR;
- CurToken.nGroup = TGSUM;
- CurToken.nLevel = 0;
- CurToken.aText.AssignAscii( "|" );
+ m_aCurToken.eType = TOR;
+ m_aCurToken.cMathChar = MS_OR;
+ m_aCurToken.nGroup = TGSUM;
+ m_aCurToken.nLevel = 0;
+ m_aCurToken.aText.AssignAscii( "|" );
}
break;
case '}':
{
- CurToken.eType = TRGROUP;
- CurToken.cMathChar = MS_RBRACE;
- CurToken.nGroup = 0;
- CurToken.nLevel = 0;
- CurToken.aText.AssignAscii( "}" );
+ m_aCurToken.eType = TRGROUP;
+ m_aCurToken.cMathChar = MS_RBRACE;
+ m_aCurToken.nGroup = 0;
+ m_aCurToken.nLevel = 0;
+ m_aCurToken.aText.AssignAscii( "}" );
}
break;
case '~':
{
- CurToken.eType = TBLANK;
- CurToken.cMathChar = '\0';
- CurToken.nGroup = TGBLANK;
- CurToken.nLevel = 5;
- CurToken.aText.AssignAscii( "~" );
+ m_aCurToken.eType = TBLANK;
+ m_aCurToken.cMathChar = '\0';
+ m_aCurToken.nGroup = TGBLANK;
+ m_aCurToken.nLevel = 5;
+ m_aCurToken.aText.AssignAscii( "~" );
}
break;
case '#':
{
- if (BufferString.Copy( nRealStart, 2 ).
+ if (m_aBufferString.Copy( nRealStart, 2 ).
EqualsAscii( "##" ))
{
- CurToken.eType = TDPOUND;
- CurToken.cMathChar = '\0';
- CurToken.nGroup = 0;
- CurToken.nLevel = 0;
- CurToken.aText.AssignAscii( "##" );
+ m_aCurToken.eType = TDPOUND;
+ m_aCurToken.cMathChar = '\0';
+ m_aCurToken.nGroup = 0;
+ m_aCurToken.nLevel = 0;
+ m_aCurToken.aText.AssignAscii( "##" );
rnEndPos = nRealStart + 2;
}
else
{
- CurToken.eType = TPOUND;
- CurToken.cMathChar = '\0';
- CurToken.nGroup = 0;
- CurToken.nLevel = 0;
- CurToken.aText.AssignAscii( "#" );
+ m_aCurToken.eType = TPOUND;
+ m_aCurToken.cMathChar = '\0';
+ m_aCurToken.nGroup = 0;
+ m_aCurToken.nLevel = 0;
+ m_aCurToken.aText.AssignAscii( "#" );
}
}
break;
case '&':
{
- CurToken.eType = TAND;
- CurToken.cMathChar = MS_AND;
- CurToken.nGroup = TGPRODUCT;
- CurToken.nLevel = 0;
- CurToken.aText.AssignAscii( "&" );
+ m_aCurToken.eType = TAND;
+ m_aCurToken.cMathChar = MS_AND;
+ m_aCurToken.nGroup = TGPRODUCT;
+ m_aCurToken.nLevel = 0;
+ m_aCurToken.aText.AssignAscii( "&" );
}
break;
case '(':
{
- CurToken.eType = TLPARENT;
- CurToken.cMathChar = MS_LPARENT;
- CurToken.nGroup = TGLBRACES;
- CurToken.nLevel = 5; //! 0 to continue expression
- CurToken.aText.AssignAscii( "(" );
+ m_aCurToken.eType = TLPARENT;
+ m_aCurToken.cMathChar = MS_LPARENT;
+ m_aCurToken.nGroup = TGLBRACES;
+ m_aCurToken.nLevel = 5; //! 0 to continue expression
+ m_aCurToken.aText.AssignAscii( "(" );
}
break;
case ')':
{
- CurToken.eType = TRPARENT;
- CurToken.cMathChar = MS_RPARENT;
- CurToken.nGroup = TGRBRACES;
- CurToken.nLevel = 0; //! 0 to terminate expression
- CurToken.aText.AssignAscii( ")" );
+ m_aCurToken.eType = TRPARENT;
+ m_aCurToken.cMathChar = MS_RPARENT;
+ m_aCurToken.nGroup = TGRBRACES;
+ m_aCurToken.nLevel = 0; //! 0 to terminate expression
+ m_aCurToken.aText.AssignAscii( ")" );
}
break;
case '*':
{
- CurToken.eType = TMULTIPLY;
- CurToken.cMathChar = MS_MULTIPLY;
- CurToken.nGroup = TGPRODUCT;
- CurToken.nLevel = 0;
- CurToken.aText.AssignAscii( "*" );
+ m_aCurToken.eType = TMULTIPLY;
+ m_aCurToken.cMathChar = MS_MULTIPLY;
+ m_aCurToken.nGroup = TGPRODUCT;
+ m_aCurToken.nLevel = 0;
+ m_aCurToken.aText.AssignAscii( "*" );
}
break;
case '+':
{
- if (BufferString.Copy( nRealStart, 2 ).
+ if (m_aBufferString.Copy( nRealStart, 2 ).
EqualsAscii( "+-" ))
{
- CurToken.eType = TPLUSMINUS;
- CurToken.cMathChar = MS_PLUSMINUS;
- CurToken.nGroup = TGUNOPER | TGSUM;
- CurToken.nLevel = 5;
- CurToken.aText.AssignAscii( "+-" );
+ m_aCurToken.eType = TPLUSMINUS;
+ m_aCurToken.cMathChar = MS_PLUSMINUS;
+ m_aCurToken.nGroup = TGUNOPER | TGSUM;
+ m_aCurToken.nLevel = 5;
+ m_aCurToken.aText.AssignAscii( "+-" );
rnEndPos = nRealStart + 2;
}
else
{
- CurToken.eType = TPLUS;
- CurToken.cMathChar = MS_PLUS;
- CurToken.nGroup = TGUNOPER | TGSUM;
- CurToken.nLevel = 5;
- CurToken.aText.AssignAscii( "+" );
+ m_aCurToken.eType = TPLUS;
+ m_aCurToken.cMathChar = MS_PLUS;
+ m_aCurToken.nGroup = TGUNOPER | TGSUM;
+ m_aCurToken.nLevel = 5;
+ m_aCurToken.aText.AssignAscii( "+" );
}
}
break;
case '-':
{
- if (BufferString.Copy( nRealStart, 2 ).
+ if (m_aBufferString.Copy( nRealStart, 2 ).
EqualsAscii( "-+" ))
{
- CurToken.eType = TMINUSPLUS;
- CurToken.cMathChar = MS_MINUSPLUS;
- CurToken.nGroup = TGUNOPER | TGSUM;
- CurToken.nLevel = 5;
- CurToken.aText.AssignAscii( "-+" );
+ m_aCurToken.eType = TMINUSPLUS;
+ m_aCurToken.cMathChar = MS_MINUSPLUS;
+ m_aCurToken.nGroup = TGUNOPER | TGSUM;
+ m_aCurToken.nLevel = 5;
+ m_aCurToken.aText.AssignAscii( "-+" );
rnEndPos = nRealStart + 2;
}
else
{
- CurToken.eType = TMINUS;
- CurToken.cMathChar = MS_MINUS;
- CurToken.nGroup = TGUNOPER | TGSUM;
- CurToken.nLevel = 5;
- CurToken.aText.AssignAscii( "-" );
+ m_aCurToken.eType = TMINUS;
+ m_aCurToken.cMathChar = MS_MINUS;
+ m_aCurToken.nGroup = TGUNOPER | TGSUM;
+ m_aCurToken.nLevel = 5;
+ m_aCurToken.aText.AssignAscii( "-" );
}
}
break;
@@ -916,40 +916,40 @@ void SmParser::NextToken()
// for compatibility with SO5.2
// texts like .34 ...56 ... h ...78..90
// will be treated as numbers
- CurToken.eType = TNUMBER;
- CurToken.cMathChar = '\0';
- CurToken.nGroup = 0;
- CurToken.nLevel = 5;
+ m_aCurToken.eType = TNUMBER;
+ m_aCurToken.cMathChar = '\0';
+ m_aCurToken.nGroup = 0;
+ m_aCurToken.nLevel = 5;
- xub_StrLen nTxtStart = BufferIndex;
+ xub_StrLen nTxtStart = m_nBufferIndex;
sal_Unicode cChar;
do
{
- cChar = BufferString.GetChar( ++BufferIndex );
+ cChar = m_aBufferString.GetChar( ++m_nBufferIndex );
}
while ( cChar == '.' || IsDigit( cChar ) );
- CurToken.aText = BufferString.Copy( sal::static_int_cast< xub_StrLen >(nTxtStart),
- sal::static_int_cast< xub_StrLen >(BufferIndex - nTxtStart) );
- aRes.EndPos = BufferIndex;
+ m_aCurToken.aText = m_aBufferString.Copy( sal::static_int_cast< xub_StrLen >(nTxtStart),
+ sal::static_int_cast< xub_StrLen >(m_nBufferIndex - nTxtStart) );
+ aRes.EndPos = m_nBufferIndex;
}
break;
case '/':
{
- CurToken.eType = TDIVIDEBY;
- CurToken.cMathChar = MS_SLASH;
- CurToken.nGroup = TGPRODUCT;
- CurToken.nLevel = 0;
- CurToken.aText.AssignAscii( "/" );
+ m_aCurToken.eType = TDIVIDEBY;
+ m_aCurToken.cMathChar = MS_SLASH;
+ m_aCurToken.nGroup = TGPRODUCT;
+ m_aCurToken.nLevel = 0;
+ m_aCurToken.aText.AssignAscii( "/" );
}
break;
case '=':
{
- CurToken.eType = TASSIGN;
- CurToken.cMathChar = MS_ASSIGN;
- CurToken.nGroup = TGRELATION;
- CurToken.nLevel = 0;
- CurToken.aText.AssignAscii( "=" );
+ m_aCurToken.eType = TASSIGN;
+ m_aCurToken.cMathChar = MS_ASSIGN;
+ m_aCurToken.nGroup = TGRELATION;
+ m_aCurToken.nLevel = 0;
+ m_aCurToken.aText.AssignAscii( "=" );
}
break;
default:
@@ -962,17 +962,17 @@ void SmParser::NextToken()
if (!bHandled)
{
- CurToken.eType = TCHARACTER;
- CurToken.cMathChar = '\0';
- CurToken.nGroup = 0;
- CurToken.nLevel = 5;
- CurToken.aText = BufferString.Copy( nRealStart, 1 );
+ m_aCurToken.eType = TCHARACTER;
+ m_aCurToken.cMathChar = '\0';
+ m_aCurToken.nGroup = 0;
+ m_aCurToken.nLevel = 5;
+ m_aCurToken.aText = m_aBufferString.Copy( nRealStart, 1 );
aRes.EndPos = nRealStart + 1;
}
- if (TEND != CurToken.eType)
- BufferIndex = sal::static_int_cast< xub_StrLen >(aRes.EndPos);
+ if (TEND != m_aCurToken.eType)
+ m_nBufferIndex = sal::static_int_cast< xub_StrLen >(aRes.EndPos);
}
@@ -986,25 +986,25 @@ void SmParser::Table()
SmNodeArray LineArray;
Line();
- while (CurToken.eType == TNEWLINE)
+ while (m_aCurToken.eType == TNEWLINE)
{
NextToken();
Line();
}
- if (CurToken.eType != TEND)
+ if (m_aCurToken.eType != TEND)
Error(PE_UNEXPECTED_CHAR);
- ULONG n = NodeStack.Count();
+ sal_uLong n = m_aNodeStack.Count();
LineArray.resize(n);
- for (ULONG i = 0; i < n; i++)
- LineArray[n - (i + 1)] = NodeStack.Pop();
+ for (sal_uLong i = 0; i < n; i++)
+ LineArray[n - (i + 1)] = m_aNodeStack.Pop();
- SmStructureNode *pSNode = new SmTableNode(CurToken);
+ SmStructureNode *pSNode = new SmTableNode(m_aCurToken);
pSNode->SetSubNodes(LineArray);
- NodeStack.Push(pSNode);
+ m_aNodeStack.Push(pSNode);
}
@@ -1026,19 +1026,21 @@ void SmParser::Align()
// (the dominant one in 4.0) and erase all others (especially old
// discarded tokens) from command string.
while (TokenInGroup(TGALIGN))
- { if (TokenInGroup(TGDISCARDED) || pSNode)
- { BufferIndex = GetTokenIndex();
- BufferString.Erase(BufferIndex, CurToken.aText.Len());
+ {
+ if (TokenInGroup(TGDISCARDED) || pSNode)
+ {
+ m_nBufferIndex = GetTokenIndex();
+ m_aBufferString.Erase(m_nBufferIndex, m_aCurToken.aText.Len());
}
else
- pSNode = new SmAlignNode(CurToken);
+ pSNode = new SmAlignNode(m_aCurToken);
NextToken();
}
}
else
{
- pSNode = new SmAlignNode(CurToken);
+ pSNode = new SmAlignNode(m_aCurToken);
NextToken();
@@ -1056,15 +1058,15 @@ void SmParser::Align()
Insert('}', GetTokenIndex());
if (pSNode)
- { pSNode->SetSubNodes(NodeStack.Pop(), 0);
- NodeStack.Push(pSNode);
+ { pSNode->SetSubNodes(m_aNodeStack.Pop(), 0);
+ m_aNodeStack.Push(pSNode);
}
}
void SmParser::Line()
{
- USHORT n = 0;
+ sal_uInt16 n = 0;
SmNodeArray ExpressionArray;
ExpressionArray.resize(n);
@@ -1072,19 +1074,19 @@ void SmParser::Line()
// start with single expression that may have an alignment statement
// (and go on with expressions that must not have alignment
// statements in 'while' loop below. See also 'Expression()'.)
- if (CurToken.eType != TEND && CurToken.eType != TNEWLINE)
+ if (m_aCurToken.eType != TEND && m_aCurToken.eType != TNEWLINE)
{ Align();
ExpressionArray.resize(++n);
- ExpressionArray[n - 1] = NodeStack.Pop();
+ ExpressionArray[n - 1] = m_aNodeStack.Pop();
}
- while (CurToken.eType != TEND && CurToken.eType != TNEWLINE)
+ while (m_aCurToken.eType != TEND && m_aCurToken.eType != TNEWLINE)
{ if (CONVERT_40_TO_50 != GetConversion())
Expression();
else
Align();
ExpressionArray.resize(++n);
- ExpressionArray[n - 1] = NodeStack.Pop();
+ ExpressionArray[n - 1] = m_aNodeStack.Pop();
}
//If there's no expression, add an empty one.
@@ -1093,44 +1095,43 @@ void SmParser::Line()
if(ExpressionArray.size() == 0)
ExpressionArray.push_back(new SmExpressionNode(SmToken()));
-
- SmStructureNode *pSNode = new SmLineNode(CurToken);
+ SmStructureNode *pSNode = new SmLineNode(m_aCurToken);
pSNode->SetSubNodes(ExpressionArray);
- NodeStack.Push(pSNode);
+ m_aNodeStack.Push(pSNode);
}
void SmParser::Expression()
{
bool bUseExtraSpaces = true;
- SmNode *pNode = NodeStack.Pop();
+ SmNode *pNode = m_aNodeStack.Pop();
if (pNode)
{
if (pNode->GetToken().eType == TNOSPACE)
bUseExtraSpaces = false;
else
- NodeStack.Push(pNode); // push the node from above again (now to be used as argument to this current 'nospace' node)
+ m_aNodeStack.Push(pNode); // push the node from above again (now to be used as argument to this current 'nospace' node)
}
- USHORT n = 0;
+ sal_uInt16 n = 0;
SmNodeArray RelationArray;
RelationArray.resize(n);
Relation();
RelationArray.resize(++n);
- RelationArray[n - 1] = NodeStack.Pop();
+ RelationArray[n - 1] = m_aNodeStack.Pop();
- while (CurToken.nLevel >= 4)
+ while (m_aCurToken.nLevel >= 4)
{ Relation();
RelationArray.resize(++n);
- RelationArray[n - 1] = NodeStack.Pop();
+ RelationArray[n - 1] = m_aNodeStack.Pop();
}
- SmExpressionNode *pSNode = new SmExpressionNode(CurToken);
+ SmExpressionNode *pSNode = new SmExpressionNode(m_aCurToken);
pSNode->SetSubNodes(RelationArray);
pSNode->SetUseExtraSpaces(bUseExtraSpaces);
- NodeStack.Push(pSNode);
+ m_aNodeStack.Push(pSNode);
}
@@ -1139,16 +1140,16 @@ void SmParser::Relation()
Sum();
while (TokenInGroup(TGRELATION))
{
- SmStructureNode *pSNode = new SmBinHorNode(CurToken);
- SmNode *pFirst = NodeStack.Pop();
+ SmStructureNode *pSNode = new SmBinHorNode(m_aCurToken);
+ SmNode *pFirst = m_aNodeStack.Pop();
OpSubSup();
- SmNode *pSecond = NodeStack.Pop();
+ SmNode *pSecond = m_aNodeStack.Pop();
Sum();
- pSNode->SetSubNodes(pFirst, pSecond, NodeStack.Pop());
- NodeStack.Push(pSNode);
+ pSNode->SetSubNodes(pFirst, pSecond, m_aNodeStack.Pop());
+ m_aNodeStack.Push(pSNode);
}
}
@@ -1158,16 +1159,16 @@ void SmParser::Sum()
Product();
while (TokenInGroup(TGSUM))
{
- SmStructureNode *pSNode = new SmBinHorNode(CurToken);
- SmNode *pFirst = NodeStack.Pop();
+ SmStructureNode *pSNode = new SmBinHorNode(m_aCurToken);
+ SmNode *pFirst = m_aNodeStack.Pop();
OpSubSup();
- SmNode *pSecond = NodeStack.Pop();
+ SmNode *pSecond = m_aNodeStack.Pop();
Product();
- pSNode->SetSubNodes(pFirst, pSecond, NodeStack.Pop());
- NodeStack.Push(pSNode);
+ pSNode->SetSubNodes(pFirst, pSecond, m_aNodeStack.Pop());
+ m_aNodeStack.Push(pSNode);
}
}
@@ -1178,36 +1179,36 @@ void SmParser::Product()
while (TokenInGroup(TGPRODUCT))
{ SmStructureNode *pSNode;
- SmNode *pFirst = NodeStack.Pop(),
+ SmNode *pFirst = m_aNodeStack.Pop(),
*pOper;
bool bSwitchArgs = false;
- SmTokenType eType = CurToken.eType;
+ SmTokenType eType = m_aCurToken.eType;
switch (eType)
{
case TOVER:
- pSNode = new SmBinVerNode(CurToken);
- pOper = new SmRectangleNode(CurToken);
+ pSNode = new SmBinVerNode(m_aCurToken);
+ pOper = new SmRectangleNode(m_aCurToken);
NextToken();
break;
case TBOPER:
- pSNode = new SmBinHorNode(CurToken);
+ pSNode = new SmBinHorNode(m_aCurToken);
NextToken();
//Let the glyph node know it's a binary operation
- CurToken.eType = TBOPER;
- CurToken.nGroup = TGPRODUCT;
+ m_aCurToken.eType = TBOPER;
+ m_aCurToken.nGroup = TGPRODUCT;
GlyphSpecial();
- pOper = NodeStack.Pop();
+ pOper = m_aNodeStack.Pop();
break;
case TOVERBRACE :
case TUNDERBRACE :
- pSNode = new SmVerticalBraceNode(CurToken);
- pOper = new SmMathSymbolNode(CurToken);
+ pSNode = new SmVerticalBraceNode(m_aCurToken);
+ pOper = new SmMathSymbolNode(m_aCurToken);
NextToken();
break;
@@ -1215,11 +1216,11 @@ void SmParser::Product()
case TWIDEBACKSLASH:
case TWIDESLASH:
{
- SmBinDiagonalNode *pSTmp = new SmBinDiagonalNode(CurToken);
+ SmBinDiagonalNode *pSTmp = new SmBinDiagonalNode(m_aCurToken);
pSTmp->SetAscending(eType == TWIDESLASH);
pSNode = pSTmp;
- pOper = new SmPolyLineNode(CurToken);
+ pOper = new SmPolyLineNode(m_aCurToken);
NextToken();
bSwitchArgs = true;
@@ -1227,25 +1228,25 @@ void SmParser::Product()
}
default:
- pSNode = new SmBinHorNode(CurToken);
+ pSNode = new SmBinHorNode(m_aCurToken);
OpSubSup();
- pOper = NodeStack.Pop();
+ pOper = m_aNodeStack.Pop();
}
Power();
if (bSwitchArgs)
//! vgl siehe SmBinDiagonalNode::Arrange
- pSNode->SetSubNodes(pFirst, NodeStack.Pop(), pOper);
+ pSNode->SetSubNodes(pFirst, m_aNodeStack.Pop(), pOper);
else
- pSNode->SetSubNodes(pFirst, pOper, NodeStack.Pop());
- NodeStack.Push(pSNode);
+ pSNode->SetSubNodes(pFirst, pOper, m_aNodeStack.Pop());
+ m_aNodeStack.Push(pSNode);
}
}
-void SmParser::SubSup(ULONG nActiveGroup)
+void SmParser::SubSup(sal_uLong nActiveGroup)
{
OSL_ENSURE(nActiveGroup == TGPOWER || nActiveGroup == TGLIMIT,
"Sm: wrong token group");
@@ -1254,8 +1255,8 @@ void SmParser::SubSup(ULONG nActiveGroup)
// already finish
return;
- SmSubSupNode *pNode = new SmSubSupNode(CurToken);
- //! Of course 'CurToken' is just the first sub-/supscript token.
+ SmSubSupNode *pNode = new SmSubSupNode(m_aCurToken);
+ //! Of course 'm_aCurToken' is just the first sub-/supscript token.
//! It should be of no further interest. The positions of the
//! sub-/supscripts will be identified by the corresponding subnodes
//! index in the 'aSubNodes' array (enum value from 'SmSubSup').
@@ -1265,14 +1266,14 @@ void SmParser::SubSup(ULONG nActiveGroup)
// initialize subnodes array
SmNodeArray aSubNodes;
aSubNodes.resize(1 + SUBSUP_NUM_ENTRIES);
- aSubNodes[0] = NodeStack.Pop();
- for (USHORT i = 1; i < aSubNodes.size(); i++)
+ aSubNodes[0] = m_aNodeStack.Pop();
+ for (sal_uInt16 i = 1; i < aSubNodes.size(); i++)
aSubNodes[i] = NULL;
// process all sub-/supscripts
int nIndex = 0;
while (TokenInGroup(nActiveGroup))
- { SmTokenType eType (CurToken.eType);
+ { SmTokenType eType (m_aCurToken.eType);
// skip sub-/supscript token
NextToken();
@@ -1305,18 +1306,18 @@ void SmParser::SubSup(ULONG nActiveGroup)
// set sub-/supscript if not already done
if (aSubNodes[nIndex] != NULL)
Error(PE_DOUBLE_SUBSUPSCRIPT);
- aSubNodes[nIndex] = NodeStack.Pop();
+ aSubNodes[nIndex] = m_aNodeStack.Pop();
}
pNode->SetSubNodes(aSubNodes);
- NodeStack.Push(pNode);
+ m_aNodeStack.Push(pNode);
}
void SmParser::OpSubSup()
{
// push operator symbol
- NodeStack.Push(new SmMathSymbolNode(CurToken));
+ m_aNodeStack.Push(new SmMathSymbolNode(m_aCurToken));
// skip operator token
NextToken();
// get sub- supscripts if any
@@ -1337,28 +1338,28 @@ void SmParser::Power()
void SmParser::Blank()
{
OSL_ENSURE(TokenInGroup(TGBLANK), "Sm : wrong token");
- SmBlankNode *pBlankNode = new SmBlankNode(CurToken);
+ SmBlankNode *pBlankNode = new SmBlankNode(m_aCurToken);
while (TokenInGroup(TGBLANK))
{
- pBlankNode->IncreaseBy(CurToken);
+ pBlankNode->IncreaseBy(m_aCurToken);
NextToken();
}
// Blanks am Zeilenende ignorieren wenn die entsprechende Option gesetzt ist
- if ( CurToken.eType == TNEWLINE ||
- (CurToken.eType == TEND && SM_MOD()->GetConfig()->IsIgnoreSpacesRight()) )
+ if ( m_aCurToken.eType == TNEWLINE ||
+ (m_aCurToken.eType == TEND && SM_MOD()->GetConfig()->IsIgnoreSpacesRight()) )
{
pBlankNode->Clear();
}
- NodeStack.Push(pBlankNode);
+ m_aNodeStack.Push(pBlankNode);
}
void SmParser::Term()
{
- switch (CurToken.eType)
+ switch (m_aCurToken.eType)
{
case TESCAPE :
Escape();
@@ -1367,15 +1368,15 @@ void SmParser::Term()
case TNOSPACE :
case TLGROUP :
{
- bool bNoSpace = CurToken.eType == TNOSPACE;
+ bool bNoSpace = m_aCurToken.eType == TNOSPACE;
if (bNoSpace) // push 'no space' node and continue to parse expression
{
- NodeStack.Push(new SmExpressionNode(CurToken));
+ m_aNodeStack.Push(new SmExpressionNode(m_aCurToken));
NextToken();
}
- if (CurToken.eType != TLGROUP)
+ if (m_aCurToken.eType != TLGROUP)
{
- NodeStack.Pop(); // get rid of the 'no space' node pushed above
+ m_aNodeStack.Pop(); // get rid of the 'no space' node pushed above
Term();
}
else
@@ -1383,20 +1384,20 @@ void SmParser::Term()
NextToken();
// allow for empty group
- if (CurToken.eType == TRGROUP)
+ if (m_aCurToken.eType == TRGROUP)
{
if (bNoSpace) // get rid of the 'no space' node pushed above
- NodeStack.Pop();
- SmStructureNode *pSNode = new SmExpressionNode(CurToken);
+ m_aNodeStack.Pop();
+ SmStructureNode *pSNode = new SmExpressionNode(m_aCurToken);
pSNode->SetSubNodes(NULL, NULL);
- NodeStack.Push(pSNode);
+ m_aNodeStack.Push(pSNode);
NextToken();
}
else // go as usual
{
Align();
- if (CurToken.eType != TRGROUP)
+ if (m_aCurToken.eType != TRGROUP)
Error(PE_RGROUP_EXPECTED);
else
NextToken();
@@ -1415,16 +1416,16 @@ void SmParser::Term()
break;
case TTEXT :
- NodeStack.Push(new SmTextNode(CurToken, FNT_TEXT));
+ m_aNodeStack.Push(new SmTextNode(m_aCurToken, FNT_TEXT));
NextToken();
break;
case TIDENT :
case TCHARACTER :
- NodeStack.Push(new SmTextNode(CurToken, FNT_VARIABLE));
+ m_aNodeStack.Push(new SmTextNode(m_aCurToken, FNT_VARIABLE));
NextToken();
break;
case TNUMBER :
- NodeStack.Push(new SmTextNode(CurToken, FNT_NUMBER));
+ m_aNodeStack.Push(new SmTextNode(m_aCurToken, FNT_NUMBER));
NextToken();
break;
@@ -1461,12 +1462,12 @@ void SmParser::Term()
case TDOTSLOW :
case TDOTSUP :
case TDOTSVERT :
- NodeStack.Push(new SmMathSymbolNode(CurToken));
+ m_aNodeStack.Push(new SmMathSymbolNode(m_aCurToken));
NextToken();
break;
case TPLACE:
- NodeStack.Push(new SmPlaceNode(CurToken));
+ m_aNodeStack.Push(new SmPlaceNode(m_aCurToken));
NextToken();
break;
@@ -1501,7 +1502,7 @@ void SmParser::Term()
{ SmStructureNodeArray aArray;
bool bIsAttr;
- USHORT n = 0;
+ sal_uInt16 n = 0;
while (true == (bIsAttr = TokenInGroup(TGATTRIBUT))
|| TokenInGroup(TGFONTATTR))
{ aArray.resize(n + 1);
@@ -1514,19 +1515,19 @@ void SmParser::Term()
// check if casting in following line is ok
OSL_ENSURE(!NodeStack.Top()->IsVisible(), "Sm : Ooops...");
- aArray[n] = (SmStructureNode *) NodeStack.Pop();
+ aArray[n] = (SmStructureNode *) m_aNodeStack.Pop();
n++;
}
Power();
- SmNode *pFirstNode = NodeStack.Pop();
+ SmNode *pFirstNode = m_aNodeStack.Pop();
while (n > 0)
{ aArray[n - 1]->SetSubNodes(0, pFirstNode);
pFirstNode = aArray[n - 1];
n--;
}
- NodeStack.Push(pFirstNode);
+ m_aNodeStack.Push(pFirstNode);
}
else if (TokenInGroup(TGFUNCTION))
{ if (CONVERT_40_TO_50 != GetConversion())
@@ -1542,9 +1543,9 @@ void SmParser::Term()
//
Function();
- SmNode *pFunc = NodeStack.Pop();
+ SmNode *pFunc = m_aNodeStack.Pop();
- if (CurToken.eType == TLPARENT)
+ if (m_aCurToken.eType == TLPARENT)
{ Term();
}
else
@@ -1555,8 +1556,8 @@ void SmParser::Term()
Insert('}', GetTokenIndex());
SmStructureNode *pSNode = new SmExpressionNode(pFunc->GetToken());
- pSNode->SetSubNodes(pFunc, NodeStack.Pop());
- NodeStack.Push(pSNode);
+ pSNode->SetSubNodes(pFunc, m_aNodeStack.Pop());
+ m_aNodeStack.Push(pSNode);
}
}
else
@@ -1569,7 +1570,7 @@ void SmParser::Escape()
{
NextToken();
- switch (CurToken.eType)
+ switch (m_aCurToken.eType)
{
case TLPARENT :
case TRPARENT :
@@ -1596,8 +1597,8 @@ void SmParser::Escape()
Error(PE_UNEXPECTED_TOKEN);
}
- SmNode *pNode = new SmMathSymbolNode(CurToken);
- NodeStack.Push(pNode);
+ SmNode *pNode = new SmMathSymbolNode(m_aCurToken);
+ m_aNodeStack.Push(pNode);
NextToken();
}
@@ -1606,27 +1607,27 @@ void SmParser::Escape()
void SmParser::Operator()
{
if (TokenInGroup(TGOPER))
- { SmStructureNode *pSNode = new SmOperNode(CurToken);
+ { SmStructureNode *pSNode = new SmOperNode(m_aCurToken);
// put operator on top of stack
Oper();
if (TokenInGroup(TGLIMIT) || TokenInGroup(TGPOWER))
- SubSup(CurToken.nGroup);
- SmNode *pOperator = NodeStack.Pop();
+ SubSup(m_aCurToken.nGroup);
+ SmNode *pOperator = m_aNodeStack.Pop();
// get argument
Power();
- pSNode->SetSubNodes(pOperator, NodeStack.Pop());
- NodeStack.Push(pSNode);
+ pSNode->SetSubNodes(pOperator, m_aNodeStack.Pop());
+ m_aNodeStack.Push(pSNode);
}
}
void SmParser::Oper()
{
- SmTokenType eType (CurToken.eType);
+ SmTokenType eType (m_aCurToken.eType);
SmNode *pNode = NULL;
switch (eType)
@@ -1640,7 +1641,7 @@ void SmParser::Oper()
case TLINT :
case TLLINT :
case TLLLINT :
- pNode = new SmMathSymbolNode(CurToken);
+ pNode = new SmMathSymbolNode(m_aCurToken);
break;
case TLIM :
@@ -1657,27 +1658,27 @@ void SmParser::Oper()
break;
}
if( pLim )
- CurToken.aText.AssignAscii( pLim );
- pNode = new SmTextNode(CurToken, FNT_TEXT);
+ m_aCurToken.aText.AssignAscii( pLim );
+ pNode = new SmTextNode(m_aCurToken, FNT_TEXT);
}
break;
case TOVERBRACE :
case TUNDERBRACE :
- pNode = new SmMathSymbolNode(CurToken);
+ pNode = new SmMathSymbolNode(m_aCurToken);
break;
case TOPER :
NextToken();
OSL_ENSURE(CurToken.eType == TSPECIAL, "Sm: wrong token");
- pNode = new SmGlyphSpecialNode(CurToken);
+ pNode = new SmGlyphSpecialNode(m_aCurToken);
break;
default :
OSL_FAIL("Sm: unknown case");
}
- NodeStack.Push(pNode);
+ m_aNodeStack.Push(pNode);
NextToken();
}
@@ -1687,8 +1688,8 @@ void SmParser::UnOper()
{
OSL_ENSURE(TokenInGroup(TGUNOPER), "Sm: wrong token");
- SmToken aNodeToken = CurToken;
- SmTokenType eType = CurToken.eType;
+ SmToken aNodeToken = m_aCurToken;
+ SmTokenType eType = m_aCurToken.eType;
bool bIsPostfix = eType == TFACT;
SmStructureNode *pSNode;
@@ -1706,16 +1707,16 @@ void SmParser::UnOper()
case TNROOT :
NextToken();
Power();
- pExtra = NodeStack.Pop();
+ pExtra = m_aNodeStack.Pop();
break;
case TUOPER :
NextToken();
//Let the glyph know what it is...
- CurToken.eType = TUOPER;
- CurToken.nGroup = TGUNOPER;
+ m_aCurToken.eType = TUOPER;
+ m_aCurToken.nGroup = TGUNOPER;
GlyphSpecial();
- pOper = NodeStack.Pop();
+ pOper = m_aNodeStack.Pop();
break;
case TPLUS :
@@ -1725,7 +1726,7 @@ void SmParser::UnOper()
case TNEG :
case TFACT :
OpSubSup();
- pOper = NodeStack.Pop();
+ pOper = m_aNodeStack.Pop();
break;
default :
@@ -1734,7 +1735,7 @@ void SmParser::UnOper()
// get argument
Power();
- pArg = NodeStack.Pop();
+ pArg = m_aNodeStack.Pop();
if (eType == TABS)
{ pSNode = new SmBraceNode(aNodeToken);
@@ -1768,7 +1769,7 @@ void SmParser::UnOper()
pSNode->SetSubNodes(pOper, pArg);
}
- NodeStack.Push(pSNode);
+ m_aNodeStack.Push(pSNode);
}
@@ -1776,35 +1777,35 @@ void SmParser::Attribut()
{
OSL_ENSURE(TokenInGroup(TGATTRIBUT), "Sm: wrong token group");
- SmStructureNode *pSNode = new SmAttributNode(CurToken);
+ SmStructureNode *pSNode = new SmAttributNode(m_aCurToken);
SmNode *pAttr;
SmScaleMode eScaleMode = SCALE_NONE;
// get appropriate node for the attribut itself
- switch (CurToken.eType)
+ switch (m_aCurToken.eType)
{ case TUNDERLINE :
case TOVERLINE :
case TOVERSTRIKE :
- pAttr = new SmRectangleNode(CurToken);
+ pAttr = new SmRectangleNode(m_aCurToken);
eScaleMode = SCALE_WIDTH;
break;
case TWIDEVEC :
case TWIDEHAT :
case TWIDETILDE :
- pAttr = new SmMathSymbolNode(CurToken);
+ pAttr = new SmMathSymbolNode(m_aCurToken);
eScaleMode = SCALE_WIDTH;
break;
default :
- pAttr = new SmMathSymbolNode(CurToken);
+ pAttr = new SmMathSymbolNode(m_aCurToken);
}
NextToken();
pSNode->SetSubNodes(pAttr, 0);
pSNode->SetScaleMode(eScaleMode);
- NodeStack.Push(pSNode);
+ m_aNodeStack.Push(pSNode);
}
@@ -1812,14 +1813,14 @@ void SmParser::FontAttribut()
{
OSL_ENSURE(TokenInGroup(TGFONTATTR), "Sm: wrong token group");
- switch (CurToken.eType)
+ switch (m_aCurToken.eType)
{
case TITALIC :
case TNITALIC :
case TBOLD :
case TNBOLD :
case TPHANTOM :
- NodeStack.Push(new SmFontNode(CurToken));
+ m_aNodeStack.Push(new SmFontNode(m_aCurToken));
NextToken();
break;
@@ -1851,14 +1852,14 @@ void SmParser::Color()
{ NextToken();
if (TokenInGroup(TGCOLOR))
- { aToken = CurToken;
+ { aToken = m_aCurToken;
NextToken();
}
else
Error(PE_COLOR_EXPECTED);
- } while (CurToken.eType == TCOLOR);
+ } while (m_aCurToken.eType == TCOLOR);
- NodeStack.Push(new SmFontNode(aToken));
+ m_aNodeStack.Push(new SmFontNode(aToken));
}
@@ -1872,14 +1873,14 @@ void SmParser::Font()
{ NextToken();
if (TokenInGroup(TGFONT))
- { aToken = CurToken;
+ { aToken = m_aCurToken;
NextToken();
}
else
Error(PE_FONT_EXPECTED);
- } while (CurToken.eType == TFONT);
+ } while (m_aCurToken.eType == TFONT);
- NodeStack.Push(new SmFontNode(aToken));
+ m_aNodeStack.Push(new SmFontNode(aToken));
}
@@ -1909,12 +1910,12 @@ void SmParser::FontSize()
{
OSL_ENSURE(CurToken.eType == TSIZE, "Sm : Ooops...");
- USHORT Type;
- SmFontNode *pFontNode = new SmFontNode(CurToken);
+ sal_uInt16 Type;
+ SmFontNode *pFontNode = new SmFontNode(m_aCurToken);
NextToken();
- switch (CurToken.eType)
+ switch (m_aCurToken.eType)
{
case TNUMBER: Type = FNTSIZ_ABSOLUT; break;
case TPLUS: Type = FNTSIZ_PLUS; break;
@@ -1931,7 +1932,7 @@ void SmParser::FontSize()
if (Type != FNTSIZ_ABSOLUT)
{
NextToken();
- if (CurToken.eType != TNUMBER)
+ if (m_aCurToken.eType != TNUMBER)
{
delete pFontNode;
Error(PE_SIZE_EXPECTED);
@@ -1941,10 +1942,10 @@ void SmParser::FontSize()
// get number argument
Fraction aValue( 1L );
- if (lcl_IsNumber( CurToken.aText ))
+ if (lcl_IsNumber( m_aCurToken.aText ))
{
double fTmp;
- if ((fTmp = CurToken.aText.ToDouble()) != 0.0)
+ if ((fTmp = m_aCurToken.aText.ToDouble()) != 0.0)
{
aValue = fTmp;
@@ -1970,7 +1971,7 @@ void SmParser::FontSize()
NextToken();
pFontNode->SetSizeParameter(aValue, Type);
- NodeStack.Push(pFontNode);
+ m_aNodeStack.Push(pFontNode);
}
@@ -1979,14 +1980,14 @@ void SmParser::Brace()
OSL_ENSURE(CurToken.eType == TLEFT || TokenInGroup(TGLBRACES),
"Sm: kein Klammer Ausdruck");
- SmStructureNode *pSNode = new SmBraceNode(CurToken);
+ SmStructureNode *pSNode = new SmBraceNode(m_aCurToken);
SmNode *pBody = 0,
*pLeft = 0,
*pRight = 0;
SmScaleMode eScaleMode = SCALE_NONE;
SmParseError eError = PE_NONE;
- if (CurToken.eType == TLEFT)
+ if (m_aCurToken.eType == TLEFT)
{ NextToken();
eScaleMode = SCALE_HEIGHT;
@@ -1994,19 +1995,19 @@ void SmParser::Brace()
// check for left bracket
if (TokenInGroup(TGLBRACES) || TokenInGroup(TGRBRACES))
{
- pLeft = new SmMathSymbolNode(CurToken);
+ pLeft = new SmMathSymbolNode(m_aCurToken);
NextToken();
Bracebody(true);
- pBody = NodeStack.Pop();
+ pBody = m_aNodeStack.Pop();
- if (CurToken.eType == TRIGHT)
+ if (m_aCurToken.eType == TRIGHT)
{ NextToken();
// check for right bracket
if (TokenInGroup(TGLBRACES) || TokenInGroup(TGRBRACES))
{
- pRight = new SmMathSymbolNode(CurToken);
+ pRight = new SmMathSymbolNode(m_aCurToken);
NextToken();
}
else
@@ -2022,11 +2023,11 @@ void SmParser::Brace()
{
if (TokenInGroup(TGLBRACES))
{
- pLeft = new SmMathSymbolNode(CurToken);
+ pLeft = new SmMathSymbolNode(m_aCurToken);
NextToken();
Bracebody(false);
- pBody = NodeStack.Pop();
+ pBody = m_aNodeStack.Pop();
SmTokenType eExpectedType = TUNKNOWN;
switch (pLeft->GetToken().eType)
@@ -2043,9 +2044,9 @@ void SmParser::Brace()
OSL_FAIL("Sm: unknown case");
}
- if (CurToken.eType == eExpectedType)
+ if (m_aCurToken.eType == eExpectedType)
{
- pRight = new SmMathSymbolNode(CurToken);
+ pRight = new SmMathSymbolNode(m_aCurToken);
NextToken();
}
else
@@ -2060,7 +2061,7 @@ void SmParser::Brace()
OSL_ENSURE(pRight, "Sm: NULL pointer");
pSNode->SetSubNodes(pLeft, pBody, pRight);
pSNode->SetScaleMode(eScaleMode);
- NodeStack.Push(pSNode);
+ m_aNodeStack.Push(pSNode);
}
else
{ delete pSNode;
@@ -2075,37 +2076,37 @@ void SmParser::Brace()
void SmParser::Bracebody(bool bIsLeftRight)
{
- SmStructureNode *pBody = new SmBracebodyNode(CurToken);
+ SmStructureNode *pBody = new SmBracebodyNode(m_aCurToken);
SmNodeArray aNodes;
- USHORT nNum = 0;
+ sal_uInt16 nNum = 0;
// get body if any
if (bIsLeftRight)
{
do
{
- if (CurToken.eType == TMLINE)
+ if (m_aCurToken.eType == TMLINE)
{
- NodeStack.Push(new SmMathSymbolNode(CurToken));
+ m_aNodeStack.Push(new SmMathSymbolNode(m_aCurToken));
NextToken();
nNum++;
}
- else if (CurToken.eType != TRIGHT)
+ else if (m_aCurToken.eType != TRIGHT)
{ Align();
nNum++;
- if (CurToken.eType != TMLINE && CurToken.eType != TRIGHT)
+ if (m_aCurToken.eType != TMLINE && m_aCurToken.eType != TRIGHT)
Error(PE_RIGHT_EXPECTED);
}
- } while (CurToken.eType != TEND && CurToken.eType != TRIGHT);
+ } while (m_aCurToken.eType != TEND && m_aCurToken.eType != TRIGHT);
}
else
{
do
{
- if (CurToken.eType == TMLINE)
+ if (m_aCurToken.eType == TMLINE)
{
- NodeStack.Push(new SmMathSymbolNode(CurToken));
+ m_aNodeStack.Push(new SmMathSymbolNode(m_aCurToken));
NextToken();
nNum++;
}
@@ -2113,26 +2114,26 @@ void SmParser::Bracebody(bool bIsLeftRight)
{ Align();
nNum++;
- if (CurToken.eType != TMLINE && !TokenInGroup(TGRBRACES))
+ if (m_aCurToken.eType != TMLINE && !TokenInGroup(TGRBRACES))
Error(PE_RBRACE_EXPECTED);
}
- } while (CurToken.eType != TEND && !TokenInGroup(TGRBRACES));
+ } while (m_aCurToken.eType != TEND && !TokenInGroup(TGRBRACES));
}
// build argument vector in parsing order
aNodes.resize(nNum);
- for (USHORT i = 0; i < nNum; i++)
- aNodes[nNum - 1 - i] = NodeStack.Pop();
+ for (sal_uInt16 i = 0; i < nNum; i++)
+ aNodes[nNum - 1 - i] = m_aNodeStack.Pop();
pBody->SetSubNodes(aNodes);
pBody->SetScaleMode(bIsLeftRight ? SCALE_HEIGHT : SCALE_NONE);
- NodeStack.Push(pBody);
+ m_aNodeStack.Push(pBody);
}
void SmParser::Function()
{
- switch (CurToken.eType)
+ switch (m_aCurToken.eType)
{
case TFUNC:
NextToken(); // skip "FUNC"-statement
@@ -2157,7 +2158,7 @@ void SmParser::Function()
case TLN :
case TLOG :
case TEXP :
- NodeStack.Push(new SmTextNode(CurToken, FNT_FUNCTION));
+ m_aNodeStack.Push(new SmTextNode(m_aCurToken, FNT_FUNCTION));
NextToken();
break;
@@ -2170,7 +2171,7 @@ void SmParser::Function()
void SmParser::Binom()
{
SmNodeArray ExpressionArray;
- SmStructureNode *pSNode = new SmTableNode(CurToken);
+ SmStructureNode *pSNode = new SmTableNode(m_aCurToken);
NextToken();
@@ -2180,10 +2181,10 @@ void SmParser::Binom()
ExpressionArray.resize(2);
for (int i = 0; i < 2; i++)
- ExpressionArray[2 - (i + 1)] = NodeStack.Pop();
+ ExpressionArray[2 - (i + 1)] = m_aNodeStack.Pop();
pSNode->SetSubNodes(ExpressionArray);
- NodeStack.Push(pSNode);
+ m_aNodeStack.Push(pSNode);
}
@@ -2191,9 +2192,9 @@ void SmParser::Stack()
{
SmNodeArray ExpressionArray;
NextToken();
- if (CurToken.eType == TLGROUP)
+ if (m_aCurToken.eType == TLGROUP)
{
- USHORT n = 0;
+ sal_uInt16 n = 0;
do
{
@@ -2201,25 +2202,25 @@ void SmParser::Stack()
Align();
n++;
}
- while (CurToken.eType == TPOUND);
+ while (m_aCurToken.eType == TPOUND);
ExpressionArray.resize(n);
- for (USHORT i = 0; i < n; i++)
- ExpressionArray[n - (i + 1)] = NodeStack.Pop();
+ for (sal_uInt16 i = 0; i < n; i++)
+ ExpressionArray[n - (i + 1)] = m_aNodeStack.Pop();
- if (CurToken.eType != TRGROUP)
+ if (m_aCurToken.eType != TRGROUP)
Error(PE_RGROUP_EXPECTED);
NextToken();
//We need to let the table node know it context
//it's used in SmNodeToTextVisitor
- SmToken aTok = CurToken;
+ SmToken aTok = m_aCurToken;
aTok.eType = TSTACK;
SmStructureNode *pSNode = new SmTableNode(aTok);
pSNode->SetSubNodes(ExpressionArray);
- NodeStack.Push(pSNode);
+ m_aNodeStack.Push(pSNode);
}
else
Error(PE_LGROUP_EXPECTED);
@@ -2231,9 +2232,9 @@ void SmParser::Matrix()
SmNodeArray ExpressionArray;
NextToken();
- if (CurToken.eType == TLGROUP)
+ if (m_aCurToken.eType == TLGROUP)
{
- USHORT c = 0;
+ sal_uInt16 c = 0;
do
{
@@ -2241,19 +2242,19 @@ void SmParser::Matrix()
Align();
c++;
}
- while (CurToken.eType == TPOUND);
+ while (m_aCurToken.eType == TPOUND);
- USHORT r = 1;
+ sal_uInt16 r = 1;
- while (CurToken.eType == TDPOUND)
+ while (m_aCurToken.eType == TDPOUND)
{
NextToken();
- for (USHORT i = 0; i < c; i++)
+ for (sal_uInt16 i = 0; i < c; i++)
{
Align();
if (i < (c - 1))
{
- if (CurToken.eType == TPOUND)
+ if (m_aCurToken.eType == TPOUND)
{
NextToken();
}
@@ -2269,18 +2270,18 @@ void SmParser::Matrix()
ExpressionArray.resize(nRC);
- for (USHORT i = 0; i < (nRC); i++)
- ExpressionArray[(nRC) - (i + 1)] = NodeStack.Pop();
+ for (sal_uInt16 i = 0; i < (nRC); i++)
+ ExpressionArray[(nRC) - (i + 1)] = m_aNodeStack.Pop();
- if (CurToken.eType != TRGROUP)
+ if (m_aCurToken.eType != TRGROUP)
Error(PE_RGROUP_EXPECTED);
NextToken();
- SmMatrixNode *pMNode = new SmMatrixNode(CurToken);
+ SmMatrixNode *pMNode = new SmMatrixNode(m_aCurToken);
pMNode->SetSubNodes(ExpressionArray);
pMNode->SetRowCol(r, c);
- NodeStack.Push(pMNode);
+ m_aNodeStack.Push(pMNode);
}
else
Error(PE_LGROUP_EXPECTED);
@@ -2290,7 +2291,7 @@ void SmParser::Matrix()
void SmParser::Special()
{
bool bReplace = false;
- String &rName = CurToken.aText;
+ String &rName = m_aCurToken.aText;
String aNewName;
if (CONVERT_NONE == GetConversion())
@@ -2336,8 +2337,8 @@ void SmParser::Special()
{
OSL_ENSURE( pFrom->Count() == pTo->Count(),
"array length mismatch" );
- USHORT nCount = sal::static_int_cast< USHORT >(pFrom->Count());
- for (USHORT i = 0; i < nCount; ++i)
+ sal_uInt16 nCount = sal::static_int_cast< sal_uInt16 >(pFrom->Count());
+ for (sal_uInt16 i = 0; i < nCount; ++i)
{
if (pFrom->GetString(i) == rName)
{
@@ -2357,28 +2358,33 @@ void SmParser::Special()
rName = aNewName;
}
- NodeStack.Push(new SmSpecialNode(CurToken));
+ // add symbol name to list of used symbols
+ const String aSymbolName( m_aCurToken.aText.Copy( 1 ) );
+ if (aSymbolName.Len() > 0 )
+ AddToUsedSymbols( aSymbolName );
+
+ m_aNodeStack.Push(new SmSpecialNode(m_aCurToken));
NextToken();
}
void SmParser::GlyphSpecial()
{
- NodeStack.Push(new SmGlyphSpecialNode(CurToken));
+ m_aNodeStack.Push(new SmGlyphSpecialNode(m_aCurToken));
NextToken();
}
void SmParser::Error(SmParseError eError)
{
- SmStructureNode *pSNode = new SmExpressionNode(CurToken);
- SmErrorNode *pErr = new SmErrorNode(eError, CurToken);
+ SmStructureNode *pSNode = new SmExpressionNode(m_aCurToken);
+ SmErrorNode *pErr = new SmErrorNode(eError, m_aCurToken);
pSNode->SetSubNodes(pErr, 0);
//! put a structure node on the stack (instead of the error node itself)
//! because sometimes such a node is expected in order to attach some
//! subnodes
- NodeStack.Push(pSNode);
+ m_aNodeStack.Push(pSNode);
AddError(eError, pSNode);
@@ -2391,56 +2397,57 @@ void SmParser::Error(SmParseError eError)
SmParser::SmParser()
{
- eConversion = CONVERT_NONE;
- bImportSymNames = bExportSymNames = false;
- nLang = Application::GetSettings().GetUILanguage();
+ m_eConversion = CONVERT_NONE;
+ bImportSymNames = m_bExportSymNames = false;
+ m_nLang = Application::GetSettings().GetUILanguage();
}
-
SmNode *SmParser::Parse(const String &rBuffer)
{
- BufferString = rBuffer;
- BufferString.ConvertLineEnd( LINEEND_LF );
- BufferIndex = 0;
- nTokenIndex = 0;
- Row = 1;
- ColOff = 0;
- CurError = -1;
+ ClearUsedSymbols();
+
+ m_aBufferString = rBuffer;
+ m_aBufferString.ConvertLineEnd( LINEEND_LF );
+ m_nBufferIndex = 0;
+ m_nTokenIndex = 0;
+ m_Row = 1;
+ m_nColOff = 0;
+ m_nCurError = -1;
- for ( size_t i = 0, n = ErrDescList.size(); i < n; ++i )
- delete ErrDescList[ i ];
- ErrDescList.clear();
+ for ( size_t i = 0, n = m_aErrDescList.size(); i < n; ++i )
+ delete m_aErrDescList[ i ];
+ m_aErrDescList.clear();
- NodeStack.Clear();
+ m_aNodeStack.Clear();
SetLanguage( Application::GetSettings().GetUILanguage() );
NextToken();
Table();
- return NodeStack.Pop();
+ return m_aNodeStack.Pop();
}
SmNode *SmParser::ParseExpression(const String &rBuffer)
{
- BufferString = rBuffer;
- BufferString.ConvertLineEnd( LINEEND_LF );
- BufferIndex = 0;
- nTokenIndex = 0;
- Row = 1;
- ColOff = 0;
- CurError = -1;
+ m_aBufferString = rBuffer;
+ m_aBufferString.ConvertLineEnd( LINEEND_LF );
+ m_nBufferIndex = 0;
+ m_nTokenIndex = 0;
+ m_Row = 1;
+ m_nColOff = 0;
+ m_nCurError = -1;
- for ( size_t i = 0, n = ErrDescList.size(); i < n; ++i )
- delete ErrDescList[ i ];
- ErrDescList.clear();
+ for ( size_t i = 0, n = m_aErrDescList.size(); i < n; ++i )
+ delete m_aErrDescList[ i ];
+ m_aErrDescList.clear();
- NodeStack.Clear();
+ m_aNodeStack.Clear();
SetLanguage( Application::GetSettings().GetUILanguage() );
NextToken();
Expression();
- return NodeStack.Pop();
+ return m_aNodeStack.Pop();
}
@@ -2452,7 +2459,7 @@ size_t SmParser::AddError(SmParseError Type, SmNode *pNode)
pErrDesc->pNode = pNode;
pErrDesc->Text = String(SmResId(RID_ERR_IDENT));
- USHORT nRID;
+ sal_uInt16 nRID;
switch (Type)
{
case PE_UNEXPECTED_CHAR: nRID = RID_ERR_UNEXPECTEDCHARACTER; break;
@@ -2474,20 +2481,20 @@ size_t SmParser::AddError(SmParseError Type, SmNode *pNode)
}
pErrDesc->Text += SmResId(nRID);
- ErrDescList.push_back( pErrDesc );
+ m_aErrDescList.push_back( pErrDesc );
- return ErrDescList.size()-1;
+ return m_aErrDescList.size()-1;
}
const SmErrorDesc *SmParser::NextError()
{
- if ( !ErrDescList.empty() )
- if (CurError > 0) return ErrDescList[ --CurError ];
+ if ( !m_aErrDescList.empty() )
+ if (m_nCurError > 0) return m_aErrDescList[ --m_nCurError ];
else
{
- CurError = 0;
- return ErrDescList[ CurError ];
+ m_nCurError = 0;
+ return m_aErrDescList[ m_nCurError ];
}
else return NULL;
}
@@ -2495,12 +2502,12 @@ const SmErrorDesc *SmParser::NextError()
const SmErrorDesc *SmParser::PrevError()
{
- if ( !ErrDescList.empty() )
- if (CurError < (int) (ErrDescList.size() - 1)) return ErrDescList[ ++CurError ];
+ if ( !m_aErrDescList.empty() )
+ if (m_nCurError < (int) (m_aErrDescList.size() - 1)) return m_aErrDescList[ ++m_nCurError ];
else
{
- CurError = (int) (ErrDescList.size() - 1);
- return ErrDescList[ CurError ];
+ m_nCurError = (int) (m_aErrDescList.size() - 1);
+ return m_aErrDescList[ m_nCurError ];
}
else return NULL;
}
@@ -2508,9 +2515,9 @@ const SmErrorDesc *SmParser::PrevError()
const SmErrorDesc *SmParser::GetError(size_t i)
{
- return ( i < ErrDescList.size() )
- ? ErrDescList[ i ]
- : ErrDescList[ CurError ];
+ return ( i < m_aErrDescList.size() )
+ ? m_aErrDescList[ i ]
+ : m_aErrDescList[ m_nCurError ];
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/starmath/source/rect.cxx b/starmath/source/rect.cxx
index 2735e3e7c140..b69abbd455c6 100644
--- a/starmath/source/rect.cxx
+++ b/starmath/source/rect.cxx
@@ -140,7 +140,7 @@ void SmRect::CopyAlignInfo(const SmRect &rRect)
void SmRect::BuildRect(const OutputDevice &rDev, const SmFormat *pFormat,
- const XubString &rText, USHORT nBorder)
+ const XubString &rText, sal_uInt16 nBorder)
{
OSL_ENSURE(aTopLeft == Point(0, 0), "Sm: Ooops...");
@@ -235,7 +235,7 @@ void SmRect::BuildRect(const OutputDevice &rDev, const SmFormat *pFormat,
void SmRect::Init(const OutputDevice &rDev, const SmFormat *pFormat,
- const XubString &rText, USHORT nEBorderWidth)
+ const XubString &rText, sal_uInt16 nEBorderWidth)
// get rectangle fitting for drawing 'rText' on OutputDevice 'rDev'
{
BuildRect(rDev, pFormat, rText, nEBorderWidth);
@@ -248,7 +248,7 @@ SmRect::SmRect(const OutputDevice &rDev, const SmFormat *pFormat,
OSL_ENSURE( nEBorderWidth >= 0, "BorderWidth is negative" );
if (nEBorderWidth < 0)
nEBorderWidth = 0;
- Init(rDev, pFormat, rText, (USHORT) nEBorderWidth);
+ Init(rDev, pFormat, rText, (sal_uInt16) nEBorderWidth);
}
diff --git a/starmath/source/register.cxx b/starmath/source/register.cxx
index 3171c320f127..5d68f35e9f16 100644
--- a/starmath/source/register.cxx
+++ b/starmath/source/register.cxx
@@ -119,92 +119,6 @@ void SAL_CALL component_getImplementationEnvironment(
*ppEnvironmentTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ;
}
-sal_Bool SAL_CALL component_writeInfo( void* /*pServiceManager*/,
- void* pRegistryKey )
-{
- Reference< registry::XRegistryKey >
- xKey( reinterpret_cast< registry::XRegistryKey* >( pRegistryKey ) ) ;
-
- OUString aDelimiter( RTL_CONSTASCII_USTRINGPARAM("/") );
- OUString aUnoServices( RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES") );
-
- // Actual implementation and register its services
- sal_Int32 i;
- Reference< registry::XRegistryKey > xNewKey;
-
- xNewKey = xKey->createKey( aDelimiter + SmXMLImport_getImplementationName() +
- aUnoServices );
-
- Sequence< OUString > aServices = SmXMLImport_getSupportedServiceNames();
- for(i = 0; i < aServices.getLength(); i++ )
- xNewKey->createKey( aServices.getConstArray()[i] );
-
- xNewKey = xKey->createKey( aDelimiter + SmXMLExport_getImplementationName() +
- aUnoServices );
-
- aServices = SmXMLExport_getSupportedServiceNames();
- for(i = 0; i < aServices.getLength(); i++ )
- xNewKey->createKey( aServices.getConstArray()[i] );
-
- xNewKey = xKey->createKey( aDelimiter + SmXMLImportMeta_getImplementationName() +
- aUnoServices );
-
- aServices = SmXMLImportMeta_getSupportedServiceNames();
- for(i = 0; i < aServices.getLength(); i++ )
- xNewKey->createKey( aServices.getConstArray()[i] );
-
- xNewKey = xKey->createKey( aDelimiter + SmXMLExportMetaOOO_getImplementationName() +
- aUnoServices );
-
- aServices = SmXMLExportMetaOOO_getSupportedServiceNames();
- for(i = 0; i < aServices.getLength(); i++ )
- xNewKey->createKey( aServices.getConstArray()[i] );
-
- xNewKey = xKey->createKey( aDelimiter + SmXMLExportMeta_getImplementationName() +
- aUnoServices );
-
- aServices = SmXMLExportMeta_getSupportedServiceNames();
- for(i = 0; i < aServices.getLength(); i++ )
- xNewKey->createKey( aServices.getConstArray()[i] );
-
- xNewKey = xKey->createKey( aDelimiter + SmXMLImportSettings_getImplementationName() +
- aUnoServices );
-
- aServices = SmXMLImportSettings_getSupportedServiceNames();
- for(i = 0; i < aServices.getLength(); i++ )
- xNewKey->createKey( aServices.getConstArray()[i] );
-
- xNewKey = xKey->createKey( aDelimiter + SmXMLExportSettingsOOO_getImplementationName() +
- aUnoServices );
-
- aServices = SmXMLExportSettingsOOO_getSupportedServiceNames();
- for(i = 0; i < aServices.getLength(); i++ )
- xNewKey->createKey( aServices.getConstArray()[i] );
-
- xNewKey = xKey->createKey( aDelimiter + SmXMLExportSettings_getImplementationName() +
- aUnoServices );
-
- aServices = SmXMLExportSettings_getSupportedServiceNames();
- for(i = 0; i < aServices.getLength(); i++ )
- xNewKey->createKey( aServices.getConstArray()[i] );
-
- xNewKey = xKey->createKey( aDelimiter + SmXMLExportContent_getImplementationName() +
- aUnoServices );
-
- aServices = SmXMLExportContent_getSupportedServiceNames();
- for(i = 0; i < aServices.getLength(); i++ )
- xNewKey->createKey( aServices.getConstArray()[i] );
-
- xNewKey = xKey->createKey( aDelimiter + SmDocument_getImplementationName() +
- aUnoServices );
-
- aServices = SmDocument_getSupportedServiceNames();
- for(i = 0; i < aServices.getLength(); i++ )
- xNewKey->createKey( aServices.getConstArray()[i] );
-
- return sal_True;
-}
-
void* SAL_CALL component_getFactory( const sal_Char* pImplementationName,
void* pServiceManager,
void* /*pRegistryKey*/ )
diff --git a/starmath/source/smdetect.cxx b/starmath/source/smdetect.cxx
index c497e393f513..4c8e0075a4ef 100644
--- a/starmath/source/smdetect.cxx
+++ b/starmath/source/smdetect.cxx
@@ -31,7 +31,7 @@
#include "smdetect.hxx"
-#include <framework/interaction.hxx>
+//#include <framework/interaction.hxx>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/frame/XFrame.hpp>
@@ -170,7 +170,7 @@ SmFilterDetect::~SmFilterDetect()
SfxApplication* pApp = SFX_APP();
SfxAllItemSet *pSet = new SfxAllItemSet( pApp->GetPool() );
TransformParameters( SID_OPENDOC, lDescriptor, *pSet );
- SFX_ITEMSET_ARG( pSet, pItem, SfxBoolItem, SID_DOC_READONLY, FALSE );
+ SFX_ITEMSET_ARG( pSet, pItem, SfxBoolItem, SID_DOC_READONLY, sal_False );
bWasReadOnly = pItem && pItem->GetValue();
@@ -191,7 +191,7 @@ SmFilterDetect::~SmFilterDetect()
else
{
// ctor of SfxMedium uses owner transition of ItemSet
- SfxMedium aMedium( aURL, bWasReadOnly ? STREAM_STD_READ : STREAM_STD_READWRITE, FALSE, NULL, pSet );
+ SfxMedium aMedium( aURL, bWasReadOnly ? STREAM_STD_READ : STREAM_STD_READWRITE, sal_False, NULL, pSet );
aMedium.UseInteractionHandler( true );
bool bIsStorage = aMedium.IsStorage();
@@ -243,7 +243,7 @@ SmFilterDetect::~SmFilterDetect()
String aTmpFilterName;
if ( pFilter )
aTmpFilterName = pFilter->GetName();
- aTypeName = SfxFilter::GetTypeFromStorage( xStorage, pFilter ? pFilter->IsAllowedAsTemplate() : FALSE, &aTmpFilterName );
+ aTypeName = SfxFilter::GetTypeFromStorage( xStorage, pFilter ? pFilter->IsAllowedAsTemplate() : sal_False, &aTmpFilterName );
}
catch( lang::WrappedTargetException& aWrap )
{
@@ -263,20 +263,16 @@ SmFilterDetect::~SmFilterDetect()
if ( !bRepairPackage )
{
// ask the user whether he wants to try to repair
- RequestPackageReparation* pRequest = new RequestPackageReparation( aDocumentTitle );
- uno::Reference< task::XInteractionRequest > xRequest ( pRequest );
-
- xInteraction->handle( xRequest );
-
- bRepairAllowed = pRequest->isApproved();
+ RequestPackageReparation aRequest( aDocumentTitle );
+ xInteraction->handle( aRequest.GetRequest() );
+ bRepairAllowed = aRequest.isApproved();
}
if ( !bRepairAllowed )
{
// repair either not allowed or not successful
- NotifyBrokenPackage* pNotifyRequest = new NotifyBrokenPackage( aDocumentTitle );
- uno::Reference< task::XInteractionRequest > xRequest ( pNotifyRequest );
- xInteraction->handle( xRequest );
+ NotifyBrokenPackage aNotifyRequest( aDocumentTitle );
+ xInteraction->handle( aNotifyRequest.GetRequest() );
}
}
@@ -311,7 +307,7 @@ SmFilterDetect::~SmFilterDetect()
aTypeName.Erase();
if (pStrm && !pStrm->GetError())
{
- SotStorageRef aStorage = new SotStorage ( pStrm, FALSE );
+ SotStorageRef aStorage = new SotStorage ( pStrm, sal_False );
if ( !aStorage->GetError() )
{
if ( aStorage->IsStream( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "Equation Native" ) ) ) )
@@ -323,11 +319,11 @@ SmFilterDetect::~SmFilterDetect()
}
else
{
- const USHORT nSize = 5;
+ const sal_uInt16 nSize = 5;
sal_Char aBuffer[nSize+1];
aBuffer[nSize] = 0;
pStrm->Seek( STREAM_SEEK_TO_BEGIN );
- ULONG nBytesRead = pStrm->Read( aBuffer, nSize );
+ sal_uLong nBytesRead = pStrm->Read( aBuffer, nSize );
if (nBytesRead == nSize)
{
if (0 == strncmp( "<?xml",aBuffer,nSize))
diff --git a/starmath/source/smmod.cxx b/starmath/source/smmod.cxx
index 904394d01735..669a26ab39ef 100644..100755
--- a/starmath/source/smmod.cxx
+++ b/starmath/source/smmod.cxx
@@ -63,7 +63,7 @@ TYPEINIT1( SmModule, SfxModule );
-SmResId::SmResId( USHORT nId )
+SmResId::SmResId( sal_uInt16 nId )
: ResId(nId, *SM_MOD()->GetResMgr())
{
}
@@ -99,8 +99,8 @@ const String SmLocalizedSymbolData::GetUiSymbolName( const String &rExportName )
const SmLocalizedSymbolData &rData = SM_MOD()->GetLocSymbolData();
const ResStringArray &rUiNames = rData.GetUiSymbolNamesArray();
const ResStringArray &rExportNames = rData.GetExportSymbolNamesArray();
- USHORT nCount = sal::static_int_cast< xub_StrLen >(rExportNames.Count());
- for (USHORT i = 0; i < nCount && !aRes.Len(); ++i)
+ sal_uInt16 nCount = sal::static_int_cast< xub_StrLen >(rExportNames.Count());
+ for (sal_uInt16 i = 0; i < nCount && !aRes.Len(); ++i)
{
if (rExportName == rExportNames.GetString(i))
{
@@ -120,8 +120,8 @@ const String SmLocalizedSymbolData::GetExportSymbolName( const String &rUiName )
const SmLocalizedSymbolData &rData = SM_MOD()->GetLocSymbolData();
const ResStringArray &rUiNames = rData.GetUiSymbolNamesArray();
const ResStringArray &rExportNames = rData.GetExportSymbolNamesArray();
- USHORT nCount = sal::static_int_cast< xub_StrLen >(rUiNames.Count());
- for (USHORT i = 0; i < nCount && !aRes.Len(); ++i)
+ sal_uInt16 nCount = sal::static_int_cast< xub_StrLen >(rUiNames.Count());
+ for (sal_uInt16 i = 0; i < nCount && !aRes.Len(); ++i)
{
if (rUiName == rUiNames.GetString(i))
{
@@ -141,8 +141,8 @@ const String SmLocalizedSymbolData::GetUiSymbolSetName( const String &rExportNam
const SmLocalizedSymbolData &rData = SM_MOD()->GetLocSymbolData();
const ResStringArray &rUiNames = rData.GetUiSymbolSetNamesArray();
const ResStringArray &rExportNames = rData.GetExportSymbolSetNamesArray();
- USHORT nCount = sal::static_int_cast< xub_StrLen >(rExportNames.Count());
- for (USHORT i = 0; i < nCount && !aRes.Len(); ++i)
+ sal_uInt16 nCount = sal::static_int_cast< xub_StrLen >(rExportNames.Count());
+ for (sal_uInt16 i = 0; i < nCount && !aRes.Len(); ++i)
{
if (rExportName == rExportNames.GetString(i))
{
@@ -162,8 +162,8 @@ const String SmLocalizedSymbolData::GetExportSymbolSetName( const String &rUiNam
const SmLocalizedSymbolData &rData = SM_MOD()->GetLocSymbolData();
const ResStringArray &rUiNames = rData.GetUiSymbolSetNamesArray();
const ResStringArray &rExportNames = rData.GetExportSymbolSetNamesArray();
- USHORT nCount = sal::static_int_cast< xub_StrLen >(rUiNames.Count());
- for (USHORT i = 0; i < nCount && !aRes.Len(); ++i)
+ sal_uInt16 nCount = sal::static_int_cast< xub_StrLen >(rUiNames.Count());
+ for (sal_uInt16 i = 0; i < nCount && !aRes.Len(); ++i)
{
if (rUiName == rUiNames.GetString(i))
{
@@ -232,7 +232,7 @@ SFX_IMPL_INTERFACE(SmModule, SfxModule, SmResId(RID_APPLICATION))
SmModule::SmModule(SfxObjectFactory* pObjFact) :
- SfxModule(SfxApplication::CreateResManager("sm"), FALSE, pObjFact, NULL),
+ SfxModule(SfxApplication::CreateResManager("sm"), sal_False, pObjFact, NULL),
pColorConfig( 0 ),
pConfig( 0 ),
pLocSymbolData( 0 ),
@@ -327,7 +327,7 @@ void SmModule::GetState(SfxItemSet &rSet)
{
SfxWhichIter aIter(rSet);
- for (USHORT nWh = aIter.FirstWhich(); 0 != nWh; nWh = aIter.NextWhich())
+ for (sal_uInt16 nWh = aIter.FirstWhich(); 0 != nWh; nWh = aIter.NextWhich())
switch (nWh)
{
case SID_CONFIGEVENT :
@@ -336,17 +336,7 @@ void SmModule::GetState(SfxItemSet &rSet)
}
}
-void SmModule::FillStatusBar(StatusBar &rBar)
-{
- rBar.InsertItem(SID_TEXTSTATUS, 300, SIB_LEFT | SIB_IN);
- rBar.InsertItem(SID_ATTR_ZOOM, rBar.GetTextWidth(C2S(" 100% ")));
- rBar.InsertItem(SID_MODIFYSTATUS, rBar.GetTextWidth(C2S(" * ")));
- rBar.InsertItem( SID_SIGNATURE, XmlSecStatusBarControl::GetDefItemWidth( rBar ), SIB_USERDRAW );
- rBar.SetHelpId(SID_SIGNATURE, SID_SIGNATURE);
-
-}
-
-SfxItemSet* SmModule::CreateItemSet( USHORT nId )
+SfxItemSet* SmModule::CreateItemSet( sal_uInt16 nId )
{
SfxItemSet* pRet = 0;
if(nId == SID_SM_EDITOPTIONS)
@@ -359,20 +349,21 @@ SfxItemSet* SmModule::CreateItemSet( USHORT nId )
SID_PRINTTEXT, SID_PRINTTEXT,
SID_PRINTFRAME, SID_PRINTFRAME,
SID_NO_RIGHT_SPACES, SID_NO_RIGHT_SPACES,
+ SID_SAVE_ONLY_USED_SYMBOLS, SID_SAVE_ONLY_USED_SYMBOLS,
0 );
GetConfig()->ConfigToItemSet(*pRet);
}
return pRet;
}
-void SmModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet )
+void SmModule::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet )
{
if(nId == SID_SM_EDITOPTIONS)
{
GetConfig()->ItemSetToConfig(rSet);
}
}
-SfxTabPage* SmModule::CreateTabPage( USHORT nId, Window* pParent, const SfxItemSet& rSet )
+SfxTabPage* SmModule::CreateTabPage( sal_uInt16 nId, Window* pParent, const SfxItemSet& rSet )
{
SfxTabPage* pRet = 0;
if(nId == SID_SM_TP_PRINTOPTIONS)
diff --git a/starmath/source/smres.src b/starmath/source/smres.src
index 14a4fce6bd52..dd616848f277 100644
--- a/starmath/source/smres.src
+++ b/starmath/source/smres.src
@@ -31,6 +31,7 @@
#include "starmath.hrc"
#include "dialog.hrc"
#include "toolbox.hrc"
+#include "smcommands.h"
#define IMAGE_STDBTN_COLOR Color { Red = 0xff00; Green = 0x0000; Blue = 0xff00; }
#define MN_SUB_TOOLBAR 32
@@ -40,6 +41,7 @@
ModalDialog RID_FONTDIALOG
{
+ HelpID = "starmath:ModalDialog:RID_FONTDIALOG";
Moveable = TRUE ;
OutputSize = TRUE ;
SVLook = TRUE ;
@@ -54,6 +56,7 @@ ModalDialog RID_FONTDIALOG
};
ComboBox 1
{
+ HelpID = "starmath:ComboBox:RID_FONTDIALOG:1";
Pos = MAP_APPFONT ( 6 , 17 ) ;
Size = MAP_APPFONT ( 111 , 60 ) ;
TabStop = TRUE ;
@@ -62,6 +65,7 @@ ModalDialog RID_FONTDIALOG
};
CheckBox 1
{
+ HelpID = "starmath:CheckBox:RID_FONTDIALOG:1";
TabStop = TRUE ;
Pos = MAP_APPFONT ( 60 , 84 ) ;
Size = MAP_APPFONT ( 33 , 10 ) ;
@@ -69,6 +73,7 @@ ModalDialog RID_FONTDIALOG
};
CheckBox 2
{
+ HelpID = "starmath:CheckBox:RID_FONTDIALOG:2";
TabStop = TRUE ;
Pos = MAP_APPFONT ( 60 , 97 ) ;
Size = MAP_APPFONT ( 33 , 10 ) ;
@@ -107,7 +112,7 @@ ModalDialog RID_FONTSIZEDIALOG
Moveable = TRUE ;
OutputSize = TRUE ;
SVLook = TRUE ;
- HelpID = SID_FONTSIZE ;
+ HelpId = CMD_SID_FONTSIZE ;
Size = MAP_APPFONT ( 171 , 120 ) ;
Text [ en-US ] = "Font Sizes" ;
FixedText 1
@@ -119,6 +124,7 @@ ModalDialog RID_FONTSIZEDIALOG
};
MetricField 1
{
+ HelpID = "starmath:MetricField:RID_FONTSIZEDIALOG:1";
Border = TRUE ;
Pos = MAP_APPFONT ( 57 , 6 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
@@ -139,6 +145,7 @@ ModalDialog RID_FONTSIZEDIALOG
};
MetricField 4
{
+ HelpID = "starmath:MetricField:RID_FONTSIZEDIALOG:4";
Border = TRUE ;
Pos = MAP_APPFONT ( 57 , 36 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
@@ -160,6 +167,7 @@ ModalDialog RID_FONTSIZEDIALOG
};
MetricField 5
{
+ HelpID = "starmath:MetricField:RID_FONTSIZEDIALOG:5";
Border = TRUE ;
Pos = MAP_APPFONT ( 57 , 51 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
@@ -181,6 +189,7 @@ ModalDialog RID_FONTSIZEDIALOG
};
MetricField 6
{
+ HelpID = "starmath:MetricField:RID_FONTSIZEDIALOG:6";
Border = TRUE ;
Pos = MAP_APPFONT ( 57 , 66 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
@@ -202,6 +211,7 @@ ModalDialog RID_FONTSIZEDIALOG
};
MetricField 7
{
+ HelpID = "starmath:MetricField:RID_FONTSIZEDIALOG:7";
Border = TRUE ;
Pos = MAP_APPFONT ( 57 , 81 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
@@ -223,6 +233,7 @@ ModalDialog RID_FONTSIZEDIALOG
};
MetricField 8
{
+ HelpID = "starmath:MetricField:RID_FONTSIZEDIALOG:8";
Border = TRUE ;
Pos = MAP_APPFONT ( 57 , 96 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
@@ -256,6 +267,7 @@ ModalDialog RID_FONTSIZEDIALOG
};
PushButton 1
{
+ HelpID = "starmath:PushButton:RID_FONTSIZEDIALOG:1";
TabStop = TRUE ;
Pos = MAP_APPFONT ( 114 , 45 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
@@ -267,7 +279,7 @@ ModalDialog RID_FONTTYPEDIALOG
{
OutputSize = TRUE ;
SVLook = TRUE ;
- HelpID = SID_FONT ;
+ HelpId = CMD_SID_FONT ;
Size = MAP_APPFONT ( 282 , 153 ) ;
Text [ en-US ] = "Fonts" ;
Moveable = TRUE ;
@@ -292,6 +304,7 @@ ModalDialog RID_FONTTYPEDIALOG
};
ListBox 1
{
+ HelpID = "starmath:ListBox:RID_FONTTYPEDIALOG:1";
Border = TRUE ;
Pos = MAP_APPFONT ( 54 , 18 ) ;
Size = MAP_APPFONT ( 150 , 69 ) ;
@@ -307,6 +320,7 @@ ModalDialog RID_FONTTYPEDIALOG
};
ListBox 2
{
+ HelpID = "starmath:ListBox:RID_FONTTYPEDIALOG:2";
Border = TRUE ;
Pos = MAP_APPFONT ( 54 , 33 ) ;
Size = MAP_APPFONT ( 150 , 69 ) ;
@@ -322,6 +336,7 @@ ModalDialog RID_FONTTYPEDIALOG
};
ListBox 3
{
+ HelpID = "starmath:ListBox:RID_FONTTYPEDIALOG:3";
Border = TRUE ;
Pos = MAP_APPFONT ( 54 , 48 ) ;
Size = MAP_APPFONT ( 150 , 69 ) ;
@@ -337,6 +352,7 @@ ModalDialog RID_FONTTYPEDIALOG
};
ListBox 4
{
+ HelpID = "starmath:ListBox:RID_FONTTYPEDIALOG:4";
Border = TRUE ;
Pos = MAP_APPFONT ( 54 , 63 ) ;
Size = MAP_APPFONT ( 150 , 69 ) ;
@@ -352,6 +368,7 @@ ModalDialog RID_FONTTYPEDIALOG
};
ListBox 5
{
+ HelpID = "starmath:ListBox:RID_FONTTYPEDIALOG:5";
Border = TRUE ;
Pos = MAP_APPFONT ( 54 , 96 ) ;
Size = MAP_APPFONT ( 150 , 69 ) ;
@@ -367,6 +384,7 @@ ModalDialog RID_FONTTYPEDIALOG
};
ListBox 6
{
+ HelpID = "starmath:ListBox:RID_FONTTYPEDIALOG:6";
Border = TRUE ;
Pos = MAP_APPFONT ( 54 , 111 ) ;
Size = MAP_APPFONT ( 150 , 69 ) ;
@@ -382,6 +400,7 @@ ModalDialog RID_FONTTYPEDIALOG
};
ListBox 7
{
+ HelpID = "starmath:ListBox:RID_FONTTYPEDIALOG:7";
Border = TRUE ;
Pos = MAP_APPFONT ( 54 , 126 ) ;
Size = MAP_APPFONT ( 150 , 69 ) ;
@@ -403,6 +422,7 @@ ModalDialog RID_FONTTYPEDIALOG
};
MenuButton 1
{
+ HelpID = "starmath:MenuButton:RID_FONTTYPEDIALOG:1";
TabStop = TRUE ;
ButtonMenu = Menu , RID_FONTMENU ;
Pos = MAP_APPFONT ( 225 , 48 ) ;
@@ -411,6 +431,7 @@ ModalDialog RID_FONTTYPEDIALOG
};
PushButton 2
{
+ HelpID = "starmath:PushButton:RID_FONTTYPEDIALOG:2";
TabStop = TRUE ;
Pos = MAP_APPFONT ( 225 , 66 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
@@ -423,7 +444,7 @@ ModalDialog RID_DISTANCEDIALOG
Moveable = TRUE ;
OutputSize = TRUE ;
SVLook = TRUE ;
- HelpID = SID_DISTANCE ;
+ HelpId = CMD_SID_DISTANCE ;
Size = MAP_APPFONT ( 240 , 90 ) ;
Text [ en-US ] = "Spacing" ;
FixedText 1
@@ -434,6 +455,7 @@ ModalDialog RID_DISTANCEDIALOG
};
MetricField 1
{
+ HelpID = "starmath:MetricField:RID_DISTANCEDIALOG:1";
Border = TRUE ;
TabStop = TRUE ;
Left = TRUE ;
@@ -454,6 +476,7 @@ ModalDialog RID_DISTANCEDIALOG
};
MetricField 2
{
+ HelpID = "starmath:MetricField:RID_DISTANCEDIALOG:2";
Border = TRUE ;
TabStop = TRUE ;
Left = TRUE ;
@@ -466,6 +489,7 @@ ModalDialog RID_DISTANCEDIALOG
};
CheckBox 1
{
+ HelpID = "starmath:CheckBox:RID_DISTANCEDIALOG:1";
TabStop = TRUE ;
Pos = MAP_APPFONT ( 12 , 55 ) ;
Size = MAP_APPFONT ( 110 , 12 ) ;
@@ -481,6 +505,7 @@ ModalDialog RID_DISTANCEDIALOG
};
MetricField 3
{
+ HelpID = "starmath:MetricField:RID_DISTANCEDIALOG:3";
Border = TRUE ;
TabStop = TRUE ;
Left = TRUE ;
@@ -501,6 +526,7 @@ ModalDialog RID_DISTANCEDIALOG
};
MetricField 4
{
+ HelpID = "starmath:MetricField:RID_DISTANCEDIALOG:4";
Border = TRUE ;
TabStop = TRUE ;
Left = TRUE ;
@@ -526,6 +552,7 @@ ModalDialog RID_DISTANCEDIALOG
};
PushButton 1
{
+ HelpID = "starmath:PushButton:RID_DISTANCEDIALOG:1";
TabStop = TRUE ;
Pos = MAP_APPFONT ( 184 , 69 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
@@ -533,6 +560,7 @@ ModalDialog RID_DISTANCEDIALOG
};
MenuButton 1
{
+ HelpID = "starmath:MenuButton:RID_DISTANCEDIALOG:1";
TabStop = TRUE ;
ButtonMenu = Menu , RID_DISTANCEMENU ;
Pos = MAP_APPFONT ( 184 , 51 ) ;
@@ -821,11 +849,12 @@ ModalDialog RID_ALIGNDIALOG
Moveable = TRUE ;
OutputSize = TRUE ;
SVLook = TRUE ;
- HelpID = SID_ALIGN ;
+ HelpId = CMD_SID_ALIGN ;
Size = MAP_APPFONT ( 139 , 66 ) ;
Text [ en-US ] = "Alignment" ;
RadioButton 1
{
+ HelpID = "starmath:RadioButton:RID_ALIGNDIALOG:1";
TabStop = TRUE ;
Pos = MAP_APPFONT ( 12 , 17 ) ;
Size = MAP_APPFONT ( 60 , 10 ) ;
@@ -833,6 +862,7 @@ ModalDialog RID_ALIGNDIALOG
};
RadioButton 2
{
+ HelpID = "starmath:RadioButton:RID_ALIGNDIALOG:2";
TabStop = TRUE ;
Pos = MAP_APPFONT ( 12 , 31 ) ;
Size = MAP_APPFONT ( 60 , 10 ) ;
@@ -840,6 +870,7 @@ ModalDialog RID_ALIGNDIALOG
};
RadioButton 3
{
+ HelpID = "starmath:RadioButton:RID_ALIGNDIALOG:3";
TabStop = TRUE ;
Pos = MAP_APPFONT ( 12 , 44 ) ;
Size = MAP_APPFONT ( 60 , 10 ) ;
@@ -866,6 +897,7 @@ ModalDialog RID_ALIGNDIALOG
};
PushButton 1
{
+ HelpID = "starmath:PushButton:RID_ALIGNDIALOG:1";
TabStop = TRUE ;
Pos = MAP_APPFONT ( 83 , 46 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
@@ -875,6 +907,7 @@ ModalDialog RID_ALIGNDIALOG
TabPage RID_PRINTOPTIONPAGE
{
+ HelpID = "starmath:TabPage:RID_PRINTOPTIONPAGE";
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 260 , 185 ) ;
@@ -887,6 +920,7 @@ TabPage RID_PRINTOPTIONPAGE
};
CheckBox CB_TITLEROW
{
+ HelpID = "starmath:CheckBox:RID_PRINTOPTIONPAGE:CB_TITLEROW";
TabStop = TRUE ;
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 68 , 10 ) ;
@@ -894,6 +928,7 @@ TabPage RID_PRINTOPTIONPAGE
};
CheckBox CB_EQUATION_TEXT
{
+ HelpID = "starmath:CheckBox:RID_PRINTOPTIONPAGE:CB_EQUATION_TEXT";
TabStop = TRUE ;
Pos = MAP_APPFONT ( 12 , 28 ) ;
Size = MAP_APPFONT ( 68 , 10 ) ;
@@ -901,6 +936,7 @@ TabPage RID_PRINTOPTIONPAGE
};
CheckBox CB_FRAME
{
+ HelpID = "starmath:CheckBox:RID_PRINTOPTIONPAGE:CB_FRAME";
TabStop = TRUE ;
Pos = MAP_APPFONT ( 12 , 42 ) ;
Size = MAP_APPFONT ( 68 , 10 ) ;
@@ -914,6 +950,7 @@ TabPage RID_PRINTOPTIONPAGE
};
RadioButton RB_ORIGINAL_SIZE
{
+ HelpID = "starmath:RadioButton:RID_PRINTOPTIONPAGE:RB_ORIGINAL_SIZE";
TabStop = TRUE ;
Pos = MAP_APPFONT ( 12 , 69 ) ;
Size = MAP_APPFONT ( 90 , 10 ) ;
@@ -921,6 +958,7 @@ TabPage RID_PRINTOPTIONPAGE
};
RadioButton RB_FIT_TO_PAGE
{
+ HelpID = "starmath:RadioButton:RID_PRINTOPTIONPAGE:RB_FIT_TO_PAGE";
TabStop = TRUE ;
Pos = MAP_APPFONT ( 12 , 83 ) ;
Size = MAP_APPFONT ( 90 , 10 ) ;
@@ -928,6 +966,7 @@ TabPage RID_PRINTOPTIONPAGE
};
RadioButton RB_ZOOM
{
+ HelpID = "starmath:RadioButton:RID_PRINTOPTIONPAGE:RB_ZOOM";
Pos = MAP_APPFONT ( 12 , 97 ) ;
Size = MAP_APPFONT ( 90 , 10 ) ;
Text [ en-US ] = "~Scaling" ;
@@ -935,6 +974,7 @@ TabPage RID_PRINTOPTIONPAGE
};
MetricField MF_ZOOM
{
+ HelpID = "starmath:MetricField:RID_PRINTOPTIONPAGE:MF_ZOOM";
Border = TRUE ;
Pos = MAP_APPFONT ( 18 , 111 ) ;
Size = MAP_APPFONT ( 30 , 12 ) ;
@@ -955,15 +995,24 @@ TabPage RID_PRINTOPTIONPAGE
};
CheckBox CB_IGNORE_SPACING
{
+ HelpID = "starmath:CheckBox:RID_PRINTOPTIONPAGE:CB_IGNORE_SPACING";
TabStop = TRUE ;
Pos = MAP_APPFONT ( 12 , 140 ) ;
Size = MAP_APPFONT ( 236 , 10 ) ;
Text [ en-US ] = "Ig~nore ~~ and ` at the end of the line";
};
+ CheckBox CB_SAVE_ONLY_USED_SYMBOLS
+ {
+ TabStop = TRUE ;
+ Pos = MAP_APPFONT ( 12 , 154 ) ;
+ Size = MAP_APPFONT ( 236 , 10 ) ;
+ Text [ en-US ] = "Embed only used symbols (smaller file size)";
+ };
};
ModalDialog RID_SYMBOLDIALOG
{
+ HelpID = "starmath:ModalDialog:RID_SYMBOLDIALOG";
OutputSize = TRUE ;
SVLook = TRUE ;
Closeable = TRUE; // Close Button in Window Leiste explizit einbauen
@@ -979,6 +1028,7 @@ ModalDialog RID_SYMBOLDIALOG
};
ListBox 1
{
+ HelpID = "starmath:ListBox:RID_SYMBOLDIALOG:1";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 17 ) ;
Size = MAP_APPFONT ( 92, 57 ) ;
@@ -1010,6 +1060,7 @@ ModalDialog RID_SYMBOLDIALOG
};
PushButton 2
{
+ HelpID = "starmath:PushButton:RID_SYMBOLDIALOG:2";
TabStop = TRUE ;
Pos = MAP_APPFONT ( 177 , 6 ) ;
Size = MAP_APPFONT ( 56 , 14 ) ;
@@ -1018,6 +1069,7 @@ ModalDialog RID_SYMBOLDIALOG
};
PushButton 3
{
+ HelpID = "starmath:PushButton:RID_SYMBOLDIALOG:3";
Pos = MAP_APPFONT ( 177 , 24 ) ;
Size = MAP_APPFONT ( 56 , 14 ) ;
TabStop = TRUE ;
@@ -1025,6 +1077,7 @@ ModalDialog RID_SYMBOLDIALOG
};
PushButton 1
{
+ HelpID = "starmath:PushButton:RID_SYMBOLDIALOG:1";
TabStop = TRUE ;
Pos = MAP_APPFONT ( 177 , 42 ) ;
Size = MAP_APPFONT ( 56 , 14 ) ;
@@ -1034,6 +1087,7 @@ ModalDialog RID_SYMBOLDIALOG
ModalDialog RID_SYMDEFINEDIALOG
{
+ HelpID = "starmath:ModalDialog:RID_SYMDEFINEDIALOG";
Moveable = TRUE ;
OutputSize = TRUE ;
SVLook = TRUE ;
@@ -1048,8 +1102,9 @@ ModalDialog RID_SYMDEFINEDIALOG
};
ComboBox 1
{
+ HelpID = "starmath:ComboBox:RID_SYMDEFINEDIALOG:1";
Pos = MAP_APPFONT ( 59 , 6 ) ;
- Size = MAP_APPFONT ( 80 , 50 ) ;
+ Size = MAP_APPFONT ( 80 , 100 ) ;
TabStop = TRUE ;
DropDown = TRUE ;
Sort = TRUE ;
@@ -1063,8 +1118,9 @@ ModalDialog RID_SYMDEFINEDIALOG
};
ComboBox 2
{
+ HelpID = "starmath:ComboBox:RID_SYMDEFINEDIALOG:2";
Pos = MAP_APPFONT ( 210 , 6 ) ;
- Size = MAP_APPFONT ( 80 , 50 ) ;
+ Size = MAP_APPFONT ( 80 , 100 ) ;
TabStop = TRUE ;
DropDown = TRUE ;
Sort = TRUE ;
@@ -1087,8 +1143,9 @@ ModalDialog RID_SYMDEFINEDIALOG
};
ComboBox 4
{
+ HelpID = "starmath:ComboBox:RID_SYMDEFINEDIALOG:4";
Pos = MAP_APPFONT ( 80 , 115 ) ;
- Size = MAP_APPFONT ( 100 , 80 ) ;
+ Size = MAP_APPFONT ( 100 , 100 ) ;
TabStop = TRUE ;
DropDown = TRUE ;
Sort = TRUE ;
@@ -1102,8 +1159,9 @@ ModalDialog RID_SYMDEFINEDIALOG
};
ComboBox 5
{
+ HelpID = "starmath:ComboBox:RID_SYMDEFINEDIALOG:5";
Pos = MAP_APPFONT ( 80 , 130 ) ;
- Size = MAP_APPFONT ( 100 , 50 ) ;
+ Size = MAP_APPFONT ( 100 , 100 ) ;
TabStop = TRUE ;
DropDown = TRUE ;
Sort = TRUE ;
@@ -1117,9 +1175,10 @@ ModalDialog RID_SYMDEFINEDIALOG
};
ListBox 1
{
+ HelpID = "starmath:ListBox:RID_SYMDEFINEDIALOG:1";
Border = TRUE ;
Pos = MAP_APPFONT ( 80 , 145 ) ;
- Size = MAP_APPFONT ( 100 , 50 ) ;
+ Size = MAP_APPFONT ( 100 , 100 ) ;
TabStop = TRUE ;
Sort = TRUE ;
DropDown = TRUE ;
@@ -1133,9 +1192,10 @@ ModalDialog RID_SYMDEFINEDIALOG
};
ListBox LB_FONTS_SUBSET
{
+ HelpID = "starmath:ListBox:RID_SYMDEFINEDIALOG:LB_FONTS_SUBSET";
Border = TRUE ;
Pos = MAP_APPFONT ( 80 , 160 ) ;
- Size = MAP_APPFONT ( 100 , 50 ) ;
+ Size = MAP_APPFONT ( 100 , 100 ) ;
TabStop = TRUE ;
Sort = FALSE ;
DropDown = TRUE ;
@@ -1149,9 +1209,10 @@ ModalDialog RID_SYMDEFINEDIALOG
};
ComboBox 3
{
+ HelpID = "starmath:ComboBox:RID_SYMDEFINEDIALOG:3";
Border = TRUE;
Pos = MAP_APPFONT ( 80 , 175 ) ;
- Size = MAP_APPFONT ( 100 , 50 ) ;
+ Size = MAP_APPFONT ( 100 , 100 ) ;
TabStop = TRUE ;
DropDown = TRUE ;
Sort = FALSE ;
@@ -1210,6 +1271,7 @@ ModalDialog RID_SYMDEFINEDIALOG
};
PushButton 1
{
+ HelpID = "starmath:PushButton:RID_SYMDEFINEDIALOG:1";
TabStop = TRUE ;
Pos = MAP_APPFONT ( 305 , 195 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
@@ -1217,6 +1279,7 @@ ModalDialog RID_SYMDEFINEDIALOG
};
PushButton 2
{
+ HelpID = "starmath:PushButton:RID_SYMDEFINEDIALOG:2";
TabStop = TRUE ;
Pos = MAP_APPFONT ( 245 , 195 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
@@ -1224,6 +1287,7 @@ ModalDialog RID_SYMDEFINEDIALOG
};
PushButton 3
{
+ HelpID = "starmath:PushButton:RID_SYMDEFINEDIALOG:3";
TabStop = TRUE ;
Pos = MAP_APPFONT ( 185 , 195 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
@@ -1295,37 +1359,37 @@ Menu RID_VIEWMENU
MenuItem
{
Identifier = SID_VIEW050 ;
- HelpID = SID_VIEW050 ;
+ HelpId = CMD_SID_VIEW050 ;
Text [ en-US ] = "~View 50%" ;
};
MenuItem
{
Identifier = SID_VIEW100 ;
- HelpID = SID_VIEW100 ;
+ HelpId = CMD_SID_VIEW100 ;
Text [ en-US ] = "View ~100%" ;
};
MenuItem
{
Identifier = SID_VIEW200 ;
- HelpID = SID_VIEW200 ;
+ HelpId = CMD_SID_VIEW200 ;
Text [ en-US ] = "View ~200%" ;
};
MenuItem
{
Identifier = SID_ZOOMIN ;
- HelpID = SID_ZOOMIN ;
+ HelpId = CMD_SID_ZOOMIN ;
Text [ en-US ] = "~Zoom In" ;
};
MenuItem
{
Identifier = SID_ZOOMOUT ;
- HelpID = SID_ZOOMOUT ;
+ HelpId = CMD_SID_ZOOMOUT ;
Text [ en-US ] = "Zoom ~Out" ;
};
MenuItem
{
Identifier = SID_ADJUST ;
- HelpID = SID_ADJUST ;
+ HelpId = CMD_SID_ADJUST ;
Text [ en-US ] = "~Display All" ;
};
MenuItem
@@ -1335,7 +1399,7 @@ Menu RID_VIEWMENU
MenuItem
{
Identifier = SID_DRAW ;
- HelpID = SID_DRAW ;
+ HelpId = CMD_SID_DRAW ;
Text [ en-US ] = "U~pdate" ;
};
};
@@ -1439,1419 +1503,6 @@ Menu RID_FONTMENU
};
};
-FloatingWindow RID_TOOLBOXWINDOW
-{
- HelpId = HID_SMA_OPERATOR_WIN ;
- Border = TRUE ;
- Moveable = TRUE ;
- Closeable = TRUE ;
- Hide = TRUE ;
- OutputSize = TRUE ;
- SVLook = TRUE ;
- Size = MAP_APPFONT ( 0 , 0 ) ;
- Text [ en-US ] = "Elements" ;
-
- ToolBox 1
- {
- // unary/binary operators
- HelpId = HID_SMA_UNBINOPS_TBX ;
- Pos = MAP_APPFONT ( 0 , 45 ) ;
- Size = MAP_APPFONT ( 65 , 95 ) ;
- SVLook = TRUE ;
- Hide = TRUE ;
- LineCount = 4 ;
-
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = RID_PLUSX ;
- HelpId = HID_SMA_PLUSX ;
- Text [ en-US ] = "+ Sign" ;
- };
- ToolBoxItem
- {
- Identifier = RID_MINUSX ;
- HelpId = HID_SMA_MINUSX ;
- Text [ en-US ] = "- Sign" ;
- };
- ToolBoxItem
- {
- Identifier = RID_PLUSMINUSX ;
- HelpId = HID_SMA_PLUSMINUSX ;
- Text [ en-US ] = "+- Sign" ;
- };
- ToolBoxItem
- {
- Identifier = RID_MINUSPLUSX ;
- HelpId = HID_SMA_MINUSPLUSX ;
- Text [ en-US ] = "-+ Sign" ;
- };
- ToolBoxItem
- {
- Identifier = RID_NEGX ;
- HelpId = HID_SMA_NEGX ;
- Text [ en-US ] = "Boolean NOT" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_XPLUSY ;
- HelpId = HID_SMA_XPLUSY ;
- Text [ en-US ] = "Addition +" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XCDOTY ;
- HelpId = HID_SMA_XCDOTY ;
- Text [ en-US ] = "Multiplication (Dot )" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XTIMESY ;
- HelpId = HID_SMA_XTIMESY ;
- Text [ en-US ] = "Multiplication (x)" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XSYMTIMESY ;
- HelpId = HID_SMA_XSYMTIMESY ;
- Text [ en-US ] = "Multiplication (*)" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XANDY ;
- HelpId = HID_SMA_XANDY ;
- Text [ en-US ] = "Boolean AND" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_XMINUSY ;
- HelpId = HID_SMA_XMINUSY ;
- Text [ en-US ] = "Subtraction -" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XOVERY ;
- HelpId = HID_SMA_XOVERY ;
- Text [ en-US ] = "Division (Fraction)" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XDIVY ;
- HelpId = HID_SMA_XDIVY ;
- Text [ en-US ] = "Division (÷)" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XSYMDIVIDEY ;
- HelpId = HID_SMA_XSYMDIVIDEY ;
- Text [ en-US ] = "Division (Slash)" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XORY ;
- HelpId = HID_SMA_XORY ;
- Text [ en-US ] = "Boolean OR" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_XCIRCY ;
- HelpId = HID_SMA_XCIRCY ;
- Text [ en-US ] = "Concatenate";
- };
- };
- };
- ToolBox 2
- {
- // relations
- HelpId = HID_SMA_RELATIONS_TBX ;
- Pos = MAP_APPFONT ( 0 , 45 ) ;
- Size = MAP_APPFONT ( 65 , 95 ) ;
- SVLook = TRUE ;
- Hide = TRUE ;
- LineCount = 5 ;
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = RID_XEQY ;
- HelpId = HID_SMA_XEQY ;
- Text [ en-US ] = "Is Equal" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XNEQY ;
- HelpId = HID_SMA_XNEQY ;
- Text [ en-US ] = "Is Not Equal" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XAPPROXY ;
- HelpId = HID_SMA_XAPPROXY ;
- Text [ en-US ] = "Is Approximately Equal" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XDIVIDESY ;
- HelpId = HID_SMA_XDIVIDESY ;
- Text [ en-US ] = "Divides";
- };
- ToolBoxItem
- {
- Identifier = RID_XNDIVIDESY ;
- HelpId = HID_SMA_XNDIVIDESY ;
- Text [ en-US ] = "Does Not Divide";
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_XLTY ;
- HelpId = HID_SMA_XLTY ;
- Text [ en-US ] = "Is Less Than" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XGTY ;
- HelpId = HID_SMA_XGTY ;
- Text [ en-US ] = "Is Greater Than" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XSIMEQY ;
- HelpId = HID_SMA_XSIMEQY ;
- Text [ en-US ] = "Is Similar Or Equal" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XPARALLELY ;
- HelpId = HID_SMA_XPARALLELY ;
- Text [ en-US ] = "Is Parallel To" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XORTHOY ;
- HelpId = HID_SMA_XORTHOY ;
- Text [ en-US ] = "Is Orthogonal To" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_XLESLANTY ;
- HelpId = HID_SMA_XLESLANTY ;
- Text [ en-US ] = "Is Less Than Or Equal To" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XGESLANTY ;
- HelpId = HID_SMA_XGESLANTY ;
- Text [ en-US ] = "Is Greater Than Or Equal To" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XSIMY ;
- HelpId = HID_SMA_XSIMY ;
- Text [ en-US ] = "Is Similar To" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XEQUIVY ;
- HelpId = HID_SMA_XEQUIVY ;
- Text [ en-US ] = "Is Congruent To" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SPACE ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_XLEY ;
- HelpId = HID_SMA_XLEY ;
- Text [ en-US ] = "Is Less Than Or Equal To" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XGEY ;
- HelpId = HID_SMA_XGEY ;
- Text [ en-US ] = "Is Greater Than Or Equal To" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XPROPY ;
- HelpId = HID_SMA_XPROPY ;
- Text [ en-US ] = "Is Proportional To" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XTOWARDY ;
- HelpId = HID_SMA_XTOWARDY ;
- Text [ en-US ] = "Toward" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SPACE ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_DLARROW ;
- HelpId = HID_SMA_DLARROW ;
- Text [ en-US ] = "Double Arrow Left";
- };
- ToolBoxItem
- {
- Identifier = RID_DLRARROW ;
- HelpId = HID_SMA_DLRARROW ;
- Text [ en-US ] = "Double Arrow Left And Right";
- };
- ToolBoxItem
- {
- Identifier = RID_DRARROW ;
- HelpId = HID_SMA_DRARROW ;
- Text [ en-US ] = "Double Arrow Right";
- };
- };
- };
- ToolBox 3
- {
- // set operations
- HelpId = HID_SMA_SETOPERATIONS_TBX ;
- Pos = MAP_APPFONT ( 0 , 45 ) ;
- Size = MAP_APPFONT ( 65 , 95 ) ;
- SVLook = TRUE ;
- Hide = TRUE ;
- LineCount = 5 ;
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = RID_XINY ;
- HelpId = HID_SMA_XINY ;
- Text [ en-US ] = "Is In" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XNOTINY ;
- HelpId = HID_SMA_XNOTINY ;
- Text [ en-US ] = "Is Not In" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XOWNSY ;
- HelpId = HID_SMA_XOWNSY ;
- Text [ en-US ] = "Owns" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SPACE ;
- };
- ToolBoxItem
- {
- Identifier = RID_EMPTYSET ;
- HelpId = HID_SMA_EMPTYSET ;
- Text [ en-US ] = "Empty Set";
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_XINTERSECTIONY ;
- HelpId = HID_SMA_XINTERSECTIONY ;
- Text [ en-US ] = "Intersection" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XUNIONY ;
- HelpId = HID_SMA_XUNIONY ;
- Text [ en-US ] = "Union" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XSETMINUSY ;
- HelpId = HID_SMA_XSETMINUSY ;
- Text [ en-US ] = "Difference" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XSLASHY ;
- HelpId = HID_SMA_XSLASHY ;
- Text [ en-US ] = "Quotient Set" ;
- };
- ToolBoxItem
- {
- Identifier = RID_ALEPH ;
- HelpId = HID_SMA_ALEPH ;
- Text [ en-US ] = "Aleph";
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_XSUBSETY ;
- HelpId = HID_SMA_XSUBSETY ;
- Text [ en-US ] = "Subset" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XSUBSETEQY ;
- HelpId = HID_SMA_XSUBSETEQY ;
- Text [ en-US ] = "Subset Or Equal To" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XSUPSETY ;
- HelpId = HID_SMA_XSUPSETY ;
- Text [ en-US ] = "Superset" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XSUPSETEQY ;
- HelpId = HID_SMA_XSUPSETEQY ;
- Text [ en-US ] = "Superset Or Equal To" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SPACE ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_XNSUBSETY ;
- HelpId = HID_SMA_XNSUBSETY ;
- Text [ en-US ] = "Not Subset" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XNSUBSETEQY ;
- HelpId = HID_SMA_XNSUBSETEQY ;
- Text [ en-US ] = "Not Subset Or Equal" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XNSUPSETY ;
- HelpId = HID_SMA_XNSUPSETY ;
- Text [ en-US ] = "Not Superset" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XNSUPSETEQY ;
- HelpId = HID_SMA_XNSUPSETEQY ;
- Text [ en-US ] = "Not Superset Or Equal" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SPACE ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_SETN ;
- HelpId = HID_SMA_SETN ;
- Text [ en-US ] = "Natural Numbers Set";
- };
- ToolBoxItem
- {
- Identifier = RID_SETZ ;
- HelpId = HID_SMA_SETZ ;
- Text [ en-US ] = "Integers Set";
- };
- ToolBoxItem
- {
- Identifier = RID_SETQ ;
- HelpId = HID_SMA_SETQ ;
- Text [ en-US ] = "Set of Rational Numbers";
- };
- ToolBoxItem
- {
- Identifier = RID_SETR ;
- HelpId = HID_SMA_SETR ;
- Text [ en-US ] = "Real Numbers Set";
- };
- ToolBoxItem
- {
- Identifier = RID_SETC ;
- HelpId = HID_SMA_SETC ;
- Text [ en-US ] = "Complex Numbers Set";
- };
- };
- };
- ToolBox 4
- {
- // functions
- HelpId = HID_SMA_FUNCTIONS_TBX ;
- Pos = MAP_APPFONT ( 0 , 45 ) ;
- Size = MAP_APPFONT ( 65 , 95 ) ;
- SVLook = TRUE ;
- Hide = TRUE ;
- LineCount = 5 ;
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = RID_EX ;
- HelpId = HID_SMA_EX ;
- Text [ en-US ] = "Exponential Function" ;
- };
- ToolBoxItem
- {
- Identifier = RID_LNX ;
- HelpId = HID_SMA_LNX ;
- Text [ en-US ] = "Natural Logarithm" ;
- };
- ToolBoxItem
- {
- Identifier = RID_EXPX ;
- HelpId = HID_SMA_EXPX ;
- Text [ en-US ] = "Exponential Function" ;
- };
- ToolBoxItem
- {
- Identifier = RID_LOGX ;
- HelpId = HID_SMA_LOGX ;
- Text [ en-US ] = "Logarithm" ;
- };
- ToolBoxItem
- {
- Identifier = RID_RSUPX ;
- HelpId = HID_SMA_RSUPX ;
- Text [ en-US ] = "Power";
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_SINX ;
- HelpId = HID_SMA_SINX ;
- Text [ en-US ] = "Sine" ;
- };
- ToolBoxItem
- {
- Identifier = RID_COSX ;
- HelpId = HID_SMA_COSX ;
- Text [ en-US ] = "Cosine" ;
- };
- ToolBoxItem
- {
- Identifier = RID_TANX ;
- HelpId = HID_SMA_TANX ;
- Text [ en-US ] = "Tangent" ;
- };
- ToolBoxItem
- {
- Identifier = RID_COTX ;
- HelpId = HID_SMA_COTX ;
- Text [ en-US ] = "Cotangent" ;
- };
- ToolBoxItem
- {
- Identifier = RID_SQRTX ;
- HelpId = HID_SMA_SQRTX ;
- Text [ en-US ] = "Square Root" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_ARCSINX ;
- HelpId = HID_SMA_ARCSINX ;
- Text [ en-US ] = "Arcsine" ;
- };
- ToolBoxItem
- {
- Identifier = RID_ARCCOSX ;
- HelpId = HID_SMA_ARCCOSX ;
- Text [ en-US ] = "Arccosine" ;
- };
- ToolBoxItem
- {
- Identifier = RID_ARCTANX ;
- HelpId = HID_SMA_ARCTANX ;
- Text [ en-US ] = "Arctangent" ;
- };
- ToolBoxItem
- {
- Identifier = RID_ARCCOTX ;
- HelpId = HID_SMA_ARCCOTX ;
- Text [ en-US ] = "Arccotangent" ;
- };
- ToolBoxItem
- {
- Identifier = RID_NROOTXY ;
- HelpId = HID_SMA_NROOTXY ;
- Text [ en-US ] = "N-th Root" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_SINHX ;
- HelpId = HID_SMA_SINHX ;
- Text [ en-US ] = "Hyperbolic Sine" ;
- };
- ToolBoxItem
- {
- Identifier = RID_COSHX ;
- HelpId = HID_SMA_COSHX ;
- Text [ en-US ] = "Hyperbolic Cosine" ;
- };
- ToolBoxItem
- {
- Identifier = RID_TANHX ;
- HelpId = HID_SMA_TANHX ;
- Text [ en-US ] = "Hyperbolic Tangent" ;
- };
- ToolBoxItem
- {
- Identifier = RID_COTHX ;
- HelpId = HID_SMA_COTHX ;
- Text [ en-US ] = "Hyperbolic Cotangent" ;
- };
- ToolBoxItem
- {
- Identifier = RID_ABSX ;
- HelpId = HID_SMA_ABSX ;
- Text [ en-US ] = "Absolute Value" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_ARSINHX ;
- HelpId = HID_SMA_ARSINHX ;
- Text [ en-US ] = "Area Hyperbolic Sine" ;
- };
- ToolBoxItem
- {
- Identifier = RID_ARCOSHX ;
- HelpId = HID_SMA_ARCOSHX ;
- Text [ en-US ] = "Area Hyperbolic Cosine" ;
- };
- ToolBoxItem
- {
- Identifier = RID_ARTANHX ;
- HelpId = HID_SMA_ARTANHX ;
- Text [ en-US ] = "Area Hyperbolic Tangent" ;
- };
- ToolBoxItem
- {
- Identifier = RID_ARCOTHX ;
- HelpId = HID_SMA_ARCOTHX ;
- Text [ en-US ] = "Area Hyperbolic Cotangent" ;
- };
- ToolBoxItem
- {
- Identifier = RID_FACTX ;
- HelpId = HID_SMA_FACTX ;
- Text [ en-US ] = "Factorial" ;
- };
- };
- };
- ToolBox 5
- {
- // operators
- HelpId = HID_SMA_OPERATORS_TBX ;
- Pos = MAP_APPFONT ( 0 , 45 ) ;
- Size = MAP_APPFONT ( 65 , 95 ) ;
- SVLook = TRUE ;
- Hide = TRUE ;
- LineCount = 3 ;
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = RID_LIMX ;
- HelpId = HID_SMA_LIMX ;
- Text [ en-US ] = "Limes" ;
- };
- ToolBoxItem
- {
- Identifier = RID_SUMX ;
- HelpId = HID_SMA_SUMX ;
- Text [ en-US ] = "Sum" ;
- };
- ToolBoxItem
- {
- Identifier = RID_PRODX ;
- HelpId = HID_SMA_PRODX ;
- Text [ en-US ] = "Product" ;
- };
- ToolBoxItem
- {
- Identifier = RID_COPRODX ;
- HelpId = HID_SMA_COPRODX ;
- Text [ en-US ] = "Coproduct" ;
- };
- ToolBoxItem
- {
- Identifier = RID_FROMXTOY ;
- HelpId = HID_SMA_FROMXTOY ;
- Text [ en-US ] = "Upper And Lower Limit" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_INTX ;
- HelpId = HID_SMA_INTX ;
- Text [ en-US ] = "Integral" ;
- };
- ToolBoxItem
- {
- Identifier = RID_IINTX ;
- HelpId = HID_SMA_IINTX ;
- Text [ en-US ] = "Double Integral" ;
- };
- ToolBoxItem
- {
- Identifier = RID_IIINTX ;
- HelpId = HID_SMA_IIINTX ;
- Text [ en-US ] = "Triple Integral" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SPACE ;
- };
- ToolBoxItem
- {
- Identifier = RID_FROMX ;
- HelpId = HID_SMA_FROMX ;
- Text [ en-US ] = "Lower Limit" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_LINTX ;
- HelpId = HID_SMA_LINTX ;
- Text [ en-US ] = "Curve Integral" ;
- };
- ToolBoxItem
- {
- Identifier = RID_LLINTX ;
- HelpId = HID_SMA_LLINTX ;
- Text [ en-US ] = "Double Curve Integral" ;
- };
- ToolBoxItem
- {
- Identifier = RID_LLLINTX ;
- HelpId = HID_SMA_LLLINTX ;
- Text [ en-US ] = "Triple Curve Integral" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SPACE ;
- };
- ToolBoxItem
- {
- Identifier = RID_TOX ;
- HelpId = HID_SMA_TOX ;
- Text [ en-US ] = "Upper Limit" ;
- };
- };
- };
- ToolBox 6
- {
- // attributs
- HelpId = HID_SMA_ATTRIBUTES_TBX ;
- Pos = MAP_APPFONT ( 0 , 45 ) ;
- Size = MAP_APPFONT ( 65 , 95 ) ;
- SVLook = TRUE ;
- Hide = TRUE ;
- LineCount = 5 ;
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = RID_ACUTEX ;
- HelpId = HID_SMA_ACUTEX ;
- Text [ en-US ] = "Acute Accent";
- };
- ToolBoxItem
- {
- Identifier = RID_GRAVEX ;
- HelpId = HID_SMA_GRAVEX ;
- Text [ en-US ] = "Grave Accent";
- };
- ToolBoxItem
- {
- Identifier = RID_CHECKX ;
- HelpId = HID_SMA_CHECKX ;
- Text [ en-US ] = "Reverse Circumflex" ;
- };
- ToolBoxItem
- {
- Identifier = RID_BREVEX ;
- HelpId = HID_SMA_BREVEX ;
- Text [ en-US ] = "Breve" ;
- };
- ToolBoxItem
- {
- Identifier = RID_CIRCLEX ;
- HelpId = HID_SMA_CIRCLEX ;
- Text [ en-US ] = "Circle" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_VECX ;
- HelpId = HID_SMA_VECX ;
- Text [ en-US ] = "Vector Arrow" ;
- };
- ToolBoxItem
- {
- Identifier = RID_TILDEX ;
- HelpId = HID_SMA_TILDEX ;
- Text [ en-US ] = "Tilde" ;
- };
- ToolBoxItem
- {
- Identifier = RID_HATX ;
- HelpId = HID_SMA_HATX ;
- Text [ en-US ] = "Circumflex" ;
- };
- ToolBoxItem
- {
- Identifier = RID_BARX ;
- HelpId = HID_SMA_BARX ;
- Text [ en-US ] = "Line Above" ;
- };
- ToolBoxItem
- {
- Identifier = RID_DOTX ;
- HelpId = HID_SMA_DOTX ;
- Text [ en-US ] = "Dot" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_WIDEVECX ;
- HelpId = HID_SMA_WIDEVECX ;
- Text [ en-US ] = "Large Vector Arrow";
- };
- ToolBoxItem
- {
- Identifier = RID_WIDETILDEX ;
- HelpId = HID_SMA_WIDETILDEX ;
- Text [ en-US ] = "Large Tilde";
- };
- ToolBoxItem
- {
- Identifier = RID_WIDEHATX ;
- HelpId = HID_SMA_WIDEHATX ;
- Text [ en-US ] = "Large Circumflex";
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SPACE ;
- };
- ToolBoxItem
- {
- Identifier = RID_DDOTX ;
- HelpId = HID_SMA_DDOTX ;
- Text [ en-US ] = "Double Dot" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_OVERLINEX ;
- HelpId = HID_SMA_OVERLINEX ;
- Text [ en-US ] = "Line Over" ;
- };
- ToolBoxItem
- {
- Identifier = RID_UNDERLINEX ;
- HelpId = HID_SMA_UNDERLINEX ;
- Text [ en-US ] = "Line Below" ;
- };
- ToolBoxItem
- {
- Identifier = RID_OVERSTRIKEX ;
- HelpId = HID_SMA_OVERSTRIKEX ;
- Text [ en-US ] = "Line Through" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SPACE ;
- };
- ToolBoxItem
- {
- Identifier = RID_DDDOTX ;
- HelpId = HID_SMA_DDDOTX ;
- Text [ en-US ] = "Triple Dot" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_PHANTOMX ;
- HelpId = HID_SMA_PHANTOMX ;
- Text [ en-US ] = "Transparent" ;
- };
- ToolBoxItem
- {
- Identifier = RID_BOLDX ;
- HelpId = HID_SMA_BOLDX ;
- Text [ en-US ] = "Bold Font" ;
- };
- ToolBoxItem
- {
- Identifier = RID_ITALX ;
- HelpId = HID_SMA_ITALX ;
- Text [ en-US ] = "Italic Font" ;
- };
- ToolBoxItem
- {
- Identifier = RID_SIZEXY ;
- HelpId = HID_SMA_SIZEXY ;
- Text [ en-US ] = "Resize" ;
- };
- ToolBoxItem
- {
- Identifier = RID_FONTXY ;
- HelpId = HID_SMA_FONTXY ;
- Text [ en-US ] = "Change Font" ;
- };
- };
- };
- ToolBox 7
- {
- // parentheses
- HelpId = HID_SMA_BRACKETS_TBX ;
- Pos = MAP_APPFONT ( 0 , 45 ) ;
- Size = MAP_APPFONT ( 65 , 95 ) ;
- SVLook = TRUE ;
- Hide = TRUE ;
- LineCount = 5 ;
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = RID_LRPARENTX ;
- HelpId = HID_SMA_LRPARENTX ;
- Text [ en-US ] = "Round Brackets" ;
- };
- ToolBoxItem
- {
- Identifier = RID_LRBRACKETX ;
- HelpId = HID_SMA_LRBRACKETX ;
- Text [ en-US ] = "Square Brackets" ;
- };
- ToolBoxItem
- {
- Identifier = RID_LRDBRACKETX ;
- HelpId = HID_SMA_LRDBRACKETX ;
- Text [ en-US ] = "Double Square Brackets";
- };
- ToolBoxItem
- {
- Identifier = RID_LRLINEX ;
- HelpId = HID_SMA_LRLINEX ;
- Text [ en-US ] = "Single Lines" ;
- };
- ToolBoxItem
- {
- Identifier = RID_LRDLINEX ;
- HelpId = HID_SMA_LRDLINEX ;
- Text [ en-US ] = "Double Lines" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_LRBRACEX ;
- HelpId = HID_SMA_LRBRACEX ;
- Text [ en-US ] = "Braces" ;
- };
- ToolBoxItem
- {
- Identifier = RID_LRANGLEX ;
- HelpId = HID_SMA_LRANGLEX ;
- Text [ en-US ] = "Angle Brackets" ;
- };
- ToolBoxItem
- {
- Identifier = RID_LMRANGLEXY ;
- HelpId = HID_SMA_LMRANGLEXY ;
- Text [ en-US ] = "Operator Brackets";
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SPACE ;
- };
- ToolBoxItem
- {
- Identifier = RID_LRGROUPX ;
- HelpId = HID_SMA_LRGROUPX ;
- Text [ en-US ] = "Group Brackets" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_SLRPARENTX ;
- HelpId = HID_SMA_SLRPARENTX ;
- Text [ en-US ] = "Round Brackets (Scalable)" ;
- };
- ToolBoxItem
- {
- Identifier = RID_SLRBRACKETX ;
- HelpId = HID_SMA_SLRBRACKETX ;
- Text [ en-US ] = "Square Brackets (Scalable)" ;
- };
- ToolBoxItem
- {
- Identifier = RID_SLRDBRACKETX ;
- HelpId = HID_SMA_SLRDBRACKETX ;
- Text [ en-US ] = "Double Square Brackets (Scalable)";
- };
- ToolBoxItem
- {
- Identifier = RID_SLRLINEX ;
- HelpId = HID_SMA_SLRLINEX ;
- Text [ en-US ] = "Single Lines (Scalable)" ;
- };
- ToolBoxItem
- {
- Identifier = RID_SLRDLINEX ;
- HelpId = HID_SMA_SLRDLINEX ;
- Text [ en-US ] = "Double Lines (Scalable)" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_SLRBRACEX ;
- HelpId = HID_SMA_SLRBRACEX ;
- Text [ en-US ] = "Braces (Scalable)" ;
- };
- ToolBoxItem
- {
- Identifier = RID_SLRANGLEX ;
- HelpId = HID_SMA_SLRANGLEX ;
- Text [ en-US ] = "Angle Brackets (Scalable)" ;
- };
- ToolBoxItem
- {
- Identifier = RID_SLMRANGLEXY ;
- HelpId = HID_SMA_SLMRANGLEXY ;
- Text [ en-US ] = "Operator Brackets (Scalable)";
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_XOVERBRACEY ;
- HelpId = HID_SMA_XOVERBRACEY ;
- Text [ en-US ] = "Braces Top (Scalable)";
- };
- ToolBoxItem
- {
- Identifier = RID_XUNDERBRACEY ;
- HelpId = HID_SMA_XUNDERBRACEY ;
- Text [ en-US ] = "Braces Bottom (Scalable)";
- };
- };
- };
- ToolBox 8
- {
- // format
- HelpId = HID_SMA_FORMAT_TBX ;
- Pos = MAP_APPFONT ( 0 , 45 ) ;
- Size = MAP_APPFONT ( 65 , 95 ) ;
- SVLook = TRUE ;
- Hide = TRUE ;
- LineCount = 3 ;
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = RID_LSUPX ;
- HelpId = HID_SMA_LSUPX ;
- Text [ en-US ] = "Superscript Left" ;
- };
- ToolBoxItem
- {
- Identifier = RID_CSUPX ;
- HelpId = HID_SMA_CSUPX ;
- Text [ en-US ] = "Superscript Top";
- };
- ToolBoxItem
- {
- Identifier = RID_RSUPX ;
- HelpId = HID_SMA_RSUPX ;
- Text [ en-US ] = "Superscript Right" ;
- };
- ToolBoxItem
- {
- Identifier = RID_BINOMXY ;
- HelpId = HID_SMA_BINOMXY ;
- Text [ en-US ] = "Vertical Stack (2 Elements)" ;
- };
- ToolBoxItem
- {
- Identifier = RID_NEWLINE ;
- HelpId = HID_SMA_NEWLINE ;
- Text [ en-US ] = "New Line" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_LSUBX ;
- HelpId = HID_SMA_LSUBX ;
- Text [ en-US ] = "Subscript Left" ;
- };
- ToolBoxItem
- {
- Identifier = RID_CSUBX ;
- HelpId = HID_SMA_CSUBX ;
- Text [ en-US ] = "Subscript Bottom";
- };
- ToolBoxItem
- {
- Identifier = RID_RSUBX ;
- HelpId = HID_SMA_RSUBX ;
- Text [ en-US ] = "Subscript Right" ;
- };
- ToolBoxItem
- {
- Identifier = RID_STACK ;
- HelpId = HID_SMA_STACK ;
- Text [ en-US ] = "Vertical Stack" ;
- };
- ToolBoxItem
- {
- Identifier = RID_SBLANK ;
- HelpId = HID_SMA_SBLANK ;
- Text [ en-US ] = "Small Gap" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_ALIGNLX ;
- HelpId = HID_SMA_ALIGNLX ;
- Text [ en-US ] = "Align Left" ;
- };
- ToolBoxItem
- {
- Identifier = RID_ALIGNCX ;
- HelpId = HID_SMA_ALIGNCX ;
- Text [ en-US ] = "Align Center" ;
- };
- ToolBoxItem
- {
- Identifier = RID_ALIGNRX ;
- HelpId = HID_SMA_ALIGNRX ;
- Text [ en-US ] = "Align Right" ;
- };
- ToolBoxItem
- {
- Identifier = RID_MATRIX ;
- HelpId = HID_SMA_MATRIX ;
- Text [ en-US ] = "Matrix Stack" ;
- };
- ToolBoxItem
- {
- Identifier = RID_BLANK ;
- HelpId = HID_SMA_BLANK ;
- Text [ en-US ] = "Gap" ;
- };
- };
- };
- ToolBox 9
- {
- // misc
- HelpId = HID_SMA_FORMAT_TBX ;
- Pos = MAP_APPFONT ( 0 , 45 ) ;
- Size = MAP_APPFONT ( 65 , 95 ) ;
- SVLook = TRUE ;
- Hide = TRUE ;
- LineCount = 4 ;
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = RID_INFINITY ;
- HelpId = HID_SMA_INFINITY ;
- Text [ en-US ] = "infinite";
- };
- ToolBoxItem
- {
- Identifier = RID_PARTIAL ;
- HelpId = HID_SMA_PARTIAL ;
- Text [ en-US ] = "Partial";
- };
- ToolBoxItem
- {
- Identifier = RID_NABLA ;
- HelpId = HID_SMA_NABLA ;
- Text [ en-US ] = "Nabla";
- };
- ToolBoxItem
- {
- Identifier = RID_EXISTS ;
- HelpId = HID_SMA_EXISTS ;
- Text [ en-US ] = "There Exists";
- };
- ToolBoxItem
- {
- Identifier = RID_FORALL ;
- HelpId = HID_SMA_FORALL ;
- Text [ en-US ] = "For All";
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_HBAR ;
- HelpId = HID_SMA_HBAR ;
- Text [ en-US ] = "h Bar";
- };
- ToolBoxItem
- {
- Identifier = RID_LAMBDABAR ;
- HelpId = HID_SMA_LAMBDABAR ;
- Text [ en-US ] = "Lambda Bar";
- };
- ToolBoxItem
- {
- Identifier = RID_RE ;
- HelpId = HID_SMA_RE ;
- Text [ en-US ] = "Real Part";
- };
- ToolBoxItem
- {
- Identifier = RID_IM ;
- HelpId = HID_SMA_IM ;
- Text [ en-US ] = "Imaginary Part";
- };
- ToolBoxItem
- {
- Identifier = RID_WP ;
- HelpId = HID_SMA_WP ;
- Text [ en-US ] = "Weierstrass p";
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_LEFTARROW ;
- HelpId = HID_SMA_LEFTARROW ;
- Text [ en-US ] = "Left Arrow";
- };
- ToolBoxItem
- {
- Identifier = RID_RIGHTARROW ;
- HelpId = HID_SMA_RIGHTARROW ;
- Text [ en-US ] = "Right Arrow";
- };
- ToolBoxItem
- {
- Identifier = RID_UPARROW ;
- HelpId = HID_SMA_UPARROW ;
- Text [ en-US ] = "Up Arrow";
- };
- ToolBoxItem
- {
- Identifier = RID_DOWNARROW ;
- HelpId = HID_SMA_DOWNARROW ;
- Text [ en-US ] = "Down Arrow";
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SPACE ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_DOTSLOW ;
- HelpId = HID_SMA_DOTSLOW ;
- Text [ en-US ] = "Dots At Bottom";
- };
- ToolBoxItem
- {
- Identifier = RID_DOTSAXIS ;
- HelpId = HID_SMA_DOTSAXIS ;
- Text [ en-US ] = "Dots In Middle";
- };
- ToolBoxItem
- {
- Identifier = RID_DOTSVERT ;
- HelpId = HID_SMA_DOTSVERT ;
- Text [ en-US ] = "Dots Vertically";
- };
- ToolBoxItem
- {
- Identifier = RID_DOTSUP ;
- HelpId = HID_SMA_DOTSUP ;
- Text [ en-US ] = "Dots To Top";
- };
- ToolBoxItem
- {
- Identifier = RID_DOTSDOWN ;
- HelpId = HID_SMA_DOTSDOWN ;
- Text [ en-US ] = "Dots to Bottom";
- };
- };
- };
- ToolBox 10
- {
- // main menu of selection-window
- HelpId = HID_SMA_SELECTION_TBX ;
- Pos = MAP_APPFONT ( 0 , 0 ) ;
- Size = MAP_APPFONT ( 65 , 38 ) ;
- SVLook = TRUE ;
- LineCount = 2 ;
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = RID_UNBINOPS_CAT ;
- HelpId = HID_SMA_UNBINOPS_CAT ;
- Text [ en-US ] = "Unary/Binary Operators" ;
- };
- ToolBoxItem
- {
- Identifier = RID_RELATIONS_CAT ;
- HelpId = HID_SMA_RELATIONS_CAT ;
- Text [ en-US ] = "Relations" ;
- };
- ToolBoxItem
- {
- Identifier = RID_SETOPERATIONS_CAT ;
- HelpId = HID_SMA_SETOPERATIONS_CAT ;
- Text [ en-US ] = "Set Operations" ;
- };
- ToolBoxItem
- {
- Identifier = RID_FUNCTIONS_CAT ;
- HelpId = HID_SMA_FUNCTIONS_CAT ;
- Text [ en-US ] = "Functions" ;
- };
- ToolBoxItem
- {
- Identifier = RID_OPERATORS_CAT ;
- HelpId = HID_SMA_OPERATORS_CAT ;
- Text [ en-US ] = "Operators" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_ATTRIBUTES_CAT ;
- HelpId = HID_SMA_ATTRIBUTES_CAT ;
- Text [ en-US ] = "Attributes" ;
- };
- ToolBoxItem
- {
- Identifier = RID_MISC_CAT ;
- HelpId = HID_SMA_MISC_CAT ;
- Text [ en-US ] = "Others";
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SPACE ;
- };
- ToolBoxItem
- {
- Identifier = RID_BRACKETS_CAT ;
- HelpId = HID_SMA_BRACKETS_CAT ;
- Text [ en-US ] = "Brackets" ;
- };
- ToolBoxItem
- {
- Identifier = RID_FORMAT_CAT ;
- HelpId = HID_SMA_FORMAT_CAT ;
- Text [ en-US ] = "Formats" ;
- };
- };
- };
- FixedLine FL_TOOLBOX_CAT_DELIM
- {
- Pos = MAP_APPFONT ( 0 , 44 ) ;
- Size = MAP_APPFONT ( 65 , 4 ) ;
- };
-};
-
#define CMDBOXWINDOW_TEXT \
Text [ en-US ] = "Commands" ; \
@@ -2870,318 +1521,6 @@ DockingWindow RID_CMDBOXWINDOW\
};
-#define UNBINOPS_IDLIST \
- IdList = \
- { \
- RID_PLUSX ; \
- RID_MINUSX ; \
- RID_PLUSMINUSX ; \
- RID_MINUSPLUSX ; \
- RID_XPLUSY ; \
- RID_XCDOTY ; \
- RID_XTIMESY ; \
- RID_XSYMTIMESY ; \
- RID_XMINUSY ; \
- RID_XOVERY ; \
- RID_XDIVY ; \
- RID_XSYMDIVIDEY ; \
- RID_NEGX ; \
- RID_XANDY ; \
- RID_XORY ; \
- RID_XCIRCY ; \
- }; \
- IdCount = { 16 ; };
-
- ImageList RID_IL_UNBINOPS
- {
- Prefix = "un";
- MaskColor = IMAGE_STDBTN_COLOR ;
- UNBINOPS_IDLIST
- };
-
-#define RELATIONS_IDLIST \
- IdList = \
- { \
- RID_XEQY ; \
- RID_XNEQY ; \
- RID_XEQUIVY ; \
- RID_XORTHOY ; \
- RID_XLTY ; \
- RID_XGTY ; \
- RID_XAPPROXY ; \
- RID_XPARALLELY ; \
- RID_XLESLANTY ; \
- RID_XGESLANTY ; \
- RID_XSIMEQY ; \
- RID_XPROPY ; \
- RID_XLEY ; \
- RID_XGEY ; \
- RID_XSIMY ; \
- RID_XTOWARDY ; \
- RID_XDIVIDESY ; \
- RID_XNDIVIDESY; \
- RID_DLARROW ; \
- RID_DLRARROW ; \
- RID_DRARROW ; \
- }; \
- IdCount ={ 21 ; };
-
- ImageList RID_IL_RELATIONS
- {
- Prefix = "bi";
- MaskColor = IMAGE_STDBTN_COLOR ;
- RELATIONS_IDLIST
- };
-
-#define SETOPERATIONS_IDLIST \
- IdList = \
- { \
- RID_XINY ; \
- RID_XNOTINY ; \
- RID_XOWNSY ; \
- RID_XINTERSECTIONY ; \
- RID_XUNIONY ; \
- RID_XSETMINUSY ; \
- RID_XSLASHY ; \
- RID_XSUBSETY ; \
- RID_XSUBSETEQY ; \
- RID_XSUPSETY ; \
- RID_XSUPSETEQY ; \
- RID_XNSUBSETY ; \
- RID_XNSUBSETEQY ; \
- RID_XNSUPSETY ; \
- RID_XNSUPSETEQY ; \
- RID_EMPTYSET ; \
- RID_ALEPH ; \
- RID_SETN ; \
- RID_SETZ ; \
- RID_SETQ ; \
- RID_SETR ; \
- RID_SETC ; \
- }; \
- IdCount = { 22 ; };
-
- ImageList RID_IL_SETOPERATIONS
- {
- Prefix = "op";
- MaskColor = IMAGE_STDBTN_COLOR ;
- SETOPERATIONS_IDLIST
- };
-
-#define FUNCTIONS_IDLIST \
- IdList = \
- { \
- RID_ABSX ; \
- RID_FACTX ; \
- RID_SQRTX ; \
- RID_NROOTXY ; \
- RID_EX ; \
- RID_LNX ; \
- RID_EXPX ; \
- RID_LOGX ; \
- RID_SINX ; \
- RID_COSX ; \
- RID_TANX ; \
- RID_COTX ; \
- RID_SINHX ; \
- RID_COSHX ; \
- RID_TANHX ; \
- RID_COTHX ; \
- RID_ARCSINX ; \
- RID_ARCCOSX ; \
- RID_ARCTANX ; \
- RID_ARCCOTX ; \
- RID_ARSINHX ; \
- RID_ARCOSHX ; \
- RID_ARTANHX ; \
- RID_ARCOTHX ; \
- RID_RSUPX ; \
- }; \
- IdCount = { 25 ; };
-
- ImageList RID_IL_FUNCTIONS
- {
- Prefix = "fu";
- MaskColor = IMAGE_STDBTN_COLOR ;
- FUNCTIONS_IDLIST
- };
-
-#define OPERATORS_IDLIST \
- IdList = \
- { \
- RID_LIMX ; \
- RID_SUMX ; \
- RID_PRODX ; \
- RID_COPRODX ; \
- RID_INTX ; \
- RID_IINTX ; \
- RID_IIINTX ; \
- RID_LINTX ; \
- RID_LLINTX ; \
- RID_LLLINTX ; \
- RID_FROMXTOY ; \
- RID_FROMX ; \
- RID_TOX ; \
- }; \
- IdCount = { 13 ; };
-
- ImageList RID_IL_OPERATORS
- {
- Prefix = "fo";
- MaskColor = IMAGE_STDBTN_COLOR ;
- OPERATORS_IDLIST
- };
-
-#define ATTRIBUTES_IDLIST \
- IdList = \
- { \
- RID_ACUTEX ; \
- RID_GRAVEX ; \
- RID_CHECKX ; \
- RID_BREVEX ; \
- RID_BARX ; \
- RID_VECX ; \
- RID_HATX ; \
- RID_TILDEX ; \
- RID_CIRCLEX ; \
- RID_DOTX ; \
- RID_DDOTX ; \
- RID_DDDOTX ; \
- RID_OVERLINEX ; \
- RID_UNDERLINEX ; \
- RID_OVERSTRIKEX ; \
- RID_PHANTOMX ; \
- RID_BOLDX ; \
- RID_ITALX ; \
- RID_SIZEXY ; \
- RID_FONTXY ; \
- RID_WIDEHATX ; \
- RID_WIDETILDEX ; \
- RID_WIDEVECX ; \
- }; \
- IdCount = { 23 ; };
-
- ImageList RID_IL_ATTRIBUTES
- {
- Prefix = "at";
- MaskColor = IMAGE_STDBTN_COLOR ;
- ATTRIBUTES_IDLIST
- };
-
-#define BRACKETS_IDLIST \
- IdList = \
- { \
- RID_LRPARENTX ; \
- RID_LRBRACKETX ; \
- RID_LRANGLEX ; \
- RID_LRBRACEX ; \
- RID_LRLINEX ; \
- RID_LRDLINEX ; \
- RID_LMRANGLEXY ; \
- RID_LRGROUPX ; \
- RID_SLRPARENTX ; \
- RID_SLRBRACKETX ; \
- RID_SLRANGLEX ; \
- RID_SLRBRACEX ; \
- RID_SLRLINEX ; \
- RID_SLRDLINEX ; \
- RID_SLMRANGLEXY ; \
- RID_LRDBRACKETX ; \
- RID_SLRDBRACKETX ; \
- RID_XOVERBRACEY ; \
- RID_XUNDERBRACEY ; \
- }; \
- IdCount = { 19 ; };
-
- ImageList RID_IL_BRACKETS
- {
- Prefix = "al";
- MaskColor = IMAGE_STDBTN_COLOR ;
- BRACKETS_IDLIST
- };
-
-#define FORMAT_IDLIST \
- IdList = \
- { \
- RID_NEWLINE ; \
- RID_SBLANK ; \
- RID_BLANK ; \
- RID_BINOMXY ; \
- RID_STACK ; \
- RID_MATRIX ; \
- RID_ALIGNLX ; \
- RID_ALIGNCX ; \
- RID_ALIGNRX ; \
- RID_RSUBX ; \
- RID_RSUPX ; \
- RID_LSUBX ; \
- RID_LSUPX ; \
- RID_CSUBX ; \
- RID_CSUPX ; \
- }; \
- IdCount = { 15 ; };
-
- ImageList RID_IL_FORMAT
- {
- Prefix = "co";
- MaskColor = IMAGE_STDBTN_COLOR ;
- FORMAT_IDLIST
- };
-
-#define MISC_IDLIST \
- IdList = \
- { \
- RID_INFINITY ; \
- RID_PARTIAL ; \
- RID_NABLA ; \
- RID_EXISTS ; \
- RID_FORALL ; \
- RID_HBAR; \
- RID_LAMBDABAR ; \
- RID_RE ; \
- RID_IM ; \
- RID_WP ; \
- RID_LEFTARROW ; \
- RID_RIGHTARROW ; \
- RID_UPARROW ; \
- RID_DOWNARROW ; \
- RID_DOTSLOW ; \
- RID_DOTSAXIS ; \
- RID_DOTSVERT ; \
- RID_DOTSUP ; \
- RID_DOTSDOWN ; \
- }; \
- IdCount = { 19 ; };
-
- ImageList RID_IL_MISC
- {
- Prefix = "mi";
- MaskColor = IMAGE_STDBTN_COLOR ;
- MISC_IDLIST
- };
-
-#define CATALOG_IDLIST \
- IdList = \
- { \
- RID_UNBINOPS_CAT ; \
- RID_RELATIONS_CAT ; \
- RID_SETOPERATIONS_CAT ; \
- RID_FUNCTIONS_CAT ; \
- RID_OPERATORS_CAT ; \
- RID_ATTRIBUTES_CAT ; \
- RID_MISC_CAT ; \
- RID_BRACKETS_CAT ; \
- RID_FORMAT_CAT ; \
- }; \
- IdCount = { 9 ; };
-
- ImageList RID_IL_CATALOG
- {
- Prefix = "im";
- MaskColor = IMAGE_STDBTN_COLOR ;
- CATALOG_IDLIST
- };
-
String STR_CMDBOXWINDOW
{
CMDBOXWINDOW_TEXT
@@ -3308,76 +1647,6 @@ String RID_ERR_RIGHTEXPECTED
Text [ en-US ] = "'RIGHT' expected" ;
};
-#include "menu.src"
-
-ToolBox RID_MATH_TOOLBOX
-{
- HelpId = RID_MATH_TOOLBOX ;
- Customize = TRUE ;
- LineSpacing = TRUE ;
- Dockable = TRUE ;
- Moveable = TRUE ;
- Sizeable = TRUE ;
- Closeable = TRUE ;
- Zoomable = TRUE ;
- Scroll = TRUE ;
- HideWhenDeactivate = TRUE ;
- Border = TRUE ;
- SVLook = TRUE ;
- Align = BOXALIGN_LEFT ;
- Size = MAP_APPFONT ( 0 , 0 ) ;
- MenuStrings = TRUE ;
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = SID_ZOOMIN ;
- HelpID = SID_ZOOMIN ;
- Text [ en-US ] = "Zoom In" ;
- };
- ToolBoxItem
- {
- Identifier = SID_ZOOMOUT ;
- HelpID = SID_ZOOMOUT ;
- Text [ en-US ] = "Zoom Out" ;
- };
- ToolBoxItem
- {
- Identifier = SID_VIEW100 ;
- HelpID = SID_VIEW100 ;
- Text [ en-US ] = "Zoom 100%" ;
- };
- ToolBoxItem
- {
- Identifier = SID_ADJUST ;
- HelpID = SID_ADJUST ;
- Text [ en-US ] = "Entire Formula" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = SID_DRAW ;
- HelpID = SID_DRAW ;
- Text [ en-US ] = "Refresh" ;
- };
- ToolBoxItem
- {
- Identifier = SID_FORMULACURSOR ;
- HelpID = SID_FORMULACURSOR ;
- Text [ en-US ] = "Formula Cursor";
- };
- ToolBoxItem
- {
- Identifier = SID_SYMBOLS_CATALOGUE ;
- HelpID = SID_SYMBOLS_CATALOGUE ;
- Text [ en-US ] = "Symbols" ;
- };
- };
-};
-
String RID_MATH_TOOLBOX
{
Text [ en-US ] = "Main Toolbar" ;
@@ -3390,21 +1659,12 @@ StringArray RID_PRINTUIOPTIONS
< "%PRODUCTNAME %s"; >;
< "Contents"; >;
< "~Title"; >;
- < "Specifies whether you want the name of the document to be included in the printout"; >;
< "~Formula text"; >;
- < "Specifies whether to include the contents of the 'Commands' window at the bottom of the printout."; >;
< "B~orders"; >;
- < "Applies a thin border to the formula area in the printout."; >;
< "Size"; >;
< "O~riginal size"; >;
- < "Prints the formula without adjusting the current font size."; >;
< "Fit to ~page"; >;
- < "Adjusts the formula to the page format used in the printout."; >;
< "~Scaling"; >;
- < "Reduces or enlarges the size of the printed formula by a specified enlargement factor."; >;
- < "Miscellaneous options"; >;
- < "Ig~nore ~~ and ` at the end of the line"; >;
- < "Specfies that these space wildcards will be removed if they are at the end of a line."; >;
};
};
diff --git a/starmath/source/symbol.cxx b/starmath/source/symbol.cxx
index fb87c31521d5..b0deeb4d93fe 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;
@@ -207,14 +207,19 @@ bool SmSymbolManager::AddOrReplaceSymbol( const SmSym &rSymbol, bool bForceChang
}
else if (pFound && !bForceChange && bSymbolConflict)
{
- // TODO: but what ...
+ // TODO: to solve this a document owned symbol manager would be required ...
OSL_FAIL( "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
+ // global symbol manager somewhat to chance.
}
- }
OSL_ENSURE( 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;
}
diff --git a/starmath/source/toolbox.cxx b/starmath/source/toolbox.cxx
index a7645cb9b703..e398e6313114 100644
--- a/starmath/source/toolbox.cxx
+++ b/starmath/source/toolbox.cxx
@@ -46,9 +46,9 @@
////////////////////////////////////////////////////////////
-static USHORT GetImageListRID( USHORT nCategoryRID )
+static sal_uInt16 GetImageListRID( sal_uInt16 nCategoryRID )
{
- USHORT nRes = 0xFFFF;
+ sal_uInt16 nRes = 0xFFFF;
switch (nCategoryRID)
{
case RID_UNBINOPS_CAT : nRes = RID_IL_UNBINOPS; break;
@@ -67,7 +67,7 @@ static USHORT GetImageListRID( USHORT nCategoryRID )
}
-static sal_Int16 GetToolBoxCategoriesIndex( USHORT nCategoryRID )
+static sal_Int16 GetToolBoxCategoriesIndex( sal_uInt16 nCategoryRID )
{
sal_Int16 nIdx = -1;
switch (nCategoryRID)
@@ -88,9 +88,9 @@ static sal_Int16 GetToolBoxCategoriesIndex( USHORT nCategoryRID )
}
-static USHORT GetCategoryRID( USHORT nResId )
+static sal_uInt16 GetCategoryRID( sal_uInt16 nResId )
{
- USHORT nRes = 0xFFFF;
+ sal_uInt16 nRes = 0xFFFF;
switch (nResId)
{
case RID_IL_UNBINOPS : nRes = RID_UNBINOPS_CAT; break;
@@ -121,7 +121,7 @@ SmToolBoxWindow::SmToolBoxWindow(SfxBindings *pTmpBindings,
SfxChildWindow *pChildWindow,
Window *pParent) :
SfxFloatingWindow(pTmpBindings, pChildWindow, pParent, SmResId(RID_TOOLBOXWINDOW)),
- aToolBoxCat(this, SmResId(NUM_TBX_CATEGORIES + 1)),
+ aToolBoxCat(this, SmResId(TOOLBOX_CATALOG)),
aToolBoxCat_Delim(this, SmResId( FL_TOOLBOX_CAT_DELIM ))
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmToolBoxWindow::SmToolBoxWindow" );
@@ -129,14 +129,14 @@ SmToolBoxWindow::SmToolBoxWindow(SfxBindings *pTmpBindings,
// allow for cursor travelling between toolbox and sub-categories
SetStyle( GetStyle() | WB_DIALOGCONTROL );
- nActiveCategoryRID = sal::static_int_cast< USHORT >(-1);
+ nActiveCategoryRID = USHRT_MAX;
aToolBoxCat.SetClickHdl(LINK(this, SmToolBoxWindow, CategoryClickHdl));
- USHORT i;
- for (i = 0; i < NUM_TBX_CATEGORIES; i++)
+ sal_uInt16 i;
+ for (i = 0; i < NUM_TBX_CATEGORIES; ++i)
{
- ToolBox *pBox = new ToolBox(this, SmResId (i+1));
+ ToolBox *pBox = new ToolBox(this, SmResId( TOOLBOX_CAT_A + i ));
vToolBoxCategories[i] = pBox;
pBox->SetSelectHdl(LINK(this, SmToolBoxWindow, CmdSelectHdl));
}
@@ -146,15 +146,12 @@ SmToolBoxWindow::SmToolBoxWindow(SfxBindings *pTmpBindings,
aImageLists [i] = 0;
FreeResource();
-
- ApplyImageLists( RID_UNBINOPS_CAT );
- SetCategory( RID_UNBINOPS_CAT );
}
SmToolBoxWindow::~SmToolBoxWindow()
{
int i;
- for (i = 0; i < NUM_TBX_CATEGORIES; i++)
+ for (i = 0; i < NUM_TBX_CATEGORIES; ++i)
{
ToolBox *pBox = vToolBoxCategories[i];
delete pBox;
@@ -171,7 +168,7 @@ SmViewShell * SmToolBoxWindow::GetView()
}
-const ImageList * SmToolBoxWindow::GetImageList( USHORT nResId )
+const ImageList * SmToolBoxWindow::GetImageList( sal_uInt16 nResId )
{
// creates the image list via its resource id and stores that
// list for later use in the respective array.
@@ -179,7 +176,7 @@ const ImageList * SmToolBoxWindow::GetImageList( USHORT nResId )
const ImageList *pIL = 0;
// get index to use
- USHORT nCategoryRID = GetCategoryRID( nResId );
+ sal_uInt16 nCategoryRID = GetCategoryRID( nResId );
sal_Int16 nIndex = GetToolBoxCategoriesIndex( nCategoryRID );
if (nIndex == -1 && (nResId == RID_IL_CATALOG))
nIndex = NUM_TBX_CATEGORIES;
@@ -197,7 +194,7 @@ const ImageList * SmToolBoxWindow::GetImageList( USHORT nResId )
}
-void SmToolBoxWindow::ApplyImageLists( USHORT nCategoryRID )
+void SmToolBoxWindow::ApplyImageLists( sal_uInt16 nCategoryRID )
{
// set image list for toolbox 'catalog'
const ImageList *pImageList = GetImageList( RID_IL_CATALOG );
@@ -207,7 +204,7 @@ void SmToolBoxWindow::ApplyImageLists( USHORT nCategoryRID )
// set image list for active (visible) category of 'catalog'
sal_Int16 nIdx = GetToolBoxCategoriesIndex( nCategoryRID );
- USHORT nResId = GetImageListRID( nCategoryRID );
+ sal_uInt16 nResId = GetImageListRID( nCategoryRID );
pImageList = GetImageList( nResId );
OSL_ENSURE( pImageList && nIdx >= 0, "image list or index missing" );
if (pImageList && nIdx >= 0)
@@ -227,11 +224,11 @@ void SmToolBoxWindow::StateChanged( StateChangedType nStateChange )
static bool bSetPosition = true;
if (STATE_CHANGE_INITSHOW == nStateChange)
{
+ SetCategory( nActiveCategoryRID == USHRT_MAX ? RID_UNBINOPS_CAT : nActiveCategoryRID );
+
// calculate initial position to be used after creation of the window...
AdjustPosSize( bSetPosition );
bSetPosition = false;
-
- SetCategory(RID_UNBINOPS_CAT);
}
//... otherwise the base class will remember the last position of the window
SfxFloatingWindow::StateChanged( nStateChange );
@@ -241,7 +238,7 @@ void SmToolBoxWindow::StateChanged( StateChangedType nStateChange )
void SmToolBoxWindow::AdjustPosSize( bool bSetPos )
{
Size aCatSize( aToolBoxCat.CalcWindowSizePixel( 2 ) );
- Size aCmdSize( pToolBoxCmd->CalcWindowSizePixel( 5 ) );
+ Size aCmdSize( pToolBoxCmd->CalcWindowSizePixel( 4 /* see nLines in SetCategory*/ ) );
OSL_ENSURE( aCatSize.Width() == aCmdSize.Width(), "width mismatch" );
// catalog settings
@@ -249,14 +246,12 @@ void SmToolBoxWindow::AdjustPosSize( bool bSetPos )
aToolBoxCat.SetSizePixel( aCatSize );
// settings for catalog / category delimiter
Point aP( aToolBoxCat_Delim.GetPosPixel() );
- aP.X() += 5;
+ aP.X() = 0;
aToolBoxCat_Delim.SetPosPixel( aP );
- Size aS( aCatSize.Width() - 10, 10 );
- aToolBoxCat_Delim.SetSizePixel( aS );
+ aToolBoxCat_Delim.SetSizePixel( Size( aCatSize.Width(), aToolBoxCat_Delim.GetSizePixel().Height() ) );
// category settings
- aP.X() = 0;
aP.Y() += aToolBoxCat_Delim.GetSizePixel().Height();
- for (int i = 0; i < NUM_TBX_CATEGORIES; i++)
+ for (int i = 0; i < NUM_TBX_CATEGORIES; ++i)
{
vToolBoxCategories[i]->SetPosPixel( aP );
vToolBoxCategories[i]->SetSizePixel( aCmdSize );
@@ -285,7 +280,7 @@ void SmToolBoxWindow::AdjustPosSize( bool bSetPos )
}
-BOOL SmToolBoxWindow::Close()
+sal_Bool SmToolBoxWindow::Close()
{
SmViewShell *pViewSh = GetView();
if (pViewSh)
@@ -302,66 +297,63 @@ void SmToolBoxWindow::GetFocus()
aToolBoxCat.GrabFocus();
}
-void SmToolBoxWindow::SetCategory(USHORT nCategoryRID)
+void SmToolBoxWindow::SetCategory(sal_uInt16 nCategoryRID)
{
if (nCategoryRID != nActiveCategoryRID)
- {
ApplyImageLists( nCategoryRID );
- USHORT nLines;
- // check for valid resource id
- switch (nCategoryRID)
- {
- case RID_UNBINOPS_CAT : nLines = 4; break;
- case RID_RELATIONS_CAT: nLines = 5; break;
- case RID_SETOPERATIONS_CAT: nLines = 5; break;
- case RID_FUNCTIONS_CAT: nLines = 5; break;
- case RID_OPERATORS_CAT: nLines = 3; break;
- case RID_ATTRIBUTES_CAT: nLines = 5; break;
- case RID_MISC_CAT: nLines = 4; break;
- case RID_BRACKETS_CAT: nLines = 5; break;
- case RID_FORMAT_CAT: nLines = 3; break;
- default:
- // nothing to be done
- return;
- }
+ sal_uInt16 nLines;
+ // check for valid resource id
+ switch (nCategoryRID)
+ {
+ case RID_UNBINOPS_CAT : nLines = 4; break;
+ case RID_RELATIONS_CAT: nLines = 4; break;
+ case RID_SETOPERATIONS_CAT: nLines = 4; break;
+ case RID_FUNCTIONS_CAT: nLines = 4; break;
+ case RID_OPERATORS_CAT: nLines = 3; break;
+ case RID_ATTRIBUTES_CAT: nLines = 4; break;
+ case RID_MISC_CAT: nLines = 4; break;
+ case RID_BRACKETS_CAT: nLines = 4; break;
+ case RID_FORMAT_CAT: nLines = 3; break;
+ default:
+ // nothing to be done
+ return;
+ }
- pToolBoxCmd->Hide();
+ pToolBoxCmd->Hide();
- sal_Int16 nIdx = GetToolBoxCategoriesIndex( nCategoryRID );
+ sal_Int16 nIdx = GetToolBoxCategoriesIndex( nCategoryRID );
OSL_ENSURE( nIdx >= 0, "unkown category" );
- if (nIdx >= 0)
- pToolBoxCmd = vToolBoxCategories[nIdx];
+ if (nIdx >= 0)
+ pToolBoxCmd = vToolBoxCategories[nIdx];
- // calculate actual size of window to use
- Size aCatSize( aToolBoxCat.CalcWindowSizePixel( 2 ) );
- Size aCmdSize( pToolBoxCmd->CalcWindowSizePixel( nLines ) );
+ // calculate actual size of window to use
+ Size aCatSize( aToolBoxCat.CalcWindowSizePixel( 2 ) );
+ Size aCmdSize( pToolBoxCmd->CalcWindowSizePixel( nLines ) );
OSL_ENSURE( aCatSize.Width() == aCmdSize.Width(), "width mismatch" );
- // main window settings
- Size aWndSize ( aCatSize.Width(), pToolBoxCmd->GetPosPixel().Y() + aCmdSize.Height() + 3);
- SetOutputSizePixel( aWndSize );
+ // main window settings
+ Size aWndSize ( aCatSize.Width(), pToolBoxCmd->GetPosPixel().Y() + aCmdSize.Height() + 3);
+ SetOutputSizePixel( aWndSize );
- if (nActiveCategoryRID)
+ if (nActiveCategoryRID)
aToolBoxCat.CheckItem(nActiveCategoryRID, false);
- nActiveCategoryRID = nCategoryRID;
+ nActiveCategoryRID = nCategoryRID;
aToolBoxCat.CheckItem(nActiveCategoryRID, true);
- pToolBoxCmd->Show();
- }
+ pToolBoxCmd->Show();
}
-IMPL_LINK_INLINE_START( SmToolBoxWindow, CategoryClickHdl, ToolBox*, pToolBox)
+IMPL_LINK( SmToolBoxWindow, CategoryClickHdl, ToolBox*, pToolBox)
{
int nItemId = pToolBox->GetCurItemId();
if (nItemId != 0)
- SetCategory( sal::static_int_cast< USHORT >(nItemId) );
+ SetCategory( sal::static_int_cast< sal_uInt16 >(nItemId) );
return 0;
}
-IMPL_LINK_INLINE_END( SmToolBoxWindow, CategoryClickHdl, ToolBox*, pToolBox)
-IMPL_LINK_INLINE_START( SmToolBoxWindow, CmdSelectHdl, ToolBox*, pToolBox)
+IMPL_LINK( SmToolBoxWindow, CmdSelectHdl, ToolBox*, pToolBox)
{
SmViewShell *pViewSh = GetView();
if (pViewSh)
@@ -370,7 +362,6 @@ IMPL_LINK_INLINE_START( SmToolBoxWindow, CmdSelectHdl, ToolBox*, pToolBox)
new SfxInt16Item(SID_INSERTCOMMAND, pToolBox->GetCurItemId()), 0L);
return 0;
}
-IMPL_LINK_INLINE_END( SmToolBoxWindow, CmdSelectHdl, ToolBox*, pToolBox)
/**************************************************************************/
@@ -378,7 +369,7 @@ IMPL_LINK_INLINE_END( SmToolBoxWindow, CmdSelectHdl, ToolBox*, pToolBox)
SFX_IMPL_FLOATINGWINDOW(SmToolBoxWrapper, SID_TOOLBOXWINDOW);
SmToolBoxWrapper::SmToolBoxWrapper(Window *pParentWindow,
- USHORT nId, SfxBindings* pBindings,
+ sal_uInt16 nId, SfxBindings* pBindings,
SfxChildWinInfo *pInfo) :
SfxChildWindow(pParentWindow, nId)
{
diff --git a/starmath/source/toolbox.hrc b/starmath/source/toolbox.hrc
index 687521d76a32..29adff303a3e 100644..100755
--- a/starmath/source/toolbox.hrc
+++ b/starmath/source/toolbox.hrc
@@ -28,7 +28,19 @@
#ifndef _TOOLBOX_HRC_
#define _TOOLBOX_HRC_
-#define FL_TOOLBOX_CAT_DELIM 21
+#define FL_TOOLBOX_CAT_DELIM 1
+#define TOOLBOX_CATALOG 10
+#define TOOLBOX_CAT_A 11
+#define TOOLBOX_CAT_B 12
+#define TOOLBOX_CAT_C 13
+#define TOOLBOX_CAT_D 14
+#define TOOLBOX_CAT_E 15
+#define TOOLBOX_CAT_F 16
+#define TOOLBOX_CAT_G 17
+#define TOOLBOX_CAT_H 18
+#define TOOLBOX_CAT_I 19
+
+#define NUM_TBX_CATEGORIES (TOOLBOX_CAT_I - TOOLBOX_CAT_A + 1)
#endif
diff --git a/starmath/source/toolbox.src b/starmath/source/toolbox.src
new file mode 100755
index 000000000000..07e728f1e6cb
--- /dev/null
+++ b/starmath/source/toolbox.src
@@ -0,0 +1,1777 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+#include <sfx2/sfx.hrc>
+#include <svx/globlmn.hrc>
+#include "starmath.hrc"
+#include "toolbox.hrc"
+
+#define IMAGE_STDBTN_COLOR Color { Red = 0xff00; Green = 0x0000; Blue = 0xff00; }
+#define IMAGE_STDBTN_COLOR_HC IMAGE_STDBTN_COLOR
+
+
+FloatingWindow RID_TOOLBOXWINDOW
+{
+ HelpId = HID_SMA_OPERATOR_WIN ;
+ Border = TRUE ;
+ Moveable = TRUE ;
+ Closeable = TRUE ;
+ Hide = TRUE ;
+ OutputSize = TRUE ;
+ SVLook = TRUE ;
+ Size = MAP_APPFONT ( 0 , 0 ) ; // to be calculated programmatically
+ Text [ en-US ] = "Elements" ;
+
+ ToolBox TOOLBOX_CATALOG
+ {
+ // main menu of selection-window
+ HelpId = HID_SMA_SELECTION_TBX ;
+ Pos = MAP_APPFONT ( 0 , 0 ) ;
+ Size = MAP_APPFONT ( 65 , 38 ) ;
+ SVLook = TRUE ;
+ LineCount = 2 ;
+ ItemList =
+ {
+ ToolBoxItem
+ {
+ Identifier = RID_UNBINOPS_CAT ;
+ HelpId = HID_SMA_UNBINOPS_CAT ;
+ Text [ en-US ] = "Unary/Binary Operators" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_RELATIONS_CAT ;
+ HelpId = HID_SMA_RELATIONS_CAT ;
+ Text [ en-US ] = "Relations" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_SETOPERATIONS_CAT ;
+ HelpId = HID_SMA_SETOPERATIONS_CAT ;
+ Text [ en-US ] = "Set Operations" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_FUNCTIONS_CAT ;
+ HelpId = HID_SMA_FUNCTIONS_CAT ;
+ Text [ en-US ] = "Functions" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_OPERATORS_CAT ;
+ HelpId = HID_SMA_OPERATORS_CAT ;
+ Text [ en-US ] = "Operators" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_ATTRIBUTES_CAT ;
+ HelpId = HID_SMA_ATTRIBUTES_CAT ;
+ Text [ en-US ] = "Attributes" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_MISC_CAT ;
+ HelpId = HID_SMA_MISC_CAT ;
+ Text [ en-US ] = "Others";
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SPACE ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_BRACKETS_CAT ;
+ HelpId = HID_SMA_BRACKETS_CAT ;
+ Text [ en-US ] = "Brackets" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_FORMAT_CAT ;
+ HelpId = HID_SMA_FORMAT_CAT ;
+ Text [ en-US ] = "Formats" ;
+ };
+ };
+ };
+
+ FixedLine FL_TOOLBOX_CAT_DELIM
+ {
+ Pos = MAP_APPFONT ( 0 , 44 ) ;
+ Size = MAP_APPFONT ( 65 , 8 ) ;
+ };
+
+ ToolBox TOOLBOX_CAT_A
+ {
+ // unary/binary operators
+ HelpId = HID_SMA_UNBINOPS_TBX ;
+ Pos = MAP_APPFONT ( 0 , 45 ) ;
+ Size = MAP_APPFONT ( 65 , 95 ) ;
+ SVLook = TRUE ;
+ Hide = TRUE ;
+ LineCount = 4 ;
+
+ ItemList =
+ {
+ ToolBoxItem
+ {
+ Identifier = RID_PLUSX ;
+ HelpId = HID_SMA_PLUSX ;
+ Text [ en-US ] = "+ Sign" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_MINUSX ;
+ HelpId = HID_SMA_MINUSX ;
+ Text [ en-US ] = "- Sign" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_PLUSMINUSX ;
+ HelpId = HID_SMA_PLUSMINUSX ;
+ Text [ en-US ] = "+- Sign" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_MINUSPLUSX ;
+ HelpId = HID_SMA_MINUSPLUSX ;
+ Text [ en-US ] = "-+ Sign" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_NEGX ;
+ HelpId = HID_SMA_NEGX ;
+ Text [ en-US ] = "Boolean NOT" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XPLUSY ;
+ HelpId = HID_SMA_XPLUSY ;
+ Text [ en-US ] = "Addition +" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XCDOTY ;
+ HelpId = HID_SMA_XCDOTY ;
+ Text [ en-US ] = "Multiplication (Dot )" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XTIMESY ;
+ HelpId = HID_SMA_XTIMESY ;
+ Text [ en-US ] = "Multiplication (x)" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XSYMTIMESY ;
+ HelpId = HID_SMA_XSYMTIMESY ;
+ Text [ en-US ] = "Multiplication (*)" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XANDY ;
+ HelpId = HID_SMA_XANDY ;
+ Text [ en-US ] = "Boolean AND" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XMINUSY ;
+ HelpId = HID_SMA_XMINUSY ;
+ Text [ en-US ] = "Subtraction -" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XOVERY ;
+ HelpId = HID_SMA_XOVERY ;
+ Text [ en-US ] = "Division (Fraction)" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XDIVY ;
+ HelpId = HID_SMA_XDIVY ;
+ Text [ en-US ] = "Division (÷)" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XSYMDIVIDEY ;
+ HelpId = HID_SMA_XSYMDIVIDEY ;
+ Text [ en-US ] = "Division (Slash)" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XORY ;
+ HelpId = HID_SMA_XORY ;
+ Text [ en-US ] = "Boolean OR" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XCIRCY ;
+ HelpId = HID_SMA_XCIRCY ;
+ Text [ en-US ] = "Concatenate";
+ };
+ };
+ };
+
+ ToolBox TOOLBOX_CAT_B
+ {
+ // relations
+ HelpId = HID_SMA_RELATIONS_TBX ;
+ Pos = MAP_APPFONT ( 0 , 45 ) ;
+ Size = MAP_APPFONT ( 65 , 95 ) ;
+ SVLook = TRUE ;
+ Hide = TRUE ;
+ LineCount = 5 ;
+ ItemList =
+ {
+ ToolBoxItem
+ {
+ Identifier = RID_XEQY ;
+ HelpId = HID_SMA_XEQY ;
+ Text [ en-US ] = "Is Equal" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XNEQY ;
+ HelpId = HID_SMA_XNEQY ;
+ Text [ en-US ] = "Is Not Equal" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XAPPROXY ;
+ HelpId = HID_SMA_XAPPROXY ;
+ Text [ en-US ] = "Is Approximately Equal" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XDIVIDESY ;
+ HelpId = HID_SMA_XDIVIDESY ;
+ Text [ en-US ] = "Divides";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XNDIVIDESY ;
+ HelpId = HID_SMA_XNDIVIDESY ;
+ Text [ en-US ] = "Does Not Divide";
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XLTY ;
+ HelpId = HID_SMA_XLTY ;
+ Text [ en-US ] = "Is Less Than" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XGTY ;
+ HelpId = HID_SMA_XGTY ;
+ Text [ en-US ] = "Is Greater Than" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XSIMEQY ;
+ HelpId = HID_SMA_XSIMEQY ;
+ /* ### ACHTUNG: Neuer Text in Resource? ist �hnlich oder gleich : ist �hnlich oder glech */
+ Text [ en-US ] = "Is Similar Or Equal" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XPARALLELY ;
+ HelpId = HID_SMA_XPARALLELY ;
+ Text [ en-US ] = "Is Parallel To" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XORTHOY ;
+ HelpId = HID_SMA_XORTHOY ;
+ Text [ en-US ] = "Is Orthogonal To" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XLESLANTY ;
+ HelpId = HID_SMA_XLESLANTY ;
+ Text [ en-US ] = "Is Less Than Or Equal To" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XGESLANTY ;
+ HelpId = HID_SMA_XGESLANTY ;
+ Text [ en-US ] = "Is Greater Than Or Equal To" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XSIMY ;
+ HelpId = HID_SMA_XSIMY ;
+ Text [ en-US ] = "Is Similar To" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XEQUIVY ;
+ HelpId = HID_SMA_XEQUIVY ;
+ Text [ en-US ] = "Is Congruent To" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SPACE ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XLEY ;
+ HelpId = HID_SMA_XLEY ;
+ Text [ en-US ] = "Is Less Than Or Equal To" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XGEY ;
+ HelpId = HID_SMA_XGEY ;
+ Text [ en-US ] = "Is Greater Than Or Equal To" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XPROPY ;
+ HelpId = HID_SMA_XPROPY ;
+ Text [ en-US ] = "Is Proportional To" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XTOWARDY ;
+ HelpId = HID_SMA_XTOWARDY ;
+ Text [ en-US ] = "Toward" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SPACE ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_DLARROW ;
+ HelpId = HID_SMA_DLARROW ;
+ Text [ en-US ] = "Double Arrow Left";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_DLRARROW ;
+ HelpId = HID_SMA_DLRARROW ;
+ Text [ en-US ] = "Double Arrow Left And Right";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_DRARROW ;
+ HelpId = HID_SMA_DRARROW ;
+ Text [ en-US ] = "Double Arrow Right";
+ };
+ };
+ };
+
+ ToolBox TOOLBOX_CAT_C
+ {
+ // set operations
+ HelpId = HID_SMA_SETOPERATIONS_TBX ;
+ Pos = MAP_APPFONT ( 0 , 45 ) ;
+ Size = MAP_APPFONT ( 65 , 95 ) ;
+ SVLook = TRUE ;
+ Hide = TRUE ;
+ LineCount = 5 ;
+ ItemList =
+ {
+ ToolBoxItem
+ {
+ Identifier = RID_XINY ;
+ HelpId = HID_SMA_XINY ;
+ Text [ en-US ] = "Is In" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XNOTINY ;
+ HelpId = HID_SMA_XNOTINY ;
+ Text [ en-US ] = "Is Not In" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XOWNSY ;
+ HelpId = HID_SMA_XOWNSY ;
+ Text [ en-US ] = "Owns" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SPACE ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_EMPTYSET ;
+ HelpId = HID_SMA_EMPTYSET ;
+ Text [ en-US ] = "Empty Set";
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XINTERSECTIONY ;
+ HelpId = HID_SMA_XINTERSECTIONY ;
+ Text [ en-US ] = "Intersection" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XUNIONY ;
+ HelpId = HID_SMA_XUNIONY ;
+ Text [ en-US ] = "Union" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XSETMINUSY ;
+ HelpId = HID_SMA_XSETMINUSY ;
+ Text [ en-US ] = "Difference" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XSLASHY ;
+ HelpId = HID_SMA_XSLASHY ;
+ Text [ en-US ] = "Quotient Set" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_ALEPH ;
+ HelpId = HID_SMA_ALEPH ;
+ Text [ en-US ] = "Aleph";
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XSUBSETY ;
+ HelpId = HID_SMA_XSUBSETY ;
+ Text [ en-US ] = "Subset" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XSUBSETEQY ;
+ HelpId = HID_SMA_XSUBSETEQY ;
+ Text [ en-US ] = "Subset Or Equal To" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XSUPSETY ;
+ HelpId = HID_SMA_XSUPSETY ;
+ Text [ en-US ] = "Superset" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XSUPSETEQY ;
+ HelpId = HID_SMA_XSUPSETEQY ;
+ Text [ en-US ] = "Superset Or Equal To" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SPACE ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XNSUBSETY ;
+ HelpId = HID_SMA_XNSUBSETY ;
+ Text [ en-US ] = "Not Subset" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XNSUBSETEQY ;
+ HelpId = HID_SMA_XNSUBSETEQY ;
+ Text [ en-US ] = "Not Subset Or Equal" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XNSUPSETY ;
+ HelpId = HID_SMA_XNSUPSETY ;
+ Text [ en-US ] = "Not Superset" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XNSUPSETEQY ;
+ HelpId = HID_SMA_XNSUPSETEQY ;
+ Text [ en-US ] = "Not Superset Or Equal" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SPACE ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_SETN ;
+ HelpId = HID_SMA_SETN ;
+ Text [ en-US ] = "Natural Numbers Set";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_SETZ ;
+ HelpId = HID_SMA_SETZ ;
+ Text [ en-US ] = "Integers Set";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_SETQ ;
+ HelpId = HID_SMA_SETQ ;
+ Text [ en-US ] = "Set of Rational Numbers";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_SETR ;
+ HelpId = HID_SMA_SETR ;
+ Text [ en-US ] = "Real Numbers Set";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_SETC ;
+ HelpId = HID_SMA_SETC ;
+ Text [ en-US ] = "Complex Numbers Set";
+ };
+ };
+ };
+
+ ToolBox TOOLBOX_CAT_D
+ {
+ // functions
+ HelpId = HID_SMA_FUNCTIONS_TBX ;
+ Pos = MAP_APPFONT ( 0 , 45 ) ;
+ Size = MAP_APPFONT ( 65 , 95 ) ;
+ SVLook = TRUE ;
+ Hide = TRUE ;
+ LineCount = 5 ;
+ ItemList =
+ {
+ ToolBoxItem
+ {
+ Identifier = RID_EX ;
+ HelpId = HID_SMA_EX ;
+ Text [ en-US ] = "Exponential Function" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_LNX ;
+ HelpId = HID_SMA_LNX ;
+ Text [ en-US ] = "Natural Logarithm" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_EXPX ;
+ HelpId = HID_SMA_EXPX ;
+ Text [ en-US ] = "Exponential Function" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_LOGX ;
+ HelpId = HID_SMA_LOGX ;
+ Text [ en-US ] = "Logarithm" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_RSUPX ;
+ HelpId = HID_SMA_RSUPX ;
+ Text [ en-US ] = "Power";
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_SINX ;
+ HelpId = HID_SMA_SINX ;
+ Text [ en-US ] = "Sine" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_COSX ;
+ HelpId = HID_SMA_COSX ;
+ Text [ en-US ] = "Cosine" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_TANX ;
+ HelpId = HID_SMA_TANX ;
+ Text [ en-US ] = "Tangent" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_COTX ;
+ HelpId = HID_SMA_COTX ;
+ Text [ en-US ] = "Cotangent" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_SQRTX ;
+ HelpId = HID_SMA_SQRTX ;
+ Text [ en-US ] = "Square Root" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_ARCSINX ;
+ HelpId = HID_SMA_ARCSINX ;
+ Text [ en-US ] = "Arcsine" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_ARCCOSX ;
+ HelpId = HID_SMA_ARCCOSX ;
+ Text [ en-US ] = "Arccosine" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_ARCTANX ;
+ HelpId = HID_SMA_ARCTANX ;
+ Text [ en-US ] = "Arctangent" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_ARCCOTX ;
+ HelpId = HID_SMA_ARCCOTX ;
+ Text [ en-US ] = "Arccotangent" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_NROOTXY ;
+ HelpId = HID_SMA_NROOTXY ;
+ Text [ en-US ] = "N-th Root" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_SINHX ;
+ HelpId = HID_SMA_SINHX ;
+ Text [ en-US ] = "Hyperbolic Sine" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_COSHX ;
+ HelpId = HID_SMA_COSHX ;
+ Text [ en-US ] = "Hyperbolic Cosine" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_TANHX ;
+ HelpId = HID_SMA_TANHX ;
+ Text [ en-US ] = "Hyperbolic Tangent" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_COTHX ;
+ HelpId = HID_SMA_COTHX ;
+ Text [ en-US ] = "Hyperbolic Cotangent" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_ABSX ;
+ HelpId = HID_SMA_ABSX ;
+ Text [ en-US ] = "Absolute Value" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_ARSINHX ;
+ HelpId = HID_SMA_ARSINHX ;
+ Text [ en-US ] = "Area Hyperbolic Sine" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_ARCOSHX ;
+ HelpId = HID_SMA_ARCOSHX ;
+ Text [ en-US ] = "Area Hyperbolic Cosine" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_ARTANHX ;
+ HelpId = HID_SMA_ARTANHX ;
+ Text [ en-US ] = "Area Hyperbolic Tangent" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_ARCOTHX ;
+ HelpId = HID_SMA_ARCOTHX ;
+ Text [ en-US ] = "Area Hyperbolic Cotangent" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_FACTX ;
+ HelpId = HID_SMA_FACTX ;
+ Text [ en-US ] = "Factorial" ;
+ };
+ };
+ };
+
+ ToolBox TOOLBOX_CAT_E
+ {
+ // operators
+ HelpId = HID_SMA_OPERATORS_TBX ;
+ Pos = MAP_APPFONT ( 0 , 45 ) ;
+ Size = MAP_APPFONT ( 65 , 95 ) ;
+ SVLook = TRUE ;
+ Hide = TRUE ;
+ LineCount = 3 ;
+ ItemList =
+ {
+ ToolBoxItem
+ {
+ Identifier = RID_LIMX ;
+ HelpId = HID_SMA_LIMX ;
+ Text [ en-US ] = "Limes" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_SUMX ;
+ HelpId = HID_SMA_SUMX ;
+ Text [ en-US ] = "Sum" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_PRODX ;
+ HelpId = HID_SMA_PRODX ;
+ Text [ en-US ] = "Product" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_COPRODX ;
+ HelpId = HID_SMA_COPRODX ;
+ Text [ en-US ] = "Coproduct" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_FROMXTOY ;
+ HelpId = HID_SMA_FROMXTOY ;
+ Text [ en-US ] = "Upper And Lower Limit" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_INTX ;
+ HelpId = HID_SMA_INTX ;
+ Text [ en-US ] = "Integral" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_IINTX ;
+ HelpId = HID_SMA_IINTX ;
+ Text [ en-US ] = "Double Integral" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_IIINTX ;
+ HelpId = HID_SMA_IIINTX ;
+ Text [ en-US ] = "Triple Integral" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SPACE ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_FROMX ;
+ HelpId = HID_SMA_FROMX ;
+ Text [ en-US ] = "Lower Limit" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_LINTX ;
+ HelpId = HID_SMA_LINTX ;
+ Text [ en-US ] = "Curve Integral" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_LLINTX ;
+ HelpId = HID_SMA_LLINTX ;
+ Text [ en-US ] = "Double Curve Integral" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_LLLINTX ;
+ HelpId = HID_SMA_LLLINTX ;
+ Text [ en-US ] = "Triple Curve Integral" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SPACE ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_TOX ;
+ HelpId = HID_SMA_TOX ;
+ Text [ en-US ] = "Upper Limit" ;
+ };
+ };
+ };
+
+ ToolBox TOOLBOX_CAT_F
+ {
+ // attributs
+ HelpId = HID_SMA_ATTRIBUTES_TBX ;
+ Pos = MAP_APPFONT ( 0 , 45 ) ;
+ Size = MAP_APPFONT ( 65 , 95 ) ;
+ SVLook = TRUE ;
+ Hide = TRUE ;
+ LineCount = 5 ;
+ ItemList =
+ {
+ ToolBoxItem
+ {
+ Identifier = RID_ACUTEX ;
+ HelpId = HID_SMA_ACUTEX ;
+ Text [ en-US ] = "Acute Accent";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_GRAVEX ;
+ HelpId = HID_SMA_GRAVEX ;
+ Text [ en-US ] = "Grave Accent";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_CHECKX ;
+ HelpId = HID_SMA_CHECKX ;
+ Text [ en-US ] = "Reverse Circumflex" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_BREVEX ;
+ HelpId = HID_SMA_BREVEX ;
+ Text [ en-US ] = "Breve" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_CIRCLEX ;
+ HelpId = HID_SMA_CIRCLEX ;
+ Text [ en-US ] = "Circle" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_VECX ;
+ HelpId = HID_SMA_VECX ;
+ Text [ en-US ] = "Vector Arrow" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_TILDEX ;
+ HelpId = HID_SMA_TILDEX ;
+ Text [ en-US ] = "Tilde" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_HATX ;
+ HelpId = HID_SMA_HATX ;
+ Text [ en-US ] = "Circumflex" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_BARX ;
+ HelpId = HID_SMA_BARX ;
+ Text [ en-US ] = "Line Above" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_DOTX ;
+ HelpId = HID_SMA_DOTX ;
+ Text [ en-US ] = "Dot" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_WIDEVECX ;
+ HelpId = HID_SMA_WIDEVECX ;
+ Text [ en-US ] = "Large Vector Arrow";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_WIDETILDEX ;
+ HelpId = HID_SMA_WIDETILDEX ;
+ Text [ en-US ] = "Large Tilde";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_WIDEHATX ;
+ HelpId = HID_SMA_WIDEHATX ;
+ Text [ en-US ] = "Large Circumflex";
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SPACE ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_DDOTX ;
+ HelpId = HID_SMA_DDOTX ;
+ Text [ en-US ] = "Double Dot" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_OVERLINEX ;
+ HelpId = HID_SMA_OVERLINEX ;
+ Text [ en-US ] = "Line Over" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_UNDERLINEX ;
+ HelpId = HID_SMA_UNDERLINEX ;
+ Text [ en-US ] = "Line Below" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_OVERSTRIKEX ;
+ HelpId = HID_SMA_OVERSTRIKEX ;
+ Text [ en-US ] = "Line Through" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SPACE ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_DDDOTX ;
+ HelpId = HID_SMA_DDDOTX ;
+ Text [ en-US ] = "Triple Dot" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_PHANTOMX ;
+ HelpId = HID_SMA_PHANTOMX ;
+ Text [ en-US ] = "Transparent" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_BOLDX ;
+ HelpId = HID_SMA_BOLDX ;
+ Text [ en-US ] = "Bold Font" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_ITALX ;
+ HelpId = HID_SMA_ITALX ;
+ Text [ en-US ] = "Italic Font" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_SIZEXY ;
+ HelpId = HID_SMA_SIZEXY ;
+ Text [ en-US ] = "Resize" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_FONTXY ;
+ HelpId = HID_SMA_FONTXY ;
+ Text [ en-US ] = "Change Font" ;
+ };
+ };
+ };
+
+ ToolBox TOOLBOX_CAT_G
+ {
+ // parentheses
+ HelpId = HID_SMA_BRACKETS_TBX ;
+ Pos = MAP_APPFONT ( 0 , 45 ) ;
+ Size = MAP_APPFONT ( 65 , 95 ) ;
+ SVLook = TRUE ;
+ Hide = TRUE ;
+ LineCount = 5 ;
+ ItemList =
+ {
+ ToolBoxItem
+ {
+ Identifier = RID_LRPARENTX ;
+ HelpId = HID_SMA_LRPARENTX ;
+ Text [ en-US ] = "Round Brackets" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_LRBRACKETX ;
+ HelpId = HID_SMA_LRBRACKETX ;
+ Text [ en-US ] = "Square Brackets" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_LRDBRACKETX ;
+ HelpId = HID_SMA_LRDBRACKETX ;
+ Text [ en-US ] = "Double Square Brackets";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_LRLINEX ;
+ HelpId = HID_SMA_LRLINEX ;
+ Text [ en-US ] = "Single Lines" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_LRDLINEX ;
+ HelpId = HID_SMA_LRDLINEX ;
+ Text [ en-US ] = "Double Lines" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_LRBRACEX ;
+ HelpId = HID_SMA_LRBRACEX ;
+ Text [ en-US ] = "Braces" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_LRANGLEX ;
+ HelpId = HID_SMA_LRANGLEX ;
+ Text [ en-US ] = "Angle Brackets" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_LMRANGLEXY ;
+ HelpId = HID_SMA_LMRANGLEXY ;
+ Text [ en-US ] = "Operator Brackets";
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SPACE ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_LRGROUPX ;
+ HelpId = HID_SMA_LRGROUPX ;
+ Text [ en-US ] = "Group Brackets" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_SLRPARENTX ;
+ HelpId = HID_SMA_SLRPARENTX ;
+ Text [ en-US ] = "Round Brackets (Scalable)" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_SLRBRACKETX ;
+ HelpId = HID_SMA_SLRBRACKETX ;
+ Text [ en-US ] = "Square Brackets (Scalable)" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_SLRDBRACKETX ;
+ HelpId = HID_SMA_SLRDBRACKETX ;
+ Text [ en-US ] = "Double Square Brackets (Scalable)";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_SLRLINEX ;
+ HelpId = HID_SMA_SLRLINEX ;
+ Text [ en-US ] = "Single Lines (Scalable)" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_SLRDLINEX ;
+ HelpId = HID_SMA_SLRDLINEX ;
+ Text [ en-US ] = "Double Lines (Scalable)" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_SLRBRACEX ;
+ HelpId = HID_SMA_SLRBRACEX ;
+ Text [ en-US ] = "Braces (Scalable)" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_SLRANGLEX ;
+ HelpId = HID_SMA_SLRANGLEX ;
+ Text [ en-US ] = "Angle Brackets (Scalable)" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_SLMRANGLEXY ;
+ HelpId = HID_SMA_SLMRANGLEXY ;
+ Text [ en-US ] = "Operator Brackets (Scalable)";
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XOVERBRACEY ;
+ HelpId = HID_SMA_XOVERBRACEY ;
+ Text [ en-US ] = "Braces Top (Scalable)";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XUNDERBRACEY ;
+ HelpId = HID_SMA_XUNDERBRACEY ;
+ Text [ en-US ] = "Braces Bottom (Scalable)";
+ };
+ };
+ };
+
+ ToolBox TOOLBOX_CAT_H
+ {
+ // format
+ HelpId = HID_SMA_FORMAT_TBX ;
+ Pos = MAP_APPFONT ( 0 , 45 ) ;
+ Size = MAP_APPFONT ( 65 , 95 ) ;
+ SVLook = TRUE ;
+ Hide = TRUE ;
+ LineCount = 3 ;
+ ItemList =
+ {
+ ToolBoxItem
+ {
+ Identifier = RID_LSUPX ;
+ HelpId = HID_SMA_LSUPX ;
+ Text [ en-US ] = "Superscript Left" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_CSUPX ;
+ HelpId = HID_SMA_CSUPX ;
+ Text [ en-US ] = "Superscript Top";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_RSUPX ;
+ HelpId = HID_SMA_RSUPX ;
+ Text [ en-US ] = "Superscript Right" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_BINOMXY ;
+ HelpId = HID_SMA_BINOMXY ;
+ Text [ en-US ] = "Vertical Stack (2 Elements)" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_NEWLINE ;
+ HelpId = HID_SMA_NEWLINE ;
+ Text [ en-US ] = "New Line" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_LSUBX ;
+ HelpId = HID_SMA_LSUBX ;
+ Text [ en-US ] = "Subscript Left" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_CSUBX ;
+ HelpId = HID_SMA_CSUBX ;
+ Text [ en-US ] = "Subscript Bottom";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_RSUBX ;
+ HelpId = HID_SMA_RSUBX ;
+ Text [ en-US ] = "Subscript Right" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_STACK ;
+ HelpId = HID_SMA_STACK ;
+ Text [ en-US ] = "Vertical Stack" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_SBLANK ;
+ HelpId = HID_SMA_SBLANK ;
+ Text [ en-US ] = "Small Gap" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_ALIGNLX ;
+ HelpId = HID_SMA_ALIGNLX ;
+ Text [ en-US ] = "Align Left" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_ALIGNCX ;
+ HelpId = HID_SMA_ALIGNCX ;
+ Text [ en-US ] = "Align Center" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_ALIGNRX ;
+ HelpId = HID_SMA_ALIGNRX ;
+ Text [ en-US ] = "Align Right" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_MATRIX ;
+ HelpId = HID_SMA_MATRIX ;
+ Text [ en-US ] = "Matrix Stack" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_BLANK ;
+ HelpId = HID_SMA_BLANK ;
+ Text [ en-US ] = "Gap" ;
+ };
+ };
+ };
+
+ ToolBox TOOLBOX_CAT_I
+ {
+ // misc
+ HelpId = HID_SMA_FORMAT_TBX ;
+ Pos = MAP_APPFONT ( 0 , 45 ) ;
+ Size = MAP_APPFONT ( 65 , 95 ) ;
+ SVLook = TRUE ;
+ Hide = TRUE ;
+ LineCount = 4 ;
+ ItemList =
+ {
+ ToolBoxItem
+ {
+ Identifier = RID_INFINITY ;
+ HelpId = HID_SMA_INFINITY ;
+ Text [ en-US ] = "infinite";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_PARTIAL ;
+ HelpId = HID_SMA_PARTIAL ;
+ Text [ en-US ] = "Partial";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_NABLA ;
+ HelpId = HID_SMA_NABLA ;
+ Text [ en-US ] = "Nabla";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_EXISTS ;
+ HelpId = HID_SMA_EXISTS ;
+ Text [ en-US ] = "There Exists";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_FORALL ;
+ HelpId = HID_SMA_FORALL ;
+ Text [ en-US ] = "For All";
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_HBAR ;
+ HelpId = HID_SMA_HBAR ;
+ Text [ en-US ] = "h Bar";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_LAMBDABAR ;
+ HelpId = HID_SMA_LAMBDABAR ;
+ Text [ en-US ] = "Lambda Bar";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_RE ;
+ HelpId = HID_SMA_RE ;
+ Text [ en-US ] = "Real Part";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_IM ;
+ HelpId = HID_SMA_IM ;
+ Text [ en-US ] = "Imaginary Part";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_WP ;
+ HelpId = HID_SMA_WP ;
+ Text [ en-US ] = "Weierstrass p";
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_LEFTARROW ;
+ HelpId = HID_SMA_LEFTARROW ;
+ Text [ en-US ] = "Left Arrow";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_RIGHTARROW ;
+ HelpId = HID_SMA_RIGHTARROW ;
+ Text [ en-US ] = "Right Arrow";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_UPARROW ;
+ HelpId = HID_SMA_UPARROW ;
+ Text [ en-US ] = "Up Arrow";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_DOWNARROW ;
+ HelpId = HID_SMA_DOWNARROW ;
+ Text [ en-US ] = "Down Arrow";
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SPACE ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_DOTSLOW ;
+ HelpId = HID_SMA_DOTSLOW ;
+ Text [ en-US ] = "Dots At Bottom";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_DOTSAXIS ;
+ HelpId = HID_SMA_DOTSAXIS ;
+ Text [ en-US ] = "Dots In Middle";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_DOTSVERT ;
+ HelpId = HID_SMA_DOTSVERT ;
+ Text [ en-US ] = "Dots Vertically";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_DOTSUP ;
+ HelpId = HID_SMA_DOTSUP ;
+ Text [ en-US ] = "Dots To Top";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_DOTSDOWN ;
+ HelpId = HID_SMA_DOTSDOWN ;
+ Text [ en-US ] = "Dots to Bottom";
+ };
+ };
+ };
+};
+
+
+
+#define UNBINOPS_IDLIST \
+ IdList = \
+ { \
+ RID_PLUSX ; \
+ RID_MINUSX ; \
+ RID_PLUSMINUSX ; \
+ RID_MINUSPLUSX ; \
+ RID_XPLUSY ; \
+ RID_XCDOTY ; \
+ RID_XTIMESY ; \
+ RID_XSYMTIMESY ; \
+ RID_XMINUSY ; \
+ RID_XOVERY ; \
+ RID_XDIVY ; \
+ RID_XSYMDIVIDEY ; \
+ RID_NEGX ; \
+ RID_XANDY ; \
+ RID_XORY ; \
+ RID_XCIRCY ; \
+ }; \
+ IdCount = { 16 ; };
+
+ ImageList RID_IL_UNBINOPS
+ {
+ Prefix = "un";
+ MaskColor = IMAGE_STDBTN_COLOR ;
+ UNBINOPS_IDLIST
+ };
+
+#define RELATIONS_IDLIST \
+ IdList = \
+ { \
+ RID_XEQY ; \
+ RID_XNEQY ; \
+ RID_XEQUIVY ; \
+ RID_XORTHOY ; \
+ RID_XLTY ; \
+ RID_XGTY ; \
+ RID_XAPPROXY ; \
+ RID_XPARALLELY ; \
+ RID_XLESLANTY ; \
+ RID_XGESLANTY ; \
+ RID_XSIMEQY ; \
+ RID_XPROPY ; \
+ RID_XLEY ; \
+ RID_XGEY ; \
+ RID_XSIMY ; \
+ RID_XTOWARDY ; \
+ RID_XDIVIDESY ; \
+ RID_XNDIVIDESY; \
+ RID_DLARROW ; \
+ RID_DLRARROW ; \
+ RID_DRARROW ; \
+ }; \
+ IdCount ={ 21 ; };
+
+ ImageList RID_IL_RELATIONS
+ {
+ Prefix = "bi";
+ MaskColor = IMAGE_STDBTN_COLOR ;
+ RELATIONS_IDLIST
+ };
+
+#define SETOPERATIONS_IDLIST \
+ IdList = \
+ { \
+ RID_XINY ; \
+ RID_XNOTINY ; \
+ RID_XOWNSY ; \
+ RID_XINTERSECTIONY ; \
+ RID_XUNIONY ; \
+ RID_XSETMINUSY ; \
+ RID_XSLASHY ; \
+ RID_XSUBSETY ; \
+ RID_XSUBSETEQY ; \
+ RID_XSUPSETY ; \
+ RID_XSUPSETEQY ; \
+ RID_XNSUBSETY ; \
+ RID_XNSUBSETEQY ; \
+ RID_XNSUPSETY ; \
+ RID_XNSUPSETEQY ; \
+ RID_EMPTYSET ; \
+ RID_ALEPH ; \
+ RID_SETN ; \
+ RID_SETZ ; \
+ RID_SETQ ; \
+ RID_SETR ; \
+ RID_SETC ; \
+ }; \
+ IdCount = { 22 ; };
+
+ ImageList RID_IL_SETOPERATIONS
+ {
+ Prefix = "op";
+ MaskColor = IMAGE_STDBTN_COLOR ;
+ SETOPERATIONS_IDLIST
+ };
+
+#define FUNCTIONS_IDLIST \
+ IdList = \
+ { \
+ RID_ABSX ; \
+ RID_FACTX ; \
+ RID_SQRTX ; \
+ RID_NROOTXY ; \
+ RID_EX ; \
+ RID_LNX ; \
+ RID_EXPX ; \
+ RID_LOGX ; \
+ RID_SINX ; \
+ RID_COSX ; \
+ RID_TANX ; \
+ RID_COTX ; \
+ RID_SINHX ; \
+ RID_COSHX ; \
+ RID_TANHX ; \
+ RID_COTHX ; \
+ RID_ARCSINX ; \
+ RID_ARCCOSX ; \
+ RID_ARCTANX ; \
+ RID_ARCCOTX ; \
+ RID_ARSINHX ; \
+ RID_ARCOSHX ; \
+ RID_ARTANHX ; \
+ RID_ARCOTHX ; \
+ RID_RSUPX ; \
+ }; \
+ IdCount = { 25 ; };
+
+ ImageList RID_IL_FUNCTIONS
+ {
+ Prefix = "fu";
+ MaskColor = IMAGE_STDBTN_COLOR ;
+ FUNCTIONS_IDLIST
+ };
+
+#define OPERATORS_IDLIST \
+ IdList = \
+ { \
+ RID_LIMX ; \
+ RID_SUMX ; \
+ RID_PRODX ; \
+ RID_COPRODX ; \
+ RID_INTX ; \
+ RID_IINTX ; \
+ RID_IIINTX ; \
+ RID_LINTX ; \
+ RID_LLINTX ; \
+ RID_LLLINTX ; \
+ RID_FROMXTOY ; \
+ RID_FROMX ; \
+ RID_TOX ; \
+ }; \
+ IdCount = { 13 ; };
+
+ ImageList RID_IL_OPERATORS
+ {
+ Prefix = "fo";
+ MaskColor = IMAGE_STDBTN_COLOR ;
+ OPERATORS_IDLIST
+ };
+
+#define ATTRIBUTES_IDLIST \
+ IdList = \
+ { \
+ RID_ACUTEX ; \
+ RID_GRAVEX ; \
+ RID_CHECKX ; \
+ RID_BREVEX ; \
+ RID_BARX ; \
+ RID_VECX ; \
+ RID_HATX ; \
+ RID_TILDEX ; \
+ RID_CIRCLEX ; \
+ RID_DOTX ; \
+ RID_DDOTX ; \
+ RID_DDDOTX ; \
+ RID_OVERLINEX ; \
+ RID_UNDERLINEX ; \
+ RID_OVERSTRIKEX ; \
+ RID_PHANTOMX ; \
+ RID_BOLDX ; \
+ RID_ITALX ; \
+ RID_SIZEXY ; \
+ RID_FONTXY ; \
+ RID_WIDEHATX ; \
+ RID_WIDETILDEX ; \
+ RID_WIDEVECX ; \
+ }; \
+ IdCount = { 23 ; };
+
+ ImageList RID_IL_ATTRIBUTES
+ {
+ Prefix = "at";
+ MaskColor = IMAGE_STDBTN_COLOR ;
+ ATTRIBUTES_IDLIST
+ };
+
+#define BRACKETS_IDLIST \
+ IdList = \
+ { \
+ RID_LRPARENTX ; \
+ RID_LRBRACKETX ; \
+ RID_LRANGLEX ; \
+ RID_LRBRACEX ; \
+ RID_LRLINEX ; \
+ RID_LRDLINEX ; \
+ RID_LMRANGLEXY ; \
+ RID_LRGROUPX ; \
+ RID_SLRPARENTX ; \
+ RID_SLRBRACKETX ; \
+ RID_SLRANGLEX ; \
+ RID_SLRBRACEX ; \
+ RID_SLRLINEX ; \
+ RID_SLRDLINEX ; \
+ RID_SLMRANGLEXY ; \
+ RID_LRDBRACKETX ; \
+ RID_SLRDBRACKETX ; \
+ RID_XOVERBRACEY ; \
+ RID_XUNDERBRACEY ; \
+ }; \
+ IdCount = { 19 ; };
+
+ ImageList RID_IL_BRACKETS
+ {
+ Prefix = "al";
+ MaskColor = IMAGE_STDBTN_COLOR ;
+ BRACKETS_IDLIST
+ };
+
+#define FORMAT_IDLIST \
+ IdList = \
+ { \
+ RID_NEWLINE ; \
+ RID_SBLANK ; \
+ RID_BLANK ; \
+ RID_BINOMXY ; \
+ RID_STACK ; \
+ RID_MATRIX ; \
+ RID_ALIGNLX ; \
+ RID_ALIGNCX ; \
+ RID_ALIGNRX ; \
+ RID_RSUBX ; \
+ RID_RSUPX ; \
+ RID_LSUBX ; \
+ RID_LSUPX ; \
+ RID_CSUBX ; \
+ RID_CSUPX ; \
+ }; \
+ IdCount = { 15 ; };
+
+ ImageList RID_IL_FORMAT
+ {
+ Prefix = "co";
+ MaskColor = IMAGE_STDBTN_COLOR ;
+ FORMAT_IDLIST
+ };
+
+#define MISC_IDLIST \
+ IdList = \
+ { \
+ RID_INFINITY ; \
+ RID_PARTIAL ; \
+ RID_NABLA ; \
+ RID_EXISTS ; \
+ RID_FORALL ; \
+ RID_HBAR; \
+ RID_LAMBDABAR ; \
+ RID_RE ; \
+ RID_IM ; \
+ RID_WP ; \
+ RID_LEFTARROW ; \
+ RID_RIGHTARROW ; \
+ RID_UPARROW ; \
+ RID_DOWNARROW ; \
+ RID_DOTSLOW ; \
+ RID_DOTSAXIS ; \
+ RID_DOTSVERT ; \
+ RID_DOTSUP ; \
+ RID_DOTSDOWN ; \
+ }; \
+ IdCount = { 19 ; };
+
+ ImageList RID_IL_MISC
+ {
+ Prefix = "mi";
+ MaskColor = IMAGE_STDBTN_COLOR ;
+ MISC_IDLIST
+ };
+
+#define CATALOG_IDLIST \
+ IdList = \
+ { \
+ RID_UNBINOPS_CAT ; \
+ RID_RELATIONS_CAT ; \
+ RID_SETOPERATIONS_CAT ; \
+ RID_FUNCTIONS_CAT ; \
+ RID_OPERATORS_CAT ; \
+ RID_ATTRIBUTES_CAT ; \
+ RID_MISC_CAT ; \
+ RID_BRACKETS_CAT ; \
+ RID_FORMAT_CAT ; \
+ }; \
+ IdCount = { 9 ; };
+
+ ImageList RID_IL_CATALOG
+ {
+ Prefix = "im";
+ MaskColor = IMAGE_STDBTN_COLOR ;
+ CATALOG_IDLIST
+ };
+
+
+
diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx
index 06833f901a6c..d3d41c36ee40 100644
--- a/starmath/source/unomodel.cxx
+++ b/starmath/source/unomodel.cxx
@@ -82,7 +82,7 @@ SmPrintUIOptions::SmPrintUIOptions()
{
ResStringArray aLocalizedStrings( SmResId( RID_PRINTUIOPTIONS ) );
OSL_ENSURE( aLocalizedStrings.Count() >= 18, "resource incomplete" );
- if( aLocalizedStrings.Count() < 18 ) // bad resource ?
+ if( aLocalizedStrings.Count() < 9 ) // bad resource ?
return;
SmModule *pp = SM_MOD();
@@ -100,42 +100,42 @@ SmPrintUIOptions::SmPrintUIOptions()
String aAppGroupname( aLocalizedStrings.GetString( 0 ) );
aAppGroupname.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "%s" ) ),
aOpt.GetModuleName( SvtModuleOptions::E_SMATH ) );
- m_aUIProperties[0].Value = getGroupControlOpt( aAppGroupname, rtl::OUString() );
+ m_aUIProperties[0].Value = getGroupControlOpt( aAppGroupname, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:TabPage:AppPage" ) ) );
// create subgroup for print options
m_aUIProperties[1].Value = getSubgroupControlOpt( aLocalizedStrings.GetString( 1 ), rtl::OUString() );
// create a bool option for title row (matches to SID_PRINTTITLE)
m_aUIProperties[2].Value = getBoolControlOpt( aLocalizedStrings.GetString( 2 ),
- aLocalizedStrings.GetString( 3 ),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:TitleRow:CheckBox" ) ),
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( PRTUIOPT_TITLE_ROW ) ),
pConfig->IsPrintTitle() );
// create a bool option for formula text (matches to SID_PRINTTEXT)
- m_aUIProperties[3].Value = getBoolControlOpt( aLocalizedStrings.GetString( 4 ),
- aLocalizedStrings.GetString( 5 ),
+ m_aUIProperties[3].Value = getBoolControlOpt( aLocalizedStrings.GetString( 3 ),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:FormulaText:CheckBox" ) ),
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( PRTUIOPT_FORMULA_TEXT ) ),
pConfig->IsPrintFormulaText() );
// create a bool option for border (matches to SID_PRINTFRAME)
- m_aUIProperties[4].Value = getBoolControlOpt( aLocalizedStrings.GetString( 6 ),
- aLocalizedStrings.GetString( 7 ),
+ m_aUIProperties[4].Value = getBoolControlOpt( aLocalizedStrings.GetString( 4 ),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:Border:CheckBox" ) ),
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( PRTUIOPT_BORDER ) ),
pConfig->IsPrintFrame() );
// create subgroup for print format
- m_aUIProperties[5].Value = getSubgroupControlOpt( aLocalizedStrings.GetString( 8 ), rtl::OUString() );
+ m_aUIProperties[5].Value = getSubgroupControlOpt( aLocalizedStrings.GetString( 5 ), rtl::OUString() );
// create a radio button group for print format (matches to SID_PRINTSIZE)
Sequence< rtl::OUString > aChoices( 3 );
- aChoices[0] = aLocalizedStrings.GetString( 9 );
- aChoices[1] = aLocalizedStrings.GetString( 11 );
- aChoices[2] = aLocalizedStrings.GetString( 13 );
- Sequence< rtl::OUString > aHelpTexts( 3 );
- aHelpTexts[0] = aLocalizedStrings.GetString( 10 );
- aHelpTexts[1] = aLocalizedStrings.GetString( 12 );
- aHelpTexts[2] = aLocalizedStrings.GetString( 14 );
+ aChoices[0] = aLocalizedStrings.GetString( 6 );
+ aChoices[1] = aLocalizedStrings.GetString( 7 );
+ aChoices[2] = aLocalizedStrings.GetString( 8 );
+ Sequence< rtl::OUString > aHelpIds( 3 );
+ aHelpIds[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintFormat:RadioButton:0" ) );
+ aHelpIds[1] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintFormat:RadioButton:1" ) );
+ aHelpIds[2] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintFormat:RadioButton:2" ) );
OUString aPrintFormatProp( RTL_CONSTASCII_USTRINGPARAM( PRTUIOPT_PRINT_FORMAT ) );
m_aUIProperties[6].Value = getChoiceControlOpt( rtl::OUString(),
- aHelpTexts,
+ aHelpIds,
aPrintFormatProp,
aChoices, static_cast< sal_Int32 >(pConfig->GetPrintSize())
);
@@ -143,7 +143,7 @@ SmPrintUIOptions::SmPrintUIOptions()
// create a numeric box for scale dependent on PrintFormat = "Scaling" (matches to SID_PRINTZOOM)
vcl::PrinterOptionsHelper::UIControlOptions aRangeOpt( aPrintFormatProp, 2, sal_True );
m_aUIProperties[ 7 ].Value = getRangeControlOpt( rtl::OUString(),
- aLocalizedStrings.GetString( 14 ),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintScale:NumericField" ) ),
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( PRTUIOPT_PRINT_SCALE ) ),
pConfig->GetPrintZoomFactor(), // initial value
10, // min value
@@ -162,7 +162,11 @@ SmPrintUIOptions::SmPrintUIOptions()
//
// class SmModel
//
-#define PROPERTY_NONE 0
+
+// values from com/sun/star/beans/PropertyAttribute
+#define PROPERTY_NONE 0
+#define PROPERTY_READONLY 16
+
enum SmModelPropertyHandles
{
HANDLE_FORMULA,
@@ -224,10 +228,12 @@ enum SmModelPropertyHandles
HANDLE_PRINTER_NAME,
HANDLE_PRINTER_SETUP,
HANDLE_SYMBOLS,
+ HANDLE_USED_SYMBOLS,
HANDLE_BASIC_LIBRARIES,
HANDLE_RUNTIME_UID,
- HANDLE_LOAD_READONLY, // Security Options
- HANDLE_DIALOG_LIBRARIES // #i73329#
+ HANDLE_LOAD_READONLY, // Security Options
+ HANDLE_DIALOG_LIBRARIES, // #i73329#
+ HANDLE_BASELINE
};
PropertySetInfo * lcl_createModelPropertyInfo ()
@@ -295,10 +301,14 @@ PropertySetInfo * lcl_createModelPropertyInfo ()
{ RTL_CONSTASCII_STRINGPARAM( "RightMargin" ), HANDLE_RIGHT_MARGIN , &::getCppuType((const sal_Int16*)0), PROPERTY_NONE, DIS_RIGHTSPACE },
{ RTL_CONSTASCII_STRINGPARAM( "RuntimeUID" ), HANDLE_RUNTIME_UID , &::getCppuType(static_cast< const rtl::OUString * >(0)), PropertyAttribute::READONLY, 0 },
{ RTL_CONSTASCII_STRINGPARAM( "Symbols" ), HANDLE_SYMBOLS , &::getCppuType((const Sequence < SymbolDescriptor > *)0), PROPERTY_NONE, 0 },
+ { RTL_CONSTASCII_STRINGPARAM( "UserDefinedSymbolsInUse" ), HANDLE_USED_SYMBOLS , &::getCppuType((const Sequence < SymbolDescriptor > *)0), PropertyAttribute::READONLY, 0 },
{ RTL_CONSTASCII_STRINGPARAM( "TopMargin" ), HANDLE_TOP_MARGIN , &::getCppuType((const sal_Int16*)0), PROPERTY_NONE, DIS_TOPSPACE },
// --> PB 2004-08-25 #i33095# Security Options
{ RTL_CONSTASCII_STRINGPARAM( "LoadReadonly" ), HANDLE_LOAD_READONLY, &::getBooleanCppuType(), PROPERTY_NONE, 0 },
// <--
+ // --> 3.7.2010 #i972#
+ { RTL_CONSTASCII_STRINGPARAM( "BaseLine"), HANDLE_BASELINE, &::getCppuType((const sal_Int16*)0), PROPERTY_NONE, 0},
+ // <--
{ NULL, 0, 0, NULL, 0, 0 }
};
PropertySetInfo *pInfo = new PropertySetInfo ( aModelPropertyInfoMap );
@@ -534,7 +544,7 @@ void SmModel::_setPropertyValues(const PropertyMapEntry** ppEntries, const Any*
// apply base size to fonts
const Size aTmp( aFormat.GetBaseSize() );
- for (USHORT i = FNT_BEGIN; i <= FNT_END; i++)
+ for (sal_uInt16 i = FNT_BEGIN; i <= FNT_END; i++)
aFormat.SetFontSize(i, aTmp);
}
break;
@@ -691,7 +701,7 @@ void SmModel::_setPropertyValues(const PropertyMapEntry** ppEntries, const Any*
SmSym aSymbol ( pDescriptor->sName, aFont, static_cast < sal_Unicode > (pDescriptor->nCharacter),
pDescriptor->sSymbolSet );
aSymbol.SetExportName ( pDescriptor->sExportName );
- aSymbol.SetDocSymbol( TRUE );
+ aSymbol.SetDocSymbol( sal_True );
rManager.AddOrReplaceSymbol ( aSymbol );
}
}
@@ -704,7 +714,7 @@ void SmModel::_setPropertyValues(const PropertyMapEntry** ppEntries, const Any*
{
if ( (*pValues).getValueType() != ::getBooleanCppuType() )
throw IllegalArgumentException();
- sal_Bool bReadonly = FALSE;
+ sal_Bool bReadonly = sal_False;
if ( *pValues >>= bReadonly )
pDocSh->SetLoadReadonly( bReadonly );
break;
@@ -863,7 +873,11 @@ void SmModel::_getPropertyValues( const PropertyMapEntry **ppEntries, Any *pValu
}
break;
case HANDLE_SYMBOLS:
+ case HANDLE_USED_SYMBOLS:
{
+ const bool bUsedSymbolsOnly = (*ppEntries)->mnHandle == HANDLE_USED_SYMBOLS;
+ const std::set< rtl::OUString > &rUsedSymbols = pDocSh->GetUsedSymbols();
+
// this is get
SmModule *pp = SM_MOD();
const SmSymbolManager &rManager = pp->GetSymbolManager();
@@ -874,7 +888,9 @@ void SmModel::_getPropertyValues( const PropertyMapEntry **ppEntries, Any *pValu
for (size_t i = 0; i < aSymbols.size(); ++i)
{
const SmSym * pSymbol = aSymbols[ i ];
- if (pSymbol && !pSymbol->IsPredefined () )
+ const bool bIsUsedSymbol = rUsedSymbols.find( pSymbol->GetName() ) != rUsedSymbols.end();
+ if (pSymbol && !pSymbol->IsPredefined() &&
+ (!bUsedSymbolsOnly || bIsUsedSymbol))
{
aVector.push_back ( pSymbol );
nCount++;
@@ -918,6 +934,21 @@ void SmModel::_getPropertyValues( const PropertyMapEntry **ppEntries, Any *pValu
break;
}
// <--
+ // --> 3.7.2010 #i972#
+ case HANDLE_BASELINE:
+ {
+ if ( !pDocSh->pTree )
+ pDocSh->Parse();
+ if ( pDocSh->pTree )
+ {
+ if ( !pDocSh->IsFormulaArranged() )
+ pDocSh->ArrangeFormula();
+
+ *pValue <<= static_cast<sal_Int32>( pDocSh->pTree->GetFormulaBaseline() );
+ }
+ }
+ break;
+ // <--
}
}
}
diff --git a/starmath/source/utility.cxx b/starmath/source/utility.cxx
index 389d7d059d93..a5e4cc3d6ccd 100644
--- a/starmath/source/utility.cxx
+++ b/starmath/source/utility.cxx
@@ -46,6 +46,8 @@
#include "smdll.hxx"
+////////////////////////////////////////////////////////////
+
// return pointer to active SmViewShell, if this is not possible
// return 0 instead.
//!! Since this method is based on the current focus it is somewhat
@@ -62,8 +64,8 @@ SmViewShell * SmGetActiveView()
/**************************************************************************/
-SmPickList::SmPickList(USHORT nInitSize, USHORT nMaxSize) :
- SfxPtrArr((BYTE) nInitSize, 1)
+SmPickList::SmPickList(sal_uInt16 nInitSize, sal_uInt16 nMaxSize) :
+ SfxPtrArr((sal_uInt8) nInitSize, 1)
{
nSize = nMaxSize;
}
@@ -77,7 +79,7 @@ SmPickList::~SmPickList()
SmPickList& SmPickList::operator=(const SmPickList& rList)
{
- USHORT nPos;
+ sal_uInt16 nPos;
Clear();
nSize = rList.nSize;
@@ -103,7 +105,7 @@ void SmPickList::Insert(const void *pItem)
void SmPickList::Update(const void *pItem, const void *pNewItem)
{
- USHORT nPos;
+ sal_uInt16 nPos;
for (nPos = 0; nPos < Count(); nPos++)
if (CompareItem(GetPtr(nPos), pItem))
@@ -116,7 +118,7 @@ void SmPickList::Update(const void *pItem, const void *pNewItem)
void SmPickList::Remove(const void *pItem)
{
- USHORT nPos;
+ sal_uInt16 nPos;
for (nPos = 0; nPos < Count(); nPos++)
if (CompareItem(GetPtr(nPos), pItem))
@@ -129,7 +131,7 @@ void SmPickList::Remove(const void *pItem)
void SmPickList::Clear()
{
- USHORT nPos;
+ sal_uInt16 nPos;
for (nPos = 0; nPos < Count(); nPos++)
DestroyItem(GetPtr(nPos));
@@ -228,7 +230,7 @@ void SmFontPickList::WriteTo(SmFontDialog& rDialog) const
IMPL_LINK( SmFontPickListBox, SelectHdl, ListBox *, /*pListBox*/ )
{
- USHORT nPos;
+ sal_uInt16 nPos;
String aString;
nPos = GetSelectEntryPos();
@@ -247,7 +249,7 @@ IMPL_LINK( SmFontPickListBox, SelectHdl, ListBox *, /*pListBox*/ )
}
-SmFontPickListBox::SmFontPickListBox(Window* pParent, const ResId& rResId, USHORT nMax) :
+SmFontPickListBox::SmFontPickListBox(Window* pParent, const ResId& rResId, sal_uInt16 nMax) :
SmFontPickList(nMax, nMax),
ListBox(pParent, rResId)
{
@@ -257,7 +259,7 @@ SmFontPickListBox::SmFontPickListBox(Window* pParent, const ResId& rResId, USHOR
SmFontPickListBox& SmFontPickListBox::operator=(const SmFontPickList& rList)
{
- USHORT nPos;
+ sal_uInt16 nPos;
*(SmFontPickList *)this = rList;
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index 1c06970f7d79..9d0a0249a31a 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -35,6 +35,9 @@
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
#include <com/sun/star/accessibility/XAccessible.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/frame/XDesktop.hpp>
+#include <com/sun/star/frame/XFramesSupplier.hpp>
+#include <com/sun/star/container/XChild.hpp>
#include <comphelper/processfactory.hxx>
#include <comphelper/storagehelper.hxx>
@@ -198,7 +201,7 @@ void SmGraphicWindow::MouseButtonDown(const MouseEvent& rMEvt)
ESelection aSel (aToken.nRow - 1, aToken.nCol - 1);
if (rMEvt.GetClicks() != 1 || aToken.eType == TPLACE)
- aSel.nEndPos = aSel.nEndPos + sal::static_int_cast< USHORT >(aToken.aText.Len());
+ aSel.nEndPos = aSel.nEndPos + sal::static_int_cast< sal_uInt16 >(aToken.aText.Len());
pEdit->SetSelection(aSel);
SetCursor(pNode);
@@ -342,7 +345,7 @@ void SmGraphicWindow::SetCursor(const Rectangle &rRect)
ShowCursor(true); // draw new cursor
}
-const SmNode * SmGraphicWindow::SetCursorPos(USHORT nRow, USHORT nCol)
+const SmNode * SmGraphicWindow::SetCursorPos(sal_uInt16 nRow, sal_uInt16 nCol)
// looks for a VISIBLE node in the formula tree with it's token at
// (or around) the position 'nRow', 'nCol' in the edit window
// (row and column numbering starts with 1 there!).
@@ -387,7 +390,7 @@ void SmGraphicWindow::Paint(const Rectangle&)
const SmEditWindow *pEdit = pViewShell->GetEditWindow();
if (pEdit)
{ // get new position for formula-cursor (for possible altered formula)
- USHORT nRow, nCol;
+ sal_uInt16 nRow, nCol;
SmGetLeftSelectionPart(pEdit->GetSelection(), nRow, nCol);
nRow++;
nCol++;
@@ -416,7 +419,7 @@ void SmGraphicWindow::KeyInput(const KeyEvent& rKEvt)
ScrollableWindow::KeyInput(rKEvt);
return;
}
- USHORT nCode = rKEvt.GetKeyCode().GetCode();
+ sal_uInt16 nCode = rKEvt.GetKeyCode().GetCode();
SmCursor& rCursor = pViewShell->GetDoc()->GetCursor();
switch(nCode)
{
@@ -565,7 +568,7 @@ void SmGraphicWindow::Command(const CommandEvent& rCEvt)
const CommandWheelData* pWData = rCEvt.GetWheelData();
if ( pWData && COMMAND_WHEEL_ZOOM == pWData->GetMode() )
{
- USHORT nTmpZoom = GetZoom();
+ sal_uInt16 nTmpZoom = GetZoom();
if( 0L > pWData->GetDelta() )
nTmpZoom -= 10;
else
@@ -592,9 +595,9 @@ IMPL_LINK_INLINE_START( SmGraphicWindow, MenuSelectHdl, Menu *, pMenu )
IMPL_LINK_INLINE_END( SmGraphicWindow, MenuSelectHdl, Menu *, pMenu )
-void SmGraphicWindow::SetZoom(USHORT Factor)
+void SmGraphicWindow::SetZoom(sal_uInt16 Factor)
{
- nZoom = Min(Max((USHORT) Factor, (USHORT) MINZOOM), (USHORT) MAXZOOM);
+ nZoom = Min(Max((sal_uInt16) Factor, (sal_uInt16) MINZOOM), (sal_uInt16) MAXZOOM);
Fraction aFraction (nZoom, 100);
SetMapMode( MapMode(MAP_100TH_MM, Point(), aFraction, aFraction) );
SetTotalSize();
@@ -619,7 +622,7 @@ void SmGraphicWindow::ZoomToFitInWindow()
{
long nVal = Min ((85 * aWindowSize.Width()) / aSize.Width(),
(85 * aWindowSize.Height()) / aSize.Height());
- SetZoom ( sal::static_int_cast< USHORT >(nVal) );
+ SetZoom ( sal::static_int_cast< sal_uInt16 >(nVal) );
}
}
@@ -637,7 +640,7 @@ uno::Reference< XAccessible > SmGraphicWindow::CreateAccessible()
SmGraphicController::SmGraphicController(SmGraphicWindow &rSmGraphic,
- USHORT nId_,
+ sal_uInt16 nId_,
SfxBindings &rBindings) :
SfxControllerItem(nId_, rBindings),
rGraphic(rSmGraphic)
@@ -645,7 +648,7 @@ SmGraphicController::SmGraphicController(SmGraphicWindow &rSmGraphic,
}
-void SmGraphicController::StateChanged(USHORT nSID, SfxItemState eState, const SfxPoolItem* pState)
+void SmGraphicController::StateChanged(sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState)
{
rGraphic.SetTotalSize();
rGraphic.Invalidate();
@@ -657,7 +660,7 @@ void SmGraphicController::StateChanged(USHORT nSID, SfxItemState eState, const S
SmEditController::SmEditController(SmEditWindow &rSmEdit,
- USHORT nId_,
+ sal_uInt16 nId_,
SfxBindings &rBindings) :
SfxControllerItem(nId_, rBindings),
rEdit(rSmEdit)
@@ -672,7 +675,7 @@ SmEditController::~SmEditController()
#endif
-void SmEditController::StateChanged(USHORT nSID, SfxItemState eState, const SfxPoolItem* pState)
+void SmEditController::StateChanged(sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState)
{
const SfxStringItem *pItem = PTR_CAST(SfxStringItem, pState);
@@ -832,7 +835,51 @@ void SmCmdBoxWindow::StateChanged( StateChangedType nStateChange )
IMPL_LINK( SmCmdBoxWindow, InitialFocusTimerHdl, Timer *, EMPTYARG /*pTimer*/ )
{
- aEdit.GrabFocus();
+ // We want to have the focus in the edit window once Math has been opened
+ // to allow for immediate typing.
+ // Problem: There is no proper way to do this
+ // Thus: this timer based soultion has been implemented (see GrabFocus below)
+ //
+ // Follow-up problem (#i114910): grabing the focus may bust the help system since
+ // it relies on getting the current frame which conflicts with grabbing the focus.
+ // Thus aside from the 'GrabFocus' call everything else is to get the
+ // help reliably working despite using 'GrabFocus'.
+
+ try
+ {
+ uno::Reference< frame::XDesktop > xDesktop;
+ uno::Reference< lang::XMultiServiceFactory > xSMGR( comphelper::getProcessServiceFactory() );
+ if (xSMGR.is())
+ {
+ xDesktop = uno::Reference< frame::XDesktop >(
+ xSMGR->createInstance( rtl::OUString::createFromAscii( "com.sun.star.frame.Desktop" )), uno::UNO_QUERY_THROW );
+ }
+
+ aEdit.GrabFocus();
+
+ if (xDesktop.is())
+ {
+ bool bInPlace = GetView()->GetViewFrame()->GetFrame().IsInPlace();
+ uno::Reference< frame::XFrame > xFrame( GetBindings().GetDispatcher()->GetFrame()->GetFrame().GetFrameInterface());
+ if ( bInPlace )
+ {
+ uno::Reference< container::XChild > xModel( GetView()->GetDoc()->GetModel(), uno::UNO_QUERY_THROW );
+ uno::Reference< frame::XModel > xParent( xModel->getParent(), uno::UNO_QUERY_THROW );
+ uno::Reference< frame::XController > xParentCtrler( xParent->getCurrentController() );
+ uno::Reference< frame::XFramesSupplier > xParentFrame( xParentCtrler->getFrame(), uno::UNO_QUERY_THROW );
+ xParentFrame->setActiveFrame( xFrame );
+ }
+ else
+ {
+ uno::Reference< frame::XFramesSupplier > xFramesSupplier( xDesktop, uno::UNO_QUERY );
+ xFramesSupplier->setActiveFrame( xFrame );
+ }
+ }
+ }
+ catch (uno::Exception &)
+ {
+ DBG_ASSERT( 0, "failed to properly set initial focus to edit window" );
+ }
return 0;
}
@@ -872,7 +919,7 @@ void SmCmdBoxWindow::GetFocus()
SFX_IMPL_DOCKINGWINDOW(SmCmdBoxWrapper, SID_CMDBOXWINDOW);
-SmCmdBoxWrapper::SmCmdBoxWrapper(Window *pParentWindow, USHORT nId,
+SmCmdBoxWrapper::SmCmdBoxWrapper(Window *pParentWindow, sal_uInt16 nId,
SfxBindings *pBindings,
SfxChildWinInfo *pInfo) :
SfxChildWindow(pParentWindow, nId)
@@ -992,7 +1039,7 @@ void SmViewShell::SetZoomFactor( const Fraction &rX, const Fraction &rY )
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::SetZoomFactor" );
const Fraction &rFrac = rX < rY ? rX : rY;
- GetGraphicWindow().SetZoom( (USHORT) long(rFrac * Fraction( 100, 1 )) );
+ GetGraphicWindow().SetZoom( (sal_uInt16) long(rFrac * Fraction( 100, 1 )) );
//To avoid rounding errors base class regulates crooked values too
//if necessary
@@ -1006,7 +1053,7 @@ Size SmViewShell::GetTextLineSize(OutputDevice& rDevice, const String& rLine)
String aText;
Size aSize(rDevice.GetTextWidth(rLine), rDevice.GetTextHeight());
- USHORT nTabs = rLine.GetTokenCount('\t');
+ sal_uInt16 nTabs = rLine.GetTokenCount('\t');
if (nTabs > 0)
{
@@ -1014,7 +1061,7 @@ Size SmViewShell::GetTextLineSize(OutputDevice& rDevice, const String& rLine)
aSize.Width() = 0;
- for (USHORT i = 0; i < nTabs; i++)
+ for (sal_uInt16 i = 0; i < nTabs; i++)
{
if (i > 0)
aSize.Width() = ((aSize.Width() / TabPos) + 1) * TabPos;
@@ -1038,9 +1085,9 @@ Size SmViewShell::GetTextSize(OutputDevice& rDevice, const String& rText, long M
String aLine;
Size TextSize;
String aText;
- USHORT nLines = rText.GetTokenCount('\n');
+ sal_uInt16 nLines = rText.GetTokenCount('\n');
- for (USHORT i = 0; i < nLines; i++)
+ for (sal_uInt16 i = 0; i < nLines; i++)
{
aLine = rText.GetToken(i, '\n');
aLine.EraseAllChars('\r');
@@ -1098,13 +1145,13 @@ void SmViewShell::DrawTextLine(OutputDevice& rDevice, const Point& rPosition, co
String aText;
Point aPoint (rPosition);
- USHORT nTabs = rLine.GetTokenCount('\t');
+ sal_uInt16 nTabs = rLine.GetTokenCount('\t');
if (nTabs > 0)
{
long TabPos = rDevice.GetTextWidth('n') * 8;
- for (USHORT i = 0; i < nTabs; i++)
+ for (sal_uInt16 i = 0; i < nTabs; i++)
{
if (i > 0)
aPoint.X() = ((aPoint.X() / TabPos) + 1) * TabPos;
@@ -1121,17 +1168,17 @@ void SmViewShell::DrawTextLine(OutputDevice& rDevice, const Point& rPosition, co
}
-void SmViewShell::DrawText(OutputDevice& rDevice, const Point& rPosition, const String& rText, USHORT MaxWidth)
+void SmViewShell::DrawText(OutputDevice& rDevice, const Point& rPosition, const String& rText, sal_uInt16 MaxWidth)
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::DrawText" );
- USHORT nLines = rText.GetTokenCount('\n');
+ sal_uInt16 nLines = rText.GetTokenCount('\n');
Point aPoint (rPosition);
Size aSize;
String aLine;
String aText;
- for (USHORT i = 0; i < nLines; i++)
+ for (sal_uInt16 i = 0; i < nLines; i++)
{
aLine = rText.GetToken(i, '\n');
aLine.EraseAllChars('\r');
@@ -1195,7 +1242,7 @@ void SmViewShell::Impl_Print(
const bool bIsPrintFrame = rPrintUIOptions.getBoolValue( PRTUIOPT_BORDER, sal_True );
const bool bIsPrintFormulaText = rPrintUIOptions.getBoolValue( PRTUIOPT_FORMULA_TEXT, sal_True );
SmPrintSize ePrintSize( static_cast< SmPrintSize >( rPrintUIOptions.getIntValue( PRTUIOPT_PRINT_FORMAT, PRINT_SIZE_NORMAL ) ));
- const USHORT nZoomFactor = static_cast< USHORT >(rPrintUIOptions.getIntValue( PRTUIOPT_PRINT_SCALE, 100 ));
+ const sal_uInt16 nZoomFactor = static_cast< sal_uInt16 >(rPrintUIOptions.getIntValue( PRTUIOPT_PRINT_SCALE, 100 ));
rOutDev.Push();
rOutDev.SetLineColor( Color(COL_BLACK) );
@@ -1233,7 +1280,7 @@ void SmViewShell::Impl_Print(
Point aPoint(aOutRect.Left() + (aOutRect.GetWidth() - aTitleSize.Width()) / 2,
aOutRect.Top());
DrawText(rOutDev, aPoint, GetDoc()->GetTitle(),
- sal::static_int_cast< USHORT >(aOutRect.GetWidth() - 200));
+ sal::static_int_cast< sal_uInt16 >(aOutRect.GetWidth() - 200));
aOutRect.Top() += aTitleSize.Height() + 200;
// output description
@@ -1243,7 +1290,7 @@ void SmViewShell::Impl_Print(
aPoint.X() = aOutRect.Left() + (aOutRect.GetWidth() - aDescSize.Width()) / 2;
aPoint.Y() = aOutRect.Top();
DrawText(rOutDev, aPoint, GetDoc()->GetComment(),
- sal::static_int_cast< USHORT >(aOutRect.GetWidth() - 200));
+ sal::static_int_cast< sal_uInt16 >(aOutRect.GetWidth() - 200));
aOutRect.Top() += aDescSize.Height() + 300;
}
@@ -1268,7 +1315,7 @@ void SmViewShell::Impl_Print(
Point aPoint (aOutRect.Left() + (aOutRect.GetWidth() - aSize.Width()) / 2,
aOutRect.Bottom() + 300);
DrawText(rOutDev, aPoint, GetDoc()->GetText(),
- sal::static_int_cast< USHORT >(aOutRect.GetWidth() - 200));
+ sal::static_int_cast< sal_uInt16 >(aOutRect.GetWidth() - 200));
aOutRect.Bottom() -= 200;
}
@@ -1298,9 +1345,9 @@ void SmViewShell::Impl_Print(
Size OutputSize (rOutDev.LogicToPixel(Size(aOutRect.GetWidth(),
aOutRect.GetHeight()), MapMode(MAP_100TH_MM)));
Size GraphicSize (rOutDev.LogicToPixel(aSize, MapMode(MAP_100TH_MM)));
- USHORT nZ = (USHORT) Min((long)Fraction(OutputSize.Width() * 100L, GraphicSize.Width()),
+ sal_uInt16 nZ = (sal_uInt16) Min((long)Fraction(OutputSize.Width() * 100L, GraphicSize.Width()),
(long)Fraction(OutputSize.Height() * 100L, GraphicSize.Height()));
- Fraction aFraction ((USHORT) Max ((USHORT) MINZOOM, Min((USHORT) MAXZOOM, (USHORT) (nZ - 10))), (USHORT) 100);
+ Fraction aFraction ((sal_uInt16) Max ((sal_uInt16) MINZOOM, Min((sal_uInt16) MAXZOOM, (sal_uInt16) (nZ - 10))), (sal_uInt16) 100);
OutputMapMode = MapMode(MAP_100TH_MM, aZeroPoint, aFraction, aFraction);
}
@@ -1336,7 +1383,7 @@ void SmViewShell::Impl_Print(
rOutDev.Pop();
}
-USHORT SmViewShell::Print(SfxProgress & /*rProgress*/, BOOL /*bIsAPI*/, PrintDialog * /*pPrintDialog*/)
+sal_uInt16 SmViewShell::Print(SfxProgress & /*rProgress*/, sal_Bool /*bIsAPI*/)
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::Print" );
OSL_FAIL( "SmViewShell::Print: no longer used with new UI print dialog. Should be removed!!" );
@@ -1344,7 +1391,7 @@ USHORT SmViewShell::Print(SfxProgress & /*rProgress*/, BOOL /*bIsAPI*/, PrintDia
}
-SfxPrinter* SmViewShell::GetPrinter(BOOL bCreate)
+SfxPrinter* SmViewShell::GetPrinter(sal_Bool bCreate)
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::GetPrinter" );
@@ -1355,7 +1402,7 @@ SfxPrinter* SmViewShell::GetPrinter(BOOL bCreate)
}
-USHORT SmViewShell::SetPrinter(SfxPrinter *pNewPrinter, USHORT nDiffFlags, bool )
+sal_uInt16 SmViewShell::SetPrinter(SfxPrinter *pNewPrinter, sal_uInt16 nDiffFlags, bool )
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::SetPrinter" );
SfxPrinter *pOld = GetDoc()->GetPrinter();
@@ -1599,7 +1646,7 @@ void SmViewShell::Execute(SfxRequest& rReq)
break;
case SID_ZOOMOUT:
- OSL_ENSURE(aGraphic.GetZoom() >= 25, "Sm: incorrect USHORT argument");
+ OSL_ENSURE(aGraphic.GetZoom() >= 25, "Sm: incorrect sal_uInt16 argument");
aGraphic.SetZoom(aGraphic.GetZoom() - 25);
break;
@@ -1730,7 +1777,7 @@ void SmViewShell::Execute(SfxRequest& rReq)
break;
}
- case SID_INSERT_FORMULA:
+ case SID_IMPORT_FORMULA:
{
delete pImpl->pRequest;
pImpl->pRequest = new SfxRequest( rReq );
@@ -1813,7 +1860,7 @@ void SmViewShell::Execute(SfxRequest& rReq)
switch( rZoom.GetType() )
{
case SVX_ZOOM_PERCENT:
- aGraphic.SetZoom((USHORT)rZoom.GetValue ());
+ aGraphic.SetZoom((sal_uInt16)rZoom.GetValue ());
break;
case SVX_ZOOM_OPTIMAL:
@@ -1830,7 +1877,7 @@ void SmViewShell::Execute(SfxRequest& rReq)
Size OutputSize(pPrinter->LogicToPixel(Size(OutputRect.GetWidth(),
OutputRect.GetHeight()), aMap));
Size GraphicSize(pPrinter->LogicToPixel(GetDoc()->GetSize(), aMap));
- USHORT nZ = (USHORT) Min((long)Fraction(OutputSize.Width() * 100L, GraphicSize.Width()),
+ sal_uInt16 nZ = (sal_uInt16) Min((long)Fraction(OutputSize.Width() * 100L, GraphicSize.Width()),
(long)Fraction(OutputSize.Height() * 100L, GraphicSize.Height()));
aGraphic.SetZoom (nZ);
break;
@@ -1876,7 +1923,7 @@ void SmViewShell::GetState(SfxItemSet &rSet)
SfxWhichIter aIter(rSet);
SmEditWindow *pEditWin = GetEditWindow();
- for (USHORT nWh = aIter.FirstWhich(); nWh != 0; nWh = aIter.NextWhich())
+ for (sal_uInt16 nWh = aIter.FirstWhich(); nWh != 0; nWh = aIter.NextWhich())
{
switch (nWh)
{
@@ -1986,7 +2033,7 @@ SmViewShell::~SmViewShell()
delete pImpl;
}
-void SmViewShell::Deactivate( BOOL bIsMDIActivate )
+void SmViewShell::Deactivate( sal_Bool bIsMDIActivate )
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::Deactivate" );
@@ -1998,7 +2045,7 @@ void SmViewShell::Deactivate( BOOL bIsMDIActivate )
}
-void SmViewShell::Activate( BOOL bIsMDIActivate )
+void SmViewShell::Activate( sal_Bool bIsMDIActivate )
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::Activate" );
diff --git a/starmath/source/visitors.cxx b/starmath/source/visitors.cxx
index d89abb8a7955..4a69d851622b 100644
--- a/starmath/source/visitors.cxx
+++ b/starmath/source/visitors.cxx
@@ -718,7 +718,7 @@ void SmDrawingVisitor::Visit( SmRectangleNode* pNode )
rDev.SetLineColor( );
aTmpDev.SetFont( pNode->GetFont( ) );
- ULONG nTmpBorderWidth = pNode->GetFont( ).GetBorderWidth( );
+ sal_uLong nTmpBorderWidth = pNode->GetFont( ).GetBorderWidth( );
// get rectangle and remove borderspace
Rectangle aTmp ( pNode->AsRectangle( ) + Position - pNode->GetTopLeft( ) );
@@ -1288,9 +1288,9 @@ void SmCaretPosGraphBuildingVisitor::Visit( SmMatrixNode* pNode )
SmCaretPosGraphEntry *left = pRightMost,
*right = pGraph->Add( SmCaretPos( pNode, 1 ) );
- for ( USHORT i = 0; i < pNode->GetNumRows( ); i++ ) {
+ for ( sal_uInt16 i = 0; i < pNode->GetNumRows( ); i++ ) {
SmCaretPosGraphEntry* r = left;
- for ( USHORT j = 0; j < pNode->GetNumCols( ); j++ ){
+ for ( sal_uInt16 j = 0; j < pNode->GetNumCols( ); j++ ){
SmNode* pSubNode = pNode->GetSubNode( i * pNode->GetNumCols( ) + j );
pRightMost = pGraph->Add( SmCaretPos( pSubNode, 0 ), r );
@@ -1819,12 +1819,12 @@ void SmCloningVisitor::CloneKids( SmStructureNode* pSource, SmStructureNode* pTa
SmNode* pCurrResult = pResult;
//Create array for holding clones
- USHORT nSize = pSource->GetNumSubNodes( );
+ sal_uInt16 nSize = pSource->GetNumSubNodes( );
SmNodeArray aNodes( nSize );
//Clone children
SmNode* pKid;
- for( USHORT i = 0; i < nSize; i++ ){
+ for( sal_uInt16 i = 0; i < nSize; i++ ){
if( NULL != ( pKid = pSource->GetSubNode( i ) ) )
pKid->Accept( this );
else
@@ -2421,8 +2421,8 @@ void SmNodeToTextVisitor::Visit( SmSubSupNode* pNode )
void SmNodeToTextVisitor::Visit( SmMatrixNode* pNode )
{
Append( "matrix{" );
- for ( USHORT i = 0; i < pNode->GetNumRows( ); i++ ) {
- for ( USHORT j = 0; j < pNode->GetNumCols( ); j++ ) {
+ for ( sal_uInt16 i = 0; i < pNode->GetNumRows( ); i++ ) {
+ for ( sal_uInt16 j = 0; j < pNode->GetNumCols( ); j++ ) {
SmNode* pSubNode = pNode->GetSubNode( i * pNode->GetNumCols( ) + j );
Separate( );
pSubNode->Accept( this );