Files
libreoffice/sd/source/core/drawdoc.cxx

1041 lines
34 KiB
C++
Raw Normal View History

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2000-09-18 23:16:46 +00:00
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2000-09-18 23:16:46 +00:00
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
2000-09-18 23:16:46 +00:00
*
* OpenOffice.org - a multi-platform office productivity suite
2000-09-18 23:16:46 +00:00
*
* This file is part of OpenOffice.org.
2000-09-18 23:16:46 +00:00
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
2000-09-18 23:16:46 +00:00
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
2000-09-18 23:16:46 +00:00
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
2000-09-18 23:16:46 +00:00
*
************************************************************************/
#include "PageListWatcher.hxx"
#include <com/sun/star/text/WritingMode.hpp>
#include <com/sun/star/document/PrinterIndependentLayout.hpp>
#include <com/sun/star/i18n/ScriptType.hpp>
#include <editeng/forbiddencharacterstable.hxx>
2001-04-06 13:17:19 +00:00
2000-09-18 23:16:46 +00:00
#include <svx/svxids.hrc>
2009-12-10 23:06:35 +01:00
#include <svl/srchitem.hxx>
#include <editeng/eeitem.hxx>
#include <editeng/scriptspaceitem.hxx>
2000-09-18 23:16:46 +00:00
#include <unotools/useroptions.hxx>
CWS-TOOLING: integrate CWS impressnotes01 2009-09-11 13:52:41 +0200 cl r276061 : CWS-TOOLING: rebase CWS impressnotes01 to trunk@276043 (milestone: DEV300:m58) 2009-09-10 15:44:57 +0200 cl r276039 : #i103139# continued work on the impress annotation feature 2009-09-10 14:52:31 +0200 cl r276032 : #i103139# continued work on the impress annotation feature 2009-09-10 14:50:32 +0200 cl r276031 : #i103139# continued work on the impress annotation feature 2009-09-10 14:48:29 +0200 cl r276030 : #i103139# continued work on the impress annotation feature 2009-09-10 11:36:11 +0200 cl r276027 : #i103139# continued work on the impress annotation feature 2009-09-09 20:22:41 +0200 cl r276018 : #i103139# continued work on the impress annotation feature 2009-09-09 20:21:45 +0200 cl r276017 : #i103139# continued work on the impress annotation feature 2009-09-09 19:32:29 +0200 sj r276015 : #i103139# added import of comments (ppt binary) 2009-09-09 19:31:07 +0200 sj r276014 : #i103139# added import of comments (ppt binary) 2009-09-09 19:16:41 +0200 cl r276011 : #i103139# continued work on the impress annotation feature 2009-09-09 19:15:19 +0200 cl r276010 : #i103139# continued work on the impress annotation feature 2009-09-09 16:27:19 +0200 cl r276001 : #i104579# fixed isEmptyPresObj() 2009-09-09 15:12:02 +0200 cl r275997 : #i103139# continued work on the impress annotation feature 2009-09-09 15:06:29 +0200 sj r275996 : #i103139# added import of comments (ppt binary) 2009-09-09 14:53:01 +0200 cl r275995 : #i103139# continued work on the impress annotation feature 2009-09-09 14:51:32 +0200 cl r275994 : #i103139# continued work on the impress annotation feature 2009-09-09 12:11:17 +0200 cl r275982 : #i103139# continued work on the impress annotation feature 2009-09-09 11:47:55 +0200 cl r275981 : #i103139# continued work on the impress annotation feature 2009-09-09 11:47:23 +0200 cl r275980 : #i103139# continued work on the impress annotation feature 2009-09-09 11:44:47 +0200 cl r275978 : #i104315# added missing tab pages 2009-09-08 16:04:44 +0200 cl r275936 : #i103139# continued work on the impress annotation feature 2009-09-08 16:03:28 +0200 cl r275935 : #i103139# continued work on the impress annotation feature 2009-09-08 11:45:47 +0200 cl r275920 : #i103139# continued work on the impress annotation feature 2009-09-08 11:41:51 +0200 cl r275919 : #i103139# continued work on the impress annotation feature 2009-09-07 18:30:55 +0200 cl r275910 : #i103139# continued work on the impress annotation feature 2009-09-07 18:29:37 +0200 cl r275909 : #i103139# continued work on the impress annotation feature 2009-09-07 17:25:43 +0200 cl r275905 : #i103139# continued work on the impress annotation feature 2009-09-07 12:00:28 +0200 cl r275884 : #i103139# continued work on the impress annotation feature 2009-09-06 14:14:00 +0200 cl r275859 : #i103139# continued work on the impress annotation feature 2009-09-05 20:57:24 +0200 cl r275854 : #i103139# continued work on the impress annotation feature 2009-09-05 20:56:29 +0200 cl r275853 : #i103139# continued work on the impress annotation feature 2009-09-05 20:55:27 +0200 cl r275852 : #i103139# continued work on the impress annotation feature 2009-09-05 20:11:42 +0200 cl r275851 : #i103139# continued work on the impress annotation feature 2009-09-05 20:11:09 +0200 cl r275850 : #i103139# continued work on the impress annotation feature 2009-09-05 17:43:33 +0200 cl r275845 : #i103139# continued work on the impress annotation feature 2009-09-05 17:04:41 +0200 cl r275843 : #i103139# continued work on the impress annotation feature 2009-09-05 17:03:26 +0200 cl r275842 : #i103139# continued work on the impress annotation feature 2009-09-05 17:02:53 +0200 cl r275841 : #i103139# continued work on the impress annotation feature 2009-09-05 13:15:04 +0200 pl r275839 : #i104823# WB_NEEDSFOCUS 2009-09-05 13:14:41 +0200 pl r275838 : #i104823# WB_NEEDSFOCUS 2009-09-04 17:48:21 +0200 cl r275826 : #i103139# continued work on the impress annotation feature 2009-09-04 17:35:03 +0200 cl r275825 : #i103139# continued work on the impress annotation feature 2009-09-04 17:15:46 +0200 cl r275824 : #i103139# continued work on the impress annotation feature 2009-09-04 17:12:54 +0200 cl r275823 : #i103139# continued work on the impress annotation feature 2009-09-04 17:05:23 +0200 cl r275822 : #i103139# continued work on the impress annotation feature 2009-09-04 16:48:28 +0200 cl r275820 : #i103139# continued work on the impress annotation feature 2009-09-04 16:44:02 +0200 cl r275818 : #i103139# continued work on the impress annotation feature 2009-09-04 16:43:23 +0200 cl r275817 : #i103139# continued work on the impress annotation feature 2009-09-04 16:06:04 +0200 cl r275812 : #i103139# continued work on the impress annotation feature 2009-09-04 16:05:45 +0200 cl r275811 : #i103139# continued work on the impress annotation feature 2009-09-04 15:04:33 +0200 cl r275806 : #i103139# continued work on the impress annotation feature 2009-09-04 11:43:14 +0200 cl r275795 : #i103139# continued work on the impress annotation feature 2009-09-04 11:27:10 +0200 cl r275793 : #i103139# continued work on the impress annotation feature 2009-09-04 11:10:02 +0200 cl r275792 : #i103139# continued work on the impress annotation feature 2009-09-04 11:07:05 +0200 cl r275790 : #i103139# continued work on the impress annotation feature 2009-09-04 11:05:01 +0200 cl r275789 : #i103139# continued work on the impress annotation feature 2009-09-04 10:55:51 +0200 cl r275785 : #i103139# renamed notes to comments 2009-09-04 10:54:57 +0200 cl r275784 : #i103139# renamed notes to comments 2009-09-03 20:37:35 +0200 cl r275772 : #i103139# continued work on the impress annotation feature 2009-09-03 20:35:31 +0200 cl r275771 : #i103139# continued work on the impress annotation feature 2009-09-01 18:17:55 +0200 cl r275680 : #i103139# continued work on the impress annotation feature 2009-09-01 18:15:08 +0200 cl r275678 : #i103139# continued work on the impress annotation feature 2009-09-01 18:13:38 +0200 cl r275677 : #i103139# continued work on the impress annotation feature 2009-08-18 12:35:42 +0200 cl r275089 : fixed merge error 2009-08-18 11:39:58 +0200 cl r275086 : CWS-TOOLING: rebase CWS impressnotes01 to trunk@275001 (milestone: DEV300:m55) 2009-07-30 13:45:10 +0200 cl r274481 : fixed merge errrors 2009-07-30 13:41:21 +0200 cl r274480 : fixed merge errrors 2009-07-30 13:39:40 +0200 cl r274478 : fixed merge errrors 2009-07-22 18:07:30 +0200 cl r274256 : CWS-TOOLING: rebase CWS impressnotes01 to trunk@273858 (milestone: DEV300:m52) 2009-07-21 17:21:31 +0200 cl r274208 : merging 2009-07-20 14:28:34 +0200 cl r274137 : #i103139# annotation support for impress 2009-07-20 14:28:04 +0200 cl r274136 : #i103139# annotation support for impress 2009-07-20 14:27:20 +0200 cl r274135 : #i103139# annotation support for impress 2009-07-20 14:21:17 +0200 cl r274134 : #i103139# annotation support for impress 2009-07-20 14:20:56 +0200 cl r274133 : #i103139# annotation support for impress 2009-07-20 14:20:09 +0200 cl r274132 : #i103139# annotation support for impress 2009-07-20 14:19:00 +0200 cl r274131 : #i103139# annotation support for impress 2009-07-20 14:17:50 +0200 cl r274130 : #i103139# annotation support for impress 2009-07-20 14:12:24 +0200 cl r274129 : #i103139# annotation support for impress 2009-07-20 13:52:03 +0200 cl r274128 : #i103139# annotation support for impress 2009-07-20 13:51:11 +0200 cl r274127 : #i103139# annotation support for impress 2009-07-20 13:48:59 +0200 cl r274126 : #i103139# annotation support for impress 2009-07-20 13:43:56 +0200 cl r274125 : #i103139# annotation support for impress 2009-07-20 13:31:55 +0200 cl r274123 : #i103139# annotation support for impress 2009-07-20 13:30:45 +0200 cl r274122 : #i103139# annotation support for impress
2009-09-16 13:55:36 +00:00
2000-09-18 23:16:46 +00:00
#include <sfx2/printer.hxx>
#include <sfx2/app.hxx>
2010-01-13 22:25:07 +01:00
#include <sfx2/linkmgr.hxx>
2000-09-18 23:16:46 +00:00
#include <svx/dialogs.hrc>
#include "Outliner.hxx"
2000-09-18 23:16:46 +00:00
#include "app.hxx"
#include <editeng/editstat.hxx>
#include <editeng/fontitem.hxx>
#include <svl/flagitem.hxx>
2000-09-18 23:16:46 +00:00
#include <svx/svdoattr.hxx>
#include <svx/svdotext.hxx>
#include <editeng/bulitem.hxx>
#include <editeng/numitem.hxx>
2000-09-18 23:16:46 +00:00
#include <svx/svditer.hxx>
#include <editeng/unolingu.hxx>
#include <svl/itempool.hxx>
2000-10-25 09:34:04 +00:00
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
2000-09-18 23:16:46 +00:00
#include <svx/xtable.hxx>
2000-10-25 09:34:04 +00:00
#include <com/sun/star/linguistic2/XHyphenator.hpp>
#include <com/sun/star/linguistic2/XSpellChecker1.hpp>
2000-09-18 23:16:46 +00:00
#include <com/sun/star/beans/XPropertySet.hpp>
#include <editeng/outlobj.hxx>
#include <unotools/saveopt.hxx>
2001-03-19 08:53:25 +00:00
#include <comphelper/extract.hxx>
#include <i18npool/mslangid.hxx>
#include <i18npool/languagetag.hxx>
2000-09-18 23:16:46 +00:00
#include <unotools/charclass.hxx>
2000-11-17 09:56:37 +00:00
#include <comphelper/processfactory.hxx>
#include <unotools/pathoptions.hxx>
#include <unotools/lingucfg.hxx>
#include <unotools/linguprops.hxx>
2000-10-25 09:34:04 +00:00
#include "eetext.hxx"
2000-09-18 23:16:46 +00:00
#include "drawdoc.hxx"
#include "sdpage.hxx"
#include "pglink.hxx"
#include "sdattr.hxx"
#include "glob.hrc"
#include "glob.hxx"
#include "stlpool.hxx"
#include "sdiocmpt.hxx"
#include "sdresid.hxx"
#include "cusshow.hxx"
#include "customshowlist.hxx"
#include "../ui/inc/DrawDocShell.hxx"
#include "../ui/inc/GraphicDocShell.hxx"
2001-01-19 18:15:28 +00:00
#include "../ui/inc/sdxfer.hxx"
#include "../ui/inc/ViewShell.hxx"
#include "../ui/inc/optsitem.hxx"
#include "../ui/inc/FrameView.hxx"
2000-09-18 23:16:46 +00:00
#include <tools/tenccvt.hxx>
using ::rtl::OUString;
using namespace ::sd;
2000-09-18 23:16:46 +00:00
using namespace ::com::sun::star;
2000-10-25 09:34:04 +00:00
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::linguistic2;
2000-09-18 23:16:46 +00:00
//////////////////////////////////////////////////////////////////////////////
2000-09-18 23:16:46 +00:00
TYPEINIT1( SdDrawDocument, FmFormModel );
SdDrawDocument* SdDrawDocument::pDocLockedInsertingLinks = NULL;
//////////////////////////////////////////////////////////////////////////////
PresentationSettings::PresentationSettings()
: mbAll( true ),
mbEndless( false ),
mbCustomShow(false),
mbManual( false ),
mbMouseVisible( false ),
mbMouseAsPen( false ),
mbLockedPages( false ),
mbAlwaysOnTop( false ),
mbFullScreen( true ),
mbAnimationAllowed( true ),
mnPauseTimeout( 10 ),
mbShowPauseLogo( false ),
mbStartWithNavigator(false)
{
}
// ---------------------------------------------------------------------------
PresentationSettings::PresentationSettings( const PresentationSettings& r )
: maPresPage( r.maPresPage ),
mbAll( r.mbAll ),
mbEndless( r.mbEndless ),
mbCustomShow( r.mbCustomShow ),
mbManual( r.mbManual ),
mbMouseVisible( r.mbMouseVisible ),
mbMouseAsPen( r.mbMouseAsPen ),
mbLockedPages( r.mbLockedPages ),
mbAlwaysOnTop( r.mbAlwaysOnTop ),
mbFullScreen( r.mbFullScreen ),
mbAnimationAllowed( r.mbAnimationAllowed ),
mnPauseTimeout( r.mnPauseTimeout ),
mbShowPauseLogo( r.mbShowPauseLogo ),
mbStartWithNavigator( r.mbStartWithNavigator )
{
}
// ---------------------------------------------------------------------------
2000-09-18 23:16:46 +00:00
SdDrawDocument::SdDrawDocument(DocumentType eType, SfxObjectShell* pDrDocSh)
: FmFormModel( SvtPathOptions().GetPalettePath(), NULL, pDrDocSh )
, mpOutliner(NULL)
, mpInternalOutliner(NULL)
, mpWorkStartupTimer(NULL)
, mpOnlineSpellingTimer(NULL)
, mpOnlineSpellingList(NULL)
, mpOnlineSearchItem(NULL)
, mpCustomShowList(NULL)
, mpDocSh(static_cast< ::sd::DrawDocShell*>(pDrDocSh))
, mpCreatingTransferable( NULL )
, mbHasOnlineSpellErrors(sal_False)
, mbInitialOnlineSpellingEnabled(sal_True)
, mbNewOrLoadCompleted(sal_False)
, mbStartWithPresentation( false )
, meLanguage( LANGUAGE_SYSTEM )
, meLanguageCJK( LANGUAGE_SYSTEM )
, meLanguageCTL( LANGUAGE_SYSTEM )
, mePageNumType(SVX_ARABIC)
, mbAllocDocSh(sal_False)
, meDocType(eType)
, mpCharClass(NULL)
, mpLocale(NULL)
, mpDrawPageListWatcher(0)
, mpMasterPageListWatcher(0)
2000-09-18 23:16:46 +00:00
{
mpDrawPageListWatcher = ::std::auto_ptr<ImpDrawPageListWatcher>(
new ImpDrawPageListWatcher(*this));
mpMasterPageListWatcher = ::std::auto_ptr<ImpMasterPageListWatcher>(
new ImpMasterPageListWatcher(*this));
2000-09-18 23:16:46 +00:00
SetObjectShell(pDrDocSh); // fuer das VCDrawModel
if (mpDocSh)
2000-09-18 23:16:46 +00:00
{
SetSwapGraphics(sal_True);
2000-09-18 23:16:46 +00:00
}
// Masseinheit (von App) und Massstab (von SdMod) setzen
sal_Int32 nX, nY;
SdOptions* pOptions = SD_MOD()->GetSdOptions(meDocType);
2000-09-18 23:16:46 +00:00
pOptions->GetScale( nX, nY );
2011-02-07 22:11:09 +01:00
// Allow UI scale only for draw documents.
if( eType == DOCUMENT_TYPE_DRAW )
SetUIUnit( (FieldUnit)pOptions->GetMetric(), Fraction( nX, nY ) ); // user-defined
else
SetUIUnit( (FieldUnit)pOptions->GetMetric(), Fraction( 1, 1 ) ); // default
2000-09-18 23:16:46 +00:00
SetScaleUnit(MAP_100TH_MM);
SetScaleFraction(Fraction(1, 1));
SetDefaultFontHeight(847); // 24p
pItemPool->SetDefaultMetric(SFX_MAPUNIT_100TH_MM);
pItemPool->FreezeIdRanges();
SetTextDefaults();
// die DrawingEngine muss auch wissen, wo er ist
FmFormModel::SetStyleSheetPool( new SdStyleSheetPool( GetPool(), this ) );
2001-02-09 12:01:31 +00:00
// Dem DrawOutliner den StyleSheetPool setzen, damit Textobjekte richtig
// eingelesen werden koennen. Der Link zum StyleRequest-Handler des
// Dokuments wird erst in NewOrLoadCompleted gesetzt, da erst dann alle
// Vorlagen existieren.
SdrOutliner& rOutliner = GetDrawOutliner();
rOutliner.SetStyleSheetPool((SfxStyleSheetPool*)GetStyleSheetPool());
CWS-TOOLING: integrate CWS impressnotes01 2009-09-11 13:52:41 +0200 cl r276061 : CWS-TOOLING: rebase CWS impressnotes01 to trunk@276043 (milestone: DEV300:m58) 2009-09-10 15:44:57 +0200 cl r276039 : #i103139# continued work on the impress annotation feature 2009-09-10 14:52:31 +0200 cl r276032 : #i103139# continued work on the impress annotation feature 2009-09-10 14:50:32 +0200 cl r276031 : #i103139# continued work on the impress annotation feature 2009-09-10 14:48:29 +0200 cl r276030 : #i103139# continued work on the impress annotation feature 2009-09-10 11:36:11 +0200 cl r276027 : #i103139# continued work on the impress annotation feature 2009-09-09 20:22:41 +0200 cl r276018 : #i103139# continued work on the impress annotation feature 2009-09-09 20:21:45 +0200 cl r276017 : #i103139# continued work on the impress annotation feature 2009-09-09 19:32:29 +0200 sj r276015 : #i103139# added import of comments (ppt binary) 2009-09-09 19:31:07 +0200 sj r276014 : #i103139# added import of comments (ppt binary) 2009-09-09 19:16:41 +0200 cl r276011 : #i103139# continued work on the impress annotation feature 2009-09-09 19:15:19 +0200 cl r276010 : #i103139# continued work on the impress annotation feature 2009-09-09 16:27:19 +0200 cl r276001 : #i104579# fixed isEmptyPresObj() 2009-09-09 15:12:02 +0200 cl r275997 : #i103139# continued work on the impress annotation feature 2009-09-09 15:06:29 +0200 sj r275996 : #i103139# added import of comments (ppt binary) 2009-09-09 14:53:01 +0200 cl r275995 : #i103139# continued work on the impress annotation feature 2009-09-09 14:51:32 +0200 cl r275994 : #i103139# continued work on the impress annotation feature 2009-09-09 12:11:17 +0200 cl r275982 : #i103139# continued work on the impress annotation feature 2009-09-09 11:47:55 +0200 cl r275981 : #i103139# continued work on the impress annotation feature 2009-09-09 11:47:23 +0200 cl r275980 : #i103139# continued work on the impress annotation feature 2009-09-09 11:44:47 +0200 cl r275978 : #i104315# added missing tab pages 2009-09-08 16:04:44 +0200 cl r275936 : #i103139# continued work on the impress annotation feature 2009-09-08 16:03:28 +0200 cl r275935 : #i103139# continued work on the impress annotation feature 2009-09-08 11:45:47 +0200 cl r275920 : #i103139# continued work on the impress annotation feature 2009-09-08 11:41:51 +0200 cl r275919 : #i103139# continued work on the impress annotation feature 2009-09-07 18:30:55 +0200 cl r275910 : #i103139# continued work on the impress annotation feature 2009-09-07 18:29:37 +0200 cl r275909 : #i103139# continued work on the impress annotation feature 2009-09-07 17:25:43 +0200 cl r275905 : #i103139# continued work on the impress annotation feature 2009-09-07 12:00:28 +0200 cl r275884 : #i103139# continued work on the impress annotation feature 2009-09-06 14:14:00 +0200 cl r275859 : #i103139# continued work on the impress annotation feature 2009-09-05 20:57:24 +0200 cl r275854 : #i103139# continued work on the impress annotation feature 2009-09-05 20:56:29 +0200 cl r275853 : #i103139# continued work on the impress annotation feature 2009-09-05 20:55:27 +0200 cl r275852 : #i103139# continued work on the impress annotation feature 2009-09-05 20:11:42 +0200 cl r275851 : #i103139# continued work on the impress annotation feature 2009-09-05 20:11:09 +0200 cl r275850 : #i103139# continued work on the impress annotation feature 2009-09-05 17:43:33 +0200 cl r275845 : #i103139# continued work on the impress annotation feature 2009-09-05 17:04:41 +0200 cl r275843 : #i103139# continued work on the impress annotation feature 2009-09-05 17:03:26 +0200 cl r275842 : #i103139# continued work on the impress annotation feature 2009-09-05 17:02:53 +0200 cl r275841 : #i103139# continued work on the impress annotation feature 2009-09-05 13:15:04 +0200 pl r275839 : #i104823# WB_NEEDSFOCUS 2009-09-05 13:14:41 +0200 pl r275838 : #i104823# WB_NEEDSFOCUS 2009-09-04 17:48:21 +0200 cl r275826 : #i103139# continued work on the impress annotation feature 2009-09-04 17:35:03 +0200 cl r275825 : #i103139# continued work on the impress annotation feature 2009-09-04 17:15:46 +0200 cl r275824 : #i103139# continued work on the impress annotation feature 2009-09-04 17:12:54 +0200 cl r275823 : #i103139# continued work on the impress annotation feature 2009-09-04 17:05:23 +0200 cl r275822 : #i103139# continued work on the impress annotation feature 2009-09-04 16:48:28 +0200 cl r275820 : #i103139# continued work on the impress annotation feature 2009-09-04 16:44:02 +0200 cl r275818 : #i103139# continued work on the impress annotation feature 2009-09-04 16:43:23 +0200 cl r275817 : #i103139# continued work on the impress annotation feature 2009-09-04 16:06:04 +0200 cl r275812 : #i103139# continued work on the impress annotation feature 2009-09-04 16:05:45 +0200 cl r275811 : #i103139# continued work on the impress annotation feature 2009-09-04 15:04:33 +0200 cl r275806 : #i103139# continued work on the impress annotation feature 2009-09-04 11:43:14 +0200 cl r275795 : #i103139# continued work on the impress annotation feature 2009-09-04 11:27:10 +0200 cl r275793 : #i103139# continued work on the impress annotation feature 2009-09-04 11:10:02 +0200 cl r275792 : #i103139# continued work on the impress annotation feature 2009-09-04 11:07:05 +0200 cl r275790 : #i103139# continued work on the impress annotation feature 2009-09-04 11:05:01 +0200 cl r275789 : #i103139# continued work on the impress annotation feature 2009-09-04 10:55:51 +0200 cl r275785 : #i103139# renamed notes to comments 2009-09-04 10:54:57 +0200 cl r275784 : #i103139# renamed notes to comments 2009-09-03 20:37:35 +0200 cl r275772 : #i103139# continued work on the impress annotation feature 2009-09-03 20:35:31 +0200 cl r275771 : #i103139# continued work on the impress annotation feature 2009-09-01 18:17:55 +0200 cl r275680 : #i103139# continued work on the impress annotation feature 2009-09-01 18:15:08 +0200 cl r275678 : #i103139# continued work on the impress annotation feature 2009-09-01 18:13:38 +0200 cl r275677 : #i103139# continued work on the impress annotation feature 2009-08-18 12:35:42 +0200 cl r275089 : fixed merge error 2009-08-18 11:39:58 +0200 cl r275086 : CWS-TOOLING: rebase CWS impressnotes01 to trunk@275001 (milestone: DEV300:m55) 2009-07-30 13:45:10 +0200 cl r274481 : fixed merge errrors 2009-07-30 13:41:21 +0200 cl r274480 : fixed merge errrors 2009-07-30 13:39:40 +0200 cl r274478 : fixed merge errrors 2009-07-22 18:07:30 +0200 cl r274256 : CWS-TOOLING: rebase CWS impressnotes01 to trunk@273858 (milestone: DEV300:m52) 2009-07-21 17:21:31 +0200 cl r274208 : merging 2009-07-20 14:28:34 +0200 cl r274137 : #i103139# annotation support for impress 2009-07-20 14:28:04 +0200 cl r274136 : #i103139# annotation support for impress 2009-07-20 14:27:20 +0200 cl r274135 : #i103139# annotation support for impress 2009-07-20 14:21:17 +0200 cl r274134 : #i103139# annotation support for impress 2009-07-20 14:20:56 +0200 cl r274133 : #i103139# annotation support for impress 2009-07-20 14:20:09 +0200 cl r274132 : #i103139# annotation support for impress 2009-07-20 14:19:00 +0200 cl r274131 : #i103139# annotation support for impress 2009-07-20 14:17:50 +0200 cl r274130 : #i103139# annotation support for impress 2009-07-20 14:12:24 +0200 cl r274129 : #i103139# annotation support for impress 2009-07-20 13:52:03 +0200 cl r274128 : #i103139# annotation support for impress 2009-07-20 13:51:11 +0200 cl r274127 : #i103139# annotation support for impress 2009-07-20 13:48:59 +0200 cl r274126 : #i103139# annotation support for impress 2009-07-20 13:43:56 +0200 cl r274125 : #i103139# annotation support for impress 2009-07-20 13:31:55 +0200 cl r274123 : #i103139# annotation support for impress 2009-07-20 13:30:45 +0200 cl r274122 : #i103139# annotation support for impress
2009-09-16 13:55:36 +00:00
SetCalcFieldValueHdl( &rOutliner );
2000-09-18 23:16:46 +00:00
// set linguistic options
2000-09-18 23:16:46 +00:00
{
const SvtLinguConfig aLinguConfig;
SvtLinguOptions aOptions;
aLinguConfig.GetOptions( aOptions );
SetLanguage( MsLangId::resolveSystemLanguageByScriptType(aOptions.nDefaultLanguage,
::com::sun::star::i18n::ScriptType::LATIN), EE_CHAR_LANGUAGE );
SetLanguage( MsLangId::resolveSystemLanguageByScriptType(aOptions.nDefaultLanguage_CJK,
::com::sun::star::i18n::ScriptType::ASIAN), EE_CHAR_LANGUAGE_CJK );
SetLanguage( MsLangId::resolveSystemLanguageByScriptType(aOptions.nDefaultLanguage_CTL,
::com::sun::star::i18n::ScriptType::COMPLEX), EE_CHAR_LANGUAGE_CTL );
mbOnlineSpell = aOptions.bIsSpellAuto;
2000-09-18 23:16:46 +00:00
}
LanguageType eRealLanguage = MsLangId::getRealLanguage( meLanguage );
mpLocale = new ::com::sun::star::lang::Locale( LanguageTag( eRealLanguage ).getLocale());
2000-09-18 23:16:46 +00:00
mpCharClass = new CharClass( *mpLocale );
// If the current application language is a language that uses right-to-left text...
LanguageType eRealCTLLanguage = Application::GetSettings().GetLanguage();
if( MsLangId::isRightToLeft( eRealCTLLanguage ) )
{
// ... then we have to set this as a default
SetDefaultWritingMode( ::com::sun::star::text::WritingMode_RL_TB );
}
// for korean and japanese languages we have a different default for apply spacing between asian, latin and ctl text
if (MsLangId::isKorean(eRealCTLLanguage) || (LANGUAGE_JAPANESE == eRealCTLLanguage))
{
GetPool().GetSecondaryPool()->SetPoolDefaultItem( SvxScriptSpaceItem( sal_False, EE_PARA_ASIANCJKSPACING ) );
}
2000-09-18 23:16:46 +00:00
// DefTab und SpellOptions setzen
// Jetzt am Modul (SD)
sal_uInt16 nDefTab = pOptions->GetDefTab();
2000-09-18 23:16:46 +00:00
SetDefaultTabulator( nDefTab );
try
2000-09-18 23:16:46 +00:00
{
Reference< XSpellChecker1 > xSpellChecker( LinguMgr::GetSpellChecker() );
if ( xSpellChecker.is() )
rOutliner.SetSpeller( xSpellChecker );
Reference< XHyphenator > xHyphenator( LinguMgr::GetHyphenator() );
if( xHyphenator.is() )
rOutliner.SetHyphenator( xHyphenator );
SetForbiddenCharsTable( new SvxForbiddenCharactersTable( ::comphelper::getProcessComponentContext() ) );
2000-09-18 23:16:46 +00:00
}
catch(...)
2000-09-18 23:16:46 +00:00
{
2011-03-01 19:06:55 +01:00
OSL_FAIL("Can't get SpellChecker");
2000-09-18 23:16:46 +00:00
}
rOutliner.SetDefaultLanguage( Application::GetSettings().GetLanguage() );
2000-09-18 23:16:46 +00:00
if (mpDocSh)
2000-09-18 23:16:46 +00:00
{
2010-01-13 22:25:07 +01:00
SetLinkManager( new sfx2::LinkManager(mpDocSh) );
2000-09-18 23:16:46 +00:00
}
2001-02-09 12:01:31 +00:00
sal_uLong nCntrl = rOutliner.GetControlWord();
2001-02-09 12:01:31 +00:00
nCntrl |= EE_CNTRL_ALLOWBIGOBJS;
nCntrl |= EE_CNTRL_URLSFXEXECUTE;
if (mbOnlineSpell)
2001-02-09 12:01:31 +00:00
nCntrl |= EE_CNTRL_ONLINESPELLING;
else
nCntrl &= ~EE_CNTRL_ONLINESPELLING;
nCntrl &= ~ EE_CNTRL_ULSPACESUMMATION;
if ( meDocType != DOCUMENT_TYPE_IMPRESS )
SetSummationOfParagraphs( sal_False );
else
{
SetSummationOfParagraphs( pOptions->IsSummationOfParagraphs() );
if ( pOptions->IsSummationOfParagraphs() )
nCntrl |= EE_CNTRL_ULSPACESUMMATION;
}
2001-02-09 12:01:31 +00:00
rOutliner.SetControlWord(nCntrl);
// Initialize the printer independent layout mode.
SetPrinterIndependentLayout (pOptions->GetPrinterIndependentLayout());
2001-02-09 12:01:31 +00:00
2000-09-18 23:16:46 +00:00
// Dem HitTestOutliner den StyleSheetPool setzen.
// Der Link zum StyleRequest-Handler des
// Dokuments wird erst in NewOrLoadCompleted gesetzt, da erst dann alle
// Vorlagen existieren.
SfxItemSet aSet2( pHitTestOutliner->GetEmptyItemSet() );
pHitTestOutliner->SetStyleSheetPool( (SfxStyleSheetPool*)GetStyleSheetPool() );
CWS-TOOLING: integrate CWS impressnotes01 2009-09-11 13:52:41 +0200 cl r276061 : CWS-TOOLING: rebase CWS impressnotes01 to trunk@276043 (milestone: DEV300:m58) 2009-09-10 15:44:57 +0200 cl r276039 : #i103139# continued work on the impress annotation feature 2009-09-10 14:52:31 +0200 cl r276032 : #i103139# continued work on the impress annotation feature 2009-09-10 14:50:32 +0200 cl r276031 : #i103139# continued work on the impress annotation feature 2009-09-10 14:48:29 +0200 cl r276030 : #i103139# continued work on the impress annotation feature 2009-09-10 11:36:11 +0200 cl r276027 : #i103139# continued work on the impress annotation feature 2009-09-09 20:22:41 +0200 cl r276018 : #i103139# continued work on the impress annotation feature 2009-09-09 20:21:45 +0200 cl r276017 : #i103139# continued work on the impress annotation feature 2009-09-09 19:32:29 +0200 sj r276015 : #i103139# added import of comments (ppt binary) 2009-09-09 19:31:07 +0200 sj r276014 : #i103139# added import of comments (ppt binary) 2009-09-09 19:16:41 +0200 cl r276011 : #i103139# continued work on the impress annotation feature 2009-09-09 19:15:19 +0200 cl r276010 : #i103139# continued work on the impress annotation feature 2009-09-09 16:27:19 +0200 cl r276001 : #i104579# fixed isEmptyPresObj() 2009-09-09 15:12:02 +0200 cl r275997 : #i103139# continued work on the impress annotation feature 2009-09-09 15:06:29 +0200 sj r275996 : #i103139# added import of comments (ppt binary) 2009-09-09 14:53:01 +0200 cl r275995 : #i103139# continued work on the impress annotation feature 2009-09-09 14:51:32 +0200 cl r275994 : #i103139# continued work on the impress annotation feature 2009-09-09 12:11:17 +0200 cl r275982 : #i103139# continued work on the impress annotation feature 2009-09-09 11:47:55 +0200 cl r275981 : #i103139# continued work on the impress annotation feature 2009-09-09 11:47:23 +0200 cl r275980 : #i103139# continued work on the impress annotation feature 2009-09-09 11:44:47 +0200 cl r275978 : #i104315# added missing tab pages 2009-09-08 16:04:44 +0200 cl r275936 : #i103139# continued work on the impress annotation feature 2009-09-08 16:03:28 +0200 cl r275935 : #i103139# continued work on the impress annotation feature 2009-09-08 11:45:47 +0200 cl r275920 : #i103139# continued work on the impress annotation feature 2009-09-08 11:41:51 +0200 cl r275919 : #i103139# continued work on the impress annotation feature 2009-09-07 18:30:55 +0200 cl r275910 : #i103139# continued work on the impress annotation feature 2009-09-07 18:29:37 +0200 cl r275909 : #i103139# continued work on the impress annotation feature 2009-09-07 17:25:43 +0200 cl r275905 : #i103139# continued work on the impress annotation feature 2009-09-07 12:00:28 +0200 cl r275884 : #i103139# continued work on the impress annotation feature 2009-09-06 14:14:00 +0200 cl r275859 : #i103139# continued work on the impress annotation feature 2009-09-05 20:57:24 +0200 cl r275854 : #i103139# continued work on the impress annotation feature 2009-09-05 20:56:29 +0200 cl r275853 : #i103139# continued work on the impress annotation feature 2009-09-05 20:55:27 +0200 cl r275852 : #i103139# continued work on the impress annotation feature 2009-09-05 20:11:42 +0200 cl r275851 : #i103139# continued work on the impress annotation feature 2009-09-05 20:11:09 +0200 cl r275850 : #i103139# continued work on the impress annotation feature 2009-09-05 17:43:33 +0200 cl r275845 : #i103139# continued work on the impress annotation feature 2009-09-05 17:04:41 +0200 cl r275843 : #i103139# continued work on the impress annotation feature 2009-09-05 17:03:26 +0200 cl r275842 : #i103139# continued work on the impress annotation feature 2009-09-05 17:02:53 +0200 cl r275841 : #i103139# continued work on the impress annotation feature 2009-09-05 13:15:04 +0200 pl r275839 : #i104823# WB_NEEDSFOCUS 2009-09-05 13:14:41 +0200 pl r275838 : #i104823# WB_NEEDSFOCUS 2009-09-04 17:48:21 +0200 cl r275826 : #i103139# continued work on the impress annotation feature 2009-09-04 17:35:03 +0200 cl r275825 : #i103139# continued work on the impress annotation feature 2009-09-04 17:15:46 +0200 cl r275824 : #i103139# continued work on the impress annotation feature 2009-09-04 17:12:54 +0200 cl r275823 : #i103139# continued work on the impress annotation feature 2009-09-04 17:05:23 +0200 cl r275822 : #i103139# continued work on the impress annotation feature 2009-09-04 16:48:28 +0200 cl r275820 : #i103139# continued work on the impress annotation feature 2009-09-04 16:44:02 +0200 cl r275818 : #i103139# continued work on the impress annotation feature 2009-09-04 16:43:23 +0200 cl r275817 : #i103139# continued work on the impress annotation feature 2009-09-04 16:06:04 +0200 cl r275812 : #i103139# continued work on the impress annotation feature 2009-09-04 16:05:45 +0200 cl r275811 : #i103139# continued work on the impress annotation feature 2009-09-04 15:04:33 +0200 cl r275806 : #i103139# continued work on the impress annotation feature 2009-09-04 11:43:14 +0200 cl r275795 : #i103139# continued work on the impress annotation feature 2009-09-04 11:27:10 +0200 cl r275793 : #i103139# continued work on the impress annotation feature 2009-09-04 11:10:02 +0200 cl r275792 : #i103139# continued work on the impress annotation feature 2009-09-04 11:07:05 +0200 cl r275790 : #i103139# continued work on the impress annotation feature 2009-09-04 11:05:01 +0200 cl r275789 : #i103139# continued work on the impress annotation feature 2009-09-04 10:55:51 +0200 cl r275785 : #i103139# renamed notes to comments 2009-09-04 10:54:57 +0200 cl r275784 : #i103139# renamed notes to comments 2009-09-03 20:37:35 +0200 cl r275772 : #i103139# continued work on the impress annotation feature 2009-09-03 20:35:31 +0200 cl r275771 : #i103139# continued work on the impress annotation feature 2009-09-01 18:17:55 +0200 cl r275680 : #i103139# continued work on the impress annotation feature 2009-09-01 18:15:08 +0200 cl r275678 : #i103139# continued work on the impress annotation feature 2009-09-01 18:13:38 +0200 cl r275677 : #i103139# continued work on the impress annotation feature 2009-08-18 12:35:42 +0200 cl r275089 : fixed merge error 2009-08-18 11:39:58 +0200 cl r275086 : CWS-TOOLING: rebase CWS impressnotes01 to trunk@275001 (milestone: DEV300:m55) 2009-07-30 13:45:10 +0200 cl r274481 : fixed merge errrors 2009-07-30 13:41:21 +0200 cl r274480 : fixed merge errrors 2009-07-30 13:39:40 +0200 cl r274478 : fixed merge errrors 2009-07-22 18:07:30 +0200 cl r274256 : CWS-TOOLING: rebase CWS impressnotes01 to trunk@273858 (milestone: DEV300:m52) 2009-07-21 17:21:31 +0200 cl r274208 : merging 2009-07-20 14:28:34 +0200 cl r274137 : #i103139# annotation support for impress 2009-07-20 14:28:04 +0200 cl r274136 : #i103139# annotation support for impress 2009-07-20 14:27:20 +0200 cl r274135 : #i103139# annotation support for impress 2009-07-20 14:21:17 +0200 cl r274134 : #i103139# annotation support for impress 2009-07-20 14:20:56 +0200 cl r274133 : #i103139# annotation support for impress 2009-07-20 14:20:09 +0200 cl r274132 : #i103139# annotation support for impress 2009-07-20 14:19:00 +0200 cl r274131 : #i103139# annotation support for impress 2009-07-20 14:17:50 +0200 cl r274130 : #i103139# annotation support for impress 2009-07-20 14:12:24 +0200 cl r274129 : #i103139# annotation support for impress 2009-07-20 13:52:03 +0200 cl r274128 : #i103139# annotation support for impress 2009-07-20 13:51:11 +0200 cl r274127 : #i103139# annotation support for impress 2009-07-20 13:48:59 +0200 cl r274126 : #i103139# annotation support for impress 2009-07-20 13:43:56 +0200 cl r274125 : #i103139# annotation support for impress 2009-07-20 13:31:55 +0200 cl r274123 : #i103139# annotation support for impress 2009-07-20 13:30:45 +0200 cl r274122 : #i103139# annotation support for impress
2009-09-16 13:55:36 +00:00
SetCalcFieldValueHdl( pHitTestOutliner );
2001-06-25 12:08:18 +00:00
try
2000-09-18 23:16:46 +00:00
{
Reference< XSpellChecker1 > xSpellChecker( LinguMgr::GetSpellChecker() );
if ( xSpellChecker.is() )
pHitTestOutliner->SetSpeller( xSpellChecker );
Reference< XHyphenator > xHyphenator( LinguMgr::GetHyphenator() );
if( xHyphenator.is() )
pHitTestOutliner->SetHyphenator( xHyphenator );
2000-09-18 23:16:46 +00:00
}
catch(...)
2000-09-18 23:16:46 +00:00
{
2011-03-01 19:06:55 +01:00
OSL_FAIL("Can't get SpellChecker");
2000-09-18 23:16:46 +00:00
}
pHitTestOutliner->SetDefaultLanguage( Application::GetSettings().GetLanguage() );
2000-09-18 23:16:46 +00:00
sal_uLong nCntrl2 = pHitTestOutliner->GetControlWord();
2000-09-18 23:16:46 +00:00
nCntrl2 |= EE_CNTRL_ALLOWBIGOBJS;
nCntrl2 |= EE_CNTRL_URLSFXEXECUTE;
nCntrl2 &= ~EE_CNTRL_ONLINESPELLING;
nCntrl2 &= ~ EE_CNTRL_ULSPACESUMMATION;
if ( pOptions->IsSummationOfParagraphs() )
nCntrl2 |= EE_CNTRL_ULSPACESUMMATION;
2000-09-18 23:16:46 +00:00
pHitTestOutliner->SetControlWord( nCntrl2 );
/**************************************************************************
* Layer anlegen
*
* Es werden auf Pages und MasterPages folgende Default-Layer angelegt:
*
* Layer STR_LAYOUT : Standardlayer f<EFBFBD>r alle Zeichenobjekte
2000-09-18 23:16:46 +00:00
*
* Layer STR_BCKGRND : Hintergrund der MasterPage
* (auf normalen Pages z.Z. keine Verwendung)
*
* Layer STR_BCKGRNDOBJ: Objekte auf dem Hintergrund der MasterPage
* (auf normalen Pages z.Z. keine Verwendung)
*
* Layer STR_CONTROLS : Standardlayer f<EFBFBD>r Controls
2000-09-18 23:16:46 +00:00
*
**************************************************************************/
{
String aControlLayerName( SdResId(STR_LAYER_CONTROLS) );
SdrLayerAdmin& rLayerAdmin = GetLayerAdmin();
rLayerAdmin.NewLayer( String(SdResId(STR_LAYER_LAYOUT)) );
rLayerAdmin.NewLayer( String(SdResId(STR_LAYER_BCKGRND)) );
rLayerAdmin.NewLayer( String(SdResId(STR_LAYER_BCKGRNDOBJ)) );
rLayerAdmin.NewLayer( aControlLayerName );
rLayerAdmin.NewLayer( String(SdResId(STR_LAYER_MEASURELINES)) );
rLayerAdmin.SetControlLayerName(aControlLayerName);
}
2000-09-18 23:16:46 +00:00
}
/*************************************************************************
|*
|* Destruktor
|*
\************************************************************************/
SdDrawDocument::~SdDrawDocument()
2000-09-18 23:16:46 +00:00
{
Broadcast(SdrHint(HINT_MODELCLEARED));
if (mpWorkStartupTimer)
2000-09-18 23:16:46 +00:00
{
if ( mpWorkStartupTimer->IsActive() )
mpWorkStartupTimer->Stop();
2000-09-18 23:16:46 +00:00
delete mpWorkStartupTimer;
mpWorkStartupTimer = NULL;
2000-09-18 23:16:46 +00:00
}
StopOnlineSpelling();
delete mpOnlineSearchItem;
mpOnlineSearchItem = NULL;
2000-09-18 23:16:46 +00:00
CloseBookmarkDoc();
SetAllocDocSh(sal_False);
2000-09-18 23:16:46 +00:00
ClearModel(sal_True);
2000-09-18 23:16:46 +00:00
if (pLinkManager)
{
// BaseLinks freigeben
if ( !pLinkManager->GetLinks().empty() )
2000-09-18 23:16:46 +00:00
{
pLinkManager->Remove( 0, pLinkManager->GetLinks().size() );
2000-09-18 23:16:46 +00:00
}
delete pLinkManager;
pLinkManager = NULL;
}
std::vector<sd::FrameView*>::iterator pIter;
for ( pIter = maFrameViewList.begin(); pIter != maFrameViewList.end(); ++pIter )
delete *pIter;
2000-09-18 23:16:46 +00:00
if (mpCustomShowList)
2000-09-18 23:16:46 +00:00
{
for (sal_uLong j = 0; j < mpCustomShowList->size(); j++)
2000-09-18 23:16:46 +00:00
{
// Ggf. CustomShows loeschen
SdCustomShow* pCustomShow = (*mpCustomShowList)[j];
2000-09-18 23:16:46 +00:00
delete pCustomShow;
}
delete mpCustomShowList;
mpCustomShowList = NULL;
2000-09-18 23:16:46 +00:00
}
delete mpOutliner;
mpOutliner = NULL;
2000-09-18 23:16:46 +00:00
delete mpInternalOutliner;
mpInternalOutliner = NULL;
2000-09-18 23:16:46 +00:00
delete mpLocale;
mpLocale = NULL;
delete mpCharClass;
mpCharClass = NULL;
}
/*************************************************************************
|*
|* Diese Methode erzeugt ein neues Dokument (SdDrawDocument) und gibt einen
|* Zeiger darauf zurueck. Die Drawing Engine benutzt diese Methode um das
|* Dokument oder Teile davon ins Clipboard/DragServer stellen zu koennen.
|*
\************************************************************************/
SdrModel* SdDrawDocument::AllocModel() const
2000-09-18 23:16:46 +00:00
{
SdDrawDocument* pNewModel = NULL;
if( mpCreatingTransferable )
2000-09-18 23:16:46 +00:00
{
2001-01-19 18:15:28 +00:00
// Dokument wird fuer Drag&Drop/Clipboard erzeugt, dafuer muss dem Dokument eine DocShell (SvPersist) bekannt sein
SfxObjectShell* pObj = NULL;
::sd::DrawDocShell* pNewDocSh = NULL;
2000-09-18 23:16:46 +00:00
if( meDocType == DOCUMENT_TYPE_IMPRESS )
mpCreatingTransferable->SetDocShell( new ::sd::DrawDocShell(
SFX_CREATE_MODE_EMBEDDED, sal_True, meDocType ) );
else
mpCreatingTransferable->SetDocShell( new ::sd::GraphicDocShell(
SFX_CREATE_MODE_EMBEDDED, sal_True, meDocType ) );
2000-09-18 23:16:46 +00:00
pNewDocSh = static_cast< ::sd::DrawDocShell*>( pObj = mpCreatingTransferable->GetDocShell() );
2001-01-19 18:15:28 +00:00
pNewDocSh->DoInitNew( NULL );
2000-09-18 23:16:46 +00:00
pNewModel = pNewDocSh->GetDoc();
// Nur fuer Clipboard notwendig,
// fuer Drag&Drop erfolgt dieses im DragServer
SdStyleSheetPool* pOldStylePool = (SdStyleSheetPool*) GetStyleSheetPool();
SdStyleSheetPool* pNewStylePool = (SdStyleSheetPool*) pNewModel->GetStyleSheetPool();
pNewStylePool->CopyGraphicSheets(*pOldStylePool);
pNewStylePool->CopyCellSheets(*pOldStylePool);
pNewStylePool->CopyTableStyles(*pOldStylePool);
2000-09-18 23:16:46 +00:00
for (sal_uInt16 i = 0; i < GetMasterSdPageCount(PK_STANDARD); i++)
2000-09-18 23:16:46 +00:00
{
// Alle Layouts der MasterPage mitnehmen
String aOldLayoutName(((SdDrawDocument*) this)->GetMasterSdPage(i, PK_STANDARD)->GetLayoutName());
aOldLayoutName.Erase( aOldLayoutName.SearchAscii( SD_LT_SEPARATOR ) );
SdStyleSheetVector aCreatedSheets;
pNewStylePool->CopyLayoutSheets(aOldLayoutName, *pOldStylePool, aCreatedSheets );
2000-09-18 23:16:46 +00:00
}
pNewModel->NewOrLoadCompleted( DOC_LOADED ); // loaded from source document
}
else if( mbAllocDocSh )
2000-09-18 23:16:46 +00:00
{
2001-01-19 18:15:28 +00:00
// Es wird eine DocShell erzeugt, welche mit GetAllocedDocSh() zurueckgegeben wird
2000-09-18 23:16:46 +00:00
SdDrawDocument* pDoc = (SdDrawDocument*) this;
pDoc->SetAllocDocSh(sal_False);
pDoc->mxAllocedDocShRef = new ::sd::DrawDocShell(
SFX_CREATE_MODE_EMBEDDED, sal_True, meDocType);
pDoc->mxAllocedDocShRef->DoInitNew(NULL);
pNewModel = pDoc->mxAllocedDocShRef->GetDoc();
2000-09-18 23:16:46 +00:00
}
else
{
pNewModel = new SdDrawDocument(meDocType, NULL);
2000-09-18 23:16:46 +00:00
}
2001-01-19 18:15:28 +00:00
return pNewModel;
2000-09-18 23:16:46 +00:00
}
/*************************************************************************
|*
|* Diese Methode erzeugt eine neue Seite (SdPage) und gibt einen Zeiger
|* darauf zurueck. Die Drawing Engine benutzt diese Methode beim Laden
|* zur Erzeugung von Seiten (deren Typ sie ja nicht kennt, da es ABLEITUNGEN
|* der SdrPage sind).
|*
\************************************************************************/
2010-10-05 07:57:51 -05:00
SdrPage* SdDrawDocument::AllocPage(bool bMasterPage)
2000-09-18 23:16:46 +00:00
{
2010-10-05 07:57:51 -05:00
return new SdPage(*this, NULL, bMasterPage);
2000-09-18 23:16:46 +00:00
}
/*************************************************************************
|*
|* SetChanged(), das Model wurde geaendert
|*
\************************************************************************/
void SdDrawDocument::SetChanged(sal_Bool bFlag)
2000-09-18 23:16:46 +00:00
{
if (mpDocSh)
2000-09-18 23:16:46 +00:00
{
if (mbNewOrLoadCompleted && mpDocSh->IsEnableSetModified())
2000-09-18 23:16:46 +00:00
{
// weitergeben an Basisklasse
FmFormModel::SetChanged(bFlag);
// an ObjectShell weiterleiten
mpDocSh->SetModified(bFlag);
2000-09-18 23:16:46 +00:00
}
}
else
{
// weitergeben an Basisklasse
FmFormModel::SetChanged(bFlag);
}
}
/*************************************************************************
|*
|* NbcSetChanged(), the model changed, don't call anybody else
|*
\************************************************************************/
void SdDrawDocument::NbcSetChanged(sal_Bool bFlag)
{
2011-02-07 22:11:09 +01:00
// forward to baseclass
FmFormModel::SetChanged(bFlag);
}
2000-09-18 23:16:46 +00:00
/*************************************************************************
|*
|* NewOrLoadCompleted
|*
|* Wird gerufen, wenn das Dokument geladen wurde bzw. feststeht, dass es
|* nicht mehr geladen wird.
|*
\************************************************************************/
void SdDrawDocument::NewOrLoadCompleted(DocCreationMode eMode)
{
if (eMode == NEW_DOC)
{
// Neues Dokument:
// Praesentations- und Standardvorlagen erzeugen,
// Pool fuer virtuelle Controls erzeugen
CreateLayoutTemplates();
CreateDefaultCellStyles();
2000-09-18 23:16:46 +00:00
static_cast< SdStyleSheetPool* >( mxStyleSheetPool.get() )->CreatePseudosIfNecessary();
2000-09-18 23:16:46 +00:00
}
else if (eMode == DOC_LOADED)
{
// Dokument wurde geladen:
2000-09-18 23:16:46 +00:00
2002-01-18 14:36:06 +00:00
CheckMasterPages();
2000-09-18 23:16:46 +00:00
if ( GetMasterSdPageCount(PK_STANDARD) > 1 )
RemoveUnnecessaryMasterPages( NULL, sal_True, sal_False );
2000-09-18 23:16:46 +00:00
for ( sal_uInt16 i = 0; i < GetPageCount(); i++ )
2000-09-18 23:16:46 +00:00
{
// Check for correct layout names
SdPage* pPage = (SdPage*) GetPage( i );
if(pPage->TRG_HasMasterPage())
2000-09-18 23:16:46 +00:00
{
SdPage& rMaster = (SdPage&)pPage->TRG_GetMasterPage();
if(rMaster.GetLayoutName() != pPage->GetLayoutName())
{
pPage->SetLayoutName(rMaster.GetLayoutName());
}
2000-09-18 23:16:46 +00:00
}
}
for ( sal_uInt16 nPage = 0; nPage < GetMasterPageCount(); nPage++)
2000-09-18 23:16:46 +00:00
{
// LayoutName and PageName must be the same
SdPage* pPage = (SdPage*) GetMasterPage( nPage );
2000-09-18 23:16:46 +00:00
String aName( pPage->GetLayoutName() );
aName.Erase( aName.SearchAscii( SD_LT_SEPARATOR ) );
if( aName != pPage->GetName() )
pPage->SetName( aName );
2000-09-18 23:16:46 +00:00
}
// Sprachabhaengige Namen der StandardLayer erzeugen
RestoreLayerNames();
// Sprachabhaengige Namen der Vorlagen setzen
static_cast<SdStyleSheetPool*>(mxStyleSheetPool.get())->UpdateStdNames();
2000-09-18 23:16:46 +00:00
// Ggf. fehlende Vorlagen erzeugen (es gab z.B. frueher keinen Subtitle)
static_cast<SdStyleSheetPool*>(mxStyleSheetPool.get())->CreatePseudosIfNecessary();
2000-09-18 23:16:46 +00:00
}
// Standardvorlage an der Drawing Engine setzen
String aName( SdResId(STR_STANDARD_STYLESHEET_NAME));
SetDefaultStyleSheet(static_cast<SfxStyleSheet*>(mxStyleSheetPool->Find(aName, SD_STYLE_FAMILY_GRAPHICS)));
2000-09-18 23:16:46 +00:00
// Draw-Outliner und Dokument Outliner initialisieren,
// aber nicht den globalen Outliner, den der ist ja nicht
// dokumentspezifisch wie StyleSheetPool und StyleRequestHandler
::Outliner& rDrawOutliner = GetDrawOutliner();
2000-09-18 23:16:46 +00:00
rDrawOutliner.SetStyleSheetPool((SfxStyleSheetPool*)GetStyleSheetPool());
sal_uLong nCntrl = rDrawOutliner.GetControlWord();
if (mbOnlineSpell)
2000-09-18 23:16:46 +00:00
nCntrl |= EE_CNTRL_ONLINESPELLING;
else
nCntrl &= ~EE_CNTRL_ONLINESPELLING;
rDrawOutliner.SetControlWord(nCntrl);
// HitTest-Outliner und Dokument Outliner initialisieren,
// aber nicht den globalen Outliner, den der ist ja nicht
// dokumentspezifisch wie StyleSheetPool und StyleRequestHandler
pHitTestOutliner->SetStyleSheetPool((SfxStyleSheetPool*)GetStyleSheetPool());
if(mpOutliner)
2000-09-18 23:16:46 +00:00
{
mpOutliner->SetStyleSheetPool((SfxStyleSheetPool*)GetStyleSheetPool());
2000-09-18 23:16:46 +00:00
}
if(mpInternalOutliner)
2000-09-18 23:16:46 +00:00
{
mpInternalOutliner->SetStyleSheetPool((SfxStyleSheetPool*)GetStyleSheetPool());
2000-09-18 23:16:46 +00:00
}
if ( eMode == DOC_LOADED )
{
// Praesentationsobjekte muessen wieder Listener der entsprechenden
// Vorlagen werden
SdStyleSheetPool* pSPool = (SdStyleSheetPool*) GetStyleSheetPool();
sal_uInt16 nPage, nPageCount;
2011-02-07 22:11:09 +01:00
// create missing layout style sheets for broken documents
// that where created with the 5.2
nPageCount = GetMasterSdPageCount( PK_STANDARD );
for (nPage = 0; nPage < nPageCount; nPage++)
{
SdPage* pPage = GetMasterSdPage(nPage, PK_STANDARD);
pSPool->CreateLayoutStyleSheets( pPage->GetName(), sal_True );
}
2000-09-18 23:16:46 +00:00
// Standard- und Notizseiten:
for (nPage = 0; nPage < GetPageCount(); nPage++)
2000-09-18 23:16:46 +00:00
{
SdPage* pPage = (SdPage*)GetPage(nPage);
NewOrLoadCompleted( pPage, pSPool );
}
2000-09-18 23:16:46 +00:00
// Masterpages:
for (nPage = 0; nPage < GetMasterPageCount(); nPage++)
{
SdPage* pPage = (SdPage*)GetMasterPage(nPage);
2000-09-18 23:16:46 +00:00
NewOrLoadCompleted( pPage, pSPool );
2000-09-18 23:16:46 +00:00
}
}
mbNewOrLoadCompleted = sal_True;
2000-09-18 23:16:46 +00:00
/**************************************************************************
* Alle gelinkten Pages aktualisieren
**************************************************************************/
SdPage* pPage = NULL;
sal_uInt16 nMaxSdPages = GetSdPageCount(PK_STANDARD);
2000-09-18 23:16:46 +00:00
for (sal_uInt16 nSdPage=0; nSdPage < nMaxSdPages; nSdPage++)
2000-09-18 23:16:46 +00:00
{
pPage = (SdPage*) GetSdPage(nSdPage, PK_STANDARD);
if (pPage && pPage->GetFileName().Len() && pPage->GetBookmarkName().Len())
{
pPage->SetModel(this);
}
}
2001-12-18 14:03:13 +00:00
UpdateAllLinks();
SetChanged( sal_False );
2001-12-18 14:03:13 +00:00
}
/** updates all links, only links in this document should by resolved */
void SdDrawDocument::UpdateAllLinks()
{
if ( !pDocLockedInsertingLinks && pLinkManager && !pLinkManager->GetLinks().empty() )
2000-09-18 23:16:46 +00:00
{
pDocLockedInsertingLinks = this; // lock inserting links. only links in this document should by resolved
pLinkManager->UpdateAllLinks(); // query box: update all links?
if( pDocLockedInsertingLinks == this )
pDocLockedInsertingLinks = NULL; // unlock inserting links
}
}
/** this loops over the presentation objectes of a page and repairs some new settings
from old binary files and resets all default strings for empty presentation objects.
*/
void SdDrawDocument::NewOrLoadCompleted( SdPage* pPage, SdStyleSheetPool* pSPool )
{
const sd::ShapeList& rPresentationShapes( pPage->GetPresentationShapeList() );
if(!rPresentationShapes.isEmpty())
{
// Listen mit Titel- und Gliederungsvorlagen erstellen
String aName = pPage->GetLayoutName();
aName.Erase( aName.SearchAscii( SD_LT_SEPARATOR ));
2011-03-04 21:49:59 -08:00
std::vector<SfxStyleSheetBase*> aOutlineList;
pSPool->CreateOutlineSheetList(aName,aOutlineList);
SfxStyleSheet* pTitleSheet = (SfxStyleSheet*)pSPool->GetTitleSheet(aName);
SdrObject* pObj = rPresentationShapes.getNextShape(0);
// jetzt nach Titel- und Gliederungstextobjekten suchen und
// Objekte zu Listenern machen
while(pObj)
{
if (pObj->GetObjInventor() == SdrInventor)
{
OutlinerParaObject* pOPO = pObj->GetOutlinerParaObject();
sal_uInt16 nId = pObj->GetObjIdentifier();
if (nId == OBJ_TITLETEXT)
{
if( pOPO && pOPO->GetOutlinerMode() == OUTLINERMODE_DONTKNOW )
pOPO->SetOutlinerMode( OUTLINERMODE_TITLEOBJECT );
// sal_True: harte Attribute dabei nicht loeschen
if (pTitleSheet)
pObj->SetStyleSheet(pTitleSheet, sal_True);
}
else if (nId == OBJ_OUTLINETEXT)
{
if( pOPO && pOPO->GetOutlinerMode() == OUTLINERMODE_DONTKNOW )
pOPO->SetOutlinerMode( OUTLINERMODE_OUTLINEOBJECT );
2011-03-04 21:49:59 -08:00
std::vector<SfxStyleSheetBase*>::iterator iter;
for (iter = aOutlineList.begin(); iter != aOutlineList.end(); ++iter)
{
SfxStyleSheet* pSheet = static_cast<SfxStyleSheet*>(*iter);
2011-03-04 21:49:59 -08:00
if (pSheet)
{
pObj->StartListening(*pSheet);
2011-03-04 21:49:59 -08:00
if( iter == aOutlineList.begin())
// Textrahmen hoert auf StyleSheet der Ebene1
pObj->NbcSetStyleSheet(pSheet, sal_True);
}
}
}
if (pObj->ISA(SdrTextObj) && pObj->IsEmptyPresObj() && pPage)
{
PresObjKind ePresObjKind = pPage->GetPresObjKind(pObj);
String aString( pPage->GetPresObjText(ePresObjKind) );
if (aString.Len())
{
sd::Outliner* pInternalOutl = GetInternalOutliner(sal_True);
pPage->SetObjText( (SdrTextObj*) pObj, pInternalOutl, ePresObjKind, aString );
pObj->NbcSetStyleSheet( pPage->GetStyleSheetForPresObj( ePresObjKind ), sal_True );
pInternalOutl->Clear();
}
}
}
pObj = rPresentationShapes.getNextShape(pObj);
}
}
}
2000-09-18 23:16:46 +00:00
/*************************************************************************
|*
|* Lokaler Outliner, welcher fuer den Gliederungsmodus verwendet wird
|* In diesen Outliner werden ggf. OutlinerViews inserted!
|*
\************************************************************************/
::sd::Outliner* SdDrawDocument::GetOutliner(sal_Bool bCreateOutliner)
2000-09-18 23:16:46 +00:00
{
if (!mpOutliner && bCreateOutliner)
2000-09-18 23:16:46 +00:00
{
mpOutliner = new ::sd::Outliner( this, OUTLINERMODE_TEXTOBJECT );
2000-09-18 23:16:46 +00:00
if (mpDocSh)
mpOutliner->SetRefDevice( SD_MOD()->GetRefDevice( *mpDocSh ) );
2002-07-26 07:32:44 +00:00
mpOutliner->SetDefTab( nDefaultTabulator );
mpOutliner->SetStyleSheetPool((SfxStyleSheetPool*)GetStyleSheetPool());
2000-09-18 23:16:46 +00:00
}
return(mpOutliner);
2000-09-18 23:16:46 +00:00
}
/*************************************************************************
|*
|* Interner Outliner, welcher fuer die Erzeugung von Textobjekten
|* verwendet wird.
|* In diesen Outliner werden keine OutlinerViews inserted!
|*
\************************************************************************/
::sd::Outliner* SdDrawDocument::GetInternalOutliner(sal_Bool bCreateOutliner)
2000-09-18 23:16:46 +00:00
{
if ( !mpInternalOutliner && bCreateOutliner )
2000-09-18 23:16:46 +00:00
{
mpInternalOutliner = new ::sd::Outliner( this, OUTLINERMODE_TEXTOBJECT );
2000-09-18 23:16:46 +00:00
// MT:
// Dieser Outliner wird nur fuer das Erzeugen spezieller Textobjekte
// verwendet. Da in diesen Textobjekten keine Portion-Informationen
// gespeichert werden muessen, kann/soll der Update-Mode immer sal_False bleiben.
mpInternalOutliner->SetUpdateMode( sal_False );
mpInternalOutliner->EnableUndo( sal_False );
2000-09-18 23:16:46 +00:00
if (mpDocSh)
mpInternalOutliner->SetRefDevice( SD_MOD()->GetRefDevice( *mpDocSh ) );
2002-07-26 07:32:44 +00:00
mpInternalOutliner->SetDefTab( nDefaultTabulator );
mpInternalOutliner->SetStyleSheetPool((SfxStyleSheetPool*)GetStyleSheetPool());
2000-09-18 23:16:46 +00:00
}
DBG_ASSERT( !mpInternalOutliner || ( mpInternalOutliner->GetUpdateMode() == sal_False ) , "InternalOutliner: UpdateMode = sal_True !" );
DBG_ASSERT( !mpInternalOutliner || ( mpInternalOutliner->IsUndoEnabled() == sal_False ), "InternalOutliner: Undo = sal_True !" );
2000-09-18 23:16:46 +00:00
// MT: Wer ihn vollmuellt, macht ihn auch gleich wieder leer:
// Vorteile:
// a) Keine unnoetigen Clear-Aufrufe
// b) Kein Muell im Speicher.
DBG_ASSERT( !mpInternalOutliner || ( ( mpInternalOutliner->GetParagraphCount() == 1 ) && ( mpInternalOutliner->GetText( mpInternalOutliner->GetParagraph( 0 ) ).Len() == 0 ) ), "InternalOutliner: Nicht leer!" );
2000-09-18 23:16:46 +00:00
return mpInternalOutliner;
2000-09-18 23:16:46 +00:00
}
/*************************************************************************
|*
|* OnlineSpelling ein/aus
|*
\************************************************************************/
void SdDrawDocument::SetOnlineSpell(sal_Bool bIn)
2000-09-18 23:16:46 +00:00
{
mbOnlineSpell = bIn;
sal_uLong nCntrl = 0;
2000-09-18 23:16:46 +00:00
if(mpOutliner)
2000-09-18 23:16:46 +00:00
{
nCntrl = mpOutliner->GetControlWord();
2000-09-18 23:16:46 +00:00
if(mbOnlineSpell)
2000-09-18 23:16:46 +00:00
nCntrl |= EE_CNTRL_ONLINESPELLING;
else
nCntrl &= ~EE_CNTRL_ONLINESPELLING;
mpOutliner->SetControlWord(nCntrl);
2000-09-18 23:16:46 +00:00
}
if (mpInternalOutliner)
2000-09-18 23:16:46 +00:00
{
nCntrl = mpInternalOutliner->GetControlWord();
2000-09-18 23:16:46 +00:00
if (mbOnlineSpell)
2000-09-18 23:16:46 +00:00
nCntrl |= EE_CNTRL_ONLINESPELLING;
else
nCntrl &= ~EE_CNTRL_ONLINESPELLING;
mpInternalOutliner->SetControlWord(nCntrl);
2000-09-18 23:16:46 +00:00
}
::Outliner& rOutliner = GetDrawOutliner();
2000-09-18 23:16:46 +00:00
nCntrl = rOutliner.GetControlWord();
if (mbOnlineSpell)
2000-09-18 23:16:46 +00:00
nCntrl |= EE_CNTRL_ONLINESPELLING;
else
nCntrl &= ~EE_CNTRL_ONLINESPELLING;
rOutliner.SetControlWord(nCntrl);
if (mbOnlineSpell)
2000-09-18 23:16:46 +00:00
{
StartOnlineSpelling();
}
else
{
StopOnlineSpelling();
}
}
/*************************************************************************
|*
|* OnlineSpelling: Markierung ein/aus
|*
\************************************************************************/
uno::Reference< uno::XInterface > SdDrawDocument::createUnoModel()
{
uno::Reference< uno::XInterface > xModel;
try
{
if ( mpDocSh )
xModel = mpDocSh->GetModel();
}
catch( uno::RuntimeException& )
{
}
2000-09-18 23:16:46 +00:00
return xModel;
}
SvxNumType SdDrawDocument::GetPageNumType() const
{
return mePageNumType;
}
void SdDrawDocument::SetPrinterIndependentLayout (sal_Int32 nMode)
{
switch (nMode)
{
case ::com::sun::star::document::PrinterIndependentLayout::DISABLED:
case ::com::sun::star::document::PrinterIndependentLayout::ENABLED:
// Just store supported modes and inform the doc shell.
mnPrinterIndependentLayout = nMode;
// Since it is possible that a SdDrawDocument is constructed without a
// SdDrawDocShell the pointer member mpDocSh needs to be tested
// before the call is executed. This is e.-g. used for copy/paste.
if(mpDocSh)
{
mpDocSh->UpdateRefDevice ();
}
break;
default:
// Ignore unknown values.
break;
}
}
sal_Int32 SdDrawDocument::GetPrinterIndependentLayout (void)
{
return mnPrinterIndependentLayout;
}
bool SdDrawDocument::IsStartWithPresentation() const
{
return mbStartWithPresentation;
}
void SdDrawDocument::SetStartWithPresentation( bool bStartWithPresentation )
{
mbStartWithPresentation = bStartWithPresentation;
}
void SdDrawDocument::PageListChanged()
{
mpDrawPageListWatcher->Invalidate();
}
void SdDrawDocument::MasterPageListChanged()
{
mpMasterPageListWatcher->Invalidate();
}
CWS-TOOLING: integrate CWS impressnotes01 2009-09-11 13:52:41 +0200 cl r276061 : CWS-TOOLING: rebase CWS impressnotes01 to trunk@276043 (milestone: DEV300:m58) 2009-09-10 15:44:57 +0200 cl r276039 : #i103139# continued work on the impress annotation feature 2009-09-10 14:52:31 +0200 cl r276032 : #i103139# continued work on the impress annotation feature 2009-09-10 14:50:32 +0200 cl r276031 : #i103139# continued work on the impress annotation feature 2009-09-10 14:48:29 +0200 cl r276030 : #i103139# continued work on the impress annotation feature 2009-09-10 11:36:11 +0200 cl r276027 : #i103139# continued work on the impress annotation feature 2009-09-09 20:22:41 +0200 cl r276018 : #i103139# continued work on the impress annotation feature 2009-09-09 20:21:45 +0200 cl r276017 : #i103139# continued work on the impress annotation feature 2009-09-09 19:32:29 +0200 sj r276015 : #i103139# added import of comments (ppt binary) 2009-09-09 19:31:07 +0200 sj r276014 : #i103139# added import of comments (ppt binary) 2009-09-09 19:16:41 +0200 cl r276011 : #i103139# continued work on the impress annotation feature 2009-09-09 19:15:19 +0200 cl r276010 : #i103139# continued work on the impress annotation feature 2009-09-09 16:27:19 +0200 cl r276001 : #i104579# fixed isEmptyPresObj() 2009-09-09 15:12:02 +0200 cl r275997 : #i103139# continued work on the impress annotation feature 2009-09-09 15:06:29 +0200 sj r275996 : #i103139# added import of comments (ppt binary) 2009-09-09 14:53:01 +0200 cl r275995 : #i103139# continued work on the impress annotation feature 2009-09-09 14:51:32 +0200 cl r275994 : #i103139# continued work on the impress annotation feature 2009-09-09 12:11:17 +0200 cl r275982 : #i103139# continued work on the impress annotation feature 2009-09-09 11:47:55 +0200 cl r275981 : #i103139# continued work on the impress annotation feature 2009-09-09 11:47:23 +0200 cl r275980 : #i103139# continued work on the impress annotation feature 2009-09-09 11:44:47 +0200 cl r275978 : #i104315# added missing tab pages 2009-09-08 16:04:44 +0200 cl r275936 : #i103139# continued work on the impress annotation feature 2009-09-08 16:03:28 +0200 cl r275935 : #i103139# continued work on the impress annotation feature 2009-09-08 11:45:47 +0200 cl r275920 : #i103139# continued work on the impress annotation feature 2009-09-08 11:41:51 +0200 cl r275919 : #i103139# continued work on the impress annotation feature 2009-09-07 18:30:55 +0200 cl r275910 : #i103139# continued work on the impress annotation feature 2009-09-07 18:29:37 +0200 cl r275909 : #i103139# continued work on the impress annotation feature 2009-09-07 17:25:43 +0200 cl r275905 : #i103139# continued work on the impress annotation feature 2009-09-07 12:00:28 +0200 cl r275884 : #i103139# continued work on the impress annotation feature 2009-09-06 14:14:00 +0200 cl r275859 : #i103139# continued work on the impress annotation feature 2009-09-05 20:57:24 +0200 cl r275854 : #i103139# continued work on the impress annotation feature 2009-09-05 20:56:29 +0200 cl r275853 : #i103139# continued work on the impress annotation feature 2009-09-05 20:55:27 +0200 cl r275852 : #i103139# continued work on the impress annotation feature 2009-09-05 20:11:42 +0200 cl r275851 : #i103139# continued work on the impress annotation feature 2009-09-05 20:11:09 +0200 cl r275850 : #i103139# continued work on the impress annotation feature 2009-09-05 17:43:33 +0200 cl r275845 : #i103139# continued work on the impress annotation feature 2009-09-05 17:04:41 +0200 cl r275843 : #i103139# continued work on the impress annotation feature 2009-09-05 17:03:26 +0200 cl r275842 : #i103139# continued work on the impress annotation feature 2009-09-05 17:02:53 +0200 cl r275841 : #i103139# continued work on the impress annotation feature 2009-09-05 13:15:04 +0200 pl r275839 : #i104823# WB_NEEDSFOCUS 2009-09-05 13:14:41 +0200 pl r275838 : #i104823# WB_NEEDSFOCUS 2009-09-04 17:48:21 +0200 cl r275826 : #i103139# continued work on the impress annotation feature 2009-09-04 17:35:03 +0200 cl r275825 : #i103139# continued work on the impress annotation feature 2009-09-04 17:15:46 +0200 cl r275824 : #i103139# continued work on the impress annotation feature 2009-09-04 17:12:54 +0200 cl r275823 : #i103139# continued work on the impress annotation feature 2009-09-04 17:05:23 +0200 cl r275822 : #i103139# continued work on the impress annotation feature 2009-09-04 16:48:28 +0200 cl r275820 : #i103139# continued work on the impress annotation feature 2009-09-04 16:44:02 +0200 cl r275818 : #i103139# continued work on the impress annotation feature 2009-09-04 16:43:23 +0200 cl r275817 : #i103139# continued work on the impress annotation feature 2009-09-04 16:06:04 +0200 cl r275812 : #i103139# continued work on the impress annotation feature 2009-09-04 16:05:45 +0200 cl r275811 : #i103139# continued work on the impress annotation feature 2009-09-04 15:04:33 +0200 cl r275806 : #i103139# continued work on the impress annotation feature 2009-09-04 11:43:14 +0200 cl r275795 : #i103139# continued work on the impress annotation feature 2009-09-04 11:27:10 +0200 cl r275793 : #i103139# continued work on the impress annotation feature 2009-09-04 11:10:02 +0200 cl r275792 : #i103139# continued work on the impress annotation feature 2009-09-04 11:07:05 +0200 cl r275790 : #i103139# continued work on the impress annotation feature 2009-09-04 11:05:01 +0200 cl r275789 : #i103139# continued work on the impress annotation feature 2009-09-04 10:55:51 +0200 cl r275785 : #i103139# renamed notes to comments 2009-09-04 10:54:57 +0200 cl r275784 : #i103139# renamed notes to comments 2009-09-03 20:37:35 +0200 cl r275772 : #i103139# continued work on the impress annotation feature 2009-09-03 20:35:31 +0200 cl r275771 : #i103139# continued work on the impress annotation feature 2009-09-01 18:17:55 +0200 cl r275680 : #i103139# continued work on the impress annotation feature 2009-09-01 18:15:08 +0200 cl r275678 : #i103139# continued work on the impress annotation feature 2009-09-01 18:13:38 +0200 cl r275677 : #i103139# continued work on the impress annotation feature 2009-08-18 12:35:42 +0200 cl r275089 : fixed merge error 2009-08-18 11:39:58 +0200 cl r275086 : CWS-TOOLING: rebase CWS impressnotes01 to trunk@275001 (milestone: DEV300:m55) 2009-07-30 13:45:10 +0200 cl r274481 : fixed merge errrors 2009-07-30 13:41:21 +0200 cl r274480 : fixed merge errrors 2009-07-30 13:39:40 +0200 cl r274478 : fixed merge errrors 2009-07-22 18:07:30 +0200 cl r274256 : CWS-TOOLING: rebase CWS impressnotes01 to trunk@273858 (milestone: DEV300:m52) 2009-07-21 17:21:31 +0200 cl r274208 : merging 2009-07-20 14:28:34 +0200 cl r274137 : #i103139# annotation support for impress 2009-07-20 14:28:04 +0200 cl r274136 : #i103139# annotation support for impress 2009-07-20 14:27:20 +0200 cl r274135 : #i103139# annotation support for impress 2009-07-20 14:21:17 +0200 cl r274134 : #i103139# annotation support for impress 2009-07-20 14:20:56 +0200 cl r274133 : #i103139# annotation support for impress 2009-07-20 14:20:09 +0200 cl r274132 : #i103139# annotation support for impress 2009-07-20 14:19:00 +0200 cl r274131 : #i103139# annotation support for impress 2009-07-20 14:17:50 +0200 cl r274130 : #i103139# annotation support for impress 2009-07-20 14:12:24 +0200 cl r274129 : #i103139# annotation support for impress 2009-07-20 13:52:03 +0200 cl r274128 : #i103139# annotation support for impress 2009-07-20 13:51:11 +0200 cl r274127 : #i103139# annotation support for impress 2009-07-20 13:48:59 +0200 cl r274126 : #i103139# annotation support for impress 2009-07-20 13:43:56 +0200 cl r274125 : #i103139# annotation support for impress 2009-07-20 13:31:55 +0200 cl r274123 : #i103139# annotation support for impress 2009-07-20 13:30:45 +0200 cl r274122 : #i103139# annotation support for impress
2009-09-16 13:55:36 +00:00
void SdDrawDocument::SetCalcFieldValueHdl(::Outliner* pOutliner)
{
pOutliner->SetCalcFieldValueHdl(LINK(SD_MOD(), SdModule, CalcFieldValueHdl));
}
sal_uInt16 SdDrawDocument::GetAnnotationAuthorIndex( const rtl::OUString& rAuthor )
{
// force current user to have first color
if( maAnnotationAuthors.empty() )
{
SvtUserOptions aUserOptions;
maAnnotationAuthors.push_back( aUserOptions.GetFullName() );
}
sal_uInt16 idx = 0;
for( std::vector< OUString >::iterator iter( maAnnotationAuthors.begin() ); iter != maAnnotationAuthors.end(); iter++ )
{
if( (*iter) == rAuthor )
{
break;
}
idx++;
}
if( idx == maAnnotationAuthors.size() )
{
maAnnotationAuthors.push_back( rAuthor );
}
return idx;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */