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>
|
2017-06-11 20:56:30 +01:00
|
|
|
#include <svx/strings.hrc>
|
2007-06-27 16:16:02 +00:00
|
|
|
#include <svx/svxids.hrc>
|
2017-10-23 22:30:42 +02:00
|
|
|
#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
|
|
|
{
|
2017-10-03 16:01:41 +02:00
|
|
|
SetSdrMode(true);
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
pItemInfo = new SfxItemInfo[ 1 ];
|
|
|
|
memset( pItemInfo, 0, sizeof( SfxItemInfo ) );
|
2017-01-30 16:38:54 +02:00
|
|
|
pIMapPool = new SfxItemPool( "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
|
2017-08-16 14:45:49 +02:00
|
|
|
pPage = GetSdrModel()->GetPage(0);
|
2006-07-25 11:49:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
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;
|
2017-03-30 20:27:55 +02:00
|
|
|
tools::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);
|
2017-03-30 20:27:55 +02:00
|
|
|
tools::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 );
|
2017-03-30 20:27:55 +02:00
|
|
|
tools::Rectangle aCircle( aCenter - aOffset, aCenter + aOffset );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
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() )
|
|
|
|
{
|
2017-03-30 20:27:55 +02:00
|
|
|
tools::Rectangle aDrawRect( pIMapPolyObj->GetExtraEllipse() );
|
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 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 ) );
|
2017-08-16 14:45:49 +02:00
|
|
|
tools::Polygon aPoly(pPathObj->GetPathPoly().getB2DPolygon(0));
|
2000-09-18 16:07:07 +00:00
|
|
|
delete pPathObj;
|
|
|
|
|
2017-05-22 15:55:38 +02:00
|
|
|
IMapPolygonObject* pObj = new IMapPolygonObject( 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
|
|
|
{
|
2017-08-16 14:45:49 +02:00
|
|
|
tools::Polygon aPoly(rXPolyPoly.getB2DPolygon(0));
|
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 ) );
|
2017-08-16 14:45:49 +02:00
|
|
|
tools::Polygon aPoly(pPathObj->GetPathPoly().getB2DPolygon(0));
|
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
|
|
|
{
|
2017-08-16 14:45:49 +02:00
|
|
|
tools::Polygon aPoly(rPathObj.GetPathPoly().getB2DPolygon(0));
|
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 );
|
|
|
|
|
2017-03-30 20:27:55 +02:00
|
|
|
if ( tools::Rectangle( Point(), GetGraphicSize() ).IsInside( aPt ) )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
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
|
|
|
{
|
2017-04-14 12:59:11 +01:00
|
|
|
VclBuilder aBuilder(nullptr, VclBuilderContainer::getUIRootDir(), "svx/ui/imapmenu.ui", "");
|
|
|
|
VclPtr<PopupMenu> aMenu(aBuilder.get_menu("menu"));
|
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
|
|
|
|
2017-04-14 12:59:11 +01:00
|
|
|
aMenu->EnableItem(aMenu->GetItemId("url"), false);
|
|
|
|
aMenu->EnableItem(aMenu->GetItemId("active"), false);
|
|
|
|
aMenu->EnableItem(aMenu->GetItemId("macro"), false);
|
|
|
|
aMenu->EnableItem(aMenu->GetItemId("selectall"), pModel->GetPage(0)->GetObjCount() != pView->GetMarkedObjectCount());
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
if ( !nMarked )
|
|
|
|
{
|
2017-04-14 12:59:11 +01:00
|
|
|
aMenu->EnableItem(aMenu->GetItemId("arrange"), false);
|
|
|
|
aMenu->EnableItem(aMenu->GetItemId("delete"), false);
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if ( nMarked == 1 )
|
|
|
|
{
|
|
|
|
SdrObject* pSdrObj = GetSelectedSdrObject();
|
|
|
|
|
2017-04-14 12:59:11 +01:00
|
|
|
aMenu->EnableItem(aMenu->GetItemId("url"));
|
|
|
|
aMenu->EnableItem(aMenu->GetItemId("active"));
|
|
|
|
aMenu->EnableItem(aMenu->GetItemId("macro"));
|
|
|
|
aMenu->CheckItem(aMenu->GetItemId("active"), GetIMapObj(pSdrObj)->IsActive());
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2017-04-14 12:59:11 +01:00
|
|
|
aMenu->EnableItem(aMenu->GetItemId("arrange"));
|
|
|
|
aMenu->EnableItem(aMenu->GetItemId("delete"));
|
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
|
|
|
{
|
2017-03-30 20:27:55 +02:00
|
|
|
tools::Rectangle aLogicPix( LogicToPixel( tools::Rectangle( Point(), GetGraphicSize() ) ) );
|
|
|
|
tools::Rectangle aScreenRect( OutputToScreenPixel( aLogicPix.TopLeft() ),
|
2000-09-18 16:07:07 +00:00
|
|
|
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 )
|
|
|
|
{
|
Make SfxItemSet ranges correct by construction
This is a follow-up to 45a7f5b62d0b1b21763c1c94255ef2309ea4280b "Keep WID ranges
sorted, and join adjacent ones". While SfxItemSet::MergeRange relies on the
m_pWhichRanges being sorted (and, under DBG_UTIL, asserts if they are not), the
various SfxItemSet constructors curiously only check (via assert or DBG_ASSERT)
that each individual range has an upper bound not smaller than its lower bound.
Arguably, all SfxItemSet instances should fulfill the stronger guarantees
required and checked by MergeRange.
And in many cases the ranges are statically known, so that the checking can
happen at compile time. Therefore, replace the two SfxItemSet ctors taking
explicit ranges with two other ctors that actually do proper checking. The
(templated) overload taking an svl::Items struct should be used in all cases
where the range values are statically known at compile time, while the overload
taking a std::initializer_list<Pair> is for the remaining cases (that can only
do runtime checking via assert). Most of those latter cases are simple cases
with a single range covering a single item, but a few are more complex.
(At least some of the uses of the existing SfxItemSet overload taking a
const sal_uInt16* pWhichPairTable
can probably also be strengthened, but that is left for another day.)
This commit is the first in a series of two. Apart from the manual changes to
compilerplugins/clang/store/sfxitemsetrewrite.cxx, include/svl/itemset.hxx, and
svl/source/items/itemset.cxx, it only consists of automatic rewriting of the
relevant SfxItemSet ctor calls (plus a few required manual fixes, see next).
But it does not yet check that the individual ranges are properly sorted (see
the TODO in svl::detail::validGap). That check will be enabled, and the ensuing
manual fixes will be made in a follow-up commit, to reduce the likelyhood of
accidents.
There were three cases of necessary manual intervention:
* sw/source/core/unocore/unostyle.cxx uses eAtr of enum type RES_FRMATR in
braced-init-list syntax now, so needs explicit narrowing conversion to
sal_uInt16.
* In sw/source/uibase/uiview/formatclipboard.cxx, the trailiing comma in the
definition of macro FORMAT_PAINTBRUSH_FRAME_IDS needed to be removed manually.
* In svx/source/svdraw/svdoashp.cxx, svx/source/svdraw/svdotext.cxx,
sw/source/uibase/app/docstyle.cxx, sw/source/uibase/shells/frmsh.cxx,
sw/source/uibase/shells/grfsh.cxx, and sw/source/uibase/shells/textsh1.cxx,
some comments had to be put back (see "TODO: the replaced range can contain
relevant comments" in compilerplugins/clang/store/sfxitemsetrewrite.cxx).
A few uses of the variadic form erroneously used nullptr instead of 0 for
termination. But this should have been harmless even if promoted std::nullptr_t
is larger than promoted sal_uInt16, assuming that the part of the nullptr value
that was interpreted as sal_uInt16/promoted int was all-zero bits. Similarly,
some uses made the harmless error of using 0L instead of 0.
Change-Id: I2afea97282803cb311b9321a99bb627520ef5e35
Reviewed-on: https://gerrit.libreoffice.org/38861
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2017-06-16 09:58:13 +02:00
|
|
|
SfxItemSet aSet( *pIMapPool, svl::Items<SID_ATTR_MACROITEM, SID_ATTR_MACROITEM, SID_EVENTCONFIG, SID_EVENTCONFIG>{} );
|
2009-05-06 10:59:57 +00:00
|
|
|
|
|
|
|
SfxEventNamesItem aNamesItem(SID_EVENTCONFIG);
|
2017-07-25 10:03:44 +02:00
|
|
|
aNamesItem.AddEvent( "MouseOver", "", SvMacroItemId::OnMouseOver );
|
|
|
|
aNamesItem.AddEvent( "MouseOut", "", SvMacroItemId::OnMouseOut );
|
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
|
|
|
|
2017-04-14 12:59:11 +01:00
|
|
|
OString sId = pMenu->GetCurItemIdent();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2017-04-14 12:59:11 +01:00
|
|
|
if (sId == "url")
|
|
|
|
DoPropertyDialog();
|
|
|
|
else if (sId == "macro")
|
|
|
|
DoMacroAssign();
|
|
|
|
else if (sId == "active")
|
2015-09-06 12:05:08 +02:00
|
|
|
{
|
2017-04-14 12:59:11 +01:00
|
|
|
const sal_uInt16 nActiveId = pMenu->GetItemId(sId);
|
|
|
|
const bool bNewState = !pMenu->IsItemChecked(nActiveId);
|
|
|
|
pMenu->CheckItem(nActiveId, bNewState);
|
|
|
|
SetCurrentObjState(bNewState);
|
|
|
|
UpdateInfo( false );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
2017-04-14 12:59:11 +01:00
|
|
|
else if (sId == "front")
|
|
|
|
pView->PutMarkedToTop();
|
|
|
|
else if (sId == "forward")
|
|
|
|
pView->MovMarkedToTop();
|
|
|
|
else if (sId == "backward")
|
|
|
|
pView->MovMarkedToBtm();
|
|
|
|
else if (sId == "back")
|
|
|
|
pView->PutMarkedToBtm();
|
|
|
|
else if (sId == "selectall")
|
|
|
|
pView->MarkAll();
|
|
|
|
else if (sId == "delete")
|
|
|
|
pView->DeleteMarked();
|
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);
|
2017-03-30 20:27:55 +02:00
|
|
|
tools::Rectangle aNewObjectRectangle(aPagePos, Size(nDefaultObjectSizeWidth, nDefaultObjectSizeHeight));
|
2002-04-09 06:31:52 +00:00
|
|
|
|
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)
|
|
|
|
{
|
2017-06-03 21:08:57 +02:00
|
|
|
const_cast<SdrHdlList&>(rHdlList).TravelFocusHdl(true);
|
2002-04-12 10:54:45 +00:00
|
|
|
}
|
2003-10-06 14:30:58 +00:00
|
|
|
}
|
2010-10-12 15:53:47 +02:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|