From ed5640d8b587fbcfed7dd7967f3de04b37a76f26 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 11:06:44 +0200 Subject: Adding upstream version 4:7.4.7. Signed-off-by: Daniel Baumann --- sd/inc/Annotation.hxx | 159 +++++++ sd/inc/AnnotationEnumeration.hxx | 37 ++ sd/inc/CustomAnimationCloner.hxx | 33 ++ sd/inc/CustomAnimationEffect.hxx | 454 ++++++++++++++++++ sd/inc/CustomAnimationPreset.hxx | 142 ++++++ sd/inc/DocumentRenderer.hrc | 95 ++++ sd/inc/EffectMigration.hxx | 75 +++ sd/inc/FactoryIds.hxx | 40 ++ sd/inc/Outliner.hxx | 534 +++++++++++++++++++++ sd/inc/OutlinerIterator.hxx | 314 +++++++++++++ sd/inc/SdShapeTypes.hxx | 51 ++ sd/inc/TransitionPreset.hxx | 78 ++++ sd/inc/VectorGraphicSearchContext.hxx | 35 ++ sd/inc/animations.hxx | 50 ++ sd/inc/anminfo.hxx | 67 +++ sd/inc/app.hrc | 462 ++++++++++++++++++ sd/inc/bitmaps.hlst | 212 +++++++++ sd/inc/createpresentation.hxx | 35 ++ sd/inc/createunocustomshow.hxx | 30 ++ sd/inc/createunopageimpl.hxx | 32 ++ sd/inc/cusshow.hxx | 65 +++ sd/inc/customshowlist.hxx | 89 ++++ sd/inc/diadef.h | 30 ++ sd/inc/drawdoc.hxx | 719 +++++++++++++++++++++++++++++ sd/inc/errhdl.hrc | 39 ++ sd/inc/fadedef.h | 28 ++ sd/inc/family.hrc | 43 ++ sd/inc/glob.hxx | 55 +++ sd/inc/helper/simplereferencecomponent.hxx | 63 +++ sd/inc/helpids.h | 62 +++ sd/inc/misc/scopelock.hxx | 51 ++ sd/inc/notifydocumentevent.hxx | 32 ++ sd/inc/pageformatpanel.hrc | 53 +++ sd/inc/pch/precompiled_sd.cxx | 12 + sd/inc/pch/precompiled_sd.hxx | 581 +++++++++++++++++++++++ sd/inc/pch/precompiled_sdui.cxx | 12 + sd/inc/pch/precompiled_sdui.hxx | 497 ++++++++++++++++++++ sd/inc/pglink.hxx | 40 ++ sd/inc/pres.hxx | 73 +++ sd/inc/prlayout.hxx | 46 ++ sd/inc/randomnode.hxx | 35 ++ sd/inc/resltn.hxx | 35 ++ sd/inc/sdabstdlg.hxx | 210 +++++++++ sd/inc/sdattr.hrc | 124 +++++ sd/inc/sdattr.hxx | 60 +++ sd/inc/sdcgmfilter.hxx | 37 ++ sd/inc/sdcommands.h | 26 ++ sd/inc/sddll.hxx | 54 +++ sd/inc/sddllapi.h | 30 ++ sd/inc/sdenumdef.hxx | 31 ++ sd/inc/sderror.hxx | 31 ++ sd/inc/sdfilter.hxx | 66 +++ sd/inc/sdgrffilter.hxx | 39 ++ sd/inc/sdhtmlfilter.hxx | 34 ++ sd/inc/sdiocmpt.hxx | 57 +++ sd/inc/sdmod.hxx | 175 +++++++ sd/inc/sdpage.hxx | 404 ++++++++++++++++ sd/inc/sdpdffilter.hxx | 41 ++ sd/inc/sdpptwrp.hxx | 46 ++ sd/inc/sdresid.hxx | 29 ++ sd/inc/sdundo.hxx | 45 ++ sd/inc/sdxmlwrp.hxx | 52 +++ sd/inc/shapelist.hxx | 71 +++ sd/inc/stlfamily.hxx | 116 +++++ sd/inc/stlpool.hxx | 141 ++++++ sd/inc/stlsheet.hxx | 180 ++++++++ sd/inc/strings.hrc | 488 ++++++++++++++++++++ sd/inc/strings.hxx | 23 + sd/inc/textapi.hxx | 55 +++ sd/inc/undo/undofactory.hxx | 40 ++ sd/inc/undo/undomanager.hxx | 61 +++ sd/inc/undo/undoobjects.hxx | 175 +++++++ sd/inc/undoanim.hxx | 84 ++++ 73 files changed, 8620 insertions(+) create mode 100644 sd/inc/Annotation.hxx create mode 100644 sd/inc/AnnotationEnumeration.hxx create mode 100644 sd/inc/CustomAnimationCloner.hxx create mode 100644 sd/inc/CustomAnimationEffect.hxx create mode 100644 sd/inc/CustomAnimationPreset.hxx create mode 100644 sd/inc/DocumentRenderer.hrc create mode 100644 sd/inc/EffectMigration.hxx create mode 100644 sd/inc/FactoryIds.hxx create mode 100644 sd/inc/Outliner.hxx create mode 100644 sd/inc/OutlinerIterator.hxx create mode 100644 sd/inc/SdShapeTypes.hxx create mode 100644 sd/inc/TransitionPreset.hxx create mode 100644 sd/inc/VectorGraphicSearchContext.hxx create mode 100644 sd/inc/animations.hxx create mode 100644 sd/inc/anminfo.hxx create mode 100644 sd/inc/app.hrc create mode 100644 sd/inc/bitmaps.hlst create mode 100644 sd/inc/createpresentation.hxx create mode 100644 sd/inc/createunocustomshow.hxx create mode 100644 sd/inc/createunopageimpl.hxx create mode 100644 sd/inc/cusshow.hxx create mode 100644 sd/inc/customshowlist.hxx create mode 100644 sd/inc/diadef.h create mode 100644 sd/inc/drawdoc.hxx create mode 100644 sd/inc/errhdl.hrc create mode 100644 sd/inc/fadedef.h create mode 100644 sd/inc/family.hrc create mode 100644 sd/inc/glob.hxx create mode 100644 sd/inc/helper/simplereferencecomponent.hxx create mode 100644 sd/inc/helpids.h create mode 100644 sd/inc/misc/scopelock.hxx create mode 100644 sd/inc/notifydocumentevent.hxx create mode 100644 sd/inc/pageformatpanel.hrc create mode 100644 sd/inc/pch/precompiled_sd.cxx create mode 100644 sd/inc/pch/precompiled_sd.hxx create mode 100644 sd/inc/pch/precompiled_sdui.cxx create mode 100644 sd/inc/pch/precompiled_sdui.hxx create mode 100644 sd/inc/pglink.hxx create mode 100644 sd/inc/pres.hxx create mode 100644 sd/inc/prlayout.hxx create mode 100644 sd/inc/randomnode.hxx create mode 100644 sd/inc/resltn.hxx create mode 100644 sd/inc/sdabstdlg.hxx create mode 100644 sd/inc/sdattr.hrc create mode 100644 sd/inc/sdattr.hxx create mode 100644 sd/inc/sdcgmfilter.hxx create mode 100644 sd/inc/sdcommands.h create mode 100644 sd/inc/sddll.hxx create mode 100644 sd/inc/sddllapi.h create mode 100644 sd/inc/sdenumdef.hxx create mode 100644 sd/inc/sderror.hxx create mode 100644 sd/inc/sdfilter.hxx create mode 100644 sd/inc/sdgrffilter.hxx create mode 100644 sd/inc/sdhtmlfilter.hxx create mode 100644 sd/inc/sdiocmpt.hxx create mode 100644 sd/inc/sdmod.hxx create mode 100644 sd/inc/sdpage.hxx create mode 100644 sd/inc/sdpdffilter.hxx create mode 100644 sd/inc/sdpptwrp.hxx create mode 100644 sd/inc/sdresid.hxx create mode 100644 sd/inc/sdundo.hxx create mode 100644 sd/inc/sdxmlwrp.hxx create mode 100644 sd/inc/shapelist.hxx create mode 100644 sd/inc/stlfamily.hxx create mode 100644 sd/inc/stlpool.hxx create mode 100644 sd/inc/stlsheet.hxx create mode 100644 sd/inc/strings.hrc create mode 100644 sd/inc/strings.hxx create mode 100644 sd/inc/textapi.hxx create mode 100644 sd/inc/undo/undofactory.hxx create mode 100644 sd/inc/undo/undomanager.hxx create mode 100644 sd/inc/undo/undoobjects.hxx create mode 100644 sd/inc/undoanim.hxx (limited to 'sd/inc') diff --git a/sd/inc/Annotation.hxx b/sd/inc/Annotation.hxx new file mode 100644 index 000000000..707f2cdc8 --- /dev/null +++ b/sd/inc/Annotation.hxx @@ -0,0 +1,159 @@ +/* -*- 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 . + */ + +#pragma once + +#include +#include +#include + +#include +#include +#include +#include + +#include "sdpage.hxx" +#include "textapi.hxx" +#include "sddllapi.h" + +#include +#include + +class SdrUndoAction; + +namespace com::sun::star::office { + class XAnnotation; +} + +namespace com::sun::star::uno { template class Reference; } + +class SfxViewShell; + +namespace sd { + +enum class CommentNotificationType { Add, Modify, Remove }; + +void createAnnotation( css::uno::Reference< css::office::XAnnotation >& xAnnotation, SdPage* pPage ); + +std::unique_ptr CreateUndoInsertOrRemoveAnnotation( const css::uno::Reference< css::office::XAnnotation >& xAnnotation, bool bInsert ); + +void CreateChangeUndo(const css::uno::Reference< css::office::XAnnotation >& xAnnotation); + +sal_uInt32 getAnnotationId(const css::uno::Reference & xAnnotation); + +const SdPage* getAnnotationPage(const css::uno::Reference& xAnnotation); + +void LOKCommentNotify(CommentNotificationType nType, const SfxViewShell* pViewShell, + css::uno::Reference const & rxAnnotation); + +void LOKCommentNotifyAll(CommentNotificationType nType, + css::uno::Reference const & rxAnnotation); + +struct SD_DLLPUBLIC CustomAnnotationMarker +{ + Color maLineColor; + Color maFillColor; + float mnLineWidth; + std::vector maPolygons; +}; + +class Annotation final : private ::cppu::BaseMutex, + public ::cppu::WeakComponentImplHelper, + public ::cppu::PropertySetMixin +{ +public: + explicit Annotation( const css::uno::Reference& context, SdPage* pPage ); + Annotation(const Annotation&) = delete; + Annotation& operator=(const Annotation&) = delete; + + static sal_uInt32 m_nLastId; + + SdPage* GetPage() const { return mpPage; } + SdrModel* GetModel() { return (mpPage != nullptr) ? &mpPage->getSdrModelFromSdrPage() : nullptr; } + sal_uInt32 GetId() const { return m_nId; } + + // XInterface: + virtual css::uno::Any SAL_CALL queryInterface(css::uno::Type const & type) override; + virtual void SAL_CALL acquire() noexcept override { ::cppu::WeakComponentImplHelper::acquire(); } + virtual void SAL_CALL release() noexcept override { ::cppu::WeakComponentImplHelper::release(); } + + // css::beans::XPropertySet: + virtual css::uno::Reference SAL_CALL getPropertySetInfo() override; + virtual void SAL_CALL setPropertyValue(const OUString & aPropertyName, const css::uno::Any & aValue) override; + virtual css::uno::Any SAL_CALL getPropertyValue(const OUString & PropertyName) override; + virtual void SAL_CALL addPropertyChangeListener(const OUString & aPropertyName, const css::uno::Reference & xListener) override; + virtual void SAL_CALL removePropertyChangeListener(const OUString & aPropertyName, const css::uno::Reference & aListener) override; + virtual void SAL_CALL addVetoableChangeListener(const OUString & PropertyName, const css::uno::Reference & aListener) override; + virtual void SAL_CALL removeVetoableChangeListener(const OUString & PropertyName, const css::uno::Reference & aListener) override; + + // css::office::XAnnotation: + virtual css::uno::Any SAL_CALL getAnchor() override; + virtual css::geometry::RealPoint2D SAL_CALL getPosition() override; + virtual void SAL_CALL setPosition(const css::geometry::RealPoint2D & the_value) override; + virtual css::geometry::RealSize2D SAL_CALL getSize() override; + virtual void SAL_CALL setSize(const css::geometry::RealSize2D& _size) override; + virtual OUString SAL_CALL getAuthor() override; + virtual void SAL_CALL setAuthor(const OUString & the_value) override; + virtual OUString SAL_CALL getInitials() override; + virtual void SAL_CALL setInitials(const OUString & the_value) override; + virtual css::util::DateTime SAL_CALL getDateTime() override; + virtual void SAL_CALL setDateTime(const css::util::DateTime & the_value) override; + virtual css::uno::Reference SAL_CALL getTextRange() override; + + void createChangeUndo(); + + void createCustomAnnotationMarker() + { + m_pCustomAnnotationMarker = std::make_unique(); + } + + CustomAnnotationMarker& getCustomAnnotationMarker() + { + return *m_pCustomAnnotationMarker; + } + + bool hasCustomAnnotationMarker() const + { + return bool(m_pCustomAnnotationMarker); + } + +private: + // destructor is private and will be called indirectly by the release call virtual ~Annotation() {} + + // override WeakComponentImplHelperBase::disposing() + // This function is called upon disposing the component, + // if your component needs special work when it becomes + // disposed, do it here. + virtual void SAL_CALL disposing() override; + + sal_uInt32 m_nId; + SdPage* mpPage; + css::geometry::RealPoint2D m_Position; + css::geometry::RealSize2D m_Size; + OUString m_Author; + OUString m_Initials; + css::util::DateTime m_DateTime; + rtl::Reference m_TextRange; + + std::unique_ptr m_pCustomAnnotationMarker; +}; + +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/AnnotationEnumeration.hxx b/sd/inc/AnnotationEnumeration.hxx new file mode 100644 index 000000000..ed35b46b4 --- /dev/null +++ b/sd/inc/AnnotationEnumeration.hxx @@ -0,0 +1,37 @@ +/* -*- 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 . + */ + +#pragma once + +#include + +#include "sdpage.hxx" + +namespace com::sun::star::office +{ +class XAnnotationEnumeration; +} + +namespace sd +{ +css::uno::Reference +createAnnotationEnumeration(AnnotationVector&&); +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/CustomAnimationCloner.hxx b/sd/inc/CustomAnimationCloner.hxx new file mode 100644 index 000000000..5cc71b0e6 --- /dev/null +++ b/sd/inc/CustomAnimationCloner.hxx @@ -0,0 +1,33 @@ +/* -*- 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 . + */ + +#pragma once + +#include + +class SdPage; + +namespace sd +{ +css::uno::Reference +Clone(const css::uno::Reference& xSourceNode, + const SdPage* pSource = nullptr, const SdPage* pTarget = nullptr); +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/CustomAnimationEffect.hxx b/sd/inc/CustomAnimationEffect.hxx new file mode 100644 index 000000000..e117783c9 --- /dev/null +++ b/sd/inc/CustomAnimationEffect.hxx @@ -0,0 +1,454 @@ +/* -*- 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 . + */ + +#pragma once + +#include +#include +#include +#include +#include +#include +#include +#include "sddllapi.h" +#include +#include +#include +#include + +class SdrPathObj; +class SdrModel; + +namespace sd { + +enum class EValue { To, By }; + +class CustomAnimationEffect; + +class CustomAnimationPreset; +typedef std::shared_ptr< CustomAnimationPreset > CustomAnimationPresetPtr; + +typedef std::shared_ptr< CustomAnimationEffect > CustomAnimationEffectPtr; + +typedef std::list< CustomAnimationEffectPtr > EffectSequence; + +class EffectSequenceHelper; + +class SD_DLLPUBLIC CustomAnimationEffect final +{ + friend class MainSequence; + friend class EffectSequenceHelper; + +public: + CustomAnimationEffect( const css::uno::Reference< css::animations::XAnimationNode >& xNode ); + ~CustomAnimationEffect(); + + SAL_DLLPRIVATE const css::uno::Reference< css::animations::XAnimationNode >& getNode() const { return mxNode; } + SAL_DLLPRIVATE void setNode( const css::uno::Reference< css::animations::XAnimationNode >& xNode ); + SAL_DLLPRIVATE void replaceNode( const css::uno::Reference< css::animations::XAnimationNode >& xNode ); + + SAL_DLLPRIVATE CustomAnimationEffectPtr clone() const; + + // attributes + SAL_DLLPRIVATE const OUString& getPresetId() const { return maPresetId; } + SAL_DLLPRIVATE const OUString& getPresetSubType() const { return maPresetSubType; } + SAL_DLLPRIVATE const OUString& getProperty() const { return maProperty; } + + SAL_DLLPRIVATE sal_Int16 getPresetClass() const { return mnPresetClass; } + SAL_DLLPRIVATE void setPresetClassAndId( sal_Int16 nPresetClass, const OUString& rPresetId ); + + SAL_DLLPRIVATE sal_Int16 getNodeType() const { return mnNodeType; } + void setNodeType( sal_Int16 nNodeType ); + + SAL_DLLPRIVATE css::uno::Any getRepeatCount() const; + SAL_DLLPRIVATE void setRepeatCount( const css::uno::Any& rRepeatCount ); + + SAL_DLLPRIVATE css::uno::Any getEnd() const; + SAL_DLLPRIVATE void setEnd( const css::uno::Any& rEnd ); + + SAL_DLLPRIVATE sal_Int16 getFill() const { return mnFill; } + SAL_DLLPRIVATE void setFill( sal_Int16 nFill ); + + SAL_DLLPRIVATE double getBegin() const { return mfBegin; } + void setBegin( double fBegin ); + + SAL_DLLPRIVATE double getDuration() const { return mfDuration; } + void setDuration( double fDuration ); + + SAL_DLLPRIVATE double getAbsoluteDuration() const { return mfAbsoluteDuration; } + + SAL_DLLPRIVATE sal_Int16 getIterateType() const { return mnIterateType; } + void setIterateType( sal_Int16 nIterateType ); + + SAL_DLLPRIVATE double getIterateInterval() const { return mfIterateInterval; } + void setIterateInterval( double fIterateInterval ); + + SAL_DLLPRIVATE const css::uno::Any& getTarget() const { return maTarget; } + void setTarget( const css::uno::Any& rTarget ); + + SAL_DLLPRIVATE bool hasAfterEffect() const { return mbHasAfterEffect; } + SAL_DLLPRIVATE void setHasAfterEffect( bool bHasAfterEffect ) { mbHasAfterEffect = bHasAfterEffect; } + + SAL_DLLPRIVATE const css::uno::Any& getDimColor() const { return maDimColor; } + SAL_DLLPRIVATE void setDimColor( const css::uno::Any& rDimColor ) { maDimColor = rDimColor; } + + SAL_DLLPRIVATE bool IsAfterEffectOnNext() const { return mbAfterEffectOnNextEffect; } + SAL_DLLPRIVATE void setAfterEffectOnNext( bool bOnNextEffect ) { mbAfterEffectOnNextEffect = bOnNextEffect; } + + SAL_DLLPRIVATE sal_Int32 getParaDepth() const { return mnParaDepth; } + + SAL_DLLPRIVATE bool hasText() const { return mbHasText; } + + SAL_DLLPRIVATE sal_Int16 getCommand() const { return mnCommand; } + + SAL_DLLPRIVATE double getAcceleration() const { return mfAcceleration; } + SAL_DLLPRIVATE void setAcceleration( double fAcceleration ); + + SAL_DLLPRIVATE double getDecelerate() const { return mfDecelerate; } + SAL_DLLPRIVATE void setDecelerate( double fDecelerate ); + + SAL_DLLPRIVATE bool getAutoReverse() const { return mbAutoReverse; } + SAL_DLLPRIVATE void setAutoReverse( bool bAutoReverse ); + + SAL_DLLPRIVATE css::uno::Any getProperty( sal_Int32 nNodeType, std::u16string_view rAttributeName, EValue eValue ); + SAL_DLLPRIVATE bool setProperty( sal_Int32 nNodeType, std::u16string_view rAttributeName, EValue eValue, const css::uno::Any& rValue ); + + SAL_DLLPRIVATE css::uno::Any getTransformationProperty( sal_Int32 nTransformType, EValue eValue ); + SAL_DLLPRIVATE bool setTransformationProperty( sal_Int32 nTransformType, EValue eValue, const css::uno::Any& rValue ); + + SAL_DLLPRIVATE css::uno::Any getColor( sal_Int32 nIndex ); + SAL_DLLPRIVATE void setColor( sal_Int32 nIndex, const css::uno::Any& rColor ); + + SAL_DLLPRIVATE sal_Int32 getGroupId() const { return mnGroupId; } + SAL_DLLPRIVATE void setGroupId( sal_Int32 nGroupId ); + + SAL_DLLPRIVATE sal_Int16 getTargetSubItem() const { return mnTargetSubItem; } + void setTargetSubItem( sal_Int16 nSubItem ); + + SAL_DLLPRIVATE OUString getPath() const; + SAL_DLLPRIVATE void setPath( const OUString& rPath ); + + SAL_DLLPRIVATE bool checkForText( const std::vector* paragraphNumberingLevel = nullptr ); + SAL_DLLPRIVATE bool calculateIterateDuration(); + + SAL_DLLPRIVATE void setAudio( const css::uno::Reference< css::animations::XAudio >& xAudio ); + SAL_DLLPRIVATE bool getStopAudio() const; + void setStopAudio(); + void createAudio( const css::uno::Any& rSource ); + SAL_DLLPRIVATE void removeAudio(); + SAL_DLLPRIVATE const css::uno::Reference< css::animations::XAudio >& getAudio() const { return mxAudio; } + + SAL_DLLPRIVATE EffectSequenceHelper* getEffectSequence() const { return mpEffectSequence; } + + // helper + /// @throws css::uno::Exception + SAL_DLLPRIVATE css::uno::Reference< css::animations::XAnimationNode > createAfterEffectNode() const; + SAL_DLLPRIVATE css::uno::Reference< css::drawing::XShape > getTargetShape() const; + + // static helpers + SAL_DLLPRIVATE static sal_Int32 get_node_type( const css::uno::Reference< css::animations::XAnimationNode >& xNode ); + SAL_DLLPRIVATE static sal_Int32 getNumberOfSubitems( const css::uno::Any& aTarget, sal_Int16 nIterateType ); + + SAL_DLLPRIVATE SdrPathObj* createSdrPathObjFromPath(SdrModel& rTargetModel); + SAL_DLLPRIVATE void updateSdrPathObjFromPath( SdrPathObj& rPathObj ); + SAL_DLLPRIVATE void updatePathFromSdrPathObj( const SdrPathObj& rPathObj ); + +private: + SAL_DLLPRIVATE void setEffectSequence( EffectSequenceHelper* pSequence ) { mpEffectSequence = pSequence; } + + sal_Int16 mnNodeType; + OUString maPresetId; + OUString maPresetSubType; + OUString maProperty; + sal_Int16 mnPresetClass; + sal_Int16 mnFill; + double mfBegin; + double mfDuration; // this is the maximum duration of the subeffects + double mfAbsoluteDuration; // this is the maximum duration of the subeffects including possible iterations + sal_Int32 mnGroupId; + sal_Int16 mnIterateType; + double mfIterateInterval; + sal_Int32 mnParaDepth; + bool mbHasText; + double mfAcceleration; + double mfDecelerate; + bool mbAutoReverse; + sal_Int16 mnTargetSubItem; + sal_Int16 mnCommand; + + EffectSequenceHelper* mpEffectSequence; + + css::uno::Reference< css::animations::XAnimationNode > mxNode; + css::uno::Reference< css::animations::XAudio > mxAudio; + css::uno::Any maTarget; + + bool mbHasAfterEffect; + css::uno::Any maDimColor; + bool mbAfterEffectOnNextEffect; +}; + +struct stl_CustomAnimationEffect_search_node_predict +{ + stl_CustomAnimationEffect_search_node_predict( const css::uno::Reference< css::animations::XAnimationNode >& xSearchNode ); + bool operator()( const CustomAnimationEffectPtr& pEffect ) const; + const css::uno::Reference< css::animations::XAnimationNode >& mxSearchNode; +}; + +/** this listener is implemented by UI components to track changes in the animation core */ +class ISequenceListener +{ +public: + virtual void notify_change() = 0; + +protected: + ~ISequenceListener() {} +}; + +/** this class keeps track of a group of animations that build up + a text animation for a single shape */ +class CustomAnimationTextGroup +{ + friend class EffectSequenceHelper; + +public: + CustomAnimationTextGroup( const css::uno::Reference< css::drawing::XShape >& rTarget, sal_Int32 nGroupId ); + + void reset(); + void addEffect( CustomAnimationEffectPtr const & pEffect ); + + const EffectSequence& getEffects() const { return maEffects; } + + /* -1: as single object, 0: all at once, n > 0: by n Th paragraph */ + sal_Int32 getTextGrouping() const { return mnTextGrouping; } + + bool getAnimateForm() const { return mbAnimateForm; } + bool getTextReverse() const { return mbTextReverse; } + double getTextGroupingAuto() const { return mfGroupingAuto; } + +private: + EffectSequence maEffects; + css::uno::Reference< css::drawing::XShape > maTarget; + + enum { PARA_LEVELS = 5 }; + + sal_Int32 mnTextGrouping; + bool mbAnimateForm; + bool mbTextReverse; + double mfGroupingAuto; + sal_Int32 mnLastPara; + sal_Int8 mnDepthFlags[PARA_LEVELS]; + sal_Int32 mnGroupId; +}; + +typedef std::shared_ptr< CustomAnimationTextGroup > CustomAnimationTextGroupPtr; +typedef std::map< sal_Int32, CustomAnimationTextGroupPtr > CustomAnimationTextGroupMap; + +class SD_DLLPUBLIC EffectSequenceHelper +{ +friend class MainSequence; + +public: + SAL_DLLPRIVATE EffectSequenceHelper(); + SAL_DLLPRIVATE EffectSequenceHelper( const css::uno::Reference< css::animations::XTimeContainer >& xSequenceRoot ); + SAL_DLLPRIVATE virtual ~EffectSequenceHelper(); + + SAL_DLLPRIVATE virtual css::uno::Reference< css::animations::XAnimationNode > getRootNode(); + + SAL_DLLPRIVATE CustomAnimationEffectPtr append( const CustomAnimationPresetPtr& pDescriptor, const css::uno::Any& rTarget, double fDuration ); + SAL_DLLPRIVATE CustomAnimationEffectPtr append( const SdrPathObj& rPathObj, const css::uno::Any& rTarget, double fDuration, const OUString& rPresetId ); + void append( const CustomAnimationEffectPtr& pEffect ); + SAL_DLLPRIVATE void replace( const CustomAnimationEffectPtr& pEffect, const CustomAnimationPresetPtr& pDescriptor, double fDuration ); + SAL_DLLPRIVATE void replace( const CustomAnimationEffectPtr& pEffect, const CustomAnimationPresetPtr& pDescriptor, const OUString& rPresetSubType, double fDuration ); + SAL_DLLPRIVATE void remove( const CustomAnimationEffectPtr& pEffect ); + SAL_DLLPRIVATE void moveToBeforeEffect( const CustomAnimationEffectPtr& pEffect, const CustomAnimationEffectPtr& pInsertBefore); + + SAL_DLLPRIVATE void create( const css::uno::Reference< css::animations::XAnimationNode >& xNode ); + SAL_DLLPRIVATE void createEffectsequence( const css::uno::Reference< css::animations::XAnimationNode >& xNode ); + SAL_DLLPRIVATE void processAfterEffect( const css::uno::Reference< css::animations::XAnimationNode >& xNode ); + SAL_DLLPRIVATE void createEffects( const css::uno::Reference< css::animations::XAnimationNode >& xNode ); + + SAL_DLLPRIVATE sal_Int32 getCount() const { return sal::static_int_cast< sal_Int32 >( maEffects.size() ); } + + SAL_DLLPRIVATE virtual CustomAnimationEffectPtr findEffect( const css::uno::Reference< css::animations::XAnimationNode >& xNode ) const; + + SAL_DLLPRIVATE virtual bool disposeShape( const css::uno::Reference< css::drawing::XShape >& xShape ); + SAL_DLLPRIVATE virtual void insertTextRange( const css::uno::Any& aTarget ); + SAL_DLLPRIVATE virtual void disposeTextRange( const css::uno::Any& aTarget ); + SAL_DLLPRIVATE virtual bool hasEffect( const css::uno::Reference< css::drawing::XShape >& xShape ); + SAL_DLLPRIVATE virtual void onTextChanged( const css::uno::Reference< css::drawing::XShape >& xShape ); + + /** this method rebuilds the animation nodes */ + SAL_DLLPRIVATE virtual void rebuild(); + + SAL_DLLPRIVATE EffectSequence::iterator getBegin() { return maEffects.begin(); } + SAL_DLLPRIVATE EffectSequence::iterator getEnd() { return maEffects.end(); } + SAL_DLLPRIVATE EffectSequence::iterator find( const CustomAnimationEffectPtr& pEffect ); + + SAL_DLLPRIVATE EffectSequence& getSequence() { return maEffects; } + + SAL_DLLPRIVATE void addListener( ISequenceListener* pListener ); + SAL_DLLPRIVATE void removeListener( ISequenceListener* pListener ); + + // text group methods + + SAL_DLLPRIVATE CustomAnimationTextGroupPtr findGroup( sal_Int32 nGroupId ); + CustomAnimationTextGroupPtr createTextGroup(const CustomAnimationEffectPtr& pEffect, + sal_Int32 nTextGrouping, double fTextGroupingAuto, + bool bAnimateForm, bool bTextReverse); + SAL_DLLPRIVATE void setTextGrouping( const CustomAnimationTextGroupPtr& pTextGroup, sal_Int32 nTextGrouping ); + SAL_DLLPRIVATE void setAnimateForm( const CustomAnimationTextGroupPtr& pTextGroup, bool bAnimateForm ); + SAL_DLLPRIVATE void setTextGroupingAuto( const CustomAnimationTextGroupPtr& pTextGroup, double fTextGroupingAuto ); + SAL_DLLPRIVATE void setTextReverse( const CustomAnimationTextGroupPtr& pTextGroup, bool bAnimateForm ); + + SAL_DLLPRIVATE sal_Int32 getSequenceType() const { return mnSequenceType; } + + SAL_DLLPRIVATE const css::uno::Reference< css::drawing::XShape >& getTriggerShape() const { return mxEventSource; } + SAL_DLLPRIVATE void setTriggerShape( const css::uno::Reference< css::drawing::XShape >& xTrigger ) { mxEventSource = xTrigger; } + + SAL_DLLPRIVATE virtual sal_Int32 getOffsetFromEffect( const CustomAnimationEffectPtr& xEffect ) const; + SAL_DLLPRIVATE virtual CustomAnimationEffectPtr getEffectFromOffset( sal_Int32 nOffset ) const; + +protected: + SAL_DLLPRIVATE virtual void implRebuild(); + SAL_DLLPRIVATE virtual void reset(); + + SAL_DLLPRIVATE void createTextGroupParagraphEffects( const CustomAnimationTextGroupPtr& pTextGroup, const CustomAnimationEffectPtr& pEffect, bool bUsed ); + + SAL_DLLPRIVATE void notify_listeners(); + + SAL_DLLPRIVATE void updateTextGroups(); + + SAL_DLLPRIVATE bool getParagraphNumberingLevels( const css::uno::Reference< css::drawing::XShape >& xShape, std::vector< sal_Int32 >& rParagraphNumberingLevel ); + +protected: + css::uno::Reference< css::animations::XTimeContainer > mxSequenceRoot; + EffectSequence maEffects; + std::list< ISequenceListener* > maListeners; + CustomAnimationTextGroupMap maGroupMap; + sal_Int32 mnSequenceType; + css::uno::Reference< css::drawing::XShape > mxEventSource; +}; + +class MainSequence; + +class InteractiveSequence final : public EffectSequenceHelper +{ +friend class MainSequence; +friend class MainSequenceChangeGuard; + +public: + InteractiveSequence( const css::uno::Reference< css::animations::XTimeContainer >& xSequenceRoot, MainSequence* pMainSequence ); + + /** this method rebuilds the animation nodes */ + virtual void rebuild() override; + +private: + virtual void implRebuild() override; + + MainSequence* mpMainSequence; +}; + +typedef std::shared_ptr< InteractiveSequence > InteractiveSequencePtr; +typedef std::vector< InteractiveSequencePtr > InteractiveSequenceVector; + +class SD_DLLPUBLIC MainSequence final : public EffectSequenceHelper, public ISequenceListener +{ + friend class UndoAnimation; + friend class MainSequenceRebuildGuard; + friend class MainSequenceChangeGuard; + +public: + MainSequence(); + MainSequence( const css::uno::Reference< css::animations::XAnimationNode >& xTimingRootNode ); + virtual ~MainSequence() override; + + virtual css::uno::Reference< css::animations::XAnimationNode > getRootNode() override; + void reset( const css::uno::Reference< css::animations::XAnimationNode >& xTimingRootNode ); + + /** this method rebuilds the animation nodes */ + virtual void rebuild() override; + + virtual CustomAnimationEffectPtr findEffect( const css::uno::Reference< css::animations::XAnimationNode >& xNode ) const override; + + virtual bool disposeShape( const css::uno::Reference< css::drawing::XShape >& xShape ) override; + virtual void insertTextRange( const css::uno::Any& aTarget ) override; + virtual void disposeTextRange( const css::uno::Any& aTarget ) override; + virtual bool hasEffect( const css::uno::Reference< css::drawing::XShape >& xShape ) override; + virtual void onTextChanged( const css::uno::Reference< css::drawing::XShape >& xShape ) override; + + const InteractiveSequenceVector& getInteractiveSequenceVector() const { return maInteractiveSequenceVector; } + + virtual void notify_change() override; + + bool setTrigger( const CustomAnimationEffectPtr& pEffect, const css::uno::Reference< css::drawing::XShape >& xTriggerShape ); + + /** starts a timer that recreates the internal structure from the API core after 1 second */ + void startRecreateTimer(); + + /** starts a timer that rebuilds the API core from the internal structure after 1 second */ + void startRebuildTimer(); + + virtual sal_Int32 getOffsetFromEffect( const CustomAnimationEffectPtr& xEffect ) const override; + virtual CustomAnimationEffectPtr getEffectFromOffset( sal_Int32 nOffset ) const override; + +private: + /** permits rebuilds until unlockRebuilds() is called. All rebuild calls during a locked sequence are + process after unlockRebuilds() call. lockRebuilds() and unlockRebuilds() calls can be nested. */ + void lockRebuilds(); + void unlockRebuilds(); + + DECL_DLLPRIVATE_LINK(onTimerHdl, Timer *, void); + + virtual void implRebuild() override; + + void init(); + + void createMainSequence(); + virtual void reset() override; + + InteractiveSequencePtr createInteractiveSequence( const css::uno::Reference< css::drawing::XShape >& xShape ); + + InteractiveSequenceVector maInteractiveSequenceVector; + + css::uno::Reference< css::util::XChangesListener > mxChangesListener; + css::uno::Reference< css::animations::XTimeContainer > mxTimingRootNode; + Timer maTimer; + bool mbTimerMode; + bool mbRebuilding; + + ::tools::Long mnRebuildLockGuard; + bool mbPendingRebuildRequest; + sal_Int32 mbIgnoreChanges; +}; + +typedef std::shared_ptr< MainSequence > MainSequencePtr; + +class MainSequenceRebuildGuard +{ +public: + MainSequenceRebuildGuard( const MainSequencePtr& pMainSequence ); + ~MainSequenceRebuildGuard(); + +private: + MainSequencePtr mpMainSequence; +}; + +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/CustomAnimationPreset.hxx b/sd/inc/CustomAnimationPreset.hxx new file mode 100644 index 000000000..b746b20b7 --- /dev/null +++ b/sd/inc/CustomAnimationPreset.hxx @@ -0,0 +1,142 @@ +/* -*- 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 . + */ + +#pragma once + +#include + +#include + +#include + +#include "CustomAnimationEffect.hxx" + +#include + +namespace sd { + +typedef std::unordered_map< OUString, CustomAnimationEffectPtr > EffectsSubTypeMap; +typedef std::unordered_map< OUString, OUString > UStringMap; + +class CustomAnimationPreset +{ + friend class CustomAnimationPresets; + +public: + CustomAnimationPreset( const CustomAnimationEffectPtr& pEffect ); + + void add( const CustomAnimationEffectPtr& pEffect ); + + SD_DLLPUBLIC css::uno::Reference< css::animations::XAnimationNode > create( const OUString& rstrSubType ); + + const OUString& getPresetId() const { return maPresetId; } + const OUString& getLabel() const { return maLabel; } + double getDuration() const { return mfDuration; } + + std::vector getSubTypes(); + std::vector getProperties() const; + + bool hasProperty( std::u16string_view rProperty ) const; + bool isTextOnly() const { return mbIsTextOnly; } + +private: + OUString maPresetId; + OUString maProperty; + OUString maLabel; + OUString maDefaultSubTyp; + double mfDuration; + bool mbIsTextOnly; + + EffectsSubTypeMap maSubTypes; +}; + +typedef std::shared_ptr< CustomAnimationPreset > CustomAnimationPresetPtr; +typedef std::unordered_map EffectDescriptorMap; +typedef std::vector< CustomAnimationPresetPtr > EffectDescriptorList; + +struct PresetCategory +{ + OUString maLabel; + EffectDescriptorList maEffects; + + PresetCategory( const OUString& rLabel, EffectDescriptorList&& rEffects ) + : maLabel( rLabel ), maEffects( std::move(rEffects) ) {} +}; +typedef std::shared_ptr< PresetCategory > PresetCategoryPtr; +typedef std::vector< PresetCategoryPtr > PresetCategoryList; + +class SD_DLLPUBLIC CustomAnimationPresets final +{ +public: + SAL_DLLPRIVATE CustomAnimationPresets(); + SAL_DLLPRIVATE ~CustomAnimationPresets(); + + /** This method gets presets instance, which is localized + * for the current user's locale. + */ + static const CustomAnimationPresets& getCustomAnimationPresets(); + + SAL_DLLPRIVATE css::uno::Reference< css::animations::XAnimationNode > getRandomPreset( sal_Int16 nPresetClass ) const; + + CustomAnimationPresetPtr getEffectDescriptor( const OUString& rPresetId ) const; + + SAL_DLLPRIVATE const OUString& getUINameForPresetId( const OUString& rPresetId ) const; + SAL_DLLPRIVATE const OUString& getUINameForProperty( const OUString& rProperty ) const; + + SAL_DLLPRIVATE const PresetCategoryList& getEntrancePresets() const { return maEntrancePresets; } + SAL_DLLPRIVATE const PresetCategoryList& getEmphasisPresets() const { return maEmphasisPresets; } + SAL_DLLPRIVATE const PresetCategoryList& getExitPresets() const { return maExitPresets; } + SAL_DLLPRIVATE const PresetCategoryList& getMotionPathsPresets() const { return maMotionPathsPresets; } + SAL_DLLPRIVATE const PresetCategoryList& getMiscPresets() const { return maMiscPresets; } + + SAL_DLLPRIVATE void changePresetSubType( const CustomAnimationEffectPtr& pEffect, const OUString& rPresetSubType ) const; + +private: + SAL_DLLPRIVATE void importEffects(); + SAL_DLLPRIVATE void importResources(); + + SAL_DLLPRIVATE void importPresets( const css::uno::Reference< css::lang::XMultiServiceFactory >& xConfigProvider, const OUString& rNodePath, PresetCategoryList& rPresetMap ); + + SAL_DLLPRIVATE static const OUString& translateName( const OUString& rId, const UStringMap& rNameMap ); + +private: + css::uno::Reference< css::animations::XAnimationNode > mxRootNode; + EffectDescriptorMap maEffectDescriptorMap; + UStringMap maEffectNameMap; + UStringMap maPropertyNameMap; + + PresetCategoryList maEntrancePresets; + PresetCategoryList maEmphasisPresets; + PresetCategoryList maExitPresets; + PresetCategoryList maMotionPathsPresets; + PresetCategoryList maMiscPresets; + + //! Maps per-language the animation presets. + SAL_DLLPRIVATE static std::map mPresetsMap; +}; + + +css::uno::Reference< css::animations::XAnimationNode > implImportEffects( const css::uno::Reference< css::lang::XMultiServiceFactory >& xServiceFactory, const OUString& rPath ); + +void implImportLabels( const css::uno::Reference< css::lang::XMultiServiceFactory >& xConfigProvider, const OUString& rNodePath, UStringMap& rStringMap ); + +} + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/DocumentRenderer.hrc b/sd/inc/DocumentRenderer.hrc new file mode 100644 index 000000000..755fa5a66 --- /dev/null +++ b/sd/inc/DocumentRenderer.hrc @@ -0,0 +1,95 @@ +/* -*- 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 . + */ + +#pragma once + +#include + +#define NC_(Context, String) TranslateId(Context, reinterpret_cast(u8##String)) + +const TranslateId STR_IMPRESS_PRINT_UI_CONTENT_CHOICES[] = +{ + NC_("STR_IMPRESS_PRINT_UI_CONTENT_CHOICES", "Slides"), + NC_("STR_IMPRESS_PRINT_UI_CONTENT_CHOICES", "Handouts"), + NC_("STR_IMPRESS_PRINT_UI_CONTENT_CHOICES", "Notes"), + NC_("STR_IMPRESS_PRINT_UI_CONTENT_CHOICES", "Outline") +}; + +const TranslateId STR_IMPRESS_PRINT_UI_SLIDESPERPAGE_CHOICES[] = +{ + NC_("STR_IMPRESS_PRINT_UI_SLIDESPERPAGE_CHOICES", "According to layout"), + NC_("STR_IMPRESS_PRINT_UI_SLIDESPERPAGE_CHOICES", "1"), + NC_("STR_IMPRESS_PRINT_UI_SLIDESPERPAGE_CHOICES", "2"), + NC_("STR_IMPRESS_PRINT_UI_SLIDESPERPAGE_CHOICES", "3"), + NC_("STR_IMPRESS_PRINT_UI_SLIDESPERPAGE_CHOICES", "4"), + NC_("STR_IMPRESS_PRINT_UI_SLIDESPERPAGE_CHOICES", "6"), + NC_("STR_IMPRESS_PRINT_UI_SLIDESPERPAGE_CHOICES", "9") +}; + +const TranslateId STR_IMPRESS_PRINT_UI_ORDER_CHOICES[] = +{ + NC_("STR_IMPRESS_PRINT_UI_ORDER_CHOICES", "Left to right, then down"), + NC_("STR_IMPRESS_PRINT_UI_ORDER_CHOICES", "Top to bottom, then right") +}; + +const TranslateId STR_IMPRESS_PRINT_UI_QUALITY_CHOICES[] = +{ + NC_("STR_IMPRESS_PRINT_UI_QUALITY_CHOICES", "Original colors"), + NC_("STR_IMPRESS_PRINT_UI_QUALITY_CHOICES", "Grayscale"), + NC_("STR_IMPRESS_PRINT_UI_QUALITY_CHOICES", "Black & white") +}; + +const TranslateId STR_IMPRESS_PRINT_UI_PAGE_OPTIONS_CHOICES[] = +{ + NC_("STR_IMPRESS_PRINT_UI_PAGE_OPTIONS_CHOICES", "Original size"), + NC_("STR_IMPRESS_PRINT_UI_PAGE_OPTIONS_CHOICES", "Fit to printable page"), + NC_("STR_IMPRESS_PRINT_UI_PAGE_OPTIONS_CHOICES", "Distribute on multiple sheets of paper"), + NC_("STR_IMPRESS_PRINT_UI_PAGE_OPTIONS_CHOICES", "Tile sheet of paper with repeated slides") +}; + +const TranslateId STR_IMPRESS_PRINT_UI_PAGE_OPTIONS_CHOICES_DRAW[] = +{ + NC_("STR_IMPRESS_PRINT_UI_PAGE_OPTIONS_CHOICES_DRAW", "Original size"), + NC_("STR_IMPRESS_PRINT_UI_PAGE_OPTIONS_CHOICES_DRAW", "Fit to printable page"), + NC_("STR_IMPRESS_PRINT_UI_PAGE_OPTIONS_CHOICES_DRAW", "Distribute on multiple sheets of paper"), + NC_("STR_IMPRESS_PRINT_UI_PAGE_OPTIONS_CHOICES_DRAW", "Tile sheet of paper with repeated pages") +}; + +const TranslateId STR_IMPRESS_PRINT_UI_BROCHURE_INCLUDE_LIST[] = +{ + NC_("STR_IMPRESS_PRINT_UI_BROCHURE_INCLUDE_LIST", "All pages"), + NC_("STR_IMPRESS_PRINT_UI_BROCHURE_INCLUDE_LIST", "Front sides / right pages"), + NC_("STR_IMPRESS_PRINT_UI_BROCHURE_INCLUDE_LIST", "Back sides / left pages") +}; + +const TranslateId STR_IMPRESS_PRINT_UI_PAGE_RANGE_CHOICE[] = +{ + NC_("STR_IMPRESS_PRINT_UI_PAGE_RANGE_CHOICE", "All ~Slides"), + NC_("STR_IMPRESS_PRINT_UI_PAGE_RANGE_CHOICE", "S~lides:"), + NC_("STR_IMPRESS_PRINT_UI_PAGE_RANGE_CHOICE", "~Selection") +}; + +const TranslateId STR_DRAW_PRINT_UI_PAGE_RANGE_CHOICE[] = +{ + NC_("STR_DRAW_PRINT_UI_PAGE_RANGE_CHOICE", "All ~Pages"), + NC_("STR_DRAW_PRINT_UI_PAGE_RANGE_CHOICE", "~Pages:"), + NC_("STR_DRAW_PRINT_UI_PAGE_RANGE_CHOICE", "~Selection") +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/EffectMigration.hxx b/sd/inc/EffectMigration.hxx new file mode 100644 index 000000000..e6e5f9fac --- /dev/null +++ b/sd/inc/EffectMigration.hxx @@ -0,0 +1,75 @@ +/* -*- 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 . + */ + +#pragma once + +#include +#include +#include + +class SdDrawDocument; +class SdPage; +class SvxShape; +class SdAnimationInfo; +class SdrPathObj; +class SdrObjGroup; + +namespace sd { + +/** this helper class gives various methods to convert effects from OOo 1.1 + and below to and from OOo 2.0 and above +*/ +class EffectMigration +{ +public: + static css::presentation::AnimationSpeed ConvertDuration( double fDuration ); + static double ConvertAnimationSpeed( css::presentation::AnimationSpeed eSpeed ); + + static bool ConvertPreset( std::u16string_view rPresetId, const OUString* pPresetSubType, css::presentation::AnimationEffect& rEffect ); + static bool ConvertAnimationEffect( const css::presentation::AnimationEffect& rEffect, OUString& rPresetId, OUString& rPresetSubType ); + + static void SetFadeEffect( SdPage* pPage, css::presentation::FadeEffect eNewEffect); + static css::presentation::FadeEffect GetFadeEffect( const SdPage* pPage ); + + static void SetAnimationEffect( SvxShape* pShape, css::presentation::AnimationEffect eValue ); + static css::presentation::AnimationEffect GetAnimationEffect( SvxShape* pShape ); + static void SetTextAnimationEffect( SvxShape* pShape, css::presentation::AnimationEffect eValue ); + static css::presentation::AnimationEffect GetTextAnimationEffect( SvxShape* pShape ); + static void SetAnimationSpeed( SvxShape* pShape, css::presentation::AnimationSpeed eSpeed ); + static css::presentation::AnimationSpeed GetAnimationSpeed( SvxShape* pShape ); + static void SetDimColor( SvxShape* pShape, sal_Int32 nColor ); + static sal_Int32 GetDimColor( SvxShape* pShape ); + static void SetDimHide( SvxShape* pShape, bool bDimHide ); + static bool GetDimHide( SvxShape* pShape ); + static void SetDimPrevious( SvxShape* pShape, bool bDimPrevious ); + static bool GetDimPrevious( SvxShape* pShape ); + static void SetPresentationOrder( SvxShape* pShape, sal_Int32 nNewPos ); + static sal_Int32 GetPresentationOrder( SvxShape* pShape ); + static void UpdateSoundEffect( SvxShape* pShape, SdAnimationInfo const * pInfo ); + static OUString GetSoundFile( SvxShape* pShape ); + static bool GetSoundOn( SvxShape* pShape ); + + static void SetAnimationPath( SvxShape* pShape, SdrPathObj const * pPathObj ); + static void CreateAnimatedGroup(SdrObjGroup const & rGroupObj, SdPage& rPage); + static void DocumentLoaded(SdDrawDocument & rDoc); +}; + +} // end of namespace sd + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/FactoryIds.hxx b/sd/inc/FactoryIds.hxx new file mode 100644 index 000000000..cc257b20a --- /dev/null +++ b/sd/inc/FactoryIds.hxx @@ -0,0 +1,40 @@ +/* -*- 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 . + */ + +#pragma once + +#include + +namespace sd { + +/** This are ids used by SfxTopFrame::Create() or CreateViewFrame() to + select a factory to create an instance of an SfxViewShell super + class. This allows the caller to create a view shell directly + with a certain view instead of first create a default view and + then switch to the desired view. +*/ +constexpr auto IMPRESS_FACTORY_ID = SfxInterfaceId(1); +constexpr auto DRAW_FACTORY_ID = SfxInterfaceId(1); +constexpr auto SLIDE_SORTER_FACTORY_ID = SfxInterfaceId(2); +constexpr auto OUTLINE_FACTORY_ID = SfxInterfaceId(3); +constexpr auto PRESENTATION_FACTORY_ID = SfxInterfaceId(4); + +} // end of namespace sd + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/Outliner.hxx b/sd/inc/Outliner.hxx new file mode 100644 index 000000000..4a7100db3 --- /dev/null +++ b/sd/inc/Outliner.hxx @@ -0,0 +1,534 @@ +/* -*- 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 . + */ + +#pragma once + +#include +#include "pres.hxx" +#include "OutlinerIterator.hxx" +#include +#include + +class SdrObject; +class SdrTextObj; +class SdDrawDocument; + +namespace weld +{ +class Window; +} + +namespace sd +{ +class View; +class ViewShell; +class Window; + +/// Describes a single search hit: a set of rectangles on a given page. +struct SearchSelection +{ + /// 0-based index of the page that has the selection. + int m_nPage; + + /** + * List of selection rectangles in twips -- multiple rectangles only in + * case the selection spans over more layout lines. + */ + OString m_aRectangles; + + SearchSelection(int nPage, const OString& rRectangles) + : m_nPage(nPage) + , m_aRectangles(rRectangles) + { + } + + bool operator==(const SearchSelection& rOther) const + { + return m_nPage == rOther.m_nPage && m_aRectangles == rOther.m_aRectangles; + } +}; + +} // end of namespace sd + +/** The main purpose of this class is searching and replacing as well as + spelling of impress documents. The main part of both tasks lies in + iterating over the pages and view modes of a document and apply the + respective function to all objects containing text on those pages. + +

Relevant objects: There are two sets of objects to search/spell + check. One is the set of all selected objects. The other consists of + all objects on all pages in draw-, notes-, and handout view as well as + slide- and background view (draw pages and master pages).

+ +

Iteration: Search/replace and spelling functions operate on shapes + containing text. To cover all relevant objects an order has to be + defined on the objects. For the set of all selected objects this order + is simply the order in which they can be retrieved from the selection + object.
+ When there is no selection the order is nested. The three modes of the + draw view are on the outer level: draw mode, notes mode, handout mode. + The inner level switches between draw pages and master pages. This + leads to the following order: +

    +
  1. draw pages of draw mode
  2. +
  3. master pages of draw mode
  4. +
  5. draw pages of notes mode
  6. +
  7. master pages of notes mode
  8. +
  9. draw pages of handout mode
  10. +
  11. master pages of handout mode
  12. +
+ Iteration starts at the top of the current page. When reaching the end + of the document, i.e. the last master page of the handout mode, it jumps + to the first draw page of draw mode. In backward searches this order is + reversed. When doing a replace all then the whole document is + searched for matches starting at the first page of the draw/slide view + (or last page of handout/background view even though search + direction).

+ +

The start position is restored after finishing spell checking or + replacing all matches in a document.

+ +

Some related pieces of information: + The search dialog (SvxSearchDialog) can be controlled in + more than one way: +

  • A set of option flags returned by the slot call + SID_SEARCH_OPTIONS handled by the + SdDrawDocument::GetState() method.
  • +
  • The contents of the search item of type + SvxSearchItem.
  • +
  • The HasSelection() view shell method that returns + whether or not a selection exists. However, it is called from the + search dialog with an argument so that only text selections are + queried. This is only sufficient for searching the outline view. +

    +*/ +class SdOutliner final : public SdrOutliner +{ +public: + friend class ::sd::outliner::OutlinerContainer; + + /** Create a new sd outliner object. + @param pDoc + The draw document from which to take the content. + @param nMode + The valid values OutlinerMode::DontKnow, + OutlinerMode::TextObject, + OutlinerMode::TitleObject, + OutlinerMode::OutlineObject, and + OutlinerMode::OutlineView are defined in + editeng/outliner.hxx. + */ + SdOutliner(SdDrawDocument* pDoc, OutlinerMode nMode); + virtual ~SdOutliner() override; + /// Forbid copy construction and copy assignment + SdOutliner(const Outliner&) = delete; + SdOutliner& operator=(const Outliner&) = delete; + + /** Despite the name this method is called prior to spell checking *and* + searching and replacing. The position of current view + mode/page/object/caret position is remembered and, depending on the + search mode, may be restored after finishing searching/spell + checking. + */ + void PrepareSpelling(); + + /** Initialize a spell check but do not start it yet. This method + is a better candidate for the name PrepareSpelling. + */ + void StartSpelling(); + + /** Initiate a find and/or replace on the next relevant text object. + @return + Returns when the search/replace is finished (as + indicated by user input to the search dialog). A value + indicates that another call to this method is required. + */ + bool StartSearchAndReplace(const SvxSearchItem* pSearchItem); + + /** Iterate over the sentences in all text shapes and stop at the + next sentence with spelling errors. While doing so the view + mode may be changed and text shapes are set into edit mode. + */ + svx::SpellPortions GetNextSpellSentence(); + + /** Release all resources that have been created during the find&replace + or spell check. + */ + void EndSpelling(); + + /** callback for textconversion */ + bool ConvertNextDocument() override; + + /** Starts the text conversion (hangul/hanja or Chinese simplified/traditional) + for the current viewshell */ + void StartConversion(LanguageType nSourceLanguage, LanguageType nTargetLanguage, + const vcl::Font* pTargetFont, sal_Int32 nOptions, bool bIsInteractive); + + /** This is called internally when text conversion is started. + The position of current view mode/page/object/caret position + is remembered and will be restored after conversion. + */ + void BeginConversion(); + + /** Release all resources that have been created during the conversion */ + void EndConversion(); + + int GetIgnoreCurrentPageChangesLevel() const { return mnIgnoreCurrentPageChangesLevel; }; + void IncreIgnoreCurrentPageChangesLevel() { mnIgnoreCurrentPageChangesLevel++; }; + void DecreIgnoreCurrentPageChangesLevel() { mnIgnoreCurrentPageChangesLevel--; }; + SdDrawDocument* GetDoc() const { return mpDrawDocument; } + +private: + class Implementation; + ::std::unique_ptr mpImpl; + + /// Returns the current outline view + OutlinerView* getOutlinerView(); + + /// Specifies whether to search and replace, to spell check or to do a + /// text conversion. + enum mode + { + SEARCH, + SPELL, + TEXT_CONVERSION + } meMode; + + /// The view which displays the searched objects. + ::sd::View* mpView; + /** The view shell containing the view. It is held as weak + pointer to avoid keeping it alive when the view is changed + during searching. + */ + std::weak_ptr<::sd::ViewShell> mpWeakViewShell; + /// This window contains the view. + VclPtr<::sd::Window> mpWindow; + /// The document on whose objects and pages this class operates. + SdDrawDocument* mpDrawDocument; + + /** this is the language that is used for current text conversion. + Only valid if meMode is TEXT_CONVERSION. + */ + LanguageType mnConversionLanguage; + + /** While the value of this flag is greater than 0 changes of the current page + do not lead to selecting the corresponding text in the outliner. + */ + int mnIgnoreCurrentPageChangesLevel; + + /// Specifies whether the search string has been found so far. + bool mbStringFound; + + /** This flag indicates whether there may exist a match of the search + string before/after the current position in the document. It can be + set to only when starting from the beginning/end of the + document. When reaching the end/beginning with it still be set to + then there exists no match and the search can be terminated. + */ + bool mbMatchMayExist; + + /// The number of pages in the current view. + sal_uInt16 mnPageCount; + + /** A value indicates that the end of the find&replace or spell + check has been reached. + */ + bool mbEndOfSearch; + + /** Set to when an object has been prepared successfully for + searching/spell checking. This flag directs the internal iteration + which stops when set to . + */ + bool mbFoundObject; + + /** This flag indicates whether to search forward or backwards. + */ + bool mbDirectionIsForward; + + /** This flag indicates that only the selected objects are to be + searched. + */ + bool mbRestrictSearchToSelection; + + /** When the search is restricted to the current selection then + this list contains pointers to all the objects of the + selection. This copy is necessary because during the search + process the mark list is modified. + */ + ::std::vector> maMarkListCopy; + + /** Current object that may be a text object. The object pointer to + corresponds to mnObjIndex. While iterating over the + objects on a page mpObj will point to every object + while mpTextObj will be set only to valid text + objects. + */ + SdrObject* mpObj; + + /** this stores the first object that is used for text conversion. + Conversion automatically wraps around the document and stops when it + finds this object again. + */ + SdrObject* mpFirstObj; + + /// Candidate for being searched/spell checked. + SdrTextObj* mpSearchSpellTextObj; + + /// Current text to be searched/spelled inside the current text object + sal_Int32 mnText; + + /// Paragraph object of mpTextObj. + OutlinerParaObject* mpParaObj; + + /// The view mode that was active when starting to search/spell check. + PageKind meStartViewMode; + + /// The master page mode that was active when starting to search/spell check. + EditMode meStartEditMode; + + /// The current page index on starting to search/spell check. + sal_uInt16 mnStartPageIndex; + + /// The object in edit mode when searching /spell checking was started + /// (if any). + SdrObject* mpStartEditedObject; + + /// The position of the caret when searching /spell checking was started. + ESelection maStartSelection; + + /** The search item contains various attributes that define the type of + search. It is set every time the + SearchAndReplaceAll method is called. + */ + std::unique_ptr mpSearchItem; + + /// The actual object iterator. + ::sd::outliner::Iterator maObjectIterator; + /// The current position of the object iterator. + ::sd::outliner::IteratorPosition maCurrentPosition; + /// The position when the search started. Corresponds largely to the + /// m?Start* members. + ::sd::outliner::Iterator maSearchStartPosition; + /** The last valid position describes where the last text object has been + found. This position is restored when some dialogs are shown. The + position is initially set to the where the search begins. + */ + ::sd::outliner::IteratorPosition maLastValidPosition; + + /** When this flag is true then a PrepareSpelling() is executed when + StartSearchAndReplace() is called the next time. + */ + bool mbPrepareSpellingPending; + + /** Initialize the object iterator. Call this method after being + invoked from the search or spellcheck dialog. It creates a new + iterator pointing at the current object when this has not been done + before. It reverses the direction of iteration if the given flag + differs from the current direction. + @param bDirectionIsForward + This flag specifies in which direction to iterator over the + objects. If it differs from the current direction the iterator + is reversed. + */ + void Initialize(bool bDirectionIsForward); + + /** Do search and replace for whole document. + */ + bool SearchAndReplaceAll(); + + /** Do search and replace for next match. + @param pSelections + When tiled rendering and not 0, then don't emit LOK events, instead + assume the caller will do so. + @return + The return value specifies whether the search ended () or + another call to this method is required (). + */ + bool SearchAndReplaceOnce(std::vector<::sd::SearchSelection>* pSelections = nullptr); + + void sendLOKSearchResultCallback(const std::shared_ptr& pViewShell, + const OutlinerView* pOutlinerView, + std::vector* pSelections); + + /** Detect changes of the document or view and react accordingly. Such + changes may occur because different calls to + SearchAndReplace() there usually is user + interaction. This is at least the press of the search or replace + button but may include any other action some of which affect the + search. + */ + void DetectChange(); + + /** Detect whether the selection has changed. + @return + Return when the selection has been changed since the + last call to this method. + */ + bool DetectSelectionChange(); + + /** Remember the current edited object/caret position/page/view mode + when starting to search/spell check so that it can be restored on + termination. + */ + void RememberStartPosition(); + + /** Restore the position stored in the last call of + RememberStartPositiony. + */ + void RestoreStartPosition(); + + /** Provide next object to search or spell check as text object in edit + mode on the current page. This skips all objects that do not + match or are no text object. + */ + void ProvideNextTextObject(); + + /** Handle the situation that the iterator has reached the last object. + This may result in setting the mbEndOfSearch flag + back to . This method may show either the end-of-search + dialog or the wrap-around dialog. + */ + void EndOfSearch(); + + /** Show a dialog that tells the user that the search has ended either + because there are no more matches after finding at least one or that + no match has been found at all. + */ + void ShowEndOfSearchDialog(); + + /** Show a dialog that asks the user whether to wrap around to the + beginning/end of the document and continue with the search/spell + check. + */ + bool ShowWrapAroundDialog(); + + /** Put text of current text object into outliner so that the text can + be searched/spell checked. + */ + void PutTextIntoOutliner(); + + /** Prepare to do spell checking on the current text object. This + includes putting it into edit mode. Under certain conditions this + method sets mbEndOfSearch to . + */ + void PrepareSpellCheck(); + + /** Prepare to search and replace on the current text object. This + includes putting it into edit mode. + */ + void PrepareSearchAndReplace(); + + /** Prepare to do a text conversion on the current text + object. This includes putting it into edit mode. + */ + void PrepareConversion(); + + /** Switch to a new view mode. Try to restore the original edit mode + before doing so. + @param ePageKind + Specifies the new view mode. + */ + void SetViewMode(PageKind ePageKind); + + /** Switch to the page or master page specified by the + mnPage index. Master page mode is specified by + meEditMode. + @param eEditMode + The new edit mode. + @param nPageIndex + The new page index. + */ + void SetPage(EditMode eEditMode, sal_uInt16 nPageIndex); + + /** Switch on edit mode for the currently selected text object. + */ + void EnterEditMode(bool bGrabFocus); + + /** Return the position at which a new search is started with respect to + the search direction as specified by the argument. + @return + The position mentioned above in form of a selection with start + equals end. + */ + ESelection GetSearchStartPosition() const; + + /** Detect whether there exists a previous match. Note that only the + absence of such a match can be detected reliably. An existing match + is assumed when the search started not at the beginning/end of the + presentation. This does not have to be true. The user can have set + the cursor at the middle of the text without a prior search. + @return + Returns when there is no previous match and + when there may be one. + */ + bool HasNoPreviousMatch(); + + /** Handle a failed search (with or without replace) for the outline + mode. Show message boxes when the search failed completely, + i.e. there is no match in the whole presentation, or when no further + match exists. + @return + The returned value indicates whether another (wrapped around) + search shall take place. If that is so, then it is the caller's + responsibility to set the cursor position accordingly. + */ + bool HandleFailedSearch(); + + /** Take a position as returned by an object iterator and switch to the + view and page on which the object specified by this position is + located. + @param rPosition + This position points to a SdrObject object and + contains the view and page where it is located. + @return + Return a pointer to the SdrObject. + */ + SdrObject* SetObject(const ::sd::outliner::IteratorPosition& rPosition); + + /** Use this method when the view shell in which to search has changed. + It handles i.e. registering at the associated view as selection + change listener. + */ + void SetViewShell(const std::shared_ptr<::sd::ViewShell>& rpViewShell); + + /** Activate or deactivate the search in the current selection. Call + this method whenever the selection has changed. This method creates + a copy of the current selection and reassigns the object iterator to + the current() iterator. + */ + void HandleChangedSelection(); + + /** Initiate the spell check of the next relevant text object. + When the outline view is active then this method is called + after a wrap around to continue at the beginning of the document. + @return + Returns to indicate that another call to this method is + required. When all text objects have been processed then + is returned. + */ + virtual bool SpellNextDocument() override; + + /** Find the right parent to use for a message. This function makes sure + that the otherwise non-modal search or spell dialogs, if visible, are + locked, too. + */ + weld::Window* GetMessageBoxParent(); +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/OutlinerIterator.hxx b/sd/inc/OutlinerIterator.hxx new file mode 100644 index 000000000..d160609d8 --- /dev/null +++ b/sd/inc/OutlinerIterator.hxx @@ -0,0 +1,314 @@ +/* -*- 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 . + */ + +#pragma once + +#include + +#include "pres.hxx" +#include +#include +#include + +class SdDrawDocument; +class SdOutliner; + +namespace sd { + +class ViewShell; + +namespace outliner { + +class IteratorImplBase; +class IteratorPosition; + +/** Use this enum to specify the initial location of the object pointed to by + a newly created iterator. The values are +
    • BEGIN for the first object with reference to + iteration direction.
    • +
    • END for one past the last valid object or, if the iterator is a + backward iterator, the object in front of the first valid one.
    • +
    • CURRENT for the current object. Because there is only a current + page this usually is taken to be the first/last object on the current + page.
    +*/ +enum IteratorLocation {BEGIN,END,CURRENT}; + +/** This iterator can be used to iterate over all SdrObject + objects of one of three set denoted by the IteratorType: +
    • All objects of the current mark list (selection) + (type==SELECTION).
    • +
    • All objects in the current view (type==SINGLE_VIEW).
    • +
    • All objects in all views (type=DOCUMENT).
    + +

    Note that the iterator does not change pages or views. It is the + task of the user of the iterator to take the information provided by the + IteratorPosition as returned by the + operator*() method and set view, visible page, and + selection/edit mode markers to reflect this position.

    + +

    A simple forward iteration from the first to the last object would + instantiate the iterator with + Iterator(pDocument,pViewShell,true,BEGIN) for some document + and view shell. This iterator can then be compared against + Iterator(pDocument,pViewShell,true,END). On equality the + iteration should be stopped without evaluating the iterator: The position + of an end iterator is not valid.

    +*/ +class Iterator +{ +public: + Iterator(); + + /** The copy constructor creates a new iterator by copying the + implementation object. + */ + Iterator (const Iterator& rIterator); + Iterator(Iterator&& rIterator) noexcept; + + /** Create a new iterator with the implementation object being the + provided one. + @param pObject + A copy of this object will become the implementation object. + */ + explicit Iterator (std::unique_ptr pObject); + + ~Iterator(); + + /** Assign the iterator from the given one. The implementation object + of this iterator will be a copy of the given iterator. + @param rIterator + The iterator which to assign from. + */ + Iterator& operator= (const Iterator& rIterator); + Iterator& operator=(Iterator&& rIterator) noexcept; + + /** Return the current position of the iterator. + @return + Returns a reference to the current position. Therefore this + method is not thread safe. The reason for this behaviour is, of + course, to omit the copying of the returned position. + */ + const IteratorPosition& operator* () const; + /** The prefix increment operator returns the iterator pointing to the + next object. When in doubt prefer this operator over the postfix + increment operator. + @return + Returns a reference to this iterator pointing to the next object. + */ + Iterator& operator++ (); + /** Test equality of two iterators. Two iterators are taken to be equal + when they point are of the same type (their implementation objects + are instances of the same class) and point to the same object. + @param rIterator + The iterator to test equality with. + @return + Returns when both iterators point to the same object. + */ + bool operator== (const Iterator& rIterator) const; + /** Test whether two iterators point to different objects. This is just + the negation of the result of the equality operator. + @param rIterator + The iterator to test inequality with. + @return + Returns when both iterators point to the different objects. + */ + bool operator!= (const Iterator& rIterator) const; + /** Reverse the direction of iteration. The position of the iterator is + not changed. Thus calling this method twice returns to the old state. + */ + void Reverse(); + +private: + /// The implementation object to which most of the methods are forwarded. + std::unique_ptr mxIterator; +}; + +/** This class wraps the SdOutliner class and represents it as + a container of SdrObject objects. Its main purpose is to + provide iterators for certain sub-sets of those objects. These sub-sets + are a) the set of the currently selected objects, b) all objects in the + current view, and c) all objects in all views. + +

    The direction of the returned iterators depends on the underlying + SdOutliner object and is usually set in the search + dialog.

    +*/ +class OutlinerContainer +{ +public: + /** Create a new wrapper object for the given outliner. + @param pOutliner + The outliner that is represented by the new object as + SdrObject container. + */ + OutlinerContainer (SdOutliner* pOutliner); + + /** Return an iterator that points to the first object of one of the + sets described above. This takes also into account the direction of + iteration. + @return + The returned iterator points either to the first (forward + search) or to the last object (backward search) of the set. + */ + Iterator begin(); + + /** Return an iterator that marks the end of the iteration. This takes + also into account the direction of iteration. The object pointed to + is not valid. + @return + The returned iterator points either to that object past the last + one (forward search) or to the one in front of the first + (backward search). + */ + Iterator end(); + + /** Return an iterator that points to the current object of one of the + sets described above. This takes also into account the direction of + iteration. + @return + The returned iterator points either to the first (forward + search) or to the last object (backward search) of the set of + selected objects or of the current page if the search set spans + more than one page. + */ + Iterator current(); + +private: + /// The wrapped outliner that is represented as object container. + SdOutliner* mpOutliner; + + /** Create an iterator. The object pointed to depends on the search + direction retrieved from the outliner object + mpOutliner and the given location. + @param aLocation + This specifies whether the returned iterator points to the + first, (one past the) last, or current object. + @return + Returns an iterator as constructed by + CreateSelectionIterator(), + */ + Iterator CreateIterator (IteratorLocation aLocation); + + /** Create an iterator that iterates over all currently selected + SdrObjects objects of the mpOutliner + outliner. + @param rObjectList + List of currently selected objects. This list is necessary + so that the selection can be changed without affecting the + iterator. + @param pDocument + The document to which the objects belong. + @param pViewShell + The view shell which displays the objects. + @param bDirectionIsForward + The direction of iteration. It defaults to forward. + @param aLocation + This specifies at which object the iterator points initially. + */ + static Iterator CreateSelectionIterator ( + const ::std::vector<::tools::WeakReference>& rObjectList, + SdDrawDocument* pDocument, + const std::shared_ptr& rpViewShell, + bool bDirectionIsForward, + IteratorLocation aLocation); + + /** Create an iterator that iterates over all SdrObjects + objects of the mpOutliner outliner. + @param pDocument + The document to which the objects belong. + @param pViewShell + The view shell which displays the objects. + @param bDirectionIsForward + The direction of iteration. It defaults to forward. + @param aLocation + This specifies at which object the iterator points initially. + */ + static Iterator CreateDocumentIterator ( + SdDrawDocument* pDocument, + const std::shared_ptr& rpViewShell, + bool bDirectionIsForward, + IteratorLocation aLocation); + + /** Return the index of a page that contains an object that a new + iterator shall point to. This page index depends primarily on the + location, iteration direction, as well as on edit mode and page + kind. + @param pDocument + The document to which the page belongs. + @param pViewShell + The view shell which displays the page. + @param ePageKind + Specifies the view the page belongs to. + @param eEditMode + Specifies whether the page is a master page. + @param bDirectionIsForward + The direction of iteration. + @param aLocation + This specifies at which object the iterator points initially. + */ + static sal_Int32 GetPageIndex ( + SdDrawDocument const * pDocument, + const std::shared_ptr& rpViewShell, + PageKind ePageKind, + EditMode eEditMode, + bool bDirectionIsForward, + IteratorLocation aLocation); + + // Do not allow default constructor and copying of outliner containers. + OutlinerContainer (const OutlinerContainer&) = delete; + OutlinerContainer& operator= (const OutlinerContainer&) = delete; +}; + +/** Data collection specifying a SdrObject and its position in + a document and view. +*/ +class IteratorPosition +{ +public: + /** Create a new object with all data members set to default values. + These values should not be accessed. The only use of the object as + it is as a marker in comparisons. + */ + IteratorPosition(); + + /** Compare two positions for equality. + @return + is returned only when all data members have the same + values in both position objects. + */ + bool operator== (const IteratorPosition& aPosition) const; + + /// Pointer to the actual SdrObject object. + ::tools::WeakReference mxObject; + + /// Number of the actual SdrText from the current SdrObject + sal_Int32 mnText; + + /// The index of a page where the object is located on. + sal_Int32 mnPageIndex; + /// Page kind of the view. + PageKind mePageKind; + /// Edit mode of the view. + EditMode meEditMode; +}; + +} } // end of namespace ::sd::outliner + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/SdShapeTypes.hxx b/sd/inc/SdShapeTypes.hxx new file mode 100644 index 000000000..ef944e593 --- /dev/null +++ b/sd/inc/SdShapeTypes.hxx @@ -0,0 +1,51 @@ +/* -*- 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 . + */ + +#pragma once + +namespace accessibility +{ +/** Register the SD presentation shape types with the ShapeTypeHandler singleton. + This method is usually called while loading the sd library. +*/ +void RegisterImpressShapeTypes(); + +/** Enum describing all shape types known in the SD project. +*/ +enum SdShapeTypes +{ + PRESENTATION_OUTLINER, + PRESENTATION_SUBTITLE, + PRESENTATION_GRAPHIC_OBJECT, + PRESENTATION_PAGE, + PRESENTATION_OLE, + PRESENTATION_CHART, + PRESENTATION_TABLE, + PRESENTATION_NOTES, + PRESENTATION_TITLE, + PRESENTATION_HANDOUT, + PRESENTATION_HEADER, + PRESENTATION_FOOTER, + PRESENTATION_DATETIME, + PRESENTATION_PAGENUMBER +}; + +} // end of namespace accessibility + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/TransitionPreset.hxx b/sd/inc/TransitionPreset.hxx new file mode 100644 index 000000000..0075e3205 --- /dev/null +++ b/sd/inc/TransitionPreset.hxx @@ -0,0 +1,78 @@ +/* -*- 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 . + */ + +#pragma once + +#include + +#include +#include +#include +#include + +namespace com::sun::star { + namespace animations { class XAnimationNode; } + namespace uno { template class Reference; } +} + +namespace sd { + +class TransitionPreset; +typedef std::shared_ptr< TransitionPreset > TransitionPresetPtr; +typedef std::vector< TransitionPresetPtr > TransitionPresetList; +typedef std::unordered_map< OUString, OUString > UStringMap; + +class TransitionPreset +{ +public: + static const TransitionPresetList& getTransitionPresetList(); + + sal_Int16 getTransition() const { return mnTransition; } + sal_Int16 getSubtype() const { return mnSubtype; } + bool getDirection() const { return mbDirection; } + sal_Int32 getFadeColor() const { return mnFadeColor; } + + const OUString& getPresetId() const { return maPresetId; } + const OUString& getSetId() const { return maSetId; } + const OUString& getSetLabel() const { return maSetLabel; } + const OUString& getVariantLabel() const { return maVariantLabel; } + +private: + TransitionPreset( const css::uno::Reference< css::animations::XAnimationNode >& xNode ); + + static bool importTransitionPresetList(TransitionPresetList& rList); + static std::map mPresetsMap; + + sal_Int16 mnTransition; + sal_Int16 mnSubtype; + bool mbDirection; + sal_Int32 mnFadeColor; + OUString maPresetId; + OUString maSetId; + OUString maSetLabel; + OUString maVariantLabel; + + static bool importTransitionsFile( TransitionPresetList& rList, + css::uno::Reference< css::lang::XMultiServiceFactory > const & xServiceFactory, + const OUString& aFilename ); +}; + +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/VectorGraphicSearchContext.hxx b/sd/inc/VectorGraphicSearchContext.hxx new file mode 100644 index 000000000..e6f978ca2 --- /dev/null +++ b/sd/inc/VectorGraphicSearchContext.hxx @@ -0,0 +1,35 @@ +/* -*- 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/. + * + */ + +#pragma once + +#include + +namespace sd +{ +struct VectorGraphicSearchContext +{ + bool mbCurrentIsVectorGraphic; + std::unique_ptr mpVectorGraphicSearch; + + VectorGraphicSearchContext() + : mbCurrentIsVectorGraphic(false) + { + } + + void reset() + { + mbCurrentIsVectorGraphic = false; + mpVectorGraphicSearch.reset(); + } +}; +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/animations.hxx b/sd/inc/animations.hxx new file mode 100644 index 000000000..cb7863473 --- /dev/null +++ b/sd/inc/animations.hxx @@ -0,0 +1,50 @@ +/* -*- 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 . + */ + +#pragma once + +#include "sddllapi.h" + +#include + +namespace com::sun::star::animations { class XAnimationNode; } + +namespace sd +{ + +/** stores the link between an after effect node and its master for later insertion + into the timing hierarchy +*/ +struct AfterEffectNode +{ + css::uno::Reference< css::animations::XAnimationNode > mxNode; + css::uno::Reference< css::animations::XAnimationNode > mxMaster; + bool mbOnNextEffect; + + AfterEffectNode( const css::uno::Reference< css::animations::XAnimationNode >& xNode, const css::uno::Reference< css::animations::XAnimationNode >& xMaster, bool bOnNextEffect ) + : mxNode( xNode ), mxMaster( xMaster ), mbOnNextEffect( bOnNextEffect ) {} +}; + +/** inserts the animation node in the given AfterEffectNode at the correct position + in the timing hierarchy of its master */ +SD_DLLPUBLIC void stl_process_after_effect_node_func(AfterEffectNode const & rNode); + +} // namespace sd; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/anminfo.hxx b/sd/inc/anminfo.hxx new file mode 100644 index 000000000..8abc54c90 --- /dev/null +++ b/sd/inc/anminfo.hxx @@ -0,0 +1,67 @@ +/* -*- 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 . + */ + +#pragma once + +#include +#include +#include +#include "pres.hxx" +#include +#include +#include "sddllapi.h" + +class SD_DLLPUBLIC SdAnimationInfo final : public SdrObjUserData +{ +public: + PresObjKind mePresObjKind; + + /* deprecated animation infos */ + css::presentation::AnimationEffect meEffect; ///< Animation effect + css::presentation::AnimationEffect meTextEffect; ///< Animation effect for text content + css::presentation::AnimationSpeed meSpeed; ///< Speed of the animation + bool mbActive; ///< turned on? + bool mbDimPrevious; ///< Object fade out + bool mbIsMovie; ///< if group object than it is a sequence of them. + bool mbDimHide; ///< hide rather than dim + Color maBlueScreen; ///< identifies "background pixels" + Color maDimColor; ///< for fading the object + OUString maSoundFile; ///< Path to the sound file in MS DOS notation + bool mbSoundOn; ///< Sound on / off + bool mbPlayFull; ///< play sound completely. + css::presentation::ClickAction meClickAction; ///< Action at mouse click + css::presentation::AnimationEffect meSecondEffect; ///< for object fading. + css::presentation::AnimationSpeed meSecondSpeed; ///< for object fading. + OUString maSecondSoundFile; ///< for object fading. + bool mbSecondSoundOn; ///< for object fading. + bool mbSecondPlayFull; ///< for object fading. + sal_uInt16 mnVerb; ///< for OLE object + SdrObject& mrObject; + + void SetBookmark( const OUString& rBookmark ); + OUString GetBookmark() const; +public: + SAL_DLLPRIVATE SdAnimationInfo(SdrObject& rObject); + SAL_DLLPRIVATE SdAnimationInfo(const SdAnimationInfo& rAnmInfo, SdrObject& rObject); + SAL_DLLPRIVATE virtual ~SdAnimationInfo() override; + + SAL_DLLPRIVATE virtual std::unique_ptr Clone(SdrObject* pObject) const override; +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/app.hrc b/sd/inc/app.hrc new file mode 100644 index 000000000..875dc0cc3 --- /dev/null +++ b/sd/inc/app.hrc @@ -0,0 +1,462 @@ +/* -*- 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 . + */ + +#pragma once + +#include + +// Helper IDs for templates +#define HID_STANDARD_STYLESHEET_NAME (HID_SD_START + 70) +#define HID_POOLSHEET_OBJWITHOUTFILL (HID_SD_START + 73) +#define HID_POOLSHEET_OBJNOLINENOFILL (HID_SD_START + 74) +#define HID_POOLSHEET_TEXT (HID_SD_START + 71) +#define HID_POOLSHEET_A4 (HID_SD_START + 104) +#define HID_POOLSHEET_A4_TITLE (HID_SD_START + 72) +#define HID_POOLSHEET_A4_HEADLINE (HID_SD_START + 75) +#define HID_POOLSHEET_A4_TEXT (HID_SD_START + 105) +#define HID_POOLSHEET_A0 (HID_SD_START + 109) +#define HID_POOLSHEET_A0_TITLE (HID_SD_START + 110) +#define HID_POOLSHEET_A0_HEADLINE (HID_SD_START + 111) +#define HID_POOLSHEET_A0_TEXT (HID_SD_START + 112) +#define HID_POOLSHEET_GRAPHIC (HID_SD_START + 106) +#define HID_POOLSHEET_SHAPES (HID_SD_START + 107) +#define HID_POOLSHEET_FILLED (HID_SD_START + 77) +#define HID_POOLSHEET_FILLED_BLUE (HID_SD_START + 78) +#define HID_POOLSHEET_FILLED_GREEN (HID_SD_START + 79) +#define HID_POOLSHEET_FILLED_RED (HID_SD_START + 80) +#define HID_POOLSHEET_FILLED_YELLOW (HID_SD_START + 81) +#define HID_POOLSHEET_OUTLINE (HID_SD_START + 82) +#define HID_POOLSHEET_OUTLINE_BLUE (HID_SD_START + 83) +#define HID_POOLSHEET_OUTLINE_GREEN (HID_SD_START + 84) +#define HID_POOLSHEET_OUTLINE_RED (HID_SD_START + 102) +#define HID_POOLSHEET_OUTLINE_YELLOW (HID_SD_START + 103) +#define HID_POOLSHEET_LINES (HID_SD_START + 108) +#define HID_POOLSHEET_MEASURE (HID_SD_START + 76) +#define HID_POOLSHEET_LINES_DASHED (HID_SD_START + 113) //dummy +#define HID_POOLSHEET_LAST (HID_SD_START + 114) //dummy + +#define HID_PSEUDOSHEET_TITLE (HID_SD_START + 85) +#define HID_PSEUDOSHEET_OUTLINE (HID_SD_START + 86) +#define HID_PSEUDOSHEET_OUTLINE1 (HID_SD_START + 87) +#define HID_PSEUDOSHEET_OUTLINE2 (HID_SD_START + 88) +#define HID_PSEUDOSHEET_OUTLINE3 (HID_SD_START + 89) +#define HID_PSEUDOSHEET_OUTLINE4 (HID_SD_START + 90) +#define HID_PSEUDOSHEET_OUTLINE5 (HID_SD_START + 91) +#define HID_PSEUDOSHEET_OUTLINE6 (HID_SD_START + 92) +#define HID_PSEUDOSHEET_OUTLINE7 (HID_SD_START + 93) +#define HID_PSEUDOSHEET_OUTLINE8 (HID_SD_START + 94) +#define HID_PSEUDOSHEET_OUTLINE9 (HID_SD_START + 95) +#define HID_PSEUDOSHEET_BACKGROUNDOBJECTS (HID_SD_START + 96) +#define HID_PSEUDOSHEET_BACKGROUND (HID_SD_START + 97) +#define HID_PSEUDOSHEET_NOTES (HID_SD_START + 98) +#define HID_PSEUDOSHEET_SUBTITLE (HID_SD_START + 101) + +#define HID_SD_CELL_STYLE_DEFAULT (HID_SD_START + 194) +#define HID_SD_CELL_STYLE_BANDED (HID_SD_START + 195) +#define HID_SD_CELL_STYLE_HEADER (HID_SD_START + 196) +#define HID_SD_CELL_STYLE_TOTAL (HID_SD_START + 197) +#define HID_SD_CELL_STYLE_FIRST_COLUMN (HID_SD_START + 198) +#define HID_SD_CELL_STYLE_LAST_COLUMN (HID_SD_START + 199) + +#define SID_PAGESETUP (SID_SD_START+2) + // FREE +#define SID_COPYOBJECTS (SID_SD_START+4) +#define SID_MANAGE_LINKS (SID_SD_START+5) + // FREE +#define SID_CONVERT_TO_3D_LATHE (SID_SD_START+8) +#define SID_DRAWINGMODE (SID_SD_START+9) +#define SID_OUTLINE_MODE (SID_SD_START+10) +#define SID_SLIDE_SORTER_MODE (SID_SD_START+11) +#define SID_DISPLAY_MODE (SID_SD_START+12) +#define SID_TOGGLE_TABBAR_VISIBILITY (SID_SD_START+13) +#define SID_INSERTPAGE (SID_SD_START+14) +#define SID_INSERTFILE (SID_SD_START+15) + // FREE +#define SID_ZOOM_PANNING (SID_SD_START+17) +#define SID_PRESENTATION_END (SID_SD_START+18) + // FREE +#define SID_POSITION (SID_SD_START+22) + // FREE +#define SID_TEXT_COMBINE (SID_SD_START+25) +#define SID_COMBINE (SID_SD_START+26) +#define SID_NAME_GROUP (SID_SD_START+27) +#define SID_DRAWTBX_CONNECTORS (SID_SD_START+28) + // FREE +// In svxids.hrc: SID_BEZIER_ELIMINATE_POINTS (SID_SD_START+30) +#define SID_MOREFRONT (SID_SD_START+31) +#define SID_MOREBACK (SID_SD_START+32) +// #i68101# +#define SID_OBJECT_TITLE_DESCRIPTION (SID_SD_START+33) +#define SID_VERTICAL (SID_SD_START+34) +#define SID_HORIZONTAL (SID_SD_START+35) +#define SID_CHANGEBEZIER (SID_SD_START+36) +#define SID_CHANGEPOLYGON (SID_SD_START+37) +#define SID_CAPTUREPOINT (SID_SD_START+38) +#define SID_INSERTLAYER (SID_SD_START+39) +// In svxids.hrc: SID_RULER (SID_SD_START+40) +#define SID_EDIT_OUTLINER (SID_SD_START+41) +#define SID_SWITCHPAGE (SID_SD_START+42) +#define SID_MODIFYPAGE (SID_SD_START+43) +#define SID_SWITCHLAYER (SID_SD_START+44) +#define SID_MODIFYLAYER (SID_SD_START+45) +#define SID_PAGEMODE (SID_SD_START+46) +#define SID_LAYERMODE (SID_SD_START+47) + // FREE +#define SID_MASTERPAGE (SID_SD_START+50) +// Navigation between slides +#define SID_GO_TO_NEXT_PAGE (SID_SD_START+51) +#define SID_GO_TO_PREVIOUS_PAGE (SID_SD_START+52) +#define SID_GO_TO_FIRST_PAGE (SID_SD_START+53) +#define SID_GO_TO_LAST_PAGE (SID_SD_START+54) +// Slide sorting +#define SID_MOVE_PAGE_UP (SID_SD_START+55) +#define SID_MOVE_PAGE_DOWN (SID_SD_START+56) +#define SID_MOVE_PAGE_FIRST (SID_SD_START+57) +#define SID_MOVE_PAGE_LAST (SID_SD_START+58) + // FREE +#define SID_TOOL_CONNECTOR (SID_SD_START+61) +#define SID_ANIMATION_OBJECTS (SID_SD_START+62) +#define SID_ANIMATION_EFFECTS (SID_SD_START+63) +#define SID_PRESENTATION_LAYOUT (SID_SD_START+64) +// In svxids.hrc: SID_BEZIER_CONVERT (SID_SD_START+65) +// In svxids.hrc: SID_BEZIER_EDGE (SID_SD_START+66) +// In svxids.hrc: SID_BEZIER_SYMMTR (SID_SD_START+67) +#define SID_NOTES_MODE TypedWhichId(SID_SD_START+69) +#define SID_HANDOUT_MASTER_MODE (SID_SD_START+70) +#define SID_LINEEND_POLYGON (SID_SD_START+71) +#define SID_EXECUTE_ANIMATION_EFFECT (SID_SD_START+72) + // FREE +#define SID_SWITCH_POINTEDIT (SID_SD_START+74) + // FREE +// In svxids.hrc: SID_TEXTEDIT (SID_SD_START+76) +#define SID_SET_SNAPITEM (SID_SD_START+77) + // FREE +#define SID_DELETE_PAGE (SID_SD_START+80) +#define SID_DELETE_LAYER (SID_SD_START+81) +#define SID_DISMANTLE (SID_SD_START+82) + // FREE +#define SID_SCALE (SID_SD_START+85) +#define SID_STATUS_PAGE (SID_SD_START+86) +#define SID_STATUS_LAYOUT (SID_SD_START+87) +#define SID_STATUS_SELMODE (SID_SD_START+88) +// In sfxsids.hrc: SID_MODIFIED TypedWhichId(SID_SD_START+89) +#define SID_OBJECT_CROOK_ROTATE (SID_SD_START+90) +#define SID_OBJECT_CROOK_SLANT (SID_SD_START+91) +#define SID_OBJECT_CROOK_STRETCH (SID_SD_START+92) +#define SID_CONNECT (SID_SD_START+93) +#define SID_BREAK (SID_SD_START+94) +#define SID_OBJECT_CHOOSE_MODE (SID_SD_START+95) +// In svxids.hrc: SID_ENTER_GROUP (SID_SD_START+96) +// In svxids.hrc: SID_LEAVE_GROUP (SID_SD_START+97) +// In svxids.hrc: SID_SIZE_PAGE_WIDTH (SID_SD_START+98) +// In sfxsids.hrc: SID_SIZE_OPTIMAL (SID_SD_START+99) +#define SID_OBJECT_TRANSPARENCE (SID_SD_START+100) +#define SID_OBJECT_GRADIENT (SID_SD_START+101) + // FREE +// In svxids.hrc: SID_INSERT_MATH (SID_SD_START+106) +#define SID_OBJECT_SHEAR (SID_SD_START+107) +#define SID_DELETE_SNAPITEM (SID_SD_START+108) +#define SID_OBJECT_CLOSE (SID_SD_START+109) +#define SID_ANIMATOR_ADD (SID_SD_START+110) +#define SID_ANIMATOR_CREATE (SID_SD_START+111) +#define SID_ANIMATOR_STATE (SID_SD_START+112) +#define SID_PRESENTATIONOBJECT (SID_SD_START+113) +// In svxids.hrc: SID_SIZE_VISAREA (SID_SD_START+114) +// In svxids.hrc: SID_ATTR_SYMBOLTYPE (SID_SD_START+115) +// In svxids.hrc: SID_ATTR_SYMBOLSIZE (SID_SD_START+116) +#define SID_REVERSE_ORDER (SID_SD_START+117) +#define SID_CLEAR_UNDO_STACK (SID_SD_START+118) +#define SID_CONNECTOR_ARROW_START (SID_SD_START+119) +#define SID_CONNECTOR_ARROW_END (SID_SD_START+120) +#define SID_CONNECTOR_ARROWS (SID_SD_START+121) +#define SID_CONNECTOR_CIRCLE_START (SID_SD_START+122) +#define SID_CONNECTOR_CIRCLE_END (SID_SD_START+123) +#define SID_CONNECTOR_CIRCLES (SID_SD_START+124) +#define SID_CONNECTOR_LINE (SID_SD_START+125) +#define SID_CONNECTOR_LINE_ARROW_START (SID_SD_START+126) +#define SID_CONNECTOR_LINE_ARROW_END (SID_SD_START+127) +#define SID_CONNECTOR_LINE_ARROWS (SID_SD_START+128) +#define SID_CONNECTOR_LINE_CIRCLE_START (SID_SD_START+129) +#define SID_CONNECTOR_LINE_CIRCLE_END (SID_SD_START+130) +#define SID_CONNECTOR_LINE_CIRCLES (SID_SD_START+131) +#define SID_CONNECTOR_CURVE (SID_SD_START+132) +#define SID_CONNECTOR_CURVE_ARROW_START (SID_SD_START+133) +#define SID_CONNECTOR_CURVE_ARROW_END (SID_SD_START+134) +#define SID_CONNECTOR_CURVE_ARROWS (SID_SD_START+135) +#define SID_CONNECTOR_CURVE_CIRCLE_START (SID_SD_START+136) +#define SID_CONNECTOR_CURVE_CIRCLE_END (SID_SD_START+137) +#define SID_CONNECTOR_CURVE_CIRCLES (SID_SD_START+138) +#define SID_CONNECTOR_LINES (SID_SD_START+139) +#define SID_CONNECTOR_LINES_ARROW_START (SID_SD_START+140) +#define SID_CONNECTOR_LINES_ARROW_END (SID_SD_START+141) +#define SID_CONNECTOR_LINES_ARROWS (SID_SD_START+142) +#define SID_CONNECTOR_LINES_CIRCLE_START (SID_SD_START+143) +#define SID_CONNECTOR_LINES_CIRCLE_END (SID_SD_START+144) +#define SID_CONNECTOR_LINES_CIRCLES (SID_SD_START+145) +#define SID_BEHIND_OBJ (SID_SD_START+146) + // FREE +// Option pane slot IDs +#define SID_SOLID_CREATE (SID_SD_START+151) +#define SID_HELPLINES_USE (SID_SD_START+152) +// In svxids.hrc: SID_HELPLINES_MOVE (SID_SD_START+153) +// In svxids.hrc: SID_GRID_USE (SID_SD_START+154) +#define SID_SNAP_BORDER (SID_SD_START+155) +#define SID_SNAP_FRAME (SID_SD_START+156) +#define SID_SNAP_POINTS (SID_SD_START+157) +#define SID_QUICKEDIT (SID_SD_START+158) +#define SID_PICK_THROUGH (SID_SD_START+159) + // FREE 160 - 168 +#define SID_DOUBLECLICK_TEXTEDIT (SID_SD_START+169) +#define SID_CLICK_CHANGE_ROTATION (SID_SD_START+170) +#define SID_HELPLINES_VISIBLE (SID_SD_START+179) +#define SID_HELPLINES_FRONT (SID_SD_START+180) +#define SID_BEFORE_OBJ (SID_SD_START+181) + // FREE +#define SID_CUSTOM_ANIMATION_PANEL (SID_SD_START+183) +#define SID_MASTER_SLIDES_PANEL (SID_SD_START+184) + // FREE +// and even more... +#define ID_VAL_ENDINTENS (SID_SD_START+197) +#define ID_VAL_STARTINTENS (SID_SD_START+198) +#define ID_VAL_BORDER (SID_SD_START+199) +// In svxids.hrc: ID_VAL_MOUSESTART_X (SID_SD_START+200) +// In svxids.hrc: ID_VAL_MOUSESTART_Y (SID_SD_START+201) +// In svxids.hrc: ID_VAL_MOUSEEND_X (SID_SD_START+204) +// In svxids.hrc: ID_VAL_MOUSEEND_Y (SID_SD_START+205) +// In svxids.hrc: ID_VAL_AXIS_X (SID_SD_START+206) +// In svxids.hrc: ID_VAL_AXIS_Y (SID_SD_START+207) +// In svxids.hrc: ID_VAL_ANGLESTART (SID_SD_START+208) +// In svxids.hrc: ID_VAL_ANGLEEND (SID_SD_START+209) +// In svxids.hrc: ID_VAL_CENTER_X (SID_SD_START+210) +// In svxids.hrc: ID_VAL_CENTER_Y (SID_SD_START+211) +#define ID_VAL_WHATPAGE (SID_SD_START+212) +#define ID_VAL_WHATLAYER (SID_SD_START+213) +#define ID_VAL_ANGLE (SID_SD_START+214) +#define ID_VAL_MIRRORVERT (SID_SD_START+215) +#define ID_VAL_ISACTIVE (SID_SD_START+216) +#define ID_VAL_WHATKIND (SID_SD_START+217) +#define ID_VAL_PAGEWIDTH (SID_SD_START+218) + // FREE +#define ID_VAL_PAGETOP (SID_SD_START+220) +#define ID_VAL_PAGEBOTTOM (SID_SD_START+221) +#define ID_VAL_PAGELEFT (SID_SD_START+222) +#define ID_VAL_PAGERIGHT (SID_SD_START+223) +#define ID_VAL_SCALEOBJECTS (SID_SD_START+224) +#define ID_VAL_PAGENAME (SID_SD_START+225) +#define ID_VAL_WHATLAYOUT (SID_SD_START+226) +#define ID_VAL_ISPAGEBACK (SID_SD_START+227) +#define ID_VAL_ISPAGEOBJ (SID_SD_START+228) +#define ID_VAL_LAYERNAME (SID_SD_START+229) + +// just for tests, namely that APP:HRC ff. has not to be build every time +// In sfxsids.hrc: ID_VAL_DUMMY0 (SID_SD_START+230) +#define ID_VAL_ISLOCKED (SID_SD_START+231) +#define ID_VAL_ISPRINTABLE (SID_SD_START+232) +#define ID_VAL_PAGEHEIGHT (SID_SD_START+233) +#define ID_VAL_ZOOM (SID_SD_START+234) +#define ID_VAL_RED (SID_SD_START+237) +#define ID_VAL_GREEN (SID_SD_START+238) +#define ID_VAL_BLUE (SID_SD_START+239) +// In svxids.hrc: ID_VAL_STYLE (SID_SD_START+240) +// In svxids.hrc: ID_VAL_DOTS (SID_SD_START+241) +// In svxids.hrc: ID_VAL_DOTLEN (SID_SD_START+242) +// In svxids.hrc: ID_VAL_DASHES (SID_SD_START+243) +// In svxids.hrc: ID_VAL_DASHLEN (SID_SD_START+244) +// In svxids.hrc: ID_VAL_DISTANCE (SID_SD_START+245) +// In svxids.hrc: ID_VAL_INDEX (SID_SD_START+246) +#define ID_VAL_WIDTH (SID_SD_START+247) +#define SID_GRID_FRONT (SID_SD_START+248) +#define ID_VAL_ISVISIBLE (SID_SD_START+249) +#define SID_MOVETO (SID_SD_START+250) +#define SID_LINETO (SID_SD_START+251) +// In svxids.hrc: SID_BEZIERTO (SID_SD_START+252) +#define SID_PAGESIZE (SID_SD_START+253) +#define SID_PAGEMARGIN (SID_SD_START+254) + // FREE +#define SID_COLORVIEW (SID_SD_START+257) + // FREE +#define SID_GETRED (SID_SD_START+259) +#define SID_GETBLUE (SID_SD_START+260) +#define SID_GETGREEN (SID_SD_START+261) +#define SID_SETFILLSTYLE (SID_SD_START+262) +#define SID_SETFILLCOLOR (SID_SD_START+263) +#define SID_GRADIENT (SID_SD_START+264) +#define SID_SETLINESTYLE (SID_SD_START+265) +#define SID_SETLINEWIDTH (SID_SD_START+266) +// In svxids.hrc: SID_DASH (SID_SD_START+267) +#define SID_RENAMEPAGE (SID_SD_START+268) +#define SID_RENAMELAYER (SID_SD_START+269) +#define SID_HATCH (SID_SD_START+270) +#define SID_GETFILLSTYLE (SID_SD_START+271) +#define SID_GETLINESTYLE (SID_SD_START+272) +#define SID_GETLINEWIDTH (SID_SD_START+273) +#define SID_SETLINECOLOR (SID_SD_START+274) +#define SID_SETHATCHCOLOR (SID_SD_START+275) +#define SID_SETGRADSTARTCOLOR (SID_SD_START+276) +#define SID_SETGRADENDCOLOR (SID_SD_START+277) +#define SID_SELECTGRADIENT (SID_SD_START+278) +#define SID_SELECTHATCH (SID_SD_START+279) +#define SID_UNSELECT (SID_SD_START+280) +#define SID_TEXTATTR_DLG (SID_SD_START+281) +#define SID_ORIGINAL_SIZE (SID_SD_START+282) +#define SID_PAGES_PER_ROW (SID_SD_START+284) +#define SID_TEXT_FITTOSIZE (SID_SD_START+285) +// In svxids.hrc: SID_TEXT_FITTOSIZE_VERTICAL (SID_SD_START+286) +#define SID_NAVIGATOR_PAGENAME (SID_SD_START+287) +#define SID_NAVIGATOR_STATE (SID_SD_START+288) +#define SID_NAVIGATOR_INIT (SID_SD_START+289) + // FREE +#define SID_NAVIGATOR_PAGE (SID_SD_START+292) +#define SID_NAVIGATOR_OBJECT (SID_SD_START+293) +#define SID_ANIMATOR_INIT (SID_SD_START+294) +#define SID_DRAWTBX_3D_OBJECTS (SID_SD_START+295) +#define SID_3D_CUBE (SID_SD_START+296) +#define SID_3D_SPHERE (SID_SD_START+297) +#define SID_3D_CYLINDER (SID_SD_START+298) +#define SID_3D_CONE (SID_SD_START+299) +#define SID_3D_PYRAMID (SID_SD_START+300) +#define SID_GLUE_EDITMODE (SID_SD_START+301) +#define SID_GLUE_INSERT_POINT (SID_SD_START+302) +#define SID_GLUE_PERCENT (SID_SD_START+303) +#define SID_GLUE_ESCDIR (SID_SD_START+304) +#define SID_GLUE_HORZALIGN_CENTER (SID_SD_START+305) +#define SID_GLUE_HORZALIGN_LEFT (SID_SD_START+306) +#define SID_GLUE_HORZALIGN_RIGHT (SID_SD_START+307) +#define SID_GLUE_VERTALIGN_CENTER (SID_SD_START+308) +#define SID_GLUE_VERTALIGN_TOP (SID_SD_START+309) +#define SID_GLUE_VERTALIGN_BOTTOM (SID_SD_START+310) +#define SID_3D_SHELL (SID_SD_START+311) +#define SID_3D_TORUS (SID_SD_START+312) +#define SID_3D_HALF_SPHERE (SID_SD_START+313) +#define SID_GLUE_ESCDIR_LEFT (SID_SD_START+314) +#define SID_GLUE_ESCDIR_RIGHT (SID_SD_START+315) +#define SID_GLUE_ESCDIR_TOP (SID_SD_START+316) +#define SID_GLUE_ESCDIR_BOTTOM (SID_SD_START+317) +#define SID_DRAWTBX_INSERT (SID_SD_START+318) +#define SID_POLYGON_MORPHING (SID_SD_START+319) + // FREE +// In svxids.hrc: SID_GRID_VISIBLE (SID_SD_START+322) +// In svxids.hrc: ID_VAL_USEFIRSTROWSTYLE (SID_SD_START+323) +// In svxids.hrc: ID_VAL_USELASTROWSTYLE (SID_SD_START+324) +// In svxids.hrc: ID_VAL_USEBANDINGROWSTYLE (SID_SD_START+325) +// In svxids.hrc: ID_VAL_USEFIRSTCOLUMNSTYLE (SID_SD_START+326) +// In svxids.hrc: ID_VAL_USELASTCOLUMNSTYLE (SID_SD_START+327) +// In svxids.hrc: ID_VAL_USEBANDINGCOLUMNSTYLE (SID_SD_START+328) + + +#define SID_PREVIEW_STATE (SID_SD_START+329) + // FREE +#define SID_SLIDE_TRANSITIONS_PANEL (SID_SD_START+334) + // FREE +#define SID_PHOTOALBUM (SID_SD_START+336) +#define SID_REMOTE_DLG (SID_SD_START+337) +#define SID_CONNECTION_DLG (SID_SD_START+338) +#define SID_PRESENTATION_DLG (SID_SD_START+339) +#define SID_HYPHENATION (SID_SD_START+340) +#define SID_CONNECTION_NEW_ROUTING (SID_SD_START+341) +#define SID_DUPLICATE_PAGE (SID_SD_START+342) +#define SID_EXPAND_PAGE (SID_SD_START+343) +#define SID_SUMMARY_PAGE (SID_SD_START+344) +#define SID_LEAVE_ALL_GROUPS (SID_SD_START+345) + // FREE +#define SID_SLIDE_MASTER_MODE TypedWhichId(SID_SD_START+348) + // FREE +#define SID_NOTES_MASTER_MODE (SID_SD_START+350) + // FREE +#define SID_INSERTPAGE_QUICK (SID_SD_START+352) + // FREE +#define SID_INSERT_FLD_PAGE_TITLE (SID_SD_START+356) +#define SID_INSERT_FLD_DATE_VAR (SID_SD_START+357) +#define SID_INSERT_FLD_DATE_FIX (SID_SD_START+358) +#define SID_INSERT_FLD_TIME_VAR (SID_SD_START+359) +#define SID_INSERT_FLD_TIME_FIX (SID_SD_START+360) +#define SID_INSERT_FLD_PAGE (SID_SD_START+361) +#define SID_MODIFY_FIELD (SID_SD_START+362) +#define SID_INSERT_FLD_FILE (SID_SD_START+363) +#define SID_INSERT_FLD_AUTHOR (SID_SD_START+364) +#define SID_CUSTOMSHOW_DLG (SID_SD_START+365) +#define SID_OUTPUT_QUALITY_COLOR (SID_SD_START+366) +#define SID_OUTPUT_QUALITY_GRAYSCALE (SID_SD_START+367) +#define SID_OUTPUT_QUALITY_BLACKWHITE (SID_SD_START+368) +#define SID_PREVIEW_QUALITY_COLOR (SID_SD_START+369) + // FREE +#define SID_INSERT_FLD_PAGES (SID_SD_START+373) + // FREE +#define SID_CONVERT_TO_BITMAP (SID_SD_START+378) +#define SID_CONVERT_TO_METAFILE (SID_SD_START+379) + // FREE +#define SID_CONVERT_TO_CONTOUR (SID_SD_START+381) + // FREE +#define ID_VAL_DUMMY1 (SID_SD_START+383) +#define ID_VAL_DUMMY2 (SID_SD_START+384) +#define ID_VAL_DUMMY3 (SID_SD_START+385) +#define ID_VAL_DUMMY4 (SID_SD_START+386) +#define ID_VAL_DUMMY5 (SID_SD_START+387) +#define ID_VAL_DUMMY6 (SID_SD_START+388) + // FREE +#define SID_OUTPUT_QUALITY_CONTRAST (SID_SD_START+400) +#define SID_PREVIEW_QUALITY_CONTRAST (SID_SD_START+401) + // FREE +#define SID_RENAMEPAGE_QUICK (SID_SD_START+405) +#define SID_SWITCH_SHELL (SID_SD_START+406) +#define SID_HEADER_AND_FOOTER (SID_SD_START+407) +#define SID_MASTER_LAYOUTS (SID_SD_START+408) + // FREE +#define SID_INSERT_PAGE_NUMBER (SID_SD_START+411) +#define SID_INSERT_DATE_TIME (SID_SD_START+412) +#define SID_SDMODE_FLAG (SID_SD_START+413) +// Enum in the middle of IDs... +#define SD_DRAW_MODE 1 +#define SD_IMPRESS_MODE 2 + +#define SID_LEFT_PANE_IMPRESS (SID_SD_START+414) +#define SID_LEFT_PANE_DRAW (SID_SD_START+415) + // FREE +#define SID_NOTES_WINDOW (SID_SD_START+417) + // FREE +#define SID_NORMAL_MULTI_PANE_GUI TypedWhichId(SID_SD_START+420) +#define SID_SLIDE_SORTER_MULTI_PANE_GUI (SID_SD_START+421) + +#define SID_SELECT_BACKGROUND (SID_SD_START+422) +#define SID_SAVE_BACKGROUND (SID_SD_START+423) + // FREE +// Slots for the tool pane popup + // FREE +#define SID_INSERT_MASTER_PAGE (SID_SD_START+431) +#define SID_DELETE_MASTER_PAGE (SID_SD_START+432) +#define SID_RENAME_MASTER_PAGE (SID_SD_START+433) +#define SID_CLOSE_MASTER_VIEW (SID_SD_START+434) +#define SID_ASSIGN_LAYOUT (SID_SD_START+435) +#define SID_DISPLAY_MASTER_BACKGROUND (SID_SD_START+436) +#define SID_DISPLAY_MASTER_OBJECTS (SID_SD_START+437) +#define SID_INSERTPAGE_LAYOUT_MENU (SID_SD_START+438) + // FREE +#define SID_OUTLINE_TEXT_AUTOFIT (SID_SD_START+440) + +// Add companion for the SID_HIDE_SLIDE (that is defined in svx) +#define SID_SHOW_SLIDE (SID_SD_START+441) +#define SID_ADD_MOTION_PATH TypedWhichId(SID_SD_START+442) + + // FREE +#define SID_ZOOM_MODE (SID_SD_START+447) +#define SID_HIDE_LAST_LEVEL (SID_SD_START+448) +#define SID_SHOW_NEXT_LEVEL (SID_SD_START+449) +#define SID_PRESENTATION_MINIMIZER (SID_SD_START+450) + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/bitmaps.hlst b/sd/inc/bitmaps.hlst new file mode 100644 index 000000000..e1c798cfa --- /dev/null +++ b/sd/inc/bitmaps.hlst @@ -0,0 +1,212 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * 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/. + */ + +#pragma once + +#include + +// preview bitmaps for layouts +inline constexpr OUStringLiteral BMP_LAYOUT_EMPTY = u"sd/res/layout_empty.png"; +inline constexpr OUStringLiteral BMP_LAYOUT_HEAD01 = u"sd/res/layout_head01.png"; +inline constexpr OUStringLiteral BMP_LAYOUT_HEAD02 = u"sd/res/layout_head02.png"; +inline constexpr OUStringLiteral BMP_LAYOUT_HEAD02A = u"sd/res/layout_head02a.png"; +inline constexpr OUStringLiteral BMP_LAYOUT_HEAD02B = u"sd/res/layout_head02b.png"; +inline constexpr OUStringLiteral BMP_LAYOUT_HEAD03 = u"sd/res/layout_head03.png"; +inline constexpr OUStringLiteral BMP_LAYOUT_HEAD03A = u"sd/res/layout_head03a.png"; +inline constexpr OUStringLiteral BMP_LAYOUT_HEAD03B = u"sd/res/layout_head03b.png"; +inline constexpr OUStringLiteral BMP_LAYOUT_HEAD03C = u"sd/res/layout_head03c.png"; +inline constexpr OUStringLiteral BMP_LAYOUT_HEAD04 = u"sd/res/layout_head04.png"; +inline constexpr OUStringLiteral BMP_LAYOUT_HEAD06 = u"sd/res/layout_head06.png"; +inline constexpr OUStringLiteral BMP_LAYOUT_TEXTONLY = u"sd/res/layout_textonly.png"; +inline constexpr OUStringLiteral BMP_LAYOUT_VERTICAL01 = u"sd/res/layout_vertical01.png"; +inline constexpr OUStringLiteral BMP_LAYOUT_VERTICAL02 = u"sd/res/layout_vertical02.png"; +inline constexpr OUStringLiteral BMP_SLIDE_NONE = u"sd/res/foilnone.png"; +inline constexpr OUStringLiteral BMP_SLIDEH_01 = u"sd/res/foilh01.png"; +inline constexpr OUStringLiteral BMP_SLIDEH_02 = u"sd/res/foilh02.png"; +inline constexpr OUStringLiteral BMP_SLIDEH_03 = u"sd/res/foilh03.png"; +inline constexpr OUStringLiteral BMP_SLIDEH_04 = u"sd/res/foilh04.png"; +inline constexpr OUStringLiteral BMP_SLIDEH_06 = u"sd/res/foilh06.png"; +inline constexpr OUStringLiteral BMP_SLIDEH_09 = u"sd/res/foilh09.png"; +inline constexpr OUStringLiteral BMP_DISPLAYMODE_SLIDE = u"sd/res/displaymode_slide.png"; +inline constexpr OUStringLiteral BMP_DISPLAYMODE_OUTLINE = u"sd/res/displaymode_outline.png"; +inline constexpr OUStringLiteral BMP_DISPLAYMODE_NOTES = u"sd/res/displaymode_notes.png"; +inline constexpr OUStringLiteral BMP_DISPLAYMODE_SLIDE_SORTER = u"sd/res/displaymode_slidesorter.png"; +inline constexpr OUStringLiteral BMP_DISPLAYMODE_SLIDE_MASTER = u"sd/res/displaymode_slidemaster.png"; +inline constexpr OUStringLiteral BMP_DISPLAYMODE_NOTES_MASTER = u"sd/res/displaymode_notesmaster.png"; +inline constexpr OUStringLiteral BMP_DISPLAYMODE_HANDOUT_MASTER = u"sd/res/displaymode_handoutmaster.png"; +inline constexpr OUStringLiteral BMP_PLACEHOLDER_CHART_SMALL = u"sd/res/placeholder_chart_small.png"; +inline constexpr OUStringLiteral BMP_PLACEHOLDER_CHART_SMALL_HOVER = u"sd/res/placeholder_chart_small_hover.png"; +inline constexpr OUStringLiteral BMP_PLACEHOLDER_IMAGE_SMALL = u"sd/res/placeholder_image_small.png"; +inline constexpr OUStringLiteral BMP_PLACEHOLDER_IMAGE_SMALL_HOVER = u"sd/res/placeholder_image_small_hover.png"; +inline constexpr OUStringLiteral BMP_PLACEHOLDER_MOVIE_SMALL = u"sd/res/placeholder_movie_small.png"; +inline constexpr OUStringLiteral BMP_PLACEHOLDER_MOVIE_SMALL_HOVER = u"sd/res/placeholder_movie_small_hover.png"; +inline constexpr OUStringLiteral BMP_PLACEHOLDER_TABLE_SMALL = u"sd/res/placeholder_table_small.png"; +inline constexpr OUStringLiteral BMP_PLACEHOLDER_TABLE_SMALL_HOVER = u"sd/res/placeholder_table_small_hover.png"; +inline constexpr OUStringLiteral BMP_PLACEHOLDER_CHART_LARGE = u"sd/res/placeholder_chart_large.png"; +inline constexpr OUStringLiteral BMP_PLACEHOLDER_CHART_LARGE_HOVER = u"sd/res/placeholder_chart_large_hover.png"; +inline constexpr OUStringLiteral BMP_PLACEHOLDER_IMAGE_LARGE = u"sd/res/placeholder_image_large.png"; +inline constexpr OUStringLiteral BMP_PLACEHOLDER_IMAGE_LARGE_HOVER = u"sd/res/placeholder_image_large_hover.png"; +inline constexpr OUStringLiteral BMP_PLACEHOLDER_MOVIE_LARGE = u"sd/res/placeholder_movie_large.png"; +inline constexpr OUStringLiteral BMP_PLACEHOLDER_MOVIE_LARGE_HOVER = u"sd/res/placeholder_movie_large_hover.png"; +inline constexpr OUStringLiteral BMP_PLACEHOLDER_TABLE_LARGE = u"sd/res/placeholder_table_large.png"; +inline constexpr OUStringLiteral BMP_PLACEHOLDER_TABLE_LARGE_HOVER = u"sd/res/placeholder_table_large_hover.png"; +inline constexpr OUStringLiteral BMP_SLIDEN_01 = u"sd/res/foiln01.png"; +inline constexpr OUStringLiteral BMP_PAGE = u"sd/res/page.png"; +inline constexpr OUStringLiteral BMP_PAGE_EXCLUDED = u"sd/res/pageexcl.png"; +inline constexpr OUStringLiteral BMP_PAGEOBJS_EXCLUDED = u"sd/res/pagobjex.png"; +inline constexpr OUStringLiteral BMP_PAGEOBJS = u"sd/res/pageobjs.png"; +inline constexpr OUStringLiteral BMP_OBJECTS = u"sd/res/objects.png"; +inline constexpr OUStringLiteral BMP_OLE = u"sd/res/ole.png"; +inline constexpr OUStringLiteral BMP_GROUP = u"sd/res/group.png"; +inline constexpr OUStringLiteral BMP_DOC_OPEN = u"sd/res/docopen.png"; +inline constexpr OUStringLiteral BMP_DOC_TEXT = u"sd/res/doctext.png" ; +inline constexpr OUStringLiteral BMP_GRAPHIC = u"sd/res/graphic.png"; +inline constexpr OUStringLiteral BMP_STYLES_FAMILY_GRAPHICS = u"sd/res/sf01.png"; +inline constexpr OUStringLiteral BMP_STYLES_FAMILY_PRESENTATIONS = u"sd/res/sf02.png"; +inline constexpr OUStringLiteral BMP_PRESOBJ_GRAPHIC = u"sd/res/image.png"; +inline constexpr OUStringLiteral BMP_PRESOBJ_OBJECT = u"sd/res/object.png"; +inline constexpr OUStringLiteral BMP_PRESOBJ_CHART = u"sd/res/chart.png"; +inline constexpr OUStringLiteral BMP_PRESOBJ_ORGCHART = u"sd/res/orgchart.png"; +inline constexpr OUStringLiteral BMP_PRESOBJ_TABLE = u"sd/res/table.png"; +inline constexpr OUStringLiteral BMP_POINTER_ICON = u"sd/res/pointericon.png"; +inline constexpr OUStringLiteral BMP_WAIT_ICON = u"sd/res/waiticon.png"; +inline constexpr OUStringLiteral BMP_FADE_EFFECT_INDICATOR = u"sd/res/fade_effect_indicator.png"; +inline constexpr OUStringLiteral BMP_CUSTOM_ANIMATION_INDICATOR = u"sd/res/click_16.png"; +// Presenter Screen bitmaps: +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BORDER_LEFT = u"sd/res/presenterscreen-BorderLeft.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BUTTON_SLIDE_NEXT_DISABLED = u"sd/res/presenterscreen-ButtonSlideNextDisabled.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BUTTON_SLIDE_PREVIOUS_SELECTED = u"sd/res/presenterscreen-ButtonSlidePreviousSelected.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BORDER_CURRENT_SLIDE_TOP = u"sd/res/presenterscreen-BorderCurrentSlideTop.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BUTTON_NOTES_SELECTED = u"sd/res/presenterscreen-ButtonNotesSelected.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_SCROLLBAR_ARROW_DOWN_SELECTED = u"sd/res/presenterscreen-ScrollbarArrowDownSelected.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BACKGROUND = u"sd/res/presenterscreen-Background.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_ANIMATION = u"sd/res/presenterscreen-Animation.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_TRANSITION = u"sd/res/presenterscreen-Transition.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BORDER_RIGHT = u"sd/res/presenterscreen-BorderRight.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BORDER_ACTIVE_TOP = u"sd/res/presenterscreen-BorderActiveTop.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BUTTON_HELP_DISABLED = u"sd/res/presenterscreen-ButtonHelpDisabled.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BORDER_ACTIVE_RIGHT = u"sd/res/presenterscreen-BorderActiveRight.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BUTTON_FRAME_CENTER_NORMAL = u"sd/res/presenterscreen-ButtonFrameCenterNormal.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_SCROLLBAR_THUMB_MIDDLE_MOUSE_OVER = u"sd/res/presenterscreen-ScrollbarThumbMiddleMouseOver.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BORDER_CURRENT_SLIDE_BOTTOM_RIGHT = u"sd/res/presenterscreen-BorderCurrentSlideBottomRight.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BORDER_TOP_LEFT = u"sd/res/presenterscreen-BorderTopLeft.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BORDER_ACTIVE_BOTTOM = u"sd/res/presenterscreen-BorderActiveBottom.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BORDER_BOTTOM_LEFT = u"sd/res/presenterscreen-BorderBottomLeft.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BORDER_TOOLBAR_TOP = u"sd/res/presenterscreen-BorderToolbarTop.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BORDER_ACTIVE_LEFT = u"sd/res/presenterscreen-BorderActiveLeft.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BUTTON_HELP_NORMAL = u"sd/res/presenterscreen-ButtonHelpNormal.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BUTTON_EXIT_PRESENTER_NORMAL = u"sd/res/presenterscreen-ButtonExitPresenterNormal.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_SEPARATOR = u"sd/res/presenterscreen-Separator.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BORDER_ACTIVE_BOTTOM_CALLOUT = u"sd/res/presenterscreen-BorderActiveBottomCallout.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BORDER_TOOLBAR_LEFT = u"sd/res/presenterscreen-BorderToolbarLeft.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BUTTON_SLIDE_SORTER_NORMAL = u"sd/res/presenterscreen-ButtonSlideSorterNormal.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_SCROLLBAR_PAGER_MIDDLE_NORMAL = u"sd/res/presenterscreen-ScrollbarPagerMiddleNormal.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BUTTON_FRAME_RIGHT_NORMAL = u"sd/res/presenterscreen-ButtonFrameRightNormal.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BUTTON_EFFECT_NEXT_MOUSE_OVER = u"sd/res/presenterscreen-ButtonEffectNextMouseOver.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_SCROLLBAR_THUMB_TOP_MOUSE_OVER = u"sd/res/presenterscreen-ScrollbarThumbTopMouseOver.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BUTTON_EFFECT_NEXT_DISABLED = u"sd/res/presenterscreen-ButtonEffectNextDisabled.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BUTTON_FRAME_CENTER_MOUSE_OVER = u"sd/res/presenterscreen-ButtonFrameCenterMouseOver.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BORDER_CURRENT_SLIDE_LEFT = u"sd/res/presenterscreen-BorderCurrentSlideLeft.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BUTTON_FRAME_LEFT_MOUSE_OVER = u"sd/res/presenterscreen-ButtonFrameLeftMouseOver.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BUTTON_HELP_SELECTED = u"sd/res/presenterscreen-ButtonHelpSelected.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_VIEW_BACKGROUND = u"sd/res/presenterscreen-ViewBackground.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BUTTON_NOTES_MOUSE_OVER = u"sd/res/presenterscreen-ButtonNotesMouseOver.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BUTTON_PLUS_MOUSE_OVER = u"sd/res/presenterscreen-ButtonPlusMouseOver.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BUTTON_SLIDE_SORTER_SELECTED = u"sd/res/presenterscreen-ButtonSlideSorterSelected.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_LABEL_MOUSE_OVER_RIGHT = u"sd/res/presenterscreen-LabelMouseOverRight.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BUTTON_SWITCH_MONITOR_NORMAL = u"sd/res/presenterscreen-ButtonSwitchMonitorNormal.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BUTTON_RESTART_TIMER_NORMAL = u"sd/res/presenterscreen-ButtonRestartTimerNormal.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BUTTON_PAUSE_TIMER_NORMAL = u"sd/res/presenterscreen-ButtonPauseTimerNormal.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BUTTON_RESUME_TIMER_NORMAL = u"sd/res/presenterscreen-ButtonResumeTimerNormal.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BORDER_TOOLBAR_RIGHT = u"sd/res/presenterscreen-BorderToolbarRight.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_SCROLLBAR_THUMB_MIDDLE_NORMAL = u"sd/res/presenterscreen-ScrollbarThumbMiddleNormal.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BUTTON_EFFECT_NEXT_SELECTED = u"sd/res/presenterscreen-ButtonEffectNextSelected.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_SCROLLBAR_ARROW_DOWN_NORMAL = u"sd/res/presenterscreen-ScrollbarArrowDownNormal.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BORDER_CURRENT_SLIDE_TOP_RIGHT = u"sd/res/presenterscreen-BorderCurrentSlideTopRight.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BUTTON_PLUS_NORMAL = u"sd/res/presenterscreen-ButtonPlusNormal.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BORDER_TOOLBAR_TOP_RIGHT = u"sd/res/presenterscreen-BorderToolbarTopRight.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BUTTON_MINUS_DISABLED = u"sd/res/presenterscreen-ButtonMinusDisabled.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_SCROLLBAR_ARROW_DOWN_DISABLED = u"sd/res/presenterscreen-ScrollbarArrowDownDisabled.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BUTTON_FRAME_RIGHT_MOUSE_OVER = u"sd/res/presenterscreen-ButtonFrameRightMouseOver.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BUTTON_SWITCH_MONITOR_MOUSE_OVER = u"sd/res/presenterscreen-ButtonSwitchMonitorMouseOver.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BUTTON_RESTART_TIMER_MOUSE_OVER = u"sd/res/presenterscreen-ButtonRestartTimerMouseOver.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BUTTON_PAUSE_TIMER_MOUSE_OVER = u"sd/res/presenterscreen-ButtonPauseTimerMouseOver.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BUTTON_RESUME_TIMER_MOUSE_OVER = u"sd/res/presenterscreen-ButtonResumeTimerMouseOver.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BUTTON_SLIDE_PREVIOUS_DISABLED = u"sd/res/presenterscreen-ButtonSlidePreviousDisabled.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BUTTON_MINUS_SELECTED = u"sd/res/presenterscreen-ButtonMinusSelected.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_LABEL_MOUSE_OVER_CENTER = u"sd/res/presenterscreen-LabelMouseOverCenter.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BUTTON_SLIDE_NEXT_MOUSE_OVER = u"sd/res/presenterscreen-ButtonSlideNextMouseOver.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BUTTON_SLIDE_NEXT_NORMAL = u"sd/res/presenterscreen-ButtonSlideNextNormal.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BUTTON_SLIDE_PREVIOUS_MOUSE_OVER = u"sd/res/presenterscreen-ButtonSlidePreviousMouseOver.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BORDER_TOP = u"sd/res/presenterscreen-BorderTop.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BUTTON_FRAME_LEFT_NORMAL = u"sd/res/presenterscreen-ButtonFrameLeftNormal.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_SCROLLBAR_ARROW_UP_MOUSE_OVER = u"sd/res/presenterscreen-ScrollbarArrowUpMouseOver.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BUTTON_NOTES_NORMAL = u"sd/res/presenterscreen-ButtonNotesNormal.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BUTTON_SLIDE_SORTER_DISABLED = u"sd/res/presenterscreen-ButtonSlideSorterDisabled.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BUTTON_EFFECT_NEXT_NORMAL = u"sd/res/presenterscreen-ButtonEffectNextNormal.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BORDER_TOOLBAR_TOP_LEFT = u"sd/res/presenterscreen-BorderToolbarTopLeft.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BORDER_ACTIVE_BOTTOM_RIGHT = u"sd/res/presenterscreen-BorderActiveBottomRight.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BORDER_BOTTOM = u"sd/res/presenterscreen-BorderBottom.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BORDER_ACTIVE_BOTTOM_LEFT = u"sd/res/presenterscreen-BorderActiveBottomLeft.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_SCROLLBAR_ARROW_DOWN_MOUSE_OVER = u"sd/res/presenterscreen-ScrollbarArrowDownMouseOver.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BUTTON_PLUS_SELECTED = u"sd/res/presenterscreen-ButtonPlusSelected.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BORDER_ACTIVE_TOP_RIGHT = u"sd/res/presenterscreen-BorderActiveTopRight.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BUTTON_SLIDE_PREVIOUS_NORMAL = u"sd/res/presenterscreen-ButtonSlidePreviousNormal.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BUTTON_SLIDE_SORTER_MOUSE_OVER = u"sd/res/presenterscreen-ButtonSlideSorterMouseOver.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BUTTON_MINUS_MOUSE_OVER = u"sd/res/presenterscreen-ButtonMinusMouseOver.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BUTTON_NOTES_DISABLED = u"sd/res/presenterscreen-ButtonNotesDisabled.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BORDER_CURRENT_SLIDE_BOTTOM_LEFT = u"sd/res/presenterscreen-BorderCurrentSlideBottomLeft.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BORDER_TOP_RIGHT = u"sd/res/presenterscreen-BorderTopRight.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BUTTON_HELP_MOUSE_OVER = u"sd/res/presenterscreen-ButtonHelpMouseOver.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BUTTON_EXIT_PRESENTER_MOUSE_OVER = u"sd/res/presenterscreen-ButtonExitPresenterMouseOver.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_SCROLLBAR_THUMB_TOP_NORMAL = u"sd/res/presenterscreen-ScrollbarThumbTopNormal.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_SCROLLBAR_ARROW_UP_SELECTED = u"sd/res/presenterscreen-ScrollbarArrowUpSelected.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_SCROLLBAR_ARROW_UP_DISABLED = u"sd/res/presenterscreen-ScrollbarArrowUpDisabled.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_SCROLLBAR_ARROW_UP_NORMAL = u"sd/res/presenterscreen-ScrollbarArrowUpNormal.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BORDER_TOOLBAR_BOTTOM = u"sd/res/presenterscreen-BorderToolbarBottom.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BORDER_CURRENT_SLIDE_TOP_LEFT = u"sd/res/presenterscreen-BorderCurrentSlideTopLeft.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BUTTON_MINUS_NORMAL = u"sd/res/presenterscreen-ButtonMinusNormal.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_SCROLLBAR_THUMB_BOTTOM_MOUSE_OVER = u"sd/res/presenterscreen-ScrollbarThumbBottomMouseOver.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BORDER_ACTIVE_TOP_LEFT = u"sd/res/presenterscreen-BorderActiveTopLeft.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BORDER_CURRENT_SLIDE_BOTTOM = u"sd/res/presenterscreen-BorderCurrentSlideBottom.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_SCROLLBAR_PAGER_MIDDLE_MOUSE_OVER = u"sd/res/presenterscreen-ScrollbarPagerMiddleMouseOver.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_LABEL_MOUSE_OVER_LEFT = u"sd/res/presenterscreen-LabelMouseOverLeft.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BORDER_CURRENT_SLIDE_RIGHT = u"sd/res/presenterscreen-BorderCurrentSlideRight.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BORDER_BOTTOM_RIGHT = u"sd/res/presenterscreen-BorderBottomRight.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_SCROLLBAR_THUMB_BOTTOM_NORMAL = u"sd/res/presenterscreen-ScrollbarThumbBottomNormal.png"; +inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BUTTON_PLUS_DISABLED = u"sd/res/presenterscreen-ButtonPlusDisabled.png"; + +inline constexpr OUStringLiteral BMP_EMBEDDED = u"sd/res/nv08.png"; +inline constexpr OUStringLiteral BMP_LINK = u"sd/res/nv09.png"; +inline constexpr OUStringLiteral BMP_HYPERLINK = u"sd/res/nv010.png"; + +inline constexpr OUStringLiteral IMAGE_SHADOW = u"sd/res/slide_sorter_shadow.png"; +inline constexpr OUStringLiteral IMAGE_INSERT_SHADOW = u"sd/res/slide_sorter_insert_shadow.png"; +inline constexpr OUStringLiteral IMAGE_HIDE_SLIDE_OVERLAY = u"sd/res/slide_sorter_hide_slide_overlay.png"; +inline constexpr OUStringLiteral IMAGE_FOCUS_BORDER = u"sd/res/slide_sorter_focus_border.png"; + +inline constexpr OUStringLiteral BMP_CUSTOMANIMATION_ON_CLICK = u"sd/res/click_16.png"; +inline constexpr OUStringLiteral BMP_CUSTOMANIMATION_AFTER_PREVIOUS = u"sd/res/time_16.png"; +inline constexpr OUStringLiteral BMP_CUSTOMANIMATION_ENTRANCE_EFFECT = u"sd/res/effect_16.png"; +inline constexpr OUStringLiteral BMP_CUSTOMANIMATION_EMPHASIS_EFFECT = u"sd/res/effectshape_16.png"; +inline constexpr OUStringLiteral BMP_CUSTOMANIMATION_EXIT_EFFECT = u"sd/res/effectfade_16.png"; +inline constexpr OUStringLiteral BMP_CUSTOMANIMATION_MOTION_PATH = u"sd/res/effectpath_16.png"; +inline constexpr OUStringLiteral BMP_CUSTOMANIMATION_OLE = u"sd/res/effectole_16.png"; +inline constexpr OUStringLiteral BMP_CUSTOMANIMATION_MEDIA_PLAY = u"sd/res/playblue_16.png"; +inline constexpr OUStringLiteral BMP_CUSTOMANIMATION_MEDIA_PAUSE = u"sd/res/breakplayingblue_16.png"; +inline constexpr OUStringLiteral BMP_CUSTOMANIMATION_MEDIA_STOP = u"sd/res/stopplayingblue_16.png"; + +inline constexpr OUStringLiteral BMP_MENU_NEXT = u"cmd/sc_nextrecord.png"; +inline constexpr OUStringLiteral BMP_MENU_PREV = u"cmd/sc_prevrecord.png"; +inline constexpr OUStringLiteral BMP_MENU_FIRST = u"cmd/sc_firstrecord.png"; +inline constexpr OUStringLiteral BMP_MENU_LAST = u"cmd/sc_lastrecord.png"; + +inline constexpr OUStringLiteral SFX_BMP_CLOSE_DOC = u"sfx2/res/closedoc.png"; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/sd/inc/createpresentation.hxx b/sd/inc/createpresentation.hxx new file mode 100644 index 000000000..b1c3016e4 --- /dev/null +++ b/sd/inc/createpresentation.hxx @@ -0,0 +1,35 @@ +/* -*- 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 . + */ + +#pragma once + +#include + +#include + +namespace com::sun::star::presentation +{ +class XPresentation2; +} +class SdDrawDocument; + +css::uno::Reference +CreatePresentation(SdDrawDocument const& rDocument); + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/createunocustomshow.hxx b/sd/inc/createunocustomshow.hxx new file mode 100644 index 000000000..334aa867a --- /dev/null +++ b/sd/inc/createunocustomshow.hxx @@ -0,0 +1,30 @@ +/* -*- 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 . + */ + +#pragma once + +#include + +namespace com::sun::star::uno { class XInterface; } +class SdCustomShow; + +css::uno::Reference createUnoCustomShow( + SdCustomShow * pShow); + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/createunopageimpl.hxx b/sd/inc/createunopageimpl.hxx new file mode 100644 index 000000000..8707704c1 --- /dev/null +++ b/sd/inc/createunopageimpl.hxx @@ -0,0 +1,32 @@ +/* -*- 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 . + */ + +#pragma once + +#include + +namespace com::sun::star::uno +{ +class XInterface; +} +class SdPage; + +css::uno::Reference createUnoPageImpl(SdPage* pPage); + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/cusshow.hxx b/sd/inc/cusshow.hxx new file mode 100644 index 000000000..c0115c310 --- /dev/null +++ b/sd/inc/cusshow.hxx @@ -0,0 +1,65 @@ +/* -*- 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 . + */ + +#pragma once + +#include +#include +#include "sddllapi.h" + +class SdPage; + +class SD_DLLPUBLIC SdCustomShow final +{ +public: + typedef ::std::vector PageVec; + +private: + PageVec maPages; + OUString aName; + + // this is a weak reference to a possible living api wrapper for this custom show + css::uno::WeakReference mxUnoCustomShow; + +public: + SdCustomShow(); + SdCustomShow(css::uno::Reference const& xShow); + + ~SdCustomShow(); + + // @@@ copy ctor, but no copy assignment? @@@ + SdCustomShow(const SdCustomShow& rShow); + + SdCustomShow& operator=(const SdCustomShow& rShow) = delete; + + /** Provides a direct access to the collection of the SdPage objects. */ + PageVec& PagesVector() { return maPages; } + /** + * Replaces all occurrences of pOldPage with pNewPage. + * If pNewPage is 0 then removes all occurrences of pOldPage. + */ + void ReplacePage(const SdPage* pOldPage, const SdPage* pNewPage); + + void SetName(const OUString& rName); + const OUString& GetName() const { return aName; } + + css::uno::Reference getUnoCustomShow(); +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/customshowlist.hxx b/sd/inc/customshowlist.hxx new file mode 100644 index 000000000..8a1706ec2 --- /dev/null +++ b/sd/inc/customshowlist.hxx @@ -0,0 +1,89 @@ +/* -*- 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 . + */ + +#pragma once + +#include "sddllapi.h" +#include "cusshow.hxx" +#include +#include +#include +#include + +class SD_DLLPUBLIC SdCustomShowList +{ +private: + std::vector> mShows; + sal_uInt16 mnCurPos; +public: + SdCustomShowList() + : mShows(), mnCurPos(0) + { + } + + SdCustomShowList& operator=( SdCustomShowList const & ) = delete; // MSVC2017 workaround + SdCustomShowList( SdCustomShowList const & ) = delete; // MSVC2017 workaround + + bool empty() const {return mShows.empty();} + + size_t size() const {return mShows.size();} + + std::unique_ptr& operator[](size_t i) {return mShows[i];} + + std::vector>::iterator begin() {return mShows.begin();} + + void erase(std::vector>::iterator it); + + void push_back(std::unique_ptr p) {mShows.push_back(std::move(p));} + + sal_uInt16 GetCurPos() const { return mnCurPos; } + void Seek(sal_uInt16 nNewPos) { mnCurPos = nNewPos; } + + SdCustomShow* First() + { + if( mShows.empty() ) + return nullptr; + mnCurPos = 0; + return mShows[mnCurPos].get(); + } + SdCustomShow* Next() + { + ++mnCurPos; + return mnCurPos >= mShows.size() ? nullptr : mShows[mnCurPos].get(); + } + void Last() + { + if( !mShows.empty() ) + mnCurPos = mShows.size() - 1; + } + SdCustomShow* GetCurObject() + { + return mShows.empty() ? nullptr : mShows[mnCurPos].get(); + } + void erase(const SdCustomShow* p) + { + auto it = std::find_if(mShows.begin(), mShows.end(), + [&] (std::unique_ptr const &i) { return i.get() == p; }); + assert( it != mShows.end() ); + if( it != mShows.end() ) + mShows.erase(it); + } +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/diadef.h b/sd/inc/diadef.h new file mode 100644 index 000000000..6d0f9a266 --- /dev/null +++ b/sd/inc/diadef.h @@ -0,0 +1,30 @@ +/* -*- 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 . + */ + +#pragma once + +enum class PresChange +{ + Manual = 0, + Auto = 1, + SemiAuto = 2, + LAST = SemiAuto +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/drawdoc.hxx b/sd/inc/drawdoc.hxx new file mode 100644 index 000000000..a99c27c49 --- /dev/null +++ b/sd/inc/drawdoc.hxx @@ -0,0 +1,719 @@ +/* -*- 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 . + */ + +#pragma once + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "sddllapi.h" +#include "pres.hxx" + +namespace com::sun::star::xml::dom { class XNode; } +namespace com::sun::star::uno { class XInterface; } +namespace vcl { class Font; } +namespace com::sun::star::presentation { class XPresentation2; } +class SdOutliner; +class Timer; +class SfxObjectShell; +class SdPage; +class SdAnimationInfo; +class SdStyleSheetPool; +class SfxMedium; +class SvxSearchItem; +class EditStatus; +class Point; +class SdTransferable; +struct SpellCallbackInfo; +class SdCustomShowList; +class SdUndoGroup; +class SdrObject; +class CharClass; +class Idle; +class ImageMap; +class Outliner; +class SdrModel; +class SdrOutliner; +class SdrPage; +class SdrTextObj; +class SfxItemPool; +class Size; + +namespace sd +{ +class DrawDocShell; +#ifndef SV_DECL_DRAW_DOC_SHELL_DEFINED +#define SV_DECL_DRAW_DOC_SHELL_DEFINED +typedef ::tools::SvRef DrawDocShellRef; +#endif +class UndoManager; +class ShapeList; +class FrameView; +} + +class ImpDrawPageListWatcher; +class ImpMasterPageListWatcher; + +struct StyleReplaceData +{ + SfxStyleFamily nFamily; + SfxStyleFamily nNewFamily; + OUString aName; + OUString aNewName; +}; + +enum class DocCreationMode +{ + New, + Loaded +}; + +namespace sd +{ + struct PresentationSettings + { + OUString maPresPage; + bool mbAll; + bool mbEndless; + bool mbCustomShow; + bool mbManual; + bool mbMouseVisible; + bool mbMouseAsPen; + bool mbLockedPages; + bool mbAlwaysOnTop; + bool mbFullScreen; + bool mbAnimationAllowed; + sal_Int32 mnPauseTimeout; + bool mbShowPauseLogo; + bool mbStartCustomShow; + + PresentationSettings(); + }; +} + +// SdDrawDocument +class SD_DLLPUBLIC SdDrawDocument final : public FmFormModel +{ +public: + SAL_DLLPRIVATE void setDocAccTitle( const OUString& rTitle ) { msDocAccTitle = rTitle; } + SAL_DLLPRIVATE const OUString& getDocAccTitle() const { return msDocAccTitle; } + SAL_DLLPRIVATE bool getDocReadOnly() const { return m_bReadOnly; } +private: + OUString msDocAccTitle; + std::unique_ptr + mpOutliner; ///< local outliner for outline mode + std::unique_ptr + mpInternalOutliner; ///< internal outliner for creation of text objects + std::unique_ptr mpWorkStartupTimer; + std::unique_ptr + mpOnlineSpellingIdle; + std::unique_ptr + mpOnlineSpellingList; + std::unique_ptr + mpOnlineSearchItem; + std::vector> + maFrameViewList; + std::unique_ptr mpCustomShowList; + ::sd::DrawDocShell* mpDocSh; + SdTransferable * mpCreatingTransferable; + bool mbHasOnlineSpellErrors; + bool mbInitialOnlineSpellingEnabled; + OUString maBookmarkFile; + ::sd::DrawDocShellRef mxBookmarkDocShRef; + + sd::PresentationSettings maPresentationSettings; + + css::uno::Reference< css::presentation::XPresentation2 > mxPresentation; + + bool mbNewOrLoadCompleted; + + bool mbOnlineSpell; + bool mbSummationOfParagraphs; + bool mbStartWithPresentation; ///< is set to true when starting with command line parameter -start + bool mbExitAfterPresenting; ///< true if mbStartWithPresentation AND Presentation was shown fully + LanguageType meLanguage; + LanguageType meLanguageCJK; + LanguageType meLanguageCTL; + SvxNumType mePageNumType; + ::sd::DrawDocShellRef mxAllocedDocShRef; // => AllocModel() + bool mbAllocDocSh; // => AllocModel() + DocumentType meDocType; + std::unique_ptr + mpCharClass; + + ::std::unique_ptr mpDrawPageListWatcher; + ::std::unique_ptr mpMasterPageListWatcher; + + SAL_DLLPRIVATE void UpdatePageObjectsInNotes(sal_uInt16 nStartPos); + SAL_DLLPRIVATE void UpdatePageRelativeURLs(SdPage const * pPage, sal_uInt16 nPos, sal_Int32 nIncrement); + SAL_DLLPRIVATE void FillOnlineSpellingList(SdPage const * pPage); + SAL_DLLPRIVATE void SpellObject(SdrTextObj* pObj); + + DECL_DLLPRIVATE_LINK(WorkStartupHdl, Timer *, void); + DECL_DLLPRIVATE_LINK(OnlineSpellingHdl, Timer *, void); + DECL_DLLPRIVATE_LINK(OnlineSpellEventHdl, EditStatus&, void); + + std::vector< OUString > maAnnotationAuthors; + std::vector > maLayoutInfo; + + std::vector > maPresObjectInfo; + + bool mbEmbedFonts : 1; + bool mbEmbedUsedFontsOnly : 1; + bool mbEmbedFontScriptLatin : 1; + bool mbEmbedFontScriptAsian : 1; + bool mbEmbedFontScriptComplex : 1; + + sal_Int32 mnImagePreferredDPI; + + SAL_DLLPRIVATE virtual css::uno::Reference< css::uno::XInterface > createUnoModel() override; + +public: + + + SAL_DLLPRIVATE SdDrawDocument(DocumentType eType, SfxObjectShell* pDocSh); + SAL_DLLPRIVATE virtual ~SdDrawDocument() override; + + // Adapt to given Size and Borders scaling all contained data, maybe + // including PresObj's in higher derivations + virtual void adaptSizeAndBorderForAllPages( + const Size& rNewSize, + tools::Long nLeft = 0, + tools::Long nRight = 0, + tools::Long nUpper = 0, + tools::Long nLower = 0) override; + + // Adapt PageSize for all Pages of PageKind ePageKind. Also + // set Borders to left/right/upper/lower, ScaleAll, Orientation, + // PaperBin and BackgroundFullSize. Create Undo-Actions when + // a SdUndoGroup is given (then used from the View probably) + void AdaptPageSizeForAllPages( + const Size& rNewSize, + PageKind ePageKind, + SdUndoGroup* pUndoGroup = nullptr, + tools::Long nLeft = 0, + tools::Long nRight = 0, + tools::Long nUpper = 0, + tools::Long nLower = 0, + bool bScaleAll = false, + Orientation eOrientation = Orientation::Landscape, + sal_uInt16 nPaperBin = 0, + bool bBackgroundFullSize = false); + + SAL_DLLPRIVATE SdDrawDocument* AllocSdDrawDocument() const; + SAL_DLLPRIVATE virtual SdrModel* AllocModel() const override; //forwards to AllocSdDrawDocument + + SAL_DLLPRIVATE rtl::Reference AllocSdPage(bool bMasterPage); + SAL_DLLPRIVATE virtual rtl::Reference AllocPage(bool bMasterPage) override; //forwards to AllocSdPage + + SAL_DLLPRIVATE virtual bool IsReadOnly() const override; + SAL_DLLPRIVATE virtual void SetChanged(bool bFlag = true) override; + + SAL_DLLPRIVATE SfxItemPool& GetPool() { return( *m_pItemPool ); } + + SAL_DLLPRIVATE SdOutliner* GetOutliner(bool bCreateOutliner=true); + SdOutliner* GetInternalOutliner(bool bCreateOutliner=true); + + SAL_DLLPRIVATE ::sd::DrawDocShell* GetDocSh() const { return mpDocSh; } + + SAL_DLLPRIVATE LanguageType GetLanguage( const sal_uInt16 nId ) const; + SAL_DLLPRIVATE void SetLanguage( const LanguageType eLang, const sal_uInt16 nId ); + + SAL_DLLPRIVATE SvxNumType GetPageNumType() const override; + SAL_DLLPRIVATE void SetPageNumType(SvxNumType eType) { mePageNumType = eType; } + OUString CreatePageNumValue(sal_uInt16 nNum) const; + + SAL_DLLPRIVATE DocumentType GetDocumentType() const { return meDocType; } + + SAL_DLLPRIVATE void SetAllocDocSh(bool bAlloc); + + SAL_DLLPRIVATE void CreatingDataObj( SdTransferable* pTransferable ) { mpCreatingTransferable = pTransferable; } + SAL_DLLPRIVATE virtual bool IsCreatingDataObj() const override { return mpCreatingTransferable != nullptr; } + + /** if the document does not contain at least one handout, one slide and one notes page with + at least one master each this methods creates them. + If a reference document is given, the sizes and border settings of that document are used + for newly created slides. + */ + void CreateFirstPages( SdDrawDocument const * pRefDocument = nullptr ); + bool CreateMissingNotesAndHandoutPages(); + + SAL_DLLPRIVATE void MovePage(sal_uInt16 nPgNum, sal_uInt16 nNewPos) override; + SAL_DLLPRIVATE void InsertPage(SdrPage* pPage, sal_uInt16 nPos=0xFFFF) override; + SAL_DLLPRIVATE void DeletePage(sal_uInt16 nPgNum) override; + SAL_DLLPRIVATE rtl::Reference RemovePage(sal_uInt16 nPgNum) override; + + SAL_DLLPRIVATE virtual void InsertMasterPage(SdrPage* pPage, sal_uInt16 nPos=0xFFFF) override; + SAL_DLLPRIVATE virtual rtl::Reference RemoveMasterPage(sal_uInt16 nPgNum) override; + + SAL_DLLPRIVATE void RemoveUnnecessaryMasterPages( SdPage* pMaster=nullptr, bool bOnlyDuplicatePages=false, bool bUndo=true ); + void SetMasterPage(sal_uInt16 nSdPageNum, std::u16string_view rLayoutName, + SdDrawDocument* pSourceDoc, bool bMaster, bool bCheckMasters); + + SdDrawDocument* OpenBookmarkDoc(const OUString& rBookmarkFile); + SAL_DLLPRIVATE SdDrawDocument* OpenBookmarkDoc(SfxMedium* pMedium); + + SAL_DLLPRIVATE void InsertBookmark(const std::vector &rBookmarkList, + std::vector &rExchangeList, bool bLink, + sal_uInt16 nPgPos, + ::sd::DrawDocShell* pBookmarkDocSh, + Point const * pObjPos); + + SAL_DLLPRIVATE bool IsStartWithPresentation() const { return mbStartWithPresentation;} + SAL_DLLPRIVATE void SetStartWithPresentation( bool bStartWithPresentation ); + + SAL_DLLPRIVATE bool IsExitAfterPresenting() const { return mbExitAfterPresenting;} + SAL_DLLPRIVATE void SetExitAfterPresenting( bool bExitAfterPresenting ); + + /// load xml-based impress layout definitions into document + SAL_DLLPRIVATE void InitLayoutVector(); + /// return reference to vector of Impress layout definitions + SAL_DLLPRIVATE const std::vector >& GetLayoutVector() const + { return maLayoutInfo; } + + /// load xml-based impress master presentation object definitions into document + SAL_DLLPRIVATE void InitObjectVector(); + /// return reference to vector of master presentation object definitions + SAL_DLLPRIVATE const std::vector >& GetObjectVector() const { return maPresObjectInfo; } + /** Insert pages into this document + + This method inserts whole pages into this document, either + selected ones (specified via pBookmarkList/pExchangeList), or + all from the source document. + + @attention Beware! This method in its current state does not + handle all combinations of their input parameters + correctly. For example, for pBookmarkList=NULL, bReplace=true + is ignored (no replace happens). + + @param pBookmarkList + A list of strings, denoting the names of the pages to be copied + + @param pExchangeList + A list of strings, denoting the names of the pages to be renamed + + @param bLink + Whether the inserted pages should be linked to the bookmark document + + @param bReplace + Whether the pages should not be inserted, but replace the pages in + the destination document + + @param nPgPos + Insertion point/start of replacement + + @param bNoDialogs + Whether query dialogs are allowed (e.g. for page scaling) + + @param pBookmarkDocSh + DocShell of the source document (used e.g. to extract the filename + for linked pages) + + @param bCopy + Whether the source document should be treated as immutable (i.e. + inserted pages are not removed from it, but cloned) + + @param bMergeMasterPages + Whether the source document's master pages should be copied, too. + + @param bPreservePageNames + Whether the replace operation should take the name from the new + page, or preserve the old name + */ + + SAL_DLLPRIVATE bool InsertBookmarkAsPage(const std::vector &rBookmarkList, + std::vector *pExchangeList, + bool bLink, bool bReplace, sal_uInt16 nPgPos, + bool bNoDialogs, ::sd::DrawDocShell* pBookmarkDocSh, + bool bCopy, bool bMergeMasterPages, + bool bPreservePageNames); + + SAL_DLLPRIVATE bool InsertBookmarkAsObject(const std::vector &rBookmarkList, + const std::vector &rExchangeList, + ::sd::DrawDocShell* pBookmarkDocSh, + Point const * pObjPos, bool bCalcObjCount); + + void CloseBookmarkDoc(); + + SAL_DLLPRIVATE SdrObject* GetObj(std::u16string_view rObjName) const; + + /** Return the first page that has the given name. Regular pages and + notes pages are searched first. When not found then the master + pages are searched. + @param rPgName + Name of the page to return. + @param rbIsMasterPage + Is set by the method to indicate whether the returned index + belongs to a master page () or a regular or notes page + (). The given value is ignored. + @return + Returns the index of the page with the given name or + SDRPAGE_NOTFOUND (=0xffff) when such a page does not exist. + */ + SAL_DLLPRIVATE sal_uInt16 GetPageByName(std::u16string_view rPgName, bool& rbIsMasterPage ) const; + /** checks, if the given name is a *unique* name for an *existing* slide + + @param rPageName the name of an existing slide + + @return true, if the name is unique and the slide exists + */ + bool IsPageNameUnique( std::u16string_view rPageName ) const; + SdPage*GetSdPage(sal_uInt16 nPgNum, PageKind ePgKind) const; + sal_uInt16 GetSdPageCount(PageKind ePgKind) const; + + SAL_DLLPRIVATE void SetSelected(SdPage* pPage, bool bSelect); + SAL_DLLPRIVATE void UnselectAllPages(); + SAL_DLLPRIVATE bool MovePages(sal_uInt16 nTargetPage); + + SdPage*GetMasterSdPage(sal_uInt16 nPgNum, PageKind ePgKind); + sal_uInt16 GetMasterSdPageCount(PageKind ePgKind) const; + + sal_uInt16 GetActiveSdPageCount() const; + + SAL_DLLPRIVATE sal_uInt16 GetMasterPageUserCount(SdrPage const * pMaster) const; + + SAL_DLLPRIVATE const sd::PresentationSettings& getPresentationSettings() const { return maPresentationSettings; } + SAL_DLLPRIVATE sd::PresentationSettings& getPresentationSettings() { return maPresentationSettings; } + + SAL_DLLPRIVATE const css::uno::Reference< css::presentation::XPresentation2 >& getPresentation() const; + + SAL_DLLPRIVATE void SetSummationOfParagraphs( bool bOn = true ) { mbSummationOfParagraphs = bOn; } + SAL_DLLPRIVATE bool IsSummationOfParagraphs() const { return mbSummationOfParagraphs; } + + /** Set the mode that controls whether (and later how) the formatting of the document + depends on the current printer metrics. + @param nMode + Use ENABLED + to make formatting printer-independent and DISABLED + to make formatting depend on the current printer metrics. + */ + SAL_DLLPRIVATE void SetPrinterIndependentLayout (sal_Int32 nMode); + + /** Get the flag that controls whether the formatting of the document + depends on the current printer metrics. + @return + Use ENABLED + when formatting is printer-independent and DISABLED + when formatting depends on the current printer metrics. + */ + SAL_DLLPRIVATE sal_Int32 GetPrinterIndependentLayout() const { return mnPrinterIndependentLayout;} + + SAL_DLLPRIVATE void SetOnlineSpell( bool bIn ); + SAL_DLLPRIVATE bool GetOnlineSpell() const { return mbOnlineSpell; } + SAL_DLLPRIVATE void StopOnlineSpelling(); + SAL_DLLPRIVATE void StartOnlineSpelling(bool bForceSpelling=true); + + SAL_DLLPRIVATE void ImpOnlineSpellCallback(SpellCallbackInfo const * pInfo, SdrObject* pObj, SdrOutliner const * pOutl); + + SAL_DLLPRIVATE void InsertObject(SdrObject* pObj); + SAL_DLLPRIVATE void RemoveObject(SdrObject* pObj); + + SAL_DLLPRIVATE sal_uLong GetLinkCount() const; + + SAL_DLLPRIVATE std::vector>& GetFrameViewList() { return maFrameViewList; } + SdCustomShowList* GetCustomShowList(bool bCreate = false); + + SAL_DLLPRIVATE void NbcSetChanged(bool bFlag); + + SAL_DLLPRIVATE void SetTextDefaults() const; + + SAL_DLLPRIVATE void CreateLayoutTemplates(); + SAL_DLLPRIVATE void RenameLayoutTemplate(const OUString& rOldLayoutName, const OUString& rNewName); + + SAL_DLLPRIVATE void CreateDefaultCellStyles(); + + void StopWorkStartupDelay(); + + SAL_DLLPRIVATE void NewOrLoadCompleted(DocCreationMode eMode); + SAL_DLLPRIVATE void NewOrLoadCompleted( SdPage* pPage, SdStyleSheetPool* pSPool ); + SAL_DLLPRIVATE bool IsNewOrLoadCompleted() const {return mbNewOrLoadCompleted; } + + SAL_DLLPRIVATE ::sd::FrameView* GetFrameView(sal_uLong nPos) { + return nPos < maFrameViewList.size() ? maFrameViewList[nPos].get() : nullptr; } + + /** deprecated*/ + SAL_DLLPRIVATE static SdAnimationInfo* GetAnimationInfo(SdrObject* pObject); + + static SdAnimationInfo* GetShapeUserData(SdrObject& rObject, bool bCreate = false ); + + SAL_DLLPRIVATE CharClass* GetCharClass() const { return mpCharClass.get(); } + + SAL_DLLPRIVATE void UpdateAllLinks(); + + SAL_DLLPRIVATE void CheckMasterPages(); + + SAL_DLLPRIVATE void Merge(SdrModel& rSourceModel, + sal_uInt16 nFirstPageNum, sal_uInt16 nLastPageNum, + sal_uInt16 nDestPos, + bool bMergeMasterPages, bool bAllMasterPages, + bool bUndo = true, bool bTreadSourceAsConst = false) override; + + css::text::WritingMode GetDefaultWritingMode() const; + SAL_DLLPRIVATE void SetDefaultWritingMode( css::text::WritingMode eMode ); + + /** replacespOldPage from all custom shows with pNewPage or removes pOldPage from + all custom shows if pNewPage is 0. + */ + SAL_DLLPRIVATE void ReplacePageInCustomShows( const SdPage* pOldPage, const SdPage* pNewPage ); + +public: + + /// static to prevent recursions while resolving links + SAL_DLLPRIVATE static SdDrawDocument* s_pDocLockedInsertingLinks; + + /** Create and insert a set of two new pages: a standard (draw) page and + the associated notes page. The new pages are inserted directly + after the specified page set. + @param pCurrentPage + This page is used to retrieve the layout for the page to + create. + @param ePageKind + This specifies whether pCurrentPage is a + standard (draw) page or a notes page. + @param sStandardPageName + Name of the standard page. An empty string leads to using an + automatically created name. + @param sNotesPageName + Name of the standard page. An empty string leads to using an + automatically created name. + @param eStandardLayout + Layout to use for the new standard page. Note that this layout + is not used when the given pCurrentPage is + not a standard page. In this case the layout is taken from the + standard page associated with pCurrentPage. + @param eNotesLayout + Layout to use for the new notes page. Note that this layout + is not used when the given pCurrentPage is + not a notes page. In this case the layout is taken from the + notes page associated with pCurrentPage. + @param bIsPageBack + This flag indicates whether to show the background shape. + @param bIsPageObj + This flag indicates whether to show the shapes on the master page. + @param nInsertPosition + Position where to insert the standard page. When -1 then the + new page set is inserted after the current page. + + @return + Returns an index of the inserted pages that can be used with the + GetSdPage() method. + */ + SAL_DLLPRIVATE sal_uInt16 CreatePage ( + SdPage* pCurrentPage, + PageKind ePageKind, + const OUString& sStandardPageName, + const OUString& sNotesPageName, + AutoLayout eStandardLayout, + AutoLayout eNotesLayout, + bool bIsPageBack, + bool bIsPageObj, + const sal_Int32 nInsertPosition); + + /** This method acts as a simplified front end for the more complex + DuplicatePage() method. + @param nPageNum + The page number as passed to the GetSdPage() + method for which the standard page and the notes page are to be + copied. + @return + Returns an index of the inserted pages that can be used with the + GetSdPage() method. + */ + SAL_DLLPRIVATE sal_uInt16 DuplicatePage (sal_uInt16 nPageNum); + + /** Create and insert a set of two new pages that are copies of the + given pCurrentPage and its associated notes + resp. standard page. The copies are inserted directly after the + specified page set. + @param pCurrentPage + This page and its associated notes/standard page is copied. + @param ePageKind + This specifies whether pCurrentPage is a + standard (draw) page or a notes page. + @param sStandardPageName + Name of the standard page. An empty string leads to using an + automatically created name. + @param sNotesPageName + Name of the standard page. An empty string leads to using an + automatically created name. + @param bIsPageBack + This flag indicates whether to show the background shape. + @param bIsPageObj + This flag indicates whether to show the shapes on the master page. + @param nInsertPosition + Position where to insert the standard page. When -1 then the + new page set is inserted after the current page. + + @return + Returns an index of the inserted pages that can be used with the + GetSdPage() method. + */ + SAL_DLLPRIVATE sal_uInt16 DuplicatePage ( + SdPage* pCurrentPage, + PageKind ePageKind, + const OUString& sStandardPageName, + const OUString& sNotesPageName, + bool bIsPageBack, + bool bIsPageObj, + const sal_Int32 nInsertPosition); + + /** return the document fonts for latin, cjk and ctl according to the current + languages set at this document */ + SAL_DLLPRIVATE void getDefaultFonts( vcl::Font& rLatinFont, vcl::Font& rCJKFont, vcl::Font& rCTLFont ); + + sd::UndoManager* GetUndoManager() const; + + /** converts the given western font height to a corresponding ctl font height, depending on the system language */ + SAL_DLLPRIVATE static sal_uInt32 convertFontHeightToCTL( sal_uInt32 nWesternFontHeight ); + + /** Get the style sheet pool if it was a SdStyleSheetPool. + */ + SdStyleSheetPool* GetSdStyleSheetPool() const; + + SAL_DLLPRIVATE void UpdatePageRelativeURLs( + const OUString& rOldName, std::u16string_view rNewName); + + SAL_DLLPRIVATE static void SetCalcFieldValueHdl( ::Outliner* pOutliner); + + SAL_DLLPRIVATE sal_uInt16 GetAnnotationAuthorIndex( const OUString& rAuthor ); + + SAL_DLLPRIVATE bool IsEmbedFonts() const { return mbEmbedFonts; } + SAL_DLLPRIVATE bool IsEmbedUsedFontsOnly() const { return mbEmbedUsedFontsOnly; } + SAL_DLLPRIVATE bool IsEmbedFontScriptLatin() const { return mbEmbedFontScriptLatin; } + SAL_DLLPRIVATE bool IsEmbedFontScriptAsian() const { return mbEmbedFontScriptAsian; } + SAL_DLLPRIVATE bool IsEmbedFontScriptComplex() const { return mbEmbedFontScriptComplex; } + + SAL_DLLPRIVATE void SetEmbedFonts(bool bUse) { mbEmbedFonts = bUse; } + SAL_DLLPRIVATE void SetEmbedUsedFontsOnly(bool bUse) { mbEmbedUsedFontsOnly = bUse; } + SAL_DLLPRIVATE void SetEmbedFontScriptLatin(bool bUse) { mbEmbedFontScriptLatin = bUse; } + SAL_DLLPRIVATE void SetEmbedFontScriptAsian(bool bUse) { mbEmbedFontScriptAsian = bUse; } + SAL_DLLPRIVATE void SetEmbedFontScriptComplex(bool bUse) { mbEmbedFontScriptComplex = bUse; } + + sal_Int32 getImagePreferredDPI() const override { return mnImagePreferredDPI; } + void setImagePreferredDPI(sal_Int32 nValue) { mnImagePreferredDPI = nValue; } + + void dumpAsXml(xmlTextWriterPtr pWriter) const override; + +private: + /** This member stores the printer independent layout mode. Please + refer to SetPrinterIndependentLayout() for its + values. + */ + sal_Int32 mnPrinterIndependentLayout; + + /** Insert a given set of standard and notes page after the given pCurrentPage. + @param pCurrentPage + This page and its associated notes/standard page is copied. + @param ePageKind + This specifies whether pCurrentPage is a + standard (draw) page or a notes page. + @param sStandardPageName + Name of the standard page. An empty string leads to using an + automatically created name. + @param sNotesPageName + Name of the standard page. An empty string leads to using an + automatically created name. + @param bIsPageBack + This flag indicates whether to show the background shape. + @param bIsPageObj + This flag indicates whether to show the shapes on the master page. + @param pStandardPage + The standard page to insert. + @param pNotesPage + The notes page to insert. + @param nInsertPosition + Position where to insert the standard page. When -1 then the + new page set is inserted after the current page. + + @return + Returns an index of the inserted pages that can be used with the + GetSdPage() method. + */ + SAL_DLLPRIVATE sal_uInt16 InsertPageSet ( + SdPage* pCurrentPage, + PageKind ePageKind, + const OUString& sStandardPageName, + const OUString& sNotesPageName, + bool bIsPageBack, + bool bIsPageObj, + SdPage* pStandardPage, + SdPage* pNotesPage, + sal_Int32 nInsertPosition); + + /** Set up a newly created page and insert it into the list of pages. + @param pPreviousPage + A page to take the size and border geometry from. + @param pPage + This is the page to set up and insert. + @param sPageName + The name of the new page. + @param nInsertionPoint + Index of the page before which the new page will be inserted. + @param bIsPageBack + This flag indicates whether to show the background shape. + @param bIsPageObj + This flag indicates whether to show the shapes on the master + page. + */ + SAL_DLLPRIVATE void SetupNewPage ( + SdPage const * pPreviousPage, + SdPage* pPage, + const OUString& sPageName, + sal_uInt16 nInsertionPoint, + bool bIsPageBack, + bool bIsPageObj); + + SAL_DLLPRIVATE virtual void PageListChanged() override; + SAL_DLLPRIVATE virtual void MasterPageListChanged() override; +}; + +namespace sd +{ + +/**an instance of this guard disables modification of a document + during its lifetime*/ +class ModifyGuard +{ +public: + ModifyGuard( SdDrawDocument* pDoc ); + ~ModifyGuard(); + +private: + void init(); + + DrawDocShell* mpDocShell; + SdDrawDocument* mpDoc; + bool mbIsEnableSetModified; + bool mbIsDocumentChanged; +}; + +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/errhdl.hrc b/sd/inc/errhdl.hrc new file mode 100644 index 000000000..ea7d4e712 --- /dev/null +++ b/sd/inc/errhdl.hrc @@ -0,0 +1,39 @@ +/* -*- 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 . + */ + +#pragma once + +#define NC_(Context, String) TranslateId(Context, reinterpret_cast(u8##String)) + +#include +#include +#include "sderror.hxx" + +const ErrMsgCode RID_SD_ERRHDL[] = +{ + { NC_("RID_SD_ERRHDL", "File format error found at $(ARG1)(row,col)."), + ERR_FORMAT_ROWCOL }, + { NC_("RID_SD_ERRHDL", "Format error discovered in the file in sub-document $(ARG1) at position $(ARG2)(row,col)."), + ERR_FORMAT_FILE_ROWCOL }, + { NC_("RID_SD_ERRHDL", "Format error discovered in the file in sub-document $(ARG1) at position $(ARG2)(row,col)."), + WARN_FORMAT_FILE_ROWCOL }, + { {}, ERRCODE_NONE } +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/fadedef.h b/sd/inc/fadedef.h new file mode 100644 index 000000000..84100f944 --- /dev/null +++ b/sd/inc/fadedef.h @@ -0,0 +1,28 @@ +/* -*- 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 . + */ + +#pragma once + +// has to be adjusted! +#define FADE_EFFECT_COUNT 57 + +// has to be adjusted! +#define FADE_SPEED_COUNT 3 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/family.hrc b/sd/inc/family.hrc new file mode 100644 index 000000000..ad2617a30 --- /dev/null +++ b/sd/inc/family.hrc @@ -0,0 +1,43 @@ +/* -*- 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 . + */ + +#pragma once + +#include +#include + +#define NC_(Context, String) TranslateId(Context, reinterpret_cast(u8##String)) + +const std::pair RID_GRAPHICSTYLEFAMILY[] = +{ + { NC_("RID_GRAPHICSTYLEFAMILY", "All Styles") , SfxStyleSearchBits::AllVisible }, + { NC_("RID_GRAPHICSTYLEFAMILY", "Hidden Styles") , SfxStyleSearchBits::Hidden }, + { NC_("RID_GRAPHICSTYLEFAMILY", "Applied Styles") , SfxStyleSearchBits::Used }, + { NC_("RID_GRAPHICSTYLEFAMILY", "Custom Styles") , SfxStyleSearchBits::UserDefined }, + { {}, SfxStyleSearchBits::Auto } +}; + +const std::pair RID_PRESENTATIONSTYLEFAMILY[] = +{ + { NC_("RID_PRESENTATIONSTYLEFAMILY", "All Styles") , SfxStyleSearchBits::AllVisible }, + { NC_("RID_PRESENTATIONSTYLEFAMILY", "Hidden Styles") , SfxStyleSearchBits::Hidden }, + { {}, SfxStyleSearchBits::Auto } +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/glob.hxx b/sd/inc/glob.hxx new file mode 100644 index 000000000..6ecfc3fd3 --- /dev/null +++ b/sd/inc/glob.hxx @@ -0,0 +1,55 @@ +/* -*- 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 . + */ + +#pragma once + +#include + +#define SD_IF_SDAPP SFX_INTERFACE_SD_START + SfxInterfaceId(0) +#define SD_IF_SDDRAWDOCSHELL SFX_INTERFACE_SD_START + SfxInterfaceId(1) +#define SD_IF_SDDRAWVIEWSHELL SFX_INTERFACE_SD_START + SfxInterfaceId(3) +#define SD_IF_SDOUTLINEVIEWSHELL SFX_INTERFACE_SD_START + SfxInterfaceId(5) +#define SD_IF_SDDRAWTEXTOBJECTBAR SFX_INTERFACE_SD_START + SfxInterfaceId(7) +#define SD_IF_SDDRAWBEZIEROBJECTBAR SFX_INTERFACE_SD_START + SfxInterfaceId(8) +#define SD_IF_SDGRAPHICDOCSHELL SFX_INTERFACE_SD_START + SfxInterfaceId(10) +#define SD_IF_SDGRAPHICVIEWSHELL SFX_INTERFACE_SD_START + SfxInterfaceId(11) +#define SD_IF_SDDRAWGRAFOBJECTBAR SFX_INTERFACE_SD_START + SfxInterfaceId(13) +#define SD_IF_SDPRESVIEWSHELL SFX_INTERFACE_SD_START + SfxInterfaceId(14) +#define SD_IF_SDVIEWSHELLBASE SFX_INTERFACE_SD_START + SfxInterfaceId(16) +#define SD_IF_SDSLIDESORTERVIEWSHELL SFX_INTERFACE_SD_START + SfxInterfaceId(19) +#define SD_IF_SDDRAWMEDIAOBJECTBAR SFX_INTERFACE_SD_START + SfxInterfaceId(23) +#define SD_IF_SDLEFTIMPRESSPANESHELL SFX_INTERFACE_SD_START + SfxInterfaceId(24) +#define SD_IF_SDLEFTDRAWPANESHELL SFX_INTERFACE_SD_START + SfxInterfaceId(25) +#define SD_IF_SDDRAWTABLEOBJECTBAR SFX_INTERFACE_SD_START + SfxInterfaceId(27) +#define SD_IF_SDTOOLPANELPANESHELL SFX_INTERFACE_SD_START + SfxInterfaceId(29) +#define SD_IF_SDTOOLPANELSHELL SFX_INTERFACE_SD_START + SfxInterfaceId(30) + + +// Object-Ids for StarDraw UserData +#define SD_ANIMATIONINFO_ID 1 +// SVX_IMAPINFO_ID = 2 + +// Separator between layout name and template name of presentation templates +inline constexpr OUStringLiteral SD_LT_SEPARATOR = u"~LT~"; + +// option-stream identifier +#define SD_OPTION_MORPHING u"Morph" +#define SD_OPTION_VECTORIZE u"Vectorize" + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/helper/simplereferencecomponent.hxx b/sd/inc/helper/simplereferencecomponent.hxx new file mode 100644 index 000000000..89e43639e --- /dev/null +++ b/sd/inc/helper/simplereferencecomponent.hxx @@ -0,0 +1,63 @@ +/* -*- 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 . + */ + +#pragma once + +#include + +namespace sd +{ +/** A simple base implementation for reference-counted components. + acts like sal::SimpleReferenceObject but calls the virtual disposing() + methods before the ref count switches from 1 to zero. + */ +class SimpleReferenceComponent +{ +public: + SimpleReferenceComponent(); + + /** @ATTENTION + The results are undefined if, for any individual instance of + SimpleReferenceComponent, the total number of calls to acquire() exceeds + the total number of calls to release() by a platform dependent amount + (which, hopefully, is quite large). + */ + void acquire(); + void release(); + + void Dispose(); + + bool isDisposed() const { return mbDisposed; } + +protected: + virtual void disposing(); + + virtual ~SimpleReferenceComponent(); + +private: + oslInterlockedCount m_nCount; + + SimpleReferenceComponent(SimpleReferenceComponent const&) = delete; + void operator=(SimpleReferenceComponent const&) = delete; + + bool mbDisposed; +}; +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/helpids.h b/sd/inc/helpids.h new file mode 100644 index 000000000..18e898ee7 --- /dev/null +++ b/sd/inc/helpids.h @@ -0,0 +1,62 @@ +/* -*- 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 . + */ + +#pragma once + +#include + +inline constexpr OStringLiteral HID_SDDRAWVIEWSHELL = "SD_HID_SDDRAWVIEWSHELL"; +inline constexpr OStringLiteral HID_SDGRAPHICVIEWSHELL = "SD_HID_SDGRAPHICVIEWSHELL"; +inline constexpr OStringLiteral HID_SDOUTLINEVIEWSHELL = "SD_HID_SDOUTLINEVIEWSHELL"; + +inline constexpr OStringLiteral HID_SD_WIN_PRESENTATION = "SD_HID_SD_WIN_PRESENTATION"; + +#define HID_SD_HTMLEXPORT_PAGE1 "SD_HID_SD_HTMLEXPORT_PAGE1" +#define HID_SD_HTMLEXPORT_PAGE2 "SD_HID_SD_HTMLEXPORT_PAGE2" +#define HID_SD_HTMLEXPORT_PAGE3 "SD_HID_SD_HTMLEXPORT_PAGE3" +#define HID_SD_HTMLEXPORT_PAGE4 "SD_HID_SD_HTMLEXPORT_PAGE4" +#define HID_SD_HTMLEXPORT_PAGE5 "SD_HID_SD_HTMLEXPORT_PAGE5" +#define HID_SD_HTMLEXPORT_PAGE6 "SD_HID_SD_HTMLEXPORT_PAGE6" + +inline constexpr OStringLiteral HID_SD_TABBAR_PAGES = "SD_HID_SD_TABBAR_PAGES"; +inline constexpr OStringLiteral HID_SD_TABBAR_LAYERS = "SD_HID_SD_TABBAR_LAYERS"; + +inline constexpr OStringLiteral HID_SD_NAMEDIALOG_OBJECT = "SD_HID_SD_NAMEDIALOG_OBJECT"; +inline constexpr OStringLiteral HID_SD_NAMEDIALOG_PAGE = "SD_HID_SD_NAMEDIALOG_PAGE"; +inline constexpr OStringLiteral HID_SD_NAMEDIALOG_LINEEND = "SD_HID_SD_NAMEDIALOG_LINEEND"; + +inline constexpr OStringLiteral HID_SD_TASK_PANE_PREVIEW_CURRENT = "SD_HID_SD_TASK_PANE_PREVIEW_CURRENT"; +inline constexpr OStringLiteral HID_SD_TASK_PANE_PREVIEW_RECENT = "SD_HID_SD_TASK_PANE_PREVIEW_RECENT"; +inline constexpr OStringLiteral HID_SD_TASK_PANE_PREVIEW_ALL = "SD_HID_SD_TASK_PANE_PREVIEW_ALL"; +inline constexpr OStringLiteral HID_SD_TASK_PANE_PREVIEW_LAYOUTS = "SD_HID_SD_TASK_PANE_PREVIEW_LAYOUTS"; + +inline constexpr OStringLiteral HID_SD_CUSTOMANIMATIONPANE_PRESETPROPERTYBOX = "SD_HID_SD_CUSTOMANIMATIONPANE_PRESETPROPERTYBOX"; +inline constexpr OStringLiteral HID_SD_CUSTOMANIMATIONPANE_COLORPROPERTYBOX = "SD_HID_SD_CUSTOMANIMATIONPANE_COLORPROPERTYBOX"; +inline constexpr OStringLiteral HID_SD_CUSTOMANIMATIONPANE_FONTPROPERTYBOX = "SD_HID_SD_CUSTOMANIMATIONPANE_FONTPROPERTYBOX"; +inline constexpr OStringLiteral HID_SD_CUSTOMANIMATIONPANE_CHARHEIGHTPROPERTYBOX = "SD_HID_SD_CUSTOMANIMATIONPANE_CHARHEIGHTPROPERTYBOX"; +inline constexpr OStringLiteral HID_SD_CUSTOMANIMATIONPANE_ROTATIONPROPERTYBOX = "SD_HID_SD_CUSTOMANIMATIONPANE_ROTATIONPROPERTYBOX"; +inline constexpr OStringLiteral HID_SD_CUSTOMANIMATIONPANE_TRANSPARENCYPROPERTYBOX = "SD_HID_SD_CUSTOMANIMATIONPANE_TRANSPARENCYPROPERTYBOX"; +inline constexpr OStringLiteral HID_SD_CUSTOMANIMATIONPANE_SCALEPROPERTYBOX = "SD_HID_SD_CUSTOMANIMATIONPANE_SCALEPROPERTYBOX"; +inline constexpr OStringLiteral HID_SD_CUSTOMANIMATIONPANE_FONTSTYLEPROPERTYBOX = "SD_HID_SD_CUSTOMANIMATIONPANE_FONTSTYLEPROPERTYBOX"; + + +inline constexpr OStringLiteral HID_SD_RULER_HORIZONTAL = "SD_HID_SD_RULER_HORIZONTAL"; +inline constexpr OStringLiteral HID_SD_RULER_VERTICAL = "SD_HID_SD_RULER_VERTICAL"; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/misc/scopelock.hxx b/sd/inc/misc/scopelock.hxx new file mode 100644 index 000000000..544bb5873 --- /dev/null +++ b/sd/inc/misc/scopelock.hxx @@ -0,0 +1,51 @@ +/* -*- 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 . + */ + +#pragma once + +#include + +namespace sd +{ + +class ScopeLock +{ + friend class ScopeLockGuard; +public: + ScopeLock() : mnLock(0) {} + bool isLocked() const { return mnLock != 0; } +private: + void lock() { mnLock++; } + void unlock() { mnLock--; } + + sal_Int32 mnLock; +}; + +class ScopeLockGuard +{ +public: + ScopeLockGuard( ScopeLock& rScopeLock ) : mrScopeLock( rScopeLock ) { mrScopeLock.lock(); } + ~ScopeLockGuard() { mrScopeLock.unlock(); } +private: + ScopeLock& mrScopeLock; +}; + +} // namespace sd + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/notifydocumentevent.hxx b/sd/inc/notifydocumentevent.hxx new file mode 100644 index 000000000..11847a7f9 --- /dev/null +++ b/sd/inc/notifydocumentevent.hxx @@ -0,0 +1,32 @@ +/* -*- 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 . + */ + +#pragma once + +#include +#include +#include + +class SdDrawDocument; + +void NotifyDocumentEvent( SdDrawDocument const & rDocument, const OUString& rEventName ); + +void NotifyDocumentEvent( SdDrawDocument const & rDocument, const OUString& rEventName, const css::uno::Reference< css::uno::XInterface >& xSource ); + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/pageformatpanel.hrc b/sd/inc/pageformatpanel.hrc new file mode 100644 index 000000000..ea3c04a9c --- /dev/null +++ b/sd/inc/pageformatpanel.hrc @@ -0,0 +1,53 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * 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/. + */ + +#pragma once + +#include + +#include + +#define NC_(Context, String) TranslateId(Context, reinterpret_cast(u8##String)) + +namespace sd +{ + +// To translators: this is a listbox labelled by "Margins:", inch units +const std::pair RID_PAGEFORMATPANEL_MARGINS_INCH[] = +{ + { NC_("RID_PAGEFORMATPANEL_MARGINS_INCH", "None"), 0 }, + { NC_("RID_PAGEFORMATPANEL_MARGINS_INCH", "Narrow"), 0 }, + { NC_("RID_PAGEFORMATPANEL_MARGINS_INCH", "Moderate"), 0 }, + // Normal (0.75") + { NC_("RID_PAGEFORMATPANEL_MARGINS_INCH", "Normal (%1)"), 75 }, + // Normal (1") + { NC_("RID_PAGEFORMATPANEL_MARGINS_INCH", "Normal (%1)"), 100 }, + // Normal (1.25") + { NC_("RID_PAGEFORMATPANEL_MARGINS_INCH", "Normal (%1)"), 125 }, + { NC_("RID_PAGEFORMATPANEL_MARGINS_INCH", "Wide"), 0 } +}; + +// To translators: this is a listbox labelled by "Margins:", cm units +const std::pair RID_PAGEFORMATPANEL_MARGINS_CM[] = +{ + { NC_("RID_PAGEFORMATPANEL_MARGINS_CM", "None"), 0 }, + { NC_("RID_PAGEFORMATPANEL_MARGINS_CM", "Narrow"), 0 }, + { NC_("RID_PAGEFORMATPANEL_MARGINS_CM", "Moderate"), 0 }, + // Normal (1.9 cm) + { NC_("RID_PAGEFORMATPANEL_MARGINS_CM", "Normal (%1)"), 190 }, + // Normal (2.54 cm) + { NC_("RID_PAGEFORMATPANEL_MARGINS_CM", "Normal (%1)"), 254 }, + // Normal (3.18 cm) + { NC_("RID_PAGEFORMATPANEL_MARGINS_CM", "Normal (%1)"), 318 }, + { NC_("RID_PAGEFORMATPANEL_MARGINS_CM", "Wide"), 0 } +}; + +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/sd/inc/pch/precompiled_sd.cxx b/sd/inc/pch/precompiled_sd.cxx new file mode 100644 index 000000000..d681ebc7e --- /dev/null +++ b/sd/inc/pch/precompiled_sd.cxx @@ -0,0 +1,12 @@ +/* -*- 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/. + */ + +#include "precompiled_sd.hxx" + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/pch/precompiled_sd.hxx b/sd/inc/pch/precompiled_sd.hxx new file mode 100644 index 000000000..f2ee62c48 --- /dev/null +++ b/sd/inc/pch/precompiled_sd.hxx @@ -0,0 +1,581 @@ +/* -*- 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 has been autogenerated by update_pch.sh. It is possible to edit it + manually (such as when an include file has been moved/renamed/removed). All such + manual changes will be rewritten by the next run of update_pch.sh (which presumably + also fixes all possible problems, so it's usually better to use it). + + Generated on 2021-04-08 13:51:32 using: + ./bin/update_pch sd sd --cutoff=4 --exclude:system --exclude:module --include:local + + If after updating build fails, use the following command to locate conflicting headers: + ./bin/update_pch_bisect ./sd/inc/pch/precompiled_sd.hxx "make sd.build" --find-conflicts +*/ + +#include +#if PCH_LEVEL >= 1 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#endif // PCH_LEVEL >= 1 +#if PCH_LEVEL >= 2 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#endif // PCH_LEVEL >= 2 +#if PCH_LEVEL >= 3 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#endif // PCH_LEVEL >= 3 +#if PCH_LEVEL >= 4 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#endif // PCH_LEVEL >= 4 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/pch/precompiled_sdui.cxx b/sd/inc/pch/precompiled_sdui.cxx new file mode 100644 index 000000000..0471b10db --- /dev/null +++ b/sd/inc/pch/precompiled_sdui.cxx @@ -0,0 +1,12 @@ +/* -*- 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/. + */ + +#include "precompiled_sdui.hxx" + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/pch/precompiled_sdui.hxx b/sd/inc/pch/precompiled_sdui.hxx new file mode 100644 index 000000000..237dd892c --- /dev/null +++ b/sd/inc/pch/precompiled_sdui.hxx @@ -0,0 +1,497 @@ +/* -*- 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 has been autogenerated by update_pch.sh. It is possible to edit it + manually (such as when an include file has been moved/renamed/removed). All such + manual changes will be rewritten by the next run of update_pch.sh (which presumably + also fixes all possible problems, so it's usually better to use it). + + Generated on 2021-09-12 11:52:07 using: + ./bin/update_pch sd sdui --cutoff=4 --exclude:system --include:module --include:local + + If after updating build fails, use the following command to locate conflicting headers: + ./bin/update_pch_bisect ./sd/inc/pch/precompiled_sdui.hxx "make sd.build" --find-conflicts +*/ + +#include +#if PCH_LEVEL >= 1 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#endif // PCH_LEVEL >= 1 +#if PCH_LEVEL >= 2 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#endif // PCH_LEVEL >= 2 +#if PCH_LEVEL >= 3 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#endif // PCH_LEVEL >= 3 +#if PCH_LEVEL >= 4 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#endif // PCH_LEVEL >= 4 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/pglink.hxx b/sd/inc/pglink.hxx new file mode 100644 index 000000000..5d4a31451 --- /dev/null +++ b/sd/inc/pglink.hxx @@ -0,0 +1,40 @@ +/* -*- 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 . + */ + +#pragma once + +#include + +class SdPage; + +class SdPageLink final : public ::sfx2::SvBaseLink +{ + SdPage* pPage; + +public: + SdPageLink(SdPage* pPg, const OUString& rFileName, const OUString& rBookmarkName); + virtual ~SdPageLink() override; + + virtual void Closed() override; + virtual ::sfx2::SvBaseLink::UpdateResult DataChanged( + const OUString& rMimeType, const css::uno::Any & rValue ) override; + void Connect() { SvBaseLink::GetRealObject(); } +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/pres.hxx b/sd/inc/pres.hxx new file mode 100644 index 000000000..ab2b44adf --- /dev/null +++ b/sd/inc/pres.hxx @@ -0,0 +1,73 @@ +/* -*- 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 . + */ +#pragma once + +enum class PresObjKind +{ + NONE = 0, + Title, + Outline, + Text, + Graphic, + Object, + Chart, + OrgChart, + Table, + Page, + Handout, + Notes, + Header, + Footer, + DateTime, + SlideNumber, + Calc, + Media, + LAST = Media +}; + +enum class PageKind +{ + Standard, + Notes, + Handout, + LAST = Handout +}; + +enum class EditMode +{ + Page, + MasterPage +}; + +enum class DocumentType +{ + Impress, + Draw +}; + +enum NavigatorDragType +{ + NAVIGATOR_DRAGTYPE_NONE, + NAVIGATOR_DRAGTYPE_URL, + NAVIGATOR_DRAGTYPE_LINK, + NAVIGATOR_DRAGTYPE_EMBEDDED +}; +#define NAVIGATOR_DRAGTYPE_COUNT 4 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/prlayout.hxx b/sd/inc/prlayout.hxx new file mode 100644 index 000000000..7cf768eae --- /dev/null +++ b/sd/inc/prlayout.hxx @@ -0,0 +1,46 @@ +/* -*- 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 . + */ + +/************************************************************************* +|* Contained once the class SdPresentationLayoutDlg (not needed anymore). +|* This file disappeared in a mysterious way from the PVCS. It is newly +|* checked in and does only contain the enumerator. +\************************************************************************/ + +#pragma once + +enum class PresentationObjects +{ + Title, + Background, + BackgroundObjects, + Outline_1, + Outline_2, + Outline_3, + Outline_4, + Outline_5, + Outline_6, + Outline_7, + Outline_8, + Outline_9, + Notes, + Subtitle +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/randomnode.hxx b/sd/inc/randomnode.hxx new file mode 100644 index 000000000..6bccc738b --- /dev/null +++ b/sd/inc/randomnode.hxx @@ -0,0 +1,35 @@ +/* -*- 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 . + */ + +#pragma once + +#include + +#include +#include + +#include "sddllapi.h" + +namespace sd +{ +SD_DLLPUBLIC css::uno::Reference +RandomAnimationNode_createInstance(sal_Int16 nPresetClass); +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/resltn.hxx b/sd/inc/resltn.hxx new file mode 100644 index 000000000..cac2602b6 --- /dev/null +++ b/sd/inc/resltn.hxx @@ -0,0 +1,35 @@ +/* -*- 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 . + */ + +#pragma once + +enum PublishingFormat +{ + FORMAT_GIF, + FORMAT_JPG, + FORMAT_PNG +}; + +enum PublishingScript +{ + SCRIPT_ASP, + SCRIPT_PERL +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/sdabstdlg.hxx b/sd/inc/sdabstdlg.hxx new file mode 100644 index 000000000..9428325cd --- /dev/null +++ b/sd/inc/sdabstdlg.hxx @@ -0,0 +1,210 @@ +/* -*- 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 . + */ +#pragma once + +#include + +#include +#include +#include +#include +#include +#include + +#include + +#include "prlayout.hxx" +#include "pres.hxx" +#include "sddllapi.h" + +namespace sd { + class View; + class ViewShell; + class DrawDocShell; + class DrawView; +} + +class SfxObjectShell; +class SvxFieldData; +class GDIMetaFile; +class SdDrawDocument; +class SfxMedium; +class SdrObject; +class SfxStyleSheetBasePool; +class SfxStyleSheetBase; +class SdrModel; +class SdrView; +class Bitmap; +class SdPage; +class SdCustomShowList; +class SfxAbstractDialog; +class SfxAbstractTabDialog; + +class AbstractCopyDlg : public VclAbstractDialog +{ +protected: + virtual ~AbstractCopyDlg() override = default; +public: + virtual void GetAttr( SfxItemSet& rOutAttrs ) = 0; +}; + +class AbstractSdCustomShowDlg : public VclAbstractDialog +{ +protected: + virtual ~AbstractSdCustomShowDlg() override = default; +public: + virtual bool IsCustomShow() const = 0; +}; + +class AbstractSdModifyFieldDlg : public VclAbstractDialog +{ +protected: + virtual ~AbstractSdModifyFieldDlg() override = default; +public: + virtual SvxFieldData* GetField() = 0; + virtual SfxItemSet GetItemSet() = 0; +}; + +class AbstractSdSnapLineDlg : public VclAbstractDialog +{ +protected: + virtual ~AbstractSdSnapLineDlg() override = default; +public: + virtual void GetAttr(SfxItemSet& rOutAttrs) = 0; + virtual void HideRadioGroup() = 0; + virtual void HideDeleteBtn() = 0; + virtual void SetInputFields(bool bEnableX, bool bEnableY) = 0; + virtual void SetText( const OUString& rStr ) = 0; +}; + +class AbstractSdInsertLayerDlg : public VclAbstractDialog +{ +protected: + virtual ~AbstractSdInsertLayerDlg() override = default; +public: + virtual void GetAttr( SfxItemSet& rOutAttrs ) = 0; + virtual void SetHelpId( const OString& rHelpId ) = 0; +}; + +class AbstractSdInsertPagesObjsDlg : public VclAbstractDialog +{ +protected: + virtual ~AbstractSdInsertPagesObjsDlg() override = default; +public: + virtual std::vector GetList ( const sal_uInt16 nType ) = 0; + virtual bool IsLink() = 0; + virtual bool IsRemoveUnnecessaryMasterPages() const = 0; +}; + +class AbstractMorphDlg : public VclAbstractDialog +{ +protected: + virtual ~AbstractMorphDlg() override = default; +public: + virtual void SaveSettings() const = 0; + virtual sal_uInt16 GetFadeSteps() const = 0; + virtual bool IsAttributeFade() const = 0; + virtual bool IsOrientationFade() const = 0; +}; + +class AbstractSdStartPresDlg : public VclAbstractDialog +{ +protected: + virtual ~AbstractSdStartPresDlg() override = default; +public: + virtual void GetAttr( SfxItemSet& rOutAttrs ) = 0; +}; + +class AbstractSdPresLayoutDlg : public VclAbstractDialog +{ +protected: + virtual ~AbstractSdPresLayoutDlg() override = default; +public: + virtual void GetAttr(SfxItemSet& rOutAttrs) = 0; +}; + +class AbstractSdVectorizeDlg : public VclAbstractDialog +{ +protected: + virtual ~AbstractSdVectorizeDlg() override = default; +public: + virtual const GDIMetaFile& GetGDIMetaFile() const = 0; +}; + +class AbstractSdPublishingDlg : public VclAbstractDialog +{ +protected: + virtual ~AbstractSdPublishingDlg() override = default; +public: + virtual void GetParameterSequence( css::uno::Sequence< css::beans::PropertyValue >& rParams ) = 0; +}; + +class AbstractHeaderFooterDialog : public VclAbstractDialog +{ +protected: + virtual ~AbstractHeaderFooterDialog() override = default; +}; + +class SdAbstractDialogFactory +{ +public: + SD_DLLPUBLIC static SdAbstractDialogFactory* Create(); + + virtual VclPtr CreateSvxBulletAndPositionDlg(weld::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView) = 0; + virtual VclPtr CreateBreakDlg(weld::Window* pWindow, ::sd::DrawView* pDrView, ::sd::DrawDocShell* pShell, sal_uLong nSumActionCount, sal_uLong nObjCount ) = 0; + virtual VclPtr CreateCopyDlg(weld::Window* pWindow, const SfxItemSet& rInAttrs, ::sd::View* pView ) = 0; + virtual VclPtr CreateSdCustomShowDlg(weld::Window* pWindow, SdDrawDocument& rDrawDoc) = 0; + virtual VclPtr CreateSdTabCharDialog(weld::Window* pWindow, const SfxItemSet* pAttr, SfxObjectShell* pDocShell) = 0; + virtual VclPtr CreateSdTabPageDialog(weld::Window* pWindow, const SfxItemSet* pAttr, SfxObjectShell* pDocShell, bool bAreaPage, bool bIsImpressDoc, bool bIsImpressMaster) = 0; + virtual VclPtr CreateSdModifyFieldDlg(weld::Window* pWindow, const SvxFieldData* pInField, const SfxItemSet& rSet) = 0; + virtual VclPtr CreateSdSnapLineDlg(weld::Window* pParent, const SfxItemSet& rInAttrs, ::sd::View* pView) = 0; + virtual VclPtr CreateSdInsertLayerDlg(weld::Window* pParent, const SfxItemSet& rInAttrs, bool bDeletable, const OUString& rStr) = 0; + virtual VclPtr CreateSdInsertPagesObjsDlg(weld::Window* pParent, const SdDrawDocument* pDoc, SfxMedium* pSfxMedium, const OUString& rFileName) = 0; + virtual VclPtr CreateMorphDlg(weld::Window* pParent, const SdrObject* pObj1, const SdrObject* pObj2) = 0; + virtual VclPtr CreateSdOutlineBulletTabDlg(weld::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView) = 0; + virtual VclPtr CreateSdParagraphTabDlg(weld::Window* pWindow, const SfxItemSet* pAttr) = 0; + virtual VclPtr CreateSdStartPresentationDlg(weld::Window* pWindow, const SfxItemSet& rInAttrs, + const std::vector &rPageNames, SdCustomShowList* pCSList ) = 0; + virtual VclPtr CreateRemoteDialog(weld::Window* pWindow) = 0; + virtual VclPtr CreateSdPresLayoutTemplateDlg(SfxObjectShell* pDocSh, weld::Window* pParent, bool bBackgroundDlg, SfxStyleSheetBase& rStyleBase, PresentationObjects ePO, SfxStyleSheetBasePool* pSSPool) = 0; + virtual VclPtr CreateSdPresLayoutDlg(weld::Window* pParent, ::sd::DrawDocShell* pDocShell, const SfxItemSet& rInAttrs) = 0; + virtual VclPtr CreateSdTabTemplateDlg(weld::Window* pParent, const SfxObjectShell* pDocShell, SfxStyleSheetBase& rStyleBase, SdrModel* pModel, SdrView* pView) = 0; + virtual VclPtr CreatSdActionDialog(weld::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView) = 0; + virtual VclPtr CreateSdVectorizeDlg(weld::Window* pParent, const Bitmap& rBmp, ::sd::DrawDocShell* pDocShell) = 0; + virtual VclPtr CreateSdPublishingDlg(weld::Window* pWindow, DocumentType eDocType) = 0; + + virtual VclPtr CreateMasterLayoutDialog(weld::Window* pParent, SdDrawDocument* pDoc, SdPage*) = 0; + + virtual VclPtr CreateHeaderFooterDialog(sd::ViewShell* pViewShell, + weld::Window* pParent, + SdDrawDocument* pDoc, + SdPage* pCurrentPage) = 0; + + virtual CreateTabPage GetSdOptionsContentsTabPageCreatorFunc() = 0; + virtual CreateTabPage GetSdPrintOptionsTabPageCreatorFunc() = 0; + virtual CreateTabPage GetSdOptionsMiscTabPageCreatorFunc() = 0; + virtual CreateTabPage GetSdOptionsSnapTabPageCreatorFunc() = 0; + + virtual VclPtr CreateSdPhotoAlbumDialog(weld::Window* pWindow, SdDrawDocument* pDoc) = 0; + +protected: + ~SdAbstractDialogFactory() {} +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/sdattr.hrc b/sd/inc/sdattr.hrc new file mode 100644 index 000000000..17f8d8761 --- /dev/null +++ b/sd/inc/sdattr.hrc @@ -0,0 +1,124 @@ +/* -*- 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 . + */ + +#pragma once + +#include + +class SdOptionsPrintItem; +class XColorItem; + +// Layer attributes +#define ATTR_LAYER_START SID_SD_START + 1234 +#define ATTR_LAYER_NAME ATTR_LAYER_START +#define ATTR_LAYER_VISIBLE ATTR_LAYER_START + 1 +#define ATTR_LAYER_PRINTABLE ATTR_LAYER_START + 2 +#define ATTR_LAYER_LOCKED ATTR_LAYER_START + 3 +#define ATTR_LAYER_THISPAGE ATTR_LAYER_START + 4 +#define ATTR_LAYER_TITLE ATTR_LAYER_START + 5 +#define ATTR_LAYER_DESC ATTR_LAYER_START + 6 +#define ATTR_LAYER_END ATTR_LAYER_DESC + +// presentation attributes +#define ATTR_PRESENT_START ATTR_LAYER_END + 1 +#define ATTR_PRESENT_ALL ATTR_PRESENT_START +#define ATTR_PRESENT_CUSTOMSHOW ATTR_PRESENT_START + 1 +#define ATTR_PRESENT_DIANAME ATTR_PRESENT_START + 2 +#define ATTR_PRESENT_ENDLESS ATTR_PRESENT_START + 3 +#define ATTR_PRESENT_MANUEL ATTR_PRESENT_START + 4 +#define ATTR_PRESENT_MOUSE ATTR_PRESENT_START + 5 +#define ATTR_PRESENT_PEN ATTR_PRESENT_START + 6 +#define ATTR_PRESENT_NAVIGATOR ATTR_PRESENT_START + 7 +#define ATTR_PRESENT_CHANGE_PAGE ATTR_PRESENT_START + 8 +#define ATTR_PRESENT_ALWAYS_ON_TOP ATTR_PRESENT_START + 9 +#define ATTR_PRESENT_FULLSCREEN ATTR_PRESENT_START + 10 +#define ATTR_PRESENT_ANIMATION_ALLOWED ATTR_PRESENT_START + 12 +#define ATTR_PRESENT_PAUSE_TIMEOUT ATTR_PRESENT_START + 13 +#define ATTR_PRESENT_SHOW_PAUSELOGO ATTR_PRESENT_START + 14 +#define ATTR_PRESENT_DISPLAY ATTR_PRESENT_START + 15 +#define ATTR_PRESENT_END ATTR_PRESENT_DISPLAY + +// animation attributes +#define ATTR_ANIMATION_START ATTR_PRESENT_END + 1 +#define ATTR_ANIMATION_ACTIVE ATTR_ANIMATION_START +#define ATTR_ANIMATION_EFFECT ATTR_ANIMATION_START + 1 +#define ATTR_ANIMATION_SPEED ATTR_ANIMATION_START + 2 +#define ATTR_ANIMATION_INVISIBLE ATTR_ANIMATION_START + 3 +#define ATTR_ANIMATION_FADEOUT ATTR_ANIMATION_START + 4 +#define ATTR_ANIMATION_COLOR ATTR_ANIMATION_START + 5 +#define ATTR_ANIMATION_SOUNDON ATTR_ANIMATION_START + 6 +#define ATTR_ANIMATION_SOUNDFILE ATTR_ANIMATION_START + 7 +#define ATTR_ANIMATION_PLAYFULL ATTR_ANIMATION_START + 8 +#define ATTR_ANIMATION_TEXTEFFECT ATTR_ANIMATION_START + 10 +#define ATTR_ANIMATION_END ATTR_ANIMATION_TEXTEFFECT + +#define ATTR_ACTION_START ATTR_ANIMATION_END + 1 +#define ATTR_ACTION ATTR_ACTION_START +#define ATTR_ACTION_EFFECT ATTR_ACTION_START + 1 +#define ATTR_ACTION_EFFECTSPEED ATTR_ACTION_START + 2 +#define ATTR_ACTION_FILENAME ATTR_ACTION_START + 3 +#define ATTR_ACTION_SOUNDON ATTR_ACTION_START + 4 +#define ATTR_ACTION_PLAYFULL ATTR_ACTION_START + 5 +#define ATTR_ACTION_END ATTR_ACTION_PLAYFULL + +#define ATTR_COPY_START ATTR_ACTION_END + 1 +#define ATTR_COPY_NUMBER TypedWhichId(ATTR_COPY_START) +#define ATTR_COPY_MOVE_X TypedWhichId(ATTR_COPY_START + 1) +#define ATTR_COPY_MOVE_Y TypedWhichId(ATTR_COPY_START + 2) +#define ATTR_COPY_ANGLE TypedWhichId(ATTR_COPY_START + 3) +#define ATTR_COPY_WIDTH TypedWhichId(ATTR_COPY_START + 4) +#define ATTR_COPY_HEIGHT TypedWhichId(ATTR_COPY_START + 5) +#define ATTR_COPY_START_COLOR TypedWhichId(ATTR_COPY_START + 6) +#define ATTR_COPY_END_COLOR TypedWhichId(ATTR_COPY_START + 7) +#define ATTR_COPY_END ATTR_COPY_END_COLOR + +#define ATTR_SNAPLINE_START ATTR_COPY_END + 1 +#define ATTR_SNAPLINE_KIND ATTR_SNAPLINE_START +#define ATTR_SNAPLINE_X ATTR_SNAPLINE_START + 1 +#define ATTR_SNAPLINE_Y ATTR_SNAPLINE_START + 2 +#define ATTR_SNAPLINE_END ATTR_SNAPLINE_Y + +#define ATTR_OPTIONS_START ATTR_SNAPLINE_END + 1 +#define ATTR_OPTIONS_LAYOUT TypedWhichId(ATTR_OPTIONS_START + 1) +#define ATTR_OPTIONS_MISC TypedWhichId(ATTR_OPTIONS_START + 2) +#define ATTR_OPTIONS_SNAP TypedWhichId(ATTR_OPTIONS_START + 3) +#define ATTR_OPTIONS_PRINT TypedWhichId(ATTR_OPTIONS_START + 4) +#define ATTR_OPTIONS_END ATTR_OPTIONS_PRINT + +#define ATTR_OPTIONS_SCALE_START ATTR_OPTIONS_END + 1 +#define ATTR_OPTIONS_SCALE_X TypedWhichId(ATTR_OPTIONS_SCALE_START) +#define ATTR_OPTIONS_SCALE_Y TypedWhichId(ATTR_OPTIONS_SCALE_START + 1) +#define ATTR_OPTIONS_SCALE_WIDTH ATTR_OPTIONS_SCALE_START + 2 +#define ATTR_OPTIONS_SCALE_HEIGHT ATTR_OPTIONS_SCALE_START + 3 +#define ATTR_OPTIONS_SCALE_END ATTR_OPTIONS_SCALE_HEIGHT + +#define ATTR_PRESLAYOUT_START ATTR_OPTIONS_SCALE_END + 1 +#define ATTR_PRESLAYOUT_NAME TypedWhichId(ATTR_PRESLAYOUT_START) +#define ATTR_PRESLAYOUT_LOAD ATTR_PRESLAYOUT_START + 1 +#define ATTR_PRESLAYOUT_MASTER_PAGE TypedWhichId(ATTR_PRESLAYOUT_START + 2) +#define ATTR_PRESLAYOUT_CHECK_MASTERS ATTR_PRESLAYOUT_START + 3 +#define ATTR_PRESLAYOUT_END ATTR_PRESLAYOUT_CHECK_MASTERS + +// paragraph numbering attributes +#define ATTR_PARANUMBERING_START ATTR_PRESLAYOUT_END + 1 +#define ATTR_NUMBER_NEWSTART TypedWhichId(ATTR_PARANUMBERING_START) +#define ATTR_NUMBER_NEWSTART_AT TypedWhichId(ATTR_PARANUMBERING_START + 1) +#define ATTR_PARANUMBERING_END ATTR_NUMBER_NEWSTART_AT + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/sdattr.hxx b/sd/inc/sdattr.hxx new file mode 100644 index 000000000..bff52726e --- /dev/null +++ b/sd/inc/sdattr.hxx @@ -0,0 +1,60 @@ +/* -*- 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 . + */ + +#pragma once + +#include +#include + +#include "sdattr.hrc" + +// layer attributes +inline SfxStringItem makeSdAttrLayerName(const OUString& aStr) +{ + return SfxStringItem(ATTR_LAYER_NAME, aStr); +} + +inline SfxStringItem makeSdAttrLayerTitle(const OUString& aStr = OUString()) +{ + return SfxStringItem(ATTR_LAYER_TITLE, aStr); +} + +inline SfxStringItem makeSdAttrLayerDesc(const OUString& aStr = OUString()) +{ + return SfxStringItem(ATTR_LAYER_DESC, aStr); +} + +inline SfxBoolItem makeSdAttrLayerVisible(bool bValue = true) +{ + return SfxBoolItem(ATTR_LAYER_VISIBLE, bValue); +} + +inline SfxBoolItem makeSdAttrLayerPrintable(bool bValue = true) +{ + return SfxBoolItem(ATTR_LAYER_PRINTABLE, bValue); +} + +inline SfxBoolItem makeSdAttrLayerLocked(bool bValue = false) +{ + return SfxBoolItem(ATTR_LAYER_LOCKED, bValue); +} + +inline SfxBoolItem makeSdAttrLayerThisPage() { return SfxBoolItem(ATTR_LAYER_THISPAGE, false); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/sdcgmfilter.hxx b/sd/inc/sdcgmfilter.hxx new file mode 100644 index 000000000..6d5022f3c --- /dev/null +++ b/sd/inc/sdcgmfilter.hxx @@ -0,0 +1,37 @@ +/* -*- 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 . + */ + +#pragma once + +#include "sdfilter.hxx" + +// SdCGMFilter +class SdCGMFilter final : public SdFilter +{ +public: + SdCGMFilter ( + SfxMedium& rMedium, + ::sd::DrawDocShell& rDocShell ); + virtual ~SdCGMFilter() override; + + bool Import(); + bool Export() override; +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/sdcommands.h b/sd/inc/sdcommands.h new file mode 100644 index 000000000..829e5d50a --- /dev/null +++ b/sd/inc/sdcommands.h @@ -0,0 +1,26 @@ +/* -*- 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 . + */ +#pragma once + +#include + +inline constexpr OStringLiteral CMD_SID_HANDOUT_MASTER_MODE = ".uno:HandoutMode"; +inline constexpr OStringLiteral CMD_SID_NOTES_MODE = ".uno:NotesMode"; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/sddll.hxx b/sd/inc/sddll.hxx new file mode 100644 index 000000000..7f1258500 --- /dev/null +++ b/sd/inc/sddll.hxx @@ -0,0 +1,54 @@ +/* -*- 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 . + */ + +#pragma once + +#include "sddllapi.h" + +class SdModule; + +/************************************************************************* +|* +|* This class is a wrapper for a Load-On-Demand-DLL. One instance +|* per SfxApplication will be created for the runtime of +|* SfxApplication-subclass::Main(). +|* +|* Remember: Do export this class! It is used by the application. +|* +\************************************************************************/ + +class SD_DLLPUBLIC SdDLL final +{ +#ifdef ENABLE_SDREMOTE + static void RegisterRemotes(); +#endif + static void RegisterFactorys(); + static void RegisterInterfaces(const SdModule* pMod); + static void RegisterControllers(SdModule* pMod); + +public: + // Ctor/Dtor must be linked to the application + SdDLL(); + ~SdDLL(); + + // DLL-init/exit-code must be linked to the DLL only + static void Init(); // called directly after loading the DLL +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/sddllapi.h b/sd/inc/sddllapi.h new file mode 100644 index 000000000..d8d4e1938 --- /dev/null +++ b/sd/inc/sddllapi.h @@ -0,0 +1,30 @@ +/* -*- 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 . + */ + +#pragma once + +#include + +#if defined(SD_DLLIMPLEMENTATION) +#define SD_DLLPUBLIC SAL_DLLPUBLIC_EXPORT +#else +#define SD_DLLPUBLIC SAL_DLLPUBLIC_IMPORT +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/sdenumdef.hxx b/sd/inc/sdenumdef.hxx new file mode 100644 index 000000000..bd04c67a9 --- /dev/null +++ b/sd/inc/sdenumdef.hxx @@ -0,0 +1,31 @@ +/* -*- 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 . + */ + +#pragma once + +#define RET_SNAP_DELETE 111 + +enum class SnapKind +{ + Horizontal, + Vertical, + Point +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/sderror.hxx b/sd/inc/sderror.hxx new file mode 100644 index 000000000..07ee1d7fa --- /dev/null +++ b/sd/inc/sderror.hxx @@ -0,0 +1,31 @@ +/* -*- 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 . + */ + +#pragma once + +#include + +// Import errors +#define ERR_FORMAT_ROWCOL ErrCode(ErrCodeArea::Sd, ErrCodeClass::Read, 1) +#define ERR_FORMAT_FILE_ROWCOL ErrCode(ErrCodeArea::Sd, ErrCodeClass::Read, 2) + +// Warnings +#define WARN_FORMAT_FILE_ROWCOL ErrCode(WarningFlag::Yes, ErrCodeArea::Sd, ErrCodeClass::Read, 100) + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/sdfilter.hxx b/sd/inc/sdfilter.hxx new file mode 100644 index 000000000..8d7782e4f --- /dev/null +++ b/sd/inc/sdfilter.hxx @@ -0,0 +1,66 @@ +/* -*- 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 . + */ + +#pragma once + +#include +#include +#include +#include + +// SdFilter +class SfxMedium; +namespace sd { +class DrawDocShell; +} +class SdDrawDocument; +namespace osl { class Module; } + +class SdFilter +{ +public: + SdFilter( SfxMedium& rMedium, ::sd::DrawDocShell& rDocShell ); + virtual ~SdFilter(); + + bool IsDraw() const { return mbIsDraw; } + virtual bool Export() = 0; + +#ifndef DISABLE_DYNLOADING + static void Preload(); + /// Open library @rLibraryName and lookup symbol @rFnSymbol + static oslGenericFunction GetLibrarySymbol( const OUString& rLibraryName, const OUString &rFnSymbol ); +#endif + +protected: + css::uno::Reference< css::frame::XModel > mxModel; + css::uno::Reference< css::task::XStatusIndicator > mxStatusIndicator; + + SfxMedium& mrMedium; + ::sd::DrawDocShell& mrDocShell; + SdDrawDocument& mrDocument; + bool mbIsDraw : 1; + void CreateStatusIndicator(); + +private: + + static OUString ImplGetFullLibraryName( std::u16string_view rLibraryName ); + +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/sdgrffilter.hxx b/sd/inc/sdgrffilter.hxx new file mode 100644 index 000000000..dc9027f94 --- /dev/null +++ b/sd/inc/sdgrffilter.hxx @@ -0,0 +1,39 @@ +/* -*- 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 . + */ + +#pragma once + +#include "sdfilter.hxx" +class ErrCode; + +// SdCGMFilter +class SdGRFFilter final : public SdFilter +{ +public: + SdGRFFilter(SfxMedium& rMedium, ::sd::DrawDocShell& rDocShell); + + virtual ~SdGRFFilter() override; + + bool Import(); + bool Export() override; + + static void HandleGraphicFilterError(ErrCode nFilterError, ErrCode nStreamError); +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/sdhtmlfilter.hxx b/sd/inc/sdhtmlfilter.hxx new file mode 100644 index 000000000..84b9c5d48 --- /dev/null +++ b/sd/inc/sdhtmlfilter.hxx @@ -0,0 +1,34 @@ +/* -*- 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 . + */ + +#pragma once + +#include "sdfilter.hxx" + +// SdHTMLFilter +class SdHTMLFilter final : public SdFilter +{ +public: + SdHTMLFilter(SfxMedium& rMedium, ::sd::DrawDocShell& rDocShell); + virtual ~SdHTMLFilter() override; + + virtual bool Export() override; +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/sdiocmpt.hxx b/sd/inc/sdiocmpt.hxx new file mode 100644 index 000000000..9f1395fd7 --- /dev/null +++ b/sd/inc/sdiocmpt.hxx @@ -0,0 +1,57 @@ +/* -*- 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 . + */ + +#pragma once + +#include +#include "sddllapi.h" + + +class old_SdrDownCompat +{ +protected: + SvStream& rStream; + sal_uInt32 nSubRecSiz; + sal_uInt32 nSubRecPos; + StreamMode nMode; + bool bOpen; + +protected: + void Write(); + +public: + old_SdrDownCompat(SvStream& rNewStream, StreamMode nNewMode); + ~old_SdrDownCompat(); + void OpenSubRecord(); + void CloseSubRecord(); +}; + +#define SDIOCOMPAT_VERSIONDONTKNOW sal_uInt16(0xffff) + +class SD_DLLPUBLIC SdIOCompat : public old_SdrDownCompat +{ +public: + // nNewMode: StreamMode::READ or StreamMode::WRITE + // nVer: specify only when writing + SdIOCompat(SvStream& rNewStream, StreamMode nNewMode, + sal_uInt16 nVer = SDIOCOMPAT_VERSIONDONTKNOW); + ~SdIOCompat(); +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/sdmod.hxx b/sd/inc/sdmod.hxx new file mode 100644 index 000000000..047a78fa2 --- /dev/null +++ b/sd/inc/sdmod.hxx @@ -0,0 +1,175 @@ +/* -*- 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 . + */ + +#pragma once + +#include "glob.hxx" +#include "pres.hxx" + +#include +#include "sddllapi.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include + +class SdOptions; +class SvxSearchItem; +class EditFieldInfo; +class SdTransferable; +class SvNumberFormatter; +class SfxErrorHandler; +class SfxFrame; +struct SfxItemPropertyMapEntry; +class VclSimpleEvent; +namespace svtools { class ColorConfig; } +enum class SdrObjKind : sal_uInt16; + +namespace com::sun::star::frame { + class XFrame; +} + +enum class SdOptionStreamMode +{ + Load = 0, + Store = 1 +}; + +typedef std::map< SfxItemPropertyMapEntry const * , css::uno::Reference > SdExtPropertySetInfoCache; +typedef std::map< SdrObjKind, css::uno::Sequence< css::uno::Type> > SdTypesCache; + +/* + + This subclass of (which is a subclass of ) is + linked to the DLL. One instance of this class exists while the DLL is + loaded. + + SdModule is like to be compared with the -subclass. + + Remember: Don`t export this class! It uses DLL-internal symbols. + +*/ + +class SAL_DLLPUBLIC_RTTI SdModule final : public SfxModule, public SfxListener +{ +public: + SFX_DECL_INTERFACE(SD_IF_SDAPP) + DECL_DLLPRIVATE_LINK( CalcFieldValueHdl, EditFieldInfo*, void ); + +private: + /// SfxInterface initializer. + static void InitInterface_Impl(); + +public: + SdModule(SfxObjectFactory* pDrawObjFact, SfxObjectFactory* pGraphicObjFact); + virtual ~SdModule() override; + + SdTransferable* pTransferClip; + SdTransferable* pTransferDrag; + SdTransferable* pTransferSelection; + + void Execute(SfxRequest& rReq); + void GetState(SfxItemSet&); + + SdOptions* GetSdOptions(DocumentType eDocType); + SD_DLLPUBLIC tools::SvRef GetOptionStream( std::u16string_view rOptionName, SdOptionStreamMode eMode ); + + bool GetWaterCan() const { return bWaterCan; } + void SetWaterCan( bool bWC ) { bWaterCan = bWC; } + + SvxSearchItem* GetSearchItem() { return pSearchItem.get(); } + void SetSearchItem(std::unique_ptr pItem); + + /** Return the virtual device that can be used for printer independent + layout. + @return + The returned pointer is NULL when the device could not be + created when this modules was instantiated. + */ + OutputDevice* GetVirtualRefDevice() { return mpVirtualRefDevice;} + + SD_DLLPUBLIC SvNumberFormatter* GetNumberFormatter(); + + // virtual methods for the option dialog + virtual std::optional CreateItemSet( sal_uInt16 nId ) override; + virtual void ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet ) override; + virtual std::unique_ptr CreateTabPage( sal_uInt16 nId, weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet ) override; + virtual std::optional CreateStyleFamilies() override; + + SdExtPropertySetInfoCache gImplImpressPropertySetInfoCache; + SdExtPropertySetInfoCache gImplDrawPropertySetInfoCache; + SdTypesCache gImplTypesCache; + + svtools::ColorConfig& GetColorConfig(); + +private: + + SdOptions* pImpressOptions; + SdOptions* pDrawOptions; + std::unique_ptr pSearchItem; + std::unique_ptr pNumberFormatter; + tools::SvRef xOptionStorage; + bool bWaterCan; + std::unique_ptr mpErrorHdl; + /** This device is used for printer independent layout. It is virtual + in the sense that it does not represent a printer. The pointer may + be NULL when the virtual device could not be created. + */ + VclPtr< VirtualDevice > mpVirtualRefDevice; + + virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override; + + SfxFrame* ExecuteNewDocument( SfxRequest const & rReq ); + + static SfxFrame* CreateEmptyDocument( const css::uno::Reference< css::frame::XFrame >& i_rFrame ); + static SfxFrame* CreateFromTemplate(const OUString& rTemplatePath, + const css::uno::Reference& i_rFrame, + const bool bReplaceable); + + bool mbEventListenerAdded; + + /** Take an outline from a text document and create a new impress + document according to the structure of the outline. + @param rRequest + This typically is the unmodified request from an execute() + function from where this function is called. + */ + static bool OutlineToImpress(SfxRequest const & rRequest); + + /** Add an eventlistener as soon as possible in sd, allows to use + remote devices to start the slideshow elegantly, and respecting + portability + @EventListenerHdl + The event listener handler + @VclSimpleEvent * + a pointer to a VCLSimpleEvent (see vcl/vclevent.hxx ) + */ + DECL_DLLPRIVATE_STATIC_LINK( SdModule, EventListenerHdl, VclSimpleEvent&, void ); + + std::unique_ptr mpColorConfig; +}; + +#define SD_MOD() ( static_cast(SfxApplication::GetModule(SfxToolsModule::Draw)) ) + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/sdpage.hxx b/sd/inc/sdpage.hxx new file mode 100644 index 000000000..16315c219 --- /dev/null +++ b/sd/inc/sdpage.hxx @@ -0,0 +1,404 @@ +/* -*- 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 . + */ + +#ifndef INCLUDED_SD_INC_SDPAGE_HXX +#define INCLUDED_SD_INC_SDPAGE_HXX + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include "diadef.h" +#include "pres.hxx" +#include "shapelist.hxx" +#include "misc/scopelock.hxx" +#include "sddllapi.h" + +namespace com::sun::star::animations { + class XAnimationNode; +} + +class SfxStyleSheet; +class SdDrawDocument; +class SdrTextObj; +class SdPageLink; +class SfxItemSet; +class Paragraph; +class Outliner; +class SdStyleSheet; +class Graphic; + +namespace sd +{ + class MainSequence; +} + +namespace sd { + + struct SD_DLLPUBLIC HeaderFooterSettings + { + bool mbHeaderVisible; + OUString maHeaderText; + + bool mbFooterVisible; + OUString maFooterText; + + bool mbSlideNumberVisible; + + bool mbDateTimeVisible; + bool mbDateTimeIsFixed; + OUString maDateTimeText; + SvxDateFormat meDateFormat; + SvxTimeFormat meTimeFormat; + + HeaderFooterSettings(); + + bool operator==( const HeaderFooterSettings& rSettings ) const; + }; + + typedef std::vector< css::uno::Reference< css::office::XAnnotation > > AnnotationVector; +} + +namespace sd { + class UndoAnimation; + class UndoTransition; + class UndoGeoObject; + class UndoAttrObject; +} + +class SD_DLLPUBLIC SdPage final : public FmFormPage, public SdrObjUserCall +{ + SdPage& operator=(const SdPage&) = delete; + SdPage(const SdPage&) = delete; + +friend class SdGenericDrawPage; +friend class SdDrawPage; +friend class sd::UndoAnimation; +friend class sd::UndoTransition; +friend class ModifyPageUndoAction; +friend class sd::UndoGeoObject; +friend class sd::UndoAttrObject; + + PageKind mePageKind; ///< page type + AutoLayout meAutoLayout; ///< AutoLayout + sd::ShapeList maPresentationShapeList;///< presentation objects + sd::ScopeLock maLockAutoLayoutArrangement; + bool mbSelected; ///< selection identifier + PresChange mePresChange; ///< manual / automatic / semi automatic + double mfTime; ///< Display time in seconds + bool mbSoundOn; ///< with / without sound. + bool mbExcluded; ///< will (not) be displayed during show. + OUString maLayoutName; ///< Name of the layout + OUString maSoundFile; ///< Path to sound file (MS-DOS notation). + bool mbLoopSound; + bool mbStopSound; + OUString maCreatedPageName; ///< generated page name by GetPageName. + OUString maFileName; ///< file name. + OUString maBookmarkName; ///< Bookmark name. + bool mbScaleObjects; ///< Objects should be scaled + rtl_TextEncoding meCharSet; ///< Text encoding + sal_uInt16 mnPaperBin; ///< PaperBin + SdPageLink* mpPageLink; ///< Page link (at left sides only) + + sd::AnnotationVector maAnnotations; + + /** holds the smil animation sequences for this page */ + css::uno::Reference< css::animations::XAnimationNode > mxAnimationNode; + + /** a helper class to manipulate effects inside the main sequence */ + std::shared_ptr< sd::MainSequence > mpMainSequence; + + virtual css::uno::Reference< css::uno::XInterface > createUnoPage() override; + + std::unique_ptr mpItems; + + SfxItemSet* getOrCreateItems(); + + sd::HeaderFooterSettings maHeaderFooterSettings; + + // new transition settings + sal_Int16 mnTransitionType; + sal_Int16 mnTransitionSubtype; + bool mbTransitionDirection; + sal_Int32 mnTransitionFadeColor; + double mfTransitionDuration; + + void lateInit(const SdPage& rSrcPage); + +public: + + SdPage(SdDrawDocument& rNewDoc, bool bMasterPage); + virtual ~SdPage() override; + + virtual rtl::Reference CloneSdrPage(SdrModel& rTargetModel) const override; + + virtual void SetSize(const Size& aSize) override; + virtual void SetBorder(sal_Int32 nLft, sal_Int32 nUpp, sal_Int32 nRgt, sal_Int32 Lwr) override; + virtual void SetLeftBorder(sal_Int32 nBorder) override; + virtual void SetRightBorder(sal_Int32 nBorder) override; + virtual void SetUpperBorder(sal_Int32 nBorder) override; + virtual void SetLowerBorder(sal_Int32 nBorder) override; + virtual bool IsReadOnly() const override; + + sd::ShapeList& GetPresentationShapeList() { return maPresentationShapeList; } + + void EnsureMasterPageDefaultBackground(); + SdrObject* CreatePresObj(PresObjKind eObjKind, bool bVertical, const ::tools::Rectangle& rRect); + SdrObject* CreateDefaultPresObj(PresObjKind eObjKind); + void DestroyDefaultPresObj(PresObjKind eObjKind); + SdrObject* GetPresObj(PresObjKind eObjKind, int nIndex = 1, bool bFuzzySearch = false ); + PresObjKind GetPresObjKind(SdrObject* pObj) const; + OUString GetPresObjText(PresObjKind eObjKind) const; + SfxStyleSheet* GetStyleSheetForMasterPageBackground() const; + SfxStyleSheet* GetStyleSheetForPresObj(PresObjKind eObjKind) const; + sal_Int64 GetHashCode() const; + bool RestoreDefaultText( SdrObject* pObj ); + + /** @return true if the given SdrObject is inside the presentation object list */ + bool IsPresObj(const SdrObject* pObj); + + /** removes the given SdrObject from the presentation object list */ + void RemovePresObj(const SdrObject* pObj); + + /** inserts the given SdrObject into the presentation object list */ + void InsertPresObj(SdrObject* pObj, PresObjKind eKind ); + + void SetAutoLayout(AutoLayout eLayout, bool bInit=false, bool bCreate=false); + AutoLayout GetAutoLayout() const { return meAutoLayout; } + void CreateTitleAndLayout(bool bInit=false, bool bCreate=false); + SdrObject* InsertAutoLayoutShape(SdrObject* pObj, PresObjKind eObjKind, bool bVertical, const ::tools::Rectangle& rRect, bool bInit); + + virtual void NbcInsertObject(SdrObject* pObj, size_t nPos=SAL_MAX_SIZE) override; + virtual SdrObject* NbcRemoveObject(size_t nObjNum) override; + virtual SdrObject* RemoveObject(size_t nObjNum) override; + + /** Also override ReplaceObject methods to realize when + objects are removed with this mechanism instead of RemoveObject*/ + virtual SdrObject* ReplaceObject(SdrObject* pNewObj, size_t nObjNum) override; + + void SetObjText(SdrTextObj* pObj, SdrOutliner* pOutliner, PresObjKind eObjKind, std::u16string_view rStr ); + + void SetPageKind(PageKind ePgType) { mePageKind = ePgType; } + PageKind GetPageKind() const { return mePageKind; } + + void SetSelected(bool bSel) { mbSelected = bSel; } + bool IsSelected() const { return mbSelected; } + + void SetFadeEffect(css::presentation::FadeEffect eNewEffect); + css::presentation::FadeEffect GetFadeEffect() const; + + void SetPresChange(PresChange eChange) { mePresChange = eChange; } + PresChange GetPresChange() const { return mePresChange; } + + void SetTime(double fNewTime) { mfTime = fNewTime; } + double GetTime() const { return mfTime; } + + void SetSound(bool bNewSoundOn) { mbSoundOn = bNewSoundOn; } + bool IsSoundOn() const { return mbSoundOn; } + + void SetExcluded(bool bNewExcluded) { mbExcluded = bNewExcluded; } + bool IsExcluded() const { return mbExcluded; } + + bool IsScaleObjects() const { return mbScaleObjects; } + + void SetSoundFile(const OUString& rStr) { maSoundFile = rStr; } + const OUString& GetSoundFile() const { return maSoundFile; } + + void SetLoopSound( bool bLoopSound ) { mbLoopSound = bLoopSound; } + bool IsLoopSound() const { return mbLoopSound; } + + void SetStopSound( bool bStopSound ) { mbStopSound = bStopSound; } + bool IsStopSound() const { return mbStopSound; } + + sal_Int16 getTransitionType() const { return mnTransitionType;} + void setTransitionType( sal_Int16 nTransitionType ); + + sal_Int16 getTransitionSubtype() const { return mnTransitionSubtype;} + void setTransitionSubtype( sal_Int16 nTransitionSubtype ); + + bool getTransitionDirection() const { return mbTransitionDirection;} + void setTransitionDirection( bool bTransitionbDirection ); + + sal_Int32 getTransitionFadeColor() const { return mnTransitionFadeColor;} + void setTransitionFadeColor( sal_Int32 nTransitionFadeColor ); + + double getTransitionDuration() const { return mfTransitionDuration;} + void setTransitionDuration( double fTransitionDuration ); + + virtual void Changed(const SdrObject& rObj, SdrUserCallType eType, + const ::tools::Rectangle& rOldBoundRect) override; + + void SetLayoutName(const OUString& aName); + virtual OUString GetLayoutName() const override { return maLayoutName; } + + void SetFileName(const OUString& aName) { maFileName = aName; } + const OUString& GetFileName() const { return maFileName; } + void SetBookmarkName(const OUString& aName) { maBookmarkName = aName; } + const OUString& GetBookmarkName() const { return maBookmarkName; } + + void ConnectLink(); + void DisconnectLink(); + + void ScaleObjects(const Size& rNewPageSize, const ::tools::Rectangle& rNewBorderRect, + bool bScaleAllObj); + + const OUString& GetName() const; + OUString const & GetRealName() const { return FmFormPage::GetName(); }; + + void SetPresentationLayout(std::u16string_view rLayoutName, + bool bReplaceStyleSheets = true, + bool bSetMasterPage = true, + bool bReverseOrder = false); + void EndListenOutlineText(); + + void SetPaperBin(sal_uInt16 nBin) { mnPaperBin = nBin; } + sal_uInt16 GetPaperBin() const { return mnPaperBin; } + virtual void SetOrientation(Orientation eOrient) override; + virtual Orientation GetOrientation() const override; + + virtual SfxStyleSheet* GetTextStyleSheetForObject( SdrObject* pObj ) const override; + + bool setAlienAttributes( const css::uno::Any& rAttributes ); + void getAlienAttributes( css::uno::Any& rAttributes ); + + /** @return the main animation node + + @throws css::uno::RuntimeException + */ + css::uno::Reference< css::animations::XAnimationNode > const & getAnimationNode(); + + /** sets the main animation node + + @throws css::uno::RuntimeException + */ + void setAnimationNode( css::uno::Reference< css::animations::XAnimationNode > const & xNode ); + + /// @return a helper class to manipulate effects inside the main sequence + std::shared_ptr< sd::MainSequence > const & getMainSequence(); + + /** quick check if this slide has an animation node. + This can be used to have a cost free check if there are no animations ad this slide. + If it returns true this does not mean that there are animations available. + */ + bool hasAnimationNode() const; + + /// @return the SdPage implementation for the given XDrawPage or 0 if not available + static SdPage* getImplementation( const css::uno::Reference< css::drawing::XDrawPage >& xPage ); + + /** removes all custom animations for the given shape */ + void removeAnimations( const SdrObject* pObj ); + + /** Notify that the object has been renamed and the animation effects has to update. */ + void notifyObjectRenamed(const SdrObject* pObj); + + /** Set the name of the page and broadcast a model change. + */ + void SetName (const OUString& rName); + + const sd::HeaderFooterSettings& getHeaderFooterSettings() const; + void setHeaderFooterSettings( const sd::HeaderFooterSettings& rNewSettings ); + + /** + @return true if the object from the ViewObjectContact should + be visible on this page while rendering. + + bEdit selects if visibility test is for an editing view or a final render, + like printing. + */ + virtual bool checkVisibility( + const sdr::contact::ViewObjectContact& rOriginal, + const sdr::contact::DisplayInfo& rDisplayInfo, + bool bEdit ) override; + + /** callback from the sd::View when a new paragraph for one object on this page is created */ + void onParagraphInserted( const ::Outliner* pOutliner, Paragraph const * pPara, SdrObject* pObj ); + + /** callback from the sd::View when a paragraph from one object on this page is removed */ + void onParagraphRemoving( const ::Outliner* pOutliner, Paragraph const * pPara, SdrObject* pObj ); + + /** callback from the sd::View when an object just left text edit mode */ + void onEndTextEdit( SdrObject* pObj ); + + /** @return the presentation style with the given helpid from this masterpage or this + slides masterpage */ + SdStyleSheet* getPresentationStyle( sal_uInt32 nHelpId ) const; + + /** removes all empty presentation objects from this slide */ + void RemoveEmptyPresentationObjects(); + + ::tools::Rectangle GetTitleRect() const; + ::tools::Rectangle GetLayoutRect() const; + + static void CalculateHandoutAreas( SdDrawDocument& rModel, AutoLayout eLayout, bool bHorizontal, std::vector< ::tools::Rectangle >& rAreas ); + + /** Set the "precious" flag to the given value. + */ + void SetPrecious (const bool bIsPrecious); + + /** The "precious" flag is used for master pages to prevent some unused + master pages from being deleted automatically. For pages + other than master pages this flag can be ignored. + @return + When this method returns for a master page then this + master page should not be deleted automatically. + */ + bool IsPrecious() const { return mbIsPrecious; } + + void createAnnotation( css::uno::Reference< css::office::XAnnotation >& xAnnotation ); + void addAnnotation( const css::uno::Reference< css::office::XAnnotation >& xAnnotation, int nIndex ); + void removeAnnotation( const css::uno::Reference< css::office::XAnnotation >& xAnnotation ); + const sd::AnnotationVector& getAnnotations() const { return maAnnotations; } + bool Equals(const SdPage&) const; + virtual void dumpAsXml(xmlTextWriterPtr pWriter) const override; + sal_uInt16 getPageId() const { return mnPageId; } + + /** + Returns graphics objects from the page that can be prefetched before it's painted. + The pointers are temporary and should not be kept. + */ + void getGraphicsForPrefetch(std::vector& graphics) const; + + static sal_uInt16 mnLastPageId; + +private: + bool mbIsPrecious; + + // page id of this page + sal_uInt16 mnPageId; + + /** clone the animations from this and set them to rTargetPage + * TTTT: Order is strange, should be the other way around by + * convention/convenience and makes usage a little dangerous... + */ + void cloneAnimations( SdPage& rTargetPage ) const; + + /** called before a shape is removed or replaced from this slide */ + void onRemoveObject( SdrObject* pObject ); +}; + +#endif // INCLUDED_SD_INC_SDPAGE_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/sdpdffilter.hxx b/sd/inc/sdpdffilter.hxx new file mode 100644 index 000000000..685a3485a --- /dev/null +++ b/sd/inc/sdpdffilter.hxx @@ -0,0 +1,41 @@ +/* -*- 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 . + */ + +#pragma once + +#include "sdfilter.hxx" + +class SfxMedium; +namespace sd +{ +class DrawDocShell; +} + +class SdPdfFilter final : public SdFilter +{ +public: + SdPdfFilter(SfxMedium& rMedium, ::sd::DrawDocShell& rDocShell); + + virtual ~SdPdfFilter() override; + + bool Import(); + bool Export() override; +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/sdpptwrp.hxx b/sd/inc/sdpptwrp.hxx new file mode 100644 index 000000000..7ff62a5c0 --- /dev/null +++ b/sd/inc/sdpptwrp.hxx @@ -0,0 +1,46 @@ +/* -*- 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 . + */ + +#pragma once + +#include "sdfilter.hxx" + +#include + +// SdPPTFilter +class SdPPTFilter final : public SdFilter +{ +public: + SdPPTFilter ( + SfxMedium& rMedium, + ::sd::DrawDocShell& rDocShell); + virtual ~SdPPTFilter() override; + + /// these methods are necessary for the export to PowerPoint + bool Import(); + bool Export() override; + + /// restores the original basic storage + void PreSaveBasic(); + +private: + SvMemoryStream* pBas; +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/sdresid.hxx b/sd/inc/sdresid.hxx new file mode 100644 index 000000000..2ed8cd42c --- /dev/null +++ b/sd/inc/sdresid.hxx @@ -0,0 +1,29 @@ +/* -*- 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 . + */ + +#pragma once + +#include +#include "sddllapi.h" +#include + +SD_DLLPUBLIC OUString SdResId(TranslateId aId); +SD_DLLPUBLIC OUString SdResId(TranslateNId aContextSingularPlural, int nCardinality); + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/sdundo.hxx b/sd/inc/sdundo.hxx new file mode 100644 index 000000000..fbcc03574 --- /dev/null +++ b/sd/inc/sdundo.hxx @@ -0,0 +1,45 @@ +/* -*- 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 . + */ + +#pragma once + +#include +#include "sddllapi.h" + +class SdDrawDocument; + +class SD_DLLPUBLIC SdUndoAction : public SfxUndoAction +{ +public: + SdUndoAction(SdDrawDocument* pSdDrawDocument); + + void SetComment(const OUString& rStr) { maComment = rStr; } + virtual OUString GetComment() const override { return maComment; } + virtual SdUndoAction* Clone() const { return nullptr; } + /// See SfxUndoAction::GetViewShellId(). + ViewShellId GetViewShellId() const override; + +protected: + SdDrawDocument* mpDoc; + ViewShellId mnViewShellId; +private: + OUString maComment; +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/sdxmlwrp.hxx b/sd/inc/sdxmlwrp.hxx new file mode 100644 index 000000000..9a1bf82c0 --- /dev/null +++ b/sd/inc/sdxmlwrp.hxx @@ -0,0 +1,52 @@ +/* -*- 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 . + */ +#pragma once + +#include +#include +#include "sdfilter.hxx" + +class ErrCode; + +// SdXMLFilter +enum class SdXMLFilterMode +{ + Normal, ///< standard load and save of the complete document + Organizer ///< only for import, only the styles are loaded +}; + +class SdXMLFilter final : public SdFilter +{ +public: + SdXMLFilter( + SfxMedium& rMedium, + ::sd::DrawDocShell& rDocShell, + SdXMLFilterMode eFilterMode = SdXMLFilterMode::Normal, + sal_uLong nStoreVer = SOFFICE_FILEFORMAT_8 ); + virtual ~SdXMLFilter() override; + + bool Import( ErrCode& nError ); + bool Export() override; + +private: + SdXMLFilterMode meFilterMode; + sal_uLong mnStoreVer; +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/shapelist.hxx b/sd/inc/shapelist.hxx new file mode 100644 index 000000000..6528cc073 --- /dev/null +++ b/sd/inc/shapelist.hxx @@ -0,0 +1,71 @@ +/* -*- 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 . + */ + +#pragma once + +#include +#include + +#include + +namespace sd +{ + class ShapeList final : public sdr::ObjectUser + { + public: + ShapeList(); + virtual ~ShapeList(); + + /** adds the given shape to this list */ + void addShape( SdrObject& rObject ); + + /** removes the shape from this list*/ + void removeShape( SdrObject& rObject ); + + /** removes all shapes from this list */ + void clear(); + + /** @return true if this list is empty */ + bool isEmpty() const; + + /** @return true if given shape is part of this list */ + bool hasShape( SdrObject& rObject ) const; + + /** returns the shape the internal iterator points to, or 0 if + * the list end is reached. moves the internal iterator to the + * next shape. */ + SdrObject* getNextShape(); + + /** Sets the internal iterator to the shape at given index. */ + void seekShape( sal_uInt32 nIndex ); + + bool hasMore() const; + + const std::list< SdrObject* >& getList() const { return maShapeList; } + + private: + virtual void ObjectInDestruction(const SdrObject& rObject) override; + + typedef std::list< SdrObject* > ListImpl; + ListImpl maShapeList; + ListImpl::iterator maIter; + }; +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/stlfamily.hxx b/sd/inc/stlfamily.hxx new file mode 100644 index 000000000..df7ded613 --- /dev/null +++ b/sd/inc/stlfamily.hxx @@ -0,0 +1,116 @@ +/* -*- 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 . + */ + +#pragma once + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include + +#include + +class SdStyleSheet; +class SdPage; +struct SdStyleFamilyImpl; + +class SdStyleFamily final : public ::cppu::WeakImplHelper< css::container::XNameContainer, css::container::XNamed, css::container::XIndexAccess, css::lang::XSingleServiceFactory, css::lang::XServiceInfo, css::lang::XComponent, css::beans::XPropertySet > +{ +public: + /// creates the style family for the given SfxStyleFamily + SdStyleFamily( const rtl::Reference< SfxStyleSheetPool >& xPool, SfxStyleFamily nFamily ); + + /// creates the presentation family for the given masterpage + SdStyleFamily( const rtl::Reference< SfxStyleSheetPool >& xPool, const SdPage* pMasterPage ); + + virtual ~SdStyleFamily() override; + + // XServiceInfo + virtual OUString SAL_CALL getImplementationName() override; + virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override; + virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override; + + // XNamed + virtual OUString SAL_CALL getName( ) override; + virtual void SAL_CALL setName( const OUString& aName ) override; + + // XNameAccess + virtual css::uno::Any SAL_CALL getByName( const OUString& aName ) override; + virtual css::uno::Sequence< OUString > SAL_CALL getElementNames() override; + virtual sal_Bool SAL_CALL hasByName( const OUString& aName ) override; + + // XElementAccess + virtual css::uno::Type SAL_CALL getElementType() override; + virtual sal_Bool SAL_CALL hasElements() override; + + // XIndexAccess + virtual sal_Int32 SAL_CALL getCount() override ; + virtual css::uno::Any SAL_CALL getByIndex( sal_Int32 Index ) override; + + // XNameContainer + virtual void SAL_CALL insertByName( const OUString& aName, const css::uno::Any& aElement ) override; + virtual void SAL_CALL removeByName( const OUString& Name ) override; + + // XNameReplace + virtual void SAL_CALL replaceByName( const OUString& aName, const css::uno::Any& aElement ) override; + + // XSingleServiceFactory + virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstance( ) override; + virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstanceWithArguments( const css::uno::Sequence< css::uno::Any >& aArguments ) override; + + // XComponent + virtual void SAL_CALL dispose( ) override; + virtual void SAL_CALL addEventListener( const css::uno::Reference< css::lang::XEventListener >& xListener ) override; + virtual void SAL_CALL removeEventListener( const css::uno::Reference< css::lang::XEventListener >& aListener ) override; + + // XPropertySet + virtual css::uno::Reference SAL_CALL getPropertySetInfo() override; + virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, const css::uno::Any& aValue ) override; + virtual css::uno::Any SAL_CALL getPropertyValue( const OUString& PropertyName ) override; + virtual void SAL_CALL addPropertyChangeListener( const OUString& aPropertyName, const css::uno::Reference& xListener ) override; + virtual void SAL_CALL removePropertyChangeListener( const OUString& aPropertyName, const css::uno::Reference& aListener ) override; + virtual void SAL_CALL addVetoableChangeListener(const OUString& PropertyName, const css::uno::Reference& aListener ) override; + virtual void SAL_CALL removeVetoableChangeListener(const OUString& PropertyName,const css::uno::Reference&aListener ) override; + +private: + /// @throws css::uno::RuntimeException + void throwIfDisposed() const; + /// @throws css::lang::IllegalArgumentException + SdStyleSheet* GetValidNewSheet( const css::uno::Any& rElement ); + /// @throws css::container::NoSuchElementException + /// @throws css::lang::WrappedTargetException + SdStyleSheet* GetSheetByName( const OUString& rName ); + + SfxStyleFamily mnFamily; + rtl::Reference< SfxStyleSheetPool > mxPool; + std::unique_ptr mpImpl; +}; + +typedef rtl::Reference< SdStyleFamily > SdStyleFamilyRef; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/stlpool.hxx b/sd/inc/stlpool.hxx new file mode 100644 index 000000000..bb73e157e --- /dev/null +++ b/sd/inc/stlpool.hxx @@ -0,0 +1,141 @@ +/* -*- 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 . + */ + +#pragma once + +#include +#include +#include + +#include +#include +#include +#include +#include + +#include "stlfamily.hxx" +#include "stlsheet.hxx" + +#include "sddllapi.h" + +class SdDrawDocument; +class SdPage; +class SvxNumberFormat; + +typedef std::map< const SdPage*, SdStyleFamilyRef > SdStyleFamilyMap; + +typedef ::cppu::ImplInheritanceHelper< SfxStyleSheetPool, + css::lang::XServiceInfo, + css::container::XIndexAccess, + css::container::XNameAccess, + css::lang::XComponent > SdStyleSheetPoolBase; + +class SAL_DLLPUBLIC_RTTI SdStyleSheetPool final : public SdStyleSheetPoolBase, public SfxListener +{ + friend class SdDrawDocument; +public: + SdStyleSheetPool(SfxItemPool const& rPool, SdDrawDocument* pDocument); + + void SetActualStyleSheet(SfxStyleSheetBase* pActStyleSheet) { mpActualStyleSheet = pActStyleSheet; } + SfxStyleSheetBase* GetActualStyleSheet() { return mpActualStyleSheet; } + + SfxStyleSheetBase* GetTitleSheet(std::u16string_view rLayoutName); + + // Caller has to delete the list + void CreateOutlineSheetList(std::u16string_view rLayoutName, std::vector &rOutlineStyles); + + /** creates all layout style sheets for the given layout name if they + don't exist yet. + + @param rLayoutName Must be the name of a master page + @param bCheck If set to true, the debug version will assert if a style + had to be created. This is used to assert errors in documents + when styles are missing. + */ + SD_DLLPUBLIC void CreateLayoutStyleSheets(std::u16string_view rLayoutName, bool bCheck = false ); + static void CreateLayoutSheetNames(std::u16string_view rLayoutName, std::vector &aNameList); + void CreateLayoutSheetList(std::u16string_view rLayoutName, SdStyleSheetVector& rLayoutSheets); + void CopyLayoutSheets(std::u16string_view rLayoutName, SdStyleSheetPool& rSourcePool, StyleSheetCopyResultVector& rCreatedSheets); + void CopyGraphicSheets(SdStyleSheetPool& rSourcePool); + void CopyCellSheets(SdStyleSheetPool& rSourcePool); + void CopyTableStyles(SdStyleSheetPool const & rSourcePool); + void CopyCellSheets(SdStyleSheetPool& rSourcePool, StyleSheetCopyResultVector& rCreatedSheets); + void RenameAndCopyGraphicSheets(SdStyleSheetPool& rSourcePool, StyleSheetCopyResultVector& rCreatedSheets, std::u16string_view rRenameSuffix); + + void CreatePseudosIfNecessary(); + void UpdateStdNames(); + static void PutNumBulletItem( SfxStyleSheetBase* pSheet, vcl::Font& rBulletFont ); + static vcl::Font GetBulletFont(); + + SdDrawDocument* GetDoc() const { return mpDoc; } + + static SdStyleSheetVector CreateChildList( SdStyleSheet const * pSheet ); + + static void setDefaultOutlineNumberFormatBulletAndIndent(sal_uInt16 i, SvxNumberFormat &rNumberFormat); + +public: + /// @throws css::uno::RuntimeException + void throwIfDisposed(); + + // XServiceInfo + virtual OUString SAL_CALL getImplementationName() override; + virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override; + virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override; + + // XNameAccess + virtual css::uno::Any SAL_CALL getByName( const OUString& aName ) override; + virtual css::uno::Sequence< OUString > SAL_CALL getElementNames() override; + virtual sal_Bool SAL_CALL hasByName( const OUString& aName ) override; + + // XElementAccess + virtual css::uno::Type SAL_CALL getElementType() override; + virtual sal_Bool SAL_CALL hasElements() override; + + // XIndexAccess + virtual sal_Int32 SAL_CALL getCount() override ; + virtual css::uno::Any SAL_CALL getByIndex( sal_Int32 Index ) override; + + // XComponent + virtual void SAL_CALL dispose( ) override; + virtual void SAL_CALL addEventListener( const css::uno::Reference< css::lang::XEventListener >& xListener ) override; + virtual void SAL_CALL removeEventListener( const css::uno::Reference< css::lang::XEventListener >& aListener ) override; + +private: + void CopySheets(SdStyleSheetPool& rSourcePool, SfxStyleFamily eFamily ); + void CopySheets(SdStyleSheetPool& rSourcePool, SfxStyleFamily eFamily, StyleSheetCopyResultVector& rCreatedSheets ); + void CopySheets(SdStyleSheetPool& rSourcePool, SfxStyleFamily eFamily, StyleSheetCopyResultVector& rCreatedSheets, std::u16string_view rRenameSuffix ); + + virtual rtl::Reference Create(const OUString& rName, SfxStyleFamily eFamily, SfxStyleSearchBits nMask) override; + + using SfxStyleSheetPool::Create; + virtual ~SdStyleSheetPool() override; + + void AddStyleFamily( const SdPage* pPage ); + void RemoveStyleFamily( const SdPage* pPage ); + + SfxStyleSheetBase* mpActualStyleSheet; + SdDrawDocument* mpDoc; + SdStyleFamilyRef mxGraphicFamily; + SdStyleFamilyRef mxCellFamily; + SdStyleFamilyMap maStyleFamilyMap; + css::uno::Reference< css::container::XNameAccess > mxTableFamily; + OUString msTableFamilyName; +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/stlsheet.hxx b/sd/inc/stlsheet.hxx new file mode 100644 index 000000000..645259e9e --- /dev/null +++ b/sd/inc/stlsheet.hxx @@ -0,0 +1,180 @@ +/* -*- 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 . + */ + +#pragma once + +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include + +#include + +#include "prlayout.hxx" + +class ModifyListenerForwarder; +struct SfxItemPropertyMapEntry; + +typedef cppu::ImplInheritanceHelper< SfxUnoStyleSheet, + css::beans::XPropertySet, + css::beans::XMultiPropertySet, + css::lang::XServiceInfo, + css::beans::XPropertyState, + css::util::XModifyBroadcaster, + css::lang::XComponent > SdStyleSheetBase ; + +class SdStyleSheet final : public SdStyleSheetBase, private ::cppu::BaseMutex +{ +public: + SdStyleSheet( const OUString& rDisplayName, SfxStyleSheetBasePool& rPool, SfxStyleFamily eFamily, SfxStyleSearchBits nMask ); + + virtual bool SetParent (const OUString& rParentName) override; + virtual SfxItemSet& GetItemSet() override; + virtual bool IsUsed() const override; + virtual bool HasFollowSupport() const override; + virtual bool HasParentSupport() const override; + virtual bool HasClearParentSupport() const override; + virtual void SetHelpId( const OUString& r, sal_uLong nId ) override; + + void AdjustToFontHeight(SfxItemSet& rSet, bool bOnlyMissingItems = true); + + SdStyleSheet* GetRealStyleSheet() const; + SdStyleSheet* GetPseudoStyleSheet() const; + + void SetApiName( const OUString& rApiName ); + OUString const & GetApiName() const; + + static OUString GetFamilyString( SfxStyleFamily eFamily ); + + static rtl::Reference CreateEmptyUserStyle( SfxStyleSheetBasePool& rPool, SfxStyleFamily eFamily ); + + //Broadcast that a SdStyleSheet has changed, taking into account outline sublevels + //which need to be explicitly broadcast as changing if their parent style was + //the one that changed + static void BroadcastSdStyleSheetChange(SfxStyleSheetBase const * pStyleSheet, PresentationObjects ePO, + SfxStyleSheetBasePool* pSSPool); + + // SfxStyleSheetBase + virtual bool SetName(const OUString& rNewName, bool bReindexNow = true) override; + + // XInterface + virtual void SAL_CALL release( ) noexcept override; + + // XServiceInfo + virtual OUString SAL_CALL getImplementationName() override; + virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override; + virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override; + + // XNamed + virtual OUString SAL_CALL getName( ) override; + virtual void SAL_CALL setName( const OUString& aName ) override; + + // XStyle + virtual sal_Bool SAL_CALL isUserDefined( ) override; + virtual sal_Bool SAL_CALL isInUse( ) override; + virtual OUString SAL_CALL getParentStyle( ) override; + virtual void SAL_CALL setParentStyle( const OUString& aParentStyle ) override; + + // XPropertySet + virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override; + virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, const css::uno::Any& aValue ) override; + virtual css::uno::Any SAL_CALL getPropertyValue( const OUString& PropertyName ) override; + virtual void SAL_CALL addPropertyChangeListener( const OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener ) override; + virtual void SAL_CALL removePropertyChangeListener( const OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& aListener ) override; + virtual void SAL_CALL addVetoableChangeListener( const OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override; + virtual void SAL_CALL removeVetoableChangeListener( const OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override; + + // XMultiPropertySet + virtual void SAL_CALL setPropertyValues(const css::uno::Sequence& aPropertyNames, const css::uno::Sequence& aValues) override; + virtual css::uno::Sequence SAL_CALL getPropertyValues(const css::uno::Sequence& aPropertyNames) override; + virtual void SAL_CALL addPropertiesChangeListener(const css::uno::Sequence& aPropertyNames, const css::uno::Reference& xListener) override; + virtual void SAL_CALL removePropertiesChangeListener(const css::uno::Reference& xListener) override; + virtual void SAL_CALL firePropertiesChangeEvent(const css::uno::Sequence& aPropertyNames, const css::uno::Reference& xListener) override; + + // XPropertyState + virtual css::beans::PropertyState SAL_CALL getPropertyState( const OUString& PropertyName ) override; + virtual css::uno::Sequence< css::beans::PropertyState > SAL_CALL getPropertyStates( const css::uno::Sequence< OUString >& aPropertyName ) override; + virtual void SAL_CALL setPropertyToDefault( const OUString& PropertyName ) override; + virtual css::uno::Any SAL_CALL getPropertyDefault( const OUString& aPropertyName ) override; + + // XModifyBroadcaster + virtual void SAL_CALL addModifyListener( const css::uno::Reference< css::util::XModifyListener >& aListener ) override; + virtual void SAL_CALL removeModifyListener( const css::uno::Reference< css::util::XModifyListener >& aListener ) override; + + // XComponent + virtual void SAL_CALL dispose( ) override; + virtual void SAL_CALL addEventListener( const css::uno::Reference< css::lang::XEventListener >& xListener ) override; + virtual void SAL_CALL removeEventListener( const css::uno::Reference< css::lang::XEventListener >& aListener ) override; + + void notifyModifyListener(); + +private: + /// @throws css::uno::RuntimeException + static const SfxItemPropertyMapEntry* getPropertyMapEntry( std::u16string_view rPropertyName ); + + void setPropertyValue_Impl(const OUString& aPropertyName, const css::uno::Any& aValue); + css::uno::Any getPropertyValue_Impl(const OUString& PropertyName); + + virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint) override; + virtual ~SdStyleSheet() override; + + /// @throws css::uno::RuntimeException + void throwIfDisposed(); + + void disposing(); + + OUString msApiName; + rtl::Reference< SfxStyleSheetBasePool > mxPool; + + /** broadcast helper for events */ + ::cppu::OBroadcastHelper mrBHelper; + + std::unique_ptr< ModifyListenerForwarder > mpModifyListenerForwarder; + + SdStyleSheet( const SdStyleSheet& ) = delete; + SdStyleSheet& operator=( const SdStyleSheet& ) = delete; +}; + +typedef std::vector< rtl::Reference< SdStyleSheet > > SdStyleSheetVector; + +struct StyleSheetCopyResult +{ + rtl::Reference m_xStyleSheet; + bool m_bCreatedByCopy; + StyleSheetCopyResult(SdStyleSheet* pStyleSheet, bool bCreatedByCopy) + : m_xStyleSheet(pStyleSheet) + , m_bCreatedByCopy(bCreatedByCopy) + { + } +}; + +typedef std::vector StyleSheetCopyResultVector; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc new file mode 100644 index 000000000..05326f9e4 --- /dev/null +++ b/sd/inc/strings.hrc @@ -0,0 +1,488 @@ +/* -*- 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 . + */ + +#pragma once + +#define NC_(Context, String) TranslateId(Context, reinterpret_cast(u8##String)) +#define NNC_(Context, StringSingular, StringPlural) TranslateNId(Context, reinterpret_cast(u8##StringSingular), reinterpret_cast(u8##StringPlural)) + +#define STR_NULL NC_("STR_NULL", "None") +#define STR_INSERTPAGE NC_("STR_INSERTPAGE", "Insert Slide") +#define STR_INSERTLAYER NC_("STR_INSERTLAYER", "Insert Layer") +#define STR_MODIFYLAYER NC_("STR_MODIFYLAYER", "Modify Layer") +#define STR_UNDO_SLIDE_PARAMS NC_("STR_UNDO_SLIDE_PARAMS", "Slide parameter") +#define STR_UNDO_CUT NC_("STR_UNDO_CUT", "Cut") +#define STR_UNDO_REPLACE NC_("STR_UNDO_REPLACE", "Replace") +#define STR_UNDO_DRAGDROP NC_("STR_UNDO_DRAGDROP", "Drag and Drop") +#define STR_INSERTGRAPHIC NC_("STR_INSERTGRAPHIC", "Insert Image") +#define STR_UNDO_BEZCLOSE NC_("STR_UNDO_BEZCLOSE", "Close Polygon") +#define STR_SLIDE_SORTER_MODE NC_("STR_SLIDE_SORTER_MODE", "Slide Sorter") +#define STR_NORMAL_MODE NC_("STR_NORMAL_MODE", "Normal") +#define STR_SLIDE_MASTER_MODE NC_("STR_SLIDE_MASTER_MODE", "Master Slide") +#define STR_OUTLINE_MODE NC_("STR_OUTLINE_MODE", "Outline") +#define STR_NOTES_MODE NC_("STR_NOTES_MODE", "Notes") +#define STR_NOTES_MASTER_MODE NC_("STR_NOTES_MASTER_MODE", "Master Notes") +#define STR_HANDOUT_MASTER_MODE NC_("STR_HANDOUT_MASTER_MODE", "Master Handout") +#define STR_AUTOLAYOUT_NONE NC_("STR_AUTOLAYOUT_NONE", "Blank Slide") +#define STR_AUTOLAYOUT_ONLY_TITLE NC_("STR_AUTOLAYOUT_ONLY_TITLE", "Title Only") +#define STR_AUTOLAYOUT_ONLY_TEXT NC_("STR_AUTOLAYOUT_ONLY_TEXT", "Centered Text") +#define STR_AUTOLAYOUT_TITLE NC_("STR_AUTOLAYOUT_TITLE", "Title Slide") +#define STR_AUTOLAYOUT_CONTENT NC_("STR_AUTOLAYOUT_CONTENT", "Title, Content") +#define STR_AUTOLAYOUT_2CONTENT NC_("STR_AUTOLAYOUT_2CONTENT", "Title and 2 Content") +#define STR_AUTOLAYOUT_CONTENT_2CONTENT NC_("STR_AUTOLAYOUT_CONTENT_2CONTENT", "Title, Content and 2 Content") +#define STR_AUTOLAYOUT_2CONTENT_CONTENT NC_("STR_AUTOLAYOUT_2CONTENT_CONTENT", "Title, 2 Content and Content") +#define STR_AUTOLAYOUT_2CONTENT_OVER_CONTENT NC_("STR_AUTOLAYOUT_2CONTENT_OVER_CONTENT", "Title, 2 Content over Content") +#define STR_AUTOLAYOUT_CONTENT_OVER_CONTENT NC_("STR_AUTOLAYOUT_CONTENT_OVER_CONTENT", "Title, Content over Content") +#define STR_AUTOLAYOUT_4CONTENT NC_("STR_AUTOLAYOUT_4CONTENT", "Title, 4 Content") +#define STR_AUTOLAYOUT_6CONTENT NC_("STR_AUTOLAYOUT_6CONTENT", "Title, 6 Content") +#define STR_AL_TITLE_VERT_OUTLINE NC_("STR_AL_TITLE_VERT_OUTLINE", "Title, Vertical Text") +#define STR_AL_TITLE_VERT_OUTLINE_CLIPART NC_("STR_AL_TITLE_VERT_OUTLINE_CLIPART", "Title, Vertical Text, Clipart") +#define STR_AL_VERT_TITLE_TEXT_CHART NC_("STR_AL_VERT_TITLE_TEXT_CHART", "Vertical Title, Text, Chart") +#define STR_AL_VERT_TITLE_VERT_OUTLINE NC_("STR_AL_VERT_TITLE_VERT_OUTLINE", "Vertical Title, Vertical Text") +#define STR_AUTOLAYOUT_HANDOUT1 NC_("STR_AUTOLAYOUT_HANDOUT1", "One Slide") +#define STR_AUTOLAYOUT_HANDOUT2 NC_("STR_AUTOLAYOUT_HANDOUT2", "Two Slides") +#define STR_AUTOLAYOUT_HANDOUT3 NC_("STR_AUTOLAYOUT_HANDOUT3", "Three Slides") +#define STR_AUTOLAYOUT_HANDOUT4 NC_("STR_AUTOLAYOUT_HANDOUT4", "Four Slides") +#define STR_AUTOLAYOUT_HANDOUT6 NC_("STR_AUTOLAYOUT_HANDOUT6", "Six Slides") +#define STR_AUTOLAYOUT_HANDOUT9 NC_("STR_AUTOLAYOUT_HANDOUT9", "Nine Slides") +#define STR_AUTOLAYOUT_NOTES NC_("STR_AUTOLAYOUT_NOTES", "Notes") +#define STR_TRANSFORM NC_("STR_TRANSFORM", "Transform") +#define STR_LINEEND NC_("STR_LINEEND", "Line Ends") +#define STR_DESC_LINEEND NC_("STR_DESC_LINEEND", "Please enter a name for the new arrow style:") +#define STR_WARN_NAME_DUPLICATE NC_("STR_WARN_NAME_DUPLICATE", "The name chosen already exists. \nPlease enter another name.") +#define STR_UNDO_ANIMATION NC_("STR_UNDO_ANIMATION", "Animation parameters") +#define STR_UNDO_COPYOBJECTS NC_("STR_UNDO_COPYOBJECTS", "Duplicate") +#define STR_TITLE_NAMEGROUP NC_("STR_TITLE_NAMEGROUP", "Name Object") +#define STR_DESC_NAMEGROUP NC_("STR_DESC_NAMEGROUP", "Name") +#define STR_WARN_PAGE_EXISTS NC_("STR_WARN_PAGE_EXISTS", "The slide name already exists or is invalid. Please enter another name.") +#define STR_WARN_PAGE_EXISTS_DRAW NC_("STR_WARN_PAGE_EXISTS_DRAW", "The page name already exists or is invalid. Please enter another name.") +#define STR_SNAPDLG_SETLINE NC_("STR_SNAPDLG_SETLINE", "Edit Snap Line") +#define STR_SNAPDLG_SETPOINT NC_("STR_SNAPDLG_SETPOINT", "Edit Snap Point") +#define STR_POPUP_EDIT_SNAPLINE NC_("STR_POPUP_EDIT_SNAPLINE", "Edit Snap Line...") +#define STR_POPUP_EDIT_SNAPPOINT NC_("STR_POPUP_EDIT_SNAPPOINT", "Edit Snap Point...") +#define STR_POPUP_DELETE_SNAPLINE NC_("STR_POPUP_DELETE_SNAPLINE", "Delete Snap Line") +#define STR_POPUP_DELETE_SNAPPOINT NC_("STR_POPUP_DELETE_SNAPPOINT", "Delete Snap Point") +#define STR_IMPRESS NC_("STR_IMPRESS", "StarImpress 4.0") +#define STR_LAYER NC_("STR_LAYER", "Layer") +#define STR_UNDO_DELETEPAGES NC_("STR_UNDO_DELETEPAGES", "Delete slides") +#define STR_UNDO_DELETEPAGES_DRAW NC_("STR_UNDO_DELETEPAGES_DRAW", "Delete pages") +#define STR_UNDO_INSERTPAGES NC_("STR_UNDO_INSERTPAGES", "Insert slides") +#define STR_ASK_DELETE_LAYER NC_("STR_ASK_DELETE_LAYER", "Are you sure you want to delete the layer \"$\"?\nNote: All objects on this layer will be deleted!") +#define STR_ASK_DELETE_ALL_PICTURES NC_("STR_ASK_DELETE_ALL_PICTURES", "Do you really want to delete all images?") +#define STR_UNDO_CHANGE_TITLE_AND_LAYOUT NC_("STR_UNDO_CHANGE_TITLE_AND_LAYOUT", "Modify title and outline") +#define STR_WAV_FILE NC_("STR_WAV_FILE", "Audio") +#define STR_MIDI_FILE NC_("STR_MIDI_FILE", "MIDI") +#define STR_AU_FILE NC_("STR_AU_FILE", "Sun/NeXT Audio") +#define STR_VOC_FILE NC_("STR_VOC_FILE", "Creative Labs Audio") +#define STR_AIFF_FILE NC_("STR_AIFF_FILE", "Apple/SGI Audio") +#define STR_SVX_FILE NC_("STR_SVX_FILE", "Amiga SVX Audio") +#define STR_SD_PAGE NC_("STR_SD_PAGE", "Slide") +#define STR_SD_PAGE_COUNT NC_("STR_SD_PAGE_COUNT", "Slide %1 of %2") +#define STR_SD_PAGE_COUNT_CUSTOM NC_("STR_SD_PAGE_COUNT_CUSTOM", "Slide %1 of %2 (%3)") +#define STR_ALL_SUPPORTED_FORMATS NC_("STR_ALL_SUPPORTED_FORMATS", "All supported formats") +#define STR_ALL_FILES NC_("STR_ALL_FILES", "All files") +#define STR_UNDO_INSERT_TEXTFRAME NC_("STR_UNDO_INSERT_TEXTFRAME", "Insert text frame") +#define STR_ACTION_NOTPOSSIBLE NC_("STR_ACTION_NOTPOSSIBLE", "This function cannot be run \nwith the selected objects.") +#define STR_DLG_INSERT_PAGES_FROM_FILE NC_("STR_DLG_INSERT_PAGES_FROM_FILE", "Insert File") +#define STR_READ_DATA_ERROR NC_("STR_READ_DATA_ERROR", "The file could not be loaded!") +#define STR_SCALE_OBJECTS NC_("STR_SCALE_OBJECTS", "The page size of the target document is different than the source document.\n\nDo you want to scale the copied objects to fit the new page size?") +#define STR_SCALE_TOOLTIP NC_("STR_SCALE_TOOLTIP", "Scaling factor of the document; right-click to change.") +#define STR_CREATE_PAGES NC_("STR_CREATE_PAGES", "Create Slides") +#define STR_UNDO_CHANGE_PAGEFORMAT NC_("STR_UNDO_CHANGE_PAGEFORMAT", "Modify page format") +#define STR_UNDO_CHANGE_PAGEBORDER NC_("STR_UNDO_CHANGE_PAGEBORDER", "Modify page margins") +#define STR_EDIT_OBJ NC_("STR_EDIT_OBJ", "~Edit") +#define STR_DELETE_PAGES NC_("STR_DELETE_PAGES", "Delete Slides") +#define STR_WARN_PRINTFORMAT_FAILURE NC_("STR_WARN_PRINTFORMAT_FAILURE", "The document format could not be set on the specified printer.") +#define STR_IMPORT_GRFILTER_OPENERROR NC_("STR_IMPORT_GRFILTER_OPENERROR", "Image file cannot be opened") +#define STR_IMPORT_GRFILTER_IOERROR NC_("STR_IMPORT_GRFILTER_IOERROR", "Image file cannot be read") +#define STR_IMPORT_GRFILTER_FORMATERROR NC_("STR_IMPORT_GRFILTER_FORMATERROR", "Unknown image format") +#define STR_IMPORT_GRFILTER_VERSIONERROR NC_("STR_IMPORT_GRFILTER_VERSIONERROR", "This image file version is not supported") +#define STR_IMPORT_GRFILTER_FILTERERROR NC_("STR_IMPORT_GRFILTER_FILTERERROR", "Image filter not found") +#define STR_IMPORT_GRFILTER_TOOBIG NC_("STR_IMPORT_GRFILTER_TOOBIG", "Not enough memory to import image") +#define STR_OBJECTS NC_("STR_OBJECTS", "Objects") +#define STR_END_SPELLING NC_("STR_END_SPELLING", "Spellcheck of entire document has been completed.") +#define STR_END_SPELLING_OBJ NC_("STR_END_SPELLING_OBJ", "The spellcheck for the selected objects has been completed.") +#define STR_ASK_FOR_CONVERT_TO_BEZIER NC_("STR_ASK_FOR_CONVERT_TO_BEZIER", "Convert selected object to curve?") +#define STR_UNDO_CHANGE_PRES_OBJECT NC_("STR_UNDO_CHANGE_PRES_OBJECT", "Modify presentation object '$'") +#define STR_UNDO_MODIFY_PAGE NC_("STR_UNDO_MODIFY_PAGE", "Slide layout") +#define STR_UNDO_MODIFY_PAGE_DRAW NC_("STR_UNDO_MODIFY_PAGE_DRAW", "Page layout") +#define STR_UNDO_INSERT_FILE NC_("STR_UNDO_INSERT_FILE", "Insert file") +#define STR_UNDO_INSERT_SPECCHAR NC_("STR_UNDO_INSERT_SPECCHAR", "Insert special character") +#define STR_UNDO_SET_PRESLAYOUT NC_("STR_UNDO_SET_PRESLAYOUT", "Apply presentation layout") +#define STR_PLAY NC_("STR_PLAY", "~Play") +#define STR_STOP NC_("STR_STOP", "Sto~p") +#define STR_UNDO_ORIGINALSIZE NC_("STR_UNDO_ORIGINALSIZE", "Original Size") +#define STR_WARN_SCALE_FAIL NC_("STR_WARN_SCALE_FAIL", "The specified scale is invalid.\nDo you want to enter a new one?") +#define STR_CLICK_ACTION_NONE NC_("STR_CLICK_ACTION_NONE", "No action") +#define STR_CLICK_ACTION_PREVPAGE NC_("STR_CLICK_ACTION_PREVPAGE", "Go to previous slide") +#define STR_CLICK_ACTION_NEXTPAGE NC_("STR_CLICK_ACTION_NEXTPAGE", "Go to next slide") +#define STR_CLICK_ACTION_FIRSTPAGE NC_("STR_CLICK_ACTION_FIRSTPAGE", "Go to first slide") +#define STR_CLICK_ACTION_LASTPAGE NC_("STR_CLICK_ACTION_LASTPAGE", "Go to last slide") +#define STR_CLICK_ACTION_BOOKMARK NC_("STR_CLICK_ACTION_BOOKMARK", "Go to page or object") +#define STR_CLICK_ACTION_DOCUMENT NC_("STR_CLICK_ACTION_DOCUMENT", "Go to document") +#define STR_CLICK_ACTION_SOUND NC_("STR_CLICK_ACTION_SOUND", "Play audio") +#define STR_CLICK_ACTION_VERB NC_("STR_CLICK_ACTION_VERB", "Start object action") +#define STR_CLICK_ACTION_PROGRAM NC_("STR_CLICK_ACTION_PROGRAM", "Run program") +#define STR_CLICK_ACTION_MACRO NC_("STR_CLICK_ACTION_MACRO", "Run macro") +#define STR_CLICK_ACTION_STOPPRESENTATION NC_("STR_CLICK_ACTION_STOPPRESENTATION", "Exit presentation") +#define STR_EFFECTDLG_JUMP NC_("STR_EFFECTDLG_JUMP", "Target") +#define STR_EFFECTDLG_ACTION NC_("STR_EFFECTDLG_ACTION", "Act~ion") +#define STR_EFFECTDLG_SOUND NC_("STR_EFFECTDLG_SOUND", "Audio") +#define STR_EFFECTDLG_PAGE_OBJECT NC_("STR_EFFECTDLG_PAGE_OBJECT", "Slide / Object") +#define STR_EFFECTDLG_DOCUMENT NC_("STR_EFFECTDLG_DOCUMENT", "Document") +#define STR_EFFECTDLG_PROGRAM NC_("STR_EFFECTDLG_PROGRAM", "Program") +#define STR_EFFECTDLG_MACRO NC_("STR_EFFECTDLG_MACRO", "Macro") +#define STR_FULLSCREEN_SLIDESHOW NC_("STR_FULLSCREEN_SLIDESHOW", "Presenting: %s") + +// To translators: this is the spinbutton in the slidesorter toolbar to set the number of slides to show per row +#define STR_SLIDES NNC_("STR_SLIDES", "%1 slide", "%1 slides") + +// Strings for animation effects +#define STR_INSERT_TEXT NC_("STR_INSERT_TEXT", "Insert Text") +#define STR_LOAD_PRESENTATION_LAYOUT NC_("STR_LOAD_PRESENTATION_LAYOUT", "Load Master Slide") +#define STR_GLUE_ESCDIR_SMART NC_("STR_GLUE_ESCDIR_SMART", "Smart") +#define STR_GLUE_ESCDIR_LEFT NC_("STR_GLUE_ESCDIR_LEFT", "Left") +#define STR_GLUE_ESCDIR_RIGHT NC_("STR_GLUE_ESCDIR_RIGHT", "Right") +#define STR_GLUE_ESCDIR_TOP NC_("STR_GLUE_ESCDIR_TOP", "Top") +#define STR_GLUE_ESCDIR_BOTTOM NC_("STR_GLUE_ESCDIR_BOTTOM", "Bottom") +#define STR_GLUE_ESCDIR_LO NC_("STR_GLUE_ESCDIR_LO", "Top Left?") +#define STR_GLUE_ESCDIR_LU NC_("STR_GLUE_ESCDIR_LU", "Bottom Left?") +#define STR_GLUE_ESCDIR_RO NC_("STR_GLUE_ESCDIR_RO", "Top Right?") +#define STR_GLUE_ESCDIR_RU NC_("STR_GLUE_ESCDIR_RU", "Bottom Right?") +#define STR_GLUE_ESCDIR_HORZ NC_("STR_GLUE_ESCDIR_HORZ", "Horizontal") +#define STR_GLUE_ESCDIR_VERT NC_("STR_GLUE_ESCDIR_VERT", "Vertical") +#define STR_GLUE_ESCDIR_ALL NC_("STR_GLUE_ESCDIR_ALL", "All?") +#define STR_CANT_PERFORM_IN_LIVEMODE NC_("STR_CANT_PERFORM_IN_LIVEMODE", "This action can't be run in the live mode.") +#define STR_PUBLISH_BACK NC_("STR_PUBLISH_BACK", "Back") +#define STR_PUBLISH_NEXT NC_("STR_PUBLISH_NEXT", "Continue") +#define STR_PUBLISH_OUTLINE NC_("STR_PUBLISH_OUTLINE", "Overview") +#define STR_EYEDROPPER NC_("STR_EYEDROPPER", "Color Replacer") +#define STR_UNDO_MORPHING NC_("STR_UNDO_MORPHING", "Cross-fading") +#define STR_UNDO_EXPAND_PAGE NC_("STR_UNDO_EXPAND_PAGE", "Expand Slide") +#define STR_UNDO_SUMMARY_PAGE NC_("STR_UNDO_SUMMARY_PAGE", "Table of Contents Slide") +#define STR_TWAIN_NO_SOURCE_UNX NC_("STR_TWAIN_NO_SOURCE_UNX", "No SANE source is available at the moment.") +#define STR_TWAIN_NO_SOURCE NC_("STR_TWAIN_NO_SOURCE", "At present, no TWAIN source is available.") +#define STR_FIX NC_("STR_FIX", "Fixed") +#define STR_VAR NC_("STR_VAR", "Variable") +#define STR_STANDARD_NORMAL NC_("STR_STANDARD_NORMAL", "Standard") +#define STR_STANDARD_SMALL NC_("STR_STANDARD_SMALL", "Standard (short)") +#define STR_STANDARD_BIG NC_("STR_STANDARD_BIG", "Standard (long)") +#define STR_FILEFORMAT_NAME_EXT NC_("STR_FILEFORMAT_NAME_EXT", "File name") +#define STR_FILEFORMAT_FULLPATH NC_("STR_FILEFORMAT_FULLPATH", "Path/File name") +#define STR_FILEFORMAT_PATH NC_("STR_FILEFORMAT_PATH", "Path") +#define STR_FILEFORMAT_NAME NC_("STR_FILEFORMAT_NAME", "File name without extension") +#define STR_NEW_CUSTOMSHOW NC_("STR_NEW_CUSTOMSHOW", "New Custom Slide Show") +#define STR_COPY_CUSTOMSHOW NC_("STR_COPY_CUSTOMSHOW", "Copy ") +#define STR_IMPRESS_DOCUMENT_FULLTYPE_60 NC_("STR_IMPRESS_DOCUMENT_FULLTYPE_60", "%PRODUCTNAME Presentation format (Impress 6)") +#define STR_GRAPHIC_DOCUMENT_FULLTYPE_60 NC_("STR_GRAPHIC_DOCUMENT_FULLTYPE_60", "%PRODUCTNAME Drawing format (Draw 6)") +#define STR_BREAK_METAFILE NC_("STR_BREAK_METAFILE", "Ungroup Metafile(s)...") +#define STR_BREAK_FAIL NC_("STR_BREAK_FAIL", "It was not possible to ungroup all drawing objects.") +#define STR_IMPRESS_DOCUMENT_FULLTYPE_80 NC_("STR_IMPRESS_DOCUMENT_FULLTYPE_80", "%PRODUCTNAME %PRODUCTVERSION Presentation") +#define STR_GRAPHIC_DOCUMENT_FULLTYPE_80 NC_("STR_GRAPHIC_DOCUMENT_FULLTYPE_80", "%PRODUCTNAME %PRODUCTVERSION Drawing") + +// HtmlExport +#define STR_PUBDLG_SAMENAME NC_("STR_PUBDLG_SAMENAME", "A design already exists with this name.\nDo you want to replace it?") +#define STR_HTMLATTR_TEXT NC_("STR_HTMLATTR_TEXT", "Text") +#define STR_HTMLATTR_LINK NC_("STR_HTMLATTR_LINK", "Hyperlink") +#define STR_HTMLATTR_VLINK NC_("STR_HTMLATTR_VLINK", "Visited link") +#define STR_HTMLATTR_ALINK NC_("STR_HTMLATTR_ALINK", "Active link") +#define STR_HTMLEXP_NOTES NC_("STR_HTMLEXP_NOTES", "Notes") +#define STR_HTMLEXP_CONTENTS NC_("STR_HTMLEXP_CONTENTS", "Table of contents") +#define STR_HTMLEXP_CLICKSTART NC_("STR_HTMLEXP_CLICKSTART", "Click here to start") +#define STR_HTMLEXP_AUTHOR NC_("STR_HTMLEXP_AUTHOR", "Author") +#define STR_HTMLEXP_EMAIL NC_("STR_HTMLEXP_EMAIL", "Email") +#define STR_HTMLEXP_HOMEPAGE NC_("STR_HTMLEXP_HOMEPAGE", "Homepage") +#define STR_HTMLEXP_INFO NC_("STR_HTMLEXP_INFO", "Further information") +#define STR_HTMLEXP_DOWNLOAD NC_("STR_HTMLEXP_DOWNLOAD", "Download presentation") +#define STR_HTMLEXP_NOFRAMES NC_("STR_HTMLEXP_NOFRAMES", "Unfortunately your browser does not support floating frames.") +#define STR_HTMLEXP_FIRSTPAGE NC_("STR_HTMLEXP_FIRSTPAGE", "First page") +#define STR_HTMLEXP_LASTPAGE NC_("STR_HTMLEXP_LASTPAGE", "Last page") +#define STR_HTMLEXP_SETTEXT NC_("STR_HTMLEXP_SETTEXT", "Text") +#define STR_HTMLEXP_SETGRAPHIC NC_("STR_HTMLEXP_SETGRAPHIC", "Image") +#define STR_HTMLEXP_OUTLINE NC_("STR_HTMLEXP_OUTLINE", "With contents") +#define STR_HTMLEXP_NOOUTLINE NC_("STR_HTMLEXP_NOOUTLINE", "Without contents") +#define STR_WEBVIEW_SAVE NC_("STR_WEBVIEW_SAVE", "To given page") +#define STR_UNDO_VECTORIZE NC_("STR_UNDO_VECTORIZE", "Convert bitmap to polygon" ) +#define STR_PRES_SOFTEND NC_("STR_PRES_SOFTEND", "Click to exit presentation..." ) +#define STR_PRES_PAUSE NC_("STR_PRES_PAUSE", "Pause..." ) +#define STR_UNDO_APPLY_3D_FAVOURITE NC_("STR_UNDO_APPLY_3D_FAVOURITE", "Apply 3D favorite") +#define STR_UNDO_GRAFFILTER NC_("STR_UNDO_GRAFFILTER", "Image filter" ) +#define STR_WARNING_NOSOUNDFILE NC_("STR_WARNING_NOSOUNDFILE", "The file %\nis not a valid audio file !" ) +#define STR_UNDO_CONVERT_TO_METAFILE NC_("STR_UNDO_CONVERT_TO_METAFILE", "Convert to metafile" ) +#define STR_UNDO_CONVERT_TO_BITMAP NC_("STR_UNDO_CONVERT_TO_BITMAP", "Convert to bitmap") +#define STR_HTMLEXP_ERROR_CREATE_FILE NC_("STR_HTMLEXP_ERROR_CREATE_FILE", "Cannot create the file $(URL1).") +#define STR_HTMLEXP_ERROR_OPEN_FILE NC_("STR_HTMLEXP_ERROR_OPEN_FILE", "Could not open the file $(URL1).") +#define STR_HTMLEXP_ERROR_COPY_FILE NC_("STR_HTMLEXP_ERROR_COPY_FILE", "The file $(URL1) could not be copied to $(URL2)") +#define STR_STATUSBAR_MASTERPAGE NC_("STR_STATUSBAR_MASTERPAGE", "Slide Master name. Right-click for list or click for dialog.") +#define STR_TITLE_RENAMESLIDE NC_("STR_TITLE_RENAMESLIDE", "Rename Slide") +#define STR_TITLE_RENAMEPAGE NC_("STR_TITLE_RENAMEPAGE", "Rename Page") +#define STR_TOOLTIP_RENAME NC_("STR_TOOLTIP_RENAME", "Duplicate or empty names are not possible") +#define STR_DESC_RENAMESLIDE NC_("STR_DESC_RENAMESLIDE", "Name") +#define STR_TITLE_RENAMEMASTER NC_("STR_TITLE_RENAMEMASTER", "Rename Master Slide") +#define STR_PLACEHOLDER_DESCRIPTION_TITLE NC_("STR_PLACEHOLDER_DESCRIPTION_TITLE", "Title Area for AutoLayouts" ) +#define STR_PLACEHOLDER_DESCRIPTION_OUTLINE NC_("STR_PLACEHOLDER_DESCRIPTION_OUTLINE", "Object Area for AutoLayouts" ) +#define STR_PLACEHOLDER_DESCRIPTION_FOOTER NC_("STR_PLACEHOLDER_DESCRIPTION_FOOTER", "Footer Area" ) +#define STR_PLACEHOLDER_DESCRIPTION_HEADER NC_("STR_PLACEHOLDER_DESCRIPTION_HEADER", "Header Area" ) +#define STR_PLACEHOLDER_DESCRIPTION_DATETIME NC_("STR_PLACEHOLDER_DESCRIPTION_DATETIME", "Date Area" ) +#define STR_PLACEHOLDER_DESCRIPTION_SLIDE NC_("STR_PLACEHOLDER_DESCRIPTION_SLIDE", "Slide Number Area" ) +#define STR_PLACEHOLDER_DESCRIPTION_NUMBER NC_("STR_PLACEHOLDER_DESCRIPTION_NUMBER", "Page Number Area" ) +#define STR_FIELD_PLACEHOLDER_HEADER NC_("STR_FIELD_PLACEHOLDER_HEADER", "
    " ) +#define STR_FIELD_PLACEHOLDER_FOOTER NC_("STR_FIELD_PLACEHOLDER_FOOTER", "