diff options
author | Mathias Bauer <mba@openoffice.org> | 2010-10-09 18:56:58 +0200 |
---|---|---|
committer | Mathias Bauer <mba@openoffice.org> | 2010-10-09 18:56:58 +0200 |
commit | 1339b1bed6080ab87df2227f9c91d2d355228a44 (patch) | |
tree | 1faf813cf7de36752febad488ec0361b1dbc7f83 | |
parent | eaa4e44cfee19f81a3a3d41982263a3f09e23f06 (diff) | |
parent | 90a45727e45941abef69c1827a646cf64bb70d96 (diff) |
CWS changehid: resync to m89
119 files changed, 3454 insertions, 3827 deletions
diff --git a/starmath/inc/applicat.hxx b/starmath/inc/applicat.hxx index 9c756496ae95..38fcf2b8445c 100644 --- a/starmath/inc/applicat.hxx +++ b/starmath/inc/applicat.hxx @@ -51,10 +51,6 @@ class SvxErrorHandler; ** **/ -#ifdef WIN -#define RELEASE "WIN304" -#endif - #ifdef PM2 #define RELEASE "PM304" #endif diff --git a/starmath/inc/dialog.hxx b/starmath/inc/dialog.hxx index ad4e69c7308a..a421cc8a164e 100644 --- a/starmath/inc/dialog.hxx +++ b/starmath/inc/dialog.hxx @@ -30,9 +30,7 @@ #include <vcl/image.hxx> #include <vcl/dialog.hxx> #include <vcl/fixed.hxx> -#ifndef _SV_BUTTON_HXX //autogen #include <vcl/button.hxx> -#endif #include <vcl/image.hxx> #include <sfx2/tabdlg.hxx> #include <vcl/combobox.hxx> @@ -403,8 +401,8 @@ public: { } - void SetChar(xub_Unicode aChar); - void SetFont(const Font &rFont); + void SetSymbol( const SmSym *pSym ); + void SetSymbol( sal_UCS4 cChar, const Font &rFont ); }; //////////////////////////////////////////////////////////////////////////////// diff --git a/starmath/inc/format.hxx b/starmath/inc/format.hxx index f632131d834f..4d13ea48185e 100644..100755 --- a/starmath/inc/format.hxx +++ b/starmath/inc/format.hxx @@ -109,6 +109,7 @@ class SmFormat : public SfxBroadcaster USHORT vSize[SIZ_END + 1]; USHORT vDist[DIS_END + 1]; SmHorAlign eHorAlign; + INT16 nGreekCharStyle; BOOL bIsTextmode, bScaleNormalBrackets; @@ -138,6 +139,9 @@ public: BOOL IsTextmode() const { return bIsTextmode; } void SetTextmode(BOOL bVal) { bIsTextmode = bVal; } + INT16 GetGreekCharStyle() const { return nGreekCharStyle; } + void SetGreekCharStyle(INT16 nVal) { nGreekCharStyle = nVal; } + BOOL IsScaleNormalBrackets() const { return bScaleNormalBrackets; } void SetScaleNormalBrackets(BOOL bVal) { bScaleNormalBrackets = bVal; } diff --git a/starmath/inc/node.hxx b/starmath/inc/node.hxx index 6ef89ea5ec1b..92c9d4621292 100644 --- a/starmath/inc/node.hxx +++ b/starmath/inc/node.hxx @@ -311,19 +311,10 @@ class SmTextNode : public SmVisibleNode USHORT nFontDesc; protected: - SmTextNode(SmNodeType eNodeType, const SmToken &rNodeToken, USHORT nFontDescP) - : SmVisibleNode(eNodeType, rNodeToken) - { - nFontDesc = nFontDescP; - } + SmTextNode(SmNodeType eNodeType, const SmToken &rNodeToken, USHORT nFontDescP ); public: - SmTextNode(const SmToken &rNodeToken, USHORT nFontDescP) - : SmVisibleNode(NTEXT, rNodeToken) - { - nFontDesc = nFontDescP; - } - + SmTextNode(const SmToken &rNodeToken, USHORT nFontDescP ); USHORT GetFontDesc() const { return nFontDesc; } void SetText(const XubString &rText) { aText = rText; } @@ -347,15 +338,13 @@ public: class SmSpecialNode : public SmTextNode { + bool bIsFromGreekSymbolSet; + protected: - SmSpecialNode(SmNodeType eNodeType, const SmToken &rNodeToken, USHORT _nFontDesc) - : SmTextNode(eNodeType, rNodeToken, _nFontDesc) - {} + SmSpecialNode(SmNodeType eNodeType, const SmToken &rNodeToken, USHORT _nFontDesc); public: - SmSpecialNode(const SmToken &rNodeToken) - : SmTextNode(NSPECIAL, rNodeToken, FNT_MATH) //! default Font nicht immer richtig - {} + SmSpecialNode(const SmToken &rNodeToken); virtual void Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell); virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat); diff --git a/starmath/inc/starmath.hrc b/starmath/inc/starmath.hrc index f83ae0fc8c23..1b919471115c 100644..100755 --- a/starmath/inc/starmath.hrc +++ b/starmath/inc/starmath.hrc @@ -36,28 +36,28 @@ #define SID_PREVERR (SID_SMA_START + 2) #define SID_NEXTMARK (SID_SMA_START + 3) #define SID_PREVMARK (SID_SMA_START + 4) -#define SID_SYMBOLS_CATALOGUE (SID_SMA_START + 5) +#define SID_SYMBOLS_CATALOGUE (SID_SMA_START + 5) #define SID_PREFERENCES (SID_SMA_START + 6) #define SID_VIEW050 (SID_SMA_START + 7) #define SID_VIEW100 (SID_SMA_START + 8) #define SID_VIEW200 (SID_SMA_START + 9) -#define SID_ZOOMIN (SID_SMA_START + 10) +#define SID_ZOOMIN (SID_SMA_START + 10) #define SID_ZOOMOUT (SID_SMA_START + 11) -#define SID_DRAW (SID_SMA_START + 12) -#define SID_ADJUST (SID_SMA_START + 13) +#define SID_DRAW (SID_SMA_START + 12) +#define SID_ADJUST (SID_SMA_START + 13) #define SID_TOOLBOX (SID_SMA_START + 14) #define SID_FORMULACURSOR (SID_SMA_START + 15) -#define SID_FONT (SID_SMA_START + 50) +#define SID_FONT (SID_SMA_START + 50) #define SID_FONTSIZE (SID_SMA_START + 51) #define SID_DISTANCE (SID_SMA_START + 52) -#define SID_ALIGN (SID_SMA_START + 53) +#define SID_ALIGN (SID_SMA_START + 53) #define SID_AUTO_REDRAW (SID_SMA_START + 55) #define SID_SYMBOLS (SID_SMA_START + 56) // Muss erstmal wieder aufgenommen werden ! #define SID_TEXTMODE (SID_SMA_START + 57) -#define SID_INSERT_FORMULA (SID_SMA_START + 58) -#define SID_TEXT (SID_SMA_START + 100) -#define SID_GAPHIC_SM (SID_SMA_START + 101) +#define SID_IMPORT_FORMULA (SID_SMA_START + 58) +#define SID_TEXT (SID_SMA_START + 100) +#define SID_GAPHIC_SM (SID_SMA_START + 101) #define SID_FITINWINDOW (SID_SMA_START + 103) #define SID_INSERTTEXT (SID_SMA_START + 104) #define SID_INSERTCOMMAND (SID_SMA_START + 105) @@ -82,7 +82,7 @@ #define SID_CMDBOXWINDOW (SID_SMA_START + 122) #define SID_TOOLBOXWINDOW (SID_SMA_START + 123) #define SID_NO_RIGHT_SPACES (SID_SMA_START + 124) -#define SID_DUMMY (SID_SMA_START + 254) +#define SID_DUMMY (SID_SMA_START + 254) //#define GID_FORMEL (RID_GROUPS_OFFSET + 1) //#define GID_ERROR (RID_GROUPS_OFFSET + 2) @@ -108,7 +108,7 @@ #define RID_READSYMBOLERROR (RID_APP_START + 203) #define RID_NOMATHTYPEFACEWARNING (RID_APP_START + 204) #define RID_OBJECTNAME (RID_APP_START + 501) -#define RID_VIEWNAME (RID_APP_START + 502) + // free #define RID_UNDOEDITNAME (RID_APP_START + 503) #define RID_UNDOFORMATNAME (RID_APP_START + 504) #define RID_APPICO (RID_APP_START + 601) diff --git a/starmath/inc/symbol.hxx b/starmath/inc/symbol.hxx index 503859485095..621538790300 100644 --- a/starmath/inc/symbol.hxx +++ b/starmath/inc/symbol.hxx @@ -38,7 +38,10 @@ #include <map> #include <vector> #include <set> +#include <functional> +#include <algorithm> +#include "unomodel.hxx" #include "utility.hxx" #include "smmod.hxx" @@ -79,24 +82,24 @@ class SmSym String m_aName; String m_aExportName; String m_aSetName; - sal_Unicode m_cChar; + sal_UCS4 m_cChar; BOOL m_bPredefined; BOOL m_bDocSymbol; public: SmSym(); - SmSym(const String& rName, const Font& rFont, sal_Unicode cChar, + SmSym(const String& rName, const Font& rFont, sal_UCS4 cChar, const String& rSet, BOOL bIsPredefined = FALSE); SmSym(const SmSym& rSymbol); SmSym& operator = (const SmSym& rSymbol); const Font& GetFace() const { return m_aFace; } - sal_Unicode GetCharacter() const { return m_cChar; } + sal_UCS4 GetCharacter() const { return m_cChar; } const String& GetName() const { return m_aName; } void SetFace( const Font& rFont ) { m_aFace = rFont; } - void SetCharacter( sal_Unicode cChar ) { m_cChar = cChar; } + void SetCharacter( sal_UCS4 cChar ) { m_cChar = cChar; } //! since the symbol name is also used as key in the map it should not be possible to change the name //! because ten the key would not be the same as its supposed copy here @@ -133,6 +136,15 @@ typedef std::map< String, SmSym, lt_String > SymbolMap_t; // vector of pointers to the actual symbols in the above container typedef std::vector< const SmSym * > SymbolPtrVec_t; +struct lt_SmSymPtr : public std::binary_function< const SmSym *, const SmSym *, bool > +{ + bool operator() ( const SmSym *pSym1, const SmSym *pSym2 ) + { + return pSym1->GetCharacter() < pSym2->GetCharacter(); + } +}; + + class SmSymbolManager : public SfxListener { SymbolMap_t m_aSymbols; diff --git a/starmath/inc/toolbox.hxx b/starmath/inc/toolbox.hxx index 1881adc0f845..fcc1b046f2dd 100644..100755 --- a/starmath/inc/toolbox.hxx +++ b/starmath/inc/toolbox.hxx @@ -30,12 +30,10 @@ #include <sfx2/basedlgs.hxx> #include <sfx2/childwin.hxx> #include <vcl/toolbox.hxx> + #include "smmod.hxx" #include "config.hxx" - -#include "dialog.hrc" - -#define NUM_TBX_CATEGORIES 9 +#include "toolbox.hrc" class SmToolBoxWindow : public SfxFloatingWindow { diff --git a/starmath/inc/utility.hxx b/starmath/inc/utility.hxx index e7db51152e25..d01c894af592 100644 --- a/starmath/inc/utility.hxx +++ b/starmath/inc/utility.hxx @@ -42,10 +42,6 @@ class String; #define C2S(cChar) String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM(cChar)) -///////////////////////////////////////////////////////////////// - -const ByteString ExportString( const String& rString ); -const String ImportString( const ByteString& rByteString ); ///////////////////////////////////////////////////////////////// diff --git a/starmath/prj/d.lst b/starmath/prj/d.lst index bc48875e81e6..78bae57498ea 100644 --- a/starmath/prj/d.lst +++ b/starmath/prj/d.lst @@ -19,3 +19,5 @@ mkdir: %_DEST%\inc%_EXT%\starmath ..\uiconfig\smath\menubar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\smath\menubar\*.xml ..\uiconfig\smath\toolbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\smath\toolbar\*.xml ..\uiconfig\smath\statusbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\smath\statusbar\*.xml +..\%__SRC%\misc\sm.component %_DEST%\xml%_EXT%\sm.component +..\%__SRC%\misc\smd.component %_DEST%\xml%_EXT%\smd.component diff --git a/starmath/sdi/smath.sdi b/starmath/sdi/smath.sdi index f1f812e6c40b..4b9eaedac599 100644..100755 --- a/starmath/sdi/smath.sdi +++ b/starmath/sdi/smath.sdi @@ -403,8 +403,8 @@ SfxVoidItem InsertConfigName SID_INSERTTEXT ] //-------------------------------------------------------------------------- -SfxBoolItem InsertFormula SID_INSERT_FORMULA -(SfxStringItem Name SID_INSERT_FORMULA,SfxStringItem Filter FN_PARAM_1) +SfxBoolItem ImportFormula SID_IMPORT_FORMULA +(SfxStringItem Name SID_IMPORT_FORMULA,SfxStringItem Filter FN_PARAM_1) [ /* flags: */ AutoUpdate = FALSE, diff --git a/starmath/sdi/smslots.sdi b/starmath/sdi/smslots.sdi index 9e27c7149502..69cecf25f308 100644..100755 --- a/starmath/sdi/smslots.sdi +++ b/starmath/sdi/smslots.sdi @@ -275,12 +275,12 @@ interface FormulaView ExecMethod = Execute ; StateMethod = GetState ; ] - SID_INSERT_FORMULA //idlpp ole : no , status : no - [ - ExecMethod = Execute ; - StateMethod = GetState ; - Export = FALSE ; - ] + SID_IMPORT_FORMULA //idlpp ole : no , status : no + [ + ExecMethod = Execute ; + StateMethod = GetState ; + Export = FALSE ; + ] //idlpp kein Menueeintrag , also keine Texte SID_ATTR_ZOOM //idlpp ole : no , status : no [ diff --git a/starmath/source/cfgitem.cxx b/starmath/source/cfgitem.cxx index bf62157a30d3..21ae6c0e63df 100644 --- a/starmath/source/cfgitem.cxx +++ b/starmath/source/cfgitem.cxx @@ -42,7 +42,6 @@ using namespace com::sun::star; using namespace com::sun::star::uno; using namespace com::sun::star::beans; -#define A2OU(x) rtl::OUString::createFromAscii( x ) static const char* aRootName = "Office.Math"; @@ -127,6 +126,7 @@ static const char * aMathPropNames[] = static const char * aFormatPropNames[] = { "StandardFormat/Textmode", + "StandardFormat/GreekCharStyle", "StandardFormat/ScaleNormalBracket", "StandardFormat/HorizontalAlignment", "StandardFormat/BaseSize", @@ -490,7 +490,7 @@ 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; @@ -500,7 +500,7 @@ void SmMathConfig::ReadSymbol( SmSym &rSymbol, BOOL bOK = TRUE; if (pValue->hasValue() && (*pValue >>= nTmp32)) - cChar = (sal_Unicode) nTmp32; + cChar = static_cast< sal_UCS4 >( nTmp32 ); else bOK = FALSE; ++pValue; @@ -624,7 +624,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; @@ -994,6 +994,10 @@ void SmMathConfig::LoadFormat() if (pVal->hasValue() && (*pVal >>= bTmp)) pFormat->SetTextmode( bTmp ); ++pVal; + // StandardFormat/GreekCharStyle + if (pVal->hasValue() && (*pVal >>= nTmp16)) + pFormat->SetGreekCharStyle( nTmp16 ); + ++pVal; // StandardFormat/ScaleNormalBracket if (pVal->hasValue() && (*pVal >>= bTmp)) pFormat->SetScaleNormalBrackets( bTmp ); @@ -1069,6 +1073,8 @@ void SmMathConfig::SaveFormat() // StandardFormat/Textmode *pValue++ <<= (BOOL) pFormat->IsTextmode(); + // StandardFormat/GreekCharStyle + *pValue++ <<= (INT16) pFormat->GetGreekCharStyle(); // StandardFormat/ScaleNormalBracket *pValue++ <<= (BOOL) pFormat->IsScaleNormalBrackets(); // StandardFormat/HorizontalAlignment diff --git a/starmath/source/detreg.cxx b/starmath/source/detreg.cxx index c79813f994a7..ef4b261ce0b3 100644 --- a/starmath/source/detreg.cxx +++ b/starmath/source/detreg.cxx @@ -48,29 +48,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 d61686b747dd..a33ab14a98bf 100644..100755 --- a/starmath/source/dialog.cxx +++ b/starmath/source/dialog.cxx @@ -50,17 +50,18 @@ #include <svx/ucsubset.hxx> -#include "config.hxx" #include "dialog.hxx" -#ifndef _STARMATH_HRC #include "starmath.hrc" -#endif - +#include "config.hxx" #include "dialog.hrc" #include "smmod.hxx" #include "symbol.hxx" #include "view.hxx" #include "document.hxx" +#include "unomodel.hxx" + + +using ::rtl::OUString; //////////////////////////////////////// // @@ -1158,11 +1159,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) @@ -1334,7 +1337,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); } @@ -1351,17 +1354,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. @@ -1484,8 +1484,9 @@ IMPL_LINK( SmSymbolDialog, GetClickHdl, Button *, EMPTYARG pButton ) const SmSym *pSym = GetSymbol(); if (pSym) { - XubString aText ('%'); + String aText ('%'); aText += pSym->GetName(); + aText += (sal_Unicode)' '; rViewSh.GetViewFrame()->GetDispatcher()->Execute( SID_INSERTTEXT, SFX_CALLMODE_STANDARD, @@ -1601,6 +1602,9 @@ BOOL SmSymbolDialog::SelectSymbolSet(const XubString &rSymbolSetName) aSymbolSetName = rSymbolSetName; aSymbolSet = rSymbolMgr.GetSymbolSet( aSymbolSetName ); + // sort symbols by Unicode position (useful for displaying Greek characters alphabetically) + std::sort( aSymbolSet.begin(), aSymbolSet.end(), lt_SmSymPtr() ); + aSymbolSetDisplay.SetSymbolSet( aSymbolSet ); if (aSymbolSet.size() > 0) SelectSymbol(0); @@ -1641,42 +1645,43 @@ 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 ); + aFont.SetSize( Size(0, GetOutputSize().Height() - GetOutputSize().Height() / 3) ); + aFont.SetAlign(ALIGN_BASELINE); + SetFont(aFont); - Font aFont (rFont); - Size aSize (Size(0, GetOutputSize().Height() - GetOutputSize().Height() / 3)); - - aFont.SetSize(aSize); - aFont.SetAlign(ALIGN_TOP); - 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) @@ -1863,7 +1868,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 DBG_ASSERT( pSubsetMap, "SubsetMap missing" ); @@ -1877,9 +1882,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; } @@ -1893,16 +1907,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() ); //DBG_ASSERT( 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() ); @@ -1929,10 +1940,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 bSetNameChanged = aOldSymbolSets.GetText() != aSymbolSets.GetText(); @@ -1946,8 +1955,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() ); @@ -2080,8 +2088,8 @@ SmSymDefineDialog::SmSymDefineDialog(Window * pParent, // auto completion is troublesome since that symbols character also gets automatically selected in the // display and if the user previously selected a character to define/redefine that one this is bad - aOldSymbols.EnableAutocomplete( FALSE, TRUE ); - aSymbols .EnableAutocomplete( FALSE, TRUE ); + aOldSymbols.EnableAutocomplete( FALSE, TRUE ); + aSymbols .EnableAutocomplete( FALSE, TRUE ); FillFonts(); if (aFonts.GetEntryCount() > 0) @@ -2267,8 +2275,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 @@ -2322,6 +2329,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() ); } } @@ -2378,7 +2389,7 @@ void SmSymDefineDialog::SetFont(const XubString &rFontName, const XubString &rSt 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 ) @@ -2398,7 +2409,11 @@ BOOL SmSymDefineDialog::SelectFont(const XubString &rFontName, BOOL bApplyFont) if (aStyles.GetEntryCount() > 0) SelectStyle(aStyles.GetEntry(0)); if (bApplyFont) + { SetFont(aFonts.GetSelectEntry(), aStyles.GetText()); + // update preview to use new font + aSymbolDisplay.SetSymbol( aCharsetDisplay.GetSelectCharacter(), aCharsetDisplay.GetFont() ); + } bRet = TRUE; } else @@ -2425,7 +2440,11 @@ BOOL SmSymDefineDialog::SelectStyle(const XubString &rStyleName, BOOL bApplyFont { aStyles.SetText(aStyles.GetEntry(nPos)); if (bApplyFont) + { SetFont(aFonts.GetSelectEntry(), aStyles.GetText()); + // update preview to use new font + aSymbolDisplay.SetSymbol( aCharsetDisplay.GetSelectCharacter(), aCharsetDisplay.GetFont() ); + } bRet = TRUE; } else @@ -2440,7 +2459,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/document.cxx b/starmath/source/document.cxx index 49739af72972..ab1382b97879 100644 --- a/starmath/source/document.cxx +++ b/starmath/source/document.cxx @@ -131,9 +131,9 @@ void SmDocShell::SFX_NOTIFY(SfxBroadcaster&, const TypeId&, { case HINT_FORMATCHANGED: SetFormulaArranged(FALSE); - nModifyCount++; //! merkwuerdig... - // ohne dies wird die Grafik letztlich - // nicht geupdatet + + nModifyCount++; //! see comment for SID_GAPHIC_SM in SmDocShell::GetState + Repaint(); break; } @@ -211,11 +211,19 @@ void SmDocShell::SetFormat(SmFormat& rFormat) RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::SetFormat" ); aFormat = rFormat; - SetFormulaArranged(FALSE); - SmViewShell *pViewSh = SmGetActiveView(); - if (pViewSh) - pViewSh->GetViewFrame()->GetBindings().Invalidate(SID_GAPHIC_SM); - SetModified(TRUE); + SetFormulaArranged( FALSE ); + SetModified( TRUE ); + + nModifyCount++; //! see comment for SID_GAPHIC_SM in SmDocShell::GetState + + // don't use SmGetActiveView since the view shell might not be active (0 pointer) + // if for example the Basic Macro dialog currently has the focus. Thus: + SfxViewFrame* pFrm = SfxViewFrame::GetFirst( this ); + while (pFrm) + { + pFrm->GetBindings().Invalidate(SID_GAPHIC_SM); + pFrm = SfxViewFrame::GetNext( *pFrm, this ); + } } String SmDocShell::GetAccessibleText() @@ -241,7 +249,7 @@ void SmDocShell::Parse() delete pTree; ReplaceBadChars(); pTree = aInterpreter.Parse(aText); - nModifyCount++; + nModifyCount++; //! see comment for SID_GAPHIC_SM in SmDocShell::GetState SetFormulaArranged( FALSE ); } @@ -1123,13 +1131,9 @@ void SmDocShell::Execute(SfxRequest& rReq) case SID_TEXT: { - const SfxStringItem& rItem = - (const SfxStringItem&)rReq.GetArgs()->Get(SID_TEXT); - + const SfxStringItem& rItem = (const SfxStringItem&)rReq.GetArgs()->Get(SID_TEXT); if (GetText() != rItem.GetValue()) - { SetText(rItem.GetValue()); - } } break; @@ -1222,6 +1226,10 @@ void SmDocShell::GetState(SfxItemSet &rSet) break; case SID_GAPHIC_SM: + //! very old (pre UNO) and ugly hack to invalidate the SmGraphicWindow. + //! If nModifyCount gets changed then the call below will implicitly notify + //! SmGraphicController::StateChanged and there the window gets invalidated. + //! Thus all the 'nModifyCount++' before invalidating this slot. rSet.Put(SfxInt16Item(SID_GAPHIC_SM, nModifyCount)); break; diff --git a/starmath/source/edit.cxx b/starmath/source/edit.cxx index f7093f9c3815..020376c05dfb 100644 --- a/starmath/source/edit.cxx +++ b/starmath/source/edit.cxx @@ -252,6 +252,7 @@ IMPL_LINK( SmEditWindow, ModifyTimerHdl, Timer *, EMPTYARG /*pTimer*/ ) SmModule *pp = SM_MOD(); if (pp->GetConfig()->IsAutoRedraw()) Flush(); + aModifyTimer.Stop(); return 0; } @@ -279,6 +280,7 @@ IMPL_LINK(SmEditWindow, CursorMoveTimerHdl, Timer *, EMPTYARG /*pTimer*/) aOldSelection = aNewSelection; } } + aCursorMoveTimer.Stop(); return 0; } @@ -435,7 +437,7 @@ void SmEditWindow::KeyInput(const KeyEvent& rKEvt) SmViewShell *pView = GetView(); if ( pView && !pView->KeyInput(rKEvt) ) { - /* fuert bei F1 (Hilfe) zum Zerstoeren von this! */ + /* fuert bei F1 (Hilfe) zum Zerstoeren von this! */ Flush(); if ( aModifyTimer.IsActive() ) aModifyTimer.Stop(); @@ -734,6 +736,9 @@ void SmEditWindow::InsertCommand(USHORT nCommand) pEditView->SetSelection(aSelection); } + aModifyTimer.Start(); + aCursorMoveTimer.Start(); + GrabFocus(); } } @@ -917,7 +922,11 @@ void SmEditWindow::InsertText(const String& Text) { DBG_ASSERT( pEditView, "EditView missing" ); if (pEditView) + { pEditView->InsertText(Text); + aModifyTimer.Start(); + aCursorMoveTimer.Start(); + } } void SmEditWindow::Flush() @@ -928,9 +937,11 @@ void SmEditWindow::Flush() pEditEngine->ClearModifyFlag(); SmViewShell *pViewSh = rCmdBox.GetView(); if (pViewSh) + { pViewSh->GetViewFrame()->GetDispatcher()->Execute( SID_TEXT, SFX_CALLMODE_STANDARD, new SfxStringItem(SID_TEXT, GetText()), 0L); + } } if (aCursorMoveTimer.IsActive()) diff --git a/starmath/source/format.cxx b/starmath/source/format.cxx index 18aaed4c841c..e92d1a5e97aa 100644 --- a/starmath/source/format.cxx +++ b/starmath/source/format.cxx @@ -112,8 +112,9 @@ SmFormat::SmFormat() { nVersion = SM_FMT_VERSION_NOW; - eHorAlign = AlignCenter; - bIsTextmode = bScaleNormalBrackets = FALSE; + eHorAlign = AlignCenter; + nGreekCharStyle = 0; + bIsTextmode = bScaleNormalBrackets = FALSE; vSize[SIZ_TEXT] = 100; vSize[SIZ_INDEX] = 60; @@ -191,6 +192,7 @@ SmFormat & SmFormat::operator = (const SmFormat &rFormat) SetVersion (rFormat.GetVersion()); SetHorAlign(rFormat.GetHorAlign()); SetTextmode(rFormat.IsTextmode()); + SetGreekCharStyle(rFormat.GetGreekCharStyle()); SetScaleNormalBrackets(rFormat.IsScaleNormalBrackets()); USHORT i; @@ -212,6 +214,7 @@ BOOL SmFormat::operator == (const SmFormat &rFormat) const { BOOL bRes = aBaseSize == rFormat.aBaseSize && eHorAlign == rFormat.eHorAlign && + nGreekCharStyle == rFormat.nGreekCharStyle && bIsTextmode == rFormat.bIsTextmode && bScaleNormalBrackets == rFormat.bScaleNormalBrackets; diff --git a/starmath/source/makefile.mk b/starmath/source/makefile.mk index 596060397e18..0e038bb9c78d 100644..100755 --- a/starmath/source/makefile.mk +++ b/starmath/source/makefile.mk @@ -36,6 +36,8 @@ LIBTARGET=NO # --- Settings ----------------------------------------------------- +ENABLE_EXCEPTIONS=TRUE + .INCLUDE : settings.mk # --- Files -------------------------------------------------------- @@ -45,6 +47,7 @@ SMDLL=TRUE SRS2NAME =smres SRC2FILES = smres.src \ symbol.src \ + toolbox.src \ commands.src SLO1FILES = \ @@ -84,24 +87,6 @@ SLOFILES = \ $(SLO1FILES) \ $(SLO2FILES) -EXCEPTIONSFILES = \ - $(SLO)$/register.obj \ - $(SLO)$/accessibility.obj \ - $(SLO)$/cfgitem.obj \ - $(SLO)$/dialog.obj \ - $(SLO)$/document.obj \ - $(SLO)$/node.obj \ - $(SLO)$/parse.obj \ - $(SLO)$/mathmlimport.obj \ - $(SLO)$/mathmlexport.obj \ - $(SLO)$/mathtype.obj \ - $(SLO)$/smdll.obj \ - $(SLO)$/view.obj \ - $(SLO)$/unomodel.obj \ - $(SLO)$/smdetect.obj \ - $(SLO)$/symbol.obj \ - $(SLO)$/unodoc.obj - LIB1TARGET = \ $(SLB)$/$(TARGET).lib diff --git a/starmath/source/mathmlexport.cxx b/starmath/source/mathmlexport.cxx index 36eb9d3884b5..bec69eb01b95 100644 --- a/starmath/source/mathmlexport.cxx +++ b/starmath/source/mathmlexport.cxx @@ -75,7 +75,6 @@ #include <memory> #include "mathmlexport.hxx" -#include "mathtype.hxx" #include <starmath.hrc> #include <unomodel.hxx> #include <document.hxx> diff --git a/starmath/source/mathmlimport.cxx b/starmath/source/mathmlimport.cxx index dd90caaf6d45..36c009757eac 100644 --- a/starmath/source/mathmlimport.cxx +++ b/starmath/source/mathmlimport.cxx @@ -71,7 +71,6 @@ one go*/ #include <memory> #include "mathmlimport.hxx" -#include "mathtype.hxx" #include <starmath.hrc> #include <unomodel.hxx> #include <document.hxx> diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx index 4601b2f84fec..d8e2586e151e 100644..100755 --- a/starmath/source/node.cxx +++ b/starmath/source/node.cxx @@ -28,7 +28,14 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_starmath.hxx" -#define APPEND(str,ascii) str.AppendAscii(RTL_CONSTASCII_STRINGPARAM(ascii)) +#include "node.hxx" +#include "rect.hxx" +#include "symbol.hxx" +#include "smmod.hxx" +#include "document.hxx" +#include "view.hxx" +#include "mathtype.hxx" + #include <tools/gen.hxx> #include <tools/fract.hxx> #include <rtl/math.hxx> @@ -38,23 +45,19 @@ #include <vcl/outdev.hxx> #include <sfx2/module.hxx> - -#include "node.hxx" -#include <rect.hxx> -#include "symbol.hxx" -#include "smmod.hxx" -#include <document.hxx> -#include <view.hxx> -#ifndef _MATHTYPE_HXX -#include "mathtype.hxx" -#endif - #include <math.h> #include <float.h> + +#define APPEND(str,ascii) str.AppendAscii(RTL_CONSTASCII_STRINGPARAM(ascii)) + // define this to draw rectangles for debugging //#define SM_RECT_DEBUG + +using ::rtl::OUString; + + //////////////////////////////////////// // SmTmpDevice // Allows for font and color changes. The original settings will be restored @@ -2355,6 +2358,20 @@ void SmRectangleNode::Draw(OutputDevice &rDev, const Point &rPosition) const /**************************************************************************/ +SmTextNode::SmTextNode( SmNodeType eNodeType, const SmToken &rNodeToken, USHORT nFontDescP ) : + SmVisibleNode(eNodeType, rNodeToken) +{ + nFontDesc = nFontDescP; +} + + +SmTextNode::SmTextNode( const SmToken &rNodeToken, USHORT nFontDescP ) : + SmVisibleNode(NTEXT, rNodeToken) +{ + nFontDesc = nFontDescP; +} + + void SmTextNode::Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell) { SmNode::Prepare(rFormat, rDocShell); @@ -2459,6 +2476,12 @@ void SmTextNode::Draw(OutputDevice &rDev, const Point& rPosition) const // auf Pixelkoordinaten runden aPos = rDev.PixelToLogic( rDev.LogicToPixel(aPos) ); +#if OSL_DEBUG_LEVEL > 1 + sal_Int32 nPos = 0; + sal_UCS4 cChar = OUString( aText ).iterateCodePoints( &nPos ); + (void) cChar; +#endif + rDev.DrawStretchText(aPos, GetWidth(), aText); #ifdef SM_RECT_DEBUG @@ -2798,6 +2821,36 @@ void SmAttributNode::CreateTextFromNode(String &rText) /**************************************************************************/ +bool lcl_IsFromGreekSymbolSet( const String &rTokenText ) +{ + bool bRes = false; + + // valid symbol name needs to have a '%' at pos 0 and at least an additonal char + if (rTokenText.Len() > 2 && rTokenText.GetBuffer()[0] == (sal_Unicode)'%') + { + String aName( rTokenText.Copy(1) ); + SmSym *pSymbol = SM_MOD()->GetSymbolManager().GetSymbolByName( aName ); + if (pSymbol && GetExportSymbolSetName( pSymbol->GetSymbolSetName() ).EqualsAscii( "Greek" ) ) + bRes = true; + } + + return bRes; +} + + +SmSpecialNode::SmSpecialNode(SmNodeType eNodeType, const SmToken &rNodeToken, USHORT _nFontDesc) : + SmTextNode(eNodeType, rNodeToken, _nFontDesc) +{ + bIsFromGreekSymbolSet = lcl_IsFromGreekSymbolSet( rNodeToken.aText ); +} + + +SmSpecialNode::SmSpecialNode(const SmToken &rNodeToken) : + SmTextNode(NSPECIAL, rNodeToken, FNT_MATH) //! default Font nicht immer richtig +{ + bIsFromGreekSymbolSet = lcl_IsFromGreekSymbolSet( rNodeToken.aText ); +} + void SmSpecialNode::Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell) { @@ -2806,9 +2859,12 @@ void SmSpecialNode::Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell const SmSym *pSym; SmModule *pp = SM_MOD(); - if (NULL != (pSym = pp->GetSymbolManager().GetSymbolByName(GetToken().aText))) + 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 @@ -2832,6 +2888,33 @@ void SmSpecialNode::Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell SetAttribut(ATTR_BOLD); Flags() |= FLG_FONT; + + if (bIsFromGreekSymbolSet) + { + DBG_ASSERT( GetText().Len() == 1, "a symbol should only consist of 1 char!" ); + bool bItalic = false; + INT16 nStyle = rFormat.GetGreekCharStyle(); + DBG_ASSERT( nStyle >= 0 && nStyle <= 2, "unexpected value for GreekCharStyle" ); + if (nStyle == 1) + bItalic = true; + else if (nStyle == 2) + { + String aTmp( GetText() ); + if (aTmp.Len() > 0) + { + const sal_Unicode cUppercaseAlpha = 0x0391; + const sal_Unicode cUppercaseOmega = 0x03A9; + sal_Unicode cChar = aTmp.GetBuffer()[0]; + // uppercase letters should be straight and lowercase letters italic + bItalic = !(cUppercaseAlpha <= cChar && cChar <= cUppercaseOmega); + } + } + + if (bItalic) + Attributes() |= ATTR_ITALIC; + else + Attributes() &= ~ATTR_ITALIC;; + } }; diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx index 15971d0c38af..d12f3df07400 100644..100755 --- a/starmath/source/parse.cxx +++ b/starmath/source/parse.cxx @@ -741,14 +741,14 @@ void SmParser::NextToken() CurToken.nLevel = 5; CurToken.aText = String(); CurToken.nRow = sal::static_int_cast< xub_StrLen >(Row); - CurToken.nCol = nTmpStart - ColOff + 1; + CurToken.nCol = nTmpStart - ColOff; 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), n ); + CurToken.aText = BufferString.Copy( sal::static_int_cast< xub_StrLen >(nTmpStart-1), n+1 ); DBG_ASSERT( aTmpRes.EndPos > rnEndPos, "empty identifier" ); diff --git a/starmath/source/register.cxx b/starmath/source/register.cxx index 0983d0a86ee4..a7e7ea2110a6 100644 --- a/starmath/source/register.cxx +++ b/starmath/source/register.cxx @@ -118,92 +118,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 + 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/smres.src b/starmath/source/smres.src index 0ffa820b7a32..710081687d6e 100644..100755 --- a/starmath/source/smres.src +++ b/starmath/source/smres.src @@ -1148,7 +1148,7 @@ ModalDialog RID_SYMDEFINEDIALOG ComboBox 1 { Pos = MAP_APPFONT ( 59 , 6 ) ; - Size = MAP_APPFONT ( 80 , 50 ) ; + Size = MAP_APPFONT ( 80 , 100 ) ; TabStop = TRUE ; DropDown = TRUE ; Sort = TRUE ; @@ -1163,7 +1163,7 @@ ModalDialog RID_SYMDEFINEDIALOG ComboBox 2 { Pos = MAP_APPFONT ( 210 , 6 ) ; - Size = MAP_APPFONT ( 80 , 50 ) ; + Size = MAP_APPFONT ( 80 , 100 ) ; TabStop = TRUE ; DropDown = TRUE ; Sort = TRUE ; @@ -1187,7 +1187,7 @@ ModalDialog RID_SYMDEFINEDIALOG ComboBox 4 { Pos = MAP_APPFONT ( 80 , 115 ) ; - Size = MAP_APPFONT ( 100 , 80 ) ; + Size = MAP_APPFONT ( 100 , 100 ) ; TabStop = TRUE ; DropDown = TRUE ; Sort = TRUE ; @@ -1202,7 +1202,7 @@ ModalDialog RID_SYMDEFINEDIALOG ComboBox 5 { Pos = MAP_APPFONT ( 80 , 130 ) ; - Size = MAP_APPFONT ( 100 , 50 ) ; + Size = MAP_APPFONT ( 100 , 100 ) ; TabStop = TRUE ; DropDown = TRUE ; Sort = TRUE ; @@ -1218,7 +1218,7 @@ ModalDialog RID_SYMDEFINEDIALOG { Border = TRUE ; Pos = MAP_APPFONT ( 80 , 145 ) ; - Size = MAP_APPFONT ( 100 , 50 ) ; + Size = MAP_APPFONT ( 100 , 100 ) ; TabStop = TRUE ; Sort = TRUE ; DropDown = TRUE ; @@ -1234,7 +1234,7 @@ ModalDialog RID_SYMDEFINEDIALOG { Border = TRUE ; Pos = MAP_APPFONT ( 80 , 160 ) ; - Size = MAP_APPFONT ( 100 , 50 ) ; + Size = MAP_APPFONT ( 100 , 100 ) ; TabStop = TRUE ; Sort = FALSE ; DropDown = TRUE ; @@ -1250,7 +1250,7 @@ ModalDialog RID_SYMDEFINEDIALOG { Border = TRUE; Pos = MAP_APPFONT ( 80 , 175 ) ; - Size = MAP_APPFONT ( 100 , 50 ) ; + Size = MAP_APPFONT ( 100 , 100 ) ; TabStop = TRUE ; DropDown = TRUE ; Sort = FALSE ; @@ -1380,10 +1380,6 @@ String RID_OBJECTNAME { Text = "SMath3" ; }; -String RID_VIEWNAME -{ - Text = "StarMath" ; -}; String RID_UNDOEDITNAME { Text = "Edit" ; @@ -1547,1420 +1543,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 ; - /* ### 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 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" ; \ @@ -2979,380 +1561,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 - }; - ImageList RID_ILH_UNBINOPS - { - Prefix = "unh"; - MaskColor = IMAGE_STDBTN_COLOR_HC ; - 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 - }; - ImageList RID_ILH_RELATIONS - { - Prefix = "bih"; - MaskColor = IMAGE_STDBTN_COLOR_HC ; - 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 - }; - ImageList RID_ILH_SETOPERATIONS - { - Prefix = "oph"; - MaskColor = IMAGE_STDBTN_COLOR_HC ; - 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 - }; - ImageList RID_ILH_FUNCTIONS - { - Prefix = "fuh"; - MaskColor = IMAGE_STDBTN_COLOR_HC ; - 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 - }; - ImageList RID_ILH_OPERATORS - { - Prefix = "foh"; - MaskColor = IMAGE_STDBTN_COLOR_HC ; - 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 - }; - ImageList RID_ILH_ATTRIBUTES - { - Prefix = "ath"; - MaskColor = IMAGE_STDBTN_COLOR_HC ; - 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 - }; - ImageList RID_ILH_BRACKETS - { - Prefix = "alh"; - MaskColor = IMAGE_STDBTN_COLOR_HC ; - 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 - }; - ImageList RID_ILH_FORMAT - { - Prefix = "coh"; - MaskColor = IMAGE_STDBTN_COLOR_HC ; - 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 - }; - ImageList RID_ILH_MISC - { - Prefix = "mih"; - MaskColor = IMAGE_STDBTN_COLOR_HC ; - 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 - }; - ImageList RID_ILH_CATALOG - { - Prefix = "imh"; - MaskColor = IMAGE_STDBTN_COLOR_HC ; - CATALOG_IDLIST - }; - - - String STR_CMDBOXWINDOW { CMDBOXWINDOW_TEXT @@ -3503,9 +1711,9 @@ StringArray RID_PRINTUIOPTIONS < "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."; >; +// < "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 e248f9726629..52d0520ae61b 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; @@ -290,6 +290,28 @@ void SmSymbolManager::Load() DBG_ERROR( "no symbol set found" ); m_bModified = false; } + + // now add a %i... symbol to the 'iGreek' set for every symbol found in the 'Greek' set. + SmLocalizedSymbolData aLocalizedData; + const String aGreekSymbolSetName( aLocalizedData.GetUiSymbolSetName( A2OU("Greek") ) ); + const SymbolPtrVec_t aGreekSymbols( GetSymbolSet( aGreekSymbolSetName ) ); + String aSymbolSetName( (sal_Unicode) 'i' ); + aSymbolSetName += aGreekSymbolSetName; + size_t nSymbols = aGreekSymbols.size(); + for (size_t i = 0; i < nSymbols; ++i) + { + // make the new symbol a copy but with ITALIC_NORMAL, and add it to iGreek + const SmSym &rSym = *aGreekSymbols[i]; + Font aFont( rSym.GetFace() ); + DBG_ASSERT( aFont.GetItalic() == ITALIC_NONE, "expected Font with ITALIC_NONE, failed." ); + aFont.SetItalic( ITALIC_NORMAL ); + String aSymbolName( (sal_Unicode)'i' ); + aSymbolName += rSym.GetName(); + SmSym aSymbol( aSymbolName, aFont, rSym.GetCharacter(), + aSymbolSetName, TRUE /*bIsPredefined*/ ); + + AddOrReplaceSymbol( aSymbol ); + } } void SmSymbolManager::Save() @@ -314,10 +336,21 @@ void SmSymbolManager::Save() } DBG_ASSERT(pSym - pSymbols == nSaveSymbolCnt, "wrong number of symbols" ); #endif + + // prepare to skip symbols from iGreek on saving + SmLocalizedSymbolData aLocalizedData; + String aSymbolSetName( (sal_Unicode) 'i' ); + aSymbolSetName += aLocalizedData.GetUiSymbolSetName( A2OU("Greek") ); + SymbolPtrVec_t aTmp( GetSymbols() ); std::vector< SmSym > aSymbols; for (size_t i = 0; i < aTmp.size(); ++i) - aSymbols.push_back( *aTmp[i] ); + { + // skip symbols from iGreek set since those symbols always get added + // by computational means in SmSymbolManager::Load + if (aTmp[i]->GetSymbolSetName() != aSymbolSetName) + aSymbols.push_back( *aTmp[i] ); + } rCfg.SetSymbols( aSymbols ); #if 0 delete [] pSymbols; diff --git a/starmath/source/toolbox.cxx b/starmath/source/toolbox.cxx index 2de6c97ed5ab..5bcf1448aca0 100644 --- a/starmath/source/toolbox.cxx +++ b/starmath/source/toolbox.cxx @@ -135,7 +135,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" ); @@ -143,14 +143,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++) + 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)); } @@ -163,15 +163,12 @@ SmToolBoxWindow::SmToolBoxWindow(SfxBindings *pTmpBindings, } 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; @@ -249,11 +246,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 ); @@ -263,7 +260,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*/ ) ); DBG_ASSERT( aCatSize.Width() == aCmdSize.Width(), "width mismatch" ); // catalog settings @@ -271,14 +268,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 ); @@ -327,63 +322,60 @@ void SmToolBoxWindow::GetFocus() void SmToolBoxWindow::SetCategory(USHORT 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; - } + USHORT 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 ); - DBG_ASSERT( nIdx >= 0, "unkown category" ); - if (nIdx >= 0) - pToolBoxCmd = vToolBoxCategories[nIdx]; + sal_Int16 nIdx = GetToolBoxCategoriesIndex( nCategoryRID ); + DBG_ASSERT( nIdx >= 0, "unkown category" ); + if (nIdx >= 0) + pToolBoxCmd = vToolBoxCategories[nIdx]; - // calculate actual size of window to use - Size aCatSize( aToolBoxCat.CalcWindowSizePixel( 2 ) ); - Size aCmdSize( pToolBoxCmd->CalcWindowSizePixel( nLines ) ); - DBG_ASSERT( aCatSize.Width() == aCmdSize.Width(), "width mismatch" ); - // main window settings - Size aWndSize ( aCatSize.Width(), pToolBoxCmd->GetPosPixel().Y() + aCmdSize.Height() + 3); - SetOutputSizePixel( aWndSize ); + // calculate actual size of window to use + Size aCatSize( aToolBoxCat.CalcWindowSizePixel( 2 ) ); + Size aCmdSize( pToolBoxCmd->CalcWindowSizePixel( nLines ) ); + DBG_ASSERT( aCatSize.Width() == aCmdSize.Width(), "width mismatch" ); + // main window settings + Size aWndSize ( aCatSize.Width(), pToolBoxCmd->GetPosPixel().Y() + aCmdSize.Height() + 3); + SetOutputSizePixel( aWndSize ); - if (nActiveCategoryRID) - aToolBoxCat.CheckItem(nActiveCategoryRID, FALSE); - nActiveCategoryRID = nCategoryRID; - aToolBoxCat.CheckItem(nActiveCategoryRID, TRUE); + if (nActiveCategoryRID) + aToolBoxCat.CheckItem(nActiveCategoryRID, FALSE); + 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) ); 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) @@ -392,7 +384,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) /**************************************************************************/ 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..ead1b32810c3 --- /dev/null +++ b/starmath/source/toolbox.src @@ -0,0 +1,1837 @@ +/************************************************************************* + * + * 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 + }; + ImageList RID_ILH_UNBINOPS + { + Prefix = "unh"; + MaskColor = IMAGE_STDBTN_COLOR_HC ; + 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 + }; + ImageList RID_ILH_RELATIONS + { + Prefix = "bih"; + MaskColor = IMAGE_STDBTN_COLOR_HC ; + 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 + }; + ImageList RID_ILH_SETOPERATIONS + { + Prefix = "oph"; + MaskColor = IMAGE_STDBTN_COLOR_HC ; + 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 + }; + ImageList RID_ILH_FUNCTIONS + { + Prefix = "fuh"; + MaskColor = IMAGE_STDBTN_COLOR_HC ; + 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 + }; + ImageList RID_ILH_OPERATORS + { + Prefix = "foh"; + MaskColor = IMAGE_STDBTN_COLOR_HC ; + 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 + }; + ImageList RID_ILH_ATTRIBUTES + { + Prefix = "ath"; + MaskColor = IMAGE_STDBTN_COLOR_HC ; + 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 + }; + ImageList RID_ILH_BRACKETS + { + Prefix = "alh"; + MaskColor = IMAGE_STDBTN_COLOR_HC ; + 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 + }; + ImageList RID_ILH_FORMAT + { + Prefix = "coh"; + MaskColor = IMAGE_STDBTN_COLOR_HC ; + 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 + }; + ImageList RID_ILH_MISC + { + Prefix = "mih"; + MaskColor = IMAGE_STDBTN_COLOR_HC ; + 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 + }; + ImageList RID_ILH_CATALOG + { + Prefix = "imh"; + MaskColor = IMAGE_STDBTN_COLOR_HC ; + CATALOG_IDLIST + }; + + + diff --git a/starmath/source/types.cxx b/starmath/source/types.cxx index a861db5a0c79..e63d46c79e9b 100644 --- a/starmath/source/types.cxx +++ b/starmath/source/types.cxx @@ -38,7 +38,7 @@ sal_Unicode ConvertMathPrivateUseAreaToUnicode( sal_Unicode cChar ) if (IsInPrivateUseArea( cChar )) { DBG_ASSERT( 0, "Error: private use area characters should no longer be in use!" ); - cRes = (sal_Unicode) '&'; // just some character that should easily be notice as odd in the context + cRes = (sal_Unicode) '@'; // just some character that should easily be notice as odd in the context } return cRes; } diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx index 013831f6e44e..cd3e4b714469 100644..100755 --- a/starmath/source/unomodel.cxx +++ b/starmath/source/unomodel.cxx @@ -81,8 +81,8 @@ using namespace ::com::sun::star::script; SmPrintUIOptions::SmPrintUIOptions() { ResStringArray aLocalizedStrings( SmResId( RID_PRINTUIOPTIONS ) ); - DBG_ASSERT( aLocalizedStrings.Count() >= 18, "resource incomplete" ); - if( aLocalizedStrings.Count() < 18 ) // bad resource ? + DBG_ASSERT( aLocalizedStrings.Count() >= 15, "resource incomplete" ); + if( aLocalizedStrings.Count() < 15 ) // bad resource ? return; SmModule *pp = SM_MOD(); @@ -203,6 +203,7 @@ enum SmModelPropertyHandles HANDLE_RELATIVE_FONT_HEIGHT_OPERATORS, HANDLE_RELATIVE_FONT_HEIGHT_LIMITS, HANDLE_IS_TEXT_MODE, + HANDLE_GREEK_CHAR_STYLE, HANDLE_ALIGNMENT, HANDLE_RELATIVE_SPACING, HANDLE_RELATIVE_LINE_SPACING, @@ -273,6 +274,7 @@ PropertySetInfo * lcl_createModelPropertyInfo () { RTL_CONSTASCII_STRINGPARAM( "Formula" ), HANDLE_FORMULA , &::getCppuType((const OUString*)0), PROPERTY_NONE, 0}, { RTL_CONSTASCII_STRINGPARAM( "IsScaleAllBrackets" ), HANDLE_IS_SCALE_ALL_BRACKETS , &::getBooleanCppuType(), PROPERTY_NONE, 0}, { RTL_CONSTASCII_STRINGPARAM( "IsTextMode" ), HANDLE_IS_TEXT_MODE , &::getBooleanCppuType(), PROPERTY_NONE, 0}, + { RTL_CONSTASCII_STRINGPARAM( "GreekCharStyle" ), HANDLE_GREEK_CHAR_STYLE, &::getCppuType((const sal_Int16*)0), PROPERTY_NONE, 0}, { RTL_CONSTASCII_STRINGPARAM( "LeftMargin" ), HANDLE_LEFT_MARGIN , &::getCppuType((const sal_Int16*)0), PROPERTY_NONE, DIS_LEFTSPACE }, { RTL_CONSTASCII_STRINGPARAM( "PrinterName" ), HANDLE_PRINTER_NAME , &::getCppuType((const OUString*)0), PROPERTY_NONE, 0 }, { RTL_CONSTASCII_STRINGPARAM( "PrinterSetup" ), HANDLE_PRINTER_SETUP , &::getCppuType((const Sequence < sal_Int8 >*)0), PROPERTY_NONE, 0 }, @@ -593,6 +595,16 @@ void SmModel::_setPropertyValues(const PropertyMapEntry** ppEntries, const Any* } break; + case HANDLE_GREEK_CHAR_STYLE : + { + sal_Int16 nVal = 0; + *pValues >>= nVal; + if (nVal < 0 || nVal > 2) + throw IllegalArgumentException(); + aFormat.SetGreekCharStyle( nVal ); + } + break; + case HANDLE_ALIGNMENT : { // SmHorAlign uses the same values as HorizontalAlignment @@ -824,6 +836,10 @@ void SmModel::_getPropertyValues( const PropertyMapEntry **ppEntries, Any *pValu } break; + case HANDLE_GREEK_CHAR_STYLE : + *pValue <<= (sal_Int16)aFormat.GetGreekCharStyle(); + break; + case HANDLE_ALIGNMENT : // SmHorAlign uses the same values as HorizontalAlignment *pValue <<= (sal_Int16)aFormat.GetHorAlign(); diff --git a/starmath/source/utility.cxx b/starmath/source/utility.cxx index 0000bf5cf766..ff62e1631265 100644 --- a/starmath/source/utility.cxx +++ b/starmath/source/utility.cxx @@ -45,6 +45,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 diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx index 886d409931b2..20c235408013 100644..100755 --- a/starmath/source/view.cxx +++ b/starmath/source/view.cxx @@ -749,7 +749,7 @@ SFX_IMPL_INTERFACE(SmViewShell, SfxViewShell, SmResId(0)) } -SFX_IMPL_VIEWFACTORY(SmViewShell, SmResId(RID_VIEWNAME)) +SFX_IMPL_NAMED_VIEWFACTORY(SmViewShell, "Default") { SFX_VIEW_REGISTRATION(SmDocShell); } @@ -1545,14 +1545,13 @@ void SmViewShell::Execute(SfxRequest& rReq) case SID_INSERTTEXT: { const SfxStringItem& rItem = - (const SfxStringItem&)rReq.GetArgs()->Get(SID_INSERTTEXT); - + (const SfxStringItem&)rReq.GetArgs()->Get(SID_INSERTTEXT); if (pWin) pWin->InsertText(rItem.GetValue()); break; } - case SID_INSERT_FORMULA: + case SID_IMPORT_FORMULA: { delete pImpl->pRequest; pImpl->pRequest = new SfxRequest( rReq ); diff --git a/starmath/uiconfig/smath/menubar/menubar.xml b/starmath/uiconfig/smath/menubar/menubar.xml index 63bf72c0cf62..7c82d733fa70 100644..100755 --- a/starmath/uiconfig/smath/menubar/menubar.xml +++ b/starmath/uiconfig/smath/menubar/menubar.xml @@ -83,7 +83,7 @@ <menu:menu menu:id=".uno:ToolsMenu"> <menu:menupopup> <menu:menuitem menu:id=".uno:SymbolCatalogue"/> - <menu:menuitem menu:id=".uno:InsertFormula"/> + <menu:menuitem menu:id=".uno:ImportFormula"/> <menu:menuseparator/> <menu:menu menu:id=".uno:MacrosMenu"> <menu:menupopup> diff --git a/starmath/util/makefile.mk b/starmath/util/makefile.mk index 1ba52411d721..08f673452f3c 100644 --- a/starmath/util/makefile.mk +++ b/starmath/util/makefile.mk @@ -112,3 +112,17 @@ SHL1RES= $(RCTARGET) .INCLUDE : target.mk + +ALLTAR : $(MISC)/sm.component $(MISC)/smd.component + +$(MISC)/sm.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + sm.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt sm.component + +$(MISC)/smd.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + smd.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL2TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt smd.component diff --git a/starmath/util/sm.component b/starmath/util/sm.component new file mode 100644 index 000000000000..8047662e2915 --- /dev/null +++ b/starmath/util/sm.component @@ -0,0 +1,61 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!--********************************************************************** +* +* 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. +* +**********************************************************************--> + +<component loader="com.sun.star.loader.SharedLibrary" + xmlns="http://openoffice.org/2010/uno-components"> + <implementation name="com.sun.star.comp.Math.FormulaDocument"> + <service name="com.sun.star.formula.FormulaProperties"/> + </implementation> + <implementation name="com.sun.star.comp.Math.XMLContentExporter"> + <service name="com.sun.star.xml.XMLExportFilter"/> + </implementation> + <implementation name="com.sun.star.comp.Math.XMLExporter"> + <service name="com.sun.star.xml.XMLExportFilter"/> + </implementation> + <implementation name="com.sun.star.comp.Math.XMLImporter"> + <service name="com.sun.star.xml.XMLImportFilter"/> + </implementation> + <implementation name="com.sun.star.comp.Math.XMLMetaExporter"> + <service name="com.sun.star.xml.XMLExportFilter"/> + </implementation> + <implementation name="com.sun.star.comp.Math.XMLOasisMetaExporter"> + <service name="com.sun.star.xml.XMLExportFilter"/> + </implementation> + <implementation name="com.sun.star.comp.Math.XMLOasisMetaImporter"> + <service name="com.sun.star.xml.XMLImportFilter"/> + </implementation> + <implementation name="com.sun.star.comp.Math.XMLOasisSettingsExporter"> + <service name="com.sun.star.xml.XMLExportFilter"/> + </implementation> + <implementation name="com.sun.star.comp.Math.XMLOasisSettingsImporter"> + <service name="com.sun.star.xml.XMLImportFilter"/> + </implementation> + <implementation name="com.sun.star.comp.Math.XMLSettingsExporter"> + <service name="com.sun.star.xml.XMLExportFilter"/> + </implementation> +</component> diff --git a/starmath/util/smd.component b/starmath/util/smd.component new file mode 100644 index 000000000000..9f566864482e --- /dev/null +++ b/starmath/util/smd.component @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!--********************************************************************** +* +* 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. +* +**********************************************************************--> + +<component loader="com.sun.star.loader.SharedLibrary" + xmlns="http://openoffice.org/2010/uno-components"> + <implementation name="com.sun.star.comp.math.FormatDetector"> + <service name="com.sun.star.frame.ExtendedTypeDetection"/> + </implementation> +</component> diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index 10befb703b96..1e26b0f0e2bd 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -79,6 +79,9 @@ class SwList; #include "comphelper/implementationreference.hxx" #include <com/sun/star/chart2/data/XDataProvider.hpp> #include <com/sun/star/linguistic2/XProofreadingIterator.hpp> +#ifdef FUTURE_VBA +#include <com/sun/star/script/vba/XVBAEventProcessor.hpp> +#endif #include <hash_map> #include <stringhash.hxx> @@ -405,7 +408,9 @@ class SW_DLLPUBLIC SwDoc : // table of forbidden characters of this document vos::ORef<SvxForbiddenCharactersTable> xForbiddenCharsTable; - +#ifdef FUTURE_VBA + com::sun::star::uno::Reference< com::sun::star::script::vba::XVBAEventProcessor > mxVbaEvents; +#endif // --> OD 2007-10-26 #i83479# public: struct lessThanNodeNum @@ -2128,7 +2133,9 @@ public: { return n32DummyCompatabilityOptions2; } - +#ifdef FUTURE_VBA + com::sun::star::uno::Reference< com::sun::star::script::vba::XVBAEventProcessor > GetVbaEventProcessor(); +#endif ::sfx2::IXmlIdRegistry& GetXmlIdRegistry(); ::sw::MetaFieldManager & GetMetaFieldManager(); SfxObjectShell* CreateCopy(bool bCallInitNew) const; diff --git a/sw/inc/pch/precompiled_sw.hxx b/sw/inc/pch/precompiled_sw.hxx index 620fe0b00b63..39eb365b549c 100644 --- a/sw/inc/pch/precompiled_sw.hxx +++ b/sw/inc/pch/precompiled_sw.hxx @@ -921,7 +921,6 @@ #include "vcl/help.hxx" #include "vcl/image.hxx" #include "vcl/imagebtn.hxx" -#include "vcl/imgcons.hxx" #include "vcl/inputctx.hxx" #include "vcl/jobset.hxx" #include "vcl/keycod.hxx" diff --git a/sw/inc/undobj.hxx b/sw/inc/undobj.hxx index cf92a707e40f..7f16e4e4d44c 100644 --- a/sw/inc/undobj.hxx +++ b/sw/inc/undobj.hxx @@ -27,9 +27,7 @@ #ifndef SW_UNDOBJ_HXX #define SW_UNDOBJ_HXX -// --> OD 2006-11-01 #130889# #include <vector> -// <-- #include <memory> #include <boost/shared_ptr.hpp> @@ -1718,7 +1716,7 @@ public: struct _UndoTransliterate_Data; class SwUndoTransliterate : public SwUndo, public SwUndRng { - _UndoTransliterate_Data *pData, *pLastData; + std::vector< _UndoTransliterate_Data * > aChanges; sal_uInt32 nType; public: @@ -1732,7 +1730,7 @@ public: void AddChanges( SwTxtNode& rTNd, xub_StrLen nStart, xub_StrLen nLen, ::com::sun::star::uno::Sequence <sal_Int32>& rOffsets ); - BOOL HasData() const {return 0 != pData; } + BOOL HasData() const { return aChanges.size() > 0; } }; //-------------------------------------------------------------------- diff --git a/sw/prj/d.lst b/sw/prj/d.lst index d7e75a09564e..0cb261c5f0f1 100644 --- a/sw/prj/d.lst +++ b/sw/prj/d.lst @@ -36,6 +36,7 @@ mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swreport\statusbar ..\%__SRC%\bin\vbaswobj*.dll %_DEST%\bin%_EXT%\vbaswobj*.dll ..\%__SRC%\bin\sw*.res %_DEST%\bin%_EXT%\sw*.res ..\%__SRC%\lib\lib*.* %_DEST%\lib%_EXT%\lib*.* +..\%__SRC%\misc\swd.component %_DEST%\xml%_EXT%\swd.component ..\uiconfig\swriter\menubar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\swriter\menubar\*.xml ..\uiconfig\swxform\menubar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\swxform\menubar\*.xml @@ -57,3 +58,5 @@ mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swreport\statusbar ..\uiconfig\swreport\statusbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\swreport\statusbar\*.xml ..\%__SRC%\bin\*-layout.zip %_DEST%\pck%_EXT%\*.* +..\%__SRC%\misc\sw.component %_DEST%\xml%_EXT%\sw.component +..\%__SRC%\misc\vbaswobj.component %_DEST%\xml%_EXT%\vbaswobj.component diff --git a/sw/source/core/attr/cellatr.cxx b/sw/source/core/attr/cellatr.cxx index 8032d3506a27..f492696ef8ac 100644 --- a/sw/source/core/attr/cellatr.cxx +++ b/sw/source/core/attr/cellatr.cxx @@ -28,9 +28,10 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" +#include <float.h> +#include <rtl/math.hxx> -#include <float.h> #include <hintids.hxx> // fuer RES_.. #include <cellatr.hxx> #include <calc.hxx> @@ -249,8 +250,12 @@ SwTblBoxValue::SwTblBoxValue( const double nVal ) int SwTblBoxValue::operator==( const SfxPoolItem& rAttr ) const { - ASSERT( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" ); - return nValue == ((SwTblBoxValue&)rAttr).nValue; + ASSERT(SfxPoolItem::operator==(rAttr), "SwTblBoxValue: item not equal"); + SwTblBoxValue const& rOther( static_cast<SwTblBoxValue const&>(rAttr) ); + // items with NaN should be equal to enable pooling + return ::rtl::math::isNan(nValue) + ? ::rtl::math::isNan(rOther.nValue) + : (nValue == rOther.nValue); } diff --git a/sw/source/core/doc/acmplwrd.cxx b/sw/source/core/doc/acmplwrd.cxx index dca350cab72a..5431de73cd6a 100644 --- a/sw/source/core/doc/acmplwrd.cxx +++ b/sw/source/core/doc/acmplwrd.cxx @@ -29,6 +29,7 @@ #include "precompiled_sw.hxx" +#include <tools/urlobj.hxx> #include <hintids.hxx> #include <hints.hxx> #include <unotools/transliterationwrapper.hxx> diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index f1ae3e241b1b..2df835f06c12 100755..100644 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -119,6 +119,9 @@ #include <osl/diagnose.h> #include <osl/interlck.h> +#ifdef FUTURE_VBA +#include <vbahelper/vbaaccesshelper.hxx> +#endif /* @@@MAINTAINABILITY-HORROR@@@ Probably unwanted dependency on SwDocShell @@ -1182,7 +1185,7 @@ static void lcl_FormatPostIt( pIDCO->SplitNode( *aPam.GetPoint(), false ); aStr = pField->GetPar2(); -#if defined( WIN ) || defined( WNT ) || defined( PM2 ) +#if defined( WNT ) || defined( PM2 ) // Bei Windows und Co alle CR rausschmeissen aStr.EraseAllChars( '\r' ); #endif @@ -1711,16 +1714,22 @@ sal_uInt16 SwDoc::GetPageCount() const const Size SwDoc::GetPageSize( sal_uInt16 nPageNum, bool bSkipEmptyPages ) const { Size aSize; - if( GetRootFrm() && nPageNum ) + if ( GetRootFrm() && nPageNum ) { const SwPageFrm* pPage = static_cast<const SwPageFrm*> (GetRootFrm()->Lower()); - while( --nPageNum && pPage->GetNext() ) + while ( --nPageNum && pPage->GetNext() ) + { pPage = static_cast<const SwPageFrm*>( pPage->GetNext() ); + } - if( !bSkipEmptyPages && pPage->IsEmptyPage() && pPage->GetNext() ) + // switch to next page for an empty page, if empty pages are not skipped + // in order to get a sensible page size for an empty page - e.g. for printing. + if ( !bSkipEmptyPages && pPage->IsEmptyPage() && pPage->GetNext() ) + { pPage = static_cast<const SwPageFrm*>( pPage->GetNext() ); + } aSize = pPage->Frm().SSize(); } @@ -2721,6 +2730,27 @@ void SwDoc::ChkCondColls() } } +#ifdef FUTURE_VBA +uno::Reference< script::vba::XVBAEventProcessor > +SwDoc::GetVbaEventProcessor() +{ + if( !mxVbaEvents.is() && pDocShell && ooo::vba::isAlienWordDoc( *pDocShell ) ) + { + try + { + uno::Reference< frame::XModel > xModel( pDocShell->GetModel(), uno::UNO_SET_THROW ); + uno::Sequence< uno::Any > aArgs(1); + aArgs[0] <<= xModel; + mxVbaEvents.set( ooo::vba::createVBAUnoAPIServiceWithArgs( pDocShell, "com.sun.star.script.vba.VBATextEventProcessor" , aArgs ), uno::UNO_QUERY_THROW ); + } + catch( uno::Exception& ) + { + } + } + return mxVbaEvents; +} +#endif + void SwDoc::setExternalData(::sw::tExternalDataType eType, ::sw::tExternalDataPointer pPayload) { diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx index 31484ac303dd..bdcf8caaff7b 100644 --- a/sw/source/core/doc/docedt.cxx +++ b/sw/source/core/doc/docedt.cxx @@ -38,6 +38,7 @@ #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/i18n/WordType.hdl> #include <unotools/charclass.hxx> +#include <unotools/transliterationwrapper.hxx> #include <fmtanchr.hxx> #include <fmtcntnt.hxx> #include <fmtpdsc.hxx> @@ -72,6 +73,8 @@ #include <unoflatpara.hxx> #include <SwGrammarMarkUp.hxx> +#include <vector> + using ::rtl::OUString; using namespace ::com::sun::star; using namespace ::com::sun::star::linguistic2; @@ -2653,8 +2656,9 @@ bool SwDoc::DelFullPara( SwPaM& rPam ) } -void SwDoc::TransliterateText( const SwPaM& rPaM, - utl::TransliterationWrapper& rTrans ) +void SwDoc::TransliterateText( + const SwPaM& rPaM, + utl::TransliterationWrapper& rTrans ) { SwUndoTransliterate* pUndo; if( DoesUndo() ) @@ -2663,15 +2667,17 @@ void SwDoc::TransliterateText( const SwPaM& rPaM, pUndo = 0; const SwPosition* pStt = rPaM.Start(), - * pEnd = pStt == rPaM.GetPoint() ? rPaM.GetMark() - : rPaM.GetPoint(); - ULONG nSttNd = pStt->nNode.GetIndex(), nEndNd = pEnd->nNode.GetIndex(); + * pEnd = rPaM.End(); + ULONG nSttNd = pStt->nNode.GetIndex(), + nEndNd = pEnd->nNode.GetIndex(); xub_StrLen nSttCnt = pStt->nContent.GetIndex(), nEndCnt = pEnd->nContent.GetIndex(); SwTxtNode* pTNd = pStt->nNode.GetNode().GetTxtNode(); - if( pStt == pEnd && pTNd ) // no region ? + if( pStt == pEnd && pTNd ) // no selection? { + // set current word as 'area of effect' + Boundary aBndry; if( pBreakIt->GetBreakIter().is() ) aBndry = pBreakIt->GetBreakIter()->getWordBoundary( @@ -2687,21 +2693,24 @@ void SwDoc::TransliterateText( const SwPaM& rPaM, } } - if( nSttNd != nEndNd ) + if( nSttNd != nEndNd ) // is more than one text node involved? { + // iterate over all effected text nodes, the first and the last one + // may be incomplete because the selection starts and/or ends there + SwNodeIndex aIdx( pStt->nNode ); if( nSttCnt ) { aIdx++; if( pTNd ) - pTNd->TransliterateText( rTrans, nSttCnt, - pTNd->GetTxt().Len(), pUndo ); + pTNd->TransliterateText( rTrans, nSttCnt, pTNd->GetTxt().Len(), pUndo ); } for( ; aIdx.GetIndex() < nEndNd; aIdx++ ) + { if( 0 != ( pTNd = aIdx.GetNode().GetTxtNode() )) - pTNd->TransliterateText( rTrans, 0, pTNd->GetTxt().Len(), - pUndo ); + pTNd->TransliterateText( rTrans, 0, pTNd->GetTxt().Len(), pUndo ); + } if( nEndCnt && 0 != ( pTNd = pEnd->nNode.GetNode().GetTxtNode() )) pTNd->TransliterateText( rTrans, 0, nEndCnt, pUndo ); @@ -2721,6 +2730,8 @@ void SwDoc::TransliterateText( const SwPaM& rPaM, } SetModified(); } + + #define MAX_REDLINE_COUNT 250 // ----------------------------------------------------------------------------- void SwDoc::checkRedlining(RedlineMode_t& _rReadlineMode) diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx index 2e19d482fc70..766c3ca86377 100644 --- a/sw/source/core/draw/dcontact.cxx +++ b/sw/source/core/draw/dcontact.cxx @@ -1396,6 +1396,37 @@ void SwDrawContact::_Changed( const SdrObject& rObj, DisconnectFromLayout( false ); break; } + case SDRUSERCALL_CHILD_INSERTED : + case SDRUSERCALL_CHILD_REMOVED : + { + // --> AW, OD 2010-09-13 #i113730# + // force layer of controls for group objects containing control objects + if(dynamic_cast< SdrObjGroup* >(maAnchoredDrawObj.DrawObj())) + { + if(::CheckControlLayer(maAnchoredDrawObj.DrawObj())) + { + const IDocumentDrawModelAccess* pIDDMA = static_cast<SwFrmFmt*>(pRegisteredIn)->getIDocumentDrawModelAccess(); + const SdrLayerID aCurrentLayer(maAnchoredDrawObj.DrawObj()->GetLayer()); + const SdrLayerID aControlLayerID(pIDDMA->GetControlsId()); + const SdrLayerID aInvisibleControlLayerID(pIDDMA->GetInvisibleControlsId()); + + if(aCurrentLayer != aControlLayerID && aCurrentLayer != aInvisibleControlLayerID) + { + if ( aCurrentLayer == pIDDMA->GetInvisibleHellId() || + aCurrentLayer == pIDDMA->GetInvisibleHeavenId() ) + { + maAnchoredDrawObj.DrawObj()->SetLayer(aInvisibleControlLayerID); + } + else + { + maAnchoredDrawObj.DrawObj()->SetLayer(aControlLayerID); + } + } + } + } + // fallthrough intended here + // <-- + } case SDRUSERCALL_MOVEONLY: case SDRUSERCALL_RESIZE: case SDRUSERCALL_CHILD_MOVEONLY : @@ -1403,8 +1434,6 @@ void SwDrawContact::_Changed( const SdrObject& rObj, case SDRUSERCALL_CHILD_CHGATTR : case SDRUSERCALL_CHILD_DELETE : case SDRUSERCALL_CHILD_COPY : - case SDRUSERCALL_CHILD_INSERTED : - case SDRUSERCALL_CHILD_REMOVED : { // --> OD 2004-08-04 #i31698# - improvement: // get instance <SwAnchoredDrawObject> only once diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx index d99293071048..c9ab4a591383 100644 --- a/sw/source/core/edit/edlingu.cxx +++ b/sw/source/core/edit/edlingu.cxx @@ -1318,8 +1318,12 @@ void SwEditShell::MoveContinuationPosToEndOfCheckedSentence() void SwEditShell::ApplyChangedSentence(const ::svx::SpellPortions& rNewPortions, bool bRecheck) { + // Note: rNewPortions.size() == 0 is valid and happens when the whole + // sentence got removed in the dialog + ASSERT( pSpellIter, "SpellIter missing" ); - if(pSpellIter) + if(pSpellIter && + pSpellIter->GetLastPortions().size() > 0) // no portions -> no text to be changed { const SpellPortions& rLastPortions = pSpellIter->GetLastPortions(); const SpellContentPositions rLastPositions = pSpellIter->GetLastPositions(); @@ -1330,9 +1334,6 @@ void SwEditShell::ApplyChangedSentence(const ::svx::SpellPortions& rNewPortions, // iterate over the new portions, beginning at the end to take advantage of the previously // saved content positions - if(!rLastPortions.size()) - return; - pDoc->StartUndo( UNDO_OVERWRITE, NULL ); StartAction(); @@ -1344,6 +1345,10 @@ void SwEditShell::ApplyChangedSentence(const ::svx::SpellPortions& rNewPortions, sal_uInt32 nRedlinePortions = lcl_CountRedlines(rLastPortions); if((rLastPortions.size() - nRedlinePortions) == rNewPortions.size()) { + DBG_ASSERT( rNewPortions.size() > 0, "rNewPortions should not be empty here" ); + DBG_ASSERT( rLastPortions.size() > 0, "rLastPortions should not be empty here" ); + DBG_ASSERT( rLastPositions.size() > 0, "rLastPositions should not be empty here" ); + //the simple case: the same number of elements on both sides //each changed element has to be applied to the corresponding source element svx::SpellPortions::const_iterator aCurrentNewPortion = rNewPortions.end(); @@ -1357,8 +1362,17 @@ void SwEditShell::ApplyChangedSentence(const ::svx::SpellPortions& rNewPortions, //jump over redline portions while(aCurrentOldPortion->bIsHidden) { - --aCurrentOldPortion; - --aCurrentOldPosition; + if (aCurrentOldPortion != rLastPortions.begin() && + aCurrentOldPosition != rLastPositions.begin()) + { + --aCurrentOldPortion; + --aCurrentOldPosition; + } + else + { + DBG_ASSERT( 0, "ApplyChangedSentence: iterator positions broken" ); + break; + } } if ( !pCrsr->HasMark() ) pCrsr->SetMark(); @@ -1398,6 +1412,8 @@ void SwEditShell::ApplyChangedSentence(const ::svx::SpellPortions& rNewPortions, } else { + DBG_ASSERT( rLastPositions.size() > 0, "rLastPositions should not be empty here" ); + //select the complete sentence SpellContentPositions::const_iterator aCurrentEndPosition = rLastPositions.end(); --aCurrentEndPosition; diff --git a/sw/source/core/except/errhdl.cxx b/sw/source/core/except/errhdl.cxx index 6a36186eb439..a0bae4d76cf1 100644 --- a/sw/source/core/except/errhdl.cxx +++ b/sw/source/core/except/errhdl.cxx @@ -31,21 +31,12 @@ #include "stdlib.h" -#ifdef WIN -#endif #include <tools/debug.hxx> #include <vcl/svapp.hxx> #include <vcl/sound.hxx> #include <errhdl.hxx> #include <error.h> // fuer die defines von ERR_SW6MSG_ ... -// break into CodeView -#if defined(ZTC) && defined(WIN) -#define CVBREAK asm( 0xCC ); -#endif -#if defined(MSC) && defined(WIN) -#define CVBREAK __asm int 3; -#endif #ifndef CVBREAK #define CVBREAK #endif diff --git a/sw/source/core/fields/fldbas.cxx b/sw/source/core/fields/fldbas.cxx index c47bd63e70ad..e35c27d0464b 100644 --- a/sw/source/core/fields/fldbas.cxx +++ b/sw/source/core/fields/fldbas.cxx @@ -58,9 +58,6 @@ #endif #include <math.h> -#ifdef MAC -#include <stdlib.h> -#endif #include <float.h> using namespace ::com::sun::star; diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx index 4133433702a3..f334ddcaee2f 100644 --- a/sw/source/core/frmedt/feshview.cxx +++ b/sw/source/core/frmedt/feshview.cxx @@ -30,10 +30,6 @@ #include <com/sun/star/embed/EmbedMisc.hpp> #include "hintids.hxx" -#ifdef WIN -#define _FESHVIEW_ONLY_INLINE_NEEDED -#endif - #include <svx/sdrobjectfilter.hxx> #include <svx/svditer.hxx> #include <svx/svdobj.hxx> @@ -603,7 +599,7 @@ bool SwFEShell::IsSelContainsControl() const // if we have one marked object, get the SdrObject and check // whether it contains a control const SdrObject* pSdrObject = pMarkList->GetMark( 0 )->GetMarkedSdrObj(); - bRet = CheckControlLayer( pSdrObject ); + bRet = ::CheckControlLayer( pSdrObject ); } return bRet; } @@ -998,8 +994,14 @@ void SwFEShell::ChangeOpaque( SdrLayerID nLayerId ) SdrObject* pObj = rMrkList.GetMark( i )->GetMarkedSdrObj(); // OD 21.08.2003 #i18447# - no change of layer for controls // or group objects containing controls. - const bool bControlObj = ::CheckControlLayer( pObj ); - //if ( pObj->GetLayer() != nLayerId && pObj->GetLayer() != nControls ) + // --> OD 2010-09-14 #i113730# + // consider that a member of a drawing group has been selected. + const SwContact* pContact = ::GetUserCall( pObj ); + ASSERT( pContact && pContact->GetMaster(), "<SwFEShell::ChangeOpaque(..)> - missing contact or missing master object at contact!" ); + const bool bControlObj = ( pContact && pContact->GetMaster() ) + ? ::CheckControlLayer( pContact->GetMaster() ) + : ::CheckControlLayer( pObj ); + // <-- if ( !bControlObj && pObj->GetLayer() != nLayerId ) { pObj->SetLayer( nLayerId ); diff --git a/sw/source/core/layout/findfrm.cxx b/sw/source/core/layout/findfrm.cxx index 8a1e8fe9ea7a..e52fc31fb0b5 100644 --- a/sw/source/core/layout/findfrm.cxx +++ b/sw/source/core/layout/findfrm.cxx @@ -650,9 +650,11 @@ const SwPageFrm* SwRootFrm::GetPageAtPos( const Point& rPt, const Size* pSize, b { const SwRect& rBoundRect = bExtend ? maPageRects[ nPageIdx++ ] : pPage->Frm(); - if ( !pSize && rBoundRect.IsInside( rPt ) || - pSize && rBoundRect.IsOver( aRect ) ) + if ( (!pSize && rBoundRect.IsInside(rPt)) || + (pSize && rBoundRect.IsOver(aRect)) ) + { pRet = static_cast<const SwPageFrm*>(pPage); + } pPage = pPage->GetNext(); } @@ -1719,8 +1721,8 @@ const SwCellFrm& SwCellFrm::FindStartEndOfRowSpanCell( bool bStart, bool bCurren else { if ( pMasterTable == pTableFrm || - ( bStart && pMasterTable->IsAnFollow( pTableFrm ) || - !bStart && pTableFrm->IsAnFollow( pMasterTable ) ) ) + ( (bStart && pMasterTable->IsAnFollow(pTableFrm)) || + (!bStart && pTableFrm->IsAnFollow(pMasterTable)) ) ) { pRet = pMasterCell; break; diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx index cd590d73ddcc..d69df532682f 100644 --- a/sw/source/core/layout/fly.cxx +++ b/sw/source/core/layout/fly.cxx @@ -51,6 +51,9 @@ #include <layhelp.hxx> #include <ndtxt.hxx> +// --> OD 2010-09-14 #i113730# +#include <svx/svdogrp.hxx> +// <-- // OD 16.04.2003 #i13147# - for <SwFlyFrm::GetContour(..)> #include <ndgrf.hxx> // OD 29.10.2003 #113049# @@ -2250,6 +2253,30 @@ void SwFrm::AppendDrawObj( SwAnchoredObject& _rNewObj ) _rNewObj.ChgAnchorFrm( this ); } + // --> OD 2010-09-14 #i113730# + // Assure the control objects and group objects containing controls are on the control layer + if ( ::CheckControlLayer( _rNewObj.DrawObj() ) ) + { + const IDocumentDrawModelAccess* pIDDMA = GetUpper()->GetFmt()->getIDocumentDrawModelAccess(); + const SdrLayerID aCurrentLayer(_rNewObj.DrawObj()->GetLayer()); + const SdrLayerID aControlLayerID(pIDDMA->GetControlsId()); + const SdrLayerID aInvisibleControlLayerID(pIDDMA->GetInvisibleControlsId()); + + if(aCurrentLayer != aControlLayerID && aCurrentLayer != aInvisibleControlLayerID) + { + if ( aCurrentLayer == pIDDMA->GetInvisibleHellId() || + aCurrentLayer == pIDDMA->GetInvisibleHeavenId() ) + { + _rNewObj.DrawObj()->SetLayer(aInvisibleControlLayerID); + } + else + { + _rNewObj.DrawObj()->SetLayer(aControlLayerID); + } + } + } + // <-- + // no direct positioning needed, but invalidate the drawing object position _rNewObj.InvalidateObjPos(); diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx index b51b2efc0a51..aec3fde909f1 100644 --- a/sw/source/core/layout/layact.cxx +++ b/sw/source/core/layout/layact.cxx @@ -1073,23 +1073,33 @@ BOOL SwLayAction::TurboAction() |* Letzte Aenderung MA 18. Jul. 96 |* |*************************************************************************/ -const SwFrm *lcl_FindFirstInvaLay( const SwFrm *pFrm, long nBottom ) +static bool lcl_IsInvaLay( const SwFrm *pFrm, long nBottom ) +{ + if ( + !pFrm->IsValid() || + (pFrm->IsCompletePaint() && pFrm->Frm().Top() < nBottom) + ) + { + return true; + } + return false; +} + +static const SwFrm *lcl_FindFirstInvaLay( const SwFrm *pFrm, long nBottom ) { ASSERT( pFrm->IsLayoutFrm(), "FindFirstInvaLay, no LayFrm" ); - if ( !pFrm->IsValid() || pFrm->IsCompletePaint() && - pFrm->Frm().Top() < nBottom ) + if (lcl_IsInvaLay(pFrm, nBottom)) return pFrm; pFrm = ((SwLayoutFrm*)pFrm)->Lower(); while ( pFrm ) { if ( pFrm->IsLayoutFrm() ) { - if ( !pFrm->IsValid() || pFrm->IsCompletePaint() && - pFrm->Frm().Top() < nBottom ) + if (lcl_IsInvaLay(pFrm, nBottom)) return pFrm; const SwFrm *pTmp; - if ( 0 != (pTmp = ::lcl_FindFirstInvaLay( pFrm, nBottom )) ) + if ( 0 != (pTmp = lcl_FindFirstInvaLay( pFrm, nBottom )) ) return pTmp; } pFrm = pFrm->GetNext(); @@ -1097,7 +1107,7 @@ const SwFrm *lcl_FindFirstInvaLay( const SwFrm *pFrm, long nBottom ) return 0; } -const SwFrm *lcl_FindFirstInvaCntnt( const SwLayoutFrm *pLay, long nBottom, +static const SwFrm *lcl_FindFirstInvaCntnt( const SwLayoutFrm *pLay, long nBottom, const SwCntntFrm *pFirst ) { const SwCntntFrm *pCnt = pFirst ? pFirst->GetNextCntntFrm() : @@ -1144,7 +1154,7 @@ const SwFrm *lcl_FindFirstInvaCntnt( const SwLayoutFrm *pLay, long nBottom, } // --> OD 2005-02-21 #i37877# - consider drawing objects -const SwAnchoredObject* lcl_FindFirstInvaObj( const SwPageFrm* _pPage, +static const SwAnchoredObject* lcl_FindFirstInvaObj( const SwPageFrm* _pPage, long _nBottom ) { ASSERT( _pPage->GetSortedObjs(), "FindFirstInvaObj, no Objs" ) diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx index b45f1bcb2ceb..01f09f2c41c3 100644 --- a/sw/source/core/layout/pagechg.cxx +++ b/sw/source/core/layout/pagechg.cxx @@ -2358,9 +2358,9 @@ void SwRootFrm::CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* pVi static const long nOuterClickDiff = 1000000; // adjust borders for these special cases: - if ( bFirstColumn && !bRTL || bLastColumn && bRTL ) + if ( (bFirstColumn && !bRTL) || (bLastColumn && bRTL) ) aPageRectWithBorders.SubLeft( nOuterClickDiff ); - if ( bLastColumn && !bRTL || bFirstColumn && bRTL ) + if ( (bLastColumn && !bRTL) || (bFirstColumn && bRTL) ) aPageRectWithBorders.AddRight( nOuterClickDiff ); if ( bFirstRow ) aPageRectWithBorders.SubTop( nOuterClickDiff ); diff --git a/sw/source/core/text/frmform.cxx b/sw/source/core/text/frmform.cxx index be9c84cc88af..f70caa7ea710 100644 --- a/sw/source/core/text/frmform.cxx +++ b/sw/source/core/text/frmform.cxx @@ -81,8 +81,8 @@ void ValidateTxt( SwFrm *pFrm ) // Freund vom Frame { if ( ( ! pFrm->IsVertical() && pFrm->Frm().Width() == pFrm->GetUpper()->Prt().Width() ) || - pFrm->IsVertical() && - pFrm->Frm().Height() == pFrm->GetUpper()->Prt().Height() ) + ( pFrm->IsVertical() && + pFrm->Frm().Height() == pFrm->GetUpper()->Prt().Height() ) ) pFrm->bValidSize = sal_True; /* pFrm->bValidPrtArea = sal_True; diff --git a/sw/source/core/text/itratr.cxx b/sw/source/core/text/itratr.cxx index 60b476839705..36eaed83795c 100644 --- a/sw/source/core/text/itratr.cxx +++ b/sw/source/core/text/itratr.cxx @@ -916,12 +916,20 @@ USHORT SwTxtNode::GetScalingOfSelectedText( xub_StrLen nStt, xub_StrLen nEnd ) while( nStop < nEnd && nStop < nNextChg ) { cChar = m_Text.GetChar( nStop ); - if( CH_TAB == cChar || CH_BREAK == cChar || - CHAR_HARDBLANK == cChar || CHAR_HARDHYPHEN == cChar || + if ( + CH_TAB == cChar || + CH_BREAK == cChar || + CHAR_HARDBLANK == cChar || + CHAR_HARDHYPHEN == cChar || CHAR_SOFTHYPHEN == cChar || - ( CH_TXTATR_BREAKWORD == cChar || CH_TXTATR_INWORD == cChar ) && - ( 0 == ( pHint = aIter.GetAttr( nStop ) ) ) ) + ( + (CH_TXTATR_BREAKWORD == cChar || CH_TXTATR_INWORD == cChar) && + (0 == (pHint = aIter.GetAttr(nStop))) + ) + ) + { break; + } else ++nStop; } diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx index c7527b372554..8ce4f6523ba0 100644 --- a/sw/source/core/text/itrform2.cxx +++ b/sw/source/core/text/itrform2.cxx @@ -335,8 +335,14 @@ void SwTxtFormatter::InsertPortion( SwTxtFormatInfo &rInf, // bei dem LineLayout ist allerdings alles anders... if( pPor == pCurr ) { - if( pCurr->GetPortion() ) + if ( pCurr->GetPortion() ) + { pPor = pCurr->GetPortion(); + } + + // --> OD 2010-07-07 #i112181# + rInf.SetOtherThanFtnInside( rInf.IsOtherThanFtnInside() || !pPor->IsFtnPortion() ); + // <-- } else { @@ -1587,8 +1593,8 @@ xub_StrLen SwTxtFormatter::FormatLine( const xub_StrLen nStartPos ) } else { - bBuild = ( GetInfo().GetTxtFly()->IsOn() && ChkFlyUnderflow( GetInfo() ) - || GetInfo().CheckFtnPortion( pCurr ) ); + bBuild = ( GetInfo().GetTxtFly()->IsOn() && ChkFlyUnderflow(GetInfo()) ) + || GetInfo().CheckFtnPortion(pCurr); if( bBuild ) { GetInfo().SetNumDone( bOldNumDone ); diff --git a/sw/source/core/text/itrpaint.cxx b/sw/source/core/text/itrpaint.cxx index 2bd7a46ac09f..50dbe9fdc451 100644 --- a/sw/source/core/text/itrpaint.cxx +++ b/sw/source/core/text/itrpaint.cxx @@ -495,7 +495,7 @@ void SwTxtPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip, if( ( nDiff > 0 && ( GetEnd() < GetInfo().GetTxt().Len() || ( nDiff > nTmpHeight/2 && GetPrevLine() ) ) ) || - nDiff >= 0 && bNextUndersized ) + (nDiff >= 0 && bNextUndersized) ) { SwArrowPortion aArrow( GetInfo() ); diff --git a/sw/source/core/text/txtfly.cxx b/sw/source/core/text/txtfly.cxx index db245de1e28b..df915fc7192b 100644 --- a/sw/source/core/text/txtfly.cxx +++ b/sw/source/core/text/txtfly.cxx @@ -2027,10 +2027,10 @@ sal_Bool SwTxtFly::ForEach( const SwRect &rRect, SwRect* pRect, sal_Bool bAvoid // <-- if( aFly.IsEmpty() || !aFly.IsOver( rRect ) ) continue; - if( !bRet || + if( !bRet || ( ( !pCurrFrm->IsRightToLeft() && ( (aFly.*fnRect->fnGetLeft)() < - (pRect->*fnRect->fnGetLeft)() ) || + (pRect->*fnRect->fnGetLeft)() ) ) || ( pCurrFrm->IsRightToLeft() && ( (aFly.*fnRect->fnGetRight)() > (pRect->*fnRect->fnGetRight)() ) ) ) ) diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx index ff79d2266ba7..77b969433ed7 100644 --- a/sw/source/core/txtnode/fntcache.cxx +++ b/sw/source/core/txtnode/fntcache.cxx @@ -538,7 +538,7 @@ void SwFntObj::CreateScrFont( const ViewShell& rSh, const OutputDevice& rOut ) void SwFntObj::GuessLeading( const ViewShell& -#if defined(WNT) || defined(WIN) || defined(PM2) +#if defined(WNT) || defined(PM2) rSh #endif , const FontMetric& rMet ) @@ -551,7 +551,7 @@ void SwFntObj::GuessLeading( const ViewShell& return; } -#if defined(WNT) || defined(WIN) || defined(PM2) +#if defined(WNT) || defined(PM2) OutputDevice *pWin = rSh.GetWin() ? rSh.GetWin() : GetpApp()->GetDefaultDevice(); diff --git a/sw/source/core/txtnode/swfont.cxx b/sw/source/core/txtnode/swfont.cxx index 49e111e9053f..02c21242a220 100644 --- a/sw/source/core/txtnode/swfont.cxx +++ b/sw/source/core/txtnode/swfont.cxx @@ -77,11 +77,11 @@ #include <txtfrm.hxx> // SwTxtFrm #include <scriptinfo.hxx> -#if defined(WIN) || defined(WNT) || defined(PM2) +#if defined(WNT) || defined(PM2) #define FNT_LEADING_HACK #endif -#if defined(WIN) || defined(WNT) +#if defined(WNT) #define FNT_ATM_HACK #endif diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx index 944eb70b2c3d..0630dbd722b6 100644 --- a/sw/source/core/txtnode/txtedt.cxx +++ b/sw/source/core/txtnode/txtedt.cxx @@ -36,6 +36,7 @@ #include <time.h> // clock() #include <tools/stream.hxx> #endif + #include <hintids.hxx> #include <vcl/svapp.hxx> #include <svl/itemiter.hxx> @@ -46,9 +47,6 @@ #include <editeng/hangulhanja.hxx> #include <SwSmartTagMgr.hxx> #include <linguistic/lngprops.hxx> -#include <com/sun/star/beans/XPropertySet.hpp> -#include <com/sun/star/i18n/WordType.hdl> -#include <com/sun/star/i18n/ScriptType.hdl> #include <unotools/transliterationwrapper.hxx> #include <unotools/charclass.hxx> #include <dlelstnr.hxx> @@ -86,6 +84,15 @@ #include <unomid.h> +#include <com/sun/star/beans/XPropertySet.hpp> +#include <com/sun/star/i18n/WordType.hdl> +#include <com/sun/star/i18n/ScriptType.hdl> +#include <com/sun/star/i18n/TransliterationModules.hpp> +#include <com/sun/star/i18n/TransliterationModulesExtra.hpp> + +#include <vector> + + using rtl::OUString; using namespace ::com::sun::star; using namespace ::com::sun::star::frame; @@ -1578,49 +1585,247 @@ void SwLinguStatistik::Flush() #endif + +struct TransliterationChgData +{ + xub_StrLen nStart; + xub_StrLen nLen; + String sChanged; + Sequence< sal_Int32 > aOffsets; +}; + // change text to Upper/Lower/Hiragana/Katagana/... -void SwTxtNode::TransliterateText( utl::TransliterationWrapper& rTrans, - xub_StrLen nStt, xub_StrLen nEnd, SwUndoTransliterate* pUndo ) +void SwTxtNode::TransliterateText( + utl::TransliterationWrapper& rTrans, + xub_StrLen nStt, xub_StrLen nEnd, + SwUndoTransliterate* pUndo ) { - if( nStt < nEnd ) + if (nStt < nEnd && pBreakIt->GetBreakIter().is()) { - SwLanguageIterator* pIter; - if( rTrans.needLanguageForTheMode() ) - pIter = new SwLanguageIterator( *this, nStt ); - else - pIter = 0; + // since we don't use Hiragana/Katakana or half-width/full-width transliterations here + // it is fine to use ANYWORD_IGNOREWHITESPACES. (ANY_WORD btw is broken and will + // occasionaly miss words in consecutive sentences). Also with ANYWORD_IGNOREWHITESPACES + // text like 'just-in-time' will be converted to 'Just-In-Time' which seems to be the + // proper thing to do. + const sal_Int16 nWordType = WordType::ANYWORD_IGNOREWHITESPACES; + + //! In order to have less trouble with changing text size, e.g. because + //! of ligatures or � (German small sz) being resolved, we need to process + //! the text replacements from end to start. + //! This way the offsets for the yet to be changed words will be + //! left unchanged by the already replaced text. + //! For this we temporarily save the changes to be done in this vector + std::vector< TransliterationChgData > aChanges; + TransliterationChgData aChgData; + + if (rTrans.getType() == (sal_uInt32)TransliterationModulesExtra::TITLE_CASE) + { + // for 'capitalize every word' we need to iterate over each word + + Boundary aSttBndry; + Boundary aEndBndry; + aSttBndry = pBreakIt->GetBreakIter()->getWordBoundary( + GetTxt(), nStt, + pBreakIt->GetLocale( GetLang( nStt ) ), + nWordType, + TRUE /*prefer forward direction*/); + aEndBndry = pBreakIt->GetBreakIter()->getWordBoundary( + GetTxt(), nEnd, + pBreakIt->GetLocale( GetLang( nEnd ) ), + nWordType, + FALSE /*prefer backward direction*/); + + // prevent backtracking to the previous word if selection is at word boundary + if (aSttBndry.endPos <= nStt) + { + aSttBndry = pBreakIt->GetBreakIter()->nextWord( + GetTxt(), aSttBndry.endPos, + pBreakIt->GetLocale( GetLang( aSttBndry.endPos ) ), + nWordType); + } + // prevent advancing to the next word if selection is at word boundary + if (aEndBndry.startPos >= nEnd) + { + aEndBndry = pBreakIt->GetBreakIter()->previousWord( + GetTxt(), aEndBndry.startPos, + pBreakIt->GetLocale( GetLang( aEndBndry.startPos ) ), + nWordType); + } - xub_StrLen nEndPos; - sal_uInt16 nLang; - do { - if( pIter ) + Boundary aCurWordBndry( aSttBndry ); + while (aCurWordBndry.startPos <= aEndBndry.startPos) { - nLang = pIter->GetLanguage(); - nEndPos = pIter->GetChgPos(); - if( nEndPos > nEnd ) - nEndPos = nEnd; + nStt = (xub_StrLen)aCurWordBndry.startPos; + nEnd = (xub_StrLen)aCurWordBndry.endPos; + sal_Int32 nLen = nEnd - nStt; + DBG_ASSERT( nLen > 0, "invalid word length of 0" ); +#if OSL_DEBUG_LEVEL > 1 + String aText( GetTxt().Copy( nStt, nLen ) ); +#endif + + Sequence <sal_Int32> aOffsets; + String sChgd( rTrans.transliterate( GetTxt(), GetLang( nStt ), nStt, nLen, &aOffsets )); + + if (!m_Text.Equals( sChgd, nStt, nLen )) + { + aChgData.nStart = nStt; + aChgData.nLen = nLen; + aChgData.sChanged = sChgd; + aChgData.aOffsets = aOffsets; + aChanges.push_back( aChgData ); + } + + aCurWordBndry = pBreakIt->GetBreakIter()->nextWord( + GetTxt(), nEnd, + pBreakIt->GetLocale( GetLang( nEnd ) ), + nWordType); } - else + } + else if (rTrans.getType() == (sal_uInt32)TransliterationModulesExtra::SENTENCE_CASE) + { + // for 'sentence case' we need to iterate sentence by sentence + + sal_Int32 nLastStart = pBreakIt->GetBreakIter()->beginOfSentence( + GetTxt(), nEnd, + pBreakIt->GetLocale( GetLang( nEnd ) ) ); + sal_Int32 nLastEnd = pBreakIt->GetBreakIter()->endOfSentence( + GetTxt(), nLastStart, + pBreakIt->GetLocale( GetLang( nLastStart ) ) ); + + // extend nStt, nEnd to the current sentence boundaries + sal_Int32 nCurrentStart = pBreakIt->GetBreakIter()->beginOfSentence( + GetTxt(), nStt, + pBreakIt->GetLocale( GetLang( nStt ) ) ); + sal_Int32 nCurrentEnd = pBreakIt->GetBreakIter()->endOfSentence( + GetTxt(), nCurrentStart, + pBreakIt->GetLocale( GetLang( nCurrentStart ) ) ); + + // prevent backtracking to the previous sentence if selection starts at end of a sentence + if (nCurrentEnd <= nStt) + { + // now nCurrentStart is probably located on a non-letter word. (unless we + // are in Asian text with no spaces...) + // Thus to get the real sentence start we should locate the next real word, + // that is one found by DICTIONARY_WORD + i18n::Boundary aBndry = pBreakIt->GetBreakIter()->nextWord( + GetTxt(), nCurrentEnd, + pBreakIt->GetLocale( GetLang( nCurrentEnd ) ), + i18n::WordType::DICTIONARY_WORD); + + // now get new current sentence boundaries + nCurrentStart = pBreakIt->GetBreakIter()->beginOfSentence( + GetTxt(), aBndry.startPos, + pBreakIt->GetLocale( GetLang( aBndry.startPos) ) ); + nCurrentEnd = pBreakIt->GetBreakIter()->endOfSentence( + GetTxt(), nCurrentStart, + pBreakIt->GetLocale( GetLang( nCurrentStart) ) ); + } + // prevent advancing to the next sentence if selection ends at start of a sentence + if (nLastStart >= nEnd) { - nLang = LANGUAGE_SYSTEM; - nEndPos = nEnd; + // now nCurrentStart is probably located on a non-letter word. (unless we + // are in Asian text with no spaces...) + // Thus to get the real sentence start we should locate the previous real word, + // that is one found by DICTIONARY_WORD + i18n::Boundary aBndry = pBreakIt->GetBreakIter()->previousWord( + GetTxt(), nLastStart, + pBreakIt->GetLocale( GetLang( nLastStart) ), + i18n::WordType::DICTIONARY_WORD); + nLastEnd = pBreakIt->GetBreakIter()->endOfSentence( + GetTxt(), aBndry.startPos, + pBreakIt->GetLocale( GetLang( aBndry.startPos) ) ); + if (nCurrentEnd > nLastEnd) + nCurrentEnd = nLastEnd; } - xub_StrLen nLen = nEndPos - nStt; - Sequence <sal_Int32> aOffsets; - String sChgd( rTrans.transliterate( m_Text, nLang, nStt, nLen, - &aOffsets )); - if( !m_Text.Equals( sChgd, nStt, nLen ) ) + while (nCurrentStart < nLastEnd) { - if ( pUndo ) + sal_Int32 nLen = nCurrentEnd - nCurrentStart; + DBG_ASSERT( nLen > 0, "invalid word length of 0" ); +#if OSL_DEBUG_LEVEL > 1 + String aText( GetTxt().Copy( nCurrentStart, nLen ) ); +#endif + + Sequence <sal_Int32> aOffsets; + String sChgd( rTrans.transliterate( GetTxt(), + GetLang( nCurrentStart ), nCurrentStart, nLen, &aOffsets )); + + if (!m_Text.Equals( sChgd, nStt, nLen )) { - pUndo->AddChanges( *this, nStt, nLen, aOffsets ); + aChgData.nStart = nCurrentStart; + aChgData.nLen = nLen; + aChgData.sChanged = sChgd; + aChgData.aOffsets = aOffsets; + aChanges.push_back( aChgData ); } - ReplaceTextOnly( nStt, nLen, sChgd, aOffsets ); + + Boundary aFirstWordBndry; + aFirstWordBndry = pBreakIt->GetBreakIter()->nextWord( + GetTxt(), nCurrentEnd, + pBreakIt->GetLocale( GetLang( nCurrentEnd ) ), + nWordType); + nCurrentStart = aFirstWordBndry.startPos; + nCurrentEnd = pBreakIt->GetBreakIter()->endOfSentence( + GetTxt(), nCurrentStart, + pBreakIt->GetLocale( GetLang( nCurrentStart ) ) ); } - nStt = nEndPos; - } while( nEndPos < nEnd && pIter && pIter->Next() ); - delete pIter; + } + else + { + // here we may transliterate over complete language portions... + + SwLanguageIterator* pIter; + if( rTrans.needLanguageForTheMode() ) + pIter = new SwLanguageIterator( *this, nStt ); + else + pIter = 0; + + xub_StrLen nEndPos; + sal_uInt16 nLang; + do { + if( pIter ) + { + nLang = pIter->GetLanguage(); + nEndPos = pIter->GetChgPos(); + if( nEndPos > nEnd ) + nEndPos = nEnd; + } + else + { + nLang = LANGUAGE_SYSTEM; + nEndPos = nEnd; + } + xub_StrLen nLen = nEndPos - nStt; + + Sequence <sal_Int32> aOffsets; + String sChgd( rTrans.transliterate( m_Text, nLang, nStt, nLen, &aOffsets )); + + if (!m_Text.Equals( sChgd, nStt, nLen )) + { + aChgData.nStart = nStt; + aChgData.nLen = nLen; + aChgData.sChanged = sChgd; + aChgData.aOffsets = aOffsets; + aChanges.push_back( aChgData ); + } + + nStt = nEndPos; + } while( nEndPos < nEnd && pIter && pIter->Next() ); + delete pIter; + } + + if (aChanges.size() > 0) + { + // now apply the changes from end to start to leave the offsets of the + // yet unchanged text parts remain the same. + for (size_t i = 0; i < aChanges.size(); ++i) + { + TransliterationChgData &rData = aChanges[ aChanges.size() - 1 - i ]; + if (pUndo) + pUndo->AddChanges( *this, rData.nStart, rData.nLen, rData.aOffsets ); + ReplaceTextOnly( rData.nStart, rData.nLen, rData.sChanged, rData.aOffsets ); + } + } } } diff --git a/sw/source/core/undo/makefile.mk b/sw/source/core/undo/makefile.mk index d6e6766a0fd4..c381761adba1 100644 --- a/sw/source/core/undo/makefile.mk +++ b/sw/source/core/undo/makefile.mk @@ -49,6 +49,7 @@ EXCEPTIONSFILES = \ $(SLO)$/unattr.obj \ $(SLO)$/undobj.obj \ $(SLO)$/undraw.obj \ + $(SLO)$/unovwr.obj \ $(SLO)$/untbl.obj SLOFILES = \ diff --git a/sw/source/core/undo/unovwr.cxx b/sw/source/core/undo/unovwr.cxx index 8254d431b079..91549c84a57e 100644 --- a/sw/source/core/undo/unovwr.cxx +++ b/sw/source/core/undo/unovwr.cxx @@ -352,16 +352,14 @@ SwRewriter SwUndoOverwrite::GetRewriter() const struct _UndoTransliterate_Data { - String sText; - _UndoTransliterate_Data* pNext; - SwHistory* pHistory; - Sequence <sal_Int32>* pOffsets; - ULONG nNdIdx; - xub_StrLen nStart, nLen; - - _UndoTransliterate_Data( ULONG nNd, xub_StrLen nStt, xub_StrLen nStrLen, - const String& rTxt ) - : sText( rTxt ), pNext( 0 ), pHistory( 0 ), pOffsets( 0 ), + String sText; + SwHistory* pHistory; + Sequence< sal_Int32 >* pOffsets; + ULONG nNdIdx; + xub_StrLen nStart, nLen; + + _UndoTransliterate_Data( ULONG nNd, xub_StrLen nStt, xub_StrLen nStrLen, const String& rTxt ) + : sText( rTxt ), pHistory( 0 ), pOffsets( 0 ), nNdIdx( nNd ), nStart( nStt ), nLen( nStrLen ) {} ~_UndoTransliterate_Data() { delete pOffsets; delete pHistory; } @@ -369,22 +367,17 @@ struct _UndoTransliterate_Data void SetChangeAtNode( SwDoc& rDoc ); }; -SwUndoTransliterate::SwUndoTransliterate( const SwPaM& rPam, - const utl::TransliterationWrapper& rTrans ) - : SwUndo( UNDO_TRANSLITERATE ), SwUndRng( rPam ), - pData( 0 ), pLastData( 0 ), nType( rTrans.getType() ) +SwUndoTransliterate::SwUndoTransliterate( + const SwPaM& rPam, + const utl::TransliterationWrapper& rTrans ) + : SwUndo( UNDO_TRANSLITERATE ), SwUndRng( rPam ), nType( rTrans.getType() ) { } SwUndoTransliterate::~SwUndoTransliterate() { - _UndoTransliterate_Data* pD = pData; - while( pD ) - { - pData = pD; - pD = pD->pNext; - delete pData; - } + for (size_t i = 0; i < aChanges.size(); ++i) + delete aChanges[i]; } void SwUndoTransliterate::Undo( SwUndoIter& rUndoIter ) @@ -393,8 +386,12 @@ void SwUndoTransliterate::Undo( SwUndoIter& rUndoIter ) BOOL bUndo = rDoc.DoesUndo(); rDoc.DoUndo( FALSE ); - for( _UndoTransliterate_Data* pD = pData; pD; pD = pD->pNext ) - pD->SetChangeAtNode( rDoc ); + // since the changes were added to the vector from the end of the string/node towards + // the start, we need to revert them from the start towards the end now to keep the + // offset information of the undo data in sync with the changing text. + // Thus we need to iterate from the end of the vector to the start + for (sal_Int32 i = aChanges.size() - 1; i >= 0; --i) + aChanges[i]->SetChangeAtNode( rDoc ); rDoc.DoUndo( bUndo ); SetPaM( rUndoIter, TRUE ); @@ -413,8 +410,7 @@ void SwUndoTransliterate::Repeat( SwUndoIter& rUndoIter ) SwPaM& rPam = *rUndoIter.pAktPam; SwDoc& rDoc = rUndoIter.GetDoc(); - utl::TransliterationWrapper aTrans( - ::comphelper::getProcessServiceFactory(), nType ); + utl::TransliterationWrapper aTrans( ::comphelper::getProcessServiceFactory(), nType ); rDoc.TransliterateText( rPam, aTrans ); rUndoIter.pLastUndoObj = this; @@ -428,67 +424,63 @@ void SwUndoTransliterate::AddChanges( SwTxtNode& rTNd, _UndoTransliterate_Data* pNew = new _UndoTransliterate_Data( rTNd.GetIndex(), nStart, (xub_StrLen)nOffsLen, rTNd.GetTxt().Copy( nStart, nLen )); - if( pData ) - pLastData->pNext = pNew; - else - pData = pNew; - pLastData = pNew; + + aChanges.push_back( pNew ); const sal_Int32* pOffsets = rOffsets.getConstArray(); // where did we need less memory ? const sal_Int32* p = pOffsets; for( long n = 0; n < nOffsLen; ++n, ++p ) - if( *p != ( nStart + n )) + if( *p != ( nStart + n )) + { + // create the Offset array + pNew->pOffsets = new Sequence <sal_Int32> ( nLen ); + sal_Int32* pIdx = pNew->pOffsets->getArray(); + p = pOffsets; + long nMyOff, nNewVal = nStart; + for( n = 0, nMyOff = nStart; n < nOffsLen; ++p, ++n, ++nMyOff ) { - // create the Offset array - pNew->pOffsets = new Sequence <sal_Int32> ( nLen ); - sal_Int32* pIdx = pNew->pOffsets->getArray(); - p = pOffsets; - long nMyOff, nNewVal = nStart; - for( n = 0, nMyOff = nStart; n < nOffsLen; ++p, ++n, ++nMyOff ) + if( *p < nMyOff ) { - if( *p < nMyOff ) - { - // something is deleted - nMyOff = *p; - *(pIdx-1) = nNewVal++; - } - else if( *p > nMyOff ) - { - for( ; *p > nMyOff; ++nMyOff ) - *pIdx++ = nNewVal; - --nMyOff; - --n; - --p; - } - else - *pIdx++ = nNewVal++; + // something is deleted + nMyOff = *p; + *(pIdx-1) = nNewVal++; } - - // and then we need to save the attributes/bookmarks - // but this data must moved every time to the last in the chain! - _UndoTransliterate_Data* pD = pData; - while( pD != pNew ) + else if( *p > nMyOff ) { - if( pD->nNdIdx == pNew->nNdIdx && pD->pHistory ) - { - // same node and have a history? - pNew->pHistory = pD->pHistory; - pD->pHistory = 0; - break; // more can't exist - } - pD = pD->pNext; + for( ; *p > nMyOff; ++nMyOff ) + *pIdx++ = nNewVal; + --nMyOff; + --n; + --p; } + else + *pIdx++ = nNewVal++; + } - if( !pNew->pHistory ) + // and then we need to save the attributes/bookmarks + // but this data must moved every time to the last in the chain! + for (size_t i = 0; i + 1 < aChanges.size(); ++i) // check all changes but not the current one + { + _UndoTransliterate_Data* pD = aChanges[i]; + if( pD->nNdIdx == pNew->nNdIdx && pD->pHistory ) { - pNew->pHistory = new SwHistory; - SwRegHistory aRHst( rTNd, pNew->pHistory ); - pNew->pHistory->CopyAttr( rTNd.GetpSwpHints(), - pNew->nNdIdx, 0, rTNd.GetTxt().Len(), false ); + // same node and have a history? + pNew->pHistory = pD->pHistory; + pD->pHistory = 0; + break; // more can't exist } - break; } + + if( !pNew->pHistory ) + { + pNew->pHistory = new SwHistory; + SwRegHistory aRHst( rTNd, pNew->pHistory ); + pNew->pHistory->CopyAttr( rTNd.GetpSwpHints(), + pNew->nNdIdx, 0, rTNd.GetTxt().Len(), false ); + } + break; + } } void _UndoTransliterate_Data::SetChangeAtNode( SwDoc& rDoc ) diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index b7098710802b..fdc382ad99d9 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -1009,12 +1009,9 @@ void SwXCell::setFormula(const OUString& rFormula) throw( uno::RuntimeException double SwXCell::getValue(void) throw( uno::RuntimeException ) { vos::OGuard aGuard(Application::GetSolarMutex()); - double fRet = lcl_getValue( *this ); - //lcl_getValue was changed thus it can return nan values, - //so I make this additional nan check here to not change the behaviour - //but maybe it would even be more correct to just return nan here? ... todo? - if( ::rtl::math::isNan( fRet ) ) - fRet = 0.0; + + double const fRet = lcl_getValue( *this ); + // #i112652# a table cell may contain NaN as a value, do not filter that return fRet; } /*-- 11.12.98 10:56:26--------------------------------------------------- diff --git a/sw/source/core/view/printdata.cxx b/sw/source/core/view/printdata.cxx index 39bd4d91290c..d6cbf11b8731 100755..100644 --- a/sw/source/core/view/printdata.cxx +++ b/sw/source/core/view/printdata.cxx @@ -325,22 +325,26 @@ SwPrintUIOptions::SwPrintUIOptions( // create a choice for the content to create rtl::OUString aPrintRangeName( RTL_CONSTASCII_USTRINGPARAM( "PrintContent" ) ); - uno::Sequence< rtl::OUString > aChoices( bHasSelection ? 3 : 2 ); - uno::Sequence< rtl::OUString > aHelpText( bHasSelection ? 3 : 2 ); + uno::Sequence< rtl::OUString > aChoices( 3 ); + uno::Sequence< sal_Bool > aChoicesDisabled( 3 ); + uno::Sequence< rtl::OUString > aHelpText( 3 ); aChoices[0] = aLocalizedStrings.GetString( 38 ); + aChoicesDisabled[0] = sal_False; aHelpText[0] = aLocalizedStrings.GetString( 39 ); aChoices[1] = aLocalizedStrings.GetString( 40 ); + aChoicesDisabled[1] = sal_False; aHelpText[1] = aLocalizedStrings.GetString( 41 ); - if (bHasSelection) - { - aChoices[2] = aLocalizedStrings.GetString( 42 ); - aHelpText[2] = aLocalizedStrings.GetString( 43 ); - } + aChoices[2] = aLocalizedStrings.GetString( 42 ); + aChoicesDisabled[2] = sal_Bool(! bHasSelection); + aHelpText[2] = aLocalizedStrings.GetString( 43 ); m_aUIProperties[nIdx++].Value = getChoiceControlOpt( rtl::OUString(), aHelpText, aPrintRangeName, aChoices, - bHasSelection ? 2 /*enable 'Selection' radio button*/ : 0 /* enable 'All pages' */); + bHasSelection ? 2 /*enable 'Selection' radio button*/ : 0 /* enable 'All pages' */, + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Radio" ) ), + aChoicesDisabled + ); // create a an Edit dependent on "Pages" selected vcl::PrinterOptionsHelper::UIControlOptions aPageRangeOpt( aPrintRangeName, 1, sal_True ); m_aUIProperties[nIdx++].Value = getEditControlOpt( rtl::OUString(), @@ -374,6 +378,7 @@ SwPrintUIOptions::SwPrintUIOptions( aChoices, nPrintPostIts, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "List" ) ), + uno::Sequence< sal_Bool >(), aAnnotOpt ); @@ -441,6 +446,7 @@ SwPrintUIOptions::SwPrintUIOptions( aBRTLChoices, nBRTLChoice, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "List" ) ), + uno::Sequence< sal_Bool >(), aBrochureRTLOpt ); } diff --git a/sw/source/filter/ascii/wrtasc.cxx b/sw/source/filter/ascii/wrtasc.cxx index 5d8b0a19a4d2..92537c7b213b 100644 --- a/sw/source/filter/ascii/wrtasc.cxx +++ b/sw/source/filter/ascii/wrtasc.cxx @@ -69,7 +69,7 @@ SwASCWriter::SwASCWriter( const String& rFltNm ) break; case 'A': -#if !defined(WIN) && !defined(WNT) +#if !defined(WNT) aNewOpts.SetCharSet( RTL_TEXTENCODING_MS_1252 ); aNewOpts.SetParaFlags( LINEEND_CRLF ); #endif diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx index bb1567d978f6..3067de67ce97 100644 --- a/sw/source/filter/html/htmlform.cxx +++ b/sw/source/filter/html/htmlform.cxx @@ -32,7 +32,6 @@ #include <hintids.hxx> #include <vcl/svapp.hxx> #include <vcl/wrkwin.hxx> -#include <vcl/imgcons.hxx> #include <toolkit/helper/vclunohelper.hxx> #include <svtools/htmlkywd.hxx> @@ -68,6 +67,7 @@ #include <com/sun/star/awt/XTextLayoutConstrains.hpp> #include <com/sun/star/awt/XLayoutConstrains.hpp> #include <com/sun/star/awt/XImageConsumer.hpp> +#include <com/sun/star/awt/ImageStatus.hpp> #include <com/sun/star/form/XImageProducerSupplier.hpp> #include <com/sun/star/form/XForm.hpp> #include <doc.hxx> @@ -599,7 +599,7 @@ void SwHTMLImageWatcher::complete( sal_Int32 Status, const uno::Reference< awt::XImageProducer >& ) throw( uno::RuntimeException ) { - if( IMAGEERROR == Status || IMAGEABORTED == Status ) + if( awt::ImageStatus::IMAGESTATUS_ERROR == Status || awt::ImageStatus::IMAGESTATUS_ABORTED == Status ) { // uns selbst abmelden und loeschen clear(); diff --git a/sw/source/filter/ww8/docxexportfilter.cxx b/sw/source/filter/ww8/docxexportfilter.cxx index 13715fcd2bbe..0da676da99a1 100644 --- a/sw/source/filter/ww8/docxexportfilter.cxx +++ b/sw/source/filter/ww8/docxexportfilter.cxx @@ -127,30 +127,6 @@ SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( const *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( void* /* pServiceManager */, void* pRegistryKey ) -{ - sal_Bool bRet = sal_False; - - if( pRegistryKey ) - { - try - { - uno::Reference< registry::XRegistryKey > xNewKey1( - static_cast< registry::XRegistryKey* >( pRegistryKey )->createKey( - OUString::createFromAscii( IMPL_NAME "/UNO/SERVICES/" ) ) ); - xNewKey1->createKey( DocxExport_getSupportedServiceNames().getConstArray()[0] ); - - bRet = sal_True; - } - catch( registry::InvalidRegistryException& ) - { - OSL_ENSURE( sal_False, "### InvalidRegistryException!" ); - } - } - - return bRet; -} - // ------------------------ // - component_getFactory - // ------------------------ diff --git a/sw/source/filter/ww8/dump/ww8struc.hxx b/sw/source/filter/ww8/dump/ww8struc.hxx index e43d5354037a..aa566098fd6e 100644 --- a/sw/source/filter/ww8/dump/ww8struc.hxx +++ b/sw/source/filter/ww8/dump/ww8struc.hxx @@ -62,7 +62,7 @@ inline void Set_UInt32( BYTE *& p, UINT32 n ) #if defined OSL_BIGENDIAN || SAL_TYPES_ALIGNMENT4 > 2 || defined UNX #define __WW8_NEEDS_COPY #else -#if defined WNT || defined WIN || defined OS2 +#if defined WNT || defined OS2 #define __WW8_NEEDS_PACK #pragma pack(2) #endif diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index 952ab3f2767f..e22ca1c9b731 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -3804,9 +3804,11 @@ void WW8AttributeOutput::TableNodeInfoInner( ww8::WW8TableNodeInfoInner::Pointer void MSWordExportBase::OutputStartNode( const SwStartNode & rNode) { +#if 0 #ifdef DEBUG ::std::clog << "<OutWW8_SwStartNode>" << dbg_out(&rNode) << ::std::endl; #endif +#endif ww8::WW8TableNodeInfo::Pointer_t pNodeInfo = mpTableInfo->getTableNodeInfo( &rNode ); diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index ba932c33c479..24f36b047a4e 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -1857,7 +1857,7 @@ void SwWW8ImplReader::Read_HdFt(bool bIsTitle, int nSect, bool wwSectionManager::SectionIsProtected(const wwSection &rSection) const { - return (!rSection.IsNotProtected()); + return (mrReader.pWwFib->fReadOnlyRecommended && !rSection.IsNotProtected()); } void wwSectionManager::SetHdFt(wwSection &rSection, int nSect, diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx index 025cf0f588f4..c87035f208a1 100644 --- a/sw/source/filter/ww8/ww8par.hxx +++ b/sw/source/filter/ww8/ww8par.hxx @@ -1164,6 +1164,7 @@ private: bool GetFontParams(USHORT, FontFamily&, String&, FontPitch&, rtl_TextEncoding&); bool SetNewFontAttr(USHORT nFCode, bool bSetEnums, USHORT nWhich); + USHORT CorrectResIdForCharset(CharSet nCharSet, USHORT nWhich); void ResetCharSetVars(); void ResetCJKCharSetVars(); diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx index 1588944e179b..b298f3721b00 100644 --- a/sw/source/filter/ww8/ww8par6.cxx +++ b/sw/source/filter/ww8/ww8par6.cxx @@ -3551,6 +3551,23 @@ bool SwWW8ImplReader::GetFontParams( USHORT nFCode, FontFamily& reFamily, return true; } +USHORT SwWW8ImplReader::CorrectResIdForCharset(CharSet nCharSet, USHORT nWhich) +{ + USHORT nResult = 0; + + switch (nCharSet) { + case RTL_TEXTENCODING_MS_932: + nResult = RES_CHRATR_CJK_FONT; + break; + + default: + nResult = nWhich; + break; + } + + return nResult; +} + bool SwWW8ImplReader::SetNewFontAttr(USHORT nFCode, bool bSetEnums, USHORT nWhich) { @@ -3600,6 +3617,8 @@ bool SwWW8ImplReader::SetNewFontAttr(USHORT nFCode, bool bSetEnums, SvxFontItem aFont( eFamily, aName, aEmptyStr, ePitch, eDstCharSet, nWhich); + nWhich = CorrectResIdForCharset(eSrcCharSet, nWhich); + if( bSetEnums ) { if( pAktColl ) // StyleDef diff --git a/sw/source/filter/xml/xmlexpit.cxx b/sw/source/filter/xml/xmlexpit.cxx index 5a8f201f7cb0..07a4c911fc7e 100644 --- a/sw/source/filter/xml/xmlexpit.cxx +++ b/sw/source/filter/xml/xmlexpit.cxx @@ -926,9 +926,15 @@ sal_Bool SvXMLExportItemMapper::QueryXMLValue( if( MID_PAGEDESC_PAGENUMOFFSET==nMemberId ) { - - rUnitConverter.convertNumber( - aOut, (sal_Int32)pPageDesc->GetNumOffset() ); + sal_Int32 const number(pPageDesc->GetNumOffset()); + if (0 >= number) + { + aOut.append(GetXMLToken(XML_AUTO)); + } + else // #i114163# positiveInteger only! + { + rUnitConverter.convertNumber(aOut, number); + } bOk = sal_True; } } diff --git a/sw/source/ui/app/docsh2.cxx b/sw/source/ui/app/docsh2.cxx index ebdbf91a6281..17f11b115bf8 100644 --- a/sw/source/ui/app/docsh2.cxx +++ b/sw/source/ui/app/docsh2.cxx @@ -119,7 +119,10 @@ #include <com/sun/star/ui/dialogs/ListboxControlActions.hpp> #include <com/sun/star/ui/dialogs/CommonFilePickerElementIds.hpp> #include "com/sun/star/ui/dialogs/TemplateDescription.hpp" - +#ifdef FUTURE_VBA +#include <com/sun/star/script/vba/XVBAEventProcessor.hpp> +#include <com/sun/star/script/vba/VBAEventId.hpp> +#endif #include <editeng/acorrcfg.hxx> #include <SwStyleNameMapper.hxx> @@ -137,7 +140,6 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star; using ::rtl::OUString; using namespace ::sfx2; - extern BOOL FindPhyStyle( SwDoc& , const String& , SfxStyleFamily ); /*-------------------------------------------------------------------- @@ -188,6 +190,26 @@ void SwDocShell::DoFlushDocInfo() } } +#ifdef FUTURE_VBA +void lcl_processCompatibleSfxHint( const uno::Reference< script::vba::XVBAEventProcessor >& xVbaEvents, const SfxHint& rHint ) +{ + using namespace com::sun::star::script::vba::VBAEventId; + if ( rHint.ISA( SfxEventHint ) ) + { + uno::Sequence< uno::Any > aArgs; + ULONG nEventId = ((SfxEventHint&)rHint).GetEventId(); + switch( nEventId ) + { + case SFX_EVENT_CREATEDOC: + xVbaEvents->processVbaEvent( DOCUMENT_NEW, aArgs ); + break; + case SFX_EVENT_OPENDOC: + xVbaEvents->processVbaEvent( DOCUMENT_OPEN, aArgs ); + break; + } + } +} +#endif /*-------------------------------------------------------------------- Beschreibung: Benachrichtigung bei geaenderter DocInfo @@ -202,6 +224,12 @@ void SwDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint ) return ; } +#ifdef FUTURE_VBA + uno::Reference< script::vba::XVBAEventProcessor > xVbaEvents = pDoc->GetVbaEventProcessor(); + if( xVbaEvents.is() ) + lcl_processCompatibleSfxHint( xVbaEvents, rHint ); +#endif + USHORT nAction = 0; if( rHint.ISA(SfxSimpleHint) ) { @@ -283,6 +311,18 @@ USHORT SwDocShell::PrepareClose( BOOL bUI, BOOL bForBrowsing ) if( TRUE == nRet ) //Unbedingt auf TRUE abfragen! (RET_NEWTASK) EndListening( *this ); +#ifdef FUTURE_VBA + if( pDoc && IsInPrepareClose() ) + { + uno::Reference< script::vba::XVBAEventProcessor > xVbaEvents = pDoc->GetVbaEventProcessor(); + if( xVbaEvents.is() ) + { + using namespace com::sun::star::script::vba::VBAEventId; + uno::Sequence< uno::Any > aArgs; + xVbaEvents->processVbaEvent( DOCUMENT_CLOSE, aArgs ); + } + } +#endif return nRet; } diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx index e2e59e17831e..7b5741316cbb 100644 --- a/sw/source/ui/docvw/edtwin.cxx +++ b/sw/source/ui/docvw/edtwin.cxx @@ -2261,7 +2261,7 @@ KEYINPUT_CHECKTABLE_INSDEL: BOOL bIsAutoCorrectChar = SvxAutoCorrect::IsAutoCorrectChar( aCh ); - BOOL bRunNext = pACorr->HasRunNext(); + BOOL bRunNext = pACorr && pACorr->HasRunNext(); if( !aKeyEvent.GetRepeat() && pACorr && ( bIsAutoCorrectChar || bRunNext ) && pACfg->IsAutoFmtByInput() && (( pACorr->IsAutoCorrFlag( ChgWeightUnderl ) && diff --git a/sw/source/ui/docvw/romenu.cxx b/sw/source/ui/docvw/romenu.cxx index f793a7f854b7..c93409441be9 100644 --- a/sw/source/ui/docvw/romenu.cxx +++ b/sw/source/ui/docvw/romenu.cxx @@ -238,9 +238,13 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) : EnableItem( MN_READONLY_COPY, FALSE ); eState = pVFrame->GetBindings().QueryState( SID_EDITDOC, pState ); - if(eState < SFX_ITEM_DEFAULT || - rSh.IsGlobalDoc() && rView.GetDocShell()->IsReadOnlyUI()) + if ( + eState < SFX_ITEM_DEFAULT || + (rSh.IsGlobalDoc() && rView.GetDocShell()->IsReadOnlyUI()) + ) + { EnableItem( MN_READONLY_EDITDOC, FALSE ); + } if ( !sURL.Len() ) { diff --git a/sw/source/ui/envelp/envimg.cxx b/sw/source/ui/envelp/envimg.cxx index 298e5cb7611e..436f4bd27df6 100644 --- a/sw/source/ui/envelp/envimg.cxx +++ b/sw/source/ui/envelp/envimg.cxx @@ -51,7 +51,7 @@ #include <unomid.h> -#ifdef WIN +#ifdef WNT #define NEXTLINE UniString::CreateFromAscii("\r\n") #else #define NEXTLINE '\n' diff --git a/sw/source/ui/fldui/fldmgr.cxx b/sw/source/ui/fldui/fldmgr.cxx index 95001f897702..2088ce591bbe 100644 --- a/sw/source/ui/fldui/fldmgr.cxx +++ b/sw/source/ui/fldui/fldmgr.cxx @@ -559,10 +559,10 @@ BOOL SwFldMgr::GetSubTypes(USHORT nTypeId, SvStringsDtor& rToFill) (nTypeId == TYP_SEQFLD && nWhich == RES_SETEXPFLD && (((SwSetExpFieldType*)pFldType)->GetType() & nsSwGetSetExpType::GSE_SEQ)) || - ((nTypeId == TYP_INPUTFLD || nTypeId == TYP_FORMELFLD) && + ((nTypeId == TYP_INPUTFLD || nTypeId == TYP_FORMELFLD) && (nWhich == RES_USERFLD || - nWhich == RES_SETEXPFLD && - !(((SwSetExpFieldType*)pFldType)->GetType() & nsSwGetSetExpType::GSE_SEQ)) ) ) + (nWhich == RES_SETEXPFLD && + !(((SwSetExpFieldType*)pFldType)->GetType() & nsSwGetSetExpType::GSE_SEQ))) ) ) { String* pNew = new String(pFldType->GetName()); rToFill.Insert(pNew, rToFill.Count()); diff --git a/sw/source/ui/inc/swlbox.hxx b/sw/source/ui/inc/swlbox.hxx index 0c31a9ab977f..a0d7ebf03ca1 100644 --- a/sw/source/ui/inc/swlbox.hxx +++ b/sw/source/ui/inc/swlbox.hxx @@ -76,11 +76,7 @@ namespace nsSwComboBoxStyle const SwComboBoxStyle CBS_LOWER = 0x02; const SwComboBoxStyle CBS_ALL = 0x04; const SwComboBoxStyle CBS_FILENAME = 0x08; -#ifdef WIN - const SwComboBoxStyle CBS_SW_FILENAME = CBS_FILENAME | CBS_LOWER; -#else const SwComboBoxStyle CBS_SW_FILENAME = CBS_FILENAME; -#endif } class SW_DLLPUBLIC SwComboBox : public ComboBox diff --git a/sw/source/ui/inc/view.hxx b/sw/source/ui/inc/view.hxx index d63149eb7c4f..a21dc8cfb30e 100644 --- a/sw/source/ui/inc/view.hxx +++ b/sw/source/ui/inc/view.hxx @@ -452,7 +452,7 @@ public: inline SwEditWin &GetEditWin() { return *pEditWin; } inline const SwEditWin &GetEditWin () const { return *pEditWin; } -#if defined WIN || defined WNT || defined UNX +#if defined WNT || defined UNX void ScannerEventHdl( const ::com::sun::star::lang::EventObject& rEventObject ); #endif diff --git a/sw/source/ui/lingu/olmenu.cxx b/sw/source/ui/lingu/olmenu.cxx index 934cfc19e22b..e9bb702b3d66 100644..100755 --- a/sw/source/ui/lingu/olmenu.cxx +++ b/sw/source/ui/lingu/olmenu.cxx @@ -398,7 +398,9 @@ bGrammarResults(false) { DBG_ASSERT(xSpellAlt.is(), "no spelling alternatives available"); - CreateAutoMnemonics(); +// CreateAutoMnemonics(); + SetMenuFlags(MENU_FLAG_NOAUTOMNEMONICS); + nCheckedLanguage = LANGUAGE_NONE; if (xSpellAlt.is()) { @@ -471,7 +473,8 @@ bGrammarResults(false) } pMenu = GetPopupMenu(MN_ADD_TO_DIC); - pMenu->CreateAutoMnemonics(); +// pMenu->CreateAutoMnemonics(); + pMenu->SetMenuFlags(MENU_FLAG_NOAUTOMNEMONICS); //! necessary to retrieve the correct dictionary name in 'Execute' below bEnable = FALSE; // enable MN_ADD_TO_DIC? uno::Reference< linguistic2::XDictionaryList > xDicList( SvxGetDictionaryList() ); if (xDicList.is()) @@ -572,7 +575,6 @@ bGrammarResults(false) ////////////////////////////////////////////////////////////////////////////////// RemoveDisabledEntries( TRUE, TRUE ); - SetMenuFlags(MENU_FLAG_NOAUTOMNEMONICS); } /*-------------------------------------------------------------------------- @@ -599,7 +601,8 @@ aInfo16( SW_RES(IMG_INFO_16) ) InsertItem( MN_SHORT_COMMENT, aMessageText, MIB_NOSELECT, nPos++ ); SetItemImage( MN_SHORT_COMMENT, aInfo16 ); - CreateAutoMnemonics(); +// CreateAutoMnemonics(); + SetMenuFlags(MENU_FLAG_NOAUTOMNEMONICS); InsertSeparator( nPos++ ); sal_Int32 nStringCount = aSuggestions.getLength(); @@ -705,7 +708,6 @@ aInfo16( SW_RES(IMG_INFO_16) ) ////////////////////////////////////////////////////////////////////////////////// RemoveDisabledEntries( TRUE, TRUE ); - SetMenuFlags(MENU_FLAG_NOAUTOMNEMONICS); } /*-------------------------------------------------------------------------- @@ -821,12 +823,17 @@ void SwSpellPopup::Execute( USHORT nId ) else if (MN_DICTIONARIES_START <= nId && nId <= MN_DICTIONARIES_END) { OUString aWord( xSpellAlt->getWord() ); - USHORT nDicIdx = nId - MN_DICTIONARIES_START; - DBG_ASSERT( nDicIdx < aDics.getLength(), "dictionary index out of range" ); - if (nDicIdx < aDics.getLength()) + PopupMenu *pMenu = GetPopupMenu(MN_ADD_TO_DIC); + String aDicName ( pMenu->GetItemText(nId) ); + + uno::Reference< linguistic2::XDictionary > xDic; + uno::Reference< linguistic2::XDictionaryList > xDicList( SvxGetDictionaryList() ); + if (xDicList.is()) + xDic = xDicList->getDictionaryByName( aDicName ); + + if (xDic.is()) { - uno::Reference< linguistic2::XDictionary > xDic = aDics.getConstArray()[nDicIdx]; INT16 nAddRes = linguistic::AddEntryToDic( xDic, aWord, FALSE, aEmptyStr, LANGUAGE_NONE ); // save modified user-dictionary if it is persistent uno::Reference< frame::XStorable > xSavDic( xDic, uno::UNO_QUERY ); diff --git a/sw/source/ui/ribbar/inputwin.cxx b/sw/source/ui/ribbar/inputwin.cxx index c14f91632a4c..9ee5a6e2ffa3 100644..100755 --- a/sw/source/ui/ribbar/inputwin.cxx +++ b/sw/source/ui/ribbar/inputwin.cxx @@ -80,6 +80,8 @@ SwInputWindow::SwInputWindow( Window* pParent, SfxBindings* pBind ) FreeResource(); + aEdit.SetSizePixel( aEdit.CalcMinimumSize() ); + SfxImageManager* pManager = SfxImageManager::GetImageManager( SW_MOD() ); pManager->RegisterToolBox(this); diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx index f5ad209d195a..d8e1eed0f3fc 100644 --- a/sw/source/ui/table/tabledlg.cxx +++ b/sw/source/ui/table/tabledlg.cxx @@ -1539,7 +1539,7 @@ BOOL SwTextFlowPage::FillItemSet( SfxItemSet& rSet ) if ( bState != aPageCollCB.GetSavedValue() || ( bState && aPageCollLB.GetSelectEntryPos() != aPageCollLB.GetSavedValue() ) - || aPageNoNF.IsEnabled() && aPageNoNF.IsValueModified()) + || (aPageNoNF.IsEnabled() && aPageNoNF.IsValueModified()) ) { String sPage; diff --git a/sw/source/ui/uiview/pview.cxx b/sw/source/ui/uiview/pview.cxx index 452fac6bb302..2319be573e25 100644..100755 --- a/sw/source/ui/uiview/pview.cxx +++ b/sw/source/ui/uiview/pview.cxx @@ -108,7 +108,7 @@ using namespace ::com::sun::star; -SFX_IMPL_VIEWFACTORY(SwPagePreView, SW_RES(STR_NONAME)) +SFX_IMPL_NAMED_VIEWFACTORY(SwPagePreView, "PrintPreview") { SFX_VIEW_REGISTRATION(SwDocShell); SFX_VIEW_REGISTRATION(SwWebDocShell); @@ -217,8 +217,7 @@ SwPreViewZoomDlg::SwPreViewZoomDlg( SwPagePreViewWin& rParent ) : Beschreibung: --------------------------------------------------------------------*/ - - SwPreViewZoomDlg::~SwPreViewZoomDlg() {} +SwPreViewZoomDlg::~SwPreViewZoomDlg() {} void SwPreViewZoomDlg::Apply() @@ -228,491 +227,6 @@ void SwPreViewZoomDlg::Apply() BYTE(aColEdit.GetValue()) ); } -/* */ -/* -----------------20.08.98 15:25------------------- - * Vorschau fuer den Seitendruck - * --------------------------------------------------*/ -struct PrintSettingsStruct; -class PrtPrvWindow : public Window -{ - const PrintSettingsStruct& rSettings; - - virtual void Paint(const Rectangle&); -public : - PrtPrvWindow(Window* pParent, const ResId& rResId, const PrintSettingsStruct& rSett) : - Window(pParent, rResId), rSettings(rSett){} -}; -/*-------------------------------------------------------------------- - Beschreibung: Optionen fuer das Drucken der Preview - --------------------------------------------------------------------*/ -struct PrintSettingsStruct -{ - Size aPageMaxSize; // groesste Seite - Size aPrtSize; // Papiergroesse - Size aPrvPrtSize; // Groesse innerhalb der LRTB-Raender - Size aGridSize; // Groesse fuer jede Seite, enthaelt je - // die Haelfte von H- und V-Distance - - long nLeft; - long nRight; - long nTop; - long nBottom; - long nHori; - long nVert; - - USHORT nRows; - USHORT nCols; - - BOOL bPrinterLandscape; // Ausrichtung -}; - -class SwPreviewPrintOptionsDialog : public SvxStandardDialog -{ - FixedLine aRowColFL; - FixedText aRowsFT; - NumericField aRowsNF; - FixedText aColsFT; - NumericField aColsNF; - - FixedLine aMarginFL; - FixedText aLSpaceFT; - MetricField aLSpaceMF; - FixedText aRSpaceFT; - MetricField aRSpaceMF; - FixedText aTSpaceFT; - MetricField aTSpaceMF; - FixedText aBSpaceFT; - MetricField aBSpaceMF; - FixedLine aDistanceFL; - FixedText aHSpaceFT; - MetricField aHSpaceMF; - FixedText aVSpaceFT; - MetricField aVSpaceMF; - - RadioButton aLandscapeRB; - RadioButton aPortraitRB; - FixedLine aOrientationFL; - - PrtPrvWindow aPreviewWin; - - OKButton aOkBtn; - CancelButton aCancelBtn; - HelpButton aHelpBtn; - - PushButton aStandardPB; - - SwPagePreView& rPreView; - SwPagePreViewWin& rParentWin; - PrintSettingsStruct aSettings; -/* Size aPageMaxSize; - Size aPrtSize; - - BOOL bOrientation; -*/ - BOOL bStandard; - - virtual void Apply(); - void FillControls(SwPagePreViewPrtData& rData); - - DECL_LINK( ModifyHdl, Edit* ); - DECL_LINK( StandardHdl, PushButton* ); - -public: - SwPreviewPrintOptionsDialog(SwPagePreViewWin& rParent, SwPagePreView& rView); - ~SwPreviewPrintOptionsDialog(); -}; - -/* -----------------19.08.98 13:35------------------- - * - * --------------------------------------------------*/ -SwPreviewPrintOptionsDialog::SwPreviewPrintOptionsDialog( SwPagePreViewWin& rParent, SwPagePreView& rView ) : - SvxStandardDialog( &rParent, SW_RES(DLG_PAGEPREVIEW_PRINTOPTIONS) ), - aRowColFL(this,SW_RES( FL_ROWCOL)), - aRowsFT(this,SW_RES( FT_ROWS)), - aRowsNF(this,SW_RES( NF_ROWS)), - aColsFT(this,SW_RES( FT_COLS)), - aColsNF(this,SW_RES( NF_COLS)), - aMarginFL(this,SW_RES( FL_MARGINS)), - aLSpaceFT(this,SW_RES( FT_LMARGIN)), - aLSpaceMF(this,SW_RES( MF_LMARGIN)), - aRSpaceFT(this,SW_RES( FT_RMARGIN)), - aRSpaceMF(this,SW_RES( MF_RMARGIN)), - aTSpaceFT(this,SW_RES( FT_TMARGIN)), - aTSpaceMF(this,SW_RES( MF_TMARGIN)), - aBSpaceFT(this,SW_RES( FT_BMARGIN)), - aBSpaceMF(this,SW_RES( MF_BMARGIN)), - aDistanceFL(this,SW_RES(FL_DISTANCE)), - aHSpaceFT(this,SW_RES( FT_HMARGIN)), - aHSpaceMF(this,SW_RES( MF_HMARGIN)), - aVSpaceFT(this,SW_RES( FT_VMARGIN)), - aVSpaceMF(this,SW_RES( MF_VMARGIN)), - aLandscapeRB(this,SW_RES( RB_LANDSCAPE)), - aPortraitRB(this,SW_RES( RB_PORTRAIT)), - aOrientationFL(this,SW_RES( FL_ORIENTATION)), - aPreviewWin(this,SW_RES( WIN_PREVIEW), aSettings), - aOkBtn(this,SW_RES(BT_OK)), - aCancelBtn(this,SW_RES(BT_CANCEL)), - aHelpBtn(this,SW_RES(BT_HELP)), - aStandardPB(this,SW_RES(PB_STANDARD)), - rPreView(rView), - rParentWin(rParent), - bStandard(TRUE) -{ - FreeResource(); - ViewShell& rViewSh = *rPreView.GetViewShell(); - // OD 18.12.2002 #103492# - aSettings.aPageMaxSize = rViewSh.PagePreviewLayout()->GetMaxPageSize(); - SfxPrinter* pPrinter = rViewSh.getIDocumentDeviceAccess()->getPrinter( true ); - aSettings.aPrtSize = pPrinter->GetPaperSize(); - //#97682# make sure that no division by zero occurs - if(!aSettings.aPrtSize.Width() || !aSettings.aPrtSize.Height()) - aSettings.aPrtSize = SvxPaperInfo::GetPaperSize(PAPER_A4); - aSettings.bPrinterLandscape = pPrinter->GetOrientation() == ORIENTATION_LANDSCAPE; - - - SwDocShell* pDocShell = rPreView.GetDocShell(); - const SwMasterUsrPref *pUsrPref = SW_MOD()->GetUsrPref(0 != PTR_CAST(SwWebDocShell, pDocShell)); - FieldUnit eFieldUnit = pUsrPref->GetMetric(); - ::SetFieldUnit( aLSpaceMF, eFieldUnit ); - ::SetFieldUnit( aRSpaceMF, eFieldUnit ); - ::SetFieldUnit( aTSpaceMF, eFieldUnit ); - ::SetFieldUnit( aBSpaceMF, eFieldUnit ); - ::SetFieldUnit( aHSpaceMF, eFieldUnit ); - ::SetFieldUnit( aVSpaceMF, eFieldUnit ); - - SwDoc* pDoc = pDocShell->GetDoc(); - SwPagePreViewPrtData aData; - if(pDoc->GetPreViewPrtData()) - { - aData = *pDoc->GetPreViewPrtData(); - bStandard = FALSE; - } - else - { - // Orientation der PreviewData an den Drucker anpassen - aData.SetLandscape(aSettings.bPrinterLandscape); - aData.SetRow(rParent.GetRow()); - aData.SetCol(rParent.GetCol()); - } - FillControls(aData); - - aLSpaceMF.SaveValue(); - aRSpaceMF.SaveValue(); - aTSpaceMF.SaveValue(); - aBSpaceMF.SaveValue(); - aHSpaceMF.SaveValue(); - aVSpaceMF.SaveValue(); - aRowsNF.SaveValue(); - aColsNF.SaveValue(); - aLandscapeRB.SaveValue(); - aPortraitRB.SaveValue(); - - aStandardPB.SetClickHdl(LINK(this, SwPreviewPrintOptionsDialog, StandardHdl)); - Link aLk = LINK(this, SwPreviewPrintOptionsDialog, ModifyHdl); - aLSpaceMF.SetUpHdl(aLk); - aRSpaceMF.SetUpHdl(aLk); - aTSpaceMF.SetUpHdl(aLk); - aBSpaceMF.SetUpHdl(aLk); - aHSpaceMF.SetUpHdl(aLk); - aVSpaceMF.SetUpHdl(aLk); - aRowsNF.SetUpHdl(aLk); - aColsNF.SetUpHdl(aLk); - aLSpaceMF.SetDownHdl(aLk); - aRSpaceMF.SetDownHdl(aLk); - aTSpaceMF.SetDownHdl(aLk); - aBSpaceMF.SetDownHdl(aLk); - aHSpaceMF.SetDownHdl(aLk); - aVSpaceMF.SetDownHdl(aLk); - aRowsNF.SetDownHdl(aLk); - aColsNF.SetDownHdl(aLk); - aLSpaceMF.SetLoseFocusHdl(aLk); - aRSpaceMF.SetLoseFocusHdl(aLk); - aTSpaceMF.SetLoseFocusHdl(aLk); - aBSpaceMF.SetLoseFocusHdl(aLk); - aHSpaceMF.SetLoseFocusHdl(aLk); - aVSpaceMF.SetLoseFocusHdl(aLk); - aRowsNF.SetLoseFocusHdl(aLk); - aColsNF.SetLoseFocusHdl(aLk); - aLandscapeRB.SetClickHdl(aLk); - aPortraitRB.SetClickHdl(aLk); - - ModifyHdl(0); - if(bStandard) - StandardHdl(&aStandardPB); -} - - -/* -----------------19.08.98 13:36------------------- - * - * --------------------------------------------------*/ -SwPreviewPrintOptionsDialog::~SwPreviewPrintOptionsDialog() -{ -} -/* -----------------12.11.98 11:32------------------- - * - * --------------------------------------------------*/ -void SwPreviewPrintOptionsDialog::FillControls(SwPagePreViewPrtData& rData) -{ - aLSpaceMF.SetValue(aLSpaceMF.Normalize(rData.GetLeftSpace() ), FUNIT_TWIP); - aRSpaceMF.SetValue(aRSpaceMF.Normalize(rData.GetRightSpace() ), FUNIT_TWIP); - aTSpaceMF.SetValue(aTSpaceMF.Normalize(rData.GetTopSpace() ), FUNIT_TWIP); - aBSpaceMF.SetValue(aBSpaceMF.Normalize(rData.GetBottomSpace()), FUNIT_TWIP); - aHSpaceMF.SetValue(aHSpaceMF.Normalize(rData.GetHorzSpace() ), FUNIT_TWIP); - aVSpaceMF.SetValue(aVSpaceMF.Normalize(rData.GetVertSpace() ), FUNIT_TWIP); - aRowsNF.SetValue(rData.GetRow()); - aColsNF.SetValue(rData.GetCol()); - aSettings.bPrinterLandscape ? aLandscapeRB.Check() : aPortraitRB.Check(); - // wenn Drucker und Einstellungen nicht uebereinstimmen, dann Seiten tauschen - if( rData.GetLandscape() != aSettings.bPrinterLandscape ) - { - Size aTmp(aSettings.aPrtSize.Height(), aSettings.aPrtSize.Width()); - aSettings.aPrtSize = aTmp; - aSettings.bPrinterLandscape = !aSettings.bPrinterLandscape; - // nochmal setzen, denn auch wenn nur die Default-Orientierung dem Drucker - // angepasst wurde, sollen die Einstellungen gespeichert werden - aSettings.bPrinterLandscape ? aLandscapeRB.Check() : aPortraitRB.Check(); - } - aLandscapeRB.SaveValue(); - aPortraitRB.SaveValue(); - - aSettings.nLeft = rData.GetLeftSpace() ; - aSettings.nRight = rData.GetRightSpace() ; - aSettings.nTop = rData.GetTopSpace() ; - aSettings.nBottom = rData.GetBottomSpace(); - aSettings.nHori = rData.GetHorzSpace() ; - aSettings.nVert = rData.GetVertSpace() ; - aSettings.nRows = rData.GetRow() ; - aSettings.nCols = rData.GetCol() ; - aSettings.aPrvPrtSize = aSettings.aPrtSize ; -} - -/* -----------------19.08.98 14:31------------------- - * - * --------------------------------------------------*/ -void SwPreviewPrintOptionsDialog::Apply() -{ - - SwDoc* pDoc = rPreView.GetDocShell()->GetDoc(); - if(bStandard) - pDoc->SetPreViewPrtData(0); - else if( aLSpaceMF.GetSavedValue() != aLSpaceMF.GetText() || - aRSpaceMF.GetSavedValue() != aRSpaceMF.GetText() || - aTSpaceMF.GetSavedValue() != aTSpaceMF.GetText() || - aBSpaceMF.GetSavedValue() != aBSpaceMF.GetText() || - aHSpaceMF.GetSavedValue() != aHSpaceMF.GetText() || - aVSpaceMF.GetSavedValue() != aVSpaceMF.GetText() || - aRowsNF.GetSavedValue() != aRowsNF.GetText() || - aColsNF.GetSavedValue() != aColsNF.GetText() || - aLandscapeRB.GetSavedValue() != aLandscapeRB.IsChecked() || - aPortraitRB.GetSavedValue() != aPortraitRB.IsChecked() ) - { - SwPagePreViewPrtData aData; - if(pDoc->GetPreViewPrtData()) - aData = *pDoc->GetPreViewPrtData(); - aData.SetLeftSpace( static_cast< ULONG >(aLSpaceMF.Denormalize(aLSpaceMF.GetValue(FUNIT_TWIP))) ); - aData.SetRightSpace( static_cast< ULONG >(aRSpaceMF.Denormalize(aRSpaceMF.GetValue(FUNIT_TWIP))) ); - aData.SetTopSpace( static_cast< ULONG >(aTSpaceMF.Denormalize(aTSpaceMF.GetValue(FUNIT_TWIP))) ); - aData.SetBottomSpace( static_cast< ULONG >(aBSpaceMF.Denormalize(aBSpaceMF.GetValue(FUNIT_TWIP))) ); - - aData.SetHorzSpace( static_cast< ULONG >(aHSpaceMF.Denormalize(aHSpaceMF.GetValue(FUNIT_TWIP))) ); - aData.SetVertSpace( static_cast< ULONG >(aVSpaceMF.Denormalize(aVSpaceMF.GetValue(FUNIT_TWIP))) ); - aData.SetRow((BYTE)aRowsNF.GetValue()); - aData.SetCol((BYTE)aColsNF.GetValue()); - aData.SetLandscape(aLandscapeRB.IsChecked()); - - ViewShell& rViewSh = *rPreView.GetViewShell(); - SfxPrinter* pPrinter = rViewSh.getIDocumentDeviceAccess()->getPrinter( true ); - if((pPrinter->GetOrientation() == ORIENTATION_LANDSCAPE) - != aData.GetLandscape()) - pPrinter->SetOrientation(aData.GetLandscape() ? ORIENTATION_LANDSCAPE : ORIENTATION_PORTRAIT); - - - pDoc->SetPreViewPrtData(&aData); - - } -} -/* -----------------20.08.98 08:48------------------- - * - * --------------------------------------------------*/ -IMPL_LINK( SwPreviewPrintOptionsDialog, ModifyHdl, Edit*, pEdit ) -{ - if(bStandard && pEdit) - { - aLSpaceMF.SetUserValue(aLSpaceMF.GetValue()); - aRSpaceMF.SetUserValue(aRSpaceMF.GetValue()); - aTSpaceMF.SetUserValue(aTSpaceMF.GetValue()); - aBSpaceMF.SetUserValue(aBSpaceMF.GetValue()); - aHSpaceMF.SetUserValue(aHSpaceMF.GetValue()); - aVSpaceMF.SetUserValue(aVSpaceMF.GetValue()); - aRowsNF. SetUserValue(aRowsNF .GetValue()); - aColsNF. SetUserValue(aColsNF .GetValue()); - - bStandard = FALSE; - } - BOOL bOrientChanged = aSettings.bPrinterLandscape != aLandscapeRB.IsChecked();; - if(pEdit == &aLSpaceMF) - aSettings.nLeft = static_cast< long >(aLSpaceMF.Denormalize(aLSpaceMF.GetValue(FUNIT_TWIP))); - else if(pEdit == &aRSpaceMF) - aSettings.nRight = static_cast< long >(aRSpaceMF.Denormalize(aRSpaceMF.GetValue(FUNIT_TWIP))); - else if(pEdit == &aTSpaceMF) - aSettings.nTop = static_cast< long >(aTSpaceMF.Denormalize(aTSpaceMF.GetValue(FUNIT_TWIP))); - else if(pEdit == &aBSpaceMF) - aSettings.nBottom = static_cast< long >(aBSpaceMF.Denormalize(aBSpaceMF.GetValue(FUNIT_TWIP))); - else if(pEdit == &aHSpaceMF) - aSettings.nHori = static_cast< long >(aHSpaceMF.Denormalize(aHSpaceMF.GetValue(FUNIT_TWIP))); - else if(pEdit == &aVSpaceMF) - aSettings.nVert = static_cast< long >(aVSpaceMF.Denormalize(aVSpaceMF.GetValue(FUNIT_TWIP))); - else if(pEdit == &aRowsNF) - aSettings.nRows = (USHORT)aRowsNF.GetValue(); - else if(pEdit == &aColsNF) - aSettings.nCols = (USHORT)aColsNF.GetValue(); - else if(pEdit == (Edit*)&aLandscapeRB) - aSettings.bPrinterLandscape = aLandscapeRB.IsChecked(); - else if(pEdit == (Edit*)&aPortraitRB) - aSettings.bPrinterLandscape = aLandscapeRB.IsChecked(); - - if(bOrientChanged) - { - Size aTmp(aSettings.aPrtSize.Height(), aSettings.aPrtSize.Width()); - aSettings.aPrtSize = aTmp; - } - - - aSettings.aPrvPrtSize = Size(aSettings.aPrtSize.Width() - aSettings.nRight - aSettings.nLeft, - aSettings.aPrtSize.Height() - aSettings.nTop - aSettings.nBottom); - aSettings.aGridSize = Size(aSettings.aPrvPrtSize.Width() / aSettings.nCols, - aSettings.aPrvPrtSize.Height() / aSettings.nRows ); - // was fehlt noch: Orientation auswerten, minimalrand ausrechnen, Beispiel fuettern - - - //am Ende Maximalwerte setzen - long n20Percent = aSettings.aPrtSize.Width() / 5; - aLSpaceMF.SetMax(aLSpaceMF.Normalize(aSettings.aPrtSize.Width() - aSettings.nRight - n20Percent), FUNIT_TWIP); - aRSpaceMF.SetMax(aRSpaceMF.Normalize(aSettings.aPrtSize.Width() - aSettings.nLeft - n20Percent), FUNIT_TWIP); - n20Percent = aSettings.aPrtSize.Height() / 5; - aTSpaceMF.SetMax(aTSpaceMF.Normalize(aSettings.aPrtSize.Height() - aSettings.nBottom - n20Percent), FUNIT_TWIP); - aBSpaceMF.SetMax(aBSpaceMF.Normalize(aSettings.aPrtSize.Height() - aSettings.nTop - n20Percent), FUNIT_TWIP); - - long n80Percent = aSettings.aPrvPrtSize.Width() * 4 / 5; - aHSpaceMF.SetMax(aHSpaceMF.Normalize(n80Percent / aSettings.nRows), FUNIT_TWIP); - n80Percent = aSettings.aPrvPrtSize.Height()* 4 / 5; - aVSpaceMF.SetMax(aVSpaceMF.Normalize(n80Percent / aSettings.nCols), FUNIT_TWIP); - aHSpaceMF.Enable(aSettings.nCols > 1); - aVSpaceMF.Enable(aSettings.nRows > 1); - aRowsNF.SetMin(1);// nur damit auch nach Standard wieder der Inhalt angezeigt wird - aColsNF.SetMin(1); - - - aPreviewWin.Invalidate(); - return 0; -} -/* -----------------28.08.98 14:59------------------- - * - * --------------------------------------------------*/ -IMPL_LINK( SwPreviewPrintOptionsDialog, StandardHdl, PushButton*, EMPTYARG ) -{ - SetUpdateMode(TRUE); - SwPagePreViewPrtData aData; - aData.SetRow(rParentWin.GetRow()); - aData.SetCol(rParentWin.GetCol()); - FillControls(aData); - bStandard = TRUE; - aLSpaceMF.SetText(aEmptyStr); - aRSpaceMF.SetText(aEmptyStr); - aTSpaceMF.SetText(aEmptyStr); - aBSpaceMF.SetText(aEmptyStr); - aHSpaceMF.SetText(aEmptyStr); - aVSpaceMF.SetText(aEmptyStr); - aPreviewWin.Invalidate(); - SetUpdateMode(FALSE); - return 0; -} -/* -----------------20.08.98 15:28------------------- - * Preview anzeigen - * --------------------------------------------------*/ -void PrtPrvWindow::Paint(const Rectangle&) -{ - Size aWinSize(GetOutputSizePixel()); - long nWidth = rSettings.aPrtSize.Width(); - long nHeight = rSettings.aPrtSize.Height(); - BOOL bHoriValid = (aWinSize.Width() * 100 / aWinSize.Height()) < - (rSettings.aPrtSize.Width() * 100/ rSettings.aPrtSize.Height()); - Fraction aXScale( aWinSize.Width(), Max( nWidth , 1L ) ); - Fraction aYScale( aWinSize.Height(), Max( nHeight, 1L ) ); - MapMode aMapMode( GetMapMode() ); - aMapMode.SetScaleX( bHoriValid ? aXScale : aYScale); - aMapMode.SetScaleY( bHoriValid ? aXScale : aYScale); - SetMapMode( aMapMode ); - - aWinSize = GetOutputSize(); - - Point aOffset(0,0); - if(bHoriValid) - aOffset.Y() = (aWinSize.Height() - rSettings.aPrtSize.Height()) / 2; - else - aOffset.X() = (aWinSize.Width() - rSettings.aPrtSize.Width()) / 2;; - - - BOOL bUseSystemColors = SvtAccessibilityOptions().GetIsForPagePreviews() - && GetSettings().GetStyleSettings().GetHighContrastMode(); - - //der weisse Seitenhintergrund - Rectangle aRect(aOffset, rSettings.aPrtSize); - if(bUseSystemColors) - { - SetFillColor( GetSettings().GetStyleSettings().GetWindowColor() ); - SetLineColor( SwViewOption::GetFontColor() ); - } - else - { - SetFillColor( Color( COL_WHITE ) ); - SetLineColor(Color( COL_BLACK ) ); - } - - DrawRect(aRect); - - Point aTL(aOffset); - aTL.X() += rSettings.nLeft; - aTL.Y() += rSettings.nTop; - - Size aPrvPageSize((rSettings.aPrvPrtSize.Width() - (rSettings.nCols - 1) * rSettings.nHori) / rSettings.nCols, - (rSettings.aPrvPrtSize.Height() - (rSettings.nRows - 1) * rSettings.nVert) / rSettings.nRows); - // jetzt muss noch das unterschiedliche Groessenverhaeltnis berechnet werden, um es an - // der richtigen Seite abzuziehen. - //... - long nSourceScale = rSettings.aPageMaxSize.Width() * 100 / rSettings.aPageMaxSize.Height(); - long nDestScale = aPrvPageSize.Width() * 100 / aPrvPageSize.Height() ; - if(nSourceScale > nDestScale) // die Seite ist relativ breiter als das vorhandene Rechteck - { - aPrvPageSize.Height() = aPrvPageSize.Width() * 100 / nSourceScale; - } - else - { - aPrvPageSize.Width() = aPrvPageSize.Height() * nSourceScale / 100; - } - - if(bUseSystemColors) - SetFillColor( GetSettings().GetStyleSettings().GetWindowColor() ); - else - SetFillColor( Color( COL_GRAY ) ); - - - aRect = Rectangle(aTL, aPrvPageSize); - for(USHORT i = 0; i < rSettings.nRows; i++) - { - for(USHORT j = 0; j < rSettings.nCols; j++) - { - DrawRect(aRect); - aRect.Move(aPrvPageSize.Width() + rSettings.nHori, 0); - } - - aRect.Move( 0, aPrvPageSize.Height() + rSettings.nVert); - aRect.SetPos(Point(aTL.X(), aRect.TopLeft().Y())); - } - //rSettings; -} - -/* */ /*-------------------------------------------------------------------- Beschreibung: --------------------------------------------------------------------*/ diff --git a/sw/source/ui/uiview/pview.src b/sw/source/ui/uiview/pview.src index f38c0557df0b..8a6669907705 100644..100755 --- a/sw/source/ui/uiview/pview.src +++ b/sw/source/ui/uiview/pview.src @@ -29,272 +29,7 @@ #include "pview.hrc" #include "helpid.h" #include "cmdid.h" -ModalDialog DLG_PAGEPREVIEW_PRINTOPTIONS -{ - HelpID = HID_DLG_PRV_PRT_OPTIONS ; - OutputSize = TRUE ; - SVLook = TRUE ; - Moveable = TRUE ; - Size = MAP_APPFONT ( 312 , 131 ) ; - FixedLine FL_ROWCOL - { - Pos = MAP_APPFONT ( 6 , 3 ) ; - Size = MAP_APPFONT ( 150 , 8 ) ; - - Text [ en-US ] = "Distribution"; - }; - FixedText FT_ROWS - { - Pos = MAP_APPFONT ( 12 , 15 ) ; - Size = MAP_APPFONT ( 30 , 10 ) ; - Left = TRUE ; - Text [ en-US ] = "Ro~ws"; - }; - NumericField NF_ROWS - { - Border = TRUE ; - Pos = MAP_APPFONT ( 45 , 14 ) ; - Size = MAP_APPFONT ( 36 , 12 ) ; - TabStop = TRUE ; - Left = TRUE ; - Repeat = TRUE ; - Spin = TRUE ; - Minimum = PVIEW_MIN_ROW ; - Maximum = PVIEW_MAX_ROW ; - Value = 1 ; - First = PVIEW_MIN_COL ; - Last = PVIEW_MAX_COL ; - }; - FixedText FT_COLS - { - Pos = MAP_APPFONT ( 84 , 15 ) ; - Size = MAP_APPFONT ( 30 , 10 ) ; - Left = TRUE ; - Text [ en-US ] = "~Columns"; - }; - NumericField NF_COLS - { - Border = TRUE ; - Pos = MAP_APPFONT ( 117 , 14 ) ; - Size = MAP_APPFONT ( 36 , 12 ) ; - TabStop = TRUE ; - Left = TRUE ; - Repeat = TRUE ; - Spin = TRUE ; - Minimum = PVIEW_MIN_COL ; - Maximum = PVIEW_MAX_COL ; - Value = 1 ; - First = PVIEW_MIN_COL ; - Last = PVIEW_MAX_COL ; - }; - FixedLine FL_MARGINS - { - Pos = MAP_APPFONT ( 6 , 32 ) ; - Size = MAP_APPFONT ( 150 , 8 ) ; - Text [ en-US ] = "Margins"; - }; - FixedText FT_LMARGIN - { - Pos = MAP_APPFONT ( 12 , 44 ) ; - Size = MAP_APPFONT ( 30 , 10 ) ; - Left = TRUE ; - Text [ en-US ] = "L~eft"; - }; - MetricField MF_LMARGIN - { - Border = TRUE ; - Pos = MAP_APPFONT ( 45 , 43 ) ; - Size = MAP_APPFONT ( 36 , 12 ) ; - Left = TRUE ; - Repeat = TRUE ; - Spin = TRUE ; - DecimalDigits = 1 ; - Unit = FUNIT_CM ; - SpinSize = 10 ; - Minimum = 0 ; - Maximum = 9999 ; - First = 0 ; - Last = 2000 ; - }; - FixedText FT_RMARGIN - { - Pos = MAP_APPFONT ( 84 , 44 ) ; - Size = MAP_APPFONT ( 30 , 10 ) ; - Left = TRUE ; - Text [ en-US ] = "~Right"; - }; - MetricField MF_RMARGIN - { - Border = TRUE ; - Pos = MAP_APPFONT ( 117 , 43 ) ; - Size = MAP_APPFONT ( 36 , 12 ) ; - Left = TRUE ; - Repeat = TRUE ; - Spin = TRUE ; - DecimalDigits = 1 ; - Unit = FUNIT_CM ; - SpinSize = 10 ; - Minimum = 0 ; - Maximum = 9999 ; - First = 0 ; - Last = 2000 ; - }; - FixedText FT_TMARGIN - { - Pos = MAP_APPFONT ( 12 , 59 ) ; - Size = MAP_APPFONT ( 30 , 10 ) ; - Left = TRUE ; - Text [ en-US ] = "~Top"; - }; - MetricField MF_TMARGIN - { - Border = TRUE ; - Pos = MAP_APPFONT ( 45 , 58 ) ; - Size = MAP_APPFONT ( 36 , 12 ) ; - Left = TRUE ; - Repeat = TRUE ; - Spin = TRUE ; - DecimalDigits = 1 ; - Unit = FUNIT_CM ; - SpinSize = 10 ; - Minimum = 0 ; - Maximum = 9999 ; - First = 0 ; - Last = 2000 ; - }; - FixedText FT_BMARGIN - { - Pos = MAP_APPFONT ( 84 , 59 ) ; - Size = MAP_APPFONT ( 30 , 10 ) ; - Left = TRUE ; - Text [ en-US ] = "~Bottom"; - }; - MetricField MF_BMARGIN - { - Border = TRUE ; - Pos = MAP_APPFONT ( 117 , 58 ) ; - Size = MAP_APPFONT ( 36 , 12 ) ; - Left = TRUE ; - Repeat = TRUE ; - Spin = TRUE ; - DecimalDigits = 1 ; - Unit = FUNIT_CM ; - SpinSize = 10 ; - Minimum = 0 ; - Maximum = 9999 ; - First = 0 ; - Last = 2000 ; - }; - FixedLine FL_DISTANCE - { - Pos = MAP_APPFONT ( 6 , 76 ) ; - Size = MAP_APPFONT ( 150 , 8 ) ; - - Text [ en-US ] = "Spacing"; - }; - FixedText FT_HMARGIN - { - Pos = MAP_APPFONT ( 12 , 88 ) ; - Size = MAP_APPFONT ( 30 , 10 ) ; - Left = TRUE ; - Text [ en-US ] = "Hori~zontal"; - }; - - MetricField MF_HMARGIN - { - Border = TRUE ; - Pos = MAP_APPFONT ( 45 , 87 ) ; - Size = MAP_APPFONT ( 36 , 12 ) ; - Left = TRUE ; - Repeat = TRUE ; - Spin = TRUE ; - DecimalDigits = 1 ; - Unit = FUNIT_CM ; - SpinSize = 10 ; - Minimum = 0 ; - Maximum = 9999 ; - First = 0 ; - Last = 2000 ; - }; - FixedText FT_VMARGIN - { - Pos = MAP_APPFONT ( 84 , 88 ) ; - Size = MAP_APPFONT ( 32 , 10 ) ; - Left = TRUE ; - Text [ en-US ] = "~Vertically"; - }; - - MetricField MF_VMARGIN - { - Border = TRUE ; - Pos = MAP_APPFONT ( 117 , 87 ) ; - Size = MAP_APPFONT ( 36 , 12 ) ; - Left = TRUE ; - Repeat = TRUE ; - Spin = TRUE ; - DecimalDigits = 1 ; - Unit = FUNIT_CM ; - SpinSize = 10 ; - Minimum = 0 ; - Maximum = 9999 ; - First = 0 ; - Last = 2000 ; - }; - FixedLine FL_ORIENTATION - { - Pos = MAP_APPFONT ( 6 , 102 ) ; - Size = MAP_APPFONT ( 150 , 8 ) ; - Text [ en-US ] = "Format"; - }; - RadioButton RB_LANDSCAPE - { - Pos = MAP_APPFONT ( 12 , 113 ) ; - Size = MAP_APPFONT ( 60 , 12 ) ; - TabStop = TRUE ; - Group = TRUE ; - Text [ en-US ] = "~Landscape"; - }; - RadioButton RB_PORTRAIT - { - Pos = MAP_APPFONT ( 84 , 113 ) ; - Size = MAP_APPFONT ( 60 , 12 ) ; - Text [ en-US ] = "P~ortrait"; - }; - Window WIN_PREVIEW - { - Pos = MAP_APPFONT ( 162 , 7 ) ; - Size = MAP_APPFONT ( 90 , 113 ) ; - }; - - OKButton BT_OK - { - Pos = MAP_APPFONT ( 258 , 6 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - DefButton = TRUE ; - }; - CancelButton BT_CANCEL - { - Pos = MAP_APPFONT ( 258 , 23 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - }; - HelpButton BT_HELP - { - Pos = MAP_APPFONT ( 258 , 49 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - }; - PushButton PB_STANDARD - { - Pos = MAP_APPFONT ( 258 , 66 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - Text [ en-US ] = "~Default"; - }; - Text [ en-US ] = "Print Options"; -}; ModalDialog DLG_PAGEPREVIEW_ZOOM { HelpID = HID_PPREV_ZOOM ; @@ -372,31 +107,3 @@ String RID_PVIEW_TOOLBOX Text [ en-US ] = "Page Preview" ; }; - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sw/source/ui/uiview/srcview.cxx b/sw/source/ui/uiview/srcview.cxx index 801ecba22c73..667beb8ab4ca 100644 --- a/sw/source/ui/uiview/srcview.cxx +++ b/sw/source/ui/uiview/srcview.cxx @@ -125,7 +125,7 @@ using ::com::sun::star::util::SearchOptions; -SFX_IMPL_VIEWFACTORY(SwSrcView, SW_RES(STR_NONAME)) +SFX_IMPL_NAMED_VIEWFACTORY(SwSrcView, "SourceView") { SFX_VIEW_REGISTRATION(SwWebDocShell); } diff --git a/sw/source/ui/uiview/uivwimp.cxx b/sw/source/ui/uiview/uivwimp.cxx index 20dc6035dc36..73ec9ab71dd4 100644 --- a/sw/source/ui/uiview/uivwimp.cxx +++ b/sw/source/ui/uiview/uivwimp.cxx @@ -294,7 +294,7 @@ SwScannerEventListener::~SwScannerEventListener() void SAL_CALL SwScannerEventListener::disposing( const EventObject& rEventObject) throw(uno::RuntimeException) { vos::OGuard aGuard(Application::GetSolarMutex()); -#if defined WIN || defined WNT || defined UNX +#if defined WNT || defined UNX if( pView ) pView->ScannerEventHdl( rEventObject ); #endif diff --git a/sw/source/ui/uiview/view.cxx b/sw/source/ui/uiview/view.cxx index 4396ff03807c..15c94782883f 100644 --- a/sw/source/ui/uiview/view.cxx +++ b/sw/source/ui/uiview/view.cxx @@ -1759,7 +1759,7 @@ void SwView::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) /*-----------------02.12.96 12:36------------------- --------------------------------------------------*/ -#if defined WIN || defined WNT || defined UNX +#if defined WNT || defined UNX void SwView::ScannerEventHdl( const EventObject& /*rEventObject*/ ) { diff --git a/sw/source/ui/uiview/view.hrc b/sw/source/ui/uiview/view.hrc index 8697a7e4ed63..d2aa60494801 100644..100755 --- a/sw/source/ui/uiview/view.hrc +++ b/sw/source/ui/uiview/view.hrc @@ -77,7 +77,6 @@ #define DLG_SPECIAL_FORCED (RC_VIEW_BEGIN) #define DLG_PAGEPREVIEW_ZOOM (RC_VIEW_BEGIN + 1) -#define DLG_PAGEPREVIEW_PRINTOPTIONS (RC_VIEW_BEGIN + 2) // Ueberlaufpruefung ----------------------------------------------------- diff --git a/sw/source/ui/uiview/view0.cxx b/sw/source/ui/uiview/view0.cxx index 9d905a4c3443..93a29f699f5a 100644 --- a/sw/source/ui/uiview/view0.cxx +++ b/sw/source/ui/uiview/view0.cxx @@ -105,7 +105,7 @@ using ::rtl::OUString; #include <unomid.h> -SFX_IMPL_VIEWFACTORY(SwView, SW_RES(STR_NONAME)) +SFX_IMPL_NAMED_VIEWFACTORY(SwView, "Default") { if ( SvtModuleOptions().IsWriter() ) { diff --git a/sw/source/ui/uiview/view2.cxx b/sw/source/ui/uiview/view2.cxx index 3a7003ff7bca..eeab95b5bccd 100755..100644 --- a/sw/source/ui/uiview/view2.cxx +++ b/sw/source/ui/uiview/view2.cxx @@ -913,7 +913,7 @@ void __EXPORT SwView::Execute(SfxRequest &rReq) GetViewFrame()->GetBindings().Invalidate( nSlot ); } break; -#if defined WIN || defined WNT || defined UNX +#if defined WNT || defined UNX case SID_TWAIN_SELECT: case SID_TWAIN_TRANSFER: GetViewImpl()->ExecuteScan( rReq ); diff --git a/sw/source/ui/uiview/viewstat.cxx b/sw/source/ui/uiview/viewstat.cxx index b0d5f71744c9..40ba6e3c6d2d 100755..100644 --- a/sw/source/ui/uiview/viewstat.cxx +++ b/sw/source/ui/uiview/viewstat.cxx @@ -228,7 +228,7 @@ void SwView::GetState(SfxItemSet &rSet) break; case SID_TWAIN_SELECT: case SID_TWAIN_TRANSFER: -#if defined WIN || defined WNT || defined UNX +#if defined WNT || defined UNX { if(!SW_MOD()->GetScannerManager().is()) rSet.DisableItem(nWhich); diff --git a/sw/source/ui/uno/SwXDocumentSettings.cxx b/sw/source/ui/uno/SwXDocumentSettings.cxx index b0ad816df4a1..a3ef96d1a613 100644..100755 --- a/sw/source/ui/uno/SwXDocumentSettings.cxx +++ b/sw/source/ui/uno/SwXDocumentSettings.cxx @@ -31,7 +31,6 @@ #include <vos/mutex.hxx> #include <sfx2/sfxbasecontroller.hxx> #include <SwXDocumentSettings.hxx> -#include <SwXPrintPreviewSettings.hxx> #include <comphelper/MasterPropertySetInfo.hxx> #include <com/sun/star/beans/PropertyAttribute.hpp> #include <com/sun/star/i18n/XForbiddenCharacters.hpp> @@ -221,7 +220,6 @@ SwXDocumentSettings::SwXDocumentSettings ( SwXTextDocument * pModel ) , mpPrinter( NULL ) { registerSlave ( new SwXPrintSettings ( PRINT_SETTINGS_DOCUMENT, mpModel->GetDocShell()->GetDoc() ) ); - registerSlave ( new SwXPrintPreviewSettings ( mpModel->GetDocShell()->GetDoc() ) ); } SwXDocumentSettings::~SwXDocumentSettings() diff --git a/sw/source/ui/uno/SwXPrintPreviewSettings.cxx b/sw/source/ui/uno/SwXPrintPreviewSettings.cxx deleted file mode 100644 index a812c39754c9..000000000000 --- a/sw/source/ui/uno/SwXPrintPreviewSettings.cxx +++ /dev/null @@ -1,375 +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. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_sw.hxx" -#include <SwXPrintPreviewSettings.hxx> -#include <comphelper/ChainablePropertySetInfo.hxx> -#include <pvprtdat.hxx> -#include <swtypes.hxx> -#ifndef _COM_SUN_STAR_BEANS_PropertyAttribute_HPP_ -#include <com/sun/star/beans/PropertyAttribute.hpp> -#endif -#ifndef _COM_SUN_STAR_BEANS_PropertyAttribute_HPP_ -#include <com/sun/star/beans/PropertyAttribute.hpp> -#endif -#include <doc.hxx> -#include <vcl/svapp.hxx> -using namespace ::com::sun::star; -using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::beans; -using namespace ::com::sun::star::lang; -using namespace ::comphelper; -using ::rtl::OUString; - -enum SwPrintSettingsPropertyHandles -{ - HANDLE_PRINTSET_PREVIEW_LEFT_MARGIN, - HANDLE_PRINTSET_PREVIEW_RIGHT_MARGIN, - HANDLE_PRINTSET_PREVIEW_TOP_MARGIN, - HANDLE_PRINTSET_PREVIEW_BOTTOM_MARGIN, - HANDLE_PRINTSET_PREVIEW_HORIZONTAL_SPACING, - HANDLE_PRINTSET_PREVIEW_VERTICAL_SPACING, - HANDLE_PRINTSET_PREVIEW_NUM_ROWS, - HANDLE_PRINTSET_PREVIEW_NUM_COLUMNS, - HANDLE_PRINTSET_PREVIEW_LANDSCAPE -}; - -static ChainablePropertySetInfo * lcl_createPrintPreviewSettingsInfo() -{ - static PropertyInfo aPrintPreviewSettingsMap_Impl[] = - { - { RTL_CONSTASCII_STRINGPARAM ( "PreviewPrintLeftMargin" ), HANDLE_PRINTSET_PREVIEW_LEFT_MARGIN, CPPUTYPE_INT32, PropertyAttribute::MAYBEVOID, 0 }, - { RTL_CONSTASCII_STRINGPARAM ( "PreviewPrintRightMargin" ), HANDLE_PRINTSET_PREVIEW_RIGHT_MARGIN, CPPUTYPE_INT32, PropertyAttribute::MAYBEVOID, 0 }, - { RTL_CONSTASCII_STRINGPARAM ( "PreviewPrintTopMargin" ), HANDLE_PRINTSET_PREVIEW_TOP_MARGIN, CPPUTYPE_INT32, PropertyAttribute::MAYBEVOID, 0 }, - { RTL_CONSTASCII_STRINGPARAM ( "PreviewPrintBottomMargin" ),HANDLE_PRINTSET_PREVIEW_BOTTOM_MARGIN, CPPUTYPE_INT32, PropertyAttribute::MAYBEVOID, 0 }, - { RTL_CONSTASCII_STRINGPARAM ( "PreviewPrintHorizontalSpacing" ),HANDLE_PRINTSET_PREVIEW_HORIZONTAL_SPACING, CPPUTYPE_INT32, PropertyAttribute::MAYBEVOID, 0 }, - { RTL_CONSTASCII_STRINGPARAM ( "PreviewPrintVerticalSpacing" ), HANDLE_PRINTSET_PREVIEW_VERTICAL_SPACING, CPPUTYPE_INT32, PropertyAttribute::MAYBEVOID, 0 }, - { RTL_CONSTASCII_STRINGPARAM ( "PreviewPrintNumRows" ), HANDLE_PRINTSET_PREVIEW_NUM_ROWS, CPPUTYPE_INT8, PropertyAttribute::MAYBEVOID, 0 }, - { RTL_CONSTASCII_STRINGPARAM ( "PreviewPrintNumColumns" ), HANDLE_PRINTSET_PREVIEW_NUM_COLUMNS, CPPUTYPE_INT8, PropertyAttribute::MAYBEVOID, 0 }, - { RTL_CONSTASCII_STRINGPARAM ( "PreviewPrintLandscape" ), HANDLE_PRINTSET_PREVIEW_LANDSCAPE, CPPUTYPE_BOOLEAN, PropertyAttribute::MAYBEVOID, 0 }, - { 0, 0, 0, CPPUTYPE_UNKNOWN, 0, 0 } - }; - return new ChainablePropertySetInfo ( aPrintPreviewSettingsMap_Impl ); -} -SwXPrintPreviewSettings::SwXPrintPreviewSettings( SwDoc *pDoc) -: ChainablePropertySet ( lcl_createPrintPreviewSettingsInfo (), &Application::GetSolarMutex() ) -, mbPreviewDataChanged( sal_False ) -, mpDoc( pDoc) -{ -} -/*-- 17.12.98 12:54:05--------------------------------------------------- - - -----------------------------------------------------------------------*/ -SwXPrintPreviewSettings::~SwXPrintPreviewSettings() - throw() -{ -} - -Any SAL_CALL SwXPrintPreviewSettings::queryInterface( const Type& rType ) - throw(RuntimeException) -{ - return ::cppu::queryInterface ( rType , - // OWeakObject interfaces - dynamic_cast< XInterface* >( dynamic_cast< OWeakObject* >(this) ) , - dynamic_cast< XWeak* >( this ) , - // my own interfaces - dynamic_cast< XServiceInfo* >( this ) , - dynamic_cast< XPropertySet* >( this ) , - dynamic_cast< XMultiPropertySet* >( this ) ); -} -void SwXPrintPreviewSettings::acquire () - throw () -{ - OWeakObject::acquire(); -} -void SwXPrintPreviewSettings::release () - throw () -{ - OWeakObject::release(); -} - -void SwXPrintPreviewSettings::_preSetValues () - throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException ) -{ - if ( mpDoc ) - { - const SwPagePreViewPrtData *pConstPrtData = mpDoc->GetPreViewPrtData(); - mpPreViewData = new SwPagePreViewPrtData; - if ( pConstPrtData ) - { - mpPreViewData->SetLeftSpace ( pConstPrtData->GetLeftSpace() ); - mpPreViewData->SetRightSpace ( pConstPrtData->GetRightSpace() ); - mpPreViewData->SetTopSpace ( pConstPrtData->GetTopSpace() ); - mpPreViewData->SetBottomSpace ( pConstPrtData->GetBottomSpace() ); - mpPreViewData->SetHorzSpace ( pConstPrtData->GetHorzSpace() ); - mpPreViewData->SetVertSpace ( pConstPrtData->GetVertSpace() ); - mpPreViewData->SetRow ( pConstPrtData->GetRow() ); - mpPreViewData->SetCol ( pConstPrtData->GetCol() ); - mpPreViewData->SetLandscape ( pConstPrtData->GetLandscape() ); - } - } -} - -void SwXPrintPreviewSettings::_setSingleValue( const comphelper::PropertyInfo & rInfo, const uno::Any &rValue ) - throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException ) -{ - switch( rInfo.mnHandle ) - { - case HANDLE_PRINTSET_PREVIEW_LEFT_MARGIN: - { - sal_Int32 nVal = 0; - rValue >>= nVal; - nVal = MM100_TO_TWIP( nVal ); - if ( nVal != static_cast < sal_Int32 > (mpPreViewData->GetLeftSpace() ) ) - { - mbPreviewDataChanged = sal_True; - mpPreViewData->SetLeftSpace( nVal ); - } - } - break; - case HANDLE_PRINTSET_PREVIEW_RIGHT_MARGIN: - { - sal_Int32 nVal = 0; - rValue >>= nVal; - nVal = MM100_TO_TWIP( nVal ); - if ( nVal != static_cast < sal_Int32 > (mpPreViewData->GetRightSpace() ) ) - { - mbPreviewDataChanged = sal_True; - mpPreViewData->SetRightSpace( nVal ); - } - } - break; - case HANDLE_PRINTSET_PREVIEW_TOP_MARGIN: - { - sal_Int32 nVal = 0; - rValue >>= nVal; - nVal = MM100_TO_TWIP( nVal ); - if ( nVal != static_cast < sal_Int32 > ( mpPreViewData->GetTopSpace() ) ) - { - mbPreviewDataChanged = sal_True; - mpPreViewData->SetTopSpace( nVal ); - } - } - break; - case HANDLE_PRINTSET_PREVIEW_BOTTOM_MARGIN: - { - sal_Int32 nVal = 0; - rValue >>= nVal; - nVal = MM100_TO_TWIP( nVal ); - if ( nVal != static_cast < sal_Int32 > ( mpPreViewData->GetBottomSpace() ) ) - { - mbPreviewDataChanged = sal_True; - mpPreViewData->SetBottomSpace( nVal ); - } - } - break; - case HANDLE_PRINTSET_PREVIEW_HORIZONTAL_SPACING: - { - sal_Int32 nVal = 0; - rValue >>= nVal; - nVal = MM100_TO_TWIP( nVal ); - if ( nVal != static_cast < sal_Int32 > ( mpPreViewData->GetHorzSpace() ) ) - { - mbPreviewDataChanged = sal_True; - mpPreViewData->SetHorzSpace( nVal ); - } - } - break; - case HANDLE_PRINTSET_PREVIEW_VERTICAL_SPACING: - { - sal_Int32 nVal = 0; - rValue >>= nVal; - nVal = MM100_TO_TWIP( nVal ); - if ( nVal != static_cast < sal_Int32 > ( mpPreViewData->GetVertSpace() ) ) - { - mbPreviewDataChanged = sal_True; - mpPreViewData->SetVertSpace( nVal ); - } - } - break; - case HANDLE_PRINTSET_PREVIEW_NUM_ROWS: - { - sal_Int8 nVal = 0; - rValue >>= nVal; - if ( nVal != mpPreViewData->GetRow() ) - { - mbPreviewDataChanged = sal_True; - mpPreViewData->SetRow( nVal ); - } - } - break; - case HANDLE_PRINTSET_PREVIEW_NUM_COLUMNS: - { - sal_Int8 nVal = 0; - rValue >>= nVal; - if ( nVal != mpPreViewData->GetCol() ) - { - mbPreviewDataChanged = sal_True; - mpPreViewData->SetCol( nVal ); - } - } - break; - case HANDLE_PRINTSET_PREVIEW_LANDSCAPE: - { - sal_Bool bVal = *(sal_Bool*)rValue.getValue(); - if ( bVal != mpPreViewData->GetLandscape() ) - { - mbPreviewDataChanged = sal_True; - mpPreViewData->SetLandscape ( bVal ); - } - } - break; - default: - throw UnknownPropertyException(); - } -} -void SwXPrintPreviewSettings::_postSetValues () - throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException ) -{ - if ( mbPreviewDataChanged ) - { - mpDoc->SetPreViewPrtData ( mpPreViewData ); - mbPreviewDataChanged = sal_False; - } - delete mpPreViewData; - mpPreViewData = NULL; -} - -void SwXPrintPreviewSettings::_preGetValues () - throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException ) -{ - if (mpDoc) - mpConstPreViewData = mpDoc->GetPreViewPrtData(); -} -void SwXPrintPreviewSettings::_getSingleValue( const comphelper::PropertyInfo & rInfo, uno::Any & rValue ) - throw(UnknownPropertyException, WrappedTargetException ) -{ - sal_Bool bBool = TRUE; - sal_Bool bBoolVal; - switch( rInfo.mnHandle ) - { - case HANDLE_PRINTSET_PREVIEW_LEFT_MARGIN: - { - bBool = FALSE; - if ( mpConstPreViewData ) - rValue <<= static_cast < sal_Int32 > ( TWIP_TO_MM100_UNSIGNED( mpConstPreViewData->GetLeftSpace() ) ); - } - break; - case HANDLE_PRINTSET_PREVIEW_RIGHT_MARGIN: - { - bBool = FALSE; - if ( mpConstPreViewData ) - rValue <<= static_cast < sal_Int32 > ( TWIP_TO_MM100_UNSIGNED( mpConstPreViewData->GetRightSpace() ) ); - } - break; - case HANDLE_PRINTSET_PREVIEW_TOP_MARGIN: - { - bBool = FALSE; - if ( mpConstPreViewData ) - rValue <<= static_cast < sal_Int32 > ( TWIP_TO_MM100_UNSIGNED( mpConstPreViewData->GetTopSpace() ) ); - } - break; - case HANDLE_PRINTSET_PREVIEW_BOTTOM_MARGIN: - { - bBool = FALSE; - if ( mpConstPreViewData ) - rValue <<= static_cast < sal_Int32 > ( TWIP_TO_MM100_UNSIGNED( mpConstPreViewData->GetBottomSpace() ) ); - } - break; - case HANDLE_PRINTSET_PREVIEW_HORIZONTAL_SPACING: - { - bBool = FALSE; - if ( mpConstPreViewData ) - rValue <<= static_cast < sal_Int32 > ( TWIP_TO_MM100_UNSIGNED( mpConstPreViewData->GetHorzSpace() ) ); - } - break; - case HANDLE_PRINTSET_PREVIEW_VERTICAL_SPACING: - { - bBool = FALSE; - if ( mpConstPreViewData ) - rValue <<= static_cast < sal_Int32 > ( TWIP_TO_MM100_UNSIGNED( mpConstPreViewData->GetVertSpace() ) ); - } - break; - case HANDLE_PRINTSET_PREVIEW_NUM_ROWS: - { - bBool = FALSE; - if ( mpConstPreViewData ) - rValue <<= static_cast < sal_Int8 > ( mpConstPreViewData->GetRow() ); - } - break; - case HANDLE_PRINTSET_PREVIEW_NUM_COLUMNS: - { - bBool = FALSE; - if ( mpConstPreViewData ) - rValue <<= static_cast < sal_Int8 > ( mpConstPreViewData->GetCol() ); - } - break; - case HANDLE_PRINTSET_PREVIEW_LANDSCAPE: - { - if (mpConstPreViewData) - bBoolVal = mpConstPreViewData->GetLandscape(); - else - bBool = FALSE; - } - break; - default: - throw UnknownPropertyException(); - } - if(bBool) - rValue.setValue(&bBoolVal, ::getBooleanCppuType()); -} -void SwXPrintPreviewSettings::_postGetValues () - throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException ) -{ - mpConstPreViewData = NULL; -} -/* -----------------------------06.04.00 11:02-------------------------------- - - ---------------------------------------------------------------------------*/ -OUString SwXPrintPreviewSettings::getImplementationName(void) throw( RuntimeException ) -{ - return OUString( RTL_CONSTASCII_USTRINGPARAM ( "SwXPrintPreviewSettings" ) ); -} -/* -----------------------------06.04.00 11:02-------------------------------- - - ---------------------------------------------------------------------------*/ -sal_Bool SwXPrintPreviewSettings::supportsService(const OUString& rServiceName) throw( RuntimeException ) -{ - return rServiceName.equalsAsciiL ( RTL_CONSTASCII_STRINGPARAM ( "com.sun.star.text.PrintPreviewSettings") ); -} -/* -----------------------------06.04.00 11:02-------------------------------- - - ---------------------------------------------------------------------------*/ -Sequence< OUString > SwXPrintPreviewSettings::getSupportedServiceNames(void) throw( RuntimeException ) -{ - Sequence< OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = OUString( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.text.PrintPreviewSettings" ) ); - return aRet; -} - diff --git a/sw/source/ui/uno/SwXPrintPreviewSettings.hxx b/sw/source/ui/uno/SwXPrintPreviewSettings.hxx deleted file mode 100644 index 2b908c453043..000000000000 --- a/sw/source/ui/uno/SwXPrintPreviewSettings.hxx +++ /dev/null @@ -1,89 +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 _SW_XPRINTPREVIEWSETTINGS_HXX_ -#define _SW_XPRINTPREVIEWSETTINGS_HXX_ - -#ifdef PRECOMPILED -#include "ui_pch.hxx" -#endif -#include <comphelper/ChainablePropertySet.hxx> -#ifndef _COM_SUN_STAR_TEXT_XTEXTDOCUMENT_HPP -#include <com/sun/star/text/XTextDocument.hpp> -#endif -#include <cppuhelper/weak.hxx> -#include <com/sun/star/lang/XServiceInfo.hpp> - -class SwDoc; -class SwPagePreViewPrtData; - -class SwXPrintPreviewSettings :public comphelper::ChainablePropertySet, - public cppu::OWeakObject, - public com::sun::star::lang::XServiceInfo -{ - friend class SwXDocumentSettings; -protected: - sal_Bool mbPreviewDataChanged; - SwDoc* mpDoc; - SwPagePreViewPrtData *mpPreViewData; - const SwPagePreViewPrtData *mpConstPreViewData; - - virtual void _preSetValues () - throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException ); - virtual void _setSingleValue( const comphelper::PropertyInfo & rInfo, const ::com::sun::star::uno::Any &rValue ) - throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException ); - virtual void _postSetValues () - throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException ); - - virtual void _preGetValues () - throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException ); - virtual void _getSingleValue( const comphelper::PropertyInfo & rInfo, ::com::sun::star::uno::Any & rValue ) - throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException ); - virtual void _postGetValues () - throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException ); - virtual ~SwXPrintPreviewSettings() - throw(); -public: - SwXPrintPreviewSettings(SwDoc *pDoc); - - - // XInterface - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) - throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL acquire( ) - throw (); - virtual void SAL_CALL release( ) - throw (); - - //XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName(void) - throw( ::com::sun::star::uno::RuntimeException ); - virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) - throw( ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) - throw( ::com::sun::star::uno::RuntimeException ); -}; -#endif diff --git a/sw/source/ui/uno/detreg.cxx b/sw/source/ui/uno/detreg.cxx index 8c5e5f0634f8..65f4e6379a17 100644 --- a/sw/source/ui/uno/detreg.cxx +++ b/sw/source/ui/uno/detreg.cxx @@ -43,30 +43,6 @@ SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( *ppEnvironmentTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ; } -SAL_DLLPUBLIC_EXPORT 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 + SwFilterDetect::impl_getStaticImplementationName() + - aUnoServices ); - - Sequence< OUString > aServices = SwFilterDetect::impl_getStaticSupportedServiceNames(); - for(i = 0; i < aServices.getLength(); i++ ) - xNewKey->createKey( aServices.getConstArray()[i] ); - - return sal_True; -} - SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplementationName, void* pServiceManager, diff --git a/sw/source/ui/uno/makefile.mk b/sw/source/ui/uno/makefile.mk index 0023fd52f55c..ac4b6dde697b 100644..100755 --- a/sw/source/ui/uno/makefile.mk +++ b/sw/source/ui/uno/makefile.mk @@ -55,7 +55,6 @@ SLO1FILES = \ $(SLO)$/dlelstnr.obj \ $(SLO)$/unofreg.obj \ $(SLO)$/SwXDocumentSettings.obj \ - $(SLO)$/SwXPrintPreviewSettings.obj \ $(SLO)$/SwXFilterOptions.obj\ $(SLO)$/RefreshListenerContainer.obj \ $(SLO)$/unomodule.obj \ diff --git a/sw/source/ui/uno/unofreg.cxx b/sw/source/ui/uno/unofreg.cxx index a322b0e677f9..a76aaa3cd0e5 100644 --- a/sw/source/ui/uno/unofreg.cxx +++ b/sw/source/ui/uno/unofreg.cxx @@ -154,99 +154,6 @@ SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -static void lcl_uno_writeInfo( - registry::XRegistryKey * pRegistryKey, - const OUString& rImplementationName, - const uno::Sequence< OUString >& rServices ) -{ - uno::Reference< registry::XRegistryKey > xNewKey( - pRegistryKey->createKey( - OUString( RTL_CONSTASCII_USTRINGPARAM("/") ) + rImplementationName + OUString(RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES") ) ) ); - - for( sal_Int32 i = 0; i < rServices.getLength(); i++ ) - xNewKey->createKey( rServices.getConstArray()[i]); -} - -SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( - void * /*pServiceManager*/, - void * pRegistryKey ) -{ - if( pRegistryKey ) - { - try - { - registry::XRegistryKey *pKey = - reinterpret_cast< registry::XRegistryKey * >( pRegistryKey ); - - - // xml filter - lcl_uno_writeInfo( pKey, SwXMLImport_getImplementationName(), - SwXMLImport_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey, SwXMLImportStyles_getImplementationName(), - SwXMLImportStyles_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey,SwXMLImportContent_getImplementationName(), - SwXMLImportContent_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey, SwXMLImportMeta_getImplementationName(), - SwXMLImportMeta_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey, SwXMLImportSettings_getImplementationName(), - SwXMLImportSettings_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey, SwXMLExportOOO_getImplementationName(), - SwXMLExportOOO_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey, SwXMLExportStylesOOO_getImplementationName(), - SwXMLExportStylesOOO_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey,SwXMLExportContentOOO_getImplementationName(), - SwXMLExportContentOOO_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey, SwXMLExportMetaOOO_getImplementationName(), - SwXMLExportMetaOOO_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey, SwXMLExportSettingsOOO_getImplementationName(), - SwXMLExportSettingsOOO_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey, SwXMLExport_getImplementationName(), - SwXMLExport_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey, SwXMLExportStyles_getImplementationName(), - SwXMLExportStyles_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey,SwXMLExportContent_getImplementationName(), - SwXMLExportContent_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey, SwXMLExportMeta_getImplementationName(), - SwXMLExportMeta_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey, SwXMLExportSettings_getImplementationName(), - SwXMLExportSettings_getSupportedServiceNames() ); - //API objects - lcl_uno_writeInfo( pKey, SwXAutoTextContainer_getImplementationName(), - SwXAutoTextContainer_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey, SwXModule_getImplementationName(), - SwXModule_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey, SwXMailMerge_getImplementationName(), - SwXMailMerge_getSupportedServiceNames() ); - //Filter options - lcl_uno_writeInfo( pKey, SwXFilterOptions::getImplementationName_Static(), - SwXFilterOptions::getSupportedServiceNames_Static() ); - - // documents - lcl_uno_writeInfo( pKey, SwTextDocument_getImplementationName(), - SwTextDocument_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey, SwWebDocument_getImplementationName(), - SwWebDocument_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey,SwGlobalDocument_getImplementationName(), - SwGlobalDocument_getSupportedServiceNames() ); - - // module - lcl_uno_writeInfo( pKey, SwUnoModule_getImplementationName(), - SwUnoModule_getSupportedServiceNames() ); - // --> OD 2007-05-24 #i73788# - lcl_uno_writeInfo( pKey, - comp_FinalThreadManager::_getImplementationName(), - comp_FinalThreadManager::_getSupportedServiceNames() ); - // <-- - - } - catch (registry::InvalidRegistryException &) - { - OSL_ENSURE( sal_False, "### InvalidRegistryException!" ); - } - } - return sal_True; -} - static ::cppu::ImplementationEntry const entries[] = { { &comp_FinalThreadManager::_create, &comp_FinalThreadManager::_getImplementationName, diff --git a/sw/source/ui/uno/unomod.cxx b/sw/source/ui/uno/unomod.cxx index 45df3b9646d8..c3d56910ad5a 100644 --- a/sw/source/ui/uno/unomod.cxx +++ b/sw/source/ui/uno/unomod.cxx @@ -52,7 +52,7 @@ #include <comphelper/ChainablePropertySetInfo.hxx> #include <edtwin.hxx> #include <rtl/ustrbuf.hxx> - +#include <tools/urlobj.hxx> using namespace ::com::sun::star; using namespace ::com::sun::star::uno; diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx index 0579d180a04c..eb2f5d7d67d2 100755..100644 --- a/sw/source/ui/uno/unotxdoc.cxx +++ b/sw/source/ui/uno/unotxdoc.cxx @@ -82,6 +82,7 @@ #include <svx/xmleohlp.hxx> #include <globals.hrc> #include <unomid.h> +#include <unotools/printwarningoptions.hxx> #include <com/sun/star/util/SearchOptions.hpp> #include <com/sun/star/lang/ServiceNotRegisteredException.hpp> @@ -107,7 +108,6 @@ #include <swcont.hxx> #include <unodefaults.hxx> #include <SwXDocumentSettings.hxx> -#include <SwXPrintPreviewSettings.hxx> #include <doc.hxx> #include <editeng/forbiddencharacterstable.hxx> #include <svl/zforlist.hxx> @@ -1809,9 +1809,7 @@ Reference< XInterface > SwXTextDocument::createInstance(const OUString& rServic } else if (sCategory == C2U ("text") ) { - if( 0 == rServiceName.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.PrintPreviewSettings") ) ) - xRet = Reference < XInterface > ( *new SwXPrintPreviewSettings ( pDocShell->GetDoc() ) ); - else if( 0 == rServiceName.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.DocumentSettings") ) ) + if( 0 == rServiceName.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.DocumentSettings") ) ) xRet = Reference < XInterface > ( *new SwXDocumentSettings ( this ) ); } else if (sCategory == C2U ("chart2") ) @@ -2732,10 +2730,21 @@ sal_Int32 SAL_CALL SwXTextDocument::getRendererCount( // since printing now also use the API for PDF export this option // should be set for printing as well ... pWrtShell->SetPDFExportOption( sal_True ); + bool bOrigStatus = pRenderDocShell->IsEnableSetModified(); + // check configuration: shall update of printing information in DocInfo set the document to "modified"? + bool bStateChanged = false; + if ( bOrigStatus && !SvtPrintWarningOptions().IsModifyDocumentOnPrintingAllowed() ) + { + pRenderDocShell->EnableSetModified( sal_False ); + bStateChanged = true; + } + // --> FME 2005-05-23 #122919# Force field update before PDF export: pWrtShell->ViewShell::UpdateFlds(TRUE); // <-- + if( bStateChanged ) + pRenderDocShell->EnableSetModified( sal_True ); // there is some redundancy between those two function calls, but right now // there is no time to sort this out. @@ -2844,7 +2853,10 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwXTextDocument::getRenderer( uno::Sequence< beans::PropertyValue > aRenderer; if (m_pRenderData) { - const USHORT nPage = nRenderer + 1; + // --> TL, OD 2010-09-07 #i114210# + // determine the correct page number from the renderer index + const USHORT nPage = m_pRenderData->GetPagesToPrint()[ nRenderer ]; + // <-- // get paper tray to use ... sal_Int32 nPrinterPaperTray = -1; diff --git a/sw/source/ui/utlui/glbltree.cxx b/sw/source/ui/utlui/glbltree.cxx index 68385459b4bf..d8849b48e10f 100644 --- a/sw/source/ui/utlui/glbltree.cxx +++ b/sw/source/ui/utlui/glbltree.cxx @@ -1241,11 +1241,20 @@ BOOL SwGlobalTree::Update(BOOL bHard) GlobalDocContentType eType = pLeft->GetType(); SvLBoxEntry* pEntry = GetEntry(i); String sTemp = GetEntryText(pEntry); - if(eType != pRight->GetType() || - eType == GLBLDOC_SECTION && - (pLeft->GetSection()->GetSectionName() != sTemp) || - eType == GLBLDOC_TOXBASE && pLeft->GetTOX()->GetTitle() != sTemp) - bCopy = bRet = TRUE; + if ( + eType != pRight->GetType() || + ( + eType == GLBLDOC_SECTION && + pLeft->GetSection()->GetSectionName() != sTemp + ) || + ( + eType == GLBLDOC_TOXBASE && + pLeft->GetTOX()->GetTitle() != sTemp + ) + ) + { + bCopy = bRet = TRUE; + } } } if(bCopy || bHard) diff --git a/sw/source/ui/utlui/numfmtlb.cxx b/sw/source/ui/utlui/numfmtlb.cxx index baf059c51c32..b059c12a4a50 100644 --- a/sw/source/ui/utlui/numfmtlb.cxx +++ b/sw/source/ui/utlui/numfmtlb.cxx @@ -368,13 +368,22 @@ void NumFormatListBox::SetDefFormat(const ULONG nDefFmt) ULONG nShortDateFormatForLanguage = pFormatter->GetFormatForLanguageIfBuiltIn(nSysShortDateFmt, LANGUAGE_SYSTEM ); ULONG nLongDateFormatForLanguage = pFormatter->GetFormatForLanguageIfBuiltIn(nSysLongDateFmt, LANGUAGE_SYSTEM ); - if(nDefFmt == nSysNumFmt|| - nDefFmt == nSysShortDateFmt|| - nDefFmt == nSysLongDateFmt|| - bSysLang && (nDefFmt == nNumFormatForLanguage || - nDefFmt == nShortDateFormatForLanguage || - nDefFmt == nLongDateFormatForLanguage )) + if ( + nDefFmt == nSysNumFmt || + nDefFmt == nSysShortDateFmt || + nDefFmt == nSysLongDateFmt || + ( + bSysLang && + ( + nDefFmt == nNumFormatForLanguage || + nDefFmt == nShortDateFormatForLanguage || + nDefFmt == nLongDateFormatForLanguage + ) + ) + ) + { sValue += String(SW_RES(RID_STR_SYSTEM)); + } nPos = InsertEntry(sValue, nPos); // Als ersten numerischen Eintrag einfuegen SetEntryData(nPos, (void*)nDefFmt); diff --git a/sw/source/ui/vba/makefile.mk b/sw/source/ui/vba/makefile.mk index c09f81320040..b6d0d7994295 100644 --- a/sw/source/ui/vba/makefile.mk +++ b/sw/source/ui/vba/makefile.mk @@ -91,6 +91,7 @@ SLOFILES= \ $(SLO)$/vbapagesetup.obj \ $(SLO)$/vbasection.obj \ $(SLO)$/vbasections.obj \ + $(SLO)$/vbaeventshelper.obj \ # --- Targets ------------------------------------------------------ diff --git a/sw/source/ui/vba/service.cxx b/sw/source/ui/vba/service.cxx index c21e8de37b5e..d7779fc653be 100644 --- a/sw/source/ui/vba/service.cxx +++ b/sw/source/ui/vba/service.cxx @@ -52,6 +52,11 @@ namespace wrapformat extern sdecl::ServiceDecl const serviceDecl; } +namespace vbaeventshelper +{ +extern sdecl::ServiceDecl const serviceDecl; +} + extern "C" { void SAL_CALL component_getImplementationEnvironment( @@ -61,23 +66,13 @@ extern "C" *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } - sal_Bool SAL_CALL component_writeInfo( - lang::XMultiServiceFactory * pServiceManager, registry::XRegistryKey * pRegistryKey ) - { - OSL_TRACE("In component_writeInfo"); - - // Component registration - return component_writeInfoHelper( pServiceManager, pRegistryKey, - globals::serviceDecl, document::serviceDecl, wrapformat::serviceDecl ); - } - void * SAL_CALL component_getFactory( const sal_Char * pImplName, lang::XMultiServiceFactory * pServiceManager, registry::XRegistryKey * pRegistryKey ) { OSL_TRACE("In component_getFactory for %s", pImplName ); void* pRet = component_getFactoryHelper( - pImplName, pServiceManager, pRegistryKey, globals::serviceDecl, document::serviceDecl, wrapformat::serviceDecl ); + pImplName, pServiceManager, pRegistryKey, globals::serviceDecl, document::serviceDecl, wrapformat::serviceDecl, vbaeventshelper::serviceDecl ); OSL_TRACE("Ret is 0x%x", pRet); return pRet; } diff --git a/sw/source/ui/vba/vbabookmarks.cxx b/sw/source/ui/vba/vbabookmarks.cxx index c17c9f50f422..609b8f9df767 100644 --- a/sw/source/ui/vba/vbabookmarks.cxx +++ b/sw/source/ui/vba/vbabookmarks.cxx @@ -41,15 +41,14 @@ using namespace ::com::sun::star; class BookmarksEnumeration : public EnumerationHelperImpl { uno::Reference< frame::XModel > mxModel; - uno::WeakReference< XHelperInterface > mxParent; public: - BookmarksEnumeration( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, const uno::Reference< frame::XModel >& xModel ) throw ( uno::RuntimeException ) : EnumerationHelperImpl( xContext, xEnumeration ), mxModel( xModel ), mxParent( xParent ) {} + BookmarksEnumeration( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, const uno::Reference< frame::XModel >& xModel ) throw ( uno::RuntimeException ) : EnumerationHelperImpl( xParent, xContext, xEnumeration ), mxModel( xModel ) {} virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException) { uno::Reference< container::XNamed > xNamed( m_xEnumeration->nextElement(), uno::UNO_QUERY_THROW ); rtl::OUString aName = xNamed->getName(); - return uno::makeAny( uno::Reference< word::XBookmark > ( new SwVbaBookmark( mxParent, m_xContext, mxModel, aName ) ) ); + return uno::makeAny( uno::Reference< word::XBookmark > ( new SwVbaBookmark( m_xParent, m_xContext, mxModel, aName ) ) ); } }; diff --git a/sw/source/ui/vba/vbadocuments.cxx b/sw/source/ui/vba/vbadocuments.cxx index 8ee1e9880b7a..41a7e607533e 100644 --- a/sw/source/ui/vba/vbadocuments.cxx +++ b/sw/source/ui/vba/vbadocuments.cxx @@ -76,7 +76,7 @@ class DocumentEnumImpl : public EnumerationHelperImpl { uno::Any m_aApplication; public: - DocumentEnumImpl( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, const uno::Any& aApplication ) throw ( uno::RuntimeException ) : EnumerationHelperImpl( xContext, xEnumeration ), m_aApplication( aApplication ) {} + DocumentEnumImpl( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, const uno::Any& aApplication ) throw ( uno::RuntimeException ) : EnumerationHelperImpl( xParent, xContext, xEnumeration ), m_aApplication( aApplication ) {} virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException) { @@ -102,7 +102,7 @@ SwVbaDocuments::createEnumeration() throw (uno::RuntimeException) // safer to create an enumeration based on this objects state // rather than one effectively based of the desktop component uno::Reference< container::XEnumerationAccess > xEnumerationAccess( m_xIndexAccess, uno::UNO_QUERY_THROW ); - return new DocumentEnumImpl( mxContext, xEnumerationAccess->createEnumeration(), Application() ); + return new DocumentEnumImpl( mxParent, mxContext, xEnumerationAccess->createEnumeration(), Application() ); } uno::Any diff --git a/sw/source/ui/vba/vbaeventshelper.cxx b/sw/source/ui/vba/vbaeventshelper.cxx new file mode 100755 index 000000000000..abe4abb6e757 --- /dev/null +++ b/sw/source/ui/vba/vbaeventshelper.cxx @@ -0,0 +1,108 @@ +/************************************************************************* + * + * 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 "vbaeventshelper.hxx" +#include <com/sun/star/script/vba/VBAEventId.hpp> +#include <vbahelper/helperdecl.hxx> + +using namespace ::com::sun::star; +using namespace ::com::sun::star::script::vba::VBAEventId; +using namespace ::ooo::vba; + +// ============================================================================ + +SwVbaEventsHelper::SwVbaEventsHelper( uno::Sequence< css::uno::Any > const& aArgs, uno::Reference< uno::XComponentContext > const& xContext ) : + VbaEventsHelperBase( aArgs, xContext ) +{ + registerEventHandler( DOCUMENT_NEW, "Document_New", EVENTHANDLER_DOCUMENT ); + registerEventHandler( AUTO_NEW, "AutoNew", EVENTHANDLER_GLOBAL ); + registerEventHandler( DOCUMENT_OPEN, "Document_Open", EVENTHANDLER_DOCUMENT ); + registerEventHandler( AUTO_OPEN, "AutoOpen", EVENTHANDLER_GLOBAL ); + registerEventHandler( DOCUMENT_CLOSE, "Document_Close", EVENTHANDLER_DOCUMENT ); + registerEventHandler( AUTO_CLOSE, "AutoClose", EVENTHANDLER_GLOBAL ); +} + +SwVbaEventsHelper::~SwVbaEventsHelper() +{ +} + +bool SwVbaEventsHelper::implEventsEnabled() throw (uno::RuntimeException) +{ + return true; +} + +bool SwVbaEventsHelper::implPrepareEvent( EventQueue& rEventQueue, + const EventHandlerInfo& rInfo, const uno::Sequence< uno::Any >& /*rArgs*/ ) throw (uno::RuntimeException) +{ + switch( rInfo.mnEventId ) + { + case DOCUMENT_NEW: + rEventQueue.push_back( AUTO_NEW ); + break; + case DOCUMENT_OPEN: + rEventQueue.push_back( AUTO_OPEN ); + break; + case DOCUMENT_CLOSE: + rEventQueue.push_back( AUTO_CLOSE ); + break; + } + return true; +} + +uno::Sequence< uno::Any > SwVbaEventsHelper::implBuildArgumentList( const EventHandlerInfo& /*rInfo*/, + const uno::Sequence< uno::Any >& /*rArgs*/ ) throw (lang::IllegalArgumentException) +{ + // no event handler expects any arguments + return uno::Sequence< uno::Any >(); +} + +void SwVbaEventsHelper::implPostProcessEvent( EventQueue& /*rEventQueue*/, + const EventHandlerInfo& /*rInfo*/, bool /*bSuccess*/, bool /*bCancel*/ ) throw (uno::RuntimeException) +{ + // nothing to do after any event +} + +::rtl::OUString SwVbaEventsHelper::implGetDocumentModuleName( const EventHandlerInfo& /*rInfo*/, + const uno::Sequence< uno::Any >& /*rArgs*/ ) const throw (lang::IllegalArgumentException) +{ + // TODO: get actual codename from document + return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ThisDocument" ) ); +} + +// ============================================================================ + +namespace vbaeventshelper +{ +namespace sdecl = comphelper::service_decl; +sdecl::class_<SwVbaEventsHelper, sdecl::with_args<true> > serviceImpl; +extern sdecl::ServiceDecl const serviceDecl( + serviceImpl, + "SwVbaEventsHelper", + "com.sun.star.document.vba.VBATextEventProcessor" ); +} + +// ============================================================================ diff --git a/sw/source/ui/vba/vbaeventshelper.hxx b/sw/source/ui/vba/vbaeventshelper.hxx new file mode 100755 index 000000000000..af1c06c0341f --- /dev/null +++ b/sw/source/ui/vba/vbaeventshelper.hxx @@ -0,0 +1,54 @@ +/************************************************************************* + * + * 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 SW_VBAEVENTS_HXX +#define SW_VBAEVENTS_HXX + +#include <vbahelper/vbaeventshelperbase.hxx> + +// ============================================================================ + +class SwVbaEventsHelper : public VbaEventsHelperBase +{ +public: + SwVbaEventsHelper( + const css::uno::Sequence< css::uno::Any >& rArgs, + const css::uno::Reference< css::uno::XComponentContext >& rxContext ); + virtual ~SwVbaEventsHelper(); + +protected: + virtual bool implEventsEnabled() throw (css::uno::RuntimeException); + virtual bool implPrepareEvent( EventQueue& rEventQueue, const EventHandlerInfo& rInfo, const css::uno::Sequence< css::uno::Any >& rArgs ) throw (css::uno::RuntimeException); + virtual css::uno::Sequence< css::uno::Any > implBuildArgumentList( const EventHandlerInfo& rInfo, const css::uno::Sequence< css::uno::Any >& rArgs ) throw (css::lang::IllegalArgumentException); + virtual void implPostProcessEvent( EventQueue& rEventQueue, const EventHandlerInfo& rInfo, bool bSuccess, bool bCancel ) throw (css::uno::RuntimeException); + virtual ::rtl::OUString implGetDocumentModuleName( const EventHandlerInfo& rInfo, const css::uno::Sequence< css::uno::Any >& rArgs ) const throw (css::lang::IllegalArgumentException); +}; + +// ============================================================================ + +#endif + diff --git a/sw/source/ui/vba/vbasections.cxx b/sw/source/ui/vba/vbasections.cxx index faa53fa657b5..c0f887f0f249 100644 --- a/sw/source/ui/vba/vbasections.cxx +++ b/sw/source/ui/vba/vbasections.cxx @@ -120,14 +120,13 @@ public: class SectionsEnumWrapper : public EnumerationHelperImpl { uno::Reference< frame::XModel > mxModel; - uno::WeakReference< XHelperInterface > mxParent; public: - SectionsEnumWrapper( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, const uno::Reference< frame::XModel >& xModel ) throw ( uno::RuntimeException ) : EnumerationHelperImpl( xContext, xEnumeration ), mxModel( xModel ), mxParent( xParent ) {} + SectionsEnumWrapper( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, const uno::Reference< frame::XModel >& xModel ) throw ( uno::RuntimeException ) : EnumerationHelperImpl( xParent, xContext, xEnumeration ), mxModel( xModel ){} virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException) { uno::Reference< beans::XPropertySet > xPageProps( m_xEnumeration->nextElement(), uno::UNO_QUERY_THROW ); - return uno::makeAny( uno::Reference< word::XSection > ( new SwVbaSection( mxParent, m_xContext, mxModel, xPageProps ) ) ); + return uno::makeAny( uno::Reference< word::XSection > ( new SwVbaSection( m_xParent, m_xContext, mxModel, xPageProps ) ) ); } }; diff --git a/sw/source/ui/web/wview.cxx b/sw/source/ui/web/wview.cxx index 9a55aaf94a28..1822ab2de4e8 100644 --- a/sw/source/ui/web/wview.cxx +++ b/sw/source/ui/web/wview.cxx @@ -93,7 +93,7 @@ #include <swslots.hxx> -SFX_IMPL_VIEWFACTORY(SwWebView, SW_RES(STR_NONAME)) +SFX_IMPL_NAMED_VIEWFACTORY(SwWebView, "Default") { SFX_VIEW_REGISTRATION(SwWebDocShell); } diff --git a/sw/uiconfig/sglobal/toolbar/findbar.xml b/sw/uiconfig/sglobal/toolbar/findbar.xml index 9ef9d8a1a78f..078c0fc5bed5 100644 --- a/sw/uiconfig/sglobal/toolbar/findbar.xml +++ b/sw/uiconfig/sglobal/toolbar/findbar.xml @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE toolbar:toolbar PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "toolbar.dtd"> <toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar" xmlns:xlink="http://www.w3.org/1999/xlink" toolbar:id="toolbar"> - <toolbar:toolbaritem xlink:href=".uno:FindText" toolbar:helpid="helpid:100105" /> - <toolbar:toolbaritem xlink:href=".uno:DownSearch" toolbar:helpid="helpid:100105" /> - <toolbar:toolbaritem xlink:href=".uno:UpSearch" toolbar:helpid="helpid:100105" /> - <toolbar:toolbaritem xlink:href=".uno:SearchDialog" toolbar:text="Find & Replace" toolbar:visible="false" toolbar:helpid="helpid:100105"/> + <toolbar:toolbaritem xlink:href=".uno:FindText"/> + <toolbar:toolbaritem xlink:href=".uno:DownSearch"/> + <toolbar:toolbaritem xlink:href=".uno:UpSearch"/> + <toolbar:toolbaritem xlink:href=".uno:SearchDialog" toolbar:visible="false"/> </toolbar:toolbar> diff --git a/sw/uiconfig/sweb/toolbar/findbar.xml b/sw/uiconfig/sweb/toolbar/findbar.xml index 9ef9d8a1a78f..0338d3156195 100644 --- a/sw/uiconfig/sweb/toolbar/findbar.xml +++ b/sw/uiconfig/sweb/toolbar/findbar.xml @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE toolbar:toolbar PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "toolbar.dtd"> <toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar" xmlns:xlink="http://www.w3.org/1999/xlink" toolbar:id="toolbar"> - <toolbar:toolbaritem xlink:href=".uno:FindText" toolbar:helpid="helpid:100105" /> - <toolbar:toolbaritem xlink:href=".uno:DownSearch" toolbar:helpid="helpid:100105" /> - <toolbar:toolbaritem xlink:href=".uno:UpSearch" toolbar:helpid="helpid:100105" /> - <toolbar:toolbaritem xlink:href=".uno:SearchDialog" toolbar:text="Find & Replace" toolbar:visible="false" toolbar:helpid="helpid:100105"/> + <toolbar:toolbaritem xlink:href=".uno:FindText"/> + <toolbar:toolbaritem xlink:href=".uno:DownSearch"/> + <toolbar:toolbaritem xlink:href=".uno:UpSearch"/> + <toolbar:toolbaritem xlink:href=".uno:SearchDialog" toolbar:visible="false"/> </toolbar:toolbar> diff --git a/sw/uiconfig/swriter/toolbar/findbar.xml b/sw/uiconfig/swriter/toolbar/findbar.xml index 9ef9d8a1a78f..0338d3156195 100644 --- a/sw/uiconfig/swriter/toolbar/findbar.xml +++ b/sw/uiconfig/swriter/toolbar/findbar.xml @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE toolbar:toolbar PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "toolbar.dtd"> <toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar" xmlns:xlink="http://www.w3.org/1999/xlink" toolbar:id="toolbar"> - <toolbar:toolbaritem xlink:href=".uno:FindText" toolbar:helpid="helpid:100105" /> - <toolbar:toolbaritem xlink:href=".uno:DownSearch" toolbar:helpid="helpid:100105" /> - <toolbar:toolbaritem xlink:href=".uno:UpSearch" toolbar:helpid="helpid:100105" /> - <toolbar:toolbaritem xlink:href=".uno:SearchDialog" toolbar:text="Find & Replace" toolbar:visible="false" toolbar:helpid="helpid:100105"/> + <toolbar:toolbaritem xlink:href=".uno:FindText"/> + <toolbar:toolbaritem xlink:href=".uno:DownSearch"/> + <toolbar:toolbaritem xlink:href=".uno:UpSearch"/> + <toolbar:toolbaritem xlink:href=".uno:SearchDialog" toolbar:visible="false"/> </toolbar:toolbar> diff --git a/sw/uiconfig/swxform/toolbar/findbar.xml b/sw/uiconfig/swxform/toolbar/findbar.xml index 9ef9d8a1a78f..0338d3156195 100644 --- a/sw/uiconfig/swxform/toolbar/findbar.xml +++ b/sw/uiconfig/swxform/toolbar/findbar.xml @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE toolbar:toolbar PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "toolbar.dtd"> <toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar" xmlns:xlink="http://www.w3.org/1999/xlink" toolbar:id="toolbar"> - <toolbar:toolbaritem xlink:href=".uno:FindText" toolbar:helpid="helpid:100105" /> - <toolbar:toolbaritem xlink:href=".uno:DownSearch" toolbar:helpid="helpid:100105" /> - <toolbar:toolbaritem xlink:href=".uno:UpSearch" toolbar:helpid="helpid:100105" /> - <toolbar:toolbaritem xlink:href=".uno:SearchDialog" toolbar:text="Find & Replace" toolbar:visible="false" toolbar:helpid="helpid:100105"/> + <toolbar:toolbaritem xlink:href=".uno:FindText"/> + <toolbar:toolbaritem xlink:href=".uno:DownSearch"/> + <toolbar:toolbaritem xlink:href=".uno:UpSearch"/> + <toolbar:toolbaritem xlink:href=".uno:SearchDialog" toolbar:visible="false"/> </toolbar:toolbar> diff --git a/sw/util/makefile.mk b/sw/util/makefile.mk index 2907264d89cf..6fa4bd5432e2 100644 --- a/sw/util/makefile.mk +++ b/sw/util/makefile.mk @@ -367,10 +367,30 @@ SHL5STDLIBS= \ $(I18NISOLANGLIB) \ $(EDITENGLIB) \ $(SVXCORELIB) \ - $(SVXMSFILTERLIB) + $(MSFILTERLIB) SHL5DEPN=$(SHL1TARGETN) SHL5LIBS=$(SLB)$/$(TARGET_VBA).lib .ENDIF # .IF "$(ENABLE_VBA)" == "YES" .INCLUDE : target.mk + +ALLTAR : $(MISC)/sw.component $(MISC)/swd.component $(MISC)/vbaswobj.component + +$(MISC)/sw.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + sw.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt sw.component + +$(MISC)/swd.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + swd.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL2TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt swd.component + +$(MISC)/vbaswobj.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + vbaswobj.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL5TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt vbaswobj.component diff --git a/sw/util/sw.component b/sw/util/sw.component new file mode 100644 index 000000000000..e76cec637d33 --- /dev/null +++ b/sw/util/sw.component @@ -0,0 +1,104 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!--********************************************************************** +* +* 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. +* +**********************************************************************--> + +<component loader="com.sun.star.loader.SharedLibrary" + xmlns="http://openoffice.org/2010/uno-components"> + <implementation name="SwXAutoTextContainer"> + <service name="com.sun.star.text.AutoTextContainer"/> + </implementation> + <implementation name="SwXMailMerge"> + <service name="com.sun.star.sdb.DataAccessDescriptor"/> + <service name="com.sun.star.text.MailMerge"/> + </implementation> + <implementation name="SwXModule"> + <service name="com.sun.star.text.GlobalSettings"/> + </implementation> + <implementation name="com.sun.star.comp.Writer.FilterOptionsDialog"> + <service name="com.sun.star.ui.dialogs.FilterOptionsDialog"/> + </implementation> + <implementation name="com.sun.star.comp.Writer.GlobalDocument"> + <service name="com.sun.star.text.GlobalDocument"/> + </implementation> + <implementation name="com.sun.star.comp.Writer.TextDocument"> + <service name="com.sun.star.text.TextDocument"/> + </implementation> + <implementation name="com.sun.star.comp.Writer.WebDocument"> + <service name="com.sun.star.text.WebDocument"/> + </implementation> + <implementation name="com.sun.star.comp.Writer.WriterModule"> + <service name="com.sun.star.text.ModuleDispatcher"/> + </implementation> + <implementation name="com.sun.star.comp.Writer.XMLContentExporter"> + <service name="com.sun.star.comp.Writer.XMLContentExporter"/> + </implementation> + <implementation name="com.sun.star.comp.Writer.XMLExporter"> + <service name="com.sun.star.comp.Writer.XMLExporter"/> + </implementation> + <implementation name="com.sun.star.comp.Writer.XMLMetaExporter"> + <service name="com.sun.star.comp.Writer.XMLMetaExporter"/> + </implementation> + <implementation name="com.sun.star.comp.Writer.XMLOasisContentExporter"> + <service name="com.sun.star.comp.Writer.XMLOasisContentExporter"/> + </implementation> + <implementation name="com.sun.star.comp.Writer.XMLOasisContentImporter"> + <service name="com.sun.star.comp.Writer.XMLOasisContentImporter"/> + </implementation> + <implementation name="com.sun.star.comp.Writer.XMLOasisExporter"> + <service name="com.sun.star.comp.Writer.XMLOasisExporter"/> + </implementation> + <implementation name="com.sun.star.comp.Writer.XMLOasisImporter"> + <service name="com.sun.star.comp.Writer.XMLOasisImporter"/> + </implementation> + <implementation name="com.sun.star.comp.Writer.XMLOasisMetaExporter"> + <service name="com.sun.star.comp.Writer.XMLOasisMetaExporter"/> + </implementation> + <implementation name="com.sun.star.comp.Writer.XMLOasisMetaImporter"> + <service name="com.sun.star.comp.Writer.XMLOasisMetaImporter"/> + </implementation> + <implementation name="com.sun.star.comp.Writer.XMLOasisSettingsExporter"> + <service name="com.sun.star.comp.Writer.XMLOasisSettingsExporter"/> + </implementation> + <implementation name="com.sun.star.comp.Writer.XMLOasisSettingsImporter"> + <service name="com.sun.star.comp.Writer.XMLOasisSettingsImporter"/> + </implementation> + <implementation name="com.sun.star.comp.Writer.XMLOasisStylesExporter"> + <service name="com.sun.star.comp.Writer.XMLOasisStylesExporter"/> + </implementation> + <implementation name="com.sun.star.comp.Writer.XMLOasisStylesImporter"> + <service name="com.sun.star.comp.Writer.XMLOasisStylesImporter"/> + </implementation> + <implementation name="com.sun.star.comp.Writer.XMLSettingsExporter"> + <service name="com.sun.star.comp.Writer.XMLSettingsExporter"/> + </implementation> + <implementation name="com.sun.star.comp.Writer.XMLStylesExporter"> + <service name="com.sun.star.comp.Writer.XMLStylesExporter"/> + </implementation> + <implementation name="com.sun.star.util.comp.FinalThreadManager"> + <service name="com.sun.star.util.JobManager"/> + </implementation> +</component> diff --git a/sw/util/swd.component b/sw/util/swd.component new file mode 100644 index 000000000000..c89c007ec30a --- /dev/null +++ b/sw/util/swd.component @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!--********************************************************************** +* +* 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. +* +**********************************************************************--> + +<component loader="com.sun.star.loader.SharedLibrary" + xmlns="http://openoffice.org/2010/uno-components"> + <implementation name="com.sun.star.comp.writer.FormatDetector"> + <service name="com.sun.star.frame.ExtendedTypeDetection"/> + <service name="com.sun.star.text.FormatDetector"/> + <service name="com.sun.star.text.W4WFormatDetector"/> + </implementation> +</component> diff --git a/sw/util/vbaswobj.component b/sw/util/vbaswobj.component new file mode 100644 index 000000000000..e6c6fe4a4149 --- /dev/null +++ b/sw/util/vbaswobj.component @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!--********************************************************************** +* +* 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. +* +**********************************************************************--> + +<component loader="com.sun.star.loader.SharedLibrary" + xmlns="http://openoffice.org/2010/uno-components"> + <implementation name="SwVbaDocument"> + <service name="ooo.vba.word.Document"/> + </implementation> + <implementation name="SwVbaEventsHelper"> + <service name="com.sun.star.document.vba.VBATextEventProcessor"/> + </implementation> + <implementation name="SwVbaGlobals"> + <service name="ooo.vba.word.Globals"/> + </implementation> + <implementation name="SwVbaWrapFormat"> + <service name="ooo.vba.word.WrapFormat"/> + </implementation> +</component> |