diff options
Diffstat (limited to 'sd/inc')
74 files changed, 8755 insertions, 0 deletions
diff --git a/sd/inc/Annotation.hxx b/sd/inc/Annotation.hxx new file mode 100644 index 0000000000..c09f677032 --- /dev/null +++ b/sd/inc/Annotation.hxx @@ -0,0 +1,164 @@ +/* -*- 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 <sal/config.h> +#include <sal/types.h> +#include <memory> + +#include <com/sun/star/office/XAnnotation.hpp> +#include <cppuhelper/basemutex.hxx> +#include <cppuhelper/compbase.hxx> +#include <cppuhelper/propertysetmixin.hxx> + +#include "sdpage.hxx" +#include "textapi.hxx" +#include "sddllapi.h" + +#include <basegfx/polygon/b2dpolygon.hxx> +#include <tools/color.hxx> + +class SdrUndoAction; + +namespace com::sun::star::office { + class XAnnotation; +} + +namespace com::sun::star::uno { template <typename > class Reference; } + +class SfxViewShell; + +namespace sd { + +enum class CommentNotificationType { Add, Modify, Remove }; + +void createAnnotation( rtl::Reference< Annotation >& xAnnotation, SdPage* pPage ); + +std::unique_ptr<SdrUndoAction> 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 <css::office::XAnnotation>& xAnnotation); + +const SdPage* getAnnotationPage(const css::uno::Reference<css::office::XAnnotation>& xAnnotation); + +void LOKCommentNotify(CommentNotificationType nType, const SfxViewShell* pViewShell, + css::uno::Reference<css::office::XAnnotation> const & rxAnnotation); + +void LOKCommentNotifyAll(CommentNotificationType nType, + css::uno::Reference<css::office::XAnnotation> const & rxAnnotation); + +struct SD_DLLPUBLIC CustomAnnotationMarker +{ + Color maLineColor; + Color maFillColor; + float mnLineWidth; + std::vector<basegfx::B2DPolygon> maPolygons; +}; + +class SD_DLLPUBLIC Annotation final : private ::cppu::BaseMutex, + public ::cppu::WeakComponentImplHelper<css::office::XAnnotation>, + public ::cppu::PropertySetMixin<css::office::XAnnotation> +{ +public: + explicit Annotation( const css::uno::Reference<css::uno::XComponentContext>& 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<css::office::XAnnotation>::acquire(); } + virtual void SAL_CALL release() noexcept override { ::cppu::WeakComponentImplHelper<css::office::XAnnotation>::release(); } + + // css::beans::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; + + // 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<css::text::XText> SAL_CALL getTextRange() override; + + void createChangeUndo(); + + void createCustomAnnotationMarker() + { + m_pCustomAnnotationMarker = std::make_unique<CustomAnnotationMarker>(); + } + + CustomAnnotationMarker& getCustomAnnotationMarker() + { + return *m_pCustomAnnotationMarker; + } + + bool hasCustomAnnotationMarker() const + { + return bool(m_pCustomAnnotationMarker); + } + + void setIsFreeText(bool value) { m_bIsFreeText = value; } + + bool isFreeText() const { return m_bIsFreeText; } + +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<TextApiObject> m_TextRange; + + std::unique_ptr<CustomAnnotationMarker> m_pCustomAnnotationMarker; + bool m_bIsFreeText; +}; + +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/AnnotationEnumeration.hxx b/sd/inc/AnnotationEnumeration.hxx new file mode 100644 index 0000000000..ed35b46b40 --- /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 <sal/config.h> + +#include "sdpage.hxx" + +namespace com::sun::star::office +{ +class XAnnotationEnumeration; +} + +namespace sd +{ +css::uno::Reference<css::office::XAnnotationEnumeration> +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 0000000000..5cc71b0e69 --- /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 <com/sun/star/animations/XAnimationNode.hpp> + +class SdPage; + +namespace sd +{ +css::uno::Reference<css::animations::XAnimationNode> +Clone(const css::uno::Reference<css::animations::XAnimationNode>& 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 0000000000..e6d1530fb4 --- /dev/null +++ b/sd/inc/CustomAnimationEffect.hxx @@ -0,0 +1,455 @@ +/* -*- 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 <com/sun/star/animations/XAnimationNode.hpp> +#include <com/sun/star/animations/XTimeContainer.hpp> +#include <com/sun/star/animations/XAudio.hpp> +#include <com/sun/star/drawing/XShape.hpp> +#include <com/sun/star/util/XChangesListener.hpp> +#include <rtl/ref.hxx> +#include <vcl/timer.hxx> +#include <tools/long.hxx> +#include "sddllapi.h" +#include <list> +#include <vector> +#include <map> +#include <memory> + +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<sal_Int32>* 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 rtl::Reference<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( 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( 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 0000000000..c262ad0595 --- /dev/null +++ b/sd/inc/CustomAnimationPreset.hxx @@ -0,0 +1,143 @@ +/* -*- 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 <sal/config.h> + +#include <utility> +#include <vector> + +#include <com/sun/star/lang/XMultiServiceFactory.hpp> + +#include "CustomAnimationEffect.hxx" + +#include <unordered_map> + +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<OUString> getSubTypes(); + std::vector<OUString> 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<OUString, CustomAnimationPresetPtr> EffectDescriptorMap; +typedef std::vector< CustomAnimationPresetPtr > EffectDescriptorList; + +struct PresetCategory +{ + OUString maLabel; + EffectDescriptorList maEffects; + + PresetCategory( OUString aLabel, EffectDescriptorList&& rEffects ) + : maLabel(std::move( aLabel )), 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<OUString, CustomAnimationPresets> 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 0000000000..9cc79e7831 --- /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 <unotools/resmgr.hxx> + +#define NC_(Context, String) TranslateId(Context, 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 0000000000..e6e5f9fac3 --- /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 <com/sun/star/presentation/AnimationEffect.hpp> +#include <com/sun/star/presentation/AnimationSpeed.hpp> +#include <com/sun/star/presentation/FadeEffect.hpp> + +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 0000000000..cc257b20a9 --- /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 <sfx2/shell.hxx> + +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 0000000000..8d00cfbbba --- /dev/null +++ b/sd/inc/Outliner.hxx @@ -0,0 +1,535 @@ +/* -*- 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 <svx/svdoutl.hxx> +#include "pres.hxx" +#include "OutlinerIterator.hxx" +#include <editeng/SpellPortions.hxx> +#include <memory> +#include <utility> + +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, OString aRectangles) + : m_nPage(nPage) + , m_aRectangles(std::move(aRectangles)) + { + } + + 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. + + <p>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).</p> + + <p>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.<br> + 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: + <ol> + <li>draw pages of draw mode</li> + <li>master pages of draw mode</li> + <li>draw pages of notes mode</li> + <li>master pages of notes mode</li> + <li>draw pages of handout mode</li> + <li>master pages of handout mode</li> + </ol> + 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 <em>replace all</em> 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).</p> + + <p>The start position is restored after finishing spell checking or + replacing all matches in a document.</p> + + <p>Some related pieces of information: + The search dialog (<type>SvxSearchDialog</type>) can be controlled in + more than one way: + <ul><li>A set of option flags returned by the slot call + SID_SEARCH_OPTIONS handled by the + <member>SdDrawDocument::GetState()</member> method.</li> + <li>The contents of the search item of type + <type>SvxSearchItem</type>.</li> + <li>The <member>HasSelection()</member> 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. + </p> +*/ +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 <const>OutlinerMode::DontKnow</const>, + <const>OutlinerMode::TextObject</const>, + <const>OutlinerMode::TitleObject</const>, + <const>OutlinerMode::OutlineObject</const>, and + <const>OutlinerMode::OutlineView</const> 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 </sal_True> when the search/replace is finished (as + indicated by user input to the search dialog). A </sal_False> 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<Implementation> 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 </sal_False> only when starting from the beginning/end of the + document. When reaching the end/beginning with it still be set to + </sal_False> 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 <TRUE/> value indicates that the end of the find&replace or spell + check has been reached. + */ + bool mbEndOfSearch; + + /** Set to <TRUE/> when an object has been prepared successfully for + searching/spell checking. This flag directs the internal iteration + which stops when set to </sal_True>. + */ + 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<unotools::WeakReference<SdrObject>> maMarkListCopy; + + /** Current object that may be a text object. The object pointer to + corresponds to <member>mnObjIndex</member>. While iterating over the + objects on a page <member>mpObj</member> will point to every object + while <member>mpTextObj</member> 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 <member>mpTextObj</member>. + 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 + <member>SearchAndReplaceAll</member> method is called. + */ + std::unique_ptr<const SvxSearchItem> 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 (</sal_True>) or + another call to this method is required (</sal_False>). + */ + bool SearchAndReplaceOnce(std::vector<::sd::SearchSelection>* pSelections = nullptr); + + void sendLOKSearchResultCallback(const std::shared_ptr<sd::ViewShell>& pViewShell, + const OutlinerView* pOutlinerView, + std::vector<sd::SearchSelection>* pSelections); + + /** Detect changes of the document or view and react accordingly. Such + changes may occur because different calls to + <member>SearchAndReplace()</member> 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 <TRUE/> 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 + <member>RememberStartPositiony</member>. + */ + 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 <member>mbEndOfSearch</member> flag + back to </sal_False>. 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 <member>mbEndOfSearch</member> to <TRUE/>. + */ + 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 + <member>mnPage</member> index. Master page mode is specified by + <member>meEditMode</member>. + @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 </True> when there is no previous match and </False> + 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 <type>SdrObject</type> object and + contains the view and page where it is located. + @return + Return a pointer to the <type>SdrObject</type>. + */ + 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 <TRUE/> to indicate that another call to this method is + required. When all text objects have been processed then + <FALSE/> 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 0000000000..e65efbbb86 --- /dev/null +++ b/sd/inc/OutlinerIterator.hxx @@ -0,0 +1,315 @@ +/* -*- 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 <svx/svdobj.hxx> +#include <unotools/weakref.hxx> + +#include "pres.hxx" +#include <sal/types.h> +#include <memory> +#include <vector> + +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 + <ul><li><const>BEGIN</const> for the first object with reference to + iteration direction.</li> + <li>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.</li> + <li>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.</li></ul> +*/ +enum IteratorLocation {BEGIN,END,CURRENT}; + +/** This iterator can be used to iterate over all <type>SdrObject</type> + objects of one of three set denoted by the <type>IteratorType</type>: + <ul><li>All objects of the current mark list (selection) + (type==SELECTION).</li> + <li>All objects in the current view (type==SINGLE_VIEW).</li> + <li>All objects in all views (type=DOCUMENT).</li></ul> + + <p>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 + <type>IteratorPosition</type> as returned by the + <member>operator*()</member> method and set view, visible page, and + selection/edit mode markers to reflect this position.</p> + + <p>A simple forward iteration from the first to the last object would + instantiate the iterator with + <code>Iterator(pDocument,pViewShell,true,BEGIN)</code> for some document + and view shell. This iterator can then be compared against + <code>Iterator(pDocument,pViewShell,true,END)</code>. On equality the + iteration should be stopped without evaluating the iterator: The position + of an end iterator is not valid.</p> +*/ +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<IteratorImplBase> 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 <TRUE/> 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 <TRUE/> 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<IteratorImplBase> mxIterator; +}; + +/** This class wraps the <type>SdOutliner</type> class and represents it as + a container of <type>SdrObject</type> 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. + + <p>The direction of the returned iterators depends on the underlying + <type>SdOutliner</type> object and is usually set in the search + dialog.</p> +*/ +class OutlinerContainer +{ +public: + /** Create a new wrapper object for the given outliner. + @param pOutliner + The outliner that is represented by the new object as + <type>SdrObject</type> 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 + <member>mpOutliner</member> 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 + <member>CreateSelectionIterator()</member>, + */ + Iterator CreateIterator (IteratorLocation aLocation); + + /** Create an iterator that iterates over all currently selected + <type>SdrObjects</type> objects of the <member>mpOutliner</member> + 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<::unotools::WeakReference<SdrObject>>& rObjectList, + SdDrawDocument* pDocument, + const std::shared_ptr<ViewShell>& rpViewShell, + bool bDirectionIsForward, + IteratorLocation aLocation); + + /** Create an iterator that iterates over all <type>SdrObjects</type> + objects of the <member>mpOutliner</member> 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<ViewShell>& 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<ViewShell>& 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 <type>SdrObject</type> 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 + <TRUE/> 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 <type>SdrObject</type> object. + ::unotools::WeakReference<SdrObject> mxObject; + + /// Number of the actual SdrText from the current <type>SdrObject</type> + 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 0000000000..ef944e5933 --- /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 0000000000..0075e32057 --- /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 <com/sun/star/lang/XMultiServiceFactory.hpp> + +#include <vector> +#include <map> +#include <memory> +#include <unordered_map> + +namespace com::sun::star { + namespace animations { class XAnimationNode; } + namespace uno { template<class X> 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<OUString, TransitionPresetList> 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 0000000000..e6f978ca27 --- /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 <vcl/VectorGraphicSearch.hxx> + +namespace sd +{ +struct VectorGraphicSearchContext +{ + bool mbCurrentIsVectorGraphic; + std::unique_ptr<VectorGraphicSearch> 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 0000000000..c3edfdac6e --- /dev/null +++ b/sd/inc/animations.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 "sddllapi.h" + +#include <com/sun/star/uno/Reference.hxx> +#include <utility> + +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( css::uno::Reference< css::animations::XAnimationNode > xNode, css::uno::Reference< css::animations::XAnimationNode > xMaster, bool bOnNextEffect ) + : mxNode(std::move( xNode )), mxMaster(std::move( 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 0000000000..8abc54c90d --- /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 <com/sun/star/presentation/AnimationEffect.hpp> +#include <com/sun/star/presentation/AnimationSpeed.hpp> +#include <com/sun/star/presentation/ClickAction.hpp> +#include "pres.hxx" +#include <svx/svdobj.hxx> +#include <tools/color.hxx> +#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<SdrObjUserData> 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 0000000000..e275e46882 --- /dev/null +++ b/sd/inc/app.hrc @@ -0,0 +1,456 @@ +/* -*- 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 <svl/solar.hrc> + +// 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 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) +#define SID_TOGGLELAYERVISIBILITY (SID_SD_START+48) + // 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<SfxBoolItem>(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 TypedWhichId<SfxStringItem>(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 TypedWhichId<SfxStringItem>(SID_SD_START+85) +#define SID_STATUS_PAGE TypedWhichId<SfxStringItem>(SID_SD_START+86) +#define SID_STATUS_LAYOUT TypedWhichId<SfxStringItem>(SID_SD_START+87) +#define SID_STATUS_SELMODE (SID_SD_START+88) +// In sfxsids.hrc: SID_MODIFIED TypedWhichId<SfxBoolItem>(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 TypedWhichId<SfxStringItem>(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 TypedWhichId<SfxUInt16Item>(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 TypedWhichId<SfxUInt32Item>(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) +#define ID_INSERT_POS (SID_SD_START+219) +#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 TypedWhichId<SfxStringItem>(SID_SD_START+225) +#define ID_VAL_WHATLAYOUT TypedWhichId<SfxUInt32Item>(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 TypedWhichId<SfxUInt32Item>(SID_SD_START+271) +#define SID_GETLINESTYLE TypedWhichId<SfxUInt32Item>(SID_SD_START+272) +#define SID_GETLINEWIDTH TypedWhichId<SfxUInt32Item>(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 TypedWhichId<SfxUInt16Item>(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 TypedWhichId<SfxStringItem>(SID_SD_START+287) +#define SID_NAVIGATOR_STATE TypedWhichId<SfxUInt32Item>(SID_SD_START+288) +#define SID_NAVIGATOR_INIT (SID_SD_START+289) + // FREE +#define SID_NAVIGATOR_PAGE TypedWhichId<SfxUInt16Item>(SID_SD_START+292) +#define SID_NAVIGATOR_OBJECT TypedWhichId<SfxStringItem>(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 TypedWhichId<SfxUInt16Item>(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<SfxBoolItem>(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 TypedWhichId<SfxUInt32Item>(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<SfxBoolItem>(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 TypedWhichId<SfxUInt32Item>(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<SfxUnoAnyItem>(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 0000000000..52b9005899 --- /dev/null +++ b/sd/inc/bitmaps.hlst @@ -0,0 +1,225 @@ +/* -*- 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 <rtl/ustring.hxx> + +// preview bitmaps for layouts +inline constexpr OUString BMP_LAYOUT_EMPTY = u"sd/res/layout_empty.png"_ustr; +inline constexpr OUString BMP_LAYOUT_HEAD01 = u"sd/res/layout_head01.png"_ustr; +inline constexpr OUString BMP_LAYOUT_HEAD02 = u"sd/res/layout_head02.png"_ustr; +inline constexpr OUString BMP_LAYOUT_HEAD02A = u"sd/res/layout_head02a.png"_ustr; +inline constexpr OUString BMP_LAYOUT_HEAD02B = u"sd/res/layout_head02b.png"_ustr; +inline constexpr OUString BMP_LAYOUT_HEAD03 = u"sd/res/layout_head03.png"_ustr; +inline constexpr OUString BMP_LAYOUT_HEAD03A = u"sd/res/layout_head03a.png"_ustr; +inline constexpr OUString BMP_LAYOUT_HEAD03B = u"sd/res/layout_head03b.png"_ustr; +inline constexpr OUString BMP_LAYOUT_HEAD03C = u"sd/res/layout_head03c.png"_ustr; +inline constexpr OUString BMP_LAYOUT_HEAD04 = u"sd/res/layout_head04.png"_ustr; +inline constexpr OUString BMP_LAYOUT_HEAD06 = u"sd/res/layout_head06.png"_ustr; +inline constexpr OUString BMP_LAYOUT_TEXTONLY = u"sd/res/layout_textonly.png"_ustr; +inline constexpr OUString BMP_LAYOUT_VERTICAL01 = u"sd/res/layout_vertical01.png"_ustr; +inline constexpr OUString BMP_LAYOUT_VERTICAL02 = u"sd/res/layout_vertical02.png"_ustr; +inline constexpr OUString BMP_SLIDE_NONE = u"sd/res/foilnone.png"_ustr; +inline constexpr OUString BMP_SLIDEH_01 = u"sd/res/foilh01.png"_ustr; +inline constexpr OUString BMP_SLIDEH_02 = u"sd/res/foilh02.png"_ustr; +inline constexpr OUString BMP_SLIDEH_03 = u"sd/res/foilh03.png"_ustr; +inline constexpr OUString BMP_SLIDEH_04 = u"sd/res/foilh04.png"_ustr; +inline constexpr OUString BMP_SLIDEH_06 = u"sd/res/foilh06.png"_ustr; +inline constexpr OUString BMP_SLIDEH_09 = u"sd/res/foilh09.png"_ustr; +inline constexpr OUString BMP_DISPLAYMODE_SLIDE = u"sd/res/displaymode_slide.png"_ustr; +inline constexpr OUString BMP_DISPLAYMODE_OUTLINE = u"sd/res/displaymode_outline.png"_ustr; +inline constexpr OUString BMP_DISPLAYMODE_NOTES = u"sd/res/displaymode_notes.png"_ustr; +inline constexpr OUString BMP_DISPLAYMODE_SLIDE_SORTER = u"sd/res/displaymode_slidesorter.png"_ustr; +inline constexpr OUString BMP_DISPLAYMODE_SLIDE_MASTER = u"sd/res/displaymode_slidemaster.png"_ustr; +inline constexpr OUString BMP_DISPLAYMODE_NOTES_MASTER = u"sd/res/displaymode_notesmaster.png"_ustr; +inline constexpr OUString BMP_DISPLAYMODE_HANDOUT_MASTER = u"sd/res/displaymode_handoutmaster.png"_ustr; +inline constexpr OUString BMP_PLACEHOLDER_CHART_SMALL = u"sd/res/placeholder_chart_small.png"_ustr; +inline constexpr OUString BMP_PLACEHOLDER_CHART_SMALL_HOVER = u"sd/res/placeholder_chart_small_hover.png"_ustr; +inline constexpr OUString BMP_PLACEHOLDER_IMAGE_SMALL = u"sd/res/placeholder_image_small.png"_ustr; +inline constexpr OUString BMP_PLACEHOLDER_IMAGE_SMALL_HOVER = u"sd/res/placeholder_image_small_hover.png"_ustr; +inline constexpr OUString BMP_PLACEHOLDER_MOVIE_SMALL = u"sd/res/placeholder_movie_small.png"_ustr; +inline constexpr OUString BMP_PLACEHOLDER_MOVIE_SMALL_HOVER = u"sd/res/placeholder_movie_small_hover.png"_ustr; +inline constexpr OUString BMP_PLACEHOLDER_TABLE_SMALL = u"sd/res/placeholder_table_small.png"_ustr; +inline constexpr OUString BMP_PLACEHOLDER_TABLE_SMALL_HOVER = u"sd/res/placeholder_table_small_hover.png"_ustr; +inline constexpr OUString BMP_PLACEHOLDER_CHART_LARGE = u"sd/res/placeholder_chart_large.png"_ustr; +inline constexpr OUString BMP_PLACEHOLDER_CHART_LARGE_HOVER = u"sd/res/placeholder_chart_large_hover.png"_ustr; +inline constexpr OUString BMP_PLACEHOLDER_IMAGE_LARGE = u"sd/res/placeholder_image_large.png"_ustr; +inline constexpr OUString BMP_PLACEHOLDER_IMAGE_LARGE_HOVER = u"sd/res/placeholder_image_large_hover.png"_ustr; +inline constexpr OUString BMP_PLACEHOLDER_MOVIE_LARGE = u"sd/res/placeholder_movie_large.png"_ustr; +inline constexpr OUString BMP_PLACEHOLDER_MOVIE_LARGE_HOVER = u"sd/res/placeholder_movie_large_hover.png"_ustr; +inline constexpr OUString BMP_PLACEHOLDER_TABLE_LARGE = u"sd/res/placeholder_table_large.png"_ustr; +inline constexpr OUString BMP_PLACEHOLDER_TABLE_LARGE_HOVER = u"sd/res/placeholder_table_large_hover.png"_ustr; +inline constexpr OUString BMP_SLIDEN_01 = u"sd/res/foiln01.png"_ustr; +inline constexpr OUString BMP_PAGE = u"sd/res/page.png"_ustr; +inline constexpr OUString BMP_PAGE_EXCLUDED = u"sd/res/pageexcl.png"_ustr; +inline constexpr OUString BMP_PAGEOBJS_EXCLUDED = u"sd/res/pagobjex.png"_ustr; +inline constexpr OUString BMP_PAGEOBJS = u"sd/res/pageobjs.png"_ustr; +inline constexpr OUString BMP_OBJECTS = u"sd/res/objects.png"_ustr; +inline constexpr OUString BMP_OLE = u"sd/res/ole.png"_ustr; +inline constexpr OUString BMP_GROUP = u"sd/res/group.png"_ustr; +inline constexpr OUString BMP_DOC_OPEN = u"sd/res/docopen.png"_ustr; +inline constexpr OUString BMP_DOC_TEXT = u"sd/res/doctext.png"_ustr ; +inline constexpr OUString BMP_GRAPHIC = u"sd/res/graphic.png"_ustr; +inline constexpr OUString BMP_STYLES_FAMILY_GRAPHICS = u"sd/res/sf01.png"_ustr; +inline constexpr OUString BMP_STYLES_FAMILY_PRESENTATIONS = u"sd/res/sf02.png"_ustr; +inline constexpr OUString BMP_PRESOBJ_GRAPHIC = u"sd/res/image.png"_ustr; +inline constexpr OUString BMP_PRESOBJ_OBJECT = u"sd/res/object.png"_ustr; +inline constexpr OUString BMP_PRESOBJ_CHART = u"sd/res/chart.png"_ustr; +inline constexpr OUString BMP_PRESOBJ_ORGCHART = u"sd/res/orgchart.png"_ustr; +inline constexpr OUString BMP_PRESOBJ_TABLE = u"sd/res/table.png"_ustr; +inline constexpr OUString BMP_POINTER_ICON = u"sd/res/pointericon.png"_ustr; +inline constexpr OUString BMP_WAIT_ICON = u"sd/res/waiticon.png"_ustr; +inline constexpr OUString BMP_FADE_EFFECT_INDICATOR = u"sd/res/fade_effect_indicator.png"_ustr; +inline constexpr OUString BMP_CUSTOM_ANIMATION_INDICATOR = u"sd/res/click_16.png"_ustr; +inline constexpr OUString BMP_INSERT_TABLESTYLE = u"sd/res/addtablestyle.png"_ustr; +// Presenter Screen bitmaps: +inline constexpr OUString BMP_PRESENTERSCREEN_BORDER_LEFT = u"sd/res/presenterscreen-BorderLeft.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BUTTON_SLIDE_NEXT_DISABLED = u"sd/res/presenterscreen-ButtonSlideNextDisabled.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BUTTON_SLIDE_PREVIOUS_SELECTED = u"sd/res/presenterscreen-ButtonSlidePreviousSelected.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BORDER_CURRENT_SLIDE_TOP = u"sd/res/presenterscreen-BorderCurrentSlideTop.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BUTTON_NOTES_SELECTED = u"sd/res/presenterscreen-ButtonNotesSelected.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_SCROLLBAR_ARROW_DOWN_SELECTED = u"sd/res/presenterscreen-ScrollbarArrowDownSelected.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BACKGROUND = u"sd/res/presenterscreen-Background.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_ANIMATION = u"sd/res/presenterscreen-Animation.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_TRANSITION = u"sd/res/presenterscreen-Transition.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BORDER_RIGHT = u"sd/res/presenterscreen-BorderRight.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BORDER_ACTIVE_TOP = u"sd/res/presenterscreen-BorderActiveTop.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BUTTON_HELP_DISABLED = u"sd/res/presenterscreen-ButtonHelpDisabled.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BORDER_ACTIVE_RIGHT = u"sd/res/presenterscreen-BorderActiveRight.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BUTTON_FRAME_CENTER_NORMAL = u"sd/res/presenterscreen-ButtonFrameCenterNormal.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_SCROLLBAR_THUMB_MIDDLE_MOUSE_OVER = u"sd/res/presenterscreen-ScrollbarThumbMiddleMouseOver.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BORDER_CURRENT_SLIDE_BOTTOM_RIGHT = u"sd/res/presenterscreen-BorderCurrentSlideBottomRight.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BORDER_TOP_LEFT = u"sd/res/presenterscreen-BorderTopLeft.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BORDER_ACTIVE_BOTTOM = u"sd/res/presenterscreen-BorderActiveBottom.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BORDER_BOTTOM_LEFT = u"sd/res/presenterscreen-BorderBottomLeft.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BORDER_TOOLBAR_TOP = u"sd/res/presenterscreen-BorderToolbarTop.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BORDER_ACTIVE_LEFT = u"sd/res/presenterscreen-BorderActiveLeft.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BUTTON_HELP_NORMAL = u"sd/res/presenterscreen-ButtonHelpNormal.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BUTTON_EXIT_PRESENTER_NORMAL = u"sd/res/presenterscreen-ButtonExitPresenterNormal.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_SEPARATOR = u"sd/res/presenterscreen-Separator.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BORDER_ACTIVE_BOTTOM_CALLOUT = u"sd/res/presenterscreen-BorderActiveBottomCallout.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BORDER_TOOLBAR_LEFT = u"sd/res/presenterscreen-BorderToolbarLeft.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BUTTON_SLIDE_SORTER_NORMAL = u"sd/res/presenterscreen-ButtonSlideSorterNormal.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_SCROLLBAR_PAGER_MIDDLE_NORMAL = u"sd/res/presenterscreen-ScrollbarPagerMiddleNormal.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BUTTON_FRAME_RIGHT_NORMAL = u"sd/res/presenterscreen-ButtonFrameRightNormal.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BUTTON_EFFECT_NEXT_MOUSE_OVER = u"sd/res/presenterscreen-ButtonEffectNextMouseOver.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_SCROLLBAR_THUMB_TOP_MOUSE_OVER = u"sd/res/presenterscreen-ScrollbarThumbTopMouseOver.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BUTTON_EFFECT_NEXT_DISABLED = u"sd/res/presenterscreen-ButtonEffectNextDisabled.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BUTTON_FRAME_CENTER_MOUSE_OVER = u"sd/res/presenterscreen-ButtonFrameCenterMouseOver.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BORDER_CURRENT_SLIDE_LEFT = u"sd/res/presenterscreen-BorderCurrentSlideLeft.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BUTTON_FRAME_LEFT_MOUSE_OVER = u"sd/res/presenterscreen-ButtonFrameLeftMouseOver.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BUTTON_HELP_SELECTED = u"sd/res/presenterscreen-ButtonHelpSelected.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_VIEW_BACKGROUND = u"sd/res/presenterscreen-ViewBackground.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BUTTON_NOTES_MOUSE_OVER = u"sd/res/presenterscreen-ButtonNotesMouseOver.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BUTTON_PLUS_MOUSE_OVER = u"sd/res/presenterscreen-ButtonPlusMouseOver.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BUTTON_SLIDE_SORTER_SELECTED = u"sd/res/presenterscreen-ButtonSlideSorterSelected.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_LABEL_MOUSE_OVER_RIGHT = u"sd/res/presenterscreen-LabelMouseOverRight.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BUTTON_SWITCH_MONITOR_NORMAL = u"sd/res/presenterscreen-ButtonSwitchMonitorNormal.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BUTTON_RESTART_TIMER_NORMAL = u"sd/res/presenterscreen-ButtonRestartTimerNormal.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BUTTON_PAUSE_TIMER_NORMAL = u"sd/res/presenterscreen-ButtonPauseTimerNormal.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BUTTON_RESUME_TIMER_NORMAL = u"sd/res/presenterscreen-ButtonResumeTimerNormal.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BORDER_TOOLBAR_RIGHT = u"sd/res/presenterscreen-BorderToolbarRight.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_SCROLLBAR_THUMB_MIDDLE_NORMAL = u"sd/res/presenterscreen-ScrollbarThumbMiddleNormal.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BUTTON_EFFECT_NEXT_SELECTED = u"sd/res/presenterscreen-ButtonEffectNextSelected.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_SCROLLBAR_ARROW_DOWN_NORMAL = u"sd/res/presenterscreen-ScrollbarArrowDownNormal.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BORDER_CURRENT_SLIDE_TOP_RIGHT = u"sd/res/presenterscreen-BorderCurrentSlideTopRight.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BUTTON_PLUS_NORMAL = u"sd/res/presenterscreen-ButtonPlusNormal.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BORDER_TOOLBAR_TOP_RIGHT = u"sd/res/presenterscreen-BorderToolbarTopRight.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BUTTON_MINUS_DISABLED = u"sd/res/presenterscreen-ButtonMinusDisabled.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_SCROLLBAR_ARROW_DOWN_DISABLED = u"sd/res/presenterscreen-ScrollbarArrowDownDisabled.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BUTTON_FRAME_RIGHT_MOUSE_OVER = u"sd/res/presenterscreen-ButtonFrameRightMouseOver.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BUTTON_SWITCH_MONITOR_MOUSE_OVER = u"sd/res/presenterscreen-ButtonSwitchMonitorMouseOver.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BUTTON_RESTART_TIMER_MOUSE_OVER = u"sd/res/presenterscreen-ButtonRestartTimerMouseOver.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BUTTON_PAUSE_TIMER_MOUSE_OVER = u"sd/res/presenterscreen-ButtonPauseTimerMouseOver.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BUTTON_RESUME_TIMER_MOUSE_OVER = u"sd/res/presenterscreen-ButtonResumeTimerMouseOver.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BUTTON_SLIDE_PREVIOUS_DISABLED = u"sd/res/presenterscreen-ButtonSlidePreviousDisabled.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BUTTON_MINUS_SELECTED = u"sd/res/presenterscreen-ButtonMinusSelected.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_LABEL_MOUSE_OVER_CENTER = u"sd/res/presenterscreen-LabelMouseOverCenter.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BUTTON_SLIDE_NEXT_MOUSE_OVER = u"sd/res/presenterscreen-ButtonSlideNextMouseOver.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BUTTON_SLIDE_NEXT_NORMAL = u"sd/res/presenterscreen-ButtonSlideNextNormal.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BUTTON_SLIDE_PREVIOUS_MOUSE_OVER = u"sd/res/presenterscreen-ButtonSlidePreviousMouseOver.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BORDER_TOP = u"sd/res/presenterscreen-BorderTop.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BUTTON_FRAME_LEFT_NORMAL = u"sd/res/presenterscreen-ButtonFrameLeftNormal.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_SCROLLBAR_ARROW_UP_MOUSE_OVER = u"sd/res/presenterscreen-ScrollbarArrowUpMouseOver.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BUTTON_NOTES_NORMAL = u"sd/res/presenterscreen-ButtonNotesNormal.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BUTTON_SLIDE_SORTER_DISABLED = u"sd/res/presenterscreen-ButtonSlideSorterDisabled.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BUTTON_EFFECT_NEXT_NORMAL = u"sd/res/presenterscreen-ButtonEffectNextNormal.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BORDER_TOOLBAR_TOP_LEFT = u"sd/res/presenterscreen-BorderToolbarTopLeft.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BORDER_ACTIVE_BOTTOM_RIGHT = u"sd/res/presenterscreen-BorderActiveBottomRight.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BORDER_BOTTOM = u"sd/res/presenterscreen-BorderBottom.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BORDER_ACTIVE_BOTTOM_LEFT = u"sd/res/presenterscreen-BorderActiveBottomLeft.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_SCROLLBAR_ARROW_DOWN_MOUSE_OVER = u"sd/res/presenterscreen-ScrollbarArrowDownMouseOver.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BUTTON_PLUS_SELECTED = u"sd/res/presenterscreen-ButtonPlusSelected.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BORDER_ACTIVE_TOP_RIGHT = u"sd/res/presenterscreen-BorderActiveTopRight.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BUTTON_SLIDE_PREVIOUS_NORMAL = u"sd/res/presenterscreen-ButtonSlidePreviousNormal.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BUTTON_SLIDE_SORTER_MOUSE_OVER = u"sd/res/presenterscreen-ButtonSlideSorterMouseOver.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BUTTON_MINUS_MOUSE_OVER = u"sd/res/presenterscreen-ButtonMinusMouseOver.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BUTTON_NOTES_DISABLED = u"sd/res/presenterscreen-ButtonNotesDisabled.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BORDER_CURRENT_SLIDE_BOTTOM_LEFT = u"sd/res/presenterscreen-BorderCurrentSlideBottomLeft.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BORDER_TOP_RIGHT = u"sd/res/presenterscreen-BorderTopRight.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BUTTON_HELP_MOUSE_OVER = u"sd/res/presenterscreen-ButtonHelpMouseOver.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BUTTON_EXIT_PRESENTER_MOUSE_OVER = u"sd/res/presenterscreen-ButtonExitPresenterMouseOver.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_SCROLLBAR_THUMB_TOP_NORMAL = u"sd/res/presenterscreen-ScrollbarThumbTopNormal.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_SCROLLBAR_ARROW_UP_SELECTED = u"sd/res/presenterscreen-ScrollbarArrowUpSelected.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_SCROLLBAR_ARROW_UP_DISABLED = u"sd/res/presenterscreen-ScrollbarArrowUpDisabled.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_SCROLLBAR_ARROW_UP_NORMAL = u"sd/res/presenterscreen-ScrollbarArrowUpNormal.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BORDER_TOOLBAR_BOTTOM = u"sd/res/presenterscreen-BorderToolbarBottom.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BORDER_CURRENT_SLIDE_TOP_LEFT = u"sd/res/presenterscreen-BorderCurrentSlideTopLeft.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BUTTON_MINUS_NORMAL = u"sd/res/presenterscreen-ButtonMinusNormal.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_SCROLLBAR_THUMB_BOTTOM_MOUSE_OVER = u"sd/res/presenterscreen-ScrollbarThumbBottomMouseOver.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BORDER_ACTIVE_TOP_LEFT = u"sd/res/presenterscreen-BorderActiveTopLeft.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BORDER_CURRENT_SLIDE_BOTTOM = u"sd/res/presenterscreen-BorderCurrentSlideBottom.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_SCROLLBAR_PAGER_MIDDLE_MOUSE_OVER = u"sd/res/presenterscreen-ScrollbarPagerMiddleMouseOver.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_LABEL_MOUSE_OVER_LEFT = u"sd/res/presenterscreen-LabelMouseOverLeft.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BORDER_CURRENT_SLIDE_RIGHT = u"sd/res/presenterscreen-BorderCurrentSlideRight.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BORDER_BOTTOM_RIGHT = u"sd/res/presenterscreen-BorderBottomRight.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_SCROLLBAR_THUMB_BOTTOM_NORMAL = u"sd/res/presenterscreen-ScrollbarThumbBottomNormal.png"_ustr; +inline constexpr OUString BMP_PRESENTERSCREEN_BUTTON_PLUS_DISABLED = u"sd/res/presenterscreen-ButtonPlusDisabled.png"_ustr; + +inline constexpr OUString BMP_EMBEDDED = u"sd/res/nv08.png"_ustr; +inline constexpr OUString BMP_LINK = u"sd/res/nv09.png"_ustr; +inline constexpr OUString BMP_HYPERLINK = u"sd/res/nv010.png"_ustr; + +inline constexpr OUString IMAGE_SHADOW = u"sd/res/slide_sorter_shadow.png"_ustr; +inline constexpr OUString IMAGE_INSERT_SHADOW = u"sd/res/slide_sorter_insert_shadow.png"_ustr; +inline constexpr OUString IMAGE_HIDE_SLIDE_OVERLAY = u"sd/res/slide_sorter_hide_slide_overlay.png"_ustr; +inline constexpr OUString IMAGE_FOCUS_BORDER = u"sd/res/slide_sorter_focus_border.png"_ustr; + +inline constexpr OUString BMP_CUSTOMANIMATION_ON_CLICK = u"sd/res/click_16.png"_ustr; +inline constexpr OUString BMP_CUSTOMANIMATION_AFTER_PREVIOUS = u"sd/res/time_16.png"_ustr; +inline constexpr OUString BMP_CUSTOMANIMATION_ENTRANCE_EFFECT = u"sd/res/effect_16.png"_ustr; +inline constexpr OUString BMP_CUSTOMANIMATION_EMPHASIS_EFFECT = u"sd/res/effectshape_16.png"_ustr; +inline constexpr OUString BMP_CUSTOMANIMATION_EXIT_EFFECT = u"sd/res/effectfade_16.png"_ustr; +inline constexpr OUString BMP_CUSTOMANIMATION_MOTION_PATH = u"sd/res/effectpath_16.png"_ustr; +inline constexpr OUString BMP_CUSTOMANIMATION_OLE = u"sd/res/effectole_16.png"_ustr; +inline constexpr OUString BMP_CUSTOMANIMATION_MEDIA_PLAY = u"sd/res/playblue_16.png"_ustr; +inline constexpr OUString BMP_CUSTOMANIMATION_MEDIA_PAUSE = u"sd/res/breakplayingblue_16.png"_ustr; +inline constexpr OUString BMP_CUSTOMANIMATION_MEDIA_STOP = u"sd/res/stopplayingblue_16.png"_ustr; + +inline constexpr OUString BMP_MENU_NEXT = u"cmd/sc_nextrecord.png"_ustr; +inline constexpr OUString BMP_MENU_PREV = u"cmd/sc_prevrecord.png"_ustr; +inline constexpr OUString BMP_MENU_FIRST = u"cmd/sc_firstrecord.png"_ustr; +inline constexpr OUString BMP_MENU_LAST = u"cmd/sc_lastrecord.png"_ustr; + +inline constexpr OUString BMP_PREV_SLIDE_SMALL = u"sd/res/prevslide_small.png"_ustr; +inline constexpr OUString BMP_NEXT_SLIDE_SMALL = u"sd/res/nextslide_small.png"_ustr; +inline constexpr OUString BMP_MENU_SLIDE_SMALL = u"sd/res/slideshowmenu_small.png"_ustr; + +inline constexpr OUString BMP_PREV_SLIDE_LARGE = u"sd/res/prevslide_large.png"_ustr; +inline constexpr OUString BMP_NEXT_SLIDE_LARGE = u"sd/res/nextslide_large.png"_ustr; +inline constexpr OUString BMP_MENU_SLIDE_LARGE = u"sd/res/slideshowmenu_large.png"_ustr; + +inline constexpr OUString BMP_PREV_SLIDE_EXTRALARGE = u"sd/res/prevslide_extralarge.png"_ustr; +inline constexpr OUString BMP_NEXT_SLIDE_EXTRALARGE = u"sd/res/nextslide_extralarge.png"_ustr; +inline constexpr OUString BMP_MENU_SLIDE_EXTRALARGE = u"sd/res/slideshowmenu_extralarge.png"_ustr; + +inline constexpr OUString SFX_BMP_CLOSE_DOC = u"sfx2/res/closedoc.png"_ustr; + +/* 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 0000000000..b1c3016e4d --- /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 <sal/config.h> + +#include <com/sun/star/uno/Reference.hxx> + +namespace com::sun::star::presentation +{ +class XPresentation2; +} +class SdDrawDocument; + +css::uno::Reference<css::presentation::XPresentation2> +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 0000000000..334aa867ac --- /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 <com/sun/star/uno/Reference.hxx> + +namespace com::sun::star::uno { class XInterface; } +class SdCustomShow; + +css::uno::Reference<css::uno::XInterface> 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 0000000000..8707704c14 --- /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 <com/sun/star/uno/Reference.hxx> + +namespace com::sun::star::uno +{ +class XInterface; +} +class SdPage; + +css::uno::Reference<css::uno::XInterface> 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 0000000000..c0115c310a --- /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 <vector> +#include <cppuhelper/weakref.hxx> +#include "sddllapi.h" + +class SdPage; + +class SD_DLLPUBLIC SdCustomShow final +{ +public: + typedef ::std::vector<const SdPage*> PageVec; + +private: + PageVec maPages; + OUString aName; + + // this is a weak reference to a possible living api wrapper for this custom show + css::uno::WeakReference<css::uno::XInterface> mxUnoCustomShow; + +public: + SdCustomShow(); + SdCustomShow(css::uno::Reference<css::uno::XInterface> 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<css::uno::XInterface> 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 0000000000..8a1706ec2e --- /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 <vector> +#include <memory> +#include <algorithm> +#include <cassert> + +class SD_DLLPUBLIC SdCustomShowList +{ +private: + std::vector<std::unique_ptr<SdCustomShow>> 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<SdCustomShow>& operator[](size_t i) {return mShows[i];} + + std::vector<std::unique_ptr<SdCustomShow>>::iterator begin() {return mShows.begin();} + + void erase(std::vector<std::unique_ptr<SdCustomShow>>::iterator it); + + void push_back(std::unique_ptr<SdCustomShow> 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<SdCustomShow> 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 0000000000..6d0f9a266c --- /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 0000000000..dd6b81647e --- /dev/null +++ b/sd/inc/drawdoc.hxx @@ -0,0 +1,720 @@ +/* -*- 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 <com/sun/star/text/WritingMode.hpp> +#include <svl/style.hxx> +#include <svx/fmmodel.hxx> +#include <unotools/charclass.hxx> +#include <vcl/prntypes.hxx> +#include <xmloff/autolayout.hxx> + +#include <vector> +#include <memory> +#include <optional> +#include <string_view> + +#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 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<DrawDocShell> 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<SdOutliner> + mpOutliner; ///< local outliner for outline mode + std::unique_ptr<SdOutliner> + mpInternalOutliner; ///< internal outliner for creation of text objects + std::unique_ptr<Timer> mpWorkStartupTimer; + std::unique_ptr<Idle> + mpOnlineSpellingIdle; + std::unique_ptr<sd::ShapeList> + mpOnlineSpellingList; + std::unique_ptr<SvxSearchItem> + mpOnlineSearchItem; + std::vector<std::unique_ptr<sd::FrameView>> + maFrameViewList; + std::unique_ptr<SdCustomShowList> 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::optional<CharClass> + moCharClass; + + ::std::unique_ptr<ImpDrawPageListWatcher> mpDrawPageListWatcher; + ::std::unique_ptr<ImpMasterPageListWatcher> 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<css::uno::Reference< css::xml::dom::XNode> > maLayoutInfo; + + std::vector<css::uno::Reference< css::xml::dom::XNode> > 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::frame::XModel > 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<SdPage> AllocSdPage(bool bMasterPage); + SAL_DLLPRIVATE virtual rtl::Reference<SdrPage> 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<SdrPage> RemovePage(sal_uInt16 nPgNum) override; + + SAL_DLLPRIVATE virtual void InsertMasterPage(SdrPage* pPage, sal_uInt16 nPos=0xFFFF) override; + SAL_DLLPRIVATE virtual rtl::Reference<SdrPage> 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<OUString> &rBookmarkList, + std::vector<OUString> &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<css::uno::Reference< css::xml::dom::XNode> >& 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<css::uno::Reference<css::xml::dom::XNode> >& 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 + */ + + bool InsertBookmarkAsPage(const std::vector<OUString> &rBookmarkList, + std::vector<OUString> *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<OUString> &rBookmarkList, + const std::vector<OUString> &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 (<TRUE/>) or a regular or notes page + (<FALSE/>). 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 <const + scope="css::document::PrinterIndependentLayout">ENABLED</const> + to make formatting printer-independent and <const + scope="css::document::PrinterIndependentLayout">DISABLED</const> + 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 <const + scope="css::document::PrinterIndependentLayout">ENABLED</const> + when formatting is printer-independent and <const + scope="css::document::PrinterIndependentLayout">DISABLED</const> + 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<std::unique_ptr<sd::FrameView>>& 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 const std::optional<CharClass>& GetCharClass() const { return moCharClass; } + + 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 <argument>pCurrentPage</argument> 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 <argument>pCurrentPage</argument> is + not a standard page. In this case the layout is taken from the + standard page associated with <argument>pCurrentPage</argument>. + @param eNotesLayout + Layout to use for the new notes page. Note that this layout + is not used when the given <argument>pCurrentPage</argument> is + not a notes page. In this case the layout is taken from the + notes page associated with <argument>pCurrentPage</argument>. + @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 + <member>GetSdPage()</member> 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 + <member>DuplicatePage()</member> method. + @param nPageNum + The page number as passed to the <member>GetSdPage()</member> + 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 + <member>GetSdPage()</member> method. + */ + SAL_DLLPRIVATE sal_uInt16 DuplicatePage (sal_uInt16 nPageNum); + + /** Create and insert a set of two new pages that are copies of the + given <argument>pCurrentPage</argument> 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 <argument>pCurrentPage</argument> 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 + <member>GetSdPage()</member> 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( + std::u16string_view aOldName, std::u16string_view aNewName); + + 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 <member>SetPrinterIndependentLayout()</member> for its + values. + */ + sal_Int32 mnPrinterIndependentLayout; + + /** Insert a given set of standard and notes page after the given <argument>pCurrentPage</argument>. + @param pCurrentPage + This page and its associated notes/standard page is copied. + @param ePageKind + This specifies whether <argument>pCurrentPage</argument> 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 + <member>GetSdPage()</member> 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 0000000000..6b89724a5e --- /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, u8##String) + +#include <svtools/ehdl.hxx> +#include <comphelper/errcode.hxx> +#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/family.hrc b/sd/inc/family.hrc new file mode 100644 index 0000000000..ff52e447fb --- /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 <svl/style.hxx> +#include <unotools/resmgr.hxx> + +#define NC_(Context, String) TranslateId(Context, u8##String) + +const std::pair<TranslateId, SfxStyleSearchBits> 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<TranslateId, SfxStyleSearchBits> 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 0000000000..a6ddf50705 --- /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 <rtl/ustring.hxx> + +#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 OUString SD_LT_SEPARATOR = u"~LT~"_ustr; + +// 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 0000000000..89e43639e4 --- /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 <osl/interlck.h> + +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 0000000000..bcd28e15f1 --- /dev/null +++ b/sd/inc/helpids.h @@ -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 <rtl/ustring.hxx> + +inline constexpr OUString HID_SDDRAWVIEWSHELL = u"SD_HID_SDDRAWVIEWSHELL"_ustr; +inline constexpr OUString HID_SDGRAPHICVIEWSHELL = u"SD_HID_SDGRAPHICVIEWSHELL"_ustr; +inline constexpr OUString HID_SDOUTLINEVIEWSHELL = u"SD_HID_SDOUTLINEVIEWSHELL"_ustr; + +inline constexpr OUString HID_SD_WIN_PRESENTATION = u"SD_HID_SD_WIN_PRESENTATION"_ustr; + +inline constexpr OUString HID_SD_TABBAR_PAGES = u"SD_HID_SD_TABBAR_PAGES"_ustr; +inline constexpr OUString HID_SD_TABBAR_LAYERS = u"SD_HID_SD_TABBAR_LAYERS"_ustr; + +inline constexpr OUString HID_SD_NAMEDIALOG_OBJECT = u"SD_HID_SD_NAMEDIALOG_OBJECT"_ustr; +inline constexpr OUString HID_SD_NAMEDIALOG_PAGE = u"SD_HID_SD_NAMEDIALOG_PAGE"_ustr; +inline constexpr OUString HID_SD_NAMEDIALOG_LINEEND = u"SD_HID_SD_NAMEDIALOG_LINEEND"_ustr; + +inline constexpr OUString HID_SD_TASK_PANE_PREVIEW_CURRENT = u"SD_HID_SD_TASK_PANE_PREVIEW_CURRENT"_ustr; +inline constexpr OUString HID_SD_TASK_PANE_PREVIEW_RECENT = u"SD_HID_SD_TASK_PANE_PREVIEW_RECENT"_ustr; +inline constexpr OUString HID_SD_TASK_PANE_PREVIEW_ALL = u"SD_HID_SD_TASK_PANE_PREVIEW_ALL"_ustr; +inline constexpr OUString HID_SD_TASK_PANE_PREVIEW_LAYOUTS = u"SD_HID_SD_TASK_PANE_PREVIEW_LAYOUTS"_ustr; + +inline constexpr OUString HID_SD_CUSTOMANIMATIONPANE_PRESETPROPERTYBOX = u"SD_HID_SD_CUSTOMANIMATIONPANE_PRESETPROPERTYBOX"_ustr; +inline constexpr OUString HID_SD_CUSTOMANIMATIONPANE_COLORPROPERTYBOX = u"SD_HID_SD_CUSTOMANIMATIONPANE_COLORPROPERTYBOX"_ustr; +inline constexpr OUString HID_SD_CUSTOMANIMATIONPANE_FONTPROPERTYBOX = u"SD_HID_SD_CUSTOMANIMATIONPANE_FONTPROPERTYBOX"_ustr; +inline constexpr OUString HID_SD_CUSTOMANIMATIONPANE_CHARHEIGHTPROPERTYBOX = u"SD_HID_SD_CUSTOMANIMATIONPANE_CHARHEIGHTPROPERTYBOX"_ustr; +inline constexpr OUString HID_SD_CUSTOMANIMATIONPANE_ROTATIONPROPERTYBOX = u"SD_HID_SD_CUSTOMANIMATIONPANE_ROTATIONPROPERTYBOX"_ustr; +inline constexpr OUString HID_SD_CUSTOMANIMATIONPANE_TRANSPARENCYPROPERTYBOX = u"SD_HID_SD_CUSTOMANIMATIONPANE_TRANSPARENCYPROPERTYBOX"_ustr; +inline constexpr OUString HID_SD_CUSTOMANIMATIONPANE_SCALEPROPERTYBOX = u"SD_HID_SD_CUSTOMANIMATIONPANE_SCALEPROPERTYBOX"_ustr; +inline constexpr OUString HID_SD_CUSTOMANIMATIONPANE_FONTSTYLEPROPERTYBOX = u"SD_HID_SD_CUSTOMANIMATIONPANE_FONTSTYLEPROPERTYBOX"_ustr; + + +inline constexpr OUString HID_SD_RULER_HORIZONTAL = u"SD_HID_SD_RULER_HORIZONTAL"_ustr; +inline constexpr OUString HID_SD_RULER_VERTICAL = u"SD_HID_SD_RULER_VERTICAL"_ustr; + +/* 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 0000000000..544bb5873f --- /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 <sal/types.h> + +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 0000000000..11847a7f9e --- /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 <sal/config.h> +#include <rtl/ustring.hxx> +#include <com/sun/star/uno/Reference.hxx> + +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 0000000000..7dd031314d --- /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 <unotools/resmgr.hxx> + +#include <utility> + +#define NC_(Context, String) TranslateId(Context, u8##String) + +namespace sd +{ + +// To translators: this is a listbox labelled by "Margins:", inch units +const std::pair<TranslateId, int> 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<TranslateId, int> 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 0000000000..d681ebc7e6 --- /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 0000000000..44aba021a6 --- /dev/null +++ b/sd/inc/pch/precompiled_sd.hxx @@ -0,0 +1,631 @@ +/* -*- 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 2023-01-10 23:30:40 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 <sal/config.h> +#if PCH_LEVEL >= 1 +#include <algorithm> +#include <array> +#include <cassert> +#include <cmath> +#include <cstddef> +#include <cstring> +#include <functional> +#include <initializer_list> +#include <iomanip> +#include <iterator> +#include <limits> +#include <locale> +#include <map> +#include <math.h> +#include <memory> +#include <mutex> +#include <new> +#include <numeric> +#include <optional> +#include <ostream> +#include <set> +#include <span> +#include <stddef.h> +#include <string_view> +#include <type_traits> +#include <unordered_map> +#include <utility> +#include <vector> +#include <boost/property_tree/json_parser.hpp> +#include <boost/property_tree/ptree_fwd.hpp> +#endif // PCH_LEVEL >= 1 +#if PCH_LEVEL >= 2 +#include <osl/diagnose.h> +#include <osl/diagnose.hxx> +#include <osl/doublecheckedlocking.h> +#include <osl/endian.h> +#include <osl/file.hxx> +#include <osl/getglobalmutex.hxx> +#include <osl/interlck.h> +#include <osl/module.h> +#include <osl/module.hxx> +#include <osl/mutex.hxx> +#include <osl/socket_decl.hxx> +#include <osl/time.h> +#include <rtl/alloc.h> +#include <rtl/bootstrap.hxx> +#include <rtl/character.hxx> +#include <rtl/math.h> +#include <rtl/math.hxx> +#include <rtl/ref.hxx> +#include <rtl/strbuf.h> +#include <rtl/strbuf.hxx> +#include <rtl/string.hxx> +#include <rtl/stringconcat.hxx> +#include <rtl/stringutils.hxx> +#include <rtl/tencinfo.h> +#include <rtl/textenc.h> +#include <rtl/ustrbuf.hxx> +#include <rtl/ustring.hxx> +#include <sal/backtrace.hxx> +#include <sal/log.hxx> +#include <sal/macros.h> +#include <sal/types.h> +#include <sal/typesizes.h> +#include <vcl/EnumContext.hxx> +#include <vcl/GraphicObject.hxx> +#include <vcl/InterimItemWindow.hxx> +#include <vcl/bitmapex.hxx> +#include <vcl/commandevent.hxx> +#include <vcl/commandinfoprovider.hxx> +#include <vcl/customweld.hxx> +#include <vcl/dllapi.h> +#include <vcl/errinf.hxx> +#include <vcl/event.hxx> +#include <vcl/fntstyle.hxx> +#include <vcl/font.hxx> +#include <vcl/gradient.hxx> +#include <vcl/graph.hxx> +#include <vcl/graphicfilter.hxx> +#include <vcl/help.hxx> +#include <vcl/idle.hxx> +#include <vcl/image.hxx> +#include <vcl/imapobj.hxx> +#include <vcl/keycod.hxx> +#include <vcl/mapmod.hxx> +#include <vcl/outdev.hxx> +#include <vcl/ptrstyle.hxx> +#include <vcl/region.hxx> +#include <vcl/settings.hxx> +#include <vcl/svapp.hxx> +#include <vcl/timer.hxx> +#include <vcl/toolbox.hxx> +#include <vcl/transfer.hxx> +#include <vcl/vclenum.hxx> +#include <vcl/vclevent.hxx> +#include <vcl/vclptr.hxx> +#include <vcl/virdev.hxx> +#include <vcl/weld.hxx> +#include <vcl/weldutils.hxx> +#include <vcl/window.hxx> +#include <vcl/wintypes.hxx> +#include <vcl/wrkwin.hxx> +#endif // PCH_LEVEL >= 2 +#if PCH_LEVEL >= 3 +#include <avmedia/mediaplayer.hxx> +#include <avmedia/mediawindow.hxx> +#include <basegfx/basegfxdllapi.h> +#include <basegfx/color/bcolor.hxx> +#include <basegfx/matrix/b2dhommatrix.hxx> +#include <basegfx/matrix/b2dhommatrixtools.hxx> +#include <basegfx/numeric/ftools.hxx> +#include <basegfx/point/b2dpoint.hxx> +#include <basegfx/point/b2ipoint.hxx> +#include <basegfx/polygon/b2dpolygon.hxx> +#include <basegfx/polygon/b2dpolygontools.hxx> +#include <basegfx/polygon/b2dpolypolygon.hxx> +#include <basegfx/range/Range2D.hxx> +#include <basegfx/range/b2drange.hxx> +#include <basegfx/range/basicrange.hxx> +#include <basegfx/tuple/b2dtuple.hxx> +#include <basegfx/tuple/b3dtuple.hxx> +#include <basegfx/vector/b2dsize.hxx> +#include <basegfx/vector/b2dvector.hxx> +#include <basic/sberrors.hxx> +#include <basic/sbstar.hxx> +#include <cache/SlsPageCache.hxx> +#include <cache/SlsPageCacheManager.hxx> +#include <com/sun/star/animations/AnimationFill.hpp> +#include <com/sun/star/animations/AnimationNodeType.hpp> +#include <com/sun/star/animations/AnimationRestart.hpp> +#include <com/sun/star/animations/AnimationTransformType.hpp> +#include <com/sun/star/animations/Event.hpp> +#include <com/sun/star/animations/EventTrigger.hpp> +#include <com/sun/star/animations/ParallelTimeContainer.hpp> +#include <com/sun/star/animations/Timing.hpp> +#include <com/sun/star/animations/TransitionSubType.hpp> +#include <com/sun/star/animations/TransitionType.hpp> +#include <com/sun/star/animations/ValuePair.hpp> +#include <com/sun/star/animations/XAnimate.hpp> +#include <com/sun/star/animations/XAnimateMotion.hpp> +#include <com/sun/star/animations/XAnimateTransform.hpp> +#include <com/sun/star/animations/XAnimationNode.hpp> +#include <com/sun/star/animations/XAnimationNodeSupplier.hpp> +#include <com/sun/star/animations/XAudio.hpp> +#include <com/sun/star/animations/XCommand.hpp> +#include <com/sun/star/animations/XIterateContainer.hpp> +#include <com/sun/star/animations/XTransitionFilter.hpp> +#include <com/sun/star/awt/FontDescriptor.hpp> +#include <com/sun/star/awt/FontSlant.hpp> +#include <com/sun/star/awt/XBitmap.hpp> +#include <com/sun/star/beans/NamedValue.hpp> +#include <com/sun/star/beans/PropertyAttribute.hpp> +#include <com/sun/star/beans/PropertyState.hpp> +#include <com/sun/star/beans/PropertyValue.hpp> +#include <com/sun/star/beans/XMultiPropertySet.hpp> +#include <com/sun/star/beans/XPropertyChangeListener.hpp> +#include <com/sun/star/beans/XPropertySet.hpp> +#include <com/sun/star/beans/XPropertySetInfo.hpp> +#include <com/sun/star/beans/XPropertyState.hpp> +#include <com/sun/star/configuration/theDefaultProvider.hpp> +#include <com/sun/star/container/XEnumerationAccess.hpp> +#include <com/sun/star/container/XIndexReplace.hpp> +#include <com/sun/star/container/XNameAccess.hpp> +#include <com/sun/star/datatransfer/XTransferable2.hpp> +#include <com/sun/star/datatransfer/clipboard/XClipboard.hpp> +#include <com/sun/star/datatransfer/clipboard/XClipboardOwner.hpp> +#include <com/sun/star/datatransfer/dnd/DNDConstants.hpp> +#include <com/sun/star/datatransfer/dnd/DropTargetDragEvent.hpp> +#include <com/sun/star/datatransfer/dnd/DropTargetDropEvent.hpp> +#include <com/sun/star/datatransfer/dnd/XDragGestureListener.hpp> +#include <com/sun/star/datatransfer/dnd/XDragSourceListener.hpp> +#include <com/sun/star/datatransfer/dnd/XDropTargetListener.hpp> +#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp> +#include <com/sun/star/drawing/BitmapMode.hpp> +#include <com/sun/star/drawing/FillStyle.hpp> +#include <com/sun/star/drawing/LineCap.hpp> +#include <com/sun/star/drawing/LineStyle.hpp> +#include <com/sun/star/drawing/XDrawPage.hpp> +#include <com/sun/star/drawing/XDrawPages.hpp> +#include <com/sun/star/drawing/XDrawPagesSupplier.hpp> +#include <com/sun/star/drawing/XDrawView.hpp> +#include <com/sun/star/drawing/XMasterPagesSupplier.hpp> +#include <com/sun/star/drawing/framework/ResourceId.hpp> +#include <com/sun/star/drawing/framework/XConfiguration.hpp> +#include <com/sun/star/drawing/framework/XConfigurationController.hpp> +#include <com/sun/star/drawing/framework/XControllerManager.hpp> +#include <com/sun/star/drawing/framework/XView.hpp> +#include <com/sun/star/embed/Aspects.hpp> +#include <com/sun/star/embed/ElementModes.hpp> +#include <com/sun/star/embed/NoVisualAreaSizeException.hpp> +#include <com/sun/star/embed/XEmbedPersist.hpp> +#include <com/sun/star/embed/XEmbeddedObject.hpp> +#include <com/sun/star/frame/XController.hpp> +#include <com/sun/star/frame/XDispatchProvider.hpp> +#include <com/sun/star/frame/XFrame.hpp> +#include <com/sun/star/frame/XModel.hpp> +#include <com/sun/star/frame/XTerminateListener.hpp> +#include <com/sun/star/geometry/RealPoint2D.hpp> +#include <com/sun/star/i18n/UnicodeScript.hpp> +#include <com/sun/star/lang/DisposedException.hpp> +#include <com/sun/star/lang/IllegalArgumentException.hpp> +#include <com/sun/star/lang/IndexOutOfBoundsException.hpp> +#include <com/sun/star/lang/Locale.hpp> +#include <com/sun/star/lang/XComponent.hpp> +#include <com/sun/star/lang/XInitialization.hpp> +#include <com/sun/star/lang/XMultiServiceFactory.hpp> +#include <com/sun/star/lang/XServiceInfo.hpp> +#include <com/sun/star/lang/XTypeProvider.hpp> +#include <com/sun/star/lang/XUnoTunnel.hpp> +#include <com/sun/star/media/XPlayer.hpp> +#include <com/sun/star/office/XAnnotation.hpp> +#include <com/sun/star/office/XAnnotationAccess.hpp> +#include <com/sun/star/office/XAnnotationEnumeration.hpp> +#include <com/sun/star/presentation/AnimationSpeed.hpp> +#include <com/sun/star/presentation/EffectCommands.hpp> +#include <com/sun/star/presentation/EffectNodeType.hpp> +#include <com/sun/star/presentation/EffectPresetClass.hpp> +#include <com/sun/star/presentation/ParagraphTarget.hpp> +#include <com/sun/star/presentation/ShapeAnimationSubType.hpp> +#include <com/sun/star/presentation/TextAnimationType.hpp> +#include <com/sun/star/style/LineSpacing.hpp> +#include <com/sun/star/style/TabStop.hpp> +#include <com/sun/star/style/XStyle.hpp> +#include <com/sun/star/task/XStatusIndicator.hpp> +#include <com/sun/star/text/XSimpleText.hpp> +#include <com/sun/star/text/XText.hpp> +#include <com/sun/star/text/XTextCopy.hpp> +#include <com/sun/star/text/XTextRange.hpp> +#include <com/sun/star/text/XTextRangeCompare.hpp> +#include <com/sun/star/uno/Any.h> +#include <com/sun/star/uno/Any.hxx> +#include <com/sun/star/uno/Reference.h> +#include <com/sun/star/uno/Reference.hxx> +#include <com/sun/star/uno/RuntimeException.hpp> +#include <com/sun/star/uno/Sequence.h> +#include <com/sun/star/uno/Sequence.hxx> +#include <com/sun/star/uno/Type.h> +#include <com/sun/star/uno/Type.hxx> +#include <com/sun/star/uno/TypeClass.hdl> +#include <com/sun/star/uno/XComponentContext.hpp> +#include <com/sun/star/uno/XInterface.hpp> +#include <com/sun/star/uno/genfunc.hxx> +#include <com/sun/star/util/DateTime.hpp> +#include <com/sun/star/util/URLTransformer.hpp> +#include <com/sun/star/util/XCloneable.hpp> +#include <comphelper/classids.hxx> +#include <comphelper/compbase.hxx> +#include <comphelper/comphelperdllapi.h> +#include <comphelper/diagnose_ex.hxx> +#include <comphelper/errcode.hxx> +#include <comphelper/extract.hxx> +#include <comphelper/lok.hxx> +#include <comphelper/processfactory.hxx> +#include <comphelper/propertysequence.hxx> +#include <comphelper/propertyvalue.hxx> +#include <comphelper/scopeguard.hxx> +#include <comphelper/sequence.hxx> +#include <comphelper/sequenceashashmap.hxx> +#include <comphelper/servicehelper.hxx> +#include <comphelper/storagehelper.hxx> +#include <controller/SlideSorterController.hxx> +#include <controller/SlsClipboard.hxx> +#include <controller/SlsCurrentSlideManager.hxx> +#include <controller/SlsFocusManager.hxx> +#include <controller/SlsInsertionIndicatorHandler.hxx> +#include <controller/SlsPageSelector.hxx> +#include <controller/SlsProperties.hxx> +#include <controller/SlsScrollBarManager.hxx> +#include <controller/SlsSelectionFunction.hxx> +#include <controller/SlsSelectionManager.hxx> +#include <controller/SlsSelectionObserver.hxx> +#include <controller/SlsSlotManager.hxx> +#include <controller/SlsVisibleAreaManager.hxx> +#include <cppcanvas/vclfactory.hxx> +#include <cppu/cppudllapi.h> +#include <cppu/unotype.hxx> +#include <cppuhelper/basemutex.hxx> +#include <cppuhelper/cppuhelperdllapi.h> +#include <cppuhelper/implbase.hxx> +#include <cppuhelper/supportsservice.hxx> +#include <cppuhelper/weakagg.hxx> +#include <cppuhelper/weakref.hxx> +#include <drawinglayer/drawinglayerdllapi.h> +#include <drawinglayer/geometry/viewinformation2d.hxx> +#include <editeng/adjustitem.hxx> +#include <editeng/boxitem.hxx> +#include <editeng/cmapitem.hxx> +#include <editeng/colritem.hxx> +#include <editeng/contouritem.hxx> +#include <editeng/crossedoutitem.hxx> +#include <editeng/editdata.hxx> +#include <editeng/editeng.hxx> +#include <editeng/editengdllapi.h> +#include <editeng/editobj.hxx> +#include <editeng/editstat.hxx> +#include <editeng/editview.hxx> +#include <editeng/eeitem.hxx> +#include <editeng/escapementitem.hxx> +#include <editeng/fhgtitem.hxx> +#include <editeng/flditem.hxx> +#include <editeng/flstitem.hxx> +#include <editeng/fontitem.hxx> +#include <editeng/frmdiritem.hxx> +#include <editeng/langitem.hxx> +#include <editeng/lrspitem.hxx> +#include <editeng/lspcitem.hxx> +#include <editeng/memberids.h> +#include <editeng/numitem.hxx> +#include <editeng/outliner.hxx> +#include <editeng/outlobj.hxx> +#include <editeng/postitem.hxx> +#include <editeng/shdditem.hxx> +#include <editeng/sizeitem.hxx> +#include <editeng/udlnitem.hxx> +#include <editeng/ulspitem.hxx> +#include <editeng/unoedsrc.hxx> +#include <editeng/unolingu.hxx> +#include <editeng/wghtitem.hxx> +#include <filter/msfilter/msfilterdllapi.h> +#include <framework/ConfigurationController.hxx> +#include <framework/FrameworkHelper.hxx> +#include <framework/Pane.hxx> +#include <framework/ViewShellWrapper.hxx> +#include <i18nlangtag/lang.h> +#include <i18nlangtag/languagetag.hxx> +#include <model/SlideSorterModel.hxx> +#include <model/SlsPageDescriptor.hxx> +#include <model/SlsPageEnumerationProvider.hxx> +#include <o3tl/any.hxx> +#include <o3tl/cow_wrapper.hxx> +#include <o3tl/deleter.hxx> +#include <o3tl/safeint.hxx> +#include <o3tl/sorted_vector.hxx> +#include <o3tl/string_view.hxx> +#include <o3tl/strong_int.hxx> +#include <o3tl/typed_flags_set.hxx> +#include <o3tl/underlyingenumvalue.hxx> +#include <o3tl/unit_conversion.hxx> +#include <officecfg/Office/Common.hxx> +#include <oox/dllapi.h> +#include <oox/drawingml/drawingmltypes.hxx> +#include <salhelper/simplereferenceobject.hxx> +#include <salhelper/thread.hxx> +#include <sfx2/app.hxx> +#include <sfx2/basedlgs.hxx> +#include <sfx2/bindings.hxx> +#include <sfx2/chalign.hxx> +#include <sfx2/childwin.hxx> +#include <sfx2/devtools/DevelopmentToolChildWindow.hxx> +#include <sfx2/dispatch.hxx> +#include <sfx2/dllapi.h> +#include <sfx2/docfile.hxx> +#include <sfx2/docfilt.hxx> +#include <sfx2/fcontnr.hxx> +#include <sfx2/frame.hxx> +#include <sfx2/infobar.hxx> +#include <sfx2/ipclient.hxx> +#include <sfx2/linkmgr.hxx> +#include <sfx2/lokhelper.hxx> +#include <sfx2/msg.hxx> +#include <sfx2/notebookbar/SfxNotebookBar.hxx> +#include <sfx2/objface.hxx> +#include <sfx2/objsh.hxx> +#include <sfx2/printer.hxx> +#include <sfx2/progress.hxx> +#include <sfx2/request.hxx> +#include <sfx2/sfxdlg.hxx> +#include <sfx2/shell.hxx> +#include <sfx2/sidebar/Sidebar.hxx> +#include <sfx2/sidebar/SidebarChildWindow.hxx> +#include <sfx2/stbitem.hxx> +#include <sfx2/tbxctrl.hxx> +#include <sfx2/tplpitem.hxx> +#include <sfx2/viewfac.hxx> +#include <sfx2/viewfrm.hxx> +#include <sfx2/viewsh.hxx> +#include <sfx2/zoomitem.hxx> +#include <sot/exchange.hxx> +#include <sot/formats.hxx> +#include <sot/storage.hxx> +#include <svl/SfxBroadcaster.hxx> +#include <svl/cjkoptions.hxx> +#include <svl/eitem.hxx> +#include <svl/hint.hxx> +#include <svl/intitem.hxx> +#include <svl/itempool.hxx> +#include <svl/itemset.hxx> +#include <svl/lstner.hxx> +#include <svl/macitem.hxx> +#include <svl/metitem.hxx> +#include <svl/poolitem.hxx> +#include <svl/ptitem.hxx> +#include <svl/srchitem.hxx> +#include <svl/stritem.hxx> +#include <svl/style.hxx> +#include <svl/svldllapi.h> +#include <svl/typedwhich.hxx> +#include <svl/urihelper.hxx> +#include <svl/urlbmk.hxx> +#include <svl/whiter.hxx> +#include <svtools/ehdl.hxx> +#include <svtools/sfxecode.hxx> +#include <svtools/svtdllapi.h> +#include <svtools/svtresid.hxx> +#include <svx/ImageMapInfo.hxx> +#include <svx/SvxColorChildWindow.hxx> +#include <svx/bmpmask.hxx> +#include <svx/clipfmtitem.hxx> +#include <svx/dialmgr.hxx> +#include <svx/drawitem.hxx> +#include <svx/extrusionbar.hxx> +#include <svx/f3dchild.hxx> +#include <svx/fmshell.hxx> +#include <svx/fontwork.hxx> +#include <svx/fontworkbar.hxx> +#include <svx/gallery.hxx> +#include <svx/hlnkitem.hxx> +#include <svx/hyperdlg.hxx> +#include <svx/imapdlg.hxx> +#include <svx/msdffdef.hxx> +#include <svx/obj3d.hxx> +#include <svx/pageitem.hxx> +#include <svx/ruler.hxx> +#include <svx/rulritem.hxx> +#include <svx/scene3d.hxx> +#include <svx/sdmetitm.hxx> +#include <svx/sdooitm.hxx> +#include <svx/sdr/contact/viewcontact.hxx> +#include <svx/sdr/contact/viewobjectcontact.hxx> +#include <svx/sdr/overlay/overlayobject.hxx> +#include <svx/sdrpagewindow.hxx> +#include <svx/sdrpaintwindow.hxx> +#include <svx/sdtagitm.hxx> +#include <svx/sdtfsitm.hxx> +#include <svx/sdtmfitm.hxx> +#include <svx/srchdlg.hxx> +#include <svx/svddef.hxx> +#include <svx/svdetc.hxx> +#include <svx/svdhdl.hxx> +#include <svx/svditer.hxx> +#include <svx/svdlayer.hxx> +#include <svx/svdobj.hxx> +#include <svx/svdograf.hxx> +#include <svx/svdogrp.hxx> +#include <svx/svdoole2.hxx> +#include <svx/svdopage.hxx> +#include <svx/svdopath.hxx> +#include <svx/svdorect.hxx> +#include <svx/svdotable.hxx> +#include <svx/svdotext.hxx> +#include <svx/svdouno.hxx> +#include <svx/svdoutl.hxx> +#include <svx/svdpage.hxx> +#include <svx/svdpagv.hxx> +#include <svx/svdpool.hxx> +#include <svx/svdtypes.hxx> +#include <svx/svdundo.hxx> +#include <svx/svxdlg.hxx> +#include <svx/svxdllapi.h> +#include <svx/unoapi.hxx> +#include <svx/unoshape.hxx> +#include <svx/xbtmpit.hxx> +#include <svx/xdef.hxx> +#include <svx/xfillit0.hxx> +#include <svx/xflclit.hxx> +#include <svx/xflgrit.hxx> +#include <svx/xflhtit.hxx> +#include <svx/xit.hxx> +#include <svx/xlineit0.hxx> +#include <svx/xlnclit.hxx> +#include <svx/xlndsit.hxx> +#include <svx/xlnedit.hxx> +#include <svx/xlnstit.hxx> +#include <svx/xlnwtit.hxx> +#include <svx/xpoly.hxx> +#include <svx/xtable.hxx> +#include <svx/zoomslideritem.hxx> +#include <toolkit/helper/vclunohelper.hxx> +#include <tools/UnitConversion.hxx> +#include <tools/color.hxx> +#include <tools/debug.hxx> +#include <tools/degree.hxx> +#include <tools/fldunit.hxx> +#include <tools/fontenum.hxx> +#include <tools/fract.hxx> +#include <tools/gen.hxx> +#include <tools/globname.hxx> +#include <tools/link.hxx> +#include <tools/long.hxx> +#include <tools/mapunit.hxx> +#include <tools/poly.hxx> +#include <tools/ref.hxx> +#include <tools/solar.h> +#include <tools/stream.hxx> +#include <tools/toolsdllapi.h> +#include <tools/urlobj.hxx> +#include <tools/weakbase.h> +#include <typelib/typedescription.h> +#include <undo/undomanager.hxx> +#include <undo/undoobjects.hxx> +#include <uno/any2.h> +#include <uno/data.h> +#include <uno/sequence2.h> +#include <unotools/configmgr.hxx> +#include <unotools/localedatawrapper.hxx> +#include <unotools/moduleoptions.hxx> +#include <unotools/options.hxx> +#include <unotools/pathoptions.hxx> +#include <unotools/resmgr.hxx> +#include <unotools/streamwrap.hxx> +#include <unotools/syslocale.hxx> +#include <unotools/ucbstreamhelper.hxx> +#include <unotools/unotoolsdllapi.h> +#include <unotools/useroptions.hxx> +#include <view/SlideSorterView.hxx> +#include <view/SlsLayouter.hxx> +#include <view/SlsPageObjectLayouter.hxx> +#include <view/SlsTheme.hxx> +#include <xmloff/autolayout.hxx> +#endif // PCH_LEVEL >= 3 +#if PCH_LEVEL >= 4 +#include <AnimationChildWindow.hxx> +#include <Annotation.hxx> +#include <Client.hxx> +#include <CustomAnimationEffect.hxx> +#include <CustomAnimationPane.hxx> +#include <CustomAnimationPreset.hxx> +#include <DrawController.hxx> +#include <DrawDocShell.hxx> +#include <DrawViewShell.hxx> +#include <EffectMigration.hxx> +#include <EventMultiplexer.hxx> +#include <FactoryIds.hxx> +#include <FormShellManager.hxx> +#include <FrameView.hxx> +#include <GraphicDocShell.hxx> +#include <GraphicViewShell.hxx> +#include <LayerTabBar.hxx> +#include <MasterPageObserver.hxx> +#include <OutlineView.hxx> +#include <OutlineViewShell.hxx> +#include <Outliner.hxx> +#include <PaneChildWindows.hxx> +#include <PresentationViewShell.hxx> +#include <PreviewRenderer.hxx> +#include <SlideSorter.hxx> +#include <SlideSorterViewShell.hxx> +#include <SpellDialogChildWindow.hxx> +#include <TextObjectBar.hxx> +#include <ToolBarManager.hxx> +#include <View.hxx> +#include <ViewShell.hxx> +#include <ViewShellBase.hxx> +#include <ViewShellHint.hxx> +#include <ViewShellImplementation.hxx> +#include <ViewShellManager.hxx> +#include <Window.hxx> +#include <anminfo.hxx> +#include <cusshow.hxx> +#include <customshowlist.hxx> +#include <drawdoc.hxx> +#include <drawview.hxx> +#include <fubullet.hxx> +#include <fuconstr.hxx> +#include <fucushow.hxx> +#include <fudraw.hxx> +#include <fuexpand.hxx> +#include <fuinsfil.hxx> +#include <fupoor.hxx> +#include <fusel.hxx> +#include <fusldlg.hxx> +#include <fusumry.hxx> +#include <futempl.hxx> +#include <futext.hxx> +#include <glob.hxx> +#include <helpids.h> +#include <navigatr.hxx> +#include <notifydocumentevent.hxx> +#include <optsitem.hxx> +#include <pres.hxx> +#include <sdabstdlg.hxx> +#include <sddll.hxx> +#include <sddllapi.h> +#include <sdfilter.hxx> +#include <sdmod.hxx> +#include <sdpage.hxx> +#include <sdresid.hxx> +#include <sdtreelb.hxx> +#include <sdundo.hxx> +#include <sdundogr.hxx> +#include <sdxfer.hxx> +#include <slideshow.hxx> +#include <stlpool.hxx> +#include <stlsheet.hxx> +#include <strings.hxx> +#include <titledockwin.hxx> +#include <unchss.hxx> +#include <undoanim.hxx> +#include <unmodpg.hxx> +#include <unokywds.hxx> +#include <unomodel.hxx> +#include <unopage.hxx> +#include <unoprnms.hxx> +#include <zoomlist.hxx> +#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 0000000000..0471b10db7 --- /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 0000000000..00b2c8389d --- /dev/null +++ b/sd/inc/pch/precompiled_sdui.hxx @@ -0,0 +1,530 @@ +/* -*- 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 2023-07-19 09:28:08 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 <sal/config.h> +#if PCH_LEVEL >= 1 +#include <algorithm> +#include <array> +#include <cassert> +#include <chrono> +#include <cmath> +#include <cstddef> +#include <cstdlib> +#include <cstring> +#include <deque> +#include <float.h> +#include <functional> +#include <initializer_list> +#include <iomanip> +#include <iterator> +#include <limits.h> +#include <limits> +#include <map> +#include <math.h> +#include <memory> +#include <mutex> +#include <new> +#include <numeric> +#include <optional> +#include <ostream> +#include <set> +#include <span> +#include <stddef.h> +#include <stdexcept> +#include <string.h> +#include <string> +#include <string_view> +#include <type_traits> +#include <typeinfo> +#include <unordered_map> +#include <unordered_set> +#include <utility> +#include <vector> +#include <boost/property_tree/ptree_fwd.hpp> +#endif // PCH_LEVEL >= 1 +#if PCH_LEVEL >= 2 +#include <osl/conditn.hxx> +#include <osl/diagnose.h> +#include <osl/doublecheckedlocking.h> +#include <osl/endian.h> +#include <osl/getglobalmutex.hxx> +#include <osl/interlck.h> +#include <osl/mutex.h> +#include <osl/mutex.hxx> +#include <osl/socket_decl.hxx> +#include <osl/thread.h> +#include <osl/time.h> +#include <rtl/alloc.h> +#include <rtl/byteseq.h> +#include <rtl/character.hxx> +#include <rtl/instance.hxx> +#include <rtl/locale.h> +#include <rtl/math.h> +#include <rtl/ref.hxx> +#include <rtl/strbuf.h> +#include <rtl/strbuf.hxx> +#include <rtl/string.h> +#include <rtl/string.hxx> +#include <rtl/stringconcat.hxx> +#include <rtl/stringutils.hxx> +#include <rtl/textcvt.h> +#include <rtl/textenc.h> +#include <rtl/ustrbuf.h> +#include <rtl/ustrbuf.hxx> +#include <rtl/ustring.h> +#include <rtl/ustring.hxx> +#include <rtl/uuid.h> +#include <sal/backtrace.hxx> +#include <sal/log.hxx> +#include <sal/macros.h> +#include <sal/saldllapi.h> +#include <sal/types.h> +#include <sal/typesizes.h> +#include <vcl/BinaryDataContainer.hxx> +#include <vcl/BitmapColor.hxx> +#include <vcl/BitmapPalette.hxx> +#include <vcl/ColorMask.hxx> +#include <vcl/GraphicAttributes.hxx> +#include <vcl/GraphicExternalLink.hxx> +#include <vcl/GraphicObject.hxx> +#include <vcl/IDialogRenderable.hxx> +#include <vcl/ITiledRenderable.hxx> +#include <vcl/InterimItemWindow.hxx> +#include <vcl/Scanline.hxx> +#include <vcl/WindowPosSize.hxx> +#include <vcl/alpha.hxx> +#include <vcl/animate/Animation.hxx> +#include <vcl/animate/AnimationFrame.hxx> +#include <vcl/bitmap.hxx> +#include <vcl/bitmap/BitmapTypes.hxx> +#include <vcl/bitmapex.hxx> +#include <vcl/builderpage.hxx> +#include <vcl/cairo.hxx> +#include <vcl/checksum.hxx> +#include <vcl/ctrl.hxx> +#include <vcl/customweld.hxx> +#include <vcl/dllapi.h> +#include <vcl/dockwin.hxx> +#include <vcl/event.hxx> +#include <vcl/fntstyle.hxx> +#include <vcl/font.hxx> +#include <vcl/formatter.hxx> +#include <vcl/gdimtf.hxx> +#include <vcl/gfxlink.hxx> +#include <vcl/gradient.hxx> +#include <vcl/graph.hxx> +#include <vcl/idle.hxx> +#include <vcl/image.hxx> +#include <vcl/kernarray.hxx> +#include <vcl/keycod.hxx> +#include <vcl/keycodes.hxx> +#include <vcl/mapmod.hxx> +#include <vcl/metaactiontypes.hxx> +#include <vcl/metric.hxx> +#include <vcl/outdev.hxx> +#include <vcl/ptrstyle.hxx> +#include <vcl/region.hxx> +#include <vcl/rendercontext/AddFontSubstituteFlags.hxx> +#include <vcl/rendercontext/AntialiasingFlags.hxx> +#include <vcl/rendercontext/DrawGridFlags.hxx> +#include <vcl/rendercontext/DrawImageFlags.hxx> +#include <vcl/rendercontext/DrawModeFlags.hxx> +#include <vcl/rendercontext/DrawTextFlags.hxx> +#include <vcl/rendercontext/GetDefaultFontFlags.hxx> +#include <vcl/rendercontext/ImplMapRes.hxx> +#include <vcl/rendercontext/InvertFlags.hxx> +#include <vcl/rendercontext/RasterOp.hxx> +#include <vcl/rendercontext/SalLayoutFlags.hxx> +#include <vcl/rendercontext/State.hxx> +#include <vcl/rendercontext/SystemTextColorFlags.hxx> +#include <vcl/salgtype.hxx> +#include <vcl/salnativewidgets.hxx> +#include <vcl/scrollable.hxx> +#include <vcl/settings.hxx> +#include <vcl/svapp.hxx> +#include <vcl/syswin.hxx> +#include <vcl/task.hxx> +#include <vcl/timer.hxx> +#include <vcl/transfer.hxx> +#include <vcl/uitest/factory.hxx> +#include <vcl/vclenum.hxx> +#include <vcl/vclptr.hxx> +#include <vcl/vclreferencebase.hxx> +#include <vcl/vectorgraphicdata.hxx> +#include <vcl/wall.hxx> +#include <vcl/weld.hxx> +#include <vcl/weldutils.hxx> +#include <vcl/window.hxx> +#include <vcl/windowstate.hxx> +#include <vcl/wintypes.hxx> +#endif // PCH_LEVEL >= 2 +#if PCH_LEVEL >= 3 +#include <basegfx/basegfxdllapi.h> +#include <basegfx/color/bcolor.hxx> +#include <basegfx/matrix/b2dhommatrix.hxx> +#include <basegfx/matrix/hommatrixtemplate.hxx> +#include <basegfx/numeric/ftools.hxx> +#include <basegfx/point/b2dpoint.hxx> +#include <basegfx/point/b2ipoint.hxx> +#include <basegfx/polygon/b2dpolygon.hxx> +#include <basegfx/polygon/b2dpolypolygon.hxx> +#include <basegfx/range/Range2D.hxx> +#include <basegfx/range/b2drange.hxx> +#include <basegfx/range/b2drectangle.hxx> +#include <basegfx/range/basicrange.hxx> +#include <basegfx/tuple/Size2D.hxx> +#include <basegfx/tuple/Tuple2D.hxx> +#include <basegfx/tuple/Tuple3D.hxx> +#include <basegfx/tuple/b2dtuple.hxx> +#include <basegfx/tuple/b2i64tuple.hxx> +#include <basegfx/tuple/b2ituple.hxx> +#include <basegfx/tuple/b3dtuple.hxx> +#include <basegfx/utils/bgradient.hxx> +#include <basegfx/utils/common.hxx> +#include <basegfx/vector/b2dsize.hxx> +#include <basegfx/vector/b2dvector.hxx> +#include <basegfx/vector/b2enums.hxx> +#include <basegfx/vector/b2isize.hxx> +#include <basegfx/vector/b2ivector.hxx> +#include <com/sun/star/awt/DeviceInfo.hpp> +#include <com/sun/star/awt/Gradient2.hpp> +#include <com/sun/star/awt/GradientStyle.hpp> +#include <com/sun/star/awt/Key.hpp> +#include <com/sun/star/awt/KeyGroup.hpp> +#include <com/sun/star/awt/PosSize.hpp> +#include <com/sun/star/awt/SystemPointer.hpp> +#include <com/sun/star/awt/XWindow.hpp> +#include <com/sun/star/awt/XWindowPeer.hpp> +#include <com/sun/star/beans/PropertyValue.hpp> +#include <com/sun/star/beans/XPropertySet.hpp> +#include <com/sun/star/container/XChild.hpp> +#include <com/sun/star/container/XIndexContainer.hpp> +#include <com/sun/star/container/XIndexReplace.hpp> +#include <com/sun/star/container/XNameContainer.hpp> +#include <com/sun/star/container/XNamed.hpp> +#include <com/sun/star/datatransfer/DataFlavor.hpp> +#include <com/sun/star/datatransfer/XTransferable.hpp> +#include <com/sun/star/datatransfer/XTransferable2.hpp> +#include <com/sun/star/datatransfer/clipboard/XClipboard.hpp> +#include <com/sun/star/datatransfer/clipboard/XClipboardOwner.hpp> +#include <com/sun/star/datatransfer/dnd/DNDConstants.hpp> +#include <com/sun/star/datatransfer/dnd/DropTargetDragEvent.hpp> +#include <com/sun/star/datatransfer/dnd/DropTargetDropEvent.hpp> +#include <com/sun/star/datatransfer/dnd/XDragGestureListener.hpp> +#include <com/sun/star/datatransfer/dnd/XDragSourceListener.hpp> +#include <com/sun/star/datatransfer/dnd/XDropTargetListener.hpp> +#include <com/sun/star/document/EventObject.hpp> +#include <com/sun/star/document/XCmisDocument.hpp> +#include <com/sun/star/document/XDocumentEventBroadcaster.hpp> +#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp> +#include <com/sun/star/document/XDocumentRecovery.hpp> +#include <com/sun/star/document/XDocumentSubStorageSupplier.hpp> +#include <com/sun/star/document/XEmbeddedScripts.hpp> +#include <com/sun/star/document/XEventBroadcaster.hpp> +#include <com/sun/star/document/XEventsSupplier.hpp> +#include <com/sun/star/document/XLinkTargetSupplier.hpp> +#include <com/sun/star/document/XScriptInvocationContext.hpp> +#include <com/sun/star/document/XShapeEventBroadcaster.hpp> +#include <com/sun/star/document/XStorageBasedDocument.hpp> +#include <com/sun/star/document/XUndoManagerSupplier.hpp> +#include <com/sun/star/document/XViewDataSupplier.hpp> +#include <com/sun/star/drawing/DashStyle.hpp> +#include <com/sun/star/drawing/HatchStyle.hpp> +#include <com/sun/star/drawing/LineCap.hpp> +#include <com/sun/star/drawing/TextFitToSizeType.hpp> +#include <com/sun/star/drawing/XDrawPageDuplicator.hpp> +#include <com/sun/star/drawing/XDrawPages.hpp> +#include <com/sun/star/drawing/XDrawPagesSupplier.hpp> +#include <com/sun/star/drawing/XLayerSupplier.hpp> +#include <com/sun/star/drawing/XMasterPagesSupplier.hpp> +#include <com/sun/star/drawing/XPresenterHelper.hpp> +#include <com/sun/star/drawing/framework/XConfigurationController.hpp> +#include <com/sun/star/embed/Aspects.hpp> +#include <com/sun/star/embed/XStorage.hpp> +#include <com/sun/star/embed/XVisualObject.hpp> +#include <com/sun/star/form/FormComponentType.hpp> +#include <com/sun/star/frame/XDispatch.hpp> +#include <com/sun/star/frame/XFrame.hpp> +#include <com/sun/star/frame/XLoadable.hpp> +#include <com/sun/star/frame/XModel3.hpp> +#include <com/sun/star/frame/XModule.hpp> +#include <com/sun/star/frame/XStatusListener.hpp> +#include <com/sun/star/frame/XStorable2.hpp> +#include <com/sun/star/frame/XTerminateListener.hpp> +#include <com/sun/star/frame/XTitle.hpp> +#include <com/sun/star/frame/XTitleChangeBroadcaster.hpp> +#include <com/sun/star/frame/XUntitledNumbers.hpp> +#include <com/sun/star/graphic/XGraphic.hpp> +#include <com/sun/star/graphic/XPrimitive2D.hpp> +#include <com/sun/star/i18n/ForbiddenCharacters.hpp> +#include <com/sun/star/i18n/WordType.hpp> +#include <com/sun/star/io/XInputStream.hpp> +#include <com/sun/star/io/XOutputStream.hpp> +#include <com/sun/star/io/XSeekable.hpp> +#include <com/sun/star/io/XStream.hpp> +#include <com/sun/star/io/XTruncate.hpp> +#include <com/sun/star/lang/DisposedException.hpp> +#include <com/sun/star/lang/EventObject.hpp> +#include <com/sun/star/lang/Locale.hpp> +#include <com/sun/star/lang/XComponent.hpp> +#include <com/sun/star/lang/XEventListener.hpp> +#include <com/sun/star/lang/XMultiComponentFactory.hpp> +#include <com/sun/star/lang/XMultiServiceFactory.hpp> +#include <com/sun/star/lang/XServiceInfo.hpp> +#include <com/sun/star/lang/XSingleServiceFactory.hpp> +#include <com/sun/star/lang/XTypeProvider.hpp> +#include <com/sun/star/lang/XUnoTunnel.hpp> +#include <com/sun/star/presentation/XCustomPresentationSupplier.hpp> +#include <com/sun/star/presentation/XHandoutMasterSupplier.hpp> +#include <com/sun/star/presentation/XPresentationSupplier.hpp> +#include <com/sun/star/rdf/XDocumentMetadataAccess.hpp> +#include <com/sun/star/rendering/CompositeOperation.hpp> +#include <com/sun/star/rendering/TextDirection.hpp> +#include <com/sun/star/script/XStarBasicAccess.hpp> +#include <com/sun/star/script/provider/XScriptProviderSupplier.hpp> +#include <com/sun/star/style/NumberingType.hpp> +#include <com/sun/star/style/XStyle.hpp> +#include <com/sun/star/style/XStyleFamiliesSupplier.hpp> +#include <com/sun/star/text/textfield/Type.hpp> +#include <com/sun/star/ucb/XAnyCompareFactory.hpp> +#include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp> +#include <com/sun/star/uno/Any.h> +#include <com/sun/star/uno/Any.hxx> +#include <com/sun/star/uno/Reference.h> +#include <com/sun/star/uno/Reference.hxx> +#include <com/sun/star/uno/RuntimeException.hpp> +#include <com/sun/star/uno/Sequence.h> +#include <com/sun/star/uno/Sequence.hxx> +#include <com/sun/star/uno/Type.h> +#include <com/sun/star/uno/Type.hxx> +#include <com/sun/star/uno/TypeClass.hdl> +#include <com/sun/star/uno/XInterface.hpp> +#include <com/sun/star/uno/XWeak.hpp> +#include <com/sun/star/uno/genfunc.h> +#include <com/sun/star/uno/genfunc.hxx> +#include <com/sun/star/util/Date.hpp> +#include <com/sun/star/util/DateTime.hpp> +#include <com/sun/star/util/Time.hpp> +#include <com/sun/star/util/XAccounting.hpp> +#include <com/sun/star/util/XCloseable.hpp> +#include <com/sun/star/util/XModifiable2.hpp> +#include <com/sun/star/view/XPrintJobBroadcaster.hpp> +#include <com/sun/star/view/XPrintable.hpp> +#include <com/sun/star/view/XRenderable.hpp> +#include <comphelper/compbase.hxx> +#include <comphelper/comphelperdllapi.h> +#include <comphelper/errcode.hxx> +#include <comphelper/interfacecontainer4.hxx> +#include <comphelper/servicehelper.hxx> +#include <comphelper/unoimplbase.hxx> +#include <cppu/cppudllapi.h> +#include <cppu/unotype.hxx> +#include <cppuhelper/basemutex.hxx> +#include <cppuhelper/compbase.hxx> +#include <cppuhelper/cppuhelperdllapi.h> +#include <cppuhelper/implbase.hxx> +#include <cppuhelper/implbase_ex.hxx> +#include <cppuhelper/implbase_ex_post.hxx> +#include <cppuhelper/implbase_ex_pre.hxx> +#include <cppuhelper/queryinterface.hxx> +#include <cppuhelper/weak.hxx> +#include <cppuhelper/weakref.hxx> +#include <cui/cuidllapi.h> +#include <docmodel/color/ComplexColor.hxx> +#include <docmodel/color/Transformation.hxx> +#include <docmodel/dllapi.h> +#include <docmodel/theme/ThemeColorType.hxx> +#include <drawinglayer/drawinglayerdllapi.h> +#include <drawinglayer/geometry/viewinformation2d.hxx> +#include <drawinglayer/primitive2d/CommonTypes.hxx> +#include <drawinglayer/primitive2d/Primitive2DContainer.hxx> +#include <drawinglayer/primitive2d/Primitive2DVisitor.hxx> +#include <drawinglayer/primitive2d/baseprimitive2d.hxx> +#include <editeng/editdata.hxx> +#include <editeng/editengdllapi.h> +#include <editeng/editstat.hxx> +#include <editeng/editview.hxx> +#include <editeng/eedata.hxx> +#include <editeng/eeitem.hxx> +#include <editeng/flditem.hxx> +#include <editeng/forbiddencharacterstable.hxx> +#include <editeng/numdef.hxx> +#include <editeng/outliner.hxx> +#include <editeng/outlobj.hxx> +#include <editeng/overflowingtxt.hxx> +#include <editeng/paragraphdata.hxx> +#include <editeng/svxenum.hxx> +#include <editeng/svxfont.hxx> +#include <helper/simplereferencecomponent.hxx> +#include <i18nlangtag/i18nlangtagdllapi.h> +#include <i18nlangtag/lang.h> +#include <i18nlangtag/languagetag.hxx> +#include <o3tl/cow_wrapper.hxx> +#include <o3tl/deleter.hxx> +#include <o3tl/enumarray.hxx> +#include <o3tl/hash_combine.hxx> +#include <o3tl/safeint.hxx> +#include <o3tl/sorted_vector.hxx> +#include <o3tl/strong_int.hxx> +#include <o3tl/typed_flags_set.hxx> +#include <o3tl/underlyingenumvalue.hxx> +#include <o3tl/unit_conversion.hxx> +#include <salhelper/salhelperdllapi.h> +#include <salhelper/simplereferenceobject.hxx> +#include <salhelper/thread.hxx> +#include <sfx2/basedlgs.hxx> +#include <sfx2/dllapi.h> +#include <sfx2/namedcolor.hxx> +#include <sfx2/objsh.hxx> +#include <sfx2/sfxbasemodel.hxx> +#include <sfx2/shell.hxx> +#include <sfx2/tabdlg.hxx> +#include <sot/exchange.hxx> +#include <sot/formats.hxx> +#include <sot/sotdllapi.h> +#include <svl/SfxBroadcaster.hxx> +#include <svl/eitem.hxx> +#include <svl/hint.hxx> +#include <svl/intitem.hxx> +#include <svl/itempool.hxx> +#include <svl/itemset.hxx> +#include <svl/languageoptions.hxx> +#include <svl/lstner.hxx> +#include <svl/poolitem.hxx> +#include <svl/setitem.hxx> +#include <svl/stritem.hxx> +#include <svl/style.hxx> +#include <svl/stylesheetuser.hxx> +#include <svl/svldllapi.h> +#include <svl/typedwhich.hxx> +#include <svl/undo.hxx> +#include <svl/urlbmk.hxx> +#include <svl/whichranges.hxx> +#include <svtools/accessibilityoptions.hxx> +#include <svtools/colorcfg.hxx> +#include <svtools/svtdllapi.h> +#include <svtools/unitconv.hxx> +#include <svtools/valueset.hxx> +#include <svx/XPropertyEntry.hxx> +#include <svx/drawitem.hxx> +#include <svx/flagsdef.hxx> +#include <svx/fmdmod.hxx> +#include <svx/ipolypolygoneditorcontroller.hxx> +#include <svx/itextprovider.hxx> +#include <svx/sdr/animation/scheduler.hxx> +#include <svx/sdr/overlay/overlayobject.hxx> +#include <svx/sdr/overlay/overlayobjectlist.hxx> +#include <svx/sdr/properties/defaultproperties.hxx> +#include <svx/sdr/properties/properties.hxx> +#include <svx/sdrobjectuser.hxx> +#include <svx/sdtaditm.hxx> +#include <svx/sdtaitm.hxx> +#include <svx/sdtakitm.hxx> +#include <svx/selectioncontroller.hxx> +#include <svx/svdcrtv.hxx> +#include <svx/svddef.hxx> +#include <svx/svddrag.hxx> +#include <svx/svddrgv.hxx> +#include <svx/svdedtv.hxx> +#include <svx/svdedxv.hxx> +#include <svx/svdglev.hxx> +#include <svx/svdglue.hxx> +#include <svx/svdhdl.hxx> +#include <svx/svdhlpln.hxx> +#include <svx/svdlayer.hxx> +#include <svx/svdmark.hxx> +#include <svx/svdmodel.hxx> +#include <svx/svdmrkv.hxx> +#include <svx/svdoattr.hxx> +#include <svx/svdobj.hxx> +#include <svx/svdobjkind.hxx> +#include <svx/svdoedge.hxx> +#include <svx/svdotext.hxx> +#include <svx/svdpntv.hxx> +#include <svx/svdpoev.hxx> +#include <svx/svdsnpv.hxx> +#include <svx/svdsob.hxx> +#include <svx/svdtext.hxx> +#include <svx/svdtrans.hxx> +#include <svx/svdtypes.hxx> +#include <svx/svdundo.hxx> +#include <svx/svdxcgv.hxx> +#include <svx/svxdllapi.h> +#include <svx/unomod.hxx> +#include <svx/xdash.hxx> +#include <svx/xdef.hxx> +#include <svx/xhatch.hxx> +#include <svx/xpoly.hxx> +#include <svx/xtable.hxx> +#include <tools/color.hxx> +#include <tools/date.hxx> +#include <tools/datetime.hxx> +#include <tools/debug.hxx> +#include <tools/degree.hxx> +#include <tools/fldunit.hxx> +#include <tools/fontenum.hxx> +#include <tools/fract.hxx> +#include <tools/gen.hxx> +#include <tools/globname.hxx> +#include <tools/helpers.hxx> +#include <tools/lineend.hxx> +#include <tools/link.hxx> +#include <tools/long.hxx> +#include <tools/mapunit.hxx> +#include <tools/poly.hxx> +#include <tools/ref.hxx> +#include <tools/solar.h> +#include <tools/stream.hxx> +#include <tools/time.hxx> +#include <tools/toolsdllapi.h> +#include <tools/urlobj.hxx> +#include <tools/weakbase.h> +#include <typelib/typeclass.h> +#include <typelib/typedescription.h> +#include <typelib/uik.h> +#include <uno/any2.h> +#include <uno/data.h> +#include <uno/sequence2.h> +#include <unotools/fontcvt.hxx> +#include <unotools/fontdefs.hxx> +#include <unotools/options.hxx> +#include <unotools/resmgr.hxx> +#include <unotools/syslocale.hxx> +#include <unotools/tempfile.hxx> +#include <unotools/unotoolsdllapi.h> +#include <unotools/weakref.hxx> +#endif // PCH_LEVEL >= 3 +#if PCH_LEVEL >= 4 +#include <DrawController.hxx> +#include <DrawDocShell.hxx> +#include <View.hxx> +#include <drawdoc.hxx> +#include <fupoor.hxx> +#include <pres.hxx> +#include <sddllapi.h> +#include <sdmod.hxx> +#include <sdpage.hxx> +#include <sdresid.hxx> +#include <unomodel.hxx> +#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 0000000000..5d4a314517 --- /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 <sfx2/lnkbase.hxx> + +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 0000000000..ab2b44adf6 --- /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 0000000000..7cf768eae8 --- /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 0000000000..6bccc738b7 --- /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 <sal/config.h> + +#include <com/sun/star/uno/Reference.hxx> +#include <com/sun/star/uno/XInterface.hpp> + +#include "sddllapi.h" + +namespace sd +{ +SD_DLLPUBLIC css::uno::Reference<css::uno::XInterface> +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 0000000000..cac2602b69 --- /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 0000000000..594602af25 --- /dev/null +++ b/sd/inc/sdabstdlg.hxx @@ -0,0 +1,201 @@ +/* -*- 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 <vector> + +#include <rtl/string.hxx> +#include <sfx2/tabdlg.hxx> +#include <svl/itemset.hxx> +#include <tools/solar.h> +#include <vcl/abstdlg.hxx> +#include <svx/svxdlg.hxx> + +#include <com/sun/star/beans/PropertyValue.hpp> + +#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 OUString& rHelpId ) = 0; +}; + +class AbstractSdInsertPagesObjsDlg : public VclAbstractDialog +{ +protected: + virtual ~AbstractSdInsertPagesObjsDlg() override = default; +public: + virtual std::vector<OUString> 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 AbstractHeaderFooterDialog : public VclAbstractDialog +{ +protected: + virtual ~AbstractHeaderFooterDialog() override = default; +}; + +class SdAbstractDialogFactory +{ +public: + SD_DLLPUBLIC static SdAbstractDialogFactory* Create(); + + virtual VclPtr<AbstractSvxBulletAndPositionDlg> CreateSvxBulletAndPositionDlg(weld::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView) = 0; + virtual VclPtr<VclAbstractDialog> CreateBreakDlg(weld::Window* pWindow, ::sd::DrawView* pDrView, ::sd::DrawDocShell* pShell, sal_uLong nSumActionCount, sal_uLong nObjCount ) = 0; + virtual VclPtr<AbstractCopyDlg> CreateCopyDlg(weld::Window* pWindow, const SfxItemSet& rInAttrs, ::sd::View* pView ) = 0; + virtual VclPtr<AbstractSdCustomShowDlg> CreateSdCustomShowDlg(weld::Window* pWindow, SdDrawDocument& rDrawDoc) = 0; + virtual VclPtr<SfxAbstractTabDialog> CreateSdTabCharDialog(weld::Window* pWindow, const SfxItemSet* pAttr, SfxObjectShell* pDocShell) = 0; + virtual VclPtr<SfxAbstractTabDialog> CreateSdTabPageDialog(weld::Window* pWindow, const SfxItemSet* pAttr, SfxObjectShell* pDocShell, bool bAreaPage, bool bIsImpressDoc) = 0; + virtual VclPtr<AbstractSdModifyFieldDlg> CreateSdModifyFieldDlg(weld::Window* pWindow, const SvxFieldData* pInField, const SfxItemSet& rSet) = 0; + virtual VclPtr<AbstractSdSnapLineDlg> CreateSdSnapLineDlg(weld::Window* pParent, const SfxItemSet& rInAttrs, ::sd::View* pView) = 0; + virtual VclPtr<AbstractSdInsertLayerDlg> CreateSdInsertLayerDlg(weld::Window* pParent, const SfxItemSet& rInAttrs, bool bDeletable, const OUString& rStr) = 0; + virtual VclPtr<AbstractSdInsertPagesObjsDlg> CreateSdInsertPagesObjsDlg(weld::Window* pParent, const SdDrawDocument* pDoc, SfxMedium* pSfxMedium, const OUString& rFileName) = 0; + virtual VclPtr<AbstractMorphDlg> CreateMorphDlg(weld::Window* pParent, const SdrObject* pObj1, const SdrObject* pObj2) = 0; + virtual VclPtr<SfxAbstractTabDialog> CreateSdOutlineBulletTabDlg(weld::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView) = 0; + virtual VclPtr<SfxAbstractTabDialog> CreateSdParagraphTabDlg(weld::Window* pWindow, const SfxItemSet* pAttr) = 0; + virtual VclPtr<AbstractSdStartPresDlg> CreateSdStartPresentationDlg(weld::Window* pWindow, const SfxItemSet& rInAttrs, + const std::vector<OUString> &rPageNames, SdCustomShowList* pCSList ) = 0; + virtual VclPtr<VclAbstractDialog> CreateRemoteDialog(weld::Window* pWindow) = 0; + virtual VclPtr<SfxAbstractTabDialog> CreateSdPresLayoutTemplateDlg(SfxObjectShell* pDocSh, weld::Window* pParent, bool bBackgroundDlg, SfxStyleSheetBase& rStyleBase, PresentationObjects ePO, SfxStyleSheetBasePool* pSSPool) = 0; + virtual VclPtr<AbstractSdPresLayoutDlg> CreateSdPresLayoutDlg(weld::Window* pParent, ::sd::DrawDocShell* pDocShell, const SfxItemSet& rInAttrs) = 0; + virtual VclPtr<SfxAbstractTabDialog> CreateSdTabTemplateDlg(weld::Window* pParent, const SfxObjectShell* pDocShell, SfxStyleSheetBase& rStyleBase, SdrModel* pModel, SdrView* pView) = 0; + virtual VclPtr<SfxAbstractDialog> CreatSdActionDialog(weld::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView) = 0; + virtual VclPtr<AbstractSdVectorizeDlg> CreateSdVectorizeDlg(weld::Window* pParent, const Bitmap& rBmp, ::sd::DrawDocShell* pDocShell) = 0; + + virtual VclPtr<VclAbstractDialog> CreateMasterLayoutDialog(weld::Window* pParent, SdDrawDocument* pDoc, SdPage*) = 0; + + virtual VclPtr<AbstractHeaderFooterDialog> 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<VclAbstractDialog> 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 0000000000..f431dea4f6 --- /dev/null +++ b/sd/inc/sdattr.hrc @@ -0,0 +1,128 @@ +/* -*- 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 <svl/solar.hrc> + +class SdOptionsPrintItem; +class SfxInt32Item; +class SfxStringItem; +class SfxUInt32Item; +class XColorItem; + +// Layer attributes +#define ATTR_LAYER_START SID_SD_START + 1234 +#define ATTR_LAYER_NAME TypedWhichId<SfxStringItem>(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 TypedWhichId<SfxStringItem>(ATTR_LAYER_START + 5) +#define ATTR_LAYER_DESC TypedWhichId<SfxStringItem>(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 TypedWhichId<SfxStringItem>(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 TypedWhichId<SfxUInt32Item>(ATTR_PRESENT_START + 13) +#define ATTR_PRESENT_SHOW_PAUSELOGO ATTR_PRESENT_START + 14 +#define ATTR_PRESENT_DISPLAY TypedWhichId<SfxInt32Item>(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 TypedWhichId<SfxUInt16Item>(ATTR_ANIMATION_START + 1) +#define ATTR_ANIMATION_SPEED TypedWhichId<SfxUInt16Item>(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 TypedWhichId<SfxStringItem>(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 TypedWhichId<SfxUInt16Item>(ATTR_ACTION_START) +#define ATTR_ACTION_EFFECT TypedWhichId<SfxUInt16Item>(ATTR_ACTION_START + 1) +#define ATTR_ACTION_EFFECTSPEED TypedWhichId<SfxUInt16Item>(ATTR_ACTION_START + 2) +#define ATTR_ACTION_FILENAME TypedWhichId<SfxStringItem>(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<SfxUInt16Item>(ATTR_COPY_START) +#define ATTR_COPY_MOVE_X TypedWhichId<SfxInt32Item>(ATTR_COPY_START + 1) +#define ATTR_COPY_MOVE_Y TypedWhichId<SfxInt32Item>(ATTR_COPY_START + 2) +#define ATTR_COPY_ANGLE TypedWhichId<SdrAngleItem>(ATTR_COPY_START + 3) +#define ATTR_COPY_WIDTH TypedWhichId<SfxInt32Item>(ATTR_COPY_START + 4) +#define ATTR_COPY_HEIGHT TypedWhichId<SfxInt32Item>(ATTR_COPY_START + 5) +#define ATTR_COPY_START_COLOR TypedWhichId<XColorItem>(ATTR_COPY_START + 6) +#define ATTR_COPY_END_COLOR TypedWhichId<XColorItem>(ATTR_COPY_START + 7) +#define ATTR_COPY_END ATTR_COPY_END_COLOR + +#define ATTR_SNAPLINE_START ATTR_COPY_END + 1 +#define ATTR_SNAPLINE_KIND TypedWhichId<SfxUInt16Item>(ATTR_SNAPLINE_START) +#define ATTR_SNAPLINE_X TypedWhichId<SfxInt32Item>(ATTR_SNAPLINE_START + 1) +#define ATTR_SNAPLINE_Y TypedWhichId<SfxInt32Item>(ATTR_SNAPLINE_START + 2) +#define ATTR_SNAPLINE_END ATTR_SNAPLINE_Y + +#define ATTR_OPTIONS_START ATTR_SNAPLINE_END + 1 +#define ATTR_OPTIONS_LAYOUT TypedWhichId<SdOptionsLayoutItem>(ATTR_OPTIONS_START + 1) +#define ATTR_OPTIONS_MISC TypedWhichId<SdOptionsMiscItem>(ATTR_OPTIONS_START + 2) +#define ATTR_OPTIONS_SNAP TypedWhichId<SdOptionsSnapItem>(ATTR_OPTIONS_START + 3) +#define ATTR_OPTIONS_PRINT TypedWhichId<SdOptionsPrintItem>(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<SfxInt32Item>(ATTR_OPTIONS_SCALE_START) +#define ATTR_OPTIONS_SCALE_Y TypedWhichId<SfxInt32Item>(ATTR_OPTIONS_SCALE_START + 1) +#define ATTR_OPTIONS_SCALE_WIDTH TypedWhichId<SfxUInt32Item>(ATTR_OPTIONS_SCALE_START + 2) +#define ATTR_OPTIONS_SCALE_HEIGHT TypedWhichId<SfxUInt32Item>(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<SfxStringItem>(ATTR_PRESLAYOUT_START) +#define ATTR_PRESLAYOUT_LOAD ATTR_PRESLAYOUT_START + 1 +#define ATTR_PRESLAYOUT_MASTER_PAGE TypedWhichId<SfxBoolItem>(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<SfxBoolItem>(ATTR_PARANUMBERING_START) +#define ATTR_NUMBER_NEWSTART_AT TypedWhichId<SfxInt16Item>(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 0000000000..bff52726eb --- /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 <svl/eitem.hxx> +#include <svl/stritem.hxx> + +#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 0000000000..6d5022f3c4 --- /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 0000000000..6100f99e4c --- /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 <rtl/ustring.hxx> + +inline constexpr OUString CMD_SID_HANDOUT_MASTER_MODE = u".uno:HandoutMode"_ustr; +inline constexpr OUString CMD_SID_NOTES_MODE = u".uno:NotesMode"_ustr; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/sddll.hxx b/sd/inc/sddll.hxx new file mode 100644 index 0000000000..7f1258500e --- /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 0000000000..d8d4e1938b --- /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 <sal/types.h> + +#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 0000000000..bd04c67a9e --- /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 0000000000..850d10fbec --- /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 <comphelper/errcode.hxx> + +// 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 0000000000..1a8c8b6739 --- /dev/null +++ b/sd/inc/sdfilter.hxx @@ -0,0 +1,72 @@ +/* -*- 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 <osl/module.h> +#include <rtl/ustring.hxx> +#include <tools/ref.hxx> +#include <com/sun/star/beans/PropertyValue.hpp> +#include <com/sun/star/frame/XModel.hpp> +#include <com/sun/star/task/XStatusIndicator.hpp> +#include "sddllapi.h" +#include <vector> + +namespace osl { class Module; } +namespace sd { class DrawDocShell; } +class SdDrawDocument; +class SfxMedium; +class SfxObjectShell; +class SotStorage; +class SvMemoryStream; + +class SdFilter +{ +public: + SdFilter( SfxMedium& rMedium, ::sd::DrawDocShell& rDocShell ); + virtual ~SdFilter(); + + bool IsDraw() const { return mbIsDraw; } + virtual bool Export() = 0; + +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(); +}; + +SD_DLLPUBLIC bool ExportPPT( const std::vector< css::beans::PropertyValue >& rMediaData, + tools::SvRef<SotStorage> const & rSvStorage, + css::uno::Reference< css::frame::XModel > const & rXModel, + css::uno::Reference< css::task::XStatusIndicator > const & rXStatInd, + SvMemoryStream* pVBA, + sal_uInt32 nCnvrtFlags ); + +// exported function +SD_DLLPUBLIC bool ImportPPT( + SdDrawDocument* pDocument, SvStream& rDocStream, SotStorage& rStorage, SfxMedium& rMedium ); + +SD_DLLPUBLIC bool SaveVBA( SfxObjectShell& rDocShell, SvMemoryStream*& pBas ); + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/sdgrffilter.hxx b/sd/inc/sdgrffilter.hxx new file mode 100644 index 0000000000..28ce9de6dd --- /dev/null +++ b/sd/inc/sdgrffilter.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 "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); + static void InsertSdrGrafObj(Graphic pGraphic, SdPage* pPage); +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/sdhtmlfilter.hxx b/sd/inc/sdhtmlfilter.hxx new file mode 100644 index 0000000000..84b9c5d48e --- /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 0000000000..9f1395fd7c --- /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 <tools/stream.hxx> +#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 0000000000..e1a2c51b64 --- /dev/null +++ b/sd/inc/sdmod.hxx @@ -0,0 +1,186 @@ +/* -*- 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 <sot/storage.hxx> +#include "sddllapi.h" +#include <svl/itemprop.hxx> +#include <svl/lstner.hxx> +#include <com/sun/star/beans/XPropertySetInfo.hpp> +#include <sfx2/app.hxx> +#include <sfx2/module.hxx> +#include <sal/types.h> +#include <vcl/virdev.hxx> +#include <map> +#include <memory> +#include <span> +#include <string_view> + +class SdOptions; +class SvxSearchItem; +class EditFieldInfo; +class SdTransferable; +class SvNumberFormatter; +class SfxErrorHandler; +class SfxFrame; +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 +}; + +struct SdExtPropertySetInfoCacheCompare +{ + bool operator()(const std::span<SfxItemPropertyMapEntry const>& lhs, const std::span<SfxItemPropertyMapEntry const>& rhs) const + { + return lhs.data() < rhs.data(); + } +}; +typedef std::map< + std::span<SfxItemPropertyMapEntry const>, + css::uno::Reference<css::beans::XPropertySetInfo>, + SdExtPropertySetInfoCacheCompare > SdExtPropertySetInfoCache; +typedef std::map< SdrObjKind, css::uno::Sequence< css::uno::Type> > SdTypesCache; + +/* + + This subclass of <SfxModule> (which is a subclass of <SfxShell>) is + linked to the DLL. One instance of this class exists while the DLL is + loaded. + + SdModule is like to be compared with the <SfxApplication>-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<SotStorageStream> 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<SvxSearchItem> 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<SfxItemSet> CreateItemSet( sal_uInt16 nId ) override; + virtual void ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet ) override; + virtual std::unique_ptr<SfxTabPage> CreateTabPage( sal_uInt16 nId, weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet ) override; + virtual std::optional<SfxStyleFamilies> CreateStyleFamilies() override; + + SdExtPropertySetInfoCache gImplImpressPropertySetInfoCache; + SdExtPropertySetInfoCache gImplDrawPropertySetInfoCache; + SdTypesCache gImplTypesCache; + + svtools::ColorConfig& GetColorConfig(); + +private: + + SdOptions* pImpressOptions; + SdOptions* pDrawOptions; + std::unique_ptr<SvxSearchItem> pSearchItem; + std::unique_ptr<SvNumberFormatter> pNumberFormatter; + tools::SvRef<SotStorage> xOptionStorage; + bool bWaterCan; + std::unique_ptr<SfxErrorHandler> 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<css::frame::XFrame>& 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<svtools::ColorConfig> mpColorConfig; +}; + +#define SD_MOD() ( static_cast<SdModule*>(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 0000000000..ef127ea607 --- /dev/null +++ b/sd/inc/sdpage.hxx @@ -0,0 +1,405 @@ +/* -*- 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 <com/sun/star/drawing/XDrawPage.hpp> +#include <com/sun/star/presentation/FadeEffect.hpp> +#include <com/sun/star/office/XAnnotation.hpp> + +#include <memory> +#include <string_view> +#include <vector> +#include <editeng/flditem.hxx> +#include <svx/svdobj.hxx> +#include <svx/fmpage.hxx> +#include <xmloff/autolayout.hxx> +#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; + class Annotation; +} + +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< rtl::Reference< Annotation > > 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<SfxItemSet> 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<SdrPage> 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); + rtl::Reference<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 rtl::Reference<SdrObject> NbcRemoveObject(size_t nObjNum) override; + virtual rtl::Reference<SdrObject> RemoveObject(size_t nObjNum) override; + + /** Also override ReplaceObject methods to realize when + objects are removed with this mechanism instead of RemoveObject*/ + virtual rtl::Reference<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 <TRUE/> for a master page then this + master page should not be deleted automatically. + */ + bool IsPrecious() const { return mbIsPrecious; } + + void createAnnotation( rtl::Reference< sd::Annotation >& xAnnotation ); + void addAnnotation( const rtl::Reference< sd::Annotation >& xAnnotation, int nIndex ); + void removeAnnotation( const rtl::Reference< sd::Annotation >& 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<Graphic*>& 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 0000000000..685a3485ac --- /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 0000000000..7ff62a5c05 --- /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 <tools/stream.hxx> + +// 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 0000000000..2ed8cd42cf --- /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 <rtl/ustring.hxx> +#include "sddllapi.h" +#include <unotools/resmgr.hxx> + +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 0000000000..fbcc03574c --- /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 <svl/undo.hxx> +#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 0000000000..9a1bf82c02 --- /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 <comphelper/fileformat.h> +#include <tools/solar.h> +#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 0000000000..6528cc0732 --- /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 <sal/types.h> +#include <svx/sdrobjectuser.hxx> + +#include <list> + +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 0000000000..4a2b4f3d3b --- /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 <memory> +#include <com/sun/star/uno/Any.hxx> +#include <com/sun/star/beans/XPropertySet.hpp> +#include <com/sun/star/lang/XServiceInfo.hpp> +#include <com/sun/star/lang/XComponent.hpp> +#include <com/sun/star/lang/XSingleServiceFactory.hpp> +#include <com/sun/star/container/XIndexAccess.hpp> +#include <com/sun/star/container/XNameContainer.hpp> +#include <com/sun/star/container/XNamed.hpp> + +#include <rtl/ref.hxx> + +#include <cppuhelper/implbase.hxx> + +#include <svl/style.hxx> + +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( 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<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; + +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<SdStyleFamilyImpl> 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 0000000000..9e1693249f --- /dev/null +++ b/sd/inc/stlpool.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 <com/sun/star/lang/XServiceInfo.hpp> +#include <com/sun/star/container/XIndexAccess.hpp> +#include <com/sun/star/lang/XComponent.hpp> + +#include <cppuhelper/implbase.hxx> +#include <vcl/font.hxx> +#include <map> +#include <string_view> +#include <vector> + +#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<SfxStyleSheetBase*> &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<OUString> &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 CopyTableStyles(SdStyleSheetPool const & rSourcePool, XStyleVector& rCreatedSheets); + 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<SfxStyleSheetBase> 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 0000000000..fe1079ffd6 --- /dev/null +++ b/sd/inc/stlsheet.hxx @@ -0,0 +1,186 @@ +/* -*- 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 <rtl/ref.hxx> + +#include <com/sun/star/style/XStyle.hpp> +#include <com/sun/star/beans/XMultiPropertySet.hpp> +#include <com/sun/star/beans/XPropertySet.hpp> +#include <com/sun/star/lang/XServiceInfo.hpp> +#include <com/sun/star/beans/XPropertyState.hpp> +#include <com/sun/star/lang/XComponent.hpp> +#include <com/sun/star/util/XModifyBroadcaster.hpp> + +#include <comphelper/interfacecontainer4.hxx> +#include <cppuhelper/interfacecontainer.h> +#include <cppuhelper/implbase.hxx> + +#include <svl/style.hxx> + +#include <memory> +#include <mutex> + +#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 +{ +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; + + bool IsEditable(); + + 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<SdStyleSheet> 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<OUString>& aPropertyNames, const css::uno::Sequence<css::uno::Any>& aValues) override; + virtual css::uno::Sequence<css::uno::Any> SAL_CALL getPropertyValues(const css::uno::Sequence<OUString>& aPropertyNames) override; + virtual void SAL_CALL addPropertiesChangeListener(const css::uno::Sequence<OUString>& aPropertyNames, const css::uno::Reference<css::beans::XPropertiesChangeListener>& xListener) override; + virtual void SAL_CALL removePropertiesChangeListener(const css::uno::Reference<css::beans::XPropertiesChangeListener>& xListener) override; + virtual void SAL_CALL firePropertiesChangeEvent(const css::uno::Sequence<OUString>& aPropertyNames, const css::uno::Reference<css::beans::XPropertiesChangeListener>& 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(); + + mutable std::mutex m_aMutex; + bool m_bDisposed = false; + bool m_bInDispose = false; + comphelper::OInterfaceContainerHelper4<css::util::XModifyListener> maModifyListeners; + comphelper::OInterfaceContainerHelper4<css::lang::XEventListener> maEventListeners; + OUString msApiName; + rtl::Reference< SfxStyleSheetBasePool > mxPool; + + std::unique_ptr< ModifyListenerForwarder > mpModifyListenerForwarder; + + SdStyleSheet( const SdStyleSheet& ) = delete; + SdStyleSheet& operator=( const SdStyleSheet& ) = delete; +}; + +typedef std::vector< rtl::Reference< SdStyleSheet > > SdStyleSheetVector; +typedef std::vector< css::uno::Reference< css::style::XStyle > > XStyleVector; + +struct StyleSheetCopyResult +{ + rtl::Reference<SdStyleSheet> m_xStyleSheet; + bool m_bCreatedByCopy; + StyleSheetCopyResult(SdStyleSheet* pStyleSheet, bool bCreatedByCopy) + : m_xStyleSheet(pStyleSheet) + , m_bCreatedByCopy(bCreatedByCopy) + { + } +}; + +typedef std::vector<StyleSheetCopyResult> 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 0000000000..d449ccf01c --- /dev/null +++ b/sd/inc/strings.hrc @@ -0,0 +1,467 @@ +/* -*- 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, u8##String) +#define NNC_(Context, StringSingular, StringPlural) TranslateNId(Context, reinterpret_cast<char const *>(u8##StringSingular), reinterpret_cast<char const *>(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_SD_PAGE_COUNT_DRAW NC_("STR_SD_PAGE_COUNT_DRAW", "Page %1 of %2") +#define STR_SD_PAGE_COUNT_CUSTOM_DRAW NC_("STR_SD_PAGE_COUNT_CUSTOM_DRAW", "Page %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_UNDO_HIDE_SLIDE NC_("STR_UNDO_HIDE_SLIDE", "Hide slide") +#define STR_UNDO_SHOW_SLIDE NC_("STR_UNDO_SHOW_SLIDE", "Show slide") +#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_AVAILABLE_MASTERSLIDE NC_("STR_AVAILABLE_MASTERSLIDE", "Available Master Slides") +#define STR_AVAILABLE_MASTERPAGE NC_("STR_AVAILABLE_MASTERPAGE", "Available Master Pages") +#define STR_SELECT_SLIDE NC_("STR_SELECT_SLIDE", "Select a Slide Design") +#define STR_SELECT_PAGE NC_("STR_SELECT_PAGE", "Select a Page Design") +#define STR_LOAD_PRESENTATION_LAYOUT NC_("STR_LOAD_PRESENTATION_LAYOUT", "Load Master Slide") +#define STR_LOAD_DRAWING_LAYOUT NC_("STR_LOAD_DRAWING_LAYOUT", "Load Master Page") +#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_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") + +#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_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_RENAMEMASTERSLIDE NC_("STR_TITLE_RENAMEMASTERSLIDE", "Rename Master Slide") +#define STR_TITLE_RENAMEMASTERPAGE NC_("STR_TITLE_RENAMEMASTERPAGE", "Rename Master Page") +#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", "<header>" ) +#define STR_FIELD_PLACEHOLDER_FOOTER NC_("STR_FIELD_PLACEHOLDER_FOOTER", "<footer>" ) +#define STR_FIELD_PLACEHOLDER_DATETIME NC_("STR_FIELD_PLACEHOLDER_DATETIME", "<date/time>" ) +#define STR_FIELD_PLACEHOLDER_NUMBER NC_("STR_FIELD_PLACEHOLDER_NUMBER", "<number>" ) +#define STR_FIELD_PLACEHOLDER_COUNT NC_("STR_FIELD_PLACEHOLDER_COUNT", "<count>" ) +#define STR_FIELD_PLACEHOLDER_SLIDENAME NC_("STR_FIELD_PLACEHOLDER_SLIDENAME", "<slide-name>" ) +#define STR_FIELD_PLACEHOLDER_PAGENAME NC_("STR_FIELD_PLACEHOLDER_PAGENAME", "<page-name>" ) +#define STR_PLACEHOLDER_DESCRIPTION_NOTES NC_("STR_PLACEHOLDER_DESCRIPTION_NOTES", "Notes Area") +#define STR_UNDO_HANGULHANJACONVERSION NC_("STR_UNDO_HANGULHANJACONVERSION", "Hangul/Hanja Conversion") +#define STR_LEFT_PANE_IMPRESS_TITLE NC_("STR_LEFT_PANE_IMPRESS_TITLE", "Slides") +#define STR_LEFT_PANE_IMPRESS_TITLE_MASTER NC_("STR_LEFT_PANE_IMPRESS_TITLE_MASTER", "Master Slides") +#define STR_LEFT_PANE_DRAW_TITLE NC_("STR_LEFT_PANE_DRAW_TITLE", "Pages") +#define STR_LEFT_PANE_DRAW_TITLE_MASTER NC_("STR_LEFT_PANE_DRAW_TITLE_MASTER", "Master Pages") +#define STR_TASKPANEL_NOT_AVAILABLE_SUBSTITUTION NC_("STR_TASKPANEL_NOT_AVAILABLE_SUBSTITUTION", "Preview not available") +#define STR_TASKPANEL_PREPARING_PREVIEW_SUBSTITUTION NC_("STR_TASKPANEL_PREPARING_PREVIEW_SUBSTITUTION", "Preparing preview") +#define STR_TASKPANEL_LAYOUT_MENU_TITLE NC_("STR_TASKPANEL_LAYOUT_MENU_TITLE", "Layouts") +#define STR_GRAPHICS_STYLE_FAMILY NC_("STR_GRAPHICS_STYLE_FAMILY", "Drawing Styles") +#define STR_PRESENTATIONS_STYLE_FAMILY NC_("STR_PRESENTATIONS_STYLE_FAMILY", "Presentation Styles") +#define STR_CELL_STYLE_FAMILY NC_("STR_CELL_STYLE_FAMILY", "Cell Styles") +#define STR_NAVIGATOR_SHAPE_BASE_NAME NC_("STR_NAVIGATOR_SHAPE_BASE_NAME", "Shape %1") +#define STR_SET_BACKGROUND_PICTURE NC_("STR_SET_BACKGROUND_PICTURE", "Set Background Image" ) +#define STR_RESET_LAYOUT NC_("STR_RESET_LAYOUT", "Reset Slide Layout") +#define STR_INSERT_TABLE NC_("STR_INSERT_TABLE", "Insert Table") +#define STR_INSERT_CHART NC_("STR_INSERT_CHART", "Insert Chart") +#define STR_INSERT_PICTURE NC_("STR_INSERT_PICTURE", "Insert Image") +#define STR_INSERT_MOVIE NC_("STR_INSERT_MOVIE", "Insert Audio or Video") +#define STRING_DRAG_AND_DROP_PAGES NC_("STRING_DRAG_AND_DROP_PAGES", "Drag and Drop Pages" ) +#define STRING_DRAG_AND_DROP_SLIDES NC_("STRING_DRAG_AND_DROP_SLIDES", "Drag and Drop Slides" ) +#define STR_PHOTO_ALBUM_EMPTY_WARNING NC_("STR_PHOTO_ALBUM_EMPTY_WARNING", "Please add Images to the Album." ) +#define STR_PHOTO_ALBUM_TEXTBOX NC_("STR_PHOTO_ALBUM_TEXTBOX", "Text Slide") + +#define STR_LAYER_BCKGRND NC_("STR_LAYER_BCKGRND", "Background" ) +#define STR_LAYER_BCKGRNDOBJ NC_("STR_LAYER_BCKGRNDOBJ", "Background objects" ) +#define STR_LAYER_LAYOUT NC_("STR_LAYER_LAYOUT", "Layout" ) +#define STR_LAYER_CONTROLS NC_("STR_LAYER_CONTROLS", "Controls" ) +#define STR_LAYER_MEASURELINES NC_("STR_LAYER_MEASURELINES", "Dimension Lines" ) +#define STR_PAGE NC_("STR_PAGE", "Slide" ) +#define STR_PAGE_NAME NC_("STR_PAGE_NAME", "Page" ) +#define STR_SLIDE_NAME NC_("STR_SLIDE_NAME", "Slide" ) +#define STR_MASTERSLIDE_NAME NC_("STR_MASTERSLIDE_NAME", "Master Slide") +#define STR_MASTERSLIDE_LABEL NC_("STR_MASTERSLIDE_LABEL", "Master Slide:") +#define STR_MASTERPAGE_NAME NC_("STR_MASTERPAGE_NAME", "Master Page") +#define STR_MASTERPAGE_LABEL NC_("STR_MASTERPAGE_LABEL", "Master Page:") +#define STR_NOTES NC_("STR_NOTES", "(Notes)" ) +#define STR_HANDOUT NC_("STR_HANDOUT", "Handouts" ) +#define STR_PRESOBJ_MPTITLE NC_("STR_PRESOBJ_MPTITLE", "Click to edit the title text format" ) +#define STR_PRESOBJ_MPOUTLINE NC_("STR_PRESOBJ_MPOUTLINE", "Click to edit the outline text format" ) +#define STR_PRESOBJ_MPTITLE_MOBILE NC_("STR_PRESOBJ_MPTITLE_MOBILE", "Double-tap to edit the title text format" ) +#define STR_PRESOBJ_MPOUTLINE_MOBILE NC_("STR_PRESOBJ_MPOUTLINE_MOBILE", "Double-tap to edit the outline text format" ) +#define STR_PRESOBJ_MPOUTLLAYER2 NC_("STR_PRESOBJ_MPOUTLLAYER2", "Second Outline Level" ) +#define STR_PRESOBJ_MPOUTLLAYER3 NC_("STR_PRESOBJ_MPOUTLLAYER3", "Third Outline Level" ) +#define STR_PRESOBJ_MPOUTLLAYER4 NC_("STR_PRESOBJ_MPOUTLLAYER4", "Fourth Outline Level" ) +#define STR_PRESOBJ_MPOUTLLAYER5 NC_("STR_PRESOBJ_MPOUTLLAYER5", "Fifth Outline Level" ) +#define STR_PRESOBJ_MPOUTLLAYER6 NC_("STR_PRESOBJ_MPOUTLLAYER6", "Sixth Outline Level" ) +#define STR_PRESOBJ_MPOUTLLAYER7 NC_("STR_PRESOBJ_MPOUTLLAYER7", "Seventh Outline Level" ) +#define STR_PRESOBJ_MPNOTESTITLE NC_("STR_PRESOBJ_MPNOTESTITLE", "Click to move the slide" ) +#define STR_PRESOBJ_MPNOTESTEXT NC_("STR_PRESOBJ_MPNOTESTEXT", "Click to edit the notes format" ) +#define STR_PRESOBJ_MPNOTESTITLE_MOBILE NC_("STR_PRESOBJ_MPNOTESTITLE_MOBILE", "Double-tap to move the slide" ) +#define STR_PRESOBJ_MPNOTESTEXT_MOBILE NC_("STR_PRESOBJ_MPNOTESTEXT_MOBILE", "Double-tap to edit the notes format" ) +#define STR_PRESOBJ_TITLE NC_("STR_PRESOBJ_TITLE", "Click to add Title" ) +#define STR_PRESOBJ_OUTLINE NC_("STR_PRESOBJ_OUTLINE", "Click to add Text" ) +#define STR_PRESOBJ_TEXT NC_("STR_PRESOBJ_TEXT", "Click to add Text" ) +#define STR_PRESOBJ_NOTESTEXT NC_("STR_PRESOBJ_NOTESTEXT", "Click to add Notes" ) +#define STR_PRESOBJ_TITLE_MOBILE NC_("STR_PRESOBJ_TITLE_MOBILE", "Double-tap to add Title" ) +#define STR_PRESOBJ_OUTLINE_MOBILE NC_("STR_PRESOBJ_OUTLINE_MOBILE", "Double-tap to add Text" ) +#define STR_PRESOBJ_TEXT_MOBILE NC_("STR_PRESOBJ_TEXT_MOBILE", "Double-tap to add Text" ) +#define STR_PRESOBJ_TEXT_EDIT_MOBILE NC_("STR_PRESOBJ_TEXT_MOBILE", "Tap to edit text" ) +#define STR_PRESOBJ_NOTESTEXT_MOBILE NC_("STR_PRESOBJ_NOTESTEXT_MOBILE", "Double-tap to add Notes" ) +#define STR_PRESOBJ_GRAPHIC NC_("STR_PRESOBJ_GRAPHIC", "Double-click to add an Image" ) +#define STR_PRESOBJ_OBJECT NC_("STR_PRESOBJ_OBJECT", "Double-click to add an Object" ) +#define STR_PRESOBJ_CHART NC_("STR_PRESOBJ_CHART", "Double-click to add a Chart" ) +#define STR_PRESOBJ_ORGCHART NC_("STR_PRESOBJ_ORGCHART", "Double-click to add an Organization Chart" ) +#define STR_PRESOBJ_TABLE NC_("STR_PRESOBJ_TABLE", "Double-click to add a Spreadsheet" ) +#define STR_LAYOUT_DEFAULT_NAME NC_("STR_LAYOUT_DEFAULT_NAME", "Default" ) +#define STR_LAYOUT_DEFAULT_TITLE_NAME NC_("STR_LAYOUT_DEFAULT_TITLE_NAME", "Title" ) +#define STR_STANDARD_STYLESHEET_NAME NC_("STR_STANDARD_STYLESHEET_NAME", "Default Drawing Style" ) +#define STR_UNDO_MOVEPAGES NC_("STR_UNDO_MOVEPAGES", "Move slides" ) +#define STR_INSERT_PAGES NC_("STR_INSERT_PAGES", "Insert Pages" ) +#define STR_INSERT_PAGE_DRAW NC_("STR_INSERT_PAGE_DRAW", "Insert Page" ) +#define STR_SLIDE_SETUP_TITLE NC_("STR_SLIDE_SETUP_TITLE", "Slide Properties" ) + +#define STR_POOLSHEET_OBJWITHOUTFILL NC_("STR_POOLSHEET_OBJWITHOUTFILL", "Object without fill" ) +#define STR_POOLSHEET_OBJNOLINENOFILL NC_("STR_POOLSHEET_OBJNOLINENOFILL", "Object with no fill and no line" ) +#define STR_POOLSHEET_TEXT NC_("STR_POOLSHEET_TEXT", "Text" ) +#define STR_POOLSHEET_A4 NC_("STR_POOLSHEET_A4", "A4" ) +#define STR_POOLSHEET_A4_TITLE NC_("STR_POOLSHEET_A4_TITLE", "Title A4" ) +#define STR_POOLSHEET_A4_HEADLINE NC_("STR_POOLSHEET_A4_HEADLINE", "Heading A4" ) +#define STR_POOLSHEET_A4_TEXT NC_("STR_POOLSHEET_A4_TEXT", "Text A4" ) +#define STR_POOLSHEET_A0 NC_("STR_POOLSHEET_A0", "A0" ) +#define STR_POOLSHEET_A0_TITLE NC_("STR_POOLSHEET_A0_TITLE", "Title A0" ) +#define STR_POOLSHEET_A0_HEADLINE NC_("STR_POOLSHEET_A0_HEADLINE", "Heading A0" ) +#define STR_POOLSHEET_A0_TEXT NC_("STR_POOLSHEET_A0_TEXT", "Text A0" ) +#define STR_POOLSHEET_GRAPHIC NC_("STR_POOLSHEET_GRAPHIC", "Graphic" ) +#define STR_POOLSHEET_SHAPES NC_("STR_POOLSHEET_GRAPHIC", "Shapes" ) +#define STR_POOLSHEET_LINES NC_("STR_POOLSHEET_LINES", "Lines" ) +#define STR_POOLSHEET_MEASURE NC_("STR_POOLSHEET_MEASURE", "Arrow Line" ) +#define STR_POOLSHEET_LINES_DASHED NC_("STR_POOLSHEET_LINES_DASHED", "Dashed Line" ) + +#define STR_POOLSHEET_FILLED NC_("STR_POOLSHEET_FILLED", "Filled" ) +#define STR_POOLSHEET_FILLED_BLUE NC_("STR_POOLSHEET_FILLED_BLUE", "Filled Blue" ) +#define STR_POOLSHEET_FILLED_GREEN NC_("STR_POOLSHEET_FILLED_GREEN", "Filled Green" ) +#define STR_POOLSHEET_FILLED_YELLOW NC_("STR_POOLSHEET_FILLED_YELLOW", "Filled Yellow" ) +#define STR_POOLSHEET_FILLED_RED NC_("STR_POOLSHEET_FILLED_RED", "Filled Red" ) + +#define STR_POOLSHEET_OUTLINE NC_("STR_POOLSHEET_OUTLINE", "Outlined" ) +#define STR_POOLSHEET_OUTLINE_BLUE NC_("STR_POOLSHEET_OUTLINE_BLUE", "Outlined Blue" ) +#define STR_POOLSHEET_OUTLINE_GREEN NC_("STR_POOLSHEET_OUTLINE_GREEN", "Outlined Green" ) +#define STR_POOLSHEET_OUTLINE_YELLOW NC_("STR_POOLSHEET_OUTLINE_YELLOW", "Outlined Yellow" ) +#define STR_POOLSHEET_OUTLINE_RED NC_("STR_POOLSHEET_OUTLINE_RED", "Outlined Red" ) + +#define STR_PSEUDOSHEET_TITLE NC_("STR_PSEUDOSHEET_TITLE", "Title" ) +#define STR_PSEUDOSHEET_SUBTITLE NC_("STR_PSEUDOSHEET_SUBTITLE", "Subtitle") +#define STR_PSEUDOSHEET_OUTLINE NC_("STR_PSEUDOSHEET_OUTLINE", "Outline" ) +#define STR_PSEUDOSHEET_BACKGROUNDOBJECTS NC_("STR_PSEUDOSHEET_BACKGROUNDOBJECTS", "Background objects" ) +#define STR_PSEUDOSHEET_BACKGROUND NC_("STR_PSEUDOSHEET_BACKGROUND", "Background" ) +#define STR_PSEUDOSHEET_NOTES NC_("STR_PSEUDOSHEET_NOTES", "Notes" ) +#define STR_POWERPOINT_IMPORT NC_("STR_POWERPOINT_IMPORT", "PowerPoint Import") +#define STR_SAVE_DOC NC_("STR_SAVE_DOC", "Save Document" ) +#define STR_SHRINK_FONT_SIZE NC_("STR_SHRINK_FONT_SIZE", "Shrink font size") +#define STR_GROW_FONT_SIZE NC_("STR_GROW_FONT_SIZE", "Grow font size") + +/* Names and descriptions of the Draw/Impress accessibility views + ============================================================== +*/ +#define SID_SD_A11Y_D_DRAWVIEW_N NC_("SID_SD_A11Y_D_DRAWVIEW_N", "Drawing View") +#define SID_SD_A11Y_I_DRAWVIEW_N NC_("SID_SD_A11Y_I_DRAWVIEW_N", "Drawing View") +#define SID_SD_A11Y_I_OUTLINEVIEW_N NC_("SID_SD_A11Y_I_OUTLINEVIEW_N", "Outline View") +#define SID_SD_A11Y_I_SLIDEVIEW_N NC_("SID_SD_A11Y_I_SLIDEVIEW_N", "Slides View") +#define SID_SD_A11Y_I_SLIDEVIEW_D NC_("SID_SD_A11Y_I_SLIDEVIEW_D", "This is where you sort slides.") +#define SID_SD_A11Y_I_NOTESVIEW_N NC_("SID_SD_A11Y_I_NOTESVIEW_N", "Notes View") +#define SID_SD_A11Y_I_HANDOUTVIEW_N NC_("SID_SD_A11Y_I_HANDOUTVIEW_N", "Handout View") +#define SID_SD_A11Y_P_TITLE_N NC_("SID_SD_A11Y_P_TITLE_N", "PresentationTitle") +#define SID_SD_A11Y_P_OUTLINER_N NC_("SID_SD_A11Y_P_OUTLINER_N", "PresentationOutliner") +#define SID_SD_A11Y_P_SUBTITLE_N NC_("SID_SD_A11Y_P_SUBTITLE_N", "PresentationSubtitle") +#define SID_SD_A11Y_P_PAGE_N NC_("SID_SD_A11Y_P_PAGE_N", "PresentationPage") +#define SID_SD_A11Y_P_NOTES_N NC_("SID_SD_A11Y_P_NOTES_N", "PresentationNotes") +#define SID_SD_A11Y_P_HANDOUT_N NC_("SID_SD_A11Y_P_HANDOUT_N", "Handout") +#define SID_SD_A11Y_P_UNKNOWN_N NC_("SID_SD_A11Y_P_UNKNOWN_N", "UnknownAccessiblePresentationShape") +#define SID_SD_A11Y_P_FOOTER_N NC_("SID_SD_A11Y_P_FOOTER_N", "PresentationFooter") +#define SID_SD_A11Y_P_HEADER_N NC_("SID_SD_A11Y_P_HEADER_N", "PresentationHeader") +#define SID_SD_A11Y_P_DATE_N NC_("SID_SD_A11Y_P_DATE_N", "PresentationDateAndTime") +#define SID_SD_A11Y_P_NUMBER_N NC_("SID_SD_A11Y_P_NUMBER_N", "PresentationPageNumber") +#define SID_SD_A11Y_D_PRESENTATION NC_("SID_SD_A11Y_D_PRESENTATION", "%PRODUCTNAME Presentation") +#define SID_SD_A11Y_P_TITLE_N_STYLE NC_("SID_SD_A11Y_P_TITLE_N_STYLE", "Title") +#define SID_SD_A11Y_P_OUTLINER_N_STYLE NC_("SID_SD_A11Y_P_OUTLINER_N_STYLE", "Outliner") +#define SID_SD_A11Y_P_SUBTITLE_N_STYLE NC_("SID_SD_A11Y_P_SUBTITLE_N_STYLE", "Subtitle") +#define SID_SD_A11Y_P_PAGE_N_STYLE NC_("SID_SD_A11Y_P_PAGE_N_STYLE", "Page") +#define SID_SD_A11Y_P_NOTES_N_STYLE NC_("SID_SD_A11Y_P_NOTES_N_STYLE", "Notes") +#define SID_SD_A11Y_P_HANDOUT_N_STYLE NC_("SID_SD_A11Y_P_HANDOUT_N_STYLE", "Handout") +#define SID_SD_A11Y_P_UNKNOWN_N_STYLE NC_("SID_SD_A11Y_P_UNKNOWN_N_STYLE", "Unknown Accessible Presentation Shape") +#define SID_SD_A11Y_P_FOOTER_N_STYLE NC_("SID_SD_A11Y_P_FOOTER_N_STYLE", "Footer") +#define SID_SD_A11Y_P_HEADER_N_STYLE NC_("SID_SD_A11Y_P_HEADER_N_STYLE", "Header") +#define SID_SD_A11Y_P_DATE_N_STYLE NC_("SID_SD_A11Y_P_DATE_N_STYLE", "Date") +#define SID_SD_A11Y_P_NUMBER_N_STYLE NC_("SID_SD_A11Y_P_NUMBER_N_STYLE", "Number") +#define SID_SD_A11Y_D_PRESENTATION_READONLY NC_("SID_SD_A11Y_D_PRESENTATION_READONLY", "(read-only)") + +#define STR_CUSTOMANIMATION_REPEAT_NONE NC_("STR_CUSTOMANIMATION_REPEAT_NONE", "none") +#define STR_CUSTOMANIMATION_REPEAT_UNTIL_NEXT_CLICK NC_("STR_CUSTOMANIMATION_REPEAT_UNTIL_NEXT_CLICK", "Until next click") +#define STR_CUSTOMANIMATION_REPEAT_UNTIL_END_OF_SLIDE NC_("STR_CUSTOMANIMATION_REPEAT_UNTIL_END_OF_SLIDE", "Until end of slide") +#define STR_CUSTOMANIMATION_DIRECTION_PROPERTY NC_("STR_CUSTOMANIMATION_DIRECTION_PROPERTY", "Direction:") +#define STR_CUSTOMANIMATION_ZOOM_PROPERTY NC_("STR_CUSTOMANIMATION_ZOOM_PROPERTY", "Zoom:") +#define STR_CUSTOMANIMATION_SPOKES_PROPERTY NC_("STR_CUSTOMANIMATION_SPOKES_PROPERTY", "Spokes:") +#define STR_CUSTOMANIMATION_FIRST_COLOR_PROPERTY NC_("STR_CUSTOMANIMATION_FIRST_COLOR_PROPERTY", "First color:") +#define STR_CUSTOMANIMATION_SECOND_COLOR_PROPERTY NC_("STR_CUSTOMANIMATION_SECOND_COLOR_PROPERTY", "Second color:") +#define STR_CUSTOMANIMATION_FILL_COLOR_PROPERTY NC_("STR_CUSTOMANIMATION_FILL_COLOR_PROPERTY", "Fill color:") +#define STR_CUSTOMANIMATION_STYLE_PROPERTY NC_("STR_CUSTOMANIMATION_STYLE_PROPERTY", "Style:") +#define STR_CUSTOMANIMATION_FONT_PROPERTY NC_("STR_CUSTOMANIMATION_FONT_PROPERTY", "Font:") +#define STR_CUSTOMANIMATION_FONT_COLOR_PROPERTY NC_("STR_CUSTOMANIMATION_FONT_COLOR_PROPERTY", "Font color:") +#define STR_CUSTOMANIMATION_FONT_SIZE_STYLE_PROPERTY NC_("STR_CUSTOMANIMATION_FONT_SIZE_STYLE_PROPERTY", "Style:") +#define STR_CUSTOMANIMATION_FONT_STYLE_PROPERTY NC_("STR_CUSTOMANIMATION_FONT_STYLE_PROPERTY", "Typeface:") +#define STR_CUSTOMANIMATION_LINE_COLOR_PROPERTY NC_("STR_CUSTOMANIMATION_LINE_COLOR_PROPERTY", "Line color:") +#define STR_CUSTOMANIMATION_SIZE_PROPERTY NC_("STR_CUSTOMANIMATION_SIZE_PROPERTY", "Font size:") +#define STR_CUSTOMANIMATION_SCALE_PROPERTY NC_("STR_CUSTOMANIMATION_SCALE_PROPERTY", "Size:") +#define STR_CUSTOMANIMATION_AMOUNT_PROPERTY NC_("STR_CUSTOMANIMATION_AMOUNT_PROPERTY", "Amount:") +#define STR_CUSTOMANIMATION_COLOR_PROPERTY NC_("STR_CUSTOMANIMATION_COLOR_PROPERTY", "Color:") +#define STR_CUSTOMANIMATION_NO_SOUND NC_("STR_CUSTOMANIMATION_NO_SOUND", "(No sound)") +#define STR_CUSTOMANIMATION_STOP_PREVIOUS_SOUND NC_("STR_CUSTOMANIMATION_STOP_PREVIOUS_SOUND", "(Stop previous sound)") +#define STR_CUSTOMANIMATION_BROWSE_SOUND NC_("STR_CUSTOMANIMATION_BROWSE_SOUND", "Other sound...") +#define STR_CUSTOMANIMATION_SAMPLE NC_("STR_CUSTOMANIMATION_SAMPLE", "Sample") +#define STR_CUSTOMANIMATION_TRIGGER NC_("STR_CUSTOMANIMATION_TRIGGER", "Trigger") +#define STR_CUSTOMANIMATION_USERPATH NC_("STR_CUSTOMANIMATION_USERPATH", "User paths") +#define STR_CUSTOMANIMATION_ENTRANCE NC_("STR_CUSTOMANIMATION_ENTRANCE", "Entrance: %1") +#define STR_CUSTOMANIMATION_EMPHASIS NC_("STR_CUSTOMANIMATION_EMPHASIS", "Emphasis: %1") +#define STR_CUSTOMANIMATION_EXIT NC_("STR_CUSTOMANIMATION_EXIT", "Exit: %1") +#define STR_CUSTOMANIMATION_MOTION_PATHS NC_("STR_CUSTOMANIMATION_MOTION_PATHS", "Motion Paths: %1") +#define STR_CUSTOMANIMATION_MISC NC_("STR_CUSTOMANIMATION_MISC", "Misc: %1") +#define STR_SLIDETRANSITION_NONE NC_("STR_SLIDETRANSITION_NONE", "None") + +#define STR_ANNOTATION_TODAY NC_("STR_ANNOTATION_TODAY", "Today," ) +#define STR_ANNOTATION_YESTERDAY NC_("STR_ANNOTATION_YESTERDAY", "Yesterday," ) +#define STR_ANNOTATION_NOAUTHOR NC_("STR_ANNOTATION_NOAUTHOR", "(no author)" ) +#define STR_ANNOTATION_WRAP_FORWARD NC_("STR_ANNOTATION_WRAP_FORWARD", "%PRODUCTNAME Impress reached the end of the presentation. Do you want to continue at the beginning?") +#define STR_ANNOTATION_WRAP_BACKWARD NC_("STR_ANNOTATION_WRAP_BACKWARD", "%PRODUCTNAME Impress reached the beginning of the presentation. Do you want to continue at the end?") +#define STR_ANNOTATION_WRAP_FORWARD_DRAW NC_("STR_ANNOTATION_WRAP_FORWARD_DRAW", "%PRODUCTNAME Draw reached the end of the document. Do you want to continue at the beginning?") +#define STR_ANNOTATION_WRAP_BACKWARD_DRAW NC_("STR_ANNOTATION_WRAP_BACKWARD_DRAW", "%PRODUCTNAME Draw reached the beginning of the document. Do you want to continue at the end?") +#define STR_ANNOTATION_UNDO_INSERT NC_("STR_ANNOTATION_UNDO_INSERT", "Insert Comment") +#define STR_ANNOTATION_UNDO_DELETE NC_("STR_ANNOTATION_UNDO_DELETE", "Delete Comment(s)") +#define STR_ANNOTATION_UNDO_MOVE NC_("STR_ANNOTATION_UNDO_MOVE", "Move Comment") +#define STR_ANNOTATION_UNDO_EDIT NC_("STR_ANNOTATION_UNDO_EDIT", "Edit Comment") +#define STR_ANNOTATION_REPLY NC_("STR_ANNOTATION_REPLY", "Reply to %1" ) + +#define RID_DRAW_MEDIA_TOOLBOX NC_("RID_DRAW_MEDIA_TOOLBOX", "Media Playback" ) +#define RID_DRAW_TABLE_TOOLBOX NC_("RID_DRAW_TABLE_TOOLBOX", "Table" ) + +#define STR_IMPRESS_PRINT_UI_GROUP_NAME NC_("STR_IMPRESS_PRINT_UI_GROUP_NAME", "%PRODUCTNAME %s") +#define STR_IMPRESS_PRINT_UI_CONTENT NC_("STR_IMPRESS_PRINT_UI_CONTENT", "Document") +#define STR_IMPRESS_PRINT_UI_SLIDESPERPAGE NC_("STR_IMPRESS_PRINT_UI_SLIDESPERPAGE", "Slides per page:" ) +#define STR_IMPRESS_PRINT_UI_ORDER NC_("STR_IMPRESS_PRINT_UI_ORDER", "Order:" ) +#define STR_IMPRESS_PRINT_UI_INCLUDE_CONTENT NC_("STR_IMPRESS_PRINT_UI_INCLUDE_CONTENT", "~Contents") +#define STR_IMPRESS_PRINT_UI_IS_PRINT_NAME NC_("STR_IMPRESS_PRINT_UI_IS_PRINT_NAME", "~Slide name") +#define STR_DRAW_PRINT_UI_IS_PRINT_NAME NC_("STR_DRAW_PRINT_UI_IS_PRINT_NAME", "P~age name") +#define STR_IMPRESS_PRINT_UI_IS_PRINT_DATE NC_("STR_IMPRESS_PRINT_UI_IS_PRINT_DATE", "~Date and time") +#define STR_IMPRESS_PRINT_UI_IS_PRINT_HIDDEN NC_("STR_IMPRESS_PRINT_UI_IS_PRINT_HIDDEN", "Hidden pages") +#define STR_IMPRESS_PRINT_UI_QUALITY NC_("STR_IMPRESS_PRINT_UI_QUALITY", "Color") +#define STR_IMPRESS_PRINT_UI_PAGE_OPTIONS NC_("STR_IMPRESS_PRINT_UI_PAGE_OPTIONS", "~Size") +#define STR_IMPRESS_PRINT_UI_BROCHURE NC_("STR_IMPRESS_PRINT_UI_BROCHURE", "Brochure") +#define STR_IMPRESS_PRINT_UI_PAGE_SIDES NC_("STR_IMPRESS_PRINT_UI_PAGE_SIDES", "Page sides") +#define STR_IMPRESS_PRINT_UI_BROCHURE_INCLUDE NC_("STR_IMPRESS_PRINT_UI_BROCHURE_INCLUDE", "Include") +#define STR_IMPRESS_PRINT_UI_PAPER_TRAY NC_("STR_IMPRESS_PRINT_UI_PAPER_TRAY", "~Use only paper tray from printer preferences") +#define STR_IMPRESS_PRINT_UI_PAGE_RANGE NC_("STR_IMPRESS_PRINT_UI_PAGE_RANGE", "Pages:") +#define STR_IMPRESS_PRINT_UI_SLIDE_RANGE NC_("STR_IMPRESS_PRINT_UI_SLIDE_RANGE", "Slides:") + +#define STR_SAR_WRAP_FORWARD NC_("STR_SAR_WRAP_FORWARD", "%PRODUCTNAME Impress has searched to the end of the presentation. Do you want to continue at the beginning?") +#define STR_SAR_WRAP_BACKWARD NC_("STR_SAR_WRAP_BACKWARD", "%PRODUCTNAME Impress has searched to the beginning of the presentation. Do you want to continue at the end?") +#define STR_SAR_WRAP_FORWARD_DRAW NC_("STR_SAR_WRAP_FORWARD_DRAW", "%PRODUCTNAME Draw has searched to the end of the document. Do you want to continue at the beginning?") +#define STR_SAR_WRAP_BACKWARD_DRAW NC_("STR_SAR_WRAP_BACKWARD_DRAW", "%PRODUCTNAME Draw has searched to the beginning of the document. Do you want to continue at the end?") + +#define STR_ANIMATION_DIALOG_TITLE NC_("STR_ANIMATION_DIALOG_TITLE", "Animation") + +#define RID_SVXSTR_EDIT_GRAPHIC NC_("RID_SVXSTR_EDIT_GRAPHIC", "Link") + +#define RID_SVXSTR_MENU_NEXT NC_("RID_SVXSTR_MENU_NEXT", "~Next") +#define RID_SVXSTR_MENU_PREV NC_("RID_SVXSTR_MENU_NEXT", "~Previous") +#define RID_SVXSTR_MENU_FIRST NC_("RID_SVXSTR_MENU_FIRST", "~First Slide") +#define RID_SVXSTR_MENU_LAST NC_("RID_SVXSTR_MENU_LAST", "~Last Slide") + +#define STR_CLOSE_PANE NC_("STR_CLOSE_PANE", "Close Pane") +#define STR_INSERT_TABLESTYLE NC_("STR_INSERT_TABLESTYLE", "Add a new design") +#define STR_REMOVE_TABLESTYLE NC_("STR_REMOVE_TABLESTYLE", "The selected style is in use in this document.\nIf you will delete this style, tables using it will revert to the default style.\nDo you still wish to delete this style?\n") + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/strings.hxx b/sd/inc/strings.hxx new file mode 100644 index 0000000000..6fe0ea594c --- /dev/null +++ b/sd/inc/strings.hxx @@ -0,0 +1,23 @@ +/* -*- 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 <rtl/ustring.hxx> + +/* do not translate */ +inline constexpr OUString STR_LAYOUT_TITLE = u"Titel"_ustr; +inline constexpr OUString STR_LAYOUT_OUTLINE = u"Gliederung"_ustr; +inline constexpr OUString STR_LAYOUT_BACKGROUND = u"Hintergrund"_ustr; +inline constexpr OUString STR_LAYOUT_BACKGROUNDOBJECTS = u"Hintergrundobjekte"_ustr; +inline constexpr OUString STR_LAYOUT_NOTES = u"Notizen"_ustr; +inline constexpr OUString STR_LAYOUT_SUBTITLE = u"Untertitel"_ustr; +#define STR_HTMLEXP_DEFAULT_EXTENSION ".html" + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/sd/inc/textapi.hxx b/sd/inc/textapi.hxx new file mode 100644 index 0000000000..7011034905 --- /dev/null +++ b/sd/inc/textapi.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 <editeng/unotext.hxx> +#include <rtl/ref.hxx> +#include <editeng/outliner.hxx> + +class SdDrawDocument; + +namespace sd { + +class TextAPIEditSource; + +class TextApiObject final : public SvxUnoText +{ +public: + static rtl::Reference< TextApiObject > create( SdDrawDocument* pDoc ); + + virtual ~TextApiObject() noexcept override; + + /// @throws css::uno::RuntimeException + void dispose(); + + std::optional<OutlinerParaObject> CreateText(); + void SetText( OutlinerParaObject const & rText ); + OUString GetText() const; + + static TextApiObject* getImplementation( const css::uno::Reference< css::text::XText >& ); + +private: + std::unique_ptr<TextAPIEditSource> mpSource; + TextApiObject( std::unique_ptr<TextAPIEditSource> pEditSource ); +}; + +} // namespace sd + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/theme/ThemeColorChanger.hxx b/sd/inc/theme/ThemeColorChanger.hxx new file mode 100644 index 0000000000..ff100fd511 --- /dev/null +++ b/sd/inc/theme/ThemeColorChanger.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 <sddllapi.h> +#include <svx/theme/IThemeColorChanger.hxx> +#include <docmodel/theme/ColorSet.hxx> +#include <svx/svdpage.hxx> +#include <drawdoc.hxx> + +namespace sd +{ +class SD_DLLPUBLIC ThemeColorChanger : public svx::IThemeColorChanger +{ +private: + SdrPage* mpMasterPage; + sd::DrawDocShell* mpDocShell; + +public: + ThemeColorChanger(SdrPage* pMasterPage, sd::DrawDocShell* pDocShell); + virtual ~ThemeColorChanger() override; + + void apply(std::shared_ptr<model::ColorSet> const& pColorSet) override; +}; + +} // end sd namespace + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/undo/undofactory.hxx b/sd/inc/undo/undofactory.hxx new file mode 100644 index 0000000000..92b875c78f --- /dev/null +++ b/sd/inc/undo/undofactory.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 <svx/svdundo.hxx> + +namespace sd +{ + +class UndoFactory final : public SdrUndoFactory +{ +public: + virtual std::unique_ptr<SdrUndoAction> CreateUndoRemoveObject(SdrObject& rObject) override; + virtual std::unique_ptr<SdrUndoAction> CreateUndoDeleteObject( SdrObject& rObject, bool bOrdNumDirect = false) override; + virtual std::unique_ptr<SdrUndoAction> CreateUndoObjectSetText( SdrObject& rNewObj, sal_Int32 nText ) override; + virtual std::unique_ptr<SdrUndoAction> CreateUndoReplaceObject( SdrObject& rOldObject, SdrObject& rNewObject ) override; + virtual std::unique_ptr<SdrUndoAction> CreateUndoGeoObject( SdrObject& rObject ) override; + virtual std::unique_ptr<SdrUndoAction> CreateUndoAttrObject( SdrObject& rObject, bool bStyleSheet1 = false, bool bSaveText = false ) override; +}; + +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/undo/undomanager.hxx b/sd/inc/undo/undomanager.hxx new file mode 100644 index 0000000000..f4b2e6dd4e --- /dev/null +++ b/sd/inc/undo/undomanager.hxx @@ -0,0 +1,61 @@ +/* -*- 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 <svx/sdrundomanager.hxx> + +namespace sd +{ + +class UndoManager final : public SdrUndoManager +{ +public: + UndoManager(); + + virtual void EnterListAction(const OUString &rComment, const OUString& rRepeatComment, sal_uInt16 nId, ViewShellId nViewShellId) override; + + virtual void AddUndoAction( std::unique_ptr<SfxUndoAction> pAction, bool bTryMerg=false ) override; + + /** Set or reset the undo manager linked with the called undo manager. + */ + void SetLinkedUndoManager (SfxUndoManager* pLinkedUndoManager); + +private: + using SdrUndoManager::Undo; + using SdrUndoManager::Redo; + + /** Used when the outline view is visible as a last resort to + synchronize the undo managers. + */ + SfxUndoManager* mpLinkedUndoManager; + + /** Call ClearRedo() at the linked undo manager, when present. + + It should not be necessary to call ClearRedo() explicitly, but the + synchronization between the under managers of the document and the + outline view seems to have a bug. Therefore this method is called + whenever a new undo action is added. + */ + void ClearLinkedRedoActions(); +}; + +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/undo/undoobjects.hxx b/sd/inc/undo/undoobjects.hxx new file mode 100644 index 0000000000..830ced1464 --- /dev/null +++ b/sd/inc/undo/undoobjects.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 <memory> +#include <svx/svdundo.hxx> +#include <pres.hxx> +#include <tools/weakbase.hxx> +#include <unotools/weakref.hxx> + +class SdrObjUserCall; +class SdPage; + +namespace sd +{ +class UndoRemovePresObjectImpl +{ +protected: + UndoRemovePresObjectImpl(SdrObject& rObject); + virtual ~UndoRemovePresObjectImpl(); + + virtual void Undo(); + virtual void Redo(); + +private: + std::unique_ptr<SfxUndoAction> mpUndoUsercall; + std::unique_ptr<SfxUndoAction> mpUndoAnimation; + std::unique_ptr<SfxUndoAction> mpUndoPresObj; +}; + +class UndoRemoveObject final : public SdrUndoRemoveObj, public UndoRemovePresObjectImpl +{ +public: + UndoRemoveObject(SdrObject& rObject); + + virtual void Undo() override; + virtual void Redo() override; + +private: + ::unotools::WeakReference<SdrObject> mxSdrObject; +}; + +class UndoDeleteObject final : public SdrUndoDelObj, public UndoRemovePresObjectImpl +{ +public: + UndoDeleteObject(SdrObject& rObject, bool bOrdNumDirect); + + virtual void Undo() override; + virtual void Redo() override; + +private: + ::unotools::WeakReference<SdrObject> mxSdrObject; +}; + +class UndoReplaceObject final : public SdrUndoReplaceObj, public UndoRemovePresObjectImpl +{ +public: + UndoReplaceObject(SdrObject& rOldObject, SdrObject& rNewObject); + + virtual void Undo() override; + virtual void Redo() override; + +private: + ::unotools::WeakReference<SdrObject> mxSdrObject; +}; + +class UndoObjectSetText final : public SdrUndoObjSetText +{ +public: + UndoObjectSetText(SdrObject& rNewObj, sal_Int32 nText); + virtual ~UndoObjectSetText() override; + + virtual void Undo() override; + virtual void Redo() override; + +private: + std::unique_ptr<SfxUndoAction> mpUndoAnimation; + bool mbNewEmptyPresObj; + ::unotools::WeakReference<SdrObject> mxSdrObject; +}; + +// Undo for SdrObject::SetUserCall() + +class UndoObjectUserCall final : public SdrUndoObj +{ +public: + UndoObjectUserCall(SdrObject& rNewObj); + + virtual void Undo() override; + virtual void Redo() override; + +private: + SdrObjUserCall* mpOldUserCall; + SdrObjUserCall* mpNewUserCall; + ::unotools::WeakReference<SdrObject> mxSdrObject; +}; + +// Undo for SdPage::InsertPresObj() and SdPage::RemovePresObj() + +class UndoObjectPresentationKind final : public SdrUndoObj +{ +public: + UndoObjectPresentationKind(SdrObject& rObject); + + virtual void Undo() override; + virtual void Redo() override; + +private: + PresObjKind meOldKind; + PresObjKind meNewKind; + ::unotools::WeakReference<SdPage> mxPage; + ::unotools::WeakReference<SdrObject> mxSdrObject; +}; + +// Restores correct position and size for presentation shapes with user call +// on undo + +class UndoAutoLayoutPosAndSize final : public SfxUndoAction +{ +public: + UndoAutoLayoutPosAndSize(SdPage& rPage); + + virtual void Undo() override; + virtual void Redo() override; + +private: + ::unotools::WeakReference<SdPage> mxPage; +}; + +class UndoGeoObject final : public SdrUndoGeoObj +{ +public: + UndoGeoObject(SdrObject& rNewObj); + + virtual void Undo() override; + virtual void Redo() override; + +private: + ::unotools::WeakReference<SdPage> mxPage; + ::unotools::WeakReference<SdrObject> mxSdrObject; +}; + +class UndoAttrObject final : public SdrUndoAttrObj +{ +public: + UndoAttrObject(SdrObject& rObject, bool bStyleSheet1, bool bSaveText); + + virtual void Undo() override; + virtual void Redo() override; + +private: + ::unotools::WeakReference<SdPage> mxPage; + ::unotools::WeakReference<SdrObject> mxSdrObject; +}; + +} // namespace sd + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/undoanim.hxx b/sd/inc/undoanim.hxx new file mode 100644 index 0000000000..2d329b50da --- /dev/null +++ b/sd/inc/undoanim.hxx @@ -0,0 +1,84 @@ +/* -*- 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 <com/sun/star/animations/XAnimationNode.hpp> +#include <svx/svdundo.hxx> +#include <memory> + +#include "sdundo.hxx" + +class SdPage; + +namespace sd +{ +struct UndoAnimationImpl; + +class UndoAnimation final : public SdrUndoAction +{ +public: + UndoAnimation(SdDrawDocument* pDoc, SdPage* pThePage); + virtual ~UndoAnimation() override; + + virtual void Undo() override; + virtual void Redo() override; + + virtual OUString GetComment() const override; + +private: + std::unique_ptr<UndoAnimationImpl> mpImpl; +}; + +struct UndoAnimationPathImpl; +class UndoAnimationPath final : public SdrUndoAction +{ +public: + UndoAnimationPath(SdDrawDocument* pDoc, SdPage* pThePage, + const css::uno::Reference<css::animations::XAnimationNode>& xNode); + virtual ~UndoAnimationPath() override; + + virtual void Undo() override; + virtual void Redo() override; + + virtual OUString GetComment() const override; + +private: + std::unique_ptr<UndoAnimationPathImpl> mpImpl; +}; + +struct UndoTransitionImpl; + +class UndoTransition final : public SdUndoAction +{ +public: + UndoTransition(SdDrawDocument* pDoc, SdPage* pThePage); + virtual ~UndoTransition() override; + + virtual void Undo() override; + virtual void Redo() override; + + virtual OUString GetComment() const override; + +private: + std::unique_ptr<UndoTransitionImpl> mpImpl; +}; +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/viewopt.hxx b/sd/inc/viewopt.hxx new file mode 100644 index 0000000000..03ebd2ada6 --- /dev/null +++ b/sd/inc/viewopt.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 . + */ + +#include <rtl/ustring.hxx> +#include <tools/color.hxx> + +/// View options for the current view +struct SdViewOptions +{ + // The color of the area behind the slide (used to be called "Wiese") + Color mnAppBackgroundColor; + // The color of the document background + Color mnDocBackgroundColor; + // The name of the color scheme + OUString msColorSchemeName = "Default"; +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |