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

1122 lines
37 KiB
C++
Raw Normal View History

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* 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 23:16:46 +00:00
#include <libxml/xmlwriter.h>
#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 <com/sun/star/beans/XPropertyContainer.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/document/XDocumentProperties.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/configmgr.hxx>
#include <unotools/useroptions.hxx>
#include <officecfg/Office/Impress.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"
#include "sdmod.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/bulletitem.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 <comphelper/getexpandeduri.hxx>
#include <i18nlangtag/mslangid.hxx>
#include <i18nlangtag/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>
#include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/xml/dom/XDocumentBuilder.hpp>
#include <com/sun/star/xml/dom/XDocument.hpp>
#include <com/sun/star/xml/dom/XNode.hpp>
#include <com/sun/star/xml/dom/XNodeList.hpp>
#include <com/sun/star/xml/dom/XNamedNodeMap.hpp>
#include <com/sun/star/xml/dom/DocumentBuilder.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <rtl/ustring.hxx>
#include <rtl/uri.hxx>
2000-10-25 09:34:04 +00:00
#include <editeng/outliner.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 "DrawDocShell.hxx"
#include "GraphicDocShell.hxx"
#include "sdxfer.hxx"
#include "ViewShell.hxx"
#include "optsitem.hxx"
#include "FrameView.hxx"
#include <undo/undomanager.hxx>
2000-09-18 23:16:46 +00:00
#include <tools/tenccvt.hxx>
#include <vcl/settings.hxx>
#include <comphelper/lok.hxx>
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
using namespace com::sun::star::xml::dom;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::lang::XMultiServiceFactory;
2000-09-18 23:16:46 +00:00
SdDrawDocument* SdDrawDocument::s_pDocLockedInsertingLinks = nullptr;
2000-09-18 23:16:46 +00:00
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 )
{
}
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 )
{
}
SdDrawDocument::SdDrawDocument(DocumentType eType, SfxObjectShell* pDrDocSh)
: FmFormModel( !utl::ConfigManager::IsAvoidConfig() ? SvtPathOptions().GetPalettePath() : OUString(), nullptr, pDrDocSh )
, mpOutliner(nullptr)
, mpInternalOutliner(nullptr)
, mpWorkStartupTimer(nullptr)
, mpOnlineSpellingIdle(nullptr)
, mpOnlineSpellingList(nullptr)
, mpOnlineSearchItem(nullptr)
, mpCustomShowList(nullptr)
, mpDocSh(static_cast< ::sd::DrawDocShell*>(pDrDocSh))
, mpCreatingTransferable( nullptr )
, mbHasOnlineSpellErrors(false)
, mbInitialOnlineSpellingEnabled(true)
, mbNewOrLoadCompleted(false)
, mbOnlineSpell(false)
, mbStartWithPresentation( false )
, mbExitAfterPresenting( false )
, meLanguage( LANGUAGE_SYSTEM )
, meLanguageCJK( LANGUAGE_SYSTEM )
, meLanguageCTL( LANGUAGE_SYSTEM )
Fix "ubsan: 9 is not a valid value for type ´SvxNumType´" once again ...after 1658bd231bc662504a072097dc614c29fe2e116d "loplugin:unusedenumvalues" broke it again after 992fba98f4d0b6ff0d20c15b0ddff09edd37847c "ubsan: 9 is not a valid value for type ´SvxNumType´" had fixed it the last time. This time, acknowledge that SvxNumType can apparently take on rather arbitrary sal_Int16 values from the css::style::NumberingTypes constants, and make it an alias for sal_Int16 (whether or not keeping such a trivial alias is good or bad overall). Or is the bug elsewhere, and values of type SvxNumType should really only take on the restricted set of values originally encoded by the enum? At least the below UBSan backtrace (from CppunitTest_sw_rtfexport) suggests otherwise, but then again there's also an SvxExtNumType enum (include/editeng/svxenum.hxx), encompassing more parts of css::style::NumberingTypes. Oh, my. > svx/source/items/pageitem.cxx:49:25: runtime error: load of value 9, which is not a valid value for type 'SvxNumType' > #0 0x2aafdaebe669 in SvxPageItem::SvxPageItem(SvxPageItem const&) svx/source/items/pageitem.cxx:49:25 > #1 0x2aafdaebf194 in SvxPageItem::Clone(SfxItemPool*) const svx/source/items/pageitem.cxx:59:16 > #2 0x2aaf7fab9b7c in SfxItemPool::Put(SfxPoolItem const&, unsigned short) svl/source/items/itempool.cxx:632:40 > #3 0x2aaf7fc4794a in SfxItemSet::Put(SfxPoolItem const&, unsigned short) svl/source/items/itemset.cxx:467:56 > #4 0x2aaf7fb96635 in SfxItemSet::Put(SfxPoolItem const&) include/svl/itemset.hxx:131:42 > #5 0x2aaf7fb89539 in SfxItemPropertySet::setPropertyValue(SfxItemPropertySimpleEntry const&, com::sun::star::uno::Any const&, SfxItemSet&) const svl/source/items/itemprop.cxx:256:14 > #6 0x2aaf9ef1a5d4 in void SwXStyle::SetPropertyValue<(unsigned short)1>(SfxItemPropertySimpleEntry const&, SfxItemPropertySet const&, com::sun::star::uno::Any const&, SwStyleBase_Impl&) sw/source/core/unocore/unostyle.cxx:1596:14 > #7 0x2aaf9ef3c72f in SwXStyle::SetStyleProperty(SfxItemPropertySimpleEntry const&, SfxItemPropertySet const&, com::sun::star::uno::Any const&, SwStyleBase_Impl&) sw/source/core/unocore/unostyle.cxx:2013:9 > #8 0x2aaf9ef8103d in SwXPageStyle::SetPropertyValues_Impl(com::sun::star::uno::Sequence<rtl::OUString> const&, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&) sw/source/core/unocore/unostyle.cxx:3025:17 > #9 0x2aaf9ef821ee in SwXPageStyle::setPropertyValues(com::sun::star::uno::Sequence<rtl::OUString> const&, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&) sw/source/core/unocore/unostyle.cxx:3053:9 > #10 0x2ab00730d08b in writerfilter::dmapper::SectionPropertyMap::ApplyProperties_(com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet> const&) writerfilter/source/dmapper/PropertyMap.cxx:1489:24 > #11 0x2ab00731cede in writerfilter::dmapper::SectionPropertyMap::CloseSectionGroup(writerfilter::dmapper::DomainMapper_Impl&) writerfilter/source/dmapper/PropertyMap.cxx:1331:13 > #12 0x2ab006b9ede2 in writerfilter::dmapper::DomainMapper::lcl_endSectionGroup() writerfilter/source/dmapper/DomainMapper.cxx:2823:30 > #13 0x2ab0071db9f9 in writerfilter::LoggedStream::endSectionGroup() writerfilter/source/dmapper/LoggedResources.cxx:101:5 > #14 0x2ab006712a3b in writerfilter::rtftok::RTFDocumentImpl::sectBreak(bool) writerfilter/source/rtftok/rtfdocumentimpl.cxx:633:18 > #15 0x2ab0067a8c13 in writerfilter::rtftok::RTFDocumentImpl::popState() writerfilter/source/rtftok/rtfdocumentimpl.cxx:2789:13 > #16 0x2ab006a26134 in writerfilter::rtftok::RTFTokenizer::resolveParse() writerfilter/source/rtftok/rtftokenizer.cxx:105:33 > #17 0x2ab0067194f9 in writerfilter::rtftok::RTFDocumentImpl::resolve(writerfilter::Stream&) writerfilter/source/rtftok/rtfdocumentimpl.cxx:740:27 > #18 0x2ab0075ebae7 in RtfFilter::filter(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) writerfilter/source/filter/RtfFilter.cxx:147:20 > #19 0x2aafcf2873a5 in SfxObjectShell::ImportFrom(SfxMedium&, com::sun::star::uno::Reference<com::sun::star::text::XTextRange> const&) sfx2/source/doc/objstor.cxx:2261:30 > #20 0x2aafcf22d4d2 in SfxObjectShell::DoLoad(SfxMedium*) sfx2/source/doc/objstor.cxx:764:23 > #21 0x2aafcf4a4d09 in SfxBaseModel::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) sfx2/source/doc/sfxbasemodel.cxx:1841:36 > #22 0x2aafcfde31b3 in (anonymous namespace)::SfxFrameLoader_Impl::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&) sfx2/source/view/frmload.cxx:698:28 > #23 0x2aaffef07028 in framework::LoadEnv::impl_loadContent() framework/source/loadenv/loadenv.cxx:1110:37 > #24 0x2aaffeeead5a in framework::LoadEnv::startLoading() framework/source/loadenv/loadenv.cxx:379:20 > #25 0x2aaffeee3919 in framework::LoadEnv::loadComponentFromURL(com::sun::star::uno::Reference<com::sun::star::frame::XComponentLoader> const&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) framework/source/loadenv/loadenv.cxx:165:14 > #26 0x2aafff10ddac in framework::Desktop::loadComponentFromURL(rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) framework/source/services/desktop.cxx:596:12 > #27 0x2aafff10e11a in non-virtual thunk to framework::Desktop::loadComponentFromURL(rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) framework/source/services/desktop.cxx:582:64 > #28 0x2aafab4c3938 in unotest::MacrosTest::loadFromDesktop(rtl::OUString const&, rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) unotest/source/cpp/macros_test.cxx:50:60 > #29 0x2aaf90aee900 in SwModelTestBase::loadURL(rtl::OUString const&, char const*) sw/qa/extras/inc/swmodeltestbase.hxx:621:23 > #30 0x2aaf90aed267 in SwModelTestBase::load(char const*, char const*) sw/qa/extras/inc/swmodeltestbase.hxx:610:16 > #31 0x2aaf90aec404 in SwModelTestBase::executeImportTest(char const*) sw/qa/extras/inc/swmodeltestbase.hxx:222:13 > #32 0x2aaf90cf4d31 in testTdf65642::Import() sw/qa/extras/rtfexport/rtfexport.cxx:1013:1 > #33 0x2aaf90cf62af in CppUnit::TestCaller<testTdf65642>::runTest() workdir/UnpackedTarball/cppunit/include/cppunit/TestCaller.h:166:6 > #34 0x2aaf4ee5d7dd in CppUnit::TestCaseMethodFunctor::operator()() const workdir/UnpackedTarball/cppunit/src/cppunit/TestCase.cpp:32:5 > #35 0x2aaf680c4cd6 in (anonymous namespace)::Protector::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) test/source/vclbootstrapprotector.cxx:36:14 > #36 0x2aaf4ee17a87 in CppUnit::ProtectorChain::ProtectFunctor::operator()() const workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20:25 > #37 0x2aaf5ea4a8a6 in (anonymous namespace)::Prot::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) unotest/source/cpp/unobootstrapprotector/unobootstrapprotector.cxx:89:12 > #38 0x2aaf4ee17a87 in CppUnit::ProtectorChain::ProtectFunctor::operator()() const workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20:25 > #39 0x2aaf5abd5ef4 in (anonymous namespace)::Prot::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) unotest/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx:65:16 > #40 0x2aaf4ee17a87 in CppUnit::ProtectorChain::ProtectFunctor::operator()() const workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20:25 > #41 0x2aaf4ed8c2ef in CppUnit::DefaultProtector::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) workdir/UnpackedTarball/cppunit/src/cppunit/DefaultProtector.cpp:15:12 > #42 0x2aaf4ee17a87 in CppUnit::ProtectorChain::ProtectFunctor::operator()() const workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20:25 > #43 0x2aaf4ee14101 in CppUnit::ProtectorChain::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:77:18 > #44 0x2aaf4eede065 in CppUnit::TestResult::protect(CppUnit::Functor const&, CppUnit::Test*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) workdir/UnpackedTarball/cppunit/src/cppunit/TestResult.cpp:181:28 > #45 0x2aaf4ee5a929 in CppUnit::TestCase::run(CppUnit::TestResult*) workdir/UnpackedTarball/cppunit/src/cppunit/TestCase.cpp:91:13 > #46 0x2aaf4ee60ad3 in CppUnit::TestComposite::doRunChildTests(CppUnit::TestResult*) workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:64:30 > #47 0x2aaf4ee5fa3d in CppUnit::TestComposite::run(CppUnit::TestResult*) workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:23:3 > #48 0x2aaf4ee60ad3 in CppUnit::TestComposite::doRunChildTests(CppUnit::TestResult*) workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:64:30 > #49 0x2aaf4ee5fa3d in CppUnit::TestComposite::run(CppUnit::TestResult*) workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:23:3 > #50 0x2aaf4ef1eeb6 in CppUnit::TestRunner::WrappingSuite::run(CppUnit::TestResult*) workdir/UnpackedTarball/cppunit/src/cppunit/TestRunner.cpp:47:27 > #51 0x2aaf4eedbe79 in CppUnit::TestResult::runTest(CppUnit::Test*) workdir/UnpackedTarball/cppunit/src/cppunit/TestResult.cpp:148:9 > #52 0x2aaf4ef20440 in CppUnit::TestRunner::run(CppUnit::TestResult&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) workdir/UnpackedTarball/cppunit/src/cppunit/TestRunner.cpp:96:14 > #53 0x52b642 in (anonymous namespace)::ProtectedFixtureFunctor::run() const sal/cppunittester/cppunittester.cxx:305:20 > #54 0x52604d in sal_main() sal/cppunittester/cppunittester.cxx:455:20 > #55 0x524192 in main sal/cppunittester/cppunittester.cxx:362:1 > #56 0x2aaf50b3c730 in __libc_start_main (/lib64/libc.so.6+0x20730) > #57 0x437658 in _start (workdir/LinkTarget/Executable/cppunittester+0x437658) Change-Id: Id170860cbff9f4cae5c87cb5cfc70ffe3bc8c9c5
2016-09-20 16:45:47 +02:00
, mePageNumType(css::style::NumberingType::ARABIC)
, mbAllocDocSh(false)
, meDocType(eType)
, mpCharClass(nullptr)
, mpLocale(nullptr)
, mbUseEmbedFonts(false)
2000-09-18 23:16:46 +00:00
{
mpDrawPageListWatcher.reset(new ImpDrawPageListWatcher(*this));
mpMasterPageListWatcher.reset(new ImpMasterPageListWatcher(*this));
InitLayoutVector();
InitObjectVector();
SetObjectShell(pDrDocSh); // for VCDrawModel
2000-09-18 23:16:46 +00:00
if (mpDocSh)
2000-09-18 23:16:46 +00:00
{
SetSwapGraphics();
2000-09-18 23:16:46 +00:00
}
// Set measuring unit (of the application) and scale (of SdMod)
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 == DocumentType::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(MapUnit::Map100thMM);
SetScaleFraction(Fraction(1, 1));
2000-09-18 23:16:46 +00:00
SetDefaultFontHeight(847); // 24p
pItemPool->SetDefaultMetric(MapUnit::Map100thMM);
2000-09-18 23:16:46 +00:00
pItemPool->FreezeIdRanges();
SetTextDefaults();
2000-09-18 23:16:46 +00:00
// DrawingEngine has to know where it is...
2000-09-18 23:16:46 +00:00
FmFormModel::SetStyleSheetPool( new SdStyleSheetPool( GetPool(), this ) );
// Set StyleSheetPool for DrawOutliner, so text objects can be read correctly.
// The link to the StyleRequest handler of the document is set later, in
// NewOrLoadCompleted, because only then do all the templates exist.
2001-02-09 12:01:31 +00:00
SdrOutliner& rOutliner = GetDrawOutliner();
rOutliner.SetStyleSheetPool(static_cast<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
if (!utl::ConfigManager::IsAvoidConfig())
2000-09-18 23:16:46 +00:00
{
const SvtLinguConfig aLinguConfig;
SvtLinguOptions aOptions;
aLinguConfig.GetOptions( aOptions );
SetLanguage( MsLangId::resolveSystemLanguageByScriptType(aOptions.nDefaultLanguage,
css::i18n::ScriptType::LATIN), EE_CHAR_LANGUAGE );
SetLanguage( MsLangId::resolveSystemLanguageByScriptType(aOptions.nDefaultLanguage_CJK,
css::i18n::ScriptType::ASIAN), EE_CHAR_LANGUAGE_CJK );
SetLanguage( MsLangId::resolveSystemLanguageByScriptType(aOptions.nDefaultLanguage_CTL,
css::i18n::ScriptType::COMPLEX), EE_CHAR_LANGUAGE_CTL );
if (!comphelper::LibreOfficeKit::isActive())
mbOnlineSpell = aOptions.bIsSpellAuto;
2000-09-18 23:16:46 +00:00
}
LanguageType eRealLanguage = MsLangId::getRealLanguage( meLanguage );
LanguageTag aLanguageTag( eRealLanguage);
mpLocale = new css::lang::Locale( aLanguageTag.getLocale());
mpCharClass = new CharClass( aLanguageTag );
2000-09-18 23:16:46 +00:00
// If the current application language is a language that uses right-to-left text...
LanguageType eRealCTLLanguage = Application::GetSettings().GetLanguageTag().getLanguageType();
// 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( false, EE_PARA_ASIANCJKSPACING ) );
}
// Set DefTab and SpellOptions for the SD module
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().GetLanguageTag().getLanguageType() );
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
EEControlBits nCntrl = rOutliner.GetControlWord();
nCntrl |= EEControlBits::ALLOWBIGOBJS;
2001-02-09 12:01:31 +00:00
if (mbOnlineSpell)
nCntrl |= EEControlBits::ONLINESPELLING;
2001-02-09 12:01:31 +00:00
else
nCntrl &= ~EEControlBits::ONLINESPELLING;
2001-02-09 12:01:31 +00:00
nCntrl &= ~ EEControlBits::ULSPACESUMMATION;
if ( meDocType != DocumentType::Impress )
SetSummationOfParagraphs( false );
else
{
SetSummationOfParagraphs( pOptions->IsSummationOfParagraphs() );
if ( pOptions->IsSummationOfParagraphs() )
nCntrl |= EEControlBits::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
// Set the StyleSheetPool for HitTestOutliner.
// The link to the StyleRequest handler of the document is set later, in
// NewOrLoadCompleted, because only then do all the templates exist.
2000-09-18 23:16:46 +00:00
SfxItemSet aSet2( pHitTestOutliner->GetEmptyItemSet() );
pHitTestOutliner->SetStyleSheetPool( static_cast<SfxStyleSheetPool*>(GetStyleSheetPool()) );
2000-09-18 23:16:46 +00:00
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().GetLanguageTag().getLanguageType() );
2000-09-18 23:16:46 +00:00
EEControlBits nCntrl2 = pHitTestOutliner->GetControlWord();
nCntrl2 |= EEControlBits::ALLOWBIGOBJS;
nCntrl2 &= ~EEControlBits::ONLINESPELLING;
nCntrl2 &= ~ EEControlBits::ULSPACESUMMATION;
if ( pOptions->IsSummationOfParagraphs() )
nCntrl2 |= EEControlBits::ULSPACESUMMATION;
2000-09-18 23:16:46 +00:00
pHitTestOutliner->SetControlWord( nCntrl2 );
/** Create layers
*
* We create the following default layers on all pages and master pages:
*
* STR_LAYOUT : default layer for drawing objects
*
* STR_BCKGRND : background of the master page
* (currently unused within normal pages)
*
* STR_BCKGRNDOBJ: objects on the background of master pages
* (currently unused within normal pages)
*
* STR_CONTROLS : default layer for controls
*/
2000-09-18 23:16:46 +00:00
{
OUString aControlLayerName( SD_RESSTR(STR_LAYER_CONTROLS) );
2000-09-18 23:16:46 +00:00
SdrLayerAdmin& rLayerAdmin = GetLayerAdmin();
rLayerAdmin.NewLayer( SD_RESSTR(STR_LAYER_LAYOUT) );
rLayerAdmin.NewLayer( SD_RESSTR(STR_LAYER_BCKGRND) );
rLayerAdmin.NewLayer( SD_RESSTR(STR_LAYER_BCKGRNDOBJ) );
2000-09-18 23:16:46 +00:00
rLayerAdmin.NewLayer( aControlLayerName );
rLayerAdmin.NewLayer( SD_RESSTR(STR_LAYER_MEASURELINES) );
2000-09-18 23:16:46 +00:00
rLayerAdmin.SetControlLayerName(aControlLayerName);
}
}
// Destructor
SdDrawDocument::~SdDrawDocument()
2000-09-18 23:16:46 +00:00
{
Broadcast(SdrHint(SdrHintKind::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 = nullptr;
2000-09-18 23:16:46 +00:00
}
StopOnlineSpelling();
delete mpOnlineSearchItem;
mpOnlineSearchItem = nullptr;
2000-09-18 23:16:46 +00:00
CloseBookmarkDoc();
SetAllocDocSh(false);
2000-09-18 23:16:46 +00:00
ClearModel(true);
2000-09-18 23:16:46 +00:00
if (pLinkManager)
{
// Release BaseLinks
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 = nullptr;
2000-09-18 23:16:46 +00:00
}
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
{
// If necessary, delete CustomShows
SdCustomShow* pCustomShow = (*mpCustomShowList)[j];
2000-09-18 23:16:46 +00:00
delete pCustomShow;
}
delete mpCustomShowList;
mpCustomShowList = nullptr;
2000-09-18 23:16:46 +00:00
}
delete mpOutliner;
mpOutliner = nullptr;
2000-09-18 23:16:46 +00:00
delete mpInternalOutliner;
mpInternalOutliner = nullptr;
2000-09-18 23:16:46 +00:00
delete mpLocale;
mpLocale = nullptr;
2000-09-18 23:16:46 +00:00
delete mpCharClass;
mpCharClass = nullptr;
2000-09-18 23:16:46 +00:00
}
SdrModel* SdDrawDocument::AllocModel() const
{
return AllocSdDrawDocument();
}
namespace
{
/// Copies all user-defined properties from pSource to pDestination.
void lcl_copyUserDefinedProperties(SfxObjectShell* pSource, SfxObjectShell* pDestination)
{
if (!pSource || !pDestination)
return;
uno::Reference<document::XDocumentProperties> xSource = pSource->getDocProperties();
uno::Reference<document::XDocumentProperties> xDestination = pDestination->getDocProperties();
uno::Reference<beans::XPropertyContainer> xSourcePropertyContainer = xSource->getUserDefinedProperties();
uno::Reference<beans::XPropertyContainer> xDestinationPropertyContainer = xDestination->getUserDefinedProperties();
uno::Reference<beans::XPropertySet> xSourcePropertySet(xSourcePropertyContainer, uno::UNO_QUERY);
uno::Sequence<beans::Property> aProperties = xSourcePropertySet->getPropertySetInfo()->getProperties();
for (const beans::Property& rProperty : aProperties)
{
const OUString& rKey = rProperty.Name;
uno::Any aValue = xSourcePropertySet->getPropertyValue(rKey);
// We know that pDestination was just created, so has no properties: addProperty() will never throw.
xDestinationPropertyContainer->addProperty(rKey, beans::PropertyAttribute::REMOVABLE, aValue);
}
}
}
// This method creates a new document (SdDrawDocument) and returns a pointer to
// said document. The drawing engine uses this method to put the document (or
// parts of it) into the clipboard/DragServer.
SdDrawDocument* SdDrawDocument::AllocSdDrawDocument() const
2000-09-18 23:16:46 +00:00
{
SdDrawDocument* pNewModel = nullptr;
2000-09-18 23:16:46 +00:00
if( mpCreatingTransferable )
2000-09-18 23:16:46 +00:00
{
// Document is created for drag & drop/clipboard. To be able to
// do this, the document has to know a DocShell (SvPersist).
SfxObjectShell* pObj = nullptr;
::sd::DrawDocShell* pNewDocSh = nullptr;
2000-09-18 23:16:46 +00:00
if( meDocType == DocumentType::Impress )
mpCreatingTransferable->SetDocShell( new ::sd::DrawDocShell(
SfxObjectCreateMode::EMBEDDED, true, meDocType ) );
else
mpCreatingTransferable->SetDocShell( new ::sd::GraphicDocShell(
SfxObjectCreateMode::EMBEDDED, true, meDocType ) );
2000-09-18 23:16:46 +00:00
pNewDocSh = static_cast< ::sd::DrawDocShell*>( pObj = mpCreatingTransferable->GetDocShell().get() );
pNewDocSh->DoInitNew();
2000-09-18 23:16:46 +00:00
pNewModel = pNewDocSh->GetDoc();
// Only necessary for clipboard -
// for drag & drop this is handled by DragServer
SdStyleSheetPool* pOldStylePool = static_cast<SdStyleSheetPool*>( GetStyleSheetPool() );
SdStyleSheetPool* pNewStylePool = static_cast<SdStyleSheetPool*>( pNewModel->GetStyleSheetPool() );
2000-09-18 23:16:46 +00:00
pNewStylePool->CopyGraphicSheets(*pOldStylePool);
pNewStylePool->CopyCellSheets(*pOldStylePool);
pNewStylePool->CopyTableStyles(*pOldStylePool);
for (sal_uInt16 i = 0; i < GetMasterSdPageCount(PageKind::Standard); i++)
2000-09-18 23:16:46 +00:00
{
// Move with all of the master page's layouts
OUString aOldLayoutName(const_cast<SdDrawDocument*>(this)->GetMasterSdPage(i, PageKind::Standard)->GetLayoutName());
aOldLayoutName = aOldLayoutName.copy( 0, aOldLayoutName.indexOf( SD_LT_SEPARATOR ) );
SdStyleSheetVector aCreatedSheets;
pNewStylePool->CopyLayoutSheets(aOldLayoutName, *pOldStylePool, aCreatedSheets );
2000-09-18 23:16:46 +00:00
}
lcl_copyUserDefinedProperties(GetDocSh(), pNewDocSh);
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
{
// Create a DocShell which is then returned with GetAllocedDocSh()
SdDrawDocument* pDoc = const_cast<SdDrawDocument*>(this);
pDoc->SetAllocDocSh(false);
pDoc->mxAllocedDocShRef = new ::sd::DrawDocShell(
SfxObjectCreateMode::EMBEDDED, true, meDocType);
pDoc->mxAllocedDocShRef->DoInitNew();
pNewModel = pDoc->mxAllocedDocShRef->GetDoc();
2000-09-18 23:16:46 +00:00
}
else
{
pNewModel = new SdDrawDocument(meDocType, nullptr);
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
}
SdPage* SdDrawDocument::AllocSdPage(bool bMasterPage)
{
return new SdPage(*this, bMasterPage);
}
// This method creates a new page (SdPage) and returns a pointer to said page.
// The drawing engine uses this method to create pages (whose types it does
// not know, as they are _derivatives_ of SdrPage) when loading.
2010-10-05 07:57:51 -05:00
SdrPage* SdDrawDocument::AllocPage(bool bMasterPage)
2000-09-18 23:16:46 +00:00
{
return AllocSdPage(bMasterPage);
2000-09-18 23:16:46 +00:00
}
// When the model has changed
void SdDrawDocument::SetChanged(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
{
// Pass on to base class
2000-09-18 23:16:46 +00:00
FmFormModel::SetChanged(bFlag);
// Forward to ObjectShell
mpDocSh->SetModified(bFlag);
2000-09-18 23:16:46 +00:00
}
}
else
{
// Pass on to base class
2000-09-18 23:16:46 +00:00
FmFormModel::SetChanged(bFlag);
}
}
// The model changed, don't call anything else
void SdDrawDocument::NbcSetChanged(bool bFlag)
{
2011-02-07 22:11:09 +01:00
// forward to baseclass
FmFormModel::SetChanged(bFlag);
}
// NewOrLoadCompleted is called when the document is loaded, or when it is clear
// it won't load any more.
2000-09-18 23:16:46 +00:00
void SdDrawDocument::NewOrLoadCompleted(DocCreationMode eMode)
{
if (eMode == NEW_DOC)
{
// New document:
// create slideshow and default templates,
// create pool for virtual controls
2000-09-18 23:16:46 +00:00
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)
{
// Document has finished loading
2000-09-18 23:16:46 +00:00
2002-01-18 14:36:06 +00:00
CheckMasterPages();
if ( GetMasterSdPageCount(PageKind::Standard) > 1 )
RemoveUnnecessaryMasterPages( nullptr, true, 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 = static_cast<SdPage*>( GetPage( i ) );
if(pPage->TRG_HasMasterPage())
2000-09-18 23:16:46 +00:00
{
SdPage& rMaster = static_cast<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 = static_cast<SdPage*>( GetMasterPage( nPage ) );
2000-09-18 23:16:46 +00:00
OUString aName( pPage->GetLayoutName() );
aName = aName.copy( 0, aName.indexOf( SD_LT_SEPARATOR ) );
if( aName != pPage->GetName() )
pPage->SetName( aName );
2000-09-18 23:16:46 +00:00
}
// Create names of the default layers in the user's language
2000-09-18 23:16:46 +00:00
RestoreLayerNames();
// Create names of the styles in the user's language
static_cast<SdStyleSheetPool*>(mxStyleSheetPool.get())->UpdateStdNames();
2000-09-18 23:16:46 +00:00
// Create any missing styles - eg. formerly, there was no Subtitle style
static_cast<SdStyleSheetPool*>(mxStyleSheetPool.get())->CreatePseudosIfNecessary();
2000-09-18 23:16:46 +00:00
}
// Set default style of Drawing Engine
OUString aName( SD_RESSTR(STR_STANDARD_STYLESHEET_NAME));
SetDefaultStyleSheet(static_cast<SfxStyleSheet*>(mxStyleSheetPool->Find(aName, SD_STYLE_FAMILY_GRAPHICS)));
2000-09-18 23:16:46 +00:00
// #i119287# Set default StyleSheet for SdrGrafObj and SdrOle2Obj
SetDefaultStyleSheetForSdrGrafObjAndSdrOle2Obj(static_cast<SfxStyleSheet*>(mxStyleSheetPool->Find(SD_RESSTR(STR_POOLSHEET_OBJNOLINENOFILL), SD_STYLE_FAMILY_GRAPHICS)));
// Initialize DrawOutliner and DocumentOutliner, but don't initialize the
// global outliner, as it is not document specific like StyleSheetPool and
// StyleRequestHandler are.
::Outliner& rDrawOutliner = GetDrawOutliner();
rDrawOutliner.SetStyleSheetPool(static_cast<SfxStyleSheetPool*>(GetStyleSheetPool()));
EEControlBits nCntrl = rDrawOutliner.GetControlWord();
if (mbOnlineSpell)
nCntrl |= EEControlBits::ONLINESPELLING;
2000-09-18 23:16:46 +00:00
else
nCntrl &= ~EEControlBits::ONLINESPELLING;
2000-09-18 23:16:46 +00:00
rDrawOutliner.SetControlWord(nCntrl);
// Initialize HitTestOutliner and DocumentOutliner, but don't initialize the
// global outliner, as it is not document specific like StyleSheetPool and
// StyleRequestHandler are.
pHitTestOutliner->SetStyleSheetPool(static_cast<SfxStyleSheetPool*>(GetStyleSheetPool()));
2000-09-18 23:16:46 +00:00
if(mpOutliner)
2000-09-18 23:16:46 +00:00
{
mpOutliner->SetStyleSheetPool(static_cast<SfxStyleSheetPool*>(GetStyleSheetPool()));
2000-09-18 23:16:46 +00:00
}
if(mpInternalOutliner)
2000-09-18 23:16:46 +00:00
{
mpInternalOutliner->SetStyleSheetPool(static_cast<SfxStyleSheetPool*>(GetStyleSheetPool()));
2000-09-18 23:16:46 +00:00
}
if ( eMode == DOC_LOADED )
{
// Make presentation objects listeners of the appropriate styles
SdStyleSheetPool* pSPool = static_cast<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( PageKind::Standard );
for (nPage = 0; nPage < nPageCount; nPage++)
{
SdPage* pPage = GetMasterSdPage(nPage, PageKind::Standard);
pSPool->CreateLayoutStyleSheets( pPage->GetName(), true );
}
2000-09-18 23:16:46 +00:00
// Default and notes pages:
for (nPage = 0; nPage < GetPageCount(); nPage++)
2000-09-18 23:16:46 +00:00
{
SdPage* pPage = static_cast<SdPage*>(GetPage(nPage));
NewOrLoadCompleted( pPage, pSPool );
}
2000-09-18 23:16:46 +00:00
// Master pages:
for (nPage = 0; nPage < GetMasterPageCount(); nPage++)
{
SdPage* pPage = static_cast<SdPage*>(GetMasterPage(nPage));
2000-09-18 23:16:46 +00:00
NewOrLoadCompleted( pPage, pSPool );
2000-09-18 23:16:46 +00:00
}
}
mbNewOrLoadCompleted = true;
2000-09-18 23:16:46 +00:00
// Update all linked pages
sal_uInt16 nMaxSdPages = GetSdPageCount(PageKind::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
{
SdPage* pPage = GetSdPage(nSdPage, PageKind::Standard);
2000-09-18 23:16:46 +00:00
if (pPage && !pPage->GetFileName().isEmpty() && pPage->GetBookmarkName().getLength())
2000-09-18 23:16:46 +00:00
{
pPage->SetModel(this);
}
}
2001-12-18 14:03:13 +00:00
UpdateAllLinks();
SetChanged( false );
2001-12-18 14:03:13 +00:00
}
/** updates all links, only links in this document should by resolved */
void SdDrawDocument::UpdateAllLinks()
{
if (!s_pDocLockedInsertingLinks && pLinkManager && !pLinkManager->GetLinks().empty())
2000-09-18 23:16:46 +00:00
{
s_pDocLockedInsertingLinks = this; // lock inserting links. only links in this document should by resolved
2000-09-18 23:16:46 +00:00
if (mpDocSh)
{
comphelper::EmbeddedObjectContainer& rEmbeddedObjectContainer = mpDocSh->getEmbeddedObjectContainer();
rEmbeddedObjectContainer.setUserAllowsLinkUpdate(true);
}
2000-09-18 23:16:46 +00:00
pLinkManager->UpdateAllLinks(); // query box: update all links?
if (s_pDocLockedInsertingLinks == this)
s_pDocLockedInsertingLinks = nullptr; // unlock inserting links
2000-09-18 23:16:46 +00:00
}
}
2014-04-10 09:55:52 +02:00
/** this loops over the presentation objects 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 )
{
sd::ShapeList& rPresentationShapes( pPage->GetPresentationShapeList() );
if(!rPresentationShapes.isEmpty())
{
// Create lists of title and outline styles
OUString aName = pPage->GetLayoutName();
aName = aName.copy( 0, aName.indexOf( SD_LT_SEPARATOR ) );
2011-03-04 21:49:59 -08:00
std::vector<SfxStyleSheetBase*> aOutlineList;
pSPool->CreateOutlineSheetList(aName,aOutlineList);
SfxStyleSheet* pTitleSheet = static_cast<SfxStyleSheet*>(pSPool->GetTitleSheet(aName));
SdrObject* pObj = nullptr;
rPresentationShapes.seekShape(0);
// Now look for title and outline text objects, then make those objects
// listeners.
while( (pObj = rPresentationShapes.getNextShape()) )
{
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: don't delete "hard" attributes when doing this.
if (pTitleSheet)
pObj->SetStyleSheet(pTitleSheet, 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())
// text frame listens to stylesheet of layer 1
pObj->NbcSetStyleSheet(pSheet, true);
}
}
}
if( dynamic_cast< const SdrTextObj *>( pObj ) != nullptr && pObj->IsEmptyPresObj())
{
PresObjKind ePresObjKind = pPage->GetPresObjKind(pObj);
OUString aString( pPage->GetPresObjText(ePresObjKind) );
if (!aString.isEmpty())
{
SdOutliner* pInternalOutl = GetInternalOutliner();
pPage->SetObjText( static_cast<SdrTextObj*>(pObj), pInternalOutl, ePresObjKind, aString );
pObj->NbcSetStyleSheet( pPage->GetStyleSheetForPresObj( ePresObjKind ), true );
pInternalOutl->Clear();
}
}
}
}
}
}
2000-09-18 23:16:46 +00:00
// Local outliner that is used for outline mode. In this outliner, OutlinerViews
// may be inserted.
SdOutliner* SdDrawDocument::GetOutliner(bool bCreateOutliner)
2000-09-18 23:16:46 +00:00
{
if (!mpOutliner && bCreateOutliner)
2000-09-18 23:16:46 +00:00
{
mpOutliner = new SdOutliner( 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(static_cast<SfxStyleSheetPool*>(GetStyleSheetPool()));
2000-09-18 23:16:46 +00:00
}
return mpOutliner;
2000-09-18 23:16:46 +00:00
}
// Internal outliner that is used to create text objects. We don't insert any
// OutlinerViews into this outliner!
SdOutliner* SdDrawDocument::GetInternalOutliner(bool bCreateOutliner)
2000-09-18 23:16:46 +00:00
{
if ( !mpInternalOutliner && bCreateOutliner )
2000-09-18 23:16:46 +00:00
{
mpInternalOutliner = new SdOutliner( this, OutlinerMode::TextObject );
// This outliner is only used to create special text objects. As no
// information about portions is saved in this outliner, the update mode
// can/should always remain sal_False.
mpInternalOutliner->SetUpdateMode( false );
mpInternalOutliner->EnableUndo( 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(static_cast<SfxStyleSheetPool*>(GetStyleSheetPool()));
2000-09-18 23:16:46 +00:00
}
DBG_ASSERT( !mpInternalOutliner || ( ! mpInternalOutliner->GetUpdateMode() ) , "InternalOutliner: UpdateMode = sal_True !" );
DBG_ASSERT( !mpInternalOutliner || ( ! mpInternalOutliner->IsUndoEnabled() ), "InternalOutliner: Undo = sal_True !" );
2000-09-18 23:16:46 +00:00
// If you add stuff here, always clear it out.
// Advantages:
// a) no unnecessary Clear calls
// b) no wasted memory
DBG_ASSERT( !mpInternalOutliner || ( ( mpInternalOutliner->GetParagraphCount() == 1 ) && ( mpInternalOutliner->GetText( mpInternalOutliner->GetParagraph( 0 ) ).isEmpty() ) ), "InternalOutliner: not empty!" );
2000-09-18 23:16:46 +00:00
return mpInternalOutliner;
2000-09-18 23:16:46 +00:00
}
// OnlineSpelling on/off
void SdDrawDocument::SetOnlineSpell(bool bIn)
2000-09-18 23:16:46 +00:00
{
mbOnlineSpell = bIn;
EEControlBits nCntrl;
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)
nCntrl |= EEControlBits::ONLINESPELLING;
2000-09-18 23:16:46 +00:00
else
nCntrl &= ~EEControlBits::ONLINESPELLING;
2000-09-18 23:16:46 +00:00
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)
nCntrl |= EEControlBits::ONLINESPELLING;
2000-09-18 23:16:46 +00:00
else
nCntrl &= ~EEControlBits::ONLINESPELLING;
2000-09-18 23:16:46 +00:00
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)
nCntrl |= EEControlBits::ONLINESPELLING;
2000-09-18 23:16:46 +00:00
else
nCntrl &= ~EEControlBits::ONLINESPELLING;
2000-09-18 23:16:46 +00:00
rOutliner.SetControlWord(nCntrl);
if (mbOnlineSpell)
2000-09-18 23:16:46 +00:00
{
StartOnlineSpelling();
}
else
{
StopOnlineSpelling();
}
}
// OnlineSpelling: highlighting on/off
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 css::document::PrinterIndependentLayout::DISABLED:
case css::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;
}
}
void SdDrawDocument::SetStartWithPresentation( bool bStartWithPresentation )
{
mbStartWithPresentation = bStartWithPresentation;
}
void SdDrawDocument::SetExitAfterPresenting( bool bExitAfterPresenting )
{
mbExitAfterPresenting = bExitAfterPresenting;
}
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 OUString& rAuthor )
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
{
// force current user to have first color
if( maAnnotationAuthors.empty() )
{
SvtUserOptions aUserOptions;
maAnnotationAuthors.push_back( aUserOptions.GetFullName() );
}
sal_uInt16 idx = 0;
const std::vector< OUString >::const_iterator aEnd( maAnnotationAuthors.end());
for( std::vector< OUString >::const_iterator iter( maAnnotationAuthors.begin() ); iter != aEnd; ++iter )
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
{
if( (*iter) == rAuthor )
{
break;
}
idx++;
}
if( idx == maAnnotationAuthors.size() )
{
maAnnotationAuthors.push_back( rAuthor );
}
return idx;
}
void SdDrawDocument::InitLayoutVector()
{
if (utl::ConfigManager::IsAvoidConfig())
return;
const Reference<css::uno::XComponentContext> xContext(
::comphelper::getProcessComponentContext() );
// get file list from configuration
Sequence< rtl::OUString > aFiles(
officecfg::Office::Impress::Misc::LayoutListFiles::get(xContext) );
rtl::OUString sFilename;
for( sal_Int32 i=0; i < aFiles.getLength(); ++i )
{
sFilename = comphelper::getExpandedUri(xContext, aFiles[i]);
// load layout file into DOM
Reference< XMultiServiceFactory > xServiceFactory(
xContext->getServiceManager() , UNO_QUERY_THROW );
const Reference<XDocumentBuilder> xDocBuilder(
DocumentBuilder::create( comphelper::getComponentContext (xServiceFactory) ));
try
{
// loop over every layout entry in current file
const Reference<XDocument> xDoc = xDocBuilder->parseURI( sFilename );
const Reference<XNodeList> layoutlist = xDoc->getElementsByTagName("layout");
const int nElements = layoutlist->getLength();
for(int index=0; index < nElements; index++)
maLayoutInfo.push_back( layoutlist->item(index) );
}
catch (const uno::Exception &)
{
// skip missing config. files
}
}
}
void SdDrawDocument::InitObjectVector()
{
if (utl::ConfigManager::IsAvoidConfig())
return;
const Reference<css::uno::XComponentContext> xContext(
::comphelper::getProcessComponentContext() );
// get file list from configuration
Sequence< rtl::OUString > aFiles(
officecfg::Office::Impress::Misc::PresObjListFiles::get(xContext) );
rtl::OUString sFilename;
for( sal_Int32 i=0; i < aFiles.getLength(); ++i )
{
sFilename = comphelper::getExpandedUri(xContext, aFiles[i]);
// load presentation object file into DOM
Reference< XMultiServiceFactory > xServiceFactory(
xContext->getServiceManager() , UNO_QUERY_THROW );
const Reference<XDocumentBuilder> xDocBuilder(
DocumentBuilder::create( comphelper::getComponentContext (xServiceFactory) ));
try
{
// loop over every object entry in current file
const Reference<XDocument> xDoc = xDocBuilder->parseURI( sFilename );
const Reference<XNodeList> objectlist = xDoc->getElementsByTagName("object");
const int nElements = objectlist->getLength();
for(int index=0; index < nElements; index++)
maPresObjectInfo.push_back( objectlist->item(index) );
}
catch (const uno::Exception &)
{
// skip missing config. files
}
}
}
void SdDrawDocument::dumpAsXml(xmlTextWriterPtr pWriter) const
{
bool bOwns = false;
if (!pWriter)
{
pWriter = xmlNewTextWriterFilename("model.xml", 0);
xmlTextWriterSetIndent(pWriter,1);
xmlTextWriterSetIndentString(pWriter, BAD_CAST(" "));
xmlTextWriterStartDocument(pWriter, nullptr, nullptr, nullptr);
bOwns = true;
}
xmlTextWriterStartElement(pWriter, BAD_CAST("SdDrawDocument"));
xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("ptr"), "%p", this);
if (mpOutliner)
mpOutliner->dumpAsXml(pWriter);
FmFormModel::dumpAsXml(pWriter);
if (GetUndoManager())
GetUndoManager()->dumpAsXml(pWriter);
xmlTextWriterEndElement(pWriter);
if (bOwns)
{
xmlTextWriterEndDocument(pWriter);
xmlFreeTextWriter(pWriter);
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */