Files
libreoffice/svx/source/dialog/imapdlg.cxx

847 lines
26 KiB
C++
Raw Normal View History

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2000-09-18 16:07:07 +00:00
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2000-09-18 16:07:07 +00:00
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
2000-09-18 16:07:07 +00:00
*
* OpenOffice.org - a multi-platform office productivity suite
2000-09-18 16:07:07 +00:00
*
* This file is part of OpenOffice.org.
2000-09-18 16:07:07 +00:00
*
* 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.
2000-09-18 16:07:07 +00:00
*
* 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).
2000-09-18 16:07:07 +00:00
*
* 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.
2000-09-18 16:07:07 +00:00
*
************************************************************************/
#include <stdlib.h>
#include <tools/shl.hxx>
#include <tools/errinf.hxx>
#include <tools/urlobj.hxx>
2000-11-10 14:04:21 +00:00
#include <unotools/ucbstreamhelper.hxx>
2000-09-18 16:07:07 +00:00
#include <vcl/msgbox.hxx>
#include <vcl/group.hxx>
#include <vcl/lstbox.hxx>
#include <svl/eitem.hxx>
#include <unotools/pathoptions.hxx>
2000-09-18 16:07:07 +00:00
#include <sfx2/dispatch.hxx>
#include <sfx2/module.hxx>
#include <sfx2/filedlghelper.hxx>
#include "com/sun/star/ui/dialogs/TemplateDescription.hpp"
#include <svl/urihelper.hxx>
2002-07-05 13:55:35 +00:00
#include <svtools/miscopt.hxx>
CWS-TOOLING: integrate CWS impress171 2009-06-02 16:32:02 +0200 cl r272511 : fixed build error 2009-05-29 16:40:09 +0200 cl r272471 : CWS-TOOLING: rebase CWS impress171 to trunk@272291 (milestone: DEV300:m49) 2009-05-19 15:14:08 +0200 sj r272082 : #i101459# applied patch (writing out StyleTextProperties even if no chars given) 2009-05-19 15:09:31 +0200 sj r272081 : #i101459# applied patch (writing out StyleTextProperties even if no chars given) 2009-05-19 15:09:14 +0200 sj r272080 : #i101459# applied patch (writing out StyleTextProperties even if no chars given) 2009-05-18 13:34:05 +0200 sj r272015 : #i47689# fixed rectangles toolbar 2009-05-13 14:59:08 +0200 sj r271862 : #i101563# fixed crash when loading pptx document 2009-05-12 19:31:58 +0200 sj r271835 : #101684# fixed rotation of customshapes 2009-05-08 16:37:01 +0200 sj r271724 : #i101683,i101584,i48160# added shearing of customshapes, fixed rotation problem 2009-04-28 17:32:14 +0200 sj r271335 : #i48160# fixed gluepoint rotation of customshapes 2009-04-27 16:31:54 +0200 cl r271291 : #i100138# applied patch for japanese reconversion feature 2009-04-27 16:30:52 +0200 cl r271290 : #i100138# applied patch for japanese reconversion feature 2009-04-27 16:28:55 +0200 cl r271289 : #i100138# applied patch for japanese reconversion feature 2009-04-23 14:22:59 +0200 cl r271170 : #i95342# #i96820# #i97298# multiple table handling fixes 2009-04-23 14:18:54 +0200 sj r271169 : #i60368# ignoring gamma values for toolbar/menu icons 2009-04-23 11:54:28 +0200 cl r271146 : #i97298# set style to text even during text edit 2009-04-23 11:46:38 +0200 cl r271145 : fixed compiler error with debug 2009-04-22 19:09:37 +0200 sj r271135 : #i101051# applied patch (proper import of notes page object) 2009-04-22 11:07:54 +0200 cl r271082 : #i96820# modify doc after merging cells 2009-04-22 10:57:35 +0200 cl r271081 : #i100307# applied patch from jlcheng to correctly set modfiy state 2009-04-22 10:31:11 +0200 cl r271079 : #i96736# copy merge information on clone 2009-04-21 08:27:22 +0200 cl r271016 : #i89541# use SfxErrorContext to make the ErrorHandler dialog modal 2009-04-20 17:52:56 +0200 cl r271003 : #i98480# removed 'EndPosition' and 'StartPosition' from styles 2009-04-20 16:41:55 +0200 cl r270994 : #i98403# fixed state handling for selected motion path 2009-04-17 11:35:25 +0200 cl r270931 : #i61274# export to pdf should behave like printing considering layer visibility 2009-04-17 10:00:17 +0200 cl r270924 : #i98967# set default style on any new shape except a page obj 2009-04-16 16:28:20 +0200 cl r270893 : #i98859# use percentage type for relative font height
2009-06-17 10:58:14 +00:00
#include <svtools/ehdl.hxx>
#include <svtools/sfxecode.hxx>
2000-09-18 16:07:07 +00:00
#include <sfx2/viewfrm.hxx>
#include <sfx2/objsh.hxx>
#include <sfx2/docfile.hxx>
#include <unotools/localedatawrapper.hxx>
#include <comphelper/processfactory.hxx>
2000-09-18 16:07:07 +00:00
#define _IMAPDLG_PRIVATE
#include "svx/imapdlg.hxx"
2000-09-18 16:07:07 +00:00
#include <svx/dialmgr.hxx>
#include <svx/dialogs.hrc>
#include <svx/svxids.hrc>
2000-09-18 16:07:07 +00:00
#include "imapdlg.hrc"
#include "imapwnd.hxx"
#include "imapimp.hxx"
#include "svx/dlgutil.hxx"
#include <svx/svdtrans.hxx>
#include <svx/svdopath.hxx>
#include <vcl/svapp.hxx>
#include "dlgunit.hxx"
2000-09-18 16:07:07 +00:00
#define SELF_TARGET "_self"
#define IMAP_ALL_FILTER "<Alle>"
#define IMAP_CERN_FILTER "MAP - CERN"
#define IMAP_NCSA_FILTER "MAP - NCSA"
#define IMAP_BINARY_FILTER "SIP - StarView ImageMap"
#define IMAP_ALL_TYPE "*.*"
#define IMAP_BINARY_TYPE "*.sip"
#define IMAP_CERN_TYPE "*.map"
#define IMAP_NCSA_TYPE "*.map"
#define IMAP_BINARY_EXT "sip"
#define IMAP_CERN_EXT "map"
#define IMAP_NCSA_EXT "map"
/******************************************************************************/
SFX_IMPL_MODELESSDIALOG_WITHID( SvxIMapDlgChildWindow, SID_IMAP );
2000-09-18 16:07:07 +00:00
// ControllerItem
2000-09-18 16:07:07 +00:00
SvxIMapDlgItem::SvxIMapDlgItem( sal_uInt16 _nId, SvxIMapDlg& rIMapDlg, SfxBindings& rBindings ) :
SfxControllerItem ( _nId, rBindings ),
2000-09-18 16:07:07 +00:00
rIMap ( rIMapDlg )
{
}
void SvxIMapDlgItem::StateChanged( sal_uInt16 nSID, SfxItemState /*eState*/,
2000-09-18 16:07:07 +00:00
const SfxPoolItem* pItem )
{
if ( ( nSID == SID_IMAP_EXEC ) && pItem )
{
const SfxBoolItem* pStateItem = PTR_CAST( SfxBoolItem, pItem );
DBG_ASSERT( pStateItem || pItem == 0, "SfxBoolItem expected");
2000-09-18 16:07:07 +00:00
// Disable Float if possible
2000-09-18 16:07:07 +00:00
rIMap.SetExecState( !pStateItem->GetValue() );
}
}
SvxIMapDlgChildWindow::SvxIMapDlgChildWindow( Window* _pParent, sal_uInt16 nId,
2000-09-18 16:07:07 +00:00
SfxBindings* pBindings,
SfxChildWinInfo* pInfo ) :
SfxChildWindow( _pParent, nId )
2000-09-18 16:07:07 +00:00
{
pWindow = new SvxIMapDlg( pBindings, this, _pParent, SVX_RES( RID_SVXDLG_IMAP ) );
2000-09-18 16:07:07 +00:00
SvxIMapDlg* pDlg = (SvxIMapDlg*) pWindow;
if ( pInfo->nFlags & SFX_CHILDWIN_ZOOMIN )
pDlg->RollUp();
eChildAlignment = SFX_ALIGN_NOALIGNMENT;
pDlg->Initialize( pInfo );
2000-09-18 16:07:07 +00:00
}
void SvxIMapDlgChildWindow::UpdateIMapDlg( const Graphic& rGraphic, const ImageMap* pImageMap,
const TargetList* pTargetList, void* pEditingObj )
{
if ( SfxViewFrame::Current() &&
SfxViewFrame::Current()->HasChildWindow( SvxIMapDlgChildWindow::GetChildWindowId() ) )
SVXIMAPDLG()->Update( rGraphic, pImageMap, pTargetList, pEditingObj );
}
SvxIMapDlg::SvxIMapDlg( SfxBindings *_pBindings, SfxChildWindow *pCW,
Window* _pParent, const ResId& rResId ) :
SfxModelessDialog ( _pBindings, pCW, _pParent, rResId ),
2000-09-18 16:07:07 +00:00
aTbxIMapDlg1 ( this, SVX_RES( TBX_IMAPDLG1 ) ),
aFtURL ( this, SVX_RES( FT_URL ) ),
2002-04-12 10:54:45 +00:00
maURLBox ( this, SVX_RES( CBB_URL ) ),
2000-09-18 16:07:07 +00:00
aFtText ( this, SVX_RES( FT_TEXT ) ),
aEdtText ( this, SVX_RES( EDT_TEXT ) ),
maFtTarget ( this, SVX_RES( RID_SVXCTL_FT_TARGET ) ),
2002-07-11 09:48:07 +00:00
maCbbTarget ( this, SVX_RES( RID_SVXCTL_CBB_TARGET ) ),
aStbStatus ( this, WB_BORDER | WB_3DLOOK | WB_LEFT ),
2002-07-11 09:48:07 +00:00
maImageList ( SVX_RES( IL_IMAPDLG ) ),
pCheckObj ( NULL ),
aIMapItem ( SID_IMAP_EXEC, *this, *_pBindings )
2000-09-18 16:07:07 +00:00
{
pIMapWnd = new IMapWindow( this, SVX_RES( RID_SVXCTL_IMAP ), _pBindings->GetActiveFrame() );
2002-04-12 10:54:45 +00:00
2002-07-11 09:48:07 +00:00
ApplyImageList();
2000-09-18 16:07:07 +00:00
FreeResource();
pOwnData = new IMapOwnData;
2000-09-18 16:07:07 +00:00
pIMapWnd->SetInfoLink( LINK( this, SvxIMapDlg, InfoHdl ) );
pIMapWnd->SetMousePosLink( LINK( this, SvxIMapDlg, MousePosHdl ) );
pIMapWnd->SetGraphSizeLink( LINK( this, SvxIMapDlg, GraphSizeHdl ) );
pIMapWnd->SetUpdateLink( LINK( this, SvxIMapDlg, StateHdl ) );
maURLBox.SetModifyHdl( LINK( this, SvxIMapDlg, URLModifyHdl ) );
maURLBox.SetSelectHdl( LINK( this, SvxIMapDlg, URLModifyHdl ) );
maURLBox.SetLoseFocusHdl( LINK( this, SvxIMapDlg, URLLoseFocusHdl ) );
2000-09-18 16:07:07 +00:00
aEdtText.SetModifyHdl( LINK( this, SvxIMapDlg, URLModifyHdl ) );
maCbbTarget.SetLoseFocusHdl( LINK( this, SvxIMapDlg, URLLoseFocusHdl ) );
2000-09-18 16:07:07 +00:00
2002-07-05 13:55:35 +00:00
SvtMiscOptions aMiscOptions;
aMiscOptions.AddListenerLink( LINK( this, SvxIMapDlg, MiscHdl ) );
2002-07-05 13:55:35 +00:00
aTbxIMapDlg1.SetOutStyle( aMiscOptions.GetToolboxStyle() );
2000-09-18 16:07:07 +00:00
aTbxIMapDlg1.SetSizePixel( aTbxIMapDlg1.CalcWindowSizePixel() );
aTbxIMapDlg1.SetSelectHdl( LINK( this, SvxIMapDlg, TbxClickHdl ) );
aTbxIMapDlg1.CheckItem( TBI_SELECT, sal_True );
2000-09-18 16:07:07 +00:00
TbxClickHdl( &aTbxIMapDlg1 );
SetMinOutputSizePixel( aLastSize = GetOutputSizePixel() );
aStbStatus.InsertItem( 1, 130, SIB_LEFT | SIB_IN | SIB_AUTOSIZE );
2000-09-26 08:29:01 +00:00
aStbStatus.InsertItem( 2, 10 + GetTextWidth( DEFINE_CONST_UNICODE( " 9999,99 cm / 9999,99 cm ") ), SIB_CENTER | SIB_IN );
aStbStatus.InsertItem( 3, 10 + GetTextWidth( DEFINE_CONST_UNICODE( " 9999,99 cm x 9999,99 cm ") ), SIB_CENTER | SIB_IN );
2000-09-18 16:07:07 +00:00
aFtURL.Disable();
maURLBox.Disable();
2000-09-18 16:07:07 +00:00
aFtText.Disable();
aEdtText.Disable();
maFtTarget.Disable();
maCbbTarget.Disable();
pOwnData->bExecState = sal_False;
2000-09-18 16:07:07 +00:00
Resize();
pOwnData->aTimer.SetTimeout( 100 );
pOwnData->aTimer.SetTimeoutHdl( LINK( this, SvxIMapDlg, UpdateHdl ) );
aTbxIMapDlg1.EnableItem( TBI_ACTIVE, sal_False );
aTbxIMapDlg1.EnableItem( TBI_MACRO, sal_False );
aTbxIMapDlg1.EnableItem( TBI_PROPERTY, sal_False );
2000-09-18 16:07:07 +00:00
}
SvxIMapDlg::~SvxIMapDlg()
{
// Delete URL-List
2000-09-18 16:07:07 +00:00
delete pIMapWnd;
delete pOwnData;
}
void SvxIMapDlg::Resize()
{
2002-05-14 08:12:45 +00:00
SfxModelessDialog::Resize();
2000-09-18 16:07:07 +00:00
Size aMinSize( GetMinOutputSizePixel() );
Size aNewSize( GetOutputSizePixel() );
if ( aNewSize.Height() >= aMinSize.Height() )
{
Size _aSize( aStbStatus.GetSizePixel() );
Point aPoint( 0, aNewSize.Height() - _aSize.Height() );
2000-09-18 16:07:07 +00:00
// Position the StatusBar
aStbStatus.SetPosSizePixel( aPoint, Size( aNewSize.Width(), _aSize.Height() ) );
2000-09-18 16:07:07 +00:00
aStbStatus.Show();
// Position the EditWindow
_aSize.Width() = aNewSize.Width() - 18;
_aSize.Height() = aPoint.Y() - pIMapWnd->GetPosPixel().Y() - 6;
pIMapWnd->SetSizePixel( _aSize );
2000-09-18 16:07:07 +00:00
aLastSize = aNewSize;
}
}
sal_Bool SvxIMapDlg::Close()
2000-09-18 16:07:07 +00:00
{
sal_Bool bRet = sal_True;
2000-09-18 16:07:07 +00:00
if ( aTbxIMapDlg1.IsItemEnabled( TBI_APPLY ) )
{
QueryBox aQBox( this, WB_YES_NO_CANCEL | WB_DEF_YES,
String( SVX_RES( STR_IMAPDLG_MODIFY ) ) );
const long nRet = aQBox.Execute();
if( nRet == RET_YES )
{
SfxBoolItem aBoolItem( SID_IMAP_EXEC, sal_True );
2000-09-18 16:07:07 +00:00
GetBindings().GetDispatcher()->Execute(
SID_IMAP_EXEC, SFX_CALLMODE_SYNCHRON | SFX_CALLMODE_RECORD, &aBoolItem, 0L );
}
else if( nRet == RET_CANCEL )
bRet = sal_False;
2000-09-18 16:07:07 +00:00
}
else if( pIMapWnd->IsChanged() )
{
QueryBox aQBox( this, WB_YES_NO_CANCEL | WB_DEF_YES,
String( SVX_RES( STR_IMAPDLG_SAVE ) ) );
const long nRet = aQBox.Execute();
if( nRet == RET_YES )
bRet = DoSave();
else if( nRet == RET_CANCEL )
bRet = sal_False;
2000-09-18 16:07:07 +00:00
}
return( bRet ? SfxModelessDialog::Close() : sal_False );
2000-09-18 16:07:07 +00:00
}
// Enabled or disable all Controls
2000-09-18 16:07:07 +00:00
void SvxIMapDlg::SetExecState( sal_Bool bEnable )
2000-09-18 16:07:07 +00:00
{
pOwnData->bExecState = bEnable;
}
void SvxIMapDlg::SetGraphic( const Graphic& rGraphic )
{
pIMapWnd->SetGraphic( rGraphic );
}
void SvxIMapDlg::SetImageMap( const ImageMap& rImageMap )
{
pIMapWnd->SetImageMap( rImageMap );
}
const ImageMap& SvxIMapDlg::GetImageMap() const
{
return pIMapWnd->GetImageMap();
}
void SvxIMapDlg::SetTargetList( const TargetList& rTargetList )
{
TargetList aNewList( rTargetList );
pIMapWnd->SetTargetList( aNewList );
maCbbTarget.Clear();
2000-09-18 16:07:07 +00:00
for ( size_t i = 0, n = aNewList.size(); i < n; ++i )
maCbbTarget.InsertEntry( *aNewList[ i ] );
2000-09-18 16:07:07 +00:00
}
void SvxIMapDlg::Update( const Graphic& rGraphic, const ImageMap* pImageMap,
const TargetList* pTargetList, void* pEditingObj )
{
pOwnData->aUpdateGraphic = rGraphic;
if ( pImageMap )
pOwnData->aUpdateImageMap = *pImageMap;
else
pOwnData->aUpdateImageMap.ClearImageMap();
pOwnData->pUpdateEditingObject = pEditingObj;
// Delete UpdateTargetList, because this method can still be called several
// times before the update timer is turned on
for ( size_t i = 0, n = pOwnData->aUpdateTargetList.size(); i < n; ++i )
delete pOwnData->aUpdateTargetList[ i ];
pOwnData->aUpdateTargetList.clear();
2000-09-18 16:07:07 +00:00
// TargetList must be copied, since it is owned by the caller and can be
// deleted immediately after this call the copied list will be deleted
// again in the handler
2000-09-18 16:07:07 +00:00
if( pTargetList )
{
TargetList aTargetList( *pTargetList );
for ( size_t i = 0, n = aTargetList.size(); i < n; ++i )
pOwnData->aUpdateTargetList.push_back( new String( *aTargetList[ i ] ) );
2000-09-18 16:07:07 +00:00
}
pOwnData->aTimer.Start();
}
void SvxIMapDlg::KeyInput( const KeyEvent& rKEvt )
{
2002-05-14 08:12:45 +00:00
SfxModelessDialog::KeyInput( rKEvt );
}
// Click-handler for ToolBox
2000-09-18 16:07:07 +00:00
IMPL_LINK( SvxIMapDlg, TbxClickHdl, ToolBox*, pTbx )
{
sal_uInt16 nNewItemId = pTbx->GetCurItemId();
2000-09-18 16:07:07 +00:00
switch( pTbx->GetCurItemId() )
{
case( TBI_APPLY ):
{
2002-06-18 07:14:50 +00:00
URLLoseFocusHdl( NULL );
SfxBoolItem aBoolItem( SID_IMAP_EXEC, sal_True );
2000-09-18 16:07:07 +00:00
GetBindings().GetDispatcher()->Execute(
SID_IMAP_EXEC, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD, &aBoolItem, 0L );
}
break;
case( TBI_OPEN ):
DoOpen();
break;
case( TBI_SAVEAS ):
DoSave();
break;
case( TBI_SELECT ):
{
pTbx->CheckItem( nNewItemId, sal_True );
pIMapWnd->SetEditMode( sal_True );
2002-04-12 10:54:45 +00:00
if( pTbx->IsKeyEvent() )
{
if((pTbx->GetKeyModifier() & KEY_MOD1) != 0)
pIMapWnd->SelectFirstObject();
else
pIMapWnd->GrabFocus();
}
2000-09-18 16:07:07 +00:00
}
break;
case( TBI_RECT ):
{
pTbx->CheckItem( nNewItemId, sal_True );
2000-09-18 16:07:07 +00:00
pIMapWnd->SetObjKind( OBJ_RECT );
if( pTbx->IsKeyEvent() && ((pTbx->GetKeyModifier() & KEY_MOD1) != 0) )
2002-04-12 10:54:45 +00:00
{
pIMapWnd->CreateDefaultObject();
2002-04-12 10:54:45 +00:00
pIMapWnd->GrabFocus();
}
2000-09-18 16:07:07 +00:00
}
break;
case( TBI_CIRCLE ):
{
pTbx->CheckItem( nNewItemId, sal_True );
2000-09-18 16:07:07 +00:00
pIMapWnd->SetObjKind( OBJ_CIRC );
if( pTbx->IsKeyEvent() && ((pTbx->GetKeyModifier() & KEY_MOD1) != 0) )
2002-04-12 10:54:45 +00:00
{
pIMapWnd->CreateDefaultObject();
2002-04-12 10:54:45 +00:00
pIMapWnd->GrabFocus();
}
2000-09-18 16:07:07 +00:00
}
break;
case( TBI_POLY ):
{
pTbx->CheckItem( nNewItemId, sal_True );
2000-09-18 16:07:07 +00:00
pIMapWnd->SetObjKind( OBJ_POLY );
if( pTbx->IsKeyEvent() && ((pTbx->GetKeyModifier() & KEY_MOD1) != 0) )
2002-04-12 10:54:45 +00:00
{
pIMapWnd->CreateDefaultObject();
2002-04-12 10:54:45 +00:00
pIMapWnd->GrabFocus();
}
2000-09-18 16:07:07 +00:00
}
break;
case( TBI_FREEPOLY ):
{
pTbx->CheckItem( nNewItemId, sal_True );
2000-09-18 16:07:07 +00:00
pIMapWnd->SetObjKind( OBJ_FREEFILL );
if( pTbx->IsKeyEvent() && ((pTbx->GetKeyModifier() & KEY_MOD1) != 0) )
2002-04-12 10:54:45 +00:00
{
pIMapWnd->CreateDefaultObject();
2002-04-12 10:54:45 +00:00
pIMapWnd->GrabFocus();
}
2000-09-18 16:07:07 +00:00
}
break;
case( TBI_ACTIVE ):
{
URLLoseFocusHdl( NULL );
sal_Bool bNewState = !pTbx->IsItemChecked( TBI_ACTIVE );
2000-09-18 16:07:07 +00:00
pTbx->CheckItem( TBI_ACTIVE, bNewState );
pIMapWnd->SetCurrentObjState( !bNewState );
}
break;
case( TBI_MACRO ):
pIMapWnd->DoMacroAssign();
break;
case( TBI_PROPERTY ):
pIMapWnd->DoPropertyDialog();
break;
case( TBI_POLYEDIT ):
pIMapWnd->SetPolyEditMode( pTbx->IsItemChecked( TBI_POLYEDIT ) ? SID_BEZIER_MOVE : 0 );
2002-04-12 10:54:45 +00:00
if( pTbx->IsKeyEvent() && pTbx->IsItemChecked( TBI_POLYEDIT ) )
pIMapWnd->StartPolyEdit();
2000-09-18 16:07:07 +00:00
break;
case( TBI_POLYMOVE ):
pIMapWnd->SetPolyEditMode( SID_BEZIER_MOVE );
break;
case( TBI_POLYINSERT ):
pIMapWnd->SetPolyEditMode( SID_BEZIER_INSERT );
break;
case( TBI_POLYDELETE ):
pIMapWnd->GetSdrView()->DeleteMarkedPoints();
break;
case( TBI_UNDO ):
{
URLLoseFocusHdl( NULL );
2000-09-18 16:07:07 +00:00
pIMapWnd->GetSdrModel()->Undo();
}
2000-09-18 16:07:07 +00:00
break;
case( TBI_REDO ):
{
URLLoseFocusHdl( NULL );
2000-09-18 16:07:07 +00:00
pIMapWnd->GetSdrModel()->Redo();
}
2000-09-18 16:07:07 +00:00
break;
default:
break;
}
return 0;
}
void SvxIMapDlg::DoOpen()
{
::sfx2::FileDialogHelper aDlg(
com::sun::star::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, 0 );
2000-09-18 16:07:07 +00:00
ImageMap aLoadIMap;
2000-09-26 08:29:01 +00:00
const String aFilter( DEFINE_CONST_UNICODE( IMAP_ALL_FILTER ) );
2000-09-18 16:07:07 +00:00
2000-09-26 08:29:01 +00:00
aDlg.AddFilter( aFilter, DEFINE_CONST_UNICODE( IMAP_ALL_TYPE ) );
aDlg.AddFilter( DEFINE_CONST_UNICODE( IMAP_CERN_FILTER ), DEFINE_CONST_UNICODE( IMAP_CERN_TYPE ) );
aDlg.AddFilter( DEFINE_CONST_UNICODE( IMAP_NCSA_FILTER ), DEFINE_CONST_UNICODE( IMAP_NCSA_TYPE ) );
aDlg.AddFilter( DEFINE_CONST_UNICODE( IMAP_BINARY_FILTER ), DEFINE_CONST_UNICODE( IMAP_BINARY_TYPE ) );
2000-09-18 16:07:07 +00:00
aDlg.SetCurrentFilter( aFilter );
aDlg.SetDisplayDirectory( SvtPathOptions().GetWorkPath() );
2000-09-18 16:07:07 +00:00
if( aDlg.Execute() == ERRCODE_NONE )
2000-09-18 16:07:07 +00:00
{
2000-11-10 14:04:21 +00:00
INetURLObject aURL( aDlg.GetPath() );
DBG_ASSERT( aURL.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" );
SvStream* pIStm = ::utl::UcbStreamHelper::CreateStream( aURL.GetMainURL( INetURLObject::NO_DECODE ), STREAM_READ );
2000-09-18 16:07:07 +00:00
2000-11-10 14:04:21 +00:00
if( pIStm )
2000-09-18 16:07:07 +00:00
{
aLoadIMap.Read( *pIStm, IMAP_FORMAT_DETECT, String() );
2000-09-18 16:07:07 +00:00
2000-11-10 14:04:21 +00:00
if( pIStm->GetError() )
CWS-TOOLING: integrate CWS impress171 2009-06-02 16:32:02 +0200 cl r272511 : fixed build error 2009-05-29 16:40:09 +0200 cl r272471 : CWS-TOOLING: rebase CWS impress171 to trunk@272291 (milestone: DEV300:m49) 2009-05-19 15:14:08 +0200 sj r272082 : #i101459# applied patch (writing out StyleTextProperties even if no chars given) 2009-05-19 15:09:31 +0200 sj r272081 : #i101459# applied patch (writing out StyleTextProperties even if no chars given) 2009-05-19 15:09:14 +0200 sj r272080 : #i101459# applied patch (writing out StyleTextProperties even if no chars given) 2009-05-18 13:34:05 +0200 sj r272015 : #i47689# fixed rectangles toolbar 2009-05-13 14:59:08 +0200 sj r271862 : #i101563# fixed crash when loading pptx document 2009-05-12 19:31:58 +0200 sj r271835 : #101684# fixed rotation of customshapes 2009-05-08 16:37:01 +0200 sj r271724 : #i101683,i101584,i48160# added shearing of customshapes, fixed rotation problem 2009-04-28 17:32:14 +0200 sj r271335 : #i48160# fixed gluepoint rotation of customshapes 2009-04-27 16:31:54 +0200 cl r271291 : #i100138# applied patch for japanese reconversion feature 2009-04-27 16:30:52 +0200 cl r271290 : #i100138# applied patch for japanese reconversion feature 2009-04-27 16:28:55 +0200 cl r271289 : #i100138# applied patch for japanese reconversion feature 2009-04-23 14:22:59 +0200 cl r271170 : #i95342# #i96820# #i97298# multiple table handling fixes 2009-04-23 14:18:54 +0200 sj r271169 : #i60368# ignoring gamma values for toolbar/menu icons 2009-04-23 11:54:28 +0200 cl r271146 : #i97298# set style to text even during text edit 2009-04-23 11:46:38 +0200 cl r271145 : fixed compiler error with debug 2009-04-22 19:09:37 +0200 sj r271135 : #i101051# applied patch (proper import of notes page object) 2009-04-22 11:07:54 +0200 cl r271082 : #i96820# modify doc after merging cells 2009-04-22 10:57:35 +0200 cl r271081 : #i100307# applied patch from jlcheng to correctly set modfiy state 2009-04-22 10:31:11 +0200 cl r271079 : #i96736# copy merge information on clone 2009-04-21 08:27:22 +0200 cl r271016 : #i89541# use SfxErrorContext to make the ErrorHandler dialog modal 2009-04-20 17:52:56 +0200 cl r271003 : #i98480# removed 'EndPosition' and 'StartPosition' from styles 2009-04-20 16:41:55 +0200 cl r270994 : #i98403# fixed state handling for selected motion path 2009-04-17 11:35:25 +0200 cl r270931 : #i61274# export to pdf should behave like printing considering layer visibility 2009-04-17 10:00:17 +0200 cl r270924 : #i98967# set default style on any new shape except a page obj 2009-04-16 16:28:20 +0200 cl r270893 : #i98859# use percentage type for relative font height
2009-06-17 10:58:14 +00:00
{
SfxErrorContext eEC(ERRCODE_SFX_GENERAL,this);
2000-09-18 16:07:07 +00:00
ErrorHandler::HandleError( ERRCODE_IO_GENERAL );
CWS-TOOLING: integrate CWS impress171 2009-06-02 16:32:02 +0200 cl r272511 : fixed build error 2009-05-29 16:40:09 +0200 cl r272471 : CWS-TOOLING: rebase CWS impress171 to trunk@272291 (milestone: DEV300:m49) 2009-05-19 15:14:08 +0200 sj r272082 : #i101459# applied patch (writing out StyleTextProperties even if no chars given) 2009-05-19 15:09:31 +0200 sj r272081 : #i101459# applied patch (writing out StyleTextProperties even if no chars given) 2009-05-19 15:09:14 +0200 sj r272080 : #i101459# applied patch (writing out StyleTextProperties even if no chars given) 2009-05-18 13:34:05 +0200 sj r272015 : #i47689# fixed rectangles toolbar 2009-05-13 14:59:08 +0200 sj r271862 : #i101563# fixed crash when loading pptx document 2009-05-12 19:31:58 +0200 sj r271835 : #101684# fixed rotation of customshapes 2009-05-08 16:37:01 +0200 sj r271724 : #i101683,i101584,i48160# added shearing of customshapes, fixed rotation problem 2009-04-28 17:32:14 +0200 sj r271335 : #i48160# fixed gluepoint rotation of customshapes 2009-04-27 16:31:54 +0200 cl r271291 : #i100138# applied patch for japanese reconversion feature 2009-04-27 16:30:52 +0200 cl r271290 : #i100138# applied patch for japanese reconversion feature 2009-04-27 16:28:55 +0200 cl r271289 : #i100138# applied patch for japanese reconversion feature 2009-04-23 14:22:59 +0200 cl r271170 : #i95342# #i96820# #i97298# multiple table handling fixes 2009-04-23 14:18:54 +0200 sj r271169 : #i60368# ignoring gamma values for toolbar/menu icons 2009-04-23 11:54:28 +0200 cl r271146 : #i97298# set style to text even during text edit 2009-04-23 11:46:38 +0200 cl r271145 : fixed compiler error with debug 2009-04-22 19:09:37 +0200 sj r271135 : #i101051# applied patch (proper import of notes page object) 2009-04-22 11:07:54 +0200 cl r271082 : #i96820# modify doc after merging cells 2009-04-22 10:57:35 +0200 cl r271081 : #i100307# applied patch from jlcheng to correctly set modfiy state 2009-04-22 10:31:11 +0200 cl r271079 : #i96736# copy merge information on clone 2009-04-21 08:27:22 +0200 cl r271016 : #i89541# use SfxErrorContext to make the ErrorHandler dialog modal 2009-04-20 17:52:56 +0200 cl r271003 : #i98480# removed 'EndPosition' and 'StartPosition' from styles 2009-04-20 16:41:55 +0200 cl r270994 : #i98403# fixed state handling for selected motion path 2009-04-17 11:35:25 +0200 cl r270931 : #i61274# export to pdf should behave like printing considering layer visibility 2009-04-17 10:00:17 +0200 cl r270924 : #i98967# set default style on any new shape except a page obj 2009-04-16 16:28:20 +0200 cl r270893 : #i98859# use percentage type for relative font height
2009-06-17 10:58:14 +00:00
}
2000-11-10 14:04:21 +00:00
else
pIMapWnd->SetImageMap( aLoadIMap );
delete pIStm;
2000-09-18 16:07:07 +00:00
}
pIMapWnd->Invalidate();
2000-09-18 16:07:07 +00:00
}
}
sal_Bool SvxIMapDlg::DoSave()
2000-09-18 16:07:07 +00:00
{
::sfx2::FileDialogHelper aDlg(
com::sun::star::ui::dialogs::TemplateDescription::FILESAVE_SIMPLE, 0 );
2000-09-26 08:29:01 +00:00
const String aBinFilter( DEFINE_CONST_UNICODE( IMAP_BINARY_FILTER ) );
const String aCERNFilter( DEFINE_CONST_UNICODE( IMAP_CERN_FILTER ) );
const String aNCSAFilter( DEFINE_CONST_UNICODE( IMAP_NCSA_FILTER ) );
2000-09-18 16:07:07 +00:00
SdrModel* pModel = pIMapWnd->GetSdrModel();
const sal_Bool bChanged = pModel->IsChanged();
sal_Bool bRet = false;
2000-09-18 16:07:07 +00:00
2000-09-26 08:29:01 +00:00
aDlg.AddFilter( aCERNFilter, DEFINE_CONST_UNICODE( IMAP_CERN_TYPE ) );
aDlg.AddFilter( aNCSAFilter, DEFINE_CONST_UNICODE( IMAP_NCSA_TYPE ) );
aDlg.AddFilter( aBinFilter, DEFINE_CONST_UNICODE( IMAP_BINARY_TYPE ) );
2000-09-18 16:07:07 +00:00
aDlg.SetCurrentFilter( aCERNFilter );
aDlg.SetDisplayDirectory( SvtPathOptions().GetWorkPath() );
2000-09-18 16:07:07 +00:00
if( aDlg.Execute() == ERRCODE_NONE )
2000-09-18 16:07:07 +00:00
{
const String aFilter( aDlg.GetCurrentFilter() );
2000-09-18 16:07:07 +00:00
String aExt;
sal_uIntPtr nFormat;
2000-09-18 16:07:07 +00:00
if ( aFilter == aBinFilter )
{
nFormat = IMAP_FORMAT_BIN;
2000-09-26 08:29:01 +00:00
aExt = DEFINE_CONST_UNICODE( IMAP_BINARY_EXT );
2000-09-18 16:07:07 +00:00
}
else if ( aFilter == aCERNFilter )
{
nFormat = IMAP_FORMAT_CERN;
2000-09-26 08:29:01 +00:00
aExt = DEFINE_CONST_UNICODE( IMAP_CERN_EXT );
2000-09-18 16:07:07 +00:00
}
else if ( aFilter == aNCSAFilter )
{
nFormat = IMAP_FORMAT_NCSA;
2000-09-26 08:29:01 +00:00
aExt = DEFINE_CONST_UNICODE( IMAP_NCSA_EXT );
2000-09-18 16:07:07 +00:00
}
else
{
return sal_False;
}
2000-09-18 16:07:07 +00:00
2000-11-10 14:04:21 +00:00
INetURLObject aURL( aDlg.GetPath() );
2000-09-18 16:07:07 +00:00
2000-11-10 14:04:21 +00:00
if( aURL.GetProtocol() == INET_PROT_NOT_VALID )
2000-09-18 16:07:07 +00:00
{
2011-03-01 19:07:44 +01:00
OSL_FAIL( "invalid URL" );
2000-09-18 16:07:07 +00:00
}
2000-11-10 14:04:21 +00:00
else
{
if( aURL.getExtension().isEmpty() )
2000-11-10 14:04:21 +00:00
aURL.setExtension( aExt );
2000-09-18 16:07:07 +00:00
SvStream* pOStm = ::utl::UcbStreamHelper::CreateStream( aURL.GetMainURL( INetURLObject::NO_DECODE ), STREAM_WRITE | STREAM_TRUNC );
2000-11-10 14:04:21 +00:00
if( pOStm )
{
pIMapWnd->GetImageMap().Write( *pOStm, nFormat, String() );
2000-09-18 16:07:07 +00:00
2000-11-10 14:04:21 +00:00
if( pOStm->GetError() )
ErrorHandler::HandleError( ERRCODE_IO_GENERAL );
2000-09-18 16:07:07 +00:00
2000-11-10 14:04:21 +00:00
delete pOStm;
pModel->SetChanged( bChanged );
bRet = sal_True;
2000-11-10 14:04:21 +00:00
}
}
2000-09-18 16:07:07 +00:00
}
return bRet;
}
IMPL_LINK( SvxIMapDlg, InfoHdl, IMapWindow*, pWnd )
{
String aStr;
const NotifyInfo& rInfo = pWnd->GetInfo();
if ( rInfo.bNewObj )
{
if( rInfo.aMarkURL.Len() && ( maURLBox.GetEntryPos( rInfo.aMarkURL ) == LISTBOX_ENTRY_NOTFOUND ) )
maURLBox.InsertEntry( rInfo.aMarkURL );
2000-09-18 16:07:07 +00:00
maURLBox.SetText( rInfo.aMarkURL );
aEdtText.SetText( rInfo.aMarkAltText );
2000-09-18 16:07:07 +00:00
if ( !rInfo.aMarkTarget.Len() )
maCbbTarget.SetText( DEFINE_CONST_UNICODE( SELF_TARGET ) );
2000-09-18 16:07:07 +00:00
else
maCbbTarget.SetText( rInfo.aMarkTarget );
2000-09-18 16:07:07 +00:00
}
if ( !rInfo.bOneMarked )
{
aTbxIMapDlg1.CheckItem( TBI_ACTIVE, sal_False );
aTbxIMapDlg1.EnableItem( TBI_ACTIVE, sal_False );
aTbxIMapDlg1.EnableItem( TBI_MACRO, sal_False );
aTbxIMapDlg1.EnableItem( TBI_PROPERTY, sal_False );
2000-09-18 16:07:07 +00:00
aStbStatus.SetItemText( 1, aStr );
aFtURL.Disable();
maURLBox.Disable();
2000-09-18 16:07:07 +00:00
aFtText.Disable();
aEdtText.Disable();
maFtTarget.Disable();
maCbbTarget.Disable();
2000-09-18 16:07:07 +00:00
maURLBox.SetText( String() );
2000-09-18 16:07:07 +00:00
aEdtText.SetText( String() );
}
else
{
aTbxIMapDlg1.EnableItem( TBI_ACTIVE, sal_True );
2000-09-18 16:07:07 +00:00
aTbxIMapDlg1.CheckItem( TBI_ACTIVE, !rInfo.bActivated );
aTbxIMapDlg1.EnableItem( TBI_MACRO, sal_True );
aTbxIMapDlg1.EnableItem( TBI_PROPERTY, sal_True );
2000-09-18 16:07:07 +00:00
aFtURL.Enable();
maURLBox.Enable();
2000-09-18 16:07:07 +00:00
aFtText.Enable();
aEdtText.Enable();
maFtTarget.Enable();
maCbbTarget.Enable();
2000-09-18 16:07:07 +00:00
aStbStatus.SetItemText( 1, rInfo.aMarkURL );
if ( maURLBox.GetText() != rInfo.aMarkURL )
maURLBox.SetText( rInfo.aMarkURL );
2000-09-18 16:07:07 +00:00
if ( aEdtText.GetText() != rInfo.aMarkAltText )
aEdtText.SetText( rInfo.aMarkAltText );
2000-09-18 16:07:07 +00:00
if ( !rInfo.aMarkTarget.Len() )
maCbbTarget.SetText( DEFINE_CONST_UNICODE( SELF_TARGET ) );
2000-09-18 16:07:07 +00:00
else
maCbbTarget.SetText( rInfo.aMarkTarget );
2000-09-18 16:07:07 +00:00
}
return 0;
}
IMPL_LINK( SvxIMapDlg, MousePosHdl, IMapWindow*, pWnd )
{
String aStr;
const FieldUnit eFieldUnit = GetBindings().GetDispatcher()->GetModule()->GetFieldUnit();
const Point& rMousePos = pWnd->GetMousePos();
LocaleDataWrapper aLocaleWrapper( ::comphelper::getProcessServiceFactory(), Application::GetSettings().GetLocale() );
const sal_Unicode cSep = aLocaleWrapper.getNumDecimalSep()[0];
2000-09-18 16:07:07 +00:00
aStr.Assign( GetUnitString( rMousePos.X(), eFieldUnit, cSep ) );
2000-09-26 08:29:01 +00:00
aStr.Append( DEFINE_CONST_UNICODE( " / " ) );
2000-09-18 16:07:07 +00:00
aStr.Append( GetUnitString( rMousePos.Y(), eFieldUnit, cSep ) );
aStbStatus.SetItemText( 2, aStr );
return 0L;
}
IMPL_LINK( SvxIMapDlg, GraphSizeHdl, IMapWindow*, pWnd )
{
String aStr;
const FieldUnit eFieldUnit = GetBindings().GetDispatcher()->GetModule()->GetFieldUnit();
2000-09-18 16:07:07 +00:00
const Size& rSize = pWnd->GetGraphicSize();
LocaleDataWrapper aLocaleWrapper( ::comphelper::getProcessServiceFactory(), Application::GetSettings().GetLocale() );
const sal_Unicode cSep = aLocaleWrapper.getNumDecimalSep()[0];
2000-09-18 16:07:07 +00:00
aStr.Assign( GetUnitString( rSize.Width(), eFieldUnit, cSep ) );
2000-09-26 08:29:01 +00:00
aStr.Append( DEFINE_CONST_UNICODE( " x " ) );
2000-09-18 16:07:07 +00:00
aStr.Append( GetUnitString( rSize.Height(), eFieldUnit, cSep ) );
aStbStatus.SetItemText( 3, aStr );
return 0L;
}
IMPL_LINK_NOARG(SvxIMapDlg, URLModifyHdl)
2000-09-18 16:07:07 +00:00
{
NotifyInfo aNewInfo;
aNewInfo.aMarkURL = maURLBox.GetText();
aNewInfo.aMarkAltText = aEdtText.GetText();
aNewInfo.aMarkTarget = maCbbTarget.GetText();
2000-09-18 16:07:07 +00:00
pIMapWnd->ReplaceActualIMapInfo( aNewInfo );
return 0;
}
IMPL_LINK_NOARG(SvxIMapDlg, URLLoseFocusHdl)
2000-09-18 16:07:07 +00:00
{
NotifyInfo aNewInfo;
const String aURLText( maURLBox.GetText() );
const String aTargetText( maCbbTarget.GetText() );
2000-09-18 16:07:07 +00:00
if ( aURLText.Len() )
{
String aBase = GetBindings().GetDispatcher()->GetFrame()->GetObjectShell()->GetMedium()->GetBaseURL();
aNewInfo.aMarkURL = ::URIHelper::SmartRel2Abs( INetURLObject(aBase), aURLText, URIHelper::GetMaybeFileHdl(), true, false,
2000-09-18 16:07:07 +00:00
INetURLObject::WAS_ENCODED,
INetURLObject::DECODE_UNAMBIGUOUS );
}
else
aNewInfo.aMarkURL = aURLText;
aNewInfo.aMarkAltText = aEdtText.GetText();
2000-09-18 16:07:07 +00:00
if ( !aTargetText.Len() )
2000-09-26 08:29:01 +00:00
aNewInfo.aMarkTarget = DEFINE_CONST_UNICODE( SELF_TARGET );
2000-09-18 16:07:07 +00:00
else
aNewInfo.aMarkTarget = aTargetText;
pIMapWnd->ReplaceActualIMapInfo( aNewInfo );
return 0;
}
IMPL_LINK_NOARG(SvxIMapDlg, UpdateHdl)
2000-09-18 16:07:07 +00:00
{
pOwnData->aTimer.Stop();
if ( pOwnData->pUpdateEditingObject != pCheckObj )
{
if ( pIMapWnd->IsChanged() &&
( QueryBox( this, WB_YES_NO | WB_DEF_YES,
String( SVX_RES( STR_IMAPDLG_SAVE ) ) ).Execute() == RET_YES ) )
{
DoSave();
}
SetGraphic( pOwnData->aUpdateGraphic );
SetImageMap( pOwnData->aUpdateImageMap );
SetTargetList( pOwnData->aUpdateTargetList );
SetEditingObject( pOwnData->pUpdateEditingObject );
// After changes => default selection
aTbxIMapDlg1.CheckItem( TBI_SELECT, sal_True );
pIMapWnd->SetEditMode( sal_True );
2000-09-18 16:07:07 +00:00
}
// Delete the copied list again in the Update method
for ( size_t i = 0, n = pOwnData->aUpdateTargetList.size(); i < n; ++i )
delete pOwnData->aUpdateTargetList[ i ];
pOwnData->aUpdateTargetList.clear();
2000-09-18 16:07:07 +00:00
GetBindings().Invalidate( SID_IMAP_EXEC );
return 0L;
}
IMPL_LINK( SvxIMapDlg, StateHdl, IMapWindow*, pWnd )
{
const SdrObject* pObj = pWnd->GetSelectedSdrObject();
const SdrModel* pModel = pWnd->GetSdrModel();
const SdrView* pView = pWnd->GetSdrView();
const sal_Bool bPolyEdit = ( pObj != NULL ) && pObj->ISA( SdrPathObj );
const sal_Bool bDrawEnabled = !( bPolyEdit && aTbxIMapDlg1.IsItemChecked( TBI_POLYEDIT ) );
2000-09-18 16:07:07 +00:00
aTbxIMapDlg1.EnableItem( TBI_APPLY, pOwnData->bExecState && pWnd->IsChanged() );
aTbxIMapDlg1.EnableItem( TBI_SELECT, bDrawEnabled );
aTbxIMapDlg1.EnableItem( TBI_RECT, bDrawEnabled );
aTbxIMapDlg1.EnableItem( TBI_CIRCLE, bDrawEnabled );
aTbxIMapDlg1.EnableItem( TBI_POLY, bDrawEnabled );
aTbxIMapDlg1.EnableItem( TBI_FREEPOLY, bDrawEnabled );
// BezierEditor-Stati
aTbxIMapDlg1.EnableItem( TBI_POLYEDIT, bPolyEdit );
aTbxIMapDlg1.EnableItem( TBI_POLYMOVE, !bDrawEnabled );
aTbxIMapDlg1.EnableItem( TBI_POLYINSERT, !bDrawEnabled );
aTbxIMapDlg1.EnableItem( TBI_POLYDELETE, !bDrawEnabled && pView->IsDeleteMarkedPointsPossible() );
// Undo/Redo
aTbxIMapDlg1.EnableItem( TBI_UNDO, pModel->HasUndoActions() );
aTbxIMapDlg1.EnableItem( TBI_REDO, pModel->HasRedoActions() );
2000-09-18 16:07:07 +00:00
if ( bPolyEdit )
{
sal_uInt16 nId = 0;
2000-09-18 16:07:07 +00:00
switch( pWnd->GetPolyEditMode() )
{
case( SID_BEZIER_MOVE ): nId = TBI_POLYMOVE; break;
case( SID_BEZIER_INSERT ): nId = TBI_POLYINSERT; break;
default:
break;
}
aTbxIMapDlg1.CheckItem( nId, sal_True );
2000-09-18 16:07:07 +00:00
}
else
{
aTbxIMapDlg1.CheckItem( TBI_POLYEDIT, sal_False );
aTbxIMapDlg1.CheckItem( TBI_POLYMOVE, sal_True );
aTbxIMapDlg1.CheckItem( TBI_POLYINSERT, sal_False );
2000-09-18 16:07:07 +00:00
pWnd->SetPolyEditMode( 0 );
}
return 0L;
}
IMPL_LINK_NOARG(SvxIMapDlg, MiscHdl)
2002-07-05 13:55:35 +00:00
{
SvtMiscOptions aMiscOptions;
aTbxIMapDlg1.SetOutStyle( aMiscOptions.GetToolboxStyle() );
2000-09-18 16:07:07 +00:00
2002-07-05 13:55:35 +00:00
return 0L;
}
2002-07-11 09:48:07 +00:00
void SvxIMapDlg::ApplyImageList()
{
2010-11-05 19:24:42 -07:00
ImageList& rImgLst = maImageList;
2002-07-11 09:48:07 +00:00
aTbxIMapDlg1.SetImageList( rImgLst );
}
void SvxIMapDlg::DataChanged( const DataChangedEvent& rDCEvt )
{
SfxModelessDialog::DataChanged( rDCEvt );
if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) )
ApplyImageList();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */