Kaydet (Commit) d7913668 authored tarafından Jens-Heiner Rechtien's avatar Jens-Heiner Rechtien

initial import

üst
/*************************************************************************
*
* $RCSfile: action.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 16:57:24 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library 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 for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef ACTION_HXX
#define ACTION_HXX
#ifndef _UNDO_HXX //autogen
#include <svtools/undo.hxx>
#endif
#ifndef FORMAT_HXX
#include "format.hxx"
#endif
class SmDocShell;
class SmEditAction: public SfxUndoAction
{
SmDocShell *pDoc;
String aOldText;
String aNewText;
public:
SmEditAction(SmDocShell *pDocSh, const String& rOldText, const String& rNewText);
virtual void Undo();
virtual void Redo();
virtual void Repeat(SmDocShell *pDocSh);
virtual String GetComment() const;
};
class SmFormatAction: public SfxUndoAction
{
SmDocShell *pDoc;
SmFormat aOldFormat;
SmFormat aNewFormat;
public:
SmFormatAction(SmDocShell *pDocSh, const SmFormat& rOldFormat, const SmFormat& rNewFormat);
virtual void Undo();
virtual void Redo();
virtual void Repeat(SmDocShell *pDocSh);
virtual String GetComment() const;
};
#endif
/*************************************************************************
*
* $RCSfile: applicat.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 16:57:24 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library 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 for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef APPLICAT_HXX
#define APPLICAT_HXX
class SvxErrorHandler;
#ifndef _SFXAPP_HXX //autogen
#include <sfx2/app.hxx>
#endif
/**************************************************************************/
/*
**
** MACRO DEFINITION
**
**/
#define SMDLL 1
#define APPLICATIONNAME "smath3"
/**************************************************************************/
/*
**
** CLASS DEFINITION
**
**/
#ifdef WIN
#define RELEASE "WIN304"
#endif
#ifdef PM2
#define RELEASE "PM304"
#endif
#ifdef MAC
#define RELEASE "MAC304"
#endif
#ifdef WNT
#define RELEASE "WNT304"
#endif
#ifdef UNX
#define RELEASE "UNX304"
#endif
#ifndef SMDLL
class SmResId : public ResId
{
public:
SmResId(USHORT nId) :
ResId(nId)
{
}
};
#endif
#ifndef _DLL_
class SmDLL;
class SmApplicat: public SfxApplication
{
protected:
SvxErrorHandler *pSvxErrorHandler;
// factories
virtual SfxFileDialog* CreateDocFileDialog(ULONG nBits,
const SfxObjectFactory &rFact);
virtual void OpenClients();
// initialization / deinitialization
#ifndef VCL
virtual void Init(int nArgs, char* pArgs[]);
#else
virtual void Init();
#endif
virtual void Exit();
public:
#ifndef VCL
void Main(int nArgc, char* pArgv[]);
#else
void Main();
#endif
SmApplicat() :
SfxApplication("iso")
{
}
};
#endif
#endif
/*************************************************************************
*
* $RCSfile: config.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 16:57:24 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library 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 for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef CONFIG_HXX
#define CONFIG_HXX
#ifndef _SFXBRDCST_HXX //autogen
#include <svtools/brdcst.hxx>
#endif
#ifndef _SFXLSTNER_HXX //autogen
#include <svtools/lstner.hxx>
#endif
#ifndef _SFXCFGITEM_HXX //autogen
#include <sfx2/cfgitem.hxx>
#endif
#ifndef _FORMAT_HXX
#include "format.hxx"
#endif
#define HINT_CONFIGCHANGED 10002
#define SMCONFIGITEM (SID_SMA_START+1)
class SmPreferenceDialog;
class SmPrintDialog;
class SmPrintOptionDialog;
class SfxItemSet;
enum SmPrintSize { PRINT_SIZE_NORMAL, PRINT_SIZE_SCALED, PRINT_SIZE_ZOOMED };
class SmConfig : public SfxBroadcaster, public SfxListener, public SfxConfigItem
{
String aSymbolFile;
SmFormat aStandardFormat;
SmFontPickList vFontPickList[7];
SmPrintSize ePrintSize;
USHORT nPrintZoom;
BOOL bPrintTitle,
bPrintText,
bPrintFrame,
bWarnNoSymbols,
bToolBoxVisible,
bCmdBoxWindow,
bAutoRedraw,
bFormulaCursor,
bNoRightSpaces; // ignorieren von ~ und ` am Zeilenende
virtual void SFX_NOTIFY(SfxBroadcaster &rBC, const TypeId &rBCType,
const SfxHint &rHint, const TypeId &rHintType);
void ConfigChangedAction();
void SetValueIfNE(BOOL &rItem, const BOOL bVal);
public:
SmConfig();
virtual ~SmConfig();
virtual int Load (SvStream &rStream);
virtual BOOL Store(SvStream &rStream);
virtual void UseDefault();
virtual String GetName() const;
SmFormat & GetFormat() { return aStandardFormat; }
SmFontPickList & GetFontPickList(USHORT nIdent) { return vFontPickList[nIdent]; }
const String & GetSymbolFile() const { return aSymbolFile; }
void SetSymbolFile(const String &rText);
SmPrintSize GetPrintSize() const { return ePrintSize; }
USHORT GetPrintZoom() const { return nPrintZoom; }
BOOL IsCmdBoxWindowEnabled() const { return bCmdBoxWindow; }
BOOL IsPrintTitle() const { return bPrintTitle; }
BOOL IsPrintText() const { return bPrintText; }
BOOL IsPrintFrame() const { return bPrintFrame; }
BOOL IsNoRightSpaces() const { return bNoRightSpaces; }
BOOL IsToolBoxVisible() const { return bToolBoxVisible; }
void SetToolBoxVisible(BOOL bVal) { SetValueIfNE(bToolBoxVisible, bVal); }
BOOL IsAutoRedraw() const { return bAutoRedraw; }
void SetAutoRedraw(BOOL bVal) { SetValueIfNE(bAutoRedraw, bVal); }
BOOL IsWarnNoSymbols() const { return bWarnNoSymbols; }
void SetWarnNoSymbols(BOOL bVal) { SetValueIfNE(bWarnNoSymbols, bVal); }
BOOL IsShowFormulaCursor() const { return bFormulaCursor; }
void SetShowFormulaCursor(BOOL bVal) { SetValueIfNE(bFormulaCursor, bVal); }
void ItemSetToConfig(const SfxItemSet &rSet);
void ConfigToItemSet(SfxItemSet &rSet) const;
friend SvStream & operator << (SvStream &rStream, const SmConfig &rConfig);
friend SvStream & operator >> (SvStream &rStream, SmConfig &rConfig);
};
#endif
This diff is collapsed.
/*************************************************************************
*
* $RCSfile: document.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 16:57:24 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library 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 for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef DOCUMENT_HXX
#define DOCUMENT_HXX
#define SMDLL 1
#ifndef _SVSTOR_HXX //autogen
#include <so3/svstor.hxx>
#endif
#ifndef _SOT_SOTREF_HXX //autogen
#include <sot/sotref.hxx>
#endif
#ifndef _SFX_OBJSH_HXX //autogen
#include <sfx2/objsh.hxx>
#endif
#ifndef _SFX_INTERNO_HXX //autogen
#include <sfx2/interno.hxx>
#endif
#ifndef _SFXLSTNER_HXX //autogen
#include <svtools/lstner.hxx>
#endif
#ifndef _SFX_OBJFAC_HXX //autogen
#include <sfx2/docfac.hxx>
#endif
#ifndef _SV_VIRDEV_HXX //autogen
#include <vcl/virdev.hxx>
#endif
#ifndef _FORMAT_HXX
#include "format.hxx"
#endif
#ifndef PARSE_HXX
#include "parse.hxx"
#endif
#ifndef SMMOD_HXX
#include "smmod.hxx"
#endif
class SmNode;
class SfxPrinter;
class Printer;
#ifndef SO2_DECL_SVSTORAGESTREAM_DEFINED
#define SO2_DECL_SVSTORAGESTREAM_DEFINED
SO2_DECL_REF(SvStorageStream)
#endif
#define HINT_DATACHANGED 1004
#define SM30BIDENT ((ULONG)0x534D3033L)
#define SM30IDENT ((ULONG)0x30334d53L)
#define SM304AIDENT ((ULONG)0x34303330L)
#define SM30VERSION ((ULONG)0x00010000L)
#define SM50VERSION ((ULONG)0x00010001L) //Unterschied zur SM30VERSION ist
//der neue Border im Format.
#define FRMIDENT ((ULONG)0x03031963L)
#define FRMVERSION ((ULONG)0x00010001L)
/* Zugriff auf den Drucker sollte ausschliesslich ueber diese Klasse erfolgen
* ==========================================================================
*
* Der Drucker kann dem Dokument oder auch dem OLE-Container gehoeren. Wenn
* das Dokument also eine OLE-Dokument ist, so gehoert der Drucker auch
* grundsaetzlich dem Container. Der Container arbeitet aber eventuell mit
* einer anderen MapUnit als der Server. Der Drucker wird bezueglich des MapMode
* im Konstruktor entsprechend eingestellt und im Destruktor wieder restauriert.
* Das bedingt natuerlich, das diese Klasse immer nur kurze Zeit existieren darf
* (etwa waehrend des Paints).
* Die Kontrolle darueber ob der Drucker selbst angelegt, vom Server besorgt
* oder dann auch NULL ist, uebernimmt die DocShell in der Methode GetPrt(),
* fuer die der Access auch Friend der DocShell ist.
*/
class SmDocShell;
class SmPrinterAccess
{
Printer *pPrinter;
public:
SmPrinterAccess( SmDocShell &rDocShell );
~SmPrinterAccess();
Printer *GetPrinter() { return pPrinter; }
};
////////////////////////////////////////////////////////////
class SmDocShell : public SfxObjectShell, public SfxInPlaceObject, public SfxListener
{
friend class SmPrinterAccess;
String aText;
SmFormat aFormat;
SmParser aInterpreter;
SvDataTypeList aDataTypeList;
SvStorageStreamRef aDocStream;
SmNode *pTree;
SvInPlaceMenuBar *pMenuBar;
SfxMenuBarManager *pMenuMgr;
SfxUndoManager *pUndoMgr;
SfxPrinter *pPrinter; //Siehe Kommentar zum SmPrinter Access!
Printer *pTmpPrinter; //ebenfalls
long nLeftBorder,
nRightBorder,
nTopBorder,
nBottomBorder;
USHORT nModifyCount;
BOOL bIsFormulaArranged;
virtual void SFX_NOTIFY(SfxBroadcaster& rBC, const TypeId& rBCType,
const SfxHint& rHint, const TypeId& rHintType);
void RestartFocusTimer ();
BOOL Try3x( SvStorage *pStor, StreamMode eMode);
BOOL Try2x( SvStorage *pStor, StreamMode eMode);
BOOL WriteAsMathType3( SfxMedium& );
virtual void Draw(OutputDevice *pDevice,
const JobSetup & rSetup,
USHORT nAspect = ASPECT_CONTENT);
virtual void FillRegInfo(SvEmbeddedRegistryInfo * pInfo);
virtual void FillClass(SvGlobalName* pClassName,
ULONG* pFormat,
String* pAppName,
String* pFullTypeName,
String* pShortTypeName,
long nFileFormat = SOFFICE_FILEFORMAT_NOW) const;
virtual const SvDataTypeList& GetTypeList() const;
virtual BOOL GetData(SvData *pData);
virtual BOOL SetData(SvData *pData);
virtual ULONG GetMiscStatus() const;
virtual void OnDocumentPrinterChanged( Printer * );
virtual BOOL InitNew(SvStorage *);
virtual BOOL Load(SvStorage *);
virtual BOOL Insert(SvStorage *);
void ImplSave( SvStorageStreamRef xStrm );
virtual BOOL Save();
virtual BOOL SaveAs( SvStorage *pNewStor );
virtual BOOL ConvertTo( SfxMedium &rMedium );
virtual BOOL SaveCompleted( SvStorage *pNewStor );
virtual void HandsOff();
Printer *GetPrt();
void Convert40To50Txt();
BOOL IsFormulaArranged() const { return bIsFormulaArranged; }
void SetFormulaArranged(BOOL bVal) { bIsFormulaArranged = bVal; }
void ArrangeFormula();
virtual BOOL ConvertFrom(SfxMedium &rMedium);
BOOL InsertFrom(SfxMedium &rMedium);
BOOL ImportSM20File(SvStream *pStream, BOOL bInsert = FALSE);
public:
TYPEINFO();
SFX_DECL_INTERFACE(SFX_INTERFACE_SMA_START+1);
#if 0
SFX_DECL_OBJECTFACTORY(SmDocShell);
#else
SFX_DECL_OBJECTFACTORY_DLL(SmDocShell, SM_MOD());
#endif
SmDocShell(SfxObjectCreateMode eMode = SFX_CREATE_MODE_EMBEDDED);
virtual ~SmDocShell();
void LoadSymbols();
void SaveSymbols();
//Zugriff fuer die View. Diese Zugriffe sind nur fuer den nicht OLE-Fall!
//und fuer die Kommunikation mit dem SFX!
//Alle internen Verwendungen des Printers sollten ausschlieslich uber
//den SmPrinterAccess funktionieren.
BOOL HasPrinter() { return 0 != pPrinter; }
SfxPrinter *GetPrinter() { GetPrt(); return pPrinter; }
void SetPrinter( SfxPrinter * );
const String &GetTitle() const;
const String &GetComment() const;
void SetText(const String& rBuffer);
String& GetText() { return (aText); }
void SetFormat(SmFormat& rFormat);
SmFormat& GetFormat() { return (aFormat); }
void Parse();
SmParser & GetParser() { return aInterpreter; }
const SmNode * GetFormulaTree() const { return pTree; }
void Draw(OutputDevice &rDev, Point &rPosition);
Size GetSize();
void Resize();
virtual SfxUndoManager *GetUndoManager ();
virtual SfxItemPool& GetPool();
void Execute( SfxRequest& rReq );
void GetState(SfxItemSet &);
virtual SvDataMemberObjectRef CreateSnapshot ();
virtual void SetVisArea (const Rectangle & rVisArea);
virtual void UIActivate (BOOL bActivate);
virtual void SetModified(BOOL bModified);
};
#endif
/*************************************************************************
*
* $RCSfile: edit.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 16:57:24 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library 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 for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef EDIT_HXX
#define EDIT_HXX
#ifndef _SV_WINDOW_HXX //autogen
#include <vcl/window.hxx>
#endif
#ifndef _SV_TIMER_HXX //autogen
#include <vcl/timer.hxx>
#endif
#ifndef _MyEDITDATA_HXX //autogen
#include <svx/editdata.hxx>
#endif
class SmDocShell;
class SmViewShell;
class EditView;
class EditEngine;
class EditStatus;
class ScrollBar;
class ScrollBarBox;
class DataChangedEvent;
class Menu;
/**************************************************************************/
void SmGetLeftSelectionPart(const ESelection aSelection,
USHORT &nPara, USHORT &nPos);
/**************************************************************************/
class SmEditWindow: public Window
{
EditView *pEditView;
#if SUPD >= 602
SfxItemPool *pEditEngineItemPool;
#endif
EditEngine *pEditEngine;
ScrollBar *pHScrollBar,
*pVScrollBar;
ScrollBarBox *pScrollBox;
Timer aModifyTimer,
aCursorMoveTimer;
ESelection aOldSelection;
virtual void KeyInput(const KeyEvent& rKEvt);
virtual void Command(const CommandEvent& rCEvt);
DECL_LINK(MenuSelectHdl, Menu *);
DECL_LINK(ModifyTimerHdl, Timer *);
DECL_LINK(CursorMoveTimerHdl, Timer *);
virtual void DataChanged( const DataChangedEvent& );
virtual void Resize();
virtual void MouseMove(const MouseEvent &rEvt);
virtual void MouseButtonUp(const MouseEvent &rEvt);
virtual void MouseButtonDown(const MouseEvent &rEvt);
virtual BOOL Drop(const DropEvent& rEvt);
virtual BOOL QueryDrop(DropEvent & rEvt);
virtual void Paint(const Rectangle& rRect);
DECL_LINK(EditStatusHdl ,EditStatus *);
DECL_LINK(ScrollHdl, ScrollBar *);
void CreateEditEngine();
Rectangle AdjustScrollBars();
void SetScrollBarRanges();
void InitScrollBars();
void ImplSetFont();
public:
SmEditWindow(Window *pParent);
~SmEditWindow();
virtual void SetText(const XubString &rText);
virtual XubString GetText();
ESelection GetSelection() const;
void SetSelection(const ESelection &rSel);
BOOL IsEmpty() const;
BOOL IsSelected() const;
BOOL IsAllSelected() const;
void Cut();
void Copy();
void Paste();
void Delete();
void SelectAll();
void InsertText(const String &rText);
void InsertCommand(USHORT nCommand);
void MarkError(const Point &rPos);
void SelNextMark();
void SelPrevMark();
BOOL HasMark(const String &rText) const;
void Flush();
};
#endif
/*************************************************************************
*
* $RCSfile: format.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 16:57:24 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library 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 for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef FORMAT_HXX
#define FORMAT_HXX
#ifndef _SFXSMPLHINT_HXX //autogen
#include <svtools/smplhint.hxx>
#endif
#ifndef _SFXBRDCST_HXX //autogen
#include <svtools/brdcst.hxx>
#endif
#ifndef UTILITY_HXX
#include "utility.hxx"
#endif
#define SM_FMT_VERSION_51 ((BYTE) 0x01)
#define SM_FMT_VERSION_NOW SM_FMT_VERSION_51
#ifndef MAC
#define FNTNAME_TIMES "Times New Roman"
#else
#define FNTNAME_TIMES "Times"
#endif
#define FNTNAME_HELV "Helvetica"
#define FNTNAME_COUR "Courier"
#define FNTNAME_MATH "StarMath"
// symbolic names used as array indices
#define SIZ_BEGIN 0
#define SIZ_TEXT 0
#define SIZ_INDEX 1
#define SIZ_FUNCTION 2
#define SIZ_OPERATOR 3
#define SIZ_LIMITS 4
#define SIZ_END 4
// symbolic names used as array indices
#define FNT_BEGIN 0
#define FNT_VARIABLE 0
#define FNT_FUNCTION 1
#define FNT_NUMBER 2
#define FNT_TEXT 3
#define FNT_SERIF 4
#define FNT_SANS 5
#define FNT_FIXED 6
#define FNT_MATH 7
#define FNT_END 7
// symbolic names used as array indices
#define DIS_BEGIN 0
#define DIS_HORIZONTAL 0
#define DIS_VERTICAL 1
#define DIS_ROOT 2
#define DIS_SUPERSCRIPT 3
#define DIS_SUBSCRIPT 4
#define DIS_NUMERATOR 5
#define DIS_DENOMINATOR 6
#define DIS_FRACTION 7
#define DIS_STROKEWIDTH 8
#define DIS_UPPERLIMIT 9
#define DIS_LOWERLIMIT 10
#define DIS_BRACKETSIZE 11
#define DIS_BRACKETSPACE 12
#define DIS_MATRIXROW 13
#define DIS_MATRIXCOL 14
#define DIS_ORNAMENTSIZE 15
#define DIS_ORNAMENTSPACE 16
#define DIS_OPERATORSIZE 17
#define DIS_OPERATORSPACE 18
#define DIS_LEFTSPACE 19
#define DIS_RIGHTSPACE 20
#define DIS_TOPSPACE 21
#define DIS_BOTTOMSPACE 22
#define DIS_NORMALBRACKETSIZE 23
#define DIS_END 23
// to be broadcastet on format changes:
#define HINT_FORMATCHANGED 10003
enum SmHorAlign { AlignLeft, AlignCenter, AlignRight };
class SmFormat : public SfxBroadcaster
{
SmFace vFont[FNT_END + 1];
Size aBaseSize;
long nVersion;
USHORT vSize[SIZ_END + 1];
USHORT vDist[DIS_END + 1];
SmHorAlign eHorAlign;
BOOL bIsTextmode,
bScaleNormalBrackets;
public:
SmFormat();
SmFormat(const SmFormat &rFormat) { *this = rFormat; }
const Size & GetBaseSize() const { return aBaseSize; }
void SetBaseSize(const Size &rSize) { aBaseSize = rSize; }
const SmFace & GetFont(USHORT nIdent) const { return vFont[nIdent]; }
SmFace & Font (USHORT nIdent) { return vFont[nIdent]; }
void SetFont(USHORT nIdent, const SmFace &rFont) { vFont[nIdent] = rFont; }
USHORT GetRelSize(USHORT nIdent) const { return vSize[nIdent]; }
void SetRelSize(USHORT nIdent, USHORT nVal) { vSize[nIdent] = nVal;}
USHORT GetDistance(USHORT nIdent) const { return vDist[nIdent]; }
void SetDistance(USHORT nIdent, USHORT nVal) { vDist[nIdent] = nVal; }
SmHorAlign GetHorAlign() const { return eHorAlign; }
void SetHorAlign(SmHorAlign eAlign) { eHorAlign = eAlign; }
BOOL IsTextmode() const { return bIsTextmode; }
void SetTextmode(BOOL bVal) { bIsTextmode = bVal; }
BOOL IsScaleNormalBrackets() const { return bScaleNormalBrackets; }
void SetScaleNormalBrackets(BOOL bVal) { bScaleNormalBrackets = bVal; }
long GetVersion() const { return nVersion; }
//! at time (5.1) use only the lower byte!!!
void SetVersion(long nVer) { nVersion = nVer; }
SmFormat & operator = (const SmFormat &rFormat);
void RequestApplyChanges() const
{
((SmFormat *) this)->Broadcast(SfxSimpleHint(HINT_FORMATCHANGED));
}
// functions for compatibility with older versions
void ReadSM20Format(SvStream &rStream);
void From300To304a();
friend SvStream & operator << (SvStream &rStream, const SmFormat &rFormat);
friend SvStream & operator >> (SvStream &rStream, SmFormat &rFormat);
};
#endif
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/*************************************************************************
*
* $RCSfile: smdll.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 16:57:24 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library 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 for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef SMDLL_HXX
#define SMDLL_HXX
#define SMDLL 1
#ifndef _SMDLL0_HXX
#include <smdll0.hxx>
#endif
#ifndef _TOOLS_RESID_HXX //autogen
#include <tools/resid.hxx>
#endif
#ifndef _SFXDEFS_HXX
#include <sfx2/sfxdefs.hxx>
#endif
class SmData;
class SfxMedium;
class SfxFilter;
class SmDLL
{
static BOOL bInitialized;
public:
SmDLL();
~SmDLL();
static void Init();
static void LibInit();
static void Exit();
static void LibExit();
static ULONG DetectFilter( SfxMedium& rMedium, const SfxFilter **ppFilter,
SfxFilterFlags nMust, SfxFilterFlags nDont );
};
#ifdef SMDLL
class SmResId : public ResId
{
public:
SmResId(USHORT nId) :
ResId(nId, SM_MOD()->GetResMgr())
{
}
};
#endif
#endif
/*************************************************************************
*
* $RCSfile: smmod.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 16:57:24 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library 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 for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _SMMOD_HXX
#define _SMMOD_HXX
#ifndef _SMDLL_HXX
#define _SM_DLL // fuer SD_MOD()
#include "smdll.hxx" // fuer SdModuleDummy
#endif
class SvxErrorHandler;
class SvFactory;
class SmConfig;
class SmSymSetManager;
class SmModule;
/*************************************************************************
|*
|* This subclass of <SfxModule> (which is a subclass of <SfxShell>) is
|* linked to the DLL. One instance of this class exists while the DLL is
|* loaded.
|*
|* SdModule is like to be compared with the <SfxApplication>-subclass.
|*
|* Remember: Don`t export this class! It uses DLL-internal symbols.
|*
\************************************************************************/
class SmRectCache;
class SmModule : public SmModuleDummy
{
SmConfig *pConfig;
SmSymSetManager *pSymSetManager;
SmRectCache *pRectCache;
virtual void FillStatusBar(StatusBar &rBar);
public:
TYPEINFO();
SFX_DECL_INTERFACE(SFX_INTERFACE_SMA_START + 0);
SmModule(SvFactory* pObjFact);
virtual ~SmModule();
virtual SfxModule * Load();
virtual void Free();
SmConfig * GetConfig() { return pConfig; }
SmSymSetManager * GetSymSetManager() { return pSymSetManager; }
SmRectCache * GetRectCache() { return pRectCache; }
void GetState(SfxItemSet&);
void InitManager();
//virtuelle Methoden fuer den Optionendialog
virtual SfxItemSet* CreateItemSet( USHORT nId );
virtual void ApplyItemSet( USHORT nId, const SfxItemSet& rSet );
virtual SfxTabPage* CreateTabPage( USHORT nId, Window* pParent, const SfxItemSet& rSet );
};
#define SM_MOD1() ( *(SmModule**) GetAppData(SHL_SM) )
#endif // _SDMOD_HXX
This diff is collapsed.
/*************************************************************************
*
* $RCSfile: symbol.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 16:57:25 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library 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 for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef SYMBOL_HXX
#define SYMBOL_HXX
#ifndef _FONT_HXX //autogen
#include <vcl/font.hxx>
#endif
#ifndef _LIST_HXX //autogen
#include <tools/list.hxx>
#endif
#ifndef _TOOLS_DEBUG_HXX //autogen
#include <tools/debug.hxx>
#endif
#ifndef _SFXLSTNER_HXX //autogen
#include <svtools/lstner.hxx>
#endif
#ifndef _DYNARY_HXX //autogen
#include <tools/dynary.hxx>
#endif
#ifndef UTILITY_HXX
#include "utility.hxx"
#endif
#define SS_ATTR_ACCESS 0x80
#define SYMBOLSET_NONE 0xFFFF
#define SYMBOL_NONE 0xFFFF
////////////////////////////////////////////////////////////////////////////////
class SmSym
{
friend class SmSymSetManager;
SmFace Face;
String Name;
SmSym *pHashNext;
SmSymSetManager *pSymSetManager;
sal_Unicode Character;
BYTE Attribut;
public:
SmSym();
SmSym(const SmSym& rSymbol);
SmSym(const String& rName, const Font& rFont, sal_Unicode aChar);
SmSym& operator = (const SmSym& rSymbol);
void SetSymbolName(const String& rName);
const Font& GetFace() const { return Face; }
sal_Unicode GetCharacter() const { return Character; }
const String& GetName() const { return Name; }
Font& GetFace() { return Face; }
sal_Unicode& GetCharacter() { return Character; }
String& GetName() { return Name; }
friend SvStream& operator << (SvStream& rStream, const SmSym& rSymbol);
friend SvStream& operator >> (SvStream& rStream, SmSym& rSymbol);
};
DECLARE_LIST(SmListSym, SmSym *);
/**************************************************************************/
class SmSymSet
{
friend class SmSymSetManager;
SmListSym SymbolList;
String Name;
SmSymSetManager *pSymSetManager;
public:
SmSymSet();
SmSymSet(const SmSymSet& rSymbolSet);
SmSymSet(const String& rName);
~SmSymSet();
SmSymSet& operator = (const SmSymSet& rSymbolSet);
const String& GetName() const { return Name; }
void SetName(String& rName);
USHORT GetCount() const { return (USHORT) SymbolList.Count(); }
const SmSym& GetSymbol(USHORT SymbolNo) const
{
DBG_ASSERT(SymbolList.GetObject(SymbolNo), "Symbol nicht vorhanden");
return *SymbolList.GetObject(SymbolNo);
}
USHORT AddSymbol(SmSym* pSymbol);
void DeleteSymbol(USHORT SymbolNo);
void RenameSymbol(USHORT SymbolNo, String& rName);
void ReplaceSymbol(USHORT SymbolNo, SmSym& rSymbol);
SmSym * RemoveSymbol(USHORT SymbolNo);
USHORT GetSymbolPos(const String& rName);
friend SvStream& operator << (SvStream& rStream, const SmSymSet& rSymbolSet);
friend SvStream& operator >> (SvStream& rStream, SmSymSet& rSymbolSet);
};
DECLARE_DYNARRAY(SmArraySymSet, SmSymSet *)
/**************************************************************************/
class SmSymbolDialog;
class SmSymSetManager : public SfxListener
{
SmArraySymSet SymbolSets;
String aStreamName;
SmSym **HashEntries;
UINT32 NoSymbolSets;
UINT32 NoHashEntries;
BOOL Modified;
virtual void SFX_NOTIFY(SfxBroadcaster& rBC, const TypeId& rBCType,
const SfxHint& rHint, const TypeId& rHintType);
UINT32 GetHashIndex(const String& rSymbolName);
void EnterHashTable(SmSymSet& rSymbolSet);
void FillHashTable();
public:
void Init();
void Exit();
SmSymSetManager(UINT32 HashTableSize = 137);
SmSymSetManager(const SmSymSetManager& rSymbolSetManager);
~SmSymSetManager();
SmSymSetManager& operator = (const SmSymSetManager& rSymbolSetManager);
USHORT GetCount() const { return NoSymbolSets; }
SmSymSet *GetSymbolSet(USHORT SymbolSetNo) const { return SymbolSets.Get(SymbolSetNo);}
USHORT AddSymbolSet(SmSymSet* pSymbolSet);
void ChangeSymbolSet(SmSymSet* pSymbolSet);
void DeleteSymbolSet(USHORT SymbolSetNo);
USHORT GetSymbolSetPos(const String& rSymbolSetName) const;
SmSym * GetSymbol(const String& rSymbolName);
const SmSym * GetSymbol(const String& rSymbolName) const
{
return ((SmSymSetManager *) this)->GetSymbol(rSymbolName);
}
void AppendExtraSymbolSet(SmSymSet* pSymbolSet) {}
void ResetAccessedSymbols() {}
SmSymSet GetAccessedSymbols() { return SmSymSet(); }
BOOL IsModified() const { return (Modified); }
void SetModified(BOOL Modify) { Modified = Modify; }
void Load(const String& rURL);
void Save();
friend SvStream& operator << (SvStream& rStream, SmSymSetManager& rSymbolSetManager);
friend SvStream& operator >> (SvStream& rStream, SmSymSetManager& rSymbolSetManager);
};
#endif
/*************************************************************************
*
* $RCSfile: toolbox.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 16:57:25 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library 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 for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef TOOLBOX_HXX
#define TOOLBOX_HXX
#ifndef _BASEDLGS_HXX //autogen
#include <sfx2/basedlgs.hxx>
#endif
#ifndef _SFX_CHILDWIN_HXX //autogen
#include <sfx2/childwin.hxx>
#endif
#ifndef _SV_TOOLBOX_HXX //autogen
#include <vcl/toolbox.hxx>
#endif
#ifndef _SMMOD_HXX
#include "smmod.hxx"
#endif
#ifndef CONFIG_HXX
#include "config.hxx"
#endif
#define NUM_TBX_CATEGORIES 9
class SmToolBoxWindow : public SfxFloatingWindow
{
protected:
ToolBox aToolBoxCat;
ToolBox *pToolBoxCmd;
ToolBox *vToolBoxCategories[NUM_TBX_CATEGORIES];
USHORT nActiveCategory;
virtual BOOL Close();
DECL_LINK( CategoryClickHdl, ToolBox* );
DECL_LINK( CmdSelectHdl, ToolBox* );
public:
SmToolBoxWindow(SfxBindings *pBindings,
SfxChildWindow *pChildWindow,
Window *pParent);
~SmToolBoxWindow();
// Window
virtual void StateChanged( StateChangedType nStateChange );
void AdjustPosition(const Point &rPoint);
void SetCategory(USHORT nCategory);
void ShowWindows();
};
/**************************************************************************/
class SmToolBoxWrapper : public SfxChildWindow
{
SFX_DECL_CHILDWINDOW(SmToolBoxWrapper);
protected:
SmToolBoxWrapper(Window *pParentWindow,
USHORT, SfxBindings*, SfxChildWinInfo*);
};
#endif
/*************************************************************************
*
* $RCSfile: types.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 16:57:25 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library 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 for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef TYPES_HXX
#define TYPES_HXX
////////////////////////////////////////
// enum definitions for characters from the 'StarMath' font
// (some chars have more than one alias!)
//! Note: not listed here does not(!) mean "not used"
//! (see %alpha ... %gamma for example)
//
enum MathSymbol
{
MS_FACT = (xub_Unicode) 0xF021,
MS_INFINITY = (xub_Unicode) 0xF027,
MS_SLASH = (xub_Unicode) 0xF02F,
MS_NDIVIDES = (xub_Unicode) 0xF030,
MS_DRARROW = (xub_Unicode) 0xF031,
MS_DLARROW = (xub_Unicode) 0xF032,
MS_DLRARROW = (xub_Unicode) 0xF033,
MS_UNDERBRACE = (xub_Unicode) 0xF034,
MS_OVERBRACE = (xub_Unicode) 0xF035,
MS_CIRC = (xub_Unicode) 0xF036,
MS_ASSIGN = (xub_Unicode) 0xF03D,
MS_ERROR = (xub_Unicode) 0xF03F,
MS_NEQ = (xub_Unicode) 0xF040,
MS_PLUS = (xub_Unicode) 0xF041,
MS_MINUS = (xub_Unicode) 0xF042,
MS_MULTIPLY = (xub_Unicode) 0xF043,
MS_TIMES = (xub_Unicode) 0xF044,
MS_CDOT = (xub_Unicode) 0xF045,
MS_DIV = (xub_Unicode) 0xF046,
MS_PLUSMINUS = (xub_Unicode) 0xF047,
MS_MINUSPLUS = (xub_Unicode) 0xF048,
MS_OPLUS = (xub_Unicode) 0xF049,
MS_OMINUS = (xub_Unicode) 0xF04A,
MS_OTIMES = (xub_Unicode) 0xF04B,
MS_ODIVIDE = (xub_Unicode) 0xF04C,
MS_ODOT = (xub_Unicode) 0xF04D,
MS_UNION = (xub_Unicode) 0xF04E,
MS_INTERSECT = (xub_Unicode) 0xF04F,
MS_LT = (xub_Unicode) 0xF050,
MS_GT = (xub_Unicode) 0xF051,
MS_LE = (xub_Unicode) 0xF052,
MS_GE = (xub_Unicode) 0xF053,
MS_LESLANT = (xub_Unicode) 0xF054,
MS_GESLANT = (xub_Unicode) 0xF055,
MS_LL = (xub_Unicode) 0xF056,
MS_GG = (xub_Unicode) 0xF057,
MS_SIM = (xub_Unicode) 0xF058,
MS_SIMEQ = (xub_Unicode) 0xF059,
MS_APPROX = (xub_Unicode) 0xF05A,
MS_DEF = (xub_Unicode) 0xF05B,
MS_EQUIV = (xub_Unicode) 0xF05C,
MS_PROP = (xub_Unicode) 0xF05D,
MS_PARTIAL = (xub_Unicode) 0xF05E,
MS_SUBSET = (xub_Unicode) 0xF05F,
MS_SUPSET = (xub_Unicode) 0xF060,
MS_SUBSETEQ = (xub_Unicode) 0xF061,
MS_SUPSETEQ = (xub_Unicode) 0xF062,
MS_NSUBSET = (xub_Unicode) 0xF063,
MS_NSUPSET = (xub_Unicode) 0xF064,
MS_NSUBSETEQ = (xub_Unicode) 0xF065,
MS_NSUPSETEQ = (xub_Unicode) 0xF066,
MS_IN = (xub_Unicode) 0xF067,
MS_NOTIN = (xub_Unicode) 0xF068,
MS_EXISTS = (xub_Unicode) 0xF06A,
MS_BACKEPSILON = (xub_Unicode) 0xF06B,
MS_ALEPH = (xub_Unicode) 0xF06C,
MS_IM = (xub_Unicode) 0xF06D,
MS_RE = (xub_Unicode) 0xF06E,
MS_WP = (xub_Unicode) 0xF06F,
MS_LINE = (xub_Unicode) 0xF073,
MS_DLINE = (xub_Unicode) 0xF074,
MS_ORTHO = (xub_Unicode) 0xF075,
MS_DOTSLOW = (xub_Unicode) 0xF076,
MS_DOTSAXIS = (xub_Unicode) 0xF077,
MS_DOTSVERT = (xub_Unicode) 0xF078,
MS_DOTSUP = (xub_Unicode) 0xF079,
MS_DOTSDOWN = (xub_Unicode) 0xF07A,
MS_TRANSR = (xub_Unicode) 0xF07B,
MS_TRANSL = (xub_Unicode) 0xF07C,
MS_RIGHTARROW = (xub_Unicode) 0xF07D,
MS_BACKSLASH = (xub_Unicode) 0xF07E,
MS_NEG = (xub_Unicode) 0xF07F,
MS_INT = (xub_Unicode) 0xF080,
MS_IINT = (xub_Unicode) 0xF081,
MS_IIINT = (xub_Unicode) 0xF082,
MS_LINT = (xub_Unicode) 0xF083,
MS_LLINT = (xub_Unicode) 0xF084,
MS_LLLINT = (xub_Unicode) 0xF085,
MS_SQRT = (xub_Unicode) 0xF087,
MS_SQRT2 = (xub_Unicode) 0xF089,
MS_COPROD = (xub_Unicode) 0xF08A,
MS_PROD = (xub_Unicode) 0xF08B,
MS_SUM = (xub_Unicode) 0xF08C,
MS_NABLA = (xub_Unicode) 0xF08D,
MS_FORALL = (xub_Unicode) 0xF08E,
MS_HAT = (xub_Unicode) 0xF090,
MS_CHECK = (xub_Unicode) 0xF091,
MS_BREVE = (xub_Unicode) 0xF092,
MS_ACUTE = (xub_Unicode) 0xF093,
MS_GRAVE = (xub_Unicode) 0xF094,
MS_TILDE = (xub_Unicode) 0xF095,
MS_BAR = (xub_Unicode) 0xF096,
MS_VEC = (xub_Unicode) 0xF097,
MS_DOT = (xub_Unicode) 0xF098,
MS_DDOT = (xub_Unicode) 0xF099,
MS_DDDOT = (xub_Unicode) 0xF09A,
MS_CIRCLE = (xub_Unicode) 0xF09B,
MS_AND = (xub_Unicode) 0xF09C,
MS_OR = (xub_Unicode) 0xF09D,
MS_NI = (xub_Unicode) 0xF09E,
MS_EMPTYSET = (xub_Unicode) 0xF09F,
MS_LBRACE = (xub_Unicode) 0xF0A0,
MS_RBRACE = (xub_Unicode) 0xF0A1,
MS_LPARENT = (xub_Unicode) 0xF0A2,
MS_RPARENT = (xub_Unicode) 0xF0A3,
MS_LANGLE = (xub_Unicode) 0xF0A4,
MS_RANGLE = (xub_Unicode) 0xF0A5,
MS_LBRACKET = (xub_Unicode) 0xF0A6,
MS_RBRACKET = (xub_Unicode) 0xF0A7,
MS_LDBRACKET = (xub_Unicode) 0xF0B2,
MS_RDBRACKET = (xub_Unicode) 0xF0B3,
MS_PLACE = (xub_Unicode) 0xF0BF,
MS_LCEIL = (xub_Unicode) 0xF0C0,
MS_LFLOOR = (xub_Unicode) 0xF0C1,
MS_RCEIL = (xub_Unicode) 0xF0C2,
MS_RFLOOR = (xub_Unicode) 0xF0C3,
MS_SQRT2_X = (xub_Unicode) 0xF0C5,
MS_TOP = (xub_Unicode) 0xF0F5,
MS_HBAR = (xub_Unicode) 0xF0F6,
MS_LAMBDABAR = (xub_Unicode) 0xF0F7,
MS_LEFTARROW = (xub_Unicode) 0xF0F8,
MS_UPARROW = (xub_Unicode) 0xF0F9,
MS_DOWNARROW = (xub_Unicode) 0xF0FA,
MS_SETN = (xub_Unicode) 0xF0FB,
MS_SETZ = (xub_Unicode) 0xF0FC,
MS_SETQ = (xub_Unicode) 0xF0FD,
MS_SETR = (xub_Unicode) 0xF0FE,
MS_SETC = (xub_Unicode) 0xF0FF
};
#endif
/*************************************************************************
*
* $RCSfile: unomodel.hxx,v $
*
* $Revision: 1.1.1.1 $
*
* last change: $Author: hr $ $Date: 2000-09-18 16:57:25 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library 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 for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef UNOMODEL_HXX
#define UNOMODEL_HXX
#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
#include <com/sun/star/beans/XPropertySet.hpp>
#endif
#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
#include <com/sun/star/lang/XServiceInfo.hpp>
#endif
#ifndef _COM_SUN_STAR_LANG_XUNOTUNNEL_HPP_
#include <com/sun/star/lang/XUnoTunnel.hpp>
#endif
#ifndef _SFX_SFXBASEMODEL_HXX_
#include <sfx2/sfxbasemodel.hxx>
#endif
#ifndef _CPPUHELPER_IMPLBASE3_HXX_
#include <cppuhelper/implbase3.hxx> // helper for implementations
#endif
struct SfxItemPropertyMap;
//-----------------------------------------------------------------------------
typedef
cppu::WeakImplHelper3
<
::com::sun::star::beans::XPropertySet,
::com::sun::star::lang::XServiceInfo,
::com::sun::star::lang::XUnoTunnel
>
SmModelBaseClass;
class SmModel : public SmModelBaseClass,
public SfxBaseModel
{
SfxItemPropertyMap* _pMap;
public:
SmModel( SfxObjectShell *pObjSh = 0 );
virtual ~SmModel();
//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(::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL release( ) throw(::com::sun::star::uno::RuntimeException);
//XTypeProvider
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
//XUnoTunnel
virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
//XPropertySet
virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
//XServiceInfo
virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
virtual 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 );
inline ::rtl::OUString SmModel::getImplementationName_Static() throw( );
void * SAL_CALL operator new( size_t ) throw();
void SAL_CALL operator delete( void * ) throw();
};
inline ::rtl::OUString SmModel::getImplementationName_Static() throw( )
{
return rtl::OUString::createFromAscii("math.SmModel");
}
#endif
This diff is collapsed.
This diff is collapsed.
..\%__SRC%\slb\lib*.* %_DEST%\lib%_EXT%\lib*.*
..\%__SRC%\lib\lib*.* %_DEST%\lib%_EXT%\lib*.*
..\%__SRC%\slb\ysm.lib %_DEST%\lib%_EXT%\ysm.lib
..\%__SRC%\bin\smath3.exe %_DEST%\bin%_EXT%\smath3.exe
..\%__SRC%\bin\smath3.sym %_DEST%\bin%_EXT%\smath3.sym
..\%__SRC%\misc\*.map %_DEST%\bin%_EXT%\*.map
touch: ..\%__SRC%\misc\sm.hid %_DEST%\bin%_EXT%\sm.hid
..\%__SRC%\misc\sm.csv %_DEST%\inc%_EXT%\sm.csv
..\%__SRC%\bin\smslots.tlb %_DEST%\bin%_EXT%\smslots.tlb
..\%__SRC%\bin\sm%upd%*.dll %_DEST%\bin%_EXT%\sm%upd%*.dll
..\%__SRC%\bin\sm%upd%*.res %_DEST%\bin%_EXT%\sm%upd%*.res
..\%__SRC%\bin\sm%upd%*.sym %_DEST%\bin%_EXT%\sm%upd%*.sym
dos: mkdir %_DEST%\inc\starmath
hedabu: ..\inc\smdll.hxx %_DEST%\inc%_EXT%\starmath\smdll.hxx
hedabu: ..\inc\smdll0.hxx %_DEST%\inc%_EXT%\starmath\smdll0.hxx
hedabu: ..\inc\smmod.hxx %_DEST%\inc%_EXT%\starmath\smmod.hxx
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
SM_1_0 {
global:
CreateSmDocShellDll;
CreateObjSmDocShellDll;
InitSmDll;
DeInitSmDll;
local:
*;
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment