Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions main/starmath/inc/smdll.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
*
*************************************************************/


#ifndef SMDLL_HXX
#define SMDLL_HXX

Expand All @@ -33,13 +32,15 @@ class SfxFilter;

class SmDLL
{
static sal_Bool bInitialized;
static sal_Bool bInitialized;
public:
static void Init();
static void Exit();

static sal_uLong DetectFilter( SfxMedium& rMedium, const SfxFilter **ppFilter,
SfxFilterFlags nMust, SfxFilterFlags nDont );
SfxFilterFlags nMust, SfxFilterFlags nDont );
};

#endif

/* vim: set noet sw=4 ts=4: */
91 changes: 46 additions & 45 deletions main/starmath/inc/view.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
*
*************************************************************/


#ifndef VIEW_HXX
#define VIEW_HXX

Expand Down Expand Up @@ -49,20 +48,20 @@ class SmGraphicWindow : public ScrollableWindow
Point aFormulaDrawPos;
Rectangle aCursorRect;

::com::sun::star::uno::Reference<
::com::sun::star::accessibility::XAccessible > xAccessible;
SmGraphicAccessible * pAccessible;
::com::sun::star::uno::Reference<
::com::sun::star::accessibility::XAccessible > xAccessible;
SmGraphicAccessible * pAccessible;

SmViewShell *pViewShell;
SmViewShell *pViewShell;
sal_uInt16 nZoom;
short nModifyCount;
sal_Bool bIsCursorVisible;

protected:
void SetFormulaDrawPos(const Point &rPos) { aFormulaDrawPos = rPos; }
void SetIsCursorVisible(sal_Bool bVis) { bIsCursorVisible = bVis; }
using Window::SetCursor;
void SetCursor(const SmNode *pNode);
using Window::SetCursor;
void SetCursor(const SmNode *pNode);
void SetCursor(const Rectangle &rRect);

virtual void DataChanged( const DataChangedEvent& );
Expand All @@ -74,37 +73,37 @@ protected:

public:
SmGraphicWindow(SmViewShell* pShell);
~SmGraphicWindow();
~SmGraphicWindow();

// Window
virtual void MouseButtonDown(const MouseEvent &rMEvt);
virtual void GetFocus();
virtual void LoseFocus();
// Window
virtual void MouseButtonDown(const MouseEvent &rMEvt);
virtual void GetFocus();
virtual void LoseFocus();

SmViewShell * GetView() { return pViewShell; }
SmViewShell * GetView() { return pViewShell; }

using Window::SetZoom;
using Window::SetZoom;
void SetZoom(sal_uInt16 Factor);
using Window::GetZoom;
using Window::GetZoom;
sal_uInt16 GetZoom() const { return nZoom; }

const Point & GetFormulaDrawPos() const { return aFormulaDrawPos; }
const Point & GetFormulaDrawPos() const { return aFormulaDrawPos; }

void ZoomToFitInWindow();
using ScrollableWindow::SetTotalSize;
void ZoomToFitInWindow();
using ScrollableWindow::SetTotalSize;
void SetTotalSize();

sal_Bool IsCursorVisible() const { return bIsCursorVisible; }
void ShowCursor(sal_Bool bShow);
const SmNode * SetCursorPos(sal_uInt16 nRow, sal_uInt16 nCol);

void ApplyColorConfigValues( const svtools::ColorConfig &rColorCfg );
void ApplyColorConfigValues( const svtools::ColorConfig &rColorCfg );

// for Accessibility
virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible();
// for Accessibility
virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible();

using Window::GetAccessible;
SmGraphicAccessible * GetAccessible_Impl() { return pAccessible; }
using Window::GetAccessible;
SmGraphicAccessible * GetAccessible_Impl() { return pAccessible; }
};

/**************************************************************************/
Expand All @@ -128,9 +127,9 @@ protected:
SmEditWindow &rEdit;

public:
SmEditController(SmEditWindow &, sal_uInt16, SfxBindings & );
SmEditController(SmEditWindow &, sal_uInt16, SfxBindings & );
#if OSL_DEBUG_LEVEL > 1
virtual ~SmEditController();
virtual ~SmEditController();
#endif

virtual void StateChanged(sal_uInt16 nSID,
Expand All @@ -144,21 +143,21 @@ class SmCmdBoxWindow : public SfxDockingWindow
{
SmEditWindow aEdit;
SmEditController aController;
sal_Bool bExiting;
sal_Bool bExiting;

Timer aInitialFocusTimer;
Timer aInitialFocusTimer;

DECL_LINK(InitialFocusTimerHdl, Timer *);
DECL_LINK(InitialFocusTimerHdl, Timer *);

protected :

// Window
virtual void GetFocus();
// Window
virtual void GetFocus();
virtual void Resize();
virtual void Paint(const Rectangle& rRect);
virtual void StateChanged( StateChangedType nStateChange );
virtual void StateChanged( StateChangedType nStateChange );

virtual Size CalcDockingSize(SfxChildAlignment eAlign);
virtual Size CalcDockingSize(SfxChildAlignment eAlign);
virtual SfxChildAlignment CheckAlignment(SfxChildAlignment eActual,
SfxChildAlignment eWish);

Expand All @@ -174,7 +173,7 @@ public:
void AdjustPosition();

SmEditWindow *GetEditWindow() { return (&aEdit); }
SmViewShell *GetView();
SmViewShell *GetView();
};

/**************************************************************************/
Expand All @@ -190,7 +189,7 @@ protected:
SfxChildWinInfo *pInfo);

#if OSL_DEBUG_LEVEL > 1
virtual ~SmCmdBoxWrapper();
virtual ~SmCmdBoxWrapper();
#endif

public:
Expand Down Expand Up @@ -219,11 +218,11 @@ class SmViewShell: public SfxViewShell
::com::sun::star::uno:: Reference <
::com::sun::star::lang:: XEventListener > xClipEvtLstnr;
SmClipboardChangeListener* pClipEvtLstnr;
SmViewShell_Impl* pImpl;
SmViewShell_Impl* pImpl;
sal_Bool bPasteState;

DECL_LINK( DialogClosedHdl, sfx2::FileDialogHelper* );
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
DECL_LINK( DialogClosedHdl, sfx2::FileDialogHelper* );
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );

protected:

Expand All @@ -240,13 +239,13 @@ protected:
const String& rText,
sal_uInt16 MaxWidth);

virtual sal_uInt16 Print(SfxProgress &rProgress, sal_Bool bIsAPI);
virtual sal_uInt16 Print(SfxProgress &rProgress, sal_Bool bIsAPI);
virtual SfxPrinter *GetPrinter(sal_Bool bCreate = sal_False);
virtual sal_uInt16 SetPrinter(SfxPrinter *pNewPrinter,
sal_uInt16 nDiffFlags = SFX_PRINTER_ALL, bool bIsAPI=false);

sal_Bool Insert( SfxMedium& rMedium );
sal_Bool InsertFrom(SfxMedium &rMedium);
sal_Bool Insert( SfxMedium& rMedium );
sal_Bool InsertFrom(SfxMedium &rMedium);

virtual SfxTabPage *CreatePrintOptionsPage(Window *pParent,
const SfxItemSet &rOptions);
Expand All @@ -262,7 +261,7 @@ protected:
public:
TYPEINFO();

SmViewShell(SfxViewFrame *pFrame, SfxViewShell *pOldSh);
SmViewShell(SfxViewFrame *pFrame, SfxViewShell *pOldSh);
~SmViewShell();

SmDocShell * GetDoc()
Expand All @@ -280,14 +279,16 @@ public:
void NextError();
void PrevError();

SFX_DECL_INTERFACE(SFX_INTERFACE_SMA_START+2)
SFX_DECL_VIEWFACTORY(SmViewShell);
SFX_DECL_INTERFACE(SFX_INTERFACE_SMA_START+2)
SFX_DECL_VIEWFACTORY(SmViewShell);

virtual void Execute( SfxRequest& rReq );
virtual void GetState(SfxItemSet &);

void Impl_Print( OutputDevice &rOutDev, const SmPrintUIOptions &rPrintUIOptions,
Rectangle aOutRect, Point aZeroPoint );
void Impl_Print( OutputDevice &rOutDev, const SmPrintUIOptions &rPrintUIOptions,
Rectangle aOutRect, Point aZeroPoint );
};

#endif

/* vim: set noet sw=4 ts=4: */
50 changes: 28 additions & 22 deletions main/starmath/sdi/smslots.sdi
Original file line number Diff line number Diff line change
Expand Up @@ -220,18 +220,18 @@ interface FormulaView
ExecMethod = Execute ;
StateMethod = GetState ;
]
// idlpp kein Menüeintrag , also keine Texte
SID_COPYOBJECT // idlpp ole : no , status : no
[
ExecMethod = Execute ;
StateMethod = GetState ;
]
// idlpp kein Menüeintrag , also keine Texte
SID_PASTEOBJECT // idlpp ole : no , status : no
[
ExecMethod = Execute ;
StateMethod = GetState ;
]
// idlpp kein Menüeintrag , also keine Texte
SID_COPYOBJECT // idlpp ole : no , status : no
[
ExecMethod = Execute ;
StateMethod = GetState ;
]
// idlpp kein Menüeintrag , also keine Texte
SID_PASTEOBJECT // idlpp ole : no , status : no
[
ExecMethod = Execute ;
StateMethod = GetState ;
]
SID_CUT // idlpp ole : no , status : no
[
ExecMethod = Execute ;
Expand Down Expand Up @@ -288,6 +288,12 @@ interface FormulaView
StateMethod = GetState ;
]
// idlpp kein Menüeintrag , also keine Texte
SID_ATTR_ZOOMSLIDER
[
ExecMethod = Execute ;
StateMethod = GetState ;
]
// idlpp kein Menüeintrag , also keine Texte
SID_TEXTSTATUS // idlpp ole : no , status : no
[
ExecMethod = Execute ;
Expand All @@ -311,16 +317,16 @@ interface FormulaView
ExecMethod = NoExec ;
StateMethod = NoState ;
]
SID_TOOLBOX // idlpp ole : no , status : no
[
ExecMethod = Execute ;
StateMethod = GetState ;
]
SID_SYMBOLS_CATALOGUE // idlpp ole : no , status : no
[
ExecMethod = Execute ;
StateMethod = GetState ;
]
SID_TOOLBOX // idlpp ole : no , status : no
[
ExecMethod = Execute ;
StateMethod = GetState ;
]
SID_SYMBOLS_CATALOGUE // idlpp ole : no , status : no
[
ExecMethod = Execute ;
StateMethod = GetState ;
]
}

shell SmViewShell
Expand Down
24 changes: 10 additions & 14 deletions main/starmath/source/smdll.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#endif
#include <svx/modctrl.hxx>
#include <svx/zoomctrl.hxx>
#include <svx/zoomsliderctrl.hxx>
#include <sfx2/docfac.hxx>
#include <svx/lboxctrl.hxx>
#include <sfx2/docfile.hxx>
Expand All @@ -47,39 +48,36 @@

#include <svx/xmlsecctrl.hxx>



sal_Bool SmDLL::bInitialized = sal_False;

/*************************************************************************
|*
|* Initialisierung
|*
\************************************************************************/
void SmDLL::Init()
{
if ( bInitialized )
return;
if ( bInitialized )
return;

bInitialized = sal_True;
bInitialized = sal_True;

SfxObjectFactory& rFactory = SmDocShell::Factory();
SfxObjectFactory& rFactory = SmDocShell::Factory();

SmModule** ppShlPtr = (SmModule**) GetAppData(SHL_SM);
*ppShlPtr = new SmModule( &rFactory );
*ppShlPtr = new SmModule( &rFactory );

SfxModule *p = SM_MOD();
SfxModule *p = SM_MOD();
SmModule *pp = (SmModule *) p;

rFactory.SetDocumentServiceName( String::CreateFromAscii("com.sun.star.formula.FormulaProperties") );
rFactory.SetDocumentServiceName( String::CreateFromAscii("com.sun.star.formula.FormulaProperties") );

SmModule::RegisterInterface(pp);
SmDocShell::RegisterInterface(pp);
SmDocShell::RegisterInterface(pp);
SmViewShell::RegisterInterface(pp);

SmViewShell::RegisterFactory(1);

SvxZoomStatusBarControl::RegisterControl( SID_ATTR_ZOOM, pp );
SvxZoomSliderControl::RegisterControl(SID_ATTR_ZOOMSLIDER, pp);
SvxModifyControl::RegisterControl( SID_TEXTSTATUS, pp );
SvxUndoRedoControl::RegisterControl( SID_UNDO, pp );
SvxUndoRedoControl::RegisterControl( SID_REDO, pp );
Expand All @@ -90,9 +88,7 @@ void SmDLL::Init()
}

/*************************************************************************
|*
|* Deinitialisierung
|*
\************************************************************************/
void SmDLL::Exit()
{
Expand Down
Loading