summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2008-09-30 12:33:30 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2008-09-30 12:33:30 +0000
commitcdb4b78f928f2a5e49d4fc624bff26d4a756d204 (patch)
tree1ba499e75ba21e54f129956f85395d189c31826f
parent95c5041f7568854cd5e92a2b39d439a41661a70c (diff)
Somehow integration of CWS docmacroassignments_DEV300 lost changes in 'svx' - added here.
-rw-r--r--svx/source/dialog/cuihyperdlg.cxx18
-rw-r--r--svx/source/dialog/cuihyperdlg.hxx2
-rw-r--r--svx/source/dialog/hltpbase.cxx4
-rw-r--r--svx/source/dialog/hltpbase.hxx17
-rw-r--r--svx/source/dialog/iconcdlg.cxx9
-rw-r--r--svx/source/dialog/iconcdlg.hxx1
-rw-r--r--svx/source/dialog/imapdlg.cxx2
-rw-r--r--svx/source/dialog/imapwnd.cxx10
-rw-r--r--svx/source/dialog/imapwnd.hxx10
9 files changed, 61 insertions, 12 deletions
diff --git a/svx/source/dialog/cuihyperdlg.cxx b/svx/source/dialog/cuihyperdlg.cxx
index fe950e0a4c..3eb69780d8 100644
--- a/svx/source/dialog/cuihyperdlg.cxx
+++ b/svx/source/dialog/cuihyperdlg.cxx
@@ -48,6 +48,9 @@
#include "hyperdlg.hrc"
+using ::com::sun::star::uno::Reference;
+using ::com::sun::star::frame::XFrame;
+
//########################################################################
//# #
//# Childwindow-Wrapper-Class #
@@ -403,3 +406,18 @@ void SvxHpLinkDlg::SetReadOnlyMode( sal_Bool bRdOnly )
GetOKButton().Enable();
}
+/*************************************************************************
+|*
+|* late-initialization of newly created pages
+|*
+|************************************************************************/
+
+void SvxHpLinkDlg::PageCreated( USHORT /*nId*/, IconChoicePage& rPage )
+{
+ SvxHyperlinkTabPageBase& rHyperlinkPage = dynamic_cast< SvxHyperlinkTabPageBase& >( rPage );
+ Reference< XFrame > xDocumentFrame;
+ if ( mpBindings )
+ xDocumentFrame = mpBindings->GetActiveFrame();
+ OSL_ENSURE( xDocumentFrame.is(), "SvxHpLinkDlg::PageCreated: macro assignment functionality won't work with a proper frame!" );
+ rHyperlinkPage.SetDocumentFrame( xDocumentFrame );
+}
diff --git a/svx/source/dialog/cuihyperdlg.hxx b/svx/source/dialog/cuihyperdlg.hxx
index 353782e700..39a1c6bc36 100644
--- a/svx/source/dialog/cuihyperdlg.hxx
+++ b/svx/source/dialog/cuihyperdlg.hxx
@@ -102,6 +102,8 @@ public:
SvxHpLinkDlg (Window* pParent, SfxBindings* pBindings );
~SvxHpLinkDlg ();
+ virtual void PageCreated( USHORT nId, IconChoicePage& rPage );
+
USHORT SetPage( SvxHyperlinkItem* pItem );
void EnableInetBrowse( sal_Bool bEnable = sal_True );
void SetReadOnlyMode( sal_Bool bReadOnly = sal_False );
diff --git a/svx/source/dialog/hltpbase.cxx b/svx/source/dialog/hltpbase.cxx
index da9385d779..32ee609f7d 100644
--- a/svx/source/dialog/hltpbase.cxx
+++ b/svx/source/dialog/hltpbase.cxx
@@ -289,7 +289,7 @@ long SvxHyperURLBox::PreNotify( NotifyEvent& rNEvt )
SvxHyperlinkTabPageBase::SvxHyperlinkTabPageBase ( Window *pParent,
const ResId &rResId,
- const SfxItemSet& rItemSet)
+ const SfxItemSet& rItemSet )
: IconChoicePage ( pParent, rResId, rItemSet ),
mpGrpMore ( NULL ),
mpFtFrame ( NULL ),
@@ -589,7 +589,7 @@ IMPL_LINK ( SvxHyperlinkTabPageBase, ClickScriptHdl_Impl, void *, EMPTYARG )
if ( bIsInputEnabled )
GetParent()->EnableInput( FALSE );
// <--
- SfxMacroAssignDlg aDlg( this, *pItemSet );
+ SfxMacroAssignDlg aDlg( this, mxDocumentFrame, *pItemSet );
// add events
SfxMacroTabPage *pMacroPage = (SfxMacroTabPage*) aDlg.GetTabPage();
diff --git a/svx/source/dialog/hltpbase.hxx b/svx/source/dialog/hltpbase.hxx
index 0378cc117f..6b09deb911 100644
--- a/svx/source/dialog/hltpbase.hxx
+++ b/svx/source/dialog/hltpbase.hxx
@@ -57,6 +57,8 @@
#include <sfx2/docfile.hxx>
#include <svx/dialogs.hrc>
+#include <com/sun/star/frame/XFrame.hpp>
+
#ifndef _SVX_HELPID_HRC
#include "helpid.hrc"
#endif
@@ -130,6 +132,9 @@ private:
sal_Bool mbIsCloseDisabled;
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >
+ mxDocumentFrame;
+
protected:
Window* mpDialog;
@@ -163,9 +168,19 @@ protected:
inline void DisableClose( sal_Bool _bDisable ) { mbIsCloseDisabled = _bDisable; }
public:
- SvxHyperlinkTabPageBase ( Window *pParent, const ResId &rResId, const SfxItemSet& rItemSet);
+ SvxHyperlinkTabPageBase (
+ Window *pParent,
+ const ResId &rResId,
+ const SfxItemSet& rItemSet
+ );
virtual ~SvxHyperlinkTabPageBase ();
+ void SetDocumentFrame(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxDocumentFrame )
+ {
+ mxDocumentFrame = rxDocumentFrame;
+ }
+
virtual BOOL AskApply ();
virtual void DoApply ();
virtual void SetOnlineMode( BOOL bEnable );
diff --git a/svx/source/dialog/iconcdlg.cxx b/svx/source/dialog/iconcdlg.cxx
index 2df437339d..7bd9843fb2 100644
--- a/svx/source/dialog/iconcdlg.cxx
+++ b/svx/source/dialog/iconcdlg.cxx
@@ -959,6 +959,8 @@ void IconChoiceDialog::ActivatePageImpl ()
pData->pPage->Reset( (SfxItemSet &)pData->pPage->GetItemSet() );
else
pData->pPage->Reset( *pSet );
+
+ PageCreated( mnCurrentPageId, *pData->pPage );
}
else if ( pData->bRefresh )
{
@@ -1186,6 +1188,13 @@ int IconChoiceDialog::FillOutputItemSet()
// -----------------------------------------------------------------------
+void IconChoiceDialog::PageCreated( USHORT /*nId*/, IconChoicePage& /*rPage*/ )
+{
+ // not interested in
+}
+
+// -----------------------------------------------------------------------
+
SfxItemSet* IconChoiceDialog::CreateInputItemSet( USHORT )
{
DBG_WARNINGFILE( "CreateInputItemSet nicht implementiert" );
diff --git a/svx/source/dialog/iconcdlg.hxx b/svx/source/dialog/iconcdlg.hxx
index 07f19bfae8..4dce9737d2 100644
--- a/svx/source/dialog/iconcdlg.hxx
+++ b/svx/source/dialog/iconcdlg.hxx
@@ -212,6 +212,7 @@ protected :
void ShowPageImpl ( IconChoicePageData* pData );
void HidePageImpl ( IconChoicePageData* pData );
+ virtual void PageCreated( USHORT nId, IconChoicePage& rPage );
virtual SfxItemSet* CreateInputItemSet( USHORT nId );
inline SfxItemSet* GetInputSetImpl() { return (SfxItemSet*)pSet; }
inline IconChoicePage* GetTabPage( USHORT nPageId )
diff --git a/svx/source/dialog/imapdlg.cxx b/svx/source/dialog/imapdlg.cxx
index e6e7f1275c..3e991e99c8 100644
--- a/svx/source/dialog/imapdlg.cxx
+++ b/svx/source/dialog/imapdlg.cxx
@@ -208,7 +208,7 @@ SvxIMapDlg::SvxIMapDlg( SfxBindings *_pBindings, SfxChildWindow *pCW,
pCheckObj ( NULL ),
aIMapItem ( SID_IMAP_EXEC, *this, *_pBindings )
{
- pIMapWnd = new IMapWindow( this, SVX_RES( RID_SVXCTL_IMAP ) );
+ pIMapWnd = new IMapWindow( this, SVX_RES( RID_SVXCTL_IMAP ), _pBindings->GetActiveFrame() );
ApplyImageList();
diff --git a/svx/source/dialog/imapwnd.cxx b/svx/source/dialog/imapwnd.cxx
index ccced0a105..53b2332eae 100644
--- a/svx/source/dialog/imapwnd.cxx
+++ b/svx/source/dialog/imapwnd.cxx
@@ -64,6 +64,9 @@
#include <basegfx/point/b2dpoint.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
+using ::com::sun::star::frame::XFrame;
+using ::com::sun::star::uno::Reference;
+
#define TRANSCOL Color( COL_WHITE )
/*************************************************************************
@@ -112,9 +115,10 @@ URLDlg::URLDlg( Window* pWindow, const String& rURL,
|*
\************************************************************************/
-IMapWindow::IMapWindow( Window* pParent, const ResId& rResId ) :
+IMapWindow::IMapWindow( Window* pParent, const ResId& rResId, const Reference< XFrame >& rxDocumentFrame ) :
GraphCtrl( pParent, rResId ),
- DropTargetHelper( this )
+ DropTargetHelper( this ),
+ mxDocumentFrame( rxDocumentFrame )
{
SetWinStyle( WB_SDRMODE );
@@ -862,7 +866,7 @@ void IMapWindow::DoMacroAssign()
aMacroItem.SetMacroTable( pIMapObj->GetMacroTable() );
aSet.Put( aMacroItem, SID_ATTR_MACROITEM );
- SfxMacroAssignDlg aMacroDlg( this, aSet );
+ SfxMacroAssignDlg aMacroDlg( this, mxDocumentFrame, aSet );
SfxMacroTabPage* pMacroTabPage = (SfxMacroTabPage*) aMacroDlg.GetTabPage();
if ( pMacroTabPage )
diff --git a/svx/source/dialog/imapwnd.hxx b/svx/source/dialog/imapwnd.hxx
index f934873fe5..19a39f0132 100644
--- a/svx/source/dialog/imapwnd.hxx
+++ b/svx/source/dialog/imapwnd.hxx
@@ -32,18 +32,17 @@
#include <vcl/dialog.hxx>
#include <vcl/fixed.hxx>
-#ifndef _SV_BUTTON_HXX //autogen
#include <vcl/button.hxx>
-#endif
#include <vcl/menu.hxx>
#include <svtools/itempool.hxx>
#include <svtools/imapobj.hxx>
#include <svtools/transfer.hxx>
#include <svtools/imap.hxx>
#include <sfx2/frame.hxx>
-
#include <svx/graphctl.hxx>
+#include <com/sun/star/frame/XFrame.hpp>
+
/*************************************************************************
|*
|*
@@ -160,6 +159,8 @@ class IMapWindow : public GraphCtrl, public DropTargetHelper
Link aInfoLink;
SfxItemPool* pIMapPool;
SfxItemInfo* pItemInfo;
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >
+ mxDocumentFrame;
DECL_LINK( MenuSelectHdl, Menu* );
DECL_LINK( MouseTimerHdl, Timer* );
@@ -193,8 +194,7 @@ protected:
public:
- IMapWindow( Window* pParent, WinBits nWinBits = 0 );
- IMapWindow( Window* pParent, const ResId& rResId );
+ IMapWindow( Window* pParent, const ResId& rResId, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxDocumentFrame );
~IMapWindow();
BOOL ReplaceActualIMapInfo( const NotifyInfo& rNewInfo );