diff options
Diffstat (limited to 'starmath/source')
-rw-r--r-- | starmath/source/cfgitem.cxx | 80 | ||||
-rw-r--r-- | starmath/source/cfgitem.hxx | 16 | ||||
-rw-r--r--[-rwxr-xr-x] | starmath/source/dialog.cxx | 9 | ||||
-rw-r--r-- | starmath/source/document.cxx | 9 | ||||
-rwxr-xr-x | starmath/source/node.cxx | 67 | ||||
-rw-r--r-- | starmath/source/smmod.cxx | 10 | ||||
-rw-r--r--[-rwxr-xr-x] | starmath/source/smres.src | 150 | ||||
-rwxr-xr-x | starmath/source/unomodel.cxx | 21 |
8 files changed, 198 insertions, 164 deletions
diff --git a/starmath/source/cfgitem.cxx b/starmath/source/cfgitem.cxx index 21ae6c0e63df..c8db4720b943 100644 --- a/starmath/source/cfgitem.cxx +++ b/starmath/source/cfgitem.cxx @@ -48,8 +48,6 @@ static const char* aRootName = "Office.Math"; #define SYMBOL_LIST "SymbolList" #define FONT_FORMAT_LIST "FontFormatList" -SV_IMPL_OBJARR( SmFntFmtListEntryArr, SmFntFmtListEntry ); - ///////////////////////////////////////////////////////////////// @@ -294,10 +292,9 @@ SmFontFormatList::SmFontFormatList() void SmFontFormatList::Clear() { - USHORT nCnt = aEntries.Count(); - if (nCnt) + if (!aEntries.empty()) { - aEntries.Remove( 0, nCnt ); + aEntries.clear(); SetModified( TRUE ); } } @@ -311,7 +308,7 @@ void SmFontFormatList::AddFontFormat( const String &rFntFmtId, if (!pFntFmt) { SmFntFmtListEntry aEntry( rFntFmtId, rFntFmt ); - aEntries.Insert( aEntry, aEntries.Count() ); + aEntries.push_back( aEntry ); SetModified( TRUE ); } } @@ -319,35 +316,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; @@ -355,11 +349,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; } @@ -368,12 +362,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; @@ -392,10 +387,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; } @@ -409,12 +404,15 @@ const String SmFontFormatList::GetNewFontFormatId() const String aPrefix( RTL_CONSTASCII_STRINGPARAM( "Id" ) ); INT32 nCnt = GetCount(); - for (INT32 i = 1; i <= nCnt + 1 && 0 == aRes.Len(); ++i) + for (INT32 i = 1; i <= nCnt + 1; ++i) { String aTmpId( aPrefix ); aTmpId += String::CreateFromInt32( i ); if (!GetFontFormat( aTmpId )) + { aRes = aTmpId; + break; + } } DBG_ASSERT( 0 != aRes.Len(), "failed to create new FontFormatId" ); @@ -767,14 +765,14 @@ void SmMathConfig::SaveFontFormatList() Sequence< OUString > aNames = lcl_GetFontPropertyNames(); 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 ) ); @@ -817,7 +815,8 @@ void SmMathConfig::SaveFontFormatList() pVal->Value <<= (INT16) aFntFmt.nItalic; pVal++; } - DBG_ASSERT( pVal - pValues == nCount * nSymbolProps, "properties missing" ); + DBG_ASSERT( static_cast<size_t>(pVal - pValues) == (nCount * nSymbolProps), + "properties missing" ); ReplaceSetProperties( A2OU( FONT_FORMAT_LIST ) , aValues ); rFntFmtList.SetModified( FALSE ); @@ -826,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) { DBG_ASSERT( rSymbols[i].GetName().Len() > 0, "non named symbol" ); aUsedList.GetFontFormatId( SmFontFormat( rSymbols[i].GetFace() ) , TRUE ); @@ -845,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) { diff --git a/starmath/source/cfgitem.hxx b/starmath/source/cfgitem.hxx index 9e4aa9f39f2f..8e3330a6466f 100644 --- a/starmath/source/cfgitem.hxx +++ b/starmath/source/cfgitem.hxx @@ -32,6 +32,7 @@ #ifndef _MATH_CFGITEM_HXX_ #define _MATH_CFGITEM_HXX_ +#include <deque> #include <vector> #include <com/sun/star/beans/PropertyValues.hpp> @@ -41,7 +42,6 @@ #include <tools/solar.h> #include <rtl/ustring.hxx> #include <unotools/configitem.hxx> -#include <svl/svarray.hxx> #include <vcl/timer.hxx> #include <symbol.hxx> @@ -82,14 +82,10 @@ struct SmFntFmtListEntry SmFntFmtListEntry( const String &rId, const SmFontFormat &rFntFmt ); }; - -SV_DECL_OBJARR( SmFntFmtListEntryArr, SmFntFmtListEntry, 8, 8 ) - - class SmFontFormatList { - SmFntFmtListEntryArr aEntries; - BOOL bModified; + std::deque<SmFntFmtListEntry> aEntries; + BOOL bModified; // disallow copy-constructor and assignment-operator for now SmFontFormatList( const SmFontFormatList & ); @@ -103,12 +99,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; } diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx index ee1de4b5dbbb..a33ab14a98bf 100755..100644 --- a/starmath/source/dialog.cxx +++ b/starmath/source/dialog.cxx @@ -765,7 +765,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" @@ -776,7 +776,7 @@ void SmDistanceDialog::SetHelpId(MetricField &rField, ULONG nHelpId) DBG_ASSERT(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 @@ -784,7 +784,8 @@ 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); } } @@ -802,7 +803,7 @@ void SmDistanceDialog::SetCategory(USHORT nCategory) #if OSL_DEBUG_LEVEL > 1 DBG_ASSERT(NOCATEGORIES == 10, "Sm : Array passt nicht zu Anzahl der Kategorien"); #endif - ULONG __READONLY_DATA aCatMf2Hid[10][4] = + const char* __READONLY_DATA 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 }, diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx index ab1382b97879..243e16fb6504 100644 --- a/starmath/source/document.cxx +++ b/starmath/source/document.cxx @@ -38,6 +38,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> @@ -180,7 +182,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(); } diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx index d8e2586e151e..b1d7d9e69210 100755 --- a/starmath/source/node.cxx +++ b/starmath/source/node.cxx @@ -573,6 +573,13 @@ const SmNode * SmNode::FindNodeWithAccessibleIndex(xub_StrLen nAccIdx) const return pResult; } + +long SmNode::GetFormulaBaseline() const +{ + DBG_ASSERT( 0, "This dummy implementation should not have been called." ); + return 0; +} + /////////////////////////////////////////////////////////////////////////// SmStructureNode::SmStructureNode( const SmStructureNode &rNode ) : @@ -763,7 +770,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(); @@ -779,6 +786,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, 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(); + } + // <-- } @@ -788,6 +811,12 @@ SmNode * SmTableNode::GetLeftMost() } +long SmTableNode::GetFormulaBaseline() const +{ + return nFormulaBaseline; +} + + /**************************************************************************/ @@ -818,20 +847,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; @@ -839,14 +869,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 ); diff --git a/starmath/source/smmod.cxx b/starmath/source/smmod.cxx index da6259076adc..9dcd4d05930d 100644 --- a/starmath/source/smmod.cxx +++ b/starmath/source/smmod.cxx @@ -336,16 +336,6 @@ 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); - -} - /* -----------------15.02.99 12:45------------------- * * --------------------------------------------------*/ diff --git a/starmath/source/smres.src b/starmath/source/smres.src index b02ad4a0cc6e..e608b1c9108d 100755..100644 --- a/starmath/source/smres.src +++ b/starmath/source/smres.src @@ -30,6 +30,8 @@ #include <svx/globlmn.hrc> #include "starmath.hrc" #include "dialog.hrc" +#include "toolbox.hrc" +#include "smcommands.h" #define IMAGE_STDBTN_COLOR Color { Red = 0xff00; Green = 0x0000; Blue = 0xff00; } #define IMAGE_STDBTN_COLOR_HC IMAGE_STDBTN_COLOR @@ -41,6 +43,7 @@ ModalDialog RID_FONTDIALOG { + HelpID = "starmath:ModalDialog:RID_FONTDIALOG"; Moveable = TRUE ; OutputSize = TRUE ; SVLook = TRUE ; @@ -55,6 +58,7 @@ ModalDialog RID_FONTDIALOG }; ComboBox 1 { + HelpID = "starmath:ComboBox:RID_FONTDIALOG:1"; Pos = MAP_APPFONT ( 6 , 17 ) ; Size = MAP_APPFONT ( 111 , 60 ) ; TabStop = TRUE ; @@ -63,6 +67,7 @@ ModalDialog RID_FONTDIALOG }; CheckBox 1 { + HelpID = "starmath:CheckBox:RID_FONTDIALOG:1"; TabStop = TRUE ; Pos = MAP_APPFONT ( 60 , 84 ) ; Size = MAP_APPFONT ( 33 , 10 ) ; @@ -70,6 +75,7 @@ ModalDialog RID_FONTDIALOG }; CheckBox 2 { + HelpID = "starmath:CheckBox:RID_FONTDIALOG:2"; TabStop = TRUE ; Pos = MAP_APPFONT ( 60 , 97 ) ; Size = MAP_APPFONT ( 33 , 10 ) ; @@ -108,7 +114,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 @@ -120,6 +126,7 @@ ModalDialog RID_FONTSIZEDIALOG }; MetricField 1 { + HelpID = "starmath:MetricField:RID_FONTSIZEDIALOG:1"; Border = TRUE ; Pos = MAP_APPFONT ( 57 , 6 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -140,6 +147,7 @@ ModalDialog RID_FONTSIZEDIALOG }; MetricField 4 { + HelpID = "starmath:MetricField:RID_FONTSIZEDIALOG:4"; Border = TRUE ; Pos = MAP_APPFONT ( 57 , 36 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -161,6 +169,7 @@ ModalDialog RID_FONTSIZEDIALOG }; MetricField 5 { + HelpID = "starmath:MetricField:RID_FONTSIZEDIALOG:5"; Border = TRUE ; Pos = MAP_APPFONT ( 57 , 51 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -182,6 +191,7 @@ ModalDialog RID_FONTSIZEDIALOG }; MetricField 6 { + HelpID = "starmath:MetricField:RID_FONTSIZEDIALOG:6"; Border = TRUE ; Pos = MAP_APPFONT ( 57 , 66 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -203,6 +213,7 @@ ModalDialog RID_FONTSIZEDIALOG }; MetricField 7 { + HelpID = "starmath:MetricField:RID_FONTSIZEDIALOG:7"; Border = TRUE ; Pos = MAP_APPFONT ( 57 , 81 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -224,6 +235,7 @@ ModalDialog RID_FONTSIZEDIALOG }; MetricField 8 { + HelpID = "starmath:MetricField:RID_FONTSIZEDIALOG:8"; Border = TRUE ; Pos = MAP_APPFONT ( 57 , 96 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -257,6 +269,7 @@ ModalDialog RID_FONTSIZEDIALOG }; PushButton 1 { + HelpID = "starmath:PushButton:RID_FONTSIZEDIALOG:1"; TabStop = TRUE ; Pos = MAP_APPFONT ( 114 , 45 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; @@ -268,7 +281,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 ; @@ -293,6 +306,7 @@ ModalDialog RID_FONTTYPEDIALOG }; ListBox 1 { + HelpID = "starmath:ListBox:RID_FONTTYPEDIALOG:1"; Border = TRUE ; Pos = MAP_APPFONT ( 54 , 18 ) ; Size = MAP_APPFONT ( 150 , 69 ) ; @@ -308,6 +322,7 @@ ModalDialog RID_FONTTYPEDIALOG }; ListBox 2 { + HelpID = "starmath:ListBox:RID_FONTTYPEDIALOG:2"; Border = TRUE ; Pos = MAP_APPFONT ( 54 , 33 ) ; Size = MAP_APPFONT ( 150 , 69 ) ; @@ -323,6 +338,7 @@ ModalDialog RID_FONTTYPEDIALOG }; ListBox 3 { + HelpID = "starmath:ListBox:RID_FONTTYPEDIALOG:3"; Border = TRUE ; Pos = MAP_APPFONT ( 54 , 48 ) ; Size = MAP_APPFONT ( 150 , 69 ) ; @@ -338,6 +354,7 @@ ModalDialog RID_FONTTYPEDIALOG }; ListBox 4 { + HelpID = "starmath:ListBox:RID_FONTTYPEDIALOG:4"; Border = TRUE ; Pos = MAP_APPFONT ( 54 , 63 ) ; Size = MAP_APPFONT ( 150 , 69 ) ; @@ -353,6 +370,7 @@ ModalDialog RID_FONTTYPEDIALOG }; ListBox 5 { + HelpID = "starmath:ListBox:RID_FONTTYPEDIALOG:5"; Border = TRUE ; Pos = MAP_APPFONT ( 54 , 96 ) ; Size = MAP_APPFONT ( 150 , 69 ) ; @@ -368,6 +386,7 @@ ModalDialog RID_FONTTYPEDIALOG }; ListBox 6 { + HelpID = "starmath:ListBox:RID_FONTTYPEDIALOG:6"; Border = TRUE ; Pos = MAP_APPFONT ( 54 , 111 ) ; Size = MAP_APPFONT ( 150 , 69 ) ; @@ -383,6 +402,7 @@ ModalDialog RID_FONTTYPEDIALOG }; ListBox 7 { + HelpID = "starmath:ListBox:RID_FONTTYPEDIALOG:7"; Border = TRUE ; Pos = MAP_APPFONT ( 54 , 126 ) ; Size = MAP_APPFONT ( 150 , 69 ) ; @@ -404,6 +424,7 @@ ModalDialog RID_FONTTYPEDIALOG }; MenuButton 1 { + HelpID = "starmath:MenuButton:RID_FONTTYPEDIALOG:1"; TabStop = TRUE ; ButtonMenu = Menu , RID_FONTMENU ; Pos = MAP_APPFONT ( 225 , 48 ) ; @@ -412,6 +433,7 @@ ModalDialog RID_FONTTYPEDIALOG }; PushButton 2 { + HelpID = "starmath:PushButton:RID_FONTTYPEDIALOG:2"; TabStop = TRUE ; Pos = MAP_APPFONT ( 225 , 66 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; @@ -424,7 +446,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 @@ -435,6 +457,7 @@ ModalDialog RID_DISTANCEDIALOG }; MetricField 1 { + HelpID = "starmath:MetricField:RID_DISTANCEDIALOG:1"; Border = TRUE ; TabStop = TRUE ; Left = TRUE ; @@ -455,6 +478,7 @@ ModalDialog RID_DISTANCEDIALOG }; MetricField 2 { + HelpID = "starmath:MetricField:RID_DISTANCEDIALOG:2"; Border = TRUE ; TabStop = TRUE ; Left = TRUE ; @@ -467,6 +491,7 @@ ModalDialog RID_DISTANCEDIALOG }; CheckBox 1 { + HelpID = "starmath:CheckBox:RID_DISTANCEDIALOG:1"; TabStop = TRUE ; Pos = MAP_APPFONT ( 12 , 55 ) ; Size = MAP_APPFONT ( 110 , 12 ) ; @@ -482,6 +507,7 @@ ModalDialog RID_DISTANCEDIALOG }; MetricField 3 { + HelpID = "starmath:MetricField:RID_DISTANCEDIALOG:3"; Border = TRUE ; TabStop = TRUE ; Left = TRUE ; @@ -502,6 +528,7 @@ ModalDialog RID_DISTANCEDIALOG }; MetricField 4 { + HelpID = "starmath:MetricField:RID_DISTANCEDIALOG:4"; Border = TRUE ; TabStop = TRUE ; Left = TRUE ; @@ -527,6 +554,7 @@ ModalDialog RID_DISTANCEDIALOG }; PushButton 1 { + HelpID = "starmath:PushButton:RID_DISTANCEDIALOG:1"; TabStop = TRUE ; Pos = MAP_APPFONT ( 184 , 69 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; @@ -534,6 +562,7 @@ ModalDialog RID_DISTANCEDIALOG }; MenuButton 1 { + HelpID = "starmath:MenuButton:RID_DISTANCEDIALOG:1"; TabStop = TRUE ; ButtonMenu = Menu , RID_DISTANCEMENU ; Pos = MAP_APPFONT ( 184 , 51 ) ; @@ -918,11 +947,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 ) ; @@ -930,6 +960,7 @@ ModalDialog RID_ALIGNDIALOG }; RadioButton 2 { + HelpID = "starmath:RadioButton:RID_ALIGNDIALOG:2"; TabStop = TRUE ; Pos = MAP_APPFONT ( 12 , 31 ) ; Size = MAP_APPFONT ( 60 , 10 ) ; @@ -937,6 +968,7 @@ ModalDialog RID_ALIGNDIALOG }; RadioButton 3 { + HelpID = "starmath:RadioButton:RID_ALIGNDIALOG:3"; TabStop = TRUE ; Pos = MAP_APPFONT ( 12 , 44 ) ; Size = MAP_APPFONT ( 60 , 10 ) ; @@ -963,6 +995,7 @@ ModalDialog RID_ALIGNDIALOG }; PushButton 1 { + HelpID = "starmath:PushButton:RID_ALIGNDIALOG:1"; TabStop = TRUE ; Pos = MAP_APPFONT ( 83 , 46 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; @@ -972,6 +1005,7 @@ ModalDialog RID_ALIGNDIALOG TabPage RID_PRINTOPTIONPAGE { + HelpID = "starmath:TabPage:RID_PRINTOPTIONPAGE"; OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 260 , 185 ) ; @@ -984,6 +1018,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 ) ; @@ -991,6 +1026,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 ) ; @@ -998,6 +1034,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 ) ; @@ -1011,6 +1048,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 ) ; @@ -1018,6 +1056,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 ) ; @@ -1025,6 +1064,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" ; @@ -1032,6 +1072,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 ) ; @@ -1052,6 +1093,7 @@ 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 ) ; @@ -1061,6 +1103,7 @@ TabPage RID_PRINTOPTIONPAGE ModalDialog RID_SYMBOLDIALOG { + HelpID = "starmath:ModalDialog:RID_SYMBOLDIALOG"; OutputSize = TRUE ; SVLook = TRUE ; Closeable = TRUE; // Close Button in Window Leiste explizit einbauen @@ -1076,6 +1119,7 @@ ModalDialog RID_SYMBOLDIALOG }; ListBox 1 { + HelpID = "starmath:ListBox:RID_SYMBOLDIALOG:1"; Border = TRUE ; Pos = MAP_APPFONT ( 6 , 17 ) ; Size = MAP_APPFONT ( 92, 57 ) ; @@ -1107,6 +1151,7 @@ ModalDialog RID_SYMBOLDIALOG }; PushButton 2 { + HelpID = "starmath:PushButton:RID_SYMBOLDIALOG:2"; TabStop = TRUE ; Pos = MAP_APPFONT ( 177 , 6 ) ; Size = MAP_APPFONT ( 56 , 14 ) ; @@ -1115,6 +1160,7 @@ ModalDialog RID_SYMBOLDIALOG }; PushButton 3 { + HelpID = "starmath:PushButton:RID_SYMBOLDIALOG:3"; Pos = MAP_APPFONT ( 177 , 24 ) ; Size = MAP_APPFONT ( 56 , 14 ) ; TabStop = TRUE ; @@ -1122,6 +1168,7 @@ ModalDialog RID_SYMBOLDIALOG }; PushButton 1 { + HelpID = "starmath:PushButton:RID_SYMBOLDIALOG:1"; TabStop = TRUE ; Pos = MAP_APPFONT ( 177 , 42 ) ; Size = MAP_APPFONT ( 56 , 14 ) ; @@ -1131,6 +1178,7 @@ ModalDialog RID_SYMBOLDIALOG ModalDialog RID_SYMDEFINEDIALOG { + HelpID = "starmath:ModalDialog:RID_SYMDEFINEDIALOG"; Moveable = TRUE ; OutputSize = TRUE ; SVLook = TRUE ; @@ -1145,6 +1193,7 @@ ModalDialog RID_SYMDEFINEDIALOG }; ComboBox 1 { + HelpID = "starmath:ComboBox:RID_SYMDEFINEDIALOG:1"; Pos = MAP_APPFONT ( 59 , 6 ) ; Size = MAP_APPFONT ( 80 , 100 ) ; TabStop = TRUE ; @@ -1160,6 +1209,7 @@ ModalDialog RID_SYMDEFINEDIALOG }; ComboBox 2 { + HelpID = "starmath:ComboBox:RID_SYMDEFINEDIALOG:2"; Pos = MAP_APPFONT ( 210 , 6 ) ; Size = MAP_APPFONT ( 80 , 100 ) ; TabStop = TRUE ; @@ -1184,6 +1234,7 @@ ModalDialog RID_SYMDEFINEDIALOG }; ComboBox 4 { + HelpID = "starmath:ComboBox:RID_SYMDEFINEDIALOG:4"; Pos = MAP_APPFONT ( 80 , 115 ) ; Size = MAP_APPFONT ( 100 , 100 ) ; TabStop = TRUE ; @@ -1199,6 +1250,7 @@ ModalDialog RID_SYMDEFINEDIALOG }; ComboBox 5 { + HelpID = "starmath:ComboBox:RID_SYMDEFINEDIALOG:5"; Pos = MAP_APPFONT ( 80 , 130 ) ; Size = MAP_APPFONT ( 100 , 100 ) ; TabStop = TRUE ; @@ -1214,6 +1266,7 @@ ModalDialog RID_SYMDEFINEDIALOG }; ListBox 1 { + HelpID = "starmath:ListBox:RID_SYMDEFINEDIALOG:1"; Border = TRUE ; Pos = MAP_APPFONT ( 80 , 145 ) ; Size = MAP_APPFONT ( 100 , 100 ) ; @@ -1230,6 +1283,7 @@ 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 , 100 ) ; @@ -1246,6 +1300,7 @@ ModalDialog RID_SYMDEFINEDIALOG }; ComboBox 3 { + HelpID = "starmath:ComboBox:RID_SYMDEFINEDIALOG:3"; Border = TRUE; Pos = MAP_APPFONT ( 80 , 175 ) ; Size = MAP_APPFONT ( 100 , 100 ) ; @@ -1312,6 +1367,7 @@ ModalDialog RID_SYMDEFINEDIALOG }; PushButton 1 { + HelpID = "starmath:PushButton:RID_SYMDEFINEDIALOG:1"; TabStop = TRUE ; Pos = MAP_APPFONT ( 305 , 195 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; @@ -1319,6 +1375,7 @@ ModalDialog RID_SYMDEFINEDIALOG }; PushButton 2 { + HelpID = "starmath:PushButton:RID_SYMDEFINEDIALOG:2"; TabStop = TRUE ; Pos = MAP_APPFONT ( 245 , 195 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; @@ -1326,6 +1383,7 @@ ModalDialog RID_SYMDEFINEDIALOG }; PushButton 3 { + HelpID = "starmath:PushButton:RID_SYMDEFINEDIALOG:3"; TabStop = TRUE ; Pos = MAP_APPFONT ( 185 , 195 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; @@ -1397,37 +1455,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 @@ -1437,7 +1495,7 @@ Menu RID_VIEWMENU MenuItem { Identifier = SID_DRAW ; - HelpID = SID_DRAW ; + HelpId = CMD_SID_DRAW ; Text [ en-US ] = "U~pdate" ; }; }; @@ -1685,76 +1743,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" ; diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx index cd3e4b714469..108cb9c69e4a 100755 --- a/starmath/source/unomodel.cxx +++ b/starmath/source/unomodel.cxx @@ -238,7 +238,8 @@ enum SmModelPropertyHandles // --> PB 2004-08-25 #i33095# Security Options HANDLE_LOAD_READONLY, // <-- - HANDLE_DIALOG_LIBRARIES // #i73329# + HANDLE_DIALOG_LIBRARIES, // #i73329# + HANDLE_BASELINE // 3.7.2010 #i972# }; PropertySetInfo * lcl_createModelPropertyInfo () @@ -310,6 +311,9 @@ PropertySetInfo * lcl_createModelPropertyInfo () // --> 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 ); @@ -955,6 +959,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; + // <-- } } } |