2010-10-12 15:53:47 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-11-21 22:06:52 +00:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
#include <tools/urlobj.hxx>
|
|
|
|
#include <vcl/msgbox.hxx>
|
|
|
|
#include <vcl/help.hxx>
|
2013-10-22 15:58:57 +03:00
|
|
|
#include <sfx2/sfxsids.hrc>
|
2000-09-18 16:07:07 +00:00
|
|
|
#include <svtools/imaprect.hxx>
|
|
|
|
#include <svtools/imapcirc.hxx>
|
|
|
|
#include <svtools/imappoly.hxx>
|
2009-10-16 00:05:16 +02:00
|
|
|
#include <svl/urlbmk.hxx>
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2010-04-20 15:55:51 +02:00
|
|
|
#include <svx/xoutbmp.hxx>
|
2007-06-27 16:16:02 +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>
|
2007-06-27 16:16:02 +00:00
|
|
|
#include <svx/svdpage.hxx>
|
|
|
|
#include <svx/svdorect.hxx>
|
|
|
|
#include <svx/svdocirc.hxx>
|
|
|
|
#include <svx/svdopath.hxx>
|
|
|
|
#include <svx/xfltrit.hxx>
|
|
|
|
#include <svx/svdpagv.hxx>
|
2009-10-16 00:05:16 +02:00
|
|
|
#include <svl/urihelper.hxx>
|
2007-06-27 16:16:02 +00:00
|
|
|
#include <svx/xfillit.hxx>
|
|
|
|
#include <svx/xlineit.hxx>
|
2009-05-06 10:59:57 +00:00
|
|
|
#include <sfx2/evntconf.hxx>
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
#include <sot/formats.hxx>
|
|
|
|
|
2007-06-27 16:16:02 +00:00
|
|
|
#include <svx/svxdlg.hxx>
|
2006-11-14 12:16:18 +00:00
|
|
|
#include <basegfx/point/b2dpoint.hxx>
|
|
|
|
#include <basegfx/polygon/b2dpolygon.hxx>
|
2015-09-15 15:35:44 +01:00
|
|
|
#include <memory>
|
2004-02-03 17:33:10 +00:00
|
|
|
|
2014-07-18 18:07:36 +02:00
|
|
|
using namespace com::sun::star;
|
2008-09-30 12:33:30 +00:00
|
|
|
using ::com::sun::star::frame::XFrame;
|
|
|
|
using ::com::sun::star::uno::Reference;
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
#define TRANSCOL Color( COL_WHITE )
|
|
|
|
|
2014-09-23 11:20:40 +02:00
|
|
|
IMapWindow::IMapWindow( vcl::Window* pParent, WinBits nBits, const Reference< XFrame >& rxDocumentFrame ) :
|
2014-07-07 11:24:48 +02:00
|
|
|
GraphCtrl( pParent, nBits ),
|
2008-09-30 12:33:30 +00:00
|
|
|
DropTargetHelper( this ),
|
|
|
|
mxDocumentFrame( rxDocumentFrame )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
SetWinStyle( WB_SDRMODE );
|
|
|
|
|
|
|
|
pItemInfo = new SfxItemInfo[ 1 ];
|
|
|
|
memset( pItemInfo, 0, sizeof( SfxItemInfo ) );
|
2013-04-07 12:06:47 +02:00
|
|
|
pIMapPool = new SfxItemPool( OUString("IMapItemPool"),
|
2000-09-18 16:07:07 +00:00
|
|
|
SID_ATTR_MACROITEM, SID_ATTR_MACROITEM, pItemInfo );
|
|
|
|
pIMapPool->FreezeIdRanges();
|
|
|
|
}
|
|
|
|
|
|
|
|
IMapWindow::~IMapWindow()
|
2015-01-13 14:52:40 +02:00
|
|
|
{
|
2015-03-10 09:07:06 +02:00
|
|
|
disposeOnce();
|
2015-01-13 14:52:40 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void IMapWindow::dispose()
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
CWS-TOOLING: integrate CWS aw063
2009-02-12 13:10:24 +0100 aw r267649 : #i99123# when a primitive is invisible, it is not sufficient to produce no output when decomposing, but to add invisible data using HitTestPrimitive2D. This is needed for the slideshow which relies on geometry data in MetaFiles when painting invisible objects
2009-02-12 13:08:39 +0100 aw r267648 : #i99123# do not ignore HitTestPrimitive2D, but draw empty rectangles instead. This is needed since Slideshow is based on getting MetaFile content when painting invisible objects
2009-02-11 16:04:28 +0100 aw r267620 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:04:10 +0100 aw r267619 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:03:56 +0100 aw r267618 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:03:39 +0100 aw r267617 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:03:21 +0100 aw r267615 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:02:48 +0100 aw r267614 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:02:24 +0100 aw r267613 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:02:01 +0100 aw r267612 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:01:32 +0100 aw r267611 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:01:05 +0100 aw r267610 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:00:15 +0100 aw r267608 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 11:27:33 +0100 aw r267585 : #i98788# added missing include for STL
2009-02-10 17:46:50 +0100 aw r267570 : #i98788# added reaction on pool destruction
2009-02-10 17:11:58 +0100 aw r267562 : #i98788# added messaging mechanism to register for pool destruction
2009-02-10 13:35:35 +0100 aw r267549 : #i98788# removing changes, too complicated and risky for 3.1
2009-02-10 12:13:48 +0100 aw r267546 : #i98788# 4th round
2009-02-10 12:13:37 +0100 aw r267545 : #i98788# 4th round
2009-02-10 12:13:26 +0100 aw r267544 : #i98788# 4th round
2009-02-10 12:13:14 +0100 aw r267543 : #i98788# 4th round
2009-02-10 12:13:03 +0100 aw r267542 : #i98788# 4th round
2009-02-10 12:12:50 +0100 aw r267541 : #i98788# 4th round
2009-02-10 12:12:37 +0100 aw r267540 : #i98788# 4th round
2009-02-08 14:38:22 +0100 aw r267495 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:38:06 +0100 aw r267494 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:37:48 +0100 aw r267493 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:37:17 +0100 aw r267492 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:56 +0100 aw r267491 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:44 +0100 aw r267490 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:29 +0100 aw r267489 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:16 +0100 aw r267488 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:02 +0100 aw r267487 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:35:46 +0100 aw r267486 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-05 12:20:39 +0100 aw r267415 : #i98788# 2nd batch of adaptions for SfxItemPoolHolder addition
2009-02-04 15:12:54 +0100 aw r267385 : #i98788# added newline at EOF
2009-02-04 13:26:04 +0100 aw r267379 : #i98788# make SfxItemPool holdable
2009-02-04 13:25:40 +0100 aw r267378 : #i98788# make SfxItemPool holdable
2009-02-04 13:25:08 +0100 aw r267377 : #i98788# make SfxItemPool holdable
2009-02-04 13:24:42 +0100 aw r267376 : #i98788# make SfxItemPool holdable
2009-02-04 13:23:14 +0100 aw r267375 : #i98788# make SfxItemPool holdable
2009-02-04 13:23:02 +0100 aw r267374 : #i98788# make SfxItemPool holdable
2009-01-29 17:08:31 +0100 aw r267159 : #i97628# completed the fix
2009-01-29 17:08:15 +0100 aw r267158 : #i97628# completed the fix
2009-01-29 14:09:07 +0100 aw r267132 : #i97628# Corrected usage of ParagraphData in headers
2009-01-29 14:06:58 +0100 iha r267131 : #i98344# incorrect font size in charts
2009-01-29 12:13:46 +0100 aw r267115 : #i97628# back to old state; triggers too many errors in other modules
2009-01-29 12:03:51 +0100 aw r267114 : #i97628# enabled exceptions due to STL vector include
2009-01-29 11:21:37 +0100 aw r267107 : #i97628# added needed include
2009-01-28 17:58:29 +0100 aw r267077 : #i97628# first version of newly implemented OutlinerParaObject and adaptions
2009-01-28 17:58:12 +0100 aw r267076 : #i97628# first version of newly implemented OutlinerParaObject and adaptions
2009-01-28 17:57:51 +0100 aw r267074 : #i97628# first version of newly implemented OutlinerParaObject and adaptions
2009-01-28 17:57:21 +0100 aw r267073 : #i97628# first version of newly implemented OutlinerParaObject and adaptions
2009-01-27 17:07:33 +0100 aw r267011 : #i98402# added support for ViewRange when exporting MetaFiles in ObjectContactOfPageView::DoProcessDisplay to avoid to paint too much
2009-01-27 11:45:48 +0100 aw r266973 : #i98404# Added a warning to a place where a conversion to rectangle should not be copied from
2009-01-26 21:44:36 +0100 iha r266949 : #i98497# 3D charts are rendered with wrong size
2009-01-26 20:47:07 +0100 aw r266947 : #i98404# handle BackgroundColorPrimitive2D directly in PixelRenderers and avoid AA under all circumstances
2009-01-26 14:50:36 +0100 aw r266926 : #i98386# secured cloning of SdrObject in IMapUserData by boost::shared_prt usage
2009-01-26 12:51:30 +0100 aw r266916 : #i96581# added separated FontStretching and fallback for small X!=Y scale differences
2009-01-23 16:14:55 +0100 aw r266834 : #i96475# added missing implementation of TextDecoratedPortionPrimitive2D::getB2DRange
2009-01-23 15:24:34 +0100 aw r266826 : #i98405# fixed fallback to DrawAlphaRect to use the correctly sized rectangle
2009-01-23 13:34:43 +0100 aw r266813 : #i96474# fixed impSplitSingleWords for an unexpected case
2009-01-23 10:47:31 +0100 aw r266786 : #i98289#,#i96474# tooling and new flags for tasks
2009-01-23 10:47:20 +0100 aw r266785 : #i98289#,#i96474# tooling and new flags for tasks
2009-01-23 10:47:09 +0100 aw r266783 : #i98289#,#i96474# tooling and new flags for tasks
2009-01-23 10:46:58 +0100 aw r266782 : #i98289#,#i96474# tooling and new flags for tasks
2009-01-23 10:46:48 +0100 aw r266781 : #i98289#,#i96474# tooling and new flags for tasks
2009-03-04 14:16:02 +00:00
|
|
|
SfxItemPool::Free(pIMapPool);
|
2000-09-18 16:07:07 +00:00
|
|
|
delete[] pItemInfo;
|
2015-01-13 14:52:40 +02:00
|
|
|
GraphCtrl::dispose();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2014-07-09 10:47:33 +01:00
|
|
|
Size IMapWindow::GetOptimalSize() const
|
|
|
|
{
|
2016-09-20 16:41:39 +02:00
|
|
|
return LogicToPixel(Size(270, 170), MapUnit::MapAppFont);
|
2014-07-09 10:47:33 +01:00
|
|
|
}
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
void IMapWindow::SetImageMap( const ImageMap& rImageMap )
|
|
|
|
{
|
2016-03-16 15:12:13 +02:00
|
|
|
ReplaceImageMap( rImageMap );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2016-03-16 15:12:13 +02:00
|
|
|
void IMapWindow::ReplaceImageMap( const ImageMap& rImageMap )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2015-11-10 10:25:28 +01:00
|
|
|
SdrPage* pPage = nullptr;
|
2000-09-18 16:07:07 +00:00
|
|
|
aIMap = rImageMap;
|
|
|
|
|
2006-07-25 11:49:48 +00:00
|
|
|
if(GetSdrModel())
|
|
|
|
{
|
|
|
|
// try to access page
|
|
|
|
pPage = GetSdrModel()->GetPage(0L);
|
|
|
|
}
|
|
|
|
|
|
|
|
if(pPage)
|
|
|
|
{
|
|
|
|
// clear all draw objects
|
|
|
|
pPage->Clear();
|
|
|
|
}
|
|
|
|
|
|
|
|
if(GetSdrView())
|
|
|
|
{
|
|
|
|
// #i63762# reset selection at view
|
|
|
|
GetSdrView()->UnmarkAllObj();
|
|
|
|
}
|
|
|
|
|
|
|
|
// create new drawing objects
|
2011-01-10 16:11:35 +01:00
|
|
|
const sal_uInt16 nCount(rImageMap.GetIMapObjectCount());
|
2006-07-25 11:49:48 +00:00
|
|
|
|
2011-01-10 16:11:35 +01:00
|
|
|
for ( sal_uInt16 i(nCount); i > 0; i-- )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2006-10-12 11:16:34 +00:00
|
|
|
SdrObject* pNewObj = CreateObj( rImageMap.GetIMapObject( i - 1 ) );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2014-05-07 10:53:56 +01:00
|
|
|
if (pNewObj && pPage)
|
2006-07-25 11:49:48 +00:00
|
|
|
{
|
2000-09-18 16:07:07 +00:00
|
|
|
pPage->InsertObject( pNewObj );
|
2006-07-25 11:49:48 +00:00
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-01-13 15:06:54 +02:00
|
|
|
void IMapWindow::ReplaceActualIMapInfo( const NotifyInfo& rNewInfo )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
const SdrObject* pSdrObj = GetSelectedSdrObject();
|
|
|
|
IMapObject* pIMapObj;
|
|
|
|
|
2015-11-10 10:25:28 +01:00
|
|
|
if ( pSdrObj && ( ( pIMapObj = GetIMapObj( pSdrObj ) ) != nullptr ) )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
pIMapObj->SetURL( rNewInfo.aMarkURL );
|
2007-06-26 12:51:32 +00:00
|
|
|
pIMapObj->SetAltText( rNewInfo.aMarkAltText );
|
2000-09-18 16:07:07 +00:00
|
|
|
pIMapObj->SetTarget( rNewInfo.aMarkTarget );
|
2015-08-11 08:42:40 +02:00
|
|
|
pModel->SetChanged();
|
2014-04-14 16:15:22 +02:00
|
|
|
UpdateInfo( false );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
const ImageMap& IMapWindow::GetImageMap()
|
|
|
|
{
|
|
|
|
if ( pModel->IsChanged() )
|
|
|
|
{
|
2015-05-11 12:51:10 +02:00
|
|
|
SdrPage* pPage = pModel->GetPage( 0 );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
if ( pPage )
|
|
|
|
{
|
2014-08-16 12:59:11 +02:00
|
|
|
const size_t nCount = pPage->GetObjCount();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
aIMap.ClearImageMap();
|
|
|
|
|
2014-08-16 12:59:11 +02:00
|
|
|
for ( size_t i = nCount; i; )
|
|
|
|
{
|
|
|
|
--i;
|
2014-10-20 11:52:06 +02:00
|
|
|
aIMap.InsertIMapObject( *( static_cast<IMapUserData*>( pPage->GetObj( i )->GetUserData( 0 ) )->GetObject() ) );
|
2014-08-16 12:59:11 +02:00
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2014-02-11 11:43:35 +02:00
|
|
|
pModel->SetChanged( false );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return aIMap;
|
|
|
|
}
|
|
|
|
|
|
|
|
void IMapWindow::SetTargetList( TargetList& rTargetList )
|
|
|
|
{
|
2011-02-21 23:29:31 +01:00
|
|
|
// Delete old List
|
2011-01-01 10:53:48 -08:00
|
|
|
aTargetList.clear();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2011-02-21 23:29:31 +01:00
|
|
|
// Fill with the provided list
|
2016-05-11 09:53:05 +02:00
|
|
|
for(const OUString & s : rTargetList)
|
|
|
|
aTargetList.push_back( s );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2014-02-11 11:43:35 +02:00
|
|
|
pModel->SetChanged( false );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
SdrObject* IMapWindow::CreateObj( const IMapObject* pIMapObj )
|
|
|
|
{
|
|
|
|
Point aPoint;
|
|
|
|
Rectangle aClipRect( aPoint, GetGraphicSize() );
|
2015-11-10 10:25:28 +01:00
|
|
|
SdrObject* pSdrObj = nullptr;
|
CWS-TOOLING: integrate CWS aw063
2009-02-12 13:10:24 +0100 aw r267649 : #i99123# when a primitive is invisible, it is not sufficient to produce no output when decomposing, but to add invisible data using HitTestPrimitive2D. This is needed for the slideshow which relies on geometry data in MetaFiles when painting invisible objects
2009-02-12 13:08:39 +0100 aw r267648 : #i99123# do not ignore HitTestPrimitive2D, but draw empty rectangles instead. This is needed since Slideshow is based on getting MetaFile content when painting invisible objects
2009-02-11 16:04:28 +0100 aw r267620 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:04:10 +0100 aw r267619 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:03:56 +0100 aw r267618 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:03:39 +0100 aw r267617 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:03:21 +0100 aw r267615 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:02:48 +0100 aw r267614 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:02:24 +0100 aw r267613 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:02:01 +0100 aw r267612 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:01:32 +0100 aw r267611 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:01:05 +0100 aw r267610 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:00:15 +0100 aw r267608 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 11:27:33 +0100 aw r267585 : #i98788# added missing include for STL
2009-02-10 17:46:50 +0100 aw r267570 : #i98788# added reaction on pool destruction
2009-02-10 17:11:58 +0100 aw r267562 : #i98788# added messaging mechanism to register for pool destruction
2009-02-10 13:35:35 +0100 aw r267549 : #i98788# removing changes, too complicated and risky for 3.1
2009-02-10 12:13:48 +0100 aw r267546 : #i98788# 4th round
2009-02-10 12:13:37 +0100 aw r267545 : #i98788# 4th round
2009-02-10 12:13:26 +0100 aw r267544 : #i98788# 4th round
2009-02-10 12:13:14 +0100 aw r267543 : #i98788# 4th round
2009-02-10 12:13:03 +0100 aw r267542 : #i98788# 4th round
2009-02-10 12:12:50 +0100 aw r267541 : #i98788# 4th round
2009-02-10 12:12:37 +0100 aw r267540 : #i98788# 4th round
2009-02-08 14:38:22 +0100 aw r267495 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:38:06 +0100 aw r267494 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:37:48 +0100 aw r267493 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:37:17 +0100 aw r267492 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:56 +0100 aw r267491 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:44 +0100 aw r267490 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:29 +0100 aw r267489 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:16 +0100 aw r267488 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:02 +0100 aw r267487 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:35:46 +0100 aw r267486 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-05 12:20:39 +0100 aw r267415 : #i98788# 2nd batch of adaptions for SfxItemPoolHolder addition
2009-02-04 15:12:54 +0100 aw r267385 : #i98788# added newline at EOF
2009-02-04 13:26:04 +0100 aw r267379 : #i98788# make SfxItemPool holdable
2009-02-04 13:25:40 +0100 aw r267378 : #i98788# make SfxItemPool holdable
2009-02-04 13:25:08 +0100 aw r267377 : #i98788# make SfxItemPool holdable
2009-02-04 13:24:42 +0100 aw r267376 : #i98788# make SfxItemPool holdable
2009-02-04 13:23:14 +0100 aw r267375 : #i98788# make SfxItemPool holdable
2009-02-04 13:23:02 +0100 aw r267374 : #i98788# make SfxItemPool holdable
2009-01-29 17:08:31 +0100 aw r267159 : #i97628# completed the fix
2009-01-29 17:08:15 +0100 aw r267158 : #i97628# completed the fix
2009-01-29 14:09:07 +0100 aw r267132 : #i97628# Corrected usage of ParagraphData in headers
2009-01-29 14:06:58 +0100 iha r267131 : #i98344# incorrect font size in charts
2009-01-29 12:13:46 +0100 aw r267115 : #i97628# back to old state; triggers too many errors in other modules
2009-01-29 12:03:51 +0100 aw r267114 : #i97628# enabled exceptions due to STL vector include
2009-01-29 11:21:37 +0100 aw r267107 : #i97628# added needed include
2009-01-28 17:58:29 +0100 aw r267077 : #i97628# first version of newly implemented OutlinerParaObject and adaptions
2009-01-28 17:58:12 +0100 aw r267076 : #i97628# first version of newly implemented OutlinerParaObject and adaptions
2009-01-28 17:57:51 +0100 aw r267074 : #i97628# first version of newly implemented OutlinerParaObject and adaptions
2009-01-28 17:57:21 +0100 aw r267073 : #i97628# first version of newly implemented OutlinerParaObject and adaptions
2009-01-27 17:07:33 +0100 aw r267011 : #i98402# added support for ViewRange when exporting MetaFiles in ObjectContactOfPageView::DoProcessDisplay to avoid to paint too much
2009-01-27 11:45:48 +0100 aw r266973 : #i98404# Added a warning to a place where a conversion to rectangle should not be copied from
2009-01-26 21:44:36 +0100 iha r266949 : #i98497# 3D charts are rendered with wrong size
2009-01-26 20:47:07 +0100 aw r266947 : #i98404# handle BackgroundColorPrimitive2D directly in PixelRenderers and avoid AA under all circumstances
2009-01-26 14:50:36 +0100 aw r266926 : #i98386# secured cloning of SdrObject in IMapUserData by boost::shared_prt usage
2009-01-26 12:51:30 +0100 aw r266916 : #i96581# added separated FontStretching and fallback for small X!=Y scale differences
2009-01-23 16:14:55 +0100 aw r266834 : #i96475# added missing implementation of TextDecoratedPortionPrimitive2D::getB2DRange
2009-01-23 15:24:34 +0100 aw r266826 : #i98405# fixed fallback to DrawAlphaRect to use the correctly sized rectangle
2009-01-23 13:34:43 +0100 aw r266813 : #i96474# fixed impSplitSingleWords for an unexpected case
2009-01-23 10:47:31 +0100 aw r266786 : #i98289#,#i96474# tooling and new flags for tasks
2009-01-23 10:47:20 +0100 aw r266785 : #i98289#,#i96474# tooling and new flags for tasks
2009-01-23 10:47:09 +0100 aw r266783 : #i98289#,#i96474# tooling and new flags for tasks
2009-01-23 10:46:58 +0100 aw r266782 : #i98289#,#i96474# tooling and new flags for tasks
2009-01-23 10:46:48 +0100 aw r266781 : #i98289#,#i96474# tooling and new flags for tasks
2009-03-04 14:16:02 +00:00
|
|
|
IMapObjectPtr pCloneIMapObj;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
switch( pIMapObj->GetType() )
|
|
|
|
{
|
2016-02-18 08:26:33 +02:00
|
|
|
case IMAP_OBJ_RECTANGLE:
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2014-10-20 11:52:06 +02:00
|
|
|
const IMapRectangleObject* pIMapRectObj = static_cast<const IMapRectangleObject*>(pIMapObj);
|
2014-03-20 16:07:35 +02:00
|
|
|
Rectangle aDrawRect( pIMapRectObj->GetRectangle( false ) );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2011-02-21 23:29:31 +01:00
|
|
|
// clipped on CanvasPane
|
2000-09-18 16:07:07 +00:00
|
|
|
aDrawRect.Intersection( aClipRect );
|
|
|
|
|
2015-06-08 16:28:40 +02:00
|
|
|
pSdrObj = static_cast<SdrObject*>(new SdrRectObj( aDrawRect ));
|
|
|
|
pCloneIMapObj.reset(static_cast<IMapObject*>(new IMapRectangleObject( *pIMapRectObj )));
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2016-02-18 08:26:33 +02:00
|
|
|
case IMAP_OBJ_CIRCLE:
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2014-10-20 11:52:06 +02:00
|
|
|
const IMapCircleObject* pIMapCircleObj = static_cast<const IMapCircleObject*>(pIMapObj);
|
2014-03-20 16:07:35 +02:00
|
|
|
const Point aCenter( pIMapCircleObj->GetCenter( false ) );
|
|
|
|
const long nRadius = pIMapCircleObj->GetRadius( false );
|
2000-09-18 16:07:07 +00:00
|
|
|
const Point aOffset( nRadius, nRadius );
|
|
|
|
Rectangle aCircle( aCenter - aOffset, aCenter + aOffset );
|
|
|
|
|
2011-02-21 23:29:31 +01:00
|
|
|
// limited to CanvasPane
|
2000-09-18 16:07:07 +00:00
|
|
|
aCircle.Intersection( aClipRect );
|
|
|
|
|
2015-06-08 16:28:40 +02:00
|
|
|
pSdrObj = static_cast<SdrObject*>(new SdrCircObj( OBJ_CIRC, aCircle, 0, 36000 ));
|
|
|
|
pCloneIMapObj.reset(static_cast<IMapObject*>(new IMapCircleObject( *pIMapCircleObj )));
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2016-02-18 08:26:33 +02:00
|
|
|
case IMAP_OBJ_POLYGON:
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2014-10-20 11:52:06 +02:00
|
|
|
const IMapPolygonObject* pIMapPolyObj = static_cast<const IMapPolygonObject*>(pIMapObj);
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2011-02-21 23:29:31 +01:00
|
|
|
// If it actually is an ellipse, then another ellipse is created again
|
2000-09-18 16:07:07 +00:00
|
|
|
if ( pIMapPolyObj->HasExtraEllipse() )
|
|
|
|
{
|
|
|
|
Rectangle aDrawRect( pIMapPolyObj->GetExtraEllipse() );
|
|
|
|
|
2011-02-21 23:29:31 +01:00
|
|
|
// clipped on CanvasPane
|
2000-09-18 16:07:07 +00:00
|
|
|
aDrawRect.Intersection( aClipRect );
|
|
|
|
|
2015-06-08 16:28:40 +02:00
|
|
|
pSdrObj = static_cast<SdrObject*>(new SdrCircObj( OBJ_CIRC, aDrawRect, 0, 36000 ));
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-08-16 16:45:12 -05:00
|
|
|
const tools::Polygon& rPoly = pIMapPolyObj->GetPolygon( false );
|
|
|
|
tools::Polygon aDrawPoly( rPoly );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2011-02-21 23:29:31 +01:00
|
|
|
// clipped on CanvasPane
|
2000-09-18 16:07:07 +00:00
|
|
|
aDrawPoly.Clip( aClipRect );
|
|
|
|
|
2006-11-14 12:16:18 +00:00
|
|
|
basegfx::B2DPolygon aPolygon;
|
|
|
|
aPolygon.append(aDrawPoly.getB2DPolygon());
|
2015-06-08 16:28:40 +02:00
|
|
|
pSdrObj = static_cast<SdrObject*>(new SdrPathObj(OBJ_POLY, basegfx::B2DPolyPolygon(aPolygon)));
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2015-06-08 16:28:40 +02:00
|
|
|
pCloneIMapObj.reset(static_cast<IMapObject*>(new IMapPolygonObject( *pIMapPolyObj )));
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( pSdrObj )
|
|
|
|
{
|
|
|
|
SfxItemSet aSet( pModel->GetItemPool() );
|
|
|
|
|
2014-07-18 18:07:36 +02:00
|
|
|
aSet.Put( XFillStyleItem( drawing::FillStyle_SOLID ) );
|
2013-09-04 15:29:16 +02:00
|
|
|
aSet.Put( XFillColorItem( "", TRANSCOL ) );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
if ( !pIMapObj->IsActive() )
|
|
|
|
{
|
|
|
|
aSet.Put( XFillTransparenceItem( 100 ) );
|
2013-09-04 15:29:16 +02:00
|
|
|
aSet.Put( XLineColorItem( "", Color( COL_RED ) ) );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
aSet.Put( XFillTransparenceItem( 50 ) );
|
2013-09-04 15:29:16 +02:00
|
|
|
aSet.Put( XLineColorItem( "", Color( COL_BLACK ) ) );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2003-11-24 15:34:44 +00:00
|
|
|
pSdrObj->SetMergedItemSetAndBroadcast(aSet);
|
2000-10-30 09:48:03 +00:00
|
|
|
|
2012-02-01 10:38:57 -05:00
|
|
|
pSdrObj->AppendUserData( new IMapUserData( pCloneIMapObj ) );
|
2000-09-18 16:07:07 +00:00
|
|
|
pSdrObj->SetUserCall( GetSdrUserCall() );
|
|
|
|
}
|
|
|
|
|
|
|
|
return pSdrObj;
|
|
|
|
}
|
|
|
|
|
|
|
|
void IMapWindow::InitSdrModel()
|
|
|
|
{
|
|
|
|
GraphCtrl::InitSdrModel();
|
|
|
|
|
|
|
|
SfxItemSet aSet( pModel->GetItemPool() );
|
|
|
|
|
2013-09-04 15:29:16 +02:00
|
|
|
aSet.Put( XFillColorItem( "", TRANSCOL ) );
|
2000-09-18 16:07:07 +00:00
|
|
|
aSet.Put( XFillTransparenceItem( 50 ) );
|
|
|
|
pView->SetAttributes( aSet );
|
2015-08-11 08:42:40 +02:00
|
|
|
pView->SetFrameDragSingles();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void IMapWindow::SdrObjCreated( const SdrObject& rObj )
|
|
|
|
{
|
|
|
|
switch( rObj.GetObjIdentifier() )
|
|
|
|
{
|
2016-02-18 08:26:33 +02:00
|
|
|
case OBJ_RECT:
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2014-10-20 11:52:06 +02:00
|
|
|
SdrRectObj* pRectObj = const_cast<SdrRectObj*>(static_cast<const SdrRectObj*>(&rObj));
|
2014-03-20 16:07:35 +02:00
|
|
|
IMapRectangleObject* pObj = new IMapRectangleObject( pRectObj->GetLogicRect(), "", "", "", "", "", true, false );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2012-02-01 10:38:57 -05:00
|
|
|
pRectObj->AppendUserData( new IMapUserData( IMapObjectPtr(pObj) ) );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2016-02-18 08:26:33 +02:00
|
|
|
case OBJ_CIRC:
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2014-10-20 11:52:06 +02:00
|
|
|
SdrCircObj* pCircObj = const_cast<SdrCircObj*>( static_cast<const SdrCircObj*>(&rObj) );
|
|
|
|
SdrPathObj* pPathObj = static_cast<SdrPathObj*>( pCircObj->ConvertToPolyObj( false, false ) );
|
2015-08-16 16:45:12 -05:00
|
|
|
tools::Polygon aPoly(pPathObj->GetPathPoly().getB2DPolygon(0L));
|
2000-09-18 16:07:07 +00:00
|
|
|
delete pPathObj;
|
|
|
|
|
2015-08-16 16:45:12 -05:00
|
|
|
IMapPolygonObject* pObj = new IMapPolygonObject( tools::Polygon(aPoly), "", "", "", "", "", true, false );
|
2000-09-18 16:07:07 +00:00
|
|
|
pObj->SetExtraEllipse( aPoly.GetBoundRect() );
|
2012-02-01 10:38:57 -05:00
|
|
|
pCircObj->AppendUserData( new IMapUserData( IMapObjectPtr(pObj) ) );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2016-02-18 08:26:33 +02:00
|
|
|
case OBJ_POLY:
|
|
|
|
case OBJ_FREEFILL:
|
|
|
|
case OBJ_PATHPOLY:
|
|
|
|
case OBJ_PATHFILL:
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2014-10-20 11:52:06 +02:00
|
|
|
SdrPathObj* pPathObj = const_cast<SdrPathObj*>( static_cast<const SdrPathObj*>(&rObj) );
|
2006-11-14 12:16:18 +00:00
|
|
|
const basegfx::B2DPolyPolygon& rXPolyPoly = pPathObj->GetPathPoly();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2006-11-14 12:16:18 +00:00
|
|
|
if ( rXPolyPoly.count() )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2015-08-16 16:45:12 -05:00
|
|
|
tools::Polygon aPoly(rXPolyPoly.getB2DPolygon(0L));
|
2014-03-20 16:07:35 +02:00
|
|
|
IMapPolygonObject* pObj = new IMapPolygonObject( aPoly, "", "", "", "", "", true, false );
|
2012-02-01 10:38:57 -05:00
|
|
|
pPathObj->AppendUserData( new IMapUserData( IMapObjectPtr(pObj) ) );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void IMapWindow::SdrObjChanged( const SdrObject& rObj )
|
|
|
|
{
|
2014-10-20 11:52:06 +02:00
|
|
|
IMapUserData* pUserData = static_cast<IMapUserData*>( rObj.GetUserData( 0 ) );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
if ( pUserData )
|
|
|
|
{
|
2013-09-04 15:29:16 +02:00
|
|
|
OUString aURL;
|
|
|
|
OUString aAltText;
|
|
|
|
OUString aDesc;
|
|
|
|
OUString aTarget;
|
CWS-TOOLING: integrate CWS aw063
2009-02-12 13:10:24 +0100 aw r267649 : #i99123# when a primitive is invisible, it is not sufficient to produce no output when decomposing, but to add invisible data using HitTestPrimitive2D. This is needed for the slideshow which relies on geometry data in MetaFiles when painting invisible objects
2009-02-12 13:08:39 +0100 aw r267648 : #i99123# do not ignore HitTestPrimitive2D, but draw empty rectangles instead. This is needed since Slideshow is based on getting MetaFile content when painting invisible objects
2009-02-11 16:04:28 +0100 aw r267620 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:04:10 +0100 aw r267619 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:03:56 +0100 aw r267618 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:03:39 +0100 aw r267617 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:03:21 +0100 aw r267615 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:02:48 +0100 aw r267614 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:02:24 +0100 aw r267613 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:02:01 +0100 aw r267612 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:01:32 +0100 aw r267611 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:01:05 +0100 aw r267610 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:00:15 +0100 aw r267608 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 11:27:33 +0100 aw r267585 : #i98788# added missing include for STL
2009-02-10 17:46:50 +0100 aw r267570 : #i98788# added reaction on pool destruction
2009-02-10 17:11:58 +0100 aw r267562 : #i98788# added messaging mechanism to register for pool destruction
2009-02-10 13:35:35 +0100 aw r267549 : #i98788# removing changes, too complicated and risky for 3.1
2009-02-10 12:13:48 +0100 aw r267546 : #i98788# 4th round
2009-02-10 12:13:37 +0100 aw r267545 : #i98788# 4th round
2009-02-10 12:13:26 +0100 aw r267544 : #i98788# 4th round
2009-02-10 12:13:14 +0100 aw r267543 : #i98788# 4th round
2009-02-10 12:13:03 +0100 aw r267542 : #i98788# 4th round
2009-02-10 12:12:50 +0100 aw r267541 : #i98788# 4th round
2009-02-10 12:12:37 +0100 aw r267540 : #i98788# 4th round
2009-02-08 14:38:22 +0100 aw r267495 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:38:06 +0100 aw r267494 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:37:48 +0100 aw r267493 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:37:17 +0100 aw r267492 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:56 +0100 aw r267491 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:44 +0100 aw r267490 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:29 +0100 aw r267489 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:16 +0100 aw r267488 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:02 +0100 aw r267487 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:35:46 +0100 aw r267486 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-05 12:20:39 +0100 aw r267415 : #i98788# 2nd batch of adaptions for SfxItemPoolHolder addition
2009-02-04 15:12:54 +0100 aw r267385 : #i98788# added newline at EOF
2009-02-04 13:26:04 +0100 aw r267379 : #i98788# make SfxItemPool holdable
2009-02-04 13:25:40 +0100 aw r267378 : #i98788# make SfxItemPool holdable
2009-02-04 13:25:08 +0100 aw r267377 : #i98788# make SfxItemPool holdable
2009-02-04 13:24:42 +0100 aw r267376 : #i98788# make SfxItemPool holdable
2009-02-04 13:23:14 +0100 aw r267375 : #i98788# make SfxItemPool holdable
2009-02-04 13:23:02 +0100 aw r267374 : #i98788# make SfxItemPool holdable
2009-01-29 17:08:31 +0100 aw r267159 : #i97628# completed the fix
2009-01-29 17:08:15 +0100 aw r267158 : #i97628# completed the fix
2009-01-29 14:09:07 +0100 aw r267132 : #i97628# Corrected usage of ParagraphData in headers
2009-01-29 14:06:58 +0100 iha r267131 : #i98344# incorrect font size in charts
2009-01-29 12:13:46 +0100 aw r267115 : #i97628# back to old state; triggers too many errors in other modules
2009-01-29 12:03:51 +0100 aw r267114 : #i97628# enabled exceptions due to STL vector include
2009-01-29 11:21:37 +0100 aw r267107 : #i97628# added needed include
2009-01-28 17:58:29 +0100 aw r267077 : #i97628# first version of newly implemented OutlinerParaObject and adaptions
2009-01-28 17:58:12 +0100 aw r267076 : #i97628# first version of newly implemented OutlinerParaObject and adaptions
2009-01-28 17:57:51 +0100 aw r267074 : #i97628# first version of newly implemented OutlinerParaObject and adaptions
2009-01-28 17:57:21 +0100 aw r267073 : #i97628# first version of newly implemented OutlinerParaObject and adaptions
2009-01-27 17:07:33 +0100 aw r267011 : #i98402# added support for ViewRange when exporting MetaFiles in ObjectContactOfPageView::DoProcessDisplay to avoid to paint too much
2009-01-27 11:45:48 +0100 aw r266973 : #i98404# Added a warning to a place where a conversion to rectangle should not be copied from
2009-01-26 21:44:36 +0100 iha r266949 : #i98497# 3D charts are rendered with wrong size
2009-01-26 20:47:07 +0100 aw r266947 : #i98404# handle BackgroundColorPrimitive2D directly in PixelRenderers and avoid AA under all circumstances
2009-01-26 14:50:36 +0100 aw r266926 : #i98386# secured cloning of SdrObject in IMapUserData by boost::shared_prt usage
2009-01-26 12:51:30 +0100 aw r266916 : #i96581# added separated FontStretching and fallback for small X!=Y scale differences
2009-01-23 16:14:55 +0100 aw r266834 : #i96475# added missing implementation of TextDecoratedPortionPrimitive2D::getB2DRange
2009-01-23 15:24:34 +0100 aw r266826 : #i98405# fixed fallback to DrawAlphaRect to use the correctly sized rectangle
2009-01-23 13:34:43 +0100 aw r266813 : #i96474# fixed impSplitSingleWords for an unexpected case
2009-01-23 10:47:31 +0100 aw r266786 : #i98289#,#i96474# tooling and new flags for tasks
2009-01-23 10:47:20 +0100 aw r266785 : #i98289#,#i96474# tooling and new flags for tasks
2009-01-23 10:47:09 +0100 aw r266783 : #i98289#,#i96474# tooling and new flags for tasks
2009-01-23 10:46:58 +0100 aw r266782 : #i98289#,#i96474# tooling and new flags for tasks
2009-01-23 10:46:48 +0100 aw r266781 : #i98289#,#i96474# tooling and new flags for tasks
2009-03-04 14:16:02 +00:00
|
|
|
IMapObjectPtr pIMapObj = pUserData->GetObject();
|
2014-04-14 16:15:22 +02:00
|
|
|
bool bActive = true;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
CWS-TOOLING: integrate CWS aw063
2009-02-12 13:10:24 +0100 aw r267649 : #i99123# when a primitive is invisible, it is not sufficient to produce no output when decomposing, but to add invisible data using HitTestPrimitive2D. This is needed for the slideshow which relies on geometry data in MetaFiles when painting invisible objects
2009-02-12 13:08:39 +0100 aw r267648 : #i99123# do not ignore HitTestPrimitive2D, but draw empty rectangles instead. This is needed since Slideshow is based on getting MetaFile content when painting invisible objects
2009-02-11 16:04:28 +0100 aw r267620 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:04:10 +0100 aw r267619 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:03:56 +0100 aw r267618 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:03:39 +0100 aw r267617 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:03:21 +0100 aw r267615 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:02:48 +0100 aw r267614 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:02:24 +0100 aw r267613 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:02:01 +0100 aw r267612 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:01:32 +0100 aw r267611 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:01:05 +0100 aw r267610 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:00:15 +0100 aw r267608 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 11:27:33 +0100 aw r267585 : #i98788# added missing include for STL
2009-02-10 17:46:50 +0100 aw r267570 : #i98788# added reaction on pool destruction
2009-02-10 17:11:58 +0100 aw r267562 : #i98788# added messaging mechanism to register for pool destruction
2009-02-10 13:35:35 +0100 aw r267549 : #i98788# removing changes, too complicated and risky for 3.1
2009-02-10 12:13:48 +0100 aw r267546 : #i98788# 4th round
2009-02-10 12:13:37 +0100 aw r267545 : #i98788# 4th round
2009-02-10 12:13:26 +0100 aw r267544 : #i98788# 4th round
2009-02-10 12:13:14 +0100 aw r267543 : #i98788# 4th round
2009-02-10 12:13:03 +0100 aw r267542 : #i98788# 4th round
2009-02-10 12:12:50 +0100 aw r267541 : #i98788# 4th round
2009-02-10 12:12:37 +0100 aw r267540 : #i98788# 4th round
2009-02-08 14:38:22 +0100 aw r267495 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:38:06 +0100 aw r267494 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:37:48 +0100 aw r267493 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:37:17 +0100 aw r267492 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:56 +0100 aw r267491 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:44 +0100 aw r267490 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:29 +0100 aw r267489 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:16 +0100 aw r267488 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:02 +0100 aw r267487 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:35:46 +0100 aw r267486 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-05 12:20:39 +0100 aw r267415 : #i98788# 2nd batch of adaptions for SfxItemPoolHolder addition
2009-02-04 15:12:54 +0100 aw r267385 : #i98788# added newline at EOF
2009-02-04 13:26:04 +0100 aw r267379 : #i98788# make SfxItemPool holdable
2009-02-04 13:25:40 +0100 aw r267378 : #i98788# make SfxItemPool holdable
2009-02-04 13:25:08 +0100 aw r267377 : #i98788# make SfxItemPool holdable
2009-02-04 13:24:42 +0100 aw r267376 : #i98788# make SfxItemPool holdable
2009-02-04 13:23:14 +0100 aw r267375 : #i98788# make SfxItemPool holdable
2009-02-04 13:23:02 +0100 aw r267374 : #i98788# make SfxItemPool holdable
2009-01-29 17:08:31 +0100 aw r267159 : #i97628# completed the fix
2009-01-29 17:08:15 +0100 aw r267158 : #i97628# completed the fix
2009-01-29 14:09:07 +0100 aw r267132 : #i97628# Corrected usage of ParagraphData in headers
2009-01-29 14:06:58 +0100 iha r267131 : #i98344# incorrect font size in charts
2009-01-29 12:13:46 +0100 aw r267115 : #i97628# back to old state; triggers too many errors in other modules
2009-01-29 12:03:51 +0100 aw r267114 : #i97628# enabled exceptions due to STL vector include
2009-01-29 11:21:37 +0100 aw r267107 : #i97628# added needed include
2009-01-28 17:58:29 +0100 aw r267077 : #i97628# first version of newly implemented OutlinerParaObject and adaptions
2009-01-28 17:58:12 +0100 aw r267076 : #i97628# first version of newly implemented OutlinerParaObject and adaptions
2009-01-28 17:57:51 +0100 aw r267074 : #i97628# first version of newly implemented OutlinerParaObject and adaptions
2009-01-28 17:57:21 +0100 aw r267073 : #i97628# first version of newly implemented OutlinerParaObject and adaptions
2009-01-27 17:07:33 +0100 aw r267011 : #i98402# added support for ViewRange when exporting MetaFiles in ObjectContactOfPageView::DoProcessDisplay to avoid to paint too much
2009-01-27 11:45:48 +0100 aw r266973 : #i98404# Added a warning to a place where a conversion to rectangle should not be copied from
2009-01-26 21:44:36 +0100 iha r266949 : #i98497# 3D charts are rendered with wrong size
2009-01-26 20:47:07 +0100 aw r266947 : #i98404# handle BackgroundColorPrimitive2D directly in PixelRenderers and avoid AA under all circumstances
2009-01-26 14:50:36 +0100 aw r266926 : #i98386# secured cloning of SdrObject in IMapUserData by boost::shared_prt usage
2009-01-26 12:51:30 +0100 aw r266916 : #i96581# added separated FontStretching and fallback for small X!=Y scale differences
2009-01-23 16:14:55 +0100 aw r266834 : #i96475# added missing implementation of TextDecoratedPortionPrimitive2D::getB2DRange
2009-01-23 15:24:34 +0100 aw r266826 : #i98405# fixed fallback to DrawAlphaRect to use the correctly sized rectangle
2009-01-23 13:34:43 +0100 aw r266813 : #i96474# fixed impSplitSingleWords for an unexpected case
2009-01-23 10:47:31 +0100 aw r266786 : #i98289#,#i96474# tooling and new flags for tasks
2009-01-23 10:47:20 +0100 aw r266785 : #i98289#,#i96474# tooling and new flags for tasks
2009-01-23 10:47:09 +0100 aw r266783 : #i98289#,#i96474# tooling and new flags for tasks
2009-01-23 10:46:58 +0100 aw r266782 : #i98289#,#i96474# tooling and new flags for tasks
2009-01-23 10:46:48 +0100 aw r266781 : #i98289#,#i96474# tooling and new flags for tasks
2009-03-04 14:16:02 +00:00
|
|
|
if ( pIMapObj.get() )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
aURL = pIMapObj->GetURL();
|
2007-06-26 12:51:32 +00:00
|
|
|
aAltText = pIMapObj->GetAltText();
|
|
|
|
aDesc = pIMapObj->GetDesc();
|
2000-09-18 16:07:07 +00:00
|
|
|
aTarget = pIMapObj->GetTarget();
|
|
|
|
bActive = pIMapObj->IsActive();
|
|
|
|
}
|
|
|
|
|
|
|
|
switch( rObj.GetObjIdentifier() )
|
|
|
|
{
|
2016-02-18 08:26:33 +02:00
|
|
|
case OBJ_RECT:
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2014-10-20 11:52:06 +02:00
|
|
|
pUserData->ReplaceObject( IMapObjectPtr(new IMapRectangleObject( static_cast<const SdrRectObj&>(rObj).GetLogicRect(),
|
2014-03-20 16:07:35 +02:00
|
|
|
aURL, aAltText, aDesc, aTarget, "", bActive, false ) ) );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2016-02-18 08:26:33 +02:00
|
|
|
case OBJ_CIRC:
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2014-10-20 11:52:06 +02:00
|
|
|
const SdrCircObj& rCircObj = static_cast<const SdrCircObj&>(rObj);
|
|
|
|
SdrPathObj* pPathObj = static_cast<SdrPathObj*>( rCircObj.ConvertToPolyObj( false, false ) );
|
2015-08-16 16:45:12 -05:00
|
|
|
tools::Polygon aPoly(pPathObj->GetPathPoly().getB2DPolygon(0L));
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2014-03-20 16:07:35 +02:00
|
|
|
IMapPolygonObject* pObj = new IMapPolygonObject( aPoly, aURL, aAltText, aDesc, aTarget, "", bActive, false );
|
2000-09-18 16:07:07 +00:00
|
|
|
pObj->SetExtraEllipse( aPoly.GetBoundRect() );
|
|
|
|
|
2011-02-21 23:29:31 +01:00
|
|
|
// was only created by us temporarily
|
2000-09-18 16:07:07 +00:00
|
|
|
delete pPathObj;
|
CWS-TOOLING: integrate CWS aw063
2009-02-12 13:10:24 +0100 aw r267649 : #i99123# when a primitive is invisible, it is not sufficient to produce no output when decomposing, but to add invisible data using HitTestPrimitive2D. This is needed for the slideshow which relies on geometry data in MetaFiles when painting invisible objects
2009-02-12 13:08:39 +0100 aw r267648 : #i99123# do not ignore HitTestPrimitive2D, but draw empty rectangles instead. This is needed since Slideshow is based on getting MetaFile content when painting invisible objects
2009-02-11 16:04:28 +0100 aw r267620 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:04:10 +0100 aw r267619 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:03:56 +0100 aw r267618 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:03:39 +0100 aw r267617 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:03:21 +0100 aw r267615 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:02:48 +0100 aw r267614 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:02:24 +0100 aw r267613 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:02:01 +0100 aw r267612 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:01:32 +0100 aw r267611 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:01:05 +0100 aw r267610 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:00:15 +0100 aw r267608 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 11:27:33 +0100 aw r267585 : #i98788# added missing include for STL
2009-02-10 17:46:50 +0100 aw r267570 : #i98788# added reaction on pool destruction
2009-02-10 17:11:58 +0100 aw r267562 : #i98788# added messaging mechanism to register for pool destruction
2009-02-10 13:35:35 +0100 aw r267549 : #i98788# removing changes, too complicated and risky for 3.1
2009-02-10 12:13:48 +0100 aw r267546 : #i98788# 4th round
2009-02-10 12:13:37 +0100 aw r267545 : #i98788# 4th round
2009-02-10 12:13:26 +0100 aw r267544 : #i98788# 4th round
2009-02-10 12:13:14 +0100 aw r267543 : #i98788# 4th round
2009-02-10 12:13:03 +0100 aw r267542 : #i98788# 4th round
2009-02-10 12:12:50 +0100 aw r267541 : #i98788# 4th round
2009-02-10 12:12:37 +0100 aw r267540 : #i98788# 4th round
2009-02-08 14:38:22 +0100 aw r267495 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:38:06 +0100 aw r267494 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:37:48 +0100 aw r267493 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:37:17 +0100 aw r267492 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:56 +0100 aw r267491 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:44 +0100 aw r267490 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:29 +0100 aw r267489 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:16 +0100 aw r267488 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:02 +0100 aw r267487 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:35:46 +0100 aw r267486 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-05 12:20:39 +0100 aw r267415 : #i98788# 2nd batch of adaptions for SfxItemPoolHolder addition
2009-02-04 15:12:54 +0100 aw r267385 : #i98788# added newline at EOF
2009-02-04 13:26:04 +0100 aw r267379 : #i98788# make SfxItemPool holdable
2009-02-04 13:25:40 +0100 aw r267378 : #i98788# make SfxItemPool holdable
2009-02-04 13:25:08 +0100 aw r267377 : #i98788# make SfxItemPool holdable
2009-02-04 13:24:42 +0100 aw r267376 : #i98788# make SfxItemPool holdable
2009-02-04 13:23:14 +0100 aw r267375 : #i98788# make SfxItemPool holdable
2009-02-04 13:23:02 +0100 aw r267374 : #i98788# make SfxItemPool holdable
2009-01-29 17:08:31 +0100 aw r267159 : #i97628# completed the fix
2009-01-29 17:08:15 +0100 aw r267158 : #i97628# completed the fix
2009-01-29 14:09:07 +0100 aw r267132 : #i97628# Corrected usage of ParagraphData in headers
2009-01-29 14:06:58 +0100 iha r267131 : #i98344# incorrect font size in charts
2009-01-29 12:13:46 +0100 aw r267115 : #i97628# back to old state; triggers too many errors in other modules
2009-01-29 12:03:51 +0100 aw r267114 : #i97628# enabled exceptions due to STL vector include
2009-01-29 11:21:37 +0100 aw r267107 : #i97628# added needed include
2009-01-28 17:58:29 +0100 aw r267077 : #i97628# first version of newly implemented OutlinerParaObject and adaptions
2009-01-28 17:58:12 +0100 aw r267076 : #i97628# first version of newly implemented OutlinerParaObject and adaptions
2009-01-28 17:57:51 +0100 aw r267074 : #i97628# first version of newly implemented OutlinerParaObject and adaptions
2009-01-28 17:57:21 +0100 aw r267073 : #i97628# first version of newly implemented OutlinerParaObject and adaptions
2009-01-27 17:07:33 +0100 aw r267011 : #i98402# added support for ViewRange when exporting MetaFiles in ObjectContactOfPageView::DoProcessDisplay to avoid to paint too much
2009-01-27 11:45:48 +0100 aw r266973 : #i98404# Added a warning to a place where a conversion to rectangle should not be copied from
2009-01-26 21:44:36 +0100 iha r266949 : #i98497# 3D charts are rendered with wrong size
2009-01-26 20:47:07 +0100 aw r266947 : #i98404# handle BackgroundColorPrimitive2D directly in PixelRenderers and avoid AA under all circumstances
2009-01-26 14:50:36 +0100 aw r266926 : #i98386# secured cloning of SdrObject in IMapUserData by boost::shared_prt usage
2009-01-26 12:51:30 +0100 aw r266916 : #i96581# added separated FontStretching and fallback for small X!=Y scale differences
2009-01-23 16:14:55 +0100 aw r266834 : #i96475# added missing implementation of TextDecoratedPortionPrimitive2D::getB2DRange
2009-01-23 15:24:34 +0100 aw r266826 : #i98405# fixed fallback to DrawAlphaRect to use the correctly sized rectangle
2009-01-23 13:34:43 +0100 aw r266813 : #i96474# fixed impSplitSingleWords for an unexpected case
2009-01-23 10:47:31 +0100 aw r266786 : #i98289#,#i96474# tooling and new flags for tasks
2009-01-23 10:47:20 +0100 aw r266785 : #i98289#,#i96474# tooling and new flags for tasks
2009-01-23 10:47:09 +0100 aw r266783 : #i98289#,#i96474# tooling and new flags for tasks
2009-01-23 10:46:58 +0100 aw r266782 : #i98289#,#i96474# tooling and new flags for tasks
2009-01-23 10:46:48 +0100 aw r266781 : #i98289#,#i96474# tooling and new flags for tasks
2009-03-04 14:16:02 +00:00
|
|
|
pUserData->ReplaceObject( IMapObjectPtr(pObj) );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2016-02-18 08:26:33 +02:00
|
|
|
case OBJ_POLY:
|
|
|
|
case OBJ_FREEFILL:
|
|
|
|
case OBJ_PATHPOLY:
|
|
|
|
case OBJ_PATHFILL:
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2014-10-20 11:52:06 +02:00
|
|
|
const SdrPathObj& rPathObj = static_cast<const SdrPathObj&>(rObj);
|
2006-11-14 12:16:18 +00:00
|
|
|
const basegfx::B2DPolyPolygon& rXPolyPoly = rPathObj.GetPathPoly();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2006-11-14 12:16:18 +00:00
|
|
|
if ( rXPolyPoly.count() )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2015-08-16 16:45:12 -05:00
|
|
|
tools::Polygon aPoly(rPathObj.GetPathPoly().getB2DPolygon(0L));
|
2014-03-20 16:07:35 +02:00
|
|
|
IMapPolygonObject* pObj = new IMapPolygonObject( aPoly, aURL, aAltText, aDesc, aTarget, "", bActive, false );
|
CWS-TOOLING: integrate CWS aw063
2009-02-12 13:10:24 +0100 aw r267649 : #i99123# when a primitive is invisible, it is not sufficient to produce no output when decomposing, but to add invisible data using HitTestPrimitive2D. This is needed for the slideshow which relies on geometry data in MetaFiles when painting invisible objects
2009-02-12 13:08:39 +0100 aw r267648 : #i99123# do not ignore HitTestPrimitive2D, but draw empty rectangles instead. This is needed since Slideshow is based on getting MetaFile content when painting invisible objects
2009-02-11 16:04:28 +0100 aw r267620 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:04:10 +0100 aw r267619 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:03:56 +0100 aw r267618 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:03:39 +0100 aw r267617 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:03:21 +0100 aw r267615 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:02:48 +0100 aw r267614 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:02:24 +0100 aw r267613 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:02:01 +0100 aw r267612 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:01:32 +0100 aw r267611 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:01:05 +0100 aw r267610 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:00:15 +0100 aw r267608 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 11:27:33 +0100 aw r267585 : #i98788# added missing include for STL
2009-02-10 17:46:50 +0100 aw r267570 : #i98788# added reaction on pool destruction
2009-02-10 17:11:58 +0100 aw r267562 : #i98788# added messaging mechanism to register for pool destruction
2009-02-10 13:35:35 +0100 aw r267549 : #i98788# removing changes, too complicated and risky for 3.1
2009-02-10 12:13:48 +0100 aw r267546 : #i98788# 4th round
2009-02-10 12:13:37 +0100 aw r267545 : #i98788# 4th round
2009-02-10 12:13:26 +0100 aw r267544 : #i98788# 4th round
2009-02-10 12:13:14 +0100 aw r267543 : #i98788# 4th round
2009-02-10 12:13:03 +0100 aw r267542 : #i98788# 4th round
2009-02-10 12:12:50 +0100 aw r267541 : #i98788# 4th round
2009-02-10 12:12:37 +0100 aw r267540 : #i98788# 4th round
2009-02-08 14:38:22 +0100 aw r267495 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:38:06 +0100 aw r267494 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:37:48 +0100 aw r267493 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:37:17 +0100 aw r267492 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:56 +0100 aw r267491 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:44 +0100 aw r267490 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:29 +0100 aw r267489 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:16 +0100 aw r267488 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:02 +0100 aw r267487 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:35:46 +0100 aw r267486 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-05 12:20:39 +0100 aw r267415 : #i98788# 2nd batch of adaptions for SfxItemPoolHolder addition
2009-02-04 15:12:54 +0100 aw r267385 : #i98788# added newline at EOF
2009-02-04 13:26:04 +0100 aw r267379 : #i98788# make SfxItemPool holdable
2009-02-04 13:25:40 +0100 aw r267378 : #i98788# make SfxItemPool holdable
2009-02-04 13:25:08 +0100 aw r267377 : #i98788# make SfxItemPool holdable
2009-02-04 13:24:42 +0100 aw r267376 : #i98788# make SfxItemPool holdable
2009-02-04 13:23:14 +0100 aw r267375 : #i98788# make SfxItemPool holdable
2009-02-04 13:23:02 +0100 aw r267374 : #i98788# make SfxItemPool holdable
2009-01-29 17:08:31 +0100 aw r267159 : #i97628# completed the fix
2009-01-29 17:08:15 +0100 aw r267158 : #i97628# completed the fix
2009-01-29 14:09:07 +0100 aw r267132 : #i97628# Corrected usage of ParagraphData in headers
2009-01-29 14:06:58 +0100 iha r267131 : #i98344# incorrect font size in charts
2009-01-29 12:13:46 +0100 aw r267115 : #i97628# back to old state; triggers too many errors in other modules
2009-01-29 12:03:51 +0100 aw r267114 : #i97628# enabled exceptions due to STL vector include
2009-01-29 11:21:37 +0100 aw r267107 : #i97628# added needed include
2009-01-28 17:58:29 +0100 aw r267077 : #i97628# first version of newly implemented OutlinerParaObject and adaptions
2009-01-28 17:58:12 +0100 aw r267076 : #i97628# first version of newly implemented OutlinerParaObject and adaptions
2009-01-28 17:57:51 +0100 aw r267074 : #i97628# first version of newly implemented OutlinerParaObject and adaptions
2009-01-28 17:57:21 +0100 aw r267073 : #i97628# first version of newly implemented OutlinerParaObject and adaptions
2009-01-27 17:07:33 +0100 aw r267011 : #i98402# added support for ViewRange when exporting MetaFiles in ObjectContactOfPageView::DoProcessDisplay to avoid to paint too much
2009-01-27 11:45:48 +0100 aw r266973 : #i98404# Added a warning to a place where a conversion to rectangle should not be copied from
2009-01-26 21:44:36 +0100 iha r266949 : #i98497# 3D charts are rendered with wrong size
2009-01-26 20:47:07 +0100 aw r266947 : #i98404# handle BackgroundColorPrimitive2D directly in PixelRenderers and avoid AA under all circumstances
2009-01-26 14:50:36 +0100 aw r266926 : #i98386# secured cloning of SdrObject in IMapUserData by boost::shared_prt usage
2009-01-26 12:51:30 +0100 aw r266916 : #i96581# added separated FontStretching and fallback for small X!=Y scale differences
2009-01-23 16:14:55 +0100 aw r266834 : #i96475# added missing implementation of TextDecoratedPortionPrimitive2D::getB2DRange
2009-01-23 15:24:34 +0100 aw r266826 : #i98405# fixed fallback to DrawAlphaRect to use the correctly sized rectangle
2009-01-23 13:34:43 +0100 aw r266813 : #i96474# fixed impSplitSingleWords for an unexpected case
2009-01-23 10:47:31 +0100 aw r266786 : #i98289#,#i96474# tooling and new flags for tasks
2009-01-23 10:47:20 +0100 aw r266785 : #i98289#,#i96474# tooling and new flags for tasks
2009-01-23 10:47:09 +0100 aw r266783 : #i98289#,#i96474# tooling and new flags for tasks
2009-01-23 10:46:58 +0100 aw r266782 : #i98289#,#i96474# tooling and new flags for tasks
2009-01-23 10:46:48 +0100 aw r266781 : #i98289#,#i96474# tooling and new flags for tasks
2009-03-04 14:16:02 +00:00
|
|
|
pUserData->ReplaceObject( IMapObjectPtr(pObj) );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void IMapWindow::MouseButtonUp(const MouseEvent& rMEvt)
|
|
|
|
{
|
|
|
|
GraphCtrl::MouseButtonUp( rMEvt );
|
2014-04-14 16:15:22 +02:00
|
|
|
UpdateInfo( true );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void IMapWindow::MarkListHasChanged()
|
|
|
|
{
|
|
|
|
GraphCtrl::MarkListHasChanged();
|
2014-04-14 16:15:22 +02:00
|
|
|
UpdateInfo( false );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
SdrObject* IMapWindow::GetHitSdrObj( const Point& rPosPixel ) const
|
|
|
|
{
|
2015-11-10 10:25:28 +01:00
|
|
|
SdrObject* pObj = nullptr;
|
2000-09-18 16:07:07 +00:00
|
|
|
Point aPt = PixelToLogic( rPosPixel );
|
|
|
|
|
|
|
|
if ( Rectangle( Point(), GetGraphicSize() ).IsInside( aPt ) )
|
|
|
|
{
|
2015-05-11 12:51:10 +02:00
|
|
|
SdrPage* pPage = pModel->GetPage( 0 );
|
2014-08-16 12:59:11 +02:00
|
|
|
if ( pPage )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2014-08-16 12:59:11 +02:00
|
|
|
for ( size_t i = pPage->GetObjCount(); i > 0; )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2014-08-16 12:59:11 +02:00
|
|
|
--i;
|
2000-09-18 16:07:07 +00:00
|
|
|
SdrObject* pTestObj = pPage->GetObj( i );
|
|
|
|
IMapObject* pIMapObj = GetIMapObj( pTestObj );
|
|
|
|
|
|
|
|
if ( pIMapObj && pIMapObj->IsHit( aPt ) )
|
|
|
|
{
|
|
|
|
pObj = pTestObj;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return pObj;
|
|
|
|
}
|
|
|
|
|
2015-04-14 14:00:46 +02:00
|
|
|
IMapObject* IMapWindow::GetIMapObj( const SdrObject* pSdrObj )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2015-11-10 10:25:28 +01:00
|
|
|
IMapObject* pIMapObj = nullptr;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
if ( pSdrObj )
|
|
|
|
{
|
2014-10-20 11:52:06 +02:00
|
|
|
IMapUserData* pUserData = static_cast<IMapUserData*>( pSdrObj->GetUserData( 0 ) );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
if ( pUserData )
|
CWS-TOOLING: integrate CWS aw063
2009-02-12 13:10:24 +0100 aw r267649 : #i99123# when a primitive is invisible, it is not sufficient to produce no output when decomposing, but to add invisible data using HitTestPrimitive2D. This is needed for the slideshow which relies on geometry data in MetaFiles when painting invisible objects
2009-02-12 13:08:39 +0100 aw r267648 : #i99123# do not ignore HitTestPrimitive2D, but draw empty rectangles instead. This is needed since Slideshow is based on getting MetaFile content when painting invisible objects
2009-02-11 16:04:28 +0100 aw r267620 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:04:10 +0100 aw r267619 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:03:56 +0100 aw r267618 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:03:39 +0100 aw r267617 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:03:21 +0100 aw r267615 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:02:48 +0100 aw r267614 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:02:24 +0100 aw r267613 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:02:01 +0100 aw r267612 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:01:32 +0100 aw r267611 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:01:05 +0100 aw r267610 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:00:15 +0100 aw r267608 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 11:27:33 +0100 aw r267585 : #i98788# added missing include for STL
2009-02-10 17:46:50 +0100 aw r267570 : #i98788# added reaction on pool destruction
2009-02-10 17:11:58 +0100 aw r267562 : #i98788# added messaging mechanism to register for pool destruction
2009-02-10 13:35:35 +0100 aw r267549 : #i98788# removing changes, too complicated and risky for 3.1
2009-02-10 12:13:48 +0100 aw r267546 : #i98788# 4th round
2009-02-10 12:13:37 +0100 aw r267545 : #i98788# 4th round
2009-02-10 12:13:26 +0100 aw r267544 : #i98788# 4th round
2009-02-10 12:13:14 +0100 aw r267543 : #i98788# 4th round
2009-02-10 12:13:03 +0100 aw r267542 : #i98788# 4th round
2009-02-10 12:12:50 +0100 aw r267541 : #i98788# 4th round
2009-02-10 12:12:37 +0100 aw r267540 : #i98788# 4th round
2009-02-08 14:38:22 +0100 aw r267495 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:38:06 +0100 aw r267494 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:37:48 +0100 aw r267493 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:37:17 +0100 aw r267492 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:56 +0100 aw r267491 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:44 +0100 aw r267490 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:29 +0100 aw r267489 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:16 +0100 aw r267488 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:02 +0100 aw r267487 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:35:46 +0100 aw r267486 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-05 12:20:39 +0100 aw r267415 : #i98788# 2nd batch of adaptions for SfxItemPoolHolder addition
2009-02-04 15:12:54 +0100 aw r267385 : #i98788# added newline at EOF
2009-02-04 13:26:04 +0100 aw r267379 : #i98788# make SfxItemPool holdable
2009-02-04 13:25:40 +0100 aw r267378 : #i98788# make SfxItemPool holdable
2009-02-04 13:25:08 +0100 aw r267377 : #i98788# make SfxItemPool holdable
2009-02-04 13:24:42 +0100 aw r267376 : #i98788# make SfxItemPool holdable
2009-02-04 13:23:14 +0100 aw r267375 : #i98788# make SfxItemPool holdable
2009-02-04 13:23:02 +0100 aw r267374 : #i98788# make SfxItemPool holdable
2009-01-29 17:08:31 +0100 aw r267159 : #i97628# completed the fix
2009-01-29 17:08:15 +0100 aw r267158 : #i97628# completed the fix
2009-01-29 14:09:07 +0100 aw r267132 : #i97628# Corrected usage of ParagraphData in headers
2009-01-29 14:06:58 +0100 iha r267131 : #i98344# incorrect font size in charts
2009-01-29 12:13:46 +0100 aw r267115 : #i97628# back to old state; triggers too many errors in other modules
2009-01-29 12:03:51 +0100 aw r267114 : #i97628# enabled exceptions due to STL vector include
2009-01-29 11:21:37 +0100 aw r267107 : #i97628# added needed include
2009-01-28 17:58:29 +0100 aw r267077 : #i97628# first version of newly implemented OutlinerParaObject and adaptions
2009-01-28 17:58:12 +0100 aw r267076 : #i97628# first version of newly implemented OutlinerParaObject and adaptions
2009-01-28 17:57:51 +0100 aw r267074 : #i97628# first version of newly implemented OutlinerParaObject and adaptions
2009-01-28 17:57:21 +0100 aw r267073 : #i97628# first version of newly implemented OutlinerParaObject and adaptions
2009-01-27 17:07:33 +0100 aw r267011 : #i98402# added support for ViewRange when exporting MetaFiles in ObjectContactOfPageView::DoProcessDisplay to avoid to paint too much
2009-01-27 11:45:48 +0100 aw r266973 : #i98404# Added a warning to a place where a conversion to rectangle should not be copied from
2009-01-26 21:44:36 +0100 iha r266949 : #i98497# 3D charts are rendered with wrong size
2009-01-26 20:47:07 +0100 aw r266947 : #i98404# handle BackgroundColorPrimitive2D directly in PixelRenderers and avoid AA under all circumstances
2009-01-26 14:50:36 +0100 aw r266926 : #i98386# secured cloning of SdrObject in IMapUserData by boost::shared_prt usage
2009-01-26 12:51:30 +0100 aw r266916 : #i96581# added separated FontStretching and fallback for small X!=Y scale differences
2009-01-23 16:14:55 +0100 aw r266834 : #i96475# added missing implementation of TextDecoratedPortionPrimitive2D::getB2DRange
2009-01-23 15:24:34 +0100 aw r266826 : #i98405# fixed fallback to DrawAlphaRect to use the correctly sized rectangle
2009-01-23 13:34:43 +0100 aw r266813 : #i96474# fixed impSplitSingleWords for an unexpected case
2009-01-23 10:47:31 +0100 aw r266786 : #i98289#,#i96474# tooling and new flags for tasks
2009-01-23 10:47:20 +0100 aw r266785 : #i98289#,#i96474# tooling and new flags for tasks
2009-01-23 10:47:09 +0100 aw r266783 : #i98289#,#i96474# tooling and new flags for tasks
2009-01-23 10:46:58 +0100 aw r266782 : #i98289#,#i96474# tooling and new flags for tasks
2009-01-23 10:46:48 +0100 aw r266781 : #i98289#,#i96474# tooling and new flags for tasks
2009-03-04 14:16:02 +00:00
|
|
|
pIMapObj = pUserData->GetObject().get();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return pIMapObj;
|
|
|
|
}
|
|
|
|
|
|
|
|
void IMapWindow::Command(const CommandEvent& rCEvt)
|
|
|
|
{
|
2014-09-27 14:52:40 +02:00
|
|
|
vcl::Region aRegion;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2015-05-07 15:25:20 +02:00
|
|
|
if ( rCEvt.GetCommand() == CommandEventId::ContextMenu )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2016-06-20 15:56:35 +02:00
|
|
|
ScopedVclPtrInstance<PopupMenu> aMenu( SVX_RES( RID_SVXMN_IMAP ) );
|
2004-07-12 13:33:36 +00:00
|
|
|
const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
|
2014-08-05 22:30:24 +02:00
|
|
|
const size_t nMarked = rMarkList.GetMarkCount();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2016-06-20 15:56:35 +02:00
|
|
|
aMenu->EnableItem( MN_URL, false );
|
|
|
|
aMenu->EnableItem( MN_ACTIVATE, false );
|
|
|
|
aMenu->EnableItem( MN_MACRO, false );
|
|
|
|
aMenu->EnableItem( MN_MARK_ALL, pModel->GetPage( 0 )->GetObjCount() != pView->GetMarkedObjectCount() );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
if ( !nMarked )
|
|
|
|
{
|
2016-06-20 15:56:35 +02:00
|
|
|
aMenu->EnableItem( MN_POSITION, false );
|
|
|
|
aMenu->EnableItem( MN_FRAME_TO_TOP, false );
|
|
|
|
aMenu->EnableItem( MN_MOREFRONT, false );
|
|
|
|
aMenu->EnableItem( MN_MOREBACK, false );
|
|
|
|
aMenu->EnableItem( MN_FRAME_TO_BOTTOM, false );
|
|
|
|
aMenu->EnableItem( MN_DELETE1, false );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if ( nMarked == 1 )
|
|
|
|
{
|
|
|
|
SdrObject* pSdrObj = GetSelectedSdrObject();
|
|
|
|
|
2016-06-20 15:56:35 +02:00
|
|
|
aMenu->EnableItem( MN_URL );
|
|
|
|
aMenu->EnableItem( MN_ACTIVATE );
|
|
|
|
aMenu->EnableItem( MN_MACRO );
|
|
|
|
aMenu->CheckItem( MN_ACTIVATE, GetIMapObj( pSdrObj )->IsActive() );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2016-06-20 15:56:35 +02:00
|
|
|
aMenu->EnableItem( MN_POSITION );
|
|
|
|
aMenu->EnableItem( MN_FRAME_TO_TOP );
|
|
|
|
aMenu->EnableItem( MN_MOREFRONT );
|
|
|
|
aMenu->EnableItem( MN_MOREBACK );
|
|
|
|
aMenu->EnableItem( MN_FRAME_TO_BOTTOM );
|
|
|
|
aMenu->EnableItem( MN_DELETE1 );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2016-06-20 15:56:35 +02:00
|
|
|
aMenu->SetSelectHdl( LINK( this, IMapWindow, MenuSelectHdl ) );
|
|
|
|
aMenu->Execute( this, rCEvt.GetMousePosPixel() );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
Window::Command(rCEvt);
|
|
|
|
}
|
|
|
|
|
2001-03-15 16:21:24 +00:00
|
|
|
sal_Int8 IMapWindow::AcceptDrop( const AcceptDropEvent& rEvt )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2015-11-10 10:25:28 +01:00
|
|
|
return( ( GetHitSdrObj( rEvt.maPosPixel ) != nullptr ) ? rEvt.mnAction : DND_ACTION_NONE );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2001-03-15 16:21:24 +00:00
|
|
|
sal_Int8 IMapWindow::ExecuteDrop( const ExecuteDropEvent& rEvt )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2001-03-15 16:21:24 +00:00
|
|
|
sal_Int8 nRet = DND_ACTION_NONE;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2015-03-12 14:53:28 +02:00
|
|
|
if( IsDropFormatSupported( SotClipboardFormatId::NETSCAPE_BOOKMARK ) )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2013-09-04 15:29:16 +02:00
|
|
|
const OUString aString;
|
2001-03-15 16:21:24 +00:00
|
|
|
INetBookmark aBookMark( aString, aString );
|
|
|
|
SdrObject* pSdrObj = GetHitSdrObj( rEvt.maPosPixel );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2015-03-12 14:53:28 +02:00
|
|
|
if( pSdrObj && TransferableDataHelper( rEvt.maDropEvent.Transferable ).GetINetBookmark( SotClipboardFormatId::NETSCAPE_BOOKMARK, aBookMark ) )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
IMapObject* pIMapObj = GetIMapObj( pSdrObj );
|
|
|
|
|
|
|
|
pIMapObj->SetURL( aBookMark.GetURL() );
|
2007-06-26 12:51:32 +00:00
|
|
|
pIMapObj->SetAltText( aBookMark.GetDescription() );
|
2015-08-11 08:42:40 +02:00
|
|
|
pModel->SetChanged();
|
2000-09-18 16:07:07 +00:00
|
|
|
pView->UnmarkAll();
|
2006-11-14 12:16:18 +00:00
|
|
|
pView->MarkObj( pSdrObj, pView->GetSdrPageView() );
|
2014-04-14 16:15:22 +02:00
|
|
|
UpdateInfo( true );
|
2001-03-15 16:21:24 +00:00
|
|
|
nRet = rEvt.mnAction;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2001-03-15 16:21:24 +00:00
|
|
|
return nRet;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void IMapWindow::RequestHelp( const HelpEvent& rHEvt )
|
|
|
|
{
|
|
|
|
Point aPos = PixelToLogic( ScreenToOutputPixel( rHEvt.GetMousePosPixel() ) );
|
|
|
|
|
|
|
|
if ( Help::IsBalloonHelpEnabled() || Help::IsQuickHelpEnabled() )
|
|
|
|
{
|
2016-11-12 17:07:22 +00:00
|
|
|
SdrPageView* pPageView = nullptr;
|
|
|
|
SdrObject* pSdrObj = pView->PickObj(aPos, pView->getHitTolLog(), pPageView);
|
|
|
|
if (pSdrObj)
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
const IMapObject* pIMapObj = GetIMapObj( pSdrObj );
|
2013-09-04 15:29:16 +02:00
|
|
|
OUString aStr;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2013-09-04 15:29:16 +02:00
|
|
|
if ( pIMapObj && !( aStr = pIMapObj->GetURL() ).isEmpty() )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
Rectangle aLogicPix( LogicToPixel( Rectangle( Point(), GetGraphicSize() ) ) );
|
|
|
|
Rectangle aScreenRect( OutputToScreenPixel( aLogicPix.TopLeft() ),
|
|
|
|
OutputToScreenPixel( aLogicPix.BottomRight() ) );
|
|
|
|
|
|
|
|
if ( Help::IsBalloonHelpEnabled() )
|
|
|
|
Help::ShowBalloon( this, rHEvt.GetMousePosPixel(), aScreenRect, aStr );
|
|
|
|
else if ( Help::IsQuickHelpEnabled() )
|
|
|
|
Help::ShowQuickHelp( this, aScreenRect, aStr );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
Window::RequestHelp( rHEvt );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-04-14 16:15:22 +02:00
|
|
|
void IMapWindow::SetCurrentObjState( bool bActive )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
SdrObject* pObj = GetSelectedSdrObject();
|
|
|
|
|
|
|
|
if ( pObj )
|
|
|
|
{
|
|
|
|
SfxItemSet aSet( pModel->GetItemPool() );
|
|
|
|
|
|
|
|
GetIMapObj( pObj )->SetActive( bActive );
|
|
|
|
|
2013-09-04 15:29:16 +02:00
|
|
|
aSet.Put( XFillColorItem( "", TRANSCOL ) );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
if ( !bActive )
|
|
|
|
{
|
|
|
|
aSet.Put( XFillTransparenceItem( 100 ) );
|
2013-09-04 15:29:16 +02:00
|
|
|
aSet.Put( XLineColorItem( "", Color( COL_RED ) ) );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
aSet.Put( XFillTransparenceItem( 50 ) );
|
2013-09-04 15:29:16 +02:00
|
|
|
aSet.Put( XLineColorItem( "", Color( COL_BLACK ) ) );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2015-08-11 08:42:40 +02:00
|
|
|
pView->SetAttributes( aSet );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-04-14 16:15:22 +02:00
|
|
|
void IMapWindow::UpdateInfo( bool bNewObj )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
if ( aInfoLink.IsSet() )
|
|
|
|
{
|
|
|
|
const SdrObject* pSdrObj = GetSelectedSdrObject();
|
2015-11-10 10:25:28 +01:00
|
|
|
const IMapObject* pIMapObj = pSdrObj ? GetIMapObj( pSdrObj ) : nullptr;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
aInfo.bNewObj = bNewObj;
|
|
|
|
|
|
|
|
if ( pIMapObj )
|
|
|
|
{
|
2014-04-14 16:15:22 +02:00
|
|
|
aInfo.bOneMarked = true;
|
2000-09-18 16:07:07 +00:00
|
|
|
aInfo.aMarkURL = pIMapObj->GetURL();
|
2007-06-26 12:51:32 +00:00
|
|
|
aInfo.aMarkAltText = pIMapObj->GetAltText();
|
2000-09-18 16:07:07 +00:00
|
|
|
aInfo.aMarkTarget = pIMapObj->GetTarget();
|
|
|
|
aInfo.bActivated = pIMapObj->IsActive();
|
2015-09-16 13:51:42 +02:00
|
|
|
aInfoLink.Call( *this );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2014-12-18 13:34:45 +01:00
|
|
|
aInfo.aMarkURL.clear();
|
|
|
|
aInfo.aMarkAltText.clear();
|
|
|
|
aInfo.aMarkTarget.clear();
|
2014-04-14 16:15:22 +02:00
|
|
|
aInfo.bOneMarked = false;
|
|
|
|
aInfo.bActivated = false;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2015-09-16 13:51:42 +02:00
|
|
|
aInfoLink.Call( *this );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void IMapWindow::DoMacroAssign()
|
|
|
|
{
|
|
|
|
SdrObject* pSdrObj = GetSelectedSdrObject();
|
|
|
|
|
|
|
|
if ( pSdrObj )
|
|
|
|
{
|
2009-09-11 12:01:22 +00:00
|
|
|
SfxItemSet aSet( *pIMapPool, SID_ATTR_MACROITEM, SID_ATTR_MACROITEM, SID_EVENTCONFIG, SID_EVENTCONFIG, 0 );
|
2009-05-06 10:59:57 +00:00
|
|
|
|
|
|
|
SfxEventNamesItem aNamesItem(SID_EVENTCONFIG);
|
2013-09-04 15:29:16 +02:00
|
|
|
aNamesItem.AddEvent( "MouseOver", "", SFX_EVENT_MOUSEOVER_OBJECT );
|
|
|
|
aNamesItem.AddEvent( "MouseOut", "", SFX_EVENT_MOUSEOUT_OBJECT );
|
2009-09-11 12:01:22 +00:00
|
|
|
aSet.Put( aNamesItem );
|
2009-05-06 10:59:57 +00:00
|
|
|
|
2007-05-10 13:37:54 +00:00
|
|
|
SvxMacroItem aMacroItem(SID_ATTR_MACROITEM);
|
2000-09-18 16:07:07 +00:00
|
|
|
IMapObject* pIMapObj = GetIMapObj( pSdrObj );
|
|
|
|
aMacroItem.SetMacroTable( pIMapObj->GetMacroTable() );
|
2016-04-23 20:23:29 +02:00
|
|
|
aSet.Put( aMacroItem );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2009-05-06 10:59:57 +00:00
|
|
|
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
|
2016-10-27 20:55:49 +01:00
|
|
|
ScopedVclPtr<SfxAbstractDialog> pMacroDlg(pFact->CreateSfxDialog( this, aSet, mxDocumentFrame, SID_EVENTCONFIG ));
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2009-05-06 10:59:57 +00:00
|
|
|
if ( pMacroDlg && pMacroDlg->Execute() == RET_OK )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2009-05-06 10:59:57 +00:00
|
|
|
const SfxItemSet* pOutSet = pMacroDlg->GetOutputItemSet();
|
2014-10-20 11:52:06 +02:00
|
|
|
pIMapObj->SetMacroTable( static_cast<const SvxMacroItem& >(pOutSet->Get( SID_ATTR_MACROITEM )).GetMacroTable() );
|
2015-08-11 08:42:40 +02:00
|
|
|
pModel->SetChanged();
|
2014-04-14 16:15:22 +02:00
|
|
|
UpdateInfo( false );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void IMapWindow::DoPropertyDialog()
|
|
|
|
{
|
|
|
|
SdrObject* pSdrObj = GetSelectedSdrObject();
|
|
|
|
|
|
|
|
if ( pSdrObj )
|
|
|
|
{
|
|
|
|
IMapObject* pIMapObj = GetIMapObj( pSdrObj );
|
2004-02-03 17:33:10 +00:00
|
|
|
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
|
|
|
|
if(pFact)
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2016-10-27 20:55:49 +01:00
|
|
|
ScopedVclPtr<AbstractURLDlg> aDlg(pFact->CreateURLDialog( this, pIMapObj->GetURL(), pIMapObj->GetAltText(), pIMapObj->GetDesc(),
|
2014-06-21 22:54:28 +09:00
|
|
|
pIMapObj->GetTarget(), pIMapObj->GetName(), aTargetList ));
|
2014-07-26 14:23:59 +02:00
|
|
|
DBG_ASSERT(aDlg, "Dialog creation failed!");
|
2007-06-26 12:51:32 +00:00
|
|
|
if ( aDlg->Execute() == RET_OK )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2013-09-04 15:29:16 +02:00
|
|
|
const OUString aURLText( aDlg->GetURL() );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2013-09-04 15:29:16 +02:00
|
|
|
if ( !aURLText.isEmpty() )
|
2004-02-03 17:33:10 +00:00
|
|
|
{
|
2015-04-02 18:32:36 +02:00
|
|
|
INetURLObject aObj( aURLText, INetProtocol::File );
|
|
|
|
DBG_ASSERT( aObj.GetProtocol() != INetProtocol::NotValid, "Invalid URL" );
|
2016-12-05 08:47:18 +02:00
|
|
|
pIMapObj->SetURL( aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
|
2004-02-03 17:33:10 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
pIMapObj->SetURL( aURLText );
|
|
|
|
|
2007-06-26 12:51:32 +00:00
|
|
|
pIMapObj->SetAltText( aDlg->GetAltText() );
|
|
|
|
pIMapObj->SetDesc( aDlg->GetDesc() );
|
|
|
|
pIMapObj->SetTarget( aDlg->GetTarget() );
|
|
|
|
pIMapObj->SetName( aDlg->GetName() );
|
2015-08-11 08:42:40 +02:00
|
|
|
pModel->SetChanged();
|
2014-04-14 16:15:22 +02:00
|
|
|
UpdateInfo( true );
|
2004-02-03 17:33:10 +00:00
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-10-05 07:56:12 +02:00
|
|
|
IMPL_LINK( IMapWindow, MenuSelectHdl, Menu*, pMenu, bool )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2015-09-06 12:05:08 +02:00
|
|
|
if (!pMenu)
|
|
|
|
return false;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2015-09-06 12:05:08 +02:00
|
|
|
sal_uInt16 nId = pMenu->GetCurItemId();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2015-09-06 12:05:08 +02:00
|
|
|
switch(nId)
|
|
|
|
{
|
2016-02-18 08:26:33 +02:00
|
|
|
case MN_URL:
|
2015-09-06 12:05:08 +02:00
|
|
|
DoPropertyDialog();
|
|
|
|
break;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2016-02-18 08:26:33 +02:00
|
|
|
case MN_MACRO:
|
2015-09-06 12:05:08 +02:00
|
|
|
DoMacroAssign();
|
|
|
|
break;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2016-02-18 08:26:33 +02:00
|
|
|
case MN_ACTIVATE:
|
2015-09-06 12:05:08 +02:00
|
|
|
{
|
|
|
|
const bool bNewState = !pMenu->IsItemChecked( MN_ACTIVATE );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2015-09-06 12:05:08 +02:00
|
|
|
pMenu->CheckItem( MN_ACTIVATE, bNewState );
|
|
|
|
SetCurrentObjState( bNewState );
|
|
|
|
UpdateInfo( false );
|
|
|
|
}
|
|
|
|
break;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2016-02-18 08:26:33 +02:00
|
|
|
case MN_FRAME_TO_TOP:
|
2015-09-06 12:05:08 +02:00
|
|
|
pView->PutMarkedToTop();
|
|
|
|
break;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2016-02-18 08:26:33 +02:00
|
|
|
case MN_MOREFRONT:
|
2015-09-06 12:05:08 +02:00
|
|
|
pView->MovMarkedToTop();
|
|
|
|
break;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2016-02-18 08:26:33 +02:00
|
|
|
case MN_MOREBACK:
|
2015-09-06 12:05:08 +02:00
|
|
|
pView->MovMarkedToBtm();
|
|
|
|
break;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2016-02-18 08:26:33 +02:00
|
|
|
case MN_FRAME_TO_BOTTOM:
|
2015-09-06 12:05:08 +02:00
|
|
|
pView->PutMarkedToBtm();
|
|
|
|
break;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2016-02-18 08:26:33 +02:00
|
|
|
case MN_MARK_ALL:
|
2015-09-06 12:05:08 +02:00
|
|
|
pView->MarkAll();
|
|
|
|
break;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2016-02-18 08:26:33 +02:00
|
|
|
case MN_DELETE1:
|
2015-09-06 12:05:08 +02:00
|
|
|
pView->DeleteMarked();
|
2016-05-10 14:49:37 +02:00
|
|
|
break;
|
2015-09-06 12:05:08 +02:00
|
|
|
|
|
|
|
default :
|
|
|
|
break;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2015-09-06 12:05:08 +02:00
|
|
|
return false;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2002-04-09 06:31:52 +00:00
|
|
|
void IMapWindow::CreateDefaultObject()
|
|
|
|
{
|
2006-11-14 12:16:18 +00:00
|
|
|
SdrPageView* pPageView = pView->GetSdrPageView();
|
2002-04-09 06:31:52 +00:00
|
|
|
|
|
|
|
if(pPageView)
|
|
|
|
{
|
|
|
|
// calc position and size
|
2006-11-14 12:16:18 +00:00
|
|
|
Point aPagePos(0, 0); // = pPageView->GetOffset();
|
2002-04-09 06:31:52 +00:00
|
|
|
Size aPageSize = pPageView->GetPage()->GetSize();
|
|
|
|
sal_uInt32 nDefaultObjectSizeWidth = aPageSize.Width() / 4;
|
|
|
|
sal_uInt32 nDefaultObjectSizeHeight = aPageSize.Height() / 4;
|
|
|
|
aPagePos.X() += (aPageSize.Width() / 2) - (nDefaultObjectSizeWidth / 2);
|
|
|
|
aPagePos.Y() += (aPageSize.Height() / 2) - (nDefaultObjectSizeHeight / 2);
|
|
|
|
Rectangle aNewObjectRectangle(aPagePos, Size(nDefaultObjectSizeWidth, nDefaultObjectSizeHeight));
|
|
|
|
|
2015-11-10 10:25:28 +01:00
|
|
|
SdrObject* pObj = SdrObjFactory::MakeNewObject( pView->GetCurrentObjInventor(), pView->GetCurrentObjIdentifier(), nullptr, pModel);
|
2002-04-09 06:31:52 +00:00
|
|
|
pObj->SetLogicRect(aNewObjectRectangle);
|
|
|
|
|
|
|
|
switch( pObj->GetObjIdentifier() )
|
|
|
|
{
|
|
|
|
case OBJ_POLY:
|
|
|
|
case OBJ_PATHPOLY:
|
|
|
|
{
|
2006-11-14 12:16:18 +00:00
|
|
|
basegfx::B2DPolygon aInnerPoly;
|
|
|
|
aInnerPoly.append(basegfx::B2DPoint(aNewObjectRectangle.BottomLeft().X(), aNewObjectRectangle.BottomLeft().Y()));
|
|
|
|
aInnerPoly.append(basegfx::B2DPoint(aNewObjectRectangle.TopLeft().X(), aNewObjectRectangle.TopLeft().Y()));
|
|
|
|
aInnerPoly.append(basegfx::B2DPoint(aNewObjectRectangle.TopCenter().X(), aNewObjectRectangle.TopCenter().Y()));
|
|
|
|
aInnerPoly.append(basegfx::B2DPoint(aNewObjectRectangle.Center().X(), aNewObjectRectangle.Center().Y()));
|
|
|
|
aInnerPoly.append(basegfx::B2DPoint(aNewObjectRectangle.RightCenter().X(), aNewObjectRectangle.RightCenter().Y()));
|
|
|
|
aInnerPoly.append(basegfx::B2DPoint(aNewObjectRectangle.BottomRight().X(), aNewObjectRectangle.BottomRight().Y()));
|
|
|
|
aInnerPoly.setClosed(true);
|
2014-10-20 11:52:06 +02:00
|
|
|
static_cast<SdrPathObj*>(pObj)->SetPathPoly(basegfx::B2DPolyPolygon(aInnerPoly));
|
2002-04-09 06:31:52 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
case OBJ_FREEFILL:
|
|
|
|
case OBJ_PATHFILL:
|
|
|
|
{
|
|
|
|
sal_Int32 nWdt(aNewObjectRectangle.GetWidth() / 2);
|
|
|
|
sal_Int32 nHgt(aNewObjectRectangle.GetHeight() / 2);
|
2006-11-14 12:16:18 +00:00
|
|
|
basegfx::B2DPolygon aInnerPoly(XPolygon(aNewObjectRectangle.Center(), nWdt, nHgt).getB2DPolygon());
|
2014-10-20 11:52:06 +02:00
|
|
|
static_cast<SdrPathObj*>(pObj)->SetPathPoly(basegfx::B2DPolyPolygon(aInnerPoly));
|
2002-04-09 06:31:52 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2006-11-14 12:16:18 +00:00
|
|
|
pView->InsertObjectAtView(pObj, *pPageView);
|
2002-04-09 06:31:52 +00:00
|
|
|
SdrObjCreated( *pObj );
|
|
|
|
SetCurrentObjState( true );
|
2002-04-12 10:54:45 +00:00
|
|
|
pView->MarkObj( pObj, pPageView );
|
2002-04-09 06:31:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void IMapWindow::SelectFirstObject()
|
|
|
|
{
|
2015-05-11 12:51:10 +02:00
|
|
|
SdrPage* pPage = pModel->GetPage( 0 );
|
2002-04-09 06:31:52 +00:00
|
|
|
if( pPage->GetObjCount() != 0 )
|
|
|
|
{
|
|
|
|
GrabFocus();
|
|
|
|
pView->UnmarkAllObj();
|
2014-03-10 11:09:59 +02:00
|
|
|
pView->MarkNextObj(true);
|
2002-04-09 06:31:52 +00:00
|
|
|
}
|
|
|
|
}
|
2002-04-12 10:54:45 +00:00
|
|
|
|
|
|
|
void IMapWindow::StartPolyEdit()
|
|
|
|
{
|
|
|
|
GrabFocus();
|
|
|
|
|
2004-07-12 13:33:36 +00:00
|
|
|
if( !pView->AreObjectsMarked() )
|
2014-03-10 11:09:59 +02:00
|
|
|
pView->MarkNextObj(true);
|
2002-04-12 10:54:45 +00:00
|
|
|
|
|
|
|
const SdrHdlList& rHdlList = pView->GetHdlList();
|
|
|
|
SdrHdl* pHdl = rHdlList.GetFocusHdl();
|
|
|
|
|
|
|
|
if(!pHdl)
|
|
|
|
{
|
|
|
|
((SdrHdlList&)rHdlList).TravelFocusHdl(true);
|
|
|
|
}
|
2003-10-06 14:30:58 +00:00
|
|
|
}
|
2010-10-12 15:53:47 +02:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|