2010-10-12 15:51:52 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-11-27 16:10:40 +00:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2017-01-25 16:34:57 +01:00
|
|
|
#include <sal/config.h>
|
|
|
|
|
|
|
|
#include <memory>
|
2017-06-13 18:03:18 +02:00
|
|
|
#include <utility>
|
2017-01-25 16:34:57 +01:00
|
|
|
|
2017-10-23 22:32:55 +02:00
|
|
|
#include <DrawDocShell.hxx>
|
2003-04-24 13:38:03 +00:00
|
|
|
#include <com/sun/star/document/PrinterIndependentLayout.hpp>
|
2017-01-25 16:38:32 +01:00
|
|
|
#include <o3tl/make_unique.hxx>
|
2002-08-01 10:30:12 +00:00
|
|
|
#include <tools/urlobj.hxx>
|
2000-09-18 16:07:07 +00:00
|
|
|
#include <sfx2/progress.hxx>
|
|
|
|
#include <vcl/waitobj.hxx>
|
|
|
|
#include <svx/svxids.hrc>
|
2014-10-02 16:52:54 +03:00
|
|
|
#include <editeng/editeng.hxx>
|
|
|
|
#include <editeng/editstat.hxx>
|
2010-01-08 18:32:51 +01:00
|
|
|
#include <editeng/flstitem.hxx>
|
|
|
|
#include <editeng/eeitem.hxx>
|
2009-10-16 00:05:16 +02:00
|
|
|
#include <svl/aeitem.hxx>
|
|
|
|
#include <svl/flagitem.hxx>
|
2004-10-04 17:30:29 +00:00
|
|
|
#include <sot/storage.hxx>
|
2013-02-22 12:03:54 +01:00
|
|
|
#include <sfx2/dinfdlg.hxx>
|
2000-09-18 16:07:07 +00:00
|
|
|
#include <sfx2/docfile.hxx>
|
|
|
|
#include <sfx2/docfilt.hxx>
|
|
|
|
#include <sfx2/dispatch.hxx>
|
|
|
|
#include <svx/svdotext.hxx>
|
2009-10-16 00:05:16 +02:00
|
|
|
#include <svl/style.hxx>
|
2000-09-18 16:07:07 +00:00
|
|
|
#include <sfx2/printer.hxx>
|
|
|
|
#include <svtools/ctrltool.hxx>
|
|
|
|
#include <svtools/sfxecode.hxx>
|
2013-04-19 18:08:13 -04:00
|
|
|
#include <comphelper/classids.hxx>
|
2000-09-18 16:07:07 +00:00
|
|
|
#include <sot/formats.hxx>
|
|
|
|
#include <sfx2/request.hxx>
|
2009-10-06 07:38:24 +02:00
|
|
|
#include <unotools/fltrcfg.hxx>
|
2004-10-04 17:30:29 +00:00
|
|
|
#include <sfx2/frame.hxx>
|
|
|
|
#include <sfx2/viewfrm.hxx>
|
2009-10-06 07:38:24 +02:00
|
|
|
#include <unotools/saveopt.hxx>
|
2003-04-08 14:20:29 +00:00
|
|
|
#include <com/sun/star/drawing/XDrawPage.hpp>
|
2006-03-21 16:14:37 +00:00
|
|
|
#include <com/sun/star/drawing/XDrawView.hpp>
|
2007-04-03 14:42:53 +00:00
|
|
|
#include <comphelper/processfactory.hxx>
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2017-10-23 22:32:55 +02:00
|
|
|
#include <app.hrc>
|
|
|
|
#include <strings.hrc>
|
|
|
|
#include <strmname.h>
|
|
|
|
#include <FrameView.hxx>
|
|
|
|
#include <optsitem.hxx>
|
|
|
|
#include <Outliner.hxx>
|
|
|
|
#include <sdattr.hxx>
|
|
|
|
#include <drawdoc.hxx>
|
|
|
|
#include <ViewShell.hxx>
|
|
|
|
#include <sdmod.hxx>
|
|
|
|
#include <View.hxx>
|
|
|
|
#include <EffectMigration.hxx>
|
|
|
|
#include <CustomAnimationEffect.hxx>
|
|
|
|
#include <sdpage.hxx>
|
|
|
|
#include <sdresid.hxx>
|
|
|
|
#include <DrawViewShell.hxx>
|
|
|
|
#include <ViewShellBase.hxx>
|
|
|
|
#include <Window.hxx>
|
|
|
|
#include <OutlineViewShell.hxx>
|
|
|
|
#include <sdxmlwrp.hxx>
|
|
|
|
#include <sdpptwrp.hxx>
|
|
|
|
#include <sdcgmfilter.hxx>
|
|
|
|
#include <sdgrffilter.hxx>
|
|
|
|
#include <sdhtmlfilter.hxx>
|
|
|
|
#include <framework/FrameworkHelper.hxx>
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2017-10-23 22:32:55 +02:00
|
|
|
#include <SdUnoDrawView.hxx>
|
2013-11-28 12:09:19 +00:00
|
|
|
|
2004-10-04 17:30:29 +00:00
|
|
|
using namespace ::com::sun::star;
|
2007-04-03 14:42:53 +00:00
|
|
|
using namespace ::com::sun::star::uno;
|
|
|
|
using ::sd::framework::FrameworkHelper;
|
|
|
|
|
2004-02-02 09:54:17 +00:00
|
|
|
namespace sd {
|
|
|
|
|
2013-03-10 16:46:07 +01:00
|
|
|
/**
|
|
|
|
* Creates (if necessary) and returns a SfxPrinter
|
|
|
|
*/
|
2014-04-24 10:52:02 +02:00
|
|
|
SfxPrinter* DrawDocShell::GetPrinter(bool bCreate)
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2006-12-12 16:12:22 +00:00
|
|
|
if (bCreate && !mpPrinter)
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2013-03-10 16:46:07 +01:00
|
|
|
// create ItemSet with special pool area
|
2017-06-13 18:03:18 +02:00
|
|
|
auto pSet = o3tl::make_unique<SfxItemSet>( GetPool(),
|
Make SfxItemSet ranges correct by construction
This is a follow-up to 45a7f5b62d0b1b21763c1c94255ef2309ea4280b "Keep WID ranges
sorted, and join adjacent ones". While SfxItemSet::MergeRange relies on the
m_pWhichRanges being sorted (and, under DBG_UTIL, asserts if they are not), the
various SfxItemSet constructors curiously only check (via assert or DBG_ASSERT)
that each individual range has an upper bound not smaller than its lower bound.
Arguably, all SfxItemSet instances should fulfill the stronger guarantees
required and checked by MergeRange.
And in many cases the ranges are statically known, so that the checking can
happen at compile time. Therefore, replace the two SfxItemSet ctors taking
explicit ranges with two other ctors that actually do proper checking. The
(templated) overload taking an svl::Items struct should be used in all cases
where the range values are statically known at compile time, while the overload
taking a std::initializer_list<Pair> is for the remaining cases (that can only
do runtime checking via assert). Most of those latter cases are simple cases
with a single range covering a single item, but a few are more complex.
(At least some of the uses of the existing SfxItemSet overload taking a
const sal_uInt16* pWhichPairTable
can probably also be strengthened, but that is left for another day.)
This commit is the first in a series of two. Apart from the manual changes to
compilerplugins/clang/store/sfxitemsetrewrite.cxx, include/svl/itemset.hxx, and
svl/source/items/itemset.cxx, it only consists of automatic rewriting of the
relevant SfxItemSet ctor calls (plus a few required manual fixes, see next).
But it does not yet check that the individual ranges are properly sorted (see
the TODO in svl::detail::validGap). That check will be enabled, and the ensuing
manual fixes will be made in a follow-up commit, to reduce the likelyhood of
accidents.
There were three cases of necessary manual intervention:
* sw/source/core/unocore/unostyle.cxx uses eAtr of enum type RES_FRMATR in
braced-init-list syntax now, so needs explicit narrowing conversion to
sal_uInt16.
* In sw/source/uibase/uiview/formatclipboard.cxx, the trailiing comma in the
definition of macro FORMAT_PAINTBRUSH_FRAME_IDS needed to be removed manually.
* In svx/source/svdraw/svdoashp.cxx, svx/source/svdraw/svdotext.cxx,
sw/source/uibase/app/docstyle.cxx, sw/source/uibase/shells/frmsh.cxx,
sw/source/uibase/shells/grfsh.cxx, and sw/source/uibase/shells/textsh1.cxx,
some comments had to be put back (see "TODO: the replaced range can contain
relevant comments" in compilerplugins/clang/store/sfxitemsetrewrite.cxx).
A few uses of the variadic form erroneously used nullptr instead of 0 for
termination. But this should have been harmless even if promoted std::nullptr_t
is larger than promoted sal_uInt16, assuming that the part of the nullptr value
that was interpreted as sal_uInt16/promoted int was all-zero bits. Similarly,
some uses made the harmless error of using 0L instead of 0.
Change-Id: I2afea97282803cb311b9321a99bb627520ef5e35
Reviewed-on: https://gerrit.libreoffice.org/38861
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2017-06-16 09:58:13 +02:00
|
|
|
svl::Items<SID_PRINTER_NOTFOUND_WARN, SID_PRINTER_NOTFOUND_WARN,
|
2000-09-18 16:07:07 +00:00
|
|
|
SID_PRINTER_CHANGESTODOC, SID_PRINTER_CHANGESTODOC,
|
Make SfxItemSet ranges correct by construction
This is a follow-up to 45a7f5b62d0b1b21763c1c94255ef2309ea4280b "Keep WID ranges
sorted, and join adjacent ones". While SfxItemSet::MergeRange relies on the
m_pWhichRanges being sorted (and, under DBG_UTIL, asserts if they are not), the
various SfxItemSet constructors curiously only check (via assert or DBG_ASSERT)
that each individual range has an upper bound not smaller than its lower bound.
Arguably, all SfxItemSet instances should fulfill the stronger guarantees
required and checked by MergeRange.
And in many cases the ranges are statically known, so that the checking can
happen at compile time. Therefore, replace the two SfxItemSet ctors taking
explicit ranges with two other ctors that actually do proper checking. The
(templated) overload taking an svl::Items struct should be used in all cases
where the range values are statically known at compile time, while the overload
taking a std::initializer_list<Pair> is for the remaining cases (that can only
do runtime checking via assert). Most of those latter cases are simple cases
with a single range covering a single item, but a few are more complex.
(At least some of the uses of the existing SfxItemSet overload taking a
const sal_uInt16* pWhichPairTable
can probably also be strengthened, but that is left for another day.)
This commit is the first in a series of two. Apart from the manual changes to
compilerplugins/clang/store/sfxitemsetrewrite.cxx, include/svl/itemset.hxx, and
svl/source/items/itemset.cxx, it only consists of automatic rewriting of the
relevant SfxItemSet ctor calls (plus a few required manual fixes, see next).
But it does not yet check that the individual ranges are properly sorted (see
the TODO in svl::detail::validGap). That check will be enabled, and the ensuing
manual fixes will be made in a follow-up commit, to reduce the likelyhood of
accidents.
There were three cases of necessary manual intervention:
* sw/source/core/unocore/unostyle.cxx uses eAtr of enum type RES_FRMATR in
braced-init-list syntax now, so needs explicit narrowing conversion to
sal_uInt16.
* In sw/source/uibase/uiview/formatclipboard.cxx, the trailiing comma in the
definition of macro FORMAT_PAINTBRUSH_FRAME_IDS needed to be removed manually.
* In svx/source/svdraw/svdoashp.cxx, svx/source/svdraw/svdotext.cxx,
sw/source/uibase/app/docstyle.cxx, sw/source/uibase/shells/frmsh.cxx,
sw/source/uibase/shells/grfsh.cxx, and sw/source/uibase/shells/textsh1.cxx,
some comments had to be put back (see "TODO: the replaced range can contain
relevant comments" in compilerplugins/clang/store/sfxitemsetrewrite.cxx).
A few uses of the variadic form erroneously used nullptr instead of 0 for
termination. But this should have been harmless even if promoted std::nullptr_t
is larger than promoted sal_uInt16, assuming that the part of the nullptr value
that was interpreted as sal_uInt16/promoted int was all-zero bits. Similarly,
some uses made the harmless error of using 0L instead of 0.
Change-Id: I2afea97282803cb311b9321a99bb627520ef5e35
Reviewed-on: https://gerrit.libreoffice.org/38861
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2017-06-16 09:58:13 +02:00
|
|
|
ATTR_OPTIONS_PRINT, ATTR_OPTIONS_PRINT>{} );
|
2013-03-10 16:46:07 +01:00
|
|
|
// set PrintOptionsSet
|
2016-09-09 13:55:14 +02:00
|
|
|
SdOptionsPrintItem aPrintItem( SD_MOD()->GetSdOptions(mpDoc->GetDocumentType()) );
|
2000-09-18 16:07:07 +00:00
|
|
|
SfxFlagItem aFlagItem( SID_PRINTER_CHANGESTODOC );
|
2015-03-24 09:36:29 +02:00
|
|
|
SfxPrinterChangeFlags nFlags =
|
|
|
|
(aPrintItem.GetOptionsPrint().IsWarningSize() ? SfxPrinterChangeFlags::CHG_SIZE : SfxPrinterChangeFlags::NONE) |
|
|
|
|
(aPrintItem.GetOptionsPrint().IsWarningOrientation() ? SfxPrinterChangeFlags::CHG_ORIENTATION : SfxPrinterChangeFlags::NONE);
|
|
|
|
aFlagItem.SetValue( static_cast<int>(nFlags) );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
pSet->Put( aPrintItem );
|
2006-12-12 16:12:22 +00:00
|
|
|
pSet->Put( SfxBoolItem( SID_PRINTER_NOTFOUND_WARN, aPrintItem.GetOptionsPrint().IsWarningPrinter() ) );
|
2000-09-18 16:07:07 +00:00
|
|
|
pSet->Put( aFlagItem );
|
|
|
|
|
2017-06-13 18:03:18 +02:00
|
|
|
mpPrinter = VclPtr<SfxPrinter>::Create(std::move(pSet));
|
2014-04-24 10:52:02 +02:00
|
|
|
mbOwnPrinter = true;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2013-03-10 16:46:07 +01:00
|
|
|
// set output quality
|
2011-01-17 11:41:00 +01:00
|
|
|
sal_uInt16 nQuality = aPrintItem.GetOptionsPrint().GetOutputQuality();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2015-05-19 10:43:01 +02:00
|
|
|
DrawModeFlags nMode = DrawModeFlags::Default;
|
2013-09-03 11:57:24 -07:00
|
|
|
// 1 == Grayscale, 2 == Black & White (with grayscale images)
|
2000-09-18 16:07:07 +00:00
|
|
|
if( nQuality == 1 )
|
2015-05-19 10:43:01 +02:00
|
|
|
nMode = DrawModeFlags::GrayLine | DrawModeFlags::GrayFill | DrawModeFlags::GrayText | DrawModeFlags::GrayBitmap | DrawModeFlags::GrayGradient;
|
2000-09-18 16:07:07 +00:00
|
|
|
else if( nQuality == 2 )
|
2015-05-19 10:43:01 +02:00
|
|
|
nMode = DrawModeFlags::BlackLine | DrawModeFlags::WhiteFill | DrawModeFlags::BlackText | DrawModeFlags::GrayBitmap | DrawModeFlags::WhiteGradient;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2006-12-12 16:12:22 +00:00
|
|
|
mpPrinter->SetDrawMode( nMode );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2006-12-12 16:12:22 +00:00
|
|
|
MapMode aMM (mpPrinter->GetMapMode());
|
2016-09-20 16:41:39 +02:00
|
|
|
aMM.SetMapUnit(MapUnit::Map100thMM);
|
2006-12-12 16:12:22 +00:00
|
|
|
mpPrinter->SetMapMode(aMM);
|
2002-07-26 07:32:44 +00:00
|
|
|
UpdateRefDevice();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
2006-12-12 16:12:22 +00:00
|
|
|
return mpPrinter;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2013-03-10 16:46:07 +01:00
|
|
|
/**
|
|
|
|
* Set new SfxPrinter (transfer of ownership)
|
|
|
|
*/
|
2004-02-02 09:54:17 +00:00
|
|
|
void DrawDocShell::SetPrinter(SfxPrinter *pNewPrinter)
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2006-12-12 16:12:22 +00:00
|
|
|
if ( mpViewShell )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2006-12-12 16:12:22 +00:00
|
|
|
::sd::View* pView = mpViewShell->GetView();
|
2000-09-18 16:07:07 +00:00
|
|
|
if ( pView->IsTextEdit() )
|
2006-11-14 13:26:45 +00:00
|
|
|
pView->SdrEndTextEdit();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2015-03-19 12:12:46 +00:00
|
|
|
if ( mpPrinter && mbOwnPrinter && (mpPrinter.get() != pNewPrinter) )
|
2015-03-18 20:52:22 +00:00
|
|
|
mpPrinter.disposeAndClear();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2006-12-12 16:12:22 +00:00
|
|
|
mpPrinter = pNewPrinter;
|
2014-04-24 10:52:02 +02:00
|
|
|
mbOwnPrinter = true;
|
2015-10-28 12:01:32 +02:00
|
|
|
if ( mpDoc->GetPrinterIndependentLayout() == css::document::PrinterIndependentLayout::DISABLED )
|
2006-05-04 13:58:13 +00:00
|
|
|
UpdateFontList();
|
|
|
|
UpdateRefDevice();
|
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2006-05-04 13:58:13 +00:00
|
|
|
void DrawDocShell::UpdateFontList()
|
|
|
|
{
|
2006-12-12 16:12:22 +00:00
|
|
|
delete mpFontList;
|
2015-11-10 10:23:02 +01:00
|
|
|
OutputDevice* pRefDevice = nullptr;
|
2015-10-28 12:01:32 +02:00
|
|
|
if ( mpDoc->GetPrinterIndependentLayout() == css::document::PrinterIndependentLayout::DISABLED )
|
2014-04-24 10:52:02 +02:00
|
|
|
pRefDevice = GetPrinter(true);
|
2006-05-04 13:58:13 +00:00
|
|
|
else
|
|
|
|
pRefDevice = SD_MOD()->GetVirtualRefDevice();
|
2016-11-29 08:34:29 +02:00
|
|
|
mpFontList = new FontList(pRefDevice, nullptr);
|
2007-05-10 14:28:15 +00:00
|
|
|
SvxFontListItem aFontListItem( mpFontList, SID_ATTR_CHAR_FONTLIST );
|
2000-09-18 16:07:07 +00:00
|
|
|
PutItem( aFontListItem );
|
|
|
|
}
|
|
|
|
|
2004-02-02 09:54:17 +00:00
|
|
|
Printer* DrawDocShell::GetDocumentPrinter()
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2014-04-24 10:52:02 +02:00
|
|
|
return GetPrinter(false);
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2004-02-02 09:54:17 +00:00
|
|
|
void DrawDocShell::OnDocumentPrinterChanged(Printer* pNewPrinter)
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2016-10-01 14:12:30 +02:00
|
|
|
// if we already have a printer, see if it's the same
|
2006-12-12 16:12:22 +00:00
|
|
|
if( mpPrinter )
|
2002-10-28 10:08:56 +00:00
|
|
|
{
|
|
|
|
// easy case
|
2006-12-12 16:12:22 +00:00
|
|
|
if( mpPrinter == pNewPrinter )
|
2002-10-28 10:08:56 +00:00
|
|
|
return;
|
|
|
|
|
2016-10-01 14:12:30 +02:00
|
|
|
// compare if it's the same printer with the same job setup
|
2006-12-12 16:12:22 +00:00
|
|
|
if( (mpPrinter->GetName() == pNewPrinter->GetName()) &&
|
|
|
|
(mpPrinter->GetJobSetup() == pNewPrinter->GetJobSetup()))
|
2002-10-28 10:08:56 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2016-01-27 14:52:23 +01:00
|
|
|
SfxPrinter* const pSfxPrinter = dynamic_cast<SfxPrinter*>(pNewPrinter);
|
|
|
|
if (pSfxPrinter)
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2016-01-27 14:52:23 +01:00
|
|
|
SetPrinter(pSfxPrinter);
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2013-03-10 16:46:07 +01:00
|
|
|
// container owns printer
|
2014-04-24 10:52:02 +02:00
|
|
|
mbOwnPrinter = false;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2004-02-02 09:54:17 +00:00
|
|
|
void DrawDocShell::UpdateRefDevice()
|
2002-07-26 07:32:44 +00:00
|
|
|
{
|
2006-12-12 16:12:22 +00:00
|
|
|
if( mpDoc )
|
2002-07-26 07:32:44 +00:00
|
|
|
{
|
2003-04-24 13:38:03 +00:00
|
|
|
// Determine the device for which the output will be formatted.
|
2015-03-18 20:52:22 +00:00
|
|
|
VclPtr< OutputDevice > pRefDevice;
|
2006-12-12 16:12:22 +00:00
|
|
|
switch (mpDoc->GetPrinterIndependentLayout())
|
2003-04-24 13:38:03 +00:00
|
|
|
{
|
2015-10-28 12:01:32 +02:00
|
|
|
case css::document::PrinterIndependentLayout::DISABLED:
|
2015-03-18 20:52:22 +00:00
|
|
|
pRefDevice = mpPrinter.get();
|
2003-04-24 13:38:03 +00:00
|
|
|
break;
|
|
|
|
|
2015-10-28 12:01:32 +02:00
|
|
|
case css::document::PrinterIndependentLayout::ENABLED:
|
2003-04-24 13:38:03 +00:00
|
|
|
pRefDevice = SD_MOD()->GetVirtualRefDevice();
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
// We are confronted with an invalid or un-implemented
|
|
|
|
// layout mode. Use the printer as formatting device
|
|
|
|
// as a fall-back.
|
2016-06-11 19:05:15 +02:00
|
|
|
SAL_WARN( "sd", "DrawDocShell::UpdateRefDevice(): Unexpected printer layout mode");
|
2003-04-24 13:38:03 +00:00
|
|
|
|
2015-03-19 12:12:46 +00:00
|
|
|
pRefDevice = mpPrinter.get();
|
2003-04-24 13:38:03 +00:00
|
|
|
break;
|
|
|
|
}
|
2015-03-18 20:52:22 +00:00
|
|
|
mpDoc->SetRefDevice( pRefDevice.get() );
|
2002-07-26 07:32:44 +00:00
|
|
|
|
2016-10-14 10:10:44 +02:00
|
|
|
SdOutliner* pOutl = mpDoc->GetOutliner( false );
|
2002-07-26 07:32:44 +00:00
|
|
|
|
|
|
|
if( pOutl )
|
|
|
|
pOutl->SetRefDevice( pRefDevice );
|
|
|
|
|
2016-10-14 10:10:44 +02:00
|
|
|
SdOutliner* pInternalOutl = mpDoc->GetInternalOutliner( false );
|
2002-07-26 07:32:44 +00:00
|
|
|
|
|
|
|
if( pInternalOutl )
|
|
|
|
pInternalOutl->SetRefDevice( pRefDevice );
|
|
|
|
}
|
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2013-03-10 16:46:07 +01:00
|
|
|
/**
|
|
|
|
* Creates new document, opens streams
|
|
|
|
*/
|
2015-10-28 12:01:32 +02:00
|
|
|
bool DrawDocShell::InitNew( const css::uno::Reference< css::embed::XStorage >& xStorage )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2014-03-17 13:38:26 +02:00
|
|
|
bool bRet = SfxObjectShell::InitNew( xStorage );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2017-03-30 20:27:55 +02:00
|
|
|
::tools::Rectangle aVisArea( Point(0, 0), Size(14100, 10000) );
|
2000-09-18 16:07:07 +00:00
|
|
|
SetVisArea(aVisArea);
|
|
|
|
|
|
|
|
if (bRet)
|
|
|
|
{
|
2006-12-12 16:12:22 +00:00
|
|
|
if( !mbSdDataObj )
|
|
|
|
mpDoc->NewOrLoadCompleted(NEW_DOC); // otherwise calling
|
2000-09-18 16:07:07 +00:00
|
|
|
// NewOrLoadCompleted(NEW_LOADED) in
|
|
|
|
// SdDrawDocument::AllocModel()
|
|
|
|
}
|
|
|
|
return bRet;
|
|
|
|
}
|
|
|
|
|
2013-03-10 16:46:07 +01:00
|
|
|
/**
|
|
|
|
* loads pools and document
|
|
|
|
*/
|
2014-03-17 13:38:26 +02:00
|
|
|
bool DrawDocShell::Load( SfxMedium& rMedium )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2016-06-29 10:12:28 +01:00
|
|
|
// If this is an ODF file being loaded, then by default, use legacy processing
|
2017-03-02 10:03:34 +01:00
|
|
|
// for tdf#99729 (if required, it will be overridden in *::ReadUserDataSequence())
|
2016-06-29 10:12:28 +01:00
|
|
|
if (IsOwnStorageFormat(rMedium))
|
|
|
|
{
|
|
|
|
mpDoc->SetAnchoredTextOverflowLegacy(true);
|
|
|
|
}
|
|
|
|
|
2014-04-24 10:52:02 +02:00
|
|
|
bool bRet = false;
|
2014-03-17 13:38:26 +02:00
|
|
|
bool bStartPresentation = false;
|
2004-10-04 17:30:29 +00:00
|
|
|
ErrCode nError = ERRCODE_NONE;
|
2001-02-13 11:17:06 +00:00
|
|
|
|
2005-01-11 11:11:28 +00:00
|
|
|
SfxItemSet* pSet = rMedium.GetItemSet();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2004-10-04 17:30:29 +00:00
|
|
|
if( pSet )
|
|
|
|
{
|
2014-10-28 14:57:38 +02:00
|
|
|
if( ( SfxItemState::SET == pSet->GetItemState(SID_PREVIEW ) ) && static_cast<const SfxBoolItem&>( pSet->Get( SID_PREVIEW ) ).GetValue() )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2014-03-10 11:09:59 +02:00
|
|
|
mpDoc->SetStarDrawPreviewMode( true );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2014-09-10 17:53:41 +02:00
|
|
|
if( SfxItemState::SET == pSet->GetItemState(SID_DOC_STARTPRESENTATION)&&
|
2014-10-28 14:57:38 +02:00
|
|
|
static_cast<const SfxBoolItem&>( pSet->Get( SID_DOC_STARTPRESENTATION ) ).GetValue() )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2004-10-04 17:30:29 +00:00
|
|
|
bStartPresentation = true;
|
2006-12-12 16:12:22 +00:00
|
|
|
mpDoc->SetStartWithPresentation( true );
|
2001-02-13 11:17:06 +00:00
|
|
|
}
|
|
|
|
}
|
2004-10-04 17:30:29 +00:00
|
|
|
|
2005-01-11 11:11:28 +00:00
|
|
|
bRet = SfxObjectShell::Load( rMedium );
|
2016-09-13 15:26:41 +01:00
|
|
|
if (bRet)
|
2004-10-04 17:30:29 +00:00
|
|
|
{
|
2016-09-13 15:26:41 +01:00
|
|
|
comphelper::EmbeddedObjectContainer& rEmbeddedObjectContainer = getEmbeddedObjectContainer();
|
|
|
|
rEmbeddedObjectContainer.setUserAllowsLinkUpdate(false);
|
2016-03-18 08:09:25 +02:00
|
|
|
bRet = SdXMLFilter( rMedium, *this, SDXMLMODE_Normal, SotStorage::GetVersion( rMedium.GetStorage() ) ).Import( nError );
|
2004-10-04 17:30:29 +00:00
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2001-02-13 11:17:06 +00:00
|
|
|
if( bRet )
|
|
|
|
{
|
2016-07-24 00:02:23 +02:00
|
|
|
// for legacy markup in OOoXML filter, convert the animations now
|
|
|
|
EffectMigration::DocumentLoaded(*GetDoc());
|
2001-02-13 11:17:06 +00:00
|
|
|
UpdateTablePointers();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2011-02-07 22:11:09 +01:00
|
|
|
// If we're an embedded OLE object, use tight bounds
|
2003-04-04 18:17:55 +00:00
|
|
|
// for our visArea. No point in showing the user lots of empty
|
|
|
|
// space. Had to remove the check for empty VisArea below,
|
|
|
|
// since XML load always sets a VisArea before.
|
2004-10-04 17:30:29 +00:00
|
|
|
//TODO/LATER: looks a little bit strange!
|
2015-04-09 15:24:21 +02:00
|
|
|
if( ( GetCreateMode() == SfxObjectCreateMode::EMBEDDED ) && SfxObjectShell::GetVisArea( ASPECT_CONTENT ).IsEmpty() )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2016-10-11 13:01:32 +02:00
|
|
|
SdPage* pPage = mpDoc->GetSdPage( 0, PageKind::Standard );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2001-02-13 11:17:06 +00:00
|
|
|
if( pPage )
|
2017-03-30 20:27:55 +02:00
|
|
|
SetVisArea( ::tools::Rectangle( pPage->GetAllObjBoundRect() ) );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2015-10-20 11:46:24 +02:00
|
|
|
FinishedLoading();
|
2008-07-30 13:11:08 +00:00
|
|
|
|
|
|
|
const INetURLObject aUrl;
|
2014-03-17 13:38:26 +02:00
|
|
|
SfxObjectShell::SetAutoLoad( aUrl, 0, false );
|
2001-02-13 11:17:06 +00:00
|
|
|
}
|
|
|
|
else
|
2003-03-27 09:58:12 +00:00
|
|
|
{
|
2004-10-04 17:30:29 +00:00
|
|
|
if( nError == ERRCODE_IO_BROKENPACKAGE )
|
2017-04-11 17:14:33 +01:00
|
|
|
SetError(ERRCODE_IO_BROKENPACKAGE);
|
2003-03-27 09:58:12 +00:00
|
|
|
|
2004-10-04 17:30:29 +00:00
|
|
|
// TODO/LATER: correct error handling?!
|
2017-04-11 17:14:33 +01:00
|
|
|
//pStore->SetError(SVSTREAM_WRONGVERSION);
|
2004-10-04 17:30:29 +00:00
|
|
|
else
|
2017-04-11 17:14:33 +01:00
|
|
|
SetError(ERRCODE_ABORT);
|
2003-03-27 09:58:12 +00:00
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2001-08-07 12:36:07 +00:00
|
|
|
// tell SFX to change viewshell when in preview mode
|
2003-05-16 13:17:31 +00:00
|
|
|
if( IsPreview() || bStartPresentation )
|
2001-08-07 12:36:07 +00:00
|
|
|
{
|
2006-12-12 16:12:22 +00:00
|
|
|
SfxItemSet *pMediumSet = GetMedium()->GetItemSet();
|
|
|
|
if( pMediumSet )
|
|
|
|
pMediumSet->Put( SfxUInt16Item( SID_VIEW_ID, bStartPresentation ? 1 : 5 ) );
|
2001-08-07 12:36:07 +00:00
|
|
|
}
|
|
|
|
|
2001-02-13 11:17:06 +00:00
|
|
|
return bRet;
|
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2013-03-10 16:46:07 +01:00
|
|
|
/**
|
|
|
|
* loads content for organizer
|
|
|
|
*/
|
2014-03-17 13:38:26 +02:00
|
|
|
bool DrawDocShell::LoadFrom( SfxMedium& rMedium )
|
2001-02-13 11:17:06 +00:00
|
|
|
{
|
2015-11-10 10:23:02 +01:00
|
|
|
WaitObject* pWait = nullptr;
|
2006-12-12 16:12:22 +00:00
|
|
|
if( mpViewShell )
|
2015-06-08 16:27:49 +02:00
|
|
|
pWait = new WaitObject( static_cast<vcl::Window*>(mpViewShell->GetActiveWindow()) );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2013-08-23 07:32:02 +02:00
|
|
|
mpDoc->NewOrLoadCompleted( NEW_DOC );
|
|
|
|
mpDoc->CreateFirstPages();
|
|
|
|
mpDoc->StopWorkStartupDelay();
|
2001-05-03 11:20:25 +00:00
|
|
|
|
2013-08-23 07:32:02 +02:00
|
|
|
// TODO/LATER: nobody is interested in the error code?!
|
|
|
|
ErrCode nError = ERRCODE_NONE;
|
2016-03-18 08:09:25 +02:00
|
|
|
bool bRet = SdXMLFilter( rMedium, *this, SDXMLMODE_Organizer, SotStorage::GetVersion( rMedium.GetStorage() ) ).Import( nError );
|
2001-05-03 11:20:25 +00:00
|
|
|
|
2001-08-07 12:36:07 +00:00
|
|
|
// tell SFX to change viewshell when in preview mode
|
|
|
|
if( IsPreview() )
|
|
|
|
{
|
|
|
|
SfxItemSet *pSet = GetMedium()->GetItemSet();
|
|
|
|
|
|
|
|
if( pSet )
|
|
|
|
pSet->Put( SfxUInt16Item( SID_VIEW_ID, 5 ) );
|
|
|
|
}
|
|
|
|
|
2001-02-13 11:17:06 +00:00
|
|
|
delete pWait;
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
return bRet;
|
|
|
|
}
|
|
|
|
|
2013-03-10 16:46:07 +01:00
|
|
|
/**
|
|
|
|
* load from 3rd party format
|
|
|
|
*/
|
2013-12-05 12:15:15 +01:00
|
|
|
bool DrawDocShell::ImportFrom(SfxMedium &rMedium,
|
|
|
|
uno::Reference<text::XTextRange> const& xInsertPosition)
|
2010-10-13 18:03:02 +02:00
|
|
|
{
|
2014-10-02 16:52:54 +03:00
|
|
|
const OUString aFilterName( rMedium.GetFilter()->GetFilterName() );
|
2017-07-19 08:42:36 +02:00
|
|
|
if (aFilterName == "Impress MS PowerPoint 2007 XML" ||
|
|
|
|
aFilterName == "Impress MS PowerPoint 2007 XML AutoPlay" ||
|
|
|
|
aFilterName == "Impress MS PowerPoint 2007 XML VBA")
|
2014-10-02 16:52:54 +03:00
|
|
|
{
|
|
|
|
// As this is a MSFT format, we should use the "MS Compat"
|
|
|
|
// mode for spacing before and after paragraphs.
|
|
|
|
|
|
|
|
// This is copied from what is done for .ppt import in
|
|
|
|
// ImplSdPPTImport::Import() in sd/source/filter/ppt/pptin.cxx
|
|
|
|
// in. We need to tell both the edit engine of the draw outliner,
|
|
|
|
// and the document, to do "summation of paragraphs".
|
|
|
|
SdrOutliner& rOutl = mpDoc->GetDrawOutliner();
|
2015-03-24 16:05:55 +02:00
|
|
|
EEControlBits nControlWord = rOutl.GetEditEngine().GetControlWord();
|
|
|
|
nControlWord |= EEControlBits::ULSPACESUMMATION;
|
|
|
|
nControlWord &=~ EEControlBits::ULSPACEFIRSTPARA;
|
2017-06-03 21:11:22 +02:00
|
|
|
const_cast<EditEngine&>(rOutl.GetEditEngine()).SetControlWord( nControlWord );
|
2014-10-02 16:52:54 +03:00
|
|
|
|
2015-08-20 12:58:15 +02:00
|
|
|
mpDoc->SetSummationOfParagraphs();
|
2014-10-02 16:52:54 +03:00
|
|
|
}
|
|
|
|
|
2014-04-24 10:52:02 +02:00
|
|
|
const bool bRet = SfxObjectShell::ImportFrom(rMedium, xInsertPosition);
|
2010-10-13 18:03:02 +02:00
|
|
|
|
|
|
|
SfxItemSet* pSet = rMedium.GetItemSet();
|
|
|
|
if( pSet )
|
|
|
|
{
|
2014-09-10 17:53:41 +02:00
|
|
|
if( SfxItemState::SET == pSet->GetItemState(SID_DOC_STARTPRESENTATION)&&
|
2014-10-28 14:57:38 +02:00
|
|
|
static_cast<const SfxBoolItem&>( pSet->Get( SID_DOC_STARTPRESENTATION ) ).GetValue() )
|
2010-10-13 18:03:02 +02:00
|
|
|
{
|
|
|
|
mpDoc->SetStartWithPresentation( true );
|
|
|
|
|
|
|
|
// tell SFX to change viewshell when in preview mode
|
|
|
|
if( IsPreview() )
|
|
|
|
{
|
|
|
|
SfxItemSet *pMediumSet = GetMedium()->GetItemSet();
|
|
|
|
if( pMediumSet )
|
|
|
|
pMediumSet->Put( SfxUInt16Item( SID_VIEW_ID, 1 ) );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return bRet;
|
|
|
|
}
|
|
|
|
|
2013-03-10 16:46:07 +01:00
|
|
|
/**
|
|
|
|
* load from a foreign format
|
|
|
|
*/
|
2014-03-17 13:38:26 +02:00
|
|
|
bool DrawDocShell::ConvertFrom( SfxMedium& rMedium )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2014-03-17 13:38:26 +02:00
|
|
|
const OUString aFilterName( rMedium.GetFilter()->GetFilterName() );
|
|
|
|
bool bRet = false;
|
|
|
|
bool bStartPresentation = false;
|
2001-02-13 11:17:06 +00:00
|
|
|
|
2014-03-17 13:38:26 +02:00
|
|
|
SetWaitCursor( true );
|
2001-02-13 11:17:06 +00:00
|
|
|
|
2006-03-10 15:18:21 +00:00
|
|
|
SfxItemSet* pSet = rMedium.GetItemSet();
|
|
|
|
if( pSet )
|
|
|
|
{
|
2014-10-28 14:57:38 +02:00
|
|
|
if( ( SfxItemState::SET == pSet->GetItemState(SID_PREVIEW ) ) && static_cast<const SfxBoolItem&>( pSet->Get( SID_PREVIEW ) ).GetValue() )
|
2006-03-10 15:18:21 +00:00
|
|
|
{
|
2014-03-10 11:09:59 +02:00
|
|
|
mpDoc->SetStarDrawPreviewMode( true );
|
2006-03-10 15:18:21 +00:00
|
|
|
}
|
|
|
|
|
2014-09-10 17:53:41 +02:00
|
|
|
if( SfxItemState::SET == pSet->GetItemState(SID_DOC_STARTPRESENTATION)&&
|
2014-10-28 14:57:38 +02:00
|
|
|
static_cast<const SfxBoolItem&>( pSet->Get( SID_DOC_STARTPRESENTATION ) ).GetValue() )
|
2006-03-10 15:18:21 +00:00
|
|
|
{
|
|
|
|
bStartPresentation = true;
|
2006-12-12 16:12:22 +00:00
|
|
|
mpDoc->SetStartWithPresentation( true );
|
2006-03-10 15:18:21 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-10-13 18:03:02 +02:00
|
|
|
if( aFilterName == pFilterPowerPoint97
|
|
|
|
|| aFilterName == pFilterPowerPoint97Template
|
|
|
|
|| aFilterName == pFilterPowerPoint97AutoPlay)
|
2001-02-13 11:17:06 +00:00
|
|
|
{
|
2006-12-12 16:12:22 +00:00
|
|
|
mpDoc->StopWorkStartupDelay();
|
2016-03-18 08:09:25 +02:00
|
|
|
bRet = SdPPTFilter( rMedium, *this ).Import();
|
2001-02-13 11:17:06 +00:00
|
|
|
}
|
2012-07-08 17:16:27 +07:00
|
|
|
else if (aFilterName.indexOf("impress8") >= 0 ||
|
|
|
|
aFilterName.indexOf("draw8") >= 0)
|
2001-02-13 11:17:06 +00:00
|
|
|
{
|
2004-10-04 17:30:29 +00:00
|
|
|
// TODO/LATER: nobody is interested in the error code?!
|
2006-12-12 16:12:22 +00:00
|
|
|
mpDoc->CreateFirstPages();
|
|
|
|
mpDoc->StopWorkStartupDelay();
|
2004-10-04 17:30:29 +00:00
|
|
|
ErrCode nError = ERRCODE_NONE;
|
2016-03-18 08:09:25 +02:00
|
|
|
bRet = SdXMLFilter( rMedium, *this ).Import( nError );
|
2004-10-04 17:30:29 +00:00
|
|
|
|
2001-02-13 11:17:06 +00:00
|
|
|
}
|
2012-07-08 17:16:27 +07:00
|
|
|
else if (aFilterName.indexOf("StarOffice XML (Draw)") >= 0 ||
|
|
|
|
aFilterName.indexOf("StarOffice XML (Impress)") >= 0)
|
2004-07-13 06:44:12 +00:00
|
|
|
{
|
2004-10-04 17:30:29 +00:00
|
|
|
// TODO/LATER: nobody is interested in the error code?!
|
2006-12-12 16:12:22 +00:00
|
|
|
mpDoc->CreateFirstPages();
|
|
|
|
mpDoc->StopWorkStartupDelay();
|
2004-10-04 17:30:29 +00:00
|
|
|
ErrCode nError = ERRCODE_NONE;
|
2016-03-18 08:09:25 +02:00
|
|
|
bRet = SdXMLFilter( rMedium, *this, SDXMLMODE_Normal, SOFFICE_FILEFORMAT_60 ).Import( nError );
|
2004-07-13 06:44:12 +00:00
|
|
|
}
|
2014-12-18 13:30:26 +01:00
|
|
|
else if( aFilterName == "CGM - Computer Graphics Metafile" )
|
2001-02-13 11:17:06 +00:00
|
|
|
{
|
2006-12-12 16:12:22 +00:00
|
|
|
mpDoc->CreateFirstPages();
|
|
|
|
mpDoc->StopWorkStartupDelay();
|
2016-03-18 08:09:25 +02:00
|
|
|
bRet = SdCGMFilter( rMedium, *this ).Import();
|
2001-02-13 11:17:06 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2006-12-12 16:12:22 +00:00
|
|
|
mpDoc->CreateFirstPages();
|
|
|
|
mpDoc->StopWorkStartupDelay();
|
2006-11-14 13:26:45 +00:00
|
|
|
bRet = SdGRFFilter( rMedium, *this ).Import();
|
2001-02-13 11:17:06 +00:00
|
|
|
}
|
|
|
|
|
2015-10-20 11:46:24 +02:00
|
|
|
FinishedLoading();
|
2001-02-13 11:17:06 +00:00
|
|
|
|
2001-08-07 12:36:07 +00:00
|
|
|
// tell SFX to change viewshell when in preview mode
|
|
|
|
if( IsPreview() )
|
|
|
|
{
|
2006-12-12 16:12:22 +00:00
|
|
|
SfxItemSet *pMediumSet = GetMedium()->GetItemSet();
|
2001-08-07 12:36:07 +00:00
|
|
|
|
2006-12-12 16:12:22 +00:00
|
|
|
if( pMediumSet )
|
|
|
|
pMediumSet->Put( SfxUInt16Item( SID_VIEW_ID, 5 ) );
|
2001-08-07 12:36:07 +00:00
|
|
|
}
|
2014-03-17 13:38:26 +02:00
|
|
|
SetWaitCursor( false );
|
2001-02-13 11:17:06 +00:00
|
|
|
|
2006-03-10 15:18:21 +00:00
|
|
|
// tell SFX to change viewshell when in preview mode
|
|
|
|
if( IsPreview() || bStartPresentation )
|
|
|
|
{
|
2006-12-12 16:12:22 +00:00
|
|
|
SfxItemSet *pMediumSet = GetMedium()->GetItemSet();
|
|
|
|
if( pMediumSet )
|
|
|
|
pMediumSet->Put( SfxUInt16Item( SID_VIEW_ID, bStartPresentation ? 1 : 5 ) );
|
2006-03-10 15:18:21 +00:00
|
|
|
}
|
|
|
|
|
2001-02-13 11:17:06 +00:00
|
|
|
return bRet;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2013-03-10 16:46:07 +01:00
|
|
|
/**
|
|
|
|
* Writes pools and document to the open streams
|
|
|
|
*/
|
2014-03-17 13:38:26 +02:00
|
|
|
bool DrawDocShell::Save()
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2006-12-12 16:12:22 +00:00
|
|
|
mpDoc->StopWorkStartupDelay();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2004-10-04 17:30:29 +00:00
|
|
|
//TODO/LATER: why this?!
|
2015-04-09 15:24:21 +02:00
|
|
|
if( GetCreateMode() == SfxObjectCreateMode::STANDARD )
|
2017-03-30 20:27:55 +02:00
|
|
|
SfxObjectShell::SetVisArea( ::tools::Rectangle() );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2014-03-17 13:38:26 +02:00
|
|
|
bool bRet = SfxObjectShell::Save();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
if( bRet )
|
2016-03-18 08:09:25 +02:00
|
|
|
bRet = SdXMLFilter( *GetMedium(), *this, SDXMLMODE_Normal, SotStorage::GetVersion( GetMedium()->GetStorage() ) ).Export();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
return bRet;
|
|
|
|
}
|
|
|
|
|
2013-03-10 16:46:07 +01:00
|
|
|
/**
|
|
|
|
* Writes pools and document to the provided storage
|
|
|
|
*/
|
2014-03-17 13:38:26 +02:00
|
|
|
bool DrawDocShell::SaveAs( SfxMedium& rMedium )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2013-11-28 12:09:19 +00:00
|
|
|
mpDoc->setDocAccTitle(OUString());
|
|
|
|
SfxViewFrame* pFrame1 = SfxViewFrame::GetFirst( this );
|
|
|
|
if (pFrame1)
|
|
|
|
{
|
2014-09-23 11:20:40 +02:00
|
|
|
vcl::Window* pWindow = &pFrame1->GetWindow();
|
2013-11-28 12:09:19 +00:00
|
|
|
if ( pWindow )
|
|
|
|
{
|
2014-09-23 11:20:40 +02:00
|
|
|
vcl::Window* pSysWin = pWindow->GetSystemWindow();
|
2013-11-28 12:09:19 +00:00
|
|
|
if ( pSysWin )
|
|
|
|
{
|
|
|
|
pSysWin->SetAccessibleName(OUString());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2006-12-12 16:12:22 +00:00
|
|
|
mpDoc->StopWorkStartupDelay();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2016-05-31 22:11:21 +03:00
|
|
|
//With custom animation, if Outliner is modified, update text before saving
|
|
|
|
if( mpViewShell )
|
|
|
|
{
|
|
|
|
SdPage* pPage = mpViewShell->getCurrentPage();
|
|
|
|
if( pPage && pPage->getMainSequence()->getCount() )
|
|
|
|
{
|
|
|
|
SdrObject* pObj = mpViewShell->GetView()->GetTextEditObject();
|
|
|
|
SdrOutliner* pOutl = mpViewShell->GetView()->GetTextEditOutliner();
|
|
|
|
if( pObj && pOutl && pOutl->IsModified() )
|
|
|
|
{
|
|
|
|
OutlinerParaObject* pNewText = pOutl->CreateParaObject( 0, pOutl->GetParagraphCount() );
|
|
|
|
pObj->SetOutlinerParaObject( pNewText );
|
|
|
|
pOutl->ClearModifyFlag();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2004-10-04 17:30:29 +00:00
|
|
|
//TODO/LATER: why this?!
|
2015-04-09 15:24:21 +02:00
|
|
|
if( GetCreateMode() == SfxObjectCreateMode::STANDARD )
|
2017-03-30 20:27:55 +02:00
|
|
|
SfxObjectShell::SetVisArea( ::tools::Rectangle() );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2017-06-25 19:10:54 +02:00
|
|
|
bool bRet = SfxObjectShell::SaveAs( rMedium );
|
2001-02-13 11:17:06 +00:00
|
|
|
|
|
|
|
if( bRet )
|
2016-03-18 08:09:25 +02:00
|
|
|
bRet = SdXMLFilter( rMedium, *this, SDXMLMODE_Normal, SotStorage::GetVersion( rMedium.GetStorage() ) ).Export();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2001-02-13 11:17:06 +00:00
|
|
|
if( GetError() == ERRCODE_NONE )
|
2017-06-25 19:10:54 +02:00
|
|
|
SetError(ERRCODE_NONE);
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2001-02-13 11:17:06 +00:00
|
|
|
return bRet;
|
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2013-03-10 16:46:07 +01:00
|
|
|
/**
|
|
|
|
* save to foreign format
|
|
|
|
*/
|
2014-03-17 13:38:26 +02:00
|
|
|
bool DrawDocShell::ConvertTo( SfxMedium& rMedium )
|
2001-02-13 11:17:06 +00:00
|
|
|
{
|
2014-03-17 13:38:26 +02:00
|
|
|
bool bRet = false;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2006-12-12 16:12:22 +00:00
|
|
|
if( mpDoc->GetPageCount() )
|
2001-02-13 11:17:06 +00:00
|
|
|
{
|
2016-03-11 06:43:06 +01:00
|
|
|
std::shared_ptr<const SfxFilter> pMediumFilter = rMedium.GetFilter();
|
2013-04-07 12:06:47 +02:00
|
|
|
const OUString aTypeName( pMediumFilter->GetTypeName() );
|
2017-01-25 13:12:03 +00:00
|
|
|
std::unique_ptr<SdFilter> xFilter;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2012-07-08 17:16:27 +07:00
|
|
|
if( aTypeName.indexOf( "graphic_HTML" ) >= 0 )
|
2002-04-18 14:48:12 +00:00
|
|
|
{
|
2017-01-25 16:38:32 +01:00
|
|
|
xFilter = o3tl::make_unique<SdHTMLFilter>(rMedium, *this);
|
2002-04-18 14:48:12 +00:00
|
|
|
}
|
2012-07-08 17:16:27 +07:00
|
|
|
else if( aTypeName.indexOf( "MS_PowerPoint_97" ) >= 0 )
|
2001-02-13 11:17:06 +00:00
|
|
|
{
|
2017-01-25 16:38:32 +01:00
|
|
|
xFilter = o3tl::make_unique<SdPPTFilter>(rMedium, *this);
|
2017-01-25 13:12:03 +00:00
|
|
|
static_cast<SdPPTFilter*>(xFilter.get())->PreSaveBasic();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
2012-07-08 17:16:27 +07:00
|
|
|
else if ( aTypeName.indexOf( "CGM_Computer_Graphics_Metafile" ) >= 0 )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2017-01-25 16:38:32 +01:00
|
|
|
xFilter = o3tl::make_unique<SdCGMFilter>(rMedium, *this);
|
2001-02-13 11:17:06 +00:00
|
|
|
}
|
2012-07-08 17:16:27 +07:00
|
|
|
else if( aTypeName.indexOf( "draw8" ) >= 0 ||
|
|
|
|
aTypeName.indexOf( "impress8" ) >= 0 )
|
2001-02-13 11:17:06 +00:00
|
|
|
{
|
2017-01-25 16:38:32 +01:00
|
|
|
xFilter = o3tl::make_unique<SdXMLFilter>(rMedium, *this);
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
2012-07-08 17:16:27 +07:00
|
|
|
else if( aTypeName.indexOf( "StarOffice_XML_Impress" ) >= 0 ||
|
|
|
|
aTypeName.indexOf( "StarOffice_XML_Draw" ) >= 0 )
|
2004-07-13 06:44:12 +00:00
|
|
|
{
|
2017-01-25 16:38:32 +01:00
|
|
|
xFilter = o3tl::make_unique<SdXMLFilter>(rMedium, *this, SDXMLMODE_Normal, SOFFICE_FILEFORMAT_60);
|
2004-07-13 06:44:12 +00:00
|
|
|
}
|
2002-04-18 14:48:12 +00:00
|
|
|
else
|
|
|
|
{
|
2017-01-25 16:38:32 +01:00
|
|
|
xFilter = o3tl::make_unique<SdGRFFilter>(rMedium, *this);
|
2002-04-18 14:48:12 +00:00
|
|
|
}
|
2000-10-30 10:50:43 +00:00
|
|
|
|
2017-01-25 13:12:03 +00:00
|
|
|
if (xFilter)
|
2001-02-13 11:17:06 +00:00
|
|
|
{
|
2015-04-24 12:24:36 +02:00
|
|
|
const SdrSwapGraphicsMode nOldSwapMode = mpDoc->GetSwapGraphicsMode();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2015-04-24 12:24:36 +02:00
|
|
|
mpDoc->SetSwapGraphicsMode( SdrSwapGraphicsMode::TEMP );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2017-03-14 02:54:33 +05:30
|
|
|
if ( mpViewShell )
|
|
|
|
{
|
|
|
|
::sd::View* pView = mpViewShell->GetView();
|
|
|
|
if ( pView->IsTextEdit() )
|
|
|
|
pView->SdrEndTextEdit();
|
|
|
|
}
|
|
|
|
|
2017-01-25 13:12:03 +00:00
|
|
|
bRet = xFilter->Export();
|
2006-12-12 16:12:22 +00:00
|
|
|
if( !bRet )
|
|
|
|
mpDoc->SetSwapGraphicsMode( nOldSwapMode );
|
2001-02-13 11:17:06 +00:00
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
2001-02-13 11:17:06 +00:00
|
|
|
|
2015-08-04 07:51:32 -03:00
|
|
|
return bRet;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2013-03-10 16:46:07 +01:00
|
|
|
/**
|
|
|
|
* Reopen own streams to ensure that nobody else can prevent use from opening
|
|
|
|
* them.
|
|
|
|
*/
|
2015-10-28 12:01:32 +02:00
|
|
|
bool DrawDocShell::SaveCompleted( const css::uno::Reference< css::embed::XStorage >& xStorage )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2014-03-17 13:38:26 +02:00
|
|
|
bool bRet = false;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2004-10-04 17:30:29 +00:00
|
|
|
if( SfxObjectShell::SaveCompleted(xStorage) )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2014-04-24 10:52:02 +02:00
|
|
|
mpDoc->NbcSetChanged( false );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2006-12-12 16:12:22 +00:00
|
|
|
if( mpViewShell )
|
2001-04-20 08:45:44 +00:00
|
|
|
{
|
2015-09-30 16:10:07 +02:00
|
|
|
if( dynamic_cast< OutlineViewShell *>( mpViewShell ) != nullptr )
|
2006-12-12 16:12:22 +00:00
|
|
|
static_cast<OutlineView*>(mpViewShell->GetView())
|
2014-06-18 12:14:29 +02:00
|
|
|
->GetOutliner().ClearModifyFlag();
|
2001-04-20 08:45:44 +00:00
|
|
|
|
2006-12-12 16:12:22 +00:00
|
|
|
SdrOutliner* pOutl = mpViewShell->GetView()->GetTextEditOutliner();
|
2001-04-20 08:45:44 +00:00
|
|
|
if( pOutl )
|
2001-05-16 11:30:45 +00:00
|
|
|
{
|
2006-12-12 16:12:22 +00:00
|
|
|
SdrObject* pObj = mpViewShell->GetView()->GetTextEditObject();
|
2001-05-16 11:30:45 +00:00
|
|
|
if( pObj )
|
|
|
|
pObj->NbcSetOutlinerParaObject( pOutl->CreateParaObject() );
|
|
|
|
|
2001-04-20 08:45:44 +00:00
|
|
|
pOutl->ClearModifyFlag();
|
2001-05-16 11:30:45 +00:00
|
|
|
}
|
2001-04-20 08:45:44 +00:00
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2014-03-17 13:38:26 +02:00
|
|
|
bRet = true;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2006-12-12 16:12:22 +00:00
|
|
|
SfxViewFrame* pFrame = ( mpViewShell && mpViewShell->GetViewFrame() ) ?
|
|
|
|
mpViewShell->GetViewFrame() :
|
2001-03-21 10:46:52 +00:00
|
|
|
SfxViewFrame::Current();
|
|
|
|
|
|
|
|
if( pFrame )
|
2015-08-20 12:58:15 +02:00
|
|
|
pFrame->GetBindings().Invalidate( SID_NAVIGATOR_STATE, true );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
return bRet;
|
|
|
|
}
|
|
|
|
|
2004-02-02 09:54:17 +00:00
|
|
|
SfxStyleSheetBasePool* DrawDocShell::GetStyleSheetPool()
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2015-05-11 12:50:39 +02:00
|
|
|
return mpDoc->GetStyleSheetPool();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2014-04-24 10:52:02 +02:00
|
|
|
bool DrawDocShell::GotoBookmark(const OUString& rBookmark)
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2014-04-24 10:52:02 +02:00
|
|
|
bool bFound = false;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2015-09-30 16:10:07 +02:00
|
|
|
if (mpViewShell && dynamic_cast< const DrawViewShell *>( mpViewShell ) != nullptr)
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2007-04-03 14:42:53 +00:00
|
|
|
DrawViewShell* pDrawViewShell = static_cast<DrawViewShell*>(mpViewShell);
|
|
|
|
ViewShellBase& rBase (mpViewShell->GetViewShellBase());
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2014-04-24 10:52:02 +02:00
|
|
|
bool bIsMasterPage = false;
|
2011-01-17 11:41:00 +01:00
|
|
|
sal_uInt16 nPageNumber = SDRPAGE_NOTFOUND;
|
2015-11-10 10:23:02 +01:00
|
|
|
SdrObject* pObj = nullptr;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2013-04-07 12:06:47 +02:00
|
|
|
const OUString sInteraction( "action?" );
|
2016-04-12 16:39:03 +02:00
|
|
|
if ( rBookmark.match( sInteraction ) )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2013-04-07 12:06:47 +02:00
|
|
|
const OUString sJump( "jump=" );
|
2016-04-12 16:39:03 +02:00
|
|
|
if ( rBookmark.match( sJump, sInteraction.getLength() ) )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2016-04-12 16:39:03 +02:00
|
|
|
OUString aDestination( rBookmark.copy( sInteraction.getLength() + sJump.getLength() ) );
|
2012-04-13 19:37:04 -03:00
|
|
|
if ( aDestination.match( "firstslide" ) )
|
CWS-TOOLING: integrate CWS impress172
2009-07-30 15:29:39 +0200 cl r274492 : #i102921# remove reference to inssrc.obj which was moved to svx
2009-07-29 11:40:35 +0200 wg r274445 : i103869
2009-07-22 14:39:13 +0200 sj r274241 : #i102713# fixed cloud shape
2009-07-07 15:28:04 +0200 sj r273800 : fixed build problem
2009-07-07 13:27:13 +0200 cl r273792 : #i102921# moved insert col/rows dialog to svx
2009-07-07 10:36:05 +0200 cl r273782 : fixed compiler warnings
2009-07-02 10:40:21 +0200 sj r273626 : fixed build problem
2009-07-02 10:27:56 +0200 cl r273624 : fixed merge problem
2009-07-02 10:27:19 +0200 cl r273623 : fixed compiler warning
2009-07-01 10:04:58 +0200 cl r273550 : CWS-TOOLING: rebase CWS impress172 to trunk@273468 (milestone: DEV300:m51)
2009-06-30 16:22:02 +0200 cl r273518 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:20:46 +0200 cl r273517 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:20:28 +0200 cl r273516 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:19:49 +0200 cl r273515 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:19:28 +0200 cl r273514 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:17:38 +0200 cl r273513 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:45:44 +0200 cl r273511 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:37:16 +0200 cl r273510 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:33:47 +0200 cl r273509 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:32:10 +0200 cl r273508 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:30:05 +0200 cl r273507 : #i102921# added insert table row/col dialog for impress tables
2009-06-29 12:32:42 +0200 sj r273465 : #158632# fixed textrange hyperlinks to specific pages, added slide names
2009-06-24 15:17:59 +0200 sj r273349 : #158636# fixed text range hyperlink to first/last slide
2009-06-22 13:18:30 +0200 sj r273224 : #158651# fixed header footer import
2009-06-19 15:18:24 +0200 sj r273160 : #158614# default text of presentation objects now cleared
2009-06-16 15:54:19 +0200 sj r273023 : #i101545# fixed crash - bracketing of graphic links has been done twice leading to a broken graphic state stack
2009-06-15 16:26:26 +0200 sj r272998 : #158635# importing bookmark interactions: firstslide, lastslide, nextslide, previousslide
2009-06-15 16:25:26 +0200 sj r272997 : #158635# added bookmark interactions: firstslide, lastslide, nextslide, previousslide
2009-06-12 13:17:32 +0200 sj r272915 : #i102713# fixed cloud shape
2009-06-10 18:36:58 +0200 sj r272833 : #158674# fixed curvedleftarrow, curvedrightarrow, curveddownarrow, curveduparrow
2009-06-08 19:52:28 +0200 sj r272746 : #158674# fixed curvedleftarrow, curvedrightarrow, curveddownarrow, curveduparrow
2009-06-04 15:28:32 +0200 cl r272640 : #i102358# applied patch to remove warnings
2009-06-04 14:39:45 +0200 cl r272630 : #i99423# applied path to change impress wizard create button to open when opening exisitng documents
2009-06-03 18:21:26 +0200 sj r272601 : #158635# now using the correct paragraph bottom spacing. using font independent linespacing for impress text objects
2009-06-03 15:47:27 +0200 cl r272583 : #i101817# added color collection based on scribus
2009-06-03 14:43:59 +0200 cl r272580 : #i102163# use weak ref to SdrObject instead of listening to the model
2009-06-03 12:39:29 +0200 cl r272556 : #i93308# correct namespace for com.sun.star.text.textfields
2009-06-03 12:27:00 +0200 cl r272555 : #i93308# correct namespace for com.sun.star.text.textfields
2009-06-03 11:33:44 +0200 cl r272553 : #i23221# allow all settings (that make sense) for presentation styles
2009-06-03 11:30:59 +0200 cl r272552 : #i23221# allow all settings (that make sense) for presentation styles
2009-06-03 11:30:22 +0200 cl r272551 : #i23221# allow all settings (that make sense) for presentation styles
2009-06-02 18:41:07 +0200 sj r272527 : #i28358# applied patch (better conversion of dotted lines)
2009-06-02 11:52:13 +0200 cl r272491 : #i98668# applied patch to fix possible endless loop if exception occours
2009-05-28 17:02:55 +0200 sj r272416 : #i102336# retaining graphic file names unchanged
2009-05-28 17:00:25 +0200 sj r272415 : #i102336# retaining graphic file names unchanged
2009-05-28 17:00:10 +0200 sj r272414 : #i102336# retaining graphic file names unchanged
2009-05-25 12:43:58 +0200 sj r272232 : #i102069# added patch from thb (fixed rotated group objects)
2009-08-05 17:01:07 +00:00
|
|
|
{
|
|
|
|
nPageNumber = 1;
|
|
|
|
}
|
2012-04-13 19:37:04 -03:00
|
|
|
else if ( aDestination.match( "lastslide" ) )
|
CWS-TOOLING: integrate CWS impress172
2009-07-30 15:29:39 +0200 cl r274492 : #i102921# remove reference to inssrc.obj which was moved to svx
2009-07-29 11:40:35 +0200 wg r274445 : i103869
2009-07-22 14:39:13 +0200 sj r274241 : #i102713# fixed cloud shape
2009-07-07 15:28:04 +0200 sj r273800 : fixed build problem
2009-07-07 13:27:13 +0200 cl r273792 : #i102921# moved insert col/rows dialog to svx
2009-07-07 10:36:05 +0200 cl r273782 : fixed compiler warnings
2009-07-02 10:40:21 +0200 sj r273626 : fixed build problem
2009-07-02 10:27:56 +0200 cl r273624 : fixed merge problem
2009-07-02 10:27:19 +0200 cl r273623 : fixed compiler warning
2009-07-01 10:04:58 +0200 cl r273550 : CWS-TOOLING: rebase CWS impress172 to trunk@273468 (milestone: DEV300:m51)
2009-06-30 16:22:02 +0200 cl r273518 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:20:46 +0200 cl r273517 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:20:28 +0200 cl r273516 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:19:49 +0200 cl r273515 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:19:28 +0200 cl r273514 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:17:38 +0200 cl r273513 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:45:44 +0200 cl r273511 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:37:16 +0200 cl r273510 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:33:47 +0200 cl r273509 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:32:10 +0200 cl r273508 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:30:05 +0200 cl r273507 : #i102921# added insert table row/col dialog for impress tables
2009-06-29 12:32:42 +0200 sj r273465 : #158632# fixed textrange hyperlinks to specific pages, added slide names
2009-06-24 15:17:59 +0200 sj r273349 : #158636# fixed text range hyperlink to first/last slide
2009-06-22 13:18:30 +0200 sj r273224 : #158651# fixed header footer import
2009-06-19 15:18:24 +0200 sj r273160 : #158614# default text of presentation objects now cleared
2009-06-16 15:54:19 +0200 sj r273023 : #i101545# fixed crash - bracketing of graphic links has been done twice leading to a broken graphic state stack
2009-06-15 16:26:26 +0200 sj r272998 : #158635# importing bookmark interactions: firstslide, lastslide, nextslide, previousslide
2009-06-15 16:25:26 +0200 sj r272997 : #158635# added bookmark interactions: firstslide, lastslide, nextslide, previousslide
2009-06-12 13:17:32 +0200 sj r272915 : #i102713# fixed cloud shape
2009-06-10 18:36:58 +0200 sj r272833 : #158674# fixed curvedleftarrow, curvedrightarrow, curveddownarrow, curveduparrow
2009-06-08 19:52:28 +0200 sj r272746 : #158674# fixed curvedleftarrow, curvedrightarrow, curveddownarrow, curveduparrow
2009-06-04 15:28:32 +0200 cl r272640 : #i102358# applied patch to remove warnings
2009-06-04 14:39:45 +0200 cl r272630 : #i99423# applied path to change impress wizard create button to open when opening exisitng documents
2009-06-03 18:21:26 +0200 sj r272601 : #158635# now using the correct paragraph bottom spacing. using font independent linespacing for impress text objects
2009-06-03 15:47:27 +0200 cl r272583 : #i101817# added color collection based on scribus
2009-06-03 14:43:59 +0200 cl r272580 : #i102163# use weak ref to SdrObject instead of listening to the model
2009-06-03 12:39:29 +0200 cl r272556 : #i93308# correct namespace for com.sun.star.text.textfields
2009-06-03 12:27:00 +0200 cl r272555 : #i93308# correct namespace for com.sun.star.text.textfields
2009-06-03 11:33:44 +0200 cl r272553 : #i23221# allow all settings (that make sense) for presentation styles
2009-06-03 11:30:59 +0200 cl r272552 : #i23221# allow all settings (that make sense) for presentation styles
2009-06-03 11:30:22 +0200 cl r272551 : #i23221# allow all settings (that make sense) for presentation styles
2009-06-02 18:41:07 +0200 sj r272527 : #i28358# applied patch (better conversion of dotted lines)
2009-06-02 11:52:13 +0200 cl r272491 : #i98668# applied patch to fix possible endless loop if exception occours
2009-05-28 17:02:55 +0200 sj r272416 : #i102336# retaining graphic file names unchanged
2009-05-28 17:00:25 +0200 sj r272415 : #i102336# retaining graphic file names unchanged
2009-05-28 17:00:10 +0200 sj r272414 : #i102336# retaining graphic file names unchanged
2009-05-25 12:43:58 +0200 sj r272232 : #i102069# added patch from thb (fixed rotated group objects)
2009-08-05 17:01:07 +00:00
|
|
|
{
|
|
|
|
nPageNumber = mpDoc->GetPageCount() - 2;
|
|
|
|
}
|
2012-04-13 19:37:04 -03:00
|
|
|
else if ( aDestination.match( "previousslide" ) )
|
CWS-TOOLING: integrate CWS impress172
2009-07-30 15:29:39 +0200 cl r274492 : #i102921# remove reference to inssrc.obj which was moved to svx
2009-07-29 11:40:35 +0200 wg r274445 : i103869
2009-07-22 14:39:13 +0200 sj r274241 : #i102713# fixed cloud shape
2009-07-07 15:28:04 +0200 sj r273800 : fixed build problem
2009-07-07 13:27:13 +0200 cl r273792 : #i102921# moved insert col/rows dialog to svx
2009-07-07 10:36:05 +0200 cl r273782 : fixed compiler warnings
2009-07-02 10:40:21 +0200 sj r273626 : fixed build problem
2009-07-02 10:27:56 +0200 cl r273624 : fixed merge problem
2009-07-02 10:27:19 +0200 cl r273623 : fixed compiler warning
2009-07-01 10:04:58 +0200 cl r273550 : CWS-TOOLING: rebase CWS impress172 to trunk@273468 (milestone: DEV300:m51)
2009-06-30 16:22:02 +0200 cl r273518 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:20:46 +0200 cl r273517 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:20:28 +0200 cl r273516 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:19:49 +0200 cl r273515 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:19:28 +0200 cl r273514 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:17:38 +0200 cl r273513 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:45:44 +0200 cl r273511 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:37:16 +0200 cl r273510 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:33:47 +0200 cl r273509 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:32:10 +0200 cl r273508 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:30:05 +0200 cl r273507 : #i102921# added insert table row/col dialog for impress tables
2009-06-29 12:32:42 +0200 sj r273465 : #158632# fixed textrange hyperlinks to specific pages, added slide names
2009-06-24 15:17:59 +0200 sj r273349 : #158636# fixed text range hyperlink to first/last slide
2009-06-22 13:18:30 +0200 sj r273224 : #158651# fixed header footer import
2009-06-19 15:18:24 +0200 sj r273160 : #158614# default text of presentation objects now cleared
2009-06-16 15:54:19 +0200 sj r273023 : #i101545# fixed crash - bracketing of graphic links has been done twice leading to a broken graphic state stack
2009-06-15 16:26:26 +0200 sj r272998 : #158635# importing bookmark interactions: firstslide, lastslide, nextslide, previousslide
2009-06-15 16:25:26 +0200 sj r272997 : #158635# added bookmark interactions: firstslide, lastslide, nextslide, previousslide
2009-06-12 13:17:32 +0200 sj r272915 : #i102713# fixed cloud shape
2009-06-10 18:36:58 +0200 sj r272833 : #158674# fixed curvedleftarrow, curvedrightarrow, curveddownarrow, curveduparrow
2009-06-08 19:52:28 +0200 sj r272746 : #158674# fixed curvedleftarrow, curvedrightarrow, curveddownarrow, curveduparrow
2009-06-04 15:28:32 +0200 cl r272640 : #i102358# applied patch to remove warnings
2009-06-04 14:39:45 +0200 cl r272630 : #i99423# applied path to change impress wizard create button to open when opening exisitng documents
2009-06-03 18:21:26 +0200 sj r272601 : #158635# now using the correct paragraph bottom spacing. using font independent linespacing for impress text objects
2009-06-03 15:47:27 +0200 cl r272583 : #i101817# added color collection based on scribus
2009-06-03 14:43:59 +0200 cl r272580 : #i102163# use weak ref to SdrObject instead of listening to the model
2009-06-03 12:39:29 +0200 cl r272556 : #i93308# correct namespace for com.sun.star.text.textfields
2009-06-03 12:27:00 +0200 cl r272555 : #i93308# correct namespace for com.sun.star.text.textfields
2009-06-03 11:33:44 +0200 cl r272553 : #i23221# allow all settings (that make sense) for presentation styles
2009-06-03 11:30:59 +0200 cl r272552 : #i23221# allow all settings (that make sense) for presentation styles
2009-06-03 11:30:22 +0200 cl r272551 : #i23221# allow all settings (that make sense) for presentation styles
2009-06-02 18:41:07 +0200 sj r272527 : #i28358# applied patch (better conversion of dotted lines)
2009-06-02 11:52:13 +0200 cl r272491 : #i98668# applied patch to fix possible endless loop if exception occours
2009-05-28 17:02:55 +0200 sj r272416 : #i102336# retaining graphic file names unchanged
2009-05-28 17:00:25 +0200 sj r272415 : #i102336# retaining graphic file names unchanged
2009-05-28 17:00:10 +0200 sj r272414 : #i102336# retaining graphic file names unchanged
2009-05-25 12:43:58 +0200 sj r272232 : #i102069# added patch from thb (fixed rotated group objects)
2009-08-05 17:01:07 +00:00
|
|
|
{
|
|
|
|
SdPage* pPage = pDrawViewShell->GetActualPage();
|
|
|
|
nPageNumber = pPage->GetPageNum();
|
|
|
|
nPageNumber = nPageNumber > 2 ? nPageNumber - 2 : SDRPAGE_NOTFOUND;
|
|
|
|
}
|
2012-04-13 19:37:04 -03:00
|
|
|
else if ( aDestination.match( "nextslide" ) )
|
CWS-TOOLING: integrate CWS impress172
2009-07-30 15:29:39 +0200 cl r274492 : #i102921# remove reference to inssrc.obj which was moved to svx
2009-07-29 11:40:35 +0200 wg r274445 : i103869
2009-07-22 14:39:13 +0200 sj r274241 : #i102713# fixed cloud shape
2009-07-07 15:28:04 +0200 sj r273800 : fixed build problem
2009-07-07 13:27:13 +0200 cl r273792 : #i102921# moved insert col/rows dialog to svx
2009-07-07 10:36:05 +0200 cl r273782 : fixed compiler warnings
2009-07-02 10:40:21 +0200 sj r273626 : fixed build problem
2009-07-02 10:27:56 +0200 cl r273624 : fixed merge problem
2009-07-02 10:27:19 +0200 cl r273623 : fixed compiler warning
2009-07-01 10:04:58 +0200 cl r273550 : CWS-TOOLING: rebase CWS impress172 to trunk@273468 (milestone: DEV300:m51)
2009-06-30 16:22:02 +0200 cl r273518 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:20:46 +0200 cl r273517 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:20:28 +0200 cl r273516 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:19:49 +0200 cl r273515 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:19:28 +0200 cl r273514 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:17:38 +0200 cl r273513 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:45:44 +0200 cl r273511 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:37:16 +0200 cl r273510 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:33:47 +0200 cl r273509 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:32:10 +0200 cl r273508 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:30:05 +0200 cl r273507 : #i102921# added insert table row/col dialog for impress tables
2009-06-29 12:32:42 +0200 sj r273465 : #158632# fixed textrange hyperlinks to specific pages, added slide names
2009-06-24 15:17:59 +0200 sj r273349 : #158636# fixed text range hyperlink to first/last slide
2009-06-22 13:18:30 +0200 sj r273224 : #158651# fixed header footer import
2009-06-19 15:18:24 +0200 sj r273160 : #158614# default text of presentation objects now cleared
2009-06-16 15:54:19 +0200 sj r273023 : #i101545# fixed crash - bracketing of graphic links has been done twice leading to a broken graphic state stack
2009-06-15 16:26:26 +0200 sj r272998 : #158635# importing bookmark interactions: firstslide, lastslide, nextslide, previousslide
2009-06-15 16:25:26 +0200 sj r272997 : #158635# added bookmark interactions: firstslide, lastslide, nextslide, previousslide
2009-06-12 13:17:32 +0200 sj r272915 : #i102713# fixed cloud shape
2009-06-10 18:36:58 +0200 sj r272833 : #158674# fixed curvedleftarrow, curvedrightarrow, curveddownarrow, curveduparrow
2009-06-08 19:52:28 +0200 sj r272746 : #158674# fixed curvedleftarrow, curvedrightarrow, curveddownarrow, curveduparrow
2009-06-04 15:28:32 +0200 cl r272640 : #i102358# applied patch to remove warnings
2009-06-04 14:39:45 +0200 cl r272630 : #i99423# applied path to change impress wizard create button to open when opening exisitng documents
2009-06-03 18:21:26 +0200 sj r272601 : #158635# now using the correct paragraph bottom spacing. using font independent linespacing for impress text objects
2009-06-03 15:47:27 +0200 cl r272583 : #i101817# added color collection based on scribus
2009-06-03 14:43:59 +0200 cl r272580 : #i102163# use weak ref to SdrObject instead of listening to the model
2009-06-03 12:39:29 +0200 cl r272556 : #i93308# correct namespace for com.sun.star.text.textfields
2009-06-03 12:27:00 +0200 cl r272555 : #i93308# correct namespace for com.sun.star.text.textfields
2009-06-03 11:33:44 +0200 cl r272553 : #i23221# allow all settings (that make sense) for presentation styles
2009-06-03 11:30:59 +0200 cl r272552 : #i23221# allow all settings (that make sense) for presentation styles
2009-06-03 11:30:22 +0200 cl r272551 : #i23221# allow all settings (that make sense) for presentation styles
2009-06-02 18:41:07 +0200 sj r272527 : #i28358# applied patch (better conversion of dotted lines)
2009-06-02 11:52:13 +0200 cl r272491 : #i98668# applied patch to fix possible endless loop if exception occours
2009-05-28 17:02:55 +0200 sj r272416 : #i102336# retaining graphic file names unchanged
2009-05-28 17:00:25 +0200 sj r272415 : #i102336# retaining graphic file names unchanged
2009-05-28 17:00:10 +0200 sj r272414 : #i102336# retaining graphic file names unchanged
2009-05-25 12:43:58 +0200 sj r272232 : #i102069# added patch from thb (fixed rotated group objects)
2009-08-05 17:01:07 +00:00
|
|
|
{
|
|
|
|
SdPage* pPage = pDrawViewShell->GetActualPage();
|
|
|
|
nPageNumber = pPage->GetPageNum() + 2;
|
|
|
|
if ( nPageNumber >= mpDoc->GetPageCount() )
|
|
|
|
nPageNumber = SDRPAGE_NOTFOUND;
|
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
CWS-TOOLING: integrate CWS impress172
2009-07-30 15:29:39 +0200 cl r274492 : #i102921# remove reference to inssrc.obj which was moved to svx
2009-07-29 11:40:35 +0200 wg r274445 : i103869
2009-07-22 14:39:13 +0200 sj r274241 : #i102713# fixed cloud shape
2009-07-07 15:28:04 +0200 sj r273800 : fixed build problem
2009-07-07 13:27:13 +0200 cl r273792 : #i102921# moved insert col/rows dialog to svx
2009-07-07 10:36:05 +0200 cl r273782 : fixed compiler warnings
2009-07-02 10:40:21 +0200 sj r273626 : fixed build problem
2009-07-02 10:27:56 +0200 cl r273624 : fixed merge problem
2009-07-02 10:27:19 +0200 cl r273623 : fixed compiler warning
2009-07-01 10:04:58 +0200 cl r273550 : CWS-TOOLING: rebase CWS impress172 to trunk@273468 (milestone: DEV300:m51)
2009-06-30 16:22:02 +0200 cl r273518 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:20:46 +0200 cl r273517 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:20:28 +0200 cl r273516 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:19:49 +0200 cl r273515 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:19:28 +0200 cl r273514 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:17:38 +0200 cl r273513 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:45:44 +0200 cl r273511 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:37:16 +0200 cl r273510 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:33:47 +0200 cl r273509 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:32:10 +0200 cl r273508 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:30:05 +0200 cl r273507 : #i102921# added insert table row/col dialog for impress tables
2009-06-29 12:32:42 +0200 sj r273465 : #158632# fixed textrange hyperlinks to specific pages, added slide names
2009-06-24 15:17:59 +0200 sj r273349 : #158636# fixed text range hyperlink to first/last slide
2009-06-22 13:18:30 +0200 sj r273224 : #158651# fixed header footer import
2009-06-19 15:18:24 +0200 sj r273160 : #158614# default text of presentation objects now cleared
2009-06-16 15:54:19 +0200 sj r273023 : #i101545# fixed crash - bracketing of graphic links has been done twice leading to a broken graphic state stack
2009-06-15 16:26:26 +0200 sj r272998 : #158635# importing bookmark interactions: firstslide, lastslide, nextslide, previousslide
2009-06-15 16:25:26 +0200 sj r272997 : #158635# added bookmark interactions: firstslide, lastslide, nextslide, previousslide
2009-06-12 13:17:32 +0200 sj r272915 : #i102713# fixed cloud shape
2009-06-10 18:36:58 +0200 sj r272833 : #158674# fixed curvedleftarrow, curvedrightarrow, curveddownarrow, curveduparrow
2009-06-08 19:52:28 +0200 sj r272746 : #158674# fixed curvedleftarrow, curvedrightarrow, curveddownarrow, curveduparrow
2009-06-04 15:28:32 +0200 cl r272640 : #i102358# applied patch to remove warnings
2009-06-04 14:39:45 +0200 cl r272630 : #i99423# applied path to change impress wizard create button to open when opening exisitng documents
2009-06-03 18:21:26 +0200 sj r272601 : #158635# now using the correct paragraph bottom spacing. using font independent linespacing for impress text objects
2009-06-03 15:47:27 +0200 cl r272583 : #i101817# added color collection based on scribus
2009-06-03 14:43:59 +0200 cl r272580 : #i102163# use weak ref to SdrObject instead of listening to the model
2009-06-03 12:39:29 +0200 cl r272556 : #i93308# correct namespace for com.sun.star.text.textfields
2009-06-03 12:27:00 +0200 cl r272555 : #i93308# correct namespace for com.sun.star.text.textfields
2009-06-03 11:33:44 +0200 cl r272553 : #i23221# allow all settings (that make sense) for presentation styles
2009-06-03 11:30:59 +0200 cl r272552 : #i23221# allow all settings (that make sense) for presentation styles
2009-06-03 11:30:22 +0200 cl r272551 : #i23221# allow all settings (that make sense) for presentation styles
2009-06-02 18:41:07 +0200 sj r272527 : #i28358# applied patch (better conversion of dotted lines)
2009-06-02 11:52:13 +0200 cl r272491 : #i98668# applied patch to fix possible endless loop if exception occours
2009-05-28 17:02:55 +0200 sj r272416 : #i102336# retaining graphic file names unchanged
2009-05-28 17:00:25 +0200 sj r272415 : #i102336# retaining graphic file names unchanged
2009-05-28 17:00:10 +0200 sj r272414 : #i102336# retaining graphic file names unchanged
2009-05-25 12:43:58 +0200 sj r272232 : #i102069# added patch from thb (fixed rotated group objects)
2009-08-05 17:01:07 +00:00
|
|
|
else
|
|
|
|
{
|
2013-03-10 16:46:07 +01:00
|
|
|
// Is the bookmark a page?
|
2016-04-12 16:39:03 +02:00
|
|
|
nPageNumber = mpDoc->GetPageByName( rBookmark, bIsMasterPage );
|
CWS-TOOLING: integrate CWS impress172
2009-07-30 15:29:39 +0200 cl r274492 : #i102921# remove reference to inssrc.obj which was moved to svx
2009-07-29 11:40:35 +0200 wg r274445 : i103869
2009-07-22 14:39:13 +0200 sj r274241 : #i102713# fixed cloud shape
2009-07-07 15:28:04 +0200 sj r273800 : fixed build problem
2009-07-07 13:27:13 +0200 cl r273792 : #i102921# moved insert col/rows dialog to svx
2009-07-07 10:36:05 +0200 cl r273782 : fixed compiler warnings
2009-07-02 10:40:21 +0200 sj r273626 : fixed build problem
2009-07-02 10:27:56 +0200 cl r273624 : fixed merge problem
2009-07-02 10:27:19 +0200 cl r273623 : fixed compiler warning
2009-07-01 10:04:58 +0200 cl r273550 : CWS-TOOLING: rebase CWS impress172 to trunk@273468 (milestone: DEV300:m51)
2009-06-30 16:22:02 +0200 cl r273518 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:20:46 +0200 cl r273517 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:20:28 +0200 cl r273516 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:19:49 +0200 cl r273515 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:19:28 +0200 cl r273514 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:17:38 +0200 cl r273513 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:45:44 +0200 cl r273511 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:37:16 +0200 cl r273510 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:33:47 +0200 cl r273509 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:32:10 +0200 cl r273508 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:30:05 +0200 cl r273507 : #i102921# added insert table row/col dialog for impress tables
2009-06-29 12:32:42 +0200 sj r273465 : #158632# fixed textrange hyperlinks to specific pages, added slide names
2009-06-24 15:17:59 +0200 sj r273349 : #158636# fixed text range hyperlink to first/last slide
2009-06-22 13:18:30 +0200 sj r273224 : #158651# fixed header footer import
2009-06-19 15:18:24 +0200 sj r273160 : #158614# default text of presentation objects now cleared
2009-06-16 15:54:19 +0200 sj r273023 : #i101545# fixed crash - bracketing of graphic links has been done twice leading to a broken graphic state stack
2009-06-15 16:26:26 +0200 sj r272998 : #158635# importing bookmark interactions: firstslide, lastslide, nextslide, previousslide
2009-06-15 16:25:26 +0200 sj r272997 : #158635# added bookmark interactions: firstslide, lastslide, nextslide, previousslide
2009-06-12 13:17:32 +0200 sj r272915 : #i102713# fixed cloud shape
2009-06-10 18:36:58 +0200 sj r272833 : #158674# fixed curvedleftarrow, curvedrightarrow, curveddownarrow, curveduparrow
2009-06-08 19:52:28 +0200 sj r272746 : #158674# fixed curvedleftarrow, curvedrightarrow, curveddownarrow, curveduparrow
2009-06-04 15:28:32 +0200 cl r272640 : #i102358# applied patch to remove warnings
2009-06-04 14:39:45 +0200 cl r272630 : #i99423# applied path to change impress wizard create button to open when opening exisitng documents
2009-06-03 18:21:26 +0200 sj r272601 : #158635# now using the correct paragraph bottom spacing. using font independent linespacing for impress text objects
2009-06-03 15:47:27 +0200 cl r272583 : #i101817# added color collection based on scribus
2009-06-03 14:43:59 +0200 cl r272580 : #i102163# use weak ref to SdrObject instead of listening to the model
2009-06-03 12:39:29 +0200 cl r272556 : #i93308# correct namespace for com.sun.star.text.textfields
2009-06-03 12:27:00 +0200 cl r272555 : #i93308# correct namespace for com.sun.star.text.textfields
2009-06-03 11:33:44 +0200 cl r272553 : #i23221# allow all settings (that make sense) for presentation styles
2009-06-03 11:30:59 +0200 cl r272552 : #i23221# allow all settings (that make sense) for presentation styles
2009-06-03 11:30:22 +0200 cl r272551 : #i23221# allow all settings (that make sense) for presentation styles
2009-06-02 18:41:07 +0200 sj r272527 : #i28358# applied patch (better conversion of dotted lines)
2009-06-02 11:52:13 +0200 cl r272491 : #i98668# applied patch to fix possible endless loop if exception occours
2009-05-28 17:02:55 +0200 sj r272416 : #i102336# retaining graphic file names unchanged
2009-05-28 17:00:25 +0200 sj r272415 : #i102336# retaining graphic file names unchanged
2009-05-28 17:00:10 +0200 sj r272414 : #i102336# retaining graphic file names unchanged
2009-05-25 12:43:58 +0200 sj r272232 : #i102069# added patch from thb (fixed rotated group objects)
2009-08-05 17:01:07 +00:00
|
|
|
|
|
|
|
if (nPageNumber == SDRPAGE_NOTFOUND)
|
|
|
|
{
|
2013-03-10 16:46:07 +01:00
|
|
|
// Is the bookmark a object?
|
2016-04-12 16:39:03 +02:00
|
|
|
pObj = mpDoc->GetObj(rBookmark);
|
2000-09-18 16:07:07 +00:00
|
|
|
|
CWS-TOOLING: integrate CWS impress172
2009-07-30 15:29:39 +0200 cl r274492 : #i102921# remove reference to inssrc.obj which was moved to svx
2009-07-29 11:40:35 +0200 wg r274445 : i103869
2009-07-22 14:39:13 +0200 sj r274241 : #i102713# fixed cloud shape
2009-07-07 15:28:04 +0200 sj r273800 : fixed build problem
2009-07-07 13:27:13 +0200 cl r273792 : #i102921# moved insert col/rows dialog to svx
2009-07-07 10:36:05 +0200 cl r273782 : fixed compiler warnings
2009-07-02 10:40:21 +0200 sj r273626 : fixed build problem
2009-07-02 10:27:56 +0200 cl r273624 : fixed merge problem
2009-07-02 10:27:19 +0200 cl r273623 : fixed compiler warning
2009-07-01 10:04:58 +0200 cl r273550 : CWS-TOOLING: rebase CWS impress172 to trunk@273468 (milestone: DEV300:m51)
2009-06-30 16:22:02 +0200 cl r273518 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:20:46 +0200 cl r273517 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:20:28 +0200 cl r273516 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:19:49 +0200 cl r273515 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:19:28 +0200 cl r273514 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:17:38 +0200 cl r273513 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:45:44 +0200 cl r273511 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:37:16 +0200 cl r273510 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:33:47 +0200 cl r273509 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:32:10 +0200 cl r273508 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:30:05 +0200 cl r273507 : #i102921# added insert table row/col dialog for impress tables
2009-06-29 12:32:42 +0200 sj r273465 : #158632# fixed textrange hyperlinks to specific pages, added slide names
2009-06-24 15:17:59 +0200 sj r273349 : #158636# fixed text range hyperlink to first/last slide
2009-06-22 13:18:30 +0200 sj r273224 : #158651# fixed header footer import
2009-06-19 15:18:24 +0200 sj r273160 : #158614# default text of presentation objects now cleared
2009-06-16 15:54:19 +0200 sj r273023 : #i101545# fixed crash - bracketing of graphic links has been done twice leading to a broken graphic state stack
2009-06-15 16:26:26 +0200 sj r272998 : #158635# importing bookmark interactions: firstslide, lastslide, nextslide, previousslide
2009-06-15 16:25:26 +0200 sj r272997 : #158635# added bookmark interactions: firstslide, lastslide, nextslide, previousslide
2009-06-12 13:17:32 +0200 sj r272915 : #i102713# fixed cloud shape
2009-06-10 18:36:58 +0200 sj r272833 : #158674# fixed curvedleftarrow, curvedrightarrow, curveddownarrow, curveduparrow
2009-06-08 19:52:28 +0200 sj r272746 : #158674# fixed curvedleftarrow, curvedrightarrow, curveddownarrow, curveduparrow
2009-06-04 15:28:32 +0200 cl r272640 : #i102358# applied patch to remove warnings
2009-06-04 14:39:45 +0200 cl r272630 : #i99423# applied path to change impress wizard create button to open when opening exisitng documents
2009-06-03 18:21:26 +0200 sj r272601 : #158635# now using the correct paragraph bottom spacing. using font independent linespacing for impress text objects
2009-06-03 15:47:27 +0200 cl r272583 : #i101817# added color collection based on scribus
2009-06-03 14:43:59 +0200 cl r272580 : #i102163# use weak ref to SdrObject instead of listening to the model
2009-06-03 12:39:29 +0200 cl r272556 : #i93308# correct namespace for com.sun.star.text.textfields
2009-06-03 12:27:00 +0200 cl r272555 : #i93308# correct namespace for com.sun.star.text.textfields
2009-06-03 11:33:44 +0200 cl r272553 : #i23221# allow all settings (that make sense) for presentation styles
2009-06-03 11:30:59 +0200 cl r272552 : #i23221# allow all settings (that make sense) for presentation styles
2009-06-03 11:30:22 +0200 cl r272551 : #i23221# allow all settings (that make sense) for presentation styles
2009-06-02 18:41:07 +0200 sj r272527 : #i28358# applied patch (better conversion of dotted lines)
2009-06-02 11:52:13 +0200 cl r272491 : #i98668# applied patch to fix possible endless loop if exception occours
2009-05-28 17:02:55 +0200 sj r272416 : #i102336# retaining graphic file names unchanged
2009-05-28 17:00:25 +0200 sj r272415 : #i102336# retaining graphic file names unchanged
2009-05-28 17:00:10 +0200 sj r272414 : #i102336# retaining graphic file names unchanged
2009-05-25 12:43:58 +0200 sj r272232 : #i102069# added patch from thb (fixed rotated group objects)
2009-08-05 17:01:07 +00:00
|
|
|
if (pObj)
|
|
|
|
{
|
|
|
|
nPageNumber = pObj->GetPage()->GetPageNum();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2007-04-03 14:42:53 +00:00
|
|
|
if (nPageNumber != SDRPAGE_NOTFOUND)
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2004-11-26 14:10:11 +00:00
|
|
|
// Jump to the bookmarked page. This is done in three steps.
|
|
|
|
|
2014-04-24 10:52:02 +02:00
|
|
|
bFound = true;
|
2003-12-01 09:09:07 +00:00
|
|
|
SdPage* pPage;
|
|
|
|
if (bIsMasterPage)
|
2014-10-28 14:57:38 +02:00
|
|
|
pPage = static_cast<SdPage*>( mpDoc->GetMasterPage(nPageNumber) );
|
2003-12-01 09:09:07 +00:00
|
|
|
else
|
2014-10-28 14:57:38 +02:00
|
|
|
pPage = static_cast<SdPage*>( mpDoc->GetPage(nPageNumber) );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2004-11-26 14:10:11 +00:00
|
|
|
// 1.) Change the view shell to the edit view, the notes view,
|
|
|
|
// or the handout view.
|
2000-09-18 16:07:07 +00:00
|
|
|
PageKind eNewPageKind = pPage->GetPageKind();
|
2006-01-16 14:19:26 +00:00
|
|
|
|
2016-10-11 13:01:32 +02:00
|
|
|
if( (eNewPageKind != PageKind::Standard) && (mpDoc->GetDocumentType() == DocumentType::Draw) )
|
2014-04-24 10:52:02 +02:00
|
|
|
return false;
|
2006-01-16 14:19:26 +00:00
|
|
|
|
2007-04-03 14:42:53 +00:00
|
|
|
if (eNewPageKind != pDrawViewShell->GetPageKind())
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2013-03-10 16:46:07 +01:00
|
|
|
// change work area
|
2000-09-18 16:07:07 +00:00
|
|
|
GetFrameView()->SetPageKind(eNewPageKind);
|
2013-04-07 12:06:47 +02:00
|
|
|
OUString sViewURL;
|
2007-04-03 14:42:53 +00:00
|
|
|
switch (eNewPageKind)
|
2004-11-26 14:10:11 +00:00
|
|
|
{
|
2016-10-11 13:01:32 +02:00
|
|
|
case PageKind::Standard:
|
2007-04-03 14:42:53 +00:00
|
|
|
sViewURL = FrameworkHelper::msImpressViewURL;
|
|
|
|
break;
|
2016-10-11 13:01:32 +02:00
|
|
|
case PageKind::Notes:
|
2007-04-03 14:42:53 +00:00
|
|
|
sViewURL = FrameworkHelper::msNotesViewURL;
|
|
|
|
break;
|
2016-10-11 13:01:32 +02:00
|
|
|
case PageKind::Handout:
|
2007-04-03 14:42:53 +00:00
|
|
|
sViewURL = FrameworkHelper::msHandoutViewURL;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
2012-01-08 09:52:25 -02:00
|
|
|
if (!sViewURL.isEmpty())
|
2007-04-03 14:42:53 +00:00
|
|
|
{
|
2015-09-18 09:09:12 +01:00
|
|
|
std::shared_ptr<FrameworkHelper> pHelper (
|
2007-04-03 14:42:53 +00:00
|
|
|
FrameworkHelper::Instance(rBase));
|
|
|
|
pHelper->RequestView(
|
|
|
|
sViewURL,
|
|
|
|
FrameworkHelper::msCenterPaneURL);
|
|
|
|
pHelper->WaitForUpdate();
|
|
|
|
|
|
|
|
// Get the new DrawViewShell.
|
|
|
|
mpViewShell = pHelper->GetViewShell(FrameworkHelper::msCenterPaneURL).get();
|
|
|
|
pDrawViewShell = dynamic_cast<sd::DrawViewShell*>(mpViewShell);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-10 10:23:02 +01:00
|
|
|
pDrawViewShell = nullptr;
|
2004-11-26 14:10:11 +00:00
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2015-11-10 10:23:02 +01:00
|
|
|
if (pDrawViewShell != nullptr)
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2014-10-17 23:45:59 +07:00
|
|
|
setEditMode(pDrawViewShell, bIsMasterPage);
|
2003-04-08 14:20:29 +00:00
|
|
|
|
2007-04-03 14:42:53 +00:00
|
|
|
// Make the bookmarked page the current page. This is done
|
|
|
|
// by using the API because this takes care of all the
|
|
|
|
// little things to be done. Especially writing the view
|
2011-02-07 22:11:09 +01:00
|
|
|
// data to the frame view.
|
2011-01-17 11:41:00 +01:00
|
|
|
sal_uInt16 nSdPgNum = (nPageNumber - 1) / 2;
|
2007-04-03 14:42:53 +00:00
|
|
|
Reference<drawing::XDrawView> xController (rBase.GetController(), UNO_QUERY);
|
|
|
|
if (xController.is())
|
|
|
|
{
|
|
|
|
Reference<drawing::XDrawPage> xDrawPage (pPage->getUnoPage(), UNO_QUERY);
|
|
|
|
xController->setCurrentPage (xDrawPage);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
// As a fall back switch to the page via the core.
|
|
|
|
DBG_ASSERT (xController.is(),
|
|
|
|
"DrawDocShell::GotoBookmark: can't switch page via API");
|
|
|
|
pDrawViewShell->SwitchPage(nSdPgNum);
|
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2015-11-10 10:23:02 +01:00
|
|
|
if (pObj != nullptr)
|
2007-04-03 14:42:53 +00:00
|
|
|
{
|
2013-03-10 16:46:07 +01:00
|
|
|
// show and select object
|
2007-04-03 14:42:53 +00:00
|
|
|
pDrawViewShell->MakeVisible(pObj->GetLogicRect(),
|
|
|
|
*pDrawViewShell->GetActiveWindow());
|
|
|
|
pDrawViewShell->GetView()->UnmarkAll();
|
|
|
|
pDrawViewShell->GetView()->MarkObj(
|
|
|
|
pObj,
|
2015-10-19 17:51:00 +02:00
|
|
|
pDrawViewShell->GetView()->GetSdrPageView());
|
2007-04-03 14:42:53 +00:00
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-11-10 10:23:02 +01:00
|
|
|
SfxBindings& rBindings = ((pDrawViewShell && pDrawViewShell->GetViewFrame()!=nullptr)
|
2007-04-03 14:42:53 +00:00
|
|
|
? pDrawViewShell->GetViewFrame()
|
|
|
|
: SfxViewFrame::Current() )->GetBindings();
|
2000-09-21 15:12:50 +00:00
|
|
|
|
2015-08-20 12:58:15 +02:00
|
|
|
rBindings.Invalidate(SID_NAVIGATOR_STATE, true);
|
2000-09-21 15:12:50 +00:00
|
|
|
rBindings.Invalidate(SID_NAVIGATOR_PAGENAME);
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2017-07-06 14:49:15 +02:00
|
|
|
return bFound;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2013-03-10 16:46:07 +01:00
|
|
|
/**
|
|
|
|
* If it should become a document template.
|
|
|
|
*/
|
2014-03-17 13:38:26 +02:00
|
|
|
bool DrawDocShell::SaveAsOwnFormat( SfxMedium& rMedium )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2001-07-10 07:02:15 +00:00
|
|
|
|
2016-03-11 06:43:06 +01:00
|
|
|
std::shared_ptr<const SfxFilter> pFilter = rMedium.GetFilter();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
if (pFilter->IsOwnTemplateFormat())
|
|
|
|
{
|
2013-03-10 16:46:07 +01:00
|
|
|
/* now the StarDraw specialty:
|
|
|
|
we assign known layout names to the layout template of the first
|
|
|
|
page, we set the layout names of the affected masterpages and pages.
|
|
|
|
We inform all text objects of the affected standard, note and
|
|
|
|
masterpages about the name change.
|
|
|
|
*/
|
2001-07-10 07:02:15 +00:00
|
|
|
|
2013-08-24 18:49:18 +04:00
|
|
|
OUString aLayoutName;
|
2001-11-05 14:23:46 +00:00
|
|
|
|
2015-01-20 16:49:57 +01:00
|
|
|
SfxStringItem const * pLayoutItem;
|
|
|
|
if( rMedium.GetItemSet()->GetItemState(SID_TEMPLATE_NAME, false, reinterpret_cast<const SfxPoolItem**>(& pLayoutItem) ) == SfxItemState::SET )
|
2001-07-10 07:02:15 +00:00
|
|
|
{
|
2001-11-05 14:23:46 +00:00
|
|
|
aLayoutName = pLayoutItem->GetValue();
|
2001-07-10 07:02:15 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2001-11-05 14:23:46 +00:00
|
|
|
INetURLObject aURL( rMedium.GetName() );
|
|
|
|
aURL.removeExtension();
|
|
|
|
aLayoutName = aURL.getName();
|
|
|
|
}
|
|
|
|
|
2016-09-08 16:34:01 +02:00
|
|
|
if (aLayoutName.isEmpty())
|
2001-11-05 14:23:46 +00:00
|
|
|
{
|
2016-10-11 13:01:32 +02:00
|
|
|
sal_uInt32 nCount = mpDoc->GetMasterSdPageCount(PageKind::Standard);
|
2012-07-06 10:45:08 +00:00
|
|
|
for (sal_uInt32 i = 0; i < nCount; ++i)
|
|
|
|
{
|
2016-10-11 13:01:32 +02:00
|
|
|
OUString aOldPageLayoutName = mpDoc->GetMasterSdPage(i, PageKind::Standard)->GetLayoutName();
|
2012-07-06 10:45:08 +00:00
|
|
|
OUString aNewLayoutName = aLayoutName;
|
|
|
|
// Don't add suffix for the first master page
|
|
|
|
if( i > 0 )
|
|
|
|
aNewLayoutName += OUString::number(i);
|
|
|
|
|
|
|
|
mpDoc->RenameLayoutTemplate(aOldPageLayoutName, aNewLayoutName);
|
|
|
|
}
|
2001-07-10 07:02:15 +00:00
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return SfxObjectShell::SaveAsOwnFormat(rMedium);
|
|
|
|
}
|
|
|
|
|
2004-02-02 09:54:17 +00:00
|
|
|
void DrawDocShell::FillClass(SvGlobalName* pClassName,
|
2015-03-12 14:53:28 +02:00
|
|
|
SotClipboardFormatId* pFormat,
|
2013-03-05 10:35:52 +01:00
|
|
|
OUString* ,
|
|
|
|
OUString* pFullTypeName,
|
|
|
|
OUString* pShortTypeName,
|
2008-12-12 12:52:51 +00:00
|
|
|
sal_Int32 nFileFormat,
|
2014-03-10 22:48:41 +01:00
|
|
|
bool bTemplate /* = false */) const
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2004-10-04 17:30:29 +00:00
|
|
|
if (nFileFormat == SOFFICE_FILEFORMAT_60)
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2016-10-11 12:21:55 +02:00
|
|
|
if ( meDocType == DocumentType::Draw )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2014-03-10 22:50:45 +01:00
|
|
|
*pClassName = SvGlobalName(SO3_SDRAW_CLASSID_60);
|
2015-03-12 14:53:28 +02:00
|
|
|
*pFormat = SotClipboardFormatId::STARDRAW_60;
|
2017-05-18 21:14:00 +01:00
|
|
|
*pFullTypeName = SdResId(STR_GRAPHIC_DOCUMENT_FULLTYPE_60);
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
2004-10-04 17:30:29 +00:00
|
|
|
else
|
2004-07-13 06:44:12 +00:00
|
|
|
{
|
2014-03-10 22:50:45 +01:00
|
|
|
*pClassName = SvGlobalName(SO3_SIMPRESS_CLASSID_60);
|
2015-03-12 14:53:28 +02:00
|
|
|
*pFormat = SotClipboardFormatId::STARIMPRESS_60;
|
2017-05-18 21:14:00 +01:00
|
|
|
*pFullTypeName = SdResId(STR_IMPRESS_DOCUMENT_FULLTYPE_60);
|
2004-07-13 06:44:12 +00:00
|
|
|
}
|
2004-10-04 17:30:29 +00:00
|
|
|
}
|
|
|
|
else if (nFileFormat == SOFFICE_FILEFORMAT_8)
|
|
|
|
{
|
2016-10-11 12:21:55 +02:00
|
|
|
if ( meDocType == DocumentType::Draw )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2014-03-10 22:50:45 +01:00
|
|
|
*pClassName = SvGlobalName(SO3_SDRAW_CLASSID_60);
|
2015-03-12 14:53:28 +02:00
|
|
|
*pFormat = bTemplate ? SotClipboardFormatId::STARDRAW_8_TEMPLATE : SotClipboardFormatId::STARDRAW_8;
|
2014-03-10 22:50:45 +01:00
|
|
|
*pFullTypeName = "Draw 8"; // HACK: method will be removed with new storage API
|
2004-10-04 17:30:29 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2014-03-10 22:50:45 +01:00
|
|
|
*pClassName = SvGlobalName(SO3_SIMPRESS_CLASSID_60);
|
2015-03-12 14:53:28 +02:00
|
|
|
*pFormat = bTemplate ? SotClipboardFormatId::STARIMPRESS_8_TEMPLATE : SotClipboardFormatId::STARIMPRESS_8;
|
2014-03-10 22:50:45 +01:00
|
|
|
*pFullTypeName = "Impress 8"; // HACK: method will be removed with new storage API
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
2004-10-04 17:30:29 +00:00
|
|
|
|
2017-05-18 21:14:00 +01:00
|
|
|
*pShortTypeName = SdResId((meDocType == DocumentType::Draw) ?
|
|
|
|
STR_GRAPHIC_DOCUMENT : STR_IMPRESS_DOCUMENT);
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
2003-04-24 13:38:03 +00:00
|
|
|
|
2015-04-14 12:44:47 +02:00
|
|
|
OutputDevice* DrawDocShell::GetDocumentRefDev()
|
2003-04-24 13:38:03 +00:00
|
|
|
{
|
2004-10-04 17:30:29 +00:00
|
|
|
OutputDevice* pReferenceDevice = SfxObjectShell::GetDocumentRefDev ();
|
2003-04-24 13:38:03 +00:00
|
|
|
// Only when our parent does not have a reference device then we return
|
|
|
|
// our own.
|
2015-11-10 10:23:02 +01:00
|
|
|
if (pReferenceDevice == nullptr && mpDoc != nullptr)
|
2006-12-12 16:12:22 +00:00
|
|
|
pReferenceDevice = mpDoc->GetRefDevice ();
|
2003-04-24 13:38:03 +00:00
|
|
|
return pReferenceDevice;
|
|
|
|
}
|
2004-11-26 19:06:11 +00:00
|
|
|
|
|
|
|
/** executes the SID_OPENDOC slot to let the framework open a document
|
|
|
|
with the given URL and this document as a referer */
|
2013-08-24 18:49:18 +04:00
|
|
|
void DrawDocShell::OpenBookmark( const OUString& rBookmarkURL )
|
2004-11-26 19:06:11 +00:00
|
|
|
{
|
|
|
|
SfxStringItem aStrItem( SID_FILE_NAME, rBookmarkURL );
|
|
|
|
SfxStringItem aReferer( SID_REFERER, GetMedium()->GetName() );
|
2015-11-10 10:23:02 +01:00
|
|
|
const SfxPoolItem* ppArgs[] = { &aStrItem, &aReferer, nullptr };
|
2009-02-19 08:26:23 +00:00
|
|
|
( mpViewShell ? mpViewShell->GetViewFrame() : SfxViewFrame::Current() )->GetBindings().Execute( SID_OPENHYPERLINK, ppArgs );
|
2004-11-26 19:06:11 +00:00
|
|
|
}
|
|
|
|
|
2016-03-08 16:21:26 +02:00
|
|
|
VclPtr<SfxDocumentInfoDialog> DrawDocShell::CreateDocumentInfoDialog( const SfxItemSet &rSet )
|
2013-02-22 12:03:54 +01:00
|
|
|
{
|
2016-03-08 16:21:26 +02:00
|
|
|
VclPtr<SfxDocumentInfoDialog> pDlg = VclPtr<SfxDocumentInfoDialog>::Create( nullptr, rSet );
|
2015-09-30 16:10:07 +02:00
|
|
|
DrawDocShell* pDocSh = dynamic_cast< DrawDocShell *>( SfxObjectShell::Current() );
|
2013-02-22 12:03:54 +01:00
|
|
|
|
|
|
|
if( pDocSh == this )
|
|
|
|
{
|
|
|
|
pDlg->AddFontTabPage();
|
|
|
|
}
|
|
|
|
return pDlg;
|
|
|
|
}
|
|
|
|
|
2014-10-17 23:45:59 +07:00
|
|
|
void DrawDocShell::setEditMode(DrawViewShell* pDrawViewShell, bool isMasterPage)
|
|
|
|
{
|
|
|
|
// Set the edit mode to either the normal edit mode or the
|
|
|
|
// master page mode.
|
2016-10-11 12:45:47 +02:00
|
|
|
EditMode eNewEditMode = EditMode::Page;
|
2014-10-17 23:45:59 +07:00
|
|
|
if (isMasterPage)
|
|
|
|
{
|
2016-10-11 12:45:47 +02:00
|
|
|
eNewEditMode = EditMode::MasterPage;
|
2014-10-17 23:45:59 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
if (eNewEditMode != pDrawViewShell->GetEditMode())
|
|
|
|
{
|
|
|
|
// Set EditMode
|
|
|
|
pDrawViewShell->ChangeEditMode(eNewEditMode, false);
|
|
|
|
}
|
|
|
|
}
|
2004-02-02 09:54:17 +00:00
|
|
|
} // end of namespace sd
|
2010-10-12 15:51:52 +02:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|